@tradalab/lyra 2.7.0 → 3.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,642 @@
1
+ import { Separator } from './chunk-XJJQAQWJ.js';
2
+ import { InputGroup, InputGroupInput, InputGroupAddon, InputGroupButton } from './chunk-2HDU26FC.js';
3
+ import { Button } from './chunk-VGOGWZCF.js';
4
+ import { cn } from './chunk-XH55BHUU.js';
5
+ import * as React3 from 'react';
6
+ import { useMemo } from 'react';
7
+ import { cva } from 'class-variance-authority';
8
+ import { jsx, jsxs } from 'react/jsx-runtime';
9
+ import { Slot, Label as Label$1, Progress as Progress$1, Switch as Switch$1 } from 'radix-ui';
10
+ import { Combobox as Combobox$1 } from '@base-ui/react';
11
+ import { ChevronDownIcon, CheckIcon, XIcon, Loader2Icon } from 'lucide-react';
12
+
13
+ var alertVariants = cva(
14
+ "group/alert relative grid w-full gap-0.5 rounded-none border px-2.5 py-2 text-left text-xs has-data-[slot=alert-action]:relative has-data-[slot=alert-action]:pr-18 has-[>svg]:grid-cols-[auto_1fr] has-[>svg]:gap-x-2 *:[svg]:row-span-2 *:[svg]:translate-y-0 *:[svg]:text-current *:[svg:not([class*='size-'])]:size-4",
15
+ {
16
+ variants: {
17
+ variant: {
18
+ default: "bg-card text-card-foreground",
19
+ destructive: "bg-card text-destructive *:data-[slot=alert-description]:text-destructive/90 *:[svg]:text-current"
20
+ }
21
+ },
22
+ defaultVariants: {
23
+ variant: "default"
24
+ }
25
+ }
26
+ );
27
+ function Alert({
28
+ className,
29
+ variant,
30
+ ...props
31
+ }) {
32
+ return /* @__PURE__ */ jsx(
33
+ "div",
34
+ {
35
+ "data-slot": "alert",
36
+ role: "alert",
37
+ className: cn(alertVariants({ variant }), className),
38
+ ...props
39
+ }
40
+ );
41
+ }
42
+ function AlertTitle({ className, ...props }) {
43
+ return /* @__PURE__ */ jsx(
44
+ "div",
45
+ {
46
+ "data-slot": "alert-title",
47
+ className: cn(
48
+ "font-medium group-has-[>svg]/alert:col-start-2 [&_a]:underline [&_a]:underline-offset-3 [&_a]:hover:text-foreground",
49
+ className
50
+ ),
51
+ ...props
52
+ }
53
+ );
54
+ }
55
+ function AlertDescription({
56
+ className,
57
+ ...props
58
+ }) {
59
+ return /* @__PURE__ */ jsx(
60
+ "div",
61
+ {
62
+ "data-slot": "alert-description",
63
+ className: cn(
64
+ "text-xs/relaxed text-balance text-muted-foreground md:text-pretty [&_a]:underline [&_a]:underline-offset-3 [&_a]:hover:text-foreground [&_p:not(:last-child)]:mb-2",
65
+ className
66
+ ),
67
+ ...props
68
+ }
69
+ );
70
+ }
71
+ function AlertAction({ className, ...props }) {
72
+ return /* @__PURE__ */ jsx(
73
+ "div",
74
+ {
75
+ "data-slot": "alert-action",
76
+ className: cn(
77
+ "absolute top-[calc(--spacing(1.25))] right-[calc(--spacing(1.25))]",
78
+ className
79
+ ),
80
+ ...props
81
+ }
82
+ );
83
+ }
84
+ var badgeVariants = cva(
85
+ "group/badge inline-flex h-5 w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-none border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-all focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3!",
86
+ {
87
+ variants: {
88
+ variant: {
89
+ default: "bg-primary text-primary-foreground [a]:hover:bg-primary/80",
90
+ secondary: "bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80",
91
+ destructive: "bg-destructive/10 text-destructive focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:focus-visible:ring-destructive/40 [a]:hover:bg-destructive/20",
92
+ outline: "border-border text-foreground [a]:hover:bg-muted [a]:hover:text-muted-foreground",
93
+ ghost: "hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50",
94
+ link: "text-primary underline-offset-4 hover:underline"
95
+ }
96
+ },
97
+ defaultVariants: {
98
+ variant: "default"
99
+ }
100
+ }
101
+ );
102
+ function Badge({
103
+ className,
104
+ variant = "default",
105
+ asChild = false,
106
+ ...props
107
+ }) {
108
+ const Comp = asChild ? Slot.Root : "span";
109
+ return /* @__PURE__ */ jsx(
110
+ Comp,
111
+ {
112
+ "data-slot": "badge",
113
+ "data-variant": variant,
114
+ className: cn(badgeVariants({ variant }), className),
115
+ ...props
116
+ }
117
+ );
118
+ }
119
+ var Combobox = Combobox$1.Root;
120
+ function ComboboxValue({ ...props }) {
121
+ return /* @__PURE__ */ jsx(Combobox$1.Value, { "data-slot": "combobox-value", ...props });
122
+ }
123
+ function ComboboxTrigger({
124
+ className,
125
+ children,
126
+ ...props
127
+ }) {
128
+ return /* @__PURE__ */ jsxs(
129
+ Combobox$1.Trigger,
130
+ {
131
+ "data-slot": "combobox-trigger",
132
+ className: cn("[&_svg:not([class*='size-'])]:size-4", className),
133
+ ...props,
134
+ children: [
135
+ children,
136
+ /* @__PURE__ */ jsx(ChevronDownIcon, { className: "pointer-events-none size-4 text-muted-foreground" })
137
+ ]
138
+ }
139
+ );
140
+ }
141
+ function ComboboxClear({ className, ...props }) {
142
+ return /* @__PURE__ */ jsx(
143
+ Combobox$1.Clear,
144
+ {
145
+ "data-slot": "combobox-clear",
146
+ render: /* @__PURE__ */ jsx(InputGroupButton, { variant: "ghost", size: "icon-xs" }),
147
+ className: cn(className),
148
+ ...props,
149
+ children: /* @__PURE__ */ jsx(XIcon, { className: "pointer-events-none" })
150
+ }
151
+ );
152
+ }
153
+ function ComboboxInput({
154
+ className,
155
+ children,
156
+ disabled = false,
157
+ showTrigger = true,
158
+ showClear = false,
159
+ ...props
160
+ }) {
161
+ return /* @__PURE__ */ jsxs(InputGroup, { className: cn("w-auto", className), children: [
162
+ /* @__PURE__ */ jsx(
163
+ Combobox$1.Input,
164
+ {
165
+ render: /* @__PURE__ */ jsx(InputGroupInput, { disabled }),
166
+ ...props
167
+ }
168
+ ),
169
+ /* @__PURE__ */ jsxs(InputGroupAddon, { align: "inline-end", children: [
170
+ showTrigger && /* @__PURE__ */ jsx(
171
+ InputGroupButton,
172
+ {
173
+ size: "icon-xs",
174
+ variant: "ghost",
175
+ asChild: true,
176
+ "data-slot": "input-group-button",
177
+ className: "group-has-data-[slot=combobox-clear]/input-group:hidden data-pressed:bg-transparent",
178
+ disabled,
179
+ children: /* @__PURE__ */ jsx(ComboboxTrigger, {})
180
+ }
181
+ ),
182
+ showClear && /* @__PURE__ */ jsx(ComboboxClear, { disabled })
183
+ ] }),
184
+ children
185
+ ] });
186
+ }
187
+ function ComboboxContent({
188
+ className,
189
+ side = "bottom",
190
+ sideOffset = 6,
191
+ align = "start",
192
+ alignOffset = 0,
193
+ anchor,
194
+ ...props
195
+ }) {
196
+ return /* @__PURE__ */ jsx(Combobox$1.Portal, { children: /* @__PURE__ */ jsx(
197
+ Combobox$1.Positioner,
198
+ {
199
+ side,
200
+ sideOffset,
201
+ align,
202
+ alignOffset,
203
+ anchor,
204
+ className: "isolate z-50",
205
+ children: /* @__PURE__ */ jsx(
206
+ Combobox$1.Popup,
207
+ {
208
+ "data-slot": "combobox-content",
209
+ "data-chips": !!anchor,
210
+ className: cn("group/combobox-content relative max-h-(--available-height) w-(--anchor-width) max-w-(--available-width) min-w-[calc(var(--anchor-width)+--spacing(7))] origin-(--transform-origin) overflow-hidden rounded-none bg-popover text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 data-[chips=true]:min-w-(--anchor-width) data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-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 *:data-[slot=input-group]:m-1 *:data-[slot=input-group]:mb-0 *:data-[slot=input-group]:h-8 *:data-[slot=input-group]:border-input/30 *:data-[slot=input-group]:bg-input/30 *:data-[slot=input-group]:shadow-none data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95", className),
211
+ ...props
212
+ }
213
+ )
214
+ }
215
+ ) });
216
+ }
217
+ function ComboboxList({ className, ...props }) {
218
+ return /* @__PURE__ */ jsx(
219
+ Combobox$1.List,
220
+ {
221
+ "data-slot": "combobox-list",
222
+ className: cn(
223
+ "no-scrollbar max-h-[min(calc(--spacing(72)---spacing(9)),calc(var(--available-height)---spacing(9)))] scroll-py-1 overflow-y-auto overscroll-contain data-empty:p-0",
224
+ className
225
+ ),
226
+ ...props
227
+ }
228
+ );
229
+ }
230
+ function ComboboxItem({
231
+ className,
232
+ children,
233
+ ...props
234
+ }) {
235
+ return /* @__PURE__ */ jsxs(
236
+ Combobox$1.Item,
237
+ {
238
+ "data-slot": "combobox-item",
239
+ className: cn(
240
+ "relative flex w-full cursor-default items-center gap-2 rounded-none py-2 pr-8 pl-2 text-xs outline-hidden select-none data-highlighted:bg-accent data-highlighted:text-accent-foreground not-data-[variant=destructive]:data-highlighted:**:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
241
+ className
242
+ ),
243
+ ...props,
244
+ children: [
245
+ children,
246
+ /* @__PURE__ */ jsx(
247
+ Combobox$1.ItemIndicator,
248
+ {
249
+ render: /* @__PURE__ */ jsx("span", { className: "pointer-events-none absolute right-2 flex size-4 items-center justify-center" }),
250
+ children: /* @__PURE__ */ jsx(CheckIcon, { className: "pointer-events-none" })
251
+ }
252
+ )
253
+ ]
254
+ }
255
+ );
256
+ }
257
+ function ComboboxGroup({ className, ...props }) {
258
+ return /* @__PURE__ */ jsx(
259
+ Combobox$1.Group,
260
+ {
261
+ "data-slot": "combobox-group",
262
+ className: cn(className),
263
+ ...props
264
+ }
265
+ );
266
+ }
267
+ function ComboboxLabel({
268
+ className,
269
+ ...props
270
+ }) {
271
+ return /* @__PURE__ */ jsx(
272
+ Combobox$1.GroupLabel,
273
+ {
274
+ "data-slot": "combobox-label",
275
+ className: cn("px-2 py-2 text-xs text-muted-foreground", className),
276
+ ...props
277
+ }
278
+ );
279
+ }
280
+ function ComboboxCollection({ ...props }) {
281
+ return /* @__PURE__ */ jsx(Combobox$1.Collection, { "data-slot": "combobox-collection", ...props });
282
+ }
283
+ function ComboboxEmpty({ className, ...props }) {
284
+ return /* @__PURE__ */ jsx(
285
+ Combobox$1.Empty,
286
+ {
287
+ "data-slot": "combobox-empty",
288
+ className: cn(
289
+ "hidden w-full justify-center py-2 text-center text-xs text-muted-foreground group-data-empty/combobox-content:flex",
290
+ className
291
+ ),
292
+ ...props
293
+ }
294
+ );
295
+ }
296
+ function ComboboxSeparator({
297
+ className,
298
+ ...props
299
+ }) {
300
+ return /* @__PURE__ */ jsx(
301
+ Combobox$1.Separator,
302
+ {
303
+ "data-slot": "combobox-separator",
304
+ className: cn("-mx-1 h-px bg-border", className),
305
+ ...props
306
+ }
307
+ );
308
+ }
309
+ function ComboboxChips({
310
+ className,
311
+ ...props
312
+ }) {
313
+ return /* @__PURE__ */ jsx(
314
+ Combobox$1.Chips,
315
+ {
316
+ "data-slot": "combobox-chips",
317
+ className: cn(
318
+ "flex min-h-8 flex-wrap items-center gap-1 rounded-none border border-input bg-transparent bg-clip-padding px-2.5 py-1 text-xs transition-colors focus-within:border-ring focus-within:ring-1 focus-within:ring-ring/50 has-aria-invalid:border-destructive has-aria-invalid:ring-1 has-aria-invalid:ring-destructive/20 has-data-[slot=combobox-chip]:px-1 dark:bg-input/30 dark:has-aria-invalid:border-destructive/50 dark:has-aria-invalid:ring-destructive/40",
319
+ className
320
+ ),
321
+ ...props
322
+ }
323
+ );
324
+ }
325
+ function ComboboxChip({
326
+ className,
327
+ children,
328
+ showRemove = true,
329
+ ...props
330
+ }) {
331
+ return /* @__PURE__ */ jsxs(
332
+ Combobox$1.Chip,
333
+ {
334
+ "data-slot": "combobox-chip",
335
+ className: cn(
336
+ "flex h-[calc(--spacing(5.25))] w-fit items-center justify-center gap-1 rounded-none bg-muted px-1.5 text-xs font-medium whitespace-nowrap text-foreground has-disabled:pointer-events-none has-disabled:cursor-not-allowed has-disabled:opacity-50 has-data-[slot=combobox-chip-remove]:pr-0",
337
+ className
338
+ ),
339
+ ...props,
340
+ children: [
341
+ children,
342
+ showRemove && /* @__PURE__ */ jsx(
343
+ Combobox$1.ChipRemove,
344
+ {
345
+ render: /* @__PURE__ */ jsx(Button, { variant: "ghost", size: "icon-xs" }),
346
+ className: "-ml-1 opacity-50 hover:opacity-100",
347
+ "data-slot": "combobox-chip-remove",
348
+ children: /* @__PURE__ */ jsx(XIcon, { className: "pointer-events-none" })
349
+ }
350
+ )
351
+ ]
352
+ }
353
+ );
354
+ }
355
+ function ComboboxChipsInput({
356
+ className,
357
+ ...props
358
+ }) {
359
+ return /* @__PURE__ */ jsx(
360
+ Combobox$1.Input,
361
+ {
362
+ "data-slot": "combobox-chip-input",
363
+ className: cn("min-w-16 flex-1 outline-none", className),
364
+ ...props
365
+ }
366
+ );
367
+ }
368
+ function useComboboxAnchor() {
369
+ return React3.useRef(null);
370
+ }
371
+ function Label({
372
+ className,
373
+ ...props
374
+ }) {
375
+ return /* @__PURE__ */ jsx(
376
+ Label$1.Root,
377
+ {
378
+ "data-slot": "label",
379
+ className: cn(
380
+ "flex items-center gap-2 text-xs leading-none select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",
381
+ className
382
+ ),
383
+ ...props
384
+ }
385
+ );
386
+ }
387
+ function FieldSet({ className, ...props }) {
388
+ return /* @__PURE__ */ jsx(
389
+ "fieldset",
390
+ {
391
+ "data-slot": "field-set",
392
+ className: cn(
393
+ "flex flex-col gap-4 has-[>[data-slot=checkbox-group]]:gap-3 has-[>[data-slot=radio-group]]:gap-3",
394
+ className
395
+ ),
396
+ ...props
397
+ }
398
+ );
399
+ }
400
+ function FieldLegend({
401
+ className,
402
+ variant = "legend",
403
+ ...props
404
+ }) {
405
+ return /* @__PURE__ */ jsx(
406
+ "legend",
407
+ {
408
+ "data-slot": "field-legend",
409
+ "data-variant": variant,
410
+ className: cn(
411
+ "mb-2.5 font-medium data-[variant=label]:text-xs data-[variant=legend]:text-sm",
412
+ className
413
+ ),
414
+ ...props
415
+ }
416
+ );
417
+ }
418
+ function FieldGroup({ className, ...props }) {
419
+ return /* @__PURE__ */ jsx(
420
+ "div",
421
+ {
422
+ "data-slot": "field-group",
423
+ className: cn(
424
+ "group/field-group @container/field-group flex w-full flex-col gap-5 data-[slot=checkbox-group]:gap-3 *:data-[slot=field-group]:gap-4",
425
+ className
426
+ ),
427
+ ...props
428
+ }
429
+ );
430
+ }
431
+ var fieldVariants = cva(
432
+ "group/field flex w-full gap-2 data-[invalid=true]:text-destructive",
433
+ {
434
+ variants: {
435
+ orientation: {
436
+ vertical: "flex-col *:w-full [&>.sr-only]:w-auto",
437
+ horizontal: "flex-row items-center has-[>[data-slot=field-content]]:items-start *:data-[slot=field-label]:flex-auto has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px",
438
+ responsive: "flex-col *:w-full @md/field-group:flex-row @md/field-group:items-center @md/field-group:*:w-auto @md/field-group:has-[>[data-slot=field-content]]:items-start @md/field-group:*:data-[slot=field-label]:flex-auto [&>.sr-only]:w-auto @md/field-group:has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px"
439
+ }
440
+ },
441
+ defaultVariants: {
442
+ orientation: "vertical"
443
+ }
444
+ }
445
+ );
446
+ function Field({
447
+ className,
448
+ orientation = "vertical",
449
+ ...props
450
+ }) {
451
+ return /* @__PURE__ */ jsx(
452
+ "div",
453
+ {
454
+ role: "group",
455
+ "data-slot": "field",
456
+ "data-orientation": orientation,
457
+ className: cn(fieldVariants({ orientation }), className),
458
+ ...props
459
+ }
460
+ );
461
+ }
462
+ function FieldContent({ className, ...props }) {
463
+ return /* @__PURE__ */ jsx(
464
+ "div",
465
+ {
466
+ "data-slot": "field-content",
467
+ className: cn(
468
+ "group/field-content flex flex-1 flex-col gap-0.5 leading-snug",
469
+ className
470
+ ),
471
+ ...props
472
+ }
473
+ );
474
+ }
475
+ function FieldLabel({
476
+ className,
477
+ ...props
478
+ }) {
479
+ return /* @__PURE__ */ jsx(
480
+ Label,
481
+ {
482
+ "data-slot": "field-label",
483
+ className: cn(
484
+ "group/field-label peer/field-label flex w-fit gap-2 leading-snug group-data-[disabled=true]/field:opacity-50 has-data-checked:border-primary/30 has-data-checked:bg-primary/5 has-[>[data-slot=field]]:rounded-none has-[>[data-slot=field]]:border *:data-[slot=field]:p-2 dark:has-data-checked:border-primary/20 dark:has-data-checked:bg-primary/10",
485
+ "has-[>[data-slot=field]]:w-full has-[>[data-slot=field]]:flex-col",
486
+ className
487
+ ),
488
+ ...props
489
+ }
490
+ );
491
+ }
492
+ function FieldTitle({ className, ...props }) {
493
+ return /* @__PURE__ */ jsx(
494
+ "div",
495
+ {
496
+ "data-slot": "field-label",
497
+ className: cn(
498
+ "flex w-fit items-center gap-2 text-xs/relaxed group-data-[disabled=true]/field:opacity-50",
499
+ className
500
+ ),
501
+ ...props
502
+ }
503
+ );
504
+ }
505
+ function FieldDescription({ className, ...props }) {
506
+ return /* @__PURE__ */ jsx(
507
+ "p",
508
+ {
509
+ "data-slot": "field-description",
510
+ className: cn(
511
+ "text-left text-xs/relaxed leading-normal font-normal text-muted-foreground group-has-data-horizontal/field:text-balance [[data-variant=legend]+&]:-mt-1.5",
512
+ "last:mt-0 nth-last-2:-mt-1",
513
+ "[&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary",
514
+ className
515
+ ),
516
+ ...props
517
+ }
518
+ );
519
+ }
520
+ function FieldSeparator({
521
+ children,
522
+ className,
523
+ ...props
524
+ }) {
525
+ return /* @__PURE__ */ jsxs(
526
+ "div",
527
+ {
528
+ "data-slot": "field-separator",
529
+ "data-content": !!children,
530
+ className: cn(
531
+ "relative -my-2 h-5 text-xs group-data-[variant=outline]/field-group:-mb-2",
532
+ className
533
+ ),
534
+ ...props,
535
+ children: [
536
+ /* @__PURE__ */ jsx(Separator, { className: "absolute inset-0 top-1/2" }),
537
+ children && /* @__PURE__ */ jsx(
538
+ "span",
539
+ {
540
+ className: "relative mx-auto block w-fit bg-background px-2 text-muted-foreground",
541
+ "data-slot": "field-separator-content",
542
+ children
543
+ }
544
+ )
545
+ ]
546
+ }
547
+ );
548
+ }
549
+ function FieldError({
550
+ className,
551
+ children,
552
+ errors,
553
+ ...props
554
+ }) {
555
+ const content = useMemo(() => {
556
+ if (children) {
557
+ return children;
558
+ }
559
+ if (!errors?.length) {
560
+ return null;
561
+ }
562
+ const uniqueErrors = [
563
+ ...new Map(errors.map((error) => [error?.message, error])).values()
564
+ ];
565
+ if (uniqueErrors?.length == 1) {
566
+ return uniqueErrors[0]?.message;
567
+ }
568
+ return /* @__PURE__ */ jsx("ul", { className: "ml-4 flex list-disc flex-col gap-1", children: uniqueErrors.map(
569
+ (error, index) => error?.message && /* @__PURE__ */ jsx("li", { children: error.message }, index)
570
+ ) });
571
+ }, [children, errors]);
572
+ if (!content) {
573
+ return null;
574
+ }
575
+ return /* @__PURE__ */ jsx(
576
+ "div",
577
+ {
578
+ role: "alert",
579
+ "data-slot": "field-error",
580
+ className: cn("text-xs font-normal text-destructive", className),
581
+ ...props,
582
+ children: content
583
+ }
584
+ );
585
+ }
586
+ function Progress({
587
+ className,
588
+ value,
589
+ ...props
590
+ }) {
591
+ return /* @__PURE__ */ jsx(
592
+ Progress$1.Root,
593
+ {
594
+ "data-slot": "progress",
595
+ className: cn(
596
+ "relative flex h-1 w-full items-center overflow-x-hidden rounded-none bg-muted",
597
+ className
598
+ ),
599
+ ...props,
600
+ children: /* @__PURE__ */ jsx(
601
+ Progress$1.Indicator,
602
+ {
603
+ "data-slot": "progress-indicator",
604
+ className: "size-full flex-1 bg-primary transition-all",
605
+ style: { transform: `translateX(-${100 - (value || 0)}%)` }
606
+ }
607
+ )
608
+ }
609
+ );
610
+ }
611
+ function Spinner({ className, ...props }) {
612
+ return /* @__PURE__ */ jsx(Loader2Icon, { "data-slot": "spinner", role: "status", "aria-label": "Loading", className: cn("size-4 animate-spin", className), ...props });
613
+ }
614
+ function Switch({
615
+ className,
616
+ size = "default",
617
+ ...props
618
+ }) {
619
+ return /* @__PURE__ */ jsx(
620
+ Switch$1.Root,
621
+ {
622
+ "data-slot": "switch",
623
+ "data-size": size,
624
+ className: cn(
625
+ "peer group/switch relative inline-flex shrink-0 items-center rounded-full border border-transparent transition-all outline-none after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:border-ring focus-visible:ring-1 focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-1 aria-invalid:ring-destructive/20 data-[size=default]:h-[18.4px] data-[size=default]:w-[32px] data-[size=sm]:h-[14px] data-[size=sm]:w-[24px] dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:bg-primary data-unchecked:bg-input dark:data-unchecked:bg-input/80 data-disabled:cursor-not-allowed data-disabled:opacity-50",
626
+ className
627
+ ),
628
+ ...props,
629
+ children: /* @__PURE__ */ jsx(
630
+ Switch$1.Thumb,
631
+ {
632
+ "data-slot": "switch-thumb",
633
+ className: "pointer-events-none block rounded-full bg-background ring-0 transition-transform group-data-[size=default]/switch:size-4 group-data-[size=sm]/switch:size-3 group-data-[size=default]/switch:data-checked:translate-x-[calc(100%-2px)] group-data-[size=sm]/switch:data-checked:translate-x-[calc(100%-2px)] dark:data-checked:bg-primary-foreground group-data-[size=default]/switch:data-unchecked:translate-x-0 group-data-[size=sm]/switch:data-unchecked:translate-x-0 dark:data-unchecked:bg-foreground"
634
+ }
635
+ )
636
+ }
637
+ );
638
+ }
639
+
640
+ export { Alert, AlertAction, AlertDescription, AlertTitle, Badge, Combobox, ComboboxChip, ComboboxChips, ComboboxChipsInput, ComboboxCollection, ComboboxContent, ComboboxEmpty, ComboboxGroup, ComboboxInput, ComboboxItem, ComboboxLabel, ComboboxList, ComboboxSeparator, ComboboxTrigger, ComboboxValue, Field, FieldContent, FieldDescription, FieldError, FieldGroup, FieldLabel, FieldLegend, FieldSeparator, FieldSet, FieldTitle, Label, Progress, Spinner, Switch, badgeVariants, useComboboxAnchor };
641
+ //# sourceMappingURL=chunk-DUWK53B5.js.map
642
+ //# sourceMappingURL=chunk-DUWK53B5.js.map