@snowluma/ui 1.8.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/dist/index.js ADDED
@@ -0,0 +1,759 @@
1
+ import { clsx } from 'clsx';
2
+ import { twMerge } from 'tailwind-merge';
3
+ import * as React11 from 'react';
4
+ import { Slot } from '@radix-ui/react-slot';
5
+ import { cva } from 'class-variance-authority';
6
+ import { jsx, jsxs } from 'react/jsx-runtime';
7
+ import * as AlertDialogPrimitive from '@radix-ui/react-alert-dialog';
8
+ import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
9
+ import { Minus, Check, X, ChevronDown, ChevronUp } from 'lucide-react';
10
+ import * as DialogPrimitive from '@radix-ui/react-dialog';
11
+ import * as LabelPrimitive from '@radix-ui/react-label';
12
+ import * as ScrollAreaPrimitive from '@radix-ui/react-scroll-area';
13
+ import * as SelectPrimitive from '@radix-ui/react-select';
14
+ import * as SeparatorPrimitive from '@radix-ui/react-separator';
15
+ import * as SwitchPrimitive from '@radix-ui/react-switch';
16
+ import * as TabsPrimitive from '@radix-ui/react-tabs';
17
+ import { Toaster as Toaster$1 } from 'sonner';
18
+ export { toast } from 'sonner';
19
+ import * as TooltipPrimitive from '@radix-ui/react-tooltip';
20
+ import * as PopoverPrimitive from '@radix-ui/react-popover';
21
+
22
+ // src/lib/cn.ts
23
+ function cn(...inputs) {
24
+ return twMerge(clsx(inputs));
25
+ }
26
+ var buttonVariants = cva(
27
+ [
28
+ "inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-lg text-sm font-medium",
29
+ "transition-[color,background-color,border-color,box-shadow,transform] duration-150 ease-out",
30
+ "disabled:pointer-events-none disabled:opacity-50",
31
+ "[&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0",
32
+ "outline-none focus-visible:ring-[3px] focus-visible:ring-ring/40 focus-visible:border-ring",
33
+ "active:translate-y-px cursor-pointer"
34
+ ].join(" "),
35
+ {
36
+ variants: {
37
+ variant: {
38
+ default: "bg-primary text-primary-foreground shadow-sm hover:bg-primary/90 active:bg-primary/95",
39
+ destructive: "bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90 active:bg-destructive/95",
40
+ outline: "border border-border bg-card text-foreground shadow-xs hover:bg-accent hover:text-accent-foreground hover:border-border/80",
41
+ secondary: "bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80",
42
+ ghost: "text-foreground hover:bg-accent hover:text-accent-foreground",
43
+ link: "text-primary underline-offset-4 hover:underline shadow-none",
44
+ success: "bg-success text-success-foreground shadow-sm hover:bg-success/90",
45
+ warning: "bg-warning text-warning-foreground shadow-sm hover:bg-warning/90"
46
+ },
47
+ size: {
48
+ default: "h-9 px-4 py-2",
49
+ sm: "h-8 rounded-md px-3 text-xs",
50
+ lg: "h-10 rounded-lg px-6",
51
+ icon: "size-9 rounded-lg",
52
+ "icon-sm": "size-8 rounded-md",
53
+ "icon-xs": "size-7 rounded-md"
54
+ }
55
+ },
56
+ defaultVariants: { variant: "default", size: "default" }
57
+ }
58
+ );
59
+ var Button = React11.forwardRef(
60
+ ({ className, variant, size, asChild = false, ...props }, ref) => {
61
+ const Comp = asChild ? Slot : "button";
62
+ return /* @__PURE__ */ jsx(Comp, { className: cn(buttonVariants({ variant, size }), className), ref, ...props });
63
+ }
64
+ );
65
+ Button.displayName = "Button";
66
+ var AlertDialog = AlertDialogPrimitive.Root;
67
+ var AlertDialogTrigger = AlertDialogPrimitive.Trigger;
68
+ var AlertDialogPortal = AlertDialogPrimitive.Portal;
69
+ var AlertDialogOverlay = React11.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
70
+ AlertDialogPrimitive.Overlay,
71
+ {
72
+ ref,
73
+ className: cn(
74
+ "fixed inset-0 z-50 bg-background/60 backdrop-blur-sm",
75
+ "data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
76
+ className
77
+ ),
78
+ ...props
79
+ }
80
+ ));
81
+ AlertDialogOverlay.displayName = "AlertDialogOverlay";
82
+ var AlertDialogContent = React11.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxs(AlertDialogPortal, { children: [
83
+ /* @__PURE__ */ jsx(AlertDialogOverlay, {}),
84
+ /* @__PURE__ */ jsx(
85
+ AlertDialogPrimitive.Content,
86
+ {
87
+ ref,
88
+ className: cn(
89
+ "fixed left-1/2 top-1/2 z-50 grid w-[calc(100%-2rem)] max-w-lg grid-cols-[minmax(0,1fr)] -translate-x-1/2 -translate-y-1/2 gap-5 rounded-2xl border border-border bg-popover p-6 text-popover-foreground shadow-xl ring-1 ring-foreground/5",
90
+ "data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
91
+ "data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95",
92
+ className
93
+ ),
94
+ ...props
95
+ }
96
+ )
97
+ ] }));
98
+ AlertDialogContent.displayName = "AlertDialogContent";
99
+ var AlertDialogHeader = ({ className, ...props }) => /* @__PURE__ */ jsx("div", { className: cn("flex flex-col gap-1.5 text-left", className), ...props });
100
+ var AlertDialogFooter = ({ className, ...props }) => /* @__PURE__ */ jsx("div", { className: cn("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end", className), ...props });
101
+ var AlertDialogTitle = React11.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(AlertDialogPrimitive.Title, { ref, className: cn("text-base font-semibold leading-tight tracking-tight", className), ...props }));
102
+ AlertDialogTitle.displayName = "AlertDialogTitle";
103
+ var AlertDialogDescription = React11.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(AlertDialogPrimitive.Description, { ref, className: cn("text-sm leading-relaxed text-muted-foreground", className), ...props }));
104
+ AlertDialogDescription.displayName = "AlertDialogDescription";
105
+ var AlertDialogAction = React11.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(AlertDialogPrimitive.Action, { ref, className: cn(buttonVariants(), className), ...props }));
106
+ AlertDialogAction.displayName = "AlertDialogAction";
107
+ var AlertDialogCancel = React11.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(AlertDialogPrimitive.Cancel, { ref, className: cn(buttonVariants({ variant: "outline" }), "mt-0", className), ...props }));
108
+ AlertDialogCancel.displayName = "AlertDialogCancel";
109
+ var Avatar = React11.forwardRef(
110
+ ({ className, size = 36, style, ...props }, ref) => /* @__PURE__ */ jsx(
111
+ "div",
112
+ {
113
+ ref,
114
+ className: cn("relative inline-flex shrink-0 overflow-hidden rounded-full bg-muted", className),
115
+ style: { width: size, height: size, ...style },
116
+ ...props
117
+ }
118
+ )
119
+ );
120
+ Avatar.displayName = "Avatar";
121
+ var AvatarImage = React11.forwardRef(
122
+ ({ className, alt = "", ...props }, ref) => /* @__PURE__ */ jsx(
123
+ "img",
124
+ {
125
+ ref,
126
+ alt,
127
+ className: cn("aspect-square size-full object-cover", className),
128
+ referrerPolicy: "no-referrer",
129
+ ...props
130
+ }
131
+ )
132
+ );
133
+ AvatarImage.displayName = "AvatarImage";
134
+ var AvatarFallback = React11.forwardRef(
135
+ ({ className, ...props }, ref) => /* @__PURE__ */ jsx(
136
+ "span",
137
+ {
138
+ ref,
139
+ className: cn("flex size-full items-center justify-center bg-muted text-xs font-medium text-muted-foreground", className),
140
+ ...props
141
+ }
142
+ )
143
+ );
144
+ AvatarFallback.displayName = "AvatarFallback";
145
+ var badgeVariants = cva(
146
+ "inline-flex items-center gap-1 rounded-full border px-2 py-0.5 text-[11px] font-medium leading-none transition-colors",
147
+ {
148
+ variants: {
149
+ variant: {
150
+ default: "border-transparent bg-primary/15 text-primary",
151
+ secondary: "border-transparent bg-secondary text-secondary-foreground",
152
+ destructive: "border-transparent bg-destructive/15 text-destructive",
153
+ success: "border-transparent bg-success/15 text-success",
154
+ warning: "border-transparent bg-warning/15 text-warning",
155
+ info: "border-transparent bg-info/15 text-info",
156
+ outline: "border-border bg-card text-foreground",
157
+ soft: "border-transparent bg-muted text-muted-foreground"
158
+ },
159
+ size: {
160
+ default: "px-2 py-0.5 text-[11px]",
161
+ sm: "px-1.5 py-px text-[10px]",
162
+ lg: "px-2.5 py-1 text-xs"
163
+ }
164
+ },
165
+ defaultVariants: { variant: "default", size: "default" }
166
+ }
167
+ );
168
+ function Badge({ className, variant, size, ...props }) {
169
+ return /* @__PURE__ */ jsx("span", { className: cn(badgeVariants({ variant, size }), className), ...props });
170
+ }
171
+ var Card = React11.forwardRef(
172
+ ({ className, ...props }, ref) => /* @__PURE__ */ jsx(
173
+ "div",
174
+ {
175
+ ref,
176
+ className: cn("rounded-xl border border-border bg-card text-card-foreground shadow-sm", className),
177
+ ...props
178
+ }
179
+ )
180
+ );
181
+ Card.displayName = "Card";
182
+ var CardHeader = React11.forwardRef(
183
+ ({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("flex flex-col gap-1.5 p-5", className), ...props })
184
+ );
185
+ CardHeader.displayName = "CardHeader";
186
+ var CardTitle = React11.forwardRef(
187
+ ({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("text-base font-semibold leading-tight tracking-tight", className), ...props })
188
+ );
189
+ CardTitle.displayName = "CardTitle";
190
+ var CardDescription = React11.forwardRef(
191
+ ({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("text-sm leading-relaxed text-muted-foreground", className), ...props })
192
+ );
193
+ CardDescription.displayName = "CardDescription";
194
+ var CardContent = React11.forwardRef(
195
+ ({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("p-5 pt-0", className), ...props })
196
+ );
197
+ CardContent.displayName = "CardContent";
198
+ var CardFooter = React11.forwardRef(
199
+ ({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("flex items-center gap-2 p-5 pt-0", className), ...props })
200
+ );
201
+ CardFooter.displayName = "CardFooter";
202
+ var Checkbox = React11.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
203
+ CheckboxPrimitive.Root,
204
+ {
205
+ ref,
206
+ className: cn(
207
+ "peer size-4 shrink-0 rounded-[5px] border border-border bg-card shadow-xs transition-colors",
208
+ "hover:border-border/80",
209
+ "focus-visible:outline-none focus-visible:ring-[3px] focus-visible:ring-ring/40",
210
+ "disabled:cursor-not-allowed disabled:opacity-50",
211
+ "data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground data-[state=checked]:border-primary",
212
+ "data-[state=indeterminate]:bg-primary data-[state=indeterminate]:text-primary-foreground data-[state=indeterminate]:border-primary",
213
+ className
214
+ ),
215
+ ...props,
216
+ children: /* @__PURE__ */ jsx(CheckboxPrimitive.Indicator, { className: "flex items-center justify-center text-current", children: props.checked === "indeterminate" ? /* @__PURE__ */ jsx(Minus, { className: "size-3" }) : /* @__PURE__ */ jsx(Check, { className: "size-3" }) })
217
+ }
218
+ ));
219
+ Checkbox.displayName = "Checkbox";
220
+ var Dialog = DialogPrimitive.Root;
221
+ var DialogTrigger = DialogPrimitive.Trigger;
222
+ var DialogPortal = DialogPrimitive.Portal;
223
+ var DialogClose = DialogPrimitive.Close;
224
+ var DialogOverlay = React11.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
225
+ DialogPrimitive.Overlay,
226
+ {
227
+ ref,
228
+ className: cn(
229
+ "fixed inset-0 z-50 bg-background/60 backdrop-blur-sm",
230
+ "data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
231
+ className
232
+ ),
233
+ ...props
234
+ }
235
+ ));
236
+ DialogOverlay.displayName = "DialogOverlay";
237
+ var DialogContent = React11.forwardRef(({ className, children, showClose = true, ...props }, ref) => /* @__PURE__ */ jsxs(DialogPortal, { children: [
238
+ /* @__PURE__ */ jsx(DialogOverlay, {}),
239
+ /* @__PURE__ */ jsxs(
240
+ DialogPrimitive.Content,
241
+ {
242
+ ref,
243
+ className: cn(
244
+ // grid-cols-[minmax(0,1fr)] keeps wide children (long select text,
245
+ // file paths, etc.) from blowing past the dialog's max-w-lg by
246
+ // forcing the implicit grid track's `min-width: auto` to 0.
247
+ "fixed left-1/2 top-1/2 z-50 grid w-[calc(100%-2rem)] max-w-lg grid-cols-[minmax(0,1fr)] -translate-x-1/2 -translate-y-1/2 gap-5 rounded-2xl border border-border bg-popover p-6 text-popover-foreground shadow-xl ring-1 ring-foreground/5",
248
+ "data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
249
+ "data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95",
250
+ "data-[state=open]:slide-in-from-top-2",
251
+ className
252
+ ),
253
+ ...props,
254
+ children: [
255
+ children,
256
+ showClose && /* @__PURE__ */ jsxs(DialogPrimitive.Close, { className: "absolute right-4 top-4 inline-flex size-7 items-center justify-center rounded-md text-muted-foreground opacity-80 transition hover:bg-muted hover:opacity-100 focus:outline-none focus-visible:ring-[3px] focus-visible:ring-ring/40", children: [
257
+ /* @__PURE__ */ jsx(X, { className: "size-4" }),
258
+ /* @__PURE__ */ jsx("span", { className: "sr-only", children: "Close" })
259
+ ] })
260
+ ]
261
+ }
262
+ )
263
+ ] }));
264
+ DialogContent.displayName = "DialogContent";
265
+ var DialogHeader = ({ className, ...props }) => /* @__PURE__ */ jsx("div", { className: cn("flex flex-col gap-1.5 text-left", className), ...props });
266
+ var DialogFooter = ({ className, ...props }) => /* @__PURE__ */ jsx("div", { className: cn("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end", className), ...props });
267
+ var DialogTitle = React11.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
268
+ DialogPrimitive.Title,
269
+ {
270
+ ref,
271
+ className: cn("text-base font-semibold leading-tight tracking-tight", className),
272
+ ...props
273
+ }
274
+ ));
275
+ DialogTitle.displayName = "DialogTitle";
276
+ var DialogDescription = React11.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
277
+ DialogPrimitive.Description,
278
+ {
279
+ ref,
280
+ className: cn("text-sm leading-relaxed text-muted-foreground", className),
281
+ ...props
282
+ }
283
+ ));
284
+ DialogDescription.displayName = "DialogDescription";
285
+ var Input = React11.forwardRef(
286
+ ({ className, type, ...props }, ref) => /* @__PURE__ */ jsx(
287
+ "input",
288
+ {
289
+ type,
290
+ ref,
291
+ className: cn(
292
+ "flex h-9 w-full min-w-0 rounded-lg border border-border bg-card px-3 py-1 text-sm text-foreground shadow-xs transition-[color,box-shadow,border-color,background-color] outline-none",
293
+ "file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium",
294
+ "placeholder:text-muted-foreground",
295
+ "hover:border-border/80",
296
+ "focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/40",
297
+ "disabled:cursor-not-allowed disabled:opacity-50",
298
+ "aria-invalid:border-destructive aria-invalid:ring-destructive/20",
299
+ className
300
+ ),
301
+ ...props
302
+ }
303
+ )
304
+ );
305
+ Input.displayName = "Input";
306
+ var Label = React11.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
307
+ LabelPrimitive.Root,
308
+ {
309
+ ref,
310
+ className: cn("text-xs font-medium leading-none text-muted-foreground select-none", className),
311
+ ...props
312
+ }
313
+ ));
314
+ Label.displayName = "Label";
315
+ var Progress = React11.forwardRef(
316
+ ({ className, value = 0, indicatorClassName, indeterminate = false, ...props }, ref) => {
317
+ const clamped = Math.max(0, Math.min(100, value));
318
+ return /* @__PURE__ */ jsx(
319
+ "div",
320
+ {
321
+ ref,
322
+ role: "progressbar",
323
+ "aria-valuenow": indeterminate ? void 0 : clamped,
324
+ "aria-valuemin": 0,
325
+ "aria-valuemax": 100,
326
+ className: cn(
327
+ "relative h-2 w-full overflow-hidden rounded-full bg-muted",
328
+ className
329
+ ),
330
+ ...props,
331
+ children: indeterminate ? /* @__PURE__ */ jsx(
332
+ "div",
333
+ {
334
+ className: cn(
335
+ "absolute inset-y-0 left-0 w-1/3 rounded-full bg-primary",
336
+ "animate-[progress-marquee_1.4s_ease-in-out_infinite]",
337
+ indicatorClassName
338
+ )
339
+ }
340
+ ) : /* @__PURE__ */ jsx(
341
+ "div",
342
+ {
343
+ className: cn(
344
+ "h-full rounded-full bg-primary transition-[width] duration-200 ease-out",
345
+ indicatorClassName
346
+ ),
347
+ style: { width: `${clamped}%` }
348
+ }
349
+ )
350
+ }
351
+ );
352
+ }
353
+ );
354
+ Progress.displayName = "Progress";
355
+ var ScrollArea = React11.forwardRef(
356
+ ({ className, children, viewportClassName, type = "hover", ...props }, ref) => /* @__PURE__ */ jsxs(
357
+ ScrollAreaPrimitive.Root,
358
+ {
359
+ ref,
360
+ type,
361
+ className: cn("relative overflow-hidden", className),
362
+ ...props,
363
+ children: [
364
+ /* @__PURE__ */ jsx(
365
+ ScrollAreaPrimitive.Viewport,
366
+ {
367
+ className: cn("size-full rounded-[inherit] [&>div]:!block", viewportClassName),
368
+ children
369
+ }
370
+ ),
371
+ /* @__PURE__ */ jsx(ScrollBar, {}),
372
+ /* @__PURE__ */ jsx(ScrollBar, { orientation: "horizontal" }),
373
+ /* @__PURE__ */ jsx(ScrollAreaPrimitive.Corner, {})
374
+ ]
375
+ }
376
+ )
377
+ );
378
+ ScrollArea.displayName = "ScrollArea";
379
+ var ScrollBar = React11.forwardRef(({ className, orientation = "vertical", ...props }, ref) => /* @__PURE__ */ jsx(
380
+ ScrollAreaPrimitive.ScrollAreaScrollbar,
381
+ {
382
+ ref,
383
+ orientation,
384
+ className: cn(
385
+ "flex touch-none select-none p-0.5 transition-colors",
386
+ orientation === "vertical" && "h-full w-2.5 border-l border-l-transparent",
387
+ orientation === "horizontal" && "h-2.5 w-full flex-col border-t border-t-transparent",
388
+ className
389
+ ),
390
+ ...props,
391
+ children: /* @__PURE__ */ jsx(ScrollAreaPrimitive.ScrollAreaThumb, { className: "relative flex-1 rounded-full bg-border transition-colors hover:bg-muted-foreground/50" })
392
+ }
393
+ ));
394
+ ScrollBar.displayName = "ScrollBar";
395
+ var Select = SelectPrimitive.Root;
396
+ var SelectGroup = SelectPrimitive.Group;
397
+ var SelectValue = SelectPrimitive.Value;
398
+ var SelectTrigger = React11.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(
399
+ SelectPrimitive.Trigger,
400
+ {
401
+ ref,
402
+ className: cn(
403
+ "group flex h-9 w-full min-w-0 items-center justify-between gap-2 rounded-lg border border-border bg-card px-3 py-1 text-sm shadow-xs outline-none transition-[color,box-shadow,background-color,border-color]",
404
+ "hover:border-border/80 hover:bg-card/70",
405
+ "placeholder:text-muted-foreground",
406
+ "focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/40",
407
+ "data-[state=open]:border-ring data-[state=open]:ring-[3px] data-[state=open]:ring-ring/40",
408
+ "disabled:cursor-not-allowed disabled:opacity-50",
409
+ "data-[placeholder]:text-muted-foreground",
410
+ // Selected text mustn't push the chevron out of the trigger.
411
+ "[&>span:not([data-radix-select-icon])]:flex-1 [&>span:not([data-radix-select-icon])]:min-w-0 [&>span:not([data-radix-select-icon])]:truncate [&>span:not([data-radix-select-icon])]:text-left",
412
+ className
413
+ ),
414
+ ...props,
415
+ children: [
416
+ children,
417
+ /* @__PURE__ */ jsx(SelectPrimitive.Icon, { asChild: true, "data-radix-select-icon": true, children: /* @__PURE__ */ jsx(ChevronDown, { className: "size-4 shrink-0 opacity-60 transition-transform group-data-[state=open]:rotate-180" }) })
418
+ ]
419
+ }
420
+ ));
421
+ SelectTrigger.displayName = "SelectTrigger";
422
+ var SelectScrollUpButton = React11.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
423
+ SelectPrimitive.ScrollUpButton,
424
+ {
425
+ ref,
426
+ className: cn("flex cursor-default items-center justify-center py-1 text-muted-foreground", className),
427
+ ...props,
428
+ children: /* @__PURE__ */ jsx(ChevronUp, { className: "size-4" })
429
+ }
430
+ ));
431
+ SelectScrollUpButton.displayName = "SelectScrollUpButton";
432
+ var SelectScrollDownButton = React11.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
433
+ SelectPrimitive.ScrollDownButton,
434
+ {
435
+ ref,
436
+ className: cn("flex cursor-default items-center justify-center py-1 text-muted-foreground", className),
437
+ ...props,
438
+ children: /* @__PURE__ */ jsx(ChevronDown, { className: "size-4" })
439
+ }
440
+ ));
441
+ SelectScrollDownButton.displayName = "SelectScrollDownButton";
442
+ var SelectContent = React11.forwardRef(({ className, children, position = "popper", ...props }, ref) => /* @__PURE__ */ jsx(SelectPrimitive.Portal, { children: /* @__PURE__ */ jsxs(
443
+ SelectPrimitive.Content,
444
+ {
445
+ ref,
446
+ position,
447
+ sideOffset: 4,
448
+ className: cn(
449
+ // Solid popover surface — explicit bg + ring for visibility against any background.
450
+ "relative z-50 max-h-(--radix-select-content-available-height) min-w-(--radix-select-trigger-width) overflow-hidden rounded-xl border border-border bg-popover text-popover-foreground shadow-xl ring-1 ring-foreground/5",
451
+ "data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
452
+ "data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95",
453
+ position === "popper" && "data-[side=bottom]:translate-y-1 data-[side=top]:-translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1",
454
+ className
455
+ ),
456
+ ...props,
457
+ children: [
458
+ /* @__PURE__ */ jsx(SelectScrollUpButton, {}),
459
+ /* @__PURE__ */ jsx(
460
+ SelectPrimitive.Viewport,
461
+ {
462
+ className: cn(
463
+ "p-1",
464
+ position === "popper" && "h-(--radix-select-trigger-height) w-full min-w-(--radix-select-trigger-width)"
465
+ ),
466
+ children
467
+ }
468
+ ),
469
+ /* @__PURE__ */ jsx(SelectScrollDownButton, {})
470
+ ]
471
+ }
472
+ ) }));
473
+ SelectContent.displayName = "SelectContent";
474
+ var SelectLabel = React11.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
475
+ SelectPrimitive.Label,
476
+ {
477
+ ref,
478
+ className: cn("px-2 py-1.5 text-[10px] font-semibold uppercase tracking-wider text-muted-foreground", className),
479
+ ...props
480
+ }
481
+ ));
482
+ SelectLabel.displayName = "SelectLabel";
483
+ var SelectItem = React11.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(
484
+ SelectPrimitive.Item,
485
+ {
486
+ ref,
487
+ className: cn(
488
+ "relative flex w-full cursor-default select-none items-center gap-2 rounded-md py-1.5 pl-2 pr-8 text-sm outline-none transition-colors",
489
+ "focus:bg-accent focus:text-accent-foreground",
490
+ "data-[state=checked]:font-medium",
491
+ "data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
492
+ className
493
+ ),
494
+ ...props,
495
+ children: [
496
+ /* @__PURE__ */ jsx("span", { className: "absolute right-2 flex size-3.5 items-center justify-center text-primary", children: /* @__PURE__ */ jsx(SelectPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx(Check, { className: "size-4" }) }) }),
497
+ /* @__PURE__ */ jsx(SelectPrimitive.ItemText, { children })
498
+ ]
499
+ }
500
+ ));
501
+ SelectItem.displayName = "SelectItem";
502
+ var SelectSeparator = React11.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(SelectPrimitive.Separator, { ref, className: cn("-mx-1 my-1 h-px bg-border", className), ...props }));
503
+ SelectSeparator.displayName = "SelectSeparator";
504
+ var Separator2 = React11.forwardRef(({ className, orientation = "horizontal", decorative = true, ...props }, ref) => /* @__PURE__ */ jsx(
505
+ SeparatorPrimitive.Root,
506
+ {
507
+ ref,
508
+ decorative,
509
+ orientation,
510
+ className: cn(
511
+ "shrink-0 bg-border",
512
+ orientation === "horizontal" ? "h-px w-full" : "h-full w-px",
513
+ className
514
+ ),
515
+ ...props
516
+ }
517
+ ));
518
+ Separator2.displayName = "Separator";
519
+ var Sheet = DialogPrimitive.Root;
520
+ var SheetTrigger = DialogPrimitive.Trigger;
521
+ var SheetClose = DialogPrimitive.Close;
522
+ var SheetPortal = DialogPrimitive.Portal;
523
+ var SheetOverlay = React11.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
524
+ DialogPrimitive.Overlay,
525
+ {
526
+ ref,
527
+ className: cn(
528
+ "fixed inset-0 z-50 bg-black/50 backdrop-blur-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
529
+ className
530
+ ),
531
+ ...props
532
+ }
533
+ ));
534
+ SheetOverlay.displayName = "SheetOverlay";
535
+ var sheetVariants = cva(
536
+ "fixed z-50 gap-4 bg-card p-0 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500 outline-none",
537
+ {
538
+ variants: {
539
+ side: {
540
+ top: "inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",
541
+ bottom: "inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",
542
+ left: "inset-y-0 left-0 h-full w-3/4 max-w-xs border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",
543
+ right: "inset-y-0 right-0 h-full w-3/4 max-w-xs border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"
544
+ }
545
+ },
546
+ defaultVariants: { side: "right" }
547
+ }
548
+ );
549
+ var SheetContent = React11.forwardRef(
550
+ ({ side = "right", className, children, showClose = true, ...props }, ref) => /* @__PURE__ */ jsxs(SheetPortal, { children: [
551
+ /* @__PURE__ */ jsx(SheetOverlay, {}),
552
+ /* @__PURE__ */ jsxs(DialogPrimitive.Content, { ref, className: cn(sheetVariants({ side }), className), ...props, children: [
553
+ children,
554
+ showClose && /* @__PURE__ */ jsxs(DialogPrimitive.Close, { className: "absolute right-4 top-4 rounded-sm opacity-70 transition-opacity hover:opacity-100 focus:outline-none cursor-pointer", children: [
555
+ /* @__PURE__ */ jsx(X, { className: "size-4" }),
556
+ /* @__PURE__ */ jsx("span", { className: "sr-only", children: "Close" })
557
+ ] })
558
+ ] })
559
+ ] })
560
+ );
561
+ SheetContent.displayName = "SheetContent";
562
+ function Skeleton({ className, ...props }) {
563
+ return /* @__PURE__ */ jsx("div", { className: cn("animate-pulse rounded-md bg-muted", className), ...props });
564
+ }
565
+ var Switch = React11.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
566
+ SwitchPrimitive.Root,
567
+ {
568
+ ref,
569
+ className: cn(
570
+ "peer inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-full border border-border shadow-inner transition-colors",
571
+ "focus-visible:outline-none focus-visible:ring-[3px] focus-visible:ring-ring/40",
572
+ "disabled:cursor-not-allowed disabled:opacity-50",
573
+ // Checked: filled with primary
574
+ "data-[state=checked]:bg-primary data-[state=checked]:border-primary",
575
+ // Unchecked: visible track that contrasts with both surface modes
576
+ "data-[state=unchecked]:bg-input dark:data-[state=unchecked]:bg-muted-foreground/25",
577
+ className
578
+ ),
579
+ ...props,
580
+ children: /* @__PURE__ */ jsx(
581
+ SwitchPrimitive.Thumb,
582
+ {
583
+ className: cn(
584
+ "pointer-events-none block size-4 rounded-full shadow-md ring-0 transition-transform",
585
+ // Thumb always uses card surface so it pops against the track in both states.
586
+ "bg-card dark:bg-foreground/95",
587
+ "data-[state=checked]:translate-x-4 data-[state=unchecked]:translate-x-0"
588
+ )
589
+ }
590
+ )
591
+ }
592
+ ));
593
+ Switch.displayName = "Switch";
594
+ var Tabs = TabsPrimitive.Root;
595
+ var TabsList = React11.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
596
+ TabsPrimitive.List,
597
+ {
598
+ ref,
599
+ className: cn(
600
+ "inline-flex h-9 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground",
601
+ className
602
+ ),
603
+ ...props
604
+ }
605
+ ));
606
+ TabsList.displayName = "TabsList";
607
+ var TabsTrigger = React11.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
608
+ TabsPrimitive.Trigger,
609
+ {
610
+ ref,
611
+ className: cn(
612
+ "inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1 text-sm font-medium transition-all",
613
+ "focus-visible:outline-none focus-visible:ring-[3px] focus-visible:ring-ring/40",
614
+ "disabled:pointer-events-none disabled:opacity-50",
615
+ "data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm",
616
+ className
617
+ ),
618
+ ...props
619
+ }
620
+ ));
621
+ TabsTrigger.displayName = "TabsTrigger";
622
+ var TabsContent = React11.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
623
+ TabsPrimitive.Content,
624
+ {
625
+ ref,
626
+ className: cn("mt-2 outline-none", className),
627
+ ...props
628
+ }
629
+ ));
630
+ TabsContent.displayName = "TabsContent";
631
+ function Toaster(props) {
632
+ return /* @__PURE__ */ jsx(
633
+ Toaster$1,
634
+ {
635
+ position: "bottom-right",
636
+ richColors: true,
637
+ closeButton: true,
638
+ theme: "system",
639
+ toastOptions: {
640
+ classNames: {
641
+ toast: "group toast group-[.toaster]:bg-card group-[.toaster]:text-card-foreground group-[.toaster]:border-border group-[.toaster]:shadow-lg",
642
+ description: "group-[.toast]:text-muted-foreground",
643
+ actionButton: "group-[.toast]:bg-primary group-[.toast]:text-primary-foreground",
644
+ cancelButton: "group-[.toast]:bg-muted group-[.toast]:text-muted-foreground"
645
+ }
646
+ },
647
+ ...props
648
+ }
649
+ );
650
+ }
651
+ var TooltipProvider = TooltipPrimitive.Provider;
652
+ var Tooltip = TooltipPrimitive.Root;
653
+ var TooltipTrigger = TooltipPrimitive.Trigger;
654
+ var TooltipContent = React11.forwardRef(({ className, sideOffset = 6, ...props }, ref) => /* @__PURE__ */ jsx(TooltipPrimitive.Portal, { children: /* @__PURE__ */ jsx(
655
+ TooltipPrimitive.Content,
656
+ {
657
+ ref,
658
+ sideOffset,
659
+ className: cn(
660
+ "z-50 max-w-xs overflow-hidden rounded-md border border-border bg-popover px-2.5 py-1.5 text-xs text-popover-foreground shadow-lg ring-1 ring-foreground/5",
661
+ "data-[state=delayed-open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=delayed-open]:fade-in-0",
662
+ "data-[state=delayed-open]:zoom-in-95 data-[state=closed]:zoom-out-95",
663
+ className
664
+ ),
665
+ ...props
666
+ }
667
+ ) }));
668
+ TooltipContent.displayName = "TooltipContent";
669
+ var Popover = PopoverPrimitive.Root;
670
+ var PopoverTrigger = PopoverPrimitive.Trigger;
671
+ var PopoverAnchor = PopoverPrimitive.Anchor;
672
+ var PopoverContent = React11.forwardRef(({ className, align = "center", sideOffset = 6, ...props }, ref) => /* @__PURE__ */ jsx(PopoverPrimitive.Portal, { children: /* @__PURE__ */ jsx(
673
+ PopoverPrimitive.Content,
674
+ {
675
+ ref,
676
+ align,
677
+ sideOffset,
678
+ className: cn(
679
+ "z-50 w-72 rounded-xl border border-border bg-popover p-4 text-popover-foreground shadow-xl ring-1 ring-foreground/5 outline-none",
680
+ "data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
681
+ "data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95",
682
+ "data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
683
+ className
684
+ ),
685
+ ...props
686
+ }
687
+ ) }));
688
+ PopoverContent.displayName = "PopoverContent";
689
+ var Kbd = React11.forwardRef(
690
+ ({ className, ...props }, ref) => /* @__PURE__ */ jsx(
691
+ "kbd",
692
+ {
693
+ ref,
694
+ className: cn(
695
+ "inline-flex h-5 min-w-[1.25rem] items-center justify-center rounded border border-border bg-muted px-1 font-mono text-[10px] font-medium text-muted-foreground",
696
+ className
697
+ ),
698
+ ...props
699
+ }
700
+ )
701
+ );
702
+ Kbd.displayName = "Kbd";
703
+ var dotVariants = cva("inline-block shrink-0 rounded-full", {
704
+ variants: {
705
+ tone: {
706
+ success: "bg-success",
707
+ warning: "bg-warning",
708
+ destructive: "bg-destructive",
709
+ info: "bg-info",
710
+ muted: "bg-muted-foreground/50",
711
+ primary: "bg-primary"
712
+ },
713
+ size: {
714
+ xs: "size-1.5",
715
+ sm: "size-2",
716
+ md: "size-2.5",
717
+ lg: "size-3"
718
+ }
719
+ },
720
+ defaultVariants: { tone: "muted", size: "sm" }
721
+ });
722
+ function StatusDot({ className, tone, size, pulse, ...props }) {
723
+ return /* @__PURE__ */ jsx(
724
+ "span",
725
+ {
726
+ className: cn(
727
+ "relative inline-flex items-center justify-center",
728
+ pulse && "before:absolute before:inset-0 before:rounded-full before:bg-current before:opacity-30 before:animate-ping",
729
+ className
730
+ ),
731
+ ...props,
732
+ children: /* @__PURE__ */ jsx("span", { className: cn(dotVariants({ tone, size }), "relative"), "aria-hidden": true })
733
+ }
734
+ );
735
+ }
736
+ function EmptyState({ icon, title, description, action, className, ...props }) {
737
+ return /* @__PURE__ */ jsxs(
738
+ "div",
739
+ {
740
+ className: cn(
741
+ "flex flex-col items-center justify-center gap-3 rounded-xl border border-dashed border-border bg-card/40 px-6 py-12 text-center",
742
+ className
743
+ ),
744
+ ...props,
745
+ children: [
746
+ icon && /* @__PURE__ */ jsx("div", { className: "flex size-12 items-center justify-center rounded-full bg-muted text-muted-foreground", children: icon }),
747
+ /* @__PURE__ */ jsxs("div", { className: "space-y-1", children: [
748
+ /* @__PURE__ */ jsx("h3", { className: "text-sm font-medium text-foreground", children: title }),
749
+ description && /* @__PURE__ */ jsx("p", { className: "text-xs leading-relaxed text-muted-foreground", children: description })
750
+ ] }),
751
+ action && /* @__PURE__ */ jsx("div", { className: "pt-1", children: action })
752
+ ]
753
+ }
754
+ );
755
+ }
756
+
757
+ export { AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, Avatar, AvatarFallback, AvatarImage, Badge, Button, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Checkbox, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, EmptyState, Input, Kbd, Label, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, Progress, ScrollArea, ScrollBar, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator2 as Separator, Sheet, SheetClose, SheetContent, SheetOverlay, SheetPortal, SheetTrigger, Skeleton, StatusDot, Switch, Tabs, TabsContent, TabsList, TabsTrigger, Toaster, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, badgeVariants, buttonVariants, cn };
758
+ //# sourceMappingURL=index.js.map
759
+ //# sourceMappingURL=index.js.map