minora 0.1.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/LICENSE +21 -0
- package/README.md +292 -0
- package/dist/minora.css +7499 -0
- package/dist/minora.js +779 -0
- package/dist/minora.min.css +7 -0
- package/dist/minora.min.js +2 -0
- package/dist/tokens.css +542 -0
- package/package.json +45 -0
- package/src/components/alert.css +659 -0
- package/src/components/avatar.css +463 -0
- package/src/components/badge.css +577 -0
- package/src/components/button.css +493 -0
- package/src/components/checkbox.css +605 -0
- package/src/components/divider.css +295 -0
- package/src/components/form-validation.css +700 -0
- package/src/components/input.css +625 -0
- package/src/components/modal.css +437 -0
- package/src/components/select.css +616 -0
- package/src/components/toast.css +586 -0
- package/src/components/toggle.css +457 -0
- package/src/components/tooltip.css +401 -0
- package/src/js/modal.js +127 -0
- package/src/js/select.js +272 -0
- package/src/js/toast.js +140 -0
- package/src/js/tooltip.js +224 -0
- package/src/tokens.css +542 -0
|
@@ -0,0 +1,605 @@
|
|
|
1
|
+
/* ============================================================
|
|
2
|
+
ELEGANT MINIMALIST UI KIT — Checkbox, Radio & Groups
|
|
3
|
+
checkbox.css
|
|
4
|
+
|
|
5
|
+
ANATOMY — CHECKBOX
|
|
6
|
+
─────────────────────────────────────────────────────────────
|
|
7
|
+
Structure:
|
|
8
|
+
<label class="checkbox checkbox-md">
|
|
9
|
+
<input type="checkbox" class="checkbox-native" />
|
|
10
|
+
<span class="checkbox-box">
|
|
11
|
+
<svg class="checkbox-check">...</svg>
|
|
12
|
+
<svg class="checkbox-indeterminate">...</svg>
|
|
13
|
+
</span>
|
|
14
|
+
<span class="checkbox-label">Label text</span>
|
|
15
|
+
</label>
|
|
16
|
+
|
|
17
|
+
Class layers:
|
|
18
|
+
1. .checkbox → Wrapper label, flex layout
|
|
19
|
+
2. .checkbox-{size} → Box size (sm/md/lg)
|
|
20
|
+
3. .checkbox-{variant} → Style (filled/card)
|
|
21
|
+
4. .checkbox-label-{pos} → Label position (right/left/bottom)
|
|
22
|
+
5. .checkbox-native → Hidden native input (accessible)
|
|
23
|
+
6. .checkbox-box → Visible box element
|
|
24
|
+
7. .checkbox-check → Checkmark SVG (animated)
|
|
25
|
+
─────────────────────────────────────────────────────────────
|
|
26
|
+
|
|
27
|
+
ANATOMY — RADIO
|
|
28
|
+
─────────────────────────────────────────────────────────────
|
|
29
|
+
Structure:
|
|
30
|
+
<label class="radio radio-md">
|
|
31
|
+
<input type="radio" class="radio-native" />
|
|
32
|
+
<span class="radio-circle">
|
|
33
|
+
<span class="radio-dot"></span>
|
|
34
|
+
</span>
|
|
35
|
+
<span class="radio-label">Label text</span>
|
|
36
|
+
</label>
|
|
37
|
+
─────────────────────────────────────────────────────────────
|
|
38
|
+
============================================================ */
|
|
39
|
+
|
|
40
|
+
/* ═══════════════════════════════════════════════════════════
|
|
41
|
+
CHECKBOX — Base wrapper (label)
|
|
42
|
+
═══════════════════════════════════════════════════════════ */
|
|
43
|
+
|
|
44
|
+
.checkbox {
|
|
45
|
+
display: inline-flex;
|
|
46
|
+
align-items: flex-start;
|
|
47
|
+
gap: var(--control-gap);
|
|
48
|
+
cursor: pointer;
|
|
49
|
+
font-family: var(--font-sans);
|
|
50
|
+
font-size: var(--text-sm);
|
|
51
|
+
color: var(--input-text-color);
|
|
52
|
+
line-height: var(--leading-tight);
|
|
53
|
+
position: relative;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
/* Hide native input — accessible but invisible */
|
|
57
|
+
.checkbox-native {
|
|
58
|
+
position: absolute;
|
|
59
|
+
width: var(--space-0);
|
|
60
|
+
height: var(--space-0);
|
|
61
|
+
opacity: 0;
|
|
62
|
+
pointer-events: none;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
/* ── The visible box ────────────────────────────────────── */
|
|
66
|
+
.checkbox-box {
|
|
67
|
+
display: inline-flex;
|
|
68
|
+
align-items: center;
|
|
69
|
+
justify-content: center;
|
|
70
|
+
flex-shrink: 0;
|
|
71
|
+
width: var(--checkbox-md);
|
|
72
|
+
height: var(--checkbox-md);
|
|
73
|
+
border: var(--border-width) solid var(--control-border);
|
|
74
|
+
border-radius: var(--radius-sm);
|
|
75
|
+
background-color: var(--select-bg);
|
|
76
|
+
transition: background-color var(--duration-normal) var(--ease-in-out),
|
|
77
|
+
border-color var(--duration-normal) var(--ease-in-out),
|
|
78
|
+
box-shadow var(--duration-fast) var(--ease-out);
|
|
79
|
+
position: relative;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
/* ── Checkmark SVG ──────────────────────────────────────── */
|
|
83
|
+
.checkbox-check,
|
|
84
|
+
.checkbox-indeterminate {
|
|
85
|
+
position: absolute;
|
|
86
|
+
width: 60%;
|
|
87
|
+
height: 60%;
|
|
88
|
+
stroke: var(--color-neutral-50);
|
|
89
|
+
stroke-width: 2.5;
|
|
90
|
+
fill: none;
|
|
91
|
+
stroke-linecap: round;
|
|
92
|
+
stroke-linejoin: round;
|
|
93
|
+
stroke-dasharray: 24;
|
|
94
|
+
stroke-dashoffset: 24;
|
|
95
|
+
transition: stroke-dashoffset var(--duration-normal) var(--ease-out);
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.checkbox-indeterminate {
|
|
99
|
+
stroke-dasharray: 12;
|
|
100
|
+
stroke-dashoffset: 12;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
/* Checked: animate checkmark */
|
|
104
|
+
.checkbox-native:checked ~ .checkbox-box .checkbox-check {
|
|
105
|
+
stroke-dashoffset: 0;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
/* Indeterminate: animate minus */
|
|
109
|
+
.checkbox-native:indeterminate ~ .checkbox-box .checkbox-indeterminate,
|
|
110
|
+
.checkbox-box.is-indeterminate .checkbox-indeterminate {
|
|
111
|
+
stroke-dashoffset: 0;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
/* ── Unchecked: hide icons ──────────────────────────────── */
|
|
115
|
+
.checkbox-check,
|
|
116
|
+
.checkbox-indeterminate {
|
|
117
|
+
opacity: 0;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
.checkbox-native:checked ~ .checkbox-box .checkbox-check {
|
|
121
|
+
opacity: 1;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
.checkbox-native:indeterminate ~ .checkbox-box .checkbox-indeterminate,
|
|
125
|
+
.checkbox-box.is-indeterminate .checkbox-indeterminate {
|
|
126
|
+
opacity: 1;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
/* ── Checked state ──────────────────────────────────────── */
|
|
130
|
+
.checkbox-native:checked ~ .checkbox-box,
|
|
131
|
+
.checkbox-native:indeterminate ~ .checkbox-box {
|
|
132
|
+
background-color: var(--control-checked-bg);
|
|
133
|
+
border-color: var(--control-checked-border);
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
/* ── Sizes ──────────────────────────────────────────────── */
|
|
137
|
+
.checkbox-sm {
|
|
138
|
+
font-size: var(--text-sm);
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
.checkbox-sm .checkbox-box {
|
|
142
|
+
width: var(--checkbox-sm);
|
|
143
|
+
height: var(--checkbox-sm);
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
.checkbox-md {
|
|
147
|
+
font-size: var(--text-sm);
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
.checkbox-md .checkbox-box {
|
|
151
|
+
width: var(--checkbox-md);
|
|
152
|
+
height: var(--checkbox-md);
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
.checkbox-lg {
|
|
156
|
+
font-size: var(--text-base);
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
.checkbox-lg .checkbox-box {
|
|
160
|
+
width: var(--checkbox-lg);
|
|
161
|
+
height: var(--checkbox-lg);
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
/* ── Label positions ────────────────────────────────────── */
|
|
165
|
+
|
|
166
|
+
/* Label left (checkbox on right) */
|
|
167
|
+
.checkbox-label-left {
|
|
168
|
+
flex-direction: row-reverse;
|
|
169
|
+
align-items: flex-start;
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
/* Label bottom (card style) */
|
|
173
|
+
.checkbox-label-bottom {
|
|
174
|
+
flex-direction: column;
|
|
175
|
+
align-items: flex-start;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
.checkbox-label-bottom .checkbox-box {
|
|
179
|
+
margin-bottom: var(--space-1-5);
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
/* ═══════════════════════════════════════════════════════════
|
|
183
|
+
CHECKBOX — Variant: Filled
|
|
184
|
+
Background accent when checked, no border change.
|
|
185
|
+
═══════════════════════════════════════════════════════════ */
|
|
186
|
+
|
|
187
|
+
.checkbox-filled .checkbox-box {
|
|
188
|
+
border-color: transparent;
|
|
189
|
+
background-color: var(--control-bg);
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
.checkbox-filled .checkbox-native:checked ~ .checkbox-box,
|
|
193
|
+
.checkbox-filled .checkbox-native:indeterminate ~ .checkbox-box {
|
|
194
|
+
background-color: var(--control-checked-bg);
|
|
195
|
+
border-color: transparent;
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
.checkbox-filled .checkbox-native:hover ~ .checkbox-box {
|
|
199
|
+
background-color: var(--color-neutral-200);
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
.checkbox-filled .checkbox-native:checked ~ .checkbox-box:hover,
|
|
203
|
+
.checkbox-filled .checkbox-native:indeterminate ~ .checkbox-box:hover {
|
|
204
|
+
background-color: var(--color-accent-600);
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
/* ═══════════════════════════════════════════════════════════
|
|
208
|
+
CHECKBOX — Variant: Card
|
|
209
|
+
Entire card clickable, highlighted border on check.
|
|
210
|
+
═══════════════════════════════════════════════════════════ */
|
|
211
|
+
|
|
212
|
+
.checkbox-card {
|
|
213
|
+
display: flex;
|
|
214
|
+
flex-direction: column;
|
|
215
|
+
align-items: flex-start;
|
|
216
|
+
gap: var(--space-3);
|
|
217
|
+
padding: var(--space-4);
|
|
218
|
+
border: var(--border-width) solid var(--border-color);
|
|
219
|
+
border-radius: var(--radius-md);
|
|
220
|
+
background-color: var(--select-bg);
|
|
221
|
+
transition: border-color var(--duration-normal) var(--ease-in-out),
|
|
222
|
+
background-color var(--duration-normal) var(--ease-in-out),
|
|
223
|
+
box-shadow var(--duration-fast) var(--ease-out);
|
|
224
|
+
width: 100%;
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
.checkbox-card .checkbox-box {
|
|
228
|
+
order: -1;
|
|
229
|
+
align-self: flex-start;
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
.checkbox-card .checkbox-native:checked ~ .checkbox-box {
|
|
233
|
+
background-color: var(--control-checked-bg);
|
|
234
|
+
border-color: var(--control-checked-border);
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
.checkbox-card:has(.checkbox-native:checked),
|
|
238
|
+
.checkbox-card:has(.checkbox-native:indeterminate) {
|
|
239
|
+
border-color: var(--control-checked-border);
|
|
240
|
+
background-color: var(--color-accent-50);
|
|
241
|
+
box-shadow: 0 0 0 var(--focus-ring-width) var(--color-accent-200);
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
.checkbox-card:hover {
|
|
245
|
+
border-color: var(--border-color-strong);
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
.checkbox-card .checkbox-label {
|
|
249
|
+
font-weight: var(--font-medium);
|
|
250
|
+
font-size: var(--text-sm);
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
.checkbox-card .checkbox-desc {
|
|
254
|
+
font-size: var(--text-xs);
|
|
255
|
+
color: var(--input-helper-color);
|
|
256
|
+
line-height: var(--leading-relaxed);
|
|
257
|
+
margin-top: var(--space-0-5);
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
/* ═══════════════════════════════════════════════════════════
|
|
261
|
+
CHECKBOX — States
|
|
262
|
+
═══════════════════════════════════════════════════════════ */
|
|
263
|
+
|
|
264
|
+
/* Focus */
|
|
265
|
+
.checkbox-native:focus-visible ~ .checkbox-box {
|
|
266
|
+
outline: var(--focus-ring-width) solid var(--focus-ring-color);
|
|
267
|
+
outline-offset: var(--focus-ring-offset);
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
/* Disabled unchecked */
|
|
271
|
+
.checkbox.is-disabled {
|
|
272
|
+
opacity: var(--control-disabled-opacity);
|
|
273
|
+
cursor: var(--input-disabled-cursor);
|
|
274
|
+
pointer-events: none;
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
/* Disabled checked — keep visual */
|
|
278
|
+
.checkbox.is-disabled .checkbox-native:checked ~ .checkbox-box,
|
|
279
|
+
.checkbox.is-disabled .checkbox-native:indeterminate ~ .checkbox-box {
|
|
280
|
+
opacity: 0.8;
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
/* Error */
|
|
284
|
+
.checkbox-error .checkbox-box {
|
|
285
|
+
border-color: var(--color-error);
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
.checkbox-error .checkbox-native:checked ~ .checkbox-box,
|
|
289
|
+
.checkbox-error .checkbox-native:indeterminate ~ .checkbox-box {
|
|
290
|
+
background-color: var(--color-error);
|
|
291
|
+
border-color: var(--color-error);
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
.checkbox-error .checkbox-label {
|
|
295
|
+
color: var(--color-error);
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
.checkbox-error.checkbox-card:has(.checkbox-native:checked) {
|
|
299
|
+
border-color: var(--color-error);
|
|
300
|
+
background-color: var(--color-error-light);
|
|
301
|
+
box-shadow: 0 0 0 var(--focus-ring-width) var(--color-error-border);
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
/* ═══════════════════════════════════════════════════════════
|
|
305
|
+
RADIO — Base wrapper (label)
|
|
306
|
+
═══════════════════════════════════════════════════════════ */
|
|
307
|
+
|
|
308
|
+
.radio {
|
|
309
|
+
display: inline-flex;
|
|
310
|
+
align-items: flex-start;
|
|
311
|
+
gap: var(--control-gap);
|
|
312
|
+
cursor: pointer;
|
|
313
|
+
font-family: var(--font-sans);
|
|
314
|
+
font-size: var(--text-sm);
|
|
315
|
+
color: var(--input-text-color);
|
|
316
|
+
line-height: var(--leading-tight);
|
|
317
|
+
position: relative;
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
/* Hide native input */
|
|
321
|
+
.radio-native {
|
|
322
|
+
position: absolute;
|
|
323
|
+
width: var(--space-0);
|
|
324
|
+
height: var(--space-0);
|
|
325
|
+
opacity: 0;
|
|
326
|
+
pointer-events: none;
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
/* ── The visible circle ─────────────────────────────────── */
|
|
330
|
+
.radio-circle {
|
|
331
|
+
display: inline-flex;
|
|
332
|
+
align-items: center;
|
|
333
|
+
justify-content: center;
|
|
334
|
+
flex-shrink: 0;
|
|
335
|
+
width: var(--checkbox-md);
|
|
336
|
+
height: var(--checkbox-md);
|
|
337
|
+
border: var(--border-width) solid var(--control-border);
|
|
338
|
+
border-radius: var(--radius-pill);
|
|
339
|
+
background-color: var(--select-bg);
|
|
340
|
+
transition: border-color var(--duration-normal) var(--ease-in-out),
|
|
341
|
+
box-shadow var(--duration-fast) var(--ease-out);
|
|
342
|
+
position: relative;
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
/* ── Inner dot ──────────────────────────────────────────── */
|
|
346
|
+
.radio-dot {
|
|
347
|
+
width: 45%;
|
|
348
|
+
height: 45%;
|
|
349
|
+
border-radius: var(--radius-pill);
|
|
350
|
+
background-color: var(--color-neutral-50);
|
|
351
|
+
transform: scale(0);
|
|
352
|
+
transition: transform var(--duration-normal) var(--ease-out);
|
|
353
|
+
}
|
|
354
|
+
|
|
355
|
+
/* Selected: show dot */
|
|
356
|
+
.radio-native:checked ~ .radio-circle .radio-dot {
|
|
357
|
+
transform: scale(1);
|
|
358
|
+
}
|
|
359
|
+
|
|
360
|
+
/* Selected state */
|
|
361
|
+
.radio-native:checked ~ .radio-circle {
|
|
362
|
+
border-color: var(--control-checked-border);
|
|
363
|
+
background-color: var(--control-checked-bg);
|
|
364
|
+
}
|
|
365
|
+
|
|
366
|
+
/* ── Sizes ──────────────────────────────────────────────── */
|
|
367
|
+
.radio-sm {
|
|
368
|
+
font-size: var(--text-sm);
|
|
369
|
+
}
|
|
370
|
+
|
|
371
|
+
.radio-sm .radio-circle {
|
|
372
|
+
width: var(--checkbox-sm);
|
|
373
|
+
height: var(--checkbox-sm);
|
|
374
|
+
}
|
|
375
|
+
|
|
376
|
+
.radio-md {
|
|
377
|
+
font-size: var(--text-sm);
|
|
378
|
+
}
|
|
379
|
+
|
|
380
|
+
.radio-md .radio-circle {
|
|
381
|
+
width: var(--checkbox-md);
|
|
382
|
+
height: var(--checkbox-md);
|
|
383
|
+
}
|
|
384
|
+
|
|
385
|
+
.radio-lg {
|
|
386
|
+
font-size: var(--text-base);
|
|
387
|
+
}
|
|
388
|
+
|
|
389
|
+
.radio-lg .radio-circle {
|
|
390
|
+
width: var(--checkbox-lg);
|
|
391
|
+
height: var(--checkbox-lg);
|
|
392
|
+
}
|
|
393
|
+
|
|
394
|
+
/* ── Label positions ────────────────────────────────────── */
|
|
395
|
+
.radio-label-left {
|
|
396
|
+
flex-direction: row-reverse;
|
|
397
|
+
align-items: flex-start;
|
|
398
|
+
}
|
|
399
|
+
|
|
400
|
+
.radio-label-bottom {
|
|
401
|
+
flex-direction: column;
|
|
402
|
+
align-items: flex-start;
|
|
403
|
+
}
|
|
404
|
+
|
|
405
|
+
.radio-label-bottom .radio-circle {
|
|
406
|
+
margin-bottom: var(--space-1-5);
|
|
407
|
+
}
|
|
408
|
+
|
|
409
|
+
/* ═══════════════════════════════════════════════════════════
|
|
410
|
+
RADIO — Variant: Card
|
|
411
|
+
═══════════════════════════════════════════════════════════ */
|
|
412
|
+
|
|
413
|
+
.radio-card {
|
|
414
|
+
display: flex;
|
|
415
|
+
flex-direction: column;
|
|
416
|
+
align-items: flex-start;
|
|
417
|
+
gap: var(--space-3);
|
|
418
|
+
padding: var(--space-4);
|
|
419
|
+
border: var(--border-width) solid var(--border-color);
|
|
420
|
+
border-radius: var(--radius-md);
|
|
421
|
+
background-color: var(--select-bg);
|
|
422
|
+
transition: border-color var(--duration-normal) var(--ease-in-out),
|
|
423
|
+
background-color var(--duration-normal) var(--ease-in-out),
|
|
424
|
+
box-shadow var(--duration-fast) var(--ease-out);
|
|
425
|
+
width: 100%;
|
|
426
|
+
}
|
|
427
|
+
|
|
428
|
+
.radio-card .radio-circle {
|
|
429
|
+
order: -1;
|
|
430
|
+
align-self: flex-start;
|
|
431
|
+
}
|
|
432
|
+
|
|
433
|
+
.radio-card:has(.radio-native:checked) {
|
|
434
|
+
border-color: var(--control-checked-border);
|
|
435
|
+
background-color: var(--color-accent-50);
|
|
436
|
+
box-shadow: 0 0 0 var(--focus-ring-width) var(--color-accent-200);
|
|
437
|
+
}
|
|
438
|
+
|
|
439
|
+
.radio-card:hover {
|
|
440
|
+
border-color: var(--border-color-strong);
|
|
441
|
+
}
|
|
442
|
+
|
|
443
|
+
.radio-card .radio-label {
|
|
444
|
+
font-weight: var(--font-medium);
|
|
445
|
+
font-size: var(--text-sm);
|
|
446
|
+
}
|
|
447
|
+
|
|
448
|
+
.radio-card .radio-desc {
|
|
449
|
+
font-size: var(--text-xs);
|
|
450
|
+
color: var(--input-helper-color);
|
|
451
|
+
line-height: var(--leading-relaxed);
|
|
452
|
+
margin-top: var(--space-0-5);
|
|
453
|
+
}
|
|
454
|
+
|
|
455
|
+
/* ═══════════════════════════════════════════════════════════
|
|
456
|
+
RADIO — Variant: Button Group (Segmented Control)
|
|
457
|
+
═══════════════════════════════════════════════════════════ */
|
|
458
|
+
|
|
459
|
+
.radio-group-btn {
|
|
460
|
+
display: inline-flex;
|
|
461
|
+
border: var(--border-width) solid var(--border-color);
|
|
462
|
+
border-radius: var(--radius-sm);
|
|
463
|
+
overflow: hidden;
|
|
464
|
+
background-color: var(--control-bg);
|
|
465
|
+
}
|
|
466
|
+
|
|
467
|
+
.radio-group-btn .radio-btn {
|
|
468
|
+
position: relative;
|
|
469
|
+
}
|
|
470
|
+
|
|
471
|
+
.radio-group-btn .radio-native {
|
|
472
|
+
position: absolute;
|
|
473
|
+
width: var(--space-0);
|
|
474
|
+
height: var(--space-0);
|
|
475
|
+
opacity: 0;
|
|
476
|
+
pointer-events: none;
|
|
477
|
+
}
|
|
478
|
+
|
|
479
|
+
.radio-group-btn .radio-btn-label {
|
|
480
|
+
display: inline-flex;
|
|
481
|
+
align-items: center;
|
|
482
|
+
justify-content: center;
|
|
483
|
+
padding: var(--space-1-5) var(--space-4);
|
|
484
|
+
font-family: var(--font-sans);
|
|
485
|
+
font-size: var(--text-sm);
|
|
486
|
+
font-weight: var(--font-medium);
|
|
487
|
+
color: var(--color-neutral-600);
|
|
488
|
+
cursor: pointer;
|
|
489
|
+
user-select: none;
|
|
490
|
+
-webkit-user-select: none;
|
|
491
|
+
transition: color var(--duration-fast) var(--ease-in-out),
|
|
492
|
+
background-color var(--duration-fast) var(--ease-in-out);
|
|
493
|
+
white-space: nowrap;
|
|
494
|
+
}
|
|
495
|
+
|
|
496
|
+
.radio-group-btn .radio-btn:hover .radio-btn-label {
|
|
497
|
+
color: var(--color-neutral-800);
|
|
498
|
+
background-color: var(--color-neutral-200);
|
|
499
|
+
}
|
|
500
|
+
|
|
501
|
+
.radio-group-btn .radio-native:checked ~ .radio-btn-label {
|
|
502
|
+
color: var(--color-neutral-50);
|
|
503
|
+
background-color: var(--control-checked-bg);
|
|
504
|
+
}
|
|
505
|
+
|
|
506
|
+
.radio-group-btn .radio-btn + .radio-btn .radio-btn-label {
|
|
507
|
+
border-left: var(--border-width) solid var(--border-color);
|
|
508
|
+
}
|
|
509
|
+
|
|
510
|
+
/* Focus on button group */
|
|
511
|
+
.radio-group-btn .radio-native:focus-visible ~ .radio-btn-label {
|
|
512
|
+
outline: var(--focus-ring-width) solid var(--focus-ring-color);
|
|
513
|
+
outline-offset: -2px;
|
|
514
|
+
z-index: var(--z-raised);
|
|
515
|
+
position: relative;
|
|
516
|
+
}
|
|
517
|
+
|
|
518
|
+
/* ═══════════════════════════════════════════════════════════
|
|
519
|
+
RADIO — States
|
|
520
|
+
═══════════════════════════════════════════════════════════ */
|
|
521
|
+
|
|
522
|
+
/* Focus */
|
|
523
|
+
.radio-native:focus-visible ~ .radio-circle {
|
|
524
|
+
outline: var(--focus-ring-width) solid var(--focus-ring-color);
|
|
525
|
+
outline-offset: var(--focus-ring-offset);
|
|
526
|
+
}
|
|
527
|
+
|
|
528
|
+
/* Disabled */
|
|
529
|
+
.radio.is-disabled {
|
|
530
|
+
opacity: var(--control-disabled-opacity);
|
|
531
|
+
cursor: var(--input-disabled-cursor);
|
|
532
|
+
pointer-events: none;
|
|
533
|
+
}
|
|
534
|
+
|
|
535
|
+
/* Error */
|
|
536
|
+
.radio-error .radio-circle {
|
|
537
|
+
border-color: var(--color-error);
|
|
538
|
+
}
|
|
539
|
+
|
|
540
|
+
.radio-error .radio-native:checked ~ .radio-circle {
|
|
541
|
+
border-color: var(--color-error);
|
|
542
|
+
background-color: var(--color-error);
|
|
543
|
+
}
|
|
544
|
+
|
|
545
|
+
.radio-error .radio-label {
|
|
546
|
+
color: var(--color-error);
|
|
547
|
+
}
|
|
548
|
+
|
|
549
|
+
/* ═══════════════════════════════════════════════════════════
|
|
550
|
+
CHECKBOX GROUP
|
|
551
|
+
═══════════════════════════════════════════════════════════ */
|
|
552
|
+
|
|
553
|
+
.checkbox-group,
|
|
554
|
+
.radio-group {
|
|
555
|
+
display: flex;
|
|
556
|
+
flex-direction: column;
|
|
557
|
+
gap: var(--space-3);
|
|
558
|
+
}
|
|
559
|
+
|
|
560
|
+
.checkbox-group-horizontal,
|
|
561
|
+
.radio-group-horizontal {
|
|
562
|
+
flex-direction: row;
|
|
563
|
+
flex-wrap: wrap;
|
|
564
|
+
gap: var(--space-4) var(--space-6);
|
|
565
|
+
}
|
|
566
|
+
|
|
567
|
+
.checkbox-group-label,
|
|
568
|
+
.radio-group-label {
|
|
569
|
+
font-family: var(--font-sans);
|
|
570
|
+
font-size: var(--text-sm);
|
|
571
|
+
font-weight: var(--font-semibold);
|
|
572
|
+
color: var(--input-label-color);
|
|
573
|
+
margin-bottom: var(--space-1);
|
|
574
|
+
display: block;
|
|
575
|
+
}
|
|
576
|
+
|
|
577
|
+
.checkbox-group-helper,
|
|
578
|
+
.radio-group-helper {
|
|
579
|
+
font-family: var(--font-sans);
|
|
580
|
+
font-size: var(--text-xs);
|
|
581
|
+
color: var(--input-helper-color);
|
|
582
|
+
line-height: var(--leading-tight);
|
|
583
|
+
margin-top: var(--space-1);
|
|
584
|
+
}
|
|
585
|
+
|
|
586
|
+
.checkbox-group-error,
|
|
587
|
+
.radio-group-error {
|
|
588
|
+
display: flex;
|
|
589
|
+
align-items: center;
|
|
590
|
+
gap: var(--space-1);
|
|
591
|
+
margin-top: var(--space-1);
|
|
592
|
+
font-family: var(--font-sans);
|
|
593
|
+
font-size: var(--text-xs);
|
|
594
|
+
font-weight: var(--font-medium);
|
|
595
|
+
color: var(--color-error);
|
|
596
|
+
line-height: var(--leading-tight);
|
|
597
|
+
}
|
|
598
|
+
|
|
599
|
+
.checkbox-group-error svg,
|
|
600
|
+
.radio-group-error svg {
|
|
601
|
+
width: var(--space-3);
|
|
602
|
+
height: var(--space-3);
|
|
603
|
+
flex-shrink: 0;
|
|
604
|
+
color: var(--color-error);
|
|
605
|
+
}
|