@auronui/styles 1.0.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/DATA_ATTRIBUTES.md +163 -0
- package/LICENSE +21 -0
- package/README.md +54 -0
- package/base/base.css +40 -0
- package/components/accordion.css +201 -0
- package/components/alert-dialog.css +307 -0
- package/components/alert.css +143 -0
- package/components/aspect-ratio.css +8 -0
- package/components/autocomplete.css +685 -0
- package/components/avatar.css +78 -0
- package/components/badge.css +186 -0
- package/components/breadcrumbs.css +76 -0
- package/components/button-group.css +126 -0
- package/components/button.css +282 -0
- package/components/calendar-year-picker.css +193 -0
- package/components/calendar.css +332 -0
- package/components/card.css +225 -0
- package/components/checkbox-group.css +7 -0
- package/components/checkbox.css +268 -0
- package/components/chip.css +227 -0
- package/components/close-button.css +65 -0
- package/components/collapsible-group.css +7 -0
- package/components/collapsible.css +74 -0
- package/components/color-area.css +81 -0
- package/components/color-field.css +99 -0
- package/components/color-input-group.css +153 -0
- package/components/color-picker.css +121 -0
- package/components/color-slider.css +266 -0
- package/components/color-swatch-picker.css +247 -0
- package/components/color-swatch.css +42 -0
- package/components/combo-box.css +203 -0
- package/components/date-input-group.css +125 -0
- package/components/date-input.css +529 -0
- package/components/date-picker.css +86 -0
- package/components/date-range-field.css +538 -0
- package/components/date-range-picker.css +93 -0
- package/components/description.css +4 -0
- package/components/drawer.css +222 -0
- package/components/dropdown.css +67 -0
- package/components/empty-state.css +4 -0
- package/components/error-message.css +13 -0
- package/components/field-error.css +19 -0
- package/components/fieldset.css +39 -0
- package/components/header.css +7 -0
- package/components/index.css +164 -0
- package/components/input-otp.css +124 -0
- package/components/input.css +603 -0
- package/components/kbd.css +27 -0
- package/components/label.css +28 -0
- package/components/link.css +144 -0
- package/components/list-box-item.css +29 -0
- package/components/list-box-section.css +13 -0
- package/components/list-box.css +11 -0
- package/components/menu-item.css +68 -0
- package/components/menu-section.css +18 -0
- package/components/menu.css +7 -0
- package/components/meter.css +104 -0
- package/components/modal.css +335 -0
- package/components/number-field.css +395 -0
- package/components/pagination.css +157 -0
- package/components/popover.css +96 -0
- package/components/progress-bar.css +126 -0
- package/components/progress-circle.css +82 -0
- package/components/radio-group.css +47 -0
- package/components/radio.css +157 -0
- package/components/range-calendar.css +402 -0
- package/components/scroll-area.css +70 -0
- package/components/scroll-shadow.css +77 -0
- package/components/select.css +649 -0
- package/components/separator.css +59 -0
- package/components/skeleton.css +48 -0
- package/components/slider.css +155 -0
- package/components/spinner.css +42 -0
- package/components/splitter.css +74 -0
- package/components/stepper.css +160 -0
- package/components/surface.css +23 -0
- package/components/switch-group.css +17 -0
- package/components/switch.css +194 -0
- package/components/table.css +341 -0
- package/components/tabs.css +262 -0
- package/components/tag-group.css +66 -0
- package/components/tag.css +99 -0
- package/components/textarea.css +536 -0
- package/components/time-field.css +530 -0
- package/components/toast.css +267 -0
- package/components/toggle-button-group.css +174 -0
- package/components/toggle-button.css +149 -0
- package/components/toolbar.css +32 -0
- package/components/tooltip.css +47 -0
- package/components/tree.css +81 -0
- package/index.css +29 -0
- package/package.json +415 -0
- package/src/components/accordion/accordion.styles.ts +46 -0
- package/src/components/accordion/index.ts +1 -0
- package/src/components/alert/alert.styles.ts +37 -0
- package/src/components/alert/index.ts +1 -0
- package/src/components/alert-dialog/alert-dialog.styles.ts +72 -0
- package/src/components/alert-dialog/index.ts +1 -0
- package/src/components/aspect-ratio/aspect-ratio.styles.ts +10 -0
- package/src/components/aspect-ratio/index.ts +1 -0
- package/src/components/autocomplete/autocomplete.styles.ts +86 -0
- package/src/components/autocomplete/index.ts +1 -0
- package/src/components/avatar/avatar.styles.ts +53 -0
- package/src/components/avatar/index.ts +1 -0
- package/src/components/badge/badge.styles.ts +77 -0
- package/src/components/badge/index.ts +1 -0
- package/src/components/breadcrumbs/breadcrumbs.styles.ts +14 -0
- package/src/components/breadcrumbs/index.ts +1 -0
- package/src/components/button/__tests__/button.styles.test.ts +79 -0
- package/src/components/button/button.styles.ts +65 -0
- package/src/components/button/index.ts +1 -0
- package/src/components/button-group/button-group.styles.ts +32 -0
- package/src/components/button-group/index.ts +1 -0
- package/src/components/calendar/calendar.styles.ts +60 -0
- package/src/components/calendar/index.ts +1 -0
- package/src/components/calendar-year-picker/calendar-year-picker.styles.ts +15 -0
- package/src/components/calendar-year-picker/index.ts +1 -0
- package/src/components/card/card.styles.ts +65 -0
- package/src/components/card/index.ts +1 -0
- package/src/components/checkbox/checkbox.styles.ts +27 -0
- package/src/components/checkbox/index.ts +1 -0
- package/src/components/checkbox-group/checkbox-group.styles.ts +18 -0
- package/src/components/checkbox-group/index.ts +1 -0
- package/src/components/chip/chip.styles.ts +65 -0
- package/src/components/chip/index.ts +1 -0
- package/src/components/close-button/close-button.styles.ts +17 -0
- package/src/components/close-button/index.ts +1 -0
- package/src/components/collapsible/collapsible.styles.ts +25 -0
- package/src/components/collapsible/index.ts +1 -0
- package/src/components/collapsible-group/collapsible-group.styles.ts +13 -0
- package/src/components/collapsible-group/index.ts +1 -0
- package/src/components/color-area/color-area.styles.ts +23 -0
- package/src/components/color-area/index.ts +1 -0
- package/src/components/color-field/color-field.styles.ts +18 -0
- package/src/components/color-field/index.ts +1 -0
- package/src/components/color-input-group/color-input-group.styles.ts +34 -0
- package/src/components/color-input-group/index.ts +1 -0
- package/src/components/color-picker/color-picker.styles.ts +13 -0
- package/src/components/color-picker/index.ts +1 -0
- package/src/components/color-slider/color-slider.styles.ts +14 -0
- package/src/components/color-slider/index.ts +1 -0
- package/src/components/color-swatch/color-swatch.styles.ts +26 -0
- package/src/components/color-swatch/index.ts +1 -0
- package/src/components/color-swatch-picker/color-swatch-picker.styles.ts +54 -0
- package/src/components/color-swatch-picker/index.ts +1 -0
- package/src/components/combo-box/combo-box.styles.ts +26 -0
- package/src/components/combo-box/index.ts +1 -0
- package/src/components/date-input/date-input.styles.ts +86 -0
- package/src/components/date-input/index.ts +1 -0
- package/src/components/date-picker/date-picker.styles.ts +14 -0
- package/src/components/date-picker/index.ts +1 -0
- package/src/components/date-range-field/date-range-field.styles.ts +87 -0
- package/src/components/date-range-field/index.ts +1 -0
- package/src/components/date-range-picker/date-range-picker.styles.ts +14 -0
- package/src/components/date-range-picker/index.ts +1 -0
- package/src/components/description/description.styles.ts +9 -0
- package/src/components/description/index.ts +1 -0
- package/src/components/drawer/drawer.styles.ts +55 -0
- package/src/components/drawer/index.ts +1 -0
- package/src/components/dropdown/dropdown.styles.ts +14 -0
- package/src/components/dropdown/index.ts +1 -0
- package/src/components/empty-state/empty-state.styles.ts +9 -0
- package/src/components/empty-state/index.ts +1 -0
- package/src/components/error-message/error-message.styles.ts +9 -0
- package/src/components/error-message/index.ts +1 -0
- package/src/components/fieldset/fieldset.styles.ts +29 -0
- package/src/components/fieldset/index.ts +1 -0
- package/src/components/header/header.styles.ts +5 -0
- package/src/components/header/index.ts +1 -0
- package/src/components/index.ts +84 -0
- package/src/components/input/index.ts +1 -0
- package/src/components/input/input.styles.ts +87 -0
- package/src/components/input-otp/index.ts +1 -0
- package/src/components/input-otp/input-otp.styles.ts +30 -0
- package/src/components/kbd/index.ts +1 -0
- package/src/components/kbd/kbd.styles.ts +20 -0
- package/src/components/label/index.ts +1 -0
- package/src/components/label/label.styles.ts +25 -0
- package/src/components/link/index.ts +1 -0
- package/src/components/link/link.styles.ts +38 -0
- package/src/components/list-box/index.ts +1 -0
- package/src/components/list-box/list-box.styles.ts +18 -0
- package/src/components/list-box-item/index.ts +1 -0
- package/src/components/list-box-item/list-box-item.styles.ts +25 -0
- package/src/components/list-box-section/index.ts +1 -0
- package/src/components/list-box-section/list-box-section.styles.ts +13 -0
- package/src/components/menu/index.ts +1 -0
- package/src/components/menu/menu.styles.ts +9 -0
- package/src/components/menu-item/index.ts +1 -0
- package/src/components/menu-item/menu-item.styles.ts +26 -0
- package/src/components/menu-section/index.ts +1 -0
- package/src/components/menu-section/menu-section.styles.ts +14 -0
- package/src/components/meter/index.ts +1 -0
- package/src/components/meter/meter.styles.ts +48 -0
- package/src/components/modal/index.ts +1 -0
- package/src/components/modal/modal.styles.ts +70 -0
- package/src/components/number-field/index.ts +1 -0
- package/src/components/number-field/number-field.styles.ts +80 -0
- package/src/components/pagination/index.ts +1 -0
- package/src/components/pagination/pagination.styles.ts +32 -0
- package/src/components/popover/index.ts +1 -0
- package/src/components/popover/popover.styles.ts +14 -0
- package/src/components/progress-bar/index.ts +1 -0
- package/src/components/progress-bar/progress-bar.styles.ts +97 -0
- package/src/components/progress-circle/index.ts +1 -0
- package/src/components/progress-circle/progress-circle.styles.ts +74 -0
- package/src/components/radio/index.ts +1 -0
- package/src/components/radio/radio.styles.ts +14 -0
- package/src/components/radio-group/index.ts +1 -0
- package/src/components/radio-group/radio-group.styles.ts +18 -0
- package/src/components/range-calendar/index.ts +1 -0
- package/src/components/range-calendar/range-calendar.styles.ts +60 -0
- package/src/components/scroll-shadow/index.ts +1 -0
- package/src/components/scroll-shadow/scroll-shadow.styles.ts +37 -0
- package/src/components/select/index.ts +1 -0
- package/src/components/select/select.styles.ts +86 -0
- package/src/components/separator/index.ts +1 -0
- package/src/components/separator/separator.styles.ts +25 -0
- package/src/components/skeleton/index.ts +1 -0
- package/src/components/skeleton/skeleton.styles.ts +21 -0
- package/src/components/slider/index.ts +1 -0
- package/src/components/slider/slider.styles.ts +40 -0
- package/src/components/spinner/index.ts +1 -0
- package/src/components/spinner/spinner.styles.ts +28 -0
- package/src/components/splitter/index.ts +1 -0
- package/src/components/splitter/splitter.styles.ts +28 -0
- package/src/components/stepper/index.ts +1 -0
- package/src/components/stepper/stepper.styles.ts +57 -0
- package/src/components/surface/index.ts +1 -0
- package/src/components/surface/surface.styles.ts +20 -0
- package/src/components/switch/index.ts +1 -0
- package/src/components/switch/switch.styles.ts +31 -0
- package/src/components/switch-group/index.ts +1 -0
- package/src/components/switch-group/switch-group.styles.ts +25 -0
- package/src/components/table/index.ts +1 -0
- package/src/components/table/table.styles.ts +47 -0
- package/src/components/tabs/index.ts +1 -0
- package/src/components/tabs/tabs.styles.ts +31 -0
- package/src/components/tag/index.ts +1 -0
- package/src/components/tag/tag.styles.ts +37 -0
- package/src/components/tag-group/index.ts +1 -0
- package/src/components/tag-group/tag-group.styles.ts +12 -0
- package/src/components/text/index.ts +1 -0
- package/src/components/text/text.styles.ts +29 -0
- package/src/components/textarea/index.ts +1 -0
- package/src/components/textarea/textarea.styles.ts +86 -0
- package/src/components/time-field/index.ts +1 -0
- package/src/components/time-field/time-field.styles.ts +86 -0
- package/src/components/toast/index.ts +1 -0
- package/src/components/toast/toast.styles.ts +67 -0
- package/src/components/toggle-button/index.ts +1 -0
- package/src/components/toggle-button/toggle-button.styles.ts +28 -0
- package/src/components/toggle-button-group/index.ts +1 -0
- package/src/components/toggle-button-group/toggle-button-group.styles.ts +39 -0
- package/src/components/toolbar/index.ts +1 -0
- package/src/components/toolbar/toolbar.styles.ts +23 -0
- package/src/components/tooltip/index.ts +1 -0
- package/src/components/tooltip/tooltip.styles.ts +12 -0
- package/src/components/tree/index.ts +1 -0
- package/src/components/tree/tree.styles.ts +33 -0
- package/src/index.ts +5 -0
- package/src/utils/index.ts +15 -0
- package/themes/default/components/index.css +6 -0
- package/themes/default/index.css +8 -0
- package/themes/default/variables.css +168 -0
- package/themes/shared/theme.css +196 -0
- package/utilities/index.css +244 -0
- package/variants/index.css +106 -0
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
/* Tag component styles */
|
|
2
|
+
.tag {
|
|
3
|
+
--optical-offset: 0.031em;
|
|
4
|
+
|
|
5
|
+
@apply relative inline-flex items-center gap-1 rounded-full font-medium select-none no-highlight;
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Transitions
|
|
9
|
+
* CRITICAL: motion-reduce must be AFTER transition for correct override specificity
|
|
10
|
+
*/
|
|
11
|
+
transition:
|
|
12
|
+
color 300ms var(--ease-smooth),
|
|
13
|
+
scale 300ms var(--ease-smooth),
|
|
14
|
+
opacity 300ms var(--ease-smooth),
|
|
15
|
+
background-color 300ms var(--ease-smooth),
|
|
16
|
+
box-shadow 300ms var(--ease-out);
|
|
17
|
+
@apply origin-center transform-gpu motion-reduce:transition-none;
|
|
18
|
+
|
|
19
|
+
/* Cursor */
|
|
20
|
+
cursor: var(--cursor-interactive);
|
|
21
|
+
|
|
22
|
+
/* SVG icon styling */
|
|
23
|
+
& svg {
|
|
24
|
+
@apply pointer-events-none size-3 shrink-0 self-center text-current;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
/* Disabled state */
|
|
29
|
+
.tag:is([data-disabled], [aria-disabled="true"]) {
|
|
30
|
+
@apply status-disabled;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
/* Focus visible state (keyboard focus only) */
|
|
34
|
+
.tag:is(:focus-visible, [data-focus-visible]) {
|
|
35
|
+
@apply status-focused;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/* Pressed/Active state */
|
|
39
|
+
.tag:active {
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/* Selected state */
|
|
43
|
+
.tag:is([data-state="checked"], [aria-selected="true"]) {
|
|
44
|
+
@apply bg-accent-soft text-accent-soft-foreground;
|
|
45
|
+
|
|
46
|
+
/* Selected + Hover state */
|
|
47
|
+
@media (hover: hover) {
|
|
48
|
+
&:hover {
|
|
49
|
+
@apply bg-accent-soft-hover;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
/* Size */
|
|
55
|
+
.tag--sm {
|
|
56
|
+
@apply px-2 py-0.5 text-xs;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.tag--md {
|
|
60
|
+
@apply px-2 py-1 text-xs;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.tag--lg {
|
|
64
|
+
@apply px-2.5 py-1.5 text-sm;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
/* Variant */
|
|
68
|
+
.tag--default {
|
|
69
|
+
@apply bg-default text-default-foreground;
|
|
70
|
+
|
|
71
|
+
/* Hover state (when not selected or disabled) */
|
|
72
|
+
@media (hover: hover) {
|
|
73
|
+
&:hover:not([data-state="checked"]):not([data-disabled]) {
|
|
74
|
+
@apply bg-default-hover;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.tag--surface {
|
|
80
|
+
@apply bg-surface text-surface-foreground;
|
|
81
|
+
|
|
82
|
+
/* Hover state (when not selected or disabled) */
|
|
83
|
+
@media (hover: hover) {
|
|
84
|
+
&:hover:not([data-state="checked"]):not([data-disabled]) {
|
|
85
|
+
@apply bg-surface-hover;
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
/* Remove Button */
|
|
91
|
+
.tag__remove-button {
|
|
92
|
+
@apply size-3 text-inherit;
|
|
93
|
+
cursor: var(--cursor-interactive);
|
|
94
|
+
|
|
95
|
+
/* SVG icon styling */
|
|
96
|
+
& svg {
|
|
97
|
+
@apply size-[inherit] shrink-0 self-center text-current;
|
|
98
|
+
}
|
|
99
|
+
}
|
|
@@ -0,0 +1,536 @@
|
|
|
1
|
+
/* use textarea instead of text-area to avoid conflict with Tailwind `text-` prefix */
|
|
2
|
+
.textarea {
|
|
3
|
+
@apply flex items-start gap-2 rounded-field border bg-field px-3 py-2 text-sm text-field-foreground shadow-field outline-none sm:text-xs;
|
|
4
|
+
|
|
5
|
+
border-width: var(--border-width-field);
|
|
6
|
+
border-color: var(--color-field-border);
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Transitions
|
|
10
|
+
* CRITICAL: motion-reduce must be AFTER transition for correct override specificity
|
|
11
|
+
*/
|
|
12
|
+
transition:
|
|
13
|
+
background-color 300ms var(--ease-smooth),
|
|
14
|
+
border-color 300ms var(--ease-smooth),
|
|
15
|
+
box-shadow 300ms var(--ease-out);
|
|
16
|
+
@apply motion-reduce:transition-none;
|
|
17
|
+
|
|
18
|
+
@media (hover: hover) {
|
|
19
|
+
&:has(> textarea:hover):not(:focus-within),
|
|
20
|
+
&[data-hovered="true"]:not([data-focused="true"]):not([data-focus-visible="true"]) {
|
|
21
|
+
@apply bg-field-hover;
|
|
22
|
+
border-color: var(--color-field-border-hover);
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
&.textarea--sm {
|
|
27
|
+
@apply gap-[0.40rem];
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
&.textarea--lg {
|
|
31
|
+
@apply gap-4;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/* Focus state */
|
|
35
|
+
&:focus-within,
|
|
36
|
+
&[data-focused="true"] {
|
|
37
|
+
@apply status-focused-field;
|
|
38
|
+
border-color: var(--color-field-border-focus);
|
|
39
|
+
background-color: var(--color-field-focus);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/* Focus visible state */
|
|
43
|
+
&:has(> textarea:focus-visible):not(:focus-within),
|
|
44
|
+
&[data-focus-visible="true"] {
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/* Invalid state */
|
|
48
|
+
&:has(> textarea:invalid),
|
|
49
|
+
&[data-invalid="true"] {
|
|
50
|
+
@apply status-invalid-field;
|
|
51
|
+
background-color: var(--color-field-focus);
|
|
52
|
+
border-color: var(--color-field-border-invalid);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/* Disabled state */
|
|
56
|
+
&:has(> textarea:disabled),
|
|
57
|
+
&[data-disabled="true"] {
|
|
58
|
+
@apply status-disabled;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
/* Readonly state */
|
|
62
|
+
&:has(> textarea:read-only),
|
|
63
|
+
&[data-readonly="true"] {
|
|
64
|
+
background-color: var(--color-default-100);
|
|
65
|
+
cursor: default;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
/* ─── Variant modifiers ─────────────────────────────────────────────────────── */
|
|
70
|
+
|
|
71
|
+
.textarea--flat {
|
|
72
|
+
/* Transparent background across all states, no border, no shadow */
|
|
73
|
+
@apply shadow-none bg-transparent;
|
|
74
|
+
border-color: transparent;
|
|
75
|
+
|
|
76
|
+
@media (hover: hover) {
|
|
77
|
+
&:has(> textarea:hover):not(:focus-within),
|
|
78
|
+
&[data-hovered="true"]:not([data-focused="true"]):not([data-focus-visible="true"]) {
|
|
79
|
+
@apply bg-transparent;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
&:focus-within,
|
|
84
|
+
&[data-focused="true"] {
|
|
85
|
+
@apply bg-transparent;
|
|
86
|
+
border-color: var(--color-field-border-focus);
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.textarea--bordered {
|
|
91
|
+
/* Transparent background + light border */
|
|
92
|
+
@apply shadow-none;
|
|
93
|
+
background-color: transparent;
|
|
94
|
+
border-width: var(--border-width);
|
|
95
|
+
border-color: var(--border);
|
|
96
|
+
|
|
97
|
+
@media (hover: hover) {
|
|
98
|
+
&:has(> textarea:hover):not(:focus-within),
|
|
99
|
+
&[data-hovered="true"]:not([data-focused="true"]):not([data-focus-visible="true"]) {
|
|
100
|
+
background-color: transparent;
|
|
101
|
+
border-color: color-mix(in oklab, var(--border) 80%, var(--foreground) 20%);
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
&:focus-within,
|
|
106
|
+
&[data-focused="true"] {
|
|
107
|
+
background-color: transparent;
|
|
108
|
+
border-color: var(--color-field-border-focus);
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
.textarea--faded {
|
|
113
|
+
/* Muted background + visible border */
|
|
114
|
+
@apply shadow-none;
|
|
115
|
+
background-color: var(--color-background-tertiary);
|
|
116
|
+
border-color: var(--color-border);
|
|
117
|
+
|
|
118
|
+
&:focus-within,
|
|
119
|
+
&[data-focused="true"] {
|
|
120
|
+
background-color: var(--color-background-tertiary);
|
|
121
|
+
border-color: var(--color-field-border-focus);
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
.textarea--underlined {
|
|
126
|
+
/* Bottom border only — always-visible underline */
|
|
127
|
+
@apply rounded-none shadow-none bg-transparent !px-0;
|
|
128
|
+
border-top: none;
|
|
129
|
+
border-left: none;
|
|
130
|
+
border-right: none;
|
|
131
|
+
border-bottom-width: var(--border-width);
|
|
132
|
+
border-bottom-color: var(--border);
|
|
133
|
+
|
|
134
|
+
@media (hover: hover) {
|
|
135
|
+
&:has(> textarea:hover):not(:focus-within),
|
|
136
|
+
&[data-hovered="true"]:not([data-focused="true"]):not([data-focus-visible="true"]) {
|
|
137
|
+
background-color: transparent;
|
|
138
|
+
border-bottom-color: color-mix(in oklab, var(--border) 80%, var(--foreground) 20%);
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
&:focus-within,
|
|
143
|
+
&[data-focused="true"] {
|
|
144
|
+
@apply bg-transparent;
|
|
145
|
+
border-bottom-color: var(--color-field-border-focus);
|
|
146
|
+
--tw-ring-color: var(--focus);
|
|
147
|
+
box-shadow: 0 1.2px 0 0 var(--tw-ring-color, var(--color-field-border-focus));
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
.textarea--raised {
|
|
152
|
+
/* Elevated look: white bg + shadow, transparent border */
|
|
153
|
+
@apply shadow-md;
|
|
154
|
+
background-color: var(--snow);
|
|
155
|
+
border-color: transparent;
|
|
156
|
+
|
|
157
|
+
@media (hover: hover) {
|
|
158
|
+
&:has(> textarea:hover):not(:focus-within),
|
|
159
|
+
&[data-hovered="true"]:not([data-focused="true"]):not([data-focus-visible="true"]) {
|
|
160
|
+
@apply shadow-lg;
|
|
161
|
+
background-color: var(--background);
|
|
162
|
+
border-color: transparent;
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
&:focus-within,
|
|
167
|
+
&[data-focused="true"] {
|
|
168
|
+
@apply shadow-lg;
|
|
169
|
+
background-color: var(--snow);
|
|
170
|
+
border-color: var(--color-field-border-focus);
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
/* ─── Size modifiers ─────────────────────────────────────────────────────────── */
|
|
175
|
+
|
|
176
|
+
.textarea--sm {
|
|
177
|
+
@apply text-xs px-2 py-1;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
.textarea--md {
|
|
181
|
+
/* No styles — md is the default size defined on .textarea base */
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
.textarea--lg {
|
|
185
|
+
@apply text-base px-4 py-2.5;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
/* ─── Color modifiers ────────────────────────────────────────────────────────── */
|
|
189
|
+
|
|
190
|
+
.textarea--default {
|
|
191
|
+
--textarea-accent: var(--color-default-foreground);
|
|
192
|
+
accent-color: var(--textarea-accent);
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
.textarea--primary {
|
|
196
|
+
--textarea-accent: var(--color-primary);
|
|
197
|
+
accent-color: var(--textarea-accent);
|
|
198
|
+
|
|
199
|
+
&:focus-within,
|
|
200
|
+
&[data-focused="true"] {
|
|
201
|
+
border-color: var(--color-primary);
|
|
202
|
+
--tw-ring-color: var(--color-secondary);
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
.textarea--secondary {
|
|
207
|
+
--textarea-accent: var(--color-secondary);
|
|
208
|
+
accent-color: var(--textarea-accent);
|
|
209
|
+
|
|
210
|
+
&:focus-within,
|
|
211
|
+
&[data-focused="true"] {
|
|
212
|
+
border-color: var(--color-secondary);
|
|
213
|
+
--tw-ring-color: var(--color-secondary);
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
.textarea--success {
|
|
218
|
+
--textarea-accent: var(--color-success);
|
|
219
|
+
accent-color: var(--textarea-accent);
|
|
220
|
+
|
|
221
|
+
&:focus-within,
|
|
222
|
+
&[data-focused="true"] {
|
|
223
|
+
border-color: var(--color-success);
|
|
224
|
+
--tw-ring-color: var(--color-success);
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
.textarea--warning {
|
|
229
|
+
--textarea-accent: var(--color-warning);
|
|
230
|
+
accent-color: var(--textarea-accent);
|
|
231
|
+
|
|
232
|
+
&:focus-within,
|
|
233
|
+
&[data-focused="true"] {
|
|
234
|
+
border-color: var(--color-warning);
|
|
235
|
+
--tw-ring-color: var(--color-warning);
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
.textarea--danger {
|
|
240
|
+
--textarea-accent: var(--color-danger);
|
|
241
|
+
accent-color: var(--textarea-accent);
|
|
242
|
+
|
|
243
|
+
&:focus-within,
|
|
244
|
+
&[data-focused="true"] {
|
|
245
|
+
border-color: var(--color-danger);
|
|
246
|
+
--tw-ring-color: var(--color-danger);
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
/* ─── Underlined + color variant overrides ─────────────────────────────────── */
|
|
251
|
+
.textarea--underlined.textarea--primary,
|
|
252
|
+
.textarea--underlined.textarea--secondary,
|
|
253
|
+
.textarea--underlined.textarea--success,
|
|
254
|
+
.textarea--underlined.textarea--warning,
|
|
255
|
+
.textarea--underlined.textarea--danger {
|
|
256
|
+
border-top: none;
|
|
257
|
+
border-left: none;
|
|
258
|
+
border-right: none;
|
|
259
|
+
border-bottom-width: var(--border-width);
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
/* ─── State modifiers ────────────────────────────────────────────────────────── */
|
|
263
|
+
|
|
264
|
+
.textarea--invalid {
|
|
265
|
+
border-color: var(--color-danger) !important;
|
|
266
|
+
@apply status-invalid-field;
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
.textarea--disabled {
|
|
270
|
+
@apply status-disabled opacity-60 cursor-not-allowed;
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
.textarea--readonly {
|
|
274
|
+
background-color: var(--color-default-100);
|
|
275
|
+
cursor: default;
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
/* ─── Layout modifiers ───────────────────────────────────────────────────────── */
|
|
279
|
+
|
|
280
|
+
.textarea--full-width {
|
|
281
|
+
@apply w-full;
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
/* ─── Slots ──────────────────────────────────────────────────────────────────── */
|
|
285
|
+
|
|
286
|
+
.textarea__input {
|
|
287
|
+
@apply flex-1 bg-transparent outline-none border-0 p-0 text-inherit resize-none;
|
|
288
|
+
@apply placeholder:text-field-placeholder;
|
|
289
|
+
min-height: 1.5rem;
|
|
290
|
+
|
|
291
|
+
&:focus,
|
|
292
|
+
&:focus-visible {
|
|
293
|
+
outline: none;
|
|
294
|
+
box-shadow: none;
|
|
295
|
+
}
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
.textarea__start-content,
|
|
299
|
+
.textarea__end-content {
|
|
300
|
+
@apply inline-flex items-center justify-center shrink-0;
|
|
301
|
+
color: var(--color-field-placeholder);
|
|
302
|
+
padding-top: 0.125rem;
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
.textarea__start-content svg,
|
|
306
|
+
.textarea__end-content svg {
|
|
307
|
+
@apply size-4;
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
/* ─── Label slot ─────────────────────────────────────────────────────────────── */
|
|
311
|
+
|
|
312
|
+
.textarea__label {
|
|
313
|
+
@apply text-sm font-medium select-none;
|
|
314
|
+
color: var(--color-field-placeholder);
|
|
315
|
+
pointer-events: none;
|
|
316
|
+
transition:
|
|
317
|
+
transform 300ms var(--ease-smooth),
|
|
318
|
+
color 300ms var(--ease-smooth),
|
|
319
|
+
scale 300ms var(--ease-smooth);
|
|
320
|
+
@apply motion-reduce:transition-none;
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
/* ─── Floating label (inside the textarea) ──────────────────────────────────── */
|
|
324
|
+
|
|
325
|
+
.textarea--label-inside {
|
|
326
|
+
position: relative;
|
|
327
|
+
padding-top: 1.5rem;
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
.textarea--label-inside .textarea__label {
|
|
331
|
+
position: absolute;
|
|
332
|
+
left: 0.75rem;
|
|
333
|
+
top: 0.75rem;
|
|
334
|
+
transform-origin: left top;
|
|
335
|
+
font-size: var(--text-sm);
|
|
336
|
+
color: var(--color-field-placeholder);
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
.textarea--label-inside.textarea--underlined .textarea__label {
|
|
340
|
+
left: 0rem;
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
.textarea--label-inside .textarea__input::placeholder {
|
|
344
|
+
color: transparent;
|
|
345
|
+
}
|
|
346
|
+
|
|
347
|
+
.textarea--label-inside.textarea--default:focus-within .textarea__label,
|
|
348
|
+
.textarea--label-inside.textarea--default[data-focused="true"] .textarea__label {
|
|
349
|
+
color: var(--color-foreground);
|
|
350
|
+
}
|
|
351
|
+
|
|
352
|
+
.textarea--label-inside:focus-within .textarea__input::placeholder,
|
|
353
|
+
.textarea--label-inside[data-focused="true"] .textarea__input::placeholder,
|
|
354
|
+
.textarea--label-inside[data-filled="true"] .textarea__input::placeholder {
|
|
355
|
+
color: var(--color-field-placeholder);
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
/* Up-state: focused OR filled. */
|
|
359
|
+
.textarea--label-inside:focus-within .textarea__label,
|
|
360
|
+
.textarea--label-inside[data-focused="true"] .textarea__label,
|
|
361
|
+
.textarea--label-inside[data-filled="true"] .textarea__label {
|
|
362
|
+
transform: translateY(-20%) scale(0.85);
|
|
363
|
+
}
|
|
364
|
+
|
|
365
|
+
.textarea--label-inside:has(> .textarea__start-content) .textarea__label {
|
|
366
|
+
left: calc(0.75rem + 1rem + 0.5rem);
|
|
367
|
+
}
|
|
368
|
+
.textarea--label-inside.textarea--underlined:has(> .textarea__start-content) .textarea__label {
|
|
369
|
+
left: calc(1rem + 0.5rem);
|
|
370
|
+
}
|
|
371
|
+
|
|
372
|
+
.textarea--label-inside.textarea--sm .textarea__label {
|
|
373
|
+
font-size: var(--text-xs, 0.75rem);
|
|
374
|
+
left: 0.5rem;
|
|
375
|
+
}
|
|
376
|
+
|
|
377
|
+
.textarea--label-inside.textarea--sm:has(> .textarea__start-content) .textarea__label {
|
|
378
|
+
left: calc(0.5rem + 1rem + 0.4rem);
|
|
379
|
+
}
|
|
380
|
+
|
|
381
|
+
.textarea--label-inside.textarea--underlined.textarea--sm:has(> .textarea__start-content) .textarea__label {
|
|
382
|
+
left: calc(1rem + 0.4rem);
|
|
383
|
+
}
|
|
384
|
+
|
|
385
|
+
.textarea--label-inside.textarea--lg .textarea__label {
|
|
386
|
+
font-size: var(--text-base, 1rem);
|
|
387
|
+
left: 1rem;
|
|
388
|
+
}
|
|
389
|
+
.textarea--label-inside.textarea--lg:has(> .textarea__start-content) .textarea__label {
|
|
390
|
+
left: calc(1rem + 1rem + 1rem);
|
|
391
|
+
}
|
|
392
|
+
|
|
393
|
+
.textarea--label-inside.textarea--underlined.textarea--lg:has(> .textarea__start-content) .textarea__label {
|
|
394
|
+
left: calc(1rem + 1rem);
|
|
395
|
+
}
|
|
396
|
+
|
|
397
|
+
/* Invalid state — label color flips to danger */
|
|
398
|
+
.textarea--label-inside:has(> textarea:invalid) .textarea__label,
|
|
399
|
+
.textarea--label-inside[data-invalid="true"] .textarea__label {
|
|
400
|
+
color: var(--color-danger);
|
|
401
|
+
}
|
|
402
|
+
|
|
403
|
+
/* ─── Root wrapper (holds label + field + helper) ───────────────────────── */
|
|
404
|
+
|
|
405
|
+
.textarea-root {
|
|
406
|
+
display: flex;
|
|
407
|
+
flex-direction: column;
|
|
408
|
+
gap: 0.375rem;
|
|
409
|
+
}
|
|
410
|
+
|
|
411
|
+
.textarea-root--full-width {
|
|
412
|
+
@apply w-full;
|
|
413
|
+
}
|
|
414
|
+
|
|
415
|
+
.textarea-root--label-outside-left {
|
|
416
|
+
flex-direction: row;
|
|
417
|
+
align-items: flex-start;
|
|
418
|
+
gap: 0.75rem;
|
|
419
|
+
}
|
|
420
|
+
|
|
421
|
+
.textarea__main-wrapper {
|
|
422
|
+
display: flex;
|
|
423
|
+
flex-direction: column;
|
|
424
|
+
gap: 0.25rem;
|
|
425
|
+
flex: 1;
|
|
426
|
+
min-width: 0;
|
|
427
|
+
}
|
|
428
|
+
|
|
429
|
+
/* ─── Outside label ──────────────────────────────────────────────────────── */
|
|
430
|
+
|
|
431
|
+
.textarea-root--label-outside > .textarea__label,
|
|
432
|
+
.textarea-root--label-outside-left > .textarea__label {
|
|
433
|
+
position: static;
|
|
434
|
+
transform: none;
|
|
435
|
+
display: block;
|
|
436
|
+
pointer-events: auto;
|
|
437
|
+
font-size: var(--text-sm);
|
|
438
|
+
font-weight: 500;
|
|
439
|
+
color: var(--color-foreground);
|
|
440
|
+
}
|
|
441
|
+
|
|
442
|
+
.textarea-root--label-outside-left > .textarea__label {
|
|
443
|
+
padding-top: 0.5rem;
|
|
444
|
+
min-width: 5rem;
|
|
445
|
+
flex-shrink: 0;
|
|
446
|
+
}
|
|
447
|
+
|
|
448
|
+
.textarea-root--label-outside[data-invalid="true"] > .textarea__label,
|
|
449
|
+
.textarea-root--label-outside-left[data-invalid="true"] > .textarea__label {
|
|
450
|
+
color: var(--color-danger);
|
|
451
|
+
}
|
|
452
|
+
|
|
453
|
+
/* ─── Helper text (description / error message) ─────────────────────────── */
|
|
454
|
+
|
|
455
|
+
.textarea__helper-wrapper {
|
|
456
|
+
display: flex;
|
|
457
|
+
flex-direction: column;
|
|
458
|
+
gap: 0.125rem;
|
|
459
|
+
padding: 0 0.25rem;
|
|
460
|
+
}
|
|
461
|
+
|
|
462
|
+
.textarea__description {
|
|
463
|
+
@apply text-xs;
|
|
464
|
+
color: color-mix(in oklab, var(--color-foreground) 60%, transparent);
|
|
465
|
+
}
|
|
466
|
+
|
|
467
|
+
.textarea__error-message {
|
|
468
|
+
@apply text-xs;
|
|
469
|
+
color: var(--color-danger);
|
|
470
|
+
}
|
|
471
|
+
|
|
472
|
+
/* ─── Clear button ─────────────────────────────────────────────────────── */
|
|
473
|
+
|
|
474
|
+
.textarea__clear-button {
|
|
475
|
+
@apply inline-flex items-center justify-center shrink-0;
|
|
476
|
+
@apply bg-transparent border-0 p-0 cursor-pointer outline-none;
|
|
477
|
+
color: var(--color-field-placeholder);
|
|
478
|
+
transition:
|
|
479
|
+
color 300ms var(--ease-smooth),
|
|
480
|
+
opacity 300ms var(--ease-smooth);
|
|
481
|
+
@apply motion-reduce:transition-none;
|
|
482
|
+
}
|
|
483
|
+
|
|
484
|
+
.textarea__clear-button svg {
|
|
485
|
+
@apply size-4;
|
|
486
|
+
}
|
|
487
|
+
|
|
488
|
+
.textarea--sm .textarea__clear-button svg {
|
|
489
|
+
width: 0.875rem;
|
|
490
|
+
height: 0.875rem;
|
|
491
|
+
}
|
|
492
|
+
|
|
493
|
+
.textarea--lg .textarea__clear-button svg {
|
|
494
|
+
@apply size-5;
|
|
495
|
+
}
|
|
496
|
+
|
|
497
|
+
@media (hover: hover) {
|
|
498
|
+
.textarea__clear-button:hover,
|
|
499
|
+
.textarea__clear-button[data-hovered="true"] {
|
|
500
|
+
color: var(--color-foreground);
|
|
501
|
+
}
|
|
502
|
+
}
|
|
503
|
+
|
|
504
|
+
.textarea__clear-button:focus-visible,
|
|
505
|
+
.textarea__clear-button[data-focus-visible="true"] {
|
|
506
|
+
color: var(--color-foreground);
|
|
507
|
+
border-radius: 4px;
|
|
508
|
+
box-shadow: 0 0 0 2px var(--color-focus, var(--color-field-border-focus));
|
|
509
|
+
}
|
|
510
|
+
|
|
511
|
+
.textarea__clear-button:disabled,
|
|
512
|
+
.textarea__clear-button[data-disabled="true"] {
|
|
513
|
+
@apply cursor-not-allowed opacity-50;
|
|
514
|
+
}
|
|
515
|
+
|
|
516
|
+
/* Color up-state — floated label picks up the focus accent per color variant */
|
|
517
|
+
.textarea--label-inside.textarea--primary:focus-within .textarea__label,
|
|
518
|
+
.textarea--label-inside.textarea--primary[data-focused="true"] .textarea__label {
|
|
519
|
+
color: var(--color-primary);
|
|
520
|
+
}
|
|
521
|
+
.textarea--label-inside.textarea--secondary:focus-within .textarea__label,
|
|
522
|
+
.textarea--label-inside.textarea--secondary[data-focused="true"] .textarea__label {
|
|
523
|
+
color: var(--color-secondary);
|
|
524
|
+
}
|
|
525
|
+
.textarea--label-inside.textarea--success:focus-within .textarea__label,
|
|
526
|
+
.textarea--label-inside.textarea--success[data-focused="true"] .textarea__label {
|
|
527
|
+
color: var(--color-success);
|
|
528
|
+
}
|
|
529
|
+
.textarea--label-inside.textarea--warning:focus-within .textarea__label,
|
|
530
|
+
.textarea--label-inside.textarea--warning[data-focused="true"] .textarea__label {
|
|
531
|
+
color: var(--color-warning);
|
|
532
|
+
}
|
|
533
|
+
.textarea--label-inside.textarea--danger:focus-within .textarea__label,
|
|
534
|
+
.textarea--label-inside.textarea--danger[data-focused="true"] .textarea__label {
|
|
535
|
+
color: var(--color-danger);
|
|
536
|
+
}
|