@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,81 @@
|
|
|
1
|
+
/* ==========================================================================
|
|
2
|
+
ColorArea - 2D color picker for selecting colors from a gradient area
|
|
3
|
+
========================================================================== */
|
|
4
|
+
|
|
5
|
+
/* Base styles */
|
|
6
|
+
.color-area {
|
|
7
|
+
@apply relative w-full max-w-56 shrink-0 rounded-2xl no-highlight;
|
|
8
|
+
|
|
9
|
+
/* Square aspect ratio */
|
|
10
|
+
aspect-ratio: 1 / 1;
|
|
11
|
+
|
|
12
|
+
/* Color gradient background from React Aria */
|
|
13
|
+
background: var(--color-area-background);
|
|
14
|
+
|
|
15
|
+
/* Inner shadow for depth */
|
|
16
|
+
box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.1);
|
|
17
|
+
|
|
18
|
+
/* Disabled state */
|
|
19
|
+
&[data-disabled] {
|
|
20
|
+
@apply status-disabled;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/* ==========================================================================
|
|
25
|
+
Dots overlay variant
|
|
26
|
+
========================================================================== */
|
|
27
|
+
|
|
28
|
+
.color-area--show-dots {
|
|
29
|
+
/* Dot pattern overlay using radial gradient */
|
|
30
|
+
&::after {
|
|
31
|
+
content: "";
|
|
32
|
+
@apply pointer-events-none absolute inset-0 rounded-[inherit];
|
|
33
|
+
|
|
34
|
+
background-image: radial-gradient(circle, rgba(255, 255, 255, 0.2) 1px, transparent 1px);
|
|
35
|
+
background-size: 8px 8px;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/* ==========================================================================
|
|
40
|
+
Thumb element
|
|
41
|
+
========================================================================== */
|
|
42
|
+
|
|
43
|
+
.color-area__thumb {
|
|
44
|
+
@apply size-4 rounded-full will-change-[width,height];
|
|
45
|
+
|
|
46
|
+
/* Current color from React Aria */
|
|
47
|
+
background-color: var(--color-area-thumb-color);
|
|
48
|
+
|
|
49
|
+
/* White border for visibility */
|
|
50
|
+
border: 3px solid white;
|
|
51
|
+
|
|
52
|
+
/* Inner shadow for depth */
|
|
53
|
+
box-shadow:
|
|
54
|
+
0 0 0 1px rgba(0, 0, 0, 0.1),
|
|
55
|
+
inset 0 0 0 1px rgba(0, 0, 0, 0.1);
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* Transitions
|
|
59
|
+
* CRITICAL: motion-reduce must be AFTER transition for correct override specificity
|
|
60
|
+
*/
|
|
61
|
+
transition:
|
|
62
|
+
width 300ms var(--ease-out),
|
|
63
|
+
height 300ms var(--ease-out);
|
|
64
|
+
@apply motion-reduce:transition-none;
|
|
65
|
+
|
|
66
|
+
/* Focus state */
|
|
67
|
+
&:focus-visible,
|
|
68
|
+
&[data-focus-visible="true"] {
|
|
69
|
+
@apply status-focused;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
/* Dragging state */
|
|
73
|
+
&[data-dragging="true"] {
|
|
74
|
+
@apply size-5;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
/* Disabled state */
|
|
78
|
+
&[data-disabled] {
|
|
79
|
+
@apply status-disabled;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
/* ==========================================================================
|
|
2
|
+
ColorField - Form field for editing hex colors or individual color channels
|
|
3
|
+
========================================================================== */
|
|
4
|
+
|
|
5
|
+
/* Base styles */
|
|
6
|
+
.color-field {
|
|
7
|
+
@apply flex flex-col gap-1;
|
|
8
|
+
|
|
9
|
+
&[aria-invalid="true"] {
|
|
10
|
+
[data-slot="description"] {
|
|
11
|
+
@apply hidden;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
[data-slot="label"] {
|
|
16
|
+
@apply w-fit;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
[data-slot="description"] {
|
|
20
|
+
@apply px-1;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/* Full width modifier */
|
|
25
|
+
.color-field--full-width {
|
|
26
|
+
@apply w-full;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
/* ==========================================================================
|
|
30
|
+
Label
|
|
31
|
+
========================================================================== */
|
|
32
|
+
|
|
33
|
+
.color-field__label {
|
|
34
|
+
@apply w-fit text-sm font-medium text-foreground;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/* ==========================================================================
|
|
38
|
+
Input
|
|
39
|
+
========================================================================== */
|
|
40
|
+
|
|
41
|
+
.color-field__input {
|
|
42
|
+
@apply rounded-field border bg-field px-3 py-2 text-sm text-field-foreground shadow-field outline-none sm:text-xs;
|
|
43
|
+
|
|
44
|
+
height: 2.25rem;
|
|
45
|
+
border-width: var(--border-width-field);
|
|
46
|
+
border-color: var(--color-field-border);
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Transitions
|
|
50
|
+
* CRITICAL: motion-reduce must be AFTER transition for correct override specificity
|
|
51
|
+
*/
|
|
52
|
+
transition:
|
|
53
|
+
background-color 300ms var(--ease-smooth),
|
|
54
|
+
border-color 300ms var(--ease-smooth),
|
|
55
|
+
box-shadow 300ms var(--ease-out);
|
|
56
|
+
@apply motion-reduce:transition-none;
|
|
57
|
+
|
|
58
|
+
&::placeholder {
|
|
59
|
+
@apply text-field-placeholder;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
/* Focus state */
|
|
63
|
+
&:focus-visible,
|
|
64
|
+
&[data-focus-visible="true"] {
|
|
65
|
+
@apply status-focused;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
/* Disabled state */
|
|
69
|
+
&:disabled,
|
|
70
|
+
&[data-disabled],
|
|
71
|
+
&[aria-disabled="true"] {
|
|
72
|
+
@apply status-disabled;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
/* Readonly state */
|
|
76
|
+
&[readonly],
|
|
77
|
+
&[data-readonly] {
|
|
78
|
+
@apply cursor-default;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
/* Invalid state */
|
|
82
|
+
&[aria-invalid="true"],
|
|
83
|
+
&[data-invalid] {
|
|
84
|
+
border-color: var(--color-danger);
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
/* ==========================================================================
|
|
89
|
+
Description / error message
|
|
90
|
+
========================================================================== */
|
|
91
|
+
|
|
92
|
+
.color-field__description {
|
|
93
|
+
@apply px-1 text-xs text-muted;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
.color-field__error-message {
|
|
97
|
+
@apply px-1 text-xs;
|
|
98
|
+
color: var(--color-danger);
|
|
99
|
+
}
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
/* ==========================================================================
|
|
2
|
+
ColorInputGroup - Input group for color field with prefix/suffix support
|
|
3
|
+
========================================================================== */
|
|
4
|
+
|
|
5
|
+
/* Wrapper (label + field + description/error) */
|
|
6
|
+
.color-input-group__wrapper {
|
|
7
|
+
@apply flex flex-col gap-1;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.color-input-group__label {
|
|
11
|
+
@apply w-fit text-sm font-medium text-foreground;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.color-input-group__description {
|
|
15
|
+
@apply px-1 text-xs text-muted;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.color-input-group__error-message {
|
|
19
|
+
@apply px-1 text-xs;
|
|
20
|
+
color: var(--color-danger);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
/* Base styles */
|
|
24
|
+
.color-input-group {
|
|
25
|
+
@apply inline-flex h-9 items-center overflow-hidden rounded-field border bg-field text-sm text-field-foreground shadow-field outline-none;
|
|
26
|
+
border-width: var(--border-width-field);
|
|
27
|
+
border-color: var(--color-field-border);
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Transitions
|
|
31
|
+
* CRITICAL: motion-reduce must be AFTER transition for correct override specificity
|
|
32
|
+
*/
|
|
33
|
+
transition:
|
|
34
|
+
background-color 300ms var(--ease-smooth),
|
|
35
|
+
border-color 300ms var(--ease-smooth),
|
|
36
|
+
box-shadow 300ms var(--ease-out);
|
|
37
|
+
@apply motion-reduce:transition-none;
|
|
38
|
+
|
|
39
|
+
/* Hover state */
|
|
40
|
+
@media (hover: hover) {
|
|
41
|
+
&:hover:not(:focus-within),
|
|
42
|
+
&:hover:not([data-focus-within="true"]) {
|
|
43
|
+
@apply bg-field-hover;
|
|
44
|
+
border-color: var(--color-field-border-hover);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/* Focus within state */
|
|
49
|
+
&[data-focus-within="true"],
|
|
50
|
+
&:focus-within {
|
|
51
|
+
@apply status-focused-field;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
/* Invalid state */
|
|
55
|
+
&[aria-invalid="true"] {
|
|
56
|
+
@apply status-invalid-field;
|
|
57
|
+
background-color: var(--color-field-focus);
|
|
58
|
+
border-color: var(--color-field-border-invalid);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
/* Disabled state */
|
|
62
|
+
&[data-disabled],
|
|
63
|
+
&[aria-disabled="true"] {
|
|
64
|
+
@apply status-disabled;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
/* ==========================================================================
|
|
69
|
+
Elements
|
|
70
|
+
========================================================================== */
|
|
71
|
+
|
|
72
|
+
.color-input-group__input {
|
|
73
|
+
@apply flex h-full flex-1 cursor-text items-center rounded-none border-0 bg-transparent px-3 py-2 text-sm shadow-none outline-none sm:text-sm;
|
|
74
|
+
|
|
75
|
+
/* Placeholder styling */
|
|
76
|
+
&::placeholder {
|
|
77
|
+
@apply text-field-placeholder;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
/* Remove border radius on left side when prefix is present */
|
|
81
|
+
.color-input-group:has([data-slot="color-input-group-prefix"]) & {
|
|
82
|
+
@apply rounded-l-none pl-2;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
/* Remove border radius on right side when suffix is present */
|
|
86
|
+
.color-input-group:has([data-slot="color-input-group-suffix"]) & {
|
|
87
|
+
@apply rounded-r-none pr-2;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
/* Focus state - handled by group */
|
|
91
|
+
&:focus,
|
|
92
|
+
&:focus-visible {
|
|
93
|
+
@apply outline-none;
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
.color-input-group__prefix {
|
|
98
|
+
@apply shrink-0 text-field-placeholder;
|
|
99
|
+
@apply mr-0 ml-3 flex items-center;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
.color-input-group__suffix {
|
|
103
|
+
@apply shrink-0 text-field-placeholder;
|
|
104
|
+
@apply mr-3 flex items-center;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
/* ==========================================================================
|
|
108
|
+
Variant modifiers
|
|
109
|
+
========================================================================== */
|
|
110
|
+
|
|
111
|
+
.color-input-group--primary {
|
|
112
|
+
/* Default styles - primary variant uses the base field styling */
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
.color-input-group--secondary {
|
|
116
|
+
@apply shadow-none;
|
|
117
|
+
background-color: var(--color-input-group-bg);
|
|
118
|
+
|
|
119
|
+
--color-input-group-bg: var(--color-default);
|
|
120
|
+
--color-input-group-bg-hover: var(--color-default-hover);
|
|
121
|
+
--color-input-group-bg-focus: var(--color-default);
|
|
122
|
+
|
|
123
|
+
@media (hover: hover) {
|
|
124
|
+
&:hover:not(:focus-within),
|
|
125
|
+
&:hover:not([data-focus-within="true"]) {
|
|
126
|
+
background-color: var(--color-input-group-bg-hover);
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
&:focus-within,
|
|
131
|
+
&[data-focus-within="true"] {
|
|
132
|
+
background-color: var(--color-input-group-bg-focus);
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
/* Invalid state */
|
|
136
|
+
&[aria-invalid="true"] {
|
|
137
|
+
@apply status-invalid-field;
|
|
138
|
+
border-color: var(--color-field-border-invalid);
|
|
139
|
+
background-color: var(--color-input-group-bg-focus);
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
[data-slot="color-input-group-input"] {
|
|
143
|
+
@apply bg-transparent;
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
/* ==========================================================================
|
|
148
|
+
Full width modifier
|
|
149
|
+
========================================================================== */
|
|
150
|
+
|
|
151
|
+
.color-input-group--full-width {
|
|
152
|
+
@apply w-full;
|
|
153
|
+
}
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
/* ==========================================================================
|
|
2
|
+
ColorPicker - Color selection component with popover
|
|
3
|
+
========================================================================== */
|
|
4
|
+
|
|
5
|
+
/* Base color-picker styles
|
|
6
|
+
Vertical panel layout: preview swatch → 2D area → sliders → hex field.
|
|
7
|
+
Sized to match the ColorArea's max width (14rem / 224px). */
|
|
8
|
+
.color-picker {
|
|
9
|
+
@apply inline-flex flex-col gap-3 rounded-2xl border bg-overlay p-3;
|
|
10
|
+
|
|
11
|
+
width: max-content;
|
|
12
|
+
border-color: var(--border);
|
|
13
|
+
box-shadow: var(--shadow-overlay);
|
|
14
|
+
|
|
15
|
+
/* Preview swatch at the top, inline with an optional label/summary */
|
|
16
|
+
> .color-swatch {
|
|
17
|
+
@apply size-8 rounded-full;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
/* Ensure child components flex to the panel width */
|
|
21
|
+
> .color-slider,
|
|
22
|
+
> .color-field {
|
|
23
|
+
@apply w-full;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/* ==========================================================================
|
|
28
|
+
Trigger
|
|
29
|
+
========================================================================== */
|
|
30
|
+
|
|
31
|
+
.color-picker__trigger {
|
|
32
|
+
@apply inline-flex items-center gap-3 rounded-sm text-sm no-highlight;
|
|
33
|
+
|
|
34
|
+
/* Cursor */
|
|
35
|
+
cursor: var(--cursor-interactive);
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* Transitions
|
|
39
|
+
* CRITICAL: motion-reduce must be AFTER transition for correct override specificity
|
|
40
|
+
*/
|
|
41
|
+
transition:
|
|
42
|
+
background-color 300ms var(--ease-smooth),
|
|
43
|
+
box-shadow 300ms var(--ease-out);
|
|
44
|
+
@apply motion-reduce:transition-none;
|
|
45
|
+
|
|
46
|
+
[data-slot="label"] {
|
|
47
|
+
cursor: var(--cursor-interactive);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/* Focus visible state */
|
|
51
|
+
&:focus-visible:not(:focus),
|
|
52
|
+
&[data-focus-visible="true"] {
|
|
53
|
+
@apply status-focused;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
/* Disabled state */
|
|
57
|
+
&:disabled,
|
|
58
|
+
&[data-disabled],
|
|
59
|
+
&[aria-disabled="true"] {
|
|
60
|
+
@apply status-disabled;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
/* ==========================================================================
|
|
65
|
+
Popover
|
|
66
|
+
========================================================================== */
|
|
67
|
+
|
|
68
|
+
.color-picker__popover {
|
|
69
|
+
@apply min-w-62 origin-(--trigger-anchor-point) overflow-x-hidden overflow-y-auto overscroll-contain bg-overlay px-2 pt-2 pb-3;
|
|
70
|
+
box-shadow: var(--shadow-overlay);
|
|
71
|
+
border-radius: calc(var(--radius) * 2.5);
|
|
72
|
+
/* Content layout */
|
|
73
|
+
@apply flex flex-col gap-3;
|
|
74
|
+
|
|
75
|
+
/* Hide scrollbar */
|
|
76
|
+
&::-webkit-scrollbar {
|
|
77
|
+
display: none;
|
|
78
|
+
}
|
|
79
|
+
/* For IE and Edge */
|
|
80
|
+
-ms-overflow-style: none;
|
|
81
|
+
/* For Firefox */
|
|
82
|
+
scrollbar-width: none;
|
|
83
|
+
|
|
84
|
+
/* Focus state */
|
|
85
|
+
&:focus-visible:not(:focus),
|
|
86
|
+
&[data-focus-visible="true"] {
|
|
87
|
+
@apply outline-none;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
/* Entering animations */
|
|
91
|
+
& {
|
|
92
|
+
@apply animate-in duration-300 ease-smooth fade-in-0 zoom-in-95;
|
|
93
|
+
|
|
94
|
+
/* Placement-specific translations */
|
|
95
|
+
&[data-placement^="top"] {
|
|
96
|
+
@apply slide-in-from-bottom-1;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
&[data-placement^="bottom"] {
|
|
100
|
+
@apply slide-in-from-top-1;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
&[data-placement^="left"] {
|
|
104
|
+
@apply slide-in-from-right-1;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
&[data-placement^="right"] {
|
|
108
|
+
@apply slide-in-from-left-1;
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
/* Exiting animations */
|
|
113
|
+
& {
|
|
114
|
+
@apply animate-out duration-300 ease-smooth zoom-out-95 fade-out;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
&,
|
|
118
|
+
& {
|
|
119
|
+
@apply will-change-[opacity,transform];
|
|
120
|
+
}
|
|
121
|
+
}
|
|
@@ -0,0 +1,266 @@
|
|
|
1
|
+
/* ==========================================================================
|
|
2
|
+
ColorSlider - A slider for adjusting individual color channel values
|
|
3
|
+
========================================================================== */
|
|
4
|
+
|
|
5
|
+
/* Base styles */
|
|
6
|
+
.color-slider {
|
|
7
|
+
@apply grid w-full gap-1;
|
|
8
|
+
|
|
9
|
+
grid-template-areas:
|
|
10
|
+
"label output"
|
|
11
|
+
"track track";
|
|
12
|
+
grid-template-columns: 1fr auto;
|
|
13
|
+
grid-template-rows: auto auto;
|
|
14
|
+
|
|
15
|
+
/* When neither label nor output exist, collapse to single row */
|
|
16
|
+
&:not(:has([data-slot="label"])):not(:has(.color-slider__output)) {
|
|
17
|
+
grid-template-areas: "track";
|
|
18
|
+
grid-template-columns: 1fr;
|
|
19
|
+
grid-template-rows: auto;
|
|
20
|
+
gap: 0;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
/* When only label exists (no output) */
|
|
24
|
+
&:has([data-slot="label"]):not(:has(.color-slider__output)) {
|
|
25
|
+
grid-template-areas:
|
|
26
|
+
"label"
|
|
27
|
+
"track";
|
|
28
|
+
grid-template-columns: 1fr;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/* When only output exists (no label) */
|
|
32
|
+
&:not(:has([data-slot="label"])):has(.color-slider__output) {
|
|
33
|
+
grid-template-areas:
|
|
34
|
+
"output"
|
|
35
|
+
"track";
|
|
36
|
+
grid-template-columns: 1fr;
|
|
37
|
+
|
|
38
|
+
.color-slider__output {
|
|
39
|
+
justify-self: end;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
[data-slot="label"] {
|
|
44
|
+
@apply w-fit text-sm font-medium;
|
|
45
|
+
|
|
46
|
+
grid-area: label;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.color-slider__output {
|
|
50
|
+
@apply text-sm font-medium tabular-nums;
|
|
51
|
+
|
|
52
|
+
grid-area: output;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.color-slider__track {
|
|
56
|
+
@apply relative rounded-full;
|
|
57
|
+
|
|
58
|
+
grid-area: track;
|
|
59
|
+
/* Edge cap pseudo-elements */
|
|
60
|
+
&::before,
|
|
61
|
+
&::after {
|
|
62
|
+
content: "";
|
|
63
|
+
position: absolute;
|
|
64
|
+
z-index: 0;
|
|
65
|
+
pointer-events: none;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.color-slider__thumb {
|
|
70
|
+
/* Flex container for centering */
|
|
71
|
+
@apply absolute flex cursor-grab items-center justify-center rounded-full no-highlight;
|
|
72
|
+
|
|
73
|
+
/* Border to create white ring around the thumb */
|
|
74
|
+
@apply border-3 border-white shadow-overlay;
|
|
75
|
+
|
|
76
|
+
/* Ensure thumb is above edge caps */
|
|
77
|
+
z-index: 1;
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* Transitions
|
|
81
|
+
* CRITICAL: motion-reduce must be AFTER transition for correct override specificity
|
|
82
|
+
*/
|
|
83
|
+
transition:
|
|
84
|
+
transform 300ms var(--ease-out),
|
|
85
|
+
box-shadow 300ms var(--ease-out);
|
|
86
|
+
@apply motion-reduce:transition-none;
|
|
87
|
+
|
|
88
|
+
/* Dragging state - cursor changes and thumb scales down */
|
|
89
|
+
&[data-dragging="true"] {
|
|
90
|
+
@apply cursor-grabbing;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
/* Focus state - show focus ring */
|
|
94
|
+
&:focus-visible,
|
|
95
|
+
&[data-focus-visible="true"] {
|
|
96
|
+
@apply z-10 status-focused;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
/* Disabled state */
|
|
100
|
+
&[data-disabled] {
|
|
101
|
+
@apply cursor-default bg-default;
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
/* Disabled state */
|
|
106
|
+
&:disabled,
|
|
107
|
+
&[data-disabled],
|
|
108
|
+
&[aria-disabled="true"] {
|
|
109
|
+
@apply status-disabled;
|
|
110
|
+
|
|
111
|
+
[data-slot="label"] {
|
|
112
|
+
@apply opacity-100;
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
/* Horizontal orientation */
|
|
117
|
+
&[data-orientation="horizontal"] {
|
|
118
|
+
flex-direction: column;
|
|
119
|
+
|
|
120
|
+
.color-slider__track {
|
|
121
|
+
@apply h-5 justify-self-center rounded-none;
|
|
122
|
+
width: calc(100% - 1.25rem);
|
|
123
|
+
|
|
124
|
+
/* Default border for visibility against similar backgrounds */
|
|
125
|
+
box-shadow:
|
|
126
|
+
inset 0 1px 0 0 rgba(0, 0, 0, 0.1),
|
|
127
|
+
inset 0 -1px 0 0 rgba(0, 0, 0, 0.1);
|
|
128
|
+
|
|
129
|
+
/* Edge caps for horizontal orientation */
|
|
130
|
+
&::before,
|
|
131
|
+
&::after {
|
|
132
|
+
@apply top-0 h-full;
|
|
133
|
+
width: 0.625rem; /* Half thumb width + 2px gap */
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
&::before {
|
|
137
|
+
left: -0.625rem;
|
|
138
|
+
border-top-left-radius: 999px;
|
|
139
|
+
border-bottom-left-radius: 999px;
|
|
140
|
+
box-shadow:
|
|
141
|
+
inset 1px 0 0 0 rgba(0, 0, 0, 0.1),
|
|
142
|
+
inset 0 1px 0 0 rgba(0, 0, 0, 0.1),
|
|
143
|
+
inset 0 -1px 0 0 rgba(0, 0, 0, 0.1);
|
|
144
|
+
background:
|
|
145
|
+
linear-gradient(var(--track-start-color, transparent)),
|
|
146
|
+
repeating-conic-gradient(#efefef 0% 25%, #f7f7f7 0% 50%) 50% / 16px 16px;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
&::after {
|
|
150
|
+
right: -0.625rem;
|
|
151
|
+
border-top-right-radius: 999px;
|
|
152
|
+
border-bottom-right-radius: 999px;
|
|
153
|
+
box-shadow:
|
|
154
|
+
inset -1px 0 0 0 rgba(0, 0, 0, 0.1),
|
|
155
|
+
inset 0 1px 0 0 rgba(0, 0, 0, 0.1),
|
|
156
|
+
inset 0 -1px 0 0 rgba(0, 0, 0, 0.1);
|
|
157
|
+
background-color: var(--track-end-color, transparent);
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
.color-slider__thumb {
|
|
162
|
+
@apply top-1/2 size-4;
|
|
163
|
+
/* Reka sets inline transform: translateX(-50%) for horizontal thumbs,
|
|
164
|
+
which blocks Tailwind's translate-y utility. Use negative margin
|
|
165
|
+
to center the thumb vertically on the track without conflicting. */
|
|
166
|
+
margin-top: -0.5rem;
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
/* Vertical orientation */
|
|
171
|
+
&[data-orientation="vertical"] {
|
|
172
|
+
@apply h-full gap-2;
|
|
173
|
+
|
|
174
|
+
flex-direction: row;
|
|
175
|
+
grid-template-areas:
|
|
176
|
+
"output"
|
|
177
|
+
"track"
|
|
178
|
+
"label";
|
|
179
|
+
grid-template-rows: auto 1fr auto;
|
|
180
|
+
grid-template-columns: 1fr;
|
|
181
|
+
align-items: center;
|
|
182
|
+
justify-items: center;
|
|
183
|
+
|
|
184
|
+
/* When neither label nor output exist in vertical, just show track */
|
|
185
|
+
&:not(:has([data-slot="label"])):not(:has(.color-slider__output)) {
|
|
186
|
+
grid-template-areas: "track";
|
|
187
|
+
grid-template-rows: 1fr;
|
|
188
|
+
gap: 0;
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
/* When only label exists in vertical (no output) */
|
|
192
|
+
&:has([data-slot="label"]):not(:has(.color-slider__output)) {
|
|
193
|
+
grid-template-areas:
|
|
194
|
+
"track"
|
|
195
|
+
"label";
|
|
196
|
+
grid-template-rows: 1fr auto;
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
/* When only output exists in vertical (no label) */
|
|
200
|
+
&:not(:has([data-slot="label"])):has(.color-slider__output) {
|
|
201
|
+
grid-template-areas:
|
|
202
|
+
"output"
|
|
203
|
+
"track";
|
|
204
|
+
grid-template-rows: auto 1fr;
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
.color-slider__output {
|
|
208
|
+
text-align: center;
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
[data-slot="label"] {
|
|
212
|
+
text-align: center;
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
.color-slider__track {
|
|
216
|
+
@apply w-5 justify-self-center rounded-none;
|
|
217
|
+
height: calc(100% - 1.25rem);
|
|
218
|
+
|
|
219
|
+
/* Left and right borders for vertical track */
|
|
220
|
+
box-shadow:
|
|
221
|
+
inset 1px 0 0 0 rgba(0, 0, 0, 0.1),
|
|
222
|
+
inset -1px 0 0 0 rgba(0, 0, 0, 0.1);
|
|
223
|
+
|
|
224
|
+
/* Edge caps for vertical orientation */
|
|
225
|
+
&::before,
|
|
226
|
+
&::after {
|
|
227
|
+
@apply left-0 w-full;
|
|
228
|
+
height: 0.625rem; /* Half thumb height + 2px gap */
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
&::before {
|
|
232
|
+
bottom: -0.625rem;
|
|
233
|
+
border-bottom-left-radius: 999px;
|
|
234
|
+
border-bottom-right-radius: 999px;
|
|
235
|
+
/* Left, right, and bottom borders for bottom cap */
|
|
236
|
+
box-shadow:
|
|
237
|
+
inset 1px 0 0 0 rgba(0, 0, 0, 0.1),
|
|
238
|
+
inset -1px 0 0 0 rgba(0, 0, 0, 0.1),
|
|
239
|
+
inset 0 -1px 0 0 rgba(0, 0, 0, 0.1);
|
|
240
|
+
background:
|
|
241
|
+
linear-gradient(var(--track-start-color, transparent)),
|
|
242
|
+
repeating-conic-gradient(#efefef 0% 25%, #f7f7f7 0% 50%) 50% / 16px 16px;
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
&::after {
|
|
246
|
+
top: -0.625rem;
|
|
247
|
+
border-top-left-radius: 999px;
|
|
248
|
+
border-top-right-radius: 999px;
|
|
249
|
+
/* Left, right, and top borders for top cap */
|
|
250
|
+
box-shadow:
|
|
251
|
+
inset 1px 0 0 0 rgba(0, 0, 0, 0.1),
|
|
252
|
+
inset -1px 0 0 0 rgba(0, 0, 0, 0.1),
|
|
253
|
+
inset 0 1px 0 0 rgba(0, 0, 0, 0.1);
|
|
254
|
+
background-color: var(--track-end-color, transparent);
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
.color-slider__thumb {
|
|
259
|
+
@apply left-1/2 size-4;
|
|
260
|
+
/* Reka sets inline transform: translateY(-50%) for vertical thumbs,
|
|
261
|
+
which blocks Tailwind's translate-x utility. Use negative margin
|
|
262
|
+
to center the thumb horizontally on the track without conflicting. */
|
|
263
|
+
margin-left: -0.5rem;
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
}
|