@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.
- package/package.json +13 -1
- package/src/accordion/accordion.css +11 -11
- package/src/action-bar/action-bar.css +47 -44
- package/src/action-bar/action-bar.tokens.json +1 -0
- package/src/action-sheet/action-sheet.css +39 -39
- package/src/alert/alert.css +96 -96
- package/src/alert/alert.tokens.json +5 -0
- package/src/app-shell/app-shell.css +455 -328
- package/src/app-shell/app-shell.tokens.json +5 -2
- package/src/aspect-ratio/aspect-ratio.css +9 -9
- package/src/attachment/attachment.css +118 -114
- package/src/avatar/avatar.css +96 -66
- package/src/avatar/avatar.tokens.json +7 -0
- package/src/avatar-group/avatar-group.css +22 -23
- package/src/badge/badge.css +54 -46
- package/src/badge/badge.tokens.json +5 -0
- package/src/breadcrumb/breadcrumb.css +52 -52
- package/src/button/button.css +137 -89
- package/src/button/button.tokens.json +5 -0
- package/src/button-group/button-group.css +80 -79
- package/src/button-group/button-group.tokens.json +1 -0
- package/src/calendar/calendar.css +139 -109
- package/src/calendar/calendar.tokens.json +5 -1
- package/src/card/card.css +68 -65
- package/src/carousel/carousel.css +158 -169
- package/src/cascader/cascader.css +158 -157
- package/src/cascader/cascader.tokens.json +1 -0
- package/src/chart/chart.css +288 -267
- package/src/chart/chart.tokens.json +4 -0
- package/src/checkbox/checkbox.css +143 -148
- package/src/checkbox-group/checkbox-group.css +7 -7
- package/src/code-block/code-block.css +85 -89
- package/src/collapsible/collapsible.css +76 -80
- package/src/color-picker/color-picker.css +106 -114
- package/src/column-manager/column-manager.css +111 -119
- package/src/combobox/combobox.css +203 -130
- package/src/combobox/combobox.tokens.json +3 -0
- package/src/command-palette/command-palette.css +155 -102
- package/src/command-palette/command-palette.tokens.json +2 -0
- package/src/container/container.css +27 -27
- package/src/context-menu/context-menu.css +9 -9
- package/src/currency-field/currency-field.css +119 -119
- package/src/currency-field/currency-field.tokens.json +1 -0
- package/src/dashboard-grid/dashboard-grid.css +185 -115
- package/src/data-grid/data-grid.css +598 -496
- package/src/data-grid/data-grid.tokens.json +5 -1
- package/src/data-list/data-list.css +82 -71
- package/src/data-list/data-list.tokens.json +2 -1
- package/src/date-field/date-field.css +62 -57
- package/src/date-field/date-field.tokens.json +1 -0
- package/src/date-picker/date-picker.css +117 -58
- package/src/date-picker/date-picker.tokens.json +5 -0
- package/src/date-range-picker/date-range-picker.css +157 -127
- package/src/date-range-picker/date-range-picker.tokens.json +4 -0
- package/src/datetime-field/datetime-field.css +90 -90
- package/src/datetime-field/datetime-field.tokens.json +1 -0
- package/src/datetime-picker/datetime-picker.css +123 -70
- package/src/datetime-picker/datetime-picker.tokens.json +4 -1
- package/src/datetime-range-picker/datetime-range-picker.css +191 -163
- package/src/datetime-range-picker/datetime-range-picker.tokens.json +4 -0
- package/src/description-list/description-list.css +105 -75
- package/src/description-list/description-list.tokens.json +1 -0
- package/src/detail-panel/detail-panel.css +86 -71
- package/src/detail-panel/detail-panel.tokens.json +2 -0
- package/src/dialog/dialog.css +434 -198
- package/src/dialog/dialog.tokens.json +7 -0
- package/src/divider/divider.css +20 -20
- package/src/drawer/drawer.css +597 -236
- package/src/drawer/drawer.tokens.json +13 -0
- package/src/entity-picker/entity-picker.css +323 -270
- package/src/entity-picker/entity-picker.tokens.json +3 -0
- package/src/event-calendar/event-calendar.css +357 -399
- package/src/field/field.css +106 -93
- package/src/field/field.tokens.json +2 -0
- package/src/field-group/field-group.css +43 -33
- package/src/field-group/field-group.tokens.json +3 -0
- package/src/filter-bar/filter-bar.css +200 -216
- package/src/form/form.css +99 -25
- package/src/form/form.tokens.json +5 -0
- package/src/fullscreen/fullscreen.css +26 -27
- package/src/grid/grid.css +29 -29
- package/src/highlight/highlight.css +11 -11
- package/src/hover-card/hover-card.css +9 -9
- package/src/icon/icon.css +67 -20
- package/src/icon/icon.tokens.json +1 -0
- package/src/image/image.css +42 -42
- package/src/import-export-center/import-export-center.css +144 -165
- package/src/inline/inline.css +28 -28
- package/src/inline-message/inline-message.css +162 -86
- package/src/inline-message/inline-message.tokens.json +4 -0
- package/src/kbd/kbd.css +62 -50
- package/src/kbd/kbd.tokens.json +3 -0
- package/src/link/link.css +54 -33
- package/src/link/link.tokens.json +4 -0
- package/src/list/list.css +23 -23
- package/src/list-item/list-item.css +89 -75
- package/src/list-item/list-item.tokens.json +7 -0
- package/src/listbox/listbox.css +71 -70
- package/src/listbox/listbox.tokens.json +0 -1
- package/src/loading-overlay/loading-overlay.css +86 -103
- package/src/markdown/markdown.css +20 -20
- package/src/media-viewer/media-viewer.css +790 -0
- package/src/media-viewer/media-viewer.tokens.json +53 -0
- package/src/menu/menu.css +162 -82
- package/src/menu/menu.tokens.json +2 -1
- package/src/menubar/menubar.css +16 -16
- package/src/message/message.css +1250 -1253
- package/src/message/message.tokens.json +5 -0
- package/src/message-scroller/message-scroller.css +323 -320
- package/src/multi-select/multi-select.css +230 -172
- package/src/multi-select/multi-select.tokens.json +2 -0
- package/src/navigation-menu/navigation-menu.css +169 -190
- package/src/notification-center/notification-center.css +153 -161
- package/src/notification-center/notification-center.tokens.json +3 -0
- package/src/number-field/number-field.css +93 -93
- package/src/number-field/number-field.tokens.json +1 -0
- package/src/otp-input/otp-input.css +74 -64
- package/src/otp-input/otp-input.tokens.json +1 -0
- package/src/page/page.css +41 -27
- package/src/page/page.tokens.json +1 -0
- package/src/page-header/page-header.css +341 -286
- package/src/page-header/page-header.tokens.json +5 -0
- package/src/pagination/pagination.css +75 -79
- package/src/popover/popover.css +81 -64
- package/src/popover/popover.tokens.json +1 -0
- package/src/progress-indicator/progress-indicator.css +192 -136
- package/src/progress-indicator/progress-indicator.tokens.json +1 -0
- package/src/prompt-composer/prompt-composer.css +260 -113
- package/src/prompt-composer/prompt-composer.tokens.json +15 -0
- package/src/prose/prose.css +77 -82
- package/src/radio-group/radio-group.css +107 -112
- package/src/rating/rating.css +146 -142
- package/src/rating/rating.tokens.json +1 -0
- package/src/result-state/result-state.css +94 -101
- package/src/runtime-properties.mjs +19 -6
- package/src/saved-views/saved-views.css +43 -49
- package/src/scroll-area/scroll-area.css +44 -37
- package/src/section/section.css +178 -43
- package/src/section/section.tokens.json +8 -2
- package/src/segmented-control/segmented-control.css +210 -133
- package/src/segmented-control/segmented-control.tokens.json +7 -11
- package/src/select/select.css +210 -147
- package/src/select/select.tokens.json +3 -0
- package/src/side-navigation/side-navigation.css +193 -196
- package/src/side-navigation/side-navigation.tokens.json +1 -0
- package/src/skeleton/skeleton.css +57 -58
- package/src/slider/slider.css +101 -103
- package/src/sparkline/sparkline.css +75 -53
- 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 +34 -35
- package/src/split-button/split-button.tokens.json +1 -0
- package/src/splitter/splitter.css +47 -48
- package/src/stack/stack.css +25 -25
- package/src/stat-card/stat-card.css +415 -245
- package/src/stat-card/stat-card.tokens.json +8 -0
- package/src/status-indicator/status-indicator.css +124 -100
- package/src/status-indicator/status-indicator.tokens.json +0 -3
- package/src/stepper/stepper.css +78 -82
- package/src/switch/switch.css +100 -106
- package/src/table/table.css +270 -198
- package/src/table/table.tokens.json +2 -0
- package/src/table-of-contents/table-of-contents.css +60 -59
- package/src/table-of-contents/table-of-contents.tokens.json +1 -0
- package/src/tabs/tabs.css +327 -294
- package/src/tabs/tabs.tokens.json +7 -1
- package/src/tag/tag.css +109 -88
- package/src/tag/tag.tokens.json +10 -0
- package/src/tags-input/tags-input.css +152 -87
- package/src/tags-input/tags-input.tokens.json +7 -1
- package/src/text-field/text-field.css +146 -148
- package/src/text-field/text-field.tokens.json +1 -0
- package/src/textarea/textarea.css +38 -33
- package/src/textarea/textarea.tokens.json +1 -0
- package/src/time-field/time-field.css +82 -77
- package/src/time-field/time-field.tokens.json +1 -0
- package/src/time-picker/time-picker.css +116 -64
- package/src/time-picker/time-picker.tokens.json +4 -1
- package/src/time-range-picker/time-range-picker.css +168 -140
- package/src/time-range-picker/time-range-picker.tokens.json +4 -0
- package/src/timeline/timeline.css +280 -292
- package/src/timeline/timeline.tokens.json +5 -0
- package/src/toast/toast.css +138 -121
- package/src/toast/toast.tokens.json +6 -0
- package/src/toggle/toggle.css +34 -38
- package/src/toggle-group/toggle-group.css +73 -77
- package/src/toolbar/toolbar.css +33 -38
- package/src/tooltip/tooltip.css +65 -39
- package/src/tooltip/tooltip.tokens.json +1 -0
- package/src/top-navigation/top-navigation.css +252 -268
- package/src/tour/tour.css +64 -73
- package/src/transfer/transfer.css +164 -168
- package/src/tree/tree.css +113 -121
- package/src/typography/typography.css +42 -38
- package/src/typography/typography.tokens.json +1 -0
- package/src/upload/upload.css +256 -257
- package/src/visually-hidden/visually-hidden.css +1 -1
- package/src/wizard/wizard.css +187 -199
package/src/tree/tree.css
CHANGED
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
* only the frame's own inset, radius and shadow come off the space, radius
|
|
52
52
|
* and shadow scales.
|
|
53
53
|
*/
|
|
54
|
-
[data-ui
|
|
54
|
+
[data-ui-tree] {
|
|
55
55
|
--_surface: var(--slotted-tree-surface, var(--slotted-surface, #ffffff));
|
|
56
56
|
--_text: var(--slotted-tree-text, var(--slotted-text, #0f172a));
|
|
57
57
|
--_muted: var(--slotted-tree-text-muted, var(--slotted-text-muted, #5b6b7f));
|
|
@@ -108,7 +108,7 @@
|
|
|
108
108
|
*
|
|
109
109
|
* What a reader sees on a row is the distance from its deepest guide line
|
|
110
110
|
* to its own chevron, and that distance is `step - glyph / 2`, because the
|
|
111
|
-
* line sits on the
|
|
111
|
+
* line sits on the center of the chevron one level up. With the step read
|
|
112
112
|
* from the space scale and the glyph from the control scale, the two moved
|
|
113
113
|
* apart: measured on the built page, five pixels at `sm`, eight at `md`,
|
|
114
114
|
* eleven at `lg`, and nought at 240 pixels, where the line met the chevron.
|
|
@@ -177,7 +177,7 @@
|
|
|
177
177
|
text-align: start;
|
|
178
178
|
}
|
|
179
179
|
|
|
180
|
-
[data-ui
|
|
180
|
+
[data-ui-tree][data-size='sm'] {
|
|
181
181
|
--_row-inset: var(--slotted-control-padding-inline-sm, 0.625rem);
|
|
182
182
|
--_row-height: var(--slotted-control-height-sm, 30px);
|
|
183
183
|
--_font-size: var(--slotted-control-font-size-sm, 12px);
|
|
@@ -187,7 +187,7 @@
|
|
|
187
187
|
--_check-size: var(--slotted-selection-size-sm, 14px);
|
|
188
188
|
}
|
|
189
189
|
|
|
190
|
-
[data-ui
|
|
190
|
+
[data-ui-tree][data-size='lg'] {
|
|
191
191
|
--_row-inset: var(--slotted-control-padding-inline-lg, 1rem);
|
|
192
192
|
--_row-height: var(--slotted-control-height-lg, 38px);
|
|
193
193
|
--_font-size: var(--slotted-control-font-size-lg, 14px);
|
|
@@ -201,14 +201,14 @@
|
|
|
201
201
|
* `framed` is the standalone control; `plain` is what a tree renders as
|
|
202
202
|
* inside a panel, a drawer or a page region that already has an edge.
|
|
203
203
|
*/
|
|
204
|
-
[data-ui
|
|
204
|
+
[data-ui-tree][data-variant='framed'] {
|
|
205
205
|
background-color: var(--_surface);
|
|
206
206
|
border: var(--_border-width) solid var(--_border-color);
|
|
207
207
|
border-radius: var(--_radius);
|
|
208
208
|
box-shadow: var(--_shadow);
|
|
209
209
|
}
|
|
210
210
|
|
|
211
|
-
[data-ui
|
|
211
|
+
[data-ui-tree] [data-part-canvas] {
|
|
212
212
|
/**
|
|
213
213
|
* The block cap is stated rather than the height: a tree of four branches
|
|
214
214
|
* is four rows tall, and one of four hundred stops at `rows` and scrolls.
|
|
@@ -222,7 +222,7 @@
|
|
|
222
222
|
padding-inline: 0;
|
|
223
223
|
}
|
|
224
224
|
|
|
225
|
-
[data-ui
|
|
225
|
+
[data-ui-tree] :is([data-part-canvas], [data-part-group]) {
|
|
226
226
|
list-style: none;
|
|
227
227
|
margin-block: 0;
|
|
228
228
|
margin-inline: 0;
|
|
@@ -233,7 +233,7 @@
|
|
|
233
233
|
* The group carries no inset: the row states the whole indent, so the band
|
|
234
234
|
* can span the tree's full width at every level.
|
|
235
235
|
*/
|
|
236
|
-
[data-ui
|
|
236
|
+
[data-ui-tree] [data-part-group] {
|
|
237
237
|
padding-block: 0;
|
|
238
238
|
padding-inline: 0;
|
|
239
239
|
}
|
|
@@ -248,7 +248,7 @@
|
|
|
248
248
|
* family that only works under one reset is a family waiting for the next
|
|
249
249
|
* one.
|
|
250
250
|
*/
|
|
251
|
-
[data-ui
|
|
251
|
+
[data-ui-tree] [data-part-node] {
|
|
252
252
|
display: block;
|
|
253
253
|
margin-block: 0;
|
|
254
254
|
margin-inline: 0;
|
|
@@ -265,7 +265,7 @@
|
|
|
265
265
|
outline: none;
|
|
266
266
|
}
|
|
267
267
|
|
|
268
|
-
[data-ui
|
|
268
|
+
[data-ui-tree] [data-part-row] {
|
|
269
269
|
align-items: center;
|
|
270
270
|
background-color: transparent;
|
|
271
271
|
color: inherit;
|
|
@@ -323,7 +323,7 @@
|
|
|
323
323
|
*
|
|
324
324
|
* ── Where the line sits ──────────────────────────────────────────────
|
|
325
325
|
*
|
|
326
|
-
* Under the
|
|
326
|
+
* Under the center of the chevron of the level above, which is half a glyph
|
|
327
327
|
* from the start of that level's cell — not half a step. The two agree only
|
|
328
328
|
* at `md`, where the step and the glyph are both sixteen pixels; at `sm` and
|
|
329
329
|
* `lg` they differ by a pixel, and under the narrow container queries, where
|
|
@@ -339,7 +339,7 @@
|
|
|
339
339
|
* row is what `VS Code`, Primer and Carbon all draw, and what the reviewer
|
|
340
340
|
* asked for at the visual gate.
|
|
341
341
|
*/
|
|
342
|
-
[data-ui
|
|
342
|
+
[data-ui-tree] [data-part-guide] {
|
|
343
343
|
background-image: repeating-linear-gradient(
|
|
344
344
|
to right,
|
|
345
345
|
var(--_guide-color) 0 var(--_border-width),
|
|
@@ -352,7 +352,7 @@
|
|
|
352
352
|
position: absolute;
|
|
353
353
|
}
|
|
354
354
|
|
|
355
|
-
[data-ui
|
|
355
|
+
[data-ui-tree] [data-part-guide]:dir(rtl) {
|
|
356
356
|
background-image: repeating-linear-gradient(
|
|
357
357
|
to left,
|
|
358
358
|
var(--_guide-color) 0 var(--_border-width),
|
|
@@ -360,7 +360,7 @@
|
|
|
360
360
|
);
|
|
361
361
|
}
|
|
362
362
|
|
|
363
|
-
[data-ui
|
|
363
|
+
[data-ui-tree][data-guides='false'] [data-part-guide] {
|
|
364
364
|
background-image: none;
|
|
365
365
|
}
|
|
366
366
|
|
|
@@ -370,7 +370,7 @@
|
|
|
370
370
|
* as one control moving. A leaf keeps the box and the binding draws nothing
|
|
371
371
|
* in it, which is what holds every label in one column whatever its node is.
|
|
372
372
|
*/
|
|
373
|
-
[data-ui
|
|
373
|
+
[data-ui-tree] [data-part-expander] {
|
|
374
374
|
/**
|
|
375
375
|
* The glyph is the icon size and never the box: under `expandOn="expander"`
|
|
376
376
|
* the box grows by padding to the target minimum, and the `icon` box stays
|
|
@@ -391,20 +391,20 @@
|
|
|
391
391
|
margin-inline-end: var(--_gap);
|
|
392
392
|
}
|
|
393
393
|
|
|
394
|
-
[data-ui
|
|
394
|
+
[data-ui-tree] [data-part-expander] > [data-ui-icon] {
|
|
395
395
|
transition: rotate var(--slotted-control-transition-duration, var(--slotted-duration-short))
|
|
396
396
|
var(--slotted-control-transition-easing, var(--slotted-easing-standard));
|
|
397
397
|
}
|
|
398
398
|
|
|
399
|
-
[data-ui
|
|
399
|
+
[data-ui-tree] [data-part-expander]:dir(rtl) > [data-ui-icon] {
|
|
400
400
|
rotate: 180deg;
|
|
401
401
|
}
|
|
402
402
|
|
|
403
|
-
[data-ui
|
|
404
|
-
[data-part
|
|
405
|
-
> [data-part
|
|
406
|
-
[data-part
|
|
407
|
-
> [data-ui
|
|
403
|
+
[data-ui-tree]
|
|
404
|
+
[data-part-node][data-expanded]
|
|
405
|
+
> [data-part-row]
|
|
406
|
+
[data-part-expander]
|
|
407
|
+
> [data-ui-icon] {
|
|
408
408
|
rotate: 90deg;
|
|
409
409
|
}
|
|
410
410
|
|
|
@@ -413,10 +413,10 @@
|
|
|
413
413
|
* the target otherwise. Under the first the box is grown to the WCAG minimum
|
|
414
414
|
* without the artwork growing, and the growth is taken back so no label moves.
|
|
415
415
|
*/
|
|
416
|
-
[data-ui
|
|
417
|
-
[data-part
|
|
418
|
-
> [data-part
|
|
419
|
-
[data-part
|
|
416
|
+
[data-ui-tree][data-expand-on='expander']
|
|
417
|
+
[data-part-node][data-branch]
|
|
418
|
+
> [data-part-row]
|
|
419
|
+
[data-part-expander] {
|
|
420
420
|
box-sizing: content-box;
|
|
421
421
|
cursor: pointer;
|
|
422
422
|
margin-block: calc((var(--slotted-target-min, 24px) - var(--_icon-size)) / -2);
|
|
@@ -439,10 +439,8 @@
|
|
|
439
439
|
* leaf is text; and with the chevron as the only target, no row is pressed at
|
|
440
440
|
* all.
|
|
441
441
|
*/
|
|
442
|
-
[data-ui
|
|
443
|
-
[data-ui
|
|
444
|
-
[data-part='node']:not([data-branch])
|
|
445
|
-
> [data-part='row'] {
|
|
442
|
+
[data-ui-tree][data-selection='none'][data-expand-on='expander'] [data-part-row],
|
|
443
|
+
[data-ui-tree][data-selection='none'] [data-part-node]:not([data-branch]) > [data-part-row] {
|
|
446
444
|
cursor: default;
|
|
447
445
|
}
|
|
448
446
|
|
|
@@ -450,7 +448,7 @@
|
|
|
450
448
|
* A tree the reader may read and not move keeps the arrow throughout, as
|
|
451
449
|
* `listbox` does with the same word.
|
|
452
450
|
*/
|
|
453
|
-
[data-ui
|
|
451
|
+
[data-ui-tree][data-readonly] [data-part-row] {
|
|
454
452
|
cursor: default;
|
|
455
453
|
}
|
|
456
454
|
|
|
@@ -462,9 +460,9 @@
|
|
|
462
460
|
* unchosen row is a gutter down the start edge of the whole tree, and a tree
|
|
463
461
|
* already spends one cell on the chevron and one per level on the indent.
|
|
464
462
|
* Every surveyed implementation that highlights — Primer, Carbon, the APG's
|
|
465
|
-
* own examples — draws no mark either, and under forced
|
|
463
|
+
* own examples — draws no mark either, and under forced colors the row takes
|
|
466
464
|
* `Highlight` and `HighlightText`, which is the system's own selection rather
|
|
467
|
-
* than a
|
|
465
|
+
* than a color of ours. `listbox` keeps its check because a flat list has
|
|
468
466
|
* one cell to spare and no indent; this is where the two families part, and
|
|
469
467
|
* the reason is the indent.
|
|
470
468
|
*
|
|
@@ -474,7 +472,7 @@
|
|
|
474
472
|
* ── Why the box is the one `checkbox` draws ────────────────────────────
|
|
475
473
|
*
|
|
476
474
|
* Same square from the selection scale, same medium edge in the strong
|
|
477
|
-
* border
|
|
475
|
+
* border color, same smallest radius, same solid ground when chosen, and the
|
|
478
476
|
* same mark: a whole two pixels of clearance on every side, at every step,
|
|
479
477
|
* revealed by a clip that opens along the stroke rather than by a scale that
|
|
480
478
|
* grows out of the middle. The clearance is a whole number and not a
|
|
@@ -483,7 +481,7 @@
|
|
|
483
481
|
* subpixels — and the two families are held together by
|
|
484
482
|
* `tree.styles.test.mjs`, which reads `checkbox.css` and compares them.
|
|
485
483
|
*/
|
|
486
|
-
[data-ui
|
|
484
|
+
[data-ui-tree] [data-part-indicator] {
|
|
487
485
|
--_mark-inset: var(--slotted-tree-mark-inset, 2px);
|
|
488
486
|
--_check-border: var(--slotted-border-width-medium, 1.5px);
|
|
489
487
|
--_mark-size: calc(var(--_check-size) - 2 * var(--_mark-inset));
|
|
@@ -514,7 +512,7 @@
|
|
|
514
512
|
* two whole pixels from the outside of the square, which is where `checkbox`
|
|
515
513
|
* puts its own.
|
|
516
514
|
*/
|
|
517
|
-
[data-ui
|
|
515
|
+
[data-ui-tree] [data-part-indicator] > [data-ui-icon] {
|
|
518
516
|
/* Physical on purpose: a check is not mirrored in a right-to-left row, so
|
|
519
517
|
neither is the hand that draws it. `checkbox` states the same. */
|
|
520
518
|
clip-path: inset(0% 100% 0% 0%);
|
|
@@ -531,24 +529,24 @@
|
|
|
531
529
|
var(--slotted-control-transition-easing, var(--slotted-easing-standard));
|
|
532
530
|
}
|
|
533
531
|
|
|
534
|
-
[data-ui
|
|
535
|
-
[data-part
|
|
536
|
-
> [data-part
|
|
537
|
-
[data-part
|
|
532
|
+
[data-ui-tree]
|
|
533
|
+
[data-part-node]:is([data-selected], [data-indeterminate])
|
|
534
|
+
> [data-part-row]
|
|
535
|
+
[data-part-indicator] {
|
|
538
536
|
background-color: var(--slotted-tone-accent-solid);
|
|
539
537
|
border-color: var(--slotted-tone-accent-solid);
|
|
540
538
|
}
|
|
541
539
|
|
|
542
|
-
[data-ui
|
|
543
|
-
[data-part
|
|
544
|
-
> [data-part
|
|
545
|
-
[data-part
|
|
546
|
-
> [data-ui
|
|
540
|
+
[data-ui-tree]
|
|
541
|
+
[data-part-node]:is([data-selected], [data-indeterminate])
|
|
542
|
+
> [data-part-row]
|
|
543
|
+
[data-part-indicator]
|
|
544
|
+
> [data-ui-icon] {
|
|
547
545
|
clip-path: inset(0% 0% 0% 0%);
|
|
548
546
|
opacity: 1;
|
|
549
547
|
}
|
|
550
548
|
|
|
551
|
-
[data-ui
|
|
549
|
+
[data-ui-tree] [data-part-node][data-disabled] > [data-part-row] [data-part-indicator] {
|
|
552
550
|
background-color: var(--slotted-disabled-background, Canvas);
|
|
553
551
|
border-color: var(--slotted-disabled-border, GrayText);
|
|
554
552
|
cursor: not-allowed;
|
|
@@ -559,8 +557,7 @@
|
|
|
559
557
|
* at all, and the rule is written so a consumer who leaves the element in the
|
|
560
558
|
* markup still gets the tree the axis promises.
|
|
561
559
|
*/
|
|
562
|
-
[data-ui
|
|
563
|
-
[data-part='indicator'] {
|
|
560
|
+
[data-ui-tree]:is([data-indicator='highlight'], [data-indicator='none']) [data-part-indicator] {
|
|
564
561
|
display: none;
|
|
565
562
|
}
|
|
566
563
|
|
|
@@ -568,7 +565,7 @@
|
|
|
568
565
|
* The node's own picture, which the consumer supplies. The family owns no
|
|
569
566
|
* folder glyph: a folder is content, and the glyph scale holds none.
|
|
570
567
|
*/
|
|
571
|
-
[data-ui
|
|
568
|
+
[data-ui-tree] [data-part-icon] {
|
|
572
569
|
block-size: var(--_icon-size);
|
|
573
570
|
color: var(--_muted);
|
|
574
571
|
flex: none;
|
|
@@ -582,9 +579,9 @@
|
|
|
582
579
|
* taken. Primer asks the consumer to pass a visual on every item or to accept
|
|
583
580
|
* two columns of names; the fact is one the tree can read for itself.
|
|
584
581
|
*/
|
|
585
|
-
[data-ui
|
|
586
|
-
[data-part
|
|
587
|
-
[data-part
|
|
582
|
+
[data-ui-tree][data-part-root]:has([data-part-icon])
|
|
583
|
+
[data-part-row]:not(:has([data-part-icon]))
|
|
584
|
+
[data-part-label] {
|
|
588
585
|
margin-inline-start: calc(var(--_icon-size) + var(--_gap));
|
|
589
586
|
}
|
|
590
587
|
|
|
@@ -601,8 +598,8 @@
|
|
|
601
598
|
* and its count are data of unknown direction, and each one is now its own
|
|
602
599
|
* paragraph.
|
|
603
600
|
*/
|
|
604
|
-
[data-ui
|
|
605
|
-
:is([data-part
|
|
601
|
+
[data-ui-tree]
|
|
602
|
+
:is([data-part-label], [data-part-description], [data-part-meta], [data-part-empty]) {
|
|
606
603
|
unicode-bidi: plaintext;
|
|
607
604
|
}
|
|
608
605
|
|
|
@@ -617,7 +614,7 @@
|
|
|
617
614
|
* reader's own start edge in both directions, and leaves the truncation
|
|
618
615
|
* where it was.
|
|
619
616
|
*/
|
|
620
|
-
[data-ui
|
|
617
|
+
[data-ui-tree] [data-part-label] {
|
|
621
618
|
flex: 0 1 auto;
|
|
622
619
|
line-height: var(--slotted-line-height-sm, 1.45);
|
|
623
620
|
/**
|
|
@@ -647,22 +644,22 @@
|
|
|
647
644
|
* they are is a placeholder the eye refuses. They are literals because they
|
|
648
645
|
* are a proportion of a row rather than a step on any scale.
|
|
649
646
|
*/
|
|
650
|
-
[data-ui
|
|
647
|
+
[data-ui-tree] [data-part-label]:has([data-ui-skeleton]) {
|
|
651
648
|
flex: 1 1 auto;
|
|
652
649
|
max-inline-size: 62%;
|
|
653
650
|
}
|
|
654
651
|
|
|
655
|
-
[data-ui
|
|
656
|
-
[data-part
|
|
657
|
-
> [data-part
|
|
658
|
-
[data-part
|
|
652
|
+
[data-ui-tree]
|
|
653
|
+
[data-part-node]:nth-child(2n)
|
|
654
|
+
> [data-part-row]
|
|
655
|
+
[data-part-label]:has([data-ui-skeleton]) {
|
|
659
656
|
max-inline-size: 44%;
|
|
660
657
|
}
|
|
661
658
|
|
|
662
|
-
[data-ui
|
|
663
|
-
[data-part
|
|
664
|
-
> [data-part
|
|
665
|
-
[data-part
|
|
659
|
+
[data-ui-tree]
|
|
660
|
+
[data-part-node]:nth-child(3n)
|
|
661
|
+
> [data-part-row]
|
|
662
|
+
[data-part-label]:has([data-ui-skeleton]) {
|
|
666
663
|
max-inline-size: 73%;
|
|
667
664
|
}
|
|
668
665
|
|
|
@@ -671,7 +668,7 @@
|
|
|
671
668
|
* from its ground, which is the rule `--slotted-highlight-tint-opacity`
|
|
672
669
|
* states and what `select` and `combobox` already draw.
|
|
673
670
|
*/
|
|
674
|
-
[data-ui
|
|
671
|
+
[data-ui-tree] [data-part-label] mark {
|
|
675
672
|
background-color: color-mix(
|
|
676
673
|
in oklab,
|
|
677
674
|
var(--slotted-tone-accent-text) calc(var(--slotted-highlight-tint-opacity, 0.075) * 100%),
|
|
@@ -685,13 +682,13 @@
|
|
|
685
682
|
* A matched span on a chosen row keeps its weight and drops its band. The
|
|
686
683
|
* band is seven and a half per cent of the tone's ink mixed into the surface,
|
|
687
684
|
* and over the tone's own ground it is neither visible nor clean — two washes
|
|
688
|
-
* of one
|
|
685
|
+
* of one color, one of them too faint to read as deliberate.
|
|
689
686
|
*/
|
|
690
|
-
[data-ui
|
|
687
|
+
[data-ui-tree] [data-part-node][data-selected] > [data-part-row] [data-part-label] mark {
|
|
691
688
|
background-color: transparent;
|
|
692
689
|
}
|
|
693
690
|
|
|
694
|
-
[data-ui
|
|
691
|
+
[data-ui-tree] [data-part-description] {
|
|
695
692
|
color: var(--_muted);
|
|
696
693
|
margin-inline-start: var(--_gap);
|
|
697
694
|
flex: 0 1 auto;
|
|
@@ -706,7 +703,7 @@
|
|
|
706
703
|
* The trailing count. It keeps its intrinsic width so a label twice as long
|
|
707
704
|
* in translation pushes on itself rather than on the number beside it.
|
|
708
705
|
*/
|
|
709
|
-
[data-ui
|
|
706
|
+
[data-ui-tree] [data-part-meta] {
|
|
710
707
|
color: var(--_muted);
|
|
711
708
|
flex: none;
|
|
712
709
|
font-size: var(--_secondary-font-size);
|
|
@@ -733,7 +730,7 @@
|
|
|
733
730
|
* that drew an arc of its own would be a second answer to the same wait,
|
|
734
731
|
* drifting from the first the moment one of them is retuned.
|
|
735
732
|
*/
|
|
736
|
-
[data-ui
|
|
733
|
+
[data-ui-tree] [data-part-loader] {
|
|
737
734
|
--slotted-spinner-size: var(--_icon-size);
|
|
738
735
|
|
|
739
736
|
block-size: var(--_icon-size);
|
|
@@ -748,7 +745,7 @@
|
|
|
748
745
|
* reachable: revealing them on hover alone puts a control behind a gesture a
|
|
749
746
|
* touch reader does not have.
|
|
750
747
|
*/
|
|
751
|
-
[data-ui
|
|
748
|
+
[data-ui-tree] [data-part-actions] {
|
|
752
749
|
align-items: center;
|
|
753
750
|
display: flex;
|
|
754
751
|
flex: none;
|
|
@@ -759,11 +756,11 @@
|
|
|
759
756
|
|
|
760
757
|
/* The free space is taken once. With a count before them, the controls sit a
|
|
761
758
|
gap after it rather than splitting the row between the two. */
|
|
762
|
-
[data-ui
|
|
759
|
+
[data-ui-tree] [data-part-meta] ~ [data-part-actions] {
|
|
763
760
|
margin-inline-start: 0;
|
|
764
761
|
}
|
|
765
762
|
|
|
766
|
-
[data-ui
|
|
763
|
+
[data-ui-tree] [data-part-empty] {
|
|
767
764
|
color: var(--_muted);
|
|
768
765
|
padding-block: var(--slotted-space-5, 0.75rem);
|
|
769
766
|
padding-inline: var(--_row-inset);
|
|
@@ -776,15 +773,13 @@
|
|
|
776
773
|
* A weaker state holds itself back for every stronger one, in the order
|
|
777
774
|
* `STATE_PRECEDENCE` names.
|
|
778
775
|
*/
|
|
779
|
-
[data-ui
|
|
780
|
-
[data-part='node']:not([data-disabled]):not([data-loading])
|
|
781
|
-
> [data-part='row']:hover {
|
|
776
|
+
[data-ui-tree] [data-part-node]:not([data-disabled]):not([data-loading]) > [data-part-row]:hover {
|
|
782
777
|
background-color: var(--_highlight);
|
|
783
778
|
}
|
|
784
779
|
|
|
785
|
-
[data-ui
|
|
786
|
-
[data-part
|
|
787
|
-
> [data-part
|
|
780
|
+
[data-ui-tree]
|
|
781
|
+
[data-part-node]:not([data-disabled]):not([data-loading])
|
|
782
|
+
> [data-part-row]:active {
|
|
788
783
|
background-color: var(--_highlight-active);
|
|
789
784
|
}
|
|
790
785
|
|
|
@@ -792,19 +787,19 @@
|
|
|
792
787
|
* The row the keyboard is on paints the same quiet ground as hover, and the
|
|
793
788
|
* ring is what tells the two apart.
|
|
794
789
|
*/
|
|
795
|
-
[data-ui
|
|
790
|
+
[data-ui-tree] [data-part-node][data-current]:not([data-disabled]) > [data-part-row] {
|
|
796
791
|
background-color: var(--_highlight);
|
|
797
792
|
}
|
|
798
793
|
|
|
799
|
-
[data-ui
|
|
794
|
+
[data-ui-tree] [data-part-node][data-selected]:not([data-disabled]) > [data-part-row] {
|
|
800
795
|
background-color: var(--_selected-surface);
|
|
801
796
|
color: var(--_selected-text);
|
|
802
797
|
}
|
|
803
798
|
|
|
804
|
-
[data-ui
|
|
805
|
-
[data-part
|
|
806
|
-
> [data-part
|
|
807
|
-
:is([data-part
|
|
799
|
+
[data-ui-tree]
|
|
800
|
+
[data-part-node][data-selected]:not([data-disabled])
|
|
801
|
+
> [data-part-row]
|
|
802
|
+
:is([data-part-icon], [data-part-meta], [data-part-expander]) {
|
|
808
803
|
color: inherit;
|
|
809
804
|
}
|
|
810
805
|
|
|
@@ -821,32 +816,32 @@
|
|
|
821
816
|
* one of the three devices R1 names, and it is quieter than a ground, which
|
|
822
817
|
* is right: the reader chose the descendant and not this.
|
|
823
818
|
*/
|
|
824
|
-
[data-ui
|
|
825
|
-
[data-part
|
|
826
|
-
> [data-part
|
|
819
|
+
[data-ui-tree]
|
|
820
|
+
[data-part-node][data-selected-within]:not([data-selected]):not([data-disabled])
|
|
821
|
+
> [data-part-row] {
|
|
827
822
|
color: var(--_selected-text);
|
|
828
823
|
}
|
|
829
824
|
|
|
830
|
-
[data-ui
|
|
831
|
-
[data-part
|
|
832
|
-
> [data-part
|
|
833
|
-
[data-part
|
|
825
|
+
[data-ui-tree]
|
|
826
|
+
[data-part-node][data-selected-within]:not([data-selected]):not([data-disabled])
|
|
827
|
+
> [data-part-row]
|
|
828
|
+
[data-part-expander] {
|
|
834
829
|
color: inherit;
|
|
835
830
|
}
|
|
836
831
|
|
|
837
|
-
[data-ui
|
|
832
|
+
[data-ui-tree] [data-part-node][data-disabled] > [data-part-row] {
|
|
838
833
|
color: var(--slotted-disabled-foreground, GrayText);
|
|
839
834
|
cursor: not-allowed;
|
|
840
835
|
}
|
|
841
836
|
|
|
842
|
-
[data-ui
|
|
843
|
-
[data-part
|
|
844
|
-
> [data-part
|
|
845
|
-
:is([data-part
|
|
837
|
+
[data-ui-tree]
|
|
838
|
+
[data-part-node][data-disabled]
|
|
839
|
+
> [data-part-row]
|
|
840
|
+
:is([data-part-icon], [data-part-meta], [data-part-expander], [data-part-description]) {
|
|
846
841
|
color: inherit;
|
|
847
842
|
}
|
|
848
843
|
|
|
849
|
-
[data-ui
|
|
844
|
+
[data-ui-tree] [data-part-node][data-loading] > [data-part-row] {
|
|
850
845
|
cursor: progress;
|
|
851
846
|
}
|
|
852
847
|
|
|
@@ -855,19 +850,16 @@
|
|
|
855
850
|
* the top or the bottom of a scrolling canvas is not clipped by its own
|
|
856
851
|
* viewport.
|
|
857
852
|
*/
|
|
858
|
-
[data-ui
|
|
859
|
-
[data-ui
|
|
860
|
-
[data-part='canvas']:focus-visible
|
|
861
|
-
[data-part='node'][data-current]
|
|
862
|
-
> [data-part='row'] {
|
|
853
|
+
[data-ui-tree] [data-part-node]:focus-visible > [data-part-row],
|
|
854
|
+
[data-ui-tree] [data-part-canvas]:focus-visible [data-part-node][data-current] > [data-part-row] {
|
|
863
855
|
outline: var(--slotted-focus-ring-width, 2px) solid var(--slotted-focus-ring-color);
|
|
864
856
|
outline-offset: calc(-1 * var(--slotted-focus-ring-width, 2px));
|
|
865
857
|
}
|
|
866
858
|
|
|
867
|
-
[data-ui
|
|
859
|
+
[data-ui-tree][data-invalid] {
|
|
868
860
|
--slotted-focus-ring-color: var(--slotted-focus-ring-color-invalid);
|
|
869
861
|
--_border-color: var(--slotted-tone-danger-border);
|
|
870
|
-
/* Width as well as
|
|
862
|
+
/* Width as well as color (WCAG 1.4.1): in `high-contrast` the danger
|
|
871
863
|
border is the resting edge's black. An edge inside the border, so
|
|
872
864
|
nothing moves, in place of the resting lift — the one `text-field`
|
|
873
865
|
draws. */
|
|
@@ -875,11 +867,11 @@
|
|
|
875
867
|
--_shadow: inset 0 0 0 var(--_invalid-edge-width) var(--slotted-tone-danger-border);
|
|
876
868
|
}
|
|
877
869
|
|
|
878
|
-
[data-ui
|
|
870
|
+
[data-ui-tree][data-disabled] {
|
|
879
871
|
color: var(--slotted-disabled-foreground, GrayText);
|
|
880
872
|
}
|
|
881
873
|
|
|
882
|
-
[data-ui
|
|
874
|
+
[data-ui-tree][data-disabled][data-variant='framed'] {
|
|
883
875
|
background-color: var(--slotted-disabled-background, Canvas);
|
|
884
876
|
border-color: var(--slotted-disabled-border, GrayText);
|
|
885
877
|
box-shadow: none;
|
|
@@ -894,12 +886,12 @@
|
|
|
894
886
|
* holds a slice of. The canvas falls back to `auto`, so a flat tree with no
|
|
895
887
|
* window is laid out exactly as a nested one.
|
|
896
888
|
*/
|
|
897
|
-
[data-ui
|
|
889
|
+
[data-ui-tree][data-structure='flat'] {
|
|
898
890
|
max-block-size: calc(var(--_rows) * var(--_row-height) + 2 * var(--_inset-block));
|
|
899
891
|
overflow: auto;
|
|
900
892
|
}
|
|
901
893
|
|
|
902
|
-
[data-ui
|
|
894
|
+
[data-ui-tree][data-structure='flat'] [data-part-canvas] {
|
|
903
895
|
block-size: var(--_canvas-size, auto);
|
|
904
896
|
max-block-size: none;
|
|
905
897
|
overflow: visible;
|
|
@@ -917,7 +909,7 @@
|
|
|
917
909
|
* because the reader scrolled it out and moving it back would take the
|
|
918
910
|
* scrollbar away from them.
|
|
919
911
|
*/
|
|
920
|
-
[data-ui
|
|
912
|
+
[data-ui-tree] [data-part-node][data-pinned] {
|
|
921
913
|
inset-block-start: var(--slotted-tree-row-offset, 0px);
|
|
922
914
|
inset-inline: 0;
|
|
923
915
|
position: absolute;
|
|
@@ -933,45 +925,45 @@
|
|
|
933
925
|
*
|
|
934
926
|
* The retuned value lands on the canvas rather than on the root. A container
|
|
935
927
|
* query styles the container's descendants and never the container itself, so
|
|
936
|
-
* a rule for `[data-ui
|
|
928
|
+
* a rule for `[data-ui-tree]` inside this block matches nothing — the tree
|
|
937
929
|
* is not its own descendant. Written on the root it looked correct and did
|
|
938
930
|
* nothing, and the harness at 240 pixels is what showed the indent had not
|
|
939
931
|
* moved. It is the second half of the two-element decision the briefing
|
|
940
932
|
* records, and the half that is easy to write and hard to see.
|
|
941
933
|
*/
|
|
942
934
|
@container slotted-tree (max-width: 320px) {
|
|
943
|
-
[data-ui
|
|
935
|
+
[data-ui-tree] [data-part-canvas] {
|
|
944
936
|
--_indent: calc(var(--_icon-size) / 2 + var(--slotted-space-3, 0.375rem));
|
|
945
937
|
}
|
|
946
938
|
}
|
|
947
939
|
|
|
948
940
|
@container slotted-tree (max-width: 240px) {
|
|
949
|
-
[data-ui
|
|
941
|
+
[data-ui-tree] [data-part-canvas] {
|
|
950
942
|
--_indent: calc(var(--_icon-size) / 2 + var(--slotted-space-2, 0.25rem));
|
|
951
943
|
--_row-inset: var(--slotted-control-padding-inline-sm, 0.625rem);
|
|
952
944
|
}
|
|
953
945
|
|
|
954
946
|
/* The second line has no room to sit beside the first at this width. */
|
|
955
|
-
[data-ui
|
|
947
|
+
[data-ui-tree] [data-part-description] {
|
|
956
948
|
display: none;
|
|
957
949
|
}
|
|
958
950
|
}
|
|
959
951
|
|
|
960
952
|
/**
|
|
961
953
|
* The one thing the theme cannot reach. Every tone surface becomes `Canvas`
|
|
962
|
-
* under forced
|
|
954
|
+
* under forced colors, so a selection said with a tinted ground alone would
|
|
963
955
|
* say nothing in the mode that needs it most — and under the `highlight`
|
|
964
956
|
* indicator there is no mark to fall back on. `accent` is the selected tone
|
|
965
957
|
* and the theme maps it to `Highlight`, which is what is restated here.
|
|
966
958
|
*/
|
|
967
959
|
@media (forced-colors: active) {
|
|
968
|
-
[data-ui
|
|
960
|
+
[data-ui-tree] [data-part-node][data-selected] > [data-part-row] {
|
|
969
961
|
background-color: Highlight;
|
|
970
962
|
color: HighlightText;
|
|
971
963
|
forced-color-adjust: none;
|
|
972
964
|
}
|
|
973
965
|
|
|
974
|
-
[data-ui
|
|
966
|
+
[data-ui-tree] [data-part-node][data-disabled] > [data-part-row] {
|
|
975
967
|
color: GrayText;
|
|
976
968
|
}
|
|
977
969
|
|
|
@@ -979,20 +971,20 @@
|
|
|
979
971
|
* The box and its mark are painted from a tone. The theme maps `accent` to
|
|
980
972
|
* `Highlight` and `on-solid` to `HighlightText`, so the chosen box keeps
|
|
981
973
|
* both; the mark opts out as well, or the system forces its ink to the
|
|
982
|
-
* text
|
|
974
|
+
* text color and the tick loses its contrast with the box it stands on.
|
|
983
975
|
*/
|
|
984
|
-
[data-ui
|
|
976
|
+
[data-ui-tree] [data-part-indicator] > [data-ui-icon] {
|
|
985
977
|
forced-color-adjust: none;
|
|
986
978
|
}
|
|
987
979
|
}
|
|
988
980
|
|
|
989
981
|
/*
|
|
990
|
-
* Forced
|
|
982
|
+
* Forced colors remove every box shadow, and the edge with them. The width
|
|
991
983
|
* comes back as an outline inside the border; the
|
|
992
984
|
* ring belongs to a row and leaves it alone.
|
|
993
985
|
*/
|
|
994
986
|
@media (forced-colors: active) {
|
|
995
|
-
[data-ui
|
|
987
|
+
[data-ui-tree][data-variant='framed'][data-invalid] {
|
|
996
988
|
outline: var(--_invalid-edge-width) solid CanvasText;
|
|
997
989
|
outline-offset: calc(-1 * (var(--_border-width) + var(--_invalid-edge-width)));
|
|
998
990
|
}
|