diff --git a/CHANGELOG.md b/CHANGELOG.md index f2b2ff4d8..a7caf08d7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,6 +20,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - [Library] Improve Multiple-based objects for tokenator values integration ([#279](https://github.com/Orange-OpenSource/ouds-ios/issues/279)) - [Tool] Use `macos-15` runner for GitHub Actions builds ([#296](https://github.com/Orange-OpenSource/ouds-ios/issues/296)) +### Removed + +- [Library] All dimension semantic tokens ([#308](https://github.com/Orange-OpenSource/ouds-ios/issues/308)) + ### Fixed - [DemoApp] Fix VoiceOver issue with element grouping in presentation tokens and update accessibility statement ([#212](https://github.com/Orange-OpenSource/ouds-ios/issues/285)) diff --git a/OUDS/Core/OUDS/Sources/OUDSTheme/OUDSTheme+SemanticTokens/OUDSTheme+DimensionSemanticTokens.swift b/OUDS/Core/OUDS/Sources/OUDSTheme/OUDSTheme+SemanticTokens/OUDSTheme+DimensionSemanticTokens.swift deleted file mode 100644 index 1762dac7e..000000000 --- a/OUDS/Core/OUDS/Sources/OUDSTheme/OUDSTheme+SemanticTokens/OUDSTheme+DimensionSemanticTokens.swift +++ /dev/null @@ -1,52 +0,0 @@ -// -// Software Name: OUDS iOS -// SPDX-FileCopyrightText: Copyright (c) Orange SA -// SPDX-License-Identifier: MIT -// -// This software is distributed under the MIT license, -// the text of which is available at https://opensource.org/license/MIT/ -// or see the "LICENSE" file for more details. -// -// Authors: See CONTRIBUTORS.txt -// Software description: A SwiftUI components library with code examples for Orange Unified Design System -// - -import Foundation -import OUDSTokensRaw -import OUDSTokensSemantic - -// ଘ( ・ω・)_/゚・:*:・。☆ -// [File to generate by the tokenator] -// WARNING: Not synchronized anymore with the Figjam / Figma by developers team -// Create an issue for update https://github.com/Orange-OpenSource/ouds-ios/issues/new?template=token_update.yml - -/// Defines basic values common to all themes for `DimensionSemanticTokens`. -/// These values can be overriden inside `OUDSTheme` subclasses (in extensions or not, in the same module or not) thanks to the `@objc open` combination. -extension OUDSTheme: DimensionSemanticTokens { - - @objc open var dimensionNone: DimensionSemanticToken { DimensionRawTokens.dimension0 } - @objc open var dimension10XS: DimensionSemanticToken { DimensionRawTokens.dimension25 } - @objc open var dimension9XS: DimensionSemanticToken { DimensionRawTokens.dimension50 } - @objc open var dimension8XS: DimensionSemanticToken { DimensionRawTokens.dimension75 } - @objc open var dimension7XS: DimensionSemanticToken { DimensionRawTokens.dimension100 } - @objc open var dimension6XS: DimensionSemanticToken { DimensionRawTokens.dimension150 } - @objc open var dimension5XS: DimensionSemanticToken { DimensionRawTokens.dimension200 } - @objc open var dimension4XS: DimensionSemanticToken { DimensionRawTokens.dimension250 } - @objc open var dimension3XS: DimensionSemanticToken { DimensionRawTokens.dimension300 } - @objc open var dimension2XS: DimensionSemanticToken { DimensionRawTokens.dimension350 } - @objc open var dimensionXS: DimensionSemanticToken { DimensionRawTokens.dimension400 } - @objc open var dimensionSM: DimensionSemanticToken { DimensionRawTokens.dimension450 } - @objc open var dimensionMD: DimensionSemanticToken { DimensionRawTokens.dimension500 } - @objc open var dimensionLG: DimensionSemanticToken { DimensionRawTokens.dimension550 } - @objc open var dimensionXL: DimensionSemanticToken { DimensionRawTokens.dimension600 } - @objc open var dimension2XL: DimensionSemanticToken { DimensionRawTokens.dimension650 } - @objc open var dimension3XL: DimensionSemanticToken { DimensionRawTokens.dimension700 } - @objc open var dimension4XL: DimensionSemanticToken { DimensionRawTokens.dimension750 } - @objc open var dimension5XL: DimensionSemanticToken { DimensionRawTokens.dimension800 } - @objc open var dimension6XL: DimensionSemanticToken { DimensionRawTokens.dimension900 } - @objc open var dimension7XL: DimensionSemanticToken { DimensionRawTokens.dimension1000 } - @objc open var dimension8XL: DimensionSemanticToken { DimensionRawTokens.dimension1200 } - @objc open var dimension9XL: DimensionSemanticToken { DimensionRawTokens.dimension1400 } - @objc open var dimension10XL: DimensionSemanticToken { DimensionRawTokens.dimension1600 } - @objc open var dimension11XL: DimensionSemanticToken { DimensionRawTokens.dimension1800 } -} diff --git a/OUDS/Core/OUDS/Sources/OUDSTheme/OUDSTheme+SemanticTokens/OUDSTheme+SizeSemanticTokens.swift b/OUDS/Core/OUDS/Sources/OUDSTheme/OUDSTheme+SemanticTokens/OUDSTheme+SizeSemanticTokens.swift index 14330e86b..e066826c8 100644 --- a/OUDS/Core/OUDS/Sources/OUDSTheme/OUDSTheme+SemanticTokens/OUDSTheme+SizeSemanticTokens.swift +++ b/OUDS/Core/OUDS/Sources/OUDSTheme/OUDSTheme+SemanticTokens/OUDSTheme+SizeSemanticTokens.swift @@ -123,23 +123,23 @@ extension OUDSTheme: SizeSemanticTokens { // MARK: - Semantic token - Sizing - Icon with typography - @objc open var sizeIconWithLabelXLargeSizeShort: SizeSemanticToken { dimensionXS } - @objc open var sizeIconWithLabelXLargeSizeMedium: SizeSemanticToken { dimensionMD } - @objc open var sizeIconWithLabelXLargeSizeTall: SizeSemanticToken { dimensionLG } - - @objc open var sizeIconWithLabelLargeSizeShorter: SizeSemanticToken { dimension4XS } - @objc open var sizeIconWithLabelLargeSizeShort: SizeSemanticToken { dimension3XS } - @objc open var sizeIconWithLabelLargeSizeMedium: SizeSemanticToken { dimension2XS } - @objc open var sizeIconWithLabelLargeSizeTall: SizeSemanticToken { dimensionXS } - @objc open var sizeIconWithLabelLargeSizeTaller: SizeSemanticToken { dimensionLG } - - @objc open var sizeIconWithLabelMediumSizeShort: SizeSemanticToken { dimension5XS } - @objc open var sizeIconWithLabelMediumSizeMedium: SizeSemanticToken { dimension4XS } - @objc open var sizeIconWithLabelMediumSizeTall: SizeSemanticToken { dimension3XS } - - @objc open var sizeIconWithLabelSmallSizeShort: SizeSemanticToken { dimension6XS } - @objc open var sizeIconWithLabelSmallSizeMedium: SizeSemanticToken { dimension5XS } - @objc open var sizeIconWithLabelSmallSizeTall: SizeSemanticToken { dimension4XS } + @objc open var sizeIconWithLabelXLargeSizeShort: SizeSemanticToken { DimensionRawTokens.dimension400 } + @objc open var sizeIconWithLabelXLargeSizeMedium: SizeSemanticToken { DimensionRawTokens.dimension500 } + @objc open var sizeIconWithLabelXLargeSizeTall: SizeSemanticToken { DimensionRawTokens.dimension550 } + + @objc open var sizeIconWithLabelLargeSizeShorter: SizeSemanticToken { DimensionRawTokens.dimension250 } + @objc open var sizeIconWithLabelLargeSizeShort: SizeSemanticToken { DimensionRawTokens.dimension300 } + @objc open var sizeIconWithLabelLargeSizeMedium: SizeSemanticToken { DimensionRawTokens.dimension350 } + @objc open var sizeIconWithLabelLargeSizeTall: SizeSemanticToken { DimensionRawTokens.dimension400 } + @objc open var sizeIconWithLabelLargeSizeTaller: SizeSemanticToken { DimensionRawTokens.dimension550 } + + @objc open var sizeIconWithLabelMediumSizeShort: SizeSemanticToken { DimensionRawTokens.dimension200 } + @objc open var sizeIconWithLabelMediumSizeMedium: SizeSemanticToken { DimensionRawTokens.dimension250 } + @objc open var sizeIconWithLabelMediumSizeTall: SizeSemanticToken { DimensionRawTokens.dimension300 } + + @objc open var sizeIconWithLabelSmallSizeShort: SizeSemanticToken { DimensionRawTokens.dimension150 } + @objc open var sizeIconWithLabelSmallSizeMedium: SizeSemanticToken { DimensionRawTokens.dimension200 } + @objc open var sizeIconWithLabelSmallSizeTall: SizeSemanticToken { DimensionRawTokens.dimension250 } // MARK: - Semantic token - Sizing - Icon decorative diff --git a/OUDS/Core/OUDS/Sources/OUDSTheme/OUDSTheme+SemanticTokens/OUDSTheme+SpaceSemanticTokens.swift b/OUDS/Core/OUDS/Sources/OUDSTheme/OUDSTheme+SemanticTokens/OUDSTheme+SpaceSemanticTokens.swift index cacd64e13..98ea8f859 100644 --- a/OUDS/Core/OUDS/Sources/OUDSTheme/OUDSTheme+SemanticTokens/OUDSTheme+SpaceSemanticTokens.swift +++ b/OUDS/Core/OUDS/Sources/OUDSTheme/OUDSTheme+SemanticTokens/OUDSTheme+SpaceSemanticTokens.swift @@ -72,91 +72,91 @@ extension OUDSTheme: SpaceSemanticTokens { @objc open var spacePaddingInlineTaller: SpacePaddingInlineSemanticToken { DimensionRawTokens.dimension350 } @objc open var spacePaddingInlineTallest: SpacePaddingInlineSemanticToken { DimensionRawTokens.dimension400 } - @objc open var spacePaddingInlineWithIconNone: SpacePaddingInlineSemanticToken { dimensionNone } - @objc open var spacePaddingInlineWithIconShortest: SpacePaddingInlineSemanticToken { dimension10XS } - @objc open var spacePaddingInlineWithIconShorter: SpacePaddingInlineSemanticToken { dimension9XS } - @objc open var spacePaddingInlineWithIconShort: SpacePaddingInlineSemanticToken { dimension7XS } - @objc open var spacePaddingInlineWithIconMedium: SpacePaddingInlineSemanticToken { dimension5XS } - @objc open var spacePaddingInlineWithIconTall: SpacePaddingInlineSemanticToken { dimension4XS } - @objc open var spacePaddingInlineWithIconTaller: SpacePaddingInlineSemanticToken { dimension3XS } - @objc open var spacePaddingInlineWithIconTallest: SpacePaddingInlineSemanticToken { dimension2XS } - - @objc open var spacePaddingInlineWithArrowNone: SpacePaddingInlineSemanticToken { dimensionNone } - @objc open var spacePaddingInlineWithArrowShortest: SpacePaddingInlineSemanticToken { dimension10XS } - @objc open var spacePaddingInlineWithArrowShorter: SpacePaddingInlineSemanticToken { dimension9XS } - @objc open var spacePaddingInlineWithArrowShort: SpacePaddingInlineSemanticToken { dimension8XS } - @objc open var spacePaddingInlineWithArrowMedium: SpacePaddingInlineSemanticToken { dimension7XS } - @objc open var spacePaddingInlineWithArrowTall: SpacePaddingInlineSemanticToken { dimension5XS } - @objc open var spacePaddingInlineWithArrowTaller: SpacePaddingInlineSemanticToken { dimension4XS } - @objc open var spacePaddingInlineWithArrowTallest: SpacePaddingInlineSemanticToken { dimension3XS } + @objc open var spacePaddingInlineWithIconNone: SpacePaddingInlineSemanticToken { DimensionRawTokens.dimension0 } + @objc open var spacePaddingInlineWithIconShortest: SpacePaddingInlineSemanticToken { DimensionRawTokens.dimension25 } + @objc open var spacePaddingInlineWithIconShorter: SpacePaddingInlineSemanticToken { DimensionRawTokens.dimension50 } + @objc open var spacePaddingInlineWithIconShort: SpacePaddingInlineSemanticToken { DimensionRawTokens.dimension100 } + @objc open var spacePaddingInlineWithIconMedium: SpacePaddingInlineSemanticToken { DimensionRawTokens.dimension200 } + @objc open var spacePaddingInlineWithIconTall: SpacePaddingInlineSemanticToken { DimensionRawTokens.dimension250 } + @objc open var spacePaddingInlineWithIconTaller: SpacePaddingInlineSemanticToken { DimensionRawTokens.dimension300 } + @objc open var spacePaddingInlineWithIconTallest: SpacePaddingInlineSemanticToken { DimensionRawTokens.dimension350 } + + @objc open var spacePaddingInlineWithArrowNone: SpacePaddingInlineSemanticToken { DimensionRawTokens.dimension0 } + @objc open var spacePaddingInlineWithArrowShortest: SpacePaddingInlineSemanticToken { DimensionRawTokens.dimension25 } + @objc open var spacePaddingInlineWithArrowShorter: SpacePaddingInlineSemanticToken { DimensionRawTokens.dimension50 } + @objc open var spacePaddingInlineWithArrowShort: SpacePaddingInlineSemanticToken { DimensionRawTokens.dimension75 } + @objc open var spacePaddingInlineWithArrowMedium: SpacePaddingInlineSemanticToken { DimensionRawTokens.dimension100 } + @objc open var spacePaddingInlineWithArrowTall: SpacePaddingInlineSemanticToken { DimensionRawTokens.dimension200 } + @objc open var spacePaddingInlineWithArrowTaller: SpacePaddingInlineSemanticToken { DimensionRawTokens.dimension250 } + @objc open var spacePaddingInlineWithArrowTallest: SpacePaddingInlineSemanticToken { DimensionRawTokens.dimension300 } // MARK: Semantic token - Padding - Padding stack - @objc open var spacePaddingBlockNone: SpacePaddingInlineSemanticToken { dimensionNone } - @objc open var spacePaddingBlockShorter: SpacePaddingInlineSemanticToken { dimension9XS } - @objc open var spacePaddingBlockShort: SpacePaddingInlineSemanticToken { dimension7XS } - @objc open var spacePaddingBlockMedium: SpacePaddingInlineSemanticToken { dimension6XS } - @objc open var spacePaddingBlockTall: SpacePaddingInlineSemanticToken { dimension5XS } - @objc open var spacePaddingBlockTaller: SpacePaddingInlineSemanticToken { dimension3XS } - @objc open var spacePaddingBlockTallest: SpacePaddingInlineSemanticToken { dimensionXS } - - @objc open var spacePaddingBlockWithIconNone: SpacePaddingInlineSemanticToken { dimensionNone } - @objc open var spacePaddingBlockWithIconShortest: SpacePaddingInlineSemanticToken { dimension10XS } - @objc open var spacePaddingBlockWithIconShorter: SpacePaddingInlineSemanticToken { dimension9XS } - @objc open var spacePaddingBlockWithIconShort: SpacePaddingInlineSemanticToken { dimension8XS } - @objc open var spacePaddingBlockWithIconMedium: SpacePaddingInlineSemanticToken { dimension7XS } - @objc open var spacePaddingBlockWithIconTall: SpacePaddingInlineSemanticToken { dimension6XS } - @objc open var spacePaddingBlockWithIconTaller: SpacePaddingInlineSemanticToken { dimension5XS } + @objc open var spacePaddingBlockNone: SpacePaddingInlineSemanticToken { DimensionRawTokens.dimension0 } + @objc open var spacePaddingBlockShorter: SpacePaddingInlineSemanticToken { DimensionRawTokens.dimension50 } + @objc open var spacePaddingBlockShort: SpacePaddingInlineSemanticToken { DimensionRawTokens.dimension100 } + @objc open var spacePaddingBlockMedium: SpacePaddingInlineSemanticToken { DimensionRawTokens.dimension150 } + @objc open var spacePaddingBlockTall: SpacePaddingInlineSemanticToken { DimensionRawTokens.dimension200 } + @objc open var spacePaddingBlockTaller: SpacePaddingInlineSemanticToken { DimensionRawTokens.dimension300 } + @objc open var spacePaddingBlockTallest: SpacePaddingInlineSemanticToken { DimensionRawTokens.dimension400 } + + @objc open var spacePaddingBlockWithIconNone: SpacePaddingInlineSemanticToken { DimensionRawTokens.dimension0 } + @objc open var spacePaddingBlockWithIconShortest: SpacePaddingInlineSemanticToken { DimensionRawTokens.dimension25 } + @objc open var spacePaddingBlockWithIconShorter: SpacePaddingInlineSemanticToken { DimensionRawTokens.dimension50 } + @objc open var spacePaddingBlockWithIconShort: SpacePaddingInlineSemanticToken { DimensionRawTokens.dimension75 } + @objc open var spacePaddingBlockWithIconMedium: SpacePaddingInlineSemanticToken { DimensionRawTokens.dimension100 } + @objc open var spacePaddingBlockWithIconTall: SpacePaddingInlineSemanticToken { DimensionRawTokens.dimension150 } + @objc open var spacePaddingBlockWithIconTaller: SpacePaddingInlineSemanticToken { DimensionRawTokens.dimension200 } // MARK: Semantic token - Space - Padding inset - @objc open var spaceInsetNone: SpacePaddingInlineSemanticToken { dimensionNone } - @objc open var spaceInsetSmash: SpacePaddingInlineSemanticToken { dimension10XS } - @objc open var spaceInsetShortest: SpacePaddingInlineSemanticToken { dimension9XS } - @objc open var spaceInsetShorter: SpacePaddingInlineSemanticToken { dimension8XS } - @objc open var spaceInsetShort: SpacePaddingInlineSemanticToken { dimension7XS } - @objc open var spaceInsetMedium: SpacePaddingInlineSemanticToken { dimension6XS } - @objc open var spaceInsetTall: SpacePaddingInlineSemanticToken { dimension5XS } - @objc open var spaceInsetTaller: SpacePaddingInlineSemanticToken { dimension3XS } - @objc open var spaceInsetTallest: SpacePaddingInlineSemanticToken { dimensionXS } - @objc open var spaceInsetSpacious: SpacePaddingInlineSemanticToken { dimensionMD } + @objc open var spaceInsetNone: SpacePaddingInlineSemanticToken { DimensionRawTokens.dimension0 } + @objc open var spaceInsetSmash: SpacePaddingInlineSemanticToken { DimensionRawTokens.dimension25 } + @objc open var spaceInsetShortest: SpacePaddingInlineSemanticToken { DimensionRawTokens.dimension50 } + @objc open var spaceInsetShorter: SpacePaddingInlineSemanticToken { DimensionRawTokens.dimension75 } + @objc open var spaceInsetShort: SpacePaddingInlineSemanticToken { DimensionRawTokens.dimension100 } + @objc open var spaceInsetMedium: SpacePaddingInlineSemanticToken { DimensionRawTokens.dimension150 } + @objc open var spaceInsetTall: SpacePaddingInlineSemanticToken { DimensionRawTokens.dimension200 } + @objc open var spaceInsetTaller: SpacePaddingInlineSemanticToken { DimensionRawTokens.dimension300 } + @objc open var spaceInsetTallest: SpacePaddingInlineSemanticToken { DimensionRawTokens.dimension400 } + @objc open var spaceInsetSpacious: SpacePaddingInlineSemanticToken { DimensionRawTokens.dimension500 } // MARK: Semantic token - Padding - Gap inline - @objc open var spaceColumnGapNone: SpacePaddingInlineSemanticToken { dimensionNone } - @objc open var spaceColumnGapShorter: SpacePaddingInlineSemanticToken { dimension9XS } - @objc open var spaceColumnGapShort: SpacePaddingInlineSemanticToken { dimension7XS } - @objc open var spaceColumnGapMedium: SpacePaddingInlineSemanticToken { dimension5XS } - @objc open var spaceColumnGapTall: SpacePaddingInlineSemanticToken { dimension3XS } - @objc open var spaceColumnGapTaller: SpacePaddingInlineSemanticToken { dimensionXS } - - @objc open var spaceColumnGapWithIconNone: SpacePaddingInlineSemanticToken { dimensionNone } - @objc open var spaceColumnGapWithIconShortest: SpacePaddingInlineSemanticToken { dimension10XS } - @objc open var spaceColumnGapWithIconShorter: SpacePaddingInlineSemanticToken { dimension9XS } - @objc open var spaceColumnGapWithIconShort: SpacePaddingInlineSemanticToken { dimension8XS } - @objc open var spaceColumnGapWithIconMedium: SpacePaddingInlineSemanticToken { dimension7XS } - @objc open var spaceColumnGapWithIconTall: SpacePaddingInlineSemanticToken { dimension5XS } - - @objc open var spaceColumnGapWithArrowNone: SpacePaddingInlineSemanticToken { dimensionNone } - @objc open var spaceColumnGapWithArrowShortest: SpacePaddingInlineSemanticToken { dimension10XS } - @objc open var spaceColumnGapWithArrowShorter: SpacePaddingInlineSemanticToken { dimension9XS } - @objc open var spaceColumnGapWithArrowShort: SpacePaddingInlineSemanticToken { dimension8XS } - @objc open var spaceColumnGapWithArrowMedium: SpacePaddingInlineSemanticToken { dimension7XS } - @objc open var spaceColumnGapWithArrowTall: SpacePaddingInlineSemanticToken { dimension5XS } + @objc open var spaceColumnGapNone: SpacePaddingInlineSemanticToken { DimensionRawTokens.dimension0 } + @objc open var spaceColumnGapShorter: SpacePaddingInlineSemanticToken { DimensionRawTokens.dimension50 } + @objc open var spaceColumnGapShort: SpacePaddingInlineSemanticToken { DimensionRawTokens.dimension100 } + @objc open var spaceColumnGapMedium: SpacePaddingInlineSemanticToken { DimensionRawTokens.dimension200 } + @objc open var spaceColumnGapTall: SpacePaddingInlineSemanticToken { DimensionRawTokens.dimension300 } + @objc open var spaceColumnGapTaller: SpacePaddingInlineSemanticToken { DimensionRawTokens.dimension400 } + + @objc open var spaceColumnGapWithIconNone: SpacePaddingInlineSemanticToken { DimensionRawTokens.dimension0 } + @objc open var spaceColumnGapWithIconShortest: SpacePaddingInlineSemanticToken { DimensionRawTokens.dimension25 } + @objc open var spaceColumnGapWithIconShorter: SpacePaddingInlineSemanticToken { DimensionRawTokens.dimension50 } + @objc open var spaceColumnGapWithIconShort: SpacePaddingInlineSemanticToken { DimensionRawTokens.dimension75 } + @objc open var spaceColumnGapWithIconMedium: SpacePaddingInlineSemanticToken { DimensionRawTokens.dimension100 } + @objc open var spaceColumnGapWithIconTall: SpacePaddingInlineSemanticToken { DimensionRawTokens.dimension200 } + + @objc open var spaceColumnGapWithArrowNone: SpacePaddingInlineSemanticToken { DimensionRawTokens.dimension0 } + @objc open var spaceColumnGapWithArrowShortest: SpacePaddingInlineSemanticToken { DimensionRawTokens.dimension25 } + @objc open var spaceColumnGapWithArrowShorter: SpacePaddingInlineSemanticToken { DimensionRawTokens.dimension50 } + @objc open var spaceColumnGapWithArrowShort: SpacePaddingInlineSemanticToken { DimensionRawTokens.dimension75 } + @objc open var spaceColumnGapWithArrowMedium: SpacePaddingInlineSemanticToken { DimensionRawTokens.dimension100 } + @objc open var spaceColumnGapWithArrowTall: SpacePaddingInlineSemanticToken { DimensionRawTokens.dimension200 } // MARK: Semantic token - Padding - Gap stack - @objc open var spaceRowGapNone: SpaceGapStackSemanticToken { dimensionNone } - @objc open var spaceRowGapShortest: SpaceGapStackSemanticToken { dimension10XS } - @objc open var spaceRowGapShorter: SpaceGapStackSemanticToken { dimension9XS } - @objc open var spaceRowGapShort: SpaceGapStackSemanticToken { dimension8XS } - @objc open var spaceRowGapMedium: SpaceGapStackSemanticToken { dimension7XS } - @objc open var spaceRowGapTall: SpaceGapStackSemanticToken { dimension5XS } - - @objc open var spaceRowGapWithIconNone: SpaceGapStackSemanticToken { dimensionNone } - @objc open var spaceRowGapWithIconShortest: SpaceGapStackSemanticToken { dimension10XS } - @objc open var spaceRowGapWithIconShorter: SpaceGapStackSemanticToken { dimension9XS } - @objc open var spaceRowGapWithIconShort: SpaceGapStackSemanticToken { dimension8XS } - @objc open var spaceRowGapWithIconMedium: SpaceGapStackSemanticToken { dimension7XS } - @objc open var spaceRowGapWithIconTall: SpaceGapStackSemanticToken { dimension5XS } + @objc open var spaceRowGapNone: SpaceGapStackSemanticToken { DimensionRawTokens.dimension0 } + @objc open var spaceRowGapShortest: SpaceGapStackSemanticToken { DimensionRawTokens.dimension25 } + @objc open var spaceRowGapShorter: SpaceGapStackSemanticToken { DimensionRawTokens.dimension50 } + @objc open var spaceRowGapShort: SpaceGapStackSemanticToken { DimensionRawTokens.dimension75 } + @objc open var spaceRowGapMedium: SpaceGapStackSemanticToken { DimensionRawTokens.dimension100 } + @objc open var spaceRowGapTall: SpaceGapStackSemanticToken { DimensionRawTokens.dimension200 } + + @objc open var spaceRowGapWithIconNone: SpaceGapStackSemanticToken { DimensionRawTokens.dimension0 } + @objc open var spaceRowGapWithIconShortest: SpaceGapStackSemanticToken { DimensionRawTokens.dimension25 } + @objc open var spaceRowGapWithIconShorter: SpaceGapStackSemanticToken { DimensionRawTokens.dimension50 } + @objc open var spaceRowGapWithIconShort: SpaceGapStackSemanticToken { DimensionRawTokens.dimension75 } + @objc open var spaceRowGapWithIconMedium: SpaceGapStackSemanticToken { DimensionRawTokens.dimension100 } + @objc open var spaceRowGapWithIconTall: SpaceGapStackSemanticToken { DimensionRawTokens.dimension200 } } diff --git a/OUDS/Core/OUDS/Tests/OUDSTheme/MockThemes/MockTheme+DimensionSemanticTokens.swift b/OUDS/Core/OUDS/Tests/OUDSTheme/MockThemes/MockTheme+DimensionSemanticTokens.swift deleted file mode 100644 index 9db3f915f..000000000 --- a/OUDS/Core/OUDS/Tests/OUDSTheme/MockThemes/MockTheme+DimensionSemanticTokens.swift +++ /dev/null @@ -1,47 +0,0 @@ -// -// Software Name: OUDS iOS -// SPDX-FileCopyrightText: Copyright (c) Orange SA -// SPDX-License-Identifier: MIT -// -// This software is distributed under the MIT license, -// the text of which is available at https://opensource.org/license/MIT/ -// or see the "LICENSE" file for more details. -// -// Authors: See CONTRIBUTORS.txt -// Software description: A SwiftUI components library with code examples for Orange Unified Design System -// - -import OUDSTokensSemantic - -/// Defines basic values common to all themes for `DimensionSemanticTokens`. -/// These values can be override openn inside `OUDSTheme` subclasses (in extensions or not, in the same module or not) thanks to the `@objc open` combination. -extension MockTheme { - - static let mockThemeDimensionSemanticToken: DimensionSemanticToken = 007 - - override open var dimensionNone: DimensionSemanticToken { Self.mockThemeDimensionSemanticToken } - override open var dimension10XS: DimensionSemanticToken { Self.mockThemeDimensionSemanticToken } - override open var dimension9XS: DimensionSemanticToken { Self.mockThemeDimensionSemanticToken } - override open var dimension8XS: DimensionSemanticToken { Self.mockThemeDimensionSemanticToken } - override open var dimension7XS: DimensionSemanticToken { Self.mockThemeDimensionSemanticToken } - override open var dimension6XS: DimensionSemanticToken { Self.mockThemeDimensionSemanticToken } - override open var dimension5XS: DimensionSemanticToken { Self.mockThemeDimensionSemanticToken } - override open var dimension4XS: DimensionSemanticToken { Self.mockThemeDimensionSemanticToken } - override open var dimension3XS: DimensionSemanticToken { Self.mockThemeDimensionSemanticToken } - override open var dimension2XS: DimensionSemanticToken { Self.mockThemeDimensionSemanticToken } - override open var dimensionXS: DimensionSemanticToken { Self.mockThemeDimensionSemanticToken } - override open var dimensionSM: DimensionSemanticToken { Self.mockThemeDimensionSemanticToken } - override open var dimensionMD: DimensionSemanticToken { Self.mockThemeDimensionSemanticToken } - override open var dimensionLG: DimensionSemanticToken { Self.mockThemeDimensionSemanticToken } - override open var dimensionXL: DimensionSemanticToken { Self.mockThemeDimensionSemanticToken } - override open var dimension2XL: DimensionSemanticToken { Self.mockThemeDimensionSemanticToken } - override open var dimension3XL: DimensionSemanticToken { Self.mockThemeDimensionSemanticToken } - override open var dimension4XL: DimensionSemanticToken { Self.mockThemeDimensionSemanticToken } - override open var dimension5XL: DimensionSemanticToken { Self.mockThemeDimensionSemanticToken } - override open var dimension6XL: DimensionSemanticToken { Self.mockThemeDimensionSemanticToken } - override open var dimension7XL: DimensionSemanticToken { Self.mockThemeDimensionSemanticToken } - override open var dimension8XL: DimensionSemanticToken { Self.mockThemeDimensionSemanticToken } - override open var dimension9XL: DimensionSemanticToken { Self.mockThemeDimensionSemanticToken } - override open var dimension10XL: DimensionSemanticToken { Self.mockThemeDimensionSemanticToken } - override open var dimension11XL: DimensionSemanticToken { Self.mockThemeDimensionSemanticToken } -} diff --git a/OUDS/Core/OUDS/Tests/OUDSTheme/TestThemeOverrideOfDimensionSemanticTokens.swift b/OUDS/Core/OUDS/Tests/OUDSTheme/TestThemeOverrideOfDimensionSemanticTokens.swift deleted file mode 100644 index ad22b9d5f..000000000 --- a/OUDS/Core/OUDS/Tests/OUDSTheme/TestThemeOverrideOfDimensionSemanticTokens.swift +++ /dev/null @@ -1,165 +0,0 @@ -// -// Software Name: OUDS iOS -// SPDX-FileCopyrightText: Copyright (c) Orange SA -// SPDX-License-Identifier: MIT -// -// This software is distributed under the MIT license, -// the text of which is available at https://opensource.org/license/MIT/ -// or see the "LICENSE" file for more details. -// -// Authors: See CONTRIBUTORS.txt -// Software description: A SwiftUI components library with code examples for Orange Unified Design System -// - -import OUDS -import XCTest - -// swiftlint:disable implicitly_unwrapped_optional -// swiftlint:disable required_deinit -// swiftlint:disable type_name - -/// The architecture of _OUDS iOS_ _Swift package_ library is based on _object oriented paradigm_ and overriding of classes. -/// In fact the `OUDSTheme` object is a class, which can be seen as an _asbtract class_, exposing through its extensions and protocols _dimension semantic tokens_. -/// These semantic tokens should be overriden by subclass like the `OrangeTheme` default theme. -/// -/// **These tests checks if any _dimension semantic tokens_ can be surcharged by a child theme** -/// **Also, it can help to find removed or renamed tokens by having tests no more compilable** -final class TestThemeOverrideOfDimensionSemanticTokens: XCTestCase { - - private var abstractTheme: OUDSTheme! - private var inheritedTheme: OUDSTheme! - - override func setUp() async throws { - abstractTheme = OUDSTheme() - inheritedTheme = MockTheme() - } - - func testInheritedThemeCanOverrideSemanticTokenDimensionNone() throws { - XCTAssertNotEqual(inheritedTheme.dimensionNone, abstractTheme.dimensionNone) - XCTAssertTrue(inheritedTheme.dimensionNone == MockTheme.mockThemeDimensionSemanticToken) - } - - func testInheritedThemeCanOverrideSemanticTokenDimension10XS() throws { - XCTAssertNotEqual(inheritedTheme.dimension10XS, abstractTheme.dimension10XS) - XCTAssertTrue(inheritedTheme.dimension10XS == MockTheme.mockThemeDimensionSemanticToken) - } - - func testInheritedThemeCanOverrideSemanticTokenDimension9XS() throws { - XCTAssertNotEqual(inheritedTheme.dimension9XS, abstractTheme.dimension9XS) - XCTAssertTrue(inheritedTheme.dimension9XS == MockTheme.mockThemeDimensionSemanticToken) - } - - func testInheritedThemeCanOverrideSemanticTokenDimension8XS() throws { - XCTAssertNotEqual(inheritedTheme.dimension8XS, abstractTheme.dimension8XS) - XCTAssertTrue(inheritedTheme.dimension8XS == MockTheme.mockThemeDimensionSemanticToken) - } - - func testInheritedThemeCanOverrideSemanticTokenDimension7XS() throws { - XCTAssertNotEqual(inheritedTheme.dimension7XS, abstractTheme.dimension7XS) - XCTAssertTrue(inheritedTheme.dimension7XS == MockTheme.mockThemeDimensionSemanticToken) - } - - func testInheritedThemeCanOverrideSemanticTokenDimension6XS() throws { - XCTAssertNotEqual(inheritedTheme.dimension6XS, abstractTheme.dimension6XS) - XCTAssertTrue(inheritedTheme.dimension6XS == MockTheme.mockThemeDimensionSemanticToken) - } - - func testInheritedThemeCanOverrideSemanticTokenDimension5XS() throws { - XCTAssertNotEqual(inheritedTheme.dimension5XS, abstractTheme.dimension5XS) - XCTAssertTrue(inheritedTheme.dimension5XS == MockTheme.mockThemeDimensionSemanticToken) - } - - func testInheritedThemeCanOverrideSemanticTokenDimension4XS() throws { - XCTAssertNotEqual(inheritedTheme.dimension4XS, abstractTheme.dimension4XS) - XCTAssertTrue(inheritedTheme.dimension4XS == MockTheme.mockThemeDimensionSemanticToken) - } - - func testInheritedThemeCanOverrideSemanticTokenDimension3XS() throws { - XCTAssertNotEqual(inheritedTheme.dimension3XS, abstractTheme.dimension3XS) - XCTAssertTrue(inheritedTheme.dimension3XS == MockTheme.mockThemeDimensionSemanticToken) - } - - func testInheritedThemeCanOverrideSemanticTokenDimension2XS() throws { - XCTAssertNotEqual(inheritedTheme.dimension2XS, abstractTheme.dimension2XS) - XCTAssertTrue(inheritedTheme.dimension2XS == MockTheme.mockThemeDimensionSemanticToken) - } - - func testInheritedThemeCanOverrideSemanticTokenDimensionXS() throws { - XCTAssertNotEqual(inheritedTheme.dimensionXS, abstractTheme.dimensionXS) - XCTAssertTrue(inheritedTheme.dimensionXS == MockTheme.mockThemeDimensionSemanticToken) - } - - func testInheritedThemeCanOverrideSemanticTokenDimensionSM() throws { - XCTAssertNotEqual(inheritedTheme.dimensionSM, abstractTheme.dimensionSM) - XCTAssertTrue(inheritedTheme.dimensionSM == MockTheme.mockThemeDimensionSemanticToken) - } - - func testInheritedThemeCanOverrideSemanticTokenDimensionMD() throws { - XCTAssertNotEqual(inheritedTheme.dimensionMD, abstractTheme.dimensionMD) - XCTAssertTrue(inheritedTheme.dimensionMD == MockTheme.mockThemeDimensionSemanticToken) - } - - func testInheritedThemeCanOverrideSemanticTokenDimensionLG() throws { - XCTAssertNotEqual(inheritedTheme.dimensionLG, abstractTheme.dimensionLG) - XCTAssertTrue(inheritedTheme.dimensionLG == MockTheme.mockThemeDimensionSemanticToken) - } - - func testInheritedThemeCanOverrideSemanticTokenDimensionXL() throws { - XCTAssertNotEqual(inheritedTheme.dimensionXL, abstractTheme.dimensionXL) - XCTAssertTrue(inheritedTheme.dimensionXL == MockTheme.mockThemeDimensionSemanticToken) - } - - func testInheritedThemeCanOverrideSemanticTokenDimension2XL() throws { - XCTAssertNotEqual(inheritedTheme.dimension2XL, abstractTheme.dimension2XL) - XCTAssertTrue(inheritedTheme.dimension2XL == MockTheme.mockThemeDimensionSemanticToken) - } - - func testInheritedThemeCanOverrideSemanticTokenDimension3XL() throws { - XCTAssertNotEqual(inheritedTheme.dimension3XL, abstractTheme.dimension3XL) - XCTAssertTrue(inheritedTheme.dimension3XL == MockTheme.mockThemeDimensionSemanticToken) - } - - func testInheritedThemeCanOverrideSemanticTokenDimension4XL() throws { - XCTAssertNotEqual(inheritedTheme.dimension4XL, abstractTheme.dimension4XL) - XCTAssertTrue(inheritedTheme.dimension4XL == MockTheme.mockThemeDimensionSemanticToken) - } - - func testInheritedThemeCanOverrideSemanticTokenDimension5XL() throws { - XCTAssertNotEqual(inheritedTheme.dimension5XL, abstractTheme.dimension5XL) - XCTAssertTrue(inheritedTheme.dimension5XL == MockTheme.mockThemeDimensionSemanticToken) - } - - func testInheritedThemeCanOverrideSemanticTokenDimension6XL() throws { - XCTAssertNotEqual(inheritedTheme.dimension6XL, abstractTheme.dimension6XL) - XCTAssertTrue(inheritedTheme.dimension6XL == MockTheme.mockThemeDimensionSemanticToken) - } - - func testInheritedThemeCanOverrideSemanticTokenDimension7XL() throws { - XCTAssertNotEqual(inheritedTheme.dimension7XL, abstractTheme.dimension7XL) - XCTAssertTrue(inheritedTheme.dimension7XL == MockTheme.mockThemeDimensionSemanticToken) - } - - func testInheritedThemeCanOverrideSemanticTokenDimension8XL() throws { - XCTAssertNotEqual(inheritedTheme.dimension8XL, abstractTheme.dimension8XL) - XCTAssertTrue(inheritedTheme.dimension8XL == MockTheme.mockThemeDimensionSemanticToken) - } - - func testInheritedThemeCanOverrideSemanticTokenDimension9XL() throws { - XCTAssertNotEqual(inheritedTheme.dimension9XL, abstractTheme.dimension9XL) - XCTAssertTrue(inheritedTheme.dimension9XL == MockTheme.mockThemeDimensionSemanticToken) - } - - func testInheritedThemeCanOverrideSemanticTokenDimension10XL() throws { - XCTAssertNotEqual(inheritedTheme.dimension10XL, abstractTheme.dimension10XL) - XCTAssertTrue(inheritedTheme.dimension10XL == MockTheme.mockThemeDimensionSemanticToken) - } - - func testInheritedThemeCanOverrideSemanticTokenDimension11XL() throws { - XCTAssertNotEqual(inheritedTheme.dimension11XL, abstractTheme.dimension11XL) - XCTAssertTrue(inheritedTheme.dimension11XL == MockTheme.mockThemeDimensionSemanticToken) - } -} - -// swiftlint:enable implicitly_unwrapped_optional -// swiftlint:enable required_deinit -// swiftlint:enable type_name diff --git a/OUDS/Core/Tokens/SemanticTokens/Sources/Values/DimensionSemanticTokens.swift b/OUDS/Core/Tokens/SemanticTokens/Sources/Values/DimensionSemanticTokens.swift deleted file mode 100644 index 8a7bed250..000000000 --- a/OUDS/Core/Tokens/SemanticTokens/Sources/Values/DimensionSemanticTokens.swift +++ /dev/null @@ -1,54 +0,0 @@ -// -// Software Name: OUDS iOS -// SPDX-FileCopyrightText: Copyright (c) Orange SA -// SPDX-License-Identifier: MIT -// -// This software is distributed under the MIT license, -// the text of which is available at https://opensource.org/license/MIT/ -// or see the "LICENSE" file for more details. -// -// Authors: See CONTRIBUTORS.txt -// Software description: A SwiftUI components library with code examples for Orange Unified Design System -// - -// ଘ( ・ω・)_/゚・:*:・。☆ -// [File to generate by the tokenator] -// WARNING: Not synchronized anymore with the Figjam / Figma by developers team -// Create an issue for update https://github.com/Orange-OpenSource/ouds-ios/issues/new?template=token_update.yml - -// swiftlint:disable missing_docs - -/// This is a group of semantic tokens for **dimensions**. -/// It defines all ``DimensionSemanticToken`` a theme must have. -/// -/// In the future this file should be generated by a the tokenator. -public protocol DimensionSemanticTokens { - - var dimensionNone: DimensionSemanticToken { get } - var dimension10XS: DimensionSemanticToken { get } - var dimension9XS: DimensionSemanticToken { get } - var dimension8XS: DimensionSemanticToken { get } - var dimension7XS: DimensionSemanticToken { get } - var dimension6XS: DimensionSemanticToken { get } - var dimension5XS: DimensionSemanticToken { get } - var dimension4XS: DimensionSemanticToken { get } - var dimension3XS: DimensionSemanticToken { get } - var dimension2XS: DimensionSemanticToken { get } - var dimensionXS: DimensionSemanticToken { get } - var dimensionSM: DimensionSemanticToken { get } - var dimensionMD: DimensionSemanticToken { get } - var dimensionLG: DimensionSemanticToken { get } - var dimensionXL: DimensionSemanticToken { get } - var dimension2XL: DimensionSemanticToken { get } - var dimension3XL: DimensionSemanticToken { get } - var dimension4XL: DimensionSemanticToken { get } - var dimension5XL: DimensionSemanticToken { get } - var dimension6XL: DimensionSemanticToken { get } - var dimension7XL: DimensionSemanticToken { get } - var dimension8XL: DimensionSemanticToken { get } - var dimension9XL: DimensionSemanticToken { get } - var dimension10XL: DimensionSemanticToken { get } - var dimension11XL: DimensionSemanticToken { get } -} - -// swiftlint:enable missing_docs