@journal-ds/react 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +108 -0
- package/dist/index.cjs +3913 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +420 -0
- package/dist/index.d.ts +420 -0
- package/dist/index.js +3636 -0
- package/dist/index.js.map +1 -0
- package/dist/lib/utils.cjs +13 -0
- package/dist/lib/utils.cjs.map +1 -0
- package/dist/lib/utils.d.cts +5 -0
- package/dist/lib/utils.d.ts +5 -0
- package/dist/lib/utils.js +11 -0
- package/dist/lib/utils.js.map +1 -0
- package/package.json +125 -0
package/dist/index.js
ADDED
|
@@ -0,0 +1,3636 @@
|
|
|
1
|
+
import { clsx } from 'clsx';
|
|
2
|
+
import { twMerge } from 'tailwind-merge';
|
|
3
|
+
import * as AccordionPrimitive from '@radix-ui/react-accordion';
|
|
4
|
+
import { X, ChevronDownIcon, ChevronRight, MoreHorizontal, ChevronLeftIcon, ChevronRightIcon, ArrowLeft, ArrowRight, CheckIcon, XIcon, SearchIcon, CircleIcon, MinusIcon, MoreHorizontalIcon, GripVerticalIcon, ChevronUpIcon } from 'lucide-react';
|
|
5
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
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 AspectRatioPrimitive from '@radix-ui/react-aspect-ratio';
|
|
10
|
+
import * as AvatarPrimitive from '@radix-ui/react-avatar';
|
|
11
|
+
import * as React2 from 'react';
|
|
12
|
+
import { getDefaultClassNames, DayPicker } from 'react-day-picker';
|
|
13
|
+
import useEmblaCarousel from 'embla-carousel-react';
|
|
14
|
+
import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
|
|
15
|
+
import * as CollapsiblePrimitive from '@radix-ui/react-collapsible';
|
|
16
|
+
import { Command as Command$1 } from 'cmdk';
|
|
17
|
+
import * as DialogPrimitive from '@radix-ui/react-dialog';
|
|
18
|
+
import * as ContextMenuPrimitive from '@radix-ui/react-context-menu';
|
|
19
|
+
import { Drawer as Drawer$1 } from 'vaul';
|
|
20
|
+
import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
|
|
21
|
+
import { FormProvider, Controller, useFormContext, useFormState } from 'react-hook-form';
|
|
22
|
+
import * as LabelPrimitive from '@radix-ui/react-label';
|
|
23
|
+
import * as HoverCardPrimitive from '@radix-ui/react-hover-card';
|
|
24
|
+
import { OTPInput, OTPInputContext } from 'input-otp';
|
|
25
|
+
import * as MenubarPrimitive from '@radix-ui/react-menubar';
|
|
26
|
+
import * as NavigationMenuPrimitive from '@radix-ui/react-navigation-menu';
|
|
27
|
+
import * as PopoverPrimitive from '@radix-ui/react-popover';
|
|
28
|
+
import * as ProgressPrimitive from '@radix-ui/react-progress';
|
|
29
|
+
import * as RadioGroupPrimitive from '@radix-ui/react-radio-group';
|
|
30
|
+
import * as ResizablePrimitive from 'react-resizable-panels';
|
|
31
|
+
import * as ScrollAreaPrimitive from '@radix-ui/react-scroll-area';
|
|
32
|
+
import * as SelectPrimitive from '@radix-ui/react-select';
|
|
33
|
+
import * as SeparatorPrimitive from '@radix-ui/react-separator';
|
|
34
|
+
import * as SliderPrimitive from '@radix-ui/react-slider';
|
|
35
|
+
import { Toaster as Toaster$1 } from 'sonner';
|
|
36
|
+
import * as SwitchPrimitive from '@radix-ui/react-switch';
|
|
37
|
+
import * as TabsPrimitive from '@radix-ui/react-tabs';
|
|
38
|
+
import * as ToastPrimitives from '@radix-ui/react-toast';
|
|
39
|
+
import * as TogglePrimitive from '@radix-ui/react-toggle';
|
|
40
|
+
import * as ToggleGroupPrimitive from '@radix-ui/react-toggle-group';
|
|
41
|
+
import * as TooltipPrimitive from '@radix-ui/react-tooltip';
|
|
42
|
+
|
|
43
|
+
// src/lib/utils.ts
|
|
44
|
+
function cn(...inputs) {
|
|
45
|
+
return twMerge(clsx(inputs));
|
|
46
|
+
}
|
|
47
|
+
function Accordion({
|
|
48
|
+
...props
|
|
49
|
+
}) {
|
|
50
|
+
return /* @__PURE__ */ jsx(AccordionPrimitive.Root, { "data-slot": "accordion", ...props });
|
|
51
|
+
}
|
|
52
|
+
function AccordionItem({
|
|
53
|
+
className,
|
|
54
|
+
...props
|
|
55
|
+
}) {
|
|
56
|
+
return /* @__PURE__ */ jsx(
|
|
57
|
+
AccordionPrimitive.Item,
|
|
58
|
+
{
|
|
59
|
+
"data-slot": "accordion-item",
|
|
60
|
+
className: cn("border-b last:border-b-0", className),
|
|
61
|
+
...props
|
|
62
|
+
}
|
|
63
|
+
);
|
|
64
|
+
}
|
|
65
|
+
function AccordionTrigger({
|
|
66
|
+
className,
|
|
67
|
+
children,
|
|
68
|
+
...props
|
|
69
|
+
}) {
|
|
70
|
+
return /* @__PURE__ */ jsx(AccordionPrimitive.Header, { className: "flex", children: /* @__PURE__ */ jsxs(
|
|
71
|
+
AccordionPrimitive.Trigger,
|
|
72
|
+
{
|
|
73
|
+
"data-slot": "accordion-trigger",
|
|
74
|
+
className: cn(
|
|
75
|
+
"focus-visible:border-ring focus-visible:ring-ring/50 flex flex-1 items-start justify-between gap-4 rounded-md py-4 text-left text-sm font-medium transition-all outline-none hover:underline focus-visible:ring-[3px] disabled:pointer-events-none disabled:opacity-50 [&[data-state=open]>svg]:rotate-180",
|
|
76
|
+
className
|
|
77
|
+
),
|
|
78
|
+
...props,
|
|
79
|
+
children: [
|
|
80
|
+
children,
|
|
81
|
+
/* @__PURE__ */ jsx(ChevronDownIcon, { className: "text-muted-foreground pointer-events-none size-4 shrink-0 translate-y-0.5 transition-transform duration-200" })
|
|
82
|
+
]
|
|
83
|
+
}
|
|
84
|
+
) });
|
|
85
|
+
}
|
|
86
|
+
function AccordionContent({
|
|
87
|
+
className,
|
|
88
|
+
children,
|
|
89
|
+
...props
|
|
90
|
+
}) {
|
|
91
|
+
return /* @__PURE__ */ jsx(
|
|
92
|
+
AccordionPrimitive.Content,
|
|
93
|
+
{
|
|
94
|
+
"data-slot": "accordion-content",
|
|
95
|
+
className: "data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down overflow-hidden text-sm",
|
|
96
|
+
...props,
|
|
97
|
+
children: /* @__PURE__ */ jsx("div", { className: cn("pt-0 pb-4", className), children })
|
|
98
|
+
}
|
|
99
|
+
);
|
|
100
|
+
}
|
|
101
|
+
var alertVariants = cva(
|
|
102
|
+
"relative w-full rounded-lg border px-4 py-3 text-sm grid has-[>svg]:grid-cols-[calc(var(--spacing)*4)_1fr] grid-cols-[0_1fr] has-[>svg]:gap-x-3 gap-y-0.5 items-start [&>svg]:size-4 [&>svg]:translate-y-0.5 [&>svg]:text-current",
|
|
103
|
+
{
|
|
104
|
+
variants: {
|
|
105
|
+
variant: {
|
|
106
|
+
default: "bg-card text-card-foreground",
|
|
107
|
+
destructive: "text-destructive bg-card [&>svg]:text-current *:data-[slot=alert-description]:text-destructive/90"
|
|
108
|
+
}
|
|
109
|
+
},
|
|
110
|
+
defaultVariants: {
|
|
111
|
+
variant: "default"
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
);
|
|
115
|
+
function Alert({
|
|
116
|
+
className,
|
|
117
|
+
variant,
|
|
118
|
+
...props
|
|
119
|
+
}) {
|
|
120
|
+
return /* @__PURE__ */ jsx(
|
|
121
|
+
"div",
|
|
122
|
+
{
|
|
123
|
+
"data-slot": "alert",
|
|
124
|
+
role: "alert",
|
|
125
|
+
className: cn(alertVariants({ variant }), className),
|
|
126
|
+
...props
|
|
127
|
+
}
|
|
128
|
+
);
|
|
129
|
+
}
|
|
130
|
+
function AlertTitle({ className, ...props }) {
|
|
131
|
+
return /* @__PURE__ */ jsx(
|
|
132
|
+
"div",
|
|
133
|
+
{
|
|
134
|
+
"data-slot": "alert-title",
|
|
135
|
+
className: cn(
|
|
136
|
+
"col-start-2 line-clamp-1 min-h-4 font-medium tracking-tight",
|
|
137
|
+
className
|
|
138
|
+
),
|
|
139
|
+
...props
|
|
140
|
+
}
|
|
141
|
+
);
|
|
142
|
+
}
|
|
143
|
+
function AlertDescription({
|
|
144
|
+
className,
|
|
145
|
+
...props
|
|
146
|
+
}) {
|
|
147
|
+
return /* @__PURE__ */ jsx(
|
|
148
|
+
"div",
|
|
149
|
+
{
|
|
150
|
+
"data-slot": "alert-description",
|
|
151
|
+
className: cn(
|
|
152
|
+
"text-muted-foreground col-start-2 grid justify-items-start gap-1 text-sm [&_p]:leading-relaxed",
|
|
153
|
+
className
|
|
154
|
+
),
|
|
155
|
+
...props
|
|
156
|
+
}
|
|
157
|
+
);
|
|
158
|
+
}
|
|
159
|
+
var buttonVariants = cva(
|
|
160
|
+
"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",
|
|
161
|
+
{
|
|
162
|
+
variants: {
|
|
163
|
+
variant: {
|
|
164
|
+
default: "bg-primary text-primary-foreground shadow-xs hover:bg-primary/90",
|
|
165
|
+
destructive: "bg-destructive text-white shadow-xs hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",
|
|
166
|
+
outline: "border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",
|
|
167
|
+
secondary: "bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80",
|
|
168
|
+
ghost: "hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",
|
|
169
|
+
link: "text-primary underline-offset-4 hover:underline"
|
|
170
|
+
},
|
|
171
|
+
size: {
|
|
172
|
+
default: "h-9 px-4 py-2 has-[>svg]:px-3",
|
|
173
|
+
sm: "h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",
|
|
174
|
+
lg: "h-10 rounded-md px-6 has-[>svg]:px-4",
|
|
175
|
+
icon: "size-9"
|
|
176
|
+
}
|
|
177
|
+
},
|
|
178
|
+
defaultVariants: {
|
|
179
|
+
variant: "default",
|
|
180
|
+
size: "default"
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
);
|
|
184
|
+
function Button({
|
|
185
|
+
className,
|
|
186
|
+
variant,
|
|
187
|
+
size,
|
|
188
|
+
asChild = false,
|
|
189
|
+
...props
|
|
190
|
+
}) {
|
|
191
|
+
const Comp = asChild ? Slot : "button";
|
|
192
|
+
return /* @__PURE__ */ jsx(
|
|
193
|
+
Comp,
|
|
194
|
+
{
|
|
195
|
+
"data-slot": "button",
|
|
196
|
+
className: cn(buttonVariants({ variant, size, className })),
|
|
197
|
+
...props
|
|
198
|
+
}
|
|
199
|
+
);
|
|
200
|
+
}
|
|
201
|
+
function AlertDialog({
|
|
202
|
+
...props
|
|
203
|
+
}) {
|
|
204
|
+
return /* @__PURE__ */ jsx(AlertDialogPrimitive.Root, { "data-slot": "alert-dialog", ...props });
|
|
205
|
+
}
|
|
206
|
+
function AlertDialogTrigger({
|
|
207
|
+
...props
|
|
208
|
+
}) {
|
|
209
|
+
return /* @__PURE__ */ jsx(AlertDialogPrimitive.Trigger, { "data-slot": "alert-dialog-trigger", ...props });
|
|
210
|
+
}
|
|
211
|
+
function AlertDialogPortal({
|
|
212
|
+
...props
|
|
213
|
+
}) {
|
|
214
|
+
return /* @__PURE__ */ jsx(AlertDialogPrimitive.Portal, { "data-slot": "alert-dialog-portal", ...props });
|
|
215
|
+
}
|
|
216
|
+
function AlertDialogOverlay({
|
|
217
|
+
className,
|
|
218
|
+
...props
|
|
219
|
+
}) {
|
|
220
|
+
return /* @__PURE__ */ jsx(
|
|
221
|
+
AlertDialogPrimitive.Overlay,
|
|
222
|
+
{
|
|
223
|
+
"data-slot": "alert-dialog-overlay",
|
|
224
|
+
className: cn(
|
|
225
|
+
"data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",
|
|
226
|
+
className
|
|
227
|
+
),
|
|
228
|
+
...props
|
|
229
|
+
}
|
|
230
|
+
);
|
|
231
|
+
}
|
|
232
|
+
function AlertDialogContent({
|
|
233
|
+
className,
|
|
234
|
+
...props
|
|
235
|
+
}) {
|
|
236
|
+
return /* @__PURE__ */ jsxs(AlertDialogPortal, { children: [
|
|
237
|
+
/* @__PURE__ */ jsx(AlertDialogOverlay, {}),
|
|
238
|
+
/* @__PURE__ */ jsx(
|
|
239
|
+
AlertDialogPrimitive.Content,
|
|
240
|
+
{
|
|
241
|
+
"data-slot": "alert-dialog-content",
|
|
242
|
+
className: cn(
|
|
243
|
+
"bg-background 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 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg",
|
|
244
|
+
className
|
|
245
|
+
),
|
|
246
|
+
...props
|
|
247
|
+
}
|
|
248
|
+
)
|
|
249
|
+
] });
|
|
250
|
+
}
|
|
251
|
+
function AlertDialogHeader({
|
|
252
|
+
className,
|
|
253
|
+
...props
|
|
254
|
+
}) {
|
|
255
|
+
return /* @__PURE__ */ jsx(
|
|
256
|
+
"div",
|
|
257
|
+
{
|
|
258
|
+
"data-slot": "alert-dialog-header",
|
|
259
|
+
className: cn("flex flex-col gap-2 text-center sm:text-left", className),
|
|
260
|
+
...props
|
|
261
|
+
}
|
|
262
|
+
);
|
|
263
|
+
}
|
|
264
|
+
function AlertDialogFooter({
|
|
265
|
+
className,
|
|
266
|
+
...props
|
|
267
|
+
}) {
|
|
268
|
+
return /* @__PURE__ */ jsx(
|
|
269
|
+
"div",
|
|
270
|
+
{
|
|
271
|
+
"data-slot": "alert-dialog-footer",
|
|
272
|
+
className: cn(
|
|
273
|
+
"flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",
|
|
274
|
+
className
|
|
275
|
+
),
|
|
276
|
+
...props
|
|
277
|
+
}
|
|
278
|
+
);
|
|
279
|
+
}
|
|
280
|
+
function AlertDialogTitle({
|
|
281
|
+
className,
|
|
282
|
+
...props
|
|
283
|
+
}) {
|
|
284
|
+
return /* @__PURE__ */ jsx(
|
|
285
|
+
AlertDialogPrimitive.Title,
|
|
286
|
+
{
|
|
287
|
+
"data-slot": "alert-dialog-title",
|
|
288
|
+
className: cn("text-lg font-semibold", className),
|
|
289
|
+
...props
|
|
290
|
+
}
|
|
291
|
+
);
|
|
292
|
+
}
|
|
293
|
+
function AlertDialogDescription({
|
|
294
|
+
className,
|
|
295
|
+
...props
|
|
296
|
+
}) {
|
|
297
|
+
return /* @__PURE__ */ jsx(
|
|
298
|
+
AlertDialogPrimitive.Description,
|
|
299
|
+
{
|
|
300
|
+
"data-slot": "alert-dialog-description",
|
|
301
|
+
className: cn("text-muted-foreground text-sm", className),
|
|
302
|
+
...props
|
|
303
|
+
}
|
|
304
|
+
);
|
|
305
|
+
}
|
|
306
|
+
function AlertDialogAction({
|
|
307
|
+
className,
|
|
308
|
+
...props
|
|
309
|
+
}) {
|
|
310
|
+
return /* @__PURE__ */ jsx(
|
|
311
|
+
AlertDialogPrimitive.Action,
|
|
312
|
+
{
|
|
313
|
+
className: cn(buttonVariants(), className),
|
|
314
|
+
...props
|
|
315
|
+
}
|
|
316
|
+
);
|
|
317
|
+
}
|
|
318
|
+
function AlertDialogCancel({
|
|
319
|
+
className,
|
|
320
|
+
...props
|
|
321
|
+
}) {
|
|
322
|
+
return /* @__PURE__ */ jsx(
|
|
323
|
+
AlertDialogPrimitive.Cancel,
|
|
324
|
+
{
|
|
325
|
+
className: cn(buttonVariants({ variant: "outline" }), className),
|
|
326
|
+
...props
|
|
327
|
+
}
|
|
328
|
+
);
|
|
329
|
+
}
|
|
330
|
+
function AspectRatio({
|
|
331
|
+
...props
|
|
332
|
+
}) {
|
|
333
|
+
return /* @__PURE__ */ jsx(AspectRatioPrimitive.Root, { "data-slot": "aspect-ratio", ...props });
|
|
334
|
+
}
|
|
335
|
+
function Avatar({
|
|
336
|
+
className,
|
|
337
|
+
...props
|
|
338
|
+
}) {
|
|
339
|
+
return /* @__PURE__ */ jsx(
|
|
340
|
+
AvatarPrimitive.Root,
|
|
341
|
+
{
|
|
342
|
+
"data-slot": "avatar",
|
|
343
|
+
className: cn(
|
|
344
|
+
"relative flex size-8 shrink-0 overflow-hidden rounded-full",
|
|
345
|
+
className
|
|
346
|
+
),
|
|
347
|
+
...props
|
|
348
|
+
}
|
|
349
|
+
);
|
|
350
|
+
}
|
|
351
|
+
function AvatarImage({
|
|
352
|
+
className,
|
|
353
|
+
...props
|
|
354
|
+
}) {
|
|
355
|
+
return /* @__PURE__ */ jsx(
|
|
356
|
+
AvatarPrimitive.Image,
|
|
357
|
+
{
|
|
358
|
+
"data-slot": "avatar-image",
|
|
359
|
+
className: cn("aspect-square size-full", className),
|
|
360
|
+
...props
|
|
361
|
+
}
|
|
362
|
+
);
|
|
363
|
+
}
|
|
364
|
+
function AvatarFallback({
|
|
365
|
+
className,
|
|
366
|
+
...props
|
|
367
|
+
}) {
|
|
368
|
+
return /* @__PURE__ */ jsx(
|
|
369
|
+
AvatarPrimitive.Fallback,
|
|
370
|
+
{
|
|
371
|
+
"data-slot": "avatar-fallback",
|
|
372
|
+
className: cn(
|
|
373
|
+
"bg-muted flex size-full items-center justify-center rounded-full",
|
|
374
|
+
className
|
|
375
|
+
),
|
|
376
|
+
...props
|
|
377
|
+
}
|
|
378
|
+
);
|
|
379
|
+
}
|
|
380
|
+
var badgeVariants = cva(
|
|
381
|
+
"inline-flex items-center justify-center rounded-md border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden",
|
|
382
|
+
{
|
|
383
|
+
variants: {
|
|
384
|
+
variant: {
|
|
385
|
+
default: "border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90",
|
|
386
|
+
secondary: "border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",
|
|
387
|
+
destructive: "border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",
|
|
388
|
+
outline: "text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground"
|
|
389
|
+
}
|
|
390
|
+
},
|
|
391
|
+
defaultVariants: {
|
|
392
|
+
variant: "default"
|
|
393
|
+
}
|
|
394
|
+
}
|
|
395
|
+
);
|
|
396
|
+
function Badge({
|
|
397
|
+
className,
|
|
398
|
+
variant,
|
|
399
|
+
asChild = false,
|
|
400
|
+
...props
|
|
401
|
+
}) {
|
|
402
|
+
const Comp = asChild ? Slot : "span";
|
|
403
|
+
return /* @__PURE__ */ jsx(
|
|
404
|
+
Comp,
|
|
405
|
+
{
|
|
406
|
+
"data-slot": "badge",
|
|
407
|
+
className: cn(badgeVariants({ variant }), className),
|
|
408
|
+
...props
|
|
409
|
+
}
|
|
410
|
+
);
|
|
411
|
+
}
|
|
412
|
+
function Breadcrumb({ ...props }) {
|
|
413
|
+
return /* @__PURE__ */ jsx("nav", { "aria-label": "breadcrumb", "data-slot": "breadcrumb", ...props });
|
|
414
|
+
}
|
|
415
|
+
function BreadcrumbList({ className, ...props }) {
|
|
416
|
+
return /* @__PURE__ */ jsx(
|
|
417
|
+
"ol",
|
|
418
|
+
{
|
|
419
|
+
"data-slot": "breadcrumb-list",
|
|
420
|
+
className: cn(
|
|
421
|
+
"text-muted-foreground flex flex-wrap items-center gap-1.5 text-sm break-words sm:gap-2.5",
|
|
422
|
+
className
|
|
423
|
+
),
|
|
424
|
+
...props
|
|
425
|
+
}
|
|
426
|
+
);
|
|
427
|
+
}
|
|
428
|
+
function BreadcrumbItem({ className, ...props }) {
|
|
429
|
+
return /* @__PURE__ */ jsx(
|
|
430
|
+
"li",
|
|
431
|
+
{
|
|
432
|
+
"data-slot": "breadcrumb-item",
|
|
433
|
+
className: cn("inline-flex items-center gap-1.5", className),
|
|
434
|
+
...props
|
|
435
|
+
}
|
|
436
|
+
);
|
|
437
|
+
}
|
|
438
|
+
function BreadcrumbLink({
|
|
439
|
+
asChild,
|
|
440
|
+
className,
|
|
441
|
+
...props
|
|
442
|
+
}) {
|
|
443
|
+
const Comp = asChild ? Slot : "a";
|
|
444
|
+
return /* @__PURE__ */ jsx(
|
|
445
|
+
Comp,
|
|
446
|
+
{
|
|
447
|
+
"data-slot": "breadcrumb-link",
|
|
448
|
+
className: cn("hover:text-foreground transition-colors", className),
|
|
449
|
+
...props
|
|
450
|
+
}
|
|
451
|
+
);
|
|
452
|
+
}
|
|
453
|
+
function BreadcrumbPage({ className, ...props }) {
|
|
454
|
+
return /* @__PURE__ */ jsx(
|
|
455
|
+
"span",
|
|
456
|
+
{
|
|
457
|
+
"data-slot": "breadcrumb-page",
|
|
458
|
+
role: "link",
|
|
459
|
+
"aria-disabled": "true",
|
|
460
|
+
"aria-current": "page",
|
|
461
|
+
className: cn("text-foreground font-normal", className),
|
|
462
|
+
...props
|
|
463
|
+
}
|
|
464
|
+
);
|
|
465
|
+
}
|
|
466
|
+
function BreadcrumbSeparator({
|
|
467
|
+
children,
|
|
468
|
+
className,
|
|
469
|
+
...props
|
|
470
|
+
}) {
|
|
471
|
+
return /* @__PURE__ */ jsx(
|
|
472
|
+
"li",
|
|
473
|
+
{
|
|
474
|
+
"data-slot": "breadcrumb-separator",
|
|
475
|
+
role: "presentation",
|
|
476
|
+
"aria-hidden": "true",
|
|
477
|
+
className: cn("[&>svg]:size-3.5", className),
|
|
478
|
+
...props,
|
|
479
|
+
children: children ?? /* @__PURE__ */ jsx(ChevronRight, {})
|
|
480
|
+
}
|
|
481
|
+
);
|
|
482
|
+
}
|
|
483
|
+
function BreadcrumbEllipsis({
|
|
484
|
+
className,
|
|
485
|
+
...props
|
|
486
|
+
}) {
|
|
487
|
+
return /* @__PURE__ */ jsxs(
|
|
488
|
+
"span",
|
|
489
|
+
{
|
|
490
|
+
"data-slot": "breadcrumb-ellipsis",
|
|
491
|
+
role: "presentation",
|
|
492
|
+
"aria-hidden": "true",
|
|
493
|
+
className: cn("flex size-9 items-center justify-center", className),
|
|
494
|
+
...props,
|
|
495
|
+
children: [
|
|
496
|
+
/* @__PURE__ */ jsx(MoreHorizontal, { className: "size-4" }),
|
|
497
|
+
/* @__PURE__ */ jsx("span", { className: "sr-only", children: "More" })
|
|
498
|
+
]
|
|
499
|
+
}
|
|
500
|
+
);
|
|
501
|
+
}
|
|
502
|
+
function Calendar({
|
|
503
|
+
className,
|
|
504
|
+
classNames,
|
|
505
|
+
showOutsideDays = true,
|
|
506
|
+
captionLayout = "label",
|
|
507
|
+
buttonVariant = "ghost",
|
|
508
|
+
formatters,
|
|
509
|
+
components,
|
|
510
|
+
...props
|
|
511
|
+
}) {
|
|
512
|
+
const defaultClassNames = getDefaultClassNames();
|
|
513
|
+
return /* @__PURE__ */ jsx(
|
|
514
|
+
DayPicker,
|
|
515
|
+
{
|
|
516
|
+
showOutsideDays,
|
|
517
|
+
className: cn(
|
|
518
|
+
"bg-background group/calendar p-3 [--cell-size:--spacing(8)] [[data-slot=card-content]_&]:bg-transparent [[data-slot=popover-content]_&]:bg-transparent",
|
|
519
|
+
String.raw`rtl:**:[.rdp-button\_next>svg]:rotate-180`,
|
|
520
|
+
String.raw`rtl:**:[.rdp-button\_previous>svg]:rotate-180`,
|
|
521
|
+
className
|
|
522
|
+
),
|
|
523
|
+
captionLayout,
|
|
524
|
+
formatters: {
|
|
525
|
+
formatMonthDropdown: (date) => date.toLocaleString("default", { month: "short" }),
|
|
526
|
+
...formatters
|
|
527
|
+
},
|
|
528
|
+
classNames: {
|
|
529
|
+
root: cn("w-fit", defaultClassNames.root),
|
|
530
|
+
months: cn(
|
|
531
|
+
"flex gap-4 flex-col md:flex-row relative",
|
|
532
|
+
defaultClassNames.months
|
|
533
|
+
),
|
|
534
|
+
month: cn("flex flex-col w-full gap-4", defaultClassNames.month),
|
|
535
|
+
nav: cn(
|
|
536
|
+
"flex items-center gap-1 w-full absolute top-0 inset-x-0 justify-between",
|
|
537
|
+
defaultClassNames.nav
|
|
538
|
+
),
|
|
539
|
+
button_previous: cn(
|
|
540
|
+
buttonVariants({ variant: buttonVariant }),
|
|
541
|
+
"size-(--cell-size) aria-disabled:opacity-50 p-0 select-none",
|
|
542
|
+
defaultClassNames.button_previous
|
|
543
|
+
),
|
|
544
|
+
button_next: cn(
|
|
545
|
+
buttonVariants({ variant: buttonVariant }),
|
|
546
|
+
"size-(--cell-size) aria-disabled:opacity-50 p-0 select-none",
|
|
547
|
+
defaultClassNames.button_next
|
|
548
|
+
),
|
|
549
|
+
month_caption: cn(
|
|
550
|
+
"flex items-center justify-center h-(--cell-size) w-full px-(--cell-size)",
|
|
551
|
+
defaultClassNames.month_caption
|
|
552
|
+
),
|
|
553
|
+
dropdowns: cn(
|
|
554
|
+
"w-full flex items-center text-sm font-medium justify-center h-(--cell-size) gap-1.5",
|
|
555
|
+
defaultClassNames.dropdowns
|
|
556
|
+
),
|
|
557
|
+
dropdown_root: cn(
|
|
558
|
+
"relative has-focus:border-ring border border-input shadow-xs has-focus:ring-ring/50 has-focus:ring-[3px] rounded-md",
|
|
559
|
+
defaultClassNames.dropdown_root
|
|
560
|
+
),
|
|
561
|
+
dropdown: cn(
|
|
562
|
+
"absolute bg-popover inset-0 opacity-0",
|
|
563
|
+
defaultClassNames.dropdown
|
|
564
|
+
),
|
|
565
|
+
caption_label: cn(
|
|
566
|
+
"select-none font-medium",
|
|
567
|
+
captionLayout === "label" ? "text-sm" : "rounded-md pl-2 pr-1 flex items-center gap-1 text-sm h-8 [&>svg]:text-muted-foreground [&>svg]:size-3.5",
|
|
568
|
+
defaultClassNames.caption_label
|
|
569
|
+
),
|
|
570
|
+
table: "w-full border-collapse",
|
|
571
|
+
weekdays: cn("flex", defaultClassNames.weekdays),
|
|
572
|
+
weekday: cn(
|
|
573
|
+
"text-muted-foreground rounded-md flex-1 font-normal text-[0.8rem] select-none",
|
|
574
|
+
defaultClassNames.weekday
|
|
575
|
+
),
|
|
576
|
+
week: cn("flex w-full mt-2", defaultClassNames.week),
|
|
577
|
+
week_number_header: cn(
|
|
578
|
+
"select-none w-(--cell-size)",
|
|
579
|
+
defaultClassNames.week_number_header
|
|
580
|
+
),
|
|
581
|
+
week_number: cn(
|
|
582
|
+
"text-[0.8rem] select-none text-muted-foreground",
|
|
583
|
+
defaultClassNames.week_number
|
|
584
|
+
),
|
|
585
|
+
day: cn(
|
|
586
|
+
"relative w-full h-full p-0 text-center [&:first-child[data-selected=true]_button]:rounded-l-md [&:last-child[data-selected=true]_button]:rounded-r-md group/day aspect-square select-none",
|
|
587
|
+
defaultClassNames.day
|
|
588
|
+
),
|
|
589
|
+
range_start: cn(
|
|
590
|
+
"rounded-l-md bg-accent",
|
|
591
|
+
defaultClassNames.range_start
|
|
592
|
+
),
|
|
593
|
+
range_middle: cn("rounded-none", defaultClassNames.range_middle),
|
|
594
|
+
range_end: cn("rounded-r-md bg-accent", defaultClassNames.range_end),
|
|
595
|
+
today: cn(
|
|
596
|
+
"bg-accent text-accent-foreground rounded-md data-[selected=true]:rounded-none",
|
|
597
|
+
defaultClassNames.today
|
|
598
|
+
),
|
|
599
|
+
outside: cn(
|
|
600
|
+
"text-muted-foreground aria-selected:text-muted-foreground",
|
|
601
|
+
defaultClassNames.outside
|
|
602
|
+
),
|
|
603
|
+
disabled: cn(
|
|
604
|
+
"text-muted-foreground opacity-50",
|
|
605
|
+
defaultClassNames.disabled
|
|
606
|
+
),
|
|
607
|
+
hidden: cn("invisible", defaultClassNames.hidden),
|
|
608
|
+
...classNames
|
|
609
|
+
},
|
|
610
|
+
components: {
|
|
611
|
+
Root: ({ className: className2, rootRef, ...props2 }) => {
|
|
612
|
+
return /* @__PURE__ */ jsx(
|
|
613
|
+
"div",
|
|
614
|
+
{
|
|
615
|
+
"data-slot": "calendar",
|
|
616
|
+
ref: rootRef,
|
|
617
|
+
className: cn(className2),
|
|
618
|
+
...props2
|
|
619
|
+
}
|
|
620
|
+
);
|
|
621
|
+
},
|
|
622
|
+
Chevron: ({ className: className2, orientation, ...props2 }) => {
|
|
623
|
+
if (orientation === "left") {
|
|
624
|
+
return /* @__PURE__ */ jsx(ChevronLeftIcon, { className: cn("size-4", className2), ...props2 });
|
|
625
|
+
}
|
|
626
|
+
if (orientation === "right") {
|
|
627
|
+
return /* @__PURE__ */ jsx(
|
|
628
|
+
ChevronRightIcon,
|
|
629
|
+
{
|
|
630
|
+
className: cn("size-4", className2),
|
|
631
|
+
...props2
|
|
632
|
+
}
|
|
633
|
+
);
|
|
634
|
+
}
|
|
635
|
+
return /* @__PURE__ */ jsx(ChevronDownIcon, { className: cn("size-4", className2), ...props2 });
|
|
636
|
+
},
|
|
637
|
+
DayButton: CalendarDayButton,
|
|
638
|
+
WeekNumber: ({ children, ...props2 }) => {
|
|
639
|
+
return /* @__PURE__ */ jsx("td", { ...props2, children: /* @__PURE__ */ jsx("div", { className: "flex size-(--cell-size) items-center justify-center text-center", children }) });
|
|
640
|
+
},
|
|
641
|
+
...components
|
|
642
|
+
},
|
|
643
|
+
...props
|
|
644
|
+
}
|
|
645
|
+
);
|
|
646
|
+
}
|
|
647
|
+
function CalendarDayButton({
|
|
648
|
+
className,
|
|
649
|
+
day,
|
|
650
|
+
modifiers,
|
|
651
|
+
...props
|
|
652
|
+
}) {
|
|
653
|
+
const defaultClassNames = getDefaultClassNames();
|
|
654
|
+
const ref = React2.useRef(null);
|
|
655
|
+
React2.useEffect(() => {
|
|
656
|
+
if (modifiers.focused) ref.current?.focus();
|
|
657
|
+
}, [modifiers.focused]);
|
|
658
|
+
return /* @__PURE__ */ jsx(
|
|
659
|
+
Button,
|
|
660
|
+
{
|
|
661
|
+
ref,
|
|
662
|
+
variant: "ghost",
|
|
663
|
+
size: "icon",
|
|
664
|
+
"data-day": day.date.toLocaleDateString(),
|
|
665
|
+
"data-selected-single": modifiers.selected && !modifiers.range_start && !modifiers.range_end && !modifiers.range_middle,
|
|
666
|
+
"data-range-start": modifiers.range_start,
|
|
667
|
+
"data-range-end": modifiers.range_end,
|
|
668
|
+
"data-range-middle": modifiers.range_middle,
|
|
669
|
+
className: cn(
|
|
670
|
+
"data-[selected-single=true]:bg-primary data-[selected-single=true]:text-primary-foreground data-[range-middle=true]:bg-accent data-[range-middle=true]:text-accent-foreground data-[range-start=true]:bg-primary data-[range-start=true]:text-primary-foreground data-[range-end=true]:bg-primary data-[range-end=true]:text-primary-foreground group-data-[focused=true]/day:border-ring group-data-[focused=true]/day:ring-ring/50 dark:hover:text-accent-foreground flex aspect-square size-auto w-full min-w-(--cell-size) flex-col gap-1 leading-none font-normal group-data-[focused=true]/day:relative group-data-[focused=true]/day:z-10 group-data-[focused=true]/day:ring-[3px] data-[range-end=true]:rounded-md data-[range-end=true]:rounded-r-md data-[range-middle=true]:rounded-none data-[range-start=true]:rounded-md data-[range-start=true]:rounded-l-md [&>span]:text-xs [&>span]:opacity-70",
|
|
671
|
+
defaultClassNames.day,
|
|
672
|
+
className
|
|
673
|
+
),
|
|
674
|
+
...props
|
|
675
|
+
}
|
|
676
|
+
);
|
|
677
|
+
}
|
|
678
|
+
function Card({ className, ...props }) {
|
|
679
|
+
return /* @__PURE__ */ jsx(
|
|
680
|
+
"div",
|
|
681
|
+
{
|
|
682
|
+
"data-slot": "card",
|
|
683
|
+
className: cn(
|
|
684
|
+
"bg-card text-card-foreground flex flex-col gap-6 rounded-xl border py-6 shadow-sm",
|
|
685
|
+
className
|
|
686
|
+
),
|
|
687
|
+
...props
|
|
688
|
+
}
|
|
689
|
+
);
|
|
690
|
+
}
|
|
691
|
+
function CardHeader({ className, ...props }) {
|
|
692
|
+
return /* @__PURE__ */ jsx(
|
|
693
|
+
"div",
|
|
694
|
+
{
|
|
695
|
+
"data-slot": "card-header",
|
|
696
|
+
className: cn(
|
|
697
|
+
"@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-1.5 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6",
|
|
698
|
+
className
|
|
699
|
+
),
|
|
700
|
+
...props
|
|
701
|
+
}
|
|
702
|
+
);
|
|
703
|
+
}
|
|
704
|
+
function CardTitle({ className, ...props }) {
|
|
705
|
+
return /* @__PURE__ */ jsx(
|
|
706
|
+
"div",
|
|
707
|
+
{
|
|
708
|
+
"data-slot": "card-title",
|
|
709
|
+
className: cn("leading-none font-semibold", className),
|
|
710
|
+
...props
|
|
711
|
+
}
|
|
712
|
+
);
|
|
713
|
+
}
|
|
714
|
+
function CardDescription({ className, ...props }) {
|
|
715
|
+
return /* @__PURE__ */ jsx(
|
|
716
|
+
"div",
|
|
717
|
+
{
|
|
718
|
+
"data-slot": "card-description",
|
|
719
|
+
className: cn("text-muted-foreground text-sm", className),
|
|
720
|
+
...props
|
|
721
|
+
}
|
|
722
|
+
);
|
|
723
|
+
}
|
|
724
|
+
function CardAction({ className, ...props }) {
|
|
725
|
+
return /* @__PURE__ */ jsx(
|
|
726
|
+
"div",
|
|
727
|
+
{
|
|
728
|
+
"data-slot": "card-action",
|
|
729
|
+
className: cn(
|
|
730
|
+
"col-start-2 row-span-2 row-start-1 self-start justify-self-end",
|
|
731
|
+
className
|
|
732
|
+
),
|
|
733
|
+
...props
|
|
734
|
+
}
|
|
735
|
+
);
|
|
736
|
+
}
|
|
737
|
+
function CardContent({ className, ...props }) {
|
|
738
|
+
return /* @__PURE__ */ jsx(
|
|
739
|
+
"div",
|
|
740
|
+
{
|
|
741
|
+
"data-slot": "card-content",
|
|
742
|
+
className: cn("px-6", className),
|
|
743
|
+
...props
|
|
744
|
+
}
|
|
745
|
+
);
|
|
746
|
+
}
|
|
747
|
+
function CardFooter({ className, ...props }) {
|
|
748
|
+
return /* @__PURE__ */ jsx(
|
|
749
|
+
"div",
|
|
750
|
+
{
|
|
751
|
+
"data-slot": "card-footer",
|
|
752
|
+
className: cn("flex items-center px-6 [.border-t]:pt-6", className),
|
|
753
|
+
...props
|
|
754
|
+
}
|
|
755
|
+
);
|
|
756
|
+
}
|
|
757
|
+
var CarouselContext = React2.createContext(null);
|
|
758
|
+
function useCarousel() {
|
|
759
|
+
const context = React2.useContext(CarouselContext);
|
|
760
|
+
if (!context) {
|
|
761
|
+
throw new Error("useCarousel must be used within a <Carousel />");
|
|
762
|
+
}
|
|
763
|
+
return context;
|
|
764
|
+
}
|
|
765
|
+
function Carousel({
|
|
766
|
+
orientation = "horizontal",
|
|
767
|
+
opts,
|
|
768
|
+
setApi,
|
|
769
|
+
plugins,
|
|
770
|
+
className,
|
|
771
|
+
children,
|
|
772
|
+
...props
|
|
773
|
+
}) {
|
|
774
|
+
const [carouselRef, api] = useEmblaCarousel(
|
|
775
|
+
{
|
|
776
|
+
...opts,
|
|
777
|
+
axis: orientation === "horizontal" ? "x" : "y"
|
|
778
|
+
},
|
|
779
|
+
plugins
|
|
780
|
+
);
|
|
781
|
+
const [canScrollPrev, setCanScrollPrev] = React2.useState(false);
|
|
782
|
+
const [canScrollNext, setCanScrollNext] = React2.useState(false);
|
|
783
|
+
const onSelect = React2.useCallback((api2) => {
|
|
784
|
+
if (!api2) return;
|
|
785
|
+
setCanScrollPrev(api2.canScrollPrev());
|
|
786
|
+
setCanScrollNext(api2.canScrollNext());
|
|
787
|
+
}, []);
|
|
788
|
+
const scrollPrev = React2.useCallback(() => {
|
|
789
|
+
api?.scrollPrev();
|
|
790
|
+
}, [api]);
|
|
791
|
+
const scrollNext = React2.useCallback(() => {
|
|
792
|
+
api?.scrollNext();
|
|
793
|
+
}, [api]);
|
|
794
|
+
const handleKeyDown = React2.useCallback(
|
|
795
|
+
(event) => {
|
|
796
|
+
if (event.key === "ArrowLeft") {
|
|
797
|
+
event.preventDefault();
|
|
798
|
+
scrollPrev();
|
|
799
|
+
} else if (event.key === "ArrowRight") {
|
|
800
|
+
event.preventDefault();
|
|
801
|
+
scrollNext();
|
|
802
|
+
}
|
|
803
|
+
},
|
|
804
|
+
[scrollPrev, scrollNext]
|
|
805
|
+
);
|
|
806
|
+
React2.useEffect(() => {
|
|
807
|
+
if (!api || !setApi) return;
|
|
808
|
+
setApi(api);
|
|
809
|
+
}, [api, setApi]);
|
|
810
|
+
React2.useEffect(() => {
|
|
811
|
+
if (!api) return;
|
|
812
|
+
onSelect(api);
|
|
813
|
+
api.on("reInit", onSelect);
|
|
814
|
+
api.on("select", onSelect);
|
|
815
|
+
return () => {
|
|
816
|
+
api?.off("select", onSelect);
|
|
817
|
+
};
|
|
818
|
+
}, [api, onSelect]);
|
|
819
|
+
return /* @__PURE__ */ jsx(
|
|
820
|
+
CarouselContext.Provider,
|
|
821
|
+
{
|
|
822
|
+
value: {
|
|
823
|
+
carouselRef,
|
|
824
|
+
api,
|
|
825
|
+
opts,
|
|
826
|
+
orientation: orientation || (opts?.axis === "y" ? "vertical" : "horizontal"),
|
|
827
|
+
scrollPrev,
|
|
828
|
+
scrollNext,
|
|
829
|
+
canScrollPrev,
|
|
830
|
+
canScrollNext
|
|
831
|
+
},
|
|
832
|
+
children: /* @__PURE__ */ jsx(
|
|
833
|
+
"div",
|
|
834
|
+
{
|
|
835
|
+
onKeyDownCapture: handleKeyDown,
|
|
836
|
+
className: cn("relative", className),
|
|
837
|
+
role: "region",
|
|
838
|
+
"aria-roledescription": "carousel",
|
|
839
|
+
"data-slot": "carousel",
|
|
840
|
+
...props,
|
|
841
|
+
children
|
|
842
|
+
}
|
|
843
|
+
)
|
|
844
|
+
}
|
|
845
|
+
);
|
|
846
|
+
}
|
|
847
|
+
function CarouselContent({ className, ...props }) {
|
|
848
|
+
const { carouselRef, orientation } = useCarousel();
|
|
849
|
+
return /* @__PURE__ */ jsx(
|
|
850
|
+
"div",
|
|
851
|
+
{
|
|
852
|
+
ref: carouselRef,
|
|
853
|
+
className: "overflow-hidden",
|
|
854
|
+
"data-slot": "carousel-content",
|
|
855
|
+
children: /* @__PURE__ */ jsx(
|
|
856
|
+
"div",
|
|
857
|
+
{
|
|
858
|
+
className: cn(
|
|
859
|
+
"flex",
|
|
860
|
+
orientation === "horizontal" ? "-ml-4" : "-mt-4 flex-col",
|
|
861
|
+
className
|
|
862
|
+
),
|
|
863
|
+
...props
|
|
864
|
+
}
|
|
865
|
+
)
|
|
866
|
+
}
|
|
867
|
+
);
|
|
868
|
+
}
|
|
869
|
+
function CarouselItem({ className, ...props }) {
|
|
870
|
+
const { orientation } = useCarousel();
|
|
871
|
+
return /* @__PURE__ */ jsx(
|
|
872
|
+
"div",
|
|
873
|
+
{
|
|
874
|
+
role: "group",
|
|
875
|
+
"aria-roledescription": "slide",
|
|
876
|
+
"data-slot": "carousel-item",
|
|
877
|
+
className: cn(
|
|
878
|
+
"min-w-0 shrink-0 grow-0 basis-full",
|
|
879
|
+
orientation === "horizontal" ? "pl-4" : "pt-4",
|
|
880
|
+
className
|
|
881
|
+
),
|
|
882
|
+
...props
|
|
883
|
+
}
|
|
884
|
+
);
|
|
885
|
+
}
|
|
886
|
+
function CarouselPrevious({
|
|
887
|
+
className,
|
|
888
|
+
variant = "outline",
|
|
889
|
+
size = "icon",
|
|
890
|
+
...props
|
|
891
|
+
}) {
|
|
892
|
+
const { orientation, scrollPrev, canScrollPrev } = useCarousel();
|
|
893
|
+
return /* @__PURE__ */ jsxs(
|
|
894
|
+
Button,
|
|
895
|
+
{
|
|
896
|
+
"data-slot": "carousel-previous",
|
|
897
|
+
variant,
|
|
898
|
+
size,
|
|
899
|
+
className: cn(
|
|
900
|
+
"absolute size-8 rounded-full",
|
|
901
|
+
orientation === "horizontal" ? "top-1/2 -left-12 -translate-y-1/2" : "-top-12 left-1/2 -translate-x-1/2 rotate-90",
|
|
902
|
+
className
|
|
903
|
+
),
|
|
904
|
+
disabled: !canScrollPrev,
|
|
905
|
+
onClick: scrollPrev,
|
|
906
|
+
...props,
|
|
907
|
+
children: [
|
|
908
|
+
/* @__PURE__ */ jsx(ArrowLeft, {}),
|
|
909
|
+
/* @__PURE__ */ jsx("span", { className: "sr-only", children: "Previous slide" })
|
|
910
|
+
]
|
|
911
|
+
}
|
|
912
|
+
);
|
|
913
|
+
}
|
|
914
|
+
function CarouselNext({
|
|
915
|
+
className,
|
|
916
|
+
variant = "outline",
|
|
917
|
+
size = "icon",
|
|
918
|
+
...props
|
|
919
|
+
}) {
|
|
920
|
+
const { orientation, scrollNext, canScrollNext } = useCarousel();
|
|
921
|
+
return /* @__PURE__ */ jsxs(
|
|
922
|
+
Button,
|
|
923
|
+
{
|
|
924
|
+
"data-slot": "carousel-next",
|
|
925
|
+
variant,
|
|
926
|
+
size,
|
|
927
|
+
className: cn(
|
|
928
|
+
"absolute size-8 rounded-full",
|
|
929
|
+
orientation === "horizontal" ? "top-1/2 -right-12 -translate-y-1/2" : "-bottom-12 left-1/2 -translate-x-1/2 rotate-90",
|
|
930
|
+
className
|
|
931
|
+
),
|
|
932
|
+
disabled: !canScrollNext,
|
|
933
|
+
onClick: scrollNext,
|
|
934
|
+
...props,
|
|
935
|
+
children: [
|
|
936
|
+
/* @__PURE__ */ jsx(ArrowRight, {}),
|
|
937
|
+
/* @__PURE__ */ jsx("span", { className: "sr-only", children: "Next slide" })
|
|
938
|
+
]
|
|
939
|
+
}
|
|
940
|
+
);
|
|
941
|
+
}
|
|
942
|
+
function Checkbox({
|
|
943
|
+
className,
|
|
944
|
+
...props
|
|
945
|
+
}) {
|
|
946
|
+
return /* @__PURE__ */ jsx(
|
|
947
|
+
CheckboxPrimitive.Root,
|
|
948
|
+
{
|
|
949
|
+
"data-slot": "checkbox",
|
|
950
|
+
className: cn(
|
|
951
|
+
"peer border-input dark:bg-input/30 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:data-[state=checked]:bg-primary data-[state=checked]:border-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive size-4 shrink-0 rounded-[4px] border shadow-xs transition-shadow outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",
|
|
952
|
+
className
|
|
953
|
+
),
|
|
954
|
+
...props,
|
|
955
|
+
children: /* @__PURE__ */ jsx(
|
|
956
|
+
CheckboxPrimitive.Indicator,
|
|
957
|
+
{
|
|
958
|
+
"data-slot": "checkbox-indicator",
|
|
959
|
+
className: "flex items-center justify-center text-current transition-none",
|
|
960
|
+
children: /* @__PURE__ */ jsx(CheckIcon, { className: "size-3.5" })
|
|
961
|
+
}
|
|
962
|
+
)
|
|
963
|
+
}
|
|
964
|
+
);
|
|
965
|
+
}
|
|
966
|
+
function Collapsible({
|
|
967
|
+
...props
|
|
968
|
+
}) {
|
|
969
|
+
return /* @__PURE__ */ jsx(CollapsiblePrimitive.Root, { "data-slot": "collapsible", ...props });
|
|
970
|
+
}
|
|
971
|
+
function CollapsibleTrigger2({
|
|
972
|
+
...props
|
|
973
|
+
}) {
|
|
974
|
+
return /* @__PURE__ */ jsx(
|
|
975
|
+
CollapsiblePrimitive.CollapsibleTrigger,
|
|
976
|
+
{
|
|
977
|
+
"data-slot": "collapsible-trigger",
|
|
978
|
+
...props
|
|
979
|
+
}
|
|
980
|
+
);
|
|
981
|
+
}
|
|
982
|
+
function CollapsibleContent2({
|
|
983
|
+
...props
|
|
984
|
+
}) {
|
|
985
|
+
return /* @__PURE__ */ jsx(
|
|
986
|
+
CollapsiblePrimitive.CollapsibleContent,
|
|
987
|
+
{
|
|
988
|
+
"data-slot": "collapsible-content",
|
|
989
|
+
...props
|
|
990
|
+
}
|
|
991
|
+
);
|
|
992
|
+
}
|
|
993
|
+
function Dialog({
|
|
994
|
+
...props
|
|
995
|
+
}) {
|
|
996
|
+
return /* @__PURE__ */ jsx(DialogPrimitive.Root, { "data-slot": "dialog", ...props });
|
|
997
|
+
}
|
|
998
|
+
function DialogTrigger({
|
|
999
|
+
...props
|
|
1000
|
+
}) {
|
|
1001
|
+
return /* @__PURE__ */ jsx(DialogPrimitive.Trigger, { "data-slot": "dialog-trigger", ...props });
|
|
1002
|
+
}
|
|
1003
|
+
function DialogPortal({
|
|
1004
|
+
...props
|
|
1005
|
+
}) {
|
|
1006
|
+
return /* @__PURE__ */ jsx(DialogPrimitive.Portal, { "data-slot": "dialog-portal", ...props });
|
|
1007
|
+
}
|
|
1008
|
+
function DialogClose({
|
|
1009
|
+
...props
|
|
1010
|
+
}) {
|
|
1011
|
+
return /* @__PURE__ */ jsx(DialogPrimitive.Close, { "data-slot": "dialog-close", ...props });
|
|
1012
|
+
}
|
|
1013
|
+
function DialogOverlay({
|
|
1014
|
+
className,
|
|
1015
|
+
...props
|
|
1016
|
+
}) {
|
|
1017
|
+
return /* @__PURE__ */ jsx(
|
|
1018
|
+
DialogPrimitive.Overlay,
|
|
1019
|
+
{
|
|
1020
|
+
"data-slot": "dialog-overlay",
|
|
1021
|
+
className: cn(
|
|
1022
|
+
"data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",
|
|
1023
|
+
className
|
|
1024
|
+
),
|
|
1025
|
+
...props
|
|
1026
|
+
}
|
|
1027
|
+
);
|
|
1028
|
+
}
|
|
1029
|
+
function DialogContent({
|
|
1030
|
+
className,
|
|
1031
|
+
children,
|
|
1032
|
+
showCloseButton = true,
|
|
1033
|
+
...props
|
|
1034
|
+
}) {
|
|
1035
|
+
return /* @__PURE__ */ jsxs(DialogPortal, { "data-slot": "dialog-portal", children: [
|
|
1036
|
+
/* @__PURE__ */ jsx(DialogOverlay, {}),
|
|
1037
|
+
/* @__PURE__ */ jsxs(
|
|
1038
|
+
DialogPrimitive.Content,
|
|
1039
|
+
{
|
|
1040
|
+
"data-slot": "dialog-content",
|
|
1041
|
+
className: cn(
|
|
1042
|
+
"bg-background 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 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg",
|
|
1043
|
+
className
|
|
1044
|
+
),
|
|
1045
|
+
...props,
|
|
1046
|
+
children: [
|
|
1047
|
+
children,
|
|
1048
|
+
showCloseButton && /* @__PURE__ */ jsxs(
|
|
1049
|
+
DialogPrimitive.Close,
|
|
1050
|
+
{
|
|
1051
|
+
"data-slot": "dialog-close",
|
|
1052
|
+
className: "ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
1053
|
+
children: [
|
|
1054
|
+
/* @__PURE__ */ jsx(XIcon, {}),
|
|
1055
|
+
/* @__PURE__ */ jsx("span", { className: "sr-only", children: "Close" })
|
|
1056
|
+
]
|
|
1057
|
+
}
|
|
1058
|
+
)
|
|
1059
|
+
]
|
|
1060
|
+
}
|
|
1061
|
+
)
|
|
1062
|
+
] });
|
|
1063
|
+
}
|
|
1064
|
+
function DialogHeader({ className, ...props }) {
|
|
1065
|
+
return /* @__PURE__ */ jsx(
|
|
1066
|
+
"div",
|
|
1067
|
+
{
|
|
1068
|
+
"data-slot": "dialog-header",
|
|
1069
|
+
className: cn("flex flex-col gap-2 text-center sm:text-left", className),
|
|
1070
|
+
...props
|
|
1071
|
+
}
|
|
1072
|
+
);
|
|
1073
|
+
}
|
|
1074
|
+
function DialogFooter({ className, ...props }) {
|
|
1075
|
+
return /* @__PURE__ */ jsx(
|
|
1076
|
+
"div",
|
|
1077
|
+
{
|
|
1078
|
+
"data-slot": "dialog-footer",
|
|
1079
|
+
className: cn(
|
|
1080
|
+
"flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",
|
|
1081
|
+
className
|
|
1082
|
+
),
|
|
1083
|
+
...props
|
|
1084
|
+
}
|
|
1085
|
+
);
|
|
1086
|
+
}
|
|
1087
|
+
function DialogTitle({
|
|
1088
|
+
className,
|
|
1089
|
+
...props
|
|
1090
|
+
}) {
|
|
1091
|
+
return /* @__PURE__ */ jsx(
|
|
1092
|
+
DialogPrimitive.Title,
|
|
1093
|
+
{
|
|
1094
|
+
"data-slot": "dialog-title",
|
|
1095
|
+
className: cn("text-lg leading-none font-semibold", className),
|
|
1096
|
+
...props
|
|
1097
|
+
}
|
|
1098
|
+
);
|
|
1099
|
+
}
|
|
1100
|
+
function DialogDescription({
|
|
1101
|
+
className,
|
|
1102
|
+
...props
|
|
1103
|
+
}) {
|
|
1104
|
+
return /* @__PURE__ */ jsx(
|
|
1105
|
+
DialogPrimitive.Description,
|
|
1106
|
+
{
|
|
1107
|
+
"data-slot": "dialog-description",
|
|
1108
|
+
className: cn("text-muted-foreground text-sm", className),
|
|
1109
|
+
...props
|
|
1110
|
+
}
|
|
1111
|
+
);
|
|
1112
|
+
}
|
|
1113
|
+
function Command({
|
|
1114
|
+
className,
|
|
1115
|
+
...props
|
|
1116
|
+
}) {
|
|
1117
|
+
return /* @__PURE__ */ jsx(
|
|
1118
|
+
Command$1,
|
|
1119
|
+
{
|
|
1120
|
+
"data-slot": "command",
|
|
1121
|
+
className: cn(
|
|
1122
|
+
"bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md",
|
|
1123
|
+
className
|
|
1124
|
+
),
|
|
1125
|
+
...props
|
|
1126
|
+
}
|
|
1127
|
+
);
|
|
1128
|
+
}
|
|
1129
|
+
function CommandDialog({
|
|
1130
|
+
title = "Command Palette",
|
|
1131
|
+
description = "Search for a command to run...",
|
|
1132
|
+
children,
|
|
1133
|
+
className,
|
|
1134
|
+
showCloseButton = true,
|
|
1135
|
+
commandProps,
|
|
1136
|
+
...props
|
|
1137
|
+
}) {
|
|
1138
|
+
return /* @__PURE__ */ jsxs(Dialog, { ...props, children: [
|
|
1139
|
+
/* @__PURE__ */ jsxs(DialogHeader, { className: "sr-only", children: [
|
|
1140
|
+
/* @__PURE__ */ jsx(DialogTitle, { children: title }),
|
|
1141
|
+
/* @__PURE__ */ jsx(DialogDescription, { children: description })
|
|
1142
|
+
] }),
|
|
1143
|
+
/* @__PURE__ */ jsx(
|
|
1144
|
+
DialogContent,
|
|
1145
|
+
{
|
|
1146
|
+
className: cn("overflow-hidden p-0", className),
|
|
1147
|
+
showCloseButton,
|
|
1148
|
+
children: /* @__PURE__ */ jsx(Command, { className: "[&_[cmdk-group-heading]]:text-muted-foreground **:data-[slot=command-input-wrapper]:h-12 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group]]:px-2 [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[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", ...commandProps, children })
|
|
1149
|
+
}
|
|
1150
|
+
)
|
|
1151
|
+
] });
|
|
1152
|
+
}
|
|
1153
|
+
function CommandInput({
|
|
1154
|
+
className,
|
|
1155
|
+
...props
|
|
1156
|
+
}) {
|
|
1157
|
+
return /* @__PURE__ */ jsxs(
|
|
1158
|
+
"div",
|
|
1159
|
+
{
|
|
1160
|
+
"data-slot": "command-input-wrapper",
|
|
1161
|
+
className: "flex h-9 items-center gap-2 border-b px-3",
|
|
1162
|
+
children: [
|
|
1163
|
+
/* @__PURE__ */ jsx(SearchIcon, { className: "size-4 shrink-0 opacity-50" }),
|
|
1164
|
+
/* @__PURE__ */ jsx(
|
|
1165
|
+
Command$1.Input,
|
|
1166
|
+
{
|
|
1167
|
+
"data-slot": "command-input",
|
|
1168
|
+
className: cn(
|
|
1169
|
+
"placeholder:text-muted-foreground flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50",
|
|
1170
|
+
className
|
|
1171
|
+
),
|
|
1172
|
+
...props
|
|
1173
|
+
}
|
|
1174
|
+
)
|
|
1175
|
+
]
|
|
1176
|
+
}
|
|
1177
|
+
);
|
|
1178
|
+
}
|
|
1179
|
+
function CommandList({
|
|
1180
|
+
className,
|
|
1181
|
+
...props
|
|
1182
|
+
}) {
|
|
1183
|
+
return /* @__PURE__ */ jsx(
|
|
1184
|
+
Command$1.List,
|
|
1185
|
+
{
|
|
1186
|
+
"data-slot": "command-list",
|
|
1187
|
+
className: cn(
|
|
1188
|
+
"max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto",
|
|
1189
|
+
className
|
|
1190
|
+
),
|
|
1191
|
+
...props
|
|
1192
|
+
}
|
|
1193
|
+
);
|
|
1194
|
+
}
|
|
1195
|
+
function CommandEmpty({
|
|
1196
|
+
...props
|
|
1197
|
+
}) {
|
|
1198
|
+
return /* @__PURE__ */ jsx(
|
|
1199
|
+
Command$1.Empty,
|
|
1200
|
+
{
|
|
1201
|
+
"data-slot": "command-empty",
|
|
1202
|
+
className: "py-6 text-center text-sm",
|
|
1203
|
+
...props
|
|
1204
|
+
}
|
|
1205
|
+
);
|
|
1206
|
+
}
|
|
1207
|
+
function CommandGroup({
|
|
1208
|
+
className,
|
|
1209
|
+
...props
|
|
1210
|
+
}) {
|
|
1211
|
+
return /* @__PURE__ */ jsx(
|
|
1212
|
+
Command$1.Group,
|
|
1213
|
+
{
|
|
1214
|
+
"data-slot": "command-group",
|
|
1215
|
+
className: cn(
|
|
1216
|
+
"text-foreground [&_[cmdk-group-heading]]:text-muted-foreground overflow-hidden p-1 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium",
|
|
1217
|
+
className
|
|
1218
|
+
),
|
|
1219
|
+
...props
|
|
1220
|
+
}
|
|
1221
|
+
);
|
|
1222
|
+
}
|
|
1223
|
+
function CommandSeparator({
|
|
1224
|
+
className,
|
|
1225
|
+
...props
|
|
1226
|
+
}) {
|
|
1227
|
+
return /* @__PURE__ */ jsx(
|
|
1228
|
+
Command$1.Separator,
|
|
1229
|
+
{
|
|
1230
|
+
"data-slot": "command-separator",
|
|
1231
|
+
className: cn("bg-border -mx-1 h-px", className),
|
|
1232
|
+
...props
|
|
1233
|
+
}
|
|
1234
|
+
);
|
|
1235
|
+
}
|
|
1236
|
+
function CommandItem({
|
|
1237
|
+
className,
|
|
1238
|
+
...props
|
|
1239
|
+
}) {
|
|
1240
|
+
return /* @__PURE__ */ jsx(
|
|
1241
|
+
Command$1.Item,
|
|
1242
|
+
{
|
|
1243
|
+
"data-slot": "command-item",
|
|
1244
|
+
className: cn(
|
|
1245
|
+
"data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
1246
|
+
className
|
|
1247
|
+
),
|
|
1248
|
+
...props
|
|
1249
|
+
}
|
|
1250
|
+
);
|
|
1251
|
+
}
|
|
1252
|
+
function CommandShortcut({
|
|
1253
|
+
className,
|
|
1254
|
+
...props
|
|
1255
|
+
}) {
|
|
1256
|
+
return /* @__PURE__ */ jsx(
|
|
1257
|
+
"span",
|
|
1258
|
+
{
|
|
1259
|
+
"data-slot": "command-shortcut",
|
|
1260
|
+
className: cn(
|
|
1261
|
+
"text-muted-foreground ml-auto text-xs tracking-widest",
|
|
1262
|
+
className
|
|
1263
|
+
),
|
|
1264
|
+
...props
|
|
1265
|
+
}
|
|
1266
|
+
);
|
|
1267
|
+
}
|
|
1268
|
+
function ContextMenu({
|
|
1269
|
+
...props
|
|
1270
|
+
}) {
|
|
1271
|
+
return /* @__PURE__ */ jsx(ContextMenuPrimitive.Root, { "data-slot": "context-menu", ...props });
|
|
1272
|
+
}
|
|
1273
|
+
function ContextMenuTrigger({
|
|
1274
|
+
...props
|
|
1275
|
+
}) {
|
|
1276
|
+
return /* @__PURE__ */ jsx(ContextMenuPrimitive.Trigger, { "data-slot": "context-menu-trigger", ...props });
|
|
1277
|
+
}
|
|
1278
|
+
function ContextMenuGroup({
|
|
1279
|
+
...props
|
|
1280
|
+
}) {
|
|
1281
|
+
return /* @__PURE__ */ jsx(ContextMenuPrimitive.Group, { "data-slot": "context-menu-group", ...props });
|
|
1282
|
+
}
|
|
1283
|
+
function ContextMenuPortal({
|
|
1284
|
+
...props
|
|
1285
|
+
}) {
|
|
1286
|
+
return /* @__PURE__ */ jsx(ContextMenuPrimitive.Portal, { "data-slot": "context-menu-portal", ...props });
|
|
1287
|
+
}
|
|
1288
|
+
function ContextMenuSub({
|
|
1289
|
+
...props
|
|
1290
|
+
}) {
|
|
1291
|
+
return /* @__PURE__ */ jsx(ContextMenuPrimitive.Sub, { "data-slot": "context-menu-sub", ...props });
|
|
1292
|
+
}
|
|
1293
|
+
function ContextMenuRadioGroup({
|
|
1294
|
+
...props
|
|
1295
|
+
}) {
|
|
1296
|
+
return /* @__PURE__ */ jsx(
|
|
1297
|
+
ContextMenuPrimitive.RadioGroup,
|
|
1298
|
+
{
|
|
1299
|
+
"data-slot": "context-menu-radio-group",
|
|
1300
|
+
...props
|
|
1301
|
+
}
|
|
1302
|
+
);
|
|
1303
|
+
}
|
|
1304
|
+
function ContextMenuSubTrigger({
|
|
1305
|
+
className,
|
|
1306
|
+
inset,
|
|
1307
|
+
children,
|
|
1308
|
+
...props
|
|
1309
|
+
}) {
|
|
1310
|
+
return /* @__PURE__ */ jsxs(
|
|
1311
|
+
ContextMenuPrimitive.SubTrigger,
|
|
1312
|
+
{
|
|
1313
|
+
"data-slot": "context-menu-sub-trigger",
|
|
1314
|
+
"data-inset": inset,
|
|
1315
|
+
className: cn(
|
|
1316
|
+
"focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground flex cursor-default items-center rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
1317
|
+
className
|
|
1318
|
+
),
|
|
1319
|
+
...props,
|
|
1320
|
+
children: [
|
|
1321
|
+
children,
|
|
1322
|
+
/* @__PURE__ */ jsx(ChevronRightIcon, { className: "ml-auto" })
|
|
1323
|
+
]
|
|
1324
|
+
}
|
|
1325
|
+
);
|
|
1326
|
+
}
|
|
1327
|
+
function ContextMenuSubContent({
|
|
1328
|
+
className,
|
|
1329
|
+
...props
|
|
1330
|
+
}) {
|
|
1331
|
+
return /* @__PURE__ */ jsx(
|
|
1332
|
+
ContextMenuPrimitive.SubContent,
|
|
1333
|
+
{
|
|
1334
|
+
"data-slot": "context-menu-sub-content",
|
|
1335
|
+
className: cn(
|
|
1336
|
+
"bg-popover text-popover-foreground 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 z-50 min-w-[8rem] origin-(--radix-context-menu-content-transform-origin) overflow-hidden rounded-md border p-1 shadow-lg",
|
|
1337
|
+
className
|
|
1338
|
+
),
|
|
1339
|
+
...props
|
|
1340
|
+
}
|
|
1341
|
+
);
|
|
1342
|
+
}
|
|
1343
|
+
function ContextMenuContent({
|
|
1344
|
+
className,
|
|
1345
|
+
...props
|
|
1346
|
+
}) {
|
|
1347
|
+
return /* @__PURE__ */ jsx(ContextMenuPrimitive.Portal, { children: /* @__PURE__ */ jsx(
|
|
1348
|
+
ContextMenuPrimitive.Content,
|
|
1349
|
+
{
|
|
1350
|
+
"data-slot": "context-menu-content",
|
|
1351
|
+
className: cn(
|
|
1352
|
+
"bg-popover text-popover-foreground 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 z-50 max-h-(--radix-context-menu-content-available-height) min-w-[8rem] origin-(--radix-context-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md",
|
|
1353
|
+
className
|
|
1354
|
+
),
|
|
1355
|
+
...props
|
|
1356
|
+
}
|
|
1357
|
+
) });
|
|
1358
|
+
}
|
|
1359
|
+
function ContextMenuItem({
|
|
1360
|
+
className,
|
|
1361
|
+
inset,
|
|
1362
|
+
variant = "default",
|
|
1363
|
+
...props
|
|
1364
|
+
}) {
|
|
1365
|
+
return /* @__PURE__ */ jsx(
|
|
1366
|
+
ContextMenuPrimitive.Item,
|
|
1367
|
+
{
|
|
1368
|
+
"data-slot": "context-menu-item",
|
|
1369
|
+
"data-inset": inset,
|
|
1370
|
+
"data-variant": variant,
|
|
1371
|
+
className: cn(
|
|
1372
|
+
"focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
1373
|
+
className
|
|
1374
|
+
),
|
|
1375
|
+
...props
|
|
1376
|
+
}
|
|
1377
|
+
);
|
|
1378
|
+
}
|
|
1379
|
+
function ContextMenuCheckboxItem({
|
|
1380
|
+
className,
|
|
1381
|
+
children,
|
|
1382
|
+
checked,
|
|
1383
|
+
...props
|
|
1384
|
+
}) {
|
|
1385
|
+
return /* @__PURE__ */ jsxs(
|
|
1386
|
+
ContextMenuPrimitive.CheckboxItem,
|
|
1387
|
+
{
|
|
1388
|
+
"data-slot": "context-menu-checkbox-item",
|
|
1389
|
+
className: cn(
|
|
1390
|
+
"focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
1391
|
+
className
|
|
1392
|
+
),
|
|
1393
|
+
checked,
|
|
1394
|
+
...props,
|
|
1395
|
+
children: [
|
|
1396
|
+
/* @__PURE__ */ jsx("span", { className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ jsx(ContextMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx(CheckIcon, { className: "size-4" }) }) }),
|
|
1397
|
+
children
|
|
1398
|
+
]
|
|
1399
|
+
}
|
|
1400
|
+
);
|
|
1401
|
+
}
|
|
1402
|
+
function ContextMenuRadioItem({
|
|
1403
|
+
className,
|
|
1404
|
+
children,
|
|
1405
|
+
...props
|
|
1406
|
+
}) {
|
|
1407
|
+
return /* @__PURE__ */ jsxs(
|
|
1408
|
+
ContextMenuPrimitive.RadioItem,
|
|
1409
|
+
{
|
|
1410
|
+
"data-slot": "context-menu-radio-item",
|
|
1411
|
+
className: cn(
|
|
1412
|
+
"focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
1413
|
+
className
|
|
1414
|
+
),
|
|
1415
|
+
...props,
|
|
1416
|
+
children: [
|
|
1417
|
+
/* @__PURE__ */ jsx("span", { className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ jsx(ContextMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx(CircleIcon, { className: "size-2 fill-current" }) }) }),
|
|
1418
|
+
children
|
|
1419
|
+
]
|
|
1420
|
+
}
|
|
1421
|
+
);
|
|
1422
|
+
}
|
|
1423
|
+
function ContextMenuLabel({
|
|
1424
|
+
className,
|
|
1425
|
+
inset,
|
|
1426
|
+
...props
|
|
1427
|
+
}) {
|
|
1428
|
+
return /* @__PURE__ */ jsx(
|
|
1429
|
+
ContextMenuPrimitive.Label,
|
|
1430
|
+
{
|
|
1431
|
+
"data-slot": "context-menu-label",
|
|
1432
|
+
"data-inset": inset,
|
|
1433
|
+
className: cn(
|
|
1434
|
+
"text-foreground px-2 py-1.5 text-sm font-medium data-[inset]:pl-8",
|
|
1435
|
+
className
|
|
1436
|
+
),
|
|
1437
|
+
...props
|
|
1438
|
+
}
|
|
1439
|
+
);
|
|
1440
|
+
}
|
|
1441
|
+
function ContextMenuSeparator({
|
|
1442
|
+
className,
|
|
1443
|
+
...props
|
|
1444
|
+
}) {
|
|
1445
|
+
return /* @__PURE__ */ jsx(
|
|
1446
|
+
ContextMenuPrimitive.Separator,
|
|
1447
|
+
{
|
|
1448
|
+
"data-slot": "context-menu-separator",
|
|
1449
|
+
className: cn("bg-border -mx-1 my-1 h-px", className),
|
|
1450
|
+
...props
|
|
1451
|
+
}
|
|
1452
|
+
);
|
|
1453
|
+
}
|
|
1454
|
+
function ContextMenuShortcut({
|
|
1455
|
+
className,
|
|
1456
|
+
...props
|
|
1457
|
+
}) {
|
|
1458
|
+
return /* @__PURE__ */ jsx(
|
|
1459
|
+
"span",
|
|
1460
|
+
{
|
|
1461
|
+
"data-slot": "context-menu-shortcut",
|
|
1462
|
+
className: cn(
|
|
1463
|
+
"text-muted-foreground ml-auto text-xs tracking-widest",
|
|
1464
|
+
className
|
|
1465
|
+
),
|
|
1466
|
+
...props
|
|
1467
|
+
}
|
|
1468
|
+
);
|
|
1469
|
+
}
|
|
1470
|
+
function Drawer({
|
|
1471
|
+
...props
|
|
1472
|
+
}) {
|
|
1473
|
+
return /* @__PURE__ */ jsx(Drawer$1.Root, { "data-slot": "drawer", ...props });
|
|
1474
|
+
}
|
|
1475
|
+
function DrawerTrigger({
|
|
1476
|
+
...props
|
|
1477
|
+
}) {
|
|
1478
|
+
return /* @__PURE__ */ jsx(Drawer$1.Trigger, { "data-slot": "drawer-trigger", ...props });
|
|
1479
|
+
}
|
|
1480
|
+
function DrawerPortal({
|
|
1481
|
+
...props
|
|
1482
|
+
}) {
|
|
1483
|
+
return /* @__PURE__ */ jsx(Drawer$1.Portal, { "data-slot": "drawer-portal", ...props });
|
|
1484
|
+
}
|
|
1485
|
+
function DrawerClose({
|
|
1486
|
+
...props
|
|
1487
|
+
}) {
|
|
1488
|
+
return /* @__PURE__ */ jsx(Drawer$1.Close, { "data-slot": "drawer-close", ...props });
|
|
1489
|
+
}
|
|
1490
|
+
function DrawerOverlay({
|
|
1491
|
+
className,
|
|
1492
|
+
...props
|
|
1493
|
+
}) {
|
|
1494
|
+
return /* @__PURE__ */ jsx(
|
|
1495
|
+
Drawer$1.Overlay,
|
|
1496
|
+
{
|
|
1497
|
+
"data-slot": "drawer-overlay",
|
|
1498
|
+
className: cn(
|
|
1499
|
+
"data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",
|
|
1500
|
+
className
|
|
1501
|
+
),
|
|
1502
|
+
...props
|
|
1503
|
+
}
|
|
1504
|
+
);
|
|
1505
|
+
}
|
|
1506
|
+
function DrawerContent({
|
|
1507
|
+
className,
|
|
1508
|
+
children,
|
|
1509
|
+
...props
|
|
1510
|
+
}) {
|
|
1511
|
+
return /* @__PURE__ */ jsxs(DrawerPortal, { "data-slot": "drawer-portal", children: [
|
|
1512
|
+
/* @__PURE__ */ jsx(DrawerOverlay, {}),
|
|
1513
|
+
/* @__PURE__ */ jsxs(
|
|
1514
|
+
Drawer$1.Content,
|
|
1515
|
+
{
|
|
1516
|
+
"data-slot": "drawer-content",
|
|
1517
|
+
className: cn(
|
|
1518
|
+
"group/drawer-content bg-background fixed z-50 flex h-auto flex-col",
|
|
1519
|
+
"data-[vaul-drawer-direction=top]:inset-x-0 data-[vaul-drawer-direction=top]:top-0 data-[vaul-drawer-direction=top]:mb-24 data-[vaul-drawer-direction=top]:max-h-[80vh] data-[vaul-drawer-direction=top]:rounded-b-lg data-[vaul-drawer-direction=top]:border-b",
|
|
1520
|
+
"data-[vaul-drawer-direction=bottom]:inset-x-0 data-[vaul-drawer-direction=bottom]:bottom-0 data-[vaul-drawer-direction=bottom]:mt-24 data-[vaul-drawer-direction=bottom]:max-h-[80vh] data-[vaul-drawer-direction=bottom]:rounded-t-lg data-[vaul-drawer-direction=bottom]:border-t",
|
|
1521
|
+
"data-[vaul-drawer-direction=right]:inset-y-0 data-[vaul-drawer-direction=right]:right-0 data-[vaul-drawer-direction=right]:w-3/4 data-[vaul-drawer-direction=right]:border-l data-[vaul-drawer-direction=right]:sm:max-w-sm",
|
|
1522
|
+
"data-[vaul-drawer-direction=left]:inset-y-0 data-[vaul-drawer-direction=left]:left-0 data-[vaul-drawer-direction=left]:w-3/4 data-[vaul-drawer-direction=left]:border-r data-[vaul-drawer-direction=left]:sm:max-w-sm",
|
|
1523
|
+
className
|
|
1524
|
+
),
|
|
1525
|
+
...props,
|
|
1526
|
+
children: [
|
|
1527
|
+
/* @__PURE__ */ jsx("div", { className: "bg-muted mx-auto mt-4 hidden h-2 w-[100px] shrink-0 rounded-full group-data-[vaul-drawer-direction=bottom]/drawer-content:block" }),
|
|
1528
|
+
children
|
|
1529
|
+
]
|
|
1530
|
+
}
|
|
1531
|
+
)
|
|
1532
|
+
] });
|
|
1533
|
+
}
|
|
1534
|
+
function DrawerHeader({ className, ...props }) {
|
|
1535
|
+
return /* @__PURE__ */ jsx(
|
|
1536
|
+
"div",
|
|
1537
|
+
{
|
|
1538
|
+
"data-slot": "drawer-header",
|
|
1539
|
+
className: cn(
|
|
1540
|
+
"flex flex-col gap-0.5 p-4 group-data-[vaul-drawer-direction=bottom]/drawer-content:text-center group-data-[vaul-drawer-direction=top]/drawer-content:text-center md:gap-1.5 md:text-left",
|
|
1541
|
+
className
|
|
1542
|
+
),
|
|
1543
|
+
...props
|
|
1544
|
+
}
|
|
1545
|
+
);
|
|
1546
|
+
}
|
|
1547
|
+
function DrawerFooter({ className, ...props }) {
|
|
1548
|
+
return /* @__PURE__ */ jsx(
|
|
1549
|
+
"div",
|
|
1550
|
+
{
|
|
1551
|
+
"data-slot": "drawer-footer",
|
|
1552
|
+
className: cn("mt-auto flex flex-col gap-2 p-4", className),
|
|
1553
|
+
...props
|
|
1554
|
+
}
|
|
1555
|
+
);
|
|
1556
|
+
}
|
|
1557
|
+
function DrawerTitle({
|
|
1558
|
+
className,
|
|
1559
|
+
...props
|
|
1560
|
+
}) {
|
|
1561
|
+
return /* @__PURE__ */ jsx(
|
|
1562
|
+
Drawer$1.Title,
|
|
1563
|
+
{
|
|
1564
|
+
"data-slot": "drawer-title",
|
|
1565
|
+
className: cn("text-foreground font-semibold", className),
|
|
1566
|
+
...props
|
|
1567
|
+
}
|
|
1568
|
+
);
|
|
1569
|
+
}
|
|
1570
|
+
function DrawerDescription({
|
|
1571
|
+
className,
|
|
1572
|
+
...props
|
|
1573
|
+
}) {
|
|
1574
|
+
return /* @__PURE__ */ jsx(
|
|
1575
|
+
Drawer$1.Description,
|
|
1576
|
+
{
|
|
1577
|
+
"data-slot": "drawer-description",
|
|
1578
|
+
className: cn("text-muted-foreground text-sm", className),
|
|
1579
|
+
...props
|
|
1580
|
+
}
|
|
1581
|
+
);
|
|
1582
|
+
}
|
|
1583
|
+
function DropdownMenu({
|
|
1584
|
+
...props
|
|
1585
|
+
}) {
|
|
1586
|
+
return /* @__PURE__ */ jsx(DropdownMenuPrimitive.Root, { "data-slot": "dropdown-menu", ...props });
|
|
1587
|
+
}
|
|
1588
|
+
function DropdownMenuPortal({
|
|
1589
|
+
...props
|
|
1590
|
+
}) {
|
|
1591
|
+
return /* @__PURE__ */ jsx(DropdownMenuPrimitive.Portal, { "data-slot": "dropdown-menu-portal", ...props });
|
|
1592
|
+
}
|
|
1593
|
+
function DropdownMenuTrigger({
|
|
1594
|
+
...props
|
|
1595
|
+
}) {
|
|
1596
|
+
return /* @__PURE__ */ jsx(
|
|
1597
|
+
DropdownMenuPrimitive.Trigger,
|
|
1598
|
+
{
|
|
1599
|
+
"data-slot": "dropdown-menu-trigger",
|
|
1600
|
+
...props
|
|
1601
|
+
}
|
|
1602
|
+
);
|
|
1603
|
+
}
|
|
1604
|
+
function DropdownMenuContent({
|
|
1605
|
+
className,
|
|
1606
|
+
sideOffset = 4,
|
|
1607
|
+
...props
|
|
1608
|
+
}) {
|
|
1609
|
+
return /* @__PURE__ */ jsx(DropdownMenuPrimitive.Portal, { children: /* @__PURE__ */ jsx(
|
|
1610
|
+
DropdownMenuPrimitive.Content,
|
|
1611
|
+
{
|
|
1612
|
+
"data-slot": "dropdown-menu-content",
|
|
1613
|
+
sideOffset,
|
|
1614
|
+
className: cn(
|
|
1615
|
+
"bg-popover text-popover-foreground 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 z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md",
|
|
1616
|
+
className
|
|
1617
|
+
),
|
|
1618
|
+
...props
|
|
1619
|
+
}
|
|
1620
|
+
) });
|
|
1621
|
+
}
|
|
1622
|
+
function DropdownMenuGroup({
|
|
1623
|
+
...props
|
|
1624
|
+
}) {
|
|
1625
|
+
return /* @__PURE__ */ jsx(DropdownMenuPrimitive.Group, { "data-slot": "dropdown-menu-group", ...props });
|
|
1626
|
+
}
|
|
1627
|
+
function DropdownMenuItem({
|
|
1628
|
+
className,
|
|
1629
|
+
inset,
|
|
1630
|
+
variant = "default",
|
|
1631
|
+
...props
|
|
1632
|
+
}) {
|
|
1633
|
+
return /* @__PURE__ */ jsx(
|
|
1634
|
+
DropdownMenuPrimitive.Item,
|
|
1635
|
+
{
|
|
1636
|
+
"data-slot": "dropdown-menu-item",
|
|
1637
|
+
"data-inset": inset,
|
|
1638
|
+
"data-variant": variant,
|
|
1639
|
+
className: cn(
|
|
1640
|
+
"focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
1641
|
+
className
|
|
1642
|
+
),
|
|
1643
|
+
...props
|
|
1644
|
+
}
|
|
1645
|
+
);
|
|
1646
|
+
}
|
|
1647
|
+
function DropdownMenuCheckboxItem({
|
|
1648
|
+
className,
|
|
1649
|
+
children,
|
|
1650
|
+
checked,
|
|
1651
|
+
...props
|
|
1652
|
+
}) {
|
|
1653
|
+
return /* @__PURE__ */ jsxs(
|
|
1654
|
+
DropdownMenuPrimitive.CheckboxItem,
|
|
1655
|
+
{
|
|
1656
|
+
"data-slot": "dropdown-menu-checkbox-item",
|
|
1657
|
+
className: cn(
|
|
1658
|
+
"focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
1659
|
+
className
|
|
1660
|
+
),
|
|
1661
|
+
checked,
|
|
1662
|
+
...props,
|
|
1663
|
+
children: [
|
|
1664
|
+
/* @__PURE__ */ jsx("span", { className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ jsx(DropdownMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx(CheckIcon, { className: "size-4" }) }) }),
|
|
1665
|
+
children
|
|
1666
|
+
]
|
|
1667
|
+
}
|
|
1668
|
+
);
|
|
1669
|
+
}
|
|
1670
|
+
function DropdownMenuRadioGroup({
|
|
1671
|
+
...props
|
|
1672
|
+
}) {
|
|
1673
|
+
return /* @__PURE__ */ jsx(
|
|
1674
|
+
DropdownMenuPrimitive.RadioGroup,
|
|
1675
|
+
{
|
|
1676
|
+
"data-slot": "dropdown-menu-radio-group",
|
|
1677
|
+
...props
|
|
1678
|
+
}
|
|
1679
|
+
);
|
|
1680
|
+
}
|
|
1681
|
+
function DropdownMenuRadioItem({
|
|
1682
|
+
className,
|
|
1683
|
+
children,
|
|
1684
|
+
...props
|
|
1685
|
+
}) {
|
|
1686
|
+
return /* @__PURE__ */ jsxs(
|
|
1687
|
+
DropdownMenuPrimitive.RadioItem,
|
|
1688
|
+
{
|
|
1689
|
+
"data-slot": "dropdown-menu-radio-item",
|
|
1690
|
+
className: cn(
|
|
1691
|
+
"focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
1692
|
+
className
|
|
1693
|
+
),
|
|
1694
|
+
...props,
|
|
1695
|
+
children: [
|
|
1696
|
+
/* @__PURE__ */ jsx("span", { className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ jsx(DropdownMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx(CircleIcon, { className: "size-2 fill-current" }) }) }),
|
|
1697
|
+
children
|
|
1698
|
+
]
|
|
1699
|
+
}
|
|
1700
|
+
);
|
|
1701
|
+
}
|
|
1702
|
+
function DropdownMenuLabel({
|
|
1703
|
+
className,
|
|
1704
|
+
inset,
|
|
1705
|
+
...props
|
|
1706
|
+
}) {
|
|
1707
|
+
return /* @__PURE__ */ jsx(
|
|
1708
|
+
DropdownMenuPrimitive.Label,
|
|
1709
|
+
{
|
|
1710
|
+
"data-slot": "dropdown-menu-label",
|
|
1711
|
+
"data-inset": inset,
|
|
1712
|
+
className: cn(
|
|
1713
|
+
"px-2 py-1.5 text-sm font-medium data-[inset]:pl-8",
|
|
1714
|
+
className
|
|
1715
|
+
),
|
|
1716
|
+
...props
|
|
1717
|
+
}
|
|
1718
|
+
);
|
|
1719
|
+
}
|
|
1720
|
+
function DropdownMenuSeparator({
|
|
1721
|
+
className,
|
|
1722
|
+
...props
|
|
1723
|
+
}) {
|
|
1724
|
+
return /* @__PURE__ */ jsx(
|
|
1725
|
+
DropdownMenuPrimitive.Separator,
|
|
1726
|
+
{
|
|
1727
|
+
"data-slot": "dropdown-menu-separator",
|
|
1728
|
+
className: cn("bg-border -mx-1 my-1 h-px", className),
|
|
1729
|
+
...props
|
|
1730
|
+
}
|
|
1731
|
+
);
|
|
1732
|
+
}
|
|
1733
|
+
function DropdownMenuShortcut({
|
|
1734
|
+
className,
|
|
1735
|
+
...props
|
|
1736
|
+
}) {
|
|
1737
|
+
return /* @__PURE__ */ jsx(
|
|
1738
|
+
"span",
|
|
1739
|
+
{
|
|
1740
|
+
"data-slot": "dropdown-menu-shortcut",
|
|
1741
|
+
className: cn(
|
|
1742
|
+
"text-muted-foreground ml-auto text-xs tracking-widest",
|
|
1743
|
+
className
|
|
1744
|
+
),
|
|
1745
|
+
...props
|
|
1746
|
+
}
|
|
1747
|
+
);
|
|
1748
|
+
}
|
|
1749
|
+
function DropdownMenuSub({
|
|
1750
|
+
...props
|
|
1751
|
+
}) {
|
|
1752
|
+
return /* @__PURE__ */ jsx(DropdownMenuPrimitive.Sub, { "data-slot": "dropdown-menu-sub", ...props });
|
|
1753
|
+
}
|
|
1754
|
+
function DropdownMenuSubTrigger({
|
|
1755
|
+
className,
|
|
1756
|
+
inset,
|
|
1757
|
+
children,
|
|
1758
|
+
...props
|
|
1759
|
+
}) {
|
|
1760
|
+
return /* @__PURE__ */ jsxs(
|
|
1761
|
+
DropdownMenuPrimitive.SubTrigger,
|
|
1762
|
+
{
|
|
1763
|
+
"data-slot": "dropdown-menu-sub-trigger",
|
|
1764
|
+
"data-inset": inset,
|
|
1765
|
+
className: cn(
|
|
1766
|
+
"focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground flex cursor-default items-center rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[inset]:pl-8",
|
|
1767
|
+
className
|
|
1768
|
+
),
|
|
1769
|
+
...props,
|
|
1770
|
+
children: [
|
|
1771
|
+
children,
|
|
1772
|
+
/* @__PURE__ */ jsx(ChevronRightIcon, { className: "ml-auto size-4" })
|
|
1773
|
+
]
|
|
1774
|
+
}
|
|
1775
|
+
);
|
|
1776
|
+
}
|
|
1777
|
+
function DropdownMenuSubContent({
|
|
1778
|
+
className,
|
|
1779
|
+
...props
|
|
1780
|
+
}) {
|
|
1781
|
+
return /* @__PURE__ */ jsx(
|
|
1782
|
+
DropdownMenuPrimitive.SubContent,
|
|
1783
|
+
{
|
|
1784
|
+
"data-slot": "dropdown-menu-sub-content",
|
|
1785
|
+
className: cn(
|
|
1786
|
+
"bg-popover text-popover-foreground 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 z-50 min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-hidden rounded-md border p-1 shadow-lg",
|
|
1787
|
+
className
|
|
1788
|
+
),
|
|
1789
|
+
...props
|
|
1790
|
+
}
|
|
1791
|
+
);
|
|
1792
|
+
}
|
|
1793
|
+
function Label3({
|
|
1794
|
+
className,
|
|
1795
|
+
...props
|
|
1796
|
+
}) {
|
|
1797
|
+
return /* @__PURE__ */ jsx(
|
|
1798
|
+
LabelPrimitive.Root,
|
|
1799
|
+
{
|
|
1800
|
+
"data-slot": "label",
|
|
1801
|
+
className: cn(
|
|
1802
|
+
"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",
|
|
1803
|
+
className
|
|
1804
|
+
),
|
|
1805
|
+
...props
|
|
1806
|
+
}
|
|
1807
|
+
);
|
|
1808
|
+
}
|
|
1809
|
+
var Form = FormProvider;
|
|
1810
|
+
var FormFieldContext = React2.createContext(
|
|
1811
|
+
{}
|
|
1812
|
+
);
|
|
1813
|
+
var FormField = ({
|
|
1814
|
+
...props
|
|
1815
|
+
}) => {
|
|
1816
|
+
return /* @__PURE__ */ jsx(FormFieldContext.Provider, { value: { name: props.name }, children: /* @__PURE__ */ jsx(Controller, { ...props }) });
|
|
1817
|
+
};
|
|
1818
|
+
var useFormField = () => {
|
|
1819
|
+
const fieldContext = React2.useContext(FormFieldContext);
|
|
1820
|
+
const itemContext = React2.useContext(FormItemContext);
|
|
1821
|
+
const { getFieldState } = useFormContext();
|
|
1822
|
+
const formState = useFormState({ name: fieldContext.name });
|
|
1823
|
+
const fieldState = getFieldState(fieldContext.name, formState);
|
|
1824
|
+
if (!fieldContext) {
|
|
1825
|
+
throw new Error("useFormField should be used within <FormField>");
|
|
1826
|
+
}
|
|
1827
|
+
const { id } = itemContext;
|
|
1828
|
+
return {
|
|
1829
|
+
id,
|
|
1830
|
+
name: fieldContext.name,
|
|
1831
|
+
formItemId: `${id}-form-item`,
|
|
1832
|
+
formDescriptionId: `${id}-form-item-description`,
|
|
1833
|
+
formMessageId: `${id}-form-item-message`,
|
|
1834
|
+
...fieldState
|
|
1835
|
+
};
|
|
1836
|
+
};
|
|
1837
|
+
var FormItemContext = React2.createContext(
|
|
1838
|
+
{}
|
|
1839
|
+
);
|
|
1840
|
+
function FormItem({ className, ...props }) {
|
|
1841
|
+
const id = React2.useId();
|
|
1842
|
+
return /* @__PURE__ */ jsx(FormItemContext.Provider, { value: { id }, children: /* @__PURE__ */ jsx(
|
|
1843
|
+
"div",
|
|
1844
|
+
{
|
|
1845
|
+
"data-slot": "form-item",
|
|
1846
|
+
className: cn("grid gap-2", className),
|
|
1847
|
+
...props
|
|
1848
|
+
}
|
|
1849
|
+
) });
|
|
1850
|
+
}
|
|
1851
|
+
function FormLabel({
|
|
1852
|
+
className,
|
|
1853
|
+
...props
|
|
1854
|
+
}) {
|
|
1855
|
+
const { error, formItemId } = useFormField();
|
|
1856
|
+
return /* @__PURE__ */ jsx(
|
|
1857
|
+
Label3,
|
|
1858
|
+
{
|
|
1859
|
+
"data-slot": "form-label",
|
|
1860
|
+
"data-error": !!error,
|
|
1861
|
+
className: cn("data-[error=true]:text-destructive", className),
|
|
1862
|
+
htmlFor: formItemId,
|
|
1863
|
+
...props
|
|
1864
|
+
}
|
|
1865
|
+
);
|
|
1866
|
+
}
|
|
1867
|
+
function FormControl({ ...props }) {
|
|
1868
|
+
const { error, formItemId, formDescriptionId, formMessageId } = useFormField();
|
|
1869
|
+
return /* @__PURE__ */ jsx(
|
|
1870
|
+
Slot,
|
|
1871
|
+
{
|
|
1872
|
+
"data-slot": "form-control",
|
|
1873
|
+
id: formItemId,
|
|
1874
|
+
"aria-describedby": !error ? `${formDescriptionId}` : `${formDescriptionId} ${formMessageId}`,
|
|
1875
|
+
"aria-invalid": !!error,
|
|
1876
|
+
...props
|
|
1877
|
+
}
|
|
1878
|
+
);
|
|
1879
|
+
}
|
|
1880
|
+
function FormDescription({ className, ...props }) {
|
|
1881
|
+
const { formDescriptionId } = useFormField();
|
|
1882
|
+
return /* @__PURE__ */ jsx(
|
|
1883
|
+
"p",
|
|
1884
|
+
{
|
|
1885
|
+
"data-slot": "form-description",
|
|
1886
|
+
id: formDescriptionId,
|
|
1887
|
+
className: cn("text-muted-foreground text-sm", className),
|
|
1888
|
+
...props
|
|
1889
|
+
}
|
|
1890
|
+
);
|
|
1891
|
+
}
|
|
1892
|
+
function FormMessage({ className, ...props }) {
|
|
1893
|
+
const { error, formMessageId } = useFormField();
|
|
1894
|
+
const body = error ? String(error?.message ?? "") : props.children;
|
|
1895
|
+
if (!body) {
|
|
1896
|
+
return null;
|
|
1897
|
+
}
|
|
1898
|
+
return /* @__PURE__ */ jsx(
|
|
1899
|
+
"p",
|
|
1900
|
+
{
|
|
1901
|
+
"data-slot": "form-message",
|
|
1902
|
+
id: formMessageId,
|
|
1903
|
+
className: cn("text-destructive text-sm", className),
|
|
1904
|
+
...props,
|
|
1905
|
+
children: body
|
|
1906
|
+
}
|
|
1907
|
+
);
|
|
1908
|
+
}
|
|
1909
|
+
function HoverCard({
|
|
1910
|
+
...props
|
|
1911
|
+
}) {
|
|
1912
|
+
return /* @__PURE__ */ jsx(HoverCardPrimitive.Root, { "data-slot": "hover-card", ...props });
|
|
1913
|
+
}
|
|
1914
|
+
function HoverCardTrigger({
|
|
1915
|
+
...props
|
|
1916
|
+
}) {
|
|
1917
|
+
return /* @__PURE__ */ jsx(HoverCardPrimitive.Trigger, { "data-slot": "hover-card-trigger", ...props });
|
|
1918
|
+
}
|
|
1919
|
+
function HoverCardContent({
|
|
1920
|
+
className,
|
|
1921
|
+
align = "center",
|
|
1922
|
+
sideOffset = 4,
|
|
1923
|
+
...props
|
|
1924
|
+
}) {
|
|
1925
|
+
return /* @__PURE__ */ jsx(HoverCardPrimitive.Portal, { "data-slot": "hover-card-portal", children: /* @__PURE__ */ jsx(
|
|
1926
|
+
HoverCardPrimitive.Content,
|
|
1927
|
+
{
|
|
1928
|
+
"data-slot": "hover-card-content",
|
|
1929
|
+
align,
|
|
1930
|
+
sideOffset,
|
|
1931
|
+
className: cn(
|
|
1932
|
+
"bg-popover text-popover-foreground 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 z-50 w-64 origin-(--radix-hover-card-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden",
|
|
1933
|
+
className
|
|
1934
|
+
),
|
|
1935
|
+
...props
|
|
1936
|
+
}
|
|
1937
|
+
) });
|
|
1938
|
+
}
|
|
1939
|
+
function Input({ className, type, ...props }) {
|
|
1940
|
+
return /* @__PURE__ */ jsx(
|
|
1941
|
+
"input",
|
|
1942
|
+
{
|
|
1943
|
+
type,
|
|
1944
|
+
"data-slot": "input",
|
|
1945
|
+
className: cn(
|
|
1946
|
+
"file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input flex h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",
|
|
1947
|
+
"focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]",
|
|
1948
|
+
"aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",
|
|
1949
|
+
className
|
|
1950
|
+
),
|
|
1951
|
+
...props
|
|
1952
|
+
}
|
|
1953
|
+
);
|
|
1954
|
+
}
|
|
1955
|
+
function InputOTP({
|
|
1956
|
+
className,
|
|
1957
|
+
containerClassName,
|
|
1958
|
+
...props
|
|
1959
|
+
}) {
|
|
1960
|
+
return /* @__PURE__ */ jsx(
|
|
1961
|
+
OTPInput,
|
|
1962
|
+
{
|
|
1963
|
+
"data-slot": "input-otp",
|
|
1964
|
+
containerClassName: cn(
|
|
1965
|
+
"flex items-center gap-2 has-disabled:opacity-50",
|
|
1966
|
+
containerClassName
|
|
1967
|
+
),
|
|
1968
|
+
className: cn("disabled:cursor-not-allowed", className),
|
|
1969
|
+
...props
|
|
1970
|
+
}
|
|
1971
|
+
);
|
|
1972
|
+
}
|
|
1973
|
+
function InputOTPGroup({ className, ...props }) {
|
|
1974
|
+
return /* @__PURE__ */ jsx(
|
|
1975
|
+
"div",
|
|
1976
|
+
{
|
|
1977
|
+
"data-slot": "input-otp-group",
|
|
1978
|
+
className: cn("flex items-center", className),
|
|
1979
|
+
...props
|
|
1980
|
+
}
|
|
1981
|
+
);
|
|
1982
|
+
}
|
|
1983
|
+
function InputOTPSlot({
|
|
1984
|
+
index,
|
|
1985
|
+
className,
|
|
1986
|
+
...props
|
|
1987
|
+
}) {
|
|
1988
|
+
const inputOTPContext = React2.useContext(OTPInputContext);
|
|
1989
|
+
const { char, hasFakeCaret, isActive } = inputOTPContext?.slots[index] ?? {};
|
|
1990
|
+
return /* @__PURE__ */ jsxs(
|
|
1991
|
+
"div",
|
|
1992
|
+
{
|
|
1993
|
+
"data-slot": "input-otp-slot",
|
|
1994
|
+
"data-active": isActive,
|
|
1995
|
+
className: cn(
|
|
1996
|
+
"data-[active=true]:border-ring data-[active=true]:ring-ring/50 data-[active=true]:aria-invalid:ring-destructive/20 dark:data-[active=true]:aria-invalid:ring-destructive/40 aria-invalid:border-destructive data-[active=true]:aria-invalid:border-destructive dark:bg-input/30 border-input relative flex h-9 w-9 items-center justify-center border-y border-r text-sm shadow-xs transition-all outline-none first:rounded-l-md first:border-l last:rounded-r-md data-[active=true]:z-10 data-[active=true]:ring-[3px]",
|
|
1997
|
+
className
|
|
1998
|
+
),
|
|
1999
|
+
...props,
|
|
2000
|
+
children: [
|
|
2001
|
+
char,
|
|
2002
|
+
hasFakeCaret && /* @__PURE__ */ jsx("div", { className: "pointer-events-none absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ jsx("div", { className: "animate-caret-blink bg-foreground h-4 w-px duration-1000" }) })
|
|
2003
|
+
]
|
|
2004
|
+
}
|
|
2005
|
+
);
|
|
2006
|
+
}
|
|
2007
|
+
function InputOTPSeparator({ ...props }) {
|
|
2008
|
+
return /* @__PURE__ */ jsx("div", { "data-slot": "input-otp-separator", role: "separator", ...props, children: /* @__PURE__ */ jsx(MinusIcon, {}) });
|
|
2009
|
+
}
|
|
2010
|
+
function Menubar({
|
|
2011
|
+
className,
|
|
2012
|
+
...props
|
|
2013
|
+
}) {
|
|
2014
|
+
return /* @__PURE__ */ jsx(
|
|
2015
|
+
MenubarPrimitive.Root,
|
|
2016
|
+
{
|
|
2017
|
+
"data-slot": "menubar",
|
|
2018
|
+
className: cn(
|
|
2019
|
+
"bg-background flex h-9 items-center gap-1 rounded-md border p-1 shadow-xs",
|
|
2020
|
+
className
|
|
2021
|
+
),
|
|
2022
|
+
...props
|
|
2023
|
+
}
|
|
2024
|
+
);
|
|
2025
|
+
}
|
|
2026
|
+
function MenubarMenu({
|
|
2027
|
+
...props
|
|
2028
|
+
}) {
|
|
2029
|
+
return /* @__PURE__ */ jsx(MenubarPrimitive.Menu, { "data-slot": "menubar-menu", ...props });
|
|
2030
|
+
}
|
|
2031
|
+
function MenubarGroup({
|
|
2032
|
+
...props
|
|
2033
|
+
}) {
|
|
2034
|
+
return /* @__PURE__ */ jsx(MenubarPrimitive.Group, { "data-slot": "menubar-group", ...props });
|
|
2035
|
+
}
|
|
2036
|
+
function MenubarPortal({
|
|
2037
|
+
...props
|
|
2038
|
+
}) {
|
|
2039
|
+
return /* @__PURE__ */ jsx(MenubarPrimitive.Portal, { "data-slot": "menubar-portal", ...props });
|
|
2040
|
+
}
|
|
2041
|
+
function MenubarRadioGroup({
|
|
2042
|
+
...props
|
|
2043
|
+
}) {
|
|
2044
|
+
return /* @__PURE__ */ jsx(MenubarPrimitive.RadioGroup, { "data-slot": "menubar-radio-group", ...props });
|
|
2045
|
+
}
|
|
2046
|
+
function MenubarTrigger({
|
|
2047
|
+
className,
|
|
2048
|
+
...props
|
|
2049
|
+
}) {
|
|
2050
|
+
return /* @__PURE__ */ jsx(
|
|
2051
|
+
MenubarPrimitive.Trigger,
|
|
2052
|
+
{
|
|
2053
|
+
"data-slot": "menubar-trigger",
|
|
2054
|
+
className: cn(
|
|
2055
|
+
"focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground flex items-center rounded-sm px-2 py-1 text-sm font-medium outline-hidden select-none",
|
|
2056
|
+
className
|
|
2057
|
+
),
|
|
2058
|
+
...props
|
|
2059
|
+
}
|
|
2060
|
+
);
|
|
2061
|
+
}
|
|
2062
|
+
function MenubarContent({
|
|
2063
|
+
className,
|
|
2064
|
+
align = "start",
|
|
2065
|
+
alignOffset = -4,
|
|
2066
|
+
sideOffset = 8,
|
|
2067
|
+
...props
|
|
2068
|
+
}) {
|
|
2069
|
+
return /* @__PURE__ */ jsx(MenubarPortal, { children: /* @__PURE__ */ jsx(
|
|
2070
|
+
MenubarPrimitive.Content,
|
|
2071
|
+
{
|
|
2072
|
+
"data-slot": "menubar-content",
|
|
2073
|
+
align,
|
|
2074
|
+
alignOffset,
|
|
2075
|
+
sideOffset,
|
|
2076
|
+
className: cn(
|
|
2077
|
+
"bg-popover text-popover-foreground data-[state=open]:animate-in 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 z-50 min-w-[12rem] origin-(--radix-menubar-content-transform-origin) overflow-hidden rounded-md border p-1 shadow-md",
|
|
2078
|
+
className
|
|
2079
|
+
),
|
|
2080
|
+
...props
|
|
2081
|
+
}
|
|
2082
|
+
) });
|
|
2083
|
+
}
|
|
2084
|
+
function MenubarItem({
|
|
2085
|
+
className,
|
|
2086
|
+
inset,
|
|
2087
|
+
variant = "default",
|
|
2088
|
+
...props
|
|
2089
|
+
}) {
|
|
2090
|
+
return /* @__PURE__ */ jsx(
|
|
2091
|
+
MenubarPrimitive.Item,
|
|
2092
|
+
{
|
|
2093
|
+
"data-slot": "menubar-item",
|
|
2094
|
+
"data-inset": inset,
|
|
2095
|
+
"data-variant": variant,
|
|
2096
|
+
className: cn(
|
|
2097
|
+
"focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
2098
|
+
className
|
|
2099
|
+
),
|
|
2100
|
+
...props
|
|
2101
|
+
}
|
|
2102
|
+
);
|
|
2103
|
+
}
|
|
2104
|
+
function MenubarCheckboxItem({
|
|
2105
|
+
className,
|
|
2106
|
+
children,
|
|
2107
|
+
checked,
|
|
2108
|
+
...props
|
|
2109
|
+
}) {
|
|
2110
|
+
return /* @__PURE__ */ jsxs(
|
|
2111
|
+
MenubarPrimitive.CheckboxItem,
|
|
2112
|
+
{
|
|
2113
|
+
"data-slot": "menubar-checkbox-item",
|
|
2114
|
+
className: cn(
|
|
2115
|
+
"focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-xs py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
2116
|
+
className
|
|
2117
|
+
),
|
|
2118
|
+
checked,
|
|
2119
|
+
...props,
|
|
2120
|
+
children: [
|
|
2121
|
+
/* @__PURE__ */ jsx("span", { className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ jsx(MenubarPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx(CheckIcon, { className: "size-4" }) }) }),
|
|
2122
|
+
children
|
|
2123
|
+
]
|
|
2124
|
+
}
|
|
2125
|
+
);
|
|
2126
|
+
}
|
|
2127
|
+
function MenubarRadioItem({
|
|
2128
|
+
className,
|
|
2129
|
+
children,
|
|
2130
|
+
...props
|
|
2131
|
+
}) {
|
|
2132
|
+
return /* @__PURE__ */ jsxs(
|
|
2133
|
+
MenubarPrimitive.RadioItem,
|
|
2134
|
+
{
|
|
2135
|
+
"data-slot": "menubar-radio-item",
|
|
2136
|
+
className: cn(
|
|
2137
|
+
"focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-xs py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
2138
|
+
className
|
|
2139
|
+
),
|
|
2140
|
+
...props,
|
|
2141
|
+
children: [
|
|
2142
|
+
/* @__PURE__ */ jsx("span", { className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ jsx(MenubarPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx(CircleIcon, { className: "size-2 fill-current" }) }) }),
|
|
2143
|
+
children
|
|
2144
|
+
]
|
|
2145
|
+
}
|
|
2146
|
+
);
|
|
2147
|
+
}
|
|
2148
|
+
function MenubarLabel({
|
|
2149
|
+
className,
|
|
2150
|
+
inset,
|
|
2151
|
+
...props
|
|
2152
|
+
}) {
|
|
2153
|
+
return /* @__PURE__ */ jsx(
|
|
2154
|
+
MenubarPrimitive.Label,
|
|
2155
|
+
{
|
|
2156
|
+
"data-slot": "menubar-label",
|
|
2157
|
+
"data-inset": inset,
|
|
2158
|
+
className: cn(
|
|
2159
|
+
"px-2 py-1.5 text-sm font-medium data-[inset]:pl-8",
|
|
2160
|
+
className
|
|
2161
|
+
),
|
|
2162
|
+
...props
|
|
2163
|
+
}
|
|
2164
|
+
);
|
|
2165
|
+
}
|
|
2166
|
+
function MenubarSeparator({
|
|
2167
|
+
className,
|
|
2168
|
+
...props
|
|
2169
|
+
}) {
|
|
2170
|
+
return /* @__PURE__ */ jsx(
|
|
2171
|
+
MenubarPrimitive.Separator,
|
|
2172
|
+
{
|
|
2173
|
+
"data-slot": "menubar-separator",
|
|
2174
|
+
className: cn("bg-border -mx-1 my-1 h-px", className),
|
|
2175
|
+
...props
|
|
2176
|
+
}
|
|
2177
|
+
);
|
|
2178
|
+
}
|
|
2179
|
+
function MenubarShortcut({
|
|
2180
|
+
className,
|
|
2181
|
+
...props
|
|
2182
|
+
}) {
|
|
2183
|
+
return /* @__PURE__ */ jsx(
|
|
2184
|
+
"span",
|
|
2185
|
+
{
|
|
2186
|
+
"data-slot": "menubar-shortcut",
|
|
2187
|
+
className: cn(
|
|
2188
|
+
"text-muted-foreground ml-auto text-xs tracking-widest",
|
|
2189
|
+
className
|
|
2190
|
+
),
|
|
2191
|
+
...props
|
|
2192
|
+
}
|
|
2193
|
+
);
|
|
2194
|
+
}
|
|
2195
|
+
function MenubarSub({
|
|
2196
|
+
...props
|
|
2197
|
+
}) {
|
|
2198
|
+
return /* @__PURE__ */ jsx(MenubarPrimitive.Sub, { "data-slot": "menubar-sub", ...props });
|
|
2199
|
+
}
|
|
2200
|
+
function MenubarSubTrigger({
|
|
2201
|
+
className,
|
|
2202
|
+
inset,
|
|
2203
|
+
children,
|
|
2204
|
+
...props
|
|
2205
|
+
}) {
|
|
2206
|
+
return /* @__PURE__ */ jsxs(
|
|
2207
|
+
MenubarPrimitive.SubTrigger,
|
|
2208
|
+
{
|
|
2209
|
+
"data-slot": "menubar-sub-trigger",
|
|
2210
|
+
"data-inset": inset,
|
|
2211
|
+
className: cn(
|
|
2212
|
+
"focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground flex cursor-default items-center rounded-sm px-2 py-1.5 text-sm outline-none select-none data-[inset]:pl-8",
|
|
2213
|
+
className
|
|
2214
|
+
),
|
|
2215
|
+
...props,
|
|
2216
|
+
children: [
|
|
2217
|
+
children,
|
|
2218
|
+
/* @__PURE__ */ jsx(ChevronRightIcon, { className: "ml-auto h-4 w-4" })
|
|
2219
|
+
]
|
|
2220
|
+
}
|
|
2221
|
+
);
|
|
2222
|
+
}
|
|
2223
|
+
function MenubarSubContent({
|
|
2224
|
+
className,
|
|
2225
|
+
...props
|
|
2226
|
+
}) {
|
|
2227
|
+
return /* @__PURE__ */ jsx(
|
|
2228
|
+
MenubarPrimitive.SubContent,
|
|
2229
|
+
{
|
|
2230
|
+
"data-slot": "menubar-sub-content",
|
|
2231
|
+
className: cn(
|
|
2232
|
+
"bg-popover text-popover-foreground 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 z-50 min-w-[8rem] origin-(--radix-menubar-content-transform-origin) overflow-hidden rounded-md border p-1 shadow-lg",
|
|
2233
|
+
className
|
|
2234
|
+
),
|
|
2235
|
+
...props
|
|
2236
|
+
}
|
|
2237
|
+
);
|
|
2238
|
+
}
|
|
2239
|
+
function NavigationMenu({
|
|
2240
|
+
className,
|
|
2241
|
+
children,
|
|
2242
|
+
viewport = true,
|
|
2243
|
+
...props
|
|
2244
|
+
}) {
|
|
2245
|
+
return /* @__PURE__ */ jsxs(
|
|
2246
|
+
NavigationMenuPrimitive.Root,
|
|
2247
|
+
{
|
|
2248
|
+
"data-slot": "navigation-menu",
|
|
2249
|
+
"data-viewport": viewport,
|
|
2250
|
+
className: cn(
|
|
2251
|
+
"group/navigation-menu relative flex max-w-max flex-1 items-center justify-center",
|
|
2252
|
+
className
|
|
2253
|
+
),
|
|
2254
|
+
...props,
|
|
2255
|
+
children: [
|
|
2256
|
+
children,
|
|
2257
|
+
viewport && /* @__PURE__ */ jsx(NavigationMenuViewport, {})
|
|
2258
|
+
]
|
|
2259
|
+
}
|
|
2260
|
+
);
|
|
2261
|
+
}
|
|
2262
|
+
function NavigationMenuList({
|
|
2263
|
+
className,
|
|
2264
|
+
...props
|
|
2265
|
+
}) {
|
|
2266
|
+
return /* @__PURE__ */ jsx(
|
|
2267
|
+
NavigationMenuPrimitive.List,
|
|
2268
|
+
{
|
|
2269
|
+
"data-slot": "navigation-menu-list",
|
|
2270
|
+
className: cn(
|
|
2271
|
+
"group flex flex-1 list-none items-center justify-center gap-1",
|
|
2272
|
+
className
|
|
2273
|
+
),
|
|
2274
|
+
...props
|
|
2275
|
+
}
|
|
2276
|
+
);
|
|
2277
|
+
}
|
|
2278
|
+
function NavigationMenuItem({
|
|
2279
|
+
className,
|
|
2280
|
+
...props
|
|
2281
|
+
}) {
|
|
2282
|
+
return /* @__PURE__ */ jsx(
|
|
2283
|
+
NavigationMenuPrimitive.Item,
|
|
2284
|
+
{
|
|
2285
|
+
"data-slot": "navigation-menu-item",
|
|
2286
|
+
className: cn("relative", className),
|
|
2287
|
+
...props
|
|
2288
|
+
}
|
|
2289
|
+
);
|
|
2290
|
+
}
|
|
2291
|
+
var navigationMenuTriggerStyle = cva(
|
|
2292
|
+
"group inline-flex h-9 w-max items-center justify-center rounded-md bg-background px-4 py-2 text-sm font-medium hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground disabled:pointer-events-none disabled:opacity-50 data-[state=open]:hover:bg-accent data-[state=open]:text-accent-foreground data-[state=open]:focus:bg-accent data-[state=open]:bg-accent/50 focus-visible:ring-ring/50 outline-none transition-[color,box-shadow] focus-visible:ring-[3px] focus-visible:outline-1"
|
|
2293
|
+
);
|
|
2294
|
+
function NavigationMenuTrigger({
|
|
2295
|
+
className,
|
|
2296
|
+
children,
|
|
2297
|
+
...props
|
|
2298
|
+
}) {
|
|
2299
|
+
return /* @__PURE__ */ jsxs(
|
|
2300
|
+
NavigationMenuPrimitive.Trigger,
|
|
2301
|
+
{
|
|
2302
|
+
"data-slot": "navigation-menu-trigger",
|
|
2303
|
+
className: cn(navigationMenuTriggerStyle(), "group", className),
|
|
2304
|
+
...props,
|
|
2305
|
+
children: [
|
|
2306
|
+
children,
|
|
2307
|
+
" ",
|
|
2308
|
+
/* @__PURE__ */ jsx(
|
|
2309
|
+
ChevronDownIcon,
|
|
2310
|
+
{
|
|
2311
|
+
className: "relative top-[1px] ml-1 size-3 transition duration-300 group-data-[state=open]:rotate-180",
|
|
2312
|
+
"aria-hidden": "true"
|
|
2313
|
+
}
|
|
2314
|
+
)
|
|
2315
|
+
]
|
|
2316
|
+
}
|
|
2317
|
+
);
|
|
2318
|
+
}
|
|
2319
|
+
function NavigationMenuContent({
|
|
2320
|
+
className,
|
|
2321
|
+
...props
|
|
2322
|
+
}) {
|
|
2323
|
+
return /* @__PURE__ */ jsx(
|
|
2324
|
+
NavigationMenuPrimitive.Content,
|
|
2325
|
+
{
|
|
2326
|
+
"data-slot": "navigation-menu-content",
|
|
2327
|
+
className: cn(
|
|
2328
|
+
"data-[motion^=from-]:animate-in data-[motion^=to-]:animate-out data-[motion^=from-]:fade-in data-[motion^=to-]:fade-out data-[motion=from-end]:slide-in-from-right-52 data-[motion=from-start]:slide-in-from-left-52 data-[motion=to-end]:slide-out-to-right-52 data-[motion=to-start]:slide-out-to-left-52 top-0 left-0 w-full p-2 pr-2.5 md:absolute md:w-auto",
|
|
2329
|
+
"group-data-[viewport=false]/navigation-menu:bg-popover group-data-[viewport=false]/navigation-menu:text-popover-foreground group-data-[viewport=false]/navigation-menu:data-[state=open]:animate-in group-data-[viewport=false]/navigation-menu:data-[state=closed]:animate-out group-data-[viewport=false]/navigation-menu:data-[state=closed]:zoom-out-95 group-data-[viewport=false]/navigation-menu:data-[state=open]:zoom-in-95 group-data-[viewport=false]/navigation-menu:data-[state=open]:fade-in-0 group-data-[viewport=false]/navigation-menu:data-[state=closed]:fade-out-0 group-data-[viewport=false]/navigation-menu:top-full group-data-[viewport=false]/navigation-menu:mt-1.5 group-data-[viewport=false]/navigation-menu:overflow-hidden group-data-[viewport=false]/navigation-menu:rounded-md group-data-[viewport=false]/navigation-menu:border group-data-[viewport=false]/navigation-menu:shadow group-data-[viewport=false]/navigation-menu:duration-200 **:data-[slot=navigation-menu-link]:focus:ring-0 **:data-[slot=navigation-menu-link]:focus:outline-none",
|
|
2330
|
+
className
|
|
2331
|
+
),
|
|
2332
|
+
...props
|
|
2333
|
+
}
|
|
2334
|
+
);
|
|
2335
|
+
}
|
|
2336
|
+
function NavigationMenuViewport({
|
|
2337
|
+
className,
|
|
2338
|
+
...props
|
|
2339
|
+
}) {
|
|
2340
|
+
return /* @__PURE__ */ jsx(
|
|
2341
|
+
"div",
|
|
2342
|
+
{
|
|
2343
|
+
className: cn(
|
|
2344
|
+
"absolute top-full left-0 isolate z-50 flex justify-center"
|
|
2345
|
+
),
|
|
2346
|
+
children: /* @__PURE__ */ jsx(
|
|
2347
|
+
NavigationMenuPrimitive.Viewport,
|
|
2348
|
+
{
|
|
2349
|
+
"data-slot": "navigation-menu-viewport",
|
|
2350
|
+
className: cn(
|
|
2351
|
+
"origin-top-center bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-90 relative mt-1.5 h-[var(--radix-navigation-menu-viewport-height)] w-full overflow-hidden rounded-md border shadow md:w-[var(--radix-navigation-menu-viewport-width)]",
|
|
2352
|
+
className
|
|
2353
|
+
),
|
|
2354
|
+
...props
|
|
2355
|
+
}
|
|
2356
|
+
)
|
|
2357
|
+
}
|
|
2358
|
+
);
|
|
2359
|
+
}
|
|
2360
|
+
function NavigationMenuLink({
|
|
2361
|
+
className,
|
|
2362
|
+
...props
|
|
2363
|
+
}) {
|
|
2364
|
+
return /* @__PURE__ */ jsx(
|
|
2365
|
+
NavigationMenuPrimitive.Link,
|
|
2366
|
+
{
|
|
2367
|
+
"data-slot": "navigation-menu-link",
|
|
2368
|
+
className: cn(
|
|
2369
|
+
"data-[active=true]:focus:bg-accent data-[active=true]:hover:bg-accent data-[active=true]:bg-accent/50 data-[active=true]:text-accent-foreground hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground focus-visible:ring-ring/50 [&_svg:not([class*='text-'])]:text-muted-foreground flex flex-col gap-1 rounded-sm p-2 text-sm transition-all outline-none focus-visible:ring-[3px] focus-visible:outline-1 [&_svg:not([class*='size-'])]:size-4",
|
|
2370
|
+
className
|
|
2371
|
+
),
|
|
2372
|
+
...props
|
|
2373
|
+
}
|
|
2374
|
+
);
|
|
2375
|
+
}
|
|
2376
|
+
function NavigationMenuIndicator({
|
|
2377
|
+
className,
|
|
2378
|
+
...props
|
|
2379
|
+
}) {
|
|
2380
|
+
return /* @__PURE__ */ jsx(
|
|
2381
|
+
NavigationMenuPrimitive.Indicator,
|
|
2382
|
+
{
|
|
2383
|
+
"data-slot": "navigation-menu-indicator",
|
|
2384
|
+
className: cn(
|
|
2385
|
+
"data-[state=visible]:animate-in data-[state=hidden]:animate-out data-[state=hidden]:fade-out data-[state=visible]:fade-in top-full z-[1] flex h-1.5 items-end justify-center overflow-hidden",
|
|
2386
|
+
className
|
|
2387
|
+
),
|
|
2388
|
+
...props,
|
|
2389
|
+
children: /* @__PURE__ */ jsx("div", { className: "bg-border relative top-[60%] h-2 w-2 rotate-45 rounded-tl-sm shadow-md" })
|
|
2390
|
+
}
|
|
2391
|
+
);
|
|
2392
|
+
}
|
|
2393
|
+
function Pagination({ className, ...props }) {
|
|
2394
|
+
return /* @__PURE__ */ jsx(
|
|
2395
|
+
"nav",
|
|
2396
|
+
{
|
|
2397
|
+
role: "navigation",
|
|
2398
|
+
"aria-label": "pagination",
|
|
2399
|
+
"data-slot": "pagination",
|
|
2400
|
+
className: cn("mx-auto flex w-full justify-center", className),
|
|
2401
|
+
...props
|
|
2402
|
+
}
|
|
2403
|
+
);
|
|
2404
|
+
}
|
|
2405
|
+
function PaginationContent({
|
|
2406
|
+
className,
|
|
2407
|
+
...props
|
|
2408
|
+
}) {
|
|
2409
|
+
return /* @__PURE__ */ jsx(
|
|
2410
|
+
"ul",
|
|
2411
|
+
{
|
|
2412
|
+
"data-slot": "pagination-content",
|
|
2413
|
+
className: cn("flex flex-row items-center gap-1", className),
|
|
2414
|
+
...props
|
|
2415
|
+
}
|
|
2416
|
+
);
|
|
2417
|
+
}
|
|
2418
|
+
function PaginationItem({ ...props }) {
|
|
2419
|
+
return /* @__PURE__ */ jsx("li", { "data-slot": "pagination-item", ...props });
|
|
2420
|
+
}
|
|
2421
|
+
function PaginationLink({
|
|
2422
|
+
className,
|
|
2423
|
+
isActive,
|
|
2424
|
+
size = "icon",
|
|
2425
|
+
...props
|
|
2426
|
+
}) {
|
|
2427
|
+
return /* @__PURE__ */ jsx(
|
|
2428
|
+
"a",
|
|
2429
|
+
{
|
|
2430
|
+
"aria-current": isActive ? "page" : void 0,
|
|
2431
|
+
"data-slot": "pagination-link",
|
|
2432
|
+
"data-active": isActive,
|
|
2433
|
+
className: cn(
|
|
2434
|
+
buttonVariants({
|
|
2435
|
+
variant: isActive ? "outline" : "ghost",
|
|
2436
|
+
size
|
|
2437
|
+
}),
|
|
2438
|
+
className
|
|
2439
|
+
),
|
|
2440
|
+
...props
|
|
2441
|
+
}
|
|
2442
|
+
);
|
|
2443
|
+
}
|
|
2444
|
+
function PaginationPrevious({
|
|
2445
|
+
className,
|
|
2446
|
+
...props
|
|
2447
|
+
}) {
|
|
2448
|
+
return /* @__PURE__ */ jsxs(
|
|
2449
|
+
PaginationLink,
|
|
2450
|
+
{
|
|
2451
|
+
"aria-label": "Go to previous page",
|
|
2452
|
+
size: "default",
|
|
2453
|
+
className: cn("gap-1 px-2.5 sm:pl-2.5", className),
|
|
2454
|
+
...props,
|
|
2455
|
+
children: [
|
|
2456
|
+
/* @__PURE__ */ jsx(ChevronLeftIcon, {}),
|
|
2457
|
+
/* @__PURE__ */ jsx("span", { className: "hidden sm:block", children: "Previous" })
|
|
2458
|
+
]
|
|
2459
|
+
}
|
|
2460
|
+
);
|
|
2461
|
+
}
|
|
2462
|
+
function PaginationNext({
|
|
2463
|
+
className,
|
|
2464
|
+
...props
|
|
2465
|
+
}) {
|
|
2466
|
+
return /* @__PURE__ */ jsxs(
|
|
2467
|
+
PaginationLink,
|
|
2468
|
+
{
|
|
2469
|
+
"aria-label": "Go to next page",
|
|
2470
|
+
size: "default",
|
|
2471
|
+
className: cn("gap-1 px-2.5 sm:pr-2.5", className),
|
|
2472
|
+
...props,
|
|
2473
|
+
children: [
|
|
2474
|
+
/* @__PURE__ */ jsx("span", { className: "hidden sm:block", children: "Next" }),
|
|
2475
|
+
/* @__PURE__ */ jsx(ChevronRightIcon, {})
|
|
2476
|
+
]
|
|
2477
|
+
}
|
|
2478
|
+
);
|
|
2479
|
+
}
|
|
2480
|
+
function PaginationEllipsis({
|
|
2481
|
+
className,
|
|
2482
|
+
...props
|
|
2483
|
+
}) {
|
|
2484
|
+
return /* @__PURE__ */ jsxs(
|
|
2485
|
+
"span",
|
|
2486
|
+
{
|
|
2487
|
+
"aria-hidden": true,
|
|
2488
|
+
"data-slot": "pagination-ellipsis",
|
|
2489
|
+
className: cn("flex size-9 items-center justify-center", className),
|
|
2490
|
+
...props,
|
|
2491
|
+
children: [
|
|
2492
|
+
/* @__PURE__ */ jsx(MoreHorizontalIcon, { className: "size-4" }),
|
|
2493
|
+
/* @__PURE__ */ jsx("span", { className: "sr-only", children: "More pages" })
|
|
2494
|
+
]
|
|
2495
|
+
}
|
|
2496
|
+
);
|
|
2497
|
+
}
|
|
2498
|
+
function Popover({
|
|
2499
|
+
...props
|
|
2500
|
+
}) {
|
|
2501
|
+
return /* @__PURE__ */ jsx(PopoverPrimitive.Root, { "data-slot": "popover", ...props });
|
|
2502
|
+
}
|
|
2503
|
+
function PopoverTrigger({
|
|
2504
|
+
...props
|
|
2505
|
+
}) {
|
|
2506
|
+
return /* @__PURE__ */ jsx(PopoverPrimitive.Trigger, { "data-slot": "popover-trigger", ...props });
|
|
2507
|
+
}
|
|
2508
|
+
function PopoverContent({
|
|
2509
|
+
className,
|
|
2510
|
+
align = "center",
|
|
2511
|
+
sideOffset = 4,
|
|
2512
|
+
...props
|
|
2513
|
+
}) {
|
|
2514
|
+
return /* @__PURE__ */ jsx(PopoverPrimitive.Portal, { children: /* @__PURE__ */ jsx(
|
|
2515
|
+
PopoverPrimitive.Content,
|
|
2516
|
+
{
|
|
2517
|
+
"data-slot": "popover-content",
|
|
2518
|
+
align,
|
|
2519
|
+
sideOffset,
|
|
2520
|
+
className: cn(
|
|
2521
|
+
"bg-popover text-popover-foreground 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 z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden",
|
|
2522
|
+
className
|
|
2523
|
+
),
|
|
2524
|
+
...props
|
|
2525
|
+
}
|
|
2526
|
+
) });
|
|
2527
|
+
}
|
|
2528
|
+
function PopoverAnchor({
|
|
2529
|
+
...props
|
|
2530
|
+
}) {
|
|
2531
|
+
return /* @__PURE__ */ jsx(PopoverPrimitive.Anchor, { "data-slot": "popover-anchor", ...props });
|
|
2532
|
+
}
|
|
2533
|
+
function Progress({
|
|
2534
|
+
className,
|
|
2535
|
+
value,
|
|
2536
|
+
...props
|
|
2537
|
+
}) {
|
|
2538
|
+
return /* @__PURE__ */ jsx(
|
|
2539
|
+
ProgressPrimitive.Root,
|
|
2540
|
+
{
|
|
2541
|
+
"data-slot": "progress",
|
|
2542
|
+
className: cn(
|
|
2543
|
+
"bg-primary/20 relative h-2 w-full overflow-hidden rounded-full",
|
|
2544
|
+
className
|
|
2545
|
+
),
|
|
2546
|
+
...props,
|
|
2547
|
+
children: /* @__PURE__ */ jsx(
|
|
2548
|
+
ProgressPrimitive.Indicator,
|
|
2549
|
+
{
|
|
2550
|
+
"data-slot": "progress-indicator",
|
|
2551
|
+
className: "bg-primary h-full w-full flex-1 transition-all",
|
|
2552
|
+
style: { transform: `translateX(-${100 - (value || 0)}%)` }
|
|
2553
|
+
}
|
|
2554
|
+
)
|
|
2555
|
+
}
|
|
2556
|
+
);
|
|
2557
|
+
}
|
|
2558
|
+
function RadioGroup4({
|
|
2559
|
+
className,
|
|
2560
|
+
...props
|
|
2561
|
+
}) {
|
|
2562
|
+
return /* @__PURE__ */ jsx(
|
|
2563
|
+
RadioGroupPrimitive.Root,
|
|
2564
|
+
{
|
|
2565
|
+
"data-slot": "radio-group",
|
|
2566
|
+
className: cn("grid gap-3", className),
|
|
2567
|
+
...props
|
|
2568
|
+
}
|
|
2569
|
+
);
|
|
2570
|
+
}
|
|
2571
|
+
function RadioGroupItem({
|
|
2572
|
+
className,
|
|
2573
|
+
...props
|
|
2574
|
+
}) {
|
|
2575
|
+
return /* @__PURE__ */ jsx(
|
|
2576
|
+
RadioGroupPrimitive.Item,
|
|
2577
|
+
{
|
|
2578
|
+
"data-slot": "radio-group-item",
|
|
2579
|
+
className: cn(
|
|
2580
|
+
"border-input text-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 aspect-square size-4 shrink-0 rounded-full border shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",
|
|
2581
|
+
className
|
|
2582
|
+
),
|
|
2583
|
+
...props,
|
|
2584
|
+
children: /* @__PURE__ */ jsx(
|
|
2585
|
+
RadioGroupPrimitive.Indicator,
|
|
2586
|
+
{
|
|
2587
|
+
"data-slot": "radio-group-indicator",
|
|
2588
|
+
className: "relative flex items-center justify-center",
|
|
2589
|
+
children: /* @__PURE__ */ jsx(CircleIcon, { className: "fill-primary absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2" })
|
|
2590
|
+
}
|
|
2591
|
+
)
|
|
2592
|
+
}
|
|
2593
|
+
);
|
|
2594
|
+
}
|
|
2595
|
+
function ResizablePanelGroup({
|
|
2596
|
+
className,
|
|
2597
|
+
...props
|
|
2598
|
+
}) {
|
|
2599
|
+
return /* @__PURE__ */ jsx(
|
|
2600
|
+
ResizablePrimitive.PanelGroup,
|
|
2601
|
+
{
|
|
2602
|
+
"data-slot": "resizable-panel-group",
|
|
2603
|
+
className: cn(
|
|
2604
|
+
"flex h-full w-full data-[panel-group-direction=vertical]:flex-col",
|
|
2605
|
+
className
|
|
2606
|
+
),
|
|
2607
|
+
...props
|
|
2608
|
+
}
|
|
2609
|
+
);
|
|
2610
|
+
}
|
|
2611
|
+
function ResizablePanel({
|
|
2612
|
+
...props
|
|
2613
|
+
}) {
|
|
2614
|
+
return /* @__PURE__ */ jsx(ResizablePrimitive.Panel, { "data-slot": "resizable-panel", ...props });
|
|
2615
|
+
}
|
|
2616
|
+
function ResizableHandle({
|
|
2617
|
+
withHandle,
|
|
2618
|
+
className,
|
|
2619
|
+
...props
|
|
2620
|
+
}) {
|
|
2621
|
+
return /* @__PURE__ */ jsx(
|
|
2622
|
+
ResizablePrimitive.PanelResizeHandle,
|
|
2623
|
+
{
|
|
2624
|
+
"data-slot": "resizable-handle",
|
|
2625
|
+
className: cn(
|
|
2626
|
+
"bg-border focus-visible:ring-ring relative flex w-px items-center justify-center after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:ring-1 focus-visible:ring-offset-1 focus-visible:outline-hidden data-[panel-group-direction=vertical]:h-px data-[panel-group-direction=vertical]:w-full data-[panel-group-direction=vertical]:after:left-0 data-[panel-group-direction=vertical]:after:h-1 data-[panel-group-direction=vertical]:after:w-full data-[panel-group-direction=vertical]:after:translate-x-0 data-[panel-group-direction=vertical]:after:-translate-y-1/2 [&[data-panel-group-direction=vertical]>div]:rotate-90",
|
|
2627
|
+
className
|
|
2628
|
+
),
|
|
2629
|
+
...props,
|
|
2630
|
+
children: withHandle && /* @__PURE__ */ jsx("div", { className: "bg-border z-10 flex h-4 w-3 items-center justify-center rounded-xs border", children: /* @__PURE__ */ jsx(GripVerticalIcon, { className: "size-2.5" }) })
|
|
2631
|
+
}
|
|
2632
|
+
);
|
|
2633
|
+
}
|
|
2634
|
+
function ScrollArea({
|
|
2635
|
+
className,
|
|
2636
|
+
children,
|
|
2637
|
+
...props
|
|
2638
|
+
}) {
|
|
2639
|
+
return /* @__PURE__ */ jsxs(
|
|
2640
|
+
ScrollAreaPrimitive.Root,
|
|
2641
|
+
{
|
|
2642
|
+
"data-slot": "scroll-area",
|
|
2643
|
+
className: cn("relative", className),
|
|
2644
|
+
...props,
|
|
2645
|
+
children: [
|
|
2646
|
+
/* @__PURE__ */ jsx(
|
|
2647
|
+
ScrollAreaPrimitive.Viewport,
|
|
2648
|
+
{
|
|
2649
|
+
"data-slot": "scroll-area-viewport",
|
|
2650
|
+
className: "focus-visible:ring-ring/50 size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:outline-1",
|
|
2651
|
+
children
|
|
2652
|
+
}
|
|
2653
|
+
),
|
|
2654
|
+
/* @__PURE__ */ jsx(ScrollBar, {}),
|
|
2655
|
+
/* @__PURE__ */ jsx(ScrollAreaPrimitive.Corner, {})
|
|
2656
|
+
]
|
|
2657
|
+
}
|
|
2658
|
+
);
|
|
2659
|
+
}
|
|
2660
|
+
function ScrollBar({
|
|
2661
|
+
className,
|
|
2662
|
+
orientation = "vertical",
|
|
2663
|
+
...props
|
|
2664
|
+
}) {
|
|
2665
|
+
return /* @__PURE__ */ jsx(
|
|
2666
|
+
ScrollAreaPrimitive.ScrollAreaScrollbar,
|
|
2667
|
+
{
|
|
2668
|
+
"data-slot": "scroll-area-scrollbar",
|
|
2669
|
+
orientation,
|
|
2670
|
+
className: cn(
|
|
2671
|
+
"flex touch-none p-px transition-colors select-none",
|
|
2672
|
+
orientation === "vertical" && "h-full w-2.5 border-l border-l-transparent",
|
|
2673
|
+
orientation === "horizontal" && "h-2.5 flex-col border-t border-t-transparent",
|
|
2674
|
+
className
|
|
2675
|
+
),
|
|
2676
|
+
...props,
|
|
2677
|
+
children: /* @__PURE__ */ jsx(
|
|
2678
|
+
ScrollAreaPrimitive.ScrollAreaThumb,
|
|
2679
|
+
{
|
|
2680
|
+
"data-slot": "scroll-area-thumb",
|
|
2681
|
+
className: "bg-border relative flex-1 rounded-full"
|
|
2682
|
+
}
|
|
2683
|
+
)
|
|
2684
|
+
}
|
|
2685
|
+
);
|
|
2686
|
+
}
|
|
2687
|
+
function Select({
|
|
2688
|
+
...props
|
|
2689
|
+
}) {
|
|
2690
|
+
return /* @__PURE__ */ jsx(SelectPrimitive.Root, { "data-slot": "select", ...props });
|
|
2691
|
+
}
|
|
2692
|
+
function SelectGroup({
|
|
2693
|
+
...props
|
|
2694
|
+
}) {
|
|
2695
|
+
return /* @__PURE__ */ jsx(SelectPrimitive.Group, { "data-slot": "select-group", ...props });
|
|
2696
|
+
}
|
|
2697
|
+
function SelectValue({
|
|
2698
|
+
...props
|
|
2699
|
+
}) {
|
|
2700
|
+
return /* @__PURE__ */ jsx(SelectPrimitive.Value, { "data-slot": "select-value", ...props });
|
|
2701
|
+
}
|
|
2702
|
+
function SelectTrigger({
|
|
2703
|
+
className,
|
|
2704
|
+
size = "default",
|
|
2705
|
+
children,
|
|
2706
|
+
...props
|
|
2707
|
+
}) {
|
|
2708
|
+
return /* @__PURE__ */ jsxs(
|
|
2709
|
+
SelectPrimitive.Trigger,
|
|
2710
|
+
{
|
|
2711
|
+
"data-slot": "select-trigger",
|
|
2712
|
+
"data-size": size,
|
|
2713
|
+
className: cn(
|
|
2714
|
+
"border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 dark:hover:bg-input/50 flex w-fit items-center justify-between gap-2 rounded-md border bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
2715
|
+
className
|
|
2716
|
+
),
|
|
2717
|
+
...props,
|
|
2718
|
+
children: [
|
|
2719
|
+
children,
|
|
2720
|
+
/* @__PURE__ */ jsx(SelectPrimitive.Icon, { asChild: true, children: /* @__PURE__ */ jsx(ChevronDownIcon, { className: "size-4 opacity-50" }) })
|
|
2721
|
+
]
|
|
2722
|
+
}
|
|
2723
|
+
);
|
|
2724
|
+
}
|
|
2725
|
+
function SelectContent({
|
|
2726
|
+
className,
|
|
2727
|
+
children,
|
|
2728
|
+
position = "popper",
|
|
2729
|
+
...props
|
|
2730
|
+
}) {
|
|
2731
|
+
return /* @__PURE__ */ jsx(SelectPrimitive.Portal, { children: /* @__PURE__ */ jsxs(
|
|
2732
|
+
SelectPrimitive.Content,
|
|
2733
|
+
{
|
|
2734
|
+
"data-slot": "select-content",
|
|
2735
|
+
className: cn(
|
|
2736
|
+
"bg-popover text-popover-foreground 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 relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border shadow-md",
|
|
2737
|
+
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",
|
|
2738
|
+
className
|
|
2739
|
+
),
|
|
2740
|
+
position,
|
|
2741
|
+
...props,
|
|
2742
|
+
children: [
|
|
2743
|
+
/* @__PURE__ */ jsx(SelectScrollUpButton, {}),
|
|
2744
|
+
/* @__PURE__ */ jsx(
|
|
2745
|
+
SelectPrimitive.Viewport,
|
|
2746
|
+
{
|
|
2747
|
+
className: cn(
|
|
2748
|
+
"p-1",
|
|
2749
|
+
position === "popper" && "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"
|
|
2750
|
+
),
|
|
2751
|
+
children
|
|
2752
|
+
}
|
|
2753
|
+
),
|
|
2754
|
+
/* @__PURE__ */ jsx(SelectScrollDownButton, {})
|
|
2755
|
+
]
|
|
2756
|
+
}
|
|
2757
|
+
) });
|
|
2758
|
+
}
|
|
2759
|
+
function SelectLabel({
|
|
2760
|
+
className,
|
|
2761
|
+
...props
|
|
2762
|
+
}) {
|
|
2763
|
+
return /* @__PURE__ */ jsx(
|
|
2764
|
+
SelectPrimitive.Label,
|
|
2765
|
+
{
|
|
2766
|
+
"data-slot": "select-label",
|
|
2767
|
+
className: cn("text-muted-foreground px-2 py-1.5 text-xs", className),
|
|
2768
|
+
...props
|
|
2769
|
+
}
|
|
2770
|
+
);
|
|
2771
|
+
}
|
|
2772
|
+
function SelectItem({
|
|
2773
|
+
className,
|
|
2774
|
+
children,
|
|
2775
|
+
...props
|
|
2776
|
+
}) {
|
|
2777
|
+
return /* @__PURE__ */ jsxs(
|
|
2778
|
+
SelectPrimitive.Item,
|
|
2779
|
+
{
|
|
2780
|
+
"data-slot": "select-item",
|
|
2781
|
+
className: cn(
|
|
2782
|
+
"focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",
|
|
2783
|
+
className
|
|
2784
|
+
),
|
|
2785
|
+
...props,
|
|
2786
|
+
children: [
|
|
2787
|
+
/* @__PURE__ */ jsx("span", { className: "absolute right-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ jsx(SelectPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx(CheckIcon, { className: "size-4" }) }) }),
|
|
2788
|
+
/* @__PURE__ */ jsx(SelectPrimitive.ItemText, { children })
|
|
2789
|
+
]
|
|
2790
|
+
}
|
|
2791
|
+
);
|
|
2792
|
+
}
|
|
2793
|
+
function SelectSeparator({
|
|
2794
|
+
className,
|
|
2795
|
+
...props
|
|
2796
|
+
}) {
|
|
2797
|
+
return /* @__PURE__ */ jsx(
|
|
2798
|
+
SelectPrimitive.Separator,
|
|
2799
|
+
{
|
|
2800
|
+
"data-slot": "select-separator",
|
|
2801
|
+
className: cn("bg-border pointer-events-none -mx-1 my-1 h-px", className),
|
|
2802
|
+
...props
|
|
2803
|
+
}
|
|
2804
|
+
);
|
|
2805
|
+
}
|
|
2806
|
+
function SelectScrollUpButton({
|
|
2807
|
+
className,
|
|
2808
|
+
...props
|
|
2809
|
+
}) {
|
|
2810
|
+
return /* @__PURE__ */ jsx(
|
|
2811
|
+
SelectPrimitive.ScrollUpButton,
|
|
2812
|
+
{
|
|
2813
|
+
"data-slot": "select-scroll-up-button",
|
|
2814
|
+
className: cn(
|
|
2815
|
+
"flex cursor-default items-center justify-center py-1",
|
|
2816
|
+
className
|
|
2817
|
+
),
|
|
2818
|
+
...props,
|
|
2819
|
+
children: /* @__PURE__ */ jsx(ChevronUpIcon, { className: "size-4" })
|
|
2820
|
+
}
|
|
2821
|
+
);
|
|
2822
|
+
}
|
|
2823
|
+
function SelectScrollDownButton({
|
|
2824
|
+
className,
|
|
2825
|
+
...props
|
|
2826
|
+
}) {
|
|
2827
|
+
return /* @__PURE__ */ jsx(
|
|
2828
|
+
SelectPrimitive.ScrollDownButton,
|
|
2829
|
+
{
|
|
2830
|
+
"data-slot": "select-scroll-down-button",
|
|
2831
|
+
className: cn(
|
|
2832
|
+
"flex cursor-default items-center justify-center py-1",
|
|
2833
|
+
className
|
|
2834
|
+
),
|
|
2835
|
+
...props,
|
|
2836
|
+
children: /* @__PURE__ */ jsx(ChevronDownIcon, { className: "size-4" })
|
|
2837
|
+
}
|
|
2838
|
+
);
|
|
2839
|
+
}
|
|
2840
|
+
function Separator5({
|
|
2841
|
+
className,
|
|
2842
|
+
orientation = "horizontal",
|
|
2843
|
+
decorative = true,
|
|
2844
|
+
...props
|
|
2845
|
+
}) {
|
|
2846
|
+
return /* @__PURE__ */ jsx(
|
|
2847
|
+
SeparatorPrimitive.Root,
|
|
2848
|
+
{
|
|
2849
|
+
"data-slot": "separator",
|
|
2850
|
+
decorative,
|
|
2851
|
+
orientation,
|
|
2852
|
+
className: cn(
|
|
2853
|
+
"bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",
|
|
2854
|
+
className
|
|
2855
|
+
),
|
|
2856
|
+
...props
|
|
2857
|
+
}
|
|
2858
|
+
);
|
|
2859
|
+
}
|
|
2860
|
+
function Sheet({ ...props }) {
|
|
2861
|
+
return /* @__PURE__ */ jsx(DialogPrimitive.Root, { "data-slot": "sheet", ...props });
|
|
2862
|
+
}
|
|
2863
|
+
function SheetTrigger({
|
|
2864
|
+
...props
|
|
2865
|
+
}) {
|
|
2866
|
+
return /* @__PURE__ */ jsx(DialogPrimitive.Trigger, { "data-slot": "sheet-trigger", ...props });
|
|
2867
|
+
}
|
|
2868
|
+
function SheetClose({
|
|
2869
|
+
...props
|
|
2870
|
+
}) {
|
|
2871
|
+
return /* @__PURE__ */ jsx(DialogPrimitive.Close, { "data-slot": "sheet-close", ...props });
|
|
2872
|
+
}
|
|
2873
|
+
function SheetPortal({
|
|
2874
|
+
...props
|
|
2875
|
+
}) {
|
|
2876
|
+
return /* @__PURE__ */ jsx(DialogPrimitive.Portal, { "data-slot": "sheet-portal", ...props });
|
|
2877
|
+
}
|
|
2878
|
+
function SheetOverlay({
|
|
2879
|
+
className,
|
|
2880
|
+
...props
|
|
2881
|
+
}) {
|
|
2882
|
+
return /* @__PURE__ */ jsx(
|
|
2883
|
+
DialogPrimitive.Overlay,
|
|
2884
|
+
{
|
|
2885
|
+
"data-slot": "sheet-overlay",
|
|
2886
|
+
className: cn(
|
|
2887
|
+
"data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",
|
|
2888
|
+
className
|
|
2889
|
+
),
|
|
2890
|
+
...props
|
|
2891
|
+
}
|
|
2892
|
+
);
|
|
2893
|
+
}
|
|
2894
|
+
function SheetContent({
|
|
2895
|
+
className,
|
|
2896
|
+
children,
|
|
2897
|
+
side = "right",
|
|
2898
|
+
...props
|
|
2899
|
+
}) {
|
|
2900
|
+
return /* @__PURE__ */ jsxs(SheetPortal, { children: [
|
|
2901
|
+
/* @__PURE__ */ jsx(SheetOverlay, {}),
|
|
2902
|
+
/* @__PURE__ */ jsxs(
|
|
2903
|
+
DialogPrimitive.Content,
|
|
2904
|
+
{
|
|
2905
|
+
"data-slot": "sheet-content",
|
|
2906
|
+
className: cn(
|
|
2907
|
+
"bg-background data-[state=open]:animate-in data-[state=closed]:animate-out fixed z-50 flex flex-col gap-4 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500",
|
|
2908
|
+
side === "right" && "data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm",
|
|
2909
|
+
side === "left" && "data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm",
|
|
2910
|
+
side === "top" && "data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto border-b",
|
|
2911
|
+
side === "bottom" && "data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 h-auto border-t",
|
|
2912
|
+
className
|
|
2913
|
+
),
|
|
2914
|
+
...props,
|
|
2915
|
+
children: [
|
|
2916
|
+
children,
|
|
2917
|
+
/* @__PURE__ */ jsxs(DialogPrimitive.Close, { className: "ring-offset-background focus:ring-ring data-[state=open]:bg-secondary absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none", children: [
|
|
2918
|
+
/* @__PURE__ */ jsx(XIcon, { className: "size-4" }),
|
|
2919
|
+
/* @__PURE__ */ jsx("span", { className: "sr-only", children: "Close" })
|
|
2920
|
+
] })
|
|
2921
|
+
]
|
|
2922
|
+
}
|
|
2923
|
+
)
|
|
2924
|
+
] });
|
|
2925
|
+
}
|
|
2926
|
+
function SheetHeader({ className, ...props }) {
|
|
2927
|
+
return /* @__PURE__ */ jsx(
|
|
2928
|
+
"div",
|
|
2929
|
+
{
|
|
2930
|
+
"data-slot": "sheet-header",
|
|
2931
|
+
className: cn("flex flex-col gap-1.5 p-4", className),
|
|
2932
|
+
...props
|
|
2933
|
+
}
|
|
2934
|
+
);
|
|
2935
|
+
}
|
|
2936
|
+
function SheetFooter({ className, ...props }) {
|
|
2937
|
+
return /* @__PURE__ */ jsx(
|
|
2938
|
+
"div",
|
|
2939
|
+
{
|
|
2940
|
+
"data-slot": "sheet-footer",
|
|
2941
|
+
className: cn("mt-auto flex flex-col gap-2 p-4", className),
|
|
2942
|
+
...props
|
|
2943
|
+
}
|
|
2944
|
+
);
|
|
2945
|
+
}
|
|
2946
|
+
function SheetTitle({
|
|
2947
|
+
className,
|
|
2948
|
+
...props
|
|
2949
|
+
}) {
|
|
2950
|
+
return /* @__PURE__ */ jsx(
|
|
2951
|
+
DialogPrimitive.Title,
|
|
2952
|
+
{
|
|
2953
|
+
"data-slot": "sheet-title",
|
|
2954
|
+
className: cn("text-foreground font-semibold", className),
|
|
2955
|
+
...props
|
|
2956
|
+
}
|
|
2957
|
+
);
|
|
2958
|
+
}
|
|
2959
|
+
function SheetDescription({
|
|
2960
|
+
className,
|
|
2961
|
+
...props
|
|
2962
|
+
}) {
|
|
2963
|
+
return /* @__PURE__ */ jsx(
|
|
2964
|
+
DialogPrimitive.Description,
|
|
2965
|
+
{
|
|
2966
|
+
"data-slot": "sheet-description",
|
|
2967
|
+
className: cn("text-muted-foreground text-sm", className),
|
|
2968
|
+
...props
|
|
2969
|
+
}
|
|
2970
|
+
);
|
|
2971
|
+
}
|
|
2972
|
+
function Skeleton({ className, ...props }) {
|
|
2973
|
+
return /* @__PURE__ */ jsx(
|
|
2974
|
+
"div",
|
|
2975
|
+
{
|
|
2976
|
+
"data-slot": "skeleton",
|
|
2977
|
+
className: cn("bg-accent animate-pulse rounded-md", className),
|
|
2978
|
+
...props
|
|
2979
|
+
}
|
|
2980
|
+
);
|
|
2981
|
+
}
|
|
2982
|
+
function Slider({
|
|
2983
|
+
className,
|
|
2984
|
+
defaultValue,
|
|
2985
|
+
value,
|
|
2986
|
+
min = 0,
|
|
2987
|
+
max = 100,
|
|
2988
|
+
...props
|
|
2989
|
+
}) {
|
|
2990
|
+
const _values = React2.useMemo(
|
|
2991
|
+
() => Array.isArray(value) ? value : Array.isArray(defaultValue) ? defaultValue : [min, max],
|
|
2992
|
+
[value, defaultValue, min, max]
|
|
2993
|
+
);
|
|
2994
|
+
return /* @__PURE__ */ jsxs(
|
|
2995
|
+
SliderPrimitive.Root,
|
|
2996
|
+
{
|
|
2997
|
+
"data-slot": "slider",
|
|
2998
|
+
defaultValue,
|
|
2999
|
+
value,
|
|
3000
|
+
min,
|
|
3001
|
+
max,
|
|
3002
|
+
className: cn(
|
|
3003
|
+
"relative flex w-full touch-none items-center select-none data-[disabled]:opacity-50 data-[orientation=vertical]:h-full data-[orientation=vertical]:min-h-44 data-[orientation=vertical]:w-auto data-[orientation=vertical]:flex-col",
|
|
3004
|
+
className
|
|
3005
|
+
),
|
|
3006
|
+
...props,
|
|
3007
|
+
children: [
|
|
3008
|
+
/* @__PURE__ */ jsx(
|
|
3009
|
+
SliderPrimitive.Track,
|
|
3010
|
+
{
|
|
3011
|
+
"data-slot": "slider-track",
|
|
3012
|
+
className: cn(
|
|
3013
|
+
"bg-muted relative grow overflow-hidden rounded-full data-[orientation=horizontal]:h-1.5 data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-1.5"
|
|
3014
|
+
),
|
|
3015
|
+
children: /* @__PURE__ */ jsx(
|
|
3016
|
+
SliderPrimitive.Range,
|
|
3017
|
+
{
|
|
3018
|
+
"data-slot": "slider-range",
|
|
3019
|
+
className: cn(
|
|
3020
|
+
"bg-primary absolute data-[orientation=horizontal]:h-full data-[orientation=vertical]:w-full"
|
|
3021
|
+
)
|
|
3022
|
+
}
|
|
3023
|
+
)
|
|
3024
|
+
}
|
|
3025
|
+
),
|
|
3026
|
+
Array.from({ length: _values.length }, (_2, index) => /* @__PURE__ */ jsx(
|
|
3027
|
+
SliderPrimitive.Thumb,
|
|
3028
|
+
{
|
|
3029
|
+
"data-slot": "slider-thumb",
|
|
3030
|
+
className: "border-primary bg-background ring-ring/50 block size-4 shrink-0 rounded-full border shadow-sm transition-[color,box-shadow] hover:ring-4 focus-visible:ring-4 focus-visible:outline-hidden disabled:pointer-events-none disabled:opacity-50"
|
|
3031
|
+
},
|
|
3032
|
+
index
|
|
3033
|
+
))
|
|
3034
|
+
]
|
|
3035
|
+
}
|
|
3036
|
+
);
|
|
3037
|
+
}
|
|
3038
|
+
var M = (e, i, s, u, m, a, l, h) => {
|
|
3039
|
+
let d = document.documentElement, w = ["light", "dark"];
|
|
3040
|
+
function p(n) {
|
|
3041
|
+
(Array.isArray(e) ? e : [e]).forEach((y) => {
|
|
3042
|
+
let k = y === "class", S = k && a ? m.map((f) => a[f] || f) : m;
|
|
3043
|
+
k ? (d.classList.remove(...S), d.classList.add(a && a[n] ? a[n] : n)) : d.setAttribute(y, n);
|
|
3044
|
+
}), R(n);
|
|
3045
|
+
}
|
|
3046
|
+
function R(n) {
|
|
3047
|
+
h && w.includes(n) && (d.style.colorScheme = n);
|
|
3048
|
+
}
|
|
3049
|
+
function c() {
|
|
3050
|
+
return window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
|
|
3051
|
+
}
|
|
3052
|
+
if (u) p(u);
|
|
3053
|
+
else try {
|
|
3054
|
+
let n = localStorage.getItem(i) || s, y = l && n === "system" ? c() : n;
|
|
3055
|
+
p(y);
|
|
3056
|
+
} catch (n) {
|
|
3057
|
+
}
|
|
3058
|
+
};
|
|
3059
|
+
var x = React2.createContext(void 0);
|
|
3060
|
+
var U = { setTheme: (e) => {
|
|
3061
|
+
}, themes: [] };
|
|
3062
|
+
var z = () => {
|
|
3063
|
+
var e;
|
|
3064
|
+
return (e = React2.useContext(x)) != null ? e : U;
|
|
3065
|
+
};
|
|
3066
|
+
React2.memo(({ forcedTheme: e, storageKey: i, attribute: s, enableSystem: u, enableColorScheme: m, defaultTheme: a, value: l, themes: h, nonce: d, scriptProps: w }) => {
|
|
3067
|
+
let p = JSON.stringify([s, i, a, e, h, l, u, m]).slice(1, -1);
|
|
3068
|
+
return React2.createElement("script", { ...w, suppressHydrationWarning: true, nonce: typeof window == "undefined" ? d : "", dangerouslySetInnerHTML: { __html: `(${M.toString()})(${p})` } });
|
|
3069
|
+
});
|
|
3070
|
+
var Toaster = ({ ...props }) => {
|
|
3071
|
+
const { theme = "system" } = z();
|
|
3072
|
+
return /* @__PURE__ */ jsx(
|
|
3073
|
+
Toaster$1,
|
|
3074
|
+
{
|
|
3075
|
+
theme,
|
|
3076
|
+
className: "toaster group",
|
|
3077
|
+
style: {
|
|
3078
|
+
"--normal-bg": "var(--popover)",
|
|
3079
|
+
"--normal-text": "var(--popover-foreground)",
|
|
3080
|
+
"--normal-border": "var(--border)"
|
|
3081
|
+
},
|
|
3082
|
+
...props
|
|
3083
|
+
}
|
|
3084
|
+
);
|
|
3085
|
+
};
|
|
3086
|
+
function Switch({
|
|
3087
|
+
className,
|
|
3088
|
+
...props
|
|
3089
|
+
}) {
|
|
3090
|
+
return /* @__PURE__ */ jsx(
|
|
3091
|
+
SwitchPrimitive.Root,
|
|
3092
|
+
{
|
|
3093
|
+
"data-slot": "switch",
|
|
3094
|
+
className: cn(
|
|
3095
|
+
"peer data-[state=checked]:bg-primary data-[state=unchecked]:bg-input focus-visible:border-ring focus-visible:ring-ring/50 dark:data-[state=unchecked]:bg-input/80 inline-flex h-[1.15rem] w-8 shrink-0 items-center rounded-full border border-transparent shadow-xs transition-all outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",
|
|
3096
|
+
className
|
|
3097
|
+
),
|
|
3098
|
+
...props,
|
|
3099
|
+
children: /* @__PURE__ */ jsx(
|
|
3100
|
+
SwitchPrimitive.Thumb,
|
|
3101
|
+
{
|
|
3102
|
+
"data-slot": "switch-thumb",
|
|
3103
|
+
className: cn(
|
|
3104
|
+
"bg-background dark:data-[state=unchecked]:bg-foreground dark:data-[state=checked]:bg-primary-foreground pointer-events-none block size-4 rounded-full ring-0 transition-transform data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0"
|
|
3105
|
+
)
|
|
3106
|
+
}
|
|
3107
|
+
)
|
|
3108
|
+
}
|
|
3109
|
+
);
|
|
3110
|
+
}
|
|
3111
|
+
function Table({ className, ...props }) {
|
|
3112
|
+
return /* @__PURE__ */ jsx(
|
|
3113
|
+
"div",
|
|
3114
|
+
{
|
|
3115
|
+
"data-slot": "table-container",
|
|
3116
|
+
className: "relative w-full overflow-x-auto",
|
|
3117
|
+
children: /* @__PURE__ */ jsx(
|
|
3118
|
+
"table",
|
|
3119
|
+
{
|
|
3120
|
+
"data-slot": "table",
|
|
3121
|
+
className: cn("w-full caption-bottom text-sm", className),
|
|
3122
|
+
...props
|
|
3123
|
+
}
|
|
3124
|
+
)
|
|
3125
|
+
}
|
|
3126
|
+
);
|
|
3127
|
+
}
|
|
3128
|
+
function TableHeader({ className, ...props }) {
|
|
3129
|
+
return /* @__PURE__ */ jsx(
|
|
3130
|
+
"thead",
|
|
3131
|
+
{
|
|
3132
|
+
"data-slot": "table-header",
|
|
3133
|
+
className: cn("[&_tr]:border-b", className),
|
|
3134
|
+
...props
|
|
3135
|
+
}
|
|
3136
|
+
);
|
|
3137
|
+
}
|
|
3138
|
+
function TableBody({ className, ...props }) {
|
|
3139
|
+
return /* @__PURE__ */ jsx(
|
|
3140
|
+
"tbody",
|
|
3141
|
+
{
|
|
3142
|
+
"data-slot": "table-body",
|
|
3143
|
+
className: cn("[&_tr:last-child]:border-0", className),
|
|
3144
|
+
...props
|
|
3145
|
+
}
|
|
3146
|
+
);
|
|
3147
|
+
}
|
|
3148
|
+
function TableFooter({ className, ...props }) {
|
|
3149
|
+
return /* @__PURE__ */ jsx(
|
|
3150
|
+
"tfoot",
|
|
3151
|
+
{
|
|
3152
|
+
"data-slot": "table-footer",
|
|
3153
|
+
className: cn(
|
|
3154
|
+
"bg-muted/50 border-t font-medium [&>tr]:last:border-b-0",
|
|
3155
|
+
className
|
|
3156
|
+
),
|
|
3157
|
+
...props
|
|
3158
|
+
}
|
|
3159
|
+
);
|
|
3160
|
+
}
|
|
3161
|
+
function TableRow({ className, ...props }) {
|
|
3162
|
+
return /* @__PURE__ */ jsx(
|
|
3163
|
+
"tr",
|
|
3164
|
+
{
|
|
3165
|
+
"data-slot": "table-row",
|
|
3166
|
+
className: cn(
|
|
3167
|
+
"hover:bg-muted/50 data-[state=selected]:bg-muted border-b transition-colors",
|
|
3168
|
+
className
|
|
3169
|
+
),
|
|
3170
|
+
...props
|
|
3171
|
+
}
|
|
3172
|
+
);
|
|
3173
|
+
}
|
|
3174
|
+
function TableHead({ className, ...props }) {
|
|
3175
|
+
return /* @__PURE__ */ jsx(
|
|
3176
|
+
"th",
|
|
3177
|
+
{
|
|
3178
|
+
"data-slot": "table-head",
|
|
3179
|
+
className: cn(
|
|
3180
|
+
"text-foreground h-10 px-2 text-left align-middle font-medium whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",
|
|
3181
|
+
className
|
|
3182
|
+
),
|
|
3183
|
+
...props
|
|
3184
|
+
}
|
|
3185
|
+
);
|
|
3186
|
+
}
|
|
3187
|
+
function TableCell({ className, ...props }) {
|
|
3188
|
+
return /* @__PURE__ */ jsx(
|
|
3189
|
+
"td",
|
|
3190
|
+
{
|
|
3191
|
+
"data-slot": "table-cell",
|
|
3192
|
+
className: cn(
|
|
3193
|
+
"p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",
|
|
3194
|
+
className
|
|
3195
|
+
),
|
|
3196
|
+
...props
|
|
3197
|
+
}
|
|
3198
|
+
);
|
|
3199
|
+
}
|
|
3200
|
+
function TableCaption({
|
|
3201
|
+
className,
|
|
3202
|
+
...props
|
|
3203
|
+
}) {
|
|
3204
|
+
return /* @__PURE__ */ jsx(
|
|
3205
|
+
"caption",
|
|
3206
|
+
{
|
|
3207
|
+
"data-slot": "table-caption",
|
|
3208
|
+
className: cn("text-muted-foreground mt-4 text-sm", className),
|
|
3209
|
+
...props
|
|
3210
|
+
}
|
|
3211
|
+
);
|
|
3212
|
+
}
|
|
3213
|
+
function Tabs({
|
|
3214
|
+
className,
|
|
3215
|
+
...props
|
|
3216
|
+
}) {
|
|
3217
|
+
return /* @__PURE__ */ jsx(
|
|
3218
|
+
TabsPrimitive.Root,
|
|
3219
|
+
{
|
|
3220
|
+
"data-slot": "tabs",
|
|
3221
|
+
className: cn("flex flex-col gap-2", className),
|
|
3222
|
+
...props
|
|
3223
|
+
}
|
|
3224
|
+
);
|
|
3225
|
+
}
|
|
3226
|
+
function TabsList({
|
|
3227
|
+
className,
|
|
3228
|
+
...props
|
|
3229
|
+
}) {
|
|
3230
|
+
return /* @__PURE__ */ jsx(
|
|
3231
|
+
TabsPrimitive.List,
|
|
3232
|
+
{
|
|
3233
|
+
"data-slot": "tabs-list",
|
|
3234
|
+
className: cn(
|
|
3235
|
+
"bg-muted text-muted-foreground inline-flex h-9 w-fit items-center justify-center rounded-lg p-[3px]",
|
|
3236
|
+
className
|
|
3237
|
+
),
|
|
3238
|
+
...props
|
|
3239
|
+
}
|
|
3240
|
+
);
|
|
3241
|
+
}
|
|
3242
|
+
function TabsTrigger({
|
|
3243
|
+
className,
|
|
3244
|
+
...props
|
|
3245
|
+
}) {
|
|
3246
|
+
return /* @__PURE__ */ jsx(
|
|
3247
|
+
TabsPrimitive.Trigger,
|
|
3248
|
+
{
|
|
3249
|
+
"data-slot": "tabs-trigger",
|
|
3250
|
+
className: cn(
|
|
3251
|
+
"data-[state=active]:bg-background dark:data-[state=active]:text-foreground focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring dark:data-[state=active]:border-input dark:data-[state=active]:bg-input/30 text-foreground dark:text-muted-foreground inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:ring-[3px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow-sm [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
3252
|
+
className
|
|
3253
|
+
),
|
|
3254
|
+
...props
|
|
3255
|
+
}
|
|
3256
|
+
);
|
|
3257
|
+
}
|
|
3258
|
+
function TabsContent({
|
|
3259
|
+
className,
|
|
3260
|
+
...props
|
|
3261
|
+
}) {
|
|
3262
|
+
return /* @__PURE__ */ jsx(
|
|
3263
|
+
TabsPrimitive.Content,
|
|
3264
|
+
{
|
|
3265
|
+
"data-slot": "tabs-content",
|
|
3266
|
+
className: cn("flex-1 outline-none", className),
|
|
3267
|
+
...props
|
|
3268
|
+
}
|
|
3269
|
+
);
|
|
3270
|
+
}
|
|
3271
|
+
function Textarea({ className, ...props }) {
|
|
3272
|
+
return /* @__PURE__ */ jsx(
|
|
3273
|
+
"textarea",
|
|
3274
|
+
{
|
|
3275
|
+
"data-slot": "textarea",
|
|
3276
|
+
className: cn(
|
|
3277
|
+
"border-input placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 flex field-sizing-content min-h-16 w-full rounded-md border bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",
|
|
3278
|
+
className
|
|
3279
|
+
),
|
|
3280
|
+
...props
|
|
3281
|
+
}
|
|
3282
|
+
);
|
|
3283
|
+
}
|
|
3284
|
+
var ToastProvider = ToastPrimitives.Provider;
|
|
3285
|
+
var ToastViewport = React2.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
3286
|
+
ToastPrimitives.Viewport,
|
|
3287
|
+
{
|
|
3288
|
+
ref,
|
|
3289
|
+
className: cn(
|
|
3290
|
+
"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]",
|
|
3291
|
+
className
|
|
3292
|
+
),
|
|
3293
|
+
...props
|
|
3294
|
+
}
|
|
3295
|
+
));
|
|
3296
|
+
ToastViewport.displayName = ToastPrimitives.Viewport.displayName;
|
|
3297
|
+
var toastVariants = cva(
|
|
3298
|
+
"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",
|
|
3299
|
+
{
|
|
3300
|
+
variants: {
|
|
3301
|
+
variant: {
|
|
3302
|
+
default: "border bg-background text-foreground",
|
|
3303
|
+
destructive: "destructive group border-destructive bg-destructive text-destructive-foreground"
|
|
3304
|
+
}
|
|
3305
|
+
},
|
|
3306
|
+
defaultVariants: {
|
|
3307
|
+
variant: "default"
|
|
3308
|
+
}
|
|
3309
|
+
}
|
|
3310
|
+
);
|
|
3311
|
+
var Toast = React2.forwardRef(({ className, variant, ...props }, ref) => {
|
|
3312
|
+
return /* @__PURE__ */ jsx(
|
|
3313
|
+
ToastPrimitives.Root,
|
|
3314
|
+
{
|
|
3315
|
+
ref,
|
|
3316
|
+
className: cn(toastVariants({ variant }), className),
|
|
3317
|
+
...props
|
|
3318
|
+
}
|
|
3319
|
+
);
|
|
3320
|
+
});
|
|
3321
|
+
Toast.displayName = ToastPrimitives.Root.displayName;
|
|
3322
|
+
var ToastAction = React2.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
3323
|
+
ToastPrimitives.Action,
|
|
3324
|
+
{
|
|
3325
|
+
ref,
|
|
3326
|
+
className: cn(
|
|
3327
|
+
"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",
|
|
3328
|
+
className
|
|
3329
|
+
),
|
|
3330
|
+
...props
|
|
3331
|
+
}
|
|
3332
|
+
));
|
|
3333
|
+
ToastAction.displayName = ToastPrimitives.Action.displayName;
|
|
3334
|
+
var ToastClose = React2.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
3335
|
+
ToastPrimitives.Close,
|
|
3336
|
+
{
|
|
3337
|
+
ref,
|
|
3338
|
+
className: cn(
|
|
3339
|
+
"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",
|
|
3340
|
+
className
|
|
3341
|
+
),
|
|
3342
|
+
"toast-close": "",
|
|
3343
|
+
...props,
|
|
3344
|
+
children: /* @__PURE__ */ jsx(X, { className: "h-4 w-4" })
|
|
3345
|
+
}
|
|
3346
|
+
));
|
|
3347
|
+
ToastClose.displayName = ToastPrimitives.Close.displayName;
|
|
3348
|
+
var ToastTitle = React2.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
3349
|
+
ToastPrimitives.Title,
|
|
3350
|
+
{
|
|
3351
|
+
ref,
|
|
3352
|
+
className: cn("text-sm font-semibold [&+div]:text-xs", className),
|
|
3353
|
+
...props
|
|
3354
|
+
}
|
|
3355
|
+
));
|
|
3356
|
+
ToastTitle.displayName = ToastPrimitives.Title.displayName;
|
|
3357
|
+
var ToastDescription = React2.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
3358
|
+
ToastPrimitives.Description,
|
|
3359
|
+
{
|
|
3360
|
+
ref,
|
|
3361
|
+
className: cn("text-sm opacity-90", className),
|
|
3362
|
+
...props
|
|
3363
|
+
}
|
|
3364
|
+
));
|
|
3365
|
+
ToastDescription.displayName = ToastPrimitives.Description.displayName;
|
|
3366
|
+
var toggleVariants = cva(
|
|
3367
|
+
"inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium hover:bg-muted hover:text-muted-foreground disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0 focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] outline-none transition-[color,box-shadow] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive whitespace-nowrap",
|
|
3368
|
+
{
|
|
3369
|
+
variants: {
|
|
3370
|
+
variant: {
|
|
3371
|
+
default: "bg-transparent",
|
|
3372
|
+
outline: "border border-input bg-transparent shadow-xs hover:bg-accent hover:text-accent-foreground"
|
|
3373
|
+
},
|
|
3374
|
+
size: {
|
|
3375
|
+
default: "h-9 px-2 min-w-9",
|
|
3376
|
+
sm: "h-8 px-1.5 min-w-8",
|
|
3377
|
+
lg: "h-10 px-2.5 min-w-10"
|
|
3378
|
+
}
|
|
3379
|
+
},
|
|
3380
|
+
defaultVariants: {
|
|
3381
|
+
variant: "default",
|
|
3382
|
+
size: "default"
|
|
3383
|
+
}
|
|
3384
|
+
}
|
|
3385
|
+
);
|
|
3386
|
+
function Toggle({
|
|
3387
|
+
className,
|
|
3388
|
+
variant,
|
|
3389
|
+
size,
|
|
3390
|
+
...props
|
|
3391
|
+
}) {
|
|
3392
|
+
return /* @__PURE__ */ jsx(
|
|
3393
|
+
TogglePrimitive.Root,
|
|
3394
|
+
{
|
|
3395
|
+
"data-slot": "toggle",
|
|
3396
|
+
className: cn(toggleVariants({ variant, size, className })),
|
|
3397
|
+
...props
|
|
3398
|
+
}
|
|
3399
|
+
);
|
|
3400
|
+
}
|
|
3401
|
+
var ToggleGroupContext = React2.createContext({
|
|
3402
|
+
size: "default",
|
|
3403
|
+
variant: "default"
|
|
3404
|
+
});
|
|
3405
|
+
function ToggleGroup({
|
|
3406
|
+
className,
|
|
3407
|
+
variant,
|
|
3408
|
+
size,
|
|
3409
|
+
children,
|
|
3410
|
+
...props
|
|
3411
|
+
}) {
|
|
3412
|
+
return /* @__PURE__ */ jsx(
|
|
3413
|
+
ToggleGroupPrimitive.Root,
|
|
3414
|
+
{
|
|
3415
|
+
"data-slot": "toggle-group",
|
|
3416
|
+
"data-variant": variant,
|
|
3417
|
+
"data-size": size,
|
|
3418
|
+
className: cn(
|
|
3419
|
+
"group/toggle-group flex w-fit items-center rounded-md data-[variant=outline]:shadow-xs",
|
|
3420
|
+
className
|
|
3421
|
+
),
|
|
3422
|
+
...props,
|
|
3423
|
+
children: /* @__PURE__ */ jsx(ToggleGroupContext.Provider, { value: { variant, size }, children })
|
|
3424
|
+
}
|
|
3425
|
+
);
|
|
3426
|
+
}
|
|
3427
|
+
function ToggleGroupItem({
|
|
3428
|
+
className,
|
|
3429
|
+
children,
|
|
3430
|
+
variant,
|
|
3431
|
+
size,
|
|
3432
|
+
...props
|
|
3433
|
+
}) {
|
|
3434
|
+
const context = React2.useContext(ToggleGroupContext);
|
|
3435
|
+
return /* @__PURE__ */ jsx(
|
|
3436
|
+
ToggleGroupPrimitive.Item,
|
|
3437
|
+
{
|
|
3438
|
+
"data-slot": "toggle-group-item",
|
|
3439
|
+
"data-variant": context.variant || variant,
|
|
3440
|
+
"data-size": context.size || size,
|
|
3441
|
+
className: cn(
|
|
3442
|
+
toggleVariants({
|
|
3443
|
+
variant: context.variant || variant,
|
|
3444
|
+
size: context.size || size
|
|
3445
|
+
}),
|
|
3446
|
+
"min-w-0 flex-1 shrink-0 rounded-none shadow-none first:rounded-l-md last:rounded-r-md focus:z-10 focus-visible:z-10 data-[variant=outline]:border-l-0 data-[variant=outline]:first:border-l",
|
|
3447
|
+
className
|
|
3448
|
+
),
|
|
3449
|
+
...props,
|
|
3450
|
+
children
|
|
3451
|
+
}
|
|
3452
|
+
);
|
|
3453
|
+
}
|
|
3454
|
+
function TooltipProvider({
|
|
3455
|
+
delayDuration = 0,
|
|
3456
|
+
...props
|
|
3457
|
+
}) {
|
|
3458
|
+
return /* @__PURE__ */ jsx(
|
|
3459
|
+
TooltipPrimitive.Provider,
|
|
3460
|
+
{
|
|
3461
|
+
"data-slot": "tooltip-provider",
|
|
3462
|
+
delayDuration,
|
|
3463
|
+
...props
|
|
3464
|
+
}
|
|
3465
|
+
);
|
|
3466
|
+
}
|
|
3467
|
+
function Tooltip({
|
|
3468
|
+
...props
|
|
3469
|
+
}) {
|
|
3470
|
+
return /* @__PURE__ */ jsx(TooltipProvider, { children: /* @__PURE__ */ jsx(TooltipPrimitive.Root, { "data-slot": "tooltip", ...props }) });
|
|
3471
|
+
}
|
|
3472
|
+
function TooltipTrigger({
|
|
3473
|
+
...props
|
|
3474
|
+
}) {
|
|
3475
|
+
return /* @__PURE__ */ jsx(TooltipPrimitive.Trigger, { "data-slot": "tooltip-trigger", ...props });
|
|
3476
|
+
}
|
|
3477
|
+
function TooltipContent({
|
|
3478
|
+
className,
|
|
3479
|
+
sideOffset = 0,
|
|
3480
|
+
children,
|
|
3481
|
+
...props
|
|
3482
|
+
}) {
|
|
3483
|
+
return /* @__PURE__ */ jsx(TooltipPrimitive.Portal, { children: /* @__PURE__ */ jsxs(
|
|
3484
|
+
TooltipPrimitive.Content,
|
|
3485
|
+
{
|
|
3486
|
+
"data-slot": "tooltip-content",
|
|
3487
|
+
sideOffset,
|
|
3488
|
+
className: cn(
|
|
3489
|
+
"bg-primary 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 z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance",
|
|
3490
|
+
className
|
|
3491
|
+
),
|
|
3492
|
+
...props,
|
|
3493
|
+
children: [
|
|
3494
|
+
children,
|
|
3495
|
+
/* @__PURE__ */ jsx(TooltipPrimitive.Arrow, { className: "bg-primary fill-primary z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]" })
|
|
3496
|
+
]
|
|
3497
|
+
}
|
|
3498
|
+
) });
|
|
3499
|
+
}
|
|
3500
|
+
var TOAST_LIMIT = 1;
|
|
3501
|
+
var TOAST_REMOVE_DELAY = 1e6;
|
|
3502
|
+
var count = 0;
|
|
3503
|
+
function genId() {
|
|
3504
|
+
count = (count + 1) % Number.MAX_SAFE_INTEGER;
|
|
3505
|
+
return count.toString();
|
|
3506
|
+
}
|
|
3507
|
+
var toastTimeouts = /* @__PURE__ */ new Map();
|
|
3508
|
+
var addToRemoveQueue = (toastId) => {
|
|
3509
|
+
if (toastTimeouts.has(toastId)) {
|
|
3510
|
+
return;
|
|
3511
|
+
}
|
|
3512
|
+
const timeout = setTimeout(() => {
|
|
3513
|
+
toastTimeouts.delete(toastId);
|
|
3514
|
+
dispatch({
|
|
3515
|
+
type: "REMOVE_TOAST",
|
|
3516
|
+
toastId
|
|
3517
|
+
});
|
|
3518
|
+
}, TOAST_REMOVE_DELAY);
|
|
3519
|
+
toastTimeouts.set(toastId, timeout);
|
|
3520
|
+
};
|
|
3521
|
+
var reducer = (state, action) => {
|
|
3522
|
+
switch (action.type) {
|
|
3523
|
+
case "ADD_TOAST":
|
|
3524
|
+
return {
|
|
3525
|
+
...state,
|
|
3526
|
+
toasts: [action.toast, ...state.toasts].slice(0, TOAST_LIMIT)
|
|
3527
|
+
};
|
|
3528
|
+
case "UPDATE_TOAST":
|
|
3529
|
+
return {
|
|
3530
|
+
...state,
|
|
3531
|
+
toasts: state.toasts.map(
|
|
3532
|
+
(t2) => t2.id === action.toast.id ? { ...t2, ...action.toast } : t2
|
|
3533
|
+
)
|
|
3534
|
+
};
|
|
3535
|
+
case "DISMISS_TOAST": {
|
|
3536
|
+
const { toastId } = action;
|
|
3537
|
+
if (toastId) {
|
|
3538
|
+
addToRemoveQueue(toastId);
|
|
3539
|
+
} else {
|
|
3540
|
+
state.toasts.forEach((toast2) => {
|
|
3541
|
+
addToRemoveQueue(toast2.id);
|
|
3542
|
+
});
|
|
3543
|
+
}
|
|
3544
|
+
return {
|
|
3545
|
+
...state,
|
|
3546
|
+
toasts: state.toasts.map(
|
|
3547
|
+
(t2) => t2.id === toastId || toastId === void 0 ? {
|
|
3548
|
+
...t2,
|
|
3549
|
+
open: false
|
|
3550
|
+
} : t2
|
|
3551
|
+
)
|
|
3552
|
+
};
|
|
3553
|
+
}
|
|
3554
|
+
case "REMOVE_TOAST":
|
|
3555
|
+
if (action.toastId === void 0) {
|
|
3556
|
+
return {
|
|
3557
|
+
...state,
|
|
3558
|
+
toasts: []
|
|
3559
|
+
};
|
|
3560
|
+
}
|
|
3561
|
+
return {
|
|
3562
|
+
...state,
|
|
3563
|
+
toasts: state.toasts.filter((t2) => t2.id !== action.toastId)
|
|
3564
|
+
};
|
|
3565
|
+
}
|
|
3566
|
+
};
|
|
3567
|
+
var listeners = [];
|
|
3568
|
+
var memoryState = { toasts: [] };
|
|
3569
|
+
function dispatch(action) {
|
|
3570
|
+
memoryState = reducer(memoryState, action);
|
|
3571
|
+
listeners.forEach((listener) => {
|
|
3572
|
+
listener(memoryState);
|
|
3573
|
+
});
|
|
3574
|
+
}
|
|
3575
|
+
function toast({ ...props }) {
|
|
3576
|
+
const id = genId();
|
|
3577
|
+
const update = (props2) => dispatch({
|
|
3578
|
+
type: "UPDATE_TOAST",
|
|
3579
|
+
toast: { ...props2, id }
|
|
3580
|
+
});
|
|
3581
|
+
const dismiss = () => dispatch({ type: "DISMISS_TOAST", toastId: id });
|
|
3582
|
+
dispatch({
|
|
3583
|
+
type: "ADD_TOAST",
|
|
3584
|
+
toast: {
|
|
3585
|
+
...props,
|
|
3586
|
+
id,
|
|
3587
|
+
open: true,
|
|
3588
|
+
onOpenChange: (open) => {
|
|
3589
|
+
if (!open) dismiss();
|
|
3590
|
+
}
|
|
3591
|
+
}
|
|
3592
|
+
});
|
|
3593
|
+
return {
|
|
3594
|
+
id,
|
|
3595
|
+
dismiss,
|
|
3596
|
+
update
|
|
3597
|
+
};
|
|
3598
|
+
}
|
|
3599
|
+
function useToast() {
|
|
3600
|
+
const [state, setState] = React2.useState(memoryState);
|
|
3601
|
+
React2.useEffect(() => {
|
|
3602
|
+
listeners.push(setState);
|
|
3603
|
+
return () => {
|
|
3604
|
+
const index = listeners.indexOf(setState);
|
|
3605
|
+
if (index > -1) {
|
|
3606
|
+
listeners.splice(index, 1);
|
|
3607
|
+
}
|
|
3608
|
+
};
|
|
3609
|
+
}, [state]);
|
|
3610
|
+
return {
|
|
3611
|
+
...state,
|
|
3612
|
+
toast,
|
|
3613
|
+
dismiss: (toastId) => dispatch({ type: "DISMISS_TOAST", toastId })
|
|
3614
|
+
};
|
|
3615
|
+
}
|
|
3616
|
+
var MOBILE_BREAKPOINT = 768;
|
|
3617
|
+
function useIsMobile() {
|
|
3618
|
+
const [isMobile, setIsMobile] = React2.useState(void 0);
|
|
3619
|
+
React2.useEffect(() => {
|
|
3620
|
+
const mql = window.matchMedia(`(max-width: ${MOBILE_BREAKPOINT - 1}px)`);
|
|
3621
|
+
const onChange = () => {
|
|
3622
|
+
setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);
|
|
3623
|
+
};
|
|
3624
|
+
mql.addEventListener("change", onChange);
|
|
3625
|
+
setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);
|
|
3626
|
+
return () => mql.removeEventListener("change", onChange);
|
|
3627
|
+
}, []);
|
|
3628
|
+
return !!isMobile;
|
|
3629
|
+
}
|
|
3630
|
+
|
|
3631
|
+
// src/index.ts
|
|
3632
|
+
var VERSION = "1.0.0";
|
|
3633
|
+
|
|
3634
|
+
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, Alert, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AlertTitle, AspectRatio, Avatar, AvatarFallback, AvatarImage, Badge, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, Calendar, CalendarDayButton, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Carousel, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious, Checkbox, Collapsible, CollapsibleContent2 as CollapsibleContent, CollapsibleTrigger2 as CollapsibleTrigger, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuPortal, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, HoverCard, HoverCardContent, HoverCardTrigger, Input, InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot, Label3 as Label, Menubar, MenubarCheckboxItem, MenubarContent, MenubarGroup, MenubarItem, MenubarLabel, MenubarMenu, MenubarPortal, MenubarRadioGroup, MenubarRadioItem, MenubarSeparator, MenubarShortcut, MenubarSub, MenubarSubContent, MenubarSubTrigger, MenubarTrigger, NavigationMenu, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, NavigationMenuViewport, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, Progress, RadioGroup4 as RadioGroup, RadioGroupItem, ResizableHandle, ResizablePanel, ResizablePanelGroup, ScrollArea, ScrollBar, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator5 as Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger, Skeleton, Slider, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, Toast, ToastAction, ToastClose, ToastDescription, ToastProvider, ToastTitle, ToastViewport, Toaster, Toggle, ToggleGroup, ToggleGroupItem, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, VERSION, badgeVariants, buttonVariants, cn, navigationMenuTriggerStyle, toggleVariants, useFormField, useIsMobile, useToast };
|
|
3635
|
+
//# sourceMappingURL=index.js.map
|
|
3636
|
+
//# sourceMappingURL=index.js.map
|