@auronui/styles 1.0.16 → 1.0.18
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/components/button.css +97 -82
- package/components/input.css +62 -24
- package/components/modal.css +18 -6
- package/components/textarea.css +59 -12
- package/package.json +1 -1
- package/src/components/button/button.styles.ts +24 -11
package/components/button.css
CHANGED
|
@@ -20,7 +20,8 @@
|
|
|
20
20
|
/* Default tokens (fallback behavior) */
|
|
21
21
|
--button-bg: transparent;
|
|
22
22
|
--button-bg-hover: var(--button-bg);
|
|
23
|
-
|
|
23
|
+
/* Pressed is slightly darker than hover for tactile contrast */
|
|
24
|
+
--button-bg-pressed: color-mix(in oklab, var(--button-bg-hover) 82%, black);
|
|
24
25
|
--button-fg: currentColor;
|
|
25
26
|
|
|
26
27
|
background-color: var(--button-bg);
|
|
@@ -43,11 +44,12 @@
|
|
|
43
44
|
@apply status-pending;
|
|
44
45
|
}
|
|
45
46
|
|
|
46
|
-
/* Active / pressed */
|
|
47
|
+
/* Active / pressed — snap down fast (60ms), spring back slow (300ms from base) */
|
|
47
48
|
&:active,
|
|
48
49
|
&[data-pressed="true"] {
|
|
49
50
|
background-color: var(--button-bg-pressed);
|
|
50
|
-
transform: scale(0.
|
|
51
|
+
transform: scale(0.95);
|
|
52
|
+
transition-duration: 60ms;
|
|
51
53
|
}
|
|
52
54
|
|
|
53
55
|
/* Selected / toggle-on state */
|
|
@@ -78,11 +80,6 @@
|
|
|
78
80
|
& svg:not([data-slot="spinner"] svg, [data-slot="link-icon"] svg) {
|
|
79
81
|
@apply size-3.5;
|
|
80
82
|
}
|
|
81
|
-
|
|
82
|
-
&:active,
|
|
83
|
-
&[data-pressed="true"] {
|
|
84
|
-
transform: scale(0.98);
|
|
85
|
-
}
|
|
86
83
|
}
|
|
87
84
|
|
|
88
85
|
.button--sm {
|
|
@@ -91,11 +88,6 @@
|
|
|
91
88
|
& svg:not([data-slot="spinner"] svg, [data-slot="link-icon"] svg) {
|
|
92
89
|
@apply size-3.5;
|
|
93
90
|
}
|
|
94
|
-
|
|
95
|
-
&:active,
|
|
96
|
-
&[data-pressed="true"] {
|
|
97
|
-
transform: scale(0.98);
|
|
98
|
-
}
|
|
99
91
|
}
|
|
100
92
|
|
|
101
93
|
.button--md {
|
|
@@ -113,58 +105,115 @@
|
|
|
113
105
|
@apply size-5;
|
|
114
106
|
}
|
|
115
107
|
|
|
116
|
-
&:active,
|
|
117
|
-
&[data-pressed="true"] {
|
|
118
|
-
transform: scale(0.96);
|
|
119
|
-
}
|
|
120
108
|
}
|
|
121
109
|
|
|
122
|
-
/*
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
--button-bg-hover: var(--color-accent-hover);
|
|
126
|
-
--button-bg-pressed: var(--color-accent-hover);
|
|
127
|
-
--button-fg: var(--color-accent-foreground);
|
|
128
|
-
}
|
|
110
|
+
/* ============================================================
|
|
111
|
+
Variant classes — visual behavior (structural)
|
|
112
|
+
============================================================ */
|
|
129
113
|
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
--button-bg
|
|
133
|
-
--button-bg-
|
|
134
|
-
--button-fg: var(--color-
|
|
114
|
+
/* solid: filled background from color palette */
|
|
115
|
+
.button--solid {
|
|
116
|
+
--button-bg: var(--btn-solid-bg, var(--color-default));
|
|
117
|
+
--button-bg-hover: var(--btn-solid-bg-hover, var(--color-default-hover));
|
|
118
|
+
--button-fg: var(--btn-solid-fg, var(--color-default-foreground));
|
|
135
119
|
}
|
|
136
120
|
|
|
137
|
-
|
|
121
|
+
/* default (tertiary): neutral bg, text tinted by color */
|
|
122
|
+
.button--default {
|
|
138
123
|
--button-bg: var(--color-default);
|
|
139
124
|
--button-bg-hover: var(--color-default-hover);
|
|
140
|
-
--button-bg-pressed: var(--color-default-hover);
|
|
125
|
+
--button-bg-pressed: color-mix(in oklab, var(--color-default-hover) 72%, black);
|
|
126
|
+
--button-fg: var(--btn-tint-fg, var(--color-default-foreground));
|
|
141
127
|
}
|
|
142
128
|
|
|
143
|
-
|
|
144
|
-
.button--
|
|
129
|
+
/* ghost: transparent bg — hover is a light tint, pressed steps up to the stronger tint */
|
|
130
|
+
.button--ghost {
|
|
145
131
|
--button-bg: transparent;
|
|
146
|
-
--button-bg-hover: var(--color-default);
|
|
147
|
-
--button-bg-pressed: var(--color-default);
|
|
148
|
-
--button-fg: var(--color-default-foreground);
|
|
132
|
+
--button-bg-hover: var(--btn-tint-bg, var(--color-default));
|
|
133
|
+
--button-bg-pressed: var(--btn-tint-bg-hover, var(--color-default-hover));
|
|
134
|
+
--button-fg: var(--btn-tint-fg, var(--color-default-foreground));
|
|
149
135
|
}
|
|
150
136
|
|
|
137
|
+
/* outline: same press logic as ghost */
|
|
151
138
|
.button--outline {
|
|
152
|
-
|
|
153
|
-
--button-bg-hover:
|
|
139
|
+
--button-bg: transparent;
|
|
140
|
+
--button-bg-hover: var(--btn-tint-bg, var(--color-default));
|
|
141
|
+
--button-bg-pressed: var(--btn-tint-bg-hover, var(--color-default-hover));
|
|
142
|
+
--button-fg: var(--btn-tint-fg, var(--color-default-foreground));
|
|
143
|
+
@apply border;
|
|
144
|
+
border-color: currentColor;
|
|
154
145
|
}
|
|
155
146
|
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
--button-bg
|
|
159
|
-
--button-bg-
|
|
160
|
-
--button-
|
|
147
|
+
/* soft: muted palette — darken more aggressively than solid */
|
|
148
|
+
.button--soft {
|
|
149
|
+
--button-bg: var(--btn-soft-bg, var(--color-default));
|
|
150
|
+
--button-bg-hover: var(--btn-soft-bg-hover, var(--color-default-hover));
|
|
151
|
+
--button-bg-pressed: color-mix(in oklab, var(--btn-soft-bg-hover, var(--color-default-hover)) 72%, black);
|
|
152
|
+
--button-fg: var(--btn-soft-fg, var(--color-default-foreground));
|
|
161
153
|
}
|
|
162
154
|
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
155
|
+
/* ============================================================
|
|
156
|
+
Color classes — palette values consumed by variant classes
|
|
157
|
+
============================================================ */
|
|
158
|
+
|
|
159
|
+
.button--color-default {
|
|
160
|
+
--btn-solid-bg: var(--color-default);
|
|
161
|
+
--btn-solid-bg-hover: var(--color-default-hover);
|
|
162
|
+
--btn-solid-fg: var(--color-default-foreground);
|
|
163
|
+
--btn-soft-bg: var(--color-default);
|
|
164
|
+
--btn-soft-bg-hover: var(--color-default-hover);
|
|
165
|
+
--btn-soft-fg: var(--color-default-foreground);
|
|
166
|
+
--btn-tint-bg: var(--color-default);
|
|
167
|
+
--btn-tint-bg-hover: var(--color-default-hover);
|
|
168
|
+
--btn-tint-fg: var(--color-default-foreground);
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
.button--color-primary {
|
|
172
|
+
--btn-solid-bg: var(--color-accent);
|
|
173
|
+
--btn-solid-bg-hover: var(--color-accent-hover);
|
|
174
|
+
--btn-solid-fg: var(--color-accent-foreground);
|
|
175
|
+
--btn-soft-bg: var(--color-accent-soft);
|
|
176
|
+
--btn-soft-bg-hover: var(--color-accent-soft-hover);
|
|
177
|
+
--btn-soft-fg: var(--color-accent-soft-foreground);
|
|
178
|
+
--btn-tint-bg: color-mix(in oklab, var(--color-accent) 12%, transparent);
|
|
179
|
+
--btn-tint-bg-hover: color-mix(in oklab, var(--color-accent) 18%, transparent);
|
|
180
|
+
--btn-tint-fg: var(--color-accent);
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
.button--color-success {
|
|
184
|
+
--btn-solid-bg: var(--color-success);
|
|
185
|
+
--btn-solid-bg-hover: var(--color-success-hover);
|
|
186
|
+
--btn-solid-fg: var(--color-success-foreground);
|
|
187
|
+
--btn-soft-bg: var(--color-success-soft);
|
|
188
|
+
--btn-soft-bg-hover: var(--color-success-soft-hover);
|
|
189
|
+
--btn-soft-fg: var(--color-success-soft-foreground);
|
|
190
|
+
--btn-tint-bg: color-mix(in oklab, var(--color-success) 12%, transparent);
|
|
191
|
+
--btn-tint-bg-hover: color-mix(in oklab, var(--color-success) 18%, transparent);
|
|
192
|
+
--btn-tint-fg: var(--color-success);
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
.button--color-warning {
|
|
196
|
+
--btn-solid-bg: var(--color-warning);
|
|
197
|
+
--btn-solid-bg-hover: var(--color-warning-hover);
|
|
198
|
+
--btn-solid-fg: var(--color-warning-foreground);
|
|
199
|
+
--btn-soft-bg: var(--color-warning-soft);
|
|
200
|
+
--btn-soft-bg-hover: var(--color-warning-soft-hover);
|
|
201
|
+
--btn-soft-fg: var(--color-warning-soft-foreground);
|
|
202
|
+
--btn-tint-bg: color-mix(in oklab, var(--color-warning) 12%, transparent);
|
|
203
|
+
--btn-tint-bg-hover: color-mix(in oklab, var(--color-warning) 18%, transparent);
|
|
204
|
+
--btn-tint-fg: var(--color-warning);
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
.button--color-danger {
|
|
208
|
+
--btn-solid-bg: var(--color-danger);
|
|
209
|
+
--btn-solid-bg-hover: var(--color-danger-hover);
|
|
210
|
+
--btn-solid-fg: var(--color-danger-foreground);
|
|
211
|
+
--btn-soft-bg: var(--color-danger-soft);
|
|
212
|
+
--btn-soft-bg-hover: var(--color-danger-soft-hover);
|
|
213
|
+
--btn-soft-fg: var(--color-danger-soft-foreground);
|
|
214
|
+
--btn-tint-bg: color-mix(in oklab, var(--color-danger) 12%, transparent);
|
|
215
|
+
--btn-tint-bg-hover: color-mix(in oklab, var(--color-danger) 18%, transparent);
|
|
216
|
+
--btn-tint-fg: var(--color-danger);
|
|
168
217
|
}
|
|
169
218
|
|
|
170
219
|
/* Radius modifiers - compound selector wins over base/size rounding */
|
|
@@ -214,40 +263,6 @@
|
|
|
214
263
|
@apply w-full;
|
|
215
264
|
}
|
|
216
265
|
|
|
217
|
-
/* ============================================================
|
|
218
|
-
Button — Phase 2 extensions (02-01-STYLES)
|
|
219
|
-
============================================================ */
|
|
220
|
-
|
|
221
|
-
/* --- New color variants --- */
|
|
222
|
-
|
|
223
|
-
.button--success {
|
|
224
|
-
--button-bg: var(--color-success);
|
|
225
|
-
--button-bg-hover: var(--color-success-hover);
|
|
226
|
-
--button-bg-pressed: var(--color-success-hover);
|
|
227
|
-
--button-fg: var(--color-success-foreground);
|
|
228
|
-
}
|
|
229
|
-
|
|
230
|
-
.button--success-soft {
|
|
231
|
-
--button-bg: var(--color-success-soft);
|
|
232
|
-
--button-bg-hover: var(--color-success-soft-hover);
|
|
233
|
-
--button-bg-pressed: var(--color-success-soft-hover);
|
|
234
|
-
--button-fg: var(--color-success-soft-foreground);
|
|
235
|
-
}
|
|
236
|
-
|
|
237
|
-
.button--warning {
|
|
238
|
-
--button-bg: var(--color-warning);
|
|
239
|
-
--button-bg-hover: var(--color-warning-hover);
|
|
240
|
-
--button-bg-pressed: var(--color-warning-hover);
|
|
241
|
-
--button-fg: var(--color-warning-foreground);
|
|
242
|
-
}
|
|
243
|
-
|
|
244
|
-
.button--warning-soft {
|
|
245
|
-
--button-bg: var(--color-warning-soft);
|
|
246
|
-
--button-bg-hover: var(--color-warning-soft-hover);
|
|
247
|
-
--button-bg-pressed: var(--color-warning-soft-hover);
|
|
248
|
-
--button-fg: var(--color-warning-soft-foreground);
|
|
249
|
-
}
|
|
250
|
-
|
|
251
266
|
/* --- Loading state --- */
|
|
252
267
|
|
|
253
268
|
/* Root button in loading state: pointer-events off, cursor change */
|
package/components/input.css
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
.input {
|
|
2
|
-
@apply flex items-center gap-2 rounded-field border bg-field
|
|
2
|
+
@apply flex items-center gap-2 rounded-field border bg-field text-sm text-field-foreground shadow-field outline-none sm:text-xs;
|
|
3
3
|
|
|
4
4
|
/* Default size - matches input--md (height equivalent to h-9) */
|
|
5
5
|
height: 2.25rem;
|
|
@@ -175,19 +175,27 @@
|
|
|
175
175
|
/* ─── Size modifiers ─────────────────────────────────────────────────────────── */
|
|
176
176
|
|
|
177
177
|
.input--sm {
|
|
178
|
-
@apply text-xs
|
|
178
|
+
@apply text-xs;
|
|
179
179
|
height: 1.75rem;
|
|
180
180
|
}
|
|
181
181
|
|
|
182
|
+
.input--sm .input__input {
|
|
183
|
+
padding: 0.25rem 0.5rem;
|
|
184
|
+
}
|
|
185
|
+
|
|
182
186
|
.input--md {
|
|
183
187
|
/* No styles — md is the default size defined on .input base */
|
|
184
188
|
}
|
|
185
189
|
|
|
186
190
|
.input--lg {
|
|
187
|
-
@apply text-base
|
|
191
|
+
@apply text-base;
|
|
188
192
|
height: 2.75rem;
|
|
189
193
|
}
|
|
190
194
|
|
|
195
|
+
.input--lg .input__input {
|
|
196
|
+
padding: 0.625rem 1rem;
|
|
197
|
+
}
|
|
198
|
+
|
|
191
199
|
/* ─── Color modifiers ────────────────────────────────────────────────────────── */
|
|
192
200
|
|
|
193
201
|
.input--default {
|
|
@@ -297,32 +305,45 @@
|
|
|
297
305
|
/* ─── Slots ──────────────────────────────────────────────────────────────────── */
|
|
298
306
|
|
|
299
307
|
.input__input {
|
|
300
|
-
@apply flex-1 bg-transparent outline-none border-0
|
|
308
|
+
@apply flex-1 bg-transparent outline-none border-0 text-inherit;
|
|
301
309
|
@apply placeholder:text-field-placeholder;
|
|
310
|
+
align-self: stretch;
|
|
311
|
+
padding: 0.5rem 0.75rem;
|
|
312
|
+
border-radius: inherit;
|
|
302
313
|
|
|
303
314
|
&:focus,
|
|
304
315
|
&:focus-visible {
|
|
305
316
|
outline: none;
|
|
306
317
|
box-shadow: none;
|
|
307
318
|
}
|
|
319
|
+
}
|
|
308
320
|
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
-webkit-box-shadow: 0 0 0px 1000px var(--color-field) inset;
|
|
314
|
-
box-shadow: 0 0 0px 1000px var(--color-field) inset;
|
|
315
|
-
-webkit-text-fill-color: var(--color-field-foreground);
|
|
316
|
-
caret-color: var(--color-field-foreground);
|
|
317
|
-
}
|
|
321
|
+
/* Underlined: no horizontal padding on the input — underline spans edge-to-edge */
|
|
322
|
+
.input--underlined .input__input {
|
|
323
|
+
padding-left: 0;
|
|
324
|
+
padding-right: 0;
|
|
318
325
|
}
|
|
319
326
|
|
|
320
|
-
.input__start-content
|
|
327
|
+
.input__start-content {
|
|
328
|
+
@apply inline-flex items-center justify-center shrink-0;
|
|
329
|
+
color: var(--color-field-placeholder);
|
|
330
|
+
padding-left: 0.75rem;
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
.input--sm .input__start-content { padding-left: 0.5rem; }
|
|
334
|
+
.input--lg .input__start-content { padding-left: 1rem; }
|
|
335
|
+
.input--underlined .input__start-content { padding-left: 0; }
|
|
336
|
+
|
|
321
337
|
.input__end-content {
|
|
322
338
|
@apply inline-flex items-center justify-center shrink-0;
|
|
323
339
|
color: var(--color-field-placeholder);
|
|
340
|
+
padding-right: 0.75rem;
|
|
324
341
|
}
|
|
325
342
|
|
|
343
|
+
.input--sm .input__end-content { padding-right: 0.5rem; }
|
|
344
|
+
.input--lg .input__end-content { padding-right: 1rem; }
|
|
345
|
+
.input--underlined .input__end-content { padding-right: 0; }
|
|
346
|
+
|
|
326
347
|
.input__start-content svg,
|
|
327
348
|
.input__end-content svg {
|
|
328
349
|
@apply size-4;
|
|
@@ -406,26 +427,27 @@
|
|
|
406
427
|
transform: translateY(-110%) scale(0.85);
|
|
407
428
|
}
|
|
408
429
|
|
|
409
|
-
/* Start-content pushes the label's left anchor so it doesn't overlap the icon
|
|
430
|
+
/* Start-content pushes the label's left anchor so it doesn't overlap the icon.
|
|
431
|
+
Formula: start-content-pl + icon(1rem) + gap + input-pl */
|
|
410
432
|
.input--label-inside:has(> .input__start-content) .input__label {
|
|
411
|
-
left: calc(0.75rem + 1rem + 0.5rem); /*
|
|
433
|
+
left: calc(0.75rem + 1rem + 0.5rem + 0.75rem); /* start-content-pl + size-4 + gap-2 + input-pl */
|
|
412
434
|
}
|
|
413
435
|
.input--label-inside.input--underlined:has(> .input__start-content) .input__label {
|
|
414
|
-
left: calc(1rem + 0.5rem); /*
|
|
436
|
+
left: calc(1rem + 0.5rem); /* icon + gap-2 (underlined has no pl on start-content or input) */
|
|
415
437
|
}
|
|
416
438
|
|
|
417
439
|
/* Size-aware offsets for the inside variant */
|
|
418
440
|
.input--label-inside.input--sm .input__label {
|
|
419
441
|
font-size: var(--text-xs, 0.75rem);
|
|
420
|
-
left: 0.5rem; /* matches
|
|
442
|
+
left: 0.5rem; /* matches input--sm input pl-2 */
|
|
421
443
|
}
|
|
422
444
|
|
|
423
445
|
.input--label-inside.input--sm:has(> .input__start-content) .input__label {
|
|
424
|
-
left: calc(0.5rem + 1rem + 0.4rem); /*
|
|
446
|
+
left: calc(0.5rem + 1rem + 0.4rem + 0.5rem); /* start-content-pl + size-4 + gap + input-pl */
|
|
425
447
|
}
|
|
426
448
|
|
|
427
449
|
.input--label-inside.input--underlined.input--sm:has(> .input__start-content) .input__label {
|
|
428
|
-
left: calc(1rem + 0.4rem); /*
|
|
450
|
+
left: calc(1rem + 0.4rem); /* icon + gap (underlined has no pl) */
|
|
429
451
|
}
|
|
430
452
|
|
|
431
453
|
.input--label-inside.input--sm .input__input {
|
|
@@ -439,14 +461,14 @@
|
|
|
439
461
|
|
|
440
462
|
.input--label-inside.input--lg .input__label {
|
|
441
463
|
font-size: var(--text-base, 1rem);
|
|
442
|
-
left: 1rem; /* matches
|
|
464
|
+
left: 1rem; /* matches input--lg input pl-4 */
|
|
443
465
|
}
|
|
444
466
|
.input--label-inside.input--lg:has(> .input__start-content) .input__label {
|
|
445
|
-
left: calc(1rem + 1rem + 1rem); /*
|
|
467
|
+
left: calc(1rem + 1rem + 1rem + 1rem); /* start-content-pl + size-4 + gap-4 + input-pl */
|
|
446
468
|
}
|
|
447
469
|
|
|
448
470
|
.input--label-inside.input--underlined.input--lg:has(> .input__start-content) .input__label {
|
|
449
|
-
left: calc(1rem + 1rem); /*
|
|
471
|
+
left: calc(1rem + 1rem); /* icon + gap-4 (underlined has no pl) */
|
|
450
472
|
}
|
|
451
473
|
|
|
452
474
|
.input--label-inside.input--lg .input__input {
|
|
@@ -539,7 +561,8 @@
|
|
|
539
561
|
.input__clear-button,
|
|
540
562
|
.input__password-toggle {
|
|
541
563
|
@apply inline-flex items-center justify-center shrink-0;
|
|
542
|
-
@apply bg-transparent border-0
|
|
564
|
+
@apply bg-transparent border-0 cursor-pointer outline-none;
|
|
565
|
+
padding: 0 0.75rem 0 0;
|
|
543
566
|
color: var(--color-field-placeholder);
|
|
544
567
|
transition:
|
|
545
568
|
color 300ms var(--ease-smooth),
|
|
@@ -552,17 +575,32 @@
|
|
|
552
575
|
@apply size-4;
|
|
553
576
|
}
|
|
554
577
|
|
|
578
|
+
.input--sm .input__clear-button,
|
|
579
|
+
.input--sm .input__password-toggle {
|
|
580
|
+
padding-right: 0.5rem;
|
|
581
|
+
}
|
|
582
|
+
|
|
555
583
|
.input--sm .input__clear-button svg,
|
|
556
584
|
.input--sm .input__password-toggle svg {
|
|
557
585
|
width: 0.875rem;
|
|
558
586
|
height: 0.875rem;
|
|
559
587
|
}
|
|
560
588
|
|
|
589
|
+
.input--lg .input__clear-button,
|
|
590
|
+
.input--lg .input__password-toggle {
|
|
591
|
+
padding-right: 1rem;
|
|
592
|
+
}
|
|
593
|
+
|
|
561
594
|
.input--lg .input__clear-button svg,
|
|
562
595
|
.input--lg .input__password-toggle svg {
|
|
563
596
|
@apply size-5;
|
|
564
597
|
}
|
|
565
598
|
|
|
599
|
+
.input--underlined .input__clear-button,
|
|
600
|
+
.input--underlined .input__password-toggle {
|
|
601
|
+
padding-right: 0;
|
|
602
|
+
}
|
|
603
|
+
|
|
566
604
|
@media (hover: hover) {
|
|
567
605
|
.input__clear-button:hover,
|
|
568
606
|
.input__password-toggle:hover,
|
package/components/modal.css
CHANGED
|
@@ -38,12 +38,28 @@
|
|
|
38
38
|
}
|
|
39
39
|
}
|
|
40
40
|
|
|
41
|
+
/**
|
|
42
|
+
* Element: portal - stacking context wrapper for each modal instance.
|
|
43
|
+
* Wrapping backdrop + container in a single fixed element means each modal
|
|
44
|
+
* occupies its own stacking context. Later-opened modals render after this
|
|
45
|
+
* element in the DOM, so at equal z-index their entire portal (backdrop
|
|
46
|
+
* included) paints on top of the previous one, fixing the issue where the
|
|
47
|
+
* second modal's backdrop would appear behind the first modal's content.
|
|
48
|
+
*/
|
|
49
|
+
.modal__portal {
|
|
50
|
+
position: fixed;
|
|
51
|
+
inset: 0;
|
|
52
|
+
z-index: var(--z-modal);
|
|
53
|
+
pointer-events: none;
|
|
54
|
+
}
|
|
55
|
+
|
|
41
56
|
/**
|
|
42
57
|
* Element: backdrop - the overlay behind the dialog
|
|
43
58
|
*/
|
|
44
59
|
.modal__backdrop {
|
|
45
60
|
@apply fixed inset-0;
|
|
46
61
|
z-index: var(--z-modal-backdrop);
|
|
62
|
+
pointer-events: auto;
|
|
47
63
|
@apply flex flex-row items-center justify-center;
|
|
48
64
|
@apply h-(--visual-viewport-height) w-full;
|
|
49
65
|
|
|
@@ -173,7 +189,6 @@
|
|
|
173
189
|
@apply relative;
|
|
174
190
|
@apply flex w-full flex-col;
|
|
175
191
|
@apply rounded-3xl bg-overlay shadow-overlay outline-none;
|
|
176
|
-
@apply p-6;
|
|
177
192
|
@apply pointer-events-auto;
|
|
178
193
|
|
|
179
194
|
&[data-placement="auto"] {
|
|
@@ -256,8 +271,7 @@
|
|
|
256
271
|
* Element: header - the top section with the title
|
|
257
272
|
*/
|
|
258
273
|
.modal__header {
|
|
259
|
-
@apply flex flex-col gap-3;
|
|
260
|
-
@apply mb-0;
|
|
274
|
+
@apply flex flex-col gap-3 mb-0 p-5;
|
|
261
275
|
|
|
262
276
|
/* When header contains icon, use flex-col layout with gap */
|
|
263
277
|
& > .modal__icon {
|
|
@@ -286,9 +300,7 @@
|
|
|
286
300
|
* Element: body - the main content area
|
|
287
301
|
*/
|
|
288
302
|
.modal__body {
|
|
289
|
-
@apply min-h-0 flex-1;
|
|
290
|
-
@apply text-sm leading-[1.43] text-muted;
|
|
291
|
-
@apply my-0;
|
|
303
|
+
@apply min-h-0 flex-1 text-sm leading-[1.43] text-muted my-0 p-5 pt-0;
|
|
292
304
|
}
|
|
293
305
|
|
|
294
306
|
/**
|
package/components/textarea.css
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/* use textarea instead of text-area to avoid conflict with Tailwind `text-` prefix */
|
|
2
2
|
.textarea {
|
|
3
|
-
@apply flex items-start gap-2 rounded-field border bg-field
|
|
3
|
+
@apply flex items-start gap-2 rounded-field border bg-field text-sm text-field-foreground shadow-field outline-none sm:text-xs;
|
|
4
4
|
|
|
5
5
|
border-width: var(--border-width-field);
|
|
6
6
|
border-color: var(--color-field-border);
|
|
@@ -124,7 +124,7 @@
|
|
|
124
124
|
|
|
125
125
|
.textarea--underlined {
|
|
126
126
|
/* Bottom border only — always-visible underline */
|
|
127
|
-
@apply rounded-none shadow-none bg-transparent
|
|
127
|
+
@apply rounded-none shadow-none bg-transparent;
|
|
128
128
|
border-top: none;
|
|
129
129
|
border-left: none;
|
|
130
130
|
border-right: none;
|
|
@@ -174,7 +174,11 @@
|
|
|
174
174
|
/* ─── Size modifiers ─────────────────────────────────────────────────────────── */
|
|
175
175
|
|
|
176
176
|
.textarea--sm {
|
|
177
|
-
@apply text-xs
|
|
177
|
+
@apply text-xs;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
.textarea--sm .textarea__input {
|
|
181
|
+
padding: 0.25rem 0.5rem;
|
|
178
182
|
}
|
|
179
183
|
|
|
180
184
|
.textarea--md {
|
|
@@ -182,7 +186,11 @@
|
|
|
182
186
|
}
|
|
183
187
|
|
|
184
188
|
.textarea--lg {
|
|
185
|
-
@apply text-base
|
|
189
|
+
@apply text-base;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
.textarea--lg .textarea__input {
|
|
193
|
+
padding: 0.625rem 1rem;
|
|
186
194
|
}
|
|
187
195
|
|
|
188
196
|
/* ─── Color modifiers ────────────────────────────────────────────────────────── */
|
|
@@ -284,9 +292,11 @@
|
|
|
284
292
|
/* ─── Slots ──────────────────────────────────────────────────────────────────── */
|
|
285
293
|
|
|
286
294
|
.textarea__input {
|
|
287
|
-
@apply flex-1 bg-transparent outline-none border-0
|
|
295
|
+
@apply flex-1 bg-transparent outline-none border-0 text-inherit resize-none;
|
|
288
296
|
@apply placeholder:text-field-placeholder;
|
|
289
297
|
min-height: 1.5rem;
|
|
298
|
+
padding: 0.5rem 0.75rem;
|
|
299
|
+
border-radius: inherit;
|
|
290
300
|
|
|
291
301
|
&:focus,
|
|
292
302
|
&:focus-visible {
|
|
@@ -297,20 +307,41 @@
|
|
|
297
307
|
&:-webkit-autofill,
|
|
298
308
|
&:-webkit-autofill:hover,
|
|
299
309
|
&:-webkit-autofill:focus {
|
|
300
|
-
-webkit-box-shadow: 0 0 0px 1000px var(--color-field) inset;
|
|
301
|
-
box-shadow: 0 0 0px 1000px var(--color-field) inset;
|
|
310
|
+
-webkit-box-shadow: 0 0 0px 1000px color-mix(in oklch, #006fee 8%, var(--color-field, white)) inset;
|
|
311
|
+
box-shadow: 0 0 0px 1000px color-mix(in oklch, #006fee 8%, var(--color-field, white)) inset;
|
|
302
312
|
-webkit-text-fill-color: var(--color-field-foreground);
|
|
303
313
|
caret-color: var(--color-field-foreground);
|
|
304
314
|
}
|
|
305
315
|
}
|
|
306
316
|
|
|
307
|
-
.
|
|
317
|
+
.textarea--underlined .textarea__input {
|
|
318
|
+
padding-left: 0;
|
|
319
|
+
padding-right: 0;
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
.textarea__start-content {
|
|
323
|
+
@apply inline-flex items-center justify-center shrink-0;
|
|
324
|
+
color: var(--color-field-placeholder);
|
|
325
|
+
padding-top: 0.125rem;
|
|
326
|
+
padding-left: 0.75rem;
|
|
327
|
+
}
|
|
328
|
+
|
|
308
329
|
.textarea__end-content {
|
|
309
330
|
@apply inline-flex items-center justify-center shrink-0;
|
|
310
331
|
color: var(--color-field-placeholder);
|
|
311
332
|
padding-top: 0.125rem;
|
|
333
|
+
padding-right: 0.75rem;
|
|
312
334
|
}
|
|
313
335
|
|
|
336
|
+
.textarea--sm .textarea__start-content { padding-left: 0.5rem; }
|
|
337
|
+
.textarea--lg .textarea__start-content { padding-left: 1rem; }
|
|
338
|
+
|
|
339
|
+
.textarea--sm .textarea__end-content { padding-right: 0.5rem; }
|
|
340
|
+
.textarea--lg .textarea__end-content { padding-right: 1rem; }
|
|
341
|
+
|
|
342
|
+
.textarea--underlined .textarea__start-content { padding-left: 0; }
|
|
343
|
+
.textarea--underlined .textarea__end-content { padding-right: 0; }
|
|
344
|
+
|
|
314
345
|
.textarea__start-content svg,
|
|
315
346
|
.textarea__end-content svg {
|
|
316
347
|
@apply size-4;
|
|
@@ -333,6 +364,9 @@
|
|
|
333
364
|
|
|
334
365
|
.textarea--label-inside {
|
|
335
366
|
position: relative;
|
|
367
|
+
}
|
|
368
|
+
|
|
369
|
+
.textarea--label-inside .textarea__input {
|
|
336
370
|
padding-top: 1.5rem;
|
|
337
371
|
}
|
|
338
372
|
|
|
@@ -372,7 +406,7 @@
|
|
|
372
406
|
}
|
|
373
407
|
|
|
374
408
|
.textarea--label-inside:has(> .textarea__start-content) .textarea__label {
|
|
375
|
-
left: calc(0.75rem + 1rem + 0.5rem);
|
|
409
|
+
left: calc(0.75rem + 1rem + 0.5rem + 0.75rem);
|
|
376
410
|
}
|
|
377
411
|
.textarea--label-inside.textarea--underlined:has(> .textarea__start-content) .textarea__label {
|
|
378
412
|
left: calc(1rem + 0.5rem);
|
|
@@ -384,7 +418,7 @@
|
|
|
384
418
|
}
|
|
385
419
|
|
|
386
420
|
.textarea--label-inside.textarea--sm:has(> .textarea__start-content) .textarea__label {
|
|
387
|
-
left: calc(0.5rem + 1rem + 0.4rem);
|
|
421
|
+
left: calc(0.5rem + 1rem + 0.4rem + 0.5rem);
|
|
388
422
|
}
|
|
389
423
|
|
|
390
424
|
.textarea--label-inside.textarea--underlined.textarea--sm:has(> .textarea__start-content) .textarea__label {
|
|
@@ -396,7 +430,7 @@
|
|
|
396
430
|
left: 1rem;
|
|
397
431
|
}
|
|
398
432
|
.textarea--label-inside.textarea--lg:has(> .textarea__start-content) .textarea__label {
|
|
399
|
-
left: calc(1rem + 1rem + 1rem);
|
|
433
|
+
left: calc(1rem + 1rem + 1rem + 1rem);
|
|
400
434
|
}
|
|
401
435
|
|
|
402
436
|
.textarea--label-inside.textarea--underlined.textarea--lg:has(> .textarea__start-content) .textarea__label {
|
|
@@ -482,7 +516,8 @@
|
|
|
482
516
|
|
|
483
517
|
.textarea__clear-button {
|
|
484
518
|
@apply inline-flex items-center justify-center shrink-0;
|
|
485
|
-
@apply bg-transparent border-0
|
|
519
|
+
@apply bg-transparent border-0 cursor-pointer outline-none;
|
|
520
|
+
padding: 0 0.75rem 0 0;
|
|
486
521
|
color: var(--color-field-placeholder);
|
|
487
522
|
transition:
|
|
488
523
|
color 300ms var(--ease-smooth),
|
|
@@ -494,6 +529,18 @@
|
|
|
494
529
|
@apply size-4;
|
|
495
530
|
}
|
|
496
531
|
|
|
532
|
+
.textarea--sm .textarea__clear-button {
|
|
533
|
+
padding-right: 0.5rem;
|
|
534
|
+
}
|
|
535
|
+
|
|
536
|
+
.textarea--lg .textarea__clear-button {
|
|
537
|
+
padding-right: 1rem;
|
|
538
|
+
}
|
|
539
|
+
|
|
540
|
+
.textarea--underlined .textarea__clear-button {
|
|
541
|
+
padding-right: 0;
|
|
542
|
+
}
|
|
543
|
+
|
|
497
544
|
.textarea--sm .textarea__clear-button svg {
|
|
498
545
|
width: 0.875rem;
|
|
499
546
|
height: 0.875rem;
|
package/package.json
CHANGED
|
@@ -14,7 +14,8 @@ export const buttonVariants = tv({
|
|
|
14
14
|
isIconOnly: false,
|
|
15
15
|
isLoading: false,
|
|
16
16
|
size: "md",
|
|
17
|
-
variant: "
|
|
17
|
+
variant: "solid",
|
|
18
|
+
color: "primary",
|
|
18
19
|
},
|
|
19
20
|
variants: {
|
|
20
21
|
fullWidth: {
|
|
@@ -47,17 +48,29 @@ export const buttonVariants = tv({
|
|
|
47
48
|
xs: { base: "button--xs" },
|
|
48
49
|
},
|
|
49
50
|
variant: {
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
51
|
+
// Current API
|
|
52
|
+
solid: { base: "button--solid" },
|
|
53
|
+
default: { base: "button--default" },
|
|
53
54
|
outline: { base: "button--outline" },
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
55
|
+
ghost: { base: "button--ghost" },
|
|
56
|
+
soft: { base: "button--soft" },
|
|
57
|
+
// Legacy aliases — resolved to new variant+color in Button.vue
|
|
58
|
+
primary: { base: "button--solid" },
|
|
59
|
+
secondary: { base: "button--default" },
|
|
60
|
+
tertiary: { base: "button--default" },
|
|
61
|
+
danger: { base: "button--solid" },
|
|
62
|
+
"danger-soft": { base: "button--soft" },
|
|
63
|
+
success: { base: "button--solid" },
|
|
64
|
+
"success-soft": { base: "button--soft" },
|
|
65
|
+
warning: { base: "button--solid" },
|
|
66
|
+
"warning-soft": { base: "button--soft" },
|
|
67
|
+
},
|
|
68
|
+
color: {
|
|
69
|
+
default: { base: "button--color-default" },
|
|
70
|
+
primary: { base: "button--color-primary" },
|
|
71
|
+
success: { base: "button--color-success" },
|
|
72
|
+
warning: { base: "button--color-warning" },
|
|
73
|
+
danger: { base: "button--color-danger" },
|
|
61
74
|
},
|
|
62
75
|
},
|
|
63
76
|
});
|