@duskmoon-dev/core 1.12.4 → 1.14.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 (66) hide show
  1. package/dist/components/alert.css +64 -2
  2. package/dist/components/appbar.css +119 -21
  3. package/dist/components/autocomplete.css +63 -3
  4. package/dist/components/avatar.css +22 -2
  5. package/dist/components/button.css +101 -49
  6. package/dist/components/card.css +38 -2
  7. package/dist/components/cascader.css +59 -9
  8. package/dist/components/checkbox.css +15 -5
  9. package/dist/components/chip.css +122 -2
  10. package/dist/components/collapse.css +32 -0
  11. package/dist/components/datepicker.css +79 -6
  12. package/dist/components/divider.css +196 -121
  13. package/dist/components/file-upload.css +68 -8
  14. package/dist/components/form.css +2 -1
  15. package/dist/components/index.css +1835 -586
  16. package/dist/components/input.css +21 -67
  17. package/dist/components/multi-select.css +59 -9
  18. package/dist/components/navigation.css +1 -1
  19. package/dist/components/otp-input.css +48 -16
  20. package/dist/components/pin-input.css +50 -13
  21. package/dist/components/radio.css +12 -2
  22. package/dist/components/rating.css +35 -3
  23. package/dist/components/segment-control.css +23 -2
  24. package/dist/components/select.css +21 -37
  25. package/dist/components/slider.css +130 -6
  26. package/dist/components/switch.css +27 -4
  27. package/dist/components/textarea.css +21 -96
  28. package/dist/components/time-input.css +61 -12
  29. package/dist/components/toast.css +72 -3
  30. package/dist/components/toggle.css +63 -6
  31. package/dist/components/tooltip.css +84 -0
  32. package/dist/components/tree-select.css +60 -11
  33. package/dist/esm/components/alert.js +64 -2
  34. package/dist/esm/components/appbar.js +119 -21
  35. package/dist/esm/components/autocomplete.js +63 -3
  36. package/dist/esm/components/avatar.js +22 -2
  37. package/dist/esm/components/button.js +101 -49
  38. package/dist/esm/components/card.js +38 -2
  39. package/dist/esm/components/cascader.js +59 -9
  40. package/dist/esm/components/checkbox.js +15 -5
  41. package/dist/esm/components/chip.js +122 -2
  42. package/dist/esm/components/collapse.js +32 -0
  43. package/dist/esm/components/datepicker.js +79 -6
  44. package/dist/esm/components/divider.js +196 -121
  45. package/dist/esm/components/file-upload.js +68 -8
  46. package/dist/esm/components/form.js +2 -1
  47. package/dist/esm/components/input.js +21 -67
  48. package/dist/esm/components/multi-select.js +59 -9
  49. package/dist/esm/components/navigation.js +1 -1
  50. package/dist/esm/components/otp-input.js +48 -16
  51. package/dist/esm/components/pin-input.js +50 -13
  52. package/dist/esm/components/radio.js +12 -2
  53. package/dist/esm/components/rating.js +35 -3
  54. package/dist/esm/components/segment-control.js +23 -2
  55. package/dist/esm/components/select.js +21 -37
  56. package/dist/esm/components/slider.js +130 -6
  57. package/dist/esm/components/switch.js +27 -4
  58. package/dist/esm/components/textarea.js +21 -96
  59. package/dist/esm/components/time-input.js +61 -12
  60. package/dist/esm/components/toast.js +72 -3
  61. package/dist/esm/components/toggle.js +63 -6
  62. package/dist/esm/components/tooltip.js +84 -0
  63. package/dist/esm/components/tree-select.js +60 -11
  64. package/dist/index.css +1835 -586
  65. package/dist/index.min.css +1 -1
  66. package/package.json +1 -1
@@ -2,57 +2,90 @@
2
2
  export const css = `/**
3
3
  * Divider Component Styles
4
4
  * DuskMoonUI - Material Design 3 inspired divider system
5
+ *
6
+ * Usage:
7
+ * <div class="divider"></div> — plain horizontal line
8
+ * <div class="divider">OR</div> — text centered between lines
9
+ * <div class="divider divider-start">Title</div> — text at start
5
10
  */
6
11
 
7
12
  @layer components {
8
- /* Base Divider (Horizontal) */
13
+ /* ── Base Divider (Horizontal) ──────────────────────────────────── */
9
14
  .divider {
15
+ display: flex;
16
+ flex-direction: row;
17
+ align-items: center;
18
+ gap: 0;
10
19
  width: 100%;
11
- height: 1px;
12
20
  margin: 1rem 0;
21
+ white-space: nowrap;
22
+ }
23
+
24
+ /* Only add gap when content is present so an empty divider renders as one continuous line */
25
+ .divider:not(:empty) {
26
+ gap: 1rem;
27
+ }
28
+
29
+ /* The two line segments flanking any content */
30
+ .divider::before,
31
+ .divider::after {
32
+ content: '';
33
+ flex: 1;
34
+ height: 1px;
13
35
  background-color: var(--color-outline-variant);
14
- border: none;
15
36
  }
16
37
 
17
- /* Vertical Divider */
38
+ /* ── Vertical Divider ───────────────────────────────────────────── */
18
39
  .divider-vertical {
19
- width: 1px;
20
- height: auto;
21
- min-height: 1rem;
40
+ flex-direction: column;
41
+ width: auto;
22
42
  margin: 0 1rem;
23
43
  align-self: stretch;
24
44
  }
25
45
 
26
- /* Divider Thickness */
27
- .divider-thin {
46
+ .divider-vertical::before,
47
+ .divider-vertical::after {
48
+ width: 1px;
49
+ height: unset; /* let flex: 1 control the length */
50
+ }
51
+
52
+ /* ── Thickness ──────────────────────────────────────────────────── */
53
+ .divider-thin::before,
54
+ .divider-thin::after {
28
55
  height: 1px;
29
56
  }
30
57
 
31
- .divider-thin.divider-vertical {
58
+ .divider-thin.divider-vertical::before,
59
+ .divider-thin.divider-vertical::after {
32
60
  width: 1px;
33
- height: auto;
61
+ height: unset;
34
62
  }
35
63
 
36
- .divider-medium {
64
+ .divider-medium::before,
65
+ .divider-medium::after {
37
66
  height: 2px;
38
67
  }
39
68
 
40
- .divider-medium.divider-vertical {
69
+ .divider-medium.divider-vertical::before,
70
+ .divider-medium.divider-vertical::after {
41
71
  width: 2px;
42
- height: auto;
72
+ height: unset;
43
73
  }
44
74
 
45
- .divider-thick {
75
+ .divider-thick::before,
76
+ .divider-thick::after {
46
77
  height: 4px;
47
78
  }
48
79
 
49
- .divider-thick.divider-vertical {
80
+ .divider-thick.divider-vertical::before,
81
+ .divider-thick.divider-vertical::after {
50
82
  width: 4px;
51
- height: auto;
83
+ height: unset;
52
84
  }
53
85
 
54
- /* Divider Styles */
55
- .divider-dashed {
86
+ /* ── Line Styles ────────────────────────────────────────────────── */
87
+ .divider-dashed::before,
88
+ .divider-dashed::after {
56
89
  background-color: transparent;
57
90
  background-image: linear-gradient(
58
91
  to right,
@@ -63,7 +96,8 @@ export const css = `/**
63
96
  background-repeat: repeat-x;
64
97
  }
65
98
 
66
- .divider-dashed.divider-vertical {
99
+ .divider-dashed.divider-vertical::before,
100
+ .divider-dashed.divider-vertical::after {
67
101
  background-image: linear-gradient(
68
102
  to bottom,
69
103
  var(--color-outline-variant) 50%,
@@ -73,7 +107,8 @@ export const css = `/**
73
107
  background-repeat: repeat-y;
74
108
  }
75
109
 
76
- .divider-dotted {
110
+ .divider-dotted::before,
111
+ .divider-dotted::after {
77
112
  background-color: transparent;
78
113
  background-image: linear-gradient(
79
114
  to right,
@@ -84,7 +119,8 @@ export const css = `/**
84
119
  background-repeat: repeat-x;
85
120
  }
86
121
 
87
- .divider-dotted.divider-vertical {
122
+ .divider-dotted.divider-vertical::before,
123
+ .divider-dotted.divider-vertical::after {
88
124
  background-image: linear-gradient(
89
125
  to bottom,
90
126
  var(--color-outline-variant) 25%,
@@ -94,12 +130,14 @@ export const css = `/**
94
130
  background-repeat: repeat-y;
95
131
  }
96
132
 
97
- /* Color Variants */
98
- .divider-primary {
133
+ /* ── Color Variants ─────────────────────────────────────────────── */
134
+ .divider-primary::before,
135
+ .divider-primary::after {
99
136
  background-color: var(--color-primary);
100
137
  }
101
138
 
102
- .divider-primary.divider-dashed {
139
+ .divider-primary.divider-dashed::before,
140
+ .divider-primary.divider-dashed::after {
103
141
  background-image: linear-gradient(
104
142
  to right,
105
143
  var(--color-primary) 50%,
@@ -107,7 +145,8 @@ export const css = `/**
107
145
  );
108
146
  }
109
147
 
110
- .divider-primary.divider-dashed.divider-vertical {
148
+ .divider-primary.divider-dashed.divider-vertical::before,
149
+ .divider-primary.divider-dashed.divider-vertical::after {
111
150
  background-image: linear-gradient(
112
151
  to bottom,
113
152
  var(--color-primary) 50%,
@@ -115,20 +154,114 @@ export const css = `/**
115
154
  );
116
155
  }
117
156
 
118
- .divider-secondary {
157
+ .divider-secondary::before,
158
+ .divider-secondary::after {
119
159
  background-color: var(--color-secondary);
120
160
  }
121
161
 
122
- .divider-light {
123
- background-color: var(--color-outline-variant);
124
- opacity: 0.5;
162
+ .divider-tertiary::before,
163
+ .divider-tertiary::after {
164
+ background-color: var(--color-tertiary);
165
+ }
166
+
167
+ .divider-info::before,
168
+ .divider-info::after {
169
+ background-color: var(--color-info);
170
+ }
171
+
172
+ .divider-success::before,
173
+ .divider-success::after {
174
+ background-color: var(--color-success);
175
+ }
176
+
177
+ .divider-warning::before,
178
+ .divider-warning::after {
179
+ background-color: var(--color-warning);
180
+ }
181
+
182
+ .divider-error::before,
183
+ .divider-error::after {
184
+ background-color: var(--color-error);
185
+ }
186
+
187
+ /* ── Gradient Lines ─────────────────────────────────────────────── */
188
+ .divider-gradient::before,
189
+ .divider-gradient::after {
190
+ background: linear-gradient(
191
+ to right,
192
+ transparent,
193
+ var(--color-outline-variant) 20%,
194
+ var(--color-outline-variant) 80%,
195
+ transparent
196
+ );
197
+ }
198
+
199
+ .divider-gradient.divider-vertical::before,
200
+ .divider-gradient.divider-vertical::after {
201
+ background: linear-gradient(
202
+ to bottom,
203
+ transparent,
204
+ var(--color-outline-variant) 20%,
205
+ var(--color-outline-variant) 80%,
206
+ transparent
207
+ );
208
+ }
209
+
210
+ /* ── Content Positioning ────────────────────────────────────────── */
211
+
212
+ /* Push content to start: shrink the leading line segment */
213
+ .divider-start::before {
214
+ flex: 0 0 2rem;
215
+ }
216
+
217
+ /* Push content to end: shrink the trailing line segment */
218
+ .divider-end::after {
219
+ flex: 0 0 2rem;
220
+ }
221
+
222
+ /* Vertical equivalents */
223
+ .divider-vertical.divider-start::before {
224
+ flex: 0 0 2rem;
225
+ }
226
+
227
+ .divider-vertical.divider-end::after {
228
+ flex: 0 0 2rem;
229
+ }
230
+
231
+ /* ── Spacing Variants ───────────────────────────────────────────── */
232
+ .divider-compact {
233
+ margin: 0.25rem 0;
234
+ }
235
+
236
+ .divider-compact:not(:empty) {
237
+ gap: 0.5rem;
238
+ }
239
+
240
+ .divider-compact.divider-vertical {
241
+ margin: 0 0.25rem;
242
+ }
243
+
244
+ .divider-comfortable {
245
+ margin: 1.5rem 0;
125
246
  }
126
247
 
127
- .divider-dark {
128
- background-color: var(--color-outline);
248
+ .divider-comfortable.divider-vertical {
249
+ margin: 0 1.5rem;
250
+ }
251
+
252
+ .divider-spacious {
253
+ margin: 2rem 0;
129
254
  }
130
255
 
131
- /* Spacing Variants */
256
+ .divider-spacious:not(:empty) {
257
+ gap: 1.5rem;
258
+ }
259
+
260
+ .divider-spacious.divider-vertical {
261
+ margin: 0 2rem;
262
+ }
263
+
264
+ /* Legacy spacing aliases */
132
265
  .divider-none {
133
266
  margin: 0;
134
267
  }
@@ -165,122 +298,64 @@ export const css = `/**
165
298
  margin: 0 2rem;
166
299
  }
167
300
 
168
- /* Divider with Text (Horizontal) */
169
- .divider-text {
170
- display: flex;
171
- align-items: center;
172
- gap: 1rem;
173
- height: auto;
174
- background-color: transparent;
175
- }
176
-
177
- .divider-text::before,
178
- .divider-text::after {
179
- content: '';
180
- flex: 1;
181
- height: 1px;
182
- background-color: var(--color-outline-variant);
183
- }
184
-
185
- .divider-text-content {
186
- font-size: 0.75rem;
187
- font-weight: 500;
188
- color: var(--color-on-surface-variant);
189
- text-transform: uppercase;
190
- letter-spacing: 0.025em;
191
- white-space: nowrap;
192
- }
193
-
194
- /* Text Position */
195
- .divider-text-left::before {
196
- flex: 0 0 2rem;
197
- }
198
-
199
- .divider-text-right::after {
200
- flex: 0 0 2rem;
201
- }
202
-
203
- /* Inset Divider */
301
+ /* ── Inset Divider ──────────────────────────────────────────────── */
204
302
  .divider-inset {
205
- margin-left: 4rem;
206
- width: calc(100% - 4rem);
303
+ padding-left: 4rem;
207
304
  }
208
305
 
209
306
  .divider-inset-right {
210
- margin-right: 4rem;
211
- width: calc(100% - 4rem);
307
+ padding-right: 4rem;
212
308
  }
213
309
 
214
310
  .divider-inset-both {
215
- margin-left: 4rem;
216
- margin-right: 4rem;
217
- width: calc(100% - 8rem);
311
+ padding-left: 4rem;
312
+ padding-right: 4rem;
218
313
  }
219
314
 
220
- /* List Divider (for use between list items) */
315
+ /* ── List / Card Helpers ────────────────────────────────────────── */
221
316
  .divider-list {
222
317
  margin: 0;
223
- margin-left: 1rem;
224
- width: calc(100% - 1rem);
318
+ padding-left: 1rem;
225
319
  }
226
320
 
227
- /* Card Divider */
228
321
  .divider-card {
229
322
  margin: 0;
230
323
  margin-left: -1rem;
231
324
  margin-right: -1rem;
232
- width: calc(100% + 2rem);
233
325
  }
234
326
 
235
- /* Gradient Divider */
236
- .divider-gradient {
237
- background: linear-gradient(
238
- to right,
239
- transparent,
240
- var(--color-outline-variant) 20%,
241
- var(--color-outline-variant) 80%,
242
- transparent
243
- );
244
- }
245
-
246
- .divider-gradient.divider-vertical {
247
- background: linear-gradient(
248
- to bottom,
249
- transparent,
250
- var(--color-outline-variant) 20%,
251
- var(--color-outline-variant) 80%,
252
- transparent
253
- );
327
+ /* ── Legacy: divider-text aliases ──────────────────────────────── */
328
+ /* divider-text is now just .divider — kept for backwards compat */
329
+ .divider-text {
330
+ display: flex;
331
+ flex-direction: row;
332
+ align-items: center;
333
+ gap: 0;
334
+ width: 100%;
335
+ margin: 1rem 0;
336
+ white-space: nowrap;
254
337
  }
255
338
 
256
- /* Decorative Divider */
257
- .divider-decorative {
258
- position: relative;
259
- height: auto;
260
- padding: 1rem 0;
261
- background-color: transparent;
262
- text-align: center;
339
+ .divider-text:not(:empty) {
340
+ gap: 1rem;
263
341
  }
264
342
 
265
- .divider-decorative::before {
343
+ .divider-text::before,
344
+ .divider-text::after {
266
345
  content: '';
267
- position: absolute;
268
- top: 50%;
269
- left: 0;
270
- right: 0;
346
+ flex: 1;
271
347
  height: 1px;
272
348
  background-color: var(--color-outline-variant);
273
349
  }
274
350
 
275
- .divider-decorative-icon {
276
- position: relative;
277
- display: inline-flex;
278
- align-items: center;
279
- justify-content: center;
280
- width: 2rem;
281
- height: 2rem;
282
- background-color: var(--color-surface);
283
- color: var(--color-on-surface-variant);
351
+ .divider-text-left::before,
352
+ .divider-text-left.divider-text::before {
353
+ flex: 0 0 2rem;
354
+ }
355
+
356
+ .divider-text-right::after,
357
+ .divider-text-right.divider-text::after {
358
+ flex: 0 0 2rem;
284
359
  }
285
360
  }
286
361
  `;
@@ -23,25 +23,25 @@ export const css = `/**
23
23
  min-height: 10rem;
24
24
  padding: 2rem;
25
25
  background-color: var(--color-surface);
26
- border: 2px dashed var(--color-outline);
26
+ border: 2px dashed currentColor;
27
27
  border-radius: 0.75rem;
28
28
  cursor: pointer;
29
29
  transition: border-color 150ms ease-in-out, background-color 150ms ease-in-out;
30
30
  }
31
31
 
32
32
  .file-upload-dropzone:hover {
33
- border-color: var(--color-primary);
33
+ border-color: currentColor;
34
34
  background-color: var(--color-surface-container);
35
35
  }
36
36
 
37
37
  .file-upload-dropzone:focus-within {
38
- border-color: var(--color-primary);
39
- box-shadow: 0 0 0 3px var(--color-primary-container);
38
+ border-color: currentColor;
39
+ box-shadow: 0 0 0 3px color-mix(in oklch, currentColor 20%, transparent);
40
40
  }
41
41
 
42
42
  .file-upload-dropzone.dragging {
43
- border-color: var(--color-primary);
44
- background-color: var(--color-primary-container);
43
+ border-color: currentColor;
44
+ background-color: color-mix(in oklch, currentColor 10%, var(--color-surface));
45
45
  }
46
46
 
47
47
  .file-upload-dropzone.disabled {
@@ -66,7 +66,6 @@ export const css = `/**
66
66
  justify-content: center;
67
67
  width: 3rem;
68
68
  height: 3rem;
69
- color: var(--color-primary);
70
69
  font-size: 2rem;
71
70
  }
72
71
 
@@ -88,7 +87,7 @@ export const css = `/**
88
87
  }
89
88
 
90
89
  .file-upload-browse {
91
- color: var(--color-primary);
90
+ color: currentColor;
92
91
  font-weight: 500;
93
92
  text-decoration: underline;
94
93
  cursor: pointer;
@@ -300,6 +299,67 @@ export const css = `/**
300
299
  cursor: not-allowed;
301
300
  }
302
301
 
302
+ /* Color Variants */
303
+ .file-upload-primary .file-upload-dropzone {
304
+ color: var(--color-primary);
305
+ }
306
+ .file-upload-primary .file-upload-dropzone:focus-within {
307
+ box-shadow: 0 0 0 3px color-mix(in oklch, var(--color-primary) 10%, transparent);
308
+ }
309
+
310
+ .file-upload-secondary .file-upload-dropzone {
311
+ color: var(--color-secondary);
312
+ }
313
+ .file-upload-secondary .file-upload-dropzone:focus-within {
314
+ box-shadow: 0 0 0 3px color-mix(in oklch, var(--color-secondary) 10%, transparent);
315
+ }
316
+
317
+ .file-upload-tertiary .file-upload-dropzone {
318
+ color: var(--color-tertiary);
319
+ }
320
+ .file-upload-tertiary .file-upload-dropzone:focus-within {
321
+ box-shadow: 0 0 0 3px color-mix(in oklch, var(--color-tertiary) 10%, transparent);
322
+ }
323
+
324
+ .file-upload-info .file-upload-dropzone {
325
+ color: var(--color-info);
326
+ }
327
+ .file-upload-info .file-upload-dropzone:focus-within {
328
+ box-shadow: 0 0 0 3px color-mix(in oklch, var(--color-info) 10%, transparent);
329
+ }
330
+
331
+ .file-upload-success .file-upload-dropzone {
332
+ color: var(--color-success);
333
+ }
334
+ .file-upload-success .file-upload-dropzone:focus-within {
335
+ box-shadow: 0 0 0 3px color-mix(in oklch, var(--color-success) 10%, transparent);
336
+ }
337
+
338
+ .file-upload-warning .file-upload-dropzone {
339
+ color: var(--color-warning);
340
+ }
341
+ .file-upload-warning .file-upload-dropzone:focus-within {
342
+ box-shadow: 0 0 0 3px color-mix(in oklch, var(--color-warning) 10%, transparent);
343
+ }
344
+
345
+ .file-upload-error .file-upload-dropzone {
346
+ color: var(--color-error);
347
+ }
348
+ .file-upload-error .file-upload-dropzone:focus-within {
349
+ box-shadow: 0 0 0 3px color-mix(in oklch, var(--color-error) 10%, transparent);
350
+ }
351
+
352
+ /* Ghost Variant */
353
+ .file-upload-ghost .file-upload-dropzone {
354
+ background-color: transparent;
355
+ border-color: transparent;
356
+ }
357
+ .file-upload-ghost .file-upload-dropzone:focus-within {
358
+ background-color: var(--color-surface-container);
359
+ border-color: transparent;
360
+ box-shadow: 0 0 0 3px color-mix(in oklch, currentColor 20%, transparent);
361
+ }
362
+
303
363
  /* Size Variants */
304
364
  .file-upload-sm .file-upload-dropzone {
305
365
  min-height: 6rem;
@@ -12,6 +12,7 @@ export const css = `/**
12
12
  gap: 0.25rem;
13
13
  width: 100%;
14
14
  margin-bottom: 1rem;
15
+ color: var(--color-on-surface);
15
16
  }
16
17
 
17
18
  /* Label */
@@ -25,7 +26,7 @@ export const css = `/**
25
26
  .label-text {
26
27
  font-size: 0.875rem;
27
28
  font-weight: 500;
28
- color: var(--color-base-content);
29
+ color: var(--color-on-surface);
29
30
  padding-bottom: 0.25rem;
30
31
  }
31
32
 
@@ -14,7 +14,7 @@ export const css = `/**
14
14
  line-height: 1.5rem;
15
15
  background-color: var(--color-surface);
16
16
  color: var(--color-on-surface);
17
- border: 1px solid transparent;
17
+ border: 1px solid currentColor;
18
18
  border-radius: 0.5rem;
19
19
  transition: border-color 150ms ease-in-out, box-shadow 150ms ease-in-out;
20
20
  }
@@ -29,8 +29,7 @@ export const css = `/**
29
29
  }
30
30
 
31
31
  .input:focus-visible {
32
- border-color: var(--color-primary);
33
- box-shadow: 0 0 0 3px color-mix(in oklch, var(--color-primary) 10%, transparent);
32
+ box-shadow: 0 0 0 3px color-mix(in oklch, currentColor 20%, transparent);
34
33
  outline: none;
35
34
  }
36
35
 
@@ -50,70 +49,17 @@ export const css = `/**
50
49
  border-color: var(--color-outline-variant);
51
50
  }
52
51
 
53
- /* Color Variants */
54
- .input-primary {
55
- border-color: var(--color-primary);
56
- }
57
-
58
- .input-primary:focus-visible {
59
- border-color: var(--color-primary);
60
- box-shadow: 0 0 0 3px color-mix(in oklch, var(--color-primary) 10%, transparent);
61
- }
62
-
63
- .input-secondary {
64
- border-color: var(--color-secondary);
65
- }
66
-
67
- .input-secondary:focus-visible {
68
- border-color: var(--color-secondary);
69
- box-shadow: 0 0 0 3px color-mix(in oklch, var(--color-secondary) 10%, transparent);
70
- }
71
-
72
- .input-tertiary {
73
- border-color: var(--color-tertiary);
74
- }
75
-
76
- .input-tertiary:focus-visible {
77
- border-color: var(--color-tertiary);
78
- box-shadow: 0 0 0 3px color-mix(in oklch, var(--color-tertiary) 10%, transparent);
79
- }
52
+ /* Color Variants — base .input:focus-visible uses currentColor 20%, so no per-variant
53
+ focus-visible overrides needed; setting color: here is sufficient. */
54
+ .input-primary { color: var(--color-primary); }
55
+ .input-secondary { color: var(--color-secondary); }
56
+ .input-tertiary { color: var(--color-tertiary); }
80
57
 
81
58
  /* Semantic Colors */
82
- .input-info {
83
- border-color: var(--color-info);
84
- }
85
-
86
- .input-info:focus-visible {
87
- border-color: var(--color-info);
88
- box-shadow: 0 0 0 3px color-mix(in oklch, var(--color-info) 10%, transparent);
89
- }
90
-
91
- .input-success {
92
- border-color: var(--color-success);
93
- }
94
-
95
- .input-success:focus-visible {
96
- border-color: var(--color-success);
97
- box-shadow: 0 0 0 3px color-mix(in oklch, var(--color-success) 10%, transparent);
98
- }
99
-
100
- .input-warning {
101
- border-color: var(--color-warning);
102
- }
103
-
104
- .input-warning:focus-visible {
105
- border-color: var(--color-warning);
106
- box-shadow: 0 0 0 3px color-mix(in oklch, var(--color-warning) 10%, transparent);
107
- }
108
-
109
- .input-error {
110
- border-color: var(--color-error);
111
- }
112
-
113
- .input-error:focus-visible {
114
- border-color: var(--color-error);
115
- box-shadow: 0 0 0 3px color-mix(in oklch, var(--color-error) 10%, transparent);
116
- }
59
+ .input-info { color: var(--color-info); }
60
+ .input-success { color: var(--color-success); }
61
+ .input-warning { color: var(--color-warning); }
62
+ .input-error { color: var(--color-error); }
117
63
 
118
64
  /* Size Variants */
119
65
  .input-xs {
@@ -149,7 +95,7 @@ export const css = `/**
149
95
  .input-ghost:focus-visible {
150
96
  background-color: var(--color-surface-container);
151
97
  border-color: transparent;
152
- box-shadow: none;
98
+ box-shadow: 0 0 0 3px color-mix(in oklch, currentColor 20%, transparent);
153
99
  }
154
100
 
155
101
  /* Filled Input */
@@ -165,6 +111,14 @@ export const css = `/**
165
111
  box-shadow: none;
166
112
  }
167
113
 
114
+ .input-filled.input-primary:focus-visible { border-bottom-color: var(--color-primary); }
115
+ .input-filled.input-secondary:focus-visible { border-bottom-color: var(--color-secondary); }
116
+ .input-filled.input-tertiary:focus-visible { border-bottom-color: var(--color-tertiary); }
117
+ .input-filled.input-info:focus-visible { border-bottom-color: var(--color-info); }
118
+ .input-filled.input-success:focus-visible { border-bottom-color: var(--color-success); }
119
+ .input-filled.input-warning:focus-visible { border-bottom-color: var(--color-warning); }
120
+ .input-filled.input-error:focus-visible { border-bottom-color: var(--color-error); }
121
+
168
122
  /* Input with Icon */
169
123
  .input-group {
170
124
  display: flex;
@@ -235,7 +189,7 @@ export const css = `/**
235
189
  }
236
190
 
237
191
  .file-input:focus-visible {
238
- border-color: var(--color-primary);
192
+ box-shadow: 0 0 0 3px color-mix(in oklch, currentColor 20%, transparent);
239
193
  outline: none;
240
194
  }
241
195
  }