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

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 (199) 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 +96 -96
  7. package/src/alert/alert.tokens.json +5 -0
  8. package/src/app-shell/app-shell.css +455 -328
  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 +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 +68 -65
  25. package/src/carousel/carousel.css +158 -169
  26. package/src/cascader/cascader.css +158 -157
  27. package/src/cascader/cascader.tokens.json +1 -0
  28. package/src/chart/chart.css +288 -267
  29. package/src/chart/chart.tokens.json +4 -0
  30. package/src/checkbox/checkbox.css +143 -148
  31. package/src/checkbox-group/checkbox-group.css +7 -7
  32. package/src/code-block/code-block.css +85 -89
  33. package/src/collapsible/collapsible.css +76 -80
  34. package/src/color-picker/color-picker.css +106 -114
  35. package/src/column-manager/column-manager.css +111 -119
  36. package/src/combobox/combobox.css +203 -130
  37. package/src/combobox/combobox.tokens.json +3 -0
  38. package/src/command-palette/command-palette.css +155 -102
  39. package/src/command-palette/command-palette.tokens.json +2 -0
  40. package/src/container/container.css +27 -27
  41. package/src/context-menu/context-menu.css +9 -9
  42. package/src/currency-field/currency-field.css +119 -119
  43. package/src/currency-field/currency-field.tokens.json +1 -0
  44. package/src/dashboard-grid/dashboard-grid.css +185 -115
  45. package/src/data-grid/data-grid.css +598 -496
  46. package/src/data-grid/data-grid.tokens.json +5 -1
  47. package/src/data-list/data-list.css +82 -71
  48. package/src/data-list/data-list.tokens.json +2 -1
  49. package/src/date-field/date-field.css +62 -57
  50. package/src/date-field/date-field.tokens.json +1 -0
  51. package/src/date-picker/date-picker.css +117 -58
  52. package/src/date-picker/date-picker.tokens.json +5 -0
  53. package/src/date-range-picker/date-range-picker.css +157 -127
  54. package/src/date-range-picker/date-range-picker.tokens.json +4 -0
  55. package/src/datetime-field/datetime-field.css +90 -90
  56. package/src/datetime-field/datetime-field.tokens.json +1 -0
  57. package/src/datetime-picker/datetime-picker.css +123 -70
  58. package/src/datetime-picker/datetime-picker.tokens.json +4 -1
  59. package/src/datetime-range-picker/datetime-range-picker.css +191 -163
  60. package/src/datetime-range-picker/datetime-range-picker.tokens.json +4 -0
  61. package/src/description-list/description-list.css +105 -75
  62. package/src/description-list/description-list.tokens.json +1 -0
  63. package/src/detail-panel/detail-panel.css +86 -71
  64. package/src/detail-panel/detail-panel.tokens.json +2 -0
  65. package/src/dialog/dialog.css +434 -198
  66. package/src/dialog/dialog.tokens.json +7 -0
  67. package/src/divider/divider.css +20 -20
  68. package/src/drawer/drawer.css +597 -236
  69. package/src/drawer/drawer.tokens.json +13 -0
  70. package/src/entity-picker/entity-picker.css +323 -270
  71. package/src/entity-picker/entity-picker.tokens.json +3 -0
  72. package/src/event-calendar/event-calendar.css +357 -399
  73. package/src/field/field.css +106 -93
  74. package/src/field/field.tokens.json +2 -0
  75. package/src/field-group/field-group.css +43 -33
  76. package/src/field-group/field-group.tokens.json +3 -0
  77. package/src/filter-bar/filter-bar.css +200 -216
  78. package/src/form/form.css +99 -25
  79. package/src/form/form.tokens.json +5 -0
  80. package/src/fullscreen/fullscreen.css +26 -27
  81. package/src/grid/grid.css +29 -29
  82. package/src/highlight/highlight.css +11 -11
  83. package/src/hover-card/hover-card.css +9 -9
  84. package/src/icon/icon.css +67 -20
  85. package/src/icon/icon.tokens.json +1 -0
  86. package/src/image/image.css +42 -42
  87. package/src/import-export-center/import-export-center.css +144 -165
  88. package/src/inline/inline.css +28 -28
  89. package/src/inline-message/inline-message.css +162 -86
  90. package/src/inline-message/inline-message.tokens.json +4 -0
  91. package/src/kbd/kbd.css +62 -50
  92. package/src/kbd/kbd.tokens.json +3 -0
  93. package/src/link/link.css +54 -33
  94. package/src/link/link.tokens.json +4 -0
  95. package/src/list/list.css +23 -23
  96. package/src/list-item/list-item.css +89 -75
  97. package/src/list-item/list-item.tokens.json +7 -0
  98. package/src/listbox/listbox.css +71 -70
  99. package/src/listbox/listbox.tokens.json +0 -1
  100. package/src/loading-overlay/loading-overlay.css +86 -103
  101. package/src/markdown/markdown.css +20 -20
  102. package/src/media-viewer/media-viewer.css +790 -0
  103. package/src/media-viewer/media-viewer.tokens.json +53 -0
  104. package/src/menu/menu.css +162 -82
  105. package/src/menu/menu.tokens.json +2 -1
  106. package/src/menubar/menubar.css +16 -16
  107. package/src/message/message.css +1250 -1253
  108. package/src/message/message.tokens.json +5 -0
  109. package/src/message-scroller/message-scroller.css +323 -320
  110. package/src/multi-select/multi-select.css +230 -172
  111. package/src/multi-select/multi-select.tokens.json +2 -0
  112. package/src/navigation-menu/navigation-menu.css +169 -190
  113. package/src/notification-center/notification-center.css +153 -161
  114. package/src/notification-center/notification-center.tokens.json +3 -0
  115. package/src/number-field/number-field.css +93 -93
  116. package/src/number-field/number-field.tokens.json +1 -0
  117. package/src/otp-input/otp-input.css +74 -64
  118. package/src/otp-input/otp-input.tokens.json +1 -0
  119. package/src/page/page.css +41 -27
  120. package/src/page/page.tokens.json +1 -0
  121. package/src/page-header/page-header.css +341 -286
  122. package/src/page-header/page-header.tokens.json +5 -0
  123. package/src/pagination/pagination.css +75 -79
  124. package/src/popover/popover.css +81 -64
  125. package/src/popover/popover.tokens.json +1 -0
  126. package/src/progress-indicator/progress-indicator.css +192 -136
  127. package/src/progress-indicator/progress-indicator.tokens.json +1 -0
  128. package/src/prompt-composer/prompt-composer.css +260 -113
  129. package/src/prompt-composer/prompt-composer.tokens.json +15 -0
  130. package/src/prose/prose.css +77 -82
  131. package/src/radio-group/radio-group.css +107 -112
  132. package/src/rating/rating.css +146 -142
  133. package/src/rating/rating.tokens.json +1 -0
  134. package/src/result-state/result-state.css +94 -101
  135. package/src/runtime-properties.mjs +19 -6
  136. package/src/saved-views/saved-views.css +43 -49
  137. package/src/scroll-area/scroll-area.css +44 -37
  138. package/src/section/section.css +178 -43
  139. package/src/section/section.tokens.json +8 -2
  140. package/src/segmented-control/segmented-control.css +210 -133
  141. package/src/segmented-control/segmented-control.tokens.json +7 -11
  142. package/src/select/select.css +210 -147
  143. package/src/select/select.tokens.json +3 -0
  144. package/src/side-navigation/side-navigation.css +193 -196
  145. package/src/side-navigation/side-navigation.tokens.json +1 -0
  146. package/src/skeleton/skeleton.css +57 -58
  147. package/src/slider/slider.css +101 -103
  148. package/src/sparkline/sparkline.css +75 -53
  149. package/src/sparkline/sparkline.tokens.json +2 -0
  150. package/src/spinner/spinner.css +83 -180
  151. package/src/spinner/spinner.tokens.json +0 -1
  152. package/src/split-button/split-button.css +34 -35
  153. package/src/split-button/split-button.tokens.json +1 -0
  154. package/src/splitter/splitter.css +47 -48
  155. package/src/stack/stack.css +25 -25
  156. package/src/stat-card/stat-card.css +415 -245
  157. package/src/stat-card/stat-card.tokens.json +8 -0
  158. package/src/status-indicator/status-indicator.css +124 -100
  159. package/src/status-indicator/status-indicator.tokens.json +0 -3
  160. package/src/stepper/stepper.css +78 -82
  161. package/src/switch/switch.css +100 -106
  162. package/src/table/table.css +270 -198
  163. package/src/table/table.tokens.json +2 -0
  164. package/src/table-of-contents/table-of-contents.css +60 -59
  165. package/src/table-of-contents/table-of-contents.tokens.json +1 -0
  166. package/src/tabs/tabs.css +327 -294
  167. package/src/tabs/tabs.tokens.json +7 -1
  168. package/src/tag/tag.css +109 -88
  169. package/src/tag/tag.tokens.json +10 -0
  170. package/src/tags-input/tags-input.css +152 -87
  171. package/src/tags-input/tags-input.tokens.json +7 -1
  172. package/src/text-field/text-field.css +146 -148
  173. package/src/text-field/text-field.tokens.json +1 -0
  174. package/src/textarea/textarea.css +38 -33
  175. package/src/textarea/textarea.tokens.json +1 -0
  176. package/src/time-field/time-field.css +82 -77
  177. package/src/time-field/time-field.tokens.json +1 -0
  178. package/src/time-picker/time-picker.css +116 -64
  179. package/src/time-picker/time-picker.tokens.json +4 -1
  180. package/src/time-range-picker/time-range-picker.css +168 -140
  181. package/src/time-range-picker/time-range-picker.tokens.json +4 -0
  182. package/src/timeline/timeline.css +280 -292
  183. package/src/timeline/timeline.tokens.json +5 -0
  184. package/src/toast/toast.css +138 -121
  185. package/src/toast/toast.tokens.json +6 -0
  186. package/src/toggle/toggle.css +34 -38
  187. package/src/toggle-group/toggle-group.css +73 -77
  188. package/src/toolbar/toolbar.css +33 -38
  189. package/src/tooltip/tooltip.css +65 -39
  190. package/src/tooltip/tooltip.tokens.json +1 -0
  191. package/src/top-navigation/top-navigation.css +252 -268
  192. package/src/tour/tour.css +64 -73
  193. package/src/transfer/transfer.css +164 -168
  194. package/src/tree/tree.css +113 -121
  195. package/src/typography/typography.css +42 -38
  196. package/src/typography/typography.tokens.json +1 -0
  197. package/src/upload/upload.css +256 -257
  198. package/src/visually-hidden/visually-hidden.css +1 -1
  199. package/src/wizard/wizard.css +187 -199
@@ -13,7 +13,7 @@
13
13
  * mirrors its state onto the root rather than styling through, so a control
14
14
  * used outside a field looks the same as one inside it.
15
15
  */
16
- [data-ui='otp-input'][data-part='root'] {
16
+ [data-ui-otp-input][data-part-root] {
17
17
  /**
18
18
  * A box is a square on the control's height at this density, so a code
19
19
  * beside a text field in the same form sits on the same row height. Its
@@ -71,7 +71,7 @@
71
71
  * native attribute a consumer wrote. `opacity: 1` rather than 0, because iOS
72
72
  * shows no paste menu on an invisible control (input-otp, `input.tsx`).
73
73
  */
74
- [data-ui='otp-input'] > [data-part='input'] {
74
+ [data-ui-otp-input] > [data-part-input] {
75
75
  appearance: none;
76
76
  background-color: transparent;
77
77
  block-size: 100%;
@@ -104,7 +104,7 @@
104
104
  * selected at every press, so the drag is refused — here for the engines
105
105
  * that read the property, and in both bindings on `dragstart`.
106
106
  */
107
- [data-ui='otp-input'] > [data-part='input']::selection {
107
+ [data-ui-otp-input] > [data-part-input]::selection {
108
108
  /**
109
109
  * `!important`, the only one in the library. An application that styles
110
110
  * its own `::selection` — and the workbench does, unlayered — outranks a
@@ -119,37 +119,44 @@
119
119
  -webkit-text-fill-color: transparent !important;
120
120
  }
121
121
 
122
- [data-ui='otp-input'] > [data-part='input'] {
122
+ [data-ui-otp-input] > [data-part-input] {
123
123
  -webkit-user-drag: none;
124
124
  }
125
125
 
126
126
  /**
127
- * Autofill. Chrome paints its own ground over the control's, and the classic
128
- * repair — a hundred-pixel inset shadow — is the only way to reach it. The
129
- * signal is kept rather than erased, as `text-field` keeps it: an autofilled
130
- * code is a fact worth seeing, so the boxes sit on the accent surface the
131
- * theme owns rather than on the browser's yellow.
127
+ * Autofill. The input lies over the boxes, so the classic repair — a
128
+ * hundred-pixel inset shadow in the tint — painted over every box, its edge
129
+ * and the gaps between them. The browser's own ground is held back instead,
130
+ * by a transition that never starts, and the boxes take the tint: an
131
+ * autofilled code is a fact worth seeing, on the accent surface the theme
132
+ * owns rather than on the browser's yellow.
132
133
  */
133
- [data-ui='otp-input'] > [data-part='input']:autofill {
134
- box-shadow: inset 0 0 0 100px
135
- var(--slotted-otp-input-autofill-background, var(--slotted-tone-accent-surface));
134
+ [data-ui-otp-input] > [data-part-input]:autofill {
135
+ transition: background-color 0s 600000s;
136
136
  -webkit-text-fill-color: transparent;
137
137
  }
138
138
 
139
+ [data-ui-otp-input][data-part-root]:has(> [data-part-input]:autofill) [data-part-slot] {
140
+ background-color: var(
141
+ --slotted-otp-input-autofill-background,
142
+ var(--slotted-tone-accent-surface)
143
+ );
144
+ }
145
+
139
146
  /* ── Groups and the separator ─────────────────────────────────────────
140
147
  *
141
148
  * `groups` partitions the boxes; `123-456` is how the SMS arrives. Each
142
149
  * group is a row of boxes, and between two groups a short rule is drawn —
143
150
  * never a character, which would be read by nothing and mirrored by nothing.
144
151
  */
145
- [data-ui='otp-input'] > [data-part='group'] {
152
+ [data-ui-otp-input] > [data-part-group] {
146
153
  align-items: center;
147
154
  display: flex;
148
155
  gap: var(--_gap);
149
156
  min-inline-size: 0;
150
157
  }
151
158
 
152
- [data-ui='otp-input'] > [data-part='separator'] {
159
+ [data-ui-otp-input] > [data-part-separator] {
153
160
  background-color: var(
154
161
  --slotted-otp-input-separator-color,
155
162
  var(--slotted-control-border-color, ButtonBorder)
@@ -167,7 +174,7 @@
167
174
  * framed control carries. It shrinks before the row overflows — a code in a
168
175
  * 240-pixel column loses width, not boxes.
169
176
  */
170
- [data-ui='otp-input'] [data-part='slot'] {
177
+ [data-ui-otp-input] [data-part-slot] {
171
178
  align-items: center;
172
179
  background-color: var(--slotted-otp-input-background, var(--slotted-control-surface, Field));
173
180
  block-size: var(--_height);
@@ -205,7 +212,7 @@
205
212
  * so the caret and the filled state keep reading the DOM rather than the
206
213
  * paint.
207
214
  */
208
- [data-ui='otp-input'] [data-part='slot']:empty::before {
215
+ [data-ui-otp-input] [data-part-slot]:empty::before {
209
216
  color: var(--slotted-otp-input-placeholder-color, var(--slotted-text-muted));
210
217
  content: attr(data-placeholder);
211
218
  }
@@ -218,7 +225,7 @@
218
225
  * four-pixel speck in a thirty-four-pixel box, and a PIN pad draws its dots
219
226
  * larger than its digits.
220
227
  */
221
- [data-ui='otp-input'][data-mask] [data-part='slot']:not(:empty) {
228
+ [data-ui-otp-input][data-mask] [data-part-slot]:not(:empty) {
222
229
  font-size: var(--slotted-otp-input-mask-size, var(--slotted-font-size-2xl, 1.25rem));
223
230
  }
224
231
 
@@ -230,29 +237,29 @@
230
237
  * rather than two, and the raised box — hovered, current, focused — comes
231
238
  * forward so its whole edge is seen.
232
239
  */
233
- [data-ui='otp-input'][data-attached] > [data-part='group'] {
240
+ [data-ui-otp-input][data-attached] > [data-part-group] {
234
241
  gap: 0;
235
242
  }
236
243
 
237
- [data-ui='otp-input'][data-attached] [data-part='slot'] {
244
+ [data-ui-otp-input][data-attached] [data-part-slot] {
238
245
  border-radius: 0;
239
246
  }
240
247
 
241
- [data-ui='otp-input'][data-attached] [data-part='slot']:not(:first-child) {
248
+ [data-ui-otp-input][data-attached] [data-part-slot]:not(:first-child) {
242
249
  margin-inline-start: calc(var(--slotted-control-border-width, 1px) * -1);
243
250
  }
244
251
 
245
- [data-ui='otp-input'][data-attached] [data-part='slot']:first-child {
252
+ [data-ui-otp-input][data-attached] [data-part-slot]:first-child {
246
253
  border-start-start-radius: var(--_radius);
247
254
  border-end-start-radius: var(--_radius);
248
255
  }
249
256
 
250
- [data-ui='otp-input'][data-attached] [data-part='slot']:last-child {
257
+ [data-ui-otp-input][data-attached] [data-part-slot]:last-child {
251
258
  border-start-end-radius: var(--_radius);
252
259
  border-end-end-radius: var(--_radius);
253
260
  }
254
261
 
255
- [data-ui='otp-input'][data-attached] [data-part='slot'][data-current] {
262
+ [data-ui-otp-input][data-attached] [data-part-slot][data-current] {
256
263
  z-index: 1;
257
264
  }
258
265
 
@@ -263,19 +270,19 @@
263
270
  * same name, so a `lg` code is a `lg` word's size and one step larger than
264
271
  * a `lg` field's text.
265
272
  */
266
- [data-ui='otp-input'][data-part='root'][data-size='sm'] {
273
+ [data-ui-otp-input][data-part-root][data-size='sm'] {
267
274
  --_height: var(--slotted-control-height-sm, 30px);
268
275
  --_font-size: var(--slotted-font-size-sm, 0.8125rem);
269
276
  --_gap: var(--slotted-control-gap-sm, 6px);
270
277
  }
271
278
 
272
- [data-ui='otp-input'][data-part='root'][data-size='md'] {
279
+ [data-ui-otp-input][data-part-root][data-size='md'] {
273
280
  --_height: var(--slotted-control-height-md, 34px);
274
281
  --_font-size: var(--slotted-font-size-md, 0.875rem);
275
282
  --_gap: var(--slotted-control-gap-md, 8px);
276
283
  }
277
284
 
278
- [data-ui='otp-input'][data-part='root'][data-size='lg'] {
285
+ [data-ui-otp-input][data-part-root][data-size='lg'] {
279
286
  --_height: var(--slotted-control-height-lg, 38px);
280
287
  --_font-size: var(--slotted-font-size-lg, 1rem);
281
288
  --_gap: var(--slotted-control-gap-lg, 8px);
@@ -287,7 +294,7 @@
287
294
  * The same two steps `text-field` draws, with the same tokens behind them,
288
295
  * so a code under a text field in one form is one form.
289
296
  */
290
- [data-ui='otp-input'][data-variant='subtle'] [data-part='slot'] {
297
+ [data-ui-otp-input][data-variant='subtle'] [data-part-slot] {
291
298
  background-color: var(
292
299
  --slotted-otp-input-subtle-background,
293
300
  var(--slotted-surface-sunken, Canvas)
@@ -309,8 +316,8 @@
309
316
  * rather than blinking faster: an endless animation stops, it does not
310
317
  * hurry.
311
318
  */
312
- [data-ui='otp-input'][data-part='root']:has(> [data-part='input']:focus)
313
- [data-part='slot'][data-current]:empty::after {
319
+ [data-ui-otp-input][data-part-root]:has(> [data-part-input]:focus)
320
+ [data-part-slot][data-current]:empty::after {
314
321
  animation: slotted-otp-input-blink var(--slotted-duration-loop) step-end infinite;
315
322
  background-color: currentcolor;
316
323
  block-size: 1em;
@@ -332,8 +339,8 @@
332
339
  }
333
340
 
334
341
  @media (prefers-reduced-motion: reduce) {
335
- [data-ui='otp-input'][data-part='root']:has(> [data-part='input']:focus)
336
- [data-part='slot'][data-current]:empty::after {
342
+ [data-ui-otp-input][data-part-root]:has(> [data-part-input]:focus)
343
+ [data-part-slot][data-current]:empty::after {
337
344
  animation: none;
338
345
  }
339
346
  }
@@ -345,17 +352,17 @@
345
352
  * is always over the input, never over a box, so hover is the root's and it
346
353
  * lights the whole row: the row is one control.
347
354
  */
348
- [data-ui='otp-input'][data-part='root']:hover:not([data-disabled]):not([data-readonly]):not(
355
+ [data-ui-otp-input][data-part-root]:hover:not([data-disabled]):not([data-readonly]):not(
349
356
  [data-invalid]
350
357
  )
351
- [data-part='slot'] {
358
+ [data-part-slot] {
352
359
  border-color: var(--slotted-otp-input-hover-border-color, var(--slotted-tone-accent-border));
353
360
  }
354
361
 
355
- [data-ui='otp-input'][data-part='root'][data-variant='subtle']:hover:not([data-disabled]):not(
362
+ [data-ui-otp-input][data-part-root][data-variant='subtle']:hover:not([data-disabled]):not(
356
363
  [data-readonly]
357
364
  ):not([data-invalid])
358
- [data-part='slot'] {
365
+ [data-part-slot] {
359
366
  background-color: var(
360
367
  --slotted-otp-input-subtle-hover-background,
361
368
  var(--slotted-tone-secondary-subtle-hover)
@@ -372,13 +379,13 @@
372
379
  * keeps its danger edge on every box, and the ring says where the cursor
373
380
  * is — while the tint survives, because it says what the next key does.
374
381
  */
375
- [data-ui='otp-input'][data-part='root']:not([data-invalid]):has(> [data-part='input']:focus)
376
- [data-part='slot'][data-current] {
382
+ [data-ui-otp-input][data-part-root]:not([data-invalid]):has(> [data-part-input]:focus)
383
+ [data-part-slot][data-current] {
377
384
  border-color: var(--slotted-otp-input-current-border-color, var(--slotted-tone-accent-border));
378
385
  }
379
386
 
380
- [data-ui='otp-input'][data-part='root']:has(> [data-part='input']:focus)
381
- [data-part='slot'][data-current]:not(:empty) {
387
+ [data-ui-otp-input][data-part-root]:has(> [data-part-input]:focus)
388
+ [data-part-slot][data-current]:not(:empty) {
382
389
  background-color: var(
383
390
  --slotted-otp-input-selection-background,
384
391
  var(--slotted-tone-accent-surface)
@@ -392,34 +399,34 @@
392
399
  * whose caret is the thing that moved. A ring around the whole row would sit
393
400
  * still while the cursor moved inside it.
394
401
  */
395
- [data-ui='otp-input'][data-part='root']:has(> [data-part='input']:focus-visible)
396
- [data-part='slot'][data-current] {
402
+ [data-ui-otp-input][data-part-root]:has(> [data-part-input]:focus-visible)
403
+ [data-part-slot][data-current] {
397
404
  /**
398
- * The resting shadow, recoloured. The geometry is the foundation's and the
405
+ * The resting shadow, recolored. The geometry is the foundation's and the
399
406
  * ink is the focus ring's, so the lift under the box and the ring around
400
- * it are one colour and the state decides which colour that is.
407
+ * it are one color and the state decides which color that is.
401
408
  */
402
409
  box-shadow: var(--slotted-control-shadow-focus-geometry, 0 1px 4px -1px)
403
410
  var(--slotted-focus-ring-color, Highlight);
404
411
  outline: var(--slotted-focus-ring-width, 2px) solid var(--slotted-focus-ring-color, Highlight);
405
- outline-offset: var(--slotted-focus-ring-offset, 2px);
412
+ outline-offset: var(--slotted-control-focus-ring-offset, var(--slotted-focus-ring-offset, 2px));
406
413
  }
407
414
 
408
415
  /**
409
416
  * Invalid outranks hover and is written after it for that reason. The ring
410
417
  * is retargeted rather than repainted: every rule that draws focus reads
411
418
  * `--slotted-focus-ring-color`, so pointing that one name at the invalid
412
- * colour on the root moves all of them at once — the rule `text-field`
419
+ * color on the root moves all of them at once — the rule `text-field`
413
420
  * wrote and every field family inherits.
414
421
  */
415
- [data-ui='otp-input'][data-part='root'][data-invalid] {
422
+ [data-ui-otp-input][data-part-root][data-invalid] {
416
423
  --slotted-focus-ring-color: var(
417
424
  --slotted-otp-input-invalid-focus-ring-color,
418
425
  var(--slotted-focus-ring-color-invalid, Highlight)
419
426
  );
420
427
  }
421
428
 
422
- [data-ui='otp-input'][data-part='root'][data-invalid] [data-part='slot'] {
429
+ [data-ui-otp-input][data-part-root][data-invalid] [data-part-slot] {
423
430
  --_invalid-edge-width: var(
424
431
  --slotted-otp-input-invalid-edge-width,
425
432
  var(--slotted-control-invalid-edge-width, 1px)
@@ -432,7 +439,7 @@
432
439
 
433
440
  border-color: var(--slotted-otp-input-invalid-border-color, var(--slotted-tone-danger-border));
434
441
  /*
435
- * Width as well as colour (WCAG 1.4.1), the edge `text-field` draws: in
442
+ * Width as well as color (WCAG 1.4.1), the edge `text-field` draws: in
436
443
  * `high-contrast` the danger border is the resting edge's black. The line
437
444
  * is a shadow inside the border, so neither box nor text moves, and it
438
445
  * takes the resting lift's place.
@@ -440,8 +447,8 @@
440
447
  box-shadow: var(--_invalid-edge);
441
448
  }
442
449
 
443
- [data-ui='otp-input'][data-part='root'][data-invalid]:has(> [data-part='input']:focus-visible)
444
- [data-part='slot'][data-current] {
450
+ [data-ui-otp-input][data-part-root][data-invalid]:has(> [data-part-input]:focus-visible)
451
+ [data-part-slot][data-current] {
445
452
  box-shadow:
446
453
  var(--_invalid-edge),
447
454
  var(--slotted-control-shadow-focus-geometry, 0 1px 4px -1px)
@@ -449,23 +456,26 @@
449
456
  }
450
457
 
451
458
  /*
452
- * Forced colours remove every box shadow, and the edge with them. The
459
+ * Forced colors remove every box shadow, and the edge with them. The
453
460
  * width comes back as an outline inside the border, and a focused invalid
454
461
  * control draws its ring double, which a valid ring is not.
455
462
  */
456
463
  @media (forced-colors: active) {
457
- [data-ui='otp-input'][data-part='root'][data-invalid] [data-part='slot'] {
464
+ [data-ui-otp-input][data-part-root][data-invalid] [data-part-slot] {
458
465
  outline: var(--_invalid-edge-width) solid CanvasText;
459
466
  outline-offset: calc(
460
467
  -1 * (var(--slotted-control-border-width, 1px) + var(--_invalid-edge-width))
461
468
  );
462
469
  }
463
470
 
464
- [data-ui='otp-input'][data-part='root'][data-invalid]:has(> [data-part='input']:focus-visible)
465
- [data-part='slot'][data-current] {
471
+ [data-ui-otp-input][data-part-root][data-invalid]:has(> [data-part-input]:focus-visible)
472
+ [data-part-slot][data-current] {
466
473
  outline: calc(var(--slotted-focus-ring-width, 2px) + var(--_invalid-edge-width)) double
467
474
  var(--slotted-focus-ring-color, Highlight);
468
- outline-offset: var(--slotted-focus-ring-offset, 2px);
475
+ outline-offset: var(
476
+ --slotted-control-focus-ring-offset,
477
+ var(--slotted-focus-ring-offset, 2px)
478
+ );
469
479
  }
470
480
  }
471
481
 
@@ -475,7 +485,7 @@
475
485
  * ground says "not yours to change" and the ink says nothing at all. No
476
486
  * caret either — there is nothing to type.
477
487
  */
478
- [data-ui='otp-input'][data-part='root'][data-readonly] [data-part='slot'] {
488
+ [data-ui-otp-input][data-part-root][data-readonly] [data-part-slot] {
479
489
  background-color: var(
480
490
  --slotted-otp-input-readonly-background,
481
491
  var(--slotted-tone-secondary-subtle-hover)
@@ -483,7 +493,7 @@
483
493
  cursor: default;
484
494
  }
485
495
 
486
- [data-ui='otp-input'][data-part='root'][data-readonly] [data-part='slot']::after {
496
+ [data-ui-otp-input][data-part-root][data-readonly] [data-part-slot]::after {
487
497
  content: none;
488
498
  }
489
499
 
@@ -493,14 +503,14 @@
493
503
  * disabled `fieldset` disables every control inside it, and the control has
494
504
  * no way to know.
495
505
  */
496
- [data-ui='otp-input'][data-part='root'][data-disabled],
497
- [data-ui='otp-input'][data-part='root']:has(> [data-part='input']:disabled) {
506
+ [data-ui-otp-input][data-part-root][data-disabled],
507
+ [data-ui-otp-input][data-part-root]:has(> [data-part-input]:disabled) {
498
508
  color: var(--slotted-otp-input-disabled-color, var(--slotted-disabled-foreground));
499
509
  cursor: not-allowed;
500
510
  }
501
511
 
502
- [data-ui='otp-input'][data-part='root'][data-disabled] [data-part='slot'],
503
- [data-ui='otp-input'][data-part='root']:has(> [data-part='input']:disabled) [data-part='slot'] {
512
+ [data-ui-otp-input][data-part-root][data-disabled] [data-part-slot],
513
+ [data-ui-otp-input][data-part-root]:has(> [data-part-input]:disabled) [data-part-slot] {
504
514
  background-color: var(
505
515
  --slotted-otp-input-disabled-background,
506
516
  var(--slotted-disabled-background)
@@ -511,14 +521,14 @@
511
521
  }
512
522
 
513
523
  /**
514
- * The one rule the theme cannot write for the family. Forced colours give
524
+ * The one rule the theme cannot write for the family. Forced colors give
515
525
  * every text its system ink, and the transparent text laid over the boxes
516
526
  * would come back as a second copy of the code. The input keeps its own
517
- * colours — all of them transparent — and the boxes read the tokens the
527
+ * colors — all of them transparent — and the boxes read the tokens the
518
528
  * theme already remaps.
519
529
  */
520
530
  @media (forced-colors: active) {
521
- [data-ui='otp-input'] > [data-part='input'] {
531
+ [data-ui-otp-input] > [data-part-input] {
522
532
  forced-color-adjust: none;
523
533
  }
524
534
  }
@@ -4,6 +4,7 @@
4
4
  "--slotted-border-width-thin",
5
5
  "--slotted-control-border-color",
6
6
  "--slotted-control-border-width",
7
+ "--slotted-control-focus-ring-offset",
7
8
  "--slotted-control-font-family",
8
9
  "--slotted-control-gap-lg",
9
10
  "--slotted-control-gap-md",
package/src/page/page.css CHANGED
@@ -3,7 +3,7 @@
3
3
  * The column of a screen: who scrolls, how wide the content is, where the
4
4
  * footer stays, how much air the body has.
5
5
  *
6
- * main[data-ui=page]
6
+ * main[data-ui-page]
7
7
  * ├─ scroll ▸ page-header · body ▸ container ▸ …
8
8
  * └─ footer ▸ container ▸ actions
9
9
  *
@@ -13,7 +13,7 @@
13
13
  * `self` the scroll part is the scroller, the page is exactly as tall as its
14
14
  * parent lets it be, and the footer sits below the scroller in the flow.
15
15
  */
16
- [data-ui='page'] {
16
+ [data-ui-page] {
17
17
  --_ground: var(--slotted-page-background-sunken, var(--slotted-surface-sunken, Canvas));
18
18
  --_padding-block: var(--slotted-page-padding-block, var(--slotted-space-8, 1.5rem));
19
19
  --_footer-ground: var(--slotted-page-footer-background, var(--slotted-surface, Canvas));
@@ -54,11 +54,11 @@
54
54
  min-inline-size: 0;
55
55
  }
56
56
 
57
- [data-ui='page'][data-ground='surface'] {
57
+ [data-ui-page][data-ground='surface'] {
58
58
  --_ground: var(--slotted-page-background-surface, var(--slotted-surface, Canvas));
59
59
  }
60
60
 
61
- [data-ui='page'] > [data-part='scroll'] {
61
+ [data-ui-page] > [data-part-scroll] {
62
62
  display: flex;
63
63
  flex: 1 0 auto;
64
64
  flex-direction: column;
@@ -72,11 +72,11 @@
72
72
  overflow-anchor: none;
73
73
  }
74
74
 
75
- [data-ui='page'][data-scroll='self'] {
75
+ [data-ui-page][data-scroll='self'] {
76
76
  block-size: 100%;
77
77
  min-block-size: 0;
78
78
  }
79
- [data-ui='page'][data-scroll='self'] > [data-part='scroll'] {
79
+ [data-ui-page][data-scroll='self'] > [data-part-scroll] {
80
80
  flex: 1 1 auto;
81
81
  min-block-size: 0;
82
82
  overflow: auto;
@@ -85,7 +85,7 @@
85
85
 
86
86
  /* ── The body ────────────────────────────────────────────────────────── */
87
87
 
88
- [data-ui='page'] > [data-part='scroll'] > [data-part='body'] {
88
+ [data-ui-page] > [data-part-scroll] > [data-part-body] {
89
89
  flex: 1 0 auto;
90
90
  min-inline-size: 0;
91
91
  padding-block: var(--_padding-block);
@@ -102,19 +102,19 @@
102
102
  * chrome above a filled list left its rows 155 of 667 pixels.
103
103
  */
104
104
  @container slotted-page (width >= 600px) {
105
- [data-ui='page'][data-fill] > [data-part='scroll'] > [data-part='body'] {
105
+ [data-ui-page][data-fill] > [data-part-scroll] > [data-part-body] {
106
106
  display: flex;
107
107
  flex: 1 1 auto;
108
108
  flex-direction: column;
109
109
  min-block-size: 0;
110
110
  }
111
- [data-ui='page'][data-fill] > [data-part='scroll'] > [data-part='body'] > * {
111
+ [data-ui-page][data-fill] > [data-part-scroll] > [data-part-body] > * {
112
112
  flex: 1 1 auto;
113
113
  min-block-size: 0;
114
114
  }
115
115
  }
116
116
 
117
- [data-ui='page'][data-loading] > [data-part='scroll'] > [data-part='body'] {
117
+ [data-ui-page][data-loading] > [data-part-scroll] > [data-part-body] {
118
118
  cursor: progress;
119
119
  }
120
120
 
@@ -126,28 +126,42 @@
126
126
  * under it. It enters from below and leaves the same way; presence holds
127
127
  * it through the exit.
128
128
  */
129
- [data-ui='page'] > [data-part='footer'] {
129
+ [data-ui-page] > [data-part-footer] {
130
130
  background-color: var(--_footer-ground);
131
131
  border-block-start: var(--slotted-border-width-thin, 1px) solid var(--_footer-rule);
132
132
  inset-block-end: 0;
133
133
  min-inline-size: 0;
134
134
  padding-block: var(--_footer-padding-block);
135
135
  position: sticky;
136
- transition:
137
- translate var(--_duration) var(--_easing),
138
- opacity var(--_duration) var(--_easing);
136
+ transition: translate var(--_duration) var(--_easing);
139
137
  z-index: var(--slotted-z-index-sticky, 100);
140
138
  }
141
- [data-ui='page'][data-scroll='self'] > [data-part='footer'] {
139
+ [data-ui-page][data-scroll='self'] > [data-part-footer] {
142
140
  position: static;
143
141
  }
144
- [data-ui='page'] > [data-part='footer'][data-status='entering'],
145
- [data-ui='page'] > [data-part='footer'][data-status='exiting'] {
146
- opacity: 0;
142
+ [data-ui-page] > [data-part-footer][data-status='entering'],
143
+ [data-ui-page] > [data-part-footer][data-status='exiting'] {
147
144
  translate: 0 100%;
148
145
  }
149
146
 
150
- [data-ui='page'] > [data-part='footer'] > * > [data-part='actions'] {
147
+ /**
148
+ * A theme draws the footer as a material with a ground that has alpha and
149
+ * `--slotted-page-footer-backdrop-filter`, `none` unless set. The footer
150
+ * moves by its translate alone: Chromium draws no backdrop filter on an
151
+ * element whose opacity is below one.
152
+ */
153
+ [data-ui-page] > [data-part-footer] {
154
+ -webkit-backdrop-filter: var(--slotted-page-footer-backdrop-filter, none);
155
+ backdrop-filter: var(--slotted-page-footer-backdrop-filter, none);
156
+ }
157
+ @media (prefers-reduced-transparency: reduce), (forced-colors: active) {
158
+ [data-ui-page] > [data-part-footer] {
159
+ -webkit-backdrop-filter: none;
160
+ backdrop-filter: none;
161
+ }
162
+ }
163
+
164
+ [data-ui-page] > [data-part-footer] > * > [data-part-actions] {
151
165
  align-items: center;
152
166
  display: flex;
153
167
  flex-wrap: wrap;
@@ -165,14 +179,14 @@
165
179
  * they take 16. The steps under 4 keep their own value.
166
180
  */
167
181
  @container slotted-page (width < 600px) {
168
- [data-ui='page'] [data-ui='container'][data-inset='5'],
169
- [data-ui='page'] [data-ui='container'][data-inset='6'],
170
- [data-ui='page'] [data-ui='container'][data-inset='7'],
171
- [data-ui='page'] [data-ui='container'][data-inset='8'],
172
- [data-ui='page'] [data-ui='container'][data-inset='9'],
173
- [data-ui='page'] [data-ui='container'][data-inset='10'],
174
- [data-ui='page'] [data-ui='container'][data-inset='11'],
175
- [data-ui='page'] [data-ui='container'][data-inset='12'] {
182
+ [data-ui-page] [data-ui-container][data-inset='5'],
183
+ [data-ui-page] [data-ui-container][data-inset='6'],
184
+ [data-ui-page] [data-ui-container][data-inset='7'],
185
+ [data-ui-page] [data-ui-container][data-inset='8'],
186
+ [data-ui-page] [data-ui-container][data-inset='9'],
187
+ [data-ui-page] [data-ui-container][data-inset='10'],
188
+ [data-ui-page] [data-ui-container][data-inset='11'],
189
+ [data-ui-page] [data-ui-container][data-inset='12'] {
176
190
  --_inset: var(--slotted-space-4, 0.5rem);
177
191
  }
178
192
  }
@@ -7,6 +7,7 @@
7
7
  "--slotted-font-family-sans",
8
8
  "--slotted-page-background-sunken",
9
9
  "--slotted-page-background-surface",
10
+ "--slotted-page-footer-backdrop-filter",
10
11
  "--slotted-page-footer-background",
11
12
  "--slotted-page-footer-border",
12
13
  "--slotted-page-footer-padding-block",