@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,332 @@
|
|
|
1
|
+
/* =============================================================================
|
|
2
|
+
* Calendar Component Styles
|
|
3
|
+
*
|
|
4
|
+
* A compound component for date selection.
|
|
5
|
+
* Uses BEM naming convention: calendar, calendar__element, calendar--modifier
|
|
6
|
+
* ============================================================================= */
|
|
7
|
+
|
|
8
|
+
/* -----------------------------------------------------------------------------
|
|
9
|
+
* Base Calendar Styles
|
|
10
|
+
* -------------------------------------------------------------------------- */
|
|
11
|
+
.calendar {
|
|
12
|
+
@apply w-64 max-w-full text-xs;
|
|
13
|
+
|
|
14
|
+
container-type: inline-size;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
/* -----------------------------------------------------------------------------
|
|
18
|
+
* Calendar Header
|
|
19
|
+
* -------------------------------------------------------------------------- */
|
|
20
|
+
.calendar__header {
|
|
21
|
+
@apply flex items-center justify-between px-0.5 pb-1;
|
|
22
|
+
|
|
23
|
+
&:has(.calendar-year-picker__trigger[data-state="open"]) {
|
|
24
|
+
.calendar__nav-button {
|
|
25
|
+
@apply pointer-events-none opacity-0;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.calendar__heading {
|
|
31
|
+
@apply flex flex-1 items-center justify-center text-center text-xs font-medium;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.calendar__nav-button {
|
|
35
|
+
@apply flex size-6 items-center justify-center rounded-full text-accent;
|
|
36
|
+
|
|
37
|
+
will-change: scale;
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Transitions
|
|
41
|
+
* CRITICAL: motion-reduce must be AFTER transition for correct override specificity
|
|
42
|
+
*/
|
|
43
|
+
transition:
|
|
44
|
+
transform 300ms var(--ease-out),
|
|
45
|
+
background-color 300ms var(--ease-out),
|
|
46
|
+
box-shadow 300ms var(--ease-out),
|
|
47
|
+
opacity 300ms var(--ease-out);
|
|
48
|
+
@apply transform-gpu motion-reduce:transition-none;
|
|
49
|
+
|
|
50
|
+
cursor: var(--cursor-interactive);
|
|
51
|
+
|
|
52
|
+
/* Hover state – only on devices that support hover (avoids false triggers on touch) */
|
|
53
|
+
@media (hover: hover) {
|
|
54
|
+
&:hover,
|
|
55
|
+
&[data-hovered="true"] {
|
|
56
|
+
@apply bg-default text-accent;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
/* Pressed state */
|
|
61
|
+
&:active,
|
|
62
|
+
&[data-pressed="true"] {
|
|
63
|
+
transform: scale(0.95);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
/* Focus state */
|
|
67
|
+
&:focus-visible,
|
|
68
|
+
&[data-focus-visible="true"] {
|
|
69
|
+
@apply status-focused;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
/* Disabled state */
|
|
73
|
+
&:disabled,
|
|
74
|
+
&[data-disabled] {
|
|
75
|
+
@apply status-disabled;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.calendar__nav-button-icon {
|
|
80
|
+
@apply size-3.5;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
/* -----------------------------------------------------------------------------
|
|
84
|
+
* Calendar Grid
|
|
85
|
+
* -------------------------------------------------------------------------- */
|
|
86
|
+
.calendar__grid {
|
|
87
|
+
/* Override table display with CSS Grid for easier customization */
|
|
88
|
+
display: grid;
|
|
89
|
+
grid-template-columns: repeat(7, 1fr);
|
|
90
|
+
border-collapse: collapse;
|
|
91
|
+
@apply w-full pt-2;
|
|
92
|
+
|
|
93
|
+
&[aria-readonly="true"] {
|
|
94
|
+
.calendar__cell {
|
|
95
|
+
@apply pointer-events-none;
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
.calendar__grid-header {
|
|
101
|
+
/* Grid header (thead) styles */
|
|
102
|
+
display: contents;
|
|
103
|
+
|
|
104
|
+
& > tr {
|
|
105
|
+
display: contents;
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
.calendar__grid-body {
|
|
110
|
+
/* Grid body (tbody) styles */
|
|
111
|
+
display: contents;
|
|
112
|
+
|
|
113
|
+
& > tr {
|
|
114
|
+
display: contents;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
/* Add top spacing between header and first body row */
|
|
118
|
+
& > tr:first-child > td {
|
|
119
|
+
@apply mt-1;
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
.calendar__grid-row {
|
|
124
|
+
/* Use 'contents' so cells participate directly in grid */
|
|
125
|
+
/* Note: This class can be used for custom row styling if needed */
|
|
126
|
+
display: contents;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
.calendar__header-cell {
|
|
130
|
+
/* Header cell (th - weekday names) styles */
|
|
131
|
+
@apply flex items-center justify-center pb-1 text-[10px] font-medium text-muted;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
/* -----------------------------------------------------------------------------
|
|
135
|
+
* Calendar Cells
|
|
136
|
+
* -------------------------------------------------------------------------- */
|
|
137
|
+
.calendar__cell {
|
|
138
|
+
/* Cell (td) wrapper styles - margins now work with grid layout */
|
|
139
|
+
@apply relative flex aspect-square items-center justify-center rounded-full text-center text-xs leading-none font-normal outline-none no-highlight;
|
|
140
|
+
|
|
141
|
+
will-change: scale;
|
|
142
|
+
/**
|
|
143
|
+
* Transitions
|
|
144
|
+
* CRITICAL: motion-reduce must be AFTER transition for correct override specificity
|
|
145
|
+
*/
|
|
146
|
+
transition:
|
|
147
|
+
transform 300ms var(--ease-out),
|
|
148
|
+
box-shadow 300ms var(--ease-out);
|
|
149
|
+
@apply transform-gpu motion-reduce:transition-none;
|
|
150
|
+
|
|
151
|
+
cursor: var(--cursor-interactive);
|
|
152
|
+
|
|
153
|
+
/* Focus state */
|
|
154
|
+
&:focus-visible:not(:focus),
|
|
155
|
+
&[data-focus-visible="true"] {
|
|
156
|
+
@apply status-focused;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
/* Today indicator (data-today lives on the trigger) */
|
|
160
|
+
&:has([data-today]) {
|
|
161
|
+
@apply text-accent;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
/* Selected state (reka-ui: CalendarCell gets aria-selected; CellTrigger gets data-selected) */
|
|
165
|
+
&[aria-selected="true"] {
|
|
166
|
+
@apply bg-accent text-accent-foreground;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
/* Pressed state */
|
|
170
|
+
&:active,
|
|
171
|
+
&[data-pressed="true"] {
|
|
172
|
+
@apply bg-default;
|
|
173
|
+
transform: scale(0.95);
|
|
174
|
+
|
|
175
|
+
&[aria-selected="true"] {
|
|
176
|
+
@apply bg-accent-hover;
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
/* Hover state – only on devices that support hover (avoids false triggers on touch) */
|
|
181
|
+
@media (hover: hover) {
|
|
182
|
+
&:hover:not([aria-selected="true"]),
|
|
183
|
+
&[data-hovered="true"]:not([aria-selected="true"]) {
|
|
184
|
+
@apply bg-default;
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
/* Outside month / outside view (previous/next month days) — data-outside-view lives on the trigger */
|
|
189
|
+
&:has([data-outside-view]) {
|
|
190
|
+
@apply text-muted opacity-50;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
&[aria-selected="true"]:has([data-outside-view]) {
|
|
194
|
+
@apply bg-default;
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
/* Unavailable dates */
|
|
198
|
+
&[data-unavailable="true"] {
|
|
199
|
+
@apply status-disabled;
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
/* Disabled state */
|
|
203
|
+
&:disabled:not([data-outside-month="true"]),
|
|
204
|
+
&[data-disabled]:not([data-outside-month="true"]) {
|
|
205
|
+
@apply status-disabled;
|
|
206
|
+
|
|
207
|
+
text-decoration: line-through;
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
/* Cell trigger - full-cell hit target inside the cell's circle */
|
|
212
|
+
.calendar__cell-button {
|
|
213
|
+
@apply absolute inset-0 flex items-center justify-center rounded-full outline-none no-highlight;
|
|
214
|
+
cursor: var(--cursor-interactive);
|
|
215
|
+
|
|
216
|
+
/* Suppress browser default focus ring on pointer interaction;
|
|
217
|
+
the keyboard focus state is drawn by `.calendar__cell` via status-focused. */
|
|
218
|
+
&:focus {
|
|
219
|
+
@apply outline-none;
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
/* Cell indicator - small dot at bottom center of cell */
|
|
224
|
+
.calendar__cell-indicator {
|
|
225
|
+
@apply absolute bottom-1 left-1/2 size-[3px] -translate-x-1/2 rounded-full bg-muted;
|
|
226
|
+
|
|
227
|
+
/* Indicator color changes when cell is selected */
|
|
228
|
+
[data-state="checked"] > & {
|
|
229
|
+
@apply bg-accent-foreground;
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
/* -----------------------------------------------------------------------------
|
|
234
|
+
* Calendar Heading Button (clickable heading for view switching)
|
|
235
|
+
* -------------------------------------------------------------------------- */
|
|
236
|
+
.calendar__heading-button {
|
|
237
|
+
@apply inline-flex items-center justify-center rounded-md bg-transparent px-2 py-0.5 text-center text-xs font-medium outline-none;
|
|
238
|
+
cursor: var(--cursor-interactive);
|
|
239
|
+
transition:
|
|
240
|
+
background-color 300ms var(--ease-out),
|
|
241
|
+
box-shadow 300ms var(--ease-out);
|
|
242
|
+
@apply transform-gpu motion-reduce:transition-none;
|
|
243
|
+
|
|
244
|
+
@media (hover: hover) {
|
|
245
|
+
&:hover,
|
|
246
|
+
&[data-hovered="true"] {
|
|
247
|
+
@apply bg-default;
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
&:focus-visible,
|
|
252
|
+
&[data-focus-visible="true"] {
|
|
253
|
+
@apply status-focused;
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
/* -----------------------------------------------------------------------------
|
|
258
|
+
* Calendar Month / Year Grids (view switcher bodies)
|
|
259
|
+
* -------------------------------------------------------------------------- */
|
|
260
|
+
.calendar__month-grid,
|
|
261
|
+
.calendar__year-grid {
|
|
262
|
+
display: grid;
|
|
263
|
+
grid-template-columns: repeat(3, 1fr);
|
|
264
|
+
grid-template-rows: repeat(4, 1fr);
|
|
265
|
+
border-collapse: collapse;
|
|
266
|
+
@apply aspect-[7/6] w-full;
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
.calendar__month-grid-body,
|
|
270
|
+
.calendar__year-grid-body {
|
|
271
|
+
display: contents;
|
|
272
|
+
|
|
273
|
+
& > tr {
|
|
274
|
+
display: contents;
|
|
275
|
+
place-items: center;
|
|
276
|
+
|
|
277
|
+
& > td {
|
|
278
|
+
display: flex;
|
|
279
|
+
align-items: center;
|
|
280
|
+
justify-content: center;
|
|
281
|
+
padding: 0.5rem;
|
|
282
|
+
}
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
.calendar__month-grid-row,
|
|
287
|
+
.calendar__year-grid-row {
|
|
288
|
+
display: contents;
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
.calendar__month-cell,
|
|
292
|
+
.calendar__year-cell {
|
|
293
|
+
@apply relative m-0.5 flex size-auto items-center justify-center rounded-lg text-center text-xs font-medium outline-none no-highlight;
|
|
294
|
+
will-change: scale;
|
|
295
|
+
transition:
|
|
296
|
+
transform 300ms var(--ease-out),
|
|
297
|
+
box-shadow 300ms var(--ease-out),
|
|
298
|
+
background-color 300ms var(--ease-out);
|
|
299
|
+
@apply transform-gpu motion-reduce:transition-none;
|
|
300
|
+
cursor: var(--cursor-interactive);
|
|
301
|
+
|
|
302
|
+
@media (hover: hover) {
|
|
303
|
+
&:hover:not([data-selected]),
|
|
304
|
+
&[data-hovered="true"]:not([data-selected]) {
|
|
305
|
+
@apply bg-default;
|
|
306
|
+
}
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
&:active,
|
|
310
|
+
&[data-pressed="true"] {
|
|
311
|
+
transform: scale(0.95);
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
&:focus-visible,
|
|
315
|
+
&[data-focus-visible="true"] {
|
|
316
|
+
@apply status-focused;
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
&[data-selected] {
|
|
320
|
+
@apply bg-accent text-accent-foreground;
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
&:disabled,
|
|
324
|
+
&[data-disabled] {
|
|
325
|
+
@apply status-disabled;
|
|
326
|
+
}
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
.calendar__month-cell-label,
|
|
330
|
+
.calendar__year-cell-label {
|
|
331
|
+
@apply pointer-events-none;
|
|
332
|
+
}
|
|
@@ -0,0 +1,225 @@
|
|
|
1
|
+
/* ==========================================================================
|
|
2
|
+
Card — Surface container with header / body / footer composition
|
|
3
|
+
========================================================================== */
|
|
4
|
+
|
|
5
|
+
/* Block */
|
|
6
|
+
.card {
|
|
7
|
+
@apply relative flex flex-col overflow-hidden;
|
|
8
|
+
@apply rounded-3xl;
|
|
9
|
+
|
|
10
|
+
/* Tokens — overridden by variant/shadow modifiers */
|
|
11
|
+
--card-bg: var(--color-surface);
|
|
12
|
+
--card-fg: var(--color-surface-foreground);
|
|
13
|
+
--card-border: transparent;
|
|
14
|
+
--card-shadow: var(--surface-shadow);
|
|
15
|
+
--card-gap: 0;
|
|
16
|
+
|
|
17
|
+
background-color: var(--card-bg);
|
|
18
|
+
color: var(--card-fg);
|
|
19
|
+
border: 1px solid var(--card-border);
|
|
20
|
+
box-shadow: var(--card-shadow);
|
|
21
|
+
|
|
22
|
+
transition:
|
|
23
|
+
transform 300ms var(--ease-smooth),
|
|
24
|
+
background-color 300ms var(--ease-out),
|
|
25
|
+
box-shadow 300ms var(--ease-out),
|
|
26
|
+
border-color 300ms var(--ease-out);
|
|
27
|
+
@apply transform-gpu motion-reduce:transition-none;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/* ==========================================================================
|
|
31
|
+
Element — header
|
|
32
|
+
========================================================================== */
|
|
33
|
+
|
|
34
|
+
.card__header {
|
|
35
|
+
@apply flex shrink-0 flex-col gap-0.5 px-5 pt-5 pb-3;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.card__header--divided {
|
|
39
|
+
@apply border-b border-border pb-4;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/* Element — title */
|
|
43
|
+
.card__title {
|
|
44
|
+
@apply text-sm leading-6 font-semibold tracking-tight text-foreground;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/* Element — description */
|
|
48
|
+
.card__description {
|
|
49
|
+
@apply text-sm leading-5 text-muted;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
/* ==========================================================================
|
|
53
|
+
Element — body / content
|
|
54
|
+
========================================================================== */
|
|
55
|
+
|
|
56
|
+
.card__content {
|
|
57
|
+
@apply flex flex-1 flex-col gap-2 px-5 py-4 text-sm leading-6 text-foreground;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
/* Body as the only child (no header/footer) tightens to comfortable padding */
|
|
61
|
+
.card__content:only-child {
|
|
62
|
+
@apply p-5;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
/* ==========================================================================
|
|
66
|
+
Element — footer
|
|
67
|
+
========================================================================== */
|
|
68
|
+
|
|
69
|
+
.card__footer {
|
|
70
|
+
@apply flex shrink-0 flex-row items-center gap-2 px-5 pt-3 pb-5;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.card__footer--divided {
|
|
74
|
+
@apply border-t border-border pt-4;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
/* ==========================================================================
|
|
78
|
+
Variants — surface color
|
|
79
|
+
========================================================================== */
|
|
80
|
+
|
|
81
|
+
.card--default {
|
|
82
|
+
--card-bg: var(--color-surface);
|
|
83
|
+
--card-fg: var(--color-surface-foreground);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.card--secondary {
|
|
87
|
+
--card-bg: var(--color-surface-secondary);
|
|
88
|
+
--card-fg: var(--color-surface-secondary-foreground);
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
.card--tertiary {
|
|
92
|
+
--card-bg: var(--color-surface-tertiary);
|
|
93
|
+
--card-fg: var(--color-surface-tertiary-foreground);
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
.card--transparent {
|
|
97
|
+
--card-bg: transparent;
|
|
98
|
+
--card-shadow: none;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
.card--bordered {
|
|
102
|
+
--card-bg: var(--color-surface);
|
|
103
|
+
--card-border: var(--color-border);
|
|
104
|
+
--card-shadow: none;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
/* Frosted glass — sits over imagery / gradients. Host must allow bg bleed. */
|
|
108
|
+
.card--blurred {
|
|
109
|
+
--card-bg: color-mix(in oklab, var(--color-surface) 60%, transparent);
|
|
110
|
+
backdrop-filter: saturate(160%) blur(16px);
|
|
111
|
+
-webkit-backdrop-filter: saturate(160%) blur(16px);
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
/* ==========================================================================
|
|
115
|
+
Shadow scale
|
|
116
|
+
========================================================================== */
|
|
117
|
+
|
|
118
|
+
.card--shadow-none {
|
|
119
|
+
--card-shadow: none;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
.card--shadow-sm {
|
|
123
|
+
--card-shadow:
|
|
124
|
+
0 1px 2px 0 rgba(0, 0, 0, 0.04),
|
|
125
|
+
0 0 1px 0 rgba(0, 0, 0, 0.06);
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
.card--shadow-md {
|
|
129
|
+
--card-shadow:
|
|
130
|
+
0 4px 12px -2px rgba(0, 0, 0, 0.08),
|
|
131
|
+
0 2px 4px -1px rgba(0, 0, 0, 0.04),
|
|
132
|
+
0 0 1px 0 rgba(0, 0, 0, 0.08);
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
.card--shadow-lg {
|
|
136
|
+
--card-shadow:
|
|
137
|
+
0 20px 40px -12px rgba(0, 0, 0, 0.18),
|
|
138
|
+
0 8px 16px -6px rgba(0, 0, 0, 0.08),
|
|
139
|
+
0 0 1px 0 rgba(0, 0, 0, 0.08);
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
/* ==========================================================================
|
|
143
|
+
Radius scale
|
|
144
|
+
========================================================================== */
|
|
145
|
+
|
|
146
|
+
.card.card--radius-none {
|
|
147
|
+
@apply rounded-none;
|
|
148
|
+
}
|
|
149
|
+
.card.card--radius-sm {
|
|
150
|
+
@apply rounded-md;
|
|
151
|
+
}
|
|
152
|
+
.card.card--radius-md {
|
|
153
|
+
@apply rounded-xl;
|
|
154
|
+
}
|
|
155
|
+
.card.card--radius-lg {
|
|
156
|
+
@apply rounded-2xl;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
/* ==========================================================================
|
|
160
|
+
Interactive — hoverable
|
|
161
|
+
========================================================================== */
|
|
162
|
+
|
|
163
|
+
.card--hoverable {
|
|
164
|
+
@media (hover: hover) {
|
|
165
|
+
&:hover,
|
|
166
|
+
&[data-hovered="true"] {
|
|
167
|
+
--card-shadow:
|
|
168
|
+
0 16px 32px -12px rgba(0, 0, 0, 0.18),
|
|
169
|
+
0 4px 8px -2px rgba(0, 0, 0, 0.06),
|
|
170
|
+
0 0 1px 0 rgba(0, 0, 0, 0.08);
|
|
171
|
+
transform: translateY(-2px);
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
/* ==========================================================================
|
|
177
|
+
Interactive — pressable (fully clickable card)
|
|
178
|
+
========================================================================== */
|
|
179
|
+
|
|
180
|
+
.card--pressable {
|
|
181
|
+
cursor: var(--cursor-interactive);
|
|
182
|
+
@apply outline-none select-none;
|
|
183
|
+
|
|
184
|
+
&:focus-visible:not(:focus),
|
|
185
|
+
&[data-focus-visible="true"] {
|
|
186
|
+
@apply status-focused;
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
&:active,
|
|
190
|
+
&[data-pressed="true"] {
|
|
191
|
+
transform: scale(0.985);
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
@media (hover: hover) {
|
|
195
|
+
&:hover,
|
|
196
|
+
&[data-hovered="true"] {
|
|
197
|
+
--card-bg: var(--color-surface-hover);
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
/* Pressable + hoverable combined: preserve lift + keep press scale */
|
|
203
|
+
.card--pressable.card--hoverable:active,
|
|
204
|
+
.card--pressable.card--hoverable[data-pressed="true"] {
|
|
205
|
+
transform: translateY(-2px) scale(0.985);
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
/* ==========================================================================
|
|
209
|
+
Disabled
|
|
210
|
+
========================================================================== */
|
|
211
|
+
|
|
212
|
+
.card--disabled,
|
|
213
|
+
.card[aria-disabled="true"],
|
|
214
|
+
.card[data-disabled="true"] {
|
|
215
|
+
@apply status-disabled;
|
|
216
|
+
pointer-events: none;
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
/* ==========================================================================
|
|
220
|
+
Full width
|
|
221
|
+
========================================================================== */
|
|
222
|
+
|
|
223
|
+
.card--full-width {
|
|
224
|
+
@apply w-full;
|
|
225
|
+
}
|