@slotted/styles 0.1.0-beta.33 → 0.1.0-beta.35
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 +5 -1
- package/src/accordion/accordion.css +20 -2
- package/src/accordion/accordion.tokens.json +2 -0
- package/src/avatar/avatar.css +1 -1
- package/src/avatar/avatar.tokens.json +1 -0
- package/src/badge/badge.css +1 -1
- package/src/badge/badge.tokens.json +1 -0
- package/src/button/button.css +168 -4
- package/src/button/button.tokens.json +5 -0
- package/src/calendar/calendar.css +131 -0
- package/src/calendar/calendar.tokens.json +10 -0
- package/src/card/card.css +63 -3
- package/src/cascader/cascader.css +13 -0
- package/src/chart/chart.css +3 -3
- package/src/chart/chart.tokens.json +1 -0
- package/src/checkbox/checkbox.css +47 -0
- package/src/checkbox/checkbox.tokens.json +4 -0
- package/src/collapsible/collapsible.css +174 -5
- package/src/collapsible/collapsible.tokens.json +4 -0
- package/src/combobox/combobox.css +13 -0
- package/src/command-palette/command-palette.css +10 -1
- package/src/command-palette/command-palette.tokens.json +1 -0
- package/src/dashboard-grid/dashboard-grid.css +12 -7
- package/src/dashboard-grid/dashboard-grid.tokens.json +1 -0
- package/src/data-grid/data-grid.css +44 -5
- package/src/data-list/data-list.css +17 -11
- package/src/description-list/description-list.css +15 -1
- package/src/drawer/drawer.css +91 -0
- package/src/entity-picker/entity-picker.css +23 -1
- package/src/entity-picker/entity-picker.tokens.json +1 -0
- package/src/filter-bar/filter-bar.css +24 -0
- package/src/floating-panel/floating-panel.css +123 -0
- package/src/floating-panel/floating-panel.tokens.json +30 -0
- package/src/form/form.css +19 -16
- package/src/inline-message/inline-message.css +1 -1
- package/src/inline-message/inline-message.tokens.json +1 -0
- package/src/kbd/kbd.css +1 -1
- package/src/kbd/kbd.tokens.json +1 -0
- package/src/list/list.css +10 -1
- package/src/list/list.tokens.json +1 -0
- package/src/list-item/list-item.css +108 -7
- package/src/list-item/list-item.tokens.json +3 -0
- package/src/listbox/listbox.css +50 -2
- package/src/listbox/listbox.tokens.json +6 -0
- package/src/message/message.css +20 -0
- package/src/message/message.tokens.json +1 -0
- package/src/meter/meter.css +136 -0
- package/src/meter/meter.tokens.json +23 -0
- package/src/multi-select/multi-select.css +13 -0
- package/src/page/page.css +58 -4
- package/src/page/page.tokens.json +7 -0
- package/src/progress-indicator/progress-indicator.css +70 -0
- package/src/progress-indicator/progress-indicator.tokens.json +3 -0
- package/src/prompt-composer/prompt-composer.css +18 -7
- package/src/radio-group/radio-group.css +50 -0
- package/src/radio-group/radio-group.tokens.json +2 -0
- package/src/rating/rating.css +1 -1
- package/src/rating/rating.tokens.json +1 -0
- package/src/runtime-properties.mjs +19 -0
- package/src/section/section.css +61 -4
- package/src/section/section.tokens.json +6 -0
- package/src/segmented-control/segmented-control.css +11 -0
- package/src/select/select.css +13 -0
- package/src/side-navigation/side-navigation.css +3 -3
- package/src/side-navigation/side-navigation.tokens.json +1 -0
- package/src/slider/slider.css +7 -1
- package/src/slider/slider.tokens.json +1 -0
- package/src/sparkline/sparkline.css +207 -0
- package/src/sparkline/sparkline.tokens.json +10 -0
- package/src/stat-card/stat-card.css +5 -0
- package/src/status-indicator/status-indicator.css +3 -2
- package/src/switch/switch.css +49 -25
- package/src/switch/switch.tokens.json +4 -0
- package/src/table/table.css +166 -12
- package/src/table/table.tokens.json +5 -0
- package/src/tag/tag.css +4 -1
- package/src/tag/tag.tokens.json +1 -0
- package/src/toolbar/toolbar.css +16 -2
- package/src/toolbar/toolbar.tokens.json +2 -1
- package/src/top-navigation/top-navigation.css +1 -1
- package/src/top-navigation/top-navigation.tokens.json +1 -0
- package/src/typography/typography.css +25 -0
- package/src/typography/typography.tokens.json +1 -0
|
@@ -557,6 +557,29 @@
|
|
|
557
557
|
white-space: nowrap;
|
|
558
558
|
}
|
|
559
559
|
|
|
560
|
+
/*
|
|
561
|
+
* One line per text is one height per row only if the body keeps a width:
|
|
562
|
+
* the end and the actions never shrink, and at 358px a long tag and a
|
|
563
|
+
* button left the title under twenty pixels, one letter per line. The body
|
|
564
|
+
* keeps `--slotted-list-item-body-min-inline-size` (10rem, never more than
|
|
565
|
+
* the row), and the end gives up the rest and cuts its own content.
|
|
566
|
+
*/
|
|
567
|
+
[data-ui-list-item][data-truncate] > [data-part-content] {
|
|
568
|
+
grid-template-columns:
|
|
569
|
+
auto
|
|
570
|
+
minmax(min(100%, var(--slotted-list-item-body-min-inline-size, 10rem)), 1fr)
|
|
571
|
+
minmax(0, auto);
|
|
572
|
+
}
|
|
573
|
+
|
|
574
|
+
[data-ui-list-item][data-truncate] > [data-part-content] > [data-part-end] {
|
|
575
|
+
min-inline-size: 0;
|
|
576
|
+
overflow: hidden;
|
|
577
|
+
}
|
|
578
|
+
|
|
579
|
+
[data-ui-list-item][data-truncate]:has(> [data-part-actions]) > [data-part-content] {
|
|
580
|
+
flex: 1 1 0;
|
|
581
|
+
}
|
|
582
|
+
|
|
560
583
|
/**
|
|
561
584
|
* The metadata that belongs to what the row says — a timestamp, a count, a
|
|
562
585
|
* badge. It is inside `content`, so it is part of the row's own name for a
|
|
@@ -603,6 +626,31 @@
|
|
|
603
626
|
padding-inline-end: 0;
|
|
604
627
|
}
|
|
605
628
|
|
|
629
|
+
/**
|
|
630
|
+
* The leading control outside the box (LI2 for a row whose box is a link or
|
|
631
|
+
* a button). It stands where the box's own leading column would: the row's
|
|
632
|
+
* inline inset before it, the chooser's square, on the title's first line,
|
|
633
|
+
* and the control gap before the box, which gives up its own start inset.
|
|
634
|
+
*/
|
|
635
|
+
[data-ui-list-item] > [data-part-select] {
|
|
636
|
+
align-items: start;
|
|
637
|
+
display: flex;
|
|
638
|
+
flex: none;
|
|
639
|
+
inline-size: var(--_control-size);
|
|
640
|
+
min-block-size: calc(var(--_font-size) * var(--slotted-line-height-md, 1.5));
|
|
641
|
+
padding-block-start: var(--_pad-block);
|
|
642
|
+
padding-inline-start: var(--_pad-inline);
|
|
643
|
+
position: relative;
|
|
644
|
+
}
|
|
645
|
+
|
|
646
|
+
[data-ui-list-item][data-inset] > [data-part-select] {
|
|
647
|
+
padding-inline-start: 0;
|
|
648
|
+
}
|
|
649
|
+
|
|
650
|
+
[data-ui-list-item] > [data-part-select] + [data-part-content] {
|
|
651
|
+
padding-inline-start: var(--_gap);
|
|
652
|
+
}
|
|
653
|
+
|
|
606
654
|
/**
|
|
607
655
|
* The independent targets follow `align` for the same reason the leading
|
|
608
656
|
* visual and the metadata do. Left centerd on the block while `end` sat on
|
|
@@ -674,11 +722,18 @@
|
|
|
674
722
|
* Only a row that acts answers the pointer. A row that is only read has
|
|
675
723
|
* nothing to say about being pointed at, and washing it would promise an
|
|
676
724
|
* interaction that never arrives.
|
|
725
|
+
*
|
|
726
|
+
* The wash waits for a pointer that hovers: a touch screen leaves the last
|
|
727
|
+
* tapped element in `:hover` until something else is touched, and the row
|
|
728
|
+
* kept the wash after the tap and read as selected. Press stays the feedback
|
|
729
|
+
* of a finger.
|
|
677
730
|
*/
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
731
|
+
@media (hover: hover) {
|
|
732
|
+
[data-ui-list-item]:not([data-disabled]):not([data-loading]):has(
|
|
733
|
+
> :is(a, button)[data-part-content]:not(:disabled):hover
|
|
734
|
+
) {
|
|
735
|
+
--_fill: var(--_hover);
|
|
736
|
+
}
|
|
682
737
|
}
|
|
683
738
|
|
|
684
739
|
[data-ui-list-item]:not([data-disabled]):not([data-loading]):has(
|
|
@@ -856,14 +911,17 @@
|
|
|
856
911
|
* is invalid CSS — `docs/token-foundation.md` rule 4.
|
|
857
912
|
*/
|
|
858
913
|
@container slotted-list-item (max-inline-size: 22rem) {
|
|
859
|
-
|
|
914
|
+
/* `endPlacement="beside"` keeps the end on the title's line: a figure
|
|
915
|
+
that belongs beside its name (an amount, a balance) stays in the column
|
|
916
|
+
of figures of the rows above and below. */
|
|
917
|
+
[data-ui-list-item]:not([data-end-placement='beside']) > [data-part-content] {
|
|
860
918
|
grid-template-areas:
|
|
861
919
|
'start body'
|
|
862
920
|
'start end';
|
|
863
921
|
grid-template-columns: auto minmax(0, 1fr);
|
|
864
922
|
}
|
|
865
923
|
|
|
866
|
-
[data-ui-list-item] > [data-part-content] > [data-part-end] {
|
|
924
|
+
[data-ui-list-item]:not([data-end-placement='beside']) > [data-part-content] > [data-part-end] {
|
|
867
925
|
justify-content: start;
|
|
868
926
|
margin-block-start: var(--slotted-list-item-body-gap, var(--slotted-space-1, 0.125rem));
|
|
869
927
|
margin-inline-start: 0;
|
|
@@ -871,7 +929,9 @@
|
|
|
871
929
|
|
|
872
930
|
/* The leading visual now spans two rows, so it stops being centerd on the
|
|
873
931
|
block and returns to the title's line. */
|
|
874
|
-
[data-ui-list-item]
|
|
932
|
+
[data-ui-list-item]:not([data-end-placement='beside'])
|
|
933
|
+
> [data-part-content]
|
|
934
|
+
> [data-part-start] {
|
|
875
935
|
align-self: start;
|
|
876
936
|
min-block-size: calc(var(--_font-size) * var(--slotted-line-height-md, 1.5));
|
|
877
937
|
}
|
|
@@ -916,6 +976,42 @@
|
|
|
916
976
|
}
|
|
917
977
|
}
|
|
918
978
|
|
|
979
|
+
/**
|
|
980
|
+
* ── The inset fill ─────────────────────────────────────────────────────
|
|
981
|
+
*
|
|
982
|
+
* `fill="inset"` on the list: the row's grounds, its rule and its state edge
|
|
983
|
+
* are drawn on a tile inside a gutter of `--slotted-list-fill-inset`, with
|
|
984
|
+
* the row's radius, so a pressed row on a phone reads as a tile rather than
|
|
985
|
+
* a stripe across the screen. The row itself paints nothing and its content
|
|
986
|
+
* stays where it was; the tile sits under it in the row's own stacking
|
|
987
|
+
* context.
|
|
988
|
+
*/
|
|
989
|
+
[data-ui-list-item][data-fill='inset'] {
|
|
990
|
+
--_fill-inset: var(--slotted-list-fill-inset, var(--slotted-space-3, 0.375rem));
|
|
991
|
+
|
|
992
|
+
background-color: transparent;
|
|
993
|
+
box-shadow: none;
|
|
994
|
+
isolation: isolate;
|
|
995
|
+
position: relative;
|
|
996
|
+
}
|
|
997
|
+
|
|
998
|
+
[data-ui-list-item][data-fill='inset']::after {
|
|
999
|
+
background-color: var(--_fill);
|
|
1000
|
+
border-radius: var(--_radius);
|
|
1001
|
+
box-shadow: var(--_rule-shadow), var(--_edge-shadow);
|
|
1002
|
+
content: '';
|
|
1003
|
+
inset-block: 0;
|
|
1004
|
+
inset-inline: var(--_fill-inset);
|
|
1005
|
+
pointer-events: none;
|
|
1006
|
+
position: absolute;
|
|
1007
|
+
transition:
|
|
1008
|
+
background-color var(--slotted-control-transition-duration, var(--slotted-duration-short))
|
|
1009
|
+
var(--slotted-control-transition-easing, var(--slotted-easing-standard)),
|
|
1010
|
+
box-shadow var(--slotted-control-transition-duration, var(--slotted-duration-short))
|
|
1011
|
+
var(--slotted-control-transition-easing, var(--slotted-easing-standard));
|
|
1012
|
+
z-index: -1;
|
|
1013
|
+
}
|
|
1014
|
+
|
|
919
1015
|
/**
|
|
920
1016
|
* ── Forced colors ─────────────────────────────────────────────────────
|
|
921
1017
|
*
|
|
@@ -934,6 +1030,11 @@
|
|
|
934
1030
|
background-color: Highlight;
|
|
935
1031
|
}
|
|
936
1032
|
|
|
1033
|
+
/* The tile would be forced to Canvas over that ground. */
|
|
1034
|
+
[data-ui-list-item][data-fill='inset']::after {
|
|
1035
|
+
display: none;
|
|
1036
|
+
}
|
|
1037
|
+
|
|
937
1038
|
[data-ui-list-item][data-selected] > [data-part-content] {
|
|
938
1039
|
color: HighlightText;
|
|
939
1040
|
}
|
|
@@ -30,12 +30,14 @@
|
|
|
30
30
|
"--slotted-font-weight-regular",
|
|
31
31
|
"--slotted-line-height-md",
|
|
32
32
|
"--slotted-line-height-sm",
|
|
33
|
+
"--slotted-list-fill-inset",
|
|
33
34
|
"--slotted-list-item-background",
|
|
34
35
|
"--slotted-list-item-background-active",
|
|
35
36
|
"--slotted-list-item-background-current",
|
|
36
37
|
"--slotted-list-item-background-hover",
|
|
37
38
|
"--slotted-list-item-background-selected",
|
|
38
39
|
"--slotted-list-item-body-gap",
|
|
40
|
+
"--slotted-list-item-body-min-inline-size",
|
|
39
41
|
"--slotted-list-item-border-color",
|
|
40
42
|
"--slotted-list-item-border-width",
|
|
41
43
|
"--slotted-list-item-color",
|
|
@@ -73,6 +75,7 @@
|
|
|
73
75
|
"--slotted-selection-size-sm",
|
|
74
76
|
"--slotted-space-1",
|
|
75
77
|
"--slotted-space-2",
|
|
78
|
+
"--slotted-space-3",
|
|
76
79
|
"--slotted-surface-raised",
|
|
77
80
|
"--slotted-surface-sunken",
|
|
78
81
|
"--slotted-text",
|
package/src/listbox/listbox.css
CHANGED
|
@@ -339,6 +339,10 @@
|
|
|
339
339
|
[data-ui-listbox] [data-part-option] {
|
|
340
340
|
align-content: center;
|
|
341
341
|
background: transparent;
|
|
342
|
+
/* No edge by default. A list whose options are cards gives them one, and
|
|
343
|
+
the chosen option changes its colour with the selection's own token. */
|
|
344
|
+
border: var(--slotted-listbox-option-border-width, 0) solid
|
|
345
|
+
var(--slotted-listbox-option-border-color, transparent);
|
|
342
346
|
border-radius: var(--_option-radius);
|
|
343
347
|
box-sizing: border-box;
|
|
344
348
|
color: inherit;
|
|
@@ -354,8 +358,8 @@
|
|
|
354
358
|
*/
|
|
355
359
|
line-height: var(--slotted-line-height-md, 1.5);
|
|
356
360
|
min-block-size: var(--_option-height);
|
|
357
|
-
padding-block: var(--slotted-space-2, 0.25rem);
|
|
358
|
-
padding-inline: var(--_option-inset);
|
|
361
|
+
padding-block: var(--slotted-listbox-option-padding-block, var(--slotted-space-2, 0.25rem));
|
|
362
|
+
padding-inline: var(--slotted-listbox-option-padding-inline, var(--_option-inset));
|
|
359
363
|
position: relative;
|
|
360
364
|
/* The one gap inside an option, between a label and the line under it. */
|
|
361
365
|
row-gap: var(--slotted-space-1, 0.125rem);
|
|
@@ -367,6 +371,46 @@
|
|
|
367
371
|
var(--slotted-control-transition-easing, var(--slotted-easing-standard));
|
|
368
372
|
}
|
|
369
373
|
|
|
374
|
+
/* Options touch by default; a list of separate cards sets the distance. */
|
|
375
|
+
[data-ui-listbox] [data-part-option] + [data-part-option] {
|
|
376
|
+
margin-block-start: var(--slotted-listbox-option-gap, 0);
|
|
377
|
+
}
|
|
378
|
+
|
|
379
|
+
/* Along a row the distance is inline, and in a grid it is the tracks' gap,
|
|
380
|
+
so options of one row stay on one line. */
|
|
381
|
+
[data-ui-listbox][data-orientation='horizontal'] [data-part-option] + [data-part-option] {
|
|
382
|
+
margin-block-start: 0;
|
|
383
|
+
margin-inline-start: var(--slotted-listbox-option-gap, 0);
|
|
384
|
+
}
|
|
385
|
+
|
|
386
|
+
[data-ui-listbox][data-layout='grid'] [data-part-option] + [data-part-option] {
|
|
387
|
+
margin-block-start: 0;
|
|
388
|
+
}
|
|
389
|
+
|
|
390
|
+
[data-ui-listbox][data-layout='grid'],
|
|
391
|
+
[data-ui-listbox][data-layout='grid'] :is([data-part-group], [data-part-canvas]) {
|
|
392
|
+
row-gap: var(--slotted-listbox-option-gap, 0);
|
|
393
|
+
}
|
|
394
|
+
|
|
395
|
+
/**
|
|
396
|
+
* A group with a column count of its own lays its options out in it,
|
|
397
|
+
* whatever the listbox's count is, so one listbox holds a column of rows
|
|
398
|
+
* beside a grid of cards and keeps one tab stop and one set of arrows.
|
|
399
|
+
*/
|
|
400
|
+
[data-ui-listbox] [data-part-group][data-columns] {
|
|
401
|
+
--_columns: var(--slotted-listbox-columns, 1);
|
|
402
|
+
|
|
403
|
+
column-gap: var(--_column-gap);
|
|
404
|
+
grid-template-columns: repeat(var(--_columns), minmax(0, 1fr));
|
|
405
|
+
row-gap: var(--slotted-listbox-option-gap, 0);
|
|
406
|
+
}
|
|
407
|
+
|
|
408
|
+
[data-ui-listbox] [data-part-group][data-columns] > [data-part-option] {
|
|
409
|
+
grid-column: auto;
|
|
410
|
+
grid-template-columns: auto minmax(0, 1fr) auto;
|
|
411
|
+
margin-block-start: 0;
|
|
412
|
+
}
|
|
413
|
+
|
|
370
414
|
/**
|
|
371
415
|
* Hover is a pointer's own feedback and nothing more. Unlike `menu`, it does
|
|
372
416
|
* not move the active option: a listbox holds a selection as well as a
|
|
@@ -430,6 +474,10 @@
|
|
|
430
474
|
*/
|
|
431
475
|
[data-ui-listbox] [data-part-option][data-selected] {
|
|
432
476
|
background-color: var(--_selected-surface);
|
|
477
|
+
border-color: var(
|
|
478
|
+
--slotted-listbox-selected-border-color,
|
|
479
|
+
var(--slotted-listbox-option-border-color, transparent)
|
|
480
|
+
);
|
|
433
481
|
color: var(--_selected-text);
|
|
434
482
|
}
|
|
435
483
|
|
|
@@ -42,11 +42,17 @@
|
|
|
42
42
|
"--slotted-listbox-highlight",
|
|
43
43
|
"--slotted-listbox-highlight-active",
|
|
44
44
|
"--slotted-listbox-measure",
|
|
45
|
+
"--slotted-listbox-option-border-color",
|
|
46
|
+
"--slotted-listbox-option-border-width",
|
|
47
|
+
"--slotted-listbox-option-gap",
|
|
48
|
+
"--slotted-listbox-option-padding-block",
|
|
49
|
+
"--slotted-listbox-option-padding-inline",
|
|
45
50
|
"--slotted-listbox-option-radius",
|
|
46
51
|
"--slotted-listbox-padding-block",
|
|
47
52
|
"--slotted-listbox-padding-inline",
|
|
48
53
|
"--slotted-listbox-radius",
|
|
49
54
|
"--slotted-listbox-rows",
|
|
55
|
+
"--slotted-listbox-selected-border-color",
|
|
50
56
|
"--slotted-listbox-selected-surface",
|
|
51
57
|
"--slotted-listbox-selected-text",
|
|
52
58
|
"--slotted-listbox-shadow",
|
package/src/message/message.css
CHANGED
|
@@ -1309,6 +1309,26 @@
|
|
|
1309
1309
|
color: var(--slotted-tone-success-text);
|
|
1310
1310
|
}
|
|
1311
1311
|
|
|
1312
|
+
/**
|
|
1313
|
+
* The source of a step, in a tile: the icon of what the step consulted,
|
|
1314
|
+
* and the tick in its place once the step is complete. The tile is edged
|
|
1315
|
+
* in the accent while the step is current, which is the state the ring
|
|
1316
|
+
* says where no icon is given.
|
|
1317
|
+
*/
|
|
1318
|
+
[data-part-activity-step] > [data-part-activity-step-icon] {
|
|
1319
|
+
inline-size: var(--slotted-message-activity-icon-size, 1.375rem);
|
|
1320
|
+
block-size: var(--slotted-message-activity-icon-size, 1.375rem);
|
|
1321
|
+
box-sizing: border-box;
|
|
1322
|
+
border: var(--slotted-border-width-thin, 1px) solid var(--slotted-border-subtle);
|
|
1323
|
+
border-radius: var(--slotted-radius-sm, 4px);
|
|
1324
|
+
background-color: var(--slotted-surface);
|
|
1325
|
+
transition: border-color var(--slotted-duration-medium) var(--slotted-easing-standard, ease);
|
|
1326
|
+
}
|
|
1327
|
+
|
|
1328
|
+
[data-part-activity-step][data-current] > [data-part-activity-step-icon] {
|
|
1329
|
+
border-color: var(--slotted-tone-accent-border);
|
|
1330
|
+
}
|
|
1331
|
+
|
|
1312
1332
|
[data-part-activity-step][data-current] {
|
|
1313
1333
|
color: var(--slotted-text);
|
|
1314
1334
|
}
|
|
@@ -29,6 +29,7 @@
|
|
|
29
29
|
"--slotted-font-weight-semibold",
|
|
30
30
|
"--slotted-line-height-md",
|
|
31
31
|
"--slotted-line-height-xs",
|
|
32
|
+
"--slotted-message-activity-icon-size",
|
|
32
33
|
"--slotted-message-avatar-size",
|
|
33
34
|
"--slotted-message-bubble-padding-block",
|
|
34
35
|
"--slotted-message-bubble-padding-inline",
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
@layer slotted.components {
|
|
2
|
+
/**
|
|
3
|
+
* A static value within a known range, drawn as a length.
|
|
4
|
+
*
|
|
5
|
+
* ┌─ root ─ role="meter" ─ the whole inline size it is given ───────┐
|
|
6
|
+
* │ ┌─ track ─ one continuous ground ─────────────────────────────┐ │
|
|
7
|
+
* │ │ ┌─ indicator ─ the share, from the inline start ─┐ │ │
|
|
8
|
+
* │ │ └────────────────────────────────────────────────┘ │ │
|
|
9
|
+
* │ └─────────────────────────────────────────────────────────────┘ │
|
|
10
|
+
* └──────────────────────────────────────────────────────────────────┘
|
|
11
|
+
*
|
|
12
|
+
* ── Why it is not a progress bar ────────────────────────────────────
|
|
13
|
+
*
|
|
14
|
+
* A progress bar is a wait: its track keeps a gap before the indicator and
|
|
15
|
+
* an end mark at its far end, which read as how far there is still to go.
|
|
16
|
+
* A share of a whole goes nowhere, so the track is one continuous ground
|
|
17
|
+
* and carries neither. The ink and the ground are `progress-indicator`'s
|
|
18
|
+
* own formula, and its tokens are the fallback, so a theme that retuned the
|
|
19
|
+
* progress bar retunes the meter beside it.
|
|
20
|
+
*
|
|
21
|
+
* ── Why it fills the cell ───────────────────────────────────────────
|
|
22
|
+
*
|
|
23
|
+
* A meter is read beside its exact value, most often in a table column. A
|
|
24
|
+
* box with no inline size of its own shrinks to nothing in an auto-layout
|
|
25
|
+
* cell, so the root takes the whole inline size it is given and keeps a
|
|
26
|
+
* least size that a column of shares still reads at.
|
|
27
|
+
*/
|
|
28
|
+
[data-ui-meter][data-part-root] {
|
|
29
|
+
--_ink: var(
|
|
30
|
+
--slotted-meter-indicator-color,
|
|
31
|
+
var(--slotted-progress-indicator-indicator-color, var(--slotted-tone-accent-text))
|
|
32
|
+
);
|
|
33
|
+
--_track-color: var(
|
|
34
|
+
--slotted-meter-track-color,
|
|
35
|
+
var(
|
|
36
|
+
--slotted-progress-indicator-track-color,
|
|
37
|
+
color-mix(in oklab, var(--_ink) 24%, var(--slotted-surface))
|
|
38
|
+
)
|
|
39
|
+
);
|
|
40
|
+
--_thickness: var(--slotted-meter-thickness, var(--slotted-space-3, 0.375rem));
|
|
41
|
+
--_radius: var(--slotted-meter-radius, var(--slotted-radius-full, 9999px));
|
|
42
|
+
--_ratio: var(--slotted-meter-ratio, 0);
|
|
43
|
+
|
|
44
|
+
box-sizing: border-box;
|
|
45
|
+
display: block;
|
|
46
|
+
inline-size: 100%;
|
|
47
|
+
min-inline-size: var(--slotted-meter-min-inline-size, 4rem);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
[data-ui-meter][data-part-root][data-size='sm'] {
|
|
51
|
+
--_thickness: var(--slotted-meter-thickness, var(--slotted-space-2, 0.25rem));
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
[data-ui-meter][data-part-root][data-size='lg'] {
|
|
55
|
+
--_thickness: var(--slotted-meter-thickness, var(--slotted-space-4, 0.5rem));
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* A tone is the ink of the indicator. `secondary` and `neutral` take the
|
|
60
|
+
* strong border step, because the secondary tone's text color is the page's
|
|
61
|
+
* own ink in two schemes and a bar painted from it reads as text.
|
|
62
|
+
*/
|
|
63
|
+
[data-ui-meter][data-part-root][data-tone='secondary'],
|
|
64
|
+
[data-ui-meter][data-part-root][data-tone='neutral'] {
|
|
65
|
+
--_ink: var(--slotted-meter-indicator-color, var(--slotted-border-strong));
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
[data-ui-meter][data-part-root][data-tone='info'] {
|
|
69
|
+
--_ink: var(--slotted-meter-indicator-color, var(--slotted-tone-info-text));
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
[data-ui-meter][data-part-root][data-tone='success'] {
|
|
73
|
+
--_ink: var(--slotted-meter-indicator-color, var(--slotted-tone-success-text));
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
[data-ui-meter][data-part-root][data-tone='warning'] {
|
|
77
|
+
--_ink: var(--slotted-meter-indicator-color, var(--slotted-tone-warning-text));
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
[data-ui-meter][data-part-root][data-tone='danger'] {
|
|
81
|
+
--_ink: var(--slotted-meter-indicator-color, var(--slotted-tone-danger-text));
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
[data-ui-meter] [data-part-track] {
|
|
85
|
+
background-color: var(--_track-color);
|
|
86
|
+
block-size: var(--_thickness);
|
|
87
|
+
border-radius: var(--_radius);
|
|
88
|
+
display: block;
|
|
89
|
+
overflow: hidden;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* The indicator is the whole track clipped from its inline end, so a value
|
|
94
|
+
* that changes moves without a layout and the rounded end stays round at
|
|
95
|
+
* every share: a scaled box squashes its own radius.
|
|
96
|
+
*/
|
|
97
|
+
[data-ui-meter] [data-part-indicator] {
|
|
98
|
+
--_clip: calc((1 - var(--_ratio)) * 100%);
|
|
99
|
+
|
|
100
|
+
background-color: var(--_ink);
|
|
101
|
+
block-size: 100%;
|
|
102
|
+
clip-path: inset(0 var(--_clip) 0 0 round var(--_radius));
|
|
103
|
+
display: block;
|
|
104
|
+
inline-size: 100%;
|
|
105
|
+
transition: clip-path var(--slotted-duration-medium) var(--slotted-easing-standard);
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
[data-ui-meter] [data-part-indicator]:dir(rtl) {
|
|
109
|
+
clip-path: inset(0 0 0 var(--_clip) round var(--_radius));
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
@media (prefers-reduced-motion: reduce) {
|
|
113
|
+
[data-ui-meter] [data-part-indicator] {
|
|
114
|
+
transition: none;
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
/**
|
|
119
|
+
* ── Forced colors ───────────────────────────────────────────────────
|
|
120
|
+
*
|
|
121
|
+
* The palette flattens the ink and the ground into the same system color,
|
|
122
|
+
* so the track keeps an outline and the indicator takes the highlight.
|
|
123
|
+
*/
|
|
124
|
+
@media (forced-colors: active) {
|
|
125
|
+
[data-ui-meter] [data-part-track] {
|
|
126
|
+
background-color: Canvas;
|
|
127
|
+
outline: var(--slotted-border-width-thin, 1px) solid CanvasText;
|
|
128
|
+
outline-offset: calc(-1 * var(--slotted-border-width-thin, 1px));
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
[data-ui-meter] [data-part-indicator] {
|
|
132
|
+
background-color: Highlight;
|
|
133
|
+
forced-color-adjust: none;
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
[
|
|
2
|
+
"--slotted-border-strong",
|
|
3
|
+
"--slotted-border-width-thin",
|
|
4
|
+
"--slotted-duration-medium",
|
|
5
|
+
"--slotted-easing-standard",
|
|
6
|
+
"--slotted-meter-indicator-color",
|
|
7
|
+
"--slotted-meter-min-inline-size",
|
|
8
|
+
"--slotted-meter-radius",
|
|
9
|
+
"--slotted-meter-thickness",
|
|
10
|
+
"--slotted-meter-track-color",
|
|
11
|
+
"--slotted-progress-indicator-indicator-color",
|
|
12
|
+
"--slotted-progress-indicator-track-color",
|
|
13
|
+
"--slotted-radius-full",
|
|
14
|
+
"--slotted-space-2",
|
|
15
|
+
"--slotted-space-3",
|
|
16
|
+
"--slotted-space-4",
|
|
17
|
+
"--slotted-surface",
|
|
18
|
+
"--slotted-tone-accent-text",
|
|
19
|
+
"--slotted-tone-danger-text",
|
|
20
|
+
"--slotted-tone-info-text",
|
|
21
|
+
"--slotted-tone-success-text",
|
|
22
|
+
"--slotted-tone-warning-text"
|
|
23
|
+
]
|
|
@@ -1431,6 +1431,19 @@
|
|
|
1431
1431
|
display: none;
|
|
1432
1432
|
}
|
|
1433
1433
|
|
|
1434
|
+
/* Beside the empty message the status says the same thing to the eye. It
|
|
1435
|
+
stays the live region that announces the count, clipped to one pixel. */
|
|
1436
|
+
[data-ui-multi-select] [data-part-empty] ~ [data-part-status] {
|
|
1437
|
+
block-size: 1px;
|
|
1438
|
+
clip-path: inset(50%);
|
|
1439
|
+
inline-size: 1px;
|
|
1440
|
+
min-inline-size: 0;
|
|
1441
|
+
overflow: hidden;
|
|
1442
|
+
padding: 0;
|
|
1443
|
+
position: absolute;
|
|
1444
|
+
white-space: nowrap;
|
|
1445
|
+
}
|
|
1446
|
+
|
|
1434
1447
|
/**
|
|
1435
1448
|
* The wait, as the shape of the list that is coming: rows the height of an
|
|
1436
1449
|
* option rather than one sentence, so the surface a reader is looking at
|
package/src/page/page.css
CHANGED
|
@@ -22,6 +22,14 @@
|
|
|
22
22
|
--slotted-page-footer-padding-block,
|
|
23
23
|
var(--slotted-space-4, 0.5rem)
|
|
24
24
|
);
|
|
25
|
+
/**
|
|
26
|
+
* The distance between two blocks of the body (cards, a row of figures, a
|
|
27
|
+
* bar of controls), and the larger one above a titled section that paints
|
|
28
|
+
* no surface. One decision on the theme, so screens with the same kind of
|
|
29
|
+
* content stand the same distance apart.
|
|
30
|
+
*/
|
|
31
|
+
--_block-gap: var(--slotted-page-block-gap, var(--slotted-space-6, 1rem));
|
|
32
|
+
--_section-gap: var(--slotted-page-section-gap, var(--slotted-space-8, 1.5rem));
|
|
25
33
|
--_duration: var(--slotted-duration-medium);
|
|
26
34
|
--_easing: var(--slotted-easing-standard, cubic-bezier(0.2, 0, 0, 1));
|
|
27
35
|
/**
|
|
@@ -29,6 +37,8 @@
|
|
|
29
37
|
* header paints it, so the rows passing under the header are covered.
|
|
30
38
|
*/
|
|
31
39
|
--slotted-page-ground: var(--_ground);
|
|
40
|
+
/* Published as a section's is, for the families that pin content over rows. */
|
|
41
|
+
--slotted-ground: var(--_ground);
|
|
32
42
|
/**
|
|
33
43
|
* The bridge to table. A table with `stickyTo="page"` stops its header
|
|
34
44
|
* under the page's fixed chrome and its summary above the footer, and the
|
|
@@ -114,6 +124,43 @@
|
|
|
114
124
|
}
|
|
115
125
|
}
|
|
116
126
|
|
|
127
|
+
/**
|
|
128
|
+
* The blocks of the body are the direct children of its container, one per
|
|
129
|
+
* row of its grid at the block gap; a section without a surface that
|
|
130
|
+
* follows another block stands at the section gap. `flow="none"` leaves a
|
|
131
|
+
* body that is not a list of blocks (a workspace, a split) to its own
|
|
132
|
+
* layout.
|
|
133
|
+
*/
|
|
134
|
+
[data-ui-page]
|
|
135
|
+
> [data-part-scroll]
|
|
136
|
+
> [data-part-body]:not([data-flow='none'])
|
|
137
|
+
> [data-ui-container] {
|
|
138
|
+
row-gap: var(--_block-gap);
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
[data-ui-page]
|
|
142
|
+
> [data-part-scroll]
|
|
143
|
+
> [data-part-body]:not([data-flow='none'])
|
|
144
|
+
> [data-ui-container]
|
|
145
|
+
> [data-ui-section]:not([data-ground='surface']):not(:first-child) {
|
|
146
|
+
margin-block-start: calc(var(--_section-gap) - var(--_block-gap));
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
/**
|
|
150
|
+
* A level-1 detail panel is the page of one record, and its header and body
|
|
151
|
+
* hold containers of their own: inside the body's column the two insets
|
|
152
|
+
* added up, and the header's rule stopped one inset short of each edge. It
|
|
153
|
+
* takes the column's full track, as a breakout does, and its own containers
|
|
154
|
+
* carry the one inset.
|
|
155
|
+
*/
|
|
156
|
+
[data-ui-page]
|
|
157
|
+
> [data-part-scroll]
|
|
158
|
+
> [data-part-body]
|
|
159
|
+
> [data-ui-container]
|
|
160
|
+
> [data-ui-detail-panel][data-level='1'] {
|
|
161
|
+
grid-column: full;
|
|
162
|
+
}
|
|
163
|
+
|
|
117
164
|
[data-ui-page][data-loading] > [data-part-scroll] > [data-part-body] {
|
|
118
165
|
cursor: progress;
|
|
119
166
|
}
|
|
@@ -174,9 +221,10 @@
|
|
|
174
221
|
|
|
175
222
|
/**
|
|
176
223
|
* Below 600 pixels, the compact size class: the gutters of every container
|
|
177
|
-
* in the page stop at step 4 of the space
|
|
178
|
-
*
|
|
179
|
-
*
|
|
224
|
+
* in the page stop at `--slotted-page-inset-compact`, step 4 of the space
|
|
225
|
+
* scale unless a theme sets it. At the default inset, step 6, the two
|
|
226
|
+
* gutters took 32 of a 390-pixel phone's pixels; at step 4 they take 16. The
|
|
227
|
+
* steps under 4 keep their own value. The gaps of the body step down too.
|
|
180
228
|
*/
|
|
181
229
|
@container slotted-page (width < 600px) {
|
|
182
230
|
[data-ui-page] [data-ui-container][data-inset='5'],
|
|
@@ -187,7 +235,13 @@
|
|
|
187
235
|
[data-ui-page] [data-ui-container][data-inset='10'],
|
|
188
236
|
[data-ui-page] [data-ui-container][data-inset='11'],
|
|
189
237
|
[data-ui-page] [data-ui-container][data-inset='12'] {
|
|
190
|
-
--_inset: var(--slotted-space-4, 0.5rem);
|
|
238
|
+
--_inset: var(--slotted-page-inset-compact, var(--slotted-space-4, 0.5rem));
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
/* On the body: a container query reaches the page's descendants only. */
|
|
242
|
+
[data-ui-page] > [data-part-scroll] > [data-part-body] {
|
|
243
|
+
--_block-gap: var(--slotted-page-block-gap-compact, var(--slotted-space-5, 0.75rem));
|
|
244
|
+
--_section-gap: var(--slotted-page-section-gap-compact, var(--slotted-space-6, 1rem));
|
|
191
245
|
}
|
|
192
246
|
}
|
|
193
247
|
}
|
|
@@ -7,12 +7,19 @@
|
|
|
7
7
|
"--slotted-font-family-sans",
|
|
8
8
|
"--slotted-page-background-sunken",
|
|
9
9
|
"--slotted-page-background-surface",
|
|
10
|
+
"--slotted-page-block-gap",
|
|
11
|
+
"--slotted-page-block-gap-compact",
|
|
10
12
|
"--slotted-page-footer-backdrop-filter",
|
|
11
13
|
"--slotted-page-footer-background",
|
|
12
14
|
"--slotted-page-footer-border",
|
|
13
15
|
"--slotted-page-footer-padding-block",
|
|
16
|
+
"--slotted-page-inset-compact",
|
|
14
17
|
"--slotted-page-padding-block",
|
|
18
|
+
"--slotted-page-section-gap",
|
|
19
|
+
"--slotted-page-section-gap-compact",
|
|
15
20
|
"--slotted-space-4",
|
|
21
|
+
"--slotted-space-5",
|
|
22
|
+
"--slotted-space-6",
|
|
16
23
|
"--slotted-space-8",
|
|
17
24
|
"--slotted-surface",
|
|
18
25
|
"--slotted-surface-sunken",
|