From debe2d2d24125853a221077602e8eeb6cc591fbd Mon Sep 17 00:00:00 2001 From: tuentisre Date: Wed, 3 Jul 2024 10:11:54 +0200 Subject: [PATCH 1/3] feat(skin): update design tokens --- Sources/MisticaCommon/Colors/BlauColorPalette.swift | 2 +- .../MisticaCommon/Colors/ColorToolkit+Color.swift | 4 ++++ .../MisticaCommon/Colors/ColorToolkit+UIColor.swift | 7 ++++++- Sources/MisticaCommon/Colors/MisticaColors.swift | 2 +- .../MisticaCommon/Colors/MovistarColorPalette.swift | 2 +- Sources/MisticaCommon/Colors/O2ColorPalette.swift | 2 +- .../MisticaCommon/Colors/O2NewColorPalette.swift | 13 ------------- .../Colors/TelefonicaColorPalette.swift | 2 +- Sources/MisticaCommon/Colors/TuColorPalette.swift | 2 +- Sources/MisticaCommon/Colors/VivoColorPalette.swift | 2 +- .../MisticaCommon/Colors/VivoNewColorPalette.swift | 4 ++-- 11 files changed, 19 insertions(+), 23 deletions(-) diff --git a/Sources/MisticaCommon/Colors/BlauColorPalette.swift b/Sources/MisticaCommon/Colors/BlauColorPalette.swift index af397108..e366bbbb 100644 --- a/Sources/MisticaCommon/Colors/BlauColorPalette.swift +++ b/Sources/MisticaCommon/Colors/BlauColorPalette.swift @@ -11,7 +11,7 @@ import UIKit struct BlauColors: MisticaColors { static let palette = BlauColorPalette() - let backgroundBrand = MisticaColor.solid(BlauColors.palette.blauBluePrimary | BlauColors.palette.darkModeBlack) + let backgroundBrand = BlauColors.palette.blauBluePrimary | BlauColors.palette.darkModeBlack let backgroundBrandSecondary = BlauColors.palette.blauBluePrimary | BlauColors.palette.darkModeBlack diff --git a/Sources/MisticaCommon/Colors/ColorToolkit+Color.swift b/Sources/MisticaCommon/Colors/ColorToolkit+Color.swift index 236f54df..97cf3843 100644 --- a/Sources/MisticaCommon/Colors/ColorToolkit+Color.swift +++ b/Sources/MisticaCommon/Colors/ColorToolkit+Color.swift @@ -17,6 +17,10 @@ public extension Color { MisticaConfig.currentColors.backgroundAlternative.color } + static var backgroundBrand: Color { + MisticaConfig.currentColors.backgroundBrand.color + } + static var backgroundBrandSecondary: Color { MisticaConfig.currentColors.backgroundBrandSecondary.color } diff --git a/Sources/MisticaCommon/Colors/ColorToolkit+UIColor.swift b/Sources/MisticaCommon/Colors/ColorToolkit+UIColor.swift index 11146b61..fd30f5ec 100644 --- a/Sources/MisticaCommon/Colors/ColorToolkit+UIColor.swift +++ b/Sources/MisticaCommon/Colors/ColorToolkit+UIColor.swift @@ -19,6 +19,11 @@ public extension UIColor { MisticaConfig.currentColors.backgroundAlternative } + @objc(backgroundBrandColor) + static var backgroundBrand: UIColor { + MisticaConfig.currentColors.backgroundBrand + } + @objc(backgroundBrandSecondaryColor) static var backgroundBrandSecondary: UIColor { MisticaConfig.currentColors.backgroundBrandSecondary @@ -653,7 +658,7 @@ public extension UIColor { public extension BrandStyle { var preferredStatusBarStyle: UIStatusBarStyle { switch self { - case .movistar, .vivo, .o2, .o2New, .blau, .custom, .vivoNew, .telefonica, .tu: + case .movistar, .vivo, .o2, .o2New, .blau, .custom, .vivoNew, .telefonica: return .lightContent } } diff --git a/Sources/MisticaCommon/Colors/MisticaColors.swift b/Sources/MisticaCommon/Colors/MisticaColors.swift index cfe4a7f6..558c0ae4 100644 --- a/Sources/MisticaCommon/Colors/MisticaColors.swift +++ b/Sources/MisticaCommon/Colors/MisticaColors.swift @@ -11,7 +11,7 @@ import UIKit public protocol MisticaColors { var background: UIColor { get } var backgroundAlternative: UIColor { get } - var backgroundBrand: MisticaColor { get } + var backgroundBrand: UIColor { get } var backgroundBrandSecondary: UIColor { get } var backgroundContainer: UIColor { get } var backgroundContainerError: UIColor { get } diff --git a/Sources/MisticaCommon/Colors/MovistarColorPalette.swift b/Sources/MisticaCommon/Colors/MovistarColorPalette.swift index fc664756..facfa4d0 100644 --- a/Sources/MisticaCommon/Colors/MovistarColorPalette.swift +++ b/Sources/MisticaCommon/Colors/MovistarColorPalette.swift @@ -15,7 +15,7 @@ struct MovistarColors: MisticaColors { let backgroundAlternative = MovistarColors.palette.grey1 | MovistarColors.palette.darkModeBlack - let backgroundBrand = MisticaColor.solid(MovistarColors.palette.movistarBlue | MovistarColors.palette.darkModeBlack) + let backgroundBrand = MovistarColors.palette.movistarBlue | MovistarColors.palette.darkModeBlack let backgroundBrandSecondary = MovistarColors.palette.movistarBlueDark | MovistarColors.palette.darkModeBlack diff --git a/Sources/MisticaCommon/Colors/O2ColorPalette.swift b/Sources/MisticaCommon/Colors/O2ColorPalette.swift index 667977a1..12a695bc 100644 --- a/Sources/MisticaCommon/Colors/O2ColorPalette.swift +++ b/Sources/MisticaCommon/Colors/O2ColorPalette.swift @@ -15,7 +15,7 @@ struct O2Colors: MisticaColors { let backgroundAlternative = O2Colors.palette.grey1 | O2Colors.palette.darkModeBlack - let backgroundBrand = MisticaColor.solid(O2Colors.palette.o2BluePrimary | O2Colors.palette.darkModeBlack) + let backgroundBrand = O2Colors.palette.o2BluePrimary | O2Colors.palette.darkModeBlack let backgroundBrandSecondary = O2Colors.palette.o2BluePrimary | O2Colors.palette.darkModeBlack diff --git a/Sources/MisticaCommon/Colors/O2NewColorPalette.swift b/Sources/MisticaCommon/Colors/O2NewColorPalette.swift index afc152ed..f11f5c56 100644 --- a/Sources/MisticaCommon/Colors/O2NewColorPalette.swift +++ b/Sources/MisticaCommon/Colors/O2NewColorPalette.swift @@ -13,19 +13,6 @@ struct O2NewColors: MisticaColors { let background = O2NewColors.palette.white | O2NewColors.palette.darkModeBlack - let backgroundBrand = MisticaColor.gradient(MisticaGradient( - colors: - [ - O2NewColors.palette.darkBlue | O2NewColors.palette.darkModeBlack, - O2NewColors.palette.beyondBlue | O2NewColors.palette.darkModeBlack, - O2NewColors.palette.beyondBlue45 | O2NewColors.palette.darkModeBlack - ], - stops: [0, 0.64, 1], - angle: 180 - )) - - let backgroundContainerBrand = O2NewColors.palette.beyondBlue | O2NewColors.palette.darkModeGrey - let backgroundAlternative = O2NewColors.palette.grey20 | O2NewColors.palette.darkModeBlack let backgroundBrandSecondary = O2NewColors.palette.beyondBlue | O2NewColors.palette.darkModeBlack diff --git a/Sources/MisticaCommon/Colors/TelefonicaColorPalette.swift b/Sources/MisticaCommon/Colors/TelefonicaColorPalette.swift index 70d794d9..507cb96c 100644 --- a/Sources/MisticaCommon/Colors/TelefonicaColorPalette.swift +++ b/Sources/MisticaCommon/Colors/TelefonicaColorPalette.swift @@ -33,7 +33,7 @@ struct TelefonicaColors: MisticaColors { let backgroundContainerAlternative = TelefonicaColors.palette.grey1 | TelefonicaColors.palette.darkModeGrey - let backgroundBrand = MisticaColor.solid(TelefonicaColors.palette.telefonicaBlue | TelefonicaColors.palette.darkModeBlack) + let backgroundBrand = TelefonicaColors.palette.telefonicaBlue | TelefonicaColors.palette.darkModeBlack let backgroundBrandSecondary = TelefonicaColors.palette.telefonicaBlue | TelefonicaColors.palette.darkModeBlack diff --git a/Sources/MisticaCommon/Colors/TuColorPalette.swift b/Sources/MisticaCommon/Colors/TuColorPalette.swift index 9a293ff0..06ae6afc 100644 --- a/Sources/MisticaCommon/Colors/TuColorPalette.swift +++ b/Sources/MisticaCommon/Colors/TuColorPalette.swift @@ -33,7 +33,7 @@ struct TuColors: MisticaColors { let backgroundContainerAlternative = TuColors.palette.grey1 | TuColors.palette.darkModeGrey - let backgroundBrand = MisticaColor.solid(TuColors.palette.primary | TuColors.palette.darkModeBlack) + let backgroundBrand = TuColors.palette.primary | TuColors.palette.darkModeBlack let backgroundBrandSecondary = TuColors.palette.blue | TuColors.palette.darkModeBlack diff --git a/Sources/MisticaCommon/Colors/VivoColorPalette.swift b/Sources/MisticaCommon/Colors/VivoColorPalette.swift index 71cb1a5d..c720ebd8 100644 --- a/Sources/MisticaCommon/Colors/VivoColorPalette.swift +++ b/Sources/MisticaCommon/Colors/VivoColorPalette.swift @@ -15,7 +15,7 @@ struct VivoColors: MisticaColors { let backgroundAlternative = VivoColors.palette.grey1 | VivoColors.palette.darkModeBlack - let backgroundBrand = MisticaColor.solid(VivoColors.palette.vivoPurple | VivoColors.palette.darkModeBlack) + let backgroundBrand = VivoColors.palette.vivoPurple | VivoColors.palette.darkModeBlack let backgroundBrandSecondary = VivoColors.palette.vivoPurple | VivoColors.palette.darkModeBlack diff --git a/Sources/MisticaCommon/Colors/VivoNewColorPalette.swift b/Sources/MisticaCommon/Colors/VivoNewColorPalette.swift index bbeef4ca..c5393ce4 100644 --- a/Sources/MisticaCommon/Colors/VivoNewColorPalette.swift +++ b/Sources/MisticaCommon/Colors/VivoNewColorPalette.swift @@ -15,7 +15,7 @@ struct VivoNewColors: MisticaColors { let backgroundAlternative = VivoNewColors.palette.grey1 | VivoNewColors.palette.darkModeBlack - let backgroundBrand = MisticaColor.solid(VivoNewColors.palette.vivoPurple | VivoNewColors.palette.darkModeBlack) + let backgroundBrand = VivoNewColors.palette.vivoPurple | VivoNewColors.palette.darkModeBlack let backgroundBrandSecondary = VivoNewColors.palette.vivoPurpleLight80 | VivoNewColors.palette.darkModeBlack @@ -239,7 +239,7 @@ struct VivoNewColors: MisticaColors { let textNavigationSearchBarText = VivoNewColors.palette.white | VivoNewColors.palette.grey2 - let textAppBar = VivoNewColors.palette.grey4 | VivoNewColors.palette.grey5 + let textAppBar = VivoNewColors.palette.grey5 let textAppBarSelected = VivoNewColors.palette.vivoPurple | VivoNewColors.palette.grey2 From f497c69c5a0dab4a0d0f67fedae439200fd6d762 Mon Sep 17 00:00:00 2001 From: Alejandro Ruiz Date: Wed, 10 Jul 2024 12:13:41 +0200 Subject: [PATCH 2/3] Fix PR with ticket information and MisticaColor changes handled. --- .../Components/Lists/CellStyle+Toolkit.swift | 6 ++--- .../Lists/ListCellContentView.swift | 2 +- .../Colors/BlauColorPalette.swift | 4 ++-- .../Colors/ColorToolkit+Color.swift | 8 ------- .../Colors/ColorToolkit+UIColor.swift | 12 +--------- .../MisticaCommon/Colors/MisticaColor.swift | 4 ++++ .../MisticaCommon/Colors/MisticaColors.swift | 4 ++-- .../Colors/MovistarColorPalette.swift | 4 ++-- .../MisticaCommon/Colors/O2ColorPalette.swift | 4 ++-- .../Colors/O2NewColorPalette.swift | 22 +++++++++++++++++++ .../Colors/TelefonicaColorPalette.swift | 4 ++-- .../MisticaCommon/Colors/TuColorPalette.swift | 4 ++-- .../Colors/VivoColorPalette.swift | 4 ++-- .../Colors/VivoNewColorPalette.swift | 6 ++--- 14 files changed, 48 insertions(+), 40 deletions(-) diff --git a/Sources/Mistica/Components/Lists/CellStyle+Toolkit.swift b/Sources/Mistica/Components/Lists/CellStyle+Toolkit.swift index 007cade0..61f49928 100644 --- a/Sources/Mistica/Components/Lists/CellStyle+Toolkit.swift +++ b/Sources/Mistica/Components/Lists/CellStyle+Toolkit.swift @@ -79,12 +79,12 @@ extension ListCellContentView.CellStyle { ) } - var backgroundColor: UIColor { + var backgroundColor: MisticaColor { switch self { case .fullWidth: - return .background + return .solid(.background) case .boxed: - return .backgroundContainer + return .solid(.backgroundContainer) case .boxedInverse: return .backgroundContainerBrand } diff --git a/Sources/Mistica/Components/Lists/ListCellContentView.swift b/Sources/Mistica/Components/Lists/ListCellContentView.swift index afae5a79..83a704b2 100644 --- a/Sources/Mistica/Components/Lists/ListCellContentView.swift +++ b/Sources/Mistica/Components/Lists/ListCellContentView.swift @@ -351,7 +351,7 @@ private extension ListCellContentView { cellContentView.isLayoutMarginsRelativeArrangement = true cellContentView.directionalLayoutMargins = cellStyle.mainStackViewLayoutMargins - cellBorderView.backgroundColor = cellStyle.backgroundColor + cellBorderView.setMisticaColorBackground(cellStyle.backgroundColor) cellBorderView.layer.cornerRadius = cellStyle.cornerRadius cellBorderView.layer.borderColor = cellStyle.borderColor cellBorderView.layer.borderWidth = cellStyle.borderWidth diff --git a/Sources/MisticaCommon/Colors/BlauColorPalette.swift b/Sources/MisticaCommon/Colors/BlauColorPalette.swift index e366bbbb..37056419 100644 --- a/Sources/MisticaCommon/Colors/BlauColorPalette.swift +++ b/Sources/MisticaCommon/Colors/BlauColorPalette.swift @@ -11,7 +11,7 @@ import UIKit struct BlauColors: MisticaColors { static let palette = BlauColorPalette() - let backgroundBrand = BlauColors.palette.blauBluePrimary | BlauColors.palette.darkModeBlack + let backgroundBrand = MisticaColor.solid(BlauColors.palette.blauBluePrimary | BlauColors.palette.darkModeBlack) let backgroundBrandSecondary = BlauColors.palette.blauBluePrimary | BlauColors.palette.darkModeBlack @@ -27,7 +27,7 @@ struct BlauColors: MisticaColors { let backgroundContainerPressed = BlauColors.palette.blauBluePrimary.withAlphaComponent(0.05) | BlauColors.palette.white.withAlphaComponent(0.05) - let backgroundContainerBrand = BlauColors.palette.blauBluePrimary | BlauColors.palette.darkModeGrey + let backgroundContainerBrand = MisticaColor.solid(BlauColors.palette.blauBluePrimary | BlauColors.palette.darkModeGrey) let backgroundContainerBrandHover = BlauColors.palette.darkModeBlack.withAlphaComponent(0.2) | BlauColors.palette.white.withAlphaComponent(0.03) diff --git a/Sources/MisticaCommon/Colors/ColorToolkit+Color.swift b/Sources/MisticaCommon/Colors/ColorToolkit+Color.swift index 97cf3843..661c505c 100644 --- a/Sources/MisticaCommon/Colors/ColorToolkit+Color.swift +++ b/Sources/MisticaCommon/Colors/ColorToolkit+Color.swift @@ -17,10 +17,6 @@ public extension Color { MisticaConfig.currentColors.backgroundAlternative.color } - static var backgroundBrand: Color { - MisticaConfig.currentColors.backgroundBrand.color - } - static var backgroundBrandSecondary: Color { MisticaConfig.currentColors.backgroundBrandSecondary.color } @@ -41,10 +37,6 @@ public extension Color { MisticaConfig.currentColors.backgroundContainerPressed.color } - static var backgroundContainerBrand: Color { - MisticaConfig.currentColors.backgroundContainerBrand.color - } - static var backgroundContainerBrandHover: Color { MisticaConfig.currentColors.backgroundContainerBrandHover.color } diff --git a/Sources/MisticaCommon/Colors/ColorToolkit+UIColor.swift b/Sources/MisticaCommon/Colors/ColorToolkit+UIColor.swift index fd30f5ec..33bcbe75 100644 --- a/Sources/MisticaCommon/Colors/ColorToolkit+UIColor.swift +++ b/Sources/MisticaCommon/Colors/ColorToolkit+UIColor.swift @@ -19,11 +19,6 @@ public extension UIColor { MisticaConfig.currentColors.backgroundAlternative } - @objc(backgroundBrandColor) - static var backgroundBrand: UIColor { - MisticaConfig.currentColors.backgroundBrand - } - @objc(backgroundBrandSecondaryColor) static var backgroundBrandSecondary: UIColor { MisticaConfig.currentColors.backgroundBrandSecondary @@ -49,11 +44,6 @@ public extension UIColor { MisticaConfig.currentColors.backgroundContainerPressed } - @objc(backgroundContainerBrandColor) - static var backgroundContainerBrand: UIColor { - MisticaConfig.currentColors.backgroundContainerBrand - } - @objc(backgroundContainerBrandHoverColor) static var backgroundContainerBrandHover: UIColor { MisticaConfig.currentColors.backgroundContainerBrandHover @@ -658,7 +648,7 @@ public extension UIColor { public extension BrandStyle { var preferredStatusBarStyle: UIStatusBarStyle { switch self { - case .movistar, .vivo, .o2, .o2New, .blau, .custom, .vivoNew, .telefonica: + case .movistar, .vivo, .o2, .o2New, .blau, .custom, .vivoNew, .tu, .telefonica: return .lightContent } } diff --git a/Sources/MisticaCommon/Colors/MisticaColor.swift b/Sources/MisticaCommon/Colors/MisticaColor.swift index 11858eb8..877ad3ef 100644 --- a/Sources/MisticaCommon/Colors/MisticaColor.swift +++ b/Sources/MisticaCommon/Colors/MisticaColor.swift @@ -17,4 +17,8 @@ public extension MisticaColor { static var backgroundBrand: MisticaColor { MisticaConfig.currentColors.backgroundBrand } + + static var backgroundContainerBrand: MisticaColor { + MisticaConfig.currentColors.backgroundContainerBrand + } } diff --git a/Sources/MisticaCommon/Colors/MisticaColors.swift b/Sources/MisticaCommon/Colors/MisticaColors.swift index 558c0ae4..f26c1b4b 100644 --- a/Sources/MisticaCommon/Colors/MisticaColors.swift +++ b/Sources/MisticaCommon/Colors/MisticaColors.swift @@ -11,13 +11,13 @@ import UIKit public protocol MisticaColors { var background: UIColor { get } var backgroundAlternative: UIColor { get } - var backgroundBrand: 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: UIColor { get } + var backgroundContainerBrand: MisticaColor { get } var backgroundContainerBrandHover: UIColor { get } var backgroundContainerBrandPressed: UIColor { get } var backgroundContainerBrandOverInverse: UIColor { get } diff --git a/Sources/MisticaCommon/Colors/MovistarColorPalette.swift b/Sources/MisticaCommon/Colors/MovistarColorPalette.swift index facfa4d0..6d244f27 100644 --- a/Sources/MisticaCommon/Colors/MovistarColorPalette.swift +++ b/Sources/MisticaCommon/Colors/MovistarColorPalette.swift @@ -15,7 +15,7 @@ struct MovistarColors: MisticaColors { let backgroundAlternative = MovistarColors.palette.grey1 | MovistarColors.palette.darkModeBlack - let backgroundBrand = MovistarColors.palette.movistarBlue | MovistarColors.palette.darkModeBlack + let backgroundBrand = MisticaColor.solid(MovistarColors.palette.movistarBlue | MovistarColors.palette.darkModeBlack) let backgroundBrandSecondary = MovistarColors.palette.movistarBlueDark | MovistarColors.palette.darkModeBlack @@ -27,7 +27,7 @@ struct MovistarColors: MisticaColors { let backgroundContainerPressed = MovistarColors.palette.black.withAlphaComponent(0.05) | MovistarColors.palette.white.withAlphaComponent(0.05) - let backgroundContainerBrand = MovistarColors.palette.movistarBlue | MovistarColors.palette.darkModeGrey + let backgroundContainerBrand = MisticaColor.solid(MovistarColors.palette.movistarBlue | MovistarColors.palette.darkModeGrey) let backgroundContainerBrandHover = MovistarColors.palette.black.withAlphaComponent(0.1) | MovistarColors.palette.white.withAlphaComponent(0.03) diff --git a/Sources/MisticaCommon/Colors/O2ColorPalette.swift b/Sources/MisticaCommon/Colors/O2ColorPalette.swift index 12a695bc..fb9f21b9 100644 --- a/Sources/MisticaCommon/Colors/O2ColorPalette.swift +++ b/Sources/MisticaCommon/Colors/O2ColorPalette.swift @@ -15,7 +15,7 @@ struct O2Colors: MisticaColors { let backgroundAlternative = O2Colors.palette.grey1 | O2Colors.palette.darkModeBlack - let backgroundBrand = O2Colors.palette.o2BluePrimary | O2Colors.palette.darkModeBlack + let backgroundBrand = MisticaColor.solid(O2Colors.palette.o2BluePrimary | O2Colors.palette.darkModeBlack) let backgroundBrandSecondary = O2Colors.palette.o2BluePrimary | O2Colors.palette.darkModeBlack @@ -27,7 +27,7 @@ struct O2Colors: MisticaColors { let backgroundContainerPressed = O2Colors.palette.darkModeBlack.withAlphaComponent(0.05) | O2Colors.palette.white.withAlphaComponent(0.05) - let backgroundContainerBrand = O2Colors.palette.o2BluePrimary | O2Colors.palette.darkModeGrey + let backgroundContainerBrand = MisticaColor.solid(O2Colors.palette.o2BluePrimary | O2Colors.palette.darkModeGrey) let backgroundContainerBrandHover = O2Colors.palette.darkModeBlack.withAlphaComponent(0.2) | O2Colors.palette.white.withAlphaComponent(0.03) diff --git a/Sources/MisticaCommon/Colors/O2NewColorPalette.swift b/Sources/MisticaCommon/Colors/O2NewColorPalette.swift index f11f5c56..fa270aa2 100644 --- a/Sources/MisticaCommon/Colors/O2NewColorPalette.swift +++ b/Sources/MisticaCommon/Colors/O2NewColorPalette.swift @@ -12,6 +12,28 @@ struct O2NewColors: MisticaColors { static let palette = O2NewColorPalette() let background = O2NewColors.palette.white | O2NewColors.palette.darkModeBlack + + let backgroundBrand = MisticaColor.gradient(MisticaGradient( + colors: + [ + O2NewColors.palette.darkBlue | O2NewColors.palette.darkModeBlack, + O2NewColors.palette.beyondBlue | O2NewColors.palette.darkModeBlack, + O2NewColors.palette.beyondBlue45 | O2NewColors.palette.darkModeBlack + ], + stops: [0, 0.64, 1], + angle: 180 + )) + + let backgroundContainerBrand = MisticaColor.gradient(MisticaGradient( + colors: + [ + O2NewColors.palette.darkBlue | O2NewColors.palette.darkModeGrey, + O2NewColors.palette.beyondBlue | O2NewColors.palette.darkModeGrey, + O2NewColors.palette.beyondBlue45 | O2NewColors.palette.darkModeGrey + ], + stops: [0, 0.64, 1], + angle: 180 + )) let backgroundAlternative = O2NewColors.palette.grey20 | O2NewColors.palette.darkModeBlack diff --git a/Sources/MisticaCommon/Colors/TelefonicaColorPalette.swift b/Sources/MisticaCommon/Colors/TelefonicaColorPalette.swift index 507cb96c..4d2d81cb 100644 --- a/Sources/MisticaCommon/Colors/TelefonicaColorPalette.swift +++ b/Sources/MisticaCommon/Colors/TelefonicaColorPalette.swift @@ -23,7 +23,7 @@ struct TelefonicaColors: MisticaColors { let backgroundContainerPressed = TelefonicaColors.palette.telefonicaBlue.withAlphaComponent(0.05) | TelefonicaColors.palette.white.withAlphaComponent(0.05) - let backgroundContainerBrand = TelefonicaColors.palette.telefonicaBlue | TelefonicaColors.palette.darkModeGrey + let backgroundContainerBrand = MisticaColor.solid(TelefonicaColors.palette.telefonicaBlue | TelefonicaColors.palette.darkModeGrey) let backgroundContainerBrandHover = TelefonicaColors.palette.darkModeBlack.withAlphaComponent(0.2) | TelefonicaColors.palette.white.withAlphaComponent(0.03) @@ -33,7 +33,7 @@ struct TelefonicaColors: MisticaColors { let backgroundContainerAlternative = TelefonicaColors.palette.grey1 | TelefonicaColors.palette.darkModeGrey - let backgroundBrand = TelefonicaColors.palette.telefonicaBlue | TelefonicaColors.palette.darkModeBlack + let backgroundBrand = MisticaColor.solid(TelefonicaColors.palette.telefonicaBlue | TelefonicaColors.palette.darkModeBlack) let backgroundBrandSecondary = TelefonicaColors.palette.telefonicaBlue | TelefonicaColors.palette.darkModeBlack diff --git a/Sources/MisticaCommon/Colors/TuColorPalette.swift b/Sources/MisticaCommon/Colors/TuColorPalette.swift index 06ae6afc..714fb35b 100644 --- a/Sources/MisticaCommon/Colors/TuColorPalette.swift +++ b/Sources/MisticaCommon/Colors/TuColorPalette.swift @@ -23,7 +23,7 @@ struct TuColors: MisticaColors { let backgroundContainerPressed = TuColors.palette.grey9.withAlphaComponent(0.05) | TuColors.palette.white.withAlphaComponent(0.05) - let backgroundContainerBrand = TuColors.palette.primary | TuColors.palette.darkModeGrey + let backgroundContainerBrand = MisticaColor.solid(TuColors.palette.primary | TuColors.palette.darkModeGrey) let backgroundContainerBrandHover = TuColors.palette.grey9.withAlphaComponent(0.2) | TuColors.palette.white.withAlphaComponent(0.03) @@ -33,7 +33,7 @@ struct TuColors: MisticaColors { let backgroundContainerAlternative = TuColors.palette.grey1 | TuColors.palette.darkModeGrey - let backgroundBrand = TuColors.palette.primary | TuColors.palette.darkModeBlack + let backgroundBrand = MisticaColor.solid(TuColors.palette.primary | TuColors.palette.darkModeBlack) let backgroundBrandSecondary = TuColors.palette.blue | TuColors.palette.darkModeBlack diff --git a/Sources/MisticaCommon/Colors/VivoColorPalette.swift b/Sources/MisticaCommon/Colors/VivoColorPalette.swift index c720ebd8..76ed0ebd 100644 --- a/Sources/MisticaCommon/Colors/VivoColorPalette.swift +++ b/Sources/MisticaCommon/Colors/VivoColorPalette.swift @@ -15,7 +15,7 @@ struct VivoColors: MisticaColors { let backgroundAlternative = VivoColors.palette.grey1 | VivoColors.palette.darkModeBlack - let backgroundBrand = VivoColors.palette.vivoPurple | VivoColors.palette.darkModeBlack + let backgroundBrand = MisticaColor.solid(VivoColors.palette.vivoPurple | VivoColors.palette.darkModeBlack) let backgroundBrandSecondary = VivoColors.palette.vivoPurple | VivoColors.palette.darkModeBlack @@ -27,7 +27,7 @@ struct VivoColors: MisticaColors { let backgroundContainerPressed = VivoColors.palette.darkModeBlack.withAlphaComponent(0.05) | VivoColors.palette.white.withAlphaComponent(0.05) - let backgroundContainerBrand = VivoColors.palette.vivoPurple | VivoColors.palette.darkModeGrey + let backgroundContainerBrand = MisticaColor.solid(VivoColors.palette.vivoPurple | VivoColors.palette.darkModeGrey) let backgroundContainerBrandHover = VivoColors.palette.darkModeBlack.withAlphaComponent(0.2) | VivoColors.palette.white.withAlphaComponent(0.03) diff --git a/Sources/MisticaCommon/Colors/VivoNewColorPalette.swift b/Sources/MisticaCommon/Colors/VivoNewColorPalette.swift index c5393ce4..0e71b5c0 100644 --- a/Sources/MisticaCommon/Colors/VivoNewColorPalette.swift +++ b/Sources/MisticaCommon/Colors/VivoNewColorPalette.swift @@ -15,8 +15,8 @@ struct VivoNewColors: MisticaColors { let backgroundAlternative = VivoNewColors.palette.grey1 | VivoNewColors.palette.darkModeBlack - let backgroundBrand = VivoNewColors.palette.vivoPurple | VivoNewColors.palette.darkModeBlack - + let backgroundBrand = MisticaColor.solid(VivoNewColors.palette.vivoPurple | VivoNewColors.palette.darkModeBlack) + let backgroundBrandSecondary = VivoNewColors.palette.vivoPurpleLight80 | VivoNewColors.palette.darkModeBlack let backgroundContainer = VivoNewColors.palette.white | VivoNewColors.palette.darkModeGrey @@ -27,7 +27,7 @@ struct VivoNewColors: MisticaColors { let backgroundContainerPressed = VivoNewColors.palette.darkModeBlack.withAlphaComponent(0.05) | VivoNewColors.palette.white.withAlphaComponent(0.05) - let backgroundContainerBrand = VivoNewColors.palette.vivoPurple | VivoNewColors.palette.darkModeGrey + let backgroundContainerBrand = MisticaColor.solid(VivoNewColors.palette.vivoPurple | VivoNewColors.palette.darkModeGrey) let backgroundContainerBrandHover = VivoNewColors.palette.darkModeBlack.withAlphaComponent(0.2) | VivoNewColors.palette.white.withAlphaComponent(0.03) From 054807a04e504600db04ca09344a4ef6e6271a4e Mon Sep 17 00:00:00 2001 From: alejandroruizponce Date: Wed, 10 Jul 2024 12:54:54 +0200 Subject: [PATCH 3/3] Run swiftformat --- Sources/MisticaCommon/Colors/MisticaColor.swift | 2 +- Sources/MisticaCommon/Colors/O2NewColorPalette.swift | 2 +- Sources/MisticaCommon/Colors/VivoNewColorPalette.swift | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Sources/MisticaCommon/Colors/MisticaColor.swift b/Sources/MisticaCommon/Colors/MisticaColor.swift index 877ad3ef..50ec3eeb 100644 --- a/Sources/MisticaCommon/Colors/MisticaColor.swift +++ b/Sources/MisticaCommon/Colors/MisticaColor.swift @@ -17,7 +17,7 @@ public extension MisticaColor { static var backgroundBrand: MisticaColor { MisticaConfig.currentColors.backgroundBrand } - + static var backgroundContainerBrand: MisticaColor { MisticaConfig.currentColors.backgroundContainerBrand } diff --git a/Sources/MisticaCommon/Colors/O2NewColorPalette.swift b/Sources/MisticaCommon/Colors/O2NewColorPalette.swift index fa270aa2..ecadc51e 100644 --- a/Sources/MisticaCommon/Colors/O2NewColorPalette.swift +++ b/Sources/MisticaCommon/Colors/O2NewColorPalette.swift @@ -12,7 +12,7 @@ struct O2NewColors: MisticaColors { static let palette = O2NewColorPalette() let background = O2NewColors.palette.white | O2NewColors.palette.darkModeBlack - + let backgroundBrand = MisticaColor.gradient(MisticaGradient( colors: [ diff --git a/Sources/MisticaCommon/Colors/VivoNewColorPalette.swift b/Sources/MisticaCommon/Colors/VivoNewColorPalette.swift index 0e71b5c0..eb0e62b2 100644 --- a/Sources/MisticaCommon/Colors/VivoNewColorPalette.swift +++ b/Sources/MisticaCommon/Colors/VivoNewColorPalette.swift @@ -16,7 +16,7 @@ struct VivoNewColors: MisticaColors { let backgroundAlternative = VivoNewColors.palette.grey1 | VivoNewColors.palette.darkModeBlack let backgroundBrand = MisticaColor.solid(VivoNewColors.palette.vivoPurple | VivoNewColors.palette.darkModeBlack) - + let backgroundBrandSecondary = VivoNewColors.palette.vivoPurpleLight80 | VivoNewColors.palette.darkModeBlack let backgroundContainer = VivoNewColors.palette.white | VivoNewColors.palette.darkModeGrey