@gitlab/ui 136.3.0 → 136.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -71,7 +71,8 @@ $toggle-height: 2.5 * $grid-size;
71
71
  width: $toggle-width;
72
72
  height: $toggle-height;
73
73
  user-select: none;
74
- box-shadow: inset 0 0 0 $gl-border-size-1 var(--gl-action-neutral-border-color-default);
74
+ box-shadow: inset 0 0 0 $gl-border-size-1
75
+ var(--gl-toggle-switch-track-border-color-unchecked-default);
75
76
  @apply gl-rounded-pill;
76
77
  @apply gl-leading-normal;
77
78
  transition:
@@ -93,23 +94,33 @@ $toggle-height: 2.5 * $grid-size;
93
94
  &:hover {
94
95
  color: var(--gl-toggle-switch-icon-color-unchecked-hover);
95
96
  background-color: var(--gl-toggle-switch-track-color-unchecked-hover);
96
- box-shadow: inset 0 0 0 $gl-border-size-1 var(--gl-action-neutral-border-color-hover);
97
-
98
- .toggle-icon::before {
99
- transform: scale(0.875);
100
- }
97
+ box-shadow: inset 0 0 0 $gl-border-size-1
98
+ var(--gl-toggle-switch-track-border-color-unchecked-hover);
101
99
  }
102
100
 
103
101
  &:focus-visible {
104
102
  color: var(--gl-toggle-switch-icon-color-unchecked-focus);
105
103
  background-color: var(--gl-toggle-switch-track-color-unchecked-focus);
106
- @include gl-focus($color: var(--gl-action-neutral-border-color-focus), $important: true);
104
+ @include gl-focus(
105
+ $color: var(--gl-toggle-switch-track-border-color-unchecked-focus),
106
+ $important: true
107
+ );
107
108
  }
108
109
 
109
110
  &:active {
110
111
  color: var(--gl-toggle-switch-icon-color-unchecked-active);
111
112
  background-color: var(--gl-toggle-switch-track-color-unchecked-active);
112
- @include gl-focus($color: var(--gl-action-neutral-border-color-active), $important: true);
113
+ @include gl-focus(
114
+ $color: var(--gl-toggle-switch-track-border-color-unchecked-active),
115
+ $important: true
116
+ );
117
+ }
118
+
119
+ // The thumb grows on hover and focus so the interaction reads on the thumb as
120
+ // well as on the track.
121
+ &:hover .toggle-icon::before,
122
+ &:focus-visible .toggle-icon::before {
123
+ transform: scale(0.875);
113
124
  }
114
125
 
115
126
  .toggle-loading {
@@ -159,24 +170,32 @@ $toggle-height: 2.5 * $grid-size;
159
170
  &.is-checked {
160
171
  color: var(--gl-toggle-switch-icon-color-checked-default);
161
172
  background-color: var(--gl-toggle-switch-track-color-checked-default);
162
- box-shadow: inset 0 0 0 $gl-border-size-1 var(--gl-action-neutral-border-color-default);
173
+ box-shadow: inset 0 0 0 $gl-border-size-1
174
+ var(--gl-toggle-switch-track-border-color-checked-default);
163
175
 
164
176
  &:hover {
165
177
  color: var(--gl-toggle-switch-icon-color-checked-hover);
166
178
  background-color: var(--gl-toggle-switch-track-color-checked-hover);
167
- box-shadow: inset 0 0 0 $gl-border-size-1 var(--gl-action-neutral-border-color-hover);
179
+ box-shadow: inset 0 0 0 $gl-border-size-1
180
+ var(--gl-toggle-switch-track-border-color-checked-hover);
168
181
  }
169
182
 
170
183
  &:focus-visible {
171
184
  color: var(--gl-toggle-switch-icon-color-checked-focus);
172
185
  background-color: var(--gl-toggle-switch-track-color-checked-focus);
173
- @include gl-focus($color: var(--gl-action-neutral-border-color-focus), $important: true);
186
+ @include gl-focus(
187
+ $color: var(--gl-toggle-switch-track-border-color-checked-focus),
188
+ $important: true
189
+ );
174
190
  }
175
191
 
176
192
  &:active {
177
193
  color: var(--gl-toggle-switch-icon-color-checked-active);
178
194
  background-color: var(--gl-toggle-switch-track-color-checked-active);
179
- @include gl-focus($color: var(--gl-action-neutral-border-color-active), $important: true);
195
+ @include gl-focus(
196
+ $color: var(--gl-toggle-switch-track-border-color-checked-active),
197
+ $important: true
198
+ );
180
199
  }
181
200
 
182
201
  .toggle-icon {
@@ -189,34 +208,83 @@ $toggle-height: 2.5 * $grid-size;
189
208
  }
190
209
  }
191
210
 
192
- &.is-disabled,
193
- &.is-checked.is-disabled {
211
+ // Both disabled blocks must stay last. `.gl-toggle.is-checked` and
212
+ // `.gl-toggle.is-disabled` carry equal specificity, so source order is what
213
+ // lets the disabled styles win over the checked ones.
214
+ &.is-disabled {
194
215
  @apply gl-cursor-not-allowed;
195
- color: var(--gl-action-disabled-background-color);
196
- background-color: var(--gl-action-disabled-background-color);
197
- box-shadow: inset 0 0 0 $gl-border-size-1 var(--gl-action-disabled-border-color);
216
+ background-color: var(--gl-toggle-switch-track-color-unchecked-disabled);
217
+ box-shadow: inset 0 0 0 $gl-border-size-1
218
+ var(--gl-toggle-switch-track-border-color-unchecked-disabled);
198
219
 
199
220
  .toggle-icon {
200
221
  color: var(--gl-toggle-switch-icon-color-disabled);
201
222
  }
202
223
 
203
224
  .toggle-icon::before {
204
- background-color: var(--gl-toggle-switch-background-color-disabled);
225
+ background-color: var(--gl-toggle-switch-background-color-unchecked-disabled);
205
226
  }
206
227
 
207
- &:hover .toggle-icon::before {
228
+ &:hover .toggle-icon::before,
229
+ &:focus-visible .toggle-icon::before {
208
230
  transform: scale(0.75);
209
231
  }
210
232
 
211
- &.is-checked .toggle-icon::before,
212
- &.is-checked:hover .toggle-icon::before {
233
+ &:active,
234
+ &:focus-visible,
235
+ &:focus-visible:active {
236
+ @include gl-focus(
237
+ $color: var(--gl-toggle-switch-track-border-color-unchecked-disabled),
238
+ $important: true
239
+ );
240
+ }
241
+ }
242
+
243
+ &.is-checked.is-disabled {
244
+ background-color: var(--gl-toggle-switch-track-color-checked-disabled);
245
+ box-shadow: inset 0 0 0 $gl-border-size-1
246
+ var(--gl-toggle-switch-track-border-color-checked-disabled);
247
+
248
+ .toggle-icon::before {
249
+ background-color: var(--gl-toggle-switch-background-color-checked-disabled);
250
+ transform: scale(1);
251
+ }
252
+
253
+ &:hover .toggle-icon::before,
254
+ &:focus-visible .toggle-icon::before {
213
255
  transform: scale(1);
214
256
  }
215
257
 
216
258
  &:active,
217
259
  &:focus-visible,
218
260
  &:focus-visible:active {
219
- @include gl-focus($color: var(--gl-action-disabled-border-color), $important: true);
261
+ @include gl-focus(
262
+ $color: var(--gl-toggle-switch-track-border-color-checked-disabled),
263
+ $important: true
264
+ );
265
+ }
266
+ }
267
+
268
+ // A loading toggle renders a spinner in place of the thumb, so the track is
269
+ // the only thing left to look at and its value is still in flight. It gets a
270
+ // flat fill that ignores the checked state, which also keeps the spinner
271
+ // legible in both color modes.
272
+ //
273
+ // `.is-loading` is always accompanied by `.is-disabled`, so this block has to
274
+ // stay after both disabled blocks: the checked pairs tie on specificity and
275
+ // source order is what settles them.
276
+ &.is-loading,
277
+ &.is-checked.is-loading {
278
+ background-color: var(--gl-toggle-switch-track-color-loading);
279
+ box-shadow: inset 0 0 0 $gl-border-size-1 var(--gl-toggle-switch-track-border-color-loading);
280
+
281
+ &:active,
282
+ &:focus-visible,
283
+ &:focus-visible:active {
284
+ @include gl-focus(
285
+ $color: var(--gl-toggle-switch-track-border-color-loading),
286
+ $important: true
287
+ );
220
288
  }
221
289
  }
222
290
  }
@@ -178,6 +178,7 @@ export default {
178
178
  :class="{
179
179
  'is-checked': value,
180
180
  'is-disabled': disabled || isLoading,
181
+ 'is-loading': isLoading,
181
182
  }"
182
183
  class="gl-toggle gl-shrink-0"
183
184
  type="button"
@@ -651,9 +651,6 @@
651
651
  --gl-spinner-track-color-light: var(--gl-color-neutral-800); /** Used for the static track (background) of a loading spinner on a dark background. */
652
652
  --gl-spinner-segment-color-default: var(--gl-color-neutral-700); /** Used for the animated segment of a loading spinner. */
653
653
  --gl-spinner-segment-color-light: var(--gl-color-neutral-200); /** Used for the animated segment of a loading spinner on a dark background. */
654
- --gl-toggle-switch-track-color-checked-default: var(--gl-color-neutral-800); /** Used for the track color of a checked toggle switch in the default state. */
655
- --gl-toggle-switch-track-color-checked-hover: var(--gl-color-neutral-950); /** Used for the track color of a checked toggle switch in the hover state. */
656
- --gl-toggle-switch-track-color-checked-active: var(--gl-color-neutral-1000); /** Used for the track color of a checked toggle switch in the active state. */
657
654
  --gl-token-selector-token-container-token-background-color-focus: var(--gl-color-neutral-300); /** Used for the background color of a token in a token-selector when it's token-container is in the focus state. */
658
655
  --gl-token-background-color: var(--gl-color-neutral-100); /** Used for the token background color. */
659
656
  --gl-tooltip-text-color-subtle: var(--gl-color-neutral-200); /** Used for supplemental tooltip text that is less prominent than the default text and remains the same color regardless of mode. */
@@ -733,6 +730,7 @@
733
730
  --gl-action-selected-background-color-default: var(--gl-color-neutral-800); /** Used for the background of a selected action in the default state. */
734
731
  --gl-action-selected-background-color-hover: var(--gl-color-neutral-950); /** Used for the background of a selected action in the hover state. */
735
732
  --gl-action-selected-background-color-active: var(--gl-color-neutral-1000); /** Used for the background of a selected action in the active state. */
733
+ --gl-action-selected-background-color-disabled: var(--gl-color-neutral-400); /** Used for the background of a disabled action that stays selected. Sits between the disabled background and the enabled selected background so the selected state keeps 3:1 contrast against the page while still reading as disabled. */
736
734
  --gl-action-neutral-foreground-color-default: var(--gl-color-neutral-900); /** Used for the foreground of a neutral action in the default state. */
737
735
  --gl-action-neutral-background-color-default: var(--gl-color-alpha-0); /** Used for the background of a neutral action in the default state. */
738
736
  --gl-action-neutral-background-color-hover: var(--gl-color-alpha-dark-6); /** Used for the background of a neutral action in the hover state. */
@@ -1022,17 +1020,25 @@
1022
1020
  --gl-progress-bar-indicator-color-danger: var(--gl-status-danger-icon-color); /** Used for the indicator color for the danger progress-bar variant. */
1023
1021
  --gl-table-row-background-color-hover: var(--gl-highlight-target-background-color); /** Used for the background of a table row in hover state. */
1024
1022
  --gl-table-sorting-icon-color: var(--gl-text-color-heading); /** Used for the color of the sorting icons in the column headers. */
1025
- --gl-toggle-switch-track-color-unchecked-default: var(--gl-control-border-color-default); /** Used for the track color of an unchecked toggle switch in the default state. */
1026
- --gl-toggle-switch-track-color-checked-focus: var(--gl-toggle-switch-track-color-checked-hover); /** Used for the track color of a checked toggle switch in the focus state. */
1027
- --gl-toggle-switch-background-color-unchecked-default: var(--gl-control-indicator-color-selected); /** Used for the background color of the unchecked toggle switch thumb in the default state. */
1028
- --gl-toggle-switch-background-color-checked-default: var(--gl-action-strong-confirm-foreground-color-default); /** Used for the background color of the checked toggle switch thumb in the default state. */
1029
- --gl-toggle-switch-background-color-disabled: var(--gl-action-disabled-foreground-color); /** Used for the background color of the toggle switch thumb in the disabled state. */
1030
- --gl-toggle-switch-icon-color-unchecked-default: var(--gl-action-strong-neutral-background-color-default); /** Used for the icon color of an unchecked toggle switch in the default state. */
1031
- --gl-toggle-switch-icon-color-unchecked-hover: var(--gl-action-strong-neutral-background-color-hover); /** Used for the icon color of an unchecked toggle switch in the hover state. */
1032
- --gl-toggle-switch-icon-color-unchecked-active: var(--gl-action-strong-neutral-background-color-active); /** Used for the icon color of an unchecked toggle switch in the active state. */
1033
- --gl-toggle-switch-icon-color-checked-default: var(--gl-action-strong-confirm-background-color-default); /** Used for the icon color of a checked toggle switch in the default state. */
1034
- --gl-toggle-switch-icon-color-checked-hover: var(--gl-action-strong-confirm-background-color-hover); /** Used for the icon color of a checked toggle switch in the hover state. */
1035
- --gl-toggle-switch-icon-color-checked-active: var(--gl-action-strong-confirm-background-color-active); /** Used for the icon color of a checked toggle switch in the active state. */
1023
+ --gl-toggle-switch-track-color-unchecked-default: var(--gl-control-background-color-default); /** Used for the track color of an unchecked toggle switch in the default state. */
1024
+ --gl-toggle-switch-track-color-unchecked-active: var(--gl-action-neutral-background-color-active); /** Used for the track color of an unchecked toggle switch in the active state. */
1025
+ --gl-toggle-switch-track-color-unchecked-disabled: var(--gl-control-background-color-default); /** Used for the track color of a disabled unchecked toggle switch. */
1026
+ --gl-toggle-switch-track-color-checked-default: var(--gl-action-selected-background-color-default); /** Used for the track color of a checked toggle switch in the default state. */
1027
+ --gl-toggle-switch-track-color-checked-hover: var(--gl-action-selected-background-color-hover); /** Used for the track color of a checked toggle switch in the hover state. */
1028
+ --gl-toggle-switch-track-color-checked-active: var(--gl-action-selected-background-color-active); /** Used for the track color of a checked toggle switch in the active state. */
1029
+ --gl-toggle-switch-track-color-checked-disabled: var(--gl-action-selected-background-color-disabled); /** Used for the track color of a disabled checked toggle switch, which stays filled so the checked state remains legible. */
1030
+ --gl-toggle-switch-track-color-loading: var(--gl-action-disabled-background-color); /** Used for the track color of a loading toggle switch. A loading toggle renders no thumb and its value is still in flight, so the track carries no checked state. */
1031
+ --gl-toggle-switch-track-border-color-unchecked-default: var(--gl-control-border-color-default); /** Used for the track border color of an unchecked toggle switch in the default state. */
1032
+ --gl-toggle-switch-track-border-color-unchecked-hover: var(--gl-control-border-color-hover); /** Used for the track border color of an unchecked toggle switch in the hover state. */
1033
+ --gl-toggle-switch-track-border-color-unchecked-disabled: var(--gl-action-disabled-border-color); /** Used for the track border color of a disabled unchecked toggle switch. */
1034
+ --gl-toggle-switch-background-color-unchecked-default: var(--gl-action-selected-background-color-default); /** Used for the background color of the unchecked toggle switch thumb in the default state. */
1035
+ --gl-toggle-switch-background-color-unchecked-disabled: var(--gl-action-disabled-foreground-color); /** Used for the background color of the disabled unchecked toggle switch thumb. */
1036
+ --gl-toggle-switch-background-color-checked-default: var(--gl-action-selected-foreground-color-default); /** Used for the background color of the checked toggle switch thumb in the default state. */
1037
+ --gl-toggle-switch-background-color-checked-disabled: var(--gl-action-selected-foreground-color-default); /** Used for the background color of the disabled checked toggle switch thumb. */
1038
+ --gl-toggle-switch-icon-color-unchecked-default: var(--gl-action-selected-foreground-color-default); /** Used for the icon color of an unchecked toggle switch in the default state. */
1039
+ --gl-toggle-switch-icon-color-checked-default: var(--gl-action-selected-background-color-default); /** Used for the icon color of a checked toggle switch in the default state. */
1040
+ --gl-toggle-switch-icon-color-checked-hover: var(--gl-action-selected-background-color-hover); /** Used for the icon color of a checked toggle switch in the hover state. */
1041
+ --gl-toggle-switch-icon-color-checked-active: var(--gl-action-selected-background-color-active); /** Used for the icon color of a checked toggle switch in the active state. */
1036
1042
  --gl-toggle-switch-icon-color-disabled: var(--gl-action-disabled-background-color); /** Used for the icon color of a disabled toggle switch. */
1037
1043
  --gl-token-foreground-color: var(--gl-text-color-default); /** Used for the token foreground color. */
1038
1044
  --gl-action-border-radius: var(--gl-border-radius-lg); /** Used for the border radius of an action. */
@@ -1229,13 +1235,21 @@
1229
1235
  --gl-nav-item-selected-foreground-color-focus: var(--gl-nav-item-foreground-color-focus); /** Used for the foreground of a selected navigation item in the focus state. */
1230
1236
  --gl-nav-item-selected-background-color-focus: var(--gl-nav-item-background-color-focus); /** Used for the background of a selected navigation item in the focus state. */
1231
1237
  --gl-tab-selected-indicator-color-default: var(--gl-action-selected-border-color-active); /** Used for the selected indicator of a tab. */
1232
- --gl-toggle-switch-track-color-unchecked-hover: var(--gl-toggle-switch-track-color-unchecked-default); /** Used for the track color of an unchecked toggle switch in the hover state. */
1238
+ --gl-toggle-switch-track-color-unchecked-hover: var(--gl-toggle-switch-track-color-unchecked-default); /** Used for the track color of an unchecked toggle switch in the hover state. The track is deliberately unchanged from the default state; hover is carried by the track border and the thumb size. */
1239
+ --gl-toggle-switch-track-color-checked-focus: var(--gl-action-selected-background-color-focus); /** Used for the track color of a checked toggle switch in the focus state. */
1240
+ --gl-toggle-switch-track-border-color-unchecked-focus: var(--gl-toggle-switch-track-border-color-unchecked-hover); /** Used for the track border color of an unchecked toggle switch in the focus state. */
1241
+ --gl-toggle-switch-track-border-color-checked-default: var(--gl-action-selected-border-color-default); /** Used for the track border color of a checked toggle switch in the default state. */
1242
+ --gl-toggle-switch-track-border-color-checked-hover: var(--gl-action-selected-border-color-hover); /** Used for the track border color of a checked toggle switch in the hover state. */
1243
+ --gl-toggle-switch-track-border-color-checked-active: var(--gl-action-selected-border-color-active); /** Used for the track border color of a checked toggle switch in the active state. */
1244
+ --gl-toggle-switch-track-border-color-checked-disabled: var(--gl-toggle-switch-track-color-checked-disabled); /** Used for the track border color of a disabled checked toggle switch, which matches the track color. */
1245
+ --gl-toggle-switch-track-border-color-loading: var(--gl-toggle-switch-track-color-loading); /** Used for the track border color of a loading toggle switch, which matches the track color so the track reads as a single flat fill. */
1233
1246
  --gl-toggle-switch-background-color-unchecked-hover: var(--gl-toggle-switch-background-color-unchecked-default); /** Used for the background color of the unchecked toggle switch thumb in the hover state. */
1234
1247
  --gl-toggle-switch-background-color-unchecked-focus: var(--gl-toggle-switch-background-color-unchecked-default); /** Used for the background color of the unchecked toggle switch thumb in the focus state. */
1235
1248
  --gl-toggle-switch-background-color-unchecked-active: var(--gl-toggle-switch-background-color-unchecked-default); /** Used for the background color of the unchecked toggle switch thumb in the active state. */
1236
- --gl-toggle-switch-background-color-checked-hover: var(--gl-action-strong-confirm-foreground-color-hover); /** Used for the background color of the checked toggle switch thumb in the hover state. */
1237
- --gl-toggle-switch-icon-color-unchecked-focus: var(--gl-action-strong-neutral-background-color-focus); /** Used for the icon color of an unchecked toggle switch in the focus state. */
1238
- --gl-toggle-switch-icon-color-checked-focus: var(--gl-action-strong-confirm-background-color-focus); /** Used for the icon color of a checked toggle switch in the focus state. */
1249
+ --gl-toggle-switch-background-color-checked-hover: var(--gl-action-selected-foreground-color-hover); /** Used for the background color of the checked toggle switch thumb in the hover state. */
1250
+ --gl-toggle-switch-background-color-disabled: var(--gl-toggle-switch-background-color-unchecked-disabled); /** Use toggle.switch.background.color.unchecked.disabled instead. */
1251
+ --gl-toggle-switch-icon-color-unchecked-hover: var(--gl-action-selected-foreground-color-hover); /** Used for the icon color of an unchecked toggle switch in the hover state. */
1252
+ --gl-toggle-switch-icon-color-checked-focus: var(--gl-action-selected-background-color-focus); /** Used for the icon color of a checked toggle switch in the focus state. */
1239
1253
  --gl-token-border-radius: var(--gl-border-radius-default); /** Used for token border radius. */
1240
1254
  --gl-action-selected-foreground-color-focus: var(--gl-action-selected-foreground-color-hover); /** Used for the foreground of a selected action in the focus state. */
1241
1255
  --gl-action-selected-border-color-focus: var(--gl-action-selected-background-color-focus); /** Used for the border of a selected action in the focus state. */
@@ -1246,13 +1260,16 @@
1246
1260
  --gl-control-border-color-selected-focus: var(--gl-control-background-color-selected-focus); /** Used for checked and indeterminate (selected) form control (checkbox, radio button) border on focus. */
1247
1261
  --gl-button-confirm-primary-foreground-color-active: var(--gl-button-confirm-primary-foreground-color-focus); /** Used for the foreground of a confirm (positive) primary button in the active state. */
1248
1262
  --gl-nav-item-selected-foreground-color-active: var(--gl-nav-item-foreground-color-active); /** Used for the foreground of a selected navigation item in the active state. */
1249
- --gl-toggle-switch-track-color-unchecked-focus: var(--gl-toggle-switch-track-color-unchecked-hover); /** Used for the track color of an unchecked toggle switch in the focus state. */
1250
- --gl-toggle-switch-background-color-checked-focus: var(--gl-action-strong-confirm-foreground-color-focus); /** Used for the background color of the checked toggle switch thumb in the focus state. */
1263
+ --gl-toggle-switch-track-color-unchecked-focus: var(--gl-toggle-switch-track-color-unchecked-hover); /** Used for the track color of an unchecked toggle switch in the focus state. The track is deliberately unchanged from the default state; focus is carried by the focus ring, the track border and the thumb size. */
1264
+ --gl-toggle-switch-track-border-color-unchecked-active: var(--gl-toggle-switch-track-border-color-unchecked-focus); /** Used for the track border color of an unchecked toggle switch in the active state. */
1265
+ --gl-toggle-switch-track-border-color-checked-focus: var(--gl-action-selected-border-color-focus); /** Used for the track border color of a checked toggle switch in the focus state. */
1266
+ --gl-toggle-switch-background-color-checked-focus: var(--gl-action-selected-foreground-color-focus); /** Used for the background color of the checked toggle switch thumb in the focus state. */
1267
+ --gl-toggle-switch-icon-color-unchecked-focus: var(--gl-action-selected-foreground-color-focus); /** Used for the icon color of an unchecked toggle switch in the focus state. */
1251
1268
  --gl-action-selected-foreground-color-active: var(--gl-action-selected-foreground-color-focus); /** Used for the foreground of a selected action in the active state. */
1252
1269
  --gl-action-strong-confirm-foreground-color-active: var(--gl-action-strong-confirm-foreground-color-focus); /** Used for the foreground of a strong confirm action in the active state. */
1253
1270
  --gl-action-strong-confirm-border-color-active: var(--gl-action-strong-confirm-border-color-focus); /** Used for the border of a strong confirm action in the active state. */
1254
1271
  --gl-action-strong-neutral-foreground-color-active: var(--gl-action-strong-neutral-foreground-color-focus); /** Used for the foreground of a strong neutral action in the active state. */
1255
1272
  --gl-action-strong-neutral-border-color-active: var(--gl-action-strong-neutral-border-color-focus); /** Used for the border of a strong neutral action in the active state. */
1256
- --gl-toggle-switch-track-color-unchecked-active: var(--gl-toggle-switch-track-color-unchecked-focus); /** Used for the track color of an unchecked toggle switch in the active state. */
1257
- --gl-toggle-switch-background-color-checked-active: var(--gl-action-strong-confirm-foreground-color-active); /** Used for the background color of the checked toggle switch thumb in the active state. */
1273
+ --gl-toggle-switch-background-color-checked-active: var(--gl-action-selected-foreground-color-active); /** Used for the background color of the checked toggle switch thumb in the active state. */
1274
+ --gl-toggle-switch-icon-color-unchecked-active: var(--gl-action-selected-foreground-color-active); /** Used for the icon color of an unchecked toggle switch in the active state. */
1258
1275
  }
@@ -669,9 +669,6 @@
669
669
  --gl-spinner-track-color-light: var(--gl-color-neutral-800); /** Used for the static track (background) of a loading spinner on a dark background. */
670
670
  --gl-spinner-segment-color-default: var(--gl-color-neutral-100); /** Used for the animated segment of a loading spinner. */
671
671
  --gl-spinner-segment-color-light: var(--gl-color-neutral-200); /** Used for the animated segment of a loading spinner on a dark background. */
672
- --gl-toggle-switch-track-color-checked-default: var(--gl-color-neutral-50); /** Used for the track color of a checked toggle switch in the default state. */
673
- --gl-toggle-switch-track-color-checked-hover: var(--gl-color-neutral-10); /** Used for the track color of a checked toggle switch in the hover state. */
674
- --gl-toggle-switch-track-color-checked-active: var(--gl-color-neutral-0); /** Used for the track color of a checked toggle switch in the active state. */
675
672
  --gl-token-selector-token-container-token-background-color-focus: var(--gl-color-neutral-600); /** Used for the background color of a token in a token-selector when it's token-container is in the focus state. */
676
673
  --gl-token-background-color: var(--gl-color-neutral-800); /** Used for the token background color. */
677
674
  --gl-tooltip-text-color-subtle: var(--gl-color-neutral-200); /** Used for supplemental tooltip text that is less prominent than the default text and remains the same color regardless of mode. */
@@ -747,6 +744,7 @@
747
744
  --gl-action-selected-background-color-default: var(--gl-color-neutral-50); /** Used for the background of a selected action in the default state. */
748
745
  --gl-action-selected-background-color-hover: var(--gl-color-neutral-10); /** Used for the background of a selected action in the hover state. */
749
746
  --gl-action-selected-background-color-active: var(--gl-color-neutral-0); /** Used for the background of a selected action in the active state. */
747
+ --gl-action-selected-background-color-disabled: var(--gl-color-neutral-500); /** Used for the background of a disabled action that stays selected. Sits between the disabled background and the enabled selected background so the selected state keeps 3:1 contrast against the page while still reading as disabled. */
750
748
  --gl-action-neutral-foreground-color-default: var(--gl-color-neutral-50); /** Used for the foreground of a neutral action in the default state. */
751
749
  --gl-action-neutral-background-color-default: var(--gl-color-alpha-0); /** Used for the background of a neutral action in the default state. */
752
750
  --gl-action-neutral-background-color-hover: var(--gl-color-alpha-light-16); /** Used for the background of a neutral action in the hover state. */
@@ -1029,17 +1027,25 @@
1029
1027
  --gl-progress-bar-indicator-color-danger: var(--gl-status-danger-icon-color); /** Used for the indicator color for the danger progress-bar variant. */
1030
1028
  --gl-table-row-background-color-hover: var(--gl-highlight-target-background-color); /** Used for the background of a table row in hover state. */
1031
1029
  --gl-table-sorting-icon-color: var(--gl-text-color-heading); /** Used for the color of the sorting icons in the column headers. */
1032
- --gl-toggle-switch-track-color-unchecked-default: var(--gl-control-border-color-default); /** Used for the track color of an unchecked toggle switch in the default state. */
1033
- --gl-toggle-switch-track-color-checked-focus: var(--gl-toggle-switch-track-color-checked-hover); /** Used for the track color of a checked toggle switch in the focus state. */
1034
- --gl-toggle-switch-background-color-unchecked-default: var(--gl-control-indicator-color-selected); /** Used for the background color of the unchecked toggle switch thumb in the default state. */
1035
- --gl-toggle-switch-background-color-checked-default: var(--gl-action-strong-confirm-foreground-color-default); /** Used for the background color of the checked toggle switch thumb in the default state. */
1036
- --gl-toggle-switch-background-color-disabled: var(--gl-action-disabled-foreground-color); /** Used for the background color of the toggle switch thumb in the disabled state. */
1037
- --gl-toggle-switch-icon-color-unchecked-default: var(--gl-action-strong-neutral-background-color-default); /** Used for the icon color of an unchecked toggle switch in the default state. */
1038
- --gl-toggle-switch-icon-color-unchecked-hover: var(--gl-action-strong-neutral-background-color-hover); /** Used for the icon color of an unchecked toggle switch in the hover state. */
1039
- --gl-toggle-switch-icon-color-unchecked-active: var(--gl-action-strong-neutral-background-color-active); /** Used for the icon color of an unchecked toggle switch in the active state. */
1040
- --gl-toggle-switch-icon-color-checked-default: var(--gl-action-strong-confirm-background-color-default); /** Used for the icon color of a checked toggle switch in the default state. */
1041
- --gl-toggle-switch-icon-color-checked-hover: var(--gl-action-strong-confirm-background-color-hover); /** Used for the icon color of a checked toggle switch in the hover state. */
1042
- --gl-toggle-switch-icon-color-checked-active: var(--gl-action-strong-confirm-background-color-active); /** Used for the icon color of a checked toggle switch in the active state. */
1030
+ --gl-toggle-switch-track-color-unchecked-default: var(--gl-control-background-color-default); /** Used for the track color of an unchecked toggle switch in the default state. */
1031
+ --gl-toggle-switch-track-color-unchecked-active: var(--gl-action-neutral-background-color-active); /** Used for the track color of an unchecked toggle switch in the active state. */
1032
+ --gl-toggle-switch-track-color-unchecked-disabled: var(--gl-control-background-color-default); /** Used for the track color of a disabled unchecked toggle switch. */
1033
+ --gl-toggle-switch-track-color-checked-default: var(--gl-action-selected-background-color-default); /** Used for the track color of a checked toggle switch in the default state. */
1034
+ --gl-toggle-switch-track-color-checked-hover: var(--gl-action-selected-background-color-hover); /** Used for the track color of a checked toggle switch in the hover state. */
1035
+ --gl-toggle-switch-track-color-checked-active: var(--gl-action-selected-background-color-active); /** Used for the track color of a checked toggle switch in the active state. */
1036
+ --gl-toggle-switch-track-color-checked-disabled: var(--gl-action-selected-background-color-disabled); /** Used for the track color of a disabled checked toggle switch, which stays filled so the checked state remains legible. */
1037
+ --gl-toggle-switch-track-color-loading: var(--gl-action-disabled-background-color); /** Used for the track color of a loading toggle switch. A loading toggle renders no thumb and its value is still in flight, so the track carries no checked state. */
1038
+ --gl-toggle-switch-track-border-color-unchecked-default: var(--gl-control-border-color-default); /** Used for the track border color of an unchecked toggle switch in the default state. */
1039
+ --gl-toggle-switch-track-border-color-unchecked-hover: var(--gl-control-border-color-hover); /** Used for the track border color of an unchecked toggle switch in the hover state. */
1040
+ --gl-toggle-switch-track-border-color-unchecked-disabled: var(--gl-action-disabled-border-color); /** Used for the track border color of a disabled unchecked toggle switch. */
1041
+ --gl-toggle-switch-background-color-unchecked-default: var(--gl-action-selected-background-color-default); /** Used for the background color of the unchecked toggle switch thumb in the default state. */
1042
+ --gl-toggle-switch-background-color-unchecked-disabled: var(--gl-action-disabled-foreground-color); /** Used for the background color of the disabled unchecked toggle switch thumb. */
1043
+ --gl-toggle-switch-background-color-checked-default: var(--gl-action-selected-foreground-color-default); /** Used for the background color of the checked toggle switch thumb in the default state. */
1044
+ --gl-toggle-switch-background-color-checked-disabled: var(--gl-action-selected-foreground-color-default); /** Used for the background color of the disabled checked toggle switch thumb. */
1045
+ --gl-toggle-switch-icon-color-unchecked-default: var(--gl-action-selected-foreground-color-default); /** Used for the icon color of an unchecked toggle switch in the default state. */
1046
+ --gl-toggle-switch-icon-color-checked-default: var(--gl-action-selected-background-color-default); /** Used for the icon color of a checked toggle switch in the default state. */
1047
+ --gl-toggle-switch-icon-color-checked-hover: var(--gl-action-selected-background-color-hover); /** Used for the icon color of a checked toggle switch in the hover state. */
1048
+ --gl-toggle-switch-icon-color-checked-active: var(--gl-action-selected-background-color-active); /** Used for the icon color of a checked toggle switch in the active state. */
1043
1049
  --gl-toggle-switch-icon-color-disabled: var(--gl-action-disabled-background-color); /** Used for the icon color of a disabled toggle switch. */
1044
1050
  --gl-token-foreground-color: var(--gl-text-color-default); /** Used for the token foreground color. */
1045
1051
  --gl-action-border-radius: var(--gl-border-radius-lg); /** Used for the border radius of an action. */
@@ -1231,13 +1237,21 @@
1231
1237
  --gl-nav-item-selected-foreground-color-focus: var(--gl-nav-item-foreground-color-focus); /** Used for the foreground of a selected navigation item in the focus state. */
1232
1238
  --gl-nav-item-selected-background-color-focus: var(--gl-nav-item-background-color-focus); /** Used for the background of a selected navigation item in the focus state. */
1233
1239
  --gl-tab-selected-indicator-color-default: var(--gl-action-selected-border-color-active); /** Used for the selected indicator of a tab. */
1234
- --gl-toggle-switch-track-color-unchecked-hover: var(--gl-toggle-switch-track-color-unchecked-default); /** Used for the track color of an unchecked toggle switch in the hover state. */
1240
+ --gl-toggle-switch-track-color-unchecked-hover: var(--gl-toggle-switch-track-color-unchecked-default); /** Used for the track color of an unchecked toggle switch in the hover state. The track is deliberately unchanged from the default state; hover is carried by the track border and the thumb size. */
1241
+ --gl-toggle-switch-track-color-checked-focus: var(--gl-action-selected-background-color-focus); /** Used for the track color of a checked toggle switch in the focus state. */
1242
+ --gl-toggle-switch-track-border-color-unchecked-focus: var(--gl-toggle-switch-track-border-color-unchecked-hover); /** Used for the track border color of an unchecked toggle switch in the focus state. */
1243
+ --gl-toggle-switch-track-border-color-checked-default: var(--gl-action-selected-border-color-default); /** Used for the track border color of a checked toggle switch in the default state. */
1244
+ --gl-toggle-switch-track-border-color-checked-hover: var(--gl-action-selected-border-color-hover); /** Used for the track border color of a checked toggle switch in the hover state. */
1245
+ --gl-toggle-switch-track-border-color-checked-active: var(--gl-action-selected-border-color-active); /** Used for the track border color of a checked toggle switch in the active state. */
1246
+ --gl-toggle-switch-track-border-color-checked-disabled: var(--gl-toggle-switch-track-color-checked-disabled); /** Used for the track border color of a disabled checked toggle switch, which matches the track color. */
1247
+ --gl-toggle-switch-track-border-color-loading: var(--gl-toggle-switch-track-color-loading); /** Used for the track border color of a loading toggle switch, which matches the track color so the track reads as a single flat fill. */
1235
1248
  --gl-toggle-switch-background-color-unchecked-hover: var(--gl-toggle-switch-background-color-unchecked-default); /** Used for the background color of the unchecked toggle switch thumb in the hover state. */
1236
1249
  --gl-toggle-switch-background-color-unchecked-focus: var(--gl-toggle-switch-background-color-unchecked-default); /** Used for the background color of the unchecked toggle switch thumb in the focus state. */
1237
1250
  --gl-toggle-switch-background-color-unchecked-active: var(--gl-toggle-switch-background-color-unchecked-default); /** Used for the background color of the unchecked toggle switch thumb in the active state. */
1238
- --gl-toggle-switch-background-color-checked-hover: var(--gl-action-strong-confirm-foreground-color-hover); /** Used for the background color of the checked toggle switch thumb in the hover state. */
1239
- --gl-toggle-switch-icon-color-unchecked-focus: var(--gl-action-strong-neutral-background-color-focus); /** Used for the icon color of an unchecked toggle switch in the focus state. */
1240
- --gl-toggle-switch-icon-color-checked-focus: var(--gl-action-strong-confirm-background-color-focus); /** Used for the icon color of a checked toggle switch in the focus state. */
1251
+ --gl-toggle-switch-background-color-checked-hover: var(--gl-action-selected-foreground-color-hover); /** Used for the background color of the checked toggle switch thumb in the hover state. */
1252
+ --gl-toggle-switch-background-color-disabled: var(--gl-toggle-switch-background-color-unchecked-disabled); /** Use toggle.switch.background.color.unchecked.disabled instead. */
1253
+ --gl-toggle-switch-icon-color-unchecked-hover: var(--gl-action-selected-foreground-color-hover); /** Used for the icon color of an unchecked toggle switch in the hover state. */
1254
+ --gl-toggle-switch-icon-color-checked-focus: var(--gl-action-selected-background-color-focus); /** Used for the icon color of a checked toggle switch in the focus state. */
1241
1255
  --gl-token-border-radius: var(--gl-border-radius-default); /** Used for token border radius. */
1242
1256
  --gl-action-selected-foreground-color-focus: var(--gl-action-selected-foreground-color-hover); /** Used for the foreground of a selected action in the focus state. */
1243
1257
  --gl-action-selected-border-color-focus: var(--gl-action-selected-background-color-focus); /** Used for the border of a selected action in the focus state. */
@@ -1247,12 +1261,15 @@
1247
1261
  --gl-control-border-color-selected-focus: var(--gl-control-background-color-selected-focus); /** Used for checked and indeterminate (selected) form control (checkbox, radio button) border on focus. */
1248
1262
  --gl-button-confirm-primary-foreground-color-active: var(--gl-button-confirm-primary-foreground-color-focus); /** Used for the foreground of a confirm (positive) primary button in the active state. */
1249
1263
  --gl-nav-item-selected-foreground-color-active: var(--gl-nav-item-foreground-color-active); /** Used for the foreground of a selected navigation item in the active state. */
1250
- --gl-toggle-switch-track-color-unchecked-focus: var(--gl-toggle-switch-track-color-unchecked-hover); /** Used for the track color of an unchecked toggle switch in the focus state. */
1251
- --gl-toggle-switch-background-color-checked-focus: var(--gl-action-strong-confirm-foreground-color-focus); /** Used for the background color of the checked toggle switch thumb in the focus state. */
1264
+ --gl-toggle-switch-track-color-unchecked-focus: var(--gl-toggle-switch-track-color-unchecked-hover); /** Used for the track color of an unchecked toggle switch in the focus state. The track is deliberately unchanged from the default state; focus is carried by the focus ring, the track border and the thumb size. */
1265
+ --gl-toggle-switch-track-border-color-unchecked-active: var(--gl-toggle-switch-track-border-color-unchecked-focus); /** Used for the track border color of an unchecked toggle switch in the active state. */
1266
+ --gl-toggle-switch-track-border-color-checked-focus: var(--gl-action-selected-border-color-focus); /** Used for the track border color of a checked toggle switch in the focus state. */
1267
+ --gl-toggle-switch-background-color-checked-focus: var(--gl-action-selected-foreground-color-focus); /** Used for the background color of the checked toggle switch thumb in the focus state. */
1268
+ --gl-toggle-switch-icon-color-unchecked-focus: var(--gl-action-selected-foreground-color-focus); /** Used for the icon color of an unchecked toggle switch in the focus state. */
1252
1269
  --gl-action-selected-foreground-color-active: var(--gl-action-selected-foreground-color-focus); /** Used for the foreground of a selected action in the active state. */
1253
1270
  --gl-action-strong-confirm-foreground-color-active: var(--gl-action-strong-confirm-foreground-color-focus); /** Used for the foreground of a strong confirm action in the active state. */
1254
1271
  --gl-action-strong-confirm-border-color-active: var(--gl-action-strong-confirm-border-color-focus); /** Used for the border of a strong confirm action in the active state. */
1255
1272
  --gl-action-strong-neutral-border-color-active: var(--gl-action-strong-neutral-border-color-focus); /** Used for the border of a strong neutral action in the active state. */
1256
- --gl-toggle-switch-track-color-unchecked-active: var(--gl-toggle-switch-track-color-unchecked-focus); /** Used for the track color of an unchecked toggle switch in the active state. */
1257
- --gl-toggle-switch-background-color-checked-active: var(--gl-action-strong-confirm-foreground-color-active); /** Used for the background color of the checked toggle switch thumb in the active state. */
1273
+ --gl-toggle-switch-background-color-checked-active: var(--gl-action-selected-foreground-color-active); /** Used for the background color of the checked toggle switch thumb in the active state. */
1274
+ --gl-toggle-switch-icon-color-unchecked-active: var(--gl-action-selected-foreground-color-active); /** Used for the icon color of an unchecked toggle switch in the active state. */
1258
1275
  }