@slotted/styles 0.1.0-beta.2 → 0.1.0-beta.21

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 (191) hide show
  1. package/package.json +1 -1
  2. package/src/accordion/accordion.css +10 -10
  3. package/src/action-bar/action-bar.css +45 -42
  4. package/src/action-bar/action-bar.tokens.json +1 -0
  5. package/src/action-sheet/action-sheet.css +36 -36
  6. package/src/alert/alert.css +68 -67
  7. package/src/alert/alert.tokens.json +5 -0
  8. package/src/app-shell/app-shell.css +452 -314
  9. package/src/app-shell/app-shell.tokens.json +5 -2
  10. package/src/aspect-ratio/aspect-ratio.css +9 -9
  11. package/src/attachment/attachment.css +91 -99
  12. package/src/avatar/avatar.css +71 -41
  13. package/src/avatar/avatar.tokens.json +7 -0
  14. package/src/avatar-group/avatar-group.css +21 -22
  15. package/src/badge/badge.css +45 -37
  16. package/src/badge/badge.tokens.json +5 -0
  17. package/src/breadcrumb/breadcrumb.css +37 -37
  18. package/src/button/button.css +149 -68
  19. package/src/button/button.tokens.json +10 -0
  20. package/src/button-group/button-group.css +79 -74
  21. package/src/button-group/button-group.tokens.json +2 -0
  22. package/src/calendar/calendar.css +133 -103
  23. package/src/calendar/calendar.tokens.json +5 -1
  24. package/src/card/card.css +54 -61
  25. package/src/carousel/carousel.css +150 -161
  26. package/src/cascader/cascader.css +154 -153
  27. package/src/cascader/cascader.tokens.json +1 -0
  28. package/src/chart/chart.css +258 -248
  29. package/src/chart/chart.tokens.json +1 -0
  30. package/src/checkbox/checkbox.css +119 -124
  31. package/src/checkbox-group/checkbox-group.css +7 -7
  32. package/src/code-block/code-block.css +81 -85
  33. package/src/collapsible/collapsible.css +72 -76
  34. package/src/color-picker/color-picker.css +83 -91
  35. package/src/column-manager/column-manager.css +106 -114
  36. package/src/combobox/combobox.css +157 -124
  37. package/src/combobox/combobox.tokens.json +2 -0
  38. package/src/command-palette/command-palette.css +103 -90
  39. package/src/command-palette/command-palette.tokens.json +1 -0
  40. package/src/container/container.css +24 -24
  41. package/src/context-menu/context-menu.css +8 -8
  42. package/src/currency-field/currency-field.css +212 -88
  43. package/src/currency-field/currency-field.tokens.json +13 -0
  44. package/src/dashboard-grid/dashboard-grid.css +184 -114
  45. package/src/data-grid/data-grid.css +535 -470
  46. package/src/data-grid/data-grid.tokens.json +4 -0
  47. package/src/data-list/data-list.css +81 -70
  48. package/src/data-list/data-list.tokens.json +2 -1
  49. package/src/date-field/date-field.css +57 -52
  50. package/src/date-field/date-field.tokens.json +1 -0
  51. package/src/date-picker/date-picker.css +75 -57
  52. package/src/date-picker/date-picker.tokens.json +1 -0
  53. package/src/date-range-picker/date-range-picker.css +116 -118
  54. package/src/datetime-field/datetime-field.css +80 -80
  55. package/src/datetime-field/datetime-field.tokens.json +1 -0
  56. package/src/datetime-picker/datetime-picker.css +63 -63
  57. package/src/datetime-range-picker/datetime-range-picker.css +151 -156
  58. package/src/description-list/description-list.css +80 -65
  59. package/src/detail-panel/detail-panel.css +86 -71
  60. package/src/detail-panel/detail-panel.tokens.json +2 -0
  61. package/src/dialog/dialog.css +376 -153
  62. package/src/dialog/dialog.tokens.json +6 -0
  63. package/src/divider/divider.css +18 -18
  64. package/src/drawer/drawer.css +513 -217
  65. package/src/drawer/drawer.tokens.json +6 -0
  66. package/src/entity-picker/entity-picker.css +273 -256
  67. package/src/entity-picker/entity-picker.tokens.json +2 -0
  68. package/src/event-calendar/event-calendar.css +343 -385
  69. package/src/field/field.css +74 -78
  70. package/src/field-group/field-group.css +22 -25
  71. package/src/filter-bar/filter-bar.css +193 -209
  72. package/src/form/form.css +34 -24
  73. package/src/form/form.tokens.json +1 -0
  74. package/src/fullscreen/fullscreen.css +24 -25
  75. package/src/grid/grid.css +28 -28
  76. package/src/highlight/highlight.css +6 -6
  77. package/src/hover-card/hover-card.css +6 -6
  78. package/src/icon/icon.css +62 -15
  79. package/src/icon/icon.tokens.json +1 -0
  80. package/src/image/image.css +39 -39
  81. package/src/import-export-center/import-export-center.css +135 -156
  82. package/src/inline/inline.css +27 -27
  83. package/src/inline-message/inline-message.css +153 -77
  84. package/src/inline-message/inline-message.tokens.json +4 -0
  85. package/src/kbd/kbd.css +48 -36
  86. package/src/kbd/kbd.tokens.json +3 -0
  87. package/src/link/link.css +36 -15
  88. package/src/link/link.tokens.json +4 -0
  89. package/src/list/list.css +44 -17
  90. package/src/list/list.tokens.json +4 -0
  91. package/src/list-item/list-item.css +80 -66
  92. package/src/list-item/list-item.tokens.json +7 -0
  93. package/src/listbox/listbox.css +56 -59
  94. package/src/loading-overlay/loading-overlay.css +75 -92
  95. package/src/markdown/markdown.css +17 -17
  96. package/src/menu/menu.css +117 -74
  97. package/src/menu/menu.tokens.json +1 -0
  98. package/src/menubar/menubar.css +13 -13
  99. package/src/message/message.css +192 -202
  100. package/src/message/message.tokens.json +5 -0
  101. package/src/message-scroller/message-scroller.css +41 -42
  102. package/src/multi-select/multi-select.css +177 -160
  103. package/src/multi-select/multi-select.tokens.json +1 -0
  104. package/src/navigation-menu/navigation-menu.css +167 -188
  105. package/src/notification-center/notification-center.css +140 -148
  106. package/src/notification-center/notification-center.tokens.json +3 -0
  107. package/src/number-field/number-field.css +83 -83
  108. package/src/number-field/number-field.tokens.json +1 -0
  109. package/src/otp-input/otp-input.css +67 -57
  110. package/src/otp-input/otp-input.tokens.json +1 -0
  111. package/src/page/page.css +39 -23
  112. package/src/page/page.tokens.json +1 -0
  113. package/src/page-header/page-header.css +339 -284
  114. package/src/page-header/page-header.tokens.json +5 -0
  115. package/src/pagination/pagination.css +68 -72
  116. package/src/popover/popover.css +73 -61
  117. package/src/popover/popover.tokens.json +1 -0
  118. package/src/progress-indicator/progress-indicator.css +169 -113
  119. package/src/progress-indicator/progress-indicator.tokens.json +1 -0
  120. package/src/prompt-composer/prompt-composer.css +251 -104
  121. package/src/prompt-composer/prompt-composer.tokens.json +15 -0
  122. package/src/prose/prose.css +71 -75
  123. package/src/radio-group/radio-group.css +98 -103
  124. package/src/rating/rating.css +136 -132
  125. package/src/rating/rating.tokens.json +1 -0
  126. package/src/result-state/result-state.css +74 -77
  127. package/src/runtime-properties.mjs +2 -0
  128. package/src/saved-views/saved-views.css +41 -47
  129. package/src/scroll-area/scroll-area.css +39 -32
  130. package/src/section/section.css +178 -43
  131. package/src/section/section.tokens.json +8 -2
  132. package/src/segmented-control/segmented-control.css +254 -97
  133. package/src/segmented-control/segmented-control.tokens.json +15 -11
  134. package/src/select/select.css +153 -132
  135. package/src/select/select.tokens.json +2 -0
  136. package/src/side-navigation/side-navigation.css +179 -182
  137. package/src/side-navigation/side-navigation.tokens.json +1 -0
  138. package/src/skeleton/skeleton.css +47 -48
  139. package/src/slider/slider.css +86 -88
  140. package/src/sparkline/sparkline.css +62 -40
  141. package/src/sparkline/sparkline.tokens.json +2 -0
  142. package/src/spinner/spinner.css +83 -180
  143. package/src/spinner/spinner.tokens.json +0 -1
  144. package/src/split-button/split-button.css +30 -31
  145. package/src/split-button/split-button.tokens.json +1 -0
  146. package/src/splitter/splitter.css +35 -35
  147. package/src/stack/stack.css +24 -24
  148. package/src/stat-card/stat-card.css +380 -241
  149. package/src/stat-card/stat-card.tokens.json +5 -0
  150. package/src/status-indicator/status-indicator.css +107 -82
  151. package/src/status-indicator/status-indicator.tokens.json +0 -3
  152. package/src/stepper/stepper.css +58 -62
  153. package/src/switch/switch.css +86 -92
  154. package/src/table/table.css +340 -175
  155. package/src/table/table.tokens.json +6 -0
  156. package/src/table-of-contents/table-of-contents.css +57 -56
  157. package/src/table-of-contents/table-of-contents.tokens.json +1 -0
  158. package/src/tabs/tabs.css +322 -289
  159. package/src/tabs/tabs.tokens.json +7 -1
  160. package/src/tag/tag.css +91 -71
  161. package/src/tag/tag.tokens.json +9 -0
  162. package/src/tags-input/tags-input.css +147 -82
  163. package/src/tags-input/tags-input.tokens.json +7 -1
  164. package/src/text-field/text-field.css +134 -136
  165. package/src/text-field/text-field.tokens.json +1 -0
  166. package/src/textarea/textarea.css +33 -28
  167. package/src/textarea/textarea.tokens.json +1 -0
  168. package/src/time-field/time-field.css +74 -69
  169. package/src/time-field/time-field.tokens.json +1 -0
  170. package/src/time-picker/time-picker.css +58 -58
  171. package/src/time-range-picker/time-range-picker.css +128 -133
  172. package/src/timeline/timeline.css +254 -266
  173. package/src/timeline/timeline.tokens.json +5 -0
  174. package/src/toast/toast.css +115 -98
  175. package/src/toast/toast.tokens.json +6 -0
  176. package/src/toggle/toggle.css +62 -25
  177. package/src/toggle/toggle.tokens.json +8 -0
  178. package/src/toggle-group/toggle-group.css +106 -60
  179. package/src/toggle-group/toggle-group.tokens.json +10 -0
  180. package/src/toolbar/toolbar.css +30 -35
  181. package/src/tooltip/tooltip.css +59 -38
  182. package/src/tooltip/tooltip.tokens.json +1 -0
  183. package/src/top-navigation/top-navigation.css +243 -259
  184. package/src/tour/tour.css +51 -60
  185. package/src/transfer/transfer.css +160 -164
  186. package/src/tree/tree.css +103 -111
  187. package/src/typography/typography.css +40 -36
  188. package/src/typography/typography.tokens.json +1 -0
  189. package/src/upload/upload.css +224 -224
  190. package/src/visually-hidden/visually-hidden.css +1 -1
  191. package/src/wizard/wizard.css +185 -197
@@ -18,7 +18,7 @@
18
18
  * order is the browser's locale rather than the application's. The value
19
19
  * reaches a form through a hidden input carrying `YYYY-MM-DDTHH:mm:ss`.
20
20
  */
21
- [data-ui='datetime-field'][data-part='root'] {
21
+ [data-ui-datetime-field][data-part-root] {
22
22
  /**
23
23
  * Type, height, inline padding, gap and glyph size come from the control
24
24
  * scales — the only ones the theme restates per density — so a datetime in
@@ -67,6 +67,8 @@
67
67
  font-family: var(--slotted-control-font-family, system-ui, sans-serif);
68
68
  font-size: var(--_font-size);
69
69
  gap: var(--_gap);
70
+ /* In a flex row the item's basis is its content, not the whole row. */
71
+ flex-basis: content;
70
72
  inline-size: 100%;
71
73
  min-block-size: var(--_height);
72
74
  min-inline-size: 0;
@@ -89,7 +91,7 @@
89
91
  * begin from it — the arithmetic `text-field` records, holding at every step
90
92
  * and every density.
91
93
  */
92
- [data-ui='datetime-field'][data-part='root']:has(> [data-part='clear']:last-child) {
94
+ [data-ui-datetime-field][data-part-root]:has(> [data-part-clear]:last-child) {
93
95
  padding-inline-end: max(
94
96
  0px,
95
97
  calc(var(--_padding-inline) - (var(--_action-size) - var(--_icon-size)) / 2)
@@ -111,7 +113,7 @@
111
113
  * the focus. Each half stays one flex item, so the value never breaks
112
114
  * inside a date or inside a time.
113
115
  */
114
- [data-ui='datetime-field'] [data-part='segments'] {
116
+ [data-ui-datetime-field] [data-part-segments] {
115
117
  align-items: center;
116
118
  column-gap: var(--_half-gap);
117
119
  /* It says what it is before it is pressed. A datetime is typed, so the
@@ -137,7 +139,7 @@
137
139
  * a field that had done nothing but inherit. The isolation keeps the decision
138
140
  * inside the half, so the frame around it still reads with the document.
139
141
  */
140
- [data-ui='datetime-field'] [data-part='half'] {
142
+ [data-ui-datetime-field] [data-part-half] {
141
143
  align-items: center;
142
144
  direction: ltr;
143
145
  display: flex;
@@ -158,7 +160,7 @@
158
160
  * the document — which is the reason every other family in this library
159
161
  * reaches for it too.
160
162
  */
161
- [data-ui='datetime-field'] [data-part='segments']:dir(rtl) {
163
+ [data-ui-datetime-field] [data-part-segments]:dir(rtl) {
162
164
  justify-content: flex-end;
163
165
  }
164
166
 
@@ -169,7 +171,7 @@
169
171
  * single digit becomes two: `1ch` is the advance of a digit in a tabular
170
172
  * face, and `--_digits` is how many the field can hold.
171
173
  */
172
- [data-ui='datetime-field'] [data-part='segment'] {
174
+ [data-ui-datetime-field] [data-part-segment] {
173
175
  --_digits: 2;
174
176
 
175
177
  background-color: transparent;
@@ -206,7 +208,7 @@
206
208
 
207
209
  /* The one field with four digits rather than two. Stated here rather than in
208
210
  the markup, so a year is the same width in both bindings and the harness. */
209
- [data-ui='datetime-field'] [data-part='segment'][data-field='year'] {
211
+ [data-ui-datetime-field] [data-part-segment][data-field='year'] {
210
212
  --_digits: 4;
211
213
  }
212
214
 
@@ -217,7 +219,7 @@
217
219
  * first of those, and a floor clips none of them. The digit face is dropped
218
220
  * here for the same reason: tabular figures inside a word letter-space it.
219
221
  */
220
- [data-ui='datetime-field'] [data-part='segment'][data-field='dayPeriod'] {
222
+ [data-ui-datetime-field] [data-part-segment][data-field='dayPeriod'] {
221
223
  font-variant-numeric: normal;
222
224
  min-inline-size: var(--slotted-datetime-field-period-min-inline-size, 2ch);
223
225
  /* An abbreviation, in whatever case the locale itself writes it. */
@@ -231,7 +233,7 @@
231
233
  * rather than in English — and a value being typed has to keep saying what
232
234
  * is missing.
233
235
  */
234
- [data-ui='datetime-field'] [data-part='segment'][data-placeholder] {
236
+ [data-ui-datetime-field] [data-part-segment][data-placeholder] {
235
237
  color: var(--slotted-datetime-field-placeholder-color, var(--slotted-text-muted, GrayText));
236
238
  }
237
239
 
@@ -240,7 +242,7 @@
240
242
  * name already carries the whole value in words, so a screen reader reading
241
243
  * "slash" between two numbers would be reading punctuation aloud.
242
244
  */
243
- [data-ui='datetime-field'] [data-part='literal'] {
245
+ [data-ui-datetime-field] [data-part-literal] {
244
246
  color: var(--slotted-datetime-field-literal-color, var(--slotted-text-muted, GrayText));
245
247
  flex: 0 0 auto;
246
248
  /* Its own bidi run: a colon between two numbers takes the paragraph's
@@ -258,7 +260,7 @@
258
260
  * whitespace is not drawn at all, and the row's column gap separates the
259
261
  * halves instead.
260
262
  */
261
- [data-ui='datetime-field'] [data-part='literal'][data-boundary] {
263
+ [data-ui-datetime-field] [data-part-literal][data-boundary] {
262
264
  margin-inline-end: 0;
263
265
  }
264
266
 
@@ -273,7 +275,7 @@
273
275
  * It is a real `input`, so a mobile keyboard opens and the platform supplies
274
276
  * every text-editing key the reader already knows.
275
277
  */
276
- [data-ui='datetime-field'] [data-part='duration'] {
278
+ [data-ui-datetime-field] [data-part-duration] {
277
279
  appearance: none;
278
280
  background-color: transparent;
279
281
  border: 0;
@@ -297,11 +299,11 @@
297
299
 
298
300
  /* Left-to-right content in a right-to-left field still sits at the reading
299
301
  edge, which is the treatment every form gives a phone number or an IBAN. */
300
- [data-ui='datetime-field'] [data-part='duration']:dir(rtl) {
302
+ [data-ui-datetime-field] [data-part-duration]:dir(rtl) {
301
303
  text-align: right;
302
304
  }
303
305
 
304
- [data-ui='datetime-field'] [data-part='duration']::placeholder {
306
+ [data-ui-datetime-field] [data-part-duration]::placeholder {
305
307
  color: var(--slotted-datetime-field-placeholder-color, var(--slotted-text-muted, GrayText));
306
308
  }
307
309
 
@@ -313,7 +315,7 @@
313
315
  * library already has for "and then"; it is direction-sensitive, so it turns
314
316
  * with the document rather than pointing out of it.
315
317
  */
316
- [data-ui='datetime-field'] [data-part='preview'] {
318
+ [data-ui-datetime-field] [data-part-preview] {
317
319
  /**
318
320
  * One line box, not a flex row. The chevron sits *in* the line rather than
319
321
  * beside it, which is the only way it can be aligned to the text at all —
@@ -351,7 +353,7 @@
351
353
  * marked `directional`: it points along the reading direction, so the `icon`
352
354
  * family turns it in a right-to-left context.
353
355
  */
354
- [data-ui='datetime-field'] [data-part='preview'] > [data-ui='icon'] {
356
+ [data-ui-datetime-field] [data-part-preview] > [data-ui-icon] {
355
357
  --slotted-icon-size: var(--_mark);
356
358
 
357
359
  /**
@@ -377,7 +379,7 @@
377
379
  * preview whenever it differs from today — and this rule only lifts the date
378
380
  * out of the surrounding time so the eye lands on the part that moved.
379
381
  */
380
- [data-ui='datetime-field'] [data-part='preview'][data-rolls-day] > [data-part='preview-date'] {
382
+ [data-ui-datetime-field] [data-part-preview][data-rolls-day] > [data-part-preview-date] {
381
383
  color: var(--slotted-datetime-field-preview-day-color, var(--slotted-tone-accent-text));
382
384
  font-weight: var(--slotted-font-weight-semibold, 600);
383
385
  }
@@ -388,7 +390,7 @@
388
390
  * border is the accent the preview is written in, so the two marks are one
389
391
  * statement rather than two.
390
392
  */
391
- [data-ui='datetime-field'][data-part='root'][data-relative] {
393
+ [data-ui-datetime-field][data-part-root][data-relative] {
392
394
  border-color: var(
393
395
  --slotted-datetime-field-relative-border-color,
394
396
  var(--slotted-tone-accent-border)
@@ -401,7 +403,7 @@
401
403
  * holding an `md` control is a field and a control disagreeing about one row.
402
404
  */
403
405
 
404
- [data-ui='datetime-field'][data-part='root'][data-size='sm'] {
406
+ [data-ui-datetime-field][data-part-root][data-size='sm'] {
405
407
  --_font-size: var(--slotted-control-font-size-sm, 12px);
406
408
  --_height: var(--slotted-control-height-sm, 30px);
407
409
  --_padding-inline: var(--slotted-control-padding-inline-sm, 10px);
@@ -409,7 +411,7 @@
409
411
  --_icon-size: max(var(--_icon-floor), var(--slotted-control-icon-size-sm, 14px));
410
412
  }
411
413
 
412
- [data-ui='datetime-field'][data-part='root'][data-size='md'] {
414
+ [data-ui-datetime-field][data-part-root][data-size='md'] {
413
415
  --_font-size: var(--slotted-control-font-size-md, 13px);
414
416
  --_height: var(--slotted-control-height-md, 34px);
415
417
  --_padding-inline: var(--slotted-control-padding-inline-md, 13px);
@@ -417,7 +419,7 @@
417
419
  --_icon-size: max(var(--_icon-floor), var(--slotted-control-icon-size-md, 16px));
418
420
  }
419
421
 
420
- [data-ui='datetime-field'][data-part='root'][data-size='lg'] {
422
+ [data-ui-datetime-field][data-part-root][data-size='lg'] {
421
423
  --_font-size: var(--slotted-control-font-size-lg, 14px);
422
424
  --_height: var(--slotted-control-height-lg, 38px);
423
425
  --_padding-inline: var(--slotted-control-padding-inline-lg, 16px);
@@ -431,7 +433,7 @@
431
433
  * shows one frame twice rather than two frames.
432
434
  */
433
435
 
434
- [data-ui='datetime-field'][data-part='root'][data-variant='subtle'] {
436
+ [data-ui-datetime-field][data-part-root][data-variant='subtle'] {
435
437
  background-color: var(
436
438
  --slotted-datetime-field-subtle-background,
437
439
  var(--slotted-surface-sunken, Canvas)
@@ -442,7 +444,7 @@
442
444
  );
443
445
  }
444
446
 
445
- [data-ui='datetime-field'][data-part='root'][data-variant='plain'] {
447
+ [data-ui-datetime-field][data-part-root][data-variant='plain'] {
446
448
  background-color: transparent;
447
449
  border-color: transparent;
448
450
  border-radius: var(--slotted-radius-none, 0px);
@@ -455,8 +457,8 @@
455
457
  * the value: an adornment annotates, and a reader looking for the datetime
456
458
  * should not have to step over it.
457
459
  */
458
- [data-ui='datetime-field'] > [data-part='start'],
459
- [data-ui='datetime-field'] > [data-part='end'] {
460
+ [data-ui-datetime-field] > [data-part-start],
461
+ [data-ui-datetime-field] > [data-part-end] {
460
462
  --slotted-icon-size: var(--_icon-size);
461
463
 
462
464
  align-items: center;
@@ -468,8 +470,8 @@
468
470
  unicode-bidi: plaintext;
469
471
  }
470
472
 
471
- [data-ui='datetime-field'] > [data-part='start'] > svg,
472
- [data-ui='datetime-field'] > [data-part='end'] > svg {
473
+ [data-ui-datetime-field] > [data-part-start] > svg,
474
+ [data-ui-datetime-field] > [data-part-end] > svg {
473
475
  block-size: var(--_icon-size);
474
476
  inline-size: var(--_icon-size);
475
477
  }
@@ -481,7 +483,7 @@
481
483
  * page. It empties both halves: half a value is not a value this family
482
484
  * holds.
483
485
  */
484
- [data-ui='datetime-field'] > [data-part='clear'] {
486
+ [data-ui-datetime-field] > [data-part-clear] {
485
487
  align-items: center;
486
488
  appearance: none;
487
489
  background-color: transparent;
@@ -511,7 +513,7 @@
511
513
  * larger one alone, which is the correction `docs/token-foundation.md`
512
514
  * leaves to the family rather than to the theme.
513
515
  */
514
- [data-ui='datetime-field'] > [data-part='clear']::after {
516
+ [data-ui-datetime-field] > [data-part-clear]::after {
515
517
  content: '';
516
518
  inset: min(0px, calc((100% - var(--slotted-target-min, 24px)) / 2));
517
519
  position: absolute;
@@ -522,28 +524,28 @@
522
524
  the hit area above grows to 44 pixels around them. After an end
523
525
  adornment — a picker's trigger — it does not reach back across it. */
524
526
  @media (pointer: coarse) {
525
- [data-ui='datetime-field'] > [data-part='clear']::after {
527
+ [data-ui-datetime-field] > [data-part-clear]::after {
526
528
  inset: min(0px, calc((100% - var(--slotted-target-comfortable, 44px)) / 2));
527
529
  }
528
530
 
529
- [data-ui='datetime-field'] > [data-part='end'] + [data-part='clear']::after {
531
+ [data-ui-datetime-field] > [data-part-end] + [data-part-clear]::after {
530
532
  inset-inline-start: 0;
531
533
  }
532
534
  }
533
535
 
534
536
  /* The cross is drawn at the control's own icon step. */
535
- [data-ui='datetime-field'] > [data-part='clear'] {
537
+ [data-ui-datetime-field] > [data-part-clear] {
536
538
  --slotted-icon-size: var(--_icon-size);
537
539
  }
538
540
 
539
- [data-ui='datetime-field'] > [data-part='clear']:hover:not(:disabled):not([data-disabled]) {
541
+ [data-ui-datetime-field] > [data-part-clear]:hover:not(:disabled):not([data-disabled]) {
540
542
  background-color: var(
541
543
  --slotted-datetime-field-action-hover-background,
542
544
  var(--slotted-tone-secondary-subtle-hover)
543
545
  );
544
546
  }
545
547
 
546
- [data-ui='datetime-field'] > [data-part='clear']:active:not(:disabled):not([data-disabled]) {
548
+ [data-ui-datetime-field] > [data-part-clear]:active:not(:disabled):not([data-disabled]) {
547
549
  background-color: var(
548
550
  --slotted-datetime-field-action-active-background,
549
551
  var(--slotted-tone-secondary-subtle-active)
@@ -556,7 +558,7 @@
556
558
  * and a ring around the whole frame would sit still while focus moved inside
557
559
  * it.
558
560
  */
559
- [data-ui='datetime-field'] > [data-part='clear']:focus-visible {
561
+ [data-ui-datetime-field] > [data-part-clear]:focus-visible {
560
562
  outline: var(--slotted-focus-ring-width, 2px) solid var(--slotted-focus-ring-color, Highlight);
561
563
  outline-offset: calc(var(--slotted-focus-ring-offset, 2px) * -1);
562
564
  }
@@ -567,7 +569,7 @@
567
569
  * one it can meet, which is the order `STATE_PRECEDENCE` sets.
568
570
  */
569
571
 
570
- [data-ui='datetime-field'][data-part='root']:hover:not([data-disabled]):not([data-readonly]):not(
572
+ [data-ui-datetime-field][data-part-root]:hover:not([data-disabled]):not([data-readonly]):not(
571
573
  [data-invalid]
572
574
  ):not([data-incomplete]) {
573
575
  border-color: var(
@@ -576,16 +578,16 @@
576
578
  );
577
579
  }
578
580
 
579
- [data-ui='datetime-field'][data-part='root'][data-variant='subtle']:hover:not(
580
- [data-disabled]
581
- ):not([data-readonly]):not([data-invalid]) {
581
+ [data-ui-datetime-field][data-part-root][data-variant='subtle']:hover:not([data-disabled]):not(
582
+ [data-readonly]
583
+ ):not([data-invalid]) {
582
584
  background-color: var(
583
585
  --slotted-datetime-field-subtle-hover-background,
584
586
  var(--slotted-tone-secondary-subtle-hover)
585
587
  );
586
588
  }
587
589
 
588
- [data-ui='datetime-field'][data-part='root'][data-variant='plain']:hover:not([data-disabled]):not(
590
+ [data-ui-datetime-field][data-part-root][data-variant='plain']:hover:not([data-disabled]):not(
589
591
  [data-readonly]
590
592
  ):not([data-invalid]) {
591
593
  background-color: var(
@@ -624,7 +626,7 @@
624
626
  * reminder — louder at rest than `invalid` is, for a state that is weaker
625
627
  * than it.
626
628
  */
627
- [data-ui='datetime-field'][data-part='root'][data-incomplete]:not([data-disabled]):not(
629
+ [data-ui-datetime-field][data-part-root][data-incomplete]:not([data-disabled]):not(
628
630
  [data-readonly]
629
631
  ):not([data-invalid]):not(:focus-within) {
630
632
  border-color: var(
@@ -649,12 +651,12 @@
649
651
  * had before the press. The expression is an `input` and takes the frame's
650
652
  * ring the same way from the other side.
651
653
  */
652
- [data-ui='datetime-field'][data-part='root']:has([data-part='segment']:focus),
653
- [data-ui='datetime-field'][data-part='root']:has([data-part='duration']:focus) {
654
+ [data-ui-datetime-field][data-part-root]:has([data-part-segment]:focus),
655
+ [data-ui-datetime-field][data-part-root]:has([data-part-duration]:focus) {
654
656
  box-shadow: var(--slotted-control-shadow-focus-geometry, 0 1px 4px -1px)
655
657
  var(--slotted-focus-ring-color, Highlight);
656
658
  outline: var(--slotted-focus-ring-width, 2px) solid var(--slotted-focus-ring-color, Highlight);
657
- outline-offset: var(--slotted-focus-ring-offset, 2px);
659
+ outline-offset: var(--slotted-control-focus-ring-offset, var(--slotted-focus-ring-offset, 2px));
658
660
  }
659
661
 
660
662
  /**
@@ -664,17 +666,13 @@
664
666
  * shadow that appears only under focus is a cell that changes size when it
665
667
  * is used.
666
668
  */
667
- [data-ui='datetime-field'][data-part='root'][data-variant='plain']:has(
668
- [data-part='segment']:focus
669
- ),
670
- [data-ui='datetime-field'][data-part='root'][data-variant='plain']:has(
671
- [data-part='duration']:focus
672
- ) {
669
+ [data-ui-datetime-field][data-part-root][data-variant='plain']:has([data-part-segment]:focus),
670
+ [data-ui-datetime-field][data-part-root][data-variant='plain']:has([data-part-duration]:focus) {
673
671
  box-shadow: none;
674
672
  outline-offset: calc(var(--slotted-focus-ring-offset, 2px) * -1);
675
673
  }
676
674
 
677
- [data-ui='datetime-field'] [data-part='segment']:focus {
675
+ [data-ui-datetime-field] [data-part-segment]:focus {
678
676
  background-color: var(
679
677
  --slotted-datetime-field-segment-focus-background,
680
678
  var(--slotted-tone-accent-solid)
@@ -691,7 +689,7 @@
691
689
  * The ring is retargeted rather than repainted, so the frame's outline, the
692
690
  * shadow under it and the ring on the clear button all move at once.
693
691
  */
694
- [data-ui='datetime-field'][data-part='root'][data-invalid] {
692
+ [data-ui-datetime-field][data-part-root][data-invalid] {
695
693
  --slotted-focus-ring-color: var(
696
694
  --slotted-datetime-field-invalid-focus-ring-color,
697
695
  var(--slotted-focus-ring-color-invalid, Highlight)
@@ -719,19 +717,19 @@
719
717
  box-shadow: var(--_invalid-edge);
720
718
  }
721
719
 
722
- [data-ui='datetime-field'][data-part='root'][data-invalid]:has([data-part='segment']:focus),
723
- [data-ui='datetime-field'][data-part='root'][data-invalid]:has([data-part='duration']:focus) {
720
+ [data-ui-datetime-field][data-part-root][data-invalid]:has([data-part-segment]:focus),
721
+ [data-ui-datetime-field][data-part-root][data-invalid]:has([data-part-duration]:focus) {
724
722
  box-shadow:
725
723
  var(--_invalid-edge),
726
724
  var(--slotted-control-shadow-focus-geometry, 0 1px 4px -1px)
727
725
  var(--slotted-focus-ring-color, Highlight);
728
726
  }
729
727
 
730
- [data-ui='datetime-field'][data-part='root'][data-variant='plain'][data-invalid]:has(
731
- [data-part='segment']:focus
728
+ [data-ui-datetime-field][data-part-root][data-variant='plain'][data-invalid]:has(
729
+ [data-part-segment]:focus
732
730
  ),
733
- [data-ui='datetime-field'][data-part='root'][data-variant='plain'][data-invalid]:has(
734
- [data-part='duration']:focus
731
+ [data-ui-datetime-field][data-part-root][data-variant='plain'][data-invalid]:has(
732
+ [data-part-duration]:focus
735
733
  ) {
736
734
  /* The ring lies inside the box here, over the border and an edge as wide as
737
735
  it; the edge reaches past the ring. */
@@ -749,25 +747,28 @@
749
747
  * control draws its ring double, which a valid ring is not.
750
748
  */
751
749
  @media (forced-colors: active) {
752
- [data-ui='datetime-field'][data-part='root'][data-invalid] {
750
+ [data-ui-datetime-field][data-part-root][data-invalid] {
753
751
  outline: var(--_invalid-edge-width) solid CanvasText;
754
752
  outline-offset: calc(
755
753
  -1 * (var(--slotted-control-border-width, 1px) + var(--_invalid-edge-width))
756
754
  );
757
755
  }
758
756
 
759
- [data-ui='datetime-field'][data-part='root'][data-invalid]:has([data-part='segment']:focus),
760
- [data-ui='datetime-field'][data-part='root'][data-invalid]:has([data-part='duration']:focus) {
757
+ [data-ui-datetime-field][data-part-root][data-invalid]:has([data-part-segment]:focus),
758
+ [data-ui-datetime-field][data-part-root][data-invalid]:has([data-part-duration]:focus) {
761
759
  outline: calc(var(--slotted-focus-ring-width, 2px) + var(--_invalid-edge-width)) double
762
760
  var(--slotted-focus-ring-color, Highlight);
763
- outline-offset: var(--slotted-focus-ring-offset, 2px);
761
+ outline-offset: var(
762
+ --slotted-control-focus-ring-offset,
763
+ var(--slotted-focus-ring-offset, 2px)
764
+ );
764
765
  }
765
766
 
766
- [data-ui='datetime-field'][data-part='root'][data-variant='plain'][data-invalid]:has(
767
- [data-part='segment']:focus
767
+ [data-ui-datetime-field][data-part-root][data-variant='plain'][data-invalid]:has(
768
+ [data-part-segment]:focus
768
769
  ),
769
- [data-ui='datetime-field'][data-part='root'][data-variant='plain'][data-invalid]:has(
770
- [data-part='duration']:focus
770
+ [data-ui-datetime-field][data-part-root][data-variant='plain'][data-invalid]:has(
771
+ [data-part-duration]:focus
771
772
  ) {
772
773
  outline: calc(var(--slotted-focus-ring-width, 2px) + var(--_invalid-edge-width)) double
773
774
  var(--slotted-focus-ring-color, Highlight);
@@ -782,13 +783,13 @@
782
783
  * mistakable for disabled: the value is still real and still submitted. The
783
784
  * ground says "not yours to change" and the ink says nothing at all.
784
785
  */
785
- [data-ui='datetime-field'][data-part='root'][data-readonly],
786
- [data-ui='datetime-field'][data-part='root'][data-readonly] [data-part='segments'],
787
- [data-ui='datetime-field'][data-part='root'][data-readonly] [data-part='segment'] {
786
+ [data-ui-datetime-field][data-part-root][data-readonly],
787
+ [data-ui-datetime-field][data-part-root][data-readonly] [data-part-segments],
788
+ [data-ui-datetime-field][data-part-root][data-readonly] [data-part-segment] {
788
789
  cursor: default;
789
790
  }
790
791
 
791
- [data-ui='datetime-field'][data-part='root'][data-readonly] {
792
+ [data-ui-datetime-field][data-part-root][data-readonly] {
792
793
  background-color: var(
793
794
  --slotted-datetime-field-readonly-background,
794
795
  var(--slotted-tone-secondary-subtle-hover)
@@ -800,7 +801,7 @@
800
801
  * datetime nobody can read is a field nobody can check, and a disabled form
801
802
  * still has to say what it holds.
802
803
  */
803
- [data-ui='datetime-field'][data-part='root'][data-disabled] {
804
+ [data-ui-datetime-field][data-part-root][data-disabled] {
804
805
  background-color: var(
805
806
  --slotted-datetime-field-disabled-background,
806
807
  var(--slotted-disabled-background)
@@ -815,23 +816,22 @@
815
816
  cursor: not-allowed;
816
817
  }
817
818
 
818
- [data-ui='datetime-field'][data-part='root'][data-disabled] [data-part='segments'],
819
- [data-ui='datetime-field'][data-part='root'][data-disabled] [data-part='segment'] {
819
+ [data-ui-datetime-field][data-part-root][data-disabled] [data-part-segments],
820
+ [data-ui-datetime-field][data-part-root][data-disabled] [data-part-segment] {
820
821
  cursor: not-allowed;
821
822
  }
822
823
 
823
- [data-ui='datetime-field'][data-part='root'][data-disabled] > [data-part='start'],
824
- [data-ui='datetime-field'][data-part='root'][data-disabled] > [data-part='end'],
825
- [data-ui='datetime-field'][data-part='root'][data-disabled] [data-part='literal'],
826
- [data-ui='datetime-field'][data-part='root'][data-disabled]
827
- [data-part='segment'][data-placeholder] {
824
+ [data-ui-datetime-field][data-part-root][data-disabled] > [data-part-start],
825
+ [data-ui-datetime-field][data-part-root][data-disabled] > [data-part-end],
826
+ [data-ui-datetime-field][data-part-root][data-disabled] [data-part-literal],
827
+ [data-ui-datetime-field][data-part-root][data-disabled] [data-part-segment][data-placeholder] {
828
828
  color: var(--slotted-disabled-foreground);
829
829
  }
830
830
 
831
831
  @media (forced-colors: active) {
832
832
  /* A transparent border has no system colour to be remapped to, so the
833
833
  `plain` control would lose its only edge where an edge matters most. */
834
- [data-ui='datetime-field'][data-part='root'][data-variant='plain'] {
834
+ [data-ui-datetime-field][data-part-root][data-variant='plain'] {
835
835
  border-color: ButtonBorder;
836
836
  }
837
837
 
@@ -839,7 +839,7 @@
839
839
  modes that are told apart by tone need a second signal. The expression
840
840
  borrows the highlight; the incomplete frame borrows the thicker border
841
841
  the system reserves for something asking to be finished. */
842
- [data-ui='datetime-field'][data-part='root'][data-relative] {
842
+ [data-ui-datetime-field][data-part-root][data-relative] {
843
843
  border-color: Highlight;
844
844
  }
845
845
 
@@ -2,6 +2,7 @@
2
2
  "--slotted-border-subtle",
3
3
  "--slotted-control-border-color",
4
4
  "--slotted-control-border-width",
5
+ "--slotted-control-focus-ring-offset",
5
6
  "--slotted-control-font-family",
6
7
  "--slotted-control-font-size-lg",
7
8
  "--slotted-control-font-size-md",