@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.
- package/package.json +1 -1
- package/src/accordion/accordion.css +10 -10
- package/src/action-bar/action-bar.css +45 -42
- package/src/action-bar/action-bar.tokens.json +1 -0
- package/src/action-sheet/action-sheet.css +36 -36
- package/src/alert/alert.css +68 -67
- package/src/alert/alert.tokens.json +5 -0
- package/src/app-shell/app-shell.css +452 -314
- package/src/app-shell/app-shell.tokens.json +5 -2
- package/src/aspect-ratio/aspect-ratio.css +9 -9
- package/src/attachment/attachment.css +91 -99
- package/src/avatar/avatar.css +71 -41
- package/src/avatar/avatar.tokens.json +7 -0
- package/src/avatar-group/avatar-group.css +21 -22
- package/src/badge/badge.css +45 -37
- package/src/badge/badge.tokens.json +5 -0
- package/src/breadcrumb/breadcrumb.css +37 -37
- package/src/button/button.css +149 -68
- package/src/button/button.tokens.json +10 -0
- package/src/button-group/button-group.css +79 -74
- package/src/button-group/button-group.tokens.json +2 -0
- package/src/calendar/calendar.css +133 -103
- package/src/calendar/calendar.tokens.json +5 -1
- package/src/card/card.css +54 -61
- package/src/carousel/carousel.css +150 -161
- package/src/cascader/cascader.css +154 -153
- package/src/cascader/cascader.tokens.json +1 -0
- package/src/chart/chart.css +258 -248
- package/src/chart/chart.tokens.json +1 -0
- package/src/checkbox/checkbox.css +119 -124
- package/src/checkbox-group/checkbox-group.css +7 -7
- package/src/code-block/code-block.css +81 -85
- package/src/collapsible/collapsible.css +72 -76
- package/src/color-picker/color-picker.css +83 -91
- package/src/column-manager/column-manager.css +106 -114
- package/src/combobox/combobox.css +157 -124
- package/src/combobox/combobox.tokens.json +2 -0
- package/src/command-palette/command-palette.css +103 -90
- package/src/command-palette/command-palette.tokens.json +1 -0
- package/src/container/container.css +24 -24
- package/src/context-menu/context-menu.css +8 -8
- package/src/currency-field/currency-field.css +212 -88
- package/src/currency-field/currency-field.tokens.json +13 -0
- package/src/dashboard-grid/dashboard-grid.css +184 -114
- package/src/data-grid/data-grid.css +535 -470
- package/src/data-grid/data-grid.tokens.json +4 -0
- package/src/data-list/data-list.css +81 -70
- package/src/data-list/data-list.tokens.json +2 -1
- package/src/date-field/date-field.css +57 -52
- package/src/date-field/date-field.tokens.json +1 -0
- package/src/date-picker/date-picker.css +75 -57
- package/src/date-picker/date-picker.tokens.json +1 -0
- package/src/date-range-picker/date-range-picker.css +116 -118
- package/src/datetime-field/datetime-field.css +80 -80
- package/src/datetime-field/datetime-field.tokens.json +1 -0
- package/src/datetime-picker/datetime-picker.css +63 -63
- package/src/datetime-range-picker/datetime-range-picker.css +151 -156
- package/src/description-list/description-list.css +80 -65
- package/src/detail-panel/detail-panel.css +86 -71
- package/src/detail-panel/detail-panel.tokens.json +2 -0
- package/src/dialog/dialog.css +376 -153
- package/src/dialog/dialog.tokens.json +6 -0
- package/src/divider/divider.css +18 -18
- package/src/drawer/drawer.css +513 -217
- package/src/drawer/drawer.tokens.json +6 -0
- package/src/entity-picker/entity-picker.css +273 -256
- package/src/entity-picker/entity-picker.tokens.json +2 -0
- package/src/event-calendar/event-calendar.css +343 -385
- package/src/field/field.css +74 -78
- package/src/field-group/field-group.css +22 -25
- package/src/filter-bar/filter-bar.css +193 -209
- package/src/form/form.css +34 -24
- package/src/form/form.tokens.json +1 -0
- package/src/fullscreen/fullscreen.css +24 -25
- package/src/grid/grid.css +28 -28
- package/src/highlight/highlight.css +6 -6
- package/src/hover-card/hover-card.css +6 -6
- package/src/icon/icon.css +62 -15
- package/src/icon/icon.tokens.json +1 -0
- package/src/image/image.css +39 -39
- package/src/import-export-center/import-export-center.css +135 -156
- package/src/inline/inline.css +27 -27
- package/src/inline-message/inline-message.css +153 -77
- package/src/inline-message/inline-message.tokens.json +4 -0
- package/src/kbd/kbd.css +48 -36
- package/src/kbd/kbd.tokens.json +3 -0
- package/src/link/link.css +36 -15
- package/src/link/link.tokens.json +4 -0
- package/src/list/list.css +44 -17
- package/src/list/list.tokens.json +4 -0
- package/src/list-item/list-item.css +80 -66
- package/src/list-item/list-item.tokens.json +7 -0
- package/src/listbox/listbox.css +56 -59
- package/src/loading-overlay/loading-overlay.css +75 -92
- package/src/markdown/markdown.css +17 -17
- package/src/menu/menu.css +117 -74
- package/src/menu/menu.tokens.json +1 -0
- package/src/menubar/menubar.css +13 -13
- package/src/message/message.css +192 -202
- package/src/message/message.tokens.json +5 -0
- package/src/message-scroller/message-scroller.css +41 -42
- package/src/multi-select/multi-select.css +177 -160
- package/src/multi-select/multi-select.tokens.json +1 -0
- package/src/navigation-menu/navigation-menu.css +167 -188
- package/src/notification-center/notification-center.css +140 -148
- package/src/notification-center/notification-center.tokens.json +3 -0
- package/src/number-field/number-field.css +83 -83
- package/src/number-field/number-field.tokens.json +1 -0
- package/src/otp-input/otp-input.css +67 -57
- package/src/otp-input/otp-input.tokens.json +1 -0
- package/src/page/page.css +39 -23
- package/src/page/page.tokens.json +1 -0
- package/src/page-header/page-header.css +339 -284
- package/src/page-header/page-header.tokens.json +5 -0
- package/src/pagination/pagination.css +68 -72
- package/src/popover/popover.css +73 -61
- package/src/popover/popover.tokens.json +1 -0
- package/src/progress-indicator/progress-indicator.css +169 -113
- package/src/progress-indicator/progress-indicator.tokens.json +1 -0
- package/src/prompt-composer/prompt-composer.css +251 -104
- package/src/prompt-composer/prompt-composer.tokens.json +15 -0
- package/src/prose/prose.css +71 -75
- package/src/radio-group/radio-group.css +98 -103
- package/src/rating/rating.css +136 -132
- package/src/rating/rating.tokens.json +1 -0
- package/src/result-state/result-state.css +74 -77
- package/src/runtime-properties.mjs +2 -0
- package/src/saved-views/saved-views.css +41 -47
- package/src/scroll-area/scroll-area.css +39 -32
- package/src/section/section.css +178 -43
- package/src/section/section.tokens.json +8 -2
- package/src/segmented-control/segmented-control.css +254 -97
- package/src/segmented-control/segmented-control.tokens.json +15 -11
- package/src/select/select.css +153 -132
- package/src/select/select.tokens.json +2 -0
- package/src/side-navigation/side-navigation.css +179 -182
- package/src/side-navigation/side-navigation.tokens.json +1 -0
- package/src/skeleton/skeleton.css +47 -48
- package/src/slider/slider.css +86 -88
- package/src/sparkline/sparkline.css +62 -40
- package/src/sparkline/sparkline.tokens.json +2 -0
- package/src/spinner/spinner.css +83 -180
- package/src/spinner/spinner.tokens.json +0 -1
- package/src/split-button/split-button.css +30 -31
- package/src/split-button/split-button.tokens.json +1 -0
- package/src/splitter/splitter.css +35 -35
- package/src/stack/stack.css +24 -24
- package/src/stat-card/stat-card.css +380 -241
- package/src/stat-card/stat-card.tokens.json +5 -0
- package/src/status-indicator/status-indicator.css +107 -82
- package/src/status-indicator/status-indicator.tokens.json +0 -3
- package/src/stepper/stepper.css +58 -62
- package/src/switch/switch.css +86 -92
- package/src/table/table.css +340 -175
- package/src/table/table.tokens.json +6 -0
- package/src/table-of-contents/table-of-contents.css +57 -56
- package/src/table-of-contents/table-of-contents.tokens.json +1 -0
- package/src/tabs/tabs.css +322 -289
- package/src/tabs/tabs.tokens.json +7 -1
- package/src/tag/tag.css +91 -71
- package/src/tag/tag.tokens.json +9 -0
- package/src/tags-input/tags-input.css +147 -82
- package/src/tags-input/tags-input.tokens.json +7 -1
- package/src/text-field/text-field.css +134 -136
- package/src/text-field/text-field.tokens.json +1 -0
- package/src/textarea/textarea.css +33 -28
- package/src/textarea/textarea.tokens.json +1 -0
- package/src/time-field/time-field.css +74 -69
- package/src/time-field/time-field.tokens.json +1 -0
- package/src/time-picker/time-picker.css +58 -58
- package/src/time-range-picker/time-range-picker.css +128 -133
- package/src/timeline/timeline.css +254 -266
- package/src/timeline/timeline.tokens.json +5 -0
- package/src/toast/toast.css +115 -98
- package/src/toast/toast.tokens.json +6 -0
- package/src/toggle/toggle.css +62 -25
- package/src/toggle/toggle.tokens.json +8 -0
- package/src/toggle-group/toggle-group.css +106 -60
- package/src/toggle-group/toggle-group.tokens.json +10 -0
- package/src/toolbar/toolbar.css +30 -35
- package/src/tooltip/tooltip.css +59 -38
- package/src/tooltip/tooltip.tokens.json +1 -0
- package/src/top-navigation/top-navigation.css +243 -259
- package/src/tour/tour.css +51 -60
- package/src/transfer/transfer.css +160 -164
- package/src/tree/tree.css +103 -111
- package/src/typography/typography.css +40 -36
- package/src/typography/typography.tokens.json +1 -0
- package/src/upload/upload.css +224 -224
- package/src/visually-hidden/visually-hidden.css +1 -1
- package/src/wizard/wizard.css +185 -197
package/src/kbd/kbd.css
CHANGED
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
* The same length is the minimum inline size, which is what makes a
|
|
20
20
|
* one-letter cap square instead of a slot.
|
|
21
21
|
*/
|
|
22
|
-
[data-ui
|
|
22
|
+
[data-ui-kbd] {
|
|
23
23
|
/**
|
|
24
24
|
* The height comes from the space scale — 16, 20, 24, 28 — and not from
|
|
25
25
|
* the control geometry. A cap on its own is a glyph box, not a control,
|
|
@@ -59,6 +59,13 @@
|
|
|
59
59
|
--_block-size: var(--slotted-control-inner-size, var(--_size));
|
|
60
60
|
|
|
61
61
|
/**
|
|
62
|
+
* `--slotted-kbd-surface`, `--slotted-kbd-border-color` and
|
|
63
|
+
* `--slotted-kbd-color` are the family's own handle on its ground, rim and
|
|
64
|
+
* ink: a theme that re-tints the tone tokens inside a region (a translucent
|
|
65
|
+
* glass scope) sets them to keep a key cap opaque, while the tone tokens
|
|
66
|
+
* keep driving buttons and the other families. `outline` and `plain` own
|
|
67
|
+
* no ground, so they read the rim and the ink, and `plain` only the ink.
|
|
68
|
+
*
|
|
62
69
|
* The ground, the rim and the ink. `raised` is the default: the rim a
|
|
63
70
|
* control draws on three sides, and `--slotted-border-strong` below, the
|
|
64
71
|
* one border token the theme holds to 3:1 against the surface. The strong
|
|
@@ -66,14 +73,14 @@
|
|
|
66
73
|
* it is the shadow a key casts, and it is still the signal that says the
|
|
67
74
|
* word inside is a key.
|
|
68
75
|
*/
|
|
69
|
-
--_background: var(--slotted-surface-raised, Canvas);
|
|
76
|
+
--_background: var(--slotted-kbd-surface, var(--slotted-surface-raised, Canvas));
|
|
70
77
|
--_face: none;
|
|
71
|
-
--_border: var(--slotted-control-border-color, ButtonBorder);
|
|
78
|
+
--_border: var(--slotted-kbd-border-color, var(--slotted-control-border-color, ButtonBorder));
|
|
72
79
|
--_base: var(--slotted-border-strong, ButtonBorder);
|
|
73
|
-
--_color: var(--slotted-text, CanvasText);
|
|
80
|
+
--_color: var(--slotted-kbd-color, var(--slotted-text, CanvasText));
|
|
74
81
|
}
|
|
75
82
|
|
|
76
|
-
[data-ui
|
|
83
|
+
[data-ui-kbd][data-part-root] {
|
|
77
84
|
background-color: var(--_background);
|
|
78
85
|
background-image: var(--_face);
|
|
79
86
|
/**
|
|
@@ -167,7 +174,7 @@
|
|
|
167
174
|
* so the trim moves the ink and never the box.
|
|
168
175
|
*/
|
|
169
176
|
@supports (text-box: trim-both cap alphabetic) {
|
|
170
|
-
[data-ui
|
|
177
|
+
[data-ui-kbd] [data-part-legend] {
|
|
171
178
|
text-box: trim-both cap alphabetic;
|
|
172
179
|
}
|
|
173
180
|
|
|
@@ -179,7 +186,7 @@
|
|
|
179
186
|
* three sat visibly high in the cap. Left untrimmed, what gets centred is
|
|
180
187
|
* the em box, which is where a mark is drawn.
|
|
181
188
|
*/
|
|
182
|
-
[data-ui
|
|
189
|
+
[data-ui-kbd] [data-part-legend][data-legend='symbol'] {
|
|
183
190
|
text-box: normal;
|
|
184
191
|
}
|
|
185
192
|
}
|
|
@@ -193,7 +200,7 @@
|
|
|
193
200
|
* below the cap height of `K`, and at 1.15em `⌫` stood wider than the
|
|
194
201
|
* `Esc` beside it.
|
|
195
202
|
*/
|
|
196
|
-
[data-ui
|
|
203
|
+
[data-ui-kbd] [data-part-legend][data-legend='symbol'] {
|
|
197
204
|
font-family: var(--slotted-kbd-symbol-font-family, var(--slotted-font-family-sans, sans-serif));
|
|
198
205
|
font-size: 1.1em;
|
|
199
206
|
}
|
|
@@ -208,7 +215,7 @@
|
|
|
208
215
|
* whose accessible name disappears when a consumer forgets an import has no
|
|
209
216
|
* accessible name.
|
|
210
217
|
*/
|
|
211
|
-
[data-ui
|
|
218
|
+
[data-ui-kbd] [data-part-name] {
|
|
212
219
|
block-size: 1px;
|
|
213
220
|
border: 0;
|
|
214
221
|
clip-path: inset(50%);
|
|
@@ -233,10 +240,14 @@
|
|
|
233
240
|
* pinned. A key legend written in Arabic still renders right-to-left within
|
|
234
241
|
* its own cap, because that is a run of its own.
|
|
235
242
|
*/
|
|
236
|
-
[data-ui
|
|
243
|
+
[data-ui-kbd][data-part-shortcut] {
|
|
237
244
|
align-items: center;
|
|
238
245
|
direction: ltr;
|
|
239
246
|
display: inline-flex;
|
|
247
|
+
/* The root is a `kbd`: without these it keeps the user agent's monospace
|
|
248
|
+
face and its line box, which a key in the combination does not share. */
|
|
249
|
+
font-family: var(--slotted-kbd-font-family, var(--slotted-control-font-family, sans-serif));
|
|
250
|
+
line-height: 1;
|
|
240
251
|
/**
|
|
241
252
|
* A shortcut wider than its column wraps between caps and never inside
|
|
242
253
|
* one. The row gets taller; no instruction gets shorter.
|
|
@@ -262,11 +273,11 @@
|
|
|
262
273
|
* `⌥⇧⌘P` and `⌘K` read as one run of six keys. One step tighter is what says
|
|
263
274
|
* these caps are one shortcut. Everywhere else the `+` says it instead.
|
|
264
275
|
*/
|
|
265
|
-
[data-ui
|
|
276
|
+
[data-ui-kbd][data-part-shortcut][data-platform='mac'] {
|
|
266
277
|
--_gap: var(--slotted-space-1, 0.125rem);
|
|
267
278
|
}
|
|
268
279
|
|
|
269
|
-
[data-ui
|
|
280
|
+
[data-ui-kbd][data-part-shortcut][data-platform='mac'][data-size='inherit'] {
|
|
270
281
|
--_gap: 0.125em;
|
|
271
282
|
}
|
|
272
283
|
|
|
@@ -277,7 +288,7 @@
|
|
|
277
288
|
* announce for the same shortcut. The word is not hidden: it is the only
|
|
278
289
|
* thing that tells a sequence from a combination.
|
|
279
290
|
*/
|
|
280
|
-
[data-ui
|
|
291
|
+
[data-ui-kbd] [data-part-separator] {
|
|
281
292
|
color: var(--slotted-text-muted, GrayText);
|
|
282
293
|
flex: none;
|
|
283
294
|
font-family: var(--slotted-kbd-font-family, var(--slotted-control-font-family, sans-serif));
|
|
@@ -285,7 +296,7 @@
|
|
|
285
296
|
line-height: 1;
|
|
286
297
|
}
|
|
287
298
|
|
|
288
|
-
[data-ui
|
|
299
|
+
[data-ui-kbd] [data-part-separator][data-separator='then'] {
|
|
289
300
|
font-family: var(--slotted-control-font-family, sans-serif);
|
|
290
301
|
/**
|
|
291
302
|
* A step boundary is a bigger break than a key join, so it gets more air
|
|
@@ -307,7 +318,7 @@
|
|
|
307
318
|
* scale starts at 12px, and 12px in a 16-pixel cap left one pixel of air
|
|
308
319
|
* above an ascender, so this step writes the one size the scale lacks.
|
|
309
320
|
*/
|
|
310
|
-
[data-ui
|
|
321
|
+
[data-ui-kbd][data-size='xs'] {
|
|
311
322
|
--_size: var(--slotted-space-6, 1rem);
|
|
312
323
|
--_font-size: 0.6875rem;
|
|
313
324
|
--_inset-inline: var(--slotted-space-2, 0.25rem);
|
|
@@ -315,13 +326,13 @@
|
|
|
315
326
|
--_gap: var(--slotted-space-1, 0.125rem);
|
|
316
327
|
}
|
|
317
328
|
|
|
318
|
-
[data-ui
|
|
329
|
+
[data-ui-kbd][data-size='sm'] {
|
|
319
330
|
--_size: var(--slotted-space-7, 1.25rem);
|
|
320
331
|
--_font-size: var(--slotted-control-font-size-sm, 12px);
|
|
321
332
|
--_inset-inline: var(--slotted-space-2, 0.25rem);
|
|
322
333
|
}
|
|
323
334
|
|
|
324
|
-
[data-ui
|
|
335
|
+
[data-ui-kbd][data-size='lg'] {
|
|
325
336
|
--_size: calc(var(--slotted-space-8, 1.5rem) + var(--slotted-space-2, 0.25rem));
|
|
326
337
|
--_font-size: var(--slotted-control-font-size-lg, 14px);
|
|
327
338
|
--_inset-inline: var(--slotted-space-4, 0.5rem);
|
|
@@ -341,7 +352,7 @@
|
|
|
341
352
|
* insets plus edges, made 25.8px on 16px text set at 24px lines. The radius
|
|
342
353
|
* is a quarter of that height, the proportion of the absolute steps.
|
|
343
354
|
*/
|
|
344
|
-
[data-ui
|
|
355
|
+
[data-ui-kbd][data-size='inherit'] {
|
|
345
356
|
--_size: 1.5em;
|
|
346
357
|
--_font-size: 0.8em;
|
|
347
358
|
--_inset-inline: 0.4em;
|
|
@@ -351,7 +362,7 @@
|
|
|
351
362
|
|
|
352
363
|
/* A fractional height puts both horizontal edges between pixels. */
|
|
353
364
|
@supports (inline-size: round(nearest, 1.5em, 1px)) {
|
|
354
|
-
[data-ui
|
|
365
|
+
[data-ui-kbd][data-size='inherit'] {
|
|
355
366
|
--_size: round(nearest, 1.5em, 1px);
|
|
356
367
|
}
|
|
357
368
|
}
|
|
@@ -363,7 +374,7 @@
|
|
|
363
374
|
* outlined one, and it is why `raised` is the default: it is the only value
|
|
364
375
|
* that reads as an object rather than as a box drawn round a word.
|
|
365
376
|
*/
|
|
366
|
-
[data-ui
|
|
377
|
+
[data-ui-kbd][data-variant='raised'] {
|
|
367
378
|
--_base-width: var(--slotted-kbd-base-width, var(--slotted-border-width-thick, 2px));
|
|
368
379
|
/**
|
|
369
380
|
* The skirt. The lower part of the face turns a tenth of the way toward
|
|
@@ -390,11 +401,12 @@
|
|
|
390
401
|
* survive an unknown surface was the one variant that could not. A box that
|
|
391
402
|
* borrows its ground borrows its foreground with it.
|
|
392
403
|
*/
|
|
393
|
-
[data-ui
|
|
404
|
+
[data-ui-kbd][data-variant='outline'] {
|
|
394
405
|
--_background: transparent;
|
|
395
406
|
/* The edge is all this variant draws, so it is the strong one all round. */
|
|
396
|
-
--_border: var(--slotted-border-strong, ButtonBorder);
|
|
397
|
-
--
|
|
407
|
+
--_border: var(--slotted-kbd-border-color, var(--slotted-border-strong, ButtonBorder));
|
|
408
|
+
--_base: var(--_border);
|
|
409
|
+
--_color: var(--slotted-kbd-color, inherit);
|
|
398
410
|
}
|
|
399
411
|
|
|
400
412
|
/**
|
|
@@ -403,8 +415,8 @@
|
|
|
403
415
|
* panel, where a key painted with it would disappear; the neutral tone's
|
|
404
416
|
* surface is the step `badge` calibrated to read on both.
|
|
405
417
|
*/
|
|
406
|
-
[data-ui
|
|
407
|
-
--_background: var(--slotted-tone-secondary-surface);
|
|
418
|
+
[data-ui-kbd][data-variant='soft'] {
|
|
419
|
+
--_background: var(--slotted-kbd-surface, var(--slotted-tone-secondary-surface));
|
|
408
420
|
/**
|
|
409
421
|
* The tinted key draws the tone's own edge, as every `badge` variant does,
|
|
410
422
|
* and it is not decoration here either. In the `high-contrast` scheme the
|
|
@@ -413,9 +425,9 @@
|
|
|
413
425
|
* edge is also what carries it through forced colours, where the ground
|
|
414
426
|
* flattens to `Canvas` for the same reason.
|
|
415
427
|
*/
|
|
416
|
-
--_border: var(--slotted-tone-secondary-border);
|
|
417
|
-
--_base: var(--
|
|
418
|
-
--_color: var(--slotted-tone-secondary-text);
|
|
428
|
+
--_border: var(--slotted-kbd-border-color, var(--slotted-tone-secondary-border));
|
|
429
|
+
--_base: var(--_border);
|
|
430
|
+
--_color: var(--slotted-kbd-color, var(--slotted-tone-secondary-text));
|
|
419
431
|
}
|
|
420
432
|
|
|
421
433
|
/**
|
|
@@ -431,14 +443,14 @@
|
|
|
431
443
|
* also what makes the row work: a menu item that dims dims its shortcut with
|
|
432
444
|
* it, with no state to set and nothing left bright at the end of a grey row.
|
|
433
445
|
*/
|
|
434
|
-
[data-ui
|
|
446
|
+
[data-ui-kbd][data-variant='plain'] {
|
|
435
447
|
--_background: transparent;
|
|
436
448
|
--_border: transparent;
|
|
437
449
|
--_base: transparent;
|
|
438
|
-
--_color: inherit;
|
|
450
|
+
--_color: var(--slotted-kbd-color, inherit);
|
|
439
451
|
}
|
|
440
452
|
|
|
441
|
-
[data-ui
|
|
453
|
+
[data-ui-kbd][data-part-root][data-variant='plain'] {
|
|
442
454
|
min-inline-size: 0;
|
|
443
455
|
padding-inline: 0;
|
|
444
456
|
}
|
|
@@ -451,7 +463,7 @@
|
|
|
451
463
|
* belongs to owns the semantics: `kbd` may carry only the global ARIA
|
|
452
464
|
* attributes, and `aria-disabled` is not one of them.
|
|
453
465
|
*/
|
|
454
|
-
[data-ui
|
|
466
|
+
[data-ui-kbd][data-disabled] {
|
|
455
467
|
--_background: var(--slotted-disabled-background, Canvas);
|
|
456
468
|
--_face: none;
|
|
457
469
|
--_border: var(--slotted-disabled-border, GrayText);
|
|
@@ -459,7 +471,7 @@
|
|
|
459
471
|
--_color: var(--slotted-disabled-foreground, GrayText);
|
|
460
472
|
}
|
|
461
473
|
|
|
462
|
-
[data-ui
|
|
474
|
+
[data-ui-kbd][data-disabled] [data-part-separator] {
|
|
463
475
|
color: var(--slotted-disabled-foreground, GrayText);
|
|
464
476
|
}
|
|
465
477
|
|
|
@@ -468,12 +480,12 @@
|
|
|
468
480
|
* that filled itself grey would be a grey rectangle on whatever surface it
|
|
469
481
|
* was placed over, which is the one thing the variant exists to avoid.
|
|
470
482
|
*/
|
|
471
|
-
[data-ui
|
|
472
|
-
[data-ui
|
|
483
|
+
[data-ui-kbd][data-variant='outline'][data-disabled],
|
|
484
|
+
[data-ui-kbd][data-variant='plain'][data-disabled] {
|
|
473
485
|
--_background: transparent;
|
|
474
486
|
}
|
|
475
487
|
|
|
476
|
-
[data-ui
|
|
488
|
+
[data-ui-kbd][data-variant='plain'][data-disabled] {
|
|
477
489
|
--_border: transparent;
|
|
478
490
|
--_base: transparent;
|
|
479
491
|
}
|
package/src/kbd/kbd.tokens.json
CHANGED
|
@@ -16,10 +16,13 @@
|
|
|
16
16
|
"--slotted-font-family-sans",
|
|
17
17
|
"--slotted-font-weight-medium",
|
|
18
18
|
"--slotted-kbd-base-width",
|
|
19
|
+
"--slotted-kbd-border-color",
|
|
19
20
|
"--slotted-kbd-border-width",
|
|
21
|
+
"--slotted-kbd-color",
|
|
20
22
|
"--slotted-kbd-font-family",
|
|
21
23
|
"--slotted-kbd-font-weight",
|
|
22
24
|
"--slotted-kbd-radius",
|
|
25
|
+
"--slotted-kbd-surface",
|
|
23
26
|
"--slotted-kbd-symbol-font-family",
|
|
24
27
|
"--slotted-radius-lg",
|
|
25
28
|
"--slotted-radius-md",
|
package/src/link/link.css
CHANGED
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
* theme already holds to the highest ratio in each scheme cannot fail the
|
|
20
20
|
* same way.
|
|
21
21
|
*/
|
|
22
|
-
[data-ui
|
|
22
|
+
[data-ui-link] {
|
|
23
23
|
--_strong: var(--slotted-text, CanvasText);
|
|
24
24
|
--_rest: var(--slotted-link-color, var(--slotted-tone-accent-text, LinkText));
|
|
25
25
|
--_hover: var(
|
|
@@ -80,7 +80,28 @@
|
|
|
80
80
|
* pointer. Fluent calls it `subtle`, Primer `muted`, Polaris `monochrome`,
|
|
81
81
|
* and all three describe the same two colours.
|
|
82
82
|
*/
|
|
83
|
-
|
|
83
|
+
/**
|
|
84
|
+
* The text size. Unset, a link takes the size an action slot states for the
|
|
85
|
+
* controls it holds (`--slotted-link-font-size`), or else its parent's; a
|
|
86
|
+
* `size` states its own.
|
|
87
|
+
*/
|
|
88
|
+
[data-ui-link] {
|
|
89
|
+
font-size: var(--slotted-link-font-size, inherit);
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
[data-ui-link][data-size='xs'] {
|
|
93
|
+
font-size: var(--slotted-font-size-xs, 0.75rem);
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
[data-ui-link][data-size='sm'] {
|
|
97
|
+
font-size: var(--slotted-font-size-sm, 0.8125rem);
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
[data-ui-link][data-size='md'] {
|
|
101
|
+
font-size: var(--slotted-font-size-md, 0.875rem);
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
[data-ui-link][data-variant='neutral'] {
|
|
84
105
|
--_rest: var(--slotted-link-color, currentColor);
|
|
85
106
|
--_hover: var(--slotted-link-color-hover, var(--slotted-tone-accent-text, LinkText));
|
|
86
107
|
--_active: var(
|
|
@@ -94,7 +115,7 @@
|
|
|
94
115
|
* ground, so hover has nowhere further to go and the underline carries the
|
|
95
116
|
* state on its own.
|
|
96
117
|
*/
|
|
97
|
-
[data-ui
|
|
118
|
+
[data-ui-link][data-variant='inverse'] {
|
|
98
119
|
--_strong: var(--slotted-text-inverse, Canvas);
|
|
99
120
|
--_rest: var(--slotted-link-color, var(--slotted-text-inverse, Canvas));
|
|
100
121
|
}
|
|
@@ -108,12 +129,12 @@
|
|
|
108
129
|
* where there is no sentence for it to disappear into.
|
|
109
130
|
*/
|
|
110
131
|
|
|
111
|
-
[data-ui
|
|
112
|
-
[data-ui
|
|
132
|
+
[data-ui-link][data-underline='hover'],
|
|
133
|
+
[data-ui-link][data-underline='none'] {
|
|
113
134
|
text-decoration-line: none;
|
|
114
135
|
}
|
|
115
136
|
|
|
116
|
-
[data-ui
|
|
137
|
+
[data-ui-link][data-underline='hover']:not([data-disabled]):hover {
|
|
117
138
|
text-decoration-line: underline;
|
|
118
139
|
}
|
|
119
140
|
|
|
@@ -122,7 +143,7 @@
|
|
|
122
143
|
* `none` is left alone: it says the underline does not exist, not that it is
|
|
123
144
|
* waiting for something.
|
|
124
145
|
*/
|
|
125
|
-
[data-ui
|
|
146
|
+
[data-ui-link][data-underline='hover']:focus-visible {
|
|
126
147
|
text-decoration-line: underline;
|
|
127
148
|
}
|
|
128
149
|
|
|
@@ -134,19 +155,19 @@
|
|
|
134
155
|
* in this repository can read this rule back.
|
|
135
156
|
*/
|
|
136
157
|
|
|
137
|
-
[data-ui
|
|
158
|
+
[data-ui-link][data-visited]:visited {
|
|
138
159
|
color: var(--_visited);
|
|
139
160
|
}
|
|
140
161
|
|
|
141
162
|
/* ── Hover and press, held back for disabled ────────────────────────────── */
|
|
142
163
|
|
|
143
|
-
[data-ui
|
|
164
|
+
[data-ui-link]:not([data-disabled]):hover {
|
|
144
165
|
--_underline: currentColor;
|
|
145
166
|
|
|
146
167
|
color: var(--_hover);
|
|
147
168
|
}
|
|
148
169
|
|
|
149
|
-
[data-ui
|
|
170
|
+
[data-ui-link]:not([data-disabled]):active {
|
|
150
171
|
--_underline: currentColor;
|
|
151
172
|
|
|
152
173
|
color: var(--_active);
|
|
@@ -159,7 +180,7 @@
|
|
|
159
180
|
* offset reaches into the line above.
|
|
160
181
|
*/
|
|
161
182
|
|
|
162
|
-
[data-ui
|
|
183
|
+
[data-ui-link]:focus-visible {
|
|
163
184
|
outline: var(--slotted-focus-ring-width, 2px) solid var(--slotted-focus-ring-color, Highlight);
|
|
164
185
|
outline-offset: var(--slotted-link-focus-ring-offset, 1px);
|
|
165
186
|
}
|
|
@@ -172,7 +193,7 @@
|
|
|
172
193
|
* reads as a link that is not available rather than as plain text.
|
|
173
194
|
*/
|
|
174
195
|
|
|
175
|
-
[data-ui
|
|
196
|
+
[data-ui-link][data-disabled] {
|
|
176
197
|
color: var(--slotted-link-color-disabled, var(--slotted-disabled-foreground, GrayText));
|
|
177
198
|
cursor: not-allowed;
|
|
178
199
|
}
|
|
@@ -196,7 +217,7 @@
|
|
|
196
217
|
* `--slotted-icon-size`, which the part states at the size of the text.
|
|
197
218
|
*/
|
|
198
219
|
|
|
199
|
-
[data-ui
|
|
220
|
+
[data-ui-link] [data-part-external-icon] {
|
|
200
221
|
--slotted-icon-size: var(--slotted-link-external-icon-size, 1em);
|
|
201
222
|
|
|
202
223
|
margin-inline-start: var(--slotted-link-external-icon-gap, 0.15em);
|
|
@@ -217,7 +238,7 @@
|
|
|
217
238
|
* it.
|
|
218
239
|
*/
|
|
219
240
|
|
|
220
|
-
[data-ui
|
|
241
|
+
[data-ui-link][aria-current]:not([aria-current='false']) {
|
|
221
242
|
--_rest: var(--slotted-link-color-current, var(--slotted-text, CanvasText));
|
|
222
243
|
}
|
|
223
244
|
|
|
@@ -230,7 +251,7 @@
|
|
|
230
251
|
*/
|
|
231
252
|
|
|
232
253
|
@media (forced-colors: active) {
|
|
233
|
-
[data-ui
|
|
254
|
+
[data-ui-link] {
|
|
234
255
|
text-decoration-line: underline;
|
|
235
256
|
}
|
|
236
257
|
}
|
|
@@ -5,6 +5,9 @@
|
|
|
5
5
|
"--slotted-easing-standard",
|
|
6
6
|
"--slotted-focus-ring-color",
|
|
7
7
|
"--slotted-focus-ring-width",
|
|
8
|
+
"--slotted-font-size-md",
|
|
9
|
+
"--slotted-font-size-sm",
|
|
10
|
+
"--slotted-font-size-xs",
|
|
8
11
|
"--slotted-link-color",
|
|
9
12
|
"--slotted-link-color-active",
|
|
10
13
|
"--slotted-link-color-current",
|
|
@@ -14,6 +17,7 @@
|
|
|
14
17
|
"--slotted-link-external-icon-gap",
|
|
15
18
|
"--slotted-link-external-icon-size",
|
|
16
19
|
"--slotted-link-focus-ring-offset",
|
|
20
|
+
"--slotted-link-font-size",
|
|
17
21
|
"--slotted-link-radius",
|
|
18
22
|
"--slotted-link-underline-color",
|
|
19
23
|
"--slotted-link-underline-offset",
|
package/src/list/list.css
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* ── The set ────────────────────────────────────────────────────────────
|
|
4
4
|
*
|
|
5
5
|
* A vertical run of related rows. The rows are `list-item`, a family of its
|
|
6
|
-
* own, and **no selector here reaches `[data-ui
|
|
6
|
+
* own, and **no selector here reaches `[data-ui-list-item]`** — the rule
|
|
7
7
|
* `accordion` and `collapsible` set for the same relationship. What the set
|
|
8
8
|
* decides it hands to each row through the binding, as a `data-` attribute
|
|
9
9
|
* the row's own stylesheet reads.
|
|
@@ -19,8 +19,8 @@
|
|
|
19
19
|
* here and on `section-list`, which is what Safari and VoiceOver need once
|
|
20
20
|
* the marker is removed.
|
|
21
21
|
*/
|
|
22
|
-
[data-ui
|
|
23
|
-
[data-ui
|
|
22
|
+
[data-ui-list][data-part-root],
|
|
23
|
+
[data-ui-list] [data-part-section-list] {
|
|
24
24
|
/* The row's own number. The set opens the count; each group opens its own,
|
|
25
25
|
so a numbered list of groups restarts rather than running through. */
|
|
26
26
|
counter-reset: slotted-list-item;
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
padding-inline: 0;
|
|
38
38
|
}
|
|
39
39
|
|
|
40
|
-
[data-ui
|
|
40
|
+
[data-ui-list][data-part-root] {
|
|
41
41
|
/* The distance between rows, and it is spent only by `separated`. The other
|
|
42
42
|
three variants separate rows with a line or with nothing, so a gap there
|
|
43
43
|
would be space the reader cannot account for. */
|
|
@@ -79,7 +79,7 @@
|
|
|
79
79
|
* roomy settings list stand on the same page without either of them lying
|
|
80
80
|
* about the density.
|
|
81
81
|
*/
|
|
82
|
-
[data-ui
|
|
82
|
+
[data-ui-list][data-part-root][data-size='sm'] {
|
|
83
83
|
--_gap: var(--slotted-list-gap-sm, var(--slotted-space-2, 0.25rem));
|
|
84
84
|
--_section-inset-block: var(
|
|
85
85
|
--slotted-list-section-padding-block-sm,
|
|
@@ -92,7 +92,7 @@
|
|
|
92
92
|
--_empty-inset: var(--slotted-list-empty-padding-sm, var(--slotted-space-6, 1rem));
|
|
93
93
|
}
|
|
94
94
|
|
|
95
|
-
[data-ui
|
|
95
|
+
[data-ui-list][data-part-root][data-size='lg'] {
|
|
96
96
|
--_gap: var(--slotted-list-gap-lg, var(--slotted-space-4, 0.5rem));
|
|
97
97
|
--_section-inset-block: var(
|
|
98
98
|
--slotted-list-section-padding-block-lg,
|
|
@@ -115,7 +115,7 @@
|
|
|
115
115
|
*
|
|
116
116
|
* `plain` and `ruled` draw nothing on the set.
|
|
117
117
|
*/
|
|
118
|
-
[data-ui
|
|
118
|
+
[data-ui-list][data-part-root][data-variant='framed'] {
|
|
119
119
|
background-color: var(--_surface);
|
|
120
120
|
border: var(--_frame-width) solid var(--_frame-color);
|
|
121
121
|
border-radius: var(--_frame-radius);
|
|
@@ -125,7 +125,7 @@
|
|
|
125
125
|
overflow: clip;
|
|
126
126
|
}
|
|
127
127
|
|
|
128
|
-
[data-ui
|
|
128
|
+
[data-ui-list][data-part-root][data-variant='separated'] {
|
|
129
129
|
row-gap: var(--_gap);
|
|
130
130
|
}
|
|
131
131
|
|
|
@@ -135,7 +135,7 @@
|
|
|
135
135
|
* React Aria each leave the heading loose among the rows instead, so a reader
|
|
136
136
|
* hears a heading inside a set rather than a set with a name.
|
|
137
137
|
*/
|
|
138
|
-
[data-ui
|
|
138
|
+
[data-ui-list] [data-part-section] {
|
|
139
139
|
display: flex;
|
|
140
140
|
flex-direction: column;
|
|
141
141
|
min-inline-size: 0;
|
|
@@ -143,8 +143,8 @@
|
|
|
143
143
|
|
|
144
144
|
/* A separated set gaps its groups too, and a group gaps its own rows. Both
|
|
145
145
|
read the one distance the root declared. */
|
|
146
|
-
[data-ui
|
|
147
|
-
[data-ui
|
|
146
|
+
[data-ui-list][data-variant='separated'] [data-part-section],
|
|
147
|
+
[data-ui-list][data-variant='separated'] [data-part-section-list] {
|
|
148
148
|
row-gap: var(--_gap);
|
|
149
149
|
}
|
|
150
150
|
|
|
@@ -153,7 +153,7 @@
|
|
|
153
153
|
* titles under it stand in one column, which is the alignment that makes a
|
|
154
154
|
* grouped list read as one list rather than as several.
|
|
155
155
|
*/
|
|
156
|
-
[data-ui
|
|
156
|
+
[data-ui-list] [data-part-section-label] {
|
|
157
157
|
color: var(--_section-color);
|
|
158
158
|
font-size: var(--_section-font-size);
|
|
159
159
|
font-weight: var(--_section-weight);
|
|
@@ -178,8 +178,8 @@
|
|
|
178
178
|
* `disableGutters` leaves out: it removes the padding and leaves the line
|
|
179
179
|
* inset, so a flush list draws a rule stopping short of the box it is in.
|
|
180
180
|
*/
|
|
181
|
-
[data-ui
|
|
182
|
-
[data-ui
|
|
181
|
+
[data-ui-list][data-inset] [data-part-section-label],
|
|
182
|
+
[data-ui-list][data-inset] [data-part-empty] {
|
|
183
183
|
padding-inline: 0;
|
|
184
184
|
}
|
|
185
185
|
|
|
@@ -193,7 +193,34 @@
|
|
|
193
193
|
* level is the library's own sticky step, so a heading never rises above an
|
|
194
194
|
* overlay that is above the page.
|
|
195
195
|
*/
|
|
196
|
-
|
|
196
|
+
/* A heading with an end sets the name at the start and the end content on
|
|
197
|
+
the same line, at the end. */
|
|
198
|
+
[data-ui-list] [data-part-section-label]:has(> [data-part-section-end]) {
|
|
199
|
+
align-items: baseline;
|
|
200
|
+
display: flex;
|
|
201
|
+
gap: var(--slotted-space-4, 0.5rem);
|
|
202
|
+
justify-content: space-between;
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
[data-ui-list] [data-part-section-end] {
|
|
206
|
+
flex: none;
|
|
207
|
+
font-variant-numeric: tabular-nums;
|
|
208
|
+
white-space: nowrap;
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
/**
|
|
212
|
+
* `ruled`: the name in the text colour over a rule, with no ground behind it
|
|
213
|
+
* — a day of a phone list with its balance at the end. The sticky ground is
|
|
214
|
+
* still the set's surface, so the rows passing under it are covered.
|
|
215
|
+
*/
|
|
216
|
+
[data-ui-list] [data-part-section-label][data-variant='ruled'] {
|
|
217
|
+
border-block-end: var(--slotted-border-width-thin, 1px) solid
|
|
218
|
+
var(--slotted-list-section-rule-color, var(--slotted-border-subtle, GrayText));
|
|
219
|
+
color: var(--slotted-list-section-ruled-color, var(--slotted-text, CanvasText));
|
|
220
|
+
font-weight: var(--slotted-font-weight-medium, 500);
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
[data-ui-list] [data-part-section-label][data-sticky] {
|
|
197
224
|
background-color: var(--_surface);
|
|
198
225
|
inset-block-start: 0;
|
|
199
226
|
position: sticky;
|
|
@@ -209,7 +236,7 @@
|
|
|
209
236
|
* The family supplies the box, the height and the muted ink. The words are
|
|
210
237
|
* the page's, and `result-state` is what goes in here.
|
|
211
238
|
*/
|
|
212
|
-
[data-ui
|
|
239
|
+
[data-ui-list] [data-part-empty] {
|
|
213
240
|
align-items: center;
|
|
214
241
|
color: var(--_empty-color);
|
|
215
242
|
display: flex;
|
|
@@ -234,7 +261,7 @@
|
|
|
234
261
|
* loading panel. What is left for the set is the pointer, which is the one
|
|
235
262
|
* signal that belongs to the box rather than to its content.
|
|
236
263
|
*/
|
|
237
|
-
[data-ui
|
|
264
|
+
[data-ui-list][data-part-root][data-loading] {
|
|
238
265
|
cursor: progress;
|
|
239
266
|
}
|
|
240
267
|
}
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
"--slotted-control-padding-inline-md",
|
|
6
6
|
"--slotted-control-padding-inline-sm",
|
|
7
7
|
"--slotted-font-size-xs",
|
|
8
|
+
"--slotted-font-weight-medium",
|
|
8
9
|
"--slotted-font-weight-semibold",
|
|
9
10
|
"--slotted-line-height-sm",
|
|
10
11
|
"--slotted-list-background",
|
|
@@ -28,6 +29,8 @@
|
|
|
28
29
|
"--slotted-list-section-padding-block",
|
|
29
30
|
"--slotted-list-section-padding-block-lg",
|
|
30
31
|
"--slotted-list-section-padding-block-sm",
|
|
32
|
+
"--slotted-list-section-rule-color",
|
|
33
|
+
"--slotted-list-section-ruled-color",
|
|
31
34
|
"--slotted-radius-md",
|
|
32
35
|
"--slotted-space-2",
|
|
33
36
|
"--slotted-space-3",
|
|
@@ -37,6 +40,7 @@
|
|
|
37
40
|
"--slotted-space-8",
|
|
38
41
|
"--slotted-space-9",
|
|
39
42
|
"--slotted-surface",
|
|
43
|
+
"--slotted-text",
|
|
40
44
|
"--slotted-text-muted",
|
|
41
45
|
"--slotted-z-index-sticky"
|
|
42
46
|
]
|