@voidable/theme 0.7.0 → 0.8.0

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 (95) hide show
  1. package/README.md +133 -8
  2. package/package.json +66 -8
  3. package/src/app-shell/detail.css +7 -5
  4. package/src/app-shell/subtable.css +7 -6
  5. package/src/base.css +28 -0
  6. package/src/components/accordion.css +96 -19
  7. package/src/components/action-input.css +51 -61
  8. package/src/components/alert.css +63 -23
  9. package/src/components/avatar.css +0 -2
  10. package/src/components/badge.css +35 -25
  11. package/src/components/banner.css +60 -19
  12. package/src/components/bar-chart.css +10 -3
  13. package/src/components/breadcrumbs.css +20 -16
  14. package/src/components/button.css +130 -55
  15. package/src/components/calendar.css +40 -17
  16. package/src/components/card.css +122 -23
  17. package/src/components/carousel.css +85 -118
  18. package/src/components/checkbox-group.css +3 -1
  19. package/src/components/checkbox.css +18 -23
  20. package/src/components/collapsible.css +95 -29
  21. package/src/components/color-picker.css +10 -10
  22. package/src/components/combobox.css +47 -29
  23. package/src/components/compose-input.css +3 -3
  24. package/src/components/dialog.css +115 -41
  25. package/src/components/divider.css +7 -4
  26. package/src/components/donut-chart.css +25 -15
  27. package/src/components/drawer.css +135 -68
  28. package/src/components/dropdown-menu.css +21 -43
  29. package/src/components/editable.css +7 -7
  30. package/src/components/error-fallback.css +48 -27
  31. package/src/components/field.css +12 -5
  32. package/src/components/file-upload.css +2 -1
  33. package/src/components/gauge.css +35 -23
  34. package/src/components/hamburger.css +10 -10
  35. package/src/components/hover-card.css +13 -113
  36. package/src/components/indicator.css +22 -18
  37. package/src/components/input.css +15 -12
  38. package/src/components/line-chart.css +10 -10
  39. package/src/components/list.css +28 -7
  40. package/src/components/menu.css +48 -33
  41. package/src/components/multiselect.css +57 -40
  42. package/src/components/nav-bar.css +23 -14
  43. package/src/components/nav-menu.css +31 -22
  44. package/src/components/number-input.css +56 -79
  45. package/src/components/overlay.css +215 -0
  46. package/src/components/pagination.css +42 -31
  47. package/src/components/panel.css +37 -11
  48. package/src/components/pin-input.css +23 -22
  49. package/src/components/popover.css +19 -35
  50. package/src/components/progress.css +19 -10
  51. package/src/components/radio-group.css +2 -1
  52. package/src/components/radio.css +15 -20
  53. package/src/components/scroll-area.css +3 -3
  54. package/src/components/segmented-control.css +46 -29
  55. package/src/components/select.css +99 -31
  56. package/src/components/sidebar.css +8 -4
  57. package/src/components/skeleton.css +8 -3
  58. package/src/components/slider.css +4 -2
  59. package/src/components/spinner.css +5 -4
  60. package/src/components/stat.css +59 -52
  61. package/src/components/status-dot.css +0 -1
  62. package/src/components/switch.css +18 -26
  63. package/src/components/table.css +443 -16
  64. package/src/components/tabs.css +92 -29
  65. package/src/components/tag.css +44 -20
  66. package/src/components/tags-input.css +43 -55
  67. package/src/components/textarea.css +15 -12
  68. package/src/components/toast.css +84 -22
  69. package/src/components/toggle.css +35 -42
  70. package/src/components/tooltip.css +19 -38
  71. package/src/core.css +98 -0
  72. package/src/forced-colors.css +134 -0
  73. package/src/index.css +4 -77
  74. package/src/knobs.css +101 -0
  75. package/src/layers.css +38 -0
  76. package/src/media/media.css +258 -0
  77. package/src/media/surface.css +143 -0
  78. package/src/patterns/data.css +461 -0
  79. package/src/patterns/page.css +348 -0
  80. package/src/patterns/shell.css +371 -0
  81. package/src/pre-upgrade.css +202 -0
  82. package/src/primitives.css +19 -97
  83. package/src/reset.css +45 -21
  84. package/src/skins/loft.css +114 -0
  85. package/src/skins/slab.css +107 -0
  86. package/src/themes/aurora.css +16 -0
  87. package/src/themes/capsule.css +16 -0
  88. package/src/themes/console.css +16 -0
  89. package/src/themes/dune.css +16 -0
  90. package/src/themes/iris.css +16 -0
  91. package/src/themes/orbit.css +16 -0
  92. package/src/themes/paper.css +18 -0
  93. package/src/themes/void.css +16 -0
  94. package/src/tokens.css +552 -98
  95. package/src/type.css +103 -0
@@ -2,20 +2,27 @@ void-carousel {
2
2
  display: block;
3
3
  position: relative;
4
4
  font-family: var(--void-font-sans);
5
+ --_void-carousel-control: 2rem;
6
+ --_void-carousel-glyph: 0.4rem;
7
+ --_void-carousel-dot: 0.5rem;
5
8
  }
6
9
 
7
- .void-carousel-viewport {
10
+ /* ── Slides: the content part is the window, the items slide inside it ── */
11
+
12
+ void-carousel-content {
13
+ display: flex;
8
14
  overflow: hidden;
9
15
  order: -1;
10
16
  }
11
17
 
12
- .void-carousel-track {
13
- display: flex;
18
+ void-carousel-item {
19
+ flex: 0 0 100%;
20
+ min-width: 0;
21
+ overflow: hidden;
14
22
  transition: transform var(--void-duration-slow) var(--void-ease-in-out);
15
23
  }
16
24
 
17
- void-carousel[orientation="horizontal"] .void-carousel-track {
18
- flex-direction: row;
25
+ void-carousel[orientation="horizontal"] void-carousel-item {
19
26
  transform: translateX(calc(var(--void-carousel-offset, 0) * -100%));
20
27
  }
21
28
 
@@ -24,39 +31,31 @@ void-carousel[orientation="vertical"] {
24
31
  flex-direction: column;
25
32
  }
26
33
 
27
- void-carousel[orientation="vertical"] .void-carousel-viewport {
34
+ void-carousel[orientation="vertical"] void-carousel-content {
28
35
  flex: 1;
29
36
  min-height: 0;
30
- }
31
-
32
- void-carousel[orientation="vertical"] .void-carousel-track {
33
37
  flex-direction: column;
34
- height: 100%;
35
- transform: translateY(calc(var(--void-carousel-offset, 0) * -100%));
36
38
  }
37
39
 
38
- void-carousel[orientation="vertical"] void-carousel-slide {
40
+ void-carousel[orientation="vertical"] void-carousel-item {
39
41
  min-height: 0;
40
42
  height: 100%;
43
+ transform: translateY(calc(var(--void-carousel-offset, 0) * -100%));
41
44
  }
42
45
 
43
- void-carousel-slide {
44
- flex: 0 0 100%;
45
- min-width: 0;
46
- overflow: hidden;
47
- }
48
-
49
- /* ── Prev / Next controls ── */
46
+ /* ── Previous / next: the parts are the buttons; the arrow is drawn when they are empty ── */
50
47
 
51
- .void-carousel-prev,
52
- .void-carousel-next {
53
- appearance: none;
48
+ void-carousel-previous,
49
+ void-carousel-next {
54
50
  position: absolute;
55
- top: 50%;
51
+ inset-block-start: 50%;
56
52
  transform: translateY(-50%);
57
53
  display: inline-flex;
58
54
  align-items: center;
59
55
  justify-content: center;
56
+ width: var(--_void-carousel-control);
57
+ height: var(--_void-carousel-control);
58
+ box-sizing: border-box;
60
59
  border: 1px solid var(--void-color-border);
61
60
  border-radius: var(--void-radius-full);
62
61
  background: var(--void-color-bg);
@@ -68,85 +67,104 @@ void-carousel-slide {
68
67
  z-index: 1;
69
68
  }
70
69
 
71
- .void-carousel-prev {
72
- left: var(--void-space-2);
70
+ void-carousel-previous {
71
+ inset-inline-start: var(--void-space-2);
73
72
  }
74
73
 
75
- .void-carousel-next {
76
- right: var(--void-space-2);
74
+ void-carousel-next {
75
+ inset-inline-end: var(--void-space-2);
77
76
  }
78
77
 
79
- .void-carousel-prev svg,
80
- .void-carousel-next svg {
81
- width: 1rem;
82
- height: 1rem;
78
+ /* The default arrow: a chevron of two borders, as thick as the icon stroke. */
79
+ void-carousel-previous:empty::before,
80
+ void-carousel-next:empty::before {
81
+ content: "";
82
+ width: var(--_void-carousel-glyph);
83
+ height: var(--_void-carousel-glyph);
84
+ border-style: solid;
85
+ border-color: currentColor;
86
+ border-width: 0;
87
+ border-inline-start-width: calc(var(--void-icon-stroke-width) * 1px);
88
+ border-block-end-width: calc(var(--void-icon-stroke-width) * 1px);
83
89
  }
84
90
 
85
- .void-carousel-prev:hover:not(:disabled),
86
- .void-carousel-next:hover:not(:disabled) {
91
+ void-carousel-previous:empty::before {
92
+ transform: translateX(25%) rotate(45deg);
93
+ }
94
+
95
+ void-carousel-next:empty::before {
96
+ transform: translateX(-25%) rotate(225deg);
97
+ }
98
+
99
+ void-carousel-previous:hover:not([aria-disabled="true"]),
100
+ void-carousel-next:hover:not([aria-disabled="true"]) {
87
101
  background: var(--void-color-bg-hover);
88
102
  border-color: var(--void-color-border-strong);
89
103
  }
90
104
 
91
- .void-carousel-prev:focus-visible,
92
- .void-carousel-next:focus-visible {
93
- outline: 2px solid var(--void-color-accent);
94
- outline-offset: 2px;
105
+ void-carousel-previous:focus-visible,
106
+ void-carousel-next:focus-visible {
107
+ outline: var(--void-focus-ring-width) solid var(--void-focus-ring-color);
108
+ outline-offset: var(--void-focus-ring-offset);
95
109
  }
96
110
 
97
- .void-carousel-prev:disabled,
98
- .void-carousel-next:disabled {
111
+ void-carousel-previous[aria-disabled="true"],
112
+ void-carousel-next[aria-disabled="true"] {
99
113
  opacity: 0.4;
100
114
  cursor: not-allowed;
101
115
  }
102
116
 
103
117
  /* ── Vertical orientation controls ── */
104
118
 
105
- void-carousel[orientation="vertical"] .void-carousel-prev,
106
- void-carousel[orientation="vertical"] .void-carousel-next {
119
+ void-carousel[orientation="vertical"] void-carousel-previous,
120
+ void-carousel[orientation="vertical"] void-carousel-next {
107
121
  position: static;
108
122
  transform: none;
109
123
  align-self: center;
110
124
  }
111
125
 
112
- void-carousel[orientation="vertical"] .void-carousel-prev {
126
+ void-carousel[orientation="vertical"] void-carousel-previous {
113
127
  order: -2;
114
128
  }
115
129
 
116
- void-carousel[orientation="vertical"] .void-carousel-next {
130
+ void-carousel[orientation="vertical"] void-carousel-next {
117
131
  order: 1;
118
132
  }
119
133
 
120
- void-carousel[orientation="vertical"] .void-carousel-prev svg {
121
- transform: rotate(90deg);
134
+ void-carousel[orientation="vertical"] void-carousel-previous:empty::before {
135
+ transform: translateY(25%) rotate(135deg);
122
136
  }
123
137
 
124
- void-carousel[orientation="vertical"] .void-carousel-next svg {
125
- transform: rotate(90deg);
138
+ void-carousel[orientation="vertical"] void-carousel-next:empty::before {
139
+ transform: translateY(-25%) rotate(315deg);
126
140
  }
127
141
 
128
- void-carousel[orientation="vertical"] .void-carousel-indicators {
142
+ void-carousel[orientation="vertical"] void-carousel-indicators {
129
143
  position: absolute;
130
- right: var(--void-space-2);
131
- top: 50%;
144
+ inset-inline-end: var(--void-space-2);
145
+ inset-block-start: 50%;
132
146
  transform: translateY(-50%);
133
147
  flex-direction: column;
134
148
  padding: var(--void-space-3);
135
149
  z-index: 1;
136
150
  }
137
151
 
138
- /* ── Dot indicators ── */
152
+ /* ── Dot indicators: the part holds one generated button per slide ── */
139
153
 
140
- .void-carousel-indicators {
154
+ void-carousel-indicators {
141
155
  display: flex;
142
156
  align-items: center;
143
157
  justify-content: center;
144
158
  gap: var(--void-space-2);
145
159
  padding: var(--void-space-3) 0;
160
+ /* The dots are made after upgrade; the empty part already holds their height. */
161
+ min-height: var(--_void-carousel-dot);
146
162
  }
147
163
 
148
- .void-carousel-dot {
164
+ void-carousel-indicators > button {
149
165
  appearance: none;
166
+ width: var(--_void-carousel-dot);
167
+ height: var(--_void-carousel-dot);
150
168
  border: none;
151
169
  background: var(--void-color-border);
152
170
  border-radius: var(--void-radius-full);
@@ -156,81 +174,30 @@ void-carousel[orientation="vertical"] .void-carousel-indicators {
156
174
  transform var(--void-duration-fast) var(--void-ease-in-out);
157
175
  }
158
176
 
159
- .void-carousel-dot:hover {
177
+ void-carousel-indicators > button:hover {
160
178
  background: var(--void-color-text-secondary);
161
179
  }
162
180
 
163
- .void-carousel-dot:focus-visible {
164
- outline: 2px solid var(--void-color-accent);
165
- outline-offset: 2px;
181
+ void-carousel-indicators > button:focus-visible {
182
+ outline: var(--void-focus-ring-width) solid var(--void-focus-ring-color);
183
+ outline-offset: var(--void-focus-ring-offset);
166
184
  }
167
185
 
168
- .void-carousel-dot[aria-selected="true"] {
186
+ void-carousel-indicators > button[aria-selected="true"] {
169
187
  background: var(--void-color-accent);
170
- }
171
-
172
- /* ── Sizes ── */
173
-
174
- /* sm */
175
- void-carousel[size="sm"] .void-carousel-prev,
176
- void-carousel[size="sm"] .void-carousel-next {
177
- width: 1.5rem;
178
- height: 1.5rem;
179
- }
180
-
181
- void-carousel[size="sm"] .void-carousel-prev svg,
182
- void-carousel[size="sm"] .void-carousel-next svg {
183
- width: 0.75rem;
184
- height: 0.75rem;
185
- }
186
-
187
- void-carousel[size="sm"] .void-carousel-dot {
188
- width: 0.375rem;
189
- height: 0.375rem;
190
- }
191
-
192
- void-carousel[size="sm"] .void-carousel-dot[aria-selected="true"] {
193
188
  transform: scale(1.25);
194
189
  }
195
190
 
196
- /* md (default) */
197
- void-carousel[size="md"] .void-carousel-prev,
198
- void-carousel[size="md"] .void-carousel-next,
199
- void-carousel:not([size]) .void-carousel-prev,
200
- void-carousel:not([size]) .void-carousel-next {
201
- width: 2rem;
202
- height: 2rem;
203
- }
204
-
205
- void-carousel[size="md"] .void-carousel-dot,
206
- void-carousel:not([size]) .void-carousel-dot {
207
- width: 0.5rem;
208
- height: 0.5rem;
209
- }
210
-
211
- void-carousel[size="md"] .void-carousel-dot[aria-selected="true"],
212
- void-carousel:not([size]) .void-carousel-dot[aria-selected="true"] {
213
- transform: scale(1.25);
214
- }
215
-
216
- /* lg */
217
- void-carousel[size="lg"] .void-carousel-prev,
218
- void-carousel[size="lg"] .void-carousel-next {
219
- width: 2.5rem;
220
- height: 2.5rem;
221
- }
222
-
223
- void-carousel[size="lg"] .void-carousel-prev svg,
224
- void-carousel[size="lg"] .void-carousel-next svg {
225
- width: 1.25rem;
226
- height: 1.25rem;
227
- }
191
+ /* ── Sizes ── */
228
192
 
229
- void-carousel[size="lg"] .void-carousel-dot {
230
- width: 0.625rem;
231
- height: 0.625rem;
193
+ void-carousel[size="sm"] {
194
+ --_void-carousel-control: 1.5rem;
195
+ --_void-carousel-glyph: 0.3rem;
196
+ --_void-carousel-dot: 0.375rem;
232
197
  }
233
198
 
234
- void-carousel[size="lg"] .void-carousel-dot[aria-selected="true"] {
235
- transform: scale(1.25);
199
+ void-carousel[size="lg"] {
200
+ --_void-carousel-control: 2.5rem;
201
+ --_void-carousel-glyph: 0.5rem;
202
+ --_void-carousel-dot: 0.625rem;
236
203
  }
@@ -6,7 +6,8 @@ void-checkbox-group {
6
6
  }
7
7
 
8
8
  .void-checkbox-group-label {
9
- font-size: var(--void-text-sm);
9
+ font-size: var(--void-control-text-sm);
10
+ line-height: var(--void-leading-normal);
10
11
  font-weight: var(--void-weight-medium);
11
12
  color: var(--void-color-text);
12
13
  margin-bottom: var(--void-space-1);
@@ -24,4 +25,5 @@ void-checkbox-group[orientation="vertical"] .void-checkbox-group-items {
24
25
  void-checkbox-group[orientation="horizontal"] .void-checkbox-group-items {
25
26
  flex-direction: row;
26
27
  flex-wrap: wrap;
28
+ gap: var(--void-space-2) var(--void-space-5);
27
29
  }
@@ -1,12 +1,12 @@
1
1
  void-checkbox {
2
- --tone: var(--void-color-accent);
2
+ --_void-tone: var(--void-color-accent);
3
3
 
4
4
  display: inline-flex;
5
5
  align-items: center;
6
6
  gap: var(--void-space-2);
7
7
  cursor: pointer;
8
8
  font-family: var(--void-font-sans);
9
- font-size: var(--void-text-sm);
9
+ font-size: var(--void-control-text);
10
10
  color: var(--void-color-text);
11
11
  user-select: none;
12
12
  }
@@ -26,8 +26,8 @@ void-checkbox input[type="checkbox"] {
26
26
  flex-shrink: 0;
27
27
  width: 1.125rem;
28
28
  height: 1.125rem;
29
- border: 1.5px solid var(--void-color-border-strong);
30
- border-radius: var(--void-radius-sm);
29
+ border: 1.5px solid var(--void-control-border);
30
+ border-radius: var(--void-radius-xs);
31
31
  background: transparent;
32
32
  color: var(--void-color-text-on-accent);
33
33
  transition: background var(--void-duration-fast) var(--void-ease-in-out),
@@ -40,30 +40,31 @@ void-checkbox input[type="checkbox"] {
40
40
  }
41
41
 
42
42
  void-checkbox:hover .void-checkbox-box {
43
- border-color: var(--tone);
43
+ border-color: var(--_void-tone);
44
44
  }
45
45
 
46
46
  void-checkbox:focus-visible .void-checkbox-box {
47
- outline: 2px solid var(--void-color-border-focus);
48
- outline-offset: 2px;
47
+ outline: var(--void-focus-ring-width) solid var(--void-focus-ring-color);
48
+ outline-offset: var(--void-focus-ring-offset);
49
49
  }
50
50
 
51
51
  void-checkbox[checked] .void-checkbox-box {
52
- background: var(--tone);
53
- border-color: var(--tone);
52
+ background: var(--_void-tone);
53
+ border-color: var(--_void-tone);
54
54
  }
55
55
 
56
56
  void-checkbox[indeterminate] .void-checkbox-box {
57
- background: var(--tone);
58
- border-color: var(--tone);
57
+ background: var(--_void-tone);
58
+ border-color: var(--_void-tone);
59
59
  }
60
60
 
61
- void-checkbox[color="error"] { --tone: var(--void-color-error); }
62
- void-checkbox[color="warning"] { --tone: var(--void-color-warning); }
63
- void-checkbox[color="caution"] { --tone: var(--void-color-caution); }
64
- void-checkbox[color="success"] { --tone: var(--void-color-success); }
65
- void-checkbox[color="info"] { --tone: var(--void-color-info); }
66
- void-checkbox[color="notice"] { --tone: var(--void-color-notice); }
61
+ void-checkbox[color="error"] { --_void-tone: var(--void-color-error); }
62
+ void-checkbox[color="warning"] { --_void-tone: var(--void-color-warning); }
63
+ void-checkbox[color="caution"] { --_void-tone: var(--void-color-caution); }
64
+ void-checkbox[color="highlight"] { --_void-tone: var(--void-color-highlight); }
65
+ void-checkbox[color="success"] { --_void-tone: var(--void-color-success); }
66
+ void-checkbox[color="info"] { --_void-tone: var(--void-color-info); }
67
+ void-checkbox[color="notice"] { --_void-tone: var(--void-color-notice); }
67
68
 
68
69
  void-checkbox[size="sm"] { font-size: var(--void-text-xs); }
69
70
  void-checkbox[size="sm"] .void-checkbox-box { width: 0.875rem; height: 0.875rem; }
@@ -71,12 +72,6 @@ void-checkbox[size="sm"] .void-checkbox-box svg { width: 0.625rem; height: 0.625
71
72
  void-checkbox[size="lg"] { font-size: var(--void-text-base); }
72
73
  void-checkbox[size="lg"] .void-checkbox-box { width: 1.375rem; height: 1.375rem; }
73
74
  void-checkbox[size="lg"] .void-checkbox-box svg { width: 1rem; height: 1rem; }
74
- void-checkbox[size="xl"] { font-size: var(--void-text-lg); }
75
- void-checkbox[size="xl"] .void-checkbox-box { width: 1.625rem; height: 1.625rem; }
76
- void-checkbox[size="xl"] .void-checkbox-box svg { width: 1.125rem; height: 1.125rem; }
77
- void-checkbox[size="xxl"] { font-size: var(--void-text-xl); }
78
- void-checkbox[size="xxl"] .void-checkbox-box { width: 1.875rem; height: 1.875rem; }
79
- void-checkbox[size="xxl"] .void-checkbox-box svg { width: 1.25rem; height: 1.25rem; }
80
75
 
81
76
  void-checkbox[disabled] {
82
77
  opacity: 0.5;
@@ -1,15 +1,29 @@
1
+ /* The host is a two-row grid, the trigger and then the content, and the
2
+ content row is 0fr closed and 1fr open: the row animates between them, so
3
+ content of any height opens and closes smoothly with no script measuring it
4
+ (animating grid rows is baseline widely available; where it is not, the
5
+ content just appears and disappears). */
1
6
  void-collapsible {
2
- display: block;
7
+ display: grid;
8
+ grid-template-rows: auto 0fr;
9
+ }
10
+
11
+ void-collapsible[open] {
12
+ grid-template-rows: auto 1fr;
3
13
  }
4
14
 
5
- .void-collapsible-trigger {
15
+ /* The trigger part is the button (role="button", a tab stop, written by the
16
+ collapsible); the chevron is drawn here, so it shows before the script loads. */
17
+ void-collapsible-trigger {
6
18
  display: flex;
7
19
  align-items: center;
8
20
  justify-content: space-between;
21
+ gap: var(--void-space-2);
22
+ box-sizing: border-box;
9
23
  width: 100%;
10
24
  padding: var(--void-space-3) var(--void-space-4);
11
- border: 1px solid var(--void-color-border);
12
- border-radius: var(--void-radius-md);
25
+ border: var(--void-rule-frame);
26
+ border-radius: var(--void-control-radius);
13
27
  background: transparent;
14
28
  color: var(--void-color-text);
15
29
  font-family: var(--void-font-sans);
@@ -17,49 +31,101 @@ void-collapsible {
17
31
  font-weight: var(--void-weight-medium);
18
32
  text-align: left;
19
33
  cursor: pointer;
34
+ user-select: none;
35
+ outline: none;
20
36
  transition: background var(--void-duration-fast) var(--void-ease-in-out);
21
37
  }
22
38
 
23
- .void-collapsible-trigger:hover {
24
- background: var(--void-color-bg-hover);
39
+ void-collapsible-trigger::after {
40
+ content: '';
41
+ width: 1rem;
42
+ height: 1rem;
43
+ flex-shrink: 0;
44
+ background: var(--void-color-text-secondary);
45
+ /* token-ok: the chevron's shape; its colour is the background token above */
46
+ mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M4 6l4 4 4-4' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
47
+ transition: transform var(--void-duration-fast) var(--void-ease-in-out);
25
48
  }
26
49
 
27
- .void-collapsible-trigger:focus-visible {
28
- outline: 2px solid var(--void-color-border-focus);
29
- outline-offset: -2px;
50
+ void-collapsible-trigger:hover {
51
+ background: var(--void-color-bg-hover);
30
52
  }
31
53
 
32
- .void-collapsible-chevron {
33
- width: 1rem; /* token-ok: intrinsic chevron icon size */
34
- height: 1rem; /* token-ok: intrinsic chevron icon size */
35
- flex-shrink: 0;
36
- color: var(--void-color-text-secondary);
37
- transition: transform var(--void-duration-fast) var(--void-ease-in-out);
54
+ void-collapsible-trigger:focus-visible {
55
+ outline: var(--void-focus-ring-width) solid var(--void-focus-ring-color);
56
+ outline-offset: calc(-1 * var(--void-focus-ring-width));
38
57
  }
39
58
 
40
- void-collapsible[open] .void-collapsible-chevron {
59
+ void-collapsible[open] > void-collapsible-trigger::after {
41
60
  transform: rotate(180deg);
42
61
  }
43
62
 
44
- .void-collapsible-content {
45
- display: grid;
46
- grid-template-rows: 0fr;
47
- transition: grid-template-rows var(--void-duration-normal) var(--void-ease-in-out);
63
+ void-collapsible-trigger {
64
+ grid-row: 1;
48
65
  }
49
66
 
50
- .void-collapsible-inner {
67
+ /* The content is the second row. Closed, its box is empty (no block padding,
68
+ which would keep the row open) and it is visibility:hidden, so it is out of
69
+ the accessibility tree, the tab order and find-in-page, all from the host's
70
+ own attribute and before any script loads. The visibility change waits for
71
+ the closing animation to finish and happens at once on opening. The
72
+ collapsible then also marks closed content hidden="until-found" (see
73
+ collapsible.ts), which keeps it hidden from assistive technology and lets
74
+ find-in-page open it where the browser supports that. */
75
+ void-collapsible-content {
76
+ grid-row: 2;
77
+ display: block;
78
+ min-height: 0;
51
79
  overflow: hidden;
80
+ padding: 0 var(--void-space-4);
81
+ visibility: hidden;
82
+ color: var(--void-color-text);
83
+ font-family: var(--void-font-sans);
84
+ font-size: var(--void-type-body-size);
52
85
  }
53
86
 
54
- void-collapsible[open] .void-collapsible-content {
55
- grid-template-rows: 1fr;
87
+ void-collapsible[open] > void-collapsible-content {
88
+ padding-block: var(--void-space-3) var(--void-space-4);
89
+ visibility: visible;
56
90
  }
57
91
 
58
- void-collapsible[open] .void-collapsible-inner {
59
- padding: var(--void-space-3) var(--void-space-4) var(--void-space-4);
60
- color: var(--void-color-text);
61
- font-family: var(--void-font-sans);
62
- font-size: var(--void-text-sm);
92
+ /* hidden="until-found" hides through content-visibility; find-in-page only
93
+ searches it when it is not also visibility:hidden. */
94
+ void-collapsible-content[hidden="until-found"] {
95
+ visibility: visible;
96
+ }
97
+
98
+ /* Only once the element is defined: a page whose stylesheet arrives after the
99
+ first paint must not animate its open items into place. The visibility
100
+ change waits for the closing animation and happens at once on opening. */
101
+ void-collapsible:defined {
102
+ transition: grid-template-rows var(--void-duration-normal) var(--void-ease-in-out);
103
+ }
104
+
105
+ void-collapsible:defined > void-collapsible-content {
106
+ transition: padding-block var(--void-duration-normal) var(--void-ease-in-out),
107
+ visibility 0s linear var(--void-duration-normal);
108
+ }
109
+
110
+ void-collapsible[open]:defined > void-collapsible-content {
111
+ transition: padding-block var(--void-duration-normal) var(--void-ease-in-out),
112
+ visibility 0s linear 0s;
113
+ }
114
+
115
+ /* The until-found mark is put on once the content has closed; taking the delay
116
+ off here keeps visibility from lagging behind an opening that follows it. */
117
+ void-collapsible:defined > void-collapsible-content[hidden="until-found"] {
118
+ transition: padding-block var(--void-duration-normal) var(--void-ease-in-out),
119
+ visibility 0s linear 0s;
120
+ }
121
+
122
+ @media (prefers-reduced-motion: reduce) {
123
+ void-collapsible:defined,
124
+ void-collapsible:defined > void-collapsible-content,
125
+ void-collapsible:defined > void-collapsible-content[hidden="until-found"],
126
+ void-collapsible[open]:defined > void-collapsible-content {
127
+ transition: none;
128
+ }
63
129
  }
64
130
 
65
131
  /* Disabled state */
@@ -67,7 +133,7 @@ void-collapsible[disabled] {
67
133
  opacity: 0.5;
68
134
  }
69
135
 
70
- void-collapsible[disabled] .void-collapsible-trigger {
136
+ void-collapsible[disabled] > void-collapsible-trigger {
71
137
  pointer-events: none;
72
138
  cursor: default;
73
139
  }
@@ -86,15 +86,15 @@ void-color-picker {
86
86
  align-items: center;
87
87
  gap: var(--void-space-2);
88
88
  padding: var(--void-space-2);
89
- background: var(--void-color-bg-secondary);
90
- border: 1px solid var(--void-color-border);
89
+ background: var(--void-color-surface);
90
+ border: 1px solid var(--void-color-border-control);
91
91
  border-radius: var(--void-radius-md);
92
92
  transition: border-color var(--void-duration-fast) var(--void-ease-in-out),
93
93
  box-shadow var(--void-duration-fast) var(--void-ease-in-out);
94
94
  }
95
95
 
96
96
  .void-color-picker-field:hover {
97
- border-color: var(--void-color-border-strong);
97
+ border-color: var(--void-color-border-control);
98
98
  }
99
99
 
100
100
  .void-color-picker-field:focus-within {
@@ -186,15 +186,15 @@ void-color-picker {
186
186
  align-items: center;
187
187
  gap: var(--void-space-2);
188
188
  padding: var(--void-space-2) var(--void-space-3);
189
- background: var(--void-color-bg-secondary);
190
- border: 1px solid var(--void-color-border);
189
+ background: var(--void-color-surface);
190
+ border: 1px solid var(--void-color-border-control);
191
191
  border-radius: var(--void-radius-md);
192
192
  cursor: pointer;
193
193
  transition: border-color var(--void-duration-fast) var(--void-ease-in-out);
194
194
  }
195
195
 
196
196
  .void-color-picker-compact-trigger:hover {
197
- border-color: var(--void-color-border-strong);
197
+ border-color: var(--void-color-border-control);
198
198
  }
199
199
 
200
200
  .void-color-picker-compact-trigger:focus-within {
@@ -237,11 +237,11 @@ void-color-picker {
237
237
  top: calc(100% + var(--void-space-2));
238
238
  left: 0;
239
239
  z-index: var(--void-z-dropdown);
240
- background: var(--void-color-bg-elevated);
241
- border: 1px solid var(--void-color-border);
242
- border-radius: var(--void-radius-lg);
240
+ background: var(--void-float-surface);
241
+ border: var(--void-float-border-width) solid var(--void-float-border);
242
+ border-radius: var(--void-float-radius);
243
243
  padding: var(--void-space-3);
244
- box-shadow: var(--void-shadow-lg, 0 4px 12px var(--void-color-bg-overlay));
244
+ box-shadow: var(--void-shadow-lg);
245
245
  }
246
246
 
247
247
  /* ── Size variants ── */