@voidable/theme 0.6.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 +75 -0
  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 +105 -0
  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 +194 -0
  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 +137 -0
  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 +85 -62
  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 -71
  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 +44 -71
  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;
@@ -49,12 +54,44 @@ void-number-input input.void-number-input-field::placeholder {
49
54
  color: var(--void-color-text-muted);
50
55
  }
51
56
 
57
+ /* Inline prefix (before input) and unit (after input) */
58
+ .void-number-input-prefix,
59
+ .void-number-input-unit {
60
+ display: inline-flex;
61
+ align-items: center;
62
+ color: var(--void-color-text-muted);
63
+ font-family: inherit;
64
+ font-size: var(--_void-field-text);
65
+ user-select: none;
66
+ pointer-events: none;
67
+ white-space: nowrap;
68
+ flex-shrink: 0;
69
+ }
70
+
71
+ .void-number-input-prefix {
72
+ padding-left: var(--_void-field-padding);
73
+ }
74
+
75
+ .void-number-input-unit {
76
+ padding-right: var(--_void-field-padding);
77
+ }
78
+
79
+ /* When a prefix is present, the input doesn't need its own left padding */
80
+ void-number-input:has(.void-number-input-prefix) input.void-number-input-field {
81
+ padding-left: var(--void-space-1);
82
+ }
83
+
84
+ /* When a unit is present, the input doesn't need its own right padding */
85
+ void-number-input:has(.void-number-input-unit) input.void-number-input-field {
86
+ padding-right: var(--void-space-1);
87
+ }
88
+
52
89
  /* Stepper buttons */
53
90
  .void-number-input-btn {
54
91
  display: inline-flex;
55
92
  align-items: center;
56
93
  justify-content: center;
57
- padding: 0 var(--void-space-3);
94
+ padding: 0 var(--_void-field-padding);
58
95
  background: transparent;
59
96
  border: none;
60
97
  color: var(--void-color-text-secondary);
@@ -67,13 +104,13 @@ void-number-input input.void-number-input-field::placeholder {
67
104
  }
68
105
 
69
106
  .void-number-input-btn:hover:not(:disabled) {
70
- background: var(--tone-hover);
107
+ background: var(--_void-tone-hover);
71
108
  color: var(--void-color-text);
72
109
  }
73
110
 
74
111
  .void-number-input-btn:focus-visible {
75
- outline: 2px solid var(--void-color-border-focus);
76
- 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));
77
114
  }
78
115
 
79
116
  .void-number-input-btn:disabled {
@@ -81,30 +118,31 @@ void-number-input input.void-number-input-field::placeholder {
81
118
  cursor: not-allowed;
82
119
  }
83
120
 
84
- /* 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. */
85
123
  .void-number-input-btn-dec {
86
- border-right: 1px solid var(--void-color-border);
124
+ border-right: var(--void-rule-between);
87
125
  }
88
126
 
89
127
  .void-number-input-btn-inc {
90
- border-left: 1px solid var(--void-color-border);
128
+ border-left: var(--void-rule-between);
91
129
  }
92
130
 
93
131
  /* controls="right" — both buttons stacked vertically on the right */
94
132
  void-number-input[controls="right"] .void-number-input-btn-group {
95
133
  display: flex;
96
134
  flex-direction: column;
97
- border-left: 1px solid var(--void-color-border);
135
+ border-left: var(--void-rule-between);
98
136
  }
99
137
 
100
138
  void-number-input[controls="right"] .void-number-input-btn {
101
139
  flex: 1;
102
- padding: 0 var(--void-space-2);
140
+ padding: 0 var(--void-control-padding-sm);
103
141
  border: none;
104
142
  }
105
143
 
106
144
  void-number-input[controls="right"] .void-number-input-btn-inc {
107
- border-bottom: 1px solid var(--void-color-border);
145
+ border-bottom: var(--void-rule-between);
108
146
  }
109
147
 
110
148
  /* controls="none" — just the input, no separators */
@@ -113,61 +151,42 @@ void-number-input[controls="none"] input.void-number-input-field {
113
151
  }
114
152
 
115
153
  /* Color variants */
116
- void-number-input[color="error"] { --tone: var(--void-color-error); }
117
- void-number-input[color="warning"] { --tone: var(--void-color-warning); }
118
- void-number-input[color="caution"] { --tone: var(--void-color-caution); }
119
- void-number-input[color="success"] { --tone: var(--void-color-success); }
120
- void-number-input[color="info"] { --tone: var(--void-color-info); }
121
- 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); }
122
161
 
123
- void-number-input:where([color="error"], [color="warning"], [color="caution"], [color="success"], [color="info"], [color="notice"]) {
124
- border-color: var(--tone-border);
125
- 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);
126
165
  }
127
166
 
128
- void-number-input:where([color="error"], [color="warning"], [color="caution"], [color="success"], [color="info"], [color="notice"]) .void-number-input-btn {
129
- 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);
130
169
  }
131
170
 
132
- void-number-input:where([color="error"], [color="warning"], [color="caution"], [color="success"], [color="info"], [color="notice"]) .void-number-input-btn-dec {
133
- 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);
134
173
  }
135
174
 
136
- void-number-input:where([color="error"], [color="warning"], [color="caution"], [color="success"], [color="info"], [color="notice"]) .void-number-input-btn-inc {
137
- 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);
138
177
  }
139
178
 
140
- void-number-input:where([color="error"], [color="warning"], [color="caution"], [color="success"], [color="info"], [color="notice"]):where([controls="right"]) .void-number-input-btn-group {
141
- 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);
142
181
  }
143
182
 
144
- void-number-input:where([color="error"], [color="warning"], [color="caution"], [color="success"], [color="info"], [color="notice"]):where([controls="right"]) .void-number-input-btn-inc {
145
- 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);
146
185
  }
147
186
 
148
- void-number-input:where([color="error"], [color="warning"], [color="caution"], [color="success"], [color="info"], [color="notice"]):focus-within {
149
- border-color: var(--tone);
150
- box-shadow: 0 0 0 1px var(--tone);
151
- }
152
-
153
- /* Size variants */
154
- void-number-input[size="sm"] input.void-number-input-field {
155
- padding: var(--void-space-1) var(--void-space-2);
156
- font-size: var(--void-text-xs);
157
- }
158
-
159
- void-number-input[size="sm"] .void-number-input-btn {
160
- padding: 0 var(--void-space-2);
161
- font-size: var(--void-text-xs);
162
- }
163
-
164
- void-number-input[size="lg"] input.void-number-input-field {
165
- padding: var(--void-space-3) var(--void-space-4);
166
- font-size: var(--void-text-base);
167
- }
168
-
169
- void-number-input[size="lg"] .void-number-input-btn {
170
- padding: 0 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);
171
190
  }
172
191
 
173
192
  /* Disabled state */
@@ -185,3 +204,7 @@ void-number-input[disabled] input.void-number-input-field {
185
204
  void-number-input[readonly] input.void-number-input-field {
186
205
  cursor: default;
187
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
  }