@slotted/styles 0.1.0-beta.34 → 0.1.0-beta.36
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 +247 -4
- package/src/button/button.tokens.json +8 -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 +60 -1
- package/src/command-palette/command-palette.tokens.json +2 -0
- package/src/dashboard-grid/dashboard-grid.css +29 -9
- package/src/dashboard-grid/dashboard-grid.tokens.json +3 -1
- 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/entity-picker/entity-picker.css +70 -1
- package/src/entity-picker/entity-picker.tokens.json +2 -0
- package/src/field-group/field-group.css +17 -7
- 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/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 +32 -1
- package/src/list/list.tokens.json +2 -0
- package/src/list-item/list-item.css +102 -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/prompt-composer/prompt-composer.css +18 -7
- 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/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/tooltip/tooltip.css +30 -0
- 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
|
@@ -537,6 +537,23 @@
|
|
|
537
537
|
margin-inline-start: auto;
|
|
538
538
|
}
|
|
539
539
|
|
|
540
|
+
/**
|
|
541
|
+
* An end-aligned header ends its name where its values end, so the slot
|
|
542
|
+
* leaves the flow and stands over the start side of the name, where the name
|
|
543
|
+
* is short of the column's width. Reserved at the trailing edge it left the
|
|
544
|
+
* name the slot's width short of the numbers under it.
|
|
545
|
+
*/
|
|
546
|
+
[data-ui-data-grid]
|
|
547
|
+
[data-part-column-header]:is([data-align='end'], [data-numeric]:not([data-align]))
|
|
548
|
+
> [data-part-column-actions] {
|
|
549
|
+
inset-block-start: 50%;
|
|
550
|
+
inset-inline-start: var(--_pad-inline);
|
|
551
|
+
margin-block: 0;
|
|
552
|
+
margin-inline-start: 0;
|
|
553
|
+
position: absolute;
|
|
554
|
+
translate: 0 -50%;
|
|
555
|
+
}
|
|
556
|
+
|
|
540
557
|
[data-ui-data-grid] [data-part-column-actions] *:has([data-part-filter]) {
|
|
541
558
|
display: contents;
|
|
542
559
|
}
|
|
@@ -1715,27 +1732,31 @@
|
|
|
1715
1732
|
|
|
1716
1733
|
/**
|
|
1717
1734
|
* ── Alignment, numerals and the text treatment ─────────────────────────
|
|
1735
|
+
*
|
|
1736
|
+
* Every rule is keyed on `data-column`, which only the grid's own cells
|
|
1737
|
+
* carry: `data-align` is a generic name, and a layout primitive rendered
|
|
1738
|
+
* inside a cell writes it with another meaning.
|
|
1718
1739
|
*/
|
|
1719
|
-
[data-ui-data-grid] [data-align='start'] {
|
|
1740
|
+
[data-ui-data-grid] [data-column][data-align='start'] {
|
|
1720
1741
|
justify-content: start;
|
|
1721
1742
|
text-align: start;
|
|
1722
1743
|
}
|
|
1723
1744
|
|
|
1724
|
-
[data-ui-data-grid] [data-align='center'] {
|
|
1745
|
+
[data-ui-data-grid] [data-column][data-align='center'] {
|
|
1725
1746
|
justify-content: center;
|
|
1726
1747
|
text-align: center;
|
|
1727
1748
|
}
|
|
1728
1749
|
|
|
1729
|
-
[data-ui-data-grid] [data-align='end'] {
|
|
1750
|
+
[data-ui-data-grid] [data-column][data-align='end'] {
|
|
1730
1751
|
justify-content: end;
|
|
1731
1752
|
text-align: end;
|
|
1732
1753
|
}
|
|
1733
1754
|
|
|
1734
|
-
[data-ui-data-grid] [data-numeric] {
|
|
1755
|
+
[data-ui-data-grid] [data-column][data-numeric] {
|
|
1735
1756
|
font-variant-numeric: tabular-nums;
|
|
1736
1757
|
}
|
|
1737
1758
|
|
|
1738
|
-
[data-ui-data-grid] [data-numeric]:not([data-align]) {
|
|
1759
|
+
[data-ui-data-grid] [data-column][data-numeric]:not([data-align]) {
|
|
1739
1760
|
justify-content: end;
|
|
1740
1761
|
text-align: end;
|
|
1741
1762
|
}
|
|
@@ -2413,6 +2434,24 @@
|
|
|
2413
2434
|
padding-inline: var(--_pad-inline);
|
|
2414
2435
|
}
|
|
2415
2436
|
|
|
2437
|
+
/* A placeholder stands where the value will: at the end of a numeric or
|
|
2438
|
+
end-aligned column, so the box does not move when the data arrives. */
|
|
2439
|
+
[data-ui-data-grid]
|
|
2440
|
+
> [data-part-scroll]
|
|
2441
|
+
> [data-part-loader]
|
|
2442
|
+
> [data-part-row]
|
|
2443
|
+
> :is([data-align='end'], [data-numeric]:not([data-align])) {
|
|
2444
|
+
justify-content: end;
|
|
2445
|
+
}
|
|
2446
|
+
|
|
2447
|
+
[data-ui-data-grid]
|
|
2448
|
+
> [data-part-scroll]
|
|
2449
|
+
> [data-part-loader]
|
|
2450
|
+
> [data-part-row]
|
|
2451
|
+
> [data-align='center'] {
|
|
2452
|
+
justify-content: center;
|
|
2453
|
+
}
|
|
2454
|
+
|
|
2416
2455
|
[data-ui-data-grid][aria-busy='true'] > [data-part-scroll] > [data-part-body] {
|
|
2417
2456
|
opacity: 0.55;
|
|
2418
2457
|
transition: opacity var(--_transition);
|
|
@@ -197,12 +197,16 @@
|
|
|
197
197
|
outline-offset: calc(var(--slotted-focus-ring-offset, 2px) * -1);
|
|
198
198
|
}
|
|
199
199
|
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
200
|
+
/* Behind (hover: hover), as `list-item` gates its wash: a tap leaves the
|
|
201
|
+
title in `:hover` on a touch screen. */
|
|
202
|
+
@media (hover: hover) {
|
|
203
|
+
[data-ui-data-list]
|
|
204
|
+
[data-ui-list-item]:not([data-disabled]):not([data-loading])
|
|
205
|
+
:is(a[href], button:not(:disabled))[data-part-title]:hover {
|
|
206
|
+
text-decoration: underline;
|
|
207
|
+
text-decoration-thickness: from-font;
|
|
208
|
+
text-underline-offset: 0.2em;
|
|
209
|
+
}
|
|
206
210
|
}
|
|
207
211
|
|
|
208
212
|
/**
|
|
@@ -212,11 +216,13 @@
|
|
|
212
216
|
* through the row's own `--_fill`, which already knows the tone and the
|
|
213
217
|
* selection it is painted over. Both hold back for `disabled` and `loading`.
|
|
214
218
|
*/
|
|
215
|
-
|
|
216
|
-
[data-ui-
|
|
217
|
-
[data-
|
|
218
|
-
|
|
219
|
-
|
|
219
|
+
@media (hover: hover) {
|
|
220
|
+
[data-ui-data-list]
|
|
221
|
+
[data-ui-list-item]:not([data-disabled]):not([data-loading]):has(
|
|
222
|
+
[data-part-title]:is(a[href], button:not(:disabled)):hover
|
|
223
|
+
) {
|
|
224
|
+
--_fill: var(--_hover, ButtonFace);
|
|
225
|
+
}
|
|
220
226
|
}
|
|
221
227
|
|
|
222
228
|
[data-ui-data-list]
|
|
@@ -180,6 +180,7 @@
|
|
|
180
180
|
* width.
|
|
181
181
|
*/
|
|
182
182
|
[data-ui-description-list][data-layout='stack'] [data-part-list] {
|
|
183
|
+
--_value-align: start;
|
|
183
184
|
--_pair: minmax(0, 1fr);
|
|
184
185
|
--_term-floor: 0px;
|
|
185
186
|
--_span-1: 1;
|
|
@@ -301,6 +302,16 @@
|
|
|
301
302
|
vertical-align: text-bottom;
|
|
302
303
|
}
|
|
303
304
|
|
|
305
|
+
/**
|
|
306
|
+
* Values a reader compares down the list end on one vertical line at the
|
|
307
|
+
* inline end of their rows. Set on the root, so a stacked list and a row
|
|
308
|
+
* list folded to a stack reset it on the list and keep their values at the
|
|
309
|
+
* start, under the term.
|
|
310
|
+
*/
|
|
311
|
+
[data-ui-description-list][data-value-align='end'] {
|
|
312
|
+
--_value-align: end;
|
|
313
|
+
}
|
|
314
|
+
|
|
304
315
|
[data-ui-description-list] [data-part-description] {
|
|
305
316
|
align-items: baseline;
|
|
306
317
|
/**
|
|
@@ -315,7 +326,8 @@
|
|
|
315
326
|
grid-column: var(--_desc-col);
|
|
316
327
|
grid-row: var(--_desc-row);
|
|
317
328
|
grid-template-columns: minmax(0, max-content) auto;
|
|
318
|
-
justify-content: start;
|
|
329
|
+
justify-content: var(--_value-align, start);
|
|
330
|
+
text-align: var(--_value-align, start);
|
|
319
331
|
/* `dd` carries a user-agent inline margin of forty pixels. */
|
|
320
332
|
margin: 0;
|
|
321
333
|
min-inline-size: 0;
|
|
@@ -655,6 +667,7 @@
|
|
|
655
667
|
* cannot share one rule.
|
|
656
668
|
*/
|
|
657
669
|
[data-ui-description-list][data-layout='row'] [data-part-list]:has([data-part-hint]) {
|
|
670
|
+
--_value-align: start;
|
|
658
671
|
--_pair: minmax(0, 1fr);
|
|
659
672
|
--_term-floor: 0px;
|
|
660
673
|
--_span-1: 1;
|
|
@@ -681,6 +694,7 @@
|
|
|
681
694
|
|
|
682
695
|
@container slotted-description-list (max-width: 1em) {
|
|
683
696
|
[data-ui-description-list][data-layout='row'] [data-part-list] {
|
|
697
|
+
--_value-align: start;
|
|
684
698
|
--_pair: minmax(0, 1fr);
|
|
685
699
|
--_term-floor: 0px;
|
|
686
700
|
--_span-1: 1;
|
|
@@ -995,7 +995,7 @@
|
|
|
995
995
|
* the items and below the parts the surface draws over them.
|
|
996
996
|
*/
|
|
997
997
|
[data-ui-entity-picker][data-part-positioner] [data-part-group-label] {
|
|
998
|
-
background:
|
|
998
|
+
background: transparent;
|
|
999
999
|
box-sizing: border-box;
|
|
1000
1000
|
color: var(--_muted);
|
|
1001
1001
|
font-size: var(--_secondary-font-size);
|
|
@@ -1010,6 +1010,62 @@
|
|
|
1010
1010
|
z-index: 1;
|
|
1011
1011
|
}
|
|
1012
1012
|
|
|
1013
|
+
/**
|
|
1014
|
+
* At rest the label stands on the panel's own surface and paints none, so a
|
|
1015
|
+
* translucent panel does not draw a second layer under every label. Only
|
|
1016
|
+
* while it is stuck, with rows passing under it, does it fill. Under a
|
|
1017
|
+
* material panel that fill is translucent, so the label blurs the rows with
|
|
1018
|
+
* the panel's filter, or with one the theme states for it.
|
|
1019
|
+
*
|
|
1020
|
+
* A blur leaves part of a sharp row in view. Where the engine times an
|
|
1021
|
+
* animation by the scroll, the rows end at the label instead: each one is cut
|
|
1022
|
+
* by the share of it that has passed the label's bottom edge, which is the
|
|
1023
|
+
* list's scroll padding. Nothing is under the label then, so it paints no
|
|
1024
|
+
* fill and no filter but the ones a theme states.
|
|
1025
|
+
*/
|
|
1026
|
+
[data-ui-entity-picker][data-part-positioner] [data-part-group-label][data-stuck] {
|
|
1027
|
+
background: var(--slotted-entity-picker-group-label-stuck-surface, var(--_surface));
|
|
1028
|
+
-webkit-backdrop-filter: var(
|
|
1029
|
+
--slotted-entity-picker-group-label-stuck-backdrop-filter,
|
|
1030
|
+
var(--slotted-entity-picker-content-backdrop-filter, none)
|
|
1031
|
+
);
|
|
1032
|
+
backdrop-filter: var(
|
|
1033
|
+
--slotted-entity-picker-group-label-stuck-backdrop-filter,
|
|
1034
|
+
var(--slotted-entity-picker-content-backdrop-filter, none)
|
|
1035
|
+
);
|
|
1036
|
+
}
|
|
1037
|
+
|
|
1038
|
+
@supports (animation-timeline: view()) {
|
|
1039
|
+
[data-ui-entity-picker][data-part-positioner] [data-part-group-label][data-stuck] {
|
|
1040
|
+
background: var(--slotted-entity-picker-group-label-stuck-surface, transparent);
|
|
1041
|
+
-webkit-backdrop-filter: var(--slotted-entity-picker-group-label-stuck-backdrop-filter, none);
|
|
1042
|
+
backdrop-filter: var(--slotted-entity-picker-group-label-stuck-backdrop-filter, none);
|
|
1043
|
+
}
|
|
1044
|
+
|
|
1045
|
+
[data-ui-entity-picker][data-part-positioner] [data-part-group-label][data-stuck] ~ * {
|
|
1046
|
+
animation: slotted-entity-picker-under-label linear forwards;
|
|
1047
|
+
animation-range: exit;
|
|
1048
|
+
animation-timeline: view();
|
|
1049
|
+
}
|
|
1050
|
+
}
|
|
1051
|
+
|
|
1052
|
+
@keyframes slotted-entity-picker-under-label {
|
|
1053
|
+
from {
|
|
1054
|
+
clip-path: inset(0);
|
|
1055
|
+
}
|
|
1056
|
+
|
|
1057
|
+
to {
|
|
1058
|
+
clip-path: inset(100% 0 0);
|
|
1059
|
+
}
|
|
1060
|
+
}
|
|
1061
|
+
|
|
1062
|
+
@media (prefers-reduced-transparency: reduce), (forced-colors: active) {
|
|
1063
|
+
[data-ui-entity-picker][data-part-positioner] [data-part-group-label][data-stuck] {
|
|
1064
|
+
-webkit-backdrop-filter: none;
|
|
1065
|
+
backdrop-filter: none;
|
|
1066
|
+
}
|
|
1067
|
+
}
|
|
1068
|
+
|
|
1013
1069
|
@media (forced-colors: active) {
|
|
1014
1070
|
[data-ui-entity-picker][data-part-positioner] [data-part-group-label] {
|
|
1015
1071
|
background: Canvas;
|
|
@@ -1297,6 +1353,19 @@
|
|
|
1297
1353
|
display: none;
|
|
1298
1354
|
}
|
|
1299
1355
|
|
|
1356
|
+
/* Beside the empty message the status says the same thing to the eye. It
|
|
1357
|
+
stays the live region that announces the count, clipped to one pixel. */
|
|
1358
|
+
[data-ui-entity-picker][data-part-positioner] [data-part-empty] ~ [data-part-status] {
|
|
1359
|
+
block-size: 1px;
|
|
1360
|
+
clip-path: inset(50%);
|
|
1361
|
+
inline-size: 1px;
|
|
1362
|
+
min-inline-size: 0;
|
|
1363
|
+
overflow: hidden;
|
|
1364
|
+
padding: 0;
|
|
1365
|
+
position: absolute;
|
|
1366
|
+
white-space: nowrap;
|
|
1367
|
+
}
|
|
1368
|
+
|
|
1300
1369
|
/**
|
|
1301
1370
|
* The error names what failed in the text color, with the alert mark — a
|
|
1302
1371
|
* `Glyph` the binding draws before the words — beside it in the danger
|
|
@@ -62,6 +62,8 @@
|
|
|
62
62
|
"--slotted-entity-picker-field-basis",
|
|
63
63
|
"--slotted-entity-picker-field-min",
|
|
64
64
|
"--slotted-entity-picker-group-label-height",
|
|
65
|
+
"--slotted-entity-picker-group-label-stuck-backdrop-filter",
|
|
66
|
+
"--slotted-entity-picker-group-label-stuck-surface",
|
|
65
67
|
"--slotted-entity-picker-highlight",
|
|
66
68
|
"--slotted-entity-picker-highlight-active",
|
|
67
69
|
"--slotted-entity-picker-highlight-ring",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
* competes with it.
|
|
21
21
|
*/
|
|
22
22
|
[data-ui-field-group][data-part-root] {
|
|
23
|
-
--_font-size: var(--slotted-control-font-size-
|
|
23
|
+
--_font-size: var(--slotted-control-font-size-md, 13px);
|
|
24
24
|
/** Legend to its own description, and description to error. */
|
|
25
25
|
--_message-gap: var(--slotted-field-group-message-gap, var(--slotted-space-2, 0.25rem));
|
|
26
26
|
/**
|
|
@@ -76,24 +76,34 @@
|
|
|
76
76
|
/* ── Size ─────────────────────────────────────────────────────────────
|
|
77
77
|
*
|
|
78
78
|
* The same three steps a field has, and for the same reason: a group in a
|
|
79
|
-
* dense table shrinks with the controls it holds.
|
|
80
|
-
* type
|
|
81
|
-
*
|
|
82
|
-
* because a third type scale would be a fourth thing for a theme to retune.
|
|
79
|
+
* dense table shrinks with the controls it holds. A question's legend takes
|
|
80
|
+
* the type of a field's label, because it names one answer as a label does. A
|
|
81
|
+
* section's legend stands one step above the labels under it.
|
|
83
82
|
*/
|
|
84
83
|
|
|
85
84
|
[data-ui-field-group][data-part-root][data-size='sm'] {
|
|
86
|
-
--_font-size: var(--slotted-control-font-size-
|
|
85
|
+
--_font-size: var(--slotted-control-font-size-sm, 12px);
|
|
87
86
|
}
|
|
88
87
|
|
|
89
88
|
[data-ui-field-group][data-part-root][data-size='md'] {
|
|
90
|
-
--_font-size: var(--slotted-control-font-size-
|
|
89
|
+
--_font-size: var(--slotted-control-font-size-md, 13px);
|
|
91
90
|
}
|
|
92
91
|
|
|
93
92
|
[data-ui-field-group][data-part-root][data-size='lg'] {
|
|
94
93
|
--_font-size: var(--slotted-control-font-size-lg, 14px);
|
|
95
94
|
}
|
|
96
95
|
|
|
96
|
+
[data-ui-field-group][data-part-root][data-kind='section']:is(
|
|
97
|
+
[data-size='md'],
|
|
98
|
+
[data-size='lg']
|
|
99
|
+
) {
|
|
100
|
+
--_font-size: var(--slotted-control-font-size-lg, 14px);
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
[data-ui-field-group][data-part-root][data-kind='section'][data-size='sm'] {
|
|
104
|
+
--_font-size: var(--slotted-control-font-size-md, 13px);
|
|
105
|
+
}
|
|
106
|
+
|
|
97
107
|
/* ── The legend ───────────────────────────────────────────────────────
|
|
98
108
|
*
|
|
99
109
|
* The name of the set. The user agent gives a legend an inline padding of its
|
|
@@ -1222,6 +1222,30 @@
|
|
|
1222
1222
|
justify-self: start;
|
|
1223
1223
|
padding-block: 0;
|
|
1224
1224
|
}
|
|
1225
|
+
|
|
1226
|
+
/*
|
|
1227
|
+
* With no chip and no pill, the row holds the summary alone: a line of a
|
|
1228
|
+
* phone spent on one button, which pushed the first records down. The
|
|
1229
|
+
* summary stands at the end of the search line instead, and the row of
|
|
1230
|
+
* conditions comes back with the first chip or pinned field.
|
|
1231
|
+
*/
|
|
1232
|
+
[data-ui-filter-bar]
|
|
1233
|
+
> [data-part-frame]:not(:has(> [data-part-bar] > :is([data-part-chip], [data-part-pill]))) {
|
|
1234
|
+
grid-template-areas:
|
|
1235
|
+
'search bar'
|
|
1236
|
+
'count count';
|
|
1237
|
+
grid-template-columns: minmax(0, 1fr) auto;
|
|
1238
|
+
}
|
|
1239
|
+
|
|
1240
|
+
[data-ui-filter-bar]
|
|
1241
|
+
> [data-part-frame]:not(
|
|
1242
|
+
:has(> [data-part-bar] > :is([data-part-chip], [data-part-pill]))
|
|
1243
|
+
):has(> [data-part-end]:not(:empty)) {
|
|
1244
|
+
grid-template-areas:
|
|
1245
|
+
'search bar'
|
|
1246
|
+
'end end'
|
|
1247
|
+
'count count';
|
|
1248
|
+
}
|
|
1225
1249
|
}
|
|
1226
1250
|
|
|
1227
1251
|
/**
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
@layer slotted.components {
|
|
2
|
+
/**
|
|
3
|
+
* A tool that floats over the page and holds nobody: no scrim, no focus
|
|
4
|
+
* trap, no inert page. It stands at the place the binding writes (`--_x`,
|
|
5
|
+
* `--_y`, the top-left corner in viewport pixels) and the translation is
|
|
6
|
+
* clamped by the viewport and its own size, so the whole panel stays in view
|
|
7
|
+
* while it moves, when the window shrinks and when a stored place lies
|
|
8
|
+
* outside it, with no script on resize.
|
|
9
|
+
*
|
|
10
|
+
* [data-ui-floating-panel] ▸ handle ▸ grip · title · close
|
|
11
|
+
* ▸ body
|
|
12
|
+
*/
|
|
13
|
+
[data-ui-floating-panel][data-part-root] {
|
|
14
|
+
background-color: var(--slotted-floating-panel-surface, var(--slotted-surface-raised, Canvas));
|
|
15
|
+
border: var(--slotted-border-width-thin, 1px) solid
|
|
16
|
+
var(--slotted-floating-panel-border-color, var(--slotted-border-strong, CanvasText));
|
|
17
|
+
border-radius: var(--slotted-floating-panel-radius, var(--slotted-radius-lg, 8px));
|
|
18
|
+
box-shadow: var(--slotted-floating-panel-shadow, var(--slotted-shadow-lg, none));
|
|
19
|
+
-webkit-backdrop-filter: var(--slotted-floating-panel-backdrop-filter, none);
|
|
20
|
+
backdrop-filter: var(--slotted-floating-panel-backdrop-filter, none);
|
|
21
|
+
box-sizing: border-box;
|
|
22
|
+
color: var(--slotted-text, CanvasText);
|
|
23
|
+
display: flex;
|
|
24
|
+
flex-direction: column;
|
|
25
|
+
font-family: var(--slotted-font-family-sans, system-ui, sans-serif);
|
|
26
|
+
font-size: var(--slotted-font-size-sm, 0.8125rem);
|
|
27
|
+
/* The place is physical (a pointer's coordinates), so the panel stands
|
|
28
|
+
at the viewport's left edge in either direction before it moves. */
|
|
29
|
+
inset-block-start: 0;
|
|
30
|
+
inset-inline-start: 0;
|
|
31
|
+
max-block-size: 100dvh;
|
|
32
|
+
max-inline-size: 100vw;
|
|
33
|
+
position: fixed;
|
|
34
|
+
translate: clamp(0px, var(--_x, 0px), calc(100vw - 100%))
|
|
35
|
+
clamp(0px, var(--_y, 0px), calc(100dvh - 100%));
|
|
36
|
+
/* Over the page and its popovers' layer, under a toast. */
|
|
37
|
+
z-index: var(--slotted-z-index-popover, 1000);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
[data-ui-floating-panel][data-part-root]:dir(rtl) {
|
|
41
|
+
inset-inline-end: 0;
|
|
42
|
+
inset-inline-start: auto;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
[data-ui-floating-panel] > [data-part-handle] {
|
|
46
|
+
align-items: center;
|
|
47
|
+
border-block-end: var(--slotted-border-width-thin, 1px) solid
|
|
48
|
+
var(--slotted-floating-panel-rule-color, var(--slotted-border-subtle, ButtonBorder));
|
|
49
|
+
cursor: grab;
|
|
50
|
+
display: flex;
|
|
51
|
+
gap: var(--slotted-space-3, 0.375rem);
|
|
52
|
+
padding-block: var(--slotted-space-2, 0.25rem);
|
|
53
|
+
padding-inline: var(--slotted-space-3, 0.375rem);
|
|
54
|
+
/* A press on the handle is a drag, never a scroll of the page. */
|
|
55
|
+
touch-action: none;
|
|
56
|
+
user-select: none;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
[data-ui-floating-panel][data-dragging] > [data-part-handle] {
|
|
60
|
+
cursor: grabbing;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
[data-ui-floating-panel] > [data-part-handle] > [data-part-title] {
|
|
64
|
+
flex: 1 1 auto;
|
|
65
|
+
font-family: var(
|
|
66
|
+
--slotted-font-family-heading,
|
|
67
|
+
var(--slotted-font-family-sans, system-ui, sans-serif)
|
|
68
|
+
);
|
|
69
|
+
font-size: inherit;
|
|
70
|
+
font-weight: var(--slotted-font-weight-semibold, 600);
|
|
71
|
+
margin: 0;
|
|
72
|
+
min-inline-size: 0;
|
|
73
|
+
overflow: hidden;
|
|
74
|
+
text-overflow: ellipsis;
|
|
75
|
+
white-space: nowrap;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
[data-ui-floating-panel] > [data-part-handle] > :is([data-part-grip], [data-part-close]) {
|
|
79
|
+
align-items: center;
|
|
80
|
+
appearance: none;
|
|
81
|
+
background-color: transparent;
|
|
82
|
+
block-size: var(--slotted-control-inner-size-md, 24px);
|
|
83
|
+
border: 0;
|
|
84
|
+
border-radius: var(--slotted-radius-sm, 4px);
|
|
85
|
+
color: var(--slotted-text-muted, GrayText);
|
|
86
|
+
cursor: inherit;
|
|
87
|
+
display: inline-flex;
|
|
88
|
+
flex: none;
|
|
89
|
+
inline-size: var(--slotted-control-inner-size-md, 24px);
|
|
90
|
+
justify-content: center;
|
|
91
|
+
padding: 0;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
[data-ui-floating-panel] > [data-part-handle] > [data-part-close] {
|
|
95
|
+
cursor: pointer;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
[data-ui-floating-panel]
|
|
99
|
+
> [data-part-handle]
|
|
100
|
+
> :is([data-part-grip], [data-part-close]):hover:not(:disabled) {
|
|
101
|
+
background-color: var(--slotted-tone-secondary-subtle-hover);
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
[data-ui-floating-panel]
|
|
105
|
+
> [data-part-handle]
|
|
106
|
+
> :is([data-part-grip], [data-part-close]):focus-visible {
|
|
107
|
+
outline: var(--slotted-focus-ring-width, 2px) solid var(--slotted-focus-ring-color, Highlight);
|
|
108
|
+
outline-offset: var(--slotted-focus-ring-offset, 2px);
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
[data-ui-floating-panel] > [data-part-body] {
|
|
112
|
+
min-block-size: 0;
|
|
113
|
+
overflow: auto;
|
|
114
|
+
padding: var(--slotted-space-5, 0.75rem);
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
@media (prefers-reduced-transparency: reduce), (forced-colors: active) {
|
|
118
|
+
[data-ui-floating-panel][data-part-root] {
|
|
119
|
+
-webkit-backdrop-filter: none;
|
|
120
|
+
backdrop-filter: none;
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
[
|
|
2
|
+
"--slotted-border-strong",
|
|
3
|
+
"--slotted-border-subtle",
|
|
4
|
+
"--slotted-border-width-thin",
|
|
5
|
+
"--slotted-control-inner-size-md",
|
|
6
|
+
"--slotted-floating-panel-backdrop-filter",
|
|
7
|
+
"--slotted-floating-panel-border-color",
|
|
8
|
+
"--slotted-floating-panel-radius",
|
|
9
|
+
"--slotted-floating-panel-rule-color",
|
|
10
|
+
"--slotted-floating-panel-shadow",
|
|
11
|
+
"--slotted-floating-panel-surface",
|
|
12
|
+
"--slotted-focus-ring-color",
|
|
13
|
+
"--slotted-focus-ring-offset",
|
|
14
|
+
"--slotted-focus-ring-width",
|
|
15
|
+
"--slotted-font-family-heading",
|
|
16
|
+
"--slotted-font-family-sans",
|
|
17
|
+
"--slotted-font-size-sm",
|
|
18
|
+
"--slotted-font-weight-semibold",
|
|
19
|
+
"--slotted-radius-lg",
|
|
20
|
+
"--slotted-radius-sm",
|
|
21
|
+
"--slotted-shadow-lg",
|
|
22
|
+
"--slotted-space-2",
|
|
23
|
+
"--slotted-space-3",
|
|
24
|
+
"--slotted-space-5",
|
|
25
|
+
"--slotted-surface-raised",
|
|
26
|
+
"--slotted-text",
|
|
27
|
+
"--slotted-text-muted",
|
|
28
|
+
"--slotted-tone-secondary-subtle-hover",
|
|
29
|
+
"--slotted-z-index-popover"
|
|
30
|
+
]
|
|
@@ -94,7 +94,7 @@
|
|
|
94
94
|
* rather than to the half-leading around it: the field's six-pixel row gap
|
|
95
95
|
* is six pixels from the control to the capitals.
|
|
96
96
|
*/
|
|
97
|
-
text-box: trim-both cap alphabetic;
|
|
97
|
+
text-box: trim-both var(--slotted-text-box-edge, cap alphabetic);
|
|
98
98
|
text-wrap: pretty;
|
|
99
99
|
}
|
|
100
100
|
|
package/src/kbd/kbd.css
CHANGED
package/src/kbd/kbd.tokens.json
CHANGED
package/src/list/list.css
CHANGED
|
@@ -48,6 +48,11 @@
|
|
|
48
48
|
--_frame-width: var(--slotted-list-border-width, var(--slotted-border-width-thin, 1px));
|
|
49
49
|
--_frame-radius: var(--slotted-list-radius, var(--slotted-radius-md, 6px));
|
|
50
50
|
--_surface: var(--slotted-list-background, var(--slotted-surface, Canvas));
|
|
51
|
+
/* The ground a sticky group heading paints, so it covers the rows that
|
|
52
|
+
scroll under it. A plain or ruled list paints no surface and stands on
|
|
53
|
+
a ground it does not know (a page, a sunken region); the consumer names
|
|
54
|
+
that ground here. A framed or separated list paints its own. */
|
|
55
|
+
--_section-background: var(--slotted-list-section-background, var(--slotted-surface, Canvas));
|
|
51
56
|
/* The group heading's type and color. It is a heading in the document,
|
|
52
57
|
so it takes the muted ink rather than a tone: a colored heading over a
|
|
53
58
|
neutral list reads as a status the group does not have. */
|
|
@@ -129,6 +134,10 @@
|
|
|
129
134
|
row-gap: var(--_gap);
|
|
130
135
|
}
|
|
131
136
|
|
|
137
|
+
[data-ui-list][data-part-root]:is([data-variant='framed'], [data-variant='separated']) {
|
|
138
|
+
--_section-background: var(--slotted-list-section-background, var(--_surface));
|
|
139
|
+
}
|
|
140
|
+
|
|
132
141
|
/**
|
|
133
142
|
* A group inside the set. It is an `li` holding a heading and a nested list,
|
|
134
143
|
* which is the grouping HTML already has; MUI, Angular Material, Primer and
|
|
@@ -183,6 +192,28 @@
|
|
|
183
192
|
padding-inline: 0;
|
|
184
193
|
}
|
|
185
194
|
|
|
195
|
+
/**
|
|
196
|
+
* `fill="inset"` is the form of a list on a phone: a pressed row reads as a
|
|
197
|
+
* rounded tile that reaches past the content, not as a stripe. The set bleeds
|
|
198
|
+
* by the tile's reach and its rows pad their content back by as much, so the
|
|
199
|
+
* icons, the names and the group headings keep the inline edge of the
|
|
200
|
+
* container, which pads its content by at least that. A framed or separated
|
|
201
|
+
* list draws its own box and keeps to it.
|
|
202
|
+
*/
|
|
203
|
+
[data-ui-list][data-part-root][data-fill='inset']:is(
|
|
204
|
+
[data-variant='plain'],
|
|
205
|
+
[data-variant='ruled']
|
|
206
|
+
) {
|
|
207
|
+
--_row-inset-inline: var(--slotted-list-fill-inset, var(--slotted-space-3, 0.375rem));
|
|
208
|
+
|
|
209
|
+
margin-inline: calc(-1 * var(--_row-inset-inline));
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
[data-ui-list][data-inset][data-fill='inset']:is([data-variant='plain'], [data-variant='ruled'])
|
|
213
|
+
:is([data-part-section-label], [data-part-empty]) {
|
|
214
|
+
padding-inline: var(--_row-inset-inline);
|
|
215
|
+
}
|
|
216
|
+
|
|
186
217
|
/**
|
|
187
218
|
* A heading that stays while its own rows scroll past. MUI ships it and is
|
|
188
219
|
* the only surveyed source that does; composing it needs the family's ground
|
|
@@ -221,7 +252,7 @@
|
|
|
221
252
|
}
|
|
222
253
|
|
|
223
254
|
[data-ui-list] [data-part-section-label][data-sticky] {
|
|
224
|
-
background-color: var(--
|
|
255
|
+
background-color: var(--_section-background);
|
|
225
256
|
inset-block-start: 0;
|
|
226
257
|
position: sticky;
|
|
227
258
|
z-index: var(--slotted-z-index-sticky, 100);
|
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
"--slotted-list-empty-padding",
|
|
16
16
|
"--slotted-list-empty-padding-lg",
|
|
17
17
|
"--slotted-list-empty-padding-sm",
|
|
18
|
+
"--slotted-list-fill-inset",
|
|
18
19
|
"--slotted-list-gap",
|
|
19
20
|
"--slotted-list-gap-lg",
|
|
20
21
|
"--slotted-list-gap-sm",
|
|
@@ -22,6 +23,7 @@
|
|
|
22
23
|
"--slotted-list-padding-inline-lg",
|
|
23
24
|
"--slotted-list-padding-inline-sm",
|
|
24
25
|
"--slotted-list-radius",
|
|
26
|
+
"--slotted-list-section-background",
|
|
25
27
|
"--slotted-list-section-color",
|
|
26
28
|
"--slotted-list-section-font-size",
|
|
27
29
|
"--slotted-list-section-font-weight",
|