From b0bff595ffaa275cff16cbd45db8db11ee0cbd83 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20Megi=CC=81as?= Date: Fri, 19 Jul 2024 15:20:37 +0200 Subject: [PATCH] importer --- .github/workflows/generate-mistica-tokens.yml | 10 +- .gitignore | 4 + Makefile | 63 +- .../BrandStyle+UIStatusBarStyle.swift | 18 + scripts/MisticaColors.swift | 138 ++ scripts/mistica-importer/MisticaColors.swift | 138 ++ .../__tests__/brand-colors-generator.test.js | 42 + .../colors/__tests__/brand1-tokens.json | 1438 +++++++++++++++ .../colors/__tests__/brand2-tokens.json | 1630 +++++++++++++++++ .../__tests__/color-toolkit-generator.test.js | 38 + .../__tests__/expected-Brand1Colors.swift | 215 +++ .../expected-ColorToolkit+Color.swift | 395 ++++ .../expected-ColorUIToolkit+Color.swift | 516 ++++++ .../__tests__/expected-mistica-color.swift | 22 + .../__tests__/expected-mistica-colors.swift | 138 ++ .../__tests__/mistica-color-generator.test.js | 38 + .../mistica-colors-generator.test.js | 38 + .../uicolor-toolkit-generator.test.js | 38 + .../colors/brand-colors-generator.js | 126 ++ .../colors/color-toolkit-generator.js | 31 + .../colors/mistica-color-generator.js | 31 + .../colors/mistica-colors-generator.js | 15 + .../generators/colors/reduce-colors.js | 59 + .../colors/uicolor-toolkit-generator.js | 26 + .../__tests__/any-brand-tokens.json | 1438 +++++++++++++++ .../brand-font-weights-generator.test.js | 21 + .../expected-mistica-corner-radius.swift | 23 + .../expected-o2-new-corner-radius.swift | 19 + .../mistica-font-weights-generator.test.js | 20 + .../brand-corner-radius-generator.js | 24 + .../mistica-corner-radius-generator.js | 19 + .../__tests__/any-brand-tokens.json | 1438 +++++++++++++++ .../brand-font-weights-generator.test.js | 21 + .../expected-mistica-font-sizes.swift | 10 + .../expected-o2-new-font-sizes.swift | 10 + .../mistica-font-weights-generator.test.js | 20 + .../font-sizes/brand-font-sizes-generator.js | 17 + .../mistica-font-sizes-generator.js | 15 + .../__tests__/any-brand-tokens.json | 1438 +++++++++++++++ .../brand-font-weights-generator.test.js | 21 + .../expected-mistica-font-weights.swift | 22 + .../expected-o2-new-font-weights.swift | 22 + .../mistica-font-weights-generator.test.js | 20 + .../brand-font-weights-generator.js | 20 + .../mistica-font-weights-generator.js | 17 + scripts/mistica-importer/index.js | 164 ++ scripts/mistica-importer/mocks/o2-new.json | 1438 +++++++++++++++ scripts/mistica-importer/mocks/vivo.json | 1630 +++++++++++++++++ scripts/mistica-importer/package-lock.json | 1446 +++++++++++++++ scripts/mistica-importer/package.json | 14 + scripts/mistica-importer/token-downloader.js | 6 + scripts/mistica-importer/vite.config.js | 9 + 52 files changed, 14507 insertions(+), 62 deletions(-) create mode 100644 Sources/MisticaCommon/Extensions/BrandStyle+UIStatusBarStyle.swift create mode 100644 scripts/MisticaColors.swift create mode 100644 scripts/mistica-importer/MisticaColors.swift create mode 100644 scripts/mistica-importer/generators/colors/__tests__/brand-colors-generator.test.js create mode 100644 scripts/mistica-importer/generators/colors/__tests__/brand1-tokens.json create mode 100644 scripts/mistica-importer/generators/colors/__tests__/brand2-tokens.json create mode 100644 scripts/mistica-importer/generators/colors/__tests__/color-toolkit-generator.test.js create mode 100644 scripts/mistica-importer/generators/colors/__tests__/expected-Brand1Colors.swift create mode 100644 scripts/mistica-importer/generators/colors/__tests__/expected-ColorToolkit+Color.swift create mode 100644 scripts/mistica-importer/generators/colors/__tests__/expected-ColorUIToolkit+Color.swift create mode 100644 scripts/mistica-importer/generators/colors/__tests__/expected-mistica-color.swift create mode 100644 scripts/mistica-importer/generators/colors/__tests__/expected-mistica-colors.swift create mode 100644 scripts/mistica-importer/generators/colors/__tests__/mistica-color-generator.test.js create mode 100644 scripts/mistica-importer/generators/colors/__tests__/mistica-colors-generator.test.js create mode 100644 scripts/mistica-importer/generators/colors/__tests__/uicolor-toolkit-generator.test.js create mode 100644 scripts/mistica-importer/generators/colors/brand-colors-generator.js create mode 100644 scripts/mistica-importer/generators/colors/color-toolkit-generator.js create mode 100644 scripts/mistica-importer/generators/colors/mistica-color-generator.js create mode 100644 scripts/mistica-importer/generators/colors/mistica-colors-generator.js create mode 100644 scripts/mistica-importer/generators/colors/reduce-colors.js create mode 100644 scripts/mistica-importer/generators/colors/uicolor-toolkit-generator.js create mode 100644 scripts/mistica-importer/generators/corner-radius/__tests__/any-brand-tokens.json create mode 100644 scripts/mistica-importer/generators/corner-radius/__tests__/brand-font-weights-generator.test.js create mode 100644 scripts/mistica-importer/generators/corner-radius/__tests__/expected-mistica-corner-radius.swift create mode 100644 scripts/mistica-importer/generators/corner-radius/__tests__/expected-o2-new-corner-radius.swift create mode 100644 scripts/mistica-importer/generators/corner-radius/__tests__/mistica-font-weights-generator.test.js create mode 100644 scripts/mistica-importer/generators/corner-radius/brand-corner-radius-generator.js create mode 100644 scripts/mistica-importer/generators/corner-radius/mistica-corner-radius-generator.js create mode 100644 scripts/mistica-importer/generators/font-sizes/__tests__/any-brand-tokens.json create mode 100644 scripts/mistica-importer/generators/font-sizes/__tests__/brand-font-weights-generator.test.js create mode 100644 scripts/mistica-importer/generators/font-sizes/__tests__/expected-mistica-font-sizes.swift create mode 100644 scripts/mistica-importer/generators/font-sizes/__tests__/expected-o2-new-font-sizes.swift create mode 100644 scripts/mistica-importer/generators/font-sizes/__tests__/mistica-font-weights-generator.test.js create mode 100644 scripts/mistica-importer/generators/font-sizes/brand-font-sizes-generator.js create mode 100644 scripts/mistica-importer/generators/font-sizes/mistica-font-sizes-generator.js create mode 100644 scripts/mistica-importer/generators/font-weights/__tests__/any-brand-tokens.json create mode 100644 scripts/mistica-importer/generators/font-weights/__tests__/brand-font-weights-generator.test.js create mode 100644 scripts/mistica-importer/generators/font-weights/__tests__/expected-mistica-font-weights.swift create mode 100644 scripts/mistica-importer/generators/font-weights/__tests__/expected-o2-new-font-weights.swift create mode 100644 scripts/mistica-importer/generators/font-weights/__tests__/mistica-font-weights-generator.test.js create mode 100644 scripts/mistica-importer/generators/font-weights/brand-font-weights-generator.js create mode 100644 scripts/mistica-importer/generators/font-weights/mistica-font-weights-generator.js create mode 100644 scripts/mistica-importer/index.js create mode 100644 scripts/mistica-importer/mocks/o2-new.json create mode 100644 scripts/mistica-importer/mocks/vivo.json create mode 100644 scripts/mistica-importer/package-lock.json create mode 100644 scripts/mistica-importer/package.json create mode 100644 scripts/mistica-importer/token-downloader.js create mode 100644 scripts/mistica-importer/vite.config.js diff --git a/.github/workflows/generate-mistica-tokens.yml b/.github/workflows/generate-mistica-tokens.yml index 28756e96..f9de5530 100644 --- a/.github/workflows/generate-mistica-tokens.yml +++ b/.github/workflows/generate-mistica-tokens.yml @@ -2,11 +2,6 @@ name: Generate Mistica Tokens on: workflow_dispatch: - inputs: - ref: - description: 'mistica-design repo changeset or branch' - required: false - default: 'production' jobs: get-design-tokens: @@ -17,7 +12,7 @@ jobs: uses: actions/checkout@v3 - name: Generate Skin - run: make skin ref=${{github.event.inputs.ref}} + run: make skin - name: Create Pull Request uses: peter-evans/create-pull-request@v4 @@ -25,7 +20,8 @@ jobs: token: ${{ secrets.NOVUM_PRIVATE_REPOS }} add-paths: 'Sources/MisticaCommon/*' commit-message: 'feat(skin): update design tokens' - title: 'feat(skin): update design tokens from mistica-design branch: ${{github.event.inputs.ref}}' + title: 'feat(skin): update design tokens from mistica-design' branch: 'import-design-tokens' team-reviewers: 'ios' delete-branch: true + draft: true diff --git a/.gitignore b/.gitignore index db5102e2..b8937bdd 100644 --- a/.gitignore +++ b/.gitignore @@ -50,3 +50,7 @@ fastlane/test_output # ci .ruby-version vendor/ + +# Mistica importer +scripts/mistica-importer/.vscode +scripts/mistica-importer/node_modules diff --git a/Makefile b/Makefile index 91914cea..5a67c40a 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -.PHONY: help setup format test simulator archive export clean skinGeneratorSetup colorPaletteGeneration cornerRadiusGeneration fontWeightsGeneration fontSizesGeneration skin +.PHONY: help setup format test simulator archive export clean skinGeneratorSetup skin # Simulator OS_VERSION := 17.2 @@ -22,38 +22,14 @@ BUILD_PATH := $(ROOT_DIR)/build EXPORTED_OPTIONS_PATH := $(ROOT_DIR)/enterprise.plist ARCHIVE_PATH := $(TMP_ROOT_PATH)/ios.xcarchive XCODEBUILD := set -o pipefail && xcodebuild -MISTICA_DESIGN_PATH := $(ROOT_DIR)/tmp/mistica-design MISTICA_DESIGN_TOKENS_PATH := /tokens MISTICA_DESIGN_URL := https://raw.githubusercontent.com/Telefonica/mistica-design/$(ref)/tokens -#Skin tokens config -#These variables will be used to get the json file from mistica design repository and later to create the appropiate file and class/struct names. If a new brand/skin needs to be added, it should be added here. All of the brand names should be in lowercase. -Movistar:= movistar -Blau:= blau -O2:= o2 -O2New:= o2-new -Vivo:= vivo -VivoNew:= vivo-new -Telefonica:= telefonica -TU:= tu -BRAND_FILES:= $(Movistar) $(Blau) $(O2) $(O2New) $(Vivo) $(VivoNew) $(Telefonica) $(TU) # List of all the brand names that will be procesed. - # Xcode ifneq ($(origin GITHUB_ACTION),undefined) export DEVELOPER_DIR=/Applications/Xcode-15.2.app/Contents/Developer endif -# TokenGenerator func to be used in all token generators. -define tokenGenerator - @echo "Generating Mistica $(2) interfaces" - hygen $(1) Mistica$(2) --json $(MISTICA_DESIGN_PATH)$(MISTICA_DESIGN_TOKENS_PATH)/$(Movistar).json - - for key in $(BRAND_FILES) ; do \ - echo "Generating $$key $(2) palette"; \ - hygen $(1) Brand$(2) --name $$key --json $(MISTICA_DESIGN_PATH)$(MISTICA_DESIGN_TOKENS_PATH)/$$key.json ; \ - done -endef - # Targets help: @echo "Please use \`make ' where is one of" @@ -61,14 +37,9 @@ help: @echo " format to execute swiftformat in Sources directory" @echo " test to build and test the main target" @echo " simulator to install the simulator for testing" - @echo " export to export the archived project as an .ipa" + @echo " export to export the archived project as an .ipa" @echo " clean to remove all temporal files" - @echo " skinGeneratorSetup to setup skin dependencies" - @echo " colorPaletteGeneration ref= to setup and regenerate MisticaColors with new palettes from mistica design where is the branch from mistica-design repository from where we want to generate the tokens" - @echo " cornerRadiusGeneration ref= to setup and regenerate MisticaCornerRadius with new palettes from mistica design where is the branch from mistica-design repository from where we want to generate the tokens" - @echo " fontWeightsGeneration ref= to setup and regenerate MisticaFontWeights with new palettes from mistica design where is the branch from mistica-design repository from where we want to generate the tokens" - @echo " fontSizesGeneration ref= to setup and regenerate MisticaFontSizes with new palettes from mistica design where is the branch from mistica-design repository from where we want to generate the tokens" - @echo " skin ref= to setup, regenerate and format tokens from mistica design where is the branch from mistica-design repository from where we want to generate the tokens" + @echo " skin to regenerate and format tokens from mistica design" trace: @echo "Current xcodebuild configuration" @@ -85,9 +56,8 @@ setup: trace @brew ls xcbeautify --versions || brew install xcbeautify skinGeneratorSetup: - @echo "Installing tokens generators dependencies" + @echo "Installing tokens generator dependencies" @brew ls node --versions || brew install node - @brew ls hygen --versions || (brew tap jondot/tap && brew install hygen) format: Scripts/swiftformat . @@ -131,25 +101,8 @@ export: clean setup @rm -rf "$(TMP_ROOT_PATH)" -getMisticaDesignTokenFiles: - @echo "Obtaining mistica token files" - for key in $(BRAND_FILES) ; do \ - curl -o $(MISTICA_DESIGN_PATH)$(MISTICA_DESIGN_TOKENS_PATH)/$$key.json --create-dirs $(MISTICA_DESIGN_URL)/$$key.json ; \ - done - -colorPaletteGeneration: skinGeneratorSetup getMisticaDesignTokenFiles - $(call tokenGenerator,ColorTokenGenerator,Colors) - -cornerRadiusGeneration: skinGeneratorSetup getMisticaDesignTokenFiles - $(call tokenGenerator,CornerRadiusTokenGenerator,CornerRadius) - -fontWeightsGeneration: skinGeneratorSetup getMisticaDesignTokenFiles - $(call tokenGenerator,FontWeightsTokenGenerator,FontWeights) - -fontSizesGeneration: skinGeneratorSetup getMisticaDesignTokenFiles - $(call tokenGenerator,FontSizesTokenGenerator,FontSizes) - -removeMisticaDesignTokenFolder: - rm -rf $(MISTICA_DESIGN_PATH) +tokensGeneration: + @echo "Executing tokens generation tool..." + cd scripts/mistica-importer && npm run generate -skin: colorPaletteGeneration cornerRadiusGeneration fontWeightsGeneration fontSizesGeneration removeMisticaDesignTokenFolder format +skin: skinGeneratorSetup tokensGeneration format diff --git a/Sources/MisticaCommon/Extensions/BrandStyle+UIStatusBarStyle.swift b/Sources/MisticaCommon/Extensions/BrandStyle+UIStatusBarStyle.swift new file mode 100644 index 00000000..085ad3ec --- /dev/null +++ b/Sources/MisticaCommon/Extensions/BrandStyle+UIStatusBarStyle.swift @@ -0,0 +1,18 @@ +// +// BrandStyle+UIStatusBarStyle.swift +// +// Made with ❤️ by Novum +// +// Copyright © Telefonica. All rights reserved. +// + +import UIKit + +public extension BrandStyle { + var preferredStatusBarStyle: UIStatusBarStyle { + switch self { + case .movistar, .vivo, .o2, .o2New, .blau, .custom, .vivoNew, .tu, .telefonica: + return .lightContent + } + } +} diff --git a/scripts/MisticaColors.swift b/scripts/MisticaColors.swift new file mode 100644 index 00000000..542e4174 --- /dev/null +++ b/scripts/MisticaColors.swift @@ -0,0 +1,138 @@ + +// Generated using Make +// DO NOT EDIT + +import UIKit + +public protocol MisticaColors { + var background: UIColor { get } + var backgroundAlternative: UIColor { get } + var backgroundBrand: MisticaColor { get } + var backgroundBrandSecondary: UIColor { get } + var backgroundContainer: UIColor { get } + var backgroundContainerError: UIColor { get } + var backgroundContainerHover: UIColor { get } + var backgroundContainerPressed: UIColor { get } + var backgroundContainerBrand: MisticaColor { get } + var backgroundContainerBrandHover: UIColor { get } + var backgroundContainerBrandPressed: UIColor { get } + var backgroundContainerBrandOverInverse: UIColor { get } + var backgroundContainerAlternative: UIColor { get } + var backgroundOverlay: UIColor { get } + var backgroundSkeleton: UIColor { get } + var backgroundSkeletonInverse: UIColor { get } + var backgroundBrandTop: UIColor { get } + var backgroundBrandBottom: UIColor { get } + var appBarBackground: UIColor { get } + var navigationBarBackground: UIColor { get } + var skeletonWave: UIColor { get } + var borderLow: UIColor { get } + var border: UIColor { get } + var borderHigh: UIColor { get } + var borderSelected: UIColor { get } + var coverBackgroundHover: UIColor { get } + var coverBackgroundPressed: UIColor { get } + var buttonDangerBackground: UIColor { get } + var buttonDangerBackgroundSelected: UIColor { get } + var buttonDangerBackgroundHover: UIColor { get } + var buttonLinkDangerBackgroundSelected: UIColor { get } + var buttonLinkDangerBackgroundInverse: UIColor { get } + var buttonLinkDangerBackgroundInverseSelected: UIColor { get } + var buttonLinkBackgroundSelected: UIColor { get } + var buttonLinkBackgroundInverseSelected: UIColor { get } + var buttonPrimaryBackground: UIColor { get } + var buttonPrimaryBackgroundInverse: UIColor { get } + var buttonPrimaryBackgroundSelected: UIColor { get } + var buttonPrimaryBackgroundHover: UIColor { get } + var buttonPrimaryBackgroundInverseSelected: UIColor { get } + var buttonSecondaryBorder: UIColor { get } + var buttonSecondaryBorderSelected: UIColor { get } + var buttonSecondaryBackgroundHover: UIColor { get } + var buttonSecondaryBackgroundSelected: UIColor { get } + var buttonSecondaryBorderInverse: UIColor { get } + var buttonSecondaryBorderInverseSelected: UIColor { get } + var buttonSecondaryBackgroundInverseHover: UIColor { get } + var buttonSecondaryBackgroundInverseSelected: UIColor { get } + var textButtonPrimary: UIColor { get } + var textButtonPrimaryInverse: UIColor { get } + var textButtonPrimaryInverseSelected: UIColor { get } + var textButtonSecondary: UIColor { get } + var textButtonSecondarySelected: UIColor { get } + var textButtonSecondaryInverse: UIColor { get } + var textButtonSecondaryInverseSelected: UIColor { get } + var textLink: UIColor { get } + var textLinkInverse: UIColor { get } + var textLinkDanger: UIColor { get } + var textLinkSnackbar: UIColor { get } + var textActivated: UIColor { get } + var textBrand: UIColor { get } + var control: UIColor { get } + var controlActivated: UIColor { get } + var controlInverse: UIColor { get } + var controlActivatedInverse: UIColor { get } + var controlError: UIColor { get } + var barTrack: UIColor { get } + var loadingBar: UIColor { get } + var loadingBarBackground: UIColor { get } + var toggleAndroidInactive: UIColor { get } + var toggleAndroidBackgroundActive: UIColor { get } + var iosControlKnob: UIColor { get } + var divider: UIColor { get } + var dividerInverse: UIColor { get } + var navigationBarDivider: UIColor { get } + var badge: UIColor { get } + var feedbackErrorBackground: UIColor { get } + var feedbackInfoBackground: UIColor { get } + var brand: UIColor { get } + var brandHigh: UIColor { get } + var inverse: UIColor { get } + var neutralHigh: UIColor { get } + var neutralMedium: UIColor { get } + var neutralMediumInverse: UIColor { get } + var neutralLow: UIColor { get } + var neutralLowAlternative: UIColor { get } + var textPrimary: UIColor { get } + var textPrimaryInverse: UIColor { get } + var textSecondary: UIColor { get } + var textSecondaryInverse: UIColor { get } + var success: UIColor { get } + var warning: UIColor { get } + var error: UIColor { get } + var textError: UIColor { get } + var textErrorInverse: UIColor { get } + var promo: UIColor { get } + var highlight: UIColor { get } + var successLow: UIColor { get } + var warningLow: UIColor { get } + var errorLow: UIColor { get } + var promoLow: UIColor { get } + var brandLow: UIColor { get } + var successHigh: UIColor { get } + var warningHigh: UIColor { get } + var errorHigh: UIColor { get } + var promoHigh: UIColor { get } + var successHighInverse: UIColor { get } + var warningHighInverse: UIColor { get } + var errorHighInverse: UIColor { get } + var promoHighInverse: UIColor { get } + var textNavigationBarPrimary: UIColor { get } + var textNavigationBarSecondary: UIColor { get } + var textNavigationSearchBarHint: UIColor { get } + var textNavigationSearchBarText: UIColor { get } + var textAppBar: UIColor { get } + var textAppBarSelected: UIColor { get } + var customTabsBackground: UIColor { get } + var tagTextPromo: UIColor { get } + var tagTextActive: UIColor { get } + var tagTextInactive: UIColor { get } + var tagTextSuccess: UIColor { get } + var tagTextWarning: UIColor { get } + var tagTextError: UIColor { get } + var tagBackgroundPromo: UIColor { get } + var tagBackgroundActive: UIColor { get } + var tagBackgroundInactive: UIColor { get } + var tagBackgroundSuccess: UIColor { get } + var tagBackgroundWarning: UIColor { get } + var tagBackgroundError: UIColor { get } + var cardContentOverlay: MisticaGradient { get } +} diff --git a/scripts/mistica-importer/MisticaColors.swift b/scripts/mistica-importer/MisticaColors.swift new file mode 100644 index 00000000..542e4174 --- /dev/null +++ b/scripts/mistica-importer/MisticaColors.swift @@ -0,0 +1,138 @@ + +// Generated using Make +// DO NOT EDIT + +import UIKit + +public protocol MisticaColors { + var background: UIColor { get } + var backgroundAlternative: UIColor { get } + var backgroundBrand: MisticaColor { get } + var backgroundBrandSecondary: UIColor { get } + var backgroundContainer: UIColor { get } + var backgroundContainerError: UIColor { get } + var backgroundContainerHover: UIColor { get } + var backgroundContainerPressed: UIColor { get } + var backgroundContainerBrand: MisticaColor { get } + var backgroundContainerBrandHover: UIColor { get } + var backgroundContainerBrandPressed: UIColor { get } + var backgroundContainerBrandOverInverse: UIColor { get } + var backgroundContainerAlternative: UIColor { get } + var backgroundOverlay: UIColor { get } + var backgroundSkeleton: UIColor { get } + var backgroundSkeletonInverse: UIColor { get } + var backgroundBrandTop: UIColor { get } + var backgroundBrandBottom: UIColor { get } + var appBarBackground: UIColor { get } + var navigationBarBackground: UIColor { get } + var skeletonWave: UIColor { get } + var borderLow: UIColor { get } + var border: UIColor { get } + var borderHigh: UIColor { get } + var borderSelected: UIColor { get } + var coverBackgroundHover: UIColor { get } + var coverBackgroundPressed: UIColor { get } + var buttonDangerBackground: UIColor { get } + var buttonDangerBackgroundSelected: UIColor { get } + var buttonDangerBackgroundHover: UIColor { get } + var buttonLinkDangerBackgroundSelected: UIColor { get } + var buttonLinkDangerBackgroundInverse: UIColor { get } + var buttonLinkDangerBackgroundInverseSelected: UIColor { get } + var buttonLinkBackgroundSelected: UIColor { get } + var buttonLinkBackgroundInverseSelected: UIColor { get } + var buttonPrimaryBackground: UIColor { get } + var buttonPrimaryBackgroundInverse: UIColor { get } + var buttonPrimaryBackgroundSelected: UIColor { get } + var buttonPrimaryBackgroundHover: UIColor { get } + var buttonPrimaryBackgroundInverseSelected: UIColor { get } + var buttonSecondaryBorder: UIColor { get } + var buttonSecondaryBorderSelected: UIColor { get } + var buttonSecondaryBackgroundHover: UIColor { get } + var buttonSecondaryBackgroundSelected: UIColor { get } + var buttonSecondaryBorderInverse: UIColor { get } + var buttonSecondaryBorderInverseSelected: UIColor { get } + var buttonSecondaryBackgroundInverseHover: UIColor { get } + var buttonSecondaryBackgroundInverseSelected: UIColor { get } + var textButtonPrimary: UIColor { get } + var textButtonPrimaryInverse: UIColor { get } + var textButtonPrimaryInverseSelected: UIColor { get } + var textButtonSecondary: UIColor { get } + var textButtonSecondarySelected: UIColor { get } + var textButtonSecondaryInverse: UIColor { get } + var textButtonSecondaryInverseSelected: UIColor { get } + var textLink: UIColor { get } + var textLinkInverse: UIColor { get } + var textLinkDanger: UIColor { get } + var textLinkSnackbar: UIColor { get } + var textActivated: UIColor { get } + var textBrand: UIColor { get } + var control: UIColor { get } + var controlActivated: UIColor { get } + var controlInverse: UIColor { get } + var controlActivatedInverse: UIColor { get } + var controlError: UIColor { get } + var barTrack: UIColor { get } + var loadingBar: UIColor { get } + var loadingBarBackground: UIColor { get } + var toggleAndroidInactive: UIColor { get } + var toggleAndroidBackgroundActive: UIColor { get } + var iosControlKnob: UIColor { get } + var divider: UIColor { get } + var dividerInverse: UIColor { get } + var navigationBarDivider: UIColor { get } + var badge: UIColor { get } + var feedbackErrorBackground: UIColor { get } + var feedbackInfoBackground: UIColor { get } + var brand: UIColor { get } + var brandHigh: UIColor { get } + var inverse: UIColor { get } + var neutralHigh: UIColor { get } + var neutralMedium: UIColor { get } + var neutralMediumInverse: UIColor { get } + var neutralLow: UIColor { get } + var neutralLowAlternative: UIColor { get } + var textPrimary: UIColor { get } + var textPrimaryInverse: UIColor { get } + var textSecondary: UIColor { get } + var textSecondaryInverse: UIColor { get } + var success: UIColor { get } + var warning: UIColor { get } + var error: UIColor { get } + var textError: UIColor { get } + var textErrorInverse: UIColor { get } + var promo: UIColor { get } + var highlight: UIColor { get } + var successLow: UIColor { get } + var warningLow: UIColor { get } + var errorLow: UIColor { get } + var promoLow: UIColor { get } + var brandLow: UIColor { get } + var successHigh: UIColor { get } + var warningHigh: UIColor { get } + var errorHigh: UIColor { get } + var promoHigh: UIColor { get } + var successHighInverse: UIColor { get } + var warningHighInverse: UIColor { get } + var errorHighInverse: UIColor { get } + var promoHighInverse: UIColor { get } + var textNavigationBarPrimary: UIColor { get } + var textNavigationBarSecondary: UIColor { get } + var textNavigationSearchBarHint: UIColor { get } + var textNavigationSearchBarText: UIColor { get } + var textAppBar: UIColor { get } + var textAppBarSelected: UIColor { get } + var customTabsBackground: UIColor { get } + var tagTextPromo: UIColor { get } + var tagTextActive: UIColor { get } + var tagTextInactive: UIColor { get } + var tagTextSuccess: UIColor { get } + var tagTextWarning: UIColor { get } + var tagTextError: UIColor { get } + var tagBackgroundPromo: UIColor { get } + var tagBackgroundActive: UIColor { get } + var tagBackgroundInactive: UIColor { get } + var tagBackgroundSuccess: UIColor { get } + var tagBackgroundWarning: UIColor { get } + var tagBackgroundError: UIColor { get } + var cardContentOverlay: MisticaGradient { get } +} diff --git a/scripts/mistica-importer/generators/colors/__tests__/brand-colors-generator.test.js b/scripts/mistica-importer/generators/colors/__tests__/brand-colors-generator.test.js new file mode 100644 index 00000000..bd3ea6d6 --- /dev/null +++ b/scripts/mistica-importer/generators/colors/__tests__/brand-colors-generator.test.js @@ -0,0 +1,42 @@ +import fs from "fs"; +import { resolve } from "path"; +import { reduceColors } from "../reduce-colors"; +import { generateBrandColors } from "../brand-colors-generator"; + +describe("generateBrandColors", () => { + const getTokensFromFile = (file) => + JSON.parse(fs.readFileSync(resolve(__dirname, file), "utf-8")); + it("real case", () => { + const brandsWithTokens = [ + { + brand: { + id: "brand1", + prefix: "Brand1", + misticaDesignFileName: "brand-1", + }, + tokens: getTokensFromFile("brand1-tokens.json"), + }, + { + brand: { + id: "brand2", + prefix: "Brand2", + misticaDesignFileName: "brand-2", + }, + tokens: getTokensFromFile("brand2-tokens.json"), + }, + ]; + + const colors = reduceColors(brandsWithTokens); + const result = generateBrandColors( + brandsWithTokens[0].brand, + colors, + brandsWithTokens[0].tokens.global.palette + ); + + const expectedContent = fs.readFileSync( + resolve(__dirname, "expected-Brand1Colors.swift"), + "utf-8" + ); + expect(result).toBe(expectedContent); + }); +}); diff --git a/scripts/mistica-importer/generators/colors/__tests__/brand1-tokens.json b/scripts/mistica-importer/generators/colors/__tests__/brand1-tokens.json new file mode 100644 index 00000000..197790fc --- /dev/null +++ b/scripts/mistica-importer/generators/colors/__tests__/brand1-tokens.json @@ -0,0 +1,1438 @@ +{ + "light": { + "background": { + "value": "{palette.white}", + "type": "color", + "description": "white" + }, + "backgroundAlternative": { + "value": "{palette.grey20}", + "type": "color", + "description": "grey20" + }, + "backgroundBrand": { + "type": "linear-gradient", + "value": { + "angle": 180, + "colors": [ + { "value": "{palette.darkBlue}", "stop": 0 }, + { "value": "{palette.beyondBlue}", "stop": 0.64 }, + { "value": "{palette.beyondBlue45}", "stop": 1 } + ] + }, + "description": "o2Gradient" + }, + "backgroundBrandSecondary": { + "value": "{palette.beyondBlue}", + "type": "color", + "description": "beyondBlue" + }, + "backgroundContainer": { + "value": "{palette.white}", + "type": "color", + "description": "white" + }, + "backgroundContainerError": { + "value": "{palette.o2Red10}", + "type": "color", + "description": "o2Red10" + }, + "backgroundContainerHover": { + "value": "rgba({palette.darkModeBlack}, 0.03)", + "type": "color", + "description": "darkModeBlack" + }, + "backgroundContainerPressed": { + "value": "rgba({palette.darkModeBlack}, 0.05)", + "type": "color", + "description": "darkModeBlack" + }, + "backgroundContainerBrand": { + "type": "linear-gradient", + "value": { + "angle": 180, + "colors": [ + { "value": "{palette.darkBlue}", "stop": 0 }, + { "value": "{palette.beyondBlue}", "stop": 0.64 }, + { "value": "{palette.beyondBlue45}", "stop": 1 } + ] + }, + "description": "o2Gradient" + }, + "backgroundContainerBrandHover": { + "value": "rgba({palette.darkModeBlack}, 0.2)", + "type": "color", + "description": "darkModeBlack" + }, + "backgroundContainerBrandPressed": { + "value": "rgba({palette.darkModeBlack}, 0.4)", + "type": "color", + "description": "darkModeBlack" + }, + "backgroundContainerBrandOverInverse": { + "value": "{palette.beyondBlue70}", + "type": "color", + "description": "beyondBlue70" + }, + "backgroundContainerAlternative": { + "value": "{palette.grey20}", + "type": "color", + "description": "grey20" + }, + "backgroundOverlay": { + "value": "rgba({palette.black}, 0.6)", + "type": "color", + "description": "black" + }, + "backgroundSkeleton": { + "value": "{palette.grey30}", + "type": "color", + "description": "grey30" + }, + "backgroundSkeletonInverse": { + "value": "{palette.beyondBlue70}", + "type": "color", + "description": "beyondBlue70" + }, + "backgroundBrandTop": { + "value": "{palette.darkBlue}", + "type": "color", + "description": "darkBlue" + }, + "backgroundBrandBottom": { + "value": "{palette.beyondBlue45}", + "type": "color", + "description": "beyondBlue45" + }, + "appBarBackground": { + "value": "{palette.white}", + "type": "color", + "description": "white" + }, + "navigationBarBackground": { + "value": "{palette.darkBlue}", + "type": "color", + "description": "darkBlue" + }, + "skeletonWave": { + "value": "{palette.grey30}", + "type": "color", + "description": "grey30" + }, + "borderLow": { + "value": "{palette.grey20}", + "type": "color", + "description": "grey20" + }, + "border": { + "value": "{palette.grey30}", + "type": "color", + "description": "grey30" + }, + "borderHigh": { + "value": "{palette.grey80}", + "type": "color", + "description": "grey80" + }, + "borderSelected": { + "value": "{palette.beyondBlue}", + "type": "color", + "description": "beyondBlue" + }, + "coverBackgroundHover": { + "value": "rgba({palette.darkModeBlack}, 0.25)", + "type": "color", + "description": "darkModeBlack" + }, + "coverBackgroundPressed": { + "value": "rgba({palette.darkModeBlack}, 0.35)", + "type": "color", + "description": "darkModeBlack" + }, + "buttonDangerBackground": { + "value": "{palette.o2Red60}", + "type": "color", + "description": "o2Red60" + }, + "buttonDangerBackgroundSelected": { + "value": "{palette.o2Red65}", + "type": "color", + "description": "o2Red65" + }, + "buttonDangerBackgroundHover": { + "value": "{palette.o2Red65}", + "type": "color", + "description": "o2Red65" + }, + "buttonLinkDangerBackgroundSelected": { + "value": "{palette.o2Red10}", + "type": "color", + "description": "o2Red10" + }, + "buttonLinkDangerBackgroundInverse": { + "value": "{palette.white}", + "type": "color", + "description": "white" + }, + "buttonLinkDangerBackgroundInverseSelected": { + "value": "{palette.o2Red10}", + "type": "color", + "description": "o2Red10" + }, + "buttonLinkBackgroundSelected": { + "value": "{palette.beyondBlue10}", + "type": "color", + "description": "beyondBlue10" + }, + "buttonLinkBackgroundInverseSelected": { + "value": "rgba({palette.white}, 0.08)", + "type": "color", + "description": "white" + }, + "buttonPrimaryBackground": { + "value": "{palette.beyondBlue}", + "type": "color", + "description": "beyondBlue" + }, + "buttonPrimaryBackgroundInverse": { + "value": "{palette.white}", + "type": "color", + "description": "white" + }, + "buttonPrimaryBackgroundSelected": { + "value": "{palette.beyondBlue70}", + "type": "color", + "description": "beyondBlue70" + }, + "buttonPrimaryBackgroundHover": { + "value": "{palette.beyondBlue70}", + "type": "color", + "description": "beyondBlue70" + }, + "buttonPrimaryBackgroundInverseSelected": { + "value": "{palette.beyondBlue30}", + "type": "color", + "description": "beyondBlue30" + }, + "buttonSecondaryBorder": { + "value": "{palette.beyondBlue}", + "type": "color", + "description": "beyondBlue" + }, + "buttonSecondaryBorderSelected": { + "value": "{palette.beyondBlue70}", + "type": "color", + "description": "beyondBlue70" + }, + "buttonSecondaryBackgroundHover": { + "value": "{palette.beyondBlue10}", + "type": "color", + "description": "beyondBlue10" + }, + "buttonSecondaryBackgroundSelected": { + "value": "{palette.beyondBlue10}", + "type": "color", + "description": "beyondBlue10" + }, + "buttonSecondaryBorderInverse": { + "value": "{palette.white}", + "type": "color", + "description": "white" + }, + "buttonSecondaryBorderInverseSelected": { + "value": "{palette.beyondBlue30}", + "type": "color", + "description": "beyondBlue30" + }, + "buttonSecondaryBackgroundInverseHover": { + "value": "rgba({palette.white}, 0.15)", + "type": "color", + "description": "white" + }, + "buttonSecondaryBackgroundInverseSelected": { + "value": "rgba({palette.white}, 0.15)", + "type": "color", + "description": "white" + }, + "textButtonPrimary": { + "value": "{palette.white}", + "type": "color", + "description": "white" + }, + "textButtonPrimaryInverse": { + "value": "{palette.beyondBlue}", + "type": "color", + "description": "beyondBlue" + }, + "textButtonPrimaryInverseSelected": { + "value": "{palette.beyondBlue70}", + "type": "color", + "description": "beyondBlue70" + }, + "textButtonSecondary": { + "value": "{palette.beyondBlue}", + "type": "color", + "description": "beyondBlue" + }, + "textButtonSecondarySelected": { + "value": "{palette.beyondBlue70}", + "type": "color", + "description": "beyondBlue70" + }, + "textButtonSecondaryInverse": { + "value": "{palette.white}", + "type": "color", + "description": "white" + }, + "textButtonSecondaryInverseSelected": { + "value": "{palette.white}", + "type": "color", + "description": "white" + }, + "textLink": { + "value": "{palette.beyondBlue}", + "type": "color", + "description": "beyondBlue" + }, + "textLinkInverse": { + "value": "{palette.white}", + "type": "color", + "description": "white" + }, + "textLinkDanger": { + "value": "{palette.o2Red65}", + "type": "color", + "description": "o2Red65" + }, + "textLinkSnackbar": { + "value": "{palette.beyondBlue30}", + "type": "color", + "description": "beyondBlue30" + }, + "textActivated": { + "value": "{palette.beyondBlue}", + "type": "color", + "description": "beyondBlue" + }, + "textBrand": { + "value": "{palette.beyondBlue}", + "type": "color", + "description": "beyondBlue" + }, + "control": { + "value": "{palette.grey45}", + "type": "color", + "description": "grey45" + }, + "controlActivated": { + "value": "{palette.beyondBlue}", + "type": "color", + "description": "beyondBlue" + }, + "controlInverse": { + "value": "{palette.white}", + "type": "color", + "description": "white" + }, + "controlActivatedInverse": { + "value": "{palette.white}", + "type": "color", + "description": "white" + }, + "controlError": { + "value": "{palette.o2Red60}", + "type": "color", + "description": "o2Red60" + }, + "barTrack": { + "value": "{palette.grey30}", + "type": "color", + "description": "grey30" + }, + "loadingBar": { + "value": "{palette.beyondBlue}", + "type": "color", + "description": "beyondBlue" + }, + "loadingBarBackground": { + "value": "{palette.grey20}", + "type": "color", + "description": "grey20" + }, + "toggleAndroidInactive": { + "value": "{palette.grey30}", + "type": "color", + "description": "grey30" + }, + "toggleAndroidBackgroundActive": { + "value": "{palette.beyondBlue15}", + "type": "color", + "description": "beyondBlue15" + }, + "iosControlKnob": { + "value": "{palette.white}", + "type": "color", + "description": "white" + }, + "divider": { + "value": "{palette.grey30}", + "type": "color", + "description": "grey30" + }, + "dividerInverse": { + "value": "rgba({palette.white}, 0.2)", + "type": "color", + "description": "white" + }, + "navigationBarDivider": { + "value": "{palette.darkBlue}", + "type": "color", + "description": "darkBlue" + }, + "badge": { + "value": "{palette.o2Red65}", + "type": "color", + "description": "o2Red65" + }, + "feedbackErrorBackground": { + "value": "{palette.o2Red60}", + "type": "color", + "description": "o2Red60" + }, + "feedbackInfoBackground": { + "value": "{palette.black}", + "type": "color", + "description": "black" + }, + "brand": { + "value": "{palette.beyondBlue}", + "type": "color", + "description": "beyondBlue" + }, + "brandHigh": { + "value": "{palette.beyondBlue70}", + "type": "color", + "description": "beyondBlue70" + }, + "inverse": { + "value": "{palette.white}", + "type": "color", + "description": "white" + }, + "neutralHigh": { + "value": "{palette.black}", + "type": "color", + "description": "black" + }, + "neutralMedium": { + "value": "{palette.grey60}", + "type": "color", + "description": "grey60" + }, + "neutralMediumInverse": { + "value": "{palette.grey60}", + "type": "color", + "description": "grey60" + }, + "neutralLow": { + "value": "{palette.grey20}", + "type": "color", + "description": "grey20" + }, + "neutralLowAlternative": { + "value": "{palette.grey30}", + "type": "color", + "description": "grey30" + }, + "textPrimary": { + "value": "{palette.black}", + "type": "color", + "description": "black" + }, + "textPrimaryInverse": { + "value": "{palette.white}", + "type": "color", + "description": "white" + }, + "textSecondary": { + "value": "{palette.grey60}", + "type": "color", + "description": "grey60" + }, + "textSecondaryInverse": { + "value": "{palette.beyondBlue10}", + "type": "color", + "description": "beyondBlue10" + }, + "success": { + "value": "{palette.o2Green}", + "type": "color", + "description": "o2Green" + }, + "warning": { + "value": "{palette.o2Orange}", + "type": "color", + "description": "o2Orange" + }, + "error": { + "value": "{palette.o2Red65}", + "type": "color", + "description": "o2Red65" + }, + "textError": { + "value": "{palette.o2Red65}", + "type": "color", + "description": "o2Red65" + }, + "textErrorInverse": { + "value": "{palette.white}", + "type": "color", + "description": "white" + }, + "promo": { + "value": "{palette.o2Pink}", + "type": "color", + "description": "o2Pink" + }, + "highlight": { + "value": "{palette.o2Pink80}", + "type": "color", + "description": "o2Pink80" + }, + "successLow": { + "value": "{palette.o2Green10}", + "type": "color", + "description": "o2Green10" + }, + "warningLow": { + "value": "{palette.o2Orange10}", + "type": "color", + "description": "o2Orange10" + }, + "errorLow": { + "value": "{palette.o2Red10}", + "type": "color", + "description": "o2Red10" + }, + "promoLow": { + "value": "{palette.o2Pink15}", + "type": "color", + "description": "o2Pink15" + }, + "brandLow": { + "value": "{palette.beyondBlue10}", + "type": "color", + "description": "beyondBlue10" + }, + "successHigh": { + "value": "{palette.o2Green80}", + "type": "color", + "description": "o2Green80" + }, + "warningHigh": { + "value": "{palette.o2Orange75}", + "type": "color", + "description": "o2Orange75" + }, + "errorHigh": { + "value": "{palette.o2Red65}", + "type": "color", + "description": "o2Red65" + }, + "promoHigh": { + "value": "{palette.o2Pink80}", + "type": "color", + "description": "o2Pink80" + }, + "successHighInverse": { + "value": "{palette.o2Green80}", + "type": "color", + "description": "o2Green80" + }, + "warningHighInverse": { + "value": "{palette.o2Orange75}", + "type": "color", + "description": "o2Orange75" + }, + "errorHighInverse": { + "value": "{palette.o2Red65}", + "type": "color", + "description": "o2Red65" + }, + "promoHighInverse": { + "value": "{palette.o2Pink80}", + "type": "color", + "description": "o2Pink80" + }, + "textNavigationBarPrimary": { + "value": "{palette.white}", + "type": "color", + "description": "white" + }, + "textNavigationBarSecondary": { + "value": "{palette.beyondBlue30}", + "type": "color", + "description": "beyondBlue30" + }, + "textNavigationSearchBarHint": { + "value": "{palette.beyondBlue30}", + "type": "color", + "description": "beyondBlue30" + }, + "textNavigationSearchBarText": { + "value": "{palette.white}", + "type": "color", + "description": "white" + }, + "textAppBar": { + "value": "{palette.grey60}", + "type": "color", + "description": "grey60" + }, + "textAppBarSelected": { + "value": "{palette.beyondBlue}", + "type": "color", + "description": "beyondBlue" + }, + "customTabsBackground": { + "value": "{palette.beyondBlue}", + "type": "color", + "description": "beyondBlue" + }, + "tagTextPromo": { + "value": "{palette.o2Pink80}", + "type": "color", + "description": "o2Pink80" + }, + "tagTextActive": { + "value": "{palette.beyondBlue}", + "type": "color", + "description": "beyondBlue" + }, + "tagTextInactive": { + "value": "{palette.grey60}", + "type": "color", + "description": "grey60" + }, + "tagTextSuccess": { + "value": "{palette.o2Green80}", + "type": "color", + "description": "o2Green80" + }, + "tagTextWarning": { + "value": "{palette.o2Orange75}", + "type": "color", + "description": "o2Orange75" + }, + "tagTextError": { + "value": "{palette.o2Red65}", + "type": "color", + "description": "o2Red65" + }, + "tagBackgroundPromo": { + "value": "{palette.o2Pink15}", + "type": "color", + "description": "o2Pink15" + }, + "tagBackgroundActive": { + "value": "{palette.beyondBlue10}", + "type": "color", + "description": "beyondBlue10" + }, + "tagBackgroundInactive": { + "value": "{palette.grey20}", + "type": "color", + "description": "grey20" + }, + "tagBackgroundSuccess": { + "value": "{palette.o2Green10}", + "type": "color", + "description": "o2Green10" + }, + "tagBackgroundWarning": { + "value": "{palette.o2Orange10}", + "type": "color", + "description": "o2Orange10" + }, + "tagBackgroundError": { + "value": "{palette.o2Red10}", + "type": "color", + "description": "o2Red10" + }, + "cardContentOverlay": { + "type": "linear-gradient", + "value": { + "angle": 180, + "colors": [ + { "value": "rgba({palette.beyondBlue}, 0)", "stop": 0 }, + { "value": "rgba({palette.beyondBlue}, 0.4)", "stop": 0.3 }, + { "value": "rgba({palette.beyondBlue}, 1)", "stop": 1 } + ] + }, + "description": "grey6" + } + }, + "dark": { + "background": { + "value": "{palette.darkModeBlack}", + "type": "color", + "description": "darkModeBlack" + }, + "backgroundAlternative": { + "value": "{palette.darkModeBlack}", + "type": "color", + "description": "darkModeBlack" + }, + "backgroundBrand": { + "value": "{palette.darkModeBlack}", + "type": "color", + "description": "darkModeBlack" + }, + "backgroundBrandSecondary": { + "value": "{palette.darkModeBlack}", + "type": "color", + "description": "darkModeBlack" + }, + "backgroundContainer": { + "value": "{palette.darkModeGrey}", + "type": "color", + "description": "darkModeGrey" + }, + "backgroundContainerError": { + "value": "{palette.darkModeGrey}", + "type": "color", + "description": "darkModeGrey" + }, + "backgroundContainerHover": { + "value": "rgba({palette.white}, 0.03)", + "type": "color", + "description": "white" + }, + "backgroundContainerPressed": { + "value": "rgba({palette.white}, 0.05)", + "type": "color", + "description": "white" + }, + "backgroundContainerBrand": { + "value": "{palette.darkModeGrey}", + "type": "color", + "description": "darkModeGrey" + }, + "backgroundContainerBrandHover": { + "value": "rgba({palette.white}, 0.03)", + "type": "color", + "description": "white" + }, + "backgroundContainerBrandPressed": { + "value": "rgba({palette.white}, 0.05)", + "type": "color", + "description": "white" + }, + "backgroundContainerBrandOverInverse": { + "value": "{palette.darkModeGrey}", + "type": "color", + "description": "darkModeGrey" + }, + "backgroundContainerAlternative": { + "value": "{palette.darkModeGrey}", + "type": "color", + "description": "darkModeGrey" + }, + "backgroundOverlay": { + "value": "rgba({palette.darkModeGrey}, 0.8)", + "type": "color", + "description": "darkModeGrey" + }, + "backgroundSkeleton": { + "value": "{palette.darkModeGrey6}", + "type": "color", + "description": "darkModeGrey6" + }, + "backgroundSkeletonInverse": { + "value": "{palette.darkModeGrey6}", + "type": "color", + "description": "darkModeGrey6" + }, + "backgroundBrandTop": { + "value": "{palette.darkModeBlack}", + "type": "color", + "description": "darkModeBlack" + }, + "backgroundBrandBottom": { + "value": "{palette.darkModeBlack}", + "type": "color", + "description": "darkModeBlack" + }, + "appBarBackground": { + "value": "{palette.darkModeGrey}", + "type": "color", + "description": "darkModeGrey" + }, + "navigationBarBackground": { + "value": "{palette.darkModeBlack}", + "type": "color", + "description": "darkModeBlack" + }, + "skeletonWave": { + "value": "{palette.grey80}", + "type": "color", + "description": "grey80" + }, + "borderLow": { + "value": "{palette.darkModeBlack}", + "type": "color", + "description": "darkModeBlack" + }, + "border": { + "value": "{palette.darkModeGrey}", + "type": "color", + "description": "darkModeGrey" + }, + "borderHigh": { + "value": "{palette.grey45}", + "type": "color", + "description": "grey45" + }, + "borderSelected": { + "value": "{palette.beyondBlue30}", + "type": "color", + "description": "beyondBlue30" + }, + "coverBackgroundHover": { + "value": "rgba({palette.darkModeBlack}, 0.25)", + "type": "color", + "description": "darkModeBlack" + }, + "coverBackgroundPressed": { + "value": "rgba({palette.darkModeBlack}, 0.35)", + "type": "color", + "description": "darkModeBlack" + }, + "buttonDangerBackground": { + "value": "{palette.o2Red60}", + "type": "color", + "description": "o2Red60" + }, + "buttonDangerBackgroundSelected": { + "value": "{palette.o2Red65}", + "type": "color", + "description": "o2Red65" + }, + "buttonDangerBackgroundHover": { + "value": "{palette.o2Red65}", + "type": "color", + "description": "o2Red65" + }, + "buttonLinkDangerBackgroundSelected": { + "value": "rgba({palette.white}, 0.08)", + "type": "color", + "description": "white" + }, + "buttonLinkDangerBackgroundInverse": { + "value": "rgba({palette.white}, 0)", + "type": "color", + "description": "white" + }, + "buttonLinkDangerBackgroundInverseSelected": { + "value": "rgba({palette.white}, 0.08)", + "type": "color", + "description": "white" + }, + "buttonLinkBackgroundSelected": { + "value": "rgba({palette.white}, 0.08)", + "type": "color", + "description": "white" + }, + "buttonLinkBackgroundInverseSelected": { + "value": "rgba({palette.white}, 0.08)", + "type": "color", + "description": "white" + }, + "buttonPrimaryBackground": { + "value": "{palette.darkModeBeyondBlue}", + "type": "color", + "description": "darkModeBeyondBlue" + }, + "buttonPrimaryBackgroundInverse": { + "value": "{palette.darkModeBeyondBlue}", + "type": "color", + "description": "darkModeBeyondBlue" + }, + "buttonPrimaryBackgroundSelected": { + "value": "{palette.beyondBlue55}", + "type": "color", + "description": "beyondBlue55" + }, + "buttonPrimaryBackgroundHover": { + "value": "{palette.beyondBlue55}", + "type": "color", + "description": "beyondBlue55" + }, + "buttonPrimaryBackgroundInverseSelected": { + "value": "{palette.beyondBlue55}", + "type": "color", + "description": "beyondBlue55" + }, + "buttonSecondaryBackgroundSelected": { + "value": "rgba({palette.white}, 0.15)", + "type": "color", + "description": "white" + }, + "buttonSecondaryBorder": { + "value": "{palette.white}", + "type": "color", + "description": "white" + }, + "buttonSecondaryBorderSelected": { + "value": "{palette.white}", + "type": "color", + "description": "white" + }, + "buttonSecondaryBorderInverse": { + "value": "{palette.white}", + "type": "color", + "description": "white" + }, + "buttonSecondaryBorderInverseSelected": { + "value": "{palette.white}", + "type": "color", + "description": "white" + }, + "buttonSecondaryBackgroundHover": { + "value": "rgba({palette.white}, 0.15)", + "type": "color", + "description": "white" + }, + "buttonSecondaryBackgroundInverseHover": { + "value": "rgba({palette.white}, 0.15)", + "type": "color", + "description": "white" + }, + "buttonSecondaryBackgroundInverseSelected": { + "value": "rgba({palette.white}, 0.15)", + "type": "color", + "description": "white" + }, + "textButtonPrimary": { + "value": "{palette.white}", + "type": "color", + "description": "white" + }, + "textButtonPrimaryInverse": { + "value": "{palette.white}", + "type": "color", + "description": "white" + }, + "textButtonPrimaryInverseSelected": { + "value": "{palette.white}", + "type": "color", + "description": "white" + }, + "textButtonSecondary": { + "value": "{palette.grey30}", + "type": "color", + "description": "grey30" + }, + "textButtonSecondarySelected": { + "value": "{palette.grey30}", + "type": "color", + "description": "grey30" + }, + "textButtonSecondaryInverse": { + "value": "{palette.grey30}", + "type": "color", + "description": "grey30" + }, + "textButtonSecondaryInverseSelected": { + "value": "{palette.grey30}", + "type": "color", + "description": "grey30" + }, + "textLink": { + "value": "{palette.beyondBlue40}", + "type": "color", + "description": "beyondBlue40" + }, + "textLinkInverse": { + "value": "{palette.beyondBlue40}", + "type": "color", + "description": "beyondBlue40" + }, + "textLinkDanger": { + "value": "{palette.o2Red45}", + "type": "color", + "description": "o2Red45" + }, + "textLinkSnackbar": { + "value": "{palette.beyondBlue30}", + "type": "color", + "description": "beyondBlue30" + }, + "textActivated": { + "value": "{palette.beyondBlue30}", + "type": "color", + "description": "beyondBlue30" + }, + "textBrand": { + "value": "{palette.beyondBlue30}", + "type": "color", + "description": "beyondBlue30" + }, + "control": { + "value": "{palette.grey45}", + "type": "color", + "description": "grey45" + }, + "controlActivated": { + "value": "{palette.darkModeBeyondBlue}", + "type": "color", + "description": "darkModeBeyondBlue" + }, + "controlInverse": { + "value": "{palette.grey45}", + "type": "color", + "description": "grey45" + }, + "controlActivatedInverse": { + "value": "{palette.darkModeBeyondBlue}", + "type": "color", + "description": "darkModeBeyondBlue" + }, + "controlError": { + "value": "{palette.o2Red45}", + "type": "color", + "description": "o2Red45" + }, + "barTrack": { + "value": "{palette.darkModeGrey6}", + "type": "color", + "description": "darkModeGrey6" + }, + "loadingBar": { + "value": "{palette.darkModeBeyondBlue}", + "type": "color", + "description": "darkModeBeyondBlue" + }, + "loadingBarBackground": { + "value": "{palette.darkModeGrey6}", + "type": "color", + "description": "darkModeGrey6" + }, + "toggleAndroidInactive": { + "value": "{palette.grey20}", + "type": "color", + "description": "grey20" + }, + "toggleAndroidBackgroundActive": { + "value": "{palette.beyondBlue15}", + "type": "color", + "description": "beyondBlue15" + }, + "iosControlKnob": { + "value": "{palette.grey30}", + "type": "color", + "description": "grey30" + }, + "badge": { + "value": "{palette.o2Red65}", + "type": "color", + "description": "o2Red65" + }, + "feedbackErrorBackground": { + "value": "{palette.o2Red60}", + "type": "color", + "description": "o2Red60" + }, + "feedbackInfoBackground": { + "value": "{palette.darkModeGrey6}", + "type": "color", + "description": "darkModeGrey6" + }, + "divider": { + "value": "rgba({palette.white}, 0.1)", + "type": "color", + "description": "white" + }, + "dividerInverse": { + "value": "rgba({palette.white}, 0.1)", + "type": "color", + "description": "white" + }, + "navigationBarDivider": { + "value": "{palette.darkModeBlack}", + "type": "color", + "description": "darkModeBlack" + }, + "brand": { + "value": "{palette.beyondBlue30}", + "type": "color", + "description": "beyondBlue30" + }, + "brandHigh": { + "value": "rgba({palette.white}, 0.05)", + "type": "color", + "description": "white" + }, + "inverse": { + "value": "{palette.grey30}", + "type": "color", + "description": "grey30" + }, + "neutralHigh": { + "value": "{palette.grey30}", + "type": "color", + "description": "grey30" + }, + "neutralMedium": { + "value": "{palette.grey60}", + "type": "color", + "description": "grey60" + }, + "neutralMediumInverse": { + "value": "{palette.grey60}", + "type": "color", + "description": "grey60" + }, + "neutralLow": { + "value": "{palette.grey80}", + "type": "color", + "description": "grey80" + }, + "neutralLowAlternative": { + "value": "{palette.grey80}", + "type": "color", + "description": "grey80" + }, + "textPrimary": { + "value": "{palette.grey30}", + "type": "color", + "description": "grey30" + }, + "textPrimaryInverse": { + "value": "{palette.grey30}", + "type": "color", + "description": "grey30" + }, + "textSecondary": { + "value": "{palette.grey45}", + "type": "color", + "description": "grey45" + }, + "textSecondaryInverse": { + "value": "{palette.grey45}", + "type": "color", + "description": "grey45" + }, + "success": { + "value": "{palette.o2Green}", + "type": "color", + "description": "o2Green" + }, + "warning": { + "value": "{palette.o2Orange}", + "type": "color", + "description": "o2Orange" + }, + "error": { + "value": "{palette.o2Red45}", + "type": "color", + "description": "o2Red45" + }, + "textError": { + "value": "{palette.o2Red45}", + "type": "color", + "description": "o2Red45" + }, + "textErrorInverse": { + "value": "{palette.o2Red45}", + "type": "color", + "description": "o2Red45" + }, + "promo": { + "value": "{palette.o2Pink}", + "type": "color", + "description": "o2Pink" + }, + "highlight": { + "value": "{palette.o2Pink}", + "type": "color", + "description": "o2Pink" + }, + "successLow": { + "value": "{palette.darkModeGrey6}", + "type": "color", + "description": "darkModeGrey6" + }, + "warningLow": { + "value": "{palette.darkModeGrey6}", + "type": "color", + "description": "darkModeGrey6" + }, + "errorLow": { + "value": "{palette.darkModeGrey6}", + "type": "color", + "description": "darkModeGrey6" + }, + "promoLow": { + "value": "{palette.darkModeGrey6}", + "type": "color", + "description": "darkModeGrey6" + }, + "brandLow": { + "value": "{palette.darkModeGrey6}", + "type": "color", + "description": "darkModeGrey6" + }, + "successHigh": { + "value": "{palette.o2Green40}", + "type": "color", + "description": "o2Green40" + }, + "warningHigh": { + "value": "{palette.o2Orange40}", + "type": "color", + "description": "o2Orange40" + }, + "errorHigh": { + "value": "{palette.o2Red40}", + "type": "color", + "description": "o2Red40" + }, + "promoHigh": { + "value": "{palette.o2Pink30}", + "type": "color", + "description": "o2Pink30" + }, + "successHighInverse": { + "value": "{palette.o2Green80}", + "type": "color", + "description": "o2Green80" + }, + "warningHighInverse": { + "value": "{palette.o2Orange75}", + "type": "color", + "description": "o2Orange75" + }, + "errorHighInverse": { + "value": "{palette.o2Red65}", + "type": "color", + "description": "o2Red65" + }, + "promoHighInverse": { + "value": "{palette.o2Pink}", + "type": "color", + "description": "o2Pink" + }, + "textNavigationBarPrimary": { + "value": "{palette.grey30}", + "type": "color", + "description": "grey30" + }, + "textNavigationBarSecondary": { + "value": "{palette.grey45}", + "type": "color", + "description": "grey45" + }, + "textNavigationSearchBarHint": { + "value": "{palette.grey45}", + "type": "color", + "description": "grey45" + }, + "textNavigationSearchBarText": { + "value": "{palette.grey30}", + "type": "color", + "description": "grey30" + }, + "textAppBar": { + "value": "{palette.grey45}", + "type": "color", + "description": "grey45" + }, + "textAppBarSelected": { + "value": "{palette.beyondBlue40}", + "type": "color", + "description": "beyondBlue40" + }, + "customTabsBackground": { + "value": "{palette.darkModeBlack}", + "type": "color", + "description": "darkModeBlack" + }, + "tagTextPromo": { + "value": "{palette.o2Pink}", + "type": "color", + "description": "o2Pink" + }, + "tagTextActive": { + "value": "{palette.beyondBlue30}", + "type": "color", + "description": "beyondBlue30" + }, + "tagTextInactive": { + "value": "{palette.grey40}", + "type": "color", + "description": "grey40" + }, + "tagTextSuccess": { + "value": "{palette.o2Green}", + "type": "color", + "description": "o2Green" + }, + "tagTextWarning": { + "value": "{palette.o2Orange}", + "type": "color", + "description": "o2Orange" + }, + "tagTextError": { + "value": "{palette.o2Red45}", + "type": "color", + "description": "o2Red45" + }, + "tagBackgroundPromo": { + "value": "{palette.darkModeGrey6}", + "type": "color", + "description": "darkModeGrey6" + }, + "tagBackgroundActive": { + "value": "{palette.darkModeGrey6}", + "type": "color", + "description": "darkModeGrey6" + }, + "tagBackgroundInactive": { + "value": "{palette.darkModeGrey6}", + "type": "color", + "description": "darkModeGrey6" + }, + "tagBackgroundSuccess": { + "value": "{palette.darkModeGrey6}", + "type": "color", + "description": "darkModeGrey6" + }, + "tagBackgroundWarning": { + "value": "{palette.darkModeGrey6}", + "type": "color", + "description": "darkModeGrey6" + }, + "tagBackgroundError": { + "value": "{palette.darkModeGrey6}", + "type": "color", + "description": "darkModeGrey6" + }, + "cardContentOverlay": { + "type": "linear-gradient", + "value": { + "angle": 180, + "colors": [ + { "value": "rgba({palette.black}, 0)", "stop": 0 }, + { "value": "rgba({palette.black}, 0.4)", "stop": 0.3 }, + { "value": "rgba({palette.black}, 0.7)", "stop": 1 } + ] + }, + "description": "grey6" + } + }, + "radius": { + "avatar": { "value": "circle", "type": "borderRadius" }, + "bar": { "value": "999", "type": "borderRadius" }, + "button": { "value": "999", "type": "borderRadius" }, + "checkbox": { "value": "2", "type": "borderRadius" }, + "container": { "value": "16", "type": "borderRadius" }, + "indicator": { "value": "999", "type": "borderRadius" }, + "input": { "value": "12", "type": "borderRadius" }, + "legacyDisplay": { "value": "16", "type": "borderRadius" }, + "popup": { "value": "8", "type": "borderRadius" }, + "sheet": { "value": "16", "type": "borderRadius" }, + "mediaSmall": { "value": "8", "type": "borderRadius" } + }, + "text": { + "weight": { + "cardTitle": { "value": "medium", "type": "typography" }, + "button": { "value": "medium", "type": "typography" }, + "tabsLabel": { "value": "medium", "type": "typography" }, + "link": { "value": "medium", "type": "typography" }, + "title1": { "value": "medium", "type": "typography" }, + "title2": { "value": "bold", "type": "typography" }, + "indicator": { "value": "medium", "type": "typography" }, + "navigationBar": { "value": "medium", "type": "typography" }, + "text5": { "value": "bold", "type": "typography" }, + "text6": { "value": "bold", "type": "typography" }, + "text7": { "value": "bold", "type": "typography" }, + "text8": { "value": "bold", "type": "typography" }, + "text9": { "value": "bold", "type": "typography" }, + "text10": { "value": "bold", "type": "typography" } + }, + "size": { + "tabsLabel": { + "value": { "mobile": 16, "desktop": 18 }, + "type": "typography" + }, + "title2": { + "value": { "mobile": 20, "desktop": 28 }, + "type": "typography" + } + }, + "lineHeight": { + "tabsLabel": { + "value": { "mobile": 24, "desktop": 24 }, + "type": "typography" + }, + "title2": { + "value": { "mobile": 24, "desktop": 32 }, + "type": "typography" + } + } + }, + "themeVariant": { + "successFeedback": { "value": "inverse", "type": "themeVariant" }, + "brandLoadingScreen": { "value": "inverse", "type": "themeVariant" } + }, + "global": { + "palette": { + "beyondBlue": { "value": "#0050FF", "type": "color" }, + "beyondBlue10": { "value": "#E5EDFF", "type": "color" }, + "beyondBlue15": { "value": "#CCDCFF", "type": "color" }, + "beyondBlue30": { "value": "#80A7FF", "type": "color" }, + "beyondBlue40": { "value": "#4D84FF", "type": "color" }, + "beyondBlue45": { "value": "#0A73EB", "type": "color" }, + "beyondBlue55": { "value": "#0044D9", "type": "color" }, + "beyondBlue70": { "value": "#0038B2", "type": "color" }, + "beyondBlue90": { "value": "#001033", "type": "color" }, + "darkBlue": { "value": "#00008C", "type": "color" }, + "o2BlueLight": { "value": "#82DCFA", "type": "color" }, + "o2BlueLight30": { "value": "#C0EEFD", "type": "color" }, + "o2BlueLight35": { "value": "#B4EAFC", "type": "color" }, + "o2Green": { "value": "#00DC7D", "type": "color" }, + "o2Green10": { "value": "#E5FBF2", "type": "color" }, + "o2Green40": { "value": "#4CE7A4", "type": "color" }, + "o2Green80": { "value": "#006338", "type": "color" }, + "o2Yellow": { "value": "#FADC00", "type": "color" }, + "o2Orange": { "value": "#FFA55A", "type": "color" }, + "o2Orange10": { "value": "#FFF6EE", "type": "color" }, + "o2Orange40": { "value": "#FFC08B", "type": "color" }, + "o2Orange75": { "value": "#996336", "type": "color" }, + "o2Pink": { "value": "#FA96FF", "type": "color" }, + "o2Pink15": { "value": "#FEEAFF", "type": "color" }, + "o2Pink30": { "value": "#FDCAFF", "type": "color" }, + "o2Pink80": { "value": "#704373", "type": "color" }, + "o2Red": { "value": "#FF5A5A", "type": "color" }, + "o2Red10": { "value": "#FFEEEE", "type": "color" }, + "o2Red20": { "value": "#FFCDCD", "type": "color" }, + "o2Red40": { "value": "#FF8B8B", "type": "color" }, + "o2Red45": { "value": "#FF7B7B", "type": "color" }, + "o2Red60": { "value": "#CC4848", "type": "color" }, + "o2Red65": { "value": "#BF4444", "type": "color" }, + "grey20": { "value": "#F3F3F5", "type": "color" }, + "grey30": { "value": "#D9D9DD", "type": "color" }, + "grey40": { "value": "#B4B4BE", "type": "color" }, + "grey45": { "value": "#8C8C9A", "type": "color" }, + "grey60": { "value": "#6E6E77", "type": "color" }, + "grey80": { "value": "#3C3C46", "type": "color" }, + "black": { "value": "#00001E", "type": "color" }, + "white": { "value": "#FFFFFF", "type": "color" }, + "darkModeBlack": { "value": "#00001C", "type": "color" }, + "darkModeGrey": { "value": "#08132B", "type": "color" }, + "darkModeGrey6": { "value": "#14213D", "type": "color" }, + "darkModeBeyondBlue": { "value": "#1A62FF", "type": "color" } + } + } +} diff --git a/scripts/mistica-importer/generators/colors/__tests__/brand2-tokens.json b/scripts/mistica-importer/generators/colors/__tests__/brand2-tokens.json new file mode 100644 index 00000000..cd162b92 --- /dev/null +++ b/scripts/mistica-importer/generators/colors/__tests__/brand2-tokens.json @@ -0,0 +1,1630 @@ +{ + "light": { + "background": { + "value": "{palette.white}", + "type": "color", + "description": "white" + }, + "backgroundAlternative": { + "value": "{palette.grey1}", + "type": "color", + "description": "grey1" + }, + "backgroundBrand": { + "value": "{palette.vivoPurple}", + "type": "color", + "description": "vivoPurple" + }, + "backgroundBrandSecondary": { + "value": "{palette.vivoPurple}", + "type": "color", + "description": "vivoPurple" + }, + "backgroundContainer": { + "value": "{palette.white}", + "type": "color", + "description": "white" + }, + "backgroundContainerError": { + "value": "{palette.pepperLight10}", + "type": "color", + "description": "pepperLight10" + }, + "backgroundContainerHover": { + "value": "rgba({palette.darkModeBlack}, 0.03)", + "type": "color", + "description": "darkModeBlack" + }, + "backgroundContainerPressed": { + "value": "rgba({palette.darkModeBlack}, 0.05)", + "type": "color", + "description": "darkModeBlack" + }, + "backgroundContainerBrand": { + "value": "{palette.vivoPurple}", + "type": "color", + "description": "vivoPurple" + }, + "backgroundContainerBrandHover": { + "value": "rgba({palette.darkModeBlack}, 0.2)", + "type": "color", + "description": "darkModeBlack" + }, + "backgroundContainerBrandPressed": { + "value": "rgba({palette.darkModeBlack}, 0.4)", + "type": "color", + "description": "darkModeBlack" + }, + "backgroundContainerBrandOverInverse": { + "value": "{palette.vivoPurpleDark}", + "type": "color", + "description": "vivoPurpleDark" + }, + "backgroundContainerAlternative": { + "value": "{palette.grey1}", + "type": "color", + "description": "grey1" + }, + "backgroundOverlay": { + "value": "rgba({palette.grey6}, 0.6)", + "type": "color", + "description": "grey6" + }, + "backgroundSkeleton": { + "value": "{palette.grey2}", + "type": "color", + "description": "grey2" + }, + "backgroundSkeletonInverse": { + "value": "{palette.vivoPurpleDark}", + "type": "color", + "description": "vivoPurpleDark" + }, + "backgroundBrandTop": { + "value": "{palette.vivoPurple}", + "type": "color", + "description": "vivoPurple" + }, + "backgroundBrandBottom": { + "value": "{palette.vivoPurple}", + "type": "color", + "description": "vivoPurple" + }, + "appBarBackground": { + "value": "{palette.white}", + "type": "color", + "description": "white" + }, + "navigationBarBackground": { + "value": "{palette.vivoPurple}", + "type": "color", + "description": "vivoPurple" + }, + "skeletonWave": { + "value": "{palette.grey2}", + "type": "color", + "description": "grey2" + }, + "borderLow": { + "value": "{palette.grey1}", + "type": "color", + "description": "grey1" + }, + "border": { + "value": "{palette.grey3}", + "type": "color", + "description": "grey3" + }, + "borderHigh": { + "value": "{palette.grey5}", + "type": "color", + "description": "grey5" + }, + "borderSelected": { + "value": "{palette.vivoPurple}", + "type": "color", + "description": "vivoPurple" + }, + "coverBackgroundHover": { + "value": "rgba({palette.darkModeBlack}, 0.25)", + "type": "color", + "description": "darkModeBlack" + }, + "coverBackgroundPressed": { + "value": "rgba({palette.darkModeBlack}, 0.35)", + "type": "color", + "description": "darkModeBlack" + }, + "buttonDangerBackground": { + "value": "{palette.pepper}", + "type": "color", + "description": "pepper" + }, + "buttonDangerBackgroundSelected": { + "value": "{palette.pepperDark}", + "type": "color", + "description": "pepperDark" + }, + "buttonDangerBackgroundHover": { + "value": "{palette.pepperDark}", + "type": "color", + "description": "pepperDark" + }, + "buttonLinkDangerBackgroundSelected": { + "value": "{palette.pepperLight10}", + "type": "color", + "description": "pepperLight10" + }, + "buttonLinkDangerBackgroundInverse": { + "value": "{palette.white}", + "type": "color", + "description": "white" + }, + "buttonLinkDangerBackgroundInverseSelected": { + "value": "{palette.pepperLight10}", + "type": "color", + "description": "pepperLight10" + }, + "buttonLinkBackgroundSelected": { + "value": "{palette.vivoPurpleLight10}", + "type": "color", + "description": "vivoPurpleLight10" + }, + "buttonLinkBackgroundInverseSelected": { + "value": "rgba({palette.white}, 0.1)", + "type": "color", + "description": "white" + }, + "buttonPrimaryBackground": { + "value": "{palette.vivoPurple}", + "type": "color", + "description": "vivoPurple" + }, + "buttonPrimaryBackgroundInverse": { + "value": "{palette.white}", + "type": "color", + "description": "white" + }, + "buttonPrimaryBackgroundSelected": { + "value": "{palette.vivoPurpleDark}", + "type": "color", + "description": "vivoPurpleDark" + }, + "buttonPrimaryBackgroundHover": { + "value": "{palette.vivoPurpleDark}", + "type": "color", + "description": "vivoPurpleDark" + }, + "buttonPrimaryBackgroundInverseSelected": { + "value": "{palette.vivoPurpleLight50}", + "type": "color", + "description": "vivoPurpleLight50" + }, + "buttonSecondaryBorder": { + "value": "{palette.vivoPurple}", + "type": "color", + "description": "vivoPurple" + }, + "buttonSecondaryBorderSelected": { + "value": "{palette.vivoPurpleDark}", + "type": "color", + "description": "vivoPurpleDark" + }, + "buttonSecondaryBackgroundHover": { + "value": "{palette.vivoPurpleLight10}", + "type": "color", + "description": "vivoPurpleLight10" + }, + "buttonSecondaryBackgroundSelected": { + "value": "{palette.vivoPurpleLight10}", + "type": "color", + "description": "vivoPurpleLight10" + }, + "buttonSecondaryBorderInverse": { + "value": "{palette.white}", + "type": "color", + "description": "white" + }, + "buttonSecondaryBorderInverseSelected": { + "value": "{palette.white}", + "type": "color", + "description": "white" + }, + "buttonSecondaryBackgroundInverseHover": { + "value": "rgba({palette.white}, 0.15)", + "type": "color", + "description": "white" + }, + "buttonSecondaryBackgroundInverseSelected": { + "value": "rgba({palette.white}, 0.15)", + "type": "color", + "description": "white" + }, + "textButtonPrimary": { + "value": "{palette.white}", + "type": "color", + "description": "white" + }, + "textButtonPrimaryInverse": { + "value": "{palette.vivoPurple}", + "type": "color", + "description": "vivoPurple" + }, + "textButtonPrimaryInverseSelected": { + "value": "{palette.vivoPurple}", + "type": "color", + "description": "vivoPurple" + }, + "textButtonSecondary": { + "value": "{palette.vivoPurple}", + "type": "color", + "description": "vivoPurple" + }, + "textButtonSecondarySelected": { + "value": "{palette.vivoPurpleDark}", + "type": "color", + "description": "vivoPurpleDark" + }, + "textButtonSecondaryInverse": { + "value": "{palette.white}", + "type": "color", + "description": "white" + }, + "textButtonSecondaryInverseSelected": { + "value": "{palette.white}", + "type": "color", + "description": "white" + }, + "textLink": { + "value": "{palette.vivoPurple}", + "type": "color", + "description": "vivoPurple" + }, + "textLinkInverse": { + "value": "{palette.white}", + "type": "color", + "description": "white" + }, + "textLinkDanger": { + "value": "{palette.pepper}", + "type": "color", + "description": "pepper" + }, + "textLinkSnackbar": { + "value": "{palette.vivoPurpleLight50}", + "type": "color", + "description": "vivoPurpleLight50" + }, + "textActivated": { + "value": "{palette.vivoPurple}", + "type": "color", + "description": "vivoPurple" + }, + "textBrand": { + "value": "{palette.vivoPurple}", + "type": "color", + "description": "vivoPurple" + }, + "control": { + "value": "{palette.grey3}", + "type": "color", + "description": "grey3" + }, + "controlActivated": { + "value": "{palette.vivoPurple}", + "type": "color", + "description": "vivoPurple" + }, + "controlInverse": { + "value": "{palette.vivoPurpleLight50}", + "type": "color", + "description": "vivoPurpleLight50" + }, + "controlActivatedInverse": { + "value": "{palette.white}", + "type": "color", + "description": "white" + }, + "controlError": { + "value": "{palette.pepper}", + "type": "color", + "description": "pepper" + }, + "barTrack": { + "value": "{palette.grey3}", + "type": "color", + "description": "grey3" + }, + "loadingBar": { + "value": "{palette.pink}", + "type": "color", + "description": "pink" + }, + "loadingBarBackground": { + "value": "{palette.pepperLight30}", + "type": "color", + "description": "pepperLight30" + }, + "toggleAndroidInactive": { + "value": "{palette.grey2}", + "type": "color", + "description": "grey2" + }, + "toggleAndroidBackgroundActive": { + "value": "{palette.vivoPurpleLight20}", + "type": "color", + "description": "vivoPurpleLight20" + }, + "iosControlKnob": { + "value": "{palette.white}", + "type": "color", + "description": "white" + }, + "divider": { + "value": "{palette.grey2}", + "type": "color", + "description": "grey2" + }, + "dividerInverse": { + "value": "rgba({palette.white}, 0.2)", + "type": "color", + "description": "white" + }, + "navigationBarDivider": { + "value": "{palette.vivoPurple}", + "type": "color", + "description": "vivoPurple" + }, + "badge": { + "value": "{palette.pepperDark}", + "type": "color", + "description": "pepperDark" + }, + "feedbackErrorBackground": { + "value": "{palette.pepper}", + "type": "color", + "description": "pepper" + }, + "feedbackInfoBackground": { + "value": "{palette.grey6}", + "type": "color", + "description": "grey6" + }, + "brand": { + "value": "{palette.vivoPurple}", + "type": "color", + "description": "vivoPurple" + }, + "brandHigh": { + "value": "{palette.vivoPurpleDark}", + "type": "color", + "description": "vivoPurpleDark" + }, + "inverse": { + "value": "{palette.white}", + "type": "color", + "description": "white" + }, + "neutralHigh": { + "value": "{palette.grey6}", + "type": "color", + "description": "grey6" + }, + "neutralMedium": { + "value": "{palette.grey5}", + "type": "color", + "description": "grey5" + }, + "neutralMediumInverse": { + "value": "{palette.grey5}", + "type": "color", + "description": "grey5" + }, + "neutralLow": { + "value": "{palette.grey1}", + "type": "color", + "description": "grey1" + }, + "neutralLowAlternative": { + "value": "{palette.grey2}", + "type": "color", + "description": "grey2" + }, + "textPrimary": { + "value": "{palette.grey6}", + "type": "color", + "description": "grey6" + }, + "textPrimaryInverse": { + "value": "{palette.white}", + "type": "color", + "description": "white" + }, + "textSecondary": { + "value": "{palette.grey5}", + "type": "color", + "description": "grey5" + }, + "textSecondaryInverse": { + "value": "{palette.vivoPurpleLight20}", + "type": "color", + "description": "vivoPurpleLight20" + }, + "success": { + "value": "{palette.vivoGreen}", + "type": "color", + "description": "vivoGreen" + }, + "warning": { + "value": "{palette.orange}", + "type": "color", + "description": "orange" + }, + "error": { + "value": "{palette.pepper}", + "type": "color", + "description": "pepper" + }, + "textError": { + "value": "{palette.pepper}", + "type": "color", + "description": "pepper" + }, + "textErrorInverse": { + "value": "{palette.white}", + "type": "color", + "description": "white" + }, + "promo": { + "value": "{palette.vivoPurple}", + "type": "color", + "description": "vivoPurple" + }, + "highlight": { + "value": "{palette.pink}", + "type": "color", + "description": "pink" + }, + "successLow": { + "value": "{palette.vivoGreenLight10}", + "type": "color", + "description": "vivoGreenLight10" + }, + "warningLow": { + "value": "{palette.orangeLight10}", + "type": "color", + "description": "orangeLight10" + }, + "errorLow": { + "value": "{palette.pepperLight10}", + "type": "color", + "description": "pepperLight10" + }, + "promoLow": { + "value": "{palette.vivoPurpleLight10}", + "type": "color", + "description": "vivoPurpleLight10" + }, + "brandLow": { + "value": "{palette.vivoPurpleLight10}", + "type": "color", + "description": "vivoPurpleLight10" + }, + "successHigh": { + "value": "{palette.vivoGreenDark}", + "type": "color", + "description": "vivoGreenDark" + }, + "warningHigh": { + "value": "{palette.orangeDark}", + "type": "color", + "description": "orangeDark" + }, + "errorHigh": { + "value": "{palette.pepperDark80}", + "type": "color", + "description": "pepperDark80" + }, + "promoHigh": { + "value": "{palette.vivoPurple}", + "type": "color", + "description": "vivoPurple" + }, + "successHighInverse": { + "value": "{palette.vivoGreenDark}", + "type": "color", + "description": "vivoGreenDark" + }, + "warningHighInverse": { + "value": "{palette.orangeDark}", + "type": "color", + "description": "orangeDark" + }, + "errorHighInverse": { + "value": "{palette.pepperDark80}", + "type": "color", + "description": "pepperDark80" + }, + "promoHighInverse": { + "value": "{palette.vivoPurple}", + "type": "color", + "description": "vivoPurple" + }, + "textNavigationBarPrimary": { + "value": "{palette.white}", + "type": "color", + "description": "white" + }, + "textNavigationBarSecondary": { + "value": "{palette.vivoPurpleLight50}", + "type": "color", + "description": "vivoPurpleLight50" + }, + "textNavigationSearchBarHint": { + "value": "{palette.vivoPurpleLight50}", + "type": "color", + "description": "vivoPurpleLight50" + }, + "textNavigationSearchBarText": { + "value": "{palette.white}", + "type": "color", + "description": "white" + }, + "textAppBar": { + "value": "{palette.grey4}", + "type": "color", + "description": "grey4" + }, + "textAppBarSelected": { + "value": "{palette.vivoPurple}", + "type": "color", + "description": "vivoPurple" + }, + "customTabsBackground": { + "value": "{palette.vivoPurple}", + "type": "color", + "description": "vivoPurple" + }, + "tagTextPromo": { + "value": "{palette.vivoPurple}", + "type": "color", + "description": "vivoPurple" + }, + "tagTextActive": { + "value": "{palette.vivoPurple}", + "type": "color", + "description": "vivoPurple" + }, + "tagTextInactive": { + "value": "{palette.grey5}", + "type": "color", + "description": "grey5" + }, + "tagTextSuccess": { + "value": "{palette.vivoGreenDark}", + "type": "color", + "description": "vivoGreenDark" + }, + "tagTextWarning": { + "value": "{palette.orangeDark}", + "type": "color", + "description": "orangeDark" + }, + "tagTextError": { + "value": "{palette.pepperDark80}", + "type": "color", + "description": "pepperDark80" + }, + "tagBackgroundPromo": { + "value": "{palette.vivoPurpleLight10}", + "type": "color", + "description": "vivoPurpleLight10" + }, + "tagBackgroundActive": { + "value": "{palette.vivoPurpleLight10}", + "type": "color", + "description": "vivoPurpleLight10" + }, + "tagBackgroundInactive": { + "value": "{palette.grey1}", + "type": "color", + "description": "grey1" + }, + "tagBackgroundSuccess": { + "value": "{palette.vivoGreenLight10}", + "type": "color", + "description": "vivoGreenLight10" + }, + "tagBackgroundWarning": { + "value": "{palette.orangeLight10}", + "type": "color", + "description": "orangeLight10" + }, + "tagBackgroundError": { + "value": "{palette.pepperLight10}", + "type": "color", + "description": "pepperLight10" + }, + "cardContentOverlay": { + "type": "linear-gradient", + "value": { + "angle": 180, + "colors": [ + { + "value": "rgba({palette.grey6}, 0)", + "stop": 0 + }, + { + "value": "rgba({palette.grey6}, 0.4)", + "stop": 0.3 + }, + { + "value": "rgba({palette.grey6}, 0.7)", + "stop": 1 + } + ] + }, + "description": "grey6" + } + }, + "dark": { + "background": { + "value": "{palette.darkModeBlack}", + "type": "color", + "description": "darkModeBlack" + }, + "backgroundAlternative": { + "value": "{palette.darkModeBlack}", + "type": "color", + "description": "darkModeBlack" + }, + "backgroundBrand": { + "value": "{palette.darkModeBlack}", + "type": "color", + "description": "darkModeBlack" + }, + "backgroundBrandSecondary": { + "value": "{palette.darkModeBlack}", + "type": "color", + "description": "darkModeBlack" + }, + "backgroundContainer": { + "value": "{palette.darkModeGrey}", + "type": "color", + "description": "darkModeGrey" + }, + "backgroundContainerError": { + "value": "{palette.darkModeGrey}", + "type": "color", + "description": "darkModeGrey" + }, + "backgroundContainerHover": { + "value": "rgba({palette.white}, 0.03)", + "type": "color", + "description": "white" + }, + "backgroundContainerPressed": { + "value": "rgba({palette.white}, 0.05)", + "type": "color", + "description": "white" + }, + "backgroundContainerBrand": { + "value": "{palette.darkModeGrey}", + "type": "color", + "description": "darkModeGrey" + }, + "backgroundContainerBrandHover": { + "value": "rgba({palette.white}, 0.03)", + "type": "color", + "description": "white" + }, + "backgroundContainerBrandPressed": { + "value": "rgba({palette.white}, 0.05)", + "type": "color", + "description": "white" + }, + "backgroundContainerBrandOverInverse": { + "value": "{palette.darkModeGrey}", + "type": "color", + "description": "darkModeGrey" + }, + "backgroundContainerAlternative": { + "value": "{palette.darkModeGrey}", + "type": "color", + "description": "darkModeGrey" + }, + "backgroundOverlay": { + "value": "rgba({palette.darkModeGrey}, 0.8)", + "type": "color", + "description": "darkModeGrey" + }, + "backgroundSkeleton": { + "value": "{palette.darkModeGrey6}", + "type": "color", + "description": "darkModeGrey6" + }, + "backgroundSkeletonInverse": { + "value": "{palette.darkModeGrey6}", + "type": "color", + "description": "darkModeGrey6" + }, + "backgroundBrandTop": { + "value": "{palette.darkModeBlack}", + "type": "color", + "description": "darkModeBlack" + }, + "backgroundBrandBottom": { + "value": "{palette.darkModeBlack}", + "type": "color", + "description": "darkModeBlack" + }, + "appBarBackground": { + "value": "{palette.darkModeGrey}", + "type": "color", + "description": "darkModeGrey" + }, + "navigationBarBackground": { + "value": "{palette.darkModeBlack}", + "type": "color", + "description": "darkModeBlack" + }, + "skeletonWave": { + "value": "{palette.grey5}", + "type": "color", + "description": "grey5" + }, + "borderLow": { + "value": "{palette.darkModeBlack}", + "type": "color", + "description": "darkModeBlack" + }, + "border": { + "value": "{palette.darkModeGrey}", + "type": "color", + "description": "darkModeGrey" + }, + "borderHigh": { + "value": "{palette.grey5}", + "type": "color", + "description": "grey5" + }, + "borderSelected": { + "value": "{palette.vivoPurple}", + "type": "color", + "description": "vivoPurple" + }, + "coverBackgroundHover": { + "value": "rgba({palette.darkModeBlack}, 0.25)", + "type": "color", + "description": "darkModeBlack" + }, + "coverBackgroundPressed": { + "value": "rgba({palette.darkModeBlack}, 0.35)", + "type": "color", + "description": "darkModeBlack" + }, + "buttonDangerBackground": { + "value": "{palette.pepper}", + "type": "color", + "description": "pepper" + }, + "buttonDangerBackgroundSelected": { + "value": "{palette.pepperDark}", + "type": "color", + "description": "pepperDark" + }, + "buttonDangerBackgroundHover": { + "value": "{palette.pepperDark}", + "type": "color", + "description": "pepperDark" + }, + "buttonLinkDangerBackgroundSelected": { + "value": "rgba({palette.white}, 0.08)", + "type": "color", + "description": "white" + }, + "buttonLinkDangerBackgroundInverse": { + "value": "rgba({palette.white}, 0)", + "type": "color", + "description": "white" + }, + "buttonLinkDangerBackgroundInverseSelected": { + "value": "rgba({palette.white}, 0.08)", + "type": "color", + "description": "white" + }, + "buttonLinkBackgroundSelected": { + "value": "rgba({palette.white}, 0.08)", + "type": "color", + "description": "white" + }, + "buttonLinkBackgroundInverseSelected": { + "value": "rgba({palette.white}, 0.08)", + "type": "color", + "description": "white" + }, + "buttonPrimaryBackground": { + "value": "{palette.vivoPurpleLight80}", + "type": "color", + "description": "vivoPurpleLight80" + }, + "buttonPrimaryBackgroundInverse": { + "value": "{palette.vivoPurpleLight80}", + "type": "color", + "description": "vivoPurpleLight80" + }, + "buttonPrimaryBackgroundSelected": { + "value": "{palette.vivoPurpleDark}", + "type": "color", + "description": "vivoPurpleDark" + }, + "buttonPrimaryBackgroundHover": { + "value": "{palette.vivoPurpleDark}", + "type": "color", + "description": "vivoPurpleDark" + }, + "buttonPrimaryBackgroundInverseSelected": { + "value": "{palette.vivoPurpleDark}", + "type": "color", + "description": "vivoPurpleDark" + }, + "buttonSecondaryBackgroundHover": { + "value": "rgba({palette.white}, 0.15)", + "type": "color", + "description": "white" + }, + "buttonSecondaryBackgroundSelected": { + "value": "rgba({palette.white}, 0.15)", + "type": "color", + "description": "white" + }, + "buttonSecondaryBorder": { + "value": "{palette.white}", + "type": "color", + "description": "white" + }, + "buttonSecondaryBorderSelected": { + "value": "{palette.white}", + "type": "color", + "description": "white" + }, + "buttonSecondaryBorderInverse": { + "value": "{palette.white}", + "type": "color", + "description": "white" + }, + "buttonSecondaryBorderInverseSelected": { + "value": "{palette.white}", + "type": "color", + "description": "white" + }, + "buttonSecondaryBackgroundInverseHover": { + "value": "rgba({palette.white}, 0.15)", + "type": "color", + "description": "white" + }, + "buttonSecondaryBackgroundInverseSelected": { + "value": "rgba({palette.white}, 0.15)", + "type": "color", + "description": "white" + }, + "textButtonPrimary": { + "value": "{palette.grey2}", + "type": "color", + "description": "grey2" + }, + "textButtonPrimaryInverse": { + "value": "{palette.grey2}", + "type": "color", + "description": "grey2" + }, + "textButtonPrimaryInverseSelected": { + "value": "{palette.grey2}", + "type": "color", + "description": "grey2" + }, + "textButtonSecondary": { + "value": "{palette.grey2}", + "type": "color", + "description": "grey2" + }, + "textButtonSecondarySelected": { + "value": "{palette.grey2}", + "type": "color", + "description": "grey2" + }, + "textButtonSecondaryInverse": { + "value": "{palette.grey2}", + "type": "color", + "description": "grey2" + }, + "textButtonSecondaryInverseSelected": { + "value": "{palette.grey2}", + "type": "color", + "description": "grey2" + }, + "textLink": { + "value": "{palette.vivoPurpleLight50}", + "type": "color", + "description": "vivoPurpleLight50" + }, + "textLinkInverse": { + "value": "{palette.vivoPurpleLight50}", + "type": "color", + "description": "vivoPurpleLight50" + }, + "textLinkDanger": { + "value": "{palette.pepper}", + "type": "color", + "description": "pepper" + }, + "textLinkSnackbar": { + "value": "{palette.vivoPurpleLight50}", + "type": "color", + "description": "vivoPurpleLight50" + }, + "textActivated": { + "value": "{palette.vivoPurpleLight80}", + "type": "color", + "description": "vivoPurpleLight80" + }, + "textBrand": { + "value": "{palette.vivoPurpleLight80}", + "type": "color", + "description": "vivoPurpleLight80" + }, + "control": { + "value": "{palette.darkModeGrey6}", + "type": "color", + "description": "darkModeGrey6" + }, + "controlActivated": { + "value": "{palette.vivoPurpleLight80}", + "type": "color", + "description": "vivoPurpleLight80" + }, + "controlInverse": { + "value": "{palette.darkModeGrey6}", + "type": "color", + "description": "darkModeGrey6" + }, + "controlActivatedInverse": { + "value": "{palette.vivoPurpleLight80}", + "type": "color", + "description": "vivoPurpleLight80" + }, + "controlError": { + "value": "{palette.pepper}", + "type": "color", + "description": "pepper" + }, + "barTrack": { + "value": "{palette.darkModeGrey6}", + "type": "color", + "description": "darkModeGrey6" + }, + "loadingBar": { + "value": "{palette.vivoPurpleLight80}", + "type": "color", + "description": "vivoPurpleLight80" + }, + "loadingBarBackground": { + "value": "{palette.darkModeGrey6}", + "type": "color", + "description": "darkModeGrey6" + }, + "toggleAndroidInactive": { + "value": "{palette.grey4}", + "type": "color", + "description": "grey4" + }, + "toggleAndroidBackgroundActive": { + "value": "{palette.vivoPurpleLight50}", + "type": "color", + "description": "vivoPurpleLight50" + }, + "iosControlKnob": { + "value": "{palette.grey2}", + "type": "color", + "description": "grey2" + }, + "divider": { + "value": "rgba({palette.white}, 0.05)", + "type": "color", + "description": "white" + }, + "dividerInverse": { + "value": "rgba({palette.white}, 0.05)", + "type": "color", + "description": "white" + }, + "navigationBarDivider": { + "value": "{palette.darkModeBlack}", + "type": "color", + "description": "darkModeBlack" + }, + "badge": { + "value": "{palette.pepperDark}", + "type": "color", + "description": "pepperDark" + }, + "feedbackErrorBackground": { + "value": "{palette.pepper}", + "type": "color", + "description": "pepper" + }, + "feedbackInfoBackground": { + "value": "{palette.grey6}", + "type": "color", + "description": "grey6" + }, + "brand": { + "value": "{palette.vivoPurpleLight80}", + "type": "color", + "description": "vivoPurpleLight80" + }, + "brandHigh": { + "value": "rgba({palette.white}, 0.05)", + "type": "color", + "description": "white" + }, + "inverse": { + "value": "{palette.grey2}", + "type": "color", + "description": "grey2" + }, + "neutralHigh": { + "value": "{palette.grey2}", + "type": "color", + "description": "grey2" + }, + "neutralMedium": { + "value": "{palette.grey5}", + "type": "color", + "description": "grey5" + }, + "neutralMediumInverse": { + "value": "{palette.grey5}", + "type": "color", + "description": "grey5" + }, + "neutralLow": { + "value": "{palette.darkModeGrey6}", + "type": "color", + "description": "darkModeGrey6" + }, + "neutralLowAlternative": { + "value": "{palette.darkModeGrey6}", + "type": "color", + "description": "darkModeGrey6" + }, + "textPrimary": { + "value": "{palette.grey2}", + "type": "color", + "description": "grey2" + }, + "textPrimaryInverse": { + "value": "{palette.grey2}", + "type": "color", + "description": "grey2" + }, + "textSecondary": { + "value": "{palette.grey4}", + "type": "color", + "description": "grey4" + }, + "textSecondaryInverse": { + "value": "{palette.grey4}", + "type": "color", + "description": "grey4" + }, + "success": { + "value": "{palette.vivoGreen}", + "type": "color", + "description": "vivoGreen" + }, + "warning": { + "value": "{palette.orange}", + "type": "color", + "description": "orange" + }, + "error": { + "value": "{palette.pepper}", + "type": "color", + "description": "pepper" + }, + "textError": { + "value": "{palette.pepper}", + "type": "color", + "description": "pepper" + }, + "textErrorInverse": { + "value": "{palette.pepper}", + "type": "color", + "description": "pepper" + }, + "promo": { + "value": "{palette.vivoPurpleLight80}", + "type": "color", + "description": "vivoPurpleLight80" + }, + "highlight": { + "value": "{palette.pink}", + "type": "color", + "description": "pink" + }, + "successLow": { + "value": "{palette.darkModeGrey6}", + "type": "color", + "description": "darkModeGrey6" + }, + "warningLow": { + "value": "{palette.darkModeGrey6}", + "type": "color", + "description": "darkModeGrey6" + }, + "errorLow": { + "value": "{palette.darkModeGrey6}", + "type": "color", + "description": "darkModeGrey6" + }, + "promoLow": { + "value": "{palette.darkModeGrey6}", + "type": "color", + "description": "darkModeGrey6" + }, + "brandLow": { + "value": "{palette.darkModeGrey6}", + "type": "color", + "description": "darkModeGrey6" + }, + "successHigh": { + "value": "{palette.vivoGreenLight30}", + "type": "color", + "description": "vivoGreenLight30" + }, + "warningHigh": { + "value": "{palette.orangeLight40}", + "type": "color", + "description": "orangeLight40" + }, + "errorHigh": { + "value": "{palette.pepperLight40}", + "type": "color", + "description": "pepperLight40" + }, + "promoHigh": { + "value": "{palette.vivoPurpleLight50}", + "type": "color", + "description": "vivoPurpleLight50" + }, + "successHighInverse": { + "value": "{palette.vivoGreenDark}", + "type": "color", + "description": "vivoGreenDark" + }, + "warningHighInverse": { + "value": "{palette.orangeDark}", + "type": "color", + "description": "orangeDark" + }, + "errorHighInverse": { + "value": "{palette.pepperDark80}", + "type": "color", + "description": "pepperDark80" + }, + "promoHighInverse": { + "value": "{palette.vivoPurple}", + "type": "color", + "description": "vivoPurple" + }, + "textNavigationBarPrimary": { + "value": "{palette.grey2}", + "type": "color", + "description": "grey2" + }, + "textNavigationBarSecondary": { + "value": "{palette.grey4}", + "type": "color", + "description": "grey4" + }, + "textNavigationSearchBarHint": { + "value": "{palette.grey4}", + "type": "color", + "description": "grey4" + }, + "textNavigationSearchBarText": { + "value": "{palette.grey2}", + "type": "color", + "description": "grey2" + }, + "textAppBar": { + "value": "{palette.grey5}", + "type": "color", + "description": "grey5" + }, + "textAppBarSelected": { + "value": "{palette.grey2}", + "type": "color", + "description": "grey2" + }, + "customTabsBackground": { + "value": "{palette.darkModeBlack}", + "type": "color", + "description": "darkModeBlack" + }, + "tagTextPromo": { + "value": "{palette.vivoPurpleLight50}", + "type": "color", + "description": "vivoPurpleLight50" + }, + "tagTextActive": { + "value": "{palette.vivoPurpleLight80}", + "type": "color", + "description": "vivoPurpleLight80" + }, + "tagTextInactive": { + "value": "{palette.grey5}", + "type": "color", + "description": "grey5" + }, + "tagTextSuccess": { + "value": "{palette.vivoGreenLight30}", + "type": "color", + "description": "vivoGreenLight30" + }, + "tagTextWarning": { + "value": "{palette.orangeLight40}", + "type": "color", + "description": "orangeLight40" + }, + "tagTextError": { + "value": "{palette.pepperLight40}", + "type": "color", + "description": "pepperLight40" + }, + "tagBackgroundPromo": { + "value": "{palette.darkModeGrey6}", + "type": "color", + "description": "darkModeGrey6" + }, + "tagBackgroundActive": { + "value": "{palette.darkModeGrey6}", + "type": "color", + "description": "darkModeGrey6" + }, + "tagBackgroundInactive": { + "value": "{palette.darkModeGrey6}", + "type": "color", + "description": "darkModeGrey6" + }, + "tagBackgroundSuccess": { + "value": "{palette.darkModeGrey6}", + "type": "color", + "description": "darkModeGrey6" + }, + "tagBackgroundWarning": { + "value": "{palette.darkModeGrey6}", + "type": "color", + "description": "darkModeGrey6" + }, + "tagBackgroundError": { + "value": "{palette.darkModeGrey6}", + "type": "color", + "description": "darkModeGrey6" + }, + "cardContentOverlay": { + "type": "linear-gradient", + "value": { + "angle": 180, + "colors": [ + { + "value": "rgba({palette.grey6}, 0)", + "stop": 0 + }, + { + "value": "rgba({palette.grey6}, 0.4)", + "stop": 0.3 + }, + { + "value": "rgba({palette.grey6}, 0.7)", + "stop": 1 + } + ] + }, + "description": "grey6" + } + }, + "radius": { + "avatar": { + "value": "circle", + "type": "borderRadius" + }, + "bar": { + "value": "999", + "type": "borderRadius" + }, + "button": { + "value": "4", + "type": "borderRadius" + }, + "checkbox": { + "value": "2", + "type": "borderRadius" + }, + "container": { + "value": "8", + "type": "borderRadius" + }, + "indicator": { + "value": "999", + "type": "borderRadius" + }, + "input": { + "value": "8", + "type": "borderRadius" + }, + "legacyDisplay": { + "value": "16", + "type": "borderRadius" + }, + "popup": { + "value": "8", + "type": "borderRadius" + }, + "sheet": { + "value": "8", + "type": "borderRadius" + }, + "mediaSmall": { + "value": "8", + "type": "borderRadius" + } + }, + "text": { + "weight": { + "cardTitle": { + "value": "regular", + "type": "typography" + }, + "button": { + "value": "medium", + "type": "typography" + }, + "tabsLabel": { + "value": "medium", + "type": "typography" + }, + "link": { + "value": "medium", + "type": "typography" + }, + "title1": { + "value": "medium", + "type": "typography" + }, + "title2": { + "value": "light", + "type": "typography" + }, + "indicator": { + "value": "medium", + "type": "typography" + }, + "navigationBar": { + "value": "medium", + "type": "typography" + }, + "text5": { + "value": "light", + "type": "typography" + }, + "text6": { + "value": "light", + "type": "typography" + }, + "text7": { + "value": "light", + "type": "typography" + }, + "text8": { + "value": "light", + "type": "typography" + }, + "text9": { + "value": "light", + "type": "typography" + }, + "text10": { + "value": "light", + "type": "typography" + } + }, + "size": { + "tabsLabel": { + "value": { + "mobile": 16, + "desktop": 18 + }, + "type": "typography" + }, + "title2": { + "value": { + "mobile": 20, + "desktop": 28 + }, + "type": "typography" + } + }, + "lineHeight": { + "tabsLabel": { + "value": { + "mobile": 24, + "desktop": 24 + }, + "type": "typography" + }, + "title2": { + "value": { + "mobile": 24, + "desktop": 32 + }, + "type": "typography" + } + } + }, + "themeVariant": { + "successFeedback": { + "value": "inverse", + "type": "themeVariant" + }, + "brandLoadingScreen": { + "value": "inverse", + "type": "themeVariant" + } + }, + "global": { + "palette": { + "vivoPurple": { + "value": "#660099", + "type": "color" + }, + "vivoPurpleDark": { + "value": "#461E5F", + "type": "color" + }, + "vivoPurpleLight10": { + "value": "#EFE5F4", + "type": "color" + }, + "vivoPurpleLight20": { + "value": "#E0CCEB", + "type": "color" + }, + "vivoPurpleLight50": { + "value": "#B280CC", + "type": "color" + }, + "vivoPurpleLight80": { + "value": "#8433AD", + "type": "color" + }, + "vivoPurpleLight90": { + "value": "#751AA3", + "type": "color" + }, + "vivoGreen": { + "value": "#99CC33", + "type": "color" + }, + "vivoGreenDark": { + "value": "#225C3D", + "type": "color" + }, + "vivoGreenLight10": { + "value": "#EDF8E8", + "type": "color" + }, + "vivoGreen25": { + "value": "#D6EBAD", + "type": "color" + }, + "vivoGreenLight30": { + "value": "#91AE9E", + "type": "color" + }, + "vivoBlue": { + "value": "#00ABDB", + "type": "color" + }, + "orange": { + "value": "#FF9900", + "type": "color" + }, + "orange25": { + "value": "#FFD699", + "type": "color" + }, + "orangeDark": { + "value": "#972A1D", + "type": "color" + }, + "orangeLight10": { + "value": "#FFEFE1", + "type": "color" + }, + "orangeLight40": { + "value": "#FFB84C", + "type": "color" + }, + "pink": { + "value": "#EB3D7D", + "type": "color" + }, + "pepper": { + "value": "#CC1F59", + "type": "color" + }, + "pepperDark": { + "value": "#B71D63", + "type": "color" + }, + "pepperDark80": { + "value": "#8F2052", + "type": "color" + }, + "pepperLight10": { + "value": "#FCE4EF", + "type": "color" + }, + "pepperLight30": { + "value": "#F7B1CB", + "type": "color" + }, + "pepperLight40": { + "value": "#DB628B", + "type": "color" + }, + "grey1": { + "value": "#F6F6F6", + "type": "color" + }, + "grey2": { + "value": "#EEEEEE", + "type": "color" + }, + "grey3": { + "value": "#DDDDDD", + "type": "color" + }, + "grey4": { + "value": "#999999", + "type": "color" + }, + "grey5": { + "value": "#666666", + "type": "color" + }, + "grey6": { + "value": "#000000", + "type": "color" + }, + "white": { + "value": "#FFFFFF", + "type": "color" + }, + "darkModeBlack": { + "value": "#191919", + "type": "color" + }, + "darkModeGrey": { + "value": "#242424", + "type": "color" + }, + "darkModeGrey6": { + "value": "#313235", + "type": "color" + } + } + } +} diff --git a/scripts/mistica-importer/generators/colors/__tests__/color-toolkit-generator.test.js b/scripts/mistica-importer/generators/colors/__tests__/color-toolkit-generator.test.js new file mode 100644 index 00000000..edbe08b9 --- /dev/null +++ b/scripts/mistica-importer/generators/colors/__tests__/color-toolkit-generator.test.js @@ -0,0 +1,38 @@ +import fs from "fs"; +import { resolve } from "path"; +import { reduceColors } from "../reduce-colors"; +import { generateColorToolkit } from "../color-toolkit-generator"; + +describe("generateColorToolkit", () => { + const getTokensFromFile = (file) => + JSON.parse(fs.readFileSync(resolve(__dirname, file), "utf-8")); + it("real case", () => { + const brandsWithTokens = [ + { + brand: { + id: "brand1", + prefix: "Brand1", + misticaDesignFileName: "brand-1", + }, + tokens: getTokensFromFile("brand1-tokens.json"), + }, + { + brand: { + id: "brand2", + prefix: "Brand2", + misticaDesignFileName: "brand-2", + }, + tokens: getTokensFromFile("brand2-tokens.json"), + }, + ]; + + const colors = reduceColors(brandsWithTokens); + const result = generateColorToolkit(colors); + + const expectedContent = fs.readFileSync( + resolve(__dirname, "expected-ColorToolkit+Color.swift"), + "utf-8" + ); + expect(result).toBe(expectedContent); + }); +}); diff --git a/scripts/mistica-importer/generators/colors/__tests__/expected-Brand1Colors.swift b/scripts/mistica-importer/generators/colors/__tests__/expected-Brand1Colors.swift new file mode 100644 index 00000000..3ba5cec3 --- /dev/null +++ b/scripts/mistica-importer/generators/colors/__tests__/expected-Brand1Colors.swift @@ -0,0 +1,215 @@ + +// Generated using Make +// DO NOT EDIT + +import UIKit + +struct Brand1Colors: MisticaColors { + static let palette = Brand1ColorPalette() + let background = Brand1Colors.palette.white | Brand1Colors.palette.darkModeBlack + let backgroundAlternative = Brand1Colors.palette.grey20 | Brand1Colors.palette.darkModeBlack + let backgroundBrand = MisticaColor.gradient(MisticaGradient( + colors: + [ + Brand1Colors.palette.darkBlue | Brand1Colors.palette.darkModeBlack, + Brand1Colors.palette.beyondBlue | Brand1Colors.palette.darkModeBlack, + Brand1Colors.palette.beyondBlue45 | Brand1Colors.palette.darkModeBlack + ], + stops: [0,0.64,1], + angle: 180 + )) + let backgroundBrandSecondary = Brand1Colors.palette.beyondBlue | Brand1Colors.palette.darkModeBlack + let backgroundContainer = Brand1Colors.palette.white | Brand1Colors.palette.darkModeGrey + let backgroundContainerError = Brand1Colors.palette.o2Red10 | Brand1Colors.palette.darkModeGrey + let backgroundContainerHover = Brand1Colors.palette.darkModeBlack.withAlphaComponent(0.03) | Brand1Colors.palette.white.withAlphaComponent(0.03) + let backgroundContainerPressed = Brand1Colors.palette.darkModeBlack.withAlphaComponent(0.05) | Brand1Colors.palette.white.withAlphaComponent(0.05) + let backgroundContainerBrand = MisticaColor.gradient(MisticaGradient( + colors: + [ + Brand1Colors.palette.darkBlue | Brand1Colors.palette.darkModeGrey, + Brand1Colors.palette.beyondBlue | Brand1Colors.palette.darkModeGrey, + Brand1Colors.palette.beyondBlue45 | Brand1Colors.palette.darkModeGrey + ], + stops: [0,0.64,1], + angle: 180 + )) + let backgroundContainerBrandHover = Brand1Colors.palette.darkModeBlack.withAlphaComponent(0.2) | Brand1Colors.palette.white.withAlphaComponent(0.03) + let backgroundContainerBrandPressed = Brand1Colors.palette.darkModeBlack.withAlphaComponent(0.4) | Brand1Colors.palette.white.withAlphaComponent(0.05) + let backgroundContainerBrandOverInverse = Brand1Colors.palette.beyondBlue70 | Brand1Colors.palette.darkModeGrey + let backgroundContainerAlternative = Brand1Colors.palette.grey20 | Brand1Colors.palette.darkModeGrey + let backgroundOverlay = Brand1Colors.palette.black.withAlphaComponent(0.6) | Brand1Colors.palette.darkModeGrey.withAlphaComponent(0.8) + let backgroundSkeleton = Brand1Colors.palette.grey30 | Brand1Colors.palette.darkModeGrey6 + let backgroundSkeletonInverse = Brand1Colors.palette.beyondBlue70 | Brand1Colors.palette.darkModeGrey6 + let backgroundBrandTop = Brand1Colors.palette.darkBlue | Brand1Colors.palette.darkModeBlack + let backgroundBrandBottom = Brand1Colors.palette.beyondBlue45 | Brand1Colors.palette.darkModeBlack + let appBarBackground = Brand1Colors.palette.white | Brand1Colors.palette.darkModeGrey + let navigationBarBackground = Brand1Colors.palette.darkBlue | Brand1Colors.palette.darkModeBlack + let skeletonWave = Brand1Colors.palette.grey30 | Brand1Colors.palette.grey80 + let borderLow = Brand1Colors.palette.grey20 | Brand1Colors.palette.darkModeBlack + let border = Brand1Colors.palette.grey30 | Brand1Colors.palette.darkModeGrey + let borderHigh = Brand1Colors.palette.grey80 | Brand1Colors.palette.grey45 + let borderSelected = Brand1Colors.palette.beyondBlue | Brand1Colors.palette.beyondBlue30 + let coverBackgroundHover = Brand1Colors.palette.darkModeBlack.withAlphaComponent(0.25) | Brand1Colors.palette.darkModeBlack.withAlphaComponent(0.25) + let coverBackgroundPressed = Brand1Colors.palette.darkModeBlack.withAlphaComponent(0.35) | Brand1Colors.palette.darkModeBlack.withAlphaComponent(0.35) + let buttonDangerBackground = Brand1Colors.palette.o2Red60 | Brand1Colors.palette.o2Red60 + let buttonDangerBackgroundSelected = Brand1Colors.palette.o2Red65 | Brand1Colors.palette.o2Red65 + let buttonDangerBackgroundHover = Brand1Colors.palette.o2Red65 | Brand1Colors.palette.o2Red65 + let buttonLinkDangerBackgroundSelected = Brand1Colors.palette.o2Red10 | Brand1Colors.palette.white.withAlphaComponent(0.08) + let buttonLinkDangerBackgroundInverse = Brand1Colors.palette.white | Brand1Colors.palette.white.withAlphaComponent(0) + let buttonLinkDangerBackgroundInverseSelected = Brand1Colors.palette.o2Red10 | Brand1Colors.palette.white.withAlphaComponent(0.08) + let buttonLinkBackgroundSelected = Brand1Colors.palette.beyondBlue10 | Brand1Colors.palette.white.withAlphaComponent(0.08) + let buttonLinkBackgroundInverseSelected = Brand1Colors.palette.white.withAlphaComponent(0.08) | Brand1Colors.palette.white.withAlphaComponent(0.08) + let buttonPrimaryBackground = Brand1Colors.palette.beyondBlue | Brand1Colors.palette.darkModeBeyondBlue + let buttonPrimaryBackgroundInverse = Brand1Colors.palette.white | Brand1Colors.palette.darkModeBeyondBlue + let buttonPrimaryBackgroundSelected = Brand1Colors.palette.beyondBlue70 | Brand1Colors.palette.beyondBlue55 + let buttonPrimaryBackgroundHover = Brand1Colors.palette.beyondBlue70 | Brand1Colors.palette.beyondBlue55 + let buttonPrimaryBackgroundInverseSelected = Brand1Colors.palette.beyondBlue30 | Brand1Colors.palette.beyondBlue55 + let buttonSecondaryBorder = Brand1Colors.palette.beyondBlue | Brand1Colors.palette.white + let buttonSecondaryBorderSelected = Brand1Colors.palette.beyondBlue70 | Brand1Colors.palette.white + let buttonSecondaryBackgroundHover = Brand1Colors.palette.beyondBlue10 | Brand1Colors.palette.white.withAlphaComponent(0.15) + let buttonSecondaryBackgroundSelected = Brand1Colors.palette.beyondBlue10 | Brand1Colors.palette.white.withAlphaComponent(0.15) + let buttonSecondaryBorderInverse = Brand1Colors.palette.white | Brand1Colors.palette.white + let buttonSecondaryBorderInverseSelected = Brand1Colors.palette.beyondBlue30 | Brand1Colors.palette.white + let buttonSecondaryBackgroundInverseHover = Brand1Colors.palette.white.withAlphaComponent(0.15) | Brand1Colors.palette.white.withAlphaComponent(0.15) + let buttonSecondaryBackgroundInverseSelected = Brand1Colors.palette.white.withAlphaComponent(0.15) | Brand1Colors.palette.white.withAlphaComponent(0.15) + let textButtonPrimary = Brand1Colors.palette.white | Brand1Colors.palette.white + let textButtonPrimaryInverse = Brand1Colors.palette.beyondBlue | Brand1Colors.palette.white + let textButtonPrimaryInverseSelected = Brand1Colors.palette.beyondBlue70 | Brand1Colors.palette.white + let textButtonSecondary = Brand1Colors.palette.beyondBlue | Brand1Colors.palette.grey30 + let textButtonSecondarySelected = Brand1Colors.palette.beyondBlue70 | Brand1Colors.palette.grey30 + let textButtonSecondaryInverse = Brand1Colors.palette.white | Brand1Colors.palette.grey30 + let textButtonSecondaryInverseSelected = Brand1Colors.palette.white | Brand1Colors.palette.grey30 + let textLink = Brand1Colors.palette.beyondBlue | Brand1Colors.palette.beyondBlue40 + let textLinkInverse = Brand1Colors.palette.white | Brand1Colors.palette.beyondBlue40 + let textLinkDanger = Brand1Colors.palette.o2Red65 | Brand1Colors.palette.o2Red45 + let textLinkSnackbar = Brand1Colors.palette.beyondBlue30 | Brand1Colors.palette.beyondBlue30 + let textActivated = Brand1Colors.palette.beyondBlue | Brand1Colors.palette.beyondBlue30 + let textBrand = Brand1Colors.palette.beyondBlue | Brand1Colors.palette.beyondBlue30 + let control = Brand1Colors.palette.grey45 | Brand1Colors.palette.grey45 + let controlActivated = Brand1Colors.palette.beyondBlue | Brand1Colors.palette.darkModeBeyondBlue + let controlInverse = Brand1Colors.palette.white | Brand1Colors.palette.grey45 + let controlActivatedInverse = Brand1Colors.palette.white | Brand1Colors.palette.darkModeBeyondBlue + let controlError = Brand1Colors.palette.o2Red60 | Brand1Colors.palette.o2Red45 + let barTrack = Brand1Colors.palette.grey30 | Brand1Colors.palette.darkModeGrey6 + let loadingBar = Brand1Colors.palette.beyondBlue | Brand1Colors.palette.darkModeBeyondBlue + let loadingBarBackground = Brand1Colors.palette.grey20 | Brand1Colors.palette.darkModeGrey6 + let toggleAndroidInactive = Brand1Colors.palette.grey30 | Brand1Colors.palette.grey20 + let toggleAndroidBackgroundActive = Brand1Colors.palette.beyondBlue15 | Brand1Colors.palette.beyondBlue15 + let iosControlKnob = Brand1Colors.palette.white | Brand1Colors.palette.grey30 + let divider = Brand1Colors.palette.grey30 | Brand1Colors.palette.white.withAlphaComponent(0.1) + let dividerInverse = Brand1Colors.palette.white.withAlphaComponent(0.2) | Brand1Colors.palette.white.withAlphaComponent(0.1) + let navigationBarDivider = Brand1Colors.palette.darkBlue | Brand1Colors.palette.darkModeBlack + let badge = Brand1Colors.palette.o2Red65 | Brand1Colors.palette.o2Red65 + let feedbackErrorBackground = Brand1Colors.palette.o2Red60 | Brand1Colors.palette.o2Red60 + let feedbackInfoBackground = Brand1Colors.palette.black | Brand1Colors.palette.darkModeGrey6 + let brand = Brand1Colors.palette.beyondBlue | Brand1Colors.palette.beyondBlue30 + let brandHigh = Brand1Colors.palette.beyondBlue70 | Brand1Colors.palette.white.withAlphaComponent(0.05) + let inverse = Brand1Colors.palette.white | Brand1Colors.palette.grey30 + let neutralHigh = Brand1Colors.palette.black | Brand1Colors.palette.grey30 + let neutralMedium = Brand1Colors.palette.grey60 | Brand1Colors.palette.grey60 + let neutralMediumInverse = Brand1Colors.palette.grey60 | Brand1Colors.palette.grey60 + let neutralLow = Brand1Colors.palette.grey20 | Brand1Colors.palette.grey80 + let neutralLowAlternative = Brand1Colors.palette.grey30 | Brand1Colors.palette.grey80 + let textPrimary = Brand1Colors.palette.black | Brand1Colors.palette.grey30 + let textPrimaryInverse = Brand1Colors.palette.white | Brand1Colors.palette.grey30 + let textSecondary = Brand1Colors.palette.grey60 | Brand1Colors.palette.grey45 + let textSecondaryInverse = Brand1Colors.palette.beyondBlue10 | Brand1Colors.palette.grey45 + let success = Brand1Colors.palette.o2Green | Brand1Colors.palette.o2Green + let warning = Brand1Colors.palette.o2Orange | Brand1Colors.palette.o2Orange + let error = Brand1Colors.palette.o2Red65 | Brand1Colors.palette.o2Red45 + let textError = Brand1Colors.palette.o2Red65 | Brand1Colors.palette.o2Red45 + let textErrorInverse = Brand1Colors.palette.white | Brand1Colors.palette.o2Red45 + let promo = Brand1Colors.palette.o2Pink | Brand1Colors.palette.o2Pink + let highlight = Brand1Colors.palette.o2Pink80 | Brand1Colors.palette.o2Pink + let successLow = Brand1Colors.palette.o2Green10 | Brand1Colors.palette.darkModeGrey6 + let warningLow = Brand1Colors.palette.o2Orange10 | Brand1Colors.palette.darkModeGrey6 + let errorLow = Brand1Colors.palette.o2Red10 | Brand1Colors.palette.darkModeGrey6 + let promoLow = Brand1Colors.palette.o2Pink15 | Brand1Colors.palette.darkModeGrey6 + let brandLow = Brand1Colors.palette.beyondBlue10 | Brand1Colors.palette.darkModeGrey6 + let successHigh = Brand1Colors.palette.o2Green80 | Brand1Colors.palette.o2Green40 + let warningHigh = Brand1Colors.palette.o2Orange75 | Brand1Colors.palette.o2Orange40 + let errorHigh = Brand1Colors.palette.o2Red65 | Brand1Colors.palette.o2Red40 + let promoHigh = Brand1Colors.palette.o2Pink80 | Brand1Colors.palette.o2Pink30 + let successHighInverse = Brand1Colors.palette.o2Green80 | Brand1Colors.palette.o2Green80 + let warningHighInverse = Brand1Colors.palette.o2Orange75 | Brand1Colors.palette.o2Orange75 + let errorHighInverse = Brand1Colors.palette.o2Red65 | Brand1Colors.palette.o2Red65 + let promoHighInverse = Brand1Colors.palette.o2Pink80 | Brand1Colors.palette.o2Pink + let textNavigationBarPrimary = Brand1Colors.palette.white | Brand1Colors.palette.grey30 + let textNavigationBarSecondary = Brand1Colors.palette.beyondBlue30 | Brand1Colors.palette.grey45 + let textNavigationSearchBarHint = Brand1Colors.palette.beyondBlue30 | Brand1Colors.palette.grey45 + let textNavigationSearchBarText = Brand1Colors.palette.white | Brand1Colors.palette.grey30 + let textAppBar = Brand1Colors.palette.grey60 | Brand1Colors.palette.grey45 + let textAppBarSelected = Brand1Colors.palette.beyondBlue | Brand1Colors.palette.beyondBlue40 + let customTabsBackground = Brand1Colors.palette.beyondBlue | Brand1Colors.palette.darkModeBlack + let tagTextPromo = Brand1Colors.palette.o2Pink80 | Brand1Colors.palette.o2Pink + let tagTextActive = Brand1Colors.palette.beyondBlue | Brand1Colors.palette.beyondBlue30 + let tagTextInactive = Brand1Colors.palette.grey60 | Brand1Colors.palette.grey40 + let tagTextSuccess = Brand1Colors.palette.o2Green80 | Brand1Colors.palette.o2Green + let tagTextWarning = Brand1Colors.palette.o2Orange75 | Brand1Colors.palette.o2Orange + let tagTextError = Brand1Colors.palette.o2Red65 | Brand1Colors.palette.o2Red45 + let tagBackgroundPromo = Brand1Colors.palette.o2Pink15 | Brand1Colors.palette.darkModeGrey6 + let tagBackgroundActive = Brand1Colors.palette.beyondBlue10 | Brand1Colors.palette.darkModeGrey6 + let tagBackgroundInactive = Brand1Colors.palette.grey20 | Brand1Colors.palette.darkModeGrey6 + let tagBackgroundSuccess = Brand1Colors.palette.o2Green10 | Brand1Colors.palette.darkModeGrey6 + let tagBackgroundWarning = Brand1Colors.palette.o2Orange10 | Brand1Colors.palette.darkModeGrey6 + let tagBackgroundError = Brand1Colors.palette.o2Red10 | Brand1Colors.palette.darkModeGrey6 + let cardContentOverlay = MisticaColor.gradient(MisticaGradient( + colors: + [ + Brand1Colors.palette.beyondBlue.withAlphaComponent(0) | Brand1Colors.palette.black.withAlphaComponent(0), + Brand1Colors.palette.beyondBlue.withAlphaComponent(0.4) | Brand1Colors.palette.black.withAlphaComponent(0.4), + Brand1Colors.palette.beyondBlue.withAlphaComponent(1) | Brand1Colors.palette.black.withAlphaComponent(0.7) + ], + stops: [0,0.3,1], + angle: 180 + )) +} + +public struct Brand1ColorPalette { + public init() {} + public let beyondBlue = UIColor(hex: "#0050FF")! + public let beyondBlue10 = UIColor(hex: "#E5EDFF")! + public let beyondBlue15 = UIColor(hex: "#CCDCFF")! + public let beyondBlue30 = UIColor(hex: "#80A7FF")! + public let beyondBlue40 = UIColor(hex: "#4D84FF")! + public let beyondBlue45 = UIColor(hex: "#0A73EB")! + public let beyondBlue55 = UIColor(hex: "#0044D9")! + public let beyondBlue70 = UIColor(hex: "#0038B2")! + public let beyondBlue90 = UIColor(hex: "#001033")! + public let darkBlue = UIColor(hex: "#00008C")! + public let o2BlueLight = UIColor(hex: "#82DCFA")! + public let o2BlueLight30 = UIColor(hex: "#C0EEFD")! + public let o2BlueLight35 = UIColor(hex: "#B4EAFC")! + public let o2Green = UIColor(hex: "#00DC7D")! + public let o2Green10 = UIColor(hex: "#E5FBF2")! + public let o2Green40 = UIColor(hex: "#4CE7A4")! + public let o2Green80 = UIColor(hex: "#006338")! + public let o2Yellow = UIColor(hex: "#FADC00")! + public let o2Orange = UIColor(hex: "#FFA55A")! + public let o2Orange10 = UIColor(hex: "#FFF6EE")! + public let o2Orange40 = UIColor(hex: "#FFC08B")! + public let o2Orange75 = UIColor(hex: "#996336")! + public let o2Pink = UIColor(hex: "#FA96FF")! + public let o2Pink15 = UIColor(hex: "#FEEAFF")! + public let o2Pink30 = UIColor(hex: "#FDCAFF")! + public let o2Pink80 = UIColor(hex: "#704373")! + public let o2Red = UIColor(hex: "#FF5A5A")! + public let o2Red10 = UIColor(hex: "#FFEEEE")! + public let o2Red20 = UIColor(hex: "#FFCDCD")! + public let o2Red40 = UIColor(hex: "#FF8B8B")! + public let o2Red45 = UIColor(hex: "#FF7B7B")! + public let o2Red60 = UIColor(hex: "#CC4848")! + public let o2Red65 = UIColor(hex: "#BF4444")! + public let grey20 = UIColor(hex: "#F3F3F5")! + public let grey30 = UIColor(hex: "#D9D9DD")! + public let grey40 = UIColor(hex: "#B4B4BE")! + public let grey45 = UIColor(hex: "#8C8C9A")! + public let grey60 = UIColor(hex: "#6E6E77")! + public let grey80 = UIColor(hex: "#3C3C46")! + public let black = UIColor(hex: "#00001E")! + public let white = UIColor(hex: "#FFFFFF")! + public let darkModeBlack = UIColor(hex: "#00001C")! + public let darkModeGrey = UIColor(hex: "#08132B")! + public let darkModeGrey6 = UIColor(hex: "#14213D")! + public let darkModeBeyondBlue = UIColor(hex: "#1A62FF")! +} \ No newline at end of file diff --git a/scripts/mistica-importer/generators/colors/__tests__/expected-ColorToolkit+Color.swift b/scripts/mistica-importer/generators/colors/__tests__/expected-ColorToolkit+Color.swift new file mode 100644 index 00000000..f74c6989 --- /dev/null +++ b/scripts/mistica-importer/generators/colors/__tests__/expected-ColorToolkit+Color.swift @@ -0,0 +1,395 @@ + +// Generated using Make +// DO NOT EDIT + +import SwiftUI + +public extension Color { + static var background: Color { + MisticaConfig.currentColors.background.color + } + static var backgroundAlternative: Color { + MisticaConfig.currentColors.backgroundAlternative.color + } + static var backgroundBrandSecondary: Color { + MisticaConfig.currentColors.backgroundBrandSecondary.color + } + static var backgroundContainer: Color { + MisticaConfig.currentColors.backgroundContainer.color + } + static var backgroundContainerError: Color { + MisticaConfig.currentColors.backgroundContainerError.color + } + static var backgroundContainerHover: Color { + MisticaConfig.currentColors.backgroundContainerHover.color + } + static var backgroundContainerPressed: Color { + MisticaConfig.currentColors.backgroundContainerPressed.color + } + static var backgroundContainerBrandHover: Color { + MisticaConfig.currentColors.backgroundContainerBrandHover.color + } + static var backgroundContainerBrandPressed: Color { + MisticaConfig.currentColors.backgroundContainerBrandPressed.color + } + static var backgroundContainerBrandOverInverse: Color { + MisticaConfig.currentColors.backgroundContainerBrandOverInverse.color + } + static var backgroundContainerAlternative: Color { + MisticaConfig.currentColors.backgroundContainerAlternative.color + } + static var backgroundOverlay: Color { + MisticaConfig.currentColors.backgroundOverlay.color + } + static var backgroundSkeleton: Color { + MisticaConfig.currentColors.backgroundSkeleton.color + } + static var backgroundSkeletonInverse: Color { + MisticaConfig.currentColors.backgroundSkeletonInverse.color + } + static var backgroundBrandTop: Color { + MisticaConfig.currentColors.backgroundBrandTop.color + } + static var backgroundBrandBottom: Color { + MisticaConfig.currentColors.backgroundBrandBottom.color + } + static var appBarBackground: Color { + MisticaConfig.currentColors.appBarBackground.color + } + static var navigationBarBackground: Color { + MisticaConfig.currentColors.navigationBarBackground.color + } + static var skeletonWave: Color { + MisticaConfig.currentColors.skeletonWave.color + } + static var borderLow: Color { + MisticaConfig.currentColors.borderLow.color + } + static var border: Color { + MisticaConfig.currentColors.border.color + } + static var borderHigh: Color { + MisticaConfig.currentColors.borderHigh.color + } + static var borderSelected: Color { + MisticaConfig.currentColors.borderSelected.color + } + static var coverBackgroundHover: Color { + MisticaConfig.currentColors.coverBackgroundHover.color + } + static var coverBackgroundPressed: Color { + MisticaConfig.currentColors.coverBackgroundPressed.color + } + static var buttonDangerBackground: Color { + MisticaConfig.currentColors.buttonDangerBackground.color + } + static var buttonDangerBackgroundSelected: Color { + MisticaConfig.currentColors.buttonDangerBackgroundSelected.color + } + static var buttonDangerBackgroundHover: Color { + MisticaConfig.currentColors.buttonDangerBackgroundHover.color + } + static var buttonLinkDangerBackgroundSelected: Color { + MisticaConfig.currentColors.buttonLinkDangerBackgroundSelected.color + } + static var buttonLinkDangerBackgroundInverse: Color { + MisticaConfig.currentColors.buttonLinkDangerBackgroundInverse.color + } + static var buttonLinkDangerBackgroundInverseSelected: Color { + MisticaConfig.currentColors.buttonLinkDangerBackgroundInverseSelected.color + } + static var buttonLinkBackgroundSelected: Color { + MisticaConfig.currentColors.buttonLinkBackgroundSelected.color + } + static var buttonLinkBackgroundInverseSelected: Color { + MisticaConfig.currentColors.buttonLinkBackgroundInverseSelected.color + } + static var buttonPrimaryBackground: Color { + MisticaConfig.currentColors.buttonPrimaryBackground.color + } + static var buttonPrimaryBackgroundInverse: Color { + MisticaConfig.currentColors.buttonPrimaryBackgroundInverse.color + } + static var buttonPrimaryBackgroundSelected: Color { + MisticaConfig.currentColors.buttonPrimaryBackgroundSelected.color + } + static var buttonPrimaryBackgroundHover: Color { + MisticaConfig.currentColors.buttonPrimaryBackgroundHover.color + } + static var buttonPrimaryBackgroundInverseSelected: Color { + MisticaConfig.currentColors.buttonPrimaryBackgroundInverseSelected.color + } + static var buttonSecondaryBorder: Color { + MisticaConfig.currentColors.buttonSecondaryBorder.color + } + static var buttonSecondaryBorderSelected: Color { + MisticaConfig.currentColors.buttonSecondaryBorderSelected.color + } + static var buttonSecondaryBackgroundHover: Color { + MisticaConfig.currentColors.buttonSecondaryBackgroundHover.color + } + static var buttonSecondaryBackgroundSelected: Color { + MisticaConfig.currentColors.buttonSecondaryBackgroundSelected.color + } + static var buttonSecondaryBorderInverse: Color { + MisticaConfig.currentColors.buttonSecondaryBorderInverse.color + } + static var buttonSecondaryBorderInverseSelected: Color { + MisticaConfig.currentColors.buttonSecondaryBorderInverseSelected.color + } + static var buttonSecondaryBackgroundInverseHover: Color { + MisticaConfig.currentColors.buttonSecondaryBackgroundInverseHover.color + } + static var buttonSecondaryBackgroundInverseSelected: Color { + MisticaConfig.currentColors.buttonSecondaryBackgroundInverseSelected.color + } + static var textButtonPrimary: Color { + MisticaConfig.currentColors.textButtonPrimary.color + } + static var textButtonPrimaryInverse: Color { + MisticaConfig.currentColors.textButtonPrimaryInverse.color + } + static var textButtonPrimaryInverseSelected: Color { + MisticaConfig.currentColors.textButtonPrimaryInverseSelected.color + } + static var textButtonSecondary: Color { + MisticaConfig.currentColors.textButtonSecondary.color + } + static var textButtonSecondarySelected: Color { + MisticaConfig.currentColors.textButtonSecondarySelected.color + } + static var textButtonSecondaryInverse: Color { + MisticaConfig.currentColors.textButtonSecondaryInverse.color + } + static var textButtonSecondaryInverseSelected: Color { + MisticaConfig.currentColors.textButtonSecondaryInverseSelected.color + } + static var textLink: Color { + MisticaConfig.currentColors.textLink.color + } + static var textLinkInverse: Color { + MisticaConfig.currentColors.textLinkInverse.color + } + static var textLinkDanger: Color { + MisticaConfig.currentColors.textLinkDanger.color + } + static var textLinkSnackbar: Color { + MisticaConfig.currentColors.textLinkSnackbar.color + } + static var textActivated: Color { + MisticaConfig.currentColors.textActivated.color + } + static var textBrand: Color { + MisticaConfig.currentColors.textBrand.color + } + static var control: Color { + MisticaConfig.currentColors.control.color + } + static var controlActivated: Color { + MisticaConfig.currentColors.controlActivated.color + } + static var controlInverse: Color { + MisticaConfig.currentColors.controlInverse.color + } + static var controlActivatedInverse: Color { + MisticaConfig.currentColors.controlActivatedInverse.color + } + static var controlError: Color { + MisticaConfig.currentColors.controlError.color + } + static var barTrack: Color { + MisticaConfig.currentColors.barTrack.color + } + static var loadingBar: Color { + MisticaConfig.currentColors.loadingBar.color + } + static var loadingBarBackground: Color { + MisticaConfig.currentColors.loadingBarBackground.color + } + static var toggleAndroidInactive: Color { + MisticaConfig.currentColors.toggleAndroidInactive.color + } + static var toggleAndroidBackgroundActive: Color { + MisticaConfig.currentColors.toggleAndroidBackgroundActive.color + } + static var iosControlKnob: Color { + MisticaConfig.currentColors.iosControlKnob.color + } + static var divider: Color { + MisticaConfig.currentColors.divider.color + } + static var dividerInverse: Color { + MisticaConfig.currentColors.dividerInverse.color + } + static var navigationBarDivider: Color { + MisticaConfig.currentColors.navigationBarDivider.color + } + static var badge: Color { + MisticaConfig.currentColors.badge.color + } + static var feedbackErrorBackground: Color { + MisticaConfig.currentColors.feedbackErrorBackground.color + } + static var feedbackInfoBackground: Color { + MisticaConfig.currentColors.feedbackInfoBackground.color + } + static var brand: Color { + MisticaConfig.currentColors.brand.color + } + static var brandHigh: Color { + MisticaConfig.currentColors.brandHigh.color + } + static var inverse: Color { + MisticaConfig.currentColors.inverse.color + } + static var neutralHigh: Color { + MisticaConfig.currentColors.neutralHigh.color + } + static var neutralMedium: Color { + MisticaConfig.currentColors.neutralMedium.color + } + static var neutralMediumInverse: Color { + MisticaConfig.currentColors.neutralMediumInverse.color + } + static var neutralLow: Color { + MisticaConfig.currentColors.neutralLow.color + } + static var neutralLowAlternative: Color { + MisticaConfig.currentColors.neutralLowAlternative.color + } + static var textPrimary: Color { + MisticaConfig.currentColors.textPrimary.color + } + static var textPrimaryInverse: Color { + MisticaConfig.currentColors.textPrimaryInverse.color + } + static var textSecondary: Color { + MisticaConfig.currentColors.textSecondary.color + } + static var textSecondaryInverse: Color { + MisticaConfig.currentColors.textSecondaryInverse.color + } + static var success: Color { + MisticaConfig.currentColors.success.color + } + static var warning: Color { + MisticaConfig.currentColors.warning.color + } + static var error: Color { + MisticaConfig.currentColors.error.color + } + static var textError: Color { + MisticaConfig.currentColors.textError.color + } + static var textErrorInverse: Color { + MisticaConfig.currentColors.textErrorInverse.color + } + static var promo: Color { + MisticaConfig.currentColors.promo.color + } + static var highlight: Color { + MisticaConfig.currentColors.highlight.color + } + static var successLow: Color { + MisticaConfig.currentColors.successLow.color + } + static var warningLow: Color { + MisticaConfig.currentColors.warningLow.color + } + static var errorLow: Color { + MisticaConfig.currentColors.errorLow.color + } + static var promoLow: Color { + MisticaConfig.currentColors.promoLow.color + } + static var brandLow: Color { + MisticaConfig.currentColors.brandLow.color + } + static var successHigh: Color { + MisticaConfig.currentColors.successHigh.color + } + static var warningHigh: Color { + MisticaConfig.currentColors.warningHigh.color + } + static var errorHigh: Color { + MisticaConfig.currentColors.errorHigh.color + } + static var promoHigh: Color { + MisticaConfig.currentColors.promoHigh.color + } + static var successHighInverse: Color { + MisticaConfig.currentColors.successHighInverse.color + } + static var warningHighInverse: Color { + MisticaConfig.currentColors.warningHighInverse.color + } + static var errorHighInverse: Color { + MisticaConfig.currentColors.errorHighInverse.color + } + static var promoHighInverse: Color { + MisticaConfig.currentColors.promoHighInverse.color + } + static var textNavigationBarPrimary: Color { + MisticaConfig.currentColors.textNavigationBarPrimary.color + } + static var textNavigationBarSecondary: Color { + MisticaConfig.currentColors.textNavigationBarSecondary.color + } + static var textNavigationSearchBarHint: Color { + MisticaConfig.currentColors.textNavigationSearchBarHint.color + } + static var textNavigationSearchBarText: Color { + MisticaConfig.currentColors.textNavigationSearchBarText.color + } + static var textAppBar: Color { + MisticaConfig.currentColors.textAppBar.color + } + static var textAppBarSelected: Color { + MisticaConfig.currentColors.textAppBarSelected.color + } + static var customTabsBackground: Color { + MisticaConfig.currentColors.customTabsBackground.color + } + static var tagTextPromo: Color { + MisticaConfig.currentColors.tagTextPromo.color + } + static var tagTextActive: Color { + MisticaConfig.currentColors.tagTextActive.color + } + static var tagTextInactive: Color { + MisticaConfig.currentColors.tagTextInactive.color + } + static var tagTextSuccess: Color { + MisticaConfig.currentColors.tagTextSuccess.color + } + static var tagTextWarning: Color { + MisticaConfig.currentColors.tagTextWarning.color + } + static var tagTextError: Color { + MisticaConfig.currentColors.tagTextError.color + } + static var tagBackgroundPromo: Color { + MisticaConfig.currentColors.tagBackgroundPromo.color + } + static var tagBackgroundActive: Color { + MisticaConfig.currentColors.tagBackgroundActive.color + } + static var tagBackgroundInactive: Color { + MisticaConfig.currentColors.tagBackgroundInactive.color + } + static var tagBackgroundSuccess: Color { + MisticaConfig.currentColors.tagBackgroundSuccess.color + } + static var tagBackgroundWarning: Color { + MisticaConfig.currentColors.tagBackgroundWarning.color + } + static var tagBackgroundError: Color { + MisticaConfig.currentColors.tagBackgroundError.color + } +} + +private extension UIColor { + var color: Color { + Color(self) + } +} \ No newline at end of file diff --git a/scripts/mistica-importer/generators/colors/__tests__/expected-ColorUIToolkit+Color.swift b/scripts/mistica-importer/generators/colors/__tests__/expected-ColorUIToolkit+Color.swift new file mode 100644 index 00000000..0b0cb317 --- /dev/null +++ b/scripts/mistica-importer/generators/colors/__tests__/expected-ColorUIToolkit+Color.swift @@ -0,0 +1,516 @@ + +// Generated using Make +// DO NOT EDIT + +import UIKit + +public extension UIColor { + @objc(backgroundColor) + static var background: UIColor { + MisticaConfig.currentColors.background + } + @objc(backgroundAlternativeColor) + static var backgroundAlternative: UIColor { + MisticaConfig.currentColors.backgroundAlternative + } + @objc(backgroundBrandSecondaryColor) + static var backgroundBrandSecondary: UIColor { + MisticaConfig.currentColors.backgroundBrandSecondary + } + @objc(backgroundContainerColor) + static var backgroundContainer: UIColor { + MisticaConfig.currentColors.backgroundContainer + } + @objc(backgroundContainerErrorColor) + static var backgroundContainerError: UIColor { + MisticaConfig.currentColors.backgroundContainerError + } + @objc(backgroundContainerHoverColor) + static var backgroundContainerHover: UIColor { + MisticaConfig.currentColors.backgroundContainerHover + } + @objc(backgroundContainerPressedColor) + static var backgroundContainerPressed: UIColor { + MisticaConfig.currentColors.backgroundContainerPressed + } + @objc(backgroundContainerBrandHoverColor) + static var backgroundContainerBrandHover: UIColor { + MisticaConfig.currentColors.backgroundContainerBrandHover + } + @objc(backgroundContainerBrandPressedColor) + static var backgroundContainerBrandPressed: UIColor { + MisticaConfig.currentColors.backgroundContainerBrandPressed + } + @objc(backgroundContainerBrandOverInverseColor) + static var backgroundContainerBrandOverInverse: UIColor { + MisticaConfig.currentColors.backgroundContainerBrandOverInverse + } + @objc(backgroundContainerAlternativeColor) + static var backgroundContainerAlternative: UIColor { + MisticaConfig.currentColors.backgroundContainerAlternative + } + @objc(backgroundOverlayColor) + static var backgroundOverlay: UIColor { + MisticaConfig.currentColors.backgroundOverlay + } + @objc(backgroundSkeletonColor) + static var backgroundSkeleton: UIColor { + MisticaConfig.currentColors.backgroundSkeleton + } + @objc(backgroundSkeletonInverseColor) + static var backgroundSkeletonInverse: UIColor { + MisticaConfig.currentColors.backgroundSkeletonInverse + } + @objc(backgroundBrandTopColor) + static var backgroundBrandTop: UIColor { + MisticaConfig.currentColors.backgroundBrandTop + } + @objc(backgroundBrandBottomColor) + static var backgroundBrandBottom: UIColor { + MisticaConfig.currentColors.backgroundBrandBottom + } + @objc(appBarBackgroundColor) + static var appBarBackground: UIColor { + MisticaConfig.currentColors.appBarBackground + } + @objc(navigationBarBackgroundColor) + static var navigationBarBackground: UIColor { + MisticaConfig.currentColors.navigationBarBackground + } + @objc(skeletonWaveColor) + static var skeletonWave: UIColor { + MisticaConfig.currentColors.skeletonWave + } + @objc(borderLowColor) + static var borderLow: UIColor { + MisticaConfig.currentColors.borderLow + } + @objc(borderColor) + static var border: UIColor { + MisticaConfig.currentColors.border + } + @objc(borderHighColor) + static var borderHigh: UIColor { + MisticaConfig.currentColors.borderHigh + } + @objc(borderSelectedColor) + static var borderSelected: UIColor { + MisticaConfig.currentColors.borderSelected + } + @objc(coverBackgroundHoverColor) + static var coverBackgroundHover: UIColor { + MisticaConfig.currentColors.coverBackgroundHover + } + @objc(coverBackgroundPressedColor) + static var coverBackgroundPressed: UIColor { + MisticaConfig.currentColors.coverBackgroundPressed + } + @objc(buttonDangerBackgroundColor) + static var buttonDangerBackground: UIColor { + MisticaConfig.currentColors.buttonDangerBackground + } + @objc(buttonDangerBackgroundSelectedColor) + static var buttonDangerBackgroundSelected: UIColor { + MisticaConfig.currentColors.buttonDangerBackgroundSelected + } + @objc(buttonDangerBackgroundHoverColor) + static var buttonDangerBackgroundHover: UIColor { + MisticaConfig.currentColors.buttonDangerBackgroundHover + } + @objc(buttonLinkDangerBackgroundSelectedColor) + static var buttonLinkDangerBackgroundSelected: UIColor { + MisticaConfig.currentColors.buttonLinkDangerBackgroundSelected + } + @objc(buttonLinkDangerBackgroundInverseColor) + static var buttonLinkDangerBackgroundInverse: UIColor { + MisticaConfig.currentColors.buttonLinkDangerBackgroundInverse + } + @objc(buttonLinkDangerBackgroundInverseSelectedColor) + static var buttonLinkDangerBackgroundInverseSelected: UIColor { + MisticaConfig.currentColors.buttonLinkDangerBackgroundInverseSelected + } + @objc(buttonLinkBackgroundSelectedColor) + static var buttonLinkBackgroundSelected: UIColor { + MisticaConfig.currentColors.buttonLinkBackgroundSelected + } + @objc(buttonLinkBackgroundInverseSelectedColor) + static var buttonLinkBackgroundInverseSelected: UIColor { + MisticaConfig.currentColors.buttonLinkBackgroundInverseSelected + } + @objc(buttonPrimaryBackgroundColor) + static var buttonPrimaryBackground: UIColor { + MisticaConfig.currentColors.buttonPrimaryBackground + } + @objc(buttonPrimaryBackgroundInverseColor) + static var buttonPrimaryBackgroundInverse: UIColor { + MisticaConfig.currentColors.buttonPrimaryBackgroundInverse + } + @objc(buttonPrimaryBackgroundSelectedColor) + static var buttonPrimaryBackgroundSelected: UIColor { + MisticaConfig.currentColors.buttonPrimaryBackgroundSelected + } + @objc(buttonPrimaryBackgroundHoverColor) + static var buttonPrimaryBackgroundHover: UIColor { + MisticaConfig.currentColors.buttonPrimaryBackgroundHover + } + @objc(buttonPrimaryBackgroundInverseSelectedColor) + static var buttonPrimaryBackgroundInverseSelected: UIColor { + MisticaConfig.currentColors.buttonPrimaryBackgroundInverseSelected + } + @objc(buttonSecondaryBorderColor) + static var buttonSecondaryBorder: UIColor { + MisticaConfig.currentColors.buttonSecondaryBorder + } + @objc(buttonSecondaryBorderSelectedColor) + static var buttonSecondaryBorderSelected: UIColor { + MisticaConfig.currentColors.buttonSecondaryBorderSelected + } + @objc(buttonSecondaryBackgroundHoverColor) + static var buttonSecondaryBackgroundHover: UIColor { + MisticaConfig.currentColors.buttonSecondaryBackgroundHover + } + @objc(buttonSecondaryBackgroundSelectedColor) + static var buttonSecondaryBackgroundSelected: UIColor { + MisticaConfig.currentColors.buttonSecondaryBackgroundSelected + } + @objc(buttonSecondaryBorderInverseColor) + static var buttonSecondaryBorderInverse: UIColor { + MisticaConfig.currentColors.buttonSecondaryBorderInverse + } + @objc(buttonSecondaryBorderInverseSelectedColor) + static var buttonSecondaryBorderInverseSelected: UIColor { + MisticaConfig.currentColors.buttonSecondaryBorderInverseSelected + } + @objc(buttonSecondaryBackgroundInverseHoverColor) + static var buttonSecondaryBackgroundInverseHover: UIColor { + MisticaConfig.currentColors.buttonSecondaryBackgroundInverseHover + } + @objc(buttonSecondaryBackgroundInverseSelectedColor) + static var buttonSecondaryBackgroundInverseSelected: UIColor { + MisticaConfig.currentColors.buttonSecondaryBackgroundInverseSelected + } + @objc(textButtonPrimaryColor) + static var textButtonPrimary: UIColor { + MisticaConfig.currentColors.textButtonPrimary + } + @objc(textButtonPrimaryInverseColor) + static var textButtonPrimaryInverse: UIColor { + MisticaConfig.currentColors.textButtonPrimaryInverse + } + @objc(textButtonPrimaryInverseSelectedColor) + static var textButtonPrimaryInverseSelected: UIColor { + MisticaConfig.currentColors.textButtonPrimaryInverseSelected + } + @objc(textButtonSecondaryColor) + static var textButtonSecondary: UIColor { + MisticaConfig.currentColors.textButtonSecondary + } + @objc(textButtonSecondarySelectedColor) + static var textButtonSecondarySelected: UIColor { + MisticaConfig.currentColors.textButtonSecondarySelected + } + @objc(textButtonSecondaryInverseColor) + static var textButtonSecondaryInverse: UIColor { + MisticaConfig.currentColors.textButtonSecondaryInverse + } + @objc(textButtonSecondaryInverseSelectedColor) + static var textButtonSecondaryInverseSelected: UIColor { + MisticaConfig.currentColors.textButtonSecondaryInverseSelected + } + @objc(textLinkColor) + static var textLink: UIColor { + MisticaConfig.currentColors.textLink + } + @objc(textLinkInverseColor) + static var textLinkInverse: UIColor { + MisticaConfig.currentColors.textLinkInverse + } + @objc(textLinkDangerColor) + static var textLinkDanger: UIColor { + MisticaConfig.currentColors.textLinkDanger + } + @objc(textLinkSnackbarColor) + static var textLinkSnackbar: UIColor { + MisticaConfig.currentColors.textLinkSnackbar + } + @objc(textActivatedColor) + static var textActivated: UIColor { + MisticaConfig.currentColors.textActivated + } + @objc(textBrandColor) + static var textBrand: UIColor { + MisticaConfig.currentColors.textBrand + } + @objc(controlColor) + static var control: UIColor { + MisticaConfig.currentColors.control + } + @objc(controlActivatedColor) + static var controlActivated: UIColor { + MisticaConfig.currentColors.controlActivated + } + @objc(controlInverseColor) + static var controlInverse: UIColor { + MisticaConfig.currentColors.controlInverse + } + @objc(controlActivatedInverseColor) + static var controlActivatedInverse: UIColor { + MisticaConfig.currentColors.controlActivatedInverse + } + @objc(controlErrorColor) + static var controlError: UIColor { + MisticaConfig.currentColors.controlError + } + @objc(barTrackColor) + static var barTrack: UIColor { + MisticaConfig.currentColors.barTrack + } + @objc(loadingBarColor) + static var loadingBar: UIColor { + MisticaConfig.currentColors.loadingBar + } + @objc(loadingBarBackgroundColor) + static var loadingBarBackground: UIColor { + MisticaConfig.currentColors.loadingBarBackground + } + @objc(toggleAndroidInactiveColor) + static var toggleAndroidInactive: UIColor { + MisticaConfig.currentColors.toggleAndroidInactive + } + @objc(toggleAndroidBackgroundActiveColor) + static var toggleAndroidBackgroundActive: UIColor { + MisticaConfig.currentColors.toggleAndroidBackgroundActive + } + @objc(iosControlKnobColor) + static var iosControlKnob: UIColor { + MisticaConfig.currentColors.iosControlKnob + } + @objc(dividerColor) + static var divider: UIColor { + MisticaConfig.currentColors.divider + } + @objc(dividerInverseColor) + static var dividerInverse: UIColor { + MisticaConfig.currentColors.dividerInverse + } + @objc(navigationBarDividerColor) + static var navigationBarDivider: UIColor { + MisticaConfig.currentColors.navigationBarDivider + } + @objc(badgeColor) + static var badge: UIColor { + MisticaConfig.currentColors.badge + } + @objc(feedbackErrorBackgroundColor) + static var feedbackErrorBackground: UIColor { + MisticaConfig.currentColors.feedbackErrorBackground + } + @objc(feedbackInfoBackgroundColor) + static var feedbackInfoBackground: UIColor { + MisticaConfig.currentColors.feedbackInfoBackground + } + @objc(brandColor) + static var brand: UIColor { + MisticaConfig.currentColors.brand + } + @objc(brandHighColor) + static var brandHigh: UIColor { + MisticaConfig.currentColors.brandHigh + } + @objc(inverseColor) + static var inverse: UIColor { + MisticaConfig.currentColors.inverse + } + @objc(neutralHighColor) + static var neutralHigh: UIColor { + MisticaConfig.currentColors.neutralHigh + } + @objc(neutralMediumColor) + static var neutralMedium: UIColor { + MisticaConfig.currentColors.neutralMedium + } + @objc(neutralMediumInverseColor) + static var neutralMediumInverse: UIColor { + MisticaConfig.currentColors.neutralMediumInverse + } + @objc(neutralLowColor) + static var neutralLow: UIColor { + MisticaConfig.currentColors.neutralLow + } + @objc(neutralLowAlternativeColor) + static var neutralLowAlternative: UIColor { + MisticaConfig.currentColors.neutralLowAlternative + } + @objc(textPrimaryColor) + static var textPrimary: UIColor { + MisticaConfig.currentColors.textPrimary + } + @objc(textPrimaryInverseColor) + static var textPrimaryInverse: UIColor { + MisticaConfig.currentColors.textPrimaryInverse + } + @objc(textSecondaryColor) + static var textSecondary: UIColor { + MisticaConfig.currentColors.textSecondary + } + @objc(textSecondaryInverseColor) + static var textSecondaryInverse: UIColor { + MisticaConfig.currentColors.textSecondaryInverse + } + @objc(successColor) + static var success: UIColor { + MisticaConfig.currentColors.success + } + @objc(warningColor) + static var warning: UIColor { + MisticaConfig.currentColors.warning + } + @objc(errorColor) + static var error: UIColor { + MisticaConfig.currentColors.error + } + @objc(textErrorColor) + static var textError: UIColor { + MisticaConfig.currentColors.textError + } + @objc(textErrorInverseColor) + static var textErrorInverse: UIColor { + MisticaConfig.currentColors.textErrorInverse + } + @objc(promoColor) + static var promo: UIColor { + MisticaConfig.currentColors.promo + } + @objc(highlightColor) + static var highlight: UIColor { + MisticaConfig.currentColors.highlight + } + @objc(successLowColor) + static var successLow: UIColor { + MisticaConfig.currentColors.successLow + } + @objc(warningLowColor) + static var warningLow: UIColor { + MisticaConfig.currentColors.warningLow + } + @objc(errorLowColor) + static var errorLow: UIColor { + MisticaConfig.currentColors.errorLow + } + @objc(promoLowColor) + static var promoLow: UIColor { + MisticaConfig.currentColors.promoLow + } + @objc(brandLowColor) + static var brandLow: UIColor { + MisticaConfig.currentColors.brandLow + } + @objc(successHighColor) + static var successHigh: UIColor { + MisticaConfig.currentColors.successHigh + } + @objc(warningHighColor) + static var warningHigh: UIColor { + MisticaConfig.currentColors.warningHigh + } + @objc(errorHighColor) + static var errorHigh: UIColor { + MisticaConfig.currentColors.errorHigh + } + @objc(promoHighColor) + static var promoHigh: UIColor { + MisticaConfig.currentColors.promoHigh + } + @objc(successHighInverseColor) + static var successHighInverse: UIColor { + MisticaConfig.currentColors.successHighInverse + } + @objc(warningHighInverseColor) + static var warningHighInverse: UIColor { + MisticaConfig.currentColors.warningHighInverse + } + @objc(errorHighInverseColor) + static var errorHighInverse: UIColor { + MisticaConfig.currentColors.errorHighInverse + } + @objc(promoHighInverseColor) + static var promoHighInverse: UIColor { + MisticaConfig.currentColors.promoHighInverse + } + @objc(textNavigationBarPrimaryColor) + static var textNavigationBarPrimary: UIColor { + MisticaConfig.currentColors.textNavigationBarPrimary + } + @objc(textNavigationBarSecondaryColor) + static var textNavigationBarSecondary: UIColor { + MisticaConfig.currentColors.textNavigationBarSecondary + } + @objc(textNavigationSearchBarHintColor) + static var textNavigationSearchBarHint: UIColor { + MisticaConfig.currentColors.textNavigationSearchBarHint + } + @objc(textNavigationSearchBarTextColor) + static var textNavigationSearchBarText: UIColor { + MisticaConfig.currentColors.textNavigationSearchBarText + } + @objc(textAppBarColor) + static var textAppBar: UIColor { + MisticaConfig.currentColors.textAppBar + } + @objc(textAppBarSelectedColor) + static var textAppBarSelected: UIColor { + MisticaConfig.currentColors.textAppBarSelected + } + @objc(customTabsBackgroundColor) + static var customTabsBackground: UIColor { + MisticaConfig.currentColors.customTabsBackground + } + @objc(tagTextPromoColor) + static var tagTextPromo: UIColor { + MisticaConfig.currentColors.tagTextPromo + } + @objc(tagTextActiveColor) + static var tagTextActive: UIColor { + MisticaConfig.currentColors.tagTextActive + } + @objc(tagTextInactiveColor) + static var tagTextInactive: UIColor { + MisticaConfig.currentColors.tagTextInactive + } + @objc(tagTextSuccessColor) + static var tagTextSuccess: UIColor { + MisticaConfig.currentColors.tagTextSuccess + } + @objc(tagTextWarningColor) + static var tagTextWarning: UIColor { + MisticaConfig.currentColors.tagTextWarning + } + @objc(tagTextErrorColor) + static var tagTextError: UIColor { + MisticaConfig.currentColors.tagTextError + } + @objc(tagBackgroundPromoColor) + static var tagBackgroundPromo: UIColor { + MisticaConfig.currentColors.tagBackgroundPromo + } + @objc(tagBackgroundActiveColor) + static var tagBackgroundActive: UIColor { + MisticaConfig.currentColors.tagBackgroundActive + } + @objc(tagBackgroundInactiveColor) + static var tagBackgroundInactive: UIColor { + MisticaConfig.currentColors.tagBackgroundInactive + } + @objc(tagBackgroundSuccessColor) + static var tagBackgroundSuccess: UIColor { + MisticaConfig.currentColors.tagBackgroundSuccess + } + @objc(tagBackgroundWarningColor) + static var tagBackgroundWarning: UIColor { + MisticaConfig.currentColors.tagBackgroundWarning + } + @objc(tagBackgroundErrorColor) + static var tagBackgroundError: UIColor { + MisticaConfig.currentColors.tagBackgroundError + } +} \ No newline at end of file diff --git a/scripts/mistica-importer/generators/colors/__tests__/expected-mistica-color.swift b/scripts/mistica-importer/generators/colors/__tests__/expected-mistica-color.swift new file mode 100644 index 00000000..3546c779 --- /dev/null +++ b/scripts/mistica-importer/generators/colors/__tests__/expected-mistica-color.swift @@ -0,0 +1,22 @@ + +// Generated using Make +// DO NOT EDIT + +import UIKit + +public enum MisticaColor { + case solid(UIColor) + case gradient(MisticaGradient) +} + +public extension MisticaColor { + static var backgroundBrand: MisticaColor { + MisticaConfig.currentColors.backgroundBrand + } + static var backgroundContainerBrand: MisticaColor { + MisticaConfig.currentColors.backgroundContainerBrand + } + static var cardContentOverlay: MisticaColor { + MisticaConfig.currentColors.cardContentOverlay + } +} diff --git a/scripts/mistica-importer/generators/colors/__tests__/expected-mistica-colors.swift b/scripts/mistica-importer/generators/colors/__tests__/expected-mistica-colors.swift new file mode 100644 index 00000000..b865092d --- /dev/null +++ b/scripts/mistica-importer/generators/colors/__tests__/expected-mistica-colors.swift @@ -0,0 +1,138 @@ + +// Generated using Make +// DO NOT EDIT + +import UIKit + +public protocol MisticaColors { + var background: UIColor { get } + var backgroundAlternative: UIColor { get } + var backgroundBrand: MisticaColor { get } + var backgroundBrandSecondary: UIColor { get } + var backgroundContainer: UIColor { get } + var backgroundContainerError: UIColor { get } + var backgroundContainerHover: UIColor { get } + var backgroundContainerPressed: UIColor { get } + var backgroundContainerBrand: MisticaColor { get } + var backgroundContainerBrandHover: UIColor { get } + var backgroundContainerBrandPressed: UIColor { get } + var backgroundContainerBrandOverInverse: UIColor { get } + var backgroundContainerAlternative: UIColor { get } + var backgroundOverlay: UIColor { get } + var backgroundSkeleton: UIColor { get } + var backgroundSkeletonInverse: UIColor { get } + var backgroundBrandTop: UIColor { get } + var backgroundBrandBottom: UIColor { get } + var appBarBackground: UIColor { get } + var navigationBarBackground: UIColor { get } + var skeletonWave: UIColor { get } + var borderLow: UIColor { get } + var border: UIColor { get } + var borderHigh: UIColor { get } + var borderSelected: UIColor { get } + var coverBackgroundHover: UIColor { get } + var coverBackgroundPressed: UIColor { get } + var buttonDangerBackground: UIColor { get } + var buttonDangerBackgroundSelected: UIColor { get } + var buttonDangerBackgroundHover: UIColor { get } + var buttonLinkDangerBackgroundSelected: UIColor { get } + var buttonLinkDangerBackgroundInverse: UIColor { get } + var buttonLinkDangerBackgroundInverseSelected: UIColor { get } + var buttonLinkBackgroundSelected: UIColor { get } + var buttonLinkBackgroundInverseSelected: UIColor { get } + var buttonPrimaryBackground: UIColor { get } + var buttonPrimaryBackgroundInverse: UIColor { get } + var buttonPrimaryBackgroundSelected: UIColor { get } + var buttonPrimaryBackgroundHover: UIColor { get } + var buttonPrimaryBackgroundInverseSelected: UIColor { get } + var buttonSecondaryBorder: UIColor { get } + var buttonSecondaryBorderSelected: UIColor { get } + var buttonSecondaryBackgroundHover: UIColor { get } + var buttonSecondaryBackgroundSelected: UIColor { get } + var buttonSecondaryBorderInverse: UIColor { get } + var buttonSecondaryBorderInverseSelected: UIColor { get } + var buttonSecondaryBackgroundInverseHover: UIColor { get } + var buttonSecondaryBackgroundInverseSelected: UIColor { get } + var textButtonPrimary: UIColor { get } + var textButtonPrimaryInverse: UIColor { get } + var textButtonPrimaryInverseSelected: UIColor { get } + var textButtonSecondary: UIColor { get } + var textButtonSecondarySelected: UIColor { get } + var textButtonSecondaryInverse: UIColor { get } + var textButtonSecondaryInverseSelected: UIColor { get } + var textLink: UIColor { get } + var textLinkInverse: UIColor { get } + var textLinkDanger: UIColor { get } + var textLinkSnackbar: UIColor { get } + var textActivated: UIColor { get } + var textBrand: UIColor { get } + var control: UIColor { get } + var controlActivated: UIColor { get } + var controlInverse: UIColor { get } + var controlActivatedInverse: UIColor { get } + var controlError: UIColor { get } + var barTrack: UIColor { get } + var loadingBar: UIColor { get } + var loadingBarBackground: UIColor { get } + var toggleAndroidInactive: UIColor { get } + var toggleAndroidBackgroundActive: UIColor { get } + var iosControlKnob: UIColor { get } + var divider: UIColor { get } + var dividerInverse: UIColor { get } + var navigationBarDivider: UIColor { get } + var badge: UIColor { get } + var feedbackErrorBackground: UIColor { get } + var feedbackInfoBackground: UIColor { get } + var brand: UIColor { get } + var brandHigh: UIColor { get } + var inverse: UIColor { get } + var neutralHigh: UIColor { get } + var neutralMedium: UIColor { get } + var neutralMediumInverse: UIColor { get } + var neutralLow: UIColor { get } + var neutralLowAlternative: UIColor { get } + var textPrimary: UIColor { get } + var textPrimaryInverse: UIColor { get } + var textSecondary: UIColor { get } + var textSecondaryInverse: UIColor { get } + var success: UIColor { get } + var warning: UIColor { get } + var error: UIColor { get } + var textError: UIColor { get } + var textErrorInverse: UIColor { get } + var promo: UIColor { get } + var highlight: UIColor { get } + var successLow: UIColor { get } + var warningLow: UIColor { get } + var errorLow: UIColor { get } + var promoLow: UIColor { get } + var brandLow: UIColor { get } + var successHigh: UIColor { get } + var warningHigh: UIColor { get } + var errorHigh: UIColor { get } + var promoHigh: UIColor { get } + var successHighInverse: UIColor { get } + var warningHighInverse: UIColor { get } + var errorHighInverse: UIColor { get } + var promoHighInverse: UIColor { get } + var textNavigationBarPrimary: UIColor { get } + var textNavigationBarSecondary: UIColor { get } + var textNavigationSearchBarHint: UIColor { get } + var textNavigationSearchBarText: UIColor { get } + var textAppBar: UIColor { get } + var textAppBarSelected: UIColor { get } + var customTabsBackground: UIColor { get } + var tagTextPromo: UIColor { get } + var tagTextActive: UIColor { get } + var tagTextInactive: UIColor { get } + var tagTextSuccess: UIColor { get } + var tagTextWarning: UIColor { get } + var tagTextError: UIColor { get } + var tagBackgroundPromo: UIColor { get } + var tagBackgroundActive: UIColor { get } + var tagBackgroundInactive: UIColor { get } + var tagBackgroundSuccess: UIColor { get } + var tagBackgroundWarning: UIColor { get } + var tagBackgroundError: UIColor { get } + var cardContentOverlay: MisticaColor { get } +} diff --git a/scripts/mistica-importer/generators/colors/__tests__/mistica-color-generator.test.js b/scripts/mistica-importer/generators/colors/__tests__/mistica-color-generator.test.js new file mode 100644 index 00000000..992281d4 --- /dev/null +++ b/scripts/mistica-importer/generators/colors/__tests__/mistica-color-generator.test.js @@ -0,0 +1,38 @@ +import fs from "fs"; +import { resolve } from "path"; +import { reduceColors } from "../reduce-colors"; +import { generateMisticaColor } from "../mistica-color-generator"; + +describe("generateMisticaColor", () => { + const getTokensFromFile = (file) => + JSON.parse(fs.readFileSync(resolve(__dirname, file), "utf-8")); + it("real case", () => { + const brandsWithTokens = [ + { + brand: { + id: "brand1", + prefix: "Brand1", + misticaDesignFileName: "brand-1", + }, + tokens: getTokensFromFile("brand1-tokens.json"), + }, + { + brand: { + id: "brand2", + prefix: "Brand2", + misticaDesignFileName: "brand-2", + }, + tokens: getTokensFromFile("brand2-tokens.json"), + }, + ]; + + const colors = reduceColors(brandsWithTokens); + const result = generateMisticaColor(colors); + + const expectedContent = fs.readFileSync( + resolve(__dirname, "expected-mistica-color.swift"), + "utf-8" + ); + expect(result).toBe(expectedContent); + }); +}); diff --git a/scripts/mistica-importer/generators/colors/__tests__/mistica-colors-generator.test.js b/scripts/mistica-importer/generators/colors/__tests__/mistica-colors-generator.test.js new file mode 100644 index 00000000..aa6da0b5 --- /dev/null +++ b/scripts/mistica-importer/generators/colors/__tests__/mistica-colors-generator.test.js @@ -0,0 +1,38 @@ +import fs from "fs"; +import { resolve } from "path"; +import { reduceColors } from "../reduce-colors"; +import { generateMisticaColors } from "../mistica-colors-generator"; + +describe("generateMisticaColors", () => { + const getTokensFromFile = (file) => + JSON.parse(fs.readFileSync(resolve(__dirname, file), "utf-8")); + it("real case", () => { + const brandsWithTokens = [ + { + brand: { + id: "brand1", + prefix: "Brand1", + misticaDesignFileName: "brand-1", + }, + tokens: getTokensFromFile("brand1-tokens.json"), + }, + { + brand: { + id: "brand2", + prefix: "Brand2", + misticaDesignFileName: "brand-2", + }, + tokens: getTokensFromFile("brand2-tokens.json"), + }, + ]; + + const colors = reduceColors(brandsWithTokens); + const result = generateMisticaColors(colors); + + const expectedContent = fs.readFileSync( + resolve(__dirname, "expected-mistica-colors.swift"), + "utf-8" + ); + expect(result).toBe(expectedContent); + }); +}); diff --git a/scripts/mistica-importer/generators/colors/__tests__/uicolor-toolkit-generator.test.js b/scripts/mistica-importer/generators/colors/__tests__/uicolor-toolkit-generator.test.js new file mode 100644 index 00000000..b61ef6bd --- /dev/null +++ b/scripts/mistica-importer/generators/colors/__tests__/uicolor-toolkit-generator.test.js @@ -0,0 +1,38 @@ +import fs from "fs"; +import { resolve } from "path"; +import { reduceColors } from "../reduce-colors"; +import { generateUIColorToolkit } from "../uicolor-toolkit-generator"; + +describe("generateUIColorToolkit", () => { + const getTokensFromFile = (file) => + JSON.parse(fs.readFileSync(resolve(__dirname, file), "utf-8")); + it("real case", () => { + const brandsWithTokens = [ + { + brand: { + id: "brand1", + prefix: "Brand1", + misticaDesignFileName: "brand-1", + }, + tokens: getTokensFromFile("brand1-tokens.json"), + }, + { + brand: { + id: "brand2", + prefix: "Brand2", + misticaDesignFileName: "brand-2", + }, + tokens: getTokensFromFile("brand2-tokens.json"), + }, + ]; + + const colors = reduceColors(brandsWithTokens); + const result = generateUIColorToolkit(colors); + + const expectedContent = fs.readFileSync( + resolve(__dirname, "expected-ColorUIToolkit+Color.swift"), + "utf-8" + ); + expect(result).toBe(expectedContent); + }); +}); diff --git a/scripts/mistica-importer/generators/colors/brand-colors-generator.js b/scripts/mistica-importer/generators/colors/brand-colors-generator.js new file mode 100644 index 00000000..afd23628 --- /dev/null +++ b/scripts/mistica-importer/generators/colors/brand-colors-generator.js @@ -0,0 +1,126 @@ +import { GRADIENT_COLOR, MISTICA_COLOR, UI_COLOR } from "./reduce-colors.js"; + +export const generateBrandColors = (brand, colors, palette) => { + const paletteProps = Object.entries(palette) + .filter((entry) => { + if (entry[1].type === "color") { + return true; + } else { + console.warn(`Unknown color type ${entry[0]} in ${brand.id} palette`); + } + }) + .map((entry) => ({ + name: entry[0], + hex: entry[1].value, + })); + + const tokenProps = Object.entries(colors).map(([colorId, color]) => ({ + name: colorId, + darkValue: color.darkValue[brand.id], + lightValue: color.lightValue[brand.id], + darkType: color.darkType[brand.id], + lightType: color.lightType[brand.id], + commonType: color.commonType, + })); + + return template(brand.prefix, paletteProps, tokenProps); +}; + +const template = (prefix, paletteProps, tokenProps) => ` +// Generated using Make +// DO NOT EDIT + +import UIKit + +struct ${prefix}Colors: MisticaColors { + static let palette = ${prefix}ColorPalette() +${tokenProps + .map( + (tokenProp) => ` let ${tokenProp.name} = ${mapColor(prefix, tokenProp)}` + ) + .join("\n")} +} + +public struct ${prefix}ColorPalette { + public init() {} +${paletteProps + .map( + (paletteProp) => + ` public let ${paletteProp.name} = UIColor(hex: "${paletteProp.hex}")!` + ) + .join("\n")} +}`; + +const mapColor = (prefix, tokenProp) => { + switch (tokenProp.commonType) { + case MISTICA_COLOR: + if (tokenProp.lightType == UI_COLOR && tokenProp.darkType == UI_COLOR) { + return `MisticaColor.solid(${mapSolidColors( + prefix, + tokenProp.lightValue, + tokenProp.darkValue + )})`; + } else { + return mapGradientColor( + prefix, + tokenProp.lightType, + tokenProp.lightValue, + tokenProp.darkType, + tokenProp.darkValue + ); + } + case UI_COLOR: + return mapSolidColors(prefix, tokenProp.lightValue, tokenProp.darkValue); + default: + console.error(`Unexpected type: ${tokenProp.commonType}`); + return "/* ERROR */"; + } +}; + +const mapSolidColor = (prefix, value) => { + if (value.includes("rgb")) { + return value.replace( + /rgba\(\{([a-zA-Z0-9.]+)\},\s*([0-9.]+)\)/, + `${prefix}Colors.$1.withAlphaComponent($2)` + ); + } else { + return `${prefix}Colors.${value.replace(/{|}/g, "")}`; + } +}; + +const mapSolidColors = (prefix, lightValue, darkValue) => + `${mapSolidColor(prefix, lightValue)} | ${mapSolidColor(prefix, darkValue)}`; + +const mapGradientColor = ( + prefix, + lightType, + lightValue, + darkType, + darkValue +) => { + const angle = lightValue.angle || darkValue.angle; + const stops = + mapStops(lightValue.colors) || mapStops(lightValue.colorsdarkValue.colors); + let colors = []; + const colorsLength = Math.max( + lightValue.colors?.length || 0, + darkValue.colors?.length || 0 + ); + for (let colorIndex = 0; colorIndex < colorsLength; colorIndex++) { + const lightColor = + lightType === UI_COLOR ? lightValue : lightValue.colors[colorIndex].value; + const darkColor = + darkType === UI_COLOR ? darkValue : darkValue.colors[colorIndex].value; + colors.push(mapSolidColors(prefix, lightColor, darkColor)); + } + return `MisticaColor.gradient(MisticaGradient( + colors: + [ +${colors.map((color) => ` ${color}`).join(",\n")} + ], + stops: ${JSON.stringify(stops)}, + angle: ${angle} + ))`; +}; + +const mapStops = (colors) => colors.map((color) => color.stop); diff --git a/scripts/mistica-importer/generators/colors/color-toolkit-generator.js b/scripts/mistica-importer/generators/colors/color-toolkit-generator.js new file mode 100644 index 00000000..ffcd9460 --- /dev/null +++ b/scripts/mistica-importer/generators/colors/color-toolkit-generator.js @@ -0,0 +1,31 @@ +import { UI_COLOR } from "./reduce-colors.js"; + +export const generateColorToolkit = (colors) => { + const misticaColors = Object.entries(colors).filter( + (color) => color[1].commonType === UI_COLOR + ); + + return template(misticaColors); +}; + +const template = (props) => ` +// Generated using Make +// DO NOT EDIT + +import SwiftUI + +public extension Color { +${props + .map( + (prop) => ` static var ${prop[0]}: Color { + MisticaConfig.currentColors.${prop[0]}.color + }` + ) + .join("\n")} +} + +private extension UIColor { + var color: Color { + Color(self) + } +}`; diff --git a/scripts/mistica-importer/generators/colors/mistica-color-generator.js b/scripts/mistica-importer/generators/colors/mistica-color-generator.js new file mode 100644 index 00000000..1b439da9 --- /dev/null +++ b/scripts/mistica-importer/generators/colors/mistica-color-generator.js @@ -0,0 +1,31 @@ +import { MISTICA_COLOR } from "./reduce-colors.js"; + +export const generateMisticaColor = (colors) => { + const misticaColors = Object.entries(colors).filter( + (color) => color[1].commonType === MISTICA_COLOR + ); + + return template(misticaColors); +}; + +const template = (props) => ` +// Generated using Make +// DO NOT EDIT + +import UIKit + +public enum MisticaColor { + case solid(UIColor) + case gradient(MisticaGradient) +} + +public extension MisticaColor { +${props + .map( + (prop) => ` static var ${prop[0]}: ${prop[1].commonType} { + MisticaConfig.currentColors.${prop[0]} + }` + ) + .join("\n")} +} +`; diff --git a/scripts/mistica-importer/generators/colors/mistica-colors-generator.js b/scripts/mistica-importer/generators/colors/mistica-colors-generator.js new file mode 100644 index 00000000..8bc19059 --- /dev/null +++ b/scripts/mistica-importer/generators/colors/mistica-colors-generator.js @@ -0,0 +1,15 @@ +export const generateMisticaColors = (colors) => + template(Object.entries(colors)); + +const template = (props) => ` +// Generated using Make +// DO NOT EDIT + +import UIKit + +public protocol MisticaColors { +${props + .map((prop) => ` var ${prop[0]}: ${prop[1].commonType} { get }`) + .join("\n")} +} +`; diff --git a/scripts/mistica-importer/generators/colors/reduce-colors.js b/scripts/mistica-importer/generators/colors/reduce-colors.js new file mode 100644 index 00000000..2df9ea74 --- /dev/null +++ b/scripts/mistica-importer/generators/colors/reduce-colors.js @@ -0,0 +1,59 @@ +export const MISTICA_COLOR = "MisticaColor"; +export const UI_COLOR = "UIColor"; +export const GRADIENT_COLOR = "MisticaGradient"; + +export const reduceColors = (brandsWithTokens) => + brandsWithTokens.reduce((acc, brandWithTokens) => { + const brandId = brandWithTokens.brand.id; + const light = brandWithTokens.tokens.light; + Object.entries(light).forEach((entry) => { + const colorToken = entry[0]; + const type = mapType(entry[1]["type"]); + if (type !== undefined) { + const value = entry[1]["value"]; + acc[colorToken] = { + ...acc[colorToken], + commonType: getCommonType(acc[colorToken]?.commonType, type), + lightValue: { ...acc[colorToken]?.lightValue, [brandId]: value }, + lightType: { ...acc[colorToken]?.lightType, [brandId]: type }, + }; + } else { + console.error(`Unknown type for ${entry[0]} ${entry[1]}`); + } + }); + + const dark = brandWithTokens.tokens.dark; + Object.entries(dark).forEach((entry) => { + const colorToken = entry[0]; + const type = mapType(entry[1]["type"]); + if (type !== undefined) { + const value = entry[1]["value"]; + acc[colorToken] = { + ...acc[colorToken], + commonType: getCommonType(acc[colorToken]?.commonType, type), + darkValue: { ...acc[colorToken]?.darkValue, [brandId]: value }, + darkType: { ...acc[colorToken]?.darkType, [brandId]: type }, + }; + } + }); + + return acc; + }, {}); + +const mapType = (type) => { + switch (type) { + case "color": + return UI_COLOR; + case "linear-gradient": + return GRADIENT_COLOR; + default: + console.warn(`Unknown token type ${type}`); + return undefined; + } +}; + +const getCommonType = (previous, current) => { + if (previous !== undefined && previous !== current) return MISTICA_COLOR; + if (current === GRADIENT_COLOR) return MISTICA_COLOR; + else return current; +}; diff --git a/scripts/mistica-importer/generators/colors/uicolor-toolkit-generator.js b/scripts/mistica-importer/generators/colors/uicolor-toolkit-generator.js new file mode 100644 index 00000000..0439a3d3 --- /dev/null +++ b/scripts/mistica-importer/generators/colors/uicolor-toolkit-generator.js @@ -0,0 +1,26 @@ +import { UI_COLOR } from "./reduce-colors.js"; + +export const generateUIColorToolkit = (colors) => { + const misticaColors = Object.entries(colors).filter( + (color) => color[1].commonType === UI_COLOR + ); + + return template(misticaColors); +}; + +const template = (props) => ` +// Generated using Make +// DO NOT EDIT + +import UIKit + +public extension UIColor { +${props + .map( + (prop) => ` @objc(${prop[0]}Color) + static var ${prop[0]}: UIColor { + MisticaConfig.currentColors.${prop[0]} + }` + ) + .join("\n")} +}`; diff --git a/scripts/mistica-importer/generators/corner-radius/__tests__/any-brand-tokens.json b/scripts/mistica-importer/generators/corner-radius/__tests__/any-brand-tokens.json new file mode 100644 index 00000000..197790fc --- /dev/null +++ b/scripts/mistica-importer/generators/corner-radius/__tests__/any-brand-tokens.json @@ -0,0 +1,1438 @@ +{ + "light": { + "background": { + "value": "{palette.white}", + "type": "color", + "description": "white" + }, + "backgroundAlternative": { + "value": "{palette.grey20}", + "type": "color", + "description": "grey20" + }, + "backgroundBrand": { + "type": "linear-gradient", + "value": { + "angle": 180, + "colors": [ + { "value": "{palette.darkBlue}", "stop": 0 }, + { "value": "{palette.beyondBlue}", "stop": 0.64 }, + { "value": "{palette.beyondBlue45}", "stop": 1 } + ] + }, + "description": "o2Gradient" + }, + "backgroundBrandSecondary": { + "value": "{palette.beyondBlue}", + "type": "color", + "description": "beyondBlue" + }, + "backgroundContainer": { + "value": "{palette.white}", + "type": "color", + "description": "white" + }, + "backgroundContainerError": { + "value": "{palette.o2Red10}", + "type": "color", + "description": "o2Red10" + }, + "backgroundContainerHover": { + "value": "rgba({palette.darkModeBlack}, 0.03)", + "type": "color", + "description": "darkModeBlack" + }, + "backgroundContainerPressed": { + "value": "rgba({palette.darkModeBlack}, 0.05)", + "type": "color", + "description": "darkModeBlack" + }, + "backgroundContainerBrand": { + "type": "linear-gradient", + "value": { + "angle": 180, + "colors": [ + { "value": "{palette.darkBlue}", "stop": 0 }, + { "value": "{palette.beyondBlue}", "stop": 0.64 }, + { "value": "{palette.beyondBlue45}", "stop": 1 } + ] + }, + "description": "o2Gradient" + }, + "backgroundContainerBrandHover": { + "value": "rgba({palette.darkModeBlack}, 0.2)", + "type": "color", + "description": "darkModeBlack" + }, + "backgroundContainerBrandPressed": { + "value": "rgba({palette.darkModeBlack}, 0.4)", + "type": "color", + "description": "darkModeBlack" + }, + "backgroundContainerBrandOverInverse": { + "value": "{palette.beyondBlue70}", + "type": "color", + "description": "beyondBlue70" + }, + "backgroundContainerAlternative": { + "value": "{palette.grey20}", + "type": "color", + "description": "grey20" + }, + "backgroundOverlay": { + "value": "rgba({palette.black}, 0.6)", + "type": "color", + "description": "black" + }, + "backgroundSkeleton": { + "value": "{palette.grey30}", + "type": "color", + "description": "grey30" + }, + "backgroundSkeletonInverse": { + "value": "{palette.beyondBlue70}", + "type": "color", + "description": "beyondBlue70" + }, + "backgroundBrandTop": { + "value": "{palette.darkBlue}", + "type": "color", + "description": "darkBlue" + }, + "backgroundBrandBottom": { + "value": "{palette.beyondBlue45}", + "type": "color", + "description": "beyondBlue45" + }, + "appBarBackground": { + "value": "{palette.white}", + "type": "color", + "description": "white" + }, + "navigationBarBackground": { + "value": "{palette.darkBlue}", + "type": "color", + "description": "darkBlue" + }, + "skeletonWave": { + "value": "{palette.grey30}", + "type": "color", + "description": "grey30" + }, + "borderLow": { + "value": "{palette.grey20}", + "type": "color", + "description": "grey20" + }, + "border": { + "value": "{palette.grey30}", + "type": "color", + "description": "grey30" + }, + "borderHigh": { + "value": "{palette.grey80}", + "type": "color", + "description": "grey80" + }, + "borderSelected": { + "value": "{palette.beyondBlue}", + "type": "color", + "description": "beyondBlue" + }, + "coverBackgroundHover": { + "value": "rgba({palette.darkModeBlack}, 0.25)", + "type": "color", + "description": "darkModeBlack" + }, + "coverBackgroundPressed": { + "value": "rgba({palette.darkModeBlack}, 0.35)", + "type": "color", + "description": "darkModeBlack" + }, + "buttonDangerBackground": { + "value": "{palette.o2Red60}", + "type": "color", + "description": "o2Red60" + }, + "buttonDangerBackgroundSelected": { + "value": "{palette.o2Red65}", + "type": "color", + "description": "o2Red65" + }, + "buttonDangerBackgroundHover": { + "value": "{palette.o2Red65}", + "type": "color", + "description": "o2Red65" + }, + "buttonLinkDangerBackgroundSelected": { + "value": "{palette.o2Red10}", + "type": "color", + "description": "o2Red10" + }, + "buttonLinkDangerBackgroundInverse": { + "value": "{palette.white}", + "type": "color", + "description": "white" + }, + "buttonLinkDangerBackgroundInverseSelected": { + "value": "{palette.o2Red10}", + "type": "color", + "description": "o2Red10" + }, + "buttonLinkBackgroundSelected": { + "value": "{palette.beyondBlue10}", + "type": "color", + "description": "beyondBlue10" + }, + "buttonLinkBackgroundInverseSelected": { + "value": "rgba({palette.white}, 0.08)", + "type": "color", + "description": "white" + }, + "buttonPrimaryBackground": { + "value": "{palette.beyondBlue}", + "type": "color", + "description": "beyondBlue" + }, + "buttonPrimaryBackgroundInverse": { + "value": "{palette.white}", + "type": "color", + "description": "white" + }, + "buttonPrimaryBackgroundSelected": { + "value": "{palette.beyondBlue70}", + "type": "color", + "description": "beyondBlue70" + }, + "buttonPrimaryBackgroundHover": { + "value": "{palette.beyondBlue70}", + "type": "color", + "description": "beyondBlue70" + }, + "buttonPrimaryBackgroundInverseSelected": { + "value": "{palette.beyondBlue30}", + "type": "color", + "description": "beyondBlue30" + }, + "buttonSecondaryBorder": { + "value": "{palette.beyondBlue}", + "type": "color", + "description": "beyondBlue" + }, + "buttonSecondaryBorderSelected": { + "value": "{palette.beyondBlue70}", + "type": "color", + "description": "beyondBlue70" + }, + "buttonSecondaryBackgroundHover": { + "value": "{palette.beyondBlue10}", + "type": "color", + "description": "beyondBlue10" + }, + "buttonSecondaryBackgroundSelected": { + "value": "{palette.beyondBlue10}", + "type": "color", + "description": "beyondBlue10" + }, + "buttonSecondaryBorderInverse": { + "value": "{palette.white}", + "type": "color", + "description": "white" + }, + "buttonSecondaryBorderInverseSelected": { + "value": "{palette.beyondBlue30}", + "type": "color", + "description": "beyondBlue30" + }, + "buttonSecondaryBackgroundInverseHover": { + "value": "rgba({palette.white}, 0.15)", + "type": "color", + "description": "white" + }, + "buttonSecondaryBackgroundInverseSelected": { + "value": "rgba({palette.white}, 0.15)", + "type": "color", + "description": "white" + }, + "textButtonPrimary": { + "value": "{palette.white}", + "type": "color", + "description": "white" + }, + "textButtonPrimaryInverse": { + "value": "{palette.beyondBlue}", + "type": "color", + "description": "beyondBlue" + }, + "textButtonPrimaryInverseSelected": { + "value": "{palette.beyondBlue70}", + "type": "color", + "description": "beyondBlue70" + }, + "textButtonSecondary": { + "value": "{palette.beyondBlue}", + "type": "color", + "description": "beyondBlue" + }, + "textButtonSecondarySelected": { + "value": "{palette.beyondBlue70}", + "type": "color", + "description": "beyondBlue70" + }, + "textButtonSecondaryInverse": { + "value": "{palette.white}", + "type": "color", + "description": "white" + }, + "textButtonSecondaryInverseSelected": { + "value": "{palette.white}", + "type": "color", + "description": "white" + }, + "textLink": { + "value": "{palette.beyondBlue}", + "type": "color", + "description": "beyondBlue" + }, + "textLinkInverse": { + "value": "{palette.white}", + "type": "color", + "description": "white" + }, + "textLinkDanger": { + "value": "{palette.o2Red65}", + "type": "color", + "description": "o2Red65" + }, + "textLinkSnackbar": { + "value": "{palette.beyondBlue30}", + "type": "color", + "description": "beyondBlue30" + }, + "textActivated": { + "value": "{palette.beyondBlue}", + "type": "color", + "description": "beyondBlue" + }, + "textBrand": { + "value": "{palette.beyondBlue}", + "type": "color", + "description": "beyondBlue" + }, + "control": { + "value": "{palette.grey45}", + "type": "color", + "description": "grey45" + }, + "controlActivated": { + "value": "{palette.beyondBlue}", + "type": "color", + "description": "beyondBlue" + }, + "controlInverse": { + "value": "{palette.white}", + "type": "color", + "description": "white" + }, + "controlActivatedInverse": { + "value": "{palette.white}", + "type": "color", + "description": "white" + }, + "controlError": { + "value": "{palette.o2Red60}", + "type": "color", + "description": "o2Red60" + }, + "barTrack": { + "value": "{palette.grey30}", + "type": "color", + "description": "grey30" + }, + "loadingBar": { + "value": "{palette.beyondBlue}", + "type": "color", + "description": "beyondBlue" + }, + "loadingBarBackground": { + "value": "{palette.grey20}", + "type": "color", + "description": "grey20" + }, + "toggleAndroidInactive": { + "value": "{palette.grey30}", + "type": "color", + "description": "grey30" + }, + "toggleAndroidBackgroundActive": { + "value": "{palette.beyondBlue15}", + "type": "color", + "description": "beyondBlue15" + }, + "iosControlKnob": { + "value": "{palette.white}", + "type": "color", + "description": "white" + }, + "divider": { + "value": "{palette.grey30}", + "type": "color", + "description": "grey30" + }, + "dividerInverse": { + "value": "rgba({palette.white}, 0.2)", + "type": "color", + "description": "white" + }, + "navigationBarDivider": { + "value": "{palette.darkBlue}", + "type": "color", + "description": "darkBlue" + }, + "badge": { + "value": "{palette.o2Red65}", + "type": "color", + "description": "o2Red65" + }, + "feedbackErrorBackground": { + "value": "{palette.o2Red60}", + "type": "color", + "description": "o2Red60" + }, + "feedbackInfoBackground": { + "value": "{palette.black}", + "type": "color", + "description": "black" + }, + "brand": { + "value": "{palette.beyondBlue}", + "type": "color", + "description": "beyondBlue" + }, + "brandHigh": { + "value": "{palette.beyondBlue70}", + "type": "color", + "description": "beyondBlue70" + }, + "inverse": { + "value": "{palette.white}", + "type": "color", + "description": "white" + }, + "neutralHigh": { + "value": "{palette.black}", + "type": "color", + "description": "black" + }, + "neutralMedium": { + "value": "{palette.grey60}", + "type": "color", + "description": "grey60" + }, + "neutralMediumInverse": { + "value": "{palette.grey60}", + "type": "color", + "description": "grey60" + }, + "neutralLow": { + "value": "{palette.grey20}", + "type": "color", + "description": "grey20" + }, + "neutralLowAlternative": { + "value": "{palette.grey30}", + "type": "color", + "description": "grey30" + }, + "textPrimary": { + "value": "{palette.black}", + "type": "color", + "description": "black" + }, + "textPrimaryInverse": { + "value": "{palette.white}", + "type": "color", + "description": "white" + }, + "textSecondary": { + "value": "{palette.grey60}", + "type": "color", + "description": "grey60" + }, + "textSecondaryInverse": { + "value": "{palette.beyondBlue10}", + "type": "color", + "description": "beyondBlue10" + }, + "success": { + "value": "{palette.o2Green}", + "type": "color", + "description": "o2Green" + }, + "warning": { + "value": "{palette.o2Orange}", + "type": "color", + "description": "o2Orange" + }, + "error": { + "value": "{palette.o2Red65}", + "type": "color", + "description": "o2Red65" + }, + "textError": { + "value": "{palette.o2Red65}", + "type": "color", + "description": "o2Red65" + }, + "textErrorInverse": { + "value": "{palette.white}", + "type": "color", + "description": "white" + }, + "promo": { + "value": "{palette.o2Pink}", + "type": "color", + "description": "o2Pink" + }, + "highlight": { + "value": "{palette.o2Pink80}", + "type": "color", + "description": "o2Pink80" + }, + "successLow": { + "value": "{palette.o2Green10}", + "type": "color", + "description": "o2Green10" + }, + "warningLow": { + "value": "{palette.o2Orange10}", + "type": "color", + "description": "o2Orange10" + }, + "errorLow": { + "value": "{palette.o2Red10}", + "type": "color", + "description": "o2Red10" + }, + "promoLow": { + "value": "{palette.o2Pink15}", + "type": "color", + "description": "o2Pink15" + }, + "brandLow": { + "value": "{palette.beyondBlue10}", + "type": "color", + "description": "beyondBlue10" + }, + "successHigh": { + "value": "{palette.o2Green80}", + "type": "color", + "description": "o2Green80" + }, + "warningHigh": { + "value": "{palette.o2Orange75}", + "type": "color", + "description": "o2Orange75" + }, + "errorHigh": { + "value": "{palette.o2Red65}", + "type": "color", + "description": "o2Red65" + }, + "promoHigh": { + "value": "{palette.o2Pink80}", + "type": "color", + "description": "o2Pink80" + }, + "successHighInverse": { + "value": "{palette.o2Green80}", + "type": "color", + "description": "o2Green80" + }, + "warningHighInverse": { + "value": "{palette.o2Orange75}", + "type": "color", + "description": "o2Orange75" + }, + "errorHighInverse": { + "value": "{palette.o2Red65}", + "type": "color", + "description": "o2Red65" + }, + "promoHighInverse": { + "value": "{palette.o2Pink80}", + "type": "color", + "description": "o2Pink80" + }, + "textNavigationBarPrimary": { + "value": "{palette.white}", + "type": "color", + "description": "white" + }, + "textNavigationBarSecondary": { + "value": "{palette.beyondBlue30}", + "type": "color", + "description": "beyondBlue30" + }, + "textNavigationSearchBarHint": { + "value": "{palette.beyondBlue30}", + "type": "color", + "description": "beyondBlue30" + }, + "textNavigationSearchBarText": { + "value": "{palette.white}", + "type": "color", + "description": "white" + }, + "textAppBar": { + "value": "{palette.grey60}", + "type": "color", + "description": "grey60" + }, + "textAppBarSelected": { + "value": "{palette.beyondBlue}", + "type": "color", + "description": "beyondBlue" + }, + "customTabsBackground": { + "value": "{palette.beyondBlue}", + "type": "color", + "description": "beyondBlue" + }, + "tagTextPromo": { + "value": "{palette.o2Pink80}", + "type": "color", + "description": "o2Pink80" + }, + "tagTextActive": { + "value": "{palette.beyondBlue}", + "type": "color", + "description": "beyondBlue" + }, + "tagTextInactive": { + "value": "{palette.grey60}", + "type": "color", + "description": "grey60" + }, + "tagTextSuccess": { + "value": "{palette.o2Green80}", + "type": "color", + "description": "o2Green80" + }, + "tagTextWarning": { + "value": "{palette.o2Orange75}", + "type": "color", + "description": "o2Orange75" + }, + "tagTextError": { + "value": "{palette.o2Red65}", + "type": "color", + "description": "o2Red65" + }, + "tagBackgroundPromo": { + "value": "{palette.o2Pink15}", + "type": "color", + "description": "o2Pink15" + }, + "tagBackgroundActive": { + "value": "{palette.beyondBlue10}", + "type": "color", + "description": "beyondBlue10" + }, + "tagBackgroundInactive": { + "value": "{palette.grey20}", + "type": "color", + "description": "grey20" + }, + "tagBackgroundSuccess": { + "value": "{palette.o2Green10}", + "type": "color", + "description": "o2Green10" + }, + "tagBackgroundWarning": { + "value": "{palette.o2Orange10}", + "type": "color", + "description": "o2Orange10" + }, + "tagBackgroundError": { + "value": "{palette.o2Red10}", + "type": "color", + "description": "o2Red10" + }, + "cardContentOverlay": { + "type": "linear-gradient", + "value": { + "angle": 180, + "colors": [ + { "value": "rgba({palette.beyondBlue}, 0)", "stop": 0 }, + { "value": "rgba({palette.beyondBlue}, 0.4)", "stop": 0.3 }, + { "value": "rgba({palette.beyondBlue}, 1)", "stop": 1 } + ] + }, + "description": "grey6" + } + }, + "dark": { + "background": { + "value": "{palette.darkModeBlack}", + "type": "color", + "description": "darkModeBlack" + }, + "backgroundAlternative": { + "value": "{palette.darkModeBlack}", + "type": "color", + "description": "darkModeBlack" + }, + "backgroundBrand": { + "value": "{palette.darkModeBlack}", + "type": "color", + "description": "darkModeBlack" + }, + "backgroundBrandSecondary": { + "value": "{palette.darkModeBlack}", + "type": "color", + "description": "darkModeBlack" + }, + "backgroundContainer": { + "value": "{palette.darkModeGrey}", + "type": "color", + "description": "darkModeGrey" + }, + "backgroundContainerError": { + "value": "{palette.darkModeGrey}", + "type": "color", + "description": "darkModeGrey" + }, + "backgroundContainerHover": { + "value": "rgba({palette.white}, 0.03)", + "type": "color", + "description": "white" + }, + "backgroundContainerPressed": { + "value": "rgba({palette.white}, 0.05)", + "type": "color", + "description": "white" + }, + "backgroundContainerBrand": { + "value": "{palette.darkModeGrey}", + "type": "color", + "description": "darkModeGrey" + }, + "backgroundContainerBrandHover": { + "value": "rgba({palette.white}, 0.03)", + "type": "color", + "description": "white" + }, + "backgroundContainerBrandPressed": { + "value": "rgba({palette.white}, 0.05)", + "type": "color", + "description": "white" + }, + "backgroundContainerBrandOverInverse": { + "value": "{palette.darkModeGrey}", + "type": "color", + "description": "darkModeGrey" + }, + "backgroundContainerAlternative": { + "value": "{palette.darkModeGrey}", + "type": "color", + "description": "darkModeGrey" + }, + "backgroundOverlay": { + "value": "rgba({palette.darkModeGrey}, 0.8)", + "type": "color", + "description": "darkModeGrey" + }, + "backgroundSkeleton": { + "value": "{palette.darkModeGrey6}", + "type": "color", + "description": "darkModeGrey6" + }, + "backgroundSkeletonInverse": { + "value": "{palette.darkModeGrey6}", + "type": "color", + "description": "darkModeGrey6" + }, + "backgroundBrandTop": { + "value": "{palette.darkModeBlack}", + "type": "color", + "description": "darkModeBlack" + }, + "backgroundBrandBottom": { + "value": "{palette.darkModeBlack}", + "type": "color", + "description": "darkModeBlack" + }, + "appBarBackground": { + "value": "{palette.darkModeGrey}", + "type": "color", + "description": "darkModeGrey" + }, + "navigationBarBackground": { + "value": "{palette.darkModeBlack}", + "type": "color", + "description": "darkModeBlack" + }, + "skeletonWave": { + "value": "{palette.grey80}", + "type": "color", + "description": "grey80" + }, + "borderLow": { + "value": "{palette.darkModeBlack}", + "type": "color", + "description": "darkModeBlack" + }, + "border": { + "value": "{palette.darkModeGrey}", + "type": "color", + "description": "darkModeGrey" + }, + "borderHigh": { + "value": "{palette.grey45}", + "type": "color", + "description": "grey45" + }, + "borderSelected": { + "value": "{palette.beyondBlue30}", + "type": "color", + "description": "beyondBlue30" + }, + "coverBackgroundHover": { + "value": "rgba({palette.darkModeBlack}, 0.25)", + "type": "color", + "description": "darkModeBlack" + }, + "coverBackgroundPressed": { + "value": "rgba({palette.darkModeBlack}, 0.35)", + "type": "color", + "description": "darkModeBlack" + }, + "buttonDangerBackground": { + "value": "{palette.o2Red60}", + "type": "color", + "description": "o2Red60" + }, + "buttonDangerBackgroundSelected": { + "value": "{palette.o2Red65}", + "type": "color", + "description": "o2Red65" + }, + "buttonDangerBackgroundHover": { + "value": "{palette.o2Red65}", + "type": "color", + "description": "o2Red65" + }, + "buttonLinkDangerBackgroundSelected": { + "value": "rgba({palette.white}, 0.08)", + "type": "color", + "description": "white" + }, + "buttonLinkDangerBackgroundInverse": { + "value": "rgba({palette.white}, 0)", + "type": "color", + "description": "white" + }, + "buttonLinkDangerBackgroundInverseSelected": { + "value": "rgba({palette.white}, 0.08)", + "type": "color", + "description": "white" + }, + "buttonLinkBackgroundSelected": { + "value": "rgba({palette.white}, 0.08)", + "type": "color", + "description": "white" + }, + "buttonLinkBackgroundInverseSelected": { + "value": "rgba({palette.white}, 0.08)", + "type": "color", + "description": "white" + }, + "buttonPrimaryBackground": { + "value": "{palette.darkModeBeyondBlue}", + "type": "color", + "description": "darkModeBeyondBlue" + }, + "buttonPrimaryBackgroundInverse": { + "value": "{palette.darkModeBeyondBlue}", + "type": "color", + "description": "darkModeBeyondBlue" + }, + "buttonPrimaryBackgroundSelected": { + "value": "{palette.beyondBlue55}", + "type": "color", + "description": "beyondBlue55" + }, + "buttonPrimaryBackgroundHover": { + "value": "{palette.beyondBlue55}", + "type": "color", + "description": "beyondBlue55" + }, + "buttonPrimaryBackgroundInverseSelected": { + "value": "{palette.beyondBlue55}", + "type": "color", + "description": "beyondBlue55" + }, + "buttonSecondaryBackgroundSelected": { + "value": "rgba({palette.white}, 0.15)", + "type": "color", + "description": "white" + }, + "buttonSecondaryBorder": { + "value": "{palette.white}", + "type": "color", + "description": "white" + }, + "buttonSecondaryBorderSelected": { + "value": "{palette.white}", + "type": "color", + "description": "white" + }, + "buttonSecondaryBorderInverse": { + "value": "{palette.white}", + "type": "color", + "description": "white" + }, + "buttonSecondaryBorderInverseSelected": { + "value": "{palette.white}", + "type": "color", + "description": "white" + }, + "buttonSecondaryBackgroundHover": { + "value": "rgba({palette.white}, 0.15)", + "type": "color", + "description": "white" + }, + "buttonSecondaryBackgroundInverseHover": { + "value": "rgba({palette.white}, 0.15)", + "type": "color", + "description": "white" + }, + "buttonSecondaryBackgroundInverseSelected": { + "value": "rgba({palette.white}, 0.15)", + "type": "color", + "description": "white" + }, + "textButtonPrimary": { + "value": "{palette.white}", + "type": "color", + "description": "white" + }, + "textButtonPrimaryInverse": { + "value": "{palette.white}", + "type": "color", + "description": "white" + }, + "textButtonPrimaryInverseSelected": { + "value": "{palette.white}", + "type": "color", + "description": "white" + }, + "textButtonSecondary": { + "value": "{palette.grey30}", + "type": "color", + "description": "grey30" + }, + "textButtonSecondarySelected": { + "value": "{palette.grey30}", + "type": "color", + "description": "grey30" + }, + "textButtonSecondaryInverse": { + "value": "{palette.grey30}", + "type": "color", + "description": "grey30" + }, + "textButtonSecondaryInverseSelected": { + "value": "{palette.grey30}", + "type": "color", + "description": "grey30" + }, + "textLink": { + "value": "{palette.beyondBlue40}", + "type": "color", + "description": "beyondBlue40" + }, + "textLinkInverse": { + "value": "{palette.beyondBlue40}", + "type": "color", + "description": "beyondBlue40" + }, + "textLinkDanger": { + "value": "{palette.o2Red45}", + "type": "color", + "description": "o2Red45" + }, + "textLinkSnackbar": { + "value": "{palette.beyondBlue30}", + "type": "color", + "description": "beyondBlue30" + }, + "textActivated": { + "value": "{palette.beyondBlue30}", + "type": "color", + "description": "beyondBlue30" + }, + "textBrand": { + "value": "{palette.beyondBlue30}", + "type": "color", + "description": "beyondBlue30" + }, + "control": { + "value": "{palette.grey45}", + "type": "color", + "description": "grey45" + }, + "controlActivated": { + "value": "{palette.darkModeBeyondBlue}", + "type": "color", + "description": "darkModeBeyondBlue" + }, + "controlInverse": { + "value": "{palette.grey45}", + "type": "color", + "description": "grey45" + }, + "controlActivatedInverse": { + "value": "{palette.darkModeBeyondBlue}", + "type": "color", + "description": "darkModeBeyondBlue" + }, + "controlError": { + "value": "{palette.o2Red45}", + "type": "color", + "description": "o2Red45" + }, + "barTrack": { + "value": "{palette.darkModeGrey6}", + "type": "color", + "description": "darkModeGrey6" + }, + "loadingBar": { + "value": "{palette.darkModeBeyondBlue}", + "type": "color", + "description": "darkModeBeyondBlue" + }, + "loadingBarBackground": { + "value": "{palette.darkModeGrey6}", + "type": "color", + "description": "darkModeGrey6" + }, + "toggleAndroidInactive": { + "value": "{palette.grey20}", + "type": "color", + "description": "grey20" + }, + "toggleAndroidBackgroundActive": { + "value": "{palette.beyondBlue15}", + "type": "color", + "description": "beyondBlue15" + }, + "iosControlKnob": { + "value": "{palette.grey30}", + "type": "color", + "description": "grey30" + }, + "badge": { + "value": "{palette.o2Red65}", + "type": "color", + "description": "o2Red65" + }, + "feedbackErrorBackground": { + "value": "{palette.o2Red60}", + "type": "color", + "description": "o2Red60" + }, + "feedbackInfoBackground": { + "value": "{palette.darkModeGrey6}", + "type": "color", + "description": "darkModeGrey6" + }, + "divider": { + "value": "rgba({palette.white}, 0.1)", + "type": "color", + "description": "white" + }, + "dividerInverse": { + "value": "rgba({palette.white}, 0.1)", + "type": "color", + "description": "white" + }, + "navigationBarDivider": { + "value": "{palette.darkModeBlack}", + "type": "color", + "description": "darkModeBlack" + }, + "brand": { + "value": "{palette.beyondBlue30}", + "type": "color", + "description": "beyondBlue30" + }, + "brandHigh": { + "value": "rgba({palette.white}, 0.05)", + "type": "color", + "description": "white" + }, + "inverse": { + "value": "{palette.grey30}", + "type": "color", + "description": "grey30" + }, + "neutralHigh": { + "value": "{palette.grey30}", + "type": "color", + "description": "grey30" + }, + "neutralMedium": { + "value": "{palette.grey60}", + "type": "color", + "description": "grey60" + }, + "neutralMediumInverse": { + "value": "{palette.grey60}", + "type": "color", + "description": "grey60" + }, + "neutralLow": { + "value": "{palette.grey80}", + "type": "color", + "description": "grey80" + }, + "neutralLowAlternative": { + "value": "{palette.grey80}", + "type": "color", + "description": "grey80" + }, + "textPrimary": { + "value": "{palette.grey30}", + "type": "color", + "description": "grey30" + }, + "textPrimaryInverse": { + "value": "{palette.grey30}", + "type": "color", + "description": "grey30" + }, + "textSecondary": { + "value": "{palette.grey45}", + "type": "color", + "description": "grey45" + }, + "textSecondaryInverse": { + "value": "{palette.grey45}", + "type": "color", + "description": "grey45" + }, + "success": { + "value": "{palette.o2Green}", + "type": "color", + "description": "o2Green" + }, + "warning": { + "value": "{palette.o2Orange}", + "type": "color", + "description": "o2Orange" + }, + "error": { + "value": "{palette.o2Red45}", + "type": "color", + "description": "o2Red45" + }, + "textError": { + "value": "{palette.o2Red45}", + "type": "color", + "description": "o2Red45" + }, + "textErrorInverse": { + "value": "{palette.o2Red45}", + "type": "color", + "description": "o2Red45" + }, + "promo": { + "value": "{palette.o2Pink}", + "type": "color", + "description": "o2Pink" + }, + "highlight": { + "value": "{palette.o2Pink}", + "type": "color", + "description": "o2Pink" + }, + "successLow": { + "value": "{palette.darkModeGrey6}", + "type": "color", + "description": "darkModeGrey6" + }, + "warningLow": { + "value": "{palette.darkModeGrey6}", + "type": "color", + "description": "darkModeGrey6" + }, + "errorLow": { + "value": "{palette.darkModeGrey6}", + "type": "color", + "description": "darkModeGrey6" + }, + "promoLow": { + "value": "{palette.darkModeGrey6}", + "type": "color", + "description": "darkModeGrey6" + }, + "brandLow": { + "value": "{palette.darkModeGrey6}", + "type": "color", + "description": "darkModeGrey6" + }, + "successHigh": { + "value": "{palette.o2Green40}", + "type": "color", + "description": "o2Green40" + }, + "warningHigh": { + "value": "{palette.o2Orange40}", + "type": "color", + "description": "o2Orange40" + }, + "errorHigh": { + "value": "{palette.o2Red40}", + "type": "color", + "description": "o2Red40" + }, + "promoHigh": { + "value": "{palette.o2Pink30}", + "type": "color", + "description": "o2Pink30" + }, + "successHighInverse": { + "value": "{palette.o2Green80}", + "type": "color", + "description": "o2Green80" + }, + "warningHighInverse": { + "value": "{palette.o2Orange75}", + "type": "color", + "description": "o2Orange75" + }, + "errorHighInverse": { + "value": "{palette.o2Red65}", + "type": "color", + "description": "o2Red65" + }, + "promoHighInverse": { + "value": "{palette.o2Pink}", + "type": "color", + "description": "o2Pink" + }, + "textNavigationBarPrimary": { + "value": "{palette.grey30}", + "type": "color", + "description": "grey30" + }, + "textNavigationBarSecondary": { + "value": "{palette.grey45}", + "type": "color", + "description": "grey45" + }, + "textNavigationSearchBarHint": { + "value": "{palette.grey45}", + "type": "color", + "description": "grey45" + }, + "textNavigationSearchBarText": { + "value": "{palette.grey30}", + "type": "color", + "description": "grey30" + }, + "textAppBar": { + "value": "{palette.grey45}", + "type": "color", + "description": "grey45" + }, + "textAppBarSelected": { + "value": "{palette.beyondBlue40}", + "type": "color", + "description": "beyondBlue40" + }, + "customTabsBackground": { + "value": "{palette.darkModeBlack}", + "type": "color", + "description": "darkModeBlack" + }, + "tagTextPromo": { + "value": "{palette.o2Pink}", + "type": "color", + "description": "o2Pink" + }, + "tagTextActive": { + "value": "{palette.beyondBlue30}", + "type": "color", + "description": "beyondBlue30" + }, + "tagTextInactive": { + "value": "{palette.grey40}", + "type": "color", + "description": "grey40" + }, + "tagTextSuccess": { + "value": "{palette.o2Green}", + "type": "color", + "description": "o2Green" + }, + "tagTextWarning": { + "value": "{palette.o2Orange}", + "type": "color", + "description": "o2Orange" + }, + "tagTextError": { + "value": "{palette.o2Red45}", + "type": "color", + "description": "o2Red45" + }, + "tagBackgroundPromo": { + "value": "{palette.darkModeGrey6}", + "type": "color", + "description": "darkModeGrey6" + }, + "tagBackgroundActive": { + "value": "{palette.darkModeGrey6}", + "type": "color", + "description": "darkModeGrey6" + }, + "tagBackgroundInactive": { + "value": "{palette.darkModeGrey6}", + "type": "color", + "description": "darkModeGrey6" + }, + "tagBackgroundSuccess": { + "value": "{palette.darkModeGrey6}", + "type": "color", + "description": "darkModeGrey6" + }, + "tagBackgroundWarning": { + "value": "{palette.darkModeGrey6}", + "type": "color", + "description": "darkModeGrey6" + }, + "tagBackgroundError": { + "value": "{palette.darkModeGrey6}", + "type": "color", + "description": "darkModeGrey6" + }, + "cardContentOverlay": { + "type": "linear-gradient", + "value": { + "angle": 180, + "colors": [ + { "value": "rgba({palette.black}, 0)", "stop": 0 }, + { "value": "rgba({palette.black}, 0.4)", "stop": 0.3 }, + { "value": "rgba({palette.black}, 0.7)", "stop": 1 } + ] + }, + "description": "grey6" + } + }, + "radius": { + "avatar": { "value": "circle", "type": "borderRadius" }, + "bar": { "value": "999", "type": "borderRadius" }, + "button": { "value": "999", "type": "borderRadius" }, + "checkbox": { "value": "2", "type": "borderRadius" }, + "container": { "value": "16", "type": "borderRadius" }, + "indicator": { "value": "999", "type": "borderRadius" }, + "input": { "value": "12", "type": "borderRadius" }, + "legacyDisplay": { "value": "16", "type": "borderRadius" }, + "popup": { "value": "8", "type": "borderRadius" }, + "sheet": { "value": "16", "type": "borderRadius" }, + "mediaSmall": { "value": "8", "type": "borderRadius" } + }, + "text": { + "weight": { + "cardTitle": { "value": "medium", "type": "typography" }, + "button": { "value": "medium", "type": "typography" }, + "tabsLabel": { "value": "medium", "type": "typography" }, + "link": { "value": "medium", "type": "typography" }, + "title1": { "value": "medium", "type": "typography" }, + "title2": { "value": "bold", "type": "typography" }, + "indicator": { "value": "medium", "type": "typography" }, + "navigationBar": { "value": "medium", "type": "typography" }, + "text5": { "value": "bold", "type": "typography" }, + "text6": { "value": "bold", "type": "typography" }, + "text7": { "value": "bold", "type": "typography" }, + "text8": { "value": "bold", "type": "typography" }, + "text9": { "value": "bold", "type": "typography" }, + "text10": { "value": "bold", "type": "typography" } + }, + "size": { + "tabsLabel": { + "value": { "mobile": 16, "desktop": 18 }, + "type": "typography" + }, + "title2": { + "value": { "mobile": 20, "desktop": 28 }, + "type": "typography" + } + }, + "lineHeight": { + "tabsLabel": { + "value": { "mobile": 24, "desktop": 24 }, + "type": "typography" + }, + "title2": { + "value": { "mobile": 24, "desktop": 32 }, + "type": "typography" + } + } + }, + "themeVariant": { + "successFeedback": { "value": "inverse", "type": "themeVariant" }, + "brandLoadingScreen": { "value": "inverse", "type": "themeVariant" } + }, + "global": { + "palette": { + "beyondBlue": { "value": "#0050FF", "type": "color" }, + "beyondBlue10": { "value": "#E5EDFF", "type": "color" }, + "beyondBlue15": { "value": "#CCDCFF", "type": "color" }, + "beyondBlue30": { "value": "#80A7FF", "type": "color" }, + "beyondBlue40": { "value": "#4D84FF", "type": "color" }, + "beyondBlue45": { "value": "#0A73EB", "type": "color" }, + "beyondBlue55": { "value": "#0044D9", "type": "color" }, + "beyondBlue70": { "value": "#0038B2", "type": "color" }, + "beyondBlue90": { "value": "#001033", "type": "color" }, + "darkBlue": { "value": "#00008C", "type": "color" }, + "o2BlueLight": { "value": "#82DCFA", "type": "color" }, + "o2BlueLight30": { "value": "#C0EEFD", "type": "color" }, + "o2BlueLight35": { "value": "#B4EAFC", "type": "color" }, + "o2Green": { "value": "#00DC7D", "type": "color" }, + "o2Green10": { "value": "#E5FBF2", "type": "color" }, + "o2Green40": { "value": "#4CE7A4", "type": "color" }, + "o2Green80": { "value": "#006338", "type": "color" }, + "o2Yellow": { "value": "#FADC00", "type": "color" }, + "o2Orange": { "value": "#FFA55A", "type": "color" }, + "o2Orange10": { "value": "#FFF6EE", "type": "color" }, + "o2Orange40": { "value": "#FFC08B", "type": "color" }, + "o2Orange75": { "value": "#996336", "type": "color" }, + "o2Pink": { "value": "#FA96FF", "type": "color" }, + "o2Pink15": { "value": "#FEEAFF", "type": "color" }, + "o2Pink30": { "value": "#FDCAFF", "type": "color" }, + "o2Pink80": { "value": "#704373", "type": "color" }, + "o2Red": { "value": "#FF5A5A", "type": "color" }, + "o2Red10": { "value": "#FFEEEE", "type": "color" }, + "o2Red20": { "value": "#FFCDCD", "type": "color" }, + "o2Red40": { "value": "#FF8B8B", "type": "color" }, + "o2Red45": { "value": "#FF7B7B", "type": "color" }, + "o2Red60": { "value": "#CC4848", "type": "color" }, + "o2Red65": { "value": "#BF4444", "type": "color" }, + "grey20": { "value": "#F3F3F5", "type": "color" }, + "grey30": { "value": "#D9D9DD", "type": "color" }, + "grey40": { "value": "#B4B4BE", "type": "color" }, + "grey45": { "value": "#8C8C9A", "type": "color" }, + "grey60": { "value": "#6E6E77", "type": "color" }, + "grey80": { "value": "#3C3C46", "type": "color" }, + "black": { "value": "#00001E", "type": "color" }, + "white": { "value": "#FFFFFF", "type": "color" }, + "darkModeBlack": { "value": "#00001C", "type": "color" }, + "darkModeGrey": { "value": "#08132B", "type": "color" }, + "darkModeGrey6": { "value": "#14213D", "type": "color" }, + "darkModeBeyondBlue": { "value": "#1A62FF", "type": "color" } + } + } +} diff --git a/scripts/mistica-importer/generators/corner-radius/__tests__/brand-font-weights-generator.test.js b/scripts/mistica-importer/generators/corner-radius/__tests__/brand-font-weights-generator.test.js new file mode 100644 index 00000000..4daab461 --- /dev/null +++ b/scripts/mistica-importer/generators/corner-radius/__tests__/brand-font-weights-generator.test.js @@ -0,0 +1,21 @@ +import fs from "fs"; +import { resolve } from "path"; +import { generateBrandCornerRadius } from "../brand-corner-radius-generator"; + +describe("generateBrandCornerRadius", () => { + it("real case", () => { + const anyBrandTokensPath = resolve(__dirname, "any-brand-tokens.json"); + const anyBrandTokens = JSON.parse( + fs.readFileSync(anyBrandTokensPath, "utf-8") + ); + const brand = { prefix: "O2New" }; + const result = generateBrandCornerRadius(brand, anyBrandTokens); + + const expectedContentPath = resolve( + __dirname, + "expected-o2-new-corner-radius.swift" + ); + const expectedContent = fs.readFileSync(expectedContentPath, "utf-8"); + expect(result).toBe(expectedContent); + }); +}); diff --git a/scripts/mistica-importer/generators/corner-radius/__tests__/expected-mistica-corner-radius.swift b/scripts/mistica-importer/generators/corner-radius/__tests__/expected-mistica-corner-radius.swift new file mode 100644 index 00000000..ceb56b83 --- /dev/null +++ b/scripts/mistica-importer/generators/corner-radius/__tests__/expected-mistica-corner-radius.swift @@ -0,0 +1,23 @@ + +// Generated using Make +// DO NOT EDIT + +import Foundation + +public enum MisticaRadiusConstants { + static let roundedRadius: CGFloat = 999.0 +} + +public protocol MisticaCornerRadius { + var avatar: CGFloat { get } + var bar: CGFloat { get } + var button: CGFloat { get } + var checkbox: CGFloat { get } + var container: CGFloat { get } + var indicator: CGFloat { get } + var input: CGFloat { get } + var legacyDisplay: CGFloat { get } + var popup: CGFloat { get } + var sheet: CGFloat { get } + var mediaSmall: CGFloat { get } +} diff --git a/scripts/mistica-importer/generators/corner-radius/__tests__/expected-o2-new-corner-radius.swift b/scripts/mistica-importer/generators/corner-radius/__tests__/expected-o2-new-corner-radius.swift new file mode 100644 index 00000000..94a68cfe --- /dev/null +++ b/scripts/mistica-importer/generators/corner-radius/__tests__/expected-o2-new-corner-radius.swift @@ -0,0 +1,19 @@ + +// Generated using Make +// DO NOT EDIT + +import Foundation + +struct O2NewCornerRadius: MisticaCornerRadius { + var avatar: CGFloat = MisticaRadiusConstants.roundedRadius + var bar: CGFloat = MisticaRadiusConstants.roundedRadius + var button: CGFloat = MisticaRadiusConstants.roundedRadius + var checkbox: CGFloat = 2 + var container: CGFloat = 16 + var indicator: CGFloat = MisticaRadiusConstants.roundedRadius + var input: CGFloat = 12 + var legacyDisplay: CGFloat = 16 + var popup: CGFloat = 8 + var sheet: CGFloat = 16 + var mediaSmall: CGFloat = 8 +} diff --git a/scripts/mistica-importer/generators/corner-radius/__tests__/mistica-font-weights-generator.test.js b/scripts/mistica-importer/generators/corner-radius/__tests__/mistica-font-weights-generator.test.js new file mode 100644 index 00000000..e2ad1766 --- /dev/null +++ b/scripts/mistica-importer/generators/corner-radius/__tests__/mistica-font-weights-generator.test.js @@ -0,0 +1,20 @@ +import fs from "fs"; +import { resolve } from "path"; +import { generateMisticaCornerRadius } from "../mistica-corner-radius-generator"; + +describe("generateMisticaCornerRadius", () => { + it("real case", () => { + const anyBrandTokensPath = resolve(__dirname, "any-brand-tokens.json"); + const anyBrandTokens = JSON.parse( + fs.readFileSync(anyBrandTokensPath, "utf-8") + ); + const result = generateMisticaCornerRadius(anyBrandTokens); + + const expectedContentPath = resolve( + __dirname, + "expected-mistica-corner-radius.swift" + ); + const expectedContent = fs.readFileSync(expectedContentPath, "utf-8"); + expect(result).toBe(expectedContent); + }); +}); diff --git a/scripts/mistica-importer/generators/corner-radius/brand-corner-radius-generator.js b/scripts/mistica-importer/generators/corner-radius/brand-corner-radius-generator.js new file mode 100644 index 00000000..dbdda8a5 --- /dev/null +++ b/scripts/mistica-importer/generators/corner-radius/brand-corner-radius-generator.js @@ -0,0 +1,24 @@ +export const generateBrandCornerRadius = (brand, tokens) => { + const cornerRadius = Object.entries(tokens["radius"]); + return template(brand.prefix, cornerRadius); +}; + +const mapValue = (value) => + value === "circle" || value === "999" + ? "MisticaRadiusConstants.roundedRadius" + : value; + +const template = (prefix, cornerRadius) => ` +// Generated using Make +// DO NOT EDIT + +import Foundation + +struct ${prefix}CornerRadius: MisticaCornerRadius { +${cornerRadius + .map( + (radius) => ` var ${radius[0]}: CGFloat = ${mapValue(radius[1].value)}` + ) + .join("\n")} +} +`; diff --git a/scripts/mistica-importer/generators/corner-radius/mistica-corner-radius-generator.js b/scripts/mistica-importer/generators/corner-radius/mistica-corner-radius-generator.js new file mode 100644 index 00000000..55691460 --- /dev/null +++ b/scripts/mistica-importer/generators/corner-radius/mistica-corner-radius-generator.js @@ -0,0 +1,19 @@ +export const generateMisticaCornerRadius = (anyBrandTokens) => { + const cornerRadius = Object.keys(anyBrandTokens["radius"]); + return template(cornerRadius); +}; + +const template = (props) => ` +// Generated using Make +// DO NOT EDIT + +import Foundation + +public enum MisticaRadiusConstants { + static let roundedRadius: CGFloat = 999.0 +} + +public protocol MisticaCornerRadius { +${props.map((prop) => ` var ${prop}: CGFloat { get }`).join("\n")} +} +`; diff --git a/scripts/mistica-importer/generators/font-sizes/__tests__/any-brand-tokens.json b/scripts/mistica-importer/generators/font-sizes/__tests__/any-brand-tokens.json new file mode 100644 index 00000000..197790fc --- /dev/null +++ b/scripts/mistica-importer/generators/font-sizes/__tests__/any-brand-tokens.json @@ -0,0 +1,1438 @@ +{ + "light": { + "background": { + "value": "{palette.white}", + "type": "color", + "description": "white" + }, + "backgroundAlternative": { + "value": "{palette.grey20}", + "type": "color", + "description": "grey20" + }, + "backgroundBrand": { + "type": "linear-gradient", + "value": { + "angle": 180, + "colors": [ + { "value": "{palette.darkBlue}", "stop": 0 }, + { "value": "{palette.beyondBlue}", "stop": 0.64 }, + { "value": "{palette.beyondBlue45}", "stop": 1 } + ] + }, + "description": "o2Gradient" + }, + "backgroundBrandSecondary": { + "value": "{palette.beyondBlue}", + "type": "color", + "description": "beyondBlue" + }, + "backgroundContainer": { + "value": "{palette.white}", + "type": "color", + "description": "white" + }, + "backgroundContainerError": { + "value": "{palette.o2Red10}", + "type": "color", + "description": "o2Red10" + }, + "backgroundContainerHover": { + "value": "rgba({palette.darkModeBlack}, 0.03)", + "type": "color", + "description": "darkModeBlack" + }, + "backgroundContainerPressed": { + "value": "rgba({palette.darkModeBlack}, 0.05)", + "type": "color", + "description": "darkModeBlack" + }, + "backgroundContainerBrand": { + "type": "linear-gradient", + "value": { + "angle": 180, + "colors": [ + { "value": "{palette.darkBlue}", "stop": 0 }, + { "value": "{palette.beyondBlue}", "stop": 0.64 }, + { "value": "{palette.beyondBlue45}", "stop": 1 } + ] + }, + "description": "o2Gradient" + }, + "backgroundContainerBrandHover": { + "value": "rgba({palette.darkModeBlack}, 0.2)", + "type": "color", + "description": "darkModeBlack" + }, + "backgroundContainerBrandPressed": { + "value": "rgba({palette.darkModeBlack}, 0.4)", + "type": "color", + "description": "darkModeBlack" + }, + "backgroundContainerBrandOverInverse": { + "value": "{palette.beyondBlue70}", + "type": "color", + "description": "beyondBlue70" + }, + "backgroundContainerAlternative": { + "value": "{palette.grey20}", + "type": "color", + "description": "grey20" + }, + "backgroundOverlay": { + "value": "rgba({palette.black}, 0.6)", + "type": "color", + "description": "black" + }, + "backgroundSkeleton": { + "value": "{palette.grey30}", + "type": "color", + "description": "grey30" + }, + "backgroundSkeletonInverse": { + "value": "{palette.beyondBlue70}", + "type": "color", + "description": "beyondBlue70" + }, + "backgroundBrandTop": { + "value": "{palette.darkBlue}", + "type": "color", + "description": "darkBlue" + }, + "backgroundBrandBottom": { + "value": "{palette.beyondBlue45}", + "type": "color", + "description": "beyondBlue45" + }, + "appBarBackground": { + "value": "{palette.white}", + "type": "color", + "description": "white" + }, + "navigationBarBackground": { + "value": "{palette.darkBlue}", + "type": "color", + "description": "darkBlue" + }, + "skeletonWave": { + "value": "{palette.grey30}", + "type": "color", + "description": "grey30" + }, + "borderLow": { + "value": "{palette.grey20}", + "type": "color", + "description": "grey20" + }, + "border": { + "value": "{palette.grey30}", + "type": "color", + "description": "grey30" + }, + "borderHigh": { + "value": "{palette.grey80}", + "type": "color", + "description": "grey80" + }, + "borderSelected": { + "value": "{palette.beyondBlue}", + "type": "color", + "description": "beyondBlue" + }, + "coverBackgroundHover": { + "value": "rgba({palette.darkModeBlack}, 0.25)", + "type": "color", + "description": "darkModeBlack" + }, + "coverBackgroundPressed": { + "value": "rgba({palette.darkModeBlack}, 0.35)", + "type": "color", + "description": "darkModeBlack" + }, + "buttonDangerBackground": { + "value": "{palette.o2Red60}", + "type": "color", + "description": "o2Red60" + }, + "buttonDangerBackgroundSelected": { + "value": "{palette.o2Red65}", + "type": "color", + "description": "o2Red65" + }, + "buttonDangerBackgroundHover": { + "value": "{palette.o2Red65}", + "type": "color", + "description": "o2Red65" + }, + "buttonLinkDangerBackgroundSelected": { + "value": "{palette.o2Red10}", + "type": "color", + "description": "o2Red10" + }, + "buttonLinkDangerBackgroundInverse": { + "value": "{palette.white}", + "type": "color", + "description": "white" + }, + "buttonLinkDangerBackgroundInverseSelected": { + "value": "{palette.o2Red10}", + "type": "color", + "description": "o2Red10" + }, + "buttonLinkBackgroundSelected": { + "value": "{palette.beyondBlue10}", + "type": "color", + "description": "beyondBlue10" + }, + "buttonLinkBackgroundInverseSelected": { + "value": "rgba({palette.white}, 0.08)", + "type": "color", + "description": "white" + }, + "buttonPrimaryBackground": { + "value": "{palette.beyondBlue}", + "type": "color", + "description": "beyondBlue" + }, + "buttonPrimaryBackgroundInverse": { + "value": "{palette.white}", + "type": "color", + "description": "white" + }, + "buttonPrimaryBackgroundSelected": { + "value": "{palette.beyondBlue70}", + "type": "color", + "description": "beyondBlue70" + }, + "buttonPrimaryBackgroundHover": { + "value": "{palette.beyondBlue70}", + "type": "color", + "description": "beyondBlue70" + }, + "buttonPrimaryBackgroundInverseSelected": { + "value": "{palette.beyondBlue30}", + "type": "color", + "description": "beyondBlue30" + }, + "buttonSecondaryBorder": { + "value": "{palette.beyondBlue}", + "type": "color", + "description": "beyondBlue" + }, + "buttonSecondaryBorderSelected": { + "value": "{palette.beyondBlue70}", + "type": "color", + "description": "beyondBlue70" + }, + "buttonSecondaryBackgroundHover": { + "value": "{palette.beyondBlue10}", + "type": "color", + "description": "beyondBlue10" + }, + "buttonSecondaryBackgroundSelected": { + "value": "{palette.beyondBlue10}", + "type": "color", + "description": "beyondBlue10" + }, + "buttonSecondaryBorderInverse": { + "value": "{palette.white}", + "type": "color", + "description": "white" + }, + "buttonSecondaryBorderInverseSelected": { + "value": "{palette.beyondBlue30}", + "type": "color", + "description": "beyondBlue30" + }, + "buttonSecondaryBackgroundInverseHover": { + "value": "rgba({palette.white}, 0.15)", + "type": "color", + "description": "white" + }, + "buttonSecondaryBackgroundInverseSelected": { + "value": "rgba({palette.white}, 0.15)", + "type": "color", + "description": "white" + }, + "textButtonPrimary": { + "value": "{palette.white}", + "type": "color", + "description": "white" + }, + "textButtonPrimaryInverse": { + "value": "{palette.beyondBlue}", + "type": "color", + "description": "beyondBlue" + }, + "textButtonPrimaryInverseSelected": { + "value": "{palette.beyondBlue70}", + "type": "color", + "description": "beyondBlue70" + }, + "textButtonSecondary": { + "value": "{palette.beyondBlue}", + "type": "color", + "description": "beyondBlue" + }, + "textButtonSecondarySelected": { + "value": "{palette.beyondBlue70}", + "type": "color", + "description": "beyondBlue70" + }, + "textButtonSecondaryInverse": { + "value": "{palette.white}", + "type": "color", + "description": "white" + }, + "textButtonSecondaryInverseSelected": { + "value": "{palette.white}", + "type": "color", + "description": "white" + }, + "textLink": { + "value": "{palette.beyondBlue}", + "type": "color", + "description": "beyondBlue" + }, + "textLinkInverse": { + "value": "{palette.white}", + "type": "color", + "description": "white" + }, + "textLinkDanger": { + "value": "{palette.o2Red65}", + "type": "color", + "description": "o2Red65" + }, + "textLinkSnackbar": { + "value": "{palette.beyondBlue30}", + "type": "color", + "description": "beyondBlue30" + }, + "textActivated": { + "value": "{palette.beyondBlue}", + "type": "color", + "description": "beyondBlue" + }, + "textBrand": { + "value": "{palette.beyondBlue}", + "type": "color", + "description": "beyondBlue" + }, + "control": { + "value": "{palette.grey45}", + "type": "color", + "description": "grey45" + }, + "controlActivated": { + "value": "{palette.beyondBlue}", + "type": "color", + "description": "beyondBlue" + }, + "controlInverse": { + "value": "{palette.white}", + "type": "color", + "description": "white" + }, + "controlActivatedInverse": { + "value": "{palette.white}", + "type": "color", + "description": "white" + }, + "controlError": { + "value": "{palette.o2Red60}", + "type": "color", + "description": "o2Red60" + }, + "barTrack": { + "value": "{palette.grey30}", + "type": "color", + "description": "grey30" + }, + "loadingBar": { + "value": "{palette.beyondBlue}", + "type": "color", + "description": "beyondBlue" + }, + "loadingBarBackground": { + "value": "{palette.grey20}", + "type": "color", + "description": "grey20" + }, + "toggleAndroidInactive": { + "value": "{palette.grey30}", + "type": "color", + "description": "grey30" + }, + "toggleAndroidBackgroundActive": { + "value": "{palette.beyondBlue15}", + "type": "color", + "description": "beyondBlue15" + }, + "iosControlKnob": { + "value": "{palette.white}", + "type": "color", + "description": "white" + }, + "divider": { + "value": "{palette.grey30}", + "type": "color", + "description": "grey30" + }, + "dividerInverse": { + "value": "rgba({palette.white}, 0.2)", + "type": "color", + "description": "white" + }, + "navigationBarDivider": { + "value": "{palette.darkBlue}", + "type": "color", + "description": "darkBlue" + }, + "badge": { + "value": "{palette.o2Red65}", + "type": "color", + "description": "o2Red65" + }, + "feedbackErrorBackground": { + "value": "{palette.o2Red60}", + "type": "color", + "description": "o2Red60" + }, + "feedbackInfoBackground": { + "value": "{palette.black}", + "type": "color", + "description": "black" + }, + "brand": { + "value": "{palette.beyondBlue}", + "type": "color", + "description": "beyondBlue" + }, + "brandHigh": { + "value": "{palette.beyondBlue70}", + "type": "color", + "description": "beyondBlue70" + }, + "inverse": { + "value": "{palette.white}", + "type": "color", + "description": "white" + }, + "neutralHigh": { + "value": "{palette.black}", + "type": "color", + "description": "black" + }, + "neutralMedium": { + "value": "{palette.grey60}", + "type": "color", + "description": "grey60" + }, + "neutralMediumInverse": { + "value": "{palette.grey60}", + "type": "color", + "description": "grey60" + }, + "neutralLow": { + "value": "{palette.grey20}", + "type": "color", + "description": "grey20" + }, + "neutralLowAlternative": { + "value": "{palette.grey30}", + "type": "color", + "description": "grey30" + }, + "textPrimary": { + "value": "{palette.black}", + "type": "color", + "description": "black" + }, + "textPrimaryInverse": { + "value": "{palette.white}", + "type": "color", + "description": "white" + }, + "textSecondary": { + "value": "{palette.grey60}", + "type": "color", + "description": "grey60" + }, + "textSecondaryInverse": { + "value": "{palette.beyondBlue10}", + "type": "color", + "description": "beyondBlue10" + }, + "success": { + "value": "{palette.o2Green}", + "type": "color", + "description": "o2Green" + }, + "warning": { + "value": "{palette.o2Orange}", + "type": "color", + "description": "o2Orange" + }, + "error": { + "value": "{palette.o2Red65}", + "type": "color", + "description": "o2Red65" + }, + "textError": { + "value": "{palette.o2Red65}", + "type": "color", + "description": "o2Red65" + }, + "textErrorInverse": { + "value": "{palette.white}", + "type": "color", + "description": "white" + }, + "promo": { + "value": "{palette.o2Pink}", + "type": "color", + "description": "o2Pink" + }, + "highlight": { + "value": "{palette.o2Pink80}", + "type": "color", + "description": "o2Pink80" + }, + "successLow": { + "value": "{palette.o2Green10}", + "type": "color", + "description": "o2Green10" + }, + "warningLow": { + "value": "{palette.o2Orange10}", + "type": "color", + "description": "o2Orange10" + }, + "errorLow": { + "value": "{palette.o2Red10}", + "type": "color", + "description": "o2Red10" + }, + "promoLow": { + "value": "{palette.o2Pink15}", + "type": "color", + "description": "o2Pink15" + }, + "brandLow": { + "value": "{palette.beyondBlue10}", + "type": "color", + "description": "beyondBlue10" + }, + "successHigh": { + "value": "{palette.o2Green80}", + "type": "color", + "description": "o2Green80" + }, + "warningHigh": { + "value": "{palette.o2Orange75}", + "type": "color", + "description": "o2Orange75" + }, + "errorHigh": { + "value": "{palette.o2Red65}", + "type": "color", + "description": "o2Red65" + }, + "promoHigh": { + "value": "{palette.o2Pink80}", + "type": "color", + "description": "o2Pink80" + }, + "successHighInverse": { + "value": "{palette.o2Green80}", + "type": "color", + "description": "o2Green80" + }, + "warningHighInverse": { + "value": "{palette.o2Orange75}", + "type": "color", + "description": "o2Orange75" + }, + "errorHighInverse": { + "value": "{palette.o2Red65}", + "type": "color", + "description": "o2Red65" + }, + "promoHighInverse": { + "value": "{palette.o2Pink80}", + "type": "color", + "description": "o2Pink80" + }, + "textNavigationBarPrimary": { + "value": "{palette.white}", + "type": "color", + "description": "white" + }, + "textNavigationBarSecondary": { + "value": "{palette.beyondBlue30}", + "type": "color", + "description": "beyondBlue30" + }, + "textNavigationSearchBarHint": { + "value": "{palette.beyondBlue30}", + "type": "color", + "description": "beyondBlue30" + }, + "textNavigationSearchBarText": { + "value": "{palette.white}", + "type": "color", + "description": "white" + }, + "textAppBar": { + "value": "{palette.grey60}", + "type": "color", + "description": "grey60" + }, + "textAppBarSelected": { + "value": "{palette.beyondBlue}", + "type": "color", + "description": "beyondBlue" + }, + "customTabsBackground": { + "value": "{palette.beyondBlue}", + "type": "color", + "description": "beyondBlue" + }, + "tagTextPromo": { + "value": "{palette.o2Pink80}", + "type": "color", + "description": "o2Pink80" + }, + "tagTextActive": { + "value": "{palette.beyondBlue}", + "type": "color", + "description": "beyondBlue" + }, + "tagTextInactive": { + "value": "{palette.grey60}", + "type": "color", + "description": "grey60" + }, + "tagTextSuccess": { + "value": "{palette.o2Green80}", + "type": "color", + "description": "o2Green80" + }, + "tagTextWarning": { + "value": "{palette.o2Orange75}", + "type": "color", + "description": "o2Orange75" + }, + "tagTextError": { + "value": "{palette.o2Red65}", + "type": "color", + "description": "o2Red65" + }, + "tagBackgroundPromo": { + "value": "{palette.o2Pink15}", + "type": "color", + "description": "o2Pink15" + }, + "tagBackgroundActive": { + "value": "{palette.beyondBlue10}", + "type": "color", + "description": "beyondBlue10" + }, + "tagBackgroundInactive": { + "value": "{palette.grey20}", + "type": "color", + "description": "grey20" + }, + "tagBackgroundSuccess": { + "value": "{palette.o2Green10}", + "type": "color", + "description": "o2Green10" + }, + "tagBackgroundWarning": { + "value": "{palette.o2Orange10}", + "type": "color", + "description": "o2Orange10" + }, + "tagBackgroundError": { + "value": "{palette.o2Red10}", + "type": "color", + "description": "o2Red10" + }, + "cardContentOverlay": { + "type": "linear-gradient", + "value": { + "angle": 180, + "colors": [ + { "value": "rgba({palette.beyondBlue}, 0)", "stop": 0 }, + { "value": "rgba({palette.beyondBlue}, 0.4)", "stop": 0.3 }, + { "value": "rgba({palette.beyondBlue}, 1)", "stop": 1 } + ] + }, + "description": "grey6" + } + }, + "dark": { + "background": { + "value": "{palette.darkModeBlack}", + "type": "color", + "description": "darkModeBlack" + }, + "backgroundAlternative": { + "value": "{palette.darkModeBlack}", + "type": "color", + "description": "darkModeBlack" + }, + "backgroundBrand": { + "value": "{palette.darkModeBlack}", + "type": "color", + "description": "darkModeBlack" + }, + "backgroundBrandSecondary": { + "value": "{palette.darkModeBlack}", + "type": "color", + "description": "darkModeBlack" + }, + "backgroundContainer": { + "value": "{palette.darkModeGrey}", + "type": "color", + "description": "darkModeGrey" + }, + "backgroundContainerError": { + "value": "{palette.darkModeGrey}", + "type": "color", + "description": "darkModeGrey" + }, + "backgroundContainerHover": { + "value": "rgba({palette.white}, 0.03)", + "type": "color", + "description": "white" + }, + "backgroundContainerPressed": { + "value": "rgba({palette.white}, 0.05)", + "type": "color", + "description": "white" + }, + "backgroundContainerBrand": { + "value": "{palette.darkModeGrey}", + "type": "color", + "description": "darkModeGrey" + }, + "backgroundContainerBrandHover": { + "value": "rgba({palette.white}, 0.03)", + "type": "color", + "description": "white" + }, + "backgroundContainerBrandPressed": { + "value": "rgba({palette.white}, 0.05)", + "type": "color", + "description": "white" + }, + "backgroundContainerBrandOverInverse": { + "value": "{palette.darkModeGrey}", + "type": "color", + "description": "darkModeGrey" + }, + "backgroundContainerAlternative": { + "value": "{palette.darkModeGrey}", + "type": "color", + "description": "darkModeGrey" + }, + "backgroundOverlay": { + "value": "rgba({palette.darkModeGrey}, 0.8)", + "type": "color", + "description": "darkModeGrey" + }, + "backgroundSkeleton": { + "value": "{palette.darkModeGrey6}", + "type": "color", + "description": "darkModeGrey6" + }, + "backgroundSkeletonInverse": { + "value": "{palette.darkModeGrey6}", + "type": "color", + "description": "darkModeGrey6" + }, + "backgroundBrandTop": { + "value": "{palette.darkModeBlack}", + "type": "color", + "description": "darkModeBlack" + }, + "backgroundBrandBottom": { + "value": "{palette.darkModeBlack}", + "type": "color", + "description": "darkModeBlack" + }, + "appBarBackground": { + "value": "{palette.darkModeGrey}", + "type": "color", + "description": "darkModeGrey" + }, + "navigationBarBackground": { + "value": "{palette.darkModeBlack}", + "type": "color", + "description": "darkModeBlack" + }, + "skeletonWave": { + "value": "{palette.grey80}", + "type": "color", + "description": "grey80" + }, + "borderLow": { + "value": "{palette.darkModeBlack}", + "type": "color", + "description": "darkModeBlack" + }, + "border": { + "value": "{palette.darkModeGrey}", + "type": "color", + "description": "darkModeGrey" + }, + "borderHigh": { + "value": "{palette.grey45}", + "type": "color", + "description": "grey45" + }, + "borderSelected": { + "value": "{palette.beyondBlue30}", + "type": "color", + "description": "beyondBlue30" + }, + "coverBackgroundHover": { + "value": "rgba({palette.darkModeBlack}, 0.25)", + "type": "color", + "description": "darkModeBlack" + }, + "coverBackgroundPressed": { + "value": "rgba({palette.darkModeBlack}, 0.35)", + "type": "color", + "description": "darkModeBlack" + }, + "buttonDangerBackground": { + "value": "{palette.o2Red60}", + "type": "color", + "description": "o2Red60" + }, + "buttonDangerBackgroundSelected": { + "value": "{palette.o2Red65}", + "type": "color", + "description": "o2Red65" + }, + "buttonDangerBackgroundHover": { + "value": "{palette.o2Red65}", + "type": "color", + "description": "o2Red65" + }, + "buttonLinkDangerBackgroundSelected": { + "value": "rgba({palette.white}, 0.08)", + "type": "color", + "description": "white" + }, + "buttonLinkDangerBackgroundInverse": { + "value": "rgba({palette.white}, 0)", + "type": "color", + "description": "white" + }, + "buttonLinkDangerBackgroundInverseSelected": { + "value": "rgba({palette.white}, 0.08)", + "type": "color", + "description": "white" + }, + "buttonLinkBackgroundSelected": { + "value": "rgba({palette.white}, 0.08)", + "type": "color", + "description": "white" + }, + "buttonLinkBackgroundInverseSelected": { + "value": "rgba({palette.white}, 0.08)", + "type": "color", + "description": "white" + }, + "buttonPrimaryBackground": { + "value": "{palette.darkModeBeyondBlue}", + "type": "color", + "description": "darkModeBeyondBlue" + }, + "buttonPrimaryBackgroundInverse": { + "value": "{palette.darkModeBeyondBlue}", + "type": "color", + "description": "darkModeBeyondBlue" + }, + "buttonPrimaryBackgroundSelected": { + "value": "{palette.beyondBlue55}", + "type": "color", + "description": "beyondBlue55" + }, + "buttonPrimaryBackgroundHover": { + "value": "{palette.beyondBlue55}", + "type": "color", + "description": "beyondBlue55" + }, + "buttonPrimaryBackgroundInverseSelected": { + "value": "{palette.beyondBlue55}", + "type": "color", + "description": "beyondBlue55" + }, + "buttonSecondaryBackgroundSelected": { + "value": "rgba({palette.white}, 0.15)", + "type": "color", + "description": "white" + }, + "buttonSecondaryBorder": { + "value": "{palette.white}", + "type": "color", + "description": "white" + }, + "buttonSecondaryBorderSelected": { + "value": "{palette.white}", + "type": "color", + "description": "white" + }, + "buttonSecondaryBorderInverse": { + "value": "{palette.white}", + "type": "color", + "description": "white" + }, + "buttonSecondaryBorderInverseSelected": { + "value": "{palette.white}", + "type": "color", + "description": "white" + }, + "buttonSecondaryBackgroundHover": { + "value": "rgba({palette.white}, 0.15)", + "type": "color", + "description": "white" + }, + "buttonSecondaryBackgroundInverseHover": { + "value": "rgba({palette.white}, 0.15)", + "type": "color", + "description": "white" + }, + "buttonSecondaryBackgroundInverseSelected": { + "value": "rgba({palette.white}, 0.15)", + "type": "color", + "description": "white" + }, + "textButtonPrimary": { + "value": "{palette.white}", + "type": "color", + "description": "white" + }, + "textButtonPrimaryInverse": { + "value": "{palette.white}", + "type": "color", + "description": "white" + }, + "textButtonPrimaryInverseSelected": { + "value": "{palette.white}", + "type": "color", + "description": "white" + }, + "textButtonSecondary": { + "value": "{palette.grey30}", + "type": "color", + "description": "grey30" + }, + "textButtonSecondarySelected": { + "value": "{palette.grey30}", + "type": "color", + "description": "grey30" + }, + "textButtonSecondaryInverse": { + "value": "{palette.grey30}", + "type": "color", + "description": "grey30" + }, + "textButtonSecondaryInverseSelected": { + "value": "{palette.grey30}", + "type": "color", + "description": "grey30" + }, + "textLink": { + "value": "{palette.beyondBlue40}", + "type": "color", + "description": "beyondBlue40" + }, + "textLinkInverse": { + "value": "{palette.beyondBlue40}", + "type": "color", + "description": "beyondBlue40" + }, + "textLinkDanger": { + "value": "{palette.o2Red45}", + "type": "color", + "description": "o2Red45" + }, + "textLinkSnackbar": { + "value": "{palette.beyondBlue30}", + "type": "color", + "description": "beyondBlue30" + }, + "textActivated": { + "value": "{palette.beyondBlue30}", + "type": "color", + "description": "beyondBlue30" + }, + "textBrand": { + "value": "{palette.beyondBlue30}", + "type": "color", + "description": "beyondBlue30" + }, + "control": { + "value": "{palette.grey45}", + "type": "color", + "description": "grey45" + }, + "controlActivated": { + "value": "{palette.darkModeBeyondBlue}", + "type": "color", + "description": "darkModeBeyondBlue" + }, + "controlInverse": { + "value": "{palette.grey45}", + "type": "color", + "description": "grey45" + }, + "controlActivatedInverse": { + "value": "{palette.darkModeBeyondBlue}", + "type": "color", + "description": "darkModeBeyondBlue" + }, + "controlError": { + "value": "{palette.o2Red45}", + "type": "color", + "description": "o2Red45" + }, + "barTrack": { + "value": "{palette.darkModeGrey6}", + "type": "color", + "description": "darkModeGrey6" + }, + "loadingBar": { + "value": "{palette.darkModeBeyondBlue}", + "type": "color", + "description": "darkModeBeyondBlue" + }, + "loadingBarBackground": { + "value": "{palette.darkModeGrey6}", + "type": "color", + "description": "darkModeGrey6" + }, + "toggleAndroidInactive": { + "value": "{palette.grey20}", + "type": "color", + "description": "grey20" + }, + "toggleAndroidBackgroundActive": { + "value": "{palette.beyondBlue15}", + "type": "color", + "description": "beyondBlue15" + }, + "iosControlKnob": { + "value": "{palette.grey30}", + "type": "color", + "description": "grey30" + }, + "badge": { + "value": "{palette.o2Red65}", + "type": "color", + "description": "o2Red65" + }, + "feedbackErrorBackground": { + "value": "{palette.o2Red60}", + "type": "color", + "description": "o2Red60" + }, + "feedbackInfoBackground": { + "value": "{palette.darkModeGrey6}", + "type": "color", + "description": "darkModeGrey6" + }, + "divider": { + "value": "rgba({palette.white}, 0.1)", + "type": "color", + "description": "white" + }, + "dividerInverse": { + "value": "rgba({palette.white}, 0.1)", + "type": "color", + "description": "white" + }, + "navigationBarDivider": { + "value": "{palette.darkModeBlack}", + "type": "color", + "description": "darkModeBlack" + }, + "brand": { + "value": "{palette.beyondBlue30}", + "type": "color", + "description": "beyondBlue30" + }, + "brandHigh": { + "value": "rgba({palette.white}, 0.05)", + "type": "color", + "description": "white" + }, + "inverse": { + "value": "{palette.grey30}", + "type": "color", + "description": "grey30" + }, + "neutralHigh": { + "value": "{palette.grey30}", + "type": "color", + "description": "grey30" + }, + "neutralMedium": { + "value": "{palette.grey60}", + "type": "color", + "description": "grey60" + }, + "neutralMediumInverse": { + "value": "{palette.grey60}", + "type": "color", + "description": "grey60" + }, + "neutralLow": { + "value": "{palette.grey80}", + "type": "color", + "description": "grey80" + }, + "neutralLowAlternative": { + "value": "{palette.grey80}", + "type": "color", + "description": "grey80" + }, + "textPrimary": { + "value": "{palette.grey30}", + "type": "color", + "description": "grey30" + }, + "textPrimaryInverse": { + "value": "{palette.grey30}", + "type": "color", + "description": "grey30" + }, + "textSecondary": { + "value": "{palette.grey45}", + "type": "color", + "description": "grey45" + }, + "textSecondaryInverse": { + "value": "{palette.grey45}", + "type": "color", + "description": "grey45" + }, + "success": { + "value": "{palette.o2Green}", + "type": "color", + "description": "o2Green" + }, + "warning": { + "value": "{palette.o2Orange}", + "type": "color", + "description": "o2Orange" + }, + "error": { + "value": "{palette.o2Red45}", + "type": "color", + "description": "o2Red45" + }, + "textError": { + "value": "{palette.o2Red45}", + "type": "color", + "description": "o2Red45" + }, + "textErrorInverse": { + "value": "{palette.o2Red45}", + "type": "color", + "description": "o2Red45" + }, + "promo": { + "value": "{palette.o2Pink}", + "type": "color", + "description": "o2Pink" + }, + "highlight": { + "value": "{palette.o2Pink}", + "type": "color", + "description": "o2Pink" + }, + "successLow": { + "value": "{palette.darkModeGrey6}", + "type": "color", + "description": "darkModeGrey6" + }, + "warningLow": { + "value": "{palette.darkModeGrey6}", + "type": "color", + "description": "darkModeGrey6" + }, + "errorLow": { + "value": "{palette.darkModeGrey6}", + "type": "color", + "description": "darkModeGrey6" + }, + "promoLow": { + "value": "{palette.darkModeGrey6}", + "type": "color", + "description": "darkModeGrey6" + }, + "brandLow": { + "value": "{palette.darkModeGrey6}", + "type": "color", + "description": "darkModeGrey6" + }, + "successHigh": { + "value": "{palette.o2Green40}", + "type": "color", + "description": "o2Green40" + }, + "warningHigh": { + "value": "{palette.o2Orange40}", + "type": "color", + "description": "o2Orange40" + }, + "errorHigh": { + "value": "{palette.o2Red40}", + "type": "color", + "description": "o2Red40" + }, + "promoHigh": { + "value": "{palette.o2Pink30}", + "type": "color", + "description": "o2Pink30" + }, + "successHighInverse": { + "value": "{palette.o2Green80}", + "type": "color", + "description": "o2Green80" + }, + "warningHighInverse": { + "value": "{palette.o2Orange75}", + "type": "color", + "description": "o2Orange75" + }, + "errorHighInverse": { + "value": "{palette.o2Red65}", + "type": "color", + "description": "o2Red65" + }, + "promoHighInverse": { + "value": "{palette.o2Pink}", + "type": "color", + "description": "o2Pink" + }, + "textNavigationBarPrimary": { + "value": "{palette.grey30}", + "type": "color", + "description": "grey30" + }, + "textNavigationBarSecondary": { + "value": "{palette.grey45}", + "type": "color", + "description": "grey45" + }, + "textNavigationSearchBarHint": { + "value": "{palette.grey45}", + "type": "color", + "description": "grey45" + }, + "textNavigationSearchBarText": { + "value": "{palette.grey30}", + "type": "color", + "description": "grey30" + }, + "textAppBar": { + "value": "{palette.grey45}", + "type": "color", + "description": "grey45" + }, + "textAppBarSelected": { + "value": "{palette.beyondBlue40}", + "type": "color", + "description": "beyondBlue40" + }, + "customTabsBackground": { + "value": "{palette.darkModeBlack}", + "type": "color", + "description": "darkModeBlack" + }, + "tagTextPromo": { + "value": "{palette.o2Pink}", + "type": "color", + "description": "o2Pink" + }, + "tagTextActive": { + "value": "{palette.beyondBlue30}", + "type": "color", + "description": "beyondBlue30" + }, + "tagTextInactive": { + "value": "{palette.grey40}", + "type": "color", + "description": "grey40" + }, + "tagTextSuccess": { + "value": "{palette.o2Green}", + "type": "color", + "description": "o2Green" + }, + "tagTextWarning": { + "value": "{palette.o2Orange}", + "type": "color", + "description": "o2Orange" + }, + "tagTextError": { + "value": "{palette.o2Red45}", + "type": "color", + "description": "o2Red45" + }, + "tagBackgroundPromo": { + "value": "{palette.darkModeGrey6}", + "type": "color", + "description": "darkModeGrey6" + }, + "tagBackgroundActive": { + "value": "{palette.darkModeGrey6}", + "type": "color", + "description": "darkModeGrey6" + }, + "tagBackgroundInactive": { + "value": "{palette.darkModeGrey6}", + "type": "color", + "description": "darkModeGrey6" + }, + "tagBackgroundSuccess": { + "value": "{palette.darkModeGrey6}", + "type": "color", + "description": "darkModeGrey6" + }, + "tagBackgroundWarning": { + "value": "{palette.darkModeGrey6}", + "type": "color", + "description": "darkModeGrey6" + }, + "tagBackgroundError": { + "value": "{palette.darkModeGrey6}", + "type": "color", + "description": "darkModeGrey6" + }, + "cardContentOverlay": { + "type": "linear-gradient", + "value": { + "angle": 180, + "colors": [ + { "value": "rgba({palette.black}, 0)", "stop": 0 }, + { "value": "rgba({palette.black}, 0.4)", "stop": 0.3 }, + { "value": "rgba({palette.black}, 0.7)", "stop": 1 } + ] + }, + "description": "grey6" + } + }, + "radius": { + "avatar": { "value": "circle", "type": "borderRadius" }, + "bar": { "value": "999", "type": "borderRadius" }, + "button": { "value": "999", "type": "borderRadius" }, + "checkbox": { "value": "2", "type": "borderRadius" }, + "container": { "value": "16", "type": "borderRadius" }, + "indicator": { "value": "999", "type": "borderRadius" }, + "input": { "value": "12", "type": "borderRadius" }, + "legacyDisplay": { "value": "16", "type": "borderRadius" }, + "popup": { "value": "8", "type": "borderRadius" }, + "sheet": { "value": "16", "type": "borderRadius" }, + "mediaSmall": { "value": "8", "type": "borderRadius" } + }, + "text": { + "weight": { + "cardTitle": { "value": "medium", "type": "typography" }, + "button": { "value": "medium", "type": "typography" }, + "tabsLabel": { "value": "medium", "type": "typography" }, + "link": { "value": "medium", "type": "typography" }, + "title1": { "value": "medium", "type": "typography" }, + "title2": { "value": "bold", "type": "typography" }, + "indicator": { "value": "medium", "type": "typography" }, + "navigationBar": { "value": "medium", "type": "typography" }, + "text5": { "value": "bold", "type": "typography" }, + "text6": { "value": "bold", "type": "typography" }, + "text7": { "value": "bold", "type": "typography" }, + "text8": { "value": "bold", "type": "typography" }, + "text9": { "value": "bold", "type": "typography" }, + "text10": { "value": "bold", "type": "typography" } + }, + "size": { + "tabsLabel": { + "value": { "mobile": 16, "desktop": 18 }, + "type": "typography" + }, + "title2": { + "value": { "mobile": 20, "desktop": 28 }, + "type": "typography" + } + }, + "lineHeight": { + "tabsLabel": { + "value": { "mobile": 24, "desktop": 24 }, + "type": "typography" + }, + "title2": { + "value": { "mobile": 24, "desktop": 32 }, + "type": "typography" + } + } + }, + "themeVariant": { + "successFeedback": { "value": "inverse", "type": "themeVariant" }, + "brandLoadingScreen": { "value": "inverse", "type": "themeVariant" } + }, + "global": { + "palette": { + "beyondBlue": { "value": "#0050FF", "type": "color" }, + "beyondBlue10": { "value": "#E5EDFF", "type": "color" }, + "beyondBlue15": { "value": "#CCDCFF", "type": "color" }, + "beyondBlue30": { "value": "#80A7FF", "type": "color" }, + "beyondBlue40": { "value": "#4D84FF", "type": "color" }, + "beyondBlue45": { "value": "#0A73EB", "type": "color" }, + "beyondBlue55": { "value": "#0044D9", "type": "color" }, + "beyondBlue70": { "value": "#0038B2", "type": "color" }, + "beyondBlue90": { "value": "#001033", "type": "color" }, + "darkBlue": { "value": "#00008C", "type": "color" }, + "o2BlueLight": { "value": "#82DCFA", "type": "color" }, + "o2BlueLight30": { "value": "#C0EEFD", "type": "color" }, + "o2BlueLight35": { "value": "#B4EAFC", "type": "color" }, + "o2Green": { "value": "#00DC7D", "type": "color" }, + "o2Green10": { "value": "#E5FBF2", "type": "color" }, + "o2Green40": { "value": "#4CE7A4", "type": "color" }, + "o2Green80": { "value": "#006338", "type": "color" }, + "o2Yellow": { "value": "#FADC00", "type": "color" }, + "o2Orange": { "value": "#FFA55A", "type": "color" }, + "o2Orange10": { "value": "#FFF6EE", "type": "color" }, + "o2Orange40": { "value": "#FFC08B", "type": "color" }, + "o2Orange75": { "value": "#996336", "type": "color" }, + "o2Pink": { "value": "#FA96FF", "type": "color" }, + "o2Pink15": { "value": "#FEEAFF", "type": "color" }, + "o2Pink30": { "value": "#FDCAFF", "type": "color" }, + "o2Pink80": { "value": "#704373", "type": "color" }, + "o2Red": { "value": "#FF5A5A", "type": "color" }, + "o2Red10": { "value": "#FFEEEE", "type": "color" }, + "o2Red20": { "value": "#FFCDCD", "type": "color" }, + "o2Red40": { "value": "#FF8B8B", "type": "color" }, + "o2Red45": { "value": "#FF7B7B", "type": "color" }, + "o2Red60": { "value": "#CC4848", "type": "color" }, + "o2Red65": { "value": "#BF4444", "type": "color" }, + "grey20": { "value": "#F3F3F5", "type": "color" }, + "grey30": { "value": "#D9D9DD", "type": "color" }, + "grey40": { "value": "#B4B4BE", "type": "color" }, + "grey45": { "value": "#8C8C9A", "type": "color" }, + "grey60": { "value": "#6E6E77", "type": "color" }, + "grey80": { "value": "#3C3C46", "type": "color" }, + "black": { "value": "#00001E", "type": "color" }, + "white": { "value": "#FFFFFF", "type": "color" }, + "darkModeBlack": { "value": "#00001C", "type": "color" }, + "darkModeGrey": { "value": "#08132B", "type": "color" }, + "darkModeGrey6": { "value": "#14213D", "type": "color" }, + "darkModeBeyondBlue": { "value": "#1A62FF", "type": "color" } + } + } +} diff --git a/scripts/mistica-importer/generators/font-sizes/__tests__/brand-font-weights-generator.test.js b/scripts/mistica-importer/generators/font-sizes/__tests__/brand-font-weights-generator.test.js new file mode 100644 index 00000000..7c0f7eec --- /dev/null +++ b/scripts/mistica-importer/generators/font-sizes/__tests__/brand-font-weights-generator.test.js @@ -0,0 +1,21 @@ +import fs from "fs"; +import { resolve } from "path"; +import { generateBrandFontSizes } from "../brand-font-sizes-generator"; + +describe("generateBrandFontSizes", () => { + it("real case", () => { + const anyBrandTokensPath = resolve(__dirname, "any-brand-tokens.json"); + const anyBrandTokens = JSON.parse( + fs.readFileSync(anyBrandTokensPath, "utf-8") + ); + const brand = { prefix: "O2New" }; + const result = generateBrandFontSizes(brand, anyBrandTokens); + + const expectedContentPath = resolve( + __dirname, + "expected-o2-new-font-sizes.swift" + ); + const expectedContent = fs.readFileSync(expectedContentPath, "utf-8"); + expect(result).toBe(expectedContent); + }); +}); diff --git a/scripts/mistica-importer/generators/font-sizes/__tests__/expected-mistica-font-sizes.swift b/scripts/mistica-importer/generators/font-sizes/__tests__/expected-mistica-font-sizes.swift new file mode 100644 index 00000000..f803ba24 --- /dev/null +++ b/scripts/mistica-importer/generators/font-sizes/__tests__/expected-mistica-font-sizes.swift @@ -0,0 +1,10 @@ + +// Generated using Make +// DO NOT EDIT + +import Foundation + +public protocol MisticaFontSizes { + var tabsLabel: CGFloat { get } + var title2: CGFloat { get } +} diff --git a/scripts/mistica-importer/generators/font-sizes/__tests__/expected-o2-new-font-sizes.swift b/scripts/mistica-importer/generators/font-sizes/__tests__/expected-o2-new-font-sizes.swift new file mode 100644 index 00000000..482d0620 --- /dev/null +++ b/scripts/mistica-importer/generators/font-sizes/__tests__/expected-o2-new-font-sizes.swift @@ -0,0 +1,10 @@ + +// Generated using Make +// DO NOT EDIT + +import Foundation + +struct O2NewFontSizes: MisticaFontSizes { + public var tabsLabel: CGFloat = 16 + public var title2: CGFloat = 20 +} diff --git a/scripts/mistica-importer/generators/font-sizes/__tests__/mistica-font-weights-generator.test.js b/scripts/mistica-importer/generators/font-sizes/__tests__/mistica-font-weights-generator.test.js new file mode 100644 index 00000000..6aff5fd1 --- /dev/null +++ b/scripts/mistica-importer/generators/font-sizes/__tests__/mistica-font-weights-generator.test.js @@ -0,0 +1,20 @@ +import fs from "fs"; +import { resolve } from "path"; +import { generateMisticaFontSizes } from "../mistica-font-sizes-generator"; + +describe("generateMisticaFontSizes", () => { + it("real case", () => { + const anyBrandTokensPath = resolve(__dirname, "any-brand-tokens.json"); + const anyBrandTokens = JSON.parse( + fs.readFileSync(anyBrandTokensPath, "utf-8") + ); + const result = generateMisticaFontSizes(anyBrandTokens); + + const expectedContentPath = resolve( + __dirname, + "expected-mistica-font-sizes.swift" + ); + const expectedContent = fs.readFileSync(expectedContentPath, "utf-8"); + expect(result).toBe(expectedContent); + }); +}); diff --git a/scripts/mistica-importer/generators/font-sizes/brand-font-sizes-generator.js b/scripts/mistica-importer/generators/font-sizes/brand-font-sizes-generator.js new file mode 100644 index 00000000..667f6f56 --- /dev/null +++ b/scripts/mistica-importer/generators/font-sizes/brand-font-sizes-generator.js @@ -0,0 +1,17 @@ +export const generateBrandFontSizes = (brand, tokens) => { + const sizes = Object.entries(tokens["text"]["size"]); + return template(brand.prefix, sizes); +}; + +const template = (prefix, sizes) => ` +// Generated using Make +// DO NOT EDIT + +import Foundation + +struct ${prefix}FontSizes: MisticaFontSizes { +${sizes + .map((size) => ` public var ${size[0]}: CGFloat = ${size[1].value.mobile}`) + .join("\n")} +} +`; diff --git a/scripts/mistica-importer/generators/font-sizes/mistica-font-sizes-generator.js b/scripts/mistica-importer/generators/font-sizes/mistica-font-sizes-generator.js new file mode 100644 index 00000000..15a56598 --- /dev/null +++ b/scripts/mistica-importer/generators/font-sizes/mistica-font-sizes-generator.js @@ -0,0 +1,15 @@ +export const generateMisticaFontSizes = (anyBrandTokens) => { + const weights = Object.keys(anyBrandTokens["text"]["size"]); + return template(weights); +}; + +const template = (props) => ` +// Generated using Make +// DO NOT EDIT + +import Foundation + +public protocol MisticaFontSizes { +${props.map((prop) => ` var ${prop}: CGFloat { get }`).join("\n")} +} +`; diff --git a/scripts/mistica-importer/generators/font-weights/__tests__/any-brand-tokens.json b/scripts/mistica-importer/generators/font-weights/__tests__/any-brand-tokens.json new file mode 100644 index 00000000..197790fc --- /dev/null +++ b/scripts/mistica-importer/generators/font-weights/__tests__/any-brand-tokens.json @@ -0,0 +1,1438 @@ +{ + "light": { + "background": { + "value": "{palette.white}", + "type": "color", + "description": "white" + }, + "backgroundAlternative": { + "value": "{palette.grey20}", + "type": "color", + "description": "grey20" + }, + "backgroundBrand": { + "type": "linear-gradient", + "value": { + "angle": 180, + "colors": [ + { "value": "{palette.darkBlue}", "stop": 0 }, + { "value": "{palette.beyondBlue}", "stop": 0.64 }, + { "value": "{palette.beyondBlue45}", "stop": 1 } + ] + }, + "description": "o2Gradient" + }, + "backgroundBrandSecondary": { + "value": "{palette.beyondBlue}", + "type": "color", + "description": "beyondBlue" + }, + "backgroundContainer": { + "value": "{palette.white}", + "type": "color", + "description": "white" + }, + "backgroundContainerError": { + "value": "{palette.o2Red10}", + "type": "color", + "description": "o2Red10" + }, + "backgroundContainerHover": { + "value": "rgba({palette.darkModeBlack}, 0.03)", + "type": "color", + "description": "darkModeBlack" + }, + "backgroundContainerPressed": { + "value": "rgba({palette.darkModeBlack}, 0.05)", + "type": "color", + "description": "darkModeBlack" + }, + "backgroundContainerBrand": { + "type": "linear-gradient", + "value": { + "angle": 180, + "colors": [ + { "value": "{palette.darkBlue}", "stop": 0 }, + { "value": "{palette.beyondBlue}", "stop": 0.64 }, + { "value": "{palette.beyondBlue45}", "stop": 1 } + ] + }, + "description": "o2Gradient" + }, + "backgroundContainerBrandHover": { + "value": "rgba({palette.darkModeBlack}, 0.2)", + "type": "color", + "description": "darkModeBlack" + }, + "backgroundContainerBrandPressed": { + "value": "rgba({palette.darkModeBlack}, 0.4)", + "type": "color", + "description": "darkModeBlack" + }, + "backgroundContainerBrandOverInverse": { + "value": "{palette.beyondBlue70}", + "type": "color", + "description": "beyondBlue70" + }, + "backgroundContainerAlternative": { + "value": "{palette.grey20}", + "type": "color", + "description": "grey20" + }, + "backgroundOverlay": { + "value": "rgba({palette.black}, 0.6)", + "type": "color", + "description": "black" + }, + "backgroundSkeleton": { + "value": "{palette.grey30}", + "type": "color", + "description": "grey30" + }, + "backgroundSkeletonInverse": { + "value": "{palette.beyondBlue70}", + "type": "color", + "description": "beyondBlue70" + }, + "backgroundBrandTop": { + "value": "{palette.darkBlue}", + "type": "color", + "description": "darkBlue" + }, + "backgroundBrandBottom": { + "value": "{palette.beyondBlue45}", + "type": "color", + "description": "beyondBlue45" + }, + "appBarBackground": { + "value": "{palette.white}", + "type": "color", + "description": "white" + }, + "navigationBarBackground": { + "value": "{palette.darkBlue}", + "type": "color", + "description": "darkBlue" + }, + "skeletonWave": { + "value": "{palette.grey30}", + "type": "color", + "description": "grey30" + }, + "borderLow": { + "value": "{palette.grey20}", + "type": "color", + "description": "grey20" + }, + "border": { + "value": "{palette.grey30}", + "type": "color", + "description": "grey30" + }, + "borderHigh": { + "value": "{palette.grey80}", + "type": "color", + "description": "grey80" + }, + "borderSelected": { + "value": "{palette.beyondBlue}", + "type": "color", + "description": "beyondBlue" + }, + "coverBackgroundHover": { + "value": "rgba({palette.darkModeBlack}, 0.25)", + "type": "color", + "description": "darkModeBlack" + }, + "coverBackgroundPressed": { + "value": "rgba({palette.darkModeBlack}, 0.35)", + "type": "color", + "description": "darkModeBlack" + }, + "buttonDangerBackground": { + "value": "{palette.o2Red60}", + "type": "color", + "description": "o2Red60" + }, + "buttonDangerBackgroundSelected": { + "value": "{palette.o2Red65}", + "type": "color", + "description": "o2Red65" + }, + "buttonDangerBackgroundHover": { + "value": "{palette.o2Red65}", + "type": "color", + "description": "o2Red65" + }, + "buttonLinkDangerBackgroundSelected": { + "value": "{palette.o2Red10}", + "type": "color", + "description": "o2Red10" + }, + "buttonLinkDangerBackgroundInverse": { + "value": "{palette.white}", + "type": "color", + "description": "white" + }, + "buttonLinkDangerBackgroundInverseSelected": { + "value": "{palette.o2Red10}", + "type": "color", + "description": "o2Red10" + }, + "buttonLinkBackgroundSelected": { + "value": "{palette.beyondBlue10}", + "type": "color", + "description": "beyondBlue10" + }, + "buttonLinkBackgroundInverseSelected": { + "value": "rgba({palette.white}, 0.08)", + "type": "color", + "description": "white" + }, + "buttonPrimaryBackground": { + "value": "{palette.beyondBlue}", + "type": "color", + "description": "beyondBlue" + }, + "buttonPrimaryBackgroundInverse": { + "value": "{palette.white}", + "type": "color", + "description": "white" + }, + "buttonPrimaryBackgroundSelected": { + "value": "{palette.beyondBlue70}", + "type": "color", + "description": "beyondBlue70" + }, + "buttonPrimaryBackgroundHover": { + "value": "{palette.beyondBlue70}", + "type": "color", + "description": "beyondBlue70" + }, + "buttonPrimaryBackgroundInverseSelected": { + "value": "{palette.beyondBlue30}", + "type": "color", + "description": "beyondBlue30" + }, + "buttonSecondaryBorder": { + "value": "{palette.beyondBlue}", + "type": "color", + "description": "beyondBlue" + }, + "buttonSecondaryBorderSelected": { + "value": "{palette.beyondBlue70}", + "type": "color", + "description": "beyondBlue70" + }, + "buttonSecondaryBackgroundHover": { + "value": "{palette.beyondBlue10}", + "type": "color", + "description": "beyondBlue10" + }, + "buttonSecondaryBackgroundSelected": { + "value": "{palette.beyondBlue10}", + "type": "color", + "description": "beyondBlue10" + }, + "buttonSecondaryBorderInverse": { + "value": "{palette.white}", + "type": "color", + "description": "white" + }, + "buttonSecondaryBorderInverseSelected": { + "value": "{palette.beyondBlue30}", + "type": "color", + "description": "beyondBlue30" + }, + "buttonSecondaryBackgroundInverseHover": { + "value": "rgba({palette.white}, 0.15)", + "type": "color", + "description": "white" + }, + "buttonSecondaryBackgroundInverseSelected": { + "value": "rgba({palette.white}, 0.15)", + "type": "color", + "description": "white" + }, + "textButtonPrimary": { + "value": "{palette.white}", + "type": "color", + "description": "white" + }, + "textButtonPrimaryInverse": { + "value": "{palette.beyondBlue}", + "type": "color", + "description": "beyondBlue" + }, + "textButtonPrimaryInverseSelected": { + "value": "{palette.beyondBlue70}", + "type": "color", + "description": "beyondBlue70" + }, + "textButtonSecondary": { + "value": "{palette.beyondBlue}", + "type": "color", + "description": "beyondBlue" + }, + "textButtonSecondarySelected": { + "value": "{palette.beyondBlue70}", + "type": "color", + "description": "beyondBlue70" + }, + "textButtonSecondaryInverse": { + "value": "{palette.white}", + "type": "color", + "description": "white" + }, + "textButtonSecondaryInverseSelected": { + "value": "{palette.white}", + "type": "color", + "description": "white" + }, + "textLink": { + "value": "{palette.beyondBlue}", + "type": "color", + "description": "beyondBlue" + }, + "textLinkInverse": { + "value": "{palette.white}", + "type": "color", + "description": "white" + }, + "textLinkDanger": { + "value": "{palette.o2Red65}", + "type": "color", + "description": "o2Red65" + }, + "textLinkSnackbar": { + "value": "{palette.beyondBlue30}", + "type": "color", + "description": "beyondBlue30" + }, + "textActivated": { + "value": "{palette.beyondBlue}", + "type": "color", + "description": "beyondBlue" + }, + "textBrand": { + "value": "{palette.beyondBlue}", + "type": "color", + "description": "beyondBlue" + }, + "control": { + "value": "{palette.grey45}", + "type": "color", + "description": "grey45" + }, + "controlActivated": { + "value": "{palette.beyondBlue}", + "type": "color", + "description": "beyondBlue" + }, + "controlInverse": { + "value": "{palette.white}", + "type": "color", + "description": "white" + }, + "controlActivatedInverse": { + "value": "{palette.white}", + "type": "color", + "description": "white" + }, + "controlError": { + "value": "{palette.o2Red60}", + "type": "color", + "description": "o2Red60" + }, + "barTrack": { + "value": "{palette.grey30}", + "type": "color", + "description": "grey30" + }, + "loadingBar": { + "value": "{palette.beyondBlue}", + "type": "color", + "description": "beyondBlue" + }, + "loadingBarBackground": { + "value": "{palette.grey20}", + "type": "color", + "description": "grey20" + }, + "toggleAndroidInactive": { + "value": "{palette.grey30}", + "type": "color", + "description": "grey30" + }, + "toggleAndroidBackgroundActive": { + "value": "{palette.beyondBlue15}", + "type": "color", + "description": "beyondBlue15" + }, + "iosControlKnob": { + "value": "{palette.white}", + "type": "color", + "description": "white" + }, + "divider": { + "value": "{palette.grey30}", + "type": "color", + "description": "grey30" + }, + "dividerInverse": { + "value": "rgba({palette.white}, 0.2)", + "type": "color", + "description": "white" + }, + "navigationBarDivider": { + "value": "{palette.darkBlue}", + "type": "color", + "description": "darkBlue" + }, + "badge": { + "value": "{palette.o2Red65}", + "type": "color", + "description": "o2Red65" + }, + "feedbackErrorBackground": { + "value": "{palette.o2Red60}", + "type": "color", + "description": "o2Red60" + }, + "feedbackInfoBackground": { + "value": "{palette.black}", + "type": "color", + "description": "black" + }, + "brand": { + "value": "{palette.beyondBlue}", + "type": "color", + "description": "beyondBlue" + }, + "brandHigh": { + "value": "{palette.beyondBlue70}", + "type": "color", + "description": "beyondBlue70" + }, + "inverse": { + "value": "{palette.white}", + "type": "color", + "description": "white" + }, + "neutralHigh": { + "value": "{palette.black}", + "type": "color", + "description": "black" + }, + "neutralMedium": { + "value": "{palette.grey60}", + "type": "color", + "description": "grey60" + }, + "neutralMediumInverse": { + "value": "{palette.grey60}", + "type": "color", + "description": "grey60" + }, + "neutralLow": { + "value": "{palette.grey20}", + "type": "color", + "description": "grey20" + }, + "neutralLowAlternative": { + "value": "{palette.grey30}", + "type": "color", + "description": "grey30" + }, + "textPrimary": { + "value": "{palette.black}", + "type": "color", + "description": "black" + }, + "textPrimaryInverse": { + "value": "{palette.white}", + "type": "color", + "description": "white" + }, + "textSecondary": { + "value": "{palette.grey60}", + "type": "color", + "description": "grey60" + }, + "textSecondaryInverse": { + "value": "{palette.beyondBlue10}", + "type": "color", + "description": "beyondBlue10" + }, + "success": { + "value": "{palette.o2Green}", + "type": "color", + "description": "o2Green" + }, + "warning": { + "value": "{palette.o2Orange}", + "type": "color", + "description": "o2Orange" + }, + "error": { + "value": "{palette.o2Red65}", + "type": "color", + "description": "o2Red65" + }, + "textError": { + "value": "{palette.o2Red65}", + "type": "color", + "description": "o2Red65" + }, + "textErrorInverse": { + "value": "{palette.white}", + "type": "color", + "description": "white" + }, + "promo": { + "value": "{palette.o2Pink}", + "type": "color", + "description": "o2Pink" + }, + "highlight": { + "value": "{palette.o2Pink80}", + "type": "color", + "description": "o2Pink80" + }, + "successLow": { + "value": "{palette.o2Green10}", + "type": "color", + "description": "o2Green10" + }, + "warningLow": { + "value": "{palette.o2Orange10}", + "type": "color", + "description": "o2Orange10" + }, + "errorLow": { + "value": "{palette.o2Red10}", + "type": "color", + "description": "o2Red10" + }, + "promoLow": { + "value": "{palette.o2Pink15}", + "type": "color", + "description": "o2Pink15" + }, + "brandLow": { + "value": "{palette.beyondBlue10}", + "type": "color", + "description": "beyondBlue10" + }, + "successHigh": { + "value": "{palette.o2Green80}", + "type": "color", + "description": "o2Green80" + }, + "warningHigh": { + "value": "{palette.o2Orange75}", + "type": "color", + "description": "o2Orange75" + }, + "errorHigh": { + "value": "{palette.o2Red65}", + "type": "color", + "description": "o2Red65" + }, + "promoHigh": { + "value": "{palette.o2Pink80}", + "type": "color", + "description": "o2Pink80" + }, + "successHighInverse": { + "value": "{palette.o2Green80}", + "type": "color", + "description": "o2Green80" + }, + "warningHighInverse": { + "value": "{palette.o2Orange75}", + "type": "color", + "description": "o2Orange75" + }, + "errorHighInverse": { + "value": "{palette.o2Red65}", + "type": "color", + "description": "o2Red65" + }, + "promoHighInverse": { + "value": "{palette.o2Pink80}", + "type": "color", + "description": "o2Pink80" + }, + "textNavigationBarPrimary": { + "value": "{palette.white}", + "type": "color", + "description": "white" + }, + "textNavigationBarSecondary": { + "value": "{palette.beyondBlue30}", + "type": "color", + "description": "beyondBlue30" + }, + "textNavigationSearchBarHint": { + "value": "{palette.beyondBlue30}", + "type": "color", + "description": "beyondBlue30" + }, + "textNavigationSearchBarText": { + "value": "{palette.white}", + "type": "color", + "description": "white" + }, + "textAppBar": { + "value": "{palette.grey60}", + "type": "color", + "description": "grey60" + }, + "textAppBarSelected": { + "value": "{palette.beyondBlue}", + "type": "color", + "description": "beyondBlue" + }, + "customTabsBackground": { + "value": "{palette.beyondBlue}", + "type": "color", + "description": "beyondBlue" + }, + "tagTextPromo": { + "value": "{palette.o2Pink80}", + "type": "color", + "description": "o2Pink80" + }, + "tagTextActive": { + "value": "{palette.beyondBlue}", + "type": "color", + "description": "beyondBlue" + }, + "tagTextInactive": { + "value": "{palette.grey60}", + "type": "color", + "description": "grey60" + }, + "tagTextSuccess": { + "value": "{palette.o2Green80}", + "type": "color", + "description": "o2Green80" + }, + "tagTextWarning": { + "value": "{palette.o2Orange75}", + "type": "color", + "description": "o2Orange75" + }, + "tagTextError": { + "value": "{palette.o2Red65}", + "type": "color", + "description": "o2Red65" + }, + "tagBackgroundPromo": { + "value": "{palette.o2Pink15}", + "type": "color", + "description": "o2Pink15" + }, + "tagBackgroundActive": { + "value": "{palette.beyondBlue10}", + "type": "color", + "description": "beyondBlue10" + }, + "tagBackgroundInactive": { + "value": "{palette.grey20}", + "type": "color", + "description": "grey20" + }, + "tagBackgroundSuccess": { + "value": "{palette.o2Green10}", + "type": "color", + "description": "o2Green10" + }, + "tagBackgroundWarning": { + "value": "{palette.o2Orange10}", + "type": "color", + "description": "o2Orange10" + }, + "tagBackgroundError": { + "value": "{palette.o2Red10}", + "type": "color", + "description": "o2Red10" + }, + "cardContentOverlay": { + "type": "linear-gradient", + "value": { + "angle": 180, + "colors": [ + { "value": "rgba({palette.beyondBlue}, 0)", "stop": 0 }, + { "value": "rgba({palette.beyondBlue}, 0.4)", "stop": 0.3 }, + { "value": "rgba({palette.beyondBlue}, 1)", "stop": 1 } + ] + }, + "description": "grey6" + } + }, + "dark": { + "background": { + "value": "{palette.darkModeBlack}", + "type": "color", + "description": "darkModeBlack" + }, + "backgroundAlternative": { + "value": "{palette.darkModeBlack}", + "type": "color", + "description": "darkModeBlack" + }, + "backgroundBrand": { + "value": "{palette.darkModeBlack}", + "type": "color", + "description": "darkModeBlack" + }, + "backgroundBrandSecondary": { + "value": "{palette.darkModeBlack}", + "type": "color", + "description": "darkModeBlack" + }, + "backgroundContainer": { + "value": "{palette.darkModeGrey}", + "type": "color", + "description": "darkModeGrey" + }, + "backgroundContainerError": { + "value": "{palette.darkModeGrey}", + "type": "color", + "description": "darkModeGrey" + }, + "backgroundContainerHover": { + "value": "rgba({palette.white}, 0.03)", + "type": "color", + "description": "white" + }, + "backgroundContainerPressed": { + "value": "rgba({palette.white}, 0.05)", + "type": "color", + "description": "white" + }, + "backgroundContainerBrand": { + "value": "{palette.darkModeGrey}", + "type": "color", + "description": "darkModeGrey" + }, + "backgroundContainerBrandHover": { + "value": "rgba({palette.white}, 0.03)", + "type": "color", + "description": "white" + }, + "backgroundContainerBrandPressed": { + "value": "rgba({palette.white}, 0.05)", + "type": "color", + "description": "white" + }, + "backgroundContainerBrandOverInverse": { + "value": "{palette.darkModeGrey}", + "type": "color", + "description": "darkModeGrey" + }, + "backgroundContainerAlternative": { + "value": "{palette.darkModeGrey}", + "type": "color", + "description": "darkModeGrey" + }, + "backgroundOverlay": { + "value": "rgba({palette.darkModeGrey}, 0.8)", + "type": "color", + "description": "darkModeGrey" + }, + "backgroundSkeleton": { + "value": "{palette.darkModeGrey6}", + "type": "color", + "description": "darkModeGrey6" + }, + "backgroundSkeletonInverse": { + "value": "{palette.darkModeGrey6}", + "type": "color", + "description": "darkModeGrey6" + }, + "backgroundBrandTop": { + "value": "{palette.darkModeBlack}", + "type": "color", + "description": "darkModeBlack" + }, + "backgroundBrandBottom": { + "value": "{palette.darkModeBlack}", + "type": "color", + "description": "darkModeBlack" + }, + "appBarBackground": { + "value": "{palette.darkModeGrey}", + "type": "color", + "description": "darkModeGrey" + }, + "navigationBarBackground": { + "value": "{palette.darkModeBlack}", + "type": "color", + "description": "darkModeBlack" + }, + "skeletonWave": { + "value": "{palette.grey80}", + "type": "color", + "description": "grey80" + }, + "borderLow": { + "value": "{palette.darkModeBlack}", + "type": "color", + "description": "darkModeBlack" + }, + "border": { + "value": "{palette.darkModeGrey}", + "type": "color", + "description": "darkModeGrey" + }, + "borderHigh": { + "value": "{palette.grey45}", + "type": "color", + "description": "grey45" + }, + "borderSelected": { + "value": "{palette.beyondBlue30}", + "type": "color", + "description": "beyondBlue30" + }, + "coverBackgroundHover": { + "value": "rgba({palette.darkModeBlack}, 0.25)", + "type": "color", + "description": "darkModeBlack" + }, + "coverBackgroundPressed": { + "value": "rgba({palette.darkModeBlack}, 0.35)", + "type": "color", + "description": "darkModeBlack" + }, + "buttonDangerBackground": { + "value": "{palette.o2Red60}", + "type": "color", + "description": "o2Red60" + }, + "buttonDangerBackgroundSelected": { + "value": "{palette.o2Red65}", + "type": "color", + "description": "o2Red65" + }, + "buttonDangerBackgroundHover": { + "value": "{palette.o2Red65}", + "type": "color", + "description": "o2Red65" + }, + "buttonLinkDangerBackgroundSelected": { + "value": "rgba({palette.white}, 0.08)", + "type": "color", + "description": "white" + }, + "buttonLinkDangerBackgroundInverse": { + "value": "rgba({palette.white}, 0)", + "type": "color", + "description": "white" + }, + "buttonLinkDangerBackgroundInverseSelected": { + "value": "rgba({palette.white}, 0.08)", + "type": "color", + "description": "white" + }, + "buttonLinkBackgroundSelected": { + "value": "rgba({palette.white}, 0.08)", + "type": "color", + "description": "white" + }, + "buttonLinkBackgroundInverseSelected": { + "value": "rgba({palette.white}, 0.08)", + "type": "color", + "description": "white" + }, + "buttonPrimaryBackground": { + "value": "{palette.darkModeBeyondBlue}", + "type": "color", + "description": "darkModeBeyondBlue" + }, + "buttonPrimaryBackgroundInverse": { + "value": "{palette.darkModeBeyondBlue}", + "type": "color", + "description": "darkModeBeyondBlue" + }, + "buttonPrimaryBackgroundSelected": { + "value": "{palette.beyondBlue55}", + "type": "color", + "description": "beyondBlue55" + }, + "buttonPrimaryBackgroundHover": { + "value": "{palette.beyondBlue55}", + "type": "color", + "description": "beyondBlue55" + }, + "buttonPrimaryBackgroundInverseSelected": { + "value": "{palette.beyondBlue55}", + "type": "color", + "description": "beyondBlue55" + }, + "buttonSecondaryBackgroundSelected": { + "value": "rgba({palette.white}, 0.15)", + "type": "color", + "description": "white" + }, + "buttonSecondaryBorder": { + "value": "{palette.white}", + "type": "color", + "description": "white" + }, + "buttonSecondaryBorderSelected": { + "value": "{palette.white}", + "type": "color", + "description": "white" + }, + "buttonSecondaryBorderInverse": { + "value": "{palette.white}", + "type": "color", + "description": "white" + }, + "buttonSecondaryBorderInverseSelected": { + "value": "{palette.white}", + "type": "color", + "description": "white" + }, + "buttonSecondaryBackgroundHover": { + "value": "rgba({palette.white}, 0.15)", + "type": "color", + "description": "white" + }, + "buttonSecondaryBackgroundInverseHover": { + "value": "rgba({palette.white}, 0.15)", + "type": "color", + "description": "white" + }, + "buttonSecondaryBackgroundInverseSelected": { + "value": "rgba({palette.white}, 0.15)", + "type": "color", + "description": "white" + }, + "textButtonPrimary": { + "value": "{palette.white}", + "type": "color", + "description": "white" + }, + "textButtonPrimaryInverse": { + "value": "{palette.white}", + "type": "color", + "description": "white" + }, + "textButtonPrimaryInverseSelected": { + "value": "{palette.white}", + "type": "color", + "description": "white" + }, + "textButtonSecondary": { + "value": "{palette.grey30}", + "type": "color", + "description": "grey30" + }, + "textButtonSecondarySelected": { + "value": "{palette.grey30}", + "type": "color", + "description": "grey30" + }, + "textButtonSecondaryInverse": { + "value": "{palette.grey30}", + "type": "color", + "description": "grey30" + }, + "textButtonSecondaryInverseSelected": { + "value": "{palette.grey30}", + "type": "color", + "description": "grey30" + }, + "textLink": { + "value": "{palette.beyondBlue40}", + "type": "color", + "description": "beyondBlue40" + }, + "textLinkInverse": { + "value": "{palette.beyondBlue40}", + "type": "color", + "description": "beyondBlue40" + }, + "textLinkDanger": { + "value": "{palette.o2Red45}", + "type": "color", + "description": "o2Red45" + }, + "textLinkSnackbar": { + "value": "{palette.beyondBlue30}", + "type": "color", + "description": "beyondBlue30" + }, + "textActivated": { + "value": "{palette.beyondBlue30}", + "type": "color", + "description": "beyondBlue30" + }, + "textBrand": { + "value": "{palette.beyondBlue30}", + "type": "color", + "description": "beyondBlue30" + }, + "control": { + "value": "{palette.grey45}", + "type": "color", + "description": "grey45" + }, + "controlActivated": { + "value": "{palette.darkModeBeyondBlue}", + "type": "color", + "description": "darkModeBeyondBlue" + }, + "controlInverse": { + "value": "{palette.grey45}", + "type": "color", + "description": "grey45" + }, + "controlActivatedInverse": { + "value": "{palette.darkModeBeyondBlue}", + "type": "color", + "description": "darkModeBeyondBlue" + }, + "controlError": { + "value": "{palette.o2Red45}", + "type": "color", + "description": "o2Red45" + }, + "barTrack": { + "value": "{palette.darkModeGrey6}", + "type": "color", + "description": "darkModeGrey6" + }, + "loadingBar": { + "value": "{palette.darkModeBeyondBlue}", + "type": "color", + "description": "darkModeBeyondBlue" + }, + "loadingBarBackground": { + "value": "{palette.darkModeGrey6}", + "type": "color", + "description": "darkModeGrey6" + }, + "toggleAndroidInactive": { + "value": "{palette.grey20}", + "type": "color", + "description": "grey20" + }, + "toggleAndroidBackgroundActive": { + "value": "{palette.beyondBlue15}", + "type": "color", + "description": "beyondBlue15" + }, + "iosControlKnob": { + "value": "{palette.grey30}", + "type": "color", + "description": "grey30" + }, + "badge": { + "value": "{palette.o2Red65}", + "type": "color", + "description": "o2Red65" + }, + "feedbackErrorBackground": { + "value": "{palette.o2Red60}", + "type": "color", + "description": "o2Red60" + }, + "feedbackInfoBackground": { + "value": "{palette.darkModeGrey6}", + "type": "color", + "description": "darkModeGrey6" + }, + "divider": { + "value": "rgba({palette.white}, 0.1)", + "type": "color", + "description": "white" + }, + "dividerInverse": { + "value": "rgba({palette.white}, 0.1)", + "type": "color", + "description": "white" + }, + "navigationBarDivider": { + "value": "{palette.darkModeBlack}", + "type": "color", + "description": "darkModeBlack" + }, + "brand": { + "value": "{palette.beyondBlue30}", + "type": "color", + "description": "beyondBlue30" + }, + "brandHigh": { + "value": "rgba({palette.white}, 0.05)", + "type": "color", + "description": "white" + }, + "inverse": { + "value": "{palette.grey30}", + "type": "color", + "description": "grey30" + }, + "neutralHigh": { + "value": "{palette.grey30}", + "type": "color", + "description": "grey30" + }, + "neutralMedium": { + "value": "{palette.grey60}", + "type": "color", + "description": "grey60" + }, + "neutralMediumInverse": { + "value": "{palette.grey60}", + "type": "color", + "description": "grey60" + }, + "neutralLow": { + "value": "{palette.grey80}", + "type": "color", + "description": "grey80" + }, + "neutralLowAlternative": { + "value": "{palette.grey80}", + "type": "color", + "description": "grey80" + }, + "textPrimary": { + "value": "{palette.grey30}", + "type": "color", + "description": "grey30" + }, + "textPrimaryInverse": { + "value": "{palette.grey30}", + "type": "color", + "description": "grey30" + }, + "textSecondary": { + "value": "{palette.grey45}", + "type": "color", + "description": "grey45" + }, + "textSecondaryInverse": { + "value": "{palette.grey45}", + "type": "color", + "description": "grey45" + }, + "success": { + "value": "{palette.o2Green}", + "type": "color", + "description": "o2Green" + }, + "warning": { + "value": "{palette.o2Orange}", + "type": "color", + "description": "o2Orange" + }, + "error": { + "value": "{palette.o2Red45}", + "type": "color", + "description": "o2Red45" + }, + "textError": { + "value": "{palette.o2Red45}", + "type": "color", + "description": "o2Red45" + }, + "textErrorInverse": { + "value": "{palette.o2Red45}", + "type": "color", + "description": "o2Red45" + }, + "promo": { + "value": "{palette.o2Pink}", + "type": "color", + "description": "o2Pink" + }, + "highlight": { + "value": "{palette.o2Pink}", + "type": "color", + "description": "o2Pink" + }, + "successLow": { + "value": "{palette.darkModeGrey6}", + "type": "color", + "description": "darkModeGrey6" + }, + "warningLow": { + "value": "{palette.darkModeGrey6}", + "type": "color", + "description": "darkModeGrey6" + }, + "errorLow": { + "value": "{palette.darkModeGrey6}", + "type": "color", + "description": "darkModeGrey6" + }, + "promoLow": { + "value": "{palette.darkModeGrey6}", + "type": "color", + "description": "darkModeGrey6" + }, + "brandLow": { + "value": "{palette.darkModeGrey6}", + "type": "color", + "description": "darkModeGrey6" + }, + "successHigh": { + "value": "{palette.o2Green40}", + "type": "color", + "description": "o2Green40" + }, + "warningHigh": { + "value": "{palette.o2Orange40}", + "type": "color", + "description": "o2Orange40" + }, + "errorHigh": { + "value": "{palette.o2Red40}", + "type": "color", + "description": "o2Red40" + }, + "promoHigh": { + "value": "{palette.o2Pink30}", + "type": "color", + "description": "o2Pink30" + }, + "successHighInverse": { + "value": "{palette.o2Green80}", + "type": "color", + "description": "o2Green80" + }, + "warningHighInverse": { + "value": "{palette.o2Orange75}", + "type": "color", + "description": "o2Orange75" + }, + "errorHighInverse": { + "value": "{palette.o2Red65}", + "type": "color", + "description": "o2Red65" + }, + "promoHighInverse": { + "value": "{palette.o2Pink}", + "type": "color", + "description": "o2Pink" + }, + "textNavigationBarPrimary": { + "value": "{palette.grey30}", + "type": "color", + "description": "grey30" + }, + "textNavigationBarSecondary": { + "value": "{palette.grey45}", + "type": "color", + "description": "grey45" + }, + "textNavigationSearchBarHint": { + "value": "{palette.grey45}", + "type": "color", + "description": "grey45" + }, + "textNavigationSearchBarText": { + "value": "{palette.grey30}", + "type": "color", + "description": "grey30" + }, + "textAppBar": { + "value": "{palette.grey45}", + "type": "color", + "description": "grey45" + }, + "textAppBarSelected": { + "value": "{palette.beyondBlue40}", + "type": "color", + "description": "beyondBlue40" + }, + "customTabsBackground": { + "value": "{palette.darkModeBlack}", + "type": "color", + "description": "darkModeBlack" + }, + "tagTextPromo": { + "value": "{palette.o2Pink}", + "type": "color", + "description": "o2Pink" + }, + "tagTextActive": { + "value": "{palette.beyondBlue30}", + "type": "color", + "description": "beyondBlue30" + }, + "tagTextInactive": { + "value": "{palette.grey40}", + "type": "color", + "description": "grey40" + }, + "tagTextSuccess": { + "value": "{palette.o2Green}", + "type": "color", + "description": "o2Green" + }, + "tagTextWarning": { + "value": "{palette.o2Orange}", + "type": "color", + "description": "o2Orange" + }, + "tagTextError": { + "value": "{palette.o2Red45}", + "type": "color", + "description": "o2Red45" + }, + "tagBackgroundPromo": { + "value": "{palette.darkModeGrey6}", + "type": "color", + "description": "darkModeGrey6" + }, + "tagBackgroundActive": { + "value": "{palette.darkModeGrey6}", + "type": "color", + "description": "darkModeGrey6" + }, + "tagBackgroundInactive": { + "value": "{palette.darkModeGrey6}", + "type": "color", + "description": "darkModeGrey6" + }, + "tagBackgroundSuccess": { + "value": "{palette.darkModeGrey6}", + "type": "color", + "description": "darkModeGrey6" + }, + "tagBackgroundWarning": { + "value": "{palette.darkModeGrey6}", + "type": "color", + "description": "darkModeGrey6" + }, + "tagBackgroundError": { + "value": "{palette.darkModeGrey6}", + "type": "color", + "description": "darkModeGrey6" + }, + "cardContentOverlay": { + "type": "linear-gradient", + "value": { + "angle": 180, + "colors": [ + { "value": "rgba({palette.black}, 0)", "stop": 0 }, + { "value": "rgba({palette.black}, 0.4)", "stop": 0.3 }, + { "value": "rgba({palette.black}, 0.7)", "stop": 1 } + ] + }, + "description": "grey6" + } + }, + "radius": { + "avatar": { "value": "circle", "type": "borderRadius" }, + "bar": { "value": "999", "type": "borderRadius" }, + "button": { "value": "999", "type": "borderRadius" }, + "checkbox": { "value": "2", "type": "borderRadius" }, + "container": { "value": "16", "type": "borderRadius" }, + "indicator": { "value": "999", "type": "borderRadius" }, + "input": { "value": "12", "type": "borderRadius" }, + "legacyDisplay": { "value": "16", "type": "borderRadius" }, + "popup": { "value": "8", "type": "borderRadius" }, + "sheet": { "value": "16", "type": "borderRadius" }, + "mediaSmall": { "value": "8", "type": "borderRadius" } + }, + "text": { + "weight": { + "cardTitle": { "value": "medium", "type": "typography" }, + "button": { "value": "medium", "type": "typography" }, + "tabsLabel": { "value": "medium", "type": "typography" }, + "link": { "value": "medium", "type": "typography" }, + "title1": { "value": "medium", "type": "typography" }, + "title2": { "value": "bold", "type": "typography" }, + "indicator": { "value": "medium", "type": "typography" }, + "navigationBar": { "value": "medium", "type": "typography" }, + "text5": { "value": "bold", "type": "typography" }, + "text6": { "value": "bold", "type": "typography" }, + "text7": { "value": "bold", "type": "typography" }, + "text8": { "value": "bold", "type": "typography" }, + "text9": { "value": "bold", "type": "typography" }, + "text10": { "value": "bold", "type": "typography" } + }, + "size": { + "tabsLabel": { + "value": { "mobile": 16, "desktop": 18 }, + "type": "typography" + }, + "title2": { + "value": { "mobile": 20, "desktop": 28 }, + "type": "typography" + } + }, + "lineHeight": { + "tabsLabel": { + "value": { "mobile": 24, "desktop": 24 }, + "type": "typography" + }, + "title2": { + "value": { "mobile": 24, "desktop": 32 }, + "type": "typography" + } + } + }, + "themeVariant": { + "successFeedback": { "value": "inverse", "type": "themeVariant" }, + "brandLoadingScreen": { "value": "inverse", "type": "themeVariant" } + }, + "global": { + "palette": { + "beyondBlue": { "value": "#0050FF", "type": "color" }, + "beyondBlue10": { "value": "#E5EDFF", "type": "color" }, + "beyondBlue15": { "value": "#CCDCFF", "type": "color" }, + "beyondBlue30": { "value": "#80A7FF", "type": "color" }, + "beyondBlue40": { "value": "#4D84FF", "type": "color" }, + "beyondBlue45": { "value": "#0A73EB", "type": "color" }, + "beyondBlue55": { "value": "#0044D9", "type": "color" }, + "beyondBlue70": { "value": "#0038B2", "type": "color" }, + "beyondBlue90": { "value": "#001033", "type": "color" }, + "darkBlue": { "value": "#00008C", "type": "color" }, + "o2BlueLight": { "value": "#82DCFA", "type": "color" }, + "o2BlueLight30": { "value": "#C0EEFD", "type": "color" }, + "o2BlueLight35": { "value": "#B4EAFC", "type": "color" }, + "o2Green": { "value": "#00DC7D", "type": "color" }, + "o2Green10": { "value": "#E5FBF2", "type": "color" }, + "o2Green40": { "value": "#4CE7A4", "type": "color" }, + "o2Green80": { "value": "#006338", "type": "color" }, + "o2Yellow": { "value": "#FADC00", "type": "color" }, + "o2Orange": { "value": "#FFA55A", "type": "color" }, + "o2Orange10": { "value": "#FFF6EE", "type": "color" }, + "o2Orange40": { "value": "#FFC08B", "type": "color" }, + "o2Orange75": { "value": "#996336", "type": "color" }, + "o2Pink": { "value": "#FA96FF", "type": "color" }, + "o2Pink15": { "value": "#FEEAFF", "type": "color" }, + "o2Pink30": { "value": "#FDCAFF", "type": "color" }, + "o2Pink80": { "value": "#704373", "type": "color" }, + "o2Red": { "value": "#FF5A5A", "type": "color" }, + "o2Red10": { "value": "#FFEEEE", "type": "color" }, + "o2Red20": { "value": "#FFCDCD", "type": "color" }, + "o2Red40": { "value": "#FF8B8B", "type": "color" }, + "o2Red45": { "value": "#FF7B7B", "type": "color" }, + "o2Red60": { "value": "#CC4848", "type": "color" }, + "o2Red65": { "value": "#BF4444", "type": "color" }, + "grey20": { "value": "#F3F3F5", "type": "color" }, + "grey30": { "value": "#D9D9DD", "type": "color" }, + "grey40": { "value": "#B4B4BE", "type": "color" }, + "grey45": { "value": "#8C8C9A", "type": "color" }, + "grey60": { "value": "#6E6E77", "type": "color" }, + "grey80": { "value": "#3C3C46", "type": "color" }, + "black": { "value": "#00001E", "type": "color" }, + "white": { "value": "#FFFFFF", "type": "color" }, + "darkModeBlack": { "value": "#00001C", "type": "color" }, + "darkModeGrey": { "value": "#08132B", "type": "color" }, + "darkModeGrey6": { "value": "#14213D", "type": "color" }, + "darkModeBeyondBlue": { "value": "#1A62FF", "type": "color" } + } + } +} diff --git a/scripts/mistica-importer/generators/font-weights/__tests__/brand-font-weights-generator.test.js b/scripts/mistica-importer/generators/font-weights/__tests__/brand-font-weights-generator.test.js new file mode 100644 index 00000000..e6d5ac4f --- /dev/null +++ b/scripts/mistica-importer/generators/font-weights/__tests__/brand-font-weights-generator.test.js @@ -0,0 +1,21 @@ +import fs from "fs"; +import { resolve } from "path"; +import { generateBrandFontWeights } from "../brand-font-weights-generator"; + +describe("generateBrandFontWeights", () => { + it("real case", () => { + const anyBrandTokensPath = resolve(__dirname, "any-brand-tokens.json"); + const anyBrandTokens = JSON.parse( + fs.readFileSync(anyBrandTokensPath, "utf-8") + ); + const brand = { prefix: "O2New" }; + const result = generateBrandFontWeights(brand, anyBrandTokens); + + const expectedContentPath = resolve( + __dirname, + "expected-o2-new-font-weights.swift" + ); + const expectedContent = fs.readFileSync(expectedContentPath, "utf-8"); + expect(result).toBe(expectedContent); + }); +}); diff --git a/scripts/mistica-importer/generators/font-weights/__tests__/expected-mistica-font-weights.swift b/scripts/mistica-importer/generators/font-weights/__tests__/expected-mistica-font-weights.swift new file mode 100644 index 00000000..4d3c7d86 --- /dev/null +++ b/scripts/mistica-importer/generators/font-weights/__tests__/expected-mistica-font-weights.swift @@ -0,0 +1,22 @@ + +// Generated using Make +// DO NOT EDIT + +import UIKit + +public protocol MisticaFontWeights { + var cardTitle: MisticaFontWeightType { get } + var button: MisticaFontWeightType { get } + var tabsLabel: MisticaFontWeightType { get } + var link: MisticaFontWeightType { get } + var title1: MisticaFontWeightType { get } + var title2: MisticaFontWeightType { get } + var indicator: MisticaFontWeightType { get } + var navigationBar: MisticaFontWeightType { get } + var text5: MisticaFontWeightType { get } + var text6: MisticaFontWeightType { get } + var text7: MisticaFontWeightType { get } + var text8: MisticaFontWeightType { get } + var text9: MisticaFontWeightType { get } + var text10: MisticaFontWeightType { get } +} diff --git a/scripts/mistica-importer/generators/font-weights/__tests__/expected-o2-new-font-weights.swift b/scripts/mistica-importer/generators/font-weights/__tests__/expected-o2-new-font-weights.swift new file mode 100644 index 00000000..522d4d9a --- /dev/null +++ b/scripts/mistica-importer/generators/font-weights/__tests__/expected-o2-new-font-weights.swift @@ -0,0 +1,22 @@ + +// Generated using Make +// DO NOT EDIT + +import Foundation + +struct O2NewFontWeights: MisticaFontWeights { + public var cardTitle: MisticaFontWeightType = .medium + public var button: MisticaFontWeightType = .medium + public var tabsLabel: MisticaFontWeightType = .medium + public var link: MisticaFontWeightType = .medium + public var title1: MisticaFontWeightType = .medium + public var title2: MisticaFontWeightType = .bold + public var indicator: MisticaFontWeightType = .medium + public var navigationBar: MisticaFontWeightType = .medium + public var text5: MisticaFontWeightType = .bold + public var text6: MisticaFontWeightType = .bold + public var text7: MisticaFontWeightType = .bold + public var text8: MisticaFontWeightType = .bold + public var text9: MisticaFontWeightType = .bold + public var text10: MisticaFontWeightType = .bold +} diff --git a/scripts/mistica-importer/generators/font-weights/__tests__/mistica-font-weights-generator.test.js b/scripts/mistica-importer/generators/font-weights/__tests__/mistica-font-weights-generator.test.js new file mode 100644 index 00000000..794e6ae6 --- /dev/null +++ b/scripts/mistica-importer/generators/font-weights/__tests__/mistica-font-weights-generator.test.js @@ -0,0 +1,20 @@ +import fs from "fs"; +import { resolve } from "path"; +import { generateMisticaFontWeights } from "../mistica-font-weights-generator"; + +describe("generateMisticaFontWeights", () => { + it("real case", () => { + const anyBrandTokensPath = resolve(__dirname, "any-brand-tokens.json"); + const anyBrandTokens = JSON.parse( + fs.readFileSync(anyBrandTokensPath, "utf-8") + ); + const result = generateMisticaFontWeights(anyBrandTokens); + + const expectedContentPath = resolve( + __dirname, + "expected-mistica-font-weights.swift" + ); + const expectedContent = fs.readFileSync(expectedContentPath, "utf-8"); + expect(result).toBe(expectedContent); + }); +}); diff --git a/scripts/mistica-importer/generators/font-weights/brand-font-weights-generator.js b/scripts/mistica-importer/generators/font-weights/brand-font-weights-generator.js new file mode 100644 index 00000000..7baa1a0b --- /dev/null +++ b/scripts/mistica-importer/generators/font-weights/brand-font-weights-generator.js @@ -0,0 +1,20 @@ +export const generateBrandFontWeights = (brand, tokens) => { + const weights = Object.entries(tokens["text"]["weight"]); + return template(brand.prefix, weights); +}; + +const template = (prefix, weights) => ` +// Generated using Make +// DO NOT EDIT + +import Foundation + +struct ${prefix}FontWeights: MisticaFontWeights { +${weights + .map( + (weight) => + ` public var ${weight[0]}: MisticaFontWeightType = .${weight[1].value}` + ) + .join("\n")} +} +`; diff --git a/scripts/mistica-importer/generators/font-weights/mistica-font-weights-generator.js b/scripts/mistica-importer/generators/font-weights/mistica-font-weights-generator.js new file mode 100644 index 00000000..4b7046d3 --- /dev/null +++ b/scripts/mistica-importer/generators/font-weights/mistica-font-weights-generator.js @@ -0,0 +1,17 @@ +export const generateMisticaFontWeights = (anyBrandTokens) => { + const weights = Object.keys(anyBrandTokens["text"]["weight"]); + return template(weights); +}; + +const template = (props) => ` +// Generated using Make +// DO NOT EDIT + +import UIKit + +public protocol MisticaFontWeights { +${props + .map((prop) => ` var ${prop}: MisticaFontWeightType { get }`) + .join("\n")} +} +`; diff --git a/scripts/mistica-importer/index.js b/scripts/mistica-importer/index.js new file mode 100644 index 00000000..c4d96624 --- /dev/null +++ b/scripts/mistica-importer/index.js @@ -0,0 +1,164 @@ +import fs from "fs"; +import { generateMisticaCornerRadius } from "./generators/corner-radius/mistica-corner-radius-generator.js"; +import { generateBrandFontSizes } from "./generators/font-sizes/brand-font-sizes-generator.js"; +import { generateMisticaFontSizes } from "./generators/font-sizes/mistica-font-sizes-generator.js"; +import { generateBrandFontWeights } from "./generators/font-weights/brand-font-weights-generator.js"; +import { generateMisticaFontWeights } from "./generators/font-weights/mistica-font-weights-generator.js"; +import { downloadTokens } from "./token-downloader.js"; +import { generateBrandCornerRadius } from "./generators/corner-radius/brand-corner-radius-generator.js"; +import { generateMisticaColors } from "./generators/colors/mistica-colors-generator.js"; +import { generateMisticaColor } from "./generators/colors/mistica-color-generator.js"; +import { reduceColors } from "./generators/colors/reduce-colors.js"; +import { generateColorToolkit } from "./generators/colors/color-toolkit-generator.js"; +import { generateUIColorToolkit } from "./generators/colors/uicolor-toolkit-generator.js"; +import { generateBrandColors } from "./generators/colors/brand-colors-generator.js"; + +const BRANDS = [ + { + id: "blau", + prefix: "Blau", + misticaDesignFileName: "blau", + }, + { + id: "movistar", + prefix: "Movistar", + misticaDesignFileName: "movistar", + }, + { + id: "o2new", + prefix: "O2New", + misticaDesignFileName: "o2-new", + }, + { + id: "o2", + prefix: "O2", + misticaDesignFileName: "o2", + }, + { + id: "telefonica", + prefix: "Telefonica", + misticaDesignFileName: "telefonica", + }, + { + id: "tu", + prefix: "Tu", + misticaDesignFileName: "tu", + }, + { + id: "vivoNew", + prefix: "VivoNew", + misticaDesignFileName: "vivo-new", + }, + { + id: "vivo", + prefix: "Vivo", + misticaDesignFileName: "vivo", + }, +]; + +const BRANCH = "production"; + +const run = async () => { + try { + const brandsWithTokens = await Promise.all( + BRANDS.map((brand) => + downloadTokens(BRANCH, brand.misticaDesignFileName).then((tokens) => ({ + brand, + tokens, + })) + ) + ); + const anyBrandTokens = brandsWithTokens[0].tokens; + + // Font weights + const misticaFontWeights = generateMisticaFontWeights(anyBrandTokens); + fs.writeFileSync( + "../../Sources/MisticaCommon/Fonts/MisticaFontWeights.swift", + misticaFontWeights + ); + + // Font sizes + const misticaFontSizes = generateMisticaFontSizes(anyBrandTokens); + fs.writeFileSync( + "../../Sources/MisticaCommon/Fonts/MisticaFontSizes.swift", + misticaFontSizes + ); + + // Corner radius + const misticaCornerRadius = generateMisticaCornerRadius(anyBrandTokens); + fs.writeFileSync( + "../../Sources/MisticaCommon/Radius/MisticaCornerRadius.swift", + misticaCornerRadius + ); + + // Colors + const colors = reduceColors(brandsWithTokens); + const misticaColors = generateMisticaColors(colors); + fs.writeFileSync( + "../../Sources/MisticaCommon/Colors/MisticaColors.swift", + misticaColors + ); + const misticaColor = generateMisticaColor(colors); + fs.writeFileSync( + "../../Sources/MisticaCommon/Colors/MisticaColor.swift", + misticaColor + ); + const colorToolkit = generateColorToolkit(colors); + fs.writeFileSync( + "../../Sources/MisticaCommon/Colors/ColorToolkit+Color.swift", + colorToolkit + ); + const uicolorToolkit = generateUIColorToolkit(colors); + fs.writeFileSync( + "../../Sources/MisticaCommon/Colors/ColorToolkit+UIColor.swift", + uicolorToolkit + ); + + brandsWithTokens.forEach((brandWithTokens) => { + // Font weights + const brandFontWeights = generateBrandFontWeights( + brandWithTokens.brand, + brandWithTokens.tokens + ); + fs.writeFileSync( + `../../Sources/MisticaCommon/Fonts/Brands/${brandWithTokens.brand.prefix}FontWeights.swift`, + brandFontWeights + ); + + // Font sizes + const brandFontSizes = generateBrandFontSizes( + brandWithTokens.brand, + brandWithTokens.tokens + ); + fs.writeFileSync( + `../../Sources/MisticaCommon/Fonts/Brands/${brandWithTokens.brand.prefix}FontSizes.swift`, + brandFontSizes + ); + + // Corner radius + const brandCornerRadius = generateBrandCornerRadius( + brandWithTokens.brand, + brandWithTokens.tokens + ); + fs.writeFileSync( + `../../Sources/MisticaCommon/Radius/Brands/${brandWithTokens.brand.prefix}CornerRadius.swift`, + brandCornerRadius + ); + + // Colors + const brandColors = generateBrandColors( + brandWithTokens.brand, + colors, + brandWithTokens.tokens.global.palette + ); + fs.writeFileSync( + `../../Sources/MisticaCommon/Colors/${brandWithTokens.brand.prefix}ColorPalette.swift`, + brandColors + ); + }); + } catch (error) { + console.error("Download error", error); + } +}; + +run(); diff --git a/scripts/mistica-importer/mocks/o2-new.json b/scripts/mistica-importer/mocks/o2-new.json new file mode 100644 index 00000000..197790fc --- /dev/null +++ b/scripts/mistica-importer/mocks/o2-new.json @@ -0,0 +1,1438 @@ +{ + "light": { + "background": { + "value": "{palette.white}", + "type": "color", + "description": "white" + }, + "backgroundAlternative": { + "value": "{palette.grey20}", + "type": "color", + "description": "grey20" + }, + "backgroundBrand": { + "type": "linear-gradient", + "value": { + "angle": 180, + "colors": [ + { "value": "{palette.darkBlue}", "stop": 0 }, + { "value": "{palette.beyondBlue}", "stop": 0.64 }, + { "value": "{palette.beyondBlue45}", "stop": 1 } + ] + }, + "description": "o2Gradient" + }, + "backgroundBrandSecondary": { + "value": "{palette.beyondBlue}", + "type": "color", + "description": "beyondBlue" + }, + "backgroundContainer": { + "value": "{palette.white}", + "type": "color", + "description": "white" + }, + "backgroundContainerError": { + "value": "{palette.o2Red10}", + "type": "color", + "description": "o2Red10" + }, + "backgroundContainerHover": { + "value": "rgba({palette.darkModeBlack}, 0.03)", + "type": "color", + "description": "darkModeBlack" + }, + "backgroundContainerPressed": { + "value": "rgba({palette.darkModeBlack}, 0.05)", + "type": "color", + "description": "darkModeBlack" + }, + "backgroundContainerBrand": { + "type": "linear-gradient", + "value": { + "angle": 180, + "colors": [ + { "value": "{palette.darkBlue}", "stop": 0 }, + { "value": "{palette.beyondBlue}", "stop": 0.64 }, + { "value": "{palette.beyondBlue45}", "stop": 1 } + ] + }, + "description": "o2Gradient" + }, + "backgroundContainerBrandHover": { + "value": "rgba({palette.darkModeBlack}, 0.2)", + "type": "color", + "description": "darkModeBlack" + }, + "backgroundContainerBrandPressed": { + "value": "rgba({palette.darkModeBlack}, 0.4)", + "type": "color", + "description": "darkModeBlack" + }, + "backgroundContainerBrandOverInverse": { + "value": "{palette.beyondBlue70}", + "type": "color", + "description": "beyondBlue70" + }, + "backgroundContainerAlternative": { + "value": "{palette.grey20}", + "type": "color", + "description": "grey20" + }, + "backgroundOverlay": { + "value": "rgba({palette.black}, 0.6)", + "type": "color", + "description": "black" + }, + "backgroundSkeleton": { + "value": "{palette.grey30}", + "type": "color", + "description": "grey30" + }, + "backgroundSkeletonInverse": { + "value": "{palette.beyondBlue70}", + "type": "color", + "description": "beyondBlue70" + }, + "backgroundBrandTop": { + "value": "{palette.darkBlue}", + "type": "color", + "description": "darkBlue" + }, + "backgroundBrandBottom": { + "value": "{palette.beyondBlue45}", + "type": "color", + "description": "beyondBlue45" + }, + "appBarBackground": { + "value": "{palette.white}", + "type": "color", + "description": "white" + }, + "navigationBarBackground": { + "value": "{palette.darkBlue}", + "type": "color", + "description": "darkBlue" + }, + "skeletonWave": { + "value": "{palette.grey30}", + "type": "color", + "description": "grey30" + }, + "borderLow": { + "value": "{palette.grey20}", + "type": "color", + "description": "grey20" + }, + "border": { + "value": "{palette.grey30}", + "type": "color", + "description": "grey30" + }, + "borderHigh": { + "value": "{palette.grey80}", + "type": "color", + "description": "grey80" + }, + "borderSelected": { + "value": "{palette.beyondBlue}", + "type": "color", + "description": "beyondBlue" + }, + "coverBackgroundHover": { + "value": "rgba({palette.darkModeBlack}, 0.25)", + "type": "color", + "description": "darkModeBlack" + }, + "coverBackgroundPressed": { + "value": "rgba({palette.darkModeBlack}, 0.35)", + "type": "color", + "description": "darkModeBlack" + }, + "buttonDangerBackground": { + "value": "{palette.o2Red60}", + "type": "color", + "description": "o2Red60" + }, + "buttonDangerBackgroundSelected": { + "value": "{palette.o2Red65}", + "type": "color", + "description": "o2Red65" + }, + "buttonDangerBackgroundHover": { + "value": "{palette.o2Red65}", + "type": "color", + "description": "o2Red65" + }, + "buttonLinkDangerBackgroundSelected": { + "value": "{palette.o2Red10}", + "type": "color", + "description": "o2Red10" + }, + "buttonLinkDangerBackgroundInverse": { + "value": "{palette.white}", + "type": "color", + "description": "white" + }, + "buttonLinkDangerBackgroundInverseSelected": { + "value": "{palette.o2Red10}", + "type": "color", + "description": "o2Red10" + }, + "buttonLinkBackgroundSelected": { + "value": "{palette.beyondBlue10}", + "type": "color", + "description": "beyondBlue10" + }, + "buttonLinkBackgroundInverseSelected": { + "value": "rgba({palette.white}, 0.08)", + "type": "color", + "description": "white" + }, + "buttonPrimaryBackground": { + "value": "{palette.beyondBlue}", + "type": "color", + "description": "beyondBlue" + }, + "buttonPrimaryBackgroundInverse": { + "value": "{palette.white}", + "type": "color", + "description": "white" + }, + "buttonPrimaryBackgroundSelected": { + "value": "{palette.beyondBlue70}", + "type": "color", + "description": "beyondBlue70" + }, + "buttonPrimaryBackgroundHover": { + "value": "{palette.beyondBlue70}", + "type": "color", + "description": "beyondBlue70" + }, + "buttonPrimaryBackgroundInverseSelected": { + "value": "{palette.beyondBlue30}", + "type": "color", + "description": "beyondBlue30" + }, + "buttonSecondaryBorder": { + "value": "{palette.beyondBlue}", + "type": "color", + "description": "beyondBlue" + }, + "buttonSecondaryBorderSelected": { + "value": "{palette.beyondBlue70}", + "type": "color", + "description": "beyondBlue70" + }, + "buttonSecondaryBackgroundHover": { + "value": "{palette.beyondBlue10}", + "type": "color", + "description": "beyondBlue10" + }, + "buttonSecondaryBackgroundSelected": { + "value": "{palette.beyondBlue10}", + "type": "color", + "description": "beyondBlue10" + }, + "buttonSecondaryBorderInverse": { + "value": "{palette.white}", + "type": "color", + "description": "white" + }, + "buttonSecondaryBorderInverseSelected": { + "value": "{palette.beyondBlue30}", + "type": "color", + "description": "beyondBlue30" + }, + "buttonSecondaryBackgroundInverseHover": { + "value": "rgba({palette.white}, 0.15)", + "type": "color", + "description": "white" + }, + "buttonSecondaryBackgroundInverseSelected": { + "value": "rgba({palette.white}, 0.15)", + "type": "color", + "description": "white" + }, + "textButtonPrimary": { + "value": "{palette.white}", + "type": "color", + "description": "white" + }, + "textButtonPrimaryInverse": { + "value": "{palette.beyondBlue}", + "type": "color", + "description": "beyondBlue" + }, + "textButtonPrimaryInverseSelected": { + "value": "{palette.beyondBlue70}", + "type": "color", + "description": "beyondBlue70" + }, + "textButtonSecondary": { + "value": "{palette.beyondBlue}", + "type": "color", + "description": "beyondBlue" + }, + "textButtonSecondarySelected": { + "value": "{palette.beyondBlue70}", + "type": "color", + "description": "beyondBlue70" + }, + "textButtonSecondaryInverse": { + "value": "{palette.white}", + "type": "color", + "description": "white" + }, + "textButtonSecondaryInverseSelected": { + "value": "{palette.white}", + "type": "color", + "description": "white" + }, + "textLink": { + "value": "{palette.beyondBlue}", + "type": "color", + "description": "beyondBlue" + }, + "textLinkInverse": { + "value": "{palette.white}", + "type": "color", + "description": "white" + }, + "textLinkDanger": { + "value": "{palette.o2Red65}", + "type": "color", + "description": "o2Red65" + }, + "textLinkSnackbar": { + "value": "{palette.beyondBlue30}", + "type": "color", + "description": "beyondBlue30" + }, + "textActivated": { + "value": "{palette.beyondBlue}", + "type": "color", + "description": "beyondBlue" + }, + "textBrand": { + "value": "{palette.beyondBlue}", + "type": "color", + "description": "beyondBlue" + }, + "control": { + "value": "{palette.grey45}", + "type": "color", + "description": "grey45" + }, + "controlActivated": { + "value": "{palette.beyondBlue}", + "type": "color", + "description": "beyondBlue" + }, + "controlInverse": { + "value": "{palette.white}", + "type": "color", + "description": "white" + }, + "controlActivatedInverse": { + "value": "{palette.white}", + "type": "color", + "description": "white" + }, + "controlError": { + "value": "{palette.o2Red60}", + "type": "color", + "description": "o2Red60" + }, + "barTrack": { + "value": "{palette.grey30}", + "type": "color", + "description": "grey30" + }, + "loadingBar": { + "value": "{palette.beyondBlue}", + "type": "color", + "description": "beyondBlue" + }, + "loadingBarBackground": { + "value": "{palette.grey20}", + "type": "color", + "description": "grey20" + }, + "toggleAndroidInactive": { + "value": "{palette.grey30}", + "type": "color", + "description": "grey30" + }, + "toggleAndroidBackgroundActive": { + "value": "{palette.beyondBlue15}", + "type": "color", + "description": "beyondBlue15" + }, + "iosControlKnob": { + "value": "{palette.white}", + "type": "color", + "description": "white" + }, + "divider": { + "value": "{palette.grey30}", + "type": "color", + "description": "grey30" + }, + "dividerInverse": { + "value": "rgba({palette.white}, 0.2)", + "type": "color", + "description": "white" + }, + "navigationBarDivider": { + "value": "{palette.darkBlue}", + "type": "color", + "description": "darkBlue" + }, + "badge": { + "value": "{palette.o2Red65}", + "type": "color", + "description": "o2Red65" + }, + "feedbackErrorBackground": { + "value": "{palette.o2Red60}", + "type": "color", + "description": "o2Red60" + }, + "feedbackInfoBackground": { + "value": "{palette.black}", + "type": "color", + "description": "black" + }, + "brand": { + "value": "{palette.beyondBlue}", + "type": "color", + "description": "beyondBlue" + }, + "brandHigh": { + "value": "{palette.beyondBlue70}", + "type": "color", + "description": "beyondBlue70" + }, + "inverse": { + "value": "{palette.white}", + "type": "color", + "description": "white" + }, + "neutralHigh": { + "value": "{palette.black}", + "type": "color", + "description": "black" + }, + "neutralMedium": { + "value": "{palette.grey60}", + "type": "color", + "description": "grey60" + }, + "neutralMediumInverse": { + "value": "{palette.grey60}", + "type": "color", + "description": "grey60" + }, + "neutralLow": { + "value": "{palette.grey20}", + "type": "color", + "description": "grey20" + }, + "neutralLowAlternative": { + "value": "{palette.grey30}", + "type": "color", + "description": "grey30" + }, + "textPrimary": { + "value": "{palette.black}", + "type": "color", + "description": "black" + }, + "textPrimaryInverse": { + "value": "{palette.white}", + "type": "color", + "description": "white" + }, + "textSecondary": { + "value": "{palette.grey60}", + "type": "color", + "description": "grey60" + }, + "textSecondaryInverse": { + "value": "{palette.beyondBlue10}", + "type": "color", + "description": "beyondBlue10" + }, + "success": { + "value": "{palette.o2Green}", + "type": "color", + "description": "o2Green" + }, + "warning": { + "value": "{palette.o2Orange}", + "type": "color", + "description": "o2Orange" + }, + "error": { + "value": "{palette.o2Red65}", + "type": "color", + "description": "o2Red65" + }, + "textError": { + "value": "{palette.o2Red65}", + "type": "color", + "description": "o2Red65" + }, + "textErrorInverse": { + "value": "{palette.white}", + "type": "color", + "description": "white" + }, + "promo": { + "value": "{palette.o2Pink}", + "type": "color", + "description": "o2Pink" + }, + "highlight": { + "value": "{palette.o2Pink80}", + "type": "color", + "description": "o2Pink80" + }, + "successLow": { + "value": "{palette.o2Green10}", + "type": "color", + "description": "o2Green10" + }, + "warningLow": { + "value": "{palette.o2Orange10}", + "type": "color", + "description": "o2Orange10" + }, + "errorLow": { + "value": "{palette.o2Red10}", + "type": "color", + "description": "o2Red10" + }, + "promoLow": { + "value": "{palette.o2Pink15}", + "type": "color", + "description": "o2Pink15" + }, + "brandLow": { + "value": "{palette.beyondBlue10}", + "type": "color", + "description": "beyondBlue10" + }, + "successHigh": { + "value": "{palette.o2Green80}", + "type": "color", + "description": "o2Green80" + }, + "warningHigh": { + "value": "{palette.o2Orange75}", + "type": "color", + "description": "o2Orange75" + }, + "errorHigh": { + "value": "{palette.o2Red65}", + "type": "color", + "description": "o2Red65" + }, + "promoHigh": { + "value": "{palette.o2Pink80}", + "type": "color", + "description": "o2Pink80" + }, + "successHighInverse": { + "value": "{palette.o2Green80}", + "type": "color", + "description": "o2Green80" + }, + "warningHighInverse": { + "value": "{palette.o2Orange75}", + "type": "color", + "description": "o2Orange75" + }, + "errorHighInverse": { + "value": "{palette.o2Red65}", + "type": "color", + "description": "o2Red65" + }, + "promoHighInverse": { + "value": "{palette.o2Pink80}", + "type": "color", + "description": "o2Pink80" + }, + "textNavigationBarPrimary": { + "value": "{palette.white}", + "type": "color", + "description": "white" + }, + "textNavigationBarSecondary": { + "value": "{palette.beyondBlue30}", + "type": "color", + "description": "beyondBlue30" + }, + "textNavigationSearchBarHint": { + "value": "{palette.beyondBlue30}", + "type": "color", + "description": "beyondBlue30" + }, + "textNavigationSearchBarText": { + "value": "{palette.white}", + "type": "color", + "description": "white" + }, + "textAppBar": { + "value": "{palette.grey60}", + "type": "color", + "description": "grey60" + }, + "textAppBarSelected": { + "value": "{palette.beyondBlue}", + "type": "color", + "description": "beyondBlue" + }, + "customTabsBackground": { + "value": "{palette.beyondBlue}", + "type": "color", + "description": "beyondBlue" + }, + "tagTextPromo": { + "value": "{palette.o2Pink80}", + "type": "color", + "description": "o2Pink80" + }, + "tagTextActive": { + "value": "{palette.beyondBlue}", + "type": "color", + "description": "beyondBlue" + }, + "tagTextInactive": { + "value": "{palette.grey60}", + "type": "color", + "description": "grey60" + }, + "tagTextSuccess": { + "value": "{palette.o2Green80}", + "type": "color", + "description": "o2Green80" + }, + "tagTextWarning": { + "value": "{palette.o2Orange75}", + "type": "color", + "description": "o2Orange75" + }, + "tagTextError": { + "value": "{palette.o2Red65}", + "type": "color", + "description": "o2Red65" + }, + "tagBackgroundPromo": { + "value": "{palette.o2Pink15}", + "type": "color", + "description": "o2Pink15" + }, + "tagBackgroundActive": { + "value": "{palette.beyondBlue10}", + "type": "color", + "description": "beyondBlue10" + }, + "tagBackgroundInactive": { + "value": "{palette.grey20}", + "type": "color", + "description": "grey20" + }, + "tagBackgroundSuccess": { + "value": "{palette.o2Green10}", + "type": "color", + "description": "o2Green10" + }, + "tagBackgroundWarning": { + "value": "{palette.o2Orange10}", + "type": "color", + "description": "o2Orange10" + }, + "tagBackgroundError": { + "value": "{palette.o2Red10}", + "type": "color", + "description": "o2Red10" + }, + "cardContentOverlay": { + "type": "linear-gradient", + "value": { + "angle": 180, + "colors": [ + { "value": "rgba({palette.beyondBlue}, 0)", "stop": 0 }, + { "value": "rgba({palette.beyondBlue}, 0.4)", "stop": 0.3 }, + { "value": "rgba({palette.beyondBlue}, 1)", "stop": 1 } + ] + }, + "description": "grey6" + } + }, + "dark": { + "background": { + "value": "{palette.darkModeBlack}", + "type": "color", + "description": "darkModeBlack" + }, + "backgroundAlternative": { + "value": "{palette.darkModeBlack}", + "type": "color", + "description": "darkModeBlack" + }, + "backgroundBrand": { + "value": "{palette.darkModeBlack}", + "type": "color", + "description": "darkModeBlack" + }, + "backgroundBrandSecondary": { + "value": "{palette.darkModeBlack}", + "type": "color", + "description": "darkModeBlack" + }, + "backgroundContainer": { + "value": "{palette.darkModeGrey}", + "type": "color", + "description": "darkModeGrey" + }, + "backgroundContainerError": { + "value": "{palette.darkModeGrey}", + "type": "color", + "description": "darkModeGrey" + }, + "backgroundContainerHover": { + "value": "rgba({palette.white}, 0.03)", + "type": "color", + "description": "white" + }, + "backgroundContainerPressed": { + "value": "rgba({palette.white}, 0.05)", + "type": "color", + "description": "white" + }, + "backgroundContainerBrand": { + "value": "{palette.darkModeGrey}", + "type": "color", + "description": "darkModeGrey" + }, + "backgroundContainerBrandHover": { + "value": "rgba({palette.white}, 0.03)", + "type": "color", + "description": "white" + }, + "backgroundContainerBrandPressed": { + "value": "rgba({palette.white}, 0.05)", + "type": "color", + "description": "white" + }, + "backgroundContainerBrandOverInverse": { + "value": "{palette.darkModeGrey}", + "type": "color", + "description": "darkModeGrey" + }, + "backgroundContainerAlternative": { + "value": "{palette.darkModeGrey}", + "type": "color", + "description": "darkModeGrey" + }, + "backgroundOverlay": { + "value": "rgba({palette.darkModeGrey}, 0.8)", + "type": "color", + "description": "darkModeGrey" + }, + "backgroundSkeleton": { + "value": "{palette.darkModeGrey6}", + "type": "color", + "description": "darkModeGrey6" + }, + "backgroundSkeletonInverse": { + "value": "{palette.darkModeGrey6}", + "type": "color", + "description": "darkModeGrey6" + }, + "backgroundBrandTop": { + "value": "{palette.darkModeBlack}", + "type": "color", + "description": "darkModeBlack" + }, + "backgroundBrandBottom": { + "value": "{palette.darkModeBlack}", + "type": "color", + "description": "darkModeBlack" + }, + "appBarBackground": { + "value": "{palette.darkModeGrey}", + "type": "color", + "description": "darkModeGrey" + }, + "navigationBarBackground": { + "value": "{palette.darkModeBlack}", + "type": "color", + "description": "darkModeBlack" + }, + "skeletonWave": { + "value": "{palette.grey80}", + "type": "color", + "description": "grey80" + }, + "borderLow": { + "value": "{palette.darkModeBlack}", + "type": "color", + "description": "darkModeBlack" + }, + "border": { + "value": "{palette.darkModeGrey}", + "type": "color", + "description": "darkModeGrey" + }, + "borderHigh": { + "value": "{palette.grey45}", + "type": "color", + "description": "grey45" + }, + "borderSelected": { + "value": "{palette.beyondBlue30}", + "type": "color", + "description": "beyondBlue30" + }, + "coverBackgroundHover": { + "value": "rgba({palette.darkModeBlack}, 0.25)", + "type": "color", + "description": "darkModeBlack" + }, + "coverBackgroundPressed": { + "value": "rgba({palette.darkModeBlack}, 0.35)", + "type": "color", + "description": "darkModeBlack" + }, + "buttonDangerBackground": { + "value": "{palette.o2Red60}", + "type": "color", + "description": "o2Red60" + }, + "buttonDangerBackgroundSelected": { + "value": "{palette.o2Red65}", + "type": "color", + "description": "o2Red65" + }, + "buttonDangerBackgroundHover": { + "value": "{palette.o2Red65}", + "type": "color", + "description": "o2Red65" + }, + "buttonLinkDangerBackgroundSelected": { + "value": "rgba({palette.white}, 0.08)", + "type": "color", + "description": "white" + }, + "buttonLinkDangerBackgroundInverse": { + "value": "rgba({palette.white}, 0)", + "type": "color", + "description": "white" + }, + "buttonLinkDangerBackgroundInverseSelected": { + "value": "rgba({palette.white}, 0.08)", + "type": "color", + "description": "white" + }, + "buttonLinkBackgroundSelected": { + "value": "rgba({palette.white}, 0.08)", + "type": "color", + "description": "white" + }, + "buttonLinkBackgroundInverseSelected": { + "value": "rgba({palette.white}, 0.08)", + "type": "color", + "description": "white" + }, + "buttonPrimaryBackground": { + "value": "{palette.darkModeBeyondBlue}", + "type": "color", + "description": "darkModeBeyondBlue" + }, + "buttonPrimaryBackgroundInverse": { + "value": "{palette.darkModeBeyondBlue}", + "type": "color", + "description": "darkModeBeyondBlue" + }, + "buttonPrimaryBackgroundSelected": { + "value": "{palette.beyondBlue55}", + "type": "color", + "description": "beyondBlue55" + }, + "buttonPrimaryBackgroundHover": { + "value": "{palette.beyondBlue55}", + "type": "color", + "description": "beyondBlue55" + }, + "buttonPrimaryBackgroundInverseSelected": { + "value": "{palette.beyondBlue55}", + "type": "color", + "description": "beyondBlue55" + }, + "buttonSecondaryBackgroundSelected": { + "value": "rgba({palette.white}, 0.15)", + "type": "color", + "description": "white" + }, + "buttonSecondaryBorder": { + "value": "{palette.white}", + "type": "color", + "description": "white" + }, + "buttonSecondaryBorderSelected": { + "value": "{palette.white}", + "type": "color", + "description": "white" + }, + "buttonSecondaryBorderInverse": { + "value": "{palette.white}", + "type": "color", + "description": "white" + }, + "buttonSecondaryBorderInverseSelected": { + "value": "{palette.white}", + "type": "color", + "description": "white" + }, + "buttonSecondaryBackgroundHover": { + "value": "rgba({palette.white}, 0.15)", + "type": "color", + "description": "white" + }, + "buttonSecondaryBackgroundInverseHover": { + "value": "rgba({palette.white}, 0.15)", + "type": "color", + "description": "white" + }, + "buttonSecondaryBackgroundInverseSelected": { + "value": "rgba({palette.white}, 0.15)", + "type": "color", + "description": "white" + }, + "textButtonPrimary": { + "value": "{palette.white}", + "type": "color", + "description": "white" + }, + "textButtonPrimaryInverse": { + "value": "{palette.white}", + "type": "color", + "description": "white" + }, + "textButtonPrimaryInverseSelected": { + "value": "{palette.white}", + "type": "color", + "description": "white" + }, + "textButtonSecondary": { + "value": "{palette.grey30}", + "type": "color", + "description": "grey30" + }, + "textButtonSecondarySelected": { + "value": "{palette.grey30}", + "type": "color", + "description": "grey30" + }, + "textButtonSecondaryInverse": { + "value": "{palette.grey30}", + "type": "color", + "description": "grey30" + }, + "textButtonSecondaryInverseSelected": { + "value": "{palette.grey30}", + "type": "color", + "description": "grey30" + }, + "textLink": { + "value": "{palette.beyondBlue40}", + "type": "color", + "description": "beyondBlue40" + }, + "textLinkInverse": { + "value": "{palette.beyondBlue40}", + "type": "color", + "description": "beyondBlue40" + }, + "textLinkDanger": { + "value": "{palette.o2Red45}", + "type": "color", + "description": "o2Red45" + }, + "textLinkSnackbar": { + "value": "{palette.beyondBlue30}", + "type": "color", + "description": "beyondBlue30" + }, + "textActivated": { + "value": "{palette.beyondBlue30}", + "type": "color", + "description": "beyondBlue30" + }, + "textBrand": { + "value": "{palette.beyondBlue30}", + "type": "color", + "description": "beyondBlue30" + }, + "control": { + "value": "{palette.grey45}", + "type": "color", + "description": "grey45" + }, + "controlActivated": { + "value": "{palette.darkModeBeyondBlue}", + "type": "color", + "description": "darkModeBeyondBlue" + }, + "controlInverse": { + "value": "{palette.grey45}", + "type": "color", + "description": "grey45" + }, + "controlActivatedInverse": { + "value": "{palette.darkModeBeyondBlue}", + "type": "color", + "description": "darkModeBeyondBlue" + }, + "controlError": { + "value": "{palette.o2Red45}", + "type": "color", + "description": "o2Red45" + }, + "barTrack": { + "value": "{palette.darkModeGrey6}", + "type": "color", + "description": "darkModeGrey6" + }, + "loadingBar": { + "value": "{palette.darkModeBeyondBlue}", + "type": "color", + "description": "darkModeBeyondBlue" + }, + "loadingBarBackground": { + "value": "{palette.darkModeGrey6}", + "type": "color", + "description": "darkModeGrey6" + }, + "toggleAndroidInactive": { + "value": "{palette.grey20}", + "type": "color", + "description": "grey20" + }, + "toggleAndroidBackgroundActive": { + "value": "{palette.beyondBlue15}", + "type": "color", + "description": "beyondBlue15" + }, + "iosControlKnob": { + "value": "{palette.grey30}", + "type": "color", + "description": "grey30" + }, + "badge": { + "value": "{palette.o2Red65}", + "type": "color", + "description": "o2Red65" + }, + "feedbackErrorBackground": { + "value": "{palette.o2Red60}", + "type": "color", + "description": "o2Red60" + }, + "feedbackInfoBackground": { + "value": "{palette.darkModeGrey6}", + "type": "color", + "description": "darkModeGrey6" + }, + "divider": { + "value": "rgba({palette.white}, 0.1)", + "type": "color", + "description": "white" + }, + "dividerInverse": { + "value": "rgba({palette.white}, 0.1)", + "type": "color", + "description": "white" + }, + "navigationBarDivider": { + "value": "{palette.darkModeBlack}", + "type": "color", + "description": "darkModeBlack" + }, + "brand": { + "value": "{palette.beyondBlue30}", + "type": "color", + "description": "beyondBlue30" + }, + "brandHigh": { + "value": "rgba({palette.white}, 0.05)", + "type": "color", + "description": "white" + }, + "inverse": { + "value": "{palette.grey30}", + "type": "color", + "description": "grey30" + }, + "neutralHigh": { + "value": "{palette.grey30}", + "type": "color", + "description": "grey30" + }, + "neutralMedium": { + "value": "{palette.grey60}", + "type": "color", + "description": "grey60" + }, + "neutralMediumInverse": { + "value": "{palette.grey60}", + "type": "color", + "description": "grey60" + }, + "neutralLow": { + "value": "{palette.grey80}", + "type": "color", + "description": "grey80" + }, + "neutralLowAlternative": { + "value": "{palette.grey80}", + "type": "color", + "description": "grey80" + }, + "textPrimary": { + "value": "{palette.grey30}", + "type": "color", + "description": "grey30" + }, + "textPrimaryInverse": { + "value": "{palette.grey30}", + "type": "color", + "description": "grey30" + }, + "textSecondary": { + "value": "{palette.grey45}", + "type": "color", + "description": "grey45" + }, + "textSecondaryInverse": { + "value": "{palette.grey45}", + "type": "color", + "description": "grey45" + }, + "success": { + "value": "{palette.o2Green}", + "type": "color", + "description": "o2Green" + }, + "warning": { + "value": "{palette.o2Orange}", + "type": "color", + "description": "o2Orange" + }, + "error": { + "value": "{palette.o2Red45}", + "type": "color", + "description": "o2Red45" + }, + "textError": { + "value": "{palette.o2Red45}", + "type": "color", + "description": "o2Red45" + }, + "textErrorInverse": { + "value": "{palette.o2Red45}", + "type": "color", + "description": "o2Red45" + }, + "promo": { + "value": "{palette.o2Pink}", + "type": "color", + "description": "o2Pink" + }, + "highlight": { + "value": "{palette.o2Pink}", + "type": "color", + "description": "o2Pink" + }, + "successLow": { + "value": "{palette.darkModeGrey6}", + "type": "color", + "description": "darkModeGrey6" + }, + "warningLow": { + "value": "{palette.darkModeGrey6}", + "type": "color", + "description": "darkModeGrey6" + }, + "errorLow": { + "value": "{palette.darkModeGrey6}", + "type": "color", + "description": "darkModeGrey6" + }, + "promoLow": { + "value": "{palette.darkModeGrey6}", + "type": "color", + "description": "darkModeGrey6" + }, + "brandLow": { + "value": "{palette.darkModeGrey6}", + "type": "color", + "description": "darkModeGrey6" + }, + "successHigh": { + "value": "{palette.o2Green40}", + "type": "color", + "description": "o2Green40" + }, + "warningHigh": { + "value": "{palette.o2Orange40}", + "type": "color", + "description": "o2Orange40" + }, + "errorHigh": { + "value": "{palette.o2Red40}", + "type": "color", + "description": "o2Red40" + }, + "promoHigh": { + "value": "{palette.o2Pink30}", + "type": "color", + "description": "o2Pink30" + }, + "successHighInverse": { + "value": "{palette.o2Green80}", + "type": "color", + "description": "o2Green80" + }, + "warningHighInverse": { + "value": "{palette.o2Orange75}", + "type": "color", + "description": "o2Orange75" + }, + "errorHighInverse": { + "value": "{palette.o2Red65}", + "type": "color", + "description": "o2Red65" + }, + "promoHighInverse": { + "value": "{palette.o2Pink}", + "type": "color", + "description": "o2Pink" + }, + "textNavigationBarPrimary": { + "value": "{palette.grey30}", + "type": "color", + "description": "grey30" + }, + "textNavigationBarSecondary": { + "value": "{palette.grey45}", + "type": "color", + "description": "grey45" + }, + "textNavigationSearchBarHint": { + "value": "{palette.grey45}", + "type": "color", + "description": "grey45" + }, + "textNavigationSearchBarText": { + "value": "{palette.grey30}", + "type": "color", + "description": "grey30" + }, + "textAppBar": { + "value": "{palette.grey45}", + "type": "color", + "description": "grey45" + }, + "textAppBarSelected": { + "value": "{palette.beyondBlue40}", + "type": "color", + "description": "beyondBlue40" + }, + "customTabsBackground": { + "value": "{palette.darkModeBlack}", + "type": "color", + "description": "darkModeBlack" + }, + "tagTextPromo": { + "value": "{palette.o2Pink}", + "type": "color", + "description": "o2Pink" + }, + "tagTextActive": { + "value": "{palette.beyondBlue30}", + "type": "color", + "description": "beyondBlue30" + }, + "tagTextInactive": { + "value": "{palette.grey40}", + "type": "color", + "description": "grey40" + }, + "tagTextSuccess": { + "value": "{palette.o2Green}", + "type": "color", + "description": "o2Green" + }, + "tagTextWarning": { + "value": "{palette.o2Orange}", + "type": "color", + "description": "o2Orange" + }, + "tagTextError": { + "value": "{palette.o2Red45}", + "type": "color", + "description": "o2Red45" + }, + "tagBackgroundPromo": { + "value": "{palette.darkModeGrey6}", + "type": "color", + "description": "darkModeGrey6" + }, + "tagBackgroundActive": { + "value": "{palette.darkModeGrey6}", + "type": "color", + "description": "darkModeGrey6" + }, + "tagBackgroundInactive": { + "value": "{palette.darkModeGrey6}", + "type": "color", + "description": "darkModeGrey6" + }, + "tagBackgroundSuccess": { + "value": "{palette.darkModeGrey6}", + "type": "color", + "description": "darkModeGrey6" + }, + "tagBackgroundWarning": { + "value": "{palette.darkModeGrey6}", + "type": "color", + "description": "darkModeGrey6" + }, + "tagBackgroundError": { + "value": "{palette.darkModeGrey6}", + "type": "color", + "description": "darkModeGrey6" + }, + "cardContentOverlay": { + "type": "linear-gradient", + "value": { + "angle": 180, + "colors": [ + { "value": "rgba({palette.black}, 0)", "stop": 0 }, + { "value": "rgba({palette.black}, 0.4)", "stop": 0.3 }, + { "value": "rgba({palette.black}, 0.7)", "stop": 1 } + ] + }, + "description": "grey6" + } + }, + "radius": { + "avatar": { "value": "circle", "type": "borderRadius" }, + "bar": { "value": "999", "type": "borderRadius" }, + "button": { "value": "999", "type": "borderRadius" }, + "checkbox": { "value": "2", "type": "borderRadius" }, + "container": { "value": "16", "type": "borderRadius" }, + "indicator": { "value": "999", "type": "borderRadius" }, + "input": { "value": "12", "type": "borderRadius" }, + "legacyDisplay": { "value": "16", "type": "borderRadius" }, + "popup": { "value": "8", "type": "borderRadius" }, + "sheet": { "value": "16", "type": "borderRadius" }, + "mediaSmall": { "value": "8", "type": "borderRadius" } + }, + "text": { + "weight": { + "cardTitle": { "value": "medium", "type": "typography" }, + "button": { "value": "medium", "type": "typography" }, + "tabsLabel": { "value": "medium", "type": "typography" }, + "link": { "value": "medium", "type": "typography" }, + "title1": { "value": "medium", "type": "typography" }, + "title2": { "value": "bold", "type": "typography" }, + "indicator": { "value": "medium", "type": "typography" }, + "navigationBar": { "value": "medium", "type": "typography" }, + "text5": { "value": "bold", "type": "typography" }, + "text6": { "value": "bold", "type": "typography" }, + "text7": { "value": "bold", "type": "typography" }, + "text8": { "value": "bold", "type": "typography" }, + "text9": { "value": "bold", "type": "typography" }, + "text10": { "value": "bold", "type": "typography" } + }, + "size": { + "tabsLabel": { + "value": { "mobile": 16, "desktop": 18 }, + "type": "typography" + }, + "title2": { + "value": { "mobile": 20, "desktop": 28 }, + "type": "typography" + } + }, + "lineHeight": { + "tabsLabel": { + "value": { "mobile": 24, "desktop": 24 }, + "type": "typography" + }, + "title2": { + "value": { "mobile": 24, "desktop": 32 }, + "type": "typography" + } + } + }, + "themeVariant": { + "successFeedback": { "value": "inverse", "type": "themeVariant" }, + "brandLoadingScreen": { "value": "inverse", "type": "themeVariant" } + }, + "global": { + "palette": { + "beyondBlue": { "value": "#0050FF", "type": "color" }, + "beyondBlue10": { "value": "#E5EDFF", "type": "color" }, + "beyondBlue15": { "value": "#CCDCFF", "type": "color" }, + "beyondBlue30": { "value": "#80A7FF", "type": "color" }, + "beyondBlue40": { "value": "#4D84FF", "type": "color" }, + "beyondBlue45": { "value": "#0A73EB", "type": "color" }, + "beyondBlue55": { "value": "#0044D9", "type": "color" }, + "beyondBlue70": { "value": "#0038B2", "type": "color" }, + "beyondBlue90": { "value": "#001033", "type": "color" }, + "darkBlue": { "value": "#00008C", "type": "color" }, + "o2BlueLight": { "value": "#82DCFA", "type": "color" }, + "o2BlueLight30": { "value": "#C0EEFD", "type": "color" }, + "o2BlueLight35": { "value": "#B4EAFC", "type": "color" }, + "o2Green": { "value": "#00DC7D", "type": "color" }, + "o2Green10": { "value": "#E5FBF2", "type": "color" }, + "o2Green40": { "value": "#4CE7A4", "type": "color" }, + "o2Green80": { "value": "#006338", "type": "color" }, + "o2Yellow": { "value": "#FADC00", "type": "color" }, + "o2Orange": { "value": "#FFA55A", "type": "color" }, + "o2Orange10": { "value": "#FFF6EE", "type": "color" }, + "o2Orange40": { "value": "#FFC08B", "type": "color" }, + "o2Orange75": { "value": "#996336", "type": "color" }, + "o2Pink": { "value": "#FA96FF", "type": "color" }, + "o2Pink15": { "value": "#FEEAFF", "type": "color" }, + "o2Pink30": { "value": "#FDCAFF", "type": "color" }, + "o2Pink80": { "value": "#704373", "type": "color" }, + "o2Red": { "value": "#FF5A5A", "type": "color" }, + "o2Red10": { "value": "#FFEEEE", "type": "color" }, + "o2Red20": { "value": "#FFCDCD", "type": "color" }, + "o2Red40": { "value": "#FF8B8B", "type": "color" }, + "o2Red45": { "value": "#FF7B7B", "type": "color" }, + "o2Red60": { "value": "#CC4848", "type": "color" }, + "o2Red65": { "value": "#BF4444", "type": "color" }, + "grey20": { "value": "#F3F3F5", "type": "color" }, + "grey30": { "value": "#D9D9DD", "type": "color" }, + "grey40": { "value": "#B4B4BE", "type": "color" }, + "grey45": { "value": "#8C8C9A", "type": "color" }, + "grey60": { "value": "#6E6E77", "type": "color" }, + "grey80": { "value": "#3C3C46", "type": "color" }, + "black": { "value": "#00001E", "type": "color" }, + "white": { "value": "#FFFFFF", "type": "color" }, + "darkModeBlack": { "value": "#00001C", "type": "color" }, + "darkModeGrey": { "value": "#08132B", "type": "color" }, + "darkModeGrey6": { "value": "#14213D", "type": "color" }, + "darkModeBeyondBlue": { "value": "#1A62FF", "type": "color" } + } + } +} diff --git a/scripts/mistica-importer/mocks/vivo.json b/scripts/mistica-importer/mocks/vivo.json new file mode 100644 index 00000000..cd162b92 --- /dev/null +++ b/scripts/mistica-importer/mocks/vivo.json @@ -0,0 +1,1630 @@ +{ + "light": { + "background": { + "value": "{palette.white}", + "type": "color", + "description": "white" + }, + "backgroundAlternative": { + "value": "{palette.grey1}", + "type": "color", + "description": "grey1" + }, + "backgroundBrand": { + "value": "{palette.vivoPurple}", + "type": "color", + "description": "vivoPurple" + }, + "backgroundBrandSecondary": { + "value": "{palette.vivoPurple}", + "type": "color", + "description": "vivoPurple" + }, + "backgroundContainer": { + "value": "{palette.white}", + "type": "color", + "description": "white" + }, + "backgroundContainerError": { + "value": "{palette.pepperLight10}", + "type": "color", + "description": "pepperLight10" + }, + "backgroundContainerHover": { + "value": "rgba({palette.darkModeBlack}, 0.03)", + "type": "color", + "description": "darkModeBlack" + }, + "backgroundContainerPressed": { + "value": "rgba({palette.darkModeBlack}, 0.05)", + "type": "color", + "description": "darkModeBlack" + }, + "backgroundContainerBrand": { + "value": "{palette.vivoPurple}", + "type": "color", + "description": "vivoPurple" + }, + "backgroundContainerBrandHover": { + "value": "rgba({palette.darkModeBlack}, 0.2)", + "type": "color", + "description": "darkModeBlack" + }, + "backgroundContainerBrandPressed": { + "value": "rgba({palette.darkModeBlack}, 0.4)", + "type": "color", + "description": "darkModeBlack" + }, + "backgroundContainerBrandOverInverse": { + "value": "{palette.vivoPurpleDark}", + "type": "color", + "description": "vivoPurpleDark" + }, + "backgroundContainerAlternative": { + "value": "{palette.grey1}", + "type": "color", + "description": "grey1" + }, + "backgroundOverlay": { + "value": "rgba({palette.grey6}, 0.6)", + "type": "color", + "description": "grey6" + }, + "backgroundSkeleton": { + "value": "{palette.grey2}", + "type": "color", + "description": "grey2" + }, + "backgroundSkeletonInverse": { + "value": "{palette.vivoPurpleDark}", + "type": "color", + "description": "vivoPurpleDark" + }, + "backgroundBrandTop": { + "value": "{palette.vivoPurple}", + "type": "color", + "description": "vivoPurple" + }, + "backgroundBrandBottom": { + "value": "{palette.vivoPurple}", + "type": "color", + "description": "vivoPurple" + }, + "appBarBackground": { + "value": "{palette.white}", + "type": "color", + "description": "white" + }, + "navigationBarBackground": { + "value": "{palette.vivoPurple}", + "type": "color", + "description": "vivoPurple" + }, + "skeletonWave": { + "value": "{palette.grey2}", + "type": "color", + "description": "grey2" + }, + "borderLow": { + "value": "{palette.grey1}", + "type": "color", + "description": "grey1" + }, + "border": { + "value": "{palette.grey3}", + "type": "color", + "description": "grey3" + }, + "borderHigh": { + "value": "{palette.grey5}", + "type": "color", + "description": "grey5" + }, + "borderSelected": { + "value": "{palette.vivoPurple}", + "type": "color", + "description": "vivoPurple" + }, + "coverBackgroundHover": { + "value": "rgba({palette.darkModeBlack}, 0.25)", + "type": "color", + "description": "darkModeBlack" + }, + "coverBackgroundPressed": { + "value": "rgba({palette.darkModeBlack}, 0.35)", + "type": "color", + "description": "darkModeBlack" + }, + "buttonDangerBackground": { + "value": "{palette.pepper}", + "type": "color", + "description": "pepper" + }, + "buttonDangerBackgroundSelected": { + "value": "{palette.pepperDark}", + "type": "color", + "description": "pepperDark" + }, + "buttonDangerBackgroundHover": { + "value": "{palette.pepperDark}", + "type": "color", + "description": "pepperDark" + }, + "buttonLinkDangerBackgroundSelected": { + "value": "{palette.pepperLight10}", + "type": "color", + "description": "pepperLight10" + }, + "buttonLinkDangerBackgroundInverse": { + "value": "{palette.white}", + "type": "color", + "description": "white" + }, + "buttonLinkDangerBackgroundInverseSelected": { + "value": "{palette.pepperLight10}", + "type": "color", + "description": "pepperLight10" + }, + "buttonLinkBackgroundSelected": { + "value": "{palette.vivoPurpleLight10}", + "type": "color", + "description": "vivoPurpleLight10" + }, + "buttonLinkBackgroundInverseSelected": { + "value": "rgba({palette.white}, 0.1)", + "type": "color", + "description": "white" + }, + "buttonPrimaryBackground": { + "value": "{palette.vivoPurple}", + "type": "color", + "description": "vivoPurple" + }, + "buttonPrimaryBackgroundInverse": { + "value": "{palette.white}", + "type": "color", + "description": "white" + }, + "buttonPrimaryBackgroundSelected": { + "value": "{palette.vivoPurpleDark}", + "type": "color", + "description": "vivoPurpleDark" + }, + "buttonPrimaryBackgroundHover": { + "value": "{palette.vivoPurpleDark}", + "type": "color", + "description": "vivoPurpleDark" + }, + "buttonPrimaryBackgroundInverseSelected": { + "value": "{palette.vivoPurpleLight50}", + "type": "color", + "description": "vivoPurpleLight50" + }, + "buttonSecondaryBorder": { + "value": "{palette.vivoPurple}", + "type": "color", + "description": "vivoPurple" + }, + "buttonSecondaryBorderSelected": { + "value": "{palette.vivoPurpleDark}", + "type": "color", + "description": "vivoPurpleDark" + }, + "buttonSecondaryBackgroundHover": { + "value": "{palette.vivoPurpleLight10}", + "type": "color", + "description": "vivoPurpleLight10" + }, + "buttonSecondaryBackgroundSelected": { + "value": "{palette.vivoPurpleLight10}", + "type": "color", + "description": "vivoPurpleLight10" + }, + "buttonSecondaryBorderInverse": { + "value": "{palette.white}", + "type": "color", + "description": "white" + }, + "buttonSecondaryBorderInverseSelected": { + "value": "{palette.white}", + "type": "color", + "description": "white" + }, + "buttonSecondaryBackgroundInverseHover": { + "value": "rgba({palette.white}, 0.15)", + "type": "color", + "description": "white" + }, + "buttonSecondaryBackgroundInverseSelected": { + "value": "rgba({palette.white}, 0.15)", + "type": "color", + "description": "white" + }, + "textButtonPrimary": { + "value": "{palette.white}", + "type": "color", + "description": "white" + }, + "textButtonPrimaryInverse": { + "value": "{palette.vivoPurple}", + "type": "color", + "description": "vivoPurple" + }, + "textButtonPrimaryInverseSelected": { + "value": "{palette.vivoPurple}", + "type": "color", + "description": "vivoPurple" + }, + "textButtonSecondary": { + "value": "{palette.vivoPurple}", + "type": "color", + "description": "vivoPurple" + }, + "textButtonSecondarySelected": { + "value": "{palette.vivoPurpleDark}", + "type": "color", + "description": "vivoPurpleDark" + }, + "textButtonSecondaryInverse": { + "value": "{palette.white}", + "type": "color", + "description": "white" + }, + "textButtonSecondaryInverseSelected": { + "value": "{palette.white}", + "type": "color", + "description": "white" + }, + "textLink": { + "value": "{palette.vivoPurple}", + "type": "color", + "description": "vivoPurple" + }, + "textLinkInverse": { + "value": "{palette.white}", + "type": "color", + "description": "white" + }, + "textLinkDanger": { + "value": "{palette.pepper}", + "type": "color", + "description": "pepper" + }, + "textLinkSnackbar": { + "value": "{palette.vivoPurpleLight50}", + "type": "color", + "description": "vivoPurpleLight50" + }, + "textActivated": { + "value": "{palette.vivoPurple}", + "type": "color", + "description": "vivoPurple" + }, + "textBrand": { + "value": "{palette.vivoPurple}", + "type": "color", + "description": "vivoPurple" + }, + "control": { + "value": "{palette.grey3}", + "type": "color", + "description": "grey3" + }, + "controlActivated": { + "value": "{palette.vivoPurple}", + "type": "color", + "description": "vivoPurple" + }, + "controlInverse": { + "value": "{palette.vivoPurpleLight50}", + "type": "color", + "description": "vivoPurpleLight50" + }, + "controlActivatedInverse": { + "value": "{palette.white}", + "type": "color", + "description": "white" + }, + "controlError": { + "value": "{palette.pepper}", + "type": "color", + "description": "pepper" + }, + "barTrack": { + "value": "{palette.grey3}", + "type": "color", + "description": "grey3" + }, + "loadingBar": { + "value": "{palette.pink}", + "type": "color", + "description": "pink" + }, + "loadingBarBackground": { + "value": "{palette.pepperLight30}", + "type": "color", + "description": "pepperLight30" + }, + "toggleAndroidInactive": { + "value": "{palette.grey2}", + "type": "color", + "description": "grey2" + }, + "toggleAndroidBackgroundActive": { + "value": "{palette.vivoPurpleLight20}", + "type": "color", + "description": "vivoPurpleLight20" + }, + "iosControlKnob": { + "value": "{palette.white}", + "type": "color", + "description": "white" + }, + "divider": { + "value": "{palette.grey2}", + "type": "color", + "description": "grey2" + }, + "dividerInverse": { + "value": "rgba({palette.white}, 0.2)", + "type": "color", + "description": "white" + }, + "navigationBarDivider": { + "value": "{palette.vivoPurple}", + "type": "color", + "description": "vivoPurple" + }, + "badge": { + "value": "{palette.pepperDark}", + "type": "color", + "description": "pepperDark" + }, + "feedbackErrorBackground": { + "value": "{palette.pepper}", + "type": "color", + "description": "pepper" + }, + "feedbackInfoBackground": { + "value": "{palette.grey6}", + "type": "color", + "description": "grey6" + }, + "brand": { + "value": "{palette.vivoPurple}", + "type": "color", + "description": "vivoPurple" + }, + "brandHigh": { + "value": "{palette.vivoPurpleDark}", + "type": "color", + "description": "vivoPurpleDark" + }, + "inverse": { + "value": "{palette.white}", + "type": "color", + "description": "white" + }, + "neutralHigh": { + "value": "{palette.grey6}", + "type": "color", + "description": "grey6" + }, + "neutralMedium": { + "value": "{palette.grey5}", + "type": "color", + "description": "grey5" + }, + "neutralMediumInverse": { + "value": "{palette.grey5}", + "type": "color", + "description": "grey5" + }, + "neutralLow": { + "value": "{palette.grey1}", + "type": "color", + "description": "grey1" + }, + "neutralLowAlternative": { + "value": "{palette.grey2}", + "type": "color", + "description": "grey2" + }, + "textPrimary": { + "value": "{palette.grey6}", + "type": "color", + "description": "grey6" + }, + "textPrimaryInverse": { + "value": "{palette.white}", + "type": "color", + "description": "white" + }, + "textSecondary": { + "value": "{palette.grey5}", + "type": "color", + "description": "grey5" + }, + "textSecondaryInverse": { + "value": "{palette.vivoPurpleLight20}", + "type": "color", + "description": "vivoPurpleLight20" + }, + "success": { + "value": "{palette.vivoGreen}", + "type": "color", + "description": "vivoGreen" + }, + "warning": { + "value": "{palette.orange}", + "type": "color", + "description": "orange" + }, + "error": { + "value": "{palette.pepper}", + "type": "color", + "description": "pepper" + }, + "textError": { + "value": "{palette.pepper}", + "type": "color", + "description": "pepper" + }, + "textErrorInverse": { + "value": "{palette.white}", + "type": "color", + "description": "white" + }, + "promo": { + "value": "{palette.vivoPurple}", + "type": "color", + "description": "vivoPurple" + }, + "highlight": { + "value": "{palette.pink}", + "type": "color", + "description": "pink" + }, + "successLow": { + "value": "{palette.vivoGreenLight10}", + "type": "color", + "description": "vivoGreenLight10" + }, + "warningLow": { + "value": "{palette.orangeLight10}", + "type": "color", + "description": "orangeLight10" + }, + "errorLow": { + "value": "{palette.pepperLight10}", + "type": "color", + "description": "pepperLight10" + }, + "promoLow": { + "value": "{palette.vivoPurpleLight10}", + "type": "color", + "description": "vivoPurpleLight10" + }, + "brandLow": { + "value": "{palette.vivoPurpleLight10}", + "type": "color", + "description": "vivoPurpleLight10" + }, + "successHigh": { + "value": "{palette.vivoGreenDark}", + "type": "color", + "description": "vivoGreenDark" + }, + "warningHigh": { + "value": "{palette.orangeDark}", + "type": "color", + "description": "orangeDark" + }, + "errorHigh": { + "value": "{palette.pepperDark80}", + "type": "color", + "description": "pepperDark80" + }, + "promoHigh": { + "value": "{palette.vivoPurple}", + "type": "color", + "description": "vivoPurple" + }, + "successHighInverse": { + "value": "{palette.vivoGreenDark}", + "type": "color", + "description": "vivoGreenDark" + }, + "warningHighInverse": { + "value": "{palette.orangeDark}", + "type": "color", + "description": "orangeDark" + }, + "errorHighInverse": { + "value": "{palette.pepperDark80}", + "type": "color", + "description": "pepperDark80" + }, + "promoHighInverse": { + "value": "{palette.vivoPurple}", + "type": "color", + "description": "vivoPurple" + }, + "textNavigationBarPrimary": { + "value": "{palette.white}", + "type": "color", + "description": "white" + }, + "textNavigationBarSecondary": { + "value": "{palette.vivoPurpleLight50}", + "type": "color", + "description": "vivoPurpleLight50" + }, + "textNavigationSearchBarHint": { + "value": "{palette.vivoPurpleLight50}", + "type": "color", + "description": "vivoPurpleLight50" + }, + "textNavigationSearchBarText": { + "value": "{palette.white}", + "type": "color", + "description": "white" + }, + "textAppBar": { + "value": "{palette.grey4}", + "type": "color", + "description": "grey4" + }, + "textAppBarSelected": { + "value": "{palette.vivoPurple}", + "type": "color", + "description": "vivoPurple" + }, + "customTabsBackground": { + "value": "{palette.vivoPurple}", + "type": "color", + "description": "vivoPurple" + }, + "tagTextPromo": { + "value": "{palette.vivoPurple}", + "type": "color", + "description": "vivoPurple" + }, + "tagTextActive": { + "value": "{palette.vivoPurple}", + "type": "color", + "description": "vivoPurple" + }, + "tagTextInactive": { + "value": "{palette.grey5}", + "type": "color", + "description": "grey5" + }, + "tagTextSuccess": { + "value": "{palette.vivoGreenDark}", + "type": "color", + "description": "vivoGreenDark" + }, + "tagTextWarning": { + "value": "{palette.orangeDark}", + "type": "color", + "description": "orangeDark" + }, + "tagTextError": { + "value": "{palette.pepperDark80}", + "type": "color", + "description": "pepperDark80" + }, + "tagBackgroundPromo": { + "value": "{palette.vivoPurpleLight10}", + "type": "color", + "description": "vivoPurpleLight10" + }, + "tagBackgroundActive": { + "value": "{palette.vivoPurpleLight10}", + "type": "color", + "description": "vivoPurpleLight10" + }, + "tagBackgroundInactive": { + "value": "{palette.grey1}", + "type": "color", + "description": "grey1" + }, + "tagBackgroundSuccess": { + "value": "{palette.vivoGreenLight10}", + "type": "color", + "description": "vivoGreenLight10" + }, + "tagBackgroundWarning": { + "value": "{palette.orangeLight10}", + "type": "color", + "description": "orangeLight10" + }, + "tagBackgroundError": { + "value": "{palette.pepperLight10}", + "type": "color", + "description": "pepperLight10" + }, + "cardContentOverlay": { + "type": "linear-gradient", + "value": { + "angle": 180, + "colors": [ + { + "value": "rgba({palette.grey6}, 0)", + "stop": 0 + }, + { + "value": "rgba({palette.grey6}, 0.4)", + "stop": 0.3 + }, + { + "value": "rgba({palette.grey6}, 0.7)", + "stop": 1 + } + ] + }, + "description": "grey6" + } + }, + "dark": { + "background": { + "value": "{palette.darkModeBlack}", + "type": "color", + "description": "darkModeBlack" + }, + "backgroundAlternative": { + "value": "{palette.darkModeBlack}", + "type": "color", + "description": "darkModeBlack" + }, + "backgroundBrand": { + "value": "{palette.darkModeBlack}", + "type": "color", + "description": "darkModeBlack" + }, + "backgroundBrandSecondary": { + "value": "{palette.darkModeBlack}", + "type": "color", + "description": "darkModeBlack" + }, + "backgroundContainer": { + "value": "{palette.darkModeGrey}", + "type": "color", + "description": "darkModeGrey" + }, + "backgroundContainerError": { + "value": "{palette.darkModeGrey}", + "type": "color", + "description": "darkModeGrey" + }, + "backgroundContainerHover": { + "value": "rgba({palette.white}, 0.03)", + "type": "color", + "description": "white" + }, + "backgroundContainerPressed": { + "value": "rgba({palette.white}, 0.05)", + "type": "color", + "description": "white" + }, + "backgroundContainerBrand": { + "value": "{palette.darkModeGrey}", + "type": "color", + "description": "darkModeGrey" + }, + "backgroundContainerBrandHover": { + "value": "rgba({palette.white}, 0.03)", + "type": "color", + "description": "white" + }, + "backgroundContainerBrandPressed": { + "value": "rgba({palette.white}, 0.05)", + "type": "color", + "description": "white" + }, + "backgroundContainerBrandOverInverse": { + "value": "{palette.darkModeGrey}", + "type": "color", + "description": "darkModeGrey" + }, + "backgroundContainerAlternative": { + "value": "{palette.darkModeGrey}", + "type": "color", + "description": "darkModeGrey" + }, + "backgroundOverlay": { + "value": "rgba({palette.darkModeGrey}, 0.8)", + "type": "color", + "description": "darkModeGrey" + }, + "backgroundSkeleton": { + "value": "{palette.darkModeGrey6}", + "type": "color", + "description": "darkModeGrey6" + }, + "backgroundSkeletonInverse": { + "value": "{palette.darkModeGrey6}", + "type": "color", + "description": "darkModeGrey6" + }, + "backgroundBrandTop": { + "value": "{palette.darkModeBlack}", + "type": "color", + "description": "darkModeBlack" + }, + "backgroundBrandBottom": { + "value": "{palette.darkModeBlack}", + "type": "color", + "description": "darkModeBlack" + }, + "appBarBackground": { + "value": "{palette.darkModeGrey}", + "type": "color", + "description": "darkModeGrey" + }, + "navigationBarBackground": { + "value": "{palette.darkModeBlack}", + "type": "color", + "description": "darkModeBlack" + }, + "skeletonWave": { + "value": "{palette.grey5}", + "type": "color", + "description": "grey5" + }, + "borderLow": { + "value": "{palette.darkModeBlack}", + "type": "color", + "description": "darkModeBlack" + }, + "border": { + "value": "{palette.darkModeGrey}", + "type": "color", + "description": "darkModeGrey" + }, + "borderHigh": { + "value": "{palette.grey5}", + "type": "color", + "description": "grey5" + }, + "borderSelected": { + "value": "{palette.vivoPurple}", + "type": "color", + "description": "vivoPurple" + }, + "coverBackgroundHover": { + "value": "rgba({palette.darkModeBlack}, 0.25)", + "type": "color", + "description": "darkModeBlack" + }, + "coverBackgroundPressed": { + "value": "rgba({palette.darkModeBlack}, 0.35)", + "type": "color", + "description": "darkModeBlack" + }, + "buttonDangerBackground": { + "value": "{palette.pepper}", + "type": "color", + "description": "pepper" + }, + "buttonDangerBackgroundSelected": { + "value": "{palette.pepperDark}", + "type": "color", + "description": "pepperDark" + }, + "buttonDangerBackgroundHover": { + "value": "{palette.pepperDark}", + "type": "color", + "description": "pepperDark" + }, + "buttonLinkDangerBackgroundSelected": { + "value": "rgba({palette.white}, 0.08)", + "type": "color", + "description": "white" + }, + "buttonLinkDangerBackgroundInverse": { + "value": "rgba({palette.white}, 0)", + "type": "color", + "description": "white" + }, + "buttonLinkDangerBackgroundInverseSelected": { + "value": "rgba({palette.white}, 0.08)", + "type": "color", + "description": "white" + }, + "buttonLinkBackgroundSelected": { + "value": "rgba({palette.white}, 0.08)", + "type": "color", + "description": "white" + }, + "buttonLinkBackgroundInverseSelected": { + "value": "rgba({palette.white}, 0.08)", + "type": "color", + "description": "white" + }, + "buttonPrimaryBackground": { + "value": "{palette.vivoPurpleLight80}", + "type": "color", + "description": "vivoPurpleLight80" + }, + "buttonPrimaryBackgroundInverse": { + "value": "{palette.vivoPurpleLight80}", + "type": "color", + "description": "vivoPurpleLight80" + }, + "buttonPrimaryBackgroundSelected": { + "value": "{palette.vivoPurpleDark}", + "type": "color", + "description": "vivoPurpleDark" + }, + "buttonPrimaryBackgroundHover": { + "value": "{palette.vivoPurpleDark}", + "type": "color", + "description": "vivoPurpleDark" + }, + "buttonPrimaryBackgroundInverseSelected": { + "value": "{palette.vivoPurpleDark}", + "type": "color", + "description": "vivoPurpleDark" + }, + "buttonSecondaryBackgroundHover": { + "value": "rgba({palette.white}, 0.15)", + "type": "color", + "description": "white" + }, + "buttonSecondaryBackgroundSelected": { + "value": "rgba({palette.white}, 0.15)", + "type": "color", + "description": "white" + }, + "buttonSecondaryBorder": { + "value": "{palette.white}", + "type": "color", + "description": "white" + }, + "buttonSecondaryBorderSelected": { + "value": "{palette.white}", + "type": "color", + "description": "white" + }, + "buttonSecondaryBorderInverse": { + "value": "{palette.white}", + "type": "color", + "description": "white" + }, + "buttonSecondaryBorderInverseSelected": { + "value": "{palette.white}", + "type": "color", + "description": "white" + }, + "buttonSecondaryBackgroundInverseHover": { + "value": "rgba({palette.white}, 0.15)", + "type": "color", + "description": "white" + }, + "buttonSecondaryBackgroundInverseSelected": { + "value": "rgba({palette.white}, 0.15)", + "type": "color", + "description": "white" + }, + "textButtonPrimary": { + "value": "{palette.grey2}", + "type": "color", + "description": "grey2" + }, + "textButtonPrimaryInverse": { + "value": "{palette.grey2}", + "type": "color", + "description": "grey2" + }, + "textButtonPrimaryInverseSelected": { + "value": "{palette.grey2}", + "type": "color", + "description": "grey2" + }, + "textButtonSecondary": { + "value": "{palette.grey2}", + "type": "color", + "description": "grey2" + }, + "textButtonSecondarySelected": { + "value": "{palette.grey2}", + "type": "color", + "description": "grey2" + }, + "textButtonSecondaryInverse": { + "value": "{palette.grey2}", + "type": "color", + "description": "grey2" + }, + "textButtonSecondaryInverseSelected": { + "value": "{palette.grey2}", + "type": "color", + "description": "grey2" + }, + "textLink": { + "value": "{palette.vivoPurpleLight50}", + "type": "color", + "description": "vivoPurpleLight50" + }, + "textLinkInverse": { + "value": "{palette.vivoPurpleLight50}", + "type": "color", + "description": "vivoPurpleLight50" + }, + "textLinkDanger": { + "value": "{palette.pepper}", + "type": "color", + "description": "pepper" + }, + "textLinkSnackbar": { + "value": "{palette.vivoPurpleLight50}", + "type": "color", + "description": "vivoPurpleLight50" + }, + "textActivated": { + "value": "{palette.vivoPurpleLight80}", + "type": "color", + "description": "vivoPurpleLight80" + }, + "textBrand": { + "value": "{palette.vivoPurpleLight80}", + "type": "color", + "description": "vivoPurpleLight80" + }, + "control": { + "value": "{palette.darkModeGrey6}", + "type": "color", + "description": "darkModeGrey6" + }, + "controlActivated": { + "value": "{palette.vivoPurpleLight80}", + "type": "color", + "description": "vivoPurpleLight80" + }, + "controlInverse": { + "value": "{palette.darkModeGrey6}", + "type": "color", + "description": "darkModeGrey6" + }, + "controlActivatedInverse": { + "value": "{palette.vivoPurpleLight80}", + "type": "color", + "description": "vivoPurpleLight80" + }, + "controlError": { + "value": "{palette.pepper}", + "type": "color", + "description": "pepper" + }, + "barTrack": { + "value": "{palette.darkModeGrey6}", + "type": "color", + "description": "darkModeGrey6" + }, + "loadingBar": { + "value": "{palette.vivoPurpleLight80}", + "type": "color", + "description": "vivoPurpleLight80" + }, + "loadingBarBackground": { + "value": "{palette.darkModeGrey6}", + "type": "color", + "description": "darkModeGrey6" + }, + "toggleAndroidInactive": { + "value": "{palette.grey4}", + "type": "color", + "description": "grey4" + }, + "toggleAndroidBackgroundActive": { + "value": "{palette.vivoPurpleLight50}", + "type": "color", + "description": "vivoPurpleLight50" + }, + "iosControlKnob": { + "value": "{palette.grey2}", + "type": "color", + "description": "grey2" + }, + "divider": { + "value": "rgba({palette.white}, 0.05)", + "type": "color", + "description": "white" + }, + "dividerInverse": { + "value": "rgba({palette.white}, 0.05)", + "type": "color", + "description": "white" + }, + "navigationBarDivider": { + "value": "{palette.darkModeBlack}", + "type": "color", + "description": "darkModeBlack" + }, + "badge": { + "value": "{palette.pepperDark}", + "type": "color", + "description": "pepperDark" + }, + "feedbackErrorBackground": { + "value": "{palette.pepper}", + "type": "color", + "description": "pepper" + }, + "feedbackInfoBackground": { + "value": "{palette.grey6}", + "type": "color", + "description": "grey6" + }, + "brand": { + "value": "{palette.vivoPurpleLight80}", + "type": "color", + "description": "vivoPurpleLight80" + }, + "brandHigh": { + "value": "rgba({palette.white}, 0.05)", + "type": "color", + "description": "white" + }, + "inverse": { + "value": "{palette.grey2}", + "type": "color", + "description": "grey2" + }, + "neutralHigh": { + "value": "{palette.grey2}", + "type": "color", + "description": "grey2" + }, + "neutralMedium": { + "value": "{palette.grey5}", + "type": "color", + "description": "grey5" + }, + "neutralMediumInverse": { + "value": "{palette.grey5}", + "type": "color", + "description": "grey5" + }, + "neutralLow": { + "value": "{palette.darkModeGrey6}", + "type": "color", + "description": "darkModeGrey6" + }, + "neutralLowAlternative": { + "value": "{palette.darkModeGrey6}", + "type": "color", + "description": "darkModeGrey6" + }, + "textPrimary": { + "value": "{palette.grey2}", + "type": "color", + "description": "grey2" + }, + "textPrimaryInverse": { + "value": "{palette.grey2}", + "type": "color", + "description": "grey2" + }, + "textSecondary": { + "value": "{palette.grey4}", + "type": "color", + "description": "grey4" + }, + "textSecondaryInverse": { + "value": "{palette.grey4}", + "type": "color", + "description": "grey4" + }, + "success": { + "value": "{palette.vivoGreen}", + "type": "color", + "description": "vivoGreen" + }, + "warning": { + "value": "{palette.orange}", + "type": "color", + "description": "orange" + }, + "error": { + "value": "{palette.pepper}", + "type": "color", + "description": "pepper" + }, + "textError": { + "value": "{palette.pepper}", + "type": "color", + "description": "pepper" + }, + "textErrorInverse": { + "value": "{palette.pepper}", + "type": "color", + "description": "pepper" + }, + "promo": { + "value": "{palette.vivoPurpleLight80}", + "type": "color", + "description": "vivoPurpleLight80" + }, + "highlight": { + "value": "{palette.pink}", + "type": "color", + "description": "pink" + }, + "successLow": { + "value": "{palette.darkModeGrey6}", + "type": "color", + "description": "darkModeGrey6" + }, + "warningLow": { + "value": "{palette.darkModeGrey6}", + "type": "color", + "description": "darkModeGrey6" + }, + "errorLow": { + "value": "{palette.darkModeGrey6}", + "type": "color", + "description": "darkModeGrey6" + }, + "promoLow": { + "value": "{palette.darkModeGrey6}", + "type": "color", + "description": "darkModeGrey6" + }, + "brandLow": { + "value": "{palette.darkModeGrey6}", + "type": "color", + "description": "darkModeGrey6" + }, + "successHigh": { + "value": "{palette.vivoGreenLight30}", + "type": "color", + "description": "vivoGreenLight30" + }, + "warningHigh": { + "value": "{palette.orangeLight40}", + "type": "color", + "description": "orangeLight40" + }, + "errorHigh": { + "value": "{palette.pepperLight40}", + "type": "color", + "description": "pepperLight40" + }, + "promoHigh": { + "value": "{palette.vivoPurpleLight50}", + "type": "color", + "description": "vivoPurpleLight50" + }, + "successHighInverse": { + "value": "{palette.vivoGreenDark}", + "type": "color", + "description": "vivoGreenDark" + }, + "warningHighInverse": { + "value": "{palette.orangeDark}", + "type": "color", + "description": "orangeDark" + }, + "errorHighInverse": { + "value": "{palette.pepperDark80}", + "type": "color", + "description": "pepperDark80" + }, + "promoHighInverse": { + "value": "{palette.vivoPurple}", + "type": "color", + "description": "vivoPurple" + }, + "textNavigationBarPrimary": { + "value": "{palette.grey2}", + "type": "color", + "description": "grey2" + }, + "textNavigationBarSecondary": { + "value": "{palette.grey4}", + "type": "color", + "description": "grey4" + }, + "textNavigationSearchBarHint": { + "value": "{palette.grey4}", + "type": "color", + "description": "grey4" + }, + "textNavigationSearchBarText": { + "value": "{palette.grey2}", + "type": "color", + "description": "grey2" + }, + "textAppBar": { + "value": "{palette.grey5}", + "type": "color", + "description": "grey5" + }, + "textAppBarSelected": { + "value": "{palette.grey2}", + "type": "color", + "description": "grey2" + }, + "customTabsBackground": { + "value": "{palette.darkModeBlack}", + "type": "color", + "description": "darkModeBlack" + }, + "tagTextPromo": { + "value": "{palette.vivoPurpleLight50}", + "type": "color", + "description": "vivoPurpleLight50" + }, + "tagTextActive": { + "value": "{palette.vivoPurpleLight80}", + "type": "color", + "description": "vivoPurpleLight80" + }, + "tagTextInactive": { + "value": "{palette.grey5}", + "type": "color", + "description": "grey5" + }, + "tagTextSuccess": { + "value": "{palette.vivoGreenLight30}", + "type": "color", + "description": "vivoGreenLight30" + }, + "tagTextWarning": { + "value": "{palette.orangeLight40}", + "type": "color", + "description": "orangeLight40" + }, + "tagTextError": { + "value": "{palette.pepperLight40}", + "type": "color", + "description": "pepperLight40" + }, + "tagBackgroundPromo": { + "value": "{palette.darkModeGrey6}", + "type": "color", + "description": "darkModeGrey6" + }, + "tagBackgroundActive": { + "value": "{palette.darkModeGrey6}", + "type": "color", + "description": "darkModeGrey6" + }, + "tagBackgroundInactive": { + "value": "{palette.darkModeGrey6}", + "type": "color", + "description": "darkModeGrey6" + }, + "tagBackgroundSuccess": { + "value": "{palette.darkModeGrey6}", + "type": "color", + "description": "darkModeGrey6" + }, + "tagBackgroundWarning": { + "value": "{palette.darkModeGrey6}", + "type": "color", + "description": "darkModeGrey6" + }, + "tagBackgroundError": { + "value": "{palette.darkModeGrey6}", + "type": "color", + "description": "darkModeGrey6" + }, + "cardContentOverlay": { + "type": "linear-gradient", + "value": { + "angle": 180, + "colors": [ + { + "value": "rgba({palette.grey6}, 0)", + "stop": 0 + }, + { + "value": "rgba({palette.grey6}, 0.4)", + "stop": 0.3 + }, + { + "value": "rgba({palette.grey6}, 0.7)", + "stop": 1 + } + ] + }, + "description": "grey6" + } + }, + "radius": { + "avatar": { + "value": "circle", + "type": "borderRadius" + }, + "bar": { + "value": "999", + "type": "borderRadius" + }, + "button": { + "value": "4", + "type": "borderRadius" + }, + "checkbox": { + "value": "2", + "type": "borderRadius" + }, + "container": { + "value": "8", + "type": "borderRadius" + }, + "indicator": { + "value": "999", + "type": "borderRadius" + }, + "input": { + "value": "8", + "type": "borderRadius" + }, + "legacyDisplay": { + "value": "16", + "type": "borderRadius" + }, + "popup": { + "value": "8", + "type": "borderRadius" + }, + "sheet": { + "value": "8", + "type": "borderRadius" + }, + "mediaSmall": { + "value": "8", + "type": "borderRadius" + } + }, + "text": { + "weight": { + "cardTitle": { + "value": "regular", + "type": "typography" + }, + "button": { + "value": "medium", + "type": "typography" + }, + "tabsLabel": { + "value": "medium", + "type": "typography" + }, + "link": { + "value": "medium", + "type": "typography" + }, + "title1": { + "value": "medium", + "type": "typography" + }, + "title2": { + "value": "light", + "type": "typography" + }, + "indicator": { + "value": "medium", + "type": "typography" + }, + "navigationBar": { + "value": "medium", + "type": "typography" + }, + "text5": { + "value": "light", + "type": "typography" + }, + "text6": { + "value": "light", + "type": "typography" + }, + "text7": { + "value": "light", + "type": "typography" + }, + "text8": { + "value": "light", + "type": "typography" + }, + "text9": { + "value": "light", + "type": "typography" + }, + "text10": { + "value": "light", + "type": "typography" + } + }, + "size": { + "tabsLabel": { + "value": { + "mobile": 16, + "desktop": 18 + }, + "type": "typography" + }, + "title2": { + "value": { + "mobile": 20, + "desktop": 28 + }, + "type": "typography" + } + }, + "lineHeight": { + "tabsLabel": { + "value": { + "mobile": 24, + "desktop": 24 + }, + "type": "typography" + }, + "title2": { + "value": { + "mobile": 24, + "desktop": 32 + }, + "type": "typography" + } + } + }, + "themeVariant": { + "successFeedback": { + "value": "inverse", + "type": "themeVariant" + }, + "brandLoadingScreen": { + "value": "inverse", + "type": "themeVariant" + } + }, + "global": { + "palette": { + "vivoPurple": { + "value": "#660099", + "type": "color" + }, + "vivoPurpleDark": { + "value": "#461E5F", + "type": "color" + }, + "vivoPurpleLight10": { + "value": "#EFE5F4", + "type": "color" + }, + "vivoPurpleLight20": { + "value": "#E0CCEB", + "type": "color" + }, + "vivoPurpleLight50": { + "value": "#B280CC", + "type": "color" + }, + "vivoPurpleLight80": { + "value": "#8433AD", + "type": "color" + }, + "vivoPurpleLight90": { + "value": "#751AA3", + "type": "color" + }, + "vivoGreen": { + "value": "#99CC33", + "type": "color" + }, + "vivoGreenDark": { + "value": "#225C3D", + "type": "color" + }, + "vivoGreenLight10": { + "value": "#EDF8E8", + "type": "color" + }, + "vivoGreen25": { + "value": "#D6EBAD", + "type": "color" + }, + "vivoGreenLight30": { + "value": "#91AE9E", + "type": "color" + }, + "vivoBlue": { + "value": "#00ABDB", + "type": "color" + }, + "orange": { + "value": "#FF9900", + "type": "color" + }, + "orange25": { + "value": "#FFD699", + "type": "color" + }, + "orangeDark": { + "value": "#972A1D", + "type": "color" + }, + "orangeLight10": { + "value": "#FFEFE1", + "type": "color" + }, + "orangeLight40": { + "value": "#FFB84C", + "type": "color" + }, + "pink": { + "value": "#EB3D7D", + "type": "color" + }, + "pepper": { + "value": "#CC1F59", + "type": "color" + }, + "pepperDark": { + "value": "#B71D63", + "type": "color" + }, + "pepperDark80": { + "value": "#8F2052", + "type": "color" + }, + "pepperLight10": { + "value": "#FCE4EF", + "type": "color" + }, + "pepperLight30": { + "value": "#F7B1CB", + "type": "color" + }, + "pepperLight40": { + "value": "#DB628B", + "type": "color" + }, + "grey1": { + "value": "#F6F6F6", + "type": "color" + }, + "grey2": { + "value": "#EEEEEE", + "type": "color" + }, + "grey3": { + "value": "#DDDDDD", + "type": "color" + }, + "grey4": { + "value": "#999999", + "type": "color" + }, + "grey5": { + "value": "#666666", + "type": "color" + }, + "grey6": { + "value": "#000000", + "type": "color" + }, + "white": { + "value": "#FFFFFF", + "type": "color" + }, + "darkModeBlack": { + "value": "#191919", + "type": "color" + }, + "darkModeGrey": { + "value": "#242424", + "type": "color" + }, + "darkModeGrey6": { + "value": "#313235", + "type": "color" + } + } + } +} diff --git a/scripts/mistica-importer/package-lock.json b/scripts/mistica-importer/package-lock.json new file mode 100644 index 00000000..84e9a434 --- /dev/null +++ b/scripts/mistica-importer/package-lock.json @@ -0,0 +1,1446 @@ +{ + "name": "mistica-importer", + "version": "1.0.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "mistica-importer", + "version": "1.0.0", + "license": "ISC", + "devDependencies": { + "vitest": "^2.0.3" + } + }, + "node_modules/@ampproject/remapping": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.3.0.tgz", + "integrity": "sha512-30iZtAPgz+LTIYoeivqYo853f02jBYSd5uGnGpkFV0M3xOt9aN73erkgYAmZU43x4VfqcnLxW9Kpg3R5LC4YYw==", + "dev": true, + "dependencies": { + "@jridgewell/gen-mapping": "^0.3.5", + "@jridgewell/trace-mapping": "^0.3.24" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@esbuild/aix-ppc64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.21.5.tgz", + "integrity": "sha512-1SDgH6ZSPTlggy1yI6+Dbkiz8xzpHJEVAlF/AM1tHPLsf5STom9rwtjE4hKAF20FfXXNTFqEYXyJNWh1GiZedQ==", + "cpu": [ + "ppc64" + ], + "dev": true, + "optional": true, + "os": [ + "aix" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/android-arm": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.21.5.tgz", + "integrity": "sha512-vCPvzSjpPHEi1siZdlvAlsPxXl7WbOVUBBAowWug4rJHb68Ox8KualB+1ocNvT5fjv6wpkX6o/iEpbDrf68zcg==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/android-arm64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.21.5.tgz", + "integrity": "sha512-c0uX9VAUBQ7dTDCjq+wdyGLowMdtR/GoC2U5IYk/7D1H1JYC0qseD7+11iMP2mRLN9RcCMRcjC4YMclCzGwS/A==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/android-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.21.5.tgz", + "integrity": "sha512-D7aPRUUNHRBwHxzxRvp856rjUHRFW1SdQATKXH2hqA0kAZb1hKmi02OpYRacl0TxIGz/ZmXWlbZgjwWYaCakTA==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/darwin-arm64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.21.5.tgz", + "integrity": "sha512-DwqXqZyuk5AiWWf3UfLiRDJ5EDd49zg6O9wclZ7kUMv2WRFr4HKjXp/5t8JZ11QbQfUS6/cRCKGwYhtNAY88kQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/darwin-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.21.5.tgz", + "integrity": "sha512-se/JjF8NlmKVG4kNIuyWMV/22ZaerB+qaSi5MdrXtd6R08kvs2qCN4C09miupktDitvh8jRFflwGFBQcxZRjbw==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/freebsd-arm64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.21.5.tgz", + "integrity": "sha512-5JcRxxRDUJLX8JXp/wcBCy3pENnCgBR9bN6JsY4OmhfUtIHe3ZW0mawA7+RDAcMLrMIZaf03NlQiX9DGyB8h4g==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/freebsd-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.21.5.tgz", + "integrity": "sha512-J95kNBj1zkbMXtHVH29bBriQygMXqoVQOQYA+ISs0/2l3T9/kj42ow2mpqerRBxDJnmkUDCaQT/dfNXWX/ZZCQ==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-arm": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.21.5.tgz", + "integrity": "sha512-bPb5AHZtbeNGjCKVZ9UGqGwo8EUu4cLq68E95A53KlxAPRmUyYv2D6F0uUI65XisGOL1hBP5mTronbgo+0bFcA==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-arm64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.21.5.tgz", + "integrity": "sha512-ibKvmyYzKsBeX8d8I7MH/TMfWDXBF3db4qM6sy+7re0YXya+K1cem3on9XgdT2EQGMu4hQyZhan7TeQ8XkGp4Q==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-ia32": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.21.5.tgz", + "integrity": "sha512-YvjXDqLRqPDl2dvRODYmmhz4rPeVKYvppfGYKSNGdyZkA01046pLWyRKKI3ax8fbJoK5QbxblURkwK/MWY18Tg==", + "cpu": [ + "ia32" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-loong64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.21.5.tgz", + "integrity": "sha512-uHf1BmMG8qEvzdrzAqg2SIG/02+4/DHB6a9Kbya0XDvwDEKCoC8ZRWI5JJvNdUjtciBGFQ5PuBlpEOXQj+JQSg==", + "cpu": [ + "loong64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-mips64el": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.21.5.tgz", + "integrity": "sha512-IajOmO+KJK23bj52dFSNCMsz1QP1DqM6cwLUv3W1QwyxkyIWecfafnI555fvSGqEKwjMXVLokcV5ygHW5b3Jbg==", + "cpu": [ + "mips64el" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-ppc64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.21.5.tgz", + "integrity": "sha512-1hHV/Z4OEfMwpLO8rp7CvlhBDnjsC3CttJXIhBi+5Aj5r+MBvy4egg7wCbe//hSsT+RvDAG7s81tAvpL2XAE4w==", + "cpu": [ + "ppc64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-riscv64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.21.5.tgz", + "integrity": "sha512-2HdXDMd9GMgTGrPWnJzP2ALSokE/0O5HhTUvWIbD3YdjME8JwvSCnNGBnTThKGEB91OZhzrJ4qIIxk/SBmyDDA==", + "cpu": [ + "riscv64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-s390x": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.21.5.tgz", + "integrity": "sha512-zus5sxzqBJD3eXxwvjN1yQkRepANgxE9lgOW2qLnmr8ikMTphkjgXu1HR01K4FJg8h1kEEDAqDcZQtbrRnB41A==", + "cpu": [ + "s390x" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.21.5.tgz", + "integrity": "sha512-1rYdTpyv03iycF1+BhzrzQJCdOuAOtaqHTWJZCWvijKD2N5Xu0TtVC8/+1faWqcP9iBCWOmjmhoH94dH82BxPQ==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/netbsd-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.21.5.tgz", + "integrity": "sha512-Woi2MXzXjMULccIwMnLciyZH4nCIMpWQAs049KEeMvOcNADVxo0UBIQPfSmxB3CWKedngg7sWZdLvLczpe0tLg==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/openbsd-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.21.5.tgz", + "integrity": "sha512-HLNNw99xsvx12lFBUwoT8EVCsSvRNDVxNpjZ7bPn947b8gJPzeHWyNVhFsaerc0n3TsbOINvRP2byTZ5LKezow==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/sunos-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.21.5.tgz", + "integrity": "sha512-6+gjmFpfy0BHU5Tpptkuh8+uw3mnrvgs+dSPQXQOv3ekbordwnzTVEb4qnIvQcYXq6gzkyTnoZ9dZG+D4garKg==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "sunos" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/win32-arm64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.21.5.tgz", + "integrity": "sha512-Z0gOTd75VvXqyq7nsl93zwahcTROgqvuAcYDUr+vOv8uHhNSKROyU961kgtCD1e95IqPKSQKH7tBTslnS3tA8A==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/win32-ia32": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.21.5.tgz", + "integrity": "sha512-SWXFF1CL2RVNMaVs+BBClwtfZSvDgtL//G/smwAc5oVK/UPu2Gu9tIaRgFmYFFKrmg3SyAjSrElf0TiJ1v8fYA==", + "cpu": [ + "ia32" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/win32-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.21.5.tgz", + "integrity": "sha512-tQd/1efJuzPC6rCFwEvLtci/xNFcTZknmXs98FYDfGE4wP9ClFV98nyKrzJKVPMhdDnjzLhdUyMX4PsQAPjwIw==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@jridgewell/gen-mapping": { + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.5.tgz", + "integrity": "sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg==", + "dev": true, + "dependencies": { + "@jridgewell/set-array": "^1.2.1", + "@jridgewell/sourcemap-codec": "^1.4.10", + "@jridgewell/trace-mapping": "^0.3.24" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/resolve-uri": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", + "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", + "dev": true, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/set-array": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.2.1.tgz", + "integrity": "sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==", + "dev": true, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/sourcemap-codec": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.0.tgz", + "integrity": "sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==", + "dev": true + }, + "node_modules/@jridgewell/trace-mapping": { + "version": "0.3.25", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz", + "integrity": "sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==", + "dev": true, + "dependencies": { + "@jridgewell/resolve-uri": "^3.1.0", + "@jridgewell/sourcemap-codec": "^1.4.14" + } + }, + "node_modules/@rollup/rollup-android-arm-eabi": { + "version": "4.19.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.19.0.tgz", + "integrity": "sha512-JlPfZ/C7yn5S5p0yKk7uhHTTnFlvTgLetl2VxqE518QgyM7C9bSfFTYvB/Q/ftkq0RIPY4ySxTz+/wKJ/dXC0w==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ] + }, + "node_modules/@rollup/rollup-android-arm64": { + "version": "4.19.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.19.0.tgz", + "integrity": "sha512-RDxUSY8D1tWYfn00DDi5myxKgOk6RvWPxhmWexcICt/MEC6yEMr4HNCu1sXXYLw8iAsg0D44NuU+qNq7zVWCrw==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ] + }, + "node_modules/@rollup/rollup-darwin-arm64": { + "version": "4.19.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.19.0.tgz", + "integrity": "sha512-emvKHL4B15x6nlNTBMtIaC9tLPRpeA5jMvRLXVbl/W9Ie7HhkrE7KQjvgS9uxgatL1HmHWDXk5TTS4IaNJxbAA==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@rollup/rollup-darwin-x64": { + "version": "4.19.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.19.0.tgz", + "integrity": "sha512-fO28cWA1dC57qCd+D0rfLC4VPbh6EOJXrreBmFLWPGI9dpMlER2YwSPZzSGfq11XgcEpPukPTfEVFtw2q2nYJg==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@rollup/rollup-linux-arm-gnueabihf": { + "version": "4.19.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.19.0.tgz", + "integrity": "sha512-2Rn36Ubxdv32NUcfm0wB1tgKqkQuft00PtM23VqLuCUR4N5jcNWDoV5iBC9jeGdgS38WK66ElncprqgMUOyomw==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm-musleabihf": { + "version": "4.19.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.19.0.tgz", + "integrity": "sha512-gJuzIVdq/X1ZA2bHeCGCISe0VWqCoNT8BvkQ+BfsixXwTOndhtLUpOg0A1Fcx/+eA6ei6rMBzlOz4JzmiDw7JQ==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm64-gnu": { + "version": "4.19.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.19.0.tgz", + "integrity": "sha512-0EkX2HYPkSADo9cfeGFoQ7R0/wTKb7q6DdwI4Yn/ULFE1wuRRCHybxpl2goQrx4c/yzK3I8OlgtBu4xvted0ug==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm64-musl": { + "version": "4.19.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.19.0.tgz", + "integrity": "sha512-GlIQRj9px52ISomIOEUq/IojLZqzkvRpdP3cLgIE1wUWaiU5Takwlzpz002q0Nxxr1y2ZgxC2obWxjr13lvxNQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-powerpc64le-gnu": { + "version": "4.19.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.19.0.tgz", + "integrity": "sha512-N6cFJzssruDLUOKfEKeovCKiHcdwVYOT1Hs6dovDQ61+Y9n3Ek4zXvtghPPelt6U0AH4aDGnDLb83uiJMkWYzQ==", + "cpu": [ + "ppc64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-riscv64-gnu": { + "version": "4.19.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.19.0.tgz", + "integrity": "sha512-2DnD3mkS2uuam/alF+I7M84koGwvn3ZVD7uG+LEWpyzo/bq8+kKnus2EVCkcvh6PlNB8QPNFOz6fWd5N8o1CYg==", + "cpu": [ + "riscv64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-s390x-gnu": { + "version": "4.19.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.19.0.tgz", + "integrity": "sha512-D6pkaF7OpE7lzlTOFCB2m3Ngzu2ykw40Nka9WmKGUOTS3xcIieHe82slQlNq69sVB04ch73thKYIWz/Ian8DUA==", + "cpu": [ + "s390x" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-x64-gnu": { + "version": "4.19.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.19.0.tgz", + "integrity": "sha512-HBndjQLP8OsdJNSxpNIN0einbDmRFg9+UQeZV1eiYupIRuZsDEoeGU43NQsS34Pp166DtwQOnpcbV/zQxM+rWA==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-x64-musl": { + "version": "4.19.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.19.0.tgz", + "integrity": "sha512-HxfbvfCKJe/RMYJJn0a12eiOI9OOtAUF4G6ozrFUK95BNyoJaSiBjIOHjZskTUffUrB84IPKkFG9H9nEvJGW6A==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-win32-arm64-msvc": { + "version": "4.19.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.19.0.tgz", + "integrity": "sha512-HxDMKIhmcguGTiP5TsLNolwBUK3nGGUEoV/BO9ldUBoMLBssvh4J0X8pf11i1fTV7WShWItB1bKAKjX4RQeYmg==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rollup/rollup-win32-ia32-msvc": { + "version": "4.19.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.19.0.tgz", + "integrity": "sha512-xItlIAZZaiG/u0wooGzRsx11rokP4qyc/79LkAOdznGRAbOFc+SfEdfUOszG1odsHNgwippUJavag/+W/Etc6Q==", + "cpu": [ + "ia32" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rollup/rollup-win32-x64-msvc": { + "version": "4.19.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.19.0.tgz", + "integrity": "sha512-xNo5fV5ycvCCKqiZcpB65VMR11NJB+StnxHz20jdqRAktfdfzhgjTiJ2doTDQE/7dqGaV5I7ZGqKpgph6lCIag==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@types/estree": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.5.tgz", + "integrity": "sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==", + "dev": true + }, + "node_modules/@types/node": { + "version": "20.14.11", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.14.11.tgz", + "integrity": "sha512-kprQpL8MMeszbz6ojB5/tU8PLN4kesnN8Gjzw349rDlNgsSzg90lAVj3llK99Dh7JON+t9AuscPPFW6mPbTnSA==", + "dev": true, + "optional": true, + "peer": true, + "dependencies": { + "undici-types": "~5.26.4" + } + }, + "node_modules/@vitest/expect": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-2.0.3.tgz", + "integrity": "sha512-X6AepoOYePM0lDNUPsGXTxgXZAl3EXd0GYe/MZyVE4HzkUqyUVC6S3PrY5mClDJ6/7/7vALLMV3+xD/Ko60Hqg==", + "dev": true, + "dependencies": { + "@vitest/spy": "2.0.3", + "@vitest/utils": "2.0.3", + "chai": "^5.1.1", + "tinyrainbow": "^1.2.0" + }, + "funding": { + "url": "https://opencollective.com/vitest" + } + }, + "node_modules/@vitest/pretty-format": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/@vitest/pretty-format/-/pretty-format-2.0.3.tgz", + "integrity": "sha512-URM4GLsB2xD37nnTyvf6kfObFafxmycCL8un3OC9gaCs5cti2u+5rJdIflZ2fUJUen4NbvF6jCufwViAFLvz1g==", + "dev": true, + "dependencies": { + "tinyrainbow": "^1.2.0" + }, + "funding": { + "url": "https://opencollective.com/vitest" + } + }, + "node_modules/@vitest/runner": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/@vitest/runner/-/runner-2.0.3.tgz", + "integrity": "sha512-EmSP4mcjYhAcuBWwqgpjR3FYVeiA4ROzRunqKltWjBfLNs1tnMLtF+qtgd5ClTwkDP6/DGlKJTNa6WxNK0bNYQ==", + "dev": true, + "dependencies": { + "@vitest/utils": "2.0.3", + "pathe": "^1.1.2" + }, + "funding": { + "url": "https://opencollective.com/vitest" + } + }, + "node_modules/@vitest/snapshot": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/@vitest/snapshot/-/snapshot-2.0.3.tgz", + "integrity": "sha512-6OyA6v65Oe3tTzoSuRPcU6kh9m+mPL1vQ2jDlPdn9IQoUxl8rXhBnfICNOC+vwxWY684Vt5UPgtcA2aPFBb6wg==", + "dev": true, + "dependencies": { + "@vitest/pretty-format": "2.0.3", + "magic-string": "^0.30.10", + "pathe": "^1.1.2" + }, + "funding": { + "url": "https://opencollective.com/vitest" + } + }, + "node_modules/@vitest/spy": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/@vitest/spy/-/spy-2.0.3.tgz", + "integrity": "sha512-sfqyAw/ypOXlaj4S+w8689qKM1OyPOqnonqOc9T91DsoHbfN5mU7FdifWWv3MtQFf0lEUstEwR9L/q/M390C+A==", + "dev": true, + "dependencies": { + "tinyspy": "^3.0.0" + }, + "funding": { + "url": "https://opencollective.com/vitest" + } + }, + "node_modules/@vitest/utils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/@vitest/utils/-/utils-2.0.3.tgz", + "integrity": "sha512-c/UdELMuHitQbbc/EVctlBaxoYAwQPQdSNwv7z/vHyBKy2edYZaFgptE27BRueZB7eW8po+cllotMNTDpL3HWg==", + "dev": true, + "dependencies": { + "@vitest/pretty-format": "2.0.3", + "estree-walker": "^3.0.3", + "loupe": "^3.1.1", + "tinyrainbow": "^1.2.0" + }, + "funding": { + "url": "https://opencollective.com/vitest" + } + }, + "node_modules/assertion-error": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-2.0.1.tgz", + "integrity": "sha512-Izi8RQcffqCeNVgFigKli1ssklIbpHnCYc6AknXGYoB6grJqyeby7jv12JUQgmTAnIDnbck1uxksT4dzN3PWBA==", + "dev": true, + "engines": { + "node": ">=12" + } + }, + "node_modules/cac": { + "version": "6.7.14", + "resolved": "https://registry.npmjs.org/cac/-/cac-6.7.14.tgz", + "integrity": "sha512-b6Ilus+c3RrdDk+JhLKUAQfzzgLEPy6wcXqS7f/xe1EETvsDP6GORG7SFuOs6cID5YkqchW/LXZbX5bc8j7ZcQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/chai": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/chai/-/chai-5.1.1.tgz", + "integrity": "sha512-pT1ZgP8rPNqUgieVaEY+ryQr6Q4HXNg8Ei9UnLUrjN4IA7dvQC5JB+/kxVcPNDHyBcc/26CXPkbNzq3qwrOEKA==", + "dev": true, + "dependencies": { + "assertion-error": "^2.0.1", + "check-error": "^2.1.1", + "deep-eql": "^5.0.1", + "loupe": "^3.1.0", + "pathval": "^2.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/check-error": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/check-error/-/check-error-2.1.1.tgz", + "integrity": "sha512-OAlb+T7V4Op9OwdkjmguYRqncdlx5JiofwOAUkmTF+jNdHwzTaTs4sRAGpzLF3oOz5xAyDGrPgeIDFQmDOTiJw==", + "dev": true, + "engines": { + "node": ">= 16" + } + }, + "node_modules/cross-spawn": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", + "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "dev": true, + "dependencies": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/debug": { + "version": "4.3.5", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.5.tgz", + "integrity": "sha512-pt0bNEmneDIvdL1Xsd9oDQ/wrQRkXDT4AUWlNZNPKvW5x/jyO9VFXkJUP07vQ2upmw5PlaITaPKc31jK13V+jg==", + "dev": true, + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/deep-eql": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-5.0.2.tgz", + "integrity": "sha512-h5k/5U50IJJFpzfL6nO9jaaumfjO/f2NjK/oYB2Djzm4p9L+3T9qWpZqZ2hAbLPuuYq9wrU08WQyBTL5GbPk5Q==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/esbuild": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.21.5.tgz", + "integrity": "sha512-mg3OPMV4hXywwpoDxu3Qda5xCKQi+vCTZq8S9J/EpkhB2HzKXq4SNFZE3+NK93JYxc8VMSep+lOUSC/RVKaBqw==", + "dev": true, + "hasInstallScript": true, + "bin": { + "esbuild": "bin/esbuild" + }, + "engines": { + "node": ">=12" + }, + "optionalDependencies": { + "@esbuild/aix-ppc64": "0.21.5", + "@esbuild/android-arm": "0.21.5", + "@esbuild/android-arm64": "0.21.5", + "@esbuild/android-x64": "0.21.5", + "@esbuild/darwin-arm64": "0.21.5", + "@esbuild/darwin-x64": "0.21.5", + "@esbuild/freebsd-arm64": "0.21.5", + "@esbuild/freebsd-x64": "0.21.5", + "@esbuild/linux-arm": "0.21.5", + "@esbuild/linux-arm64": "0.21.5", + "@esbuild/linux-ia32": "0.21.5", + "@esbuild/linux-loong64": "0.21.5", + "@esbuild/linux-mips64el": "0.21.5", + "@esbuild/linux-ppc64": "0.21.5", + "@esbuild/linux-riscv64": "0.21.5", + "@esbuild/linux-s390x": "0.21.5", + "@esbuild/linux-x64": "0.21.5", + "@esbuild/netbsd-x64": "0.21.5", + "@esbuild/openbsd-x64": "0.21.5", + "@esbuild/sunos-x64": "0.21.5", + "@esbuild/win32-arm64": "0.21.5", + "@esbuild/win32-ia32": "0.21.5", + "@esbuild/win32-x64": "0.21.5" + } + }, + "node_modules/estree-walker": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-3.0.3.tgz", + "integrity": "sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g==", + "dev": true, + "dependencies": { + "@types/estree": "^1.0.0" + } + }, + "node_modules/fsevents": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", + "dev": true, + "hasInstallScript": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "node_modules/get-func-name": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.2.tgz", + "integrity": "sha512-8vXOvuE167CtIc3OyItco7N/dpRtBbYOsPsXCz7X/PMnlGjYjSGuZJgM1Y7mmew7BKf9BqvLX2tnOVy1BBUsxQ==", + "dev": true, + "engines": { + "node": "*" + } + }, + "node_modules/isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", + "dev": true + }, + "node_modules/loupe": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/loupe/-/loupe-3.1.1.tgz", + "integrity": "sha512-edNu/8D5MKVfGVFRhFf8aAxiTM6Wumfz5XsaatSxlD3w4R1d/WEKUTydCdPGbl9K7QG/Ca3GnDV2sIKIpXRQcw==", + "dev": true, + "dependencies": { + "get-func-name": "^2.0.1" + } + }, + "node_modules/magic-string": { + "version": "0.30.10", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.10.tgz", + "integrity": "sha512-iIRwTIf0QKV3UAnYK4PU8uiEc4SRh5jX0mwpIwETPpHdhVM4f53RSwS/vXvN1JhGX+Cs7B8qIq3d6AH49O5fAQ==", + "dev": true, + "dependencies": { + "@jridgewell/sourcemap-codec": "^1.4.15" + } + }, + "node_modules/merge-stream": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", + "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", + "dev": true + }, + "node_modules/ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, + "node_modules/nanoid": { + "version": "3.3.7", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.7.tgz", + "integrity": "sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "bin": { + "nanoid": "bin/nanoid.cjs" + }, + "engines": { + "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" + } + }, + "node_modules/path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/pathe": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/pathe/-/pathe-1.1.2.tgz", + "integrity": "sha512-whLdWMYL2TwI08hn8/ZqAbrVemu0LNaNNJZX73O6qaIdCTfXutsLhMkjdENX0qhsQ9uIimo4/aQOmXkoon2nDQ==", + "dev": true + }, + "node_modules/pathval": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/pathval/-/pathval-2.0.0.tgz", + "integrity": "sha512-vE7JKRyES09KiunauX7nd2Q9/L7lhok4smP9RZTDeD4MVs72Dp2qNFVz39Nz5a0FVEW0BJR6C0DYrq6unoziZA==", + "dev": true, + "engines": { + "node": ">= 14.16" + } + }, + "node_modules/picocolors": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.1.tgz", + "integrity": "sha512-anP1Z8qwhkbmu7MFP5iTt+wQKXgwzf7zTyGlcdzabySa9vd0Xt392U0rVmz9poOaBj0uHJKyyo9/upk0HrEQew==", + "dev": true + }, + "node_modules/postcss": { + "version": "8.4.39", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.39.tgz", + "integrity": "sha512-0vzE+lAiG7hZl1/9I8yzKLx3aR9Xbof3fBHKunvMfOCYAtMhrsnccJY2iTURb9EZd5+pLuiNV9/c/GZJOHsgIw==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/postcss" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "dependencies": { + "nanoid": "^3.3.7", + "picocolors": "^1.0.1", + "source-map-js": "^1.2.0" + }, + "engines": { + "node": "^10 || ^12 || >=14" + } + }, + "node_modules/rollup": { + "version": "4.19.0", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.19.0.tgz", + "integrity": "sha512-5r7EYSQIowHsK4eTZ0Y81qpZuJz+MUuYeqmmYmRMl1nwhdmbiYqt5jwzf6u7wyOzJgYqtCRMtVRKOtHANBz7rA==", + "dev": true, + "dependencies": { + "@types/estree": "1.0.5" + }, + "bin": { + "rollup": "dist/bin/rollup" + }, + "engines": { + "node": ">=18.0.0", + "npm": ">=8.0.0" + }, + "optionalDependencies": { + "@rollup/rollup-android-arm-eabi": "4.19.0", + "@rollup/rollup-android-arm64": "4.19.0", + "@rollup/rollup-darwin-arm64": "4.19.0", + "@rollup/rollup-darwin-x64": "4.19.0", + "@rollup/rollup-linux-arm-gnueabihf": "4.19.0", + "@rollup/rollup-linux-arm-musleabihf": "4.19.0", + "@rollup/rollup-linux-arm64-gnu": "4.19.0", + "@rollup/rollup-linux-arm64-musl": "4.19.0", + "@rollup/rollup-linux-powerpc64le-gnu": "4.19.0", + "@rollup/rollup-linux-riscv64-gnu": "4.19.0", + "@rollup/rollup-linux-s390x-gnu": "4.19.0", + "@rollup/rollup-linux-x64-gnu": "4.19.0", + "@rollup/rollup-linux-x64-musl": "4.19.0", + "@rollup/rollup-win32-arm64-msvc": "4.19.0", + "@rollup/rollup-win32-ia32-msvc": "4.19.0", + "@rollup/rollup-win32-x64-msvc": "4.19.0", + "fsevents": "~2.3.2" + } + }, + "node_modules/shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dev": true, + "dependencies": { + "shebang-regex": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/siginfo": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/siginfo/-/siginfo-2.0.0.tgz", + "integrity": "sha512-ybx0WO1/8bSBLEWXZvEd7gMW3Sn3JFlW3TvX1nREbDLRNQNaeNN8WK0meBwPdAaOI7TtRRRJn/Es1zhrrCHu7g==", + "dev": true + }, + "node_modules/source-map-js": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.0.tgz", + "integrity": "sha512-itJW8lvSA0TXEphiRoawsCksnlf8SyvmFzIhltqAHluXd88pkCd+cXJVHTDwdCr0IzwptSm035IHQktUu1QUMg==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/stackback": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/stackback/-/stackback-0.0.2.tgz", + "integrity": "sha512-1XMJE5fQo1jGH6Y/7ebnwPOBEkIEnT4QF32d5R1+VXdXveM0IBMJt8zfaxX1P3QhVwrYe+576+jkANtSS2mBbw==", + "dev": true + }, + "node_modules/std-env": { + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/std-env/-/std-env-3.7.0.tgz", + "integrity": "sha512-JPbdCEQLj1w5GilpiHAx3qJvFndqybBysA3qUOnznweH4QbNYUsW/ea8QzSrnh0vNsezMMw5bcVool8lM0gwzg==", + "dev": true + }, + "node_modules/tinybench": { + "version": "2.8.0", + "resolved": "https://registry.npmjs.org/tinybench/-/tinybench-2.8.0.tgz", + "integrity": "sha512-1/eK7zUnIklz4JUUlL+658n58XO2hHLQfSk1Zf2LKieUjxidN16eKFEoDEfjHc3ohofSSqK3X5yO6VGb6iW8Lw==", + "dev": true + }, + "node_modules/tinypool": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/tinypool/-/tinypool-1.0.0.tgz", + "integrity": "sha512-KIKExllK7jp3uvrNtvRBYBWBOAXSX8ZvoaD8T+7KB/QHIuoJW3Pmr60zucywjAlMb5TeXUkcs/MWeWLu0qvuAQ==", + "dev": true, + "engines": { + "node": "^18.0.0 || >=20.0.0" + } + }, + "node_modules/tinyrainbow": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/tinyrainbow/-/tinyrainbow-1.2.0.tgz", + "integrity": "sha512-weEDEq7Z5eTHPDh4xjX789+fHfF+P8boiFB+0vbWzpbnbsEr/GRaohi/uMKxg8RZMXnl1ItAi/IUHWMsjDV7kQ==", + "dev": true, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/tinyspy": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/tinyspy/-/tinyspy-3.0.0.tgz", + "integrity": "sha512-q5nmENpTHgiPVd1cJDDc9cVoYN5x4vCvwT3FMilvKPKneCBZAxn2YWQjDF0UMcE9k0Cay1gBiDfTMU0g+mPMQA==", + "dev": true, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/undici-types": { + "version": "5.26.5", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", + "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==", + "dev": true, + "optional": true, + "peer": true + }, + "node_modules/vite": { + "version": "5.3.4", + "resolved": "https://registry.npmjs.org/vite/-/vite-5.3.4.tgz", + "integrity": "sha512-Cw+7zL3ZG9/NZBB8C+8QbQZmR54GwqIz+WMI4b3JgdYJvX+ny9AjJXqkGQlDXSXRP9rP0B4tbciRMOVEKulVOA==", + "dev": true, + "dependencies": { + "esbuild": "^0.21.3", + "postcss": "^8.4.39", + "rollup": "^4.13.0" + }, + "bin": { + "vite": "bin/vite.js" + }, + "engines": { + "node": "^18.0.0 || >=20.0.0" + }, + "funding": { + "url": "https://github.com/vitejs/vite?sponsor=1" + }, + "optionalDependencies": { + "fsevents": "~2.3.3" + }, + "peerDependencies": { + "@types/node": "^18.0.0 || >=20.0.0", + "less": "*", + "lightningcss": "^1.21.0", + "sass": "*", + "stylus": "*", + "sugarss": "*", + "terser": "^5.4.0" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + }, + "less": { + "optional": true + }, + "lightningcss": { + "optional": true + }, + "sass": { + "optional": true + }, + "stylus": { + "optional": true + }, + "sugarss": { + "optional": true + }, + "terser": { + "optional": true + } + } + }, + "node_modules/vite-node": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/vite-node/-/vite-node-2.0.3.tgz", + "integrity": "sha512-14jzwMx7XTcMB+9BhGQyoEAmSl0eOr3nrnn+Z12WNERtOvLN+d2scbRUvyni05rT3997Bg+rZb47NyP4IQPKXg==", + "dev": true, + "dependencies": { + "cac": "^6.7.14", + "debug": "^4.3.5", + "pathe": "^1.1.2", + "tinyrainbow": "^1.2.0", + "vite": "^5.0.0" + }, + "bin": { + "vite-node": "vite-node.mjs" + }, + "engines": { + "node": "^18.0.0 || >=20.0.0" + }, + "funding": { + "url": "https://opencollective.com/vitest" + } + }, + "node_modules/vitest": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/vitest/-/vitest-2.0.3.tgz", + "integrity": "sha512-o3HRvU93q6qZK4rI2JrhKyZMMuxg/JRt30E6qeQs6ueaiz5hr1cPj+Sk2kATgQzMMqsa2DiNI0TIK++1ULx8Jw==", + "dev": true, + "dependencies": { + "@ampproject/remapping": "^2.3.0", + "@vitest/expect": "2.0.3", + "@vitest/pretty-format": "^2.0.3", + "@vitest/runner": "2.0.3", + "@vitest/snapshot": "2.0.3", + "@vitest/spy": "2.0.3", + "@vitest/utils": "2.0.3", + "chai": "^5.1.1", + "debug": "^4.3.5", + "execa": "^8.0.1", + "magic-string": "^0.30.10", + "pathe": "^1.1.2", + "std-env": "^3.7.0", + "tinybench": "^2.8.0", + "tinypool": "^1.0.0", + "tinyrainbow": "^1.2.0", + "vite": "^5.0.0", + "vite-node": "2.0.3", + "why-is-node-running": "^2.2.2" + }, + "bin": { + "vitest": "vitest.mjs" + }, + "engines": { + "node": "^18.0.0 || >=20.0.0" + }, + "funding": { + "url": "https://opencollective.com/vitest" + }, + "peerDependencies": { + "@edge-runtime/vm": "*", + "@types/node": "^18.0.0 || >=20.0.0", + "@vitest/browser": "2.0.3", + "@vitest/ui": "2.0.3", + "happy-dom": "*", + "jsdom": "*" + }, + "peerDependenciesMeta": { + "@edge-runtime/vm": { + "optional": true + }, + "@types/node": { + "optional": true + }, + "@vitest/browser": { + "optional": true + }, + "@vitest/ui": { + "optional": true + }, + "happy-dom": { + "optional": true + }, + "jsdom": { + "optional": true + } + } + }, + "node_modules/vitest/node_modules/execa": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/execa/-/execa-8.0.1.tgz", + "integrity": "sha512-VyhnebXciFV2DESc+p6B+y0LjSm0krU4OgJN44qFAhBY0TJ+1V61tYD2+wHusZ6F9n5K+vl8k0sTy7PEfV4qpg==", + "dev": true, + "dependencies": { + "cross-spawn": "^7.0.3", + "get-stream": "^8.0.1", + "human-signals": "^5.0.0", + "is-stream": "^3.0.0", + "merge-stream": "^2.0.0", + "npm-run-path": "^5.1.0", + "onetime": "^6.0.0", + "signal-exit": "^4.1.0", + "strip-final-newline": "^3.0.0" + }, + "engines": { + "node": ">=16.17" + }, + "funding": { + "url": "https://github.com/sindresorhus/execa?sponsor=1" + } + }, + "node_modules/vitest/node_modules/get-stream": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-8.0.1.tgz", + "integrity": "sha512-VaUJspBffn/LMCJVoMvSAdmscJyS1auj5Zulnn5UoYcY531UWmdwhRWkcGKnGU93m5HSXP9LP2usOryrBtQowA==", + "dev": true, + "engines": { + "node": ">=16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/vitest/node_modules/human-signals": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-5.0.0.tgz", + "integrity": "sha512-AXcZb6vzzrFAUE61HnN4mpLqd/cSIwNQjtNWR0euPm6y0iqx3G4gOXaIDdtdDwZmhwe82LA6+zinmW4UBWVePQ==", + "dev": true, + "engines": { + "node": ">=16.17.0" + } + }, + "node_modules/vitest/node_modules/is-stream": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-3.0.0.tgz", + "integrity": "sha512-LnQR4bZ9IADDRSkvpqMGvt/tEJWclzklNgSw48V5EAaAeDd6qGvN8ei6k5p0tvxSR171VmGyHuTiAOfxAbr8kA==", + "dev": true, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/vitest/node_modules/mimic-fn": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-4.0.0.tgz", + "integrity": "sha512-vqiC06CuhBTUdZH+RYl8sFrL096vA45Ok5ISO6sE/Mr1jRbGH4Csnhi8f3wKVl7x8mO4Au7Ir9D3Oyv1VYMFJw==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/vitest/node_modules/npm-run-path": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-5.3.0.tgz", + "integrity": "sha512-ppwTtiJZq0O/ai0z7yfudtBpWIoxM8yE6nHi1X47eFR2EWORqfbu6CnPlNsjeN683eT0qG6H/Pyf9fCcvjnnnQ==", + "dev": true, + "dependencies": { + "path-key": "^4.0.0" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/vitest/node_modules/onetime": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-6.0.0.tgz", + "integrity": "sha512-1FlR+gjXK7X+AsAHso35MnyN5KqGwJRi/31ft6x0M194ht7S+rWAvd7PHss9xSKMzE0asv1pyIHaJYq+BbacAQ==", + "dev": true, + "dependencies": { + "mimic-fn": "^4.0.0" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/vitest/node_modules/path-key": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-4.0.0.tgz", + "integrity": "sha512-haREypq7xkM7ErfgIyA0z+Bj4AGKlMSdlQE2jvJo6huWD1EdkKYV+G/T4nq0YEF2vgTT8kqMFKo1uHn950r4SQ==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/vitest/node_modules/signal-exit": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", + "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", + "dev": true, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/vitest/node_modules/strip-final-newline": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-3.0.0.tgz", + "integrity": "sha512-dOESqjYr96iWYylGObzd39EuNTa5VJxyvVAEm5Jnh7KGo75V43Hk1odPQkNDyXNmUR6k+gEiDVXnjB8HJ3crXw==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/why-is-node-running": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/why-is-node-running/-/why-is-node-running-2.3.0.tgz", + "integrity": "sha512-hUrmaWBdVDcxvYqnyh09zunKzROWjbZTiNy8dBEjkS7ehEDQibXJ7XvlmtbwuTclUiIyN+CyXQD4Vmko8fNm8w==", + "dev": true, + "dependencies": { + "siginfo": "^2.0.0", + "stackback": "0.0.2" + }, + "bin": { + "why-is-node-running": "cli.js" + }, + "engines": { + "node": ">=8" + } + } + } +} diff --git a/scripts/mistica-importer/package.json b/scripts/mistica-importer/package.json new file mode 100644 index 00000000..11fb9d6b --- /dev/null +++ b/scripts/mistica-importer/package.json @@ -0,0 +1,14 @@ +{ + "name": "mistica-importer", + "version": "1.0.0", + "main": "index.js", + "type": "module", + "scripts": { + "test": "vitest run", + "test:watch": "vitest", + "generate": "node index.js" + }, + "devDependencies": { + "vitest": "^2.0.3" + } +} diff --git a/scripts/mistica-importer/token-downloader.js b/scripts/mistica-importer/token-downloader.js new file mode 100644 index 00000000..b92ddbd5 --- /dev/null +++ b/scripts/mistica-importer/token-downloader.js @@ -0,0 +1,6 @@ +export const downloadTokens = async (branch, brand) => { + const response = await fetch( + `https://raw.githubusercontent.com/Telefonica/mistica-design/${branch}/tokens/${brand}.json` + ); + return response.json(); +}; diff --git a/scripts/mistica-importer/vite.config.js b/scripts/mistica-importer/vite.config.js new file mode 100644 index 00000000..92e774ae --- /dev/null +++ b/scripts/mistica-importer/vite.config.js @@ -0,0 +1,9 @@ +import { defineConfig } from "vite"; + +// https://vitejs.dev/config/ +export default defineConfig({ + plugins: [], + test: { + globals: true, + }, +});