@lanrenbang/basecoat-ultra 0.1.2
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/CHANGELOG-cn.md +54 -0
- package/CHANGELOG.md +54 -0
- package/LICENSE +21 -0
- package/README-cn.md +186 -0
- package/README.md +173 -0
- package/dist/css/basecoat.cdn.css +7389 -0
- package/dist/css/basecoat.cdn.min.css +2 -0
- package/dist/css/basecoat.css +1797 -0
- package/dist/css/datepicker.css +382 -0
- package/dist/css/datepicker.min.css +1 -0
- package/dist/css/resizable.css +96 -0
- package/dist/css/resizable.min.css +1 -0
- package/dist/js/accordion.js +20 -0
- package/dist/js/accordion.min.js +13 -0
- package/dist/js/all.js +17 -0
- package/dist/js/all.min.js +17 -0
- package/dist/js/basecoat.js +75 -0
- package/dist/js/basecoat.min.js +56 -0
- package/dist/js/carousel.js +104 -0
- package/dist/js/carousel.min.js +41 -0
- package/dist/js/catppuccin-theme-switcher.js +136 -0
- package/dist/js/catppuccin-theme-switcher.min.js +73 -0
- package/dist/js/command.js +132 -0
- package/dist/js/command.min.js +76 -0
- package/dist/js/datepicker.js +2367 -0
- package/dist/js/datepicker.min.js +1422 -0
- package/dist/js/dialog.js +20 -0
- package/dist/js/dialog.min.js +11 -0
- package/dist/js/dropdown-menu.js +148 -0
- package/dist/js/dropdown-menu.min.js +75 -0
- package/dist/js/input-otp.js +94 -0
- package/dist/js/input-otp.min.js +38 -0
- package/dist/js/lighting.js +80 -0
- package/dist/js/lighting.min.js +44 -0
- package/dist/js/popover.js +72 -0
- package/dist/js/popover.min.js +34 -0
- package/dist/js/resizable.js +534 -0
- package/dist/js/resizable.min.js +284 -0
- package/dist/js/select.js +246 -0
- package/dist/js/select.min.js +131 -0
- package/dist/js/sheet.js +85 -0
- package/dist/js/sheet.min.js +40 -0
- package/dist/js/sidebar.js +87 -0
- package/dist/js/sidebar.min.js +53 -0
- package/dist/js/slider.js +18 -0
- package/dist/js/slider.min.js +10 -0
- package/dist/js/tabs.js +53 -0
- package/dist/js/tabs.min.js +40 -0
- package/dist/js/toast.js +137 -0
- package/dist/js/toast.min.js +83 -0
- package/dist/js/toggle.js +36 -0
- package/dist/js/toggle.min.js +20 -0
- package/dist/theme/catppuccin/index.css +448 -0
- package/dist/theme/catppuccin/index.min.css +1 -0
- package/package.json +46 -0
|
@@ -0,0 +1,1797 @@
|
|
|
1
|
+
/*
|
|
2
|
+
Main CSS file for Basecoat.
|
|
3
|
+
This file has been refactored to import smaller, modular parts.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
/* 1. Core Styles, Variables, and Resets */
|
|
7
|
+
@custom-variant dark (&:is(.dark *));
|
|
8
|
+
|
|
9
|
+
:root {
|
|
10
|
+
--radius: 0.625rem;
|
|
11
|
+
--background: oklch(1 0 0);
|
|
12
|
+
--foreground: oklch(0.145 0 0);
|
|
13
|
+
--card: oklch(1 0 0);
|
|
14
|
+
--card-foreground: oklch(0.145 0 0);
|
|
15
|
+
--popover: oklch(1 0 0);
|
|
16
|
+
--popover-foreground: oklch(0.145 0 0);
|
|
17
|
+
--primary: oklch(0.205 0 0);
|
|
18
|
+
--primary-foreground: oklch(0.985 0 0);
|
|
19
|
+
--secondary: oklch(0.97 0 0);
|
|
20
|
+
--secondary-foreground: oklch(0.205 0 0);
|
|
21
|
+
--muted: oklch(0.97 0 0);
|
|
22
|
+
--muted-foreground: oklch(0.556 0 0);
|
|
23
|
+
--accent: oklch(0.97 0 0);
|
|
24
|
+
--accent-foreground: oklch(0.205 0 0);
|
|
25
|
+
--destructive: oklch(0.577 0.245 27.325);
|
|
26
|
+
--border: oklch(0.922 0 0);
|
|
27
|
+
--input: oklch(0.922 0 0);
|
|
28
|
+
--ring: oklch(0.708 0 0);
|
|
29
|
+
--chart-1: oklch(0.646 0.222 41.116);
|
|
30
|
+
--chart-2: oklch(0.6 0.118 184.704);
|
|
31
|
+
--chart-3: oklch(0.398 0.07 227.392);
|
|
32
|
+
--chart-4: oklch(0.828 0.189 84.429);
|
|
33
|
+
--chart-5: oklch(0.769 0.188 70.08);
|
|
34
|
+
--sidebar: oklch(0.985 0 0);
|
|
35
|
+
--sidebar-foreground: oklch(0.145 0 0);
|
|
36
|
+
--sidebar-primary: oklch(0.205 0 0);
|
|
37
|
+
--sidebar-primary-foreground: oklch(0.985 0 0);
|
|
38
|
+
--sidebar-accent: oklch(0.97 0 0);
|
|
39
|
+
--sidebar-accent-foreground: oklch(0.205 0 0);
|
|
40
|
+
--sidebar-border: oklch(0.922 0 0);
|
|
41
|
+
--sidebar-ring: oklch(0.708 0 0);
|
|
42
|
+
--sidebar-width: 16rem;
|
|
43
|
+
--sidebar-mobile-width: 18rem;
|
|
44
|
+
--scrollbar-track: transparent;
|
|
45
|
+
--scrollbar-thumb: rgba(0, 0, 0, 0.3);
|
|
46
|
+
--scrollbar-width: 6px;
|
|
47
|
+
--scrollbar-radius: 6px;
|
|
48
|
+
--chevron-down-icon: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="oklch(0.556 0 0)" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-chevron-down-icon lucide-chevron-down"><path d="m6 9 6 6 6-6"/></svg>'); /* --muted-foreground */
|
|
49
|
+
--chevron-down-icon-50: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="oklch(0.556 0 0 / 0.5)" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-chevron-down-icon lucide-chevron-down"><path d="m6 9 6 6 6-6"/></svg>'); /* --muted-foreground + 50% opacity */
|
|
50
|
+
--check-icon: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="oklch(0.556 0 0)" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-check-icon lucide-check"><path d="M20 6 9 17l-5-5"/></svg>'); /* --muted-foreground */
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.dark {
|
|
54
|
+
--background: oklch(0.145 0 0);
|
|
55
|
+
--foreground: oklch(0.985 0 0);
|
|
56
|
+
--card: oklch(0.205 0 0);
|
|
57
|
+
--card-foreground: oklch(0.985 0 0);
|
|
58
|
+
--popover: oklch(0.269 0 0);
|
|
59
|
+
--popover-foreground: oklch(0.985 0 0);
|
|
60
|
+
--primary: oklch(0.922 0 0);
|
|
61
|
+
--primary-foreground: oklch(0.205 0 0);
|
|
62
|
+
--secondary: oklch(0.269 0 0);
|
|
63
|
+
--secondary-foreground: oklch(0.985 0 0);
|
|
64
|
+
--muted: oklch(0.269 0 0);
|
|
65
|
+
--muted-foreground: oklch(0.708 0 0);
|
|
66
|
+
--accent: oklch(0.371 0 0);
|
|
67
|
+
--accent-foreground: oklch(0.985 0 0);
|
|
68
|
+
--destructive: oklch(0.704 0.191 22.216);
|
|
69
|
+
--border: oklch(1 0 0 / 10%);
|
|
70
|
+
--input: oklch(1 0 0 / 15%);
|
|
71
|
+
--ring: oklch(0.556 0 0);
|
|
72
|
+
--chart-1: oklch(0.488 0.243 264.376);
|
|
73
|
+
--chart-2: oklch(0.696 0.17 162.48);
|
|
74
|
+
--chart-3: oklch(0.769 0.188 70.08);
|
|
75
|
+
--chart-4: oklch(0.627 0.265 303.9);
|
|
76
|
+
--chart-5: oklch(0.645 0.246 16.439);
|
|
77
|
+
--sidebar: oklch(0.205 0 0);
|
|
78
|
+
--sidebar-foreground: oklch(0.985 0 0);
|
|
79
|
+
--sidebar-primary: oklch(0.488 0.243 264.376);
|
|
80
|
+
--sidebar-primary-foreground: oklch(0.985 0 0);
|
|
81
|
+
--sidebar-accent: oklch(0.269 0 0);
|
|
82
|
+
--sidebar-accent-foreground: oklch(0.985 0 0);
|
|
83
|
+
--sidebar-border: oklch(1 0 0 / 10%);
|
|
84
|
+
--sidebar-ring: oklch(0.439 0 0);
|
|
85
|
+
--scrollbar-thumb: rgba(255, 255, 255, 0.3);
|
|
86
|
+
--chevron-down-icon: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="oklch(0.708 0 0)" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-chevron-down-icon lucide-chevron-down"><path d="m6 9 6 6 6-6"/></svg>'); /* --muted-foreground */
|
|
87
|
+
--chevron-down-icon-50: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="oklch(0.708 0 0 / 0.5)" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-chevron-down-icon lucide-chevron-down"><path d="m6 9 6 6 6-6"/></svg>'); /* --muted-foreground + 50% opacity */
|
|
88
|
+
--check-icon: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="oklch(0.708 0 0)" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-check-icon lucide-check"><path d="M20 6 9 17l-5-5"/></svg>');/* --muted-foreground */
|
|
89
|
+
color-scheme: dark;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
@import "../config.css";
|
|
93
|
+
|
|
94
|
+
@layer base {
|
|
95
|
+
* {
|
|
96
|
+
@apply border-border outline-ring/50;
|
|
97
|
+
}
|
|
98
|
+
html {
|
|
99
|
+
@apply scroll-smooth;
|
|
100
|
+
}
|
|
101
|
+
body {
|
|
102
|
+
@apply bg-background text-foreground overscroll-none antialiased;
|
|
103
|
+
}
|
|
104
|
+
.scrollbar {
|
|
105
|
+
scrollbar-width: thin;
|
|
106
|
+
scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
|
|
107
|
+
|
|
108
|
+
&::-webkit-scrollbar {
|
|
109
|
+
width: var(--scrollbar-width);
|
|
110
|
+
}
|
|
111
|
+
&::-webkit-scrollbar-track {
|
|
112
|
+
background: var(--scrollbar-track);
|
|
113
|
+
}
|
|
114
|
+
&::-webkit-scrollbar-thumb {
|
|
115
|
+
background: var(--scrollbar-thumb);
|
|
116
|
+
border-radius: var(--scrollbar-radius);
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
|
|
122
|
+
|
|
123
|
+
/* 2. Components (Matched to upstream structure) */
|
|
124
|
+
/* Alert */
|
|
125
|
+
@layer components {
|
|
126
|
+
.alert,
|
|
127
|
+
.alert-destructive {
|
|
128
|
+
@apply relative w-full rounded-lg border px-4 py-3 text-sm grid has-[>svg]:grid-cols-[calc(var(--spacing)*4)_1fr] grid-cols-[0_1fr] has-[>svg]:gap-x-3 gap-y-0.5 items-start [&>svg]:size-4 [&>svg]:translate-y-0.5 [&>svg]:text-current;
|
|
129
|
+
|
|
130
|
+
> h2,
|
|
131
|
+
> h3,
|
|
132
|
+
> h4,
|
|
133
|
+
> h5,
|
|
134
|
+
> h6,
|
|
135
|
+
> strong,
|
|
136
|
+
> [data-title] {
|
|
137
|
+
@apply col-start-2 line-clamp-1 min-h-4 font-medium tracking-tight;
|
|
138
|
+
}
|
|
139
|
+
> section {
|
|
140
|
+
@apply text-muted-foreground col-start-2 grid justify-items-start gap-1 text-sm [&_p]:leading-relaxed;
|
|
141
|
+
|
|
142
|
+
ul {
|
|
143
|
+
@apply list-inside list-disc text-sm;
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
.alert {
|
|
148
|
+
@apply bg-card text-card-foreground;
|
|
149
|
+
}
|
|
150
|
+
.alert-destructive {
|
|
151
|
+
@apply text-destructive bg-card [&>svg]:text-current;
|
|
152
|
+
|
|
153
|
+
> section {
|
|
154
|
+
@apply text-destructive;
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
|
|
160
|
+
/* Badge */
|
|
161
|
+
@layer components {
|
|
162
|
+
.badge,
|
|
163
|
+
.badge-primary,
|
|
164
|
+
.badge-secondary,
|
|
165
|
+
.badge-destructive,
|
|
166
|
+
.badge-outline {
|
|
167
|
+
@apply inline-flex items-center justify-center rounded-full border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden;
|
|
168
|
+
}
|
|
169
|
+
.badge,
|
|
170
|
+
.badge-primary {
|
|
171
|
+
@apply border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90;
|
|
172
|
+
}
|
|
173
|
+
.badge-secondary {
|
|
174
|
+
@apply border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90;
|
|
175
|
+
}
|
|
176
|
+
.badge-destructive {
|
|
177
|
+
@apply border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60;
|
|
178
|
+
}
|
|
179
|
+
.badge-outline {
|
|
180
|
+
@apply border-border bg-background text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground;
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
|
|
185
|
+
/* Button */
|
|
186
|
+
@layer components {
|
|
187
|
+
.btn,
|
|
188
|
+
.btn-primary,
|
|
189
|
+
.btn-secondary,
|
|
190
|
+
.btn-outline,
|
|
191
|
+
.btn-ghost,
|
|
192
|
+
.btn-link,
|
|
193
|
+
.btn-destructive,
|
|
194
|
+
.btn-sm,
|
|
195
|
+
.btn-sm-primary,
|
|
196
|
+
.btn-sm-secondary,
|
|
197
|
+
.btn-sm-outline,
|
|
198
|
+
.btn-sm-ghost,
|
|
199
|
+
.btn-sm-link,
|
|
200
|
+
.btn-sm-destructive,
|
|
201
|
+
.btn-lg,
|
|
202
|
+
.btn-lg-primary,
|
|
203
|
+
.btn-lg-secondary,
|
|
204
|
+
.btn-lg-outline,
|
|
205
|
+
.btn-lg-ghost,
|
|
206
|
+
.btn-lg-link,
|
|
207
|
+
.btn-lg-destructive,
|
|
208
|
+
.btn-icon,
|
|
209
|
+
.btn-icon-primary,
|
|
210
|
+
.btn-icon-secondary,
|
|
211
|
+
.btn-icon-outline,
|
|
212
|
+
.btn-icon-ghost,
|
|
213
|
+
.btn-icon-link,
|
|
214
|
+
.btn-icon-destructive,
|
|
215
|
+
.btn-sm-icon,
|
|
216
|
+
.btn-sm-icon-primary,
|
|
217
|
+
.btn-sm-icon-secondary,
|
|
218
|
+
.btn-sm-icon-outline,
|
|
219
|
+
.btn-sm-icon-ghost,
|
|
220
|
+
.btn-sm-icon-link,
|
|
221
|
+
.btn-sm-icon-destructive,
|
|
222
|
+
.btn-lg-icon,
|
|
223
|
+
.btn-lg-icon-primary,
|
|
224
|
+
.btn-lg-icon-secondary,
|
|
225
|
+
.btn-lg-icon-outline,
|
|
226
|
+
.btn-lg-icon-ghost,
|
|
227
|
+
.btn-lg-icon-link,
|
|
228
|
+
.btn-lg-icon-destructive {
|
|
229
|
+
@apply inline-flex items-center justify-center whitespace-nowrap text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive cursor-pointer rounded-md;
|
|
230
|
+
|
|
231
|
+
& svg:not([class*="size-"]) {
|
|
232
|
+
@apply size-4;
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
.btn,
|
|
236
|
+
.btn-primary,
|
|
237
|
+
.btn-secondary,
|
|
238
|
+
.btn-outline,
|
|
239
|
+
.btn-ghost,
|
|
240
|
+
.btn-link,
|
|
241
|
+
.btn-destructive {
|
|
242
|
+
@apply gap-2 h-9 px-4 py-2 has-[>svg]:px-3;
|
|
243
|
+
}
|
|
244
|
+
.btn-icon,
|
|
245
|
+
.btn-icon-primary,
|
|
246
|
+
.btn-icon-secondary,
|
|
247
|
+
.btn-icon-outline,
|
|
248
|
+
.btn-icon-ghost,
|
|
249
|
+
.btn-icon-link,
|
|
250
|
+
.btn-icon-destructive {
|
|
251
|
+
@apply size-9;
|
|
252
|
+
}
|
|
253
|
+
.btn-sm,
|
|
254
|
+
.btn-sm-primary,
|
|
255
|
+
.btn-sm-secondary,
|
|
256
|
+
.btn-sm-outline,
|
|
257
|
+
.btn-sm-ghost,
|
|
258
|
+
.btn-sm-link,
|
|
259
|
+
.btn-sm-destructive {
|
|
260
|
+
@apply gap-1.5 h-8 px-3 has-[>svg]:px-2.5;
|
|
261
|
+
}
|
|
262
|
+
.btn-sm-icon,
|
|
263
|
+
.btn-sm-icon-primary,
|
|
264
|
+
.btn-sm-icon-secondary,
|
|
265
|
+
.btn-sm-icon-outline,
|
|
266
|
+
.btn-sm-icon-ghost,
|
|
267
|
+
.btn-sm-icon-link,
|
|
268
|
+
.btn-sm-icon-destructive {
|
|
269
|
+
@apply size-8;
|
|
270
|
+
}
|
|
271
|
+
.btn-lg,
|
|
272
|
+
.btn-lg-primary,
|
|
273
|
+
.btn-lg-secondary,
|
|
274
|
+
.btn-lg-outline,
|
|
275
|
+
.btn-lg-ghost,
|
|
276
|
+
.btn-lg-link,
|
|
277
|
+
.btn-lg-destructive {
|
|
278
|
+
@apply gap-2 h-10 px-6 has-[>svg]:px-4;
|
|
279
|
+
}
|
|
280
|
+
.btn-lg-icon,
|
|
281
|
+
.btn-lg-icon-primary,
|
|
282
|
+
.btn-lg-icon-secondary,
|
|
283
|
+
.btn-lg-icon-outline,
|
|
284
|
+
.btn-lg-icon-ghost,
|
|
285
|
+
.btn-lg-icon-link,
|
|
286
|
+
.btn-lg-icon-destructive {
|
|
287
|
+
@apply size-10;
|
|
288
|
+
}
|
|
289
|
+
.btn,
|
|
290
|
+
.btn-primary,
|
|
291
|
+
.btn-sm,
|
|
292
|
+
.btn-sm-primary,
|
|
293
|
+
.btn-lg,
|
|
294
|
+
.btn-lg-primary,
|
|
295
|
+
.btn-icon,
|
|
296
|
+
.btn-icon-primary,
|
|
297
|
+
.btn-sm-icon,
|
|
298
|
+
.btn-sm-icon-primary,
|
|
299
|
+
.btn-lg-icon,
|
|
300
|
+
.btn-lg-icon-primary {
|
|
301
|
+
@apply bg-primary text-primary-foreground shadow-xs hover:bg-primary/90;
|
|
302
|
+
&[aria-pressed='true'] {
|
|
303
|
+
@apply bg-primary/90;
|
|
304
|
+
}
|
|
305
|
+
}
|
|
306
|
+
.btn-secondary,
|
|
307
|
+
.btn-sm-secondary,
|
|
308
|
+
.btn-lg-secondary,
|
|
309
|
+
.btn-icon-secondary,
|
|
310
|
+
.btn-sm-icon-secondary,
|
|
311
|
+
.btn-lg-icon-secondary {
|
|
312
|
+
@apply bg-secondary text-secondary-foreground shadow-xs;
|
|
313
|
+
&:hover,
|
|
314
|
+
&[aria-pressed='true'] {
|
|
315
|
+
@apply bg-secondary/80;
|
|
316
|
+
}
|
|
317
|
+
}
|
|
318
|
+
.btn-outline,
|
|
319
|
+
.btn-sm-outline,
|
|
320
|
+
.btn-lg-outline,
|
|
321
|
+
.btn-icon-outline,
|
|
322
|
+
.btn-sm-icon-outline,
|
|
323
|
+
.btn-lg-icon-outline {
|
|
324
|
+
@apply border bg-background text-foreground shadow-xs dark:bg-input/30 dark:border-input;
|
|
325
|
+
&:hover,
|
|
326
|
+
&[aria-pressed='true'] {
|
|
327
|
+
@apply bg-accent text-accent-foreground dark:bg-accent/50;
|
|
328
|
+
}
|
|
329
|
+
}
|
|
330
|
+
.btn-ghost,
|
|
331
|
+
.btn-sm-ghost,
|
|
332
|
+
.btn-lg-ghost,
|
|
333
|
+
.btn-icon-ghost,
|
|
334
|
+
.btn-sm-icon-ghost,
|
|
335
|
+
.btn-lg-icon-ghost {
|
|
336
|
+
@apply bg-transparent text-foreground shadow-none;
|
|
337
|
+
&:hover,
|
|
338
|
+
&[aria-pressed='true'] {
|
|
339
|
+
@apply bg-accent text-accent-foreground dark:bg-accent/50;
|
|
340
|
+
}
|
|
341
|
+
}
|
|
342
|
+
.btn-link,
|
|
343
|
+
.btn-sm-link,
|
|
344
|
+
.btn-lg-link,
|
|
345
|
+
.btn-icon-link,
|
|
346
|
+
.btn-sm-icon-link,
|
|
347
|
+
.btn-lg-icon-link {
|
|
348
|
+
@apply bg-transparent text-primary underline-offset-4 shadow-none;
|
|
349
|
+
&:hover,
|
|
350
|
+
&[aria-pressed='true'] {
|
|
351
|
+
@apply hover:underline hover:bg-transparent;
|
|
352
|
+
}
|
|
353
|
+
}
|
|
354
|
+
.btn-destructive,
|
|
355
|
+
.btn-sm-destructive,
|
|
356
|
+
.btn-lg-destructive,
|
|
357
|
+
.btn-icon-destructive,
|
|
358
|
+
.btn-sm-icon-destructive,
|
|
359
|
+
.btn-lg-icon-destructive {
|
|
360
|
+
@apply bg-destructive text-white shadow-xs focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60;
|
|
361
|
+
&:hover,
|
|
362
|
+
&[aria-pressed='true'] {
|
|
363
|
+
@apply bg-destructive/90 dark:bg-destructive/50;
|
|
364
|
+
}
|
|
365
|
+
}
|
|
366
|
+
}
|
|
367
|
+
|
|
368
|
+
|
|
369
|
+
/* Button Group */
|
|
370
|
+
@layer components {
|
|
371
|
+
.button-group {
|
|
372
|
+
@apply inline-flex w-fit items-stretch isolate;
|
|
373
|
+
|
|
374
|
+
> *:focus-visible,
|
|
375
|
+
> :is(.dropdown-menu, .popover, .select) > button:focus-visible {
|
|
376
|
+
@apply relative z-10;
|
|
377
|
+
}
|
|
378
|
+
|
|
379
|
+
> hr[role='separator'] {
|
|
380
|
+
@apply w-0 h-auto self-stretch border border-input shrink-0 m-0;
|
|
381
|
+
}
|
|
382
|
+
|
|
383
|
+
&:not([data-orientation='vertical']) {
|
|
384
|
+
> *:not(:first-child),
|
|
385
|
+
> :is(.dropdown-menu, .popover, .select):not(:first-child) > button {
|
|
386
|
+
@apply rounded-l-none border-l-0;
|
|
387
|
+
}
|
|
388
|
+
> *:not(:last-child),
|
|
389
|
+
> :is(.dropdown-menu, .popover, .select):not(:last-child) > button {
|
|
390
|
+
@apply rounded-r-none;
|
|
391
|
+
}
|
|
392
|
+
}
|
|
393
|
+
&[data-orientation='vertical'] {
|
|
394
|
+
@apply flex-col;
|
|
395
|
+
|
|
396
|
+
> hr[role='separator'] {
|
|
397
|
+
@apply w-auto h-px;
|
|
398
|
+
}
|
|
399
|
+
|
|
400
|
+
> *:not(:first-child),
|
|
401
|
+
> :is(.dropdown-menu, .popover, .select):not(:first-child) > button {
|
|
402
|
+
@apply rounded-t-none border-t-0;
|
|
403
|
+
}
|
|
404
|
+
> *:not(:last-child),
|
|
405
|
+
> :is(.dropdown-menu, .popover, .select):not(:last-child) > button {
|
|
406
|
+
@apply rounded-b-none;
|
|
407
|
+
}
|
|
408
|
+
}
|
|
409
|
+
}
|
|
410
|
+
}
|
|
411
|
+
|
|
412
|
+
|
|
413
|
+
/* Card */
|
|
414
|
+
@layer components {
|
|
415
|
+
.card {
|
|
416
|
+
@apply bg-card text-card-foreground flex flex-col gap-6 rounded-xl border py-6 shadow-sm;
|
|
417
|
+
|
|
418
|
+
> header {
|
|
419
|
+
@apply @container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-1.5 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6;
|
|
420
|
+
/* TODO: CLEAN has-data-[slot=card-action] */
|
|
421
|
+
|
|
422
|
+
h2 {
|
|
423
|
+
@apply leading-none font-semibold;
|
|
424
|
+
}
|
|
425
|
+
p {
|
|
426
|
+
@apply text-muted-foreground text-sm;
|
|
427
|
+
}
|
|
428
|
+
}
|
|
429
|
+
> section {
|
|
430
|
+
@apply px-6;
|
|
431
|
+
}
|
|
432
|
+
> footer {
|
|
433
|
+
@apply flex items-center px-6 [.border-t]:pt-6;
|
|
434
|
+
}
|
|
435
|
+
}
|
|
436
|
+
}
|
|
437
|
+
|
|
438
|
+
|
|
439
|
+
/* Checkbox */
|
|
440
|
+
@layer components {
|
|
441
|
+
:is(.form, .field) input[type='checkbox']:not([role='switch']),
|
|
442
|
+
.input[type='checkbox']:not([role='switch']) {
|
|
443
|
+
@apply appearance-none border-input dark:bg-input/30 checked:bg-primary dark:checked:bg-primary checked:border-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive size-4 shrink-0 rounded-[4px] border shadow-xs transition-shadow outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50;
|
|
444
|
+
|
|
445
|
+
&:checked:after {
|
|
446
|
+
@apply content-[''] block size-3.5 bg-primary-foreground;
|
|
447
|
+
@apply mask-[image:var(--check-icon)] mask-size-[0.875rem] mask-no-repeat mask-center;
|
|
448
|
+
}
|
|
449
|
+
}
|
|
450
|
+
}
|
|
451
|
+
|
|
452
|
+
|
|
453
|
+
/* Collapsible */
|
|
454
|
+
@layer components {
|
|
455
|
+
details {
|
|
456
|
+
&::details-content {
|
|
457
|
+
block-size: 0;
|
|
458
|
+
@apply block opacity-0 transition-discrete transition-all;
|
|
459
|
+
}
|
|
460
|
+
&[open]::details-content {
|
|
461
|
+
block-size: auto;
|
|
462
|
+
block-size: calc-size(auto, size);
|
|
463
|
+
@apply opacity-100;
|
|
464
|
+
}
|
|
465
|
+
summary {
|
|
466
|
+
@apply inline-flex items-center cursor-pointer;
|
|
467
|
+
}
|
|
468
|
+
}
|
|
469
|
+
details > summary::-webkit-details-marker {
|
|
470
|
+
display: none;
|
|
471
|
+
}
|
|
472
|
+
}
|
|
473
|
+
|
|
474
|
+
|
|
475
|
+
/* Command */
|
|
476
|
+
@layer components {
|
|
477
|
+
.command-dialog {
|
|
478
|
+
@apply inset-y-0 opacity-0 transition-all transition-discrete;
|
|
479
|
+
|
|
480
|
+
&:is([open],:popover-open) {
|
|
481
|
+
@apply opacity-100;
|
|
482
|
+
|
|
483
|
+
&::backdrop {
|
|
484
|
+
@apply opacity-100;
|
|
485
|
+
}
|
|
486
|
+
> * {
|
|
487
|
+
@apply scale-100;
|
|
488
|
+
}
|
|
489
|
+
|
|
490
|
+
@starting-style {
|
|
491
|
+
@apply opacity-0;
|
|
492
|
+
|
|
493
|
+
&::backdrop {
|
|
494
|
+
@apply opacity-0;
|
|
495
|
+
}
|
|
496
|
+
> * {
|
|
497
|
+
@apply scale-95;
|
|
498
|
+
}
|
|
499
|
+
}
|
|
500
|
+
}
|
|
501
|
+
&::backdrop {
|
|
502
|
+
@apply bg-black/50 opacity-0 transition-all transition-discrete;
|
|
503
|
+
}
|
|
504
|
+
> * {
|
|
505
|
+
@apply bg-background fixed top-[50%] left-[50%] z-50 flex flex-col w-full max-w-[calc(100%_-_2rem)] -translate-x-1/2 -translate-y-1/2 overflow-hidden rounded-lg border shadow-lg sm:max-w-lg max-h-[min(640px,calc(100%_-_2rem))];
|
|
506
|
+
@apply transition-all scale-95;
|
|
507
|
+
|
|
508
|
+
> button,
|
|
509
|
+
> form[method='dialog'] {
|
|
510
|
+
@apply absolute top-4 right-4;
|
|
511
|
+
}
|
|
512
|
+
> button,
|
|
513
|
+
> form[method='dialog'] > button {
|
|
514
|
+
@apply ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0;
|
|
515
|
+
|
|
516
|
+
& svg:not([class*="size-"]) {
|
|
517
|
+
@apply size-4;
|
|
518
|
+
}
|
|
519
|
+
}
|
|
520
|
+
}
|
|
521
|
+
|
|
522
|
+
.command {
|
|
523
|
+
> header input {
|
|
524
|
+
@apply h-12;
|
|
525
|
+
}
|
|
526
|
+
[role='menu'] {
|
|
527
|
+
@apply px-2;
|
|
528
|
+
|
|
529
|
+
[role='menuitem'] {
|
|
530
|
+
@apply py-3 px-2 [&_svg]:size-5;
|
|
531
|
+
}
|
|
532
|
+
[role='heading'] {
|
|
533
|
+
@apply px-2 py-1.5 font-medium text-muted-foreground;
|
|
534
|
+
}
|
|
535
|
+
}
|
|
536
|
+
}
|
|
537
|
+
}
|
|
538
|
+
|
|
539
|
+
.command {
|
|
540
|
+
> header {
|
|
541
|
+
@apply flex items-center border-b px-3 gap-2;
|
|
542
|
+
|
|
543
|
+
svg {
|
|
544
|
+
@apply size-4 shrink-0 opacity-50;
|
|
545
|
+
}
|
|
546
|
+
input {
|
|
547
|
+
@apply placeholder:text-muted-foreground flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50;
|
|
548
|
+
}
|
|
549
|
+
}
|
|
550
|
+
[role='menu'] {
|
|
551
|
+
@apply max-h-[300px] overflow-y-auto overflow-x-hidden p-1;
|
|
552
|
+
|
|
553
|
+
[role='menuitem'] {
|
|
554
|
+
@apply aria-hidden:hidden relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none aria-disabled:opacity-50 aria-disabled:pointer-events-none disabled:opacity-50 disabled:pointer-events-none w-full truncate [&_svg:not([class*='text-'])]:text-muted-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0;
|
|
555
|
+
|
|
556
|
+
& svg:not([class*="size-"]) {
|
|
557
|
+
@apply size-4;
|
|
558
|
+
}
|
|
559
|
+
|
|
560
|
+
&.active {
|
|
561
|
+
@apply bg-accent text-accent-foreground;
|
|
562
|
+
}
|
|
563
|
+
}
|
|
564
|
+
[role='heading'] {
|
|
565
|
+
@apply text-muted-foreground flex px-2 py-1.5 text-xs font-medium;
|
|
566
|
+
}
|
|
567
|
+
[role='group']:not(:has([role='menuitem']:not([aria-hidden='true']))) {
|
|
568
|
+
@apply hidden;
|
|
569
|
+
}
|
|
570
|
+
[role='separator'] {
|
|
571
|
+
@apply border-border -mx-1 my-1;
|
|
572
|
+
}
|
|
573
|
+
&:not(:has([role='menuitem']:not([aria-hidden='true'])))::before {
|
|
574
|
+
@apply flex items-center justify-center py-6 px-3 text-sm truncate -m-1;
|
|
575
|
+
}
|
|
576
|
+
&[data-empty]:not(:has([role='menuitem']:not([aria-hidden='true'])))::before {
|
|
577
|
+
@apply content-[attr(data-empty)];
|
|
578
|
+
}
|
|
579
|
+
&:not([data-empty]):not(:has([role='menuitem']:not([aria-hidden='true'])))::before {
|
|
580
|
+
@apply content-['No_results_found'];
|
|
581
|
+
}
|
|
582
|
+
}
|
|
583
|
+
&:not([data-command-initialized]) [role='menuitem'] {
|
|
584
|
+
@apply hover:bg-accent hover:text-accent-foreground;
|
|
585
|
+
}
|
|
586
|
+
&:has(> header input:not(:placeholder-shown)) [role='separator'] {
|
|
587
|
+
@apply hidden;
|
|
588
|
+
}
|
|
589
|
+
}
|
|
590
|
+
}
|
|
591
|
+
|
|
592
|
+
|
|
593
|
+
/* Dialog */
|
|
594
|
+
@layer components {
|
|
595
|
+
@keyframes dialog-spring-in {
|
|
596
|
+
0% { opacity: 0; transform: scale(0.9); }
|
|
597
|
+
50% { opacity: 1; transform: scale(1.05); }
|
|
598
|
+
100% { opacity: 1; transform: scale(1); }
|
|
599
|
+
}
|
|
600
|
+
|
|
601
|
+
@keyframes backdrop-in {
|
|
602
|
+
from { opacity: 0; }
|
|
603
|
+
to { opacity: 1; }
|
|
604
|
+
}
|
|
605
|
+
|
|
606
|
+
.dialog {
|
|
607
|
+
/*
|
|
608
|
+
Base Modal Styles
|
|
609
|
+
Position: Fixed (Native behavior uses fixed/absolute in top layer)
|
|
610
|
+
Centering: Native <dialog> uses 'margin: auto' and 'inset: 0' by default.
|
|
611
|
+
We enforce this to ensure it works even if overrides existed.
|
|
612
|
+
*/
|
|
613
|
+
@apply fixed inset-0 z-50 grid w-full max-w-lg gap-4 border bg-background p-6 shadow-lg duration-200 sm:rounded-lg opacity-0 invisible;
|
|
614
|
+
|
|
615
|
+
margin: auto !important;
|
|
616
|
+
height: fit-content !important;
|
|
617
|
+
|
|
618
|
+
/* Open state */
|
|
619
|
+
&[open] {
|
|
620
|
+
@apply opacity-100 visible;
|
|
621
|
+
/*
|
|
622
|
+
UPDATED ANIMATION (User Request):
|
|
623
|
+
Added a spring-like pop-up effect (scale 0.9 -> 1.05 -> 1.0)
|
|
624
|
+
instead of the original simple fade/scale.
|
|
625
|
+
Duration increased to 0.3s for better visibility.
|
|
626
|
+
Defined in @keyframes dialog-spring-in above.
|
|
627
|
+
*/
|
|
628
|
+
animation: dialog-spring-in 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.1) forwards;
|
|
629
|
+
}
|
|
630
|
+
|
|
631
|
+
/* Backdrop */
|
|
632
|
+
&::backdrop {
|
|
633
|
+
@apply fixed inset-0 z-50 bg-black/50;
|
|
634
|
+
animation: backdrop-in 0.3s ease-out forwards;
|
|
635
|
+
}
|
|
636
|
+
|
|
637
|
+
/* Inner Layout */
|
|
638
|
+
> header {
|
|
639
|
+
@apply flex flex-col gap-2 text-center sm:text-left;
|
|
640
|
+
|
|
641
|
+
> h2 {
|
|
642
|
+
@apply text-lg leading-none font-semibold;
|
|
643
|
+
}
|
|
644
|
+
> p {
|
|
645
|
+
@apply text-muted-foreground text-sm;
|
|
646
|
+
}
|
|
647
|
+
}
|
|
648
|
+
> section {
|
|
649
|
+
@apply flex-1;
|
|
650
|
+
}
|
|
651
|
+
> footer {
|
|
652
|
+
@apply flex flex-col-reverse gap-2 sm:flex-row sm:justify-end;
|
|
653
|
+
}
|
|
654
|
+
|
|
655
|
+
/* Close Button - positioned absolute top-right */
|
|
656
|
+
> button.close,
|
|
657
|
+
> form[method='dialog'] > button.close {
|
|
658
|
+
@apply absolute top-4 right-4 p-0 bg-transparent border-0 cursor-pointer;
|
|
659
|
+
@apply ring-offset-background focus:ring-ring text-muted-foreground hover:text-foreground rounded-sm opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none;
|
|
660
|
+
|
|
661
|
+
& svg {
|
|
662
|
+
@apply size-4;
|
|
663
|
+
}
|
|
664
|
+
}
|
|
665
|
+
}
|
|
666
|
+
}
|
|
667
|
+
/* Dropdown Menu */
|
|
668
|
+
@layer components {
|
|
669
|
+
.dropdown-menu {
|
|
670
|
+
@apply relative inline-flex;
|
|
671
|
+
|
|
672
|
+
[data-popover] {
|
|
673
|
+
@apply p-1;
|
|
674
|
+
min-width: anchor-size(width);
|
|
675
|
+
|
|
676
|
+
[role='menuitem'],
|
|
677
|
+
[role='menuitemcheckbox'],
|
|
678
|
+
[role='menuitemradio'] {
|
|
679
|
+
@apply aria-hidden:hidden [&_svg]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none [&_svg]:shrink-0 aria-disabled:opacity-50 aria-disabled:pointer-events-none disabled:opacity-50 disabled:pointer-events-none w-full truncate;
|
|
680
|
+
|
|
681
|
+
& svg:not([class*="size-"]) {
|
|
682
|
+
@apply size-4;
|
|
683
|
+
}
|
|
684
|
+
&:not([aria-disabled='true']) {
|
|
685
|
+
@apply focus-visible:bg-accent focus-visible:text-accent-foreground;
|
|
686
|
+
}
|
|
687
|
+
|
|
688
|
+
&.active {
|
|
689
|
+
@apply bg-accent text-accent-foreground;
|
|
690
|
+
}
|
|
691
|
+
}
|
|
692
|
+
[role='menu'] [role='heading'] {
|
|
693
|
+
@apply flex px-2 py-1.5 text-sm font-medium;
|
|
694
|
+
}
|
|
695
|
+
[role='separator'] {
|
|
696
|
+
@apply border-border -mx-1 my-1;
|
|
697
|
+
}
|
|
698
|
+
}
|
|
699
|
+
&:not([data-dropdown-menu-initialized]) [data-popover] {
|
|
700
|
+
[role='menuitem'],
|
|
701
|
+
[role='menuitemcheckbox'],
|
|
702
|
+
[role='menuitemradio'] {
|
|
703
|
+
@apply hover:bg-accent hover:text-accent-foreground;
|
|
704
|
+
}
|
|
705
|
+
}
|
|
706
|
+
}
|
|
707
|
+
}
|
|
708
|
+
|
|
709
|
+
|
|
710
|
+
/* Field */
|
|
711
|
+
@layer components {
|
|
712
|
+
.fieldset {
|
|
713
|
+
@apply flex flex-col gap-6;
|
|
714
|
+
|
|
715
|
+
> legend {
|
|
716
|
+
@apply text-base font-medium mb-3;
|
|
717
|
+
}
|
|
718
|
+
}
|
|
719
|
+
.field {
|
|
720
|
+
@apply flex flex-col w-full gap-3 data-[invalid=true]:text-destructive [&>*]:w-full [&>.sr-only]:w-auto;
|
|
721
|
+
|
|
722
|
+
h2,
|
|
723
|
+
h3 {
|
|
724
|
+
@apply flex w-fit items-center gap-2 text-sm leading-snug font-medium;
|
|
725
|
+
}
|
|
726
|
+
[role="alert"] {
|
|
727
|
+
@apply text-sm text-destructive font-normal;
|
|
728
|
+
|
|
729
|
+
ul {
|
|
730
|
+
@apply ml-4 flex list-disc flex-col gap-1;
|
|
731
|
+
}
|
|
732
|
+
}
|
|
733
|
+
section {
|
|
734
|
+
@apply flex flex-1 flex-col gap-1.5 leading-snug;
|
|
735
|
+
}
|
|
736
|
+
|
|
737
|
+
&[data-orientation='horizontal'] {
|
|
738
|
+
@apply flex-row items-center [&>label]:flex-auto has-[>section]:items-start has-[>section]:[&>[type=checkbox],[type=radio]]:mt-px [&_p]:text-balance;
|
|
739
|
+
}
|
|
740
|
+
}
|
|
741
|
+
.fieldset legend + p,
|
|
742
|
+
.field > p,
|
|
743
|
+
.field section > p {
|
|
744
|
+
@apply text-muted-foreground text-sm leading-normal font-normal [&>a:hover]:text-primary [&>a]:underline [&>a]:underline-offset-4;
|
|
745
|
+
}
|
|
746
|
+
.fieldset legend + p {
|
|
747
|
+
@apply -mt-1.5;
|
|
748
|
+
}
|
|
749
|
+
.field > p {
|
|
750
|
+
@apply last:mt-0 nth-last-2:-mt-1;
|
|
751
|
+
}
|
|
752
|
+
}
|
|
753
|
+
|
|
754
|
+
|
|
755
|
+
/* Input */
|
|
756
|
+
@layer components {
|
|
757
|
+
:is(.form, .field) input[type='text']:not(:is(.select [data-popover] > header input[role='combobox'], .command > header input, .dialog > * > header input)),
|
|
758
|
+
:is(.form, .field) input[type='email'],
|
|
759
|
+
:is(.form, .field) input[type='password'],
|
|
760
|
+
:is(.form, .field) input[type='number'],
|
|
761
|
+
:is(.form, .field) input[type='file'],
|
|
762
|
+
:is(.form, .field) input[type='tel'],
|
|
763
|
+
:is(.form, .field) input[type='url'],
|
|
764
|
+
:is(.form, .field) input[type='search']:not(:is(.select [data-popover] > header input[role='combobox'], .command > header input, .dialog > * > header input)),
|
|
765
|
+
:is(.form, .field) input[type='date'],
|
|
766
|
+
:is(.form, .field) input[type='datetime-local'],
|
|
767
|
+
:is(.form, .field) input[type='month'],
|
|
768
|
+
:is(.form, .field) input[type='week'],
|
|
769
|
+
:is(.form, .field) input[type='time'],
|
|
770
|
+
.input[type='text'],
|
|
771
|
+
.input[type='email'],
|
|
772
|
+
.input[type='password'],
|
|
773
|
+
.input[type='number'],
|
|
774
|
+
.input[type='file'],
|
|
775
|
+
.input[type='tel'],
|
|
776
|
+
.input[type='url'],
|
|
777
|
+
.input[type='search'],
|
|
778
|
+
.input[type='date'],
|
|
779
|
+
.input[type='datetime-local'],
|
|
780
|
+
.input[type='month'],
|
|
781
|
+
.input[type='week'],
|
|
782
|
+
.input[type='time'] {
|
|
783
|
+
@apply appearance-none file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input flex h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm;
|
|
784
|
+
@apply focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px];
|
|
785
|
+
@apply aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive;
|
|
786
|
+
}
|
|
787
|
+
}
|
|
788
|
+
|
|
789
|
+
|
|
790
|
+
/* Kbd */
|
|
791
|
+
@layer components {
|
|
792
|
+
.kbd {
|
|
793
|
+
@apply bg-muted text-muted-foreground pointer-events-none inline-flex h-5 w-fit min-w-5 items-center justify-center gap-1 rounded-sm px-1 font-sans text-xs font-medium select-none;
|
|
794
|
+
|
|
795
|
+
& svg:not([class*="size-"]) {
|
|
796
|
+
@apply size-3;
|
|
797
|
+
}
|
|
798
|
+
}
|
|
799
|
+
}
|
|
800
|
+
|
|
801
|
+
|
|
802
|
+
|
|
803
|
+
/* Label */
|
|
804
|
+
@layer components {
|
|
805
|
+
:is(.form, .field) label,
|
|
806
|
+
.label {
|
|
807
|
+
@apply flex items-center gap-2 text-sm leading-none font-medium select-none peer-disabled:pointer-events-none peer-disabled:opacity-50;
|
|
808
|
+
|
|
809
|
+
&:has(>*:disabled),
|
|
810
|
+
&:has(+*:disabled) {
|
|
811
|
+
@apply opacity-50 pointer-events-none;
|
|
812
|
+
}
|
|
813
|
+
}
|
|
814
|
+
}
|
|
815
|
+
|
|
816
|
+
|
|
817
|
+
/* Popover */
|
|
818
|
+
@layer components {
|
|
819
|
+
[data-popover] {
|
|
820
|
+
@apply absolute bg-popover text-popover-foreground overflow-x-hidden overflow-y-auto rounded-md border shadow-md z-50 visible opacity-100 scale-100 min-w-full w-max transition-all;
|
|
821
|
+
|
|
822
|
+
&[aria-hidden='true'] {
|
|
823
|
+
@apply invisible opacity-0 scale-95;
|
|
824
|
+
|
|
825
|
+
&:not([data-side]),
|
|
826
|
+
&[data-side='bottom'] {
|
|
827
|
+
@apply -translate-y-2;
|
|
828
|
+
}
|
|
829
|
+
&[data-side='top'] {
|
|
830
|
+
@apply translate-y-2;
|
|
831
|
+
}
|
|
832
|
+
&[data-side='left'] {
|
|
833
|
+
@apply translate-x-2;
|
|
834
|
+
}
|
|
835
|
+
&[data-side='right'] {
|
|
836
|
+
@apply -translate-x-2;
|
|
837
|
+
}
|
|
838
|
+
}
|
|
839
|
+
&:not([data-side]),
|
|
840
|
+
&[data-side='bottom'] {
|
|
841
|
+
@apply mt-1 top-full;
|
|
842
|
+
}
|
|
843
|
+
&[data-side='top'] {
|
|
844
|
+
@apply mb-1 bottom-full;
|
|
845
|
+
}
|
|
846
|
+
&[data-side='left'] {
|
|
847
|
+
@apply mr-1 right-full;
|
|
848
|
+
}
|
|
849
|
+
&[data-side='right'] {
|
|
850
|
+
@apply ml-1 left-full;
|
|
851
|
+
}
|
|
852
|
+
&:not([data-side]),
|
|
853
|
+
&[data-side='bottom'],
|
|
854
|
+
&[data-side='top'] {
|
|
855
|
+
&:not([data-align]),
|
|
856
|
+
&[data-align='start'] {
|
|
857
|
+
@apply left-0;
|
|
858
|
+
}
|
|
859
|
+
&[data-align='end'] {
|
|
860
|
+
@apply right-0;
|
|
861
|
+
}
|
|
862
|
+
&[data-align='center'] {
|
|
863
|
+
@apply left-1/2 -translate-x-1/2;
|
|
864
|
+
}
|
|
865
|
+
}
|
|
866
|
+
&[data-side='left'],
|
|
867
|
+
&[data-side='right'] {
|
|
868
|
+
&:not([data-align]),
|
|
869
|
+
&[data-align='start'] {
|
|
870
|
+
@apply top-0;
|
|
871
|
+
}
|
|
872
|
+
&[data-align='end'] {
|
|
873
|
+
@apply bottom-0;
|
|
874
|
+
}
|
|
875
|
+
&[data-align='center'] {
|
|
876
|
+
@apply top-1/2 -translate-y-1/2;
|
|
877
|
+
}
|
|
878
|
+
}
|
|
879
|
+
}
|
|
880
|
+
.popover {
|
|
881
|
+
@apply relative inline-flex;
|
|
882
|
+
|
|
883
|
+
[data-popover] {
|
|
884
|
+
@apply p-4;
|
|
885
|
+
}
|
|
886
|
+
}
|
|
887
|
+
}
|
|
888
|
+
|
|
889
|
+
|
|
890
|
+
/* Radio */
|
|
891
|
+
@layer components {
|
|
892
|
+
:is(.form, .field) input[type='radio'],
|
|
893
|
+
.input[type='radio'] {
|
|
894
|
+
@apply appearance-none border-input text-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 aspect-square size-4 shrink-0 rounded-full border shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 relative;
|
|
895
|
+
|
|
896
|
+
&:checked:before {
|
|
897
|
+
@apply absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 content-[''] rounded-full size-2 bg-primary;
|
|
898
|
+
}
|
|
899
|
+
}
|
|
900
|
+
}
|
|
901
|
+
|
|
902
|
+
|
|
903
|
+
/* Range */
|
|
904
|
+
@layer components {
|
|
905
|
+
:is(.form, .field) input[type='range'],
|
|
906
|
+
.input[type='range'],
|
|
907
|
+
.slider {
|
|
908
|
+
@apply appearance-none flex items-center p-0 outline-none;
|
|
909
|
+
--slider-value: 0%; /* Default value, updated by JS */
|
|
910
|
+
|
|
911
|
+
&:hover,
|
|
912
|
+
&:focus-visible {
|
|
913
|
+
&::-webkit-slider-thumb {
|
|
914
|
+
@apply ring-4 ring-ring/20 shadow-sm;
|
|
915
|
+
}
|
|
916
|
+
&::-moz-range-thumb {
|
|
917
|
+
@apply ring-4 ring-ring/20 shadow-sm;
|
|
918
|
+
}
|
|
919
|
+
&::-ms-thumb {
|
|
920
|
+
@apply ring-4 ring-ring/20 shadow-sm;
|
|
921
|
+
}
|
|
922
|
+
}
|
|
923
|
+
|
|
924
|
+
&::-webkit-slider-thumb {
|
|
925
|
+
@apply appearance-none block size-4 shrink-0 rounded-full border border-primary bg-background shadow-sm -mt-1.25 cursor-pointer transition-[box-shadow];
|
|
926
|
+
}
|
|
927
|
+
&::-webkit-slider-runnable-track {
|
|
928
|
+
@apply appearance-none rounded-full h-1.5 w-full cursor-pointer;
|
|
929
|
+
background: linear-gradient(to right, var(--primary) var(--slider-value), var(--muted) var(--slider-value));
|
|
930
|
+
}
|
|
931
|
+
|
|
932
|
+
&::-moz-range-thumb {
|
|
933
|
+
@apply appearance-none block size-4 shrink-0 rounded-full border border-primary bg-background shadow-sm -mt-1.25 cursor-pointer transition-[box-shadow];
|
|
934
|
+
}
|
|
935
|
+
&::-moz-range-track {
|
|
936
|
+
@apply appearance-none rounded-full h-1.5 w-full cursor-pointer;
|
|
937
|
+
background: linear-gradient(to right, var(--primary) var(--slider-value), var(--muted) var(--slider-value));
|
|
938
|
+
}
|
|
939
|
+
|
|
940
|
+
&::-ms-thumb {
|
|
941
|
+
@apply appearance-none block size-4 shrink-0 rounded-full border border-primary bg-background shadow-sm -mt-1.25 cursor-pointer transition-[box-shadow];
|
|
942
|
+
}
|
|
943
|
+
&::-ms-track {
|
|
944
|
+
@apply appearance-none rounded-full h-1.5 w-full cursor-pointer;
|
|
945
|
+
background: transparent;
|
|
946
|
+
border-color: transparent;
|
|
947
|
+
color: transparent;
|
|
948
|
+
}
|
|
949
|
+
&::-ms-fill-lower {
|
|
950
|
+
@apply bg-primary rounded-full;
|
|
951
|
+
}
|
|
952
|
+
&::-ms-fill-upper {
|
|
953
|
+
@apply bg-muted rounded-full;
|
|
954
|
+
}
|
|
955
|
+
}
|
|
956
|
+
}
|
|
957
|
+
|
|
958
|
+
|
|
959
|
+
/* Select */
|
|
960
|
+
@layer components {
|
|
961
|
+
:is(.form, .field) select,
|
|
962
|
+
select.select {
|
|
963
|
+
@apply appearance-none border-input focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 dark:hover:bg-input/50 flex w-fit items-center justify-between gap-2 rounded-md border bg-transparent pl-3 pr-9 py-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 h-9;
|
|
964
|
+
@apply bg-[image:var(--chevron-down-icon-50)] bg-no-repeat bg-position-[center_right_0.75rem] bg-size-[1rem];
|
|
965
|
+
|
|
966
|
+
option,
|
|
967
|
+
optgroup {
|
|
968
|
+
@apply bg-popover text-popover-foreground;
|
|
969
|
+
}
|
|
970
|
+
}
|
|
971
|
+
*:not(select).select {
|
|
972
|
+
@apply relative inline-flex;
|
|
973
|
+
|
|
974
|
+
[data-popover] {
|
|
975
|
+
@apply p-1;
|
|
976
|
+
|
|
977
|
+
[role='option'] {
|
|
978
|
+
@apply aria-hidden:hidden [&_svg]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm pl-2 py-1.5 pr-7.5 text-sm outline-hidden select-none [&_svg]:shrink-0 aria-disabled:opacity-50 aria-disabled:pointer-events-none disabled:opacity-50 disabled:pointer-events-none w-full truncate;
|
|
979
|
+
|
|
980
|
+
& svg:not([class*="size-"]) {
|
|
981
|
+
@apply size-4;
|
|
982
|
+
}
|
|
983
|
+
|
|
984
|
+
&[aria-selected='true'] {
|
|
985
|
+
@apply bg-[image:var(--check-icon)] bg-no-repeat bg-position-[center_right_0.5rem] bg-size-[0.875rem];
|
|
986
|
+
}
|
|
987
|
+
&.active,
|
|
988
|
+
&:focus-visible {
|
|
989
|
+
@apply bg-accent text-accent-foreground;
|
|
990
|
+
}
|
|
991
|
+
}
|
|
992
|
+
[role='listbox'] [role='heading'] {
|
|
993
|
+
@apply flex text-muted-foreground px-2 py-1.5 text-xs;
|
|
994
|
+
}
|
|
995
|
+
[role='listbox'] [role='group']:not(:has([role='option']:not([aria-hidden='true']))) {
|
|
996
|
+
@apply hidden;
|
|
997
|
+
}
|
|
998
|
+
[role='separator'] {
|
|
999
|
+
@apply border-border -mx-1 my-1;
|
|
1000
|
+
}
|
|
1001
|
+
> header {
|
|
1002
|
+
@apply flex h-9 items-center gap-2 border-b px-3 -mx-1 -mt-1 mb-1;
|
|
1003
|
+
|
|
1004
|
+
svg {
|
|
1005
|
+
@apply size-4 shrink-0 opacity-50;
|
|
1006
|
+
}
|
|
1007
|
+
input[role='combobox'] {
|
|
1008
|
+
@apply placeholder:text-muted-foreground flex h-10 flex-1 w-full rounded-md bg-transparent py-3 text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50 min-w-0;
|
|
1009
|
+
}
|
|
1010
|
+
}
|
|
1011
|
+
[role='listbox']:not(:has([data-value]:not([aria-hidden='true'])))::before {
|
|
1012
|
+
@apply flex items-center justify-center p-6 text-sm truncate;
|
|
1013
|
+
}
|
|
1014
|
+
[role='listbox'][data-empty]:not(:has([data-value]:not([aria-hidden='true'])))::before {
|
|
1015
|
+
@apply content-[attr(data-empty)];
|
|
1016
|
+
}
|
|
1017
|
+
[role='listbox']:not([data-empty]):not(:has([data-value]:not([aria-hidden='true'])))::before {
|
|
1018
|
+
@apply content-['No_results_found'];
|
|
1019
|
+
}
|
|
1020
|
+
}
|
|
1021
|
+
[data-popover]:has(> header input:not(:placeholder-shown)) [role='separator'] {
|
|
1022
|
+
@apply hidden;
|
|
1023
|
+
}
|
|
1024
|
+
&:not([data-select-initialized]) [data-popover] [role='option'] {
|
|
1025
|
+
@apply hover:bg-accent hover:text-accent-foreground;
|
|
1026
|
+
}
|
|
1027
|
+
}
|
|
1028
|
+
}
|
|
1029
|
+
|
|
1030
|
+
|
|
1031
|
+
/* Sidebar */
|
|
1032
|
+
@layer components {
|
|
1033
|
+
.sidebar {
|
|
1034
|
+
&:not([data-sidebar-initialized]) {
|
|
1035
|
+
@apply max-md:hidden;
|
|
1036
|
+
}
|
|
1037
|
+
&:not([aria-hidden]),
|
|
1038
|
+
&[aria-hidden=false] {
|
|
1039
|
+
@apply max-md:bg-black/50 max-md:fixed max-md:inset-0 max-md:z-40;
|
|
1040
|
+
}
|
|
1041
|
+
nav {
|
|
1042
|
+
@apply bg-sidebar text-sidebar-foreground flex flex-col w-(--sidebar-mobile-width) md:w-(--sidebar-width) fixed inset-y-0 z-50 transition-transform ease-in-out duration-300;
|
|
1043
|
+
}
|
|
1044
|
+
& + * {
|
|
1045
|
+
@apply transition-[margin] ease-in-out duration-300;
|
|
1046
|
+
}
|
|
1047
|
+
&:not([data-side]),
|
|
1048
|
+
&[data-side=left] {
|
|
1049
|
+
nav {
|
|
1050
|
+
@apply left-0 border-r;
|
|
1051
|
+
}
|
|
1052
|
+
& + * {
|
|
1053
|
+
@apply relative md:ml-(--sidebar-width);
|
|
1054
|
+
}
|
|
1055
|
+
&[aria-hidden=true] {
|
|
1056
|
+
nav {
|
|
1057
|
+
@apply -translate-x-full;
|
|
1058
|
+
}
|
|
1059
|
+
& + * {
|
|
1060
|
+
@apply md:ml-0;
|
|
1061
|
+
}
|
|
1062
|
+
}
|
|
1063
|
+
}
|
|
1064
|
+
&[data-side=right] {
|
|
1065
|
+
nav {
|
|
1066
|
+
@apply right-0 border-l;
|
|
1067
|
+
}
|
|
1068
|
+
& + * {
|
|
1069
|
+
@apply relative md:mr-(--sidebar-width);
|
|
1070
|
+
}
|
|
1071
|
+
&[aria-hidden=true] {
|
|
1072
|
+
nav {
|
|
1073
|
+
@apply translate-x-full;
|
|
1074
|
+
}
|
|
1075
|
+
& + * {
|
|
1076
|
+
@apply md:mr-0;
|
|
1077
|
+
}
|
|
1078
|
+
}
|
|
1079
|
+
}
|
|
1080
|
+
nav {
|
|
1081
|
+
> header,
|
|
1082
|
+
> footer {
|
|
1083
|
+
@apply flex flex-col gap-2 p-2;
|
|
1084
|
+
}
|
|
1085
|
+
[role=separator] {
|
|
1086
|
+
@apply border-sidebar-border mx-2 w-auto;
|
|
1087
|
+
}
|
|
1088
|
+
> section {
|
|
1089
|
+
@apply flex min-h-0 flex-1 flex-col gap-2 overflow-y-auto;
|
|
1090
|
+
|
|
1091
|
+
> [role=group] {
|
|
1092
|
+
@apply relative flex w-full min-w-0 flex-col p-2;
|
|
1093
|
+
}
|
|
1094
|
+
h3 {
|
|
1095
|
+
@apply text-sidebar-foreground/70 ring-sidebar-ring flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium outline-hidden transition-[margin,opacity] duration-200 ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0;
|
|
1096
|
+
}
|
|
1097
|
+
ul {
|
|
1098
|
+
@apply flex w-full min-w-0 flex-col gap-1;
|
|
1099
|
+
|
|
1100
|
+
li {
|
|
1101
|
+
@apply relative;
|
|
1102
|
+
|
|
1103
|
+
> a,
|
|
1104
|
+
> details > summary {
|
|
1105
|
+
@apply flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-hidden ring-sidebar-ring transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&[aria-current=page]]:bg-sidebar-accent [&[aria-current=page]]:font-medium [&[aria-current=page]]:text-sidebar-accent-foreground [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0;
|
|
1106
|
+
|
|
1107
|
+
&:not([data-variant]),
|
|
1108
|
+
&[data-variant=default] {
|
|
1109
|
+
@apply hover:bg-sidebar-accent hover:text-sidebar-accent-foreground;
|
|
1110
|
+
}
|
|
1111
|
+
&[data-variant=outline] {
|
|
1112
|
+
@apply bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))];
|
|
1113
|
+
}
|
|
1114
|
+
&:not([data-size]),
|
|
1115
|
+
&[data-size=default] {
|
|
1116
|
+
@apply h-8 text-sm;
|
|
1117
|
+
}
|
|
1118
|
+
&[data-size=sm] {
|
|
1119
|
+
@apply h-7 text-xs;
|
|
1120
|
+
}
|
|
1121
|
+
&[data-size=lg] {
|
|
1122
|
+
@apply h-12 text-sm group-data-[collapsible=icon]:p-0!;
|
|
1123
|
+
}
|
|
1124
|
+
}
|
|
1125
|
+
> details {
|
|
1126
|
+
&:not([open]) {
|
|
1127
|
+
> summary {
|
|
1128
|
+
&::after {
|
|
1129
|
+
@apply -rotate-90;
|
|
1130
|
+
}
|
|
1131
|
+
}
|
|
1132
|
+
}
|
|
1133
|
+
> summary {
|
|
1134
|
+
&::after {
|
|
1135
|
+
@apply content-[''] block size-3.5 bg-primary ml-auto transition-transform ease-linear;
|
|
1136
|
+
@apply mask-[image:var(--chevron-down-icon)] mask-size-[1rem] mask-no-repeat mask-center;
|
|
1137
|
+
}
|
|
1138
|
+
}
|
|
1139
|
+
&::details-content {
|
|
1140
|
+
@apply px-3.5;
|
|
1141
|
+
}
|
|
1142
|
+
}
|
|
1143
|
+
}
|
|
1144
|
+
ul {
|
|
1145
|
+
@apply border-sidebar-border flex min-w-0 translate-x-px flex-col gap-1 border-l px-2.5 py-0.5 w-full;
|
|
1146
|
+
}
|
|
1147
|
+
}
|
|
1148
|
+
}
|
|
1149
|
+
}
|
|
1150
|
+
}
|
|
1151
|
+
}
|
|
1152
|
+
|
|
1153
|
+
|
|
1154
|
+
/* Switch */
|
|
1155
|
+
@layer components {
|
|
1156
|
+
:is(.form, .field) input[type='checkbox'][role='switch'],
|
|
1157
|
+
.input[type='checkbox'][role='switch'] {
|
|
1158
|
+
@apply appearance-none focus-visible:border-ring focus-visible:ring-ring/50 inline-flex h-[1.15rem] w-8 shrink-0 items-center rounded-full border border-transparent shadow-xs transition-all outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50;
|
|
1159
|
+
@apply bg-input dark:bg-input/80 checked:bg-primary dark:checked:bg-primary;
|
|
1160
|
+
@apply before:content-[''] before:pointer-events-none before:block before:size-4 before:rounded-full before:ring-0 before:transition-all;
|
|
1161
|
+
@apply before:bg-background dark:before:bg-foreground;
|
|
1162
|
+
@apply dark:checked:before:bg-primary-foreground checked:before:ms-3.5;
|
|
1163
|
+
}
|
|
1164
|
+
}
|
|
1165
|
+
|
|
1166
|
+
|
|
1167
|
+
/* Tables */
|
|
1168
|
+
@layer components {
|
|
1169
|
+
.table {
|
|
1170
|
+
@apply w-full caption-bottom text-sm;
|
|
1171
|
+
thead {
|
|
1172
|
+
@apply [&_tr]:border-b;
|
|
1173
|
+
}
|
|
1174
|
+
tbody {
|
|
1175
|
+
@apply [&_tr:last-child]:border-0;
|
|
1176
|
+
}
|
|
1177
|
+
tfoot {
|
|
1178
|
+
@apply bg-muted/50 border-t font-medium [&>tr]:last:border-b-0;
|
|
1179
|
+
}
|
|
1180
|
+
tr {
|
|
1181
|
+
@apply hover:bg-muted/50 border-b transition-colors;
|
|
1182
|
+
}
|
|
1183
|
+
th {
|
|
1184
|
+
@apply text-foreground h-10 px-2 text-left align-middle font-medium whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px];
|
|
1185
|
+
}
|
|
1186
|
+
td {
|
|
1187
|
+
@apply p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px];
|
|
1188
|
+
}
|
|
1189
|
+
caption {
|
|
1190
|
+
@apply text-muted-foreground mt-4 text-sm;
|
|
1191
|
+
}
|
|
1192
|
+
}
|
|
1193
|
+
}
|
|
1194
|
+
|
|
1195
|
+
|
|
1196
|
+
/* Tabs */
|
|
1197
|
+
@layer components {
|
|
1198
|
+
.tabs {
|
|
1199
|
+
@apply flex flex-col gap-2;
|
|
1200
|
+
|
|
1201
|
+
[role='tablist'] {
|
|
1202
|
+
@apply bg-muted text-muted-foreground inline-flex h-9 w-fit items-center justify-center rounded-lg p-[3px];
|
|
1203
|
+
|
|
1204
|
+
[role='tab'] {
|
|
1205
|
+
@apply focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring text-foreground dark:text-muted-foreground inline-flex h-[calc(100%_-_1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:ring-[3px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0;
|
|
1206
|
+
|
|
1207
|
+
& svg:not([class*="size-"]) {
|
|
1208
|
+
@apply size-4;
|
|
1209
|
+
}
|
|
1210
|
+
|
|
1211
|
+
&[aria-selected='true'] {
|
|
1212
|
+
@apply bg-background dark:text-foreground dark:border-input dark:bg-input/30 shadow-sm;
|
|
1213
|
+
}
|
|
1214
|
+
}
|
|
1215
|
+
}
|
|
1216
|
+
[role='tabpanel'] {
|
|
1217
|
+
@apply flex-1 outline-none;
|
|
1218
|
+
}
|
|
1219
|
+
}
|
|
1220
|
+
}
|
|
1221
|
+
|
|
1222
|
+
|
|
1223
|
+
|
|
1224
|
+
/* Textarea */
|
|
1225
|
+
@layer components {
|
|
1226
|
+
:is(.form, .field) textarea,
|
|
1227
|
+
.textarea {
|
|
1228
|
+
@apply border-input placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 flex field-sizing-content min-h-16 w-full rounded-md border bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 md:text-sm;
|
|
1229
|
+
}
|
|
1230
|
+
}
|
|
1231
|
+
|
|
1232
|
+
|
|
1233
|
+
/* Toasts */
|
|
1234
|
+
@layer components {
|
|
1235
|
+
.toaster {
|
|
1236
|
+
@apply fixed bottom-0 p-4 pointer-events-none z-50 w-full sm:max-w-90 flex flex-col-reverse;
|
|
1237
|
+
|
|
1238
|
+
&:not([data-align]),
|
|
1239
|
+
&[data-align='end'] {
|
|
1240
|
+
@apply right-0;
|
|
1241
|
+
}
|
|
1242
|
+
&[data-align='start'] {
|
|
1243
|
+
@apply left-0;
|
|
1244
|
+
}
|
|
1245
|
+
&[data-align='center'] {
|
|
1246
|
+
@apply left-1/2 -translate-x-1/2;
|
|
1247
|
+
}
|
|
1248
|
+
.toast {
|
|
1249
|
+
@apply pointer-events-auto w-full mt-4 animate-[toast-up_0.3s_ease-in-out] grid grid-rows-[1fr] transition-[grid-template-rows,opacity,margin] duration-300 ease-in-out;
|
|
1250
|
+
|
|
1251
|
+
.toast-content {
|
|
1252
|
+
@apply text-popover-foreground text-[13px] bg-popover border shadow-lg rounded-lg overflow-hidden flex gap-2.5 p-3 items-center;
|
|
1253
|
+
|
|
1254
|
+
svg {
|
|
1255
|
+
@apply size-4 shrink-0;
|
|
1256
|
+
}
|
|
1257
|
+
section {
|
|
1258
|
+
h2 {
|
|
1259
|
+
@apply font-medium tracking-tight;
|
|
1260
|
+
}
|
|
1261
|
+
p {
|
|
1262
|
+
@apply text-muted-foreground break-all;
|
|
1263
|
+
}
|
|
1264
|
+
}
|
|
1265
|
+
footer {
|
|
1266
|
+
@apply ml-auto flex flex-col gap-2;
|
|
1267
|
+
|
|
1268
|
+
[data-toast-action],
|
|
1269
|
+
[data-toast-cancel] {
|
|
1270
|
+
@apply h-6 px-2.5 text-xs;
|
|
1271
|
+
}
|
|
1272
|
+
}
|
|
1273
|
+
}
|
|
1274
|
+
&[aria-hidden='true'] {
|
|
1275
|
+
@apply grid-rows-[0fr] opacity-0 m-0 border-0 p-0 overflow-hidden;
|
|
1276
|
+
|
|
1277
|
+
.toast-content {
|
|
1278
|
+
@apply border-0;
|
|
1279
|
+
}
|
|
1280
|
+
}
|
|
1281
|
+
}
|
|
1282
|
+
}
|
|
1283
|
+
}
|
|
1284
|
+
@keyframes toast-up {
|
|
1285
|
+
from {
|
|
1286
|
+
opacity: 0;
|
|
1287
|
+
transform: translateY(100%);
|
|
1288
|
+
}
|
|
1289
|
+
}
|
|
1290
|
+
|
|
1291
|
+
|
|
1292
|
+
/* Tooltip */
|
|
1293
|
+
@layer components {
|
|
1294
|
+
[data-tooltip] {
|
|
1295
|
+
@apply relative;
|
|
1296
|
+
|
|
1297
|
+
&:before {
|
|
1298
|
+
@apply absolute content-[attr(data-tooltip)] bg-primary text-primary-foreground z-[60] truncate max-w-xs w-fit rounded-md px-3 py-1.5 text-xs invisible opacity-0 scale-95 transition-all pointer-events-none;
|
|
1299
|
+
}
|
|
1300
|
+
&:hover:before {
|
|
1301
|
+
@apply visible opacity-100 scale-100;
|
|
1302
|
+
}
|
|
1303
|
+
&:focus-visible:not(:hover):before {
|
|
1304
|
+
@apply hidden;
|
|
1305
|
+
}
|
|
1306
|
+
&:not([data-side]),
|
|
1307
|
+
&[data-side='top'] {
|
|
1308
|
+
@apply before:bottom-full before:mb-1.5 before:translate-y-2 hover:before:translate-y-0 ;
|
|
1309
|
+
}
|
|
1310
|
+
&[data-side='bottom'] {
|
|
1311
|
+
@apply before:top-full before:mt-1.5 before:-translate-y-2 hover:before:translate-y-0 ;
|
|
1312
|
+
}
|
|
1313
|
+
&:not([data-side]),
|
|
1314
|
+
&[data-side='top'],
|
|
1315
|
+
&[data-side='bottom'] {
|
|
1316
|
+
&[data-align='start'] {
|
|
1317
|
+
@apply before:left-0;
|
|
1318
|
+
}
|
|
1319
|
+
&[data-align='end'] {
|
|
1320
|
+
@apply before:right-0;
|
|
1321
|
+
}
|
|
1322
|
+
&:not([data-align]),
|
|
1323
|
+
&[data-align='center'] {
|
|
1324
|
+
@apply before:left-1/2 before:-translate-x-1/2;
|
|
1325
|
+
}
|
|
1326
|
+
}
|
|
1327
|
+
&[data-side='left'] {
|
|
1328
|
+
@apply before:right-full before:mr-1.5 before:translate-x-2 hover:before:translate-x-0;
|
|
1329
|
+
}
|
|
1330
|
+
&[data-side='right'] {
|
|
1331
|
+
@apply before:left-full before:ml-1.5 before:-translate-x-2 hover:before:translate-x-0;
|
|
1332
|
+
}
|
|
1333
|
+
&[data-side='left'],
|
|
1334
|
+
&[data-side='right'] {
|
|
1335
|
+
&[data-align='start'] {
|
|
1336
|
+
@apply before:top-0;
|
|
1337
|
+
}
|
|
1338
|
+
&[data-align='end'] {
|
|
1339
|
+
@apply before:bottom-0;
|
|
1340
|
+
}
|
|
1341
|
+
&:not([data-align]),
|
|
1342
|
+
&[data-align='center'] {
|
|
1343
|
+
@apply before:top-1/2 before:-translate-y-1/2;
|
|
1344
|
+
}
|
|
1345
|
+
}
|
|
1346
|
+
}
|
|
1347
|
+
}
|
|
1348
|
+
|
|
1349
|
+
|
|
1350
|
+
|
|
1351
|
+
/* 3. Custom Components (New additions) */
|
|
1352
|
+
/* Carousel */
|
|
1353
|
+
@layer components {
|
|
1354
|
+
.carousel {
|
|
1355
|
+
@apply relative w-full;
|
|
1356
|
+
}
|
|
1357
|
+
.carousel-content {
|
|
1358
|
+
@apply flex overflow-x-auto snap-x snap-mandatory scroll-smooth;
|
|
1359
|
+
scrollbar-width: none; /* Hide scrollbar for Firefox */
|
|
1360
|
+
&::-webkit-scrollbar {
|
|
1361
|
+
display: none; /* Hide scrollbar for Chrome, Safari, and Opera */
|
|
1362
|
+
}
|
|
1363
|
+
}
|
|
1364
|
+
.carousel-item {
|
|
1365
|
+
@apply min-w-0 shrink-0 grow-0 basis-full snap-start;
|
|
1366
|
+
}
|
|
1367
|
+
.carousel-previous,
|
|
1368
|
+
.carousel-next {
|
|
1369
|
+
@apply absolute size-8 rounded-full z-10 flex items-center justify-center border bg-background shadow-sm transition-all hover:bg-accent hover:text-accent-foreground disabled:opacity-50 disabled:pointer-events-none;
|
|
1370
|
+
& > svg {
|
|
1371
|
+
@apply size-4;
|
|
1372
|
+
}
|
|
1373
|
+
}
|
|
1374
|
+
.carousel-previous {
|
|
1375
|
+
@apply -left-12 top-1/2 -translate-y-1/2;
|
|
1376
|
+
}
|
|
1377
|
+
.carousel-next {
|
|
1378
|
+
@apply -right-12 top-1/2 -translate-y-1/2;
|
|
1379
|
+
}
|
|
1380
|
+
|
|
1381
|
+
/* Vertical Carousel */
|
|
1382
|
+
.carousel[data-orientation="vertical"] {
|
|
1383
|
+
.carousel-content {
|
|
1384
|
+
@apply flex-col overflow-x-hidden overflow-y-auto snap-y;
|
|
1385
|
+
height: var(--carousel-height, 400px); /* Default height */
|
|
1386
|
+
}
|
|
1387
|
+
.carousel-previous {
|
|
1388
|
+
@apply -top-8 left-1/2 -translate-x-1/2 rotate-90 translate-y-0;
|
|
1389
|
+
top: -2rem !important; /* Force top */
|
|
1390
|
+
}
|
|
1391
|
+
.carousel-next {
|
|
1392
|
+
@apply -bottom-8 top-auto left-1/2 -translate-x-1/2 rotate-90 translate-y-0;
|
|
1393
|
+
bottom: -2rem !important; /* Force bottom */
|
|
1394
|
+
top: auto !important;
|
|
1395
|
+
}
|
|
1396
|
+
}
|
|
1397
|
+
}
|
|
1398
|
+
|
|
1399
|
+
/* Input OTP */
|
|
1400
|
+
@layer components {
|
|
1401
|
+
.input-otp {
|
|
1402
|
+
@apply flex items-center gap-2 has-[:disabled]:opacity-50;
|
|
1403
|
+
}
|
|
1404
|
+
.input-otp-group {
|
|
1405
|
+
@apply flex items-center;
|
|
1406
|
+
|
|
1407
|
+
.input {
|
|
1408
|
+
@apply w-10 h-10 text-center text-lg p-0 rounded-none first:rounded-l-md last:rounded-r-md border-r-0 last:border-r focus:z-10 relative;
|
|
1409
|
+
}
|
|
1410
|
+
}
|
|
1411
|
+
}
|
|
1412
|
+
|
|
1413
|
+
/* Sheet & Drawer */
|
|
1414
|
+
@layer components {
|
|
1415
|
+
.sheet {
|
|
1416
|
+
@apply fixed inset-0 z-50 bg-black/80;
|
|
1417
|
+
|
|
1418
|
+
&[aria-hidden="true"] {
|
|
1419
|
+
@apply hidden;
|
|
1420
|
+
}
|
|
1421
|
+
|
|
1422
|
+
.sheet-content {
|
|
1423
|
+
@apply fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out duration-300;
|
|
1424
|
+
|
|
1425
|
+
&[data-side="top"] {
|
|
1426
|
+
@apply inset-x-0 top-0 border-b data-[state=closed]:-translate-y-full data-[state=open]:translate-y-0;
|
|
1427
|
+
}
|
|
1428
|
+
&[data-side="bottom"] {
|
|
1429
|
+
@apply inset-x-0 bottom-0 border-t data-[state=closed]:translate-y-full data-[state=open]:translate-y-0;
|
|
1430
|
+
}
|
|
1431
|
+
&[data-side="left"] {
|
|
1432
|
+
@apply inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm data-[state=closed]:-translate-x-full data-[state=open]:translate-x-0;
|
|
1433
|
+
}
|
|
1434
|
+
&[data-side="right"] {
|
|
1435
|
+
@apply inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm data-[state=closed]:translate-x-full data-[state=open]:translate-x-0;
|
|
1436
|
+
}
|
|
1437
|
+
}
|
|
1438
|
+
}
|
|
1439
|
+
|
|
1440
|
+
.drawer {
|
|
1441
|
+
@apply fixed inset-0 z-50 bg-black/80 flex flex-col items-end sm:items-center justify-end;
|
|
1442
|
+
|
|
1443
|
+
&[aria-hidden="true"] {
|
|
1444
|
+
@apply hidden;
|
|
1445
|
+
}
|
|
1446
|
+
|
|
1447
|
+
.drawer-content {
|
|
1448
|
+
@apply fixed z-50 flex flex-col bg-background border border-b-0 rounded-t-[10px] bottom-0 inset-x-0 h-auto max-h-[35vh] transition-transform ease-in-out duration-300 data-[state=closed]:translate-y-full data-[state=open]:translate-y-0;
|
|
1449
|
+
}
|
|
1450
|
+
}
|
|
1451
|
+
}
|
|
1452
|
+
|
|
1453
|
+
/*
|
|
1454
|
+
========================================
|
|
1455
|
+
ANIMATIONS & KEYFRAMES
|
|
1456
|
+
Spring effects for Drawer and Sheet
|
|
1457
|
+
========================================
|
|
1458
|
+
*/
|
|
1459
|
+
@layer utilities {
|
|
1460
|
+
/* Spring Bezier: Starts fast, overshoots slightly (1.1), then settles */
|
|
1461
|
+
.ease-spring {
|
|
1462
|
+
transition-timing-function: cubic-bezier(0.175, 0.885, 0.32, 1.1);
|
|
1463
|
+
}
|
|
1464
|
+
}
|
|
1465
|
+
|
|
1466
|
+
@layer components {
|
|
1467
|
+
/* Keyframes for Slide Animations (Drawer, Sheet, etc.) */
|
|
1468
|
+
@keyframes spring-slide-up {
|
|
1469
|
+
0% { transform: translateY(100%); }
|
|
1470
|
+
70% { transform: translateY(-10%); } /* Overshoot up */
|
|
1471
|
+
100% { transform: translateY(0); }
|
|
1472
|
+
}
|
|
1473
|
+
|
|
1474
|
+
@keyframes spring-slide-down {
|
|
1475
|
+
0% { transform: translateY(-100%); }
|
|
1476
|
+
70% { transform: translateY(10%); } /* Overshoot down */
|
|
1477
|
+
100% { transform: translateY(0); }
|
|
1478
|
+
}
|
|
1479
|
+
|
|
1480
|
+
@keyframes spring-slide-from-right {
|
|
1481
|
+
0% { transform: translateX(100%); }
|
|
1482
|
+
70% { transform: translateX(-2%); } /* Overshoot left */
|
|
1483
|
+
100% { transform: translateX(0); }
|
|
1484
|
+
}
|
|
1485
|
+
|
|
1486
|
+
@keyframes spring-slide-from-left {
|
|
1487
|
+
0% { transform: translateX(-100%); }
|
|
1488
|
+
70% { transform: translateX(2%); } /* Overshoot right */
|
|
1489
|
+
100% { transform: translateX(0); }
|
|
1490
|
+
}
|
|
1491
|
+
|
|
1492
|
+
/* Drawer Animation (Bottom Sheet) */
|
|
1493
|
+
.drawer:not(.no-animation)[aria-hidden="false"] .drawer-content {
|
|
1494
|
+
animation: spring-slide-up 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.1) forwards;
|
|
1495
|
+
}
|
|
1496
|
+
|
|
1497
|
+
/* Sheet Animation (Side Panel) */
|
|
1498
|
+
.sheet:not(.no-animation)[aria-hidden="false"] {
|
|
1499
|
+
.sheet-content[data-side="right"] {
|
|
1500
|
+
animation: spring-slide-from-right 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.1) forwards;
|
|
1501
|
+
}
|
|
1502
|
+
.sheet-content[data-side="left"] {
|
|
1503
|
+
animation: spring-slide-from-left 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.1) forwards;
|
|
1504
|
+
}
|
|
1505
|
+
.sheet-content[data-side="top"] {
|
|
1506
|
+
animation: spring-slide-down 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.1) forwards;
|
|
1507
|
+
}
|
|
1508
|
+
.sheet-content[data-side="bottom"] {
|
|
1509
|
+
animation: spring-slide-up 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.1) forwards;
|
|
1510
|
+
}
|
|
1511
|
+
}
|
|
1512
|
+
}
|
|
1513
|
+
/* Toggle Group */
|
|
1514
|
+
@layer components {
|
|
1515
|
+
.toggle-group {
|
|
1516
|
+
@apply flex items-center justify-center gap-1;
|
|
1517
|
+
|
|
1518
|
+
&[data-orientation="vertical"] {
|
|
1519
|
+
@apply flex-col;
|
|
1520
|
+
}
|
|
1521
|
+
|
|
1522
|
+
/* Merged style (like button-group) */
|
|
1523
|
+
&:not([data-variant="outline"]) {
|
|
1524
|
+
gap: 0;
|
|
1525
|
+
|
|
1526
|
+
.toggle {
|
|
1527
|
+
@apply rounded-none border-l-0 first:rounded-l-md first:border-l last:rounded-r-md focus:z-10;
|
|
1528
|
+
}
|
|
1529
|
+
&[data-orientation="vertical"] .toggle {
|
|
1530
|
+
@apply rounded-none border-t-0 first:rounded-t-md first:border-t last:rounded-b-md;
|
|
1531
|
+
}
|
|
1532
|
+
}
|
|
1533
|
+
}
|
|
1534
|
+
|
|
1535
|
+
/* Toggle Button (Base Style) */
|
|
1536
|
+
.toggle {
|
|
1537
|
+
@apply inline-flex items-center justify-center rounded-md text-sm font-medium ring-offset-background transition-colors hover:bg-muted hover:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground bg-transparent dark:bg-transparent h-10 px-3 min-w-10 border border-input;
|
|
1538
|
+
|
|
1539
|
+
/* Enhanced Active State */
|
|
1540
|
+
&[aria-pressed="true"] {
|
|
1541
|
+
@apply bg-accent text-accent-foreground border-accent;
|
|
1542
|
+
}
|
|
1543
|
+
}
|
|
1544
|
+
}
|
|
1545
|
+
|
|
1546
|
+
|
|
1547
|
+
/* 4. Extensions & Overrides */
|
|
1548
|
+
/*
|
|
1549
|
+
========================================
|
|
1550
|
+
BASECOAT NEUMORPHISM EXTENSION
|
|
1551
|
+
========================================
|
|
1552
|
+
Global adaptive lighting system.
|
|
1553
|
+
*/
|
|
1554
|
+
|
|
1555
|
+
@layer components {
|
|
1556
|
+
:root {
|
|
1557
|
+
/* Global Light Coordinates (Updated by JS) */
|
|
1558
|
+
--light-x: -8px;
|
|
1559
|
+
--light-y: -8px;
|
|
1560
|
+
|
|
1561
|
+
/* Shape Factors */
|
|
1562
|
+
--neu-radius: 24px;
|
|
1563
|
+
--neu-blur: 20px;
|
|
1564
|
+
|
|
1565
|
+
/* Color Logic - Light Mode (Default) */
|
|
1566
|
+
--neu-highlight-color: color-mix(in srgb, white, transparent 10%);
|
|
1567
|
+
--neu-shadow-color: rgba(0, 0, 0, 0.15);
|
|
1568
|
+
|
|
1569
|
+
/* Shine Color: Light Mode uses a subtle dark sweep (via foreground) for visibility on white */
|
|
1570
|
+
--neu-shine-color: color-mix(in srgb, var(--foreground), transparent 90%);
|
|
1571
|
+
}
|
|
1572
|
+
|
|
1573
|
+
/* Dark Mode Adaptation */
|
|
1574
|
+
:root.dark {
|
|
1575
|
+
--neu-highlight-color: rgba(255, 255, 255, 0.12);
|
|
1576
|
+
--neu-shadow-color: rgba(0, 0, 0, 0.5);
|
|
1577
|
+
|
|
1578
|
+
/* Shine Color: Dark Mode uses white sweep */
|
|
1579
|
+
--neu-shine-color: rgba(255, 255, 255, 0.1);
|
|
1580
|
+
}
|
|
1581
|
+
|
|
1582
|
+
/*
|
|
1583
|
+
Panel / Container (Convex)
|
|
1584
|
+
Applies an outer shadow to simulate a raised surface.
|
|
1585
|
+
*/
|
|
1586
|
+
.neu-panel {
|
|
1587
|
+
@apply bg-background text-foreground transition-colors duration-300 ease-out;
|
|
1588
|
+
border-radius: var(--neu-radius);
|
|
1589
|
+
border: 1px solid color-mix(in srgb, var(--foreground), transparent 97%);
|
|
1590
|
+
|
|
1591
|
+
box-shadow:
|
|
1592
|
+
calc(var(--light-x) * -1) calc(var(--light-y) * -1) var(--neu-blur) var(--neu-shadow-color),
|
|
1593
|
+
var(--light-x) var(--light-y) var(--neu-blur) var(--neu-highlight-color);
|
|
1594
|
+
}
|
|
1595
|
+
|
|
1596
|
+
/*
|
|
1597
|
+
Field / Input (Concave)
|
|
1598
|
+
Applies an inner shadow to simulate a recessed surface.
|
|
1599
|
+
*/
|
|
1600
|
+
.neu-field {
|
|
1601
|
+
@apply bg-background text-foreground transition-all duration-200 border-none outline-none;
|
|
1602
|
+
border-radius: 12px;
|
|
1603
|
+
|
|
1604
|
+
box-shadow:
|
|
1605
|
+
inset calc(var(--light-x) * -1) calc(var(--light-y) * -1) 12px var(--neu-shadow-color),
|
|
1606
|
+
inset var(--light-x) var(--light-y) 12px var(--neu-highlight-color);
|
|
1607
|
+
|
|
1608
|
+
&:focus {
|
|
1609
|
+
@apply text-primary;
|
|
1610
|
+
box-shadow:
|
|
1611
|
+
inset calc(var(--light-x) * -0.5) calc(var(--light-y) * -0.5) 8px var(--neu-shadow-color),
|
|
1612
|
+
inset var(--light-x) var(--light-y) 8px var(--neu-highlight-color);
|
|
1613
|
+
}
|
|
1614
|
+
}
|
|
1615
|
+
|
|
1616
|
+
/*
|
|
1617
|
+
Button (Convex + Interactive)
|
|
1618
|
+
Simulates a raised button that presses down (becomes concave/flat) on active.
|
|
1619
|
+
*/
|
|
1620
|
+
.neu-btn {
|
|
1621
|
+
@apply bg-background text-foreground font-semibold cursor-pointer transition-all duration-100 border-none;
|
|
1622
|
+
border-radius: 12px;
|
|
1623
|
+
|
|
1624
|
+
box-shadow:
|
|
1625
|
+
calc(var(--light-x) * -1) calc(var(--light-y) * -1) 16px var(--neu-shadow-color),
|
|
1626
|
+
var(--light-x) var(--light-y) 16px var(--neu-highlight-color);
|
|
1627
|
+
|
|
1628
|
+
&:hover {
|
|
1629
|
+
@apply text-primary -translate-y-0.5;
|
|
1630
|
+
box-shadow:
|
|
1631
|
+
calc(var(--light-x) * -1.2) calc(var(--light-y) * -1.2) 20px var(--neu-shadow-color),
|
|
1632
|
+
calc(var(--light-x) * 1.2) calc(var(--light-y) * 1.2) 20px var(--neu-highlight-color);
|
|
1633
|
+
}
|
|
1634
|
+
|
|
1635
|
+
&:active, &.neu-pressed {
|
|
1636
|
+
@apply translate-y-0 bg-background;
|
|
1637
|
+
box-shadow:
|
|
1638
|
+
inset 4px 4px 8px var(--neu-shadow-color),
|
|
1639
|
+
inset -4px -4px 8px var(--neu-highlight-color);
|
|
1640
|
+
}
|
|
1641
|
+
}
|
|
1642
|
+
|
|
1643
|
+
/* Utility: Round Shape */
|
|
1644
|
+
.neu-round {
|
|
1645
|
+
@apply rounded-full flex items-center justify-center aspect-square;
|
|
1646
|
+
}
|
|
1647
|
+
|
|
1648
|
+
/*
|
|
1649
|
+
Effect: Shine (流光)
|
|
1650
|
+
Restored: Uses a "light beam" gradient that sweeps across.
|
|
1651
|
+
Technique: Uses ::after with inset:0 and border-radius:inherit to mask the shine
|
|
1652
|
+
without requiring overflow:hidden on the parent (which breaks Tooltips).
|
|
1653
|
+
*/
|
|
1654
|
+
.effect-shine,
|
|
1655
|
+
.btn:not(.btn-link):not(:disabled):not(.no-shine),
|
|
1656
|
+
.neu-btn:not(:disabled):not(.no-shine),
|
|
1657
|
+
.toggle:not(:disabled):not(.no-shine),
|
|
1658
|
+
[role="tab"]:not([aria-selected="true"]):not(:disabled):not(.no-shine),
|
|
1659
|
+
.carousel-previous:not(:disabled):not(.no-shine),
|
|
1660
|
+
.carousel-next:not(:disabled):not(.no-shine) {
|
|
1661
|
+
/* Removed @apply relative to prevent overriding absolute positioning on carousel buttons */
|
|
1662
|
+
|
|
1663
|
+
&::after {
|
|
1664
|
+
content: '';
|
|
1665
|
+
@apply absolute inset-0 z-10 pointer-events-none;
|
|
1666
|
+
border-radius: inherit;
|
|
1667
|
+
|
|
1668
|
+
/*
|
|
1669
|
+
The "Beam" Shine (Restored)
|
|
1670
|
+
- 90deg gradient (vertical lines)
|
|
1671
|
+
- Uses currentColor mix as per original
|
|
1672
|
+
- Simulates the 'left' transition using background-position
|
|
1673
|
+
*/
|
|
1674
|
+
background: linear-gradient(
|
|
1675
|
+
90deg,
|
|
1676
|
+
transparent,
|
|
1677
|
+
color-mix(in srgb, currentColor, transparent 90%),
|
|
1678
|
+
transparent
|
|
1679
|
+
);
|
|
1680
|
+
background-size: 50% 100%; /* The beam width */
|
|
1681
|
+
background-repeat: no-repeat;
|
|
1682
|
+
background-position: -100% 0; /* Start off-left */
|
|
1683
|
+
transition: background-position 0.5s ease-in-out;
|
|
1684
|
+
}
|
|
1685
|
+
|
|
1686
|
+
&:hover::after {
|
|
1687
|
+
background-position: 200% 0; /* Slide to off-right */
|
|
1688
|
+
}
|
|
1689
|
+
}
|
|
1690
|
+
|
|
1691
|
+
/*
|
|
1692
|
+
Effect: Lift (上浮)
|
|
1693
|
+
Excluded for Tabs as requested.
|
|
1694
|
+
Excluded Carousel buttons to avoid conflict with absolute centering transform.
|
|
1695
|
+
*/
|
|
1696
|
+
.effect-lift,
|
|
1697
|
+
.btn:not(.btn-link):not(:disabled):not(.no-lift),
|
|
1698
|
+
.neu-btn:not(:disabled):not(.no-lift),
|
|
1699
|
+
.toggle:not(:disabled):not(.no-lift) {
|
|
1700
|
+
@apply transition-transform duration-200 ease-out will-change-transform;
|
|
1701
|
+
|
|
1702
|
+
&:hover {
|
|
1703
|
+
@apply -translate-y-0.5;
|
|
1704
|
+
}
|
|
1705
|
+
|
|
1706
|
+
&:active {
|
|
1707
|
+
@apply translate-y-0;
|
|
1708
|
+
}
|
|
1709
|
+
}
|
|
1710
|
+
|
|
1711
|
+
/*
|
|
1712
|
+
Pattern: Floating Label Group
|
|
1713
|
+
Requires: <div class="neu-floating-group"><input placeholder=" "><label>...</label></div>
|
|
1714
|
+
Uses pure CSS (:placeholder-shown) to toggle label position.
|
|
1715
|
+
*/
|
|
1716
|
+
.neu-floating-group {
|
|
1717
|
+
@apply relative w-full;
|
|
1718
|
+
|
|
1719
|
+
input {
|
|
1720
|
+
/* Increase height and padding to make room for the label */
|
|
1721
|
+
@apply w-full h-14 pt-6 pb-2 px-4;
|
|
1722
|
+
|
|
1723
|
+
/* Ensure placeholder is hidden (opacity 0) but present for the selector to work */
|
|
1724
|
+
&::placeholder {
|
|
1725
|
+
@apply text-transparent;
|
|
1726
|
+
}
|
|
1727
|
+
}
|
|
1728
|
+
|
|
1729
|
+
label {
|
|
1730
|
+
@apply absolute left-4 top-1/2 -translate-y-1/2 text-muted-foreground transition-all duration-200 ease-out pointer-events-none;
|
|
1731
|
+
}
|
|
1732
|
+
|
|
1733
|
+
/*
|
|
1734
|
+
State: Focused OR Not Placeholder Shown (Has Content)
|
|
1735
|
+
Move label to top.
|
|
1736
|
+
*/
|
|
1737
|
+
input:focus + label,
|
|
1738
|
+
input:not(:placeholder-shown) + label {
|
|
1739
|
+
@apply top-4 -translate-y-1/2 text-xs font-medium;
|
|
1740
|
+
}
|
|
1741
|
+
|
|
1742
|
+
/* Active Highlight Color */
|
|
1743
|
+
input:focus + label {
|
|
1744
|
+
@apply text-primary;
|
|
1745
|
+
}
|
|
1746
|
+
}
|
|
1747
|
+
|
|
1748
|
+
/*
|
|
1749
|
+
Pattern: 3D Flip (Checkbox Hack)
|
|
1750
|
+
Allows a card to flip 180deg without JavaScript.
|
|
1751
|
+
|
|
1752
|
+
Structure:
|
|
1753
|
+
<div class="neu-flip-container [neu-flip-vertical]">
|
|
1754
|
+
<input type="checkbox" class="neu-flip-toggle" id="flip-id">
|
|
1755
|
+
<div class="neu-flip-inner">
|
|
1756
|
+
<div class="neu-flip-face">Front Content</div>
|
|
1757
|
+
<div class="neu-flip-face neu-flip-back">Back Content</div>
|
|
1758
|
+
</div>
|
|
1759
|
+
</div>
|
|
1760
|
+
*/
|
|
1761
|
+
.neu-flip-container {
|
|
1762
|
+
perspective: 1000px;
|
|
1763
|
+
}
|
|
1764
|
+
|
|
1765
|
+
.neu-flip-toggle {
|
|
1766
|
+
@apply hidden;
|
|
1767
|
+
}
|
|
1768
|
+
|
|
1769
|
+
.neu-flip-inner {
|
|
1770
|
+
@apply relative w-full h-full transition-transform duration-700 ease-in-out;
|
|
1771
|
+
transform-style: preserve-3d;
|
|
1772
|
+
}
|
|
1773
|
+
|
|
1774
|
+
.neu-flip-face {
|
|
1775
|
+
@apply absolute inset-0 backface-hidden;
|
|
1776
|
+
backface-visibility: hidden;
|
|
1777
|
+
-webkit-backface-visibility: hidden;
|
|
1778
|
+
}
|
|
1779
|
+
|
|
1780
|
+
/* Default Horizontal Flip (Rotate Y) */
|
|
1781
|
+
.neu-flip-back {
|
|
1782
|
+
transform: rotateY(180deg);
|
|
1783
|
+
}
|
|
1784
|
+
.neu-flip-toggle:checked ~ .neu-flip-inner {
|
|
1785
|
+
transform: rotateY(180deg);
|
|
1786
|
+
}
|
|
1787
|
+
|
|
1788
|
+
/* Vertical Flip Variant (Rotate X) */
|
|
1789
|
+
.neu-flip-container.neu-flip-vertical {
|
|
1790
|
+
.neu-flip-back {
|
|
1791
|
+
transform: rotateX(180deg);
|
|
1792
|
+
}
|
|
1793
|
+
.neu-flip-toggle:checked ~ .neu-flip-inner {
|
|
1794
|
+
transform: rotateX(180deg);
|
|
1795
|
+
}
|
|
1796
|
+
}
|
|
1797
|
+
}
|