@slotted/styles 0.1.0-beta.4 → 0.1.0-beta.40

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 (221) hide show
  1. package/package.json +21 -1
  2. package/src/accordion/accordion.css +31 -13
  3. package/src/accordion/accordion.tokens.json +2 -0
  4. package/src/action-bar/action-bar.css +47 -44
  5. package/src/action-bar/action-bar.tokens.json +1 -0
  6. package/src/action-sheet/action-sheet.css +39 -39
  7. package/src/alert/alert.css +97 -97
  8. package/src/alert/alert.tokens.json +6 -1
  9. package/src/app-shell/app-shell.css +472 -342
  10. package/src/app-shell/app-shell.tokens.json +6 -3
  11. package/src/aspect-ratio/aspect-ratio.css +24 -23
  12. package/src/attachment/attachment.css +118 -114
  13. package/src/avatar/avatar.css +97 -67
  14. package/src/avatar/avatar.tokens.json +8 -0
  15. package/src/avatar-group/avatar-group.css +22 -23
  16. package/src/badge/badge.css +58 -47
  17. package/src/badge/badge.tokens.json +6 -0
  18. package/src/breadcrumb/breadcrumb.css +52 -52
  19. package/src/button/button.css +408 -93
  20. package/src/button/button.tokens.json +13 -0
  21. package/src/button-group/button-group.css +80 -79
  22. package/src/button-group/button-group.tokens.json +1 -0
  23. package/src/calendar/calendar.css +594 -267
  24. package/src/calendar/calendar.tokens.json +35 -3
  25. package/src/card/card.css +133 -70
  26. package/src/card/card.tokens.json +1 -0
  27. package/src/carousel/carousel.css +158 -169
  28. package/src/cascader/cascader.css +174 -159
  29. package/src/cascader/cascader.tokens.json +2 -0
  30. package/src/chart/chart.css +300 -271
  31. package/src/chart/chart.tokens.json +5 -0
  32. package/src/checkbox/checkbox.css +190 -148
  33. package/src/checkbox/checkbox.tokens.json +4 -0
  34. package/src/checkbox-group/checkbox-group.css +7 -7
  35. package/src/clock/clock.css +246 -0
  36. package/src/clock/clock.tokens.json +44 -0
  37. package/src/code-block/code-block.css +85 -89
  38. package/src/collapsible/collapsible.css +273 -85
  39. package/src/collapsible/collapsible.tokens.json +6 -0
  40. package/src/color-picker/color-picker.css +106 -114
  41. package/src/column-manager/column-manager.css +111 -119
  42. package/src/combobox/combobox.css +219 -132
  43. package/src/combobox/combobox.tokens.json +4 -0
  44. package/src/command-palette/command-palette.css +214 -102
  45. package/src/command-palette/command-palette.tokens.json +4 -0
  46. package/src/container/container.css +27 -27
  47. package/src/context-menu/context-menu.css +9 -9
  48. package/src/currency-field/currency-field.css +119 -119
  49. package/src/currency-field/currency-field.tokens.json +1 -0
  50. package/src/dashboard-grid/dashboard-grid.css +231 -115
  51. package/src/dashboard-grid/dashboard-grid.tokens.json +3 -1
  52. package/src/data-grid/data-grid.css +637 -496
  53. package/src/data-grid/data-grid.tokens.json +5 -1
  54. package/src/data-list/data-list.css +93 -76
  55. package/src/data-list/data-list.tokens.json +2 -1
  56. package/src/date-field/date-field.css +62 -57
  57. package/src/date-field/date-field.tokens.json +1 -0
  58. package/src/date-picker/date-picker.css +31 -269
  59. package/src/date-picker/date-picker.tokens.json +1 -21
  60. package/src/date-range-picker/date-range-picker.css +72 -528
  61. package/src/date-range-picker/date-range-picker.tokens.json +1 -37
  62. package/src/datetime-field/datetime-field.css +90 -90
  63. package/src/datetime-field/datetime-field.tokens.json +1 -0
  64. package/src/datetime-picker/datetime-picker.css +49 -711
  65. package/src/datetime-picker/datetime-picker.tokens.json +1 -50
  66. package/src/datetime-range-picker/datetime-range-picker.css +60 -985
  67. package/src/datetime-range-picker/datetime-range-picker.tokens.json +1 -67
  68. package/src/description-list/description-list.css +120 -76
  69. package/src/description-list/description-list.tokens.json +1 -0
  70. package/src/detail-panel/detail-panel.css +86 -71
  71. package/src/detail-panel/detail-panel.tokens.json +2 -0
  72. package/src/dialog/dialog.css +462 -199
  73. package/src/dialog/dialog.tokens.json +10 -0
  74. package/src/divider/divider.css +20 -20
  75. package/src/drawer/drawer.css +736 -237
  76. package/src/drawer/drawer.tokens.json +15 -0
  77. package/src/entity-picker/entity-picker.css +402 -272
  78. package/src/entity-picker/entity-picker.tokens.json +6 -0
  79. package/src/event-calendar/event-calendar.css +357 -399
  80. package/src/field/field.css +106 -93
  81. package/src/field/field.tokens.json +2 -0
  82. package/src/field-group/field-group.css +58 -38
  83. package/src/field-group/field-group.tokens.json +3 -0
  84. package/src/filter-bar/filter-bar.css +224 -216
  85. package/src/floating-panel/floating-panel.css +147 -0
  86. package/src/floating-panel/floating-panel.tokens.json +32 -0
  87. package/src/form/form.css +103 -26
  88. package/src/form/form.tokens.json +6 -1
  89. package/src/fullscreen/fullscreen.css +26 -27
  90. package/src/grid/grid.css +32 -31
  91. package/src/highlight/highlight.css +11 -11
  92. package/src/hover-card/hover-card.css +9 -9
  93. package/src/icon/icon.css +67 -20
  94. package/src/icon/icon.tokens.json +1 -0
  95. package/src/image/image.css +42 -42
  96. package/src/import-export-center/import-export-center.css +147 -168
  97. package/src/import-export-center/import-export-center.tokens.json +1 -0
  98. package/src/inline/inline.css +29 -29
  99. package/src/inline-message/inline-message.css +162 -86
  100. package/src/inline-message/inline-message.tokens.json +5 -0
  101. package/src/kbd/kbd.css +63 -51
  102. package/src/kbd/kbd.tokens.json +4 -0
  103. package/src/link/link.css +54 -33
  104. package/src/link/link.tokens.json +4 -0
  105. package/src/list/list.css +55 -24
  106. package/src/list/list.tokens.json +2 -0
  107. package/src/list-item/list-item.css +195 -80
  108. package/src/list-item/list-item.tokens.json +10 -0
  109. package/src/listbox/listbox.css +121 -72
  110. package/src/listbox/listbox.tokens.json +6 -1
  111. package/src/loading-overlay/loading-overlay.css +86 -103
  112. package/src/markdown/markdown.css +20 -20
  113. package/src/media-viewer/media-viewer.css +790 -0
  114. package/src/media-viewer/media-viewer.tokens.json +53 -0
  115. package/src/menu/menu.css +166 -83
  116. package/src/menu/menu.tokens.json +3 -1
  117. package/src/menubar/menubar.css +16 -16
  118. package/src/message/message.css +1296 -1243
  119. package/src/message/message.tokens.json +14 -0
  120. package/src/message-scroller/message-scroller.css +323 -320
  121. package/src/meter/meter.css +136 -0
  122. package/src/meter/meter.tokens.json +23 -0
  123. package/src/multi-select/multi-select.css +246 -174
  124. package/src/multi-select/multi-select.tokens.json +3 -0
  125. package/src/navigation-menu/navigation-menu.css +170 -191
  126. package/src/navigation-menu/navigation-menu.tokens.json +1 -0
  127. package/src/notification-center/notification-center.css +155 -163
  128. package/src/notification-center/notification-center.tokens.json +4 -0
  129. package/src/number-field/number-field.css +93 -93
  130. package/src/number-field/number-field.tokens.json +1 -0
  131. package/src/otp-input/otp-input.css +74 -64
  132. package/src/otp-input/otp-input.tokens.json +1 -0
  133. package/src/page/page.css +109 -31
  134. package/src/page/page.tokens.json +8 -0
  135. package/src/page-header/page-header.css +342 -287
  136. package/src/page-header/page-header.tokens.json +6 -1
  137. package/src/pagination/pagination.css +75 -79
  138. package/src/picker-panel/picker-panel.css +1074 -0
  139. package/src/picker-panel/picker-panel.tokens.json +77 -0
  140. package/src/popover/popover.css +85 -65
  141. package/src/popover/popover.tokens.json +2 -0
  142. package/src/progress-indicator/progress-indicator.css +194 -137
  143. package/src/progress-indicator/progress-indicator.tokens.json +1 -0
  144. package/src/prompt-composer/prompt-composer.css +274 -116
  145. package/src/prompt-composer/prompt-composer.tokens.json +15 -0
  146. package/src/prose/prose.css +77 -82
  147. package/src/radio-group/radio-group.css +107 -112
  148. package/src/rating/rating.css +147 -143
  149. package/src/rating/rating.tokens.json +2 -0
  150. package/src/result-state/result-state.css +95 -102
  151. package/src/result-state/result-state.tokens.json +1 -0
  152. package/src/runtime-properties.mjs +44 -6
  153. package/src/saved-views/saved-views.css +43 -49
  154. package/src/scroll-area/scroll-area.css +50 -37
  155. package/src/section/section.css +311 -46
  156. package/src/section/section.tokens.json +13 -1
  157. package/src/segmented-control/segmented-control.css +221 -133
  158. package/src/segmented-control/segmented-control.tokens.json +7 -11
  159. package/src/select/select.css +226 -149
  160. package/src/select/select.tokens.json +4 -0
  161. package/src/side-navigation/side-navigation.css +204 -201
  162. package/src/side-navigation/side-navigation.tokens.json +2 -0
  163. package/src/skeleton/skeleton.css +76 -58
  164. package/src/slider/slider.css +108 -104
  165. package/src/slider/slider.tokens.json +1 -0
  166. package/src/sparkline/sparkline.css +75 -53
  167. package/src/sparkline/sparkline.tokens.json +2 -0
  168. package/src/spinner/spinner.css +83 -180
  169. package/src/spinner/spinner.tokens.json +0 -1
  170. package/src/split-button/split-button.css +34 -35
  171. package/src/split-button/split-button.tokens.json +1 -0
  172. package/src/splitter/splitter.css +47 -48
  173. package/src/stack/stack.css +26 -26
  174. package/src/stat-card/stat-card.css +420 -245
  175. package/src/stat-card/stat-card.tokens.json +8 -0
  176. package/src/status-indicator/status-indicator.css +126 -101
  177. package/src/status-indicator/status-indicator.tokens.json +0 -3
  178. package/src/stepper/stepper.css +78 -82
  179. package/src/switch/switch.css +143 -125
  180. package/src/switch/switch.tokens.json +4 -0
  181. package/src/table/table.css +653 -222
  182. package/src/table/table.tokens.json +10 -0
  183. package/src/table-of-contents/table-of-contents.css +60 -59
  184. package/src/table-of-contents/table-of-contents.tokens.json +1 -0
  185. package/src/tabs/tabs.css +327 -294
  186. package/src/tabs/tabs.tokens.json +7 -1
  187. package/src/tag/tag.css +113 -89
  188. package/src/tag/tag.tokens.json +11 -0
  189. package/src/tags-input/tags-input.css +152 -87
  190. package/src/tags-input/tags-input.tokens.json +7 -1
  191. package/src/text-field/text-field.css +146 -148
  192. package/src/text-field/text-field.tokens.json +1 -0
  193. package/src/textarea/textarea.css +38 -33
  194. package/src/textarea/textarea.tokens.json +1 -0
  195. package/src/time-field/time-field.css +82 -77
  196. package/src/time-field/time-field.tokens.json +1 -0
  197. package/src/time-picker/time-picker.css +30 -519
  198. package/src/time-picker/time-picker.tokens.json +1 -38
  199. package/src/time-range-picker/time-range-picker.css +53 -895
  200. package/src/time-range-picker/time-range-picker.tokens.json +1 -66
  201. package/src/timeline/timeline.css +280 -292
  202. package/src/timeline/timeline.tokens.json +5 -0
  203. package/src/toast/toast.css +139 -122
  204. package/src/toast/toast.tokens.json +7 -0
  205. package/src/toggle/toggle.css +34 -38
  206. package/src/toggle-group/toggle-group.css +73 -77
  207. package/src/toolbar/toolbar.css +49 -40
  208. package/src/toolbar/toolbar.tokens.json +2 -1
  209. package/src/tooltip/tooltip.css +95 -39
  210. package/src/tooltip/tooltip.tokens.json +1 -0
  211. package/src/top-navigation/top-navigation.css +253 -269
  212. package/src/top-navigation/top-navigation.tokens.json +1 -0
  213. package/src/tour/tour.css +68 -74
  214. package/src/tour/tour.tokens.json +1 -0
  215. package/src/transfer/transfer.css +164 -168
  216. package/src/tree/tree.css +118 -122
  217. package/src/typography/typography.css +67 -38
  218. package/src/typography/typography.tokens.json +2 -0
  219. package/src/upload/upload.css +256 -257
  220. package/src/visually-hidden/visually-hidden.css +1 -1
  221. 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));
@@ -22,6 +22,14 @@
22
22
  --slotted-page-footer-padding-block,
23
23
  var(--slotted-space-4, 0.5rem)
24
24
  );
25
+ /**
26
+ * The distance between two blocks of the body (cards, a row of figures, a
27
+ * bar of controls), and the larger one above a titled section that paints
28
+ * no surface. One decision on the theme, so screens with the same kind of
29
+ * content stand the same distance apart.
30
+ */
31
+ --_block-gap: var(--slotted-page-block-gap, var(--slotted-space-6, 1rem));
32
+ --_section-gap: var(--slotted-page-section-gap, var(--slotted-space-8, 1.5rem));
25
33
  --_duration: var(--slotted-duration-medium);
26
34
  --_easing: var(--slotted-easing-standard, cubic-bezier(0.2, 0, 0, 1));
27
35
  /**
@@ -29,6 +37,8 @@
29
37
  * header paints it, so the rows passing under the header are covered.
30
38
  */
31
39
  --slotted-page-ground: var(--_ground);
40
+ /* Published as a section's is, for the families that pin content over rows. */
41
+ --slotted-ground: var(--_ground);
32
42
  /**
33
43
  * The bridge to table. A table with `stickyTo="page"` stops its header
34
44
  * under the page's fixed chrome and its summary above the footer, and the
@@ -54,11 +64,11 @@
54
64
  min-inline-size: 0;
55
65
  }
56
66
 
57
- [data-ui='page'][data-ground='surface'] {
67
+ [data-ui-page][data-ground='surface'] {
58
68
  --_ground: var(--slotted-page-background-surface, var(--slotted-surface, Canvas));
59
69
  }
60
70
 
61
- [data-ui='page'] > [data-part='scroll'] {
71
+ [data-ui-page] > [data-part-scroll] {
62
72
  display: flex;
63
73
  flex: 1 0 auto;
64
74
  flex-direction: column;
@@ -72,11 +82,11 @@
72
82
  overflow-anchor: none;
73
83
  }
74
84
 
75
- [data-ui='page'][data-scroll='self'] {
85
+ [data-ui-page][data-scroll='self'] {
76
86
  block-size: 100%;
77
87
  min-block-size: 0;
78
88
  }
79
- [data-ui='page'][data-scroll='self'] > [data-part='scroll'] {
89
+ [data-ui-page][data-scroll='self'] > [data-part-scroll] {
80
90
  flex: 1 1 auto;
81
91
  min-block-size: 0;
82
92
  overflow: auto;
@@ -85,7 +95,7 @@
85
95
 
86
96
  /* ── The body ────────────────────────────────────────────────────────── */
87
97
 
88
- [data-ui='page'] > [data-part='scroll'] > [data-part='body'] {
98
+ [data-ui-page] > [data-part-scroll] > [data-part-body] {
89
99
  flex: 1 0 auto;
90
100
  min-inline-size: 0;
91
101
  padding-block: var(--_padding-block);
@@ -102,19 +112,66 @@
102
112
  * chrome above a filled list left its rows 155 of 667 pixels.
103
113
  */
104
114
  @container slotted-page (width >= 600px) {
105
- [data-ui='page'][data-fill] > [data-part='scroll'] > [data-part='body'] {
115
+ [data-ui-page][data-fill] > [data-part-scroll] > [data-part-body] {
106
116
  display: flex;
107
117
  flex: 1 1 auto;
108
118
  flex-direction: column;
109
119
  min-block-size: 0;
110
120
  }
111
- [data-ui='page'][data-fill] > [data-part='scroll'] > [data-part='body'] > * {
121
+ [data-ui-page][data-fill] > [data-part-scroll] > [data-part-body] > * {
112
122
  flex: 1 1 auto;
113
123
  min-block-size: 0;
114
124
  }
115
125
  }
116
126
 
117
- [data-ui='page'][data-loading] > [data-part='scroll'] > [data-part='body'] {
127
+ /**
128
+ * The blocks of the body are the direct children of its container, one per
129
+ * row of its grid at the block gap; a section without a surface that
130
+ * follows another block stands at the section gap. `flow="none"` leaves a
131
+ * body that is not a list of blocks (a workspace, a split) to its own
132
+ * layout.
133
+ */
134
+ /**
135
+ * The two gaps as resolved here, the compact step taken: a stack of blocks
136
+ * deeper in the page (a tab panel, a column beside an aside) reads them. On
137
+ * the body, because a container query reaches the page's descendants only.
138
+ */
139
+ [data-ui-page] > [data-part-scroll] > [data-part-body] {
140
+ --slotted-page-gap: var(--_block-gap);
141
+ --slotted-page-section-space: var(--_section-gap);
142
+ }
143
+
144
+ [data-ui-page]
145
+ > [data-part-scroll]
146
+ > [data-part-body]:not([data-flow='none'])
147
+ > [data-ui-container] {
148
+ row-gap: var(--_block-gap);
149
+ }
150
+
151
+ [data-ui-page]
152
+ > [data-part-scroll]
153
+ > [data-part-body]:not([data-flow='none'])
154
+ > [data-ui-container]
155
+ > [data-ui-section]:not([data-ground='surface']):not(:first-child) {
156
+ margin-block-start: calc(var(--_section-gap) - var(--_block-gap));
157
+ }
158
+
159
+ /**
160
+ * A level-1 detail panel is the page of one record, and its header and body
161
+ * hold containers of their own: inside the body's column the two insets
162
+ * added up, and the header's rule stopped one inset short of each edge. It
163
+ * takes the column's full track, as a breakout does, and its own containers
164
+ * carry the one inset.
165
+ */
166
+ [data-ui-page]
167
+ > [data-part-scroll]
168
+ > [data-part-body]
169
+ > [data-ui-container]
170
+ > [data-ui-detail-panel][data-level='1'] {
171
+ grid-column: full;
172
+ }
173
+
174
+ [data-ui-page][data-loading] > [data-part-scroll] > [data-part-body] {
118
175
  cursor: progress;
119
176
  }
120
177
 
@@ -126,28 +183,42 @@
126
183
  * under it. It enters from below and leaves the same way; presence holds
127
184
  * it through the exit.
128
185
  */
129
- [data-ui='page'] > [data-part='footer'] {
186
+ [data-ui-page] > [data-part-footer] {
130
187
  background-color: var(--_footer-ground);
131
188
  border-block-start: var(--slotted-border-width-thin, 1px) solid var(--_footer-rule);
132
189
  inset-block-end: 0;
133
190
  min-inline-size: 0;
134
191
  padding-block: var(--_footer-padding-block);
135
192
  position: sticky;
136
- transition:
137
- translate var(--_duration) var(--_easing),
138
- opacity var(--_duration) var(--_easing);
193
+ transition: translate var(--_duration) var(--_easing);
139
194
  z-index: var(--slotted-z-index-sticky, 100);
140
195
  }
141
- [data-ui='page'][data-scroll='self'] > [data-part='footer'] {
196
+ [data-ui-page][data-scroll='self'] > [data-part-footer] {
142
197
  position: static;
143
198
  }
144
- [data-ui='page'] > [data-part='footer'][data-status='entering'],
145
- [data-ui='page'] > [data-part='footer'][data-status='exiting'] {
146
- opacity: 0;
199
+ [data-ui-page] > [data-part-footer][data-status='entering'],
200
+ [data-ui-page] > [data-part-footer][data-status='exiting'] {
147
201
  translate: 0 100%;
148
202
  }
149
203
 
150
- [data-ui='page'] > [data-part='footer'] > * > [data-part='actions'] {
204
+ /**
205
+ * A theme draws the footer as a material with a ground that has alpha and
206
+ * `--slotted-page-footer-backdrop-filter`, `none` unless set. The footer
207
+ * moves by its translate alone: Chromium draws no backdrop filter on an
208
+ * element whose opacity is below one.
209
+ */
210
+ [data-ui-page] > [data-part-footer] {
211
+ -webkit-backdrop-filter: var(--slotted-page-footer-backdrop-filter, none);
212
+ backdrop-filter: var(--slotted-page-footer-backdrop-filter, none);
213
+ }
214
+ @media (prefers-reduced-transparency: reduce), (forced-colors: active) {
215
+ [data-ui-page] > [data-part-footer] {
216
+ -webkit-backdrop-filter: none;
217
+ backdrop-filter: none;
218
+ }
219
+ }
220
+
221
+ [data-ui-page] > [data-part-footer] > * > [data-part-actions] {
151
222
  align-items: center;
152
223
  display: flex;
153
224
  flex-wrap: wrap;
@@ -160,20 +231,27 @@
160
231
 
161
232
  /**
162
233
  * Below 600 pixels, the compact size class: the gutters of every container
163
- * in the page stop at step 4 of the space scale. At the default inset,
164
- * step 6, the two gutters took 32 of a 390-pixel phone's pixels; at step 4
165
- * they take 16. The steps under 4 keep their own value.
234
+ * in the page stop at `--slotted-page-inset-compact`, step 4 of the space
235
+ * scale unless a theme sets it. At the default inset, step 6, the two
236
+ * gutters took 32 of a 390-pixel phone's pixels; at step 4 they take 16. The
237
+ * steps under 4 keep their own value. The gaps of the body step down too.
166
238
  */
167
239
  @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'] {
176
- --_inset: var(--slotted-space-4, 0.5rem);
240
+ [data-ui-page] [data-ui-container][data-inset='5'],
241
+ [data-ui-page] [data-ui-container][data-inset='6'],
242
+ [data-ui-page] [data-ui-container][data-inset='7'],
243
+ [data-ui-page] [data-ui-container][data-inset='8'],
244
+ [data-ui-page] [data-ui-container][data-inset='9'],
245
+ [data-ui-page] [data-ui-container][data-inset='10'],
246
+ [data-ui-page] [data-ui-container][data-inset='11'],
247
+ [data-ui-page] [data-ui-container][data-inset='12'] {
248
+ --_inset: var(--slotted-page-inset-compact, var(--slotted-space-4, 0.5rem));
249
+ }
250
+
251
+ /* On the body: a container query reaches the page's descendants only. */
252
+ [data-ui-page] > [data-part-scroll] > [data-part-body] {
253
+ --_block-gap: var(--slotted-page-block-gap-compact, var(--slotted-space-5, 0.75rem));
254
+ --_section-gap: var(--slotted-page-section-gap-compact, var(--slotted-space-6, 1rem));
177
255
  }
178
256
  }
179
257
  }
@@ -7,11 +7,19 @@
7
7
  "--slotted-font-family-sans",
8
8
  "--slotted-page-background-sunken",
9
9
  "--slotted-page-background-surface",
10
+ "--slotted-page-block-gap",
11
+ "--slotted-page-block-gap-compact",
12
+ "--slotted-page-footer-backdrop-filter",
10
13
  "--slotted-page-footer-background",
11
14
  "--slotted-page-footer-border",
12
15
  "--slotted-page-footer-padding-block",
16
+ "--slotted-page-inset-compact",
13
17
  "--slotted-page-padding-block",
18
+ "--slotted-page-section-gap",
19
+ "--slotted-page-section-gap-compact",
14
20
  "--slotted-space-4",
21
+ "--slotted-space-5",
22
+ "--slotted-space-6",
15
23
  "--slotted-space-8",
16
24
  "--slotted-surface",
17
25
  "--slotted-surface-sunken",