@awsmbiz/inbis-ui 0.0.0-stage → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js ADDED
@@ -0,0 +1,1036 @@
1
+ import { useId, useMemo } from "react";
2
+ import { cva } from "class-variance-authority";
3
+ import { cn, cn as cn$1 } from "cn";
4
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
5
+ import { AlertDialog as AlertDialog$1, Checkbox as Checkbox$1, Dialog as Dialog$1, DropdownMenu as DropdownMenu$1, Label as Label$1, Separator as Separator$1, Slot, Switch as Switch$1, Tabs as Tabs$1, Tooltip as Tooltip$1 } from "radix-ui";
6
+ import { CheckIcon, ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon, CircleCheckIcon, InfoIcon, Loader2Icon, MoreHorizontalIcon, OctagonXIcon, TriangleAlertIcon, XIcon } from "lucide-react";
7
+ import { Toaster as Toaster$1, toast } from "sonner";
8
+ import { zodResolver } from "@hookform/resolvers/zod";
9
+ import { FormProvider, useController, useForm, useFormState } from "react-hook-form";
10
+ // src/components/alert.tsx
11
+ const alertVariants = cva("group/alert relative grid w-full gap-0.5 rounded-lg border px-2.5 py-2 text-left text-sm 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.5 *:[svg]:text-current *:[svg:not([class*='size-'])]:size-4", {
12
+ variants: { variant: {
13
+ default: "bg-card text-card-foreground",
14
+ destructive: "bg-card text-destructive *:data-[slot=alert-description]:text-destructive/90 *:[svg]:text-current"
15
+ } },
16
+ defaultVariants: { variant: "default" }
17
+ });
18
+ function Alert({ className, variant, ...props }) {
19
+ return /* @__PURE__ */ jsx("div", {
20
+ "data-slot": "alert",
21
+ role: "alert",
22
+ className: cn$1(alertVariants({ variant }), className),
23
+ ...props
24
+ });
25
+ }
26
+ function AlertTitle({ className, ...props }) {
27
+ return /* @__PURE__ */ jsx("div", {
28
+ "data-slot": "alert-title",
29
+ className: cn$1("font-medium group-has-[>svg]/alert:col-start-2 [&_a]:underline [&_a]:underline-offset-3 [&_a]:hover:text-foreground", className),
30
+ ...props
31
+ });
32
+ }
33
+ function AlertDescription({ className, ...props }) {
34
+ return /* @__PURE__ */ jsx("div", {
35
+ "data-slot": "alert-description",
36
+ className: cn$1("text-sm text-balance text-muted-foreground md:text-pretty [&_a]:underline [&_a]:underline-offset-3 [&_a]:hover:text-foreground [&_p:not(:last-child)]:mb-4", className),
37
+ ...props
38
+ });
39
+ }
40
+ function AlertAction({ className, ...props }) {
41
+ return /* @__PURE__ */ jsx("div", {
42
+ "data-slot": "alert-action",
43
+ className: cn$1("absolute top-2 right-2", className),
44
+ ...props
45
+ });
46
+ }
47
+ // src/components/button.tsx
48
+ const buttonVariants = cva("group/button inline-flex shrink-0 items-center justify-center rounded-lg border border-transparent bg-clip-padding text-sm font-medium whitespace-nowrap transition-all outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 active:not-aria-[haspopup]:translate-y-px disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", {
49
+ variants: {
50
+ variant: {
51
+ default: "bg-primary text-primary-foreground hover:bg-primary/80",
52
+ outline: "border-border bg-background hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50",
53
+ secondary: "bg-secondary text-secondary-foreground hover:bg-[color-mix(in_oklch,var(--secondary),var(--foreground)_5%)] aria-expanded:bg-secondary aria-expanded:text-secondary-foreground",
54
+ ghost: "hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:hover:bg-muted/50",
55
+ destructive: "bg-destructive/10 text-destructive hover:bg-destructive/20 focus-visible:border-destructive/40 focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:hover:bg-destructive/30 dark:focus-visible:ring-destructive/40",
56
+ link: "text-primary underline-offset-4 hover:underline"
57
+ },
58
+ size: {
59
+ default: "h-8 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",
60
+ xs: "h-6 gap-1 rounded-[min(var(--radius-md),10px)] px-2 text-xs in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3",
61
+ sm: "h-7 gap-1 rounded-[min(var(--radius-md),12px)] px-2.5 text-[0.8rem] in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3.5",
62
+ lg: "h-9 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",
63
+ icon: "size-8",
64
+ "icon-xs": "size-6 rounded-[min(var(--radius-md),10px)] in-data-[slot=button-group]:rounded-lg [&_svg:not([class*='size-'])]:size-3",
65
+ "icon-sm": "size-7 rounded-[min(var(--radius-md),12px)] in-data-[slot=button-group]:rounded-lg",
66
+ "icon-lg": "size-9"
67
+ }
68
+ },
69
+ defaultVariants: {
70
+ variant: "default",
71
+ size: "default"
72
+ }
73
+ });
74
+ function Button({ className, variant = "default", size = "default", asChild = false, ...props }) {
75
+ const Comp = asChild ? Slot.Root : "button";
76
+ return /* @__PURE__ */ jsx(Comp, {
77
+ "data-slot": "button",
78
+ "data-variant": variant,
79
+ "data-size": size,
80
+ className: cn$1(buttonVariants({
81
+ variant,
82
+ size,
83
+ className
84
+ })),
85
+ ...props
86
+ });
87
+ }
88
+ // src/components/alert-dialog.tsx
89
+ function AlertDialog({ ...props }) {
90
+ return /* @__PURE__ */ jsx(AlertDialog$1.Root, {
91
+ "data-slot": "alert-dialog",
92
+ ...props
93
+ });
94
+ }
95
+ function AlertDialogTrigger({ ...props }) {
96
+ return /* @__PURE__ */ jsx(AlertDialog$1.Trigger, {
97
+ "data-slot": "alert-dialog-trigger",
98
+ ...props
99
+ });
100
+ }
101
+ function AlertDialogPortal({ ...props }) {
102
+ return /* @__PURE__ */ jsx(AlertDialog$1.Portal, {
103
+ "data-slot": "alert-dialog-portal",
104
+ ...props
105
+ });
106
+ }
107
+ function AlertDialogOverlay({ className, ...props }) {
108
+ return /* @__PURE__ */ jsx(AlertDialog$1.Overlay, {
109
+ "data-slot": "alert-dialog-overlay",
110
+ className: cn$1("fixed inset-0 z-50 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0", className),
111
+ ...props
112
+ });
113
+ }
114
+ function AlertDialogContent({ className, size = "default", ...props }) {
115
+ return /* @__PURE__ */ jsxs(AlertDialogPortal, { children: [/* @__PURE__ */ jsx(AlertDialogOverlay, {}), /* @__PURE__ */ jsx(AlertDialog$1.Content, {
116
+ "data-slot": "alert-dialog-content",
117
+ "data-size": size,
118
+ className: cn$1("group/alert-dialog-content fixed top-1/2 left-1/2 z-50 grid max-h-[calc(100%-2rem)] w-full overflow-y-auto -translate-x-1/2 -translate-y-1/2 gap-4 rounded-xl bg-popover p-4 text-popover-foreground ring-1 ring-foreground/10 duration-100 outline-none data-[size=default]:max-w-xs data-[size=sm]:max-w-xs data-[size=default]:sm:max-w-sm 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),
119
+ ...props
120
+ })] });
121
+ }
122
+ function AlertDialogHeader({ className, ...props }) {
123
+ return /* @__PURE__ */ jsx("div", {
124
+ "data-slot": "alert-dialog-header",
125
+ className: cn$1("grid grid-rows-[auto_1fr] place-items-center gap-1.5 text-center has-data-[slot=alert-dialog-media]:grid-rows-[auto_auto_1fr] has-data-[slot=alert-dialog-media]:gap-x-4 sm:group-data-[size=default]/alert-dialog-content:place-items-start sm:group-data-[size=default]/alert-dialog-content:text-left sm:group-data-[size=default]/alert-dialog-content:has-data-[slot=alert-dialog-media]:grid-rows-[auto_1fr]", className),
126
+ ...props
127
+ });
128
+ }
129
+ function AlertDialogFooter({ className, ...props }) {
130
+ return /* @__PURE__ */ jsx("div", {
131
+ "data-slot": "alert-dialog-footer",
132
+ className: cn$1("-mx-4 -mb-4 flex flex-col-reverse gap-2 rounded-b-xl border-t bg-muted/50 p-4 group-data-[size=sm]/alert-dialog-content:grid group-data-[size=sm]/alert-dialog-content:grid-cols-2 sm:flex-row sm:justify-end", className),
133
+ ...props
134
+ });
135
+ }
136
+ function AlertDialogMedia({ className, ...props }) {
137
+ return /* @__PURE__ */ jsx("div", {
138
+ "data-slot": "alert-dialog-media",
139
+ className: cn$1("mb-2 inline-flex size-10 items-center justify-center rounded-md bg-muted sm:group-data-[size=default]/alert-dialog-content:row-span-2 *:[svg:not([class*='size-'])]:size-6", className),
140
+ ...props
141
+ });
142
+ }
143
+ function AlertDialogTitle({ className, ...props }) {
144
+ return /* @__PURE__ */ jsx(AlertDialog$1.Title, {
145
+ "data-slot": "alert-dialog-title",
146
+ className: cn$1("font-heading text-base font-medium sm:group-data-[size=default]/alert-dialog-content:group-has-data-[slot=alert-dialog-media]/alert-dialog-content:col-start-2", className),
147
+ ...props
148
+ });
149
+ }
150
+ function AlertDialogDescription({ className, ...props }) {
151
+ return /* @__PURE__ */ jsx(AlertDialog$1.Description, {
152
+ "data-slot": "alert-dialog-description",
153
+ className: cn$1("text-sm text-balance text-muted-foreground md:text-pretty *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground", className),
154
+ ...props
155
+ });
156
+ }
157
+ function AlertDialogAction({ className, variant = "default", size = "default", ...props }) {
158
+ return /* @__PURE__ */ jsx(Button, {
159
+ variant,
160
+ size,
161
+ asChild: true,
162
+ children: /* @__PURE__ */ jsx(AlertDialog$1.Action, {
163
+ "data-slot": "alert-dialog-action",
164
+ className: cn$1(className),
165
+ ...props
166
+ })
167
+ });
168
+ }
169
+ function AlertDialogCancel({ className, variant = "outline", size = "default", ...props }) {
170
+ return /* @__PURE__ */ jsx(Button, {
171
+ variant,
172
+ size,
173
+ asChild: true,
174
+ children: /* @__PURE__ */ jsx(AlertDialog$1.Cancel, {
175
+ "data-slot": "alert-dialog-cancel",
176
+ className: cn$1(className),
177
+ ...props
178
+ })
179
+ });
180
+ }
181
+ // src/components/badge.tsx
182
+ const badgeVariants = cva("group/badge inline-flex h-5 w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-4xl 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!", {
183
+ variants: { variant: {
184
+ default: "bg-primary text-primary-foreground [a]:hover:bg-primary/80",
185
+ secondary: "bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80",
186
+ 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",
187
+ outline: "border-border text-foreground [a]:hover:bg-muted [a]:hover:text-muted-foreground",
188
+ ghost: "hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50",
189
+ link: "text-primary underline-offset-4 hover:underline"
190
+ } },
191
+ defaultVariants: { variant: "default" }
192
+ });
193
+ function Badge({ className, variant = "default", asChild = false, ...props }) {
194
+ const Comp = asChild ? Slot.Root : "span";
195
+ return /* @__PURE__ */ jsx(Comp, {
196
+ "data-slot": "badge",
197
+ "data-variant": variant,
198
+ className: cn$1(badgeVariants({ variant }), className),
199
+ ...props
200
+ });
201
+ }
202
+ // src/components/card.tsx
203
+ function Card({ className, size = "default", ...props }) {
204
+ return /* @__PURE__ */ jsx("div", {
205
+ "data-slot": "card",
206
+ "data-size": size,
207
+ className: cn$1("group/card flex flex-col gap-(--card-spacing) overflow-hidden rounded-xl bg-card py-(--card-spacing) text-sm text-card-foreground ring-1 ring-foreground/10 [--card-spacing:--spacing(4)] has-data-[slot=card-footer]:pb-0 has-[>img:first-child]:pt-0 data-[size=sm]:[--card-spacing:--spacing(3)] data-[size=sm]:has-data-[slot=card-footer]:pb-0 *:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl", className),
208
+ ...props
209
+ });
210
+ }
211
+ function CardHeader({ className, ...props }) {
212
+ return /* @__PURE__ */ jsx("div", {
213
+ "data-slot": "card-header",
214
+ className: cn$1("group/card-header @container/card-header grid auto-rows-min items-start gap-1 rounded-t-xl px-(--card-spacing) has-data-[slot=card-action]:grid-cols-[1fr_auto] has-data-[slot=card-description]:grid-rows-[auto_auto] [.border-b]:pb-(--card-spacing)", className),
215
+ ...props
216
+ });
217
+ }
218
+ function CardTitle({ className, ...props }) {
219
+ return /* @__PURE__ */ jsx("div", {
220
+ "data-slot": "card-title",
221
+ className: cn$1("font-heading text-base leading-snug font-medium group-data-[size=sm]/card:text-sm", className),
222
+ ...props
223
+ });
224
+ }
225
+ function CardDescription({ className, ...props }) {
226
+ return /* @__PURE__ */ jsx("div", {
227
+ "data-slot": "card-description",
228
+ className: cn$1("text-sm text-muted-foreground", className),
229
+ ...props
230
+ });
231
+ }
232
+ function CardAction({ className, ...props }) {
233
+ return /* @__PURE__ */ jsx("div", {
234
+ "data-slot": "card-action",
235
+ className: cn$1("col-start-2 row-span-2 row-start-1 self-start justify-self-end", className),
236
+ ...props
237
+ });
238
+ }
239
+ function CardContent({ className, ...props }) {
240
+ return /* @__PURE__ */ jsx("div", {
241
+ "data-slot": "card-content",
242
+ className: cn$1("px-(--card-spacing)", className),
243
+ ...props
244
+ });
245
+ }
246
+ function CardFooter({ className, ...props }) {
247
+ return /* @__PURE__ */ jsx("div", {
248
+ "data-slot": "card-footer",
249
+ className: cn$1("flex items-center rounded-b-xl border-t bg-muted/50 p-(--card-spacing)", className),
250
+ ...props
251
+ });
252
+ }
253
+ // src/components/checkbox.tsx
254
+ function Checkbox({ className, ...props }) {
255
+ return /* @__PURE__ */ jsx(Checkbox$1.Root, {
256
+ "data-slot": "checkbox",
257
+ className: cn$1("peer relative flex size-4 shrink-0 items-center justify-center rounded-[4px] border border-input transition-colors outline-none group-has-disabled/field:opacity-50 group-has-[:focus-visible]/field-label:ring-0 group-has-[:focus-visible]/field-label:not-data-checked:border-input after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 aria-invalid:aria-checked:border-primary dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:border-primary data-checked:bg-primary data-checked:text-primary-foreground group-has-[:focus-visible]/field-label:data-checked:border-primary dark:data-checked:bg-primary", className),
258
+ ...props,
259
+ children: /* @__PURE__ */ jsx(Checkbox$1.Indicator, {
260
+ "data-slot": "checkbox-indicator",
261
+ className: "grid place-content-center text-current transition-none [&>svg]:size-3.5",
262
+ children: /* @__PURE__ */ jsx(CheckIcon, {})
263
+ })
264
+ });
265
+ }
266
+ // src/components/dialog.tsx
267
+ function Dialog({ ...props }) {
268
+ return /* @__PURE__ */ jsx(Dialog$1.Root, {
269
+ "data-slot": "dialog",
270
+ ...props
271
+ });
272
+ }
273
+ function DialogTrigger({ ...props }) {
274
+ return /* @__PURE__ */ jsx(Dialog$1.Trigger, {
275
+ "data-slot": "dialog-trigger",
276
+ ...props
277
+ });
278
+ }
279
+ function DialogPortal({ ...props }) {
280
+ return /* @__PURE__ */ jsx(Dialog$1.Portal, {
281
+ "data-slot": "dialog-portal",
282
+ ...props
283
+ });
284
+ }
285
+ function DialogClose({ ...props }) {
286
+ return /* @__PURE__ */ jsx(Dialog$1.Close, {
287
+ "data-slot": "dialog-close",
288
+ ...props
289
+ });
290
+ }
291
+ function DialogOverlay({ className, ...props }) {
292
+ return /* @__PURE__ */ jsx(Dialog$1.Overlay, {
293
+ "data-slot": "dialog-overlay",
294
+ className: cn$1("fixed inset-0 isolate z-50 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0", className),
295
+ ...props
296
+ });
297
+ }
298
+ function DialogContent({ className, children, showCloseButton = true, ...props }) {
299
+ return /* @__PURE__ */ jsxs(DialogPortal, { children: [/* @__PURE__ */ jsx(DialogOverlay, {}), /* @__PURE__ */ jsxs(Dialog$1.Content, {
300
+ "data-slot": "dialog-content",
301
+ className: cn$1("fixed top-1/2 left-1/2 z-50 grid max-h-[calc(100%-2rem)] w-full max-w-[calc(100%-2rem)] overflow-y-auto -translate-x-1/2 -translate-y-1/2 gap-4 rounded-xl bg-popover p-4 text-sm text-popover-foreground ring-1 ring-foreground/10 duration-100 outline-none sm:max-w-sm 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),
302
+ ...props,
303
+ children: [children, showCloseButton && /* @__PURE__ */ jsx(Dialog$1.Close, {
304
+ "data-slot": "dialog-close",
305
+ asChild: true,
306
+ children: /* @__PURE__ */ jsxs(Button, {
307
+ variant: "ghost",
308
+ className: "absolute top-2 right-2",
309
+ size: "icon-sm",
310
+ children: [/* @__PURE__ */ jsx(XIcon, {}), /* @__PURE__ */ jsx("span", {
311
+ className: "sr-only",
312
+ children: "Close"
313
+ })]
314
+ })
315
+ })]
316
+ })] });
317
+ }
318
+ function DialogHeader({ className, ...props }) {
319
+ return /* @__PURE__ */ jsx("div", {
320
+ "data-slot": "dialog-header",
321
+ className: cn$1("flex flex-col gap-2", className),
322
+ ...props
323
+ });
324
+ }
325
+ function DialogFooter({ className, showCloseButton = false, children, ...props }) {
326
+ return /* @__PURE__ */ jsxs("div", {
327
+ "data-slot": "dialog-footer",
328
+ className: cn$1("-mx-4 -mb-4 flex flex-col-reverse gap-2 rounded-b-xl border-t bg-muted/50 p-4 sm:flex-row sm:justify-end", className),
329
+ ...props,
330
+ children: [children, showCloseButton && /* @__PURE__ */ jsx(Dialog$1.Close, {
331
+ asChild: true,
332
+ children: /* @__PURE__ */ jsx(Button, {
333
+ variant: "outline",
334
+ children: "Close"
335
+ })
336
+ })]
337
+ });
338
+ }
339
+ function DialogTitle({ className, ...props }) {
340
+ return /* @__PURE__ */ jsx(Dialog$1.Title, {
341
+ "data-slot": "dialog-title",
342
+ className: cn$1("font-heading text-base leading-none font-medium", className),
343
+ ...props
344
+ });
345
+ }
346
+ function DialogDescription({ className, ...props }) {
347
+ return /* @__PURE__ */ jsx(Dialog$1.Description, {
348
+ "data-slot": "dialog-description",
349
+ className: cn$1("text-sm text-muted-foreground *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground", className),
350
+ ...props
351
+ });
352
+ }
353
+ // src/components/dropdown-menu.tsx
354
+ function DropdownMenu({ modal = false, ...props }) {
355
+ return /* @__PURE__ */ jsx(DropdownMenu$1.Root, {
356
+ "data-slot": "dropdown-menu",
357
+ modal,
358
+ ...props
359
+ });
360
+ }
361
+ function DropdownMenuPortal({ ...props }) {
362
+ return /* @__PURE__ */ jsx(DropdownMenu$1.Portal, {
363
+ "data-slot": "dropdown-menu-portal",
364
+ ...props
365
+ });
366
+ }
367
+ function DropdownMenuTrigger({ ...props }) {
368
+ return /* @__PURE__ */ jsx(DropdownMenu$1.Trigger, {
369
+ "data-slot": "dropdown-menu-trigger",
370
+ ...props
371
+ });
372
+ }
373
+ function DropdownMenuContent({ className, align = "start", sideOffset = 4, ...props }) {
374
+ return /* @__PURE__ */ jsx(DropdownMenu$1.Content, {
375
+ "data-slot": "dropdown-menu-content",
376
+ sideOffset,
377
+ align,
378
+ className: cn$1("z-50 max-h-(--radix-dropdown-menu-content-available-height) w-(--radix-dropdown-menu-trigger-width) min-w-32 origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-popover p-1 text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 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 data-[state=closed]:overflow-hidden 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),
379
+ ...props
380
+ });
381
+ }
382
+ function DropdownMenuGroup({ ...props }) {
383
+ return /* @__PURE__ */ jsx(DropdownMenu$1.Group, {
384
+ "data-slot": "dropdown-menu-group",
385
+ ...props
386
+ });
387
+ }
388
+ function DropdownMenuItem({ className, inset, variant = "default", ...props }) {
389
+ return /* @__PURE__ */ jsx(DropdownMenu$1.Item, {
390
+ "data-slot": "dropdown-menu-item",
391
+ "data-inset": inset,
392
+ "data-variant": variant,
393
+ className: cn$1("group/dropdown-menu-item relative flex cursor-default items-center gap-1.5 rounded-md px-1.5 py-1 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-inset:pl-7 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 data-[variant=destructive]:*:[svg]:text-destructive", className),
394
+ ...props
395
+ });
396
+ }
397
+ function DropdownMenuCheckboxItem({ className, children, checked, inset, ...props }) {
398
+ return /* @__PURE__ */ jsxs(DropdownMenu$1.CheckboxItem, {
399
+ "data-slot": "dropdown-menu-checkbox-item",
400
+ "data-inset": inset,
401
+ className: cn$1("relative flex cursor-default items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground data-inset:pl-7 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className),
402
+ checked,
403
+ ...props,
404
+ children: [/* @__PURE__ */ jsx("span", {
405
+ className: "pointer-events-none absolute right-2 flex items-center justify-center",
406
+ "data-slot": "dropdown-menu-checkbox-item-indicator",
407
+ children: /* @__PURE__ */ jsx(DropdownMenu$1.ItemIndicator, { children: /* @__PURE__ */ jsx(CheckIcon, {}) })
408
+ }), children]
409
+ });
410
+ }
411
+ function DropdownMenuRadioGroup({ ...props }) {
412
+ return /* @__PURE__ */ jsx(DropdownMenu$1.RadioGroup, {
413
+ "data-slot": "dropdown-menu-radio-group",
414
+ ...props
415
+ });
416
+ }
417
+ function DropdownMenuRadioItem({ className, children, inset, ...props }) {
418
+ return /* @__PURE__ */ jsxs(DropdownMenu$1.RadioItem, {
419
+ "data-slot": "dropdown-menu-radio-item",
420
+ "data-inset": inset,
421
+ className: cn$1("relative flex cursor-default items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground data-inset:pl-7 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className),
422
+ ...props,
423
+ children: [/* @__PURE__ */ jsx("span", {
424
+ className: "pointer-events-none absolute right-2 flex items-center justify-center",
425
+ "data-slot": "dropdown-menu-radio-item-indicator",
426
+ children: /* @__PURE__ */ jsx(DropdownMenu$1.ItemIndicator, { children: /* @__PURE__ */ jsx(CheckIcon, {}) })
427
+ }), children]
428
+ });
429
+ }
430
+ function DropdownMenuLabel({ className, inset, ...props }) {
431
+ return /* @__PURE__ */ jsx(DropdownMenu$1.Label, {
432
+ "data-slot": "dropdown-menu-label",
433
+ "data-inset": inset,
434
+ className: cn$1("px-1.5 py-1 text-xs font-medium text-muted-foreground data-inset:pl-7", className),
435
+ ...props
436
+ });
437
+ }
438
+ function DropdownMenuSeparator({ className, ...props }) {
439
+ return /* @__PURE__ */ jsx(DropdownMenu$1.Separator, {
440
+ "data-slot": "dropdown-menu-separator",
441
+ className: cn$1("-mx-1 my-1 h-px bg-border", className),
442
+ ...props
443
+ });
444
+ }
445
+ function DropdownMenuShortcut({ className, ...props }) {
446
+ return /* @__PURE__ */ jsx("span", {
447
+ "data-slot": "dropdown-menu-shortcut",
448
+ className: cn$1("ml-auto text-xs tracking-widest text-muted-foreground group-focus/dropdown-menu-item:text-accent-foreground", className),
449
+ ...props
450
+ });
451
+ }
452
+ function DropdownMenuSub({ ...props }) {
453
+ return /* @__PURE__ */ jsx(DropdownMenu$1.Sub, {
454
+ "data-slot": "dropdown-menu-sub",
455
+ ...props
456
+ });
457
+ }
458
+ function DropdownMenuSubTrigger({ className, inset, children, ...props }) {
459
+ return /* @__PURE__ */ jsxs(DropdownMenu$1.SubTrigger, {
460
+ "data-slot": "dropdown-menu-sub-trigger",
461
+ "data-inset": inset,
462
+ className: cn$1("flex cursor-default items-center gap-1.5 rounded-md px-1.5 py-1 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-inset:pl-7 data-open:bg-accent data-open:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className),
463
+ ...props,
464
+ children: [children, /* @__PURE__ */ jsx(ChevronRightIcon, { className: "ml-auto" })]
465
+ });
466
+ }
467
+ function DropdownMenuSubContent({ className, ...props }) {
468
+ return /* @__PURE__ */ jsx(DropdownMenu$1.SubContent, {
469
+ "data-slot": "dropdown-menu-sub-content",
470
+ className: cn$1("z-50 min-w-[96px] origin-(--radix-dropdown-menu-content-transform-origin) overflow-hidden rounded-lg bg-popover p-1 text-popover-foreground shadow-lg ring-1 ring-foreground/10 duration-100 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 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),
471
+ ...props
472
+ });
473
+ }
474
+ // src/components/label.tsx
475
+ function Label({ className, ...props }) {
476
+ return /* @__PURE__ */ jsx(Label$1.Root, {
477
+ "data-slot": "label",
478
+ className: cn$1("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50", className),
479
+ ...props
480
+ });
481
+ }
482
+ // src/components/separator.tsx
483
+ function Separator({ className, orientation = "horizontal", decorative = true, ...props }) {
484
+ return /* @__PURE__ */ jsx(Separator$1.Root, {
485
+ "data-slot": "separator",
486
+ decorative,
487
+ orientation,
488
+ className: cn$1("shrink-0 bg-border data-horizontal:h-px data-horizontal:w-full data-vertical:w-px data-vertical:self-stretch", className),
489
+ ...props
490
+ });
491
+ }
492
+ // src/components/field.tsx
493
+ function FieldSet({ className, ...props }) {
494
+ return /* @__PURE__ */ jsx("fieldset", {
495
+ "data-slot": "field-set",
496
+ className: cn$1("flex flex-col gap-4 has-[>[data-slot=checkbox-group]]:gap-3 has-[>[data-slot=radio-group]]:gap-3", className),
497
+ ...props
498
+ });
499
+ }
500
+ function FieldLegend({ className, variant = "legend", ...props }) {
501
+ return /* @__PURE__ */ jsx("legend", {
502
+ "data-slot": "field-legend",
503
+ "data-variant": variant,
504
+ className: cn$1("mb-1.5 font-medium data-[variant=label]:text-sm data-[variant=legend]:text-base", className),
505
+ ...props
506
+ });
507
+ }
508
+ function FieldGroup({ className, ...props }) {
509
+ return /* @__PURE__ */ jsx("div", {
510
+ "data-slot": "field-group",
511
+ className: cn$1("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", className),
512
+ ...props
513
+ });
514
+ }
515
+ const fieldVariants = cva("group/field flex w-full gap-2 data-[invalid=true]:text-destructive", {
516
+ variants: { orientation: {
517
+ vertical: "flex-col *:w-full [&>.sr-only]:w-auto",
518
+ 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",
519
+ 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"
520
+ } },
521
+ defaultVariants: { orientation: "vertical" }
522
+ });
523
+ function Field({ className, orientation = "vertical", ...props }) {
524
+ return /* @__PURE__ */ jsx("div", {
525
+ role: "group",
526
+ "data-slot": "field",
527
+ "data-orientation": orientation,
528
+ className: cn$1(fieldVariants({ orientation }), className),
529
+ ...props
530
+ });
531
+ }
532
+ function FieldContent({ className, ...props }) {
533
+ return /* @__PURE__ */ jsx("div", {
534
+ "data-slot": "field-content",
535
+ className: cn$1("group/field-content flex flex-1 flex-col gap-0.5 leading-snug", className),
536
+ ...props
537
+ });
538
+ }
539
+ function FieldLabel({ className, ...props }) {
540
+ return /* @__PURE__ */ jsx(Label, {
541
+ "data-slot": "field-label",
542
+ className: cn$1("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-lg has-[>[data-slot=field]]:border has-[>[data-slot=field]]:not-has-[:disabled,[data-disabled]]:hover:bg-muted/50 has-[>[data-slot=field]]:has-[:focus-visible]:border-ring has-[>[data-slot=field]]:has-[:focus-visible]:ring-3 has-[>[data-slot=field]]:has-[:focus-visible]:ring-ring/50 *:data-[slot=field]:p-2.5 dark:has-data-checked:border-primary/20 dark:has-data-checked:bg-primary/10", "has-[>[data-slot=field]]:w-full has-[>[data-slot=field]]:flex-col", className),
543
+ ...props
544
+ });
545
+ }
546
+ function FieldTitle({ className, ...props }) {
547
+ return /* @__PURE__ */ jsx("div", {
548
+ "data-slot": "field-label",
549
+ className: cn$1("flex w-fit items-center gap-2 text-sm font-medium group-data-[disabled=true]/field:opacity-50", className),
550
+ ...props
551
+ });
552
+ }
553
+ function FieldDescription({ className, ...props }) {
554
+ return /* @__PURE__ */ jsx("p", {
555
+ "data-slot": "field-description",
556
+ className: cn$1("text-left text-sm leading-normal font-normal text-muted-foreground group-has-data-horizontal/field:text-balance [[data-variant=legend]+&]:-mt-1.5", "last:mt-0 nth-last-2:-mt-1", "[&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary", className),
557
+ ...props
558
+ });
559
+ }
560
+ function FieldSeparator({ children, className, ...props }) {
561
+ return /* @__PURE__ */ jsxs("div", {
562
+ "data-slot": "field-separator",
563
+ "data-content": !!children,
564
+ className: cn$1("relative -my-2 h-5 text-sm group-data-[variant=outline]/field-group:-mb-2", className),
565
+ ...props,
566
+ children: [/* @__PURE__ */ jsx(Separator, { className: "absolute inset-0 top-1/2" }), children && /* @__PURE__ */ jsx("span", {
567
+ className: "relative mx-auto block w-fit bg-background px-2 text-muted-foreground",
568
+ "data-slot": "field-separator-content",
569
+ children
570
+ })]
571
+ });
572
+ }
573
+ function FieldError({ className, children, errors, ...props }) {
574
+ const content = useMemo(() => {
575
+ if (children) return children;
576
+ if (!errors?.length) return null;
577
+ const uniqueErrors = [...new Map(errors.map((error) => [error?.message, error])).values()];
578
+ if (uniqueErrors.length == 1) return uniqueErrors[0]?.message;
579
+ return /* @__PURE__ */ jsx("ul", {
580
+ className: "ml-4 flex list-disc flex-col gap-1",
581
+ children: uniqueErrors.map((error, index) => error?.message && /* @__PURE__ */ jsx("li", { children: error.message }, index))
582
+ });
583
+ }, [children, errors]);
584
+ if (!content) return null;
585
+ return /* @__PURE__ */ jsx("div", {
586
+ role: "alert",
587
+ "data-slot": "field-error",
588
+ className: cn$1("text-sm font-normal text-destructive", className),
589
+ ...props,
590
+ children: content
591
+ });
592
+ }
593
+ // src/components/input.tsx
594
+ function Input({ className, type, ...props }) {
595
+ return /* @__PURE__ */ jsx("input", {
596
+ type,
597
+ "data-slot": "input",
598
+ className: cn$1("h-8 w-full min-w-0 rounded-lg border border-input bg-transparent px-2.5 py-1 text-base transition-colors outline-none file:inline-flex file:h-6 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:pointer-events-none disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40", className),
599
+ ...props
600
+ });
601
+ }
602
+ // src/components/pagination.tsx
603
+ function Pagination({ className, ...props }) {
604
+ return /* @__PURE__ */ jsx("nav", {
605
+ role: "navigation",
606
+ "aria-label": "Pagination",
607
+ "data-slot": "pagination",
608
+ className: cn$1("mx-auto flex w-full justify-center", className),
609
+ ...props
610
+ });
611
+ }
612
+ function PaginationContent({ className, ...props }) {
613
+ return /* @__PURE__ */ jsx("ul", {
614
+ "data-slot": "pagination-content",
615
+ className: cn$1("flex items-center gap-0.5", className),
616
+ ...props
617
+ });
618
+ }
619
+ function PaginationItem({ ...props }) {
620
+ return /* @__PURE__ */ jsx("li", {
621
+ "data-slot": "pagination-item",
622
+ ...props
623
+ });
624
+ }
625
+ function PaginationLink({ className, isActive, size = "icon", ...props }) {
626
+ return /* @__PURE__ */ jsx(Button, {
627
+ asChild: true,
628
+ variant: isActive ? "outline" : "ghost",
629
+ size,
630
+ className: cn$1(className),
631
+ children: /* @__PURE__ */ jsx("a", {
632
+ "aria-current": isActive ? "page" : void 0,
633
+ "data-slot": "pagination-link",
634
+ "data-active": isActive,
635
+ ...props
636
+ })
637
+ });
638
+ }
639
+ function PaginationPrevious({ className, text = "Previous", ...props }) {
640
+ return /* @__PURE__ */ jsxs(PaginationLink, {
641
+ "aria-label": "Previous page",
642
+ size: "default",
643
+ className: cn$1("pl-1.5!", className),
644
+ ...props,
645
+ children: [/* @__PURE__ */ jsx(ChevronLeftIcon, { "data-icon": "inline-start" }), /* @__PURE__ */ jsx("span", {
646
+ className: "hidden sm:block",
647
+ children: text
648
+ })]
649
+ });
650
+ }
651
+ function PaginationNext({ className, text = "Next", ...props }) {
652
+ return /* @__PURE__ */ jsxs(PaginationLink, {
653
+ "aria-label": "Next page",
654
+ size: "default",
655
+ className: cn$1("pr-1.5!", className),
656
+ ...props,
657
+ children: [/* @__PURE__ */ jsx("span", {
658
+ className: "hidden sm:block",
659
+ children: text
660
+ }), /* @__PURE__ */ jsx(ChevronRightIcon, { "data-icon": "inline-end" })]
661
+ });
662
+ }
663
+ function PaginationEllipsis({ className, ...props }) {
664
+ return /* @__PURE__ */ jsxs("span", {
665
+ "aria-hidden": true,
666
+ "data-slot": "pagination-ellipsis",
667
+ className: cn$1("flex size-8 items-center justify-center [&_svg:not([class*='size-'])]:size-4", className),
668
+ ...props,
669
+ children: [/* @__PURE__ */ jsx(MoreHorizontalIcon, {}), /* @__PURE__ */ jsx("span", {
670
+ className: "sr-only",
671
+ children: "More pages"
672
+ })]
673
+ });
674
+ }
675
+ // src/components/native-select.tsx
676
+ function NativeSelect({ className, size = "default", ...props }) {
677
+ return /* @__PURE__ */ jsxs("div", {
678
+ className: cn$1("group/native-select relative w-fit has-[select:disabled]:opacity-50", className),
679
+ "data-slot": "native-select-wrapper",
680
+ "data-size": size,
681
+ children: [/* @__PURE__ */ jsx("select", {
682
+ "data-slot": "native-select",
683
+ "data-size": size,
684
+ className: "h-8 w-full min-w-0 appearance-none rounded-lg border border-input bg-transparent py-1 pr-8 pl-2.5 text-sm transition-colors outline-none select-none selection:bg-primary selection:text-primary-foreground placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:pointer-events-none disabled:cursor-not-allowed aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 data-[size=sm]:h-7 data-[size=sm]:rounded-[min(var(--radius-md),10px)] data-[size=sm]:py-0.5 dark:bg-input/30 dark:hover:bg-input/50 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40",
685
+ ...props
686
+ }), /* @__PURE__ */ jsx(ChevronDownIcon, {
687
+ className: "pointer-events-none absolute top-1/2 right-2.5 size-4 -translate-y-1/2 text-muted-foreground select-none",
688
+ "aria-hidden": "true",
689
+ "data-slot": "native-select-icon"
690
+ })]
691
+ });
692
+ }
693
+ function NativeSelectOption({ className, ...props }) {
694
+ return /* @__PURE__ */ jsx("option", {
695
+ "data-slot": "native-select-option",
696
+ className: cn$1("bg-[Canvas] text-[CanvasText]", className),
697
+ ...props
698
+ });
699
+ }
700
+ function NativeSelectOptGroup({ className, ...props }) {
701
+ return /* @__PURE__ */ jsx("optgroup", {
702
+ "data-slot": "native-select-optgroup",
703
+ className: cn$1("bg-[Canvas] text-[CanvasText]", className),
704
+ ...props
705
+ });
706
+ }
707
+ // src/components/sheet.tsx
708
+ function Sheet({ ...props }) {
709
+ return /* @__PURE__ */ jsx(Dialog$1.Root, {
710
+ "data-slot": "sheet",
711
+ ...props
712
+ });
713
+ }
714
+ function SheetTrigger({ ...props }) {
715
+ return /* @__PURE__ */ jsx(Dialog$1.Trigger, {
716
+ "data-slot": "sheet-trigger",
717
+ ...props
718
+ });
719
+ }
720
+ function SheetClose({ ...props }) {
721
+ return /* @__PURE__ */ jsx(Dialog$1.Close, {
722
+ "data-slot": "sheet-close",
723
+ ...props
724
+ });
725
+ }
726
+ function SheetPortal({ ...props }) {
727
+ return /* @__PURE__ */ jsx(Dialog$1.Portal, {
728
+ "data-slot": "sheet-portal",
729
+ ...props
730
+ });
731
+ }
732
+ function SheetOverlay({ className, ...props }) {
733
+ return /* @__PURE__ */ jsx(Dialog$1.Overlay, {
734
+ "data-slot": "sheet-overlay",
735
+ className: cn$1("fixed inset-0 z-50 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0", className),
736
+ ...props
737
+ });
738
+ }
739
+ function SheetContent({ className, children, side = "right", showCloseButton = true, ...props }) {
740
+ return /* @__PURE__ */ jsxs(SheetPortal, { children: [/* @__PURE__ */ jsx(SheetOverlay, {}), /* @__PURE__ */ jsxs(Dialog$1.Content, {
741
+ "data-slot": "sheet-content",
742
+ "data-side": side,
743
+ className: cn$1("fixed z-50 flex flex-col gap-4 overflow-y-auto bg-popover bg-clip-padding text-sm text-popover-foreground shadow-lg transition duration-200 ease-in-out data-[side=bottom]:inset-x-0 data-[side=bottom]:bottom-0 data-[side=bottom]:h-auto data-[side=bottom]:border-t data-[side=left]:inset-y-0 data-[side=left]:left-0 data-[side=left]:h-full data-[side=left]:w-3/4 data-[side=left]:border-r data-[side=right]:inset-y-0 data-[side=right]:right-0 data-[side=right]:h-full data-[side=right]:w-3/4 data-[side=right]:border-l data-[side=top]:inset-x-0 data-[side=top]:top-0 data-[side=top]:h-auto data-[side=top]:border-b data-[side=left]:sm:max-w-sm data-[side=right]:sm:max-w-sm data-open:animate-in data-open:fade-in-0 data-[side=bottom]:data-open:slide-in-from-bottom-10 data-[side=left]:data-open:slide-in-from-left-10 data-[side=right]:data-open:slide-in-from-right-10 data-[side=top]:data-open:slide-in-from-top-10 data-closed:animate-out data-closed:fade-out-0 data-[side=bottom]:data-closed:slide-out-to-bottom-10 data-[side=left]:data-closed:slide-out-to-left-10 data-[side=right]:data-closed:slide-out-to-right-10 data-[side=top]:data-closed:slide-out-to-top-10", className),
744
+ ...props,
745
+ children: [children, showCloseButton && /* @__PURE__ */ jsx(Dialog$1.Close, {
746
+ "data-slot": "sheet-close",
747
+ asChild: true,
748
+ children: /* @__PURE__ */ jsxs(Button, {
749
+ variant: "ghost",
750
+ className: "absolute top-3 right-3",
751
+ size: "icon-sm",
752
+ children: [/* @__PURE__ */ jsx(XIcon, {}), /* @__PURE__ */ jsx("span", {
753
+ className: "sr-only",
754
+ children: "Close"
755
+ })]
756
+ })
757
+ })]
758
+ })] });
759
+ }
760
+ function SheetHeader({ className, ...props }) {
761
+ return /* @__PURE__ */ jsx("div", {
762
+ "data-slot": "sheet-header",
763
+ className: cn$1("flex flex-col gap-0.5 p-4", className),
764
+ ...props
765
+ });
766
+ }
767
+ function SheetFooter({ className, ...props }) {
768
+ return /* @__PURE__ */ jsx("div", {
769
+ "data-slot": "sheet-footer",
770
+ className: cn$1("mt-auto flex flex-col gap-2 p-4", className),
771
+ ...props
772
+ });
773
+ }
774
+ function SheetTitle({ className, ...props }) {
775
+ return /* @__PURE__ */ jsx(Dialog$1.Title, {
776
+ "data-slot": "sheet-title",
777
+ className: cn$1("font-heading text-base font-medium text-foreground", className),
778
+ ...props
779
+ });
780
+ }
781
+ function SheetDescription({ className, ...props }) {
782
+ return /* @__PURE__ */ jsx(Dialog$1.Description, {
783
+ "data-slot": "sheet-description",
784
+ className: cn$1("text-sm text-muted-foreground", className),
785
+ ...props
786
+ });
787
+ }
788
+ // src/components/skeleton.tsx
789
+ function Skeleton({ className, ...props }) {
790
+ return /* @__PURE__ */ jsx("div", {
791
+ "data-slot": "skeleton",
792
+ className: cn$1("animate-pulse rounded-md bg-muted", className),
793
+ ...props
794
+ });
795
+ }
796
+ // src/components/sonner.tsx
797
+ const Toaster = ({ ...props }) => {
798
+ return /* @__PURE__ */ jsx(Toaster$1, {
799
+ theme: "system",
800
+ className: "toaster group",
801
+ icons: {
802
+ success: /* @__PURE__ */ jsx(CircleCheckIcon, { className: "size-4" }),
803
+ info: /* @__PURE__ */ jsx(InfoIcon, { className: "size-4" }),
804
+ warning: /* @__PURE__ */ jsx(TriangleAlertIcon, { className: "size-4" }),
805
+ error: /* @__PURE__ */ jsx(OctagonXIcon, { className: "size-4" }),
806
+ loading: /* @__PURE__ */ jsx(Loader2Icon, { className: "size-4 animate-spin" })
807
+ },
808
+ style: {
809
+ "--normal-bg": "var(--popover)",
810
+ "--normal-text": "var(--popover-foreground)",
811
+ "--normal-border": "var(--border)",
812
+ "--border-radius": "var(--radius)"
813
+ },
814
+ toastOptions: { classNames: { toast: "cn-toast" } },
815
+ ...props
816
+ });
817
+ };
818
+ // src/components/switch.tsx
819
+ function Switch({ className, size = "default", ...props }) {
820
+ return /* @__PURE__ */ jsx(Switch$1.Root, {
821
+ "data-slot": "switch",
822
+ "data-size": size,
823
+ className: cn$1("peer group/switch relative inline-flex shrink-0 items-center rounded-full border border-transparent transition-all outline-none group-has-[:focus-visible]/field-label:border-transparent group-has-[:focus-visible]/field-label:ring-0 after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-3 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", className),
824
+ ...props,
825
+ children: /* @__PURE__ */ jsx(Switch$1.Thumb, {
826
+ "data-slot": "switch-thumb",
827
+ 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"
828
+ })
829
+ });
830
+ }
831
+ // src/components/table.tsx
832
+ function Table({ className, ...props }) {
833
+ return /* @__PURE__ */ jsx("div", {
834
+ "data-slot": "table-container",
835
+ className: "relative w-full overflow-x-auto",
836
+ children: /* @__PURE__ */ jsx("table", {
837
+ "data-slot": "table",
838
+ className: cn$1("w-full caption-bottom text-sm", className),
839
+ ...props
840
+ })
841
+ });
842
+ }
843
+ function TableHeader({ className, ...props }) {
844
+ return /* @__PURE__ */ jsx("thead", {
845
+ "data-slot": "table-header",
846
+ className: cn$1("[&_tr]:border-b", className),
847
+ ...props
848
+ });
849
+ }
850
+ function TableBody({ className, ...props }) {
851
+ return /* @__PURE__ */ jsx("tbody", {
852
+ "data-slot": "table-body",
853
+ className: cn$1("[&_tr:last-child]:border-0", className),
854
+ ...props
855
+ });
856
+ }
857
+ function TableFooter({ className, ...props }) {
858
+ return /* @__PURE__ */ jsx("tfoot", {
859
+ "data-slot": "table-footer",
860
+ className: cn$1("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0", className),
861
+ ...props
862
+ });
863
+ }
864
+ function TableRow({ className, ...props }) {
865
+ return /* @__PURE__ */ jsx("tr", {
866
+ "data-slot": "table-row",
867
+ className: cn$1("border-b transition-colors hover:bg-muted/50 has-aria-expanded:bg-muted/50 data-[state=selected]:bg-muted", className),
868
+ ...props
869
+ });
870
+ }
871
+ function TableHead({ className, ...props }) {
872
+ return /* @__PURE__ */ jsx("th", {
873
+ "data-slot": "table-head",
874
+ className: cn$1("h-10 px-2 text-left align-middle font-medium whitespace-nowrap text-foreground [&:has([role=checkbox])]:pr-0", className),
875
+ ...props
876
+ });
877
+ }
878
+ function TableCell({ className, ...props }) {
879
+ return /* @__PURE__ */ jsx("td", {
880
+ "data-slot": "table-cell",
881
+ className: cn$1("p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0", className),
882
+ ...props
883
+ });
884
+ }
885
+ function TableCaption({ className, ...props }) {
886
+ return /* @__PURE__ */ jsx("caption", {
887
+ "data-slot": "table-caption",
888
+ className: cn$1("mt-4 text-sm text-muted-foreground", className),
889
+ ...props
890
+ });
891
+ }
892
+ // src/components/tabs.tsx
893
+ function Tabs({ className, orientation = "horizontal", ...props }) {
894
+ return /* @__PURE__ */ jsx(Tabs$1.Root, {
895
+ "data-slot": "tabs",
896
+ "data-orientation": orientation,
897
+ className: cn$1("group/tabs flex gap-2 data-horizontal:flex-col", className),
898
+ ...props
899
+ });
900
+ }
901
+ const tabsListVariants = cva("group/tabs-list inline-flex w-fit items-center justify-center rounded-lg p-[3px] text-muted-foreground group-data-horizontal/tabs:h-8 group-data-vertical/tabs:h-fit group-data-vertical/tabs:flex-col data-[variant=line]:rounded-none", {
902
+ variants: { variant: {
903
+ default: "bg-muted",
904
+ line: "gap-1 bg-transparent"
905
+ } },
906
+ defaultVariants: { variant: "default" }
907
+ });
908
+ function TabsList({ className, variant = "default", ...props }) {
909
+ return /* @__PURE__ */ jsx(Tabs$1.List, {
910
+ "data-slot": "tabs-list",
911
+ "data-variant": variant,
912
+ className: cn$1(tabsListVariants({ variant }), className),
913
+ ...props
914
+ });
915
+ }
916
+ function TabsTrigger({ className, ...props }) {
917
+ return /* @__PURE__ */ jsx(Tabs$1.Trigger, {
918
+ "data-slot": "tabs-trigger",
919
+ className: cn$1("relative inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-1.5 py-0.5 text-sm font-medium whitespace-nowrap text-foreground/60 transition-all group-data-vertical/tabs:w-full group-data-vertical/tabs:justify-start hover:text-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1 focus-visible:outline-ring disabled:pointer-events-none disabled:opacity-50 has-data-[icon=inline-end]:pr-1 has-data-[icon=inline-start]:pl-1 dark:text-muted-foreground dark:hover:text-foreground group-data-[variant=default]/tabs-list:data-active:shadow-sm group-data-[variant=line]/tabs-list:data-active:shadow-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", "group-data-[variant=line]/tabs-list:bg-transparent group-data-[variant=line]/tabs-list:data-active:bg-transparent dark:group-data-[variant=line]/tabs-list:data-active:border-transparent dark:group-data-[variant=line]/tabs-list:data-active:bg-transparent", "data-active:bg-background data-active:text-foreground dark:data-active:border-input dark:data-active:bg-input/30 dark:data-active:text-foreground", "after:absolute after:bg-foreground after:opacity-0 after:transition-opacity group-data-horizontal/tabs:after:inset-x-0 group-data-horizontal/tabs:after:bottom-[-5px] group-data-horizontal/tabs:after:h-0.5 group-data-vertical/tabs:after:inset-y-0 group-data-vertical/tabs:after:-right-1 group-data-vertical/tabs:after:w-0.5 group-data-[variant=line]/tabs-list:data-active:after:opacity-100", className),
920
+ ...props
921
+ });
922
+ }
923
+ function TabsContent({ className, ...props }) {
924
+ return /* @__PURE__ */ jsx(Tabs$1.Content, {
925
+ "data-slot": "tabs-content",
926
+ className: cn$1("flex-1 rounded-md text-sm outline-none focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:outline-1 focus-visible:outline-ring", className),
927
+ ...props
928
+ });
929
+ }
930
+ // src/components/tooltip.tsx
931
+ function TooltipProvider({ delayDuration = 0, ...props }) {
932
+ return /* @__PURE__ */ jsx(Tooltip$1.Provider, {
933
+ "data-slot": "tooltip-provider",
934
+ delayDuration,
935
+ ...props
936
+ });
937
+ }
938
+ function Tooltip({ ...props }) {
939
+ return /* @__PURE__ */ jsx(Tooltip$1.Root, {
940
+ "data-slot": "tooltip",
941
+ ...props
942
+ });
943
+ }
944
+ function TooltipTrigger({ ...props }) {
945
+ return /* @__PURE__ */ jsx(Tooltip$1.Trigger, {
946
+ "data-slot": "tooltip-trigger",
947
+ ...props
948
+ });
949
+ }
950
+ function TooltipContent({ className, sideOffset = 0, children, ...props }) {
951
+ return /* @__PURE__ */ jsxs(Tooltip$1.Content, {
952
+ "data-slot": "tooltip-content",
953
+ sideOffset,
954
+ className: cn$1("z-50 inline-flex w-fit max-w-xs origin-(--radix-tooltip-content-transform-origin) items-center gap-1.5 rounded-md bg-foreground px-3 py-1.5 text-xs text-background has-data-[slot=kbd]:pr-1.5 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 **:data-[slot=kbd]:relative **:data-[slot=kbd]:isolate **:data-[slot=kbd]:z-50 **:data-[slot=kbd]:rounded-sm data-[state=delayed-open]:animate-in data-[state=delayed-open]:fade-in-0 data-[state=delayed-open]:zoom-in-95 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),
955
+ ...props,
956
+ children: [children, /* @__PURE__ */ jsx(Tooltip$1.Arrow, { className: "z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px] bg-foreground fill-foreground" })]
957
+ });
958
+ }
959
+ // src/form.tsx
960
+ /** `useForm` with a Zod schema as the resolver: values are validated and parsed by the schema. */
961
+ function useZodForm(schema, options) {
962
+ return useForm({
963
+ ...options,
964
+ resolver: zodResolver(schema),
965
+ shouldFocusError: true
966
+ });
967
+ }
968
+ /** A `<form>` bound to a react-hook-form instance; browser validation is off so errors are the form's own. */
969
+ function Form({ form, onSubmit, children, ...props }) {
970
+ return /* @__PURE__ */ jsx(FormProvider, {
971
+ ...form,
972
+ children: /* @__PURE__ */ jsx("form", {
973
+ noValidate: true,
974
+ ...props,
975
+ onSubmit: (event) => void form.handleSubmit(onSubmit)(event),
976
+ children
977
+ })
978
+ });
979
+ }
980
+ /** One labelled form control with its description and error message. */
981
+ function FormField({ control, name, label, description, orientation = "vertical", className, render }) {
982
+ const id = useId();
983
+ const { field, fieldState } = useController({
984
+ control,
985
+ name
986
+ });
987
+ const invalid = fieldState.error !== void 0;
988
+ const descriptionId = `${id}-description`;
989
+ const errorId = `${id}-error`;
990
+ const describedBy = [description === void 0 ? null : descriptionId, invalid ? errorId : null].filter((part) => part !== null);
991
+ const controlProps = {
992
+ id,
993
+ "aria-invalid": invalid ? true : void 0,
994
+ "aria-describedby": describedBy.length === 0 ? void 0 : describedBy.join(" ")
995
+ };
996
+ const labelled = /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(FieldLabel, {
997
+ htmlFor: id,
998
+ children: label
999
+ }), description === void 0 ? null : /* @__PURE__ */ jsx(FieldDescription, {
1000
+ id: descriptionId,
1001
+ children: description
1002
+ })] });
1003
+ const error = invalid ? /* @__PURE__ */ jsx(FieldError, {
1004
+ id: errorId,
1005
+ errors: [fieldState.error]
1006
+ }) : null;
1007
+ const rendered = render({
1008
+ field,
1009
+ fieldState,
1010
+ control: controlProps
1011
+ });
1012
+ return /* @__PURE__ */ jsx(Field, {
1013
+ orientation,
1014
+ "data-invalid": invalid ? true : void 0,
1015
+ className,
1016
+ children: orientation === "horizontal" ? /* @__PURE__ */ jsxs(Fragment, { children: [rendered, /* @__PURE__ */ jsxs(FieldContent, { children: [labelled, error] })] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
1017
+ labelled,
1018
+ rendered,
1019
+ error
1020
+ ] })
1021
+ });
1022
+ }
1023
+ /** The form-level error (`form.setError("root", …)`, e.g. a server rejection), announced when it appears. */
1024
+ function FormRootError({ className }) {
1025
+ const { errors } = useFormState();
1026
+ const message = errors.root?.message;
1027
+ if (message === void 0) return null;
1028
+ return /* @__PURE__ */ jsx(Alert, {
1029
+ variant: "destructive",
1030
+ className,
1031
+ children: /* @__PURE__ */ jsx(AlertDescription, { children: message })
1032
+ });
1033
+ }
1034
+ export { Alert, AlertAction, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogMedia, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AlertTitle, Badge, Button, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Checkbox, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, Field, FieldContent, FieldDescription, FieldError, FieldGroup, FieldLabel, FieldLegend, FieldSeparator, FieldSet, FieldTitle, Form, FormField, FormRootError, Input, Label, NativeSelect, NativeSelectOptGroup, NativeSelectOption, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger, Skeleton, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Toaster, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, badgeVariants, buttonVariants, cn, tabsListVariants, toast, useZodForm };
1035
+
1036
+ //# sourceMappingURL=index.js.map