From e1ff58dd60c3084236614216ae82c9dde1b3b709 Mon Sep 17 00:00:00 2001 From: Flow Date: Mon, 28 Oct 2024 13:50:27 +0100 Subject: [PATCH] feat(skin): update design tokens from mistica-design (#403) * feat(skin): update design tokens * Run swiftformat --------- Co-authored-by: yceballost <6722153+yceballost@users.noreply.github.com> Co-authored-by: tuentisre --- Sources/MisticaCommon/Colors/BlauColorPalette.swift | 4 ++++ Sources/MisticaCommon/Colors/ColorToolkit+Color.swift | 8 ++++++++ Sources/MisticaCommon/Colors/ColorToolkit+UIColor.swift | 8 ++++++++ Sources/MisticaCommon/Colors/MisticaColors.swift | 2 ++ Sources/MisticaCommon/Colors/MovistarColorPalette.swift | 4 ++++ Sources/MisticaCommon/Colors/O2ColorPalette.swift | 4 ++++ Sources/MisticaCommon/Colors/O2NewColorPalette.swift | 4 ++++ Sources/MisticaCommon/Colors/TelefonicaColorPalette.swift | 6 +++++- Sources/MisticaCommon/Colors/TuColorPalette.swift | 4 ++++ Sources/MisticaCommon/Colors/VivoColorPalette.swift | 4 ++++ Sources/MisticaCommon/Colors/VivoNewColorPalette.swift | 4 ++++ 11 files changed, 51 insertions(+), 1 deletion(-) diff --git a/Sources/MisticaCommon/Colors/BlauColorPalette.swift b/Sources/MisticaCommon/Colors/BlauColorPalette.swift index 8805a7dc0..9380c21ae 100644 --- a/Sources/MisticaCommon/Colors/BlauColorPalette.swift +++ b/Sources/MisticaCommon/Colors/BlauColorPalette.swift @@ -145,6 +145,8 @@ struct BlauColors: MisticaColors { let barTrack = BlauColors.palette.grey2 | BlauColors.palette.darkModeGrey6 + let barTrackInverse = BlauColors.palette.grey6.withAlphaComponent(0.2) | BlauColors.palette.darkModeGrey6 + let loadingBar = BlauColors.palette.blauBlueSecondary | BlauColors.palette.blauBluePrimary let loadingBarBackground = BlauColors.palette.blauBlueSecondary10 | BlauColors.palette.darkModeGrey @@ -155,6 +157,8 @@ struct BlauColors: MisticaColors { let iosControlKnob = BlauColors.palette.white | BlauColors.palette.grey2 + let controlKnobInverse = BlauColors.palette.blauBlueSecondary | BlauColors.palette.grey2 + let divider = BlauColors.palette.grey2 | BlauColors.palette.white.withAlphaComponent(0.05) let dividerInverse = BlauColors.palette.white.withAlphaComponent(0.2) | BlauColors.palette.white.withAlphaComponent(0.05) diff --git a/Sources/MisticaCommon/Colors/ColorToolkit+Color.swift b/Sources/MisticaCommon/Colors/ColorToolkit+Color.swift index 3ed6e0694..6a6e3328a 100644 --- a/Sources/MisticaCommon/Colors/ColorToolkit+Color.swift +++ b/Sources/MisticaCommon/Colors/ColorToolkit+Color.swift @@ -269,6 +269,10 @@ public extension Color { MisticaConfig.currentColors.barTrack.color } + static var barTrackInverse: Color { + MisticaConfig.currentColors.barTrackInverse.color + } + static var loadingBar: Color { MisticaConfig.currentColors.loadingBar.color } @@ -289,6 +293,10 @@ public extension Color { MisticaConfig.currentColors.iosControlKnob.color } + static var controlKnobInverse: Color { + MisticaConfig.currentColors.controlKnobInverse.color + } + static var divider: Color { MisticaConfig.currentColors.divider.color } diff --git a/Sources/MisticaCommon/Colors/ColorToolkit+UIColor.swift b/Sources/MisticaCommon/Colors/ColorToolkit+UIColor.swift index e435cdcf6..4ac5a367e 100644 --- a/Sources/MisticaCommon/Colors/ColorToolkit+UIColor.swift +++ b/Sources/MisticaCommon/Colors/ColorToolkit+UIColor.swift @@ -269,6 +269,10 @@ public extension UIColor { MisticaConfig.currentColors.barTrack } + static var barTrackInverse: UIColor { + MisticaConfig.currentColors.barTrackInverse + } + static var loadingBar: UIColor { MisticaConfig.currentColors.loadingBar } @@ -289,6 +293,10 @@ public extension UIColor { MisticaConfig.currentColors.iosControlKnob } + static var controlKnobInverse: UIColor { + MisticaConfig.currentColors.controlKnobInverse + } + static var divider: UIColor { MisticaConfig.currentColors.divider } diff --git a/Sources/MisticaCommon/Colors/MisticaColors.swift b/Sources/MisticaCommon/Colors/MisticaColors.swift index aa81cd6d3..0e155f906 100644 --- a/Sources/MisticaCommon/Colors/MisticaColors.swift +++ b/Sources/MisticaCommon/Colors/MisticaColors.swift @@ -76,11 +76,13 @@ public protocol MisticaColors { var controlActivatedInverse: UIColor { get } var controlError: UIColor { get } var barTrack: UIColor { get } + var barTrackInverse: UIColor { get } var loadingBar: UIColor { get } var loadingBarBackground: UIColor { get } var toggleAndroidInactive: UIColor { get } var toggleAndroidBackgroundActive: UIColor { get } var iosControlKnob: UIColor { get } + var controlKnobInverse: UIColor { get } var divider: UIColor { get } var dividerInverse: UIColor { get } var navigationBarDivider: UIColor { get } diff --git a/Sources/MisticaCommon/Colors/MovistarColorPalette.swift b/Sources/MisticaCommon/Colors/MovistarColorPalette.swift index 9c5a5559a..dae916aef 100644 --- a/Sources/MisticaCommon/Colors/MovistarColorPalette.swift +++ b/Sources/MisticaCommon/Colors/MovistarColorPalette.swift @@ -145,6 +145,8 @@ struct MovistarColors: MisticaColors { let barTrack = MovistarColors.palette.grey3 | MovistarColors.palette.darkModeGrey6 + let barTrackInverse = MovistarColors.palette.black.withAlphaComponent(0.14) | MovistarColors.palette.darkModeGrey6 + let loadingBar = MovistarColors.palette.movistarBlue let loadingBarBackground = MovistarColors.palette.grey2 | MovistarColors.palette.darkModeGrey6 @@ -155,6 +157,8 @@ struct MovistarColors: MisticaColors { let iosControlKnob = MovistarColors.palette.white | MovistarColors.palette.darkModeGrey2 + let controlKnobInverse = MovistarColors.palette.movistarBlue | MovistarColors.palette.darkModeGrey2 + let divider = MovistarColors.palette.grey3 | MovistarColors.palette.white.withAlphaComponent(0.1) let dividerInverse = MovistarColors.palette.white.withAlphaComponent(0.2) | MovistarColors.palette.white.withAlphaComponent(0.1) diff --git a/Sources/MisticaCommon/Colors/O2ColorPalette.swift b/Sources/MisticaCommon/Colors/O2ColorPalette.swift index 8058d0dcf..8090fc78f 100644 --- a/Sources/MisticaCommon/Colors/O2ColorPalette.swift +++ b/Sources/MisticaCommon/Colors/O2ColorPalette.swift @@ -145,6 +145,8 @@ struct O2Colors: MisticaColors { let barTrack = O2Colors.palette.grey3 | O2Colors.palette.darkModeGrey6 + let barTrackInverse = O2Colors.palette.white.withAlphaComponent(0.3) | O2Colors.palette.darkModeGrey6 + let loadingBar = O2Colors.palette.o2BluePrimary | O2Colors.palette.darkModeO2BluePrimary let loadingBarBackground = O2Colors.palette.grey1 | O2Colors.palette.darkModeGrey6 @@ -155,6 +157,8 @@ struct O2Colors: MisticaColors { let iosControlKnob = O2Colors.palette.white | O2Colors.palette.grey2 + let controlKnobInverse = O2Colors.palette.o2BluePrimary | O2Colors.palette.grey2 + let divider = O2Colors.palette.grey2 | O2Colors.palette.white.withAlphaComponent(0.05) let dividerInverse = O2Colors.palette.white.withAlphaComponent(0.2) | O2Colors.palette.white.withAlphaComponent(0.05) diff --git a/Sources/MisticaCommon/Colors/O2NewColorPalette.swift b/Sources/MisticaCommon/Colors/O2NewColorPalette.swift index d78efe4e4..db23fe056 100644 --- a/Sources/MisticaCommon/Colors/O2NewColorPalette.swift +++ b/Sources/MisticaCommon/Colors/O2NewColorPalette.swift @@ -163,6 +163,8 @@ struct O2NewColors: MisticaColors { let barTrack = O2NewColors.palette.grey30 | O2NewColors.palette.darkModeGrey6 + let barTrackInverse = O2NewColors.palette.white.withAlphaComponent(0.3) | O2NewColors.palette.darkModeGrey6 + let loadingBar = O2NewColors.palette.beyondBlue | O2NewColors.palette.darkModeBeyondBlue let loadingBarBackground = O2NewColors.palette.grey20 | O2NewColors.palette.darkModeGrey6 @@ -173,6 +175,8 @@ struct O2NewColors: MisticaColors { let iosControlKnob = O2NewColors.palette.white | O2NewColors.palette.grey30 + let controlKnobInverse = O2NewColors.palette.beyondBlue | O2NewColors.palette.grey30 + let divider = O2NewColors.palette.grey30 | O2NewColors.palette.white.withAlphaComponent(0.1) let dividerInverse = O2NewColors.palette.white.withAlphaComponent(0.2) | O2NewColors.palette.white.withAlphaComponent(0.1) diff --git a/Sources/MisticaCommon/Colors/TelefonicaColorPalette.swift b/Sources/MisticaCommon/Colors/TelefonicaColorPalette.swift index 46a92fe62..ac4a0d68b 100644 --- a/Sources/MisticaCommon/Colors/TelefonicaColorPalette.swift +++ b/Sources/MisticaCommon/Colors/TelefonicaColorPalette.swift @@ -143,7 +143,9 @@ struct TelefonicaColors: MisticaColors { let controlError = TelefonicaColors.palette.coral - let barTrack = TelefonicaColors.palette.grey3 | TelefonicaColors.palette.darkModeGrey6 + let barTrack = TelefonicaColors.palette.grey2 | TelefonicaColors.palette.darkModeGrey6 + + let barTrackInverse = TelefonicaColors.palette.white.withAlphaComponent(0.3) | TelefonicaColors.palette.darkModeGrey6 let loadingBar = TelefonicaColors.palette.telefonicaBlue30 | TelefonicaColors.palette.telefonicaBlue @@ -155,6 +157,8 @@ struct TelefonicaColors: MisticaColors { let iosControlKnob = TelefonicaColors.palette.white | TelefonicaColors.palette.grey2 + let controlKnobInverse = TelefonicaColors.palette.telefonicaBlue | TelefonicaColors.palette.grey2 + let divider = TelefonicaColors.palette.grey2 | TelefonicaColors.palette.white.withAlphaComponent(0.05) let dividerInverse = TelefonicaColors.palette.white.withAlphaComponent(0.2) | TelefonicaColors.palette.white.withAlphaComponent(0.05) diff --git a/Sources/MisticaCommon/Colors/TuColorPalette.swift b/Sources/MisticaCommon/Colors/TuColorPalette.swift index 4692f5e92..b364e47e7 100644 --- a/Sources/MisticaCommon/Colors/TuColorPalette.swift +++ b/Sources/MisticaCommon/Colors/TuColorPalette.swift @@ -145,6 +145,8 @@ struct TuColors: MisticaColors { let barTrack = TuColors.palette.grey2 | TuColors.palette.darkModeGrey6 + let barTrackInverse = TuColors.palette.white.withAlphaComponent(0.36) | TuColors.palette.darkModeGrey6 + let loadingBar = TuColors.palette.green40 let loadingBarBackground = TuColors.palette.green @@ -155,6 +157,8 @@ struct TuColors: MisticaColors { let iosControlKnob = TuColors.palette.white | TuColors.palette.grey2 + let controlKnobInverse = TuColors.palette.primary | TuColors.palette.grey2 + let divider = TuColors.palette.grey2 | TuColors.palette.white.withAlphaComponent(0.05) let dividerInverse = TuColors.palette.white.withAlphaComponent(0.2) | TuColors.palette.white.withAlphaComponent(0.05) diff --git a/Sources/MisticaCommon/Colors/VivoColorPalette.swift b/Sources/MisticaCommon/Colors/VivoColorPalette.swift index f6f5ac9f6..1aa56c5d2 100644 --- a/Sources/MisticaCommon/Colors/VivoColorPalette.swift +++ b/Sources/MisticaCommon/Colors/VivoColorPalette.swift @@ -145,6 +145,8 @@ struct VivoColors: MisticaColors { let barTrack = VivoColors.palette.grey3 | VivoColors.palette.darkModeGrey6 + let barTrackInverse = VivoColors.palette.white.withAlphaComponent(0.5) | VivoColors.palette.darkModeGrey6 + let loadingBar = VivoColors.palette.pink | VivoColors.palette.vivoPurpleLight80 let loadingBarBackground = VivoColors.palette.pepperLight30 | VivoColors.palette.darkModeGrey6 @@ -155,6 +157,8 @@ struct VivoColors: MisticaColors { let iosControlKnob = VivoColors.palette.white | VivoColors.palette.grey2 + let controlKnobInverse = VivoColors.palette.vivoPurple | VivoColors.palette.grey2 + let divider = VivoColors.palette.grey2 | VivoColors.palette.white.withAlphaComponent(0.05) let dividerInverse = VivoColors.palette.white.withAlphaComponent(0.2) | VivoColors.palette.white.withAlphaComponent(0.05) diff --git a/Sources/MisticaCommon/Colors/VivoNewColorPalette.swift b/Sources/MisticaCommon/Colors/VivoNewColorPalette.swift index 107491272..fc448baa2 100644 --- a/Sources/MisticaCommon/Colors/VivoNewColorPalette.swift +++ b/Sources/MisticaCommon/Colors/VivoNewColorPalette.swift @@ -145,6 +145,8 @@ struct VivoNewColors: MisticaColors { let barTrack = VivoNewColors.palette.grey3 | VivoNewColors.palette.darkModeGrey6 + let barTrackInverse = VivoNewColors.palette.white.withAlphaComponent(0.5) | VivoNewColors.palette.darkModeGrey6 + let loadingBar = VivoNewColors.palette.vivoPurple | VivoNewColors.palette.vivoPurpleLight80 let loadingBarBackground = VivoNewColors.palette.vivoPurpleLight10 | VivoNewColors.palette.darkModeGrey6 @@ -155,6 +157,8 @@ struct VivoNewColors: MisticaColors { let iosControlKnob = VivoNewColors.palette.white | VivoNewColors.palette.grey2 + let controlKnobInverse = VivoNewColors.palette.vivoPurple | VivoNewColors.palette.grey2 + let divider = VivoNewColors.palette.grey3 | VivoNewColors.palette.white.withAlphaComponent(0.05) let dividerInverse = VivoNewColors.palette.white.withAlphaComponent(0.2) | VivoNewColors.palette.white.withAlphaComponent(0.05)