@slotted/styles 0.1.0-beta.3 → 0.1.0-beta.31

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.
Files changed (205) hide show
  1. package/package.json +13 -1
  2. package/src/accordion/accordion.css +11 -11
  3. package/src/action-bar/action-bar.css +47 -44
  4. package/src/action-bar/action-bar.tokens.json +1 -0
  5. package/src/action-sheet/action-sheet.css +39 -39
  6. package/src/alert/alert.css +97 -97
  7. package/src/alert/alert.tokens.json +6 -1
  8. package/src/app-shell/app-shell.css +456 -329
  9. package/src/app-shell/app-shell.tokens.json +6 -3
  10. package/src/aspect-ratio/aspect-ratio.css +9 -9
  11. package/src/attachment/attachment.css +118 -114
  12. package/src/avatar/avatar.css +96 -66
  13. package/src/avatar/avatar.tokens.json +7 -0
  14. package/src/avatar-group/avatar-group.css +22 -23
  15. package/src/badge/badge.css +54 -46
  16. package/src/badge/badge.tokens.json +5 -0
  17. package/src/breadcrumb/breadcrumb.css +52 -52
  18. package/src/button/button.css +137 -89
  19. package/src/button/button.tokens.json +5 -0
  20. package/src/button-group/button-group.css +80 -79
  21. package/src/button-group/button-group.tokens.json +1 -0
  22. package/src/calendar/calendar.css +139 -109
  23. package/src/calendar/calendar.tokens.json +5 -1
  24. package/src/card/card.css +70 -67
  25. package/src/card/card.tokens.json +1 -0
  26. package/src/carousel/carousel.css +158 -169
  27. package/src/cascader/cascader.css +161 -159
  28. package/src/cascader/cascader.tokens.json +2 -0
  29. package/src/chart/chart.css +288 -267
  30. package/src/chart/chart.tokens.json +4 -0
  31. package/src/checkbox/checkbox.css +143 -148
  32. package/src/checkbox-group/checkbox-group.css +7 -7
  33. package/src/code-block/code-block.css +85 -89
  34. package/src/collapsible/collapsible.css +81 -80
  35. package/src/collapsible/collapsible.tokens.json +1 -0
  36. package/src/color-picker/color-picker.css +106 -114
  37. package/src/column-manager/column-manager.css +111 -119
  38. package/src/combobox/combobox.css +206 -132
  39. package/src/combobox/combobox.tokens.json +4 -0
  40. package/src/command-palette/command-palette.css +155 -102
  41. package/src/command-palette/command-palette.tokens.json +2 -0
  42. package/src/container/container.css +27 -27
  43. package/src/context-menu/context-menu.css +9 -9
  44. package/src/currency-field/currency-field.css +119 -119
  45. package/src/currency-field/currency-field.tokens.json +1 -0
  46. package/src/dashboard-grid/dashboard-grid.css +204 -115
  47. package/src/data-grid/data-grid.css +598 -496
  48. package/src/data-grid/data-grid.tokens.json +5 -1
  49. package/src/data-list/data-list.css +82 -71
  50. package/src/data-list/data-list.tokens.json +2 -1
  51. package/src/date-field/date-field.css +62 -57
  52. package/src/date-field/date-field.tokens.json +1 -0
  53. package/src/date-picker/date-picker.css +117 -58
  54. package/src/date-picker/date-picker.tokens.json +5 -0
  55. package/src/date-range-picker/date-range-picker.css +157 -127
  56. package/src/date-range-picker/date-range-picker.tokens.json +4 -0
  57. package/src/datetime-field/datetime-field.css +90 -90
  58. package/src/datetime-field/datetime-field.tokens.json +1 -0
  59. package/src/datetime-picker/datetime-picker.css +123 -70
  60. package/src/datetime-picker/datetime-picker.tokens.json +4 -1
  61. package/src/datetime-range-picker/datetime-range-picker.css +191 -163
  62. package/src/datetime-range-picker/datetime-range-picker.tokens.json +4 -0
  63. package/src/description-list/description-list.css +105 -75
  64. package/src/description-list/description-list.tokens.json +1 -0
  65. package/src/detail-panel/detail-panel.css +86 -71
  66. package/src/detail-panel/detail-panel.tokens.json +2 -0
  67. package/src/dialog/dialog.css +435 -199
  68. package/src/dialog/dialog.tokens.json +9 -0
  69. package/src/divider/divider.css +20 -20
  70. package/src/drawer/drawer.css +598 -237
  71. package/src/drawer/drawer.tokens.json +14 -0
  72. package/src/entity-picker/entity-picker.css +326 -272
  73. package/src/entity-picker/entity-picker.tokens.json +4 -0
  74. package/src/event-calendar/event-calendar.css +357 -399
  75. package/src/field/field.css +106 -93
  76. package/src/field/field.tokens.json +2 -0
  77. package/src/field-group/field-group.css +43 -33
  78. package/src/field-group/field-group.tokens.json +3 -0
  79. package/src/filter-bar/filter-bar.css +200 -216
  80. package/src/form/form.css +100 -26
  81. package/src/form/form.tokens.json +6 -1
  82. package/src/fullscreen/fullscreen.css +26 -27
  83. package/src/grid/grid.css +29 -29
  84. package/src/highlight/highlight.css +11 -11
  85. package/src/hover-card/hover-card.css +9 -9
  86. package/src/icon/icon.css +67 -20
  87. package/src/icon/icon.tokens.json +1 -0
  88. package/src/image/image.css +42 -42
  89. package/src/import-export-center/import-export-center.css +147 -168
  90. package/src/import-export-center/import-export-center.tokens.json +1 -0
  91. package/src/inline/inline.css +28 -28
  92. package/src/inline-message/inline-message.css +162 -86
  93. package/src/inline-message/inline-message.tokens.json +4 -0
  94. package/src/kbd/kbd.css +62 -50
  95. package/src/kbd/kbd.tokens.json +3 -0
  96. package/src/link/link.css +54 -33
  97. package/src/link/link.tokens.json +4 -0
  98. package/src/list/list.css +23 -23
  99. package/src/list-item/list-item.css +89 -75
  100. package/src/list-item/list-item.tokens.json +7 -0
  101. package/src/listbox/listbox.css +71 -70
  102. package/src/listbox/listbox.tokens.json +0 -1
  103. package/src/loading-overlay/loading-overlay.css +86 -103
  104. package/src/markdown/markdown.css +20 -20
  105. package/src/media-viewer/media-viewer.css +790 -0
  106. package/src/media-viewer/media-viewer.tokens.json +53 -0
  107. package/src/menu/menu.css +166 -83
  108. package/src/menu/menu.tokens.json +3 -1
  109. package/src/menubar/menubar.css +16 -16
  110. package/src/message/message.css +1253 -1246
  111. package/src/message/message.tokens.json +5 -0
  112. package/src/message-scroller/message-scroller.css +323 -320
  113. package/src/multi-select/multi-select.css +233 -174
  114. package/src/multi-select/multi-select.tokens.json +3 -0
  115. package/src/navigation-menu/navigation-menu.css +170 -191
  116. package/src/navigation-menu/navigation-menu.tokens.json +1 -0
  117. package/src/notification-center/notification-center.css +155 -163
  118. package/src/notification-center/notification-center.tokens.json +4 -0
  119. package/src/number-field/number-field.css +93 -93
  120. package/src/number-field/number-field.tokens.json +1 -0
  121. package/src/otp-input/otp-input.css +74 -64
  122. package/src/otp-input/otp-input.tokens.json +1 -0
  123. package/src/page/page.css +41 -27
  124. package/src/page/page.tokens.json +1 -0
  125. package/src/page-header/page-header.css +342 -287
  126. package/src/page-header/page-header.tokens.json +6 -1
  127. package/src/pagination/pagination.css +75 -79
  128. package/src/popover/popover.css +85 -65
  129. package/src/popover/popover.tokens.json +2 -0
  130. package/src/progress-indicator/progress-indicator.css +192 -136
  131. package/src/progress-indicator/progress-indicator.tokens.json +1 -0
  132. package/src/prompt-composer/prompt-composer.css +260 -113
  133. package/src/prompt-composer/prompt-composer.tokens.json +15 -0
  134. package/src/prose/prose.css +77 -82
  135. package/src/radio-group/radio-group.css +107 -112
  136. package/src/rating/rating.css +146 -142
  137. package/src/rating/rating.tokens.json +1 -0
  138. package/src/result-state/result-state.css +95 -102
  139. package/src/result-state/result-state.tokens.json +1 -0
  140. package/src/runtime-properties.mjs +19 -6
  141. package/src/saved-views/saved-views.css +43 -49
  142. package/src/scroll-area/scroll-area.css +50 -37
  143. package/src/section/section.css +179 -44
  144. package/src/section/section.tokens.json +9 -3
  145. package/src/segmented-control/segmented-control.css +210 -133
  146. package/src/segmented-control/segmented-control.tokens.json +7 -11
  147. package/src/select/select.css +213 -149
  148. package/src/select/select.tokens.json +4 -0
  149. package/src/side-navigation/side-navigation.css +201 -198
  150. package/src/side-navigation/side-navigation.tokens.json +1 -0
  151. package/src/skeleton/skeleton.css +57 -58
  152. package/src/slider/slider.css +101 -103
  153. package/src/sparkline/sparkline.css +75 -53
  154. package/src/sparkline/sparkline.tokens.json +2 -0
  155. package/src/spinner/spinner.css +83 -180
  156. package/src/spinner/spinner.tokens.json +0 -1
  157. package/src/split-button/split-button.css +34 -35
  158. package/src/split-button/split-button.tokens.json +1 -0
  159. package/src/splitter/splitter.css +47 -48
  160. package/src/stack/stack.css +25 -25
  161. package/src/stat-card/stat-card.css +415 -245
  162. package/src/stat-card/stat-card.tokens.json +8 -0
  163. package/src/status-indicator/status-indicator.css +124 -100
  164. package/src/status-indicator/status-indicator.tokens.json +0 -3
  165. package/src/stepper/stepper.css +78 -82
  166. package/src/switch/switch.css +100 -106
  167. package/src/table/table.css +270 -198
  168. package/src/table/table.tokens.json +2 -0
  169. package/src/table-of-contents/table-of-contents.css +60 -59
  170. package/src/table-of-contents/table-of-contents.tokens.json +1 -0
  171. package/src/tabs/tabs.css +327 -294
  172. package/src/tabs/tabs.tokens.json +7 -1
  173. package/src/tag/tag.css +109 -88
  174. package/src/tag/tag.tokens.json +10 -0
  175. package/src/tags-input/tags-input.css +152 -87
  176. package/src/tags-input/tags-input.tokens.json +7 -1
  177. package/src/text-field/text-field.css +146 -148
  178. package/src/text-field/text-field.tokens.json +1 -0
  179. package/src/textarea/textarea.css +38 -33
  180. package/src/textarea/textarea.tokens.json +1 -0
  181. package/src/time-field/time-field.css +82 -77
  182. package/src/time-field/time-field.tokens.json +1 -0
  183. package/src/time-picker/time-picker.css +116 -64
  184. package/src/time-picker/time-picker.tokens.json +4 -1
  185. package/src/time-range-picker/time-range-picker.css +168 -140
  186. package/src/time-range-picker/time-range-picker.tokens.json +4 -0
  187. package/src/timeline/timeline.css +280 -292
  188. package/src/timeline/timeline.tokens.json +5 -0
  189. package/src/toast/toast.css +139 -122
  190. package/src/toast/toast.tokens.json +7 -0
  191. package/src/toggle/toggle.css +34 -38
  192. package/src/toggle-group/toggle-group.css +73 -77
  193. package/src/toolbar/toolbar.css +33 -38
  194. package/src/tooltip/tooltip.css +65 -39
  195. package/src/tooltip/tooltip.tokens.json +1 -0
  196. package/src/top-navigation/top-navigation.css +252 -268
  197. package/src/tour/tour.css +68 -74
  198. package/src/tour/tour.tokens.json +1 -0
  199. package/src/transfer/transfer.css +164 -168
  200. package/src/tree/tree.css +113 -121
  201. package/src/typography/typography.css +42 -38
  202. package/src/typography/typography.tokens.json +1 -0
  203. package/src/upload/upload.css +256 -257
  204. package/src/visually-hidden/visually-hidden.css +1 -1
  205. package/src/wizard/wizard.css +187 -199
@@ -21,7 +21,7 @@
21
21
  * the binding mirrors, because a control can be disabled by something that
22
22
  * never told it so.
23
23
  */
24
- [data-ui='switch'][data-part='root'] {
24
+ [data-ui-switch][data-part-root] {
25
25
  /**
26
26
  * The thumb is the control glyph, which is the scale the theme restates
27
27
  * per density — so a switch in a dense table shrinks whole rather than in
@@ -43,7 +43,7 @@
43
43
  --_line-height: var(--slotted-switch-line-height, var(--slotted-line-height-md, 1.5));
44
44
  /**
45
45
  * The height the label's line is missing before it is as tall as the pill,
46
- * split above and below its text, so the text reads centred on the pill
46
+ * split above and below its text, so the text reads centerd on the pill
47
47
  * rather than sitting at the top of a row the pill made.
48
48
  *
49
49
  * It was the height a one-line label was missing before it was a WCAG 2.2
@@ -98,7 +98,7 @@
98
98
  * its pill and its label and never of its target (SW2). The overhang is on
99
99
  * a transparent box, so nothing about it is visible.
100
100
  */
101
- [data-ui='switch'] > [data-part='control'] {
101
+ [data-ui-switch] > [data-part-control] {
102
102
  align-self: start;
103
103
  appearance: none;
104
104
  background-color: transparent;
@@ -136,10 +136,10 @@
136
136
  /**
137
137
  * The track. It carries the ground, the edge and the ring, and it is the
138
138
  * containing block the thumb travels inside. It is lifted onto the label's
139
- * first line rather than centred on the label, because `align-items: center`
139
+ * first line rather than centerd on the label, because `align-items: center`
140
140
  * on a label that wraps to three lines puts the pill beside the second one.
141
141
  */
142
- [data-ui='switch'] > [data-part='track'] {
142
+ [data-ui-switch] > [data-part-track] {
143
143
  background-color: var(
144
144
  --slotted-switch-track-background,
145
145
  var(--slotted-tone-secondary-solid, ButtonFace)
@@ -169,8 +169,8 @@
169
169
  * right-to-left document mirrors the movement with no direction-specific
170
170
  * rule at all — the axis is the writing direction's, not the screen's.
171
171
  */
172
- [data-ui='switch'] > [data-part='track'] > [data-part='thumb'] {
173
- /* A flex box, so the mark's icon is centred in the knob as a box and not
172
+ [data-ui-switch] > [data-part-track] > [data-part-thumb] {
173
+ /* A flex box, so the mark's icon is centerd in the knob as a box and not
174
174
  set on a line of text. */
175
175
  align-items: center;
176
176
  /**
@@ -184,8 +184,8 @@
184
184
  background-color: var(--slotted-switch-thumb-background, var(--slotted-tone-accent-on-solid));
185
185
  /**
186
186
  * The thumb keeps an edge in every state. A thumb separated from its track
187
- * by colour alone disappears in the `high-contrast` scheme, where the
188
- * unchecked track is white, and under forced colours, where it is Canvas.
187
+ * by color alone disappears in the `high-contrast` scheme, where the
188
+ * unchecked track is white, and under forced colors, where it is Canvas.
189
189
  */
190
190
  border: var(--_border) solid
191
191
  var(--slotted-switch-thumb-border-color, var(--slotted-control-border-color, ButtonBorder));
@@ -196,7 +196,7 @@
196
196
  * that is meant to look raised. It is barely visible on purpose: on a
197
197
  * light unchecked track the knob and the ground are two steps apart, and
198
198
  * without it the knob rests on its own hairline border alone. The theme
199
- * withdraws it in `high-contrast` and under forced colours, where the
199
+ * withdraws it in `high-contrast` and under forced colors, where the
200
200
  * border is doing the work instead.
201
201
  */
202
202
  box-shadow: var(--slotted-switch-thumb-shadow, var(--slotted-control-shadow, none));
@@ -218,7 +218,7 @@
218
218
 
219
219
  /**
220
220
  * The mark. `docs/component-features.md` asks for the state to be
221
- * perceptible beyond colour *and* beyond position, and this is what supplies
221
+ * perceptible beyond color *and* beyond position, and this is what supplies
222
222
  * it: the check the binding renders in the knob as the `Glyph` element,
223
223
  * never a character. `indicator="none"` is the binding rendering none.
224
224
  *
@@ -226,7 +226,7 @@
226
226
  * changing rather than two marks swapping places. Off is the absence of the
227
227
  * mark, which is the same statement a checkbox makes.
228
228
  */
229
- [data-ui='switch'] > [data-part='track'] > [data-part='thumb'] > [data-ui='icon'] {
229
+ [data-ui-switch] > [data-part-track] > [data-part-thumb] > [data-ui-icon] {
230
230
  /**
231
231
  * Seventy per cent of the knob rather than all of it. The glyph is drawn
232
232
  * on a 24-unit grid with a 3-unit stroke, so filling the knob the check
@@ -249,9 +249,9 @@
249
249
  * at the tighter densities, and what makes up the difference is the control
250
250
  * stretched over the pill, which is a transparent box with a minimum of its
251
251
  * own — the correction `docs/token-foundation.md` asks the family for. The
252
- * padding here is optical: it centres the words on the pill.
252
+ * padding here is optical: it centers the words on the pill.
253
253
  */
254
- [data-ui='switch'] > [data-part='label'] {
254
+ [data-ui-switch] > [data-part-label] {
255
255
  cursor: pointer;
256
256
  grid-column: 2;
257
257
  grid-row: 1;
@@ -271,18 +271,18 @@
271
271
  * back as a negative margin, as it gives back its block overhang, so the row
272
272
  * is no wider and a press between the pill and the words still lands on it.
273
273
  */
274
- [data-ui='switch'][data-part='root']:has(> [data-part='label']) {
274
+ [data-ui-switch][data-part-root]:has(> [data-part-label]) {
275
275
  column-gap: var(--_gap);
276
276
  }
277
277
 
278
278
  /* Beside the pill, the label is as wide as its words: stretched across the
279
279
  column, a label in Arabic in a row in Portuguese aligned its text to its
280
280
  own start and set it at the far end of the row, away from the pill. */
281
- [data-ui='switch'] > [data-part='label'] {
281
+ [data-ui-switch] > [data-part-label] {
282
282
  justify-self: start;
283
283
  }
284
284
 
285
- [data-ui='switch'][data-part='root']:has(> [data-part='label']) > [data-part='control'] {
285
+ [data-ui-switch][data-part-root]:has(> [data-part-label]) > [data-part-control] {
286
286
  inline-size: calc(var(--_track-inline) + var(--_gap));
287
287
  margin-inline-end: calc(-1 * var(--_gap));
288
288
  }
@@ -292,7 +292,7 @@
292
292
  * label: inside, it would join the accessible name, and a paragraph of help
293
293
  * text that toggles a setting when it is clicked is a paragraph nobody reads.
294
294
  */
295
- [data-ui='switch'] > [data-part='description'] {
295
+ [data-ui-switch] > [data-part-description] {
296
296
  color: var(--slotted-switch-description-color, var(--slotted-text-muted, GrayText));
297
297
  font-size: var(--slotted-switch-description-font-size, var(--slotted-font-size-xs, 0.75rem));
298
298
  grid-column: 2;
@@ -312,7 +312,7 @@
312
312
  * directions.
313
313
  */
314
314
 
315
- [data-ui='switch'][data-part='root'][data-label-placement='start'] {
315
+ [data-ui-switch][data-part-root][data-label-placement='start'] {
316
316
  /**
317
317
  * `1fr` and not `max-content`, for the reason `checkbox` records: sizing
318
318
  * the first column from each row's own label ends a list with the controls
@@ -321,24 +321,24 @@
321
321
  grid-template-columns: minmax(0, 1fr) auto;
322
322
  }
323
323
 
324
- [data-ui='switch'][data-part='root'][data-label-placement='start'] > [data-part='control'],
325
- [data-ui='switch'][data-part='root'][data-label-placement='start'] > [data-part='track'] {
324
+ [data-ui-switch][data-part-root][data-label-placement='start'] > [data-part-control],
325
+ [data-ui-switch][data-part-root][data-label-placement='start'] > [data-part-track] {
326
326
  grid-area: 1 / 2;
327
327
  }
328
328
 
329
- [data-ui='switch'][data-part='root'][data-label-placement='start'] > [data-part='label'],
330
- [data-ui='switch'][data-part='root'][data-label-placement='start'] > [data-part='description'] {
329
+ [data-ui-switch][data-part-root][data-label-placement='start'] > [data-part-label],
330
+ [data-ui-switch][data-part-root][data-label-placement='start'] > [data-part-description] {
331
331
  grid-column: 1;
332
332
  }
333
333
 
334
334
  /* Before the pill, the label takes the row, so the row is the settings row. */
335
- [data-ui='switch'][data-part='root'][data-label-placement='start'] > [data-part='label'] {
335
+ [data-ui-switch][data-part-root][data-label-placement='start'] > [data-part-label] {
336
336
  justify-self: stretch;
337
337
  }
338
338
 
339
339
  /* The control reaches across the gap towards the label, now on its start side. */
340
- [data-ui='switch'][data-part='root'][data-label-placement='start']:has(> [data-part='label'])
341
- > [data-part='control'] {
340
+ [data-ui-switch][data-part-root][data-label-placement='start']:has(> [data-part-label])
341
+ > [data-part-control] {
342
342
  margin-inline-end: 0;
343
343
  margin-inline-start: calc(-1 * var(--_gap));
344
344
  }
@@ -350,19 +350,19 @@
350
350
  * an `md` control is a field and a control disagreeing about one row.
351
351
  */
352
352
 
353
- [data-ui='switch'][data-part='root'][data-size='sm'] {
353
+ [data-ui-switch][data-part-root][data-size='sm'] {
354
354
  --_thumb-size: var(--slotted-control-icon-size-sm, 14px);
355
355
  --_font-size: var(--slotted-control-font-size-sm, 12px);
356
356
  --_gap: var(--slotted-control-label-gap-sm, 8px);
357
357
  }
358
358
 
359
- [data-ui='switch'][data-part='root'][data-size='md'] {
359
+ [data-ui-switch][data-part-root][data-size='md'] {
360
360
  --_thumb-size: var(--slotted-control-icon-size-md, 16px);
361
361
  --_font-size: var(--slotted-control-font-size-md, 13px);
362
362
  --_gap: var(--slotted-control-label-gap-md, 12px);
363
363
  }
364
364
 
365
- [data-ui='switch'][data-part='root'][data-size='lg'] {
365
+ [data-ui-switch][data-part-root][data-size='lg'] {
366
366
  --_thumb-size: var(--slotted-control-icon-size-lg, 18px);
367
367
  --_font-size: var(--slotted-control-font-size-lg, 14px);
368
368
  --_gap: var(--slotted-control-label-gap-lg, 12px);
@@ -379,8 +379,8 @@
379
379
  * and the deleted `input` family shipped that defect once already.
380
380
  */
381
381
 
382
- [data-ui='switch'][data-part='root']:is([data-checked], :has(> [data-part='control']:checked))
383
- > [data-part='track'] {
382
+ [data-ui-switch][data-part-root]:is([data-checked], :has(> [data-part-control]:checked))
383
+ > [data-part-track] {
384
384
  background-color: var(
385
385
  --slotted-switch-checked-background,
386
386
  var(--slotted-tone-accent-solid, Highlight)
@@ -391,9 +391,9 @@
391
391
  );
392
392
  }
393
393
 
394
- [data-ui='switch'][data-part='root']:is([data-checked], :has(> [data-part='control']:checked))
395
- > [data-part='track']
396
- > [data-part='thumb'] {
394
+ [data-ui-switch][data-part-root]:is([data-checked], :has(> [data-part-control]:checked))
395
+ > [data-part-track]
396
+ > [data-part-thumb] {
397
397
  border-color: var(
398
398
  --slotted-switch-checked-thumb-border-color,
399
399
  var(--slotted-tone-accent-solid, Highlight)
@@ -401,13 +401,12 @@
401
401
  inset-inline-start: calc(var(--_gutter) + var(--_travel));
402
402
  }
403
403
 
404
- [data-ui='switch'][data-part='root']:is(
405
- [data-checked],
406
- :has(> [data-part='control']:checked)
407
- ):not([data-loading])
408
- > [data-part='track']
409
- > [data-part='thumb']
410
- > [data-ui='icon'] {
404
+ [data-ui-switch][data-part-root]:is([data-checked], :has(> [data-part-control]:checked)):not(
405
+ [data-loading]
406
+ )
407
+ > [data-part-track]
408
+ > [data-part-thumb]
409
+ > [data-ui-icon] {
411
410
  opacity: 1;
412
411
  }
413
412
 
@@ -417,23 +416,23 @@
417
416
  * competes with it. Both are held back for disabled, loading and read-only,
418
417
  * and both are written before `invalid`, which outranks them.
419
418
  */
420
- [data-ui='switch'][data-part='root']:hover:not([data-disabled]):not([data-loading]):not(
419
+ [data-ui-switch][data-part-root]:hover:not([data-disabled]):not([data-loading]):not(
421
420
  [data-readonly]
422
- ):not(:has(> [data-part='control']:disabled))
423
- > [data-part='track'] {
421
+ ):not(:has(> [data-part-control]:disabled))
422
+ > [data-part-track] {
424
423
  background-color: var(
425
424
  --slotted-switch-hover-background,
426
425
  var(--slotted-tone-secondary-solid-hover, ButtonFace)
427
426
  );
428
427
  }
429
428
 
430
- [data-ui='switch'][data-part='root']:is(
429
+ [data-ui-switch][data-part-root]:is(
431
430
  [data-checked],
432
- :has(> [data-part='control']:checked)
431
+ :has(> [data-part-control]:checked)
433
432
  ):hover:not([data-disabled]):not([data-loading]):not([data-readonly]):not(
434
- :has(> [data-part='control']:disabled)
433
+ :has(> [data-part-control]:disabled)
435
434
  )
436
- > [data-part='track'] {
435
+ > [data-part-track] {
437
436
  background-color: var(
438
437
  --slotted-switch-checked-hover-background,
439
438
  var(--slotted-tone-accent-solid-hover, Highlight)
@@ -444,23 +443,23 @@
444
443
  );
445
444
  }
446
445
 
447
- [data-ui='switch'][data-part='root']:active:not([data-disabled]):not([data-loading]):not(
446
+ [data-ui-switch][data-part-root]:active:not([data-disabled]):not([data-loading]):not(
448
447
  [data-readonly]
449
- ):not(:has(> [data-part='control']:disabled))
450
- > [data-part='track'] {
448
+ ):not(:has(> [data-part-control]:disabled))
449
+ > [data-part-track] {
451
450
  background-color: var(
452
451
  --slotted-switch-active-background,
453
452
  var(--slotted-tone-secondary-solid-active, ButtonFace)
454
453
  );
455
454
  }
456
455
 
457
- [data-ui='switch'][data-part='root']:is(
456
+ [data-ui-switch][data-part-root]:is(
458
457
  [data-checked],
459
- :has(> [data-part='control']:checked)
458
+ :has(> [data-part-control]:checked)
460
459
  ):active:not([data-disabled]):not([data-loading]):not([data-readonly]):not(
461
- :has(> [data-part='control']:disabled)
460
+ :has(> [data-part-control]:disabled)
462
461
  )
463
- > [data-part='track'] {
462
+ > [data-part-track] {
464
463
  background-color: var(
465
464
  --slotted-switch-checked-active-background,
466
465
  var(--slotted-tone-accent-solid-active, Highlight)
@@ -477,8 +476,7 @@
477
476
  * offset keeps the ring off the pill's own edge, which is what makes a
478
477
  * focused unchecked switch legible against a sunken surface.
479
478
  */
480
- [data-ui='switch'][data-part='root']:has(> [data-part='control']:focus-visible)
481
- > [data-part='track'] {
479
+ [data-ui-switch][data-part-root]:has(> [data-part-control]:focus-visible) > [data-part-track] {
482
480
  outline: var(--slotted-focus-ring-width, 2px) solid var(--slotted-focus-ring-color, Highlight);
483
481
  outline-offset: var(--slotted-focus-ring-offset, 2px);
484
482
  }
@@ -486,14 +484,14 @@
486
484
  /**
487
485
  * Read-only stays focusable, announced and submitted, and it must not be
488
486
  * mistakable for disabled. The pill goes hollow rather than grey: the state
489
- * keeps its own colour in the mark, and the ground stops saying "press me".
487
+ * keeps its own color in the mark, and the ground stops saying "press me".
490
488
  */
491
- [data-ui='switch'][data-part='root'][data-readonly] > [data-part='track'] {
489
+ [data-ui-switch][data-part-root][data-readonly] > [data-part-track] {
492
490
  background-color: var(--slotted-switch-readonly-background, var(--slotted-surface, Canvas));
493
491
  }
494
492
 
495
- [data-ui='switch'][data-part='root'][data-readonly] > [data-part='control'],
496
- [data-ui='switch'][data-part='root'][data-readonly] > [data-part='label'] {
493
+ [data-ui-switch][data-part-root][data-readonly] > [data-part-control],
494
+ [data-ui-switch][data-part-root][data-readonly] > [data-part-label] {
497
495
  cursor: default;
498
496
  }
499
497
 
@@ -506,11 +504,11 @@
506
504
  * two pixels apart, and neither could be told from the other. The state is
507
505
  * carried where it always is — the thumb's position, and the mark on it.
508
506
  */
509
- [data-ui='switch'][data-part='root'][data-readonly]:is(
507
+ [data-ui-switch][data-part-root][data-readonly]:is(
510
508
  [data-checked],
511
- :has(> [data-part='control']:checked)
509
+ :has(> [data-part-control]:checked)
512
510
  )
513
- > [data-part='track'] {
511
+ > [data-part-track] {
514
512
  background-color: var(--slotted-switch-readonly-background, var(--slotted-surface, Canvas));
515
513
  border-color: var(
516
514
  --slotted-switch-readonly-border-color,
@@ -518,12 +516,12 @@
518
516
  );
519
517
  }
520
518
 
521
- [data-ui='switch'][data-part='root'][data-readonly]:is(
519
+ [data-ui-switch][data-part-root][data-readonly]:is(
522
520
  [data-checked],
523
- :has(> [data-part='control']:checked)
521
+ :has(> [data-part-control]:checked)
524
522
  )
525
- > [data-part='track']
526
- > [data-part='thumb'] {
523
+ > [data-part-track]
524
+ > [data-part-thumb] {
527
525
  border-color: var(
528
526
  --slotted-switch-readonly-border-color,
529
527
  var(--slotted-control-border-color, ButtonBorder)
@@ -537,21 +535,21 @@
537
535
  *
538
536
  * The ring is retargeted rather than repainted. Every rule that draws focus
539
537
  * reads `--slotted-focus-ring-color`, so pointing that one name at the
540
- * invalid colour on the root moves the ring without restating it — the rule
538
+ * invalid color on the root moves the ring without restating it — the rule
541
539
  * `text-field` wrote for this family to inherit.
542
540
  */
543
- [data-ui='switch'][data-part='root'][data-invalid] {
541
+ [data-ui-switch][data-part-root][data-invalid] {
544
542
  --slotted-focus-ring-color: var(
545
543
  --slotted-switch-invalid-focus-ring-color,
546
544
  var(--slotted-focus-ring-color-invalid, Highlight)
547
545
  );
548
546
  }
549
547
 
550
- [data-ui='switch'][data-part='root'][data-invalid] > [data-part='track'],
551
- [data-ui='switch'][data-part='root'][data-invalid] > [data-part='track'] > [data-part='thumb'] {
548
+ [data-ui-switch][data-part-root][data-invalid] > [data-part-track],
549
+ [data-ui-switch][data-part-root][data-invalid] > [data-part-track] > [data-part-thumb] {
552
550
  border-color: var(--slotted-switch-invalid-border-color, var(--slotted-tone-danger-border));
553
551
  /*
554
- * Width as well as colour (WCAG 1.4.1), the edge `text-field` draws: in
552
+ * Width as well as color (WCAG 1.4.1), the edge `text-field` draws: in
555
553
  * `high-contrast` the danger border is the resting edge's black. An edge
556
554
  * inside the border of the track and of the thumb, so neither moves, in
557
555
  * place of the thumb's resting lift; the thumb carries it where a checked
@@ -572,14 +570,14 @@
572
570
  * moves the row under the pointer. The mark gives way to the arc, which is
573
571
  * the one thing in the family that says the value is not settled yet.
574
572
  */
575
- [data-ui='switch'][data-part='root'][data-loading] > [data-part='control'] {
573
+ [data-ui-switch][data-part-root][data-loading] > [data-part-control] {
576
574
  cursor: progress;
577
575
  }
578
576
 
579
- [data-ui='switch'][data-part='root'][data-loading]
580
- > [data-part='track']
581
- > [data-part='thumb']
582
- > [data-ui='icon'] {
577
+ [data-ui-switch][data-part-root][data-loading]
578
+ > [data-part-track]
579
+ > [data-part-thumb]
580
+ > [data-ui-icon] {
583
581
  opacity: 0;
584
582
  }
585
583
 
@@ -589,13 +587,11 @@
589
587
  * the border already draws. `progress-indicator` is wave 2 and not built;
590
588
  * when it is, this is the first thing it should replace.
591
589
  *
592
- * Three quarters rather than one. A single coloured side read as a shape
590
+ * Three quarters rather than one. A single colored side read as a shape
593
591
  * rather than as a spinner in a still image, and a still image is what a
594
592
  * reader under `prefers-reduced-motion` is looking at.
595
593
  */
596
- [data-ui='switch'][data-part='root'][data-loading]
597
- > [data-part='track']
598
- > [data-part='thumb']::after {
594
+ [data-ui-switch][data-part-root][data-loading] > [data-part-track] > [data-part-thumb]::after {
599
595
  animation: slotted-switch-pending var(--slotted-duration-loop) linear infinite;
600
596
  border: var(--slotted-border-width-thin, 1px) solid
601
597
  var(--slotted-switch-pending-color, var(--slotted-tone-accent-solid));
@@ -622,9 +618,7 @@
622
618
  * without anything moving.
623
619
  */
624
620
  @media (prefers-reduced-motion: reduce) {
625
- [data-ui='switch'][data-part='root'][data-loading]
626
- > [data-part='track']
627
- > [data-part='thumb']::after {
621
+ [data-ui-switch][data-part-root][data-loading] > [data-part-track] > [data-part-thumb]::after {
628
622
  animation: none;
629
623
  }
630
624
  }
@@ -636,15 +630,15 @@
636
630
  * so — and left to the attribute alone it would look fully operable and
637
631
  * answer nothing.
638
632
  */
639
- [data-ui='switch'][data-part='root']:is([data-disabled], :has(> [data-part='control']:disabled))
640
- > [data-part='control'],
641
- [data-ui='switch'][data-part='root']:is([data-disabled], :has(> [data-part='control']:disabled))
642
- > [data-part='label'] {
633
+ [data-ui-switch][data-part-root]:is([data-disabled], :has(> [data-part-control]:disabled))
634
+ > [data-part-control],
635
+ [data-ui-switch][data-part-root]:is([data-disabled], :has(> [data-part-control]:disabled))
636
+ > [data-part-label] {
643
637
  cursor: not-allowed;
644
638
  }
645
639
 
646
- [data-ui='switch'][data-part='root']:is([data-disabled], :has(> [data-part='control']:disabled))
647
- > [data-part='track'] {
640
+ [data-ui-switch][data-part-root]:is([data-disabled], :has(> [data-part-control]:disabled))
641
+ > [data-part-track] {
648
642
  background-color: var(
649
643
  --slotted-switch-disabled-background,
650
644
  var(--slotted-disabled-background, ButtonFace)
@@ -653,13 +647,13 @@
653
647
  }
654
648
 
655
649
  /**
656
- * Muted to the colour the theme measures rather than faded by opacity: a
650
+ * Muted to the color the theme measures rather than faded by opacity: a
657
651
  * setting nobody can read is a setting nobody can check, and a disabled form
658
652
  * still has to say what it holds.
659
653
  */
660
- [data-ui='switch'][data-part='root']:is([data-disabled], :has(> [data-part='control']:disabled))
661
- > [data-part='track']
662
- > [data-part='thumb'] {
654
+ [data-ui-switch][data-part-root]:is([data-disabled], :has(> [data-part-control]:disabled))
655
+ > [data-part-track]
656
+ > [data-part-thumb] {
663
657
  /**
664
658
  * Grey rather than white. The knob is the brightest thing in the family,
665
659
  * and a bright knob on a grey track reads as a control still waiting to be
@@ -673,29 +667,29 @@
673
667
  box-shadow: none;
674
668
  }
675
669
 
676
- [data-ui='switch'][data-part='root']:is([data-disabled], :has(> [data-part='control']:disabled))
677
- > [data-part='track']
678
- > [data-part='thumb']
679
- > [data-ui='icon'] {
670
+ [data-ui-switch][data-part-root]:is([data-disabled], :has(> [data-part-control]:disabled))
671
+ > [data-part-track]
672
+ > [data-part-thumb]
673
+ > [data-ui-icon] {
680
674
  color: var(--slotted-switch-disabled-mark-color, var(--slotted-disabled-background));
681
675
  }
682
676
 
683
- [data-ui='switch'][data-part='root']:is([data-disabled], :has(> [data-part='control']:disabled))
684
- > [data-part='label'],
685
- [data-ui='switch'][data-part='root']:is([data-disabled], :has(> [data-part='control']:disabled))
686
- > [data-part='description'] {
677
+ [data-ui-switch][data-part-root]:is([data-disabled], :has(> [data-part-control]:disabled))
678
+ > [data-part-label],
679
+ [data-ui-switch][data-part-root]:is([data-disabled], :has(> [data-part-control]:disabled))
680
+ > [data-part-description] {
687
681
  color: var(--slotted-switch-disabled-color, var(--slotted-disabled-foreground, GrayText));
688
682
  }
689
683
 
690
684
  /*
691
- * Forced colours remove every box shadow, and the edge with them. The width
685
+ * Forced colors remove every box shadow, and the edge with them. The width
692
686
  * comes back as an outline inside the border, on the
693
687
  * track and on the thumb; the focus ring takes the track and the thumb keeps
694
688
  * its edge.
695
689
  */
696
690
  @media (forced-colors: active) {
697
- [data-ui='switch'][data-part='root'][data-invalid] > [data-part='track'],
698
- [data-ui='switch'][data-part='root'][data-invalid] > [data-part='track'] > [data-part='thumb'] {
691
+ [data-ui-switch][data-part-root][data-invalid] > [data-part-track],
692
+ [data-ui-switch][data-part-root][data-invalid] > [data-part-track] > [data-part-thumb] {
699
693
  outline: var(--_invalid-edge-width) solid CanvasText;
700
694
  outline-offset: calc(-1 * (var(--_border) + var(--_invalid-edge-width)));
701
695
  }