diff --git a/SDDSComponents/SDDSComponentsPreview/Assets.xcassets/checkboxOff.imageset/CheckBoxDark.svg b/SDDSComponents/SDDSComponentsPreview/Assets.xcassets/checkboxOff.imageset/CheckBoxDark.svg new file mode 100644 index 000000000..924c0b508 --- /dev/null +++ b/SDDSComponents/SDDSComponentsPreview/Assets.xcassets/checkboxOff.imageset/CheckBoxDark.svg @@ -0,0 +1,3 @@ + + + diff --git a/SDDSComponents/SDDSComponentsPreview/Assets.xcassets/checkboxOff.imageset/CheckBoxOff 1.svg b/SDDSComponents/SDDSComponentsPreview/Assets.xcassets/checkboxOff.imageset/CheckBoxOff 1.svg new file mode 100644 index 000000000..1dc629733 --- /dev/null +++ b/SDDSComponents/SDDSComponentsPreview/Assets.xcassets/checkboxOff.imageset/CheckBoxOff 1.svg @@ -0,0 +1,3 @@ + + + diff --git a/SDDSComponents/SDDSComponentsPreview/Assets.xcassets/checkboxOff.imageset/Contents.json b/SDDSComponents/SDDSComponentsPreview/Assets.xcassets/checkboxOff.imageset/Contents.json index 61e4bbf81..a1f131dc8 100644 --- a/SDDSComponents/SDDSComponentsPreview/Assets.xcassets/checkboxOff.imageset/Contents.json +++ b/SDDSComponents/SDDSComponentsPreview/Assets.xcassets/checkboxOff.imageset/Contents.json @@ -4,6 +4,16 @@ "filename" : "CheckBoxOff.svg", "idiom" : "universal" }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "light" + } + ], + "filename" : "CheckBoxOff 1.svg", + "idiom" : "universal" + }, { "appearances" : [ { @@ -11,6 +21,7 @@ "value" : "dark" } ], + "filename" : "CheckBoxDark.svg", "idiom" : "universal" } ], diff --git a/SDDSComponents/SDDSComponentsPreview/Assets.xcassets/radioboxOff.imageset/Contents.json b/SDDSComponents/SDDSComponentsPreview/Assets.xcassets/radioboxOff.imageset/Contents.json index fb0a7af63..8fee71d35 100644 --- a/SDDSComponents/SDDSComponentsPreview/Assets.xcassets/radioboxOff.imageset/Contents.json +++ b/SDDSComponents/SDDSComponentsPreview/Assets.xcassets/radioboxOff.imageset/Contents.json @@ -3,6 +3,26 @@ { "filename" : "RadioBoxOff.svg", "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "light" + } + ], + "filename" : "RadioBoxDark 1.svg", + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "filename" : "RadioBoxDark.svg", + "idiom" : "universal" } ], "info" : { diff --git a/SDDSComponents/SDDSComponentsPreview/Assets.xcassets/radioboxOff.imageset/RadioBoxDark 1.svg b/SDDSComponents/SDDSComponentsPreview/Assets.xcassets/radioboxOff.imageset/RadioBoxDark 1.svg new file mode 100644 index 000000000..2faf8e7d2 --- /dev/null +++ b/SDDSComponents/SDDSComponentsPreview/Assets.xcassets/radioboxOff.imageset/RadioBoxDark 1.svg @@ -0,0 +1,3 @@ + + + diff --git a/SDDSComponents/SDDSComponentsPreview/Assets.xcassets/radioboxOff.imageset/RadioBoxDark.svg b/SDDSComponents/SDDSComponentsPreview/Assets.xcassets/radioboxOff.imageset/RadioBoxDark.svg new file mode 100644 index 000000000..2faf8e7d2 --- /dev/null +++ b/SDDSComponents/SDDSComponentsPreview/Assets.xcassets/radioboxOff.imageset/RadioBoxDark.svg @@ -0,0 +1,3 @@ + + + diff --git a/SDDSComponents/Sources/SDDSComponents/Components/SDDSRadiobox/SDDSRadiobox.swift b/SDDSComponents/Sources/SDDSComponents/Components/SDDSRadiobox/SDDSRadiobox.swift index fb685959d..5eeb2df0b 100644 --- a/SDDSComponents/Sources/SDDSComponents/Components/SDDSRadiobox/SDDSRadiobox.swift +++ b/SDDSComponents/Sources/SDDSComponents/Components/SDDSRadiobox/SDDSRadiobox.swift @@ -6,7 +6,7 @@ public struct RadioboxImages { public let selectedImage: Image public let deselectedImage: Image - init(selectedImage: Image, deselectedImage: Image) { + public init(selectedImage: Image, deselectedImage: Image) { self.selectedImage = selectedImage self.deselectedImage = deselectedImage } diff --git a/SDDSDemoApp/SDDSDemoApp.xcodeproj/project.pbxproj b/SDDSDemoApp/SDDSDemoApp.xcodeproj/project.pbxproj index ffa47a51e..c1c095063 100644 --- a/SDDSDemoApp/SDDSDemoApp.xcodeproj/project.pbxproj +++ b/SDDSDemoApp/SDDSDemoApp.xcodeproj/project.pbxproj @@ -532,8 +532,8 @@ isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( - 24C1540D2BB3020B00963FAA /* Preview Assets.xcassets in Resources */, 24C1540A2BB3020B00963FAA /* Assets.xcassets in Resources */, + 24C1540D2BB3020B00963FAA /* Preview Assets.xcassets in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -703,7 +703,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 14.0; + IPHONEOS_DEPLOYMENT_TARGET = 16.0; LOCALIZATION_PREFERS_STRING_CATALOGS = YES; MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; MTL_FAST_MATH = YES; @@ -760,7 +760,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 14.0; + IPHONEOS_DEPLOYMENT_TARGET = 16.0; LOCALIZATION_PREFERS_STRING_CATALOGS = YES; MTL_ENABLE_DEBUG_INFO = NO; MTL_FAST_MATH = YES; @@ -789,7 +789,7 @@ INFOPLIST_KEY_UILaunchScreen_Generation = YES; INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; - IPHONEOS_DEPLOYMENT_TARGET = 14.0; + IPHONEOS_DEPLOYMENT_TARGET = 16.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", @@ -827,7 +827,7 @@ INFOPLIST_KEY_UILaunchScreen_Generation = YES; INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; - IPHONEOS_DEPLOYMENT_TARGET = 14.0; + IPHONEOS_DEPLOYMENT_TARGET = 16.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", diff --git a/SDDSDemoApp/SDDSDemoApp/Assets.xcassets/checkboxMulti.imageset/CheckBoxOn(Multiple).svg b/SDDSDemoApp/SDDSDemoApp/Assets.xcassets/checkboxMulti.imageset/CheckBoxOn(Multiple).svg new file mode 100644 index 000000000..f4d23392f --- /dev/null +++ b/SDDSDemoApp/SDDSDemoApp/Assets.xcassets/checkboxMulti.imageset/CheckBoxOn(Multiple).svg @@ -0,0 +1,4 @@ + + + + diff --git a/SDDSDemoApp/SDDSDemoApp/Assets.xcassets/checkboxMulti.imageset/Contents.json b/SDDSDemoApp/SDDSDemoApp/Assets.xcassets/checkboxMulti.imageset/Contents.json new file mode 100644 index 000000000..9a9991442 --- /dev/null +++ b/SDDSDemoApp/SDDSDemoApp/Assets.xcassets/checkboxMulti.imageset/Contents.json @@ -0,0 +1,12 @@ +{ + "images" : [ + { + "filename" : "CheckBoxOn(Multiple).svg", + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/SDDSDemoApp/SDDSDemoApp/Assets.xcassets/checkboxOff.imageset/CheckBoxDark.svg b/SDDSDemoApp/SDDSDemoApp/Assets.xcassets/checkboxOff.imageset/CheckBoxDark.svg new file mode 100644 index 000000000..924c0b508 --- /dev/null +++ b/SDDSDemoApp/SDDSDemoApp/Assets.xcassets/checkboxOff.imageset/CheckBoxDark.svg @@ -0,0 +1,3 @@ + + + diff --git a/SDDSDemoApp/SDDSDemoApp/Assets.xcassets/checkboxOff.imageset/CheckBoxOff 1.svg b/SDDSDemoApp/SDDSDemoApp/Assets.xcassets/checkboxOff.imageset/CheckBoxOff 1.svg new file mode 100644 index 000000000..1dc629733 --- /dev/null +++ b/SDDSDemoApp/SDDSDemoApp/Assets.xcassets/checkboxOff.imageset/CheckBoxOff 1.svg @@ -0,0 +1,3 @@ + + + diff --git a/SDDSDemoApp/SDDSDemoApp/Assets.xcassets/checkboxOff.imageset/CheckBoxOff.svg b/SDDSDemoApp/SDDSDemoApp/Assets.xcassets/checkboxOff.imageset/CheckBoxOff.svg new file mode 100644 index 000000000..1dc629733 --- /dev/null +++ b/SDDSDemoApp/SDDSDemoApp/Assets.xcassets/checkboxOff.imageset/CheckBoxOff.svg @@ -0,0 +1,3 @@ + + + diff --git a/SDDSDemoApp/SDDSDemoApp/Assets.xcassets/checkboxOff.imageset/Contents.json b/SDDSDemoApp/SDDSDemoApp/Assets.xcassets/checkboxOff.imageset/Contents.json new file mode 100644 index 000000000..0e481e499 --- /dev/null +++ b/SDDSDemoApp/SDDSDemoApp/Assets.xcassets/checkboxOff.imageset/Contents.json @@ -0,0 +1,35 @@ +{ + "images" : [ + { + "filename" : "CheckBoxOff.svg", + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "light" + } + ], + "filename" : "CheckBoxOff 1.svg", + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "filename" : "CheckBoxDark.svg", + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + }, + "properties" : { + "template-rendering-intent" : "original" + } +} diff --git a/SDDSDemoApp/SDDSDemoApp/Assets.xcassets/checkboxOn.imageset/CheckBoxOn(Single).svg b/SDDSDemoApp/SDDSDemoApp/Assets.xcassets/checkboxOn.imageset/CheckBoxOn(Single).svg new file mode 100644 index 000000000..2149d1eb9 --- /dev/null +++ b/SDDSDemoApp/SDDSDemoApp/Assets.xcassets/checkboxOn.imageset/CheckBoxOn(Single).svg @@ -0,0 +1,4 @@ + + + + diff --git a/SDDSDemoApp/SDDSDemoApp/Assets.xcassets/checkboxOn.imageset/Contents.json b/SDDSDemoApp/SDDSDemoApp/Assets.xcassets/checkboxOn.imageset/Contents.json new file mode 100644 index 000000000..3fcbd4484 --- /dev/null +++ b/SDDSDemoApp/SDDSDemoApp/Assets.xcassets/checkboxOn.imageset/Contents.json @@ -0,0 +1,12 @@ +{ + "images" : [ + { + "filename" : "CheckBoxOn(Single).svg", + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/SDDSDemoApp/SDDSDemoApp/Assets.xcassets/radioboxOff.imageset/Contents.json b/SDDSDemoApp/SDDSDemoApp/Assets.xcassets/radioboxOff.imageset/Contents.json new file mode 100644 index 000000000..af5833f09 --- /dev/null +++ b/SDDSDemoApp/SDDSDemoApp/Assets.xcassets/radioboxOff.imageset/Contents.json @@ -0,0 +1,35 @@ +{ + "images" : [ + { + "filename" : "RadioBoxOff.svg", + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "light" + } + ], + "filename" : "RadioBoxOff 1.svg", + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "filename" : "RadioBoxDark.svg", + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + }, + "properties" : { + "template-rendering-intent" : "original" + } +} diff --git a/SDDSDemoApp/SDDSDemoApp/Assets.xcassets/radioboxOff.imageset/RadioBoxDark.svg b/SDDSDemoApp/SDDSDemoApp/Assets.xcassets/radioboxOff.imageset/RadioBoxDark.svg new file mode 100644 index 000000000..2faf8e7d2 --- /dev/null +++ b/SDDSDemoApp/SDDSDemoApp/Assets.xcassets/radioboxOff.imageset/RadioBoxDark.svg @@ -0,0 +1,3 @@ + + + diff --git a/SDDSDemoApp/SDDSDemoApp/Assets.xcassets/radioboxOff.imageset/RadioBoxOff 1.svg b/SDDSDemoApp/SDDSDemoApp/Assets.xcassets/radioboxOff.imageset/RadioBoxOff 1.svg new file mode 100644 index 000000000..1f7789c5e --- /dev/null +++ b/SDDSDemoApp/SDDSDemoApp/Assets.xcassets/radioboxOff.imageset/RadioBoxOff 1.svg @@ -0,0 +1,3 @@ + + + diff --git a/SDDSDemoApp/SDDSDemoApp/Assets.xcassets/radioboxOff.imageset/RadioBoxOff.svg b/SDDSDemoApp/SDDSDemoApp/Assets.xcassets/radioboxOff.imageset/RadioBoxOff.svg new file mode 100644 index 000000000..1f7789c5e --- /dev/null +++ b/SDDSDemoApp/SDDSDemoApp/Assets.xcassets/radioboxOff.imageset/RadioBoxOff.svg @@ -0,0 +1,3 @@ + + + diff --git a/SDDSDemoApp/SDDSDemoApp/Assets.xcassets/radioboxOn.imageset/Contents.json b/SDDSDemoApp/SDDSDemoApp/Assets.xcassets/radioboxOn.imageset/Contents.json new file mode 100644 index 000000000..d6f0e440e --- /dev/null +++ b/SDDSDemoApp/SDDSDemoApp/Assets.xcassets/radioboxOn.imageset/Contents.json @@ -0,0 +1,12 @@ +{ + "images" : [ + { + "filename" : "RadioBoxOn-2.svg", + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/SDDSDemoApp/SDDSDemoApp/Assets.xcassets/radioboxOn.imageset/RadioBoxOn-2.svg b/SDDSDemoApp/SDDSDemoApp/Assets.xcassets/radioboxOn.imageset/RadioBoxOn-2.svg new file mode 100644 index 000000000..b37daef36 --- /dev/null +++ b/SDDSDemoApp/SDDSDemoApp/Assets.xcassets/radioboxOn.imageset/RadioBoxOn-2.svg @@ -0,0 +1,4 @@ + + + + diff --git a/SDDSComponents/SDDSComponentsPreview/Assets.xcassets/radioboxOn.imageset/RadioBoxOn.svg b/SDDSDemoApp/SDDSDemoApp/Assets.xcassets/radioboxOn.imageset/RadioBoxOn.svg similarity index 100% rename from SDDSComponents/SDDSComponentsPreview/Assets.xcassets/radioboxOn.imageset/RadioBoxOn.svg rename to SDDSDemoApp/SDDSDemoApp/Assets.xcassets/radioboxOn.imageset/RadioBoxOn.svg diff --git a/SDDSDemoApp/SDDSDemoApp/Views/CheckboxView/CheckboxView.swift b/SDDSDemoApp/SDDSDemoApp/Views/CheckboxView/CheckboxView.swift index 71013e2ec..baa671d5f 100644 --- a/SDDSDemoApp/SDDSDemoApp/Views/CheckboxView/CheckboxView.swift +++ b/SDDSDemoApp/SDDSDemoApp/Views/CheckboxView/CheckboxView.swift @@ -20,7 +20,7 @@ struct CheckboxView: View { title: viewModel.title, subtitle: viewModel.subtitle, isEnabled: viewModel.isEnabled, - images: .checkbox, + images: CheckboxView.checkbox, size: viewModel.size, appearance: viewModel.appearance ) diff --git a/SDDSDemoApp/SDDSDemoApp/Views/ChipView/ChipView.swift b/SDDSDemoApp/SDDSDemoApp/Views/ChipView/ChipView.swift index ead25b4e3..6fd79b842 100644 --- a/SDDSDemoApp/SDDSDemoApp/Views/ChipView/ChipView.swift +++ b/SDDSDemoApp/SDDSDemoApp/Views/ChipView/ChipView.swift @@ -14,8 +14,7 @@ struct ChipView: View { var body: some View { List { Section { - HStack { - Spacer() + ScrollView(.horizontal) { SDDSChip( title: viewModel.title, isEnabled: viewModel.isEnabled, @@ -25,8 +24,8 @@ struct ChipView: View { size: viewModel.size, removeAction: viewModel.removeAction ) - Spacer() } + .scrollIndicators(.hidden) } Section(header: Text("Configuration")) { diff --git a/SDDSDemoApp/SDDSDemoApp/Views/RadioboxView/RadioboxView.swift b/SDDSDemoApp/SDDSDemoApp/Views/RadioboxView/RadioboxView.swift index f8e05bbe9..a7739aa61 100644 --- a/SDDSDemoApp/SDDSDemoApp/Views/RadioboxView/RadioboxView.swift +++ b/SDDSDemoApp/SDDSDemoApp/Views/RadioboxView/RadioboxView.swift @@ -20,7 +20,7 @@ struct RadioboxView: View { title: viewModel.title, subtitle: viewModel.subtitle, isEnabled: viewModel.isEnabled, - images: .defaultImages, + images: RadioboxView.radiobox, size: viewModel.size, appearance: viewModel.appearance ) @@ -107,6 +107,15 @@ struct RadioboxView: View { } } +extension RadioboxView { + static var radiobox: RadioboxImages { + .init( + selectedImage: Image.image("radioboxOn", bundle: Bundle(for: CheckboxViewModel.self)), + deselectedImage: Image.image("radioboxOff", bundle: Bundle(for: CheckboxViewModel.self)) + ) + } +} + #Preview { RadioboxView(viewModel: RadioboxViewModel()) }