@@ -21,6 +21,10 @@ import {
2121 controlCornerRadius ,
2222 designUnit ,
2323 disabledOpacity ,
24+ errorFillActive ,
25+ errorFillFocus ,
26+ errorFillHover ,
27+ errorFillRest ,
2428 focusStrokeWidth ,
2529 foregroundOnAccentActive ,
2630 foregroundOnAccentHover ,
@@ -68,6 +72,10 @@ export const checkboxStyles: FoundationElementTemplate<
6872 cursor : pointer;
6973 }
7074
75+ : host ([aria-invalid = 'true' ]) .control {
76+ border-color : ${ errorFillRest } ;
77+ }
78+
7179 .label {
7280 font-family : ${ bodyFont } ;
7381 color : ${ neutralForegroundRest } ;
@@ -116,11 +124,23 @@ export const checkboxStyles: FoundationElementTemplate<
116124 border-color : ${ neutralStrokeActive } ;
117125 }
118126
127+ : host ([aria-invalid = 'true' ]: not ([disabled ])) .control : hover {
128+ border-color : ${ errorFillHover } ;
129+ }
130+
131+ : host ([aria-invalid = 'true' ]: not ([disabled ])) .control : active {
132+ border-color : ${ errorFillActive } ;
133+ }
134+
119135 : host (: ${ focusVisible } ) .control {
120136 outline : calc (${ focusStrokeWidth } * 1px ) solid ${ accentFillFocus } ;
121137 outline-offset : 2px ;
122138 }
123139
140+ : host ([aria-invalid = 'true' ]: ${ focusVisible } ) .control {
141+ outline-color : ${ errorFillFocus } ;
142+ }
143+
124144 : host ([aria-checked = 'true' ]) .control {
125145 background : ${ accentFillRest } ;
126146 border : calc (${ strokeWidth } * 1px ) solid ${ accentFillRest } ;
@@ -131,6 +151,17 @@ export const checkboxStyles: FoundationElementTemplate<
131151 border : calc (${ strokeWidth } * 1px ) solid ${ accentFillHover } ;
132152 }
133153
154+ : host ([aria-invalid = 'true' ][aria-checked = 'true' ]) .control {
155+ background-color : ${ errorFillRest } ;
156+ border-color : ${ errorFillRest } ;
157+ }
158+
159+ : host ([aria-invalid = 'true' ][aria-checked = 'true' ]: not ([disabled ]))
160+ .control : hover {
161+ background-color : ${ errorFillHover } ;
162+ border-color : ${ errorFillHover } ;
163+ }
164+
134165 : host ([aria-checked = 'true' ]: not ([disabled ]))
135166 .control : hover
136167 .checked-indicator {
@@ -148,6 +179,12 @@ export const checkboxStyles: FoundationElementTemplate<
148179 border : calc (${ strokeWidth } * 1px ) solid ${ accentFillActive } ;
149180 }
150181
182+ : host ([aria-invalid = 'true' ][aria-checked = 'true' ]: not ([disabled ]))
183+ .control : active {
184+ background-color : ${ errorFillActive } ;
185+ border-color : ${ errorFillActive } ;
186+ }
187+
151188 : host ([aria-checked = 'true' ]: not ([disabled ]))
152189 .control : active
153190 .checked-indicator {
@@ -165,6 +202,10 @@ export const checkboxStyles: FoundationElementTemplate<
165202 outline-offset : 2px ;
166203 }
167204
205+ : host ([aria-invalid = 'true' ][aria-checked = "true" ]:${ focusVisible } :not ([disabled ])) .control {
206+ outline-color : ${ errorFillFocus } ;
207+ }
208+
168209 : host ([disabled ]) .label ,
169210 : host ([readonly ]) .label ,
170211 : host ([readonly ]) .control ,
@@ -187,6 +228,9 @@ export const checkboxStyles: FoundationElementTemplate<
187228 border-color : ${ SystemColors . FieldText } ;
188229 background : ${ SystemColors . Field } ;
189230 }
231+ : host ([aria-invalid = 'true' ]) .control {
232+ border-style : dashed;
233+ }
190234 .checked-indicator {
191235 fill : ${ SystemColors . FieldText } ;
192236 }
0 commit comments