@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
|
@@ -26,10 +26,6 @@ void-spinner[size="sm"] { width: 1rem; height: 1rem; }
|
|
|
26
26
|
void-spinner[size="sm"]::before { border-width: 1.5px; }
|
|
27
27
|
void-spinner[size="lg"] { width: 2rem; height: 2rem; }
|
|
28
28
|
void-spinner[size="lg"]::before { border-width: 3px; }
|
|
29
|
-
void-spinner[size="xl"] { width: 2.5rem; height: 2.5rem; }
|
|
30
|
-
void-spinner[size="xl"]::before { border-width: 3.5px; }
|
|
31
|
-
void-spinner[size="xxl"] { width: 3.5rem; height: 3.5rem; }
|
|
32
|
-
void-spinner[size="xxl"]::before { border-width: 4px; }
|
|
33
29
|
|
|
34
30
|
/* Screen reader text (rendered by the component) */
|
|
35
31
|
void-spinner [data-void-sr] {
|
|
@@ -43,3 +39,8 @@ void-spinner [data-void-sr] {
|
|
|
43
39
|
white-space: nowrap;
|
|
44
40
|
border: 0;
|
|
45
41
|
}
|
|
42
|
+
|
|
43
|
+
/* Reduced motion: keep the spinner perceivable, but rotate it slowly */
|
|
44
|
+
@media (prefers-reduced-motion: reduce) {
|
|
45
|
+
void-spinner::before { animation-duration: 3s; }
|
|
46
|
+
}
|
package/src/components/stat.css
CHANGED
|
@@ -1,41 +1,64 @@
|
|
|
1
|
+
/* A stat is three type roles stacked: label, value, caption (the
|
|
2
|
+
delta). Its container is a hairline with the chrome knob's fill; a
|
|
3
|
+
colour tints it. */
|
|
4
|
+
/* @tokens void-stat
|
|
5
|
+
--void-stat-padding Padding inside the stat. Applies at every size.
|
|
6
|
+
--void-stat-value-font-size Size of the value. Applies at every size. */
|
|
7
|
+
|
|
1
8
|
void-stat {
|
|
2
|
-
--tone: var(--void-color-accent);
|
|
3
|
-
--tone-subtle:
|
|
4
|
-
--tone-border:
|
|
9
|
+
--_void-tone: var(--void-color-accent);
|
|
10
|
+
--_void-tone-subtle: var(--void-container-surface);
|
|
11
|
+
--_void-tone-border: var(--void-container-border);
|
|
12
|
+
--_void-stat-padding: var(--void-stat-padding, var(--void-container-padding));
|
|
13
|
+
--_void-stat-value-font-size: var(--void-stat-value-font-size, var(--void-type-value-size));
|
|
5
14
|
|
|
6
15
|
display: flex;
|
|
7
16
|
flex-direction: column;
|
|
8
|
-
gap: var(--void-
|
|
9
|
-
padding: var(--
|
|
10
|
-
border:
|
|
11
|
-
border-radius: var(--void-radius
|
|
12
|
-
|
|
17
|
+
gap: var(--void-gap-tight);
|
|
18
|
+
padding: var(--_void-stat-padding);
|
|
19
|
+
border: var(--void-container-border-width) solid var(--_void-tone-border);
|
|
20
|
+
border-radius: var(--void-container-radius);
|
|
21
|
+
box-shadow: var(--void-container-shadow);
|
|
22
|
+
background: var(--_void-tone-subtle);
|
|
13
23
|
}
|
|
14
24
|
|
|
15
25
|
.void-stat-label {
|
|
16
|
-
font-family: var(--void-
|
|
17
|
-
font-size: var(--void-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
letter-spacing:
|
|
26
|
+
font-family: var(--void-type-label-family);
|
|
27
|
+
font-size: var(--void-type-label-size);
|
|
28
|
+
line-height: var(--void-type-label-leading);
|
|
29
|
+
font-weight: var(--void-type-label-weight);
|
|
30
|
+
letter-spacing: var(--void-type-label-tracking);
|
|
31
|
+
text-transform: var(--void-type-label-case);
|
|
32
|
+
color: var(--void-type-label-color);
|
|
21
33
|
}
|
|
22
34
|
|
|
23
35
|
.void-stat-value {
|
|
24
|
-
font-family: var(--void-
|
|
25
|
-
font-size: var(--
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
letter-spacing: -
|
|
29
|
-
|
|
36
|
+
font-family: var(--void-type-value-family);
|
|
37
|
+
font-size: var(--_void-stat-value-font-size);
|
|
38
|
+
line-height: var(--void-type-value-leading);
|
|
39
|
+
font-weight: var(--void-type-value-weight);
|
|
40
|
+
letter-spacing: var(--void-type-value-tracking);
|
|
41
|
+
font-variant-numeric: var(--void-type-value-numeric);
|
|
42
|
+
color: var(--void-type-value-color);
|
|
30
43
|
}
|
|
31
44
|
|
|
32
45
|
.void-stat-delta {
|
|
33
46
|
display: inline-flex;
|
|
34
47
|
align-items: center;
|
|
35
48
|
gap: var(--void-space-1);
|
|
36
|
-
font-family: var(--void-
|
|
37
|
-
font-size: var(--void-
|
|
49
|
+
font-family: var(--void-type-caption-family);
|
|
50
|
+
font-size: var(--void-type-caption-size);
|
|
51
|
+
line-height: var(--void-type-caption-leading);
|
|
52
|
+
font-weight: var(--void-type-caption-weight);
|
|
53
|
+
font-variant-numeric: tabular-nums;
|
|
54
|
+
color: var(--void-type-caption-color);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.void-stat-description {
|
|
58
|
+
font-family: var(--void-font-sans);
|
|
59
|
+
font-size: var(--void-text-sm);
|
|
38
60
|
color: var(--void-color-text-secondary);
|
|
61
|
+
line-height: var(--void-leading-normal);
|
|
39
62
|
}
|
|
40
63
|
|
|
41
64
|
void-stat[trend="up"] .void-stat-delta { color: var(--void-color-success); }
|
|
@@ -50,41 +73,25 @@ void-stat[trend="highlight"] .void-stat-delta { color: var(--void-color-highligh
|
|
|
50
73
|
|
|
51
74
|
/* Sizes */
|
|
52
75
|
void-stat[size="sm"] {
|
|
53
|
-
padding: var(--void-space-3);
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
void-stat[size="sm"] .void-stat-value {
|
|
57
|
-
font-size: var(--void-text-2xl);
|
|
76
|
+
--_void-stat-padding: var(--void-stat-padding, var(--void-space-3));
|
|
77
|
+
--_void-stat-value-font-size: var(--void-stat-value-font-size, var(--void-text-2xl));
|
|
58
78
|
}
|
|
59
79
|
|
|
60
80
|
void-stat[size="lg"] {
|
|
61
|
-
padding: var(--void-space-6);
|
|
81
|
+
--_void-stat-padding: var(--void-stat-padding, var(--void-space-6));
|
|
82
|
+
--_void-stat-value-font-size: var(--void-stat-value-font-size, var(--void-text-4xl));
|
|
62
83
|
}
|
|
63
84
|
|
|
64
|
-
void-stat[
|
|
65
|
-
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
void-stat[
|
|
69
|
-
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
void-stat[size="xl"] .void-stat-value {
|
|
73
|
-
font-size: var(--void-text-5xl);
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
void-stat[size="xxl"] {
|
|
77
|
-
padding: var(--void-space-10);
|
|
78
|
-
}
|
|
85
|
+
void-stat[color="error"] { --_void-tone: var(--void-color-error); }
|
|
86
|
+
void-stat[color="warning"] { --_void-tone: var(--void-color-warning); }
|
|
87
|
+
void-stat[color="caution"] { --_void-tone: var(--void-color-caution); }
|
|
88
|
+
void-stat[color="success"] { --_void-tone: var(--void-color-success); }
|
|
89
|
+
void-stat[color="info"] { --_void-tone: var(--void-color-info); }
|
|
90
|
+
void-stat[color="notice"] { --_void-tone: var(--void-color-notice); }
|
|
91
|
+
void-stat[color="highlight"] { --_void-tone: var(--void-color-highlight); }
|
|
79
92
|
|
|
80
|
-
|
|
81
|
-
|
|
93
|
+
/* The attribute is reflected, so the plain stat carries color="default". */
|
|
94
|
+
void-stat[color]:not([color="default"]) {
|
|
95
|
+
--_void-tone-subtle: color-mix(in srgb, var(--_void-tone) var(--void-tone-tint), transparent);
|
|
96
|
+
--_void-tone-border: color-mix(in srgb, var(--_void-tone) 36%, transparent);
|
|
82
97
|
}
|
|
83
|
-
|
|
84
|
-
void-stat[color="error"] { --tone: var(--void-color-error); }
|
|
85
|
-
void-stat[color="warning"] { --tone: var(--void-color-warning); }
|
|
86
|
-
void-stat[color="caution"] { --tone: var(--void-color-caution); }
|
|
87
|
-
void-stat[color="success"] { --tone: var(--void-color-success); }
|
|
88
|
-
void-stat[color="info"] { --tone: var(--void-color-info); }
|
|
89
|
-
void-stat[color="notice"] { --tone: var(--void-color-notice); }
|
|
90
|
-
void-stat[color="highlight"] { --tone: var(--void-color-highlight); }
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
void-switch {
|
|
2
|
-
--tone: var(--void-color-accent);
|
|
3
|
-
--tone-subtle: color-mix(in srgb, var(--tone) 20%, transparent);
|
|
4
|
-
--tone-border: color-mix(in srgb, var(--tone) 40%, transparent);
|
|
2
|
+
--_void-tone: var(--void-color-accent);
|
|
3
|
+
--_void-tone-subtle: color-mix(in srgb, var(--_void-tone) 20%, transparent);
|
|
5
4
|
|
|
6
5
|
display: inline-flex;
|
|
7
6
|
align-items: center;
|
|
@@ -15,8 +14,8 @@ void-switch {
|
|
|
15
14
|
align-items: center;
|
|
16
15
|
width: 2.25rem;
|
|
17
16
|
height: 1.25rem;
|
|
18
|
-
background: var(--tone-subtle);
|
|
19
|
-
border: 1px solid var(--
|
|
17
|
+
background: var(--_void-tone-subtle);
|
|
18
|
+
border: 1px solid var(--void-control-border);
|
|
20
19
|
border-radius: var(--void-radius-full);
|
|
21
20
|
transition: background var(--void-duration-fast) var(--void-ease-in-out),
|
|
22
21
|
border-color var(--void-duration-fast) var(--void-ease-in-out);
|
|
@@ -34,8 +33,8 @@ void-switch {
|
|
|
34
33
|
}
|
|
35
34
|
|
|
36
35
|
void-switch[checked] .void-switch-track {
|
|
37
|
-
background: var(--tone);
|
|
38
|
-
border-color: var(--tone);
|
|
36
|
+
background: var(--_void-tone);
|
|
37
|
+
border-color: var(--_void-tone);
|
|
39
38
|
}
|
|
40
39
|
|
|
41
40
|
void-switch[checked] .void-switch-thumb {
|
|
@@ -44,20 +43,21 @@ void-switch[checked] .void-switch-thumb {
|
|
|
44
43
|
}
|
|
45
44
|
|
|
46
45
|
void-switch:focus-visible .void-switch-track {
|
|
47
|
-
outline:
|
|
48
|
-
outline-offset:
|
|
46
|
+
outline: var(--void-focus-ring-width) solid var(--void-focus-ring-color);
|
|
47
|
+
outline-offset: var(--void-focus-ring-offset);
|
|
49
48
|
}
|
|
50
49
|
|
|
51
|
-
void-switch:hover .void-switch-track {
|
|
52
|
-
border-color: var(--void-
|
|
50
|
+
void-switch:not([checked]):hover .void-switch-track {
|
|
51
|
+
border-color: var(--void-control-border);
|
|
53
52
|
}
|
|
54
53
|
|
|
55
|
-
void-switch[color="error"] { --tone: var(--void-color-error); }
|
|
56
|
-
void-switch[color="warning"] { --tone: var(--void-color-warning); }
|
|
57
|
-
void-switch[color="caution"] { --tone: var(--void-color-caution); }
|
|
58
|
-
void-switch[color="
|
|
59
|
-
void-switch[color="
|
|
60
|
-
void-switch[color="
|
|
54
|
+
void-switch[color="error"] { --_void-tone: var(--void-color-error); }
|
|
55
|
+
void-switch[color="warning"] { --_void-tone: var(--void-color-warning); }
|
|
56
|
+
void-switch[color="caution"] { --_void-tone: var(--void-color-caution); }
|
|
57
|
+
void-switch[color="highlight"] { --_void-tone: var(--void-color-highlight); }
|
|
58
|
+
void-switch[color="success"] { --_void-tone: var(--void-color-success); }
|
|
59
|
+
void-switch[color="info"] { --_void-tone: var(--void-color-info); }
|
|
60
|
+
void-switch[color="notice"] { --_void-tone: var(--void-color-notice); }
|
|
61
61
|
|
|
62
62
|
void-switch[size="sm"] .void-switch-track { width: 1.75rem; height: 1rem; }
|
|
63
63
|
void-switch[size="sm"] .void-switch-thumb { width: 0.625rem; height: 0.625rem; }
|
|
@@ -65,15 +65,7 @@ void-switch[size="sm"][checked] .void-switch-thumb { transform: translateX(0.75r
|
|
|
65
65
|
|
|
66
66
|
void-switch[size="lg"] .void-switch-track { width: 2.75rem; height: 1.5rem; }
|
|
67
67
|
void-switch[size="lg"] .void-switch-thumb { width: 1.125rem; height: 1.125rem; }
|
|
68
|
-
void-switch[size="lg"][checked] .void-switch-thumb { transform: translateX(1.25rem); }
|
|
69
|
-
|
|
70
|
-
void-switch[size="xl"] .void-switch-track { width: 3.25rem; height: 1.75rem; }
|
|
71
|
-
void-switch[size="xl"] .void-switch-thumb { width: 1.375rem; height: 1.375rem; }
|
|
72
|
-
void-switch[size="xl"][checked] .void-switch-thumb { transform: translateX(1.5rem); }
|
|
73
|
-
|
|
74
|
-
void-switch[size="xxl"] .void-switch-track { width: 3.75rem; height: 2rem; }
|
|
75
|
-
void-switch[size="xxl"] .void-switch-thumb { width: 1.625rem; height: 1.625rem; }
|
|
76
|
-
void-switch[size="xxl"][checked] .void-switch-thumb { transform: translateX(1.75rem); }
|
|
68
|
+
void-switch[size="lg"][checked] .void-switch-thumb { transform: translateX(1.25rem); } /* token-ok: track size, not a control height */
|
|
77
69
|
|
|
78
70
|
void-switch[disabled] {
|
|
79
71
|
opacity: 0.5;
|