diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index 6083d96ed..8558d67a2 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -21,7 +21,7 @@ The [issue tracker](https://github.com/Orange-OpenSource/ouds-ios/issues) is the Our bug tracker utilizes several labels to help organize and identify issues. Here's what they represent and how we use them: -- `feature` - Issues asking for a new feature to be added, or an existing one to be extended or modified. New features require a minor version bump (e.g., `v1.0.0` to `v1.1.0`). +- `feature` - Issues asking for a new feature to be added, or an existing one to be extended or modified. New features require a minor version bump (e.g., `v1.0.0` to `v1.1.0`) or a major version bump if public API broken (e.g., `v1.0.0` to `v2.0.0`) - `help wanted` - Issues we need or would love help from the community to resolve. For a complete look at our labels, see the [project labels page](https://github.com/Orange-OpenSource/ouds-ios/labels). @@ -75,11 +75,11 @@ Adhering to the following process is the best way to get your work included in t 1. [Fork](https://help.github.com/articles/fork-a-repo/) the project, clone your fork, and configure the remotes: ```bash - # Clone your fork of the repo into the current directory + # Clone your fork of the repo into the current directory (use either SSH or HTTPS) git clone https://github.com//ouds-ios.git # Navigate to the newly cloned directory cd ouds-ios - # Assign the original repo to a remote called "upstream" (you can use of course SSH instead of HTTPS) + # Assign the original repo to a remote called "upstream" (use either SSH or HTTPS) git remote add upstream https://github.com/Orange-OpenSource/ouds-ios.git ``` diff --git a/.github/DEVELOP.md b/.github/DEVELOP.md index 21c0305b4..bfa023387 100644 --- a/.github/DEVELOP.md +++ b/.github/DEVELOP.md @@ -30,38 +30,51 @@ If some tools are missing, pick the suitable command line below and check versio bundle install # Use CocoaPods to install other dependencies not available as rubygems (thanks to Podfile and Podfile.lock files) -bundle exec pod install +bundle exec pod install --repo-update + +# Update your references +brew update # For Periphery (https://github.com/peripheryapp/periphery) for dead code hunt (at least 2.21.0) brew install peripheryapp/periphery/periphery # For gitleaks (https://github.com/gitleaks/gitleaks) for secrets leaks hunt (at least 8.18.1) brew install gitleaks +# or `brew reinstall gitleaks` to get updates if old version installed -# For SwiftLint (at least 0.52.4) +# For SwiftLint (at least 0.57.0) brew install swiftlint +# or `brew reinstall swiftlint` to get updates if old version installed # For SwiftFormat (at least 0.52.4) brew install swiftformat +# or `brew reinstall swiftformat` to get updates if old version installed ``` Ensure you have the suitable _Ruby_ version. We recommend the use of [rbenv](https://github.com/rbenv/rbenv) to load the suitable version of ruby. -We use here _Ruby 3_ (3.1.x). +We use here _Ruby 3_ (>= 3.3). If you are not used to this tool: ```shell -# List available local version of Ruby +# List available local versions of Ruby rbenv install --list -# Apply the 3.1.2 version of Ruby (if listed previously) -rbenv global 3.1.2 +# Apply the expected x.y.z version of Ruby (if listed previously with the command above) +rbenv global 3.3.5 + +# If you don't have the expected x.y.z version of Ruby, run: +# > brew update && brew upgrade ruby-build +# > rbenv install x.y.z +# then +# > rbenv global x.y.z # Check Ruby version ruby --version ``` -We use also for our GitLab CI runners **Xcode 15.3**, we suggest you use this version or newer if you want but beware. -**Xcode 16** use will come. +We use also for our GitLab CI runners **Xcode 16**, we suggest you use this version or newer if you want. + +**Xcode 16** and **Swift 6** are used for this project. You must use this configuration. ## Build showcase demo app @@ -272,9 +285,23 @@ Do not forget if possible to enable the warnings in the end of the file to reduc ## CI/CD -We use GitLab CI for CI/CD with our own runners so as to keep private our sensitive files likes certificates and provisioning profiles. +### GitHub Action + +We use also *GitHub Actions* so as to define a workflow with some actions to build demo application and test the library. +It will help use to ensure code on pull requests or being merged compiles and has all tests green. +This workflow is defined in [this YAML](https://github.com/Orange-OpenSource/ouds-ios/blob/develop/.github/workflows/build-and-test.yml) + +We have also a *gitleaks* workflow making some scans on the code to loook fo secrets leaks, defined in [this YAML](https://github.com/Orange-OpenSource/ouds-ios/blob/develop/.github/workflows/gitleaks-action.yml). + +We use also two GitHub apps making controls on pull requests and defining wether or not prerequisites are filled or not. +There is on control to check if [PR template are all defined ](https://github.com/stilliard/github-task-list-completed), and one if [DCO is applied](https://probot.github.io/apps/dco/). + +### GitLab CI (internal) + +We use *GitLab CI*for CI/CD with our own runners so as to keep private our sensitive files likes certificates and provisioning profiles. Our currant plan does not allow to make GitHub mirroring, so we use GitHub HTTP REST API to download sources, before using Xcode to build and sign. -If you want to set up your runners, feel free to have a look on */docs_release/README.md* -However of course you will have to define all the variables, secrets and have the mandatory files listed above. +However of course you will have to define all the variables, secrets and have the mandatory files. + +You can find more details about the pipelines, how to set up runners and scripts to use [in the wiki](https://github.com/Orange-OpenSource/ouds-ios/wiki/5-%E2%80%90-About-continuous-integration-and-delivery). -You can find more details about the pipelines and script [in the wiki](https://github.com/Orange-OpenSource/ouds-ios/wiki/5-%E2%80%90-About-continuous-integration-and-delivery). \ No newline at end of file +In few words, there is a pipeline containing some stages and jobs to build alpha, nightly/beta and production releases. diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index 2ce6776e1..6d69938e6 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -31,9 +31,23 @@ body: id: app-version attributes: label: App version - placeholder: v1.0.1 (build 42) + placeholder: 0.5.0 validations: required: true + - type: input + id: app-build-number + attributes: + label: App build number + placeholder: "13" + validations: + required: true + - type: input + id: app-build-type + attributes: + label: App build type + placeholder: alpha, beta, prod, DEBUG + validations: + required: true - type: input id: app-orientation attributes: diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml new file mode 100644 index 000000000..4d8ca5f8c --- /dev/null +++ b/.github/workflows/build-and-test.yml @@ -0,0 +1,82 @@ +# +# Software Name: Orange Unified Design System +# 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 +# + +name: Build and Test + +on: + # For protected and most important branches + push: + branches: + - main + - develop + + # To trigger manually + workflow_dispatch: + + # Pull request events + pull_request: + types: + - opened + - synchronize + +jobs: + # Build the app (if there are linter errors or compiler issues, it will fail) + build: + runs-on: macos-latest + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Set up Xcode 16 + run: | + sudo xcode-select -s /Applications/Xcode_16.app/Contents/Developer + + - name: Set up Ruby + uses: ruby/setup-ruby@v1 + with: + ruby-version: '3.3' + + - name: Install Fastlane + run: | + bundle install + + - name: Build demo app + run: | + cd Showcase + bundle exec fastlane buildDebugApp + + # Test the library with unit tests + test: + runs-on: macos-latest + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Set up Xcode 16 + run: | + sudo xcode-select -s /Applications/Xcode_16.app/Contents/Developer + + - name: Set up Ruby + uses: ruby/setup-ruby@v1 + with: + ruby-version: '3.3' + + - name: Install Fastlane + run: | + bundle install + + - name: Run unit tests on demo app + run: | + cd Showcase + bundle exec pod install + bundle exec fastlane ios test diff --git a/.gitignore b/.gitignore index 2bd1c0ed8..39a2eced5 100644 --- a/.gitignore +++ b/.gitignore @@ -27,6 +27,9 @@ /Showcase/Showcase.xcworkspace/xcuserdata/ /DerivedData/ +# Produced by Fastlane +/Showcase/build/ + # Produced by Swift Package Manager /.swiftpm/xcode/xcshareddata/ /.swiftpm/xcode/xcuserdata/ diff --git a/.swiftlint.yml b/.swiftlint.yml index a7a07b39b..ea7d6b244 100644 --- a/.swiftlint.yml +++ b/.swiftlint.yml @@ -12,7 +12,9 @@ # # More details at https://realm.github.io/SwiftLint +# Expected SwiftLint v0.57.0 (at least) +strict: true # ======== # Included @@ -32,8 +34,6 @@ excluded: - Showcase/Pods - Showcase/DerivedData -strict: true - # ============== # Disabled rules # ============== @@ -57,6 +57,14 @@ disabled_rules: - vertical_whitespace_between_cases - vertical_whitespace_opening_braces +# ============== +# Analyzer rules +# ============== + +analyzer_rules: +- explicit_self +- unused_import + # ===================================== # Opt-in rules (not enabled by default) # ===================================== @@ -64,7 +72,6 @@ disabled_rules: opt_in_rules: - accessibility_label_for_image - accessibility_trait_for_button -- anyobject_protocol - array_init - closure_body_length - closure_end_indentation @@ -79,7 +86,6 @@ opt_in_rules: - empty_string - empty_xctest_method - explicit_init -- explicit_self - fallthrough - fatal_error_message - first_where @@ -140,7 +146,6 @@ opt_in_rules: - unneeded_parentheses_in_closure_argument - unowned_variable_capture - untyped_error_in_catch -- unused_import - unused_optional_binding - vertical_parameter_alignment - vertical_parameter_alignment_on_call diff --git a/CHANGELOG.md b/CHANGELOG.md index ef2a0e2ee..d69ff4fab 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,11 +4,66 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [0.5.0](https://github.com/Orange-OpenSource/ouds-ios/compare/0.4.1...0.5.0) - 2024-10-31 + +### Added + +- [DemoApp] App icons for debug, alpha, beta and production releases ([#140](https://github.com/Orange-OpenSource/ouds-ios/issues/140)) +- [Tool] GitHub Actions workflow for CI/CD ([#256](https://github.com/Orange-OpenSource/ouds-ios/issues/256)) +- [DemoApp] Add new tokens in size tokens page ([#245](https://github.com/Orange-OpenSource/ouds-ios/issues/245)) +- [Library] Semantic token `borderWidthFocusInset` (value of `borderWidth100`) ([#207](https://github.com/Orange-OpenSource/ouds-ios/issues/207), [#241](https://github.com/Orange-OpenSource/ouds-ios/issues/241)) +- [Library] Semantic token `fontWeightCode` ([#242](https://github.com/Orange-OpenSource/ouds-ios/issues/242)) +- [DemoApp] Update space tokens screen with all categories ([#178](https://github.com/Orange-OpenSource/ouds-ios/issues/178)) + +### Changed + +- [Library] Update `ElevationSemanticTokens` (tokenator *20241031125053*) +- [Library] Update `OrangeBrandColorRawTokens` (tokenator *20241030132734*) +- [Library] Update `BorderSemanticTokens` (tokenator *20241025110844*) +- [Library] Rename color semantic tokens `colorBackground*` to `colorBg*` +- [Library] Rename `MultipleSpacingTokens` to `MultipleSpaceTokens` and `MultipleSizingTokens` to `MultipleSizeTokens` +- [Library] Extract composite semantic tokens from semantic tokens (`ElevationSemanticTokens`, `TypographySemanticTokens`) +- [Library] Improve documentation about the use of semantic tokens +- [Library] Update `OpacitySemanticTokens` (tokenator *20241025101305*) +- [Library] Rename `*Spacing*Tokens` and `*Sizing*Tokens` to `*Space*Tokens` and `*Size*Tokens` ([#237](https://github.com/Orange-OpenSource/ouds-ios/issues/237)) +- [Library] Update `ElevationRawTokens` (tokenator *20241022174330*) +- [Library] Update `DimensionRawTokens` (tokenator *20241022132646*) +- [Tool] Improve configuration of SwiftLint, update to v0.57.0 ([#77](https://github.com/Orange-OpenSource/ouds-ios/pull/77)) +- [Library] Rename all color semantic tokens `*OnBackground*` to `*OnBg*` ([#208](https://github.com/Orange-OpenSource/ouds-ios/issues/208)) +- [Library] Rename `colorDecorativeBrandTertiary` to `colorDecorativeTertiary` +- [Library] Rename `colorDecorativeBrandPrimary` to `colorDecorativePrimary` ([#208](https://github.com/Orange-OpenSource/ouds-ios/issues/208)) +- [Library] Rename `colorDecorativeSkinTint*` to `colorDecorativeSkinTint*` +- [Library] Rename `colorActionVisitedOnBackgroundEmphasized` to `colorActionVisitedOnBgEmphasized` ([#208](https://github.com/Orange-OpenSource/ouds-ios/issues/208)) +- [Library] Update color semantic tokens ([#208](https://github.com/Orange-OpenSource/ouds-ios/issues/208)) +- [Library] Update `BorderRawTokens` (tokenator *20241022102003*) +- [Library] Update `ColorRawTokens` (tokenator *20241021180411*) +- [Tool] Migration to Swift 6 +- [Tool] Migration from *Xcode 15.3* to to *Xcode 16* ([#201](https://github.com/Orange-OpenSource/ouds-ios/issues/201)) +- [Library] Rename `borderWidthOutsideFocus` to `borderWidthFocus` ([#207](https://github.com/Orange-OpenSource/ouds-ios/issues/207)) +- [Library] Update `OpacityRawTokens` (tokenator *20241021134644*) + +### Removed + +- [Library] Semantic tokens `colorDecorativeBrandTertiaryMuted`, `colorDecorativeBrandTertiaryEmphasized` ([#208](https://github.com/Orange-OpenSource/ouds-ios/issues/208)) +- [Library] Semantic tokens `colorDecorativeBrandSecondaryMuted`, `colorDecorativeBrandSecondaryEmphasized` ([#208](https://github.com/Orange-OpenSource/ouds-ios/issues/208)) +- [Library] Semantic tokens `colorDecorativeBrandPrimaryMuted`, `colorDecorativeBrandPrimaryEmphasized` ([#208](https://github.com/Orange-OpenSource/ouds-ios/issues/208)) +- [Library] Semantic tokens `elevationBlurFocus`, `elevationXFocus`, `elevationYFocus`, `elevationColorFocus` ([#209](https://github.com/Orange-OpenSource/ouds-ios/issues/209)) + +### Fixed + +- [DemoApp] Update typography screen to use right color on token name ([#213](https://github.com/Orange-OpenSource/ouds-ios/issues/213)) +- [DemoApp] Remove duplicated section in color page for content on background values ([#236](https://github.com/Orange-OpenSource/ouds-ios/issues/236)) +- [DemoApp] Hide from Voice Over decorative image in theme selector (a11y) + +### Security + +- [Tool] Move to Ruby 3.3.5 to fix Dependabot alert about *REXML ReDoS vulnerability* (CVE-2024-49761) ([#5](https://github.com/Orange-OpenSource/ouds-ios/security/dependabot/5)) + ## [0.4.1](https://github.com/Orange-OpenSource/ouds-ios/compare/0.4.0...0.4.1) - 2024-10-21 ### Fixed -- [Demoapp] App crash on color token page opening ([#215](https://github.com/Orange-OpenSource/ouds-ios/issues/215)) +- [DemoApp] App crash on color token page opening ([#215](https://github.com/Orange-OpenSource/ouds-ios/issues/215)) ## [0.4.0](https://github.com/Orange-OpenSource/ouds-ios/compare/0.3.0...0.4.0) - 2024-10-18 diff --git a/NOTICE.txt b/NOTICE.txt index 70613f138..c97a8ab5e 100644 --- a/NOTICE.txt +++ b/NOTICE.txt @@ -75,6 +75,7 @@ Any use or displaying shall constitute an infringement under intellectual proper ./Showcase/Showcase/Resources/Assets.xcassets/Tokens/ic_filter_effects.imageset/ic_filter_effects.svg ./Showcase/Showcase/Resources/Assets.xcassets/Tokens/ic_layers.imageset/ic_layers.svg ./Showcase/Showcase/Resources/Assets.xcassets/Tokens/ic_palette.imageset/ic_palette.svg +./Showcase/Showcase/Resources/Assets.xcassets/Tokens/ic_vector.imageset/ic_vector.svg ./Showcase/Showcase/Resources/Assets.xcassets/Tokens/ic_typography.imageset/ic_typography.svg ./Showcase/Showcase/Resources/Assets.xcassets/Tokens/ic_union.imageset/ic_union.svg diff --git a/OUDS/Core/Components/Sources/_OUDSComponents.docc/_OUDSComponents.md b/OUDS/Core/Components/Sources/_OUDSComponents.docc/_OUDSComponents.md index 2a3106795..cbd707509 100644 --- a/OUDS/Core/Components/Sources/_OUDSComponents.docc/_OUDSComponents.md +++ b/OUDS/Core/Components/Sources/_OUDSComponents.docc/_OUDSComponents.md @@ -9,7 +9,7 @@ The catalog of all components provided by OUDS. It contains also `View` extensio ## Overview -Comming soon +❗**More details coming soon.**❗ ## Topics diff --git a/OUDS/Core/OUDS/Sources/OUDSTheme/OUDSTheme+ComponentTokens/OUDSTheme+ButtonsComponentTokens.swift b/OUDS/Core/OUDS/Sources/OUDSTheme/OUDSTheme+ComponentTokens/OUDSTheme+ButtonsComponentTokens.swift index e7f847381..785ed1dc9 100644 --- a/OUDS/Core/OUDS/Sources/OUDSTheme/OUDSTheme+ComponentTokens/OUDSTheme+ButtonsComponentTokens.swift +++ b/OUDS/Core/OUDS/Sources/OUDSTheme/OUDSTheme+ComponentTokens/OUDSTheme+ButtonsComponentTokens.swift @@ -22,7 +22,7 @@ import OUDSTokensSemantic /// **Warning: These are random and dumb values** extension OUDSTheme: ButtonsComponentTokens { - @objc open var buttonInternalSpacing: SpacingPaddingInlineSemanticToken { spacePaddingInlineShort } + @objc open var buttonInternalSpacing: SpacePaddingInlineSemanticToken { spacePaddingInlineShort } @objc open var buttonBorderStyle: BorderStyleSemanticToken { borderStyleDefault } @objc open var buttonBorderColor: ColorSemanticToken { colorBorderDefault } @@ -30,10 +30,10 @@ extension OUDSTheme: ButtonsComponentTokens { @objc open var buttonBorderRadius: BorderRadiusSemanticToken { borderRadiusShort } @objc open var buttonForegroundColor: ColorSemanticToken { colorContentBrandPrimary } - @objc open var buttonBackgroundColor: ColorSemanticToken { colorBackgroundBrandPrimary } + @objc open var buttonBackgroundColor: ColorSemanticToken { colorBgBrandPrimary } - @objc open var buttonWidth: SizingSemanticToken { DimensionRawTokens.dimension3000 } - @objc open var buttonHeight: SizingSemanticToken { DimensionRawTokens.dimension1000 } + @objc open var buttonWidth: SizeSemanticToken { DimensionRawTokens.dimension3000 } + @objc open var buttonHeight: SizeSemanticToken { DimensionRawTokens.dimension1000 } @objc open var buttonTypography: MultipleTypographyTokens { typeDisplayMedium } } diff --git a/OUDS/Core/OUDS/Sources/OUDSTheme/OUDSTheme+SemanticTokens/OUDSTheme+BorderSemanticTokens.swift b/OUDS/Core/OUDS/Sources/OUDSTheme/OUDSTheme+SemanticTokens/OUDSTheme+BorderSemanticTokens.swift index c95e14fa5..ebbf4e95d 100644 --- a/OUDS/Core/OUDS/Sources/OUDSTheme/OUDSTheme+SemanticTokens/OUDSTheme+BorderSemanticTokens.swift +++ b/OUDS/Core/OUDS/Sources/OUDSTheme/OUDSTheme+SemanticTokens/OUDSTheme+BorderSemanticTokens.swift @@ -2,48 +2,33 @@ // 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 +// Software description: A SwiftUI components library with code examples for Orange Unified Design System // import Foundation import OUDSTokensRaw import OUDSTokensSemantic -// ଘ( ・ω・)_/゚・:*:・。☆ -// [File to generate with the tokenator] - -/// Defines basic values common to all themes for `BorderSemanticTokens`. -/// These values can be overriden inside `OUDSTheme` subclasses (in extensions or not, in the same module or not) thanks to the `@objc open` combination. -/// The aim of this extensions is to make relationships between all semantic tokens for borders and associated raw tokens. -/// `OUDSTheme` can be seen as a kind of "abstract class" in _object oriented paradigm_. extension OUDSTheme: BorderSemanticTokens { - - // MARK: Semantic token - Border - Width - - @objc open var borderWidthNone: BorderWidthSemanticToken { BorderRawTokens.borderWidth0 } - @objc open var borderWidthDefault: BorderWidthSemanticToken { BorderRawTokens.borderWidth25 } - @objc open var borderWidthThin: BorderWidthSemanticToken { BorderRawTokens.borderWidth25 } - @objc open var borderWidthMedium: BorderWidthSemanticToken { BorderRawTokens.borderWidth50 } - @objc open var borderWidthThick: BorderWidthSemanticToken { BorderRawTokens.borderWidth75 } - @objc open var borderWidthThicker: BorderWidthSemanticToken { BorderRawTokens.borderWidth100 } - @objc open var borderWidthOutsideFocus: BorderWidthSemanticToken { BorderRawTokens.borderWidth50 } - - // MARK: Semantic token - Border - Radius - - @objc open var borderRadiusNone: BorderRadiusSemanticToken { BorderRawTokens.borderRadius0 } @objc open var borderRadiusDefault: BorderRadiusSemanticToken { BorderRawTokens.borderRadius0 } - @objc open var borderRadiusShort: BorderRadiusSemanticToken { BorderRawTokens.borderRadius75 } @objc open var borderRadiusMedium: BorderRadiusSemanticToken { BorderRawTokens.borderRadius150 } + @objc open var borderRadiusNone: BorderRadiusSemanticToken { BorderRawTokens.borderRadius0 } + @objc open var borderRadiusShort: BorderRadiusSemanticToken { BorderRawTokens.borderRadius75 } @objc open var borderRadiusTall: BorderRadiusSemanticToken { BorderRawTokens.borderRadius300 } - - // MARK: Semantic token - Border - Style - @objc open var borderStyleDefault: BorderStyleSemanticToken { BorderRawTokens.borderStyleSolid } @objc open var borderStyleDrag: BorderStyleSemanticToken { BorderRawTokens.borderStyleDashed } + @objc open var borderWidthDefault: BorderWidthSemanticToken { BorderRawTokens.borderWidth25 } + @objc open var borderWidthFocus: BorderWidthSemanticToken { BorderRawTokens.borderWidth50 } + @objc open var borderWidthFocusInset: BorderWidthSemanticToken { BorderRawTokens.borderWidth100 } + @objc open var borderWidthMedium: BorderWidthSemanticToken { BorderRawTokens.borderWidth50 } + @objc open var borderWidthNone: BorderWidthSemanticToken { BorderRawTokens.borderWidth0 } + @objc open var borderWidthThick: BorderWidthSemanticToken { BorderRawTokens.borderWidth75 } + @objc open var borderWidthThicker: BorderWidthSemanticToken { BorderRawTokens.borderWidth100 } + @objc open var borderWidthThin: BorderWidthSemanticToken { BorderRawTokens.borderWidth25 } } diff --git a/OUDS/Core/OUDS/Sources/OUDSTheme/OUDSTheme+SemanticTokens/OUDSTheme+ColorSemanticTokens.swift b/OUDS/Core/OUDS/Sources/OUDSTheme/OUDSTheme+SemanticTokens/OUDSTheme+ColorSemanticTokens.swift index ae2814050..882bcea31 100644 --- a/OUDS/Core/OUDS/Sources/OUDSTheme/OUDSTheme+SemanticTokens/OUDSTheme+ColorSemanticTokens.swift +++ b/OUDS/Core/OUDS/Sources/OUDSTheme/OUDSTheme+SemanticTokens/OUDSTheme+ColorSemanticTokens.swift @@ -17,7 +17,8 @@ import OUDSTokensSemantic // ଘ( ・ω・)_/゚・:*:・。☆ // [File to generate with the tokenator] -// WARNING: Not synchronized anymore with the Figjam +// 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 line_length // swiftlint:disable identifier_name @@ -31,71 +32,71 @@ extension OUDSTheme: ColorSemanticTokens { // MARK: Semantic token - Colors - Background - @objc open var colorBackgroundPrimary: ColorSemanticToken { MultipleColorTokens(light: ColorRawTokens.colorFunctionalWhite, dark: ColorRawTokens.colorFunctionalDarkGray880) } + @objc open var colorBgPrimary: ColorSemanticToken { MultipleColorTokens(light: ColorRawTokens.colorFunctionalWhite, dark: ColorRawTokens.colorFunctionalDarkGray880) } - @objc open var colorBackgroundSecondary: ColorSemanticToken { MultipleColorTokens(light: ColorRawTokens.colorFunctionalLightGray80, dark: ColorRawTokens.colorFunctionalDarkGray800) } + @objc open var colorBgSecondary: ColorSemanticToken { MultipleColorTokens(light: ColorRawTokens.colorFunctionalLightGray80, dark: ColorRawTokens.colorFunctionalDarkGray800) } // WARNING: #124 - Colors to use are part of Orange Theme so are not reachable at this level, as a workaround add raw values - @objc open var colorBackgroundTertiary: ColorSemanticToken { fatalError("🤖 Raw token unavailable for colorBackgroundBrandSecondary!") } + @objc open var colorBgTertiary: ColorSemanticToken { fatalError("🤖 Raw token unavailable for colorBgTertiary!") } - @objc open var colorBackgroundEmphasized: ColorSemanticToken { MultipleColorTokens(light: ColorRawTokens.colorFunctionalDarkGray880, dark: ColorRawTokens.colorFunctionalDarkGray640) } + @objc open var colorBgEmphasized: ColorSemanticToken { MultipleColorTokens(light: ColorRawTokens.colorFunctionalDarkGray880, dark: ColorRawTokens.colorFunctionalDarkGray640) } // WARNING: #124 - Colors to use are part of Orange Theme so are not reachable at this level, as a workaround add raw values - @objc open var colorBackgroundBrandPrimary: ColorSemanticToken { fatalError("🤖 Raw token unavailable for colorBackgroundBrandPrimary!") } + @objc open var colorBgBrandPrimary: ColorSemanticToken { fatalError("🤖 Raw token unavailable for colorBgBrandPrimary!") } - @objc open var colorBackgroundBrandSecondary: ColorSemanticToken { fatalError("🤖 No value defined for colorBackgroundBrandSecondary!") } + @objc open var colorBgBrandSecondary: ColorSemanticToken { fatalError("🤖 No value defined for colorBgBrandSecondary!") } - @objc open var colorBackgroundBrandTertiary: ColorSemanticToken { fatalError("🤖 No value defined for colorBackgroundBrandTertiary!") } + @objc open var colorBgBrandTertiary: ColorSemanticToken { fatalError("🤖 No value defined for colorBgBrandTertiary!") } - @objc open var colorBackgroundStatusNeutral: ColorSemanticToken { MultipleColorTokens(light: ColorRawTokens.colorFunctionalLightGray80, dark: ColorRawTokens.colorFunctionalDarkGray720) } + @objc open var colorBgStatusNeutral: ColorSemanticToken { MultipleColorTokens(light: ColorRawTokens.colorFunctionalLightGray80, dark: ColorRawTokens.colorFunctionalDarkGray720) } - @objc open var colorBackgroundStatusNeutralOnBackgroundEmphasized: ColorSemanticToken { MultipleColorTokens(light: ColorRawTokens.colorFunctionalDarkGray720, dark: ColorRawTokens.colorFunctionalDarkGray720) } + @objc open var colorBgStatusNeutralOnBgEmphasized: ColorSemanticToken { MultipleColorTokens(light: ColorRawTokens.colorFunctionalDarkGray720, dark: ColorRawTokens.colorFunctionalDarkGray720) } - @objc open var colorBackgroundStatusPositiveMuted: ColorSemanticToken { MultipleColorTokens(light: ColorRawTokens.colorFunctionalMalachite100, dark: ColorRawTokens.colorFunctionalMalachite900) } + @objc open var colorBgStatusPositiveMuted: ColorSemanticToken { MultipleColorTokens(light: ColorRawTokens.colorFunctionalMalachite100, dark: ColorRawTokens.colorFunctionalMalachite900) } - @objc open var colorBackgroundStatusPositiveMutedOnBackgroundEmphasized: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalMalachite900) } + @objc open var colorBgStatusPositiveMutedOnBgEmphasized: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalMalachite900) } - @objc open var colorBackgroundStatusPositiveEmphasized: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalMalachite500) } + @objc open var colorBgStatusPositiveEmphasized: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalMalachite500) } - @objc open var colorBackgroundStatusInfoMuted: ColorSemanticToken { MultipleColorTokens(light: ColorRawTokens.colorFunctionalDodgerBlue100, dark: ColorRawTokens.colorFunctionalDodgerBlue900) } + @objc open var colorBgStatusInfoMuted: ColorSemanticToken { MultipleColorTokens(light: ColorRawTokens.colorFunctionalDodgerBlue100, dark: ColorRawTokens.colorFunctionalDodgerBlue900) } - @objc open var colorBackgroundStatusInfoMutedOnBackgroundEmphasized: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalDodgerBlue900) } + @objc open var colorBgStatusInfoMutedOnBgEmphasized: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalDodgerBlue900) } - @objc open var colorBackgroundStatusInfoEmphasized: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalDodgerBlue500) } + @objc open var colorBgStatusInfoEmphasized: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalDodgerBlue500) } - @objc open var colorBackgroundStatusWarningMuted: ColorSemanticToken { MultipleColorTokens(light: ColorRawTokens.colorFunctionalSun100, dark: ColorRawTokens.colorFunctionalSun900) } + @objc open var colorBgStatusWarningMuted: ColorSemanticToken { MultipleColorTokens(light: ColorRawTokens.colorFunctionalSun100, dark: ColorRawTokens.colorFunctionalSun900) } - @objc open var colorBackgroundStatusWarningMutedOnBackgroundEmphasized: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalSun900) } + @objc open var colorBgStatusWarningMutedOnBgEmphasized: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalSun900) } - @objc open var colorBackgroundStatusWarningEmphasized: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalSun500) } + @objc open var colorBgStatusWarningEmphasized: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalSun500) } - @objc open var colorBackgroundStatusNegativeMuted: ColorSemanticToken { MultipleColorTokens(light: ColorRawTokens.colorFunctionalScarlet100, dark: ColorRawTokens.colorFunctionalScarlet900) } + @objc open var colorBgStatusNegativeMuted: ColorSemanticToken { MultipleColorTokens(light: ColorRawTokens.colorFunctionalScarlet100, dark: ColorRawTokens.colorFunctionalScarlet900) } - @objc open var colorBackgroundStatusNegativeMutedOnBackgroundEmphasized: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalScarlet900) } + @objc open var colorBgStatusNegativeMutedOnBgEmphasized: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalScarlet900) } - @objc open var colorBackgroundStatusNegativeEmphasized: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalScarlet600) } + @objc open var colorBgStatusNegativeEmphasized: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalScarlet600) } // WARNING: #124 - Colors to use are part of Orange Theme so are not reachable at this level, as a workaround add raw values - @objc open var colorBackgroundStatusAccentMuted: ColorSemanticToken { fatalError("🤖 Raw token unavailable for colorBackgroundStatusAccentMuted!") } + @objc open var colorBgStatusAccentMuted: ColorSemanticToken { fatalError("🤖 Raw token unavailable for colorBgStatusAccentMuted!") } // WARNING: #124 - Colors to use are part of Orange Theme so are not reachable at this level, as a workaround add raw values - @objc open var colorBackgroundStatusAccentMutedOnBackgroundEmphasized: ColorSemanticToken { fatalError("🤖 Raw token unavailable for colorBackgroundStatusAccentMutedOnBackgroundEmphasized!") } + @objc open var colorBgStatusAccentMutedOnBgEmphasized: ColorSemanticToken { fatalError("🤖 Raw token unavailable for colorBgStatusAccentMutedOnBgEmphasized!") } - @objc open var colorBackgroundStatusAccentEmphasized: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalSun500) } + @objc open var colorBgStatusAccentEmphasized: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalSun500) } // MARK: Semantic token - Colors - Content @objc open var colorContentDefault: ColorSemanticToken { MultipleColorTokens(light: ColorRawTokens.colorFunctionalBlack, dark: ColorRawTokens.colorFunctionalLightGray160) } - @objc open var colorContentContentDefaultOnBackgroundEmphasized: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalLightGray160) } + @objc open var colorContentContentDefaultOnBgEmphasized: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalLightGray160) } @objc open var colorContentMuted: ColorSemanticToken { MultipleColorTokens(light: ColorRawTokens.colorFunctionalDarkGray400, dark: ColorRawTokens.colorFunctionalLightGray400) } - @objc open var colorContentContentMutedOnBackgroundEmphasized: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalLightGray400) } + @objc open var colorContentContentMutedOnBgEmphasized: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalLightGray400) } @objc open var colorContentDisabled: ColorSemanticToken { MultipleColorTokens(light: ColorRawTokens.colorFunctionalLightGray400, dark: ColorRawTokens.colorFunctionalDarkGray400) } - @objc open var colorContentContentDisabledOnBackgroundEmphasized: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalDarkGray400) } + @objc open var colorContentContentDisabledOnBgEmphasized: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalDarkGray400) } // WARNING: #124 - Colors to use are part of Orange Theme so are not reachable at this level, as a workaround add raw values @objc open var colorContentBrandPrimary: ColorSemanticToken { fatalError("🤖 Raw token unavailable for colorContentBrandPrimary!") } @@ -116,56 +117,56 @@ extension OUDSTheme: ColorSemanticTokens { // MARK: Semantic token - Colors - Content - On Background - @objc open var colorContentOnBackgroundPrimary: ColorSemanticToken { MultipleColorTokens(light: ColorRawTokens.colorFunctionalWhite, dark: ColorRawTokens.colorFunctionalBlack) } + @objc open var colorContentOnBgPrimary: ColorSemanticToken { MultipleColorTokens(light: ColorRawTokens.colorFunctionalWhite, dark: ColorRawTokens.colorFunctionalBlack) } - @objc open var colorContentOnBackgroundSecondary: ColorSemanticToken { fatalError("🤖 No value defined for colorContentOnBackgroundSecondary!") } + @objc open var colorContentOnBgSecondary: ColorSemanticToken { fatalError("🤖 No value defined for colorContentOnBgSecondary!") } - @objc open var colorContentOnBackgroundTertiary: ColorSemanticToken { fatalError("🤖 No value defined for colorContentOnBackgroundTertiary!") } + @objc open var colorContentOnBgTertiary: ColorSemanticToken { fatalError("🤖 No value defined for colorContentOnBgTertiary!") } - @objc open var colorContentOnBackgroundStatusPositiveMuted: ColorSemanticToken { MultipleColorTokens(light: ColorRawTokens.colorFunctionalBlack, dark: ColorRawTokens.colorFunctionalLightGray160) } + @objc open var colorContentOnBgStatusPositiveMuted: ColorSemanticToken { MultipleColorTokens(light: ColorRawTokens.colorFunctionalBlack, dark: ColorRawTokens.colorFunctionalLightGray160) } - @objc open var colorContentOnBackgroundStatusPositiveMutedOnBackgroundEmphasized: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalLightGray160) } + @objc open var colorContentOnBgStatusPositiveMutedOnBgEmphasized: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalLightGray160) } - @objc open var colorContentOnBackgroundStatusPositiveEmphasized: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalBlack) } + @objc open var colorContentOnBgStatusPositiveEmphasized: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalBlack) } - @objc open var colorContentOnBackgroundStatusInfoMuted: ColorSemanticToken { MultipleColorTokens(light: ColorRawTokens.colorFunctionalBlack, dark: ColorRawTokens.colorFunctionalLightGray160) } + @objc open var colorContentOnBgStatusInfoMuted: ColorSemanticToken { MultipleColorTokens(light: ColorRawTokens.colorFunctionalBlack, dark: ColorRawTokens.colorFunctionalLightGray160) } - @objc open var colorContentOnBackgroundStatusInfoMutedOnBackgroundEmphasized: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalLightGray160) } + @objc open var colorContentOnBgStatusInfoMutedOnBgEmphasized: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalLightGray160) } - @objc open var colorContentOnBackgroundStatusInfoEmphasized: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalBlack) } + @objc open var colorContentOnBgStatusInfoEmphasized: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalBlack) } - @objc open var colorContentOnBackgroundStatusWarningMuted: ColorSemanticToken { MultipleColorTokens(light: ColorRawTokens.colorFunctionalBlack, dark: ColorRawTokens.colorFunctionalLightGray160) } + @objc open var colorContentOnBgStatusWarningMuted: ColorSemanticToken { MultipleColorTokens(light: ColorRawTokens.colorFunctionalBlack, dark: ColorRawTokens.colorFunctionalLightGray160) } - @objc open var colorContentOnBackgroundStatusWarningMutedOnBackgroundEmphasized: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalLightGray160) } + @objc open var colorContentOnBgStatusWarningMutedOnBgEmphasized: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalLightGray160) } - @objc open var colorContentOnBackgroundStatusWarningEmphasized: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalBlack) } + @objc open var colorContentOnBgStatusWarningEmphasized: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalBlack) } - @objc open var colorContentOnBackgroundStatusNegativeMuted: ColorSemanticToken { MultipleColorTokens(light: ColorRawTokens.colorFunctionalBlack, dark: ColorRawTokens.colorFunctionalLightGray160) } + @objc open var colorContentOnBgStatusNegativeMuted: ColorSemanticToken { MultipleColorTokens(light: ColorRawTokens.colorFunctionalBlack, dark: ColorRawTokens.colorFunctionalLightGray160) } - @objc open var colorContentOnBackgroundStatusNegativeMutedOnBackgroundEmphasized: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalLightGray160) } + @objc open var colorContentOnBgStatusNegativeMutedOnBgEmphasized: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalLightGray160) } - @objc open var colorContentOnBackgroundStatusNegativeEmphasized: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalWhite) } + @objc open var colorContentOnBgStatusNegativeEmphasized: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalWhite) } - @objc open var colorContentOnBackgroundStatusAccentMuted: ColorSemanticToken { MultipleColorTokens(light: ColorRawTokens.colorFunctionalBlack, dark: ColorRawTokens.colorFunctionalLightGray160) } + @objc open var colorContentOnBgStatusAccentMuted: ColorSemanticToken { MultipleColorTokens(light: ColorRawTokens.colorFunctionalBlack, dark: ColorRawTokens.colorFunctionalLightGray160) } - @objc open var colorContentOnBackgroundStatusAccentMutedOnBackgroundEmphasized: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalLightGray160) } + @objc open var colorContentOnBgStatusAccentMutedOnBgEmphasized: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalLightGray160) } - @objc open var colorContentOnBackgroundStatusAccentedEmphasized: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalBlack) } + @objc open var colorContentOnBgStatusAccentedEmphasized: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalBlack) } // MARK: Semantic token - Colors - Border @objc open var colorBorderDefault: ColorSemanticToken { MultipleColorTokens(light: ColorRawTokens.colorFunctionalLightGray400, dark: ColorRawTokens.colorFunctionalDarkGray400) } - @objc open var colorBorderDefaultOnBackgroundEmphasized: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalDarkGray400) } + @objc open var colorBorderDefaultOnBgEmphasized: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalDarkGray400) } @objc open var colorBorderEmphasized: ColorSemanticToken { MultipleColorTokens(light: ColorRawTokens.colorFunctionalBlack, dark: ColorRawTokens.colorFunctionalLightGray160) } - @objc open var colorBorderEmphasizedOnBackgroundEmphasized: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalLightGray160) } + @objc open var colorBorderEmphasizedOnBgEmphasized: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalLightGray160) } @objc open var colorBorderFocus: ColorSemanticToken { MultipleColorTokens(light: ColorRawTokens.colorFunctionalWhite, dark: ColorRawTokens.colorFunctionalDarkGray880) } // WARNING: #124 - Colors to use are part of Orange Theme so are not reachable at this level, as a workaround add raw values - @objc open var colorBorderBrandPrimaryOnBackgroundEmphasized: ColorSemanticToken { fatalError("🤖 Raw token unavailable for colorBorderBrandPrimaryOnBackgroundEmphasized!") } + @objc open var colorBorderBrandPrimaryOnBgEmphasized: ColorSemanticToken { fatalError("🤖 Raw token unavailable for colorBorderBrandPrimaryOnBgEmphasized!") } // WARNING: #124 - Colors to use are part of Orange Theme so are not reachable at this level, as a workaround add raw values @objc open var colorBorderBrandPrimary: ColorSemanticToken { fatalError("🤖 Raw token unavailable for colorBorderBrandPrimary!") } @@ -184,11 +185,11 @@ extension OUDSTheme: ColorSemanticTokens { @objc open var colorBorderStatusAccent: ColorSemanticToken { fatalError("🤖 No value defined for colorBorderStatusAccent!") } - @objc open var colorBorderOnBackgroundBrandPrimary: ColorSemanticToken { MultipleColorTokens(light: ColorRawTokens.colorFunctionalWhite, dark: ColorRawTokens.colorFunctionalBlack) } + @objc open var colorBorderOnBgBrandPrimary: ColorSemanticToken { MultipleColorTokens(light: ColorRawTokens.colorFunctionalWhite, dark: ColorRawTokens.colorFunctionalBlack) } - @objc open var colorBorderOnBackgroundBrandSecondary: ColorSemanticToken { fatalError("🤖 No value defined for colorBorderOnBackgroundBrandSecondary!") } + @objc open var colorBorderOnBgBrandSecondary: ColorSemanticToken { fatalError("🤖 No value defined for colorBorderOnBgBrandSecondary!") } - @objc open var colorBorderOnBackgroundBrandTertiary: ColorSemanticToken { fatalError("🤖 No value defined for colorBorderOnBackgroundBrandTertiary!") } + @objc open var colorBorderOnBgBrandTertiary: ColorSemanticToken { fatalError("🤖 No value defined for colorBorderOnBgBrandTertiary!") } // MARK: Semantic token - Colors - Action @@ -196,59 +197,59 @@ extension OUDSTheme: ColorSemanticTokens { @objc open var colorActionSelected: ColorSemanticToken { fatalError("🤖 Raw token unavailable for colorActionSelected!") } // WARNING: #124 - Colors to use are part of Orange Theme so are not reachable at this level, as a workaround add raw values - @objc open var colorActionSelectedOnBackgroundEmphasized: ColorSemanticToken { fatalError("🤖 Raw token unavailable for colorActionSelectedOnBackgroundEmphasized!") } + @objc open var colorActionSelectedOnBgEmphasized: ColorSemanticToken { fatalError("🤖 Raw token unavailable for colorActionSelectedOnBgEmphasized!") } @objc open var colorActionDisabled: ColorSemanticToken { MultipleColorTokens(light: ColorRawTokens.colorFunctionalLightGray400, dark: ColorRawTokens.colorFunctionalDarkGray400) } - @objc open var colorActionDisabledOnBackgroundEmphasized: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalDarkGray400) } + @objc open var colorActionDisabledOnBgEmphasized: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalDarkGray400) } @objc open var colorActionVisited: ColorSemanticToken { MultipleColorTokens(light: ColorRawTokens.colorDecorativeAmethyst600, dark: ColorRawTokens.colorDecorativeAmethyst400) } - @objc open var colorActionVistedOnBackgroundEmphasized: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorDecorativeAmethyst400) } + @objc open var colorActionVistedOnBgEmphasized: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorDecorativeAmethyst400) } @objc open var colorActionPrimaryEnabled: ColorSemanticToken { MultipleColorTokens(light: ColorRawTokens.colorFunctionalBlack, dark: ColorRawTokens.colorFunctionalLightGray160) } - @objc open var colorActionPrimaryEnabledOnBackgroundEmphasized: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalLightGray160) } + @objc open var colorActionPrimaryEnabledOnBgEmphasized: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalLightGray160) } @objc open var colorActionPrimaryHover: ColorSemanticToken { MultipleColorTokens(light: ColorRawTokens.colorFunctionalDarkGray400, dark: ColorRawTokens.colorFunctionalLightGray400) } - @objc open var colorActionPrimaryHoverOnBackgroundEmphasized: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalLightGray400) } + @objc open var colorActionPrimaryHoverOnBgEmphasized: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalLightGray400) } // WARNING: #124 - Colors to use are part of Orange Theme so are not reachable at this level, as a workaround add raw values @objc open var colorActionPrimaryPressed: ColorSemanticToken { fatalError("🤖 Raw token unavailable for colorActionPrimaryPressed!") } // WARNING: #124 - Colors to use are part of Orange Theme so are not reachable at this level, as a workaround add raw values - @objc open var colorActionPrimaryPressedOnBackgroundEmphasized: ColorSemanticToken { fatalError("🤖 Raw token unavailable for colorActionPrimaryPressedOnBackgroundEmphasized!") } + @objc open var colorActionPrimaryPressedOnBgEmphasized: ColorSemanticToken { fatalError("🤖 Raw token unavailable for colorActionPrimaryPressedOnBgEmphasized!") } // WARNING: #124 - Colors to use are part of Orange Theme so are not reachable at this level, as a workaround add raw values @objc open var colorActionPrimaryLoading: ColorSemanticToken { fatalError("🤖 Raw token unavailable for colorActionPrimaryLoading!") } // WARNING: #124 - Colors to use are part of Orange Theme so are not reachable at this level, as a workaround add raw values - @objc open var colorActionPrimaryLoadingOnBackgroundEmphasized: ColorSemanticToken { fatalError("🤖 Raw token unavailable for colorActionPrimaryLoadingOnBackgroundEmphasized!") } + @objc open var colorActionPrimaryLoadingOnBgEmphasized: ColorSemanticToken { fatalError("🤖 Raw token unavailable for colorActionPrimaryLoadingOnBgEmphasized!") } @objc open var colorActionPrimaryFocus: ColorSemanticToken { MultipleColorTokens(light: ColorRawTokens.colorFunctionalDarkGray400, dark: ColorRawTokens.colorFunctionalLightGray400) } - @objc open var colorActionPrimaryFocusOnBackgroundEmphasized: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalLightGray400) } + @objc open var colorActionPrimaryFocusOnBgEmphasized: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalLightGray400) } @objc open var colorActionSecondaryEnabled: ColorSemanticToken { MultipleColorTokens(light: ColorRawTokens.colorFunctionalLightGray80, dark: ColorRawTokens.colorFunctionalLightGray160) } - @objc open var colorActionSecondaryEnabledOnBackgroundEmphasized: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalDarkGray720) } + @objc open var colorActionSecondaryEnabledOnBgEmphasized: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalDarkGray720) } @objc open var colorActionSecondaryHover: ColorSemanticToken { MultipleColorTokens(light: ColorRawTokens.colorFunctionalLightGray160, dark: ColorRawTokens.colorFunctionalDarkGray640) } - @objc open var colorActionSecondaryHoverOnBackgroundEmphasized: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalLightGray160) } + @objc open var colorActionSecondaryHoverOnBgEmphasized: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalLightGray160) } @objc open var colorActionSecondaryPressed: ColorSemanticToken { MultipleColorTokens(light: ColorRawTokens.colorFunctionalLightGray160, dark: ColorRawTokens.colorFunctionalDarkGray640) } - @objc open var colorActionSecondaryPressedOnBackgroundEmphasized: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalDarkGray640) } + @objc open var colorActionSecondaryPressedOnBgEmphasized: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalDarkGray640) } @objc open var colorActionSecondaryLoading: ColorSemanticToken { MultipleColorTokens(light: ColorRawTokens.colorFunctionalLightGray160, dark: ColorRawTokens.colorFunctionalDarkGray640) } - @objc open var colorActionSecondaryLoadingOnBackgroundEmphasized: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalDarkGray640) } + @objc open var colorActionSecondaryLoadingOnBgEmphasized: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalDarkGray640) } @objc open var colorActionSecondaryFocus: ColorSemanticToken { MultipleColorTokens(light: ColorRawTokens.colorFunctionalLightGray160, dark: ColorRawTokens.colorFunctionalDarkGray640) } - @objc open var colorActionSecondaryFocusOnBackgroundEmphasized: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalDarkGray640) } + @objc open var colorActionSecondaryFocusOnBgEmphasized: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalDarkGray640) } @objc open var colorActionNegativeEnabled: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalScarlet600) } @@ -260,51 +261,51 @@ extension OUDSTheme: ColorSemanticTokens { @objc open var colorActionNegativeFocus: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalScarlet700) } - @objc open var colorActionOnBackgroundActionDisabled: ColorSemanticToken { MultipleColorTokens(light: ColorRawTokens.colorFunctionalWhite, dark: ColorRawTokens.colorFunctionalBlack) } + @objc open var colorActionOnBgActionDisabled: ColorSemanticToken { MultipleColorTokens(light: ColorRawTokens.colorFunctionalWhite, dark: ColorRawTokens.colorFunctionalBlack) } - @objc open var colorActionOnBackgroundActionDisabledOnBackgroundEmphasized: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalBlack) } + @objc open var colorActionOnBgActionDisabledOnBgEmphasized: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalBlack) } - @objc open var colorActionOnBackgroundActionNegative: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalWhite) } + @objc open var colorActionOnBgActionNegative: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalWhite) } - @objc open var colorActionOnBackgroundActionPrimaryEnabled: ColorSemanticToken { MultipleColorTokens(light: ColorRawTokens.colorFunctionalWhite, dark: ColorRawTokens.colorFunctionalBlack) } + @objc open var colorActionOnBgActionPrimaryEnabled: ColorSemanticToken { MultipleColorTokens(light: ColorRawTokens.colorFunctionalWhite, dark: ColorRawTokens.colorFunctionalBlack) } - @objc open var colorActionOnBackgroundActionPrimaryEnabledOnBackgroundEmphasized: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalBlack) } + @objc open var colorActionOnBgActionPrimaryEnabledOnBgEmphasized: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalBlack) } - @objc open var colorActionOnBackgroundActionPrimaryHover: ColorSemanticToken { MultipleColorTokens(light: ColorRawTokens.colorFunctionalWhite, dark: ColorRawTokens.colorFunctionalBlack) } + @objc open var colorActionOnBgActionPrimaryHover: ColorSemanticToken { MultipleColorTokens(light: ColorRawTokens.colorFunctionalWhite, dark: ColorRawTokens.colorFunctionalBlack) } - @objc open var colorActionOnBackgroundActionPrimaryHoverOnBackgroundEmphasized: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalBlack) } + @objc open var colorActionOnBgActionPrimaryHoverOnBgEmphasized: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalBlack) } - @objc open var colorActionOnBackgroundActionPrimaryPressed: ColorSemanticToken { MultipleColorTokens(light: ColorRawTokens.colorFunctionalWhite, dark: ColorRawTokens.colorFunctionalBlack) } + @objc open var colorActionOnBgActionPrimaryPressed: ColorSemanticToken { MultipleColorTokens(light: ColorRawTokens.colorFunctionalWhite, dark: ColorRawTokens.colorFunctionalBlack) } - @objc open var colorActionOnBackgroundActionPrimaryPressedOnBackgroundEmphasized: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalBlack) } + @objc open var colorActionOnBgActionPrimaryPressedOnBgEmphasized: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalBlack) } - @objc open var colorActionOnBackgroundActionPrimaryLoading: ColorSemanticToken { MultipleColorTokens(light: ColorRawTokens.colorFunctionalWhite, dark: ColorRawTokens.colorFunctionalBlack) } + @objc open var colorActionOnBgActionPrimaryLoading: ColorSemanticToken { MultipleColorTokens(light: ColorRawTokens.colorFunctionalWhite, dark: ColorRawTokens.colorFunctionalBlack) } - @objc open var colorActionOnBackgroundActionPrimaryLoadingOnBackgroundEmphasized: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalBlack) } + @objc open var colorActionOnBgActionPrimaryLoadingOnBgEmphasized: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalBlack) } - @objc open var colorActionOnBackgroundActionPrimaryFocus: ColorSemanticToken { MultipleColorTokens(light: ColorRawTokens.colorFunctionalWhite, dark: ColorRawTokens.colorFunctionalBlack) } + @objc open var colorActionOnBgActionPrimaryFocus: ColorSemanticToken { MultipleColorTokens(light: ColorRawTokens.colorFunctionalWhite, dark: ColorRawTokens.colorFunctionalBlack) } - @objc open var colorActionOnBackgroundActionPrimaryFocusOnBackgroundEmphasized: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalBlack) } + @objc open var colorActionOnBgActionPrimaryFocusOnBgEmphasized: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalBlack) } - @objc open var colorActionOnBackgroundActionSecondaryEnabled: ColorSemanticToken { fatalError("🤖 No value defined for colorActionOnBackgroundActionSecondaryEnabled!") } + @objc open var colorActionOnBgActionSecondaryEnabled: ColorSemanticToken { fatalError("🤖 No value defined for colorActionOnBgActionSecondaryEnabled!") } - @objc open var colorActionOnBackgroundActionSecondaryEnabledOnBackgroundEmphasized: ColorSemanticToken { fatalError("🤖 No value defined for colorActionOnBackgroundActionSecondaryEnabledOnBackgroundEmphasized!") } + @objc open var colorActionOnBgActionSecondaryEnabledOnBgEmphasized: ColorSemanticToken { fatalError("🤖 No value defined for colorActionOnBgActionSecondaryEnabledOnBgEmphasized!") } - @objc open var colorActionOnBackgroundActionSecondaryHover: ColorSemanticToken { fatalError("🤖 No value defined for colorActionOnBackgroundActionSecondaryHover!") } + @objc open var colorActionOnBgActionSecondaryHover: ColorSemanticToken { fatalError("🤖 No value defined for colorActionOnBgActionSecondaryHover!") } - @objc open var colorActionOnBackgroundActionSecondaryHoverOnBackgroundEmphasized: ColorSemanticToken { fatalError("🤖 No value defined for colorActionOnBackgroundActionSecondaryHoverOnBackgroundEmphasized!") } + @objc open var colorActionOnBgActionSecondaryHoverOnBgEmphasized: ColorSemanticToken { fatalError("🤖 No value defined for colorActionOnBgActionSecondaryHoverOnBgEmphasized!") } - @objc open var colorActionOnBackgroundActionSecondaryPressed: ColorSemanticToken { fatalError("🤖 No value defined for colorActionOnBackgroundActionSecondaryPressed!") } + @objc open var colorActionOnBgActionSecondaryPressed: ColorSemanticToken { fatalError("🤖 No value defined for colorActionOnBgActionSecondaryPressed!") } - @objc open var colorActionOnBackgroundActionSecondaryPressedOnBackgroundEmphasized: ColorSemanticToken { fatalError("🤖 No value defined for colorActionOnBackgroundActionSecondaryPressedOnBackgroundEmphasized!") } + @objc open var colorActionOnBgActionSecondaryPressedOnBgEmphasized: ColorSemanticToken { fatalError("🤖 No value defined for colorActionOnBgActionSecondaryPressedOnBgEmphasized!") } - @objc open var colorActionOnBackgroundActionSecondaryLoading: ColorSemanticToken { fatalError("🤖 No value defined for colorActionOnBackgroundActionSecondaryLoading!") } + @objc open var colorActionOnBgActionSecondaryLoading: ColorSemanticToken { fatalError("🤖 No value defined for colorActionOnBgActionSecondaryLoading!") } - @objc open var colorActionOnBackgroundActionSecondaryLoadingOnBackgroundEmphasized: ColorSemanticToken { fatalError("🤖 No value defined for colorActionOnBackgroundActionSecondaryLoadingOnBackgroundEmphasized!") } + @objc open var colorActionOnBgActionSecondaryLoadingOnBgEmphasized: ColorSemanticToken { fatalError("🤖 No value defined for colorActionOnBgActionSecondaryLoadingOnBgEmphasized!") } - @objc open var colorActionOnBackgroundActionSecondaryFocus: ColorSemanticToken { fatalError("🤖 No value defined for colorActionOnBackgroundActionSecondaryFocus!") } + @objc open var colorActionOnBgActionSecondaryFocus: ColorSemanticToken { fatalError("🤖 No value defined for colorActionOnBgActionSecondaryFocus!") } - @objc open var colorActionOnBackgroundActionSecondaryFocusOnBackgroundEmphasized: ColorSemanticToken { fatalError("🤖 No value defined for colorActionOnBackgroundActionSecondaryFocusOnBackgroundEmphasized!") } + @objc open var colorActionOnBgActionSecondaryFocusOnBgEmphasized: ColorSemanticToken { fatalError("🤖 No value defined for colorActionOnBgActionSecondaryFocusOnBgEmphasized!") } // MARK: Semantic token - Colors - Always @@ -322,19 +323,19 @@ extension OUDSTheme: ColorSemanticTokens { @objc open var colorAlwaysAccent: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalSun500) } - @objc open var colorAlwaysOnBackgroundBlack: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalWhite) } + @objc open var colorAlwaysOnBgBlack: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalWhite) } - @objc open var colorAlwaysOnBackgroundWhite: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalBlack) } + @objc open var colorAlwaysOnBgWhite: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalBlack) } - @objc open var colorAlwaysOnBackgroundWarning: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalBlack) } + @objc open var colorAlwaysOnBgWarning: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalBlack) } - @objc open var colorAlwaysOnBackgroundNegative: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalWhite) } + @objc open var colorAlwaysOnBgNegative: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalWhite) } - @objc open var colorAlwaysOnBackgroundPositive: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalBlack) } + @objc open var colorAlwaysOnBgPositive: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalBlack) } - @objc open var colorAlwaysOnBackgroundInfo: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalBlack) } + @objc open var colorAlwaysOnBgInfo: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalBlack) } - @objc open var colorAlwaysOnBackgroundAccent: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalBlack) } + @objc open var colorAlwaysOnBgAccent: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalBlack) } // MARK: Semantic token - Colors - Transparent @@ -344,50 +345,38 @@ extension OUDSTheme: ColorSemanticTokens { @objc open var colorElevationRaised: ColorSemanticToken { MultipleColorTokens(light: ColorRawTokens.colorFunctionalWhite, dark: ColorRawTokens.colorFunctionalDarkGray800) } - @objc open var colorElevationRaisedOnBackgroundSecondary: ColorSemanticToken { MultipleColorTokens(light: ColorRawTokens.colorFunctionalWhite, dark: ColorRawTokens.colorFunctionalDarkGray720) } + @objc open var colorElevationRaisedOnBgSecondary: ColorSemanticToken { MultipleColorTokens(light: ColorRawTokens.colorFunctionalWhite, dark: ColorRawTokens.colorFunctionalDarkGray720) } - @objc open var colorElevationRaisedOnBackgroundEmphasized: ColorSemanticToken { MultipleColorTokens(light: ColorRawTokens.colorFunctionalDarkGray800, dark: ColorRawTokens.colorFunctionalDarkGray560) } + @objc open var colorElevationRaisedOnBgEmphasized: ColorSemanticToken { MultipleColorTokens(light: ColorRawTokens.colorFunctionalDarkGray800, dark: ColorRawTokens.colorFunctionalDarkGray560) } @objc open var colorElevationDrag: ColorSemanticToken { MultipleColorTokens(light: ColorRawTokens.colorFunctionalLightGray80, dark: ColorRawTokens.colorFunctionalDarkGray720) } - @objc open var colorElevationDragOnBackgroundSecondary: ColorSemanticToken { MultipleColorTokens(light: ColorRawTokens.colorFunctionalLightGray80, dark: ColorRawTokens.colorFunctionalDarkGray640) } + @objc open var colorElevationDragOnBgSecondary: ColorSemanticToken { MultipleColorTokens(light: ColorRawTokens.colorFunctionalLightGray80, dark: ColorRawTokens.colorFunctionalDarkGray640) } - @objc open var colorElevationDragOnBackgroundEmphasized: ColorSemanticToken { MultipleColorTokens(light: ColorRawTokens.colorFunctionalDarkGray720, dark: ColorRawTokens.colorFunctionalDarkGray480) } + @objc open var colorElevationDragOnBgEmphasized: ColorSemanticToken { MultipleColorTokens(light: ColorRawTokens.colorFunctionalDarkGray720, dark: ColorRawTokens.colorFunctionalDarkGray480) } @objc open var colorElevationOverlayDefault: ColorSemanticToken { MultipleColorTokens(light: ColorRawTokens.colorFunctionalWhite, dark: ColorRawTokens.colorFunctionalDarkGray720) } - @objc open var colorElevationOverlayDefaultOnBackgroundSecondary: ColorSemanticToken { MultipleColorTokens(light: ColorRawTokens.colorFunctionalWhite, dark: ColorRawTokens.colorFunctionalDarkGray640) } + @objc open var colorElevationOverlayDefaultOnBgSecondary: ColorSemanticToken { MultipleColorTokens(light: ColorRawTokens.colorFunctionalWhite, dark: ColorRawTokens.colorFunctionalDarkGray640) } - @objc open var colorElevationOverlayDefaultOnBackgroundEmphasized: ColorSemanticToken { MultipleColorTokens(light: ColorRawTokens.colorFunctionalDarkGray720, dark: ColorRawTokens.colorFunctionalDarkGray480) } + @objc open var colorElevationOverlayDefaultOnBgEmphasized: ColorSemanticToken { MultipleColorTokens(light: ColorRawTokens.colorFunctionalDarkGray720, dark: ColorRawTokens.colorFunctionalDarkGray480) } @objc open var colorElevationOverlayEmphasized: ColorSemanticToken { MultipleColorTokens(light: ColorRawTokens.colorFunctionalDarkGray640, dark: ColorRawTokens.colorFunctionalDarkGray480) } - @objc open var colorElevationOverlayEmphasizedOnBackgroundSecondary: ColorSemanticToken { MultipleColorTokens(light: ColorRawTokens.colorFunctionalDarkGray640, dark: ColorRawTokens.colorFunctionalDarkGray480) } + @objc open var colorElevationOverlayEmphasizedOnBgSecondary: ColorSemanticToken { MultipleColorTokens(light: ColorRawTokens.colorFunctionalDarkGray640, dark: ColorRawTokens.colorFunctionalDarkGray480) } - @objc open var colorElevationOverlayEmphasizedOnBackgroundEmphasized: ColorSemanticToken { MultipleColorTokens(light: ColorRawTokens.colorFunctionalLightGray80, dark: ColorRawTokens.colorFunctionalDarkGray480) } + @objc open var colorElevationOverlayEmphasizedOnBgEmphasized: ColorSemanticToken { MultipleColorTokens(light: ColorRawTokens.colorFunctionalLightGray80, dark: ColorRawTokens.colorFunctionalDarkGray480) } @objc open var colorElevationModal: ColorSemanticToken { MultipleColorTokens(light: ColorRawTokens.colorFunctionalWhite, dark: ColorRawTokens.colorFunctionalDarkGray640) } // MARK: Semantic token - Colors - Decorative // WARNING: #124 - Colors to use are part of Orange Theme so are not reachable at this level, as a workaround add raw values - @objc open var colorDecorativeBrandPrimary: ColorSemanticToken { fatalError("🤖 Raw token unavailable for colorDecorativeBrandPrimary!") } - - @objc open var colorDecorativeBrandPrimaryMuted: ColorSemanticToken { fatalError("🤖 No value defined for colorDecorativeBrandPrimaryMuted!") } - - @objc open var colorDecorativeBrandPrimaryEmphasized: ColorSemanticToken { fatalError("🤖 No value defined for colorDecorativeBrandPrimaryEmphasized!") } + @objc open var colorDecorativePrimary: ColorSemanticToken { fatalError("🤖 Raw token unavailable for colorDecorativePrimary!") } @objc open var colorDecorativeSecondary: ColorSemanticToken { MultipleColorTokens(light: ColorRawTokens.colorFunctionalBlack, dark: ColorRawTokens.colorFunctionalLightGray160) } - @objc open var colorDecorativeSecondaryMuted: ColorSemanticToken { fatalError("🤖 No value defined for colorDecorativeSecondaryMuted!") } - - @objc open var colorDecorativeSecondaryEmphasized: ColorSemanticToken { fatalError("🤖 No value defined for colorDecorativeSecondaryEmphasized!") } - - @objc open var colorDecorativeBrandTertiary: ColorSemanticToken { MultipleColorTokens(light: ColorRawTokens.colorFunctionalBlack, dark: ColorRawTokens.colorFunctionalDarkGray880) } - - @objc open var colorDecorativeBrandTertiaryMuted: ColorSemanticToken { fatalError("🤖 No value defined for colorDecorativeBrandTertiaryMuted!") } - - @objc open var colorDecorativeBrandTertiaryEmphasized: ColorSemanticToken { fatalError("🤖 No value defined for colorDecorativeBrandTertiaryEmphasized!") } + @objc open var colorDecorativeTertiary: ColorSemanticToken { MultipleColorTokens(light: ColorRawTokens.colorFunctionalBlack, dark: ColorRawTokens.colorFunctionalDarkGray880) } @objc open var colorDecorativeNeutralMuted: ColorSemanticToken { MultipleColorTokens(light: ColorRawTokens.colorFunctionalLightGray160, dark: ColorRawTokens.colorFunctionalDarkGray560) } @@ -425,23 +414,23 @@ extension OUDSTheme: ColorSemanticTokens { @objc open var colorDecorativeAccent5Emphasized: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorDecorativeShockingPink300) } - @objc open var colorDecorativeSkintTint100: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorDecorativeDeepPeach100) } + @objc open var colorDecorativeSkinTint100: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorDecorativeDeepPeach100) } - @objc open var colorDecorativeSkintTint200: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorDecorativeDeepPeach200) } + @objc open var colorDecorativeSkinTint200: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorDecorativeDeepPeach200) } - @objc open var colorDecorativeSkintTint300: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorDecorativeDeepPeach300) } + @objc open var colorDecorativeSkinTint300: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorDecorativeDeepPeach300) } - @objc open var colorDecorativeSkintTint400: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorDecorativeDeepPeach400) } + @objc open var colorDecorativeSkinTint400: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorDecorativeDeepPeach400) } - @objc open var colorDecorativeSkintTint500: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorDecorativeDeepPeach500) } + @objc open var colorDecorativeSkinTint500: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorDecorativeDeepPeach500) } - @objc open var colorDecorativeSkintTint600: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorDecorativeDeepPeach600) } + @objc open var colorDecorativeSkinTint600: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorDecorativeDeepPeach600) } - @objc open var colorDecorativeSkintTint700: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorDecorativeDeepPeach700) } + @objc open var colorDecorativeSkinTint700: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorDecorativeDeepPeach700) } - @objc open var colorDecorativeSkintTint800: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorDecorativeDeepPeach800) } + @objc open var colorDecorativeSkinTint800: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorDecorativeDeepPeach800) } - @objc open var colorDecorativeSkintTint900: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorDecorativeDeepPeach900) } + @objc open var colorDecorativeSkinTint900: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorDecorativeDeepPeach900) } // MARK: Semantic token - Colors - Chart diff --git a/OUDS/Core/OUDS/Sources/OUDSTheme/OUDSTheme+SemanticTokens/OUDSTheme+DimensionSemanticTokens.swift b/OUDS/Core/OUDS/Sources/OUDSTheme/OUDSTheme+SemanticTokens/OUDSTheme+DimensionSemanticTokens.swift index ee98cef5c..f588d2c67 100644 --- a/OUDS/Core/OUDS/Sources/OUDSTheme/OUDSTheme+SemanticTokens/OUDSTheme+DimensionSemanticTokens.swift +++ b/OUDS/Core/OUDS/Sources/OUDSTheme/OUDSTheme+SemanticTokens/OUDSTheme+DimensionSemanticTokens.swift @@ -17,6 +17,8 @@ import OUDSTokensSemantic // ଘ( ・ω・)_/゚・:*:・。☆ // [File to generate with 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. diff --git a/OUDS/Core/OUDS/Sources/OUDSTheme/OUDSTheme+SemanticTokens/OUDSTheme+ElevationCompositeSemanticTokens.swift b/OUDS/Core/OUDS/Sources/OUDSTheme/OUDSTheme+SemanticTokens/OUDSTheme+ElevationCompositeSemanticTokens.swift new file mode 100644 index 000000000..da6e61c52 --- /dev/null +++ b/OUDS/Core/OUDS/Sources/OUDSTheme/OUDSTheme+SemanticTokens/OUDSTheme+ElevationCompositeSemanticTokens.swift @@ -0,0 +1,49 @@ +// +// 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 with the tokenator with Figma able to output composites and tokenatoer able to manage them] +// 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 `ElevationCompositeSemanticTokens`. +/// These values can be overriden inside `OUDSTheme` subclasses (in extensions or not, in the same module or not) thanks to the `@objc open` combination. +/// The aim of this extensions is to make relationships between all semantic tokens for elevations and associated raw tokens. +/// `OUDSTheme` can be seen as a kind of "abstract class" in _object oriented paradigm_. +/// +/// It defines in fact box shadows effects. +extension OUDSTheme: ElevationCompositeSemanticTokens { + + // MARK: Semantic token - Elevation - Box shadow + + @objc open var elevationNone: ElevationCompositeSemanticToken { ElevationCompositeSemanticToken(ElevationRawTokens.elevationBottom_0) } + + @objc open var elevationRaised: ElevationCompositeSemanticToken { ElevationCompositeSemanticToken(ElevationRawTokens.elevationBottom_1_500) } + + @objc open var elevationDrag: ElevationCompositeSemanticToken { ElevationCompositeSemanticToken(ElevationRawTokens.elevationBottom_3_500) } + + @objc open var elevationOverlayDefault: ElevationCompositeSemanticToken { ElevationCompositeSemanticToken(ElevationRawTokens.elevationBottom_2_400) } + + @objc open var elevationOverlayEmphasized: ElevationCompositeSemanticToken { ElevationCompositeSemanticToken(ElevationRawTokens.elevationBottom_5_300) } + + @objc open var elevationStickyDefault: ElevationCompositeSemanticToken { + ElevationCompositeSemanticToken(ElevationRawTokens.elevationBottom_3_300) } + + @objc open var elevationStickyEmphasized: ElevationCompositeSemanticToken { ElevationCompositeSemanticToken(ElevationRawTokens.elevationBottom_3_300) } + + @objc open var elevationStickyNavigationScrolled: ElevationCompositeSemanticToken { ElevationCompositeSemanticToken(ElevationRawTokens.elevationBottom_3_300) } +} diff --git a/OUDS/Core/OUDS/Sources/OUDSTheme/OUDSTheme+SemanticTokens/OUDSTheme+ElevationSemanticTokens.swift b/OUDS/Core/OUDS/Sources/OUDSTheme/OUDSTheme+SemanticTokens/OUDSTheme+ElevationSemanticTokens.swift index 4bd1a2440..b05c67ffa 100644 --- a/OUDS/Core/OUDS/Sources/OUDSTheme/OUDSTheme+SemanticTokens/OUDSTheme+ElevationSemanticTokens.swift +++ b/OUDS/Core/OUDS/Sources/OUDSTheme/OUDSTheme+SemanticTokens/OUDSTheme+ElevationSemanticTokens.swift @@ -2,89 +2,50 @@ // 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 +// Software description: A SwiftUI components library with code examples for Orange Unified Design System // import Foundation import OUDSTokensRaw import OUDSTokensSemantic -// ଘ( ・ω・)_/゚・:*:・。☆ -// [File to generate with the tokenator] - -// swiftlint:disable line_length - -/// Defines basic values common to all themes for `ElevationSemanticTokenss`. -/// These values can be overriden inside `OUDSTheme` subclasses (in extensions or not, in the same module or not) thanks to the `@objc open` combination. -/// The aim of this extensions is to make relationships between all semantic tokens for elevations and associated raw tokens. -/// `OUDSTheme` can be seen as a kind of "abstract class" in _object oriented paradigm_. extension OUDSTheme: ElevationSemanticTokens { - - // MARK: Semantic token - Elevation - X - - @objc open var elevationXNone: ElevationXSemanticToken { ElevationRawTokens.elevationX0 } - @objc open var elevationXRaised: ElevationXSemanticToken { ElevationRawTokens.elevationX0 } + @objc open var elevationBlurDrag: ElevationBlurSemanticToken { ElevationRawTokens.elevationBlur400 } + @objc open var elevationBlurNone: ElevationBlurSemanticToken { ElevationRawTokens.elevationBlur0 } + @objc open var elevationBlurOverlayDefault: ElevationBlurSemanticToken { ElevationRawTokens.elevationBlur300 } + @objc open var elevationBlurOverlayEmphasized: ElevationBlurSemanticToken { ElevationRawTokens.elevationBlur600 } + @objc open var elevationBlurRaised: ElevationBlurSemanticToken { ElevationRawTokens.elevationBlur200 } + @objc open var elevationBlurStickyDefault: ElevationBlurSemanticToken { ElevationRawTokens.elevationBlur400 } + @objc open var elevationBlurStickyEmphasized: ElevationBlurSemanticToken { ElevationRawTokens.elevationBlur400 } + @objc open var elevationBlurStickyNavigationScrolled: ElevationBlurSemanticToken { ElevationRawTokens.elevationBlur400 } @objc open var elevationXDrag: ElevationXSemanticToken { ElevationRawTokens.elevationX0 } + @objc open var elevationXNone: ElevationXSemanticToken { ElevationRawTokens.elevationX0 } @objc open var elevationXOverlayDefault: ElevationXSemanticToken { ElevationRawTokens.elevationX0 } @objc open var elevationXOverlayEmphasized: ElevationXSemanticToken { ElevationRawTokens.elevationX0 } + @objc open var elevationXRaised: ElevationXSemanticToken { ElevationRawTokens.elevationX0 } @objc open var elevationXStickyDefault: ElevationXSemanticToken { ElevationRawTokens.elevationX0 } @objc open var elevationXStickyEmphasized: ElevationXSemanticToken { ElevationRawTokens.elevationX0 } @objc open var elevationXStickyNavigationScrolled: ElevationXSemanticToken { ElevationRawTokens.elevationX0 } - @objc open var elevationXFocus: ElevationXSemanticToken { ElevationRawTokens.elevationX0 } - - // MARK: Semantic token - Elevation - Y - - @objc open var elevationYNone: ElevationYSemanticToken { ElevationRawTokens.elevationY0 } - @objc open var elevationYRaised: ElevationYSemanticToken { ElevationRawTokens.elevationY100 } @objc open var elevationYDrag: ElevationYSemanticToken { ElevationRawTokens.elevationY300 } + @objc open var elevationYNone: ElevationYSemanticToken { ElevationRawTokens.elevationY0 } @objc open var elevationYOverlayDefault: ElevationYSemanticToken { ElevationRawTokens.elevationY200 } @objc open var elevationYOverlayEmphasized: ElevationYSemanticToken { ElevationRawTokens.elevationY500 } + @objc open var elevationYRaised: ElevationYSemanticToken { ElevationRawTokens.elevationY100 } @objc open var elevationYStickyDefault: ElevationYSemanticToken { ElevationRawTokens.elevationY300 } @objc open var elevationYStickyEmphasized: ElevationYSemanticToken { ElevationRawTokens.elevationY300 } @objc open var elevationYStickyNavigationScrolled: ElevationYSemanticToken { ElevationRawTokens.elevationY300 } - @objc open var elevationYFocus: ElevationYSemanticToken { ElevationRawTokens.elevationY0 } - - // MARK: Semantic token - Elevation - Blur - - @objc open var elevationBlurNone: ElevationBlurSemanticToken { ElevationRawTokens.elevationBlur0 } - @objc open var elevationBlurRaised: ElevationBlurSemanticToken { ElevationRawTokens.elevationBlur200 } - @objc open var elevationBlurDrag: ElevationBlurSemanticToken { ElevationRawTokens.elevationBlur400 } - @objc open var elevationBlurOverlayDefault: ElevationBlurSemanticToken { ElevationRawTokens.elevationBlur300 } - @objc open var elevationBlurOverlayEmphasized: ElevationBlurSemanticToken { ElevationRawTokens.elevationBlur600 } - @objc open var elevationBlurStickyDefault: ElevationBlurSemanticToken { ElevationRawTokens.elevationBlur400 } - @objc open var elevationBlurStickyEmphasized: ElevationBlurSemanticToken { ElevationRawTokens.elevationBlur400 } - @objc open var elevationBlurStickyNavigationScrolled: ElevationBlurSemanticToken { ElevationRawTokens.elevationBlur400 } - @objc open var elevationBlurFocus: ElevationBlurSemanticToken { ElevationRawTokens.elevationBlur0 } - - // MARK: Semantic token - Elevation - Color - - @objc open var elevationColorNone: ElevationColorSemanticToken { ElevationColorSemanticToken(ColorRawTokens.colorTransparentBlack0) } - @objc open var elevationColorRaised: ElevationColorSemanticToken { ElevationColorSemanticToken(ColorRawTokens.colorTransparentBlack500) } @objc open var elevationColorDrag: ElevationColorSemanticToken { ElevationColorSemanticToken(ColorRawTokens.colorTransparentBlack500) } + @objc open var elevationColorNone: ElevationColorSemanticToken { ElevationColorSemanticToken(ColorRawTokens.colorTransparentBlack0) } @objc open var elevationColorOverlayDefault: ElevationColorSemanticToken { ElevationColorSemanticToken(ColorRawTokens.colorTransparentBlack400) } @objc open var elevationColorOverlayEmphasized: ElevationColorSemanticToken { ElevationColorSemanticToken(ColorRawTokens.colorTransparentBlack300) } + @objc open var elevationColorRaised: ElevationColorSemanticToken { ElevationColorSemanticToken(ColorRawTokens.colorTransparentBlack500) } @objc open var elevationColorStickyDefault: ElevationColorSemanticToken { ElevationColorSemanticToken(ColorRawTokens.colorTransparentBlack300) } @objc open var elevationColorStickyEmphasized: ElevationColorSemanticToken { ElevationColorSemanticToken(ColorRawTokens.colorTransparentBlack300) } @objc open var elevationColorStickyNavigationScrolled: ElevationColorSemanticToken { ElevationColorSemanticToken(ColorRawTokens.colorTransparentBlack300) } - @objc open var elevationColorFocus: ElevationColorSemanticToken { ElevationColorSemanticToken(light: ColorRawTokens.colorFunctionalBlack, dark: ColorRawTokens.colorFunctionalLightGray160) } - - // MARK: Semantic token - Elevation - Box shadow - - @objc open var elevationNone: ElevationCompositeSemanticToken { ElevationCompositeSemanticToken(ElevationRawTokens.elevationBottom_0) } - @objc open var elevationRaised: ElevationCompositeSemanticToken { ElevationCompositeSemanticToken(ElevationRawTokens.elevationBottom_1_500) } - @objc open var elevationDrag: ElevationCompositeSemanticToken { ElevationCompositeSemanticToken(ElevationRawTokens.elevationBottom_3_500) } - @objc open var elevationOverlayDefault: ElevationCompositeSemanticToken { ElevationCompositeSemanticToken(ElevationRawTokens.elevationBottom_2_400) } - @objc open var elevationOverlayEmphasized: ElevationCompositeSemanticToken { ElevationCompositeSemanticToken(ElevationRawTokens.elevationBottom_5_300) } - @objc open var elevationStickyDefault: ElevationCompositeSemanticToken { ElevationCompositeSemanticToken(ElevationRawTokens.elevationBottom_3_300) } - @objc open var elevationStickyEmphasized: ElevationCompositeSemanticToken { ElevationCompositeSemanticToken(ElevationRawTokens.elevationBottom_3_300) } - @objc open var elevationStickyNavigationScrolled: ElevationCompositeSemanticToken { ElevationCompositeSemanticToken(ElevationRawTokens.elevationBottom_3_300) } - @objc open var elevationFocus: ElevationCompositeSemanticToken { ElevationCompositeSemanticToken(light: ElevationCompositeRawToken(x: 0, y: 0, blur: 0, color: ColorRawTokens.colorFunctionalBlack), dark: ElevationCompositeRawToken(x: 0, y: 0, blur: 0, color: ColorRawTokens.colorFunctionalLightGray160)) } } - -// swiftlint:enable line_length diff --git a/OUDS/Core/OUDS/Sources/OUDSTheme/OUDSTheme+SemanticTokens/OUDSTheme+GridSemanticTokens.swift b/OUDS/Core/OUDS/Sources/OUDSTheme/OUDSTheme+SemanticTokens/OUDSTheme+GridSemanticTokens.swift index 7fb858aad..9f39837dd 100644 --- a/OUDS/Core/OUDS/Sources/OUDSTheme/OUDSTheme+SemanticTokens/OUDSTheme+GridSemanticTokens.swift +++ b/OUDS/Core/OUDS/Sources/OUDSTheme/OUDSTheme+SemanticTokens/OUDSTheme+GridSemanticTokens.swift @@ -17,6 +17,8 @@ import OUDSTokensSemantic // ଘ( ・ω・)_/゚・:*:・。☆ // [File to generate with 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. diff --git a/OUDS/Core/OUDS/Sources/OUDSTheme/OUDSTheme+SemanticTokens/OUDSTheme+OpacitySemanticTokens.swift b/OUDS/Core/OUDS/Sources/OUDSTheme/OUDSTheme+SemanticTokens/OUDSTheme+OpacitySemanticTokens.swift index d898d8cbc..e45c2929f 100644 --- a/OUDS/Core/OUDS/Sources/OUDSTheme/OUDSTheme+SemanticTokens/OUDSTheme+OpacitySemanticTokens.swift +++ b/OUDS/Core/OUDS/Sources/OUDSTheme/OUDSTheme+SemanticTokens/OUDSTheme+OpacitySemanticTokens.swift @@ -15,17 +15,11 @@ import Foundation import OUDSTokensRaw import OUDSTokensSemantic -// ଘ( ・ω・)_/゚・:*:・。☆ -// [File to generate with the tokenator] - -/// Defines basic values common to all themes for `OpacitySemanticTokens`. -/// 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: OpacitySemanticTokens { - - @objc open var opacityTransparent: OpacitySemanticToken { OpacityRawTokens.opacity0 } - @objc open var opacityWeaker: OpacitySemanticToken { OpacityRawTokens.opacity100 } - @objc open var opacityWeak: OpacitySemanticToken { OpacityRawTokens.opacity300 } @objc open var opacityMedium: OpacitySemanticToken { OpacityRawTokens.opacity500 } - @objc open var opacityStrong: OpacitySemanticToken { OpacityRawTokens.opacity700 } @objc open var opacityOpaque: OpacitySemanticToken { OpacityRawTokens.opacity900 } + @objc open var opacityStrong: OpacitySemanticToken { OpacityRawTokens.opacity700 } + @objc open var opacityTransparent: OpacitySemanticToken { OpacityRawTokens.opacity0 } + @objc open var opacityWeak: OpacitySemanticToken { OpacityRawTokens.opacity300 } + @objc open var opacityWeaker: OpacitySemanticToken { OpacityRawTokens.opacity100 } } diff --git a/OUDS/Core/OUDS/Sources/OUDSTheme/OUDSTheme+SemanticTokens/OUDSTheme+SizeSemanticTokens.swift b/OUDS/Core/OUDS/Sources/OUDSTheme/OUDSTheme+SemanticTokens/OUDSTheme+SizeSemanticTokens.swift new file mode 100644 index 000000000..9eb8a3255 --- /dev/null +++ b/OUDS/Core/OUDS/Sources/OUDSTheme/OUDSTheme+SemanticTokens/OUDSTheme+SizeSemanticTokens.swift @@ -0,0 +1,99 @@ +// +// 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 with 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 `SizeSemanticTokens`. +/// 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: SizeSemanticTokens { + + // MARK: - Semantic token - Sizing - Icon with typography + + @objc open var sizeIconWithHeadingXLargeShort: MultipleSizeTokens { MultipleSizeTokens(compact: DimensionRawTokens.dimension550, regular: DimensionRawTokens.dimension650) } + @objc open var sizeIconWithHeadingXLargeMedium: MultipleSizeTokens { MultipleSizeTokens(compact: DimensionRawTokens.dimension600, regular: DimensionRawTokens.dimension700) } + @objc open var sizeIconWithHeadingXLargeTall: MultipleSizeTokens { MultipleSizeTokens(compact: DimensionRawTokens.dimension650, regular: DimensionRawTokens.dimension800) } + + @objc open var sizeIconWithHeadingLargeShort: MultipleSizeTokens { MultipleSizeTokens(compact: DimensionRawTokens.dimension500, regular: DimensionRawTokens.dimension550) } + @objc open var sizeIconWithHeadingLargeMedium: MultipleSizeTokens { MultipleSizeTokens(compact: DimensionRawTokens.dimension550, regular: DimensionRawTokens.dimension600) } + @objc open var sizeIconWithHeadingLargeTall: MultipleSizeTokens { MultipleSizeTokens(compact: DimensionRawTokens.dimension600, regular: DimensionRawTokens.dimension650) } + + @objc open var sizeIconWithHeadingMediumShort: MultipleSizeTokens { MultipleSizeTokens(compact: DimensionRawTokens.dimension400, regular: DimensionRawTokens.dimension500) } + @objc open var sizeIconWithHeadingMediumMedium: MultipleSizeTokens { MultipleSizeTokens(compact: DimensionRawTokens.dimension500, regular: DimensionRawTokens.dimension550) } + @objc open var sizeIconWithHeadingMediumTall: MultipleSizeTokens { MultipleSizeTokens(compact: DimensionRawTokens.dimension550, regular: DimensionRawTokens.dimension600) } + + @objc open var sizeIconWithHeadingSmallShort: MultipleSizeTokens { MultipleSizeTokens(DimensionRawTokens.dimension400) } + @objc open var sizeIconWithHeadingSmallMedium: MultipleSizeTokens { MultipleSizeTokens(DimensionRawTokens.dimension500) } + @objc open var sizeIconWithHeadingSmallTall: MultipleSizeTokens { MultipleSizeTokens(DimensionRawTokens.dimension550) } + + @objc open var sizeIconWithBodyLargeShort: MultipleSizeTokens { MultipleSizeTokens(DimensionRawTokens.dimension250) } + @objc open var sizeIconWithBodyLargeMedium: MultipleSizeTokens { MultipleSizeTokens(DimensionRawTokens.dimension300) } + @objc open var sizeIconWithBodyLargeTall: MultipleSizeTokens { MultipleSizeTokens(DimensionRawTokens.dimension350) } + + @objc open var sizeIconWithBodyMediumShort: MultipleSizeTokens { MultipleSizeTokens(DimensionRawTokens.dimension200) } + @objc open var sizeIconWithBodyMediumMedium: MultipleSizeTokens { MultipleSizeTokens(DimensionRawTokens.dimension250) } + @objc open var sizeIconWithBodyMediumTall: MultipleSizeTokens { MultipleSizeTokens(DimensionRawTokens.dimension300) } + + @objc open var sizeIconWithBodySmallShort: MultipleSizeTokens { MultipleSizeTokens(DimensionRawTokens.dimension150) } + @objc open var sizeIconWithBodySmallMedium: MultipleSizeTokens { MultipleSizeTokens(DimensionRawTokens.dimension200) } + @objc open var sizeIconWithBodySmallTall: MultipleSizeTokens { MultipleSizeTokens(DimensionRawTokens.dimension250) } + + @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 } + + // MARK: - Semantic token - Sizing - Icon decorative + + @objc open var sizeIconDecorativeShortest: SizeSemanticToken { DimensionRawTokens.dimension200 } + @objc open var sizeIconDecorativeShorter: SizeSemanticToken { DimensionRawTokens.dimension300 } + @objc open var sizeIconDecorativeShort: SizeSemanticToken { DimensionRawTokens.dimension400 } + @objc open var sizeIconDecorativeMedium: SizeSemanticToken { DimensionRawTokens.dimension500 } + @objc open var sizeIconDecorativeTall: SizeSemanticToken { DimensionRawTokens.dimension600 } + @objc open var sizeIconDecorativeTaller: SizeSemanticToken { DimensionRawTokens.dimension700 } + @objc open var sizeIconDecorativeTallest: SizeSemanticToken { DimensionRawTokens.dimension900 } + + // MARK: - Semantic token - Sizing - Max width typography + + @objc open var sizeMaxWidthTypeDisplaySmall: MultipleSizeTokens { MultipleSizeTokens(DimensionRawTokens.dimension9000) } + @objc open var sizeMaxWidthTypeDisplayMedium: MultipleSizeTokens { MultipleSizeTokens(DimensionRawTokens.dimension9000) } + @objc open var sizeMaxWidthTypeDisplayLarge: MultipleSizeTokens { MultipleSizeTokens(DimensionRawTokens.dimension9000) } + + @objc open var sizeMaxWidthTypeHeadingXLarge: MultipleSizeTokens { MultipleSizeTokens(DimensionRawTokens.dimension9000) } + @objc open var sizeMaxWidthTypeHeadingLarge: MultipleSizeTokens { MultipleSizeTokens(DimensionRawTokens.dimension9000) } + @objc open var sizeMaxWidthTypeHeadingMedium: MultipleSizeTokens { MultipleSizeTokens(DimensionRawTokens.dimension9000) } + @objc open var sizeMaxWidthTypeHeadingSmall: MultipleSizeTokens { MultipleSizeTokens(DimensionRawTokens.dimension6000) } + + @objc open var sizeMaxWidthTypeBodySmall: MultipleSizeTokens { MultipleSizeTokens(DimensionRawTokens.dimension6000) } + @objc open var sizeMaxWidthTypeBodyMedium: MultipleSizeTokens { MultipleSizeTokens(DimensionRawTokens.dimension6000) } + @objc open var sizeMaxWidthTypeBodyLarge: MultipleSizeTokens { MultipleSizeTokens(DimensionRawTokens.dimension6000) } +} diff --git a/OUDS/Core/OUDS/Sources/OUDSTheme/OUDSTheme+SemanticTokens/OUDSTheme+SizingSemanticTokens.swift b/OUDS/Core/OUDS/Sources/OUDSTheme/OUDSTheme+SemanticTokens/OUDSTheme+SizingSemanticTokens.swift deleted file mode 100644 index e2975b5fa..000000000 --- a/OUDS/Core/OUDS/Sources/OUDSTheme/OUDSTheme+SemanticTokens/OUDSTheme+SizingSemanticTokens.swift +++ /dev/null @@ -1,101 +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 with the tokenator] - -// swiftlint:disable line_length - -/// Defines basic values common to all themes for `SizingSemanticTokens`. -/// 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: SizingSemanticTokens { - - // MARK: - Semantic token - Sizing - Icon with typography - - @objc open var sizeIconWithHeadingXLargeShort: MultipleSizingTokens { MultipleSizingTokens(compact: DimensionRawTokens.dimension550, regular: DimensionRawTokens.dimension650) } - @objc open var sizeIconWithHeadingXLargeMedium: MultipleSizingTokens { MultipleSizingTokens(compact: DimensionRawTokens.dimension600, regular: DimensionRawTokens.dimension700) } - @objc open var sizeIconWithHeadingXLargeTall: MultipleSizingTokens { MultipleSizingTokens(compact: DimensionRawTokens.dimension650, regular: DimensionRawTokens.dimension800) } - - @objc open var sizeIconWithHeadingLargeShort: MultipleSizingTokens { MultipleSizingTokens(compact: DimensionRawTokens.dimension500, regular: DimensionRawTokens.dimension550) } - @objc open var sizeIconWithHeadingLargeMedium: MultipleSizingTokens { MultipleSizingTokens(compact: DimensionRawTokens.dimension550, regular: DimensionRawTokens.dimension600) } - @objc open var sizeIconWithHeadingLargeTall: MultipleSizingTokens { MultipleSizingTokens(compact: DimensionRawTokens.dimension600, regular: DimensionRawTokens.dimension650) } - - @objc open var sizeIconWithHeadingMediumShort: MultipleSizingTokens { MultipleSizingTokens(compact: DimensionRawTokens.dimension400, regular: DimensionRawTokens.dimension500) } - @objc open var sizeIconWithHeadingMediumMedium: MultipleSizingTokens { MultipleSizingTokens(compact: DimensionRawTokens.dimension500, regular: DimensionRawTokens.dimension550) } - @objc open var sizeIconWithHeadingMediumTall: MultipleSizingTokens { MultipleSizingTokens(compact: DimensionRawTokens.dimension550, regular: DimensionRawTokens.dimension600) } - - @objc open var sizeIconWithHeadingSmallShort: MultipleSizingTokens { MultipleSizingTokens(DimensionRawTokens.dimension400) } - @objc open var sizeIconWithHeadingSmallMedium: MultipleSizingTokens { MultipleSizingTokens(DimensionRawTokens.dimension500) } - @objc open var sizeIconWithHeadingSmallTall: MultipleSizingTokens { MultipleSizingTokens(DimensionRawTokens.dimension550) } - - @objc open var sizeIconWithBodyLargeShort: MultipleSizingTokens { MultipleSizingTokens(DimensionRawTokens.dimension250) } - @objc open var sizeIconWithBodyLargeMedium: MultipleSizingTokens { MultipleSizingTokens(DimensionRawTokens.dimension300) } - @objc open var sizeIconWithBodyLargeTall: MultipleSizingTokens { MultipleSizingTokens(DimensionRawTokens.dimension350) } - - @objc open var sizeIconWithBodyMediumShort: MultipleSizingTokens { MultipleSizingTokens(DimensionRawTokens.dimension200) } - @objc open var sizeIconWithBodyMediumMedium: MultipleSizingTokens { MultipleSizingTokens(DimensionRawTokens.dimension250) } - @objc open var sizeIconWithBodyMediumTall: MultipleSizingTokens { MultipleSizingTokens(DimensionRawTokens.dimension300) } - - @objc open var sizeIconWithBodySmallShort: MultipleSizingTokens { MultipleSizingTokens(DimensionRawTokens.dimension150) } - @objc open var sizeIconWithBodySmallMedium: MultipleSizingTokens { MultipleSizingTokens(DimensionRawTokens.dimension200) } - @objc open var sizeIconWithBodySmallTall: MultipleSizingTokens { MultipleSizingTokens(DimensionRawTokens.dimension250) } - - @objc open var sizeIconWithLabelXLargeSizeShort: SizingSemanticToken { dimensionXS } - @objc open var sizeIconWithLabelXLargeSizeMedium: SizingSemanticToken { dimensionMD } - @objc open var sizeIconWithLabelXLargeSizeTall: SizingSemanticToken { dimensionLG } - - @objc open var sizeIconWithLabelLargeSizeShorter: SizingSemanticToken { dimension4XS } - @objc open var sizeIconWithLabelLargeSizeShort: SizingSemanticToken { dimension3XS } - @objc open var sizeIconWithLabelLargeSizeMedium: SizingSemanticToken { dimension2XS } - @objc open var sizeIconWithLabelLargeSizeTall: SizingSemanticToken { dimensionXS } - @objc open var sizeIconWithLabelLargeSizeTaller: SizingSemanticToken { dimensionLG } - - @objc open var sizeIconWithLabelMediumSizeShort: SizingSemanticToken { dimension5XS } - @objc open var sizeIconWithLabelMediumSizeMedium: SizingSemanticToken { dimension4XS } - @objc open var sizeIconWithLabelMediumSizeTall: SizingSemanticToken { dimension3XS } - - @objc open var sizeIconWithLabelSmallSizeShort: SizingSemanticToken { dimension6XS } - @objc open var sizeIconWithLabelSmallSizeMedium: SizingSemanticToken { dimension5XS } - @objc open var sizeIconWithLabelSmallSizeTall: SizingSemanticToken { dimension4XS } - - // MARK: - Semantic token - Sizing - Icon decorative - - @objc open var sizeIconDecorativeShortest: SizingSemanticToken { DimensionRawTokens.dimension200 } - @objc open var sizeIconDecorativeShorter: SizingSemanticToken { DimensionRawTokens.dimension300 } - @objc open var sizeIconDecorativeShort: SizingSemanticToken { DimensionRawTokens.dimension400 } - @objc open var sizeIconDecorativeMedium: SizingSemanticToken { DimensionRawTokens.dimension500 } - @objc open var sizeIconDecorativeTall: SizingSemanticToken { DimensionRawTokens.dimension600 } - @objc open var sizeIconDecorativeTaller: SizingSemanticToken { DimensionRawTokens.dimension700 } - @objc open var sizeIconDecorativeTallest: SizingSemanticToken { DimensionRawTokens.dimension900 } - - // MARK: - Semantic token - Sizing - Max width typography - - @objc open var sizeMaxWidthTypeDisplaySmall: MultipleSizingTokens { MultipleSizingTokens(DimensionRawTokens.dimension9000) } - @objc open var sizeMaxWidthTypeDisplayMedium: MultipleSizingTokens { MultipleSizingTokens(DimensionRawTokens.dimension9000) } - @objc open var sizeMaxWidthTypeDisplayLarge: MultipleSizingTokens { MultipleSizingTokens(DimensionRawTokens.dimension9000) } - - @objc open var sizeMaxWidthTypeHeadingXLarge: MultipleSizingTokens { MultipleSizingTokens(DimensionRawTokens.dimension9000) } - @objc open var sizeMaxWidthTypeHeadingLarge: MultipleSizingTokens { MultipleSizingTokens(DimensionRawTokens.dimension9000) } - @objc open var sizeMaxWidthTypeHeadingMedium: MultipleSizingTokens { MultipleSizingTokens(DimensionRawTokens.dimension9000) } - @objc open var sizeMaxWidthTypeHeadingSmall: MultipleSizingTokens { MultipleSizingTokens(DimensionRawTokens.dimension6000) } - - @objc open var sizeMaxWidthTypeBodySmall: MultipleSizingTokens { MultipleSizingTokens(DimensionRawTokens.dimension6000) } - @objc open var sizeMaxWidthTypeBodyMedium: MultipleSizingTokens { MultipleSizingTokens(DimensionRawTokens.dimension6000) } - @objc open var sizeMaxWidthTypeBodyLarge: MultipleSizingTokens { MultipleSizingTokens(DimensionRawTokens.dimension6000) } -} - -// swiftlint:enable line_length diff --git a/OUDS/Core/OUDS/Sources/OUDSTheme/OUDSTheme+SemanticTokens/OUDSTheme+SpaceSemanticTokens.swift b/OUDS/Core/OUDS/Sources/OUDSTheme/OUDSTheme+SemanticTokens/OUDSTheme+SpaceSemanticTokens.swift new file mode 100644 index 000000000..f6c42e129 --- /dev/null +++ b/OUDS/Core/OUDS/Sources/OUDSTheme/OUDSTheme+SemanticTokens/OUDSTheme+SpaceSemanticTokens.swift @@ -0,0 +1,152 @@ +// +// 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 with 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 `SpaceSemanticTokens`. +/// 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: SpaceSemanticTokens { + + // MARK: Semantic token - Spacing - Layout fluid + + @objc open var spaceScaledNone: MultipleSpaceTokens { MultipleSpaceTokens(compact: DimensionRawTokens.dimension0, regular: DimensionRawTokens.dimension0) } + @objc open var spaceScaledSmash: MultipleSpaceTokens { MultipleSpaceTokens(compact: DimensionRawTokens.dimension25, regular: DimensionRawTokens.dimension50) } + @objc open var spaceScaledShortest: MultipleSpaceTokens { MultipleSpaceTokens(compact: DimensionRawTokens.dimension50, regular: DimensionRawTokens.dimension100) } + @objc open var spaceScaledShorter: MultipleSpaceTokens { MultipleSpaceTokens(compact: DimensionRawTokens.dimension100, regular: DimensionRawTokens.dimension150) } + @objc open var spaceScaledShort: MultipleSpaceTokens { MultipleSpaceTokens(compact: DimensionRawTokens.dimension150, regular: DimensionRawTokens.dimension200) } + @objc open var spaceScaledMedium: MultipleSpaceTokens { MultipleSpaceTokens(compact: DimensionRawTokens.dimension200, regular: DimensionRawTokens.dimension300) } + @objc open var spaceScaledTall: MultipleSpaceTokens { MultipleSpaceTokens(compact: DimensionRawTokens.dimension300, regular: DimensionRawTokens.dimension400) } + @objc open var spaceScaledTaller: MultipleSpaceTokens { MultipleSpaceTokens(compact: DimensionRawTokens.dimension400, regular: DimensionRawTokens.dimension500) } + @objc open var spaceScaledTallest: MultipleSpaceTokens { MultipleSpaceTokens(compact: DimensionRawTokens.dimension500, regular: DimensionRawTokens.dimension600) } + @objc open var spaceScaledSpacious: MultipleSpaceTokens { MultipleSpaceTokens(compact: DimensionRawTokens.dimension600, regular: DimensionRawTokens.dimension700) } + + // MARK: Semantic token - Spacing - Layout fix + + @objc open var spaceFixedNone: SpaceSemanticToken { DimensionRawTokens.dimension0 } + @objc open var spaceFixedSmash: SpaceSemanticToken { DimensionRawTokens.dimension25 } + @objc open var spaceFixedShortest: SpaceSemanticToken { DimensionRawTokens.dimension50 } + @objc open var spaceFixedShorter: SpaceSemanticToken { DimensionRawTokens.dimension100 } + @objc open var spaceFixedShort: SpaceSemanticToken { DimensionRawTokens.dimension150 } + @objc open var spaceFixedMedium: SpaceSemanticToken { DimensionRawTokens.dimension200 } + @objc open var spaceFixedTall: SpaceSemanticToken { DimensionRawTokens.dimension300 } + @objc open var spaceFixedTaller: SpaceSemanticToken { DimensionRawTokens.dimension400 } + @objc open var spaceFixedTallest: SpaceSemanticToken { DimensionRawTokens.dimension500 } + @objc open var spaceFixedSpacious: SpaceSemanticToken { DimensionRawTokens.dimension600 } + @objc open var spaceFixedHuge: SpaceSemanticToken { DimensionRawTokens.dimension700 } + @objc open var spaceFixedJumbo: SpaceSemanticToken { DimensionRawTokens.dimension800 } + + // MARK: Semantic token - Spacing - Padding - Padding inline + + @objc open var spacePaddingInlineNone: SpacePaddingInlineSemanticToken { DimensionRawTokens.dimension0 } + @objc open var spacePaddingInlineShorter: SpacePaddingInlineSemanticToken { DimensionRawTokens.dimension50 } + @objc open var spacePaddingInlineShort: SpacePaddingInlineSemanticToken { DimensionRawTokens.dimension100 } + @objc open var spacePaddingInlineMedium: SpacePaddingInlineSemanticToken { DimensionRawTokens.dimension200 } + @objc open var spacePaddingInlineTall: SpacePaddingInlineSemanticToken { DimensionRawTokens.dimension300 } + @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 } + + // 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 } + + // 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 } + + // 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 } + + // 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 } +} diff --git a/OUDS/Core/OUDS/Sources/OUDSTheme/OUDSTheme+SemanticTokens/OUDSTheme+SpacingSemanticTokens.swift b/OUDS/Core/OUDS/Sources/OUDSTheme/OUDSTheme+SemanticTokens/OUDSTheme+SpacingSemanticTokens.swift deleted file mode 100644 index 00473ec23..000000000 --- a/OUDS/Core/OUDS/Sources/OUDSTheme/OUDSTheme+SemanticTokens/OUDSTheme+SpacingSemanticTokens.swift +++ /dev/null @@ -1,150 +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 with the tokenator] - -/// Defines basic values common to all themes for `SpacingSemanticTokens`. -/// 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: SpacingSemanticTokens { - - // MARK: Semantic token - Spacing - Layout fluid - - @objc open var spaceScaledNone: MultipleSpacingTokens { MultipleSpacingTokens(compact: DimensionRawTokens.dimension0, regular: DimensionRawTokens.dimension0) } - @objc open var spaceScaledSmash: MultipleSpacingTokens { MultipleSpacingTokens(compact: DimensionRawTokens.dimension25, regular: DimensionRawTokens.dimension50) } - @objc open var spaceScaledShortest: MultipleSpacingTokens { MultipleSpacingTokens(compact: DimensionRawTokens.dimension50, regular: DimensionRawTokens.dimension100) } - @objc open var spaceScaledShorter: MultipleSpacingTokens { MultipleSpacingTokens(compact: DimensionRawTokens.dimension100, regular: DimensionRawTokens.dimension150) } - @objc open var spaceScaledShort: MultipleSpacingTokens { MultipleSpacingTokens(compact: DimensionRawTokens.dimension150, regular: DimensionRawTokens.dimension200) } - @objc open var spaceScaledMedium: MultipleSpacingTokens { MultipleSpacingTokens(compact: DimensionRawTokens.dimension200, regular: DimensionRawTokens.dimension300) } - @objc open var spaceScaledTall: MultipleSpacingTokens { MultipleSpacingTokens(compact: DimensionRawTokens.dimension300, regular: DimensionRawTokens.dimension400) } - @objc open var spaceScaledTaller: MultipleSpacingTokens { MultipleSpacingTokens(compact: DimensionRawTokens.dimension400, regular: DimensionRawTokens.dimension500) } - @objc open var spaceScaledTallest: MultipleSpacingTokens { MultipleSpacingTokens(compact: DimensionRawTokens.dimension500, regular: DimensionRawTokens.dimension600) } - @objc open var spaceScaledSpacious: MultipleSpacingTokens { MultipleSpacingTokens(compact: DimensionRawTokens.dimension600, regular: DimensionRawTokens.dimension700) } - - // MARK: Semantic token - Spacing - Layout fix - - @objc open var spaceFixedNone: SpacingSemanticToken { DimensionRawTokens.dimension0 } - @objc open var spaceFixedSmash: SpacingSemanticToken { DimensionRawTokens.dimension25 } - @objc open var spaceFixedShortest: SpacingSemanticToken { DimensionRawTokens.dimension50 } - @objc open var spaceFixedShorter: SpacingSemanticToken { DimensionRawTokens.dimension100 } - @objc open var spaceFixedShort: SpacingSemanticToken { DimensionRawTokens.dimension150 } - @objc open var spaceFixedMedium: SpacingSemanticToken { DimensionRawTokens.dimension200 } - @objc open var spaceFixedTall: SpacingSemanticToken { DimensionRawTokens.dimension300 } - @objc open var spaceFixedTaller: SpacingSemanticToken { DimensionRawTokens.dimension400 } - @objc open var spaceFixedTallest: SpacingSemanticToken { DimensionRawTokens.dimension500 } - @objc open var spaceFixedSpacious: SpacingSemanticToken { DimensionRawTokens.dimension600 } - @objc open var spaceFixedHuge: SpacingSemanticToken { DimensionRawTokens.dimension700 } - @objc open var spaceFixedJumbo: SpacingSemanticToken { DimensionRawTokens.dimension800 } - - // MARK: Semantic token - Spacing - Padding - Padding inline - - @objc open var spacePaddingInlineNone: SpacingPaddingInlineSemanticToken { DimensionRawTokens.dimension0 } - @objc open var spacePaddingInlineShorter: SpacingPaddingInlineSemanticToken { DimensionRawTokens.dimension50 } - @objc open var spacePaddingInlineShort: SpacingPaddingInlineSemanticToken { DimensionRawTokens.dimension100 } - @objc open var spacePaddingInlineMedium: SpacingPaddingInlineSemanticToken { DimensionRawTokens.dimension200 } - @objc open var spacePaddingInlineTall: SpacingPaddingInlineSemanticToken { DimensionRawTokens.dimension300 } - @objc open var spacePaddingInlineTaller: SpacingPaddingInlineSemanticToken { DimensionRawTokens.dimension350 } - @objc open var spacePaddingInlineTallest: SpacingPaddingInlineSemanticToken { DimensionRawTokens.dimension400 } - - @objc open var spacePaddingInlineWithIconNone: SpacingPaddingInlineSemanticToken { dimensionNone } - @objc open var spacePaddingInlineWithIconShortest: SpacingPaddingInlineSemanticToken { dimension10XS } - @objc open var spacePaddingInlineWithIconShorter: SpacingPaddingInlineSemanticToken { dimension9XS } - @objc open var spacePaddingInlineWithIconShort: SpacingPaddingInlineSemanticToken { dimension7XS } - @objc open var spacePaddingInlineWithIconMedium: SpacingPaddingInlineSemanticToken { dimension5XS } - @objc open var spacePaddingInlineWithIconTall: SpacingPaddingInlineSemanticToken { dimension4XS } - @objc open var spacePaddingInlineWithIconTaller: SpacingPaddingInlineSemanticToken { dimension3XS } - @objc open var spacePaddingInlineWithIconTallest: SpacingPaddingInlineSemanticToken { dimension2XS } - - @objc open var spacePaddingInlineWithArrowNone: SpacingPaddingInlineSemanticToken { dimensionNone } - @objc open var spacePaddingInlineWithArrowShortest: SpacingPaddingInlineSemanticToken { dimension10XS } - @objc open var spacePaddingInlineWithArrowShorter: SpacingPaddingInlineSemanticToken { dimension9XS } - @objc open var spacePaddingInlineWithArrowShort: SpacingPaddingInlineSemanticToken { dimension8XS } - @objc open var spacePaddingInlineWithArrowMedium: SpacingPaddingInlineSemanticToken { dimension7XS } - @objc open var spacePaddingInlineWithArrowTall: SpacingPaddingInlineSemanticToken { dimension5XS } - @objc open var spacePaddingInlineWithArrowTaller: SpacingPaddingInlineSemanticToken { dimension4XS } - @objc open var spacePaddingInlineWithArrowTallest: SpacingPaddingInlineSemanticToken { dimension3XS } - - // MARK: Semantic token - Padding - Padding stack - - @objc open var spacePaddingBlockNone: SpacingPaddingInlineSemanticToken { dimensionNone } - @objc open var spacePaddingBlockShorter: SpacingPaddingInlineSemanticToken { dimension9XS } - @objc open var spacePaddingBlockShort: SpacingPaddingInlineSemanticToken { dimension7XS } - @objc open var spacePaddingBlockMedium: SpacingPaddingInlineSemanticToken { dimension6XS } - @objc open var spacePaddingBlockTall: SpacingPaddingInlineSemanticToken { dimension5XS } - @objc open var spacePaddingBlockTaller: SpacingPaddingInlineSemanticToken { dimension3XS } - @objc open var spacePaddingBlockTallest: SpacingPaddingInlineSemanticToken { dimensionXS } - - @objc open var spacePaddingBlockWithIconNone: SpacingPaddingInlineSemanticToken { dimensionNone } - @objc open var spacePaddingBlockWithIconShortest: SpacingPaddingInlineSemanticToken { dimension10XS } - @objc open var spacePaddingBlockWithIconShorter: SpacingPaddingInlineSemanticToken { dimension9XS } - @objc open var spacePaddingBlockWithIconShort: SpacingPaddingInlineSemanticToken { dimension8XS } - @objc open var spacePaddingBlockWithIconMedium: SpacingPaddingInlineSemanticToken { dimension7XS } - @objc open var spacePaddingBlockWithIconTall: SpacingPaddingInlineSemanticToken { dimension6XS } - @objc open var spacePaddingBlockWithIconTaller: SpacingPaddingInlineSemanticToken { dimension5XS } - - // MARK: Semantic token - Space - Padding inset - - @objc open var spaceInsetNone: SpacingPaddingInlineSemanticToken { dimensionNone } - @objc open var spaceInsetSmash: SpacingPaddingInlineSemanticToken { dimension10XS } - @objc open var spaceInsetShortest: SpacingPaddingInlineSemanticToken { dimension9XS } - @objc open var spaceInsetShorter: SpacingPaddingInlineSemanticToken { dimension8XS } - @objc open var spaceInsetShort: SpacingPaddingInlineSemanticToken { dimension7XS } - @objc open var spaceInsetMedium: SpacingPaddingInlineSemanticToken { dimension6XS } - @objc open var spaceInsetTall: SpacingPaddingInlineSemanticToken { dimension5XS } - @objc open var spaceInsetTaller: SpacingPaddingInlineSemanticToken { dimension3XS } - @objc open var spaceInsetTallest: SpacingPaddingInlineSemanticToken { dimensionXS } - @objc open var spaceInsetSpacious: SpacingPaddingInlineSemanticToken { dimensionMD } - - // MARK: Semantic token - Padding - Gap inline - - @objc open var spaceColumnGapNone: SpacingPaddingInlineSemanticToken { dimensionNone } - @objc open var spaceColumnGapShorter: SpacingPaddingInlineSemanticToken { dimension9XS } - @objc open var spaceColumnGapShort: SpacingPaddingInlineSemanticToken { dimension7XS } - @objc open var spaceColumnGapMedium: SpacingPaddingInlineSemanticToken { dimension5XS } - @objc open var spaceColumnGapTall: SpacingPaddingInlineSemanticToken { dimension3XS } - @objc open var spaceColumnGapTaller: SpacingPaddingInlineSemanticToken { dimensionXS } - - @objc open var spaceColumnGapWithIconNone: SpacingPaddingInlineSemanticToken { dimensionNone } - @objc open var spaceColumnGapWithIconShortest: SpacingPaddingInlineSemanticToken { dimension10XS } - @objc open var spaceColumnGapWithIconShorter: SpacingPaddingInlineSemanticToken { dimension9XS } - @objc open var spaceColumnGapWithIconShort: SpacingPaddingInlineSemanticToken { dimension8XS } - @objc open var spaceColumnGapWithIconMedium: SpacingPaddingInlineSemanticToken { dimension7XS } - @objc open var spaceColumnGapWithIconTall: SpacingPaddingInlineSemanticToken { dimension5XS } - - @objc open var spaceColumnGapWithArrowNone: SpacingPaddingInlineSemanticToken { dimensionNone } - @objc open var spaceColumnGapWithArrowShortest: SpacingPaddingInlineSemanticToken { dimension10XS } - @objc open var spaceColumnGapWithArrowShorter: SpacingPaddingInlineSemanticToken { dimension9XS } - @objc open var spaceColumnGapWithArrowShort: SpacingPaddingInlineSemanticToken { dimension8XS } - @objc open var spaceColumnGapWithArrowMedium: SpacingPaddingInlineSemanticToken { dimension7XS } - @objc open var spaceColumnGapWithArrowTall: SpacingPaddingInlineSemanticToken { dimension5XS } - - // MARK: Semantic token - Padding - Gap stack - - @objc open var spaceRowGapNone: SpacingGapStackSemanticToken { dimensionNone } - @objc open var spaceRowGapShortest: SpacingGapStackSemanticToken { dimension10XS } - @objc open var spaceRowGapShorter: SpacingGapStackSemanticToken { dimension9XS } - @objc open var spaceRowGapShort: SpacingGapStackSemanticToken { dimension8XS } - @objc open var spaceRowGapMedium: SpacingGapStackSemanticToken { dimension7XS } - @objc open var spaceRowGapTall: SpacingGapStackSemanticToken { dimension5XS } - - @objc open var spaceRowGapWithIconNone: SpacingGapStackSemanticToken { dimensionNone } - @objc open var spaceRowGapWithIconShortest: SpacingGapStackSemanticToken { dimension10XS } - @objc open var spaceRowGapWithIconShorter: SpacingGapStackSemanticToken { dimension9XS } - @objc open var spaceRowGapWithIconShort: SpacingGapStackSemanticToken { dimension8XS } - @objc open var spaceRowGapWithIconMedium: SpacingGapStackSemanticToken { dimension7XS } - @objc open var spaceRowGapWithIconTall: SpacingGapStackSemanticToken { dimension5XS } -} diff --git a/OUDS/Core/OUDS/Sources/OUDSTheme/OUDSTheme+SemanticTokens/OUDSTheme+TypographyCompositeSemanticTokens.swift b/OUDS/Core/OUDS/Sources/OUDSTheme/OUDSTheme+SemanticTokens/OUDSTheme+TypographyCompositeSemanticTokens.swift new file mode 100644 index 000000000..0fcce8c85 --- /dev/null +++ b/OUDS/Core/OUDS/Sources/OUDSTheme/OUDSTheme+SemanticTokens/OUDSTheme+TypographyCompositeSemanticTokens.swift @@ -0,0 +1,71 @@ +// +// 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 with the tokenator with Figma able to output composites and tokenatoer able to manage them] +// 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 line_length + +/// Defines basic values common to all themes for `TypographyCompositeSemanticTokens`. +/// These values can be overriden inside `OUDSTheme` subclasses (in extensions or not, in the same module or not) thanks to the `@objc open` combination. +/// The aim of this extensions is to make relationships between all composite semantic tokens for typography and associated composite raw tokens. +/// `OUDSTheme` can be seen as a kind of "abstract class" in _object oriented paradigm_. +/// +extension OUDSTheme: TypographyCompositeSemanticTokens { + + // MARK: - Semantic tokens - Typography - Composites - Display + + @objc open var typeDisplayLarge: MultipleTypographyTokens { MultipleTypographyTokens(compact: TypographyRawTokens.typeBold850, regular: TypographyRawTokens.typeBold1450) } + @objc open var typeDisplayMedium: MultipleTypographyTokens { MultipleTypographyTokens(compact: TypographyRawTokens.typeBold750, regular: TypographyRawTokens.typeBold1050) } + @objc open var typeDisplaySmall: MultipleTypographyTokens { MultipleTypographyTokens(compact: TypographyRawTokens.typeBold650, regular: TypographyRawTokens.typeBold850) } + + // MARK: - Semantic tokens - Typography - Composites - Heading + + @objc open var typeHeadingXLarge: MultipleTypographyTokens { MultipleTypographyTokens(compact: TypographyRawTokens.typeBold550, regular: TypographyRawTokens.typeBold750) } + @objc open var typeHeadingLarge: MultipleTypographyTokens { MultipleTypographyTokens(compact: TypographyRawTokens.typeBold450, regular: TypographyRawTokens.typeBold550) } + @objc open var typeHeadingMedium: MultipleTypographyTokens { MultipleTypographyTokens(compact: TypographyRawTokens.typeBold350, regular: TypographyRawTokens.typeBold450) } + @objc open var typeHeadingSmall: MultipleTypographyTokens { MultipleTypographyTokens(compact: TypographyRawTokens.typeBold300, regular: TypographyRawTokens.typeBold350) } + + // MARK: - Semantic tokens - Typography - Composites - Body + + @objc open var typeBodyDefaultLarge: MultipleTypographyTokens { MultipleTypographyTokens(TypographyRawTokens.typeRegular250) } + @objc open var typeBodyDefaultMedium: MultipleTypographyTokens { MultipleTypographyTokens(TypographyRawTokens.typeRegular200) } + @objc open var typeBodyDefaultSmall: MultipleTypographyTokens { MultipleTypographyTokens(TypographyRawTokens.typeRegular150) } + @objc open var typeBodyStrongLarge: MultipleTypographyTokens { MultipleTypographyTokens(TypographyRawTokens.typeBold250) } + @objc open var typeBodyStrongMedium: MultipleTypographyTokens { MultipleTypographyTokens(TypographyRawTokens.typeBold200) } + @objc open var typeBodyStrongSmall: MultipleTypographyTokens { MultipleTypographyTokens(TypographyRawTokens.typeBold150) } + + // MARK: - Semantic tokens - Typography - Composites - Label + + @objc open var typeLabelDefaultXLarge: MultipleTypographyTokens { MultipleTypographyTokens(TypographyRawTokens.typeRegular250) } // NOTE: .typeRegular300 in Figjam but undefined + @objc open var typeLabelDefaultLarge: MultipleTypographyTokens { MultipleTypographyTokens(TypographyRawTokens.typeBold250) } + @objc open var typeLabelDefaultMedium: MultipleTypographyTokens { MultipleTypographyTokens(TypographyRawTokens.typeRegular200) } + @objc open var typeLabelDefaultSmall: MultipleTypographyTokens { MultipleTypographyTokens(TypographyRawTokens.typeRegular150) } + @objc open var typeLabelStrongXLarge: MultipleTypographyTokens { MultipleTypographyTokens(TypographyRawTokens.typeBold300) } + @objc open var typeLabelStrongLarge: MultipleTypographyTokens { MultipleTypographyTokens(TypographyRawTokens.typeBold250) } + @objc open var typeLabelStrongMedium: MultipleTypographyTokens { MultipleTypographyTokens(TypographyRawTokens.typeBold200) } + @objc open var typeLabelStrongSmall: MultipleTypographyTokens { MultipleTypographyTokens(TypographyRawTokens.typeBold150) } + + // MARK: - Semantic tokens - Typography - Composites - Code + + @objc open var typeCodeMedium: MultipleTypographyTokens { MultipleTypographyTokens(TypographyRawTokens.typeRegular200) } + @objc open var typeCodeSmall: MultipleTypographyTokens { MultipleTypographyTokens(TypographyRawTokens.typeRegular150) } +} + +// swiftlint:enable line_length diff --git a/OUDS/Core/OUDS/Sources/OUDSTheme/OUDSTheme+SemanticTokens/OUDSTheme+TypographySemanticTokens.swift b/OUDS/Core/OUDS/Sources/OUDSTheme/OUDSTheme+SemanticTokens/OUDSTheme+TypographySemanticTokens.swift index 2b8196c3d..8d5cccaee 100644 --- a/OUDS/Core/OUDS/Sources/OUDSTheme/OUDSTheme+SemanticTokens/OUDSTheme+TypographySemanticTokens.swift +++ b/OUDS/Core/OUDS/Sources/OUDSTheme/OUDSTheme+SemanticTokens/OUDSTheme+TypographySemanticTokens.swift @@ -17,6 +17,8 @@ import OUDSTokensSemantic // ଘ( ・ω・)_/゚・:*:・。☆ // [File to generate with 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 line_length @@ -36,6 +38,7 @@ extension OUDSTheme: TypographySemanticTokens { // MARK: Semantic token - Typography - Font - Weight @objc open var fontWeightDefault: TypographyFontWeightSemanticToken { TypographyRawTokens.fontWeight400 } + @objc open var fontWeightCode: TypographyFontWeightSemanticToken { TypographyRawTokens.fontWeight400 } @objc open var fontWeightStrong: TypographyFontWeightSemanticToken { TypographyRawTokens.fontWeight700 } @objc open var fontWeightDisplay: TypographyFontWeightSemanticToken { fontWeightStrong } @objc open var fontWeightHeading: TypographyFontWeightSemanticToken { fontWeightStrong } @@ -43,7 +46,6 @@ extension OUDSTheme: TypographySemanticTokens { @objc open var fontWeightBodyStrong: TypographyFontWeightSemanticToken { fontWeightStrong } @objc open var fontWeightLabelDefault: TypographyFontWeightSemanticToken { fontWeightDefault } @objc open var fontWeightLabelStrong: TypographyFontWeightSemanticToken { fontWeightStrong } - @objc open var fontWeightCode: TypographyFontWeightSemanticToken { TypographyRawTokens.fontWeight400 } // MARK: Semantic token - Typography - Font - Size @@ -105,44 +107,6 @@ extension OUDSTheme: TypographySemanticTokens { @objc open var fontLetterSpacingLabelSmall: MultipleFontLetterSpacingTokens { MultipleFontLetterSpacingTokens(TypographyRawTokens.fontLetterSpacing150) } @objc open var fontLetterSpacingCodeMedium: MultipleFontLetterSpacingTokens { MultipleFontLetterSpacingTokens(TypographyRawTokens.fontLetterSpacing200) } @objc open var fontLetterSpacingCodeSmall: MultipleFontLetterSpacingTokens { MultipleFontLetterSpacingTokens(TypographyRawTokens.fontLetterSpacing150) } - - // MARK: - Semantic tokens - Typography - Composites - Display - - @objc open var typeDisplayLarge: MultipleTypographyTokens { MultipleTypographyTokens(compact: TypographyRawTokens.typeBold850, regular: TypographyRawTokens.typeBold1450) } - @objc open var typeDisplayMedium: MultipleTypographyTokens { MultipleTypographyTokens(compact: TypographyRawTokens.typeBold750, regular: TypographyRawTokens.typeBold1050) } - @objc open var typeDisplaySmall: MultipleTypographyTokens { MultipleTypographyTokens(compact: TypographyRawTokens.typeBold650, regular: TypographyRawTokens.typeBold850) } - - // MARK: - Semantic tokens - Typography - Composites - Heading - - @objc open var typeHeadingXLarge: MultipleTypographyTokens { MultipleTypographyTokens(compact: TypographyRawTokens.typeBold550, regular: TypographyRawTokens.typeBold750) } - @objc open var typeHeadingLarge: MultipleTypographyTokens { MultipleTypographyTokens(compact: TypographyRawTokens.typeBold450, regular: TypographyRawTokens.typeBold550) } - @objc open var typeHeadingMedium: MultipleTypographyTokens { MultipleTypographyTokens(compact: TypographyRawTokens.typeBold350, regular: TypographyRawTokens.typeBold450) } - @objc open var typeHeadingSmall: MultipleTypographyTokens { MultipleTypographyTokens(compact: TypographyRawTokens.typeBold300, regular: TypographyRawTokens.typeBold350) } - - // MARK: - Semantic tokens - Typography - Composites - Body - - @objc open var typeBodyDefaultLarge: MultipleTypographyTokens { MultipleTypographyTokens(TypographyRawTokens.typeRegular250) } - @objc open var typeBodyDefaultMedium: MultipleTypographyTokens { MultipleTypographyTokens(TypographyRawTokens.typeRegular200) } - @objc open var typeBodyDefaultSmall: MultipleTypographyTokens { MultipleTypographyTokens(TypographyRawTokens.typeRegular150) } - @objc open var typeBodyStrongLarge: MultipleTypographyTokens { MultipleTypographyTokens(TypographyRawTokens.typeBold250) } - @objc open var typeBodyStrongMedium: MultipleTypographyTokens { MultipleTypographyTokens(TypographyRawTokens.typeBold200) } - @objc open var typeBodyStrongSmall: MultipleTypographyTokens { MultipleTypographyTokens(TypographyRawTokens.typeBold150) } - - // MARK: - Semantic tokens - Typography - Composites - Label - - @objc open var typeLabelDefaultXLarge: MultipleTypographyTokens { MultipleTypographyTokens(TypographyRawTokens.typeRegular250) } // NOTE: .typeRegular300 in Figjam but undefined - @objc open var typeLabelDefaultLarge: MultipleTypographyTokens { MultipleTypographyTokens(TypographyRawTokens.typeBold250) } - @objc open var typeLabelDefaultMedium: MultipleTypographyTokens { MultipleTypographyTokens(TypographyRawTokens.typeRegular200) } - @objc open var typeLabelDefaultSmall: MultipleTypographyTokens { MultipleTypographyTokens(TypographyRawTokens.typeRegular150) } - @objc open var typeLabelStrongXLarge: MultipleTypographyTokens { MultipleTypographyTokens(TypographyRawTokens.typeBold300) } - @objc open var typeLabelStrongLarge: MultipleTypographyTokens { MultipleTypographyTokens(TypographyRawTokens.typeBold250) } - @objc open var typeLabelStrongMedium: MultipleTypographyTokens { MultipleTypographyTokens(TypographyRawTokens.typeBold200) } - @objc open var typeLabelStrongSmall: MultipleTypographyTokens { MultipleTypographyTokens(TypographyRawTokens.typeBold150) } - - // MARK: - Semantic tokens - Typography - Composites - Code - - @objc open var typeCodeMedium: MultipleTypographyTokens { MultipleTypographyTokens(TypographyRawTokens.typeRegular200) } - @objc open var typeCodeSmall: MultipleTypographyTokens { MultipleTypographyTokens(TypographyRawTokens.typeRegular150) } } // swiftlint:enable line_length diff --git a/OUDS/Core/OUDS/Sources/OUDSTheme/OUDSTheme.swift b/OUDS/Core/OUDS/Sources/OUDSTheme/OUDSTheme.swift index e6d36631a..e9a8e294f 100644 --- a/OUDS/Core/OUDS/Sources/OUDSTheme/OUDSTheme.swift +++ b/OUDS/Core/OUDS/Sources/OUDSTheme/OUDSTheme.swift @@ -21,8 +21,11 @@ import OUDSTokensSemantic /// We allow this theme to be derivated and be overriden. /// /// `OUDSTheme` can be seen as a kind of "abstract class" in _object oriented paradigm_. +/// +/// Because `OUDSTheme` is not a *final* class, its type cannot be seen as `Sendable`, that is the reason why this conformity is unchecked. +/// /// **Warning: You are not supposed to use this abstract default theme directly. Please prefer `OrangeTheme` instead** -open class OUDSTheme { +open class OUDSTheme: @unchecked Sendable { /// A theme can have a custom font which is not the system font public let customFontFamily: TypographyFontFamilySemanticToken? diff --git a/OUDS/Core/OUDS/Sources/OUDSTheme/OUDSThemeableView.swift b/OUDS/Core/OUDS/Sources/OUDSTheme/OUDSThemeableView.swift index 38337a475..ccb2140cd 100644 --- a/OUDS/Core/OUDS/Sources/OUDSTheme/OUDSThemeableView.swift +++ b/OUDS/Core/OUDS/Sources/OUDSTheme/OUDSThemeableView.swift @@ -39,6 +39,23 @@ extension EnvironmentValues { /// This is a kind of root `SwiftUI.View` to add at the top level of your views tree so as to define /// as an environement variable the theme which will be applied. /// Any theme to apply must be a child of `OUDSTheme`, direct or not. +/// +/// To use this special `View` and apply the *theme*, you must wrap your app root view inside, like: +/// +/// // Make imports +/// import OUDS // For OUDSThemeableView +/// import OUDSThemesOrange // For OrangeTheme +/// +/// // Add themeable view to your root view to use the OrangeTheme +/// OUDSThemeableView(theme: OrangeTheme()) { +/// YourRootView() +/// } +/// +/// // Or use your custom theme if you want +/// OUDSThemeableView(theme: YourCustomTheme()) { +/// YourRootView() +/// } +/// public struct OUDSThemeableView: View where Content: View { private let theme: OUDSTheme diff --git a/OUDS/Core/OUDS/Sources/_OUDS.docc/GettingStarted.md b/OUDS/Core/OUDS/Sources/_OUDS.docc/GettingStarted.md index 16c2840dc..d3d09f2e7 100644 --- a/OUDS/Core/OUDS/Sources/_OUDS.docc/GettingStarted.md +++ b/OUDS/Core/OUDS/Sources/_OUDS.docc/GettingStarted.md @@ -12,6 +12,8 @@ If you want to add the iOS library of **Orange Unified Design System**, you need To do that, add a new _package dependency_ to your _Xcode_ project by refering to it with `https://github.com/Orange-OpenSource/ouds-ios`. You are free to choose wether or not you want a branch or a specific tag, pick the solution you want. +You can [refer to the wiki](https://github.com/Orange-OpenSource/ouds-ios/wiki/6-%E2%80%90-About-versions,-releases-and-builds) for more details about versions, releases and tags. + ### Import the library you need You should use one (or several) of the following imports for your needs, which are basically _Swift Package_ products. @@ -25,3 +27,14 @@ import OUDSTokensComponent // If you need to override or use directly componen import OUDSTokenSemantic // If you need to override or use directly semantic tokens import OUDSTokensRaw // If you need to override or use directly raw tokens ``` + +### Chose your theme + +You can: +1. Use the `OrangeTheme` which is the default one +2. Use the `InverseTheme` which is a special theme for dedicated use cases (like an extended dark mode) +3. Implement your own theme (see [Themes details](https://ios.unified-design-system.orange.com/documentation/ouds/themes)) + +### Apply your theme + +You will need to use for your root view the [`OUDSThemeableView`](https://ios.unified-design-system.orange.com/documentation/ouds/oudsthemeableview/). [This page may help](https://ios.unified-design-system.orange.com/documentation/ouds/themes) also. diff --git a/OUDS/Core/OUDS/Sources/_OUDS.docc/Themes.md b/OUDS/Core/OUDS/Sources/_OUDS.docc/Themes.md index a7c577038..19fb7d42c 100644 --- a/OUDS/Core/OUDS/Sources/_OUDS.docc/Themes.md +++ b/OUDS/Core/OUDS/Sources/_OUDS.docc/Themes.md @@ -15,102 +15,89 @@ _Themes_ have Swift _extensions_ so as to get the _tokens_ to define. These toke Not that other brands like _Parnasse_ or _Sosh_ can be implemented in a dedicated insternal repository with their own assets. +## Architecture + +A theme is, a fact, a big massive bucket of semantic tokens. We choose to pack all semantic tokens in protocols, so as to force any theme to manage them. Because Swift does not have notions of abstract classes compared to Kotlin, we have choosen to define an `OUDSTheme` which can be considered like an almost-abstract class. +Then, a white label theme may just inherit from this class and override the tokens it needs. The real, default theme to use, will be the `OrangeTheme` providing in its module brand colors and overriding some tokens with the suitable values. In fact, because the `OUDSTheme` and the `OrangeTheme` are isolated, the `OUDSTheme` cannot get the Orange brand colors, so some tokens cannot be defined at that level but remain overridable in the subclass. +The object oriented paradigm implementation in Swift is a bit different that the one found with Java or Kotlin. For example we do not have abstract classes and Swift relies a lot in composition with protocols and extensions. Thus a theme can be composed using protocols containing as properties the semantics tokens. These tokens must also be overridable. Any default values and logic can be in a kind of fake abstract class named OUDSTheme. This theme will be then subclassed using OOP inheritance in the real default theme named OrangeTheme. Any other theme can be a subclass of OrangeTheme (e.g. country specific theme) or OUDSTheme (for white label). +Themes must be able to override semantic tokens and components tokens, and use its own raw or semantic tokens without sharing them to other themes. The existing raw tokens, shared between all themes, are not overridable because their definitions are frozen. + ## Use themeable view ```swift // Make imports -import OUDS -import OUDSThemesOrange +import OUDS // For OUDSThemeableView +import OUDSThemesOrange // For OrangeTheme -// Add themeable view to your root view +// Add themeable view to your root view to use the OrangeTheme OUDSThemeableView(theme: OrangeTheme()) { YourRootView() } -``` - -## Define a custom theme if needed -```swift -class YourCustomTheme: OrangeTheme { } - -extension YourCustomTheme { - - // Override components tokens if needed - override var ftiBorderStyle: BorderStyleSemanticToken { borderStyleDrag } - override var ftiBorderWidth: BorderWidthSemanticToken { borderWidthThick } - - // Override colors semantic tokens if needed - override var colorBackgroundPrimary: ColorSemanticToken { - MultipleColorTokens(light: ColorRawTokens.ColorRawTokens.colorFunctionalSun500, dark: ColorRawTokens.ColorRawTokens.colorFunctionalSun800) - } - - // Etc. +// Or use your custom theme if you want +OUDSThemeableView(theme: YourCustomTheme()) { + YourRootView() } ``` -## How to create your own theme +## Define a custom theme if needed It is quite simple, you have to follow several steps. -First, create a _Swift class_ which will inherit from `OrangeTheme` or `OUDSTheme`. -You can see `OrangeTheme` as more specified and less abtract as `OUDSTheme` which is the base of all themes. We do not recommend to sue directly the `OUDSTheme` as is. +You will have to create a _Swift class_ which will inherit from `OrangeTheme` or `OUDSTheme`. +You can see `OrangeTheme` as more specified and less abtract as `OUDSTheme` which is the base of all themes. We do not recommend to use directly the `OUDSTheme` as is. Then, you should override the _semantic tokens_ and _components tokens_ you want ; we recommend to use _Swift extensions_ for clarity reasons. If your theme needs to define its own _raw tokens_, you can also define them using a `enum` and the _raw tokens types_. -For example: - +First, use the suitable imports: ```swift -import Foundation -import SwiftUI +import OUDS // To get OUDSTheme import OUDSTokensRaw // To get raw tokens import OUDSTokensSemantic // To get semantic tokens import OUDSTokensComponent // To get component tokens import OUDSThemesOrange // To override OrangeTheme (which is default theme) +``` -// Can be for example a country theme -class OrangeCustomTheme: OrangeTheme { } - -extension OrangeCustomTheme { // For FormsTextInputComponentTokens, used in component FormsTextInputComponent - - override public var ftiTitleFontWeight: TypographyFontWeightSemanticToken { fontWeightLabelStrong } - override public var ftiTitleFontSize: TypographyFontSizeSemanticToken { fontSizeLabelXLarge } - override public var ftiTitleColor: ColorSemanticToken { ColorRawTokens.colorFunctionalDodgerBlue500 } - - override public var ftiSubtitleFontWeight: TypographyFontWeightSemanticToken { fontWeightBodyDefault } - override public var ftiSubtitleFontSize: TypographyFontSizeSemanticToken { fontSizeLabelMedium } - override public var ftiSubtitleColor: ColorSemanticToken { ColorRawTokens.colorFunctionalMalachite500 } - - override public var ftiBackgroundColor: ColorSemanticToken { colorBackgroundDefault } +Then, declare the class: +``` +// If you jsut want to make a subtheme with some changes +final class YourCustomTheme: OrangeTheme { } - override public var ftiBorderColor: ColorSemanticToken { colorBorderEmphasized } +// Or for white label themes or themes with more configurations not that much related to OrangeTheme, choose the one you want +final class YourCustomTheme: OUDSTheme { } +``` - override public var ftiBorderStyle: BorderStyleSemanticToken { borderStyleDrag } +And define the theme by overriding the values you want: - override public var ftiBorderWidth: BorderWidthSemanticToken { borderWidthThick } -} +``` +extension YourCustomTheme { -extension OrangeCustomTheme { // For ColorSemanticTokens using anywhere + // Override components tokens + // Not define dyet + + // Override colors semantic tokens + override public var colorBgPrimary: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalDarkGray880) } + + // Override some fonts semantic tokens + public var fontFamily: TypographyFontFamilySemanticToken { TypographyRawTokens.fontFamilySystemSFPro } + public var fontFamilyBody: TypographyFontFamilySemanticToken { MyOwnFontRawTokens.someFontBody } - override var colorBackgroundPrimary: ColorSemanticToken { - MultipleColorTokens(light: ColorRawTokens.ColorRawTokens.colorFunctionalSun500, dark: ColorRawTokens.ColorRawTokens.colorFunctionalSun800) - } + // Etc. } ``` -And your own theme colors _raw tokens_: - -```swift - -public typealias MyThemeColorRawToken = ColorRawToken // Refer to type ColorRawToken for consistency +You can defined your own set of raw tokens, for example: +``` +public typealias MyOwnTypographyRawTokens = TypographyRawTokens // Refer to type TypographyRawTokens for consistency, declared in OUDSTokensRaw -public enum MyThemeColorRawTokens { +public enum MyOwnFontRawTokens { - public static let someAwesomeThemeExclusiveColor: MyThemeColorRawToken = "#12345600" + public static let someFontBody: MyOwnTypographyRawTokens = "Arial" } ``` -Then for your root view: +Finaly for your app root view: ```swift import SwiftUI @@ -119,10 +106,16 @@ import OUDS // To get ``OUDSThemeableView`` struct MyAppRootView: View { var body: some View { - OUDSThemeableView(theme: OrangeCustomTheme()) { + OUDSThemeableView(theme: YourCustomTheme()) { // ... } } } ``` +All components the OUDS library provides are based on themes, handle through the abstract `OUDSTheme`, exposing *semantic tokens*, defined by *raw tokens* assigned to usable final values. +In few words, if you want to change the look and feel for the OUDS components you use, you will have to override the matching *semantic tokens*, but it will bring side effects as these *semantic tokens* are shared accross several components. +In the future we will have components and *component tokens*. + +You are also able to define your components and your *semantic tokens* used by them. + diff --git a/OUDS/Core/OUDS/Sources/_OUDS.docc/Tokens.md b/OUDS/Core/OUDS/Sources/_OUDS.docc/Tokens.md index c5cbf9983..36fcd2ee8 100644 --- a/OUDS/Core/OUDS/Sources/_OUDS.docc/Tokens.md +++ b/OUDS/Core/OUDS/Sources/_OUDS.docc/Tokens.md @@ -23,77 +23,16 @@ flowchart TD ## Component tokens -These _tokens_ ([OUDSTokensComponent](https://ios.unified-design-system.orange.com/documentation/oudstokenscomponent/)) can be used to apply some style and configuration values to _components_. -Thus if a component needs to change for example its _background color_, and if a _component token_ is used for it, then only the value of this _token_ should be changed without any modification on the _component_ definition. -_Components_ use _component tokens_ exposed through the _theme_ to get their style values. - -Example with a fake component `FormsTextInputComponentTokens`: - -```swift -// Declare the component tokens -public protocol FormsTextInputComponentTokens { - var ftiTitleFontWeight: TypographyFontWeightSemanticToken { get } - var ftiTitleFontSize: TypographyFontSizeSemanticToken { get } - var ftiTitleColor: ColorSemanticToken { get } - - var ftiBorderColor: ColorSemanticToken { get } - var ftiBorderStyle: BorderStyleSemanticToken { get } - var ftiBorderWidth: BorderWidthSemanticToken { get } -} - -// Define the component tokens -extension OUDSTheme: FormsTextInputComponentTokens { - private static let defaultBlack: ColorSemanticToken = ColorRawTokens.colorFunctionalBlack - private static let defaultWhite: ColorSemanticToken = ColorRawTokens.colorFunctionalWhite - - @objc open var ftiTitleFontWeight: TypographyFontWeightSemanticToken { fontWeightHeading } - @objc open var ftiTitleFontSize: TypographyFontSizeSemanticToken { fontSizeLabelLarge } - @objc open var ftiTitleColor: ColorSemanticToken { colorContentBrandPrimaryLight ?? Self.defaultBlack } - - @objc open var ftiBorderColor: ColorSemanticToken { colorBorderEmphasizedLight ?? Self.defaultBlack } - @objc open var ftiBorderStyle: BorderStyleSemanticToken { borderStyleDefault } - @objc open var ftiBorderWidth: BorderWidthSemanticToken { borderWidthThin } -} - -// Then in the definition of the component FormsTextInput component, the theme will be called and the component tokens -// stored inside will be applied -// The View - -struct OUDSFormsTextInput: View { - - // ... - @Environment(\.theme) var theme - @Environment(\.colorScheme) var colorScheme - - public var body: some View { - VStack(spacing: theme.spacePaddingBlockComponentTall) { - Label( - title: { - Text("Example of OUDSFormsTextInput") - .fontWeight(theme.ftiTitleFontWeight.fontWeight) - .font(.system(size: theme.ftiTitleFontSize)) - .foregroundColor(theme.ftiTitleColor.color) - }, - icon: { /*@START_MENU_TOKEN@*/Image(systemName: "42.circle")/*@END_MENU_TOKEN@*/ } - ) - Text("Write bellow some awesome text!") - .fontWeight(theme.ftiSubtitleFontWeight.fontWeight) - .font(.system(size: theme.ftiSubtitleFontSize)) - .foregroundColor(theme.ftiSubtitleColor.color) - TextField(placeholder, text: $value) - } - .padding(theme.spacePaddingBlockComponentTall) - .background(theme.ftiBorderColor.color(for: colorScheme)) - .border(theme.ftiBorderColor.color(for: colorScheme), width: theme.ftiBorderWidth) - } -} -``` +No _tokens_ ([OUDSTokensComponent](https://ios.unified-design-system.orange.com/documentation/oudstokenscomponent/)) are defined for components yet. ## Semantic tokens +### What they are + These _tokens_ ([OUDSTokensSemantic](https://ios.unified-design-system.orange.com/documentation/oudstokenssemantic/)) can be used mainly for _component tokens_ to apply some style and configuration values. They can be seen as an high level of usage with functional meanings. -Thus if we need for example to change a warning color, supposing this color is defined as a _semantic token_, we only have to change its assigned value and all components using the _semantic token_ won't be impacted in their definition. + +A semantic token points to a raw token, and is used by components. A semantic token brings meanings, higher level notions. For example, a raw token can be a "red color", and a semantic token pointing to it can be a "danger information color". Semantic tokens are used by components tokens and shared definition of themes. They are splitted in kind of families, i.e. borders, dimensions, colors, spacings, elevations, sizings, opacities, grids and typographies. For some of theses tokens, like for borders, subfamilies can be defined likes width, radius and style. Finally, any of these raw tokens is associated to a raw value which will be - in the end - applied to SwiftUI views inside components. Type aliases will help to make a simple math between any semantic tokens and raw tokens. Thus if we need for example to change a warning color, supposing this color is defined as a _semantic token_, we only have to change its assigned value and all components using the _semantic token_ won't be impacted in their definition, only their rendering. In addition, there are hundreds of _semantics tokens_ and we needed to add them to the abstract root theme using extensions for clarity reasons to prevent to have a _Swift class_ with thousands of lines. Each _raw token_ "family" is then declared in its dedicated _Swift protocol_ any root theme must implement. Because we choose to split responsabilities and objects into their own modules, we faced troubles to make possible for children themes to override properties declared in _protocols_ and defined in _extensions_. @@ -104,22 +43,58 @@ To keep the same semantics as the ones used in our specifications, _typealias_ a Example with [OUDSTokensComponent/ColorSemanticTokens](https://ios.unified-design-system.orange.com/documentation/oudstokenssemantic/colorsemantictokens): ```swift -// Declare a semantic token for color +// Declare the semantic tokens protocol ColorSemanticTokens { - var sysColorBrandNeutralMutedWhite: ColorAliasSemanticToken? { get } + + var colorBgPrimary: ColorSemanticToken { get } + var colorBgSecondary: ColorSemanticToken { get } + var colorBgTertiary: ColorSemanticToken { get } + // ... } -// Define the semantic token +// Define the semantic tokens exposed through the theme extension OUDSTheme: ColorSemanticTokens { - @objc open var sysColorBrandNeutralMutedWhite: ColorAliasSemanticToken? { ColorRawTokens.colorFunctionalWhite } + // Color is available in the module of OUDSTheme + @objc open var colorBgPrimary: ColorSemanticToken { ColorRawTokens.colorFunctionalWhite } + + // If the semantic token refers to a raw token not stored in the OUDSTheme module, override later and throw error because unxpected state if used + @objc open var colorBgSecondary: ColorSemanticToken { fatalError("🤖 Raw token unavailable for colorBgSecondary!") } + + // Possible to have tokens not defined in lwoer level must only in themes implementation, throw error if used because unexpected state + @objc open var colorBgTertiary: ColorSemanticToken { fatalError("🤖 No value defined for colorBgTertiary!") } } -// Then any component and view can use the theme and get the stored colors, only manipulating them by their variable names. +// Add missing values +extension OrangeTheme: ColorSemanticTokens { + + // Define value value with the accessible token + @objc open var colorBgSecondary: ColorSemanticToken { OrangeBrandColorRawTokens.colorOrange200 } +} ``` +### Important notice + +You may see the source code can be more simple, or the source code does not follow the Swift guidelines, or plenty of warnings of SwiftLint are disabled, or things are dirty. + +In fact, rely to much on *Figma* and how the design system is implemented. +There are thousands of tokens, and we do now know if they will be used, how and by whom. In addition, the logic behind these tokens, their nature and names, is very tight to the web domain because the design team behind is more used to web environment than mobileones like Android and iOS. Some tokens like composite tokens are defined in *Figma* but *Figma* is not able to manage them, it is tinkering, and the outputed JSON cannot manage that too. +In addition, *Figma* exposts the tokens in JSON, which is then parsed with our own fork and implementation of _style dictionary_ tool which struggles to outputs the JSON to web, Kotlin and Swift assets. + +That is the reason why: +- some *SwiftLint* warnings on tokens are disabled: not possible to have doc of public tokens, too long names, too long lines, too long body, too long identifiers +- some tokens do not have full names, e.g. "colorBackground" are named "colorBg" +- somes tokens are defined without attached values, thus we throw `fatalError` because that state is not relevant +- some tokens in the *Figma* use colors defined in another module, thus we throw `fatalError` to force themes to override with the good and avaialble values +- we have thousands of tokens, as thousands of tokens are defined +- we do not know if there is dead code because API are public + +Feel free to send issues and contact us for further details or if you spotted something interesting. + ## Raw tokens +### What they are + _Raw tokens_ ([OUDSTokensRaw](https://ios.unified-design-system.orange.com/documentation/oudstokensraw/)) are smallest _tokens_ possible. They are associated to raw values and will be finaly the values assigned to the _components_ properties. In fact, we choose to use as most as possible primitive types for raw values, like `Int`, `Double`, `CGFloat` or `String` so as to handle the smallest types with few impacts on the memory for ecodesign principles. Indeed with hundreds of raw tokens, it will be more efficient to store primitive small types than *structs* or *classes*. @@ -143,7 +118,6 @@ public enum ColorRawTokens { } extension ColorRawTokens { // Gathers all color raw tokens, use enums for namespace optimization with static let public static let colorFunctionalWhite: ColorRawToken = "#FFFFFF" - public static let colorFunctionalScarlet400: ColorRawToken = "#FF4D4E" public static let colorTransparentBlack0: ColorRawToken = apply(opacity: OpacityRawTokens.opacity0, on: colorFunctionalBlack) ... } @@ -153,6 +127,11 @@ extension String { // The OUDS library still exposes this comptuer property Color(hexadecimalCode: self) } } + +// Themes can embed their own tokens +enum OrangeBrandColorRawTokens { + public static let colorOrange200: ColorOrangeBrandRawToken = "#FFC18A" +} ``` ## Add, edit or remove tokens @@ -162,8 +141,8 @@ You may need to [create an issue](https://github.com/Orange-OpenSource/ouds-ios/ ### For raw tokens -You can refer to the *OUDSTokensRaw* documentation or [get it online](https://ios.unified-design-system.orange.com/documentation/oudstokensraw/) +You can refer to the *OUDSTokensRaw* documentation or [get it online](https://ios.unified-design-system.orange.com/documentation/oudstokensraw/). [The wiki provides details](https://github.com/Orange-OpenSource/ouds-ios/wiki/0-%E2%80%90-How-to-update-tokens) also. ### For semantic tokens -You can refer to the *OUDSTokensSemantic* documentation or [get it online](https://ios.unified-design-system.orange.com/documentation/oudstokenssemantic/ +You can refer to the *OUDSTokensSemantic* documentation or [get it online](https://ios.unified-design-system.orange.com/documentation/oudstokenssemantic/). [The wiki provides details](https://github.com/Orange-OpenSource/ouds-ios/wiki/0-%E2%80%90-How-to-update-tokens) also. diff --git a/OUDS/Core/OUDS/Tests/OUDSTheme/MockThemes/MockTheme+BorderSemanticTokens.swift b/OUDS/Core/OUDS/Tests/OUDSTheme/MockThemes/MockTheme+BorderSemanticTokens.swift index 28fd46b6c..07a592d6a 100644 --- a/OUDS/Core/OUDS/Tests/OUDSTheme/MockThemes/MockTheme+BorderSemanticTokens.swift +++ b/OUDS/Core/OUDS/Tests/OUDSTheme/MockThemes/MockTheme+BorderSemanticTokens.swift @@ -29,7 +29,8 @@ extension MockTheme { override open var borderWidthMedium: BorderWidthSemanticToken { Self.mockThemeBorderWidthRawToken } override open var borderWidthThick: BorderWidthSemanticToken { Self.mockThemeBorderWidthRawToken } override open var borderWidthThicker: BorderWidthSemanticToken { Self.mockThemeBorderWidthRawToken } - override open var borderWidthOutsideFocus: BorderWidthSemanticToken { Self.mockThemeBorderWidthRawToken } + override open var borderWidthFocus: BorderWidthSemanticToken { Self.mockThemeBorderWidthRawToken } + override open var borderWidthFocusInset: BorderWidthSemanticToken { Self.mockThemeBorderWidthRawToken } // MARK: Semantic token - Border - Radius diff --git a/OUDS/Core/OUDS/Tests/OUDSTheme/MockThemes/MockTheme+ColorSemanticTokens.swift b/OUDS/Core/OUDS/Tests/OUDSTheme/MockThemes/MockTheme+ColorSemanticTokens.swift index cbc7cdee7..75ebdce34 100644 --- a/OUDS/Core/OUDS/Tests/OUDSTheme/MockThemes/MockTheme+ColorSemanticTokens.swift +++ b/OUDS/Core/OUDS/Tests/OUDSTheme/MockThemes/MockTheme+ColorSemanticTokens.swift @@ -23,67 +23,67 @@ extension MockTheme { // MARK: Semantic token - Colors - Background - override open var colorBackgroundPrimary: ColorSemanticToken { Self.mockThemeMultipleColorTokens } + override open var colorBgPrimary: ColorSemanticToken { Self.mockThemeMultipleColorTokens } - override open var colorBackgroundSecondary: ColorSemanticToken { Self.mockThemeMultipleColorTokens } + override open var colorBgSecondary: ColorSemanticToken { Self.mockThemeMultipleColorTokens } - override open var colorBackgroundTertiary: ColorSemanticToken { Self.mockThemeMultipleColorTokens } + override open var colorBgTertiary: ColorSemanticToken { Self.mockThemeMultipleColorTokens } - override open var colorBackgroundEmphasized: ColorSemanticToken { Self.mockThemeMultipleColorTokens } + override open var colorBgEmphasized: ColorSemanticToken { Self.mockThemeMultipleColorTokens } - override open var colorBackgroundBrandPrimary: ColorSemanticToken { Self.mockThemeMultipleColorTokens } + override open var colorBgBrandPrimary: ColorSemanticToken { Self.mockThemeMultipleColorTokens } - override open var colorBackgroundBrandSecondary: ColorSemanticToken { Self.mockThemeMultipleColorTokens } + override open var colorBgBrandSecondary: ColorSemanticToken { Self.mockThemeMultipleColorTokens } - override open var colorBackgroundBrandTertiary: ColorSemanticToken { Self.mockThemeMultipleColorTokens } + override open var colorBgBrandTertiary: ColorSemanticToken { Self.mockThemeMultipleColorTokens } - override open var colorBackgroundStatusNeutral: ColorSemanticToken { Self.mockThemeMultipleColorTokens } + override open var colorBgStatusNeutral: ColorSemanticToken { Self.mockThemeMultipleColorTokens } - override open var colorBackgroundStatusNeutralOnBackgroundEmphasized: ColorSemanticToken { Self.mockThemeMultipleColorTokens } + override open var colorBgStatusNeutralOnBgEmphasized: ColorSemanticToken { Self.mockThemeMultipleColorTokens } - override open var colorBackgroundStatusPositiveMuted: ColorSemanticToken { Self.mockThemeMultipleColorTokens } + override open var colorBgStatusPositiveMuted: ColorSemanticToken { Self.mockThemeMultipleColorTokens } - override open var colorBackgroundStatusPositiveMutedOnBackgroundEmphasized: ColorSemanticToken { Self.mockThemeMultipleColorTokens } + override open var colorBgStatusPositiveMutedOnBgEmphasized: ColorSemanticToken { Self.mockThemeMultipleColorTokens } - override open var colorBackgroundStatusPositiveEmphasized: ColorSemanticToken { Self.mockThemeMultipleColorTokens } + override open var colorBgStatusPositiveEmphasized: ColorSemanticToken { Self.mockThemeMultipleColorTokens } - override open var colorBackgroundStatusInfoMuted: ColorSemanticToken { Self.mockThemeMultipleColorTokens } + override open var colorBgStatusInfoMuted: ColorSemanticToken { Self.mockThemeMultipleColorTokens } - override open var colorBackgroundStatusInfoMutedOnBackgroundEmphasized: ColorSemanticToken { Self.mockThemeMultipleColorTokens } + override open var colorBgStatusInfoMutedOnBgEmphasized: ColorSemanticToken { Self.mockThemeMultipleColorTokens } - override open var colorBackgroundStatusInfoEmphasized: ColorSemanticToken { Self.mockThemeMultipleColorTokens } + override open var colorBgStatusInfoEmphasized: ColorSemanticToken { Self.mockThemeMultipleColorTokens } - override open var colorBackgroundStatusWarningMuted: ColorSemanticToken { Self.mockThemeMultipleColorTokens } + override open var colorBgStatusWarningMuted: ColorSemanticToken { Self.mockThemeMultipleColorTokens } - override open var colorBackgroundStatusWarningMutedOnBackgroundEmphasized: ColorSemanticToken { Self.mockThemeMultipleColorTokens } + override open var colorBgStatusWarningMutedOnBgEmphasized: ColorSemanticToken { Self.mockThemeMultipleColorTokens } - override open var colorBackgroundStatusWarningEmphasized: ColorSemanticToken { Self.mockThemeMultipleColorTokens } + override open var colorBgStatusWarningEmphasized: ColorSemanticToken { Self.mockThemeMultipleColorTokens } - override open var colorBackgroundStatusNegativeMuted: ColorSemanticToken { Self.mockThemeMultipleColorTokens } + override open var colorBgStatusNegativeMuted: ColorSemanticToken { Self.mockThemeMultipleColorTokens } - override open var colorBackgroundStatusNegativeMutedOnBackgroundEmphasized: ColorSemanticToken { Self.mockThemeMultipleColorTokens } + override open var colorBgStatusNegativeMutedOnBgEmphasized: ColorSemanticToken { Self.mockThemeMultipleColorTokens } - override open var colorBackgroundStatusNegativeEmphasized: ColorSemanticToken { Self.mockThemeMultipleColorTokens } + override open var colorBgStatusNegativeEmphasized: ColorSemanticToken { Self.mockThemeMultipleColorTokens } - override open var colorBackgroundStatusAccentMuted: ColorSemanticToken { Self.mockThemeMultipleColorTokens } + override open var colorBgStatusAccentMuted: ColorSemanticToken { Self.mockThemeMultipleColorTokens } - override open var colorBackgroundStatusAccentMutedOnBackgroundEmphasized: ColorSemanticToken { Self.mockThemeMultipleColorTokens } + override open var colorBgStatusAccentMutedOnBgEmphasized: ColorSemanticToken { Self.mockThemeMultipleColorTokens } - override open var colorBackgroundStatusAccentEmphasized: ColorSemanticToken { Self.mockThemeMultipleColorTokens } + override open var colorBgStatusAccentEmphasized: ColorSemanticToken { Self.mockThemeMultipleColorTokens } // MARK: Semantic token - Colors - Content - Status override open var colorContentDefault: ColorSemanticToken { Self.mockThemeMultipleColorTokens } - override open var colorContentContentDefaultOnBackgroundEmphasized: ColorSemanticToken { Self.mockThemeMultipleColorTokens } + override open var colorContentContentDefaultOnBgEmphasized: ColorSemanticToken { Self.mockThemeMultipleColorTokens } override open var colorContentMuted: ColorSemanticToken { Self.mockThemeMultipleColorTokens } - override open var colorContentContentMutedOnBackgroundEmphasized: ColorSemanticToken { Self.mockThemeMultipleColorTokens } + override open var colorContentContentMutedOnBgEmphasized: ColorSemanticToken { Self.mockThemeMultipleColorTokens } override open var colorContentDisabled: ColorSemanticToken { Self.mockThemeMultipleColorTokens } - override open var colorContentContentDisabledOnBackgroundEmphasized: ColorSemanticToken { Self.mockThemeMultipleColorTokens } + override open var colorContentContentDisabledOnBgEmphasized: ColorSemanticToken { Self.mockThemeMultipleColorTokens } override open var colorContentBrandPrimary: ColorSemanticToken { Self.mockThemeMultipleColorTokens } @@ -103,55 +103,55 @@ extension MockTheme { // MARK: Semantic token - Colors - Content - On Background - override open var colorContentOnBackgroundPrimary: ColorSemanticToken { Self.mockThemeMultipleColorTokens } + override open var colorContentOnBgPrimary: ColorSemanticToken { Self.mockThemeMultipleColorTokens } - override open var colorContentOnBackgroundSecondary: ColorSemanticToken { Self.mockThemeMultipleColorTokens } + override open var colorContentOnBgSecondary: ColorSemanticToken { Self.mockThemeMultipleColorTokens } - override open var colorContentOnBackgroundTertiary: ColorSemanticToken { Self.mockThemeMultipleColorTokens } + override open var colorContentOnBgTertiary: ColorSemanticToken { Self.mockThemeMultipleColorTokens } - override open var colorContentOnBackgroundStatusPositiveMuted: ColorSemanticToken { Self.mockThemeMultipleColorTokens } + override open var colorContentOnBgStatusPositiveMuted: ColorSemanticToken { Self.mockThemeMultipleColorTokens } - override open var colorContentOnBackgroundStatusPositiveMutedOnBackgroundEmphasized: ColorSemanticToken { Self.mockThemeMultipleColorTokens } + override open var colorContentOnBgStatusPositiveMutedOnBgEmphasized: ColorSemanticToken { Self.mockThemeMultipleColorTokens } - override open var colorContentOnBackgroundStatusPositiveEmphasized: ColorSemanticToken { Self.mockThemeMultipleColorTokens } + override open var colorContentOnBgStatusPositiveEmphasized: ColorSemanticToken { Self.mockThemeMultipleColorTokens } - override open var colorContentOnBackgroundStatusInfoMuted: ColorSemanticToken { Self.mockThemeMultipleColorTokens } + override open var colorContentOnBgStatusInfoMuted: ColorSemanticToken { Self.mockThemeMultipleColorTokens } - override open var colorContentOnBackgroundStatusInfoMutedOnBackgroundEmphasized: ColorSemanticToken { Self.mockThemeMultipleColorTokens } + override open var colorContentOnBgStatusInfoMutedOnBgEmphasized: ColorSemanticToken { Self.mockThemeMultipleColorTokens } - override open var colorContentOnBackgroundStatusInfoEmphasized: ColorSemanticToken { Self.mockThemeMultipleColorTokens } + override open var colorContentOnBgStatusInfoEmphasized: ColorSemanticToken { Self.mockThemeMultipleColorTokens } - override open var colorContentOnBackgroundStatusWarningMuted: ColorSemanticToken { Self.mockThemeMultipleColorTokens } + override open var colorContentOnBgStatusWarningMuted: ColorSemanticToken { Self.mockThemeMultipleColorTokens } - override open var colorContentOnBackgroundStatusWarningMutedOnBackgroundEmphasized: ColorSemanticToken { Self.mockThemeMultipleColorTokens } + override open var colorContentOnBgStatusWarningMutedOnBgEmphasized: ColorSemanticToken { Self.mockThemeMultipleColorTokens } - override open var colorContentOnBackgroundStatusWarningEmphasized: ColorSemanticToken { Self.mockThemeMultipleColorTokens } + override open var colorContentOnBgStatusWarningEmphasized: ColorSemanticToken { Self.mockThemeMultipleColorTokens } - override open var colorContentOnBackgroundStatusNegativeMuted: ColorSemanticToken { Self.mockThemeMultipleColorTokens } + override open var colorContentOnBgStatusNegativeMuted: ColorSemanticToken { Self.mockThemeMultipleColorTokens } - override open var colorContentOnBackgroundStatusNegativeMutedOnBackgroundEmphasized: ColorSemanticToken { Self.mockThemeMultipleColorTokens } + override open var colorContentOnBgStatusNegativeMutedOnBgEmphasized: ColorSemanticToken { Self.mockThemeMultipleColorTokens } - override open var colorContentOnBackgroundStatusNegativeEmphasized: ColorSemanticToken { Self.mockThemeMultipleColorTokens } + override open var colorContentOnBgStatusNegativeEmphasized: ColorSemanticToken { Self.mockThemeMultipleColorTokens } - override open var colorContentOnBackgroundStatusAccentMuted: ColorSemanticToken { Self.mockThemeMultipleColorTokens } + override open var colorContentOnBgStatusAccentMuted: ColorSemanticToken { Self.mockThemeMultipleColorTokens } - override open var colorContentOnBackgroundStatusAccentMutedOnBackgroundEmphasized: ColorSemanticToken { Self.mockThemeMultipleColorTokens } + override open var colorContentOnBgStatusAccentMutedOnBgEmphasized: ColorSemanticToken { Self.mockThemeMultipleColorTokens } - override open var colorContentOnBackgroundStatusAccentedEmphasized: ColorSemanticToken { Self.mockThemeMultipleColorTokens } + override open var colorContentOnBgStatusAccentedEmphasized: ColorSemanticToken { Self.mockThemeMultipleColorTokens } // MARK: Semantic token - Colors - Border override open var colorBorderDefault: ColorSemanticToken { Self.mockThemeMultipleColorTokens } - override open var colorBorderDefaultOnBackgroundEmphasized: ColorSemanticToken { Self.mockThemeMultipleColorTokens } + override open var colorBorderDefaultOnBgEmphasized: ColorSemanticToken { Self.mockThemeMultipleColorTokens } override open var colorBorderEmphasized: ColorSemanticToken { Self.mockThemeMultipleColorTokens } - override open var colorBorderEmphasizedOnBackgroundEmphasized: ColorSemanticToken { Self.mockThemeMultipleColorTokens } + override open var colorBorderEmphasizedOnBgEmphasized: ColorSemanticToken { Self.mockThemeMultipleColorTokens } override open var colorBorderFocus: ColorSemanticToken { Self.mockThemeMultipleColorTokens } - override open var colorBorderBrandPrimaryOnBackgroundEmphasized: ColorSemanticToken { Self.mockThemeMultipleColorTokens } + override open var colorBorderBrandPrimaryOnBgEmphasized: ColorSemanticToken { Self.mockThemeMultipleColorTokens } override open var colorBorderBrandPrimary: ColorSemanticToken { Self.mockThemeMultipleColorTokens } @@ -169,65 +169,65 @@ extension MockTheme { override open var colorBorderStatusAccent: ColorSemanticToken { Self.mockThemeMultipleColorTokens } - override open var colorBorderOnBackgroundBrandPrimary: ColorSemanticToken { Self.mockThemeMultipleColorTokens } + override open var colorBorderOnBgBrandPrimary: ColorSemanticToken { Self.mockThemeMultipleColorTokens } - override open var colorBorderOnBackgroundBrandSecondary: ColorSemanticToken { Self.mockThemeMultipleColorTokens } + override open var colorBorderOnBgBrandSecondary: ColorSemanticToken { Self.mockThemeMultipleColorTokens } - override open var colorBorderOnBackgroundBrandTertiary: ColorSemanticToken { Self.mockThemeMultipleColorTokens } + override open var colorBorderOnBgBrandTertiary: ColorSemanticToken { Self.mockThemeMultipleColorTokens } // MARK: Semantic token - Colors - Action override open var colorActionSelected: ColorSemanticToken { Self.mockThemeMultipleColorTokens } - override open var colorActionSelectedOnBackgroundEmphasized: ColorSemanticToken { Self.mockThemeMultipleColorTokens } + override open var colorActionSelectedOnBgEmphasized: ColorSemanticToken { Self.mockThemeMultipleColorTokens } override open var colorActionDisabled: ColorSemanticToken { Self.mockThemeMultipleColorTokens } - override open var colorActionDisabledOnBackgroundEmphasized: ColorSemanticToken { Self.mockThemeMultipleColorTokens } + override open var colorActionDisabledOnBgEmphasized: ColorSemanticToken { Self.mockThemeMultipleColorTokens } override open var colorActionVisited: ColorSemanticToken { Self.mockThemeMultipleColorTokens } - override open var colorActionVistedOnBackgroundEmphasized: ColorSemanticToken { Self.mockThemeMultipleColorTokens } + override open var colorActionVistedOnBgEmphasized: ColorSemanticToken { Self.mockThemeMultipleColorTokens } override open var colorActionPrimaryEnabled: ColorSemanticToken { Self.mockThemeMultipleColorTokens } - override open var colorActionPrimaryEnabledOnBackgroundEmphasized: ColorSemanticToken { Self.mockThemeMultipleColorTokens } + override open var colorActionPrimaryEnabledOnBgEmphasized: ColorSemanticToken { Self.mockThemeMultipleColorTokens } override open var colorActionPrimaryHover: ColorSemanticToken { Self.mockThemeMultipleColorTokens } - override open var colorActionPrimaryHoverOnBackgroundEmphasized: ColorSemanticToken { Self.mockThemeMultipleColorTokens } + override open var colorActionPrimaryHoverOnBgEmphasized: ColorSemanticToken { Self.mockThemeMultipleColorTokens } override open var colorActionPrimaryPressed: ColorSemanticToken { Self.mockThemeMultipleColorTokens } - override open var colorActionPrimaryPressedOnBackgroundEmphasized: ColorSemanticToken { Self.mockThemeMultipleColorTokens } + override open var colorActionPrimaryPressedOnBgEmphasized: ColorSemanticToken { Self.mockThemeMultipleColorTokens } override open var colorActionPrimaryLoading: ColorSemanticToken { Self.mockThemeMultipleColorTokens } - override open var colorActionPrimaryLoadingOnBackgroundEmphasized: ColorSemanticToken { Self.mockThemeMultipleColorTokens } + override open var colorActionPrimaryLoadingOnBgEmphasized: ColorSemanticToken { Self.mockThemeMultipleColorTokens } override open var colorActionPrimaryFocus: ColorSemanticToken { Self.mockThemeMultipleColorTokens } - override open var colorActionPrimaryFocusOnBackgroundEmphasized: ColorSemanticToken { Self.mockThemeMultipleColorTokens } + override open var colorActionPrimaryFocusOnBgEmphasized: ColorSemanticToken { Self.mockThemeMultipleColorTokens } override open var colorActionSecondaryEnabled: ColorSemanticToken { Self.mockThemeMultipleColorTokens } - override open var colorActionSecondaryEnabledOnBackgroundEmphasized: ColorSemanticToken { Self.mockThemeMultipleColorTokens } + override open var colorActionSecondaryEnabledOnBgEmphasized: ColorSemanticToken { Self.mockThemeMultipleColorTokens } override open var colorActionSecondaryHover: ColorSemanticToken { Self.mockThemeMultipleColorTokens } - override open var colorActionSecondaryHoverOnBackgroundEmphasized: ColorSemanticToken { Self.mockThemeMultipleColorTokens } + override open var colorActionSecondaryHoverOnBgEmphasized: ColorSemanticToken { Self.mockThemeMultipleColorTokens } override open var colorActionSecondaryPressed: ColorSemanticToken { Self.mockThemeMultipleColorTokens } - override open var colorActionSecondaryPressedOnBackgroundEmphasized: ColorSemanticToken { Self.mockThemeMultipleColorTokens } + override open var colorActionSecondaryPressedOnBgEmphasized: ColorSemanticToken { Self.mockThemeMultipleColorTokens } override open var colorActionSecondaryLoading: ColorSemanticToken { Self.mockThemeMultipleColorTokens } - override open var colorActionSecondaryLoadingOnBackgroundEmphasized: ColorSemanticToken { Self.mockThemeMultipleColorTokens } + override open var colorActionSecondaryLoadingOnBgEmphasized: ColorSemanticToken { Self.mockThemeMultipleColorTokens } override open var colorActionSecondaryFocus: ColorSemanticToken { Self.mockThemeMultipleColorTokens } - override open var colorActionSecondaryFocusOnBackgroundEmphasized: ColorSemanticToken { Self.mockThemeMultipleColorTokens } + override open var colorActionSecondaryFocusOnBgEmphasized: ColorSemanticToken { Self.mockThemeMultipleColorTokens } override open var colorActionNegativeEnabled: ColorSemanticToken { Self.mockThemeMultipleColorTokens } @@ -239,51 +239,51 @@ extension MockTheme { override open var colorActionNegativeFocus: ColorSemanticToken { Self.mockThemeMultipleColorTokens } - override open var colorActionOnBackgroundActionDisabled: ColorSemanticToken { Self.mockThemeMultipleColorTokens } + override open var colorActionOnBgActionDisabled: ColorSemanticToken { Self.mockThemeMultipleColorTokens } - override open var colorActionOnBackgroundActionDisabledOnBackgroundEmphasized: ColorSemanticToken { Self.mockThemeMultipleColorTokens } + override open var colorActionOnBgActionDisabledOnBgEmphasized: ColorSemanticToken { Self.mockThemeMultipleColorTokens } - override open var colorActionOnBackgroundActionNegative: ColorSemanticToken { Self.mockThemeMultipleColorTokens } + override open var colorActionOnBgActionNegative: ColorSemanticToken { Self.mockThemeMultipleColorTokens } - override open var colorActionOnBackgroundActionPrimaryEnabled: ColorSemanticToken { Self.mockThemeMultipleColorTokens } + override open var colorActionOnBgActionPrimaryEnabled: ColorSemanticToken { Self.mockThemeMultipleColorTokens } - override open var colorActionOnBackgroundActionPrimaryEnabledOnBackgroundEmphasized: ColorSemanticToken { Self.mockThemeMultipleColorTokens } + override open var colorActionOnBgActionPrimaryEnabledOnBgEmphasized: ColorSemanticToken { Self.mockThemeMultipleColorTokens } - override open var colorActionOnBackgroundActionPrimaryHover: ColorSemanticToken { Self.mockThemeMultipleColorTokens } + override open var colorActionOnBgActionPrimaryHover: ColorSemanticToken { Self.mockThemeMultipleColorTokens } - override open var colorActionOnBackgroundActionPrimaryHoverOnBackgroundEmphasized: ColorSemanticToken { Self.mockThemeMultipleColorTokens } + override open var colorActionOnBgActionPrimaryHoverOnBgEmphasized: ColorSemanticToken { Self.mockThemeMultipleColorTokens } - override open var colorActionOnBackgroundActionPrimaryPressed: ColorSemanticToken { Self.mockThemeMultipleColorTokens } + override open var colorActionOnBgActionPrimaryPressed: ColorSemanticToken { Self.mockThemeMultipleColorTokens } - override open var colorActionOnBackgroundActionPrimaryPressedOnBackgroundEmphasized: ColorSemanticToken { Self.mockThemeMultipleColorTokens } + override open var colorActionOnBgActionPrimaryPressedOnBgEmphasized: ColorSemanticToken { Self.mockThemeMultipleColorTokens } - override open var colorActionOnBackgroundActionPrimaryLoading: ColorSemanticToken { Self.mockThemeMultipleColorTokens } + override open var colorActionOnBgActionPrimaryLoading: ColorSemanticToken { Self.mockThemeMultipleColorTokens } - override open var colorActionOnBackgroundActionPrimaryLoadingOnBackgroundEmphasized: ColorSemanticToken { Self.mockThemeMultipleColorTokens } + override open var colorActionOnBgActionPrimaryLoadingOnBgEmphasized: ColorSemanticToken { Self.mockThemeMultipleColorTokens } - override open var colorActionOnBackgroundActionPrimaryFocus: ColorSemanticToken { Self.mockThemeMultipleColorTokens } + override open var colorActionOnBgActionPrimaryFocus: ColorSemanticToken { Self.mockThemeMultipleColorTokens } - override open var colorActionOnBackgroundActionPrimaryFocusOnBackgroundEmphasized: ColorSemanticToken { Self.mockThemeMultipleColorTokens } + override open var colorActionOnBgActionPrimaryFocusOnBgEmphasized: ColorSemanticToken { Self.mockThemeMultipleColorTokens } - override open var colorActionOnBackgroundActionSecondaryEnabled: ColorSemanticToken { Self.mockThemeMultipleColorTokens } + override open var colorActionOnBgActionSecondaryEnabled: ColorSemanticToken { Self.mockThemeMultipleColorTokens } - override open var colorActionOnBackgroundActionSecondaryEnabledOnBackgroundEmphasized: ColorSemanticToken { Self.mockThemeMultipleColorTokens } + override open var colorActionOnBgActionSecondaryEnabledOnBgEmphasized: ColorSemanticToken { Self.mockThemeMultipleColorTokens } - override open var colorActionOnBackgroundActionSecondaryHover: ColorSemanticToken { Self.mockThemeMultipleColorTokens } + override open var colorActionOnBgActionSecondaryHover: ColorSemanticToken { Self.mockThemeMultipleColorTokens } - override open var colorActionOnBackgroundActionSecondaryHoverOnBackgroundEmphasized: ColorSemanticToken { Self.mockThemeMultipleColorTokens } + override open var colorActionOnBgActionSecondaryHoverOnBgEmphasized: ColorSemanticToken { Self.mockThemeMultipleColorTokens } - override open var colorActionOnBackgroundActionSecondaryPressed: ColorSemanticToken { Self.mockThemeMultipleColorTokens } + override open var colorActionOnBgActionSecondaryPressed: ColorSemanticToken { Self.mockThemeMultipleColorTokens } - override open var colorActionOnBackgroundActionSecondaryPressedOnBackgroundEmphasized: ColorSemanticToken { Self.mockThemeMultipleColorTokens } + override open var colorActionOnBgActionSecondaryPressedOnBgEmphasized: ColorSemanticToken { Self.mockThemeMultipleColorTokens } - override open var colorActionOnBackgroundActionSecondaryLoading: ColorSemanticToken { Self.mockThemeMultipleColorTokens } + override open var colorActionOnBgActionSecondaryLoading: ColorSemanticToken { Self.mockThemeMultipleColorTokens } - override open var colorActionOnBackgroundActionSecondaryLoadingOnBackgroundEmphasized: ColorSemanticToken { Self.mockThemeMultipleColorTokens } + override open var colorActionOnBgActionSecondaryLoadingOnBgEmphasized: ColorSemanticToken { Self.mockThemeMultipleColorTokens } - override open var colorActionOnBackgroundActionSecondaryFocus: ColorSemanticToken { Self.mockThemeMultipleColorTokens } + override open var colorActionOnBgActionSecondaryFocus: ColorSemanticToken { Self.mockThemeMultipleColorTokens } - override open var colorActionOnBackgroundActionSecondaryFocusOnBackgroundEmphasized: ColorSemanticToken { Self.mockThemeMultipleColorTokens } + override open var colorActionOnBgActionSecondaryFocusOnBgEmphasized: ColorSemanticToken { Self.mockThemeMultipleColorTokens } // MARK: Semantic token - Colors - Always @@ -301,19 +301,19 @@ extension MockTheme { override open var colorAlwaysAccent: ColorSemanticToken { Self.mockThemeMultipleColorTokens } - override open var colorAlwaysOnBackgroundBlack: ColorSemanticToken { Self.mockThemeMultipleColorTokens } + override open var colorAlwaysOnBgBlack: ColorSemanticToken { Self.mockThemeMultipleColorTokens } - override open var colorAlwaysOnBackgroundWhite: ColorSemanticToken { Self.mockThemeMultipleColorTokens } + override open var colorAlwaysOnBgWhite: ColorSemanticToken { Self.mockThemeMultipleColorTokens } - override open var colorAlwaysOnBackgroundWarning: ColorSemanticToken { Self.mockThemeMultipleColorTokens } + override open var colorAlwaysOnBgWarning: ColorSemanticToken { Self.mockThemeMultipleColorTokens } - override open var colorAlwaysOnBackgroundNegative: ColorSemanticToken { Self.mockThemeMultipleColorTokens } + override open var colorAlwaysOnBgNegative: ColorSemanticToken { Self.mockThemeMultipleColorTokens } - override open var colorAlwaysOnBackgroundPositive: ColorSemanticToken { Self.mockThemeMultipleColorTokens } + override open var colorAlwaysOnBgPositive: ColorSemanticToken { Self.mockThemeMultipleColorTokens } - override open var colorAlwaysOnBackgroundInfo: ColorSemanticToken { Self.mockThemeMultipleColorTokens } + override open var colorAlwaysOnBgInfo: ColorSemanticToken { Self.mockThemeMultipleColorTokens } - override open var colorAlwaysOnBackgroundAccent: ColorSemanticToken { Self.mockThemeMultipleColorTokens } + override open var colorAlwaysOnBgAccent: ColorSemanticToken { Self.mockThemeMultipleColorTokens } // MARK: Semantic token - Colors - Transparent @@ -323,49 +323,37 @@ extension MockTheme { override open var colorElevationRaised: ColorSemanticToken { Self.mockThemeMultipleColorTokens } - override open var colorElevationRaisedOnBackgroundSecondary: ColorSemanticToken { Self.mockThemeMultipleColorTokens } + override open var colorElevationRaisedOnBgSecondary: ColorSemanticToken { Self.mockThemeMultipleColorTokens } - override open var colorElevationRaisedOnBackgroundEmphasized: ColorSemanticToken { Self.mockThemeMultipleColorTokens } + override open var colorElevationRaisedOnBgEmphasized: ColorSemanticToken { Self.mockThemeMultipleColorTokens } override open var colorElevationDrag: ColorSemanticToken { Self.mockThemeMultipleColorTokens } - override open var colorElevationDragOnBackgroundSecondary: ColorSemanticToken { Self.mockThemeMultipleColorTokens } + override open var colorElevationDragOnBgSecondary: ColorSemanticToken { Self.mockThemeMultipleColorTokens } - override open var colorElevationDragOnBackgroundEmphasized: ColorSemanticToken { Self.mockThemeMultipleColorTokens } + override open var colorElevationDragOnBgEmphasized: ColorSemanticToken { Self.mockThemeMultipleColorTokens } override open var colorElevationOverlayDefault: ColorSemanticToken { Self.mockThemeMultipleColorTokens } - override open var colorElevationOverlayDefaultOnBackgroundSecondary: ColorSemanticToken { Self.mockThemeMultipleColorTokens } + override open var colorElevationOverlayDefaultOnBgSecondary: ColorSemanticToken { Self.mockThemeMultipleColorTokens } - override open var colorElevationOverlayDefaultOnBackgroundEmphasized: ColorSemanticToken { Self.mockThemeMultipleColorTokens } + override open var colorElevationOverlayDefaultOnBgEmphasized: ColorSemanticToken { Self.mockThemeMultipleColorTokens } override open var colorElevationOverlayEmphasized: ColorSemanticToken { Self.mockThemeMultipleColorTokens } - override open var colorElevationOverlayEmphasizedOnBackgroundSecondary: ColorSemanticToken { Self.mockThemeMultipleColorTokens } + override open var colorElevationOverlayEmphasizedOnBgSecondary: ColorSemanticToken { Self.mockThemeMultipleColorTokens } - override open var colorElevationOverlayEmphasizedOnBackgroundEmphasized: ColorSemanticToken { Self.mockThemeMultipleColorTokens } + override open var colorElevationOverlayEmphasizedOnBgEmphasized: ColorSemanticToken { Self.mockThemeMultipleColorTokens } override open var colorElevationModal: ColorSemanticToken { Self.mockThemeMultipleColorTokens } // MARK: Semantic token - Colors - Decorative - override open var colorDecorativeBrandPrimary: ColorSemanticToken { Self.mockThemeMultipleColorTokens } - - override open var colorDecorativeBrandPrimaryMuted: ColorSemanticToken { Self.mockThemeMultipleColorTokens } - - override open var colorDecorativeBrandPrimaryEmphasized: ColorSemanticToken { Self.mockThemeMultipleColorTokens } + override open var colorDecorativePrimary: ColorSemanticToken { Self.mockThemeMultipleColorTokens } override open var colorDecorativeSecondary: ColorSemanticToken { Self.mockThemeMultipleColorTokens } - override open var colorDecorativeSecondaryMuted: ColorSemanticToken { Self.mockThemeMultipleColorTokens } - - override open var colorDecorativeSecondaryEmphasized: ColorSemanticToken { Self.mockThemeMultipleColorTokens } - - override open var colorDecorativeBrandTertiary: ColorSemanticToken { Self.mockThemeMultipleColorTokens } - - override open var colorDecorativeBrandTertiaryMuted: ColorSemanticToken { Self.mockThemeMultipleColorTokens } - - override open var colorDecorativeBrandTertiaryEmphasized: ColorSemanticToken { Self.mockThemeMultipleColorTokens } + override open var colorDecorativeTertiary: ColorSemanticToken { Self.mockThemeMultipleColorTokens } override open var colorDecorativeNeutralMuted: ColorSemanticToken { Self.mockThemeMultipleColorTokens } @@ -403,23 +391,23 @@ extension MockTheme { override open var colorDecorativeAccent5Emphasized: ColorSemanticToken { Self.mockThemeMultipleColorTokens } - override open var colorDecorativeSkintTint100: ColorSemanticToken { Self.mockThemeMultipleColorTokens } + override open var colorDecorativeSkinTint100: ColorSemanticToken { Self.mockThemeMultipleColorTokens } - override open var colorDecorativeSkintTint200: ColorSemanticToken { Self.mockThemeMultipleColorTokens } + override open var colorDecorativeSkinTint200: ColorSemanticToken { Self.mockThemeMultipleColorTokens } - override open var colorDecorativeSkintTint300: ColorSemanticToken { Self.mockThemeMultipleColorTokens } + override open var colorDecorativeSkinTint300: ColorSemanticToken { Self.mockThemeMultipleColorTokens } - override open var colorDecorativeSkintTint400: ColorSemanticToken { Self.mockThemeMultipleColorTokens } + override open var colorDecorativeSkinTint400: ColorSemanticToken { Self.mockThemeMultipleColorTokens } - override open var colorDecorativeSkintTint500: ColorSemanticToken { Self.mockThemeMultipleColorTokens } + override open var colorDecorativeSkinTint500: ColorSemanticToken { Self.mockThemeMultipleColorTokens } - override open var colorDecorativeSkintTint600: ColorSemanticToken { Self.mockThemeMultipleColorTokens } + override open var colorDecorativeSkinTint600: ColorSemanticToken { Self.mockThemeMultipleColorTokens } - override open var colorDecorativeSkintTint700: ColorSemanticToken { Self.mockThemeMultipleColorTokens } + override open var colorDecorativeSkinTint700: ColorSemanticToken { Self.mockThemeMultipleColorTokens } - override open var colorDecorativeSkintTint800: ColorSemanticToken { Self.mockThemeMultipleColorTokens } + override open var colorDecorativeSkinTint800: ColorSemanticToken { Self.mockThemeMultipleColorTokens } - override open var colorDecorativeSkintTint900: ColorSemanticToken { Self.mockThemeMultipleColorTokens } + override open var colorDecorativeSkinTint900: ColorSemanticToken { Self.mockThemeMultipleColorTokens } // MARK: Semantic token - Colors - Chart diff --git a/OUDS/Core/OUDS/Tests/OUDSTheme/MockThemes/MockTheme+ElevationCompositeSemanticTokens.swift b/OUDS/Core/OUDS/Tests/OUDSTheme/MockThemes/MockTheme+ElevationCompositeSemanticTokens.swift new file mode 100644 index 000000000..ac60ea9aa --- /dev/null +++ b/OUDS/Core/OUDS/Tests/OUDSTheme/MockThemes/MockTheme+ElevationCompositeSemanticTokens.swift @@ -0,0 +1,39 @@ +// +// 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 + +extension MockTheme { + + static let mockThemeElevationCompositeSemanticToken = ElevationCompositeSemanticToken(ElevationRawTokens.elevationBottom_1_600) + + // MARK: Semantic token - Elevation - Box shadow + + override open var elevationNone: ElevationCompositeSemanticToken { Self.mockThemeElevationCompositeSemanticToken } + + override open var elevationRaised: ElevationCompositeSemanticToken { Self.mockThemeElevationCompositeSemanticToken } + + override open var elevationDrag: ElevationCompositeSemanticToken { Self.mockThemeElevationCompositeSemanticToken } + + override open var elevationOverlayDefault: ElevationCompositeSemanticToken { Self.mockThemeElevationCompositeSemanticToken } + + override open var elevationOverlayEmphasized: ElevationCompositeSemanticToken { Self.mockThemeElevationCompositeSemanticToken } + + override open var elevationStickyDefault: ElevationCompositeSemanticToken { Self.mockThemeElevationCompositeSemanticToken } + + override open var elevationStickyEmphasized: ElevationCompositeSemanticToken { Self.mockThemeElevationCompositeSemanticToken } + + override open var elevationStickyNavigationScrolled: ElevationCompositeSemanticToken { Self.mockThemeElevationCompositeSemanticToken } +} diff --git a/OUDS/Core/OUDS/Tests/OUDSTheme/MockThemes/MockTheme+ElevationSemanticTokens.swift b/OUDS/Core/OUDS/Tests/OUDSTheme/MockThemes/MockTheme+ElevationSemanticTokens.swift index c20e66a3f..f0742e68d 100644 --- a/OUDS/Core/OUDS/Tests/OUDSTheme/MockThemes/MockTheme+ElevationSemanticTokens.swift +++ b/OUDS/Core/OUDS/Tests/OUDSTheme/MockThemes/MockTheme+ElevationSemanticTokens.swift @@ -24,8 +24,6 @@ extension MockTheme { static let mockThemeElevationBlurRawToken: ElevationRawToken = 816 static let mockThemeElevationColorRawToken: ColorRawToken = ColorRawTokens.colorFunctionalMalachite500 static let mockThemeElevationMultipleColorSemanticToken = ElevationColorSemanticToken(mockThemeElevationColorRawToken) - static let mockThemeElevationCompositeRawToken = ElevationCompositeRawToken(x: 118, y: 712, blur: 118, color: ColorRawTokens.colorFunctionalDodgerBlue800) - static let mockThemeElevationCompositeSemanticToken = ElevationCompositeSemanticToken(ElevationRawTokens.elevationBottom_1_600) // MARK: Semantic token - Elevation - X @@ -37,7 +35,6 @@ extension MockTheme { override open var elevationXStickyDefault: ElevationYSemanticToken { Self.mockThemeElevationXRawToken } override open var elevationXStickyEmphasized: ElevationYSemanticToken { Self.mockThemeElevationXRawToken } override open var elevationXStickyNavigationScrolled: ElevationYSemanticToken { Self.mockThemeElevationXRawToken } - override open var elevationXFocus: ElevationYSemanticToken { Self.mockThemeElevationXRawToken } // MARK: Semantic token - Elevation - Y @@ -49,7 +46,6 @@ extension MockTheme { override open var elevationYStickyDefault: ElevationYSemanticToken { Self.mockThemeElevationYRawToken } override open var elevationYStickyEmphasized: ElevationYSemanticToken { Self.mockThemeElevationYRawToken } override open var elevationYStickyNavigationScrolled: ElevationYSemanticToken { Self.mockThemeElevationYRawToken } - override open var elevationYFocus: ElevationYSemanticToken { Self.mockThemeElevationYRawToken } // MARK: Semantic token - Elevation - Blur @@ -61,7 +57,6 @@ extension MockTheme { override open var elevationBlurStickyDefault: ElevationBlurSemanticToken { Self.mockThemeElevationBlurRawToken } override open var elevationBlurStickyEmphasized: ElevationBlurSemanticToken { Self.mockThemeElevationBlurRawToken } override open var elevationBlurStickyNavigationScrolled: ElevationBlurSemanticToken { Self.mockThemeElevationBlurRawToken } - override open var elevationBlurFocus: ElevationBlurSemanticToken { Self.mockThemeElevationBlurRawToken } // MARK: Semantic token - Elevation - Color - None @@ -94,27 +89,5 @@ extension MockTheme { // MARK: Semantic token - Elevation - Color - Sticky - Navigation scrolled override open var elevationColorStickyNavigationScrolled: ElevationColorSemanticToken { Self.mockThemeElevationMultipleColorSemanticToken } - - // MARK: Semantic token - Elevation - Color - Focus - - override open var elevationColorFocus: ElevationColorSemanticToken { Self.mockThemeElevationMultipleColorSemanticToken } - - // MARK: Semantic token - Elevation - Box shadow - - override open var elevationRaised: ElevationCompositeSemanticToken { Self.mockThemeElevationCompositeSemanticToken } - - override open var elevationDrag: ElevationCompositeSemanticToken { Self.mockThemeElevationCompositeSemanticToken } - - override open var elevationOverlayDefault: ElevationCompositeSemanticToken { Self.mockThemeElevationCompositeSemanticToken } - - override open var elevationOverlayEmphasized: ElevationCompositeSemanticToken { Self.mockThemeElevationCompositeSemanticToken } - - override open var elevationStickyDefault: ElevationCompositeSemanticToken { Self.mockThemeElevationCompositeSemanticToken } - - override open var elevationStickyEmphasized: ElevationCompositeSemanticToken { Self.mockThemeElevationCompositeSemanticToken } - - override open var elevationStickyNavigationScrolled: ElevationCompositeSemanticToken { Self.mockThemeElevationCompositeSemanticToken } - - override open var elevationFocus: ElevationCompositeSemanticToken { Self.mockThemeElevationCompositeSemanticToken } } // swiftlint:enable identifier_name diff --git a/OUDS/Core/OUDS/Tests/OUDSTheme/MockThemes/MockTheme+SizeSemanticTokens.swift b/OUDS/Core/OUDS/Tests/OUDSTheme/MockThemes/MockTheme+SizeSemanticTokens.swift new file mode 100644 index 000000000..97b805c75 --- /dev/null +++ b/OUDS/Core/OUDS/Tests/OUDSTheme/MockThemes/MockTheme+SizeSemanticTokens.swift @@ -0,0 +1,94 @@ +// +// 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 OUDSTokensRaw +import OUDSTokensSemantic + +extension MockTheme { + + static let mockThemeSizeRawToken: DimensionRawToken = 118_000 + static let mockThemeSizeCompositeToken = MultipleSizeTokens(compact: 1, regular: 151) + + // MARK: - Semantic token - Sizing - Icon with typography + + override open var sizeIconWithHeadingXLargeShort: MultipleSizeTokens { Self.mockThemeSizeCompositeToken } + override open var sizeIconWithHeadingXLargeMedium: MultipleSizeTokens { Self.mockThemeSizeCompositeToken } + override open var sizeIconWithHeadingXLargeTall: MultipleSizeTokens { Self.mockThemeSizeCompositeToken } + + override open var sizeIconWithHeadingLargeShort: MultipleSizeTokens { Self.mockThemeSizeCompositeToken } + override open var sizeIconWithHeadingLargeMedium: MultipleSizeTokens { Self.mockThemeSizeCompositeToken } + override open var sizeIconWithHeadingLargeTall: MultipleSizeTokens { Self.mockThemeSizeCompositeToken } + + override open var sizeIconWithHeadingMediumShort: MultipleSizeTokens { Self.mockThemeSizeCompositeToken } + override open var sizeIconWithHeadingMediumMedium: MultipleSizeTokens { Self.mockThemeSizeCompositeToken } + override open var sizeIconWithHeadingMediumTall: MultipleSizeTokens { Self.mockThemeSizeCompositeToken } + + override open var sizeIconWithHeadingSmallShort: MultipleSizeTokens { Self.mockThemeSizeCompositeToken } + override open var sizeIconWithHeadingSmallMedium: MultipleSizeTokens { Self.mockThemeSizeCompositeToken } + override open var sizeIconWithHeadingSmallTall: MultipleSizeTokens { Self.mockThemeSizeCompositeToken } + + override open var sizeIconWithBodyLargeShort: MultipleSizeTokens { Self.mockThemeSizeCompositeToken } + override open var sizeIconWithBodyLargeMedium: MultipleSizeTokens { Self.mockThemeSizeCompositeToken } + override open var sizeIconWithBodyLargeTall: MultipleSizeTokens { Self.mockThemeSizeCompositeToken } + + override open var sizeIconWithBodyMediumShort: MultipleSizeTokens { Self.mockThemeSizeCompositeToken } + override open var sizeIconWithBodyMediumMedium: MultipleSizeTokens { Self.mockThemeSizeCompositeToken } + override open var sizeIconWithBodyMediumTall: MultipleSizeTokens { Self.mockThemeSizeCompositeToken } + + override open var sizeIconWithBodySmallShort: MultipleSizeTokens { Self.mockThemeSizeCompositeToken } + override open var sizeIconWithBodySmallMedium: MultipleSizeTokens { Self.mockThemeSizeCompositeToken } + override open var sizeIconWithBodySmallTall: MultipleSizeTokens { Self.mockThemeSizeCompositeToken } + + override open var sizeIconWithLabelXLargeSizeShort: SizeSemanticToken { Self.mockThemeSizeRawToken } + override open var sizeIconWithLabelXLargeSizeMedium: SizeSemanticToken { Self.mockThemeSizeRawToken } + override open var sizeIconWithLabelXLargeSizeTall: SizeSemanticToken { Self.mockThemeSizeRawToken } + + override open var sizeIconWithLabelLargeSizeShorter: SizeSemanticToken { Self.mockThemeSizeRawToken } + override open var sizeIconWithLabelLargeSizeShort: SizeSemanticToken { Self.mockThemeSizeRawToken } + override open var sizeIconWithLabelLargeSizeMedium: SizeSemanticToken { Self.mockThemeSizeRawToken } + override open var sizeIconWithLabelLargeSizeTall: SizeSemanticToken { Self.mockThemeSizeRawToken } + override open var sizeIconWithLabelLargeSizeTaller: SizeSemanticToken { Self.mockThemeSizeRawToken } + + override open var sizeIconWithLabelMediumSizeShort: SizeSemanticToken { Self.mockThemeSizeRawToken } + override open var sizeIconWithLabelMediumSizeMedium: SizeSemanticToken { Self.mockThemeSizeRawToken } + override open var sizeIconWithLabelMediumSizeTall: SizeSemanticToken { Self.mockThemeSizeRawToken } + + override open var sizeIconWithLabelSmallSizeShort: SizeSemanticToken { Self.mockThemeSizeRawToken } + override open var sizeIconWithLabelSmallSizeMedium: SizeSemanticToken { Self.mockThemeSizeRawToken } + override open var sizeIconWithLabelSmallSizeTall: SizeSemanticToken { Self.mockThemeSizeRawToken } + + // MARK: - Semantic token - Sizing - Icon decorative + + override open var sizeIconDecorativeShortest: SizeSemanticToken { Self.mockThemeSizeRawToken } + override open var sizeIconDecorativeShorter: SizeSemanticToken { Self.mockThemeSizeRawToken } + override open var sizeIconDecorativeShort: SizeSemanticToken { Self.mockThemeSizeRawToken } + override open var sizeIconDecorativeMedium: SizeSemanticToken { Self.mockThemeSizeRawToken } + override open var sizeIconDecorativeTall: SizeSemanticToken { Self.mockThemeSizeRawToken } + override open var sizeIconDecorativeTaller: SizeSemanticToken { Self.mockThemeSizeRawToken } + override open var sizeIconDecorativeTallest: SizeSemanticToken { Self.mockThemeSizeRawToken } + + // MARK: - Semantic token - Sizing - Max width typography + + override open var sizeMaxWidthTypeDisplayLarge: MultipleSizeTokens { Self.mockThemeSizeCompositeToken } + override open var sizeMaxWidthTypeDisplayMedium: MultipleSizeTokens { Self.mockThemeSizeCompositeToken } + override open var sizeMaxWidthTypeDisplaySmall: MultipleSizeTokens { Self.mockThemeSizeCompositeToken } + + override open var sizeMaxWidthTypeHeadingXLarge: MultipleSizeTokens { Self.mockThemeSizeCompositeToken } + override open var sizeMaxWidthTypeHeadingLarge: MultipleSizeTokens { Self.mockThemeSizeCompositeToken } + override open var sizeMaxWidthTypeHeadingMedium: MultipleSizeTokens { Self.mockThemeSizeCompositeToken } + override open var sizeMaxWidthTypeHeadingSmall: MultipleSizeTokens { Self.mockThemeSizeCompositeToken } + + override open var sizeMaxWidthTypeBodyLarge: MultipleSizeTokens { Self.mockThemeSizeCompositeToken } + override open var sizeMaxWidthTypeBodyMedium: MultipleSizeTokens { Self.mockThemeSizeCompositeToken } + override open var sizeMaxWidthTypeBodySmall: MultipleSizeTokens { Self.mockThemeSizeCompositeToken } +} diff --git a/OUDS/Core/OUDS/Tests/OUDSTheme/MockThemes/MockTheme+SizingSemanticTokens.swift b/OUDS/Core/OUDS/Tests/OUDSTheme/MockThemes/MockTheme+SizingSemanticTokens.swift deleted file mode 100644 index 549f40169..000000000 --- a/OUDS/Core/OUDS/Tests/OUDSTheme/MockThemes/MockTheme+SizingSemanticTokens.swift +++ /dev/null @@ -1,94 +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 OUDSTokensRaw -import OUDSTokensSemantic - -extension MockTheme { - - static let mockThemeSizeRawToken: DimensionRawToken = 118_000 - static let mockThemeSizeCompositeToken = MultipleSizingTokens(compact: 1, regular: 151) - - // MARK: - Semantic token - Sizing - Icon with typography - - override open var sizeIconWithHeadingXLargeShort: MultipleSizingTokens { Self.mockThemeSizeCompositeToken } - override open var sizeIconWithHeadingXLargeMedium: MultipleSizingTokens { Self.mockThemeSizeCompositeToken } - override open var sizeIconWithHeadingXLargeTall: MultipleSizingTokens { Self.mockThemeSizeCompositeToken } - - override open var sizeIconWithHeadingLargeShort: MultipleSizingTokens { Self.mockThemeSizeCompositeToken } - override open var sizeIconWithHeadingLargeMedium: MultipleSizingTokens { Self.mockThemeSizeCompositeToken } - override open var sizeIconWithHeadingLargeTall: MultipleSizingTokens { Self.mockThemeSizeCompositeToken } - - override open var sizeIconWithHeadingMediumShort: MultipleSizingTokens { Self.mockThemeSizeCompositeToken } - override open var sizeIconWithHeadingMediumMedium: MultipleSizingTokens { Self.mockThemeSizeCompositeToken } - override open var sizeIconWithHeadingMediumTall: MultipleSizingTokens { Self.mockThemeSizeCompositeToken } - - override open var sizeIconWithHeadingSmallShort: MultipleSizingTokens { Self.mockThemeSizeCompositeToken } - override open var sizeIconWithHeadingSmallMedium: MultipleSizingTokens { Self.mockThemeSizeCompositeToken } - override open var sizeIconWithHeadingSmallTall: MultipleSizingTokens { Self.mockThemeSizeCompositeToken } - - override open var sizeIconWithBodyLargeShort: MultipleSizingTokens { Self.mockThemeSizeCompositeToken } - override open var sizeIconWithBodyLargeMedium: MultipleSizingTokens { Self.mockThemeSizeCompositeToken } - override open var sizeIconWithBodyLargeTall: MultipleSizingTokens { Self.mockThemeSizeCompositeToken } - - override open var sizeIconWithBodyMediumShort: MultipleSizingTokens { Self.mockThemeSizeCompositeToken } - override open var sizeIconWithBodyMediumMedium: MultipleSizingTokens { Self.mockThemeSizeCompositeToken } - override open var sizeIconWithBodyMediumTall: MultipleSizingTokens { Self.mockThemeSizeCompositeToken } - - override open var sizeIconWithBodySmallShort: MultipleSizingTokens { Self.mockThemeSizeCompositeToken } - override open var sizeIconWithBodySmallMedium: MultipleSizingTokens { Self.mockThemeSizeCompositeToken } - override open var sizeIconWithBodySmallTall: MultipleSizingTokens { Self.mockThemeSizeCompositeToken } - - override open var sizeIconWithLabelXLargeSizeShort: SizingSemanticToken { Self.mockThemeSizeRawToken } - override open var sizeIconWithLabelXLargeSizeMedium: SizingSemanticToken { Self.mockThemeSizeRawToken } - override open var sizeIconWithLabelXLargeSizeTall: SizingSemanticToken { Self.mockThemeSizeRawToken } - - override open var sizeIconWithLabelLargeSizeShorter: SizingSemanticToken { Self.mockThemeSizeRawToken } - override open var sizeIconWithLabelLargeSizeShort: SizingSemanticToken { Self.mockThemeSizeRawToken } - override open var sizeIconWithLabelLargeSizeMedium: SizingSemanticToken { Self.mockThemeSizeRawToken } - override open var sizeIconWithLabelLargeSizeTall: SizingSemanticToken { Self.mockThemeSizeRawToken } - override open var sizeIconWithLabelLargeSizeTaller: SizingSemanticToken { Self.mockThemeSizeRawToken } - - override open var sizeIconWithLabelMediumSizeShort: SizingSemanticToken { Self.mockThemeSizeRawToken } - override open var sizeIconWithLabelMediumSizeMedium: SizingSemanticToken { Self.mockThemeSizeRawToken } - override open var sizeIconWithLabelMediumSizeTall: SizingSemanticToken { Self.mockThemeSizeRawToken } - - override open var sizeIconWithLabelSmallSizeShort: SizingSemanticToken { Self.mockThemeSizeRawToken } - override open var sizeIconWithLabelSmallSizeMedium: SizingSemanticToken { Self.mockThemeSizeRawToken } - override open var sizeIconWithLabelSmallSizeTall: SizingSemanticToken { Self.mockThemeSizeRawToken } - - // MARK: - Semantic token - Sizing - Icon decorative - - override open var sizeIconDecorativeShortest: SizingSemanticToken { Self.mockThemeSizeRawToken } - override open var sizeIconDecorativeShorter: SizingSemanticToken { Self.mockThemeSizeRawToken } - override open var sizeIconDecorativeShort: SizingSemanticToken { Self.mockThemeSizeRawToken } - override open var sizeIconDecorativeMedium: SizingSemanticToken { Self.mockThemeSizeRawToken } - override open var sizeIconDecorativeTall: SizingSemanticToken { Self.mockThemeSizeRawToken } - override open var sizeIconDecorativeTaller: SizingSemanticToken { Self.mockThemeSizeRawToken } - override open var sizeIconDecorativeTallest: SizingSemanticToken { Self.mockThemeSizeRawToken } - - // MARK: - Semantic token - Sizing - Max width typography - - override open var sizeMaxWidthTypeDisplayLarge: MultipleSizingTokens { Self.mockThemeSizeCompositeToken } - override open var sizeMaxWidthTypeDisplayMedium: MultipleSizingTokens { Self.mockThemeSizeCompositeToken } - override open var sizeMaxWidthTypeDisplaySmall: MultipleSizingTokens { Self.mockThemeSizeCompositeToken } - - override open var sizeMaxWidthTypeHeadingXLarge: MultipleSizingTokens { Self.mockThemeSizeCompositeToken } - override open var sizeMaxWidthTypeHeadingLarge: MultipleSizingTokens { Self.mockThemeSizeCompositeToken } - override open var sizeMaxWidthTypeHeadingMedium: MultipleSizingTokens { Self.mockThemeSizeCompositeToken } - override open var sizeMaxWidthTypeHeadingSmall: MultipleSizingTokens { Self.mockThemeSizeCompositeToken } - - override open var sizeMaxWidthTypeBodyLarge: MultipleSizingTokens { Self.mockThemeSizeCompositeToken } - override open var sizeMaxWidthTypeBodyMedium: MultipleSizingTokens { Self.mockThemeSizeCompositeToken } - override open var sizeMaxWidthTypeBodySmall: MultipleSizingTokens { Self.mockThemeSizeCompositeToken } -} diff --git a/OUDS/Core/OUDS/Tests/OUDSTheme/MockThemes/MockTheme+SpaceSemanticTokens.swift b/OUDS/Core/OUDS/Tests/OUDSTheme/MockThemes/MockTheme+SpaceSemanticTokens.swift new file mode 100644 index 000000000..e77b5a86a --- /dev/null +++ b/OUDS/Core/OUDS/Tests/OUDSTheme/MockThemes/MockTheme+SpaceSemanticTokens.swift @@ -0,0 +1,146 @@ +// +// 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 OUDSTokensRaw +import OUDSTokensSemantic + +extension MockTheme { + + static let mockThemeSpaceRawToken: DimensionRawToken = 911 + static let mockThemeSpaceSemanticToken = MultipleSpaceTokens(compact: 1, regular: 151) + + // MARK: Semantic token - Spacing - Layout fluid + + override open var spaceScaledNone: MultipleSpaceTokens { Self.mockThemeSpaceSemanticToken } + override open var spaceScaledSmash: MultipleSpaceTokens { Self.mockThemeSpaceSemanticToken } + override open var spaceScaledShortest: MultipleSpaceTokens { Self.mockThemeSpaceSemanticToken } + override open var spaceScaledShorter: MultipleSpaceTokens { Self.mockThemeSpaceSemanticToken } + override open var spaceScaledShort: MultipleSpaceTokens { Self.mockThemeSpaceSemanticToken } + override open var spaceScaledMedium: MultipleSpaceTokens { Self.mockThemeSpaceSemanticToken } + override open var spaceScaledTall: MultipleSpaceTokens { Self.mockThemeSpaceSemanticToken } + override open var spaceScaledTaller: MultipleSpaceTokens { Self.mockThemeSpaceSemanticToken } + override open var spaceScaledTallest: MultipleSpaceTokens { Self.mockThemeSpaceSemanticToken } + override open var spaceScaledSpacious: MultipleSpaceTokens { Self.mockThemeSpaceSemanticToken } + + // MARK: Semantic token - Spacing - Layout fix + + override open var spaceFixedNone: SpaceSemanticToken { Self.mockThemeSpaceRawToken } + override open var spaceFixedSmash: SpaceSemanticToken { Self.mockThemeSpaceRawToken } + override open var spaceFixedShortest: SpaceSemanticToken { Self.mockThemeSpaceRawToken } + override open var spaceFixedShorter: SpaceSemanticToken { Self.mockThemeSpaceRawToken } + override open var spaceFixedShort: SpaceSemanticToken { Self.mockThemeSpaceRawToken } + override open var spaceFixedMedium: SpaceSemanticToken { Self.mockThemeSpaceRawToken } + override open var spaceFixedTall: SpaceSemanticToken { Self.mockThemeSpaceRawToken } + override open var spaceFixedTaller: SpaceSemanticToken { Self.mockThemeSpaceRawToken } + override open var spaceFixedTallest: SpaceSemanticToken { Self.mockThemeSpaceRawToken } + override open var spaceFixedSpacious: SpaceSemanticToken { Self.mockThemeSpaceRawToken } + override open var spaceFixedHuge: SpaceSemanticToken { Self.mockThemeSpaceRawToken } + override open var spaceFixedJumbo: SpaceSemanticToken { Self.mockThemeSpaceRawToken } + + // MARK: Semantic token - Spacing - Padding - Padding inline + + override open var spacePaddingInlineNone: SpacePaddingInlineSemanticToken { Self.mockThemeSpaceRawToken } + override open var spacePaddingInlineShorter: SpacePaddingInlineSemanticToken { Self.mockThemeSpaceRawToken } + override open var spacePaddingInlineShort: SpacePaddingInlineSemanticToken { Self.mockThemeSpaceRawToken } + override open var spacePaddingInlineMedium: SpacePaddingInlineSemanticToken { Self.mockThemeSpaceRawToken } + override open var spacePaddingInlineTall: SpacePaddingInlineSemanticToken { Self.mockThemeSpaceRawToken } + override open var spacePaddingInlineTaller: SpacePaddingInlineSemanticToken { Self.mockThemeSpaceRawToken } + override open var spacePaddingInlineTallest: SpacePaddingInlineSemanticToken { Self.mockThemeSpaceRawToken } + + override open var spacePaddingInlineWithIconNone: SpacePaddingInlineSemanticToken { Self.mockThemeSpaceRawToken } + override open var spacePaddingInlineWithIconShortest: SpacePaddingInlineSemanticToken { Self.mockThemeSpaceRawToken } + override open var spacePaddingInlineWithIconShorter: SpacePaddingInlineSemanticToken { Self.mockThemeSpaceRawToken } + override open var spacePaddingInlineWithIconShort: SpacePaddingInlineSemanticToken { Self.mockThemeSpaceRawToken } + override open var spacePaddingInlineWithIconMedium: SpacePaddingInlineSemanticToken { Self.mockThemeSpaceRawToken } + override open var spacePaddingInlineWithIconTall: SpacePaddingInlineSemanticToken { Self.mockThemeSpaceRawToken } + override open var spacePaddingInlineWithIconTaller: SpacePaddingInlineSemanticToken { Self.mockThemeSpaceRawToken } + override open var spacePaddingInlineWithIconTallest: SpacePaddingInlineSemanticToken { Self.mockThemeSpaceRawToken } + + override open var spacePaddingInlineWithArrowNone: SpacePaddingInlineSemanticToken { Self.mockThemeSpaceRawToken } + override open var spacePaddingInlineWithArrowShortest: SpacePaddingInlineSemanticToken { Self.mockThemeSpaceRawToken } + override open var spacePaddingInlineWithArrowShorter: SpacePaddingInlineSemanticToken { Self.mockThemeSpaceRawToken } + override open var spacePaddingInlineWithArrowShort: SpacePaddingInlineSemanticToken { Self.mockThemeSpaceRawToken } + override open var spacePaddingInlineWithArrowMedium: SpacePaddingInlineSemanticToken { Self.mockThemeSpaceRawToken } + override open var spacePaddingInlineWithArrowTall: SpacePaddingInlineSemanticToken { Self.mockThemeSpaceRawToken } + override open var spacePaddingInlineWithArrowTaller: SpacePaddingInlineSemanticToken { Self.mockThemeSpaceRawToken } + override open var spacePaddingInlineWithArrowTallest: SpacePaddingInlineSemanticToken { Self.mockThemeSpaceRawToken } + + // MARK: Semantic token - Padding - Padding stack + + override open var spacePaddingBlockNone: SpacePaddingInlineSemanticToken { Self.mockThemeSpaceRawToken } + override open var spacePaddingBlockShorter: SpacePaddingInlineSemanticToken { Self.mockThemeSpaceRawToken } + override open var spacePaddingBlockShort: SpacePaddingInlineSemanticToken { Self.mockThemeSpaceRawToken } + override open var spacePaddingBlockMedium: SpacePaddingInlineSemanticToken { Self.mockThemeSpaceRawToken } + override open var spacePaddingBlockTall: SpacePaddingInlineSemanticToken { Self.mockThemeSpaceRawToken } + override open var spacePaddingBlockTaller: SpacePaddingInlineSemanticToken { Self.mockThemeSpaceRawToken } + override open var spacePaddingBlockTallest: SpacePaddingInlineSemanticToken { Self.mockThemeSpaceRawToken } + + override open var spacePaddingBlockWithIconNone: SpacePaddingInlineSemanticToken { Self.mockThemeSpaceRawToken } + override open var spacePaddingBlockWithIconShortest: SpacePaddingInlineSemanticToken { Self.mockThemeSpaceRawToken } + override open var spacePaddingBlockWithIconShorter: SpacePaddingInlineSemanticToken { Self.mockThemeSpaceRawToken } + override open var spacePaddingBlockWithIconShort: SpacePaddingInlineSemanticToken { Self.mockThemeSpaceRawToken } + override open var spacePaddingBlockWithIconMedium: SpacePaddingInlineSemanticToken { Self.mockThemeSpaceRawToken } + override open var spacePaddingBlockWithIconTall: SpacePaddingInlineSemanticToken { Self.mockThemeSpaceRawToken } + override open var spacePaddingBlockWithIconTaller: SpacePaddingInlineSemanticToken { Self.mockThemeSpaceRawToken } + + // MARK: Semantic token - Padding - Padding inset + + override open var spaceInsetNone: SpacePaddingInlineSemanticToken { Self.mockThemeSpaceRawToken } + override open var spaceInsetSmash: SpacePaddingInlineSemanticToken { Self.mockThemeSpaceRawToken } + override open var spaceInsetShortest: SpacePaddingInlineSemanticToken { Self.mockThemeSpaceRawToken } + override open var spaceInsetShorter: SpacePaddingInlineSemanticToken { Self.mockThemeSpaceRawToken } + override open var spaceInsetShort: SpacePaddingInlineSemanticToken { Self.mockThemeSpaceRawToken } + override open var spaceInsetMedium: SpacePaddingInlineSemanticToken { Self.mockThemeSpaceRawToken } + override open var spaceInsetTall: SpacePaddingInlineSemanticToken { Self.mockThemeSpaceRawToken } + override open var spaceInsetTaller: SpacePaddingInlineSemanticToken { Self.mockThemeSpaceRawToken } + override open var spaceInsetTallest: SpacePaddingInlineSemanticToken { Self.mockThemeSpaceRawToken } + override open var spaceInsetSpacious: SpacePaddingInlineSemanticToken { Self.mockThemeSpaceRawToken } + + // MARK: Semantic token - Padding - Gap inline + + override open var spaceColumnGapNone: SpacePaddingInlineSemanticToken { Self.mockThemeSpaceRawToken } + override open var spaceColumnGapShorter: SpacePaddingInlineSemanticToken { Self.mockThemeSpaceRawToken } + override open var spaceColumnGapShort: SpacePaddingInlineSemanticToken { Self.mockThemeSpaceRawToken } + override open var spaceColumnGapMedium: SpacePaddingInlineSemanticToken { Self.mockThemeSpaceRawToken } + override open var spaceColumnGapTall: SpacePaddingInlineSemanticToken { Self.mockThemeSpaceRawToken } + override open var spaceColumnGapTaller: SpacePaddingInlineSemanticToken { Self.mockThemeSpaceRawToken } + + override open var spaceColumnGapWithIconNone: SpacePaddingInlineSemanticToken { Self.mockThemeSpaceRawToken } + override open var spaceColumnGapWithIconShortest: SpacePaddingInlineSemanticToken { Self.mockThemeSpaceRawToken } + override open var spaceColumnGapWithIconShorter: SpacePaddingInlineSemanticToken { Self.mockThemeSpaceRawToken } + override open var spaceColumnGapWithIconShort: SpacePaddingInlineSemanticToken { Self.mockThemeSpaceRawToken } + override open var spaceColumnGapWithIconMedium: SpacePaddingInlineSemanticToken { Self.mockThemeSpaceRawToken } + override open var spaceColumnGapWithIconTall: SpacePaddingInlineSemanticToken { Self.mockThemeSpaceRawToken } + + override open var spaceColumnGapWithArrowNone: SpacePaddingInlineSemanticToken { Self.mockThemeSpaceRawToken } + override open var spaceColumnGapWithArrowShortest: SpacePaddingInlineSemanticToken { Self.mockThemeSpaceRawToken } + override open var spaceColumnGapWithArrowShorter: SpacePaddingInlineSemanticToken { Self.mockThemeSpaceRawToken } + override open var spaceColumnGapWithArrowShort: SpacePaddingInlineSemanticToken { Self.mockThemeSpaceRawToken } + override open var spaceColumnGapWithArrowMedium: SpacePaddingInlineSemanticToken { Self.mockThemeSpaceRawToken } + override open var spaceColumnGapWithArrowTall: SpacePaddingInlineSemanticToken { Self.mockThemeSpaceRawToken } + + // MARK: Semantic token - Padding - Gap stack + + override open var spaceRowGapNone: SpaceGapStackSemanticToken { Self.mockThemeSpaceRawToken } + override open var spaceRowGapShortest: SpaceGapStackSemanticToken { Self.mockThemeSpaceRawToken } + override open var spaceRowGapShorter: SpaceGapStackSemanticToken { Self.mockThemeSpaceRawToken } + override open var spaceRowGapShort: SpaceGapStackSemanticToken { Self.mockThemeSpaceRawToken } + override open var spaceRowGapMedium: SpaceGapStackSemanticToken { Self.mockThemeSpaceRawToken } + override open var spaceRowGapTall: SpaceGapStackSemanticToken { Self.mockThemeSpaceRawToken } + override open var spaceRowGapWithIconNone: SpaceGapStackSemanticToken { Self.mockThemeSpaceRawToken } + override open var spaceRowGapWithIconShortest: SpaceGapStackSemanticToken { Self.mockThemeSpaceRawToken } + override open var spaceRowGapWithIconShorter: SpaceGapStackSemanticToken { Self.mockThemeSpaceRawToken } + override open var spaceRowGapWithIconShort: SpaceGapStackSemanticToken { Self.mockThemeSpaceRawToken } + override open var spaceRowGapWithIconMedium: SpaceGapStackSemanticToken { Self.mockThemeSpaceRawToken } + override open var spaceRowGapWithIconTall: SpaceGapStackSemanticToken { Self.mockThemeSpaceRawToken } +} diff --git a/OUDS/Core/OUDS/Tests/OUDSTheme/MockThemes/MockTheme+SpacingSemanticTokens.swift b/OUDS/Core/OUDS/Tests/OUDSTheme/MockThemes/MockTheme+SpacingSemanticTokens.swift deleted file mode 100644 index 099895629..000000000 --- a/OUDS/Core/OUDS/Tests/OUDSTheme/MockThemes/MockTheme+SpacingSemanticTokens.swift +++ /dev/null @@ -1,146 +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 OUDSTokensRaw -import OUDSTokensSemantic - -extension MockTheme { - - static let mockThemeSpaceRawToken: DimensionRawToken = 911 - static let mockThemeSpaceSemanticToken = MultipleSpacingTokens(compact: 1, regular: 151) - - // MARK: Semantic token - Spacing - Layout fluid - - override open var spaceScaledNone: MultipleSpacingTokens { Self.mockThemeSpaceSemanticToken } - override open var spaceScaledSmash: MultipleSpacingTokens { Self.mockThemeSpaceSemanticToken } - override open var spaceScaledShortest: MultipleSpacingTokens { Self.mockThemeSpaceSemanticToken } - override open var spaceScaledShorter: MultipleSpacingTokens { Self.mockThemeSpaceSemanticToken } - override open var spaceScaledShort: MultipleSpacingTokens { Self.mockThemeSpaceSemanticToken } - override open var spaceScaledMedium: MultipleSpacingTokens { Self.mockThemeSpaceSemanticToken } - override open var spaceScaledTall: MultipleSpacingTokens { Self.mockThemeSpaceSemanticToken } - override open var spaceScaledTaller: MultipleSpacingTokens { Self.mockThemeSpaceSemanticToken } - override open var spaceScaledTallest: MultipleSpacingTokens { Self.mockThemeSpaceSemanticToken } - override open var spaceScaledSpacious: MultipleSpacingTokens { Self.mockThemeSpaceSemanticToken } - - // MARK: Semantic token - Spacing - Layout fix - - override open var spaceFixedNone: SpacingSemanticToken { Self.mockThemeSpaceRawToken } - override open var spaceFixedSmash: SpacingSemanticToken { Self.mockThemeSpaceRawToken } - override open var spaceFixedShortest: SpacingSemanticToken { Self.mockThemeSpaceRawToken } - override open var spaceFixedShorter: SpacingSemanticToken { Self.mockThemeSpaceRawToken } - override open var spaceFixedShort: SpacingSemanticToken { Self.mockThemeSpaceRawToken } - override open var spaceFixedMedium: SpacingSemanticToken { Self.mockThemeSpaceRawToken } - override open var spaceFixedTall: SpacingSemanticToken { Self.mockThemeSpaceRawToken } - override open var spaceFixedTaller: SpacingSemanticToken { Self.mockThemeSpaceRawToken } - override open var spaceFixedTallest: SpacingSemanticToken { Self.mockThemeSpaceRawToken } - override open var spaceFixedSpacious: SpacingSemanticToken { Self.mockThemeSpaceRawToken } - override open var spaceFixedHuge: SpacingSemanticToken { Self.mockThemeSpaceRawToken } - override open var spaceFixedJumbo: SpacingSemanticToken { Self.mockThemeSpaceRawToken } - - // MARK: Semantic token - Spacing - Padding - Padding inline - - override open var spacePaddingInlineNone: SpacingPaddingInlineSemanticToken { Self.mockThemeSpaceRawToken } - override open var spacePaddingInlineShorter: SpacingPaddingInlineSemanticToken { Self.mockThemeSpaceRawToken } - override open var spacePaddingInlineShort: SpacingPaddingInlineSemanticToken { Self.mockThemeSpaceRawToken } - override open var spacePaddingInlineMedium: SpacingPaddingInlineSemanticToken { Self.mockThemeSpaceRawToken } - override open var spacePaddingInlineTall: SpacingPaddingInlineSemanticToken { Self.mockThemeSpaceRawToken } - override open var spacePaddingInlineTaller: SpacingPaddingInlineSemanticToken { Self.mockThemeSpaceRawToken } - override open var spacePaddingInlineTallest: SpacingPaddingInlineSemanticToken { Self.mockThemeSpaceRawToken } - - override open var spacePaddingInlineWithIconNone: SpacingPaddingInlineSemanticToken { Self.mockThemeSpaceRawToken } - override open var spacePaddingInlineWithIconShortest: SpacingPaddingInlineSemanticToken { Self.mockThemeSpaceRawToken } - override open var spacePaddingInlineWithIconShorter: SpacingPaddingInlineSemanticToken { Self.mockThemeSpaceRawToken } - override open var spacePaddingInlineWithIconShort: SpacingPaddingInlineSemanticToken { Self.mockThemeSpaceRawToken } - override open var spacePaddingInlineWithIconMedium: SpacingPaddingInlineSemanticToken { Self.mockThemeSpaceRawToken } - override open var spacePaddingInlineWithIconTall: SpacingPaddingInlineSemanticToken { Self.mockThemeSpaceRawToken } - override open var spacePaddingInlineWithIconTaller: SpacingPaddingInlineSemanticToken { Self.mockThemeSpaceRawToken } - override open var spacePaddingInlineWithIconTallest: SpacingPaddingInlineSemanticToken { Self.mockThemeSpaceRawToken } - - override open var spacePaddingInlineWithArrowNone: SpacingPaddingInlineSemanticToken { Self.mockThemeSpaceRawToken } - override open var spacePaddingInlineWithArrowShortest: SpacingPaddingInlineSemanticToken { Self.mockThemeSpaceRawToken } - override open var spacePaddingInlineWithArrowShorter: SpacingPaddingInlineSemanticToken { Self.mockThemeSpaceRawToken } - override open var spacePaddingInlineWithArrowShort: SpacingPaddingInlineSemanticToken { Self.mockThemeSpaceRawToken } - override open var spacePaddingInlineWithArrowMedium: SpacingPaddingInlineSemanticToken { Self.mockThemeSpaceRawToken } - override open var spacePaddingInlineWithArrowTall: SpacingPaddingInlineSemanticToken { Self.mockThemeSpaceRawToken } - override open var spacePaddingInlineWithArrowTaller: SpacingPaddingInlineSemanticToken { Self.mockThemeSpaceRawToken } - override open var spacePaddingInlineWithArrowTallest: SpacingPaddingInlineSemanticToken { Self.mockThemeSpaceRawToken } - - // MARK: Semantic token - Padding - Padding stack - - override open var spacePaddingBlockNone: SpacingPaddingInlineSemanticToken { Self.mockThemeSpaceRawToken } - override open var spacePaddingBlockShorter: SpacingPaddingInlineSemanticToken { Self.mockThemeSpaceRawToken } - override open var spacePaddingBlockShort: SpacingPaddingInlineSemanticToken { Self.mockThemeSpaceRawToken } - override open var spacePaddingBlockMedium: SpacingPaddingInlineSemanticToken { Self.mockThemeSpaceRawToken } - override open var spacePaddingBlockTall: SpacingPaddingInlineSemanticToken { Self.mockThemeSpaceRawToken } - override open var spacePaddingBlockTaller: SpacingPaddingInlineSemanticToken { Self.mockThemeSpaceRawToken } - override open var spacePaddingBlockTallest: SpacingPaddingInlineSemanticToken { Self.mockThemeSpaceRawToken } - - override open var spacePaddingBlockWithIconNone: SpacingPaddingInlineSemanticToken { Self.mockThemeSpaceRawToken } - override open var spacePaddingBlockWithIconShortest: SpacingPaddingInlineSemanticToken { Self.mockThemeSpaceRawToken } - override open var spacePaddingBlockWithIconShorter: SpacingPaddingInlineSemanticToken { Self.mockThemeSpaceRawToken } - override open var spacePaddingBlockWithIconShort: SpacingPaddingInlineSemanticToken { Self.mockThemeSpaceRawToken } - override open var spacePaddingBlockWithIconMedium: SpacingPaddingInlineSemanticToken { Self.mockThemeSpaceRawToken } - override open var spacePaddingBlockWithIconTall: SpacingPaddingInlineSemanticToken { Self.mockThemeSpaceRawToken } - override open var spacePaddingBlockWithIconTaller: SpacingPaddingInlineSemanticToken { Self.mockThemeSpaceRawToken } - - // MARK: Semantic token - Padding - Padding inset - - override open var spaceInsetNone: SpacingPaddingInlineSemanticToken { Self.mockThemeSpaceRawToken } - override open var spaceInsetSmash: SpacingPaddingInlineSemanticToken { Self.mockThemeSpaceRawToken } - override open var spaceInsetShortest: SpacingPaddingInlineSemanticToken { Self.mockThemeSpaceRawToken } - override open var spaceInsetShorter: SpacingPaddingInlineSemanticToken { Self.mockThemeSpaceRawToken } - override open var spaceInsetShort: SpacingPaddingInlineSemanticToken { Self.mockThemeSpaceRawToken } - override open var spaceInsetMedium: SpacingPaddingInlineSemanticToken { Self.mockThemeSpaceRawToken } - override open var spaceInsetTall: SpacingPaddingInlineSemanticToken { Self.mockThemeSpaceRawToken } - override open var spaceInsetTaller: SpacingPaddingInlineSemanticToken { Self.mockThemeSpaceRawToken } - override open var spaceInsetTallest: SpacingPaddingInlineSemanticToken { Self.mockThemeSpaceRawToken } - override open var spaceInsetSpacious: SpacingPaddingInlineSemanticToken { Self.mockThemeSpaceRawToken } - - // MARK: Semantic token - Padding - Gap inline - - override open var spaceColumnGapNone: SpacingPaddingInlineSemanticToken { Self.mockThemeSpaceRawToken } - override open var spaceColumnGapShorter: SpacingPaddingInlineSemanticToken { Self.mockThemeSpaceRawToken } - override open var spaceColumnGapShort: SpacingPaddingInlineSemanticToken { Self.mockThemeSpaceRawToken } - override open var spaceColumnGapMedium: SpacingPaddingInlineSemanticToken { Self.mockThemeSpaceRawToken } - override open var spaceColumnGapTall: SpacingPaddingInlineSemanticToken { Self.mockThemeSpaceRawToken } - override open var spaceColumnGapTaller: SpacingPaddingInlineSemanticToken { Self.mockThemeSpaceRawToken } - - override open var spaceColumnGapWithIconNone: SpacingPaddingInlineSemanticToken { Self.mockThemeSpaceRawToken } - override open var spaceColumnGapWithIconShortest: SpacingPaddingInlineSemanticToken { Self.mockThemeSpaceRawToken } - override open var spaceColumnGapWithIconShorter: SpacingPaddingInlineSemanticToken { Self.mockThemeSpaceRawToken } - override open var spaceColumnGapWithIconShort: SpacingPaddingInlineSemanticToken { Self.mockThemeSpaceRawToken } - override open var spaceColumnGapWithIconMedium: SpacingPaddingInlineSemanticToken { Self.mockThemeSpaceRawToken } - override open var spaceColumnGapWithIconTall: SpacingPaddingInlineSemanticToken { Self.mockThemeSpaceRawToken } - - override open var spaceColumnGapWithArrowNone: SpacingPaddingInlineSemanticToken { Self.mockThemeSpaceRawToken } - override open var spaceColumnGapWithArrowShortest: SpacingPaddingInlineSemanticToken { Self.mockThemeSpaceRawToken } - override open var spaceColumnGapWithArrowShorter: SpacingPaddingInlineSemanticToken { Self.mockThemeSpaceRawToken } - override open var spaceColumnGapWithArrowShort: SpacingPaddingInlineSemanticToken { Self.mockThemeSpaceRawToken } - override open var spaceColumnGapWithArrowMedium: SpacingPaddingInlineSemanticToken { Self.mockThemeSpaceRawToken } - override open var spaceColumnGapWithArrowTall: SpacingPaddingInlineSemanticToken { Self.mockThemeSpaceRawToken } - - // MARK: Semantic token - Padding - Gap stack - - override open var spaceRowGapNone: SpacingGapStackSemanticToken { Self.mockThemeSpaceRawToken } - override open var spaceRowGapShortest: SpacingGapStackSemanticToken { Self.mockThemeSpaceRawToken } - override open var spaceRowGapShorter: SpacingGapStackSemanticToken { Self.mockThemeSpaceRawToken } - override open var spaceRowGapShort: SpacingGapStackSemanticToken { Self.mockThemeSpaceRawToken } - override open var spaceRowGapMedium: SpacingGapStackSemanticToken { Self.mockThemeSpaceRawToken } - override open var spaceRowGapTall: SpacingGapStackSemanticToken { Self.mockThemeSpaceRawToken } - override open var spaceRowGapWithIconNone: SpacingGapStackSemanticToken { Self.mockThemeSpaceRawToken } - override open var spaceRowGapWithIconShortest: SpacingGapStackSemanticToken { Self.mockThemeSpaceRawToken } - override open var spaceRowGapWithIconShorter: SpacingGapStackSemanticToken { Self.mockThemeSpaceRawToken } - override open var spaceRowGapWithIconShort: SpacingGapStackSemanticToken { Self.mockThemeSpaceRawToken } - override open var spaceRowGapWithIconMedium: SpacingGapStackSemanticToken { Self.mockThemeSpaceRawToken } - override open var spaceRowGapWithIconTall: SpacingGapStackSemanticToken { Self.mockThemeSpaceRawToken } -} diff --git a/OUDS/Core/OUDS/Tests/OUDSTheme/MockThemes/MockTheme+TypographyCompositeSemanticTokens.swift b/OUDS/Core/OUDS/Tests/OUDSTheme/MockThemes/MockTheme+TypographyCompositeSemanticTokens.swift new file mode 100644 index 000000000..d7abb4484 --- /dev/null +++ b/OUDS/Core/OUDS/Tests/OUDSTheme/MockThemes/MockTheme+TypographyCompositeSemanticTokens.swift @@ -0,0 +1,58 @@ +// +// 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 OUDSTokensRaw +import OUDSTokensSemantic + +extension MockTheme { + + static let mockThemeMultipleTypographyTokens = MultipleTypographyTokens(TypographyRawTokens.typeBold1850) + + // MARK: - Semantic tokens - Typography - Composites - Display + + override open var typeDisplayLarge: MultipleTypographyTokens { Self.mockThemeMultipleTypographyTokens } + override open var typeDisplayMedium: MultipleTypographyTokens { Self.mockThemeMultipleTypographyTokens } + override open var typeDisplaySmall: MultipleTypographyTokens { Self.mockThemeMultipleTypographyTokens } + + // MARK: - Semantic tokens - Typography - Composites - Heading + + override open var typeHeadingXLarge: MultipleTypographyTokens { Self.mockThemeMultipleTypographyTokens } + override open var typeHeadingLarge: MultipleTypographyTokens { Self.mockThemeMultipleTypographyTokens } + override open var typeHeadingMedium: MultipleTypographyTokens { Self.mockThemeMultipleTypographyTokens } + override open var typeHeadingSmall: MultipleTypographyTokens { Self.mockThemeMultipleTypographyTokens } + + // MARK: - Semantic tokens - Typography - Composites - Body + + override open var typeBodyDefaultLarge: MultipleTypographyTokens { Self.mockThemeMultipleTypographyTokens } + override open var typeBodyDefaultMedium: MultipleTypographyTokens { Self.mockThemeMultipleTypographyTokens } + override open var typeBodyDefaultSmall: MultipleTypographyTokens { Self.mockThemeMultipleTypographyTokens } + override open var typeBodyStrongLarge: MultipleTypographyTokens { Self.mockThemeMultipleTypographyTokens } + override open var typeBodyStrongMedium: MultipleTypographyTokens { Self.mockThemeMultipleTypographyTokens } + override open var typeBodyStrongSmall: MultipleTypographyTokens { Self.mockThemeMultipleTypographyTokens } + + // MARK: - Semantic tokens - Typography - Composites - Label + + override open var typeLabelDefaultXLarge: MultipleTypographyTokens { Self.mockThemeMultipleTypographyTokens } + override open var typeLabelDefaultLarge: MultipleTypographyTokens { Self.mockThemeMultipleTypographyTokens } + override open var typeLabelDefaultMedium: MultipleTypographyTokens { Self.mockThemeMultipleTypographyTokens } + override open var typeLabelDefaultSmall: MultipleTypographyTokens { Self.mockThemeMultipleTypographyTokens } + override open var typeLabelStrongXLarge: MultipleTypographyTokens { Self.mockThemeMultipleTypographyTokens } + override open var typeLabelStrongLarge: MultipleTypographyTokens { Self.mockThemeMultipleTypographyTokens } + override open var typeLabelStrongMedium: MultipleTypographyTokens { Self.mockThemeMultipleTypographyTokens } + override open var typeLabelStrongSmall: MultipleTypographyTokens { Self.mockThemeMultipleTypographyTokens } + + // MARK: - Semantic tokens - Typography - Composites - Code + + override open var typeCodeMedium: MultipleTypographyTokens { Self.mockThemeMultipleTypographyTokens } + override open var typeCodeSmall: MultipleTypographyTokens { Self.mockThemeMultipleTypographyTokens } +} diff --git a/OUDS/Core/OUDS/Tests/OUDSTheme/MockThemes/MockTheme+TypographySemanticTokens.swift b/OUDS/Core/OUDS/Tests/OUDSTheme/MockThemes/MockTheme+TypographySemanticTokens.swift index f8d63573d..0fbe38a97 100644 --- a/OUDS/Core/OUDS/Tests/OUDSTheme/MockThemes/MockTheme+TypographySemanticTokens.swift +++ b/OUDS/Core/OUDS/Tests/OUDSTheme/MockThemes/MockTheme+TypographySemanticTokens.swift @@ -23,7 +23,6 @@ extension MockTheme { static let mockThemeTypographyFontSizeRawToken: TypographyFontSizeRawToken = 666 static let mockThemeTypographyFontLineHeightRawToken: TypographyFontLineHeightRawToken = 321 static let mockThemeTypographyFontLetterSpacingRawToken: TypographyFontLetterSpacingRawToken = 21_092_024 - static let mockThemeMultipleTypographyTokens = MultipleTypographyTokens(TypographyRawTokens.typeBold1850) static let mockThemeMultipleTypographyFontSizeTokens = MultipleFontSizeTokens(mockThemeTypographyFontSizeRawToken) static let mockThemeMultipleTypographyLineHeightTokens = MultipleFontLineHeightTokens(mockThemeTypographyFontLineHeightRawToken) static let mockThemeMultipleTypographyLetterSpacingTokens = MultipleFontLetterSpacingTokens(mockThemeTypographyFontLetterSpacingRawToken) @@ -39,13 +38,15 @@ extension MockTheme { // MARK: Semantic token - Typography - Font - Weight + override open var fontWeightDefault: TypographyFontWeightSemanticToken { Self.mockThemeTypographyFontWeightRawToken } + override open var fontWeightCode: TypographyFontWeightSemanticToken { Self.mockThemeTypographyFontWeightRawToken } + override open var fontWeightStrong: TypographyFontWeightSemanticToken { Self.mockThemeTypographyFontWeightRawToken } override open var fontWeightDisplay: TypographyFontWeightSemanticToken { Self.mockThemeTypographyFontWeightRawToken } override open var fontWeightHeading: TypographyFontWeightSemanticToken { Self.mockThemeTypographyFontWeightRawToken } override open var fontWeightBodyDefault: TypographyFontWeightSemanticToken { Self.mockThemeTypographyFontWeightRawToken } override open var fontWeightBodyStrong: TypographyFontWeightSemanticToken { Self.mockThemeTypographyFontWeightRawToken } override open var fontWeightLabelDefault: TypographyFontWeightSemanticToken { Self.mockThemeTypographyFontWeightRawToken } override open var fontWeightLabelStrong: TypographyFontWeightSemanticToken { Self.mockThemeTypographyFontWeightRawToken } - override open var fontWeightCode: TypographyFontWeightSemanticToken { Self.mockThemeTypographyFontWeightRawToken } // MARK: Semantic token - Typography - Font - Size @@ -107,44 +108,6 @@ extension MockTheme { override open var fontLetterSpacingLabelSmall: MultipleFontLetterSpacingTokens { Self.mockThemeMultipleTypographyLetterSpacingTokens } override open var fontLetterSpacingCodeMedium: MultipleFontLetterSpacingTokens { Self.mockThemeMultipleTypographyLetterSpacingTokens } override open var fontLetterSpacingCodeSmall: MultipleFontLetterSpacingTokens { Self.mockThemeMultipleTypographyLetterSpacingTokens } - - // MARK: - Semantic tokens - Typography - Composites - Display - - override open var typeDisplayLarge: MultipleTypographyTokens { Self.mockThemeMultipleTypographyTokens } - override open var typeDisplayMedium: MultipleTypographyTokens { Self.mockThemeMultipleTypographyTokens } - override open var typeDisplaySmall: MultipleTypographyTokens { Self.mockThemeMultipleTypographyTokens } - - // MARK: - Semantic tokens - Typography - Composites - Heading - - override open var typeHeadingXLarge: MultipleTypographyTokens { Self.mockThemeMultipleTypographyTokens } - override open var typeHeadingLarge: MultipleTypographyTokens { Self.mockThemeMultipleTypographyTokens } - override open var typeHeadingMedium: MultipleTypographyTokens { Self.mockThemeMultipleTypographyTokens } - override open var typeHeadingSmall: MultipleTypographyTokens { Self.mockThemeMultipleTypographyTokens } - - // MARK: - Semantic tokens - Typography - Composites - Body - - override open var typeBodyDefaultLarge: MultipleTypographyTokens { Self.mockThemeMultipleTypographyTokens } - override open var typeBodyDefaultMedium: MultipleTypographyTokens { Self.mockThemeMultipleTypographyTokens } - override open var typeBodyDefaultSmall: MultipleTypographyTokens { Self.mockThemeMultipleTypographyTokens } - override open var typeBodyStrongLarge: MultipleTypographyTokens { Self.mockThemeMultipleTypographyTokens } - override open var typeBodyStrongMedium: MultipleTypographyTokens { Self.mockThemeMultipleTypographyTokens } - override open var typeBodyStrongSmall: MultipleTypographyTokens { Self.mockThemeMultipleTypographyTokens } - - // MARK: - Semantic tokens - Typography - Composites - Label - - override open var typeLabelDefaultXLarge: MultipleTypographyTokens { Self.mockThemeMultipleTypographyTokens } - override open var typeLabelDefaultLarge: MultipleTypographyTokens { Self.mockThemeMultipleTypographyTokens } - override open var typeLabelDefaultMedium: MultipleTypographyTokens { Self.mockThemeMultipleTypographyTokens } - override open var typeLabelDefaultSmall: MultipleTypographyTokens { Self.mockThemeMultipleTypographyTokens } - override open var typeLabelStrongXLarge: MultipleTypographyTokens { Self.mockThemeMultipleTypographyTokens } - override open var typeLabelStrongLarge: MultipleTypographyTokens { Self.mockThemeMultipleTypographyTokens } - override open var typeLabelStrongMedium: MultipleTypographyTokens { Self.mockThemeMultipleTypographyTokens } - override open var typeLabelStrongSmall: MultipleTypographyTokens { Self.mockThemeMultipleTypographyTokens } - - // MARK: - Semantic tokens - Typography - Composites - Code - - override open var typeCodeMedium: MultipleTypographyTokens { Self.mockThemeMultipleTypographyTokens } - override open var typeCodeSmall: MultipleTypographyTokens { Self.mockThemeMultipleTypographyTokens } } // swiftlint:enable identifier_name diff --git a/OUDS/Core/OUDS/Tests/OUDSTheme/MockThemes/MockTheme.swift b/OUDS/Core/OUDS/Tests/OUDSTheme/MockThemes/MockTheme.swift index 67b6b53d4..823cf10fc 100644 --- a/OUDS/Core/OUDS/Tests/OUDSTheme/MockThemes/MockTheme.swift +++ b/OUDS/Core/OUDS/Tests/OUDSTheme/MockThemes/MockTheme.swift @@ -16,7 +16,7 @@ import OUDS import OUDSTokensSemantic /// A mock theme for tests -open class MockTheme: OUDSTheme { +open class MockTheme: OUDSTheme, @unchecked Sendable { convenience init() { self.init(customFont: nil) diff --git a/OUDS/Core/OUDS/Tests/OUDSTheme/MockThemes/OtherMockTheme.swift b/OUDS/Core/OUDS/Tests/OUDSTheme/MockThemes/OtherMockTheme.swift index 3dc62e1f1..135ca6ab1 100644 --- a/OUDS/Core/OUDS/Tests/OUDSTheme/MockThemes/OtherMockTheme.swift +++ b/OUDS/Core/OUDS/Tests/OUDSTheme/MockThemes/OtherMockTheme.swift @@ -14,79 +14,78 @@ import OUDSTokensSemantic // swiftlint:disable required_deinit -// swiftlint:disable type_body_length // swiftlint:disable file_length /// Some color semantic tokens may be not implemented, making fatalError() be triggered at `OUDSTheme` level and tests crash. /// Thus we use another mock theme to make comparisons with `MockTheme` and ensure pverriding property of tokens is still working. /// This case of not implemented token only happns with color tokens. (╯° °)╯︵ ┻━┻ -final class OtherMockTheme: MockTheme { +final class OtherMockTheme: MockTheme, @unchecked Sendable { static let otherMockThemeMultipleColorTokens: ColorSemanticToken = MultipleColorTokens("#FF0000") // MARK: Semantic token - Colors - Background - override var colorBackgroundPrimary: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } + override var colorBgPrimary: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } - override var colorBackgroundSecondary: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } + override var colorBgSecondary: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } - override var colorBackgroundTertiary: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } + override var colorBgTertiary: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } - override var colorBackgroundEmphasized: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } + override var colorBgEmphasized: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } - override var colorBackgroundBrandPrimary: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } + override var colorBgBrandPrimary: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } - override var colorBackgroundBrandSecondary: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } + override var colorBgBrandSecondary: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } - override var colorBackgroundBrandTertiary: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } + override var colorBgBrandTertiary: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } - override var colorBackgroundStatusNeutral: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } + override var colorBgStatusNeutral: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } - override var colorBackgroundStatusNeutralOnBackgroundEmphasized: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } + override var colorBgStatusNeutralOnBgEmphasized: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } - override var colorBackgroundStatusPositiveMuted: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } + override var colorBgStatusPositiveMuted: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } - override var colorBackgroundStatusPositiveMutedOnBackgroundEmphasized: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } + override var colorBgStatusPositiveMutedOnBgEmphasized: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } - override var colorBackgroundStatusPositiveEmphasized: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } + override var colorBgStatusPositiveEmphasized: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } - override var colorBackgroundStatusInfoMuted: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } + override var colorBgStatusInfoMuted: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } - override var colorBackgroundStatusInfoMutedOnBackgroundEmphasized: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } + override var colorBgStatusInfoMutedOnBgEmphasized: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } - override var colorBackgroundStatusInfoEmphasized: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } + override var colorBgStatusInfoEmphasized: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } - override var colorBackgroundStatusWarningMuted: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } + override var colorBgStatusWarningMuted: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } - override var colorBackgroundStatusWarningMutedOnBackgroundEmphasized: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } + override var colorBgStatusWarningMutedOnBgEmphasized: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } - override var colorBackgroundStatusWarningEmphasized: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } + override var colorBgStatusWarningEmphasized: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } - override var colorBackgroundStatusNegativeMuted: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } + override var colorBgStatusNegativeMuted: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } - override var colorBackgroundStatusNegativeMutedOnBackgroundEmphasized: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } + override var colorBgStatusNegativeMutedOnBgEmphasized: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } - override var colorBackgroundStatusNegativeEmphasized: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } + override var colorBgStatusNegativeEmphasized: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } - override var colorBackgroundStatusAccentMuted: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } + override var colorBgStatusAccentMuted: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } - override var colorBackgroundStatusAccentMutedOnBackgroundEmphasized: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } + override var colorBgStatusAccentMutedOnBgEmphasized: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } - override var colorBackgroundStatusAccentEmphasized: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } + override var colorBgStatusAccentEmphasized: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } // MARK: Semantic token - Colors - Content - Status override var colorContentDefault: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } - override var colorContentContentDefaultOnBackgroundEmphasized: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } + override var colorContentContentDefaultOnBgEmphasized: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } override var colorContentMuted: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } - override var colorContentContentMutedOnBackgroundEmphasized: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } + override var colorContentContentMutedOnBgEmphasized: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } override var colorContentDisabled: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } - override var colorContentContentDisabledOnBackgroundEmphasized: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } + override var colorContentContentDisabledOnBgEmphasized: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } override var colorContentBrandPrimary: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } @@ -106,55 +105,55 @@ final class OtherMockTheme: MockTheme { // MARK: Semantic token - Colors - Content - On Background - override var colorContentOnBackgroundPrimary: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } + override var colorContentOnBgPrimary: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } - override var colorContentOnBackgroundSecondary: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } + override var colorContentOnBgSecondary: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } - override var colorContentOnBackgroundTertiary: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } + override var colorContentOnBgTertiary: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } - override var colorContentOnBackgroundStatusPositiveMuted: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } + override var colorContentOnBgStatusPositiveMuted: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } - override var colorContentOnBackgroundStatusPositiveMutedOnBackgroundEmphasized: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } + override var colorContentOnBgStatusPositiveMutedOnBgEmphasized: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } - override var colorContentOnBackgroundStatusPositiveEmphasized: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } + override var colorContentOnBgStatusPositiveEmphasized: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } - override var colorContentOnBackgroundStatusInfoMuted: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } + override var colorContentOnBgStatusInfoMuted: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } - override var colorContentOnBackgroundStatusInfoMutedOnBackgroundEmphasized: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } + override var colorContentOnBgStatusInfoMutedOnBgEmphasized: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } - override var colorContentOnBackgroundStatusInfoEmphasized: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } + override var colorContentOnBgStatusInfoEmphasized: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } - override var colorContentOnBackgroundStatusWarningMuted: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } + override var colorContentOnBgStatusWarningMuted: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } - override var colorContentOnBackgroundStatusWarningMutedOnBackgroundEmphasized: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } + override var colorContentOnBgStatusWarningMutedOnBgEmphasized: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } - override var colorContentOnBackgroundStatusWarningEmphasized: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } + override var colorContentOnBgStatusWarningEmphasized: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } - override var colorContentOnBackgroundStatusNegativeMuted: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } + override var colorContentOnBgStatusNegativeMuted: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } - override var colorContentOnBackgroundStatusNegativeMutedOnBackgroundEmphasized: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } + override var colorContentOnBgStatusNegativeMutedOnBgEmphasized: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } - override var colorContentOnBackgroundStatusNegativeEmphasized: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } + override var colorContentOnBgStatusNegativeEmphasized: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } - override var colorContentOnBackgroundStatusAccentMuted: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } + override var colorContentOnBgStatusAccentMuted: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } - override var colorContentOnBackgroundStatusAccentMutedOnBackgroundEmphasized: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } + override var colorContentOnBgStatusAccentMutedOnBgEmphasized: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } - override var colorContentOnBackgroundStatusAccentedEmphasized: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } + override var colorContentOnBgStatusAccentedEmphasized: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } // MARK: Semantic token - Colors - Border override var colorBorderDefault: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } - override var colorBorderDefaultOnBackgroundEmphasized: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } + override var colorBorderDefaultOnBgEmphasized: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } override var colorBorderEmphasized: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } - override var colorBorderEmphasizedOnBackgroundEmphasized: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } + override var colorBorderEmphasizedOnBgEmphasized: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } override var colorBorderFocus: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } - override var colorBorderBrandPrimaryOnBackgroundEmphasized: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } + override var colorBorderBrandPrimaryOnBgEmphasized: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } override var colorBorderBrandPrimary: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } @@ -172,65 +171,65 @@ final class OtherMockTheme: MockTheme { override var colorBorderStatusAccent: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } - override var colorBorderOnBackgroundBrandPrimary: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } + override var colorBorderOnBgBrandPrimary: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } - override var colorBorderOnBackgroundBrandSecondary: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } + override var colorBorderOnBgBrandSecondary: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } - override var colorBorderOnBackgroundBrandTertiary: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } + override var colorBorderOnBgBrandTertiary: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } // MARK: Semantic token - Colors - Action override var colorActionSelected: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } - override var colorActionSelectedOnBackgroundEmphasized: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } + override var colorActionSelectedOnBgEmphasized: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } override var colorActionDisabled: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } - override var colorActionDisabledOnBackgroundEmphasized: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } + override var colorActionDisabledOnBgEmphasized: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } override var colorActionVisited: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } - override var colorActionVistedOnBackgroundEmphasized: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } + override var colorActionVistedOnBgEmphasized: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } override var colorActionPrimaryEnabled: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } - override var colorActionPrimaryEnabledOnBackgroundEmphasized: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } + override var colorActionPrimaryEnabledOnBgEmphasized: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } override var colorActionPrimaryHover: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } - override var colorActionPrimaryHoverOnBackgroundEmphasized: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } + override var colorActionPrimaryHoverOnBgEmphasized: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } override var colorActionPrimaryPressed: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } - override var colorActionPrimaryPressedOnBackgroundEmphasized: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } + override var colorActionPrimaryPressedOnBgEmphasized: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } override var colorActionPrimaryLoading: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } - override var colorActionPrimaryLoadingOnBackgroundEmphasized: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } + override var colorActionPrimaryLoadingOnBgEmphasized: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } override var colorActionPrimaryFocus: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } - override var colorActionPrimaryFocusOnBackgroundEmphasized: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } + override var colorActionPrimaryFocusOnBgEmphasized: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } override var colorActionSecondaryEnabled: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } - override var colorActionSecondaryEnabledOnBackgroundEmphasized: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } + override var colorActionSecondaryEnabledOnBgEmphasized: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } override var colorActionSecondaryHover: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } - override var colorActionSecondaryHoverOnBackgroundEmphasized: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } + override var colorActionSecondaryHoverOnBgEmphasized: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } override var colorActionSecondaryPressed: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } - override var colorActionSecondaryPressedOnBackgroundEmphasized: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } + override var colorActionSecondaryPressedOnBgEmphasized: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } override var colorActionSecondaryLoading: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } - override var colorActionSecondaryLoadingOnBackgroundEmphasized: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } + override var colorActionSecondaryLoadingOnBgEmphasized: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } override var colorActionSecondaryFocus: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } - override var colorActionSecondaryFocusOnBackgroundEmphasized: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } + override var colorActionSecondaryFocusOnBgEmphasized: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } override var colorActionNegativeEnabled: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } @@ -242,51 +241,51 @@ final class OtherMockTheme: MockTheme { override var colorActionNegativeFocus: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } - override var colorActionOnBackgroundActionDisabled: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } + override var colorActionOnBgActionDisabled: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } - override var colorActionOnBackgroundActionDisabledOnBackgroundEmphasized: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } + override var colorActionOnBgActionDisabledOnBgEmphasized: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } - override var colorActionOnBackgroundActionNegative: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } + override var colorActionOnBgActionNegative: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } - override var colorActionOnBackgroundActionPrimaryEnabled: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } + override var colorActionOnBgActionPrimaryEnabled: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } - override var colorActionOnBackgroundActionPrimaryEnabledOnBackgroundEmphasized: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } + override var colorActionOnBgActionPrimaryEnabledOnBgEmphasized: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } - override var colorActionOnBackgroundActionPrimaryHover: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } + override var colorActionOnBgActionPrimaryHover: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } - override var colorActionOnBackgroundActionPrimaryHoverOnBackgroundEmphasized: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } + override var colorActionOnBgActionPrimaryHoverOnBgEmphasized: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } - override var colorActionOnBackgroundActionPrimaryPressed: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } + override var colorActionOnBgActionPrimaryPressed: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } - override var colorActionOnBackgroundActionPrimaryPressedOnBackgroundEmphasized: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } + override var colorActionOnBgActionPrimaryPressedOnBgEmphasized: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } - override var colorActionOnBackgroundActionPrimaryLoading: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } + override var colorActionOnBgActionPrimaryLoading: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } - override var colorActionOnBackgroundActionPrimaryLoadingOnBackgroundEmphasized: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } + override var colorActionOnBgActionPrimaryLoadingOnBgEmphasized: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } - override var colorActionOnBackgroundActionPrimaryFocus: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } + override var colorActionOnBgActionPrimaryFocus: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } - override var colorActionOnBackgroundActionPrimaryFocusOnBackgroundEmphasized: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } + override var colorActionOnBgActionPrimaryFocusOnBgEmphasized: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } - override var colorActionOnBackgroundActionSecondaryEnabled: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } + override var colorActionOnBgActionSecondaryEnabled: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } - override var colorActionOnBackgroundActionSecondaryEnabledOnBackgroundEmphasized: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } + override var colorActionOnBgActionSecondaryEnabledOnBgEmphasized: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } - override var colorActionOnBackgroundActionSecondaryHover: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } + override var colorActionOnBgActionSecondaryHover: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } - override var colorActionOnBackgroundActionSecondaryHoverOnBackgroundEmphasized: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } + override var colorActionOnBgActionSecondaryHoverOnBgEmphasized: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } - override var colorActionOnBackgroundActionSecondaryPressed: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } + override var colorActionOnBgActionSecondaryPressed: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } - override var colorActionOnBackgroundActionSecondaryPressedOnBackgroundEmphasized: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } + override var colorActionOnBgActionSecondaryPressedOnBgEmphasized: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } - override var colorActionOnBackgroundActionSecondaryLoading: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } + override var colorActionOnBgActionSecondaryLoading: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } - override var colorActionOnBackgroundActionSecondaryLoadingOnBackgroundEmphasized: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } + override var colorActionOnBgActionSecondaryLoadingOnBgEmphasized: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } - override var colorActionOnBackgroundActionSecondaryFocus: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } + override var colorActionOnBgActionSecondaryFocus: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } - override var colorActionOnBackgroundActionSecondaryFocusOnBackgroundEmphasized: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } + override var colorActionOnBgActionSecondaryFocusOnBgEmphasized: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } // MARK: Semantic token - Colors - Always @@ -304,19 +303,19 @@ final class OtherMockTheme: MockTheme { override var colorAlwaysAccent: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } - override var colorAlwaysOnBackgroundBlack: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } + override var colorAlwaysOnBgBlack: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } - override var colorAlwaysOnBackgroundWhite: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } + override var colorAlwaysOnBgWhite: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } - override var colorAlwaysOnBackgroundWarning: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } + override var colorAlwaysOnBgWarning: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } - override var colorAlwaysOnBackgroundNegative: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } + override var colorAlwaysOnBgNegative: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } - override var colorAlwaysOnBackgroundPositive: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } + override var colorAlwaysOnBgPositive: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } - override var colorAlwaysOnBackgroundInfo: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } + override var colorAlwaysOnBgInfo: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } - override var colorAlwaysOnBackgroundAccent: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } + override var colorAlwaysOnBgAccent: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } // MARK: Semantic token - Colors - Transparent @@ -326,49 +325,37 @@ final class OtherMockTheme: MockTheme { override var colorElevationRaised: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } - override var colorElevationRaisedOnBackgroundSecondary: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } + override var colorElevationRaisedOnBgSecondary: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } - override var colorElevationRaisedOnBackgroundEmphasized: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } + override var colorElevationRaisedOnBgEmphasized: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } override var colorElevationDrag: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } - override var colorElevationDragOnBackgroundSecondary: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } + override var colorElevationDragOnBgSecondary: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } - override var colorElevationDragOnBackgroundEmphasized: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } + override var colorElevationDragOnBgEmphasized: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } override var colorElevationOverlayDefault: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } - override var colorElevationOverlayDefaultOnBackgroundSecondary: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } + override var colorElevationOverlayDefaultOnBgSecondary: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } - override var colorElevationOverlayDefaultOnBackgroundEmphasized: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } + override var colorElevationOverlayDefaultOnBgEmphasized: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } override var colorElevationOverlayEmphasized: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } - override var colorElevationOverlayEmphasizedOnBackgroundSecondary: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } + override var colorElevationOverlayEmphasizedOnBgSecondary: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } - override var colorElevationOverlayEmphasizedOnBackgroundEmphasized: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } + override var colorElevationOverlayEmphasizedOnBgEmphasized: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } override var colorElevationModal: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } // MARK: Semantic token - Colors - Decorative - override var colorDecorativeBrandPrimary: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } - - override var colorDecorativeBrandPrimaryMuted: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } - - override var colorDecorativeBrandPrimaryEmphasized: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } + override var colorDecorativePrimary: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } override var colorDecorativeSecondary: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } - override var colorDecorativeSecondaryMuted: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } - - override var colorDecorativeSecondaryEmphasized: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } - - override var colorDecorativeBrandTertiary: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } - - override var colorDecorativeBrandTertiaryMuted: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } - - override var colorDecorativeBrandTertiaryEmphasized: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } + override var colorDecorativeTertiary: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } override var colorDecorativeNeutralMuted: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } @@ -406,23 +393,23 @@ final class OtherMockTheme: MockTheme { override var colorDecorativeAccent5Emphasized: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } - override var colorDecorativeSkintTint100: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } + override var colorDecorativeSkinTint100: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } - override var colorDecorativeSkintTint200: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } + override var colorDecorativeSkinTint200: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } - override var colorDecorativeSkintTint300: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } + override var colorDecorativeSkinTint300: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } - override var colorDecorativeSkintTint400: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } + override var colorDecorativeSkinTint400: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } - override var colorDecorativeSkintTint500: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } + override var colorDecorativeSkinTint500: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } - override var colorDecorativeSkintTint600: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } + override var colorDecorativeSkinTint600: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } - override var colorDecorativeSkintTint700: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } + override var colorDecorativeSkinTint700: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } - override var colorDecorativeSkintTint800: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } + override var colorDecorativeSkinTint800: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } - override var colorDecorativeSkintTint900: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } + override var colorDecorativeSkinTint900: ColorSemanticToken { Self.otherMockThemeMultipleColorTokens } // MARK: Semantic token - Colors - Chart @@ -546,5 +533,4 @@ final class OtherMockTheme: MockTheme { } // swiftlint:enable required_deinit -// swiftlint:enable type_body_length // swiftlint:enable file_length diff --git a/OUDS/Core/OUDS/Tests/OUDSTheme/TestThemeOverrideOfBorderSemanticTokens.swift b/OUDS/Core/OUDS/Tests/OUDSTheme/TestThemeOverrideOfBorderSemanticTokens.swift index 35c49cc1f..bc73f6e07 100644 --- a/OUDS/Core/OUDS/Tests/OUDSTheme/TestThemeOverrideOfBorderSemanticTokens.swift +++ b/OUDS/Core/OUDS/Tests/OUDSTheme/TestThemeOverrideOfBorderSemanticTokens.swift @@ -63,9 +63,14 @@ final class TestThemeOverrideOfBorderSemanticTokens: XCTestCase { XCTAssertTrue(inheritedTheme.borderWidthThicker == MockTheme.mockThemeBorderWidthRawToken) } - func testInheritedThemeCanOverrideSemanticTokenBorderWidthOutsideFocus() throws { - XCTAssertNotEqual(inheritedTheme.borderWidthOutsideFocus, abstractTheme.borderWidthOutsideFocus) - XCTAssertTrue(inheritedTheme.borderWidthOutsideFocus == MockTheme.mockThemeBorderWidthRawToken) + func testInheritedThemeCanOverrideSemanticTokenBorderWidthFocus() throws { + XCTAssertNotEqual(inheritedTheme.borderWidthFocus, abstractTheme.borderWidthFocus) + XCTAssertTrue(inheritedTheme.borderWidthFocus == MockTheme.mockThemeBorderWidthRawToken) + } + + func testInheritedThemeCanOverrideSemanticTokenBorderWidthFocusInset() throws { + XCTAssertNotEqual(inheritedTheme.borderWidthFocusInset, abstractTheme.borderWidthFocusInset) + XCTAssertTrue(inheritedTheme.borderWidthFocusInset == MockTheme.mockThemeBorderWidthRawToken) } // MARK: - Semantic token - Border - Radius diff --git a/OUDS/Core/OUDS/Tests/OUDSTheme/TestThemeOverrideOfColorSemanticTokens.swift b/OUDS/Core/OUDS/Tests/OUDSTheme/TestThemeOverrideOfColorSemanticTokens.swift index 9ebea607e..d0e59f4f7 100644 --- a/OUDS/Core/OUDS/Tests/OUDSTheme/TestThemeOverrideOfColorSemanticTokens.swift +++ b/OUDS/Core/OUDS/Tests/OUDSTheme/TestThemeOverrideOfColorSemanticTokens.swift @@ -16,7 +16,6 @@ import OUDSTokensSemantic import XCTest // swiftlint:disable type_body_length -// swiftlint:disable line_length // swiftlint:disable file_length // swiftlint:disable implicitly_unwrapped_optional // swiftlint:disable required_deinit @@ -37,124 +36,124 @@ final class TestThemeOverrideOfColorSemanticTokens: XCTestCase { // MARK: Semantic token - Colors - Background - func testInheritedThemeCanOverrideSemanticTokenColorBackgroundPrimary() throws { - XCTAssertNotEqual(inheritedTheme.colorBackgroundPrimary, abstractTheme.colorBackgroundPrimary) - XCTAssertTrue(inheritedTheme.colorBackgroundPrimary == OtherMockTheme.otherMockThemeMultipleColorTokens) + func testInheritedThemeCanOverrideSemanticTokenColorBgPrimary() throws { + XCTAssertNotEqual(inheritedTheme.colorBgPrimary, abstractTheme.colorBgPrimary) + XCTAssertTrue(inheritedTheme.colorBgPrimary == OtherMockTheme.otherMockThemeMultipleColorTokens) } - func testInheritedThemeCanOverrideSemanticTokenColorBackgroundSecondary() throws { - XCTAssertNotEqual(inheritedTheme.colorBackgroundSecondary, abstractTheme.colorBackgroundSecondary) - XCTAssertTrue(inheritedTheme.colorBackgroundSecondary == OtherMockTheme.otherMockThemeMultipleColorTokens) + func testInheritedThemeCanOverrideSemanticTokenColorBgSecondary() throws { + XCTAssertNotEqual(inheritedTheme.colorBgSecondary, abstractTheme.colorBgSecondary) + XCTAssertTrue(inheritedTheme.colorBgSecondary == OtherMockTheme.otherMockThemeMultipleColorTokens) } - func testInheritedThemeCanOverrideSemanticTokenColorBackgroundTertiary() throws { - XCTAssertNotEqual(inheritedTheme.colorBackgroundTertiary, abstractTheme.colorBackgroundTertiary) - XCTAssertTrue(inheritedTheme.colorBackgroundTertiary == OtherMockTheme.otherMockThemeMultipleColorTokens) + func testInheritedThemeCanOverrideSemanticTokenColorBgTertiary() throws { + XCTAssertNotEqual(inheritedTheme.colorBgTertiary, abstractTheme.colorBgTertiary) + XCTAssertTrue(inheritedTheme.colorBgTertiary == OtherMockTheme.otherMockThemeMultipleColorTokens) } - func testInheritedThemeCanOverrideSemanticTokenColorBackgroundEmphasized() throws { - XCTAssertNotEqual(inheritedTheme.colorBackgroundEmphasized, abstractTheme.colorBackgroundEmphasized) - XCTAssertTrue(inheritedTheme.colorBackgroundEmphasized == OtherMockTheme.otherMockThemeMultipleColorTokens) + func testInheritedThemeCanOverrideSemanticTokenColorBgEmphasized() throws { + XCTAssertNotEqual(inheritedTheme.colorBgEmphasized, abstractTheme.colorBgEmphasized) + XCTAssertTrue(inheritedTheme.colorBgEmphasized == OtherMockTheme.otherMockThemeMultipleColorTokens) } - func testInheritedThemeCanOverrideSemanticTokenColorBackgroundBrandPrimary() throws { - XCTAssertNotEqual(inheritedTheme.colorBackgroundBrandPrimary, abstractTheme.colorBackgroundBrandPrimary) - XCTAssertTrue(inheritedTheme.colorBackgroundBrandPrimary == OtherMockTheme.otherMockThemeMultipleColorTokens) + func testInheritedThemeCanOverrideSemanticTokenColorBgBrandPrimary() throws { + XCTAssertNotEqual(inheritedTheme.colorBgBrandPrimary, abstractTheme.colorBgBrandPrimary) + XCTAssertTrue(inheritedTheme.colorBgBrandPrimary == OtherMockTheme.otherMockThemeMultipleColorTokens) } - func testInheritedThemeCanOverrideSemanticTokenColorBackgroundBrandSecondary() throws { - XCTAssertNotEqual(inheritedTheme.colorBackgroundBrandSecondary, abstractTheme.colorBackgroundBrandSecondary) - XCTAssertTrue(inheritedTheme.colorBackgroundBrandSecondary == OtherMockTheme.otherMockThemeMultipleColorTokens) + func testInheritedThemeCanOverrideSemanticTokenColorBgBrandSecondary() throws { + XCTAssertNotEqual(inheritedTheme.colorBgBrandSecondary, abstractTheme.colorBgBrandSecondary) + XCTAssertTrue(inheritedTheme.colorBgBrandSecondary == OtherMockTheme.otherMockThemeMultipleColorTokens) } - func testInheritedThemeCanOverrideSemanticTokenColorBackgroundBrandTertiary() throws { - XCTAssertNotEqual(inheritedTheme.colorBackgroundBrandTertiary, abstractTheme.colorBackgroundBrandTertiary) - XCTAssertTrue(inheritedTheme.colorBackgroundBrandTertiary == OtherMockTheme.otherMockThemeMultipleColorTokens) + func testInheritedThemeCanOverrideSemanticTokenColorBgBrandTertiary() throws { + XCTAssertNotEqual(inheritedTheme.colorBgBrandTertiary, abstractTheme.colorBgBrandTertiary) + XCTAssertTrue(inheritedTheme.colorBgBrandTertiary == OtherMockTheme.otherMockThemeMultipleColorTokens) } - func testInheritedThemeCanOverrideSemanticTokenColorBackgroundStatusNeutral() throws { - XCTAssertNotEqual(inheritedTheme.colorBackgroundStatusNeutral, abstractTheme.colorBackgroundStatusNeutral) - XCTAssertTrue(inheritedTheme.colorBackgroundStatusNeutral == OtherMockTheme.otherMockThemeMultipleColorTokens) + func testInheritedThemeCanOverrideSemanticTokenColorBgStatusNeutral() throws { + XCTAssertNotEqual(inheritedTheme.colorBgStatusNeutral, abstractTheme.colorBgStatusNeutral) + XCTAssertTrue(inheritedTheme.colorBgStatusNeutral == OtherMockTheme.otherMockThemeMultipleColorTokens) } - func testInheritedThemeCanOverrideSemanticTokenColorBackgroundStatusNeutralOnBackgroundEmphasized() throws { - XCTAssertNotEqual(inheritedTheme.colorBackgroundStatusNeutralOnBackgroundEmphasized, abstractTheme.colorBackgroundStatusNeutralOnBackgroundEmphasized) - XCTAssertTrue(inheritedTheme.colorBackgroundStatusNeutralOnBackgroundEmphasized == OtherMockTheme.otherMockThemeMultipleColorTokens) + func testInheritedThemeCanOverrideSemanticTokenColorBgStatusNeutralOnBgEmphasized() throws { + XCTAssertNotEqual(inheritedTheme.colorBgStatusNeutralOnBgEmphasized, abstractTheme.colorBgStatusNeutralOnBgEmphasized) + XCTAssertTrue(inheritedTheme.colorBgStatusNeutralOnBgEmphasized == OtherMockTheme.otherMockThemeMultipleColorTokens) } - func testInheritedThemeCanOverrideSemanticTokenColorBackgroundStatusPositiveMuted() throws { - XCTAssertNotEqual(inheritedTheme.colorBackgroundStatusPositiveMuted, abstractTheme.colorBackgroundStatusPositiveMuted) - XCTAssertTrue(inheritedTheme.colorBackgroundStatusPositiveMuted == OtherMockTheme.otherMockThemeMultipleColorTokens) + func testInheritedThemeCanOverrideSemanticTokenColorBgStatusPositiveMuted() throws { + XCTAssertNotEqual(inheritedTheme.colorBgStatusPositiveMuted, abstractTheme.colorBgStatusPositiveMuted) + XCTAssertTrue(inheritedTheme.colorBgStatusPositiveMuted == OtherMockTheme.otherMockThemeMultipleColorTokens) } - func testInheritedThemeCanOverrideSemanticTokenColorBackgroundStatusPositiveMutedOnBackgroundEmphasized() throws { - XCTAssertNotEqual(inheritedTheme.colorBackgroundStatusPositiveMutedOnBackgroundEmphasized, abstractTheme.colorBackgroundStatusPositiveMutedOnBackgroundEmphasized) - XCTAssertTrue(inheritedTheme.colorBackgroundStatusPositiveMutedOnBackgroundEmphasized == OtherMockTheme.otherMockThemeMultipleColorTokens) + func testInheritedThemeCanOverrideSemanticTokenColorBgStatusPositiveMutedOnBgEmphasized() throws { + XCTAssertNotEqual(inheritedTheme.colorBgStatusPositiveMutedOnBgEmphasized, abstractTheme.colorBgStatusPositiveMutedOnBgEmphasized) + XCTAssertTrue(inheritedTheme.colorBgStatusPositiveMutedOnBgEmphasized == OtherMockTheme.otherMockThemeMultipleColorTokens) } - func testInheritedThemeCanOverrideSemanticTokenColorBackgroundStatusPositiveEmphasized() throws { - XCTAssertNotEqual(inheritedTheme.colorBackgroundStatusPositiveEmphasized, abstractTheme.colorBackgroundStatusPositiveEmphasized) - XCTAssertTrue(inheritedTheme.colorBackgroundStatusPositiveEmphasized == OtherMockTheme.otherMockThemeMultipleColorTokens) + func testInheritedThemeCanOverrideSemanticTokenColorBgStatusPositiveEmphasized() throws { + XCTAssertNotEqual(inheritedTheme.colorBgStatusPositiveEmphasized, abstractTheme.colorBgStatusPositiveEmphasized) + XCTAssertTrue(inheritedTheme.colorBgStatusPositiveEmphasized == OtherMockTheme.otherMockThemeMultipleColorTokens) } - func testInheritedThemeCanOverrideSemanticTokenColorBackgroundStatusInfoMuted() throws { - XCTAssertNotEqual(inheritedTheme.colorBackgroundStatusInfoMuted, abstractTheme.colorBackgroundStatusInfoMuted) - XCTAssertTrue(inheritedTheme.colorBackgroundStatusInfoMuted == OtherMockTheme.otherMockThemeMultipleColorTokens) + func testInheritedThemeCanOverrideSemanticTokenColorBgStatusInfoMuted() throws { + XCTAssertNotEqual(inheritedTheme.colorBgStatusInfoMuted, abstractTheme.colorBgStatusInfoMuted) + XCTAssertTrue(inheritedTheme.colorBgStatusInfoMuted == OtherMockTheme.otherMockThemeMultipleColorTokens) } - func testInheritedThemeCanOverrideSemanticTokenColorBackgroundStatusInfoMutedOnBackgroundEmphasized() throws { - XCTAssertNotEqual(inheritedTheme.colorBackgroundStatusInfoMutedOnBackgroundEmphasized, abstractTheme.colorBackgroundStatusInfoMutedOnBackgroundEmphasized) - XCTAssertTrue(inheritedTheme.colorBackgroundStatusInfoMutedOnBackgroundEmphasized == OtherMockTheme.otherMockThemeMultipleColorTokens) + func testInheritedThemeCanOverrideSemanticTokenColorBgStatusInfoMutedOnBgEmphasized() throws { + XCTAssertNotEqual(inheritedTheme.colorBgStatusInfoMutedOnBgEmphasized, abstractTheme.colorBgStatusInfoMutedOnBgEmphasized) + XCTAssertTrue(inheritedTheme.colorBgStatusInfoMutedOnBgEmphasized == OtherMockTheme.otherMockThemeMultipleColorTokens) } - func testInheritedThemeCanOverrideSemanticTokenColorBackgroundStatusInfoEmphasized() throws { - XCTAssertNotEqual(inheritedTheme.colorBackgroundStatusInfoEmphasized, abstractTheme.colorBackgroundStatusInfoEmphasized) - XCTAssertTrue(inheritedTheme.colorBackgroundStatusInfoEmphasized == OtherMockTheme.otherMockThemeMultipleColorTokens) + func testInheritedThemeCanOverrideSemanticTokenColorBgStatusInfoEmphasized() throws { + XCTAssertNotEqual(inheritedTheme.colorBgStatusInfoEmphasized, abstractTheme.colorBgStatusInfoEmphasized) + XCTAssertTrue(inheritedTheme.colorBgStatusInfoEmphasized == OtherMockTheme.otherMockThemeMultipleColorTokens) } - func testInheritedThemeCanOverrideSemanticTokenColorBackgroundStatusWarningMuted() throws { - XCTAssertNotEqual(inheritedTheme.colorBackgroundStatusWarningMuted, abstractTheme.colorBackgroundStatusWarningMuted) - XCTAssertTrue(inheritedTheme.colorBackgroundStatusWarningMuted == OtherMockTheme.otherMockThemeMultipleColorTokens) + func testInheritedThemeCanOverrideSemanticTokenColorBgStatusWarningMuted() throws { + XCTAssertNotEqual(inheritedTheme.colorBgStatusWarningMuted, abstractTheme.colorBgStatusWarningMuted) + XCTAssertTrue(inheritedTheme.colorBgStatusWarningMuted == OtherMockTheme.otherMockThemeMultipleColorTokens) } - func testInheritedThemeCanOverrideSemanticTokenColorBackgroundStatusWarningMutedOnBackgroundEmphasized() throws { - XCTAssertNotEqual(inheritedTheme.colorBackgroundStatusWarningMutedOnBackgroundEmphasized, abstractTheme.colorBackgroundStatusWarningMutedOnBackgroundEmphasized) - XCTAssertTrue(inheritedTheme.colorBackgroundStatusWarningMutedOnBackgroundEmphasized == OtherMockTheme.otherMockThemeMultipleColorTokens) + func testInheritedThemeCanOverrideSemanticTokenColorBgStatusWarningMutedOnBgEmphasized() throws { + XCTAssertNotEqual(inheritedTheme.colorBgStatusWarningMutedOnBgEmphasized, abstractTheme.colorBgStatusWarningMutedOnBgEmphasized) + XCTAssertTrue(inheritedTheme.colorBgStatusWarningMutedOnBgEmphasized == OtherMockTheme.otherMockThemeMultipleColorTokens) } - func testInheritedThemeCanOverrideSemanticTokenColorBackgroundStatusWarningEmphasized() throws { - XCTAssertNotEqual(inheritedTheme.colorBackgroundStatusWarningEmphasized, abstractTheme.colorBackgroundStatusWarningEmphasized) - XCTAssertTrue(inheritedTheme.colorBackgroundStatusWarningEmphasized == OtherMockTheme.otherMockThemeMultipleColorTokens) + func testInheritedThemeCanOverrideSemanticTokenColorBgStatusWarningEmphasized() throws { + XCTAssertNotEqual(inheritedTheme.colorBgStatusWarningEmphasized, abstractTheme.colorBgStatusWarningEmphasized) + XCTAssertTrue(inheritedTheme.colorBgStatusWarningEmphasized == OtherMockTheme.otherMockThemeMultipleColorTokens) } - func testInheritedThemeCanOverrideSemanticTokenColorBackgroundStatusNegativeMuted() throws { - XCTAssertNotEqual(inheritedTheme.colorBackgroundStatusNegativeMuted, abstractTheme.colorBackgroundStatusNegativeMuted) - XCTAssertTrue(inheritedTheme.colorBackgroundStatusNegativeMuted == OtherMockTheme.otherMockThemeMultipleColorTokens) + func testInheritedThemeCanOverrideSemanticTokenColorBgStatusNegativeMuted() throws { + XCTAssertNotEqual(inheritedTheme.colorBgStatusNegativeMuted, abstractTheme.colorBgStatusNegativeMuted) + XCTAssertTrue(inheritedTheme.colorBgStatusNegativeMuted == OtherMockTheme.otherMockThemeMultipleColorTokens) } - func testInheritedThemeCanOverrideSemanticTokenColorBackgroundStatusNegativeMutedOnBackgroundEmphasized() throws { - XCTAssertNotEqual(inheritedTheme.colorBackgroundStatusNegativeMutedOnBackgroundEmphasized, abstractTheme.colorBackgroundStatusNegativeMutedOnBackgroundEmphasized) - XCTAssertTrue(inheritedTheme.colorBackgroundStatusNegativeMutedOnBackgroundEmphasized == OtherMockTheme.otherMockThemeMultipleColorTokens) + func testInheritedThemeCanOverrideSemanticTokenColorBgStatusNegativeMutedOnBgEmphasized() throws { + XCTAssertNotEqual(inheritedTheme.colorBgStatusNegativeMutedOnBgEmphasized, abstractTheme.colorBgStatusNegativeMutedOnBgEmphasized) + XCTAssertTrue(inheritedTheme.colorBgStatusNegativeMutedOnBgEmphasized == OtherMockTheme.otherMockThemeMultipleColorTokens) } - func testInheritedThemeCanOverrideSemanticTokenColorBackgroundStatusNegativeEmphasized() throws { - XCTAssertNotEqual(inheritedTheme.colorBackgroundStatusNegativeEmphasized, abstractTheme.colorBackgroundStatusNegativeEmphasized) - XCTAssertTrue(inheritedTheme.colorBackgroundStatusNegativeEmphasized == OtherMockTheme.otherMockThemeMultipleColorTokens) + func testInheritedThemeCanOverrideSemanticTokenColorBgStatusNegativeEmphasized() throws { + XCTAssertNotEqual(inheritedTheme.colorBgStatusNegativeEmphasized, abstractTheme.colorBgStatusNegativeEmphasized) + XCTAssertTrue(inheritedTheme.colorBgStatusNegativeEmphasized == OtherMockTheme.otherMockThemeMultipleColorTokens) } - func testInheritedThemeCanOverrideSemanticTokenColorBackgroundStatusAccentMuted() throws { - XCTAssertNotEqual(inheritedTheme.colorBackgroundStatusAccentMuted, abstractTheme.colorBackgroundStatusAccentMuted) - XCTAssertTrue(inheritedTheme.colorBackgroundStatusAccentMuted == OtherMockTheme.otherMockThemeMultipleColorTokens) + func testInheritedThemeCanOverrideSemanticTokenColorBgStatusAccentMuted() throws { + XCTAssertNotEqual(inheritedTheme.colorBgStatusAccentMuted, abstractTheme.colorBgStatusAccentMuted) + XCTAssertTrue(inheritedTheme.colorBgStatusAccentMuted == OtherMockTheme.otherMockThemeMultipleColorTokens) } - func testInheritedThemeCanOverrideSemanticTokenColorBackgroundStatusAccentMutedOnBackgroundEmphasized() throws { - XCTAssertNotEqual(inheritedTheme.colorBackgroundStatusAccentMutedOnBackgroundEmphasized, abstractTheme.colorBackgroundStatusAccentMutedOnBackgroundEmphasized) - XCTAssertTrue(inheritedTheme.colorBackgroundStatusAccentMutedOnBackgroundEmphasized == OtherMockTheme.otherMockThemeMultipleColorTokens) + func testInheritedThemeCanOverrideSemanticTokenColorBgStatusAccentMutedOnBgEmphasized() throws { + XCTAssertNotEqual(inheritedTheme.colorBgStatusAccentMutedOnBgEmphasized, abstractTheme.colorBgStatusAccentMutedOnBgEmphasized) + XCTAssertTrue(inheritedTheme.colorBgStatusAccentMutedOnBgEmphasized == OtherMockTheme.otherMockThemeMultipleColorTokens) } - func testInheritedThemeCanOverrideSemanticTokenColorBackgroundStatusAccentEmphasized() throws { - XCTAssertNotEqual(inheritedTheme.colorBackgroundStatusAccentEmphasized, abstractTheme.colorBackgroundStatusAccentEmphasized) - XCTAssertTrue(inheritedTheme.colorBackgroundStatusAccentEmphasized == OtherMockTheme.otherMockThemeMultipleColorTokens) + func testInheritedThemeCanOverrideSemanticTokenColorBgStatusAccentEmphasized() throws { + XCTAssertNotEqual(inheritedTheme.colorBgStatusAccentEmphasized, abstractTheme.colorBgStatusAccentEmphasized) + XCTAssertTrue(inheritedTheme.colorBgStatusAccentEmphasized == OtherMockTheme.otherMockThemeMultipleColorTokens) } // MARK: Semantic token - Colors - Content - Status @@ -164,9 +163,9 @@ final class TestThemeOverrideOfColorSemanticTokens: XCTestCase { XCTAssertTrue(inheritedTheme.colorContentDefault == OtherMockTheme.otherMockThemeMultipleColorTokens) } - func testInheritedThemeCanOverrideSemanticTokenColorContentContentDefaultOnBackgroundEmphasized() throws { - XCTAssertNotEqual(inheritedTheme.colorContentContentDefaultOnBackgroundEmphasized, abstractTheme.colorContentContentDefaultOnBackgroundEmphasized) - XCTAssertTrue(inheritedTheme.colorContentContentDefaultOnBackgroundEmphasized == OtherMockTheme.otherMockThemeMultipleColorTokens) + func testInheritedThemeCanOverrideSemanticTokenColorContentContentDefaultOnBgEmphasized() throws { + XCTAssertNotEqual(inheritedTheme.colorContentContentDefaultOnBgEmphasized, abstractTheme.colorContentContentDefaultOnBgEmphasized) + XCTAssertTrue(inheritedTheme.colorContentContentDefaultOnBgEmphasized == OtherMockTheme.otherMockThemeMultipleColorTokens) } func testInheritedThemeCanOverrideSemanticTokenColorContentMuted() throws { @@ -174,9 +173,9 @@ final class TestThemeOverrideOfColorSemanticTokens: XCTestCase { XCTAssertTrue(inheritedTheme.colorContentMuted == OtherMockTheme.otherMockThemeMultipleColorTokens) } - func testInheritedThemeCanOverrideSemanticTokenColorContentContentMutedOnBackgroundEmphasized() throws { - XCTAssertNotEqual(inheritedTheme.colorContentContentMutedOnBackgroundEmphasized, abstractTheme.colorContentContentMutedOnBackgroundEmphasized) - XCTAssertTrue(inheritedTheme.colorContentContentMutedOnBackgroundEmphasized == OtherMockTheme.otherMockThemeMultipleColorTokens) + func testInheritedThemeCanOverrideSemanticTokenColorContentContentMutedOnBgEmphasized() throws { + XCTAssertNotEqual(inheritedTheme.colorContentContentMutedOnBgEmphasized, abstractTheme.colorContentContentMutedOnBgEmphasized) + XCTAssertTrue(inheritedTheme.colorContentContentMutedOnBgEmphasized == OtherMockTheme.otherMockThemeMultipleColorTokens) } func testInheritedThemeCanOverrideSemanticTokenColorContentDisabled() throws { @@ -184,9 +183,9 @@ final class TestThemeOverrideOfColorSemanticTokens: XCTestCase { XCTAssertTrue(inheritedTheme.colorContentDisabled == OtherMockTheme.otherMockThemeMultipleColorTokens) } - func testInheritedThemeCanOverrideSemanticTokenColorContentContentDisabledOnBackgroundEmphasized() throws { - XCTAssertNotEqual(inheritedTheme.colorContentContentDisabledOnBackgroundEmphasized, abstractTheme.colorContentContentDisabledOnBackgroundEmphasized) - XCTAssertTrue(inheritedTheme.colorContentContentDisabledOnBackgroundEmphasized == OtherMockTheme.otherMockThemeMultipleColorTokens) + func testInheritedThemeCanOverrideSemanticTokenColorContentContentDisabledOnBgEmphasized() throws { + XCTAssertNotEqual(inheritedTheme.colorContentContentDisabledOnBgEmphasized, abstractTheme.colorContentContentDisabledOnBgEmphasized) + XCTAssertTrue(inheritedTheme.colorContentContentDisabledOnBgEmphasized == OtherMockTheme.otherMockThemeMultipleColorTokens) } func testInheritedThemeCanOverrideSemanticTokenColorContentBrandPrimary() throws { @@ -231,94 +230,94 @@ final class TestThemeOverrideOfColorSemanticTokens: XCTestCase { // MARK: Semantic token - Colors - Content - On Background - func testInheritedThemeCanOverrideSemanticTokenColorContentOnBackgroundPrimary() throws { - XCTAssertNotEqual(inheritedTheme.colorContentOnBackgroundPrimary, abstractTheme.colorContentOnBackgroundPrimary) - XCTAssertTrue(inheritedTheme.colorContentOnBackgroundPrimary == OtherMockTheme.otherMockThemeMultipleColorTokens) + func testInheritedThemeCanOverrideSemanticTokenColorContentOnBgPrimary() throws { + XCTAssertNotEqual(inheritedTheme.colorContentOnBgPrimary, abstractTheme.colorContentOnBgPrimary) + XCTAssertTrue(inheritedTheme.colorContentOnBgPrimary == OtherMockTheme.otherMockThemeMultipleColorTokens) } - func testInheritedThemeCanOverrideSemanticTokenColorContentOnBackgroundSecondary() throws { - XCTAssertNotEqual(inheritedTheme.colorContentOnBackgroundSecondary, abstractTheme.colorContentOnBackgroundSecondary) - XCTAssertTrue(inheritedTheme.colorContentOnBackgroundSecondary == OtherMockTheme.otherMockThemeMultipleColorTokens) + func testInheritedThemeCanOverrideSemanticTokenColorContentOnBgSecondary() throws { + XCTAssertNotEqual(inheritedTheme.colorContentOnBgSecondary, abstractTheme.colorContentOnBgSecondary) + XCTAssertTrue(inheritedTheme.colorContentOnBgSecondary == OtherMockTheme.otherMockThemeMultipleColorTokens) } - func testInheritedThemeCanOverrideSemanticTokenColorContentOnBackgroundTertiary() throws { - XCTAssertNotEqual(inheritedTheme.colorContentOnBackgroundTertiary, abstractTheme.colorContentOnBackgroundTertiary) - XCTAssertTrue(inheritedTheme.colorContentOnBackgroundTertiary == OtherMockTheme.otherMockThemeMultipleColorTokens) + func testInheritedThemeCanOverrideSemanticTokenColorContentOnBgTertiary() throws { + XCTAssertNotEqual(inheritedTheme.colorContentOnBgTertiary, abstractTheme.colorContentOnBgTertiary) + XCTAssertTrue(inheritedTheme.colorContentOnBgTertiary == OtherMockTheme.otherMockThemeMultipleColorTokens) } - func testInheritedThemeCanOverrideSemanticTokenColorContentOnBackgroundStatusPositiveMuted() throws { - XCTAssertNotEqual(inheritedTheme.colorContentOnBackgroundStatusPositiveMuted, abstractTheme.colorContentOnBackgroundStatusPositiveMuted) - XCTAssertTrue(inheritedTheme.colorContentOnBackgroundStatusPositiveMuted == OtherMockTheme.otherMockThemeMultipleColorTokens) + func testInheritedThemeCanOverrideSemanticTokenColorContentOnBgStatusPositiveMuted() throws { + XCTAssertNotEqual(inheritedTheme.colorContentOnBgStatusPositiveMuted, abstractTheme.colorContentOnBgStatusPositiveMuted) + XCTAssertTrue(inheritedTheme.colorContentOnBgStatusPositiveMuted == OtherMockTheme.otherMockThemeMultipleColorTokens) } - func testInheritedThemeCanOverrideSemanticTokenColorContentOnBackgroundStatusPositiveMutedOnBackgroundEmphasized() throws { - XCTAssertNotEqual(inheritedTheme.colorContentOnBackgroundStatusPositiveMutedOnBackgroundEmphasized, abstractTheme.colorContentOnBackgroundStatusPositiveMutedOnBackgroundEmphasized) - XCTAssertTrue(inheritedTheme.colorContentOnBackgroundStatusPositiveMutedOnBackgroundEmphasized == OtherMockTheme.otherMockThemeMultipleColorTokens) + func testInheritedThemeCanOverrideSemanticTokenColorContentOnBgStatusPositiveMutedOnBgEmphasized() throws { + XCTAssertNotEqual(inheritedTheme.colorContentOnBgStatusPositiveMutedOnBgEmphasized, abstractTheme.colorContentOnBgStatusPositiveMutedOnBgEmphasized) + XCTAssertTrue(inheritedTheme.colorContentOnBgStatusPositiveMutedOnBgEmphasized == OtherMockTheme.otherMockThemeMultipleColorTokens) } - func testInheritedThemeCanOverrideSemanticTokenColorContentOnBackgroundStatusPositiveEmphasized() throws { - XCTAssertNotEqual(inheritedTheme.colorContentOnBackgroundStatusPositiveEmphasized, abstractTheme.colorContentOnBackgroundStatusPositiveEmphasized) - XCTAssertTrue(inheritedTheme.colorContentOnBackgroundStatusPositiveEmphasized == OtherMockTheme.otherMockThemeMultipleColorTokens) + func testInheritedThemeCanOverrideSemanticTokenColorContentOnBgStatusPositiveEmphasized() throws { + XCTAssertNotEqual(inheritedTheme.colorContentOnBgStatusPositiveEmphasized, abstractTheme.colorContentOnBgStatusPositiveEmphasized) + XCTAssertTrue(inheritedTheme.colorContentOnBgStatusPositiveEmphasized == OtherMockTheme.otherMockThemeMultipleColorTokens) } - func testInheritedThemeCanOverrideSemanticTokenColorContentOnBackgroundStatusInfoMuted() throws { - XCTAssertNotEqual(inheritedTheme.colorContentOnBackgroundStatusInfoMuted, abstractTheme.colorContentOnBackgroundStatusInfoMuted) - XCTAssertTrue(inheritedTheme.colorContentOnBackgroundStatusInfoMuted == OtherMockTheme.otherMockThemeMultipleColorTokens) + func testInheritedThemeCanOverrideSemanticTokenColorContentOnBgStatusInfoMuted() throws { + XCTAssertNotEqual(inheritedTheme.colorContentOnBgStatusInfoMuted, abstractTheme.colorContentOnBgStatusInfoMuted) + XCTAssertTrue(inheritedTheme.colorContentOnBgStatusInfoMuted == OtherMockTheme.otherMockThemeMultipleColorTokens) } - func testInheritedThemeCanOverrideSemanticTokenColorContentOnBackgroundStatusInfoMutedOnBackgroundEmphasized() throws { - XCTAssertNotEqual(inheritedTheme.colorContentOnBackgroundStatusInfoMutedOnBackgroundEmphasized, abstractTheme.colorContentOnBackgroundStatusInfoMutedOnBackgroundEmphasized) - XCTAssertTrue(inheritedTheme.colorContentOnBackgroundStatusInfoMutedOnBackgroundEmphasized == OtherMockTheme.otherMockThemeMultipleColorTokens) + func testInheritedThemeCanOverrideSemanticTokenColorContentOnBgStatusInfoMutedOnBgEmphasized() throws { + XCTAssertNotEqual(inheritedTheme.colorContentOnBgStatusInfoMutedOnBgEmphasized, abstractTheme.colorContentOnBgStatusInfoMutedOnBgEmphasized) + XCTAssertTrue(inheritedTheme.colorContentOnBgStatusInfoMutedOnBgEmphasized == OtherMockTheme.otherMockThemeMultipleColorTokens) } - func testInheritedThemeCanOverrideSemanticTokenColorContentOnBackgroundStatusInfoEmphasized() throws { - XCTAssertNotEqual(inheritedTheme.colorContentOnBackgroundStatusInfoEmphasized, abstractTheme.colorContentOnBackgroundStatusInfoEmphasized) - XCTAssertTrue(inheritedTheme.colorContentOnBackgroundStatusInfoEmphasized == OtherMockTheme.otherMockThemeMultipleColorTokens) + func testInheritedThemeCanOverrideSemanticTokenColorContentOnBgStatusInfoEmphasized() throws { + XCTAssertNotEqual(inheritedTheme.colorContentOnBgStatusInfoEmphasized, abstractTheme.colorContentOnBgStatusInfoEmphasized) + XCTAssertTrue(inheritedTheme.colorContentOnBgStatusInfoEmphasized == OtherMockTheme.otherMockThemeMultipleColorTokens) } - func testInheritedThemeCanOverrideSemanticTokenColorContentOnBackgroundStatusWarningMuted() throws { - XCTAssertNotEqual(inheritedTheme.colorContentOnBackgroundStatusWarningMuted, abstractTheme.colorContentOnBackgroundStatusWarningMuted) - XCTAssertTrue(inheritedTheme.colorContentOnBackgroundStatusWarningMuted == OtherMockTheme.otherMockThemeMultipleColorTokens) + func testInheritedThemeCanOverrideSemanticTokenColorContentOnBgStatusWarningMuted() throws { + XCTAssertNotEqual(inheritedTheme.colorContentOnBgStatusWarningMuted, abstractTheme.colorContentOnBgStatusWarningMuted) + XCTAssertTrue(inheritedTheme.colorContentOnBgStatusWarningMuted == OtherMockTheme.otherMockThemeMultipleColorTokens) } - func testInheritedThemeCanOverrideSemanticTokenColorContentOnBackgroundStatusWarningMutedOnBackgroundEmphasized() throws { - XCTAssertNotEqual(inheritedTheme.colorContentOnBackgroundStatusWarningMutedOnBackgroundEmphasized, abstractTheme.colorContentOnBackgroundStatusWarningMutedOnBackgroundEmphasized) - XCTAssertTrue(inheritedTheme.colorContentOnBackgroundStatusWarningMutedOnBackgroundEmphasized == OtherMockTheme.otherMockThemeMultipleColorTokens) + func testInheritedThemeCanOverrideSemanticTokenColorContentOnBgStatusWarningMutedOnBgEmphasized() throws { + XCTAssertNotEqual(inheritedTheme.colorContentOnBgStatusWarningMutedOnBgEmphasized, abstractTheme.colorContentOnBgStatusWarningMutedOnBgEmphasized) + XCTAssertTrue(inheritedTheme.colorContentOnBgStatusWarningMutedOnBgEmphasized == OtherMockTheme.otherMockThemeMultipleColorTokens) } - func testInheritedThemeCanOverrideSemanticTokenColorContentOnBackgroundStatusWarningEmphasized() throws { - XCTAssertNotEqual(inheritedTheme.colorContentOnBackgroundStatusWarningEmphasized, abstractTheme.colorContentOnBackgroundStatusWarningEmphasized) - XCTAssertTrue(inheritedTheme.colorContentOnBackgroundStatusWarningEmphasized == OtherMockTheme.otherMockThemeMultipleColorTokens) + func testInheritedThemeCanOverrideSemanticTokenColorContentOnBgStatusWarningEmphasized() throws { + XCTAssertNotEqual(inheritedTheme.colorContentOnBgStatusWarningEmphasized, abstractTheme.colorContentOnBgStatusWarningEmphasized) + XCTAssertTrue(inheritedTheme.colorContentOnBgStatusWarningEmphasized == OtherMockTheme.otherMockThemeMultipleColorTokens) } - func testInheritedThemeCanOverrideSemanticTokenColorContentOnBackgroundStatusNegativeMuted() throws { - XCTAssertNotEqual(inheritedTheme.colorContentOnBackgroundStatusNegativeMuted, abstractTheme.colorContentOnBackgroundStatusNegativeMuted) - XCTAssertTrue(inheritedTheme.colorContentOnBackgroundStatusNegativeMuted == OtherMockTheme.otherMockThemeMultipleColorTokens) + func testInheritedThemeCanOverrideSemanticTokenColorContentOnBgStatusNegativeMuted() throws { + XCTAssertNotEqual(inheritedTheme.colorContentOnBgStatusNegativeMuted, abstractTheme.colorContentOnBgStatusNegativeMuted) + XCTAssertTrue(inheritedTheme.colorContentOnBgStatusNegativeMuted == OtherMockTheme.otherMockThemeMultipleColorTokens) } - func testInheritedThemeCanOverrideSemanticTokenColorContentOnBackgroundStatusNegativeMutedOnBackgroundEmphasized() throws { - XCTAssertNotEqual(inheritedTheme.colorContentOnBackgroundStatusNegativeMutedOnBackgroundEmphasized, abstractTheme.colorContentOnBackgroundStatusNegativeMutedOnBackgroundEmphasized) - XCTAssertTrue(inheritedTheme.colorContentOnBackgroundStatusNegativeMutedOnBackgroundEmphasized == OtherMockTheme.otherMockThemeMultipleColorTokens) + func testInheritedThemeCanOverrideSemanticTokenColorContentOnBgStatusNegativeMutedOnBgEmphasized() throws { + XCTAssertNotEqual(inheritedTheme.colorContentOnBgStatusNegativeMutedOnBgEmphasized, abstractTheme.colorContentOnBgStatusNegativeMutedOnBgEmphasized) + XCTAssertTrue(inheritedTheme.colorContentOnBgStatusNegativeMutedOnBgEmphasized == OtherMockTheme.otherMockThemeMultipleColorTokens) } - func testInheritedThemeCanOverrideSemanticTokenColorContentOnBackgroundStatusNegativeEmphasized() throws { - XCTAssertNotEqual(inheritedTheme.colorContentOnBackgroundStatusNegativeEmphasized, abstractTheme.colorContentOnBackgroundStatusNegativeEmphasized) - XCTAssertTrue(inheritedTheme.colorContentOnBackgroundStatusNegativeEmphasized == OtherMockTheme.otherMockThemeMultipleColorTokens) + func testInheritedThemeCanOverrideSemanticTokenColorContentOnBgStatusNegativeEmphasized() throws { + XCTAssertNotEqual(inheritedTheme.colorContentOnBgStatusNegativeEmphasized, abstractTheme.colorContentOnBgStatusNegativeEmphasized) + XCTAssertTrue(inheritedTheme.colorContentOnBgStatusNegativeEmphasized == OtherMockTheme.otherMockThemeMultipleColorTokens) } - func testInheritedThemeCanOverrideSemanticTokenColorContentOnBackgroundStatusAccentMuted() throws { - XCTAssertNotEqual(inheritedTheme.colorContentOnBackgroundStatusAccentMuted, abstractTheme.colorContentOnBackgroundStatusAccentMuted) - XCTAssertTrue(inheritedTheme.colorContentOnBackgroundStatusAccentMuted == OtherMockTheme.otherMockThemeMultipleColorTokens) + func testInheritedThemeCanOverrideSemanticTokenColorContentOnBgStatusAccentMuted() throws { + XCTAssertNotEqual(inheritedTheme.colorContentOnBgStatusAccentMuted, abstractTheme.colorContentOnBgStatusAccentMuted) + XCTAssertTrue(inheritedTheme.colorContentOnBgStatusAccentMuted == OtherMockTheme.otherMockThemeMultipleColorTokens) } - func testInheritedThemeCanOverrideSemanticTokenColorContentOnBackgroundStatusAccentMutedOnBackgroundEmphasized() throws { - XCTAssertNotEqual(inheritedTheme.colorContentOnBackgroundStatusAccentMutedOnBackgroundEmphasized, abstractTheme.colorContentOnBackgroundStatusAccentMutedOnBackgroundEmphasized) - XCTAssertTrue(inheritedTheme.colorContentOnBackgroundStatusAccentMutedOnBackgroundEmphasized == OtherMockTheme.otherMockThemeMultipleColorTokens) + func testInheritedThemeCanOverrideSemanticTokenColorContentOnBgStatusAccentMutedOnBgEmphasized() throws { + XCTAssertNotEqual(inheritedTheme.colorContentOnBgStatusAccentMutedOnBgEmphasized, abstractTheme.colorContentOnBgStatusAccentMutedOnBgEmphasized) + XCTAssertTrue(inheritedTheme.colorContentOnBgStatusAccentMutedOnBgEmphasized == OtherMockTheme.otherMockThemeMultipleColorTokens) } - func testInheritedThemeCanOverrideSemanticTokenColorContentOnBackgroundStatusAccentedEmphasized() throws { - XCTAssertNotEqual(inheritedTheme.colorContentOnBackgroundStatusAccentedEmphasized, abstractTheme.colorContentOnBackgroundStatusAccentedEmphasized) - XCTAssertTrue(inheritedTheme.colorContentOnBackgroundStatusAccentedEmphasized == OtherMockTheme.otherMockThemeMultipleColorTokens) + func testInheritedThemeCanOverrideSemanticTokenColorContentOnBgStatusAccentedEmphasized() throws { + XCTAssertNotEqual(inheritedTheme.colorContentOnBgStatusAccentedEmphasized, abstractTheme.colorContentOnBgStatusAccentedEmphasized) + XCTAssertTrue(inheritedTheme.colorContentOnBgStatusAccentedEmphasized == OtherMockTheme.otherMockThemeMultipleColorTokens) } // MARK: Semantic token - Colors - Border @@ -328,9 +327,9 @@ final class TestThemeOverrideOfColorSemanticTokens: XCTestCase { XCTAssertTrue(inheritedTheme.colorBorderDefault == OtherMockTheme.otherMockThemeMultipleColorTokens) } - func testInheritedThemeCanOverrideSemanticTokenColorBorderDefaultOnBackgroundEmphasized() throws { - XCTAssertNotEqual(inheritedTheme.colorBorderDefaultOnBackgroundEmphasized, abstractTheme.colorBorderDefaultOnBackgroundEmphasized) - XCTAssertTrue(inheritedTheme.colorBorderDefaultOnBackgroundEmphasized == OtherMockTheme.otherMockThemeMultipleColorTokens) + func testInheritedThemeCanOverrideSemanticTokenColorBorderDefaultOnBgEmphasized() throws { + XCTAssertNotEqual(inheritedTheme.colorBorderDefaultOnBgEmphasized, abstractTheme.colorBorderDefaultOnBgEmphasized) + XCTAssertTrue(inheritedTheme.colorBorderDefaultOnBgEmphasized == OtherMockTheme.otherMockThemeMultipleColorTokens) } func testInheritedThemeCanOverrideSemanticTokenColorBorderEmphasized() throws { @@ -338,9 +337,9 @@ final class TestThemeOverrideOfColorSemanticTokens: XCTestCase { XCTAssertTrue(inheritedTheme.colorBorderEmphasized == OtherMockTheme.otherMockThemeMultipleColorTokens) } - func testInheritedThemeCanOverrideSemanticTokenColorBorderEmphasizedOnBackgroundEmphasized() throws { - XCTAssertNotEqual(inheritedTheme.colorBorderEmphasizedOnBackgroundEmphasized, abstractTheme.colorBorderEmphasizedOnBackgroundEmphasized) - XCTAssertTrue(inheritedTheme.colorBorderEmphasizedOnBackgroundEmphasized == OtherMockTheme.otherMockThemeMultipleColorTokens) + func testInheritedThemeCanOverrideSemanticTokenColorBorderEmphasizedOnBgEmphasized() throws { + XCTAssertNotEqual(inheritedTheme.colorBorderEmphasizedOnBgEmphasized, abstractTheme.colorBorderEmphasizedOnBgEmphasized) + XCTAssertTrue(inheritedTheme.colorBorderEmphasizedOnBgEmphasized == OtherMockTheme.otherMockThemeMultipleColorTokens) } func testInheritedThemeCanOverrideSemanticTokenColorBorderFocus() throws { @@ -348,9 +347,9 @@ final class TestThemeOverrideOfColorSemanticTokens: XCTestCase { XCTAssertTrue(inheritedTheme.colorBorderFocus == OtherMockTheme.otherMockThemeMultipleColorTokens) } - func testInheritedThemeCanOverrideSemanticTokenColorBorderBrandPrimaryOnBackgroundEmphasized() throws { - XCTAssertNotEqual(inheritedTheme.colorBorderBrandPrimaryOnBackgroundEmphasized, abstractTheme.colorBorderBrandPrimaryOnBackgroundEmphasized) - XCTAssertTrue(inheritedTheme.colorBorderBrandPrimaryOnBackgroundEmphasized == OtherMockTheme.otherMockThemeMultipleColorTokens) + func testInheritedThemeCanOverrideSemanticTokenColorBorderBrandPrimaryOnBgEmphasized() throws { + XCTAssertNotEqual(inheritedTheme.colorBorderBrandPrimaryOnBgEmphasized, abstractTheme.colorBorderBrandPrimaryOnBgEmphasized) + XCTAssertTrue(inheritedTheme.colorBorderBrandPrimaryOnBgEmphasized == OtherMockTheme.otherMockThemeMultipleColorTokens) } func testInheritedThemeCanOverrideSemanticTokenColorBorderBrandPrimary() throws { @@ -393,19 +392,19 @@ final class TestThemeOverrideOfColorSemanticTokens: XCTestCase { XCTAssertTrue(inheritedTheme.colorBorderStatusAccent == OtherMockTheme.otherMockThemeMultipleColorTokens) } - func testInheritedThemeCanOverrideSemanticTokenColorBorderOnBackgroundBrandPrimary() throws { - XCTAssertNotEqual(inheritedTheme.colorBorderOnBackgroundBrandPrimary, abstractTheme.colorBorderOnBackgroundBrandPrimary) - XCTAssertTrue(inheritedTheme.colorBorderOnBackgroundBrandPrimary == OtherMockTheme.otherMockThemeMultipleColorTokens) + func testInheritedThemeCanOverrideSemanticTokenColorBorderOnBgBrandPrimary() throws { + XCTAssertNotEqual(inheritedTheme.colorBorderOnBgBrandPrimary, abstractTheme.colorBorderOnBgBrandPrimary) + XCTAssertTrue(inheritedTheme.colorBorderOnBgBrandPrimary == OtherMockTheme.otherMockThemeMultipleColorTokens) } - func testInheritedThemeCanOverrideSemanticTokenColorBorderOnBackgroundBrandSecondary() throws { - XCTAssertNotEqual(inheritedTheme.colorBorderOnBackgroundBrandSecondary, abstractTheme.colorBorderOnBackgroundBrandSecondary) - XCTAssertTrue(inheritedTheme.colorBorderOnBackgroundBrandSecondary == OtherMockTheme.otherMockThemeMultipleColorTokens) + func testInheritedThemeCanOverrideSemanticTokenColorBorderOnBgBrandSecondary() throws { + XCTAssertNotEqual(inheritedTheme.colorBorderOnBgBrandSecondary, abstractTheme.colorBorderOnBgBrandSecondary) + XCTAssertTrue(inheritedTheme.colorBorderOnBgBrandSecondary == OtherMockTheme.otherMockThemeMultipleColorTokens) } - func testInheritedThemeCanOverrideSemanticTokenColorBorderOnBackgroundBrandTertiary() throws { - XCTAssertNotEqual(inheritedTheme.colorBorderOnBackgroundBrandTertiary, abstractTheme.colorBorderOnBackgroundBrandTertiary) - XCTAssertTrue(inheritedTheme.colorBorderOnBackgroundBrandTertiary == OtherMockTheme.otherMockThemeMultipleColorTokens) + func testInheritedThemeCanOverrideSemanticTokenColorBorderOnBgBrandTertiary() throws { + XCTAssertNotEqual(inheritedTheme.colorBorderOnBgBrandTertiary, abstractTheme.colorBorderOnBgBrandTertiary) + XCTAssertTrue(inheritedTheme.colorBorderOnBgBrandTertiary == OtherMockTheme.otherMockThemeMultipleColorTokens) } // MARK: Semantic token - Colors - Action @@ -415,9 +414,9 @@ final class TestThemeOverrideOfColorSemanticTokens: XCTestCase { XCTAssertTrue(inheritedTheme.colorActionSelected == OtherMockTheme.otherMockThemeMultipleColorTokens) } - func testInheritedThemeCanOverrideSemanticTokenColorActionSelectedOnBackgroundEmphasized() throws { - XCTAssertNotEqual(inheritedTheme.colorActionSelectedOnBackgroundEmphasized, abstractTheme.colorActionSelectedOnBackgroundEmphasized) - XCTAssertTrue(inheritedTheme.colorActionSelectedOnBackgroundEmphasized == OtherMockTheme.otherMockThemeMultipleColorTokens) + func testInheritedThemeCanOverrideSemanticTokenColorActionSelectedOnBgEmphasized() throws { + XCTAssertNotEqual(inheritedTheme.colorActionSelectedOnBgEmphasized, abstractTheme.colorActionSelectedOnBgEmphasized) + XCTAssertTrue(inheritedTheme.colorActionSelectedOnBgEmphasized == OtherMockTheme.otherMockThemeMultipleColorTokens) } func testInheritedThemeCanOverrideSemanticTokenColorActionDisabled() throws { @@ -425,9 +424,9 @@ final class TestThemeOverrideOfColorSemanticTokens: XCTestCase { XCTAssertTrue(inheritedTheme.colorActionDisabled == OtherMockTheme.otherMockThemeMultipleColorTokens) } - func testInheritedThemeCanOverrideSemanticTokenColorActionDisabledOnBackgroundEmphasized() throws { - XCTAssertNotEqual(inheritedTheme.colorActionDisabledOnBackgroundEmphasized, abstractTheme.colorActionDisabledOnBackgroundEmphasized) - XCTAssertTrue(inheritedTheme.colorActionDisabledOnBackgroundEmphasized == OtherMockTheme.otherMockThemeMultipleColorTokens) + func testInheritedThemeCanOverrideSemanticTokenColorActionDisabledOnBgEmphasized() throws { + XCTAssertNotEqual(inheritedTheme.colorActionDisabledOnBgEmphasized, abstractTheme.colorActionDisabledOnBgEmphasized) + XCTAssertTrue(inheritedTheme.colorActionDisabledOnBgEmphasized == OtherMockTheme.otherMockThemeMultipleColorTokens) } func testInheritedThemeCanOverrideSemanticTokenColorActionVisited() throws { @@ -435,9 +434,9 @@ final class TestThemeOverrideOfColorSemanticTokens: XCTestCase { XCTAssertTrue(inheritedTheme.colorActionVisited == OtherMockTheme.otherMockThemeMultipleColorTokens) } - func testInheritedThemeCanOverrideSemanticTokenColorActionVistedOnBackgroundEmphasized() throws { - XCTAssertNotEqual(inheritedTheme.colorActionVistedOnBackgroundEmphasized, abstractTheme.colorActionVistedOnBackgroundEmphasized) - XCTAssertTrue(inheritedTheme.colorActionVistedOnBackgroundEmphasized == OtherMockTheme.otherMockThemeMultipleColorTokens) + func testInheritedThemeCanOverrideSemanticTokenColorActionVistedOnBgEmphasized() throws { + XCTAssertNotEqual(inheritedTheme.colorActionVistedOnBgEmphasized, abstractTheme.colorActionVistedOnBgEmphasized) + XCTAssertTrue(inheritedTheme.colorActionVistedOnBgEmphasized == OtherMockTheme.otherMockThemeMultipleColorTokens) } func testInheritedThemeCanOverrideSemanticTokenColorActionPrimaryEnabled() throws { @@ -445,9 +444,9 @@ final class TestThemeOverrideOfColorSemanticTokens: XCTestCase { XCTAssertTrue(inheritedTheme.colorActionPrimaryEnabled == OtherMockTheme.otherMockThemeMultipleColorTokens) } - func testInheritedThemeCanOverrideSemanticTokenColorActionPrimaryEnabledOnBackgroundEmphasized() throws { - XCTAssertNotEqual(inheritedTheme.colorActionPrimaryEnabledOnBackgroundEmphasized, abstractTheme.colorActionPrimaryEnabledOnBackgroundEmphasized) - XCTAssertTrue(inheritedTheme.colorActionPrimaryEnabledOnBackgroundEmphasized == OtherMockTheme.otherMockThemeMultipleColorTokens) + func testInheritedThemeCanOverrideSemanticTokenColorActionPrimaryEnabledOnBgEmphasized() throws { + XCTAssertNotEqual(inheritedTheme.colorActionPrimaryEnabledOnBgEmphasized, abstractTheme.colorActionPrimaryEnabledOnBgEmphasized) + XCTAssertTrue(inheritedTheme.colorActionPrimaryEnabledOnBgEmphasized == OtherMockTheme.otherMockThemeMultipleColorTokens) } func testInheritedThemeCanOverrideSemanticTokenColorActionPrimaryHover() throws { @@ -455,9 +454,9 @@ final class TestThemeOverrideOfColorSemanticTokens: XCTestCase { XCTAssertTrue(inheritedTheme.colorActionPrimaryHover == OtherMockTheme.otherMockThemeMultipleColorTokens) } - func testInheritedThemeCanOverrideSemanticTokenColorActionPrimaryHoverOnBackgroundEmphasized() throws { - XCTAssertNotEqual(inheritedTheme.colorActionPrimaryHoverOnBackgroundEmphasized, abstractTheme.colorActionPrimaryHoverOnBackgroundEmphasized) - XCTAssertTrue(inheritedTheme.colorActionPrimaryHoverOnBackgroundEmphasized == OtherMockTheme.otherMockThemeMultipleColorTokens) + func testInheritedThemeCanOverrideSemanticTokenColorActionPrimaryHoverOnBgEmphasized() throws { + XCTAssertNotEqual(inheritedTheme.colorActionPrimaryHoverOnBgEmphasized, abstractTheme.colorActionPrimaryHoverOnBgEmphasized) + XCTAssertTrue(inheritedTheme.colorActionPrimaryHoverOnBgEmphasized == OtherMockTheme.otherMockThemeMultipleColorTokens) } func testInheritedThemeCanOverrideSemanticTokenColorActionPrimaryPressed() throws { @@ -465,9 +464,9 @@ final class TestThemeOverrideOfColorSemanticTokens: XCTestCase { XCTAssertTrue(inheritedTheme.colorActionPrimaryPressed == OtherMockTheme.otherMockThemeMultipleColorTokens) } - func testInheritedThemeCanOverrideSemanticTokenColorActionPrimaryPressedOnBackgroundEmphasized() throws { - XCTAssertNotEqual(inheritedTheme.colorActionPrimaryPressedOnBackgroundEmphasized, abstractTheme.colorActionPrimaryPressedOnBackgroundEmphasized) - XCTAssertTrue(inheritedTheme.colorActionPrimaryPressedOnBackgroundEmphasized == OtherMockTheme.otherMockThemeMultipleColorTokens) + func testInheritedThemeCanOverrideSemanticTokenColorActionPrimaryPressedOnBgEmphasized() throws { + XCTAssertNotEqual(inheritedTheme.colorActionPrimaryPressedOnBgEmphasized, abstractTheme.colorActionPrimaryPressedOnBgEmphasized) + XCTAssertTrue(inheritedTheme.colorActionPrimaryPressedOnBgEmphasized == OtherMockTheme.otherMockThemeMultipleColorTokens) } func testInheritedThemeCanOverrideSemanticTokenColorActionPrimaryLoading() throws { @@ -475,9 +474,9 @@ final class TestThemeOverrideOfColorSemanticTokens: XCTestCase { XCTAssertTrue(inheritedTheme.colorActionPrimaryLoading == OtherMockTheme.otherMockThemeMultipleColorTokens) } - func testInheritedThemeCanOverrideSemanticTokenColorActionPrimaryLoadingOnBackgroundEmphasized() throws { - XCTAssertNotEqual(inheritedTheme.colorActionPrimaryLoadingOnBackgroundEmphasized, abstractTheme.colorActionPrimaryLoadingOnBackgroundEmphasized) - XCTAssertTrue(inheritedTheme.colorActionPrimaryLoadingOnBackgroundEmphasized == OtherMockTheme.otherMockThemeMultipleColorTokens) + func testInheritedThemeCanOverrideSemanticTokenColorActionPrimaryLoadingOnBgEmphasized() throws { + XCTAssertNotEqual(inheritedTheme.colorActionPrimaryLoadingOnBgEmphasized, abstractTheme.colorActionPrimaryLoadingOnBgEmphasized) + XCTAssertTrue(inheritedTheme.colorActionPrimaryLoadingOnBgEmphasized == OtherMockTheme.otherMockThemeMultipleColorTokens) } func testInheritedThemeCanOverrideSemanticTokenColorActionPrimaryFocus() throws { @@ -485,9 +484,9 @@ final class TestThemeOverrideOfColorSemanticTokens: XCTestCase { XCTAssertTrue(inheritedTheme.colorActionPrimaryFocus == OtherMockTheme.otherMockThemeMultipleColorTokens) } - func testInheritedThemeCanOverrideSemanticTokenColorActionPrimaryFocusOnBackgroundEmphasized() throws { - XCTAssertNotEqual(inheritedTheme.colorActionPrimaryFocusOnBackgroundEmphasized, abstractTheme.colorActionPrimaryFocusOnBackgroundEmphasized) - XCTAssertTrue(inheritedTheme.colorActionPrimaryFocusOnBackgroundEmphasized == OtherMockTheme.otherMockThemeMultipleColorTokens) + func testInheritedThemeCanOverrideSemanticTokenColorActionPrimaryFocusOnBgEmphasized() throws { + XCTAssertNotEqual(inheritedTheme.colorActionPrimaryFocusOnBgEmphasized, abstractTheme.colorActionPrimaryFocusOnBgEmphasized) + XCTAssertTrue(inheritedTheme.colorActionPrimaryFocusOnBgEmphasized == OtherMockTheme.otherMockThemeMultipleColorTokens) } func testInheritedThemeCanOverrideSemanticTokenColorActionSecondaryEnabled() throws { @@ -495,9 +494,9 @@ final class TestThemeOverrideOfColorSemanticTokens: XCTestCase { XCTAssertTrue(inheritedTheme.colorActionSecondaryEnabled == OtherMockTheme.otherMockThemeMultipleColorTokens) } - func testInheritedThemeCanOverrideSemanticTokenColorActionSecondaryEnabledOnBackgroundEmphasized() throws { - XCTAssertNotEqual(inheritedTheme.colorActionSecondaryEnabledOnBackgroundEmphasized, abstractTheme.colorActionSecondaryEnabledOnBackgroundEmphasized) - XCTAssertTrue(inheritedTheme.colorActionSecondaryEnabledOnBackgroundEmphasized == OtherMockTheme.otherMockThemeMultipleColorTokens) + func testInheritedThemeCanOverrideSemanticTokenColorActionSecondaryEnabledOnBgEmphasized() throws { + XCTAssertNotEqual(inheritedTheme.colorActionSecondaryEnabledOnBgEmphasized, abstractTheme.colorActionSecondaryEnabledOnBgEmphasized) + XCTAssertTrue(inheritedTheme.colorActionSecondaryEnabledOnBgEmphasized == OtherMockTheme.otherMockThemeMultipleColorTokens) } func testInheritedThemeCanOverrideSemanticTokenColorActionSecondaryHover() throws { @@ -505,9 +504,9 @@ final class TestThemeOverrideOfColorSemanticTokens: XCTestCase { XCTAssertTrue(inheritedTheme.colorActionSecondaryHover == OtherMockTheme.otherMockThemeMultipleColorTokens) } - func testInheritedThemeCanOverrideSemanticTokenColorActionSecondaryHoverOnBackgroundEmphasized() throws { - XCTAssertNotEqual(inheritedTheme.colorActionSecondaryHoverOnBackgroundEmphasized, abstractTheme.colorActionSecondaryHoverOnBackgroundEmphasized) - XCTAssertTrue(inheritedTheme.colorActionSecondaryHoverOnBackgroundEmphasized == OtherMockTheme.otherMockThemeMultipleColorTokens) + func testInheritedThemeCanOverrideSemanticTokenColorActionSecondaryHoverOnBgEmphasized() throws { + XCTAssertNotEqual(inheritedTheme.colorActionSecondaryHoverOnBgEmphasized, abstractTheme.colorActionSecondaryHoverOnBgEmphasized) + XCTAssertTrue(inheritedTheme.colorActionSecondaryHoverOnBgEmphasized == OtherMockTheme.otherMockThemeMultipleColorTokens) } func testInheritedThemeCanOverrideSemanticTokenColorActionSecondaryPressed() throws { @@ -515,9 +514,9 @@ final class TestThemeOverrideOfColorSemanticTokens: XCTestCase { XCTAssertTrue(inheritedTheme.colorActionSecondaryPressed == OtherMockTheme.otherMockThemeMultipleColorTokens) } - func testInheritedThemeCanOverrideSemanticTokenColorActionSecondaryPressedOnBackgroundEmphasized() throws { - XCTAssertNotEqual(inheritedTheme.colorActionSecondaryPressedOnBackgroundEmphasized, abstractTheme.colorActionSecondaryPressedOnBackgroundEmphasized) - XCTAssertTrue(inheritedTheme.colorActionSecondaryPressedOnBackgroundEmphasized == OtherMockTheme.otherMockThemeMultipleColorTokens) + func testInheritedThemeCanOverrideSemanticTokenColorActionSecondaryPressedOnBgEmphasized() throws { + XCTAssertNotEqual(inheritedTheme.colorActionSecondaryPressedOnBgEmphasized, abstractTheme.colorActionSecondaryPressedOnBgEmphasized) + XCTAssertTrue(inheritedTheme.colorActionSecondaryPressedOnBgEmphasized == OtherMockTheme.otherMockThemeMultipleColorTokens) } func testInheritedThemeCanOverrideSemanticTokenColorActionSecondaryLoading() throws { @@ -525,9 +524,9 @@ final class TestThemeOverrideOfColorSemanticTokens: XCTestCase { XCTAssertTrue(inheritedTheme.colorActionSecondaryLoading == OtherMockTheme.otherMockThemeMultipleColorTokens) } - func testInheritedThemeCanOverrideSemanticTokenColorActionSecondaryLoadingOnBackgroundEmphasized() throws { - XCTAssertNotEqual(inheritedTheme.colorActionSecondaryLoadingOnBackgroundEmphasized, abstractTheme.colorActionSecondaryLoadingOnBackgroundEmphasized) - XCTAssertTrue(inheritedTheme.colorActionSecondaryLoadingOnBackgroundEmphasized == OtherMockTheme.otherMockThemeMultipleColorTokens) + func testInheritedThemeCanOverrideSemanticTokenColorActionSecondaryLoadingOnBgEmphasized() throws { + XCTAssertNotEqual(inheritedTheme.colorActionSecondaryLoadingOnBgEmphasized, abstractTheme.colorActionSecondaryLoadingOnBgEmphasized) + XCTAssertTrue(inheritedTheme.colorActionSecondaryLoadingOnBgEmphasized == OtherMockTheme.otherMockThemeMultipleColorTokens) } func testInheritedThemeCanOverrideSemanticTokenColorActionSecondaryFocus() throws { @@ -535,9 +534,9 @@ final class TestThemeOverrideOfColorSemanticTokens: XCTestCase { XCTAssertTrue(inheritedTheme.colorActionSecondaryFocus == OtherMockTheme.otherMockThemeMultipleColorTokens) } - func testInheritedThemeCanOverrideSemanticTokenColorActionSecondaryFocusOnBackgroundEmphasized() throws { - XCTAssertNotEqual(inheritedTheme.colorActionSecondaryFocusOnBackgroundEmphasized, abstractTheme.colorActionSecondaryFocusOnBackgroundEmphasized) - XCTAssertTrue(inheritedTheme.colorActionSecondaryFocusOnBackgroundEmphasized == OtherMockTheme.otherMockThemeMultipleColorTokens) + func testInheritedThemeCanOverrideSemanticTokenColorActionSecondaryFocusOnBgEmphasized() throws { + XCTAssertNotEqual(inheritedTheme.colorActionSecondaryFocusOnBgEmphasized, abstractTheme.colorActionSecondaryFocusOnBgEmphasized) + XCTAssertTrue(inheritedTheme.colorActionSecondaryFocusOnBgEmphasized == OtherMockTheme.otherMockThemeMultipleColorTokens) } func testInheritedThemeCanOverrideSemanticTokenColorActionNegativeEnabled() throws { @@ -565,119 +564,119 @@ final class TestThemeOverrideOfColorSemanticTokens: XCTestCase { XCTAssertTrue(inheritedTheme.colorActionNegativeFocus == OtherMockTheme.otherMockThemeMultipleColorTokens) } - func testInheritedThemeCanOverrideSemanticTokenColorActionOnBackgroundActionDisabled() throws { - XCTAssertNotEqual(inheritedTheme.colorActionOnBackgroundActionDisabled, abstractTheme.colorActionOnBackgroundActionDisabled) - XCTAssertTrue(inheritedTheme.colorActionOnBackgroundActionDisabled == OtherMockTheme.otherMockThemeMultipleColorTokens) + func testInheritedThemeCanOverrideSemanticTokenColorActionOnBgActionDisabled() throws { + XCTAssertNotEqual(inheritedTheme.colorActionOnBgActionDisabled, abstractTheme.colorActionOnBgActionDisabled) + XCTAssertTrue(inheritedTheme.colorActionOnBgActionDisabled == OtherMockTheme.otherMockThemeMultipleColorTokens) } - func testInheritedThemeCanOverrideSemanticTokenColorActionOnBackgroundActionDisabledOnBackgroundEmphasized() throws { - XCTAssertNotEqual(inheritedTheme.colorActionOnBackgroundActionDisabledOnBackgroundEmphasized, abstractTheme.colorActionOnBackgroundActionDisabledOnBackgroundEmphasized) - XCTAssertTrue(inheritedTheme.colorActionOnBackgroundActionDisabledOnBackgroundEmphasized == OtherMockTheme.otherMockThemeMultipleColorTokens) + func testInheritedThemeCanOverrideSemanticTokenColorActionOnBgActionDisabledOnBgEmphasized() throws { + XCTAssertNotEqual(inheritedTheme.colorActionOnBgActionDisabledOnBgEmphasized, abstractTheme.colorActionOnBgActionDisabledOnBgEmphasized) + XCTAssertTrue(inheritedTheme.colorActionOnBgActionDisabledOnBgEmphasized == OtherMockTheme.otherMockThemeMultipleColorTokens) } - func testInheritedThemeCanOverrideSemanticTokenColorActionOnBackgroundActionNegative() throws { - XCTAssertNotEqual(inheritedTheme.colorActionOnBackgroundActionNegative, abstractTheme.colorActionOnBackgroundActionNegative) - XCTAssertTrue(inheritedTheme.colorActionOnBackgroundActionNegative == OtherMockTheme.otherMockThemeMultipleColorTokens) + func testInheritedThemeCanOverrideSemanticTokenColorActionOnBgActionNegative() throws { + XCTAssertNotEqual(inheritedTheme.colorActionOnBgActionNegative, abstractTheme.colorActionOnBgActionNegative) + XCTAssertTrue(inheritedTheme.colorActionOnBgActionNegative == OtherMockTheme.otherMockThemeMultipleColorTokens) } - func testInheritedThemeCanOverrideSemanticTokenColorActionOnBackgroundActionPrimaryEnabled() throws { - XCTAssertNotEqual(inheritedTheme.colorActionOnBackgroundActionPrimaryEnabled, abstractTheme.colorActionOnBackgroundActionPrimaryEnabled) - XCTAssertTrue(inheritedTheme.colorActionOnBackgroundActionPrimaryEnabled == OtherMockTheme.otherMockThemeMultipleColorTokens) + func testInheritedThemeCanOverrideSemanticTokenColorActionOnBgActionPrimaryEnabled() throws { + XCTAssertNotEqual(inheritedTheme.colorActionOnBgActionPrimaryEnabled, abstractTheme.colorActionOnBgActionPrimaryEnabled) + XCTAssertTrue(inheritedTheme.colorActionOnBgActionPrimaryEnabled == OtherMockTheme.otherMockThemeMultipleColorTokens) } - func testInheritedThemeCanOverrideSemanticTokenColorActionOnBackgroundActionPrimaryEnabledOnBackgroundEmphasized() throws { - XCTAssertNotEqual(inheritedTheme.colorActionOnBackgroundActionPrimaryEnabledOnBackgroundEmphasized, abstractTheme.colorActionOnBackgroundActionPrimaryEnabledOnBackgroundEmphasized) - XCTAssertTrue(inheritedTheme.colorActionOnBackgroundActionPrimaryEnabledOnBackgroundEmphasized == OtherMockTheme.otherMockThemeMultipleColorTokens) + func testInheritedThemeCanOverrideSemanticTokenColorActionOnBgActionPrimaryEnabledOnBgEmphasized() throws { + XCTAssertNotEqual(inheritedTheme.colorActionOnBgActionPrimaryEnabledOnBgEmphasized, abstractTheme.colorActionOnBgActionPrimaryEnabledOnBgEmphasized) + XCTAssertTrue(inheritedTheme.colorActionOnBgActionPrimaryEnabledOnBgEmphasized == OtherMockTheme.otherMockThemeMultipleColorTokens) } - func testInheritedThemeCanOverrideSemanticTokenColorActionOnBackgroundActionPrimaryHover() throws { - XCTAssertNotEqual(inheritedTheme.colorActionOnBackgroundActionPrimaryHover, abstractTheme.colorActionOnBackgroundActionPrimaryHover) - XCTAssertTrue(inheritedTheme.colorActionOnBackgroundActionPrimaryHover == OtherMockTheme.otherMockThemeMultipleColorTokens) + func testInheritedThemeCanOverrideSemanticTokenColorActionOnBgActionPrimaryHover() throws { + XCTAssertNotEqual(inheritedTheme.colorActionOnBgActionPrimaryHover, abstractTheme.colorActionOnBgActionPrimaryHover) + XCTAssertTrue(inheritedTheme.colorActionOnBgActionPrimaryHover == OtherMockTheme.otherMockThemeMultipleColorTokens) } - func testInheritedThemeCanOverrideSemanticTokenColorActionOnBackgroundActionPrimaryHoverOnBackgroundEmphasized() throws { - XCTAssertNotEqual(inheritedTheme.colorActionOnBackgroundActionPrimaryHoverOnBackgroundEmphasized, abstractTheme.colorActionOnBackgroundActionPrimaryHoverOnBackgroundEmphasized) - XCTAssertTrue(inheritedTheme.colorActionOnBackgroundActionPrimaryHoverOnBackgroundEmphasized == OtherMockTheme.otherMockThemeMultipleColorTokens) + func testInheritedThemeCanOverrideSemanticTokenColorActionOnBgActionPrimaryHoverOnBgEmphasized() throws { + XCTAssertNotEqual(inheritedTheme.colorActionOnBgActionPrimaryHoverOnBgEmphasized, abstractTheme.colorActionOnBgActionPrimaryHoverOnBgEmphasized) + XCTAssertTrue(inheritedTheme.colorActionOnBgActionPrimaryHoverOnBgEmphasized == OtherMockTheme.otherMockThemeMultipleColorTokens) } - func testInheritedThemeCanOverrideSemanticTokenColorActionOnBackgroundActionPrimaryPressed() throws { - XCTAssertNotEqual(inheritedTheme.colorActionOnBackgroundActionPrimaryPressed, abstractTheme.colorActionOnBackgroundActionPrimaryPressed) - XCTAssertTrue(inheritedTheme.colorActionOnBackgroundActionPrimaryPressed == OtherMockTheme.otherMockThemeMultipleColorTokens) + func testInheritedThemeCanOverrideSemanticTokenColorActionOnBgActionPrimaryPressed() throws { + XCTAssertNotEqual(inheritedTheme.colorActionOnBgActionPrimaryPressed, abstractTheme.colorActionOnBgActionPrimaryPressed) + XCTAssertTrue(inheritedTheme.colorActionOnBgActionPrimaryPressed == OtherMockTheme.otherMockThemeMultipleColorTokens) } - func testInheritedThemeCanOverrideSemanticTokenColorActionOnBackgroundActionPrimaryPressedOnBackgroundEmphasized() throws { - XCTAssertNotEqual(inheritedTheme.colorActionOnBackgroundActionPrimaryPressedOnBackgroundEmphasized, abstractTheme.colorActionOnBackgroundActionPrimaryPressedOnBackgroundEmphasized) - XCTAssertTrue(inheritedTheme.colorActionOnBackgroundActionPrimaryPressedOnBackgroundEmphasized == OtherMockTheme.otherMockThemeMultipleColorTokens) + func testInheritedThemeCanOverrideSemanticTokenColorActionOnBgActionPrimaryPressedOnBgEmphasized() throws { + XCTAssertNotEqual(inheritedTheme.colorActionOnBgActionPrimaryPressedOnBgEmphasized, abstractTheme.colorActionOnBgActionPrimaryPressedOnBgEmphasized) + XCTAssertTrue(inheritedTheme.colorActionOnBgActionPrimaryPressedOnBgEmphasized == OtherMockTheme.otherMockThemeMultipleColorTokens) } - func testInheritedThemeCanOverrideSemanticTokenColorActionOnBackgroundActionPrimaryLoading() throws { - XCTAssertNotEqual(inheritedTheme.colorActionOnBackgroundActionPrimaryLoading, abstractTheme.colorActionOnBackgroundActionPrimaryLoading) - XCTAssertTrue(inheritedTheme.colorActionOnBackgroundActionPrimaryLoading == OtherMockTheme.otherMockThemeMultipleColorTokens) + func testInheritedThemeCanOverrideSemanticTokenColorActionOnBgActionPrimaryLoading() throws { + XCTAssertNotEqual(inheritedTheme.colorActionOnBgActionPrimaryLoading, abstractTheme.colorActionOnBgActionPrimaryLoading) + XCTAssertTrue(inheritedTheme.colorActionOnBgActionPrimaryLoading == OtherMockTheme.otherMockThemeMultipleColorTokens) } - func testInheritedThemeCanOverrideSemanticTokenColorActionOnBackgroundActionPrimaryLoadingOnBackgroundEmphasized() throws { - XCTAssertNotEqual(inheritedTheme.colorActionOnBackgroundActionPrimaryLoadingOnBackgroundEmphasized, abstractTheme.colorActionOnBackgroundActionPrimaryLoadingOnBackgroundEmphasized) - XCTAssertTrue(inheritedTheme.colorActionOnBackgroundActionPrimaryLoadingOnBackgroundEmphasized == OtherMockTheme.otherMockThemeMultipleColorTokens) + func testInheritedThemeCanOverrideSemanticTokenColorActionOnBgActionPrimaryLoadingOnBgEmphasized() throws { + XCTAssertNotEqual(inheritedTheme.colorActionOnBgActionPrimaryLoadingOnBgEmphasized, abstractTheme.colorActionOnBgActionPrimaryLoadingOnBgEmphasized) + XCTAssertTrue(inheritedTheme.colorActionOnBgActionPrimaryLoadingOnBgEmphasized == OtherMockTheme.otherMockThemeMultipleColorTokens) } - func testInheritedThemeCanOverrideSemanticTokenColorActionOnBackgroundActionPrimaryFocus() throws { - XCTAssertNotEqual(inheritedTheme.colorActionOnBackgroundActionPrimaryFocus, abstractTheme.colorActionOnBackgroundActionPrimaryFocus) - XCTAssertTrue(inheritedTheme.colorActionOnBackgroundActionPrimaryFocus == OtherMockTheme.otherMockThemeMultipleColorTokens) + func testInheritedThemeCanOverrideSemanticTokenColorActionOnBgActionPrimaryFocus() throws { + XCTAssertNotEqual(inheritedTheme.colorActionOnBgActionPrimaryFocus, abstractTheme.colorActionOnBgActionPrimaryFocus) + XCTAssertTrue(inheritedTheme.colorActionOnBgActionPrimaryFocus == OtherMockTheme.otherMockThemeMultipleColorTokens) } - func testInheritedThemeCanOverrideSemanticTokenColorActionOnBackgroundActionPrimaryFocusOnBackgroundEmphasized() throws { - XCTAssertNotEqual(inheritedTheme.colorActionOnBackgroundActionPrimaryFocusOnBackgroundEmphasized, abstractTheme.colorActionOnBackgroundActionPrimaryFocusOnBackgroundEmphasized) - XCTAssertTrue(inheritedTheme.colorActionOnBackgroundActionPrimaryFocusOnBackgroundEmphasized == OtherMockTheme.otherMockThemeMultipleColorTokens) + func testInheritedThemeCanOverrideSemanticTokenColorActionOnBgActionPrimaryFocusOnBgEmphasized() throws { + XCTAssertNotEqual(inheritedTheme.colorActionOnBgActionPrimaryFocusOnBgEmphasized, abstractTheme.colorActionOnBgActionPrimaryFocusOnBgEmphasized) + XCTAssertTrue(inheritedTheme.colorActionOnBgActionPrimaryFocusOnBgEmphasized == OtherMockTheme.otherMockThemeMultipleColorTokens) } - func testInheritedThemeCanOverrideSemanticTokenColorActionOnBackgroundActionSecondaryEnabled() throws { - XCTAssertNotEqual(inheritedTheme.colorActionOnBackgroundActionSecondaryEnabled, abstractTheme.colorActionOnBackgroundActionSecondaryEnabled) - XCTAssertTrue(inheritedTheme.colorActionOnBackgroundActionSecondaryEnabled == OtherMockTheme.otherMockThemeMultipleColorTokens) + func testInheritedThemeCanOverrideSemanticTokenColorActionOnBgActionSecondaryEnabled() throws { + XCTAssertNotEqual(inheritedTheme.colorActionOnBgActionSecondaryEnabled, abstractTheme.colorActionOnBgActionSecondaryEnabled) + XCTAssertTrue(inheritedTheme.colorActionOnBgActionSecondaryEnabled == OtherMockTheme.otherMockThemeMultipleColorTokens) } - func testInheritedThemeCanOverrideSemanticTokenColorActionOnBackgroundActionSecondaryEnabledOnBackgroundEmphasized() throws { - XCTAssertNotEqual(inheritedTheme.colorActionOnBackgroundActionSecondaryEnabledOnBackgroundEmphasized, abstractTheme.colorActionOnBackgroundActionSecondaryEnabledOnBackgroundEmphasized) - XCTAssertTrue(inheritedTheme.colorActionOnBackgroundActionSecondaryEnabledOnBackgroundEmphasized == OtherMockTheme.otherMockThemeMultipleColorTokens) + func testInheritedThemeCanOverrideSemanticTokenColorActionOnBgActionSecondaryEnabledOnBgEmphasized() throws { + XCTAssertNotEqual(inheritedTheme.colorActionOnBgActionSecondaryEnabledOnBgEmphasized, abstractTheme.colorActionOnBgActionSecondaryEnabledOnBgEmphasized) + XCTAssertTrue(inheritedTheme.colorActionOnBgActionSecondaryEnabledOnBgEmphasized == OtherMockTheme.otherMockThemeMultipleColorTokens) } - func testInheritedThemeCanOverrideSemanticTokenColorActionOnBackgroundActionSecondaryHover() throws { - XCTAssertNotEqual(inheritedTheme.colorActionOnBackgroundActionSecondaryHover, abstractTheme.colorActionOnBackgroundActionSecondaryHover) - XCTAssertTrue(inheritedTheme.colorActionOnBackgroundActionSecondaryHover == OtherMockTheme.otherMockThemeMultipleColorTokens) + func testInheritedThemeCanOverrideSemanticTokenColorActionOnBgActionSecondaryHover() throws { + XCTAssertNotEqual(inheritedTheme.colorActionOnBgActionSecondaryHover, abstractTheme.colorActionOnBgActionSecondaryHover) + XCTAssertTrue(inheritedTheme.colorActionOnBgActionSecondaryHover == OtherMockTheme.otherMockThemeMultipleColorTokens) } - func testInheritedThemeCanOverrideSemanticTokenColorActionOnBackgroundActionSecondaryHoverOnBackgroundEmphasized() throws { - XCTAssertNotEqual(inheritedTheme.colorActionOnBackgroundActionSecondaryHoverOnBackgroundEmphasized, abstractTheme.colorActionOnBackgroundActionSecondaryHoverOnBackgroundEmphasized) - XCTAssertTrue(inheritedTheme.colorActionOnBackgroundActionSecondaryHoverOnBackgroundEmphasized == OtherMockTheme.otherMockThemeMultipleColorTokens) + func testInheritedThemeCanOverrideSemanticTokenColorActionOnBgActionSecondaryHoverOnBgEmphasized() throws { + XCTAssertNotEqual(inheritedTheme.colorActionOnBgActionSecondaryHoverOnBgEmphasized, abstractTheme.colorActionOnBgActionSecondaryHoverOnBgEmphasized) + XCTAssertTrue(inheritedTheme.colorActionOnBgActionSecondaryHoverOnBgEmphasized == OtherMockTheme.otherMockThemeMultipleColorTokens) } - func testInheritedThemeCanOverrideSemanticTokenColorActionOnBackgroundActionSecondaryPressed() throws { - XCTAssertNotEqual(inheritedTheme.colorActionOnBackgroundActionSecondaryPressed, abstractTheme.colorActionOnBackgroundActionSecondaryPressed) - XCTAssertTrue(inheritedTheme.colorActionOnBackgroundActionSecondaryPressed == OtherMockTheme.otherMockThemeMultipleColorTokens) + func testInheritedThemeCanOverrideSemanticTokenColorActionOnBgActionSecondaryPressed() throws { + XCTAssertNotEqual(inheritedTheme.colorActionOnBgActionSecondaryPressed, abstractTheme.colorActionOnBgActionSecondaryPressed) + XCTAssertTrue(inheritedTheme.colorActionOnBgActionSecondaryPressed == OtherMockTheme.otherMockThemeMultipleColorTokens) } - func testInheritedThemeCanOverrideSemanticTokenColorActionOnBackgroundActionSecondaryPressedOnBackgroundEmphasized() throws { - XCTAssertNotEqual(inheritedTheme.colorActionOnBackgroundActionSecondaryPressedOnBackgroundEmphasized, abstractTheme.colorActionOnBackgroundActionSecondaryPressedOnBackgroundEmphasized) - XCTAssertTrue(inheritedTheme.colorActionOnBackgroundActionSecondaryPressedOnBackgroundEmphasized == OtherMockTheme.otherMockThemeMultipleColorTokens) + func testInheritedThemeCanOverrideSemanticTokenColorActionOnBgActionSecondaryPressedOnBgEmphasized() throws { + XCTAssertNotEqual(inheritedTheme.colorActionOnBgActionSecondaryPressedOnBgEmphasized, abstractTheme.colorActionOnBgActionSecondaryPressedOnBgEmphasized) + XCTAssertTrue(inheritedTheme.colorActionOnBgActionSecondaryPressedOnBgEmphasized == OtherMockTheme.otherMockThemeMultipleColorTokens) } - func testInheritedThemeCanOverrideSemanticTokenColorActionOnBackgroundActionSecondaryLoading() throws { - XCTAssertNotEqual(inheritedTheme.colorActionOnBackgroundActionSecondaryLoading, abstractTheme.colorActionOnBackgroundActionSecondaryLoading) - XCTAssertTrue(inheritedTheme.colorActionOnBackgroundActionSecondaryLoading == OtherMockTheme.otherMockThemeMultipleColorTokens) + func testInheritedThemeCanOverrideSemanticTokenColorActionOnBgActionSecondaryLoading() throws { + XCTAssertNotEqual(inheritedTheme.colorActionOnBgActionSecondaryLoading, abstractTheme.colorActionOnBgActionSecondaryLoading) + XCTAssertTrue(inheritedTheme.colorActionOnBgActionSecondaryLoading == OtherMockTheme.otherMockThemeMultipleColorTokens) } - func testInheritedThemeCanOverrideSemanticTokenColorActionOnBackgroundActionSecondaryLoadingOnBackgroundEmphasized() throws { - XCTAssertNotEqual(inheritedTheme.colorActionOnBackgroundActionSecondaryLoadingOnBackgroundEmphasized, abstractTheme.colorActionOnBackgroundActionSecondaryLoadingOnBackgroundEmphasized) - XCTAssertTrue(inheritedTheme.colorActionOnBackgroundActionSecondaryLoadingOnBackgroundEmphasized == OtherMockTheme.otherMockThemeMultipleColorTokens) + func testInheritedThemeCanOverrideSemanticTokenColorActionOnBgActionSecondaryLoadingOnBgEmphasized() throws { + XCTAssertNotEqual(inheritedTheme.colorActionOnBgActionSecondaryLoadingOnBgEmphasized, abstractTheme.colorActionOnBgActionSecondaryLoadingOnBgEmphasized) + XCTAssertTrue(inheritedTheme.colorActionOnBgActionSecondaryLoadingOnBgEmphasized == OtherMockTheme.otherMockThemeMultipleColorTokens) } - func testInheritedThemeCanOverrideSemanticTokenColorActionOnBackgroundActionSecondaryFocus() throws { - XCTAssertNotEqual(inheritedTheme.colorActionOnBackgroundActionSecondaryFocus, abstractTheme.colorActionOnBackgroundActionSecondaryFocus) - XCTAssertTrue(inheritedTheme.colorActionOnBackgroundActionSecondaryFocus == OtherMockTheme.otherMockThemeMultipleColorTokens) + func testInheritedThemeCanOverrideSemanticTokenColorActionOnBgActionSecondaryFocus() throws { + XCTAssertNotEqual(inheritedTheme.colorActionOnBgActionSecondaryFocus, abstractTheme.colorActionOnBgActionSecondaryFocus) + XCTAssertTrue(inheritedTheme.colorActionOnBgActionSecondaryFocus == OtherMockTheme.otherMockThemeMultipleColorTokens) } - func testInheritedThemeCanOverrideSemanticTokenColorActionOnBackgroundActionSecondaryFocusOnBackgroundEmphasized() throws { - XCTAssertNotEqual(inheritedTheme.colorActionOnBackgroundActionSecondaryFocusOnBackgroundEmphasized, abstractTheme.colorActionOnBackgroundActionSecondaryFocusOnBackgroundEmphasized) - XCTAssertTrue(inheritedTheme.colorActionOnBackgroundActionSecondaryFocusOnBackgroundEmphasized == OtherMockTheme.otherMockThemeMultipleColorTokens) + func testInheritedThemeCanOverrideSemanticTokenColorActionOnBgActionSecondaryFocusOnBgEmphasized() throws { + XCTAssertNotEqual(inheritedTheme.colorActionOnBgActionSecondaryFocusOnBgEmphasized, abstractTheme.colorActionOnBgActionSecondaryFocusOnBgEmphasized) + XCTAssertTrue(inheritedTheme.colorActionOnBgActionSecondaryFocusOnBgEmphasized == OtherMockTheme.otherMockThemeMultipleColorTokens) } // MARK: Semantic token - Colors - Always @@ -717,39 +716,39 @@ final class TestThemeOverrideOfColorSemanticTokens: XCTestCase { XCTAssertTrue(inheritedTheme.colorAlwaysAccent == OtherMockTheme.otherMockThemeMultipleColorTokens) } - func testInheritedThemeCanOverrideSemanticTokenColorAlwaysOnBackgroundBlack() throws { - XCTAssertNotEqual(inheritedTheme.colorAlwaysOnBackgroundBlack, abstractTheme.colorAlwaysOnBackgroundBlack) - XCTAssertTrue(inheritedTheme.colorAlwaysOnBackgroundBlack == OtherMockTheme.otherMockThemeMultipleColorTokens) + func testInheritedThemeCanOverrideSemanticTokenColorAlwaysOnBgBlack() throws { + XCTAssertNotEqual(inheritedTheme.colorAlwaysOnBgBlack, abstractTheme.colorAlwaysOnBgBlack) + XCTAssertTrue(inheritedTheme.colorAlwaysOnBgBlack == OtherMockTheme.otherMockThemeMultipleColorTokens) } - func testInheritedThemeCanOverrideSemanticTokenColorAlwaysOnBackgroundWhite() throws { - XCTAssertNotEqual(inheritedTheme.colorAlwaysOnBackgroundWhite, abstractTheme.colorAlwaysOnBackgroundWhite) - XCTAssertTrue(inheritedTheme.colorAlwaysOnBackgroundWhite == OtherMockTheme.otherMockThemeMultipleColorTokens) + func testInheritedThemeCanOverrideSemanticTokenColorAlwaysOnBgWhite() throws { + XCTAssertNotEqual(inheritedTheme.colorAlwaysOnBgWhite, abstractTheme.colorAlwaysOnBgWhite) + XCTAssertTrue(inheritedTheme.colorAlwaysOnBgWhite == OtherMockTheme.otherMockThemeMultipleColorTokens) } - func testInheritedThemeCanOverrideSemanticTokenColorAlwaysOnBackgroundWarning() throws { - XCTAssertNotEqual(inheritedTheme.colorAlwaysOnBackgroundWarning, abstractTheme.colorAlwaysOnBackgroundWarning) - XCTAssertTrue(inheritedTheme.colorAlwaysOnBackgroundWarning == OtherMockTheme.otherMockThemeMultipleColorTokens) + func testInheritedThemeCanOverrideSemanticTokenColorAlwaysOnBgWarning() throws { + XCTAssertNotEqual(inheritedTheme.colorAlwaysOnBgWarning, abstractTheme.colorAlwaysOnBgWarning) + XCTAssertTrue(inheritedTheme.colorAlwaysOnBgWarning == OtherMockTheme.otherMockThemeMultipleColorTokens) } - func testInheritedThemeCanOverrideSemanticTokenColorAlwaysOnBackgroundNegative() throws { - XCTAssertNotEqual(inheritedTheme.colorAlwaysOnBackgroundNegative, abstractTheme.colorAlwaysOnBackgroundNegative) - XCTAssertTrue(inheritedTheme.colorAlwaysOnBackgroundNegative == OtherMockTheme.otherMockThemeMultipleColorTokens) + func testInheritedThemeCanOverrideSemanticTokenColorAlwaysOnBgNegative() throws { + XCTAssertNotEqual(inheritedTheme.colorAlwaysOnBgNegative, abstractTheme.colorAlwaysOnBgNegative) + XCTAssertTrue(inheritedTheme.colorAlwaysOnBgNegative == OtherMockTheme.otherMockThemeMultipleColorTokens) } - func testInheritedThemeCanOverrideSemanticTokenColorAlwaysOnBackgroundPositive() throws { - XCTAssertNotEqual(inheritedTheme.colorAlwaysOnBackgroundPositive, abstractTheme.colorAlwaysOnBackgroundPositive) - XCTAssertTrue(inheritedTheme.colorAlwaysOnBackgroundPositive == OtherMockTheme.otherMockThemeMultipleColorTokens) + func testInheritedThemeCanOverrideSemanticTokenColorAlwaysOnBgPositive() throws { + XCTAssertNotEqual(inheritedTheme.colorAlwaysOnBgPositive, abstractTheme.colorAlwaysOnBgPositive) + XCTAssertTrue(inheritedTheme.colorAlwaysOnBgPositive == OtherMockTheme.otherMockThemeMultipleColorTokens) } - func testInheritedThemeCanOverrideSemanticTokenColorAlwaysOnBackgroundInfo() throws { - XCTAssertNotEqual(inheritedTheme.colorAlwaysOnBackgroundInfo, abstractTheme.colorAlwaysOnBackgroundInfo) - XCTAssertTrue(inheritedTheme.colorAlwaysOnBackgroundInfo == OtherMockTheme.otherMockThemeMultipleColorTokens) + func testInheritedThemeCanOverrideSemanticTokenColorAlwaysOnBgInfo() throws { + XCTAssertNotEqual(inheritedTheme.colorAlwaysOnBgInfo, abstractTheme.colorAlwaysOnBgInfo) + XCTAssertTrue(inheritedTheme.colorAlwaysOnBgInfo == OtherMockTheme.otherMockThemeMultipleColorTokens) } - func testInheritedThemeCanOverrideSemanticTokenColorAlwaysOnBackgroundAccent() throws { - XCTAssertNotEqual(inheritedTheme.colorAlwaysOnBackgroundAccent, abstractTheme.colorAlwaysOnBackgroundAccent) - XCTAssertTrue(inheritedTheme.colorAlwaysOnBackgroundAccent == OtherMockTheme.otherMockThemeMultipleColorTokens) + func testInheritedThemeCanOverrideSemanticTokenColorAlwaysOnBgAccent() throws { + XCTAssertNotEqual(inheritedTheme.colorAlwaysOnBgAccent, abstractTheme.colorAlwaysOnBgAccent) + XCTAssertTrue(inheritedTheme.colorAlwaysOnBgAccent == OtherMockTheme.otherMockThemeMultipleColorTokens) } // MARK: Semantic token - Colors - Transparent @@ -766,14 +765,14 @@ final class TestThemeOverrideOfColorSemanticTokens: XCTestCase { XCTAssertTrue(inheritedTheme.colorElevationRaised == OtherMockTheme.otherMockThemeMultipleColorTokens) } - func testInheritedThemeCanOverrideSemanticTokenColorElevationRaisedOnBackgroundSecondary() throws { - XCTAssertNotEqual(inheritedTheme.colorElevationRaisedOnBackgroundSecondary, abstractTheme.colorElevationRaisedOnBackgroundSecondary) - XCTAssertTrue(inheritedTheme.colorElevationRaisedOnBackgroundSecondary == OtherMockTheme.otherMockThemeMultipleColorTokens) + func testInheritedThemeCanOverrideSemanticTokenColorElevationRaisedOnBgSecondary() throws { + XCTAssertNotEqual(inheritedTheme.colorElevationRaisedOnBgSecondary, abstractTheme.colorElevationRaisedOnBgSecondary) + XCTAssertTrue(inheritedTheme.colorElevationRaisedOnBgSecondary == OtherMockTheme.otherMockThemeMultipleColorTokens) } - func testInheritedThemeCanOverrideSemanticTokenColorElevationRaisedOnBackgroundEmphasized() throws { - XCTAssertNotEqual(inheritedTheme.colorElevationRaisedOnBackgroundEmphasized, abstractTheme.colorElevationRaisedOnBackgroundEmphasized) - XCTAssertTrue(inheritedTheme.colorElevationRaisedOnBackgroundEmphasized == OtherMockTheme.otherMockThemeMultipleColorTokens) + func testInheritedThemeCanOverrideSemanticTokenColorElevationRaisedOnBgEmphasized() throws { + XCTAssertNotEqual(inheritedTheme.colorElevationRaisedOnBgEmphasized, abstractTheme.colorElevationRaisedOnBgEmphasized) + XCTAssertTrue(inheritedTheme.colorElevationRaisedOnBgEmphasized == OtherMockTheme.otherMockThemeMultipleColorTokens) } func testInheritedThemeCanOverrideSemanticTokenColorElevationDrag() throws { @@ -781,14 +780,14 @@ final class TestThemeOverrideOfColorSemanticTokens: XCTestCase { XCTAssertTrue(inheritedTheme.colorElevationDrag == OtherMockTheme.otherMockThemeMultipleColorTokens) } - func testInheritedThemeCanOverrideSemanticTokenColorElevationDragOnBackgroundSecondary() throws { - XCTAssertNotEqual(inheritedTheme.colorElevationDragOnBackgroundSecondary, abstractTheme.colorElevationDragOnBackgroundSecondary) - XCTAssertTrue(inheritedTheme.colorElevationDragOnBackgroundSecondary == OtherMockTheme.otherMockThemeMultipleColorTokens) + func testInheritedThemeCanOverrideSemanticTokenColorElevationDragOnBgSecondary() throws { + XCTAssertNotEqual(inheritedTheme.colorElevationDragOnBgSecondary, abstractTheme.colorElevationDragOnBgSecondary) + XCTAssertTrue(inheritedTheme.colorElevationDragOnBgSecondary == OtherMockTheme.otherMockThemeMultipleColorTokens) } - func testInheritedThemeCanOverrideSemanticTokenColorElevationDragOnBackgroundEmphasized() throws { - XCTAssertNotEqual(inheritedTheme.colorElevationDragOnBackgroundEmphasized, abstractTheme.colorElevationDragOnBackgroundEmphasized) - XCTAssertTrue(inheritedTheme.colorElevationDragOnBackgroundEmphasized == OtherMockTheme.otherMockThemeMultipleColorTokens) + func testInheritedThemeCanOverrideSemanticTokenColorElevationDragOnBgEmphasized() throws { + XCTAssertNotEqual(inheritedTheme.colorElevationDragOnBgEmphasized, abstractTheme.colorElevationDragOnBgEmphasized) + XCTAssertTrue(inheritedTheme.colorElevationDragOnBgEmphasized == OtherMockTheme.otherMockThemeMultipleColorTokens) } func testInheritedThemeCanOverrideSemanticTokenColorElevationOverlayDefault() throws { @@ -796,14 +795,14 @@ final class TestThemeOverrideOfColorSemanticTokens: XCTestCase { XCTAssertTrue(inheritedTheme.colorElevationOverlayDefault == OtherMockTheme.otherMockThemeMultipleColorTokens) } - func testInheritedThemeCanOverrideSemanticTokenColorElevationOverlayDefaultOnBackgroundSecondary() throws { - XCTAssertNotEqual(inheritedTheme.colorElevationOverlayDefaultOnBackgroundSecondary, abstractTheme.colorElevationOverlayDefaultOnBackgroundSecondary) - XCTAssertTrue(inheritedTheme.colorElevationOverlayDefaultOnBackgroundSecondary == OtherMockTheme.otherMockThemeMultipleColorTokens) + func testInheritedThemeCanOverrideSemanticTokenColorElevationOverlayDefaultOnBgSecondary() throws { + XCTAssertNotEqual(inheritedTheme.colorElevationOverlayDefaultOnBgSecondary, abstractTheme.colorElevationOverlayDefaultOnBgSecondary) + XCTAssertTrue(inheritedTheme.colorElevationOverlayDefaultOnBgSecondary == OtherMockTheme.otherMockThemeMultipleColorTokens) } - func testInheritedThemeCanOverrideSemanticTokenColorElevationOverlayDefaultOnBackgroundEmphasized() throws { - XCTAssertNotEqual(inheritedTheme.colorElevationOverlayDefaultOnBackgroundEmphasized, abstractTheme.colorElevationOverlayDefaultOnBackgroundEmphasized) - XCTAssertTrue(inheritedTheme.colorElevationOverlayDefaultOnBackgroundEmphasized == OtherMockTheme.otherMockThemeMultipleColorTokens) + func testInheritedThemeCanOverrideSemanticTokenColorElevationOverlayDefaultOnBgEmphasized() throws { + XCTAssertNotEqual(inheritedTheme.colorElevationOverlayDefaultOnBgEmphasized, abstractTheme.colorElevationOverlayDefaultOnBgEmphasized) + XCTAssertTrue(inheritedTheme.colorElevationOverlayDefaultOnBgEmphasized == OtherMockTheme.otherMockThemeMultipleColorTokens) } func testInheritedThemeCanOverrideSemanticTokenColorElevationOverlayEmphasized() throws { @@ -811,14 +810,14 @@ final class TestThemeOverrideOfColorSemanticTokens: XCTestCase { XCTAssertTrue(inheritedTheme.colorElevationOverlayEmphasized == OtherMockTheme.otherMockThemeMultipleColorTokens) } - func testInheritedThemeCanOverrideSemanticTokenColorElevationOverlayEmphasizedOnBackgroundSecondary() throws { - XCTAssertNotEqual(inheritedTheme.colorElevationOverlayEmphasizedOnBackgroundSecondary, abstractTheme.colorElevationOverlayEmphasizedOnBackgroundSecondary) - XCTAssertTrue(inheritedTheme.colorElevationOverlayEmphasizedOnBackgroundSecondary == OtherMockTheme.otherMockThemeMultipleColorTokens) + func testInheritedThemeCanOverrideSemanticTokenColorElevationOverlayEmphasizedOnBgSecondary() throws { + XCTAssertNotEqual(inheritedTheme.colorElevationOverlayEmphasizedOnBgSecondary, abstractTheme.colorElevationOverlayEmphasizedOnBgSecondary) + XCTAssertTrue(inheritedTheme.colorElevationOverlayEmphasizedOnBgSecondary == OtherMockTheme.otherMockThemeMultipleColorTokens) } - func testInheritedThemeCanOverrideSemanticTokenColorElevationOverlayEmphasizedOnBackgroundEmphasized() throws { - XCTAssertNotEqual(inheritedTheme.colorElevationOverlayEmphasizedOnBackgroundEmphasized, abstractTheme.colorElevationOverlayEmphasizedOnBackgroundEmphasized) - XCTAssertTrue(inheritedTheme.colorElevationOverlayEmphasizedOnBackgroundEmphasized == OtherMockTheme.otherMockThemeMultipleColorTokens) + func testInheritedThemeCanOverrideSemanticTokenColorElevationOverlayEmphasizedOnBgEmphasized() throws { + XCTAssertNotEqual(inheritedTheme.colorElevationOverlayEmphasizedOnBgEmphasized, abstractTheme.colorElevationOverlayEmphasizedOnBgEmphasized) + XCTAssertTrue(inheritedTheme.colorElevationOverlayEmphasizedOnBgEmphasized == OtherMockTheme.otherMockThemeMultipleColorTokens) } func testInheritedThemeCanOverrideSemanticTokenColorElevationModal() throws { @@ -828,19 +827,9 @@ final class TestThemeOverrideOfColorSemanticTokens: XCTestCase { // MARK: Semantic token - Colors - Decorative - func testInheritedThemeCanOverrideSemanticTokenColorDecorativeBrandPrimary() throws { - XCTAssertNotEqual(inheritedTheme.colorDecorativeBrandPrimary, abstractTheme.colorDecorativeBrandPrimary) - XCTAssertTrue(inheritedTheme.colorDecorativeBrandPrimary == OtherMockTheme.otherMockThemeMultipleColorTokens) - } - - func testInheritedThemeCanOverrideSemanticTokenColorDecorativeBrandPrimaryMuted() throws { - XCTAssertNotEqual(inheritedTheme.colorDecorativeBrandPrimaryMuted, abstractTheme.colorDecorativeBrandPrimaryMuted) - XCTAssertTrue(inheritedTheme.colorDecorativeBrandPrimaryMuted == OtherMockTheme.otherMockThemeMultipleColorTokens) - } - - func testInheritedThemeCanOverrideSemanticTokenColorDecorativeBrandPrimaryEmphasized() throws { - XCTAssertNotEqual(inheritedTheme.colorDecorativeBrandPrimaryEmphasized, abstractTheme.colorDecorativeBrandPrimaryEmphasized) - XCTAssertTrue(inheritedTheme.colorDecorativeBrandPrimaryEmphasized == OtherMockTheme.otherMockThemeMultipleColorTokens) + func testInheritedThemeCanOverrideSemanticTokenColorDecorativePrimary() throws { + XCTAssertNotEqual(inheritedTheme.colorDecorativePrimary, abstractTheme.colorDecorativePrimary) + XCTAssertTrue(inheritedTheme.colorDecorativePrimary == OtherMockTheme.otherMockThemeMultipleColorTokens) } func testInheritedThemeCanOverrideSemanticTokenColorDecorativeSecondary() throws { @@ -848,29 +837,9 @@ final class TestThemeOverrideOfColorSemanticTokens: XCTestCase { XCTAssertTrue(inheritedTheme.colorDecorativeSecondary == OtherMockTheme.otherMockThemeMultipleColorTokens) } - func testInheritedThemeCanOverrideSemanticTokenColorDecorativeSecondaryMuted() throws { - XCTAssertNotEqual(inheritedTheme.colorDecorativeSecondaryMuted, abstractTheme.colorDecorativeSecondaryMuted) - XCTAssertTrue(inheritedTheme.colorDecorativeSecondaryMuted == OtherMockTheme.otherMockThemeMultipleColorTokens) - } - - func testInheritedThemeCanOverrideSemanticTokenColorDecorativeSecondaryEmphasized() throws { - XCTAssertNotEqual(inheritedTheme.colorDecorativeSecondaryEmphasized, abstractTheme.colorDecorativeSecondaryEmphasized) - XCTAssertTrue(inheritedTheme.colorDecorativeSecondaryEmphasized == OtherMockTheme.otherMockThemeMultipleColorTokens) - } - - func testInheritedThemeCanOverrideSemanticTokenColorDecorativeBrandTertiary() throws { - XCTAssertNotEqual(inheritedTheme.colorDecorativeBrandTertiary, abstractTheme.colorDecorativeBrandTertiary) - XCTAssertTrue(inheritedTheme.colorDecorativeBrandTertiary == OtherMockTheme.otherMockThemeMultipleColorTokens) - } - - func testInheritedThemeCanOverrideSemanticTokenColorDecorativeBrandTertiaryMuted() throws { - XCTAssertNotEqual(inheritedTheme.colorDecorativeBrandTertiaryMuted, abstractTheme.colorDecorativeBrandTertiaryMuted) - XCTAssertTrue(inheritedTheme.colorDecorativeBrandTertiaryMuted == OtherMockTheme.otherMockThemeMultipleColorTokens) - } - - func testInheritedThemeCanOverrideSemanticTokenColorDecorativeBrandTertiaryEmphasized() throws { - XCTAssertNotEqual(inheritedTheme.colorDecorativeBrandTertiaryEmphasized, abstractTheme.colorDecorativeBrandTertiaryEmphasized) - XCTAssertTrue(inheritedTheme.colorDecorativeBrandTertiaryEmphasized == OtherMockTheme.otherMockThemeMultipleColorTokens) + func testInheritedThemeCanOverrideSemanticTokenColorDecorativeTertiary() throws { + XCTAssertNotEqual(inheritedTheme.colorDecorativeTertiary, abstractTheme.colorDecorativeTertiary) + XCTAssertTrue(inheritedTheme.colorDecorativeTertiary == OtherMockTheme.otherMockThemeMultipleColorTokens) } func testInheritedThemeCanOverrideSemanticTokenColorDecorativeNeutralMuted() throws { @@ -963,49 +932,49 @@ final class TestThemeOverrideOfColorSemanticTokens: XCTestCase { XCTAssertTrue(inheritedTheme.colorDecorativeAccent5Emphasized == OtherMockTheme.otherMockThemeMultipleColorTokens) } - func testInheritedThemeCanOverrideSemanticTokenColorDecorativeSkintTint100() throws { - XCTAssertNotEqual(inheritedTheme.colorDecorativeSkintTint100, abstractTheme.colorDecorativeSkintTint100) - XCTAssertTrue(inheritedTheme.colorDecorativeSkintTint100 == OtherMockTheme.otherMockThemeMultipleColorTokens) + func testInheritedThemeCanOverrideSemanticTokenColorDecorativeSkinTint100() throws { + XCTAssertNotEqual(inheritedTheme.colorDecorativeSkinTint100, abstractTheme.colorDecorativeSkinTint100) + XCTAssertTrue(inheritedTheme.colorDecorativeSkinTint100 == OtherMockTheme.otherMockThemeMultipleColorTokens) } - func testInheritedThemeCanOverrideSemanticTokenColorDecorativeSkintTint200() throws { - XCTAssertNotEqual(inheritedTheme.colorDecorativeSkintTint200, abstractTheme.colorDecorativeSkintTint200) - XCTAssertTrue(inheritedTheme.colorDecorativeSkintTint200 == OtherMockTheme.otherMockThemeMultipleColorTokens) + func testInheritedThemeCanOverrideSemanticTokenColorDecorativeSkinTint200() throws { + XCTAssertNotEqual(inheritedTheme.colorDecorativeSkinTint200, abstractTheme.colorDecorativeSkinTint200) + XCTAssertTrue(inheritedTheme.colorDecorativeSkinTint200 == OtherMockTheme.otherMockThemeMultipleColorTokens) } - func testInheritedThemeCanOverrideSemanticTokenColorDecorativeSkintTint300() throws { - XCTAssertNotEqual(inheritedTheme.colorDecorativeSkintTint300, abstractTheme.colorDecorativeSkintTint300) - XCTAssertTrue(inheritedTheme.colorDecorativeSkintTint300 == OtherMockTheme.otherMockThemeMultipleColorTokens) + func testInheritedThemeCanOverrideSemanticTokenColorDecorativeSkinTint300() throws { + XCTAssertNotEqual(inheritedTheme.colorDecorativeSkinTint300, abstractTheme.colorDecorativeSkinTint300) + XCTAssertTrue(inheritedTheme.colorDecorativeSkinTint300 == OtherMockTheme.otherMockThemeMultipleColorTokens) } - func testInheritedThemeCanOverrideSemanticTokenColorDecorativeSkintTint400() throws { - XCTAssertNotEqual(inheritedTheme.colorDecorativeSkintTint400, abstractTheme.colorDecorativeSkintTint400) - XCTAssertTrue(inheritedTheme.colorDecorativeSkintTint400 == OtherMockTheme.otherMockThemeMultipleColorTokens) + func testInheritedThemeCanOverrideSemanticTokenColorDecorativeSkinTint400() throws { + XCTAssertNotEqual(inheritedTheme.colorDecorativeSkinTint400, abstractTheme.colorDecorativeSkinTint400) + XCTAssertTrue(inheritedTheme.colorDecorativeSkinTint400 == OtherMockTheme.otherMockThemeMultipleColorTokens) } - func testInheritedThemeCanOverrideSemanticTokenColorDecorativeSkintTint500() throws { - XCTAssertNotEqual(inheritedTheme.colorDecorativeSkintTint500, abstractTheme.colorDecorativeSkintTint500) - XCTAssertTrue(inheritedTheme.colorDecorativeSkintTint500 == OtherMockTheme.otherMockThemeMultipleColorTokens) + func testInheritedThemeCanOverrideSemanticTokenColorDecorativeSkinTint500() throws { + XCTAssertNotEqual(inheritedTheme.colorDecorativeSkinTint500, abstractTheme.colorDecorativeSkinTint500) + XCTAssertTrue(inheritedTheme.colorDecorativeSkinTint500 == OtherMockTheme.otherMockThemeMultipleColorTokens) } - func testInheritedThemeCanOverrideSemanticTokenColorDecorativeSkintTint600() throws { - XCTAssertNotEqual(inheritedTheme.colorDecorativeSkintTint600, abstractTheme.colorDecorativeSkintTint600) - XCTAssertTrue(inheritedTheme.colorDecorativeSkintTint600 == OtherMockTheme.otherMockThemeMultipleColorTokens) + func testInheritedThemeCanOverrideSemanticTokenColorDecorativeSkinTint600() throws { + XCTAssertNotEqual(inheritedTheme.colorDecorativeSkinTint600, abstractTheme.colorDecorativeSkinTint600) + XCTAssertTrue(inheritedTheme.colorDecorativeSkinTint600 == OtherMockTheme.otherMockThemeMultipleColorTokens) } - func testInheritedThemeCanOverrideSemanticTokenColorDecorativeSkintTint700() throws { - XCTAssertNotEqual(inheritedTheme.colorDecorativeSkintTint700, abstractTheme.colorDecorativeSkintTint700) - XCTAssertTrue(inheritedTheme.colorDecorativeSkintTint700 == OtherMockTheme.otherMockThemeMultipleColorTokens) + func testInheritedThemeCanOverrideSemanticTokenColorDecorativeSkinTint700() throws { + XCTAssertNotEqual(inheritedTheme.colorDecorativeSkinTint700, abstractTheme.colorDecorativeSkinTint700) + XCTAssertTrue(inheritedTheme.colorDecorativeSkinTint700 == OtherMockTheme.otherMockThemeMultipleColorTokens) } - func testInheritedThemeCanOverrideSemanticTokenColorDecorativeSkintTint800() throws { - XCTAssertNotEqual(inheritedTheme.colorDecorativeSkintTint800, abstractTheme.colorDecorativeSkintTint800) - XCTAssertTrue(inheritedTheme.colorDecorativeSkintTint800 == OtherMockTheme.otherMockThemeMultipleColorTokens) + func testInheritedThemeCanOverrideSemanticTokenColorDecorativeSkinTint800() throws { + XCTAssertNotEqual(inheritedTheme.colorDecorativeSkinTint800, abstractTheme.colorDecorativeSkinTint800) + XCTAssertTrue(inheritedTheme.colorDecorativeSkinTint800 == OtherMockTheme.otherMockThemeMultipleColorTokens) } - func testInheritedThemeCanOverrideSemanticTokenColorDecorativeSkintTint900() throws { - XCTAssertNotEqual(inheritedTheme.colorDecorativeSkintTint900, abstractTheme.colorDecorativeSkintTint900) - XCTAssertTrue(inheritedTheme.colorDecorativeSkintTint900 == OtherMockTheme.otherMockThemeMultipleColorTokens) + func testInheritedThemeCanOverrideSemanticTokenColorDecorativeSkinTint900() throws { + XCTAssertNotEqual(inheritedTheme.colorDecorativeSkinTint900, abstractTheme.colorDecorativeSkinTint900) + XCTAssertTrue(inheritedTheme.colorDecorativeSkinTint900 == OtherMockTheme.otherMockThemeMultipleColorTokens) } // MARK: Semantic token - Colors - Chart @@ -1307,6 +1276,5 @@ final class TestThemeOverrideOfColorSemanticTokens: XCTestCase { } // swiftlint:enable type_body_length -// swiftlint:enable line_length // swiftlint:enable implicitly_unwrapped_optional // swiftlint:enable required_deinit diff --git a/OUDS/Core/OUDS/Tests/OUDSTheme/TestThemeOverrideOfCompositeElevationSemanticTokens.swift b/OUDS/Core/OUDS/Tests/OUDSTheme/TestThemeOverrideOfCompositeElevationSemanticTokens.swift new file mode 100644 index 000000000..0e0394499 --- /dev/null +++ b/OUDS/Core/OUDS/Tests/OUDSTheme/TestThemeOverrideOfCompositeElevationSemanticTokens.swift @@ -0,0 +1,78 @@ +// +// 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 required_deinit +// swiftlint:disable implicitly_unwrapped_optional +// 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 _composite elevation semantic tokens_. +/// These semantic tokens should be overriden by subclass like the `OrangeTheme` default theme. +/// **These tests checks if any _composite elevation semantic tokens_ can be surcharged by a child theme** +final class TestThemeOverrideOfElevationCompositeSemanticTokens: XCTestCase { + + private var abstractTheme: OUDSTheme! + private var inheritedTheme: OUDSTheme! + + override func setUp() async throws { + abstractTheme = OUDSTheme() + inheritedTheme = MockTheme() + } + + func testInheritedThemeCanOverrideSemanticTokenElevationCompositeNone() throws { + XCTAssertNotEqual(inheritedTheme.elevationNone, abstractTheme.elevationNone) + XCTAssertTrue(inheritedTheme.elevationNone == MockTheme.mockThemeElevationCompositeSemanticToken) + } + + func testInheritedThemeCanOverrideSemanticTokenElevationCompositeRaised() throws { + XCTAssertNotEqual(inheritedTheme.elevationRaised, abstractTheme.elevationRaised) + XCTAssertTrue(inheritedTheme.elevationRaised == MockTheme.mockThemeElevationCompositeSemanticToken) + } + + func testInheritedThemeCanOverrideSemanticTokenElevationCompositeDrag() throws { + XCTAssertNotEqual(inheritedTheme.elevationDrag, abstractTheme.elevationDrag) + XCTAssertTrue(inheritedTheme.elevationDrag == MockTheme.mockThemeElevationCompositeSemanticToken) + } + + func testInheritedThemeCanOverrideSemanticTokenElevationCompositeOverlayDefault() throws { + XCTAssertNotEqual(inheritedTheme.elevationOverlayDefault, abstractTheme.elevationOverlayDefault) + XCTAssertTrue(inheritedTheme.elevationOverlayDefault == MockTheme.mockThemeElevationCompositeSemanticToken) + } + + func testInheritedThemeCanOverrideSemanticTokenElevationCompositeOverlayEmphasized() throws { + XCTAssertNotEqual(inheritedTheme.elevationOverlayEmphasized, abstractTheme.elevationOverlayEmphasized) + XCTAssertTrue(inheritedTheme.elevationOverlayEmphasized == MockTheme.mockThemeElevationCompositeSemanticToken) + } + + func testInheritedThemeCanOverrideSemanticTokenElevationCompositeStickyDefault() throws { + XCTAssertNotEqual(inheritedTheme.elevationStickyDefault, abstractTheme.elevationStickyDefault) + XCTAssertTrue(inheritedTheme.elevationStickyDefault == MockTheme.mockThemeElevationCompositeSemanticToken) + } + + func testInheritedThemeCanOverrideSemanticTokenElevationCompositeStickyEmphasized() throws { + XCTAssertNotEqual(inheritedTheme.elevationStickyEmphasized, abstractTheme.elevationStickyEmphasized) + XCTAssertTrue(inheritedTheme.elevationStickyEmphasized == MockTheme.mockThemeElevationCompositeSemanticToken) + } + + func testInheritedThemeCanOverrideSemanticTokenElevationCompositeStickyNavigationScrolled() throws { + XCTAssertNotEqual(inheritedTheme.elevationStickyNavigationScrolled, abstractTheme.elevationStickyNavigationScrolled) + XCTAssertTrue(inheritedTheme.elevationStickyNavigationScrolled == MockTheme.mockThemeElevationCompositeSemanticToken) + } +} + +// swiftlint:enable required_deinit +// swiftlint:enable implicitly_unwrapped_optional +// swiftlint:enable type_name diff --git a/OUDS/Core/OUDS/Tests/OUDSTheme/TestThemeOverrideOfElevationSemanticTokens.swift b/OUDS/Core/OUDS/Tests/OUDSTheme/TestThemeOverrideOfElevationSemanticTokens.swift index f14a67b4c..5a2c26496 100644 --- a/OUDS/Core/OUDS/Tests/OUDSTheme/TestThemeOverrideOfElevationSemanticTokens.swift +++ b/OUDS/Core/OUDS/Tests/OUDSTheme/TestThemeOverrideOfElevationSemanticTokens.swift @@ -74,11 +74,6 @@ final class TestThemeOverrideOfElevationSemanticTokens: XCTestCase { XCTAssertTrue(inheritedTheme.elevationXStickyNavigationScrolled == MockTheme.mockThemeElevationXRawToken) } - func testInheritedThemeCanOverrideSemanticTokenElevationXFocus() throws { - XCTAssertNotEqual(inheritedTheme.elevationXFocus, abstractTheme.elevationXFocus) - XCTAssertTrue(inheritedTheme.elevationXFocus == MockTheme.mockThemeElevationXRawToken) - } - // MARK: - Semantic token - Elevation - Y func testInheritedThemeCanOverrideSemanticTokenElevationYNone() throws { @@ -121,11 +116,6 @@ final class TestThemeOverrideOfElevationSemanticTokens: XCTestCase { XCTAssertTrue(inheritedTheme.elevationYStickyNavigationScrolled == MockTheme.mockThemeElevationYRawToken) } - func testInheritedThemeCanOverrideSemanticTokenElevationYFocus() throws { - XCTAssertNotEqual(inheritedTheme.elevationYFocus, abstractTheme.elevationYFocus) - XCTAssertTrue(inheritedTheme.elevationYFocus == MockTheme.mockThemeElevationYRawToken) - } - // MARK: - Semantic token - Elevation - Blur func testInheritedThemeCanOverrideSemanticTokenElevationBlurNone() throws { @@ -168,11 +158,6 @@ final class TestThemeOverrideOfElevationSemanticTokens: XCTestCase { XCTAssertTrue(inheritedTheme.elevationBlurStickyNavigationScrolled == MockTheme.mockThemeElevationBlurRawToken) } - func testInheritedThemeCanOverrideSemanticTokenElevationBlurFocus() throws { - XCTAssertNotEqual(inheritedTheme.elevationBlurFocus, abstractTheme.elevationBlurFocus) - XCTAssertTrue(inheritedTheme.elevationBlurFocus == MockTheme.mockThemeElevationBlurRawToken) - } - // MARK: - Semantic token - Elevation - Color - None func testInheritedThemeCanOverrideSemanticTokenElevationColorNone() throws { @@ -215,11 +200,6 @@ final class TestThemeOverrideOfElevationSemanticTokens: XCTestCase { XCTAssertTrue(inheritedTheme.elevationColorStickyNavigationScrolled == MockTheme.mockThemeElevationMultipleColorSemanticToken) } - func testInheritedThemeCanOverrideSemanticTokenElevationColorFocus() throws { - XCTAssertNotEqual(inheritedTheme.elevationColorFocus, abstractTheme.elevationColorFocus) - XCTAssertTrue(inheritedTheme.elevationColorFocus == MockTheme.mockThemeElevationMultipleColorSemanticToken) - } - func testInheritedThemeCanOverrideSemanticTokenElevationCompositeRaised() throws { XCTAssertNotEqual(inheritedTheme.elevationRaised, abstractTheme.elevationRaised) XCTAssertTrue(inheritedTheme.elevationRaised == MockTheme.mockThemeElevationCompositeSemanticToken) @@ -254,11 +234,6 @@ final class TestThemeOverrideOfElevationSemanticTokens: XCTestCase { XCTAssertNotEqual(inheritedTheme.elevationStickyNavigationScrolled, abstractTheme.elevationStickyNavigationScrolled) XCTAssertTrue(inheritedTheme.elevationStickyNavigationScrolled == MockTheme.mockThemeElevationCompositeSemanticToken) } - - func testInheritedThemeCanOverrideSemanticTokenElevationCompositeFocus() throws { - XCTAssertNotEqual(inheritedTheme.elevationFocus, abstractTheme.elevationFocus) - XCTAssertTrue(inheritedTheme.elevationFocus == MockTheme.mockThemeElevationCompositeSemanticToken) - } } // swiftlint:enable required_deinit diff --git a/OUDS/Core/OUDS/Tests/OUDSTheme/TestThemeOverrideOfSizingSemanticTokens.swift b/OUDS/Core/OUDS/Tests/OUDSTheme/TestThemeOverrideOfSizeSemanticTokens.swift similarity index 99% rename from OUDS/Core/OUDS/Tests/OUDSTheme/TestThemeOverrideOfSizingSemanticTokens.swift rename to OUDS/Core/OUDS/Tests/OUDSTheme/TestThemeOverrideOfSizeSemanticTokens.swift index ee34352ab..c4098b05d 100644 --- a/OUDS/Core/OUDS/Tests/OUDSTheme/TestThemeOverrideOfSizingSemanticTokens.swift +++ b/OUDS/Core/OUDS/Tests/OUDSTheme/TestThemeOverrideOfSizeSemanticTokens.swift @@ -21,7 +21,7 @@ import XCTest /// In fact the `OUDSTheme` object is a class, which can be seen as an _asbtract class_, exposing through its extensions and protocols _sizing semantic tokens_. /// These semantic tokens should be overriden by subclass like the `OrangeTheme` default theme. /// **These tests checks if any _sizing semantic tokens_ can be surcharged by a child theme** -final class TestThemeOverrideOfSizingSemanticTokens: XCTestCase { +final class TestThemeOverrideOfSizeSemanticTokens: XCTestCase { private var abstractTheme: OUDSTheme! private var inheritedTheme: OUDSTheme! diff --git a/OUDS/Core/OUDS/Tests/OUDSTheme/TestThemeOverrideOfSpacingSemanticTokens.swift b/OUDS/Core/OUDS/Tests/OUDSTheme/TestThemeOverrideOfSpaceSemanticTokens.swift similarity index 99% rename from OUDS/Core/OUDS/Tests/OUDSTheme/TestThemeOverrideOfSpacingSemanticTokens.swift rename to OUDS/Core/OUDS/Tests/OUDSTheme/TestThemeOverrideOfSpaceSemanticTokens.swift index 6e5f4b564..6f344b4f8 100644 --- a/OUDS/Core/OUDS/Tests/OUDSTheme/TestThemeOverrideOfSpacingSemanticTokens.swift +++ b/OUDS/Core/OUDS/Tests/OUDSTheme/TestThemeOverrideOfSpaceSemanticTokens.swift @@ -23,7 +23,7 @@ import XCTest /// In factn the `OUDSTheme` object is a class, which can be seens as an _asbtract class_, exposing through its extensions and protocols _spacing semantic tokens_. /// These semantic tokens should be overriden by subclass like the `OrangeTheme` default theme. /// **These tests checks if any _spacing semantic tokens_ can be surcharged by a child theme** -final class TestThemeOverrideOfSpacingSemanticTokens: XCTestCase { +final class TestThemeOverrideOfSpaceSemanticTokens: XCTestCase { private var abstractTheme: OUDSTheme! private var inheritedTheme: OUDSTheme! diff --git a/OUDS/Core/OUDS/Tests/OUDSTheme/TestThemeOverrideOfTypographyCompositeSemanticTokens.swift b/OUDS/Core/OUDS/Tests/OUDSTheme/TestThemeOverrideOfTypographyCompositeSemanticTokens.swift new file mode 100644 index 000000000..21827b7e8 --- /dev/null +++ b/OUDS/Core/OUDS/Tests/OUDSTheme/TestThemeOverrideOfTypographyCompositeSemanticTokens.swift @@ -0,0 +1,163 @@ +// +// 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 required_deinit +// swiftlint:disable implicitly_unwrapped_optional +// 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 _typography semantic tokens_. +/// These semantic tokens should be overriden by subclass like the `OrangeTheme` default theme. +/// **These tests checks if any _typography semantic tokens_ can be surcharged by a child theme** +final class TestThemeOverrideOfTypographyCompositeSemanticTokens: XCTestCase { + + private var abstractTheme: OUDSTheme! + private var inheritedTheme: OUDSTheme! + + override func setUp() async throws { + abstractTheme = OUDSTheme() + inheritedTheme = MockTheme() + } + + // MARK: - Semantic tokens - Typography - Composites - Display + + func testInheritedThemeCanOverrideSemanticTokenTypeDisplayLarge() throws { + XCTAssertNotEqual(inheritedTheme.typeDisplayLarge, abstractTheme.typeDisplayLarge) + XCTAssertTrue(inheritedTheme.typeDisplayLarge == MockTheme.mockThemeMultipleTypographyTokens) + } + + func testInheritedThemeCanOverrideSemanticTokenTypeDisplayMedium() throws { + XCTAssertNotEqual(inheritedTheme.typeDisplayMedium, abstractTheme.typeDisplayMedium) + XCTAssertTrue(inheritedTheme.typeDisplayMedium == MockTheme.mockThemeMultipleTypographyTokens) + } + + func testInheritedThemeCanOverrideSemanticTokenTypeDisplaySmal() throws { + XCTAssertNotEqual(inheritedTheme.typeDisplaySmall, abstractTheme.typeDisplaySmall) + XCTAssertTrue(inheritedTheme.typeDisplaySmall == MockTheme.mockThemeMultipleTypographyTokens) + } + + // MARK: - Semantic tokens - Typography - Composites - Heading + + func testInheritedThemeCanOverrideSemanticTokenTypeHeadingXLarge() throws { + XCTAssertNotEqual(inheritedTheme.typeHeadingXLarge, abstractTheme.typeHeadingXLarge) + XCTAssertTrue(inheritedTheme.typeHeadingXLarge == MockTheme.mockThemeMultipleTypographyTokens) + } + + func testInheritedThemeCanOverrideSemanticTokenTypeHeadingLarge() throws { + XCTAssertNotEqual(inheritedTheme.typeHeadingLarge, abstractTheme.typeHeadingLarge) + XCTAssertTrue(inheritedTheme.typeHeadingLarge == MockTheme.mockThemeMultipleTypographyTokens) + } + + func testInheritedThemeCanOverrideSemanticTokenTypeHeadingMedium() throws { + XCTAssertNotEqual(inheritedTheme.typeHeadingMedium, abstractTheme.typeHeadingMedium) + XCTAssertTrue(inheritedTheme.typeHeadingMedium == MockTheme.mockThemeMultipleTypographyTokens) + } + + func testInheritedThemeCanOverrideSemanticTokenTypeHeadingSmall() throws { + XCTAssertNotEqual(inheritedTheme.typeHeadingSmall, abstractTheme.typeHeadingSmall) + XCTAssertTrue(inheritedTheme.typeHeadingSmall == MockTheme.mockThemeMultipleTypographyTokens) + } + + // MARK: - Semantic tokens - Typography - Composites - Body + + func testInheritedThemeCanOverrideSemanticTokenTypeDefaultLarge() throws { + XCTAssertNotEqual(inheritedTheme.typeBodyDefaultLarge, abstractTheme.typeBodyDefaultLarge) + XCTAssertTrue(inheritedTheme.typeBodyDefaultLarge == MockTheme.mockThemeMultipleTypographyTokens) + } + + func testInheritedThemeCanOverrideSemanticTokenTypeDefaultMedium() throws { + XCTAssertNotEqual(inheritedTheme.typeBodyDefaultMedium, abstractTheme.typeBodyDefaultMedium) + XCTAssertTrue(inheritedTheme.typeBodyDefaultMedium == MockTheme.mockThemeMultipleTypographyTokens) + } + + func testInheritedThemeCanOverrideSemanticTokenTypeDefaultSmall() throws { + XCTAssertNotEqual(inheritedTheme.typeBodyDefaultSmall, abstractTheme.typeBodyDefaultSmall) + XCTAssertTrue(inheritedTheme.typeBodyDefaultSmall == MockTheme.mockThemeMultipleTypographyTokens) + } + + func testInheritedThemeCanOverrideSemanticTokenTypeStrongLarge() throws { + XCTAssertNotEqual(inheritedTheme.typeBodyStrongLarge, abstractTheme.typeBodyStrongLarge) + XCTAssertTrue(inheritedTheme.typeBodyStrongLarge == MockTheme.mockThemeMultipleTypographyTokens) + } + + func testInheritedThemeCanOverrideSemanticTokenTypeStrongMedium() throws { + XCTAssertNotEqual(inheritedTheme.typeBodyStrongMedium, abstractTheme.typeBodyStrongMedium) + XCTAssertTrue(inheritedTheme.typeBodyStrongMedium == MockTheme.mockThemeMultipleTypographyTokens) + } + + func testInheritedThemeCanOverrideSemanticTokenTypeStrongSmall() throws { + XCTAssertNotEqual(inheritedTheme.typeBodyStrongSmall, abstractTheme.typeBodyStrongSmall) + XCTAssertTrue(inheritedTheme.typeBodyStrongSmall == MockTheme.mockThemeMultipleTypographyTokens) + } + + // MARK: - Semantic tokens - Typography - Composites - Label + + func testInheritedThemeCanOverrideSemanticTokenTypeLabelDefaultXLarge() throws { + XCTAssertNotEqual(inheritedTheme.typeLabelDefaultXLarge, abstractTheme.typeLabelDefaultXLarge) + XCTAssertTrue(inheritedTheme.typeLabelDefaultXLarge == MockTheme.mockThemeMultipleTypographyTokens) + } + + func testInheritedThemeCanOverrideSemanticTokenTypeLabelDefaultLarge() throws { + XCTAssertNotEqual(inheritedTheme.typeLabelDefaultLarge, abstractTheme.typeLabelDefaultLarge) + XCTAssertTrue(inheritedTheme.typeLabelDefaultLarge == MockTheme.mockThemeMultipleTypographyTokens) + } + + func testInheritedThemeCanOverrideSemanticTokenTypeLabelDefaultMedium() throws { + XCTAssertNotEqual(inheritedTheme.typeLabelDefaultMedium, abstractTheme.typeLabelDefaultMedium) + XCTAssertTrue(inheritedTheme.typeLabelDefaultMedium == MockTheme.mockThemeMultipleTypographyTokens) + } + + func testInheritedThemeCanOverrideSemanticTokenTypeLabelDefaultSmall() throws { + XCTAssertNotEqual(inheritedTheme.typeLabelDefaultSmall, abstractTheme.typeLabelDefaultSmall) + XCTAssertTrue(inheritedTheme.typeLabelDefaultSmall == MockTheme.mockThemeMultipleTypographyTokens) + } + + func testInheritedThemeCanOverrideSemanticTokenTypeLabelStrongXLarge() throws { + XCTAssertNotEqual(inheritedTheme.typeLabelStrongXLarge, abstractTheme.typeLabelStrongXLarge) + XCTAssertTrue(inheritedTheme.typeLabelStrongXLarge == MockTheme.mockThemeMultipleTypographyTokens) + } + + func testInheritedThemeCanOverrideSemanticTokenTypeLabelStrongLarge() throws { + XCTAssertNotEqual(inheritedTheme.typeLabelStrongLarge, abstractTheme.typeLabelStrongLarge) + XCTAssertTrue(inheritedTheme.typeLabelStrongLarge == MockTheme.mockThemeMultipleTypographyTokens) + } + + func testInheritedThemeCanOverrideSemanticTokenTypeLabelStrongMedium() throws { + XCTAssertNotEqual(inheritedTheme.typeLabelStrongMedium, abstractTheme.typeLabelStrongMedium) + XCTAssertTrue(inheritedTheme.typeLabelStrongMedium == MockTheme.mockThemeMultipleTypographyTokens) + } + + func testInheritedThemeCanOverrideSemanticTokenTypeLabelStrongSmall() throws { + XCTAssertNotEqual(inheritedTheme.typeLabelStrongSmall, abstractTheme.typeLabelStrongSmall) + XCTAssertTrue(inheritedTheme.typeLabelStrongSmall == MockTheme.mockThemeMultipleTypographyTokens) + } + + // MARK: - Semantic tokens - Typography - Composites - Code + + func testInheritedThemeCanOverrideSemanticTokenTypeCodeMedium() throws { + XCTAssertNotEqual(inheritedTheme.typeCodeMedium, abstractTheme.typeCodeMedium) + XCTAssertTrue(inheritedTheme.typeCodeMedium == MockTheme.mockThemeMultipleTypographyTokens) + } + + func testInheritedThemeCanOverrideSemanticTokenTypeCodeSmall() throws { + XCTAssertNotEqual(inheritedTheme.typeCodeSmall, abstractTheme.typeCodeSmall) + XCTAssertTrue(inheritedTheme.typeCodeSmall == MockTheme.mockThemeMultipleTypographyTokens) + } +} + +// swiftlint:enable required_deinit +// swiftlint:enable implicitly_unwrapped_optional +// swiftlint:enable type_name diff --git a/OUDS/Core/OUDS/Tests/OUDSTheme/TestThemeOverrideOfTypographySemanticTokens.swift b/OUDS/Core/OUDS/Tests/OUDSTheme/TestThemeOverrideOfTypographySemanticTokens.swift index 3f4f445d1..e82fe0b32 100644 --- a/OUDS/Core/OUDS/Tests/OUDSTheme/TestThemeOverrideOfTypographySemanticTokens.swift +++ b/OUDS/Core/OUDS/Tests/OUDSTheme/TestThemeOverrideOfTypographySemanticTokens.swift @@ -67,6 +67,21 @@ final class TestThemeOverrideOfTypographySemanticTokens: XCTestCase { // MARK: - Semantic token - Typography - Font - Weight + func testInheritedThemeCanOverrideSemanticTokenFontWeightDefault() throws { + XCTAssertNotEqual(inheritedTheme.fontWeightDefault, abstractTheme.fontWeightDefault) + XCTAssertTrue(inheritedTheme.fontWeightDefault == MockTheme.mockThemeTypographyFontWeightRawToken) + } + + func testInheritedThemeCanOverrideSemanticTokenFontWeightCode() throws { + XCTAssertNotEqual(inheritedTheme.fontWeightCode, abstractTheme.fontWeightCode) + XCTAssertTrue(inheritedTheme.fontWeightCode == MockTheme.mockThemeTypographyFontWeightRawToken) + } + + func testInheritedThemeCanOverrideSemanticTokenFontWeightStrong() throws { + XCTAssertNotEqual(inheritedTheme.fontWeightStrong, abstractTheme.fontWeightStrong) + XCTAssertTrue(inheritedTheme.fontWeightStrong == MockTheme.mockThemeTypographyFontWeightRawToken) + } + func testInheritedThemeCanOverrideSemanticTokenFontWeightDisplay() throws { XCTAssertNotEqual(inheritedTheme.fontWeightDisplay, abstractTheme.fontWeightDisplay) XCTAssertTrue(inheritedTheme.fontWeightDisplay == MockTheme.mockThemeTypographyFontWeightRawToken) @@ -97,11 +112,6 @@ final class TestThemeOverrideOfTypographySemanticTokens: XCTestCase { XCTAssertTrue(inheritedTheme.fontWeightLabelStrong == MockTheme.mockThemeTypographyFontWeightRawToken) } - func testInheritedThemeCanOverrideSemanticTokenFontWeightCode() throws { - XCTAssertNotEqual(inheritedTheme.fontWeightCode, abstractTheme.fontWeightCode) - XCTAssertTrue(inheritedTheme.fontWeightCode == MockTheme.mockThemeTypographyFontWeightRawToken) - } - // MARK: - Semantic token - Typography - Font - Size func testInheritedThemeCanOverrideSemanticTokenFontSizeDisplayLarge() throws { @@ -349,131 +359,6 @@ final class TestThemeOverrideOfTypographySemanticTokens: XCTestCase { XCTAssertNotEqual(inheritedTheme.fontLineHeightCodeSmall, abstractTheme.fontLineHeightCodeSmall) XCTAssertTrue(inheritedTheme.fontLineHeightCodeSmall == MockTheme.mockThemeMultipleTypographyLineHeightTokens) } - - // MARK: - Semantic tokens - Typography - Composites - Display - - func testInheritedThemeCanOverrideSemanticTokenTypeDisplayLarge() throws { - XCTAssertNotEqual(inheritedTheme.typeDisplayLarge, abstractTheme.typeDisplayLarge) - XCTAssertTrue(inheritedTheme.typeDisplayLarge == MockTheme.mockThemeMultipleTypographyTokens) - } - - func testInheritedThemeCanOverrideSemanticTokenTypeDisplayMedium() throws { - XCTAssertNotEqual(inheritedTheme.typeDisplayMedium, abstractTheme.typeDisplayMedium) - XCTAssertTrue(inheritedTheme.typeDisplayMedium == MockTheme.mockThemeMultipleTypographyTokens) - } - - func testInheritedThemeCanOverrideSemanticTokenTypeDisplaySmal() throws { - XCTAssertNotEqual(inheritedTheme.typeDisplaySmall, abstractTheme.typeDisplaySmall) - XCTAssertTrue(inheritedTheme.typeDisplaySmall == MockTheme.mockThemeMultipleTypographyTokens) - } - - // MARK: - Semantic tokens - Typography - Composites - Heading - - func testInheritedThemeCanOverrideSemanticTokenTypeHeadingXLarge() throws { - XCTAssertNotEqual(inheritedTheme.typeHeadingXLarge, abstractTheme.typeHeadingXLarge) - XCTAssertTrue(inheritedTheme.typeHeadingXLarge == MockTheme.mockThemeMultipleTypographyTokens) - } - - func testInheritedThemeCanOverrideSemanticTokenTypeHeadingLarge() throws { - XCTAssertNotEqual(inheritedTheme.typeHeadingLarge, abstractTheme.typeHeadingLarge) - XCTAssertTrue(inheritedTheme.typeHeadingLarge == MockTheme.mockThemeMultipleTypographyTokens) - } - - func testInheritedThemeCanOverrideSemanticTokenTypeHeadingMedium() throws { - XCTAssertNotEqual(inheritedTheme.typeHeadingMedium, abstractTheme.typeHeadingMedium) - XCTAssertTrue(inheritedTheme.typeHeadingMedium == MockTheme.mockThemeMultipleTypographyTokens) - } - - func testInheritedThemeCanOverrideSemanticTokenTypeHeadingSmall() throws { - XCTAssertNotEqual(inheritedTheme.typeHeadingSmall, abstractTheme.typeHeadingSmall) - XCTAssertTrue(inheritedTheme.typeHeadingSmall == MockTheme.mockThemeMultipleTypographyTokens) - } - - // MARK: - Semantic tokens - Typography - Composites - Body - - func testInheritedThemeCanOverrideSemanticTokenTypeDefaultLarge() throws { - XCTAssertNotEqual(inheritedTheme.typeBodyDefaultLarge, abstractTheme.typeBodyDefaultLarge) - XCTAssertTrue(inheritedTheme.typeBodyDefaultLarge == MockTheme.mockThemeMultipleTypographyTokens) - } - - func testInheritedThemeCanOverrideSemanticTokenTypeDefaultMedium() throws { - XCTAssertNotEqual(inheritedTheme.typeBodyDefaultMedium, abstractTheme.typeBodyDefaultMedium) - XCTAssertTrue(inheritedTheme.typeBodyDefaultMedium == MockTheme.mockThemeMultipleTypographyTokens) - } - - func testInheritedThemeCanOverrideSemanticTokenTypeDefaultSmall() throws { - XCTAssertNotEqual(inheritedTheme.typeBodyDefaultSmall, abstractTheme.typeBodyDefaultSmall) - XCTAssertTrue(inheritedTheme.typeBodyDefaultSmall == MockTheme.mockThemeMultipleTypographyTokens) - } - - func testInheritedThemeCanOverrideSemanticTokenTypeStrongLarge() throws { - XCTAssertNotEqual(inheritedTheme.typeBodyStrongLarge, abstractTheme.typeBodyStrongLarge) - XCTAssertTrue(inheritedTheme.typeBodyStrongLarge == MockTheme.mockThemeMultipleTypographyTokens) - } - - func testInheritedThemeCanOverrideSemanticTokenTypeStrongMedium() throws { - XCTAssertNotEqual(inheritedTheme.typeBodyStrongMedium, abstractTheme.typeBodyStrongMedium) - XCTAssertTrue(inheritedTheme.typeBodyStrongMedium == MockTheme.mockThemeMultipleTypographyTokens) - } - - func testInheritedThemeCanOverrideSemanticTokenTypeStrongSmall() throws { - XCTAssertNotEqual(inheritedTheme.typeBodyStrongSmall, abstractTheme.typeBodyStrongSmall) - XCTAssertTrue(inheritedTheme.typeBodyStrongSmall == MockTheme.mockThemeMultipleTypographyTokens) - } - - // MARK: - Semantic tokens - Typography - Composites - Label - - func testInheritedThemeCanOverrideSemanticTokenTypeLabelDefaultXLarge() throws { - XCTAssertNotEqual(inheritedTheme.typeLabelDefaultXLarge, abstractTheme.typeLabelDefaultXLarge) - XCTAssertTrue(inheritedTheme.typeLabelDefaultXLarge == MockTheme.mockThemeMultipleTypographyTokens) - } - - func testInheritedThemeCanOverrideSemanticTokenTypeLabelDefaultLarge() throws { - XCTAssertNotEqual(inheritedTheme.typeLabelDefaultLarge, abstractTheme.typeLabelDefaultLarge) - XCTAssertTrue(inheritedTheme.typeLabelDefaultLarge == MockTheme.mockThemeMultipleTypographyTokens) - } - - func testInheritedThemeCanOverrideSemanticTokenTypeLabelDefaultMedium() throws { - XCTAssertNotEqual(inheritedTheme.typeLabelDefaultMedium, abstractTheme.typeLabelDefaultMedium) - XCTAssertTrue(inheritedTheme.typeLabelDefaultMedium == MockTheme.mockThemeMultipleTypographyTokens) - } - - func testInheritedThemeCanOverrideSemanticTokenTypeLabelDefaultSmall() throws { - XCTAssertNotEqual(inheritedTheme.typeLabelDefaultSmall, abstractTheme.typeLabelDefaultSmall) - XCTAssertTrue(inheritedTheme.typeLabelDefaultSmall == MockTheme.mockThemeMultipleTypographyTokens) - } - - func testInheritedThemeCanOverrideSemanticTokenTypeLabelStrongXLarge() throws { - XCTAssertNotEqual(inheritedTheme.typeLabelStrongXLarge, abstractTheme.typeLabelStrongXLarge) - XCTAssertTrue(inheritedTheme.typeLabelStrongXLarge == MockTheme.mockThemeMultipleTypographyTokens) - } - - func testInheritedThemeCanOverrideSemanticTokenTypeLabelStrongLarge() throws { - XCTAssertNotEqual(inheritedTheme.typeLabelStrongLarge, abstractTheme.typeLabelStrongLarge) - XCTAssertTrue(inheritedTheme.typeLabelStrongLarge == MockTheme.mockThemeMultipleTypographyTokens) - } - - func testInheritedThemeCanOverrideSemanticTokenTypeLabelStrongMedium() throws { - XCTAssertNotEqual(inheritedTheme.typeLabelStrongMedium, abstractTheme.typeLabelStrongMedium) - XCTAssertTrue(inheritedTheme.typeLabelStrongMedium == MockTheme.mockThemeMultipleTypographyTokens) - } - - func testInheritedThemeCanOverrideSemanticTokenTypeLabelStrongSmall() throws { - XCTAssertNotEqual(inheritedTheme.typeLabelStrongSmall, abstractTheme.typeLabelStrongSmall) - XCTAssertTrue(inheritedTheme.typeLabelStrongSmall == MockTheme.mockThemeMultipleTypographyTokens) - } - - // MARK: - Semantic tokens - Typography - Composites - Code - - func testInheritedThemeCanOverrideSemanticTokenTypeCodeMedium() throws { - XCTAssertNotEqual(inheritedTheme.typeCodeMedium, abstractTheme.typeCodeMedium) - XCTAssertTrue(inheritedTheme.typeCodeMedium == MockTheme.mockThemeMultipleTypographyTokens) - } - - func testInheritedThemeCanOverrideSemanticTokenTypeCodeSmall() throws { - XCTAssertNotEqual(inheritedTheme.typeCodeSmall, abstractTheme.typeCodeSmall) - XCTAssertTrue(inheritedTheme.typeCodeSmall == MockTheme.mockThemeMultipleTypographyTokens) - } } // swiftlint:enable required_deinit diff --git a/OUDS/Core/Themes/Inverse/Sources/InverseTheme+ColorSemanticTokens.swift b/OUDS/Core/Themes/Inverse/Sources/InverseTheme+ColorSemanticTokens.swift index 71646c6fb..3b45e3345 100644 --- a/OUDS/Core/Themes/Inverse/Sources/InverseTheme+ColorSemanticTokens.swift +++ b/OUDS/Core/Themes/Inverse/Sources/InverseTheme+ColorSemanticTokens.swift @@ -29,67 +29,67 @@ extension InverseTheme { // MARK: Semantic token - Colors - Background - override public var colorBackgroundPrimary: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalDarkGray880) } + override public var colorBgPrimary: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalDarkGray880) } - override public var colorBackgroundSecondary: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalDarkGray720) } + override public var colorBgSecondary: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalDarkGray720) } - override public var colorBackgroundTertiary: ColorSemanticToken { MultipleColorTokens(OrangeBrandColorRawTokens.colorWarmGray900) } + override public var colorBgTertiary: ColorSemanticToken { MultipleColorTokens(OrangeBrandColorRawTokens.colorWarmGray900) } - override public var colorBackgroundEmphasized: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalWhite) } + override public var colorBgEmphasized: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalWhite) } - override public var colorBackgroundBrandPrimary: ColorSemanticToken { MultipleColorTokens(OrangeBrandColorRawTokens.colorOrange500) } + override public var colorBgBrandPrimary: ColorSemanticToken { MultipleColorTokens(OrangeBrandColorRawTokens.colorOrange500) } - override public var colorBackgroundBrandSecondary: ColorSemanticToken { fatalError("🤖 No value defined for colorBackgroundBrandSecondary!") } + override public var colorBgBrandSecondary: ColorSemanticToken { fatalError("🤖 No value defined for colorBgBrandSecondary!") } - override public var colorBackgroundBrandTertiary: ColorSemanticToken { fatalError("🤖 No value defined for colorBackgroundBrandTertiary!") } + override public var colorBgBrandTertiary: ColorSemanticToken { fatalError("🤖 No value defined for colorBgBrandTertiary!") } - override public var colorBackgroundStatusNeutral: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalDarkGray720) } + override public var colorBgStatusNeutral: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalDarkGray720) } - override public var colorBackgroundStatusNeutralOnBackgroundEmphasized: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalLightGray80) } + override public var colorBgStatusNeutralOnBgEmphasized: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalLightGray80) } - override public var colorBackgroundStatusPositiveMuted: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalMalachite100) } + override public var colorBgStatusPositiveMuted: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalMalachite100) } - override public var colorBackgroundStatusPositiveMutedOnBackgroundEmphasized: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalMalachite100) } + override public var colorBgStatusPositiveMutedOnBgEmphasized: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalMalachite100) } - override public var colorBackgroundStatusPositiveEmphasized: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalMalachite500) } + override public var colorBgStatusPositiveEmphasized: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalMalachite500) } - override public var colorBackgroundStatusInfoMuted: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalDodgerBlue900) } + override public var colorBgStatusInfoMuted: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalDodgerBlue900) } - override public var colorBackgroundStatusInfoMutedOnBackgroundEmphasized: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalDodgerBlue100) } + override public var colorBgStatusInfoMutedOnBgEmphasized: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalDodgerBlue100) } - override public var colorBackgroundStatusInfoEmphasized: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalDodgerBlue500) } + override public var colorBgStatusInfoEmphasized: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalDodgerBlue500) } - override public var colorBackgroundStatusWarningMuted: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalSun900) } + override public var colorBgStatusWarningMuted: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalSun900) } - override public var colorBackgroundStatusWarningMutedOnBackgroundEmphasized: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalSun100) } + override public var colorBgStatusWarningMutedOnBgEmphasized: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalSun100) } - override public var colorBackgroundStatusWarningEmphasized: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalSun500) } + override public var colorBgStatusWarningEmphasized: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalSun500) } - override public var colorBackgroundStatusNegativeMuted: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalScarlet900) } + override public var colorBgStatusNegativeMuted: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalScarlet900) } - override public var colorBackgroundStatusNegativeMutedOnBackgroundEmphasized: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalScarlet100) } + override public var colorBgStatusNegativeMutedOnBgEmphasized: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalScarlet100) } - override public var colorBackgroundStatusNegativeEmphasized: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalScarlet600) } + override public var colorBgStatusNegativeEmphasized: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalScarlet600) } - override public var colorBackgroundStatusAccentMuted: ColorSemanticToken { MultipleColorTokens(OrangeBrandColorRawTokens.colorWarmGray900) } + override public var colorBgStatusAccentMuted: ColorSemanticToken { MultipleColorTokens(OrangeBrandColorRawTokens.colorWarmGray900) } - override public var colorBackgroundStatusAccentMutedOnBackgroundEmphasized: ColorSemanticToken { MultipleColorTokens(OrangeBrandColorRawTokens.colorWarmGray100) } + override public var colorBgStatusAccentMutedOnBgEmphasized: ColorSemanticToken { MultipleColorTokens(OrangeBrandColorRawTokens.colorWarmGray100) } - override public var colorBackgroundStatusAccentEmphasized: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalSun500) } + override public var colorBgStatusAccentEmphasized: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalSun500) } // MARK: Semantic token - Colors - Content override public var colorContentDefault: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalLightGray160) } - override public var colorContentContentDefaultOnBackgroundEmphasized: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalBlack) } + override public var colorContentContentDefaultOnBgEmphasized: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalBlack) } override public var colorContentMuted: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalLightGray400) } - override public var colorContentContentMutedOnBackgroundEmphasized: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalDarkGray400) } + override public var colorContentContentMutedOnBgEmphasized: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalDarkGray400) } override public var colorContentDisabled: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalDarkGray400) } - override public var colorContentContentDisabledOnBackgroundEmphasized: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalLightGray400) } + override public var colorContentContentDisabledOnBgEmphasized: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalLightGray400) } override public var colorContentBrandPrimary: ColorSemanticToken { MultipleColorTokens(OrangeBrandColorRawTokens.colorOrange500) } @@ -109,55 +109,55 @@ extension InverseTheme { // MARK: Semantic token - Colors - Content - On Background - override public var colorContentOnBackgroundPrimary: ColorSemanticToken { MultipleColorTokens( ColorRawTokens.colorFunctionalBlack) } + override public var colorContentOnBgPrimary: ColorSemanticToken { MultipleColorTokens( ColorRawTokens.colorFunctionalBlack) } - override public var colorContentOnBackgroundSecondary: ColorSemanticToken { fatalError("🤖 No value defined for colorContentOnBackgroundSecondary!") } + override public var colorContentOnBgSecondary: ColorSemanticToken { fatalError("🤖 No value defined for colorContentOnBgSecondary!") } - override public var colorContentOnBackgroundTertiary: ColorSemanticToken { fatalError("🤖 No value defined for colorContentOnBackgroundTertiary!") } + override public var colorContentOnBgTertiary: ColorSemanticToken { fatalError("🤖 No value defined for colorContentOnBgTertiary!") } - override public var colorContentOnBackgroundStatusPositiveMuted: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalLightGray160) } + override public var colorContentOnBgStatusPositiveMuted: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalLightGray160) } - override public var colorContentOnBackgroundStatusPositiveMutedOnBackgroundEmphasized: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalBlack) } + override public var colorContentOnBgStatusPositiveMutedOnBgEmphasized: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalBlack) } - override public var colorContentOnBackgroundStatusPositiveEmphasized: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalBlack) } + override public var colorContentOnBgStatusPositiveEmphasized: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalBlack) } - override public var colorContentOnBackgroundStatusInfoMuted: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalLightGray160) } + override public var colorContentOnBgStatusInfoMuted: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalLightGray160) } - override public var colorContentOnBackgroundStatusInfoMutedOnBackgroundEmphasized: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalLightGray160) } + override public var colorContentOnBgStatusInfoMutedOnBgEmphasized: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalLightGray160) } - override public var colorContentOnBackgroundStatusInfoEmphasized: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalBlack) } + override public var colorContentOnBgStatusInfoEmphasized: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalBlack) } - override public var colorContentOnBackgroundStatusWarningMuted: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalLightGray160) } + override public var colorContentOnBgStatusWarningMuted: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalLightGray160) } - override public var colorContentOnBackgroundStatusWarningMutedOnBackgroundEmphasized: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalBlack) } + override public var colorContentOnBgStatusWarningMutedOnBgEmphasized: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalBlack) } - override public var colorContentOnBackgroundStatusWarningEmphasized: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalBlack) } + override public var colorContentOnBgStatusWarningEmphasized: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalBlack) } - override public var colorContentOnBackgroundStatusNegativeMuted: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalLightGray160) } + override public var colorContentOnBgStatusNegativeMuted: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalLightGray160) } - override public var colorContentOnBackgroundStatusNegativeMutedOnBackgroundEmphasized: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalBlack) } + override public var colorContentOnBgStatusNegativeMutedOnBgEmphasized: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalBlack) } - override public var colorContentOnBackgroundStatusNegativeEmphasized: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalWhite) } + override public var colorContentOnBgStatusNegativeEmphasized: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalWhite) } - override public var colorContentOnBackgroundStatusAccentMuted: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalLightGray160) } + override public var colorContentOnBgStatusAccentMuted: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalLightGray160) } - override public var colorContentOnBackgroundStatusAccentMutedOnBackgroundEmphasized: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalBlack) } + override public var colorContentOnBgStatusAccentMutedOnBgEmphasized: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalBlack) } - override public var colorContentOnBackgroundStatusAccentedEmphasized: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalBlack) } + override public var colorContentOnBgStatusAccentedEmphasized: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalBlack) } // MARK: Semantic token - Colors - Border override public var colorBorderDefault: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalDarkGray400) } - override public var colorBorderDefaultOnBackgroundEmphasized: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalLightGray400) } + override public var colorBorderDefaultOnBgEmphasized: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalLightGray400) } override public var colorBorderEmphasized: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalLightGray160) } - override public var colorBorderEmphasizedOnBackgroundEmphasized: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalBlack) } + override public var colorBorderEmphasizedOnBgEmphasized: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalBlack) } override public var colorBorderFocus: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalDarkGray880) } - override public var colorBorderBrandPrimaryOnBackgroundEmphasized: ColorSemanticToken { MultipleColorTokens(OrangeBrandColorRawTokens.colorOrange550) } + override public var colorBorderBrandPrimaryOnBgEmphasized: ColorSemanticToken { MultipleColorTokens(OrangeBrandColorRawTokens.colorOrange550) } override public var colorBorderBrandPrimary: ColorSemanticToken { MultipleColorTokens(OrangeBrandColorRawTokens.colorOrange500) } @@ -175,65 +175,65 @@ extension InverseTheme { override public var colorBorderStatusAccent: ColorSemanticToken { fatalError("🤖 No value defined for colorBorderStatusAccent!") } - override public var colorBorderOnBackgroundBrandPrimary: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalBlack) } + override public var colorBorderOnBgBrandPrimary: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalBlack) } - override public var colorBorderOnBackgroundBrandSecondary: ColorSemanticToken { fatalError("🤖 No value defined for colorBorderOnBackgroundBrandSecondary!") } + override public var colorBorderOnBgBrandSecondary: ColorSemanticToken { fatalError("🤖 No value defined for colorBorderOnBgBrandSecondary!") } - override public var colorBorderOnBackgroundBrandTertiary: ColorSemanticToken { fatalError("🤖 No value defined for colorBorderOnBackgroundBrandTertiary!") } + override public var colorBorderOnBgBrandTertiary: ColorSemanticToken { fatalError("🤖 No value defined for colorBorderOnBgBrandTertiary!") } // MARK: Semantic token - Colors - Action override public var colorActionSelected: ColorSemanticToken { MultipleColorTokens(OrangeBrandColorRawTokens.colorOrange500) } - override public var colorActionSelectedOnBackgroundEmphasized: ColorSemanticToken { MultipleColorTokens(OrangeBrandColorRawTokens.colorOrange550) } + override public var colorActionSelectedOnBgEmphasized: ColorSemanticToken { MultipleColorTokens(OrangeBrandColorRawTokens.colorOrange550) } override public var colorActionDisabled: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalDarkGray400) } - override public var colorActionDisabledOnBackgroundEmphasized: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalLightGray400) } + override public var colorActionDisabledOnBgEmphasized: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalLightGray400) } override public var colorActionVisited: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorDecorativeAmethyst400) } - override public var colorActionVistedOnBackgroundEmphasized: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorDecorativeAmethyst600) } + override public var colorActionVistedOnBgEmphasized: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorDecorativeAmethyst600) } override public var colorActionPrimaryEnabled: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalLightGray160) } - override public var colorActionPrimaryEnabledOnBackgroundEmphasized: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalBlack) } + override public var colorActionPrimaryEnabledOnBgEmphasized: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalBlack) } override public var colorActionPrimaryHover: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalLightGray400) } - override public var colorActionPrimaryHoverOnBackgroundEmphasized: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalDarkGray400) } + override public var colorActionPrimaryHoverOnBgEmphasized: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalDarkGray400) } override public var colorActionPrimaryPressed: ColorSemanticToken { MultipleColorTokens(OrangeBrandColorRawTokens.colorOrange500) } - override public var colorActionPrimaryPressedOnBackgroundEmphasized: ColorSemanticToken { MultipleColorTokens(OrangeBrandColorRawTokens.colorOrange550) } + override public var colorActionPrimaryPressedOnBgEmphasized: ColorSemanticToken { MultipleColorTokens(OrangeBrandColorRawTokens.colorOrange550) } override public var colorActionPrimaryLoading: ColorSemanticToken { MultipleColorTokens(OrangeBrandColorRawTokens.colorOrange500) } - override public var colorActionPrimaryLoadingOnBackgroundEmphasized: ColorSemanticToken { MultipleColorTokens(OrangeBrandColorRawTokens.colorOrange550) } + override public var colorActionPrimaryLoadingOnBgEmphasized: ColorSemanticToken { MultipleColorTokens(OrangeBrandColorRawTokens.colorOrange550) } override public var colorActionPrimaryFocus: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalLightGray400) } - override public var colorActionPrimaryFocusOnBackgroundEmphasized: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalDarkGray400) } + override public var colorActionPrimaryFocusOnBgEmphasized: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalDarkGray400) } override public var colorActionSecondaryEnabled: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalLightGray160) } - override public var colorActionSecondaryEnabledOnBackgroundEmphasized: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalLightGray80) } + override public var colorActionSecondaryEnabledOnBgEmphasized: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalLightGray80) } override public var colorActionSecondaryHover: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalDarkGray640) } - override public var colorActionSecondaryHoverOnBackgroundEmphasized: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalLightGray160) } + override public var colorActionSecondaryHoverOnBgEmphasized: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalLightGray160) } override public var colorActionSecondaryPressed: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalDarkGray640) } - override public var colorActionSecondaryPressedOnBackgroundEmphasized: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalLightGray160) } + override public var colorActionSecondaryPressedOnBgEmphasized: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalLightGray160) } override public var colorActionSecondaryLoading: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalDarkGray640) } - override public var colorActionSecondaryLoadingOnBackgroundEmphasized: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalLightGray160) } + override public var colorActionSecondaryLoadingOnBgEmphasized: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalLightGray160) } override public var colorActionSecondaryFocus: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalDarkGray640) } - override public var colorActionSecondaryFocusOnBackgroundEmphasized: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalLightGray160) } + override public var colorActionSecondaryFocusOnBgEmphasized: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalLightGray160) } override public var colorActionNegativeEnabled: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalScarlet600) } @@ -245,99 +245,87 @@ extension InverseTheme { override public var colorActionNegativeFocus: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalScarlet700) } - override public var colorActionOnBackgroundActionDisabled: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalBlack) } + override public var colorActionOnBgActionDisabled: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalBlack) } - override public var colorActionOnBackgroundActionDisabledOnBackgroundEmphasized: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalWhite) } + override public var colorActionOnBgActionDisabledOnBgEmphasized: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalWhite) } - override public var colorActionOnBackgroundActionNegative: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalWhite) } + override public var colorActionOnBgActionNegative: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalWhite) } - override public var colorActionOnBackgroundActionPrimaryEnabled: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalBlack) } + override public var colorActionOnBgActionPrimaryEnabled: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalBlack) } - override public var colorActionOnBackgroundActionPrimaryEnabledOnBackgroundEmphasized: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalWhite) } + override public var colorActionOnBgActionPrimaryEnabledOnBgEmphasized: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalWhite) } - override public var colorActionOnBackgroundActionPrimaryHover: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalBlack) } + override public var colorActionOnBgActionPrimaryHover: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalBlack) } - override public var colorActionOnBackgroundActionPrimaryHoverOnBackgroundEmphasized: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalWhite) } + override public var colorActionOnBgActionPrimaryHoverOnBgEmphasized: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalWhite) } - override public var colorActionOnBackgroundActionPrimaryPressed: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalBlack) } + override public var colorActionOnBgActionPrimaryPressed: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalBlack) } - override public var colorActionOnBackgroundActionPrimaryPressedOnBackgroundEmphasized: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalWhite) } + override public var colorActionOnBgActionPrimaryPressedOnBgEmphasized: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalWhite) } - override public var colorActionOnBackgroundActionPrimaryLoading: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalBlack) } + override public var colorActionOnBgActionPrimaryLoading: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalBlack) } - override public var colorActionOnBackgroundActionPrimaryLoadingOnBackgroundEmphasized: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalWhite) } + override public var colorActionOnBgActionPrimaryLoadingOnBgEmphasized: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalWhite) } - override public var colorActionOnBackgroundActionPrimaryFocus: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalBlack) } + override public var colorActionOnBgActionPrimaryFocus: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalBlack) } - override public var colorActionOnBackgroundActionPrimaryFocusOnBackgroundEmphasized: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalWhite) } + override public var colorActionOnBgActionPrimaryFocusOnBgEmphasized: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalWhite) } - override public var colorActionOnBackgroundActionSecondaryEnabled: ColorSemanticToken { fatalError("🤖 No value defined for colorActionOnBackgroundActionSecondaryEnabled!") } + override public var colorActionOnBgActionSecondaryEnabled: ColorSemanticToken { fatalError("🤖 No value defined for colorActionOnBgActionSecondaryEnabled!") } - override public var colorActionOnBackgroundActionSecondaryEnabledOnBackgroundEmphasized: ColorSemanticToken { fatalError("🤖 No value defined for colorActionOnBackgroundActionSecondaryEnabledOnBackgroundEmphasized!") } + override public var colorActionOnBgActionSecondaryEnabledOnBgEmphasized: ColorSemanticToken { fatalError("🤖 No value defined for colorActionOnBgActionSecondaryEnabledOnBgEmphasized!") } - override public var colorActionOnBackgroundActionSecondaryHover: ColorSemanticToken { fatalError("🤖 No value defined for colorActionOnBackgroundActionSecondaryHover!") } + override public var colorActionOnBgActionSecondaryHover: ColorSemanticToken { fatalError("🤖 No value defined for colorActionOnBgActionSecondaryHover!") } - override public var colorActionOnBackgroundActionSecondaryHoverOnBackgroundEmphasized: ColorSemanticToken { fatalError("🤖 No value defined for colorActionOnBackgroundActionSecondaryHoverOnBackgroundEmphasized!") } + override public var colorActionOnBgActionSecondaryHoverOnBgEmphasized: ColorSemanticToken { fatalError("🤖 No value defined for colorActionOnBgActionSecondaryHoverOnBgEmphasized!") } - override public var colorActionOnBackgroundActionSecondaryPressed: ColorSemanticToken { fatalError("🤖 No value defined for colorActionOnBackgroundActionSecondaryPressed!") } + override public var colorActionOnBgActionSecondaryPressed: ColorSemanticToken { fatalError("🤖 No value defined for colorActionOnBgActionSecondaryPressed!") } - override public var colorActionOnBackgroundActionSecondaryPressedOnBackgroundEmphasized: ColorSemanticToken { fatalError("🤖 No value defined for colorActionOnBackgroundActionSecondaryPressedOnBackgroundEmphasized!") } + override public var colorActionOnBgActionSecondaryPressedOnBgEmphasized: ColorSemanticToken { fatalError("🤖 No value defined for colorActionOnBgActionSecondaryPressedOnBgEmphasized!") } - override public var colorActionOnBackgroundActionSecondaryLoading: ColorSemanticToken { fatalError("🤖 No value defined for colorActionOnBackgroundActionSecondaryLoading!") } + override public var colorActionOnBgActionSecondaryLoading: ColorSemanticToken { fatalError("🤖 No value defined for colorActionOnBgActionSecondaryLoading!") } - override public var colorActionOnBackgroundActionSecondaryLoadingOnBackgroundEmphasized: ColorSemanticToken { fatalError("🤖 No value defined for colorActionOnBackgroundActionSecondaryLoadingOnBackgroundEmphasized!") } + override public var colorActionOnBgActionSecondaryLoadingOnBgEmphasized: ColorSemanticToken { fatalError("🤖 No value defined for colorActionOnBgActionSecondaryLoadingOnBgEmphasized!") } - override public var colorActionOnBackgroundActionSecondaryFocus: ColorSemanticToken { fatalError("🤖 No value defined for colorActionOnBackgroundActionSecondaryFocus!") } + override public var colorActionOnBgActionSecondaryFocus: ColorSemanticToken { fatalError("🤖 No value defined for colorActionOnBgActionSecondaryFocus!") } - override public var colorActionOnBackgroundActionSecondaryFocusOnBackgroundEmphasized: ColorSemanticToken { fatalError("🤖 No value defined for colorActionOnBackgroundActionSecondaryFocusOnBackgroundEmphasized!") } + override public var colorActionOnBgActionSecondaryFocusOnBgEmphasized: ColorSemanticToken { fatalError("🤖 No value defined for colorActionOnBgActionSecondaryFocusOnBgEmphasized!") } // MARK: Semantic token - Colors - Elevation override public var colorElevationRaised: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalDarkGray800) } - override public var colorElevationRaisedOnBackgroundSecondary: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalDarkGray640) } + override public var colorElevationRaisedOnBgSecondary: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalDarkGray640) } - override public var colorElevationRaisedOnBackgroundEmphasized: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalWhite) } + override public var colorElevationRaisedOnBgEmphasized: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalWhite) } override public var colorElevationDrag: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalDarkGray720) } - override public var colorElevationDragOnBackgroundSecondary: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalDarkGray480) } + override public var colorElevationDragOnBgSecondary: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalDarkGray480) } - override public var colorElevationDragOnBackgroundEmphasized: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalLightGray80) } + override public var colorElevationDragOnBgEmphasized: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalLightGray80) } override public var colorElevationOverlayDefault: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalDarkGray720) } - override public var colorElevationOverlayDefaultOnBackgroundSecondary: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalDarkGray560) } + override public var colorElevationOverlayDefaultOnBgSecondary: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalDarkGray560) } - override public var colorElevationOverlayDefaultOnBackgroundEmphasized: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalWhite) } + override public var colorElevationOverlayDefaultOnBgEmphasized: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalWhite) } override public var colorElevationOverlayEmphasized: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalLightGray80) } - override public var colorElevationOverlayEmphasizedOnBackgroundSecondary: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalLightGray80) } + override public var colorElevationOverlayEmphasizedOnBgSecondary: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalLightGray80) } - override public var colorElevationOverlayEmphasizedOnBackgroundEmphasized: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalDarkGray640) } + override public var colorElevationOverlayEmphasizedOnBgEmphasized: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalDarkGray640) } override public var colorElevationModal: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalDarkGray640) } // MARK: Semantic token - Colors - Decorative - override public var colorDecorativeBrandPrimary: ColorSemanticToken { MultipleColorTokens(OrangeBrandColorRawTokens.colorOrange500) } - - override public var colorDecorativeBrandPrimaryMuted: ColorSemanticToken { fatalError("🤖 No value defined for colorDecorativeBrandPrimaryMuted!") } - - override public var colorDecorativeBrandPrimaryEmphasized: ColorSemanticToken { fatalError("🤖 No value defined for colorDecorativeBrandPrimaryEmphasized!") } + override public var colorDecorativePrimary: ColorSemanticToken { MultipleColorTokens(OrangeBrandColorRawTokens.colorOrange500) } override public var colorDecorativeSecondary: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalWhite) } - override public var colorDecorativeSecondaryMuted: ColorSemanticToken { fatalError("🤖 No value defined for colorDecorativeSecondaryMuted!") } - - override public var colorDecorativeSecondaryEmphasized: ColorSemanticToken { fatalError("🤖 No value defined for colorDecorativeSecondaryEmphasized!") } - - override public var colorDecorativeBrandTertiary: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalBlack) } - - override public var colorDecorativeBrandTertiaryMuted: ColorSemanticToken { fatalError("🤖 No value defined for colorDecorativeBrandTertiaryMuted!") } - - override public var colorDecorativeBrandTertiaryEmphasized: ColorSemanticToken { fatalError("🤖 No value defined for colorDecorativeBrandTertiaryEmphasized!") } + override public var colorDecorativeTertiary: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalBlack) } override public var colorDecorativeNeutralMuted: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalDarkGray640) } @@ -375,23 +363,23 @@ extension InverseTheme { override public var colorDecorativeAccent5Emphasized: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorDecorativeShockingPink300) } - override public var colorDecorativeSkintTint100: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorDecorativeDeepPeach100) } + override public var colorDecorativeSkinTint100: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorDecorativeDeepPeach100) } - override public var colorDecorativeSkintTint200: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorDecorativeDeepPeach200) } + override public var colorDecorativeSkinTint200: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorDecorativeDeepPeach200) } - override public var colorDecorativeSkintTint300: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorDecorativeDeepPeach300) } + override public var colorDecorativeSkinTint300: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorDecorativeDeepPeach300) } - override public var colorDecorativeSkintTint400: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorDecorativeDeepPeach400) } + override public var colorDecorativeSkinTint400: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorDecorativeDeepPeach400) } - override public var colorDecorativeSkintTint500: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorDecorativeDeepPeach500) } + override public var colorDecorativeSkinTint500: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorDecorativeDeepPeach500) } - override public var colorDecorativeSkintTint600: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorDecorativeDeepPeach600) } + override public var colorDecorativeSkinTint600: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorDecorativeDeepPeach600) } - override public var colorDecorativeSkintTint700: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorDecorativeDeepPeach700) } + override public var colorDecorativeSkinTint700: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorDecorativeDeepPeach700) } - override public var colorDecorativeSkintTint800: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorDecorativeDeepPeach800) } + override public var colorDecorativeSkinTint800: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorDecorativeDeepPeach800) } - override public var colorDecorativeSkintTint900: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorDecorativeDeepPeach900) } + override public var colorDecorativeSkinTint900: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorDecorativeDeepPeach900) } // MARK: Semantic token - Colors - Chart diff --git a/OUDS/Core/Themes/Inverse/Sources/InverseTheme+ElevationSemanticTokens.swift b/OUDS/Core/Themes/Inverse/Sources/InverseTheme+ElevationSemanticTokens.swift deleted file mode 100644 index 889f1ac8b..000000000 --- a/OUDS/Core/Themes/Inverse/Sources/InverseTheme+ElevationSemanticTokens.swift +++ /dev/null @@ -1,34 +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 with the tokenator] - -// swiftlint:disable line_length - -extension InverseTheme { - - // MARK: Semantic token - Elevation - Color - - override public var elevationColorFocus: ElevationColorSemanticToken { MultipleColorTokens( ColorRawTokens.colorFunctionalLightGray160) } - - // MARK: Semantic token - Elevation - Box shadow - - override public var elevationFocus: ElevationCompositeSemanticToken { ElevationCompositeSemanticToken(light: ElevationCompositeRawToken(x: 0, y: 0, blur: 0, color: ColorRawTokens.colorFunctionalLightGray160), dark: ElevationCompositeRawToken(x: 0, y: 0, blur: 0, color: ColorRawTokens.colorFunctionalLightGray160)) } -} - -// swiftlint:enable line_length diff --git a/OUDS/Core/Themes/Inverse/Sources/InverseTheme.swift b/OUDS/Core/Themes/Inverse/Sources/InverseTheme.swift index 9d29962ef..5e764fe3d 100644 --- a/OUDS/Core/Themes/Inverse/Sources/InverseTheme.swift +++ b/OUDS/Core/Themes/Inverse/Sources/InverseTheme.swift @@ -15,7 +15,7 @@ import OUDSThemesOrange /// This is an override of the default basic `OrangeTheme` with some inverted colors. /// It can overrides any properties from its superclass, and can be derived too. -open class InverseTheme: OrangeTheme { +open class InverseTheme: OrangeTheme, @unchecked Sendable { deinit { } diff --git a/OUDS/Core/Themes/Inverse/Tests/TestInverseThemeColors.swift b/OUDS/Core/Themes/Inverse/Tests/TestInverseThemeColors.swift index e75da93d9..da6af6c98 100644 --- a/OUDS/Core/Themes/Inverse/Tests/TestInverseThemeColors.swift +++ b/OUDS/Core/Themes/Inverse/Tests/TestInverseThemeColors.swift @@ -40,101 +40,101 @@ final class TestInverseThemeColors: XCTestCase { // MARK: Semantic token - Colors - Background func testColorsHomogeneityColorBackgroundPrimary() throws { - assertHomogeneity(inverseTheme.colorBackgroundPrimary) + assertHomogeneity(inverseTheme.colorBgPrimary) } func testColorsHomogeneityColorBackgroundSecondary() throws { - assertHomogeneity(inverseTheme.colorBackgroundSecondary) + assertHomogeneity(inverseTheme.colorBgSecondary) } func testColorsHomogeneityColorBackgroundTertiary() throws { - assertHomogeneity(inverseTheme.colorBackgroundTertiary) + assertHomogeneity(inverseTheme.colorBgTertiary) } func testColorsHomogeneityColorBackgroundEmphasized() throws { - assertHomogeneity(inverseTheme.colorBackgroundEmphasized) + assertHomogeneity(inverseTheme.colorBgEmphasized) } func testColorsHomogeneityColorBackgroundBrandPrimary() throws { - assertHomogeneity(inverseTheme.colorBackgroundBrandPrimary) + assertHomogeneity(inverseTheme.colorBgBrandPrimary) } // In InverseTheme token not implemented yet -// func testColorsHomogeneityColorBackgroundBrandSecondary() throws { -// assertHomogeneity(inverseTheme.colorBackgroundBrandSecondary) +// func testColorsHomogeneityColorBgBrandSecondary() throws { +// assertHomogeneity(inverseTheme.colorBgBrandSecondary) // } // In InverseTheme token not implemented yet -// func testColorsHomogeneityColorBackgroundBrandTertiary() throws { -// assertHomogeneity(inverseTheme.colorBackgroundBrandTertiary) +// func testColorsHomogeneityColorBgBrandTertiary() throws { +// assertHomogeneity(inverseTheme.colorBgBrandTertiary) // } func testColorsHomogeneityColorBackgroundStatusNeutral() throws { - assertHomogeneity(inverseTheme.colorBackgroundStatusNeutral) + assertHomogeneity(inverseTheme.colorBgStatusNeutral) } - func testColorsHomogeneityColorBackgroundStatusNeutralOnBackgroundEmphasized() throws { - assertHomogeneity(inverseTheme.colorBackgroundStatusNeutralOnBackgroundEmphasized) + func testColorsHomogeneityColorBackgroundStatusNeutralOnBgEmphasized() throws { + assertHomogeneity(inverseTheme.colorBgStatusNeutralOnBgEmphasized) } func testColorsHomogeneityColorBackgroundStatusPositiveMuted() throws { - assertHomogeneity(inverseTheme.colorBackgroundStatusPositiveMuted) + assertHomogeneity(inverseTheme.colorBgStatusPositiveMuted) } - func testColorsHomogeneityColorBackgroundStatusPositiveMutedOnBackgroundEmphasized() throws { - assertHomogeneity(inverseTheme.colorBackgroundStatusPositiveMutedOnBackgroundEmphasized) + func testColorsHomogeneityColorBackgroundStatusPositiveMutedOnBgEmphasized() throws { + assertHomogeneity(inverseTheme.colorBgStatusPositiveMutedOnBgEmphasized) } func testColorsHomogeneityColorBackgroundStatusPositiveEmphasized() throws { - assertHomogeneity(inverseTheme.colorBackgroundStatusPositiveEmphasized) + assertHomogeneity(inverseTheme.colorBgStatusPositiveEmphasized) } func testColorsHomogeneityColorBackgroundStatusInfoMuted() throws { - assertHomogeneity(inverseTheme.colorBackgroundStatusInfoMuted) + assertHomogeneity(inverseTheme.colorBgStatusInfoMuted) } - func testColorsHomogeneityColorBackgroundStatusInfoMutedOnBackgroundEmphasized() throws { - assertHomogeneity(inverseTheme.colorBackgroundStatusInfoMutedOnBackgroundEmphasized) + func testColorsHomogeneityColorBackgroundStatusInfoMutedOnBgEmphasized() throws { + assertHomogeneity(inverseTheme.colorBgStatusInfoMutedOnBgEmphasized) } func testColorsHomogeneityColorBackgroundStatusInfoEmphasized() throws { - assertHomogeneity(inverseTheme.colorBackgroundStatusInfoEmphasized) + assertHomogeneity(inverseTheme.colorBgStatusInfoEmphasized) } func testColorsHomogeneityColorBackgroundStatusWarningMuted() throws { - assertHomogeneity(inverseTheme.colorBackgroundStatusWarningMuted) + assertHomogeneity(inverseTheme.colorBgStatusWarningMuted) } - func testColorsHomogeneityColorBackgroundStatusWarningMutedOnBackgroundEmphasized() throws { - assertHomogeneity(inverseTheme.colorBackgroundStatusWarningMutedOnBackgroundEmphasized) + func testColorsHomogeneityColorBackgroundStatusWarningMutedOnBgEmphasized() throws { + assertHomogeneity(inverseTheme.colorBgStatusWarningMutedOnBgEmphasized) } func testColorsHomogeneityColorBackgroundStatusWarningEmphasized() throws { - assertHomogeneity(inverseTheme.colorBackgroundStatusWarningEmphasized) + assertHomogeneity(inverseTheme.colorBgStatusWarningEmphasized) } func testColorsHomogeneityColorBackgroundStatusNegativeMuted() throws { - assertHomogeneity(inverseTheme.colorBackgroundStatusNegativeMuted) + assertHomogeneity(inverseTheme.colorBgStatusNegativeMuted) } - func testColorsHomogeneityColorBackgroundStatusNegativeMutedOnBackgroundEmphasized() throws { - assertHomogeneity(inverseTheme.colorBackgroundStatusNegativeMutedOnBackgroundEmphasized) + func testColorsHomogeneityColorBackgroundStatusNegativeMutedOnBgEmphasized() throws { + assertHomogeneity(inverseTheme.colorBgStatusNegativeMutedOnBgEmphasized) } func testColorsHomogeneityColorBackgroundStatusNegativeEmphasized() throws { - assertHomogeneity(inverseTheme.colorBackgroundStatusNegativeEmphasized) + assertHomogeneity(inverseTheme.colorBgStatusNegativeEmphasized) } func testColorsHomogeneityColorBackgroundStatusAccentMuted() throws { - assertHomogeneity(inverseTheme.colorBackgroundStatusAccentMuted) + assertHomogeneity(inverseTheme.colorBgStatusAccentMuted) } - func testColorsHomogeneityColorBackgroundStatusAccentMutedOnBackgroundEmphasized() throws { - assertHomogeneity(inverseTheme.colorBackgroundStatusAccentMutedOnBackgroundEmphasized) + func testColorsHomogeneityColorBackgroundStatusAccentMutedOnBgEmphasized() throws { + assertHomogeneity(inverseTheme.colorBgStatusAccentMutedOnBgEmphasized) } func testColorsHomogeneityColorBackgroundStatusAccentEmphasized() throws { - assertHomogeneity(inverseTheme.colorBackgroundStatusAccentEmphasized) + assertHomogeneity(inverseTheme.colorBgStatusAccentEmphasized) } // MARK: Semantic token - Colors - Content - Status @@ -143,24 +143,24 @@ final class TestInverseThemeColors: XCTestCase { assertHomogeneity(inverseTheme.colorContentDefault) } - func testColorsHomogeneityColorContentContentDefaultOnBackgroundEmphasized() throws { - assertHomogeneity(inverseTheme.colorContentContentDefaultOnBackgroundEmphasized) + func testColorsHomogeneityColorContentContentDefaultOnBgEmphasized() throws { + assertHomogeneity(inverseTheme.colorContentContentDefaultOnBgEmphasized) } func testColorsHomogeneityColorContentMuted() throws { assertHomogeneity(inverseTheme.colorContentMuted) } - func testColorsHomogeneityColorContentContentMutedOnBackgroundEmphasized() throws { - assertHomogeneity(inverseTheme.colorContentContentMutedOnBackgroundEmphasized) + func testColorsHomogeneityColorContentContentMutedOnBgEmphasized() throws { + assertHomogeneity(inverseTheme.colorContentContentMutedOnBgEmphasized) } func testColorsHomogeneityColorContentDisabled() throws { assertHomogeneity(inverseTheme.colorContentDisabled) } - func testColorsHomogeneityColorContentContentDisabledOnBackgroundEmphasized() throws { - assertHomogeneity(inverseTheme.colorContentContentDisabledOnBackgroundEmphasized) + func testColorsHomogeneityColorContentContentDisabledOnBgEmphasized() throws { + assertHomogeneity(inverseTheme.colorContentContentDisabledOnBgEmphasized) } func testColorsHomogeneityColorContentBrandPrimary() throws { @@ -200,78 +200,78 @@ final class TestInverseThemeColors: XCTestCase { // MARK: Semantic token - Colors - Content - On Background - func testColorsHomogeneityColorContentOnBackgroundPrimary() throws { - assertHomogeneity(inverseTheme.colorContentOnBackgroundPrimary) + func testColorsHomogeneityColorContentOnBgPrimary() throws { + assertHomogeneity(inverseTheme.colorContentOnBgPrimary) } // In InverseTheme token not implemented yet -// func testColorsHomogeneityColorContentOnBackgroundSecondary() throws { -// assertHomogeneity(inverseTheme.colorContentOnBackgroundSecondary) +// func testColorsHomogeneityColorContentOnBgSecondary() throws { +// assertHomogeneity(inverseTheme.colorContentOnBgSecondary) // } // In InverseTheme token not implemented yet -// func testColorsHomogeneityColorContentOnBackgroundTertiary() throws { -// assertHomogeneity(inverseTheme.colorContentOnBackgroundTertiary) +// func testColorsHomogeneityColorContentOnBgTertiary() throws { +// assertHomogeneity(inverseTheme.colorContentOnBgTertiary) // } - func testColorsHomogeneityColorContentOnBackgroundStatusPositiveMuted() throws { - assertHomogeneity(inverseTheme.colorContentOnBackgroundStatusPositiveMuted) + func testColorsHomogeneityColorContentOnBgStatusPositiveMuted() throws { + assertHomogeneity(inverseTheme.colorContentOnBgStatusPositiveMuted) } - func testColorsHomogeneityColorContentOnBackgroundStatusPositiveMutedOnBackgroundEmphasized() throws { - assertHomogeneity(inverseTheme.colorContentOnBackgroundStatusPositiveMutedOnBackgroundEmphasized) + func testColorsHomogeneityColorContentOnBgStatusPositiveMutedOnBgEmphasized() throws { + assertHomogeneity(inverseTheme.colorContentOnBgStatusPositiveMutedOnBgEmphasized) } - func testColorsHomogeneityColorContentOnBackgroundStatusPositiveEmphasized() throws { - assertHomogeneity(inverseTheme.colorContentOnBackgroundStatusPositiveEmphasized) + func testColorsHomogeneityColorContentOnBgStatusPositiveEmphasized() throws { + assertHomogeneity(inverseTheme.colorContentOnBgStatusPositiveEmphasized) } - func testColorsHomogeneityColorContentOnBackgroundStatusInfoMuted() throws { - assertHomogeneity(inverseTheme.colorContentOnBackgroundStatusInfoMuted) + func testColorsHomogeneityColorContentOnBgStatusInfoMuted() throws { + assertHomogeneity(inverseTheme.colorContentOnBgStatusInfoMuted) } - func testColorsHomogeneityColorContentOnBackgroundStatusInfoMutedOnBackgroundEmphasized() throws { - assertHomogeneity(inverseTheme.colorContentOnBackgroundStatusInfoMutedOnBackgroundEmphasized) + func testColorsHomogeneityColorContentOnBgStatusInfoMutedOnBgEmphasized() throws { + assertHomogeneity(inverseTheme.colorContentOnBgStatusInfoMutedOnBgEmphasized) } - func testColorsHomogeneityColorContentOnBackgroundStatusInfoEmphasized() throws { - assertHomogeneity(inverseTheme.colorContentOnBackgroundStatusInfoEmphasized) + func testColorsHomogeneityColorContentOnBgStatusInfoEmphasized() throws { + assertHomogeneity(inverseTheme.colorContentOnBgStatusInfoEmphasized) } - func testColorsHomogeneityColorContentOnBackgroundStatusWarningMuted() throws { - assertHomogeneity(inverseTheme.colorContentOnBackgroundStatusWarningMuted) + func testColorsHomogeneityColorContentOnBgStatusWarningMuted() throws { + assertHomogeneity(inverseTheme.colorContentOnBgStatusWarningMuted) } - func testColorsHomogeneityColorContentOnBackgroundStatusWarningMutedOnBackgroundEmphasized() throws { - assertHomogeneity(inverseTheme.colorContentOnBackgroundStatusWarningMutedOnBackgroundEmphasized) + func testColorsHomogeneityColorContentOnBgStatusWarningMutedOnBgEmphasized() throws { + assertHomogeneity(inverseTheme.colorContentOnBgStatusWarningMutedOnBgEmphasized) } - func testColorsHomogeneityColorContentOnBackgroundStatusWarningEmphasized() throws { - assertHomogeneity(inverseTheme.colorContentOnBackgroundStatusWarningEmphasized) + func testColorsHomogeneityColorContentOnBgStatusWarningEmphasized() throws { + assertHomogeneity(inverseTheme.colorContentOnBgStatusWarningEmphasized) } - func testColorsHomogeneityColorContentOnBackgroundStatusNegativeMuted() throws { - assertHomogeneity(inverseTheme.colorContentOnBackgroundStatusNegativeMuted) + func testColorsHomogeneityColorContentOnBgStatusNegativeMuted() throws { + assertHomogeneity(inverseTheme.colorContentOnBgStatusNegativeMuted) } - func testColorsHomogeneityColorContentOnBackgroundStatusNegativeMutedOnBackgroundEmphasized() throws { - assertHomogeneity(inverseTheme.colorContentOnBackgroundStatusNegativeMutedOnBackgroundEmphasized) + func testColorsHomogeneityColorContentOnBgStatusNegativeMutedOnBgEmphasized() throws { + assertHomogeneity(inverseTheme.colorContentOnBgStatusNegativeMutedOnBgEmphasized) } - func testColorsHomogeneityColorContentOnBackgroundStatusNegativeEmphasized() throws { - assertHomogeneity(inverseTheme.colorContentOnBackgroundStatusNegativeEmphasized) + func testColorsHomogeneityColorContentOnBgStatusNegativeEmphasized() throws { + assertHomogeneity(inverseTheme.colorContentOnBgStatusNegativeEmphasized) } - func testColorsHomogeneityColorContentOnBackgroundStatusAccentMuted() throws { - assertHomogeneity(inverseTheme.colorContentOnBackgroundStatusAccentMuted) + func testColorsHomogeneityColorContentOnBgStatusAccentMuted() throws { + assertHomogeneity(inverseTheme.colorContentOnBgStatusAccentMuted) } - func testColorsHomogeneityColorContentOnBackgroundStatusAccentMutedOnBackgroundEmphasized() throws { - assertHomogeneity(inverseTheme.colorContentOnBackgroundStatusAccentMutedOnBackgroundEmphasized) + func testColorsHomogeneityColorContentOnBgStatusAccentMutedOnBgEmphasized() throws { + assertHomogeneity(inverseTheme.colorContentOnBgStatusAccentMutedOnBgEmphasized) } - func testColorsHomogeneityColorContentOnBackgroundStatusAccentedEmphasized() throws { - assertHomogeneity(inverseTheme.colorContentOnBackgroundStatusAccentedEmphasized) + func testColorsHomogeneityColorContentOnBgStatusAccentedEmphasized() throws { + assertHomogeneity(inverseTheme.colorContentOnBgStatusAccentedEmphasized) } // MARK: Semantic token - Colors - Border @@ -280,24 +280,24 @@ final class TestInverseThemeColors: XCTestCase { assertHomogeneity(inverseTheme.colorBorderDefault) } - func testColorsHomogeneityColorBorderDefaultOnBackgroundEmphasized() throws { - assertHomogeneity(inverseTheme.colorBorderDefaultOnBackgroundEmphasized) + func testColorsHomogeneityColorBorderDefaultOnBgEmphasized() throws { + assertHomogeneity(inverseTheme.colorBorderDefaultOnBgEmphasized) } func testColorsHomogeneityColorBorderEmphasized() throws { assertHomogeneity(inverseTheme.colorBorderEmphasized) } - func testColorsHomogeneityColorBorderEmphasizedOnBackgroundEmphasized() throws { - assertHomogeneity(inverseTheme.colorBorderEmphasizedOnBackgroundEmphasized) + func testColorsHomogeneityColorBorderEmphasizedOnBgEmphasized() throws { + assertHomogeneity(inverseTheme.colorBorderEmphasizedOnBgEmphasized) } func testColorsHomogeneityColorBorderFocus() throws { assertHomogeneity(inverseTheme.colorBorderFocus) } - func testColorsHomogeneityColorBorderBrandPrimaryOnBackgroundEmphasized() throws { - assertHomogeneity(inverseTheme.colorBorderBrandPrimaryOnBackgroundEmphasized) + func testColorsHomogeneityColorBorderBrandPrimaryOnBgEmphasized() throws { + assertHomogeneity(inverseTheme.colorBorderBrandPrimaryOnBgEmphasized) } func testColorsHomogeneityColorBorderBrandPrimary() throws { @@ -339,18 +339,18 @@ final class TestInverseThemeColors: XCTestCase { // assertHomogeneity(inverseTheme.colorBorderStatusAccent) // } - func testColorsHomogeneityColorBorderOnBackgroundBrandPrimary() throws { - assertHomogeneity(inverseTheme.colorBorderOnBackgroundBrandPrimary) + func testColorsHomogeneityColorBorderOnBgBrandPrimary() throws { + assertHomogeneity(inverseTheme.colorBorderOnBgBrandPrimary) } // In InverseTheme token not implemented yet -// func testColorsHomogeneityColorBorderOnBackgroundBrandSecondary() throws { -// assertHomogeneity(inverseTheme.colorBorderOnBackgroundBrandSecondary) +// func testColorsHomogeneityColorBorderOnBgBrandSecondary() throws { +// assertHomogeneity(inverseTheme.colorBorderOnBgBrandSecondary) // } // In InverseTheme token not implemented yet -// func testColorsHomogeneityColorBorderOnBackgroundBrandTertiary() throws { -// assertHomogeneity(inverseTheme.colorBorderOnBackgroundBrandTertiary) +// func testColorsHomogeneityColorBorderOnBgBrandTertiary() throws { +// assertHomogeneity(inverseTheme.colorBorderOnBgBrandTertiary) // } // MARK: Semantic token - Colors - Action @@ -359,104 +359,104 @@ final class TestInverseThemeColors: XCTestCase { assertHomogeneity(inverseTheme.colorActionSelected) } - func testColorsHomogeneityColorActionSelectedOnBackgroundEmphasized() throws { - assertHomogeneity(inverseTheme.colorActionSelectedOnBackgroundEmphasized) + func testColorsHomogeneityColorActionSelectedOnBgEmphasized() throws { + assertHomogeneity(inverseTheme.colorActionSelectedOnBgEmphasized) } func testColorsHomogeneityColorActionDisabled() throws { assertHomogeneity(inverseTheme.colorActionDisabled) } - func testColorsHomogeneityColorActionDisabledOnBackgroundEmphasized() throws { - assertHomogeneity(inverseTheme.colorActionDisabledOnBackgroundEmphasized) + func testColorsHomogeneityColorActionDisabledOnBgEmphasized() throws { + assertHomogeneity(inverseTheme.colorActionDisabledOnBgEmphasized) } func testColorsHomogeneityColorActionVisited() throws { assertHomogeneity(inverseTheme.colorActionVisited) } - func testColorsHomogeneityColorActionVistedOnBackgroundEmphasized() throws { - assertHomogeneity(inverseTheme.colorActionVistedOnBackgroundEmphasized) + func testColorsHomogeneityColorActionVistedOnBgEmphasized() throws { + assertHomogeneity(inverseTheme.colorActionVistedOnBgEmphasized) } func testColorsHomogeneityColorActionPrimaryEnabled() throws { assertHomogeneity(inverseTheme.colorActionPrimaryEnabled) } - func testColorsHomogeneityColorActionPrimaryEnabledOnBackgroundEmphasized() throws { - assertHomogeneity(inverseTheme.colorActionPrimaryEnabledOnBackgroundEmphasized) + func testColorsHomogeneityColorActionPrimaryEnabledOnBgEmphasized() throws { + assertHomogeneity(inverseTheme.colorActionPrimaryEnabledOnBgEmphasized) } func testColorsHomogeneityColorActionPrimaryHover() throws { assertHomogeneity(inverseTheme.colorActionPrimaryHover) } - func testColorsHomogeneityColorActionPrimaryHoverOnBackgroundEmphasized() throws { - assertHomogeneity(inverseTheme.colorActionPrimaryHoverOnBackgroundEmphasized) + func testColorsHomogeneityColorActionPrimaryHoverOnBgEmphasized() throws { + assertHomogeneity(inverseTheme.colorActionPrimaryHoverOnBgEmphasized) } func testColorsHomogeneityColorActionPrimaryPressed() throws { assertHomogeneity(inverseTheme.colorActionPrimaryPressed) } - func testColorsHomogeneityColorActionPrimaryPressedOnBackgroundEmphasized() throws { - assertHomogeneity(inverseTheme.colorActionPrimaryPressedOnBackgroundEmphasized) + func testColorsHomogeneityColorActionPrimaryPressedOnBgEmphasized() throws { + assertHomogeneity(inverseTheme.colorActionPrimaryPressedOnBgEmphasized) } func testColorsHomogeneityColorActionPrimaryLoading() throws { assertHomogeneity(inverseTheme.colorActionPrimaryLoading) } - func testColorsHomogeneityColorActionPrimaryLoadingOnBackgroundEmphasized() throws { - assertHomogeneity(inverseTheme.colorActionPrimaryLoadingOnBackgroundEmphasized) + func testColorsHomogeneityColorActionPrimaryLoadingOnBgEmphasized() throws { + assertHomogeneity(inverseTheme.colorActionPrimaryLoadingOnBgEmphasized) } func testColorsHomogeneityColorActionPrimaryFocus() throws { assertHomogeneity(inverseTheme.colorActionPrimaryFocus) } - func testColorsHomogeneityColorActionPrimaryFocusOnBackgroundEmphasized() throws { - assertHomogeneity(inverseTheme.colorActionPrimaryFocusOnBackgroundEmphasized) + func testColorsHomogeneityColorActionPrimaryFocusOnBgEmphasized() throws { + assertHomogeneity(inverseTheme.colorActionPrimaryFocusOnBgEmphasized) } func testColorsHomogeneityColorActionSecondaryEnabled() throws { assertHomogeneity(inverseTheme.colorActionSecondaryEnabled) } - func testColorsHomogeneityColorActionSecondaryEnabledOnBackgroundEmphasized() throws { - assertHomogeneity(inverseTheme.colorActionSecondaryEnabledOnBackgroundEmphasized) + func testColorsHomogeneityColorActionSecondaryEnabledOnBgEmphasized() throws { + assertHomogeneity(inverseTheme.colorActionSecondaryEnabledOnBgEmphasized) } func testColorsHomogeneityColorActionSecondaryHover() throws { assertHomogeneity(inverseTheme.colorActionSecondaryHover) } - func testColorsHomogeneityColorActionSecondaryHoverOnBackgroundEmphasized() throws { - assertHomogeneity(inverseTheme.colorActionSecondaryHoverOnBackgroundEmphasized) + func testColorsHomogeneityColorActionSecondaryHoverOnBgEmphasized() throws { + assertHomogeneity(inverseTheme.colorActionSecondaryHoverOnBgEmphasized) } func testColorsHomogeneityColorActionSecondaryPressed() throws { assertHomogeneity(inverseTheme.colorActionSecondaryPressed) } - func testColorsHomogeneityColorActionSecondaryPressedOnBackgroundEmphasized() throws { - assertHomogeneity(inverseTheme.colorActionSecondaryPressedOnBackgroundEmphasized) + func testColorsHomogeneityColorActionSecondaryPressedOnBgEmphasized() throws { + assertHomogeneity(inverseTheme.colorActionSecondaryPressedOnBgEmphasized) } func testColorsHomogeneityColorActionSecondaryLoading() throws { assertHomogeneity(inverseTheme.colorActionSecondaryLoading) } - func testColorsHomogeneityColorActionSecondaryLoadingOnBackgroundEmphasized() throws { - assertHomogeneity(inverseTheme.colorActionSecondaryLoadingOnBackgroundEmphasized) + func testColorsHomogeneityColorActionSecondaryLoadingOnBgEmphasized() throws { + assertHomogeneity(inverseTheme.colorActionSecondaryLoadingOnBgEmphasized) } func testColorsHomogeneityColorActionSecondaryFocus() throws { assertHomogeneity(inverseTheme.colorActionSecondaryFocus) } - func testColorsHomogeneityColorActionSecondaryFocusOnBackgroundEmphasized() throws { - assertHomogeneity(inverseTheme.colorActionSecondaryFocusOnBackgroundEmphasized) + func testColorsHomogeneityColorActionSecondaryFocusOnBgEmphasized() throws { + assertHomogeneity(inverseTheme.colorActionSecondaryFocusOnBgEmphasized) } func testColorsHomogeneityColorActionNegativeEnabled() throws { @@ -479,106 +479,106 @@ final class TestInverseThemeColors: XCTestCase { assertHomogeneity(inverseTheme.colorActionNegativeFocus) } - func testColorsHomogeneityColorActionOnBackgroundActionDisabled() throws { - assertHomogeneity(inverseTheme.colorActionOnBackgroundActionDisabled) + func testColorsHomogeneityColorActionOnBgActionDisabled() throws { + assertHomogeneity(inverseTheme.colorActionOnBgActionDisabled) } - func testColorsHomogeneityColorActionOnBackgroundActionDisabledOnBackgroundEmphasized() throws { - assertHomogeneity(inverseTheme.colorActionOnBackgroundActionDisabledOnBackgroundEmphasized) + func testColorsHomogeneityColorActionOnBgActionDisabledOnBgEmphasized() throws { + assertHomogeneity(inverseTheme.colorActionOnBgActionDisabledOnBgEmphasized) } - func testColorsHomogeneityColorActionOnBackgroundActionNegative() throws { - assertHomogeneity(inverseTheme.colorActionOnBackgroundActionNegative) + func testColorsHomogeneityColorActionOnBgActionNegative() throws { + assertHomogeneity(inverseTheme.colorActionOnBgActionNegative) } - func testColorsHomogeneityColorActionOnBackgroundActionPrimaryEnabled() throws { - assertHomogeneity(inverseTheme.colorActionOnBackgroundActionPrimaryEnabled) + func testColorsHomogeneityColorActionOnBgActionPrimaryEnabled() throws { + assertHomogeneity(inverseTheme.colorActionOnBgActionPrimaryEnabled) } - func testColorsHomogeneityColorActionOnBackgroundActionPrimaryEnabledOnBackgroundEmphasized() throws { - assertHomogeneity(inverseTheme.colorActionOnBackgroundActionPrimaryEnabledOnBackgroundEmphasized) + func testColorsHomogeneityColorActionOnBgActionPrimaryEnabledOnBgEmphasized() throws { + assertHomogeneity(inverseTheme.colorActionOnBgActionPrimaryEnabledOnBgEmphasized) } - func testColorsHomogeneityColorActionOnBackgroundActionPrimaryHover() throws { - assertHomogeneity(inverseTheme.colorActionOnBackgroundActionPrimaryHover) + func testColorsHomogeneityColorActionOnBgActionPrimaryHover() throws { + assertHomogeneity(inverseTheme.colorActionOnBgActionPrimaryHover) } - func testColorsHomogeneityColorActionOnBackgroundActionPrimaryHoverOnBackgroundEmphasized() throws { - assertHomogeneity(inverseTheme.colorActionOnBackgroundActionPrimaryHoverOnBackgroundEmphasized) + func testColorsHomogeneityColorActionOnBgActionPrimaryHoverOnBgEmphasized() throws { + assertHomogeneity(inverseTheme.colorActionOnBgActionPrimaryHoverOnBgEmphasized) } - func testColorsHomogeneityColorActionOnBackgroundActionPrimaryPressed() throws { - assertHomogeneity(inverseTheme.colorActionOnBackgroundActionPrimaryPressed) + func testColorsHomogeneityColorActionOnBgActionPrimaryPressed() throws { + assertHomogeneity(inverseTheme.colorActionOnBgActionPrimaryPressed) } - func testColorsHomogeneityColorActionOnBackgroundActionPrimaryPressedOnBackgroundEmphasized() throws { - assertHomogeneity(inverseTheme.colorActionOnBackgroundActionPrimaryPressedOnBackgroundEmphasized) + func testColorsHomogeneityColorActionOnBgActionPrimaryPressedOnBgEmphasized() throws { + assertHomogeneity(inverseTheme.colorActionOnBgActionPrimaryPressedOnBgEmphasized) } - func testColorsHomogeneityColorActionOnBackgroundActionPrimaryLoading() throws { - assertHomogeneity(inverseTheme.colorActionOnBackgroundActionPrimaryLoading) + func testColorsHomogeneityColorActionOnBgActionPrimaryLoading() throws { + assertHomogeneity(inverseTheme.colorActionOnBgActionPrimaryLoading) } - func testColorsHomogeneityColorActionOnBackgroundActionPrimaryLoadingOnBackgroundEmphasized() throws { - assertHomogeneity(inverseTheme.colorActionOnBackgroundActionPrimaryLoadingOnBackgroundEmphasized) + func testColorsHomogeneityColorActionOnBgActionPrimaryLoadingOnBgEmphasized() throws { + assertHomogeneity(inverseTheme.colorActionOnBgActionPrimaryLoadingOnBgEmphasized) } - func testColorsHomogeneityColorActionOnBackgroundActionPrimaryFocus() throws { - assertHomogeneity(inverseTheme.colorActionOnBackgroundActionPrimaryFocus) + func testColorsHomogeneityColorActionOnBgActionPrimaryFocus() throws { + assertHomogeneity(inverseTheme.colorActionOnBgActionPrimaryFocus) } - func testColorsHomogeneityColorActionOnBackgroundActionPrimaryFocusOnBackgroundEmphasized() throws { - assertHomogeneity(inverseTheme.colorActionOnBackgroundActionPrimaryFocusOnBackgroundEmphasized) + func testColorsHomogeneityColorActionOnBgActionPrimaryFocusOnBgEmphasized() throws { + assertHomogeneity(inverseTheme.colorActionOnBgActionPrimaryFocusOnBgEmphasized) } // In InverseTheme token not implemented yet -// func testColorsHomogeneityColorActionOnBackgroundActionSecondaryEnabled() throws { -// assertHomogeneity(inverseTheme.colorActionOnBackgroundActionSecondaryEnabled) +// func testColorsHomogeneityColorActionOnBgActionSecondaryEnabled() throws { +// assertHomogeneity(inverseTheme.colorActionOnBgActionSecondaryEnabled) // } // In InverseTheme token not implemented yet -// func testColorsHomogeneityColorActionOnBackgroundActionSecondaryEnabledOnBackgroundEmphasized() throws { -// assertHomogeneity(inverseTheme.colorActionOnBackgroundActionSecondaryEnabledOnBackgroundEmphasized) +// func testColorsHomogeneityColorActionOnBgActionSecondaryEnabledOnBgEmphasized() throws { +// assertHomogeneity(inverseTheme.colorActionOnBgActionSecondaryEnabledOnBgEmphasized) // } // In InverseTheme token not implemented yet -// func testColorsHomogeneityColorActionOnBackgroundActionSecondaryHover() throws { -// assertHomogeneity(inverseTheme.colorActionOnBackgroundActionSecondaryHover) +// func testColorsHomogeneityColorActionOnBgActionSecondaryHover() throws { +// assertHomogeneity(inverseTheme.colorActionOnBgActionSecondaryHover) // } // In InverseTheme token not implemented yet -// func testColorsHomogeneityColorActionOnBackgroundActionSecondaryHoverOnBackgroundEmphasized() throws { -// assertHomogeneity(inverseTheme.colorActionOnBackgroundActionSecondaryHoverOnBackgroundEmphasized) +// func testColorsHomogeneityColorActionOnBgActionSecondaryHoverOnBgEmphasized() throws { +// assertHomogeneity(inverseTheme.colorActionOnBgActionSecondaryHoverOnBgEmphasized) // } // In InverseTheme token not implemented yet -// func testColorsHomogeneityColorActionOnBackgroundActionSecondaryPressed() throws { -// assertHomogeneity(inverseTheme.colorActionOnBackgroundActionSecondaryPressed) +// func testColorsHomogeneityColorActionOnBgActionSecondaryPressed() throws { +// assertHomogeneity(inverseTheme.colorActionOnBgActionSecondaryPressed) // } // In InverseTheme token not implemented yet -// func testColorsHomogeneityColorActionOnBackgroundActionSecondaryPressedOnBackgroundEmphasized() throws { -// assertHomogeneity(inverseTheme.colorActionOnBackgroundActionSecondaryPressedOnBackgroundEmphasized) +// func testColorsHomogeneityColorActionOnBgActionSecondaryPressedOnBgEmphasized() throws { +// assertHomogeneity(inverseTheme.colorActionOnBgActionSecondaryPressedOnBgEmphasized) // } // In InverseTheme token not implemented yet -// func testColorsHomogeneityColorActionOnBackgroundActionSecondaryLoading() throws { -// assertHomogeneity(inverseTheme.colorActionOnBackgroundActionSecondaryLoading) +// func testColorsHomogeneityColorActionOnBgActionSecondaryLoading() throws { +// assertHomogeneity(inverseTheme.colorActionOnBgActionSecondaryLoading) // } // In InverseTheme token not implemented yet -// func testColorsHomogeneityColorActionOnBackgroundActionSecondaryLoadingOnBackgroundEmphasized() throws { -// assertHomogeneity(inverseTheme.colorActionOnBackgroundActionSecondaryLoadingOnBackgroundEmphasized) +// func testColorsHomogeneityColorActionOnBgActionSecondaryLoadingOnBgEmphasized() throws { +// assertHomogeneity(inverseTheme.colorActionOnBgActionSecondaryLoadingOnBgEmphasized) // } // In InverseTheme token not implemented yet -// func testColorsHomogeneityColorActionOnBackgroundActionSecondaryFocus() throws { -// assertHomogeneity(inverseTheme.colorActionOnBackgroundActionSecondaryFocus) +// func testColorsHomogeneityColorActionOnBgActionSecondaryFocus() throws { +// assertHomogeneity(inverseTheme.colorActionOnBgActionSecondaryFocus) // } // In InverseTheme token not implemented yet -// func testColorsHomogeneityColorActionOnBackgroundActionSecondaryFocusOnBackgroundEmphasized() throws { -// assertHomogeneity(inverseTheme.colorActionOnBackgroundActionSecondaryFocusOnBackgroundEmphasized) +// func testColorsHomogeneityColorActionOnBgActionSecondaryFocusOnBgEmphasized() throws { +// assertHomogeneity(inverseTheme.colorActionOnBgActionSecondaryFocusOnBgEmphasized) // } // MARK: Semantic token - Colors - Always @@ -611,32 +611,32 @@ final class TestInverseThemeColors: XCTestCase { assertHomogeneity(inverseTheme.colorAlwaysAccent) } - func testColorsHomogeneityColorAlwaysOnBackgroundBlack() throws { - assertHomogeneity(inverseTheme.colorAlwaysOnBackgroundBlack) + func testColorsHomogeneityColorAlwaysOnBgBlack() throws { + assertHomogeneity(inverseTheme.colorAlwaysOnBgBlack) } - func testColorsHomogeneityColorAlwaysOnBackgroundWhite() throws { - assertHomogeneity(inverseTheme.colorAlwaysOnBackgroundWhite) + func testColorsHomogeneityColorAlwaysOnBgWhite() throws { + assertHomogeneity(inverseTheme.colorAlwaysOnBgWhite) } - func testColorsHomogeneityColorAlwaysOnBackgroundWarning() throws { - assertHomogeneity(inverseTheme.colorAlwaysOnBackgroundWarning) + func testColorsHomogeneityColorAlwaysOnBgWarning() throws { + assertHomogeneity(inverseTheme.colorAlwaysOnBgWarning) } - func testColorsHomogeneityColorAlwaysOnBackgroundNegative() throws { - assertHomogeneity(inverseTheme.colorAlwaysOnBackgroundNegative) + func testColorsHomogeneityColorAlwaysOnBgNegative() throws { + assertHomogeneity(inverseTheme.colorAlwaysOnBgNegative) } - func testColorsHomogeneityColorAlwaysOnBackgroundPositive() throws { - assertHomogeneity(inverseTheme.colorAlwaysOnBackgroundPositive) + func testColorsHomogeneityColorAlwaysOnBgPositive() throws { + assertHomogeneity(inverseTheme.colorAlwaysOnBgPositive) } - func testColorsHomogeneityColorAlwaysOnBackgroundInfo() throws { - assertHomogeneity(inverseTheme.colorAlwaysOnBackgroundInfo) + func testColorsHomogeneityColorAlwaysOnBgInfo() throws { + assertHomogeneity(inverseTheme.colorAlwaysOnBgInfo) } - func testColorsHomogeneityColorAlwaysOnBackgroundAccent() throws { - assertHomogeneity(inverseTheme.colorAlwaysOnBackgroundAccent) + func testColorsHomogeneityColorAlwaysOnBgAccent() throws { + assertHomogeneity(inverseTheme.colorAlwaysOnBgAccent) } // MARK: Semantic token - Colors - Transparent @@ -651,48 +651,48 @@ final class TestInverseThemeColors: XCTestCase { assertHomogeneity(inverseTheme.colorElevationRaised) } - func testColorsHomogeneityColorElevationRaisedOnBackgroundSecondary() throws { - assertHomogeneity(inverseTheme.colorElevationRaisedOnBackgroundSecondary) + func testColorsHomogeneityColorElevationRaisedOnBgSecondary() throws { + assertHomogeneity(inverseTheme.colorElevationRaisedOnBgSecondary) } - func testColorsHomogeneityColorElevationRaisedOnBackgroundEmphasized() throws { - assertHomogeneity(inverseTheme.colorElevationRaisedOnBackgroundEmphasized) + func testColorsHomogeneityColorElevationRaisedOnBgEmphasized() throws { + assertHomogeneity(inverseTheme.colorElevationRaisedOnBgEmphasized) } func testColorsHomogeneityColorElevationDrag() throws { assertHomogeneity(inverseTheme.colorElevationDrag) } - func testColorsHomogeneityColorElevationDragOnBackgroundSecondary() throws { - assertHomogeneity(inverseTheme.colorElevationDragOnBackgroundSecondary) + func testColorsHomogeneityColorElevationDragOnBgSecondary() throws { + assertHomogeneity(inverseTheme.colorElevationDragOnBgSecondary) } - func testColorsHomogeneityColorElevationDragOnBackgroundEmphasized() throws { - assertHomogeneity(inverseTheme.colorElevationDragOnBackgroundEmphasized) + func testColorsHomogeneityColorElevationDragOnBgEmphasized() throws { + assertHomogeneity(inverseTheme.colorElevationDragOnBgEmphasized) } func testColorsHomogeneityColorElevationOverlayDefault() throws { assertHomogeneity(inverseTheme.colorElevationOverlayDefault) } - func testColorsHomogeneityColorElevationOverlayDefaultOnBackgroundSecondary() throws { - assertHomogeneity(inverseTheme.colorElevationOverlayDefaultOnBackgroundSecondary) + func testColorsHomogeneityColorElevationOverlayDefaultOnBgSecondary() throws { + assertHomogeneity(inverseTheme.colorElevationOverlayDefaultOnBgSecondary) } - func testColorsHomogeneityColorElevationOverlayDefaultOnBackgroundEmphasized() throws { - assertHomogeneity(inverseTheme.colorElevationOverlayDefaultOnBackgroundEmphasized) + func testColorsHomogeneityColorElevationOverlayDefaultOnBgEmphasized() throws { + assertHomogeneity(inverseTheme.colorElevationOverlayDefaultOnBgEmphasized) } func testColorsHomogeneityColorElevationOverlayEmphasized() throws { assertHomogeneity(inverseTheme.colorElevationOverlayEmphasized) } - func testColorsHomogeneityColorElevationOverlayEmphasizedOnBackgroundSecondary() throws { - assertHomogeneity(inverseTheme.colorElevationOverlayEmphasizedOnBackgroundSecondary) + func testColorsHomogeneityColorElevationOverlayEmphasizedOnBgSecondary() throws { + assertHomogeneity(inverseTheme.colorElevationOverlayEmphasizedOnBgSecondary) } - func testColorsHomogeneityColorElevationOverlayEmphasizedOnBackgroundEmphasized() throws { - assertHomogeneity(inverseTheme.colorElevationOverlayEmphasizedOnBackgroundEmphasized) + func testColorsHomogeneityColorElevationOverlayEmphasizedOnBgEmphasized() throws { + assertHomogeneity(inverseTheme.colorElevationOverlayEmphasizedOnBgEmphasized) } func testColorsHomogeneityColorElevationModal() throws { @@ -702,47 +702,17 @@ final class TestInverseThemeColors: XCTestCase { // MARK: Semantic token - Colors - Decorative func testColorsHomogeneityColorDecorativeBrandPrimary() throws { - assertHomogeneity(inverseTheme.colorDecorativeBrandPrimary) + assertHomogeneity(inverseTheme.colorDecorativePrimary) } - // In InverseTheme token not implemented yet -// func testColorsHomogeneityColorDecorativeBrandPrimaryMuted() throws { -// assertHomogeneity(inverseTheme.colorDecorativeBrandPrimaryMuted) -// } - - // In InverseTheme token not implemented yet -// func testColorsHomogeneityColorDecorativeBrandPrimaryEmphasized() throws { -// assertHomogeneity(inverseTheme.colorDecorativeBrandPrimaryEmphasized) -// } - func testColorsHomogeneityColorDecorativeSecondary() throws { assertHomogeneity(inverseTheme.colorDecorativeSecondary) } - // In InverseTheme token not implemented yet -// func testColorsHomogeneityColorDecorativeSecondaryMuted() throws { -// assertHomogeneity(inverseTheme.colorDecorativeSecondaryMuted) -// } - - // In InverseTheme token not implemented yet -// func testColorsHomogeneityColorDecorativeSecondaryEmphasized() throws { -// assertHomogeneity(inverseTheme.colorDecorativeSecondaryEmphasized) -// } - - func testColorsHomogeneityColorDecorativeBrandTertiary() throws { - assertHomogeneity(inverseTheme.colorDecorativeBrandTertiary) + func testColorsHomogeneityColorDecorativeTertiary() throws { + assertHomogeneity(inverseTheme.colorDecorativeTertiary) } - // In InverseTheme token not implemented yet -// func testColorsHomogeneityColorDecorativeBrandTertiaryMuted() throws { -// assertHomogeneity(inverseTheme.colorDecorativeBrandTertiaryMuted) -// } - - // In InverseTheme token not implemented yet -// func testColorsHomogeneityColorDecorativeBrandTertiaryEmphasized() throws { -// assertHomogeneity(inverseTheme.colorDecorativeBrandTertiaryEmphasized) -// } - func testColorsHomogeneityColorDecorativeNeutralMuted() throws { assertHomogeneity(inverseTheme.colorDecorativeNeutralMuted) } @@ -815,40 +785,40 @@ final class TestInverseThemeColors: XCTestCase { assertHomogeneity(inverseTheme.colorDecorativeAccent5Emphasized) } - func testColorsHomogeneityColorDecorativeSkintTint100() throws { - assertHomogeneity(inverseTheme.colorDecorativeSkintTint100) + func testColorsHomogeneityColorDecorativeSkinTint100() throws { + assertHomogeneity(inverseTheme.colorDecorativeSkinTint100) } - func testColorsHomogeneityColorDecorativeSkintTint200() throws { - assertHomogeneity(inverseTheme.colorDecorativeSkintTint200) + func testColorsHomogeneityColorDecorativeSkinTint200() throws { + assertHomogeneity(inverseTheme.colorDecorativeSkinTint200) } - func testColorsHomogeneityColorDecorativeSkintTint300() throws { - assertHomogeneity(inverseTheme.colorDecorativeSkintTint300) + func testColorsHomogeneityColorDecorativeSkinTint300() throws { + assertHomogeneity(inverseTheme.colorDecorativeSkinTint300) } - func testColorsHomogeneityColorDecorativeSkintTint400() throws { - assertHomogeneity(inverseTheme.colorDecorativeSkintTint400) + func testColorsHomogeneityColorDecorativeSkinTint400() throws { + assertHomogeneity(inverseTheme.colorDecorativeSkinTint400) } - func testColorsHomogeneityColorDecorativeSkintTint500() throws { - assertHomogeneity(inverseTheme.colorDecorativeSkintTint500) + func testColorsHomogeneityColorDecorativeSkinTint500() throws { + assertHomogeneity(inverseTheme.colorDecorativeSkinTint500) } - func testColorsHomogeneityColorDecorativeSkintTint600() throws { - assertHomogeneity(inverseTheme.colorDecorativeSkintTint600) + func testColorsHomogeneityColorDecorativeSkinTint600() throws { + assertHomogeneity(inverseTheme.colorDecorativeSkinTint600) } - func testColorsHomogeneityColorDecorativeSkintTint700() throws { - assertHomogeneity(inverseTheme.colorDecorativeSkintTint700) + func testColorsHomogeneityColorDecorativeSkinTint700() throws { + assertHomogeneity(inverseTheme.colorDecorativeSkinTint700) } - func testColorsHomogeneityColorDecorativeSkintTint800() throws { - assertHomogeneity(inverseTheme.colorDecorativeSkintTint800) + func testColorsHomogeneityColorDecorativeSkinTint800() throws { + assertHomogeneity(inverseTheme.colorDecorativeSkinTint800) } - func testColorsHomogeneityColorDecorativeSkintTint900() throws { - assertHomogeneity(inverseTheme.colorDecorativeSkintTint900) + func testColorsHomogeneityColorDecorativeSkinTint900() throws { + assertHomogeneity(inverseTheme.colorDecorativeSkinTint900) } // MARK: Semantic token - Colors - Chart diff --git a/OUDS/Core/Themes/Inverse/Tests/TestInverseThemeElevation.swift b/OUDS/Core/Themes/Inverse/Tests/TestInverseThemeElevation.swift index 6262cb9af..42af10f72 100644 --- a/OUDS/Core/Themes/Inverse/Tests/TestInverseThemeElevation.swift +++ b/OUDS/Core/Themes/Inverse/Tests/TestInverseThemeElevation.swift @@ -37,11 +37,6 @@ final class TestInverseThemeElevationColors: XCTestCase { XCTAssertEqual(inverseTheme.elevationColorStickyDefault.light, inverseTheme.elevationColorStickyDefault.dark) XCTAssertEqual(inverseTheme.elevationColorStickyEmphasized.light, inverseTheme.elevationColorStickyEmphasized.dark) XCTAssertEqual(inverseTheme.elevationColorStickyNavigationScrolled.light, inverseTheme.elevationColorStickyNavigationScrolled.dark) - XCTAssertEqual(inverseTheme.elevationColorFocus.light, inverseTheme.elevationColorFocus.dark) - } - - func testElevationEquality() throws { - XCTAssertEqual(inverseTheme.elevationFocus.light, inverseTheme.elevationFocus.dark) } } diff --git a/OUDS/Core/Themes/Orange/Sources/OrangeTheme+SemanticColorTokens.swift b/OUDS/Core/Themes/Orange/Sources/OrangeTheme+SemanticColorTokens.swift index 591d62c7a..697a3c4b6 100644 --- a/OUDS/Core/Themes/Orange/Sources/OrangeTheme+SemanticColorTokens.swift +++ b/OUDS/Core/Themes/Orange/Sources/OrangeTheme+SemanticColorTokens.swift @@ -25,16 +25,16 @@ extension OrangeTheme { // MARK: Semantic token - Colors - Background // NOTE: Defined here because use values available only in this Orange theme, open for InverseTheme overriding - override open var colorBackgroundTertiary: ColorSemanticToken { MultipleColorTokens(light: OrangeBrandColorRawTokens.colorWarmGray100, dark: OrangeBrandColorRawTokens.colorWarmGray900) } + override open var colorBgTertiary: ColorSemanticToken { MultipleColorTokens(light: OrangeBrandColorRawTokens.colorWarmGray100, dark: OrangeBrandColorRawTokens.colorWarmGray900) } // NOTE: Defined here because use values available only in this Orange theme, open for InverseTheme overriding - override open var colorBackgroundBrandPrimary: ColorSemanticToken { MultipleColorTokens(light: OrangeBrandColorRawTokens.colorOrange550, dark: OrangeBrandColorRawTokens.colorOrange500) } + override open var colorBgBrandPrimary: ColorSemanticToken { MultipleColorTokens(light: OrangeBrandColorRawTokens.colorOrange550, dark: OrangeBrandColorRawTokens.colorOrange500) } // NOTE: Defined here because use values available only in this Orange theme, open for InverseTheme overriding - override open var colorBackgroundStatusAccentMuted: ColorSemanticToken { MultipleColorTokens(light: OrangeBrandColorRawTokens.colorWarmGray100, dark: OrangeBrandColorRawTokens.colorWarmGray900) } + override open var colorBgStatusAccentMuted: ColorSemanticToken { MultipleColorTokens(light: OrangeBrandColorRawTokens.colorWarmGray100, dark: OrangeBrandColorRawTokens.colorWarmGray900) } // NOTE: Defined here because use values available only in this Orange theme, open for InverseTheme overriding - override open var colorBackgroundStatusAccentMutedOnBackgroundEmphasized: ColorSemanticToken { MultipleColorTokens(OrangeBrandColorRawTokens.colorWarmGray900) } + override open var colorBgStatusAccentMutedOnBgEmphasized: ColorSemanticToken { MultipleColorTokens(OrangeBrandColorRawTokens.colorWarmGray900) } // MARK: Semantic token - Colors - Content @@ -44,7 +44,7 @@ extension OrangeTheme { // MARK: Semantic token - Colors - Border // NOTE: Defined here because use values available only in this Orange theme, open for InverseTheme overriding - override open var colorBorderBrandPrimaryOnBackgroundEmphasized: ColorSemanticToken { MultipleColorTokens(OrangeBrandColorRawTokens.colorOrange500) } + override open var colorBorderBrandPrimaryOnBgEmphasized: ColorSemanticToken { MultipleColorTokens(OrangeBrandColorRawTokens.colorOrange500) } // NOTE: Defined here because use values available only in this Orange theme, open for InverseTheme overriding override open var colorBorderBrandPrimary: ColorSemanticToken { MultipleColorTokens(light: OrangeBrandColorRawTokens.colorOrange550, dark: OrangeBrandColorRawTokens.colorOrange500) } @@ -55,30 +55,30 @@ extension OrangeTheme { override open var colorActionSelected: ColorSemanticToken { MultipleColorTokens(light: OrangeBrandColorRawTokens.colorOrange550, dark: OrangeBrandColorRawTokens.colorOrange500) } // NOTE: Defined here because use values available only in this Orange theme, open for InverseTheme overriding - override open var colorActionSelectedOnBackgroundEmphasized: ColorSemanticToken { MultipleColorTokens(OrangeBrandColorRawTokens.colorOrange500) } + override open var colorActionSelectedOnBgEmphasized: ColorSemanticToken { MultipleColorTokens(OrangeBrandColorRawTokens.colorOrange500) } // NOTE: Defined here because use values available only in this Orange theme, open for InverseTheme overriding override open var colorActionPrimaryPressed: ColorSemanticToken { MultipleColorTokens(light: OrangeBrandColorRawTokens.colorOrange550, dark: OrangeBrandColorRawTokens.colorOrange500) } // NOTE: Defined here because use values available only in this Orange theme, open for InverseTheme overriding - override open var colorActionPrimaryPressedOnBackgroundEmphasized: ColorSemanticToken { MultipleColorTokens(OrangeBrandColorRawTokens.colorOrange500) } + override open var colorActionPrimaryPressedOnBgEmphasized: ColorSemanticToken { MultipleColorTokens(OrangeBrandColorRawTokens.colorOrange500) } // NOTE: Defined here because use values available only in this Orange theme, open for InverseTheme overriding override open var colorActionPrimaryLoading: ColorSemanticToken { MultipleColorTokens(light: OrangeBrandColorRawTokens.colorOrange550, dark: OrangeBrandColorRawTokens.colorOrange500) } // NOTE: Defined here because use values available only in this Orange theme, open for InverseTheme overriding - override open var colorActionPrimaryLoadingOnBackgroundEmphasized: ColorSemanticToken { MultipleColorTokens(OrangeBrandColorRawTokens.colorOrange500) } + override open var colorActionPrimaryLoadingOnBgEmphasized: ColorSemanticToken { MultipleColorTokens(OrangeBrandColorRawTokens.colorOrange500) } // NOTE: Defined here because use values available only in this Orange theme, open for InverseTheme overriding override open var colorActionPrimaryFocus: ColorSemanticToken { MultipleColorTokens(light: ColorRawTokens.colorFunctionalDarkGray400, dark: ColorRawTokens.colorFunctionalLightGray400) } // NOTE: Defined here because use values available only in this Orange theme, open for InverseTheme overriding - override open var colorActionPrimaryFocusOnBackgroundEmphasized: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalLightGray400) } + override open var colorActionPrimaryFocusOnBgEmphasized: ColorSemanticToken { MultipleColorTokens(ColorRawTokens.colorFunctionalLightGray400) } // MARK: Semantic token - Colors - Elevation // NOTE: Defined here because use values available only in this Orange theme, open for InverseTheme overriding - override open var colorDecorativeBrandPrimary: ColorSemanticToken { MultipleColorTokens(OrangeBrandColorRawTokens.colorOrange500) } + override open var colorDecorativePrimary: ColorSemanticToken { MultipleColorTokens(OrangeBrandColorRawTokens.colorOrange500) } // MARK: Semantic token - Colors - Chart diff --git a/OUDS/Core/Themes/Orange/Sources/OrangeTheme.swift b/OUDS/Core/Themes/Orange/Sources/OrangeTheme.swift index 371c1a3dc..293368bec 100644 --- a/OUDS/Core/Themes/Orange/Sources/OrangeTheme.swift +++ b/OUDS/Core/Themes/Orange/Sources/OrangeTheme.swift @@ -15,7 +15,7 @@ import OUDS /// This is an override of the default basic `OUDSTheme` and should be seen as the default theme for the OUDS library. /// It can overrides any properties from its superclass, and can be derived too. -open class OrangeTheme: OUDSTheme { +open class OrangeTheme: OUDSTheme, @unchecked Sendable { deinit { } diff --git a/OUDS/Core/Themes/Orange/Sources/Values/OrangeBrandColorRawTokens+Values.swift b/OUDS/Core/Themes/Orange/Sources/Values/OrangeBrandColorRawTokens+Values.swift index 7b5ae9957..0a660447d 100644 --- a/OUDS/Core/Themes/Orange/Sources/Values/OrangeBrandColorRawTokens+Values.swift +++ b/OUDS/Core/Themes/Orange/Sources/Values/OrangeBrandColorRawTokens+Values.swift @@ -2,26 +2,20 @@ // 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 +// Software description: A SwiftUI components library with code examples for Orange Unified Design System // import OUDSTokensRaw -// ଘ( ・ω・)_/゚・:*:・。☆ -// [File to generate with the tokenator] - // swiftlint:disable missing_docs extension OrangeBrandColorRawTokens { - - // MARK: Primitive token - Colors - Orange - Orange - public static let colorOrange50: ColorOrangeBrandRawToken = "#FFF2E6" public static let colorOrange100: ColorOrangeBrandRawToken = "#FFD5B0" public static let colorOrange200: ColorOrangeBrandRawToken = "#FFC18A" @@ -33,9 +27,6 @@ extension OrangeBrandColorRawTokens { public static let colorOrange700: ColorOrangeBrandRawToken = "#B55600" public static let colorOrange800: ColorOrangeBrandRawToken = "#8C4300" public static let colorOrange900: ColorOrangeBrandRawToken = "#6B3300" - - // MARK: Primitive token - Colors - Orange - Warm gray - public static let colorWarmGray100: ColorOrangeBrandRawToken = "#F9F5F0" public static let colorWarmGray200: ColorOrangeBrandRawToken = "#E9DDCE" public static let colorWarmGray300: ColorOrangeBrandRawToken = "#D6C4AE" diff --git a/OUDS/Core/Tokens/ComponentTokens/Sources/Values/ButtonsComponentTokens.swift b/OUDS/Core/Tokens/ComponentTokens/Sources/Values/ButtonsComponentTokens.swift index af095e648..16af56809 100644 --- a/OUDS/Core/Tokens/ComponentTokens/Sources/Values/ButtonsComponentTokens.swift +++ b/OUDS/Core/Tokens/ComponentTokens/Sources/Values/ButtonsComponentTokens.swift @@ -25,7 +25,7 @@ public protocol ButtonsComponentTokens { 2. Maybe a composite tokens should be defined and used to gather all these atomic semantic tokens */ - var buttonInternalSpacing: SpacingPaddingInlineSemanticToken { get } + var buttonInternalSpacing: SpacePaddingInlineSemanticToken { get } var buttonBorderStyle: BorderStyleSemanticToken { get } var buttonBorderColor: ColorSemanticToken { get } @@ -35,8 +35,8 @@ public protocol ButtonsComponentTokens { var buttonForegroundColor: ColorSemanticToken { get } var buttonBackgroundColor: ColorSemanticToken { get } - var buttonWidth: SizingSemanticToken { get } - var buttonHeight: SizingSemanticToken { get } + var buttonWidth: SizeSemanticToken { get } + var buttonHeight: SizeSemanticToken { get } var buttonTypography: MultipleTypographyTokens { get } } diff --git a/OUDS/Core/Tokens/ComponentTokens/Sources/_OUDSTokensComponent.docc/OUDSTokensComponent.md b/OUDS/Core/Tokens/ComponentTokens/Sources/_OUDSTokensComponent.docc/OUDSTokensComponent.md index 51feb7d04..cd334cacb 100644 --- a/OUDS/Core/Tokens/ComponentTokens/Sources/_OUDSTokensComponent.docc/OUDSTokensComponent.md +++ b/OUDS/Core/Tokens/ComponentTokens/Sources/_OUDSTokensComponent.docc/OUDSTokensComponent.md @@ -7,65 +7,9 @@ These _tokens_ can be used to apply some style and configuration values to _comp Thus if a component need to change for example its _background color_, and if a _component token_ is used for it, then only the value of this _token_ should be changed without any modification on the _component_ definition. _Components_ use _component tokens_ exposed through the _theme_ to get their style values. -Example with a fake component named `FormsTextInputComponent` using component tokens in `FormsTextInputComponentTokens`: +We don't have any *component token* implemented yet. -```swift -// Declare component tokens -public protocol FormsTextInputComponentTokens { - var ftiTitleFontWeight: TypographyFontWeightSemanticToken { get } - var ftiTitleFontSize: TypographyFontSizeSemanticToken { get } - var ftiTitleColor: ColorSemanticToken { get } - - var ftiBorderColor: ColorSemanticToken { get } - var ftiBorderStyle: BorderStyleSemanticToken { get } - var ftiBorderWidth: BorderWidthSemanticToken { get } -} - -// Define the component tokens -extension OUDSTheme: FormsTextInputComponentTokens { - private static let defaultBlack: ColorSemanticToken = ColorRawTokens.colorFunctionalBlack - private static let defaultWhite: ColorSemanticToken = ColorRawTokens.colorFunctionalWhite - - @objc open var ftiTitleFontWeight: TypographyFontWeightSemanticToken { fontWeightHeading } - @objc open var ftiTitleFontSize: TypographyFontSizeSemanticToken { fontSizeLabelLarge } - @objc open var ftiTitleColor: ColorSemanticToken { colorContentBrandPrimaryLight ?? Self.defaultBlack } - - @objc open var ftiBorderColor: ColorSemanticToken { colorBorderEmphasizedLight ?? Self.defaultBlack } - @objc open var ftiBorderStyle: BorderStyleSemanticToken { borderStyleDefault } - @objc open var ftiBorderWidth: BorderWidthSemanticToken { borderWidthThin } -} - -// In the implementation of the component, the theme will be retrieved to get these component tokens -// The View - -struct OUDSFormsTextInput: View { - - // ... - @Environment(\.theme) var theme - - public var body: some View { - VStack(spacing: theme.spacePaddingBlockComponentTall) { - Label( - title: { - Text("Example of OUDSFormsTextInput") - .fontWeight(theme.ftiTitleFontWeight.fontWeight) - .font(.system(size: theme.ftiTitleFontSize)) - .foregroundColor(theme.ftiTitleColor.color) - }, - icon: { /*@START_MENU_TOKEN@*/Image(systemName: "42.circle")/*@END_MENU_TOKEN@*/ } - ) - Text("Write bellow some awesome text!") - .fontWeight(theme.ftiSubtitleFontWeight.fontWeight) - .font(.system(size: theme.ftiSubtitleFontSize)) - .foregroundColor(theme.ftiSubtitleColor.color) - TextField(placeholder, text: $value) - } - .padding(theme.spacePaddingBlockComponentTall) - .background(theme.ftiBorderColor.color(for: colorScheme)) - .border(theme.ftiBorderColor.color(for: colorScheme), width: theme.ftiBorderWidth) - } -} -``` +❗**More details coming soon.**❗ ## Topics diff --git a/OUDS/Core/Tokens/RawTokens/Sources/Composites/ElevationCompositeRawToken.swift b/OUDS/Core/Tokens/RawTokens/Sources/Composites/ElevationCompositeRawToken.swift index a7016fe5b..bf2ec32c1 100644 --- a/OUDS/Core/Tokens/RawTokens/Sources/Composites/ElevationCompositeRawToken.swift +++ b/OUDS/Core/Tokens/RawTokens/Sources/Composites/ElevationCompositeRawToken.swift @@ -15,7 +15,7 @@ import Foundation /// In the global design system, composite tokens are defined for elevation effects. /// It is defined as a `final class` and `NSObject` so as to be shared through `@objc` with extensions and protocols within modules. -public final class ElevationCompositeRawToken: NSObject { // For @objc compatibility +public final class ElevationCompositeRawToken: NSObject, Sendable { // NSObject for @objc compatibility /// The X offset for the elevation public let x: ElevationRawToken diff --git a/OUDS/Core/Tokens/RawTokens/Sources/Composites/TypographyCompositeRawToken.swift b/OUDS/Core/Tokens/RawTokens/Sources/Composites/TypographyCompositeRawToken.swift index 4418d77e8..228db285a 100644 --- a/OUDS/Core/Tokens/RawTokens/Sources/Composites/TypographyCompositeRawToken.swift +++ b/OUDS/Core/Tokens/RawTokens/Sources/Composites/TypographyCompositeRawToken.swift @@ -18,7 +18,7 @@ infix operator <| /// Composite raw tokens are here to pack a set of specific values according to the global design system tool. /// Here a *typography* is finaly defined by some specific values. -public struct TypographyCompositeRawToken: Equatable { +public struct TypographyCompositeRawToken: Equatable, Sendable { // Font family is not included here because this is the only thing which can vary diff --git a/OUDS/Core/Tokens/RawTokens/Sources/Values/BorderRawTokens+Values.swift b/OUDS/Core/Tokens/RawTokens/Sources/Values/BorderRawTokens+Values.swift index 5c1253c46..976a05194 100644 --- a/OUDS/Core/Tokens/RawTokens/Sources/Values/BorderRawTokens+Values.swift +++ b/OUDS/Core/Tokens/RawTokens/Sources/Values/BorderRawTokens+Values.swift @@ -2,57 +2,42 @@ // 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 +// Software description: A SwiftUI components library with code examples for Orange Unified Design System // -// ଘ( ・ω・)_/゚・:*:・。☆ -// [File to generate with the tokenator] - // swiftlint:disable missing_docs -/// Extracted in this separated file to help the *Figma* JSON to Swift parser to generate files to include easily. extension BorderRawTokens { - - /// Double type because used below for computations with Double values, output of the parser public static let borderBase: Double = 4 - - // MARK: Primitive token - Border - Width - - public static let borderWidth0: BorderWidthRawToken = borderBase * 0 - public static let borderWidth25: BorderWidthRawToken = borderBase * 0.25 - public static let borderWidth50: BorderWidthRawToken = borderBase * 0.5 - public static let borderWidth75: BorderWidthRawToken = borderBase * 0.75 - public static let borderWidth100: BorderWidthRawToken = borderBase * 1 - public static let borderWidth150: BorderWidthRawToken = borderBase * 1.5 - public static let borderWidth200: BorderWidthRawToken = borderBase * 2 - - // MARK: Primitive token - Border - Radius - - public static let borderRadius0: BorderRadiusRawToken = borderBase * 0 - public static let borderRadius25: BorderRadiusRawToken = borderBase * 0.25 - public static let borderRadius50: BorderRadiusRawToken = borderBase * 0.5 - public static let borderRadius75: BorderRadiusRawToken = borderBase * 0.75 - public static let borderRadius100: BorderRadiusRawToken = borderBase * 1 - public static let borderRadius150: BorderRadiusRawToken = borderBase * 1.5 - public static let borderRadius200: BorderRadiusRawToken = borderBase * 2 - public static let borderRadius300: BorderRadiusRawToken = borderBase * 3 - public static let borderRadius400: BorderRadiusRawToken = borderBase * 4 - public static let borderRadius500: BorderRadiusRawToken = borderBase * 5 - public static let borderRadius600: BorderRadiusRawToken = borderBase * 6 - public static let borderRadius800: BorderRadiusRawToken = borderBase * 8 - - // MARK: Primitive token - Border - Style - - public static let borderStyleNone: BorderStyleRawToken = "none" - public static let borderStyleSolid: BorderStyleRawToken = "solid" + public static let borderRadius0: BorderRadiusRawToken = borderBase * 0 // 0 + public static let borderRadius25: BorderRadiusRawToken = borderBase * 0.25 // 1 + public static let borderRadius50: BorderRadiusRawToken = borderBase * 0.5 // 2 + public static let borderRadius75: BorderRadiusRawToken = borderBase * 0.75 // 3 + public static let borderRadius100: BorderRadiusRawToken = borderBase * 1 // 4 + public static let borderRadius150: BorderRadiusRawToken = borderBase * 1.5 // 6 + public static let borderRadius200: BorderRadiusRawToken = borderBase * 2 // 8 + public static let borderRadius300: BorderRadiusRawToken = borderBase * 3 // 12 + public static let borderRadius400: BorderRadiusRawToken = borderBase * 4 // 16 + public static let borderRadius500: BorderRadiusRawToken = borderBase * 5 // 20 + public static let borderRadius600: BorderRadiusRawToken = borderBase * 6 // 24 + public static let borderRadius800: BorderRadiusRawToken = borderBase * 8 // 32 public static let borderStyleDashed: BorderStyleRawToken = "dashed" public static let borderStyleDotted: BorderStyleRawToken = "dotted" + public static let borderStyleNone: BorderStyleRawToken = "none" + public static let borderStyleSolid: BorderStyleRawToken = "solid" + public static let borderWidth0: BorderWidthRawToken = borderBase * 0 // 0 + public static let borderWidth25: BorderWidthRawToken = borderBase * 0.25 // 1 + public static let borderWidth50: BorderWidthRawToken = borderBase * 0.5 // 2 + public static let borderWidth75: BorderWidthRawToken = borderBase * 0.75 // 3 + public static let borderWidth100: BorderWidthRawToken = borderBase * 1 // 4 + public static let borderWidth150: BorderWidthRawToken = borderBase * 1.5 // 6 + public static let borderWidth200: BorderWidthRawToken = borderBase * 2 // 8 } // swiftlint:enable missing_docs diff --git a/OUDS/Core/Tokens/RawTokens/Sources/Values/ColorRawTokens+Values.swift b/OUDS/Core/Tokens/RawTokens/Sources/Values/ColorRawTokens+Values.swift index b0edabd4c..7d966debb 100644 --- a/OUDS/Core/Tokens/RawTokens/Sources/Values/ColorRawTokens+Values.swift +++ b/OUDS/Core/Tokens/RawTokens/Sources/Values/ColorRawTokens+Values.swift @@ -2,45 +2,73 @@ // 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 +// Software description: A SwiftUI components library with code examples for Orange Unified Design System // -// ଘ( ・ω・)_/゚・:*:・。☆ -// [File to generate with the tokenator] - // swiftlint:disable missing_docs -/// Extracted in a separated file to help the *Figma* JSON to Swift parser to generate files to include easily. extension ColorRawTokens { - - // MARK: Primitive token - Colors - Black, white - - public static let colorFunctionalWhite: ColorRawToken = "#FFFFFF" + public static let colorDecorativeAmber100: ColorRawToken = "#FFF0CC" + public static let colorDecorativeAmber200: ColorRawToken = "#FFE199" + public static let colorDecorativeAmber300: ColorRawToken = "#FFD266" + public static let colorDecorativeAmber400: ColorRawToken = "#FFC333" + public static let colorDecorativeAmber500: ColorRawToken = "#FFB400" + public static let colorDecorativeAmber600: ColorRawToken = "#CC9000" + public static let colorDecorativeAmber700: ColorRawToken = "#996C00" + public static let colorDecorativeAmber800: ColorRawToken = "#664800" + public static let colorDecorativeAmber900: ColorRawToken = "#332400" + public static let colorDecorativeAmethyst100: ColorRawToken = "#F1ECF9" + public static let colorDecorativeAmethyst200: ColorRawToken = "#E0D4F2" + public static let colorDecorativeAmethyst300: ColorRawToken = "#C5ADE6" + public static let colorDecorativeAmethyst400: ColorRawToken = "#A885D8" + public static let colorDecorativeAmethyst500: ColorRawToken = "#8D60CD" + public static let colorDecorativeAmethyst600: ColorRawToken = "#5B2F98" + public static let colorDecorativeAmethyst700: ColorRawToken = "#432371" + public static let colorDecorativeAmethyst800: ColorRawToken = "#2C174A" + public static let colorDecorativeAmethyst900: ColorRawToken = "#150B23" + public static let colorDecorativeDeepPeach100: ColorRawToken = "#FBEBDF" + public static let colorDecorativeDeepPeach200: ColorRawToken = "#F4CFB2" + public static let colorDecorativeDeepPeach300: ColorRawToken = "#E3B591" + public static let colorDecorativeDeepPeach400: ColorRawToken = "#C19372" + public static let colorDecorativeDeepPeach500: ColorRawToken = "#CF7E3F" + public static let colorDecorativeDeepPeach600: ColorRawToken = "#AA6631" + public static let colorDecorativeDeepPeach700: ColorRawToken = "#7E4F2A" + public static let colorDecorativeDeepPeach800: ColorRawToken = "#553720" + public static let colorDecorativeDeepPeach900: ColorRawToken = "#2E2014" + public static let colorDecorativeEmerald100: ColorRawToken = "#E5F5ED" + public static let colorDecorativeEmerald200: ColorRawToken = "#C0E8D4" + public static let colorDecorativeEmerald300: ColorRawToken = "#9BDABA" + public static let colorDecorativeEmerald400: ColorRawToken = "#75CCA1" + public static let colorDecorativeEmerald500: ColorRawToken = "#50BE87" + public static let colorDecorativeEmerald600: ColorRawToken = "#3BA06E" + public static let colorDecorativeEmerald700: ColorRawToken = "#2E7B54" + public static let colorDecorativeEmerald800: ColorRawToken = "#20563B" + public static let colorDecorativeEmerald900: ColorRawToken = "#123021" + public static let colorDecorativeShockingPink100: ColorRawToken = "#FFE5F6" + public static let colorDecorativeShockingPink200: ColorRawToken = "#FFB4E6" + public static let colorDecorativeShockingPink300: ColorRawToken = "#FF80D4" + public static let colorDecorativeShockingPink400: ColorRawToken = "#FF4DC3" + public static let colorDecorativeShockingPink500: ColorRawToken = "#FF1AB2" + public static let colorDecorativeShockingPink600: ColorRawToken = "#E50099" + public static let colorDecorativeShockingPink700: ColorRawToken = "#B20077" + public static let colorDecorativeShockingPink800: ColorRawToken = "#800055" + public static let colorDecorativeShockingPink900: ColorRawToken = "#4D0033" + public static let colorDecorativeSky100: ColorRawToken = "#D2ECF9" + public static let colorDecorativeSky200: ColorRawToken = "#A5DAF3" + public static let colorDecorativeSky300: ColorRawToken = "#79C7EC" + public static let colorDecorativeSky400: ColorRawToken = "#4AB4E6" + public static let colorDecorativeSky500: ColorRawToken = "#1FA2E0" + public static let colorDecorativeSky600: ColorRawToken = "#1982B3" + public static let colorDecorativeSky700: ColorRawToken = "#136186" + public static let colorDecorativeSky800: ColorRawToken = "#0C415A" + public static let colorDecorativeSky900: ColorRawToken = "#06202D" public static let colorFunctionalBlack: ColorRawToken = "#000000" - - // MARK: Primitive token - Colors - Functional light gray - - public static let colorFunctionalLightGray80: ColorRawToken = "#F4F4F4" - public static let colorFunctionalLightGray160: ColorRawToken = "#EEEEEE" - public static let colorFunctionalLightGray240: ColorRawToken = "#E0E0E0" - public static let colorFunctionalLightGray320: ColorRawToken = "#D6D6D6" - public static let colorFunctionalLightGray400: ColorRawToken = "#CCCCCC" - public static let colorFunctionalLightGray480: ColorRawToken = "#C2C2C2" - public static let colorFunctionalLightGray560: ColorRawToken = "#BBBBBB" - public static let colorFunctionalLightGray640: ColorRawToken = "#ADADAD" - public static let colorFunctionalLightGray720: ColorRawToken = "#A3A3A3" - public static let colorFunctionalLightGray800: ColorRawToken = "#999999" - public static let colorFunctionalLightGray880: ColorRawToken = "#8F8F8F" - public static let colorFunctionalLightGray960: ColorRawToken = "#858585" - - // MARK: Primitive token - Colors - Functional dark gray - public static let colorFunctionalDarkGray80: ColorRawToken = "#7A7A7A" public static let colorFunctionalDarkGray160: ColorRawToken = "#707070" public static let colorFunctionalDarkGray240: ColorRawToken = "#666666" @@ -53,9 +81,36 @@ extension ColorRawTokens { public static let colorFunctionalDarkGray800: ColorRawToken = "#1F1F1F" public static let colorFunctionalDarkGray880: ColorRawToken = "#141414" public static let colorFunctionalDarkGray960: ColorRawToken = "#0A0A0A" - - // MARK: Primitive token - Colors - Functional scarlet - + public static let colorFunctionalDodgerBlue100: ColorRawToken = "#F0FAFF" + public static let colorFunctionalDodgerBlue200: ColorRawToken = "#BDE7FF" + public static let colorFunctionalDodgerBlue300: ColorRawToken = "#8AD5FF" + public static let colorFunctionalDodgerBlue400: ColorRawToken = "#57C3FF" + public static let colorFunctionalDodgerBlue500: ColorRawToken = "#26B2FF" + public static let colorFunctionalDodgerBlue600: ColorRawToken = "#009BF0" + public static let colorFunctionalDodgerBlue700: ColorRawToken = "#007ABD" + public static let colorFunctionalDodgerBlue800: ColorRawToken = "#00598A" + public static let colorFunctionalDodgerBlue900: ColorRawToken = "#003857" + public static let colorFunctionalLightGray80: ColorRawToken = "#F4F4F4" + public static let colorFunctionalLightGray160: ColorRawToken = "#EEEEEE" + public static let colorFunctionalLightGray240: ColorRawToken = "#E0E0E0" + public static let colorFunctionalLightGray320: ColorRawToken = "#D6D6D6" + public static let colorFunctionalLightGray400: ColorRawToken = "#CCCCCC" + public static let colorFunctionalLightGray480: ColorRawToken = "#C2C2C2" + public static let colorFunctionalLightGray560: ColorRawToken = "#BBBBBB" + public static let colorFunctionalLightGray640: ColorRawToken = "#ADADAD" + public static let colorFunctionalLightGray720: ColorRawToken = "#A3A3A3" + public static let colorFunctionalLightGray800: ColorRawToken = "#999999" + public static let colorFunctionalLightGray880: ColorRawToken = "#8F8F8F" + public static let colorFunctionalLightGray960: ColorRawToken = "#858585" + public static let colorFunctionalMalachite100: ColorRawToken = "#EDFCF0" + public static let colorFunctionalMalachite200: ColorRawToken = "#C1F6CA" + public static let colorFunctionalMalachite300: ColorRawToken = "#94F0A4" + public static let colorFunctionalMalachite400: ColorRawToken = "#67E97E" + public static let colorFunctionalMalachite500: ColorRawToken = "#3DE35A" + public static let colorFunctionalMalachite600: ColorRawToken = "#1ECD3C" + public static let colorFunctionalMalachite700: ColorRawToken = "#17A02F" + public static let colorFunctionalMalachite800: ColorRawToken = "#0E621D" + public static let colorFunctionalMalachite900: ColorRawToken = "#0A4715" public static let colorFunctionalScarlet100: ColorRawToken = "#FFE5E6" public static let colorFunctionalScarlet200: ColorRawToken = "#FFB2B3" public static let colorFunctionalScarlet300: ColorRawToken = "#FF8081" @@ -65,117 +120,16 @@ extension ColorRawTokens { public static let colorFunctionalScarlet700: ColorRawToken = "#B20002" public static let colorFunctionalScarlet800: ColorRawToken = "#800001" public static let colorFunctionalScarlet900: ColorRawToken = "#4D0001" - - // MARK: Primitive token - Colors - Functional sun - public static let colorFunctionalSun100: ColorRawToken = "#FFF7D6" public static let colorFunctionalSun200: ColorRawToken = "#FFED99" public static let colorFunctionalSun300: ColorRawToken = "#FFE270" public static let colorFunctionalSun400: ColorRawToken = "#FFD73D" - public static let colorFunctionalSun500: ColorRawToken = "#FFD0D0" + public static let colorFunctionalSun500: ColorRawToken = "#FFD000" public static let colorFunctionalSun600: ColorRawToken = "#D6AA00" public static let colorFunctionalSun700: ColorRawToken = "#A38200" public static let colorFunctionalSun800: ColorRawToken = "#665100" public static let colorFunctionalSun900: ColorRawToken = "#3D3100" - - // MARK: Primitive token - Colors - Functional malachite - - public static let colorFunctionalMalachite100: ColorRawToken = "#EDFCF0" - public static let colorFunctionalMalachite200: ColorRawToken = "#C1F6CA" - public static let colorFunctionalMalachite300: ColorRawToken = "#94F0A4" - public static let colorFunctionalMalachite400: ColorRawToken = "#67E97E" - public static let colorFunctionalMalachite500: ColorRawToken = "#3DE35A" - public static let colorFunctionalMalachite600: ColorRawToken = "#1ECD3C" - public static let colorFunctionalMalachite700: ColorRawToken = "#17A02F" - public static let colorFunctionalMalachite800: ColorRawToken = "#0E621D" - public static let colorFunctionalMalachite900: ColorRawToken = "#0A4715" - - // MARK: Primitive token - Colors - Functional dodger blue - - public static let colorFunctionalDodgerBlue100: ColorRawToken = "#F0FAFF" - public static let colorFunctionalDodgerBlue200: ColorRawToken = "#BDE7FF" - public static let colorFunctionalDodgerBlue300: ColorRawToken = "#8AD5FF" - public static let colorFunctionalDodgerBlue400: ColorRawToken = "#57C3FF" - public static let colorFunctionalDodgerBlue500: ColorRawToken = "#26B2FF" - public static let colorFunctionalDodgerBlue600: ColorRawToken = "#009BF0" - public static let colorFunctionalDodgerBlue700: ColorRawToken = "#007ABD" - public static let colorFunctionalDodgerBlue800: ColorRawToken = "#00598A" - public static let colorFunctionalDodgerBlue900: ColorRawToken = "#003857" - - // MARK: Primitive token - Colors - Orange - Emerald - - public static let colorDecorativeEmerald100: ColorRawToken = "#E5F5ED" - public static let colorDecorativeEmerald200: ColorRawToken = "#C0E8DA" - public static let colorDecorativeEmerald300: ColorRawToken = "#9BDABA" - public static let colorDecorativeEmerald400: ColorRawToken = "#75CCA1" - public static let colorDecorativeEmerald500: ColorRawToken = "#50BE87" - public static let colorDecorativeEmerald600: ColorRawToken = "#3BA06E" - public static let colorDecorativeEmerald700: ColorRawToken = "#2E7B54" - public static let colorDecorativeEmerald800: ColorRawToken = "#20563B" - public static let colorDecorativeEmerald900: ColorRawToken = "#123021" - - // MARK: Primitive token - Colors - Orange - Sky - - public static let colorDecorativeSky100: ColorRawToken = "#D2ECF9" - public static let colorDecorativeSky200: ColorRawToken = "#A5DAF3" - public static let colorDecorativeSky300: ColorRawToken = "#79C7EC" - public static let colorDecorativeSky400: ColorRawToken = "#4AB4E6" - public static let colorDecorativeSky500: ColorRawToken = "#1FA2E0" - public static let colorDecorativeSky600: ColorRawToken = "#1982B3" - public static let colorDecorativeSky700: ColorRawToken = "#136186" - public static let colorDecorativeSky800: ColorRawToken = "#0C415A" - public static let colorDecorativeSky900: ColorRawToken = "#06202D" - - // MARK: Primitive token - Colors - Orange - Amber - - public static let colorDecorativeAmber100: ColorRawToken = "#FFF0CC" - public static let colorDecorativeAmber200: ColorRawToken = "#FFE199" - public static let colorDecorativeAmber300: ColorRawToken = "#FFD266" - public static let colorDecorativeAmber400: ColorRawToken = "#FFC333" - public static let colorDecorativeAmber500: ColorRawToken = "#FFB400" - public static let colorDecorativeAmber600: ColorRawToken = "#CC9000" - public static let colorDecorativeAmber700: ColorRawToken = "#996C00" - public static let colorDecorativeAmber800: ColorRawToken = "#664800" - public static let colorDecorativeAmber900: ColorRawToken = "#332400" - - // MARK: Primitive token - Colors - Orange - Amethyst - - public static let colorDecorativeAmethyst100: ColorRawToken = "#F1ECF9" - public static let colorDecorativeAmethyst200: ColorRawToken = "#E0D4F2" - public static let colorDecorativeAmethyst300: ColorRawToken = "#C5ADE6" - public static let colorDecorativeAmethyst400: ColorRawToken = "#A885D8" - public static let colorDecorativeAmethyst500: ColorRawToken = "#8D60CD" - public static let colorDecorativeAmethyst600: ColorRawToken = "#5B2F98" - public static let colorDecorativeAmethyst700: ColorRawToken = "#432371" - public static let colorDecorativeAmethyst800: ColorRawToken = "#2C174A" - public static let colorDecorativeAmethyst900: ColorRawToken = "#150B23" - - // MARK: Primitive token - Colors - Orange - Shocking Pink - - public static let colorDecorativeShockingPink100: ColorRawToken = "#FFE5F6" - public static let colorDecorativeShockingPink200: ColorRawToken = "#FFB4E6" - public static let colorDecorativeShockingPink300: ColorRawToken = "#FF80D4" - public static let colorDecorativeShockingPink400: ColorRawToken = "#FF4DC3" - public static let colorDecorativeShockingPink500: ColorRawToken = "#FF1AB2" - public static let colorDecorativeShockingPink600: ColorRawToken = "#E50099" - public static let colorDecorativeShockingPink700: ColorRawToken = "#B20077" - public static let colorDecorativeShockingPink800: ColorRawToken = "#800055" - public static let colorDecorativeShockingPink900: ColorRawToken = "#4D0033" - - // MARK: Primitive token - Colors - Orange - Deep Peach - - public static let colorDecorativeDeepPeach100: ColorRawToken = "#FBEBDF" - public static let colorDecorativeDeepPeach200: ColorRawToken = "#F4CFB2" - public static let colorDecorativeDeepPeach300: ColorRawToken = "#E3B591" - public static let colorDecorativeDeepPeach400: ColorRawToken = "#C19372" - public static let colorDecorativeDeepPeach500: ColorRawToken = "#CF7E3F" - public static let colorDecorativeDeepPeach600: ColorRawToken = "#AA6631" - public static let colorDecorativeDeepPeach700: ColorRawToken = "#7E4F2A" - public static let colorDecorativeDeepPeach800: ColorRawToken = "#553720" - public static let colorDecorativeDeepPeach900: ColorRawToken = "#2E2014" - - // MARK: Primitive token - Colors - Transparent black - + public static let colorFunctionalWhite: ColorRawToken = "#FFFFFF" public static let colorTransparentBlack0: ColorRawToken = apply(opacity: OpacityRawTokens.opacity0, on: colorFunctionalBlack) public static let colorTransparentBlack100: ColorRawToken = apply(opacity: OpacityRawTokens.opacity100, on: colorFunctionalBlack) public static let colorTransparentBlack200: ColorRawToken = apply(opacity: OpacityRawTokens.opacity200, on: colorFunctionalBlack) @@ -186,9 +140,6 @@ extension ColorRawTokens { public static let colorTransparentBlack700: ColorRawToken = apply(opacity: OpacityRawTokens.opacity700, on: colorFunctionalBlack) public static let colorTransparentBlack800: ColorRawToken = apply(opacity: OpacityRawTokens.opacity800, on: colorFunctionalBlack) public static let colorTransparentBlack900: ColorRawToken = apply(opacity: OpacityRawTokens.opacity900, on: colorFunctionalBlack) - - // MARK: Primitive token - Colors - Transparent white - public static let colorTransparentWhite0: ColorRawToken = apply(opacity: OpacityRawTokens.opacity0, on: colorFunctionalWhite) public static let colorTransparentWhite100: ColorRawToken = apply(opacity: OpacityRawTokens.opacity100, on: colorFunctionalWhite) public static let colorTransparentWhite200: ColorRawToken = apply(opacity: OpacityRawTokens.opacity200, on: colorFunctionalWhite) diff --git a/OUDS/Core/Tokens/RawTokens/Sources/Values/DimensionRawTokens+Values.swift b/OUDS/Core/Tokens/RawTokens/Sources/Values/DimensionRawTokens+Values.swift index 34afdfbf1..0b006a238 100644 --- a/OUDS/Core/Tokens/RawTokens/Sources/Values/DimensionRawTokens+Values.swift +++ b/OUDS/Core/Tokens/RawTokens/Sources/Values/DimensionRawTokens+Values.swift @@ -11,54 +11,45 @@ // Software description: A SwiftUI components library with code examples for Orange Unified Design System // -// ଘ( ・ω・)_/゚・:*:・。☆ -// [File to generate with the tokenator] - // swiftlint:disable missing_docs -/// Extracted in a separated file to help the *Figma* JSON to Swift parser to generate files to include easily. extension DimensionRawTokens { - - /// Double type because used below for computations with Double values, output of the parser public static let dimensionBase: Double = 4 - - // MARK: Primitive token - Dimension - - public static let dimension0: DimensionRawToken = dimensionBase * 0 - public static let dimension25: DimensionRawToken = dimensionBase * 0.5 - public static let dimension50: DimensionRawToken = dimensionBase * 1 - public static let dimension75: DimensionRawToken = dimensionBase * 1.5 - public static let dimension100: DimensionRawToken = dimensionBase * 2 - public static let dimension125: DimensionRawToken = dimensionBase * 2.5 - public static let dimension150: DimensionRawToken = dimensionBase * 3 - public static let dimension200: DimensionRawToken = dimensionBase * 4 - public static let dimension250: DimensionRawToken = dimensionBase * 5 - public static let dimension300: DimensionRawToken = dimensionBase * 6 - public static let dimension350: DimensionRawToken = dimensionBase * 7 - public static let dimension400: DimensionRawToken = dimensionBase * 8 - public static let dimension450: DimensionRawToken = dimensionBase * 9 - public static let dimension500: DimensionRawToken = dimensionBase * 10 - public static let dimension550: DimensionRawToken = dimensionBase * 11 - public static let dimension600: DimensionRawToken = dimensionBase * 12 - public static let dimension650: DimensionRawToken = dimensionBase * 13 - public static let dimension700: DimensionRawToken = dimensionBase * 14 - public static let dimension750: DimensionRawToken = dimensionBase * 15 - public static let dimension800: DimensionRawToken = dimensionBase * 16 - public static let dimension850: DimensionRawToken = dimensionBase * 17 - public static let dimension900: DimensionRawToken = dimensionBase * 18 - public static let dimension1000: DimensionRawToken = dimensionBase * 20 - public static let dimension1200: DimensionRawToken = dimensionBase * 24 - public static let dimension1400: DimensionRawToken = dimensionBase * 28 - public static let dimension1600: DimensionRawToken = dimensionBase * 32 - public static let dimension1800: DimensionRawToken = dimensionBase * 36 - public static let dimension2000: DimensionRawToken = dimensionBase * 40 - public static let dimension3000: DimensionRawToken = dimensionBase * 80 - public static let dimension4000: DimensionRawToken = dimensionBase * 120 - public static let dimension5000: DimensionRawToken = dimensionBase * 140 - public static let dimension6000: DimensionRawToken = dimensionBase * 160 - public static let dimension7000: DimensionRawToken = dimensionBase * 180 - public static let dimension9000: DimensionRawToken = dimensionBase * 220 - public static let dimension11000: DimensionRawToken = dimensionBase * 260 + public static let dimension0: DimensionRawToken = dimensionBase * 0 // 0 + public static let dimension25: DimensionRawToken = dimensionBase * 0.5 // 2 + public static let dimension50: DimensionRawToken = dimensionBase * 1 // 4 + public static let dimension75: DimensionRawToken = dimensionBase * 1.5 // 6 + public static let dimension100: DimensionRawToken = dimensionBase * 2 // 8 + public static let dimension125: DimensionRawToken = dimensionBase * 2.5 // 10 + public static let dimension150: DimensionRawToken = dimensionBase * 3 // 12 + public static let dimension200: DimensionRawToken = dimensionBase * 4 // 16 + public static let dimension250: DimensionRawToken = dimensionBase * 5 // 20 + public static let dimension300: DimensionRawToken = dimensionBase * 6 // 24 + public static let dimension350: DimensionRawToken = dimensionBase * 7 // 28 + public static let dimension400: DimensionRawToken = dimensionBase * 8 // 32 + public static let dimension450: DimensionRawToken = dimensionBase * 9 // 36 + public static let dimension500: DimensionRawToken = dimensionBase * 10 // 40 + public static let dimension550: DimensionRawToken = dimensionBase * 11 // 44 + public static let dimension600: DimensionRawToken = dimensionBase * 12 // 48 + public static let dimension650: DimensionRawToken = dimensionBase * 13 // 52 + public static let dimension700: DimensionRawToken = dimensionBase * 14 // 56 + public static let dimension750: DimensionRawToken = dimensionBase * 15 // 60 + public static let dimension800: DimensionRawToken = dimensionBase * 16 // 64 + public static let dimension850: DimensionRawToken = dimensionBase * 17 // 68 + public static let dimension900: DimensionRawToken = dimensionBase * 18 // 72 + public static let dimension1000: DimensionRawToken = dimensionBase * 20 // 80 + public static let dimension1200: DimensionRawToken = dimensionBase * 24 // 96 + public static let dimension1400: DimensionRawToken = dimensionBase * 28 // 112 + public static let dimension1600: DimensionRawToken = dimensionBase * 32 // 128 + public static let dimension1800: DimensionRawToken = dimensionBase * 36 // 144 + public static let dimension2000: DimensionRawToken = dimensionBase * 40 // 160 + public static let dimension3000: DimensionRawToken = dimensionBase * 80 // 320 + public static let dimension4000: DimensionRawToken = dimensionBase * 120 // 480 + public static let dimension5000: DimensionRawToken = dimensionBase * 140 // 560 + public static let dimension6000: DimensionRawToken = dimensionBase * 160 // 640 + public static let dimension7000: DimensionRawToken = dimensionBase * 180 // 720 + public static let dimension9000: DimensionRawToken = dimensionBase * 220 // 880 + public static let dimension11000: DimensionRawToken = dimensionBase * 260 // 1040 } // swiftlint:enable missing_docs diff --git a/OUDS/Core/Tokens/RawTokens/Sources/Values/ElevationRawTokens+Composites.swift b/OUDS/Core/Tokens/RawTokens/Sources/Values/ElevationRawTokens+Composites.swift index c0f40368b..63db830b0 100644 --- a/OUDS/Core/Tokens/RawTokens/Sources/Values/ElevationRawTokens+Composites.swift +++ b/OUDS/Core/Tokens/RawTokens/Sources/Values/ElevationRawTokens+Composites.swift @@ -12,11 +12,13 @@ // // ଘ( ・ω・)_/゚・:*:・。☆ -// [File to generate with the tokenator] +// [File to generate with the tokenator with Figma able to output composites and tokenatoer able to manage them] +// 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 -/// Extracted in a separated file because the the *Figma* JSON to Swift parser is not abale to process such composite tokens, and the *Figma* tool is not able to. +/// Extracted in a separated file because the *Figma* JSON to Swift, i.e. the *tokenator* parser is not able to process such composite tokens, and the *Figma* tool is not able to. /// /// **Beware, may result in desynchronization between generated raw tokens values and theses composite raw tokens** extension ElevationRawTokens { diff --git a/OUDS/Core/Tokens/RawTokens/Sources/Values/ElevationRawTokens+Values.swift b/OUDS/Core/Tokens/RawTokens/Sources/Values/ElevationRawTokens+Values.swift index 78d260723..73b8acf65 100644 --- a/OUDS/Core/Tokens/RawTokens/Sources/Values/ElevationRawTokens+Values.swift +++ b/OUDS/Core/Tokens/RawTokens/Sources/Values/ElevationRawTokens+Values.swift @@ -11,30 +11,9 @@ // Software description: A SwiftUI components library with code examples for Orange Unified Design System // -// ଘ( ・ω・)_/゚・:*:・。☆ -// [File to generate with the tokenator] - // swiftlint:disable missing_docs -/// Extracted in a separated file to help the *Figma* JSON to Swift parser to generate files to include easily. extension ElevationRawTokens { - - // MARK: Primitive token - Elevation - X - - public static let elevationX0: ElevationRawToken = 0 - - // MARK: Primitive token - Elevation - Y - - public static let elevationY0: ElevationRawToken = 0 - public static let elevationY100: ElevationRawToken = 1 - public static let elevationY200: ElevationRawToken = 2 - public static let elevationY300: ElevationRawToken = 4 - public static let elevationY400: ElevationRawToken = 8 - public static let elevationY500: ElevationRawToken = 12 - public static let elevationY600: ElevationRawToken = 20 - - // MARK: Primitive token - Elevation - Blur - public static let elevationBlur0: ElevationRawToken = 0 public static let elevationBlur100: ElevationRawToken = 1 public static let elevationBlur200: ElevationRawToken = 2 @@ -43,6 +22,14 @@ extension ElevationRawTokens { public static let elevationBlur500: ElevationRawToken = 8 public static let elevationBlur600: ElevationRawToken = 12 public static let elevationBlur700: ElevationRawToken = 20 + public static let elevationX0: ElevationRawToken = 0 + public static let elevationY0: ElevationRawToken = 0 + public static let elevationY100: ElevationRawToken = 1 + public static let elevationY200: ElevationRawToken = 2 + public static let elevationY300: ElevationRawToken = 4 + public static let elevationY400: ElevationRawToken = 8 + public static let elevationY500: ElevationRawToken = 12 + public static let elevationY600: ElevationRawToken = 20 } // swiftlint:enable missing_docs diff --git a/OUDS/Core/Tokens/RawTokens/Sources/Values/GridRawTokens+Values.swift b/OUDS/Core/Tokens/RawTokens/Sources/Values/GridRawTokens+Values.swift index b919ae8cc..874f3aa4e 100644 --- a/OUDS/Core/Tokens/RawTokens/Sources/Values/GridRawTokens+Values.swift +++ b/OUDS/Core/Tokens/RawTokens/Sources/Values/GridRawTokens+Values.swift @@ -13,6 +13,8 @@ // ଘ( ・ω・)_/゚・:*:・。☆ // [File to generate with 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 diff --git a/OUDS/Core/Tokens/RawTokens/Sources/Values/OpacityRawTokens+Values.swift b/OUDS/Core/Tokens/RawTokens/Sources/Values/OpacityRawTokens+Values.swift index 2a8f15ee1..20ddb1d34 100644 --- a/OUDS/Core/Tokens/RawTokens/Sources/Values/OpacityRawTokens+Values.swift +++ b/OUDS/Core/Tokens/RawTokens/Sources/Values/OpacityRawTokens+Values.swift @@ -11,16 +11,9 @@ // Software description: A SwiftUI components library with code examples for Orange Unified Design System // -// ଘ( ・ω・)_/゚・:*:・。☆ -// [File to generate with the tokenator] - // swiftlint:disable missing_docs -/// Extracted in a separated file to help the *Figma* JSON to Swift parser to generate files to include easily. extension OpacityRawTokens { - - // MARK: Primitive token - Opacity - public static let opacity0: OpacityRawToken = 0 public static let opacity100: OpacityRawToken = 0.04 public static let opacity200: OpacityRawToken = 0.08 @@ -29,7 +22,7 @@ extension OpacityRawTokens { public static let opacity500: OpacityRawToken = 0.32 public static let opacity600: OpacityRawToken = 0.48 public static let opacity700: OpacityRawToken = 0.64 - public static let opacity800: OpacityRawToken = 0.80 + public static let opacity800: OpacityRawToken = 0.8 public static let opacity900: OpacityRawToken = 1 } diff --git a/OUDS/Core/Tokens/RawTokens/Sources/Values/TypographyRawTokens+Composites.swift b/OUDS/Core/Tokens/RawTokens/Sources/Values/TypographyRawTokens+Composites.swift index 639b13d0c..734a9e74b 100644 --- a/OUDS/Core/Tokens/RawTokens/Sources/Values/TypographyRawTokens+Composites.swift +++ b/OUDS/Core/Tokens/RawTokens/Sources/Values/TypographyRawTokens+Composites.swift @@ -12,11 +12,13 @@ // // ଘ( ・ω・)_/゚・:*:・。☆ -// [File to generate with the tokenator] +// [File to generate with the tokenator with Figma able to output composites and tokenatoer able to manage them] +// 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 -/// Extracted in a separated file because the the *Figma* JSON to Swift parser is not abale to process such composite tokens, and the *Figma* tool is not able to. +/// Extracted in a separated file because the *Figma* JSON to Swift, i.e. the *tokenator* parser is not able to process such composite tokens, and the *Figma* tool is not able to. /// /// **Beware, may result in desynchronization between generated raw tokens values and theses composite raw tokens** extension TypographyRawTokens { diff --git a/OUDS/Core/Tokens/RawTokens/Sources/Values/TypographyRawTokens+Values.swift b/OUDS/Core/Tokens/RawTokens/Sources/Values/TypographyRawTokens+Values.swift index 1fe502f8e..5c9d7a8e5 100644 --- a/OUDS/Core/Tokens/RawTokens/Sources/Values/TypographyRawTokens+Values.swift +++ b/OUDS/Core/Tokens/RawTokens/Sources/Values/TypographyRawTokens+Values.swift @@ -13,6 +13,7 @@ // ଘ( ・ω・)_/゚・:*:・。☆ // [File to generate with the tokenator] +// WARNING: Not synchronized anymore with the Figjam / Figma by developers team // swiftlint:disable missing_docs diff --git a/OUDS/Core/Tokens/SemanticTokens/Sources/Multiples/MultipleColorTokens.swift b/OUDS/Core/Tokens/SemanticTokens/Sources/Multiples/MultipleColorTokens.swift index 7c75d8327..80f42a9ce 100644 --- a/OUDS/Core/Tokens/SemanticTokens/Sources/Multiples/MultipleColorTokens.swift +++ b/OUDS/Core/Tokens/SemanticTokens/Sources/Multiples/MultipleColorTokens.swift @@ -18,7 +18,7 @@ import SwiftUI /// Kind of semantic tokens which will wrap a combination of `ColorRawToken` depending to color scheme. /// Kind of composite token with multiple values, but not named "composite" because this word is already used in the design system. /// Allows to gather the multiple-value tokens from Figma inside one object. -public final class MultipleColorTokens: NSObject { +public final class MultipleColorTokens: NSObject, Sendable { /// For **light** mode scheme public let light: ColorRawToken diff --git a/OUDS/Core/Tokens/SemanticTokens/Sources/Multiples/MultipleElevationTokens.swift b/OUDS/Core/Tokens/SemanticTokens/Sources/Multiples/MultipleElevationTokens.swift index fb2b15bad..62785a24e 100644 --- a/OUDS/Core/Tokens/SemanticTokens/Sources/Multiples/MultipleElevationTokens.swift +++ b/OUDS/Core/Tokens/SemanticTokens/Sources/Multiples/MultipleElevationTokens.swift @@ -18,7 +18,7 @@ import SwiftUI /// Semantic tokens which will wrap a combination of `ElevationCompositeRawToken` depending to color scheme. /// Kind of composite token with multiple values, but not named "composite" because this word is already used in the design system. /// Allows to gather the multiple-value tokens from Figma inside one object. -public final class MultipleElevationTokens: NSObject { +public final class MultipleElevationTokens: NSObject, Sendable { /// For **light** mode scheme public let light: ElevationCompositeRawToken diff --git a/OUDS/Core/Tokens/SemanticTokens/Sources/Multiples/MultipleFontLetterSpacingTokens.swift b/OUDS/Core/Tokens/SemanticTokens/Sources/Multiples/MultipleFontLetterSpacingTokens.swift index afb99e1da..d83e40e44 100644 --- a/OUDS/Core/Tokens/SemanticTokens/Sources/Multiples/MultipleFontLetterSpacingTokens.swift +++ b/OUDS/Core/Tokens/SemanticTokens/Sources/Multiples/MultipleFontLetterSpacingTokens.swift @@ -16,7 +16,7 @@ import OUDSTokensRaw /// Kind of semantic tokens which will wrap a combination of `MultipleFontLetterSpacingTokens` depending to size classes. /// Allows to gather the multiple-value tokens from Figma inside one object. -public final class MultipleFontLetterSpacingTokens: NSObject { +public final class MultipleFontLetterSpacingTokens: NSObject, Sendable { /// For **extra-compact** and **compact** viewports public let compact: TypographyFontLetterSpacingSemanticToken diff --git a/OUDS/Core/Tokens/SemanticTokens/Sources/Multiples/MultipleFontLineHeightTokens.swift b/OUDS/Core/Tokens/SemanticTokens/Sources/Multiples/MultipleFontLineHeightTokens.swift index 20034aa22..8b5d8ebba 100644 --- a/OUDS/Core/Tokens/SemanticTokens/Sources/Multiples/MultipleFontLineHeightTokens.swift +++ b/OUDS/Core/Tokens/SemanticTokens/Sources/Multiples/MultipleFontLineHeightTokens.swift @@ -16,7 +16,7 @@ import OUDSTokensRaw /// Kind of semantic tokens which will wrap a combination of `TypographyFontLineHeightSemanticToken` depending to size classes. /// Allows to gather the multiple-value tokens from Figma inside one object. -public final class MultipleFontLineHeightTokens: NSObject { +public final class MultipleFontLineHeightTokens: NSObject, Sendable { /// For **extra-compact** and **compact** viewports public let compact: TypographyFontLineHeightSemanticToken diff --git a/OUDS/Core/Tokens/SemanticTokens/Sources/Multiples/MultipleFontSizeTokens.swift b/OUDS/Core/Tokens/SemanticTokens/Sources/Multiples/MultipleFontSizeTokens.swift index fd3b3506e..018a717ba 100644 --- a/OUDS/Core/Tokens/SemanticTokens/Sources/Multiples/MultipleFontSizeTokens.swift +++ b/OUDS/Core/Tokens/SemanticTokens/Sources/Multiples/MultipleFontSizeTokens.swift @@ -16,7 +16,7 @@ import OUDSTokensRaw /// Kind of semantic tokens which will wrap a combination of `TypographyFontSizeSemanticToken` depending to size classes. /// Allows to gather the multiple-value tokens from Figma inside one object. -public final class MultipleFontSizeTokens: NSObject { +public final class MultipleFontSizeTokens: NSObject, Sendable { /// For **extra-compact** and **compact** viewports public let compact: TypographyFontSizeSemanticToken diff --git a/OUDS/Core/Tokens/SemanticTokens/Sources/Multiples/MultipleSizingTokens.swift b/OUDS/Core/Tokens/SemanticTokens/Sources/Multiples/MultipleSizeTokens.swift similarity index 55% rename from OUDS/Core/Tokens/SemanticTokens/Sources/Multiples/MultipleSizingTokens.swift rename to OUDS/Core/Tokens/SemanticTokens/Sources/Multiples/MultipleSizeTokens.swift index a4228cc18..8e14b32dd 100644 --- a/OUDS/Core/Tokens/SemanticTokens/Sources/Multiples/MultipleSizingTokens.swift +++ b/OUDS/Core/Tokens/SemanticTokens/Sources/Multiples/MultipleSizeTokens.swift @@ -12,30 +12,31 @@ // import Foundation +import SwiftUICore -/// Kind of semantic tokens which will wrap a combination of `SizingSemanticToken` depending to viewports / size classes. +/// Kind of semantic tokens which will wrap a combination of `SizeSemanticToken` depending to viewports / size classes. /// Kind of composite token with multiple values, but not named "composite" because this word is already used in the design system. /// Allows to gather the multiple-value tokens from Figma inside one object. -public final class MultipleSizingTokens: NSObject { +public final class MultipleSizeTokens: NSObject, Sendable { /// For **extra-compact** and **compact** viewports - public let compact: SizingSemanticToken + public let compact: SizeSemanticToken /// For **regular** and **medium** viewports - public let regular: SizingSemanticToken + public let regular: SizeSemanticToken /// Initializes a new sizing composite semantic token. - /// - Parameter value: The `SizingSemanticToken` to apply if device in *compact* mode or *regular* mode - public init(_ value: SizingSemanticToken) { + /// - Parameter value: The `SizeSemanticToken` to apply if device in *compact* mode or *regular* mode + public init(_ value: SizeSemanticToken) { self.compact = value self.regular = value } /// Initializes a new sizing composite semantic token. /// - Parameters: - /// - compact: The `SizingSemanticToken` to apply if device in *compact* mode - /// - regular: The `SizingSemanticToken` to apply if device in *regular* mode - public init(compact: SizingSemanticToken, regular: SizingSemanticToken) { + /// - compact: The `SizeSemanticToken` to apply if device in *compact* mode + /// - regular: The `SizeSemanticToken` to apply if device in *regular* mode + public init(compact: SizeSemanticToken, regular: SizeSemanticToken) { self.compact = compact self.regular = regular } @@ -43,12 +44,19 @@ public final class MultipleSizingTokens: NSObject { deinit { } /// Returns `true` if `self` and `object` has the same `compact` and `regular` values and with `object` - /// as a `MultipleSizingTokens`. Otherwise returns `false`. + /// as a `MultipleSizeTokens`. Otherwise returns `false`. /// `isEqual` override is preferred for `NSObject`. override public func isEqual(_ object: Any?) -> Bool { - guard let other = object as? MultipleSizingTokens else { + guard let other = object as? MultipleSizeTokens else { return false } return self.compact == other.compact && self.regular == other.regular } + + /// Returns the right dimension according to the `userInterfaceSizeClass`. + /// - Parameter userInterfaceSizeClass: The user interface size class (could be the horizontal or the vertical size class) + /// - Returns: The right size semantic token (pointing to the dimension raw token to use) + public func dimension(for userInterfaceSizeClass: UserInterfaceSizeClass) -> SizeSemanticToken { + userInterfaceSizeClass == .compact ? compact : regular + } } diff --git a/OUDS/Core/Tokens/SemanticTokens/Sources/Multiples/MultipleSpacingTokens.swift b/OUDS/Core/Tokens/SemanticTokens/Sources/Multiples/MultipleSpaceTokens.swift similarity index 90% rename from OUDS/Core/Tokens/SemanticTokens/Sources/Multiples/MultipleSpacingTokens.swift rename to OUDS/Core/Tokens/SemanticTokens/Sources/Multiples/MultipleSpaceTokens.swift index 7e6a62084..b27101e9e 100644 --- a/OUDS/Core/Tokens/SemanticTokens/Sources/Multiples/MultipleSpacingTokens.swift +++ b/OUDS/Core/Tokens/SemanticTokens/Sources/Multiples/MultipleSpaceTokens.swift @@ -13,12 +13,12 @@ import Foundation import OUDSTokensRaw -import SwiftUI +import SwiftUICore /// Kind of semantic tokens which will wrap a combination of `DimensionRawToken` depending to size classes. /// Kind of composite token with multiple values, but not named "composite" because this word is already used in the design system. /// Allows to gather the multiple-value tokens from Figma inside one object. -public final class MultipleSpacingTokens: NSObject { +public final class MultipleSpaceTokens: NSObject, Sendable { /// For **extra-compact** and **compact** viewports public let compact: DimensionRawToken @@ -38,10 +38,10 @@ public final class MultipleSpacingTokens: NSObject { deinit { } /// Returns `true` if `self` and `object` has the same `compact` and `regular` values and with `object` - /// as a `MultipleSpacingTokens`. Otherwise returns `false`. + /// as a `MultipleSpaceTokens`. Otherwise returns `false`. /// `isEqual` override is preferred for `NSObject`. override public func isEqual(_ object: Any?) -> Bool { - guard let other = object as? MultipleSpacingTokens else { return false } + guard let other = object as? MultipleSpaceTokens else { return false } return self.compact == other.compact && self.regular == other.regular } diff --git a/OUDS/Core/Tokens/SemanticTokens/Sources/Multiples/MultipleTypographyTokens.swift b/OUDS/Core/Tokens/SemanticTokens/Sources/Multiples/MultipleTypographyTokens.swift index 47d3b20ae..a3f4c4bf7 100644 --- a/OUDS/Core/Tokens/SemanticTokens/Sources/Multiples/MultipleTypographyTokens.swift +++ b/OUDS/Core/Tokens/SemanticTokens/Sources/Multiples/MultipleTypographyTokens.swift @@ -11,13 +11,13 @@ // Software description: A SwiftUI components library with code examples for Orange Unified Design System // -import Foundation import OUDSTokensRaw +import SwiftUICore /// Kind of semantic tokens which will wrap a combination of `TypographyCompositeRawToken` depending to size classes. /// Kind of composite token with multiple values, but not named "composite" because this word is already used in the design system. /// Allows to gather the multiple-value tokens from Figma inside one object. -public final class MultipleTypographyTokens: NSObject { +public final class MultipleTypographyTokens: NSObject, Sendable { /// For **extra-compact** and **compact** viewports public let compact: TypographyCompositeRawToken @@ -50,4 +50,11 @@ public final class MultipleTypographyTokens: NSObject { guard let object = object as? MultipleTypographyTokens else { return false } return self.compact == object.compact && self.regular == object.regular } + + /// Returns the composite raw token of typography to use according to the `userInterfaceSizeClass` (i.e. `compact` or `regular`) + /// - Parameter userInterfaceSizeClass: The user interface size class + /// - Returns: The composite raw token to use (of type `TypographyCompositeRawToken`) + public func typographyToken(for userInterfaceSizeClass: UserInterfaceSizeClass) -> TypographyCompositeRawToken { + userInterfaceSizeClass == .compact ? compact : regular + } } diff --git a/OUDS/Core/Tokens/SemanticTokens/Sources/TypeAliases/ColorSemanticTokens+Aliases.swift b/OUDS/Core/Tokens/SemanticTokens/Sources/TypeAliases/ColorSemanticTokens+Aliases.swift index 1f445e90d..cb269c21e 100644 --- a/OUDS/Core/Tokens/SemanticTokens/Sources/TypeAliases/ColorSemanticTokens+Aliases.swift +++ b/OUDS/Core/Tokens/SemanticTokens/Sources/TypeAliases/ColorSemanticTokens+Aliases.swift @@ -11,7 +11,5 @@ // Software description: A SwiftUI components library with code examples for Orange Unified Design System // -import OUDSTokensRaw - -/// Basically a semantic color token, which can be either a functional or a decorative token, is a `String`, to keep grammar clean and clear with design system grammar. +/// Basically a color semantic token is a paire of `ColorRawToken` to use for light or dark color scheme, packed in a `MultipleColorTokens` object public typealias ColorSemanticToken = MultipleColorTokens diff --git a/OUDS/Core/Tokens/SemanticTokens/Sources/TypeAliases/ElevationSemanticTokens+Aliases.swift b/OUDS/Core/Tokens/SemanticTokens/Sources/TypeAliases/ElevationSemanticTokens+Aliases.swift index 9b6130329..eee9c6455 100644 --- a/OUDS/Core/Tokens/SemanticTokens/Sources/TypeAliases/ElevationSemanticTokens+Aliases.swift +++ b/OUDS/Core/Tokens/SemanticTokens/Sources/TypeAliases/ElevationSemanticTokens+Aliases.swift @@ -22,8 +22,10 @@ public typealias ElevationYSemanticToken = ElevationRawToken /// Basically an elevation semantic token for blur effect is a raw token for elevation, with the same final type, to keep grammar clean and clear with design system grammar. public typealias ElevationBlurSemanticToken = ElevationRawToken -/// Basically an elevation semantic token for shadow colors is a raw token for colors, to keep grammar clean and clear with design system grammar. +/// Basically an elevation color semantic token, used mainly for shadow colors, is a pair of color raw tokens. +/// A `MultipleColorTokens` contains `ColorRawToken` for light and dark modes. public typealias ElevationColorSemanticToken = MultipleColorTokens -/// Basically an elevation semantic token for box shadow is a raw token for box shadow, with the same final type, to keep grammar clean and clear with design system grammar. +/// Basically an elevationcomposite semantic token, used mainly for box shadow, is a pair of elevation composite raw tokens used depending to the color scheme. +/// A `MultipleElevationTokens` contains `ElevationCompositeRawToken` objects for light and dark modes, which contains `ElevationRawToken` and `ColorRawToken` values. public typealias ElevationCompositeSemanticToken = MultipleElevationTokens diff --git a/OUDS/Core/Tokens/SemanticTokens/Sources/TypeAliases/GridSemanticTokens+Aliases.swift b/OUDS/Core/Tokens/SemanticTokens/Sources/TypeAliases/GridSemanticTokens+Aliases.swift index 045ecb7ec..7412db3a1 100644 --- a/OUDS/Core/Tokens/SemanticTokens/Sources/TypeAliases/GridSemanticTokens+Aliases.swift +++ b/OUDS/Core/Tokens/SemanticTokens/Sources/TypeAliases/GridSemanticTokens+Aliases.swift @@ -19,5 +19,5 @@ public typealias GridExtraCompactSemanticToken = GridRawToken /// Basically a grid semantic token for iOS Compact values is a grid raw token, to keep grammar clean and clear with design system grammar. public typealias GridCompactSemanticToken = GridRawToken -/// Basically a grid semantic token for iOS Regulard values is a grid raw token, to keep grammar clean and clear with design system grammar. +/// Basically a grid semantic token for iOS Regular values is a grid raw token, to keep grammar clean and clear with design system grammar. public typealias GridRegularSemanticToken = GridRawToken diff --git a/OUDS/Core/Tokens/SemanticTokens/Sources/TypeAliases/SizingSemanticTokens+Aliases.swift b/OUDS/Core/Tokens/SemanticTokens/Sources/TypeAliases/SizingSemanticTokens+Aliases.swift index 3be331526..371fc50cd 100644 --- a/OUDS/Core/Tokens/SemanticTokens/Sources/TypeAliases/SizingSemanticTokens+Aliases.swift +++ b/OUDS/Core/Tokens/SemanticTokens/Sources/TypeAliases/SizingSemanticTokens+Aliases.swift @@ -13,5 +13,6 @@ import OUDSTokensRaw -/// Basically a size semantic token for width and height is a dimension raw token, it has the same final type, to keep grammar clean and clear with design system grammar. -public typealias SizingSemanticToken = DimensionRawToken +/// Basically a size semantic token, used for width and height values, is a dimension raw token, +/// it has the same final type, to keep grammar clean and clear with design system grammar. +public typealias SizeSemanticToken = DimensionRawToken diff --git a/OUDS/Core/Tokens/SemanticTokens/Sources/TypeAliases/SpacingSemanticTokens+Aliases.swift b/OUDS/Core/Tokens/SemanticTokens/Sources/TypeAliases/SpacingSemanticTokens+Aliases.swift index 89ceb46c2..96840440e 100644 --- a/OUDS/Core/Tokens/SemanticTokens/Sources/TypeAliases/SpacingSemanticTokens+Aliases.swift +++ b/OUDS/Core/Tokens/SemanticTokens/Sources/TypeAliases/SpacingSemanticTokens+Aliases.swift @@ -14,19 +14,16 @@ import OUDSTokensRaw /// Basically a space semantic token for layout is a dimension raw token, it has the same final type, to keep grammar clean and clear with design system grammar. -public typealias SpacingSemanticToken = DimensionRawToken +public typealias SpaceSemanticToken = DimensionRawToken /// Basically a space semantic token for padding inline is a dimension raw token, it has the same final type, to keep grammar clean and clear with design system grammar. -public typealias SpacingPaddingInlineSemanticToken = DimensionRawToken +public typealias SpacePaddingInlineSemanticToken = DimensionRawToken /// Basically a space semantic token for padding block is a dimension raw token, it has the same final type, to keep grammar clean and clear with design system grammar. -public typealias SpacingPaddingBlockSemanticToken = DimensionRawToken - -/// Basically a space semantic token for padding inset is a dimension raw token, it has the same final type, to keep grammar clean and clear with design system grammar. -public typealias SpacingPaddingInsetSemanticToken = DimensionRawToken +public typealias SpacePaddingBlockSemanticToken = DimensionRawToken /// Basically a space semantic token for gap inline is a dimension raw token, it has the same final type, to keep grammar clean and clear with design system grammar. -public typealias SpacingGapInlineSemanticToken = DimensionRawToken +public typealias SpaceGapInlineSemanticToken = DimensionRawToken /// Basically a space semantic token for gap stack is a dimension raw token, it has the same final type, to keep grammar clean and clear with design system grammar. -public typealias SpacingGapStackSemanticToken = DimensionRawToken +public typealias SpaceGapStackSemanticToken = DimensionRawToken diff --git a/OUDS/Core/Tokens/SemanticTokens/Sources/Values/BorderSemanticTokens.swift b/OUDS/Core/Tokens/SemanticTokens/Sources/Values/BorderSemanticTokens.swift index 6bb941eb8..e29a2dfc6 100644 --- a/OUDS/Core/Tokens/SemanticTokens/Sources/Values/BorderSemanticTokens.swift +++ b/OUDS/Core/Tokens/SemanticTokens/Sources/Values/BorderSemanticTokens.swift @@ -13,6 +13,8 @@ // ଘ( ・ω・)_/゚・:*:・。☆ // [File to generate with 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 @@ -30,7 +32,8 @@ public protocol BorderSemanticTokens { var borderWidthMedium: BorderWidthSemanticToken { get } var borderWidthThick: BorderWidthSemanticToken { get } var borderWidthThicker: BorderWidthSemanticToken { get } - var borderWidthOutsideFocus: BorderWidthSemanticToken { get } + var borderWidthFocus: BorderWidthSemanticToken { get } + var borderWidthFocusInset: BorderWidthSemanticToken { get } // MARK: - Semantic token - Border - Radius diff --git a/OUDS/Core/Tokens/SemanticTokens/Sources/Values/ColorSemanticTokens.swift b/OUDS/Core/Tokens/SemanticTokens/Sources/Values/ColorSemanticTokens.swift index 85b706e3f..5dd36ffb1 100644 --- a/OUDS/Core/Tokens/SemanticTokens/Sources/Values/ColorSemanticTokens.swift +++ b/OUDS/Core/Tokens/SemanticTokens/Sources/Values/ColorSemanticTokens.swift @@ -13,7 +13,8 @@ // ଘ( ・ω・)_/゚・:*:・。☆ // [File to generate with the tokenator] -// WARNING: Not synchronized anymore with the Figjam +// 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 // swiftlint:disable identifier_name @@ -29,67 +30,67 @@ public protocol ColorSemanticTokens { // MARK: Semantic token - Colors - Background - var colorBackgroundPrimary: ColorSemanticToken { get } + var colorBgPrimary: ColorSemanticToken { get } - var colorBackgroundSecondary: ColorSemanticToken { get } + var colorBgSecondary: ColorSemanticToken { get } - var colorBackgroundTertiary: ColorSemanticToken { get } + var colorBgTertiary: ColorSemanticToken { get } - var colorBackgroundEmphasized: ColorSemanticToken { get } + var colorBgEmphasized: ColorSemanticToken { get } - var colorBackgroundBrandPrimary: ColorSemanticToken { get } + var colorBgBrandPrimary: ColorSemanticToken { get } - var colorBackgroundBrandSecondary: ColorSemanticToken { get } + var colorBgBrandSecondary: ColorSemanticToken { get } - var colorBackgroundBrandTertiary: ColorSemanticToken { get } + var colorBgBrandTertiary: ColorSemanticToken { get } - var colorBackgroundStatusNeutral: ColorSemanticToken { get } + var colorBgStatusNeutral: ColorSemanticToken { get } - var colorBackgroundStatusNeutralOnBackgroundEmphasized: ColorSemanticToken { get } + var colorBgStatusNeutralOnBgEmphasized: ColorSemanticToken { get } - var colorBackgroundStatusPositiveMuted: ColorSemanticToken { get } + var colorBgStatusPositiveMuted: ColorSemanticToken { get } - var colorBackgroundStatusPositiveMutedOnBackgroundEmphasized: ColorSemanticToken { get } + var colorBgStatusPositiveMutedOnBgEmphasized: ColorSemanticToken { get } - var colorBackgroundStatusPositiveEmphasized: ColorSemanticToken { get } + var colorBgStatusPositiveEmphasized: ColorSemanticToken { get } - var colorBackgroundStatusInfoMuted: ColorSemanticToken { get } + var colorBgStatusInfoMuted: ColorSemanticToken { get } - var colorBackgroundStatusInfoMutedOnBackgroundEmphasized: ColorSemanticToken { get } + var colorBgStatusInfoMutedOnBgEmphasized: ColorSemanticToken { get } - var colorBackgroundStatusInfoEmphasized: ColorSemanticToken { get } + var colorBgStatusInfoEmphasized: ColorSemanticToken { get } - var colorBackgroundStatusWarningMuted: ColorSemanticToken { get } + var colorBgStatusWarningMuted: ColorSemanticToken { get } - var colorBackgroundStatusWarningMutedOnBackgroundEmphasized: ColorSemanticToken { get } + var colorBgStatusWarningMutedOnBgEmphasized: ColorSemanticToken { get } - var colorBackgroundStatusWarningEmphasized: ColorSemanticToken { get } + var colorBgStatusWarningEmphasized: ColorSemanticToken { get } - var colorBackgroundStatusNegativeMuted: ColorSemanticToken { get } + var colorBgStatusNegativeMuted: ColorSemanticToken { get } - var colorBackgroundStatusNegativeMutedOnBackgroundEmphasized: ColorSemanticToken { get } + var colorBgStatusNegativeMutedOnBgEmphasized: ColorSemanticToken { get } - var colorBackgroundStatusNegativeEmphasized: ColorSemanticToken { get } + var colorBgStatusNegativeEmphasized: ColorSemanticToken { get } - var colorBackgroundStatusAccentMuted: ColorSemanticToken { get } + var colorBgStatusAccentMuted: ColorSemanticToken { get } - var colorBackgroundStatusAccentMutedOnBackgroundEmphasized: ColorSemanticToken { get } + var colorBgStatusAccentMutedOnBgEmphasized: ColorSemanticToken { get } - var colorBackgroundStatusAccentEmphasized: ColorSemanticToken { get } + var colorBgStatusAccentEmphasized: ColorSemanticToken { get } // MARK: Semantic token - Colors - Content - Status var colorContentDefault: ColorSemanticToken { get } - var colorContentContentDefaultOnBackgroundEmphasized: ColorSemanticToken { get } + var colorContentContentDefaultOnBgEmphasized: ColorSemanticToken { get } var colorContentMuted: ColorSemanticToken { get } - var colorContentContentMutedOnBackgroundEmphasized: ColorSemanticToken { get } + var colorContentContentMutedOnBgEmphasized: ColorSemanticToken { get } var colorContentDisabled: ColorSemanticToken { get } - var colorContentContentDisabledOnBackgroundEmphasized: ColorSemanticToken { get } + var colorContentContentDisabledOnBgEmphasized: ColorSemanticToken { get } var colorContentBrandPrimary: ColorSemanticToken { get } @@ -109,55 +110,55 @@ public protocol ColorSemanticTokens { // MARK: Semantic token - Colors - Content - On Background - var colorContentOnBackgroundPrimary: ColorSemanticToken { get } + var colorContentOnBgPrimary: ColorSemanticToken { get } - var colorContentOnBackgroundSecondary: ColorSemanticToken { get } + var colorContentOnBgSecondary: ColorSemanticToken { get } - var colorContentOnBackgroundTertiary: ColorSemanticToken { get } + var colorContentOnBgTertiary: ColorSemanticToken { get } - var colorContentOnBackgroundStatusPositiveMuted: ColorSemanticToken { get } + var colorContentOnBgStatusPositiveMuted: ColorSemanticToken { get } - var colorContentOnBackgroundStatusPositiveMutedOnBackgroundEmphasized: ColorSemanticToken { get } + var colorContentOnBgStatusPositiveMutedOnBgEmphasized: ColorSemanticToken { get } - var colorContentOnBackgroundStatusPositiveEmphasized: ColorSemanticToken { get } + var colorContentOnBgStatusPositiveEmphasized: ColorSemanticToken { get } - var colorContentOnBackgroundStatusInfoMuted: ColorSemanticToken { get } + var colorContentOnBgStatusInfoMuted: ColorSemanticToken { get } - var colorContentOnBackgroundStatusInfoMutedOnBackgroundEmphasized: ColorSemanticToken { get } + var colorContentOnBgStatusInfoMutedOnBgEmphasized: ColorSemanticToken { get } - var colorContentOnBackgroundStatusInfoEmphasized: ColorSemanticToken { get } + var colorContentOnBgStatusInfoEmphasized: ColorSemanticToken { get } - var colorContentOnBackgroundStatusWarningMuted: ColorSemanticToken { get } + var colorContentOnBgStatusWarningMuted: ColorSemanticToken { get } - var colorContentOnBackgroundStatusWarningMutedOnBackgroundEmphasized: ColorSemanticToken { get } + var colorContentOnBgStatusWarningMutedOnBgEmphasized: ColorSemanticToken { get } - var colorContentOnBackgroundStatusWarningEmphasized: ColorSemanticToken { get } + var colorContentOnBgStatusWarningEmphasized: ColorSemanticToken { get } - var colorContentOnBackgroundStatusNegativeMuted: ColorSemanticToken { get } + var colorContentOnBgStatusNegativeMuted: ColorSemanticToken { get } - var colorContentOnBackgroundStatusNegativeMutedOnBackgroundEmphasized: ColorSemanticToken { get } + var colorContentOnBgStatusNegativeMutedOnBgEmphasized: ColorSemanticToken { get } - var colorContentOnBackgroundStatusNegativeEmphasized: ColorSemanticToken { get } + var colorContentOnBgStatusNegativeEmphasized: ColorSemanticToken { get } - var colorContentOnBackgroundStatusAccentMuted: ColorSemanticToken { get } + var colorContentOnBgStatusAccentMuted: ColorSemanticToken { get } - var colorContentOnBackgroundStatusAccentMutedOnBackgroundEmphasized: ColorSemanticToken { get } + var colorContentOnBgStatusAccentMutedOnBgEmphasized: ColorSemanticToken { get } - var colorContentOnBackgroundStatusAccentedEmphasized: ColorSemanticToken { get } + var colorContentOnBgStatusAccentedEmphasized: ColorSemanticToken { get } // MARK: Semantic token - Colors - Border var colorBorderDefault: ColorSemanticToken { get } - var colorBorderDefaultOnBackgroundEmphasized: ColorSemanticToken { get } + var colorBorderDefaultOnBgEmphasized: ColorSemanticToken { get } var colorBorderEmphasized: ColorSemanticToken { get } - var colorBorderEmphasizedOnBackgroundEmphasized: ColorSemanticToken { get } + var colorBorderEmphasizedOnBgEmphasized: ColorSemanticToken { get } var colorBorderFocus: ColorSemanticToken { get } - var colorBorderBrandPrimaryOnBackgroundEmphasized: ColorSemanticToken { get } + var colorBorderBrandPrimaryOnBgEmphasized: ColorSemanticToken { get } var colorBorderBrandPrimary: ColorSemanticToken { get } @@ -175,65 +176,65 @@ public protocol ColorSemanticTokens { var colorBorderStatusAccent: ColorSemanticToken { get } - var colorBorderOnBackgroundBrandPrimary: ColorSemanticToken { get } + var colorBorderOnBgBrandPrimary: ColorSemanticToken { get } - var colorBorderOnBackgroundBrandSecondary: ColorSemanticToken { get } + var colorBorderOnBgBrandSecondary: ColorSemanticToken { get } - var colorBorderOnBackgroundBrandTertiary: ColorSemanticToken { get } + var colorBorderOnBgBrandTertiary: ColorSemanticToken { get } // MARK: Semantic token - Colors - Action var colorActionSelected: ColorSemanticToken { get } - var colorActionSelectedOnBackgroundEmphasized: ColorSemanticToken { get } + var colorActionSelectedOnBgEmphasized: ColorSemanticToken { get } var colorActionDisabled: ColorSemanticToken { get } - var colorActionDisabledOnBackgroundEmphasized: ColorSemanticToken { get } + var colorActionDisabledOnBgEmphasized: ColorSemanticToken { get } var colorActionVisited: ColorSemanticToken { get } - var colorActionVistedOnBackgroundEmphasized: ColorSemanticToken { get } + var colorActionVistedOnBgEmphasized: ColorSemanticToken { get } var colorActionPrimaryEnabled: ColorSemanticToken { get } - var colorActionPrimaryEnabledOnBackgroundEmphasized: ColorSemanticToken { get } + var colorActionPrimaryEnabledOnBgEmphasized: ColorSemanticToken { get } var colorActionPrimaryHover: ColorSemanticToken { get } - var colorActionPrimaryHoverOnBackgroundEmphasized: ColorSemanticToken { get } + var colorActionPrimaryHoverOnBgEmphasized: ColorSemanticToken { get } var colorActionPrimaryPressed: ColorSemanticToken { get } - var colorActionPrimaryPressedOnBackgroundEmphasized: ColorSemanticToken { get } + var colorActionPrimaryPressedOnBgEmphasized: ColorSemanticToken { get } var colorActionPrimaryLoading: ColorSemanticToken { get } - var colorActionPrimaryLoadingOnBackgroundEmphasized: ColorSemanticToken { get } + var colorActionPrimaryLoadingOnBgEmphasized: ColorSemanticToken { get } var colorActionPrimaryFocus: ColorSemanticToken { get } - var colorActionPrimaryFocusOnBackgroundEmphasized: ColorSemanticToken { get } + var colorActionPrimaryFocusOnBgEmphasized: ColorSemanticToken { get } var colorActionSecondaryEnabled: ColorSemanticToken { get } - var colorActionSecondaryEnabledOnBackgroundEmphasized: ColorSemanticToken { get } + var colorActionSecondaryEnabledOnBgEmphasized: ColorSemanticToken { get } var colorActionSecondaryHover: ColorSemanticToken { get } - var colorActionSecondaryHoverOnBackgroundEmphasized: ColorSemanticToken { get } + var colorActionSecondaryHoverOnBgEmphasized: ColorSemanticToken { get } var colorActionSecondaryPressed: ColorSemanticToken { get } - var colorActionSecondaryPressedOnBackgroundEmphasized: ColorSemanticToken { get } + var colorActionSecondaryPressedOnBgEmphasized: ColorSemanticToken { get } var colorActionSecondaryLoading: ColorSemanticToken { get } - var colorActionSecondaryLoadingOnBackgroundEmphasized: ColorSemanticToken { get } + var colorActionSecondaryLoadingOnBgEmphasized: ColorSemanticToken { get } var colorActionSecondaryFocus: ColorSemanticToken { get } - var colorActionSecondaryFocusOnBackgroundEmphasized: ColorSemanticToken { get } + var colorActionSecondaryFocusOnBgEmphasized: ColorSemanticToken { get } var colorActionNegativeEnabled: ColorSemanticToken { get } @@ -245,51 +246,51 @@ public protocol ColorSemanticTokens { var colorActionNegativeFocus: ColorSemanticToken { get } - var colorActionOnBackgroundActionDisabled: ColorSemanticToken { get } + var colorActionOnBgActionDisabled: ColorSemanticToken { get } - var colorActionOnBackgroundActionDisabledOnBackgroundEmphasized: ColorSemanticToken { get } + var colorActionOnBgActionDisabledOnBgEmphasized: ColorSemanticToken { get } - var colorActionOnBackgroundActionNegative: ColorSemanticToken { get } + var colorActionOnBgActionNegative: ColorSemanticToken { get } - var colorActionOnBackgroundActionPrimaryEnabled: ColorSemanticToken { get } + var colorActionOnBgActionPrimaryEnabled: ColorSemanticToken { get } - var colorActionOnBackgroundActionPrimaryEnabledOnBackgroundEmphasized: ColorSemanticToken { get } + var colorActionOnBgActionPrimaryEnabledOnBgEmphasized: ColorSemanticToken { get } - var colorActionOnBackgroundActionPrimaryHover: ColorSemanticToken { get } + var colorActionOnBgActionPrimaryHover: ColorSemanticToken { get } - var colorActionOnBackgroundActionPrimaryHoverOnBackgroundEmphasized: ColorSemanticToken { get } + var colorActionOnBgActionPrimaryHoverOnBgEmphasized: ColorSemanticToken { get } - var colorActionOnBackgroundActionPrimaryPressed: ColorSemanticToken { get } + var colorActionOnBgActionPrimaryPressed: ColorSemanticToken { get } - var colorActionOnBackgroundActionPrimaryPressedOnBackgroundEmphasized: ColorSemanticToken { get } + var colorActionOnBgActionPrimaryPressedOnBgEmphasized: ColorSemanticToken { get } - var colorActionOnBackgroundActionPrimaryLoading: ColorSemanticToken { get } + var colorActionOnBgActionPrimaryLoading: ColorSemanticToken { get } - var colorActionOnBackgroundActionPrimaryLoadingOnBackgroundEmphasized: ColorSemanticToken { get } + var colorActionOnBgActionPrimaryLoadingOnBgEmphasized: ColorSemanticToken { get } - var colorActionOnBackgroundActionPrimaryFocus: ColorSemanticToken { get } + var colorActionOnBgActionPrimaryFocus: ColorSemanticToken { get } - var colorActionOnBackgroundActionPrimaryFocusOnBackgroundEmphasized: ColorSemanticToken { get } + var colorActionOnBgActionPrimaryFocusOnBgEmphasized: ColorSemanticToken { get } - var colorActionOnBackgroundActionSecondaryEnabled: ColorSemanticToken { get } + var colorActionOnBgActionSecondaryEnabled: ColorSemanticToken { get } - var colorActionOnBackgroundActionSecondaryEnabledOnBackgroundEmphasized: ColorSemanticToken { get } + var colorActionOnBgActionSecondaryEnabledOnBgEmphasized: ColorSemanticToken { get } - var colorActionOnBackgroundActionSecondaryHover: ColorSemanticToken { get } + var colorActionOnBgActionSecondaryHover: ColorSemanticToken { get } - var colorActionOnBackgroundActionSecondaryHoverOnBackgroundEmphasized: ColorSemanticToken { get } + var colorActionOnBgActionSecondaryHoverOnBgEmphasized: ColorSemanticToken { get } - var colorActionOnBackgroundActionSecondaryPressed: ColorSemanticToken { get } + var colorActionOnBgActionSecondaryPressed: ColorSemanticToken { get } - var colorActionOnBackgroundActionSecondaryPressedOnBackgroundEmphasized: ColorSemanticToken { get } + var colorActionOnBgActionSecondaryPressedOnBgEmphasized: ColorSemanticToken { get } - var colorActionOnBackgroundActionSecondaryLoading: ColorSemanticToken { get } + var colorActionOnBgActionSecondaryLoading: ColorSemanticToken { get } - var colorActionOnBackgroundActionSecondaryLoadingOnBackgroundEmphasized: ColorSemanticToken { get } + var colorActionOnBgActionSecondaryLoadingOnBgEmphasized: ColorSemanticToken { get } - var colorActionOnBackgroundActionSecondaryFocus: ColorSemanticToken { get } + var colorActionOnBgActionSecondaryFocus: ColorSemanticToken { get } - var colorActionOnBackgroundActionSecondaryFocusOnBackgroundEmphasized: ColorSemanticToken { get } + var colorActionOnBgActionSecondaryFocusOnBgEmphasized: ColorSemanticToken { get } // MARK: Semantic token - Colors - Always @@ -307,19 +308,19 @@ public protocol ColorSemanticTokens { var colorAlwaysAccent: ColorSemanticToken { get } - var colorAlwaysOnBackgroundBlack: ColorSemanticToken { get } + var colorAlwaysOnBgBlack: ColorSemanticToken { get } - var colorAlwaysOnBackgroundWhite: ColorSemanticToken { get } + var colorAlwaysOnBgWhite: ColorSemanticToken { get } - var colorAlwaysOnBackgroundWarning: ColorSemanticToken { get } + var colorAlwaysOnBgWarning: ColorSemanticToken { get } - var colorAlwaysOnBackgroundNegative: ColorSemanticToken { get } + var colorAlwaysOnBgNegative: ColorSemanticToken { get } - var colorAlwaysOnBackgroundPositive: ColorSemanticToken { get } + var colorAlwaysOnBgPositive: ColorSemanticToken { get } - var colorAlwaysOnBackgroundInfo: ColorSemanticToken { get } + var colorAlwaysOnBgInfo: ColorSemanticToken { get } - var colorAlwaysOnBackgroundAccent: ColorSemanticToken { get } + var colorAlwaysOnBgAccent: ColorSemanticToken { get } // MARK: Semantic token - Colors - Transparent @@ -329,49 +330,37 @@ public protocol ColorSemanticTokens { var colorElevationRaised: ColorSemanticToken { get } - var colorElevationRaisedOnBackgroundSecondary: ColorSemanticToken { get } + var colorElevationRaisedOnBgSecondary: ColorSemanticToken { get } - var colorElevationRaisedOnBackgroundEmphasized: ColorSemanticToken { get } + var colorElevationRaisedOnBgEmphasized: ColorSemanticToken { get } var colorElevationDrag: ColorSemanticToken { get } - var colorElevationDragOnBackgroundSecondary: ColorSemanticToken { get } + var colorElevationDragOnBgSecondary: ColorSemanticToken { get } - var colorElevationDragOnBackgroundEmphasized: ColorSemanticToken { get } + var colorElevationDragOnBgEmphasized: ColorSemanticToken { get } var colorElevationOverlayDefault: ColorSemanticToken { get } - var colorElevationOverlayDefaultOnBackgroundSecondary: ColorSemanticToken { get } + var colorElevationOverlayDefaultOnBgSecondary: ColorSemanticToken { get } - var colorElevationOverlayDefaultOnBackgroundEmphasized: ColorSemanticToken { get } + var colorElevationOverlayDefaultOnBgEmphasized: ColorSemanticToken { get } var colorElevationOverlayEmphasized: ColorSemanticToken { get } - var colorElevationOverlayEmphasizedOnBackgroundSecondary: ColorSemanticToken { get } + var colorElevationOverlayEmphasizedOnBgSecondary: ColorSemanticToken { get } - var colorElevationOverlayEmphasizedOnBackgroundEmphasized: ColorSemanticToken { get } + var colorElevationOverlayEmphasizedOnBgEmphasized: ColorSemanticToken { get } var colorElevationModal: ColorSemanticToken { get } // MARK: Semantic token - Colors - Decorative - var colorDecorativeBrandPrimary: ColorSemanticToken { get } - - var colorDecorativeBrandPrimaryMuted: ColorSemanticToken { get } - - var colorDecorativeBrandPrimaryEmphasized: ColorSemanticToken { get } + var colorDecorativePrimary: ColorSemanticToken { get } var colorDecorativeSecondary: ColorSemanticToken { get } - var colorDecorativeSecondaryMuted: ColorSemanticToken { get } - - var colorDecorativeSecondaryEmphasized: ColorSemanticToken { get } - - var colorDecorativeBrandTertiary: ColorSemanticToken { get } - - var colorDecorativeBrandTertiaryMuted: ColorSemanticToken { get } - - var colorDecorativeBrandTertiaryEmphasized: ColorSemanticToken { get } + var colorDecorativeTertiary: ColorSemanticToken { get } var colorDecorativeNeutralMuted: ColorSemanticToken { get } @@ -409,23 +398,23 @@ public protocol ColorSemanticTokens { var colorDecorativeAccent5Emphasized: ColorSemanticToken { get } - var colorDecorativeSkintTint100: ColorSemanticToken { get } + var colorDecorativeSkinTint100: ColorSemanticToken { get } - var colorDecorativeSkintTint200: ColorSemanticToken { get } + var colorDecorativeSkinTint200: ColorSemanticToken { get } - var colorDecorativeSkintTint300: ColorSemanticToken { get } + var colorDecorativeSkinTint300: ColorSemanticToken { get } - var colorDecorativeSkintTint400: ColorSemanticToken { get } + var colorDecorativeSkinTint400: ColorSemanticToken { get } - var colorDecorativeSkintTint500: ColorSemanticToken { get } + var colorDecorativeSkinTint500: ColorSemanticToken { get } - var colorDecorativeSkintTint600: ColorSemanticToken { get } + var colorDecorativeSkinTint600: ColorSemanticToken { get } - var colorDecorativeSkintTint700: ColorSemanticToken { get } + var colorDecorativeSkinTint700: ColorSemanticToken { get } - var colorDecorativeSkintTint800: ColorSemanticToken { get } + var colorDecorativeSkinTint800: ColorSemanticToken { get } - var colorDecorativeSkintTint900: ColorSemanticToken { get } + var colorDecorativeSkinTint900: ColorSemanticToken { get } // MARK: Semantic token - Colors - Chart diff --git a/OUDS/Core/Tokens/SemanticTokens/Sources/Values/DimensionSemanticTokens.swift b/OUDS/Core/Tokens/SemanticTokens/Sources/Values/DimensionSemanticTokens.swift index 19b40db79..f52dd3b7d 100644 --- a/OUDS/Core/Tokens/SemanticTokens/Sources/Values/DimensionSemanticTokens.swift +++ b/OUDS/Core/Tokens/SemanticTokens/Sources/Values/DimensionSemanticTokens.swift @@ -13,6 +13,8 @@ // ଘ( ・ω・)_/゚・:*:・。☆ // [File to generate with 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 diff --git a/OUDS/Core/Tokens/SemanticTokens/Sources/Values/ElevationCompositeSemanticTokens.swift b/OUDS/Core/Tokens/SemanticTokens/Sources/Values/ElevationCompositeSemanticTokens.swift new file mode 100644 index 000000000..2e8b819d4 --- /dev/null +++ b/OUDS/Core/Tokens/SemanticTokens/Sources/Values/ElevationCompositeSemanticTokens.swift @@ -0,0 +1,42 @@ +// +// 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 +// + +// swiftlint:disable missing_docs + +// ଘ( ・ω・)_/゚・:*:・。☆ +// [File to generate with the tokenator with Figma able to output composites and tokenatoer able to manage them] +// 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 + +/// This is a group of semantic tokens for **elevations**, but only **composite tokens**. +/// There are splitted and not declared in `ElevationSemanticTokens` as the *tokenator* tool parsing *Figma* JSON to Swift code is not able to manage them. +/// Thus we need to declare them in another file to prevent them to be erased. +/// +/// It declares in fact box shadows effects. +/// +/// This protocol makes themes able to provide and override `ElevationCompositeSemanticToken`. +/// `ElevationCompositeSemanticToken` refers to `MultipleElevationTokens`, which contains for light and dark color schemes `ElevationCompositeRawToken`. +/// This `ElevationCompositeRawToken` is not managed by tokenator yet as it is composed by three properties. +public protocol ElevationCompositeSemanticTokens { + + var elevationNone: ElevationCompositeSemanticToken { get } + var elevationRaised: ElevationCompositeSemanticToken { get } + var elevationDrag: ElevationCompositeSemanticToken { get } + var elevationOverlayDefault: ElevationCompositeSemanticToken { get } + var elevationOverlayEmphasized: ElevationCompositeSemanticToken { get } + var elevationStickyDefault: ElevationCompositeSemanticToken { get } + var elevationStickyEmphasized: ElevationCompositeSemanticToken { get } + var elevationStickyNavigationScrolled: ElevationCompositeSemanticToken { get } +} + +// swiftlint:enable missing_docs diff --git a/OUDS/Core/Tokens/SemanticTokens/Sources/Values/ElevationSemanticTokens.swift b/OUDS/Core/Tokens/SemanticTokens/Sources/Values/ElevationSemanticTokens.swift index 02c6fecff..eecf095cc 100644 --- a/OUDS/Core/Tokens/SemanticTokens/Sources/Values/ElevationSemanticTokens.swift +++ b/OUDS/Core/Tokens/SemanticTokens/Sources/Values/ElevationSemanticTokens.swift @@ -13,12 +13,17 @@ // ଘ( ・ω・)_/゚・:*:・。☆ // [File to generate with 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 **elevations**. -/// It defines all elevation semantic tokens a theme must have. (`ElevationXSemanticToken`,`ElevationYSemanticToken`, -/// `ElevationBlurSemanticToken` and `ElevationColorSemanticToken`) +/// It defines all elevation semantic tokens a theme must have (`ElevationXSemanticToken`,`ElevationYSemanticToken`, +/// `ElevationBlurSemanticToken` and `ElevationColorSemanticToken`). +/// +/// However the composite tokens (here for bow shadows) are defined in `ElevationCompositeSemanticTokens` because the *tokenator* +/// is not able to generate them yet, and they must be defined elsewhere to not be deleted. /// /// In the future this file should be generated by a parser converting Figma JSON to Swift code. public protocol ElevationSemanticTokens { @@ -33,7 +38,6 @@ public protocol ElevationSemanticTokens { var elevationXStickyDefault: ElevationXSemanticToken { get } var elevationXStickyEmphasized: ElevationXSemanticToken { get } var elevationXStickyNavigationScrolled: ElevationXSemanticToken { get } - var elevationXFocus: ElevationXSemanticToken { get } // MARK: Semantic token - Elevation - Y @@ -45,7 +49,6 @@ public protocol ElevationSemanticTokens { var elevationYStickyDefault: ElevationYSemanticToken { get } var elevationYStickyEmphasized: ElevationYSemanticToken { get } var elevationYStickyNavigationScrolled: ElevationYSemanticToken { get } - var elevationYFocus: ElevationYSemanticToken { get } // MARK: Semantic token - Elevation - Blur @@ -57,7 +60,6 @@ public protocol ElevationSemanticTokens { var elevationBlurStickyDefault: ElevationBlurSemanticToken { get } var elevationBlurStickyEmphasized: ElevationBlurSemanticToken { get } var elevationBlurStickyNavigationScrolled: ElevationBlurSemanticToken { get } - var elevationBlurFocus: ElevationBlurSemanticToken { get } // MARK: Semantic token - Elevation - Color @@ -69,19 +71,6 @@ public protocol ElevationSemanticTokens { var elevationColorStickyDefault: ElevationColorSemanticToken { get } var elevationColorStickyEmphasized: ElevationColorSemanticToken { get } var elevationColorStickyNavigationScrolled: ElevationColorSemanticToken { get } - var elevationColorFocus: ElevationColorSemanticToken { get } - - // MARK: Semantic token - Elevation - Box shadow - - var elevationNone: ElevationCompositeSemanticToken { get } - var elevationRaised: ElevationCompositeSemanticToken { get } - var elevationDrag: ElevationCompositeSemanticToken { get } - var elevationOverlayDefault: ElevationCompositeSemanticToken { get } - var elevationOverlayEmphasized: ElevationCompositeSemanticToken { get } - var elevationStickyDefault: ElevationCompositeSemanticToken { get } - var elevationStickyEmphasized: ElevationCompositeSemanticToken { get } - var elevationStickyNavigationScrolled: ElevationCompositeSemanticToken { get } - var elevationFocus: ElevationCompositeSemanticToken { get } } // swiftlint:enable missing_docs diff --git a/OUDS/Core/Tokens/SemanticTokens/Sources/Values/GridSemanticTokens.swift b/OUDS/Core/Tokens/SemanticTokens/Sources/Values/GridSemanticTokens.swift index 4cef8af1d..b258b0637 100644 --- a/OUDS/Core/Tokens/SemanticTokens/Sources/Values/GridSemanticTokens.swift +++ b/OUDS/Core/Tokens/SemanticTokens/Sources/Values/GridSemanticTokens.swift @@ -13,6 +13,8 @@ // ଘ( ・ω・)_/゚・:*:・。☆ // [File to generate with 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 diff --git a/OUDS/Core/Tokens/SemanticTokens/Sources/Values/OpacitySemanticTokens.swift b/OUDS/Core/Tokens/SemanticTokens/Sources/Values/OpacitySemanticTokens.swift index a4482878f..b30c3a42b 100644 --- a/OUDS/Core/Tokens/SemanticTokens/Sources/Values/OpacitySemanticTokens.swift +++ b/OUDS/Core/Tokens/SemanticTokens/Sources/Values/OpacitySemanticTokens.swift @@ -13,6 +13,8 @@ // ଘ( ・ω・)_/゚・:*:・。☆ // [File to generate with 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 diff --git a/OUDS/Core/Tokens/SemanticTokens/Sources/Values/SizeSemanticTokens.swift b/OUDS/Core/Tokens/SemanticTokens/Sources/Values/SizeSemanticTokens.swift new file mode 100644 index 000000000..68b78bddc --- /dev/null +++ b/OUDS/Core/Tokens/SemanticTokens/Sources/Values/SizeSemanticTokens.swift @@ -0,0 +1,91 @@ +// +// 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 with 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 **sizing**. +/// It defines all `SizeSemanticToken` a theme must have. +/// +/// In the future this file should be generated by a parser converting Figma JSON to Swift code. +public protocol SizeSemanticTokens { + + // MARK: - Semantic token - Sizing - Icon with typography + + var sizeIconWithHeadingXLargeShort: MultipleSizeTokens { get } + var sizeIconWithHeadingXLargeMedium: MultipleSizeTokens { get } + var sizeIconWithHeadingXLargeTall: MultipleSizeTokens { get } + + var sizeIconWithHeadingLargeShort: MultipleSizeTokens { get } + var sizeIconWithHeadingLargeMedium: MultipleSizeTokens { get } + var sizeIconWithHeadingLargeTall: MultipleSizeTokens { get } + + var sizeIconWithHeadingMediumShort: MultipleSizeTokens { get } + var sizeIconWithHeadingMediumMedium: MultipleSizeTokens { get } + var sizeIconWithHeadingMediumTall: MultipleSizeTokens { get } + + var sizeIconWithHeadingSmallShort: MultipleSizeTokens { get } + var sizeIconWithHeadingSmallMedium: MultipleSizeTokens { get } + var sizeIconWithHeadingSmallTall: MultipleSizeTokens { get } + + var sizeIconWithBodyLargeShort: MultipleSizeTokens { get } + var sizeIconWithBodyLargeMedium: MultipleSizeTokens { get } + var sizeIconWithBodyLargeTall: MultipleSizeTokens { get } + + var sizeIconWithBodyMediumShort: MultipleSizeTokens { get } + var sizeIconWithBodyMediumMedium: MultipleSizeTokens { get } + var sizeIconWithBodyMediumTall: MultipleSizeTokens { get } + + var sizeIconWithBodySmallShort: MultipleSizeTokens { get } + var sizeIconWithBodySmallMedium: MultipleSizeTokens { get } + var sizeIconWithBodySmallTall: MultipleSizeTokens { get } + + var sizeIconWithLabelXLargeSizeShort: SizeSemanticToken { get } + var sizeIconWithLabelXLargeSizeMedium: SizeSemanticToken { get } + var sizeIconWithLabelXLargeSizeTall: SizeSemanticToken { get } + + var sizeIconWithLabelLargeSizeShorter: SizeSemanticToken { get } + var sizeIconWithLabelLargeSizeShort: SizeSemanticToken { get } + var sizeIconWithLabelLargeSizeMedium: SizeSemanticToken { get } + var sizeIconWithLabelLargeSizeTall: SizeSemanticToken { get } + var sizeIconWithLabelLargeSizeTaller: SizeSemanticToken { get } + + var sizeIconWithLabelMediumSizeShort: SizeSemanticToken { get } + var sizeIconWithLabelMediumSizeMedium: SizeSemanticToken { get } + var sizeIconWithLabelMediumSizeTall: SizeSemanticToken { get } + + var sizeIconWithLabelSmallSizeShort: SizeSemanticToken { get } + var sizeIconWithLabelSmallSizeMedium: SizeSemanticToken { get } + var sizeIconWithLabelSmallSizeTall: SizeSemanticToken { get } + + // MARK: - Semantic token - Sizing - Max width typography + + var sizeMaxWidthTypeDisplayLarge: MultipleSizeTokens { get } + var sizeMaxWidthTypeDisplayMedium: MultipleSizeTokens { get } + var sizeMaxWidthTypeDisplaySmall: MultipleSizeTokens { get } + + var sizeMaxWidthTypeHeadingXLarge: MultipleSizeTokens { get } + var sizeMaxWidthTypeHeadingLarge: MultipleSizeTokens { get } + var sizeMaxWidthTypeHeadingMedium: MultipleSizeTokens { get } + var sizeMaxWidthTypeHeadingSmall: MultipleSizeTokens { get } + + var sizeMaxWidthTypeBodyLarge: MultipleSizeTokens { get } + var sizeMaxWidthTypeBodyMedium: MultipleSizeTokens { get } + var sizeMaxWidthTypeBodySmall: MultipleSizeTokens { get } +} + +// swiftlint:enable missing_docs diff --git a/OUDS/Core/Tokens/SemanticTokens/Sources/Values/SizingSemanticTokens.swift b/OUDS/Core/Tokens/SemanticTokens/Sources/Values/SizingSemanticTokens.swift deleted file mode 100644 index 618f052d5..000000000 --- a/OUDS/Core/Tokens/SemanticTokens/Sources/Values/SizingSemanticTokens.swift +++ /dev/null @@ -1,89 +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 with the tokenator] - -// swiftlint:disable missing_docs - -/// This is a group of semantic tokens for **sizing**. -/// It defines all `SizingSemanticToken` a theme must have. -/// -/// In the future this file should be generated by a parser converting Figma JSON to Swift code. -public protocol SizingSemanticTokens { - - // MARK: - Semantic token - Sizing - Icon with typography - - var sizeIconWithHeadingXLargeShort: MultipleSizingTokens { get } - var sizeIconWithHeadingXLargeMedium: MultipleSizingTokens { get } - var sizeIconWithHeadingXLargeTall: MultipleSizingTokens { get } - - var sizeIconWithHeadingLargeShort: MultipleSizingTokens { get } - var sizeIconWithHeadingLargeMedium: MultipleSizingTokens { get } - var sizeIconWithHeadingLargeTall: MultipleSizingTokens { get } - - var sizeIconWithHeadingMediumShort: MultipleSizingTokens { get } - var sizeIconWithHeadingMediumMedium: MultipleSizingTokens { get } - var sizeIconWithHeadingMediumTall: MultipleSizingTokens { get } - - var sizeIconWithHeadingSmallShort: MultipleSizingTokens { get } - var sizeIconWithHeadingSmallMedium: MultipleSizingTokens { get } - var sizeIconWithHeadingSmallTall: MultipleSizingTokens { get } - - var sizeIconWithBodyLargeShort: MultipleSizingTokens { get } - var sizeIconWithBodyLargeMedium: MultipleSizingTokens { get } - var sizeIconWithBodyLargeTall: MultipleSizingTokens { get } - - var sizeIconWithBodyMediumShort: MultipleSizingTokens { get } - var sizeIconWithBodyMediumMedium: MultipleSizingTokens { get } - var sizeIconWithBodyMediumTall: MultipleSizingTokens { get } - - var sizeIconWithBodySmallShort: MultipleSizingTokens { get } - var sizeIconWithBodySmallMedium: MultipleSizingTokens { get } - var sizeIconWithBodySmallTall: MultipleSizingTokens { get } - - var sizeIconWithLabelXLargeSizeShort: SizingSemanticToken { get } - var sizeIconWithLabelXLargeSizeMedium: SizingSemanticToken { get } - var sizeIconWithLabelXLargeSizeTall: SizingSemanticToken { get } - - var sizeIconWithLabelLargeSizeShorter: SizingSemanticToken { get } - var sizeIconWithLabelLargeSizeShort: SizingSemanticToken { get } - var sizeIconWithLabelLargeSizeMedium: SizingSemanticToken { get } - var sizeIconWithLabelLargeSizeTall: SizingSemanticToken { get } - var sizeIconWithLabelLargeSizeTaller: SizingSemanticToken { get } - - var sizeIconWithLabelMediumSizeShort: SizingSemanticToken { get } - var sizeIconWithLabelMediumSizeMedium: SizingSemanticToken { get } - var sizeIconWithLabelMediumSizeTall: SizingSemanticToken { get } - - var sizeIconWithLabelSmallSizeShort: SizingSemanticToken { get } - var sizeIconWithLabelSmallSizeMedium: SizingSemanticToken { get } - var sizeIconWithLabelSmallSizeTall: SizingSemanticToken { get } - - // MARK: - Semantic token - Sizing - Max width typography - - var sizeMaxWidthTypeDisplayLarge: MultipleSizingTokens { get } - var sizeMaxWidthTypeDisplayMedium: MultipleSizingTokens { get } - var sizeMaxWidthTypeDisplaySmall: MultipleSizingTokens { get } - - var sizeMaxWidthTypeHeadingXLarge: MultipleSizingTokens { get } - var sizeMaxWidthTypeHeadingLarge: MultipleSizingTokens { get } - var sizeMaxWidthTypeHeadingMedium: MultipleSizingTokens { get } - var sizeMaxWidthTypeHeadingSmall: MultipleSizingTokens { get } - - var sizeMaxWidthTypeBodyLarge: MultipleSizingTokens { get } - var sizeMaxWidthTypeBodyMedium: MultipleSizingTokens { get } - var sizeMaxWidthTypeBodySmall: MultipleSizingTokens { get } -} - -// swiftlint:enable missing_docs diff --git a/OUDS/Core/Tokens/SemanticTokens/Sources/Values/SpaceSemanticTokens.swift b/OUDS/Core/Tokens/SemanticTokens/Sources/Values/SpaceSemanticTokens.swift new file mode 100644 index 000000000..8c9c84a03 --- /dev/null +++ b/OUDS/Core/Tokens/SemanticTokens/Sources/Values/SpaceSemanticTokens.swift @@ -0,0 +1,154 @@ +// +// 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 with 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 **spacing**. +/// It defines all `SpaceSemanticToken` a theme must have. +/// +/// In the future this file should be generated by a parser converting Figma JSON to Swift code. +public protocol SpaceSemanticTokens { + + // MARK: Semantic token - Spacing - Scaled + + var spaceScaledNone: MultipleSpaceTokens { get } + var spaceScaledSmash: MultipleSpaceTokens { get } + var spaceScaledShortest: MultipleSpaceTokens { get } + var spaceScaledShorter: MultipleSpaceTokens { get } + var spaceScaledShort: MultipleSpaceTokens { get } + var spaceScaledMedium: MultipleSpaceTokens { get } + var spaceScaledTall: MultipleSpaceTokens { get } + var spaceScaledTaller: MultipleSpaceTokens { get } + var spaceScaledTallest: MultipleSpaceTokens { get } + var spaceScaledSpacious: MultipleSpaceTokens { get } + + // MARK: Semantic token - Spacing - Fixed + + var spaceFixedNone: SpaceSemanticToken { get } + var spaceFixedSmash: SpaceSemanticToken { get } + var spaceFixedShortest: SpaceSemanticToken { get } + var spaceFixedShorter: SpaceSemanticToken { get } + var spaceFixedShort: SpaceSemanticToken { get } + var spaceFixedMedium: SpaceSemanticToken { get } + var spaceFixedTall: SpaceSemanticToken { get } + var spaceFixedTaller: SpaceSemanticToken { get } + var spaceFixedTallest: SpaceSemanticToken { get } + var spaceFixedSpacious: SpaceSemanticToken { get } + var spaceFixedHuge: SpaceSemanticToken { get } + var spaceFixedJumbo: SpaceSemanticToken { get } + + // MARK: Semantic token - Spacing - Padding - Padding inline + + var spacePaddingInlineNone: SpacePaddingInlineSemanticToken { get } + var spacePaddingInlineShorter: SpacePaddingInlineSemanticToken { get } + var spacePaddingInlineShort: SpacePaddingInlineSemanticToken { get } + var spacePaddingInlineMedium: SpacePaddingInlineSemanticToken { get } + var spacePaddingInlineTall: SpacePaddingInlineSemanticToken { get } + var spacePaddingInlineTaller: SpacePaddingInlineSemanticToken { get } + var spacePaddingInlineTallest: SpacePaddingInlineSemanticToken { get } + + var spacePaddingInlineWithIconNone: SpacePaddingInlineSemanticToken { get } + var spacePaddingInlineWithIconShortest: SpacePaddingInlineSemanticToken { get } + var spacePaddingInlineWithIconShorter: SpacePaddingInlineSemanticToken { get } + var spacePaddingInlineWithIconShort: SpacePaddingInlineSemanticToken { get } + var spacePaddingInlineWithIconMedium: SpacePaddingInlineSemanticToken { get } + var spacePaddingInlineWithIconTall: SpacePaddingInlineSemanticToken { get } + var spacePaddingInlineWithIconTaller: SpacePaddingInlineSemanticToken { get } + var spacePaddingInlineWithIconTallest: SpacePaddingInlineSemanticToken { get } + + var spacePaddingInlineWithArrowNone: SpacePaddingInlineSemanticToken { get } + var spacePaddingInlineWithArrowShortest: SpacePaddingInlineSemanticToken { get } + var spacePaddingInlineWithArrowShorter: SpacePaddingInlineSemanticToken { get } + var spacePaddingInlineWithArrowShort: SpacePaddingInlineSemanticToken { get } + var spacePaddingInlineWithArrowMedium: SpacePaddingInlineSemanticToken { get } + var spacePaddingInlineWithArrowTall: SpacePaddingInlineSemanticToken { get } + var spacePaddingInlineWithArrowTaller: SpacePaddingInlineSemanticToken { get } + var spacePaddingInlineWithArrowTallest: SpacePaddingInlineSemanticToken { get } + + // MARK: Semantic token - Spacing - Padding - Padding stack + + var spacePaddingBlockNone: SpacePaddingInlineSemanticToken { get } + var spacePaddingBlockShorter: SpacePaddingInlineSemanticToken { get } + var spacePaddingBlockShort: SpacePaddingInlineSemanticToken { get } + var spacePaddingBlockMedium: SpacePaddingInlineSemanticToken { get } + var spacePaddingBlockTall: SpacePaddingInlineSemanticToken { get } + var spacePaddingBlockTaller: SpacePaddingInlineSemanticToken { get } + var spacePaddingBlockTallest: SpacePaddingInlineSemanticToken { get } + + var spacePaddingBlockWithIconNone: SpacePaddingInlineSemanticToken { get } + var spacePaddingBlockWithIconShortest: SpacePaddingInlineSemanticToken { get } + var spacePaddingBlockWithIconShorter: SpacePaddingInlineSemanticToken { get } + var spacePaddingBlockWithIconShort: SpacePaddingInlineSemanticToken { get } + var spacePaddingBlockWithIconMedium: SpacePaddingInlineSemanticToken { get } + var spacePaddingBlockWithIconTall: SpacePaddingInlineSemanticToken { get } + var spacePaddingBlockWithIconTaller: SpacePaddingInlineSemanticToken { get } + + // MARK: Semantic token - Spacing - Padding - Padding inset + + var spaceInsetNone: SpacePaddingInlineSemanticToken { get } + var spaceInsetSmash: SpacePaddingInlineSemanticToken { get } + var spaceInsetShortest: SpacePaddingInlineSemanticToken { get } + var spaceInsetShorter: SpacePaddingInlineSemanticToken { get } + var spaceInsetShort: SpacePaddingInlineSemanticToken { get } + var spaceInsetMedium: SpacePaddingInlineSemanticToken { get } + var spaceInsetTall: SpacePaddingInlineSemanticToken { get } + var spaceInsetTaller: SpacePaddingInlineSemanticToken { get } + var spaceInsetTallest: SpacePaddingInlineSemanticToken { get } + var spaceInsetSpacious: SpacePaddingInlineSemanticToken { get } + + // MARK: Semantic token - Spacing - Padding - Gap inline + + var spaceColumnGapNone: SpacePaddingInlineSemanticToken { get } + var spaceColumnGapShorter: SpacePaddingInlineSemanticToken { get } + var spaceColumnGapShort: SpacePaddingInlineSemanticToken { get } + var spaceColumnGapMedium: SpacePaddingInlineSemanticToken { get } + var spaceColumnGapTall: SpacePaddingInlineSemanticToken { get } + var spaceColumnGapTaller: SpacePaddingInlineSemanticToken { get } + + var spaceColumnGapWithIconNone: SpacePaddingInlineSemanticToken { get } + var spaceColumnGapWithIconShortest: SpacePaddingInlineSemanticToken { get } + var spaceColumnGapWithIconShorter: SpacePaddingInlineSemanticToken { get } + var spaceColumnGapWithIconShort: SpacePaddingInlineSemanticToken { get } + var spaceColumnGapWithIconMedium: SpacePaddingInlineSemanticToken { get } + var spaceColumnGapWithIconTall: SpacePaddingInlineSemanticToken { get } + + var spaceColumnGapWithArrowNone: SpacePaddingInlineSemanticToken { get } + var spaceColumnGapWithArrowShortest: SpacePaddingInlineSemanticToken { get } + var spaceColumnGapWithArrowShorter: SpacePaddingInlineSemanticToken { get } + var spaceColumnGapWithArrowShort: SpacePaddingInlineSemanticToken { get } + var spaceColumnGapWithArrowMedium: SpacePaddingInlineSemanticToken { get } + var spaceColumnGapWithArrowTall: SpacePaddingInlineSemanticToken { get } + + // MARK: Semantic token - Spacing - Padding - Gap stack + + var spaceRowGapNone: SpaceGapStackSemanticToken { get } + var spaceRowGapShortest: SpaceGapStackSemanticToken { get } + var spaceRowGapShorter: SpaceGapStackSemanticToken { get } + var spaceRowGapShort: SpaceGapStackSemanticToken { get } + var spaceRowGapMedium: SpaceGapStackSemanticToken { get } + var spaceRowGapTall: SpaceGapStackSemanticToken { get } + + var spaceRowGapWithIconNone: SpaceGapStackSemanticToken { get } + var spaceRowGapWithIconShortest: SpaceGapStackSemanticToken { get } + var spaceRowGapWithIconShorter: SpaceGapStackSemanticToken { get } + var spaceRowGapWithIconShort: SpaceGapStackSemanticToken { get } + var spaceRowGapWithIconMedium: SpaceGapStackSemanticToken { get } + var spaceRowGapWithIconTall: SpaceGapStackSemanticToken { get } +} + +// swiftlint:enable missing_docs diff --git a/OUDS/Core/Tokens/SemanticTokens/Sources/Values/SpacingSemanticTokens.swift b/OUDS/Core/Tokens/SemanticTokens/Sources/Values/SpacingSemanticTokens.swift deleted file mode 100644 index d47682e13..000000000 --- a/OUDS/Core/Tokens/SemanticTokens/Sources/Values/SpacingSemanticTokens.swift +++ /dev/null @@ -1,152 +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 with the tokenator] - -// swiftlint:disable missing_docs - -/// This is a group of semantic tokens for **spacing**. -/// It defines all `SpacingSemanticToken` a theme must have. -/// -/// In the future this file should be generated by a parser converting Figma JSON to Swift code. -public protocol SpacingSemanticTokens { - - // MARK: Semantic token - Spacing - Scaled - - var spaceScaledNone: MultipleSpacingTokens { get } - var spaceScaledSmash: MultipleSpacingTokens { get } - var spaceScaledShortest: MultipleSpacingTokens { get } - var spaceScaledShorter: MultipleSpacingTokens { get } - var spaceScaledShort: MultipleSpacingTokens { get } - var spaceScaledMedium: MultipleSpacingTokens { get } - var spaceScaledTall: MultipleSpacingTokens { get } - var spaceScaledTaller: MultipleSpacingTokens { get } - var spaceScaledTallest: MultipleSpacingTokens { get } - var spaceScaledSpacious: MultipleSpacingTokens { get } - - // MARK: Semantic token - Spacing - Fixed - - var spaceFixedNone: SpacingSemanticToken { get } - var spaceFixedSmash: SpacingSemanticToken { get } - var spaceFixedShortest: SpacingSemanticToken { get } - var spaceFixedShorter: SpacingSemanticToken { get } - var spaceFixedShort: SpacingSemanticToken { get } - var spaceFixedMedium: SpacingSemanticToken { get } - var spaceFixedTall: SpacingSemanticToken { get } - var spaceFixedTaller: SpacingSemanticToken { get } - var spaceFixedTallest: SpacingSemanticToken { get } - var spaceFixedSpacious: SpacingSemanticToken { get } - var spaceFixedHuge: SpacingSemanticToken { get } - var spaceFixedJumbo: SpacingSemanticToken { get } - - // MARK: Semantic token - Spacing - Padding - Padding inline - - var spacePaddingInlineNone: SpacingPaddingInlineSemanticToken { get } - var spacePaddingInlineShorter: SpacingPaddingInlineSemanticToken { get } - var spacePaddingInlineShort: SpacingPaddingInlineSemanticToken { get } - var spacePaddingInlineMedium: SpacingPaddingInlineSemanticToken { get } - var spacePaddingInlineTall: SpacingPaddingInlineSemanticToken { get } - var spacePaddingInlineTaller: SpacingPaddingInlineSemanticToken { get } - var spacePaddingInlineTallest: SpacingPaddingInlineSemanticToken { get } - - var spacePaddingInlineWithIconNone: SpacingPaddingInlineSemanticToken { get } - var spacePaddingInlineWithIconShortest: SpacingPaddingInlineSemanticToken { get } - var spacePaddingInlineWithIconShorter: SpacingPaddingInlineSemanticToken { get } - var spacePaddingInlineWithIconShort: SpacingPaddingInlineSemanticToken { get } - var spacePaddingInlineWithIconMedium: SpacingPaddingInlineSemanticToken { get } - var spacePaddingInlineWithIconTall: SpacingPaddingInlineSemanticToken { get } - var spacePaddingInlineWithIconTaller: SpacingPaddingInlineSemanticToken { get } - var spacePaddingInlineWithIconTallest: SpacingPaddingInlineSemanticToken { get } - - var spacePaddingInlineWithArrowNone: SpacingPaddingInlineSemanticToken { get } - var spacePaddingInlineWithArrowShortest: SpacingPaddingInlineSemanticToken { get } - var spacePaddingInlineWithArrowShorter: SpacingPaddingInlineSemanticToken { get } - var spacePaddingInlineWithArrowShort: SpacingPaddingInlineSemanticToken { get } - var spacePaddingInlineWithArrowMedium: SpacingPaddingInlineSemanticToken { get } - var spacePaddingInlineWithArrowTall: SpacingPaddingInlineSemanticToken { get } - var spacePaddingInlineWithArrowTaller: SpacingPaddingInlineSemanticToken { get } - var spacePaddingInlineWithArrowTallest: SpacingPaddingInlineSemanticToken { get } - - // MARK: Semantic token - Spacing - Padding - Padding stack - - var spacePaddingBlockNone: SpacingPaddingInlineSemanticToken { get } - var spacePaddingBlockShorter: SpacingPaddingInlineSemanticToken { get } - var spacePaddingBlockShort: SpacingPaddingInlineSemanticToken { get } - var spacePaddingBlockMedium: SpacingPaddingInlineSemanticToken { get } - var spacePaddingBlockTall: SpacingPaddingInlineSemanticToken { get } - var spacePaddingBlockTaller: SpacingPaddingInlineSemanticToken { get } - var spacePaddingBlockTallest: SpacingPaddingInlineSemanticToken { get } - - var spacePaddingBlockWithIconNone: SpacingPaddingInlineSemanticToken { get } - var spacePaddingBlockWithIconShortest: SpacingPaddingInlineSemanticToken { get } - var spacePaddingBlockWithIconShorter: SpacingPaddingInlineSemanticToken { get } - var spacePaddingBlockWithIconShort: SpacingPaddingInlineSemanticToken { get } - var spacePaddingBlockWithIconMedium: SpacingPaddingInlineSemanticToken { get } - var spacePaddingBlockWithIconTall: SpacingPaddingInlineSemanticToken { get } - var spacePaddingBlockWithIconTaller: SpacingPaddingInlineSemanticToken { get } - - // MARK: Semantic token - Spacing - Padding - Padding inset - - var spaceInsetNone: SpacingPaddingInlineSemanticToken { get } - var spaceInsetSmash: SpacingPaddingInlineSemanticToken { get } - var spaceInsetShortest: SpacingPaddingInlineSemanticToken { get } - var spaceInsetShorter: SpacingPaddingInlineSemanticToken { get } - var spaceInsetShort: SpacingPaddingInlineSemanticToken { get } - var spaceInsetMedium: SpacingPaddingInlineSemanticToken { get } - var spaceInsetTall: SpacingPaddingInlineSemanticToken { get } - var spaceInsetTaller: SpacingPaddingInlineSemanticToken { get } - var spaceInsetTallest: SpacingPaddingInlineSemanticToken { get } - var spaceInsetSpacious: SpacingPaddingInlineSemanticToken { get } - - // MARK: Semantic token - Spacing - Padding - Gap inline - - var spaceColumnGapNone: SpacingPaddingInlineSemanticToken { get } - var spaceColumnGapShorter: SpacingPaddingInlineSemanticToken { get } - var spaceColumnGapShort: SpacingPaddingInlineSemanticToken { get } - var spaceColumnGapMedium: SpacingPaddingInlineSemanticToken { get } - var spaceColumnGapTall: SpacingPaddingInlineSemanticToken { get } - var spaceColumnGapTaller: SpacingPaddingInlineSemanticToken { get } - - var spaceColumnGapWithIconNone: SpacingPaddingInlineSemanticToken { get } - var spaceColumnGapWithIconShortest: SpacingPaddingInlineSemanticToken { get } - var spaceColumnGapWithIconShorter: SpacingPaddingInlineSemanticToken { get } - var spaceColumnGapWithIconShort: SpacingPaddingInlineSemanticToken { get } - var spaceColumnGapWithIconMedium: SpacingPaddingInlineSemanticToken { get } - var spaceColumnGapWithIconTall: SpacingPaddingInlineSemanticToken { get } - - var spaceColumnGapWithArrowNone: SpacingPaddingInlineSemanticToken { get } - var spaceColumnGapWithArrowShortest: SpacingPaddingInlineSemanticToken { get } - var spaceColumnGapWithArrowShorter: SpacingPaddingInlineSemanticToken { get } - var spaceColumnGapWithArrowShort: SpacingPaddingInlineSemanticToken { get } - var spaceColumnGapWithArrowMedium: SpacingPaddingInlineSemanticToken { get } - var spaceColumnGapWithArrowTall: SpacingPaddingInlineSemanticToken { get } - - // MARK: Semantic token - Spacing - Padding - Gap stack - - var spaceRowGapNone: SpacingGapStackSemanticToken { get } - var spaceRowGapShortest: SpacingGapStackSemanticToken { get } - var spaceRowGapShorter: SpacingGapStackSemanticToken { get } - var spaceRowGapShort: SpacingGapStackSemanticToken { get } - var spaceRowGapMedium: SpacingGapStackSemanticToken { get } - var spaceRowGapTall: SpacingGapStackSemanticToken { get } - - var spaceRowGapWithIconNone: SpacingGapStackSemanticToken { get } - var spaceRowGapWithIconShortest: SpacingGapStackSemanticToken { get } - var spaceRowGapWithIconShorter: SpacingGapStackSemanticToken { get } - var spaceRowGapWithIconShort: SpacingGapStackSemanticToken { get } - var spaceRowGapWithIconMedium: SpacingGapStackSemanticToken { get } - var spaceRowGapWithIconTall: SpacingGapStackSemanticToken { get } -} - -// swiftlint:enable missing_docs diff --git a/OUDS/Core/Tokens/SemanticTokens/Sources/Values/TypographyCompositeSemanticTokens.swift b/OUDS/Core/Tokens/SemanticTokens/Sources/Values/TypographyCompositeSemanticTokens.swift new file mode 100644 index 000000000..151560955 --- /dev/null +++ b/OUDS/Core/Tokens/SemanticTokens/Sources/Values/TypographyCompositeSemanticTokens.swift @@ -0,0 +1,70 @@ +// +// 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 with the tokenator with Figma able to output composites and tokenatoer able to manage them] +// 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 **typography**, but only **composite tokens** in the end. +/// There are splitted and not declared in `TypographySemanticTokens` as the *tokenator* tool parsing *Figma* JSON to Swift code is not able to manage them. +/// Thus we need to declare them in another file to prevent them to be erased. +/// +/// It defines all composite typography semantic tokens a theme must have, i.e. tokens including properties for font family, font weight, font size or line height for example. +/// +/// This protocol makes themes able to provide and override `TypographyCompositeRawToken` gathered in `MultipleTypographyTokens` instances +/// This `TypographyCompositeRawToken` is not managed by tokenator yet as it is composed by several properties. +public protocol TypographyCompositeSemanticTokens { + + // MARK: - Semantic tokens - Typography - Composites - Display + + var typeDisplayLarge: MultipleTypographyTokens { get } + var typeDisplayMedium: MultipleTypographyTokens { get } + var typeDisplaySmall: MultipleTypographyTokens { get } + + // MARK: - Semantic tokens - Typography - Composites - Heading + + var typeHeadingXLarge: MultipleTypographyTokens { get } + var typeHeadingLarge: MultipleTypographyTokens { get } + var typeHeadingMedium: MultipleTypographyTokens { get } + var typeHeadingSmall: MultipleTypographyTokens { get } + + // MARK: - Semantic tokens - Typography - Composites - Body + + var typeBodyDefaultLarge: MultipleTypographyTokens { get } + var typeBodyDefaultMedium: MultipleTypographyTokens { get } + var typeBodyDefaultSmall: MultipleTypographyTokens { get } + var typeBodyStrongLarge: MultipleTypographyTokens { get } + var typeBodyStrongMedium: MultipleTypographyTokens { get } + var typeBodyStrongSmall: MultipleTypographyTokens { get } + + // MARK: - Semantic tokens - Typography - Composites - Label + + var typeLabelDefaultXLarge: MultipleTypographyTokens { get } + var typeLabelDefaultLarge: MultipleTypographyTokens { get } + var typeLabelDefaultMedium: MultipleTypographyTokens { get } + var typeLabelDefaultSmall: MultipleTypographyTokens { get } + var typeLabelStrongXLarge: MultipleTypographyTokens { get } + var typeLabelStrongLarge: MultipleTypographyTokens { get } + var typeLabelStrongMedium: MultipleTypographyTokens { get } + var typeLabelStrongSmall: MultipleTypographyTokens { get } + + // MARK: - Semantic tokens - Typography - Composites - Code + + var typeCodeMedium: MultipleTypographyTokens { get } + var typeCodeSmall: MultipleTypographyTokens { get } +} + +// swiftlint:enable missing_docs diff --git a/OUDS/Core/Tokens/SemanticTokens/Sources/Values/TypographySemanticTokens.swift b/OUDS/Core/Tokens/SemanticTokens/Sources/Values/TypographySemanticTokens.swift index 48c942d26..3e4b69f76 100644 --- a/OUDS/Core/Tokens/SemanticTokens/Sources/Values/TypographySemanticTokens.swift +++ b/OUDS/Core/Tokens/SemanticTokens/Sources/Values/TypographySemanticTokens.swift @@ -11,10 +11,10 @@ // Software description: A SwiftUI components library with code examples for Orange Unified Design System // -import OUDSTokensRaw - // ଘ( ・ω・)_/゚・:*:・。☆ // [File to generate with 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 @@ -22,12 +22,15 @@ import OUDSTokensRaw /// It defines all typography semantic tokens a theme must have /// (`TypographyFontFamilySemanticToken`, `TypographyFontWeightSemanticToken`, `TypographyFontSizeSemanticToken`, `TypographyFontLineHeightSemanticToken`). /// +/// However the composite tokens (here the ones gathering each type of semantic token here) are defined in `TypographyCompositeSemanticTokens` because the *tokenator* +/// is not able to generate them yet, and they must be defined elsewhere to not be deleted. +/// /// In the future this file should be generated by a parser converting Figma JSON to Swift code. public protocol TypographySemanticTokens { // MARK: - Semantic token - Typography - Font - Family - var fontFamily: TypographyFontFamilyRawToken { get } + var fontFamily: TypographyFontFamilySemanticToken { get } var fontFamilyDisplay: TypographyFontFamilySemanticToken { get } var fontFamilyHeading: TypographyFontFamilySemanticToken { get } var fontFamilyBody: TypographyFontFamilySemanticToken { get } @@ -37,6 +40,7 @@ public protocol TypographySemanticTokens { // MARK: - Semantic token - Typography - Font - Weight var fontWeightDefault: TypographyFontWeightSemanticToken { get } + var fontWeightCode: TypographyFontWeightSemanticToken { get } var fontWeightStrong: TypographyFontWeightSemanticToken { get } var fontWeightDisplay: TypographyFontWeightSemanticToken { get } var fontWeightHeading: TypographyFontWeightSemanticToken { get } @@ -44,7 +48,6 @@ public protocol TypographySemanticTokens { var fontWeightBodyStrong: TypographyFontWeightSemanticToken { get } var fontWeightLabelDefault: TypographyFontWeightSemanticToken { get } var fontWeightLabelStrong: TypographyFontWeightSemanticToken { get } - var fontWeightCode: TypographyFontWeightSemanticToken { get } // MARK: - Semantic token - Typography - Font - Size @@ -106,44 +109,6 @@ public protocol TypographySemanticTokens { var fontLetterSpacingLabelSmall: MultipleFontLetterSpacingTokens { get } var fontLetterSpacingCodeMedium: MultipleFontLetterSpacingTokens { get } var fontLetterSpacingCodeSmall: MultipleFontLetterSpacingTokens { get } - - // MARK: - Semantic tokens - Typography - Composites - Display - - var typeDisplayLarge: MultipleTypographyTokens { get } - var typeDisplayMedium: MultipleTypographyTokens { get } - var typeDisplaySmall: MultipleTypographyTokens { get } - - // MARK: - Semantic tokens - Typography - Composites - Heading - - var typeHeadingXLarge: MultipleTypographyTokens { get } - var typeHeadingLarge: MultipleTypographyTokens { get } - var typeHeadingMedium: MultipleTypographyTokens { get } - var typeHeadingSmall: MultipleTypographyTokens { get } - - // MARK: - Semantic tokens - Typography - Composites - Body - - var typeBodyDefaultLarge: MultipleTypographyTokens { get } - var typeBodyDefaultMedium: MultipleTypographyTokens { get } - var typeBodyDefaultSmall: MultipleTypographyTokens { get } - var typeBodyStrongLarge: MultipleTypographyTokens { get } - var typeBodyStrongMedium: MultipleTypographyTokens { get } - var typeBodyStrongSmall: MultipleTypographyTokens { get } - - // MARK: - Semantic tokens - Typography - Composites - Label - - var typeLabelDefaultXLarge: MultipleTypographyTokens { get } - var typeLabelDefaultLarge: MultipleTypographyTokens { get } - var typeLabelDefaultMedium: MultipleTypographyTokens { get } - var typeLabelDefaultSmall: MultipleTypographyTokens { get } - var typeLabelStrongXLarge: MultipleTypographyTokens { get } - var typeLabelStrongLarge: MultipleTypographyTokens { get } - var typeLabelStrongMedium: MultipleTypographyTokens { get } - var typeLabelStrongSmall: MultipleTypographyTokens { get } - - // MARK: - Semantic tokens - Typography - Composites - Code - - var typeCodeMedium: MultipleTypographyTokens { get } - var typeCodeSmall: MultipleTypographyTokens { get } } // swiftlint:enable missing_docs diff --git a/OUDS/Core/Tokens/SemanticTokens/Sources/_OUDSTokensSemantic.docc/OUDSTokensSemantic.md b/OUDS/Core/Tokens/SemanticTokens/Sources/_OUDSTokensSemantic.docc/OUDSTokensSemantic.md index 425ca4437..6f7b5ba82 100644 --- a/OUDS/Core/Tokens/SemanticTokens/Sources/_OUDSTokensSemantic.docc/OUDSTokensSemantic.md +++ b/OUDS/Core/Tokens/SemanticTokens/Sources/_OUDSTokensSemantic.docc/OUDSTokensSemantic.md @@ -1,11 +1,11 @@ # ``OUDSTokensSemantic`` -These _tokens_ can be used mainly for _component tokens_ ([OUDSTokensComponent](https://ios.unified-design-system.orange.com/documentation/oudstokenscomponent/)) to apply some style and configuration values. +These _tokens_ can be used mainly for _component tokens_ ([OUDSTokensComponent](https://ios.unified-design-system.orange.com/documentation/oudstokenscomponent/)) to apply some style and configuration values ; today _component tokens_ or _components_ are not defined yet. They can be seen as an high level of usage with functional meanings. ## Overview -Thus if we need for example to change a warning color, supposing this color is defined as a _semantic token_, we onlyhave to change its assigned value and all components using the _semantic token_ won't be impacted in their definition. +Thus if we need for example to change a warning color, supposing this color is defined as a _semantic token_, we only have to change its assigned value and all components using the _semantic token_ won't be impacted in their definition. In addition, there are hundreds of _semantics tokens_ and we needed to add them to the abstract root theme using extensions for clarity reasons to prevent to have a _Swift class_ with thousands of lines. Each _raw token_ "family" is then declared in its dedicated _Swift protocol_ any root theme must implement. Because we choose to split responsabilities and objects into their own modules, we faced troubles to make possible for children themes to override properties declared in _protocols_ and defined in _extensions_. @@ -16,22 +16,40 @@ To keep the same semantics as the ones used in our specifications, _typealias_ a Example with ``ColorSemanticTokens``: ```swift -// Delcare the semantic tokens +// Declare the semantic tokens protocol ColorSemanticTokens { - var sysColorBrandNeutralMutedWhite: ColorAliasSemanticToken? { get } + + var colorBgPrimary: ColorSemanticToken { get } + var colorBgSecondary: ColorSemanticToken { get } + var colorBgTertiary: ColorSemanticToken { get } + // ... } // Define the semantic tokens exposed through the theme extension OUDSTheme: ColorSemanticTokens { - @objc open var sysColorBrandNeutralMutedWhite: ColorAliasSemanticToken? { ColorRawTokens.colorFunctionalWhite } + // Color is available in the module of OUDSTheme + @objc open var colorBgPrimary: ColorSemanticToken { ColorRawTokens.colorFunctionalWhite } + + // If the semantic token refers to a raw token not stored in the OUDSTheme module, override later and throw error because unxpected state if used + @objc open var colorBgSecondary: ColorSemanticToken { fatalError("🤖 Raw token unavailable for colorBgSecondary!") } + + // Possible to have tokens not defined in lwoer level must only in themes implementation, throw error if used because unexpected state + @objc open var colorBgTertiary: ColorSemanticToken { fatalError("🤖 No value defined for colorBgTertiary!") } +} + +// Add missing values +extension OrangeTheme: ColorSemanticTokens { + + // Define value value with the accessible token + @objc open var colorBgSecondary: ColorSemanticToken { OrangeBrandColorRawTokens.colorOrange200 } } ``` ## Architecture The *Multiples* folder contains some _composite class_ defined to pack double values for dedicated needs, like size classes management (_regular_ or _compact_ device modes), and also for color schemes management (_light_ and _dark_ modes). -Such *composites* are not the same as the ones defined in the *Figma* design system, they are just utilities to handle tuple of values, without the syntaxe of tuples and with some helper functions. +Such *composites* are not the same as the ones defined in the *Figma* design system, they are just utilities to handle tuple of values, without the syntax of tuples and with some helper functions. We would like to define one class for all combinations of things depending to light and dark modes, and another for regular and compact modes. However, it implies to use _Swift generics_ and it is not compatible with Objective-C runtime (we use through `@objc` keyword). We would like to define one class for all combinations of things depending to light and dark modes, and another for regular and compact modes. However, it implies to use _Swift generics_ and it is not compatible with Objective-C runtime (we use through `@objc` keyword). @@ -70,6 +88,56 @@ But beware, if you change the name of the property or if you move it from a `pro If you update the value, keep also the CHANGELOG and/or RELEASE NOTE updated so as to let yout users know the variables have been changed. +### Some note about composites + +The *tokenator* is not able today to generate composites tokens, i.e. tokens which contain by definition several properties. +For example, *elevation semantic token* dedicated to bow shadows are composed by several properties (x, y, blur, shadow). +*Typography semantic token* can be token containing several properties too (weght, size, spacinf, font family). +These are considered as *composite tokens*. They are defined in dedicated protocols and files. +Thus when the *tokenator* generates tokens without managing composites, the file can still be used as is with generated tokens, and the composites are not erased. + +## How to use semantic tokens + +In fact, the semantic tokens are declared and gathered in _Swift protocol_ so as to force any theme to implement them, and also to allow any theme to expose such properties wathever the implementation of the theme is. +Because *semantic tokens* have for values *raw tokens*, and these *raw tokens* have for values primitive types, and all these tokens are decalred with *type aliases* refering all together, you can handle a *semantic token* directly in your view because the final value will be used. +Thus, get the theme and call the needed property with some helpers. + +```swift +struct SomeView: View { + + @Environment(\.theme) private var theme // Supposed you used in your root view the `OUDSThemeableView` to register the theme + @Environment(\.colorScheme) private var colorScheme + + var body: some View { + Rectangle() + .frame(width: theme.sizeIconDecorativeTallest, height: theme.sizeIconDecorativeTallest) + .foregroundColor(theme.colorBgSecondary.color(for: colorScheme)) + .shadow(elevation: theme.elevationRaised.elevation(for: colorScheme)) + .padding(.bottom, theme.spaceFixedNone) + } +/* + - The theme provides size semantic tokens "sizeIconDecorativeTallest" and "sizeIconDecorativeTallest" + - The theme provides a color semantic token "colorBgSecondary" with values for light and dark scheme, and you can use the color(for:) helper + - The theme provides an elevation semantic token "elevationRaised" with values for compact and regualr size classes, and you can use the elevation(for:) helper + - The theme provides a space semantic token "spaceFixedNone" usable as is +*/ +} + +// Do not forget in your app to use the `OUDSThemeableView` for your theme, e.g. `OrangeTheme` +@main +struct Showcase: App { + + var body: some Scene { + WindowGroup { + OUDSThemeableView(theme: OrangeTheme()) { + // Your root view + ... + } + } + } +} +``` + ## Topics ### Group @@ -77,9 +145,11 @@ If you update the value, keep also the CHANGELOG and/or RELEASE NOTE updated so - ``BorderSemanticTokens`` - ``ColorSemanticTokens`` - ``DimensionSemanticTokens`` +- ``ElevationCompositeSemanticTokens`` - ``ElevationSemanticTokens`` - ``GridSemanticTokens`` - ``OpacitySemanticTokens`` -- ``SizingSemanticTokens`` -- ``SpacingSemanticTokens`` +- ``SizeSemanticTokens`` +- ``SpaceSemanticTokens`` - ``TypographySemanticTokens`` +- ``TypographyCompositeSemanticTokens`` diff --git a/OUDS/Core/Tokens/SemanticTokens/Tests/Multiples/MultipleColorSemanticTokenTests.swift b/OUDS/Core/Tokens/SemanticTokens/Tests/Multiples/MultipleColorSemanticTokenTests.swift index 7c20a62c9..0f58d1dd3 100644 --- a/OUDS/Core/Tokens/SemanticTokens/Tests/Multiples/MultipleColorSemanticTokenTests.swift +++ b/OUDS/Core/Tokens/SemanticTokens/Tests/Multiples/MultipleColorSemanticTokenTests.swift @@ -62,7 +62,7 @@ final class MultipleColorRawTokenTests: XCTestCase { let third = MultipleColorTokens(light: ColorRawTokens.colorFunctionalMalachite300, dark: ColorRawTokens.colorFunctionalSun100) let fourth = MultipleColorTokens(light: ColorRawTokens.colorFunctionalDarkGray80, dark: ColorRawTokens.colorFunctionalScarlet900) let fifth = MultipleColorTokens(light: ColorRawTokens.colorFunctionalMalachite300, dark: ColorRawTokens.colorFunctionalScarlet900) - let sixth = MultipleSizingTokens(compact: 12, regular: 12) + let sixth = MultipleSizeTokens(compact: 12, regular: 12) XCTAssertTrue(first.isEqual(first)) XCTAssertFalse(first.isEqual(second)) diff --git a/OUDS/Core/Tokens/SemanticTokens/Tests/Multiples/MultipleElevationTokensTests.swift b/OUDS/Core/Tokens/SemanticTokens/Tests/Multiples/MultipleElevationTokensTests.swift index b054d253f..559c83005 100644 --- a/OUDS/Core/Tokens/SemanticTokens/Tests/Multiples/MultipleElevationTokensTests.swift +++ b/OUDS/Core/Tokens/SemanticTokens/Tests/Multiples/MultipleElevationTokensTests.swift @@ -47,7 +47,7 @@ final class MultipleElevationTokensTests: XCTestCase { let third = MultipleElevationTokens(light: ElevationRawTokens.elevationBottom_4_100, dark: ElevationRawTokens.elevationBottom_3_500) let fourth = MultipleElevationTokens(light: ElevationRawTokens.elevationBottom_3_300, dark: ElevationRawTokens.elevationBottom_2_500) let fifth = MultipleElevationTokens(light: ElevationRawTokens.elevationBottom_4_100, dark: ElevationRawTokens.elevationBottom_2_500) - let sixth = MultipleSizingTokens(compact: 12, regular: 12) + let sixth = MultipleSizeTokens(compact: 12, regular: 12) XCTAssertTrue(first.isEqual(first)) XCTAssertFalse(first.isEqual(second)) diff --git a/OUDS/Core/Tokens/SemanticTokens/Tests/Multiples/MultipleFontLetterSpacingTokensTests.swift b/OUDS/Core/Tokens/SemanticTokens/Tests/Multiples/MultipleFontLetterSpacingTokensTests.swift index 0ce50b0a9..387b0b039 100644 --- a/OUDS/Core/Tokens/SemanticTokens/Tests/Multiples/MultipleFontLetterSpacingTokensTests.swift +++ b/OUDS/Core/Tokens/SemanticTokens/Tests/Multiples/MultipleFontLetterSpacingTokensTests.swift @@ -47,7 +47,7 @@ final class MultipleFontLetterSpacingTokensTests: XCTestCase { let third = MultipleFontLetterSpacingTokens(compact: TypographyRawTokens.fontLetterSpacing300, regular: TypographyRawTokens.fontLineHeight250) let fourth = MultipleFontLetterSpacingTokens(compact: TypographyRawTokens.fontLetterSpacing650, regular: TypographyRawTokens.fontLineHeight850) let fifth = MultipleFontLetterSpacingTokens(compact: TypographyRawTokens.fontLetterSpacing300, regular: TypographyRawTokens.fontLetterSpacing300) - let sixth = MultipleSizingTokens(compact: 12, regular: 12) + let sixth = MultipleSizeTokens(compact: 12, regular: 12) XCTAssertTrue(first.isEqual(first)) XCTAssertFalse(first.isEqual(second)) diff --git a/OUDS/Core/Tokens/SemanticTokens/Tests/Multiples/MultipleFontLineHeightTokensTests.swift b/OUDS/Core/Tokens/SemanticTokens/Tests/Multiples/MultipleFontLineHeightTokensTests.swift index 8f87b9237..cdd34b5d8 100644 --- a/OUDS/Core/Tokens/SemanticTokens/Tests/Multiples/MultipleFontLineHeightTokensTests.swift +++ b/OUDS/Core/Tokens/SemanticTokens/Tests/Multiples/MultipleFontLineHeightTokensTests.swift @@ -47,7 +47,7 @@ final class MultipleFontLineHeightTokensTests: XCTestCase { let third = MultipleFontLineHeightTokens(compact: TypographyRawTokens.fontLineHeight450, regular: TypographyRawTokens.fontLineHeight550) let fourth = MultipleFontLineHeightTokens(compact: TypographyRawTokens.fontLineHeight650, regular: TypographyRawTokens.fontLineHeight750) let fifth = MultipleFontLineHeightTokens(compact: TypographyRawTokens.fontLineHeight450, regular: TypographyRawTokens.fontLineHeight450) - let sixth = MultipleSizingTokens(compact: 12, regular: 12) + let sixth = MultipleSizeTokens(compact: 12, regular: 12) XCTAssertTrue(first.isEqual(first)) XCTAssertFalse(first.isEqual(second)) diff --git a/OUDS/Core/Tokens/SemanticTokens/Tests/Multiples/MultipleFontSizeTokensTests.swift b/OUDS/Core/Tokens/SemanticTokens/Tests/Multiples/MultipleFontSizeTokensTests.swift index d06f67f19..c0dc5ae4d 100644 --- a/OUDS/Core/Tokens/SemanticTokens/Tests/Multiples/MultipleFontSizeTokensTests.swift +++ b/OUDS/Core/Tokens/SemanticTokens/Tests/Multiples/MultipleFontSizeTokensTests.swift @@ -47,7 +47,7 @@ final class MultipleFontSizeTokensTests: XCTestCase { let third = MultipleFontSizeTokens(compact: TypographyRawTokens.fontSize200, regular: TypographyRawTokens.fontSize950) let fourth = MultipleFontSizeTokens(compact: TypographyRawTokens.fontSize550, regular: TypographyRawTokens.fontSize450) let fifth = MultipleFontSizeTokens(compact: TypographyRawTokens.fontSize200, regular: TypographyRawTokens.fontSize450) - let sixth = MultipleSizingTokens(compact: 12, regular: 12) + let sixth = MultipleSizeTokens(compact: 12, regular: 12) XCTAssertTrue(first.isEqual(first)) XCTAssertFalse(first.isEqual(second)) diff --git a/OUDS/Core/Tokens/SemanticTokens/Tests/Multiples/MultipleSizingSemanticTokenTests.swift b/OUDS/Core/Tokens/SemanticTokens/Tests/Multiples/MultipleSizeSemanticTokenTests.swift similarity index 61% rename from OUDS/Core/Tokens/SemanticTokens/Tests/Multiples/MultipleSizingSemanticTokenTests.swift rename to OUDS/Core/Tokens/SemanticTokens/Tests/Multiples/MultipleSizeSemanticTokenTests.swift index 60475931c..492ba21b7 100644 --- a/OUDS/Core/Tokens/SemanticTokens/Tests/Multiples/MultipleSizingSemanticTokenTests.swift +++ b/OUDS/Core/Tokens/SemanticTokens/Tests/Multiples/MultipleSizeSemanticTokenTests.swift @@ -16,13 +16,13 @@ import XCTest // swiftlint:disable required_deinit -/// To ensure the `MultipleSizingTokens` is tested as a wrapper of semantic tokens for compact and regular size classes. -final class MultipleSizingTokensTests: XCTestCase { +/// To ensure the `MultipleSizeTokens` is tested as a wrapper of semantic tokens for compact and regular size classes. +final class MultipleSizeTokensTests: XCTestCase { /// Tests if compact and regular values are preserved when defined func testInitWithOneValues() { - let unique: SizingSemanticToken = 888 - let token = MultipleSizingTokens(unique) + let unique: SizeSemanticToken = 888 + let token = MultipleSizeTokens(unique) XCTAssertTrue(token.compact == unique) XCTAssertTrue(token.regular == unique) @@ -30,22 +30,22 @@ final class MultipleSizingTokensTests: XCTestCase { /// Tests if compact and regular values are preserved when defined func testInitTwoValues() { - let compact: SizingSemanticToken = 123 - let regular: SizingSemanticToken = 456 - let token = MultipleSizingTokens(compact: compact, regular: regular) + let compact: SizeSemanticToken = 123 + let regular: SizeSemanticToken = 456 + let token = MultipleSizeTokens(compact: compact, regular: regular) XCTAssertTrue(token.compact == compact) XCTAssertTrue(token.regular == regular) } - /// Tests comparisons between two `MultipleSizingTokens` to ensure tokens are considered as equal + /// Tests comparisons between two `MultipleSizeTokens` to ensure tokens are considered as equal /// if an only if they have the same compact and regular values and have the same types. func testIsEqual() { - let first = MultipleSizingTokens(compact: 12, regular: 34) - let second = MultipleSizingTokens(compact: 56, regular: 78) - let third = MultipleSizingTokens(compact: 12, regular: 78) - let fourth = MultipleSizingTokens(compact: 56, regular: 34) - let fifth = MultipleSizingTokens(compact: 12, regular: 34) + let first = MultipleSizeTokens(compact: 12, regular: 34) + let second = MultipleSizeTokens(compact: 56, regular: 78) + let third = MultipleSizeTokens(compact: 12, regular: 78) + let fourth = MultipleSizeTokens(compact: 56, regular: 34) + let fifth = MultipleSizeTokens(compact: 12, regular: 34) let sixth = MultipleColorTokens("#000000") XCTAssertTrue(first.isEqual(first)) diff --git a/OUDS/Core/Tokens/SemanticTokens/Tests/Multiples/MultipleSpacingTokensTests.swift b/OUDS/Core/Tokens/SemanticTokens/Tests/Multiples/MultipleSpaceTokensTests.swift similarity index 62% rename from OUDS/Core/Tokens/SemanticTokens/Tests/Multiples/MultipleSpacingTokensTests.swift rename to OUDS/Core/Tokens/SemanticTokens/Tests/Multiples/MultipleSpaceTokensTests.swift index 43376323a..8e9c60659 100644 --- a/OUDS/Core/Tokens/SemanticTokens/Tests/Multiples/MultipleSpacingTokensTests.swift +++ b/OUDS/Core/Tokens/SemanticTokens/Tests/Multiples/MultipleSpaceTokensTests.swift @@ -17,28 +17,28 @@ import XCTest // swiftlint:disable required_deinit -/// To ensure the `MultipleSpacingTokens` is tested as a wrapper of semantic tokens for compact and regular size classes. -final class MultipleSpacingTokensTests: XCTestCase { +/// To ensure the `MultipleSpaceTokens` is tested as a wrapper of semantic tokens for compact and regular size classes. +final class MultipleSpaceTokensTests: XCTestCase { /// Tests if compact and regular values are preserved when defined func testInit() { let compact: DimensionRawToken = 123 let regular: DimensionRawToken = 456 - let token = MultipleSpacingTokens(compact: compact, regular: regular) + let token = MultipleSpaceTokens(compact: compact, regular: regular) XCTAssertTrue(token.compact == compact) XCTAssertTrue(token.regular == regular) } - /// Tests comparisons between two `MultipleSpacingTokens` to ensure tokens are considered as equal + /// Tests comparisons between two `MultipleSpaceTokens` to ensure tokens are considered as equal /// if an only if they have the same compact and regular values and have the same types. func testIsEqual() { - let first = MultipleSpacingTokens(compact: 12, regular: 34) - let second = MultipleSpacingTokens(compact: 56, regular: 78) - let third = MultipleSpacingTokens(compact: 12, regular: 78) - let fourth = MultipleSpacingTokens(compact: 56, regular: 34) - let fifth = MultipleSpacingTokens(compact: 12, regular: 34) - let sixth = MultipleSizingTokens(compact: 0, regular: 00) + let first = MultipleSpaceTokens(compact: 12, regular: 34) + let second = MultipleSpaceTokens(compact: 56, regular: 78) + let third = MultipleSpaceTokens(compact: 12, regular: 78) + let fourth = MultipleSpaceTokens(compact: 56, regular: 34) + let fifth = MultipleSpaceTokens(compact: 12, regular: 34) + let sixth = MultipleSizeTokens(compact: 0, regular: 00) XCTAssertTrue(first.isEqual(first)) XCTAssertFalse(first.isEqual(second)) diff --git a/OUDS/Core/Tokens/SemanticTokens/Tests/Multiples/MultipleTypographyTokensTests.swift b/OUDS/Core/Tokens/SemanticTokens/Tests/Multiples/MultipleTypographyTokensTests.swift index 241c948a0..4943fc422 100644 --- a/OUDS/Core/Tokens/SemanticTokens/Tests/Multiples/MultipleTypographyTokensTests.swift +++ b/OUDS/Core/Tokens/SemanticTokens/Tests/Multiples/MultipleTypographyTokensTests.swift @@ -47,7 +47,7 @@ final class MultipleTypographyTokensTests: XCTestCase { let third = MultipleTypographyTokens(compact: TypographyRawTokens.typeRegular150, regular: TypographyRawTokens.typeBold750) let fourth = MultipleTypographyTokens(compact: TypographyRawTokens.typeBold850, regular: TypographyRawTokens.typeBold550) let fifth = MultipleTypographyTokens(compact: TypographyRawTokens.typeRegular150, regular: TypographyRawTokens.typeBold550) - let sixth = MultipleSizingTokens(compact: 0, regular: 0) + let sixth = MultipleSizeTokens(compact: 0, regular: 0) XCTAssertTrue(first.isEqual(first)) XCTAssertFalse(first.isEqual(second)) diff --git a/OUDS/Foundations/Sources/Extensions/Font+extensions.swift b/OUDS/Foundations/Sources/Extensions/Font+extensions.swift index 3baab8673..12f138644 100644 --- a/OUDS/Foundations/Sources/Extensions/Font+extensions.swift +++ b/OUDS/Foundations/Sources/Extensions/Font+extensions.swift @@ -13,8 +13,7 @@ import SwiftUI -// TODO: Xcode 16 - Add @retroactive -extension Font.Weight: CustomStringConvertible { +extension Font.Weight: @retroactive CustomStringConvertible { /// Computes from the current `self` value a description of the object which can be used later /// for example for font loading by appending this value to the font name. diff --git a/OUDS/Foundations/TestsUtils/XCTestCase+extensions.swift b/OUDS/Foundations/TestsUtils/XCTestCase+extensions.swift index b6b084c81..867929232 100644 --- a/OUDS/Foundations/TestsUtils/XCTestCase+extensions.swift +++ b/OUDS/Foundations/TestsUtils/XCTestCase+extensions.swift @@ -36,14 +36,14 @@ extension XCTestCase { public func XCTAssertColorLighterThan(_ left: String, _ right: String, file: StaticString = #file, line: UInt = #line) { let leftBrightness = hexadecimalStringToInt(left) let rightBrightness = hexadecimalStringToInt(right) - XCTAssertGreaterThan(leftBrightness, rightBrightness, "Right color is not lighter than the left color", file: file, line: line) + XCTAssertGreaterThan(leftBrightness, rightBrightness, "Right color is not lighter than the left color", file: (file), line: line) } /// Compares two colors in hexadecimal values and asserts if `left` is "darker" than `right`, i.e. has a lower integer value public func XCTAssertColorDarkerThan(_ left: String, _ right: String, file: StaticString = #file, line: UInt = #line) { let leftBrightness = hexadecimalStringToInt(left) let rightBrightness = hexadecimalStringToInt(right) - XCTAssertLessThan(leftBrightness, rightBrightness, "Right color is not darker than the left color", file: file, line: line) + XCTAssertLessThan(leftBrightness, rightBrightness, "Right color is not darker than the left color", file: (file), line: line) } // MARK: - Helpers diff --git a/OUDS/Modules/Sources/_OUDSModules.docc/OUDSModules.md b/OUDS/Modules/Sources/_OUDSModules.docc/OUDSModules.md index 2dce9a470..e31fe06db 100644 --- a/OUDS/Modules/Sources/_OUDSModules.docc/OUDSModules.md +++ b/OUDS/Modules/Sources/_OUDSModules.docc/OUDSModules.md @@ -4,5 +4,5 @@ The catalog of all modules provided by OUDS. ## Overview -Comming soon +❗**More details coming soon.**❗ diff --git a/OUDS/README.md b/OUDS/README.md index 91dd0bee2..67f1f3d12 100644 --- a/OUDS/README.md +++ b/OUDS/README.md @@ -65,62 +65,7 @@ These _tokens_ can be used to apply some style and configuration values to _comp Thus if a component need to change for example its _background color_, and if a _component token_ is used for it, then only the value of this _token_ should be changed without any modification on the _component_ definition. _Components_ use _component tokens_ exposed through the _theme_ to get their style values. -Example with `FormsTextInputComponentTokens`: - -```swift -public protocol FormsTextInputComponentTokens { - var ftiTitleFontWeight: TypographyFontWeightSemanticToken { get } - var ftiTitleFontSize: TypographyFontSizeSemanticToken { get } - var ftiTitleColor: ColorSemanticToken { get } - - var ftiBorderColor: ColorSemanticToken { get } - var ftiBorderStyle: BorderStyleSemanticToken { get } - var ftiBorderWidth: BorderWidthSemanticToken { get } -} - -extension OUDSTheme: FormsTextInputComponentTokens { - private static let defaultBlack: ColorSemanticToken = ColorRawTokens.colorFunctionalBlack - private static let defaultWhite: ColorSemanticToken = ColorRawTokens.colorFunctionalWhite - - @objc open var ftiTitleFontWeight: TypographyFontWeightSemanticToken { fontWeightHeading } - @objc open var ftiTitleFontSize: TypographyFontSizeSemanticToken { fontSizeLabelLarge } - @objc open var ftiTitleColor: ColorSemanticToken { colorContentBrandPrimaryLight ?? Self.defaultBlack } - - @objc open var ftiBorderColor: ColorSemanticToken { colorBorderEmphasizedLight ?? Self.defaultBlack } - @objc open var ftiBorderStyle: BorderStyleSemanticToken { borderStyleDefault } - @objc open var ftiBorderWidth: BorderWidthSemanticToken { borderWidthThin } -} - -// The View - -struct OUDSFormsTextInput: View { - - // ... - @Environment(\.theme) var theme - - public var body: some View { - VStack(spacing: theme.spacePaddingBlockComponentTall) { - Label( - title: { - Text("Example of OUDSFormsTextInput") - .fontWeight(theme.ftiTitleFontWeight.fontWeight) - .font(.system(size: theme.ftiTitleFontSize)) - .foregroundColor(theme.ftiTitleColor.color) - }, - icon: { /*@START_MENU_TOKEN@*/Image(systemName: "42.circle")/*@END_MENU_TOKEN@*/ } - ) - Text("Write bellow some awesome text!") - .fontWeight(theme.ftiSubtitleFontWeight.fontWeight) - .font(.system(size: theme.ftiSubtitleFontSize)) - .foregroundColor(theme.ftiSubtitleColor.color) - TextField(placeholder, text: $value) - } - .padding(theme.spacePaddingBlockComponentTall) - .background(theme.ftiBorderColor.color(for: colorScheme)) - .border(theme.ftiBorderColor.color(for: colorScheme), width: theme.ftiBorderWidth) - } -} -``` +❗**More details coming soon.**❗ #### Semantic tokens @@ -131,16 +76,36 @@ In addition, there are hundreds of _semantics tokens_ and we needed to add them That is the reason why tokens are exposed as `@objc open` to be available and oveeridable anywhere. To keep the same semantics as the ones used in our specifications, _typealias_ are used to as to make the links to _primitive types_ and our logic of _tokens_. These type aliases are available for those who want to make their own theme. -Example with `ColorSemanticTokens`: +Example with `ColorSemanticTokens``: ```swift +// Declare the semantic tokens protocol ColorSemanticTokens { - var sysColorBrandNeutralMutedWhite: ColorAliasSemanticToken? { get } + + var colorBgPrimary: ColorSemanticToken { get } + var colorBgSecondary: ColorSemanticToken { get } + var colorBgTertiary: ColorSemanticToken { get } + // ... } +// Define the semantic tokens exposed through the theme extension OUDSTheme: ColorSemanticTokens { - @objc open var sysColorBrandNeutralMutedWhite: ColorAliasSemanticToken? { ColorRawTokens.colorFunctionalWhite } + // Color is available in the module of OUDSTheme + @objc open var colorBgPrimary: ColorSemanticToken { ColorRawTokens.colorFunctionalWhite } + + // If the semantic token refers to a raw token not stored in the OUDSTheme module, override later and throw error because unxpected state if used + @objc open var colorBgSecondary: ColorSemanticToken { fatalError("🤖 Raw token unavailable for colorBgSecondary!") } + + // Possible to have tokens not defined in lwoer level must only in themes implementation, throw error if used because unexpected state + @objc open var colorBgTertiary: ColorSemanticToken { fatalError("🤖 No value defined for colorBgTertiary!") } +} + +// Add missing values +extension OrangeTheme: ColorSemanticTokens { + + // Define value value with the accessible token + @objc open var colorBgSecondary: ColorSemanticToken { OrangeBrandColorRawTokens.colorOrange200 } } ``` @@ -246,7 +211,7 @@ extension OrangeCustomTheme { // For FormsTextInputComponentTokens, used in comp override public var ftiSubtitleFontSize: TypographyFontSizeSemanticToken { fontSizeLabelMedium } override public var ftiSubtitleColor: ColorSemanticToken { ColorRawTokens.colorFunctionalMalachite500 } - override public var ftiBackgroundColor: ColorSemanticToken { colorBackgroundPrimary } + override public var ftiBackgroundColor: ColorSemanticToken { colorBgrimary } override public var ftiBorderColor: ColorSemanticToken { colorBorderEmphasized } @@ -257,7 +222,7 @@ extension OrangeCustomTheme { // For FormsTextInputComponentTokens, used in comp extension OrangeCustomTheme { // For ColorSemanticTokens using anywhere - override var colorBackgroundPrimary: ColorSemanticToken { + override var colorBgPrimary: ColorSemanticToken { MultipleColorTokens(light: ColorRawTokens.ColorRawTokens.colorFunctionalSun500, dark: ColorRawTokens.ColorRawTokens.colorFunctionalSun800) } } diff --git a/Package.resolved b/Package.resolved index faaccc756..da3f754c4 100644 --- a/Package.resolved +++ b/Package.resolved @@ -1,22 +1,22 @@ { - "originHash" : "e71a5b08dd41106aab31bef69b8183c27372e20aad985d3798a43491894b7e7c", + "originHash" : "b0e966f4ace0da078a6fcc1dcd094050f4d63b9437f87a3a6b4948c17b90db4e", "pins" : [ { - "identity" : "swift-docc-plugin", + "identity" : "swift-snapshot-testing", "kind" : "remoteSourceControl", - "location" : "https://github.com/apple/swift-docc-plugin", + "location" : "https://github.com/pointfreeco/swift-snapshot-testing.git", "state" : { - "revision" : "2eb22993b3dfd0c0d32729b357c8dabb6cd44680", - "version" : "1.4.2" + "revision" : "7b0bbbae90c41f848f90ac7b4df6c4f50068256d", + "version" : "1.17.5" } }, { - "identity" : "swift-docc-symbolkit", + "identity" : "swift-syntax", "kind" : "remoteSourceControl", - "location" : "https://github.com/swiftlang/swift-docc-symbolkit", + "location" : "https://github.com/swiftlang/swift-syntax", "state" : { - "revision" : "b45d1f2ed151d057b54504d653e0da5552844e34", - "version" : "1.0.0" + "revision" : "515f79b522918f83483068d99c68daeb5116342d", + "version" : "600.0.0-prerelease-2024-09-04" } } ], diff --git a/Package.swift b/Package.swift index 62a14e217..141a117c2 100644 --- a/Package.swift +++ b/Package.swift @@ -1,4 +1,4 @@ -// swift-tools-version: 5.10 +// swift-tools-version: 6.0 // // Software Name: OUDS iOS @@ -122,5 +122,5 @@ let package = Package( path: "OUDS/Foundations/TestsUtils"), ], - swiftLanguageVersions: [.v5] + swiftLanguageModes: [.v6] ) diff --git a/README.md b/README.md index 392ba00d1..d7369c019 100644 --- a/README.md +++ b/README.md @@ -30,7 +30,9 @@ [![Code size](https://img.shields.io/github/languages/code-size/Orange-OpenSource/ouds-ios?style=for-the-badge)](https://github.com/Orange-OpenSource/ouds-ios) [![Opened issues](https://img.shields.io/github/issues-raw/Orange-OpenSource/ouds-ios?style=for-the-badge)](https://github.com/Orange-OpenSource/ouds-ios/issues) -[![iOS 15.0](https://img.shields.io/badge/iOS-15.0-informational.svg?style=for-the-badge)](https://developer.apple.com/support/app-store "iOS 15 supports") +[![iOS 15.0](https://img.shields.io/badge/iOS-15.0-FF1AB2?style=for-the-badge)](https://developer.apple.com/support/app-store "iOS 15 supports") +[![Xcode 16](https://img.shields.io/badge/Xcode-16-blue?style=for-the-badge)](https://developer.apple.com/documentation/xcode-release-notes/xcode-16-release-notes) +[![Swift 6](https://img.shields.io/badge/Swift-6-orange?style=for-the-badge)](https://www.swift.org/blog/announcing-swift-6/) ## Content diff --git a/Showcase/Podfile b/Showcase/Podfile index 3d484b7f0..75da0bc47 100644 --- a/Showcase/Podfile +++ b/Showcase/Podfile @@ -16,7 +16,7 @@ use_frameworks! platform :ios, '15.0' target 'Showcase' do - pod 'SwiftLint', '0.56.1' + pod 'SwiftLint', '0.57.0' pod 'SwiftFormat/CLI', '0.54.3' end diff --git a/Showcase/Podfile.lock b/Showcase/Podfile.lock index e486e484b..16923568f 100644 --- a/Showcase/Podfile.lock +++ b/Showcase/Podfile.lock @@ -1,10 +1,10 @@ PODS: - SwiftFormat/CLI (0.54.3) - - SwiftLint (0.56.1) + - SwiftLint (0.57.0) DEPENDENCIES: - SwiftFormat/CLI (= 0.54.3) - - SwiftLint (= 0.56.1) + - SwiftLint (= 0.57.0) SPEC REPOS: trunk: @@ -13,8 +13,8 @@ SPEC REPOS: SPEC CHECKSUMS: SwiftFormat: 0e575b1d412d27cd5906c59fab64a806ba8f2b8e - SwiftLint: c5fa0b7eece474d43d2178b581a1242a16267347 + SwiftLint: eb47480d47c982481592c195c221d11013a679cc -PODFILE CHECKSUM: d4eaef68c29378eeba698b5b3aa1a53cad7903d2 +PODFILE CHECKSUM: bfef5a8fc64db26e764a569d0867dc51654ba6b9 COCOAPODS: 1.15.2 diff --git a/Showcase/Showcase.xcodeproj/project.pbxproj b/Showcase/Showcase.xcodeproj/project.pbxproj index 816e5f03b..0f54c9aaa 100644 --- a/Showcase/Showcase.xcodeproj/project.pbxproj +++ b/Showcase/Showcase.xcodeproj/project.pbxproj @@ -33,8 +33,8 @@ 0740A99A2C9874670069D24A /* SnapshotTesting in Frameworks */ = {isa = PBXBuildFile; productRef = 0740A9992C9874670069D24A /* SnapshotTesting */; }; 0740A99B2C9874E70069D24A /* Snapshot.swift in Sources */ = {isa = PBXBuildFile; fileRef = 074008222C942810006B8729 /* Snapshot.swift */; }; 0747947A2CAE882A0033C2D8 /* EmptyState.swift in Sources */ = {isa = PBXBuildFile; fileRef = 074794792CAE882A0033C2D8 /* EmptyState.swift */; }; - 075114DB2CB7D28D00B8B759 /* SizingTokenElement.swift in Sources */ = {isa = PBXBuildFile; fileRef = 075114D82CB7D28D00B8B759 /* SizingTokenElement.swift */; }; - 075114DC2CB7D28D00B8B759 /* SizingTokenPage.swift in Sources */ = {isa = PBXBuildFile; fileRef = 075114D92CB7D28D00B8B759 /* SizingTokenPage.swift */; }; + 075114DB2CB7D28D00B8B759 /* SizeTokenElement.swift in Sources */ = {isa = PBXBuildFile; fileRef = 075114D82CB7D28D00B8B759 /* SizeTokenElement.swift */; }; + 075114DC2CB7D28D00B8B759 /* SizeTokenPage.swift in Sources */ = {isa = PBXBuildFile; fileRef = 075114D92CB7D28D00B8B759 /* SizeTokenPage.swift */; }; 075114E02CB7FDC200B8B759 /* ColorTokenElement.swift in Sources */ = {isa = PBXBuildFile; fileRef = 075114DE2CB7FDC200B8B759 /* ColorTokenElement.swift */; }; 075114E12CB7FDC200B8B759 /* ColorTokenPage.swift in Sources */ = {isa = PBXBuildFile; fileRef = 075114DF2CB7FDC200B8B759 /* ColorTokenPage.swift */; }; 075114E82CB81F0E00B8B759 /* ShowcaseTokenIllustration.swift in Sources */ = {isa = PBXBuildFile; fileRef = 075114E72CB81F0E00B8B759 /* ShowcaseTokenIllustration.swift */; }; @@ -48,10 +48,14 @@ 0765B4A22CC15C0500E69359 /* NamedColor+OnContent.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0765B4A12CC15C0500E69359 /* NamedColor+OnContent.swift */; }; 0765B4A42CC15C3E00E69359 /* NamedColor+Chart.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0765B4A32CC15C3E00E69359 /* NamedColor+Chart.swift */; }; 0765B4A62CC15C9D00E69359 /* NamedColor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0765B4A52CC15C9D00E69359 /* NamedColor.swift */; }; - 077CCE572CB426090059CC28 /* SpacingTokenElement.swift in Sources */ = {isa = PBXBuildFile; fileRef = 077CCE512CB426090059CC28 /* SpacingTokenElement.swift */; }; - 077CCE582CB426090059CC28 /* SpacingTokenPage.swift in Sources */ = {isa = PBXBuildFile; fileRef = 077CCE522CB426090059CC28 /* SpacingTokenPage.swift */; }; + 077CCE572CB426090059CC28 /* SpaceTokenElement.swift in Sources */ = {isa = PBXBuildFile; fileRef = 077CCE512CB426090059CC28 /* SpaceTokenElement.swift */; }; + 077CCE582CB426090059CC28 /* SpaceTokenPage.swift in Sources */ = {isa = PBXBuildFile; fileRef = 077CCE522CB426090059CC28 /* SpaceTokenPage.swift */; }; 077CCE592CB426090059CC28 /* DimensionTokenElement.swift in Sources */ = {isa = PBXBuildFile; fileRef = 077CCE542CB426090059CC28 /* DimensionTokenElement.swift */; }; 077CCE5C2CB431C50059CC28 /* ShowcaseVariantElement.swift in Sources */ = {isa = PBXBuildFile; fileRef = 077CCE5B2CB431C50059CC28 /* ShowcaseVariantElement.swift */; }; + 0784B2712CCB86C500299C10 /* NamedSize+IconWithTypography.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0784B26F2CCB86C500299C10 /* NamedSize+IconWithTypography.swift */; }; + 0784B2732CCB8CC800299C10 /* NamedSize+IconDecorative.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0784B2722CCB8CC800299C10 /* NamedSize+IconDecorative.swift */; }; + 0784B2762CCBD9C300299C10 /* NamedTypography.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0784B2752CCBD9C300299C10 /* NamedTypography.swift */; }; + 0784B2782CCBDD8900299C10 /* NamedTypography+Illustration.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0784B2772CCBDD8900299C10 /* NamedTypography+Illustration.swift */; }; 07CF426B2CA30728000BD03E /* TokensPage.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07CF426A2CA30728000BD03E /* TokensPage.swift */; }; 07CF42722CA31AC3000BD03E /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 07CF42712CA31AC3000BD03E /* Assets.xcassets */; }; 07CF42742CA3EC58000BD03E /* CardIllustration.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07CF42732CA3EC58000BD03E /* CardIllustration.swift */; }; @@ -62,6 +66,16 @@ 07CF42842CA45DA9000BD03E /* BorderTokenElement.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07CF42812CA45DA9000BD03E /* BorderTokenElement.swift */; }; 07CF42852CA45DA9000BD03E /* BorderTokenPage.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07CF42822CA45DA9000BD03E /* BorderTokenPage.swift */; }; 07CF42892CA55BC8000BD03E /* ThemeSelection.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07CF42882CA55BC8000BD03E /* ThemeSelection.swift */; }; + 07F0FA8A2CC935FF000F166F /* NameSpace+PaddingInlineWithIcon.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07F0FA892CC935FF000F166F /* NameSpace+PaddingInlineWithIcon.swift */; }; + 07F0FA8C2CC9408C000F166F /* NameSpace+PaddingInlineWithArrow.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07F0FA8B2CC9408C000F166F /* NameSpace+PaddingInlineWithArrow.swift */; }; + 07F7533B2CC785620007450D /* ShowcaseSectionHeaderStyle.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07F7533A2CC785620007450D /* ShowcaseSectionHeaderStyle.swift */; }; + 07F75A372CC644C80004F1AD /* NamedSpace+Scaled.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07F75A362CC644C80004F1AD /* NamedSpace+Scaled.swift */; }; + 07F75A392CC6462D0004F1AD /* NamedSpace+Fixed.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07F75A382CC6462D0004F1AD /* NamedSpace+Fixed.swift */; }; + 07F75A3B2CC651EB0004F1AD /* NameSpace+PaddingInline.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07F75A3A2CC651EB0004F1AD /* NameSpace+PaddingInline.swift */; }; + 07F75A3D2CC653BD0004F1AD /* NameSpace+PaddingInset.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07F75A3C2CC653BD0004F1AD /* NameSpace+PaddingInset.swift */; }; + 07F75A3F2CC653CD0004F1AD /* NameSpace+GapInline.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07F75A3E2CC653CD0004F1AD /* NameSpace+GapInline.swift */; }; + 07F75A412CC653EB0004F1AD /* NameSpace+GapStack.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07F75A402CC653EB0004F1AD /* NameSpace+GapStack.swift */; }; + 07F75A432CC654050004F1AD /* NameSpace+PaddingStack.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07F75A422CC654050004F1AD /* NameSpace+PaddingStack.swift */; }; 51087A7B2C46DF9F00160CCF /* Bundle+extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 51087A7A2C46DF9F00160CCF /* Bundle+extension.swift */; }; 510A9CD02C5679A300430620 /* OUDSComponents in Frameworks */ = {isa = PBXBuildFile; productRef = 510A9CCF2C5679A300430620 /* OUDSComponents */; }; 512364792C3D7B2D00572FD5 /* Podfile.lock in Resources */ = {isa = PBXBuildFile; fileRef = 512364782C3D7B2D00572FD5 /* Podfile.lock */; }; @@ -112,8 +126,8 @@ 0740A98F2C9873500069D24A /* ShowcaseTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = ShowcaseTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 0740A99C2C9888CF0069D24A /* ShowcaseUITestPlan.xctestplan */ = {isa = PBXFileReference; lastKnownFileType = text; name = ShowcaseUITestPlan.xctestplan; path = ../ShowcaseUITestPlan.xctestplan; sourceTree = ""; }; 074794792CAE882A0033C2D8 /* EmptyState.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EmptyState.swift; sourceTree = ""; }; - 075114D82CB7D28D00B8B759 /* SizingTokenElement.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SizingTokenElement.swift; sourceTree = ""; }; - 075114D92CB7D28D00B8B759 /* SizingTokenPage.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SizingTokenPage.swift; sourceTree = ""; }; + 075114D82CB7D28D00B8B759 /* SizeTokenElement.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SizeTokenElement.swift; sourceTree = ""; }; + 075114D92CB7D28D00B8B759 /* SizeTokenPage.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SizeTokenPage.swift; sourceTree = ""; }; 075114DE2CB7FDC200B8B759 /* ColorTokenElement.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ColorTokenElement.swift; sourceTree = ""; }; 075114DF2CB7FDC200B8B759 /* ColorTokenPage.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ColorTokenPage.swift; sourceTree = ""; }; 075114E72CB81F0E00B8B759 /* ShowcaseTokenIllustration.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ShowcaseTokenIllustration.swift; sourceTree = ""; }; @@ -127,10 +141,14 @@ 0765B4A12CC15C0500E69359 /* NamedColor+OnContent.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "NamedColor+OnContent.swift"; sourceTree = ""; }; 0765B4A32CC15C3E00E69359 /* NamedColor+Chart.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "NamedColor+Chart.swift"; sourceTree = ""; }; 0765B4A52CC15C9D00E69359 /* NamedColor.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NamedColor.swift; sourceTree = ""; }; - 077CCE512CB426090059CC28 /* SpacingTokenElement.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SpacingTokenElement.swift; sourceTree = ""; }; - 077CCE522CB426090059CC28 /* SpacingTokenPage.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SpacingTokenPage.swift; sourceTree = ""; }; + 077CCE512CB426090059CC28 /* SpaceTokenElement.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SpaceTokenElement.swift; sourceTree = ""; }; + 077CCE522CB426090059CC28 /* SpaceTokenPage.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SpaceTokenPage.swift; sourceTree = ""; }; 077CCE542CB426090059CC28 /* DimensionTokenElement.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DimensionTokenElement.swift; sourceTree = ""; }; 077CCE5B2CB431C50059CC28 /* ShowcaseVariantElement.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ShowcaseVariantElement.swift; sourceTree = ""; }; + 0784B26F2CCB86C500299C10 /* NamedSize+IconWithTypography.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "NamedSize+IconWithTypography.swift"; sourceTree = ""; }; + 0784B2722CCB8CC800299C10 /* NamedSize+IconDecorative.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "NamedSize+IconDecorative.swift"; sourceTree = ""; }; + 0784B2752CCBD9C300299C10 /* NamedTypography.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NamedTypography.swift; sourceTree = ""; }; + 0784B2772CCBDD8900299C10 /* NamedTypography+Illustration.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "NamedTypography+Illustration.swift"; sourceTree = ""; }; 07CEDD802C7DB921003E1885 /* generateDoc.sh */ = {isa = PBXFileReference; lastKnownFileType = text.script.sh; name = generateDoc.sh; path = ../generateDoc.sh; sourceTree = ""; }; 07CF426A2CA30728000BD03E /* TokensPage.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TokensPage.swift; sourceTree = ""; }; 07CF42712CA31AC3000BD03E /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; @@ -142,6 +160,16 @@ 07CF42812CA45DA9000BD03E /* BorderTokenElement.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BorderTokenElement.swift; sourceTree = ""; }; 07CF42822CA45DA9000BD03E /* BorderTokenPage.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BorderTokenPage.swift; sourceTree = ""; }; 07CF42882CA55BC8000BD03E /* ThemeSelection.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ThemeSelection.swift; sourceTree = ""; }; + 07F0FA892CC935FF000F166F /* NameSpace+PaddingInlineWithIcon.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "NameSpace+PaddingInlineWithIcon.swift"; sourceTree = ""; }; + 07F0FA8B2CC9408C000F166F /* NameSpace+PaddingInlineWithArrow.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "NameSpace+PaddingInlineWithArrow.swift"; sourceTree = ""; }; + 07F7533A2CC785620007450D /* ShowcaseSectionHeaderStyle.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ShowcaseSectionHeaderStyle.swift; sourceTree = ""; }; + 07F75A362CC644C80004F1AD /* NamedSpace+Scaled.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "NamedSpace+Scaled.swift"; sourceTree = ""; }; + 07F75A382CC6462D0004F1AD /* NamedSpace+Fixed.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "NamedSpace+Fixed.swift"; sourceTree = ""; }; + 07F75A3A2CC651EB0004F1AD /* NameSpace+PaddingInline.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "NameSpace+PaddingInline.swift"; sourceTree = ""; }; + 07F75A3C2CC653BD0004F1AD /* NameSpace+PaddingInset.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "NameSpace+PaddingInset.swift"; sourceTree = ""; }; + 07F75A3E2CC653CD0004F1AD /* NameSpace+GapInline.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "NameSpace+GapInline.swift"; sourceTree = ""; }; + 07F75A402CC653EB0004F1AD /* NameSpace+GapStack.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "NameSpace+GapStack.swift"; sourceTree = ""; }; + 07F75A422CC654050004F1AD /* NameSpace+PaddingStack.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "NameSpace+PaddingStack.swift"; sourceTree = ""; }; 07FDCD912C296A500009AA13 /* OUDS Showcase.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "OUDS Showcase.app"; sourceTree = BUILT_PRODUCTS_DIR; }; 07FDCDA52C296B4B0009AA13 /* .gitattributes */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = .gitattributes; path = ../.gitattributes; sourceTree = ""; }; 07FDCDA72C296B7A0009AA13 /* README.md */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = net.daringfireball.markdown; name = README.md; path = ../README.md; sourceTree = ""; }; @@ -217,6 +245,7 @@ children = ( 0735430F2CA15440001187EA /* Cards */, 51BD760F2C466FCF0033365D /* ShowcaseElementsPage.swift */, + 07F7533A2CC785620007450D /* ShowcaseSectionHeaderStyle.swift */, 51E3FF0A2CAFD9AE00F1BC59 /* ShowcaseElementPage.swift */, 073543152CA17275001187EA /* ShowcaseElement.swift */, 077CCE5B2CB431C50059CC28 /* ShowcaseVariantElement.swift */, @@ -228,6 +257,7 @@ 073543192CA17388001187EA /* Typography */ = { isa = PBXGroup; children = ( + 0784B2742CCBD9A900299C10 /* NamedTypography */, 073543172CA172CA001187EA /* TypographyTokenElement.swift */, 0735431A2CA18C48001187EA /* TypographyTokenPage.swift */, ); @@ -261,13 +291,14 @@ path = ShowcaseTests; sourceTree = ""; }; - 075114DA2CB7D28D00B8B759 /* Sizing */ = { + 075114DA2CB7D28D00B8B759 /* Size */ = { isa = PBXGroup; children = ( - 075114D82CB7D28D00B8B759 /* SizingTokenElement.swift */, - 075114D92CB7D28D00B8B759 /* SizingTokenPage.swift */, + 0784B2702CCB86C500299C10 /* NamedSize */, + 075114D82CB7D28D00B8B759 /* SizeTokenElement.swift */, + 075114D92CB7D28D00B8B759 /* SizeTokenPage.swift */, ); - path = Sizing; + path = Size; sourceTree = ""; }; 075114DD2CB7FD7E00B8B759 /* Color */ = { @@ -306,25 +337,44 @@ name = "Recovered References"; sourceTree = ""; }; - 077CCE532CB426090059CC28 /* Spacing */ = { + 077CCE532CB426090059CC28 /* Space */ = { isa = PBXGroup; children = ( - 077CCE512CB426090059CC28 /* SpacingTokenElement.swift */, - 077CCE522CB426090059CC28 /* SpacingTokenPage.swift */, + 07F75A352CC644940004F1AD /* NamedSpace */, + 077CCE512CB426090059CC28 /* SpaceTokenElement.swift */, + 077CCE522CB426090059CC28 /* SpaceTokenPage.swift */, ); - path = Spacing; + path = Space; sourceTree = ""; }; 077CCE562CB426090059CC28 /* Dimension */ = { isa = PBXGroup; children = ( - 077CCE532CB426090059CC28 /* Spacing */, - 075114DA2CB7D28D00B8B759 /* Sizing */, + 077CCE532CB426090059CC28 /* Space */, + 075114DA2CB7D28D00B8B759 /* Size */, 077CCE542CB426090059CC28 /* DimensionTokenElement.swift */, ); path = Dimension; sourceTree = ""; }; + 0784B2702CCB86C500299C10 /* NamedSize */ = { + isa = PBXGroup; + children = ( + 0784B26F2CCB86C500299C10 /* NamedSize+IconWithTypography.swift */, + 0784B2722CCB8CC800299C10 /* NamedSize+IconDecorative.swift */, + ); + path = NamedSize; + sourceTree = ""; + }; + 0784B2742CCBD9A900299C10 /* NamedTypography */ = { + isa = PBXGroup; + children = ( + 0784B2772CCBDD8900299C10 /* NamedTypography+Illustration.swift */, + 0784B2752CCBD9C300299C10 /* NamedTypography.swift */, + ); + path = NamedTypography; + sourceTree = ""; + }; 07CF42752CA3F461000BD03E /* Elevation */ = { isa = PBXGroup; children = ( @@ -360,6 +410,22 @@ path = ThemeSelection; sourceTree = ""; }; + 07F75A352CC644940004F1AD /* NamedSpace */ = { + isa = PBXGroup; + children = ( + 07F75A362CC644C80004F1AD /* NamedSpace+Scaled.swift */, + 07F0FA892CC935FF000F166F /* NameSpace+PaddingInlineWithIcon.swift */, + 07F75A382CC6462D0004F1AD /* NamedSpace+Fixed.swift */, + 07F75A3A2CC651EB0004F1AD /* NameSpace+PaddingInline.swift */, + 07F75A3C2CC653BD0004F1AD /* NameSpace+PaddingInset.swift */, + 07F75A422CC654050004F1AD /* NameSpace+PaddingStack.swift */, + 07F75A3E2CC653CD0004F1AD /* NameSpace+GapInline.swift */, + 07F75A402CC653EB0004F1AD /* NameSpace+GapStack.swift */, + 07F0FA8B2CC9408C000F166F /* NameSpace+PaddingInlineWithArrow.swift */, + ); + path = NamedSpace; + sourceTree = ""; + }; 07FDCD882C296A500009AA13 = { isa = PBXGroup; children = ( @@ -718,48 +784,62 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 075114DC2CB7D28D00B8B759 /* SizingTokenPage.swift in Sources */, + 07F75A3D2CC653BD0004F1AD /* NameSpace+PaddingInset.swift in Sources */, + 075114DC2CB7D28D00B8B759 /* SizeTokenPage.swift in Sources */, 077CCE592CB426090059CC28 /* DimensionTokenElement.swift in Sources */, 07CF42852CA45DA9000BD03E /* BorderTokenPage.swift in Sources */, 0765B4982CC15A4000E69359 /* NamedColor+Always.swift in Sources */, + 07F75A392CC6462D0004F1AD /* NamedSpace+Fixed.swift in Sources */, 07CF42842CA45DA9000BD03E /* BorderTokenElement.swift in Sources */, 07CF42802CA41325000BD03E /* OpacityTokenPage.swift in Sources */, 075114E02CB7FDC200B8B759 /* ColorTokenElement.swift in Sources */, + 07F75A3B2CC651EB0004F1AD /* NameSpace+PaddingInline.swift in Sources */, 0747947A2CAE882A0033C2D8 /* EmptyState.swift in Sources */, 51BD762B2C466FCF0033365D /* MainView.swift in Sources */, 07CF42742CA3EC58000BD03E /* CardIllustration.swift in Sources */, + 07F0FA8A2CC935FF000F166F /* NameSpace+PaddingInlineWithIcon.swift in Sources */, + 07F0FA8C2CC9408C000F166F /* NameSpace+PaddingInlineWithArrow.swift in Sources */, 07CF42782CA3F4BE000BD03E /* ElevationTokenElement.swift in Sources */, 0765B4A42CC15C3E00E69359 /* NamedColor+Chart.swift in Sources */, 07CF42792CA3F4BE000BD03E /* ElevationTokenPage.swift in Sources */, 075114E12CB7FDC200B8B759 /* ColorTokenPage.swift in Sources */, 0735432A2CA192F9001187EA /* TokenElement.swift in Sources */, + 07F7533B2CC785620007450D /* ShowcaseSectionHeaderStyle.swift in Sources */, 073543182CA172CA001187EA /* TypographyTokenElement.swift in Sources */, 077CCE5C2CB431C50059CC28 /* ShowcaseVariantElement.swift in Sources */, - 077CCE582CB426090059CC28 /* SpacingTokenPage.swift in Sources */, + 077CCE582CB426090059CC28 /* SpaceTokenPage.swift in Sources */, + 07F75A3F2CC653CD0004F1AD /* NameSpace+GapInline.swift in Sources */, 51BD76292C466FCF0033365D /* WebView.swift in Sources */, 51BD76232C466FCF0033365D /* ShowcaseElementsPage.swift in Sources */, 0765B49C2CC15B2E00E69359 /* NamedColor+Elevation.swift in Sources */, 51E3FF0B2CAFD9AE00F1BC59 /* ShowcaseElementPage.swift in Sources */, 0765B4942CC1597C00E69359 /* NamedColor+Background.swift in Sources */, - 075114DB2CB7D28D00B8B759 /* SizingTokenElement.swift in Sources */, + 075114DB2CB7D28D00B8B759 /* SizeTokenElement.swift in Sources */, 073543162CA17275001187EA /* ShowcaseElement.swift in Sources */, 0765B4A02CC15BBC00E69359 /* NamedColor+Content.swift in Sources */, 0765B49A2CC15ACE00E69359 /* NamedColor+Border.swift in Sources */, 51087A7B2C46DF9F00160CCF /* Bundle+extension.swift in Sources */, 0765B4962CC159F600E69359 /* NamedColor+Action.swift in Sources */, 0765B4A22CC15C0500E69359 /* NamedColor+OnContent.swift in Sources */, - 077CCE572CB426090059CC28 /* SpacingTokenElement.swift in Sources */, + 0784B2782CCBDD8900299C10 /* NamedTypography+Illustration.swift in Sources */, + 077CCE572CB426090059CC28 /* SpaceTokenElement.swift in Sources */, 0735431B2CA18C48001187EA /* TypographyTokenPage.swift in Sources */, + 07F75A412CC653EB0004F1AD /* NameSpace+GapStack.swift in Sources */, 51BD76222C466FCF0033365D /* ComponentsPage.swift in Sources */, 07CF42892CA55BC8000BD03E /* ThemeSelection.swift in Sources */, 075114E82CB81F0E00B8B759 /* ShowcaseTokenIllustration.swift in Sources */, 07CF427F2CA41325000BD03E /* OpacityTokenElement.swift in Sources */, 07CF426B2CA30728000BD03E /* TokensPage.swift in Sources */, + 07F75A372CC644C80004F1AD /* NamedSpace+Scaled.swift in Sources */, 0765B4A62CC15C9D00E69359 /* NamedColor.swift in Sources */, 073543112CA154DE001187EA /* Card.swift in Sources */, 51BD76212C466FCF0033365D /* AboutPage.swift in Sources */, + 0784B2732CCB8CC800299C10 /* NamedSize+IconDecorative.swift in Sources */, 51BD762A2C466FCF0033365D /* Showcase.swift in Sources */, 0765B49E2CC15B7E00E69359 /* NamedColor+Decorative.swift in Sources */, + 07F75A432CC654050004F1AD /* NameSpace+PaddingStack.swift in Sources */, + 0784B2762CCBD9C300299C10 /* NamedTypography.swift in Sources */, + 0784B2712CCB86C500299C10 /* NamedSize+IconWithTypography.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -819,7 +899,7 @@ SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; SUPPORTS_XR_DESIGNED_FOR_IPHONE_IPAD = NO; SWIFT_EMIT_LOC_STRINGS = NO; - SWIFT_VERSION = 5.0; + SWIFT_VERSION = 6.0; TARGETED_DEVICE_FAMILY = "1,2"; TEST_HOST = "$(BUILT_PRODUCTS_DIR)/OUDS Showcase.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/OUDS Showcase"; }; @@ -843,7 +923,7 @@ SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; SUPPORTS_XR_DESIGNED_FOR_IPHONE_IPAD = NO; SWIFT_EMIT_LOC_STRINGS = NO; - SWIFT_VERSION = 5.0; + SWIFT_VERSION = 6.0; TARGETED_DEVICE_FAMILY = "1,2"; TEST_HOST = "$(BUILT_PRODUCTS_DIR)/OUDS Showcase.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/OUDS Showcase"; }; @@ -972,11 +1052,11 @@ isa = XCBuildConfiguration; baseConfigurationReference = F98488CF05532E8CD405A8F8 /* Pods-Showcase.debug.xcconfig */; buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIconDev; + ASSETCATALOG_COMPILER_APPICON_NAME = AppIconDebug; ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; ASSETCATALOG_COMPILER_INCLUDE_ALL_APPICON_ASSETS = YES; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 12; + CURRENT_PROJECT_VERSION = 13; DEVELOPMENT_ASSET_PATHS = "\"Showcase/Preview Content\""; DEVELOPMENT_TEAM = MG2LSJNJB6; ENABLE_PREVIEWS = YES; @@ -992,7 +1072,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 0.4.1; + MARKETING_VERSION = 0.5.0; PRODUCT_BUNDLE_IDENTIFIER = "com.orange.ouds.demoapp-debug"; PRODUCT_NAME = "OUDS Showcase"; SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; @@ -1000,7 +1080,7 @@ SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; SUPPORTS_XR_DESIGNED_FOR_IPHONE_IPAD = NO; SWIFT_EMIT_LOC_STRINGS = YES; - SWIFT_VERSION = 5.0; + SWIFT_VERSION = 6.0; TARGETED_DEVICE_FAMILY = "1,2"; }; name = Debug; @@ -1014,7 +1094,7 @@ ASSETCATALOG_COMPILER_INCLUDE_ALL_APPICON_ASSETS = YES; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution"; CODE_SIGN_STYLE = Manual; - CURRENT_PROJECT_VERSION = 12; + CURRENT_PROJECT_VERSION = 13; DEVELOPMENT_ASSET_PATHS = "\"Showcase/Preview Content\""; DEVELOPMENT_TEAM = ""; "DEVELOPMENT_TEAM[sdk=iphoneos*]" = MG2LSJNJB6; @@ -1031,7 +1111,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 0.4.1; + MARKETING_VERSION = 0.5.0; PRODUCT_BUNDLE_IDENTIFIER = com.orange.ouds.demoapp; PRODUCT_NAME = "OUDS Showcase"; PROVISIONING_PROFILE_SPECIFIER = ""; @@ -1041,7 +1121,7 @@ SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; SUPPORTS_XR_DESIGNED_FOR_IPHONE_IPAD = NO; SWIFT_EMIT_LOC_STRINGS = YES; - SWIFT_VERSION = 5.0; + SWIFT_VERSION = 6.0; TARGETED_DEVICE_FAMILY = "1,2"; }; name = Release; @@ -1108,8 +1188,8 @@ isa = XCRemoteSwiftPackageReference; repositoryURL = "https://github.com/pointfreeco/swift-snapshot-testing.git"; requirement = { - kind = upToNextMajorVersion; - minimumVersion = 1.17.5; + kind = exactVersion; + version = 1.17.6; }; }; /* End XCRemoteSwiftPackageReference section */ diff --git a/Showcase/Showcase.xcworkspace/xcshareddata/swiftpm/Package.resolved b/Showcase/Showcase.xcworkspace/xcshareddata/swiftpm/Package.resolved new file mode 100644 index 000000000..cd9f08df4 --- /dev/null +++ b/Showcase/Showcase.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -0,0 +1,24 @@ +{ + "originHash" : "b0e966f4ace0da078a6fcc1dcd094050f4d63b9437f87a3a6b4948c17b90db4e", + "pins" : [ + { + "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" : "515f79b522918f83483068d99c68daeb5116342d", + "version" : "600.0.0-prerelease-2024-09-04" + } + } + ], + "version" : 3 +} diff --git a/Showcase/Showcase/MainView.swift b/Showcase/Showcase/MainView.swift index e9dbd1e2f..7832109d3 100644 --- a/Showcase/Showcase/MainView.swift +++ b/Showcase/Showcase/MainView.swift @@ -24,15 +24,15 @@ struct MainView: View { TabView { TokensPage() .tabItem { - Label("app_bottomBar_tokens", image: "ic_token") + Label("app_bottomBar_tokens_label", image: "ic_token") } ComponentsPage() .tabItem { - Label("app_bottomBar_components", image: "ic_component_atom") + Label("app_bottomBar_components_label", image: "ic_component_atom") } AboutPage() .tabItem { - Label("app_bottomBar_about", image: "ic_info") + Label("app_bottomBar_about_label", image: "ic_info") } } .accentColor(theme.colorContentBrandPrimary.color(for: colorScheme)) diff --git a/Showcase/Showcase/Pages/About/AboutPage.swift b/Showcase/Showcase/Pages/About/AboutPage.swift index 2d9706138..45d7e54ea 100644 --- a/Showcase/Showcase/Pages/About/AboutPage.swift +++ b/Showcase/Showcase/Pages/About/AboutPage.swift @@ -41,16 +41,16 @@ struct AboutPage: View { List { NavigationLink { WebView(from: privacyPolicyUrl) - .navigationTitle("app_about_label_privacyPolicy") + .navigationTitle("app_about_privacyPolicy_label") } label: { - Text("app_about_label_privacyPolicy") + Text("app_about_privacyPolicy_label") } NavigationLink { WebView(from: legalInformationUrl) - .navigationTitle("app_about_label_legalInformation") + .navigationTitle("app_about_legalInformation_label") } label: { - Text("app_about_label_legalInformation") + Text("app_about_legalInformation_label") } // TODO: Only for debug purposes, should be displayed in another way @@ -61,7 +61,7 @@ struct AboutPage: View { Text("Build details (GitHub): \(buildDetails)") } } - .navigationTitle("app_bottomBar_about") + .navigationTitle("app_bottomBar_about_label") } } } diff --git a/Showcase/Showcase/Pages/Components/ComponentsPage.swift b/Showcase/Showcase/Pages/Components/ComponentsPage.swift index cbeab94aa..aa10b49d2 100644 --- a/Showcase/Showcase/Pages/Components/ComponentsPage.swift +++ b/Showcase/Showcase/Pages/Components/ComponentsPage.swift @@ -23,6 +23,7 @@ struct ComponentsPage: View { var body: some View { NavigationView { EmptyState() + .navigationTitle("app_bottomBar_component_label") } } } diff --git a/Showcase/Showcase/Pages/Components/EmptyState.swift b/Showcase/Showcase/Pages/Components/EmptyState.swift index 002c05d58..f0f6fc863 100644 --- a/Showcase/Showcase/Pages/Components/EmptyState.swift +++ b/Showcase/Showcase/Pages/Components/EmptyState.swift @@ -26,9 +26,9 @@ struct EmptyState: View { .frame(width: 160, height: 160, alignment: .center) VStack(alignment: .center, spacing: theme.spaceFixedShorter) { - Text("app_component_empty_content_text") + Text("app_component_emptyContent_text") .typeHeadingMedium(theme) - Text("app_component_empty_content_description_text") + Text("app_component_emptyContent_description_text") .typeBodyDefaultSmall(theme) } .padding(.vertical, theme.spaceFixedMedium) diff --git a/Showcase/Showcase/Pages/ThemeSelection/ThemeSelection.swift b/Showcase/Showcase/Pages/ThemeSelection/ThemeSelection.swift index 2a86e82a6..9197cb8db 100644 --- a/Showcase/Showcase/Pages/ThemeSelection/ThemeSelection.swift +++ b/Showcase/Showcase/Pages/ThemeSelection/ThemeSelection.swift @@ -16,12 +16,21 @@ import OUDSThemesInverse import OUDSThemesOrange import SwiftUI -// MARK: - Extension of OUDSTheme +// MARK: - Extensions of OUDSTheme + +extension OUDSTheme: @retroactive Equatable { + + // MARK: Equtabable + + public static func == (lhs: OUDSTheme, rhs: OUDSTheme) -> Bool { + lhs.name == rhs.name + } +} /// Extension of the `OUDSTheme` to add both `Identifiable` and `Hashable`. /// An `OUDSTheme` must be `Identifiable` to be enumerated like in `ForEach`(e.g. used to build the list of elements in picker). /// It must be `Hashable` because it is used in a picker than need `Hashable` element. -extension OUDSTheme: Identifiable, Hashable { +extension OUDSTheme: @retroactive Identifiable, @retroactive Hashable { var name: String { if self is InverseTheme { // Is also an OrangeTheme, should be checked before @@ -43,10 +52,6 @@ extension OUDSTheme: Identifiable, Hashable { // MARK: Hashable - public static func == (lhs: OUDSTheme, rhs: OUDSTheme) -> Bool { - lhs.name == rhs.name - } - public func hash(into hasher: inout Hasher) { hasher.combine(name) } @@ -111,8 +116,9 @@ struct ThemeSelectionButton: View { } } .pickerStyle(.automatic) + .accessibilityLabel("app_topBar_theme_button_a11y") } label: { - Image(systemName: "paintpalette") + Image(systemName: "paintpalette").accessibilityHidden(true) } .foregroundColor(themeProvider.currentTheme.colorContentBrandPrimary.color(for: colorScheme)) } diff --git a/Showcase/Showcase/Pages/Tokens/Border/BorderTokenPage.swift b/Showcase/Showcase/Pages/Tokens/Border/BorderTokenPage.swift index 1441b7cb1..2eb687bda 100644 --- a/Showcase/Showcase/Pages/Tokens/Border/BorderTokenPage.swift +++ b/Showcase/Showcase/Pages/Tokens/Border/BorderTokenPage.swift @@ -32,7 +32,7 @@ struct BorderTokenPage: View { } } } header: { - Text("Width") + Text("app_tokens_border_width_label") .typeHeadingLarge(theme) .foregroundStyle(theme.colorContentDefault.color(for: colorScheme)) } @@ -44,7 +44,7 @@ struct BorderTokenPage: View { } } } header: { - Text("Radius") + Text("app_tokens_border_radius_label") .typeHeadingLarge(theme) .foregroundStyle(theme.colorContentDefault.color(for: colorScheme)) } @@ -56,7 +56,7 @@ struct BorderTokenPage: View { } } } header: { - Text("Style") + Text("app_tokens_border_style_label") .typeHeadingLarge(theme) .foregroundStyle(theme.colorContentDefault.color(for: colorScheme)) } @@ -68,7 +68,7 @@ struct BorderTokenPage: View { private var rectangle: some View { Rectangle() - .fill(theme.colorBackgroundSecondary.color(for: colorScheme)) + .fill(theme.colorBgSecondary.color(for: colorScheme)) .frame(width: 64, height: 64) } @@ -146,7 +146,8 @@ private enum NamedBorderWidth: String, CaseIterable { case borderWidthMedium case borderWidthThick case borderWidthThicker - case borderWidthOutsideFocus + case borderWidthFocus + case borderWidthFocusInset func token(from theme: OUDSTheme) -> BorderWidthSemanticToken { switch self { @@ -162,8 +163,10 @@ private enum NamedBorderWidth: String, CaseIterable { return theme.borderWidthThick case .borderWidthThicker: return theme.borderWidthThicker - case .borderWidthOutsideFocus: - return theme.borderWidthOutsideFocus + case .borderWidthFocus: + return theme.borderWidthFocus + case .borderWidthFocusInset: + return theme.borderWidthFocusInset } } } diff --git a/Showcase/Showcase/Pages/Tokens/Color/ColorTokenPage.swift b/Showcase/Showcase/Pages/Tokens/Color/ColorTokenPage.swift index 24c02e598..19ca26ec0 100644 --- a/Showcase/Showcase/Pages/Tokens/Color/ColorTokenPage.swift +++ b/Showcase/Showcase/Pages/Tokens/Color/ColorTokenPage.swift @@ -30,7 +30,6 @@ struct ColorTokenPage: View { Section { illustrationForAlways() } header: { header("Always") } Section { illustrationForContent() } header: { header("Content") } Section { illustrationForContentOnBackground() } header: { header("Content On Background") } - Section { illustrationForContentOnBackground() } header: { header("Content On Background") } Section { illustrationForBorder() } header: { header("Border") } Section { illustrationForeElevation() } header: { header("Elevation") } Section { illustrationForDecorative() } header: { header("Decorative") } @@ -42,62 +41,78 @@ struct ColorTokenPage: View { // MARK: Private helpers private func header(_ text: String) -> some View { - Text(text) - .typeHeadingMedium(theme) - .frame(maxWidth: .infinity, alignment: .leading) + Text(text).showcaseSectionHeaderStyle() } private func illustrationForBackground() -> some View { - ForEach(NamedColor.Background.allCases, id: \.rawValue) { namedColorToken in - illustration(for: namedColorToken.token(from: theme), name: namedColorToken.rawValue) + VStack(alignment: .leading, spacing: theme.spaceFixedNone) { + ForEach(NamedColor.Background.allCases, id: \.rawValue) { namedColorToken in + illustration(for: namedColorToken.token(from: theme), name: namedColorToken.rawValue) + } } } private func illustrationForAction() -> some View { - ForEach(NamedColor.Action.allCases, id: \.rawValue) { namedColorToken in - illustration(for: namedColorToken.token(from: theme), name: namedColorToken.rawValue) + VStack(alignment: .leading, spacing: theme.spaceFixedNone) { + ForEach(NamedColor.Action.allCases, id: \.rawValue) { namedColorToken in + illustration(for: namedColorToken.token(from: theme), name: namedColorToken.rawValue) + } } } private func illustrationForAlways() -> some View { - ForEach(NamedColor.Always.allCases, id: \.rawValue) { namedColorToken in - illustration(for: namedColorToken.token(from: theme), name: namedColorToken.rawValue) + VStack(alignment: .leading, spacing: theme.spaceFixedNone) { + ForEach(NamedColor.Always.allCases, id: \.rawValue) { namedColorToken in + illustration(for: namedColorToken.token(from: theme), name: namedColorToken.rawValue) + } } } private func illustrationForChart() -> some View { - ForEach(NamedColor.Chart.allCases, id: \.rawValue) { namedColorToken in - illustration(for: namedColorToken.token(from: theme), name: namedColorToken.rawValue) + VStack(alignment: .leading, spacing: theme.spaceFixedNone) { + ForEach(NamedColor.Chart.allCases, id: \.rawValue) { namedColorToken in + illustration(for: namedColorToken.token(from: theme), name: namedColorToken.rawValue) + } } } private func illustrationForBorder() -> some View { - ForEach(NamedColor.Border.allCases, id: \.rawValue) { namedColorToken in - illustration(for: namedColorToken.token(from: theme), name: namedColorToken.rawValue) + VStack(alignment: .leading, spacing: theme.spaceFixedNone) { + ForEach(NamedColor.Border.allCases, id: \.rawValue) { namedColorToken in + illustration(for: namedColorToken.token(from: theme), name: namedColorToken.rawValue) + } } } private func illustrationForContent() -> some View { - ForEach(NamedColor.Content.allCases, id: \.rawValue) { namedColorToken in - illustration(for: namedColorToken.token(from: theme), name: namedColorToken.rawValue) + VStack(alignment: .leading, spacing: theme.spaceFixedNone) { + ForEach(NamedColor.Content.allCases, id: \.rawValue) { namedColorToken in + illustration(for: namedColorToken.token(from: theme), name: namedColorToken.rawValue) + } } } private func illustrationForContentOnBackground() -> some View { - ForEach(NamedColor.ContentOnBackground.allCases, id: \.rawValue) { namedColorToken in - illustration(for: namedColorToken.token(from: theme), name: namedColorToken.rawValue) + VStack(alignment: .leading, spacing: theme.spaceFixedNone) { + ForEach(NamedColor.ContentOnBg.allCases, id: \.rawValue) { namedColorToken in + illustration(for: namedColorToken.token(from: theme), name: namedColorToken.rawValue) + } } } private func illustrationForDecorative() -> some View { - ForEach(NamedColor.Decorative.allCases, id: \.rawValue) { namedColorToken in - illustration(for: namedColorToken.token(from: theme), name: namedColorToken.rawValue) + VStack(alignment: .leading, spacing: theme.spaceFixedNone) { + ForEach(NamedColor.Decorative.allCases, id: \.rawValue) { namedColorToken in + illustration(for: namedColorToken.token(from: theme), name: namedColorToken.rawValue) + } } } private func illustrationForeElevation() -> some View { - ForEach(NamedColor.Elevation.allCases, id: \.rawValue) { namedColorToken in - illustration(for: namedColorToken.token(from: theme), name: namedColorToken.rawValue) + VStack(alignment: .leading, spacing: theme.spaceFixedNone) { + ForEach(NamedColor.Elevation.allCases, id: \.rawValue) { namedColorToken in + illustration(for: namedColorToken.token(from: theme), name: namedColorToken.rawValue) + } } } @@ -129,7 +144,7 @@ private struct ExtraBorderModifier: ViewModifier { let color: ColorRawToken func body(content: Content) -> some View { - let defaultContentBackground = theme.colorBackgroundPrimary.color(for: colorScheme) + let defaultContentBackground = theme.colorBgPrimary.color(for: colorScheme) let addBorder = color.color == defaultContentBackground if addBorder { diff --git a/Showcase/Showcase/Pages/Tokens/Color/NamedColor/NamedColor+Action.swift b/Showcase/Showcase/Pages/Tokens/Color/NamedColor/NamedColor+Action.swift index 1d1660bf9..f1a12259b 100644 --- a/Showcase/Showcase/Pages/Tokens/Color/NamedColor/NamedColor+Action.swift +++ b/Showcase/Showcase/Pages/Tokens/Color/NamedColor/NamedColor+Action.swift @@ -21,117 +21,116 @@ extension NamedColor { enum Action: String, CaseIterable { case colorActionSelected - case colorActionSelectedOnBackgroundEmphasized + case colorActionSelectedOnBgEmphasized case colorActionDisabled - case colorActionDisabledOnBackgroundEmphasized + case colorActionDisabledOnBgEmphasized case colorActionVisited - case colorActionVistedOnBackgroundEmphasized + case colorActionVistedOnBgEmphasized case colorActionPrimaryEnabled - case colorActionPrimaryEnabledOnBackgroundEmphasized + case colorActionPrimaryEnabledOnBgEmphasized case colorActionPrimaryHover - case colorActionPrimaryHoverOnBackgroundEmphasized - // NOTE: #124 - Following case(s) is / are not managed because not defined values! -// case colorActionPrimaryPressed - case colorActionPrimaryPressedOnBackgroundEmphasized + case colorActionPrimaryHoverOnBgEmphasized + case colorActionPrimaryPressed + case colorActionPrimaryPressedOnBgEmphasized case colorActionPrimaryLoading - case colorActionPrimaryLoadingOnBackgroundEmphasized + case colorActionPrimaryLoadingOnBgEmphasized case colorActionPrimaryFocus - case colorActionPrimaryFocusOnBackgroundEmphasized + case colorActionPrimaryFocusOnBgEmphasized case colorActionSecondaryEnabled - case colorActionSecondaryEnabledOnBackgroundEmphasized + case colorActionSecondaryEnabledOnBgEmphasized case colorActionSecondaryHover - case colorActionSecondaryHoverOnBackgroundEmphasized + case colorActionSecondaryHoverOnBgEmphasized case colorActionSecondaryPressed - case colorActionSecondaryPressedOnBackgroundEmphasized + case colorActionSecondaryPressedOnBgEmphasized case colorActionSecondaryLoading - case colorActionSecondaryLoadingOnBackgroundEmphasized + case colorActionSecondaryLoadingOnBgEmphasized case colorActionSecondaryFocus - case colorActionSecondaryFocusOnBackgroundEmphasized + case colorActionSecondaryFocusOnBgEmphasized case colorActionNegativeEnabled case colorActionNegativeHover case colorActionNegativePressed case colorActionNegativeLoading case colorActionNegativeFocus - case colorActionOnBackgroundActionDisabled - case colorActionOnBackgroundActionDisabledOnBackgroundEmphasized - case colorActionOnBackgroundActionNegative - case colorActionOnBackgroundActionPrimaryEnabled - case colorActionOnBackgroundActionPrimaryEnabledOnBackgroundEmphasized - case colorActionOnBackgroundActionPrimaryHover - case colorActionOnBackgroundActionPrimaryHoverOnBackgroundEmphasized - case colorActionOnBackgroundActionPrimaryPressed - case colorActionOnBackgroundActionPrimaryPressedOnBackgroundEmphasized - case colorActionOnBackgroundActionPrimaryLoading - case colorActionOnBackgroundActionPrimaryLoadingOnBackgroundEmphasized - case colorActionOnBackgroundActionPrimaryFocus - case colorActionOnBackgroundActionPrimaryFocusOnBackgroundEmphasized + case colorActionOnBgActionDisabled + case colorActionOnBgActionDisabledOnBgEmphasized + case colorActionOnBgActionNegative + case colorActionOnBgActionPrimaryEnabled + case colorActionOnBgActionPrimaryEnabledOnBgEmphasized + case colorActionOnBgActionPrimaryHover + case colorActionOnBgActionPrimaryHoverOnBgEmphasized + case colorActionOnBgActionPrimaryPressed + case colorActionOnBgActionPrimaryPressedOnBgEmphasized + case colorActionOnBgActionPrimaryLoading + case colorActionOnBgActionPrimaryLoadingOnBgEmphasized + case colorActionOnBgActionPrimaryFocus + case colorActionOnBgActionPrimaryFocusOnBgEmphasized // NOTE: #124 - Following case(s) is / are not managed because not defined values! -// case colorActionOnBackgroundActionSecondaryEnabled -// case colorActionOnBackgroundActionSecondaryEnabledOnBackgroundEmphasized -// case colorActionOnBackgroundActionSecondaryHover -// case colorActionOnBackgroundActionSecondaryHoverOnBackgroundEmphasized -// case colorActionOnBackgroundActionSecondaryPressed -// case colorActionOnBackgroundActionSecondaryPressedOnBackgroundEmphasized -// case colorActionOnBackgroundActionSecondaryLoading -// case colorActionOnBackgroundActionSecondaryLoadingOnBackgroundEmphasized -// case colorActionOnBackgroundActionSecondaryFocus -// case colorActionOnBackgroundActionSecondaryFocusOnBackgroundEmphasized +// case colorActionOnBgActionSecondaryEnabled +// case colorActionOnBgActionSecondaryEnabledOnBgEmphasized +// case colorActionOnBgActionSecondaryHover +// case colorActionOnBgActionSecondaryHoverOnBgEmphasized +// case colorActionOnBgActionSecondaryPressed +// case colorActionOnBgActionSecondaryPressedOnBgEmphasized +// case colorActionOnBgActionSecondaryLoading +// case colorActionOnBgActionSecondaryLoadingOnBgEmphasized +// case colorActionOnBgActionSecondaryFocus +// case colorActionOnBgActionSecondaryFocusOnBgEmphasized func token(from theme: OUDSTheme) -> ColorSemanticToken { switch self { case .colorActionSelected: return theme.colorActionSelected - case .colorActionSelectedOnBackgroundEmphasized: - return theme.colorActionSelectedOnBackgroundEmphasized + case .colorActionSelectedOnBgEmphasized: + return theme.colorActionSelectedOnBgEmphasized case .colorActionDisabled: return theme.colorActionDisabled - case .colorActionDisabledOnBackgroundEmphasized: - return theme.colorActionDisabledOnBackgroundEmphasized + case .colorActionDisabledOnBgEmphasized: + return theme.colorActionDisabledOnBgEmphasized case .colorActionVisited: return theme.colorActionVisited - case .colorActionVistedOnBackgroundEmphasized: - return theme.colorActionVistedOnBackgroundEmphasized + case .colorActionVistedOnBgEmphasized: + return theme.colorActionVistedOnBgEmphasized case .colorActionPrimaryEnabled: return theme.colorActionPrimaryEnabled - case .colorActionPrimaryEnabledOnBackgroundEmphasized: - return theme.colorActionPrimaryEnabledOnBackgroundEmphasized + case .colorActionPrimaryEnabledOnBgEmphasized: + return theme.colorActionPrimaryEnabledOnBgEmphasized case .colorActionPrimaryHover: return theme.colorActionPrimaryHover - case .colorActionPrimaryHoverOnBackgroundEmphasized: - return theme.colorActionPrimaryHoverOnBackgroundEmphasized + case .colorActionPrimaryHoverOnBgEmphasized: + return theme.colorActionPrimaryHoverOnBgEmphasized // NOTE: #124 - Following case(s) is / are not managed because not defined values! -// case .colorActionPrimaryPressed: -// return theme.colorActionPrimaryPressed - case .colorActionPrimaryPressedOnBackgroundEmphasized: - return theme.colorActionPrimaryPressedOnBackgroundEmphasized + case .colorActionPrimaryPressed: + return theme.colorActionPrimaryPressed + case .colorActionPrimaryPressedOnBgEmphasized: + return theme.colorActionPrimaryPressedOnBgEmphasized case .colorActionPrimaryLoading: return theme.colorActionPrimaryLoading - case .colorActionPrimaryLoadingOnBackgroundEmphasized: - return theme.colorActionPrimaryLoadingOnBackgroundEmphasized + case .colorActionPrimaryLoadingOnBgEmphasized: + return theme.colorActionPrimaryLoadingOnBgEmphasized case .colorActionPrimaryFocus: return theme.colorActionPrimaryFocus - case .colorActionPrimaryFocusOnBackgroundEmphasized: - return theme.colorActionPrimaryFocusOnBackgroundEmphasized + case .colorActionPrimaryFocusOnBgEmphasized: + return theme.colorActionPrimaryFocusOnBgEmphasized case .colorActionSecondaryEnabled: return theme.colorActionSecondaryEnabled - case .colorActionSecondaryEnabledOnBackgroundEmphasized: - return theme.colorActionSecondaryEnabledOnBackgroundEmphasized + case .colorActionSecondaryEnabledOnBgEmphasized: + return theme.colorActionSecondaryEnabledOnBgEmphasized case .colorActionSecondaryHover: return theme.colorActionSecondaryHover - case .colorActionSecondaryHoverOnBackgroundEmphasized: - return theme.colorActionSecondaryHoverOnBackgroundEmphasized + case .colorActionSecondaryHoverOnBgEmphasized: + return theme.colorActionSecondaryHoverOnBgEmphasized case .colorActionSecondaryPressed: return theme.colorActionSecondaryPressed - case .colorActionSecondaryPressedOnBackgroundEmphasized: - return theme.colorActionSecondaryPressedOnBackgroundEmphasized + case .colorActionSecondaryPressedOnBgEmphasized: + return theme.colorActionSecondaryPressedOnBgEmphasized case .colorActionSecondaryLoading: return theme.colorActionSecondaryLoading - case .colorActionSecondaryLoadingOnBackgroundEmphasized: - return theme.colorActionSecondaryLoadingOnBackgroundEmphasized + case .colorActionSecondaryLoadingOnBgEmphasized: + return theme.colorActionSecondaryLoadingOnBgEmphasized case .colorActionSecondaryFocus: return theme.colorActionSecondaryFocus - case .colorActionSecondaryFocusOnBackgroundEmphasized: - return theme.colorActionSecondaryFocusOnBackgroundEmphasized + case .colorActionSecondaryFocusOnBgEmphasized: + return theme.colorActionSecondaryFocusOnBgEmphasized case .colorActionNegativeEnabled: return theme.colorActionNegativeEnabled case .colorActionNegativeHover: @@ -142,53 +141,53 @@ extension NamedColor { return theme.colorActionNegativeLoading case .colorActionNegativeFocus: return theme.colorActionNegativeFocus - case .colorActionOnBackgroundActionDisabled: - return theme.colorActionOnBackgroundActionDisabled - case .colorActionOnBackgroundActionDisabledOnBackgroundEmphasized: - return theme.colorActionOnBackgroundActionDisabledOnBackgroundEmphasized - case .colorActionOnBackgroundActionNegative: - return theme.colorActionOnBackgroundActionNegative - case .colorActionOnBackgroundActionPrimaryEnabled: - return theme.colorActionOnBackgroundActionPrimaryEnabled - case .colorActionOnBackgroundActionPrimaryEnabledOnBackgroundEmphasized: - return theme.colorActionOnBackgroundActionPrimaryEnabledOnBackgroundEmphasized - case .colorActionOnBackgroundActionPrimaryHover: - return theme.colorActionOnBackgroundActionPrimaryHover - case .colorActionOnBackgroundActionPrimaryHoverOnBackgroundEmphasized: - return theme.colorActionOnBackgroundActionPrimaryHoverOnBackgroundEmphasized - case .colorActionOnBackgroundActionPrimaryPressed: - return theme.colorActionOnBackgroundActionPrimaryPressed - case .colorActionOnBackgroundActionPrimaryPressedOnBackgroundEmphasized: - return theme.colorActionOnBackgroundActionPrimaryPressedOnBackgroundEmphasized - case .colorActionOnBackgroundActionPrimaryLoading: - return theme.colorActionOnBackgroundActionPrimaryLoading - case .colorActionOnBackgroundActionPrimaryLoadingOnBackgroundEmphasized: - return theme.colorActionOnBackgroundActionPrimaryLoadingOnBackgroundEmphasized - case .colorActionOnBackgroundActionPrimaryFocus: - return theme.colorActionOnBackgroundActionPrimaryFocus - case .colorActionOnBackgroundActionPrimaryFocusOnBackgroundEmphasized: - return theme.colorActionOnBackgroundActionPrimaryFocusOnBackgroundEmphasized + case .colorActionOnBgActionDisabled: + return theme.colorActionOnBgActionDisabled + case .colorActionOnBgActionDisabledOnBgEmphasized: + return theme.colorActionOnBgActionDisabledOnBgEmphasized + case .colorActionOnBgActionNegative: + return theme.colorActionOnBgActionNegative + case .colorActionOnBgActionPrimaryEnabled: + return theme.colorActionOnBgActionPrimaryEnabled + case .colorActionOnBgActionPrimaryEnabledOnBgEmphasized: + return theme.colorActionOnBgActionPrimaryEnabledOnBgEmphasized + case .colorActionOnBgActionPrimaryHover: + return theme.colorActionOnBgActionPrimaryHover + case .colorActionOnBgActionPrimaryHoverOnBgEmphasized: + return theme.colorActionOnBgActionPrimaryHoverOnBgEmphasized + case .colorActionOnBgActionPrimaryPressed: + return theme.colorActionOnBgActionPrimaryPressed + case .colorActionOnBgActionPrimaryPressedOnBgEmphasized: + return theme.colorActionOnBgActionPrimaryPressedOnBgEmphasized + case .colorActionOnBgActionPrimaryLoading: + return theme.colorActionOnBgActionPrimaryLoading + case .colorActionOnBgActionPrimaryLoadingOnBgEmphasized: + return theme.colorActionOnBgActionPrimaryLoadingOnBgEmphasized + case .colorActionOnBgActionPrimaryFocus: + return theme.colorActionOnBgActionPrimaryFocus + case .colorActionOnBgActionPrimaryFocusOnBgEmphasized: + return theme.colorActionOnBgActionPrimaryFocusOnBgEmphasized // NOTE: #124 - Following case(s) is / are not managed because not defined values! -// case .colorActionOnBackgroundActionSecondaryEnabled: -// return theme.colorActionOnBackgroundActionSecondaryEnabled -// case .colorActionOnBackgroundActionSecondaryEnabledOnBackgroundEmphasized: -// return theme.colorActionOnBackgroundActionSecondaryEnabledOnBackgroundEmphasized -// case .colorActionOnBackgroundActionSecondaryHover: -// return theme.colorActionOnBackgroundActionSecondaryHover -// case .colorActionOnBackgroundActionSecondaryHoverOnBackgroundEmphasized: -// return theme.colorActionOnBackgroundActionSecondaryHoverOnBackgroundEmphasized -// case .colorActionOnBackgroundActionSecondaryPressed: -// return theme.colorActionOnBackgroundActionSecondaryPressed -// case .colorActionOnBackgroundActionSecondaryPressedOnBackgroundEmphasized: -// return theme.colorActionOnBackgroundActionSecondaryPressedOnBackgroundEmphasized -// case .colorActionOnBackgroundActionSecondaryLoading: -// return theme.colorActionOnBackgroundActionSecondaryLoading -// case .colorActionOnBackgroundActionSecondaryLoadingOnBackgroundEmphasized: -// return theme.colorActionOnBackgroundActionSecondaryLoadingOnBackgroundEmphasized -// case .colorActionOnBackgroundActionSecondaryFocus: -// return theme.colorActionOnBackgroundActionSecondaryFocus -// case .colorActionOnBackgroundActionSecondaryFocusOnBackgroundEmphasized: -// return theme.colorActionOnBackgroundActionSecondaryFocusOnBackgroundEmphasized +// case .colorActionOnBgActionSecondaryEnabled: +// return theme.colorActionOnBgActionSecondaryEnabled +// case .colorActionOnBgActionSecondaryEnabledOnBgEmphasized: +// return theme.colorActionOnBgActionSecondaryEnabledOnBgEmphasized +// case .colorActionOnBgActionSecondaryHover: +// return theme.colorActionOnBgActionSecondaryHover +// case .colorActionOnBgActionSecondaryHoverOnBgEmphasized: +// return theme.colorActionOnBgActionSecondaryHoverOnBgEmphasized +// case .colorActionOnBgActionSecondaryPressed: +// return theme.colorActionOnBgActionSecondaryPressed +// case .colorActionOnBgActionSecondaryPressedOnBgEmphasized: +// return theme.colorActionOnBgActionSecondaryPressedOnBgEmphasized +// case .colorActionOnBgActionSecondaryLoading: +// return theme.colorActionOnBgActionSecondaryLoading +// case .colorActionOnBgActionSecondaryLoadingOnBgEmphasized: +// return theme.colorActionOnBgActionSecondaryLoadingOnBgEmphasized +// case .colorActionOnBgActionSecondaryFocus: +// return theme.colorActionOnBgActionSecondaryFocus +// case .colorActionOnBgActionSecondaryFocusOnBgEmphasized: +// return theme.colorActionOnBgActionSecondaryFocusOnBgEmphasized } } } diff --git a/Showcase/Showcase/Pages/Tokens/Color/NamedColor/NamedColor+Always.swift b/Showcase/Showcase/Pages/Tokens/Color/NamedColor/NamedColor+Always.swift index 4ba47b3da..8adf2be5e 100644 --- a/Showcase/Showcase/Pages/Tokens/Color/NamedColor/NamedColor+Always.swift +++ b/Showcase/Showcase/Pages/Tokens/Color/NamedColor/NamedColor+Always.swift @@ -24,13 +24,13 @@ extension NamedColor { case colorAlwaysPositive case colorAlwaysInfo case colorAlwaysAccent - case colorAlwaysOnBackgroundBlack - case colorAlwaysOnBackgroundWhite - case colorAlwaysOnBackgroundWarning - case colorAlwaysOnBackgroundNegative - case colorAlwaysOnBackgroundPositive - case colorAlwaysOnBackgroundInfo - case colorAlwaysOnBackgroundAccent + case colorAlwaysOnBgBlack + case colorAlwaysOnBgWhite + case colorAlwaysOnBgWarning + case colorAlwaysOnBgNegative + case colorAlwaysOnBgPositive + case colorAlwaysOnBgInfo + case colorAlwaysOnBgAccent func token(from theme: OUDSTheme) -> ColorSemanticToken { switch self { @@ -48,20 +48,20 @@ extension NamedColor { return theme.colorAlwaysInfo case .colorAlwaysAccent: return theme.colorAlwaysAccent - case .colorAlwaysOnBackgroundBlack: - return theme.colorAlwaysOnBackgroundBlack - case .colorAlwaysOnBackgroundWhite: - return theme.colorAlwaysOnBackgroundWhite - case .colorAlwaysOnBackgroundWarning: - return theme.colorAlwaysOnBackgroundWarning - case .colorAlwaysOnBackgroundNegative: - return theme.colorAlwaysOnBackgroundNegative - case .colorAlwaysOnBackgroundPositive: - return theme.colorAlwaysOnBackgroundPositive - case .colorAlwaysOnBackgroundInfo: - return theme.colorAlwaysOnBackgroundInfo - case .colorAlwaysOnBackgroundAccent: - return theme.colorAlwaysOnBackgroundAccent + case .colorAlwaysOnBgBlack: + return theme.colorAlwaysOnBgBlack + case .colorAlwaysOnBgWhite: + return theme.colorAlwaysOnBgWhite + case .colorAlwaysOnBgWarning: + return theme.colorAlwaysOnBgWarning + case .colorAlwaysOnBgNegative: + return theme.colorAlwaysOnBgNegative + case .colorAlwaysOnBgPositive: + return theme.colorAlwaysOnBgPositive + case .colorAlwaysOnBgInfo: + return theme.colorAlwaysOnBgInfo + case .colorAlwaysOnBgAccent: + return theme.colorAlwaysOnBgAccent } } } diff --git a/Showcase/Showcase/Pages/Tokens/Color/NamedColor/NamedColor+Background.swift b/Showcase/Showcase/Pages/Tokens/Color/NamedColor/NamedColor+Background.swift index 65d1353dd..2627daaf5 100644 --- a/Showcase/Showcase/Pages/Tokens/Color/NamedColor/NamedColor+Background.swift +++ b/Showcase/Showcase/Pages/Tokens/Color/NamedColor/NamedColor+Background.swift @@ -14,93 +14,89 @@ import OUDS import OUDSTokensSemantic -// swiftlint:disable identifier_name - extension NamedColor { enum Background: String, CaseIterable { - case colorBackgroundPrimary - case colorBackgroundSecondary + case colorBgPrimary + case colorBgSecondary // NOTE: #124 - Following case(s) is / are not managed because not defined values! - // case colorBackgroundTertiary - case colorBackgroundEmphasized - case colorBackgroundBrandPrimary + // case colorBgTertiary + case colorBgEmphasized + case colorBgBrandPrimary // NOTE: #124 - Following case(s) is / are not managed because not defined values! - // case colorBackgroundBrandSecondary - // case colorBackgroundBrandTertiary - case colorBackgroundStatusNeutral - case colorBackgroundStatusNeutralOnBackgroundEmphasized - case colorBackgroundStatusPositiveMuted - case colorBackgroundStatusPositiveMutedOnBackgroundEmphasized - case colorBackgroundStatusPositiveEmphasized - case colorBackgroundStatusInfoMuted - case colorBackgroundStatusInfoMutedOnBackgroundEmphasized - case colorBackgroundStatusInfoEmphasized - case colorBackgroundStatusWarningMuted - case colorBackgroundStatusWarningMutedOnBackgroundEmphasized - case colorBackgroundStatusWarningEmphasized - case colorBackgroundStatusNegativeMuted - case colorBackgroundStatusNegativeMutedOnBackgroundEmphasized - case colorBackgroundStatusNegativeEmphasized - case colorBackgroundStatusAccentMuted - case colorBackgroundStatusAccentMutedOnBackgroundEmphasized - case colorBackgroundStatusAccentEmphasized + // case colorBgBrandSecondary + // case colorBgBrandTertiary + case colorBgStatusNeutral + case colorBgStatusNeutralOnBgEmphasized + case colorBgStatusPositiveMuted + case colorBgStatusPositiveMutedOnBgEmphasized + case colorBgStatusPositiveEmphasized + case colorBgStatusInfoMuted + case colorBgStatusInfoMutedOnBgEmphasized + case colorBgStatusInfoEmphasized + case colorBgStatusWarningMuted + case colorBgStatusWarningMutedOnBgEmphasized + case colorBgStatusWarningEmphasized + case colorBgStatusNegativeMuted + case colorBgStatusNegativeMutedOnBgEmphasized + case colorBgStatusNegativeEmphasized + case colorBgStatusAccentMuted + case colorBgStatusAccentMutedOnBgEmphasized + case colorBgStatusAccentEmphasized func token(from theme: OUDSTheme) -> ColorSemanticToken { switch self { - case .colorBackgroundPrimary: - return theme.colorBackgroundPrimary - case .colorBackgroundSecondary: - return theme.colorBackgroundSecondary + case .colorBgPrimary: + return theme.colorBgPrimary + case .colorBgSecondary: + return theme.colorBgSecondary // NOTE: #124 - Following case(s) is / are not managed because not defined values! -// case .colorBackgroundTertiary: -// return theme.colorBackgroundTertiary - case .colorBackgroundEmphasized: - return theme.colorBackgroundEmphasized - case .colorBackgroundBrandPrimary: - return theme.colorBackgroundBrandPrimary +// case .colorBgTertiary: +// return theme.colorBgTertiary + case .colorBgEmphasized: + return theme.colorBgEmphasized + case .colorBgBrandPrimary: + return theme.colorBgBrandPrimary // NOTE: #124 - Following case(s) is / are not managed because not defined values! -// case .colorBackgroundBrandSecondary: -// return theme.colorBackgroundBrandSecondary -// case .colorBackgroundBrandTertiary: -// return theme.colorBackgroundBrandTertiary - case .colorBackgroundStatusNeutral: - return theme.colorBackgroundStatusNeutral - case .colorBackgroundStatusNeutralOnBackgroundEmphasized: - return theme.colorBackgroundStatusNeutralOnBackgroundEmphasized - case .colorBackgroundStatusPositiveMuted: - return theme.colorBackgroundStatusPositiveMuted - case .colorBackgroundStatusPositiveMutedOnBackgroundEmphasized: - return theme.colorBackgroundStatusPositiveMutedOnBackgroundEmphasized - case .colorBackgroundStatusPositiveEmphasized: - return theme.colorBackgroundStatusPositiveEmphasized - case .colorBackgroundStatusInfoMuted: - return theme.colorBackgroundStatusInfoMuted - case .colorBackgroundStatusInfoMutedOnBackgroundEmphasized: - return theme.colorBackgroundStatusInfoMutedOnBackgroundEmphasized - case .colorBackgroundStatusInfoEmphasized: - return theme.colorBackgroundStatusInfoEmphasized - case .colorBackgroundStatusWarningMuted: - return theme.colorBackgroundStatusWarningMuted - case .colorBackgroundStatusWarningMutedOnBackgroundEmphasized: - return theme.colorBackgroundStatusWarningMutedOnBackgroundEmphasized - case .colorBackgroundStatusWarningEmphasized: - return theme.colorBackgroundStatusWarningEmphasized - case .colorBackgroundStatusNegativeMuted: - return theme.colorBackgroundStatusNegativeMuted - case .colorBackgroundStatusNegativeMutedOnBackgroundEmphasized: - return theme.colorBackgroundStatusNegativeMutedOnBackgroundEmphasized - case .colorBackgroundStatusNegativeEmphasized: - return theme.colorBackgroundStatusNegativeEmphasized - case .colorBackgroundStatusAccentMuted: - return theme.colorBackgroundStatusAccentMuted - case .colorBackgroundStatusAccentMutedOnBackgroundEmphasized: - return theme.colorBackgroundStatusAccentMutedOnBackgroundEmphasized - case .colorBackgroundStatusAccentEmphasized: - return theme.colorBackgroundStatusAccentEmphasized +// case .colorBgBrandSecondary: +// return theme.colorBgBrandSecondary +// case .colorBgBrandTertiary: +// return theme.colorBgBrandTertiary + case .colorBgStatusNeutral: + return theme.colorBgStatusNeutral + case .colorBgStatusNeutralOnBgEmphasized: + return theme.colorBgStatusNeutralOnBgEmphasized + case .colorBgStatusPositiveMuted: + return theme.colorBgStatusPositiveMuted + case .colorBgStatusPositiveMutedOnBgEmphasized: + return theme.colorBgStatusPositiveMutedOnBgEmphasized + case .colorBgStatusPositiveEmphasized: + return theme.colorBgStatusPositiveEmphasized + case .colorBgStatusInfoMuted: + return theme.colorBgStatusInfoMuted + case .colorBgStatusInfoMutedOnBgEmphasized: + return theme.colorBgStatusInfoMutedOnBgEmphasized + case .colorBgStatusInfoEmphasized: + return theme.colorBgStatusInfoEmphasized + case .colorBgStatusWarningMuted: + return theme.colorBgStatusWarningMuted + case .colorBgStatusWarningMutedOnBgEmphasized: + return theme.colorBgStatusWarningMutedOnBgEmphasized + case .colorBgStatusWarningEmphasized: + return theme.colorBgStatusWarningEmphasized + case .colorBgStatusNegativeMuted: + return theme.colorBgStatusNegativeMuted + case .colorBgStatusNegativeMutedOnBgEmphasized: + return theme.colorBgStatusNegativeMutedOnBgEmphasized + case .colorBgStatusNegativeEmphasized: + return theme.colorBgStatusNegativeEmphasized + case .colorBgStatusAccentMuted: + return theme.colorBgStatusAccentMuted + case .colorBgStatusAccentMutedOnBgEmphasized: + return theme.colorBgStatusAccentMutedOnBgEmphasized + case .colorBgStatusAccentEmphasized: + return theme.colorBgStatusAccentEmphasized } } } } - -// swiftlint:enable identifier_name diff --git a/Showcase/Showcase/Pages/Tokens/Color/NamedColor/NamedColor+Border.swift b/Showcase/Showcase/Pages/Tokens/Color/NamedColor/NamedColor+Border.swift index cff8e68bf..cffbac843 100644 --- a/Showcase/Showcase/Pages/Tokens/Color/NamedColor/NamedColor+Border.swift +++ b/Showcase/Showcase/Pages/Tokens/Color/NamedColor/NamedColor+Border.swift @@ -14,17 +14,15 @@ import OUDS import OUDSTokensSemantic -// swiftlint:disable identifier_name - extension NamedColor { enum Border: String, CaseIterable { case colorBorderDefault - case colorBorderDefaultOnBackgroundEmphasized + case colorBorderDefaultOnBgEmphasized case colorBorderEmphasized - case colorBorderEmphasizedOnBackgroundEmphasized + case colorBorderEmphasizedOnBgEmphasized case colorBorderFocus - case colorBorderBrandPrimaryOnBackgroundEmphasized + case colorBorderBrandPrimaryOnBgEmphasized case colorBorderBrandPrimary // NOTE: #124 - Following case(s) is / are not managed because not defined values! // case colorBorderBrandSecondary @@ -34,25 +32,25 @@ extension NamedColor { // case colorBorderStatusWarning // case colorBorderStatusNegative // case colorBorderStatusAccent - case colorBorderOnBackgroundBrandPrimary + case colorBorderOnBgBrandPrimary // NOTE: #124 - Following case(s) is / are not managed because not defined values! - // case colorBorderOnBackgroundBrandSecondary - // case colorBorderOnBackgroundBrandTertiary + // case colorBorderOnBgBrandSecondary + // case colorBorderOnBgBrandTertiary func token(from theme: OUDSTheme) -> ColorSemanticToken { switch self { case .colorBorderDefault: return theme.colorBorderDefault - case .colorBorderDefaultOnBackgroundEmphasized: - return theme.colorBorderDefaultOnBackgroundEmphasized + case .colorBorderDefaultOnBgEmphasized: + return theme.colorBorderDefaultOnBgEmphasized case .colorBorderEmphasized: return theme.colorBorderEmphasized - case .colorBorderEmphasizedOnBackgroundEmphasized: - return theme.colorBorderEmphasizedOnBackgroundEmphasized + case .colorBorderEmphasizedOnBgEmphasized: + return theme.colorBorderEmphasizedOnBgEmphasized case .colorBorderFocus: return theme.colorBorderFocus - case .colorBorderBrandPrimaryOnBackgroundEmphasized: - return theme.colorBorderBrandPrimaryOnBackgroundEmphasized + case .colorBorderBrandPrimaryOnBgEmphasized: + return theme.colorBorderBrandPrimaryOnBgEmphasized case .colorBorderBrandPrimary: return theme.colorBorderBrandPrimary // NOTE: #124 - Following case(s) is / are not managed because not defined values! @@ -70,16 +68,14 @@ extension NamedColor { // return theme.colorBorderStatusNegative // case .colorBorderStatusAccent: // return theme.colorBorderStatusAccent - case .colorBorderOnBackgroundBrandPrimary: - return theme.colorBorderOnBackgroundBrandPrimary + case .colorBorderOnBgBrandPrimary: + return theme.colorBorderOnBgBrandPrimary // NOTE: #124 - Following case(s) is / are not managed because not defined values! -// case .colorBorderOnBackgroundBrandSecondary: -// return theme.colorBorderOnBackgroundBrandSecondary -// case .colorBorderOnBackgroundBrandTertiary: -// return theme.colorBorderOnBackgroundBrandTertiary +// case .colorBorderOnBgBrandSecondary: +// return theme.colorBorderOnBgBrandSecondary +// case .colorBorderOnBgBrandTertiary: +// return theme.colorBorderOnBgBrandTertiary } } } } - -// swiftlint:enable identifier_name diff --git a/Showcase/Showcase/Pages/Tokens/Color/NamedColor/NamedColor+Content.swift b/Showcase/Showcase/Pages/Tokens/Color/NamedColor/NamedColor+Content.swift index c3f7fb399..17019c846 100644 --- a/Showcase/Showcase/Pages/Tokens/Color/NamedColor/NamedColor+Content.swift +++ b/Showcase/Showcase/Pages/Tokens/Color/NamedColor/NamedColor+Content.swift @@ -20,11 +20,11 @@ extension NamedColor { enum Content: String, CaseIterable { case colorContentDefault - case colorContentContentDefaultOnBackgroundEmphasized + case colorContentContentDefaultOnBgEmphasized case colorContentMuted - case colorContentContentMutedOnBackgroundEmphasized + case colorContentContentMutedOnBgEmphasized case colorContentDisabled - case colorContentContentDisabledOnBackgroundEmphasized + case colorContentContentDisabledOnBgEmphasized case colorContentBrandPrimary // NOTE: #124 - Following case(s) is / are not managed because not defined values! // case colorContentBrandSecondary @@ -40,16 +40,16 @@ extension NamedColor { switch self { case .colorContentDefault: return theme.colorContentDefault - case .colorContentContentDefaultOnBackgroundEmphasized: - return theme.colorContentContentDefaultOnBackgroundEmphasized + case .colorContentContentDefaultOnBgEmphasized: + return theme.colorContentContentDefaultOnBgEmphasized case .colorContentMuted: return theme.colorContentMuted - case .colorContentContentMutedOnBackgroundEmphasized: - return theme.colorContentContentMutedOnBackgroundEmphasized + case .colorContentContentMutedOnBgEmphasized: + return theme.colorContentContentMutedOnBgEmphasized case .colorContentDisabled: return theme.colorContentDisabled - case .colorContentContentDisabledOnBackgroundEmphasized: - return theme.colorContentContentDisabledOnBackgroundEmphasized + case .colorContentContentDisabledOnBgEmphasized: + return theme.colorContentContentDisabledOnBgEmphasized case .colorContentBrandPrimary: return theme.colorContentBrandPrimary // NOTE: #124 - Following case(s) is / are not managed because not defined values! diff --git a/Showcase/Showcase/Pages/Tokens/Color/NamedColor/NamedColor+Decorative.swift b/Showcase/Showcase/Pages/Tokens/Color/NamedColor/NamedColor+Decorative.swift index ef9d68799..95abf24fc 100644 --- a/Showcase/Showcase/Pages/Tokens/Color/NamedColor/NamedColor+Decorative.swift +++ b/Showcase/Showcase/Pages/Tokens/Color/NamedColor/NamedColor+Decorative.swift @@ -19,18 +19,9 @@ import OUDSTokensSemantic extension NamedColor { enum Decorative: String, CaseIterable { - case colorDecorativeBrandPrimary - // NOTE: #124 - Following case(s) is / are not managed because not defined values! - // case colorDecorativeBrandPrimaryMuted - // case colorDecorativeBrandPrimaryEmphasized + case colorDecorativePrimary case colorDecorativeSecondary - // NOTE: #124 - Following case(s) is / are not managed because not defined values! - // case colorDecorativeSecondaryMuted - // case colorDecorativeSecondaryEmphasized - case colorDecorativeBrandTertiary - // NOTE: #124 - Following case(s) is / are not managed because not defined values! - // case colorDecorativeBrandTertiaryMuted - // case colorDecorativeBrandTertiaryEmphasized + case colorDecorativeTertiary case colorDecorativeNeutralMuted case colorDecorativeNeutralDefault case colorDecorativeNeutralEmphasized @@ -49,39 +40,24 @@ extension NamedColor { case colorDecorativeAccent5Muted case colorDecorativeAccent5Default case colorDecorativeAccent5Emphasized - case colorDecorativeSkintTint100 - case colorDecorativeSkintTint200 - case colorDecorativeSkintTint300 - case colorDecorativeSkintTint400 - case colorDecorativeSkintTint500 - case colorDecorativeSkintTint600 - case colorDecorativeSkintTint700 - case colorDecorativeSkintTint800 - case colorDecorativeSkintTint900 + case colorDecorativeSkinTint100 + case colorDecorativeSkinTint200 + case colorDecorativeSkinTint300 + case colorDecorativeSkinTint400 + case colorDecorativeSkinTint500 + case colorDecorativeSkinTint600 + case colorDecorativeSkinTint700 + case colorDecorativeSkinTint800 + case colorDecorativeSkinTint900 func token(from theme: OUDSTheme) -> ColorSemanticToken { switch self { - case .colorDecorativeBrandPrimary: - return theme.colorDecorativeBrandPrimary - // NOTE: #124 - Following case(s) is / are not managed because not defined values! -// case .colorDecorativeBrandPrimaryMuted: -// return theme.colorDecorativeBrandPrimaryMuted -// case .colorDecorativeBrandPrimaryEmphasized: -// return theme.colorDecorativeBrandPrimaryEmphasized + case .colorDecorativePrimary: + return theme.colorDecorativePrimary case .colorDecorativeSecondary: return theme.colorDecorativeSecondary - // NOTE: #124 - Following case(s) is / are not managed because not defined values! -// case .colorDecorativeSecondaryMuted: -// return theme.colorDecorativeSecondaryMuted -// case .colorDecorativeSecondaryEmphasized: -// return theme.colorDecorativeSecondaryEmphasized - case .colorDecorativeBrandTertiary: - return theme.colorDecorativeBrandTertiary - // NOTE: #124 - Following case(s) is / are not managed because not defined values! -// case .colorDecorativeBrandTertiaryMuted: -// return theme.colorDecorativeBrandTertiaryMuted -// case .colorDecorativeBrandTertiaryEmphasized: -// return theme.colorDecorativeBrandTertiaryEmphasized + case .colorDecorativeTertiary: + return theme.colorDecorativeTertiary case .colorDecorativeNeutralMuted: return theme.colorDecorativeNeutralMuted case .colorDecorativeNeutralDefault: @@ -118,24 +94,24 @@ extension NamedColor { return theme.colorDecorativeAccent5Default case .colorDecorativeAccent5Emphasized: return theme.colorDecorativeAccent5Emphasized - case .colorDecorativeSkintTint100: - return theme.colorDecorativeSkintTint100 - case .colorDecorativeSkintTint200: - return theme.colorDecorativeSkintTint200 - case .colorDecorativeSkintTint300: - return theme.colorDecorativeSkintTint300 - case .colorDecorativeSkintTint400: - return theme.colorDecorativeSkintTint400 - case .colorDecorativeSkintTint500: - return theme.colorDecorativeSkintTint500 - case .colorDecorativeSkintTint600: - return theme.colorDecorativeSkintTint600 - case .colorDecorativeSkintTint700: - return theme.colorDecorativeSkintTint700 - case .colorDecorativeSkintTint800: - return theme.colorDecorativeSkintTint800 - case .colorDecorativeSkintTint900: - return theme.colorDecorativeSkintTint900 + case .colorDecorativeSkinTint100: + return theme.colorDecorativeSkinTint100 + case .colorDecorativeSkinTint200: + return theme.colorDecorativeSkinTint200 + case .colorDecorativeSkinTint300: + return theme.colorDecorativeSkinTint300 + case .colorDecorativeSkinTint400: + return theme.colorDecorativeSkinTint400 + case .colorDecorativeSkinTint500: + return theme.colorDecorativeSkinTint500 + case .colorDecorativeSkinTint600: + return theme.colorDecorativeSkinTint600 + case .colorDecorativeSkinTint700: + return theme.colorDecorativeSkinTint700 + case .colorDecorativeSkinTint800: + return theme.colorDecorativeSkinTint800 + case .colorDecorativeSkinTint900: + return theme.colorDecorativeSkinTint900 } } } diff --git a/Showcase/Showcase/Pages/Tokens/Color/NamedColor/NamedColor+Elevation.swift b/Showcase/Showcase/Pages/Tokens/Color/NamedColor/NamedColor+Elevation.swift index b1eff5029..92097ffd3 100644 --- a/Showcase/Showcase/Pages/Tokens/Color/NamedColor/NamedColor+Elevation.swift +++ b/Showcase/Showcase/Pages/Tokens/Color/NamedColor/NamedColor+Elevation.swift @@ -20,45 +20,45 @@ extension NamedColor { enum Elevation: String, CaseIterable { case colorElevationRaised - case colorElevationRaisedOnBackgroundSecondary - case colorElevationRaisedOnBackgroundEmphasized + case colorElevationRaisedOnBgSecondary + case colorElevationRaisedOnBgEmphasized case colorElevationDrag - case colorElevationDragOnBackgroundSecondary - case colorElevationDragOnBackgroundEmphasized + case colorElevationDragOnBgSecondary + case colorElevationDragOnBgEmphasized case colorElevationOverlayDefault - case colorElevationOverlayDefaultOnBackgroundSecondary - case colorElevationOverlayDefaultOnBackgroundEmphasized + case colorElevationOverlayDefaultOnBgSecondary + case colorElevationOverlayDefaultOnBgEmphasized case colorElevationOverlayEmphasized - case colorElevationOverlayEmphasizedOnBackgroundSecondary - case colorElevationOverlayEmphasizedOnBackgroundEmphasized + case colorElevationOverlayEmphasizedOnBgSecondary + case colorElevationOverlayEmphasizedOnBgEmphasized case colorElevationModal func token(from theme: OUDSTheme) -> ColorSemanticToken { switch self { case .colorElevationRaised: return theme.colorElevationRaised - case .colorElevationRaisedOnBackgroundSecondary: - return theme.colorElevationRaisedOnBackgroundSecondary - case .colorElevationRaisedOnBackgroundEmphasized: - return theme.colorElevationRaisedOnBackgroundEmphasized + case .colorElevationRaisedOnBgSecondary: + return theme.colorElevationRaisedOnBgSecondary + case .colorElevationRaisedOnBgEmphasized: + return theme.colorElevationRaisedOnBgEmphasized case .colorElevationDrag: return theme.colorElevationDrag - case .colorElevationDragOnBackgroundSecondary: - return theme.colorElevationDragOnBackgroundSecondary - case .colorElevationDragOnBackgroundEmphasized: - return theme.colorElevationDragOnBackgroundEmphasized + case .colorElevationDragOnBgSecondary: + return theme.colorElevationDragOnBgSecondary + case .colorElevationDragOnBgEmphasized: + return theme.colorElevationDragOnBgEmphasized case .colorElevationOverlayDefault: return theme.colorElevationOverlayDefault - case .colorElevationOverlayDefaultOnBackgroundSecondary: - return theme.colorElevationOverlayDefaultOnBackgroundSecondary - case .colorElevationOverlayDefaultOnBackgroundEmphasized: - return theme.colorElevationOverlayDefaultOnBackgroundEmphasized + case .colorElevationOverlayDefaultOnBgSecondary: + return theme.colorElevationOverlayDefaultOnBgSecondary + case .colorElevationOverlayDefaultOnBgEmphasized: + return theme.colorElevationOverlayDefaultOnBgEmphasized case .colorElevationOverlayEmphasized: return theme.colorElevationOverlayEmphasized - case .colorElevationOverlayEmphasizedOnBackgroundSecondary: - return theme.colorElevationOverlayEmphasizedOnBackgroundSecondary - case .colorElevationOverlayEmphasizedOnBackgroundEmphasized: - return theme.colorElevationOverlayEmphasizedOnBackgroundEmphasized + case .colorElevationOverlayEmphasizedOnBgSecondary: + return theme.colorElevationOverlayEmphasizedOnBgSecondary + case .colorElevationOverlayEmphasizedOnBgEmphasized: + return theme.colorElevationOverlayEmphasizedOnBgEmphasized case .colorElevationModal: return theme.colorElevationModal } diff --git a/Showcase/Showcase/Pages/Tokens/Color/NamedColor/NamedColor+OnContent.swift b/Showcase/Showcase/Pages/Tokens/Color/NamedColor/NamedColor+OnContent.swift index 163269393..89a80e242 100644 --- a/Showcase/Showcase/Pages/Tokens/Color/NamedColor/NamedColor+OnContent.swift +++ b/Showcase/Showcase/Pages/Tokens/Color/NamedColor/NamedColor+OnContent.swift @@ -18,66 +18,66 @@ import OUDSTokensSemantic extension NamedColor { - enum ContentOnBackground: String, CaseIterable { - case colorContentOnBackgroundPrimary + enum ContentOnBg: String, CaseIterable { + case colorContentOnBgPrimary // NOTE: #124 - Following case(s) is / are not managed because not defined values! - // case colorContentOnBackgroundSecondary - // case colorContentOnBackgroundTertiary - case colorContentOnBackgroundStatusPositiveMuted - case colorContentOnBackgroundStatusPositiveMutedOnBackgroundEmphasized - case colorContentOnBackgroundStatusPositiveEmphasized - case colorContentOnBackgroundStatusInfoMuted - case colorContentOnBackgroundStatusInfoMutedOnBackgroundEmphasized - case colorContentOnBackgroundStatusInfoEmphasized - case colorContentOnBackgroundStatusWarningMuted - case colorContentOnBackgroundStatusWarningMutedOnBackgroundEmphasized - case colorContentOnBackgroundStatusWarningEmphasized - case colorContentOnBackgroundStatusNegativeMuted - case colorContentOnBackgroundStatusNegativeMutedOnBackgroundEmphasized - case colorContentOnBackgroundStatusNegativeEmphasized - case colorContentOnBackgroundStatusAccentMuted - case colorContentOnBackgroundStatusAccentMutedOnBackgroundEmphasized - case colorContentOnBackgroundStatusAccentedEmphasized + // case colorContentOnBgSecondary + // case colorContentOnBgTertiary + case colorContentOnBgStatusPositiveMuted + case colorContentOnBgStatusPositiveMutedOnBgEmphasized + case colorContentOnBgStatusPositiveEmphasized + case colorContentOnBgStatusInfoMuted + case colorContentOnBgStatusInfoMutedOnBgEmphasized + case colorContentOnBgStatusInfoEmphasized + case colorContentOnBgStatusWarningMuted + case colorContentOnBgStatusWarningMutedOnBgEmphasized + case colorContentOnBgStatusWarningEmphasized + case colorContentOnBgStatusNegativeMuted + case colorContentOnBgStatusNegativeMutedOnBgEmphasized + case colorContentOnBgStatusNegativeEmphasized + case colorContentOnBgStatusAccentMuted + case colorContentOnBgStatusAccentMutedOnBgEmphasized + case colorContentOnBgStatusAccentedEmphasized func token(from theme: OUDSTheme) -> ColorSemanticToken { switch self { - case .colorContentOnBackgroundPrimary: - return theme.colorContentOnBackgroundPrimary + case .colorContentOnBgPrimary: + return theme.colorContentOnBgPrimary // NOTE: #124 - Following case(s) is / are not managed because not defined values! -// case .colorContentOnBackgroundSecondary: -// return theme.colorContentOnBackgroundSecondary -// case .colorContentOnBackgroundTertiary: -// return theme.colorContentOnBackgroundTertiary - case .colorContentOnBackgroundStatusPositiveMuted: - return theme.colorContentOnBackgroundStatusPositiveMuted - case .colorContentOnBackgroundStatusPositiveMutedOnBackgroundEmphasized: - return theme.colorContentOnBackgroundStatusPositiveMutedOnBackgroundEmphasized - case .colorContentOnBackgroundStatusPositiveEmphasized: - return theme.colorContentOnBackgroundStatusPositiveEmphasized - case .colorContentOnBackgroundStatusInfoMuted: - return theme.colorContentOnBackgroundStatusInfoMuted - case .colorContentOnBackgroundStatusInfoMutedOnBackgroundEmphasized: - return theme.colorContentOnBackgroundStatusInfoMutedOnBackgroundEmphasized - case .colorContentOnBackgroundStatusInfoEmphasized: - return theme.colorContentOnBackgroundStatusInfoEmphasized - case .colorContentOnBackgroundStatusWarningMuted: - return theme.colorContentOnBackgroundStatusWarningMuted - case .colorContentOnBackgroundStatusWarningMutedOnBackgroundEmphasized: - return theme.colorContentOnBackgroundStatusWarningMutedOnBackgroundEmphasized - case .colorContentOnBackgroundStatusWarningEmphasized: - return theme.colorContentOnBackgroundStatusWarningEmphasized - case .colorContentOnBackgroundStatusNegativeMuted: - return theme.colorContentOnBackgroundStatusNegativeMuted - case .colorContentOnBackgroundStatusNegativeMutedOnBackgroundEmphasized: - return theme.colorContentOnBackgroundStatusNegativeMutedOnBackgroundEmphasized - case .colorContentOnBackgroundStatusNegativeEmphasized: - return theme.colorContentOnBackgroundStatusNegativeEmphasized - case .colorContentOnBackgroundStatusAccentMuted: - return theme.colorContentOnBackgroundStatusAccentMuted - case .colorContentOnBackgroundStatusAccentMutedOnBackgroundEmphasized: - return theme.colorContentOnBackgroundStatusAccentMutedOnBackgroundEmphasized - case .colorContentOnBackgroundStatusAccentedEmphasized: - return theme.colorContentOnBackgroundStatusAccentedEmphasized +// case .colorContentOnBgSecondary: +// return theme.colorContentOnBgSecondary +// case .colorContentOnBgTertiary: +// return theme.colorContentOnBgTertiary + case .colorContentOnBgStatusPositiveMuted: + return theme.colorContentOnBgStatusPositiveMuted + case .colorContentOnBgStatusPositiveMutedOnBgEmphasized: + return theme.colorContentOnBgStatusPositiveMutedOnBgEmphasized + case .colorContentOnBgStatusPositiveEmphasized: + return theme.colorContentOnBgStatusPositiveEmphasized + case .colorContentOnBgStatusInfoMuted: + return theme.colorContentOnBgStatusInfoMuted + case .colorContentOnBgStatusInfoMutedOnBgEmphasized: + return theme.colorContentOnBgStatusInfoMutedOnBgEmphasized + case .colorContentOnBgStatusInfoEmphasized: + return theme.colorContentOnBgStatusInfoEmphasized + case .colorContentOnBgStatusWarningMuted: + return theme.colorContentOnBgStatusWarningMuted + case .colorContentOnBgStatusWarningMutedOnBgEmphasized: + return theme.colorContentOnBgStatusWarningMutedOnBgEmphasized + case .colorContentOnBgStatusWarningEmphasized: + return theme.colorContentOnBgStatusWarningEmphasized + case .colorContentOnBgStatusNegativeMuted: + return theme.colorContentOnBgStatusNegativeMuted + case .colorContentOnBgStatusNegativeMutedOnBgEmphasized: + return theme.colorContentOnBgStatusNegativeMutedOnBgEmphasized + case .colorContentOnBgStatusNegativeEmphasized: + return theme.colorContentOnBgStatusNegativeEmphasized + case .colorContentOnBgStatusAccentMuted: + return theme.colorContentOnBgStatusAccentMuted + case .colorContentOnBgStatusAccentMutedOnBgEmphasized: + return theme.colorContentOnBgStatusAccentMutedOnBgEmphasized + case .colorContentOnBgStatusAccentedEmphasized: + return theme.colorContentOnBgStatusAccentedEmphasized } } } diff --git a/Showcase/Showcase/Pages/Tokens/Dimension/DimensionTokenElement.swift b/Showcase/Showcase/Pages/Tokens/Dimension/DimensionTokenElement.swift index 1b03ed0bf..3444efeed 100644 --- a/Showcase/Showcase/Pages/Tokens/Dimension/DimensionTokenElement.swift +++ b/Showcase/Showcase/Pages/Tokens/Dimension/DimensionTokenElement.swift @@ -20,8 +20,8 @@ struct DimensionTokenElement: TokenElement { let pageDescription: AnyView let variants: [TokenElement] = [ - SizingTokenElement(), - SpacingTokenElement(), + SizeTokenElement(), + SpaceTokenElement(), ] init() { diff --git a/Showcase/Showcase/Pages/Tokens/Dimension/Size/NamedSize/NamedSize+IconDecorative.swift b/Showcase/Showcase/Pages/Tokens/Dimension/Size/NamedSize/NamedSize+IconDecorative.swift new file mode 100644 index 000000000..a2516792d --- /dev/null +++ b/Showcase/Showcase/Pages/Tokens/Dimension/Size/NamedSize/NamedSize+IconDecorative.swift @@ -0,0 +1,46 @@ +// +// 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 OUDSTokensSemantic + +extension NamedSize { + enum IconDecorative: String, CaseIterable { + case sizeIconDecorativeShortest + case sizeIconDecorativeShorter + case sizeIconDecorativeShort + case sizeIconDecorativeMedium + case sizeIconDecorativeTall + case sizeIconDecorativeTaller + case sizeIconDecorativeTallest + + func token(from theme: OUDSTheme) -> SizeSemanticToken { + switch self { + case .sizeIconDecorativeShortest: + return theme.sizeIconDecorativeShortest + case .sizeIconDecorativeShorter: + return theme.sizeIconDecorativeShorter + case .sizeIconDecorativeShort: + return theme.sizeIconDecorativeShort + case .sizeIconDecorativeMedium: + return theme.sizeIconDecorativeMedium + case .sizeIconDecorativeTall: + return theme.sizeIconDecorativeTall + case .sizeIconDecorativeTaller: + return theme.sizeIconDecorativeTaller + case .sizeIconDecorativeTallest: + return theme.sizeIconDecorativeTallest + } + } + } +} diff --git a/Showcase/Showcase/Pages/Tokens/Dimension/Size/NamedSize/NamedSize+IconWithTypography.swift b/Showcase/Showcase/Pages/Tokens/Dimension/Size/NamedSize/NamedSize+IconWithTypography.swift new file mode 100644 index 000000000..fe54c55ce --- /dev/null +++ b/Showcase/Showcase/Pages/Tokens/Dimension/Size/NamedSize/NamedSize+IconWithTypography.swift @@ -0,0 +1,209 @@ +// +// 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 OUDSTokensSemantic +import SwiftUICore + +extension NamedSize { + + enum IconWithTypography: String, CaseIterable { + case sizeIconWithHeadingXLargeShort + case sizeIconWithHeadingXLargeMedium + case sizeIconWithHeadingXLargeTall + case sizeIconWithHeadingLargeShort + case sizeIconWithHeadingLargeMedium + case sizeIconWithHeadingLargeTall + case sizeIconWithHeadingMediumShort + case sizeIconWithHeadingMediumMedium + case sizeIconWithHeadingMediumTall + case sizeIconWithHeadingSmallShort + case sizeIconWithHeadingSmallMedium + case sizeIconWithHeadingSmallTall + case sizeIconWithBodyLargeShort + case sizeIconWithBodyLargeMedium + case sizeIconWithBodyLargeTall + case sizeIconWithBodyMediumShort + case sizeIconWithBodyMediumMedium + case sizeIconWithBodyMediumTall + case sizeIconWithBodySmallShort + case sizeIconWithBodySmallMedium + case sizeIconWithBodySmallTall + case sizeIconWithLabelXLargeSizeShort + case sizeIconWithLabelXLargeSizeMedium + case sizeIconWithLabelXLargeSizeTall + case sizeIconWithLabelLargeSizeShorter + case sizeIconWithLabelLargeSizeShort + case sizeIconWithLabelLargeSizeMedium + case sizeIconWithLabelLargeSizeTall + case sizeIconWithLabelLargeSizeTaller + case sizeIconWithLabelMediumSizeShort + case sizeIconWithLabelMediumSizeMedium + case sizeIconWithLabelMediumSizeTall + case sizeIconWithLabelSmallSizeShort + case sizeIconWithLabelSmallSizeMedium + case sizeIconWithLabelSmallSizeTall + + var namedTypography: NamedTypography { + switch self { + case .sizeIconWithHeadingXLargeShort: + return .headingXLarge + case .sizeIconWithHeadingXLargeMedium: + return .headingXLarge + case .sizeIconWithHeadingXLargeTall: + return .headingXLarge + case .sizeIconWithHeadingLargeShort: + return .headingLarge + case .sizeIconWithHeadingLargeMedium: + return .headingLarge + case .sizeIconWithHeadingLargeTall: + return .headingLarge + case .sizeIconWithHeadingMediumShort: + return .headingMedium + case .sizeIconWithHeadingMediumMedium: + return .headingMedium + case .sizeIconWithHeadingMediumTall: + return .headingMedium + case .sizeIconWithHeadingSmallShort: + return .headingSmall + case .sizeIconWithHeadingSmallMedium: + return .headingSmall + case .sizeIconWithHeadingSmallTall: + return .headingSmall + case .sizeIconWithBodyLargeShort: + return .bodyDefaultLarge + case .sizeIconWithBodyLargeMedium: + return .bodyDefaultLarge + case .sizeIconWithBodyLargeTall: + return .bodyDefaultLarge + case .sizeIconWithBodyMediumShort: + return .bodyDefaultMedium + case .sizeIconWithBodyMediumMedium: + return .bodyDefaultMedium + case .sizeIconWithBodyMediumTall: + return .bodyDefaultMedium + case .sizeIconWithBodySmallShort: + return .bodyDefaultSmall + case .sizeIconWithBodySmallMedium: + return .bodyDefaultSmall + case .sizeIconWithBodySmallTall: + return .bodyDefaultSmall + case .sizeIconWithLabelXLargeSizeShort: + return .labelDefaultXLarge + case .sizeIconWithLabelXLargeSizeMedium: + return .labelDefaultXLarge + case .sizeIconWithLabelXLargeSizeTall: + return .labelDefaultXLarge + case .sizeIconWithLabelLargeSizeShorter: + return .labelDefaultXLarge + case .sizeIconWithLabelLargeSizeShort: + return .labelDefaultLarge + case .sizeIconWithLabelLargeSizeMedium: + return .labelDefaultLarge + case .sizeIconWithLabelLargeSizeTall: + return .labelDefaultLarge + case .sizeIconWithLabelLargeSizeTaller: + return .labelDefaultLarge + case .sizeIconWithLabelMediumSizeShort: + return .labelDefaultMedium + case .sizeIconWithLabelMediumSizeMedium: + return .labelDefaultMedium + case .sizeIconWithLabelMediumSizeTall: + return .labelDefaultMedium + case .sizeIconWithLabelSmallSizeShort: + return .labelDefaultSmall + case .sizeIconWithLabelSmallSizeMedium: + return .labelDefaultSmall + case .sizeIconWithLabelSmallSizeTall: + return .labelDefaultSmall + } + } + + // swiftlint:disable function_body_length + func token(fot theme: OUDSTheme, userInterfaceSizeClass: UserInterfaceSizeClass) -> SizeSemanticToken { + switch self { + case .sizeIconWithHeadingXLargeShort: + return theme.sizeIconWithHeadingXLargeShort.dimension(for: userInterfaceSizeClass) + case .sizeIconWithHeadingXLargeMedium: + return theme.sizeIconWithHeadingXLargeMedium.dimension(for: userInterfaceSizeClass) + case .sizeIconWithHeadingXLargeTall: + return theme.sizeIconWithHeadingXLargeTall.dimension(for: userInterfaceSizeClass) + case .sizeIconWithHeadingLargeShort: + return theme.sizeIconWithHeadingLargeShort.dimension(for: userInterfaceSizeClass) + case .sizeIconWithHeadingLargeMedium: + return theme.sizeIconWithHeadingLargeMedium.dimension(for: userInterfaceSizeClass) + case .sizeIconWithHeadingLargeTall: + return theme.sizeIconWithHeadingLargeTall.dimension(for: userInterfaceSizeClass) + case .sizeIconWithHeadingMediumShort: + return theme.sizeIconWithHeadingMediumShort.dimension(for: userInterfaceSizeClass) + case .sizeIconWithHeadingMediumMedium: + return theme.sizeIconWithHeadingMediumMedium.dimension(for: userInterfaceSizeClass) + case .sizeIconWithHeadingMediumTall: + return theme.sizeIconWithHeadingMediumTall.dimension(for: userInterfaceSizeClass) + case .sizeIconWithHeadingSmallShort: + return theme.sizeIconWithHeadingSmallShort.dimension(for: userInterfaceSizeClass) + case .sizeIconWithHeadingSmallMedium: + return theme.sizeIconWithHeadingSmallMedium.dimension(for: userInterfaceSizeClass) + case .sizeIconWithHeadingSmallTall: + return theme.sizeIconWithHeadingSmallTall.dimension(for: userInterfaceSizeClass) + case .sizeIconWithBodyLargeShort: + return theme.sizeIconWithBodyLargeShort.dimension(for: userInterfaceSizeClass) + case .sizeIconWithBodyLargeMedium: + return theme.sizeIconWithBodyLargeMedium.dimension(for: userInterfaceSizeClass) + case .sizeIconWithBodyLargeTall: + return theme.sizeIconWithBodyLargeTall.dimension(for: userInterfaceSizeClass) + case .sizeIconWithBodyMediumShort: + return theme.sizeIconWithBodyMediumShort.dimension(for: userInterfaceSizeClass) + case .sizeIconWithBodyMediumMedium: + return theme.sizeIconWithBodyMediumMedium.dimension(for: userInterfaceSizeClass) + case .sizeIconWithBodyMediumTall: + return theme.sizeIconWithBodyMediumTall.dimension(for: userInterfaceSizeClass) + case .sizeIconWithBodySmallShort: + return theme.sizeIconWithBodySmallShort.dimension(for: userInterfaceSizeClass) + case .sizeIconWithBodySmallMedium: + return theme.sizeIconWithBodySmallMedium.dimension(for: userInterfaceSizeClass) + case .sizeIconWithBodySmallTall: + return theme.sizeIconWithBodySmallTall.dimension(for: userInterfaceSizeClass) + case .sizeIconWithLabelXLargeSizeShort: + return theme.sizeIconWithLabelXLargeSizeShort + case .sizeIconWithLabelXLargeSizeMedium: + return theme.sizeIconWithLabelXLargeSizeMedium + case .sizeIconWithLabelXLargeSizeTall: + return theme.sizeIconWithLabelXLargeSizeTall + case .sizeIconWithLabelLargeSizeShorter: + return theme.sizeIconWithLabelLargeSizeShorter + case .sizeIconWithLabelLargeSizeShort: + return theme.sizeIconWithLabelLargeSizeShort + case .sizeIconWithLabelLargeSizeMedium: + return theme.sizeIconWithLabelLargeSizeMedium + case .sizeIconWithLabelLargeSizeTall: + return theme.sizeIconWithLabelLargeSizeTall + case .sizeIconWithLabelLargeSizeTaller: + return theme.sizeIconWithLabelLargeSizeTaller + case .sizeIconWithLabelMediumSizeShort: + return theme.sizeIconWithLabelMediumSizeShort + case .sizeIconWithLabelMediumSizeMedium: + return theme.sizeIconWithLabelMediumSizeMedium + case .sizeIconWithLabelMediumSizeTall: + return theme.sizeIconWithLabelMediumSizeTall + case .sizeIconWithLabelSmallSizeShort: + return theme.sizeIconWithLabelSmallSizeShort + case .sizeIconWithLabelSmallSizeMedium: + return theme.sizeIconWithLabelSmallSizeMedium + case .sizeIconWithLabelSmallSizeTall: + return theme.sizeIconWithLabelSmallSizeTall + } + } + // swiftlint:enable function_body_length + } +} diff --git a/Showcase/Showcase/Pages/Tokens/Dimension/Sizing/SizingTokenElement.swift b/Showcase/Showcase/Pages/Tokens/Dimension/Size/SizeTokenElement.swift similarity index 74% rename from Showcase/Showcase/Pages/Tokens/Dimension/Sizing/SizingTokenElement.swift rename to Showcase/Showcase/Pages/Tokens/Dimension/Size/SizeTokenElement.swift index 67e0560e0..d8d6af26f 100644 --- a/Showcase/Showcase/Pages/Tokens/Dimension/Sizing/SizingTokenElement.swift +++ b/Showcase/Showcase/Pages/Tokens/Dimension/Size/SizeTokenElement.swift @@ -13,16 +13,16 @@ import SwiftUI -struct SizingTokenElement: TokenElement { +struct SizeTokenElement: TokenElement { let name: String let imageName: String let description: String let pageDescription: AnyView init() { - name = "app_tokens_dimension_sizing_label" + name = "app_tokens_dimension_size_label" imageName = "ic_dimension" - description = "app_tokens_dimension_sizing_description_text" - pageDescription = AnyView(SizingTokenPage()) + description = "app_tokens_dimension_size_description_text" + pageDescription = AnyView(SizeTokenPage()) } } diff --git a/Showcase/Showcase/Pages/Tokens/Dimension/Size/SizeTokenPage.swift b/Showcase/Showcase/Pages/Tokens/Dimension/Size/SizeTokenPage.swift new file mode 100644 index 000000000..5877029bd --- /dev/null +++ b/Showcase/Showcase/Pages/Tokens/Dimension/Size/SizeTokenPage.swift @@ -0,0 +1,108 @@ +// +// 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 OUDSTokensSemantic +import SwiftUI + +struct SizeTokenPage: View { + + @Environment(\.theme) private var theme + @Environment(\.horizontalSizeClass) private var horizontalSizeClass + @Environment(\.colorScheme) private var colorScheme + + // MARK: Body + + var body: some View { + Group { + Section { illustrationForIconDecorative() } header: { + header("app_tokens_dimension_size_iconDecorative_label") + } + Section { illustrationIconWithLabel() } header: { + header("app_tokens_dimension_size_iconWithLabel_label") + } + } + .padding(.horizontal, theme.spaceFixedMedium) + } + + // MARK: Illustration icon decorative + + private func illustrationForIconDecorative() -> some View { + ForEach(NamedSize.IconDecorative.allCases, id: \.rawValue) { namedSize in + illustrationIconDecorative(for: namedSize) + } + } + + private func illustrationIconDecorative(for namedSize: NamedSize.IconDecorative) -> some View { + let token = namedSize.token(from: theme) + let name = namedSize.rawValue + let value = String(format: "(%.0f) pt", token) + + return ShowcaseTokenIllustration(tokenName: name, tokenValue: value) { + ZStack { + Rectangle() + .fill(theme.colorBgEmphasized.color(for: colorScheme)) + .frame(width: 82, height: 82, alignment: .center) + + Image("ic_token") + .resizable() + .renderingMode(.template) + .foregroundColor(theme.colorAlwaysInfo.color(for: colorScheme)) + .frame(width: token, height: token, alignment: .center) + .accessibilityHidden(true) + } + } + } + + // MARK: Illustration icon with label + + private func illustrationIconWithLabel() -> some View { + ForEach(NamedSize.IconWithTypography.allCases, id: \.rawValue) { namedIconSize in + illustrationIconWithLabel(for: namedIconSize) + } + } + + @ViewBuilder + private func illustrationIconWithLabel(for namedSize: NamedSize.IconWithTypography) -> some View { + let token = namedSize.token(fot: theme, userInterfaceSizeClass: horizontalSizeClass ?? .regular) + let namedTypography = namedSize.namedTypography + let value = String(format: "\(namedSize.rawValue) (%.0f) pt", token) + + HStack { + Image("ic_token") + .resizable() + .renderingMode(.template) + .foregroundColor(theme.colorAlwaysInfo.color(for: colorScheme)) + .frame(width: token, height: token, alignment: .center) + .accessibilityHidden(true) + + VStack(alignment: .leading) { + illustration(for: namedTypography, in: theme) + .foregroundStyle(theme.colorContentDefault.color(for: colorScheme)) + Text(value) + .typeBodyDefaultMedium(theme) + .foregroundStyle(theme.colorContentMuted.color(for: colorScheme)) + } + } + } + + // MARK: Common helpers + + private func header(_ text: LocalizedStringKey) -> some View { + Text(text).showcaseSectionHeaderStyle() + } +} + +// MARK: - Named Size + +enum NamedSize { } diff --git a/Showcase/Showcase/Pages/Tokens/Dimension/Sizing/SizingTokenPage.swift b/Showcase/Showcase/Pages/Tokens/Dimension/Sizing/SizingTokenPage.swift deleted file mode 100644 index fcfb043da..000000000 --- a/Showcase/Showcase/Pages/Tokens/Dimension/Sizing/SizingTokenPage.swift +++ /dev/null @@ -1,90 +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 OUDSTokensSemantic -import SwiftUI - -struct SizingTokenPage: View { - - @Environment(\.theme) private var theme - @Environment(\.horizontalSizeClass) private var horizontalSizeClass - @Environment(\.verticalSizeClass) private var verticalSizeClass - @Environment(\.colorScheme) private var colorScheme - - // MARK: Body - - var body: some View { - VStack(alignment: .leading, spacing: theme.spaceFixedNone) { - ForEach(NamedSizing.allCases, id: \.rawValue) { sizingName in - illustration(for: sizingName) - } - } - .frame(maxWidth: .infinity) - .padding(.horizontal, theme.spaceFixedMedium) - } - - // MARK: Private helpers - - private func illustration(for namedSizing: NamedSizing) -> some View { - let token = namedSizing.token(from: theme) - let name = namedSizing.rawValue - let value = String(format: "(%.0f) pt", token) - - return ShowcaseTokenIllustration(tokenName: name, tokenValue: value) { - ZStack { - Rectangle() - .fill(theme.colorBackgroundEmphasized.color(for: colorScheme)) - .frame(width: 82, height: 82, alignment: .center) - - Image("ic_token") - .resizable() - .renderingMode(.template) - .foregroundColor(.blue) - .frame(width: token, height: token, alignment: .center) - .accessibilityHidden(true) - } - } - } -} - -// MARK: - Named Spacing - -private enum NamedSizing: String, CaseIterable { - case sizeIconDecorativeShortest - case sizeIconDecorativeShorter - case sizeIconDecorativeShort - case sizeIconDecorativeMedium - case sizeIconDecorativeTall - case sizeIconDecorativeTaller - case sizeIconDecorativeTallest - - func token(from theme: OUDSTheme) -> SizingSemanticToken { - switch self { - case .sizeIconDecorativeShortest: - return theme.sizeIconDecorativeShortest - case .sizeIconDecorativeShorter: - return theme.sizeIconDecorativeShorter - case .sizeIconDecorativeShort: - return theme.sizeIconDecorativeShort - case .sizeIconDecorativeMedium: - return theme.sizeIconDecorativeMedium - case .sizeIconDecorativeTall: - return theme.sizeIconDecorativeTall - case .sizeIconDecorativeTaller: - return theme.sizeIconDecorativeTaller - case .sizeIconDecorativeTallest: - return theme.sizeIconDecorativeTallest - } - } -} diff --git a/Showcase/Showcase/Pages/Tokens/Dimension/Space/NamedSpace/NameSpace+GapInline.swift b/Showcase/Showcase/Pages/Tokens/Dimension/Space/NamedSpace/NameSpace+GapInline.swift new file mode 100644 index 000000000..e965fb6a8 --- /dev/null +++ b/Showcase/Showcase/Pages/Tokens/Dimension/Space/NamedSpace/NameSpace+GapInline.swift @@ -0,0 +1,44 @@ +// +// 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 OUDSTokensSemantic + +extension NamedSpace { + + enum GapInline: String, CaseIterable { + case spaceColumnGapNone + case spaceColumnGapShorter + case spaceColumnGapShort + case spaceColumnGapMedium + case spaceColumnGapTall + case spaceColumnGapTaller + + func token(from theme: OUDSTheme) -> SpaceSemanticToken { + switch self { + case .spaceColumnGapNone: + return theme.spaceColumnGapNone + case .spaceColumnGapShorter: + return theme.spaceColumnGapShorter + case .spaceColumnGapShort: + return theme.spaceColumnGapShort + case .spaceColumnGapMedium: + return theme.spaceColumnGapMedium + case .spaceColumnGapTall: + return theme.spaceColumnGapTall + case .spaceColumnGapTaller: + return theme.spaceColumnGapTaller + } + } + } +} diff --git a/Showcase/Showcase/Pages/Tokens/Dimension/Space/NamedSpace/NameSpace+GapStack.swift b/Showcase/Showcase/Pages/Tokens/Dimension/Space/NamedSpace/NameSpace+GapStack.swift new file mode 100644 index 000000000..b7518726c --- /dev/null +++ b/Showcase/Showcase/Pages/Tokens/Dimension/Space/NamedSpace/NameSpace+GapStack.swift @@ -0,0 +1,44 @@ +// +// 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 OUDSTokensSemantic + +extension NamedSpace { + + enum GapStack: String, CaseIterable { + case spaceRowGapNone + case spaceRowGapShortest + case spaceRowGapShorter + case spaceRowGapShort + case spaceRowGapMedium + case spaceRowGapTall + + func token(from theme: OUDSTheme) -> SpaceSemanticToken { + switch self { + case .spaceRowGapNone: + return theme.spaceRowGapNone + case .spaceRowGapShortest: + return theme.spaceRowGapShortest + case .spaceRowGapShorter: + return theme.spaceRowGapShorter + case .spaceRowGapShort: + return theme.spaceRowGapShort + case .spaceRowGapMedium: + return theme.spaceRowGapMedium + case .spaceRowGapTall: + return theme.spaceRowGapTall + } + } + } +} diff --git a/Showcase/Showcase/Pages/Tokens/Dimension/Space/NamedSpace/NameSpace+PaddingInline.swift b/Showcase/Showcase/Pages/Tokens/Dimension/Space/NamedSpace/NameSpace+PaddingInline.swift new file mode 100644 index 000000000..96fc07590 --- /dev/null +++ b/Showcase/Showcase/Pages/Tokens/Dimension/Space/NamedSpace/NameSpace+PaddingInline.swift @@ -0,0 +1,47 @@ +// +// 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 OUDSTokensSemantic + +extension NamedSpace { + + enum PaddingInline: String, CaseIterable { + case spacePaddingInlineNone + case spacePaddingInlineShorter + case spacePaddingInlineShort + case spacePaddingInlineMedium + case spacePaddingInlineTall + case spacePaddingInlineTaller + case spacePaddingInlineTallest + + func token(from theme: OUDSTheme) -> SpaceSemanticToken { + switch self { + case .spacePaddingInlineNone: + return theme.spacePaddingInlineNone + case .spacePaddingInlineShorter: + return theme.spacePaddingInlineShorter + case .spacePaddingInlineShort: + return theme.spacePaddingInlineShort + case .spacePaddingInlineMedium: + return theme.spacePaddingInlineMedium + case .spacePaddingInlineTall: + return theme.spacePaddingInlineTall + case .spacePaddingInlineTaller: + return theme.spacePaddingInlineTaller + case .spacePaddingInlineTallest: + return theme.spacePaddingInlineTallest + } + } + } +} diff --git a/Showcase/Showcase/Pages/Tokens/Dimension/Space/NamedSpace/NameSpace+PaddingInlineWithArrow.swift b/Showcase/Showcase/Pages/Tokens/Dimension/Space/NamedSpace/NameSpace+PaddingInlineWithArrow.swift new file mode 100644 index 000000000..f22b59b5a --- /dev/null +++ b/Showcase/Showcase/Pages/Tokens/Dimension/Space/NamedSpace/NameSpace+PaddingInlineWithArrow.swift @@ -0,0 +1,50 @@ +// +// 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 OUDSTokensSemantic + +extension NamedSpace { + + enum PaddingInlineWithArrow: String, CaseIterable { + case spacePaddingInlineWithArrowNone + case spacePaddingInlineWithArrowShortest + case spacePaddingInlineWithArrowShorter + case spacePaddingInlineWithArrowShort + case spacePaddingInlineWithArrowMedium + case spacePaddingInlineWithArrowTall + case spacePaddingInlineWithArrowTaller + case spacePaddingInlineWithArrowTallest + + func token(from theme: OUDSTheme) -> SpaceSemanticToken { + switch self { + case .spacePaddingInlineWithArrowNone: + return theme.spacePaddingInlineWithArrowNone + case .spacePaddingInlineWithArrowShortest: + return theme.spacePaddingInlineWithArrowShortest + case .spacePaddingInlineWithArrowShorter: + return theme.spacePaddingInlineWithArrowShorter + case .spacePaddingInlineWithArrowShort: + return theme.spacePaddingInlineWithArrowShort + case .spacePaddingInlineWithArrowMedium: + return theme.spacePaddingInlineWithArrowMedium + case .spacePaddingInlineWithArrowTall: + return theme.spacePaddingInlineWithArrowTall + case .spacePaddingInlineWithArrowTaller: + return theme.spacePaddingInlineWithArrowTaller + case .spacePaddingInlineWithArrowTallest: + return theme.spacePaddingInlineWithArrowTallest + } + } + } +} diff --git a/Showcase/Showcase/Pages/Tokens/Dimension/Space/NamedSpace/NameSpace+PaddingInlineWithIcon.swift b/Showcase/Showcase/Pages/Tokens/Dimension/Space/NamedSpace/NameSpace+PaddingInlineWithIcon.swift new file mode 100644 index 000000000..e9d4f8ef4 --- /dev/null +++ b/Showcase/Showcase/Pages/Tokens/Dimension/Space/NamedSpace/NameSpace+PaddingInlineWithIcon.swift @@ -0,0 +1,50 @@ +// +// 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 OUDSTokensSemantic + +extension NamedSpace { + + enum PaddingInlineWithIcon: String, CaseIterable { + case spacePaddingInlineWithIconNone + case spacePaddingInlineWithIconShortest + case spacePaddingInlineWithIconShorter + case spacePaddingInlineWithIconShort + case spacePaddingInlineWithIconMedium + case spacePaddingInlineWithIconTall + case spacePaddingInlineWithIconTaller + case spacePaddingInlineWithIconTallest + + func token(from theme: OUDSTheme) -> SpaceSemanticToken { + switch self { + case .spacePaddingInlineWithIconNone: + return theme.spacePaddingInlineWithIconNone + case .spacePaddingInlineWithIconShortest: + return theme.spacePaddingInlineWithIconShortest + case .spacePaddingInlineWithIconShorter: + return theme.spacePaddingInlineWithIconShorter + case .spacePaddingInlineWithIconShort: + return theme.spacePaddingInlineWithIconShort + case .spacePaddingInlineWithIconMedium: + return theme.spacePaddingInlineWithIconMedium + case .spacePaddingInlineWithIconTall: + return theme.spacePaddingInlineWithIconTall + case .spacePaddingInlineWithIconTaller: + return theme.spacePaddingInlineWithIconTaller + case .spacePaddingInlineWithIconTallest: + return theme.spacePaddingInlineWithIconTallest + } + } + } +} diff --git a/Showcase/Showcase/Pages/Tokens/Dimension/Space/NamedSpace/NameSpace+PaddingInset.swift b/Showcase/Showcase/Pages/Tokens/Dimension/Space/NamedSpace/NameSpace+PaddingInset.swift new file mode 100644 index 000000000..cd1e83bd1 --- /dev/null +++ b/Showcase/Showcase/Pages/Tokens/Dimension/Space/NamedSpace/NameSpace+PaddingInset.swift @@ -0,0 +1,56 @@ +// +// 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 OUDSTokensSemantic + +extension NamedSpace { + + enum PaddingInset: String, CaseIterable { + case spaceInsetNone + case spaceInsetSmash + case spaceInsetShortest + case spaceInsetShorter + case spaceInsetShort + case spaceInsetMedium + case spaceInsetTall + case spaceInsetTaller + case spaceInsetTallest + case spaceInsetSpacious + + func token(from theme: OUDSTheme) -> SpaceSemanticToken { + switch self { + case .spaceInsetNone: + return theme.spaceInsetNone + case .spaceInsetSmash: + return theme.spaceInsetSmash + case .spaceInsetShortest: + return theme.spaceInsetShortest + case .spaceInsetShorter: + return theme.spaceInsetShorter + case .spaceInsetShort: + return theme.spaceInsetShort + case .spaceInsetMedium: + return theme.spaceInsetMedium + case .spaceInsetTall: + return theme.spaceInsetTall + case .spaceInsetTaller: + return theme.spaceInsetTaller + case .spaceInsetTallest: + return theme.spaceInsetTallest + case .spaceInsetSpacious: + return theme.spaceInsetSpacious + } + } + } +} diff --git a/Showcase/Showcase/Pages/Tokens/Dimension/Space/NamedSpace/NameSpace+PaddingStack.swift b/Showcase/Showcase/Pages/Tokens/Dimension/Space/NamedSpace/NameSpace+PaddingStack.swift new file mode 100644 index 000000000..8507a7443 --- /dev/null +++ b/Showcase/Showcase/Pages/Tokens/Dimension/Space/NamedSpace/NameSpace+PaddingStack.swift @@ -0,0 +1,47 @@ +// +// 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 OUDSTokensSemantic + +extension NamedSpace { + + enum PaddingStack: String, CaseIterable { + case spacePaddingBlockNone + case spacePaddingBlockShorter + case spacePaddingBlockShort + case spacePaddingBlockMedium + case spacePaddingBlockTall + case spacePaddingBlockTaller + case spacePaddingBlockTallest + + func token(from theme: OUDSTheme) -> SpaceSemanticToken { + switch self { + case .spacePaddingBlockNone: + return theme.spacePaddingBlockNone + case .spacePaddingBlockShorter: + return theme.spacePaddingBlockShorter + case .spacePaddingBlockShort: + return theme.spacePaddingBlockShort + case .spacePaddingBlockMedium: + return theme.spacePaddingBlockMedium + case .spacePaddingBlockTall: + return theme.spacePaddingBlockTall + case .spacePaddingBlockTaller: + return theme.spacePaddingBlockTaller + case .spacePaddingBlockTallest: + return theme.spacePaddingBlockTallest + } + } + } +} diff --git a/Showcase/Showcase/Pages/Tokens/Dimension/Space/NamedSpace/NamedSpace+Fixed.swift b/Showcase/Showcase/Pages/Tokens/Dimension/Space/NamedSpace/NamedSpace+Fixed.swift new file mode 100644 index 000000000..6b545f9c7 --- /dev/null +++ b/Showcase/Showcase/Pages/Tokens/Dimension/Space/NamedSpace/NamedSpace+Fixed.swift @@ -0,0 +1,62 @@ +// +// 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 OUDSTokensSemantic + +extension NamedSpace { + + enum Fixed: String, CaseIterable { + case spaceFixedNone + case spaceFixedSmash + case spaceFixedShortest + case spaceFixedShorter + case spaceFixedShort + case spaceFixedMedium + case spaceFixedTall + case spaceFixedTaller + case spaceFixedTallest + case spaceFixedSpacious + case spaceFixedHuge + case spaceFixedJumbo + + func token(from theme: OUDSTheme) -> SpaceSemanticToken { + switch self { + case .spaceFixedNone: + return theme.spaceFixedNone + case .spaceFixedSmash: + return theme.spaceFixedSmash + case .spaceFixedShortest: + return theme.spaceFixedShortest + case .spaceFixedShorter: + return theme.spaceFixedShorter + case .spaceFixedShort: + return theme.spaceFixedShort + case .spaceFixedMedium: + return theme.spaceFixedMedium + case .spaceFixedTall: + return theme.spaceFixedTall + case .spaceFixedTaller: + return theme.spaceFixedTaller + case .spaceFixedTallest: + return theme.spaceFixedTallest + case .spaceFixedSpacious: + return theme.spaceFixedSpacious + case .spaceFixedHuge: + return theme.spaceFixedHuge + case .spaceFixedJumbo: + return theme.spaceFixedJumbo + } + } + } +} diff --git a/Showcase/Showcase/Pages/Tokens/Dimension/Space/NamedSpace/NamedSpace+Scaled.swift b/Showcase/Showcase/Pages/Tokens/Dimension/Space/NamedSpace/NamedSpace+Scaled.swift new file mode 100644 index 000000000..222338d01 --- /dev/null +++ b/Showcase/Showcase/Pages/Tokens/Dimension/Space/NamedSpace/NamedSpace+Scaled.swift @@ -0,0 +1,56 @@ +// +// 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 OUDSTokensSemantic + +extension NamedSpace { + + enum Scaled: String, CaseIterable { + case spaceScaledNone + case spaceScaledSmash + case spaceScaledShortest + case spaceScaledShorter + case spaceScaledShort + case spaceScaledMedium + case spaceScaledTall + case spaceScaledTaller + case spaceScaledTallest + case spaceScaledSpacious + + func token(from theme: OUDSTheme) -> MultipleSpaceTokens { + switch self { + case .spaceScaledNone: + return theme.spaceScaledNone + case .spaceScaledSmash: + return theme.spaceScaledSmash + case .spaceScaledShortest: + return theme.spaceScaledShortest + case .spaceScaledShorter: + return theme.spaceScaledShorter + case .spaceScaledShort: + return theme.spaceScaledShort + case .spaceScaledMedium: + return theme.spaceScaledMedium + case .spaceScaledTall: + return theme.spaceScaledTall + case .spaceScaledTaller: + return theme.spaceScaledTaller + case .spaceScaledTallest: + return theme.spaceScaledTallest + case .spaceScaledSpacious: + return theme.spaceScaledSpacious + } + } + } +} diff --git a/Showcase/Showcase/Pages/Tokens/Dimension/Spacing/SpacingTokenElement.swift b/Showcase/Showcase/Pages/Tokens/Dimension/Space/SpaceTokenElement.swift similarity index 73% rename from Showcase/Showcase/Pages/Tokens/Dimension/Spacing/SpacingTokenElement.swift rename to Showcase/Showcase/Pages/Tokens/Dimension/Space/SpaceTokenElement.swift index 9198adb30..b142b9c24 100644 --- a/Showcase/Showcase/Pages/Tokens/Dimension/Spacing/SpacingTokenElement.swift +++ b/Showcase/Showcase/Pages/Tokens/Dimension/Space/SpaceTokenElement.swift @@ -13,16 +13,16 @@ import SwiftUI -struct SpacingTokenElement: TokenElement { +struct SpaceTokenElement: TokenElement { let name: String let imageName: String let description: String let pageDescription: AnyView init() { - name = "app_tokens_dimension_spacing_label" + name = "app_tokens_dimension_space_label" imageName = "ic_dimension" - description = "app_tokens_dimension_spacing_description_text" - pageDescription = AnyView(SpacingTokenPage()) + description = "app_tokens_dimension_space_description_text" + pageDescription = AnyView(SpaceTokenPage()) } } diff --git a/Showcase/Showcase/Pages/Tokens/Dimension/Space/SpaceTokenPage.swift b/Showcase/Showcase/Pages/Tokens/Dimension/Space/SpaceTokenPage.swift new file mode 100644 index 000000000..a0e40d374 --- /dev/null +++ b/Showcase/Showcase/Pages/Tokens/Dimension/Space/SpaceTokenPage.swift @@ -0,0 +1,326 @@ +// +// 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 OUDSTokensRaw +import OUDSTokensSemantic +import SwiftUI + +// MARK: - Internal constants + +private let kIillustrationHeight = 72.0 +private let kIllustrationWidth = 72.0 + +// MARK: - Space Token Page + +struct SpaceTokenPage: View { + + @Environment(\.theme) private var theme + @Environment(\.horizontalSizeClass) private var horizontalSizeClass + @Environment(\.verticalSizeClass) private var verticalSizeClass + @Environment(\.colorScheme) private var colorScheme + + // MARK: Body + + var body: some View { + Group { + // Basic Space Tokens + Section { illustrationForScaledSpaces() } header: { + header("app_tokens_dimension_space_scaled_label") + } + Section { illustrationForFixedSpacings() } header: { header("app_tokens_dimension_space_fixed_label") + } + // Padding Sapce Tokens + Section { illustrationForPaddingInline() } header: { + header("app_tokens_dimension_space_paddingInline_label") + } + Section { illustrationForPaddingInlineWithIcon() } header: { + header("app_tokens_dimension_space_paddingInlineWithIcon_label") + } + Section { illustrationForPaddingInlineWithArrow() } header: { + header("app_tokens_dimension_space_paddingInlineWithArrow_label") + } + Section { illustrationForPaddingInset() } header: { + header("app_tokens_dimension_space_paddingInset_label") + } + Section { illustrationForPaddingStack() } header: { + header("app_tokens_dimension_space_paddingStack_label") + } + // Gap Space Tokens + Section { illustrationForGapInline() } header: { + header("app_tokens_dimension_space_gapInline_label") + } + Section { illustrationForGapStack() } header: { + header("app_tokens_dimension_space_gapStack_label") + } + } + .padding(.horizontal, theme.spaceFixedMedium) + } + + // MARK: Fixed Sapces + + private func illustrationForFixedSpacings() -> some View { + VStack(alignment: .leading, spacing: theme.spaceFixedNone) { + ForEach(NamedSpace.Fixed.allCases, id: \.rawValue) { namedSpaceToken in + let token = namedSpaceToken.token(from: theme) + let name = namedSpaceToken.rawValue + // Fixed spacings are illustrated as a gap inline + illustation(for: Gap.inline(token), name: name) + } + } + } + + // MARK: Scaled Spaces + + private func illustrationForScaledSpaces() -> some View { + VStack(alignment: .leading, spacing: theme.spaceFixedNone) { + ForEach(NamedSpace.Scaled.allCases, id: \.rawValue) { namedSpaceToken in + illustration(for: namedSpaceToken) + } + } + } + + private func illustration(for namedSpaceToken: NamedSpace.Scaled) -> some View { + let token = namedSpaceToken.token(from: theme) + let name = namedSpaceToken.rawValue + let horizontalDimensionRawToken = token.dimension(for: horizontalSizeClass ?? .regular) + let verticalDimensionRawToken = token.dimension(for: verticalSizeClass ?? .regular) + + let value = String(format: "horizontal %@ (%.0f pt)\nvertical %@ (%.0f pt)", + horizontalSizeClass == .regular ? "regular" : "compact", + horizontalDimensionRawToken, + verticalSizeClass == .regular ? "regular" : "compact", + verticalDimensionRawToken) + + return ShowcaseTokenIllustration(tokenName: name, tokenValue: value) { + ZStack { + Rectangle() + .fill(theme.colorBgEmphasized.color(for: colorScheme)) + .frame(width: kIllustrationWidth, height: kIillustrationHeight, alignment: .center) + Rectangle() + .fill(theme.colorAlwaysInfo.color(for: colorScheme)) + .opacity(0.5) + .frame(width: horizontalDimensionRawToken, height: kIillustrationHeight, alignment: .center) + + Rectangle() + .fill(theme.colorAlwaysInfo.color(for: colorScheme)) + .opacity(0.5) + .frame(width: kIllustrationWidth, height: verticalDimensionRawToken, alignment: .center) + } + } + } + + // MARK: Padding illustrations + + private func illustrationForPaddingInline() -> some View { + VStack(alignment: .leading, spacing: theme.spaceFixedNone) { + ForEach(NamedSpace.PaddingInline.allCases, id: \.rawValue) { namedSpaceToken in + let token = namedSpaceToken.token(from: theme) + let name = namedSpaceToken.rawValue + illustation(for: Padding.inline(token), name: name) + } + } + } + + private func illustrationForPaddingInlineWithIcon() -> some View { + VStack(alignment: .leading, spacing: theme.spaceFixedNone) { + ForEach(NamedSpace.PaddingInlineWithIcon.allCases, id: \.rawValue) { namedSpaceToken in + let token = namedSpaceToken.token(from: theme) + let name = namedSpaceToken.rawValue + illustation( + for: Padding.inlineWithIcon(token), + name: name, + additionalAsset: (icon: Image(decorative: "ic_token"), horizontalPadding: 1)) + } + } + } + private func illustrationForPaddingInlineWithArrow() -> some View { + VStack(alignment: .leading, spacing: theme.spaceFixedNone) { + ForEach(NamedSpace.PaddingInlineWithArrow.allCases, id: \.rawValue) { namedSpaceToken in + let token = namedSpaceToken.token(from: theme) + let name = namedSpaceToken.rawValue + illustation( + for: Padding.inlineWithArrow(token), + name: name, + additionalAsset: (icon: Image(decorative: "ic_vector"), horizontalPadding: 5)) + } + } + } + + private func illustrationForPaddingInset() -> some View { + VStack(alignment: .leading, spacing: theme.spaceFixedNone) { + ForEach(NamedSpace.PaddingInset.allCases, id: \.rawValue) { namedSpaceToken in + let token = namedSpaceToken.token(from: theme) + let name = namedSpaceToken.rawValue + illustation(for: Padding.inset(token), name: name) + } + } + } + + private func illustrationForPaddingStack() -> some View { + VStack(alignment: .leading, spacing: theme.spaceFixedNone) { + ForEach(NamedSpace.PaddingStack.allCases, id: \.rawValue) { namedSpaceToken in + let token = namedSpaceToken.token(from: theme) + let name = namedSpaceToken.rawValue + illustation(for: Padding.stack(token), name: name) + } + } + } + + // MARK: Gap illustrations + + private func illustrationForGapInline() -> some View { + VStack(alignment: .leading, spacing: theme.spaceFixedNone) { + ForEach(NamedSpace.GapInline.allCases, id: \.rawValue) { namedSpaceToken in + let token = namedSpaceToken.token(from: theme) + let name = namedSpaceToken.rawValue + illustation(for: Gap.inline(token), name: name) + } + } + } + + private func illustrationForGapStack() -> some View { + VStack(alignment: .leading, spacing: theme.spaceFixedNone) { + ForEach(NamedSpace.GapStack.allCases, id: \.rawValue) { namedSpaceToken in + let token = namedSpaceToken.token(from: theme) + let name = namedSpaceToken.rawValue + illustation(for: Gap.stack(token), name: name) + } + } + } + + // MARK: Common helpers + + private func header(_ text: LocalizedStringKey) -> some View { + Text(text).showcaseSectionHeaderStyle() + } + + @ViewBuilder + private func illustation(for paddingType: Padding, name: String, additionalAsset: (icon: Image, horizontalPadding: Double)? = nil) -> some View { + let value = String(format: "%.2f (pt)", paddingType.dimension) + + ShowcaseTokenIllustration(tokenName: name, tokenValue: value) { + ZStack(alignment: .leading) { + Rectangle() + .fill(theme.colorAlwaysInfo.color(for: colorScheme)) + + Rectangle() + .fill(theme.colorBgEmphasized.color(for: colorScheme)) + .modifier(PaddingModifier(padding: paddingType)) + + if let additionalAsset { + VStack(alignment: .leading) { + additionalAsset.icon + .renderingMode(.template) + .resizable() + .aspectRatio(contentMode: .fit) + .foregroundColor(theme.colorAlwaysInfo.color(for: colorScheme)) + } + .padding(.horizontal, additionalAsset.horizontalPadding) + .frame(width: 24, alignment: .leading) + .modifier(PaddingModifier(padding: paddingType)) + } + } + .frame(width: kIllustrationWidth, height: kIillustrationHeight, alignment: .leading) + } + } + + @ViewBuilder + private func illustation(for gapType: Gap, name: String) -> some View { + let value = String(format: "%.2f (pt)", gapType.dimension) + + ShowcaseTokenIllustration(tokenName: name, tokenValue: value) { + ZStack { + Rectangle() + .fill(theme.colorBgEmphasized.color(for: colorScheme)) + + Rectangle() + .fill(theme.colorAlwaysInfo.color(for: colorScheme)) + .modifier(GapModifier(gap: gapType)) + } + .frame(width: kIllustrationWidth, height: kIillustrationHeight, alignment: .center) + } + } +} + +// MARK: - Gap + +enum Gap { + case inline(DimensionRawToken) + case stack(DimensionRawToken) + + var dimension: DimensionRawToken { + switch self { + case .inline(let dimension), .stack(let dimension): + return dimension + } + } +} + +// MARK: - Gap Modifier + +private struct GapModifier: ViewModifier { + + let gap: Gap + + func body(content: Content) -> some View { + switch gap { + case .inline(let dimensionRawToken): + content.frame(width: dimensionRawToken, height: kIillustrationHeight, alignment: .center) + + case .stack(let dimensionRawToken): + content.frame(width: kIllustrationWidth, height: dimensionRawToken, alignment: .center) + } + } +} + +// MARK: - Padding + +enum Padding { + case inline(DimensionRawToken) + case stack(DimensionRawToken) + case inset(DimensionRawToken) + case inlineWithIcon(DimensionRawToken) + case inlineWithArrow(DimensionRawToken) + + var dimension: DimensionRawToken { + switch self { + case .inline(let dimension), .stack(let dimension), .inset(let dimension), .inlineWithIcon(let dimension), .inlineWithArrow(let dimension): + return dimension + } + } +} + +// MARK: - Padding Modifier + +private struct PaddingModifier: ViewModifier { + + let padding: Padding + + func body(content: Content) -> some View { + switch padding { + case .inline(let dimension), .inlineWithIcon(let dimension), .inlineWithArrow(let dimension): + content.padding(.leading, dimension) + case .stack(let dimension): + content.padding(.top, dimension) + case .inset(let dimension): + content + .padding(.top, dimension) + .padding(.leading, dimension) + } + } +} + +// MARK: - Named Space + +enum NamedSpace { } diff --git a/Showcase/Showcase/Pages/Tokens/Dimension/Spacing/SpacingTokenPage.swift b/Showcase/Showcase/Pages/Tokens/Dimension/Spacing/SpacingTokenPage.swift deleted file mode 100644 index 81b205cd2..000000000 --- a/Showcase/Showcase/Pages/Tokens/Dimension/Spacing/SpacingTokenPage.swift +++ /dev/null @@ -1,98 +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 OUDSTokensSemantic -import SwiftUI - -struct SpacingTokenPage: View { - - @Environment(\.theme) private var theme - @Environment(\.horizontalSizeClass) private var horizontalSizeClass - @Environment(\.verticalSizeClass) private var verticalSizeClass - @Environment(\.colorScheme) private var colorScheme - - // MARK: Body - - var body: some View { - VStack(alignment: .leading, spacing: theme.spaceFixedNone) { - ForEach(NamedSpacing.allCases, id: \.rawValue) { spacingName in - illustration(for: spacingName) - } - } - .frame(maxWidth: .infinity) - .padding(.horizontal, theme.spaceFixedMedium) - } - - // MARK: Private helpers - - private func illustration(for namedSpacing: NamedSpacing) -> some View { - let token = namedSpacing.token(from: theme) - let name = namedSpacing.rawValue - let horizontalDimensionRawToken = token.dimension(for: horizontalSizeClass ?? .regular) - let value = String(format: "horizontal %@\n %.0f pt", - horizontalSizeClass == .regular ? "regular" : "compact", - horizontalDimensionRawToken) - - return ShowcaseTokenIllustration(tokenName: name, tokenValue: value) { - ZStack { - Rectangle() - .fill(theme.colorAlwaysOnBackgroundAccent.color(for: colorScheme)) - .frame(width: 64, height: 64, alignment: .center) - Rectangle() - .fill(.blue) - .frame(width: horizontalDimensionRawToken, height: 64, alignment: .center) - } - } - } -} - -// MARK: - Named Spacing - -private enum NamedSpacing: String, CaseIterable { - case spaceScaledNone - case spaceScaledSmash - case spaceScaledShortest - case spaceScaledShorter - case spaceScaledShort - case spaceScaledMedium - case spaceScaledTall - case spaceScaledTaller - case spaceScaledTallest - case spaceScaledSpacious - - func token(from theme: OUDSTheme) -> MultipleSpacingTokens { - switch self { - case .spaceScaledNone: - return theme.spaceScaledNone - case .spaceScaledSmash: - return theme.spaceScaledSmash - case .spaceScaledShortest: - return theme.spaceScaledShortest - case .spaceScaledShorter: - return theme.spaceScaledShorter - case .spaceScaledShort: - return theme.spaceScaledShort - case .spaceScaledMedium: - return theme.spaceScaledMedium - case .spaceScaledTall: - return theme.spaceScaledTall - case .spaceScaledTaller: - return theme.spaceScaledTaller - case .spaceScaledTallest: - return theme.spaceScaledTallest - case .spaceScaledSpacious: - return theme.spaceScaledSpacious - } - } -} diff --git a/Showcase/Showcase/Pages/Tokens/Elevation/ElevationTokenPage.swift b/Showcase/Showcase/Pages/Tokens/Elevation/ElevationTokenPage.swift index f2f99f942..642ca2934 100644 --- a/Showcase/Showcase/Pages/Tokens/Elevation/ElevationTokenPage.swift +++ b/Showcase/Showcase/Pages/Tokens/Elevation/ElevationTokenPage.swift @@ -45,7 +45,7 @@ struct ElevationTokenPage: View { return ShowcaseTokenIllustration(tokenName: name, tokenValue: value) { Rectangle() .frame(width: theme.sizeIconDecorativeTallest, height: theme.sizeIconDecorativeTallest) - .foregroundColor(theme.colorBackgroundSecondary.color(for: colorScheme)) + .foregroundColor(theme.colorBgSecondary.color(for: colorScheme)) .shadow(elevation: token) .padding(.bottom, 2) } @@ -56,7 +56,6 @@ struct ElevationTokenPage: View { private enum NamedElevation: String, CaseIterable { case elevationNone - case elevationFocus case elevationRaised case elevationStickyNavigationScrolled case elevationOverlayDefault @@ -69,8 +68,6 @@ private enum NamedElevation: String, CaseIterable { switch self { case .elevationNone: return theme.elevationNone - case .elevationFocus: - return theme.elevationFocus case .elevationRaised: return theme.elevationRaised case .elevationStickyNavigationScrolled: diff --git a/Showcase/Showcase/Pages/Tokens/Opacity/OpacityTokenPage.swift b/Showcase/Showcase/Pages/Tokens/Opacity/OpacityTokenPage.swift index 454280d7d..30f487392 100644 --- a/Showcase/Showcase/Pages/Tokens/Opacity/OpacityTokenPage.swift +++ b/Showcase/Showcase/Pages/Tokens/Opacity/OpacityTokenPage.swift @@ -52,7 +52,7 @@ struct OpacityTokenPage: View { .accessibilityHidden(true) Rectangle() - .fill(theme.colorBackgroundEmphasized.color(for: colorScheme)) + .fill(theme.colorBgEmphasized.color(for: colorScheme)) .opacity(token) .frame(width: 48, height: 48) .oudsBorder(style: theme.borderStyleDefault, diff --git a/Showcase/Showcase/Pages/Tokens/Typography/NamedTypography/NamedTypography+Illustration.swift b/Showcase/Showcase/Pages/Tokens/Typography/NamedTypography/NamedTypography+Illustration.swift new file mode 100644 index 000000000..1323630d9 --- /dev/null +++ b/Showcase/Showcase/Pages/Tokens/Typography/NamedTypography/NamedTypography+Illustration.swift @@ -0,0 +1,82 @@ +// +// 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 OUDSTokensSemantic +import SwiftUI + +// MARK: - Token Illustration + +// Used in Typography screen and SizeIconWithLabel +extension View { + + @ViewBuilder + func illustration(for namedTypography: NamedTypography, in theme: OUDSTheme) -> some View { + switch namedTypography { + case .displayLarge: + Text(namedTypography.rawValue.camelCase).typeDisplayLarge(theme) + case .displayMedium: + Text(namedTypography.rawValue.camelCase).typeDisplayMedium(theme) + case .displaySmall: + Text(namedTypography.rawValue.camelCase).typeDisplaySmall(theme) + case .headingXLarge: + Text(namedTypography.rawValue.camelCase).typeHeadingXLarge(theme) + case .headingLarge: + Text(namedTypography.rawValue.camelCase).typeHeadingLarge(theme) + case .headingMedium: + Text(namedTypography.rawValue.camelCase).typeHeadingMedium(theme) + case .headingSmall: + Text(namedTypography.rawValue.camelCase).typeHeadingSmall(theme) + case .bodyDefaultLarge: + Text(namedTypography.rawValue.camelCase).typeBodyDefaultLarge(theme) + case .bodyDefaultMedium: + Text(namedTypography.rawValue.camelCase).typeBodyDefaultMedium(theme) + case .bodyDefaultSmall: + Text(namedTypography.rawValue.camelCase).typeBodyDefaultSmall(theme) + case .bodyStrongLarge: + Text(namedTypography.rawValue.camelCase).typeBodyStrongLarge(theme) + case .bodyStrongMedium: + Text(namedTypography.rawValue.camelCase).typeBodyStrongMedium(theme) + case .bodyStrongSmall: + Text(namedTypography.rawValue.camelCase).typeBodyStrongSmall(theme) + case .labelDefaultXLarge: + Text(namedTypography.rawValue.camelCase).typeLabelDefaultXLarge(theme) + case .labelDefaultLarge: + Text(namedTypography.rawValue.camelCase).typeLabelDefaultLarge(theme) + case .labelDefaultMedium: + Text(namedTypography.rawValue.camelCase).typeLabelDefaultMedium(theme) + case .labelDefaultSmall: + Text(namedTypography.rawValue.camelCase).typeLabelDefaultSmall(theme) + case .labelStrongXLarge: + Text(namedTypography.rawValue.camelCase).typeLabelStrongXLarge(theme) + case .labelStrongLarge: + Text(namedTypography.rawValue.camelCase).typeLabelStrongLarge(theme) + case .labelStrongMedium: + Text(namedTypography.rawValue.camelCase).typeLabelStrongMedium(theme) + case .labelStrongSmall: + Text(namedTypography.rawValue.camelCase).typeLabelStrongSmall(theme) + case .codeSmall: + Text(namedTypography.rawValue.camelCase).typeCodeMedium(theme) + case .codeMedium: + Text(namedTypography.rawValue.camelCase).typeCodeMedium(theme) + } + } +} + +extension String { + // swiftlint:disable strict_fileprivate + fileprivate var camelCase: String { + self.prefix(1).capitalized + self.dropFirst() + } + // swiftlint:enable strict_fileprivate +} diff --git a/Showcase/Showcase/Pages/Tokens/Typography/NamedTypography/NamedTypography.swift b/Showcase/Showcase/Pages/Tokens/Typography/NamedTypography/NamedTypography.swift new file mode 100644 index 000000000..ee97cd0bb --- /dev/null +++ b/Showcase/Showcase/Pages/Tokens/Typography/NamedTypography/NamedTypography.swift @@ -0,0 +1,97 @@ +// +// 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 OUDSTokensSemantic +import SwiftUI + +// MARK: - Named Typography + +enum NamedTypography: String, CaseIterable { + case displayLarge + case displayMedium + case displaySmall + case headingXLarge + case headingLarge + case headingMedium + case headingSmall + case bodyDefaultLarge + case bodyDefaultMedium + case bodyDefaultSmall + case bodyStrongLarge + case bodyStrongMedium + case bodyStrongSmall + case labelDefaultXLarge + case labelDefaultLarge + case labelDefaultMedium + case labelDefaultSmall + case labelStrongXLarge + case labelStrongLarge + case labelStrongMedium + case labelStrongSmall + case codeMedium + case codeSmall + + // MARK: - Token Values + + func token(from theme: OUDSTheme) -> MultipleTypographyTokens { + switch self { + case .displayLarge: + return theme.typeDisplayLarge + case .displayMedium: + return theme.typeDisplayMedium + case .displaySmall: + return theme.typeDisplaySmall + case .headingXLarge: + return theme.typeHeadingXLarge + case .headingLarge: + return theme.typeHeadingLarge + case .headingMedium: + return theme.typeHeadingMedium + case .headingSmall: + return theme.typeHeadingSmall + case .bodyDefaultLarge: + return theme.typeBodyDefaultLarge + case .bodyDefaultMedium: + return theme.typeBodyDefaultMedium + case .bodyDefaultSmall: + return theme.typeBodyDefaultSmall + case .bodyStrongLarge: + return theme.typeBodyStrongLarge + case .bodyStrongMedium: + return theme.typeBodyStrongMedium + case .bodyStrongSmall: + return theme.typeBodyStrongSmall + case .labelDefaultXLarge: + return theme.typeLabelDefaultXLarge + case .labelDefaultLarge: + return theme.typeLabelDefaultLarge + case .labelDefaultMedium: + return theme.typeLabelDefaultMedium + case .labelDefaultSmall: + return theme.typeLabelDefaultSmall + case .labelStrongXLarge: + return theme.typeLabelStrongXLarge + case .labelStrongLarge: + return theme.typeLabelStrongLarge + case .labelStrongMedium: + return theme.typeLabelStrongMedium + case .labelStrongSmall: + return theme.typeLabelStrongSmall + case .codeSmall: + return theme.typeCodeSmall + case .codeMedium: + return theme.typeCodeMedium + } + } +} diff --git a/Showcase/Showcase/Pages/Tokens/Typography/TypographyTokenPage.swift b/Showcase/Showcase/Pages/Tokens/Typography/TypographyTokenPage.swift index 0b8b48b8f..0c74a947e 100644 --- a/Showcase/Showcase/Pages/Tokens/Typography/TypographyTokenPage.swift +++ b/Showcase/Showcase/Pages/Tokens/Typography/TypographyTokenPage.swift @@ -21,6 +21,7 @@ struct TypographyTokenPage: View { @Environment(\.theme) private var theme @Environment(\.colorScheme) private var colorScheme + @Environment(\.horizontalSizeClass) private var horizontalSizeClass // MARK: Body @@ -30,8 +31,7 @@ struct TypographyTokenPage: View { illustration(from: typographyName) } } - .frame(maxWidth: .infinity, alignment: .leading) - .padding(.horizontal, theme.spaceFixedShort) + .padding(.horizontal, theme.spaceFixedMedium) .navigationTitle(LocalizedStringKey("app_tokens_typography_label")) } @@ -39,11 +39,12 @@ struct TypographyTokenPage: View { @ViewBuilder private func illustration(from namedTypography: NamedTypography) -> some View { - let token = namedTypography.token(from: theme).compact + let horizontalSizeClass = horizontalSizeClass ?? .regular + let token = namedTypography.token(from: theme).typographyToken(for: horizontalSizeClass) VStack(alignment: .leading, spacing: theme.spaceFixedNone) { - typgraphyIllustration(from: namedTypography) - .foregroundStyle(theme.colorContentMuted.color(for: colorScheme)) + illustration(for: namedTypography, in: theme) + .foregroundStyle(theme.colorContentDefault.color(for: colorScheme)) Group { Text("family (\(theme.customFontFamily ?? "system")), ") @@ -54,140 +55,9 @@ struct TypographyTokenPage: View { } .typeBodyDefaultMedium(theme) .fixedSize(horizontal: false, vertical: true) - .foregroundStyle(theme.colorContentDefault.color(for: colorScheme)) + .foregroundStyle(theme.colorContentMuted.color(for: colorScheme)) } .frame(maxWidth: .infinity, alignment: .leading) .padding(.vertical, theme.spaceFixedShorter) } - - @ViewBuilder - private func typgraphyIllustration(from namedTypography: NamedTypography) -> some View { - switch namedTypography { - case .displayLarge: - Text(namedTypography.rawValue).typeDisplayLarge(theme) - case .displayMedium: - Text(namedTypography.rawValue).typeDisplayMedium(theme) - case .displaySmall: - Text(namedTypography.rawValue).typeDisplaySmall(theme) - case .headingXLarge: - Text(namedTypography.rawValue).typeHeadingXLarge(theme) - case .headingLarge: - Text(namedTypography.rawValue).typeHeadingLarge(theme) - case .headingMedium: - Text(namedTypography.rawValue).typeHeadingMedium(theme) - case .headingSmall: - Text(namedTypography.rawValue).typeHeadingSmall(theme) - case .bodyDefaultLarge: - Text(namedTypography.rawValue).typeBodyDefaultLarge(theme) - case .bodyDefaultMedium: - Text(namedTypography.rawValue).typeBodyDefaultMedium(theme) - case .bodyDefaultSmall: - Text(namedTypography.rawValue).typeBodyDefaultSmall(theme) - case .bodyStrongLarge: - Text(namedTypography.rawValue).typeBodyStrongLarge(theme) - case .bodyStrongMedium: - Text(namedTypography.rawValue).typeBodyStrongMedium(theme) - case .bodyStrongSmall: - Text(namedTypography.rawValue).typeBodyStrongSmall(theme) - case .labelDefaultXLarge: - Text(namedTypography.rawValue).typeLabelDefaultXLarge(theme) - case .labelDefaultLarge: - Text(namedTypography.rawValue).typeLabelDefaultLarge(theme) - case .labelDefaultMedium: - Text(namedTypography.rawValue).typeLabelDefaultMedium(theme) - case .labelDefaultSmall: - Text(namedTypography.rawValue).typeLabelDefaultSmall(theme) - case .labelStrongXLarge: - Text(namedTypography.rawValue).typeLabelStrongXLarge(theme) - case .labelStrongLarge: - Text(namedTypography.rawValue).typeLabelStrongLarge(theme) - case .labelStrongMedium: - Text(namedTypography.rawValue).typeLabelStrongMedium(theme) - case .labelStrongSmall: - Text(namedTypography.rawValue).typeLabelStrongSmall(theme) - case .codeSmall: - Text(namedTypography.rawValue).typeCodeMedium(theme) - case .codeMedium: - Text(namedTypography.rawValue).typeCodeMedium(theme) - } - } -} - -// MARK: - Named Typography - -private enum NamedTypography: String, CaseIterable { - case displayLarge - case displayMedium - case displaySmall - case headingXLarge - case headingLarge - case headingMedium - case headingSmall - case bodyDefaultLarge - case bodyDefaultMedium - case bodyDefaultSmall - case bodyStrongLarge - case bodyStrongMedium - case bodyStrongSmall - case labelDefaultXLarge - case labelDefaultLarge - case labelDefaultMedium - case labelDefaultSmall - case labelStrongXLarge - case labelStrongLarge - case labelStrongMedium - case labelStrongSmall - case codeMedium - case codeSmall - - func token(from theme: OUDSTheme) -> MultipleTypographyTokens { - switch self { - case .displayLarge: - return theme.typeDisplayLarge - case .displayMedium: - return theme.typeDisplayMedium - case .displaySmall: - return theme.typeDisplaySmall - case .headingXLarge: - return theme.typeHeadingXLarge - case .headingLarge: - return theme.typeHeadingLarge - case .headingMedium: - return theme.typeHeadingMedium - case .headingSmall: - return theme.typeHeadingSmall - case .bodyDefaultLarge: - return theme.typeBodyDefaultLarge - case .bodyDefaultMedium: - return theme.typeBodyDefaultMedium - case .bodyDefaultSmall: - return theme.typeBodyDefaultSmall - case .bodyStrongLarge: - return theme.typeBodyStrongLarge - case .bodyStrongMedium: - return theme.typeBodyStrongMedium - case .bodyStrongSmall: - return theme.typeBodyStrongSmall - case .labelDefaultXLarge: - return theme.typeLabelDefaultXLarge - case .labelDefaultLarge: - return theme.typeLabelDefaultLarge - case .labelDefaultMedium: - return theme.typeLabelDefaultMedium - case .labelDefaultSmall: - return theme.typeLabelDefaultSmall - case .labelStrongXLarge: - return theme.typeLabelStrongXLarge - case .labelStrongLarge: - return theme.typeLabelStrongLarge - case .labelStrongMedium: - return theme.typeLabelStrongMedium - case .labelStrongSmall: - return theme.typeLabelStrongSmall - case .codeSmall: - return theme.typeCodeSmall - case .codeMedium: - return theme.typeCodeMedium - } - } } diff --git a/Showcase/Showcase/Pages/Utils/ShowcaseElement.swift b/Showcase/Showcase/Pages/Utils/ShowcaseElement.swift index 805126688..9b415f8e6 100644 --- a/Showcase/Showcase/Pages/Utils/ShowcaseElement.swift +++ b/Showcase/Showcase/Pages/Utils/ShowcaseElement.swift @@ -13,6 +13,7 @@ import SwiftUI +@MainActor protocol ShowcaseElement { var name: String { get } var imageName: String { get } diff --git a/Showcase/Showcase/Pages/Utils/ShowcaseElementPage.swift b/Showcase/Showcase/Pages/Utils/ShowcaseElementPage.swift index 821581e64..c9b73f8c4 100644 --- a/Showcase/Showcase/Pages/Utils/ShowcaseElementPage.swift +++ b/Showcase/Showcase/Pages/Utils/ShowcaseElementPage.swift @@ -42,18 +42,18 @@ struct ShowcaseElementPage: View { .listRowSeparator(Visibility.hidden) .padding(.horizontal, theme.spaceFixedNone) .padding(.bottom, theme.spaceFixedMedium) - .background(theme.colorBackgroundPrimary.color(for: colorScheme)) + .background(theme.colorBgPrimary.color(for: colorScheme)) element.pageDescription .listRowInsets(EdgeInsets()) .listRowSeparator(Visibility.hidden) .padding(.bottom, theme.spaceFixedMedium) - .background(theme.colorBackgroundPrimary.color(for: colorScheme)) + .background(theme.colorBgPrimary.color(for: colorScheme)) } .listStyle(.plain) .padding(.top, theme.spaceFixedNone) .padding(.horizontal, theme.spaceFixedNone) - .background(theme.colorBackgroundPrimary.color(for: colorScheme)) + .background(theme.colorBgPrimary.color(for: colorScheme)) .navigationTitle(LocalizedStringKey(element.name)) .navigationbarMenuForThemeSelection() .oudsRequestAccessibleFocus(_requestFocus) diff --git a/Showcase/Showcase/Pages/Utils/ShowcaseElementsPage.swift b/Showcase/Showcase/Pages/Utils/ShowcaseElementsPage.swift index 3b80decaa..bfbcd7e8c 100644 --- a/Showcase/Showcase/Pages/Utils/ShowcaseElementsPage.swift +++ b/Showcase/Showcase/Pages/Utils/ShowcaseElementsPage.swift @@ -45,9 +45,9 @@ struct ShowcaseElementsPage: View { } .padding(.all, theme.spaceFixedMedium) .navigationbarMenuForThemeSelection() - .oudsNavigationTitle("app_bottomBar_tokens") + .oudsNavigationTitle("app_bottomBar_tokens_label") } - .background(theme.colorBackgroundPrimary.color(for: colorScheme)) + .background(theme.colorBgPrimary.color(for: colorScheme)) } .navigationViewStyle(.stack) } diff --git a/Showcase/Showcase/Pages/Utils/ShowcaseSectionHeaderStyle.swift b/Showcase/Showcase/Pages/Utils/ShowcaseSectionHeaderStyle.swift new file mode 100644 index 000000000..dd6c066c3 --- /dev/null +++ b/Showcase/Showcase/Pages/Utils/ShowcaseSectionHeaderStyle.swift @@ -0,0 +1,33 @@ +// +// 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 OUDSTokensSemantic +import SwiftUI + +struct ShowcaseSectionHeaderModifier: ViewModifier { + + @Environment(\.theme) private var theme + + func body(content: Content) -> some View { + content + .typeHeadingMedium(theme) + .frame(maxWidth: .infinity, alignment: .leading) + } +} + +extension Text { + func showcaseSectionHeaderStyle() -> some View { + self.modifier(ShowcaseSectionHeaderModifier()) + } +} diff --git a/Showcase/Showcase/Resources/Assets.xcassets/AppIconAlpha.appiconset/Contents.json b/Showcase/Showcase/Resources/Assets.xcassets/AppIconAlpha.appiconset/Contents.json new file mode 100644 index 000000000..fbd714cdb --- /dev/null +++ b/Showcase/Showcase/Resources/Assets.xcassets/AppIconAlpha.appiconset/Contents.json @@ -0,0 +1,14 @@ +{ + "images" : [ + { + "filename" : "UDSDemo-A_SQR.png", + "idiom" : "universal", + "platform" : "ios", + "size" : "1024x1024" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Showcase/Showcase/Resources/Assets.xcassets/AppIconAlpha.appiconset/UDSDemo-A_SQR.png b/Showcase/Showcase/Resources/Assets.xcassets/AppIconAlpha.appiconset/UDSDemo-A_SQR.png new file mode 100644 index 000000000..c4f7cc85a Binary files /dev/null and b/Showcase/Showcase/Resources/Assets.xcassets/AppIconAlpha.appiconset/UDSDemo-A_SQR.png differ diff --git a/Showcase/Showcase/Resources/Assets.xcassets/AppIconBeta.appiconset/Contents.json b/Showcase/Showcase/Resources/Assets.xcassets/AppIconBeta.appiconset/Contents.json new file mode 100644 index 000000000..91cf481de --- /dev/null +++ b/Showcase/Showcase/Resources/Assets.xcassets/AppIconBeta.appiconset/Contents.json @@ -0,0 +1,14 @@ +{ + "images" : [ + { + "filename" : "UDSDemo-B_SQR.png", + "idiom" : "universal", + "platform" : "ios", + "size" : "1024x1024" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Showcase/Showcase/Resources/Assets.xcassets/AppIconBeta.appiconset/UDSDemo-B_SQR.png b/Showcase/Showcase/Resources/Assets.xcassets/AppIconBeta.appiconset/UDSDemo-B_SQR.png new file mode 100644 index 000000000..2887c3722 Binary files /dev/null and b/Showcase/Showcase/Resources/Assets.xcassets/AppIconBeta.appiconset/UDSDemo-B_SQR.png differ diff --git a/Showcase/Showcase/Resources/Assets.xcassets/AppIconDebug.appiconset/Contents.json b/Showcase/Showcase/Resources/Assets.xcassets/AppIconDebug.appiconset/Contents.json new file mode 100644 index 000000000..7210ebf6a --- /dev/null +++ b/Showcase/Showcase/Resources/Assets.xcassets/AppIconDebug.appiconset/Contents.json @@ -0,0 +1,14 @@ +{ + "images" : [ + { + "filename" : "UDSDemo-DEBUG_SQR.png", + "idiom" : "universal", + "platform" : "ios", + "size" : "1024x1024" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Showcase/Showcase/Resources/Assets.xcassets/AppIconDebug.appiconset/UDSDemo-DEBUG_SQR.png b/Showcase/Showcase/Resources/Assets.xcassets/AppIconDebug.appiconset/UDSDemo-DEBUG_SQR.png new file mode 100644 index 000000000..e8b286bc4 Binary files /dev/null and b/Showcase/Showcase/Resources/Assets.xcassets/AppIconDebug.appiconset/UDSDemo-DEBUG_SQR.png differ diff --git a/Showcase/Showcase/Resources/Assets.xcassets/AppIconDev.appiconset/App-Store-512@2x.png b/Showcase/Showcase/Resources/Assets.xcassets/AppIconDev.appiconset/App-Store-512@2x.png deleted file mode 100644 index ad6ccfb4b..000000000 Binary files a/Showcase/Showcase/Resources/Assets.xcassets/AppIconDev.appiconset/App-Store-512@2x.png and /dev/null differ diff --git a/Showcase/Showcase/Resources/Assets.xcassets/AppIconDev.appiconset/Contents.json b/Showcase/Showcase/Resources/Assets.xcassets/AppIconDev.appiconset/Contents.json deleted file mode 100644 index 723d49077..000000000 --- a/Showcase/Showcase/Resources/Assets.xcassets/AppIconDev.appiconset/Contents.json +++ /dev/null @@ -1,116 +0,0 @@ -{ - "images" : [ - { - "filename" : "iPhone-Notification-20@2x.png", - "idiom" : "iphone", - "scale" : "2x", - "size" : "20x20" - }, - { - "filename" : "iPhone-Notification-20@3x.png", - "idiom" : "iphone", - "scale" : "3x", - "size" : "20x20" - }, - { - "filename" : "iPhone-Settings-29@2x.png", - "idiom" : "iphone", - "scale" : "2x", - "size" : "29x29" - }, - { - "filename" : "iPhone-Settings-29@3x.png", - "idiom" : "iphone", - "scale" : "3x", - "size" : "29x29" - }, - { - "filename" : "iPhone-Spotlight-40@2x.png", - "idiom" : "iphone", - "scale" : "2x", - "size" : "40x40" - }, - { - "filename" : "iPhone-Spotlight-40@3x.png", - "idiom" : "iphone", - "scale" : "3x", - "size" : "40x40" - }, - { - "filename" : "iPhone-App-60@2x.png", - "idiom" : "iphone", - "scale" : "2x", - "size" : "60x60" - }, - { - "filename" : "iPhone-App-60@3x.png", - "idiom" : "iphone", - "scale" : "3x", - "size" : "60x60" - }, - { - "filename" : "iPad-Notification-20@1x.png", - "idiom" : "ipad", - "scale" : "1x", - "size" : "20x20" - }, - { - "filename" : "iPad-Notification-20@2x.png", - "idiom" : "ipad", - "scale" : "2x", - "size" : "20x20" - }, - { - "filename" : "iPad-Settings-29@1x.png", - "idiom" : "ipad", - "scale" : "1x", - "size" : "29x29" - }, - { - "filename" : "iPad-Settings-29@2x.png", - "idiom" : "ipad", - "scale" : "2x", - "size" : "29x29" - }, - { - "filename" : "iPad-Spotlight-40@1x.png", - "idiom" : "ipad", - "scale" : "1x", - "size" : "40x40" - }, - { - "filename" : "iPad-Spotlight-40@2x.png", - "idiom" : "ipad", - "scale" : "2x", - "size" : "40x40" - }, - { - "filename" : "iPad-App-76@1x.png", - "idiom" : "ipad", - "scale" : "1x", - "size" : "76x76" - }, - { - "filename" : "iPad-App-76@2x.png", - "idiom" : "ipad", - "scale" : "2x", - "size" : "76x76" - }, - { - "filename" : "iPad-Pro-App-83.5@2x.png", - "idiom" : "ipad", - "scale" : "2x", - "size" : "83.5x83.5" - }, - { - "filename" : "App-Store-512@2x.png", - "idiom" : "ios-marketing", - "scale" : "1x", - "size" : "1024x1024" - } - ], - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/Showcase/Showcase/Resources/Assets.xcassets/AppIconDev.appiconset/iPad-App-76@1x.png b/Showcase/Showcase/Resources/Assets.xcassets/AppIconDev.appiconset/iPad-App-76@1x.png deleted file mode 100644 index ce933a353..000000000 Binary files a/Showcase/Showcase/Resources/Assets.xcassets/AppIconDev.appiconset/iPad-App-76@1x.png and /dev/null differ diff --git a/Showcase/Showcase/Resources/Assets.xcassets/AppIconDev.appiconset/iPad-App-76@2x.png b/Showcase/Showcase/Resources/Assets.xcassets/AppIconDev.appiconset/iPad-App-76@2x.png deleted file mode 100644 index cfa59bb4c..000000000 Binary files a/Showcase/Showcase/Resources/Assets.xcassets/AppIconDev.appiconset/iPad-App-76@2x.png and /dev/null differ diff --git a/Showcase/Showcase/Resources/Assets.xcassets/AppIconDev.appiconset/iPad-Notification-20@1x.png b/Showcase/Showcase/Resources/Assets.xcassets/AppIconDev.appiconset/iPad-Notification-20@1x.png deleted file mode 100644 index 83c7b6b78..000000000 Binary files a/Showcase/Showcase/Resources/Assets.xcassets/AppIconDev.appiconset/iPad-Notification-20@1x.png and /dev/null differ diff --git a/Showcase/Showcase/Resources/Assets.xcassets/AppIconDev.appiconset/iPad-Notification-20@2x.png b/Showcase/Showcase/Resources/Assets.xcassets/AppIconDev.appiconset/iPad-Notification-20@2x.png deleted file mode 100644 index 457eb9175..000000000 Binary files a/Showcase/Showcase/Resources/Assets.xcassets/AppIconDev.appiconset/iPad-Notification-20@2x.png and /dev/null differ diff --git a/Showcase/Showcase/Resources/Assets.xcassets/AppIconDev.appiconset/iPad-Pro-App-83.5@2x.png b/Showcase/Showcase/Resources/Assets.xcassets/AppIconDev.appiconset/iPad-Pro-App-83.5@2x.png deleted file mode 100644 index 3f52f8608..000000000 Binary files a/Showcase/Showcase/Resources/Assets.xcassets/AppIconDev.appiconset/iPad-Pro-App-83.5@2x.png and /dev/null differ diff --git a/Showcase/Showcase/Resources/Assets.xcassets/AppIconDev.appiconset/iPad-Settings-29@1x.png b/Showcase/Showcase/Resources/Assets.xcassets/AppIconDev.appiconset/iPad-Settings-29@1x.png deleted file mode 100644 index 8a0afccd2..000000000 Binary files a/Showcase/Showcase/Resources/Assets.xcassets/AppIconDev.appiconset/iPad-Settings-29@1x.png and /dev/null differ diff --git a/Showcase/Showcase/Resources/Assets.xcassets/AppIconDev.appiconset/iPad-Settings-29@2x.png b/Showcase/Showcase/Resources/Assets.xcassets/AppIconDev.appiconset/iPad-Settings-29@2x.png deleted file mode 100644 index 7ca16146f..000000000 Binary files a/Showcase/Showcase/Resources/Assets.xcassets/AppIconDev.appiconset/iPad-Settings-29@2x.png and /dev/null differ diff --git a/Showcase/Showcase/Resources/Assets.xcassets/AppIconDev.appiconset/iPad-Spotlight-40@1x.png b/Showcase/Showcase/Resources/Assets.xcassets/AppIconDev.appiconset/iPad-Spotlight-40@1x.png deleted file mode 100644 index 9164ac251..000000000 Binary files a/Showcase/Showcase/Resources/Assets.xcassets/AppIconDev.appiconset/iPad-Spotlight-40@1x.png and /dev/null differ diff --git a/Showcase/Showcase/Resources/Assets.xcassets/AppIconDev.appiconset/iPad-Spotlight-40@2x.png b/Showcase/Showcase/Resources/Assets.xcassets/AppIconDev.appiconset/iPad-Spotlight-40@2x.png deleted file mode 100644 index 1f7361ead..000000000 Binary files a/Showcase/Showcase/Resources/Assets.xcassets/AppIconDev.appiconset/iPad-Spotlight-40@2x.png and /dev/null differ diff --git a/Showcase/Showcase/Resources/Assets.xcassets/AppIconDev.appiconset/iPhone-App-60@2x.png b/Showcase/Showcase/Resources/Assets.xcassets/AppIconDev.appiconset/iPhone-App-60@2x.png deleted file mode 100644 index 71e8b58a7..000000000 Binary files a/Showcase/Showcase/Resources/Assets.xcassets/AppIconDev.appiconset/iPhone-App-60@2x.png and /dev/null differ diff --git a/Showcase/Showcase/Resources/Assets.xcassets/AppIconDev.appiconset/iPhone-App-60@3x.png b/Showcase/Showcase/Resources/Assets.xcassets/AppIconDev.appiconset/iPhone-App-60@3x.png deleted file mode 100644 index 4dcea00bc..000000000 Binary files a/Showcase/Showcase/Resources/Assets.xcassets/AppIconDev.appiconset/iPhone-App-60@3x.png and /dev/null differ diff --git a/Showcase/Showcase/Resources/Assets.xcassets/AppIconDev.appiconset/iPhone-Notification-20@2x.png b/Showcase/Showcase/Resources/Assets.xcassets/AppIconDev.appiconset/iPhone-Notification-20@2x.png deleted file mode 100644 index 779b61b9a..000000000 Binary files a/Showcase/Showcase/Resources/Assets.xcassets/AppIconDev.appiconset/iPhone-Notification-20@2x.png and /dev/null differ diff --git a/Showcase/Showcase/Resources/Assets.xcassets/AppIconDev.appiconset/iPhone-Notification-20@3x.png b/Showcase/Showcase/Resources/Assets.xcassets/AppIconDev.appiconset/iPhone-Notification-20@3x.png deleted file mode 100644 index 28b758c0b..000000000 Binary files a/Showcase/Showcase/Resources/Assets.xcassets/AppIconDev.appiconset/iPhone-Notification-20@3x.png and /dev/null differ diff --git a/Showcase/Showcase/Resources/Assets.xcassets/AppIconDev.appiconset/iPhone-Settings-29@2x.png b/Showcase/Showcase/Resources/Assets.xcassets/AppIconDev.appiconset/iPhone-Settings-29@2x.png deleted file mode 100644 index 6a79406ae..000000000 Binary files a/Showcase/Showcase/Resources/Assets.xcassets/AppIconDev.appiconset/iPhone-Settings-29@2x.png and /dev/null differ diff --git a/Showcase/Showcase/Resources/Assets.xcassets/AppIconDev.appiconset/iPhone-Settings-29@3x.png b/Showcase/Showcase/Resources/Assets.xcassets/AppIconDev.appiconset/iPhone-Settings-29@3x.png deleted file mode 100644 index a054349c9..000000000 Binary files a/Showcase/Showcase/Resources/Assets.xcassets/AppIconDev.appiconset/iPhone-Settings-29@3x.png and /dev/null differ diff --git a/Showcase/Showcase/Resources/Assets.xcassets/AppIconDev.appiconset/iPhone-Spotlight-40@2x.png b/Showcase/Showcase/Resources/Assets.xcassets/AppIconDev.appiconset/iPhone-Spotlight-40@2x.png deleted file mode 100644 index 8c80963fc..000000000 Binary files a/Showcase/Showcase/Resources/Assets.xcassets/AppIconDev.appiconset/iPhone-Spotlight-40@2x.png and /dev/null differ diff --git a/Showcase/Showcase/Resources/Assets.xcassets/AppIconDev.appiconset/iPhone-Spotlight-40@3x.png b/Showcase/Showcase/Resources/Assets.xcassets/AppIconDev.appiconset/iPhone-Spotlight-40@3x.png deleted file mode 100644 index 386bf9507..000000000 Binary files a/Showcase/Showcase/Resources/Assets.xcassets/AppIconDev.appiconset/iPhone-Spotlight-40@3x.png and /dev/null differ diff --git a/Showcase/Showcase/Resources/Assets.xcassets/AppIconQualif.appiconset/App-Store-512@2x.png b/Showcase/Showcase/Resources/Assets.xcassets/AppIconQualif.appiconset/App-Store-512@2x.png deleted file mode 100644 index b9811829e..000000000 Binary files a/Showcase/Showcase/Resources/Assets.xcassets/AppIconQualif.appiconset/App-Store-512@2x.png and /dev/null differ diff --git a/Showcase/Showcase/Resources/Assets.xcassets/AppIconQualif.appiconset/Contents.json b/Showcase/Showcase/Resources/Assets.xcassets/AppIconQualif.appiconset/Contents.json deleted file mode 100644 index 723d49077..000000000 --- a/Showcase/Showcase/Resources/Assets.xcassets/AppIconQualif.appiconset/Contents.json +++ /dev/null @@ -1,116 +0,0 @@ -{ - "images" : [ - { - "filename" : "iPhone-Notification-20@2x.png", - "idiom" : "iphone", - "scale" : "2x", - "size" : "20x20" - }, - { - "filename" : "iPhone-Notification-20@3x.png", - "idiom" : "iphone", - "scale" : "3x", - "size" : "20x20" - }, - { - "filename" : "iPhone-Settings-29@2x.png", - "idiom" : "iphone", - "scale" : "2x", - "size" : "29x29" - }, - { - "filename" : "iPhone-Settings-29@3x.png", - "idiom" : "iphone", - "scale" : "3x", - "size" : "29x29" - }, - { - "filename" : "iPhone-Spotlight-40@2x.png", - "idiom" : "iphone", - "scale" : "2x", - "size" : "40x40" - }, - { - "filename" : "iPhone-Spotlight-40@3x.png", - "idiom" : "iphone", - "scale" : "3x", - "size" : "40x40" - }, - { - "filename" : "iPhone-App-60@2x.png", - "idiom" : "iphone", - "scale" : "2x", - "size" : "60x60" - }, - { - "filename" : "iPhone-App-60@3x.png", - "idiom" : "iphone", - "scale" : "3x", - "size" : "60x60" - }, - { - "filename" : "iPad-Notification-20@1x.png", - "idiom" : "ipad", - "scale" : "1x", - "size" : "20x20" - }, - { - "filename" : "iPad-Notification-20@2x.png", - "idiom" : "ipad", - "scale" : "2x", - "size" : "20x20" - }, - { - "filename" : "iPad-Settings-29@1x.png", - "idiom" : "ipad", - "scale" : "1x", - "size" : "29x29" - }, - { - "filename" : "iPad-Settings-29@2x.png", - "idiom" : "ipad", - "scale" : "2x", - "size" : "29x29" - }, - { - "filename" : "iPad-Spotlight-40@1x.png", - "idiom" : "ipad", - "scale" : "1x", - "size" : "40x40" - }, - { - "filename" : "iPad-Spotlight-40@2x.png", - "idiom" : "ipad", - "scale" : "2x", - "size" : "40x40" - }, - { - "filename" : "iPad-App-76@1x.png", - "idiom" : "ipad", - "scale" : "1x", - "size" : "76x76" - }, - { - "filename" : "iPad-App-76@2x.png", - "idiom" : "ipad", - "scale" : "2x", - "size" : "76x76" - }, - { - "filename" : "iPad-Pro-App-83.5@2x.png", - "idiom" : "ipad", - "scale" : "2x", - "size" : "83.5x83.5" - }, - { - "filename" : "App-Store-512@2x.png", - "idiom" : "ios-marketing", - "scale" : "1x", - "size" : "1024x1024" - } - ], - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/Showcase/Showcase/Resources/Assets.xcassets/AppIconQualif.appiconset/iPad-App-76@1x.png b/Showcase/Showcase/Resources/Assets.xcassets/AppIconQualif.appiconset/iPad-App-76@1x.png deleted file mode 100644 index 0498f53e8..000000000 Binary files a/Showcase/Showcase/Resources/Assets.xcassets/AppIconQualif.appiconset/iPad-App-76@1x.png and /dev/null differ diff --git a/Showcase/Showcase/Resources/Assets.xcassets/AppIconQualif.appiconset/iPad-App-76@2x.png b/Showcase/Showcase/Resources/Assets.xcassets/AppIconQualif.appiconset/iPad-App-76@2x.png deleted file mode 100644 index c66f33841..000000000 Binary files a/Showcase/Showcase/Resources/Assets.xcassets/AppIconQualif.appiconset/iPad-App-76@2x.png and /dev/null differ diff --git a/Showcase/Showcase/Resources/Assets.xcassets/AppIconQualif.appiconset/iPad-Notification-20@1x.png b/Showcase/Showcase/Resources/Assets.xcassets/AppIconQualif.appiconset/iPad-Notification-20@1x.png deleted file mode 100644 index 9405c7140..000000000 Binary files a/Showcase/Showcase/Resources/Assets.xcassets/AppIconQualif.appiconset/iPad-Notification-20@1x.png and /dev/null differ diff --git a/Showcase/Showcase/Resources/Assets.xcassets/AppIconQualif.appiconset/iPad-Notification-20@2x.png b/Showcase/Showcase/Resources/Assets.xcassets/AppIconQualif.appiconset/iPad-Notification-20@2x.png deleted file mode 100644 index 6c1895f36..000000000 Binary files a/Showcase/Showcase/Resources/Assets.xcassets/AppIconQualif.appiconset/iPad-Notification-20@2x.png and /dev/null differ diff --git a/Showcase/Showcase/Resources/Assets.xcassets/AppIconQualif.appiconset/iPad-Pro-App-83.5@2x.png b/Showcase/Showcase/Resources/Assets.xcassets/AppIconQualif.appiconset/iPad-Pro-App-83.5@2x.png deleted file mode 100644 index 4cedb41e2..000000000 Binary files a/Showcase/Showcase/Resources/Assets.xcassets/AppIconQualif.appiconset/iPad-Pro-App-83.5@2x.png and /dev/null differ diff --git a/Showcase/Showcase/Resources/Assets.xcassets/AppIconQualif.appiconset/iPad-Settings-29@1x.png b/Showcase/Showcase/Resources/Assets.xcassets/AppIconQualif.appiconset/iPad-Settings-29@1x.png deleted file mode 100644 index bb1b8ddc5..000000000 Binary files a/Showcase/Showcase/Resources/Assets.xcassets/AppIconQualif.appiconset/iPad-Settings-29@1x.png and /dev/null differ diff --git a/Showcase/Showcase/Resources/Assets.xcassets/AppIconQualif.appiconset/iPad-Settings-29@2x.png b/Showcase/Showcase/Resources/Assets.xcassets/AppIconQualif.appiconset/iPad-Settings-29@2x.png deleted file mode 100644 index bc6648adf..000000000 Binary files a/Showcase/Showcase/Resources/Assets.xcassets/AppIconQualif.appiconset/iPad-Settings-29@2x.png and /dev/null differ diff --git a/Showcase/Showcase/Resources/Assets.xcassets/AppIconQualif.appiconset/iPad-Spotlight-40@1x.png b/Showcase/Showcase/Resources/Assets.xcassets/AppIconQualif.appiconset/iPad-Spotlight-40@1x.png deleted file mode 100644 index b48655bbd..000000000 Binary files a/Showcase/Showcase/Resources/Assets.xcassets/AppIconQualif.appiconset/iPad-Spotlight-40@1x.png and /dev/null differ diff --git a/Showcase/Showcase/Resources/Assets.xcassets/AppIconQualif.appiconset/iPad-Spotlight-40@2x.png b/Showcase/Showcase/Resources/Assets.xcassets/AppIconQualif.appiconset/iPad-Spotlight-40@2x.png deleted file mode 100644 index a37b12237..000000000 Binary files a/Showcase/Showcase/Resources/Assets.xcassets/AppIconQualif.appiconset/iPad-Spotlight-40@2x.png and /dev/null differ diff --git a/Showcase/Showcase/Resources/Assets.xcassets/AppIconQualif.appiconset/iPhone-App-60@2x.png b/Showcase/Showcase/Resources/Assets.xcassets/AppIconQualif.appiconset/iPhone-App-60@2x.png deleted file mode 100644 index 8af9b55cf..000000000 Binary files a/Showcase/Showcase/Resources/Assets.xcassets/AppIconQualif.appiconset/iPhone-App-60@2x.png and /dev/null differ diff --git a/Showcase/Showcase/Resources/Assets.xcassets/AppIconQualif.appiconset/iPhone-App-60@3x.png b/Showcase/Showcase/Resources/Assets.xcassets/AppIconQualif.appiconset/iPhone-App-60@3x.png deleted file mode 100644 index 7771240e7..000000000 Binary files a/Showcase/Showcase/Resources/Assets.xcassets/AppIconQualif.appiconset/iPhone-App-60@3x.png and /dev/null differ diff --git a/Showcase/Showcase/Resources/Assets.xcassets/AppIconQualif.appiconset/iPhone-Notification-20@2x.png b/Showcase/Showcase/Resources/Assets.xcassets/AppIconQualif.appiconset/iPhone-Notification-20@2x.png deleted file mode 100644 index 6c1895f36..000000000 Binary files a/Showcase/Showcase/Resources/Assets.xcassets/AppIconQualif.appiconset/iPhone-Notification-20@2x.png and /dev/null differ diff --git a/Showcase/Showcase/Resources/Assets.xcassets/AppIconQualif.appiconset/iPhone-Notification-20@3x.png b/Showcase/Showcase/Resources/Assets.xcassets/AppIconQualif.appiconset/iPhone-Notification-20@3x.png deleted file mode 100644 index f907bc463..000000000 Binary files a/Showcase/Showcase/Resources/Assets.xcassets/AppIconQualif.appiconset/iPhone-Notification-20@3x.png and /dev/null differ diff --git a/Showcase/Showcase/Resources/Assets.xcassets/AppIconQualif.appiconset/iPhone-Settings-29@2x.png b/Showcase/Showcase/Resources/Assets.xcassets/AppIconQualif.appiconset/iPhone-Settings-29@2x.png deleted file mode 100644 index bc6648adf..000000000 Binary files a/Showcase/Showcase/Resources/Assets.xcassets/AppIconQualif.appiconset/iPhone-Settings-29@2x.png and /dev/null differ diff --git a/Showcase/Showcase/Resources/Assets.xcassets/AppIconQualif.appiconset/iPhone-Settings-29@3x.png b/Showcase/Showcase/Resources/Assets.xcassets/AppIconQualif.appiconset/iPhone-Settings-29@3x.png deleted file mode 100644 index d7ff850b3..000000000 Binary files a/Showcase/Showcase/Resources/Assets.xcassets/AppIconQualif.appiconset/iPhone-Settings-29@3x.png and /dev/null differ diff --git a/Showcase/Showcase/Resources/Assets.xcassets/AppIconQualif.appiconset/iPhone-Spotlight-40@2x.png b/Showcase/Showcase/Resources/Assets.xcassets/AppIconQualif.appiconset/iPhone-Spotlight-40@2x.png deleted file mode 100644 index a37b12237..000000000 Binary files a/Showcase/Showcase/Resources/Assets.xcassets/AppIconQualif.appiconset/iPhone-Spotlight-40@2x.png and /dev/null differ diff --git a/Showcase/Showcase/Resources/Assets.xcassets/AppIconQualif.appiconset/iPhone-Spotlight-40@3x.png b/Showcase/Showcase/Resources/Assets.xcassets/AppIconQualif.appiconset/iPhone-Spotlight-40@3x.png deleted file mode 100644 index 8af9b55cf..000000000 Binary files a/Showcase/Showcase/Resources/Assets.xcassets/AppIconQualif.appiconset/iPhone-Spotlight-40@3x.png and /dev/null differ diff --git a/Showcase/Showcase/Resources/Assets.xcassets/AppIconRelease.appiconset/App-Store-512@2x.png b/Showcase/Showcase/Resources/Assets.xcassets/AppIconRelease.appiconset/App-Store-512@2x.png deleted file mode 100644 index 008e9f60d..000000000 Binary files a/Showcase/Showcase/Resources/Assets.xcassets/AppIconRelease.appiconset/App-Store-512@2x.png and /dev/null differ diff --git a/Showcase/Showcase/Resources/Assets.xcassets/AppIconRelease.appiconset/Contents.json b/Showcase/Showcase/Resources/Assets.xcassets/AppIconRelease.appiconset/Contents.json index 723d49077..564da1831 100644 --- a/Showcase/Showcase/Resources/Assets.xcassets/AppIconRelease.appiconset/Contents.json +++ b/Showcase/Showcase/Resources/Assets.xcassets/AppIconRelease.appiconset/Contents.json @@ -1,111 +1,9 @@ { "images" : [ { - "filename" : "iPhone-Notification-20@2x.png", - "idiom" : "iphone", - "scale" : "2x", - "size" : "20x20" - }, - { - "filename" : "iPhone-Notification-20@3x.png", - "idiom" : "iphone", - "scale" : "3x", - "size" : "20x20" - }, - { - "filename" : "iPhone-Settings-29@2x.png", - "idiom" : "iphone", - "scale" : "2x", - "size" : "29x29" - }, - { - "filename" : "iPhone-Settings-29@3x.png", - "idiom" : "iphone", - "scale" : "3x", - "size" : "29x29" - }, - { - "filename" : "iPhone-Spotlight-40@2x.png", - "idiom" : "iphone", - "scale" : "2x", - "size" : "40x40" - }, - { - "filename" : "iPhone-Spotlight-40@3x.png", - "idiom" : "iphone", - "scale" : "3x", - "size" : "40x40" - }, - { - "filename" : "iPhone-App-60@2x.png", - "idiom" : "iphone", - "scale" : "2x", - "size" : "60x60" - }, - { - "filename" : "iPhone-App-60@3x.png", - "idiom" : "iphone", - "scale" : "3x", - "size" : "60x60" - }, - { - "filename" : "iPad-Notification-20@1x.png", - "idiom" : "ipad", - "scale" : "1x", - "size" : "20x20" - }, - { - "filename" : "iPad-Notification-20@2x.png", - "idiom" : "ipad", - "scale" : "2x", - "size" : "20x20" - }, - { - "filename" : "iPad-Settings-29@1x.png", - "idiom" : "ipad", - "scale" : "1x", - "size" : "29x29" - }, - { - "filename" : "iPad-Settings-29@2x.png", - "idiom" : "ipad", - "scale" : "2x", - "size" : "29x29" - }, - { - "filename" : "iPad-Spotlight-40@1x.png", - "idiom" : "ipad", - "scale" : "1x", - "size" : "40x40" - }, - { - "filename" : "iPad-Spotlight-40@2x.png", - "idiom" : "ipad", - "scale" : "2x", - "size" : "40x40" - }, - { - "filename" : "iPad-App-76@1x.png", - "idiom" : "ipad", - "scale" : "1x", - "size" : "76x76" - }, - { - "filename" : "iPad-App-76@2x.png", - "idiom" : "ipad", - "scale" : "2x", - "size" : "76x76" - }, - { - "filename" : "iPad-Pro-App-83.5@2x.png", - "idiom" : "ipad", - "scale" : "2x", - "size" : "83.5x83.5" - }, - { - "filename" : "App-Store-512@2x.png", - "idiom" : "ios-marketing", - "scale" : "1x", + "filename" : "Unified_App_IOS_SQR.png", + "idiom" : "universal", + "platform" : "ios", "size" : "1024x1024" } ], diff --git a/Showcase/Showcase/Resources/Assets.xcassets/AppIconRelease.appiconset/Unified_App_IOS_SQR.png b/Showcase/Showcase/Resources/Assets.xcassets/AppIconRelease.appiconset/Unified_App_IOS_SQR.png new file mode 100644 index 000000000..f5bff468d Binary files /dev/null and b/Showcase/Showcase/Resources/Assets.xcassets/AppIconRelease.appiconset/Unified_App_IOS_SQR.png differ diff --git a/Showcase/Showcase/Resources/Assets.xcassets/AppIconRelease.appiconset/iPad-App-76@1x.png b/Showcase/Showcase/Resources/Assets.xcassets/AppIconRelease.appiconset/iPad-App-76@1x.png deleted file mode 100644 index ba020590e..000000000 Binary files a/Showcase/Showcase/Resources/Assets.xcassets/AppIconRelease.appiconset/iPad-App-76@1x.png and /dev/null differ diff --git a/Showcase/Showcase/Resources/Assets.xcassets/AppIconRelease.appiconset/iPad-App-76@2x.png b/Showcase/Showcase/Resources/Assets.xcassets/AppIconRelease.appiconset/iPad-App-76@2x.png deleted file mode 100644 index e927264a4..000000000 Binary files a/Showcase/Showcase/Resources/Assets.xcassets/AppIconRelease.appiconset/iPad-App-76@2x.png and /dev/null differ diff --git a/Showcase/Showcase/Resources/Assets.xcassets/AppIconRelease.appiconset/iPad-Notification-20@1x.png b/Showcase/Showcase/Resources/Assets.xcassets/AppIconRelease.appiconset/iPad-Notification-20@1x.png deleted file mode 100644 index 48dd6ac58..000000000 Binary files a/Showcase/Showcase/Resources/Assets.xcassets/AppIconRelease.appiconset/iPad-Notification-20@1x.png and /dev/null differ diff --git a/Showcase/Showcase/Resources/Assets.xcassets/AppIconRelease.appiconset/iPad-Notification-20@2x.png b/Showcase/Showcase/Resources/Assets.xcassets/AppIconRelease.appiconset/iPad-Notification-20@2x.png deleted file mode 100644 index f8c0591fc..000000000 Binary files a/Showcase/Showcase/Resources/Assets.xcassets/AppIconRelease.appiconset/iPad-Notification-20@2x.png and /dev/null differ diff --git a/Showcase/Showcase/Resources/Assets.xcassets/AppIconRelease.appiconset/iPad-Pro-App-83.5@2x.png b/Showcase/Showcase/Resources/Assets.xcassets/AppIconRelease.appiconset/iPad-Pro-App-83.5@2x.png deleted file mode 100644 index 337613440..000000000 Binary files a/Showcase/Showcase/Resources/Assets.xcassets/AppIconRelease.appiconset/iPad-Pro-App-83.5@2x.png and /dev/null differ diff --git a/Showcase/Showcase/Resources/Assets.xcassets/AppIconRelease.appiconset/iPad-Settings-29@1x.png b/Showcase/Showcase/Resources/Assets.xcassets/AppIconRelease.appiconset/iPad-Settings-29@1x.png deleted file mode 100644 index d6585bf00..000000000 Binary files a/Showcase/Showcase/Resources/Assets.xcassets/AppIconRelease.appiconset/iPad-Settings-29@1x.png and /dev/null differ diff --git a/Showcase/Showcase/Resources/Assets.xcassets/AppIconRelease.appiconset/iPad-Settings-29@2x.png b/Showcase/Showcase/Resources/Assets.xcassets/AppIconRelease.appiconset/iPad-Settings-29@2x.png deleted file mode 100644 index bcc1e3d11..000000000 Binary files a/Showcase/Showcase/Resources/Assets.xcassets/AppIconRelease.appiconset/iPad-Settings-29@2x.png and /dev/null differ diff --git a/Showcase/Showcase/Resources/Assets.xcassets/AppIconRelease.appiconset/iPad-Spotlight-40@1x.png b/Showcase/Showcase/Resources/Assets.xcassets/AppIconRelease.appiconset/iPad-Spotlight-40@1x.png deleted file mode 100644 index f50ab7a01..000000000 Binary files a/Showcase/Showcase/Resources/Assets.xcassets/AppIconRelease.appiconset/iPad-Spotlight-40@1x.png and /dev/null differ diff --git a/Showcase/Showcase/Resources/Assets.xcassets/AppIconRelease.appiconset/iPad-Spotlight-40@2x.png b/Showcase/Showcase/Resources/Assets.xcassets/AppIconRelease.appiconset/iPad-Spotlight-40@2x.png deleted file mode 100644 index 2f8e2d159..000000000 Binary files a/Showcase/Showcase/Resources/Assets.xcassets/AppIconRelease.appiconset/iPad-Spotlight-40@2x.png and /dev/null differ diff --git a/Showcase/Showcase/Resources/Assets.xcassets/AppIconRelease.appiconset/iPhone-App-60@2x.png b/Showcase/Showcase/Resources/Assets.xcassets/AppIconRelease.appiconset/iPhone-App-60@2x.png deleted file mode 100644 index caba3d95b..000000000 Binary files a/Showcase/Showcase/Resources/Assets.xcassets/AppIconRelease.appiconset/iPhone-App-60@2x.png and /dev/null differ diff --git a/Showcase/Showcase/Resources/Assets.xcassets/AppIconRelease.appiconset/iPhone-App-60@3x.png b/Showcase/Showcase/Resources/Assets.xcassets/AppIconRelease.appiconset/iPhone-App-60@3x.png deleted file mode 100644 index 985164b15..000000000 Binary files a/Showcase/Showcase/Resources/Assets.xcassets/AppIconRelease.appiconset/iPhone-App-60@3x.png and /dev/null differ diff --git a/Showcase/Showcase/Resources/Assets.xcassets/AppIconRelease.appiconset/iPhone-Notification-20@2x.png b/Showcase/Showcase/Resources/Assets.xcassets/AppIconRelease.appiconset/iPhone-Notification-20@2x.png deleted file mode 100644 index ec4accfd7..000000000 Binary files a/Showcase/Showcase/Resources/Assets.xcassets/AppIconRelease.appiconset/iPhone-Notification-20@2x.png and /dev/null differ diff --git a/Showcase/Showcase/Resources/Assets.xcassets/AppIconRelease.appiconset/iPhone-Notification-20@3x.png b/Showcase/Showcase/Resources/Assets.xcassets/AppIconRelease.appiconset/iPhone-Notification-20@3x.png deleted file mode 100644 index 28003fd16..000000000 Binary files a/Showcase/Showcase/Resources/Assets.xcassets/AppIconRelease.appiconset/iPhone-Notification-20@3x.png and /dev/null differ diff --git a/Showcase/Showcase/Resources/Assets.xcassets/AppIconRelease.appiconset/iPhone-Settings-29@2x.png b/Showcase/Showcase/Resources/Assets.xcassets/AppIconRelease.appiconset/iPhone-Settings-29@2x.png deleted file mode 100644 index 57d890f86..000000000 Binary files a/Showcase/Showcase/Resources/Assets.xcassets/AppIconRelease.appiconset/iPhone-Settings-29@2x.png and /dev/null differ diff --git a/Showcase/Showcase/Resources/Assets.xcassets/AppIconRelease.appiconset/iPhone-Settings-29@3x.png b/Showcase/Showcase/Resources/Assets.xcassets/AppIconRelease.appiconset/iPhone-Settings-29@3x.png deleted file mode 100644 index 7334e9dda..000000000 Binary files a/Showcase/Showcase/Resources/Assets.xcassets/AppIconRelease.appiconset/iPhone-Settings-29@3x.png and /dev/null differ diff --git a/Showcase/Showcase/Resources/Assets.xcassets/AppIconRelease.appiconset/iPhone-Spotlight-40@2x.png b/Showcase/Showcase/Resources/Assets.xcassets/AppIconRelease.appiconset/iPhone-Spotlight-40@2x.png deleted file mode 100644 index 114844029..000000000 Binary files a/Showcase/Showcase/Resources/Assets.xcassets/AppIconRelease.appiconset/iPhone-Spotlight-40@2x.png and /dev/null differ diff --git a/Showcase/Showcase/Resources/Assets.xcassets/AppIconRelease.appiconset/iPhone-Spotlight-40@3x.png b/Showcase/Showcase/Resources/Assets.xcassets/AppIconRelease.appiconset/iPhone-Spotlight-40@3x.png deleted file mode 100644 index 3f9578c3c..000000000 Binary files a/Showcase/Showcase/Resources/Assets.xcassets/AppIconRelease.appiconset/iPhone-Spotlight-40@3x.png and /dev/null differ diff --git a/Showcase/Showcase/Resources/Assets.xcassets/Tokens/ic_vector.imageset/Contents.json b/Showcase/Showcase/Resources/Assets.xcassets/Tokens/ic_vector.imageset/Contents.json new file mode 100644 index 000000000..6f7816e89 --- /dev/null +++ b/Showcase/Showcase/Resources/Assets.xcassets/Tokens/ic_vector.imageset/Contents.json @@ -0,0 +1,12 @@ +{ + "images" : [ + { + "filename" : "ic_vector.svg", + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Showcase/Showcase/Resources/Assets.xcassets/Tokens/ic_vector.imageset/ic_vector.svg b/Showcase/Showcase/Resources/Assets.xcassets/Tokens/ic_vector.imageset/ic_vector.svg new file mode 100644 index 000000000..13b45169d --- /dev/null +++ b/Showcase/Showcase/Resources/Assets.xcassets/Tokens/ic_vector.imageset/ic_vector.svg @@ -0,0 +1,3 @@ + + + diff --git a/Showcase/Showcase/Resources/en.lproj/Localizable.strings b/Showcase/Showcase/Resources/en.lproj/Localizable.strings index 148d7cafc..5143bd35c 100644 --- a/Showcase/Showcase/Resources/en.lproj/Localizable.strings +++ b/Showcase/Showcase/Resources/en.lproj/Localizable.strings @@ -13,18 +13,22 @@ // MARK: - bottomBar -"app_bottomBar_components" = "Components"; -"app_bottomBar_tokens" = "Tokens"; -"app_bottomBar_about" = "About"; +"app_bottomBar_components_label" = "Components"; +"app_bottomBar_tokens_label" = "Tokens"; +"app_bottomBar_about_label" = "About"; +"app_topBar_theme_button_a11y" = "Change theme"; // MARK: - About Screen -"app_about_label_legalInformation" = "Legal information"; -"app_about_label_privacyPolicy" = "Privacy policy"; +"app_about_legalInformation_label" = "Legal information"; +"app_about_privacyPolicy_label" = "Privacy policy"; // MARK: - Tokens Screen "app_tokens_border_label" = "Border"; +"app_tokens_border_width_label" = "Width"; +"app_tokens_border_radius_label" = "Radius"; +"app_tokens_border_style_label" = "Style"; "app_tokens_border_description_text" = "Borders are used for the stroke colours on components and also for the colours of divider lines for components like tables."; "app_tokens_color_label" = "Color"; @@ -33,11 +37,22 @@ "app_tokens_dimension_label" = "Dimension"; "app_tokens_dimension_description_text" = "Dimension provides standard sizing and spacing to ensure visual consistency across the UI."; -"app_tokens_dimension_spacing_label" = "Spacing"; -"app_tokens_dimension_spacing_description_text" = "Space refers to the measurements used to define the spacing between UI elements."; +"app_tokens_dimension_space_label" = "Space"; +"app_tokens_dimension_space_description_text" = "Space refers to the measurements used to define the spacing between UI elements."; +"app_tokens_dimension_space_scaled_label" = "Scaled"; +"app_tokens_dimension_space_fixed_label" = "Fixed"; +"app_tokens_dimension_space_paddingInline_label" = "Padding inline"; +"app_tokens_dimension_space_paddingInlineWithIcon_label" = "Padding inline with icon"; +"app_tokens_dimension_space_paddingInlineWithArrow_label" = "Padding inline with arrow"; +"app_tokens_dimension_space_paddingInset_label" = "Padding inset"; +"app_tokens_dimension_space_paddingStack_label" = "Padding stack"; +"app_tokens_dimension_space_gapInline_label" = "Gap inline"; +"app_tokens_dimension_space_gapStack_label" = "Gap stack"; -"app_tokens_dimension_sizing_label" = "Sizing"; -"app_tokens_dimension_sizing_description_text" = "Size refers to the specific measurements used to define the dimensions of UI elements within the design system."; +"app_tokens_dimension_size_label" = "Size"; +"app_tokens_dimension_size_description_text" = "Size refers to the specific measurements used to define the dimensions of UI elements within the design system."; +"app_tokens_dimension_size_iconWithLabel_label" = "Icon with label"; +"app_tokens_dimension_size_iconDecorative_label" = "Icon decorative"; "app_tokens_elevation_label" = "Elevation"; "app_tokens_elevation_description_text" = "Shadows are used to give the impression of distance or elevation between surfaces, which adds depth to our designs."; @@ -50,5 +65,5 @@ // MARK: - Component Screen -"app_component_empty_content_text" = "No content"; -"app_component_empty_content_description_text" = "This content is under construction and will be available very soon"; +"app_component_emptyContent_text" = "No content"; +"app_component_emptyContent_description_text" = "This content is under construction and will be available very soon"; diff --git a/Showcase/fastlane/Fastfile b/Showcase/fastlane/Fastfile index 136788084..84ecac9c2 100644 --- a/Showcase/fastlane/Fastfile +++ b/Showcase/fastlane/Fastfile @@ -65,7 +65,7 @@ default_platform(:ios) platform :ios do before_all do |lane, options| - xcversion(version: "~> 15.3") + xcversion(version: "~> 16.0") end # ------------------------------------------------------------ @@ -100,10 +100,17 @@ platform :ios do device: device, skip_build: true) - publish_mattermost_notification("🧪 ✅ No issue with tests") - + if MATTERMOST_HOOK_URL.nil? || MATTERMOST_HOOK_URL.empty? + puts "ℹ️ No MATTERMOST_HOOK_URL defined, it could mean this lane is called on GitHub Action workflow or locally" + else + publish_mattermost_notification("🧪 ✅ No issue with tests") + end rescue => error - publish_mattermost_notification("🧪 🚨 @channel Some issue occured with tests (:test)") + if MATTERMOST_HOOK_URL.nil? || MATTERMOST_HOOK_URL.empty? + puts "ℹ️ No MATTERMOST_HOOK_URL defined, it could mean this lane is called on GitHub Action workflow or locally" + else + publish_mattermost_notification("🧪 🚨 @channel Some issue occured with tests (:test)") + end raise error end end @@ -125,10 +132,17 @@ platform :ios do skip_build: true ) - publish_mattermost_notification("🧪 ✅ No issue with UI tests") - + if MATTERMOST_HOOK_URL.nil? || MATTERMOST_HOOK_URL.empty? + puts "ℹ️ No MATTERMOST_HOOK_URL defined, it could mean this lane is called on GitHub Action workflow or locally" + else + publish_mattermost_notification("🧪 ✅ No issue with UI tests") + end rescue => error - publish_mattermost_notification("🧪 🚨 @channel Some issue occured with tests (:test_ui)") + if MATTERMOST_HOOK_URL.nil? || MATTERMOST_HOOK_URL.empty? + puts "ℹ️ No MATTERMOST_HOOK_URL defined, it could mean this lane is called on GitHub Action workflow or locally" + else + publish_mattermost_notification("🧪 🚨 @channel Some issue occured with tests (:test_ui)") + end raise error end end @@ -163,14 +177,20 @@ platform :ios do clean_install: true ) + Dir.chdir "../Showcase/Resources/Assets.xcassets" do + sh "rm -Rf AppIconRelease.appiconset" + sh "cp -R AppIconDebug.appiconset AppIconRelease.appiconset" + end + gym( scheme: OUDS_SCHEME, output_directory: 'build/', archive_path: 'build/', - output_name: 'oudsApp', + output_name: 'odsApp', configuration: 'Debug', include_symbols: true, - export_method: 'development' + skip_archive: true, + destination: "generic/platform=iOS Simulator" ) end @@ -190,7 +210,7 @@ platform :ios do Dir.chdir "../Showcase/Resources/Assets.xcassets" do sh "rm -Rf AppIconRelease.appiconset" - sh "cp -R AppIconDev.appiconset AppIconRelease.appiconset" + sh "cp -R AppIconAlpha.appiconset AppIconRelease.appiconset" end # CFBundleVersion and CFBundleShortVersionString must follow rules with integers and periods, should not change them @@ -215,7 +235,7 @@ platform :ios do puts "👉 Beta (commit hash = '#{params[:commitHash]}')" Dir.chdir "../Showcase/Resources/Assets.xcassets" do sh "rm -Rf AppIconRelease.appiconset" - sh "cp -R AppIconQualif.appiconset AppIconRelease.appiconset" + sh "cp -R AppIconBeta.appiconset AppIconRelease.appiconset" end new_display_name = "OUDS Showcase (BETA)"