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 af397108..37056419 100644 --- a/Sources/MisticaCommon/Colors/BlauColorPalette.swift +++ b/Sources/MisticaCommon/Colors/BlauColorPalette.swift @@ -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 236f54df..661c505c 100644 --- a/Sources/MisticaCommon/Colors/ColorToolkit+Color.swift +++ b/Sources/MisticaCommon/Colors/ColorToolkit+Color.swift @@ -37,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 11146b61..33bcbe75 100644 --- a/Sources/MisticaCommon/Colors/ColorToolkit+UIColor.swift +++ b/Sources/MisticaCommon/Colors/ColorToolkit+UIColor.swift @@ -44,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 @@ -653,7 +648,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, .tu, .telefonica: return .lightContent } } diff --git a/Sources/MisticaCommon/Colors/MisticaColor.swift b/Sources/MisticaCommon/Colors/MisticaColor.swift index 11858eb8..50ec3eeb 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 cfe4a7f6..f26c1b4b 100644 --- a/Sources/MisticaCommon/Colors/MisticaColors.swift +++ b/Sources/MisticaCommon/Colors/MisticaColors.swift @@ -17,7 +17,7 @@ public protocol MisticaColors { 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 fc664756..6d244f27 100644 --- a/Sources/MisticaCommon/Colors/MovistarColorPalette.swift +++ b/Sources/MisticaCommon/Colors/MovistarColorPalette.swift @@ -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 667977a1..fb9f21b9 100644 --- a/Sources/MisticaCommon/Colors/O2ColorPalette.swift +++ b/Sources/MisticaCommon/Colors/O2ColorPalette.swift @@ -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 afc152ed..ecadc51e 100644 --- a/Sources/MisticaCommon/Colors/O2NewColorPalette.swift +++ b/Sources/MisticaCommon/Colors/O2NewColorPalette.swift @@ -24,7 +24,16 @@ struct O2NewColors: MisticaColors { angle: 180 )) - let backgroundContainerBrand = O2NewColors.palette.beyondBlue | O2NewColors.palette.darkModeGrey + 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 70d794d9..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) diff --git a/Sources/MisticaCommon/Colors/TuColorPalette.swift b/Sources/MisticaCommon/Colors/TuColorPalette.swift index 9a293ff0..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) diff --git a/Sources/MisticaCommon/Colors/VivoColorPalette.swift b/Sources/MisticaCommon/Colors/VivoColorPalette.swift index 71cb1a5d..76ed0ebd 100644 --- a/Sources/MisticaCommon/Colors/VivoColorPalette.swift +++ b/Sources/MisticaCommon/Colors/VivoColorPalette.swift @@ -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 bbeef4ca..eb0e62b2 100644 --- a/Sources/MisticaCommon/Colors/VivoNewColorPalette.swift +++ b/Sources/MisticaCommon/Colors/VivoNewColorPalette.swift @@ -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) @@ -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