@slotted/styles 0.1.0-beta.34 → 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.
Files changed (81) hide show
  1. package/package.json +5 -1
  2. package/src/accordion/accordion.css +20 -2
  3. package/src/accordion/accordion.tokens.json +2 -0
  4. package/src/avatar/avatar.css +1 -1
  5. package/src/avatar/avatar.tokens.json +1 -0
  6. package/src/badge/badge.css +1 -1
  7. package/src/badge/badge.tokens.json +1 -0
  8. package/src/button/button.css +168 -4
  9. package/src/button/button.tokens.json +5 -0
  10. package/src/calendar/calendar.css +131 -0
  11. package/src/calendar/calendar.tokens.json +10 -0
  12. package/src/card/card.css +63 -3
  13. package/src/cascader/cascader.css +13 -0
  14. package/src/chart/chart.css +3 -3
  15. package/src/chart/chart.tokens.json +1 -0
  16. package/src/checkbox/checkbox.css +47 -0
  17. package/src/checkbox/checkbox.tokens.json +4 -0
  18. package/src/collapsible/collapsible.css +174 -5
  19. package/src/collapsible/collapsible.tokens.json +4 -0
  20. package/src/combobox/combobox.css +13 -0
  21. package/src/command-palette/command-palette.css +10 -1
  22. package/src/command-palette/command-palette.tokens.json +1 -0
  23. package/src/dashboard-grid/dashboard-grid.css +12 -7
  24. package/src/dashboard-grid/dashboard-grid.tokens.json +1 -0
  25. package/src/data-grid/data-grid.css +44 -5
  26. package/src/data-list/data-list.css +17 -11
  27. package/src/description-list/description-list.css +15 -1
  28. package/src/entity-picker/entity-picker.css +23 -1
  29. package/src/entity-picker/entity-picker.tokens.json +1 -0
  30. package/src/filter-bar/filter-bar.css +24 -0
  31. package/src/floating-panel/floating-panel.css +123 -0
  32. package/src/floating-panel/floating-panel.tokens.json +30 -0
  33. package/src/inline-message/inline-message.css +1 -1
  34. package/src/inline-message/inline-message.tokens.json +1 -0
  35. package/src/kbd/kbd.css +1 -1
  36. package/src/kbd/kbd.tokens.json +1 -0
  37. package/src/list/list.css +10 -1
  38. package/src/list/list.tokens.json +1 -0
  39. package/src/list-item/list-item.css +108 -7
  40. package/src/list-item/list-item.tokens.json +3 -0
  41. package/src/listbox/listbox.css +50 -2
  42. package/src/listbox/listbox.tokens.json +6 -0
  43. package/src/message/message.css +20 -0
  44. package/src/message/message.tokens.json +1 -0
  45. package/src/meter/meter.css +136 -0
  46. package/src/meter/meter.tokens.json +23 -0
  47. package/src/multi-select/multi-select.css +13 -0
  48. package/src/page/page.css +58 -4
  49. package/src/page/page.tokens.json +7 -0
  50. package/src/progress-indicator/progress-indicator.css +70 -0
  51. package/src/progress-indicator/progress-indicator.tokens.json +3 -0
  52. package/src/prompt-composer/prompt-composer.css +18 -7
  53. package/src/radio-group/radio-group.css +50 -0
  54. package/src/radio-group/radio-group.tokens.json +2 -0
  55. package/src/rating/rating.css +1 -1
  56. package/src/rating/rating.tokens.json +1 -0
  57. package/src/runtime-properties.mjs +19 -0
  58. package/src/section/section.css +61 -4
  59. package/src/section/section.tokens.json +6 -0
  60. package/src/segmented-control/segmented-control.css +11 -0
  61. package/src/select/select.css +13 -0
  62. package/src/side-navigation/side-navigation.css +3 -3
  63. package/src/side-navigation/side-navigation.tokens.json +1 -0
  64. package/src/slider/slider.css +7 -1
  65. package/src/slider/slider.tokens.json +1 -0
  66. package/src/sparkline/sparkline.css +207 -0
  67. package/src/sparkline/sparkline.tokens.json +10 -0
  68. package/src/stat-card/stat-card.css +5 -0
  69. package/src/status-indicator/status-indicator.css +3 -2
  70. package/src/switch/switch.css +49 -25
  71. package/src/switch/switch.tokens.json +4 -0
  72. package/src/table/table.css +166 -12
  73. package/src/table/table.tokens.json +5 -0
  74. package/src/tag/tag.css +4 -1
  75. package/src/tag/tag.tokens.json +1 -0
  76. package/src/toolbar/toolbar.css +16 -2
  77. package/src/toolbar/toolbar.tokens.json +2 -1
  78. package/src/top-navigation/top-navigation.css +1 -1
  79. package/src/top-navigation/top-navigation.tokens.json +1 -0
  80. package/src/typography/typography.css +25 -0
  81. package/src/typography/typography.tokens.json +1 -0
@@ -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: var(--_surface);
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,15 @@
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.
1017
+ */
1018
+ [data-ui-entity-picker][data-part-positioner] [data-part-group-label][data-stuck] {
1019
+ background: var(--slotted-entity-picker-group-label-stuck-surface, var(--_surface));
1020
+ }
1021
+
1013
1022
  @media (forced-colors: active) {
1014
1023
  [data-ui-entity-picker][data-part-positioner] [data-part-group-label] {
1015
1024
  background: Canvas;
@@ -1297,6 +1306,19 @@
1297
1306
  display: none;
1298
1307
  }
1299
1308
 
1309
+ /* Beside the empty message the status says the same thing to the eye. It
1310
+ stays the live region that announces the count, clipped to one pixel. */
1311
+ [data-ui-entity-picker][data-part-positioner] [data-part-empty] ~ [data-part-status] {
1312
+ block-size: 1px;
1313
+ clip-path: inset(50%);
1314
+ inline-size: 1px;
1315
+ min-inline-size: 0;
1316
+ overflow: hidden;
1317
+ padding: 0;
1318
+ position: absolute;
1319
+ white-space: nowrap;
1320
+ }
1321
+
1300
1322
  /**
1301
1323
  * The error names what failed in the text color, with the alert mark — a
1302
1324
  * `Glyph` the binding draws before the words — beside it in the danger
@@ -62,6 +62,7 @@
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-surface",
65
66
  "--slotted-entity-picker-highlight",
66
67
  "--slotted-entity-picker-highlight-active",
67
68
  "--slotted-entity-picker-highlight-ring",
@@ -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
 
@@ -14,6 +14,7 @@
14
14
  "--slotted-radius-full",
15
15
  "--slotted-space-2",
16
16
  "--slotted-space-4",
17
+ "--slotted-text-box-edge",
17
18
  "--slotted-text-muted",
18
19
  "--slotted-tone-accent-text",
19
20
  "--slotted-tone-danger-text",
package/src/kbd/kbd.css CHANGED
@@ -175,7 +175,7 @@
175
175
  */
176
176
  @supports (text-box: trim-both cap alphabetic) {
177
177
  [data-ui-kbd] [data-part-legend] {
178
- text-box: trim-both cap alphabetic;
178
+ text-box: trim-both var(--slotted-text-box-edge, cap alphabetic);
179
179
  }
180
180
 
181
181
  /**
@@ -36,6 +36,7 @@
36
36
  "--slotted-space-8",
37
37
  "--slotted-surface-raised",
38
38
  "--slotted-text",
39
+ "--slotted-text-box-edge",
39
40
  "--slotted-text-muted",
40
41
  "--slotted-tone-secondary-border",
41
42
  "--slotted-tone-secondary-surface",
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
@@ -221,7 +230,7 @@
221
230
  }
222
231
 
223
232
  [data-ui-list] [data-part-section-label][data-sticky] {
224
- background-color: var(--_surface);
233
+ background-color: var(--_section-background);
225
234
  inset-block-start: 0;
226
235
  position: sticky;
227
236
  z-index: var(--slotted-z-index-sticky, 100);
@@ -22,6 +22,7 @@
22
22
  "--slotted-list-padding-inline-lg",
23
23
  "--slotted-list-padding-inline-sm",
24
24
  "--slotted-list-radius",
25
+ "--slotted-list-section-background",
25
26
  "--slotted-list-section-color",
26
27
  "--slotted-list-section-font-size",
27
28
  "--slotted-list-section-font-weight",
@@ -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
- [data-ui-list-item]:not([data-disabled]):not([data-loading]):has(
679
- > :is(a, button)[data-part-content]:not(:disabled):hover
680
- ) {
681
- --_fill: var(--_hover);
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
- [data-ui-list-item] > [data-part-content] {
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] > [data-part-content] > [data-part-start] {
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",
@@ -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",
@@ -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",