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