@slotted/styles 0.1.0-beta.3 → 0.1.0-beta.31
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +13 -1
- package/src/accordion/accordion.css +11 -11
- package/src/action-bar/action-bar.css +47 -44
- package/src/action-bar/action-bar.tokens.json +1 -0
- package/src/action-sheet/action-sheet.css +39 -39
- package/src/alert/alert.css +97 -97
- package/src/alert/alert.tokens.json +6 -1
- package/src/app-shell/app-shell.css +456 -329
- package/src/app-shell/app-shell.tokens.json +6 -3
- package/src/aspect-ratio/aspect-ratio.css +9 -9
- package/src/attachment/attachment.css +118 -114
- package/src/avatar/avatar.css +96 -66
- package/src/avatar/avatar.tokens.json +7 -0
- package/src/avatar-group/avatar-group.css +22 -23
- package/src/badge/badge.css +54 -46
- package/src/badge/badge.tokens.json +5 -0
- package/src/breadcrumb/breadcrumb.css +52 -52
- package/src/button/button.css +137 -89
- package/src/button/button.tokens.json +5 -0
- package/src/button-group/button-group.css +80 -79
- package/src/button-group/button-group.tokens.json +1 -0
- package/src/calendar/calendar.css +139 -109
- package/src/calendar/calendar.tokens.json +5 -1
- package/src/card/card.css +70 -67
- package/src/card/card.tokens.json +1 -0
- package/src/carousel/carousel.css +158 -169
- package/src/cascader/cascader.css +161 -159
- package/src/cascader/cascader.tokens.json +2 -0
- package/src/chart/chart.css +288 -267
- package/src/chart/chart.tokens.json +4 -0
- package/src/checkbox/checkbox.css +143 -148
- package/src/checkbox-group/checkbox-group.css +7 -7
- package/src/code-block/code-block.css +85 -89
- package/src/collapsible/collapsible.css +81 -80
- package/src/collapsible/collapsible.tokens.json +1 -0
- package/src/color-picker/color-picker.css +106 -114
- package/src/column-manager/column-manager.css +111 -119
- package/src/combobox/combobox.css +206 -132
- package/src/combobox/combobox.tokens.json +4 -0
- package/src/command-palette/command-palette.css +155 -102
- package/src/command-palette/command-palette.tokens.json +2 -0
- package/src/container/container.css +27 -27
- package/src/context-menu/context-menu.css +9 -9
- package/src/currency-field/currency-field.css +119 -119
- package/src/currency-field/currency-field.tokens.json +1 -0
- package/src/dashboard-grid/dashboard-grid.css +204 -115
- package/src/data-grid/data-grid.css +598 -496
- package/src/data-grid/data-grid.tokens.json +5 -1
- package/src/data-list/data-list.css +82 -71
- package/src/data-list/data-list.tokens.json +2 -1
- package/src/date-field/date-field.css +62 -57
- package/src/date-field/date-field.tokens.json +1 -0
- package/src/date-picker/date-picker.css +117 -58
- package/src/date-picker/date-picker.tokens.json +5 -0
- package/src/date-range-picker/date-range-picker.css +157 -127
- package/src/date-range-picker/date-range-picker.tokens.json +4 -0
- package/src/datetime-field/datetime-field.css +90 -90
- package/src/datetime-field/datetime-field.tokens.json +1 -0
- package/src/datetime-picker/datetime-picker.css +123 -70
- package/src/datetime-picker/datetime-picker.tokens.json +4 -1
- package/src/datetime-range-picker/datetime-range-picker.css +191 -163
- package/src/datetime-range-picker/datetime-range-picker.tokens.json +4 -0
- package/src/description-list/description-list.css +105 -75
- package/src/description-list/description-list.tokens.json +1 -0
- package/src/detail-panel/detail-panel.css +86 -71
- package/src/detail-panel/detail-panel.tokens.json +2 -0
- package/src/dialog/dialog.css +435 -199
- package/src/dialog/dialog.tokens.json +9 -0
- package/src/divider/divider.css +20 -20
- package/src/drawer/drawer.css +598 -237
- package/src/drawer/drawer.tokens.json +14 -0
- package/src/entity-picker/entity-picker.css +326 -272
- package/src/entity-picker/entity-picker.tokens.json +4 -0
- package/src/event-calendar/event-calendar.css +357 -399
- package/src/field/field.css +106 -93
- package/src/field/field.tokens.json +2 -0
- package/src/field-group/field-group.css +43 -33
- package/src/field-group/field-group.tokens.json +3 -0
- package/src/filter-bar/filter-bar.css +200 -216
- package/src/form/form.css +100 -26
- package/src/form/form.tokens.json +6 -1
- package/src/fullscreen/fullscreen.css +26 -27
- package/src/grid/grid.css +29 -29
- package/src/highlight/highlight.css +11 -11
- package/src/hover-card/hover-card.css +9 -9
- package/src/icon/icon.css +67 -20
- package/src/icon/icon.tokens.json +1 -0
- package/src/image/image.css +42 -42
- package/src/import-export-center/import-export-center.css +147 -168
- package/src/import-export-center/import-export-center.tokens.json +1 -0
- package/src/inline/inline.css +28 -28
- package/src/inline-message/inline-message.css +162 -86
- package/src/inline-message/inline-message.tokens.json +4 -0
- package/src/kbd/kbd.css +62 -50
- package/src/kbd/kbd.tokens.json +3 -0
- package/src/link/link.css +54 -33
- package/src/link/link.tokens.json +4 -0
- package/src/list/list.css +23 -23
- package/src/list-item/list-item.css +89 -75
- package/src/list-item/list-item.tokens.json +7 -0
- package/src/listbox/listbox.css +71 -70
- package/src/listbox/listbox.tokens.json +0 -1
- package/src/loading-overlay/loading-overlay.css +86 -103
- package/src/markdown/markdown.css +20 -20
- package/src/media-viewer/media-viewer.css +790 -0
- package/src/media-viewer/media-viewer.tokens.json +53 -0
- package/src/menu/menu.css +166 -83
- package/src/menu/menu.tokens.json +3 -1
- package/src/menubar/menubar.css +16 -16
- package/src/message/message.css +1253 -1246
- package/src/message/message.tokens.json +5 -0
- package/src/message-scroller/message-scroller.css +323 -320
- package/src/multi-select/multi-select.css +233 -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 +41 -27
- package/src/page/page.tokens.json +1 -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/popover/popover.css +85 -65
- package/src/popover/popover.tokens.json +2 -0
- package/src/progress-indicator/progress-indicator.css +192 -136
- package/src/progress-indicator/progress-indicator.tokens.json +1 -0
- package/src/prompt-composer/prompt-composer.css +260 -113
- package/src/prompt-composer/prompt-composer.tokens.json +15 -0
- package/src/prose/prose.css +77 -82
- package/src/radio-group/radio-group.css +107 -112
- package/src/rating/rating.css +146 -142
- package/src/rating/rating.tokens.json +1 -0
- package/src/result-state/result-state.css +95 -102
- package/src/result-state/result-state.tokens.json +1 -0
- package/src/runtime-properties.mjs +19 -6
- package/src/saved-views/saved-views.css +43 -49
- package/src/scroll-area/scroll-area.css +50 -37
- package/src/section/section.css +179 -44
- package/src/section/section.tokens.json +9 -3
- package/src/segmented-control/segmented-control.css +210 -133
- package/src/segmented-control/segmented-control.tokens.json +7 -11
- package/src/select/select.css +213 -149
- package/src/select/select.tokens.json +4 -0
- package/src/side-navigation/side-navigation.css +201 -198
- package/src/side-navigation/side-navigation.tokens.json +1 -0
- package/src/skeleton/skeleton.css +57 -58
- package/src/slider/slider.css +101 -103
- package/src/sparkline/sparkline.css +75 -53
- package/src/sparkline/sparkline.tokens.json +2 -0
- package/src/spinner/spinner.css +83 -180
- package/src/spinner/spinner.tokens.json +0 -1
- package/src/split-button/split-button.css +34 -35
- package/src/split-button/split-button.tokens.json +1 -0
- package/src/splitter/splitter.css +47 -48
- package/src/stack/stack.css +25 -25
- package/src/stat-card/stat-card.css +415 -245
- package/src/stat-card/stat-card.tokens.json +8 -0
- package/src/status-indicator/status-indicator.css +124 -100
- package/src/status-indicator/status-indicator.tokens.json +0 -3
- package/src/stepper/stepper.css +78 -82
- package/src/switch/switch.css +100 -106
- package/src/table/table.css +270 -198
- package/src/table/table.tokens.json +2 -0
- package/src/table-of-contents/table-of-contents.css +60 -59
- package/src/table-of-contents/table-of-contents.tokens.json +1 -0
- package/src/tabs/tabs.css +327 -294
- package/src/tabs/tabs.tokens.json +7 -1
- package/src/tag/tag.css +109 -88
- package/src/tag/tag.tokens.json +10 -0
- package/src/tags-input/tags-input.css +152 -87
- package/src/tags-input/tags-input.tokens.json +7 -1
- package/src/text-field/text-field.css +146 -148
- package/src/text-field/text-field.tokens.json +1 -0
- package/src/textarea/textarea.css +38 -33
- package/src/textarea/textarea.tokens.json +1 -0
- package/src/time-field/time-field.css +82 -77
- package/src/time-field/time-field.tokens.json +1 -0
- package/src/time-picker/time-picker.css +116 -64
- package/src/time-picker/time-picker.tokens.json +4 -1
- package/src/time-range-picker/time-range-picker.css +168 -140
- package/src/time-range-picker/time-range-picker.tokens.json +4 -0
- package/src/timeline/timeline.css +280 -292
- package/src/timeline/timeline.tokens.json +5 -0
- package/src/toast/toast.css +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 +33 -38
- package/src/tooltip/tooltip.css +65 -39
- package/src/tooltip/tooltip.tokens.json +1 -0
- package/src/top-navigation/top-navigation.css +252 -268
- package/src/tour/tour.css +68 -74
- package/src/tour/tour.tokens.json +1 -0
- package/src/transfer/transfer.css +164 -168
- package/src/tree/tree.css +113 -121
- package/src/typography/typography.css +42 -38
- package/src/typography/typography.tokens.json +1 -0
- package/src/upload/upload.css +256 -257
- package/src/visually-hidden/visually-hidden.css +1 -1
- package/src/wizard/wizard.css +187 -199
|
@@ -23,14 +23,10 @@
|
|
|
23
23
|
}
|
|
24
24
|
|
|
25
25
|
/**
|
|
26
|
-
* Where the travelling bar of an indeterminate indicator starts and how
|
|
27
|
-
* it is, as percentages of the track
|
|
28
|
-
*
|
|
29
|
-
*
|
|
30
|
-
* two things read them: the plain bar sets its inset and its length from them,
|
|
31
|
-
* and the wavy bar cuts a window out of its path at the same two numbers. One
|
|
32
|
-
* clock, read twice, is what keeps a wavy bar and a plain one travelling the
|
|
33
|
-
* same journey.
|
|
26
|
+
* Where the travelling bar of an indeterminate wavy indicator starts and how
|
|
27
|
+
* long it is, as percentages of the track: the wavy bar cuts a window out of
|
|
28
|
+
* its path at the two numbers. The plain bar travels the same journey by
|
|
29
|
+
* `translate` and `scale`, which the compositor runs.
|
|
34
30
|
*/
|
|
35
31
|
@property --slotted-progress-indicator-travel-start {
|
|
36
32
|
syntax: '<number>';
|
|
@@ -97,14 +93,14 @@
|
|
|
97
93
|
* authored stylesheet has to know which of three things it is painting, and
|
|
98
94
|
* a prop would be a fourth way to pick a component already picked.
|
|
99
95
|
*/
|
|
100
|
-
[data-ui
|
|
96
|
+
[data-ui-progress-indicator][data-part-root] {
|
|
101
97
|
/**
|
|
102
98
|
* The ink, and it is the tone's `text` role rather than its `solid` one.
|
|
103
99
|
* Two reasons, and the second is the one that decides it. The indicator is
|
|
104
100
|
* a graphic bearing meaning, so WCAG 2.2 1.4.11 binds it at 3:1; the tone
|
|
105
101
|
* `text` roles are the steps the theme's contrast test holds to the 4.5:1
|
|
106
102
|
* reading ratio against every surface, which clears it with room over.
|
|
107
|
-
* And `--slotted-tone-secondary-solid` is the surface's own
|
|
103
|
+
* And `--slotted-tone-secondary-solid` is the surface's own color in
|
|
108
104
|
* `light` and the page's own white in `high-contrast` — a secondary bar
|
|
109
105
|
* painted from it would be an invisible bar in two schemes out of three,
|
|
110
106
|
* which is the deviation `button` recorded and could not fix inside its
|
|
@@ -133,8 +129,8 @@
|
|
|
133
129
|
);
|
|
134
130
|
/**
|
|
135
131
|
* The second quantity, halfway between the two: received but not yet
|
|
136
|
-
* processed. It has to be legible as *neither* — a buffer the
|
|
137
|
-
* the track says nothing has arrived, and a buffer the
|
|
132
|
+
* processed. It has to be legible as *neither* — a buffer the color of
|
|
133
|
+
* the track says nothing has arrived, and a buffer the color of the
|
|
138
134
|
* indicator says the work is done.
|
|
139
135
|
*/
|
|
140
136
|
--_buffer-color: var(--slotted-progress-indicator-buffer-color, transparent);
|
|
@@ -231,13 +227,13 @@
|
|
|
231
227
|
* user agent's `[hidden]`, and a family that painted through its own
|
|
232
228
|
* withdrawal would flash exactly what the delay exists to prevent.
|
|
233
229
|
*/
|
|
234
|
-
[data-ui
|
|
230
|
+
[data-ui-progress-indicator][hidden] {
|
|
235
231
|
display: none;
|
|
236
232
|
}
|
|
237
233
|
|
|
238
234
|
/* ── Tone ─────────────────────────────────────────────────────────────
|
|
239
235
|
*
|
|
240
|
-
* Five
|
|
236
|
+
* Five colors the theme owns, and the family adds none. Only the ink is
|
|
241
237
|
* stated: the track and the buffer are derived from it, so a sixth tone
|
|
242
238
|
* added by an application is one declaration rather than three.
|
|
243
239
|
*/
|
|
@@ -253,23 +249,27 @@
|
|
|
253
249
|
* It is the same substitution `badge` and `status-indicator` make for their
|
|
254
250
|
* own neutral marks, for the same reason.
|
|
255
251
|
*/
|
|
256
|
-
[data-ui
|
|
252
|
+
[data-ui-progress-indicator][data-part-root][data-tone='secondary'] {
|
|
257
253
|
--_ink: var(--slotted-progress-indicator-indicator-color, var(--slotted-border-strong));
|
|
258
254
|
}
|
|
259
255
|
|
|
260
|
-
[data-ui
|
|
256
|
+
[data-ui-progress-indicator][data-part-root][data-tone='success'] {
|
|
261
257
|
--_ink: var(--slotted-progress-indicator-indicator-color, var(--slotted-tone-success-text));
|
|
262
258
|
}
|
|
263
259
|
|
|
264
|
-
[data-ui
|
|
260
|
+
[data-ui-progress-indicator][data-part-root][data-tone='info'] {
|
|
261
|
+
--_ink: var(--slotted-progress-indicator-indicator-color, var(--slotted-tone-info-text));
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
[data-ui-progress-indicator][data-part-root][data-tone='warning'] {
|
|
265
265
|
--_ink: var(--slotted-progress-indicator-indicator-color, var(--slotted-tone-warning-text));
|
|
266
266
|
}
|
|
267
267
|
|
|
268
|
-
[data-ui
|
|
268
|
+
[data-ui-progress-indicator][data-part-root][data-tone='danger'] {
|
|
269
269
|
--_ink: var(--slotted-progress-indicator-indicator-color, var(--slotted-tone-danger-text));
|
|
270
270
|
}
|
|
271
271
|
|
|
272
|
-
[data-ui
|
|
272
|
+
[data-ui-progress-indicator][data-part-root][data-buffered] {
|
|
273
273
|
--_buffer-color: var(
|
|
274
274
|
--slotted-progress-indicator-buffer-color,
|
|
275
275
|
color-mix(in oklab, var(--_ink) 52%, var(--slotted-surface))
|
|
@@ -286,14 +286,14 @@
|
|
|
286
286
|
* component layer of the token contract stays as `avatar` left it.
|
|
287
287
|
*/
|
|
288
288
|
|
|
289
|
-
[data-ui
|
|
289
|
+
[data-ui-progress-indicator][data-part-root][data-size='sm'] {
|
|
290
290
|
--_font-size: var(--slotted-control-font-size-sm, 12px);
|
|
291
291
|
--_text-gap: var(--slotted-space-3, 0.375rem);
|
|
292
292
|
--_thickness: var(--slotted-progress-indicator-thickness, var(--slotted-space-2, 0.25rem));
|
|
293
293
|
--_size: var(--slotted-progress-indicator-size, var(--slotted-control-height-sm, 30px));
|
|
294
294
|
}
|
|
295
295
|
|
|
296
|
-
[data-ui
|
|
296
|
+
[data-ui-progress-indicator][data-part-root][data-size='lg'] {
|
|
297
297
|
--_font-size: var(--slotted-control-font-size-lg, 14px);
|
|
298
298
|
--_row-gap: var(--slotted-space-4, 0.5rem);
|
|
299
299
|
--_thickness: var(--slotted-progress-indicator-thickness, var(--slotted-space-4, 0.5rem));
|
|
@@ -313,7 +313,7 @@
|
|
|
313
313
|
* character, so a grid column sized to its content collapses to that
|
|
314
314
|
* character.
|
|
315
315
|
*/
|
|
316
|
-
[data-ui
|
|
316
|
+
[data-ui-progress-indicator] [data-part-label] {
|
|
317
317
|
color: var(--slotted-text, CanvasText);
|
|
318
318
|
min-inline-size: 0;
|
|
319
319
|
overflow-wrap: break-word;
|
|
@@ -322,11 +322,11 @@
|
|
|
322
322
|
/**
|
|
323
323
|
* Tabular figures, and the reason is the whole point of the part: the value
|
|
324
324
|
* changes while the reader is looking at it, and a proportional `1` is
|
|
325
|
-
* narrower than a `7`, so a counting bar jitters its own label. The
|
|
325
|
+
* narrower than a `7`, so a counting bar jitters its own label. The color
|
|
326
326
|
* is the muted step, because the number annotates the bar rather than
|
|
327
327
|
* naming it.
|
|
328
328
|
*/
|
|
329
|
-
[data-ui
|
|
329
|
+
[data-ui-progress-indicator] [data-part-value] {
|
|
330
330
|
color: var(--slotted-text-muted, GrayText);
|
|
331
331
|
font-variant-numeric: tabular-nums;
|
|
332
332
|
white-space: nowrap;
|
|
@@ -344,7 +344,7 @@
|
|
|
344
344
|
* inline end, which is the right edge of an English page and the left edge
|
|
345
345
|
* of an Arabic one, with no mirrored rule to write.
|
|
346
346
|
*/
|
|
347
|
-
[data-ui
|
|
347
|
+
[data-ui-progress-indicator][data-part-root][data-shape='linear'] {
|
|
348
348
|
align-items: baseline;
|
|
349
349
|
column-gap: var(--_text-gap);
|
|
350
350
|
display: grid;
|
|
@@ -352,16 +352,16 @@
|
|
|
352
352
|
row-gap: var(--_row-gap);
|
|
353
353
|
}
|
|
354
354
|
|
|
355
|
-
[data-ui
|
|
355
|
+
[data-ui-progress-indicator][data-shape='linear'] > [data-part-label] {
|
|
356
356
|
grid-column: 1;
|
|
357
357
|
}
|
|
358
358
|
|
|
359
|
-
[data-ui
|
|
359
|
+
[data-ui-progress-indicator][data-shape='linear'] > [data-part-value] {
|
|
360
360
|
grid-column: 2;
|
|
361
361
|
justify-self: end;
|
|
362
362
|
}
|
|
363
363
|
|
|
364
|
-
[data-ui
|
|
364
|
+
[data-ui-progress-indicator][data-shape='linear'] > [data-part-track] {
|
|
365
365
|
grid-column: 1 / -1;
|
|
366
366
|
}
|
|
367
367
|
|
|
@@ -379,7 +379,7 @@
|
|
|
379
379
|
* block axis has to let a crest out. A single `clip` is what sliced the
|
|
380
380
|
* crests flat in the first capture of this family.
|
|
381
381
|
*/
|
|
382
|
-
[data-ui
|
|
382
|
+
[data-ui-progress-indicator][data-shape='linear'] [data-part-track] {
|
|
383
383
|
background-color: var(--_buffer-color);
|
|
384
384
|
block-size: var(--_thickness);
|
|
385
385
|
border-radius: var(--_radius);
|
|
@@ -397,7 +397,7 @@
|
|
|
397
397
|
* notch — the shape M3 took in 2024 and the one no other surveyed
|
|
398
398
|
* implementation draws.
|
|
399
399
|
*/
|
|
400
|
-
[data-ui
|
|
400
|
+
[data-ui-progress-indicator][data-shape='linear'] [data-part-track]::before {
|
|
401
401
|
background-color: var(--_track-color);
|
|
402
402
|
border-radius: inherit;
|
|
403
403
|
content: '';
|
|
@@ -413,7 +413,7 @@
|
|
|
413
413
|
* and it is the detail that makes a bar at four per cent read as four per
|
|
414
414
|
* cent of something rather than as a stray mark.
|
|
415
415
|
*/
|
|
416
|
-
[data-ui
|
|
416
|
+
[data-ui-progress-indicator][data-shape='linear'] [data-part-track]::after {
|
|
417
417
|
background-color: var(--_ink);
|
|
418
418
|
border-radius: var(--slotted-radius-full, 9999px);
|
|
419
419
|
content: '';
|
|
@@ -423,7 +423,7 @@
|
|
|
423
423
|
position: absolute;
|
|
424
424
|
}
|
|
425
425
|
|
|
426
|
-
[data-ui
|
|
426
|
+
[data-ui-progress-indicator][data-shape='linear'] [data-part-indicator] {
|
|
427
427
|
background-color: var(--_ink);
|
|
428
428
|
block-size: 100%;
|
|
429
429
|
border-radius: inherit;
|
|
@@ -435,7 +435,7 @@
|
|
|
435
435
|
|
|
436
436
|
/**
|
|
437
437
|
* Complete, and there is nothing left to separate. The remaining track goes
|
|
438
|
-
* and the stop indicator goes with it: a dot in the indicator's
|
|
438
|
+
* and the stop indicator goes with it: a dot in the indicator's color on
|
|
439
439
|
* top of a full indicator is a dot nobody can see, and leaving the gap
|
|
440
440
|
* would put a notch a whole thickness wide at the end of a finished bar.
|
|
441
441
|
*
|
|
@@ -446,47 +446,95 @@
|
|
|
446
446
|
* way along it. Keyed on the number, it goes when the fill arrives.
|
|
447
447
|
*/
|
|
448
448
|
@container style(--slotted-progress-indicator-percent: 100) {
|
|
449
|
-
[data-ui
|
|
450
|
-
[data-ui
|
|
449
|
+
[data-ui-progress-indicator][data-shape='linear'] [data-part-track]::before,
|
|
450
|
+
[data-ui-progress-indicator][data-shape='linear'] [data-part-track]::after {
|
|
451
451
|
content: none;
|
|
452
452
|
}
|
|
453
453
|
}
|
|
454
454
|
|
|
455
455
|
/**
|
|
456
456
|
* Indeterminate: the whole track shows, there is no end to mark, and the
|
|
457
|
-
* indicator becomes a short bar travelling the length of it.
|
|
458
|
-
* positioned so the travel is one property — the decision the family this
|
|
459
|
-
* one replaces recorded, and `inset-inline-start` is why a translation runs
|
|
460
|
-
* the way the document reads instead of the way the screen does.
|
|
457
|
+
* indicator becomes a short bar travelling the length of it.
|
|
461
458
|
*/
|
|
462
|
-
[data-ui
|
|
463
|
-
[data-part='track']::before {
|
|
459
|
+
[data-ui-progress-indicator][data-shape='linear'][data-indeterminate] [data-part-track]::before {
|
|
464
460
|
inset-inline-start: 0;
|
|
465
461
|
}
|
|
466
462
|
|
|
467
|
-
[data-ui
|
|
468
|
-
[data-part='track']::after {
|
|
463
|
+
[data-ui-progress-indicator][data-shape='linear'][data-indeterminate] [data-part-track]::after {
|
|
469
464
|
content: none;
|
|
470
465
|
}
|
|
471
466
|
|
|
472
|
-
|
|
473
|
-
|
|
467
|
+
/**
|
|
468
|
+
* The bar is the whole track, scaled to its length from the inline start
|
|
469
|
+
* and translated along it. `translate` and `scale` are the only properties
|
|
470
|
+
* the animation moves, so the compositor runs it: the bar is the sign that
|
|
471
|
+
* the page is busy, and a bar moved by its inset and its width needed a
|
|
472
|
+
* layout on the main thread every frame and froze under any long task.
|
|
473
|
+
* Two properties with keyframes of their own keep the journey the
|
|
474
|
+
* registered numbers draw for the wavy bar: the travel eases once from end
|
|
475
|
+
* to end, the length swells and shrinks in two steps.
|
|
476
|
+
*/
|
|
477
|
+
[data-ui-progress-indicator][data-shape='linear'][data-indeterminate]:not([data-wave])
|
|
478
|
+
[data-part-indicator] {
|
|
479
|
+
animation: slotted-progress-indicator-glide var(--slotted-duration-loop-slow)
|
|
474
480
|
var(--slotted-easing-standard) infinite;
|
|
475
|
-
inline-size:
|
|
481
|
+
inline-size: 100%;
|
|
476
482
|
inset-block: 0;
|
|
477
|
-
inset-inline-start:
|
|
483
|
+
inset-inline-start: 0;
|
|
478
484
|
position: absolute;
|
|
485
|
+
scale: 0.14 1;
|
|
486
|
+
transform-origin: left;
|
|
487
|
+
translate: -14% 0;
|
|
488
|
+
}
|
|
489
|
+
|
|
490
|
+
/* Translation and origin are physical: a right-to-left track runs the
|
|
491
|
+
mirrored journey from its right edge. */
|
|
492
|
+
[data-ui-progress-indicator][data-shape='linear'][data-indeterminate]:not([data-wave])
|
|
493
|
+
[data-part-indicator]:dir(rtl) {
|
|
494
|
+
animation-name: slotted-progress-indicator-glide-rtl;
|
|
495
|
+
transform-origin: right;
|
|
496
|
+
translate: 14% 0;
|
|
497
|
+
}
|
|
498
|
+
|
|
499
|
+
@keyframes slotted-progress-indicator-glide {
|
|
500
|
+
0% {
|
|
501
|
+
scale: 0.14 1;
|
|
502
|
+
translate: -14% 0;
|
|
503
|
+
}
|
|
504
|
+
|
|
505
|
+
45% {
|
|
506
|
+
scale: 0.46 1;
|
|
507
|
+
}
|
|
508
|
+
|
|
509
|
+
100% {
|
|
510
|
+
scale: 0.14 1;
|
|
511
|
+
translate: 100% 0;
|
|
512
|
+
}
|
|
513
|
+
}
|
|
514
|
+
|
|
515
|
+
@keyframes slotted-progress-indicator-glide-rtl {
|
|
516
|
+
0% {
|
|
517
|
+
scale: 0.14 1;
|
|
518
|
+
translate: 14% 0;
|
|
519
|
+
}
|
|
520
|
+
|
|
521
|
+
45% {
|
|
522
|
+
scale: 0.46 1;
|
|
523
|
+
}
|
|
524
|
+
|
|
525
|
+
100% {
|
|
526
|
+
scale: 0.14 1;
|
|
527
|
+
translate: -100% 0;
|
|
528
|
+
}
|
|
479
529
|
}
|
|
480
530
|
|
|
481
531
|
/**
|
|
482
|
-
*
|
|
483
|
-
*
|
|
484
|
-
*
|
|
485
|
-
*
|
|
486
|
-
*
|
|
487
|
-
*
|
|
488
|
-
* The keyframes move the two registered numbers rather than the box, so the
|
|
489
|
-
* wavy bar can cut its window at the same two numbers.
|
|
532
|
+
* The journey as two registered numbers, for the wavy bar, which cuts a
|
|
533
|
+
* window out of its path at them: a short bar that grows as it crosses and
|
|
534
|
+
* shrinks as it leaves, M3's disjoint indicator drawn with one bar rather
|
|
535
|
+
* than two. The width changes because a bar of constant length reads as a
|
|
536
|
+
* scrollbar being dragged; a bar that swells in the middle of its journey
|
|
537
|
+
* reads as something in progress. `glide` draws the same journey.
|
|
490
538
|
*/
|
|
491
539
|
@keyframes slotted-progress-indicator-travel {
|
|
492
540
|
0% {
|
|
@@ -515,7 +563,7 @@
|
|
|
515
563
|
* The stacking layer is a token, so an application's own stacking contract
|
|
516
564
|
* still decides. Every router progress bar in the field types a number here.
|
|
517
565
|
*/
|
|
518
|
-
[data-ui
|
|
566
|
+
[data-ui-progress-indicator][data-part-root][data-placement='page'] {
|
|
519
567
|
--_radius: var(--slotted-progress-indicator-radius, var(--slotted-radius-none, 0px));
|
|
520
568
|
--_track-color: var(--slotted-progress-indicator-track-color, transparent);
|
|
521
569
|
--_gap: var(--slotted-progress-indicator-gap, 0);
|
|
@@ -526,7 +574,7 @@
|
|
|
526
574
|
z-index: var(--slotted-z-index-sticky, 100);
|
|
527
575
|
}
|
|
528
576
|
|
|
529
|
-
[data-ui
|
|
577
|
+
[data-ui-progress-indicator][data-placement='page'] [data-part-track]::after {
|
|
530
578
|
content: none;
|
|
531
579
|
}
|
|
532
580
|
|
|
@@ -548,7 +596,7 @@
|
|
|
548
596
|
* the edge. `app-shell` writes it for a content region that scrolls with
|
|
549
597
|
* the document. It is a composition value, not a design token.
|
|
550
598
|
*/
|
|
551
|
-
[data-ui
|
|
599
|
+
[data-ui-progress-indicator][data-part-root]:is(
|
|
552
600
|
[data-placement='edge-start'],
|
|
553
601
|
[data-placement='edge-end']
|
|
554
602
|
) {
|
|
@@ -560,16 +608,16 @@
|
|
|
560
608
|
position: var(--slotted-progress-indicator-position, absolute);
|
|
561
609
|
}
|
|
562
610
|
|
|
563
|
-
[data-ui
|
|
611
|
+
[data-ui-progress-indicator][data-part-root][data-placement='edge-start'] {
|
|
564
612
|
inset-block-start: 0;
|
|
565
613
|
}
|
|
566
614
|
|
|
567
|
-
[data-ui
|
|
615
|
+
[data-ui-progress-indicator][data-part-root][data-placement='edge-end'] {
|
|
568
616
|
inset-block-end: 0;
|
|
569
617
|
}
|
|
570
618
|
|
|
571
|
-
[data-ui
|
|
572
|
-
[data-part
|
|
619
|
+
[data-ui-progress-indicator]:is([data-placement='edge-start'], [data-placement='edge-end'])
|
|
620
|
+
[data-part-track]::after {
|
|
573
621
|
content: none;
|
|
574
622
|
}
|
|
575
623
|
|
|
@@ -596,7 +644,7 @@
|
|
|
596
644
|
* back into its edge rather than on the frame it is asked to. The theme
|
|
597
645
|
* collapses both steps under `prefers-reduced-motion`.
|
|
598
646
|
*/
|
|
599
|
-
[data-ui
|
|
647
|
+
[data-ui-progress-indicator][data-part-root]:is(
|
|
600
648
|
[data-placement='page'],
|
|
601
649
|
[data-placement='edge-start'],
|
|
602
650
|
[data-placement='edge-end']
|
|
@@ -616,11 +664,11 @@
|
|
|
616
664
|
}
|
|
617
665
|
}
|
|
618
666
|
|
|
619
|
-
[data-ui
|
|
667
|
+
[data-ui-progress-indicator][data-part-root][data-placement='edge-end'] {
|
|
620
668
|
--_withdrawn: inset(100% 0 0 0);
|
|
621
669
|
}
|
|
622
670
|
|
|
623
|
-
[data-ui
|
|
671
|
+
[data-ui-progress-indicator][data-part-root]:is(
|
|
624
672
|
[data-placement='page'],
|
|
625
673
|
[data-placement='edge-start'],
|
|
626
674
|
[data-placement='edge-end']
|
|
@@ -639,11 +687,11 @@
|
|
|
639
687
|
* ring rather than inside it, and that is a measurement rather than a
|
|
640
688
|
* preference: the largest ring this family draws is 38 pixels across with a
|
|
641
689
|
* 4.75-pixel stroke, which leaves 28 pixels of hole, and a percentage
|
|
642
|
-
*
|
|
690
|
+
* centerd in it would be four-pixel type. Ant Design and MUI both put it
|
|
643
691
|
* inside because both draw rings twice this size.
|
|
644
692
|
*/
|
|
645
|
-
[data-ui
|
|
646
|
-
[data-ui
|
|
693
|
+
[data-ui-progress-indicator][data-part-root][data-shape='circular'],
|
|
694
|
+
[data-ui-progress-indicator][data-part-root][data-shape='morph'] {
|
|
647
695
|
align-items: center;
|
|
648
696
|
column-gap: var(--_text-gap);
|
|
649
697
|
display: inline-flex;
|
|
@@ -657,7 +705,7 @@
|
|
|
657
705
|
* and this family's circle are the same object, and Button can stop drawing
|
|
658
706
|
* its own.
|
|
659
707
|
*/
|
|
660
|
-
[data-ui
|
|
708
|
+
[data-ui-progress-indicator][data-shape='circular'] svg {
|
|
661
709
|
--_stroke: var(--slotted-progress-indicator-stroke, 6);
|
|
662
710
|
|
|
663
711
|
block-size: var(--_size);
|
|
@@ -669,8 +717,8 @@
|
|
|
669
717
|
rotate: -90deg;
|
|
670
718
|
}
|
|
671
719
|
|
|
672
|
-
[data-ui
|
|
673
|
-
[data-ui
|
|
720
|
+
[data-ui-progress-indicator][data-shape='circular'] [data-part-track],
|
|
721
|
+
[data-ui-progress-indicator][data-shape='circular'] [data-part-indicator] {
|
|
674
722
|
fill: none;
|
|
675
723
|
stroke-linecap: round;
|
|
676
724
|
stroke-width: var(--_stroke);
|
|
@@ -680,7 +728,7 @@
|
|
|
680
728
|
it by a second smoothing. */
|
|
681
729
|
}
|
|
682
730
|
|
|
683
|
-
[data-ui
|
|
731
|
+
[data-ui-progress-indicator][data-shape='circular'] [data-part-indicator] {
|
|
684
732
|
stroke: var(--_ink);
|
|
685
733
|
stroke-dasharray: var(--_percent) 100;
|
|
686
734
|
/**
|
|
@@ -698,7 +746,7 @@
|
|
|
698
746
|
* path is four device pixels of a 44-pixel ring, which is the gap M3
|
|
699
747
|
* specifies for the bar.
|
|
700
748
|
*/
|
|
701
|
-
[data-ui
|
|
749
|
+
[data-ui-progress-indicator][data-shape='circular'] [data-part-track] {
|
|
702
750
|
/**
|
|
703
751
|
* Three and two tenths of the path is four device pixels of a 44-pixel
|
|
704
752
|
* ring, and it collapses to nothing at nought per cent by the same clamp
|
|
@@ -720,14 +768,14 @@
|
|
|
720
768
|
* travel, not the stated value.
|
|
721
769
|
*/
|
|
722
770
|
@container style(--slotted-progress-indicator-percent: 100) {
|
|
723
|
-
[data-ui
|
|
771
|
+
[data-ui-progress-indicator][data-shape='circular'] [data-part-track] {
|
|
724
772
|
stroke: transparent;
|
|
725
773
|
}
|
|
726
774
|
}
|
|
727
775
|
|
|
728
776
|
/**
|
|
729
777
|
* Indeterminate: no track at all, which is M3's own answer — its circular
|
|
730
|
-
* track
|
|
778
|
+
* track color is transparent — and the reason is sound. An arc with no
|
|
731
779
|
* value has no remainder to show, and a ring behind it would claim there is
|
|
732
780
|
* one.
|
|
733
781
|
*
|
|
@@ -735,16 +783,15 @@
|
|
|
735
783
|
* do not divide into each other, so the sweep never repeats the same shape
|
|
736
784
|
* in the same orientation.
|
|
737
785
|
*/
|
|
738
|
-
[data-ui
|
|
786
|
+
[data-ui-progress-indicator][data-shape='circular'][data-indeterminate] [data-part-track] {
|
|
739
787
|
stroke: transparent;
|
|
740
788
|
}
|
|
741
789
|
|
|
742
|
-
[data-ui
|
|
790
|
+
[data-ui-progress-indicator][data-shape='circular'][data-indeterminate] svg {
|
|
743
791
|
animation: slotted-progress-indicator-turn var(--slotted-duration-loop) linear infinite;
|
|
744
792
|
}
|
|
745
793
|
|
|
746
|
-
[data-ui
|
|
747
|
-
[data-part='indicator'] {
|
|
794
|
+
[data-ui-progress-indicator][data-shape='circular'][data-indeterminate] [data-part-indicator] {
|
|
748
795
|
animation: slotted-progress-indicator-sweep var(--slotted-duration-loop-slow)
|
|
749
796
|
var(--slotted-easing-standard) infinite;
|
|
750
797
|
stroke-opacity: 1;
|
|
@@ -818,7 +865,7 @@
|
|
|
818
865
|
* at fast and slow loads, and the geometry below carries the sign once per
|
|
819
866
|
* shape.
|
|
820
867
|
*/
|
|
821
|
-
[data-ui
|
|
868
|
+
[data-ui-progress-indicator][data-part-root][data-wave] {
|
|
822
869
|
--slotted-progress-indicator-wave-amplitude: min(
|
|
823
870
|
clamp(0, calc((var(--_percent) - 6) / 10), 1),
|
|
824
871
|
clamp(0, calc((96 - var(--_percent)) / 12), 1)
|
|
@@ -832,7 +879,7 @@
|
|
|
832
879
|
* throughout, which is what M3 draws: `hasWavyEffect(isDeterminate)` is the
|
|
833
880
|
* flag that separates the two.
|
|
834
881
|
*/
|
|
835
|
-
[data-ui
|
|
882
|
+
[data-ui-progress-indicator][data-part-root][data-wave][data-indeterminate] {
|
|
836
883
|
--slotted-progress-indicator-wave-amplitude: 1;
|
|
837
884
|
}
|
|
838
885
|
|
|
@@ -854,7 +901,7 @@
|
|
|
854
901
|
* stroke are ten thicknesses and three quarters of one, and the viewBox is
|
|
855
902
|
* sized so a unit *is* a thickness at every size and density — the box is
|
|
856
903
|
* twelve hundred thicknesses long and two and a half tall, which is the
|
|
857
|
-
* crest plus half the stroke either side of the
|
|
904
|
+
* crest plus half the stroke either side of the center line.
|
|
858
905
|
*
|
|
859
906
|
* The crest needs room the band does not have. `margin-block` reserves it on
|
|
860
907
|
* the track, and the track's block axis does not clip, so the wave is
|
|
@@ -862,12 +909,12 @@
|
|
|
862
909
|
* container the path measures itself against: `cqi` is how a dash stated in
|
|
863
910
|
* thicknesses learns how many thicknesses the track is.
|
|
864
911
|
*/
|
|
865
|
-
[data-ui
|
|
912
|
+
[data-ui-progress-indicator][data-shape='linear'][data-wave] [data-part-track] {
|
|
866
913
|
container-type: inline-size;
|
|
867
914
|
margin-block: calc(0.75 * var(--_thickness));
|
|
868
915
|
}
|
|
869
916
|
|
|
870
|
-
[data-ui
|
|
917
|
+
[data-ui-progress-indicator][data-shape='linear'][data-wave] [data-part-indicator] {
|
|
871
918
|
/** One wavelength, in thicknesses. */
|
|
872
919
|
--_wave-length: 10;
|
|
873
920
|
|
|
@@ -884,11 +931,11 @@
|
|
|
884
931
|
|
|
885
932
|
/**
|
|
886
933
|
* The crest travels with the text. The path is drawn from its own left, so
|
|
887
|
-
* a right-to-left document mirrors the box about its
|
|
888
|
-
* anchored to the inline start, and its
|
|
934
|
+
* a right-to-left document mirrors the box about its center — the box is
|
|
935
|
+
* anchored to the inline start, and its center is the one point that stays
|
|
889
936
|
* inside the track.
|
|
890
937
|
*/
|
|
891
|
-
[data-ui
|
|
938
|
+
[data-ui-progress-indicator][data-shape='linear'][data-wave] [data-part-indicator]:dir(rtl) {
|
|
892
939
|
transform: scaleX(-1);
|
|
893
940
|
}
|
|
894
941
|
|
|
@@ -897,7 +944,7 @@
|
|
|
897
944
|
*
|
|
898
945
|
* The path carries `pathLength` equal to its extent along the inline axis,
|
|
899
946
|
* so a dash of one unit is one thickness of travel whatever the amplitude —
|
|
900
|
-
* the arc length of a sine is longer than its span, and
|
|
947
|
+
* the arc length of a sine is longer than its span, and normalizing the
|
|
901
948
|
* length to the span is what lets the end sit at the value while `d` is
|
|
902
949
|
* mid-transition between flat and wavy.
|
|
903
950
|
*
|
|
@@ -915,7 +962,7 @@
|
|
|
915
962
|
* one thickness, and at nought it is not painted at all, by the same clamp
|
|
916
963
|
* the ring uses on its own cap.
|
|
917
964
|
*/
|
|
918
|
-
[data-ui
|
|
965
|
+
[data-ui-progress-indicator][data-shape='linear'][data-wave] [data-part-indicator] path {
|
|
919
966
|
/** The track's length, in thicknesses: a ratio of two lengths, read as a number. */
|
|
920
967
|
--_track-units: tan(atan2(100cqi, var(--_thickness)));
|
|
921
968
|
--_window-start: 0;
|
|
@@ -941,8 +988,8 @@
|
|
|
941
988
|
* says at every moment of the fill's own transition. An indeterminate bar
|
|
942
989
|
* carries a different path and is left to the markup.
|
|
943
990
|
*/
|
|
944
|
-
[data-ui
|
|
945
|
-
[data-part
|
|
991
|
+
[data-ui-progress-indicator][data-shape='linear'][data-wave]:not([data-indeterminate])
|
|
992
|
+
[data-part-indicator]
|
|
946
993
|
path {
|
|
947
994
|
animation: slotted-progress-indicator-flatten-bar var(--_scrub) var(--_taper) both paused;
|
|
948
995
|
animation-delay: calc(
|
|
@@ -955,16 +1002,16 @@
|
|
|
955
1002
|
* is unknown — `IndeterminateActiveWaveWavelength` — so the markup carries
|
|
956
1003
|
* the tighter path, and the window is the travelling bar's own two numbers.
|
|
957
1004
|
*/
|
|
958
|
-
[data-ui
|
|
959
|
-
[data-part
|
|
1005
|
+
[data-ui-progress-indicator][data-shape='linear'][data-wave][data-indeterminate]
|
|
1006
|
+
[data-part-indicator] {
|
|
960
1007
|
--_wave-length: 5;
|
|
961
1008
|
|
|
962
1009
|
animation: slotted-progress-indicator-travel var(--slotted-duration-loop-slow)
|
|
963
1010
|
var(--slotted-easing-standard) infinite;
|
|
964
1011
|
}
|
|
965
1012
|
|
|
966
|
-
[data-ui
|
|
967
|
-
[data-part
|
|
1013
|
+
[data-ui-progress-indicator][data-shape='linear'][data-wave][data-indeterminate]
|
|
1014
|
+
[data-part-indicator]
|
|
968
1015
|
path {
|
|
969
1016
|
--_window-start: var(--slotted-progress-indicator-travel-start);
|
|
970
1017
|
--_window-size: var(--slotted-progress-indicator-travel-size);
|
|
@@ -984,7 +1031,7 @@
|
|
|
984
1031
|
* wavy keeps its weight, and the crest may pass the viewBox by the tenth of
|
|
985
1032
|
* a unit the stroke needs.
|
|
986
1033
|
*/
|
|
987
|
-
[data-ui
|
|
1034
|
+
[data-ui-progress-indicator][data-shape='circular'][data-wave] svg {
|
|
988
1035
|
--_stroke: var(--slotted-progress-indicator-stroke, 5);
|
|
989
1036
|
|
|
990
1037
|
block-size: calc(1.2 * var(--_size));
|
|
@@ -1010,18 +1057,18 @@
|
|
|
1010
1057
|
* far end fell into the gap as the pattern shifted, and a full ring opened
|
|
1011
1058
|
* a hole at twelve o'clock.
|
|
1012
1059
|
*/
|
|
1013
|
-
[data-ui
|
|
1060
|
+
[data-ui-progress-indicator][data-shape='circular'][data-wave] [data-part-indicator] {
|
|
1014
1061
|
rotate: calc(-45deg * var(--slotted-progress-indicator-wave-phase));
|
|
1015
1062
|
stroke-dasharray: var(--_percent) calc(100 - var(--_percent));
|
|
1016
1063
|
stroke-dashoffset: calc(-12.5 * var(--slotted-progress-indicator-wave-phase));
|
|
1017
|
-
/* The rotation is about the viewBox's own
|
|
1064
|
+
/* The rotation is about the viewBox's own center, which is where the ring
|
|
1018
1065
|
is; a fill box would turn it about the path's bounding box instead. */
|
|
1019
1066
|
transform-box: view-box;
|
|
1020
1067
|
transform-origin: 50% 50%;
|
|
1021
1068
|
}
|
|
1022
1069
|
|
|
1023
|
-
[data-ui
|
|
1024
|
-
[data-part
|
|
1070
|
+
[data-ui-progress-indicator][data-shape='circular'][data-wave]:not([data-indeterminate])
|
|
1071
|
+
[data-part-indicator] {
|
|
1025
1072
|
animation: slotted-progress-indicator-flatten-ring var(--_scrub) var(--_taper) both paused;
|
|
1026
1073
|
animation-delay: calc(
|
|
1027
1074
|
-1 * var(--_scrub) * (1 - var(--slotted-progress-indicator-wave-amplitude))
|
|
@@ -1046,7 +1093,7 @@
|
|
|
1046
1093
|
* each pair must share a command list, and `progress.test.ts` holds both
|
|
1047
1094
|
* copies to `@slotted/core/progress`.
|
|
1048
1095
|
*/
|
|
1049
|
-
[data-ui
|
|
1096
|
+
[data-ui-progress-indicator][data-part-root][data-wave] {
|
|
1050
1097
|
--_scrub: var(--slotted-duration-long);
|
|
1051
1098
|
--_taper: cubic-bezier(0.45, 0, 0.55, 1);
|
|
1052
1099
|
}
|
|
@@ -1090,7 +1137,7 @@
|
|
|
1090
1137
|
* never shows the same shape in the same orientation twice — which is what
|
|
1091
1138
|
* makes a five-second wait bearable to watch and a spinning ring not.
|
|
1092
1139
|
*/
|
|
1093
|
-
[data-ui
|
|
1140
|
+
[data-ui-progress-indicator][data-shape='morph'] [data-part-track] {
|
|
1094
1141
|
block-size: var(--_size);
|
|
1095
1142
|
border-radius: var(--slotted-radius-full, 9999px);
|
|
1096
1143
|
display: grid;
|
|
@@ -1106,7 +1153,7 @@
|
|
|
1106
1153
|
* pair the bar's own track holds and clears the 3:1 the loading indicator
|
|
1107
1154
|
* documentation asks for between a contained shape and its container.
|
|
1108
1155
|
*/
|
|
1109
|
-
[data-ui
|
|
1156
|
+
[data-ui-progress-indicator][data-shape='morph'][data-contained] [data-part-track] {
|
|
1110
1157
|
background-color: var(--_track-color);
|
|
1111
1158
|
}
|
|
1112
1159
|
|
|
@@ -1123,7 +1170,7 @@
|
|
|
1123
1170
|
* fifty is the minority parcel and exists so it never freezes between forms.
|
|
1124
1171
|
*
|
|
1125
1172
|
* A single constant turn — this family's first answer — is the *old*
|
|
1126
|
-
* circular indicator's
|
|
1173
|
+
* circular indicator's behavior, and it is what the loading indicator was
|
|
1127
1174
|
* introduced to replace.
|
|
1128
1175
|
*
|
|
1129
1176
|
* CSS has no way to add two animations of one property without
|
|
@@ -1137,7 +1184,7 @@
|
|
|
1137
1184
|
* each target and settle. Both animations take it, at the same period and on
|
|
1138
1185
|
* the same keyframe boundaries, because in M3 they are one spring.
|
|
1139
1186
|
*/
|
|
1140
|
-
[data-ui
|
|
1187
|
+
[data-ui-progress-indicator][data-shape='morph'] [data-part-track] {
|
|
1141
1188
|
animation: slotted-progress-indicator-drift calc(2 * var(--slotted-duration-loop-slow)) linear
|
|
1142
1189
|
infinite;
|
|
1143
1190
|
}
|
|
@@ -1151,7 +1198,7 @@
|
|
|
1151
1198
|
* hurry, and a multiple of one inherits that where a fourth token would be a
|
|
1152
1199
|
* scale step added for a single family.
|
|
1153
1200
|
*/
|
|
1154
|
-
[data-ui
|
|
1201
|
+
[data-ui-progress-indicator][data-shape='morph'] [data-part-indicator] {
|
|
1155
1202
|
animation:
|
|
1156
1203
|
slotted-progress-indicator-morph calc(2 * var(--slotted-duration-loop-slow))
|
|
1157
1204
|
var(--slotted-easing-emphasized) infinite,
|
|
@@ -1166,10 +1213,10 @@
|
|
|
1166
1213
|
* M3's 38-in-48, rounded to an even number of pixels — and the rounding is
|
|
1167
1214
|
* the whole rule rather than a tidy-up.
|
|
1168
1215
|
*
|
|
1169
|
-
* A grid
|
|
1216
|
+
* A grid centers a box by splitting the remainder in half, so a shape whose
|
|
1170
1217
|
* size leaves an odd remainder inside its container sits half a pixel off
|
|
1171
|
-
*
|
|
1172
|
-
* ratio happens to land on 30 inside 38 and the shape is
|
|
1218
|
+
* center and the browser rasterises that half-pixel to one side. At `lg` the
|
|
1219
|
+
* ratio happens to land on 30 inside 38 and the shape is centerd; at `md` it
|
|
1173
1220
|
* lands on 26.86 inside 34, and the capture showed it low and to one side.
|
|
1174
1221
|
*
|
|
1175
1222
|
* Every control height this family reads is an even number at every density,
|
|
@@ -1177,7 +1224,7 @@
|
|
|
1177
1224
|
* pixels. `round()` is what states that, and it states it once for the three
|
|
1178
1225
|
* steps rather than as three numbers.
|
|
1179
1226
|
*/
|
|
1180
|
-
[data-ui
|
|
1227
|
+
[data-ui-progress-indicator][data-shape='morph'][data-contained] [data-part-indicator] {
|
|
1181
1228
|
--_shape: round(nearest, calc(0.79 * var(--_size)), 2px);
|
|
1182
1229
|
|
|
1183
1230
|
block-size: var(--_shape);
|
|
@@ -1469,10 +1516,10 @@
|
|
|
1469
1516
|
* `path` is left out: the wave's paths carry the paused ramp below, which
|
|
1470
1517
|
* is a value and survives.
|
|
1471
1518
|
*/
|
|
1472
|
-
[data-ui
|
|
1473
|
-
[data-ui
|
|
1474
|
-
[data-ui
|
|
1475
|
-
[data-ui
|
|
1519
|
+
[data-ui-progress-indicator][data-part-root],
|
|
1520
|
+
[data-ui-progress-indicator] [data-part-indicator]:not(path),
|
|
1521
|
+
[data-ui-progress-indicator] [data-part-track],
|
|
1522
|
+
[data-ui-progress-indicator] svg {
|
|
1476
1523
|
animation: none !important;
|
|
1477
1524
|
}
|
|
1478
1525
|
|
|
@@ -1482,19 +1529,28 @@
|
|
|
1482
1529
|
* than as a value: pinned to either end it would read as nought per cent
|
|
1483
1530
|
* or as a hundred, which is a number this indicator does not have.
|
|
1484
1531
|
*/
|
|
1485
|
-
[data-ui
|
|
1486
|
-
[data-part='indicator'] {
|
|
1532
|
+
[data-ui-progress-indicator][data-shape='linear'][data-indeterminate] [data-part-indicator] {
|
|
1487
1533
|
--slotted-progress-indicator-travel-size: 46;
|
|
1488
1534
|
--slotted-progress-indicator-travel-start: 27;
|
|
1489
1535
|
}
|
|
1490
1536
|
|
|
1537
|
+
[data-ui-progress-indicator][data-shape='linear'][data-indeterminate]:not([data-wave])
|
|
1538
|
+
[data-part-indicator] {
|
|
1539
|
+
scale: 0.46 1;
|
|
1540
|
+
translate: 27% 0;
|
|
1541
|
+
}
|
|
1542
|
+
|
|
1543
|
+
[data-ui-progress-indicator][data-shape='linear'][data-indeterminate]:not([data-wave])
|
|
1544
|
+
[data-part-indicator]:dir(rtl) {
|
|
1545
|
+
translate: -27% 0;
|
|
1546
|
+
}
|
|
1547
|
+
|
|
1491
1548
|
/**
|
|
1492
1549
|
* The same question for the arc, and the same answer: a third of the ring
|
|
1493
1550
|
* is unmistakably a fraction of something rather than a full circle or an
|
|
1494
1551
|
* empty one.
|
|
1495
1552
|
*/
|
|
1496
|
-
[data-ui
|
|
1497
|
-
[data-part='indicator'] {
|
|
1553
|
+
[data-ui-progress-indicator][data-shape='circular'][data-indeterminate] [data-part-indicator] {
|
|
1498
1554
|
stroke-dasharray: 34 100;
|
|
1499
1555
|
}
|
|
1500
1556
|
|
|
@@ -1503,51 +1559,51 @@
|
|
|
1503
1559
|
* range survives, because it is a value rather than motion: a ring at four
|
|
1504
1560
|
* per cent is a circle whether or not anything moves.
|
|
1505
1561
|
*/
|
|
1506
|
-
[data-ui
|
|
1562
|
+
[data-ui-progress-indicator][data-part-root][data-wave] {
|
|
1507
1563
|
animation: none;
|
|
1508
1564
|
}
|
|
1509
1565
|
}
|
|
1510
1566
|
|
|
1511
|
-
/* ── Forced
|
|
1567
|
+
/* ── Forced colors ───────────────────────────────────────────────────
|
|
1512
1568
|
*
|
|
1513
|
-
* The operating system replaces every author
|
|
1569
|
+
* The operating system replaces every author color, so the tone is gone
|
|
1514
1570
|
* whatever the family writes and the five tones become one indicator. What
|
|
1515
1571
|
* is left to decide is whether the geometry survives, and three things do
|
|
1516
|
-
* not survive on their own: a `color-mix` of two forced
|
|
1517
|
-
* mix and paints an author
|
|
1572
|
+
* not survive on their own: a `color-mix` of two forced colors is still a
|
|
1573
|
+
* mix and paints an author color the system did not choose; a masked
|
|
1518
1574
|
* indicator is masked by artwork the system does not replace; and a
|
|
1519
1575
|
* `clip-path` shape has no edge of its own to be seen by.
|
|
1520
1576
|
*
|
|
1521
1577
|
* The remaining track therefore moves from the pseudo-element to the track
|
|
1522
1578
|
* itself, which is a real element the system palette reaches — a decorative
|
|
1523
|
-
* rule may not name a system
|
|
1579
|
+
* rule may not name a system color at all, and
|
|
1524
1580
|
* `packages/styles/src/fallbacks.test.mjs` is what holds that. The gap goes
|
|
1525
1581
|
* with it, and a gap is a refinement rather than a meaning.
|
|
1526
1582
|
*/
|
|
1527
1583
|
@media (forced-colors: active) {
|
|
1528
|
-
[data-ui
|
|
1584
|
+
[data-ui-progress-indicator][data-shape='linear'] [data-part-track] {
|
|
1529
1585
|
background-color: Canvas;
|
|
1530
1586
|
outline: var(--slotted-border-width-thin, 1px) solid ButtonBorder;
|
|
1531
1587
|
outline-offset: calc(-1 * var(--slotted-border-width-thin, 1px));
|
|
1532
1588
|
}
|
|
1533
1589
|
|
|
1534
|
-
[data-ui
|
|
1535
|
-
[data-ui
|
|
1590
|
+
[data-ui-progress-indicator][data-shape='linear'] [data-part-track]::before,
|
|
1591
|
+
[data-ui-progress-indicator][data-shape='linear'] [data-part-track]::after {
|
|
1536
1592
|
content: none;
|
|
1537
1593
|
}
|
|
1538
1594
|
|
|
1539
1595
|
/**
|
|
1540
1596
|
* An edge bar keeps no track of its own. The box it stands on already
|
|
1541
|
-
* draws its edge in a system
|
|
1597
|
+
* draws its edge in a system color, and an outline here would be a
|
|
1542
1598
|
* second line beside the first.
|
|
1543
1599
|
*/
|
|
1544
|
-
[data-ui
|
|
1545
|
-
[data-part
|
|
1600
|
+
[data-ui-progress-indicator]:is([data-placement='edge-start'], [data-placement='edge-end'])
|
|
1601
|
+
[data-part-track] {
|
|
1546
1602
|
background-color: transparent;
|
|
1547
1603
|
outline: none;
|
|
1548
1604
|
}
|
|
1549
1605
|
|
|
1550
|
-
[data-ui
|
|
1606
|
+
[data-ui-progress-indicator] [data-part-indicator] {
|
|
1551
1607
|
background-color: Highlight;
|
|
1552
1608
|
}
|
|
1553
1609
|
|
|
@@ -1556,20 +1612,20 @@
|
|
|
1556
1612
|
* way the ring does: the box behind it stays clear and the path takes
|
|
1557
1613
|
* the highlight.
|
|
1558
1614
|
*/
|
|
1559
|
-
[data-ui
|
|
1615
|
+
[data-ui-progress-indicator][data-shape='linear'][data-wave] [data-part-indicator] {
|
|
1560
1616
|
background-color: transparent;
|
|
1561
1617
|
}
|
|
1562
1618
|
|
|
1563
|
-
[data-ui
|
|
1619
|
+
[data-ui-progress-indicator][data-shape='linear'][data-wave] [data-part-indicator] path {
|
|
1564
1620
|
stroke: Highlight;
|
|
1565
1621
|
}
|
|
1566
1622
|
|
|
1567
|
-
[data-ui
|
|
1623
|
+
[data-ui-progress-indicator][data-shape='circular'] [data-part-indicator] {
|
|
1568
1624
|
background-color: transparent;
|
|
1569
1625
|
stroke: Highlight;
|
|
1570
1626
|
}
|
|
1571
1627
|
|
|
1572
|
-
[data-ui
|
|
1628
|
+
[data-ui-progress-indicator][data-shape='circular'] [data-part-track] {
|
|
1573
1629
|
stroke: ButtonBorder;
|
|
1574
1630
|
}
|
|
1575
1631
|
|
|
@@ -1578,7 +1634,7 @@
|
|
|
1578
1634
|
* loader exists — and loses the container behind it, which in a forced
|
|
1579
1635
|
* palette would be a `Canvas` disc on a `Canvas` page.
|
|
1580
1636
|
*/
|
|
1581
|
-
[data-ui
|
|
1637
|
+
[data-ui-progress-indicator][data-shape='morph'][data-contained] [data-part-track] {
|
|
1582
1638
|
background-color: Canvas;
|
|
1583
1639
|
}
|
|
1584
1640
|
}
|