@chaibuilder/sdk 1.3.0-beta.8 → 1.3.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.
Files changed (63) hide show
  1. package/dist/CodeEditor-C94XQmvL.cjs +1 -0
  2. package/dist/CodeEditor-D5t7A9Po.js +77 -0
  3. package/dist/STRINGS-eiGM83kj.js +7 -0
  4. package/dist/STRINGS-ew98weUe.cjs +1 -0
  5. package/dist/Topbar-Bnxt9C5B.js +113 -0
  6. package/dist/Topbar-DFm3YQZi.cjs +1 -0
  7. package/dist/UnsplashImages-BWT3eyq3.cjs +1 -0
  8. package/dist/UnsplashImages-D-9aNQGK.js +189 -0
  9. package/dist/UploadImages-CntfFAoV.cjs +1 -0
  10. package/dist/UploadImages-CrAaKlC1.js +101 -0
  11. package/dist/context-menu-BbqLeYFX.js +979 -0
  12. package/dist/context-menu-DfAXjmc8.cjs +1 -0
  13. package/dist/controls-C4n5ycp4.cjs +1 -0
  14. package/dist/controls-Com-zYCq.js +234 -0
  15. package/dist/core.cjs +1 -82
  16. package/dist/core.d.ts +10 -5
  17. package/dist/core.js +74 -74
  18. package/dist/iconBase-Cn2BsTrq.cjs +1 -0
  19. package/dist/iconBase-DHfFLkem.js +124 -0
  20. package/dist/index-C9LOYt3W.cjs +63 -0
  21. package/dist/index-CcLk7_o6.js +9319 -0
  22. package/dist/jsx-runtime-BYECrxsp.cjs +30 -0
  23. package/dist/jsx-runtime-DGlMoOmv.js +630 -0
  24. package/dist/plugin-BOEoR5jk.js +44 -0
  25. package/dist/plugin-COMQcYlW.cjs +1 -0
  26. package/dist/plugin-Dw854zFv.js +107 -0
  27. package/dist/plugin-I9XxF65G.cjs +1 -0
  28. package/dist/render.cjs +2 -208
  29. package/dist/render.js +125 -171
  30. package/dist/runtime.cjs +1 -26
  31. package/dist/runtime.js +16 -16
  32. package/dist/style.css +2 -1529
  33. package/dist/tailwind.cjs +1 -78
  34. package/dist/tailwind.js +19 -21
  35. package/dist/ui.cjs +1 -392
  36. package/dist/ui.js +257 -268
  37. package/dist/web-blocks.cjs +3 -1241
  38. package/dist/web-blocks.js +555 -764
  39. package/package.json +1 -1
  40. package/dist/CodeEditor-1LboGb1I.cjs +0 -91
  41. package/dist/CodeEditor-BKgZeXwz.js +0 -91
  42. package/dist/STRINGS-3Sn_NeX1.cjs +0 -9
  43. package/dist/STRINGS-DdpfVlsV.js +0 -10
  44. package/dist/Topbar-B8IS6y4H.js +0 -135
  45. package/dist/Topbar-DXC7DFU1.cjs +0 -135
  46. package/dist/UnsplashImages-CjJ5szAy.cjs +0 -215
  47. package/dist/UnsplashImages-Ck9qpKR0.js +0 -215
  48. package/dist/UploadImages-DW1mj4MB.cjs +0 -117
  49. package/dist/UploadImages-DgAMZ8GR.js +0 -117
  50. package/dist/context-menu-BLbuduri.cjs +0 -1073
  51. package/dist/context-menu-BgtRnByf.js +0 -1042
  52. package/dist/controls-8EZmm0Ns.js +0 -234
  53. package/dist/controls-DaW52RjX.cjs +0 -233
  54. package/dist/iconBase-BSrIcOaG.cjs +0 -146
  55. package/dist/iconBase-CWgVxu0A.js +0 -147
  56. package/dist/index-Bjw2sUN2.cjs +0 -12139
  57. package/dist/index-D8_rAW8B.js +0 -12124
  58. package/dist/jsx-runtime-B6vEU3CM.cjs +0 -925
  59. package/dist/jsx-runtime-ClFauRgV.js +0 -926
  60. package/dist/plugin-BYwesM58.cjs +0 -54
  61. package/dist/plugin-BiDLHDo3.cjs +0 -114
  62. package/dist/plugin-BukD7GJR.js +0 -115
  63. package/dist/plugin-tVAEvXiS.js +0 -55
@@ -1,1042 +0,0 @@
1
- import { j as jsxRuntimeExports } from "./jsx-runtime-ClFauRgV.js";
2
- import * as SwitchPrimitives from "@radix-ui/react-switch";
3
- import * as React from "react";
4
- import * as AccordionPrimitive from "@radix-ui/react-accordion";
5
- import { ChevronDownIcon, Cross2Icon, CaretSortIcon, CheckIcon, ChevronRightIcon, DotFilledIcon, MagnifyingGlassIcon } from "@radix-ui/react-icons";
6
- import { cva } from "class-variance-authority";
7
- import * as AlertDialogPrimitive from "@radix-ui/react-alert-dialog";
8
- import { Slot } from "@radix-ui/react-slot";
9
- import * as LabelPrimitive from "@radix-ui/react-label";
10
- import * as ScrollAreaPrimitive from "@radix-ui/react-scroll-area";
11
- import * as TabsPrimitive from "@radix-ui/react-tabs";
12
- import * as TooltipPrimitive from "@radix-ui/react-tooltip";
13
- import * as PopoverPrimitive from "@radix-ui/react-popover";
14
- import * as HoverCardPrimitive from "@radix-ui/react-hover-card";
15
- import * as SelectPrimitive from "@radix-ui/react-select";
16
- import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu";
17
- import * as SeparatorPrimitive from "@radix-ui/react-separator";
18
- import * as ToastPrimitives from "@radix-ui/react-toast";
19
- import { Command as Command$1 } from "cmdk";
20
- import * as SheetPrimitive from "@radix-ui/react-dialog";
21
- import * as ContextMenuPrimitive from "@radix-ui/react-context-menu";
22
- import { clsx } from "clsx";
23
- import { twMerge } from "tailwind-merge";
24
- const cn = (...inputs) => twMerge(clsx(inputs));
25
- const Switch = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntimeExports.jsx(
26
- SwitchPrimitives.Root,
27
- {
28
- className: cn(
29
- "peer inline-flex h-[24px] w-[44px] shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-slate-400 focus-visible:ring-offset-2 focus-visible:ring-offset-white disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-slate-900 data-[state=unchecked]:bg-slate-200 dark:focus-visible:ring-slate-800 dark:focus-visible:ring-offset-slate-950 dark:data-[state=checked]:bg-slate-50 dark:data-[state=unchecked]:bg-slate-800",
30
- className
31
- ),
32
- ...props,
33
- ref,
34
- children: /* @__PURE__ */ jsxRuntimeExports.jsx(
35
- SwitchPrimitives.Thumb,
36
- {
37
- className: cn(
38
- "pointer-events-none block h-5 w-5 rounded-full bg-white shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0 dark:bg-slate-950"
39
- )
40
- }
41
- )
42
- }
43
- ));
44
- Switch.displayName = SwitchPrimitives.Root.displayName;
45
- const buttonVariants = cva(
46
- "inline-flex items-center justify-center rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50",
47
- {
48
- variants: {
49
- variant: {
50
- default: "bg-primary text-primary-foreground shadow hover:bg-primary/90",
51
- destructive: "bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",
52
- outline: "border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",
53
- secondary: "bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",
54
- ghost: "hover:bg-accent hover:text-accent-foreground",
55
- link: "text-primary underline-offset-4 hover:underline"
56
- },
57
- size: {
58
- default: "h-9 px-4 py-2",
59
- sm: "h-8 rounded-md px-3 text-xs",
60
- lg: "h-10 rounded-md px-8",
61
- icon: "h-9 w-9"
62
- }
63
- },
64
- defaultVariants: {
65
- variant: "default",
66
- size: "default"
67
- }
68
- }
69
- );
70
- const Button = React.forwardRef(
71
- ({ className, variant, size, asChild = false, ...props }, ref) => {
72
- const Comp = asChild ? Slot : "button";
73
- return /* @__PURE__ */ jsxRuntimeExports.jsx(Comp, { className: cn(buttonVariants({ variant, size, className })), ref, ...props });
74
- }
75
- );
76
- Button.displayName = "Button";
77
- const Accordion = AccordionPrimitive.Root;
78
- const AccordionItem = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntimeExports.jsx(AccordionPrimitive.Item, { ref, className: cn("border-b", className), ...props }));
79
- AccordionItem.displayName = "AccordionItem";
80
- const AccordionTrigger = React.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntimeExports.jsx(AccordionPrimitive.Header, { className: "flex", children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
81
- AccordionPrimitive.Trigger,
82
- {
83
- ref,
84
- className: cn(
85
- "flex flex-1 items-center justify-between py-4 text-sm font-medium transition-all hover:underline [&[data-state=open]>svg]:rotate-180",
86
- className
87
- ),
88
- ...props,
89
- children: [
90
- children,
91
- props.hideArrow ? null : /* @__PURE__ */ jsxRuntimeExports.jsx(ChevronDownIcon, { className: "h-4 w-4 shrink-0 text-muted-foreground transition-transform duration-200" })
92
- ]
93
- }
94
- ) }));
95
- AccordionTrigger.displayName = AccordionPrimitive.Trigger.displayName;
96
- const AccordionContent = React.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntimeExports.jsx(
97
- AccordionPrimitive.Content,
98
- {
99
- ref,
100
- className: cn(
101
- "text-sm data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",
102
- className
103
- ),
104
- ...props,
105
- children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "pb-4 pt-0", children })
106
- }
107
- ));
108
- AccordionContent.displayName = AccordionPrimitive.Content.displayName;
109
- const badgeVariants = cva(
110
- "inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",
111
- {
112
- variants: {
113
- variant: {
114
- default: "border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80",
115
- secondary: "border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",
116
- destructive: "border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80",
117
- outline: "text-foreground"
118
- }
119
- },
120
- defaultVariants: {
121
- variant: "default"
122
- }
123
- }
124
- );
125
- const Badge = ({ className, variant, ...props }) => /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: cn(badgeVariants({ variant }), className), ...props });
126
- const AlertDialog = AlertDialogPrimitive.Root;
127
- const AlertDialogTrigger = AlertDialogPrimitive.Trigger;
128
- const AlertDialogPortal = ({ className, ...props }) => /* @__PURE__ */ jsxRuntimeExports.jsx(AlertDialogPrimitive.Portal, { className: cn(className), ...props });
129
- AlertDialogPortal.displayName = AlertDialogPrimitive.Portal.displayName;
130
- const AlertDialogOverlay = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntimeExports.jsx(
131
- AlertDialogPrimitive.Overlay,
132
- {
133
- className: cn(
134
- "fixed inset-0 z-50 bg-background/80 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",
135
- className
136
- ),
137
- ...props,
138
- ref
139
- }
140
- ));
141
- AlertDialogOverlay.displayName = AlertDialogPrimitive.Overlay.displayName;
142
- const AlertDialogContent = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntimeExports.jsxs(AlertDialogPortal, { children: [
143
- /* @__PURE__ */ jsxRuntimeExports.jsx(AlertDialogOverlay, {}),
144
- /* @__PURE__ */ jsxRuntimeExports.jsx(
145
- AlertDialogPrimitive.Content,
146
- {
147
- ref,
148
- className: cn(
149
- "fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg md:w-full",
150
- className
151
- ),
152
- ...props
153
- }
154
- )
155
- ] }));
156
- AlertDialogContent.displayName = AlertDialogPrimitive.Content.displayName;
157
- const AlertDialogHeader = ({ className, ...props }) => /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: cn("flex flex-col space-y-2 text-center sm:text-left", className), ...props });
158
- AlertDialogHeader.displayName = "AlertDialogHeader";
159
- const AlertDialogFooter = ({ className, ...props }) => /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: cn("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2", className), ...props });
160
- AlertDialogFooter.displayName = "AlertDialogFooter";
161
- const AlertDialogTitle = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntimeExports.jsx(AlertDialogPrimitive.Title, { ref, className: cn("text-lg font-semibold", className), ...props }));
162
- AlertDialogTitle.displayName = AlertDialogPrimitive.Title.displayName;
163
- const AlertDialogDescription = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntimeExports.jsx(AlertDialogPrimitive.Description, { ref, className: cn("text-sm text-muted-foreground", className), ...props }));
164
- AlertDialogDescription.displayName = AlertDialogPrimitive.Description.displayName;
165
- const AlertDialogAction = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntimeExports.jsx(AlertDialogPrimitive.Action, { ref, className: cn(buttonVariants(), className), ...props }));
166
- AlertDialogAction.displayName = AlertDialogPrimitive.Action.displayName;
167
- const AlertDialogCancel = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntimeExports.jsx(
168
- AlertDialogPrimitive.Cancel,
169
- {
170
- ref,
171
- className: cn(buttonVariants({ variant: "outline" }), "mt-2 sm:mt-0", className),
172
- ...props
173
- }
174
- ));
175
- AlertDialogCancel.displayName = AlertDialogPrimitive.Cancel.displayName;
176
- const Dialog = SheetPrimitive.Root;
177
- const DialogTrigger = SheetPrimitive.Trigger;
178
- const DialogPortal = ({ className, ...props }) => /* @__PURE__ */ jsxRuntimeExports.jsx(SheetPrimitive.Portal, { className: cn(className), ...props });
179
- DialogPortal.displayName = SheetPrimitive.Portal.displayName;
180
- const DialogOverlay = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntimeExports.jsx(
181
- SheetPrimitive.Overlay,
182
- {
183
- ref,
184
- className: cn(
185
- "fixed inset-0 z-50 bg-background/80 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",
186
- className
187
- ),
188
- ...props
189
- }
190
- ));
191
- DialogOverlay.displayName = SheetPrimitive.Overlay.displayName;
192
- const DialogContent = React.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntimeExports.jsxs(DialogPortal, { children: [
193
- /* @__PURE__ */ jsxRuntimeExports.jsx(DialogOverlay, {}),
194
- /* @__PURE__ */ jsxRuntimeExports.jsxs(
195
- SheetPrimitive.Content,
196
- {
197
- ref,
198
- className: cn(
199
- "fixed left-[50%] top-[50%] z-[999] grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg md:w-full",
200
- className
201
- ),
202
- ...props,
203
- children: [
204
- children,
205
- /* @__PURE__ */ jsxRuntimeExports.jsxs(SheetPrimitive.Close, { className: "absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground", children: [
206
- /* @__PURE__ */ jsxRuntimeExports.jsx(Cross2Icon, { className: "h-4 w-4" }),
207
- /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "sr-only", children: "Close" })
208
- ] })
209
- ]
210
- }
211
- )
212
- ] }));
213
- DialogContent.displayName = SheetPrimitive.Content.displayName;
214
- const DialogHeader = ({ className, ...props }) => /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: cn("flex flex-col space-y-1.5 text-center sm:text-left", className), ...props });
215
- DialogHeader.displayName = "DialogHeader";
216
- const DialogFooter = ({ className, ...props }) => /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: cn("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2", className), ...props });
217
- DialogFooter.displayName = "DialogFooter";
218
- const DialogTitle = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntimeExports.jsx(
219
- SheetPrimitive.Title,
220
- {
221
- ref,
222
- className: cn("text-lg font-semibold leading-none tracking-tight", className),
223
- ...props
224
- }
225
- ));
226
- DialogTitle.displayName = SheetPrimitive.Title.displayName;
227
- const DialogDescription = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntimeExports.jsx(SheetPrimitive.Description, { ref, className: cn("text-sm text-muted-foreground", className), ...props }));
228
- DialogDescription.displayName = SheetPrimitive.Description.displayName;
229
- const Card = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntimeExports.jsx("div", { ref, className: cn("rounded-xl border bg-card text-card-foreground shadow", className), ...props }));
230
- Card.displayName = "Card";
231
- const CardHeader = React.forwardRef(
232
- ({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntimeExports.jsx("div", { ref, className: cn("flex flex-col space-y-1.5 p-6", className), ...props })
233
- );
234
- CardHeader.displayName = "CardHeader";
235
- const CardTitle = React.forwardRef(
236
- ({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntimeExports.jsx("h3", { ref, className: cn("font-semibold leading-none tracking-tight", className), ...props })
237
- );
238
- CardTitle.displayName = "CardTitle";
239
- const CardDescription = React.forwardRef(
240
- ({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntimeExports.jsx("p", { ref, className: cn("text-sm text-muted-foreground", className), ...props })
241
- );
242
- CardDescription.displayName = "CardDescription";
243
- const CardContent = React.forwardRef(
244
- ({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntimeExports.jsx("div", { ref, className: cn("p-6 pt-0", className), ...props })
245
- );
246
- CardContent.displayName = "CardContent";
247
- const CardFooter = React.forwardRef(
248
- ({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntimeExports.jsx("div", { ref, className: cn(" flex items-center p-6 pt-0", className), ...props })
249
- );
250
- CardFooter.displayName = "CardFooter";
251
- const Input = React.forwardRef(({ className, type, ...props }, ref) => /* @__PURE__ */ jsxRuntimeExports.jsx(
252
- "input",
253
- {
254
- type,
255
- className: cn(
256
- "flex h-9 w-full rounded-md border border-border bg-background px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",
257
- className
258
- ),
259
- ref,
260
- ...props,
261
- autoCapitalize: "off",
262
- autoCorrect: "off",
263
- spellCheck: "false"
264
- }
265
- ));
266
- Input.displayName = "Input";
267
- const labelVariants = cva("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70");
268
- const Label = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntimeExports.jsx(LabelPrimitive.Root, { ref, className: cn(labelVariants(), className), ...props }));
269
- Label.displayName = LabelPrimitive.Root.displayName;
270
- const Textarea = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntimeExports.jsx(
271
- "textarea",
272
- {
273
- className: cn(
274
- "flex min-h-[60px] w-full rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",
275
- className
276
- ),
277
- ref,
278
- ...props,
279
- autoCapitalize: "off",
280
- autoCorrect: "off",
281
- spellCheck: "false"
282
- }
283
- ));
284
- Textarea.displayName = "Textarea";
285
- const ScrollArea = React.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntimeExports.jsxs(ScrollAreaPrimitive.Root, { ref, className: cn("relative overflow-hidden", className), ...props, children: [
286
- /* @__PURE__ */ jsxRuntimeExports.jsx(ScrollAreaPrimitive.Viewport, { className: "h-full w-full rounded-[inherit]", children }),
287
- /* @__PURE__ */ jsxRuntimeExports.jsx(ScrollBar, {}),
288
- /* @__PURE__ */ jsxRuntimeExports.jsx(ScrollAreaPrimitive.Corner, {})
289
- ] }));
290
- ScrollArea.displayName = ScrollAreaPrimitive.Root.displayName;
291
- const ScrollBar = React.forwardRef(({ className, orientation = "vertical", ...props }, ref) => /* @__PURE__ */ jsxRuntimeExports.jsx(
292
- ScrollAreaPrimitive.ScrollAreaScrollbar,
293
- {
294
- ref,
295
- orientation,
296
- className: cn(
297
- "flex touch-none select-none transition-colors",
298
- orientation === "vertical" && "h-full w-2.5 border-l border-l-transparent p-[1px]",
299
- orientation === "horizontal" && "h-2.5 border-t border-t-transparent p-[1px]",
300
- className
301
- ),
302
- ...props,
303
- children: /* @__PURE__ */ jsxRuntimeExports.jsx(ScrollAreaPrimitive.ScrollAreaThumb, { className: "relative flex-1 rounded-full bg-border" })
304
- }
305
- ));
306
- ScrollBar.displayName = ScrollAreaPrimitive.ScrollAreaScrollbar.displayName;
307
- const Tabs = TabsPrimitive.Root;
308
- const TabsList = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntimeExports.jsx(
309
- TabsPrimitive.List,
310
- {
311
- ref,
312
- className: cn(
313
- "inline-flex h-9 items-center justify-center rounded-lg bg-muted p-1 text-muted-foreground",
314
- className
315
- ),
316
- ...props
317
- }
318
- ));
319
- TabsList.displayName = TabsPrimitive.List.displayName;
320
- const TabsTrigger = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntimeExports.jsx(
321
- TabsPrimitive.Trigger,
322
- {
323
- ref,
324
- className: cn(
325
- "inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 py-1 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow",
326
- className
327
- ),
328
- ...props
329
- }
330
- ));
331
- TabsTrigger.displayName = TabsPrimitive.Trigger.displayName;
332
- const TabsContent = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntimeExports.jsx(
333
- TabsPrimitive.Content,
334
- {
335
- ref,
336
- className: cn(
337
- "mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
338
- className
339
- ),
340
- ...props
341
- }
342
- ));
343
- TabsContent.displayName = TabsPrimitive.Content.displayName;
344
- const TooltipPortal = TooltipPrimitive.Portal;
345
- const TooltipProvider = TooltipPrimitive.Provider;
346
- const Tooltip = TooltipPrimitive.Root;
347
- const TooltipTrigger = TooltipPrimitive.Trigger;
348
- const TooltipContent = React.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsxRuntimeExports.jsx(
349
- TooltipPrimitive.Content,
350
- {
351
- ref,
352
- sideOffset,
353
- className: cn(
354
- "z-50 overflow-hidden rounded-md bg-primary px-3 py-1.5 text-xs text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 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",
355
- className
356
- ),
357
- ...props
358
- }
359
- ));
360
- TooltipContent.displayName = TooltipPrimitive.Content.displayName;
361
- const Popover = PopoverPrimitive.Root;
362
- const PopoverTrigger = PopoverPrimitive.Trigger;
363
- const PopoverContent = React.forwardRef(({ className, align = "center", sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsxRuntimeExports.jsx(PopoverPrimitive.Portal, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(
364
- PopoverPrimitive.Content,
365
- {
366
- ref,
367
- align,
368
- sideOffset,
369
- className: cn(
370
- "z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 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",
371
- className
372
- ),
373
- ...props
374
- }
375
- ) }));
376
- PopoverContent.displayName = PopoverPrimitive.Content.displayName;
377
- const HoverCard = HoverCardPrimitive.Root;
378
- const HoverCardTrigger = HoverCardPrimitive.Trigger;
379
- const HoverCardContent = React.forwardRef(({ className, align = "center", sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsxRuntimeExports.jsx(
380
- HoverCardPrimitive.Content,
381
- {
382
- ref,
383
- align,
384
- sideOffset,
385
- className: cn(
386
- "z-50 w-64 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 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",
387
- className
388
- ),
389
- ...props
390
- }
391
- ));
392
- HoverCardContent.displayName = HoverCardPrimitive.Content.displayName;
393
- const Select = SelectPrimitive.Root;
394
- const SelectGroup = SelectPrimitive.Group;
395
- const SelectValue = SelectPrimitive.Value;
396
- const SelectTrigger = React.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntimeExports.jsxs(
397
- SelectPrimitive.Trigger,
398
- {
399
- ref,
400
- className: cn(
401
- "flex h-9 w-full items-center justify-between rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50",
402
- className
403
- ),
404
- ...props,
405
- children: [
406
- children,
407
- /* @__PURE__ */ jsxRuntimeExports.jsx(SelectPrimitive.Icon, { asChild: true, children: /* @__PURE__ */ jsxRuntimeExports.jsx(CaretSortIcon, { className: "h-4 w-4 opacity-50" }) })
408
- ]
409
- }
410
- ));
411
- SelectTrigger.displayName = SelectPrimitive.Trigger.displayName;
412
- const SelectContent = React.forwardRef(({ className, children, position = "popper", ...props }, ref) => /* @__PURE__ */ jsxRuntimeExports.jsx(SelectPrimitive.Portal, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(
413
- SelectPrimitive.Content,
414
- {
415
- ref,
416
- className: cn(
417
- "relative z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 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",
418
- position === "popper" && "data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",
419
- className
420
- ),
421
- position,
422
- ...props,
423
- children: /* @__PURE__ */ jsxRuntimeExports.jsx(
424
- SelectPrimitive.Viewport,
425
- {
426
- className: cn(
427
- "p-1",
428
- position === "popper" && "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"
429
- ),
430
- children
431
- }
432
- )
433
- }
434
- ) }));
435
- SelectContent.displayName = SelectPrimitive.Content.displayName;
436
- const SelectLabel = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntimeExports.jsx(SelectPrimitive.Label, { ref, className: cn("px-2 py-1.5 text-sm font-semibold", className), ...props }));
437
- SelectLabel.displayName = SelectPrimitive.Label.displayName;
438
- const SelectItem = React.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntimeExports.jsxs(
439
- SelectPrimitive.Item,
440
- {
441
- ref,
442
- className: cn(
443
- "relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
444
- className
445
- ),
446
- ...props,
447
- children: [
448
- /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "absolute right-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsxRuntimeExports.jsx(SelectPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(CheckIcon, { className: "h-4 w-4" }) }) }),
449
- /* @__PURE__ */ jsxRuntimeExports.jsx(SelectPrimitive.ItemText, { children })
450
- ]
451
- }
452
- ));
453
- SelectItem.displayName = SelectPrimitive.Item.displayName;
454
- const SelectSeparator = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntimeExports.jsx(SelectPrimitive.Separator, { ref, className: cn("-mx-1 my-1 h-px bg-muted", className), ...props }));
455
- SelectSeparator.displayName = SelectPrimitive.Separator.displayName;
456
- const DropdownMenu = DropdownMenuPrimitive.Root;
457
- const DropdownMenuTrigger = DropdownMenuPrimitive.Trigger;
458
- const DropdownMenuGroup = DropdownMenuPrimitive.Group;
459
- const DropdownMenuPortal = DropdownMenuPrimitive.Portal;
460
- const DropdownMenuSub = DropdownMenuPrimitive.Sub;
461
- const DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup;
462
- const DropdownMenuSubTrigger = React.forwardRef(({ className, inset, children, ...props }, ref) => /* @__PURE__ */ jsxRuntimeExports.jsxs(
463
- DropdownMenuPrimitive.SubTrigger,
464
- {
465
- ref,
466
- className: cn(
467
- "flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent",
468
- inset && "pl-8",
469
- className
470
- ),
471
- ...props,
472
- children: [
473
- children,
474
- /* @__PURE__ */ jsxRuntimeExports.jsx(ChevronRightIcon, { className: "ml-auto h-4 w-4" })
475
- ]
476
- }
477
- ));
478
- DropdownMenuSubTrigger.displayName = DropdownMenuPrimitive.SubTrigger.displayName;
479
- const DropdownMenuSubContent = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntimeExports.jsx(
480
- DropdownMenuPrimitive.SubContent,
481
- {
482
- ref,
483
- className: cn(
484
- "z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 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",
485
- className
486
- ),
487
- ...props
488
- }
489
- ));
490
- DropdownMenuSubContent.displayName = DropdownMenuPrimitive.SubContent.displayName;
491
- const DropdownMenuContent = React.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsxRuntimeExports.jsx(DropdownMenuPrimitive.Portal, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(
492
- DropdownMenuPrimitive.Content,
493
- {
494
- ref,
495
- sideOffset,
496
- className: cn(
497
- "z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md",
498
- "data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 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",
499
- className
500
- ),
501
- ...props
502
- }
503
- ) }));
504
- DropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName;
505
- const DropdownMenuItem = React.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsxRuntimeExports.jsx(
506
- DropdownMenuPrimitive.Item,
507
- {
508
- ref,
509
- className: cn(
510
- "relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
511
- inset && "pl-8",
512
- className
513
- ),
514
- ...props
515
- }
516
- ));
517
- DropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName;
518
- const DropdownMenuCheckboxItem = React.forwardRef(({ className, children, checked, ...props }, ref) => /* @__PURE__ */ jsxRuntimeExports.jsxs(
519
- DropdownMenuPrimitive.CheckboxItem,
520
- {
521
- ref,
522
- className: cn(
523
- "relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
524
- className
525
- ),
526
- checked,
527
- ...props,
528
- children: [
529
- /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsxRuntimeExports.jsx(DropdownMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(CheckIcon, { className: "h-4 w-4" }) }) }),
530
- children
531
- ]
532
- }
533
- ));
534
- DropdownMenuCheckboxItem.displayName = DropdownMenuPrimitive.CheckboxItem.displayName;
535
- const DropdownMenuRadioItem = React.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntimeExports.jsxs(
536
- DropdownMenuPrimitive.RadioItem,
537
- {
538
- ref,
539
- className: cn(
540
- "relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
541
- className
542
- ),
543
- ...props,
544
- children: [
545
- /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsxRuntimeExports.jsx(DropdownMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(DotFilledIcon, { className: "h-4 w-4 fill-current" }) }) }),
546
- children
547
- ]
548
- }
549
- ));
550
- DropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName;
551
- const DropdownMenuLabel = React.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsxRuntimeExports.jsx(
552
- DropdownMenuPrimitive.Label,
553
- {
554
- ref,
555
- className: cn("px-2 py-1.5 text-sm font-semibold", inset && "pl-8", className),
556
- ...props
557
- }
558
- ));
559
- DropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName;
560
- const DropdownMenuSeparator = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntimeExports.jsx(DropdownMenuPrimitive.Separator, { ref, className: cn("-mx-1 my-1 h-px bg-muted", className), ...props }));
561
- DropdownMenuSeparator.displayName = DropdownMenuPrimitive.Separator.displayName;
562
- const DropdownMenuShortcut = ({ className, ...props }) => /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: cn("ml-auto text-xs tracking-widest opacity-60", className), ...props });
563
- DropdownMenuShortcut.displayName = "DropdownMenuShortcut";
564
- const Separator = React.forwardRef(({ className, orientation = "horizontal", decorative = true, ...props }, ref) => /* @__PURE__ */ jsxRuntimeExports.jsx(
565
- SeparatorPrimitive.Root,
566
- {
567
- ref,
568
- decorative,
569
- orientation,
570
- className: cn("shrink-0 bg-border", orientation === "horizontal" ? "h-[1px] w-full" : "h-full w-[1px]", className),
571
- ...props
572
- }
573
- ));
574
- Separator.displayName = SeparatorPrimitive.Root.displayName;
575
- const TOAST_LIMIT = 1;
576
- const TOAST_REMOVE_DELAY = 1e6;
577
- let count = 0;
578
- function genId() {
579
- count = (count + 1) % Number.MAX_VALUE;
580
- return count.toString();
581
- }
582
- const toastTimeouts = /* @__PURE__ */ new Map();
583
- const addToRemoveQueue = (toastId) => {
584
- if (toastTimeouts.has(toastId)) {
585
- return;
586
- }
587
- const timeout = setTimeout(() => {
588
- toastTimeouts.delete(toastId);
589
- dispatch({
590
- type: "REMOVE_TOAST",
591
- toastId
592
- });
593
- }, TOAST_REMOVE_DELAY);
594
- toastTimeouts.set(toastId, timeout);
595
- };
596
- const reducer = (state, action) => {
597
- switch (action.type) {
598
- case "ADD_TOAST":
599
- return {
600
- ...state,
601
- toasts: [action.toast, ...state.toasts].slice(0, TOAST_LIMIT)
602
- };
603
- case "UPDATE_TOAST":
604
- return {
605
- ...state,
606
- toasts: state.toasts.map((t) => t.id === action.toast.id ? { ...t, ...action.toast } : t)
607
- };
608
- case "DISMISS_TOAST": {
609
- const { toastId } = action;
610
- if (toastId) {
611
- addToRemoveQueue(toastId);
612
- } else {
613
- state.toasts.forEach((toast2) => {
614
- addToRemoveQueue(toast2.id);
615
- });
616
- }
617
- return {
618
- ...state,
619
- toasts: state.toasts.map(
620
- (t) => t.id === toastId || toastId === void 0 ? {
621
- ...t,
622
- open: false
623
- } : t
624
- )
625
- };
626
- }
627
- case "REMOVE_TOAST":
628
- if (action.toastId === void 0) {
629
- return {
630
- ...state,
631
- toasts: []
632
- };
633
- }
634
- return {
635
- ...state,
636
- toasts: state.toasts.filter((t) => t.id !== action.toastId)
637
- };
638
- }
639
- };
640
- const listeners = [];
641
- let memoryState = { toasts: [] };
642
- function dispatch(action) {
643
- memoryState = reducer(memoryState, action);
644
- listeners.forEach((listener) => {
645
- listener(memoryState);
646
- });
647
- }
648
- function toast({ ...props }) {
649
- const id = genId();
650
- const update = (props2) => dispatch({
651
- type: "UPDATE_TOAST",
652
- toast: { ...props2, id }
653
- });
654
- const dismiss = () => dispatch({ type: "DISMISS_TOAST", toastId: id });
655
- dispatch({
656
- type: "ADD_TOAST",
657
- toast: {
658
- ...props,
659
- id,
660
- open: true,
661
- onOpenChange: (open) => {
662
- if (!open) dismiss();
663
- }
664
- }
665
- });
666
- return {
667
- id,
668
- dismiss,
669
- update
670
- };
671
- }
672
- function useToast() {
673
- const [state, setState] = React.useState(memoryState);
674
- React.useEffect(() => {
675
- listeners.push(setState);
676
- return () => {
677
- const index = listeners.indexOf(setState);
678
- if (index > -1) {
679
- listeners.splice(index, 1);
680
- }
681
- };
682
- }, [state]);
683
- return {
684
- ...state,
685
- toast,
686
- dismiss: (toastId) => dispatch({ type: "DISMISS_TOAST", toastId })
687
- };
688
- }
689
- const ToastProvider = ToastPrimitives.Provider;
690
- const ToastViewport = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntimeExports.jsx(
691
- ToastPrimitives.Viewport,
692
- {
693
- ref,
694
- className: cn(
695
- "fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",
696
- className
697
- ),
698
- ...props
699
- }
700
- ));
701
- ToastViewport.displayName = ToastPrimitives.Viewport.displayName;
702
- const toastVariants = cva(
703
- "group pointer-events-auto relative flex w-full items-center justify-between space-x-2 overflow-hidden rounded-md border p-4 pr-6 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full",
704
- {
705
- variants: {
706
- variant: {
707
- default: "border bg-background",
708
- destructive: "destructive group border-destructive bg-destructive text-destructive-foreground"
709
- }
710
- },
711
- defaultVariants: {
712
- variant: "default"
713
- }
714
- }
715
- );
716
- const Toast = React.forwardRef(({ className, variant, ...props }, ref) => /* @__PURE__ */ jsxRuntimeExports.jsx(ToastPrimitives.Root, { ref, className: cn(toastVariants({ variant }), className), ...props }));
717
- Toast.displayName = ToastPrimitives.Root.displayName;
718
- const ToastAction = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntimeExports.jsx(
719
- ToastPrimitives.Action,
720
- {
721
- ref,
722
- className: cn(
723
- "inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium transition-colors hover:bg-secondary focus:outline-none focus:ring-1 focus:ring-ring disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-muted/40 group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus:ring-destructive",
724
- className
725
- ),
726
- ...props
727
- }
728
- ));
729
- ToastAction.displayName = ToastPrimitives.Action.displayName;
730
- const ToastClose = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntimeExports.jsx(
731
- ToastPrimitives.Close,
732
- {
733
- ref,
734
- className: cn(
735
- "absolute right-1 top-1 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-1 group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",
736
- className
737
- ),
738
- "toast-close": "",
739
- ...props,
740
- children: /* @__PURE__ */ jsxRuntimeExports.jsx(Cross2Icon, { className: "h-4 w-4" })
741
- }
742
- ));
743
- ToastClose.displayName = ToastPrimitives.Close.displayName;
744
- const ToastTitle = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntimeExports.jsx(ToastPrimitives.Title, { ref, className: cn("text-sm font-semibold [&+div]:text-xs", className), ...props }));
745
- ToastTitle.displayName = ToastPrimitives.Title.displayName;
746
- const ToastDescription = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntimeExports.jsx(ToastPrimitives.Description, { ref, className: cn("text-sm opacity-90", className), ...props }));
747
- ToastDescription.displayName = ToastPrimitives.Description.displayName;
748
- function Toaster() {
749
- const { toasts } = useToast();
750
- return /* @__PURE__ */ jsxRuntimeExports.jsxs(ToastProvider, { children: [
751
- toasts.map(({ id, title, description, action, ...props }) => /* @__PURE__ */ jsxRuntimeExports.jsxs(Toast, { ...props, children: [
752
- /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "grid gap-1", children: [
753
- title && /* @__PURE__ */ jsxRuntimeExports.jsx(ToastTitle, { children: title }),
754
- description && /* @__PURE__ */ jsxRuntimeExports.jsx(ToastDescription, { children: description })
755
- ] }),
756
- action,
757
- /* @__PURE__ */ jsxRuntimeExports.jsx(ToastClose, {})
758
- ] }, id)),
759
- /* @__PURE__ */ jsxRuntimeExports.jsx(ToastViewport, {})
760
- ] });
761
- }
762
- const Skeleton = ({ className, ...props }) => /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: cn("animate-pulse rounded-md bg-primary/10", className), ...props });
763
- const Command = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntimeExports.jsx(
764
- Command$1,
765
- {
766
- ref,
767
- className: cn(
768
- "flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",
769
- className
770
- ),
771
- ...props
772
- }
773
- ));
774
- Command.displayName = Command$1.displayName;
775
- const CommandDialog = ({ children, ...props }) => /* @__PURE__ */ jsxRuntimeExports.jsx(Dialog, { ...props, children: /* @__PURE__ */ jsxRuntimeExports.jsx(DialogContent, { className: "overflow-hidden p-0", children: /* @__PURE__ */ jsxRuntimeExports.jsx(Command, { className: "[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5", children }) }) });
776
- const CommandInput = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center border-b px-3", "cmdk-input-wrapper": "", children: [
777
- /* @__PURE__ */ jsxRuntimeExports.jsx(MagnifyingGlassIcon, { className: "mr-2 h-4 w-4 shrink-0 opacity-50" }),
778
- /* @__PURE__ */ jsxRuntimeExports.jsx(
779
- Command$1.Input,
780
- {
781
- ref,
782
- className: cn(
783
- "flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",
784
- className
785
- ),
786
- ...props
787
- }
788
- )
789
- ] }));
790
- CommandInput.displayName = Command$1.Input.displayName;
791
- const CommandList = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntimeExports.jsx(
792
- Command$1.List,
793
- {
794
- ref,
795
- className: cn("max-h-[300px] overflow-y-auto overflow-x-hidden", className),
796
- ...props
797
- }
798
- ));
799
- CommandList.displayName = Command$1.List.displayName;
800
- const CommandEmpty = React.forwardRef((props, ref) => /* @__PURE__ */ jsxRuntimeExports.jsx(Command$1.Empty, { ref, className: "py-6 text-center text-sm", ...props }));
801
- CommandEmpty.displayName = Command$1.Empty.displayName;
802
- const CommandGroup = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntimeExports.jsx(
803
- Command$1.Group,
804
- {
805
- ref,
806
- className: cn(
807
- "overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",
808
- className
809
- ),
810
- ...props
811
- }
812
- ));
813
- CommandGroup.displayName = Command$1.Group.displayName;
814
- const CommandSeparator = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntimeExports.jsx(Command$1.Separator, { ref, className: cn("-mx-1 h-px bg-border", className), ...props }));
815
- CommandSeparator.displayName = Command$1.Separator.displayName;
816
- const CommandItem = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntimeExports.jsx(
817
- Command$1.Item,
818
- {
819
- ref,
820
- className: cn(
821
- "relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none aria-selected:bg-accent aria-selected:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
822
- className
823
- ),
824
- ...props
825
- }
826
- ));
827
- CommandItem.displayName = Command$1.Item.displayName;
828
- const CommandShortcut = ({ className, ...props }) => /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: cn("ml-auto text-xs tracking-widest text-muted-foreground", className), ...props });
829
- CommandShortcut.displayName = "CommandShortcut";
830
- const ContextMenu = ContextMenuPrimitive.Root;
831
- const ContextMenuTrigger = ContextMenuPrimitive.Trigger;
832
- const ContextMenuGroup = ContextMenuPrimitive.Group;
833
- const ContextMenuPortal = ContextMenuPrimitive.Portal;
834
- const ContextMenuSub = ContextMenuPrimitive.Sub;
835
- const ContextMenuRadioGroup = ContextMenuPrimitive.RadioGroup;
836
- const ContextMenuSubTrigger = React.forwardRef(({ className, inset, children, ...props }, ref) => /* @__PURE__ */ jsxRuntimeExports.jsxs(
837
- ContextMenuPrimitive.SubTrigger,
838
- {
839
- ref,
840
- className: cn(
841
- "flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground",
842
- inset && "pl-8",
843
- className
844
- ),
845
- ...props,
846
- children: [
847
- children,
848
- /* @__PURE__ */ jsxRuntimeExports.jsx(ChevronRightIcon, { className: "ml-auto h-4 w-4" })
849
- ]
850
- }
851
- ));
852
- ContextMenuSubTrigger.displayName = ContextMenuPrimitive.SubTrigger.displayName;
853
- const ContextMenuSubContent = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntimeExports.jsx(
854
- ContextMenuPrimitive.SubContent,
855
- {
856
- ref,
857
- className: cn(
858
- "z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 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",
859
- className
860
- ),
861
- ...props
862
- }
863
- ));
864
- ContextMenuSubContent.displayName = ContextMenuPrimitive.SubContent.displayName;
865
- const ContextMenuContent = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntimeExports.jsx(ContextMenuPrimitive.Portal, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(
866
- ContextMenuPrimitive.Content,
867
- {
868
- ref,
869
- className: cn(
870
- "z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 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",
871
- className
872
- ),
873
- ...props
874
- }
875
- ) }));
876
- ContextMenuContent.displayName = ContextMenuPrimitive.Content.displayName;
877
- const ContextMenuItem = React.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsxRuntimeExports.jsx(
878
- ContextMenuPrimitive.Item,
879
- {
880
- ref,
881
- className: cn(
882
- "relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
883
- inset && "pl-8",
884
- className
885
- ),
886
- ...props
887
- }
888
- ));
889
- ContextMenuItem.displayName = ContextMenuPrimitive.Item.displayName;
890
- const ContextMenuCheckboxItem = React.forwardRef(({ className, children, checked, ...props }, ref) => /* @__PURE__ */ jsxRuntimeExports.jsxs(
891
- ContextMenuPrimitive.CheckboxItem,
892
- {
893
- ref,
894
- className: cn(
895
- "relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
896
- className
897
- ),
898
- checked,
899
- ...props,
900
- children: [
901
- /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsxRuntimeExports.jsx(ContextMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(CheckIcon, { className: "h-4 w-4" }) }) }),
902
- children
903
- ]
904
- }
905
- ));
906
- ContextMenuCheckboxItem.displayName = ContextMenuPrimitive.CheckboxItem.displayName;
907
- const ContextMenuRadioItem = React.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntimeExports.jsxs(
908
- ContextMenuPrimitive.RadioItem,
909
- {
910
- ref,
911
- className: cn(
912
- "relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
913
- className
914
- ),
915
- ...props,
916
- children: [
917
- /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsxRuntimeExports.jsx(ContextMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(DotFilledIcon, { className: "h-4 w-4 fill-current" }) }) }),
918
- children
919
- ]
920
- }
921
- ));
922
- ContextMenuRadioItem.displayName = ContextMenuPrimitive.RadioItem.displayName;
923
- const ContextMenuLabel = React.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsxRuntimeExports.jsx(
924
- ContextMenuPrimitive.Label,
925
- {
926
- ref,
927
- className: cn("px-2 py-1.5 text-sm font-semibold text-foreground", inset && "pl-8", className),
928
- ...props
929
- }
930
- ));
931
- ContextMenuLabel.displayName = ContextMenuPrimitive.Label.displayName;
932
- const ContextMenuSeparator = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntimeExports.jsx(ContextMenuPrimitive.Separator, { ref, className: cn("-mx-1 my-1 h-px bg-border", className), ...props }));
933
- ContextMenuSeparator.displayName = ContextMenuPrimitive.Separator.displayName;
934
- const ContextMenuShortcut = ({ className, ...props }) => /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: cn("ml-auto text-xs tracking-widest text-muted-foreground", className), ...props });
935
- ContextMenuShortcut.displayName = "ContextMenuShortcut";
936
- export {
937
- SelectGroup as $,
938
- Accordion as A,
939
- Button as B,
940
- Card as C,
941
- Dialog as D,
942
- CardDescription as E,
943
- CardContent as F,
944
- ScrollBar as G,
945
- Tabs as H,
946
- Input as I,
947
- TabsList as J,
948
- TabsTrigger as K,
949
- Label as L,
950
- TabsContent as M,
951
- Tooltip as N,
952
- TooltipTrigger as O,
953
- TooltipContent as P,
954
- TooltipProvider as Q,
955
- TooltipPortal as R,
956
- ScrollArea as S,
957
- Textarea as T,
958
- Popover as U,
959
- PopoverTrigger as V,
960
- PopoverContent as W,
961
- HoverCard as X,
962
- HoverCardTrigger as Y,
963
- HoverCardContent as Z,
964
- Select as _,
965
- Switch as a,
966
- SelectValue as a0,
967
- SelectTrigger as a1,
968
- SelectContent as a2,
969
- SelectLabel as a3,
970
- SelectItem as a4,
971
- SelectSeparator as a5,
972
- DropdownMenu as a6,
973
- DropdownMenuTrigger as a7,
974
- DropdownMenuContent as a8,
975
- DropdownMenuItem as a9,
976
- ContextMenu as aA,
977
- ContextMenuTrigger as aB,
978
- ContextMenuContent as aC,
979
- ContextMenuItem as aD,
980
- ContextMenuCheckboxItem as aE,
981
- ContextMenuRadioItem as aF,
982
- ContextMenuLabel as aG,
983
- ContextMenuSeparator as aH,
984
- ContextMenuShortcut as aI,
985
- ContextMenuGroup as aJ,
986
- ContextMenuPortal as aK,
987
- ContextMenuSub as aL,
988
- ContextMenuSubContent as aM,
989
- ContextMenuSubTrigger as aN,
990
- ContextMenuRadioGroup as aO,
991
- DropdownMenuCheckboxItem as aa,
992
- DropdownMenuRadioItem as ab,
993
- DropdownMenuLabel as ac,
994
- DropdownMenuSeparator as ad,
995
- DropdownMenuShortcut as ae,
996
- DropdownMenuGroup as af,
997
- DropdownMenuPortal as ag,
998
- DropdownMenuSub as ah,
999
- DropdownMenuSubContent as ai,
1000
- DropdownMenuSubTrigger as aj,
1001
- DropdownMenuRadioGroup as ak,
1002
- Separator as al,
1003
- reducer as am,
1004
- useToast as an,
1005
- toast as ao,
1006
- Toaster as ap,
1007
- Skeleton as aq,
1008
- Command as ar,
1009
- CommandDialog as as,
1010
- CommandInput as at,
1011
- CommandList as au,
1012
- CommandEmpty as av,
1013
- CommandGroup as aw,
1014
- CommandItem as ax,
1015
- CommandShortcut as ay,
1016
- CommandSeparator as az,
1017
- buttonVariants as b,
1018
- cn as c,
1019
- AccordionItem as d,
1020
- AccordionTrigger as e,
1021
- AccordionContent as f,
1022
- Badge as g,
1023
- badgeVariants as h,
1024
- AlertDialog as i,
1025
- AlertDialogTrigger as j,
1026
- AlertDialogContent as k,
1027
- AlertDialogHeader as l,
1028
- AlertDialogFooter as m,
1029
- AlertDialogTitle as n,
1030
- AlertDialogDescription as o,
1031
- AlertDialogAction as p,
1032
- AlertDialogCancel as q,
1033
- DialogTrigger as r,
1034
- DialogContent as s,
1035
- DialogHeader as t,
1036
- DialogFooter as u,
1037
- DialogTitle as v,
1038
- DialogDescription as w,
1039
- CardHeader as x,
1040
- CardFooter as y,
1041
- CardTitle as z
1042
- };