@hivemindhq/core 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +224 -0
- package/dist/chunk-2RGM3KJL.js +351 -0
- package/dist/chunk-2RGM3KJL.js.map +1 -0
- package/dist/chunk-E5TTKYNS.js +55 -0
- package/dist/chunk-E5TTKYNS.js.map +1 -0
- package/dist/chunk-ERZSVDIB.js +270 -0
- package/dist/chunk-ERZSVDIB.js.map +1 -0
- package/dist/chunk-H4RMZQ2Z.js +213 -0
- package/dist/chunk-H4RMZQ2Z.js.map +1 -0
- package/dist/chunk-K7EIJSYQ.js +3 -0
- package/dist/chunk-K7EIJSYQ.js.map +1 -0
- package/dist/chunk-OJF67RNM.js +3 -0
- package/dist/chunk-OJF67RNM.js.map +1 -0
- package/dist/chunk-P5E2XNDI.js +2758 -0
- package/dist/chunk-P5E2XNDI.js.map +1 -0
- package/dist/chunk-T2XWV636.js +137 -0
- package/dist/chunk-T2XWV636.js.map +1 -0
- package/dist/chunk-VIRNUAYY.js +11 -0
- package/dist/chunk-VIRNUAYY.js.map +1 -0
- package/dist/components/index.d.ts +277 -0
- package/dist/components/index.js +6 -0
- package/dist/components/index.js.map +1 -0
- package/dist/components/ui/index.d.ts +396 -0
- package/dist/components/ui/index.js +6 -0
- package/dist/components/ui/index.js.map +1 -0
- package/dist/hooks/index.d.ts +27 -0
- package/dist/hooks/index.js +4 -0
- package/dist/hooks/index.js.map +1 -0
- package/dist/index.d.ts +34 -0
- package/dist/index.js +11 -0
- package/dist/index.js.map +1 -0
- package/dist/toast-D090UYOq.d.ts +19 -0
- package/dist/types/index.d.ts +2 -0
- package/dist/types/index.js +3 -0
- package/dist/types/index.js.map +1 -0
- package/dist/utils/index.d.ts +573 -0
- package/dist/utils/index.js +5 -0
- package/dist/utils/index.js.map +1 -0
- package/package.json +107 -0
- package/tailwind.config.js +96 -0
|
@@ -0,0 +1,2758 @@
|
|
|
1
|
+
import { TooltipProvider, Tooltip, TooltipTrigger, TooltipContent } from './chunk-E5TTKYNS.js';
|
|
2
|
+
import { cn } from './chunk-VIRNUAYY.js';
|
|
3
|
+
import { useIsMobile, useToast } from './chunk-T2XWV636.js';
|
|
4
|
+
import * as React5 from 'react';
|
|
5
|
+
import { cva } from 'class-variance-authority';
|
|
6
|
+
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
7
|
+
import * as AvatarPrimitive from '@radix-ui/react-avatar';
|
|
8
|
+
import { Slot } from '@radix-ui/react-slot';
|
|
9
|
+
import { Check, X, ChevronRight, Circle, MoreHorizontal, ArrowLeft, ArrowRight, SearchIcon, ChevronDownIcon, CheckIcon, ChevronUpIcon, ChevronsLeft, ChevronLeft, ChevronsRight, PanelLeftIcon } from 'lucide-react';
|
|
10
|
+
import useEmblaCarousel from 'embla-carousel-react';
|
|
11
|
+
import * as RechartsPrimitive from 'recharts';
|
|
12
|
+
import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
|
|
13
|
+
import * as CollapsiblePrimitive from '@radix-ui/react-collapsible';
|
|
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 { useFormContext, FormProvider, Controller } from 'react-hook-form';
|
|
18
|
+
import * as LabelPrimitive from '@radix-ui/react-label';
|
|
19
|
+
import * as SelectPrimitive from '@radix-ui/react-select';
|
|
20
|
+
import * as PopoverPrimitive from '@radix-ui/react-popover';
|
|
21
|
+
import * as ProgressPrimitive from '@radix-ui/react-progress';
|
|
22
|
+
import * as RadioGroupPrimitive from '@radix-ui/react-radio-group';
|
|
23
|
+
import * as ScrollAreaPrimitive from '@radix-ui/react-scroll-area';
|
|
24
|
+
import * as SeparatorPrimitive from '@radix-ui/react-separator';
|
|
25
|
+
import { useTheme } from 'next-themes';
|
|
26
|
+
import { Toaster as Toaster$1 } from 'sonner';
|
|
27
|
+
import * as SwitchPrimitives from '@radix-ui/react-switch';
|
|
28
|
+
import * as TabsPrimitive from '@radix-ui/react-tabs';
|
|
29
|
+
import * as ToastPrimitives from '@radix-ui/react-toast';
|
|
30
|
+
import * as TogglePrimitive from '@radix-ui/react-toggle';
|
|
31
|
+
import * as ToggleGroupPrimitive from '@radix-ui/react-toggle-group';
|
|
32
|
+
|
|
33
|
+
var alertVariants = cva(
|
|
34
|
+
"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",
|
|
35
|
+
{
|
|
36
|
+
variants: {
|
|
37
|
+
variant: {
|
|
38
|
+
default: "bg-background text-foreground",
|
|
39
|
+
destructive: "border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive"
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
defaultVariants: {
|
|
43
|
+
variant: "default"
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
);
|
|
47
|
+
var Alert = React5.forwardRef(({ className, variant, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
48
|
+
"div",
|
|
49
|
+
{
|
|
50
|
+
ref,
|
|
51
|
+
role: "alert",
|
|
52
|
+
className: cn(alertVariants({ variant }), className),
|
|
53
|
+
...props
|
|
54
|
+
}
|
|
55
|
+
));
|
|
56
|
+
Alert.displayName = "Alert";
|
|
57
|
+
var AlertTitle = React5.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
58
|
+
"h5",
|
|
59
|
+
{
|
|
60
|
+
ref,
|
|
61
|
+
className: cn("mb-1 font-medium leading-none tracking-tight", className),
|
|
62
|
+
...props
|
|
63
|
+
}
|
|
64
|
+
));
|
|
65
|
+
AlertTitle.displayName = "AlertTitle";
|
|
66
|
+
var AlertDescription = React5.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
67
|
+
"div",
|
|
68
|
+
{
|
|
69
|
+
ref,
|
|
70
|
+
className: cn("text-sm [&_p]:leading-relaxed", className),
|
|
71
|
+
...props
|
|
72
|
+
}
|
|
73
|
+
));
|
|
74
|
+
AlertDescription.displayName = "AlertDescription";
|
|
75
|
+
var Avatar = React5.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
76
|
+
AvatarPrimitive.Root,
|
|
77
|
+
{
|
|
78
|
+
ref,
|
|
79
|
+
className: cn(
|
|
80
|
+
"relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",
|
|
81
|
+
className
|
|
82
|
+
),
|
|
83
|
+
...props
|
|
84
|
+
}
|
|
85
|
+
));
|
|
86
|
+
Avatar.displayName = AvatarPrimitive.Root.displayName;
|
|
87
|
+
var AvatarImage = React5.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
88
|
+
AvatarPrimitive.Image,
|
|
89
|
+
{
|
|
90
|
+
ref,
|
|
91
|
+
className: cn("aspect-square h-full w-full", className),
|
|
92
|
+
...props
|
|
93
|
+
}
|
|
94
|
+
));
|
|
95
|
+
AvatarImage.displayName = AvatarPrimitive.Image.displayName;
|
|
96
|
+
var AvatarFallback = React5.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
97
|
+
AvatarPrimitive.Fallback,
|
|
98
|
+
{
|
|
99
|
+
ref,
|
|
100
|
+
className: cn(
|
|
101
|
+
"flex h-full w-full items-center justify-center rounded-full bg-muted",
|
|
102
|
+
className
|
|
103
|
+
),
|
|
104
|
+
...props
|
|
105
|
+
}
|
|
106
|
+
));
|
|
107
|
+
AvatarFallback.displayName = AvatarPrimitive.Fallback.displayName;
|
|
108
|
+
var badgeVariants = cva(
|
|
109
|
+
"inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",
|
|
110
|
+
{
|
|
111
|
+
variants: {
|
|
112
|
+
variant: {
|
|
113
|
+
default: "border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80",
|
|
114
|
+
secondary: "border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",
|
|
115
|
+
destructive: "border-transparent bg-destructive text-white shadow hover:bg-destructive/80",
|
|
116
|
+
outline: "text-foreground"
|
|
117
|
+
}
|
|
118
|
+
},
|
|
119
|
+
defaultVariants: {
|
|
120
|
+
variant: "default"
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
);
|
|
124
|
+
function Badge({ className, variant, ...props }) {
|
|
125
|
+
return /* @__PURE__ */ jsx("div", { className: cn(badgeVariants({ variant }), className), ...props });
|
|
126
|
+
}
|
|
127
|
+
function Breadcrumb({ ...props }) {
|
|
128
|
+
return /* @__PURE__ */ jsx("nav", { "aria-label": "breadcrumb", "data-slot": "breadcrumb", ...props });
|
|
129
|
+
}
|
|
130
|
+
function BreadcrumbList({ className, ...props }) {
|
|
131
|
+
return /* @__PURE__ */ jsx(
|
|
132
|
+
"ol",
|
|
133
|
+
{
|
|
134
|
+
"data-slot": "breadcrumb-list",
|
|
135
|
+
className: cn(
|
|
136
|
+
"text-muted-foreground flex flex-wrap items-center gap-1.5 text-sm break-words sm:gap-2.5",
|
|
137
|
+
className
|
|
138
|
+
),
|
|
139
|
+
...props
|
|
140
|
+
}
|
|
141
|
+
);
|
|
142
|
+
}
|
|
143
|
+
function BreadcrumbItem({ className, ...props }) {
|
|
144
|
+
return /* @__PURE__ */ jsx(
|
|
145
|
+
"li",
|
|
146
|
+
{
|
|
147
|
+
"data-slot": "breadcrumb-item",
|
|
148
|
+
className: cn("inline-flex items-center gap-1.5", className),
|
|
149
|
+
...props
|
|
150
|
+
}
|
|
151
|
+
);
|
|
152
|
+
}
|
|
153
|
+
function BreadcrumbLink({
|
|
154
|
+
asChild,
|
|
155
|
+
className,
|
|
156
|
+
...props
|
|
157
|
+
}) {
|
|
158
|
+
const Comp = asChild ? Slot : "a";
|
|
159
|
+
return /* @__PURE__ */ jsx(
|
|
160
|
+
Comp,
|
|
161
|
+
{
|
|
162
|
+
"data-slot": "breadcrumb-link",
|
|
163
|
+
className: cn("hover:text-foreground transition-colors", className),
|
|
164
|
+
...props
|
|
165
|
+
}
|
|
166
|
+
);
|
|
167
|
+
}
|
|
168
|
+
function BreadcrumbPage({ className, ...props }) {
|
|
169
|
+
return /* @__PURE__ */ jsx(
|
|
170
|
+
"span",
|
|
171
|
+
{
|
|
172
|
+
"data-slot": "breadcrumb-page",
|
|
173
|
+
role: "link",
|
|
174
|
+
"aria-disabled": "true",
|
|
175
|
+
"aria-current": "page",
|
|
176
|
+
className: cn("text-foreground font-normal", className),
|
|
177
|
+
...props
|
|
178
|
+
}
|
|
179
|
+
);
|
|
180
|
+
}
|
|
181
|
+
function BreadcrumbSeparator({
|
|
182
|
+
children,
|
|
183
|
+
className,
|
|
184
|
+
...props
|
|
185
|
+
}) {
|
|
186
|
+
return /* @__PURE__ */ jsx(
|
|
187
|
+
"li",
|
|
188
|
+
{
|
|
189
|
+
"data-slot": "breadcrumb-separator",
|
|
190
|
+
role: "presentation",
|
|
191
|
+
"aria-hidden": "true",
|
|
192
|
+
className: cn("[&>svg]:size-3.5", className),
|
|
193
|
+
...props,
|
|
194
|
+
children: children ?? /* @__PURE__ */ jsx(ChevronRight, {})
|
|
195
|
+
}
|
|
196
|
+
);
|
|
197
|
+
}
|
|
198
|
+
function BreadcrumbEllipsis({
|
|
199
|
+
className,
|
|
200
|
+
...props
|
|
201
|
+
}) {
|
|
202
|
+
return /* @__PURE__ */ jsxs(
|
|
203
|
+
"span",
|
|
204
|
+
{
|
|
205
|
+
"data-slot": "breadcrumb-ellipsis",
|
|
206
|
+
role: "presentation",
|
|
207
|
+
"aria-hidden": "true",
|
|
208
|
+
className: cn("flex size-9 items-center justify-center", className),
|
|
209
|
+
...props,
|
|
210
|
+
children: [
|
|
211
|
+
/* @__PURE__ */ jsx(MoreHorizontal, { className: "size-4" }),
|
|
212
|
+
/* @__PURE__ */ jsx("span", { className: "sr-only", children: "More" })
|
|
213
|
+
]
|
|
214
|
+
}
|
|
215
|
+
);
|
|
216
|
+
}
|
|
217
|
+
var buttonVariants = cva(
|
|
218
|
+
"kylan cursor-pointer inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
|
|
219
|
+
{
|
|
220
|
+
variants: {
|
|
221
|
+
variant: {
|
|
222
|
+
default: "bg-primary text-primary-foreground shadow hover:bg-primary/90",
|
|
223
|
+
destructive: "bg-destructive text-white shadow-sm hover:bg-destructive/90",
|
|
224
|
+
outline: "border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",
|
|
225
|
+
secondary: "bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",
|
|
226
|
+
ghost: "hover:bg-accent hover:text-accent-foreground",
|
|
227
|
+
link: "text-primary underline-offset-4 hover:underline"
|
|
228
|
+
},
|
|
229
|
+
size: {
|
|
230
|
+
default: "h-9 px-4 py-2",
|
|
231
|
+
sm: "h-8 rounded-md px-3 text-xs",
|
|
232
|
+
lg: "h-10 rounded-md px-8",
|
|
233
|
+
icon: "h-9 w-9"
|
|
234
|
+
}
|
|
235
|
+
},
|
|
236
|
+
defaultVariants: {
|
|
237
|
+
variant: "default",
|
|
238
|
+
size: "default"
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
);
|
|
242
|
+
var Button = React5.forwardRef(
|
|
243
|
+
({ className, variant, size, asChild = false, ...props }, ref) => {
|
|
244
|
+
const Comp = asChild ? Slot : "button";
|
|
245
|
+
return /* @__PURE__ */ jsx(
|
|
246
|
+
Comp,
|
|
247
|
+
{
|
|
248
|
+
className: cn(buttonVariants({ variant, size, className })),
|
|
249
|
+
ref,
|
|
250
|
+
...props
|
|
251
|
+
}
|
|
252
|
+
);
|
|
253
|
+
}
|
|
254
|
+
);
|
|
255
|
+
Button.displayName = "Button";
|
|
256
|
+
var Card = React5.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
257
|
+
"div",
|
|
258
|
+
{
|
|
259
|
+
ref,
|
|
260
|
+
className: cn(
|
|
261
|
+
"rounded-xl border bg-card text-card-foreground shadow",
|
|
262
|
+
className
|
|
263
|
+
),
|
|
264
|
+
...props
|
|
265
|
+
}
|
|
266
|
+
));
|
|
267
|
+
Card.displayName = "Card";
|
|
268
|
+
var CardHeader = React5.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
269
|
+
"div",
|
|
270
|
+
{
|
|
271
|
+
ref,
|
|
272
|
+
className: cn("flex flex-col space-y-1.5 p-6", className),
|
|
273
|
+
...props
|
|
274
|
+
}
|
|
275
|
+
));
|
|
276
|
+
CardHeader.displayName = "CardHeader";
|
|
277
|
+
var CardTitle = React5.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
278
|
+
"div",
|
|
279
|
+
{
|
|
280
|
+
ref,
|
|
281
|
+
className: cn("font-semibold leading-none tracking-tight", className),
|
|
282
|
+
...props
|
|
283
|
+
}
|
|
284
|
+
));
|
|
285
|
+
CardTitle.displayName = "CardTitle";
|
|
286
|
+
var CardDescription = React5.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
287
|
+
"div",
|
|
288
|
+
{
|
|
289
|
+
ref,
|
|
290
|
+
className: cn("text-sm text-muted-foreground", className),
|
|
291
|
+
...props
|
|
292
|
+
}
|
|
293
|
+
));
|
|
294
|
+
CardDescription.displayName = "CardDescription";
|
|
295
|
+
var CardContent = React5.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("p-6 pt-0", className), ...props }));
|
|
296
|
+
CardContent.displayName = "CardContent";
|
|
297
|
+
var CardFooter = React5.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
298
|
+
"div",
|
|
299
|
+
{
|
|
300
|
+
ref,
|
|
301
|
+
className: cn("flex items-center p-6 pt-0", className),
|
|
302
|
+
...props
|
|
303
|
+
}
|
|
304
|
+
));
|
|
305
|
+
CardFooter.displayName = "CardFooter";
|
|
306
|
+
var CarouselContext = React5.createContext(null);
|
|
307
|
+
function useCarousel() {
|
|
308
|
+
const context = React5.useContext(CarouselContext);
|
|
309
|
+
if (!context) {
|
|
310
|
+
throw new Error("useCarousel must be used within a <Carousel />");
|
|
311
|
+
}
|
|
312
|
+
return context;
|
|
313
|
+
}
|
|
314
|
+
function Carousel({
|
|
315
|
+
orientation = "horizontal",
|
|
316
|
+
opts,
|
|
317
|
+
setApi,
|
|
318
|
+
plugins,
|
|
319
|
+
className,
|
|
320
|
+
children,
|
|
321
|
+
...props
|
|
322
|
+
}) {
|
|
323
|
+
const [carouselRef, api] = useEmblaCarousel(
|
|
324
|
+
{
|
|
325
|
+
...opts,
|
|
326
|
+
axis: orientation === "horizontal" ? "x" : "y"
|
|
327
|
+
},
|
|
328
|
+
plugins
|
|
329
|
+
);
|
|
330
|
+
const [canScrollPrev, setCanScrollPrev] = React5.useState(false);
|
|
331
|
+
const [canScrollNext, setCanScrollNext] = React5.useState(false);
|
|
332
|
+
const onSelect = React5.useCallback((api2) => {
|
|
333
|
+
if (!api2) return;
|
|
334
|
+
setCanScrollPrev(api2.canScrollPrev());
|
|
335
|
+
setCanScrollNext(api2.canScrollNext());
|
|
336
|
+
}, []);
|
|
337
|
+
const scrollPrev = React5.useCallback(() => {
|
|
338
|
+
api?.scrollPrev();
|
|
339
|
+
}, [api]);
|
|
340
|
+
const scrollNext = React5.useCallback(() => {
|
|
341
|
+
api?.scrollNext();
|
|
342
|
+
}, [api]);
|
|
343
|
+
const handleKeyDown = React5.useCallback(
|
|
344
|
+
(event) => {
|
|
345
|
+
if (event.key === "ArrowLeft") {
|
|
346
|
+
event.preventDefault();
|
|
347
|
+
scrollPrev();
|
|
348
|
+
} else if (event.key === "ArrowRight") {
|
|
349
|
+
event.preventDefault();
|
|
350
|
+
scrollNext();
|
|
351
|
+
}
|
|
352
|
+
},
|
|
353
|
+
[scrollPrev, scrollNext]
|
|
354
|
+
);
|
|
355
|
+
React5.useEffect(() => {
|
|
356
|
+
if (!api || !setApi) return;
|
|
357
|
+
setApi(api);
|
|
358
|
+
}, [api, setApi]);
|
|
359
|
+
React5.useEffect(() => {
|
|
360
|
+
if (!api) return;
|
|
361
|
+
onSelect(api);
|
|
362
|
+
api.on("reInit", onSelect);
|
|
363
|
+
api.on("select", onSelect);
|
|
364
|
+
return () => {
|
|
365
|
+
api?.off("select", onSelect);
|
|
366
|
+
};
|
|
367
|
+
}, [api, onSelect]);
|
|
368
|
+
return /* @__PURE__ */ jsx(
|
|
369
|
+
CarouselContext.Provider,
|
|
370
|
+
{
|
|
371
|
+
value: {
|
|
372
|
+
carouselRef,
|
|
373
|
+
api,
|
|
374
|
+
opts,
|
|
375
|
+
orientation: orientation || (opts?.axis === "y" ? "vertical" : "horizontal"),
|
|
376
|
+
scrollPrev,
|
|
377
|
+
scrollNext,
|
|
378
|
+
canScrollPrev,
|
|
379
|
+
canScrollNext
|
|
380
|
+
},
|
|
381
|
+
children: /* @__PURE__ */ jsx(
|
|
382
|
+
"div",
|
|
383
|
+
{
|
|
384
|
+
onKeyDownCapture: handleKeyDown,
|
|
385
|
+
className: cn("relative", className),
|
|
386
|
+
role: "region",
|
|
387
|
+
"aria-roledescription": "carousel",
|
|
388
|
+
"data-slot": "carousel",
|
|
389
|
+
...props,
|
|
390
|
+
children
|
|
391
|
+
}
|
|
392
|
+
)
|
|
393
|
+
}
|
|
394
|
+
);
|
|
395
|
+
}
|
|
396
|
+
function CarouselContent({ className, ...props }) {
|
|
397
|
+
const { carouselRef, orientation } = useCarousel();
|
|
398
|
+
return /* @__PURE__ */ jsx(
|
|
399
|
+
"div",
|
|
400
|
+
{
|
|
401
|
+
ref: carouselRef,
|
|
402
|
+
className: "overflow-hidden",
|
|
403
|
+
"data-slot": "carousel-content",
|
|
404
|
+
children: /* @__PURE__ */ jsx(
|
|
405
|
+
"div",
|
|
406
|
+
{
|
|
407
|
+
className: cn(
|
|
408
|
+
"flex",
|
|
409
|
+
orientation === "horizontal" ? "-ml-4" : "-mt-4 flex-col",
|
|
410
|
+
className
|
|
411
|
+
),
|
|
412
|
+
...props
|
|
413
|
+
}
|
|
414
|
+
)
|
|
415
|
+
}
|
|
416
|
+
);
|
|
417
|
+
}
|
|
418
|
+
function CarouselItem({ className, ...props }) {
|
|
419
|
+
const { orientation } = useCarousel();
|
|
420
|
+
return /* @__PURE__ */ jsx(
|
|
421
|
+
"div",
|
|
422
|
+
{
|
|
423
|
+
role: "group",
|
|
424
|
+
"aria-roledescription": "slide",
|
|
425
|
+
"data-slot": "carousel-item",
|
|
426
|
+
className: cn(
|
|
427
|
+
"min-w-0 shrink-0 grow-0 basis-full",
|
|
428
|
+
orientation === "horizontal" ? "pl-4" : "pt-4",
|
|
429
|
+
className
|
|
430
|
+
),
|
|
431
|
+
...props
|
|
432
|
+
}
|
|
433
|
+
);
|
|
434
|
+
}
|
|
435
|
+
function CarouselPrevious({
|
|
436
|
+
className,
|
|
437
|
+
variant = "outline",
|
|
438
|
+
size = "icon",
|
|
439
|
+
...props
|
|
440
|
+
}) {
|
|
441
|
+
const { orientation, scrollPrev, canScrollPrev } = useCarousel();
|
|
442
|
+
return /* @__PURE__ */ jsxs(
|
|
443
|
+
Button,
|
|
444
|
+
{
|
|
445
|
+
"data-slot": "carousel-previous",
|
|
446
|
+
variant,
|
|
447
|
+
size,
|
|
448
|
+
className: cn(
|
|
449
|
+
"absolute size-8 rounded-full",
|
|
450
|
+
orientation === "horizontal" ? "top-1/2 -left-8 -translate-y-1/2" : "-top-12 left-1/2 -translate-x-1/2 rotate-90",
|
|
451
|
+
className
|
|
452
|
+
),
|
|
453
|
+
disabled: !canScrollPrev,
|
|
454
|
+
onClick: scrollPrev,
|
|
455
|
+
...props,
|
|
456
|
+
children: [
|
|
457
|
+
/* @__PURE__ */ jsx(ArrowLeft, {}),
|
|
458
|
+
/* @__PURE__ */ jsx("span", { className: "sr-only", children: "Previous slide" })
|
|
459
|
+
]
|
|
460
|
+
}
|
|
461
|
+
);
|
|
462
|
+
}
|
|
463
|
+
function CarouselNext({
|
|
464
|
+
className,
|
|
465
|
+
variant = "outline",
|
|
466
|
+
size = "icon",
|
|
467
|
+
...props
|
|
468
|
+
}) {
|
|
469
|
+
const { orientation, scrollNext, canScrollNext } = useCarousel();
|
|
470
|
+
return /* @__PURE__ */ jsxs(
|
|
471
|
+
Button,
|
|
472
|
+
{
|
|
473
|
+
"data-slot": "carousel-next",
|
|
474
|
+
variant,
|
|
475
|
+
size,
|
|
476
|
+
className: cn(
|
|
477
|
+
"absolute size-8 rounded-full",
|
|
478
|
+
orientation === "horizontal" ? "top-1/2 -right-8 -translate-y-1/2" : "-bottom-12 left-1/2 -translate-x-1/2 rotate-90",
|
|
479
|
+
className
|
|
480
|
+
),
|
|
481
|
+
disabled: !canScrollNext,
|
|
482
|
+
onClick: scrollNext,
|
|
483
|
+
...props,
|
|
484
|
+
children: [
|
|
485
|
+
/* @__PURE__ */ jsx(ArrowRight, {}),
|
|
486
|
+
/* @__PURE__ */ jsx("span", { className: "sr-only", children: "Next slide" })
|
|
487
|
+
]
|
|
488
|
+
}
|
|
489
|
+
);
|
|
490
|
+
}
|
|
491
|
+
var THEMES = { light: "", dark: ".dark" };
|
|
492
|
+
var ChartContext = React5.createContext(null);
|
|
493
|
+
function useChart() {
|
|
494
|
+
const context = React5.useContext(ChartContext);
|
|
495
|
+
if (!context) {
|
|
496
|
+
throw new Error("useChart must be used within a <ChartContainer />");
|
|
497
|
+
}
|
|
498
|
+
return context;
|
|
499
|
+
}
|
|
500
|
+
function ChartContainer({
|
|
501
|
+
id,
|
|
502
|
+
className,
|
|
503
|
+
children,
|
|
504
|
+
config,
|
|
505
|
+
...props
|
|
506
|
+
}) {
|
|
507
|
+
const uniqueId = React5.useId();
|
|
508
|
+
const chartId = `chart-${id || uniqueId.replace(/:/g, "")}`;
|
|
509
|
+
return /* @__PURE__ */ jsx(ChartContext.Provider, { value: { config }, children: /* @__PURE__ */ jsxs(
|
|
510
|
+
"div",
|
|
511
|
+
{
|
|
512
|
+
"data-slot": "chart",
|
|
513
|
+
"data-chart": chartId,
|
|
514
|
+
className: cn(
|
|
515
|
+
"[&_.recharts-cartesian-axis-tick_text]:fill-muted-foreground [&_.recharts-cartesian-grid_line[stroke='#ccc']]:stroke-border/50 [&_.recharts-curve.recharts-tooltip-cursor]:stroke-border [&_.recharts-polar-grid_[stroke='#ccc']]:stroke-border [&_.recharts-radial-bar-background-sector]:fill-muted [&_.recharts-rectangle.recharts-tooltip-cursor]:fill-muted [&_.recharts-reference-line_[stroke='#ccc']]:stroke-border flex aspect-video justify-center text-xs [&_.recharts-dot[stroke='#fff']]:stroke-transparent [&_.recharts-layer]:outline-hidden [&_.recharts-sector]:outline-hidden [&_.recharts-sector[stroke='#fff']]:stroke-transparent [&_.recharts-surface]:outline-hidden",
|
|
516
|
+
className
|
|
517
|
+
),
|
|
518
|
+
...props,
|
|
519
|
+
children: [
|
|
520
|
+
/* @__PURE__ */ jsx(ChartStyle, { id: chartId, config }),
|
|
521
|
+
/* @__PURE__ */ jsx(RechartsPrimitive.ResponsiveContainer, { children })
|
|
522
|
+
]
|
|
523
|
+
}
|
|
524
|
+
) });
|
|
525
|
+
}
|
|
526
|
+
var ChartStyle = ({ id, config }) => {
|
|
527
|
+
const colorConfig = Object.entries(config).filter(
|
|
528
|
+
([, config2]) => config2.theme || config2.color
|
|
529
|
+
);
|
|
530
|
+
if (!colorConfig.length) {
|
|
531
|
+
return null;
|
|
532
|
+
}
|
|
533
|
+
return /* @__PURE__ */ jsx(
|
|
534
|
+
"style",
|
|
535
|
+
{
|
|
536
|
+
dangerouslySetInnerHTML: {
|
|
537
|
+
__html: Object.entries(THEMES).map(
|
|
538
|
+
([theme, prefix]) => `
|
|
539
|
+
${prefix} [data-chart=${id}] {
|
|
540
|
+
${colorConfig.map(([key, itemConfig]) => {
|
|
541
|
+
const color = itemConfig.theme?.[theme] || itemConfig.color;
|
|
542
|
+
return color ? ` --color-${key}: ${color};` : null;
|
|
543
|
+
}).join("\n")}
|
|
544
|
+
}
|
|
545
|
+
`
|
|
546
|
+
).join("\n")
|
|
547
|
+
}
|
|
548
|
+
}
|
|
549
|
+
);
|
|
550
|
+
};
|
|
551
|
+
var ChartTooltip = RechartsPrimitive.Tooltip;
|
|
552
|
+
function ChartTooltipContent({
|
|
553
|
+
active,
|
|
554
|
+
payload,
|
|
555
|
+
className,
|
|
556
|
+
indicator = "dot",
|
|
557
|
+
hideLabel = false,
|
|
558
|
+
hideIndicator = false,
|
|
559
|
+
label,
|
|
560
|
+
labelFormatter,
|
|
561
|
+
labelClassName,
|
|
562
|
+
formatter,
|
|
563
|
+
color,
|
|
564
|
+
nameKey,
|
|
565
|
+
labelKey
|
|
566
|
+
}) {
|
|
567
|
+
const { config } = useChart();
|
|
568
|
+
const tooltipLabel = React5.useMemo(() => {
|
|
569
|
+
if (hideLabel || !payload?.length) {
|
|
570
|
+
return null;
|
|
571
|
+
}
|
|
572
|
+
const [item] = payload;
|
|
573
|
+
const key = `${labelKey || item?.dataKey || item?.name || "value"}`;
|
|
574
|
+
const itemConfig = getPayloadConfigFromPayload(config, item, key);
|
|
575
|
+
const value = !labelKey && typeof label === "string" ? config[label]?.label || label : itemConfig?.label;
|
|
576
|
+
if (labelFormatter) {
|
|
577
|
+
return /* @__PURE__ */ jsx("div", { className: cn("font-medium", labelClassName), children: labelFormatter(value, payload) });
|
|
578
|
+
}
|
|
579
|
+
if (!value) {
|
|
580
|
+
return null;
|
|
581
|
+
}
|
|
582
|
+
return /* @__PURE__ */ jsx("div", { className: cn("font-medium", labelClassName), children: value });
|
|
583
|
+
}, [
|
|
584
|
+
label,
|
|
585
|
+
labelFormatter,
|
|
586
|
+
payload,
|
|
587
|
+
hideLabel,
|
|
588
|
+
labelClassName,
|
|
589
|
+
config,
|
|
590
|
+
labelKey
|
|
591
|
+
]);
|
|
592
|
+
if (!active || !payload?.length) {
|
|
593
|
+
return null;
|
|
594
|
+
}
|
|
595
|
+
const nestLabel = payload.length === 1 && indicator !== "dot";
|
|
596
|
+
return /* @__PURE__ */ jsxs(
|
|
597
|
+
"div",
|
|
598
|
+
{
|
|
599
|
+
className: cn(
|
|
600
|
+
"border-border/50 bg-background grid min-w-[8rem] items-start gap-1.5 rounded-lg border px-2.5 py-1.5 text-xs shadow-xl",
|
|
601
|
+
className
|
|
602
|
+
),
|
|
603
|
+
children: [
|
|
604
|
+
!nestLabel ? tooltipLabel : null,
|
|
605
|
+
/* @__PURE__ */ jsx("div", { className: "grid gap-1.5", children: payload.map((item, index) => {
|
|
606
|
+
const key = `${nameKey || item.name || item.dataKey || "value"}`;
|
|
607
|
+
const itemConfig = getPayloadConfigFromPayload(config, item, key);
|
|
608
|
+
const indicatorColor = color || item.payload.fill || item.color;
|
|
609
|
+
return /* @__PURE__ */ jsx(
|
|
610
|
+
"div",
|
|
611
|
+
{
|
|
612
|
+
className: cn(
|
|
613
|
+
"[&>svg]:text-muted-foreground flex w-full flex-wrap items-stretch gap-2 [&>svg]:h-2.5 [&>svg]:w-2.5",
|
|
614
|
+
indicator === "dot" && "items-center"
|
|
615
|
+
),
|
|
616
|
+
children: formatter && item?.value !== void 0 && item.name ? formatter(item.value, item.name, item, index, item.payload) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
617
|
+
itemConfig?.icon ? /* @__PURE__ */ jsx(itemConfig.icon, {}) : !hideIndicator && /* @__PURE__ */ jsx(
|
|
618
|
+
"div",
|
|
619
|
+
{
|
|
620
|
+
className: cn(
|
|
621
|
+
"shrink-0 rounded-[2px] border-(--color-border) bg-(--color-bg)",
|
|
622
|
+
{
|
|
623
|
+
"h-2.5 w-2.5": indicator === "dot",
|
|
624
|
+
"w-1": indicator === "line",
|
|
625
|
+
"w-0 border-[1.5px] border-dashed bg-transparent": indicator === "dashed",
|
|
626
|
+
"my-0.5": nestLabel && indicator === "dashed"
|
|
627
|
+
}
|
|
628
|
+
),
|
|
629
|
+
style: {
|
|
630
|
+
"--color-bg": indicatorColor,
|
|
631
|
+
"--color-border": indicatorColor
|
|
632
|
+
}
|
|
633
|
+
}
|
|
634
|
+
),
|
|
635
|
+
/* @__PURE__ */ jsxs(
|
|
636
|
+
"div",
|
|
637
|
+
{
|
|
638
|
+
className: cn(
|
|
639
|
+
"flex flex-1 justify-between leading-none",
|
|
640
|
+
nestLabel ? "items-end" : "items-center"
|
|
641
|
+
),
|
|
642
|
+
children: [
|
|
643
|
+
/* @__PURE__ */ jsxs("div", { className: "grid gap-1.5", children: [
|
|
644
|
+
nestLabel ? tooltipLabel : null,
|
|
645
|
+
/* @__PURE__ */ jsx("span", { className: "text-muted-foreground", children: itemConfig?.label || item.name })
|
|
646
|
+
] }),
|
|
647
|
+
item.value && /* @__PURE__ */ jsx("span", { className: "text-foreground font-mono font-medium tabular-nums", children: item.value.toLocaleString() })
|
|
648
|
+
]
|
|
649
|
+
}
|
|
650
|
+
)
|
|
651
|
+
] })
|
|
652
|
+
},
|
|
653
|
+
item.dataKey
|
|
654
|
+
);
|
|
655
|
+
}) })
|
|
656
|
+
]
|
|
657
|
+
}
|
|
658
|
+
);
|
|
659
|
+
}
|
|
660
|
+
var ChartLegend = RechartsPrimitive.Legend;
|
|
661
|
+
function ChartLegendContent({
|
|
662
|
+
className,
|
|
663
|
+
hideIcon = false,
|
|
664
|
+
payload,
|
|
665
|
+
verticalAlign = "bottom",
|
|
666
|
+
nameKey
|
|
667
|
+
}) {
|
|
668
|
+
const { config } = useChart();
|
|
669
|
+
if (!payload?.length) {
|
|
670
|
+
return null;
|
|
671
|
+
}
|
|
672
|
+
return /* @__PURE__ */ jsx(
|
|
673
|
+
"div",
|
|
674
|
+
{
|
|
675
|
+
className: cn(
|
|
676
|
+
"flex items-center justify-center gap-4",
|
|
677
|
+
verticalAlign === "top" ? "pb-3" : "pt-3",
|
|
678
|
+
className
|
|
679
|
+
),
|
|
680
|
+
children: payload.map((item) => {
|
|
681
|
+
const key = `${nameKey || item.dataKey || "value"}`;
|
|
682
|
+
const itemConfig = getPayloadConfigFromPayload(config, item, key);
|
|
683
|
+
return /* @__PURE__ */ jsxs(
|
|
684
|
+
"div",
|
|
685
|
+
{
|
|
686
|
+
className: cn(
|
|
687
|
+
"[&>svg]:text-muted-foreground flex items-center gap-1.5 [&>svg]:h-3 [&>svg]:w-3"
|
|
688
|
+
),
|
|
689
|
+
children: [
|
|
690
|
+
itemConfig?.icon && !hideIcon ? /* @__PURE__ */ jsx(itemConfig.icon, {}) : /* @__PURE__ */ jsx(
|
|
691
|
+
"div",
|
|
692
|
+
{
|
|
693
|
+
className: "h-2 w-2 shrink-0 rounded-[2px]",
|
|
694
|
+
style: {
|
|
695
|
+
backgroundColor: item.color
|
|
696
|
+
}
|
|
697
|
+
}
|
|
698
|
+
),
|
|
699
|
+
itemConfig?.label
|
|
700
|
+
]
|
|
701
|
+
},
|
|
702
|
+
item.value
|
|
703
|
+
);
|
|
704
|
+
})
|
|
705
|
+
}
|
|
706
|
+
);
|
|
707
|
+
}
|
|
708
|
+
function getPayloadConfigFromPayload(config, payload, key) {
|
|
709
|
+
if (typeof payload !== "object" || payload === null) {
|
|
710
|
+
return void 0;
|
|
711
|
+
}
|
|
712
|
+
const payloadPayload = "payload" in payload && typeof payload.payload === "object" && payload.payload !== null ? payload.payload : void 0;
|
|
713
|
+
let configLabelKey = key;
|
|
714
|
+
if (key in payload && typeof payload[key] === "string") {
|
|
715
|
+
configLabelKey = payload[key];
|
|
716
|
+
} else if (payloadPayload && key in payloadPayload && typeof payloadPayload[key] === "string") {
|
|
717
|
+
configLabelKey = payloadPayload[key];
|
|
718
|
+
}
|
|
719
|
+
return configLabelKey in config ? config[configLabelKey] : config[key];
|
|
720
|
+
}
|
|
721
|
+
var Checkbox = React5.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
722
|
+
CheckboxPrimitive.Root,
|
|
723
|
+
{
|
|
724
|
+
ref,
|
|
725
|
+
className: cn(
|
|
726
|
+
"peer h-4 w-4 shrink-0 rounded-sm border border-primary ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",
|
|
727
|
+
className
|
|
728
|
+
),
|
|
729
|
+
...props,
|
|
730
|
+
children: /* @__PURE__ */ jsx(
|
|
731
|
+
CheckboxPrimitive.Indicator,
|
|
732
|
+
{
|
|
733
|
+
className: cn("flex items-center justify-center text-current"),
|
|
734
|
+
children: /* @__PURE__ */ jsx(Check, { className: "h-4 w-4" })
|
|
735
|
+
}
|
|
736
|
+
)
|
|
737
|
+
}
|
|
738
|
+
));
|
|
739
|
+
Checkbox.displayName = CheckboxPrimitive.Root.displayName;
|
|
740
|
+
var Collapsible = CollapsiblePrimitive.Root;
|
|
741
|
+
var CollapsibleTrigger2 = CollapsiblePrimitive.CollapsibleTrigger;
|
|
742
|
+
var CollapsibleContent2 = CollapsiblePrimitive.CollapsibleContent;
|
|
743
|
+
var Dialog = DialogPrimitive.Root;
|
|
744
|
+
var DialogTrigger = DialogPrimitive.Trigger;
|
|
745
|
+
var DialogPortal = DialogPrimitive.Portal;
|
|
746
|
+
var DialogClose = DialogPrimitive.Close;
|
|
747
|
+
var DialogOverlay = React5.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
748
|
+
DialogPrimitive.Overlay,
|
|
749
|
+
{
|
|
750
|
+
ref,
|
|
751
|
+
className: cn(
|
|
752
|
+
"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",
|
|
753
|
+
className
|
|
754
|
+
),
|
|
755
|
+
...props
|
|
756
|
+
}
|
|
757
|
+
));
|
|
758
|
+
DialogOverlay.displayName = DialogPrimitive.Overlay.displayName;
|
|
759
|
+
var DialogContent = React5.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(DialogPortal, { children: [
|
|
760
|
+
/* @__PURE__ */ jsx(DialogOverlay, {}),
|
|
761
|
+
/* @__PURE__ */ jsxs(
|
|
762
|
+
DialogPrimitive.Content,
|
|
763
|
+
{
|
|
764
|
+
ref,
|
|
765
|
+
className: cn(
|
|
766
|
+
"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 max-h-[90vh] overflow-hidden",
|
|
767
|
+
className
|
|
768
|
+
),
|
|
769
|
+
...props,
|
|
770
|
+
children: [
|
|
771
|
+
children,
|
|
772
|
+
/* @__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-accent data-[state=open]:text-muted-foreground", children: [
|
|
773
|
+
/* @__PURE__ */ jsx(X, { className: "h-4 w-4" }),
|
|
774
|
+
/* @__PURE__ */ jsx("span", { className: "sr-only", children: "Close" })
|
|
775
|
+
] })
|
|
776
|
+
]
|
|
777
|
+
}
|
|
778
|
+
)
|
|
779
|
+
] }));
|
|
780
|
+
DialogContent.displayName = DialogPrimitive.Content.displayName;
|
|
781
|
+
var DialogHeader = ({
|
|
782
|
+
className,
|
|
783
|
+
...props
|
|
784
|
+
}) => /* @__PURE__ */ jsx(
|
|
785
|
+
"div",
|
|
786
|
+
{
|
|
787
|
+
className: cn(
|
|
788
|
+
"flex flex-col space-y-1.5 text-center sm:text-left",
|
|
789
|
+
className
|
|
790
|
+
),
|
|
791
|
+
...props
|
|
792
|
+
}
|
|
793
|
+
);
|
|
794
|
+
DialogHeader.displayName = "DialogHeader";
|
|
795
|
+
var DialogFooter = ({
|
|
796
|
+
className,
|
|
797
|
+
...props
|
|
798
|
+
}) => /* @__PURE__ */ jsx(
|
|
799
|
+
"div",
|
|
800
|
+
{
|
|
801
|
+
className: cn(
|
|
802
|
+
"flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",
|
|
803
|
+
className
|
|
804
|
+
),
|
|
805
|
+
...props
|
|
806
|
+
}
|
|
807
|
+
);
|
|
808
|
+
DialogFooter.displayName = "DialogFooter";
|
|
809
|
+
var DialogTitle = React5.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
810
|
+
DialogPrimitive.Title,
|
|
811
|
+
{
|
|
812
|
+
ref,
|
|
813
|
+
className: cn(
|
|
814
|
+
"text-lg font-semibold leading-none tracking-tight",
|
|
815
|
+
className
|
|
816
|
+
),
|
|
817
|
+
...props
|
|
818
|
+
}
|
|
819
|
+
));
|
|
820
|
+
DialogTitle.displayName = DialogPrimitive.Title.displayName;
|
|
821
|
+
var DialogDescription = React5.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
822
|
+
DialogPrimitive.Description,
|
|
823
|
+
{
|
|
824
|
+
ref,
|
|
825
|
+
className: cn("text-sm text-muted-foreground", className),
|
|
826
|
+
...props
|
|
827
|
+
}
|
|
828
|
+
));
|
|
829
|
+
DialogDescription.displayName = DialogPrimitive.Description.displayName;
|
|
830
|
+
function Command({
|
|
831
|
+
className,
|
|
832
|
+
...props
|
|
833
|
+
}) {
|
|
834
|
+
return /* @__PURE__ */ jsx(
|
|
835
|
+
Command$1,
|
|
836
|
+
{
|
|
837
|
+
"data-slot": "command",
|
|
838
|
+
className: cn(
|
|
839
|
+
"bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md",
|
|
840
|
+
className
|
|
841
|
+
),
|
|
842
|
+
...props
|
|
843
|
+
}
|
|
844
|
+
);
|
|
845
|
+
}
|
|
846
|
+
function CommandDialog({
|
|
847
|
+
title = "Command Palette",
|
|
848
|
+
description = "Search for a command to run...",
|
|
849
|
+
children,
|
|
850
|
+
className,
|
|
851
|
+
...props
|
|
852
|
+
}) {
|
|
853
|
+
return /* @__PURE__ */ jsxs(Dialog, { ...props, children: [
|
|
854
|
+
/* @__PURE__ */ jsxs(DialogHeader, { className: "sr-only", children: [
|
|
855
|
+
/* @__PURE__ */ jsx(DialogTitle, { children: title }),
|
|
856
|
+
/* @__PURE__ */ jsx(DialogDescription, { children: description })
|
|
857
|
+
] }),
|
|
858
|
+
/* @__PURE__ */ jsx(DialogContent, { className: cn("overflow-hidden p-0", className), children: /* @__PURE__ */ jsx(Command, { className: "[&_[cmdk-group-heading]]:text-muted-foreground **:data-[slot=command-input-wrapper]:h-12 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group]]:px-2 [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5", children }) })
|
|
859
|
+
] });
|
|
860
|
+
}
|
|
861
|
+
function CommandInput({
|
|
862
|
+
className,
|
|
863
|
+
...props
|
|
864
|
+
}) {
|
|
865
|
+
return /* @__PURE__ */ jsxs(
|
|
866
|
+
"div",
|
|
867
|
+
{
|
|
868
|
+
"data-slot": "command-input-wrapper",
|
|
869
|
+
className: "flex h-9 items-center gap-2 border-b px-3",
|
|
870
|
+
children: [
|
|
871
|
+
/* @__PURE__ */ jsx(SearchIcon, { className: "size-4 shrink-0 opacity-50" }),
|
|
872
|
+
/* @__PURE__ */ jsx(
|
|
873
|
+
Command$1.Input,
|
|
874
|
+
{
|
|
875
|
+
"data-slot": "command-input",
|
|
876
|
+
className: cn(
|
|
877
|
+
"placeholder:text-muted-foreground flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50",
|
|
878
|
+
className
|
|
879
|
+
),
|
|
880
|
+
...props
|
|
881
|
+
}
|
|
882
|
+
)
|
|
883
|
+
]
|
|
884
|
+
}
|
|
885
|
+
);
|
|
886
|
+
}
|
|
887
|
+
function CommandList({
|
|
888
|
+
className,
|
|
889
|
+
...props
|
|
890
|
+
}) {
|
|
891
|
+
return /* @__PURE__ */ jsx(
|
|
892
|
+
Command$1.List,
|
|
893
|
+
{
|
|
894
|
+
"data-slot": "command-list",
|
|
895
|
+
className: cn(
|
|
896
|
+
"max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto",
|
|
897
|
+
className
|
|
898
|
+
),
|
|
899
|
+
...props
|
|
900
|
+
}
|
|
901
|
+
);
|
|
902
|
+
}
|
|
903
|
+
function CommandEmpty({
|
|
904
|
+
...props
|
|
905
|
+
}) {
|
|
906
|
+
return /* @__PURE__ */ jsx(
|
|
907
|
+
Command$1.Empty,
|
|
908
|
+
{
|
|
909
|
+
"data-slot": "command-empty",
|
|
910
|
+
className: "py-6 text-center text-sm",
|
|
911
|
+
...props
|
|
912
|
+
}
|
|
913
|
+
);
|
|
914
|
+
}
|
|
915
|
+
function CommandGroup({
|
|
916
|
+
className,
|
|
917
|
+
...props
|
|
918
|
+
}) {
|
|
919
|
+
return /* @__PURE__ */ jsx(
|
|
920
|
+
Command$1.Group,
|
|
921
|
+
{
|
|
922
|
+
"data-slot": "command-group",
|
|
923
|
+
className: cn(
|
|
924
|
+
"text-foreground [&_[cmdk-group-heading]]:text-muted-foreground overflow-hidden p-1 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium",
|
|
925
|
+
className
|
|
926
|
+
),
|
|
927
|
+
...props
|
|
928
|
+
}
|
|
929
|
+
);
|
|
930
|
+
}
|
|
931
|
+
function CommandSeparator({
|
|
932
|
+
className,
|
|
933
|
+
...props
|
|
934
|
+
}) {
|
|
935
|
+
return /* @__PURE__ */ jsx(
|
|
936
|
+
Command$1.Separator,
|
|
937
|
+
{
|
|
938
|
+
"data-slot": "command-separator",
|
|
939
|
+
className: cn("bg-border -mx-1 h-px", className),
|
|
940
|
+
...props
|
|
941
|
+
}
|
|
942
|
+
);
|
|
943
|
+
}
|
|
944
|
+
function CommandItem({
|
|
945
|
+
className,
|
|
946
|
+
...props
|
|
947
|
+
}) {
|
|
948
|
+
return /* @__PURE__ */ jsx(
|
|
949
|
+
Command$1.Item,
|
|
950
|
+
{
|
|
951
|
+
"data-slot": "command-item",
|
|
952
|
+
className: cn(
|
|
953
|
+
"data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
954
|
+
className
|
|
955
|
+
),
|
|
956
|
+
...props
|
|
957
|
+
}
|
|
958
|
+
);
|
|
959
|
+
}
|
|
960
|
+
function CommandShortcut({
|
|
961
|
+
className,
|
|
962
|
+
...props
|
|
963
|
+
}) {
|
|
964
|
+
return /* @__PURE__ */ jsx(
|
|
965
|
+
"span",
|
|
966
|
+
{
|
|
967
|
+
"data-slot": "command-shortcut",
|
|
968
|
+
className: cn(
|
|
969
|
+
"text-muted-foreground ml-auto text-xs tracking-widest",
|
|
970
|
+
className
|
|
971
|
+
),
|
|
972
|
+
...props
|
|
973
|
+
}
|
|
974
|
+
);
|
|
975
|
+
}
|
|
976
|
+
var DropdownMenu = DropdownMenuPrimitive.Root;
|
|
977
|
+
var DropdownMenuTrigger = DropdownMenuPrimitive.Trigger;
|
|
978
|
+
var DropdownMenuGroup = DropdownMenuPrimitive.Group;
|
|
979
|
+
var DropdownMenuPortal = DropdownMenuPrimitive.Portal;
|
|
980
|
+
var DropdownMenuSub = DropdownMenuPrimitive.Sub;
|
|
981
|
+
var DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup;
|
|
982
|
+
var DropdownMenuSubTrigger = React5.forwardRef(({ className, inset, children, ...props }, ref) => /* @__PURE__ */ jsxs(
|
|
983
|
+
DropdownMenuPrimitive.SubTrigger,
|
|
984
|
+
{
|
|
985
|
+
ref,
|
|
986
|
+
className: cn(
|
|
987
|
+
"flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
|
|
988
|
+
inset && "pl-8",
|
|
989
|
+
className
|
|
990
|
+
),
|
|
991
|
+
...props,
|
|
992
|
+
children: [
|
|
993
|
+
children,
|
|
994
|
+
/* @__PURE__ */ jsx(ChevronRight, { className: "ml-auto" })
|
|
995
|
+
]
|
|
996
|
+
}
|
|
997
|
+
));
|
|
998
|
+
DropdownMenuSubTrigger.displayName = DropdownMenuPrimitive.SubTrigger.displayName;
|
|
999
|
+
var DropdownMenuSubContent = React5.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
1000
|
+
DropdownMenuPrimitive.SubContent,
|
|
1001
|
+
{
|
|
1002
|
+
ref,
|
|
1003
|
+
className: cn(
|
|
1004
|
+
"z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
|
|
1005
|
+
className
|
|
1006
|
+
),
|
|
1007
|
+
...props
|
|
1008
|
+
}
|
|
1009
|
+
));
|
|
1010
|
+
DropdownMenuSubContent.displayName = DropdownMenuPrimitive.SubContent.displayName;
|
|
1011
|
+
var DropdownMenuContent = React5.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsx(DropdownMenuPrimitive.Portal, { children: /* @__PURE__ */ jsx(
|
|
1012
|
+
DropdownMenuPrimitive.Content,
|
|
1013
|
+
{
|
|
1014
|
+
ref,
|
|
1015
|
+
sideOffset,
|
|
1016
|
+
className: cn(
|
|
1017
|
+
"z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md",
|
|
1018
|
+
"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",
|
|
1019
|
+
className
|
|
1020
|
+
),
|
|
1021
|
+
...props
|
|
1022
|
+
}
|
|
1023
|
+
) }));
|
|
1024
|
+
DropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName;
|
|
1025
|
+
var DropdownMenuItem = React5.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
1026
|
+
DropdownMenuPrimitive.Item,
|
|
1027
|
+
{
|
|
1028
|
+
ref,
|
|
1029
|
+
className: cn(
|
|
1030
|
+
"relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&>svg]:size-4 [&>svg]:shrink-0",
|
|
1031
|
+
inset && "pl-8",
|
|
1032
|
+
className
|
|
1033
|
+
),
|
|
1034
|
+
...props
|
|
1035
|
+
}
|
|
1036
|
+
));
|
|
1037
|
+
DropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName;
|
|
1038
|
+
var DropdownMenuCheckboxItem = React5.forwardRef(({ className, children, checked, ...props }, ref) => /* @__PURE__ */ jsxs(
|
|
1039
|
+
DropdownMenuPrimitive.CheckboxItem,
|
|
1040
|
+
{
|
|
1041
|
+
ref,
|
|
1042
|
+
className: cn(
|
|
1043
|
+
"relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
1044
|
+
className
|
|
1045
|
+
),
|
|
1046
|
+
checked,
|
|
1047
|
+
...props,
|
|
1048
|
+
children: [
|
|
1049
|
+
/* @__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" }) }) }),
|
|
1050
|
+
children
|
|
1051
|
+
]
|
|
1052
|
+
}
|
|
1053
|
+
));
|
|
1054
|
+
DropdownMenuCheckboxItem.displayName = DropdownMenuPrimitive.CheckboxItem.displayName;
|
|
1055
|
+
var DropdownMenuRadioItem = React5.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(
|
|
1056
|
+
DropdownMenuPrimitive.RadioItem,
|
|
1057
|
+
{
|
|
1058
|
+
ref,
|
|
1059
|
+
className: cn(
|
|
1060
|
+
"relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
1061
|
+
className
|
|
1062
|
+
),
|
|
1063
|
+
...props,
|
|
1064
|
+
children: [
|
|
1065
|
+
/* @__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" }) }) }),
|
|
1066
|
+
children
|
|
1067
|
+
]
|
|
1068
|
+
}
|
|
1069
|
+
));
|
|
1070
|
+
DropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName;
|
|
1071
|
+
var DropdownMenuLabel = React5.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
1072
|
+
DropdownMenuPrimitive.Label,
|
|
1073
|
+
{
|
|
1074
|
+
ref,
|
|
1075
|
+
className: cn(
|
|
1076
|
+
"px-2 py-1.5 text-sm font-semibold",
|
|
1077
|
+
inset && "pl-8",
|
|
1078
|
+
className
|
|
1079
|
+
),
|
|
1080
|
+
...props
|
|
1081
|
+
}
|
|
1082
|
+
));
|
|
1083
|
+
DropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName;
|
|
1084
|
+
var DropdownMenuSeparator = React5.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
1085
|
+
DropdownMenuPrimitive.Separator,
|
|
1086
|
+
{
|
|
1087
|
+
ref,
|
|
1088
|
+
className: cn("-mx-1 my-1 h-px bg-muted", className),
|
|
1089
|
+
...props
|
|
1090
|
+
}
|
|
1091
|
+
));
|
|
1092
|
+
DropdownMenuSeparator.displayName = DropdownMenuPrimitive.Separator.displayName;
|
|
1093
|
+
var DropdownMenuShortcut = ({
|
|
1094
|
+
className,
|
|
1095
|
+
...props
|
|
1096
|
+
}) => {
|
|
1097
|
+
return /* @__PURE__ */ jsx(
|
|
1098
|
+
"span",
|
|
1099
|
+
{
|
|
1100
|
+
className: cn("ml-auto text-xs tracking-widest opacity-60", className),
|
|
1101
|
+
...props
|
|
1102
|
+
}
|
|
1103
|
+
);
|
|
1104
|
+
};
|
|
1105
|
+
DropdownMenuShortcut.displayName = "DropdownMenuShortcut";
|
|
1106
|
+
var labelVariants = cva(
|
|
1107
|
+
"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"
|
|
1108
|
+
);
|
|
1109
|
+
var Label2 = React5.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
1110
|
+
LabelPrimitive.Root,
|
|
1111
|
+
{
|
|
1112
|
+
ref,
|
|
1113
|
+
className: cn(labelVariants(), className),
|
|
1114
|
+
...props
|
|
1115
|
+
}
|
|
1116
|
+
));
|
|
1117
|
+
Label2.displayName = LabelPrimitive.Root.displayName;
|
|
1118
|
+
var Form = FormProvider;
|
|
1119
|
+
var FormFieldContext = React5.createContext(
|
|
1120
|
+
{}
|
|
1121
|
+
);
|
|
1122
|
+
var FormField = ({
|
|
1123
|
+
...props
|
|
1124
|
+
}) => {
|
|
1125
|
+
return /* @__PURE__ */ jsx(FormFieldContext.Provider, { value: { name: props.name }, children: /* @__PURE__ */ jsx(Controller, { ...props }) });
|
|
1126
|
+
};
|
|
1127
|
+
var useFormField = () => {
|
|
1128
|
+
const fieldContext = React5.useContext(FormFieldContext);
|
|
1129
|
+
const itemContext = React5.useContext(FormItemContext);
|
|
1130
|
+
const { getFieldState, formState } = useFormContext();
|
|
1131
|
+
const fieldState = getFieldState(fieldContext.name, formState);
|
|
1132
|
+
if (!fieldContext) {
|
|
1133
|
+
throw new Error("useFormField should be used within <FormField>");
|
|
1134
|
+
}
|
|
1135
|
+
const { id } = itemContext;
|
|
1136
|
+
return {
|
|
1137
|
+
id,
|
|
1138
|
+
name: fieldContext.name,
|
|
1139
|
+
formItemId: `${id}-form-item`,
|
|
1140
|
+
formDescriptionId: `${id}-form-item-description`,
|
|
1141
|
+
formMessageId: `${id}-form-item-message`,
|
|
1142
|
+
...fieldState
|
|
1143
|
+
};
|
|
1144
|
+
};
|
|
1145
|
+
var FormItemContext = React5.createContext(
|
|
1146
|
+
{}
|
|
1147
|
+
);
|
|
1148
|
+
var FormItem = React5.forwardRef(({ className, ...props }, ref) => {
|
|
1149
|
+
const id = React5.useId();
|
|
1150
|
+
return /* @__PURE__ */ jsx(FormItemContext.Provider, { value: { id }, children: /* @__PURE__ */ jsx("div", { ref, className: cn("space-y-2", className), ...props }) });
|
|
1151
|
+
});
|
|
1152
|
+
FormItem.displayName = "FormItem";
|
|
1153
|
+
var FormLabel = React5.forwardRef(({ className, ...props }, ref) => {
|
|
1154
|
+
const { error, formItemId } = useFormField();
|
|
1155
|
+
return /* @__PURE__ */ jsx(
|
|
1156
|
+
Label2,
|
|
1157
|
+
{
|
|
1158
|
+
ref,
|
|
1159
|
+
className: cn(error && "text-destructive", className),
|
|
1160
|
+
htmlFor: formItemId,
|
|
1161
|
+
...props
|
|
1162
|
+
}
|
|
1163
|
+
);
|
|
1164
|
+
});
|
|
1165
|
+
FormLabel.displayName = "FormLabel";
|
|
1166
|
+
var FormControl = React5.forwardRef(({ ...props }, ref) => {
|
|
1167
|
+
const { error, formItemId, formDescriptionId, formMessageId } = useFormField();
|
|
1168
|
+
return /* @__PURE__ */ jsx(
|
|
1169
|
+
Slot,
|
|
1170
|
+
{
|
|
1171
|
+
ref,
|
|
1172
|
+
id: formItemId,
|
|
1173
|
+
"aria-describedby": !error ? `${formDescriptionId}` : `${formDescriptionId} ${formMessageId}`,
|
|
1174
|
+
"aria-invalid": !!error,
|
|
1175
|
+
...props
|
|
1176
|
+
}
|
|
1177
|
+
);
|
|
1178
|
+
});
|
|
1179
|
+
FormControl.displayName = "FormControl";
|
|
1180
|
+
var FormDescription = React5.forwardRef(({ className, ...props }, ref) => {
|
|
1181
|
+
const { formDescriptionId } = useFormField();
|
|
1182
|
+
return /* @__PURE__ */ jsx(
|
|
1183
|
+
"p",
|
|
1184
|
+
{
|
|
1185
|
+
ref,
|
|
1186
|
+
id: formDescriptionId,
|
|
1187
|
+
className: cn("text-[0.8rem] text-muted-foreground", className),
|
|
1188
|
+
...props
|
|
1189
|
+
}
|
|
1190
|
+
);
|
|
1191
|
+
});
|
|
1192
|
+
FormDescription.displayName = "FormDescription";
|
|
1193
|
+
var FormMessage = React5.forwardRef(({ className, children, ...props }, ref) => {
|
|
1194
|
+
const { error, formMessageId } = useFormField();
|
|
1195
|
+
const body = error ? String(error?.message) : children;
|
|
1196
|
+
if (!body) {
|
|
1197
|
+
return null;
|
|
1198
|
+
}
|
|
1199
|
+
return /* @__PURE__ */ jsx(
|
|
1200
|
+
"p",
|
|
1201
|
+
{
|
|
1202
|
+
ref,
|
|
1203
|
+
id: formMessageId,
|
|
1204
|
+
className: cn("text-[0.8rem] font-medium text-destructive", className),
|
|
1205
|
+
...props,
|
|
1206
|
+
children: body
|
|
1207
|
+
}
|
|
1208
|
+
);
|
|
1209
|
+
});
|
|
1210
|
+
FormMessage.displayName = "FormMessage";
|
|
1211
|
+
var Input = React5.forwardRef(
|
|
1212
|
+
({ className, type, ...props }, ref) => {
|
|
1213
|
+
return /* @__PURE__ */ jsx(
|
|
1214
|
+
"input",
|
|
1215
|
+
{
|
|
1216
|
+
type,
|
|
1217
|
+
className: cn(
|
|
1218
|
+
"flex h-9 w-full rounded-md border border-input bg-background px-3 py-1 text-base shadow-sm transition-colors 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-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",
|
|
1219
|
+
className
|
|
1220
|
+
),
|
|
1221
|
+
ref,
|
|
1222
|
+
...props
|
|
1223
|
+
}
|
|
1224
|
+
);
|
|
1225
|
+
}
|
|
1226
|
+
);
|
|
1227
|
+
Input.displayName = "Input";
|
|
1228
|
+
var Loader = ({ className }) => {
|
|
1229
|
+
return /* @__PURE__ */ jsx(
|
|
1230
|
+
"svg",
|
|
1231
|
+
{
|
|
1232
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1233
|
+
width: "24",
|
|
1234
|
+
height: "24",
|
|
1235
|
+
viewBox: "0 0 24 24",
|
|
1236
|
+
fill: "none",
|
|
1237
|
+
stroke: "currentColor",
|
|
1238
|
+
strokeWidth: "2",
|
|
1239
|
+
strokeLinecap: "round",
|
|
1240
|
+
strokeLinejoin: "round",
|
|
1241
|
+
className: cn("animate-spin", className),
|
|
1242
|
+
children: /* @__PURE__ */ jsx("path", { d: "M21 12a9 9 0 1 1-6.219-8.56" })
|
|
1243
|
+
}
|
|
1244
|
+
);
|
|
1245
|
+
};
|
|
1246
|
+
function Select({
|
|
1247
|
+
...props
|
|
1248
|
+
}) {
|
|
1249
|
+
return /* @__PURE__ */ jsx(SelectPrimitive.Root, { "data-slot": "select", ...props });
|
|
1250
|
+
}
|
|
1251
|
+
function SelectGroup({
|
|
1252
|
+
...props
|
|
1253
|
+
}) {
|
|
1254
|
+
return /* @__PURE__ */ jsx(SelectPrimitive.Group, { "data-slot": "select-group", ...props });
|
|
1255
|
+
}
|
|
1256
|
+
function SelectValue({
|
|
1257
|
+
...props
|
|
1258
|
+
}) {
|
|
1259
|
+
return /* @__PURE__ */ jsx(SelectPrimitive.Value, { "data-slot": "select-value", ...props });
|
|
1260
|
+
}
|
|
1261
|
+
function SelectTrigger({
|
|
1262
|
+
className,
|
|
1263
|
+
children,
|
|
1264
|
+
...props
|
|
1265
|
+
}) {
|
|
1266
|
+
return /* @__PURE__ */ jsxs(
|
|
1267
|
+
SelectPrimitive.Trigger,
|
|
1268
|
+
{
|
|
1269
|
+
"data-slot": "select-trigger",
|
|
1270
|
+
className: cn(
|
|
1271
|
+
"border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive flex h-9 w-fit items-center justify-between gap-2 rounded-md border bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
1272
|
+
className
|
|
1273
|
+
),
|
|
1274
|
+
...props,
|
|
1275
|
+
children: [
|
|
1276
|
+
children,
|
|
1277
|
+
/* @__PURE__ */ jsx(SelectPrimitive.Icon, { asChild: true, children: /* @__PURE__ */ jsx(ChevronDownIcon, { className: "size-4 opacity-50" }) })
|
|
1278
|
+
]
|
|
1279
|
+
}
|
|
1280
|
+
);
|
|
1281
|
+
}
|
|
1282
|
+
function SelectContent({
|
|
1283
|
+
className,
|
|
1284
|
+
children,
|
|
1285
|
+
position = "popper",
|
|
1286
|
+
...props
|
|
1287
|
+
}) {
|
|
1288
|
+
return /* @__PURE__ */ jsx(SelectPrimitive.Portal, { children: /* @__PURE__ */ jsxs(
|
|
1289
|
+
SelectPrimitive.Content,
|
|
1290
|
+
{
|
|
1291
|
+
"data-slot": "select-content",
|
|
1292
|
+
className: cn(
|
|
1293
|
+
"bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border shadow-md",
|
|
1294
|
+
position === "popper" && "data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",
|
|
1295
|
+
className
|
|
1296
|
+
),
|
|
1297
|
+
position,
|
|
1298
|
+
...props,
|
|
1299
|
+
children: [
|
|
1300
|
+
/* @__PURE__ */ jsx(SelectScrollUpButton, {}),
|
|
1301
|
+
/* @__PURE__ */ jsx(
|
|
1302
|
+
SelectPrimitive.Viewport,
|
|
1303
|
+
{
|
|
1304
|
+
className: cn(
|
|
1305
|
+
"p-1",
|
|
1306
|
+
position === "popper" && "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"
|
|
1307
|
+
),
|
|
1308
|
+
children
|
|
1309
|
+
}
|
|
1310
|
+
),
|
|
1311
|
+
/* @__PURE__ */ jsx(SelectScrollDownButton, {})
|
|
1312
|
+
]
|
|
1313
|
+
}
|
|
1314
|
+
) });
|
|
1315
|
+
}
|
|
1316
|
+
function SelectLabel({
|
|
1317
|
+
className,
|
|
1318
|
+
...props
|
|
1319
|
+
}) {
|
|
1320
|
+
return /* @__PURE__ */ jsx(
|
|
1321
|
+
SelectPrimitive.Label,
|
|
1322
|
+
{
|
|
1323
|
+
"data-slot": "select-label",
|
|
1324
|
+
className: cn("px-2 py-1.5 text-sm font-medium", className),
|
|
1325
|
+
...props
|
|
1326
|
+
}
|
|
1327
|
+
);
|
|
1328
|
+
}
|
|
1329
|
+
function SelectItem({
|
|
1330
|
+
className,
|
|
1331
|
+
children,
|
|
1332
|
+
...props
|
|
1333
|
+
}) {
|
|
1334
|
+
return /* @__PURE__ */ jsxs(
|
|
1335
|
+
SelectPrimitive.Item,
|
|
1336
|
+
{
|
|
1337
|
+
"data-slot": "select-item",
|
|
1338
|
+
className: cn(
|
|
1339
|
+
"focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",
|
|
1340
|
+
className
|
|
1341
|
+
),
|
|
1342
|
+
...props,
|
|
1343
|
+
children: [
|
|
1344
|
+
/* @__PURE__ */ jsx("span", { className: "absolute right-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ jsx(SelectPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx(CheckIcon, { className: "size-4" }) }) }),
|
|
1345
|
+
/* @__PURE__ */ jsx(SelectPrimitive.ItemText, { children })
|
|
1346
|
+
]
|
|
1347
|
+
}
|
|
1348
|
+
);
|
|
1349
|
+
}
|
|
1350
|
+
function SelectSeparator({
|
|
1351
|
+
className,
|
|
1352
|
+
...props
|
|
1353
|
+
}) {
|
|
1354
|
+
return /* @__PURE__ */ jsx(
|
|
1355
|
+
SelectPrimitive.Separator,
|
|
1356
|
+
{
|
|
1357
|
+
"data-slot": "select-separator",
|
|
1358
|
+
className: cn("bg-border pointer-events-none -mx-1 my-1 h-px", className),
|
|
1359
|
+
...props
|
|
1360
|
+
}
|
|
1361
|
+
);
|
|
1362
|
+
}
|
|
1363
|
+
function SelectScrollUpButton({
|
|
1364
|
+
className,
|
|
1365
|
+
...props
|
|
1366
|
+
}) {
|
|
1367
|
+
return /* @__PURE__ */ jsx(
|
|
1368
|
+
SelectPrimitive.ScrollUpButton,
|
|
1369
|
+
{
|
|
1370
|
+
"data-slot": "select-scroll-up-button",
|
|
1371
|
+
className: cn(
|
|
1372
|
+
"flex cursor-default items-center justify-center py-1",
|
|
1373
|
+
className
|
|
1374
|
+
),
|
|
1375
|
+
...props,
|
|
1376
|
+
children: /* @__PURE__ */ jsx(ChevronUpIcon, { className: "size-4" })
|
|
1377
|
+
}
|
|
1378
|
+
);
|
|
1379
|
+
}
|
|
1380
|
+
function SelectScrollDownButton({
|
|
1381
|
+
className,
|
|
1382
|
+
...props
|
|
1383
|
+
}) {
|
|
1384
|
+
return /* @__PURE__ */ jsx(
|
|
1385
|
+
SelectPrimitive.ScrollDownButton,
|
|
1386
|
+
{
|
|
1387
|
+
"data-slot": "select-scroll-down-button",
|
|
1388
|
+
className: cn(
|
|
1389
|
+
"flex cursor-default items-center justify-center py-1",
|
|
1390
|
+
className
|
|
1391
|
+
),
|
|
1392
|
+
...props,
|
|
1393
|
+
children: /* @__PURE__ */ jsx(ChevronDownIcon, { className: "size-4" })
|
|
1394
|
+
}
|
|
1395
|
+
);
|
|
1396
|
+
}
|
|
1397
|
+
function Pagination({
|
|
1398
|
+
currentPage,
|
|
1399
|
+
totalPages,
|
|
1400
|
+
pageSize,
|
|
1401
|
+
totalItems,
|
|
1402
|
+
onPageChange,
|
|
1403
|
+
onPageSizeChange,
|
|
1404
|
+
pageSizeOptions = [10, 25, 50, 100],
|
|
1405
|
+
className
|
|
1406
|
+
}) {
|
|
1407
|
+
const startItem = totalItems === 0 ? 0 : (currentPage - 1) * pageSize + 1;
|
|
1408
|
+
const endItem = Math.min(currentPage * pageSize, totalItems);
|
|
1409
|
+
return /* @__PURE__ */ jsxs("div", { className: cn("flex items-center justify-between py-4", className), children: [
|
|
1410
|
+
/* @__PURE__ */ jsxs("div", { className: "text-sm text-muted-foreground", children: [
|
|
1411
|
+
"Showing ",
|
|
1412
|
+
startItem,
|
|
1413
|
+
" to ",
|
|
1414
|
+
endItem,
|
|
1415
|
+
" of ",
|
|
1416
|
+
totalItems,
|
|
1417
|
+
" results"
|
|
1418
|
+
] }),
|
|
1419
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-4", children: [
|
|
1420
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
1421
|
+
/* @__PURE__ */ jsx("span", { className: "text-sm", children: "Rows per page:" }),
|
|
1422
|
+
/* @__PURE__ */ jsxs(Select, { value: pageSize.toString(), onValueChange: (v) => onPageSizeChange(Number(v)), children: [
|
|
1423
|
+
/* @__PURE__ */ jsx(SelectTrigger, { className: "w-[100px]", children: /* @__PURE__ */ jsx(SelectValue, {}) }),
|
|
1424
|
+
/* @__PURE__ */ jsx(SelectContent, { children: pageSizeOptions.map((option) => /* @__PURE__ */ jsx(SelectItem, { value: option.toString(), children: option }, option)) })
|
|
1425
|
+
] })
|
|
1426
|
+
] }),
|
|
1427
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1", children: [
|
|
1428
|
+
/* @__PURE__ */ jsxs(
|
|
1429
|
+
Button,
|
|
1430
|
+
{
|
|
1431
|
+
variant: "outline",
|
|
1432
|
+
size: "sm",
|
|
1433
|
+
onClick: () => onPageChange(1),
|
|
1434
|
+
disabled: currentPage === 1,
|
|
1435
|
+
className: "h-8 w-8 p-0",
|
|
1436
|
+
children: [
|
|
1437
|
+
/* @__PURE__ */ jsx("span", { className: "sr-only", children: "Go to first page" }),
|
|
1438
|
+
/* @__PURE__ */ jsx(ChevronsLeft, { className: "h-4 w-4" })
|
|
1439
|
+
]
|
|
1440
|
+
}
|
|
1441
|
+
),
|
|
1442
|
+
/* @__PURE__ */ jsxs(
|
|
1443
|
+
Button,
|
|
1444
|
+
{
|
|
1445
|
+
variant: "outline",
|
|
1446
|
+
size: "sm",
|
|
1447
|
+
onClick: () => onPageChange(currentPage - 1),
|
|
1448
|
+
disabled: currentPage === 1,
|
|
1449
|
+
className: "h-8 w-8 p-0",
|
|
1450
|
+
children: [
|
|
1451
|
+
/* @__PURE__ */ jsx("span", { className: "sr-only", children: "Go to previous page" }),
|
|
1452
|
+
/* @__PURE__ */ jsx(ChevronLeft, { className: "h-4 w-4" })
|
|
1453
|
+
]
|
|
1454
|
+
}
|
|
1455
|
+
),
|
|
1456
|
+
/* @__PURE__ */ jsxs("span", { className: "px-2 text-sm", children: [
|
|
1457
|
+
"Page ",
|
|
1458
|
+
currentPage,
|
|
1459
|
+
" of ",
|
|
1460
|
+
totalPages
|
|
1461
|
+
] }),
|
|
1462
|
+
/* @__PURE__ */ jsxs(
|
|
1463
|
+
Button,
|
|
1464
|
+
{
|
|
1465
|
+
variant: "outline",
|
|
1466
|
+
size: "sm",
|
|
1467
|
+
onClick: () => onPageChange(currentPage + 1),
|
|
1468
|
+
disabled: currentPage === totalPages,
|
|
1469
|
+
className: "h-8 w-8 p-0",
|
|
1470
|
+
children: [
|
|
1471
|
+
/* @__PURE__ */ jsx("span", { className: "sr-only", children: "Go to next page" }),
|
|
1472
|
+
/* @__PURE__ */ jsx(ChevronRight, { className: "h-4 w-4" })
|
|
1473
|
+
]
|
|
1474
|
+
}
|
|
1475
|
+
),
|
|
1476
|
+
/* @__PURE__ */ jsxs(
|
|
1477
|
+
Button,
|
|
1478
|
+
{
|
|
1479
|
+
variant: "outline",
|
|
1480
|
+
size: "sm",
|
|
1481
|
+
onClick: () => onPageChange(totalPages),
|
|
1482
|
+
disabled: currentPage === totalPages,
|
|
1483
|
+
className: "h-8 w-8 p-0",
|
|
1484
|
+
children: [
|
|
1485
|
+
/* @__PURE__ */ jsx("span", { className: "sr-only", children: "Go to last page" }),
|
|
1486
|
+
/* @__PURE__ */ jsx(ChevronsRight, { className: "h-4 w-4" })
|
|
1487
|
+
]
|
|
1488
|
+
}
|
|
1489
|
+
)
|
|
1490
|
+
] })
|
|
1491
|
+
] })
|
|
1492
|
+
] });
|
|
1493
|
+
}
|
|
1494
|
+
function Popover({
|
|
1495
|
+
...props
|
|
1496
|
+
}) {
|
|
1497
|
+
return /* @__PURE__ */ jsx(PopoverPrimitive.Root, { "data-slot": "popover", ...props });
|
|
1498
|
+
}
|
|
1499
|
+
function PopoverTrigger({
|
|
1500
|
+
...props
|
|
1501
|
+
}) {
|
|
1502
|
+
return /* @__PURE__ */ jsx(PopoverPrimitive.Trigger, { "data-slot": "popover-trigger", ...props });
|
|
1503
|
+
}
|
|
1504
|
+
function PopoverContent({
|
|
1505
|
+
className,
|
|
1506
|
+
align = "center",
|
|
1507
|
+
sideOffset = 4,
|
|
1508
|
+
...props
|
|
1509
|
+
}) {
|
|
1510
|
+
return /* @__PURE__ */ jsx(PopoverPrimitive.Portal, { children: /* @__PURE__ */ jsx(
|
|
1511
|
+
PopoverPrimitive.Content,
|
|
1512
|
+
{
|
|
1513
|
+
"data-slot": "popover-content",
|
|
1514
|
+
align,
|
|
1515
|
+
sideOffset,
|
|
1516
|
+
className: cn(
|
|
1517
|
+
"bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-72 rounded-md border p-4 shadow-md outline-hidden",
|
|
1518
|
+
className
|
|
1519
|
+
),
|
|
1520
|
+
...props
|
|
1521
|
+
}
|
|
1522
|
+
) });
|
|
1523
|
+
}
|
|
1524
|
+
var Progress = React5.forwardRef(({ className, value, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
1525
|
+
ProgressPrimitive.Root,
|
|
1526
|
+
{
|
|
1527
|
+
ref,
|
|
1528
|
+
className: cn(
|
|
1529
|
+
"relative h-2 w-full overflow-hidden rounded-full bg-primary/20",
|
|
1530
|
+
className
|
|
1531
|
+
),
|
|
1532
|
+
...props,
|
|
1533
|
+
children: /* @__PURE__ */ jsx(
|
|
1534
|
+
ProgressPrimitive.Indicator,
|
|
1535
|
+
{
|
|
1536
|
+
className: "h-full w-full flex-1 bg-primary transition-all",
|
|
1537
|
+
style: { transform: `translateX(-${100 - (value || 0)}%)` }
|
|
1538
|
+
}
|
|
1539
|
+
)
|
|
1540
|
+
}
|
|
1541
|
+
));
|
|
1542
|
+
Progress.displayName = ProgressPrimitive.Root.displayName;
|
|
1543
|
+
var RadioGroup2 = React5.forwardRef(({ className, ...props }, ref) => {
|
|
1544
|
+
return /* @__PURE__ */ jsx(
|
|
1545
|
+
RadioGroupPrimitive.Root,
|
|
1546
|
+
{
|
|
1547
|
+
className: cn("grid gap-2", className),
|
|
1548
|
+
...props,
|
|
1549
|
+
ref
|
|
1550
|
+
}
|
|
1551
|
+
);
|
|
1552
|
+
});
|
|
1553
|
+
RadioGroup2.displayName = RadioGroupPrimitive.Root.displayName;
|
|
1554
|
+
var RadioGroupItem = React5.forwardRef(({ className, ...props }, ref) => {
|
|
1555
|
+
return /* @__PURE__ */ jsx(
|
|
1556
|
+
RadioGroupPrimitive.Item,
|
|
1557
|
+
{
|
|
1558
|
+
ref,
|
|
1559
|
+
className: cn(
|
|
1560
|
+
"aspect-square h-4 w-4 rounded-full border border-primary text-primary ring-offset-background focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",
|
|
1561
|
+
className
|
|
1562
|
+
),
|
|
1563
|
+
...props,
|
|
1564
|
+
children: /* @__PURE__ */ jsx(RadioGroupPrimitive.Indicator, { className: "flex items-center justify-center", children: /* @__PURE__ */ jsx(Circle, { className: "h-2.5 w-2.5 fill-current text-current" }) })
|
|
1565
|
+
}
|
|
1566
|
+
);
|
|
1567
|
+
});
|
|
1568
|
+
RadioGroupItem.displayName = RadioGroupPrimitive.Item.displayName;
|
|
1569
|
+
var ScrollArea = React5.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(
|
|
1570
|
+
ScrollAreaPrimitive.Root,
|
|
1571
|
+
{
|
|
1572
|
+
ref,
|
|
1573
|
+
className: cn("relative overflow-hidden", className),
|
|
1574
|
+
...props,
|
|
1575
|
+
children: [
|
|
1576
|
+
/* @__PURE__ */ jsx(ScrollAreaPrimitive.Viewport, { className: "h-full w-full rounded-[inherit]", children }),
|
|
1577
|
+
/* @__PURE__ */ jsx(ScrollBar, {}),
|
|
1578
|
+
/* @__PURE__ */ jsx(ScrollAreaPrimitive.Corner, {})
|
|
1579
|
+
]
|
|
1580
|
+
}
|
|
1581
|
+
));
|
|
1582
|
+
ScrollArea.displayName = ScrollAreaPrimitive.Root.displayName;
|
|
1583
|
+
var ScrollBar = React5.forwardRef(({ className, orientation = "vertical", ...props }, ref) => /* @__PURE__ */ jsx(
|
|
1584
|
+
ScrollAreaPrimitive.ScrollAreaScrollbar,
|
|
1585
|
+
{
|
|
1586
|
+
ref,
|
|
1587
|
+
orientation,
|
|
1588
|
+
className: cn(
|
|
1589
|
+
"flex touch-none select-none transition-colors",
|
|
1590
|
+
orientation === "vertical" && "h-full w-2.5 border-l border-l-transparent p-[1px]",
|
|
1591
|
+
orientation === "horizontal" && "h-2.5 flex-col border-t border-t-transparent p-[1px]",
|
|
1592
|
+
className
|
|
1593
|
+
),
|
|
1594
|
+
...props,
|
|
1595
|
+
children: /* @__PURE__ */ jsx(ScrollAreaPrimitive.ScrollAreaThumb, { className: "relative flex-1 rounded-full bg-border" })
|
|
1596
|
+
}
|
|
1597
|
+
));
|
|
1598
|
+
ScrollBar.displayName = ScrollAreaPrimitive.ScrollAreaScrollbar.displayName;
|
|
1599
|
+
var Separator3 = React5.forwardRef(
|
|
1600
|
+
({ className, orientation = "horizontal", decorative = true, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
1601
|
+
SeparatorPrimitive.Root,
|
|
1602
|
+
{
|
|
1603
|
+
ref,
|
|
1604
|
+
decorative,
|
|
1605
|
+
orientation,
|
|
1606
|
+
className: cn(
|
|
1607
|
+
"shrink-0 bg-border",
|
|
1608
|
+
orientation === "horizontal" ? "h-[1px] w-full" : "h-full w-[1px]",
|
|
1609
|
+
className
|
|
1610
|
+
),
|
|
1611
|
+
...props
|
|
1612
|
+
}
|
|
1613
|
+
)
|
|
1614
|
+
);
|
|
1615
|
+
Separator3.displayName = SeparatorPrimitive.Root.displayName;
|
|
1616
|
+
var Sheet = DialogPrimitive.Root;
|
|
1617
|
+
var SheetTrigger = DialogPrimitive.Trigger;
|
|
1618
|
+
var SheetClose = DialogPrimitive.Close;
|
|
1619
|
+
var SheetPortal = DialogPrimitive.Portal;
|
|
1620
|
+
var SheetOverlay = React5.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
1621
|
+
DialogPrimitive.Overlay,
|
|
1622
|
+
{
|
|
1623
|
+
className: cn(
|
|
1624
|
+
"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",
|
|
1625
|
+
className
|
|
1626
|
+
),
|
|
1627
|
+
...props,
|
|
1628
|
+
ref
|
|
1629
|
+
}
|
|
1630
|
+
));
|
|
1631
|
+
SheetOverlay.displayName = DialogPrimitive.Overlay.displayName;
|
|
1632
|
+
var sheetVariants = cva(
|
|
1633
|
+
"fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500 data-[state=open]:animate-in data-[state=closed]:animate-out",
|
|
1634
|
+
{
|
|
1635
|
+
variants: {
|
|
1636
|
+
side: {
|
|
1637
|
+
top: "inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",
|
|
1638
|
+
bottom: "inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",
|
|
1639
|
+
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",
|
|
1640
|
+
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"
|
|
1641
|
+
}
|
|
1642
|
+
},
|
|
1643
|
+
defaultVariants: {
|
|
1644
|
+
side: "right"
|
|
1645
|
+
}
|
|
1646
|
+
}
|
|
1647
|
+
);
|
|
1648
|
+
var SheetContent = React5.forwardRef(({ side = "right", className, children, ...props }, ref) => /* @__PURE__ */ jsxs(SheetPortal, { children: [
|
|
1649
|
+
/* @__PURE__ */ jsx(SheetOverlay, {}),
|
|
1650
|
+
/* @__PURE__ */ jsxs(
|
|
1651
|
+
DialogPrimitive.Content,
|
|
1652
|
+
{
|
|
1653
|
+
ref,
|
|
1654
|
+
className: cn(sheetVariants({ side }), className),
|
|
1655
|
+
...props,
|
|
1656
|
+
children: [
|
|
1657
|
+
/* @__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: [
|
|
1658
|
+
/* @__PURE__ */ jsx(X, { className: "h-4 w-4" }),
|
|
1659
|
+
/* @__PURE__ */ jsx("span", { className: "sr-only", children: "Close" })
|
|
1660
|
+
] }),
|
|
1661
|
+
children
|
|
1662
|
+
]
|
|
1663
|
+
}
|
|
1664
|
+
)
|
|
1665
|
+
] }));
|
|
1666
|
+
SheetContent.displayName = DialogPrimitive.Content.displayName;
|
|
1667
|
+
var SheetHeader = ({
|
|
1668
|
+
className,
|
|
1669
|
+
...props
|
|
1670
|
+
}) => /* @__PURE__ */ jsx(
|
|
1671
|
+
"div",
|
|
1672
|
+
{
|
|
1673
|
+
className: cn(
|
|
1674
|
+
"flex flex-col space-y-2 text-center sm:text-left",
|
|
1675
|
+
className
|
|
1676
|
+
),
|
|
1677
|
+
...props
|
|
1678
|
+
}
|
|
1679
|
+
);
|
|
1680
|
+
SheetHeader.displayName = "SheetHeader";
|
|
1681
|
+
var SheetFooter = ({
|
|
1682
|
+
className,
|
|
1683
|
+
...props
|
|
1684
|
+
}) => /* @__PURE__ */ jsx(
|
|
1685
|
+
"div",
|
|
1686
|
+
{
|
|
1687
|
+
className: cn(
|
|
1688
|
+
"flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",
|
|
1689
|
+
className
|
|
1690
|
+
),
|
|
1691
|
+
...props
|
|
1692
|
+
}
|
|
1693
|
+
);
|
|
1694
|
+
SheetFooter.displayName = "SheetFooter";
|
|
1695
|
+
var SheetTitle = React5.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
1696
|
+
DialogPrimitive.Title,
|
|
1697
|
+
{
|
|
1698
|
+
ref,
|
|
1699
|
+
className: cn("text-lg font-semibold text-foreground", className),
|
|
1700
|
+
...props
|
|
1701
|
+
}
|
|
1702
|
+
));
|
|
1703
|
+
SheetTitle.displayName = DialogPrimitive.Title.displayName;
|
|
1704
|
+
var SheetDescription = React5.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
1705
|
+
DialogPrimitive.Description,
|
|
1706
|
+
{
|
|
1707
|
+
ref,
|
|
1708
|
+
className: cn("text-sm text-muted-foreground", className),
|
|
1709
|
+
...props
|
|
1710
|
+
}
|
|
1711
|
+
));
|
|
1712
|
+
SheetDescription.displayName = DialogPrimitive.Description.displayName;
|
|
1713
|
+
function Skeleton({
|
|
1714
|
+
className,
|
|
1715
|
+
...props
|
|
1716
|
+
}) {
|
|
1717
|
+
return /* @__PURE__ */ jsx(
|
|
1718
|
+
"div",
|
|
1719
|
+
{
|
|
1720
|
+
className: cn("animate-pulse rounded-md bg-primary/10", className),
|
|
1721
|
+
...props
|
|
1722
|
+
}
|
|
1723
|
+
);
|
|
1724
|
+
}
|
|
1725
|
+
var SIDEBAR_COOKIE_NAME = "sidebar_state";
|
|
1726
|
+
var SIDEBAR_COOKIE_MAX_AGE = 60 * 60 * 24 * 7;
|
|
1727
|
+
var SIDEBAR_WIDTH = "8rem";
|
|
1728
|
+
var SIDEBAR_WIDTH_MOBILE = "18rem";
|
|
1729
|
+
var SIDEBAR_WIDTH_ICON = "3rem";
|
|
1730
|
+
var SIDEBAR_KEYBOARD_SHORTCUT = "b";
|
|
1731
|
+
var SidebarContext = React5.createContext(null);
|
|
1732
|
+
function useSidebar() {
|
|
1733
|
+
const context = React5.useContext(SidebarContext);
|
|
1734
|
+
if (!context) {
|
|
1735
|
+
throw new Error("useSidebar must be used within a SidebarProvider.");
|
|
1736
|
+
}
|
|
1737
|
+
return context;
|
|
1738
|
+
}
|
|
1739
|
+
function SidebarProvider({
|
|
1740
|
+
defaultOpen = true,
|
|
1741
|
+
open: openProp,
|
|
1742
|
+
onOpenChange: setOpenProp,
|
|
1743
|
+
className,
|
|
1744
|
+
style,
|
|
1745
|
+
children,
|
|
1746
|
+
...props
|
|
1747
|
+
}) {
|
|
1748
|
+
const isMobile = useIsMobile();
|
|
1749
|
+
const [openMobile, setOpenMobile] = React5.useState(false);
|
|
1750
|
+
const [_open, _setOpen] = React5.useState(defaultOpen);
|
|
1751
|
+
const open = openProp ?? _open;
|
|
1752
|
+
const setOpen = React5.useCallback(
|
|
1753
|
+
(value) => {
|
|
1754
|
+
const openState = typeof value === "function" ? value(open) : value;
|
|
1755
|
+
if (setOpenProp) {
|
|
1756
|
+
setOpenProp(openState);
|
|
1757
|
+
} else {
|
|
1758
|
+
_setOpen(openState);
|
|
1759
|
+
}
|
|
1760
|
+
document.cookie = `${SIDEBAR_COOKIE_NAME}=${openState}; path=/; max-age=${SIDEBAR_COOKIE_MAX_AGE}`;
|
|
1761
|
+
},
|
|
1762
|
+
[setOpenProp, open]
|
|
1763
|
+
);
|
|
1764
|
+
const toggleSidebar = React5.useCallback(() => {
|
|
1765
|
+
return isMobile ? setOpenMobile((open2) => !open2) : setOpen((open2) => !open2);
|
|
1766
|
+
}, [isMobile, setOpen, setOpenMobile]);
|
|
1767
|
+
React5.useEffect(() => {
|
|
1768
|
+
const handleKeyDown = (event) => {
|
|
1769
|
+
if (event.key === SIDEBAR_KEYBOARD_SHORTCUT && (event.metaKey || event.ctrlKey)) {
|
|
1770
|
+
event.preventDefault();
|
|
1771
|
+
toggleSidebar();
|
|
1772
|
+
}
|
|
1773
|
+
};
|
|
1774
|
+
window.addEventListener("keydown", handleKeyDown);
|
|
1775
|
+
return () => window.removeEventListener("keydown", handleKeyDown);
|
|
1776
|
+
}, [toggleSidebar]);
|
|
1777
|
+
const state = open ? "expanded" : "collapsed";
|
|
1778
|
+
const contextValue = React5.useMemo(
|
|
1779
|
+
() => ({
|
|
1780
|
+
state,
|
|
1781
|
+
open,
|
|
1782
|
+
setOpen,
|
|
1783
|
+
isMobile,
|
|
1784
|
+
openMobile,
|
|
1785
|
+
setOpenMobile,
|
|
1786
|
+
toggleSidebar
|
|
1787
|
+
}),
|
|
1788
|
+
[state, open, setOpen, isMobile, openMobile, setOpenMobile, toggleSidebar]
|
|
1789
|
+
);
|
|
1790
|
+
return /* @__PURE__ */ jsx(SidebarContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsx(TooltipProvider, { delayDuration: 0, children: /* @__PURE__ */ jsx(
|
|
1791
|
+
"div",
|
|
1792
|
+
{
|
|
1793
|
+
"data-slot": "sidebar-wrapper",
|
|
1794
|
+
style: {
|
|
1795
|
+
"--sidebar-width": SIDEBAR_WIDTH,
|
|
1796
|
+
"--sidebar-width-icon": SIDEBAR_WIDTH_ICON,
|
|
1797
|
+
...style
|
|
1798
|
+
},
|
|
1799
|
+
className: cn(
|
|
1800
|
+
"group/sidebar-wrapper has-data-[variant=inset]:bg-sidebar flex min-h-svh w-full",
|
|
1801
|
+
className
|
|
1802
|
+
),
|
|
1803
|
+
...props,
|
|
1804
|
+
children
|
|
1805
|
+
}
|
|
1806
|
+
) }) });
|
|
1807
|
+
}
|
|
1808
|
+
function Sidebar({
|
|
1809
|
+
side = "left",
|
|
1810
|
+
variant = "sidebar",
|
|
1811
|
+
collapsible = "offcanvas",
|
|
1812
|
+
className,
|
|
1813
|
+
children,
|
|
1814
|
+
...props
|
|
1815
|
+
}) {
|
|
1816
|
+
const { isMobile, state, openMobile, setOpenMobile } = useSidebar();
|
|
1817
|
+
if (collapsible === "none") {
|
|
1818
|
+
return /* @__PURE__ */ jsx(
|
|
1819
|
+
"div",
|
|
1820
|
+
{
|
|
1821
|
+
"data-slot": "sidebar",
|
|
1822
|
+
className: cn(
|
|
1823
|
+
"bg-sidebar text-sidebar-foreground flex h-full w-(--sidebar-width) flex-col",
|
|
1824
|
+
className
|
|
1825
|
+
),
|
|
1826
|
+
...props,
|
|
1827
|
+
children
|
|
1828
|
+
}
|
|
1829
|
+
);
|
|
1830
|
+
}
|
|
1831
|
+
if (isMobile) {
|
|
1832
|
+
return /* @__PURE__ */ jsx(Sheet, { open: openMobile, onOpenChange: setOpenMobile, ...props, children: /* @__PURE__ */ jsxs(
|
|
1833
|
+
SheetContent,
|
|
1834
|
+
{
|
|
1835
|
+
"data-sidebar": "sidebar",
|
|
1836
|
+
"data-slot": "sidebar",
|
|
1837
|
+
"data-mobile": "true",
|
|
1838
|
+
className: "bg-sidebar text-sidebar-foreground w-(--sidebar-width) p-0 [&>button]:hidden",
|
|
1839
|
+
style: {
|
|
1840
|
+
"--sidebar-width": SIDEBAR_WIDTH_MOBILE
|
|
1841
|
+
},
|
|
1842
|
+
side,
|
|
1843
|
+
children: [
|
|
1844
|
+
/* @__PURE__ */ jsxs(SheetHeader, { className: "sr-only", children: [
|
|
1845
|
+
/* @__PURE__ */ jsx(SheetTitle, { children: "Sidebar" }),
|
|
1846
|
+
/* @__PURE__ */ jsx(SheetDescription, { children: "Displays the mobile sidebar." })
|
|
1847
|
+
] }),
|
|
1848
|
+
/* @__PURE__ */ jsx("div", { className: "flex h-full w-full flex-col", children })
|
|
1849
|
+
]
|
|
1850
|
+
}
|
|
1851
|
+
) });
|
|
1852
|
+
}
|
|
1853
|
+
return /* @__PURE__ */ jsxs(
|
|
1854
|
+
"div",
|
|
1855
|
+
{
|
|
1856
|
+
className: "group peer text-sidebar-foreground hidden md:block",
|
|
1857
|
+
"data-state": state,
|
|
1858
|
+
"data-collapsible": state === "collapsed" ? collapsible : "",
|
|
1859
|
+
"data-variant": variant,
|
|
1860
|
+
"data-side": side,
|
|
1861
|
+
"data-slot": "sidebar",
|
|
1862
|
+
children: [
|
|
1863
|
+
/* @__PURE__ */ jsx(
|
|
1864
|
+
"div",
|
|
1865
|
+
{
|
|
1866
|
+
"data-slot": "sidebar-gap",
|
|
1867
|
+
className: cn(
|
|
1868
|
+
"relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear",
|
|
1869
|
+
"group-data-[collapsible=offcanvas]:w-0",
|
|
1870
|
+
"group-data-[side=right]:rotate-180",
|
|
1871
|
+
variant === "floating" || variant === "inset" ? "group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]" : "group-data-[collapsible=icon]:w-(--sidebar-width-icon)"
|
|
1872
|
+
)
|
|
1873
|
+
}
|
|
1874
|
+
),
|
|
1875
|
+
/* @__PURE__ */ jsx(
|
|
1876
|
+
"div",
|
|
1877
|
+
{
|
|
1878
|
+
"data-slot": "sidebar-container",
|
|
1879
|
+
className: cn(
|
|
1880
|
+
"fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear md:flex",
|
|
1881
|
+
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)]",
|
|
1882
|
+
// Adjust the padding for floating and inset variants.
|
|
1883
|
+
variant === "floating" || variant === "inset" ? "p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]" : "group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l",
|
|
1884
|
+
className
|
|
1885
|
+
),
|
|
1886
|
+
...props,
|
|
1887
|
+
children: /* @__PURE__ */ jsx(
|
|
1888
|
+
"div",
|
|
1889
|
+
{
|
|
1890
|
+
"data-sidebar": "sidebar",
|
|
1891
|
+
"data-slot": "sidebar-inner",
|
|
1892
|
+
className: "bg-sidebar group-data-[variant=floating]:border-sidebar-border flex h-full w-full flex-col group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:shadow-sm",
|
|
1893
|
+
children
|
|
1894
|
+
}
|
|
1895
|
+
)
|
|
1896
|
+
}
|
|
1897
|
+
)
|
|
1898
|
+
]
|
|
1899
|
+
}
|
|
1900
|
+
);
|
|
1901
|
+
}
|
|
1902
|
+
function SidebarTrigger({
|
|
1903
|
+
className,
|
|
1904
|
+
onClick,
|
|
1905
|
+
...props
|
|
1906
|
+
}) {
|
|
1907
|
+
const { toggleSidebar } = useSidebar();
|
|
1908
|
+
return /* @__PURE__ */ jsxs(
|
|
1909
|
+
Button,
|
|
1910
|
+
{
|
|
1911
|
+
"data-sidebar": "trigger",
|
|
1912
|
+
"data-slot": "sidebar-trigger",
|
|
1913
|
+
variant: "ghost",
|
|
1914
|
+
size: "icon",
|
|
1915
|
+
className: cn("size-7", className),
|
|
1916
|
+
onClick: (event) => {
|
|
1917
|
+
onClick?.(event);
|
|
1918
|
+
toggleSidebar();
|
|
1919
|
+
},
|
|
1920
|
+
...props,
|
|
1921
|
+
children: [
|
|
1922
|
+
/* @__PURE__ */ jsx(PanelLeftIcon, {}),
|
|
1923
|
+
/* @__PURE__ */ jsx("span", { className: "sr-only", children: "Toggle Sidebar" })
|
|
1924
|
+
]
|
|
1925
|
+
}
|
|
1926
|
+
);
|
|
1927
|
+
}
|
|
1928
|
+
function SidebarRail({ className, ...props }) {
|
|
1929
|
+
const { toggleSidebar } = useSidebar();
|
|
1930
|
+
return /* @__PURE__ */ jsx(
|
|
1931
|
+
"button",
|
|
1932
|
+
{
|
|
1933
|
+
"data-sidebar": "rail",
|
|
1934
|
+
"data-slot": "sidebar-rail",
|
|
1935
|
+
"aria-label": "Toggle Sidebar",
|
|
1936
|
+
tabIndex: -1,
|
|
1937
|
+
onClick: toggleSidebar,
|
|
1938
|
+
title: "Toggle Sidebar",
|
|
1939
|
+
className: cn(
|
|
1940
|
+
"hover:after:bg-sidebar-border absolute inset-y-0 z-20 hidden w-4 -translate-x-1/2 transition-all ease-linear group-data-[side=left]:-right-4 group-data-[side=right]:left-0 after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] sm:flex",
|
|
1941
|
+
"in-data-[side=left]:cursor-w-resize in-data-[side=right]:cursor-e-resize",
|
|
1942
|
+
"[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize",
|
|
1943
|
+
"hover:group-data-[collapsible=offcanvas]:bg-sidebar group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full",
|
|
1944
|
+
"[[data-side=left][data-collapsible=offcanvas]_&]:-right-2",
|
|
1945
|
+
"[[data-side=right][data-collapsible=offcanvas]_&]:-left-2",
|
|
1946
|
+
className
|
|
1947
|
+
),
|
|
1948
|
+
...props
|
|
1949
|
+
}
|
|
1950
|
+
);
|
|
1951
|
+
}
|
|
1952
|
+
function SidebarInset({ className, ...props }) {
|
|
1953
|
+
return /* @__PURE__ */ jsx(
|
|
1954
|
+
"main",
|
|
1955
|
+
{
|
|
1956
|
+
"data-slot": "sidebar-inset",
|
|
1957
|
+
className: cn(
|
|
1958
|
+
"bg-background relative flex w-full flex-1 flex-col",
|
|
1959
|
+
"md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2",
|
|
1960
|
+
className
|
|
1961
|
+
),
|
|
1962
|
+
...props
|
|
1963
|
+
}
|
|
1964
|
+
);
|
|
1965
|
+
}
|
|
1966
|
+
function SidebarInput({
|
|
1967
|
+
className,
|
|
1968
|
+
...props
|
|
1969
|
+
}) {
|
|
1970
|
+
return /* @__PURE__ */ jsx(
|
|
1971
|
+
Input,
|
|
1972
|
+
{
|
|
1973
|
+
"data-slot": "sidebar-input",
|
|
1974
|
+
"data-sidebar": "input",
|
|
1975
|
+
className: cn("bg-background h-8 w-full shadow-none", className),
|
|
1976
|
+
...props
|
|
1977
|
+
}
|
|
1978
|
+
);
|
|
1979
|
+
}
|
|
1980
|
+
function SidebarHeader({ className, ...props }) {
|
|
1981
|
+
return /* @__PURE__ */ jsx(
|
|
1982
|
+
"div",
|
|
1983
|
+
{
|
|
1984
|
+
"data-slot": "sidebar-header",
|
|
1985
|
+
"data-sidebar": "header",
|
|
1986
|
+
className: cn("flex flex-col gap-2 p-2", className),
|
|
1987
|
+
...props
|
|
1988
|
+
}
|
|
1989
|
+
);
|
|
1990
|
+
}
|
|
1991
|
+
function SidebarFooter({ className, ...props }) {
|
|
1992
|
+
return /* @__PURE__ */ jsx(
|
|
1993
|
+
"div",
|
|
1994
|
+
{
|
|
1995
|
+
"data-slot": "sidebar-footer",
|
|
1996
|
+
"data-sidebar": "footer",
|
|
1997
|
+
className: cn("flex flex-col gap-2 p-2", className),
|
|
1998
|
+
...props
|
|
1999
|
+
}
|
|
2000
|
+
);
|
|
2001
|
+
}
|
|
2002
|
+
function SidebarSeparator({
|
|
2003
|
+
className,
|
|
2004
|
+
...props
|
|
2005
|
+
}) {
|
|
2006
|
+
return /* @__PURE__ */ jsx(
|
|
2007
|
+
Separator3,
|
|
2008
|
+
{
|
|
2009
|
+
"data-slot": "sidebar-separator",
|
|
2010
|
+
"data-sidebar": "separator",
|
|
2011
|
+
className: cn("bg-sidebar-border mx-2 w-auto", className),
|
|
2012
|
+
...props
|
|
2013
|
+
}
|
|
2014
|
+
);
|
|
2015
|
+
}
|
|
2016
|
+
function SidebarContent({ className, ...props }) {
|
|
2017
|
+
return /* @__PURE__ */ jsx(
|
|
2018
|
+
"div",
|
|
2019
|
+
{
|
|
2020
|
+
"data-slot": "sidebar-content",
|
|
2021
|
+
"data-sidebar": "content",
|
|
2022
|
+
className: cn(
|
|
2023
|
+
"flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden",
|
|
2024
|
+
className
|
|
2025
|
+
),
|
|
2026
|
+
...props
|
|
2027
|
+
}
|
|
2028
|
+
);
|
|
2029
|
+
}
|
|
2030
|
+
function SidebarGroup({ className, ...props }) {
|
|
2031
|
+
return /* @__PURE__ */ jsx(
|
|
2032
|
+
"div",
|
|
2033
|
+
{
|
|
2034
|
+
"data-slot": "sidebar-group",
|
|
2035
|
+
"data-sidebar": "group",
|
|
2036
|
+
className: cn("relative flex w-full min-w-0 flex-col p-2", className),
|
|
2037
|
+
...props
|
|
2038
|
+
}
|
|
2039
|
+
);
|
|
2040
|
+
}
|
|
2041
|
+
function SidebarGroupLabel({
|
|
2042
|
+
className,
|
|
2043
|
+
asChild = false,
|
|
2044
|
+
...props
|
|
2045
|
+
}) {
|
|
2046
|
+
const Comp = asChild ? Slot : "div";
|
|
2047
|
+
return /* @__PURE__ */ jsx(
|
|
2048
|
+
Comp,
|
|
2049
|
+
{
|
|
2050
|
+
"data-slot": "sidebar-group-label",
|
|
2051
|
+
"data-sidebar": "group-label",
|
|
2052
|
+
className: cn(
|
|
2053
|
+
"text-sidebar-foreground/70 ring-sidebar-ring flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium outline-hidden transition-[margin,opacity] duration-200 ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0",
|
|
2054
|
+
"group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0",
|
|
2055
|
+
className
|
|
2056
|
+
),
|
|
2057
|
+
...props
|
|
2058
|
+
}
|
|
2059
|
+
);
|
|
2060
|
+
}
|
|
2061
|
+
function SidebarGroupAction({
|
|
2062
|
+
className,
|
|
2063
|
+
asChild = false,
|
|
2064
|
+
...props
|
|
2065
|
+
}) {
|
|
2066
|
+
const Comp = asChild ? Slot : "button";
|
|
2067
|
+
return /* @__PURE__ */ jsx(
|
|
2068
|
+
Comp,
|
|
2069
|
+
{
|
|
2070
|
+
"data-slot": "sidebar-group-action",
|
|
2071
|
+
"data-sidebar": "group-action",
|
|
2072
|
+
className: cn(
|
|
2073
|
+
"text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground absolute top-3.5 right-3 flex aspect-square w-5 items-center justify-center rounded-md p-0 outline-hidden transition-transform focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0",
|
|
2074
|
+
// Increases the hit area of the button on mobile.
|
|
2075
|
+
"after:absolute after:-inset-2 md:after:hidden",
|
|
2076
|
+
"group-data-[collapsible=icon]:hidden",
|
|
2077
|
+
className
|
|
2078
|
+
),
|
|
2079
|
+
...props
|
|
2080
|
+
}
|
|
2081
|
+
);
|
|
2082
|
+
}
|
|
2083
|
+
function SidebarGroupContent({
|
|
2084
|
+
className,
|
|
2085
|
+
...props
|
|
2086
|
+
}) {
|
|
2087
|
+
return /* @__PURE__ */ jsx(
|
|
2088
|
+
"div",
|
|
2089
|
+
{
|
|
2090
|
+
"data-slot": "sidebar-group-content",
|
|
2091
|
+
"data-sidebar": "group-content",
|
|
2092
|
+
className: cn("w-full text-sm", className),
|
|
2093
|
+
...props
|
|
2094
|
+
}
|
|
2095
|
+
);
|
|
2096
|
+
}
|
|
2097
|
+
function SidebarMenu({ className, ...props }) {
|
|
2098
|
+
return /* @__PURE__ */ jsx(
|
|
2099
|
+
"ul",
|
|
2100
|
+
{
|
|
2101
|
+
"data-slot": "sidebar-menu",
|
|
2102
|
+
"data-sidebar": "menu",
|
|
2103
|
+
className: cn("flex w-full min-w-0 flex-col gap-1", className),
|
|
2104
|
+
...props
|
|
2105
|
+
}
|
|
2106
|
+
);
|
|
2107
|
+
}
|
|
2108
|
+
function SidebarMenuItem({ className, ...props }) {
|
|
2109
|
+
return /* @__PURE__ */ jsx(
|
|
2110
|
+
"li",
|
|
2111
|
+
{
|
|
2112
|
+
"data-slot": "sidebar-menu-item",
|
|
2113
|
+
"data-sidebar": "menu-item",
|
|
2114
|
+
className: cn("group/menu-item relative", className),
|
|
2115
|
+
...props
|
|
2116
|
+
}
|
|
2117
|
+
);
|
|
2118
|
+
}
|
|
2119
|
+
var sidebarMenuButtonVariants = cva(
|
|
2120
|
+
"peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-hidden 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",
|
|
2121
|
+
{
|
|
2122
|
+
variants: {
|
|
2123
|
+
variant: {
|
|
2124
|
+
default: "hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",
|
|
2125
|
+
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))]"
|
|
2126
|
+
},
|
|
2127
|
+
size: {
|
|
2128
|
+
default: "h-8 text-sm",
|
|
2129
|
+
sm: "h-7 text-xs",
|
|
2130
|
+
lg: "h-12 text-sm group-data-[collapsible=icon]:p-0!"
|
|
2131
|
+
}
|
|
2132
|
+
},
|
|
2133
|
+
defaultVariants: {
|
|
2134
|
+
variant: "default",
|
|
2135
|
+
size: "default"
|
|
2136
|
+
}
|
|
2137
|
+
}
|
|
2138
|
+
);
|
|
2139
|
+
function SidebarMenuButton({
|
|
2140
|
+
asChild = false,
|
|
2141
|
+
isActive = false,
|
|
2142
|
+
variant = "default",
|
|
2143
|
+
size = "default",
|
|
2144
|
+
tooltip,
|
|
2145
|
+
className,
|
|
2146
|
+
...props
|
|
2147
|
+
}) {
|
|
2148
|
+
const Comp = asChild ? Slot : "button";
|
|
2149
|
+
const { isMobile, state } = useSidebar();
|
|
2150
|
+
const button = /* @__PURE__ */ jsx(
|
|
2151
|
+
Comp,
|
|
2152
|
+
{
|
|
2153
|
+
"data-slot": "sidebar-menu-button",
|
|
2154
|
+
"data-sidebar": "menu-button",
|
|
2155
|
+
"data-size": size,
|
|
2156
|
+
"data-active": isActive,
|
|
2157
|
+
className: cn(sidebarMenuButtonVariants({ variant, size }), className),
|
|
2158
|
+
...props
|
|
2159
|
+
}
|
|
2160
|
+
);
|
|
2161
|
+
if (!tooltip) {
|
|
2162
|
+
return button;
|
|
2163
|
+
}
|
|
2164
|
+
if (typeof tooltip === "string") {
|
|
2165
|
+
tooltip = {
|
|
2166
|
+
children: tooltip
|
|
2167
|
+
};
|
|
2168
|
+
}
|
|
2169
|
+
return /* @__PURE__ */ jsxs(Tooltip, { children: [
|
|
2170
|
+
/* @__PURE__ */ jsx(TooltipTrigger, { asChild: true, children: button }),
|
|
2171
|
+
/* @__PURE__ */ jsx(
|
|
2172
|
+
TooltipContent,
|
|
2173
|
+
{
|
|
2174
|
+
side: "right",
|
|
2175
|
+
align: "center",
|
|
2176
|
+
hidden: state !== "collapsed" || isMobile,
|
|
2177
|
+
...tooltip
|
|
2178
|
+
}
|
|
2179
|
+
)
|
|
2180
|
+
] });
|
|
2181
|
+
}
|
|
2182
|
+
function SidebarMenuAction({
|
|
2183
|
+
className,
|
|
2184
|
+
asChild = false,
|
|
2185
|
+
showOnHover = false,
|
|
2186
|
+
...props
|
|
2187
|
+
}) {
|
|
2188
|
+
const Comp = asChild ? Slot : "button";
|
|
2189
|
+
return /* @__PURE__ */ jsx(
|
|
2190
|
+
Comp,
|
|
2191
|
+
{
|
|
2192
|
+
"data-slot": "sidebar-menu-action",
|
|
2193
|
+
"data-sidebar": "menu-action",
|
|
2194
|
+
className: cn(
|
|
2195
|
+
"text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground peer-hover/menu-button:text-sidebar-accent-foreground absolute top-1.5 right-1 flex aspect-square w-5 items-center justify-center rounded-md p-0 outline-hidden transition-transform focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0",
|
|
2196
|
+
// Increases the hit area of the button on mobile.
|
|
2197
|
+
"after:absolute after:-inset-2 md:after:hidden",
|
|
2198
|
+
"peer-data-[size=sm]/menu-button:top-1",
|
|
2199
|
+
"peer-data-[size=default]/menu-button:top-1.5",
|
|
2200
|
+
"peer-data-[size=lg]/menu-button:top-2.5",
|
|
2201
|
+
"group-data-[collapsible=icon]:hidden",
|
|
2202
|
+
showOnHover && "peer-data-[active=true]/menu-button:text-sidebar-accent-foreground group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-[state=open]:opacity-100 md:opacity-0",
|
|
2203
|
+
className
|
|
2204
|
+
),
|
|
2205
|
+
...props
|
|
2206
|
+
}
|
|
2207
|
+
);
|
|
2208
|
+
}
|
|
2209
|
+
function SidebarMenuBadge({
|
|
2210
|
+
className,
|
|
2211
|
+
...props
|
|
2212
|
+
}) {
|
|
2213
|
+
return /* @__PURE__ */ jsx(
|
|
2214
|
+
"div",
|
|
2215
|
+
{
|
|
2216
|
+
"data-slot": "sidebar-menu-badge",
|
|
2217
|
+
"data-sidebar": "menu-badge",
|
|
2218
|
+
className: cn(
|
|
2219
|
+
"text-sidebar-foreground pointer-events-none absolute right-1 flex h-5 min-w-5 items-center justify-center rounded-md px-1 text-xs font-medium tabular-nums select-none",
|
|
2220
|
+
"peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[active=true]/menu-button:text-sidebar-accent-foreground",
|
|
2221
|
+
"peer-data-[size=sm]/menu-button:top-1",
|
|
2222
|
+
"peer-data-[size=default]/menu-button:top-1.5",
|
|
2223
|
+
"peer-data-[size=lg]/menu-button:top-2.5",
|
|
2224
|
+
"group-data-[collapsible=icon]:hidden",
|
|
2225
|
+
className
|
|
2226
|
+
),
|
|
2227
|
+
...props
|
|
2228
|
+
}
|
|
2229
|
+
);
|
|
2230
|
+
}
|
|
2231
|
+
function SidebarMenuSkeleton({
|
|
2232
|
+
className,
|
|
2233
|
+
showIcon = false,
|
|
2234
|
+
...props
|
|
2235
|
+
}) {
|
|
2236
|
+
const width = React5.useMemo(() => {
|
|
2237
|
+
return `${Math.floor(Math.random() * 40) + 50}%`;
|
|
2238
|
+
}, []);
|
|
2239
|
+
return /* @__PURE__ */ jsxs(
|
|
2240
|
+
"div",
|
|
2241
|
+
{
|
|
2242
|
+
"data-slot": "sidebar-menu-skeleton",
|
|
2243
|
+
"data-sidebar": "menu-skeleton",
|
|
2244
|
+
className: cn("flex h-8 items-center gap-2 rounded-md px-2", className),
|
|
2245
|
+
...props,
|
|
2246
|
+
children: [
|
|
2247
|
+
showIcon && /* @__PURE__ */ jsx(
|
|
2248
|
+
Skeleton,
|
|
2249
|
+
{
|
|
2250
|
+
className: "size-4 rounded-md",
|
|
2251
|
+
"data-sidebar": "menu-skeleton-icon"
|
|
2252
|
+
}
|
|
2253
|
+
),
|
|
2254
|
+
/* @__PURE__ */ jsx(
|
|
2255
|
+
Skeleton,
|
|
2256
|
+
{
|
|
2257
|
+
className: "h-4 max-w-(--skeleton-width) flex-1",
|
|
2258
|
+
"data-sidebar": "menu-skeleton-text",
|
|
2259
|
+
style: {
|
|
2260
|
+
"--skeleton-width": width
|
|
2261
|
+
}
|
|
2262
|
+
}
|
|
2263
|
+
)
|
|
2264
|
+
]
|
|
2265
|
+
}
|
|
2266
|
+
);
|
|
2267
|
+
}
|
|
2268
|
+
function SidebarMenuSub({ className, ...props }) {
|
|
2269
|
+
return /* @__PURE__ */ jsx(
|
|
2270
|
+
"ul",
|
|
2271
|
+
{
|
|
2272
|
+
"data-slot": "sidebar-menu-sub",
|
|
2273
|
+
"data-sidebar": "menu-sub",
|
|
2274
|
+
className: cn(
|
|
2275
|
+
"border-sidebar-border mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l px-2.5 py-0.5",
|
|
2276
|
+
"group-data-[collapsible=icon]:hidden",
|
|
2277
|
+
className
|
|
2278
|
+
),
|
|
2279
|
+
...props
|
|
2280
|
+
}
|
|
2281
|
+
);
|
|
2282
|
+
}
|
|
2283
|
+
function SidebarMenuSubItem({
|
|
2284
|
+
className,
|
|
2285
|
+
...props
|
|
2286
|
+
}) {
|
|
2287
|
+
return /* @__PURE__ */ jsx(
|
|
2288
|
+
"li",
|
|
2289
|
+
{
|
|
2290
|
+
"data-slot": "sidebar-menu-sub-item",
|
|
2291
|
+
"data-sidebar": "menu-sub-item",
|
|
2292
|
+
className: cn("group/menu-sub-item relative", className),
|
|
2293
|
+
...props
|
|
2294
|
+
}
|
|
2295
|
+
);
|
|
2296
|
+
}
|
|
2297
|
+
function SidebarMenuSubButton({
|
|
2298
|
+
asChild = false,
|
|
2299
|
+
size = "md",
|
|
2300
|
+
isActive = false,
|
|
2301
|
+
className,
|
|
2302
|
+
...props
|
|
2303
|
+
}) {
|
|
2304
|
+
const Comp = asChild ? Slot : "a";
|
|
2305
|
+
return /* @__PURE__ */ jsx(
|
|
2306
|
+
Comp,
|
|
2307
|
+
{
|
|
2308
|
+
"data-slot": "sidebar-menu-sub-button",
|
|
2309
|
+
"data-sidebar": "menu-sub-button",
|
|
2310
|
+
"data-size": size,
|
|
2311
|
+
"data-active": isActive,
|
|
2312
|
+
className: cn(
|
|
2313
|
+
"text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground active:bg-sidebar-accent active:text-sidebar-accent-foreground [&>svg]:text-sidebar-accent-foreground flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 outline-hidden focus-visible:ring-2 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",
|
|
2314
|
+
"data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground",
|
|
2315
|
+
size === "sm" && "text-xs",
|
|
2316
|
+
size === "md" && "text-sm",
|
|
2317
|
+
"group-data-[collapsible=icon]:hidden",
|
|
2318
|
+
className
|
|
2319
|
+
),
|
|
2320
|
+
...props
|
|
2321
|
+
}
|
|
2322
|
+
);
|
|
2323
|
+
}
|
|
2324
|
+
var Toaster = ({ ...props }) => {
|
|
2325
|
+
const { theme = "system" } = useTheme();
|
|
2326
|
+
return /* @__PURE__ */ jsx(
|
|
2327
|
+
Toaster$1,
|
|
2328
|
+
{
|
|
2329
|
+
theme,
|
|
2330
|
+
className: "toaster group",
|
|
2331
|
+
toastOptions: {
|
|
2332
|
+
classNames: {
|
|
2333
|
+
toast: "group toast group-[.toaster]:bg-background group-[.toaster]:text-foreground group-[.toaster]:border-border group-[.toaster]:shadow-lg",
|
|
2334
|
+
description: "group-[.toast]:text-muted-foreground",
|
|
2335
|
+
actionButton: "group-[.toast]:bg-primary group-[.toast]:text-primary-foreground font-medium",
|
|
2336
|
+
cancelButton: "group-[.toast]:bg-muted group-[.toast]:text-muted-foreground font-medium"
|
|
2337
|
+
}
|
|
2338
|
+
},
|
|
2339
|
+
...props
|
|
2340
|
+
}
|
|
2341
|
+
);
|
|
2342
|
+
};
|
|
2343
|
+
var spinnerVariants = cva("relative block opacity-[0.65]", {
|
|
2344
|
+
variants: {
|
|
2345
|
+
size: {
|
|
2346
|
+
sm: "w-4 h-4",
|
|
2347
|
+
md: "w-6 h-6",
|
|
2348
|
+
lg: "w-8 h-8"
|
|
2349
|
+
}
|
|
2350
|
+
},
|
|
2351
|
+
defaultVariants: {
|
|
2352
|
+
size: "sm"
|
|
2353
|
+
}
|
|
2354
|
+
});
|
|
2355
|
+
var Spinner = React5.forwardRef(
|
|
2356
|
+
({ className, size, loading = true, asChild = false, ...props }, ref) => {
|
|
2357
|
+
const Comp = asChild ? Slot : "span";
|
|
2358
|
+
const [bgColorClass, filteredClassName] = React5.useMemo(() => {
|
|
2359
|
+
const bgClass = className?.match(/(?:dark:bg-|bg-)[a-zA-Z0-9-]+/g) || [];
|
|
2360
|
+
const filteredClasses = className?.replace(/(?:dark:bg-|bg-)[a-zA-Z0-9-]+/g, "").trim();
|
|
2361
|
+
return [bgClass, filteredClasses];
|
|
2362
|
+
}, [className]);
|
|
2363
|
+
if (!loading) return null;
|
|
2364
|
+
return /* @__PURE__ */ jsx(
|
|
2365
|
+
Comp,
|
|
2366
|
+
{
|
|
2367
|
+
className: cn(spinnerVariants({ size, className: filteredClassName })),
|
|
2368
|
+
ref,
|
|
2369
|
+
...props,
|
|
2370
|
+
children: Array.from({ length: 8 }).map((_, i) => /* @__PURE__ */ jsx(
|
|
2371
|
+
"span",
|
|
2372
|
+
{
|
|
2373
|
+
className: "absolute top-0 left-1/2 w-[12.5%] h-full animate-spinner-leaf-fade",
|
|
2374
|
+
style: {
|
|
2375
|
+
transform: `rotate(${i * 45}deg)`,
|
|
2376
|
+
animationDelay: `${-(7 - i) * 100}ms`
|
|
2377
|
+
},
|
|
2378
|
+
children: /* @__PURE__ */ jsx(
|
|
2379
|
+
"span",
|
|
2380
|
+
{
|
|
2381
|
+
className: cn("block w-full h-[30%] rounded-full", bgColorClass)
|
|
2382
|
+
}
|
|
2383
|
+
)
|
|
2384
|
+
},
|
|
2385
|
+
i
|
|
2386
|
+
))
|
|
2387
|
+
}
|
|
2388
|
+
);
|
|
2389
|
+
}
|
|
2390
|
+
);
|
|
2391
|
+
Spinner.displayName = "Spinner";
|
|
2392
|
+
var Switch = React5.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
2393
|
+
SwitchPrimitives.Root,
|
|
2394
|
+
{
|
|
2395
|
+
className: cn(
|
|
2396
|
+
"peer inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent shadow-sm transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",
|
|
2397
|
+
className
|
|
2398
|
+
),
|
|
2399
|
+
...props,
|
|
2400
|
+
ref,
|
|
2401
|
+
children: /* @__PURE__ */ jsx(
|
|
2402
|
+
SwitchPrimitives.Thumb,
|
|
2403
|
+
{
|
|
2404
|
+
className: cn(
|
|
2405
|
+
"pointer-events-none block h-4 w-4 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-4 data-[state=unchecked]:translate-x-0"
|
|
2406
|
+
)
|
|
2407
|
+
}
|
|
2408
|
+
)
|
|
2409
|
+
}
|
|
2410
|
+
));
|
|
2411
|
+
Switch.displayName = SwitchPrimitives.Root.displayName;
|
|
2412
|
+
function Table({ className, ...props }) {
|
|
2413
|
+
return /* @__PURE__ */ jsx(
|
|
2414
|
+
"div",
|
|
2415
|
+
{
|
|
2416
|
+
"data-slot": "table-container",
|
|
2417
|
+
className: "relative w-full overflow-x-auto",
|
|
2418
|
+
children: /* @__PURE__ */ jsx(
|
|
2419
|
+
"table",
|
|
2420
|
+
{
|
|
2421
|
+
"data-slot": "table",
|
|
2422
|
+
className: cn("w-full caption-bottom text-sm", className),
|
|
2423
|
+
...props
|
|
2424
|
+
}
|
|
2425
|
+
)
|
|
2426
|
+
}
|
|
2427
|
+
);
|
|
2428
|
+
}
|
|
2429
|
+
function TableHeader({ className, ...props }) {
|
|
2430
|
+
return /* @__PURE__ */ jsx(
|
|
2431
|
+
"thead",
|
|
2432
|
+
{
|
|
2433
|
+
"data-slot": "table-header",
|
|
2434
|
+
className: cn("[&_tr]:border-b", className),
|
|
2435
|
+
...props
|
|
2436
|
+
}
|
|
2437
|
+
);
|
|
2438
|
+
}
|
|
2439
|
+
function TableBody({ className, ...props }) {
|
|
2440
|
+
return /* @__PURE__ */ jsx(
|
|
2441
|
+
"tbody",
|
|
2442
|
+
{
|
|
2443
|
+
"data-slot": "table-body",
|
|
2444
|
+
className: cn("[&_tr:last-child]:border-0", className),
|
|
2445
|
+
...props
|
|
2446
|
+
}
|
|
2447
|
+
);
|
|
2448
|
+
}
|
|
2449
|
+
function TableFooter({ className, ...props }) {
|
|
2450
|
+
return /* @__PURE__ */ jsx(
|
|
2451
|
+
"tfoot",
|
|
2452
|
+
{
|
|
2453
|
+
"data-slot": "table-footer",
|
|
2454
|
+
className: cn(
|
|
2455
|
+
"bg-muted/50 border-t font-medium [&>tr]:last:border-b-0",
|
|
2456
|
+
className
|
|
2457
|
+
),
|
|
2458
|
+
...props
|
|
2459
|
+
}
|
|
2460
|
+
);
|
|
2461
|
+
}
|
|
2462
|
+
function TableRow({ className, ...props }) {
|
|
2463
|
+
return /* @__PURE__ */ jsx(
|
|
2464
|
+
"tr",
|
|
2465
|
+
{
|
|
2466
|
+
"data-slot": "table-row",
|
|
2467
|
+
className: cn(
|
|
2468
|
+
"hover:bg-muted/50 data-[state=selected]:bg-muted border-b transition-colors",
|
|
2469
|
+
className
|
|
2470
|
+
),
|
|
2471
|
+
...props
|
|
2472
|
+
}
|
|
2473
|
+
);
|
|
2474
|
+
}
|
|
2475
|
+
function TableHead({ className, ...props }) {
|
|
2476
|
+
return /* @__PURE__ */ jsx(
|
|
2477
|
+
"th",
|
|
2478
|
+
{
|
|
2479
|
+
"data-slot": "table-head",
|
|
2480
|
+
className: cn(
|
|
2481
|
+
"text-muted-foreground h-10 px-2 text-left align-middle font-medium whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",
|
|
2482
|
+
className
|
|
2483
|
+
),
|
|
2484
|
+
...props
|
|
2485
|
+
}
|
|
2486
|
+
);
|
|
2487
|
+
}
|
|
2488
|
+
function TableCell({ className, ...props }) {
|
|
2489
|
+
return /* @__PURE__ */ jsx(
|
|
2490
|
+
"td",
|
|
2491
|
+
{
|
|
2492
|
+
"data-slot": "table-cell",
|
|
2493
|
+
className: cn(
|
|
2494
|
+
"p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",
|
|
2495
|
+
className
|
|
2496
|
+
),
|
|
2497
|
+
...props
|
|
2498
|
+
}
|
|
2499
|
+
);
|
|
2500
|
+
}
|
|
2501
|
+
function TableCaption({
|
|
2502
|
+
className,
|
|
2503
|
+
...props
|
|
2504
|
+
}) {
|
|
2505
|
+
return /* @__PURE__ */ jsx(
|
|
2506
|
+
"caption",
|
|
2507
|
+
{
|
|
2508
|
+
"data-slot": "table-caption",
|
|
2509
|
+
className: cn("text-muted-foreground mt-4 text-sm", className),
|
|
2510
|
+
...props
|
|
2511
|
+
}
|
|
2512
|
+
);
|
|
2513
|
+
}
|
|
2514
|
+
function Tabs({
|
|
2515
|
+
className,
|
|
2516
|
+
...props
|
|
2517
|
+
}) {
|
|
2518
|
+
return /* @__PURE__ */ jsx(
|
|
2519
|
+
TabsPrimitive.Root,
|
|
2520
|
+
{
|
|
2521
|
+
"data-slot": "tabs",
|
|
2522
|
+
className: cn("flex flex-col gap-2", className),
|
|
2523
|
+
...props
|
|
2524
|
+
}
|
|
2525
|
+
);
|
|
2526
|
+
}
|
|
2527
|
+
function TabsList({
|
|
2528
|
+
className,
|
|
2529
|
+
...props
|
|
2530
|
+
}) {
|
|
2531
|
+
return /* @__PURE__ */ jsx(
|
|
2532
|
+
TabsPrimitive.List,
|
|
2533
|
+
{
|
|
2534
|
+
"data-slot": "tabs-list",
|
|
2535
|
+
className: cn(
|
|
2536
|
+
"bg-muted text-muted-foreground inline-flex h-9 w-fit items-center justify-center rounded-lg p-[3px]",
|
|
2537
|
+
className
|
|
2538
|
+
),
|
|
2539
|
+
...props
|
|
2540
|
+
}
|
|
2541
|
+
);
|
|
2542
|
+
}
|
|
2543
|
+
function TabsTrigger({
|
|
2544
|
+
className,
|
|
2545
|
+
...props
|
|
2546
|
+
}) {
|
|
2547
|
+
return /* @__PURE__ */ jsx(
|
|
2548
|
+
TabsPrimitive.Trigger,
|
|
2549
|
+
{
|
|
2550
|
+
"data-slot": "tabs-trigger",
|
|
2551
|
+
className: cn(
|
|
2552
|
+
"data-[state=active]:bg-background dark:data-[state=active]:text-foreground focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring dark:data-[state=active]:border-input dark:data-[state=active]:bg-input/30 text-foreground dark:text-muted-foreground inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:ring-[3px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow-sm [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
2553
|
+
className
|
|
2554
|
+
),
|
|
2555
|
+
...props
|
|
2556
|
+
}
|
|
2557
|
+
);
|
|
2558
|
+
}
|
|
2559
|
+
function TabsContent({
|
|
2560
|
+
className,
|
|
2561
|
+
...props
|
|
2562
|
+
}) {
|
|
2563
|
+
return /* @__PURE__ */ jsx(
|
|
2564
|
+
TabsPrimitive.Content,
|
|
2565
|
+
{
|
|
2566
|
+
"data-slot": "tabs-content",
|
|
2567
|
+
className: cn("flex-1 outline-none", className),
|
|
2568
|
+
...props
|
|
2569
|
+
}
|
|
2570
|
+
);
|
|
2571
|
+
}
|
|
2572
|
+
var Textarea = React5.forwardRef(({ className, ...props }, ref) => {
|
|
2573
|
+
return /* @__PURE__ */ jsx(
|
|
2574
|
+
"textarea",
|
|
2575
|
+
{
|
|
2576
|
+
className: cn(
|
|
2577
|
+
"flex min-h-[60px] w-full rounded-md border border-input bg-transparent px-3 py-2 text-base shadow-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",
|
|
2578
|
+
className
|
|
2579
|
+
),
|
|
2580
|
+
ref,
|
|
2581
|
+
...props
|
|
2582
|
+
}
|
|
2583
|
+
);
|
|
2584
|
+
});
|
|
2585
|
+
Textarea.displayName = "Textarea";
|
|
2586
|
+
var ToastProvider = ToastPrimitives.Provider;
|
|
2587
|
+
var ToastViewport = React5.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
2588
|
+
ToastPrimitives.Viewport,
|
|
2589
|
+
{
|
|
2590
|
+
ref,
|
|
2591
|
+
className: cn(
|
|
2592
|
+
"fixed bottom-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:right-0 sm:flex-col md:max-w-[420px]",
|
|
2593
|
+
className
|
|
2594
|
+
),
|
|
2595
|
+
...props
|
|
2596
|
+
}
|
|
2597
|
+
));
|
|
2598
|
+
ToastViewport.displayName = ToastPrimitives.Viewport.displayName;
|
|
2599
|
+
var toastVariants = cva(
|
|
2600
|
+
"group pointer-events-auto relative flex w-full items-center justify-between space-x-2 overflow-hidden rounded-md border p-4 pr-6 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-bottom-full data-[state=open]:sm:slide-in-from-bottom-full",
|
|
2601
|
+
{
|
|
2602
|
+
variants: {
|
|
2603
|
+
variant: {
|
|
2604
|
+
default: "border bg-background text-foreground",
|
|
2605
|
+
destructive: "destructive group border-destructive bg-destructive text-destructive-foreground"
|
|
2606
|
+
},
|
|
2607
|
+
position: {
|
|
2608
|
+
default: "bottom-0 right-0 flex fixed md:max-w-[420px] md:bottom-4 md:right-4"
|
|
2609
|
+
}
|
|
2610
|
+
},
|
|
2611
|
+
defaultVariants: {
|
|
2612
|
+
variant: "default"
|
|
2613
|
+
}
|
|
2614
|
+
}
|
|
2615
|
+
);
|
|
2616
|
+
var Toast = React5.forwardRef(({ className, variant, position, ...props }, ref) => {
|
|
2617
|
+
return /* @__PURE__ */ jsx(
|
|
2618
|
+
ToastPrimitives.Root,
|
|
2619
|
+
{
|
|
2620
|
+
ref,
|
|
2621
|
+
className: cn(toastVariants({ variant, position }), className),
|
|
2622
|
+
...props
|
|
2623
|
+
}
|
|
2624
|
+
);
|
|
2625
|
+
});
|
|
2626
|
+
Toast.displayName = ToastPrimitives.Root.displayName;
|
|
2627
|
+
var ToastAction = React5.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
2628
|
+
ToastPrimitives.Action,
|
|
2629
|
+
{
|
|
2630
|
+
ref,
|
|
2631
|
+
className: cn(
|
|
2632
|
+
"inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium transition-colors hover:bg-secondary focus:outline-none focus:ring-1 focus:ring-ring disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-muted/40 group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus:ring-destructive",
|
|
2633
|
+
className
|
|
2634
|
+
),
|
|
2635
|
+
...props
|
|
2636
|
+
}
|
|
2637
|
+
));
|
|
2638
|
+
ToastAction.displayName = ToastPrimitives.Action.displayName;
|
|
2639
|
+
var ToastClose = React5.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
2640
|
+
ToastPrimitives.Close,
|
|
2641
|
+
{
|
|
2642
|
+
ref,
|
|
2643
|
+
className: cn(
|
|
2644
|
+
"absolute right-1 top-1 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-1 group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",
|
|
2645
|
+
className
|
|
2646
|
+
),
|
|
2647
|
+
"toast-close": "",
|
|
2648
|
+
...props,
|
|
2649
|
+
children: /* @__PURE__ */ jsx(X, { className: "h-4 w-4" })
|
|
2650
|
+
}
|
|
2651
|
+
));
|
|
2652
|
+
ToastClose.displayName = ToastPrimitives.Close.displayName;
|
|
2653
|
+
var ToastTitle = React5.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
2654
|
+
ToastPrimitives.Title,
|
|
2655
|
+
{
|
|
2656
|
+
ref,
|
|
2657
|
+
className: cn("text-sm font-semibold [&+div]:text-xs", className),
|
|
2658
|
+
...props
|
|
2659
|
+
}
|
|
2660
|
+
));
|
|
2661
|
+
ToastTitle.displayName = ToastPrimitives.Title.displayName;
|
|
2662
|
+
var ToastDescription = React5.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
2663
|
+
ToastPrimitives.Description,
|
|
2664
|
+
{
|
|
2665
|
+
ref,
|
|
2666
|
+
className: cn("text-sm opacity-90", className),
|
|
2667
|
+
...props
|
|
2668
|
+
}
|
|
2669
|
+
));
|
|
2670
|
+
ToastDescription.displayName = ToastPrimitives.Description.displayName;
|
|
2671
|
+
function Toaster2() {
|
|
2672
|
+
const { toasts } = useToast();
|
|
2673
|
+
return /* @__PURE__ */ jsxs(ToastProvider, { children: [
|
|
2674
|
+
toasts.map(function({ id, title, description, action, ...props }) {
|
|
2675
|
+
return /* @__PURE__ */ jsxs(Toast, { ...props, children: [
|
|
2676
|
+
/* @__PURE__ */ jsxs("div", { className: "grid gap-1", children: [
|
|
2677
|
+
title && /* @__PURE__ */ jsx(ToastTitle, { children: title }),
|
|
2678
|
+
description && /* @__PURE__ */ jsx(ToastDescription, { children: description })
|
|
2679
|
+
] }),
|
|
2680
|
+
action,
|
|
2681
|
+
/* @__PURE__ */ jsx(ToastClose, {})
|
|
2682
|
+
] }, id);
|
|
2683
|
+
}),
|
|
2684
|
+
/* @__PURE__ */ jsx(ToastViewport, {})
|
|
2685
|
+
] });
|
|
2686
|
+
}
|
|
2687
|
+
var toggleVariants = cva(
|
|
2688
|
+
"inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium hover:bg-muted hover:text-muted-foreground disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0 focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] outline-none transition-[color,box-shadow] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive whitespace-nowrap",
|
|
2689
|
+
{
|
|
2690
|
+
variants: {
|
|
2691
|
+
variant: {
|
|
2692
|
+
default: "bg-transparent",
|
|
2693
|
+
outline: "border border-input bg-transparent shadow-xs hover:bg-accent hover:text-accent-foreground"
|
|
2694
|
+
},
|
|
2695
|
+
size: {
|
|
2696
|
+
default: "h-9 px-2 min-w-9",
|
|
2697
|
+
sm: "h-8 px-1.5 min-w-8",
|
|
2698
|
+
lg: "h-10 px-2.5 min-w-10"
|
|
2699
|
+
}
|
|
2700
|
+
},
|
|
2701
|
+
defaultVariants: {
|
|
2702
|
+
variant: "default",
|
|
2703
|
+
size: "default"
|
|
2704
|
+
}
|
|
2705
|
+
}
|
|
2706
|
+
);
|
|
2707
|
+
function Toggle({
|
|
2708
|
+
className,
|
|
2709
|
+
variant,
|
|
2710
|
+
size,
|
|
2711
|
+
...props
|
|
2712
|
+
}) {
|
|
2713
|
+
return /* @__PURE__ */ jsx(
|
|
2714
|
+
TogglePrimitive.Root,
|
|
2715
|
+
{
|
|
2716
|
+
"data-slot": "toggle",
|
|
2717
|
+
className: cn(toggleVariants({ variant, size, className })),
|
|
2718
|
+
...props
|
|
2719
|
+
}
|
|
2720
|
+
);
|
|
2721
|
+
}
|
|
2722
|
+
var ToggleGroupContext = React5.createContext({
|
|
2723
|
+
size: "default",
|
|
2724
|
+
variant: "default"
|
|
2725
|
+
});
|
|
2726
|
+
var ToggleGroup = React5.forwardRef(({ className, variant, size, children, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
2727
|
+
ToggleGroupPrimitive.Root,
|
|
2728
|
+
{
|
|
2729
|
+
ref,
|
|
2730
|
+
className: cn("flex items-center justify-center gap-1", className),
|
|
2731
|
+
...props,
|
|
2732
|
+
children: /* @__PURE__ */ jsx(ToggleGroupContext.Provider, { value: { variant, size }, children })
|
|
2733
|
+
}
|
|
2734
|
+
));
|
|
2735
|
+
ToggleGroup.displayName = ToggleGroupPrimitive.Root.displayName;
|
|
2736
|
+
var ToggleGroupItem = React5.forwardRef(({ className, children, variant, size, ...props }, ref) => {
|
|
2737
|
+
const context = React5.useContext(ToggleGroupContext);
|
|
2738
|
+
return /* @__PURE__ */ jsx(
|
|
2739
|
+
ToggleGroupPrimitive.Item,
|
|
2740
|
+
{
|
|
2741
|
+
ref,
|
|
2742
|
+
className: cn(
|
|
2743
|
+
toggleVariants({
|
|
2744
|
+
variant: context.variant || variant,
|
|
2745
|
+
size: context.size || size
|
|
2746
|
+
}),
|
|
2747
|
+
className
|
|
2748
|
+
),
|
|
2749
|
+
...props,
|
|
2750
|
+
children
|
|
2751
|
+
}
|
|
2752
|
+
);
|
|
2753
|
+
});
|
|
2754
|
+
ToggleGroupItem.displayName = ToggleGroupPrimitive.Item.displayName;
|
|
2755
|
+
|
|
2756
|
+
export { Alert, AlertDescription, AlertTitle, Avatar, AvatarFallback, AvatarImage, Badge, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Carousel, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious, ChartContainer, ChartLegend, ChartLegendContent, ChartStyle, ChartTooltip, ChartTooltipContent, Checkbox, Collapsible, CollapsibleContent2 as CollapsibleContent, CollapsibleTrigger2 as CollapsibleTrigger, 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, Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, Input, Label2 as Label, Loader, Pagination, Popover, PopoverContent, PopoverTrigger, Progress, RadioGroup2 as RadioGroup, RadioGroupItem, ScrollArea, ScrollBar, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator3 as 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, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, Toast, ToastAction, ToastClose, ToastDescription, ToastProvider, ToastTitle, ToastViewport, Toaster, Toaster2, Toggle, ToggleGroup, ToggleGroupItem, badgeVariants, buttonVariants, toggleVariants, useFormField, useSidebar };
|
|
2757
|
+
//# sourceMappingURL=chunk-P5E2XNDI.js.map
|
|
2758
|
+
//# sourceMappingURL=chunk-P5E2XNDI.js.map
|