@voidable/theme 0.2.0 → 0.4.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.
@@ -27,6 +27,7 @@ void-compose-input {
27
27
  font-size: var(--void-text-sm);
28
28
  resize: none;
29
29
  outline: none;
30
+ height: var(--void-compose-input-height, auto);
30
31
  min-height: 1.5rem;
31
32
  max-height: 8rem;
32
33
  overflow-y: auto;
@@ -10,7 +10,7 @@ void-dialog[open] {
10
10
  position: fixed;
11
11
  inset: 0;
12
12
  background: var(--void-color-bg-overlay);
13
- z-index: 1000;
13
+ z-index: var(--void-z-modal);
14
14
  display: flex;
15
15
  align-items: center;
16
16
  justify-content: center;
@@ -10,12 +10,12 @@ void-drawer[open] {
10
10
  position: fixed;
11
11
  inset: 0;
12
12
  background: var(--void-color-bg-overlay);
13
- z-index: 1000;
13
+ z-index: var(--void-z-modal);
14
14
  }
15
15
 
16
16
  .void-drawer-panel {
17
17
  position: fixed;
18
- z-index: 1001;
18
+ z-index: calc(var(--void-z-modal) + 1);
19
19
  display: flex;
20
20
  flex-direction: column;
21
21
  background: var(--void-color-bg-elevated);
@@ -16,7 +16,7 @@ void-error-fallback {
16
16
  }
17
17
 
18
18
  .void-error-fallback-icon {
19
- font-size: 2rem;
19
+ font-size: var(--void-text-3xl);
20
20
  color: var(--void-color-error);
21
21
  opacity: 0.7;
22
22
  }
@@ -5,6 +5,10 @@ void-file-upload {
5
5
  font-family: var(--void-font-sans);
6
6
  }
7
7
 
8
+ .void-file-upload-input {
9
+ display: none;
10
+ }
11
+
8
12
  .void-file-upload-dropzone {
9
13
  border: 2px dashed var(--void-color-border);
10
14
  border-radius: var(--void-radius-lg);
@@ -38,7 +42,7 @@ void-file-upload[dragging] .void-file-upload-dropzone {
38
42
 
39
43
  .void-file-upload-browse {
40
44
  color: var(--void-color-accent);
41
- font-weight: 500;
45
+ font-weight: var(--void-weight-medium);
42
46
  }
43
47
 
44
48
  .void-file-upload-files {
@@ -0,0 +1,162 @@
1
+ void-menu {
2
+ display: none;
3
+ flex-direction: column;
4
+ font-family: var(--void-font-sans);
5
+ background: var(--void-color-bg-elevated);
6
+ border: 1px solid var(--void-color-border);
7
+ border-radius: var(--void-radius-md);
8
+ box-shadow: 0 4px 16px var(--void-color-bg-overlay);
9
+ overflow: hidden;
10
+ min-width: 220px;
11
+ }
12
+
13
+ void-menu[open] {
14
+ display: flex;
15
+ }
16
+
17
+ /* ── Search input ── */
18
+ .void-menu-search {
19
+ width: 100%;
20
+ padding: var(--void-space-2) var(--void-space-3);
21
+ background: transparent;
22
+ border: none;
23
+ border-bottom: 1px solid var(--void-color-border);
24
+ color: var(--void-color-text);
25
+ font-family: inherit;
26
+ font-size: var(--void-text-sm);
27
+ line-height: var(--void-leading-normal);
28
+ outline: none;
29
+ }
30
+
31
+ .void-menu-search::placeholder {
32
+ color: var(--void-color-text-muted);
33
+ }
34
+
35
+ /* ── List container ── */
36
+ .void-menu-list {
37
+ padding: var(--void-space-1) 0;
38
+ max-height: 20rem;
39
+ overflow-y: auto;
40
+ }
41
+
42
+ /* ── Menu item ── */
43
+ void-menu-item {
44
+ display: flex;
45
+ align-items: center;
46
+ gap: var(--void-space-2);
47
+ padding: var(--void-space-2) var(--void-space-3);
48
+ font-family: var(--void-font-sans);
49
+ font-size: var(--void-text-sm);
50
+ color: var(--void-color-text);
51
+ cursor: pointer;
52
+ user-select: none;
53
+ outline: none;
54
+ transition: background var(--void-duration-fast) var(--void-ease-in-out);
55
+ }
56
+
57
+ void-menu-item:hover {
58
+ background: var(--void-color-bg-hover);
59
+ }
60
+
61
+ void-menu-item:focus-visible {
62
+ background: var(--void-color-bg-hover);
63
+ }
64
+
65
+ void-menu-item[disabled] {
66
+ opacity: 0.5;
67
+ pointer-events: none;
68
+ cursor: default;
69
+ }
70
+
71
+ void-menu-item[hidden] {
72
+ display: none;
73
+ }
74
+
75
+ /* ── Item sub-elements ── */
76
+ .void-menu-item-icon {
77
+ flex-shrink: 0;
78
+ width: 1rem;
79
+ display: inline-flex;
80
+ align-items: center;
81
+ justify-content: center;
82
+ color: var(--void-color-text-secondary);
83
+ }
84
+
85
+ .void-menu-item-label {
86
+ flex: 1;
87
+ min-width: 0;
88
+ }
89
+
90
+ .void-menu-item-shortcut {
91
+ flex-shrink: 0;
92
+ margin-left: auto;
93
+ font-size: var(--void-text-xs);
94
+ color: var(--void-color-text-muted);
95
+ }
96
+
97
+ /* ── Menu group ── */
98
+ void-menu-group {
99
+ display: block;
100
+ }
101
+
102
+ void-menu-group[hidden] {
103
+ display: none;
104
+ }
105
+
106
+ void-menu-group + void-menu-group {
107
+ border-top: 1px solid var(--void-color-border);
108
+ }
109
+
110
+ .void-menu-group-label {
111
+ padding: var(--void-space-2) var(--void-space-3) var(--void-space-1);
112
+ font-size: var(--void-text-xs);
113
+ font-weight: var(--void-weight-medium);
114
+ color: var(--void-color-text-muted);
115
+ text-transform: uppercase;
116
+ letter-spacing: 0.05em;
117
+ user-select: none;
118
+ }
119
+
120
+ .void-menu-group-items {
121
+ display: flex;
122
+ flex-direction: column;
123
+ }
124
+
125
+ /* ── Empty state ── */
126
+ .void-menu-empty {
127
+ padding: var(--void-space-3) var(--void-space-3);
128
+ color: var(--void-color-text-muted);
129
+ font-size: var(--void-text-xs);
130
+ text-align: center;
131
+ }
132
+
133
+ /* ── Size variants ── */
134
+ void-menu[size='sm'] {
135
+ min-width: 180px;
136
+ }
137
+ void-menu[size='sm'] .void-menu-search {
138
+ padding: var(--void-space-1h) var(--void-space-2);
139
+ font-size: var(--void-text-xs);
140
+ }
141
+ void-menu[size='sm'] void-menu-item {
142
+ padding: var(--void-space-1h) var(--void-space-2);
143
+ font-size: var(--void-text-xs);
144
+ }
145
+ void-menu[size='sm'] .void-menu-list {
146
+ max-height: 14rem;
147
+ }
148
+
149
+ void-menu[size='lg'] {
150
+ min-width: 320px;
151
+ }
152
+ void-menu[size='lg'] .void-menu-search {
153
+ padding: var(--void-space-3) var(--void-space-4);
154
+ font-size: var(--void-text-base);
155
+ }
156
+ void-menu[size='lg'] void-menu-item {
157
+ padding: var(--void-space-3) var(--void-space-4);
158
+ font-size: var(--void-text-base);
159
+ }
160
+ void-menu[size='lg'] .void-menu-list {
161
+ max-height: 28rem;
162
+ }
@@ -97,7 +97,7 @@ void-multiselect[aria-expanded="true"] .void-multiselect-trigger {
97
97
  box-shadow: 0 4px 16px var(--void-color-bg-overlay);
98
98
  max-height: 16rem;
99
99
  overflow-y: auto;
100
- z-index: 100;
100
+ z-index: var(--void-z-dropdown);
101
101
  padding: var(--void-space-1) 0;
102
102
  }
103
103
 
@@ -11,7 +11,7 @@ void-nav-bar[bordered] {
11
11
  void-nav-bar[sticky] {
12
12
  position: sticky;
13
13
  top: 0;
14
- z-index: 100;
14
+ z-index: var(--void-z-sticky);
15
15
  }
16
16
 
17
17
  void-nav-bar[variant="elevated"] {
@@ -0,0 +1,186 @@
1
+ /* ============================================================
2
+ void-number-input — Tone system component
3
+ ============================================================ */
4
+
5
+ void-number-input {
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);
11
+
12
+ display: inline-flex;
13
+ align-items: stretch;
14
+ 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
+ overflow: hidden;
19
+ transition: border-color var(--void-duration-fast) var(--void-ease-in-out),
20
+ box-shadow var(--void-duration-fast) var(--void-ease-in-out);
21
+ }
22
+
23
+ void-number-input:focus-within {
24
+ border-color: var(--void-color-border-focus);
25
+ box-shadow: 0 0 0 1px var(--void-color-border-focus);
26
+ }
27
+
28
+ void-number-input:hover:not(:focus-within) {
29
+ border-color: var(--void-color-border-strong);
30
+ }
31
+
32
+ /* The native input inside */
33
+ void-number-input input.void-number-input-field {
34
+ flex: 1;
35
+ min-width: 0;
36
+ padding: var(--void-space-2) var(--void-space-3);
37
+ background: transparent;
38
+ border: none;
39
+ color: var(--void-color-text);
40
+ font-family: inherit;
41
+ font-size: var(--void-text-sm);
42
+ line-height: var(--void-leading-normal);
43
+ outline: none;
44
+ text-align: center;
45
+ -moz-appearance: textfield;
46
+ }
47
+
48
+ void-number-input input.void-number-input-field::placeholder {
49
+ color: var(--void-color-text-muted);
50
+ }
51
+
52
+ /* Stepper buttons */
53
+ .void-number-input-btn {
54
+ display: inline-flex;
55
+ align-items: center;
56
+ justify-content: center;
57
+ padding: 0 var(--void-space-3);
58
+ background: transparent;
59
+ border: none;
60
+ color: var(--void-color-text-secondary);
61
+ cursor: pointer;
62
+ transition: background var(--void-duration-fast) var(--void-ease-in-out),
63
+ color var(--void-duration-fast) var(--void-ease-in-out);
64
+ user-select: none;
65
+ -webkit-user-select: none;
66
+ flex-shrink: 0;
67
+ }
68
+
69
+ .void-number-input-btn:hover:not(:disabled) {
70
+ background: var(--tone-hover);
71
+ color: var(--void-color-text);
72
+ }
73
+
74
+ .void-number-input-btn:focus-visible {
75
+ outline: 2px solid var(--void-color-border-focus);
76
+ outline-offset: -2px;
77
+ }
78
+
79
+ .void-number-input-btn:disabled {
80
+ opacity: 0.35;
81
+ cursor: not-allowed;
82
+ }
83
+
84
+ /* Separator lines between btn and input */
85
+ .void-number-input-btn-dec {
86
+ border-right: 1px solid var(--void-color-border);
87
+ }
88
+
89
+ .void-number-input-btn-inc {
90
+ border-left: 1px solid var(--void-color-border);
91
+ }
92
+
93
+ /* controls="right" — both buttons stacked vertically on the right */
94
+ void-number-input[controls="right"] .void-number-input-btn-group {
95
+ display: flex;
96
+ flex-direction: column;
97
+ border-left: 1px solid var(--void-color-border);
98
+ }
99
+
100
+ void-number-input[controls="right"] .void-number-input-btn {
101
+ flex: 1;
102
+ padding: 0 var(--void-space-2);
103
+ border: none;
104
+ }
105
+
106
+ void-number-input[controls="right"] .void-number-input-btn-inc {
107
+ border-bottom: 1px solid var(--void-color-border);
108
+ }
109
+
110
+ /* controls="none" — just the input, no separators */
111
+ void-number-input[controls="none"] input.void-number-input-field {
112
+ text-align: left;
113
+ }
114
+
115
+ /* 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="success"] { --tone: var(--void-color-success); }
119
+ void-number-input[color="info"] { --tone: var(--void-color-info); }
120
+ void-number-input[color="notice"] { --tone: var(--void-color-notice); }
121
+
122
+ void-number-input:where([color="error"], [color="warning"], [color="success"], [color="info"], [color="notice"]) {
123
+ border-color: var(--tone-border);
124
+ background: var(--tone-subtle);
125
+ }
126
+
127
+ void-number-input:where([color="error"], [color="warning"], [color="success"], [color="info"], [color="notice"]) .void-number-input-btn {
128
+ color: var(--tone);
129
+ }
130
+
131
+ void-number-input:where([color="error"], [color="warning"], [color="success"], [color="info"], [color="notice"]) .void-number-input-btn-dec {
132
+ border-right-color: var(--tone-border);
133
+ }
134
+
135
+ void-number-input:where([color="error"], [color="warning"], [color="success"], [color="info"], [color="notice"]) .void-number-input-btn-inc {
136
+ border-left-color: var(--tone-border);
137
+ }
138
+
139
+ void-number-input:where([color="error"], [color="warning"], [color="success"], [color="info"], [color="notice"]):where([controls="right"]) .void-number-input-btn-group {
140
+ border-left-color: var(--tone-border);
141
+ }
142
+
143
+ void-number-input:where([color="error"], [color="warning"], [color="success"], [color="info"], [color="notice"]):where([controls="right"]) .void-number-input-btn-inc {
144
+ border-bottom-color: var(--tone-border);
145
+ }
146
+
147
+ void-number-input:where([color="error"], [color="warning"], [color="success"], [color="info"], [color="notice"]):focus-within {
148
+ border-color: var(--tone);
149
+ box-shadow: 0 0 0 1px var(--tone);
150
+ }
151
+
152
+ /* Size variants */
153
+ void-number-input[size="sm"] input.void-number-input-field {
154
+ padding: var(--void-space-1) var(--void-space-2);
155
+ font-size: var(--void-text-xs);
156
+ }
157
+
158
+ void-number-input[size="sm"] .void-number-input-btn {
159
+ padding: 0 var(--void-space-2);
160
+ font-size: var(--void-text-xs);
161
+ }
162
+
163
+ void-number-input[size="lg"] input.void-number-input-field {
164
+ padding: var(--void-space-3) var(--void-space-4);
165
+ font-size: var(--void-text-base);
166
+ }
167
+
168
+ void-number-input[size="lg"] .void-number-input-btn {
169
+ padding: 0 var(--void-space-4);
170
+ }
171
+
172
+ /* Disabled state */
173
+ void-number-input[disabled] {
174
+ opacity: 0.5;
175
+ cursor: not-allowed;
176
+ }
177
+
178
+ void-number-input[disabled] input.void-number-input-field {
179
+ cursor: not-allowed;
180
+ pointer-events: none;
181
+ }
182
+
183
+ /* Readonly state */
184
+ void-number-input[readonly] input.void-number-input-field {
185
+ cursor: default;
186
+ }
@@ -6,7 +6,7 @@ void-popover {
6
6
  .void-popover-body {
7
7
  display: none;
8
8
  position: absolute;
9
- z-index: 1000;
9
+ z-index: var(--void-z-dropdown);
10
10
  min-width: 12rem;
11
11
  background: var(--void-color-bg-elevated);
12
12
  border: 1px solid var(--void-color-border);
@@ -15,6 +15,7 @@ void-progress {
15
15
 
16
16
  .void-progress-fill {
17
17
  height: 100%;
18
+ width: var(--void-progress-fill, 0%);
18
19
  background: var(--tone);
19
20
  border-radius: var(--void-radius-full);
20
21
  transition: width var(--void-duration-normal) var(--void-ease-in-out);
@@ -4,6 +4,7 @@ void-scroll-area {
4
4
 
5
5
  .void-scroll-area-viewport {
6
6
  overflow: hidden;
7
+ max-height: var(--void-scroll-area-max-height);
7
8
  }
8
9
 
9
10
  void-scroll-area[direction="vertical"] .void-scroll-area-viewport {
@@ -1,7 +1,7 @@
1
1
  void-sidebar {
2
2
  display: flex;
3
3
  flex-direction: column;
4
- width: var(--void-sidebar-width, 240px);
4
+ width: var(--void-sidebar-width);
5
5
  height: 100%;
6
6
  background: var(--void-color-bg);
7
7
  border-right: 1px solid var(--void-color-border);
@@ -12,8 +12,8 @@ void-slider input[type="range"] {
12
12
  height: 4px;
13
13
  background: linear-gradient(
14
14
  to right,
15
- var(--void-color-accent) var(--fill, 50%),
16
- var(--void-color-border) var(--fill, 50%)
15
+ var(--void-color-accent) var(--void-slider-fill, 50%),
16
+ var(--void-color-border) var(--void-slider-fill, 50%)
17
17
  );
18
18
  border-radius: var(--void-radius-full);
19
19
  outline: none;
@@ -77,7 +77,7 @@ void-stat[size="xxl"] {
77
77
  }
78
78
 
79
79
  void-stat[size="xxl"] .void-stat-value {
80
- font-size: 4rem;
80
+ font-size: 4rem; /* token-ok: display size beyond scale */
81
81
  }
82
82
 
83
83
  void-stat[color="error"] { --tone: var(--void-color-error); }
@@ -8,9 +8,10 @@ void-stepper {
8
8
  display: flex;
9
9
  flex-direction: column;
10
10
  align-items: center;
11
- gap: var(--void-space-1);
12
- flex: 1;
11
+ gap: var(--void-space-2);
12
+ flex: 0 0 auto;
13
13
  position: relative;
14
+ padding-bottom: calc(var(--void-text-xs) + var(--void-space-2));
14
15
  }
15
16
 
16
17
  .void-stepper-circle {
@@ -45,9 +46,14 @@ void-stepper {
45
46
  }
46
47
 
47
48
  .void-stepper-label {
49
+ position: absolute;
50
+ bottom: 0;
51
+ left: 50%;
52
+ transform: translateX(-50%);
48
53
  font-size: var(--void-text-xs);
49
54
  color: var(--void-color-text-muted);
50
55
  text-align: center;
56
+ white-space: nowrap;
51
57
  }
52
58
 
53
59
  .void-stepper-step[data-state="active"] .void-stepper-label {
@@ -58,9 +64,9 @@ void-stepper {
58
64
  .void-stepper-connector {
59
65
  height: 2px;
60
66
  background-color: var(--void-color-border);
61
- flex: 1;
67
+ flex: 1 1 0%;
62
68
  align-self: flex-start;
63
- margin-top: 1rem;
69
+ margin-top: calc(1rem - 1px);
64
70
  }
65
71
 
66
72
  .void-stepper-connector[data-state="completed"] {
@@ -7,6 +7,7 @@ void-textarea {
7
7
 
8
8
  void-textarea textarea {
9
9
  width: 100%;
10
+ resize: var(--void-textarea-resize, vertical);
10
11
  padding: var(--void-space-2) var(--void-space-3);
11
12
  background: var(--void-color-bg-secondary);
12
13
  border: 1px solid var(--void-color-border);
@@ -2,7 +2,7 @@ void-toast-container {
2
2
  position: fixed;
3
3
  bottom: 0;
4
4
  right: 0;
5
- z-index: 1100;
5
+ z-index: var(--void-z-toast);
6
6
  display: flex;
7
7
  flex-direction: column;
8
8
  gap: var(--void-space-2);
@@ -0,0 +1,19 @@
1
+ void-toggle-group {
2
+ display: inline-flex;
3
+ gap: var(--void-space-1);
4
+ flex-wrap: wrap;
5
+ font-family: var(--void-font-sans);
6
+ }
7
+
8
+ void-toggle-group[orientation="horizontal"] {
9
+ flex-direction: row;
10
+ }
11
+
12
+ void-toggle-group[orientation="vertical"] {
13
+ flex-direction: column;
14
+ }
15
+
16
+ void-toggle-group[disabled] {
17
+ opacity: 0.5;
18
+ pointer-events: none;
19
+ }
@@ -19,7 +19,7 @@ void-tooltip {
19
19
  pointer-events: none;
20
20
  opacity: 0;
21
21
  transition: opacity var(--void-duration-fast) var(--void-ease-in-out);
22
- z-index: 1000;
22
+ z-index: var(--void-z-tooltip);
23
23
  }
24
24
 
25
25
  void-tooltip[visible] .void-tooltip-bubble {
package/src/index.css CHANGED
@@ -47,7 +47,12 @@
47
47
  @import './components/sidebar.css';
48
48
  @import './components/segmented-control.css';
49
49
  @import './components/toggle.css';
50
+ @import './components/toggle-group.css';
50
51
  @import './components/stat.css';
51
52
 
53
+ @import './components/calendar.css';
54
+ @import './components/carousel.css';
52
55
  @import './components/dropdown-menu.css';
53
56
  @import './components/indicator.css';
57
+ @import './components/menu.css';
58
+ @import './components/number-input.css';
@@ -108,17 +108,28 @@
108
108
 
109
109
  /* ── Spacing (rem) ── */
110
110
  --void-space-1: 0.25rem;
111
+ --void-space-1h: 0.375rem;
111
112
  --void-space-2: 0.5rem;
113
+ --void-space-2h: 0.625rem;
112
114
  --void-space-3: 0.75rem;
113
115
  --void-space-4: 1rem;
114
116
  --void-space-5: 1.25rem;
115
117
  --void-space-6: 1.5rem;
118
+ --void-space-7: 1.75rem;
116
119
  --void-space-8: 2rem;
120
+ --void-space-9: 2.25rem;
117
121
  --void-space-10: 2.5rem;
118
122
  --void-space-12: 3rem;
123
+ --void-space-14: 3.5rem;
124
+ --void-space-15: 3.75rem;
119
125
  --void-space-16: 4rem;
120
126
  --void-space-20: 5rem;
121
127
  --void-space-24: 6rem;
128
+ --void-space-28: 7rem;
129
+ --void-space-30: 7.5rem;
130
+ --void-space-32: 8rem;
131
+ --void-space-35: 8.75rem;
132
+ --void-space-40: 10rem;
122
133
 
123
134
  --void-space-xs: var(--void-space-1);
124
135
  --void-space-sm: var(--void-space-2);
@@ -146,9 +157,23 @@
146
157
  --void-weight-bold: 700;
147
158
 
148
159
  /* ── Typography — line heights ── */
160
+ --void-leading-display: 0.92;
161
+ --void-leading-none: 1;
162
+ --void-leading-snug: 1.05;
149
163
  --void-leading-tight: 1.2;
150
164
  --void-leading-normal: 1.5;
151
165
  --void-leading-relaxed: 1.7;
166
+ --void-leading-loose: 1.75;
167
+
168
+ /* ── Typography — letter spacing (tracking) ── */
169
+ --void-tracking-tightest: -0.05em;
170
+ --void-tracking-tighter: -0.04em;
171
+ --void-tracking-tight: -0.025em;
172
+ --void-tracking-snug: -0.01em;
173
+ --void-tracking-normal: 0em;
174
+ --void-tracking-wide: 0.04em;
175
+ --void-tracking-wider: 0.06em;
176
+ --void-tracking-widest: 0.1em;
152
177
 
153
178
  /* ── Font stacks ── */
154
179
  --void-font-sans: 'Inter', ui-sans-serif, system-ui, -apple-system, sans-serif;
@@ -189,4 +214,11 @@
189
214
  --void-z-modal: 300;
190
215
  --void-z-toast: 400;
191
216
  --void-z-tooltip: 500;
217
+
218
+ /* ── Icon ── */
219
+ --void-icon-stroke-width: 1.5;
220
+
221
+ /* ── Sidebar ── */
222
+ --void-sidebar-width: 15rem;
223
+ --void-sidebar-collapsed-width: 3.75rem;
192
224
  }