@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.
- package/README.md +133 -8
- package/package.json +66 -8
- package/src/app-shell/detail.css +7 -5
- package/src/app-shell/subtable.css +7 -6
- package/src/base.css +28 -0
- package/src/components/accordion.css +96 -19
- package/src/components/action-input.css +51 -61
- package/src/components/alert.css +63 -23
- package/src/components/avatar.css +0 -2
- package/src/components/badge.css +35 -25
- package/src/components/banner.css +60 -19
- package/src/components/bar-chart.css +75 -0
- package/src/components/breadcrumbs.css +20 -16
- package/src/components/button.css +130 -55
- package/src/components/calendar.css +40 -17
- package/src/components/card.css +122 -23
- package/src/components/carousel.css +85 -118
- package/src/components/checkbox-group.css +3 -1
- package/src/components/checkbox.css +18 -23
- package/src/components/collapsible.css +95 -29
- package/src/components/color-picker.css +10 -10
- package/src/components/combobox.css +47 -29
- package/src/components/compose-input.css +3 -3
- package/src/components/dialog.css +115 -41
- package/src/components/divider.css +7 -4
- package/src/components/donut-chart.css +105 -0
- package/src/components/drawer.css +135 -68
- package/src/components/dropdown-menu.css +21 -43
- package/src/components/editable.css +7 -7
- package/src/components/error-fallback.css +48 -27
- package/src/components/field.css +12 -5
- package/src/components/file-upload.css +2 -1
- package/src/components/gauge.css +194 -0
- package/src/components/hamburger.css +10 -10
- package/src/components/hover-card.css +13 -113
- package/src/components/indicator.css +22 -18
- package/src/components/input.css +15 -12
- package/src/components/line-chart.css +137 -0
- package/src/components/list.css +28 -7
- package/src/components/menu.css +48 -33
- package/src/components/multiselect.css +57 -40
- package/src/components/nav-bar.css +23 -14
- package/src/components/nav-menu.css +31 -22
- package/src/components/number-input.css +85 -62
- package/src/components/overlay.css +215 -0
- package/src/components/pagination.css +42 -31
- package/src/components/panel.css +37 -11
- package/src/components/pin-input.css +23 -22
- package/src/components/popover.css +19 -35
- package/src/components/progress.css +19 -10
- package/src/components/radio-group.css +2 -1
- package/src/components/radio.css +15 -20
- package/src/components/scroll-area.css +3 -3
- package/src/components/segmented-control.css +46 -29
- package/src/components/select.css +99 -31
- package/src/components/sidebar.css +8 -4
- package/src/components/skeleton.css +8 -3
- package/src/components/slider.css +4 -2
- package/src/components/spinner.css +5 -4
- package/src/components/stat.css +59 -52
- package/src/components/status-dot.css +0 -1
- package/src/components/switch.css +18 -26
- package/src/components/table.css +443 -16
- package/src/components/tabs.css +92 -29
- package/src/components/tag.css +44 -20
- package/src/components/tags-input.css +43 -55
- package/src/components/textarea.css +15 -12
- package/src/components/toast.css +84 -22
- package/src/components/toggle.css +35 -42
- package/src/components/tooltip.css +19 -38
- package/src/core.css +98 -0
- package/src/forced-colors.css +134 -0
- package/src/index.css +4 -71
- package/src/knobs.css +101 -0
- package/src/layers.css +38 -0
- package/src/media/media.css +258 -0
- package/src/media/surface.css +143 -0
- package/src/patterns/data.css +461 -0
- package/src/patterns/page.css +348 -0
- package/src/patterns/shell.css +371 -0
- package/src/pre-upgrade.css +202 -0
- package/src/primitives.css +44 -71
- package/src/reset.css +45 -21
- package/src/skins/loft.css +114 -0
- package/src/skins/slab.css +107 -0
- package/src/themes/aurora.css +16 -0
- package/src/themes/capsule.css +16 -0
- package/src/themes/console.css +16 -0
- package/src/themes/dune.css +16 -0
- package/src/themes/iris.css +16 -0
- package/src/themes/orbit.css +16 -0
- package/src/themes/paper.css +18 -0
- package/src/themes/void.css +16 -0
- package/src/tokens.css +552 -98
- package/src/type.css +103 -0
|
@@ -4,9 +4,9 @@
|
|
|
4
4
|
|
|
5
5
|
void-pin-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);
|
|
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
10
|
|
|
11
11
|
display: inline-block;
|
|
12
12
|
font-family: var(--void-font-sans);
|
|
@@ -30,9 +30,9 @@ void-pin-input {
|
|
|
30
30
|
width: var(--void-space-10);
|
|
31
31
|
height: var(--void-space-10);
|
|
32
32
|
padding: 0;
|
|
33
|
-
background: var(--void-
|
|
34
|
-
border:
|
|
35
|
-
border-radius: var(--void-radius
|
|
33
|
+
background: var(--void-field-surface);
|
|
34
|
+
border: var(--void-control-border-width) solid var(--void-field-border);
|
|
35
|
+
border-radius: var(--void-control-radius);
|
|
36
36
|
color: var(--void-color-text);
|
|
37
37
|
font-family: var(--void-font-mono);
|
|
38
38
|
font-size: var(--void-text-lg);
|
|
@@ -49,7 +49,7 @@ void-pin-input {
|
|
|
49
49
|
}
|
|
50
50
|
|
|
51
51
|
.void-pin-cell:hover:not(:disabled) {
|
|
52
|
-
border-color: var(--void-
|
|
52
|
+
border-color: var(--void-field-border);
|
|
53
53
|
}
|
|
54
54
|
|
|
55
55
|
.void-pin-cell:focus {
|
|
@@ -74,21 +74,22 @@ void-pin-input[disabled] .void-pin-cell {
|
|
|
74
74
|
}
|
|
75
75
|
|
|
76
76
|
/* Color variants */
|
|
77
|
-
void-pin-input[color="error"] { --tone: var(--void-color-error); }
|
|
78
|
-
void-pin-input[color="warning"] { --tone: var(--void-color-warning); }
|
|
79
|
-
void-pin-input[color="caution"] { --tone: var(--void-color-caution); }
|
|
80
|
-
void-pin-input[color="
|
|
81
|
-
void-pin-input[color="
|
|
82
|
-
void-pin-input[color="
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
77
|
+
void-pin-input[color="error"] { --_void-tone: var(--void-color-error); }
|
|
78
|
+
void-pin-input[color="warning"] { --_void-tone: var(--void-color-warning); }
|
|
79
|
+
void-pin-input[color="caution"] { --_void-tone: var(--void-color-caution); }
|
|
80
|
+
void-pin-input[color="highlight"] { --_void-tone: var(--void-color-highlight); }
|
|
81
|
+
void-pin-input[color="success"] { --_void-tone: var(--void-color-success); }
|
|
82
|
+
void-pin-input[color="info"] { --_void-tone: var(--void-color-info); }
|
|
83
|
+
void-pin-input[color="notice"] { --_void-tone: var(--void-color-notice); }
|
|
84
|
+
|
|
85
|
+
void-pin-input:where([color="error"], [color="warning"], [color="caution"], [color="highlight"], [color="success"], [color="info"], [color="notice"]) .void-pin-cell {
|
|
86
|
+
border-color: var(--_void-tone-border);
|
|
87
|
+
background: var(--_void-tone-subtle);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
void-pin-input:where([color="error"], [color="warning"], [color="caution"], [color="highlight"], [color="success"], [color="info"], [color="notice"]) .void-pin-cell:focus {
|
|
91
|
+
border-color: var(--_void-tone);
|
|
92
|
+
box-shadow: 0 0 0 1px var(--_void-tone);
|
|
92
93
|
}
|
|
93
94
|
|
|
94
95
|
/* Size: sm */
|
|
@@ -1,48 +1,32 @@
|
|
|
1
1
|
void-popover {
|
|
2
|
-
position: relative;
|
|
3
2
|
display: inline-flex;
|
|
4
3
|
}
|
|
5
4
|
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
/* The trigger part wraps the control and draws nothing itself: the control is
|
|
6
|
+
the box (and the anchor's only in-flow content), before and after upgrade. */
|
|
7
|
+
void-popover-trigger {
|
|
8
|
+
display: contents;
|
|
8
9
|
}
|
|
9
10
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
11
|
+
/* A popover="manual" surface in the top layer; placement, gap, flipping and
|
|
12
|
+
transitions are shared (overlay.css). */
|
|
13
|
+
void-popover-content {
|
|
14
|
+
/* As wide as its content, not as narrow as its trigger. */
|
|
15
|
+
width: max-content;
|
|
16
|
+
max-width: calc(100vw - 2 * var(--void-gutter));
|
|
14
17
|
min-width: 12rem;
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
border
|
|
18
|
+
max-width: min(24rem, calc(100vw - 2 * var(--void-overlay-gap)));
|
|
19
|
+
background: var(--void-float-surface);
|
|
20
|
+
border: var(--void-float-border-width) solid var(--void-float-border);
|
|
21
|
+
border-radius: var(--void-float-radius);
|
|
18
22
|
padding: var(--void-space-3);
|
|
19
|
-
box-shadow:
|
|
23
|
+
box-shadow: var(--void-float-shadow);
|
|
20
24
|
font-family: var(--void-font-sans);
|
|
21
|
-
font-size: var(--void-
|
|
25
|
+
font-size: var(--void-type-body-size);
|
|
22
26
|
color: var(--void-color-text);
|
|
23
|
-
transition: opacity var(--void-duration-fast) var(--void-ease-in-out);
|
|
24
27
|
}
|
|
25
28
|
|
|
26
|
-
void-popover
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
void-popover[position="bottom"] .void-popover-body {
|
|
31
|
-
top: calc(100% + var(--void-space-2));
|
|
32
|
-
left: 0;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
void-popover[position="top"] .void-popover-body {
|
|
36
|
-
bottom: calc(100% + var(--void-space-2));
|
|
37
|
-
left: 0;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
void-popover[position="left"] .void-popover-body {
|
|
41
|
-
right: calc(100% + var(--void-space-2));
|
|
42
|
-
top: 0;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
void-popover[position="right"] .void-popover-body {
|
|
46
|
-
left: calc(100% + var(--void-space-2));
|
|
47
|
-
top: 0;
|
|
29
|
+
void-popover-content:focus-visible {
|
|
30
|
+
outline: var(--void-focus-ring-width) solid var(--void-focus-ring-color);
|
|
31
|
+
outline-offset: var(--void-focus-ring-offset);
|
|
48
32
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
void-progress {
|
|
2
|
-
--tone: var(--void-color-accent);
|
|
2
|
+
--_void-tone: var(--void-color-accent);
|
|
3
3
|
|
|
4
4
|
display: block;
|
|
5
5
|
width: 100%;
|
|
@@ -16,22 +16,21 @@ void-progress {
|
|
|
16
16
|
.void-progress-fill {
|
|
17
17
|
height: 100%;
|
|
18
18
|
width: var(--void-progress-fill, 0%);
|
|
19
|
-
background: var(--tone);
|
|
19
|
+
background: var(--_void-tone);
|
|
20
20
|
border-radius: var(--void-radius-full);
|
|
21
21
|
transition: width var(--void-duration-normal) var(--void-ease-in-out);
|
|
22
22
|
}
|
|
23
23
|
|
|
24
|
-
void-progress[color="error"] { --tone: var(--void-color-error); }
|
|
25
|
-
void-progress[color="warning"] { --tone: var(--void-color-warning); }
|
|
26
|
-
void-progress[color="caution"] { --tone: var(--void-color-caution); }
|
|
27
|
-
void-progress[color="
|
|
28
|
-
void-progress[color="
|
|
29
|
-
void-progress[color="
|
|
24
|
+
void-progress[color="error"] { --_void-tone: var(--void-color-error); }
|
|
25
|
+
void-progress[color="warning"] { --_void-tone: var(--void-color-warning); }
|
|
26
|
+
void-progress[color="caution"] { --_void-tone: var(--void-color-caution); }
|
|
27
|
+
void-progress[color="highlight"] { --_void-tone: var(--void-color-highlight); }
|
|
28
|
+
void-progress[color="success"] { --_void-tone: var(--void-color-success); }
|
|
29
|
+
void-progress[color="info"] { --_void-tone: var(--void-color-info); }
|
|
30
|
+
void-progress[color="notice"] { --_void-tone: var(--void-color-notice); }
|
|
30
31
|
|
|
31
32
|
void-progress[size="sm"] .void-progress-track { height: 0.25rem; }
|
|
32
33
|
void-progress[size="lg"] .void-progress-track { height: 0.75rem; }
|
|
33
|
-
void-progress[size="xl"] .void-progress-track { height: 1rem; }
|
|
34
|
-
void-progress[size="xxl"] .void-progress-track { height: 1.25rem; }
|
|
35
34
|
|
|
36
35
|
void-progress[indeterminate] .void-progress-fill {
|
|
37
36
|
width: 40% !important;
|
|
@@ -42,3 +41,13 @@ void-progress[indeterminate] .void-progress-fill {
|
|
|
42
41
|
0% { transform: translateX(-100%); }
|
|
43
42
|
100% { transform: translateX(350%); }
|
|
44
43
|
}
|
|
44
|
+
|
|
45
|
+
/* Reduced motion: indeterminate state becomes a static, dimmed full bar
|
|
46
|
+
instead of a sliding one, so it never reads as a determinate 40%. */
|
|
47
|
+
@media (prefers-reduced-motion: reduce) {
|
|
48
|
+
void-progress[indeterminate] .void-progress-fill {
|
|
49
|
+
animation: none;
|
|
50
|
+
width: 100% !important;
|
|
51
|
+
opacity: 0.5;
|
|
52
|
+
}
|
|
53
|
+
}
|
package/src/components/radio.css
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
void-radio {
|
|
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
|
|
9
|
+
font-size: var(--void-control-text);
|
|
10
10
|
color: var(--void-color-text);
|
|
11
11
|
user-select: none;
|
|
12
12
|
}
|
|
@@ -26,7 +26,7 @@ void-radio input[type="radio"] {
|
|
|
26
26
|
flex-shrink: 0;
|
|
27
27
|
width: 1.125rem;
|
|
28
28
|
height: 1.125rem;
|
|
29
|
-
border: 1.5px solid var(--void-
|
|
29
|
+
border: 1.5px solid var(--void-control-border);
|
|
30
30
|
border-radius: var(--void-radius-full);
|
|
31
31
|
background: transparent;
|
|
32
32
|
transition: background var(--void-duration-fast) var(--void-ease-in-out),
|
|
@@ -41,25 +41,26 @@ void-radio input[type="radio"] {
|
|
|
41
41
|
}
|
|
42
42
|
|
|
43
43
|
void-radio:hover .void-radio-circle {
|
|
44
|
-
border-color: var(--tone);
|
|
44
|
+
border-color: var(--_void-tone);
|
|
45
45
|
}
|
|
46
46
|
|
|
47
47
|
void-radio:focus-visible .void-radio-circle {
|
|
48
|
-
outline:
|
|
49
|
-
outline-offset:
|
|
48
|
+
outline: var(--void-focus-ring-width) solid var(--void-focus-ring-color);
|
|
49
|
+
outline-offset: var(--void-focus-ring-offset);
|
|
50
50
|
}
|
|
51
51
|
|
|
52
52
|
void-radio[checked] .void-radio-circle {
|
|
53
|
-
background: var(--tone);
|
|
54
|
-
border-color: var(--tone);
|
|
53
|
+
background: var(--_void-tone);
|
|
54
|
+
border-color: var(--_void-tone);
|
|
55
55
|
}
|
|
56
56
|
|
|
57
|
-
void-radio[color="error"] { --tone: var(--void-color-error); }
|
|
58
|
-
void-radio[color="warning"] { --tone: var(--void-color-warning); }
|
|
59
|
-
void-radio[color="caution"] { --tone: var(--void-color-caution); }
|
|
60
|
-
void-radio[color="
|
|
61
|
-
void-radio[color="
|
|
62
|
-
void-radio[color="
|
|
57
|
+
void-radio[color="error"] { --_void-tone: var(--void-color-error); }
|
|
58
|
+
void-radio[color="warning"] { --_void-tone: var(--void-color-warning); }
|
|
59
|
+
void-radio[color="caution"] { --_void-tone: var(--void-color-caution); }
|
|
60
|
+
void-radio[color="highlight"] { --_void-tone: var(--void-color-highlight); }
|
|
61
|
+
void-radio[color="success"] { --_void-tone: var(--void-color-success); }
|
|
62
|
+
void-radio[color="info"] { --_void-tone: var(--void-color-info); }
|
|
63
|
+
void-radio[color="notice"] { --_void-tone: var(--void-color-notice); }
|
|
63
64
|
|
|
64
65
|
void-radio[size="sm"] { font-size: var(--void-text-xs); }
|
|
65
66
|
void-radio[size="sm"] .void-radio-circle { width: 0.875rem; height: 0.875rem; }
|
|
@@ -67,12 +68,6 @@ void-radio[size="sm"] .void-radio-dot { width: 0.375rem; height: 0.375rem; }
|
|
|
67
68
|
void-radio[size="lg"] { font-size: var(--void-text-base); }
|
|
68
69
|
void-radio[size="lg"] .void-radio-circle { width: 1.375rem; height: 1.375rem; }
|
|
69
70
|
void-radio[size="lg"] .void-radio-dot { width: 0.625rem; height: 0.625rem; }
|
|
70
|
-
void-radio[size="xl"] { font-size: var(--void-text-lg); }
|
|
71
|
-
void-radio[size="xl"] .void-radio-circle { width: 1.625rem; height: 1.625rem; }
|
|
72
|
-
void-radio[size="xl"] .void-radio-dot { width: 0.75rem; height: 0.75rem; }
|
|
73
|
-
void-radio[size="xxl"] { font-size: var(--void-text-xl); }
|
|
74
|
-
void-radio[size="xxl"] .void-radio-circle { width: 1.875rem; height: 1.875rem; }
|
|
75
|
-
void-radio[size="xxl"] .void-radio-dot { width: 0.875rem; height: 0.875rem; }
|
|
76
71
|
|
|
77
72
|
void-radio[disabled] {
|
|
78
73
|
opacity: 0.5;
|
|
@@ -7,15 +7,15 @@ void-scroll-area {
|
|
|
7
7
|
max-height: var(--void-scroll-area-max-height);
|
|
8
8
|
}
|
|
9
9
|
|
|
10
|
-
void-scroll-area[
|
|
10
|
+
void-scroll-area[orientation="vertical"] .void-scroll-area-viewport {
|
|
11
11
|
overflow-y: auto;
|
|
12
12
|
}
|
|
13
13
|
|
|
14
|
-
void-scroll-area[
|
|
14
|
+
void-scroll-area[orientation="horizontal"] .void-scroll-area-viewport {
|
|
15
15
|
overflow-x: auto;
|
|
16
16
|
}
|
|
17
17
|
|
|
18
|
-
void-scroll-area[
|
|
18
|
+
void-scroll-area[orientation="both"] .void-scroll-area-viewport {
|
|
19
19
|
overflow: auto;
|
|
20
20
|
}
|
|
21
21
|
|
|
@@ -1,20 +1,42 @@
|
|
|
1
1
|
void-segmented-control {
|
|
2
|
+
--_void-segment-height: var(--void-control-height);
|
|
3
|
+
--_void-segment-padding: var(--void-control-padding);
|
|
4
|
+
--_void-segment-text: var(--void-control-text);
|
|
5
|
+
|
|
2
6
|
display: inline-flex;
|
|
3
7
|
align-items: center;
|
|
8
|
+
/* Never wider than what holds it: with more segments than fit, the
|
|
9
|
+
control scrolls sideways inside its own border instead of pushing the
|
|
10
|
+
page wider than the screen. */
|
|
11
|
+
box-sizing: border-box;
|
|
12
|
+
max-width: 100%;
|
|
13
|
+
overflow-x: auto;
|
|
14
|
+
scrollbar-width: none;
|
|
15
|
+
overscroll-behavior-x: contain;
|
|
16
|
+
scroll-snap-type: inline proximity;
|
|
17
|
+
/* Border plus padding plus item equals the shared control height. */
|
|
4
18
|
padding: 2px;
|
|
5
|
-
background: var(--void-color-
|
|
6
|
-
border:
|
|
7
|
-
border-radius: var(--void-radius
|
|
19
|
+
background: var(--void-color-surface);
|
|
20
|
+
border: var(--void-control-border-width) solid var(--void-control-border);
|
|
21
|
+
border-radius: var(--void-control-radius);
|
|
8
22
|
gap: 2px;
|
|
9
23
|
}
|
|
10
24
|
|
|
25
|
+
void-segmented-control::-webkit-scrollbar {
|
|
26
|
+
display: none;
|
|
27
|
+
}
|
|
28
|
+
|
|
11
29
|
void-segmented-control-item {
|
|
12
30
|
display: inline-grid;
|
|
13
31
|
place-content: center;
|
|
14
|
-
|
|
15
|
-
|
|
32
|
+
flex: none;
|
|
33
|
+
scroll-snap-align: center;
|
|
34
|
+
min-height: calc(var(--_void-segment-height) - 6px);
|
|
35
|
+
padding: 0 var(--_void-segment-padding);
|
|
36
|
+
border-radius: max(0px, calc(var(--void-control-radius) - 2px));
|
|
16
37
|
font-family: var(--void-font-sans);
|
|
17
|
-
font-size: var(--
|
|
38
|
+
font-size: var(--_void-segment-text);
|
|
39
|
+
white-space: nowrap;
|
|
18
40
|
color: var(--void-color-text-secondary);
|
|
19
41
|
cursor: pointer;
|
|
20
42
|
user-select: none;
|
|
@@ -28,37 +50,32 @@ void-segmented-control-item:hover {
|
|
|
28
50
|
}
|
|
29
51
|
|
|
30
52
|
void-segmented-control-item:focus-visible {
|
|
31
|
-
outline:
|
|
32
|
-
outline-offset: -
|
|
53
|
+
outline: var(--void-focus-ring-width) solid var(--void-focus-ring-color);
|
|
54
|
+
outline-offset: calc(-1 * var(--void-focus-ring-width));
|
|
33
55
|
}
|
|
34
56
|
|
|
35
57
|
void-segmented-control-item[aria-checked="true"] {
|
|
36
|
-
background: var(--void-color-bg-
|
|
58
|
+
background: var(--void-color-bg-active);
|
|
37
59
|
color: var(--void-color-text);
|
|
38
|
-
box-shadow: var(--void-shadow-sm);
|
|
39
60
|
}
|
|
40
61
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
}
|
|
62
|
+
/* Colour: the selected segment takes the tone. */
|
|
63
|
+
void-segmented-control[color="error"] { --_void-tone: var(--void-color-error); }
|
|
64
|
+
void-segmented-control[color="warning"] { --_void-tone: var(--void-color-warning); }
|
|
65
|
+
void-segmented-control[color="caution"] { --_void-tone: var(--void-color-caution); }
|
|
66
|
+
void-segmented-control[color="success"] { --_void-tone: var(--void-color-success); }
|
|
67
|
+
void-segmented-control[color="info"] { --_void-tone: var(--void-color-info); }
|
|
68
|
+
void-segmented-control[color="notice"] { --_void-tone: var(--void-color-notice); }
|
|
69
|
+
void-segmented-control[color="highlight"] { --_void-tone: var(--void-color-highlight); }
|
|
45
70
|
|
|
46
|
-
void-segmented-control[
|
|
47
|
-
|
|
48
|
-
font-size: var(--void-text-xs);
|
|
71
|
+
void-segmented-control:where([color="error"], [color="warning"], [color="caution"], [color="success"], [color="info"], [color="notice"], [color="highlight"]) void-segmented-control-item[aria-checked="true"] {
|
|
72
|
+
background: color-mix(in srgb, var(--_void-tone) 14%, transparent);
|
|
49
73
|
}
|
|
50
74
|
|
|
51
|
-
void-segmented-control[
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
void-segmented-control[size="xl"] void-segmented-control-item {
|
|
57
|
-
padding: var(--void-space-3) var(--void-space-5);
|
|
58
|
-
font-size: var(--void-text-lg);
|
|
75
|
+
void-segmented-control-item[disabled] {
|
|
76
|
+
opacity: 0.5;
|
|
77
|
+
pointer-events: none;
|
|
59
78
|
}
|
|
60
79
|
|
|
61
|
-
void-segmented-control[size="
|
|
62
|
-
|
|
63
|
-
font-size: var(--void-text-xl);
|
|
64
|
-
}
|
|
80
|
+
void-segmented-control[size="sm"] { --_void-segment-height: var(--void-control-height-sm); --_void-segment-padding: var(--void-control-padding-sm); --_void-segment-text: var(--void-control-text-sm); }
|
|
81
|
+
void-segmented-control[size="lg"] { --_void-segment-height: var(--void-control-height-lg); --_void-segment-padding: var(--void-control-padding-lg); --_void-segment-text: var(--void-control-text-lg); }
|
|
@@ -1,17 +1,20 @@
|
|
|
1
1
|
void-select {
|
|
2
|
-
--
|
|
2
|
+
--_void-field-height: var(--void-control-height);
|
|
3
|
+
--_void-field-padding: var(--void-control-padding);
|
|
4
|
+
--_void-field-text: var(--void-control-text);
|
|
3
5
|
position: relative;
|
|
4
6
|
display: flex;
|
|
5
7
|
flex-direction: column;
|
|
6
|
-
gap: var(--void-space-
|
|
8
|
+
gap: var(--void-space-1h);
|
|
7
9
|
font-family: var(--void-font-sans);
|
|
8
10
|
}
|
|
9
11
|
|
|
10
12
|
void-select::after {
|
|
11
13
|
content: '';
|
|
12
14
|
position: absolute;
|
|
13
|
-
right: var(--
|
|
14
|
-
|
|
15
|
+
right: var(--_void-field-padding);
|
|
16
|
+
/* Centred on the control, which is the first row of the host. */
|
|
17
|
+
top: calc((var(--_void-field-height) - 0.75rem) / 2);
|
|
15
18
|
width: 0.75rem;
|
|
16
19
|
height: 0.75rem;
|
|
17
20
|
background-color: var(--void-color-text-secondary);
|
|
@@ -25,14 +28,15 @@ void-select::after {
|
|
|
25
28
|
|
|
26
29
|
void-select select {
|
|
27
30
|
width: 100%;
|
|
28
|
-
|
|
29
|
-
padding
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
border
|
|
31
|
+
height: var(--_void-field-height);
|
|
32
|
+
padding: 0 var(--_void-field-padding);
|
|
33
|
+
padding-right: calc(var(--_void-field-padding) * 2 + 0.75rem);
|
|
34
|
+
background: var(--void-field-surface);
|
|
35
|
+
border: var(--void-control-border-width) solid var(--void-field-border);
|
|
36
|
+
border-radius: var(--void-control-radius);
|
|
33
37
|
color: var(--void-color-text);
|
|
34
38
|
font-family: inherit;
|
|
35
|
-
font-size: var(--
|
|
39
|
+
font-size: var(--_void-field-text);
|
|
36
40
|
font-weight: var(--void-weight-normal);
|
|
37
41
|
line-height: var(--void-leading-normal);
|
|
38
42
|
outline: none;
|
|
@@ -44,7 +48,7 @@ void-select select {
|
|
|
44
48
|
}
|
|
45
49
|
|
|
46
50
|
void-select select:hover {
|
|
47
|
-
border-color: var(--void-
|
|
51
|
+
border-color: var(--void-field-border);
|
|
48
52
|
background: var(--void-color-bg-hover);
|
|
49
53
|
}
|
|
50
54
|
|
|
@@ -63,6 +67,86 @@ void-select select option {
|
|
|
63
67
|
color: var(--void-color-text);
|
|
64
68
|
}
|
|
65
69
|
|
|
70
|
+
/* ── The open list ──
|
|
71
|
+
The list of a native select is drawn by the browser, and by default it
|
|
72
|
+
knows nothing of the theme: a system-grey panel with a system-blue
|
|
73
|
+
highlight. Where the browser lets CSS draw it (appearance: base-select,
|
|
74
|
+
Chromium 135 and Safari 27; not Firefox, where the rule above is all
|
|
75
|
+
there is), the list is a float like the menu and the combobox list.
|
|
76
|
+
Both the select and its picker have to opt in. Nothing here depends on
|
|
77
|
+
the markup inside the select; the component stays a native control. */
|
|
78
|
+
@supports (appearance: base-select) {
|
|
79
|
+
void-select select,
|
|
80
|
+
void-select select::picker(select) {
|
|
81
|
+
appearance: base-select;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
/* base-select lays the button out as a flex row with an arrow of its
|
|
85
|
+
own; the host already draws the arrow. */
|
|
86
|
+
void-select select {
|
|
87
|
+
align-items: center;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
void-select select::picker-icon {
|
|
91
|
+
display: none;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
void-select select::picker(select) {
|
|
95
|
+
box-sizing: border-box;
|
|
96
|
+
min-inline-size: anchor-size(inline);
|
|
97
|
+
margin-block: var(--void-space-1);
|
|
98
|
+
padding: var(--void-space-1);
|
|
99
|
+
border: var(--void-float-border-width) solid var(--void-float-border);
|
|
100
|
+
border-radius: var(--void-float-radius);
|
|
101
|
+
background: var(--void-float-surface);
|
|
102
|
+
box-shadow: var(--void-float-shadow);
|
|
103
|
+
color: var(--void-color-text);
|
|
104
|
+
font-family: var(--void-font-sans);
|
|
105
|
+
font-size: var(--_void-field-text);
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
void-select select option {
|
|
109
|
+
display: flex;
|
|
110
|
+
align-items: center;
|
|
111
|
+
gap: var(--void-space-2);
|
|
112
|
+
min-block-size: var(--void-control-height);
|
|
113
|
+
padding: 0 var(--void-control-padding);
|
|
114
|
+
border-radius: var(--void-control-radius);
|
|
115
|
+
background: transparent;
|
|
116
|
+
color: var(--void-color-text);
|
|
117
|
+
cursor: pointer;
|
|
118
|
+
outline: none;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
/* The pointer and the keyboard highlight the same way: the hover fill,
|
|
122
|
+
not the system's blue. */
|
|
123
|
+
void-select select option:is(:hover, :focus-visible) {
|
|
124
|
+
background: var(--void-color-bg-hover);
|
|
125
|
+
color: var(--void-color-text);
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
void-select select option:focus-visible {
|
|
129
|
+
outline: var(--void-focus-ring-width) solid var(--void-focus-ring-color);
|
|
130
|
+
outline-offset: calc(-1 * var(--void-focus-ring-width));
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
/* The chosen option is marked by the tick alone, at the far end. */
|
|
134
|
+
void-select select option:checked {
|
|
135
|
+
font-weight: var(--void-weight-medium);
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
void-select select option::checkmark {
|
|
139
|
+
order: 1;
|
|
140
|
+
margin-inline-start: auto;
|
|
141
|
+
color: var(--void-color-text-secondary);
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
void-select select option:disabled {
|
|
145
|
+
opacity: 0.5;
|
|
146
|
+
cursor: not-allowed;
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
|
|
66
150
|
void-select[error]:not([error=""]) select {
|
|
67
151
|
border-color: var(--void-color-error);
|
|
68
152
|
}
|
|
@@ -71,27 +155,11 @@ void-select[error]:not([error=""]) select:focus {
|
|
|
71
155
|
box-shadow: 0 0 0 1px var(--void-color-error);
|
|
72
156
|
}
|
|
73
157
|
|
|
74
|
-
void-select[error]:not([error=""])::after {
|
|
75
|
-
bottom: calc(var(--_ch) - 0.375rem + var(--void-space-1) + 1.125rem);
|
|
76
|
-
}
|
|
77
|
-
|
|
78
158
|
.void-select-error {
|
|
79
159
|
color: var(--void-color-error);
|
|
80
|
-
font-size: var(--void-
|
|
160
|
+
font-size: var(--void-type-caption-size);
|
|
161
|
+
line-height: var(--void-type-caption-leading);
|
|
81
162
|
}
|
|
82
163
|
|
|
83
|
-
void-select[size="sm"]
|
|
84
|
-
void-select[size="
|
|
85
|
-
void-select[size="sm"]::after { right: var(--void-space-2); width: 0.625rem; height: 0.625rem; }
|
|
86
|
-
|
|
87
|
-
void-select[size="lg"] { --_ch: 1.40625rem; }
|
|
88
|
-
void-select[size="lg"] select { padding: var(--void-space-3) var(--void-space-4); padding-right: var(--void-space-10); font-size: var(--void-text-base); }
|
|
89
|
-
void-select[size="lg"]::after { right: var(--void-space-4); width: 0.875rem; height: 0.875rem; }
|
|
90
|
-
|
|
91
|
-
void-select[size="xl"] { --_ch: 1.84375rem; }
|
|
92
|
-
void-select[size="xl"] select { padding: var(--void-space-4) var(--void-space-5); padding-right: var(--void-space-10); font-size: var(--void-text-lg); }
|
|
93
|
-
void-select[size="xl"]::after { right: var(--void-space-5); width: 1rem; height: 1rem; }
|
|
94
|
-
|
|
95
|
-
void-select[size="xxl"] { --_ch: 2.1875rem; }
|
|
96
|
-
void-select[size="xxl"] select { padding: var(--void-space-5) var(--void-space-6); padding-right: var(--void-space-10); font-size: var(--void-text-xl); }
|
|
97
|
-
void-select[size="xxl"]::after { right: var(--void-space-6); width: 1.125rem; height: 1.125rem; }
|
|
164
|
+
void-select[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); }
|
|
165
|
+
void-select[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); }
|
|
@@ -1,10 +1,14 @@
|
|
|
1
|
+
/* @tokens void-sidebar
|
|
2
|
+
--void-sidebar-surface Fill of the sidebar.
|
|
3
|
+
--void-sidebar-rule The line on its inner edge (under it when the shell turns it into a bar on a narrow screen). */
|
|
4
|
+
|
|
1
5
|
void-sidebar {
|
|
2
6
|
display: flex;
|
|
3
7
|
flex-direction: column;
|
|
4
8
|
width: var(--void-sidebar-width);
|
|
5
9
|
height: 100%;
|
|
6
|
-
background: var(--void-color-bg);
|
|
7
|
-
border-right:
|
|
10
|
+
background: var(--void-sidebar-surface, var(--void-color-bg));
|
|
11
|
+
border-right: var(--void-sidebar-rule, var(--void-rule));
|
|
8
12
|
overflow: hidden;
|
|
9
13
|
font-family: var(--void-font-sans);
|
|
10
14
|
color: var(--void-color-text);
|
|
@@ -12,9 +16,9 @@ void-sidebar {
|
|
|
12
16
|
flex-shrink: 0;
|
|
13
17
|
}
|
|
14
18
|
|
|
15
|
-
void-sidebar[
|
|
19
|
+
void-sidebar[side="right"] {
|
|
16
20
|
border-right: none;
|
|
17
|
-
border-left:
|
|
21
|
+
border-left: var(--void-sidebar-rule, var(--void-rule));
|
|
18
22
|
}
|
|
19
23
|
|
|
20
24
|
void-sidebar[collapsed] {
|
|
@@ -11,21 +11,26 @@ void-skeleton {
|
|
|
11
11
|
}
|
|
12
12
|
|
|
13
13
|
/* Text variant — single line height */
|
|
14
|
-
void-skeleton[
|
|
14
|
+
void-skeleton[shape="text"] {
|
|
15
15
|
height: 1em;
|
|
16
16
|
width: 100%;
|
|
17
17
|
border-radius: var(--void-radius-xs);
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
/* Circular variant */
|
|
21
|
-
void-skeleton[
|
|
21
|
+
void-skeleton[shape="circular"] {
|
|
22
22
|
width: 2.5rem;
|
|
23
23
|
height: 2.5rem;
|
|
24
24
|
border-radius: var(--void-radius-full);
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
/* Rectangular variant */
|
|
28
|
-
void-skeleton[
|
|
28
|
+
void-skeleton[shape="rectangular"] {
|
|
29
29
|
width: 100%;
|
|
30
30
|
height: 6rem;
|
|
31
31
|
}
|
|
32
|
+
|
|
33
|
+
/* Reduced motion: static placeholder, no pulsing */
|
|
34
|
+
@media (prefers-reduced-motion: reduce) {
|
|
35
|
+
void-skeleton { animation: none; }
|
|
36
|
+
}
|
|
@@ -65,11 +65,13 @@ void-slider input[type="range"]::-moz-range-thumb:hover {
|
|
|
65
65
|
}
|
|
66
66
|
|
|
67
67
|
void-slider input[type="range"]:focus-visible::-webkit-slider-thumb {
|
|
68
|
-
box-shadow: 0 0 0
|
|
68
|
+
box-shadow: 0 0 0 var(--void-focus-ring-offset) var(--void-color-bg),
|
|
69
|
+
0 0 0 calc(var(--void-focus-ring-offset) + var(--void-focus-ring-width)) var(--void-focus-ring-color);
|
|
69
70
|
}
|
|
70
71
|
|
|
71
72
|
void-slider input[type="range"]:focus-visible::-moz-range-thumb {
|
|
72
|
-
box-shadow: 0 0 0
|
|
73
|
+
box-shadow: 0 0 0 var(--void-focus-ring-offset) var(--void-color-bg),
|
|
74
|
+
0 0 0 calc(var(--void-focus-ring-offset) + var(--void-focus-ring-width)) var(--void-focus-ring-color);
|
|
73
75
|
}
|
|
74
76
|
|
|
75
77
|
.void-slider-value {
|