Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(skin): update design tokens from mistica-design branch: production #369

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 13 additions & 3 deletions Sources/MisticaCommon/Colors/BlauColorPalette.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -21,6 +21,8 @@ struct BlauColors: MisticaColors {

let backgroundContainer = BlauColors.palette.white | BlauColors.palette.darkModeGrey

let backgroundContainerError = BlauColors.palette.blauRed10 | BlauColors.palette.darkModeGrey

let backgroundContainerHover = BlauColors.palette.blauBluePrimary.withAlphaComponent(0.03) | BlauColors.palette.white.withAlphaComponent(0.03)

let backgroundContainerPressed = BlauColors.palette.blauBluePrimary.withAlphaComponent(0.05) | BlauColors.palette.white.withAlphaComponent(0.05)
Expand Down Expand Up @@ -71,7 +73,7 @@ struct BlauColors: MisticaColors {

let buttonLinkDangerBackgroundSelected = BlauColors.palette.blauRed10 | BlauColors.palette.blauPurple.withAlphaComponent(0.3)

let buttonLinkDangerBackgroundInverse = BlauColors.palette.white | BlauColors.palette.white.withAlphaComponent(0.01)
let buttonLinkDangerBackgroundInverse = BlauColors.palette.white | BlauColors.palette.white.withAlphaComponent(0)

let buttonLinkDangerBackgroundInverseSelected = BlauColors.palette.blauRed10 | BlauColors.palette.blauPurple.withAlphaComponent(0.3)

Expand Down Expand Up @@ -127,11 +129,15 @@ struct BlauColors: MisticaColors {

let textLinkSnackbar = BlauColors.palette.blauPurple30

let textActivated = BlauColors.palette.blauBlueSecondary

let textBrand = BlauColors.palette.blauBluePrimary

let control = BlauColors.palette.grey2 | BlauColors.palette.darkModeGrey6

let controlActivated = BlauColors.palette.blauBlueSecondary

let controlInverse = BlauColors.palette.white | BlauColors.palette.darkModeGrey6
let controlInverse = BlauColors.palette.blauBluePrimary30 | BlauColors.palette.darkModeGrey6

let controlActivatedInverse = BlauColors.palette.white | BlauColors.palette.blauBlueSecondary

Expand Down Expand Up @@ -187,6 +193,10 @@ struct BlauColors: MisticaColors {

let error = BlauColors.palette.blauRed

let textError = BlauColors.palette.blauRed

let textErrorInverse = BlauColors.palette.white | BlauColors.palette.blauRed

let success = BlauColors.palette.blauGreen

let warning = BlauColors.palette.blauYellow
Expand Down
24 changes: 24 additions & 0 deletions Sources/MisticaCommon/Colors/ColorToolkit+Color.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand All @@ -25,6 +29,10 @@ public extension Color {
MisticaConfig.currentColors.backgroundContainer.color
}

static var backgroundContainerError: Color {
MisticaConfig.currentColors.backgroundContainerError.color
}

static var backgroundContainerHover: Color {
MisticaConfig.currentColors.backgroundContainerHover.color
}
Expand Down Expand Up @@ -237,6 +245,14 @@ public extension 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
}
Expand Down Expand Up @@ -365,6 +381,14 @@ public extension 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
}
Expand Down
32 changes: 31 additions & 1 deletion Sources/MisticaCommon/Colors/ColorToolkit+UIColor.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -29,6 +34,11 @@ public extension UIColor {
MisticaConfig.currentColors.backgroundContainer
}

@objc(backgroundContainerErrorColor)
static var backgroundContainerError: UIColor {
MisticaConfig.currentColors.backgroundContainerError
}

@objc(backgroundContainerHoverColor)
static var backgroundContainerHover: UIColor {
MisticaConfig.currentColors.backgroundContainerHover
Expand Down Expand Up @@ -294,6 +304,16 @@ public extension 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
Expand Down Expand Up @@ -454,6 +474,16 @@ public extension 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
Expand Down Expand Up @@ -628,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
}
}
Expand Down
7 changes: 6 additions & 1 deletion Sources/MisticaCommon/Colors/MisticaColors.swift
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,10 @@ 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 }
var backgroundContainerHover: UIColor { get }
var backgroundContainerPressed: UIColor { get }
var backgroundContainerBrand: UIColor { get }
Expand Down Expand Up @@ -67,6 +68,8 @@ public protocol MisticaColors {
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 }
Expand Down Expand Up @@ -99,6 +102,8 @@ public protocol MisticaColors {
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 }
Expand Down
Loading
Loading