@slotted/styles 0.1.0-beta.2 → 0.1.0-beta.20
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 +152 -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 +155 -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 +210 -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 +55 -52
- package/src/date-field/date-field.tokens.json +1 -0
- package/src/date-picker/date-picker.css +75 -59
- package/src/date-picker/date-picker.tokens.json +1 -0
- package/src/date-range-picker/date-range-picker.css +114 -118
- package/src/datetime-field/datetime-field.css +78 -80
- package/src/datetime-field/datetime-field.tokens.json +1 -0
- package/src/datetime-picker/datetime-picker.css +61 -63
- package/src/datetime-range-picker/datetime-range-picker.css +149 -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 +271 -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 +175 -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 +81 -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 +154 -133
- 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 +79 -71
- package/src/tag/tag.tokens.json +9 -0
- package/src/tags-input/tags-input.css +145 -82
- package/src/tags-input/tags-input.tokens.json +7 -1
- package/src/text-field/text-field.css +132 -136
- package/src/text-field/text-field.tokens.json +1 -0
- package/src/textarea/textarea.css +31 -28
- package/src/textarea/textarea.tokens.json +1 -0
- package/src/time-field/time-field.css +72 -69
- package/src/time-field/time-field.tokens.json +1 -0
- package/src/time-picker/time-picker.css +56 -58
- package/src/time-range-picker/time-range-picker.css +126 -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
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* in: a container cannot change its own tracks
|
|
11
11
|
* (`docs/build-briefing.md`, _Decisions already taken_).
|
|
12
12
|
*/
|
|
13
|
-
[data-ui
|
|
13
|
+
[data-ui-stat-card] {
|
|
14
14
|
--_edge-width: var(--slotted-stat-card-border-width, var(--slotted-border-width-thin, 1px));
|
|
15
15
|
--_radius: var(--slotted-stat-card-radius, var(--slotted-radius-lg, 8px));
|
|
16
16
|
--_inset-block: var(--slotted-stat-card-padding-block, var(--slotted-space-6, 1rem));
|
|
@@ -28,6 +28,13 @@
|
|
|
28
28
|
--slotted-stat-card-trend-inline-size,
|
|
29
29
|
calc(var(--slotted-space-12, 4rem) * 1.5)
|
|
30
30
|
);
|
|
31
|
+
/* The trend's height when it takes the last row and the card's whole
|
|
32
|
+
width: one step above the sparkline's own, because a line as wide as
|
|
33
|
+
the card at the sparkline's height reads flat. */
|
|
34
|
+
--_trend-block: var(--slotted-stat-card-trend-block-size, var(--slotted-space-11, 3rem));
|
|
35
|
+
/* The least height of a trend beside the figure, which otherwise takes
|
|
36
|
+
the figure's height: the sparkline's own step. */
|
|
37
|
+
--_trend-floor: var(--slotted-sparkline-block-size, var(--slotted-space-9, 2rem));
|
|
31
38
|
|
|
32
39
|
--_surface: var(--slotted-stat-card-background, var(--slotted-surface-raised, Canvas));
|
|
33
40
|
--_edge: var(--slotted-stat-card-border-color, var(--slotted-border-subtle, ButtonBorder));
|
|
@@ -87,7 +94,7 @@
|
|
|
87
94
|
}
|
|
88
95
|
|
|
89
96
|
/* The edge, out of flow, so a frame that changes width moves no text. */
|
|
90
|
-
[data-ui
|
|
97
|
+
[data-ui-stat-card]::before {
|
|
91
98
|
border: var(--_edge-width) solid var(--_edge);
|
|
92
99
|
border-radius: inherit;
|
|
93
100
|
content: '';
|
|
@@ -96,12 +103,14 @@
|
|
|
96
103
|
position: absolute;
|
|
97
104
|
}
|
|
98
105
|
|
|
99
|
-
[data-ui
|
|
106
|
+
[data-ui-stat-card][data-size='sm'] {
|
|
100
107
|
--_inset-block: var(--slotted-stat-card-padding-block-sm, var(--slotted-space-5, 0.75rem));
|
|
101
108
|
--_inset-inline: var(--slotted-stat-card-padding-inline-sm, var(--slotted-space-5, 0.75rem));
|
|
102
109
|
--_region-gap: var(--slotted-stat-card-region-gap-sm, var(--slotted-space-2, 0.25rem));
|
|
103
110
|
--_trend-gap: var(--slotted-stat-card-trend-gap-sm, var(--slotted-space-5, 0.75rem));
|
|
104
111
|
--_trend-size: var(--slotted-stat-card-trend-inline-size-sm, var(--slotted-space-12, 4rem));
|
|
112
|
+
--_trend-block: var(--slotted-stat-card-trend-block-size-sm, var(--slotted-space-9, 2rem));
|
|
113
|
+
--_trend-floor: var(--slotted-sparkline-block-size-sm, var(--slotted-space-7, 1.25rem));
|
|
105
114
|
--_value-size: var(
|
|
106
115
|
--slotted-stat-card-value-font-size-sm,
|
|
107
116
|
var(--slotted-font-size-2xl, 1.25rem)
|
|
@@ -126,7 +135,7 @@
|
|
|
126
135
|
--_value-line-narrow: var(--slotted-line-height-xl, 1.45);
|
|
127
136
|
}
|
|
128
137
|
|
|
129
|
-
[data-ui
|
|
138
|
+
[data-ui-stat-card][data-size='lg'] {
|
|
130
139
|
--_inset-block: var(--slotted-stat-card-padding-block-lg, var(--slotted-space-8, 1.5rem));
|
|
131
140
|
--_inset-inline: var(--slotted-stat-card-padding-inline-lg, var(--slotted-space-8, 1.5rem));
|
|
132
141
|
--_region-gap: var(--slotted-stat-card-region-gap-lg, var(--slotted-space-4, 0.5rem));
|
|
@@ -135,6 +144,8 @@
|
|
|
135
144
|
--slotted-stat-card-trend-inline-size-lg,
|
|
136
145
|
calc(var(--slotted-space-12, 4rem) * 2)
|
|
137
146
|
);
|
|
147
|
+
--_trend-block: var(--slotted-stat-card-trend-block-size-lg, var(--slotted-space-12, 4rem));
|
|
148
|
+
--_trend-floor: var(--slotted-sparkline-block-size-lg, var(--slotted-space-11, 3rem));
|
|
138
149
|
--_value-size: var(--slotted-stat-card-value-font-size-lg, var(--slotted-font-size-4xl, 2rem));
|
|
139
150
|
--_value-line: var(
|
|
140
151
|
--slotted-stat-card-value-line-height-lg,
|
|
@@ -170,11 +181,11 @@
|
|
|
170
181
|
|
|
171
182
|
/* ── Fill: the three frames a card has, and none ─────────────────────── */
|
|
172
183
|
|
|
173
|
-
[data-ui
|
|
184
|
+
[data-ui-stat-card][data-fill='elevated'] {
|
|
174
185
|
--_shadow: var(--slotted-stat-card-shadow-elevated, var(--slotted-shadow-md));
|
|
175
186
|
}
|
|
176
187
|
|
|
177
|
-
[data-ui
|
|
188
|
+
[data-ui-stat-card][data-fill='subtle'] {
|
|
178
189
|
--_surface: var(--slotted-stat-card-background-subtle, var(--slotted-surface-sunken, Canvas));
|
|
179
190
|
}
|
|
180
191
|
|
|
@@ -183,7 +194,7 @@
|
|
|
183
194
|
* of metrics separated by dividers, inside a card that is already a card.
|
|
184
195
|
* It keeps no inset either, because the host's inset is the inset.
|
|
185
196
|
*/
|
|
186
|
-
[data-ui
|
|
197
|
+
[data-ui-stat-card][data-fill='plain'] {
|
|
187
198
|
--_surface: transparent;
|
|
188
199
|
--_edge: transparent;
|
|
189
200
|
--_shadow: none;
|
|
@@ -218,28 +229,32 @@
|
|
|
218
229
|
* number is broken only when it is wider than the card itself. A floor on
|
|
219
230
|
* the trend was tried and pushed the trend through the card's edge.
|
|
220
231
|
*/
|
|
221
|
-
[data-ui
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
232
|
+
@scope ([data-ui-stat-card]) to (:scope [data-ui] > *) {
|
|
233
|
+
:scope [data-part-body] {
|
|
234
|
+
column-gap: var(--_trend-gap);
|
|
235
|
+
display: grid;
|
|
236
|
+
flex: 1 1 auto;
|
|
237
|
+
grid-template-areas:
|
|
238
|
+
'header header'
|
|
239
|
+
'figure trend'
|
|
240
|
+
'message message';
|
|
241
|
+
grid-template-columns: minmax(min-content, 1fr) minmax(0, var(--_trend-size));
|
|
242
|
+
grid-template-rows: auto minmax(0, 1fr) auto;
|
|
243
|
+
min-inline-size: 0;
|
|
244
|
+
row-gap: var(--_region-gap);
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
@scope ([data-ui-stat-card]) to (:scope [data-ui] > *) {
|
|
249
|
+
:scope[data-layout='stacked'] [data-part-body] {
|
|
250
|
+
grid-template-areas:
|
|
251
|
+
'header'
|
|
252
|
+
'figure'
|
|
253
|
+
'message'
|
|
254
|
+
'trend';
|
|
255
|
+
grid-template-columns: minmax(0, 1fr);
|
|
256
|
+
grid-template-rows: auto minmax(0, 1fr) auto auto;
|
|
257
|
+
}
|
|
243
258
|
}
|
|
244
259
|
|
|
245
260
|
/**
|
|
@@ -250,15 +265,19 @@
|
|
|
250
265
|
* inline axis gives these regions no intrinsic width: the figure alone
|
|
251
266
|
* decides the column, and the text is cut or wrapped by the card's width.
|
|
252
267
|
*/
|
|
253
|
-
[data-ui
|
|
254
|
-
|
|
255
|
-
|
|
268
|
+
@scope ([data-ui-stat-card]) to (:scope [data-ui] > *) {
|
|
269
|
+
:scope [data-part-header] {
|
|
270
|
+
contain: inline-size;
|
|
271
|
+
grid-area: header;
|
|
272
|
+
}
|
|
256
273
|
}
|
|
257
274
|
|
|
258
|
-
[data-ui
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
275
|
+
@scope ([data-ui-stat-card]) to (:scope [data-ui] > *) {
|
|
276
|
+
:scope [data-part-figure] {
|
|
277
|
+
align-self: start;
|
|
278
|
+
grid-area: figure;
|
|
279
|
+
min-inline-size: 0;
|
|
280
|
+
}
|
|
262
281
|
}
|
|
263
282
|
|
|
264
283
|
/**
|
|
@@ -268,32 +287,62 @@
|
|
|
268
287
|
* width is the space a wide value left, which a query on the card cannot
|
|
269
288
|
* see.
|
|
270
289
|
*/
|
|
271
|
-
[data-ui
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
290
|
+
@scope ([data-ui-stat-card]) to (:scope [data-ui] > *) {
|
|
291
|
+
:scope [data-part-trend] {
|
|
292
|
+
/* The marker's ring is the card's ground, not the page's. */
|
|
293
|
+
--slotted-sparkline-ring-color: var(--_surface);
|
|
294
|
+
|
|
295
|
+
align-self: stretch;
|
|
296
|
+
container-name: stat-card-trend;
|
|
297
|
+
container-type: inline-size;
|
|
298
|
+
grid-area: trend;
|
|
299
|
+
inline-size: 100%;
|
|
300
|
+
min-inline-size: 0;
|
|
301
|
+
}
|
|
281
302
|
}
|
|
282
303
|
|
|
283
304
|
@container stat-card-trend (max-width: 39px) {
|
|
284
|
-
[data-ui
|
|
285
|
-
|
|
305
|
+
@scope ([data-ui-stat-card]) to (:scope [data-ui] > *) {
|
|
306
|
+
:scope [data-part-trend] > * {
|
|
307
|
+
visibility: hidden;
|
|
308
|
+
}
|
|
309
|
+
}
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
/**
|
|
313
|
+
* On the last row the trend reaches the card's edges: its sides and its
|
|
314
|
+
* bottom bleed through the inset, and the card's corners round it. A line
|
|
315
|
+
* drawn inside the inset ends a gutter short of each edge and reads as a
|
|
316
|
+
* picture placed in the card; a line that runs to the frame reads as the
|
|
317
|
+
* card's ground. The edge is drawn over it, out of flow. A plain card has
|
|
318
|
+
* no inset, so the margins are nought there.
|
|
319
|
+
*/
|
|
320
|
+
@scope ([data-ui-stat-card]) to (:scope [data-ui] > *) {
|
|
321
|
+
:scope[data-layout='stacked'] [data-part-trend] {
|
|
322
|
+
align-self: end;
|
|
323
|
+
border-end-end-radius: calc(var(--_radius) - var(--_edge-width));
|
|
324
|
+
border-end-start-radius: calc(var(--_radius) - var(--_edge-width));
|
|
325
|
+
margin-block-end: calc(-1 * var(--_inset-block));
|
|
326
|
+
margin-block-start: var(--slotted-space-2, 0.25rem);
|
|
327
|
+
margin-inline: calc(-1 * var(--_inset-inline));
|
|
328
|
+
overflow: clip;
|
|
329
|
+
/* The region is wider than the column by the two insets. */
|
|
330
|
+
inline-size: auto;
|
|
286
331
|
}
|
|
287
332
|
}
|
|
288
333
|
|
|
289
|
-
[data-ui
|
|
290
|
-
|
|
291
|
-
|
|
334
|
+
@scope ([data-ui-stat-card]) to (:scope [data-ui] > *) {
|
|
335
|
+
:scope[data-layout='stacked'] [data-part-trend] > * {
|
|
336
|
+
block-size: var(--_trend-block);
|
|
337
|
+
min-block-size: 0;
|
|
338
|
+
}
|
|
292
339
|
}
|
|
293
340
|
|
|
294
|
-
[data-ui
|
|
295
|
-
|
|
296
|
-
|
|
341
|
+
@scope ([data-ui-stat-card]) to (:scope [data-ui] > *) {
|
|
342
|
+
:scope [data-part-message] {
|
|
343
|
+
contain: inline-size;
|
|
344
|
+
grid-area: message;
|
|
345
|
+
}
|
|
297
346
|
}
|
|
298
347
|
|
|
299
348
|
/**
|
|
@@ -303,29 +352,51 @@
|
|
|
303
352
|
* (`docs/token-foundation.md`, rule 4).
|
|
304
353
|
*/
|
|
305
354
|
@container stat-card (max-width: 219px) {
|
|
306
|
-
[data-ui
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
355
|
+
@scope ([data-ui-stat-card]) to (:scope [data-ui] > *) {
|
|
356
|
+
:scope [data-part-body] {
|
|
357
|
+
grid-template-areas:
|
|
358
|
+
'header'
|
|
359
|
+
'figure'
|
|
360
|
+
'message'
|
|
361
|
+
'trend';
|
|
362
|
+
grid-template-columns: minmax(0, 1fr);
|
|
363
|
+
grid-template-rows: auto minmax(0, 1fr) auto auto;
|
|
364
|
+
}
|
|
314
365
|
}
|
|
315
366
|
|
|
316
|
-
[data-ui
|
|
317
|
-
|
|
318
|
-
|
|
367
|
+
@scope ([data-ui-stat-card]) to (:scope [data-ui] > *) {
|
|
368
|
+
:scope [data-part-trend] {
|
|
369
|
+
align-self: end;
|
|
370
|
+
border-end-end-radius: calc(var(--_radius) - var(--_edge-width));
|
|
371
|
+
border-end-start-radius: calc(var(--_radius) - var(--_edge-width));
|
|
372
|
+
margin-block-end: calc(-1 * var(--_inset-block));
|
|
373
|
+
margin-block-start: var(--slotted-space-2, 0.25rem);
|
|
374
|
+
margin-inline: calc(-1 * var(--_inset-inline));
|
|
375
|
+
overflow: clip;
|
|
376
|
+
/* The region is wider than the column by the two insets. */
|
|
377
|
+
inline-size: auto;
|
|
378
|
+
}
|
|
379
|
+
}
|
|
380
|
+
|
|
381
|
+
@scope ([data-ui-stat-card]) to (:scope [data-ui] > *) {
|
|
382
|
+
:scope [data-part-trend] > * {
|
|
383
|
+
block-size: var(--_trend-block);
|
|
384
|
+
min-block-size: 0;
|
|
385
|
+
}
|
|
319
386
|
}
|
|
320
387
|
|
|
321
|
-
[data-ui
|
|
322
|
-
|
|
323
|
-
|
|
388
|
+
@scope ([data-ui-stat-card]) to (:scope [data-ui] > *) {
|
|
389
|
+
:scope [data-part-value] {
|
|
390
|
+
font-size: var(--_value-size-narrow);
|
|
391
|
+
line-height: var(--_value-line-narrow);
|
|
392
|
+
}
|
|
324
393
|
}
|
|
325
394
|
|
|
326
395
|
/* The value steps down here, and so does the line its placeholder keeps. */
|
|
327
|
-
[data-ui
|
|
328
|
-
|
|
396
|
+
@scope ([data-ui-stat-card]) to (:scope [data-ui] > *) {
|
|
397
|
+
:scope[data-loading] [data-part-value] {
|
|
398
|
+
min-block-size: calc(var(--_value-size-narrow) * var(--_value-line-narrow));
|
|
399
|
+
}
|
|
329
400
|
}
|
|
330
401
|
}
|
|
331
402
|
|
|
@@ -337,13 +408,15 @@
|
|
|
337
408
|
* them as part of the name, instead of floating them at the middle of the
|
|
338
409
|
* block.
|
|
339
410
|
*/
|
|
340
|
-
[data-ui
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
411
|
+
@scope ([data-ui-stat-card]) to (:scope [data-ui] > *) {
|
|
412
|
+
:scope [data-part-header] {
|
|
413
|
+
align-items: baseline;
|
|
414
|
+
column-gap: var(--slotted-space-3, 0.375rem);
|
|
415
|
+
display: flex;
|
|
416
|
+
flex-wrap: wrap;
|
|
417
|
+
min-inline-size: 0;
|
|
418
|
+
row-gap: var(--slotted-space-2, 0.25rem);
|
|
419
|
+
}
|
|
347
420
|
}
|
|
348
421
|
|
|
349
422
|
/**
|
|
@@ -355,32 +428,41 @@
|
|
|
355
428
|
* proportion of the type rather than a scale step: it is a width of
|
|
356
429
|
* words, and it scales with them.
|
|
357
430
|
*/
|
|
358
|
-
[data-ui
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
431
|
+
@scope ([data-ui-stat-card]) to (:scope [data-ui] > *) {
|
|
432
|
+
:scope [data-part-label] {
|
|
433
|
+
color: var(--_ink-muted);
|
|
434
|
+
flex: 1 1 0%;
|
|
435
|
+
font-size: var(--_label-size);
|
|
436
|
+
font-weight: var(--slotted-font-weight-medium, 500);
|
|
437
|
+
line-height: var(--_label-line);
|
|
438
|
+
margin: 0;
|
|
439
|
+
min-inline-size: min(100%, 10rem);
|
|
440
|
+
overflow-wrap: break-word;
|
|
441
|
+
}
|
|
367
442
|
}
|
|
368
443
|
|
|
369
|
-
[data-ui
|
|
370
|
-
|
|
371
|
-
|
|
444
|
+
@scope ([data-ui-stat-card]) to (:scope [data-ui] > *) {
|
|
445
|
+
:scope [data-part-status] {
|
|
446
|
+
display: inline-flex;
|
|
447
|
+
flex: none;
|
|
448
|
+
}
|
|
372
449
|
}
|
|
373
450
|
|
|
374
451
|
/* The action takes the end of the header's first line and stays there
|
|
375
452
|
when the label wraps: it is the one thing on the card the reader presses,
|
|
376
453
|
and a corner is where a control is looked for. */
|
|
377
|
-
[data-ui
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
454
|
+
@scope ([data-ui-stat-card]) to (:scope [data-ui] > *) {
|
|
455
|
+
:scope [data-part-action] {
|
|
456
|
+
/* An action slot states one size for the links it holds. */
|
|
457
|
+
--slotted-link-font-size: var(--slotted-font-size-sm, 0.8125rem);
|
|
458
|
+
|
|
459
|
+
flex: none;
|
|
460
|
+
/* The label's line, so a link here is as tall in the fallback face as in
|
|
461
|
+
the web face and the header does not grow when the font arrives. */
|
|
462
|
+
font-size: var(--_label-size);
|
|
463
|
+
line-height: var(--_label-line);
|
|
464
|
+
margin-inline-start: auto;
|
|
465
|
+
}
|
|
384
466
|
}
|
|
385
467
|
|
|
386
468
|
/* On a finger the card's one control is a full target among 44-pixel
|
|
@@ -388,16 +470,18 @@
|
|
|
388
470
|
part itself when `render` made it one — reaches
|
|
389
471
|
the comfortable size in both axes, and the header keeps its height. */
|
|
390
472
|
@media (pointer: coarse) {
|
|
391
|
-
[data-ui
|
|
392
|
-
:is([data-part
|
|
393
|
-
|
|
473
|
+
@scope ([data-ui-stat-card]) to (:scope [data-ui] > *) {
|
|
474
|
+
:scope :is([data-part-action]:is(a, button), [data-part-action] > :is(a, button)) {
|
|
475
|
+
position: relative;
|
|
476
|
+
}
|
|
394
477
|
}
|
|
395
478
|
|
|
396
|
-
[data-ui
|
|
397
|
-
:is([data-part
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
479
|
+
@scope ([data-ui-stat-card]) to (:scope [data-ui] > *) {
|
|
480
|
+
:scope :is([data-part-action]:is(a, button), [data-part-action] > :is(a, button))::before {
|
|
481
|
+
content: '';
|
|
482
|
+
inset: min(0px, calc((100% - var(--slotted-target-comfortable, 44px)) / 2));
|
|
483
|
+
position: absolute;
|
|
484
|
+
}
|
|
401
485
|
}
|
|
402
486
|
}
|
|
403
487
|
|
|
@@ -409,17 +493,21 @@
|
|
|
409
493
|
* so a delta that does not fit beside a wide number drops under it rather
|
|
410
494
|
* than pushing the number.
|
|
411
495
|
*/
|
|
412
|
-
[data-ui
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
496
|
+
@scope ([data-ui-stat-card]) to (:scope [data-ui] > *) {
|
|
497
|
+
:scope [data-part-figure] {
|
|
498
|
+
align-items: baseline;
|
|
499
|
+
column-gap: var(--slotted-space-3, 0.375rem);
|
|
500
|
+
display: flex;
|
|
501
|
+
flex-wrap: wrap;
|
|
502
|
+
row-gap: 0;
|
|
503
|
+
}
|
|
418
504
|
}
|
|
419
505
|
|
|
420
|
-
[data-ui
|
|
421
|
-
|
|
422
|
-
|
|
506
|
+
@scope ([data-ui-stat-card]) to (:scope [data-ui] > *) {
|
|
507
|
+
:scope [data-part-comparison] {
|
|
508
|
+
contain: inline-size;
|
|
509
|
+
flex: 1 1 100%;
|
|
510
|
+
}
|
|
423
511
|
}
|
|
424
512
|
|
|
425
513
|
/**
|
|
@@ -432,38 +520,44 @@
|
|
|
432
520
|
* to pull a large numeral's counters back together, and it is the same
|
|
433
521
|
* fraction at every size.
|
|
434
522
|
*/
|
|
435
|
-
[data-ui
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
523
|
+
@scope ([data-ui-stat-card]) to (:scope [data-ui] > *) {
|
|
524
|
+
:scope [data-part-value] {
|
|
525
|
+
/* The figure and its unit are two flex items on one baseline — the text
|
|
526
|
+
node is an item of its own — so the gap spaces the unit from the digit
|
|
527
|
+
on whichever side it stands. A margin on the unit, reset by
|
|
528
|
+
`:first-child` for a leading unit, hugged a trailing one: after a bare
|
|
529
|
+
figure the unit is the first element child. */
|
|
530
|
+
align-items: baseline;
|
|
531
|
+
color: var(--_ink);
|
|
532
|
+
display: inline-flex;
|
|
533
|
+
flex-wrap: wrap;
|
|
534
|
+
gap: 0.15em;
|
|
535
|
+
font-size: var(--_value-size);
|
|
536
|
+
font-variant-numeric: proportional-nums;
|
|
537
|
+
font-weight: var(--slotted-font-weight-semibold, 600);
|
|
538
|
+
/* The figure is set at the 3xl or 4xl step, where the theme's tighter
|
|
539
|
+
tracking applies. */
|
|
540
|
+
letter-spacing: var(--slotted-letter-spacing-tighter, -0.03em);
|
|
541
|
+
unicode-bidi: plaintext;
|
|
542
|
+
line-height: var(--_value-line);
|
|
543
|
+
margin: 0;
|
|
544
|
+
min-inline-size: 0;
|
|
545
|
+
/* A number is never truncated: a value wider than its column breaks
|
|
546
|
+
rather than clips, and a consumer who wants it whole formats it
|
|
547
|
+
compact or stacks the card. */
|
|
548
|
+
overflow-wrap: break-word;
|
|
549
|
+
}
|
|
458
550
|
}
|
|
459
551
|
|
|
460
552
|
/* The unit is in the value's own line, a step down in size and weight, so
|
|
461
553
|
`$` and `%` read as annotation of the number rather than as digits. */
|
|
462
|
-
[data-ui
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
554
|
+
@scope ([data-ui-stat-card]) to (:scope [data-ui] > *) {
|
|
555
|
+
:scope [data-part-unit] {
|
|
556
|
+
color: var(--_ink-muted);
|
|
557
|
+
font-size: var(--_delta-size);
|
|
558
|
+
font-weight: var(--slotted-font-weight-medium, 500);
|
|
559
|
+
letter-spacing: 0;
|
|
560
|
+
}
|
|
467
561
|
}
|
|
468
562
|
|
|
469
563
|
/**
|
|
@@ -472,44 +566,62 @@
|
|
|
472
566
|
* metrics, and the tone's text role already clears the reading ratio on
|
|
473
567
|
* the surface. It sits on the value's baseline.
|
|
474
568
|
*/
|
|
475
|
-
[data-ui
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
[data-ui='stat-card'] [data-part='delta'][data-tone='neutral'] {
|
|
492
|
-
--_tone-text: var(--_ink-muted);
|
|
569
|
+
@scope ([data-ui-stat-card]) to (:scope [data-ui] > *) {
|
|
570
|
+
:scope [data-part-delta] {
|
|
571
|
+
align-items: center;
|
|
572
|
+
color: var(--_tone-text);
|
|
573
|
+
column-gap: var(--slotted-space-1, 0.125rem);
|
|
574
|
+
display: inline-flex;
|
|
575
|
+
font-size: var(--_delta-size);
|
|
576
|
+
font-variant-numeric: tabular-nums;
|
|
577
|
+
font-weight: var(--slotted-font-weight-semibold, 600);
|
|
578
|
+
line-height: 1;
|
|
579
|
+
/* A signed number is a run of its own: in a right-to-left document the
|
|
580
|
+
sign of `+12.4%` is a neutral character and drifts to the far end of
|
|
581
|
+
the run, so the run is laid out by its own content. */
|
|
582
|
+
unicode-bidi: plaintext;
|
|
583
|
+
white-space: nowrap;
|
|
584
|
+
}
|
|
493
585
|
}
|
|
494
586
|
|
|
495
|
-
[data-ui
|
|
496
|
-
|
|
587
|
+
@scope ([data-ui-stat-card]) to (:scope [data-ui] > *) {
|
|
588
|
+
:scope [data-part-delta][data-tone='neutral'] {
|
|
589
|
+
--_tone-text: var(--_ink-muted);
|
|
590
|
+
}
|
|
497
591
|
}
|
|
498
592
|
|
|
499
|
-
[data-ui
|
|
500
|
-
|
|
593
|
+
@scope ([data-ui-stat-card]) to (:scope [data-ui] > *) {
|
|
594
|
+
:scope [data-part-delta][data-tone='accent'] {
|
|
595
|
+
--_tone-text: var(--slotted-tone-accent-text);
|
|
596
|
+
}
|
|
501
597
|
}
|
|
502
598
|
|
|
503
|
-
[data-ui
|
|
504
|
-
|
|
599
|
+
@scope ([data-ui-stat-card]) to (:scope [data-ui] > *) {
|
|
600
|
+
:scope [data-part-delta][data-tone='secondary'] {
|
|
601
|
+
--_tone-text: var(--slotted-tone-secondary-text);
|
|
602
|
+
}
|
|
505
603
|
}
|
|
506
604
|
|
|
507
|
-
[data-ui
|
|
508
|
-
|
|
605
|
+
@scope ([data-ui-stat-card]) to (:scope [data-ui] > *) {
|
|
606
|
+
:scope [data-part-delta][data-tone='success'] {
|
|
607
|
+
--_tone-text: var(--slotted-tone-success-text);
|
|
608
|
+
}
|
|
609
|
+
|
|
610
|
+
:scope [data-part-delta][data-tone='info'] {
|
|
611
|
+
--_tone-text: var(--slotted-tone-info-text);
|
|
612
|
+
}
|
|
613
|
+
}
|
|
614
|
+
|
|
615
|
+
@scope ([data-ui-stat-card]) to (:scope [data-ui] > *) {
|
|
616
|
+
:scope [data-part-delta][data-tone='warning'] {
|
|
617
|
+
--_tone-text: var(--slotted-tone-warning-text);
|
|
618
|
+
}
|
|
509
619
|
}
|
|
510
620
|
|
|
511
|
-
[data-ui
|
|
512
|
-
|
|
621
|
+
@scope ([data-ui-stat-card]) to (:scope [data-ui] > *) {
|
|
622
|
+
:scope [data-part-delta][data-tone='danger'] {
|
|
623
|
+
--_tone-text: var(--slotted-tone-danger-text);
|
|
624
|
+
}
|
|
513
625
|
}
|
|
514
626
|
|
|
515
627
|
/**
|
|
@@ -520,38 +632,43 @@
|
|
|
520
632
|
* change draws `minus`. The binding renders the glyph inside the icon box;
|
|
521
633
|
* the part hands the box its size, and the box inherits the delta's ink.
|
|
522
634
|
*/
|
|
523
|
-
[data-ui
|
|
524
|
-
|
|
635
|
+
@scope ([data-ui-stat-card]) to (:scope [data-ui] > *) {
|
|
636
|
+
:scope [data-part-indicator] {
|
|
637
|
+
--slotted-icon-size: var(--_indicator-size);
|
|
525
638
|
|
|
526
|
-
|
|
527
|
-
|
|
639
|
+
display: inline-flex;
|
|
640
|
+
flex: none;
|
|
641
|
+
}
|
|
528
642
|
}
|
|
529
643
|
|
|
530
644
|
/* A reflection across the horizontal axis, not motion: nothing travels when
|
|
531
645
|
a rise becomes a fall. Time runs from the right in a right-to-left
|
|
532
646
|
document, so the rise points the other way there, as the sparkline beside
|
|
533
647
|
it does — the `directional` icon box the binding draws does that. */
|
|
534
|
-
[data-ui
|
|
535
|
-
[data-part
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
rotate: x 180deg;
|
|
648
|
+
@scope ([data-ui-stat-card]) to (:scope [data-ui] > *) {
|
|
649
|
+
:scope [data-part-delta][data-trend='down'] [data-part-indicator] > [data-ui-icon] {
|
|
650
|
+
rotate: x 180deg;
|
|
651
|
+
}
|
|
539
652
|
}
|
|
540
653
|
|
|
541
654
|
/* ── Comparison: the prose under the figure ───────────────────────────── */
|
|
542
655
|
|
|
543
|
-
[data-ui
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
656
|
+
@scope ([data-ui-stat-card]) to (:scope [data-ui] > *) {
|
|
657
|
+
:scope [data-part-comparison] {
|
|
658
|
+
color: var(--_ink-muted);
|
|
659
|
+
font-size: var(--_prose-size);
|
|
660
|
+
line-height: var(--_prose-line);
|
|
661
|
+
margin-block-start: var(--_region-gap);
|
|
662
|
+
margin: 0;
|
|
663
|
+
min-inline-size: 0;
|
|
664
|
+
overflow-wrap: anywhere;
|
|
665
|
+
}
|
|
551
666
|
}
|
|
552
667
|
|
|
553
|
-
[data-ui
|
|
554
|
-
|
|
668
|
+
@scope ([data-ui-stat-card]) to (:scope [data-ui] > *) {
|
|
669
|
+
:scope [data-part-period] {
|
|
670
|
+
color: var(--_ink-muted);
|
|
671
|
+
}
|
|
555
672
|
}
|
|
556
673
|
|
|
557
674
|
/* ── Trend: where a sparkline goes ────────────────────────────────────── */
|
|
@@ -564,64 +681,105 @@
|
|
|
564
681
|
* — a card with no delta, or a metric with no valence, draws its trend in
|
|
565
682
|
* the theme's blue and not in grey.
|
|
566
683
|
*/
|
|
567
|
-
[data-ui
|
|
568
|
-
|
|
569
|
-
|
|
684
|
+
@scope ([data-ui-stat-card]) to (:scope [data-ui] > *) {
|
|
685
|
+
:scope [data-part-trend] {
|
|
686
|
+
display: flex;
|
|
687
|
+
}
|
|
688
|
+
}
|
|
689
|
+
|
|
690
|
+
/**
|
|
691
|
+
* Beside the figure the trend is as tall as the figure — the value, the
|
|
692
|
+
* delta and the comparison under them — so its last point is read level
|
|
693
|
+
* with the number it ends at, and no gap opens above or below a line of a
|
|
694
|
+
* fixed height centred on a taller column. The sparkline's own step is the
|
|
695
|
+
* floor, for a figure with no comparison.
|
|
696
|
+
*/
|
|
697
|
+
@scope ([data-ui-stat-card]) to (:scope [data-ui] > *) {
|
|
698
|
+
:scope [data-part-trend] > * {
|
|
699
|
+
block-size: auto;
|
|
700
|
+
/* No height of its own to give the row: the drawing would otherwise
|
|
701
|
+
make the figure's row taller than the figure. */
|
|
702
|
+
contain: size;
|
|
703
|
+
min-block-size: var(--_trend-floor);
|
|
704
|
+
}
|
|
570
705
|
}
|
|
571
706
|
|
|
572
|
-
[data-ui
|
|
573
|
-
|
|
707
|
+
@scope ([data-ui-stat-card]) to (:scope [data-ui] > *) {
|
|
708
|
+
:scope[data-tone='success'] [data-part-trend] {
|
|
709
|
+
--slotted-sparkline-color: var(--slotted-tone-success-text);
|
|
710
|
+
}
|
|
711
|
+
|
|
712
|
+
:scope[data-tone='info'] [data-part-trend] {
|
|
713
|
+
--slotted-sparkline-color: var(--slotted-tone-info-text);
|
|
714
|
+
}
|
|
574
715
|
}
|
|
575
716
|
|
|
576
|
-
[data-ui
|
|
577
|
-
|
|
717
|
+
@scope ([data-ui-stat-card]) to (:scope [data-ui] > *) {
|
|
718
|
+
:scope[data-tone='danger'] [data-part-trend] {
|
|
719
|
+
--slotted-sparkline-color: var(--slotted-tone-danger-text);
|
|
720
|
+
}
|
|
578
721
|
}
|
|
579
722
|
|
|
580
|
-
[data-ui
|
|
581
|
-
|
|
723
|
+
@scope ([data-ui-stat-card]) to (:scope [data-ui] > *) {
|
|
724
|
+
:scope[data-tone='warning'] [data-part-trend] {
|
|
725
|
+
--slotted-sparkline-color: var(--slotted-tone-warning-text);
|
|
726
|
+
}
|
|
582
727
|
}
|
|
583
728
|
|
|
584
|
-
[data-ui
|
|
585
|
-
|
|
729
|
+
@scope ([data-ui-stat-card]) to (:scope [data-ui] > *) {
|
|
730
|
+
:scope[data-tone='accent'] [data-part-trend] {
|
|
731
|
+
--slotted-sparkline-color: var(--slotted-tone-accent-text);
|
|
732
|
+
}
|
|
586
733
|
}
|
|
587
734
|
|
|
588
|
-
[data-ui
|
|
589
|
-
|
|
735
|
+
@scope ([data-ui-stat-card]) to (:scope [data-ui] > *) {
|
|
736
|
+
:scope[data-tone='secondary'] [data-part-trend] {
|
|
737
|
+
--slotted-sparkline-color: var(--slotted-tone-secondary-text);
|
|
738
|
+
}
|
|
590
739
|
}
|
|
591
740
|
|
|
592
|
-
[data-ui
|
|
593
|
-
|
|
741
|
+
@scope ([data-ui-stat-card]) to (:scope [data-ui] > *) {
|
|
742
|
+
:scope[data-fill='plain'] [data-part-trend] {
|
|
743
|
+
--slotted-sparkline-ring-color: var(--slotted-surface-raised, Canvas);
|
|
744
|
+
}
|
|
594
745
|
}
|
|
595
746
|
|
|
596
747
|
/* ── Message: what stands in for a value that is missing or failed ────── */
|
|
597
748
|
|
|
598
|
-
[data-ui
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
749
|
+
@scope ([data-ui-stat-card]) to (:scope [data-ui] > *) {
|
|
750
|
+
:scope [data-part-message] {
|
|
751
|
+
color: var(--_ink-muted);
|
|
752
|
+
font-size: var(--_prose-size);
|
|
753
|
+
line-height: var(--_prose-line);
|
|
754
|
+
margin: 0;
|
|
755
|
+
min-inline-size: 0;
|
|
756
|
+
overflow-wrap: anywhere;
|
|
757
|
+
}
|
|
605
758
|
}
|
|
606
759
|
|
|
607
|
-
[data-ui
|
|
608
|
-
|
|
760
|
+
@scope ([data-ui-stat-card]) to (:scope [data-ui] > *) {
|
|
761
|
+
:scope[data-status='error'] [data-part-message] {
|
|
762
|
+
color: var(--slotted-tone-danger-text);
|
|
763
|
+
}
|
|
609
764
|
}
|
|
610
765
|
|
|
611
766
|
/* A value that is not there is a dash in the muted step, at the value's
|
|
612
767
|
own size, so the row keeps its height and its rhythm. */
|
|
613
|
-
[data-ui
|
|
614
|
-
|
|
615
|
-
|
|
768
|
+
@scope ([data-ui-stat-card]) to (:scope [data-ui] > *) {
|
|
769
|
+
:scope[data-status='empty'] [data-part-value],
|
|
770
|
+
:scope[data-status='error'] [data-part-value] {
|
|
771
|
+
color: var(--_ink-muted);
|
|
772
|
+
}
|
|
616
773
|
}
|
|
617
774
|
|
|
618
775
|
/* ── Loading ──────────────────────────────────────────────────────────── */
|
|
619
776
|
|
|
620
777
|
/**
|
|
621
778
|
* The binding renders a `skeleton` in place of each text part and a block
|
|
622
|
-
* in the trend
|
|
623
|
-
*
|
|
624
|
-
*
|
|
779
|
+
* in the trend. The block is the trend region's child, so the rules that
|
|
780
|
+
* size a sparkline there size it too: the figure's height beside the
|
|
781
|
+
* figure, the card's width and `--_trend-block` on the last row. The card
|
|
782
|
+
* does not change size when the line arrives.
|
|
625
783
|
*/
|
|
626
784
|
/**
|
|
627
785
|
* The value's box is an inline flex line, so its height is its content's.
|
|
@@ -632,28 +790,9 @@
|
|
|
632
790
|
* arrived. The floor is one line of the value's own type, so the two states
|
|
633
791
|
* occupy the same box.
|
|
634
792
|
*/
|
|
635
|
-
[data-ui
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
[data-ui='stat-card'][data-loading] [data-part='trend'] {
|
|
640
|
-
--slotted-skeleton-block-size: var(
|
|
641
|
-
--slotted-sparkline-block-size,
|
|
642
|
-
var(--slotted-space-9, 2rem)
|
|
643
|
-
);
|
|
644
|
-
}
|
|
645
|
-
|
|
646
|
-
[data-ui='stat-card'][data-loading][data-size='sm'] [data-part='trend'] {
|
|
647
|
-
--slotted-skeleton-block-size: var(
|
|
648
|
-
--slotted-sparkline-block-size-sm,
|
|
649
|
-
var(--slotted-space-7, 1.25rem)
|
|
650
|
-
);
|
|
651
|
-
}
|
|
652
|
-
|
|
653
|
-
[data-ui='stat-card'][data-loading][data-size='lg'] [data-part='trend'] {
|
|
654
|
-
--slotted-skeleton-block-size: var(
|
|
655
|
-
--slotted-sparkline-block-size-lg,
|
|
656
|
-
var(--slotted-space-11, 3rem)
|
|
657
|
-
);
|
|
793
|
+
@scope ([data-ui-stat-card]) to (:scope [data-ui] > *) {
|
|
794
|
+
:scope[data-loading] [data-part-value] {
|
|
795
|
+
min-block-size: calc(var(--_value-size) * var(--_value-line));
|
|
796
|
+
}
|
|
658
797
|
}
|
|
659
798
|
}
|