diff --git a/DesignToolbox/DesignToolbox.xcworkspace/xcshareddata/swiftpm/Package.resolved b/DesignToolbox/DesignToolbox.xcworkspace/xcshareddata/swiftpm/Package.resolved new file mode 100644 index 0000000000..2e1e3152d9 --- /dev/null +++ b/DesignToolbox/DesignToolbox.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -0,0 +1,33 @@ +{ + "originHash" : "2607da8610cd896469838f47a63558192b1b0c03641b836042ba28782dedbab2", + "pins" : [ + { + "identity" : "accessibility-statement-lib-ios", + "kind" : "remoteSourceControl", + "location" : "https://github.com/Orange-OpenSource/accessibility-statement-lib-ios.git", + "state" : { + "revision" : "480bf4629b951e459308379030f1ca0ce28a0987", + "version" : "1.3.0" + } + }, + { + "identity" : "swift-snapshot-testing", + "kind" : "remoteSourceControl", + "location" : "https://github.com/pointfreeco/swift-snapshot-testing.git", + "state" : { + "revision" : "42a086182681cf661f5c47c9b7dc3931de18c6d7", + "version" : "1.17.6" + } + }, + { + "identity" : "swift-syntax", + "kind" : "remoteSourceControl", + "location" : "https://github.com/swiftlang/swift-syntax", + "state" : { + "revision" : "0687f71944021d616d34d922343dcef086855920", + "version" : "600.0.1" + } + } + ], + "version" : 3 +} diff --git a/OUDS/Core/Components/Sources/Checkbox/Internal/OUDSCheckboxLabel.swift b/OUDS/Core/Components/Sources/Checkbox/Internal/OUDSCheckboxLabel.swift index 87ca3972de..a847d3f23a 100644 --- a/OUDS/Core/Components/Sources/Checkbox/Internal/OUDSCheckboxLabel.swift +++ b/OUDS/Core/Components/Sources/Checkbox/Internal/OUDSCheckboxLabel.swift @@ -42,7 +42,7 @@ struct OUDSCheckboxLabel: View { // MARK: - Body var body: some View { - HStack(spacing: theme.listItem.listItemSpaceColumnGap) { + HStack(alignment: .top, spacing: theme.listItem.listItemSpaceColumnGap) { if isInversed { icon() texts() @@ -76,11 +76,16 @@ struct OUDSCheckboxLabel: View { @ViewBuilder private func icon() -> some View { if let icon = items.icon { - icon - .resizable() - .renderingMode(.template) - .foregroundStyle(iconColor) - .frame(width: theme.listItem.listItemSizeIcon, height: theme.listItem.listItemSizeIcon) + HStack(alignment: .center, spacing: 0) { + icon + .resizable() + .renderingMode(.template) + .foregroundStyle(iconColor) + .frame(width: theme.listItem.listItemSizeIcon, + height: theme.listItem.listItemSizeIcon) + } + .frame(maxHeight: theme.checkRadio.checkRadioSizeMaxHeightAssetsContainer, + alignment: .center) } } diff --git a/OUDS/Core/Components/Sources/Checkbox/Internal/OUDSCheckboxLabeledStyle.swift b/OUDS/Core/Components/Sources/Checkbox/Internal/OUDSCheckboxLabeledStyle.swift index e6b01b1977..3690d9e2c6 100644 --- a/OUDS/Core/Components/Sources/Checkbox/Internal/OUDSCheckboxLabeledStyle.swift +++ b/OUDS/Core/Components/Sources/Checkbox/Internal/OUDSCheckboxLabeledStyle.swift @@ -32,24 +32,27 @@ struct OUDSCheckboxLabeledStyle: ButtonStyle { // MARK: - Body func makeBody(configuration: Configuration) -> some View { - HStack(alignment: .center, spacing: theme.listItem.listItemSpaceColumnGap) { - if isInversed { - OUDSCheckboxLabel(internalState: internalState(isPressed: configuration.isPressed), - items: items, - isInversed: true) + HStack(alignment: .top, spacing: theme.listItem.listItemSpaceColumnGap) { + HStack(alignment: .center, spacing: theme.listItem.listItemSpaceColumnGap) { + if isInversed { + OUDSCheckboxLabel(internalState: internalState(isPressed: configuration.isPressed), + items: items, + isInversed: true) - OUDSCheckboxSelectorButton(internalState: internalState(isPressed: configuration.isPressed), - selectorState: selectorState, - isError: items.isError) - } else { - OUDSCheckboxSelectorButton(internalState: internalState(isPressed: configuration.isPressed), - selectorState: selectorState, - isError: items.isError) + OUDSCheckboxSelectorButton(internalState: internalState(isPressed: configuration.isPressed), + selectorState: selectorState, + isError: items.isError) + } else { + OUDSCheckboxSelectorButton(internalState: internalState(isPressed: configuration.isPressed), + selectorState: selectorState, + isError: items.isError) - OUDSCheckboxLabel(internalState: internalState(isPressed: configuration.isPressed), - items: items, - isInversed: false) - } + OUDSCheckboxLabel(internalState: internalState(isPressed: configuration.isPressed), + items: items, + isInversed: false) + } + }.frame(maxHeight: theme.checkRadio.checkRadioSizeMaxHeightAssetsContainer, + alignment: .center) } .padding(.all, theme.listItem.listItemSpaceInset) .oudsDivider(show: items.divider)