@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.
- package/package.json +21 -1
- package/src/accordion/accordion.css +31 -13
- package/src/accordion/accordion.tokens.json +2 -0
- 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 +97 -97
- package/src/alert/alert.tokens.json +6 -1
- package/src/app-shell/app-shell.css +472 -342
- package/src/app-shell/app-shell.tokens.json +6 -3
- package/src/aspect-ratio/aspect-ratio.css +24 -23
- package/src/attachment/attachment.css +118 -114
- package/src/avatar/avatar.css +97 -67
- package/src/avatar/avatar.tokens.json +8 -0
- package/src/avatar-group/avatar-group.css +22 -23
- package/src/badge/badge.css +58 -47
- package/src/badge/badge.tokens.json +6 -0
- package/src/breadcrumb/breadcrumb.css +52 -52
- package/src/button/button.css +408 -93
- package/src/button/button.tokens.json +13 -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 +594 -267
- package/src/calendar/calendar.tokens.json +35 -3
- package/src/card/card.css +133 -70
- package/src/card/card.tokens.json +1 -0
- package/src/carousel/carousel.css +158 -169
- package/src/cascader/cascader.css +174 -159
- package/src/cascader/cascader.tokens.json +2 -0
- package/src/chart/chart.css +300 -271
- package/src/chart/chart.tokens.json +5 -0
- package/src/checkbox/checkbox.css +190 -148
- package/src/checkbox/checkbox.tokens.json +4 -0
- package/src/checkbox-group/checkbox-group.css +7 -7
- package/src/clock/clock.css +246 -0
- package/src/clock/clock.tokens.json +44 -0
- package/src/code-block/code-block.css +85 -89
- package/src/collapsible/collapsible.css +273 -85
- package/src/collapsible/collapsible.tokens.json +6 -0
- package/src/color-picker/color-picker.css +106 -114
- package/src/column-manager/column-manager.css +111 -119
- package/src/combobox/combobox.css +219 -132
- package/src/combobox/combobox.tokens.json +4 -0
- package/src/command-palette/command-palette.css +214 -102
- package/src/command-palette/command-palette.tokens.json +4 -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 +231 -115
- package/src/dashboard-grid/dashboard-grid.tokens.json +3 -1
- package/src/data-grid/data-grid.css +637 -496
- package/src/data-grid/data-grid.tokens.json +5 -1
- package/src/data-list/data-list.css +93 -76
- 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 +31 -269
- package/src/date-picker/date-picker.tokens.json +1 -21
- package/src/date-range-picker/date-range-picker.css +72 -528
- package/src/date-range-picker/date-range-picker.tokens.json +1 -37
- 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 +49 -711
- package/src/datetime-picker/datetime-picker.tokens.json +1 -50
- package/src/datetime-range-picker/datetime-range-picker.css +60 -985
- package/src/datetime-range-picker/datetime-range-picker.tokens.json +1 -67
- package/src/description-list/description-list.css +120 -76
- 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 +462 -199
- package/src/dialog/dialog.tokens.json +10 -0
- package/src/divider/divider.css +20 -20
- package/src/drawer/drawer.css +736 -237
- package/src/drawer/drawer.tokens.json +15 -0
- package/src/entity-picker/entity-picker.css +402 -272
- package/src/entity-picker/entity-picker.tokens.json +6 -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 +58 -38
- package/src/field-group/field-group.tokens.json +3 -0
- package/src/filter-bar/filter-bar.css +224 -216
- package/src/floating-panel/floating-panel.css +147 -0
- package/src/floating-panel/floating-panel.tokens.json +32 -0
- package/src/form/form.css +103 -26
- package/src/form/form.tokens.json +6 -1
- package/src/fullscreen/fullscreen.css +26 -27
- package/src/grid/grid.css +32 -31
- 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 +147 -168
- package/src/import-export-center/import-export-center.tokens.json +1 -0
- package/src/inline/inline.css +29 -29
- package/src/inline-message/inline-message.css +162 -86
- package/src/inline-message/inline-message.tokens.json +5 -0
- package/src/kbd/kbd.css +63 -51
- package/src/kbd/kbd.tokens.json +4 -0
- package/src/link/link.css +54 -33
- package/src/link/link.tokens.json +4 -0
- package/src/list/list.css +55 -24
- package/src/list/list.tokens.json +2 -0
- package/src/list-item/list-item.css +195 -80
- package/src/list-item/list-item.tokens.json +10 -0
- package/src/listbox/listbox.css +121 -72
- package/src/listbox/listbox.tokens.json +6 -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 +166 -83
- package/src/menu/menu.tokens.json +3 -1
- package/src/menubar/menubar.css +16 -16
- package/src/message/message.css +1296 -1243
- package/src/message/message.tokens.json +14 -0
- package/src/message-scroller/message-scroller.css +323 -320
- package/src/meter/meter.css +136 -0
- package/src/meter/meter.tokens.json +23 -0
- package/src/multi-select/multi-select.css +246 -174
- package/src/multi-select/multi-select.tokens.json +3 -0
- package/src/navigation-menu/navigation-menu.css +170 -191
- package/src/navigation-menu/navigation-menu.tokens.json +1 -0
- package/src/notification-center/notification-center.css +155 -163
- package/src/notification-center/notification-center.tokens.json +4 -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 +109 -31
- package/src/page/page.tokens.json +8 -0
- package/src/page-header/page-header.css +342 -287
- package/src/page-header/page-header.tokens.json +6 -1
- package/src/pagination/pagination.css +75 -79
- package/src/picker-panel/picker-panel.css +1074 -0
- package/src/picker-panel/picker-panel.tokens.json +77 -0
- package/src/popover/popover.css +85 -65
- package/src/popover/popover.tokens.json +2 -0
- package/src/progress-indicator/progress-indicator.css +194 -137
- package/src/progress-indicator/progress-indicator.tokens.json +1 -0
- package/src/prompt-composer/prompt-composer.css +274 -116
- 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 +147 -143
- package/src/rating/rating.tokens.json +2 -0
- package/src/result-state/result-state.css +95 -102
- package/src/result-state/result-state.tokens.json +1 -0
- package/src/runtime-properties.mjs +44 -6
- package/src/saved-views/saved-views.css +43 -49
- package/src/scroll-area/scroll-area.css +50 -37
- package/src/section/section.css +311 -46
- package/src/section/section.tokens.json +13 -1
- package/src/segmented-control/segmented-control.css +221 -133
- package/src/segmented-control/segmented-control.tokens.json +7 -11
- package/src/select/select.css +226 -149
- package/src/select/select.tokens.json +4 -0
- package/src/side-navigation/side-navigation.css +204 -201
- package/src/side-navigation/side-navigation.tokens.json +2 -0
- package/src/skeleton/skeleton.css +76 -58
- package/src/slider/slider.css +108 -104
- package/src/slider/slider.tokens.json +1 -0
- 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 +26 -26
- package/src/stat-card/stat-card.css +420 -245
- package/src/stat-card/stat-card.tokens.json +8 -0
- package/src/status-indicator/status-indicator.css +126 -101
- package/src/status-indicator/status-indicator.tokens.json +0 -3
- package/src/stepper/stepper.css +78 -82
- package/src/switch/switch.css +143 -125
- package/src/switch/switch.tokens.json +4 -0
- package/src/table/table.css +653 -222
- package/src/table/table.tokens.json +10 -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 +113 -89
- package/src/tag/tag.tokens.json +11 -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 +30 -519
- package/src/time-picker/time-picker.tokens.json +1 -38
- package/src/time-range-picker/time-range-picker.css +53 -895
- package/src/time-range-picker/time-range-picker.tokens.json +1 -66
- package/src/timeline/timeline.css +280 -292
- package/src/timeline/timeline.tokens.json +5 -0
- package/src/toast/toast.css +139 -122
- package/src/toast/toast.tokens.json +7 -0
- package/src/toggle/toggle.css +34 -38
- package/src/toggle-group/toggle-group.css +73 -77
- package/src/toolbar/toolbar.css +49 -40
- package/src/toolbar/toolbar.tokens.json +2 -1
- package/src/tooltip/tooltip.css +95 -39
- package/src/tooltip/tooltip.tokens.json +1 -0
- package/src/top-navigation/top-navigation.css +253 -269
- package/src/top-navigation/top-navigation.tokens.json +1 -0
- package/src/tour/tour.css +68 -74
- package/src/tour/tour.tokens.json +1 -0
- package/src/transfer/transfer.css +164 -168
- package/src/tree/tree.css +118 -122
- package/src/typography/typography.css +67 -38
- package/src/typography/typography.tokens.json +2 -0
- package/src/upload/upload.css +256 -257
- package/src/visually-hidden/visually-hidden.css +1 -1
- package/src/wizard/wizard.css +187 -199
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
[
|
|
2
2
|
"--slotted-border-subtle",
|
|
3
|
-
"--slotted-border-width-thin",
|
|
4
3
|
"--slotted-control-border-color",
|
|
5
4
|
"--slotted-control-border-width",
|
|
6
5
|
"--slotted-control-font-family",
|
|
@@ -33,103 +32,38 @@
|
|
|
33
32
|
"--slotted-datetime-range-picker-background",
|
|
34
33
|
"--slotted-datetime-range-picker-border-color",
|
|
35
34
|
"--slotted-datetime-range-picker-color",
|
|
36
|
-
"--slotted-datetime-range-picker-content-border-color",
|
|
37
|
-
"--slotted-datetime-range-picker-content-color",
|
|
38
|
-
"--slotted-datetime-range-picker-content-max-inline-size",
|
|
39
|
-
"--slotted-datetime-range-picker-content-padding",
|
|
40
|
-
"--slotted-datetime-range-picker-content-radius",
|
|
41
|
-
"--slotted-datetime-range-picker-content-shadow",
|
|
42
|
-
"--slotted-datetime-range-picker-current-color",
|
|
43
|
-
"--slotted-datetime-range-picker-current-size",
|
|
44
35
|
"--slotted-datetime-range-picker-disabled-background",
|
|
45
36
|
"--slotted-datetime-range-picker-disabled-border-color",
|
|
46
37
|
"--slotted-datetime-range-picker-disabled-color",
|
|
47
|
-
"--slotted-datetime-range-picker-done-active-background",
|
|
48
|
-
"--slotted-datetime-range-picker-done-background",
|
|
49
|
-
"--slotted-datetime-range-picker-done-color",
|
|
50
|
-
"--slotted-datetime-range-picker-done-hover-background",
|
|
51
|
-
"--slotted-datetime-range-picker-hint-color",
|
|
52
38
|
"--slotted-datetime-range-picker-hover-border-color",
|
|
53
39
|
"--slotted-datetime-range-picker-invalid-border-color",
|
|
54
|
-
"--slotted-datetime-range-picker-invalid-color",
|
|
55
40
|
"--slotted-datetime-range-picker-invalid-edge-width",
|
|
56
41
|
"--slotted-datetime-range-picker-invalid-focus-ring-color",
|
|
57
|
-
"--slotted-datetime-range-picker-label-color",
|
|
58
|
-
"--slotted-datetime-range-picker-length-color",
|
|
59
|
-
"--slotted-datetime-range-picker-limit-color",
|
|
60
|
-
"--slotted-datetime-range-picker-list-block-size",
|
|
61
|
-
"--slotted-datetime-range-picker-list-min-inline-size",
|
|
62
|
-
"--slotted-datetime-range-picker-now-color",
|
|
63
|
-
"--slotted-datetime-range-picker-option-current-background",
|
|
64
|
-
"--slotted-datetime-range-picker-option-hover-background",
|
|
65
|
-
"--slotted-datetime-range-picker-option-radius",
|
|
66
|
-
"--slotted-datetime-range-picker-option-selected-background",
|
|
67
|
-
"--slotted-datetime-range-picker-option-selected-color",
|
|
68
|
-
"--slotted-datetime-range-picker-option-selected-hover-background",
|
|
69
42
|
"--slotted-datetime-range-picker-placeholder-color",
|
|
70
43
|
"--slotted-datetime-range-picker-plain-hover-background",
|
|
71
|
-
"--slotted-datetime-range-picker-preset-active-background",
|
|
72
|
-
"--slotted-datetime-range-picker-preset-background",
|
|
73
|
-
"--slotted-datetime-range-picker-preset-hover-background",
|
|
74
|
-
"--slotted-datetime-range-picker-preset-radius",
|
|
75
|
-
"--slotted-datetime-range-picker-preset-selected-background",
|
|
76
|
-
"--slotted-datetime-range-picker-preset-selected-color",
|
|
77
44
|
"--slotted-datetime-range-picker-radius",
|
|
78
45
|
"--slotted-datetime-range-picker-readonly-background",
|
|
79
46
|
"--slotted-datetime-range-picker-shadow",
|
|
80
|
-
"--slotted-datetime-range-picker-sheet-inline-size",
|
|
81
47
|
"--slotted-datetime-range-picker-subtle-background",
|
|
82
48
|
"--slotted-datetime-range-picker-subtle-border-color",
|
|
83
49
|
"--slotted-datetime-range-picker-subtle-hover-background",
|
|
84
|
-
"--slotted-datetime-range-picker-surface",
|
|
85
|
-
"--slotted-datetime-range-picker-tab-block-size",
|
|
86
50
|
"--slotted-disabled-background",
|
|
87
51
|
"--slotted-disabled-border",
|
|
88
52
|
"--slotted-disabled-foreground",
|
|
89
|
-
"--slotted-duration-medium",
|
|
90
|
-
"--slotted-duration-short",
|
|
91
|
-
"--slotted-easing-enter",
|
|
92
|
-
"--slotted-easing-exit",
|
|
93
53
|
"--slotted-focus-ring-color",
|
|
94
54
|
"--slotted-focus-ring-color-invalid",
|
|
95
55
|
"--slotted-focus-ring-offset",
|
|
96
56
|
"--slotted-focus-ring-width",
|
|
97
|
-
"--slotted-font-size-sm",
|
|
98
|
-
"--slotted-font-size-xs",
|
|
99
|
-
"--slotted-font-weight-medium",
|
|
100
|
-
"--slotted-font-weight-regular",
|
|
101
|
-
"--slotted-font-weight-semibold",
|
|
102
|
-
"--slotted-letter-spacing-wide",
|
|
103
|
-
"--slotted-line-height-sm",
|
|
104
|
-
"--slotted-radius-lg",
|
|
105
57
|
"--slotted-radius-none",
|
|
106
|
-
"--slotted-radius-pill",
|
|
107
|
-
"--slotted-radius-sm",
|
|
108
|
-
"--slotted-radius-xs",
|
|
109
|
-
"--slotted-shadow-md",
|
|
110
58
|
"--slotted-space-1",
|
|
111
59
|
"--slotted-space-2",
|
|
112
|
-
"--slotted-space-3",
|
|
113
|
-
"--slotted-space-4",
|
|
114
|
-
"--slotted-space-5",
|
|
115
|
-
"--slotted-space-9",
|
|
116
|
-
"--slotted-surface-raised",
|
|
117
60
|
"--slotted-surface-sunken",
|
|
118
61
|
"--slotted-target-comfortable",
|
|
119
62
|
"--slotted-target-min",
|
|
120
63
|
"--slotted-text",
|
|
121
64
|
"--slotted-text-muted",
|
|
122
65
|
"--slotted-tone-accent-border",
|
|
123
|
-
"--slotted-tone-accent-on-solid",
|
|
124
|
-
"--slotted-tone-accent-solid",
|
|
125
|
-
"--slotted-tone-accent-solid-active",
|
|
126
|
-
"--slotted-tone-accent-solid-hover",
|
|
127
|
-
"--slotted-tone-accent-subtle-hover",
|
|
128
|
-
"--slotted-tone-accent-text",
|
|
129
66
|
"--slotted-tone-danger-border",
|
|
130
|
-
"--slotted-tone-danger-text",
|
|
131
|
-
"--slotted-tone-secondary-subtle",
|
|
132
67
|
"--slotted-tone-secondary-subtle-active",
|
|
133
|
-
"--slotted-tone-secondary-subtle-hover"
|
|
134
|
-
"--slotted-z-index-popover"
|
|
68
|
+
"--slotted-tone-secondary-subtle-hover"
|
|
135
69
|
]
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
* setting those same properties, rather than by restating six rules that
|
|
16
16
|
* would have to be kept in step with the six above them.
|
|
17
17
|
*/
|
|
18
|
-
[data-ui
|
|
18
|
+
[data-ui-description-list] {
|
|
19
19
|
/**
|
|
20
20
|
* The root is the query container and nothing else. An element with
|
|
21
21
|
* `container-type: inline-size` is a container for its descendants and not
|
|
@@ -25,10 +25,22 @@
|
|
|
25
25
|
container-name: slotted-description-list;
|
|
26
26
|
container-type: inline-size;
|
|
27
27
|
display: block;
|
|
28
|
+
/**
|
|
29
|
+
* The width under which a row of a term and its value gives up, carried as
|
|
30
|
+
* the root's font size. A container condition cannot read a custom
|
|
31
|
+
* property, but it resolves `em` against the container's own font size, so
|
|
32
|
+
* `(max-width: 1em)` folds the row when the term track and the narrowest
|
|
33
|
+
* value no longer fit side by side. The list states its own font size, so
|
|
34
|
+
* no text is set in this one.
|
|
35
|
+
*/
|
|
36
|
+
font-size: calc(
|
|
37
|
+
var(--slotted-description-list-term-width, 14rem) +
|
|
38
|
+
var(--slotted-description-list-value-min, 12rem)
|
|
39
|
+
);
|
|
28
40
|
}
|
|
29
41
|
|
|
30
|
-
[data-ui
|
|
31
|
-
/* ── The
|
|
42
|
+
[data-ui-description-list] [data-part-list] {
|
|
43
|
+
/* ── The colors ─────────────────────────────────────────────────── */
|
|
32
44
|
--_ink: var(--slotted-description-list-color, var(--slotted-text, CanvasText));
|
|
33
45
|
--_term-ink: var(--slotted-description-list-term-color, var(--slotted-text-muted, GrayText));
|
|
34
46
|
--_hint-ink: var(--slotted-description-list-hint-color, var(--slotted-text-muted, GrayText));
|
|
@@ -42,7 +54,7 @@
|
|
|
42
54
|
* The mark standing in for a missing value, held on the list rather than
|
|
43
55
|
* stated inside the pseudo-element that paints it: an unthemed decoration
|
|
44
56
|
* should disappear rather than shout, which is why
|
|
45
|
-
* `packages/styles/src/fallbacks.test.mjs` refuses a system
|
|
57
|
+
* `packages/styles/src/fallbacks.test.mjs` refuses a system color inside a
|
|
46
58
|
* `::before` or `::after` rule. Reading it through one property keeps the
|
|
47
59
|
* last resort where the theme's own tokens are.
|
|
48
60
|
*/
|
|
@@ -96,7 +108,7 @@
|
|
|
96
108
|
* The distance between a term and the value under it, which is three times
|
|
97
109
|
* the distance between a term and its own hint: without that ratio the
|
|
98
110
|
* three lines of a stacked pair read as one paragraph and the reader has to
|
|
99
|
-
* find the value by its
|
|
111
|
+
* find the value by its color alone.
|
|
100
112
|
*/
|
|
101
113
|
--_stack-gap: var(--slotted-description-list-stack-gap, var(--slotted-space-3, 0.375rem));
|
|
102
114
|
--_pad-block: var(
|
|
@@ -145,7 +157,7 @@
|
|
|
145
157
|
* always would end every row of every actionless list with a distance
|
|
146
158
|
* nothing asked for.
|
|
147
159
|
*/
|
|
148
|
-
[data-ui
|
|
160
|
+
[data-ui-description-list] [data-part-list]:has([data-part-action]) {
|
|
149
161
|
--_pair: fit-content(var(--_term-width)) minmax(0, 1fr) auto;
|
|
150
162
|
--_span-1: 3;
|
|
151
163
|
--_span-2: 6;
|
|
@@ -153,11 +165,11 @@
|
|
|
153
165
|
--_desc-col: 2 / -2;
|
|
154
166
|
}
|
|
155
167
|
|
|
156
|
-
[data-ui
|
|
168
|
+
[data-ui-description-list][data-columns='2'] [data-part-list] {
|
|
157
169
|
--_cols: repeat(2, var(--_pair));
|
|
158
170
|
}
|
|
159
171
|
|
|
160
|
-
[data-ui
|
|
172
|
+
[data-ui-description-list][data-columns='3'] [data-part-list] {
|
|
161
173
|
--_cols: repeat(3, var(--_pair));
|
|
162
174
|
}
|
|
163
175
|
|
|
@@ -167,7 +179,8 @@
|
|
|
167
179
|
* thing under it — which is what GOV.UK's summary list does at its own narrow
|
|
168
180
|
* width.
|
|
169
181
|
*/
|
|
170
|
-
[data-ui
|
|
182
|
+
[data-ui-description-list][data-layout='stack'] [data-part-list] {
|
|
183
|
+
--_value-align: start;
|
|
171
184
|
--_pair: minmax(0, 1fr);
|
|
172
185
|
--_term-floor: 0px;
|
|
173
186
|
--_span-1: 1;
|
|
@@ -182,14 +195,14 @@
|
|
|
182
195
|
--_action-row: 1;
|
|
183
196
|
}
|
|
184
197
|
|
|
185
|
-
[data-ui
|
|
198
|
+
[data-ui-description-list][data-layout='stack'] [data-part-list]:has([data-part-action]) {
|
|
186
199
|
--_item-cols: minmax(0, 1fr) auto;
|
|
187
200
|
--_desc-col: 1 / -1;
|
|
188
201
|
}
|
|
189
202
|
|
|
190
203
|
/* ── The pair ──────────────────────────────────────────────────────── */
|
|
191
204
|
|
|
192
|
-
[data-ui
|
|
205
|
+
[data-ui-description-list] [data-part-item] {
|
|
193
206
|
column-gap: var(--_item-col-gap);
|
|
194
207
|
display: grid;
|
|
195
208
|
grid-column: span var(--_span-1);
|
|
@@ -198,15 +211,15 @@
|
|
|
198
211
|
row-gap: var(--_stack-gap);
|
|
199
212
|
}
|
|
200
213
|
|
|
201
|
-
[data-ui
|
|
214
|
+
[data-ui-description-list] [data-part-item][data-span='2'] {
|
|
202
215
|
grid-column: span var(--_span-2);
|
|
203
216
|
}
|
|
204
217
|
|
|
205
|
-
[data-ui
|
|
218
|
+
[data-ui-description-list] [data-part-item][data-span='3'] {
|
|
206
219
|
grid-column: span var(--_span-3);
|
|
207
220
|
}
|
|
208
221
|
|
|
209
|
-
[data-ui
|
|
222
|
+
[data-ui-description-list] [data-part-term] {
|
|
210
223
|
color: var(--_term-ink);
|
|
211
224
|
font-weight: var(
|
|
212
225
|
--slotted-description-list-term-weight,
|
|
@@ -238,11 +251,11 @@
|
|
|
238
251
|
* needs a layer, and the layer is still available when the explanation is
|
|
239
252
|
* longer than a line.
|
|
240
253
|
*/
|
|
241
|
-
[data-ui
|
|
254
|
+
[data-ui-description-list] [data-part-list]:has([data-part-hint]) {
|
|
242
255
|
--_term-floor: var(--slotted-description-list-term-min, 12rem);
|
|
243
256
|
}
|
|
244
257
|
|
|
245
|
-
[data-ui
|
|
258
|
+
[data-ui-description-list] [data-part-hint] {
|
|
246
259
|
color: var(--_hint-ink);
|
|
247
260
|
/**
|
|
248
261
|
* A hint is a sentence and a term is two words, so a hint left to size its
|
|
@@ -276,20 +289,30 @@
|
|
|
276
289
|
* value and a copy control is a block, and the grid below is for the ones
|
|
277
290
|
* that have a second row to place.
|
|
278
291
|
*/
|
|
279
|
-
[data-ui
|
|
292
|
+
[data-ui-description-list] [data-part-description]:not([data-clamp]) {
|
|
280
293
|
display: block;
|
|
281
294
|
}
|
|
282
295
|
|
|
283
|
-
[data-ui
|
|
296
|
+
[data-ui-description-list] [data-part-description]:not([data-clamp]) [data-part-value] {
|
|
284
297
|
display: inline;
|
|
285
298
|
}
|
|
286
299
|
|
|
287
|
-
[data-ui
|
|
300
|
+
[data-ui-description-list] [data-part-description]:not([data-clamp]) [data-part-copy] {
|
|
288
301
|
margin-inline-start: var(--_pair-gap);
|
|
289
302
|
vertical-align: text-bottom;
|
|
290
303
|
}
|
|
291
304
|
|
|
292
|
-
|
|
305
|
+
/**
|
|
306
|
+
* Values a reader compares down the list end on one vertical line at the
|
|
307
|
+
* inline end of their rows. Set on the root, so a stacked list and a row
|
|
308
|
+
* list folded to a stack reset it on the list and keep their values at the
|
|
309
|
+
* start, under the term.
|
|
310
|
+
*/
|
|
311
|
+
[data-ui-description-list][data-value-align='end'] {
|
|
312
|
+
--_value-align: end;
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
[data-ui-description-list] [data-part-description] {
|
|
293
316
|
align-items: baseline;
|
|
294
317
|
/**
|
|
295
318
|
* The distance from a value to the control that reaches it does not follow
|
|
@@ -303,14 +326,15 @@
|
|
|
303
326
|
grid-column: var(--_desc-col);
|
|
304
327
|
grid-row: var(--_desc-row);
|
|
305
328
|
grid-template-columns: minmax(0, max-content) auto;
|
|
306
|
-
justify-content: start;
|
|
329
|
+
justify-content: var(--_value-align, start);
|
|
330
|
+
text-align: var(--_value-align, start);
|
|
307
331
|
/* `dd` carries a user-agent inline margin of forty pixels. */
|
|
308
332
|
margin: 0;
|
|
309
333
|
min-inline-size: 0;
|
|
310
334
|
row-gap: var(--slotted-space-2, 0.25rem);
|
|
311
335
|
}
|
|
312
336
|
|
|
313
|
-
[data-ui
|
|
337
|
+
[data-ui-description-list] [data-part-value] {
|
|
314
338
|
grid-column: 1;
|
|
315
339
|
min-inline-size: 0;
|
|
316
340
|
/* An unbroken token — a hash, an ARN, a URL — breaks rather than leaving
|
|
@@ -325,16 +349,14 @@
|
|
|
325
349
|
* family — a long value may be copied or revealed, never truncated without
|
|
326
350
|
* access.
|
|
327
351
|
*/
|
|
328
|
-
[data-ui
|
|
352
|
+
[data-ui-description-list] [data-part-description][data-clamp] [data-part-value] {
|
|
329
353
|
-webkit-box-orient: vertical;
|
|
330
354
|
-webkit-line-clamp: var(--slotted-description-list-clamp, 2);
|
|
331
355
|
display: -webkit-box;
|
|
332
356
|
overflow: hidden;
|
|
333
357
|
}
|
|
334
358
|
|
|
335
|
-
[data-ui
|
|
336
|
-
[data-part='description'][data-clamp][data-revealed]
|
|
337
|
-
[data-part='value'] {
|
|
359
|
+
[data-ui-description-list] [data-part-description][data-clamp][data-revealed] [data-part-value] {
|
|
338
360
|
-webkit-line-clamp: none;
|
|
339
361
|
display: block;
|
|
340
362
|
overflow: visible;
|
|
@@ -363,13 +385,13 @@
|
|
|
363
385
|
* `—` and never `-`: a hyphen is a word joiner, half the width, and it sits
|
|
364
386
|
* at a different height.
|
|
365
387
|
*/
|
|
366
|
-
[data-ui
|
|
388
|
+
[data-ui-description-list] [data-part-placeholder] {
|
|
367
389
|
color: var(--_placeholder-ink);
|
|
368
390
|
}
|
|
369
391
|
|
|
370
392
|
/* ── The controls ──────────────────────────────────────────────────── */
|
|
371
393
|
|
|
372
|
-
[data-ui
|
|
394
|
+
[data-ui-description-list] :is([data-part-copy], [data-part-toggle]) {
|
|
373
395
|
appearance: none;
|
|
374
396
|
background: none;
|
|
375
397
|
border: 0;
|
|
@@ -382,7 +404,7 @@
|
|
|
382
404
|
var(--slotted-control-transition-easing);
|
|
383
405
|
}
|
|
384
406
|
|
|
385
|
-
[data-ui
|
|
407
|
+
[data-ui-description-list] :is([data-part-copy], [data-part-toggle]):focus-visible {
|
|
386
408
|
outline: var(--slotted-focus-ring-width, 2px) solid var(--slotted-focus-ring-color, Highlight);
|
|
387
409
|
outline-offset: var(--slotted-focus-ring-offset, 2px);
|
|
388
410
|
}
|
|
@@ -393,7 +415,7 @@
|
|
|
393
415
|
* twenty-four pixels and an equal negative margin gives the space back to the
|
|
394
416
|
* line, so the row keeps its rhythm and the target keeps its size.
|
|
395
417
|
*/
|
|
396
|
-
[data-ui
|
|
418
|
+
[data-ui-description-list] [data-part-copy] {
|
|
397
419
|
--slotted-icon-size: var(--_glyph);
|
|
398
420
|
align-items: center;
|
|
399
421
|
block-size: var(--slotted-target-min, 24px);
|
|
@@ -412,7 +434,7 @@
|
|
|
412
434
|
padding: var(--_hit);
|
|
413
435
|
}
|
|
414
436
|
|
|
415
|
-
[data-ui
|
|
437
|
+
[data-ui-description-list] [data-part-copy]:enabled:not([data-complete]):hover {
|
|
416
438
|
background-color: var(
|
|
417
439
|
--slotted-description-list-control-surface-hover,
|
|
418
440
|
var(--slotted-tone-secondary-subtle-hover, ButtonFace)
|
|
@@ -420,7 +442,7 @@
|
|
|
420
442
|
color: var(--_control-ink-hover);
|
|
421
443
|
}
|
|
422
444
|
|
|
423
|
-
[data-ui
|
|
445
|
+
[data-ui-description-list] [data-part-copy]:enabled:not([data-complete]):active {
|
|
424
446
|
background-color: var(
|
|
425
447
|
--slotted-description-list-control-surface-active,
|
|
426
448
|
var(--slotted-tone-secondary-subtle-active, ButtonFace)
|
|
@@ -428,26 +450,26 @@
|
|
|
428
450
|
}
|
|
429
451
|
|
|
430
452
|
/**
|
|
431
|
-
* A copy that finished. The mark changes as well as the
|
|
453
|
+
* A copy that finished. The mark changes as well as the color — the binding
|
|
432
454
|
* draws the check `Glyph` in place of the copy one — because a green
|
|
433
455
|
* clipboard says nothing to a reader who cannot see the green, and the
|
|
434
456
|
* control returns to rest on its own, so nothing is left claiming a state
|
|
435
457
|
* that has passed.
|
|
436
458
|
*/
|
|
437
|
-
[data-ui
|
|
459
|
+
[data-ui-description-list] [data-part-copy][data-complete] {
|
|
438
460
|
color: var(--_control-ink-done);
|
|
439
461
|
}
|
|
440
462
|
|
|
441
463
|
/* On a finger the target is the comfortable size in both axes and the box
|
|
442
|
-
is the one a mouse sees: a transparent `::before`
|
|
464
|
+
is the one a mouse sees: a transparent `::before` centerd on the control
|
|
443
465
|
reaches 44 pixels, and the ground and the ring stay square. The row keeps
|
|
444
466
|
its rhythm, because the halo takes no room. */
|
|
445
467
|
@media (pointer: coarse) {
|
|
446
|
-
[data-ui
|
|
468
|
+
[data-ui-description-list] [data-part-copy] {
|
|
447
469
|
position: relative;
|
|
448
470
|
}
|
|
449
471
|
|
|
450
|
-
[data-ui
|
|
472
|
+
[data-ui-description-list] [data-part-copy]::before {
|
|
451
473
|
content: '';
|
|
452
474
|
inset: min(0px, calc((100% - var(--slotted-target-comfortable, 44px)) / 2));
|
|
453
475
|
position: absolute;
|
|
@@ -461,7 +483,7 @@
|
|
|
461
483
|
* carries — the `Glyph` the binding draws after the words, turned, not
|
|
462
484
|
* swapped, so the eye follows one mark rather than catching two.
|
|
463
485
|
*/
|
|
464
|
-
[data-ui
|
|
486
|
+
[data-ui-description-list] [data-part-toggle] {
|
|
465
487
|
--slotted-icon-size: var(--_glyph);
|
|
466
488
|
align-items: center;
|
|
467
489
|
color: var(--_link-ink);
|
|
@@ -473,28 +495,28 @@
|
|
|
473
495
|
padding-inline: 0;
|
|
474
496
|
}
|
|
475
497
|
|
|
476
|
-
[data-ui
|
|
498
|
+
[data-ui-description-list] [data-part-toggle] > [data-ui-icon] {
|
|
477
499
|
rotate: 0deg;
|
|
478
500
|
transition: rotate var(--slotted-control-transition-duration)
|
|
479
501
|
var(--slotted-control-transition-easing);
|
|
480
502
|
}
|
|
481
503
|
|
|
482
|
-
[data-ui
|
|
504
|
+
[data-ui-description-list] [data-revealed] [data-part-toggle] > [data-ui-icon] {
|
|
483
505
|
rotate: 180deg;
|
|
484
506
|
}
|
|
485
507
|
|
|
486
|
-
[data-ui
|
|
508
|
+
[data-ui-description-list] [data-part-toggle]:enabled:hover {
|
|
487
509
|
text-decoration-line: underline;
|
|
488
510
|
text-underline-offset: var(--slotted-description-list-underline-offset, 0.2em);
|
|
489
511
|
}
|
|
490
512
|
|
|
491
|
-
[data-ui
|
|
513
|
+
[data-ui-description-list] [data-part-toggle]:enabled:active {
|
|
492
514
|
color: var(--_control-ink-hover);
|
|
493
515
|
}
|
|
494
516
|
|
|
495
517
|
/* ── The row's own action ──────────────────────────────────────────── */
|
|
496
518
|
|
|
497
|
-
[data-ui
|
|
519
|
+
[data-ui-description-list] [data-part-action] {
|
|
498
520
|
align-self: start;
|
|
499
521
|
grid-column: var(--_action-col);
|
|
500
522
|
grid-row: var(--_action-row);
|
|
@@ -510,7 +532,7 @@
|
|
|
510
532
|
* this variant. It is the form that belongs inside a card, where the card
|
|
511
533
|
* already draws the box and a second frame would be two.
|
|
512
534
|
*/
|
|
513
|
-
[data-ui
|
|
535
|
+
[data-ui-description-list][data-variant='plain'] [data-part-list] {
|
|
514
536
|
row-gap: var(--_row-gap);
|
|
515
537
|
}
|
|
516
538
|
|
|
@@ -522,11 +544,11 @@
|
|
|
522
544
|
* also the only form of the rule that survives a pair spanning two columns,
|
|
523
545
|
* because it needs to know nothing about which row a pair is in.
|
|
524
546
|
*/
|
|
525
|
-
[data-ui
|
|
547
|
+
[data-ui-description-list][data-variant='ruled'] [data-part-list] {
|
|
526
548
|
row-gap: 0;
|
|
527
549
|
}
|
|
528
550
|
|
|
529
|
-
[data-ui
|
|
551
|
+
[data-ui-description-list][data-variant='ruled'] [data-part-item] {
|
|
530
552
|
border-block-end: var(--slotted-border-width-thin, 1px) solid var(--_rule);
|
|
531
553
|
padding-block: var(--_pad-block);
|
|
532
554
|
}
|
|
@@ -539,7 +561,7 @@
|
|
|
539
561
|
* calls it `bordered` and Carbon draws the same rules; here the frame is the
|
|
540
562
|
* family's and the surface underneath is the theme's.
|
|
541
563
|
*/
|
|
542
|
-
[data-ui
|
|
564
|
+
[data-ui-description-list][data-variant='framed'] [data-part-list] {
|
|
543
565
|
background-color: var(--_surface);
|
|
544
566
|
border: var(--slotted-border-width-thin, 1px) solid var(--_rule);
|
|
545
567
|
border-radius: var(--slotted-description-list-frame-radius, var(--slotted-radius-md, 6px));
|
|
@@ -549,32 +571,31 @@
|
|
|
549
571
|
row-gap: 0;
|
|
550
572
|
}
|
|
551
573
|
|
|
552
|
-
[data-ui
|
|
574
|
+
[data-ui-description-list][data-variant='framed'] [data-part-item] {
|
|
553
575
|
border-block-start: var(--slotted-border-width-thin, 1px) solid var(--_rule);
|
|
554
576
|
column-gap: 0;
|
|
555
577
|
}
|
|
556
578
|
|
|
557
|
-
[data-ui
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
[data-part='item']:nth-child(-n + 3) {
|
|
579
|
+
[data-ui-description-list][data-variant='framed'][data-columns='1'] [data-part-item]:first-child,
|
|
580
|
+
[data-ui-description-list][data-variant='framed'][data-columns='2']
|
|
581
|
+
[data-part-item]:nth-child(-n + 2),
|
|
582
|
+
[data-ui-description-list][data-variant='framed'][data-columns='3']
|
|
583
|
+
[data-part-item]:nth-child(-n + 3) {
|
|
563
584
|
border-block-start-width: 0;
|
|
564
585
|
}
|
|
565
586
|
|
|
566
|
-
[data-ui
|
|
567
|
-
:is([data-part
|
|
587
|
+
[data-ui-description-list][data-variant='framed']
|
|
588
|
+
:is([data-part-term], [data-part-description], [data-part-action]) {
|
|
568
589
|
padding-block: var(--_pad-block);
|
|
569
590
|
padding-inline: var(--_pad-inline);
|
|
570
591
|
}
|
|
571
592
|
|
|
572
|
-
[data-ui
|
|
593
|
+
[data-ui-description-list][data-variant='framed'] [data-part-term] {
|
|
573
594
|
background-color: var(--_term-surface);
|
|
574
595
|
border-inline-end: var(--slotted-border-width-thin, 1px) solid var(--_rule);
|
|
575
596
|
}
|
|
576
597
|
|
|
577
|
-
[data-ui
|
|
598
|
+
[data-ui-description-list][data-variant='framed'][data-layout='stack'] [data-part-term] {
|
|
578
599
|
/* Stacked, the term is a bar above its value rather than a cell beside it,
|
|
579
600
|
and a rule on its inline edge would point at nothing. */
|
|
580
601
|
border-inline-end: 0;
|
|
@@ -589,8 +610,11 @@
|
|
|
589
610
|
* column goes first and the single-column row form gets the whole width
|
|
590
611
|
* before it gives up on the row.
|
|
591
612
|
*
|
|
592
|
-
* The breakpoints are literals because a container condition cannot
|
|
593
|
-
* custom property, which rule 4 of `docs/token-foundation.md` states.
|
|
613
|
+
* The count breakpoints are literals because a container condition cannot
|
|
614
|
+
* read a custom property, which rule 4 of `docs/token-foundation.md` states.
|
|
615
|
+
* That is why `data-min-column-width` is a step and not a length: `md` folds
|
|
616
|
+
* at sixteen and seventeen rem a column, `sm` at twelve and a half. The row
|
|
617
|
+
* fold reads the term width through the root's font size instead.
|
|
594
618
|
*/
|
|
595
619
|
/**
|
|
596
620
|
* A span is stated in tracks, so it collapses with the count that produced
|
|
@@ -601,30 +625,49 @@
|
|
|
601
625
|
* of a four-track grid.
|
|
602
626
|
*/
|
|
603
627
|
@container slotted-description-list (max-width: 48rem) {
|
|
604
|
-
[data-ui
|
|
628
|
+
[data-ui-description-list][data-min-column-width='md'][data-columns='3'] [data-part-list] {
|
|
605
629
|
--_cols: repeat(2, var(--_pair));
|
|
606
630
|
--_span-3: var(--_span-2);
|
|
607
631
|
}
|
|
608
632
|
}
|
|
609
633
|
|
|
634
|
+
@container slotted-description-list (max-width: 37.5rem) {
|
|
635
|
+
[data-ui-description-list][data-min-column-width='sm'][data-columns='3'] [data-part-list] {
|
|
636
|
+
--_cols: repeat(2, var(--_pair));
|
|
637
|
+
--_span-3: var(--_span-2);
|
|
638
|
+
}
|
|
639
|
+
}
|
|
640
|
+
|
|
641
|
+
@container slotted-description-list (max-width: 25rem) {
|
|
642
|
+
[data-ui-description-list][data-min-column-width='sm'][data-columns='2'] [data-part-list],
|
|
643
|
+
[data-ui-description-list][data-min-column-width='sm'][data-columns='3'] [data-part-list] {
|
|
644
|
+
--_cols: var(--_pair);
|
|
645
|
+
--_span-2: var(--_span-1);
|
|
646
|
+
--_span-3: var(--_span-1);
|
|
647
|
+
}
|
|
648
|
+
}
|
|
649
|
+
|
|
610
650
|
@container slotted-description-list (max-width: 34rem) {
|
|
611
|
-
[data-ui
|
|
612
|
-
[data-ui
|
|
651
|
+
[data-ui-description-list][data-min-column-width='md'][data-columns='2'] [data-part-list],
|
|
652
|
+
[data-ui-description-list][data-min-column-width='md'][data-columns='3'] [data-part-list] {
|
|
613
653
|
--_cols: var(--_pair);
|
|
614
654
|
--_span-2: var(--_span-1);
|
|
615
655
|
--_span-3: var(--_span-1);
|
|
616
656
|
}
|
|
657
|
+
}
|
|
617
658
|
|
|
659
|
+
@container slotted-description-list (max-width: calc(1em + 8rem)) {
|
|
618
660
|
/**
|
|
619
661
|
* A list whose terms carry hints gives up the row eight rem earlier than
|
|
620
662
|
* one whose terms do not. A hint is a sentence under a label, and a label
|
|
621
663
|
* column wide enough to hold one leaves a four-hundred-pixel panel with a
|
|
622
664
|
* value column narrower than the label — which is the arrangement inverted
|
|
623
|
-
* rather than compressed. The declarations are the ones below, at
|
|
624
|
-
*
|
|
625
|
-
*
|
|
665
|
+
* rather than compressed. The declarations are the ones below, at the
|
|
666
|
+
* row fold, and they are written twice because two container conditions
|
|
667
|
+
* cannot share one rule.
|
|
626
668
|
*/
|
|
627
|
-
[data-ui
|
|
669
|
+
[data-ui-description-list][data-layout='row'] [data-part-list]:has([data-part-hint]) {
|
|
670
|
+
--_value-align: start;
|
|
628
671
|
--_pair: minmax(0, 1fr);
|
|
629
672
|
--_term-floor: 0px;
|
|
630
673
|
--_span-1: 1;
|
|
@@ -637,20 +680,21 @@
|
|
|
637
680
|
--_action-row: 1;
|
|
638
681
|
}
|
|
639
682
|
|
|
640
|
-
[data-ui
|
|
641
|
-
[data-part
|
|
683
|
+
[data-ui-description-list][data-layout='row']
|
|
684
|
+
[data-part-list]:has([data-part-hint]):has([data-part-action]) {
|
|
642
685
|
--_item-cols: minmax(0, 1fr) auto;
|
|
643
686
|
}
|
|
644
687
|
|
|
645
|
-
[data-ui
|
|
646
|
-
[data-part
|
|
647
|
-
[data-part
|
|
688
|
+
[data-ui-description-list][data-variant='framed'][data-layout='row']
|
|
689
|
+
[data-part-list]:has([data-part-hint])
|
|
690
|
+
[data-part-term] {
|
|
648
691
|
border-inline-end: 0;
|
|
649
692
|
}
|
|
650
693
|
}
|
|
651
694
|
|
|
652
|
-
@container slotted-description-list (max-width:
|
|
653
|
-
[data-ui
|
|
695
|
+
@container slotted-description-list (max-width: 1em) {
|
|
696
|
+
[data-ui-description-list][data-layout='row'] [data-part-list] {
|
|
697
|
+
--_value-align: start;
|
|
654
698
|
--_pair: minmax(0, 1fr);
|
|
655
699
|
--_term-floor: 0px;
|
|
656
700
|
--_span-1: 1;
|
|
@@ -663,12 +707,12 @@
|
|
|
663
707
|
--_action-row: 1;
|
|
664
708
|
}
|
|
665
709
|
|
|
666
|
-
[data-ui
|
|
710
|
+
[data-ui-description-list][data-layout='row'] [data-part-list]:has([data-part-action]) {
|
|
667
711
|
--_item-cols: minmax(0, 1fr) auto;
|
|
668
712
|
--_desc-col: 1 / -1;
|
|
669
713
|
}
|
|
670
714
|
|
|
671
|
-
[data-ui
|
|
715
|
+
[data-ui-description-list][data-variant='framed'][data-layout='row'] [data-part-term] {
|
|
672
716
|
border-inline-end: 0;
|
|
673
717
|
}
|
|
674
718
|
}
|
|
@@ -39,6 +39,7 @@
|
|
|
39
39
|
"--slotted-description-list-term-width",
|
|
40
40
|
"--slotted-description-list-toggle-color",
|
|
41
41
|
"--slotted-description-list-underline-offset",
|
|
42
|
+
"--slotted-description-list-value-min",
|
|
42
43
|
"--slotted-focus-ring-color",
|
|
43
44
|
"--slotted-focus-ring-offset",
|
|
44
45
|
"--slotted-focus-ring-width",
|