@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
@@ -4,17 +4,21 @@
4
4
 
5
5
  void-number-input {
6
6
  /* Tone system */
7
- --tone: var(--void-color-accent);
8
- --tone-subtle: color-mix(in srgb, var(--tone) 14%, transparent);
9
- --tone-border: color-mix(in srgb, var(--tone) 36%, transparent);
10
- --tone-hover: color-mix(in srgb, var(--tone) 22%, transparent);
7
+ --_void-tone: var(--void-color-accent);
8
+ --_void-tone-subtle: color-mix(in srgb, var(--_void-tone) 14%, transparent);
9
+ --_void-tone-border: color-mix(in srgb, var(--_void-tone) 36%, transparent);
10
+ --_void-tone-hover: color-mix(in srgb, var(--_void-tone) 22%, transparent);
11
+ --_void-field-height: var(--void-control-height);
12
+ --_void-field-padding: var(--void-control-padding);
13
+ --_void-field-text: var(--void-control-text);
11
14
 
12
15
  display: inline-flex;
13
16
  align-items: stretch;
14
17
  font-family: var(--void-font-sans);
15
- border: 1px solid var(--void-color-border);
16
- border-radius: var(--void-radius-md);
17
- background: var(--void-color-bg-secondary);
18
+ border: var(--void-control-border-width) solid var(--void-field-border);
19
+ border-radius: var(--void-control-radius);
20
+ background: var(--void-field-surface);
21
+ min-height: var(--_void-field-height);
18
22
  overflow: hidden;
19
23
  transition: border-color var(--void-duration-fast) var(--void-ease-in-out),
20
24
  box-shadow var(--void-duration-fast) var(--void-ease-in-out);
@@ -26,19 +30,20 @@ void-number-input:focus-within {
26
30
  }
27
31
 
28
32
  void-number-input:hover:not(:focus-within) {
29
- border-color: var(--void-color-border-strong);
33
+ border-color: var(--void-field-border);
30
34
  }
31
35
 
32
36
  /* The native input inside */
33
37
  void-number-input input.void-number-input-field {
34
38
  flex: 1;
35
39
  min-width: 0;
36
- padding: var(--void-space-2) var(--void-space-3);
40
+ padding: 0 var(--_void-field-padding);
37
41
  background: transparent;
38
42
  border: none;
39
43
  color: var(--void-color-text);
40
44
  font-family: inherit;
41
- font-size: var(--void-text-sm);
45
+ font-size: var(--_void-field-text);
46
+ font-variant-numeric: tabular-nums;
42
47
  line-height: var(--void-leading-normal);
43
48
  outline: none;
44
49
  text-align: center;
@@ -56,7 +61,7 @@ void-number-input input.void-number-input-field::placeholder {
56
61
  align-items: center;
57
62
  color: var(--void-color-text-muted);
58
63
  font-family: inherit;
59
- font-size: var(--void-text-sm);
64
+ font-size: var(--_void-field-text);
60
65
  user-select: none;
61
66
  pointer-events: none;
62
67
  white-space: nowrap;
@@ -64,11 +69,11 @@ void-number-input input.void-number-input-field::placeholder {
64
69
  }
65
70
 
66
71
  .void-number-input-prefix {
67
- padding-left: var(--void-space-3);
72
+ padding-left: var(--_void-field-padding);
68
73
  }
69
74
 
70
75
  .void-number-input-unit {
71
- padding-right: var(--void-space-3);
76
+ padding-right: var(--_void-field-padding);
72
77
  }
73
78
 
74
79
  /* When a prefix is present, the input doesn't need its own left padding */
@@ -86,7 +91,7 @@ void-number-input:has(.void-number-input-unit) input.void-number-input-field {
86
91
  display: inline-flex;
87
92
  align-items: center;
88
93
  justify-content: center;
89
- padding: 0 var(--void-space-3);
94
+ padding: 0 var(--_void-field-padding);
90
95
  background: transparent;
91
96
  border: none;
92
97
  color: var(--void-color-text-secondary);
@@ -99,13 +104,13 @@ void-number-input:has(.void-number-input-unit) input.void-number-input-field {
99
104
  }
100
105
 
101
106
  .void-number-input-btn:hover:not(:disabled) {
102
- background: var(--tone-hover);
107
+ background: var(--_void-tone-hover);
103
108
  color: var(--void-color-text);
104
109
  }
105
110
 
106
111
  .void-number-input-btn:focus-visible {
107
- outline: 2px solid var(--void-color-border-focus);
108
- outline-offset: -2px;
112
+ outline: var(--void-focus-ring-width) solid var(--void-focus-ring-color);
113
+ outline-offset: calc(-1 * var(--void-focus-ring-width));
109
114
  }
110
115
 
111
116
  .void-number-input-btn:disabled {
@@ -113,30 +118,31 @@ void-number-input:has(.void-number-input-unit) input.void-number-input-field {
113
118
  cursor: not-allowed;
114
119
  }
115
120
 
116
- /* Separator lines between btn and input */
121
+ /* Separator lines between btn and input: the rule between items of one
122
+ group, so a skin that draws its rules in ink draws these too. */
117
123
  .void-number-input-btn-dec {
118
- border-right: 1px solid var(--void-color-border);
124
+ border-right: var(--void-rule-between);
119
125
  }
120
126
 
121
127
  .void-number-input-btn-inc {
122
- border-left: 1px solid var(--void-color-border);
128
+ border-left: var(--void-rule-between);
123
129
  }
124
130
 
125
131
  /* controls="right" — both buttons stacked vertically on the right */
126
132
  void-number-input[controls="right"] .void-number-input-btn-group {
127
133
  display: flex;
128
134
  flex-direction: column;
129
- border-left: 1px solid var(--void-color-border);
135
+ border-left: var(--void-rule-between);
130
136
  }
131
137
 
132
138
  void-number-input[controls="right"] .void-number-input-btn {
133
139
  flex: 1;
134
- padding: 0 var(--void-space-2);
140
+ padding: 0 var(--void-control-padding-sm);
135
141
  border: none;
136
142
  }
137
143
 
138
144
  void-number-input[controls="right"] .void-number-input-btn-inc {
139
- border-bottom: 1px solid var(--void-color-border);
145
+ border-bottom: var(--void-rule-between);
140
146
  }
141
147
 
142
148
  /* controls="none" — just the input, no separators */
@@ -145,75 +151,42 @@ void-number-input[controls="none"] input.void-number-input-field {
145
151
  }
146
152
 
147
153
  /* Color variants */
148
- void-number-input[color="error"] { --tone: var(--void-color-error); }
149
- void-number-input[color="warning"] { --tone: var(--void-color-warning); }
150
- void-number-input[color="caution"] { --tone: var(--void-color-caution); }
151
- void-number-input[color="success"] { --tone: var(--void-color-success); }
152
- void-number-input[color="info"] { --tone: var(--void-color-info); }
153
- void-number-input[color="notice"] { --tone: var(--void-color-notice); }
154
+ void-number-input[color="error"] { --_void-tone: var(--void-color-error); }
155
+ void-number-input[color="warning"] { --_void-tone: var(--void-color-warning); }
156
+ void-number-input[color="caution"] { --_void-tone: var(--void-color-caution); }
157
+ void-number-input[color="highlight"] { --_void-tone: var(--void-color-highlight); }
158
+ void-number-input[color="success"] { --_void-tone: var(--void-color-success); }
159
+ void-number-input[color="info"] { --_void-tone: var(--void-color-info); }
160
+ void-number-input[color="notice"] { --_void-tone: var(--void-color-notice); }
154
161
 
155
- void-number-input:where([color="error"], [color="warning"], [color="caution"], [color="success"], [color="info"], [color="notice"]) {
156
- border-color: var(--tone-border);
157
- background: var(--tone-subtle);
162
+ void-number-input:where([color="error"], [color="warning"], [color="caution"], [color="highlight"], [color="success"], [color="info"], [color="notice"]) {
163
+ border-color: var(--_void-tone-border);
164
+ background: var(--_void-tone-subtle);
158
165
  }
159
166
 
160
- void-number-input:where([color="error"], [color="warning"], [color="caution"], [color="success"], [color="info"], [color="notice"]) .void-number-input-btn {
161
- color: var(--tone);
167
+ void-number-input:where([color="error"], [color="warning"], [color="caution"], [color="highlight"], [color="success"], [color="info"], [color="notice"]) .void-number-input-btn {
168
+ color: var(--_void-tone);
162
169
  }
163
170
 
164
- void-number-input:where([color="error"], [color="warning"], [color="caution"], [color="success"], [color="info"], [color="notice"]) .void-number-input-btn-dec {
165
- border-right-color: var(--tone-border);
171
+ void-number-input:where([color="error"], [color="warning"], [color="caution"], [color="highlight"], [color="success"], [color="info"], [color="notice"]) .void-number-input-btn-dec {
172
+ border-right-color: var(--_void-tone-border);
166
173
  }
167
174
 
168
- void-number-input:where([color="error"], [color="warning"], [color="caution"], [color="success"], [color="info"], [color="notice"]) .void-number-input-btn-inc {
169
- border-left-color: var(--tone-border);
175
+ void-number-input:where([color="error"], [color="warning"], [color="caution"], [color="highlight"], [color="success"], [color="info"], [color="notice"]) .void-number-input-btn-inc {
176
+ border-left-color: var(--_void-tone-border);
170
177
  }
171
178
 
172
- void-number-input:where([color="error"], [color="warning"], [color="caution"], [color="success"], [color="info"], [color="notice"]):where([controls="right"]) .void-number-input-btn-group {
173
- border-left-color: var(--tone-border);
179
+ void-number-input:where([color="error"], [color="warning"], [color="caution"], [color="highlight"], [color="success"], [color="info"], [color="notice"]):where([controls="right"]) .void-number-input-btn-group {
180
+ border-left-color: var(--_void-tone-border);
174
181
  }
175
182
 
176
- void-number-input:where([color="error"], [color="warning"], [color="caution"], [color="success"], [color="info"], [color="notice"]):where([controls="right"]) .void-number-input-btn-inc {
177
- border-bottom-color: var(--tone-border);
183
+ void-number-input:where([color="error"], [color="warning"], [color="caution"], [color="highlight"], [color="success"], [color="info"], [color="notice"]):where([controls="right"]) .void-number-input-btn-inc {
184
+ border-bottom-color: var(--_void-tone-border);
178
185
  }
179
186
 
180
- void-number-input:where([color="error"], [color="warning"], [color="caution"], [color="success"], [color="info"], [color="notice"]):focus-within {
181
- border-color: var(--tone);
182
- box-shadow: 0 0 0 1px var(--tone);
183
- }
184
-
185
- /* Size variants */
186
- void-number-input[size="sm"] input.void-number-input-field {
187
- padding: var(--void-space-1) var(--void-space-2);
188
- font-size: var(--void-text-xs);
189
- }
190
-
191
- void-number-input[size="sm"] .void-number-input-btn {
192
- padding: 0 var(--void-space-2);
193
- font-size: var(--void-text-xs);
194
- }
195
-
196
- void-number-input[size="lg"] input.void-number-input-field {
197
- padding: var(--void-space-3) var(--void-space-4);
198
- font-size: var(--void-text-base);
199
- }
200
-
201
- void-number-input[size="lg"] .void-number-input-btn {
202
- padding: 0 var(--void-space-4);
203
- }
204
-
205
- void-number-input[size="sm"] .void-number-input-prefix,
206
- void-number-input[size="sm"] .void-number-input-unit {
207
- font-size: var(--void-text-xs);
208
- padding-left: var(--void-space-2);
209
- padding-right: var(--void-space-2);
210
- }
211
-
212
- void-number-input[size="lg"] .void-number-input-prefix,
213
- void-number-input[size="lg"] .void-number-input-unit {
214
- font-size: var(--void-text-base);
215
- padding-left: var(--void-space-4);
216
- padding-right: var(--void-space-4);
187
+ void-number-input:where([color="error"], [color="warning"], [color="caution"], [color="highlight"], [color="success"], [color="info"], [color="notice"]):focus-within {
188
+ border-color: var(--_void-tone);
189
+ box-shadow: 0 0 0 1px var(--_void-tone);
217
190
  }
218
191
 
219
192
  /* Disabled state */
@@ -231,3 +204,7 @@ void-number-input[disabled] input.void-number-input-field {
231
204
  void-number-input[readonly] input.void-number-input-field {
232
205
  cursor: default;
233
206
  }
207
+
208
+ /* Size variants: each step sets the field tokens and nothing else */
209
+ void-number-input[size="sm"] { --_void-field-height: var(--void-control-height-sm); --_void-field-padding: var(--void-control-padding-sm); --_void-field-text: var(--void-control-text-sm); }
210
+ void-number-input[size="lg"] { --_void-field-height: var(--void-control-height-lg); --_void-field-padding: var(--void-control-padding-lg); --_void-field-text: var(--void-control-text-lg); }
@@ -0,0 +1,215 @@
1
+ /* ============================================================
2
+ Overlays — shared rules for every surface Void UI shows in the
3
+ top layer.
4
+
5
+ Modal surfaces (dialog, drawer) are native <dialog> elements
6
+ opened with showModal(); non-modal surfaces (popover, dropdown
7
+ menu, hover card, tooltip, select-like panels, date-picker popup)
8
+ are popover="manual" elements. The component sets on each anchored
9
+ surface:
10
+
11
+ data-void-side / data-void-align requested placement
12
+ data-void-position="anchor" placed by CSS anchor positioning
13
+ (the component links the anchor
14
+ with anchor-name/position-anchor)
15
+ data-void-position="fixed" placed by the component's
16
+ JavaScript positioner, which
17
+ writes --void-overlay-x/-y
18
+ (browsers without anchor
19
+ positioning, and edge cases the
20
+ CSS fallbacks cannot fit)
21
+
22
+ --void-overlay-gap is the distance from the anchor; the JavaScript
23
+ positioner reads it, so it is registered as a <length>.
24
+ ============================================================ */
25
+
26
+ @property --void-overlay-gap {
27
+ syntax: '<length>';
28
+ inherits: true;
29
+ initial-value: 0px; /* token-ok: registration default, overridden below */
30
+ }
31
+
32
+ /* The UA box of [popover] is centred with a border and padding; the
33
+ component CSS styles the surface itself. */
34
+ void-popover-content,
35
+ void-dropdown-menu-content,
36
+ void-hover-card-content,
37
+ void-tooltip-content,
38
+ void-combobox-content,
39
+ void-multiselect-content,
40
+ .void-date-picker-dropdown {
41
+ --void-overlay-gap: var(--void-space-2);
42
+ position: fixed;
43
+ inset: auto;
44
+ margin: 0;
45
+ box-sizing: border-box;
46
+ max-inline-size: calc(100vw - 2 * var(--void-overlay-gap));
47
+ /* Below any top-layer element when the Popover API is missing. */
48
+ z-index: var(--void-z-dropdown);
49
+ }
50
+
51
+ /* ── CSS anchor positioning ─────────────────────────────────── */
52
+
53
+ /* Centred placements span the whole cross axis (span-all, which centres the
54
+ surface on its anchor): with `center` the area is only as wide as the
55
+ anchor, so a surface wider than a small trigger overflows it in every
56
+ fallback, no fallback fits and the surface stays on its full side, over
57
+ its trigger (a tooltip at the top edge, a hover card at the bottom). */
58
+
59
+ [data-void-position='anchor'] {
60
+ position-try-fallbacks: flip-block, flip-inline, flip-block flip-inline;
61
+ }
62
+
63
+ [data-void-position='anchor'][data-void-side='bottom'] { margin-block-start: var(--void-overlay-gap); }
64
+ [data-void-position='anchor'][data-void-side='top'] { margin-block-end: var(--void-overlay-gap); }
65
+ [data-void-position='anchor'][data-void-side='left'] { margin-inline-end: var(--void-overlay-gap); }
66
+ [data-void-position='anchor'][data-void-side='right'] { margin-inline-start: var(--void-overlay-gap); }
67
+
68
+ [data-void-position='anchor'][data-void-side='bottom'][data-void-align='start'] { position-area: block-end span-inline-end; }
69
+ [data-void-position='anchor'][data-void-side='bottom'][data-void-align='center'] { position-area: block-end span-all; }
70
+ [data-void-position='anchor'][data-void-side='bottom'][data-void-align='end'] { position-area: block-end span-inline-start; }
71
+ [data-void-position='anchor'][data-void-side='top'][data-void-align='start'] { position-area: block-start span-inline-end; }
72
+ [data-void-position='anchor'][data-void-side='top'][data-void-align='center'] { position-area: block-start span-all; }
73
+ [data-void-position='anchor'][data-void-side='top'][data-void-align='end'] { position-area: block-start span-inline-start; }
74
+ [data-void-position='anchor'][data-void-side='left'][data-void-align='start'] { position-area: inline-start span-block-end; }
75
+ [data-void-position='anchor'][data-void-side='left'][data-void-align='center'] { position-area: inline-start span-all; }
76
+ [data-void-position='anchor'][data-void-side='left'][data-void-align='end'] { position-area: inline-start span-block-start; }
77
+ [data-void-position='anchor'][data-void-side='right'][data-void-align='start'] { position-area: inline-end span-block-end; }
78
+ [data-void-position='anchor'][data-void-side='right'][data-void-align='center'] { position-area: inline-end span-all; }
79
+ [data-void-position='anchor'][data-void-side='right'][data-void-align='end'] { position-area: inline-end span-block-start; }
80
+
81
+ /* ── JavaScript positioner (fallback) ───────────────────────── */
82
+
83
+ [data-void-position='fixed'] {
84
+ position: fixed;
85
+ inset: auto;
86
+ margin: 0;
87
+ left: var(--void-overlay-x);
88
+ top: var(--void-overlay-y);
89
+ }
90
+
91
+ /* ── Entry and exit transitions ─────────────────────────────────
92
+ Non-modal surfaces fade; transition-behavior: allow-discrete keeps
93
+ them rendered (and in the top layer, with `overlay`) until the exit
94
+ transition ends, and @starting-style gives the entry a start state.
95
+ Browsers without these simply show and hide at once. */
96
+
97
+ :is(
98
+ void-popover-content,
99
+ void-dropdown-menu-content,
100
+ void-hover-card-content,
101
+ void-tooltip-content,
102
+ void-combobox-content,
103
+ void-multiselect-content,
104
+ .void-date-picker-dropdown
105
+ ):popover-open {
106
+ opacity: 1;
107
+ }
108
+
109
+ :is(
110
+ void-popover-content,
111
+ void-dropdown-menu-content,
112
+ void-hover-card-content,
113
+ void-tooltip-content,
114
+ void-combobox-content,
115
+ void-multiselect-content,
116
+ .void-date-picker-dropdown
117
+ ) {
118
+ opacity: 0;
119
+ transition:
120
+ opacity var(--void-duration-fast) var(--void-ease-out),
121
+ display var(--void-duration-fast) allow-discrete,
122
+ overlay var(--void-duration-fast) allow-discrete;
123
+ }
124
+
125
+ /* Without the Popover API the component toggles [hidden] instead. */
126
+ :is(
127
+ void-popover-content,
128
+ void-dropdown-menu-content,
129
+ void-hover-card-content,
130
+ void-tooltip-content,
131
+ void-combobox-content,
132
+ void-multiselect-content,
133
+ .void-date-picker-dropdown
134
+ ):not([popover]):not([hidden]) {
135
+ opacity: 1;
136
+ }
137
+
138
+ @starting-style {
139
+ :is(
140
+ void-popover-content,
141
+ void-dropdown-menu-content,
142
+ void-hover-card-content,
143
+ void-tooltip-content,
144
+ void-combobox-content,
145
+ void-multiselect-content,
146
+ .void-date-picker-dropdown
147
+ ):popover-open {
148
+ opacity: 0;
149
+ }
150
+ }
151
+
152
+ /* Modal surfaces: native <dialog> in the top layer with a ::backdrop (in the
153
+ component's shadow root, so styled through ::part(surface)). */
154
+ void-dialog::part(surface),
155
+ void-drawer::part(surface) {
156
+ transition:
157
+ opacity var(--void-duration-normal) var(--void-ease-out),
158
+ translate var(--void-duration-normal) var(--void-ease-out),
159
+ scale var(--void-duration-normal) var(--void-ease-out),
160
+ display var(--void-duration-normal) allow-discrete,
161
+ overlay var(--void-duration-normal) allow-discrete;
162
+ }
163
+
164
+ void-dialog::part(surface)::backdrop,
165
+ void-drawer::part(surface)::backdrop {
166
+ background: var(--void-color-bg-overlay);
167
+ opacity: 0;
168
+ transition:
169
+ opacity var(--void-duration-normal) var(--void-ease-out),
170
+ display var(--void-duration-normal) allow-discrete,
171
+ overlay var(--void-duration-normal) allow-discrete;
172
+ }
173
+
174
+ void-dialog[open]::part(surface)::backdrop,
175
+ void-drawer[open]::part(surface)::backdrop {
176
+ opacity: 1;
177
+ }
178
+
179
+ @starting-style {
180
+ void-dialog[open]::part(surface)::backdrop,
181
+ void-drawer[open]::part(surface)::backdrop {
182
+ opacity: 0;
183
+ }
184
+ }
185
+
186
+ /* Reduced motion: durations already scale to zero (primitives); also
187
+ drop movement so nothing slides or scales in. */
188
+ @media (prefers-reduced-motion: reduce) {
189
+ void-dialog::part(surface),
190
+ void-drawer::part(surface) {
191
+ translate: none !important;
192
+ scale: none !important;
193
+ }
194
+ }
195
+
196
+ /* Forced colours: surfaces keep a visible edge and the backdrop does
197
+ not wash out the dialog. */
198
+ @media (forced-colors: active) {
199
+ void-dialog::part(surface),
200
+ void-drawer::part(surface),
201
+ void-popover-content,
202
+ void-dropdown-menu-content,
203
+ void-hover-card-content,
204
+ void-tooltip-content,
205
+ void-combobox-content,
206
+ void-multiselect-content,
207
+ .void-date-picker-dropdown {
208
+ border: 1px solid CanvasText;
209
+ }
210
+
211
+ void-dialog::part(surface)::backdrop,
212
+ void-drawer::part(surface)::backdrop {
213
+ background: transparent;
214
+ }
215
+ }
@@ -1,12 +1,28 @@
1
+ /* @tokens void-pagination
2
+ --void-pagination-size Height and least width of a page button. Applies at every size step; for a proportional change set the --void-control-* steps instead.
3
+ --void-pagination-font-size Size of the page numbers. Applies at every size step; for a proportional change set the --void-control-* steps instead. */
4
+
5
+ void-pagination {
6
+ --_void-pagination-size: var(--void-pagination-size, var(--void-control-height));
7
+ --_void-pagination-font-size: var(--void-pagination-font-size, var(--void-control-text));
8
+ --_void-tone: var(--void-color-accent);
9
+ --_void-tone-subtle: color-mix(in srgb, var(--_void-tone) 13%, transparent);
10
+ --_void-tone-border: transparent;
11
+ --_void-tone-hover: color-mix(in srgb, var(--_void-tone) 8%, transparent);
12
+ }
13
+
14
+ /* The row never forces its container wider than it is: the buttons give up
15
+ width first (down to the smallest step, which is still a 24px target), and
16
+ only then does the row wrap. Nine large buttons used to be 428px of fixed
17
+ width, wider than a phone. */
1
18
  void-pagination {
2
- --tone: var(--void-color-accent);
3
- --tone-subtle: color-mix(in srgb, var(--tone) 14%, transparent);
4
- --tone-border: color-mix(in srgb, var(--tone) 36%, transparent);
5
- --tone-hover: color-mix(in srgb, var(--tone) 22%, transparent);
19
+ display: block;
20
+ min-width: 0;
6
21
  }
7
22
 
8
23
  void-pagination nav {
9
24
  display: flex;
25
+ flex-wrap: wrap;
10
26
  align-items: center;
11
27
  gap: var(--void-space-1);
12
28
  font-family: var(--void-font-sans);
@@ -15,40 +31,45 @@ void-pagination nav {
15
31
  .void-pagination-btn {
16
32
  appearance: none;
17
33
  background: none;
18
- border: 1px solid transparent;
19
- border-radius: var(--void-radius-md);
34
+ border: var(--void-control-border-width) solid transparent;
35
+ border-radius: var(--void-control-radius);
20
36
  display: inline-flex;
21
37
  align-items: center;
22
38
  justify-content: center;
23
- min-width: 2rem;
24
- height: 2rem;
39
+ flex: 0 1 var(--_void-pagination-size);
40
+ min-width: min(var(--_void-pagination-size), var(--void-control-height-sm));
41
+ height: var(--_void-pagination-size);
25
42
  padding: 0 var(--void-space-1);
26
43
  font-family: var(--void-font-sans);
27
- font-size: var(--void-text-sm);
44
+ font-size: var(--_void-pagination-font-size);
45
+ font-variant-numeric: tabular-nums;
28
46
  color: var(--void-color-text);
47
+ box-sizing: border-box;
48
+ text-decoration: none;
29
49
  cursor: pointer;
30
50
  transition: background var(--void-duration-fast) var(--void-ease-in-out),
31
51
  color var(--void-duration-fast) var(--void-ease-in-out),
32
52
  border-color var(--void-duration-fast) var(--void-ease-in-out);
33
53
  }
34
54
 
35
- .void-pagination-btn:hover:not(:disabled) {
36
- background: var(--tone-hover);
55
+ .void-pagination-btn:hover:not(:disabled):not([aria-disabled="true"]) {
56
+ background: var(--_void-tone-hover);
37
57
  }
38
58
 
39
59
  .void-pagination-btn:focus-visible {
40
- outline: 2px solid var(--void-color-accent);
41
- outline-offset: 2px;
60
+ outline: var(--void-focus-ring-width) solid var(--void-focus-ring-color);
61
+ outline-offset: var(--void-focus-ring-offset);
42
62
  }
43
63
 
44
64
  .void-pagination-btn[aria-current="page"] {
45
- background: var(--tone-subtle);
65
+ background: var(--_void-tone-subtle);
46
66
  color: var(--void-color-text);
47
- border-color: var(--tone-border);
67
+ border-color: var(--_void-tone-border);
48
68
  cursor: default;
49
69
  }
50
70
 
51
- .void-pagination-btn:disabled {
71
+ .void-pagination-btn:disabled,
72
+ .void-pagination-btn[aria-disabled="true"] {
52
73
  opacity: 0.4;
53
74
  cursor: not-allowed;
54
75
  }
@@ -61,22 +82,12 @@ void-pagination nav {
61
82
  display: inline-flex;
62
83
  align-items: center;
63
84
  justify-content: center;
64
- min-width: 2rem;
85
+ flex: 0 1 var(--_void-pagination-size);
86
+ min-width: min(var(--_void-pagination-size), var(--void-control-height-sm));
65
87
  color: var(--void-color-text-muted);
66
- font-size: var(--void-text-sm);
88
+ font-size: var(--_void-pagination-font-size);
67
89
  user-select: none;
68
90
  }
69
91
 
70
- void-pagination[size="sm"] .void-pagination-btn,
71
- void-pagination[size="sm"] .void-pagination-ellipsis {
72
- min-width: 1.5rem;
73
- height: 1.5rem;
74
- font-size: var(--void-text-xs);
75
- }
76
-
77
- void-pagination[size="lg"] .void-pagination-btn,
78
- void-pagination[size="lg"] .void-pagination-ellipsis {
79
- min-width: 2.5rem;
80
- height: 2.5rem;
81
- font-size: var(--void-text-base);
82
- }
92
+ void-pagination[size="sm"] { --_void-pagination-size: var(--void-pagination-size, var(--void-control-height-sm)); --_void-pagination-font-size: var(--void-pagination-font-size, var(--void-control-text-sm)); }
93
+ void-pagination[size="lg"] { --_void-pagination-size: var(--void-pagination-size, var(--void-control-height-lg)); --_void-pagination-font-size: var(--void-pagination-font-size, var(--void-control-text-lg)); }
@@ -1,26 +1,52 @@
1
+ /* @tokens void-panel
2
+ --void-panel-padding Padding inside the panel. */
3
+
1
4
  void-panel {
2
5
  display: block;
3
- padding: var(--void-space-4);
4
- border-radius: var(--void-radius-md);
5
- background: var(--void-color-bg-secondary);
6
+ padding: var(--void-panel-padding, var(--void-container-padding));
7
+ border: var(--void-container-border-width) solid var(--void-container-border);
8
+ border-radius: var(--void-container-radius);
9
+ background: var(--void-container-surface);
10
+ box-shadow: var(--void-container-shadow);
6
11
  font-family: var(--void-font-sans);
7
12
  }
8
13
 
9
14
  void-panel[variant="bordered"] {
10
15
  background: transparent;
11
- border: 1px solid var(--void-color-border);
16
+ border: var(--void-rule-frame);
17
+ box-shadow: none;
12
18
  }
13
19
 
14
20
  void-panel[variant="elevated"] {
15
- background: var(--void-color-bg-elevated);
16
- box-shadow: var(--void-shadow-md);
21
+ background: var(--void-float-surface);
22
+ border-color: var(--void-float-border);
23
+ box-shadow: var(--void-float-shadow);
17
24
  }
18
25
 
19
- .void-panel-label {
26
+ /* Parts (CSS-only): a header (title, optional description) and the body. */
27
+ void-panel-header {
28
+ display: block;
20
29
  margin-bottom: var(--void-space-3);
21
- font-size: var(--void-text-sm);
22
- font-weight: var(--void-weight-semibold);
30
+ }
31
+
32
+ void-panel-title {
33
+ display: block;
34
+ font-family: var(--void-type-label-family);
35
+ font-size: var(--void-type-label-size);
36
+ line-height: var(--void-type-label-leading);
37
+ font-weight: var(--void-type-label-weight);
38
+ letter-spacing: var(--void-type-label-tracking);
39
+ text-transform: var(--void-type-label-case);
40
+ color: var(--void-type-label-color);
41
+ }
42
+
43
+ void-panel-description {
44
+ display: block;
45
+ margin-top: var(--void-space-1);
46
+ font-size: var(--void-type-caption-size);
23
47
  color: var(--void-color-text-secondary);
24
- letter-spacing: 0.025em;
25
- text-transform: uppercase;
48
+ }
49
+
50
+ void-panel-body {
51
+ display: block;
26
52
  }