Update Textfield tokens (#1820)
* Add dangerStroke2 * Update Textfield tokens
This commit is contained in:
Родитель
936a0f1ffd
Коммит
740960363d
|
@ -99,6 +99,7 @@ class AliasColorTokensDemoController: DemoTableViewController {
|
|||
.dangerForeground1,
|
||||
.dangerForeground2,
|
||||
.dangerStroke1,
|
||||
.dangerStroke2,
|
||||
.successBackground2,
|
||||
.successForeground1,
|
||||
.successForeground2,
|
||||
|
@ -252,6 +253,7 @@ private enum AliasColorTokensDemoSection: CaseIterable {
|
|||
.dangerForeground1,
|
||||
.dangerForeground2,
|
||||
.dangerStroke1,
|
||||
.dangerStroke2,
|
||||
.successBackground1,
|
||||
.successBackground2,
|
||||
.successForeground1,
|
||||
|
@ -409,6 +411,8 @@ private extension FluentTheme.ColorToken {
|
|||
return "DangerForeground2"
|
||||
case .dangerStroke1:
|
||||
return "DangerStroke1"
|
||||
case .dangerStroke2:
|
||||
return "DangerStroke2"
|
||||
case .successBackground1:
|
||||
return "SuccessBackground1"
|
||||
case .successBackground2:
|
||||
|
|
|
@ -94,6 +94,7 @@ public extension FluentTheme {
|
|||
case dangerForeground1
|
||||
case dangerForeground2
|
||||
case dangerStroke1
|
||||
case dangerStroke2
|
||||
case successBackground1
|
||||
case successBackground2
|
||||
case successForeground1
|
||||
|
|
|
@ -142,6 +142,7 @@ public final class AliasTokens: NSObject {
|
|||
case dangerForeground1
|
||||
case dangerForeground2
|
||||
case dangerStroke1
|
||||
case dangerStroke2
|
||||
case successBackground1
|
||||
case successBackground2
|
||||
case successForeground1
|
||||
|
@ -431,6 +432,9 @@ extension AliasTokens {
|
|||
case .dangerStroke1:
|
||||
return DynamicColor(light: GlobalTokens.sharedColors(.red, .tint20),
|
||||
dark: GlobalTokens.sharedColors(.red, .tint20))
|
||||
case .dangerStroke2:
|
||||
return DynamicColor(light: GlobalTokens.sharedColors(.red, .primary),
|
||||
dark: GlobalTokens.sharedColors(.red, .tint30))
|
||||
case .successBackground1:
|
||||
return DynamicColor(light: GlobalTokens.sharedColors(.green, .tint60),
|
||||
dark: GlobalTokens.sharedColors(.green, .shade40))
|
||||
|
|
|
@ -62,7 +62,7 @@ public class TextFieldTokenSet: ControlTokenSet<TextFieldTokenSet.Tokens> {
|
|||
case .unfocused, .focused:
|
||||
return theme.color(.foreground2)
|
||||
case .error:
|
||||
return theme.color(.dangerForeground1)
|
||||
return theme.color(.dangerForeground2)
|
||||
}
|
||||
}
|
||||
case .assistiveTextFont:
|
||||
|
@ -92,9 +92,9 @@ public class TextFieldTokenSet: ControlTokenSet<TextFieldTokenSet.Tokens> {
|
|||
case .unfocused:
|
||||
return theme.color(.stroke1)
|
||||
case .focused:
|
||||
return theme.color(.brandForeground1)
|
||||
return theme.color(.brandStroke1)
|
||||
case .error:
|
||||
return theme.color(.dangerForeground1)
|
||||
return theme.color(.dangerStroke2)
|
||||
}
|
||||
}
|
||||
case .titleLabelColor:
|
||||
|
@ -105,7 +105,7 @@ public class TextFieldTokenSet: ControlTokenSet<TextFieldTokenSet.Tokens> {
|
|||
case .focused:
|
||||
return theme.color(.brandForeground1)
|
||||
case .error:
|
||||
return theme.color(.dangerForeground1)
|
||||
return theme.color(.dangerForeground2)
|
||||
}
|
||||
}
|
||||
case .titleLabelFont:
|
||||
|
|
Загрузка…
Ссылка в новой задаче