@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
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
"--slotted-font-size-xs",
|
|
14
14
|
"--slotted-font-weight-medium",
|
|
15
15
|
"--slotted-font-weight-semibold",
|
|
16
|
+
"--slotted-letter-spacing-tighter",
|
|
16
17
|
"--slotted-line-height-2xl",
|
|
17
18
|
"--slotted-line-height-3xl",
|
|
18
19
|
"--slotted-line-height-4xl",
|
|
@@ -71,6 +72,9 @@
|
|
|
71
72
|
"--slotted-stat-card-region-gap-sm",
|
|
72
73
|
"--slotted-stat-card-shadow",
|
|
73
74
|
"--slotted-stat-card-shadow-elevated",
|
|
75
|
+
"--slotted-stat-card-trend-block-size",
|
|
76
|
+
"--slotted-stat-card-trend-block-size-lg",
|
|
77
|
+
"--slotted-stat-card-trend-block-size-sm",
|
|
74
78
|
"--slotted-stat-card-trend-gap",
|
|
75
79
|
"--slotted-stat-card-trend-gap-lg",
|
|
76
80
|
"--slotted-stat-card-trend-gap-sm",
|
|
@@ -90,6 +94,7 @@
|
|
|
90
94
|
"--slotted-text-muted",
|
|
91
95
|
"--slotted-tone-accent-text",
|
|
92
96
|
"--slotted-tone-danger-text",
|
|
97
|
+
"--slotted-tone-info-text",
|
|
93
98
|
"--slotted-tone-secondary-text",
|
|
94
99
|
"--slotted-tone-success-text",
|
|
95
100
|
"--slotted-tone-warning-text"
|
|
@@ -8,19 +8,26 @@
|
|
|
8
8
|
* link, and it holds no state of its own — a component that moved its own
|
|
9
9
|
* status would be describing a system it cannot see.
|
|
10
10
|
*
|
|
11
|
-
*
|
|
12
|
-
* the whole box is built around. A status is often a sentence —
|
|
13
|
-
* approval from the security team” — and this family lets it
|
|
14
|
-
* `badge` clips its own label to one line.
|
|
15
|
-
*
|
|
16
|
-
*
|
|
11
|
+
* The mark is inside the first line, not in a column beside it, and that is
|
|
12
|
+
* the decision the whole box is built around. A status is often a sentence —
|
|
13
|
+
* “Waiting for approval from the security team” — and this family lets it
|
|
14
|
+
* wrap where `badge` clips its own label to one line. The mark is an inline
|
|
15
|
+
* box before the label, centred on the capitals, and the label is an
|
|
16
|
+
* `inline-block` beside it: the words wrap inside that block, so every line
|
|
17
|
+
* after the first starts under the first word rather than under the mark,
|
|
18
|
+
* and the block lends its first baseline to whatever aligns the root — a
|
|
19
|
+
* table row aligns on the label, never on a second line under it.
|
|
20
|
+
*
|
|
21
|
+
* The root is the consumer's element: `span`, `a`, `td`. Only an inline root
|
|
22
|
+
* becomes an `inline-block`; a cell or a block keeps its own display and its
|
|
23
|
+
* own padding.
|
|
17
24
|
*
|
|
18
25
|
* The words take the page's own colour. The tone is on the mark, which is
|
|
19
26
|
* what keeps a column of statuses in a table as readable as the column
|
|
20
27
|
* beside it — the answer Spectrum, Chakra and Ant Design all reached, and
|
|
21
28
|
* the opposite of the coloured pill Primer and Atlassian draw.
|
|
22
29
|
*/
|
|
23
|
-
[data-ui
|
|
30
|
+
[data-ui-status-indicator][data-part-root] {
|
|
24
31
|
/**
|
|
25
32
|
* Type and glyph come from the control scales, the only ones the theme
|
|
26
33
|
* restates per density, so a status shrinks with the row it sits in. The
|
|
@@ -28,9 +35,13 @@
|
|
|
28
35
|
* small would be sub-pixel, and density already moves the type.
|
|
29
36
|
*/
|
|
30
37
|
--_font-size: var(--slotted-control-font-size-md, 13px);
|
|
31
|
-
|
|
38
|
+
/**
|
|
39
|
+
* The glyph is the words' own size rounded to an even pixel, as
|
|
40
|
+
* `inline-message` draws its mark (R5): 12 pixels at `sm`, 14 at `md` and
|
|
41
|
+
* `lg`, the two grids the status glyphs are drawn on.
|
|
42
|
+
*/
|
|
43
|
+
--_glyph-size: round(nearest, 1em, 2px);
|
|
32
44
|
--_gap: var(--slotted-space-4, 0.5rem);
|
|
33
|
-
--_line-height: var(--slotted-line-height-md, 1.5);
|
|
34
45
|
|
|
35
46
|
/**
|
|
36
47
|
* The disc is a whole number of pixels from the space scale: 8 at `md` and
|
|
@@ -69,31 +80,21 @@
|
|
|
69
80
|
--_halo: color-mix(in oklab, var(--_rim) 20%, transparent);
|
|
70
81
|
--_halo-width: calc(var(--slotted-space-1, 0.125rem) * 1.5);
|
|
71
82
|
|
|
72
|
-
/**
|
|
73
|
-
* What the ring is drawn against. The pulse hangs off the root rather
|
|
74
|
-
* than off the mark: when the icon mark was a `mask-image`, the mask
|
|
75
|
-
* clipped the element's pseudo-elements with it, and a ring behind a
|
|
76
|
-
* triangle was cut into the shape of that triangle and then disappeared.
|
|
77
|
-
* Photographed at 300% before it was moved here, and kept here so the
|
|
78
|
-
* ring never depends on how a mark is drawn. Rounded to a whole pixel, the
|
|
79
|
-
* rule `alert` applies to its own mark, so the disc never straddles one.
|
|
80
|
-
*/
|
|
81
|
-
--_pulse-inset: round(nearest, (1lh - var(--_mark-size)) / 2, 1px);
|
|
82
|
-
|
|
83
|
-
align-items: flex-start;
|
|
84
83
|
/**
|
|
85
84
|
* The words keep the page's colour when `render` makes the root an `<a>`;
|
|
86
85
|
* without this the user agent paints the label in its link blue.
|
|
87
86
|
*/
|
|
88
87
|
color: inherit;
|
|
89
|
-
display: inline-flex;
|
|
90
88
|
font-family: var(
|
|
91
89
|
--slotted-status-indicator-font-family,
|
|
92
90
|
var(--slotted-control-font-family, sans-serif)
|
|
93
91
|
);
|
|
94
92
|
font-size: var(--_font-size);
|
|
95
|
-
|
|
96
|
-
|
|
93
|
+
/**
|
|
94
|
+
* The leading, rounded up to an even pixel: 13 × 1.5 is 19.5 and lands the
|
|
95
|
+
* line, and the mark centred on it, across two device pixels.
|
|
96
|
+
*/
|
|
97
|
+
line-height: round(up, 1em * var(--slotted-line-height-md, 1.5), 2px);
|
|
97
98
|
/**
|
|
98
99
|
* The indicator never widens the box that holds it. Its own minimum is the
|
|
99
100
|
* longest word of a label it did not choose, and a grid or flex parent
|
|
@@ -103,15 +104,21 @@
|
|
|
103
104
|
* label breaks the token at whatever width it is given.
|
|
104
105
|
*/
|
|
105
106
|
min-inline-size: 0;
|
|
106
|
-
position: relative;
|
|
107
107
|
/**
|
|
108
108
|
* `render` can make the root an `<a>`, and the rule a browser writes on
|
|
109
109
|
* every anchor would put a line under a status at rest. The linked root
|
|
110
110
|
* below draws its own underline, hidden until the pointer arrives.
|
|
111
111
|
*/
|
|
112
112
|
text-decoration: none;
|
|
113
|
-
/*
|
|
114
|
-
|
|
113
|
+
/* The mark and the label never part; the label wraps inside its own box. */
|
|
114
|
+
white-space: nowrap;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
/* Written inside a sentence, the indicator sits on the sentence's baseline. */
|
|
118
|
+
[data-ui-status-indicator][data-part-root]:not(td, th, li, div, p) {
|
|
119
|
+
display: inline-block;
|
|
120
|
+
max-inline-size: 100%;
|
|
121
|
+
vertical-align: baseline;
|
|
115
122
|
}
|
|
116
123
|
|
|
117
124
|
/* ── Status: the tone each state speaks in ────────────────────────────
|
|
@@ -127,7 +134,7 @@
|
|
|
127
134
|
* in greyscale as well as in `light`.
|
|
128
135
|
*/
|
|
129
136
|
|
|
130
|
-
[data-ui
|
|
137
|
+
[data-ui-status-indicator][data-part-root][data-status='neutral'] {
|
|
131
138
|
/**
|
|
132
139
|
* The one neutral the theme calibrates against the surface rather than
|
|
133
140
|
* against a control, and the only fill that makes this dot read as filled.
|
|
@@ -145,12 +152,12 @@
|
|
|
145
152
|
--_text: var(--slotted-tone-secondary-text);
|
|
146
153
|
}
|
|
147
154
|
|
|
148
|
-
[data-ui
|
|
155
|
+
[data-ui-status-indicator][data-part-root][data-status='info'] {
|
|
149
156
|
--_solid: var(--slotted-tone-accent-solid);
|
|
150
157
|
--_text: var(--slotted-tone-accent-text);
|
|
151
158
|
}
|
|
152
159
|
|
|
153
|
-
[data-ui
|
|
160
|
+
[data-ui-status-indicator][data-part-root][data-status='success'] {
|
|
154
161
|
--_solid: var(--slotted-tone-success-solid);
|
|
155
162
|
--_text: var(--slotted-tone-success-text);
|
|
156
163
|
}
|
|
@@ -161,13 +168,13 @@
|
|
|
161
168
|
* light, the fill itself in dark and black in `high-contrast` — an edge that
|
|
162
169
|
* reads as the dot's own rim rather than as a second colour around it.
|
|
163
170
|
*/
|
|
164
|
-
[data-ui
|
|
171
|
+
[data-ui-status-indicator][data-part-root][data-status='warning'] {
|
|
165
172
|
--_edge: var(--slotted-tone-warning-border);
|
|
166
173
|
--_solid: var(--slotted-tone-warning-solid);
|
|
167
174
|
--_text: var(--slotted-tone-warning-text);
|
|
168
175
|
}
|
|
169
176
|
|
|
170
|
-
[data-ui
|
|
177
|
+
[data-ui-status-indicator][data-part-root][data-status='danger'] {
|
|
171
178
|
--_solid: var(--slotted-tone-danger-solid);
|
|
172
179
|
--_text: var(--slotted-tone-danger-text);
|
|
173
180
|
}
|
|
@@ -178,7 +185,7 @@
|
|
|
178
185
|
* has no halo of its own; the ring is drawn where the halo of a lit dot
|
|
179
186
|
* ends, below.
|
|
180
187
|
*/
|
|
181
|
-
[data-ui
|
|
188
|
+
[data-ui-status-indicator][data-part-root][data-status='unknown'] {
|
|
182
189
|
--_edge: var(--slotted-border-strong);
|
|
183
190
|
--_halo: transparent;
|
|
184
191
|
--_solid: transparent;
|
|
@@ -192,42 +199,49 @@
|
|
|
192
199
|
* the mark left the ring the size of a dot around a sixteen-pixel glyph, and
|
|
193
200
|
* one and three quarter pixels above where it belonged.
|
|
194
201
|
*/
|
|
195
|
-
[data-ui
|
|
202
|
+
[data-ui-status-indicator][data-part-root][data-mark='icon'] {
|
|
196
203
|
--_mark-size: var(--_glyph-size);
|
|
197
204
|
}
|
|
198
205
|
|
|
199
206
|
/* ── Size ─────────────────────────────────────────────────────────────── */
|
|
200
207
|
|
|
201
|
-
[data-ui
|
|
208
|
+
[data-ui-status-indicator][data-part-root][data-size='sm'] {
|
|
202
209
|
--_dot-size: var(--slotted-space-3, 0.375rem);
|
|
203
210
|
--_font-size: var(--slotted-control-font-size-sm, 12px);
|
|
204
|
-
--_glyph-size: var(--slotted-control-icon-size-sm, 14px);
|
|
205
211
|
--_gap: var(--slotted-space-3, 0.375rem);
|
|
206
212
|
--_halo-width: var(--slotted-space-1, 0.125rem);
|
|
207
213
|
}
|
|
208
214
|
|
|
209
|
-
[data-ui
|
|
215
|
+
[data-ui-status-indicator][data-part-root][data-size='lg'] {
|
|
210
216
|
--_font-size: var(--slotted-control-font-size-lg, 14px);
|
|
211
|
-
--_glyph-size: var(--slotted-control-icon-size-lg, 18px);
|
|
212
217
|
}
|
|
213
218
|
|
|
214
219
|
/* ── The mark ─────────────────────────────────────────────────────────
|
|
215
220
|
*
|
|
216
|
-
* One box, painted two ways
|
|
217
|
-
*
|
|
218
|
-
*
|
|
219
|
-
*
|
|
220
|
-
*
|
|
221
|
+
* One box, painted two ways, inside the first line. Its centre is the
|
|
222
|
+
* centre of the capitals, `0.5cap` above the baseline — the axis
|
|
223
|
+
* `[data-ui-icon]` aligns every icon on — rounded to the device pixel: half
|
|
224
|
+
* a pixel at 2×, a whole one below 1.5×. Layout containment makes the box's
|
|
225
|
+
* own bottom edge its baseline, whatever it holds.
|
|
221
226
|
*/
|
|
222
|
-
[data-ui
|
|
227
|
+
[data-ui-status-indicator] [data-part-mark] {
|
|
223
228
|
block-size: var(--_mark-size);
|
|
224
229
|
box-sizing: border-box;
|
|
225
|
-
|
|
230
|
+
contain: layout;
|
|
231
|
+
display: inline-flex;
|
|
226
232
|
inline-size: var(--_mark-size);
|
|
227
|
-
margin-
|
|
233
|
+
margin-inline-end: var(--_gap);
|
|
234
|
+
position: relative;
|
|
235
|
+
vertical-align: round(nearest, calc(0.5cap - var(--_mark-size) / 2), 0.5px);
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
@media (max-resolution: 1.49dppx) {
|
|
239
|
+
[data-ui-status-indicator] [data-part-mark] {
|
|
240
|
+
vertical-align: round(nearest, calc(0.5cap - var(--_mark-size) / 2), 1px);
|
|
241
|
+
}
|
|
228
242
|
}
|
|
229
243
|
|
|
230
|
-
[data-ui
|
|
244
|
+
[data-ui-status-indicator][data-mark='dot'] [data-part-mark] {
|
|
231
245
|
background-color: var(--_solid, ButtonFace);
|
|
232
246
|
border: var(--_rim-width) solid var(--_rim, CanvasText);
|
|
233
247
|
border-radius: var(--slotted-radius-full, 9999px);
|
|
@@ -239,9 +253,8 @@
|
|
|
239
253
|
* to `neutral` and `unknown` sharing a tone, and it is the only mark in the
|
|
240
254
|
* family that says something by what it is missing.
|
|
241
255
|
*/
|
|
242
|
-
[data-ui
|
|
256
|
+
[data-ui-status-indicator][data-mark='dot'][data-status='unknown'] [data-part-mark] {
|
|
243
257
|
border: 0;
|
|
244
|
-
position: relative;
|
|
245
258
|
}
|
|
246
259
|
|
|
247
260
|
/**
|
|
@@ -253,7 +266,7 @@
|
|
|
253
266
|
* neighbours, and read as a speck rather than as a status. `outline` is
|
|
254
267
|
* reserved for the focus ring (`focus-ring.test.mjs`).
|
|
255
268
|
*/
|
|
256
|
-
[data-ui
|
|
269
|
+
[data-ui-status-indicator][data-mark='dot'][data-status='unknown'] [data-part-mark]::before {
|
|
257
270
|
border: var(--slotted-border-width-thick, 2px) dashed var(--_rim);
|
|
258
271
|
border-radius: var(--slotted-radius-full, 9999px);
|
|
259
272
|
box-sizing: border-box;
|
|
@@ -275,24 +288,25 @@
|
|
|
275
288
|
*
|
|
276
289
|
* The mark is the icon box's container: it hands the box its own size
|
|
277
290
|
* through `--slotted-icon-size` and its colour through `color`, and the
|
|
278
|
-
* binding puts the status's glyph inside
|
|
279
|
-
* no strut of the root's line-height pushes the glyph off the box.
|
|
291
|
+
* binding puts the status's glyph inside, drawn on the grid of that size.
|
|
280
292
|
*/
|
|
281
|
-
[data-ui
|
|
293
|
+
[data-ui-status-indicator][data-mark='icon'] [data-part-mark] {
|
|
282
294
|
--slotted-icon-size: var(--_mark-size);
|
|
283
295
|
|
|
284
296
|
color: var(--_text, CanvasText);
|
|
285
|
-
display: flex;
|
|
286
297
|
}
|
|
287
298
|
|
|
288
299
|
/* ── The words ────────────────────────────────────────────────────────
|
|
289
300
|
*
|
|
290
|
-
* `
|
|
291
|
-
*
|
|
292
|
-
*
|
|
293
|
-
* a
|
|
294
|
-
*
|
|
295
|
-
*
|
|
301
|
+
* An `inline-block` on the first line, as wide as the root less the mark:
|
|
302
|
+
* the words wrap inside it, so the lines after the first hang under the
|
|
303
|
+
* first word. `baseline-source: first` is what a table row reads — a label
|
|
304
|
+
* with a detail under it aligns the row on its first line, not its last.
|
|
305
|
+
*
|
|
306
|
+
* `overflow-wrap` breaks the one string a status is likeliest to hold that
|
|
307
|
+
* no language can break — a deployment id, a container digest, a hostname
|
|
308
|
+
* without a hyphen. Nothing is ever removed: the whole string stays in the
|
|
309
|
+
* DOM, in the accessibility tree and findable by a page search.
|
|
296
310
|
*
|
|
297
311
|
* `break-word` rather than `anywhere`, and the difference is the one this
|
|
298
312
|
* family was caught by. Both break the token; only `anywhere` also reports a
|
|
@@ -302,21 +316,35 @@
|
|
|
302
316
|
* first column was auto-sized. `break-word` keeps the longest word as the
|
|
303
317
|
* minimum and breaks only what still does not fit.
|
|
304
318
|
*/
|
|
305
|
-
[data-ui
|
|
306
|
-
|
|
307
|
-
|
|
319
|
+
[data-ui-status-indicator] [data-part-label] {
|
|
320
|
+
baseline-source: first;
|
|
321
|
+
display: inline-block;
|
|
322
|
+
max-inline-size: calc(100% - var(--_mark-size) - var(--_gap));
|
|
308
323
|
overflow-wrap: break-word;
|
|
324
|
+
/* No `vertical-align`: the shorthand resets `baseline-source` to `auto`,
|
|
325
|
+
the last line, and the root then aligned on the detail. */
|
|
326
|
+
white-space: normal;
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
/**
|
|
330
|
+
* A second, quieter line under the words — “62% · build”, “4 minutes ago” —
|
|
331
|
+
* in the label's own column, so it hangs under the first word as well.
|
|
332
|
+
*/
|
|
333
|
+
[data-ui-status-indicator] [data-part-detail] {
|
|
334
|
+
color: var(--slotted-text-muted, GrayText);
|
|
335
|
+
display: block;
|
|
309
336
|
}
|
|
310
337
|
|
|
311
338
|
/**
|
|
312
339
|
* The gap taken back when the label holds nothing a reader can see. A mark
|
|
313
340
|
* with no visible words still carries its own word, clipped by
|
|
314
341
|
* `visually-hidden`, and that word is out of flow — so the label box is
|
|
315
|
-
* empty, and a gap
|
|
316
|
-
*
|
|
342
|
+
* empty, and a gap after the mark puts a bare dot off the centre of the
|
|
343
|
+
* cell it was meant to sit in.
|
|
317
344
|
*/
|
|
318
|
-
[data-ui
|
|
319
|
-
|
|
345
|
+
[data-ui-status-indicator]:has(> [data-part-label] > [data-part-announcement]:only-child)
|
|
346
|
+
> [data-part-mark] {
|
|
347
|
+
margin-inline-end: 0;
|
|
320
348
|
}
|
|
321
349
|
|
|
322
350
|
/* ── Focus ────────────────────────────────────────────────────────────
|
|
@@ -326,7 +354,7 @@
|
|
|
326
354
|
* root an `<a>` or a `<button>`, and a ring that appears only where a family
|
|
327
355
|
* expects focus is a ring that goes missing.
|
|
328
356
|
*/
|
|
329
|
-
[data-ui
|
|
357
|
+
[data-ui-status-indicator][data-part-root]:focus-visible {
|
|
330
358
|
outline: var(--slotted-focus-ring-width, 2px) solid var(--slotted-focus-ring-color, Highlight);
|
|
331
359
|
outline-offset: var(--slotted-focus-ring-offset, 2px);
|
|
332
360
|
}
|
|
@@ -340,7 +368,7 @@
|
|
|
340
368
|
* text role, a step hover does not take. The offset is `link`'s own 0.15em
|
|
341
369
|
* (dossier § 4).
|
|
342
370
|
*/
|
|
343
|
-
[data-ui
|
|
371
|
+
[data-ui-status-indicator][data-part-root]:any-link {
|
|
344
372
|
text-decoration-color: transparent;
|
|
345
373
|
text-decoration-line: underline;
|
|
346
374
|
text-decoration-thickness: from-font;
|
|
@@ -350,11 +378,11 @@
|
|
|
350
378
|
text-decoration-color var(--slotted-duration-short) var(--slotted-easing-standard);
|
|
351
379
|
}
|
|
352
380
|
|
|
353
|
-
[data-ui
|
|
381
|
+
[data-ui-status-indicator][data-part-root]:any-link:not([data-disabled]):hover {
|
|
354
382
|
text-decoration-color: currentColor;
|
|
355
383
|
}
|
|
356
384
|
|
|
357
|
-
[data-ui
|
|
385
|
+
[data-ui-status-indicator][data-part-root]:any-link:not([data-disabled]):active {
|
|
358
386
|
color: var(--slotted-text-muted, GrayText);
|
|
359
387
|
text-decoration-color: currentColor;
|
|
360
388
|
}
|
|
@@ -402,20 +430,17 @@
|
|
|
402
430
|
* stacking context so the wave can sit under the mark (`z-index: -1`)
|
|
403
431
|
* without falling behind the surface the indicator is drawn on.
|
|
404
432
|
*/
|
|
405
|
-
[data-ui
|
|
433
|
+
[data-ui-status-indicator][data-pulse] {
|
|
406
434
|
isolation: isolate;
|
|
407
435
|
}
|
|
408
436
|
|
|
409
|
-
[data-ui
|
|
437
|
+
[data-ui-status-indicator][data-pulse] [data-part-mark]::after {
|
|
410
438
|
animation: slotted-status-indicator-pulse var(--slotted-duration-loop-slow)
|
|
411
439
|
var(--slotted-easing-enter) infinite;
|
|
412
440
|
background-color: var(--_rim);
|
|
413
|
-
block-size: var(--_mark-size);
|
|
414
441
|
border-radius: var(--slotted-radius-full, 9999px);
|
|
415
442
|
content: '';
|
|
416
|
-
|
|
417
|
-
inset-block-start: var(--_pulse-inset);
|
|
418
|
-
inset-inline-start: 0;
|
|
443
|
+
inset: 0;
|
|
419
444
|
pointer-events: none;
|
|
420
445
|
position: absolute;
|
|
421
446
|
z-index: -1;
|
|
@@ -429,7 +454,7 @@
|
|
|
429
454
|
* carried by the tone, the glyph and the word, as it is under reduced
|
|
430
455
|
* motion.
|
|
431
456
|
*/
|
|
432
|
-
[data-ui
|
|
457
|
+
[data-ui-status-indicator][data-mark='icon'][data-pulse] [data-part-mark]::after {
|
|
433
458
|
content: none;
|
|
434
459
|
}
|
|
435
460
|
|
|
@@ -440,7 +465,7 @@
|
|
|
440
465
|
* and the status is left to the parts that were always carrying it.
|
|
441
466
|
*/
|
|
442
467
|
@media (prefers-reduced-motion: reduce) {
|
|
443
|
-
[data-ui
|
|
468
|
+
[data-ui-status-indicator][data-pulse] [data-part-mark]::after {
|
|
444
469
|
animation: none;
|
|
445
470
|
content: none;
|
|
446
471
|
}
|
|
@@ -465,16 +490,16 @@
|
|
|
465
490
|
* rule: the system sets `box-shadow` to `none`.
|
|
466
491
|
*/
|
|
467
492
|
@media (forced-colors: active) {
|
|
468
|
-
[data-ui
|
|
493
|
+
[data-ui-status-indicator][data-mark='dot'] [data-part-mark] {
|
|
469
494
|
background-color: CanvasText;
|
|
470
495
|
border-color: CanvasText;
|
|
471
496
|
}
|
|
472
497
|
|
|
473
|
-
[data-ui
|
|
498
|
+
[data-ui-status-indicator][data-mark='dot'][data-status='unknown'] [data-part-mark] {
|
|
474
499
|
background-color: Canvas;
|
|
475
500
|
}
|
|
476
501
|
|
|
477
|
-
[data-ui
|
|
502
|
+
[data-ui-status-indicator][data-pulse] [data-part-mark]::after {
|
|
478
503
|
content: none;
|
|
479
504
|
}
|
|
480
505
|
}
|
|
@@ -6,9 +6,6 @@
|
|
|
6
6
|
"--slotted-control-font-size-lg",
|
|
7
7
|
"--slotted-control-font-size-md",
|
|
8
8
|
"--slotted-control-font-size-sm",
|
|
9
|
-
"--slotted-control-icon-size-lg",
|
|
10
|
-
"--slotted-control-icon-size-md",
|
|
11
|
-
"--slotted-control-icon-size-sm",
|
|
12
9
|
"--slotted-duration-loop-slow",
|
|
13
10
|
"--slotted-duration-short",
|
|
14
11
|
"--slotted-easing-enter",
|