Skip to content

Commit

Permalink
feat(Accesibility): Update color tokens for accessibility
Browse files Browse the repository at this point in the history
* IOS-10212: Update MiMovistar tokens

* IOS-10212: Update screenshots with new tokens

* Record screenshots automatically launched from GH action

* Record screenshots automatically launched from GH action

* Update tokens with ref=production

* Record screenshots automatically launched from GH action

* Update textInputTint with new token

* Record screenshots automatically launched from GH action

---------

Co-authored-by: WanaldinoTelefonica <[email protected]>
  • Loading branch information
WanaldinoTelefonica and WanaldinoTelefonica authored Jun 11, 2024
1 parent 3bb09ac commit c305146
Show file tree
Hide file tree
Showing 521 changed files with 232 additions and 89 deletions.
2 changes: 1 addition & 1 deletion Sources/Mistica/Components/InputField/InputField.swift
Original file line number Diff line number Diff line change
Expand Up @@ -914,7 +914,7 @@ private extension InputField {
textInputView.autocorrectionType = autocorrectionType
textInputView.keyboardType = keyboardType
textInputView.autocapitalizationType = autocapitalizationType
textInputView.tintColor = .controlActivated
textInputView.tintColor = .textActivated
}
}

Expand Down
14 changes: 12 additions & 2 deletions Sources/MisticaCommon/Colors/BlauColorPalette.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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
20 changes: 20 additions & 0 deletions Sources/MisticaCommon/Colors/ColorToolkit+Color.swift
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,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 +241,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 +377,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
25 changes: 25 additions & 0 deletions Sources/MisticaCommon/Colors/ColorToolkit+UIColor.swift
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,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 +299,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 +469,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
5 changes: 5 additions & 0 deletions Sources/MisticaCommon/Colors/MisticaColors.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ public protocol MisticaColors {
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 }
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

0 comments on commit c305146

Please sign in to comment.