@slotted/styles 0.1.0-beta.26 → 0.1.0-beta.27
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/card/card.css +10 -0
- package/src/chart/chart.css +8 -3
- package/src/chart/chart.tokens.json +2 -0
- package/src/combobox/combobox.css +36 -0
- package/src/combobox/combobox.tokens.json +1 -0
- package/src/dialog/dialog.css +17 -5
- package/src/dialog/dialog.tokens.json +5 -0
- package/src/drawer/drawer.css +33 -8
- package/src/drawer/drawer.tokens.json +2 -0
- package/src/menu/menu.css +33 -0
- package/src/menu/menu.tokens.json +1 -0
- package/src/multi-select/multi-select.css +38 -1
- package/src/multi-select/multi-select.tokens.json +1 -0
- package/src/popover/popover.css +5 -0
- package/src/select/select.css +39 -1
- package/src/select/select.tokens.json +1 -0
- package/src/tooltip/tooltip.css +9 -4
package/package.json
CHANGED
package/src/card/card.css
CHANGED
|
@@ -269,6 +269,12 @@
|
|
|
269
269
|
row-gap: var(--slotted-card-header-gap, var(--slotted-space-2, 0.25rem));
|
|
270
270
|
}
|
|
271
271
|
|
|
272
|
+
/* A column gap is drawn beside an empty track too, so a header with no corner
|
|
273
|
+
keeps no corner column. */
|
|
274
|
+
[data-ui-card] > [data-part-header]:not(:has(> [data-part-actions])) {
|
|
275
|
+
grid-template-columns: minmax(0, 1fr);
|
|
276
|
+
}
|
|
277
|
+
|
|
272
278
|
[data-ui-card] > [data-part-header] > * {
|
|
273
279
|
grid-column: 1;
|
|
274
280
|
min-inline-size: 0;
|
|
@@ -306,6 +312,10 @@
|
|
|
306
312
|
grid-template-columns: auto minmax(0, 1fr) auto;
|
|
307
313
|
}
|
|
308
314
|
|
|
315
|
+
[data-ui-card] > [data-part-header]:has([data-part-selection]):not(:has(> [data-part-actions])) {
|
|
316
|
+
grid-template-columns: auto minmax(0, 1fr);
|
|
317
|
+
}
|
|
318
|
+
|
|
309
319
|
[data-ui-card] > [data-part-header]:has([data-part-selection]) > * {
|
|
310
320
|
grid-column: 2;
|
|
311
321
|
}
|
package/src/chart/chart.css
CHANGED
|
@@ -1256,9 +1256,11 @@
|
|
|
1256
1256
|
}
|
|
1257
1257
|
|
|
1258
1258
|
/* The table view: in the plot's box, scrolling inside it, in the document's
|
|
1259
|
-
direction, on the plot's ground.
|
|
1259
|
+
direction, on the plot's ground. The ground has a token of its own because
|
|
1260
|
+
`--slotted-chart-surface` is what the series mix with, so it stays opaque
|
|
1261
|
+
where a translucent theme makes the table translucent. */
|
|
1260
1262
|
[data-ui-chart] [data-part-table-region] {
|
|
1261
|
-
background-color: var(--_chart-surface);
|
|
1263
|
+
background-color: var(--slotted-chart-table-surface, var(--_chart-surface));
|
|
1262
1264
|
border-radius: var(--_radius);
|
|
1263
1265
|
inset: 0;
|
|
1264
1266
|
overflow: auto;
|
|
@@ -1316,7 +1318,10 @@
|
|
|
1316
1318
|
}
|
|
1317
1319
|
|
|
1318
1320
|
[data-ui-chart] [data-part-table] thead th {
|
|
1319
|
-
background-color: var(
|
|
1321
|
+
background-color: var(
|
|
1322
|
+
--slotted-chart-table-header-surface,
|
|
1323
|
+
var(--slotted-chart-table-surface, var(--_chart-surface))
|
|
1324
|
+
);
|
|
1320
1325
|
color: var(--slotted-text-muted, GrayText);
|
|
1321
1326
|
font-weight: var(--slotted-font-weight-medium, 500);
|
|
1322
1327
|
inset-block-start: 0;
|
|
@@ -37,6 +37,8 @@
|
|
|
37
37
|
"--slotted-chart-sequential-color",
|
|
38
38
|
"--slotted-chart-skeleton-hole",
|
|
39
39
|
"--slotted-chart-surface",
|
|
40
|
+
"--slotted-chart-table-header-surface",
|
|
41
|
+
"--slotted-chart-table-surface",
|
|
40
42
|
"--slotted-chart-tooltip-surface",
|
|
41
43
|
"--slotted-control-border-color",
|
|
42
44
|
"--slotted-control-font-size-sm",
|
|
@@ -771,14 +771,50 @@
|
|
|
771
771
|
grid-template-columns: subgrid;
|
|
772
772
|
}
|
|
773
773
|
|
|
774
|
+
/**
|
|
775
|
+
* A group's label stays at the top of the list while its group is in view.
|
|
776
|
+
* The group is the label's containing block, so the next label pushes it out
|
|
777
|
+
* and a group scrolled past takes its label with it. It sticks to the
|
|
778
|
+
* scrollport's edge rather than the padding's, on the surface's ground, above
|
|
779
|
+
* the items and below the parts the surface draws over them.
|
|
780
|
+
*/
|
|
774
781
|
[data-ui-combobox] [data-part-group-label] {
|
|
782
|
+
background: var(--_surface);
|
|
783
|
+
box-sizing: border-box;
|
|
775
784
|
color: var(--_muted);
|
|
776
785
|
font-size: var(--_secondary-font-size);
|
|
777
786
|
font-weight: var(--slotted-font-weight-semibold, 600);
|
|
778
787
|
grid-column: 1 / -1;
|
|
788
|
+
inset-block-start: calc(-1 * var(--_inset-block));
|
|
779
789
|
line-height: var(--slotted-line-height-sm, 1.45);
|
|
790
|
+
min-block-size: var(--_group-label-height);
|
|
780
791
|
padding-block: var(--slotted-space-2, 0.25rem);
|
|
781
792
|
padding-inline: var(--_item-inset);
|
|
793
|
+
position: sticky;
|
|
794
|
+
z-index: 1;
|
|
795
|
+
}
|
|
796
|
+
|
|
797
|
+
@media (forced-colors: active) {
|
|
798
|
+
[data-ui-combobox] [data-part-group-label] {
|
|
799
|
+
background: Canvas;
|
|
800
|
+
}
|
|
801
|
+
}
|
|
802
|
+
|
|
803
|
+
/**
|
|
804
|
+
* The label's height, which the list keeps clear above an item the keys
|
|
805
|
+
* bring into view (`revealWithin` reads the scroll padding), so the item is
|
|
806
|
+
* never drawn under a label stuck to the top.
|
|
807
|
+
*/
|
|
808
|
+
[data-ui-combobox] > [data-part-content]:has([data-part-group-label]) {
|
|
809
|
+
--_group-label-height: var(
|
|
810
|
+
--slotted-combobox-group-label-height,
|
|
811
|
+
calc(
|
|
812
|
+
var(--_secondary-font-size) * var(--slotted-line-height-sm, 1.45) + 2 *
|
|
813
|
+
var(--slotted-space-2, 0.25rem)
|
|
814
|
+
)
|
|
815
|
+
);
|
|
816
|
+
|
|
817
|
+
scroll-padding-block-start: var(--_group-label-height);
|
|
782
818
|
}
|
|
783
819
|
|
|
784
820
|
/* ── Options ──────────────────────────────────────────────────────────── */
|
|
@@ -23,6 +23,7 @@
|
|
|
23
23
|
"--slotted-combobox-disabled-background",
|
|
24
24
|
"--slotted-combobox-disabled-border-color",
|
|
25
25
|
"--slotted-combobox-disabled-color",
|
|
26
|
+
"--slotted-combobox-group-label-height",
|
|
26
27
|
"--slotted-combobox-highlight",
|
|
27
28
|
"--slotted-combobox-highlight-active",
|
|
28
29
|
"--slotted-combobox-highlight-ring",
|
package/src/dialog/dialog.css
CHANGED
|
@@ -47,9 +47,21 @@
|
|
|
47
47
|
* own image. It is a family token rather than a prop, so it is set per
|
|
48
48
|
* instance with a style attribute, per region with a rule, or once for an
|
|
49
49
|
* application in the theme; and because every step reads it, an explicit
|
|
50
|
-
* measure wins over the step whichever step is asked for.
|
|
50
|
+
* measure wins over the step whichever step is asked for. Each step reads
|
|
51
|
+
* a token of its own first (`--slotted-dialog-measure-<size>`), so a theme
|
|
52
|
+
* retunes one step and keeps the others.
|
|
53
|
+
*
|
|
54
|
+
* `md`, the default, holds a form: the form's own measure and the panel's
|
|
55
|
+
* inline padding on each side, so a form in a dialog keeps the column it
|
|
56
|
+
* has on a page.
|
|
51
57
|
*/
|
|
52
|
-
--_measure: var(
|
|
58
|
+
--_measure: var(
|
|
59
|
+
--slotted-dialog-measure-md,
|
|
60
|
+
var(
|
|
61
|
+
--slotted-dialog-measure,
|
|
62
|
+
calc(var(--slotted-form-measure, 40rem) + 2 * var(--_padding-inline))
|
|
63
|
+
)
|
|
64
|
+
);
|
|
53
65
|
/** The air between the panel and the edge of the layer. */
|
|
54
66
|
--_layer-padding: var(--slotted-space-8, 1.5rem);
|
|
55
67
|
/**
|
|
@@ -185,7 +197,7 @@
|
|
|
185
197
|
}
|
|
186
198
|
|
|
187
199
|
[data-ui-dialog][data-size='sm'] {
|
|
188
|
-
--_measure: var(--slotted-dialog-measure,
|
|
200
|
+
--_measure: var(--slotted-dialog-measure-sm, var(--slotted-dialog-measure, 32rem));
|
|
189
201
|
--_padding-inline: var(--slotted-dialog-padding-inline-sm, var(--slotted-space-7, 1.25rem));
|
|
190
202
|
--_padding-block: var(--slotted-dialog-padding-block-sm, var(--slotted-space-6, 1rem));
|
|
191
203
|
--_header-padding-block: var(--slotted-space-5, 0.75rem);
|
|
@@ -194,11 +206,11 @@
|
|
|
194
206
|
}
|
|
195
207
|
|
|
196
208
|
[data-ui-dialog][data-size='lg'] {
|
|
197
|
-
--_measure: var(--slotted-dialog-measure,
|
|
209
|
+
--_measure: var(--slotted-dialog-measure-lg, var(--slotted-dialog-measure, 48rem));
|
|
198
210
|
}
|
|
199
211
|
|
|
200
212
|
[data-ui-dialog][data-size='xl'] {
|
|
201
|
-
--_measure: var(--slotted-dialog-measure, 56rem);
|
|
213
|
+
--_measure: var(--slotted-dialog-measure-xl, var(--slotted-dialog-measure, 56rem));
|
|
202
214
|
}
|
|
203
215
|
|
|
204
216
|
/**
|
|
@@ -18,6 +18,10 @@
|
|
|
18
18
|
"--slotted-dialog-description-color",
|
|
19
19
|
"--slotted-dialog-footer-surface",
|
|
20
20
|
"--slotted-dialog-measure",
|
|
21
|
+
"--slotted-dialog-measure-lg",
|
|
22
|
+
"--slotted-dialog-measure-md",
|
|
23
|
+
"--slotted-dialog-measure-sm",
|
|
24
|
+
"--slotted-dialog-measure-xl",
|
|
21
25
|
"--slotted-dialog-padding-block",
|
|
22
26
|
"--slotted-dialog-padding-block-sm",
|
|
23
27
|
"--slotted-dialog-padding-inline",
|
|
@@ -42,6 +46,7 @@
|
|
|
42
46
|
"--slotted-font-size-md",
|
|
43
47
|
"--slotted-font-size-xl",
|
|
44
48
|
"--slotted-font-weight-semibold",
|
|
49
|
+
"--slotted-form-measure",
|
|
45
50
|
"--slotted-line-height-md",
|
|
46
51
|
"--slotted-radius-lg",
|
|
47
52
|
"--slotted-radius-sm",
|
package/src/drawer/drawer.css
CHANGED
|
@@ -1131,6 +1131,20 @@
|
|
|
1131
1131
|
grid-template-columns: minmax(0, 1fr) auto auto;
|
|
1132
1132
|
}
|
|
1133
1133
|
|
|
1134
|
+
/* A column gap is drawn beside an empty track too, so a header holds only the
|
|
1135
|
+
columns of the parts it has. */
|
|
1136
|
+
[data-ui-drawer]
|
|
1137
|
+
> [data-part-panel]
|
|
1138
|
+
> [data-part-header]:has(> [data-part-actions]):not(:has(> [data-part-close])) {
|
|
1139
|
+
grid-template-columns: minmax(0, 1fr) auto;
|
|
1140
|
+
}
|
|
1141
|
+
|
|
1142
|
+
[data-ui-drawer]
|
|
1143
|
+
> [data-part-panel]
|
|
1144
|
+
> [data-part-header]:not(:has(> [data-part-actions], > [data-part-close])) {
|
|
1145
|
+
grid-template-columns: minmax(0, 1fr);
|
|
1146
|
+
}
|
|
1147
|
+
|
|
1134
1148
|
[data-ui-drawer] > [data-part-panel] > [data-part-header] > [data-part-actions] {
|
|
1135
1149
|
grid-column: 2;
|
|
1136
1150
|
grid-row: 1 / span 2;
|
|
@@ -1369,13 +1383,11 @@
|
|
|
1369
1383
|
}
|
|
1370
1384
|
|
|
1371
1385
|
/**
|
|
1372
|
-
* Opening and closing are the
|
|
1373
|
-
*
|
|
1374
|
-
*
|
|
1375
|
-
*
|
|
1376
|
-
*
|
|
1377
|
-
* phone's height). Leaving, nothing re-snaps: a re-snap would lift the panel
|
|
1378
|
-
* back into view on its way out.
|
|
1386
|
+
* Opening and closing are a travel of the binding: the scroll lands on the
|
|
1387
|
+
* resting stop or on nothing at once, and the panel slides there from where
|
|
1388
|
+
* it was drawn, in the slide tokens (`attachSheetScroll`). The layer is kept
|
|
1389
|
+
* for as long as the exit takes. Leaving, nothing re-snaps: a re-snap would
|
|
1390
|
+
* lift the panel back into view on its way out.
|
|
1379
1391
|
*/
|
|
1380
1392
|
[data-ui-drawer][data-mode='overlay'][data-side='bottom'][data-drag] {
|
|
1381
1393
|
--_reveal: content-visibility
|
|
@@ -1443,7 +1455,12 @@
|
|
|
1443
1455
|
> [data-part-panel]
|
|
1444
1456
|
> [data-part-footer] {
|
|
1445
1457
|
position: sticky;
|
|
1446
|
-
|
|
1458
|
+
/* A close lands the scroll at once and slides the panel with a transform,
|
|
1459
|
+
which sticky positioning ignores: the travel's length holds the footer
|
|
1460
|
+
where it rested in the panel (`--slotted-drawer-sheet-travel`). */
|
|
1461
|
+
inset-block-end: calc(
|
|
1462
|
+
var(--slotted-keyboard-inset, 0px) - var(--slotted-drawer-sheet-travel, 0px)
|
|
1463
|
+
);
|
|
1447
1464
|
z-index: 1;
|
|
1448
1465
|
background: var(--slotted-drawer-surface, var(--slotted-surface-raised, Canvas));
|
|
1449
1466
|
}
|
|
@@ -1600,6 +1617,14 @@
|
|
|
1600
1617
|
> [data-part-backdrop]::before {
|
|
1601
1618
|
animation: none;
|
|
1602
1619
|
}
|
|
1620
|
+
|
|
1621
|
+
/* Along a travel the scroll has already landed: the binding animates the layer
|
|
1622
|
+
with the panel, from the value held here for the first frame. */
|
|
1623
|
+
[data-ui-drawer][data-mode='overlay'][data-side='bottom'][data-drag][data-sheet-travel]
|
|
1624
|
+
> [data-part-backdrop]::before {
|
|
1625
|
+
animation: none;
|
|
1626
|
+
opacity: var(--slotted-drawer-sheet-dim, 1);
|
|
1627
|
+
}
|
|
1603
1628
|
}
|
|
1604
1629
|
|
|
1605
1630
|
@keyframes slotted-drawer-sheet-dim {
|
|
@@ -30,9 +30,11 @@
|
|
|
30
30
|
"--slotted-drawer-resizer-line-color",
|
|
31
31
|
"--slotted-drawer-rule-color",
|
|
32
32
|
"--slotted-drawer-scrim",
|
|
33
|
+
"--slotted-drawer-sheet-dim",
|
|
33
34
|
"--slotted-drawer-sheet-floor",
|
|
34
35
|
"--slotted-drawer-sheet-height",
|
|
35
36
|
"--slotted-drawer-sheet-inline-size",
|
|
37
|
+
"--slotted-drawer-sheet-travel",
|
|
36
38
|
"--slotted-drawer-slide-duration",
|
|
37
39
|
"--slotted-drawer-slide-easing",
|
|
38
40
|
"--slotted-drawer-slide-exit-duration",
|
package/src/menu/menu.css
CHANGED
|
@@ -411,14 +411,47 @@
|
|
|
411
411
|
grid-template-columns: subgrid;
|
|
412
412
|
}
|
|
413
413
|
|
|
414
|
+
/**
|
|
415
|
+
* A group's label stays at the top of the list while its group is in view.
|
|
416
|
+
* The group is the label's containing block, so the next label pushes it out
|
|
417
|
+
* and a group scrolled past takes its label with it. It sticks to the
|
|
418
|
+
* scrollport's edge rather than the padding's, on the surface's ground, above
|
|
419
|
+
* the items and below the parts the surface draws over them.
|
|
420
|
+
*/
|
|
414
421
|
[data-ui-menu] [data-part-group-label] {
|
|
422
|
+
background: var(--_surface);
|
|
423
|
+
box-sizing: border-box;
|
|
415
424
|
color: var(--_muted);
|
|
416
425
|
font-size: var(--_secondary-font-size);
|
|
417
426
|
font-weight: var(--slotted-font-weight-semibold, 600);
|
|
418
427
|
grid-column: 1 / -1;
|
|
428
|
+
inset-block-start: calc(-1 * var(--_inset-block));
|
|
419
429
|
line-height: var(--_secondary-leading);
|
|
430
|
+
min-block-size: var(--_group-label-height);
|
|
420
431
|
padding-block: var(--slotted-space-2, 0.25rem);
|
|
421
432
|
padding-inline: var(--_item-inset);
|
|
433
|
+
position: sticky;
|
|
434
|
+
z-index: 1;
|
|
435
|
+
}
|
|
436
|
+
|
|
437
|
+
@media (forced-colors: active) {
|
|
438
|
+
[data-ui-menu] [data-part-group-label] {
|
|
439
|
+
background: Canvas;
|
|
440
|
+
}
|
|
441
|
+
}
|
|
442
|
+
|
|
443
|
+
/**
|
|
444
|
+
* The label's height, which the list keeps clear above an item the keys
|
|
445
|
+
* bring into view (`revealWithin` reads the scroll padding), so the item is
|
|
446
|
+
* never drawn under a label stuck to the top.
|
|
447
|
+
*/
|
|
448
|
+
[data-ui-menu] > [data-part-content]:has([data-part-group-label]) {
|
|
449
|
+
--_group-label-height: var(
|
|
450
|
+
--slotted-menu-group-label-height,
|
|
451
|
+
calc(var(--_secondary-leading) + 2 * var(--slotted-space-2, 0.25rem))
|
|
452
|
+
);
|
|
453
|
+
|
|
454
|
+
scroll-padding-block-start: var(--_group-label-height);
|
|
422
455
|
}
|
|
423
456
|
|
|
424
457
|
/* ── Header ───────────────────────────────────────────────────────────── */
|
|
@@ -1119,7 +1119,8 @@
|
|
|
1119
1119
|
padding-block: var(--_inset-block);
|
|
1120
1120
|
padding-inline: var(--_inset-inline);
|
|
1121
1121
|
position: sticky;
|
|
1122
|
-
|
|
1122
|
+
/* Above a group label stuck to the same edge. */
|
|
1123
|
+
z-index: 2;
|
|
1123
1124
|
}
|
|
1124
1125
|
|
|
1125
1126
|
/* ── Groups ───────────────────────────────────────────────────────────── */
|
|
@@ -1143,14 +1144,50 @@
|
|
|
1143
1144
|
display: none;
|
|
1144
1145
|
}
|
|
1145
1146
|
|
|
1147
|
+
/**
|
|
1148
|
+
* A group's label stays at the top of the list while its group is in view.
|
|
1149
|
+
* The group is the label's containing block, so the next label pushes it out
|
|
1150
|
+
* and a group scrolled past takes its label with it. It sticks to the
|
|
1151
|
+
* scrollport's edge rather than the padding's, on the surface's ground, above
|
|
1152
|
+
* the items and below the parts the surface draws over them.
|
|
1153
|
+
*/
|
|
1146
1154
|
[data-ui-multi-select] [data-part-group-label] {
|
|
1155
|
+
background: var(--_surface);
|
|
1156
|
+
box-sizing: border-box;
|
|
1147
1157
|
color: var(--_muted);
|
|
1148
1158
|
font-size: var(--_secondary-font-size);
|
|
1149
1159
|
font-weight: var(--slotted-font-weight-semibold, 600);
|
|
1150
1160
|
grid-column: 1 / -1;
|
|
1161
|
+
inset-block-start: calc(-1 * var(--_inset-block));
|
|
1151
1162
|
line-height: var(--slotted-line-height-sm, 1.45);
|
|
1163
|
+
min-block-size: var(--_group-label-height);
|
|
1152
1164
|
padding-block: var(--slotted-space-2, 0.25rem);
|
|
1153
1165
|
padding-inline: var(--_item-inset);
|
|
1166
|
+
position: sticky;
|
|
1167
|
+
z-index: 1;
|
|
1168
|
+
}
|
|
1169
|
+
|
|
1170
|
+
@media (forced-colors: active) {
|
|
1171
|
+
[data-ui-multi-select] [data-part-group-label] {
|
|
1172
|
+
background: Canvas;
|
|
1173
|
+
}
|
|
1174
|
+
}
|
|
1175
|
+
|
|
1176
|
+
/**
|
|
1177
|
+
* The label's height, which the list keeps clear above an item the keys
|
|
1178
|
+
* bring into view (`revealWithin` reads the scroll padding), so the item is
|
|
1179
|
+
* never drawn under a label stuck to the top.
|
|
1180
|
+
*/
|
|
1181
|
+
[data-ui-multi-select] > [data-part-content]:has([data-part-group-label]) {
|
|
1182
|
+
--_group-label-height: var(
|
|
1183
|
+
--slotted-multi-select-group-label-height,
|
|
1184
|
+
calc(
|
|
1185
|
+
var(--_secondary-font-size) * var(--slotted-line-height-sm, 1.45) + 2 *
|
|
1186
|
+
var(--slotted-space-2, 0.25rem)
|
|
1187
|
+
)
|
|
1188
|
+
);
|
|
1189
|
+
|
|
1190
|
+
scroll-padding-block-start: var(--_group-label-height);
|
|
1154
1191
|
}
|
|
1155
1192
|
|
|
1156
1193
|
/* ── Options ──────────────────────────────────────────────────────────── */
|
|
@@ -71,6 +71,7 @@
|
|
|
71
71
|
"--slotted-multi-select-disabled-color",
|
|
72
72
|
"--slotted-multi-select-field-basis",
|
|
73
73
|
"--slotted-multi-select-field-min",
|
|
74
|
+
"--slotted-multi-select-group-label-height",
|
|
74
75
|
"--slotted-multi-select-highlight",
|
|
75
76
|
"--slotted-multi-select-highlight-active",
|
|
76
77
|
"--slotted-multi-select-highlight-ring",
|
package/src/popover/popover.css
CHANGED
|
@@ -320,6 +320,11 @@
|
|
|
320
320
|
padding-inline: var(--_inset-inline);
|
|
321
321
|
}
|
|
322
322
|
|
|
323
|
+
/* A column gap is drawn beside an empty track too. */
|
|
324
|
+
[data-ui-popover] > [data-part-content] > [data-part-header]:not(:has(> [data-part-close])) {
|
|
325
|
+
grid-template-columns: minmax(0, 1fr);
|
|
326
|
+
}
|
|
327
|
+
|
|
323
328
|
[data-ui-popover] > [data-part-content] > [data-part-header] > [data-part-title] {
|
|
324
329
|
grid-column: 1;
|
|
325
330
|
margin: 0;
|
package/src/select/select.css
CHANGED
|
@@ -1186,7 +1186,8 @@
|
|
|
1186
1186
|
padding-block: var(--_inset-block);
|
|
1187
1187
|
padding-inline: var(--_inset-inline);
|
|
1188
1188
|
position: sticky;
|
|
1189
|
-
|
|
1189
|
+
/* Above a group label stuck to the same edge. */
|
|
1190
|
+
z-index: 2;
|
|
1190
1191
|
}
|
|
1191
1192
|
|
|
1192
1193
|
/**
|
|
@@ -1224,14 +1225,51 @@
|
|
|
1224
1225
|
display: none;
|
|
1225
1226
|
}
|
|
1226
1227
|
|
|
1228
|
+
/**
|
|
1229
|
+
* A group's label stays at the top of the list while its group is in view.
|
|
1230
|
+
* The group is the label's containing block, so the next label pushes it out
|
|
1231
|
+
* and a group scrolled past takes its label with it. It sticks to the
|
|
1232
|
+
* scrollport's edge rather than the padding's, on the surface's ground, above
|
|
1233
|
+
* the items and below the parts the surface draws over them.
|
|
1234
|
+
*/
|
|
1227
1235
|
[data-ui-select] [data-part-group-label] {
|
|
1236
|
+
background: var(--_surface);
|
|
1237
|
+
box-sizing: border-box;
|
|
1228
1238
|
color: var(--_muted);
|
|
1229
1239
|
font-size: var(--_secondary-font-size);
|
|
1230
1240
|
font-weight: var(--slotted-font-weight-semibold, 600);
|
|
1231
1241
|
grid-column: 1 / -1;
|
|
1242
|
+
inset-block-start: calc(-1 * var(--_inset-block));
|
|
1232
1243
|
line-height: var(--slotted-line-height-sm, 1.45);
|
|
1244
|
+
min-block-size: var(--_group-label-height);
|
|
1233
1245
|
padding-block: var(--slotted-space-2, 0.25rem);
|
|
1234
1246
|
padding-inline: var(--_item-inset);
|
|
1247
|
+
position: sticky;
|
|
1248
|
+
z-index: 1;
|
|
1249
|
+
}
|
|
1250
|
+
|
|
1251
|
+
@media (forced-colors: active) {
|
|
1252
|
+
[data-ui-select] [data-part-group-label] {
|
|
1253
|
+
background: Canvas;
|
|
1254
|
+
}
|
|
1255
|
+
}
|
|
1256
|
+
|
|
1257
|
+
/**
|
|
1258
|
+
* The label's height, which the list keeps clear above an item the keys
|
|
1259
|
+
* bring into view (`revealWithin` reads the scroll padding), so the item is
|
|
1260
|
+
* never drawn under a label stuck to the top.
|
|
1261
|
+
*/
|
|
1262
|
+
[data-ui-select] > [data-part-content]:not([data-search]):has([data-part-group-label]),
|
|
1263
|
+
[data-ui-select] [data-part-list]:has([data-part-group-label]) {
|
|
1264
|
+
--_group-label-height: var(
|
|
1265
|
+
--slotted-select-group-label-height,
|
|
1266
|
+
calc(
|
|
1267
|
+
var(--_secondary-font-size) * var(--slotted-line-height-sm, 1.45) + 2 *
|
|
1268
|
+
var(--slotted-space-2, 0.25rem)
|
|
1269
|
+
)
|
|
1270
|
+
);
|
|
1271
|
+
|
|
1272
|
+
scroll-padding-block-start: var(--_group-label-height);
|
|
1235
1273
|
}
|
|
1236
1274
|
|
|
1237
1275
|
/* ── Options ──────────────────────────────────────────────────────────── */
|
|
@@ -69,6 +69,7 @@
|
|
|
69
69
|
"--slotted-select-disabled-background",
|
|
70
70
|
"--slotted-select-disabled-border-color",
|
|
71
71
|
"--slotted-select-disabled-color",
|
|
72
|
+
"--slotted-select-group-label-height",
|
|
72
73
|
"--slotted-select-highlight",
|
|
73
74
|
"--slotted-select-highlight-active",
|
|
74
75
|
"--slotted-select-highlight-ring",
|
package/src/tooltip/tooltip.css
CHANGED
|
@@ -200,19 +200,24 @@
|
|
|
200
200
|
* moves. In Chromium an ancestor with `opacity` below one is the Backdrop Root
|
|
201
201
|
* of what it holds, so a `backdrop-filter` on the content blurs nothing until
|
|
202
202
|
* the layer is opaque and then appears at once. The content's own opacity
|
|
203
|
-
* leaves its own filter drawn on every frame of the motion.
|
|
203
|
+
* leaves its own filter drawn on every frame of the motion. The arrow is
|
|
204
|
+
* the other part that paints, and it fades on the same rules, so the two
|
|
205
|
+
* read as one surface.
|
|
204
206
|
*/
|
|
205
|
-
[data-ui-tooltip] > [data-part-content]
|
|
207
|
+
[data-ui-tooltip] > [data-part-content],
|
|
208
|
+
[data-ui-tooltip] > [data-part-arrow] {
|
|
206
209
|
opacity: 0;
|
|
207
210
|
transition: opacity var(--slotted-duration-short) var(--slotted-easing-exit);
|
|
208
211
|
}
|
|
209
212
|
|
|
210
|
-
[data-ui-tooltip][data-open] > [data-part-content]
|
|
213
|
+
[data-ui-tooltip][data-open] > [data-part-content],
|
|
214
|
+
[data-ui-tooltip][data-open] > [data-part-arrow] {
|
|
211
215
|
opacity: 1;
|
|
212
216
|
transition: none;
|
|
213
217
|
}
|
|
214
218
|
|
|
215
|
-
[data-ui-tooltip][data-open][data-positioned] > [data-part-content]
|
|
219
|
+
[data-ui-tooltip][data-open][data-positioned] > [data-part-content],
|
|
220
|
+
[data-ui-tooltip][data-open][data-positioned] > [data-part-arrow] {
|
|
216
221
|
animation: slotted-tooltip-fade var(--slotted-duration-medium) var(--slotted-easing-enter);
|
|
217
222
|
}
|
|
218
223
|
|