@otfdashkit/ui 0.1.3 → 0.1.5
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 +4 -4
- package/dist/index.d.mts +3064 -0
- package/dist/index.d.ts +3064 -0
- package/dist/index.js +907 -546
- package/dist/index.mjs +774 -415
- package/package.json +11 -4
- package/src/index.ts +2 -1
- package/src/primitives/Button/Button.tsx +2 -131
- package/src/primitives/Chart/Chart.tsx +2 -368
- package/src/primitives/button.tsx +52 -0
- package/src/primitives/chart.tsx +25 -19
package/dist/index.mjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { clsx } from 'clsx';
|
|
2
2
|
import { twMerge } from 'tailwind-merge';
|
|
3
|
-
import * as
|
|
4
|
-
import
|
|
3
|
+
import * as React137 from 'react';
|
|
4
|
+
import React137__default, { createContext, useState, useCallback, useMemo, useId, useRef, useEffect, useContext } from 'react';
|
|
5
5
|
import * as AccordionPrimitive from '@radix-ui/react-accordion';
|
|
6
|
-
import { ChevronDown, ArrowLeft, ArrowRight, Minus, Plus, X, Check, Copy, Search, GripVertical, Circle, ChevronRight, ShoppingCart, Star, ChevronUp, Pipette, EyeOff, Eye, Menu, ChevronLeft, Play, Pause, VolumeX, Volume1, Volume2, Layers, Minimize, Maximize, Heading1, Heading2, Heading3, Bold, Italic, Underline, Code, List, ListOrdered, Quote, Code2, Undo2, Redo2, Link, Table as Table$2, ArrowUpToLine, ArrowDownToLine, ArrowLeftToLine, ArrowRightToLine, Trash2, ChevronLeftIcon, ChevronRightIcon, ChevronDownIcon, MoreHorizontal, Loader2Icon, ArrowUp, ArrowDown, ArrowUpDown, Loader2, TrendingUp, TrendingDown, Send, Pencil, Sun, Moon, Monitor, Palette, LayoutDashboard, FolderOpen, Users, Settings, Bell, BarChart2, CreditCard, HelpCircle, Calendar as Calendar$1, User, LogOut, Upload, ChevronsUpDown, Info, XCircle, AlertTriangle, CheckCircle2, FileText, Archive, Film, FileCode, Image, File, Download, CheckCircle } from 'lucide-react';
|
|
6
|
+
import { ChevronDown, ArrowLeft, ArrowRight, Minus, Plus, X, Check, Copy, Search, GripVertical, Circle, ChevronRight, ShoppingCart, Star, ChevronUp, Pipette, EyeOff, Eye, Menu, ChevronLeft, Play, Pause, VolumeX, Volume1, Volume2, Layers, Minimize, Maximize, Heading1, Heading2, Heading3, Bold, Italic, Underline, Code, List, ListOrdered, Quote, Code2, Undo2, Redo2, Link, Table as Table$2, ArrowUpToLine, ArrowDownToLine, ArrowLeftToLine, ArrowRightToLine, Trash2, ChevronLeftIcon, ChevronRightIcon, ChevronDownIcon, MoreHorizontal, Loader2Icon, ArrowUp, ArrowDown, ArrowUpDown, Loader2, TrendingUp, TrendingDown, Send, Pencil, Sun, Moon, Monitor, Palette, LayoutDashboard, FolderOpen, Users, Settings, Bell, BarChart2, CreditCard, HelpCircle, Calendar as Calendar$1, User, LogOut, Upload, ChevronsUpDown, Info, XCircle, AlertTriangle, CheckCircle2, FileText, Archive, Film, FileCode, Image, File, Download, Columns3, CheckCircle } from 'lucide-react';
|
|
7
7
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
8
8
|
import * as AlertDialogPrimitive from '@radix-ui/react-alert-dialog';
|
|
9
9
|
import { Slot } from '@radix-ui/react-slot';
|
|
@@ -62,16 +62,16 @@ import * as z from 'zod';
|
|
|
62
62
|
import { HexAlphaColorPicker, HexColorPicker, RgbStringColorPicker, HslStringColorPicker } from 'react-colorful';
|
|
63
63
|
import { motion, useScroll, useTransform, useInView, AnimatePresence } from 'motion/react';
|
|
64
64
|
export { AnimatePresence, motion, useInView, useMotionValue, useScroll, useSpring, useTransform } from 'motion/react';
|
|
65
|
+
import { useVirtualizer } from '@tanstack/react-virtual';
|
|
65
66
|
import ReactCrop, { centerCrop, makeAspectCrop } from 'react-image-crop';
|
|
66
67
|
import 'react-image-crop/dist/ReactCrop.css';
|
|
67
|
-
import { useVirtualizer } from '@tanstack/react-virtual';
|
|
68
68
|
|
|
69
69
|
// src/utils/cn.ts
|
|
70
70
|
function cn(...inputs) {
|
|
71
71
|
return twMerge(clsx(inputs));
|
|
72
72
|
}
|
|
73
73
|
var Accordion = AccordionPrimitive.Root;
|
|
74
|
-
var AccordionItem =
|
|
74
|
+
var AccordionItem = React137.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
75
75
|
AccordionPrimitive.Item,
|
|
76
76
|
{
|
|
77
77
|
ref,
|
|
@@ -80,7 +80,7 @@ var AccordionItem = React136.forwardRef(({ className, ...props }, ref) => /* @__
|
|
|
80
80
|
}
|
|
81
81
|
));
|
|
82
82
|
AccordionItem.displayName = "AccordionItem";
|
|
83
|
-
var AccordionTrigger =
|
|
83
|
+
var AccordionTrigger = React137.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsx(AccordionPrimitive.Header, { className: "flex", children: /* @__PURE__ */ jsxs(
|
|
84
84
|
AccordionPrimitive.Trigger,
|
|
85
85
|
{
|
|
86
86
|
ref,
|
|
@@ -96,7 +96,7 @@ var AccordionTrigger = React136.forwardRef(({ className, children, ...props }, r
|
|
|
96
96
|
}
|
|
97
97
|
) }));
|
|
98
98
|
AccordionTrigger.displayName = AccordionPrimitive.Trigger.displayName;
|
|
99
|
-
var AccordionContent =
|
|
99
|
+
var AccordionContent = React137.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
100
100
|
AccordionPrimitive.Content,
|
|
101
101
|
{
|
|
102
102
|
ref,
|
|
@@ -116,29 +116,67 @@ var buttonVariants = cva(
|
|
|
116
116
|
outline: "border border-border bg-transparent hover:bg-accent hover:text-accent-foreground",
|
|
117
117
|
ghost: "hover:bg-accent hover:text-accent-foreground",
|
|
118
118
|
destructive: "bg-destructive text-destructive-foreground hover:bg-destructive/90",
|
|
119
|
-
link: "text-primary underline-offset-4 hover:underline"
|
|
119
|
+
link: "text-primary underline-offset-4 hover:underline",
|
|
120
|
+
gradient: [
|
|
121
|
+
"bg-gradient-to-b from-primary to-[hsl(var(--primary)/0.8)]",
|
|
122
|
+
"text-primary-foreground",
|
|
123
|
+
"shadow-[0_1px_0_0_rgba(255,255,255,0.1)_inset,0_-1px_0_0_rgba(0,0,0,0.25)_inset]",
|
|
124
|
+
"hover:from-[hsl(var(--primary)/0.9)] hover:to-[hsl(var(--primary)/0.7)]",
|
|
125
|
+
"active:from-[hsl(var(--primary)/0.8)] active:to-[hsl(var(--primary)/0.6)]"
|
|
126
|
+
].join(" "),
|
|
127
|
+
texture: [
|
|
128
|
+
"relative border border-border/40",
|
|
129
|
+
"bg-gradient-to-b from-card to-[hsl(var(--card)/0.9)]",
|
|
130
|
+
"text-foreground",
|
|
131
|
+
"shadow-[0_0_0_1px_hsl(var(--border)/0.2)_inset]",
|
|
132
|
+
"hover:border-border/60 hover:bg-accent",
|
|
133
|
+
"active:shadow-none"
|
|
134
|
+
].join(" "),
|
|
135
|
+
// Loud by design: keep for primary CTAs. The sweep keyframe ships in themes/base.css.
|
|
136
|
+
shimmer: [
|
|
137
|
+
"relative isolate overflow-hidden",
|
|
138
|
+
"bg-primary text-primary-foreground",
|
|
139
|
+
"shadow-[0_1px_0_rgba(255,255,255,0.18)_inset,0_-1px_0_rgba(0,0,0,0.25)_inset]",
|
|
140
|
+
"hover:bg-primary/95",
|
|
141
|
+
"before:absolute before:inset-[-1px] before:rounded-[inherit] before:-z-10",
|
|
142
|
+
"before:bg-[conic-gradient(from_0deg,transparent_0deg,transparent_70deg,rgba(255,255,255,0.55)_90deg,transparent_110deg,transparent_360deg)]",
|
|
143
|
+
"before:animate-[shimmer-rotate_2.6s_linear_infinite] motion-reduce:before:animate-none",
|
|
144
|
+
"after:absolute after:inset-0 after:rounded-[inherit] after:pointer-events-none",
|
|
145
|
+
"after:bg-[linear-gradient(115deg,transparent_30%,rgba(255,255,255,0.22)_50%,transparent_70%)]",
|
|
146
|
+
"after:translate-x-[-120%] hover:after:translate-x-[120%] after:transition-transform after:duration-[900ms] after:ease-out"
|
|
147
|
+
].join(" ")
|
|
120
148
|
},
|
|
121
149
|
size: {
|
|
122
150
|
sm: "h-8 px-3 text-xs",
|
|
123
151
|
default: "h-9 px-4 py-2",
|
|
124
152
|
lg: "h-11 px-6 text-base",
|
|
125
|
-
|
|
153
|
+
xl: "h-12 px-8 text-base",
|
|
154
|
+
icon: "h-9 w-9",
|
|
155
|
+
"icon-sm": "h-7 w-7 p-0 text-xs"
|
|
126
156
|
}
|
|
127
157
|
},
|
|
128
158
|
defaultVariants: { variant: "default", size: "default" }
|
|
129
159
|
}
|
|
130
160
|
);
|
|
131
|
-
var Button =
|
|
161
|
+
var Button = React137__default.forwardRef(
|
|
132
162
|
({ className, variant, size, asChild = false, ...props }, ref) => {
|
|
133
163
|
const Comp = asChild ? Slot : "button";
|
|
134
164
|
return /* @__PURE__ */ jsx(Comp, { className: cn(buttonVariants({ variant, size }), className), ref, ...props });
|
|
135
165
|
}
|
|
136
166
|
);
|
|
137
167
|
Button.displayName = "Button";
|
|
168
|
+
var IconButton = React137__default.forwardRef(
|
|
169
|
+
({ icon, label, size = "default", variant = "ghost", className, asChild = false, ...props }, ref) => {
|
|
170
|
+
const Comp = asChild ? Slot : "button";
|
|
171
|
+
const sizeClass = size === "sm" ? "h-7 w-7" : size === "lg" ? "h-10 w-10" : "h-9 w-9";
|
|
172
|
+
return /* @__PURE__ */ jsx(Comp, { ref, "aria-label": label, className: cn(buttonVariants({ variant }), sizeClass, "p-0 shrink-0", className), ...props, children: icon });
|
|
173
|
+
}
|
|
174
|
+
);
|
|
175
|
+
IconButton.displayName = "IconButton";
|
|
138
176
|
var AlertDialog = AlertDialogPrimitive.Root;
|
|
139
177
|
var AlertDialogTrigger = AlertDialogPrimitive.Trigger;
|
|
140
178
|
var AlertDialogPortal = AlertDialogPrimitive.Portal;
|
|
141
|
-
var AlertDialogOverlay =
|
|
179
|
+
var AlertDialogOverlay = React137.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
142
180
|
AlertDialogPrimitive.Overlay,
|
|
143
181
|
{
|
|
144
182
|
className: cn(
|
|
@@ -150,7 +188,7 @@ var AlertDialogOverlay = React136.forwardRef(({ className, ...props }, ref) => /
|
|
|
150
188
|
}
|
|
151
189
|
));
|
|
152
190
|
AlertDialogOverlay.displayName = AlertDialogPrimitive.Overlay.displayName;
|
|
153
|
-
var AlertDialogContent =
|
|
191
|
+
var AlertDialogContent = React137.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxs(AlertDialogPortal, { children: [
|
|
154
192
|
/* @__PURE__ */ jsx(AlertDialogOverlay, {}),
|
|
155
193
|
/* @__PURE__ */ jsx(
|
|
156
194
|
AlertDialogPrimitive.Content,
|
|
@@ -193,7 +231,7 @@ var AlertDialogFooter = ({
|
|
|
193
231
|
}
|
|
194
232
|
);
|
|
195
233
|
AlertDialogFooter.displayName = "AlertDialogFooter";
|
|
196
|
-
var AlertDialogTitle =
|
|
234
|
+
var AlertDialogTitle = React137.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
197
235
|
AlertDialogPrimitive.Title,
|
|
198
236
|
{
|
|
199
237
|
ref,
|
|
@@ -202,7 +240,7 @@ var AlertDialogTitle = React136.forwardRef(({ className, ...props }, ref) => /*
|
|
|
202
240
|
}
|
|
203
241
|
));
|
|
204
242
|
AlertDialogTitle.displayName = AlertDialogPrimitive.Title.displayName;
|
|
205
|
-
var AlertDialogDescription =
|
|
243
|
+
var AlertDialogDescription = React137.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
206
244
|
AlertDialogPrimitive.Description,
|
|
207
245
|
{
|
|
208
246
|
ref,
|
|
@@ -211,7 +249,7 @@ var AlertDialogDescription = React136.forwardRef(({ className, ...props }, ref)
|
|
|
211
249
|
}
|
|
212
250
|
));
|
|
213
251
|
AlertDialogDescription.displayName = AlertDialogPrimitive.Description.displayName;
|
|
214
|
-
var AlertDialogAction =
|
|
252
|
+
var AlertDialogAction = React137.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
215
253
|
AlertDialogPrimitive.Action,
|
|
216
254
|
{
|
|
217
255
|
ref,
|
|
@@ -220,7 +258,7 @@ var AlertDialogAction = React136.forwardRef(({ className, ...props }, ref) => /*
|
|
|
220
258
|
}
|
|
221
259
|
));
|
|
222
260
|
AlertDialogAction.displayName = AlertDialogPrimitive.Action.displayName;
|
|
223
|
-
var AlertDialogCancel =
|
|
261
|
+
var AlertDialogCancel = React137.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
224
262
|
AlertDialogPrimitive.Cancel,
|
|
225
263
|
{
|
|
226
264
|
ref,
|
|
@@ -247,7 +285,7 @@ var alertVariants = cva(
|
|
|
247
285
|
}
|
|
248
286
|
}
|
|
249
287
|
);
|
|
250
|
-
var Alert =
|
|
288
|
+
var Alert = React137.forwardRef(({ className, variant, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
251
289
|
"div",
|
|
252
290
|
{
|
|
253
291
|
ref,
|
|
@@ -257,7 +295,7 @@ var Alert = React136.forwardRef(({ className, variant, ...props }, ref) => /* @_
|
|
|
257
295
|
}
|
|
258
296
|
));
|
|
259
297
|
Alert.displayName = "Alert";
|
|
260
|
-
var AlertTitle =
|
|
298
|
+
var AlertTitle = React137.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
261
299
|
"h5",
|
|
262
300
|
{
|
|
263
301
|
ref,
|
|
@@ -266,7 +304,7 @@ var AlertTitle = React136.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
|
266
304
|
}
|
|
267
305
|
));
|
|
268
306
|
AlertTitle.displayName = "AlertTitle";
|
|
269
|
-
var AlertDescription =
|
|
307
|
+
var AlertDescription = React137.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
270
308
|
"div",
|
|
271
309
|
{
|
|
272
310
|
ref,
|
|
@@ -276,7 +314,7 @@ var AlertDescription = React136.forwardRef(({ className, ...props }, ref) => /*
|
|
|
276
314
|
));
|
|
277
315
|
AlertDescription.displayName = "AlertDescription";
|
|
278
316
|
var AspectRatio = AspectRatioPrimitive.Root;
|
|
279
|
-
var Avatar =
|
|
317
|
+
var Avatar = React137__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
280
318
|
AvatarPrimitive.Root,
|
|
281
319
|
{
|
|
282
320
|
ref,
|
|
@@ -285,9 +323,9 @@ var Avatar = React136__default.forwardRef(({ className, ...props }, ref) => /* @
|
|
|
285
323
|
}
|
|
286
324
|
));
|
|
287
325
|
Avatar.displayName = AvatarPrimitive.Root.displayName;
|
|
288
|
-
var AvatarImage =
|
|
326
|
+
var AvatarImage = React137__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(AvatarPrimitive.Image, { ref, className: cn("aspect-square h-full w-full object-cover", className), ...props }));
|
|
289
327
|
AvatarImage.displayName = AvatarPrimitive.Image.displayName;
|
|
290
|
-
var AvatarFallback =
|
|
328
|
+
var AvatarFallback = React137__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
291
329
|
AvatarPrimitive.Fallback,
|
|
292
330
|
{
|
|
293
331
|
ref,
|
|
@@ -296,15 +334,15 @@ var AvatarFallback = React136__default.forwardRef(({ className, ...props }, ref)
|
|
|
296
334
|
}
|
|
297
335
|
));
|
|
298
336
|
AvatarFallback.displayName = AvatarPrimitive.Fallback.displayName;
|
|
299
|
-
var AvatarGroup =
|
|
337
|
+
var AvatarGroup = React137__default.forwardRef(
|
|
300
338
|
({ className, max = 4, size = 32, spacing, renderOverflow, children, ...props }, ref) => {
|
|
301
|
-
const items =
|
|
339
|
+
const items = React137__default.Children.toArray(children).filter(React137__default.isValidElement);
|
|
302
340
|
const overlap = spacing ?? Math.round(size / 3);
|
|
303
341
|
const visible = items.slice(0, max);
|
|
304
342
|
const remaining = Math.max(0, items.length - max);
|
|
305
343
|
return /* @__PURE__ */ jsxs("div", { ref, className: cn("flex items-center", className), "data-slot": "avatar-group", ...props, children: [
|
|
306
344
|
visible.map(
|
|
307
|
-
(child, i) =>
|
|
345
|
+
(child, i) => React137__default.cloneElement(child, {
|
|
308
346
|
key: child.key ?? i,
|
|
309
347
|
style: {
|
|
310
348
|
width: size,
|
|
@@ -510,8 +548,8 @@ function CalendarDayButton({
|
|
|
510
548
|
...props
|
|
511
549
|
}) {
|
|
512
550
|
const defaultClassNames = getDefaultClassNames();
|
|
513
|
-
const ref =
|
|
514
|
-
|
|
551
|
+
const ref = React137.useRef(null);
|
|
552
|
+
React137.useEffect(() => {
|
|
515
553
|
if (modifiers.focused) ref.current?.focus();
|
|
516
554
|
}, [modifiers.focused]);
|
|
517
555
|
return /* @__PURE__ */ jsx(
|
|
@@ -534,7 +572,7 @@ function CalendarDayButton({
|
|
|
534
572
|
}
|
|
535
573
|
);
|
|
536
574
|
}
|
|
537
|
-
var Card =
|
|
575
|
+
var Card = React137__default.forwardRef(
|
|
538
576
|
({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
539
577
|
"div",
|
|
540
578
|
{
|
|
@@ -545,35 +583,35 @@ var Card = React136__default.forwardRef(
|
|
|
545
583
|
)
|
|
546
584
|
);
|
|
547
585
|
Card.displayName = "Card";
|
|
548
|
-
var CardHeader =
|
|
586
|
+
var CardHeader = React137__default.forwardRef(
|
|
549
587
|
({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("flex flex-col space-y-1.5 p-6", className), ...props })
|
|
550
588
|
);
|
|
551
589
|
CardHeader.displayName = "CardHeader";
|
|
552
|
-
var CardTitle =
|
|
590
|
+
var CardTitle = React137__default.forwardRef(
|
|
553
591
|
({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("font-semibold leading-none tracking-tight", className), ...props })
|
|
554
592
|
);
|
|
555
593
|
CardTitle.displayName = "CardTitle";
|
|
556
|
-
var CardDescription =
|
|
594
|
+
var CardDescription = React137__default.forwardRef(
|
|
557
595
|
({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("text-sm text-muted-foreground", className), ...props })
|
|
558
596
|
);
|
|
559
597
|
CardDescription.displayName = "CardDescription";
|
|
560
|
-
var CardContent =
|
|
598
|
+
var CardContent = React137__default.forwardRef(
|
|
561
599
|
({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("p-6 pt-0", className), ...props })
|
|
562
600
|
);
|
|
563
601
|
CardContent.displayName = "CardContent";
|
|
564
|
-
var CardFooter =
|
|
602
|
+
var CardFooter = React137__default.forwardRef(
|
|
565
603
|
({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("flex items-center p-6 pt-0", className), ...props })
|
|
566
604
|
);
|
|
567
605
|
CardFooter.displayName = "CardFooter";
|
|
568
|
-
var CarouselContext =
|
|
606
|
+
var CarouselContext = React137.createContext(null);
|
|
569
607
|
function useCarousel() {
|
|
570
|
-
const context =
|
|
608
|
+
const context = React137.useContext(CarouselContext);
|
|
571
609
|
if (!context) {
|
|
572
610
|
throw new Error("useCarousel must be used within a <Carousel />");
|
|
573
611
|
}
|
|
574
612
|
return context;
|
|
575
613
|
}
|
|
576
|
-
var Carousel =
|
|
614
|
+
var Carousel = React137.forwardRef(
|
|
577
615
|
({
|
|
578
616
|
orientation = "horizontal",
|
|
579
617
|
opts,
|
|
@@ -590,22 +628,22 @@ var Carousel = React136.forwardRef(
|
|
|
590
628
|
},
|
|
591
629
|
plugins
|
|
592
630
|
);
|
|
593
|
-
const [canScrollPrev, setCanScrollPrev] =
|
|
594
|
-
const [canScrollNext, setCanScrollNext] =
|
|
595
|
-
const onSelect =
|
|
631
|
+
const [canScrollPrev, setCanScrollPrev] = React137.useState(false);
|
|
632
|
+
const [canScrollNext, setCanScrollNext] = React137.useState(false);
|
|
633
|
+
const onSelect = React137.useCallback((api2) => {
|
|
596
634
|
if (!api2) {
|
|
597
635
|
return;
|
|
598
636
|
}
|
|
599
637
|
setCanScrollPrev(api2.canScrollPrev());
|
|
600
638
|
setCanScrollNext(api2.canScrollNext());
|
|
601
639
|
}, []);
|
|
602
|
-
const scrollPrev =
|
|
640
|
+
const scrollPrev = React137.useCallback(() => {
|
|
603
641
|
api?.scrollPrev();
|
|
604
642
|
}, [api]);
|
|
605
|
-
const scrollNext =
|
|
643
|
+
const scrollNext = React137.useCallback(() => {
|
|
606
644
|
api?.scrollNext();
|
|
607
645
|
}, [api]);
|
|
608
|
-
const handleKeyDown =
|
|
646
|
+
const handleKeyDown = React137.useCallback(
|
|
609
647
|
(event) => {
|
|
610
648
|
if (event.key === "ArrowLeft") {
|
|
611
649
|
event.preventDefault();
|
|
@@ -617,13 +655,13 @@ var Carousel = React136.forwardRef(
|
|
|
617
655
|
},
|
|
618
656
|
[scrollPrev, scrollNext]
|
|
619
657
|
);
|
|
620
|
-
|
|
658
|
+
React137.useEffect(() => {
|
|
621
659
|
if (!api || !setApi) {
|
|
622
660
|
return;
|
|
623
661
|
}
|
|
624
662
|
setApi(api);
|
|
625
663
|
}, [api, setApi]);
|
|
626
|
-
|
|
664
|
+
React137.useEffect(() => {
|
|
627
665
|
if (!api) {
|
|
628
666
|
return;
|
|
629
667
|
}
|
|
@@ -664,7 +702,7 @@ var Carousel = React136.forwardRef(
|
|
|
664
702
|
}
|
|
665
703
|
);
|
|
666
704
|
Carousel.displayName = "Carousel";
|
|
667
|
-
var CarouselContent =
|
|
705
|
+
var CarouselContent = React137.forwardRef(({ className, ...props }, ref) => {
|
|
668
706
|
const { carouselRef, orientation } = useCarousel();
|
|
669
707
|
return /* @__PURE__ */ jsx("div", { ref: carouselRef, className: "overflow-hidden", children: /* @__PURE__ */ jsx(
|
|
670
708
|
"div",
|
|
@@ -680,7 +718,7 @@ var CarouselContent = React136.forwardRef(({ className, ...props }, ref) => {
|
|
|
680
718
|
) });
|
|
681
719
|
});
|
|
682
720
|
CarouselContent.displayName = "CarouselContent";
|
|
683
|
-
var CarouselItem =
|
|
721
|
+
var CarouselItem = React137.forwardRef(({ className, ...props }, ref) => {
|
|
684
722
|
const { orientation } = useCarousel();
|
|
685
723
|
return /* @__PURE__ */ jsx(
|
|
686
724
|
"div",
|
|
@@ -698,7 +736,7 @@ var CarouselItem = React136.forwardRef(({ className, ...props }, ref) => {
|
|
|
698
736
|
);
|
|
699
737
|
});
|
|
700
738
|
CarouselItem.displayName = "CarouselItem";
|
|
701
|
-
var CarouselPrevious =
|
|
739
|
+
var CarouselPrevious = React137.forwardRef(({ className, variant = "outline", size = "icon", ...props }, ref) => {
|
|
702
740
|
const { orientation, scrollPrev, canScrollPrev } = useCarousel();
|
|
703
741
|
return /* @__PURE__ */ jsxs(
|
|
704
742
|
Button,
|
|
@@ -722,7 +760,7 @@ var CarouselPrevious = React136.forwardRef(({ className, variant = "outline", si
|
|
|
722
760
|
);
|
|
723
761
|
});
|
|
724
762
|
CarouselPrevious.displayName = "CarouselPrevious";
|
|
725
|
-
var CarouselNext =
|
|
763
|
+
var CarouselNext = React137.forwardRef(({ className, variant = "outline", size = "icon", ...props }, ref) => {
|
|
726
764
|
const { orientation, scrollNext, canScrollNext } = useCarousel();
|
|
727
765
|
return /* @__PURE__ */ jsxs(
|
|
728
766
|
Button,
|
|
@@ -754,7 +792,7 @@ var SIZE = {
|
|
|
754
792
|
function formatMoney(minor, currency, locale) {
|
|
755
793
|
return new Intl.NumberFormat(locale, { style: "currency", currency }).format(minor / 100);
|
|
756
794
|
}
|
|
757
|
-
var PriceTag =
|
|
795
|
+
var PriceTag = React137__default.forwardRef(
|
|
758
796
|
({ amount, compareAt, currency = "USD", locale = "en-US", size = "md", showDiscount = true, className, ...props }, ref) => {
|
|
759
797
|
const onSale = compareAt !== void 0 && compareAt > amount;
|
|
760
798
|
const pct = onSale ? Math.round((1 - amount / compareAt) * 100) : 0;
|
|
@@ -773,7 +811,7 @@ var PriceTag = React136__default.forwardRef(
|
|
|
773
811
|
}
|
|
774
812
|
);
|
|
775
813
|
PriceTag.displayName = "PriceTag";
|
|
776
|
-
var QuantityStepper =
|
|
814
|
+
var QuantityStepper = React137__default.forwardRef(
|
|
777
815
|
({
|
|
778
816
|
value: valueProp,
|
|
779
817
|
defaultValue = 1,
|
|
@@ -788,7 +826,7 @@ var QuantityStepper = React136__default.forwardRef(
|
|
|
788
826
|
...props
|
|
789
827
|
}, ref) => {
|
|
790
828
|
const isControlled = valueProp !== void 0;
|
|
791
|
-
const [internal, setInternal] =
|
|
829
|
+
const [internal, setInternal] = React137__default.useState(defaultValue);
|
|
792
830
|
const value = isControlled ? valueProp : internal;
|
|
793
831
|
const commit = (next) => {
|
|
794
832
|
const clamped = Math.max(min, Math.min(max, next));
|
|
@@ -845,7 +883,7 @@ var QuantityStepper = React136__default.forwardRef(
|
|
|
845
883
|
}
|
|
846
884
|
);
|
|
847
885
|
QuantityStepper.displayName = "QuantityStepper";
|
|
848
|
-
var CartLineItem =
|
|
886
|
+
var CartLineItem = React137__default.forwardRef(
|
|
849
887
|
({
|
|
850
888
|
image,
|
|
851
889
|
title,
|
|
@@ -903,16 +941,16 @@ var CartLineItem = React136__default.forwardRef(
|
|
|
903
941
|
);
|
|
904
942
|
CartLineItem.displayName = "CartLineItem";
|
|
905
943
|
var THEMES = { light: "", dark: ".dark" };
|
|
906
|
-
var ChartContext =
|
|
944
|
+
var ChartContext = React137.createContext(null);
|
|
907
945
|
function useChart() {
|
|
908
|
-
const context =
|
|
946
|
+
const context = React137.useContext(ChartContext);
|
|
909
947
|
if (!context) {
|
|
910
948
|
throw new Error("useChart must be used within a <ChartContainer />");
|
|
911
949
|
}
|
|
912
950
|
return context;
|
|
913
951
|
}
|
|
914
|
-
var ChartContainer =
|
|
915
|
-
const uniqueId =
|
|
952
|
+
var ChartContainer = React137.forwardRef(({ id, className, children, config, ...props }, ref) => {
|
|
953
|
+
const uniqueId = React137.useId();
|
|
916
954
|
const chartId = `chart-${id || uniqueId.replace(/:/g, "")}`;
|
|
917
955
|
return /* @__PURE__ */ jsx(ChartContext.Provider, { value: { config }, children: /* @__PURE__ */ jsxs(
|
|
918
956
|
"div",
|
|
@@ -958,7 +996,7 @@ ${colorConfig.map(([key, itemConfig]) => {
|
|
|
958
996
|
);
|
|
959
997
|
};
|
|
960
998
|
var ChartTooltip = RechartsPrimitive.Tooltip;
|
|
961
|
-
var ChartTooltipContent =
|
|
999
|
+
var ChartTooltipContent = React137.forwardRef(
|
|
962
1000
|
({
|
|
963
1001
|
active,
|
|
964
1002
|
payload,
|
|
@@ -975,7 +1013,7 @@ var ChartTooltipContent = React136.forwardRef(
|
|
|
975
1013
|
labelKey
|
|
976
1014
|
}, ref) => {
|
|
977
1015
|
const { config } = useChart();
|
|
978
|
-
const tooltipLabel =
|
|
1016
|
+
const tooltipLabel = React137.useMemo(() => {
|
|
979
1017
|
if (hideLabel || !payload?.length) {
|
|
980
1018
|
return null;
|
|
981
1019
|
}
|
|
@@ -1071,7 +1109,7 @@ var ChartTooltipContent = React136.forwardRef(
|
|
|
1071
1109
|
);
|
|
1072
1110
|
ChartTooltipContent.displayName = "ChartTooltip";
|
|
1073
1111
|
var ChartLegend = RechartsPrimitive.Legend;
|
|
1074
|
-
var ChartLegendContent =
|
|
1112
|
+
var ChartLegendContent = React137.forwardRef(
|
|
1075
1113
|
({ className, hideIcon = false, payload, verticalAlign = "bottom", nameKey }, ref) => {
|
|
1076
1114
|
const { config } = useChart();
|
|
1077
1115
|
if (!payload?.length) {
|
|
@@ -1129,7 +1167,7 @@ function getPayloadConfigFromPayload(config, payload, key) {
|
|
|
1129
1167
|
}
|
|
1130
1168
|
return configLabelKey in config ? config[configLabelKey] : config[key];
|
|
1131
1169
|
}
|
|
1132
|
-
var Checkbox =
|
|
1170
|
+
var Checkbox = React137__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
1133
1171
|
CheckboxPrimitive.Root,
|
|
1134
1172
|
{
|
|
1135
1173
|
ref,
|
|
@@ -1169,7 +1207,7 @@ function detectTheme(node) {
|
|
|
1169
1207
|
}
|
|
1170
1208
|
return document.documentElement.classList.contains("dark") ? "dark" : "light";
|
|
1171
1209
|
}
|
|
1172
|
-
var CodeBlock =
|
|
1210
|
+
var CodeBlock = React137__default.forwardRef(
|
|
1173
1211
|
({
|
|
1174
1212
|
code,
|
|
1175
1213
|
language = "tsx",
|
|
@@ -1180,10 +1218,10 @@ var CodeBlock = React136__default.forwardRef(
|
|
|
1180
1218
|
className,
|
|
1181
1219
|
...props
|
|
1182
1220
|
}, ref) => {
|
|
1183
|
-
const containerRef =
|
|
1184
|
-
const [html, setHtml] =
|
|
1185
|
-
const [copied, setCopied] =
|
|
1186
|
-
|
|
1221
|
+
const containerRef = React137__default.useRef(null);
|
|
1222
|
+
const [html, setHtml] = React137__default.useState(null);
|
|
1223
|
+
const [copied, setCopied] = React137__default.useState(false);
|
|
1224
|
+
React137__default.useEffect(() => {
|
|
1187
1225
|
let cancelled = false;
|
|
1188
1226
|
getHighlighter().then((hl) => {
|
|
1189
1227
|
if (cancelled) return;
|
|
@@ -1198,7 +1236,7 @@ var CodeBlock = React136__default.forwardRef(
|
|
|
1198
1236
|
cancelled = true;
|
|
1199
1237
|
};
|
|
1200
1238
|
}, [code, language, theme]);
|
|
1201
|
-
const onCopy =
|
|
1239
|
+
const onCopy = React137__default.useCallback(async () => {
|
|
1202
1240
|
try {
|
|
1203
1241
|
await navigator.clipboard.writeText(code);
|
|
1204
1242
|
setCopied(true);
|
|
@@ -1206,7 +1244,7 @@ var CodeBlock = React136__default.forwardRef(
|
|
|
1206
1244
|
} catch {
|
|
1207
1245
|
}
|
|
1208
1246
|
}, [code]);
|
|
1209
|
-
const lines =
|
|
1247
|
+
const lines = React137__default.useMemo(() => code.split("\n"), [code]);
|
|
1210
1248
|
return /* @__PURE__ */ jsxs(
|
|
1211
1249
|
"div",
|
|
1212
1250
|
{
|
|
@@ -1274,7 +1312,7 @@ var Dialog = DialogPrimitive.Root;
|
|
|
1274
1312
|
var DialogTrigger = DialogPrimitive.Trigger;
|
|
1275
1313
|
var DialogPortal = DialogPrimitive.Portal;
|
|
1276
1314
|
var DialogClose = DialogPrimitive.Close;
|
|
1277
|
-
var DialogOverlay =
|
|
1315
|
+
var DialogOverlay = React137__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
1278
1316
|
DialogPrimitive.Overlay,
|
|
1279
1317
|
{
|
|
1280
1318
|
ref,
|
|
@@ -1288,7 +1326,7 @@ var DialogOverlay = React136__default.forwardRef(({ className, ...props }, ref)
|
|
|
1288
1326
|
}
|
|
1289
1327
|
));
|
|
1290
1328
|
DialogOverlay.displayName = DialogPrimitive.Overlay.displayName;
|
|
1291
|
-
var DialogContent =
|
|
1329
|
+
var DialogContent = React137__default.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(DialogPortal, { children: [
|
|
1292
1330
|
/* @__PURE__ */ jsx(DialogOverlay, {}),
|
|
1293
1331
|
/* @__PURE__ */ jsxs(
|
|
1294
1332
|
DialogPrimitive.Content,
|
|
@@ -1318,7 +1356,7 @@ var DialogHeader = ({ className, ...props }) => /* @__PURE__ */ jsx("div", { cla
|
|
|
1318
1356
|
DialogHeader.displayName = "DialogHeader";
|
|
1319
1357
|
var DialogFooter = ({ className, ...props }) => /* @__PURE__ */ jsx("div", { className: cn("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2", className), ...props });
|
|
1320
1358
|
DialogFooter.displayName = "DialogFooter";
|
|
1321
|
-
var DialogTitle =
|
|
1359
|
+
var DialogTitle = React137__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
1322
1360
|
DialogPrimitive.Title,
|
|
1323
1361
|
{
|
|
1324
1362
|
ref,
|
|
@@ -1327,7 +1365,7 @@ var DialogTitle = React136__default.forwardRef(({ className, ...props }, ref) =>
|
|
|
1327
1365
|
}
|
|
1328
1366
|
));
|
|
1329
1367
|
DialogTitle.displayName = DialogPrimitive.Title.displayName;
|
|
1330
|
-
var DialogDescription =
|
|
1368
|
+
var DialogDescription = React137__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
1331
1369
|
DialogPrimitive.Description,
|
|
1332
1370
|
{
|
|
1333
1371
|
ref,
|
|
@@ -1336,7 +1374,7 @@ var DialogDescription = React136__default.forwardRef(({ className, ...props }, r
|
|
|
1336
1374
|
}
|
|
1337
1375
|
));
|
|
1338
1376
|
DialogDescription.displayName = DialogPrimitive.Description.displayName;
|
|
1339
|
-
var Command =
|
|
1377
|
+
var Command = React137.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
1340
1378
|
Command$1,
|
|
1341
1379
|
{
|
|
1342
1380
|
ref,
|
|
@@ -1351,7 +1389,7 @@ Command.displayName = Command$1.displayName;
|
|
|
1351
1389
|
var CommandDialog = ({ children, ...props }) => {
|
|
1352
1390
|
return /* @__PURE__ */ jsx(Dialog, { ...props, children: /* @__PURE__ */ jsx(DialogContent, { className: "overflow-hidden p-0", children: /* @__PURE__ */ jsx(Command, { className: "[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5", children }) }) });
|
|
1353
1391
|
};
|
|
1354
|
-
var CommandInput =
|
|
1392
|
+
var CommandInput = React137.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxs("div", { className: "flex items-center border-b px-3", "cmdk-input-wrapper": "", children: [
|
|
1355
1393
|
/* @__PURE__ */ jsx(Search, { className: "mr-2 h-4 w-4 shrink-0 opacity-50" }),
|
|
1356
1394
|
/* @__PURE__ */ jsx(
|
|
1357
1395
|
Command$1.Input,
|
|
@@ -1366,7 +1404,7 @@ var CommandInput = React136.forwardRef(({ className, ...props }, ref) => /* @__P
|
|
|
1366
1404
|
)
|
|
1367
1405
|
] }));
|
|
1368
1406
|
CommandInput.displayName = Command$1.Input.displayName;
|
|
1369
|
-
var CommandList =
|
|
1407
|
+
var CommandList = React137.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
1370
1408
|
Command$1.List,
|
|
1371
1409
|
{
|
|
1372
1410
|
ref,
|
|
@@ -1375,7 +1413,7 @@ var CommandList = React136.forwardRef(({ className, ...props }, ref) => /* @__PU
|
|
|
1375
1413
|
}
|
|
1376
1414
|
));
|
|
1377
1415
|
CommandList.displayName = Command$1.List.displayName;
|
|
1378
|
-
var CommandEmpty =
|
|
1416
|
+
var CommandEmpty = React137.forwardRef((props, ref) => /* @__PURE__ */ jsx(
|
|
1379
1417
|
Command$1.Empty,
|
|
1380
1418
|
{
|
|
1381
1419
|
ref,
|
|
@@ -1384,7 +1422,7 @@ var CommandEmpty = React136.forwardRef((props, ref) => /* @__PURE__ */ jsx(
|
|
|
1384
1422
|
}
|
|
1385
1423
|
));
|
|
1386
1424
|
CommandEmpty.displayName = Command$1.Empty.displayName;
|
|
1387
|
-
var CommandGroup =
|
|
1425
|
+
var CommandGroup = React137.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
1388
1426
|
Command$1.Group,
|
|
1389
1427
|
{
|
|
1390
1428
|
ref,
|
|
@@ -1396,7 +1434,7 @@ var CommandGroup = React136.forwardRef(({ className, ...props }, ref) => /* @__P
|
|
|
1396
1434
|
}
|
|
1397
1435
|
));
|
|
1398
1436
|
CommandGroup.displayName = Command$1.Group.displayName;
|
|
1399
|
-
var CommandSeparator =
|
|
1437
|
+
var CommandSeparator = React137.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
1400
1438
|
Command$1.Separator,
|
|
1401
1439
|
{
|
|
1402
1440
|
ref,
|
|
@@ -1405,7 +1443,7 @@ var CommandSeparator = React136.forwardRef(({ className, ...props }, ref) => /*
|
|
|
1405
1443
|
}
|
|
1406
1444
|
));
|
|
1407
1445
|
CommandSeparator.displayName = Command$1.Separator.displayName;
|
|
1408
|
-
var CommandItem =
|
|
1446
|
+
var CommandItem = React137.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
1409
1447
|
Command$1.Item,
|
|
1410
1448
|
{
|
|
1411
1449
|
ref,
|
|
@@ -1433,7 +1471,7 @@ var CommandShortcut = ({
|
|
|
1433
1471
|
);
|
|
1434
1472
|
};
|
|
1435
1473
|
CommandShortcut.displayName = "CommandShortcut";
|
|
1436
|
-
var Comparison =
|
|
1474
|
+
var Comparison = React137__default.forwardRef(
|
|
1437
1475
|
({
|
|
1438
1476
|
before,
|
|
1439
1477
|
after,
|
|
@@ -1449,10 +1487,10 @@ var Comparison = React136__default.forwardRef(
|
|
|
1449
1487
|
...props
|
|
1450
1488
|
}, ref) => {
|
|
1451
1489
|
const isControlled = valueProp !== void 0;
|
|
1452
|
-
const [internal, setInternal] =
|
|
1490
|
+
const [internal, setInternal] = React137__default.useState(defaultValue);
|
|
1453
1491
|
const value = Math.max(0, Math.min(100, isControlled ? valueProp : internal));
|
|
1454
|
-
const containerRef =
|
|
1455
|
-
const commit =
|
|
1492
|
+
const containerRef = React137__default.useRef(null);
|
|
1493
|
+
const commit = React137__default.useCallback(
|
|
1456
1494
|
(next) => {
|
|
1457
1495
|
const clamped = Math.max(0, Math.min(100, next));
|
|
1458
1496
|
if (!isControlled) setInternal(clamped);
|
|
@@ -1460,7 +1498,7 @@ var Comparison = React136__default.forwardRef(
|
|
|
1460
1498
|
},
|
|
1461
1499
|
[isControlled, onValueChange]
|
|
1462
1500
|
);
|
|
1463
|
-
const updateFromPointer =
|
|
1501
|
+
const updateFromPointer = React137__default.useCallback(
|
|
1464
1502
|
(clientX, clientY) => {
|
|
1465
1503
|
const el = containerRef.current;
|
|
1466
1504
|
if (!el) return;
|
|
@@ -1583,30 +1621,30 @@ var ContextMenuSub = ContextMenuPrimitive.Sub;
|
|
|
1583
1621
|
var ContextMenuRadioGroup = ContextMenuPrimitive.RadioGroup;
|
|
1584
1622
|
var contentStyle = "z-50 min-w-[8rem] overflow-hidden rounded-md border border-[hsl(var(--border))] bg-[hsl(var(--popover))] p-1 text-[hsl(var(--popover-foreground))] shadow-md animate-in fade-in-80";
|
|
1585
1623
|
var itemStyle = "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-[hsl(var(--accent))] focus:text-[hsl(var(--accent-foreground))] data-[disabled]:pointer-events-none data-[disabled]:opacity-50";
|
|
1586
|
-
var ContextMenuContent =
|
|
1624
|
+
var ContextMenuContent = React137__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(ContextMenuPrimitive.Portal, { children: /* @__PURE__ */ jsx(ContextMenuPrimitive.Content, { ref, className: cn(contentStyle, className), ...props }) }));
|
|
1587
1625
|
ContextMenuContent.displayName = ContextMenuPrimitive.Content.displayName;
|
|
1588
|
-
var ContextMenuItem =
|
|
1626
|
+
var ContextMenuItem = React137__default.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx(ContextMenuPrimitive.Item, { ref, className: cn(itemStyle, inset && "pl-8", className), ...props }));
|
|
1589
1627
|
ContextMenuItem.displayName = ContextMenuPrimitive.Item.displayName;
|
|
1590
|
-
var ContextMenuCheckboxItem =
|
|
1628
|
+
var ContextMenuCheckboxItem = React137__default.forwardRef(({ className, children, checked, ...props }, ref) => /* @__PURE__ */ jsxs(ContextMenuPrimitive.CheckboxItem, { ref, className: cn(itemStyle, "pl-8", className), checked, ...props, children: [
|
|
1591
1629
|
/* @__PURE__ */ jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsx(ContextMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx(Check, { className: "h-4 w-4" }) }) }),
|
|
1592
1630
|
children
|
|
1593
1631
|
] }));
|
|
1594
1632
|
ContextMenuCheckboxItem.displayName = ContextMenuPrimitive.CheckboxItem.displayName;
|
|
1595
|
-
var ContextMenuRadioItem =
|
|
1633
|
+
var ContextMenuRadioItem = React137__default.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(ContextMenuPrimitive.RadioItem, { ref, className: cn(itemStyle, "pl-8", className), ...props, children: [
|
|
1596
1634
|
/* @__PURE__ */ jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsx(ContextMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx(Circle, { className: "h-2 w-2 fill-current" }) }) }),
|
|
1597
1635
|
children
|
|
1598
1636
|
] }));
|
|
1599
1637
|
ContextMenuRadioItem.displayName = ContextMenuPrimitive.RadioItem.displayName;
|
|
1600
|
-
var ContextMenuLabel =
|
|
1638
|
+
var ContextMenuLabel = React137__default.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx(ContextMenuPrimitive.Label, { ref, className: cn("px-2 py-1.5 text-xs font-semibold text-[hsl(var(--muted-foreground))]", inset && "pl-8", className), ...props }));
|
|
1601
1639
|
ContextMenuLabel.displayName = ContextMenuPrimitive.Label.displayName;
|
|
1602
|
-
var ContextMenuSeparator =
|
|
1640
|
+
var ContextMenuSeparator = React137__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(ContextMenuPrimitive.Separator, { ref, className: cn("-mx-1 my-1 h-px bg-[hsl(var(--muted))]", className), ...props }));
|
|
1603
1641
|
ContextMenuSeparator.displayName = ContextMenuPrimitive.Separator.displayName;
|
|
1604
|
-
var ContextMenuSubTrigger =
|
|
1642
|
+
var ContextMenuSubTrigger = React137__default.forwardRef(({ className, inset, children, ...props }, ref) => /* @__PURE__ */ jsxs(ContextMenuPrimitive.SubTrigger, { ref, className: cn(itemStyle, inset && "pl-8", className), ...props, children: [
|
|
1605
1643
|
children,
|
|
1606
1644
|
/* @__PURE__ */ jsx(ChevronRight, { className: "ml-auto h-4 w-4" })
|
|
1607
1645
|
] }));
|
|
1608
1646
|
ContextMenuSubTrigger.displayName = ContextMenuPrimitive.SubTrigger.displayName;
|
|
1609
|
-
var ContextMenuSubContent =
|
|
1647
|
+
var ContextMenuSubContent = React137__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(ContextMenuPrimitive.SubContent, { ref, className: cn(contentStyle, className), ...props }));
|
|
1610
1648
|
ContextMenuSubContent.displayName = ContextMenuPrimitive.SubContent.displayName;
|
|
1611
1649
|
var ContextMenuShortcut = ({ className, ...props }) => /* @__PURE__ */ jsx("span", { className: cn("ml-auto text-xs tracking-widest opacity-60", className), ...props });
|
|
1612
1650
|
var Drawer = ({
|
|
@@ -1623,7 +1661,7 @@ Drawer.displayName = "Drawer";
|
|
|
1623
1661
|
var DrawerTrigger = Drawer$1.Trigger;
|
|
1624
1662
|
var DrawerPortal = Drawer$1.Portal;
|
|
1625
1663
|
var DrawerClose = Drawer$1.Close;
|
|
1626
|
-
var DrawerOverlay =
|
|
1664
|
+
var DrawerOverlay = React137.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
1627
1665
|
Drawer$1.Overlay,
|
|
1628
1666
|
{
|
|
1629
1667
|
ref,
|
|
@@ -1632,7 +1670,7 @@ var DrawerOverlay = React136.forwardRef(({ className, ...props }, ref) => /* @__
|
|
|
1632
1670
|
}
|
|
1633
1671
|
));
|
|
1634
1672
|
DrawerOverlay.displayName = Drawer$1.Overlay.displayName;
|
|
1635
|
-
var DrawerContent =
|
|
1673
|
+
var DrawerContent = React137.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(DrawerPortal, { children: [
|
|
1636
1674
|
/* @__PURE__ */ jsx(DrawerOverlay, {}),
|
|
1637
1675
|
/* @__PURE__ */ jsxs(
|
|
1638
1676
|
Drawer$1.Content,
|
|
@@ -1673,7 +1711,7 @@ var DrawerFooter = ({
|
|
|
1673
1711
|
}
|
|
1674
1712
|
);
|
|
1675
1713
|
DrawerFooter.displayName = "DrawerFooter";
|
|
1676
|
-
var DrawerTitle =
|
|
1714
|
+
var DrawerTitle = React137.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
1677
1715
|
Drawer$1.Title,
|
|
1678
1716
|
{
|
|
1679
1717
|
ref,
|
|
@@ -1685,7 +1723,7 @@ var DrawerTitle = React136.forwardRef(({ className, ...props }, ref) => /* @__PU
|
|
|
1685
1723
|
}
|
|
1686
1724
|
));
|
|
1687
1725
|
DrawerTitle.displayName = Drawer$1.Title.displayName;
|
|
1688
|
-
var DrawerDescription =
|
|
1726
|
+
var DrawerDescription = React137.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
1689
1727
|
Drawer$1.Description,
|
|
1690
1728
|
{
|
|
1691
1729
|
ref,
|
|
@@ -1710,34 +1748,34 @@ var itemStyle2 = cn(
|
|
|
1710
1748
|
"focus:bg-[hsl(var(--accent))] focus:text-[hsl(var(--accent-foreground))]",
|
|
1711
1749
|
"data-[disabled]:pointer-events-none data-[disabled]:opacity-50"
|
|
1712
1750
|
);
|
|
1713
|
-
var DropdownMenuContent =
|
|
1751
|
+
var DropdownMenuContent = React137__default.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsx(DropdownMenuPrimitive.Portal, { children: /* @__PURE__ */ jsx(DropdownMenuPrimitive.Content, { ref, sideOffset, className: cn(contentStyle2, className), ...props }) }));
|
|
1714
1752
|
DropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName;
|
|
1715
|
-
var DropdownMenuItem =
|
|
1753
|
+
var DropdownMenuItem = React137__default.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx(DropdownMenuPrimitive.Item, { ref, className: cn(itemStyle2, inset && "pl-8", className), ...props }));
|
|
1716
1754
|
DropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName;
|
|
1717
|
-
var DropdownMenuCheckboxItem =
|
|
1755
|
+
var DropdownMenuCheckboxItem = React137__default.forwardRef(({ className, children, checked, ...props }, ref) => /* @__PURE__ */ jsxs(DropdownMenuPrimitive.CheckboxItem, { ref, className: cn(itemStyle2, "pl-8", className), checked, ...props, children: [
|
|
1718
1756
|
/* @__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" }) }) }),
|
|
1719
1757
|
children
|
|
1720
1758
|
] }));
|
|
1721
1759
|
DropdownMenuCheckboxItem.displayName = DropdownMenuPrimitive.CheckboxItem.displayName;
|
|
1722
|
-
var DropdownMenuRadioItem =
|
|
1760
|
+
var DropdownMenuRadioItem = React137__default.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(DropdownMenuPrimitive.RadioItem, { ref, className: cn(itemStyle2, "pl-8", className), ...props, children: [
|
|
1723
1761
|
/* @__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" }) }) }),
|
|
1724
1762
|
children
|
|
1725
1763
|
] }));
|
|
1726
1764
|
DropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName;
|
|
1727
|
-
var DropdownMenuLabel =
|
|
1765
|
+
var DropdownMenuLabel = React137__default.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx(DropdownMenuPrimitive.Label, { ref, className: cn("px-2 py-1.5 text-xs font-semibold text-[hsl(var(--muted-foreground))]", inset && "pl-8", className), ...props }));
|
|
1728
1766
|
DropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName;
|
|
1729
|
-
var DropdownMenuSeparator =
|
|
1767
|
+
var DropdownMenuSeparator = React137__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(DropdownMenuPrimitive.Separator, { ref, className: cn("-mx-1 my-1 h-px bg-[hsl(var(--muted))]", className), ...props }));
|
|
1730
1768
|
DropdownMenuSeparator.displayName = DropdownMenuPrimitive.Separator.displayName;
|
|
1731
|
-
var DropdownMenuSubTrigger =
|
|
1769
|
+
var DropdownMenuSubTrigger = React137__default.forwardRef(({ className, inset, children, ...props }, ref) => /* @__PURE__ */ jsxs(DropdownMenuPrimitive.SubTrigger, { ref, className: cn(itemStyle2, inset && "pl-8", "data-[state=open]:bg-[hsl(var(--accent))]", className), ...props, children: [
|
|
1732
1770
|
children,
|
|
1733
1771
|
/* @__PURE__ */ jsx(ChevronRight, { className: "ml-auto h-4 w-4" })
|
|
1734
1772
|
] }));
|
|
1735
1773
|
DropdownMenuSubTrigger.displayName = DropdownMenuPrimitive.SubTrigger.displayName;
|
|
1736
|
-
var DropdownMenuSubContent =
|
|
1774
|
+
var DropdownMenuSubContent = React137__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(DropdownMenuPrimitive.SubContent, { ref, className: cn(contentStyle2, className), ...props }));
|
|
1737
1775
|
DropdownMenuSubContent.displayName = DropdownMenuPrimitive.SubContent.displayName;
|
|
1738
1776
|
var DropdownMenuShortcut = ({ className, ...props }) => /* @__PURE__ */ jsx("span", { className: cn("ml-auto text-xs tracking-widest opacity-60", className), ...props });
|
|
1739
1777
|
DropdownMenuShortcut.displayName = "DropdownMenuShortcut";
|
|
1740
|
-
var EmptyCart =
|
|
1778
|
+
var EmptyCart = React137__default.forwardRef(
|
|
1741
1779
|
({
|
|
1742
1780
|
title = "Your cart is empty",
|
|
1743
1781
|
description = "Browse the catalog and add something you love.",
|
|
@@ -1768,7 +1806,7 @@ var EmptyCart = React136__default.forwardRef(
|
|
|
1768
1806
|
EmptyCart.displayName = "EmptyCart";
|
|
1769
1807
|
var HoverCard = HoverCardPrimitive.Root;
|
|
1770
1808
|
var HoverCardTrigger = HoverCardPrimitive.Trigger;
|
|
1771
|
-
var HoverCardContent =
|
|
1809
|
+
var HoverCardContent = React137.forwardRef(({ className, align = "center", sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
1772
1810
|
HoverCardPrimitive.Content,
|
|
1773
1811
|
{
|
|
1774
1812
|
ref,
|
|
@@ -1782,7 +1820,7 @@ var HoverCardContent = React136.forwardRef(({ className, align = "center", sideO
|
|
|
1782
1820
|
}
|
|
1783
1821
|
));
|
|
1784
1822
|
HoverCardContent.displayName = HoverCardPrimitive.Content.displayName;
|
|
1785
|
-
var InputOTP =
|
|
1823
|
+
var InputOTP = React137.forwardRef(({ className, containerClassName, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
1786
1824
|
OTPInput,
|
|
1787
1825
|
{
|
|
1788
1826
|
ref,
|
|
@@ -1795,10 +1833,10 @@ var InputOTP = React136.forwardRef(({ className, containerClassName, ...props },
|
|
|
1795
1833
|
}
|
|
1796
1834
|
));
|
|
1797
1835
|
InputOTP.displayName = "InputOTP";
|
|
1798
|
-
var InputOTPGroup =
|
|
1836
|
+
var InputOTPGroup = React137.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("flex items-center", className), ...props }));
|
|
1799
1837
|
InputOTPGroup.displayName = "InputOTPGroup";
|
|
1800
|
-
var InputOTPSlot =
|
|
1801
|
-
const inputOTPContext =
|
|
1838
|
+
var InputOTPSlot = React137.forwardRef(({ index, className, ...props }, ref) => {
|
|
1839
|
+
const inputOTPContext = React137.useContext(OTPInputContext);
|
|
1802
1840
|
const { char, hasFakeCaret, isActive } = inputOTPContext.slots[index];
|
|
1803
1841
|
return /* @__PURE__ */ jsxs(
|
|
1804
1842
|
"div",
|
|
@@ -1818,9 +1856,9 @@ var InputOTPSlot = React136.forwardRef(({ index, className, ...props }, ref) =>
|
|
|
1818
1856
|
);
|
|
1819
1857
|
});
|
|
1820
1858
|
InputOTPSlot.displayName = "InputOTPSlot";
|
|
1821
|
-
var InputOTPSeparator =
|
|
1859
|
+
var InputOTPSeparator = React137.forwardRef(({ ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, role: "separator", ...props, children: /* @__PURE__ */ jsx(Minus, {}) }));
|
|
1822
1860
|
InputOTPSeparator.displayName = "InputOTPSeparator";
|
|
1823
|
-
var Input =
|
|
1861
|
+
var Input = React137__default.forwardRef(
|
|
1824
1862
|
({ className, type, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
1825
1863
|
"input",
|
|
1826
1864
|
{
|
|
@@ -1842,7 +1880,7 @@ Input.displayName = "Input";
|
|
|
1842
1880
|
var labelVariants = cva(
|
|
1843
1881
|
"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"
|
|
1844
1882
|
);
|
|
1845
|
-
var Label3 =
|
|
1883
|
+
var Label3 = React137.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
1846
1884
|
LabelPrimitive.Root,
|
|
1847
1885
|
{
|
|
1848
1886
|
ref,
|
|
@@ -1851,7 +1889,7 @@ var Label3 = React136.forwardRef(({ className, ...props }, ref) => /* @__PURE__
|
|
|
1851
1889
|
}
|
|
1852
1890
|
));
|
|
1853
1891
|
Label3.displayName = LabelPrimitive.Root.displayName;
|
|
1854
|
-
var LogoCarousel =
|
|
1892
|
+
var LogoCarousel = React137__default.forwardRef(
|
|
1855
1893
|
({
|
|
1856
1894
|
className,
|
|
1857
1895
|
logos,
|
|
@@ -1945,7 +1983,7 @@ var SPEED_DURATION = {
|
|
|
1945
1983
|
normal: "40s",
|
|
1946
1984
|
fast: "20s"
|
|
1947
1985
|
};
|
|
1948
|
-
var Marquee =
|
|
1986
|
+
var Marquee = React137__default.forwardRef(
|
|
1949
1987
|
({
|
|
1950
1988
|
children,
|
|
1951
1989
|
speed = "normal",
|
|
@@ -2009,7 +2047,7 @@ function MenubarSub({
|
|
|
2009
2047
|
}) {
|
|
2010
2048
|
return /* @__PURE__ */ jsx(MenubarPrimitive.Sub, { "data-slot": "menubar-sub", ...props });
|
|
2011
2049
|
}
|
|
2012
|
-
var Menubar =
|
|
2050
|
+
var Menubar = React137.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
2013
2051
|
MenubarPrimitive.Root,
|
|
2014
2052
|
{
|
|
2015
2053
|
ref,
|
|
@@ -2021,7 +2059,7 @@ var Menubar = React136.forwardRef(({ className, ...props }, ref) => /* @__PURE__
|
|
|
2021
2059
|
}
|
|
2022
2060
|
));
|
|
2023
2061
|
Menubar.displayName = MenubarPrimitive.Root.displayName;
|
|
2024
|
-
var MenubarTrigger =
|
|
2062
|
+
var MenubarTrigger = React137.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
2025
2063
|
MenubarPrimitive.Trigger,
|
|
2026
2064
|
{
|
|
2027
2065
|
ref,
|
|
@@ -2033,7 +2071,7 @@ var MenubarTrigger = React136.forwardRef(({ className, ...props }, ref) => /* @_
|
|
|
2033
2071
|
}
|
|
2034
2072
|
));
|
|
2035
2073
|
MenubarTrigger.displayName = MenubarPrimitive.Trigger.displayName;
|
|
2036
|
-
var MenubarSubTrigger =
|
|
2074
|
+
var MenubarSubTrigger = React137.forwardRef(({ className, inset, children, ...props }, ref) => /* @__PURE__ */ jsxs(
|
|
2037
2075
|
MenubarPrimitive.SubTrigger,
|
|
2038
2076
|
{
|
|
2039
2077
|
ref,
|
|
@@ -2050,7 +2088,7 @@ var MenubarSubTrigger = React136.forwardRef(({ className, inset, children, ...pr
|
|
|
2050
2088
|
}
|
|
2051
2089
|
));
|
|
2052
2090
|
MenubarSubTrigger.displayName = MenubarPrimitive.SubTrigger.displayName;
|
|
2053
|
-
var MenubarSubContent =
|
|
2091
|
+
var MenubarSubContent = React137.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
2054
2092
|
MenubarPrimitive.SubContent,
|
|
2055
2093
|
{
|
|
2056
2094
|
ref,
|
|
@@ -2062,7 +2100,7 @@ var MenubarSubContent = React136.forwardRef(({ className, ...props }, ref) => /*
|
|
|
2062
2100
|
}
|
|
2063
2101
|
));
|
|
2064
2102
|
MenubarSubContent.displayName = MenubarPrimitive.SubContent.displayName;
|
|
2065
|
-
var MenubarContent =
|
|
2103
|
+
var MenubarContent = React137.forwardRef(
|
|
2066
2104
|
({ className, align = "start", alignOffset = -4, sideOffset = 8, ...props }, ref) => /* @__PURE__ */ jsx(MenubarPrimitive.Portal, { children: /* @__PURE__ */ jsx(
|
|
2067
2105
|
MenubarPrimitive.Content,
|
|
2068
2106
|
{
|
|
@@ -2079,7 +2117,7 @@ var MenubarContent = React136.forwardRef(
|
|
|
2079
2117
|
) })
|
|
2080
2118
|
);
|
|
2081
2119
|
MenubarContent.displayName = MenubarPrimitive.Content.displayName;
|
|
2082
|
-
var MenubarItem =
|
|
2120
|
+
var MenubarItem = React137.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
2083
2121
|
MenubarPrimitive.Item,
|
|
2084
2122
|
{
|
|
2085
2123
|
ref,
|
|
@@ -2092,7 +2130,7 @@ var MenubarItem = React136.forwardRef(({ className, inset, ...props }, ref) => /
|
|
|
2092
2130
|
}
|
|
2093
2131
|
));
|
|
2094
2132
|
MenubarItem.displayName = MenubarPrimitive.Item.displayName;
|
|
2095
|
-
var MenubarCheckboxItem =
|
|
2133
|
+
var MenubarCheckboxItem = React137.forwardRef(({ className, children, checked, ...props }, ref) => /* @__PURE__ */ jsxs(
|
|
2096
2134
|
MenubarPrimitive.CheckboxItem,
|
|
2097
2135
|
{
|
|
2098
2136
|
ref,
|
|
@@ -2109,7 +2147,7 @@ var MenubarCheckboxItem = React136.forwardRef(({ className, children, checked, .
|
|
|
2109
2147
|
}
|
|
2110
2148
|
));
|
|
2111
2149
|
MenubarCheckboxItem.displayName = MenubarPrimitive.CheckboxItem.displayName;
|
|
2112
|
-
var MenubarRadioItem =
|
|
2150
|
+
var MenubarRadioItem = React137.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(
|
|
2113
2151
|
MenubarPrimitive.RadioItem,
|
|
2114
2152
|
{
|
|
2115
2153
|
ref,
|
|
@@ -2125,7 +2163,7 @@ var MenubarRadioItem = React136.forwardRef(({ className, children, ...props }, r
|
|
|
2125
2163
|
}
|
|
2126
2164
|
));
|
|
2127
2165
|
MenubarRadioItem.displayName = MenubarPrimitive.RadioItem.displayName;
|
|
2128
|
-
var MenubarLabel =
|
|
2166
|
+
var MenubarLabel = React137.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
2129
2167
|
MenubarPrimitive.Label,
|
|
2130
2168
|
{
|
|
2131
2169
|
ref,
|
|
@@ -2138,7 +2176,7 @@ var MenubarLabel = React136.forwardRef(({ className, inset, ...props }, ref) =>
|
|
|
2138
2176
|
}
|
|
2139
2177
|
));
|
|
2140
2178
|
MenubarLabel.displayName = MenubarPrimitive.Label.displayName;
|
|
2141
|
-
var MenubarSeparator =
|
|
2179
|
+
var MenubarSeparator = React137.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
2142
2180
|
MenubarPrimitive.Separator,
|
|
2143
2181
|
{
|
|
2144
2182
|
ref,
|
|
@@ -2163,7 +2201,7 @@ var MenubarShortcut = ({
|
|
|
2163
2201
|
);
|
|
2164
2202
|
};
|
|
2165
2203
|
MenubarShortcut.displayname = "MenubarShortcut";
|
|
2166
|
-
var NavigationMenu =
|
|
2204
|
+
var NavigationMenu = React137.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(
|
|
2167
2205
|
NavigationMenuPrimitive.Root,
|
|
2168
2206
|
{
|
|
2169
2207
|
ref,
|
|
@@ -2179,7 +2217,7 @@ var NavigationMenu = React136.forwardRef(({ className, children, ...props }, ref
|
|
|
2179
2217
|
}
|
|
2180
2218
|
));
|
|
2181
2219
|
NavigationMenu.displayName = NavigationMenuPrimitive.Root.displayName;
|
|
2182
|
-
var NavigationMenuList =
|
|
2220
|
+
var NavigationMenuList = React137.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
2183
2221
|
NavigationMenuPrimitive.List,
|
|
2184
2222
|
{
|
|
2185
2223
|
ref,
|
|
@@ -2195,7 +2233,7 @@ var NavigationMenuItem = NavigationMenuPrimitive.Item;
|
|
|
2195
2233
|
var navigationMenuTriggerStyle = cva(
|
|
2196
2234
|
"group inline-flex h-9 w-max items-center justify-center rounded-md bg-background px-4 py-2 text-sm font-medium transition-colors hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground focus:outline-none disabled:pointer-events-none disabled:opacity-50 data-[state=open]:text-accent-foreground data-[state=open]:bg-accent/50 data-[state=open]:hover:bg-accent data-[state=open]:focus:bg-accent"
|
|
2197
2235
|
);
|
|
2198
|
-
var NavigationMenuTrigger =
|
|
2236
|
+
var NavigationMenuTrigger = React137.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(
|
|
2199
2237
|
NavigationMenuPrimitive.Trigger,
|
|
2200
2238
|
{
|
|
2201
2239
|
ref,
|
|
@@ -2215,7 +2253,7 @@ var NavigationMenuTrigger = React136.forwardRef(({ className, children, ...props
|
|
|
2215
2253
|
}
|
|
2216
2254
|
));
|
|
2217
2255
|
NavigationMenuTrigger.displayName = NavigationMenuPrimitive.Trigger.displayName;
|
|
2218
|
-
var NavigationMenuContent =
|
|
2256
|
+
var NavigationMenuContent = React137.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
2219
2257
|
NavigationMenuPrimitive.Content,
|
|
2220
2258
|
{
|
|
2221
2259
|
ref,
|
|
@@ -2228,7 +2266,7 @@ var NavigationMenuContent = React136.forwardRef(({ className, ...props }, ref) =
|
|
|
2228
2266
|
));
|
|
2229
2267
|
NavigationMenuContent.displayName = NavigationMenuPrimitive.Content.displayName;
|
|
2230
2268
|
var NavigationMenuLink = NavigationMenuPrimitive.Link;
|
|
2231
|
-
var NavigationMenuViewport =
|
|
2269
|
+
var NavigationMenuViewport = React137.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { className: cn("absolute left-0 top-full flex justify-center"), children: /* @__PURE__ */ jsx(
|
|
2232
2270
|
NavigationMenuPrimitive.Viewport,
|
|
2233
2271
|
{
|
|
2234
2272
|
className: cn(
|
|
@@ -2240,7 +2278,7 @@ var NavigationMenuViewport = React136.forwardRef(({ className, ...props }, ref)
|
|
|
2240
2278
|
}
|
|
2241
2279
|
) }));
|
|
2242
2280
|
NavigationMenuViewport.displayName = NavigationMenuPrimitive.Viewport.displayName;
|
|
2243
|
-
var NavigationMenuIndicator =
|
|
2281
|
+
var NavigationMenuIndicator = React137.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
2244
2282
|
NavigationMenuPrimitive.Indicator,
|
|
2245
2283
|
{
|
|
2246
2284
|
ref,
|
|
@@ -2263,7 +2301,7 @@ var Pagination = ({ className, ...props }) => /* @__PURE__ */ jsx(
|
|
|
2263
2301
|
}
|
|
2264
2302
|
);
|
|
2265
2303
|
Pagination.displayName = "Pagination";
|
|
2266
|
-
var PaginationContent =
|
|
2304
|
+
var PaginationContent = React137.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
2267
2305
|
"ul",
|
|
2268
2306
|
{
|
|
2269
2307
|
ref,
|
|
@@ -2272,7 +2310,7 @@ var PaginationContent = React136.forwardRef(({ className, ...props }, ref) => /*
|
|
|
2272
2310
|
}
|
|
2273
2311
|
));
|
|
2274
2312
|
PaginationContent.displayName = "PaginationContent";
|
|
2275
|
-
var PaginationItem =
|
|
2313
|
+
var PaginationItem = React137.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("li", { ref, className: cn("", className), ...props }));
|
|
2276
2314
|
PaginationItem.displayName = "PaginationItem";
|
|
2277
2315
|
var PaginationLink = ({
|
|
2278
2316
|
className,
|
|
@@ -2347,7 +2385,7 @@ PaginationEllipsis.displayName = "PaginationEllipsis";
|
|
|
2347
2385
|
var Popover = PopoverPrimitive.Root;
|
|
2348
2386
|
var PopoverTrigger = PopoverPrimitive.Trigger;
|
|
2349
2387
|
var PopoverAnchor = PopoverPrimitive.Anchor;
|
|
2350
|
-
var PopoverContent =
|
|
2388
|
+
var PopoverContent = React137__default.forwardRef(({ className, align = "center", sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsx(PopoverPrimitive.Portal, { children: /* @__PURE__ */ jsx(
|
|
2351
2389
|
PopoverPrimitive.Content,
|
|
2352
2390
|
{
|
|
2353
2391
|
ref,
|
|
@@ -2364,7 +2402,7 @@ var PopoverContent = React136__default.forwardRef(({ className, align = "center"
|
|
|
2364
2402
|
}
|
|
2365
2403
|
) }));
|
|
2366
2404
|
PopoverContent.displayName = PopoverPrimitive.Content.displayName;
|
|
2367
|
-
var Progress =
|
|
2405
|
+
var Progress = React137__default.forwardRef(({ className, value, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
2368
2406
|
ProgressPrimitive.Root,
|
|
2369
2407
|
{
|
|
2370
2408
|
ref,
|
|
@@ -2380,7 +2418,7 @@ var Progress = React136__default.forwardRef(({ className, value, ...props }, ref
|
|
|
2380
2418
|
}
|
|
2381
2419
|
));
|
|
2382
2420
|
Progress.displayName = ProgressPrimitive.Root.displayName;
|
|
2383
|
-
var QrCode =
|
|
2421
|
+
var QrCode = React137__default.forwardRef(
|
|
2384
2422
|
({
|
|
2385
2423
|
value,
|
|
2386
2424
|
size = 192,
|
|
@@ -2437,9 +2475,9 @@ var QrCode = React136__default.forwardRef(
|
|
|
2437
2475
|
}
|
|
2438
2476
|
);
|
|
2439
2477
|
QrCode.displayName = "QrCode";
|
|
2440
|
-
var RadioGroup4 =
|
|
2478
|
+
var RadioGroup4 = React137__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(RadioGroupPrimitive.Root, { className: cn("grid gap-2", className), ref, ...props }));
|
|
2441
2479
|
RadioGroup4.displayName = RadioGroupPrimitive.Root.displayName;
|
|
2442
|
-
var RadioGroupItem =
|
|
2480
|
+
var RadioGroupItem = React137__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
2443
2481
|
RadioGroupPrimitive.Item,
|
|
2444
2482
|
{
|
|
2445
2483
|
ref,
|
|
@@ -2459,7 +2497,7 @@ var SIZE2 = {
|
|
|
2459
2497
|
md: "h-5 w-5",
|
|
2460
2498
|
lg: "h-6 w-6"
|
|
2461
2499
|
};
|
|
2462
|
-
var Rating =
|
|
2500
|
+
var Rating = React137__default.forwardRef(
|
|
2463
2501
|
({
|
|
2464
2502
|
value: valueProp,
|
|
2465
2503
|
defaultValue = 0,
|
|
@@ -2475,10 +2513,10 @@ var Rating = React136__default.forwardRef(
|
|
|
2475
2513
|
...props
|
|
2476
2514
|
}, ref) => {
|
|
2477
2515
|
const isControlled = valueProp !== void 0;
|
|
2478
|
-
const [internal, setInternal] =
|
|
2516
|
+
const [internal, setInternal] = React137__default.useState(defaultValue);
|
|
2479
2517
|
const value = isControlled ? valueProp : internal;
|
|
2480
2518
|
const step = allowHalf ? 0.5 : 1;
|
|
2481
|
-
const commit =
|
|
2519
|
+
const commit = React137__default.useCallback(
|
|
2482
2520
|
(next) => {
|
|
2483
2521
|
const clamped = Math.max(0, Math.min(max, next));
|
|
2484
2522
|
if (!isControlled) setInternal(clamped);
|
|
@@ -2592,7 +2630,7 @@ var ResizableHandle = ({
|
|
|
2592
2630
|
children: withHandle && /* @__PURE__ */ jsx("div", { className: "z-10 flex h-4 w-3 items-center justify-center rounded-sm border bg-border", children: /* @__PURE__ */ jsx(GripVertical, { className: "h-2.5 w-2.5" }) })
|
|
2593
2631
|
}
|
|
2594
2632
|
);
|
|
2595
|
-
var ScrollArea =
|
|
2633
|
+
var ScrollArea = React137.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(
|
|
2596
2634
|
ScrollAreaPrimitive.Root,
|
|
2597
2635
|
{
|
|
2598
2636
|
ref,
|
|
@@ -2606,7 +2644,7 @@ var ScrollArea = React136.forwardRef(({ className, children, ...props }, ref) =>
|
|
|
2606
2644
|
}
|
|
2607
2645
|
));
|
|
2608
2646
|
ScrollArea.displayName = ScrollAreaPrimitive.Root.displayName;
|
|
2609
|
-
var ScrollBar =
|
|
2647
|
+
var ScrollBar = React137.forwardRef(({ className, orientation = "vertical", ...props }, ref) => /* @__PURE__ */ jsx(
|
|
2610
2648
|
ScrollAreaPrimitive.ScrollAreaScrollbar,
|
|
2611
2649
|
{
|
|
2612
2650
|
ref,
|
|
@@ -2625,7 +2663,7 @@ ScrollBar.displayName = ScrollAreaPrimitive.ScrollAreaScrollbar.displayName;
|
|
|
2625
2663
|
var Select = SelectPrimitive.Root;
|
|
2626
2664
|
var SelectGroup = SelectPrimitive.Group;
|
|
2627
2665
|
var SelectValue = SelectPrimitive.Value;
|
|
2628
|
-
var SelectTrigger =
|
|
2666
|
+
var SelectTrigger = React137__default.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(
|
|
2629
2667
|
SelectPrimitive.Trigger,
|
|
2630
2668
|
{
|
|
2631
2669
|
ref,
|
|
@@ -2645,7 +2683,7 @@ var SelectTrigger = React136__default.forwardRef(({ className, children, ...prop
|
|
|
2645
2683
|
}
|
|
2646
2684
|
));
|
|
2647
2685
|
SelectTrigger.displayName = SelectPrimitive.Trigger.displayName;
|
|
2648
|
-
var SelectScrollUpButton =
|
|
2686
|
+
var SelectScrollUpButton = React137__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
2649
2687
|
SelectPrimitive.ScrollUpButton,
|
|
2650
2688
|
{
|
|
2651
2689
|
ref,
|
|
@@ -2655,7 +2693,7 @@ var SelectScrollUpButton = React136__default.forwardRef(({ className, ...props }
|
|
|
2655
2693
|
}
|
|
2656
2694
|
));
|
|
2657
2695
|
SelectScrollUpButton.displayName = SelectPrimitive.ScrollUpButton.displayName;
|
|
2658
|
-
var SelectScrollDownButton =
|
|
2696
|
+
var SelectScrollDownButton = React137__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
2659
2697
|
SelectPrimitive.ScrollDownButton,
|
|
2660
2698
|
{
|
|
2661
2699
|
ref,
|
|
@@ -2665,7 +2703,7 @@ var SelectScrollDownButton = React136__default.forwardRef(({ className, ...props
|
|
|
2665
2703
|
}
|
|
2666
2704
|
));
|
|
2667
2705
|
SelectScrollDownButton.displayName = SelectPrimitive.ScrollDownButton.displayName;
|
|
2668
|
-
var SelectContent =
|
|
2706
|
+
var SelectContent = React137__default.forwardRef(({ className, children, position = "popper", ...props }, ref) => /* @__PURE__ */ jsx(SelectPrimitive.Portal, { children: /* @__PURE__ */ jsxs(
|
|
2669
2707
|
SelectPrimitive.Content,
|
|
2670
2708
|
{
|
|
2671
2709
|
ref,
|
|
@@ -2692,7 +2730,7 @@ var SelectContent = React136__default.forwardRef(({ className, children, positio
|
|
|
2692
2730
|
}
|
|
2693
2731
|
) }));
|
|
2694
2732
|
SelectContent.displayName = SelectPrimitive.Content.displayName;
|
|
2695
|
-
var SelectLabel =
|
|
2733
|
+
var SelectLabel = React137__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
2696
2734
|
SelectPrimitive.Label,
|
|
2697
2735
|
{
|
|
2698
2736
|
ref,
|
|
@@ -2701,7 +2739,7 @@ var SelectLabel = React136__default.forwardRef(({ className, ...props }, ref) =>
|
|
|
2701
2739
|
}
|
|
2702
2740
|
));
|
|
2703
2741
|
SelectLabel.displayName = SelectPrimitive.Label.displayName;
|
|
2704
|
-
var SelectItem =
|
|
2742
|
+
var SelectItem = React137__default.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(
|
|
2705
2743
|
SelectPrimitive.Item,
|
|
2706
2744
|
{
|
|
2707
2745
|
ref,
|
|
@@ -2719,7 +2757,7 @@ var SelectItem = React136__default.forwardRef(({ className, children, ...props }
|
|
|
2719
2757
|
}
|
|
2720
2758
|
));
|
|
2721
2759
|
SelectItem.displayName = SelectPrimitive.Item.displayName;
|
|
2722
|
-
var SelectSeparator =
|
|
2760
|
+
var SelectSeparator = React137__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
2723
2761
|
SelectPrimitive.Separator,
|
|
2724
2762
|
{
|
|
2725
2763
|
ref,
|
|
@@ -2728,7 +2766,7 @@ var SelectSeparator = React136__default.forwardRef(({ className, ...props }, ref
|
|
|
2728
2766
|
}
|
|
2729
2767
|
));
|
|
2730
2768
|
SelectSeparator.displayName = SelectPrimitive.Separator.displayName;
|
|
2731
|
-
var Separator6 =
|
|
2769
|
+
var Separator6 = React137__default.forwardRef(({ className, orientation = "horizontal", decorative = true, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
2732
2770
|
SeparatorPrimitive.Root,
|
|
2733
2771
|
{
|
|
2734
2772
|
ref,
|
|
@@ -2747,7 +2785,7 @@ var Sheet = DialogPrimitive.Root;
|
|
|
2747
2785
|
var SheetTrigger = DialogPrimitive.Trigger;
|
|
2748
2786
|
var SheetClose = DialogPrimitive.Close;
|
|
2749
2787
|
var SheetPortal = DialogPrimitive.Portal;
|
|
2750
|
-
var SheetOverlay =
|
|
2788
|
+
var SheetOverlay = React137__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
2751
2789
|
DialogPrimitive.Overlay,
|
|
2752
2790
|
{
|
|
2753
2791
|
ref,
|
|
@@ -2775,7 +2813,7 @@ var sheetVariants = cva(
|
|
|
2775
2813
|
defaultVariants: { side: "right" }
|
|
2776
2814
|
}
|
|
2777
2815
|
);
|
|
2778
|
-
var SheetContent =
|
|
2816
|
+
var SheetContent = React137__default.forwardRef(({ side = "right", className, children, ...props }, ref) => /* @__PURE__ */ jsxs(SheetPortal, { children: [
|
|
2779
2817
|
/* @__PURE__ */ jsx(SheetOverlay, {}),
|
|
2780
2818
|
/* @__PURE__ */ jsxs(DialogPrimitive.Content, { ref, className: cn(sheetVariants({ side }), className), ...props, children: [
|
|
2781
2819
|
/* @__PURE__ */ jsxs(DialogPrimitive.Close, { className: "absolute right-4 top-4 rounded-sm opacity-70 hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-[hsl(var(--ring))]", children: [
|
|
@@ -2788,9 +2826,9 @@ var SheetContent = React136__default.forwardRef(({ side = "right", className, ch
|
|
|
2788
2826
|
SheetContent.displayName = DialogPrimitive.Content.displayName;
|
|
2789
2827
|
var SheetHeader = ({ className, ...props }) => /* @__PURE__ */ jsx("div", { className: cn("flex flex-col space-y-2 text-center sm:text-left", className), ...props });
|
|
2790
2828
|
var SheetFooter = ({ className, ...props }) => /* @__PURE__ */ jsx("div", { className: cn("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2", className), ...props });
|
|
2791
|
-
var SheetTitle =
|
|
2829
|
+
var SheetTitle = React137__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(DialogPrimitive.Title, { ref, className: cn("text-lg font-semibold", className), ...props }));
|
|
2792
2830
|
SheetTitle.displayName = DialogPrimitive.Title.displayName;
|
|
2793
|
-
var SheetDescription =
|
|
2831
|
+
var SheetDescription = React137__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(DialogPrimitive.Description, { ref, className: cn("text-sm text-[hsl(var(--muted-foreground))]", className), ...props }));
|
|
2794
2832
|
SheetDescription.displayName = DialogPrimitive.Description.displayName;
|
|
2795
2833
|
function Skeleton({ className, ...props }) {
|
|
2796
2834
|
return /* @__PURE__ */ jsx(
|
|
@@ -2801,7 +2839,7 @@ function Skeleton({ className, ...props }) {
|
|
|
2801
2839
|
}
|
|
2802
2840
|
);
|
|
2803
2841
|
}
|
|
2804
|
-
var Slider =
|
|
2842
|
+
var Slider = React137__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxs(
|
|
2805
2843
|
SliderPrimitive.Root,
|
|
2806
2844
|
{
|
|
2807
2845
|
ref,
|
|
@@ -2825,7 +2863,7 @@ function Spinner({ className, ...props }) {
|
|
|
2825
2863
|
}
|
|
2826
2864
|
);
|
|
2827
2865
|
}
|
|
2828
|
-
var Switch =
|
|
2866
|
+
var Switch = React137__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
2829
2867
|
SwitchPrimitive.Root,
|
|
2830
2868
|
{
|
|
2831
2869
|
ref,
|
|
@@ -2851,7 +2889,7 @@ var Switch = React136__default.forwardRef(({ className, ...props }, ref) => /* @
|
|
|
2851
2889
|
}
|
|
2852
2890
|
));
|
|
2853
2891
|
Switch.displayName = SwitchPrimitive.Root.displayName;
|
|
2854
|
-
var Table =
|
|
2892
|
+
var Table = React137.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { className: "relative w-full overflow-auto", children: /* @__PURE__ */ jsx(
|
|
2855
2893
|
"table",
|
|
2856
2894
|
{
|
|
2857
2895
|
ref,
|
|
@@ -2860,9 +2898,9 @@ var Table = React136.forwardRef(({ className, ...props }, ref) => /* @__PURE__ *
|
|
|
2860
2898
|
}
|
|
2861
2899
|
) }));
|
|
2862
2900
|
Table.displayName = "Table";
|
|
2863
|
-
var TableHeader =
|
|
2901
|
+
var TableHeader = React137.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("thead", { ref, className: cn("[&_tr]:border-b", className), ...props }));
|
|
2864
2902
|
TableHeader.displayName = "TableHeader";
|
|
2865
|
-
var TableBody =
|
|
2903
|
+
var TableBody = React137.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
2866
2904
|
"tbody",
|
|
2867
2905
|
{
|
|
2868
2906
|
ref,
|
|
@@ -2871,7 +2909,7 @@ var TableBody = React136.forwardRef(({ className, ...props }, ref) => /* @__PURE
|
|
|
2871
2909
|
}
|
|
2872
2910
|
));
|
|
2873
2911
|
TableBody.displayName = "TableBody";
|
|
2874
|
-
var TableFooter =
|
|
2912
|
+
var TableFooter = React137.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
2875
2913
|
"tfoot",
|
|
2876
2914
|
{
|
|
2877
2915
|
ref,
|
|
@@ -2883,7 +2921,7 @@ var TableFooter = React136.forwardRef(({ className, ...props }, ref) => /* @__PU
|
|
|
2883
2921
|
}
|
|
2884
2922
|
));
|
|
2885
2923
|
TableFooter.displayName = "TableFooter";
|
|
2886
|
-
var TableRow =
|
|
2924
|
+
var TableRow = React137.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
2887
2925
|
"tr",
|
|
2888
2926
|
{
|
|
2889
2927
|
ref,
|
|
@@ -2895,7 +2933,7 @@ var TableRow = React136.forwardRef(({ className, ...props }, ref) => /* @__PURE_
|
|
|
2895
2933
|
}
|
|
2896
2934
|
));
|
|
2897
2935
|
TableRow.displayName = "TableRow";
|
|
2898
|
-
var TableHead =
|
|
2936
|
+
var TableHead = React137.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
2899
2937
|
"th",
|
|
2900
2938
|
{
|
|
2901
2939
|
ref,
|
|
@@ -2907,7 +2945,7 @@ var TableHead = React136.forwardRef(({ className, ...props }, ref) => /* @__PURE
|
|
|
2907
2945
|
}
|
|
2908
2946
|
));
|
|
2909
2947
|
TableHead.displayName = "TableHead";
|
|
2910
|
-
var TableCell =
|
|
2948
|
+
var TableCell = React137.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
2911
2949
|
"td",
|
|
2912
2950
|
{
|
|
2913
2951
|
ref,
|
|
@@ -2919,7 +2957,7 @@ var TableCell = React136.forwardRef(({ className, ...props }, ref) => /* @__PURE
|
|
|
2919
2957
|
}
|
|
2920
2958
|
));
|
|
2921
2959
|
TableCell.displayName = "TableCell";
|
|
2922
|
-
var TableCaption =
|
|
2960
|
+
var TableCaption = React137.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
2923
2961
|
"caption",
|
|
2924
2962
|
{
|
|
2925
2963
|
ref,
|
|
@@ -2929,7 +2967,7 @@ var TableCaption = React136.forwardRef(({ className, ...props }, ref) => /* @__P
|
|
|
2929
2967
|
));
|
|
2930
2968
|
TableCaption.displayName = "TableCaption";
|
|
2931
2969
|
var Tabs = TabsPrimitive.Root;
|
|
2932
|
-
var TabsList =
|
|
2970
|
+
var TabsList = React137__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
2933
2971
|
TabsPrimitive.List,
|
|
2934
2972
|
{
|
|
2935
2973
|
ref,
|
|
@@ -2941,7 +2979,7 @@ var TabsList = React136__default.forwardRef(({ className, ...props }, ref) => /*
|
|
|
2941
2979
|
}
|
|
2942
2980
|
));
|
|
2943
2981
|
TabsList.displayName = TabsPrimitive.List.displayName;
|
|
2944
|
-
var TabsTrigger =
|
|
2982
|
+
var TabsTrigger = React137__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
2945
2983
|
TabsPrimitive.Trigger,
|
|
2946
2984
|
{
|
|
2947
2985
|
ref,
|
|
@@ -2956,7 +2994,7 @@ var TabsTrigger = React136__default.forwardRef(({ className, ...props }, ref) =>
|
|
|
2956
2994
|
}
|
|
2957
2995
|
));
|
|
2958
2996
|
TabsTrigger.displayName = TabsPrimitive.Trigger.displayName;
|
|
2959
|
-
var TabsContent =
|
|
2997
|
+
var TabsContent = React137__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
2960
2998
|
TabsPrimitive.Content,
|
|
2961
2999
|
{
|
|
2962
3000
|
ref,
|
|
@@ -2968,7 +3006,7 @@ var TabsContent = React136__default.forwardRef(({ className, ...props }, ref) =>
|
|
|
2968
3006
|
}
|
|
2969
3007
|
));
|
|
2970
3008
|
TabsContent.displayName = TabsPrimitive.Content.displayName;
|
|
2971
|
-
var Textarea =
|
|
3009
|
+
var Textarea = React137__default.forwardRef(
|
|
2972
3010
|
({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
2973
3011
|
"textarea",
|
|
2974
3012
|
{
|
|
@@ -2986,7 +3024,7 @@ var Textarea = React136__default.forwardRef(
|
|
|
2986
3024
|
)
|
|
2987
3025
|
);
|
|
2988
3026
|
Textarea.displayName = "Textarea";
|
|
2989
|
-
var TextureCard =
|
|
3027
|
+
var TextureCard = React137.forwardRef(
|
|
2990
3028
|
({ children, className, padding = true, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
2991
3029
|
"div",
|
|
2992
3030
|
{
|
|
@@ -3003,15 +3041,15 @@ var TextureCard = React136.forwardRef(
|
|
|
3003
3041
|
)
|
|
3004
3042
|
);
|
|
3005
3043
|
TextureCard.displayName = "TextureCard";
|
|
3006
|
-
var TextureCardHeader =
|
|
3044
|
+
var TextureCardHeader = React137.forwardRef(
|
|
3007
3045
|
({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("flex flex-col gap-1.5 mb-4", className), ...props })
|
|
3008
3046
|
);
|
|
3009
3047
|
TextureCardHeader.displayName = "TextureCardHeader";
|
|
3010
|
-
var TextureCardTitle =
|
|
3048
|
+
var TextureCardTitle = React137.forwardRef(
|
|
3011
3049
|
({ className, ...props }, ref) => /* @__PURE__ */ jsx("h3", { ref, className: cn("font-semibold text-base leading-tight tracking-tight text-foreground", className), ...props })
|
|
3012
3050
|
);
|
|
3013
3051
|
TextureCardTitle.displayName = "TextureCardTitle";
|
|
3014
|
-
var TextureCardDescription =
|
|
3052
|
+
var TextureCardDescription = React137.forwardRef(
|
|
3015
3053
|
({ className, ...props }, ref) => /* @__PURE__ */ jsx("p", { ref, className: cn("text-sm text-muted-foreground", className), ...props })
|
|
3016
3054
|
);
|
|
3017
3055
|
TextureCardDescription.displayName = "TextureCardDescription";
|
|
@@ -3035,7 +3073,7 @@ var toggleVariants = cva(
|
|
|
3035
3073
|
}
|
|
3036
3074
|
}
|
|
3037
3075
|
);
|
|
3038
|
-
var Toggle =
|
|
3076
|
+
var Toggle = React137.forwardRef(({ className, variant, size, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
3039
3077
|
TogglePrimitive.Root,
|
|
3040
3078
|
{
|
|
3041
3079
|
ref,
|
|
@@ -3044,11 +3082,11 @@ var Toggle = React136.forwardRef(({ className, variant, size, ...props }, ref) =
|
|
|
3044
3082
|
}
|
|
3045
3083
|
));
|
|
3046
3084
|
Toggle.displayName = TogglePrimitive.Root.displayName;
|
|
3047
|
-
var ToggleGroupContext =
|
|
3085
|
+
var ToggleGroupContext = React137.createContext({
|
|
3048
3086
|
size: "default",
|
|
3049
3087
|
variant: "default"
|
|
3050
3088
|
});
|
|
3051
|
-
var ToggleGroup =
|
|
3089
|
+
var ToggleGroup = React137.forwardRef(({ className, variant, size, children, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
3052
3090
|
ToggleGroupPrimitive.Root,
|
|
3053
3091
|
{
|
|
3054
3092
|
ref,
|
|
@@ -3058,8 +3096,8 @@ var ToggleGroup = React136.forwardRef(({ className, variant, size, children, ...
|
|
|
3058
3096
|
}
|
|
3059
3097
|
));
|
|
3060
3098
|
ToggleGroup.displayName = ToggleGroupPrimitive.Root.displayName;
|
|
3061
|
-
var ToggleGroupItem =
|
|
3062
|
-
const context =
|
|
3099
|
+
var ToggleGroupItem = React137.forwardRef(({ className, children, variant, size, ...props }, ref) => {
|
|
3100
|
+
const context = React137.useContext(ToggleGroupContext);
|
|
3063
3101
|
return /* @__PURE__ */ jsx(
|
|
3064
3102
|
ToggleGroupPrimitive.Item,
|
|
3065
3103
|
{
|
|
@@ -3080,7 +3118,7 @@ ToggleGroupItem.displayName = ToggleGroupPrimitive.Item.displayName;
|
|
|
3080
3118
|
var TooltipProvider = TooltipPrimitive.Provider;
|
|
3081
3119
|
var Tooltip2 = TooltipPrimitive.Root;
|
|
3082
3120
|
var TooltipTrigger = TooltipPrimitive.Trigger;
|
|
3083
|
-
var TooltipContent =
|
|
3121
|
+
var TooltipContent = React137__default.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsx(TooltipPrimitive.Portal, { children: /* @__PURE__ */ jsx(
|
|
3084
3122
|
TooltipPrimitive.Content,
|
|
3085
3123
|
{
|
|
3086
3124
|
ref,
|
|
@@ -3096,10 +3134,10 @@ var TooltipContent = React136__default.forwardRef(({ className, sideOffset = 4,
|
|
|
3096
3134
|
}
|
|
3097
3135
|
) }));
|
|
3098
3136
|
TooltipContent.displayName = TooltipPrimitive.Content.displayName;
|
|
3099
|
-
var VariantPicker =
|
|
3137
|
+
var VariantPicker = React137__default.forwardRef(
|
|
3100
3138
|
({ label, options, value: valueProp, defaultValue, onValueChange, className, ...props }, ref) => {
|
|
3101
3139
|
const isControlled = valueProp !== void 0;
|
|
3102
|
-
const [internal, setInternal] =
|
|
3140
|
+
const [internal, setInternal] = React137__default.useState(defaultValue);
|
|
3103
3141
|
const value = isControlled ? valueProp : internal;
|
|
3104
3142
|
const select = (v) => {
|
|
3105
3143
|
if (!isControlled) setInternal(v);
|
|
@@ -3238,8 +3276,8 @@ function Banner({
|
|
|
3238
3276
|
className,
|
|
3239
3277
|
children
|
|
3240
3278
|
}) {
|
|
3241
|
-
const [dismissed, setDismissed] =
|
|
3242
|
-
const [exiting, setExiting] =
|
|
3279
|
+
const [dismissed, setDismissed] = React137__default.useState(false);
|
|
3280
|
+
const [exiting, setExiting] = React137__default.useState(false);
|
|
3243
3281
|
const handleDismiss = () => {
|
|
3244
3282
|
setExiting(true);
|
|
3245
3283
|
setTimeout(() => {
|
|
@@ -3300,7 +3338,7 @@ function BreadcrumbSeparator({ className }) {
|
|
|
3300
3338
|
return /* @__PURE__ */ jsx("li", { role: "presentation", "aria-hidden": "true", className: cn("flex items-center text-[hsl(var(--muted-foreground))]", className), children: /* @__PURE__ */ jsx(ChevronRight, { className: "h-3.5 w-3.5" }) });
|
|
3301
3339
|
}
|
|
3302
3340
|
function Breadcrumb({ children, className }) {
|
|
3303
|
-
const items =
|
|
3341
|
+
const items = React137__default.Children.toArray(children);
|
|
3304
3342
|
const withSeparators = [];
|
|
3305
3343
|
items.forEach((item, i) => {
|
|
3306
3344
|
withSeparators.push(item);
|
|
@@ -3330,8 +3368,8 @@ function CommandItem2({ icon, label, description, shortcut, active, onClick, cla
|
|
|
3330
3368
|
);
|
|
3331
3369
|
}
|
|
3332
3370
|
function EditableCell({ value: initial, onSave }) {
|
|
3333
|
-
const [editing, setEditing] =
|
|
3334
|
-
const [val, setVal] =
|
|
3371
|
+
const [editing, setEditing] = React137__default.useState(false);
|
|
3372
|
+
const [val, setVal] = React137__default.useState(String(initial ?? ""));
|
|
3335
3373
|
const commit = () => {
|
|
3336
3374
|
onSave(val);
|
|
3337
3375
|
setEditing(false);
|
|
@@ -3362,10 +3400,10 @@ var selectionCol = () => ({
|
|
|
3362
3400
|
enableResizing: false
|
|
3363
3401
|
});
|
|
3364
3402
|
function DataGrid({ columns, data: initialData, onDataChange, editable, className }) {
|
|
3365
|
-
const [data, setData] =
|
|
3366
|
-
const [rowSelection, setRowSelection] =
|
|
3403
|
+
const [data, setData] = React137__default.useState(initialData);
|
|
3404
|
+
const [rowSelection, setRowSelection] = React137__default.useState({});
|
|
3367
3405
|
const columnResizeMode = "onChange";
|
|
3368
|
-
const editableColumns =
|
|
3406
|
+
const editableColumns = React137__default.useMemo(() => {
|
|
3369
3407
|
if (!editable) return columns;
|
|
3370
3408
|
return columns.map((col) => ({
|
|
3371
3409
|
...col,
|
|
@@ -3384,7 +3422,7 @@ function DataGrid({ columns, data: initialData, onDataChange, editable, classNam
|
|
|
3384
3422
|
)
|
|
3385
3423
|
}));
|
|
3386
3424
|
}, [columns, data, editable, onDataChange]);
|
|
3387
|
-
const allColumns =
|
|
3425
|
+
const allColumns = React137__default.useMemo(() => [selectionCol(), ...editableColumns], [editableColumns]);
|
|
3388
3426
|
const table = useReactTable({
|
|
3389
3427
|
data,
|
|
3390
3428
|
columns: allColumns,
|
|
@@ -3455,7 +3493,7 @@ function DataTableToolbar({ table, searchColumn }) {
|
|
|
3455
3493
|
) });
|
|
3456
3494
|
}
|
|
3457
3495
|
function DataTable({ columns, data, pageSize = 10, searchable, searchColumn, loading }) {
|
|
3458
|
-
const [sorting, setSorting] =
|
|
3496
|
+
const [sorting, setSorting] = React137__default.useState([]);
|
|
3459
3497
|
const table = useReactTable({
|
|
3460
3498
|
data,
|
|
3461
3499
|
columns,
|
|
@@ -3480,7 +3518,7 @@ function DataTable({ columns, data, pageSize = 10, searchable, searchColumn, loa
|
|
|
3480
3518
|
/* @__PURE__ */ jsx(DataTablePagination, { table })
|
|
3481
3519
|
] });
|
|
3482
3520
|
}
|
|
3483
|
-
var EmptyStateIcon =
|
|
3521
|
+
var EmptyStateIcon = React137__default.forwardRef(
|
|
3484
3522
|
({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("flex h-12 w-12 items-center justify-center rounded-full bg-[hsl(var(--muted))] text-[hsl(var(--muted-foreground))]", className), ...props })
|
|
3485
3523
|
);
|
|
3486
3524
|
EmptyStateIcon.displayName = "EmptyStateIcon";
|
|
@@ -3595,7 +3633,7 @@ function Persona({ name, subtitle, src, size = "md", badge, className }) {
|
|
|
3595
3633
|
] })
|
|
3596
3634
|
] });
|
|
3597
3635
|
}
|
|
3598
|
-
var PropertyList =
|
|
3636
|
+
var PropertyList = React137__default.forwardRef(
|
|
3599
3637
|
({ className, ...props }, ref) => /* @__PURE__ */ jsx("dl", { ref, className: cn("divide-y divide-[hsl(var(--border))]", className), ...props })
|
|
3600
3638
|
);
|
|
3601
3639
|
PropertyList.displayName = "PropertyList";
|
|
@@ -3681,7 +3719,7 @@ function StructuredListItem({ left, title, description, right, onClick, classNam
|
|
|
3681
3719
|
}
|
|
3682
3720
|
);
|
|
3683
3721
|
}
|
|
3684
|
-
var StructuredList =
|
|
3722
|
+
var StructuredList = React137__default.forwardRef(
|
|
3685
3723
|
({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("space-y-4", className), ...props })
|
|
3686
3724
|
);
|
|
3687
3725
|
StructuredList.displayName = "StructuredList";
|
|
@@ -3691,7 +3729,7 @@ var dotColors = {
|
|
|
3691
3729
|
error: "bg-red-500",
|
|
3692
3730
|
warning: "bg-yellow-500"
|
|
3693
3731
|
};
|
|
3694
|
-
var TimelineContent =
|
|
3732
|
+
var TimelineContent = React137__default.forwardRef(
|
|
3695
3733
|
({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("pb-1", className), ...props })
|
|
3696
3734
|
);
|
|
3697
3735
|
TimelineContent.displayName = "TimelineContent";
|
|
@@ -3714,9 +3752,9 @@ function TimelineItem({ icon, title, description, timestamp, variant = "default"
|
|
|
3714
3752
|
] });
|
|
3715
3753
|
}
|
|
3716
3754
|
function Timeline({ children, className }) {
|
|
3717
|
-
const items =
|
|
3755
|
+
const items = React137__default.Children.toArray(children);
|
|
3718
3756
|
return /* @__PURE__ */ jsx("div", { className: cn("", className), children: items.map(
|
|
3719
|
-
(child, i) =>
|
|
3757
|
+
(child, i) => React137__default.isValidElement(child) ? React137__default.cloneElement(child, { isLast: i === items.length - 1 }) : child
|
|
3720
3758
|
) });
|
|
3721
3759
|
}
|
|
3722
3760
|
var INITIAL_MESSAGES = [
|
|
@@ -3900,7 +3938,7 @@ function FileRow({ file, onDelete }) {
|
|
|
3900
3938
|
] });
|
|
3901
3939
|
}
|
|
3902
3940
|
function FilesList({ className }) {
|
|
3903
|
-
const [files, setFiles] =
|
|
3941
|
+
const [files, setFiles] = React137__default.useState(FILES2);
|
|
3904
3942
|
return /* @__PURE__ */ jsx("div", { className: cn("rounded-md border border-[hsl(var(--border))] overflow-hidden", className), children: /* @__PURE__ */ jsxs("table", { className: "w-full", children: [
|
|
3905
3943
|
/* @__PURE__ */ jsx("thead", { className: "bg-[hsl(var(--muted)/0.5)]", children: /* @__PURE__ */ jsx("tr", { children: ["Name", "Type", "Size", "Modified", ""].map((h) => /* @__PURE__ */ jsx("th", { className: "px-4 py-2.5 text-left text-xs font-medium text-[hsl(var(--muted-foreground))]", children: h }, h)) }) }),
|
|
3906
3944
|
/* @__PURE__ */ jsx("tbody", { children: files.map((f) => /* @__PURE__ */ jsx(FileRow, { file: f, onDelete: () => setFiles((fs) => fs.filter((x) => x.id !== f.id)) }, f.id)) })
|
|
@@ -4395,9 +4433,9 @@ function apply(mode) {
|
|
|
4395
4433
|
document.documentElement.classList.toggle("dark", isDark);
|
|
4396
4434
|
}
|
|
4397
4435
|
function ThemeSwitch({ defaultMode, onChange, className, variant = "segmented" }) {
|
|
4398
|
-
const [mode, setMode] =
|
|
4399
|
-
const didMount =
|
|
4400
|
-
|
|
4436
|
+
const [mode, setMode] = React137__default.useState(() => defaultMode ?? readInitial());
|
|
4437
|
+
const didMount = React137__default.useRef(false);
|
|
4438
|
+
React137__default.useEffect(() => {
|
|
4401
4439
|
if (!didMount.current) {
|
|
4402
4440
|
didMount.current = true;
|
|
4403
4441
|
return;
|
|
@@ -4409,7 +4447,7 @@ function ThemeSwitch({ defaultMode, onChange, className, variant = "segmented" }
|
|
|
4409
4447
|
}
|
|
4410
4448
|
onChange?.(mode);
|
|
4411
4449
|
}, [mode, onChange]);
|
|
4412
|
-
|
|
4450
|
+
React137__default.useEffect(() => {
|
|
4413
4451
|
if (mode !== "system" || typeof window === "undefined") return;
|
|
4414
4452
|
const mql = window.matchMedia("(prefers-color-scheme: dark)");
|
|
4415
4453
|
const handler = () => apply("system");
|
|
@@ -4500,7 +4538,7 @@ function FloatingActionButton({
|
|
|
4500
4538
|
position = "bottom-right",
|
|
4501
4539
|
className
|
|
4502
4540
|
}) {
|
|
4503
|
-
const [open, setOpen] =
|
|
4541
|
+
const [open, setOpen] = React137__default.useState(false);
|
|
4504
4542
|
return /* @__PURE__ */ jsx(
|
|
4505
4543
|
"div",
|
|
4506
4544
|
{
|
|
@@ -4541,7 +4579,7 @@ function FloatingActionButton({
|
|
|
4541
4579
|
] }),
|
|
4542
4580
|
sections.length > 0 && /* @__PURE__ */ jsx(Separator6, {})
|
|
4543
4581
|
] }),
|
|
4544
|
-
sections.length > 0 && /* @__PURE__ */ jsx("div", { className: "px-3 py-2.5 space-y-3", children: sections.map((section, i) => /* @__PURE__ */ jsxs(
|
|
4582
|
+
sections.length > 0 && /* @__PURE__ */ jsx("div", { className: "px-3 py-2.5 space-y-3", children: sections.map((section, i) => /* @__PURE__ */ jsxs(React137__default.Fragment, { children: [
|
|
4545
4583
|
/* @__PURE__ */ jsxs("div", { children: [
|
|
4546
4584
|
/* @__PURE__ */ jsx("p", { className: "text-[9px] font-semibold uppercase tracking-widest text-muted-foreground mb-1.5", children: section.label }),
|
|
4547
4585
|
section.content
|
|
@@ -4583,7 +4621,7 @@ function applyTheme(val) {
|
|
|
4583
4621
|
}
|
|
4584
4622
|
}
|
|
4585
4623
|
function PaletteSwatches({ options = DEFAULT_THEME_OPTIONS }) {
|
|
4586
|
-
const [activeValue, setActiveValue] =
|
|
4624
|
+
const [activeValue, setActiveValue] = React137__default.useState(readStoredTheme);
|
|
4587
4625
|
const activeOption = options.find((o) => o.value === activeValue) ?? options[0];
|
|
4588
4626
|
const handleSelect = (value) => {
|
|
4589
4627
|
setActiveValue(value);
|
|
@@ -5459,8 +5497,8 @@ function BulkActions({ count, actions, onClear, className }) {
|
|
|
5459
5497
|
] });
|
|
5460
5498
|
}
|
|
5461
5499
|
function useCommandBar() {
|
|
5462
|
-
const [open, setOpen] =
|
|
5463
|
-
|
|
5500
|
+
const [open, setOpen] = React137__default.useState(false);
|
|
5501
|
+
React137__default.useEffect(() => {
|
|
5464
5502
|
const handler = (e) => {
|
|
5465
5503
|
if ((e.metaKey || e.ctrlKey) && e.key === "k") {
|
|
5466
5504
|
e.preventDefault();
|
|
@@ -5500,12 +5538,12 @@ function CommandBarItem({ icon, label, shortcut, onSelect, active, className })
|
|
|
5500
5538
|
);
|
|
5501
5539
|
}
|
|
5502
5540
|
function CommandBar({ open, onOpenChange, children, placeholder = "Search commands...", onSearch }) {
|
|
5503
|
-
const [query, setQuery] =
|
|
5541
|
+
const [query, setQuery] = React137__default.useState("");
|
|
5504
5542
|
const handleSearch = (v) => {
|
|
5505
5543
|
setQuery(v);
|
|
5506
5544
|
onSearch?.(v);
|
|
5507
5545
|
};
|
|
5508
|
-
const items =
|
|
5546
|
+
const items = React137__default.useRef(null);
|
|
5509
5547
|
const handleKeyDown = (e) => {
|
|
5510
5548
|
if (e.key === "Escape") {
|
|
5511
5549
|
onOpenChange(false);
|
|
@@ -5546,10 +5584,10 @@ function CommandBar({ open, onOpenChange, children, placeholder = "Search comman
|
|
|
5546
5584
|
var textOps = ["contains", "equals", "starts with"];
|
|
5547
5585
|
var numOps = ["=", ">", "<", ">=", "<="];
|
|
5548
5586
|
function AddFilterPopover({ filters, onAdd }) {
|
|
5549
|
-
const [open, setOpen] =
|
|
5550
|
-
const [key, setKey] =
|
|
5551
|
-
const [op, setOp] =
|
|
5552
|
-
const [val, setVal] =
|
|
5587
|
+
const [open, setOpen] = React137__default.useState(false);
|
|
5588
|
+
const [key, setKey] = React137__default.useState("");
|
|
5589
|
+
const [op, setOp] = React137__default.useState("");
|
|
5590
|
+
const [val, setVal] = React137__default.useState("");
|
|
5553
5591
|
const def = filters.find((f) => f.key === key);
|
|
5554
5592
|
const ops = def?.type === "number" ? numOps : textOps;
|
|
5555
5593
|
const handleAdd = () => {
|
|
@@ -5661,7 +5699,7 @@ function formatColumnSubLabel(date, scale) {
|
|
|
5661
5699
|
function snapDate(date, scale) {
|
|
5662
5700
|
return startOfScale(date, scale);
|
|
5663
5701
|
}
|
|
5664
|
-
var Gantt =
|
|
5702
|
+
var Gantt = React137__default.forwardRef(
|
|
5665
5703
|
({
|
|
5666
5704
|
items,
|
|
5667
5705
|
scale = "days",
|
|
@@ -5679,7 +5717,7 @@ var Gantt = React136__default.forwardRef(
|
|
|
5679
5717
|
}, ref) => {
|
|
5680
5718
|
const interactive = !!onItemMove || !!onItemResize;
|
|
5681
5719
|
const columnWidth = DEFAULT_COLUMN_WIDTH[scale];
|
|
5682
|
-
const viewport =
|
|
5720
|
+
const viewport = React137__default.useMemo(() => {
|
|
5683
5721
|
const earliest = startDate ?? (items.length ? new Date(Math.min(...items.map((i) => i.start.getTime()))) : /* @__PURE__ */ new Date());
|
|
5684
5722
|
const latest = endDate ?? (items.length ? new Date(Math.max(...items.map((i) => i.end.getTime()))) : addDays(/* @__PURE__ */ new Date(), 14));
|
|
5685
5723
|
return {
|
|
@@ -5689,7 +5727,7 @@ var Gantt = React136__default.forwardRef(
|
|
|
5689
5727
|
}, [items, startDate, endDate, scale]);
|
|
5690
5728
|
const colCount = totalColumns(viewport.start, viewport.end, scale);
|
|
5691
5729
|
const timelineWidth = colCount * columnWidth;
|
|
5692
|
-
const grouped =
|
|
5730
|
+
const grouped = React137__default.useMemo(() => {
|
|
5693
5731
|
const map = /* @__PURE__ */ new Map();
|
|
5694
5732
|
for (const it of items) {
|
|
5695
5733
|
const k = it.group ?? void 0;
|
|
@@ -5699,7 +5737,7 @@ var Gantt = React136__default.forwardRef(
|
|
|
5699
5737
|
return Array.from(map.entries());
|
|
5700
5738
|
}, [items]);
|
|
5701
5739
|
const hasGroups = grouped.some(([k]) => k !== void 0);
|
|
5702
|
-
const [collapsed, setCollapsed] =
|
|
5740
|
+
const [collapsed, setCollapsed] = React137__default.useState(() => /* @__PURE__ */ new Set());
|
|
5703
5741
|
const toggleGroup = (key) => {
|
|
5704
5742
|
setCollapsed((prev) => {
|
|
5705
5743
|
const next = new Set(prev);
|
|
@@ -5708,7 +5746,7 @@ var Gantt = React136__default.forwardRef(
|
|
|
5708
5746
|
return next;
|
|
5709
5747
|
});
|
|
5710
5748
|
};
|
|
5711
|
-
const rows =
|
|
5749
|
+
const rows = React137__default.useMemo(() => {
|
|
5712
5750
|
const out = [];
|
|
5713
5751
|
for (const [groupKey, list] of grouped) {
|
|
5714
5752
|
if (groupKey !== void 0) {
|
|
@@ -5719,21 +5757,21 @@ var Gantt = React136__default.forwardRef(
|
|
|
5719
5757
|
}
|
|
5720
5758
|
return out;
|
|
5721
5759
|
}, [grouped, collapsed]);
|
|
5722
|
-
const itemRowIndex =
|
|
5760
|
+
const itemRowIndex = React137__default.useMemo(() => {
|
|
5723
5761
|
const m = /* @__PURE__ */ new Map();
|
|
5724
5762
|
rows.forEach((r, i) => {
|
|
5725
5763
|
if (r.kind === "item") m.set(r.item.id, i);
|
|
5726
5764
|
});
|
|
5727
5765
|
return m;
|
|
5728
5766
|
}, [rows]);
|
|
5729
|
-
const todayOffsetPx =
|
|
5767
|
+
const todayOffsetPx = React137__default.useMemo(() => {
|
|
5730
5768
|
if (!showToday) return null;
|
|
5731
5769
|
const now = /* @__PURE__ */ new Date();
|
|
5732
5770
|
const u = unitsBetween(viewport.start, now, scale);
|
|
5733
5771
|
if (u < 0 || u > colCount) return null;
|
|
5734
5772
|
return u * columnWidth;
|
|
5735
5773
|
}, [showToday, viewport.start, scale, colCount, columnWidth]);
|
|
5736
|
-
const columnDates =
|
|
5774
|
+
const columnDates = React137__default.useMemo(() => {
|
|
5737
5775
|
return Array.from(
|
|
5738
5776
|
{ length: colCount },
|
|
5739
5777
|
(_, i) => addUnits(viewport.start, i, scale)
|
|
@@ -5957,12 +5995,12 @@ function GanttBar({
|
|
|
5957
5995
|
}) {
|
|
5958
5996
|
const color = item.color ?? DEFAULT_COLOR2;
|
|
5959
5997
|
const progress = Math.max(0, Math.min(100, item.progress ?? 0));
|
|
5960
|
-
const [previewLeftDelta, setPreviewLeftDelta] =
|
|
5961
|
-
const [previewRightDelta, setPreviewRightDelta] =
|
|
5962
|
-
const dragMode =
|
|
5963
|
-
const startX =
|
|
5964
|
-
const longPressTimer =
|
|
5965
|
-
const moved =
|
|
5998
|
+
const [previewLeftDelta, setPreviewLeftDelta] = React137__default.useState(0);
|
|
5999
|
+
const [previewRightDelta, setPreviewRightDelta] = React137__default.useState(0);
|
|
6000
|
+
const dragMode = React137__default.useRef(null);
|
|
6001
|
+
const startX = React137__default.useRef(0);
|
|
6002
|
+
const longPressTimer = React137__default.useRef(null);
|
|
6003
|
+
const moved = React137__default.useRef(false);
|
|
5966
6004
|
const baseLeft = unitsBetween(viewportStart, item.start, scale) * columnWidth;
|
|
5967
6005
|
const baseRight = unitsBetween(viewportStart, item.end, scale) * columnWidth;
|
|
5968
6006
|
const baseWidth = Math.max(columnWidth * 0.25, baseRight - baseLeft);
|
|
@@ -6168,7 +6206,7 @@ function DependencyLayer({
|
|
|
6168
6206
|
timelineWidth,
|
|
6169
6207
|
totalHeight
|
|
6170
6208
|
}) {
|
|
6171
|
-
const itemById =
|
|
6209
|
+
const itemById = React137__default.useMemo(() => {
|
|
6172
6210
|
const m = /* @__PURE__ */ new Map();
|
|
6173
6211
|
for (const it of items) m.set(it.id, it);
|
|
6174
6212
|
return m;
|
|
@@ -6267,9 +6305,9 @@ function KanbanColumn({ column, isOver }) {
|
|
|
6267
6305
|
] });
|
|
6268
6306
|
}
|
|
6269
6307
|
function Kanban({ columns: initialColumns, onMoveCard, className }) {
|
|
6270
|
-
const [cols, setCols] =
|
|
6271
|
-
const [activeCard, setActiveCard] =
|
|
6272
|
-
const [overColId, setOverColId] =
|
|
6308
|
+
const [cols, setCols] = React137__default.useState(initialColumns);
|
|
6309
|
+
const [activeCard, setActiveCard] = React137__default.useState(null);
|
|
6310
|
+
const [overColId, setOverColId] = React137__default.useState(null);
|
|
6273
6311
|
const sensors = useSensors(useSensor(PointerSensor, { activationConstraint: { distance: 5 } }));
|
|
6274
6312
|
const findColByCard = (cardId) => cols.find((c) => c.cards.some((card) => card.id === cardId));
|
|
6275
6313
|
const onDragStart = ({ active }) => {
|
|
@@ -6338,10 +6376,10 @@ function ToolbarButton({
|
|
|
6338
6376
|
] });
|
|
6339
6377
|
}
|
|
6340
6378
|
function LinkPopover({ editor }) {
|
|
6341
|
-
const [open, setOpen] =
|
|
6342
|
-
const [url, setUrl] =
|
|
6379
|
+
const [open, setOpen] = React137__default.useState(false);
|
|
6380
|
+
const [url, setUrl] = React137__default.useState("");
|
|
6343
6381
|
const isActive = editor.isActive("link");
|
|
6344
|
-
|
|
6382
|
+
React137__default.useEffect(() => {
|
|
6345
6383
|
if (!open) return;
|
|
6346
6384
|
const current = editor.getAttributes("link")?.href;
|
|
6347
6385
|
setUrl(current ?? "");
|
|
@@ -6806,7 +6844,7 @@ var proseClasses = cn(
|
|
|
6806
6844
|
// Selected cells in tables
|
|
6807
6845
|
"[&_.selectedCell]:bg-[hsl(var(--accent))]/40"
|
|
6808
6846
|
);
|
|
6809
|
-
var RichEditor =
|
|
6847
|
+
var RichEditor = React137__default.forwardRef(
|
|
6810
6848
|
function RichEditor2({
|
|
6811
6849
|
value,
|
|
6812
6850
|
defaultValue,
|
|
@@ -6820,12 +6858,12 @@ var RichEditor = React136__default.forwardRef(
|
|
|
6820
6858
|
}, ref) {
|
|
6821
6859
|
const isControlled = value !== void 0;
|
|
6822
6860
|
const initialContent = isControlled ? value ?? "" : defaultValue ?? "";
|
|
6823
|
-
const debounceRef =
|
|
6824
|
-
const onChangeRef =
|
|
6825
|
-
|
|
6861
|
+
const debounceRef = React137__default.useRef(null);
|
|
6862
|
+
const onChangeRef = React137__default.useRef(onChange);
|
|
6863
|
+
React137__default.useEffect(() => {
|
|
6826
6864
|
onChangeRef.current = onChange;
|
|
6827
6865
|
}, [onChange]);
|
|
6828
|
-
const [charCount, setCharCount] =
|
|
6866
|
+
const [charCount, setCharCount] = React137__default.useState(0);
|
|
6829
6867
|
const editor = useEditor({
|
|
6830
6868
|
editable,
|
|
6831
6869
|
content: initialContent,
|
|
@@ -6868,18 +6906,18 @@ var RichEditor = React136__default.forwardRef(
|
|
|
6868
6906
|
}, 100);
|
|
6869
6907
|
}
|
|
6870
6908
|
});
|
|
6871
|
-
|
|
6909
|
+
React137__default.useEffect(() => {
|
|
6872
6910
|
if (!editor || !isControlled) return;
|
|
6873
6911
|
const current = editor.getHTML();
|
|
6874
6912
|
if ((value ?? "") !== current) {
|
|
6875
6913
|
editor.commands.setContent(value ?? "", { emitUpdate: false });
|
|
6876
6914
|
}
|
|
6877
6915
|
}, [editor, isControlled, value]);
|
|
6878
|
-
|
|
6916
|
+
React137__default.useEffect(() => {
|
|
6879
6917
|
if (!editor) return;
|
|
6880
6918
|
if (editor.isEditable !== editable) editor.setEditable(editable);
|
|
6881
6919
|
}, [editor, editable]);
|
|
6882
|
-
|
|
6920
|
+
React137__default.useEffect(() => {
|
|
6883
6921
|
return () => {
|
|
6884
6922
|
if (debounceRef.current) clearTimeout(debounceRef.current);
|
|
6885
6923
|
};
|
|
@@ -6977,10 +7015,10 @@ function ToggleButtonGroup(props) {
|
|
|
6977
7015
|
props.onChange(val);
|
|
6978
7016
|
}
|
|
6979
7017
|
};
|
|
6980
|
-
return /* @__PURE__ */ jsx("div", { className: cn("inline-flex items-center gap-1 rounded-md border border-[hsl(var(--border))] bg-[hsl(var(--muted)/0.4)] p-0.5", className), children:
|
|
6981
|
-
if (!
|
|
7018
|
+
return /* @__PURE__ */ jsx("div", { className: cn("inline-flex items-center gap-1 rounded-md border border-[hsl(var(--border))] bg-[hsl(var(--muted)/0.4)] p-0.5", className), children: React137__default.Children.map(children, (child) => {
|
|
7019
|
+
if (!React137__default.isValidElement(child)) return child;
|
|
6982
7020
|
const tb = child;
|
|
6983
|
-
return
|
|
7021
|
+
return React137__default.cloneElement(tb, {
|
|
6984
7022
|
pressed: isPressed(tb.props.value),
|
|
6985
7023
|
onClick: () => handleClick(tb.props.value)
|
|
6986
7024
|
});
|
|
@@ -7335,7 +7373,7 @@ function useChecklist() {
|
|
|
7335
7373
|
if (!ctx) throw new Error("<ChecklistItem> must be used inside <Checklist>");
|
|
7336
7374
|
return ctx;
|
|
7337
7375
|
}
|
|
7338
|
-
var Checklist =
|
|
7376
|
+
var Checklist = React137__default.forwardRef(
|
|
7339
7377
|
({
|
|
7340
7378
|
title = "Getting started",
|
|
7341
7379
|
description,
|
|
@@ -7351,7 +7389,7 @@ var Checklist = React136__default.forwardRef(
|
|
|
7351
7389
|
}, ref) => {
|
|
7352
7390
|
const [internalCompleted, setInternalCompleted] = useState({});
|
|
7353
7391
|
const [open, setOpen] = useState(defaultOpen);
|
|
7354
|
-
const completedFiredRef =
|
|
7392
|
+
const completedFiredRef = React137__default.useRef(false);
|
|
7355
7393
|
const isControlled = controlledCompleted !== void 0;
|
|
7356
7394
|
const completed = isControlled ? controlledCompleted : internalCompleted;
|
|
7357
7395
|
const setCompleted = useCallback(
|
|
@@ -7363,8 +7401,8 @@ var Checklist = React136__default.forwardRef(
|
|
|
7363
7401
|
);
|
|
7364
7402
|
const total = useMemo(() => {
|
|
7365
7403
|
let n = 0;
|
|
7366
|
-
|
|
7367
|
-
if (
|
|
7404
|
+
React137__default.Children.forEach(children, (child) => {
|
|
7405
|
+
if (React137__default.isValidElement(child) && child.type.displayName === "ChecklistItem") {
|
|
7368
7406
|
n++;
|
|
7369
7407
|
}
|
|
7370
7408
|
});
|
|
@@ -7374,7 +7412,7 @@ var Checklist = React136__default.forwardRef(
|
|
|
7374
7412
|
() => Object.values(completed).filter(Boolean).length,
|
|
7375
7413
|
[completed]
|
|
7376
7414
|
);
|
|
7377
|
-
|
|
7415
|
+
React137__default.useEffect(() => {
|
|
7378
7416
|
if (!completedFiredRef.current && total > 0 && doneCount >= total) {
|
|
7379
7417
|
completedFiredRef.current = true;
|
|
7380
7418
|
onComplete?.();
|
|
@@ -7435,7 +7473,7 @@ var Checklist = React136__default.forwardRef(
|
|
|
7435
7473
|
}
|
|
7436
7474
|
);
|
|
7437
7475
|
Checklist.displayName = "Checklist";
|
|
7438
|
-
var ChecklistItem =
|
|
7476
|
+
var ChecklistItem = React137__default.forwardRef(
|
|
7439
7477
|
({ id, title, description, action, onActivate, className, ...props }, ref) => {
|
|
7440
7478
|
const { completed, setCompleted } = useChecklist();
|
|
7441
7479
|
const done = !!completed[id];
|
|
@@ -7783,7 +7821,7 @@ function Field({ label, description, error, required, children, className }) {
|
|
|
7783
7821
|
error && /* @__PURE__ */ jsx(FieldError, { children: error })
|
|
7784
7822
|
] });
|
|
7785
7823
|
}
|
|
7786
|
-
var FieldLabel =
|
|
7824
|
+
var FieldLabel = React137__default.forwardRef(
|
|
7787
7825
|
({ className, required, children, ...props }, ref) => /* @__PURE__ */ jsxs(
|
|
7788
7826
|
"label",
|
|
7789
7827
|
{
|
|
@@ -7798,7 +7836,7 @@ var FieldLabel = React136__default.forwardRef(
|
|
|
7798
7836
|
)
|
|
7799
7837
|
);
|
|
7800
7838
|
FieldLabel.displayName = "FieldLabel";
|
|
7801
|
-
var FieldDescription =
|
|
7839
|
+
var FieldDescription = React137__default.forwardRef(
|
|
7802
7840
|
({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
7803
7841
|
"p",
|
|
7804
7842
|
{
|
|
@@ -7809,7 +7847,7 @@ var FieldDescription = React136__default.forwardRef(
|
|
|
7809
7847
|
)
|
|
7810
7848
|
);
|
|
7811
7849
|
FieldDescription.displayName = "FieldDescription";
|
|
7812
|
-
var FieldError =
|
|
7850
|
+
var FieldError = React137__default.forwardRef(
|
|
7813
7851
|
({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
7814
7852
|
"p",
|
|
7815
7853
|
{
|
|
@@ -7910,7 +7948,7 @@ function defaultFor(format3, showAlpha) {
|
|
|
7910
7948
|
if (format3 === "rgb") return showAlpha ? "rgba(59, 130, 246, 1)" : "rgb(59, 130, 246)";
|
|
7911
7949
|
return showAlpha ? "hsla(217, 91%, 60%, 1)" : "hsl(217, 91%, 60%)";
|
|
7912
7950
|
}
|
|
7913
|
-
var ColorPicker =
|
|
7951
|
+
var ColorPicker = React137__default.forwardRef(
|
|
7914
7952
|
({
|
|
7915
7953
|
value: valueProp,
|
|
7916
7954
|
defaultValue,
|
|
@@ -7925,21 +7963,21 @@ var ColorPicker = React136__default.forwardRef(
|
|
|
7925
7963
|
}, ref) => {
|
|
7926
7964
|
const fallback = defaultValue ?? defaultFor(format3, showAlpha);
|
|
7927
7965
|
const isControlled = valueProp !== void 0;
|
|
7928
|
-
const [internal, setInternal] =
|
|
7966
|
+
const [internal, setInternal] = React137__default.useState(fallback);
|
|
7929
7967
|
const value = isControlled ? valueProp : internal;
|
|
7930
|
-
const [draft, setDraft] =
|
|
7931
|
-
const [draftValid, setDraftValid] =
|
|
7932
|
-
|
|
7968
|
+
const [draft, setDraft] = React137__default.useState(value);
|
|
7969
|
+
const [draftValid, setDraftValid] = React137__default.useState(true);
|
|
7970
|
+
React137__default.useEffect(() => {
|
|
7933
7971
|
setDraft(value);
|
|
7934
7972
|
setDraftValid(true);
|
|
7935
7973
|
}, [value]);
|
|
7936
|
-
const [eyeDropperSupported, setEyeDropperSupported] =
|
|
7937
|
-
|
|
7974
|
+
const [eyeDropperSupported, setEyeDropperSupported] = React137__default.useState(false);
|
|
7975
|
+
React137__default.useEffect(() => {
|
|
7938
7976
|
if (typeof window !== "undefined" && "EyeDropper" in window) {
|
|
7939
7977
|
setEyeDropperSupported(true);
|
|
7940
7978
|
}
|
|
7941
7979
|
}, []);
|
|
7942
|
-
const commit =
|
|
7980
|
+
const commit = React137__default.useCallback(
|
|
7943
7981
|
(next) => {
|
|
7944
7982
|
if (!isControlled) setInternal(next);
|
|
7945
7983
|
onValueChange?.(next);
|
|
@@ -8176,7 +8214,7 @@ function FileUploadPreview({ files, onRemove, className }) {
|
|
|
8176
8214
|
] })
|
|
8177
8215
|
] }, i)) });
|
|
8178
8216
|
}
|
|
8179
|
-
var FloatingLabelInput =
|
|
8217
|
+
var FloatingLabelInput = React137__default.forwardRef(
|
|
8180
8218
|
({ label, error, hint, wrapperClassName, className, id, value, defaultValue, onFocus, onBlur, onChange, ...props }, ref) => {
|
|
8181
8219
|
const autoId = useId();
|
|
8182
8220
|
const inputId = id ?? autoId;
|
|
@@ -8260,7 +8298,7 @@ function FormField(props) {
|
|
|
8260
8298
|
function FormItem({ className, ...props }) {
|
|
8261
8299
|
return /* @__PURE__ */ jsx("div", { className: cn("flex flex-col gap-1.5", className), ...props });
|
|
8262
8300
|
}
|
|
8263
|
-
var FormLabel =
|
|
8301
|
+
var FormLabel = React137__default.forwardRef(
|
|
8264
8302
|
({ className, error, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
8265
8303
|
"label",
|
|
8266
8304
|
{
|
|
@@ -8275,7 +8313,7 @@ var FormLabel = React136__default.forwardRef(
|
|
|
8275
8313
|
)
|
|
8276
8314
|
);
|
|
8277
8315
|
FormLabel.displayName = "FormLabel";
|
|
8278
|
-
var FormControl =
|
|
8316
|
+
var FormControl = React137__default.forwardRef(
|
|
8279
8317
|
({ ...props }, ref) => {
|
|
8280
8318
|
const id = useId();
|
|
8281
8319
|
return /* @__PURE__ */ jsx("div", { ref, id, ...props });
|
|
@@ -8332,7 +8370,7 @@ function getStrength(value) {
|
|
|
8332
8370
|
if (score <= 3) return { level: "medium", width: "w-2/3", color: "bg-yellow-500" };
|
|
8333
8371
|
return { level: "strong", width: "w-full", color: "bg-green-500" };
|
|
8334
8372
|
}
|
|
8335
|
-
var PasswordInput =
|
|
8373
|
+
var PasswordInput = React137__default.forwardRef(
|
|
8336
8374
|
({ className, strength, ...props }, ref) => {
|
|
8337
8375
|
const [show, setShow] = useState(false);
|
|
8338
8376
|
const value = String(props.value ?? "");
|
|
@@ -8367,7 +8405,7 @@ var PasswordInput = React136__default.forwardRef(
|
|
|
8367
8405
|
}
|
|
8368
8406
|
);
|
|
8369
8407
|
PasswordInput.displayName = "PasswordInput";
|
|
8370
|
-
var SearchInput =
|
|
8408
|
+
var SearchInput = React137__default.forwardRef(
|
|
8371
8409
|
({ className, shortcut, onClear, onChange, value: valueProp, defaultValue, ...props }, ref) => {
|
|
8372
8410
|
const [internalValue, setInternalValue] = useState(defaultValue ?? "");
|
|
8373
8411
|
const isControlled = valueProp !== void 0;
|
|
@@ -8430,7 +8468,7 @@ function StepForm({ steps, onSubmit, children, className }) {
|
|
|
8430
8468
|
isFirst: currentStep === 0,
|
|
8431
8469
|
isLast: currentStep === totalSteps - 1
|
|
8432
8470
|
};
|
|
8433
|
-
const childArray =
|
|
8471
|
+
const childArray = React137__default.Children.toArray(children);
|
|
8434
8472
|
const currentChild = childArray[currentStep];
|
|
8435
8473
|
return /* @__PURE__ */ jsx(StepFormContext.Provider, { value: ctx, children: /* @__PURE__ */ jsxs("div", { className: cn("flex flex-col gap-6", className), children: [
|
|
8436
8474
|
/* @__PURE__ */ jsx(StepIndicator, { steps, currentStep }),
|
|
@@ -8439,7 +8477,7 @@ function StepForm({ steps, onSubmit, children, className }) {
|
|
|
8439
8477
|
] }) });
|
|
8440
8478
|
}
|
|
8441
8479
|
function StepIndicator({ steps, currentStep }) {
|
|
8442
|
-
return /* @__PURE__ */ jsx("div", { className: "flex items-center gap-2", children: steps.map((label, i) => /* @__PURE__ */ jsxs(
|
|
8480
|
+
return /* @__PURE__ */ jsx("div", { className: "flex items-center gap-2", children: steps.map((label, i) => /* @__PURE__ */ jsxs(React137__default.Fragment, { children: [
|
|
8443
8481
|
i > 0 && /* @__PURE__ */ jsx("div", { className: cn("h-px flex-1 bg-[hsl(var(--border))]", i <= currentStep && "bg-[hsl(var(--primary))]") }),
|
|
8444
8482
|
/* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center gap-1", children: [
|
|
8445
8483
|
/* @__PURE__ */ jsx("div", { className: cn(
|
|
@@ -8468,7 +8506,7 @@ function StepFormNavigation({ onSubmit, submitLabel = "Submit" }) {
|
|
|
8468
8506
|
isLast ? /* @__PURE__ */ jsx(Button, { type: "button", onClick: onSubmit, children: submitLabel }) : /* @__PURE__ */ jsx(Button, { type: "button", onClick: next, children: "Next" })
|
|
8469
8507
|
] });
|
|
8470
8508
|
}
|
|
8471
|
-
var Tags =
|
|
8509
|
+
var Tags = React137__default.forwardRef(
|
|
8472
8510
|
({
|
|
8473
8511
|
value: valueProp,
|
|
8474
8512
|
defaultValue,
|
|
@@ -8484,25 +8522,25 @@ var Tags = React136__default.forwardRef(
|
|
|
8484
8522
|
...props
|
|
8485
8523
|
}, ref) => {
|
|
8486
8524
|
const isControlled = valueProp !== void 0;
|
|
8487
|
-
const [internal, setInternal] =
|
|
8525
|
+
const [internal, setInternal] = React137__default.useState(defaultValue ?? []);
|
|
8488
8526
|
const tags = isControlled ? valueProp : internal;
|
|
8489
|
-
const [input, setInput] =
|
|
8490
|
-
const [error, setError] =
|
|
8491
|
-
const [focused, setFocused] =
|
|
8492
|
-
const [activeIndex, setActiveIndex] =
|
|
8493
|
-
const inputRef =
|
|
8494
|
-
const containerRef =
|
|
8495
|
-
|
|
8527
|
+
const [input, setInput] = React137__default.useState("");
|
|
8528
|
+
const [error, setError] = React137__default.useState(null);
|
|
8529
|
+
const [focused, setFocused] = React137__default.useState(false);
|
|
8530
|
+
const [activeIndex, setActiveIndex] = React137__default.useState(0);
|
|
8531
|
+
const inputRef = React137__default.useRef(null);
|
|
8532
|
+
const containerRef = React137__default.useRef(null);
|
|
8533
|
+
React137__default.useImperativeHandle(ref, () => containerRef.current);
|
|
8496
8534
|
const atMax = maxTags !== void 0 && tags.length >= maxTags;
|
|
8497
8535
|
const inputDisabled = disabled || atMax;
|
|
8498
|
-
const commit =
|
|
8536
|
+
const commit = React137__default.useCallback(
|
|
8499
8537
|
(next) => {
|
|
8500
8538
|
if (!isControlled) setInternal(next);
|
|
8501
8539
|
onValueChange?.(next);
|
|
8502
8540
|
},
|
|
8503
8541
|
[isControlled, onValueChange]
|
|
8504
8542
|
);
|
|
8505
|
-
const addTag =
|
|
8543
|
+
const addTag = React137__default.useCallback(
|
|
8506
8544
|
(raw) => {
|
|
8507
8545
|
const tag = raw.trim();
|
|
8508
8546
|
if (!tag) return false;
|
|
@@ -8528,20 +8566,20 @@ var Tags = React136__default.forwardRef(
|
|
|
8528
8566
|
},
|
|
8529
8567
|
[tags, allowDuplicates, validate, atMax, commit]
|
|
8530
8568
|
);
|
|
8531
|
-
const removeTag =
|
|
8569
|
+
const removeTag = React137__default.useCallback(
|
|
8532
8570
|
(index) => {
|
|
8533
8571
|
commit(tags.filter((_, i) => i !== index));
|
|
8534
8572
|
setError(null);
|
|
8535
8573
|
},
|
|
8536
8574
|
[tags, commit]
|
|
8537
8575
|
);
|
|
8538
|
-
const filteredSuggestions =
|
|
8576
|
+
const filteredSuggestions = React137__default.useMemo(() => {
|
|
8539
8577
|
if (!suggestions || !input.trim()) return [];
|
|
8540
8578
|
const q = input.trim().toLowerCase();
|
|
8541
8579
|
return suggestions.filter((s) => s.toLowerCase().includes(q)).filter((s) => allowDuplicates || !tags.includes(s)).slice(0, 8);
|
|
8542
8580
|
}, [suggestions, input, tags, allowDuplicates]);
|
|
8543
8581
|
const showPopover = focused && !inputDisabled && filteredSuggestions.length > 0;
|
|
8544
|
-
|
|
8582
|
+
React137__default.useEffect(() => {
|
|
8545
8583
|
if (activeIndex >= filteredSuggestions.length) setActiveIndex(0);
|
|
8546
8584
|
}, [filteredSuggestions.length, activeIndex]);
|
|
8547
8585
|
const handleKeyDown = (e) => {
|
|
@@ -8683,7 +8721,7 @@ var Tags = React136__default.forwardRef(
|
|
|
8683
8721
|
}
|
|
8684
8722
|
);
|
|
8685
8723
|
Tags.displayName = "Tags";
|
|
8686
|
-
var AppShellCtx =
|
|
8724
|
+
var AppShellCtx = React137__default.createContext({
|
|
8687
8725
|
collapsed: false,
|
|
8688
8726
|
setCollapsed: () => {
|
|
8689
8727
|
},
|
|
@@ -8691,12 +8729,12 @@ var AppShellCtx = React136__default.createContext({
|
|
|
8691
8729
|
setMobileOpen: () => {
|
|
8692
8730
|
}
|
|
8693
8731
|
});
|
|
8694
|
-
var useAppShell = () =>
|
|
8695
|
-
var AppShell =
|
|
8732
|
+
var useAppShell = () => React137__default.useContext(AppShellCtx);
|
|
8733
|
+
var AppShell = React137__default.forwardRef(
|
|
8696
8734
|
({ className, defaultCollapsed = false, children, ...props }, ref) => {
|
|
8697
|
-
const [collapsed, setCollapsed] =
|
|
8698
|
-
const [mobileOpen, setMobileOpen] =
|
|
8699
|
-
|
|
8735
|
+
const [collapsed, setCollapsed] = React137__default.useState(defaultCollapsed);
|
|
8736
|
+
const [mobileOpen, setMobileOpen] = React137__default.useState(false);
|
|
8737
|
+
React137__default.useEffect(() => {
|
|
8700
8738
|
const handleClick = (e) => {
|
|
8701
8739
|
const target = e.target;
|
|
8702
8740
|
if (target.closest("a[href]") || target.closest("[data-mobile-close]")) {
|
|
@@ -8727,7 +8765,7 @@ var AppShell = React136__default.forwardRef(
|
|
|
8727
8765
|
}
|
|
8728
8766
|
);
|
|
8729
8767
|
AppShell.displayName = "AppShell";
|
|
8730
|
-
var AppShellSidebar =
|
|
8768
|
+
var AppShellSidebar = React137__default.forwardRef(
|
|
8731
8769
|
({ className, ...props }, ref) => {
|
|
8732
8770
|
const { mobileOpen } = useAppShell();
|
|
8733
8771
|
return /* @__PURE__ */ jsx(
|
|
@@ -8748,11 +8786,11 @@ var AppShellSidebar = React136__default.forwardRef(
|
|
|
8748
8786
|
}
|
|
8749
8787
|
);
|
|
8750
8788
|
AppShellSidebar.displayName = "AppShellSidebar";
|
|
8751
|
-
var AppShellMain =
|
|
8789
|
+
var AppShellMain = React137__default.forwardRef(
|
|
8752
8790
|
({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("flex-1 min-w-0 flex flex-col overflow-auto", className), ...props })
|
|
8753
8791
|
);
|
|
8754
8792
|
AppShellMain.displayName = "AppShellMain";
|
|
8755
|
-
var MobileSidebarTrigger =
|
|
8793
|
+
var MobileSidebarTrigger = React137__default.forwardRef(
|
|
8756
8794
|
({ className, ...props }, ref) => {
|
|
8757
8795
|
const { mobileOpen, setMobileOpen } = useAppShell();
|
|
8758
8796
|
return /* @__PURE__ */ jsx(
|
|
@@ -8781,7 +8819,7 @@ var sizeMap5 = {
|
|
|
8781
8819
|
xl: "max-w-screen-xl",
|
|
8782
8820
|
full: "max-w-full"
|
|
8783
8821
|
};
|
|
8784
|
-
var Container =
|
|
8822
|
+
var Container = React137__default.forwardRef(
|
|
8785
8823
|
({ className, size = "lg", noPadding = false, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
8786
8824
|
"div",
|
|
8787
8825
|
{
|
|
@@ -8797,7 +8835,7 @@ var Container = React136__default.forwardRef(
|
|
|
8797
8835
|
)
|
|
8798
8836
|
);
|
|
8799
8837
|
Container.displayName = "Container";
|
|
8800
|
-
var Navbar =
|
|
8838
|
+
var Navbar = React137__default.forwardRef(
|
|
8801
8839
|
({ className, sticky = false, border = true, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
8802
8840
|
"nav",
|
|
8803
8841
|
{
|
|
@@ -8813,7 +8851,7 @@ var Navbar = React136__default.forwardRef(
|
|
|
8813
8851
|
)
|
|
8814
8852
|
);
|
|
8815
8853
|
Navbar.displayName = "Navbar";
|
|
8816
|
-
var NavbarBrand =
|
|
8854
|
+
var NavbarBrand = React137__default.forwardRef(
|
|
8817
8855
|
({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("flex items-center gap-2 px-4 shrink-0", className), ...props })
|
|
8818
8856
|
);
|
|
8819
8857
|
NavbarBrand.displayName = "NavbarBrand";
|
|
@@ -8822,7 +8860,7 @@ var alignMap = {
|
|
|
8822
8860
|
center: "justify-center flex-1",
|
|
8823
8861
|
end: "justify-end ml-auto"
|
|
8824
8862
|
};
|
|
8825
|
-
var NavbarContent =
|
|
8863
|
+
var NavbarContent = React137__default.forwardRef(
|
|
8826
8864
|
({ className, align = "start", ...props }, ref) => /* @__PURE__ */ jsx(
|
|
8827
8865
|
"div",
|
|
8828
8866
|
{
|
|
@@ -8833,11 +8871,11 @@ var NavbarContent = React136__default.forwardRef(
|
|
|
8833
8871
|
)
|
|
8834
8872
|
);
|
|
8835
8873
|
NavbarContent.displayName = "NavbarContent";
|
|
8836
|
-
var NavbarItem =
|
|
8874
|
+
var NavbarItem = React137__default.forwardRef(
|
|
8837
8875
|
({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("flex items-center", className), ...props })
|
|
8838
8876
|
);
|
|
8839
8877
|
NavbarItem.displayName = "NavbarItem";
|
|
8840
|
-
var Page =
|
|
8878
|
+
var Page = React137__default.forwardRef(
|
|
8841
8879
|
({ className, maxWidth, style, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
8842
8880
|
"div",
|
|
8843
8881
|
{
|
|
@@ -8849,7 +8887,7 @@ var Page = React136__default.forwardRef(
|
|
|
8849
8887
|
)
|
|
8850
8888
|
);
|
|
8851
8889
|
Page.displayName = "Page";
|
|
8852
|
-
var PageHeader =
|
|
8890
|
+
var PageHeader = React137__default.forwardRef(
|
|
8853
8891
|
({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
8854
8892
|
"div",
|
|
8855
8893
|
{
|
|
@@ -8860,7 +8898,7 @@ var PageHeader = React136__default.forwardRef(
|
|
|
8860
8898
|
)
|
|
8861
8899
|
);
|
|
8862
8900
|
PageHeader.displayName = "PageHeader";
|
|
8863
|
-
var PageTitle =
|
|
8901
|
+
var PageTitle = React137__default.forwardRef(
|
|
8864
8902
|
({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
8865
8903
|
"h1",
|
|
8866
8904
|
{
|
|
@@ -8871,19 +8909,19 @@ var PageTitle = React136__default.forwardRef(
|
|
|
8871
8909
|
)
|
|
8872
8910
|
);
|
|
8873
8911
|
PageTitle.displayName = "PageTitle";
|
|
8874
|
-
var PageDescription =
|
|
8912
|
+
var PageDescription = React137__default.forwardRef(
|
|
8875
8913
|
({ className, ...props }, ref) => /* @__PURE__ */ jsx("p", { ref, className: cn("text-sm text-[hsl(var(--muted-foreground))] mt-1", className), ...props })
|
|
8876
8914
|
);
|
|
8877
8915
|
PageDescription.displayName = "PageDescription";
|
|
8878
|
-
var PageActions =
|
|
8916
|
+
var PageActions = React137__default.forwardRef(
|
|
8879
8917
|
({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("flex items-center gap-2 shrink-0", className), ...props })
|
|
8880
8918
|
);
|
|
8881
8919
|
PageActions.displayName = "PageActions";
|
|
8882
|
-
var PageBody =
|
|
8920
|
+
var PageBody = React137__default.forwardRef(
|
|
8883
8921
|
({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("flex-1 p-6 flex flex-col gap-6", className), ...props })
|
|
8884
8922
|
);
|
|
8885
8923
|
PageBody.displayName = "PageBody";
|
|
8886
|
-
var ResizeBox =
|
|
8924
|
+
var ResizeBox = React137__default.forwardRef(
|
|
8887
8925
|
({ className, resize = "both", minWidth = 100, minHeight = 100, style, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
8888
8926
|
"div",
|
|
8889
8927
|
{
|
|
@@ -8900,7 +8938,7 @@ var HandleIcon = () => /* @__PURE__ */ jsxs("svg", { width: "10", height: "10",
|
|
|
8900
8938
|
/* @__PURE__ */ jsx("path", { d: "M8 5L5 8", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round" }),
|
|
8901
8939
|
/* @__PURE__ */ jsx("path", { d: "M8 8L8 8", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round" })
|
|
8902
8940
|
] });
|
|
8903
|
-
var ResizeHandle =
|
|
8941
|
+
var ResizeHandle = React137__default.forwardRef(
|
|
8904
8942
|
({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
8905
8943
|
"div",
|
|
8906
8944
|
{
|
|
@@ -8916,16 +8954,16 @@ var ResizeHandle = React136__default.forwardRef(
|
|
|
8916
8954
|
)
|
|
8917
8955
|
);
|
|
8918
8956
|
ResizeHandle.displayName = "ResizeHandle";
|
|
8919
|
-
var SidebarCtx2 =
|
|
8920
|
-
var useSidebarCtx = () =>
|
|
8957
|
+
var SidebarCtx2 = React137__default.createContext({ collapsed: false });
|
|
8958
|
+
var useSidebarCtx = () => React137__default.useContext(SidebarCtx2);
|
|
8921
8959
|
var makeSlot = (name, cls) => {
|
|
8922
|
-
const C =
|
|
8960
|
+
const C = React137__default.forwardRef(
|
|
8923
8961
|
({ className, ...p }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn(cls, className), ...p })
|
|
8924
8962
|
);
|
|
8925
8963
|
C.displayName = name;
|
|
8926
8964
|
return C;
|
|
8927
8965
|
};
|
|
8928
|
-
var Sidebar2 =
|
|
8966
|
+
var Sidebar2 = React137__default.forwardRef(
|
|
8929
8967
|
({ className, collapsed = false, onCollapse, width = "240px", style, children, ...props }, ref) => /* @__PURE__ */ jsx(SidebarCtx2.Provider, { value: { collapsed }, children: /* @__PURE__ */ jsxs(
|
|
8930
8968
|
"div",
|
|
8931
8969
|
{
|
|
@@ -8953,7 +8991,7 @@ var SidebarContent = makeSlot("SidebarContent", "flex-1 overflow-y-auto py-2");
|
|
|
8953
8991
|
var SidebarFooter2 = makeSlot("SidebarFooter", "px-3 py-3 border-t border-[hsl(var(--border))] shrink-0");
|
|
8954
8992
|
var SidebarGroup = makeSlot("SidebarGroup", "mb-2");
|
|
8955
8993
|
var SidebarSeparator2 = makeSlot("SidebarSeparator", "h-px bg-[hsl(var(--border))] mx-3 my-2");
|
|
8956
|
-
var SidebarGroupLabel =
|
|
8994
|
+
var SidebarGroupLabel = React137__default.forwardRef(
|
|
8957
8995
|
({ className, ...props }, ref) => {
|
|
8958
8996
|
const { collapsed } = useSidebarCtx();
|
|
8959
8997
|
return /* @__PURE__ */ jsx(
|
|
@@ -8967,7 +9005,7 @@ var SidebarGroupLabel = React136__default.forwardRef(
|
|
|
8967
9005
|
}
|
|
8968
9006
|
);
|
|
8969
9007
|
SidebarGroupLabel.displayName = "SidebarGroupLabel";
|
|
8970
|
-
var SidebarItem2 =
|
|
9008
|
+
var SidebarItem2 = React137__default.forwardRef(
|
|
8971
9009
|
({ className, icon, label, active, href, badge, onClick, ...props }, ref) => {
|
|
8972
9010
|
const { collapsed } = useSidebarCtx();
|
|
8973
9011
|
const cls = cn(
|
|
@@ -8986,11 +9024,11 @@ var SidebarItem2 = React136__default.forwardRef(
|
|
|
8986
9024
|
}
|
|
8987
9025
|
);
|
|
8988
9026
|
SidebarItem2.displayName = "SidebarItem";
|
|
8989
|
-
var SplitPage =
|
|
9027
|
+
var SplitPage = React137__default.forwardRef(
|
|
8990
9028
|
({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("flex h-full w-full overflow-hidden", className), ...props })
|
|
8991
9029
|
);
|
|
8992
9030
|
SplitPage.displayName = "SplitPage";
|
|
8993
|
-
var SplitPageList =
|
|
9031
|
+
var SplitPageList = React137__default.forwardRef(
|
|
8994
9032
|
({ className, width = "320px", style, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
8995
9033
|
"div",
|
|
8996
9034
|
{
|
|
@@ -9002,7 +9040,7 @@ var SplitPageList = React136__default.forwardRef(
|
|
|
9002
9040
|
)
|
|
9003
9041
|
);
|
|
9004
9042
|
SplitPageList.displayName = "SplitPageList";
|
|
9005
|
-
var SplitPageDetail =
|
|
9043
|
+
var SplitPageDetail = React137__default.forwardRef(
|
|
9006
9044
|
({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("flex-1 min-w-0 h-full overflow-auto", className), ...props })
|
|
9007
9045
|
);
|
|
9008
9046
|
SplitPageDetail.displayName = "SplitPageDetail";
|
|
@@ -9027,7 +9065,7 @@ var justifyMap = {
|
|
|
9027
9065
|
around: "justify-around",
|
|
9028
9066
|
evenly: "justify-evenly"
|
|
9029
9067
|
};
|
|
9030
|
-
var Stack =
|
|
9068
|
+
var Stack = React137__default.forwardRef(
|
|
9031
9069
|
({ className, gap, direction = "col", align, justify, wrap, style, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
9032
9070
|
"div",
|
|
9033
9071
|
{
|
|
@@ -9046,15 +9084,15 @@ var Stack = React136__default.forwardRef(
|
|
|
9046
9084
|
)
|
|
9047
9085
|
);
|
|
9048
9086
|
Stack.displayName = "Stack";
|
|
9049
|
-
var HStack =
|
|
9087
|
+
var HStack = React137__default.forwardRef(
|
|
9050
9088
|
(props, ref) => /* @__PURE__ */ jsx(Stack, { ref, direction: "row", ...props })
|
|
9051
9089
|
);
|
|
9052
9090
|
HStack.displayName = "HStack";
|
|
9053
|
-
var VStack =
|
|
9091
|
+
var VStack = React137__default.forwardRef(
|
|
9054
9092
|
(props, ref) => /* @__PURE__ */ jsx(Stack, { ref, direction: "col", ...props })
|
|
9055
9093
|
);
|
|
9056
9094
|
VStack.displayName = "VStack";
|
|
9057
|
-
var PageLayout =
|
|
9095
|
+
var PageLayout = React137__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
9058
9096
|
"div",
|
|
9059
9097
|
{
|
|
9060
9098
|
ref,
|
|
@@ -9064,7 +9102,7 @@ var PageLayout = React136__default.forwardRef(({ className, ...props }, ref) =>
|
|
|
9064
9102
|
}
|
|
9065
9103
|
));
|
|
9066
9104
|
PageLayout.displayName = "PageLayout";
|
|
9067
|
-
var PageHeader2 =
|
|
9105
|
+
var PageHeader2 = React137__default.forwardRef(
|
|
9068
9106
|
({ className, title, description, actions, back, children }, ref) => /* @__PURE__ */ jsxs(
|
|
9069
9107
|
"div",
|
|
9070
9108
|
{
|
|
@@ -9086,7 +9124,7 @@ var PageHeader2 = React136__default.forwardRef(
|
|
|
9086
9124
|
)
|
|
9087
9125
|
);
|
|
9088
9126
|
PageHeader2.displayName = "PageHeader";
|
|
9089
|
-
var PageContainer =
|
|
9127
|
+
var PageContainer = React137__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
9090
9128
|
"div",
|
|
9091
9129
|
{
|
|
9092
9130
|
ref,
|
|
@@ -9100,7 +9138,7 @@ var PageContainer = React136__default.forwardRef(({ className, ...props }, ref)
|
|
|
9100
9138
|
}
|
|
9101
9139
|
));
|
|
9102
9140
|
PageContainer.displayName = "PageContainer";
|
|
9103
|
-
var PageMain =
|
|
9141
|
+
var PageMain = React137__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
9104
9142
|
"div",
|
|
9105
9143
|
{
|
|
9106
9144
|
ref,
|
|
@@ -9546,7 +9584,7 @@ var directionClasses = {
|
|
|
9546
9584
|
bl: "bg-gradient-to-bl",
|
|
9547
9585
|
l: "bg-gradient-to-l"
|
|
9548
9586
|
};
|
|
9549
|
-
var GradientHeading =
|
|
9587
|
+
var GradientHeading = React137__default.forwardRef(
|
|
9550
9588
|
({
|
|
9551
9589
|
as: Tag = "h2",
|
|
9552
9590
|
preset = "primary",
|
|
@@ -9592,7 +9630,7 @@ function formatNumber(value, decimals, format3, locale) {
|
|
|
9592
9630
|
}
|
|
9593
9631
|
return decimals > 0 ? value.toFixed(decimals) : String(Math.round(value));
|
|
9594
9632
|
}
|
|
9595
|
-
var AnimatedNumber =
|
|
9633
|
+
var AnimatedNumber = React137__default.forwardRef(
|
|
9596
9634
|
({
|
|
9597
9635
|
value,
|
|
9598
9636
|
from = 0,
|
|
@@ -9612,7 +9650,7 @@ var AnimatedNumber = React136__default.forwardRef(
|
|
|
9612
9650
|
const startTimeRef = useRef(null);
|
|
9613
9651
|
const containerRef = useRef(null);
|
|
9614
9652
|
const hasStarted = useRef(false);
|
|
9615
|
-
const runAnimation =
|
|
9653
|
+
const runAnimation = React137__default.useCallback(
|
|
9616
9654
|
(startFrom) => {
|
|
9617
9655
|
if (rafRef.current !== null) cancelAnimationFrame(rafRef.current);
|
|
9618
9656
|
startTimeRef.current = null;
|
|
@@ -9724,7 +9762,7 @@ function TextReveal({
|
|
|
9724
9762
|
}
|
|
9725
9763
|
}, [autoStart, delay]);
|
|
9726
9764
|
const units = mode === "chars" ? text.split("") : mode === "words" ? text.split(" ") : [text];
|
|
9727
|
-
return
|
|
9765
|
+
return React137__default.createElement(
|
|
9728
9766
|
Tag,
|
|
9729
9767
|
{
|
|
9730
9768
|
ref: containerRef,
|
|
@@ -9804,7 +9842,7 @@ function Typewriter({
|
|
|
9804
9842
|
if (timerRef.current) clearTimeout(timerRef.current);
|
|
9805
9843
|
};
|
|
9806
9844
|
}, [display, phase, wordIdx, words, typeSpeed, deleteSpeed, pauseAfter, loop]);
|
|
9807
|
-
return
|
|
9845
|
+
return React137__default.createElement(
|
|
9808
9846
|
Tag,
|
|
9809
9847
|
{
|
|
9810
9848
|
"data-slot": "typewriter",
|
|
@@ -9843,9 +9881,9 @@ var headingVariants = cva("font-heading tracking-tight text-foreground", {
|
|
|
9843
9881
|
},
|
|
9844
9882
|
defaultVariants: { size: "lg", tone: "default" }
|
|
9845
9883
|
});
|
|
9846
|
-
var Heading =
|
|
9884
|
+
var Heading = React137__default.forwardRef(
|
|
9847
9885
|
({ as: Tag = "h2", size, tone, className, ...props }, ref) => {
|
|
9848
|
-
return
|
|
9886
|
+
return React137__default.createElement(Tag, {
|
|
9849
9887
|
ref,
|
|
9850
9888
|
"data-slot": "heading",
|
|
9851
9889
|
className: cn(headingVariants({ size, tone }), className),
|
|
@@ -9875,9 +9913,9 @@ var bodyVariants = cva("font-sans", {
|
|
|
9875
9913
|
},
|
|
9876
9914
|
defaultVariants: { size: "md", tone: "default", weight: "normal" }
|
|
9877
9915
|
});
|
|
9878
|
-
var Body =
|
|
9916
|
+
var Body = React137__default.forwardRef(
|
|
9879
9917
|
({ as: Tag = "p", size, tone, weight, className, ...props }, ref) => {
|
|
9880
|
-
return
|
|
9918
|
+
return React137__default.createElement(Tag, {
|
|
9881
9919
|
ref,
|
|
9882
9920
|
"data-slot": "body",
|
|
9883
9921
|
className: cn(bodyVariants({ size, tone, weight }), className),
|
|
@@ -9896,7 +9934,7 @@ var captionVariants = cva("font-sans text-[11px] font-semibold uppercase trackin
|
|
|
9896
9934
|
},
|
|
9897
9935
|
defaultVariants: { tone: "default" }
|
|
9898
9936
|
});
|
|
9899
|
-
var Caption =
|
|
9937
|
+
var Caption = React137__default.forwardRef(
|
|
9900
9938
|
({ tone, className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
9901
9939
|
"span",
|
|
9902
9940
|
{
|
|
@@ -9908,7 +9946,7 @@ var Caption = React136__default.forwardRef(
|
|
|
9908
9946
|
)
|
|
9909
9947
|
);
|
|
9910
9948
|
Caption.displayName = "Caption";
|
|
9911
|
-
var Code3 =
|
|
9949
|
+
var Code3 = React137__default.forwardRef(
|
|
9912
9950
|
({ block, className, children, ...props }, ref) => {
|
|
9913
9951
|
if (block) {
|
|
9914
9952
|
return /* @__PURE__ */ jsx(
|
|
@@ -9960,7 +9998,7 @@ var presetStyles = {
|
|
|
9960
9998
|
},
|
|
9961
9999
|
custom: {}
|
|
9962
10000
|
};
|
|
9963
|
-
var GradientBackground =
|
|
10001
|
+
var GradientBackground = React137__default.forwardRef(
|
|
9964
10002
|
({
|
|
9965
10003
|
fixed = false,
|
|
9966
10004
|
preset = "slate",
|
|
@@ -10019,7 +10057,7 @@ var DEFAULT_COLORS4 = [
|
|
|
10019
10057
|
"hsl(280 100% 70% / 0.25)",
|
|
10020
10058
|
"hsl(217 33% 17% / 0.4)"
|
|
10021
10059
|
];
|
|
10022
|
-
var AnimatedGradient =
|
|
10060
|
+
var AnimatedGradient = React137__default.forwardRef(
|
|
10023
10061
|
({
|
|
10024
10062
|
colors = DEFAULT_COLORS4,
|
|
10025
10063
|
speed = 1,
|
|
@@ -10138,7 +10176,7 @@ var AnimatedGradient = React136__default.forwardRef(
|
|
|
10138
10176
|
}
|
|
10139
10177
|
);
|
|
10140
10178
|
AnimatedGradient.displayName = "AnimatedGradient";
|
|
10141
|
-
var DottedBackground =
|
|
10179
|
+
var DottedBackground = React137__default.forwardRef(
|
|
10142
10180
|
({
|
|
10143
10181
|
color,
|
|
10144
10182
|
dotSize = 1,
|
|
@@ -10185,7 +10223,7 @@ var DottedBackground = React136__default.forwardRef(
|
|
|
10185
10223
|
}
|
|
10186
10224
|
);
|
|
10187
10225
|
DottedBackground.displayName = "DottedBackground";
|
|
10188
|
-
var NoiseBackground =
|
|
10226
|
+
var NoiseBackground = React137__default.forwardRef(
|
|
10189
10227
|
({
|
|
10190
10228
|
opacity = 0.04,
|
|
10191
10229
|
frequency = 0.65,
|
|
@@ -10281,7 +10319,7 @@ var DEFAULT_COLORS5 = [
|
|
|
10281
10319
|
[0.55, 0.3, 0.95]
|
|
10282
10320
|
// chart-3 violet
|
|
10283
10321
|
];
|
|
10284
|
-
var HeroShaderA =
|
|
10322
|
+
var HeroShaderA = React137__default.forwardRef(
|
|
10285
10323
|
({
|
|
10286
10324
|
className,
|
|
10287
10325
|
colors = DEFAULT_COLORS5,
|
|
@@ -10295,7 +10333,7 @@ var HeroShaderA = React136__default.forwardRef(
|
|
|
10295
10333
|
const wrapRef = useRef(null);
|
|
10296
10334
|
const canvasRef = useRef(null);
|
|
10297
10335
|
const fallbackRef = useRef(false);
|
|
10298
|
-
|
|
10336
|
+
React137__default.useImperativeHandle(ref, () => wrapRef.current);
|
|
10299
10337
|
useEffect(() => {
|
|
10300
10338
|
if (typeof window === "undefined") return;
|
|
10301
10339
|
const reduceMotion = window.matchMedia("(prefers-reduced-motion: reduce)").matches;
|
|
@@ -10432,7 +10470,7 @@ var HeroShaderA = React136__default.forwardRef(
|
|
|
10432
10470
|
}
|
|
10433
10471
|
);
|
|
10434
10472
|
HeroShaderA.displayName = "HeroShaderA";
|
|
10435
|
-
var ScrollHeader =
|
|
10473
|
+
var ScrollHeader = React137__default.forwardRef(
|
|
10436
10474
|
({
|
|
10437
10475
|
title,
|
|
10438
10476
|
subtitle,
|
|
@@ -10519,7 +10557,7 @@ var DEFAULT_TRANSITION = {
|
|
|
10519
10557
|
ease: [0.16, 1, 0.3, 1]
|
|
10520
10558
|
// ease-out-expo (BezierDefinition)
|
|
10521
10559
|
};
|
|
10522
|
-
var FadeIn =
|
|
10560
|
+
var FadeIn = React137__default.forwardRef(
|
|
10523
10561
|
({ delay = 0, duration, children, ...props }, ref) => {
|
|
10524
10562
|
const transition = {
|
|
10525
10563
|
...DEFAULT_TRANSITION,
|
|
@@ -10547,7 +10585,7 @@ var DIRECTION_PRESET_MAP = {
|
|
|
10547
10585
|
left: "slideLeft",
|
|
10548
10586
|
right: "slideRight"
|
|
10549
10587
|
};
|
|
10550
|
-
var SlideIn =
|
|
10588
|
+
var SlideIn = React137__default.forwardRef(
|
|
10551
10589
|
({ direction = "up", delay = 0, duration, children, ...props }, ref) => {
|
|
10552
10590
|
const preset = MOTION_PRESETS[DIRECTION_PRESET_MAP[direction]];
|
|
10553
10591
|
const transition = {
|
|
@@ -10570,7 +10608,7 @@ var SlideIn = React136__default.forwardRef(
|
|
|
10570
10608
|
}
|
|
10571
10609
|
);
|
|
10572
10610
|
SlideIn.displayName = "SlideIn";
|
|
10573
|
-
var ScaleIn =
|
|
10611
|
+
var ScaleIn = React137__default.forwardRef(
|
|
10574
10612
|
({ delay = 0, duration, children, ...props }, ref) => {
|
|
10575
10613
|
const transition = {
|
|
10576
10614
|
...DEFAULT_TRANSITION,
|
|
@@ -10634,16 +10672,16 @@ function Stagger({ staggerDelay = 0.05, preset = "fadeIn", children, className,
|
|
|
10634
10672
|
initial: "hidden",
|
|
10635
10673
|
animate: isInView ? "visible" : "hidden",
|
|
10636
10674
|
className,
|
|
10637
|
-
children:
|
|
10675
|
+
children: React137__default.Children.map(children, (child, i) => /* @__PURE__ */ jsx(motion.div, { variants: itemVariants, children: child }, i))
|
|
10638
10676
|
}
|
|
10639
10677
|
);
|
|
10640
10678
|
}
|
|
10641
|
-
var Morph =
|
|
10679
|
+
var Morph = React137__default.forwardRef(
|
|
10642
10680
|
({ layoutId, children, ...props }, ref) => /* @__PURE__ */ jsx(motion.div, { ref, layoutId, layout: true, ...props, children })
|
|
10643
10681
|
);
|
|
10644
10682
|
Morph.displayName = "Morph";
|
|
10645
10683
|
var rippleCounter = 0;
|
|
10646
|
-
var Ripple =
|
|
10684
|
+
var Ripple = React137__default.forwardRef(
|
|
10647
10685
|
({ color = "currentColor", duration = 0.6, children, style, ...props }, ref) => {
|
|
10648
10686
|
const [ripples, setRipples] = useState([]);
|
|
10649
10687
|
const handlePointerDown = useCallback(
|
|
@@ -10699,7 +10737,7 @@ var Ripple = React136__default.forwardRef(
|
|
|
10699
10737
|
}
|
|
10700
10738
|
);
|
|
10701
10739
|
Ripple.displayName = "Ripple";
|
|
10702
|
-
var Parallax =
|
|
10740
|
+
var Parallax = React137__default.forwardRef(
|
|
10703
10741
|
({ offset = 50, scrollRef, children, style, ...props }, ref) => {
|
|
10704
10742
|
const innerRef = useRef(null);
|
|
10705
10743
|
const resolvedRef = ref ?? innerRef;
|
|
@@ -10728,7 +10766,328 @@ function useLayoutId(key) {
|
|
|
10728
10766
|
function Transition({ show = true, children, mode = "wait" }) {
|
|
10729
10767
|
return /* @__PURE__ */ jsx(AnimatePresence, { mode, children: show ? children : null });
|
|
10730
10768
|
}
|
|
10731
|
-
|
|
10769
|
+
function Checkbox2({
|
|
10770
|
+
checked,
|
|
10771
|
+
onCheckedChange,
|
|
10772
|
+
className
|
|
10773
|
+
}) {
|
|
10774
|
+
return /* @__PURE__ */ jsx(
|
|
10775
|
+
"input",
|
|
10776
|
+
{
|
|
10777
|
+
type: "checkbox",
|
|
10778
|
+
checked: checked === true,
|
|
10779
|
+
ref: (el) => {
|
|
10780
|
+
if (el) el.indeterminate = checked === "indeterminate";
|
|
10781
|
+
},
|
|
10782
|
+
onChange: (e) => onCheckedChange(e.target.checked),
|
|
10783
|
+
className: cn(
|
|
10784
|
+
"h-4 w-4 rounded border border-input accent-primary cursor-pointer",
|
|
10785
|
+
"focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1",
|
|
10786
|
+
className
|
|
10787
|
+
)
|
|
10788
|
+
}
|
|
10789
|
+
);
|
|
10790
|
+
}
|
|
10791
|
+
function SortIcon({ dir }) {
|
|
10792
|
+
if (dir === "asc") return /* @__PURE__ */ jsx(ArrowUp, { className: "h-3.5 w-3.5 shrink-0" });
|
|
10793
|
+
if (dir === "desc") return /* @__PURE__ */ jsx(ArrowDown, { className: "h-3.5 w-3.5 shrink-0" });
|
|
10794
|
+
return /* @__PURE__ */ jsx(ArrowUpDown, { className: "h-3.5 w-3.5 shrink-0 opacity-30" });
|
|
10795
|
+
}
|
|
10796
|
+
function ColumnVisibilityDropdown({
|
|
10797
|
+
columns,
|
|
10798
|
+
visibility,
|
|
10799
|
+
onVisibilityChange
|
|
10800
|
+
}) {
|
|
10801
|
+
const [open, setOpen] = useState(false);
|
|
10802
|
+
return /* @__PURE__ */ jsxs("div", { className: "relative", children: [
|
|
10803
|
+
/* @__PURE__ */ jsxs(
|
|
10804
|
+
"button",
|
|
10805
|
+
{
|
|
10806
|
+
onClick: () => setOpen((v) => !v),
|
|
10807
|
+
className: cn(
|
|
10808
|
+
"inline-flex items-center gap-1.5 rounded-md border border-border px-2.5 py-1.5 text-xs font-medium",
|
|
10809
|
+
"bg-transparent text-muted-foreground hover:bg-accent hover:text-accent-foreground",
|
|
10810
|
+
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
|
|
10811
|
+
"transition-colors"
|
|
10812
|
+
),
|
|
10813
|
+
children: [
|
|
10814
|
+
/* @__PURE__ */ jsx(Columns3, { className: "h-3.5 w-3.5" }),
|
|
10815
|
+
"Columns",
|
|
10816
|
+
/* @__PURE__ */ jsx(ChevronDown, { className: "h-3 w-3" })
|
|
10817
|
+
]
|
|
10818
|
+
}
|
|
10819
|
+
),
|
|
10820
|
+
open && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
10821
|
+
/* @__PURE__ */ jsx("div", { className: "fixed inset-0 z-10", onClick: () => setOpen(false) }),
|
|
10822
|
+
/* @__PURE__ */ jsx("div", { className: "absolute right-0 top-full mt-1 z-20 min-w-[140px] rounded-md border border-border bg-popover shadow-lg py-1", children: columns.map((col) => /* @__PURE__ */ jsxs(
|
|
10823
|
+
"label",
|
|
10824
|
+
{
|
|
10825
|
+
className: "flex items-center gap-2 px-3 py-1.5 text-xs text-foreground hover:bg-accent cursor-pointer",
|
|
10826
|
+
children: [
|
|
10827
|
+
/* @__PURE__ */ jsx(
|
|
10828
|
+
"input",
|
|
10829
|
+
{
|
|
10830
|
+
type: "checkbox",
|
|
10831
|
+
className: "h-3.5 w-3.5 accent-primary",
|
|
10832
|
+
checked: visibility[col.id] !== false,
|
|
10833
|
+
onChange: (e) => onVisibilityChange(col.id, e.target.checked)
|
|
10834
|
+
}
|
|
10835
|
+
),
|
|
10836
|
+
col.label
|
|
10837
|
+
]
|
|
10838
|
+
},
|
|
10839
|
+
col.id
|
|
10840
|
+
)) })
|
|
10841
|
+
] })
|
|
10842
|
+
] });
|
|
10843
|
+
}
|
|
10844
|
+
function SkeletonRow({ cols }) {
|
|
10845
|
+
return /* @__PURE__ */ jsx("tr", { className: "border-t border-border", children: Array.from({ length: cols }, (_, i) => /* @__PURE__ */ jsx("td", { className: "px-3 py-2.5", children: /* @__PURE__ */ jsx(
|
|
10846
|
+
"div",
|
|
10847
|
+
{
|
|
10848
|
+
className: "h-4 rounded bg-gradient-to-r from-muted via-muted/50 to-muted bg-[length:400%_100%] animate-[shimmer_2s_ease-in-out_infinite]",
|
|
10849
|
+
style: { width: `${60 + Math.random() * 30}%` }
|
|
10850
|
+
}
|
|
10851
|
+
) }, i)) });
|
|
10852
|
+
}
|
|
10853
|
+
function DataGrid2({
|
|
10854
|
+
columns,
|
|
10855
|
+
data,
|
|
10856
|
+
selectable = false,
|
|
10857
|
+
onSelectionChange,
|
|
10858
|
+
sortable = true,
|
|
10859
|
+
columnVisibility: showColumnVisibility = false,
|
|
10860
|
+
resizable = true,
|
|
10861
|
+
filterable = false,
|
|
10862
|
+
virtual = false,
|
|
10863
|
+
virtualHeight = 480,
|
|
10864
|
+
rowHeight = 40,
|
|
10865
|
+
emptyState,
|
|
10866
|
+
loading = false,
|
|
10867
|
+
skeletonRows = 5,
|
|
10868
|
+
className,
|
|
10869
|
+
onRowClick
|
|
10870
|
+
}) {
|
|
10871
|
+
const [rowSelection, setRowSelection] = useState({});
|
|
10872
|
+
const [sorting, setSorting] = useState([]);
|
|
10873
|
+
const [columnFilters, setColumnFilters] = useState([]);
|
|
10874
|
+
const [colVisibility, setColVisibility] = useState({});
|
|
10875
|
+
const scrollContainerRef = React137__default.useRef(null);
|
|
10876
|
+
const selectionColumn = useMemo(
|
|
10877
|
+
() => ({
|
|
10878
|
+
id: "_select",
|
|
10879
|
+
size: 40,
|
|
10880
|
+
enableResizing: false,
|
|
10881
|
+
enableSorting: false,
|
|
10882
|
+
header: ({ table: table2 }) => /* @__PURE__ */ jsx(
|
|
10883
|
+
Checkbox2,
|
|
10884
|
+
{
|
|
10885
|
+
checked: table2.getIsAllPageRowsSelected() ? true : table2.getIsSomePageRowsSelected() ? "indeterminate" : false,
|
|
10886
|
+
onCheckedChange: (v) => table2.toggleAllPageRowsSelected(v)
|
|
10887
|
+
}
|
|
10888
|
+
),
|
|
10889
|
+
cell: ({ row }) => /* @__PURE__ */ jsx(
|
|
10890
|
+
Checkbox2,
|
|
10891
|
+
{
|
|
10892
|
+
checked: row.getIsSelected(),
|
|
10893
|
+
onCheckedChange: (v) => row.toggleSelected(v)
|
|
10894
|
+
}
|
|
10895
|
+
)
|
|
10896
|
+
}),
|
|
10897
|
+
[]
|
|
10898
|
+
);
|
|
10899
|
+
const allColumns = useMemo(
|
|
10900
|
+
() => selectable ? [selectionColumn, ...columns] : columns,
|
|
10901
|
+
[selectable, selectionColumn, columns]
|
|
10902
|
+
);
|
|
10903
|
+
const table = useReactTable({
|
|
10904
|
+
data,
|
|
10905
|
+
columns: allColumns,
|
|
10906
|
+
columnResizeMode: "onChange",
|
|
10907
|
+
state: {
|
|
10908
|
+
rowSelection,
|
|
10909
|
+
sorting,
|
|
10910
|
+
columnFilters,
|
|
10911
|
+
columnVisibility: colVisibility
|
|
10912
|
+
},
|
|
10913
|
+
onRowSelectionChange: (updater) => {
|
|
10914
|
+
const next = typeof updater === "function" ? updater(rowSelection) : updater;
|
|
10915
|
+
setRowSelection(next);
|
|
10916
|
+
if (onSelectionChange) {
|
|
10917
|
+
const selectedRows = Object.keys(next).filter((k) => next[k]).map((k) => data[Number(k)]).filter(Boolean);
|
|
10918
|
+
onSelectionChange(selectedRows);
|
|
10919
|
+
}
|
|
10920
|
+
},
|
|
10921
|
+
onSortingChange: setSorting,
|
|
10922
|
+
onColumnFiltersChange: setColumnFilters,
|
|
10923
|
+
onColumnVisibilityChange: setColVisibility,
|
|
10924
|
+
getCoreRowModel: getCoreRowModel(),
|
|
10925
|
+
getSortedRowModel: sortable ? getSortedRowModel() : void 0,
|
|
10926
|
+
getFilteredRowModel: filterable ? getFilteredRowModel() : void 0,
|
|
10927
|
+
enableColumnResizing: resizable,
|
|
10928
|
+
enableRowSelection: selectable
|
|
10929
|
+
});
|
|
10930
|
+
const { rows } = table.getRowModel();
|
|
10931
|
+
const virtualizer = useVirtualizer({
|
|
10932
|
+
count: virtual ? rows.length : 0,
|
|
10933
|
+
getScrollElement: () => scrollContainerRef.current,
|
|
10934
|
+
estimateSize: () => rowHeight,
|
|
10935
|
+
overscan: 10
|
|
10936
|
+
});
|
|
10937
|
+
const visibleColumnDefs = table.getAllLeafColumns().filter((c) => c.id !== "_select" && c.getIsVisible());
|
|
10938
|
+
const columnVisibilityItems = visibleColumnDefs.map((c) => ({
|
|
10939
|
+
id: c.id,
|
|
10940
|
+
label: typeof c.columnDef.header === "string" ? c.columnDef.header : c.id
|
|
10941
|
+
}));
|
|
10942
|
+
const renderRows = () => {
|
|
10943
|
+
if (loading) {
|
|
10944
|
+
return Array.from({ length: skeletonRows }, (_, i) => /* @__PURE__ */ jsx(SkeletonRow, { cols: allColumns.length }, i));
|
|
10945
|
+
}
|
|
10946
|
+
if (rows.length === 0) {
|
|
10947
|
+
return /* @__PURE__ */ jsx("tr", { children: /* @__PURE__ */ jsx(
|
|
10948
|
+
"td",
|
|
10949
|
+
{
|
|
10950
|
+
colSpan: allColumns.length,
|
|
10951
|
+
className: "py-16 text-center text-sm text-muted-foreground",
|
|
10952
|
+
children: emptyState ?? "No results."
|
|
10953
|
+
}
|
|
10954
|
+
) });
|
|
10955
|
+
}
|
|
10956
|
+
if (virtual) {
|
|
10957
|
+
const virtualItems = virtualizer.getVirtualItems();
|
|
10958
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
10959
|
+
virtualItems.length > 0 && /* @__PURE__ */ jsx("tr", { style: { height: virtualItems[0].start }, children: /* @__PURE__ */ jsx("td", { colSpan: allColumns.length }) }),
|
|
10960
|
+
virtualItems.map((vRow) => {
|
|
10961
|
+
const row = rows[vRow.index];
|
|
10962
|
+
return /* @__PURE__ */ jsx(
|
|
10963
|
+
"tr",
|
|
10964
|
+
{
|
|
10965
|
+
"data-index": vRow.index,
|
|
10966
|
+
className: cn(
|
|
10967
|
+
"border-t border-border transition-colors",
|
|
10968
|
+
onRowClick && "cursor-pointer",
|
|
10969
|
+
row.getIsSelected() ? "bg-primary/5" : "hover:bg-accent/40"
|
|
10970
|
+
),
|
|
10971
|
+
onClick: () => onRowClick?.(row.original),
|
|
10972
|
+
children: row.getVisibleCells().map((cell) => /* @__PURE__ */ jsx(
|
|
10973
|
+
"td",
|
|
10974
|
+
{
|
|
10975
|
+
style: { width: cell.column.getSize() },
|
|
10976
|
+
className: "px-3 py-2 text-sm border-r border-border last:border-r-0 truncate max-w-0",
|
|
10977
|
+
children: flexRender(cell.column.columnDef.cell, cell.getContext())
|
|
10978
|
+
},
|
|
10979
|
+
cell.id
|
|
10980
|
+
))
|
|
10981
|
+
},
|
|
10982
|
+
row.id
|
|
10983
|
+
);
|
|
10984
|
+
}),
|
|
10985
|
+
virtualItems.length > 0 && /* @__PURE__ */ jsx(
|
|
10986
|
+
"tr",
|
|
10987
|
+
{
|
|
10988
|
+
style: {
|
|
10989
|
+
height: virtualizer.getTotalSize() - (virtualItems[virtualItems.length - 1]?.end ?? 0)
|
|
10990
|
+
},
|
|
10991
|
+
children: /* @__PURE__ */ jsx("td", { colSpan: allColumns.length })
|
|
10992
|
+
}
|
|
10993
|
+
)
|
|
10994
|
+
] });
|
|
10995
|
+
}
|
|
10996
|
+
return rows.map((row) => /* @__PURE__ */ jsx(
|
|
10997
|
+
"tr",
|
|
10998
|
+
{
|
|
10999
|
+
className: cn(
|
|
11000
|
+
"border-t border-border transition-colors",
|
|
11001
|
+
onRowClick && "cursor-pointer",
|
|
11002
|
+
row.getIsSelected() ? "bg-primary/5" : "hover:bg-accent/40"
|
|
11003
|
+
),
|
|
11004
|
+
onClick: () => onRowClick?.(row.original),
|
|
11005
|
+
children: row.getVisibleCells().map((cell) => /* @__PURE__ */ jsx(
|
|
11006
|
+
"td",
|
|
11007
|
+
{
|
|
11008
|
+
style: { width: cell.column.getSize() },
|
|
11009
|
+
className: "px-3 py-2 text-sm border-r border-border last:border-r-0 truncate max-w-0",
|
|
11010
|
+
children: flexRender(cell.column.columnDef.cell, cell.getContext())
|
|
11011
|
+
},
|
|
11012
|
+
cell.id
|
|
11013
|
+
))
|
|
11014
|
+
},
|
|
11015
|
+
row.id
|
|
11016
|
+
));
|
|
11017
|
+
};
|
|
11018
|
+
return /* @__PURE__ */ jsxs("div", { "data-slot": "data-grid", className: cn("flex flex-col gap-2", className), children: [
|
|
11019
|
+
showColumnVisibility && /* @__PURE__ */ jsx("div", { className: "flex items-center justify-end gap-2", children: /* @__PURE__ */ jsx(
|
|
11020
|
+
ColumnVisibilityDropdown,
|
|
11021
|
+
{
|
|
11022
|
+
columns: columnVisibilityItems,
|
|
11023
|
+
visibility: colVisibility,
|
|
11024
|
+
onVisibilityChange: (id, visible) => setColVisibility((prev) => ({ ...prev, [id]: visible }))
|
|
11025
|
+
}
|
|
11026
|
+
) }),
|
|
11027
|
+
/* @__PURE__ */ jsx(
|
|
11028
|
+
"div",
|
|
11029
|
+
{
|
|
11030
|
+
ref: virtual ? scrollContainerRef : void 0,
|
|
11031
|
+
className: "overflow-auto rounded-md border border-border",
|
|
11032
|
+
style: virtual ? { height: virtualHeight } : void 0,
|
|
11033
|
+
children: /* @__PURE__ */ jsxs(
|
|
11034
|
+
"table",
|
|
11035
|
+
{
|
|
11036
|
+
className: "w-full text-sm",
|
|
11037
|
+
style: { width: table.getCenterTotalSize() },
|
|
11038
|
+
children: [
|
|
11039
|
+
/* @__PURE__ */ jsx("thead", { className: "sticky top-0 z-10 bg-muted/60 backdrop-blur-sm", children: table.getHeaderGroups().map((hg) => /* @__PURE__ */ jsx("tr", { children: hg.headers.map((h) => /* @__PURE__ */ jsxs(
|
|
11040
|
+
"th",
|
|
11041
|
+
{
|
|
11042
|
+
style: { width: h.getSize() },
|
|
11043
|
+
className: "relative px-3 py-2.5 text-left text-xs font-semibold text-muted-foreground uppercase tracking-wider border-r border-border last:border-r-0 whitespace-nowrap",
|
|
11044
|
+
children: [
|
|
11045
|
+
/* @__PURE__ */ jsxs(
|
|
11046
|
+
"div",
|
|
11047
|
+
{
|
|
11048
|
+
className: cn(
|
|
11049
|
+
"flex items-center gap-1.5 select-none",
|
|
11050
|
+
h.column.getCanSort() && "cursor-pointer hover:text-foreground transition-colors"
|
|
11051
|
+
),
|
|
11052
|
+
onClick: h.column.getCanSort() ? h.column.getToggleSortingHandler() : void 0,
|
|
11053
|
+
children: [
|
|
11054
|
+
h.isPlaceholder ? null : flexRender(h.column.columnDef.header, h.getContext()),
|
|
11055
|
+
h.column.getCanSort() && /* @__PURE__ */ jsx(SortIcon, { dir: h.column.getIsSorted() })
|
|
11056
|
+
]
|
|
11057
|
+
}
|
|
11058
|
+
),
|
|
11059
|
+
h.column.getCanResize() && /* @__PURE__ */ jsx(
|
|
11060
|
+
"div",
|
|
11061
|
+
{
|
|
11062
|
+
onMouseDown: h.getResizeHandler(),
|
|
11063
|
+
onTouchStart: h.getResizeHandler(),
|
|
11064
|
+
className: cn(
|
|
11065
|
+
"absolute right-0 top-0 h-full w-1 cursor-col-resize touch-none select-none",
|
|
11066
|
+
"hover:bg-primary/40",
|
|
11067
|
+
h.column.getIsResizing() && "bg-primary/60"
|
|
11068
|
+
)
|
|
11069
|
+
}
|
|
11070
|
+
)
|
|
11071
|
+
]
|
|
11072
|
+
},
|
|
11073
|
+
h.id
|
|
11074
|
+
)) }, hg.id)) }),
|
|
11075
|
+
/* @__PURE__ */ jsx("tbody", { children: renderRows() })
|
|
11076
|
+
]
|
|
11077
|
+
}
|
|
11078
|
+
)
|
|
11079
|
+
}
|
|
11080
|
+
),
|
|
11081
|
+
selectable && Object.keys(rowSelection).length > 0 && /* @__PURE__ */ jsxs("p", { className: "text-xs text-muted-foreground", children: [
|
|
11082
|
+
Object.keys(rowSelection).filter((k) => rowSelection[k]).length,
|
|
11083
|
+
" of",
|
|
11084
|
+
" ",
|
|
11085
|
+
data.length,
|
|
11086
|
+
" row(s) selected"
|
|
11087
|
+
] })
|
|
11088
|
+
] });
|
|
11089
|
+
}
|
|
11090
|
+
var DataList = React137__default.forwardRef(
|
|
10732
11091
|
({ divided = true, bordered = true, className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
10733
11092
|
"ul",
|
|
10734
11093
|
{
|
|
@@ -10745,7 +11104,7 @@ var DataList = React136__default.forwardRef(
|
|
|
10745
11104
|
)
|
|
10746
11105
|
);
|
|
10747
11106
|
DataList.displayName = "DataList";
|
|
10748
|
-
var DataListItem =
|
|
11107
|
+
var DataListItem = React137__default.forwardRef(
|
|
10749
11108
|
({ left, title, description, right, interactive, onSelect, className, children, ...props }, ref) => {
|
|
10750
11109
|
const clickable = interactive || !!onSelect;
|
|
10751
11110
|
return /* @__PURE__ */ jsxs(
|
|
@@ -10805,7 +11164,7 @@ function getWeekDays(date, weekStartsOn) {
|
|
|
10805
11164
|
const start = startOfWeek$1(date, { weekStartsOn });
|
|
10806
11165
|
return Array.from({ length: 7 }, (_, i) => addDays(start, i));
|
|
10807
11166
|
}
|
|
10808
|
-
var EventCalendar =
|
|
11167
|
+
var EventCalendar = React137__default.forwardRef(
|
|
10809
11168
|
({
|
|
10810
11169
|
events,
|
|
10811
11170
|
view: viewProp,
|
|
@@ -10820,20 +11179,20 @@ var EventCalendar = React136__default.forwardRef(
|
|
|
10820
11179
|
className,
|
|
10821
11180
|
...props
|
|
10822
11181
|
}, ref) => {
|
|
10823
|
-
const [internalView, setInternalView] =
|
|
11182
|
+
const [internalView, setInternalView] = React137__default.useState("month");
|
|
10824
11183
|
const view = viewProp ?? internalView;
|
|
10825
|
-
const commitView =
|
|
11184
|
+
const commitView = React137__default.useCallback(
|
|
10826
11185
|
(next) => {
|
|
10827
11186
|
if (viewProp === void 0) setInternalView(next);
|
|
10828
11187
|
onViewChange?.(next);
|
|
10829
11188
|
},
|
|
10830
11189
|
[viewProp, onViewChange]
|
|
10831
11190
|
);
|
|
10832
|
-
const [internalDate, setInternalDate] =
|
|
11191
|
+
const [internalDate, setInternalDate] = React137__default.useState(
|
|
10833
11192
|
() => defaultDate ?? /* @__PURE__ */ new Date()
|
|
10834
11193
|
);
|
|
10835
11194
|
const date = dateProp ?? internalDate;
|
|
10836
|
-
const commitDate =
|
|
11195
|
+
const commitDate = React137__default.useCallback(
|
|
10837
11196
|
(next) => {
|
|
10838
11197
|
if (dateProp === void 0) setInternalDate(next);
|
|
10839
11198
|
onDateChange?.(next);
|
|
@@ -10859,7 +11218,7 @@ var EventCalendar = React136__default.forwardRef(
|
|
|
10859
11218
|
handleToday();
|
|
10860
11219
|
}
|
|
10861
11220
|
};
|
|
10862
|
-
const headerLabel =
|
|
11221
|
+
const headerLabel = React137__default.useMemo(() => {
|
|
10863
11222
|
if (view === "month") return format(date, "MMMM yyyy");
|
|
10864
11223
|
if (view === "week") {
|
|
10865
11224
|
const start = startOfWeek$1(date, { weekStartsOn });
|
|
@@ -11008,11 +11367,11 @@ function MonthView({
|
|
|
11008
11367
|
onEventCreate,
|
|
11009
11368
|
onDayPick
|
|
11010
11369
|
}) {
|
|
11011
|
-
const cells =
|
|
11370
|
+
const cells = React137__default.useMemo(
|
|
11012
11371
|
() => getMonthMatrix(date, weekStartsOn),
|
|
11013
11372
|
[date, weekStartsOn]
|
|
11014
11373
|
);
|
|
11015
|
-
const weekdayLabels =
|
|
11374
|
+
const weekdayLabels = React137__default.useMemo(() => {
|
|
11016
11375
|
const start = startOfWeek$1(/* @__PURE__ */ new Date(), { weekStartsOn });
|
|
11017
11376
|
return Array.from({ length: 7 }, (_, i) => format(addDays(start, i), "EEE"));
|
|
11018
11377
|
}, [weekStartsOn]);
|
|
@@ -11159,7 +11518,7 @@ function HourGrid({
|
|
|
11159
11518
|
onEventCreate,
|
|
11160
11519
|
onEventResize
|
|
11161
11520
|
}) {
|
|
11162
|
-
const hours =
|
|
11521
|
+
const hours = React137__default.useMemo(() => Array.from({ length: 24 }, (_, i) => i), []);
|
|
11163
11522
|
const today = /* @__PURE__ */ new Date();
|
|
11164
11523
|
return /* @__PURE__ */ jsxs(
|
|
11165
11524
|
"div",
|
|
@@ -11213,7 +11572,7 @@ function DayColumn({
|
|
|
11213
11572
|
onEventResize,
|
|
11214
11573
|
showHeader
|
|
11215
11574
|
}) {
|
|
11216
|
-
const bodyRef =
|
|
11575
|
+
const bodyRef = React137__default.useRef(null);
|
|
11217
11576
|
const handleEmptyClick = (e) => {
|
|
11218
11577
|
if (e.target.closest("[data-event-block]")) return;
|
|
11219
11578
|
if (!onEventCreate) return;
|
|
@@ -11294,10 +11653,10 @@ function EventBlock({ event, day, onClick, onResize }) {
|
|
|
11294
11653
|
differenceInMinutes(visibleEnd, visibleStart)
|
|
11295
11654
|
);
|
|
11296
11655
|
const top = startMinutes / 60 * HOUR_ROW_PX;
|
|
11297
|
-
const [resizingDelta, setResizingDelta] =
|
|
11656
|
+
const [resizingDelta, setResizingDelta] = React137__default.useState(0);
|
|
11298
11657
|
const height = durationMinutes / 60 * HOUR_ROW_PX + resizingDelta;
|
|
11299
|
-
const isResizing =
|
|
11300
|
-
const startY =
|
|
11658
|
+
const isResizing = React137__default.useRef(false);
|
|
11659
|
+
const startY = React137__default.useRef(0);
|
|
11301
11660
|
const handleResizePointerDown = (e) => {
|
|
11302
11661
|
if (!onResize) return;
|
|
11303
11662
|
e.preventDefault();
|
|
@@ -11386,7 +11745,7 @@ function WeekView({
|
|
|
11386
11745
|
onEventCreate,
|
|
11387
11746
|
onEventResize
|
|
11388
11747
|
}) {
|
|
11389
|
-
const days =
|
|
11748
|
+
const days = React137__default.useMemo(
|
|
11390
11749
|
() => getWeekDays(date, weekStartsOn),
|
|
11391
11750
|
[date, weekStartsOn]
|
|
11392
11751
|
);
|
|
@@ -11419,7 +11778,7 @@ function DayView({
|
|
|
11419
11778
|
}
|
|
11420
11779
|
) });
|
|
11421
11780
|
}
|
|
11422
|
-
var GridList =
|
|
11781
|
+
var GridList = React137__default.forwardRef(
|
|
11423
11782
|
({ minItemWidth = 240, gap = 1, className, style, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
11424
11783
|
"ul",
|
|
11425
11784
|
{
|
|
@@ -11436,7 +11795,7 @@ var GridList = React136__default.forwardRef(
|
|
|
11436
11795
|
)
|
|
11437
11796
|
);
|
|
11438
11797
|
GridList.displayName = "GridList";
|
|
11439
|
-
var GridListItem =
|
|
11798
|
+
var GridListItem = React137__default.forwardRef(
|
|
11440
11799
|
({ interactive, onSelect, className, ...props }, ref) => {
|
|
11441
11800
|
const clickable = interactive || !!onSelect;
|
|
11442
11801
|
return /* @__PURE__ */ jsx(
|
|
@@ -11507,7 +11866,7 @@ async function extractCroppedDataUrl(image, crop, format3, quality) {
|
|
|
11507
11866
|
const mime = format3 === "jpeg" ? "image/jpeg" : format3 === "webp" ? "image/webp" : "image/png";
|
|
11508
11867
|
return canvas.toDataURL(mime, quality);
|
|
11509
11868
|
}
|
|
11510
|
-
var ImageCrop =
|
|
11869
|
+
var ImageCrop = React137__default.forwardRef(
|
|
11511
11870
|
({
|
|
11512
11871
|
src,
|
|
11513
11872
|
aspect,
|
|
@@ -11522,13 +11881,13 @@ var ImageCrop = React136__default.forwardRef(
|
|
|
11522
11881
|
className,
|
|
11523
11882
|
...props
|
|
11524
11883
|
}, ref) => {
|
|
11525
|
-
const [crop, setCrop] =
|
|
11526
|
-
const imgRef =
|
|
11527
|
-
const timerRef =
|
|
11528
|
-
|
|
11884
|
+
const [crop, setCrop] = React137__default.useState(void 0);
|
|
11885
|
+
const imgRef = React137__default.useRef(null);
|
|
11886
|
+
const timerRef = React137__default.useRef(null);
|
|
11887
|
+
React137__default.useEffect(() => {
|
|
11529
11888
|
setCrop(void 0);
|
|
11530
11889
|
}, [src]);
|
|
11531
|
-
|
|
11890
|
+
React137__default.useEffect(() => {
|
|
11532
11891
|
return () => {
|
|
11533
11892
|
if (timerRef.current) clearTimeout(timerRef.current);
|
|
11534
11893
|
};
|
|
@@ -11753,7 +12112,7 @@ function TreeRow({
|
|
|
11753
12112
|
}
|
|
11754
12113
|
);
|
|
11755
12114
|
}
|
|
11756
|
-
var Tree =
|
|
12115
|
+
var Tree = React137__default.forwardRef(
|
|
11757
12116
|
({
|
|
11758
12117
|
data,
|
|
11759
12118
|
defaultExpandedIds,
|
|
@@ -11769,21 +12128,21 @@ var Tree = React136__default.forwardRef(
|
|
|
11769
12128
|
...props
|
|
11770
12129
|
}, ref) => {
|
|
11771
12130
|
const isControlled = expandedIds !== void 0;
|
|
11772
|
-
const [internalExpanded, setInternalExpanded] =
|
|
12131
|
+
const [internalExpanded, setInternalExpanded] = React137__default.useState(
|
|
11773
12132
|
() => new Set(defaultExpandedIds ?? [])
|
|
11774
12133
|
);
|
|
11775
|
-
const expandedSet =
|
|
12134
|
+
const expandedSet = React137__default.useMemo(
|
|
11776
12135
|
() => isControlled ? new Set(expandedIds) : internalExpanded,
|
|
11777
12136
|
[isControlled, expandedIds, internalExpanded]
|
|
11778
12137
|
);
|
|
11779
|
-
const commitExpanded =
|
|
12138
|
+
const commitExpanded = React137__default.useCallback(
|
|
11780
12139
|
(next) => {
|
|
11781
12140
|
if (!isControlled) setInternalExpanded(next);
|
|
11782
12141
|
onExpandedChange?.(Array.from(next));
|
|
11783
12142
|
},
|
|
11784
12143
|
[isControlled, onExpandedChange]
|
|
11785
12144
|
);
|
|
11786
|
-
const toggle =
|
|
12145
|
+
const toggle = React137__default.useCallback(
|
|
11787
12146
|
(id) => {
|
|
11788
12147
|
const next = new Set(expandedSet);
|
|
11789
12148
|
if (next.has(id)) next.delete(id);
|
|
@@ -11792,7 +12151,7 @@ var Tree = React136__default.forwardRef(
|
|
|
11792
12151
|
},
|
|
11793
12152
|
[expandedSet, commitExpanded]
|
|
11794
12153
|
);
|
|
11795
|
-
const expand =
|
|
12154
|
+
const expand = React137__default.useCallback(
|
|
11796
12155
|
(id) => {
|
|
11797
12156
|
if (expandedSet.has(id)) return;
|
|
11798
12157
|
const next = new Set(expandedSet);
|
|
@@ -11801,7 +12160,7 @@ var Tree = React136__default.forwardRef(
|
|
|
11801
12160
|
},
|
|
11802
12161
|
[expandedSet, commitExpanded]
|
|
11803
12162
|
);
|
|
11804
|
-
const collapse =
|
|
12163
|
+
const collapse = React137__default.useCallback(
|
|
11805
12164
|
(id) => {
|
|
11806
12165
|
if (!expandedSet.has(id)) return;
|
|
11807
12166
|
const next = new Set(expandedSet);
|
|
@@ -11810,27 +12169,27 @@ var Tree = React136__default.forwardRef(
|
|
|
11810
12169
|
},
|
|
11811
12170
|
[expandedSet, commitExpanded]
|
|
11812
12171
|
);
|
|
11813
|
-
const rows =
|
|
12172
|
+
const rows = React137__default.useMemo(
|
|
11814
12173
|
() => flatten(data, expandedSet),
|
|
11815
12174
|
[data, expandedSet]
|
|
11816
12175
|
);
|
|
11817
|
-
const [focusedId, setFocusedId] =
|
|
12176
|
+
const [focusedId, setFocusedId] = React137__default.useState(
|
|
11818
12177
|
() => selectedId ?? data[0]?.id ?? null
|
|
11819
12178
|
);
|
|
11820
|
-
const rowRefs =
|
|
11821
|
-
const registerRef =
|
|
12179
|
+
const rowRefs = React137__default.useRef(/* @__PURE__ */ new Map());
|
|
12180
|
+
const registerRef = React137__default.useCallback(
|
|
11822
12181
|
(id, el) => {
|
|
11823
12182
|
if (el) rowRefs.current.set(id, el);
|
|
11824
12183
|
else rowRefs.current.delete(id);
|
|
11825
12184
|
},
|
|
11826
12185
|
[]
|
|
11827
12186
|
);
|
|
11828
|
-
const moveFocus =
|
|
12187
|
+
const moveFocus = React137__default.useCallback((id) => {
|
|
11829
12188
|
setFocusedId(id);
|
|
11830
12189
|
const el = rowRefs.current.get(id);
|
|
11831
12190
|
el?.focus();
|
|
11832
12191
|
}, []);
|
|
11833
|
-
const onRowKeyDown =
|
|
12192
|
+
const onRowKeyDown = React137__default.useCallback(
|
|
11834
12193
|
(e, row) => {
|
|
11835
12194
|
const idx = rows.findIndex((r) => r.node.id === row.node.id);
|
|
11836
12195
|
if (idx === -1) return;
|
|
@@ -11880,11 +12239,11 @@ var Tree = React136__default.forwardRef(
|
|
|
11880
12239
|
useSensor(PointerSensor, { activationConstraint: { distance: 5 } }),
|
|
11881
12240
|
useSensor(KeyboardSensor)
|
|
11882
12241
|
);
|
|
11883
|
-
const [activeDragId, setActiveDragId] =
|
|
11884
|
-
const handleDragStart =
|
|
12242
|
+
const [activeDragId, setActiveDragId] = React137__default.useState(null);
|
|
12243
|
+
const handleDragStart = React137__default.useCallback((e) => {
|
|
11885
12244
|
setActiveDragId(String(e.active.id));
|
|
11886
12245
|
}, []);
|
|
11887
|
-
const handleDragEnd =
|
|
12246
|
+
const handleDragEnd = React137__default.useCallback(
|
|
11888
12247
|
(e) => {
|
|
11889
12248
|
setActiveDragId(null);
|
|
11890
12249
|
const { active, over } = e;
|
|
@@ -11900,8 +12259,8 @@ var Tree = React136__default.forwardRef(
|
|
|
11900
12259
|
},
|
|
11901
12260
|
[onMove]
|
|
11902
12261
|
);
|
|
11903
|
-
const handleDragCancel =
|
|
11904
|
-
const scrollerRef =
|
|
12262
|
+
const handleDragCancel = React137__default.useCallback(() => setActiveDragId(null), []);
|
|
12263
|
+
const scrollerRef = React137__default.useRef(null);
|
|
11905
12264
|
const virtualizer = useVirtualizer({
|
|
11906
12265
|
count: virtualize ? rows.length : 0,
|
|
11907
12266
|
getScrollElement: () => scrollerRef.current,
|
|
@@ -12003,7 +12362,7 @@ async function exitFs() {
|
|
|
12003
12362
|
if (d.exitFullscreen) return void d.exitFullscreen();
|
|
12004
12363
|
if (d.webkitExitFullscreen) return void d.webkitExitFullscreen();
|
|
12005
12364
|
}
|
|
12006
|
-
var VideoPlayer =
|
|
12365
|
+
var VideoPlayer = React137__default.forwardRef(
|
|
12007
12366
|
({
|
|
12008
12367
|
src,
|
|
12009
12368
|
poster,
|
|
@@ -12020,33 +12379,33 @@ var VideoPlayer = React136__default.forwardRef(
|
|
|
12020
12379
|
muted: mutedProp,
|
|
12021
12380
|
...videoProps
|
|
12022
12381
|
}, ref) => {
|
|
12023
|
-
const containerRef =
|
|
12024
|
-
const videoRef =
|
|
12025
|
-
const hideTimerRef =
|
|
12026
|
-
const [isPlaying, setIsPlaying] =
|
|
12027
|
-
const [hasPlayed, setHasPlayed] =
|
|
12028
|
-
const [currentTime, setCurrentTime] =
|
|
12029
|
-
const [duration, setDuration] =
|
|
12030
|
-
const [buffered, setBuffered] =
|
|
12031
|
-
const [volume, setVolume] =
|
|
12032
|
-
const [isMuted, setIsMuted] =
|
|
12033
|
-
const [isFullscreen, setIsFullscreen] =
|
|
12034
|
-
const [showControls, setShowControls] =
|
|
12035
|
-
|
|
12036
|
-
|
|
12382
|
+
const containerRef = React137__default.useRef(null);
|
|
12383
|
+
const videoRef = React137__default.useRef(null);
|
|
12384
|
+
const hideTimerRef = React137__default.useRef(null);
|
|
12385
|
+
const [isPlaying, setIsPlaying] = React137__default.useState(false);
|
|
12386
|
+
const [hasPlayed, setHasPlayed] = React137__default.useState(Boolean(autoPlay));
|
|
12387
|
+
const [currentTime, setCurrentTime] = React137__default.useState(0);
|
|
12388
|
+
const [duration, setDuration] = React137__default.useState(0);
|
|
12389
|
+
const [buffered, setBuffered] = React137__default.useState(0);
|
|
12390
|
+
const [volume, setVolume] = React137__default.useState(1);
|
|
12391
|
+
const [isMuted, setIsMuted] = React137__default.useState(Boolean(mutedProp ?? autoPlay));
|
|
12392
|
+
const [isFullscreen, setIsFullscreen] = React137__default.useState(false);
|
|
12393
|
+
const [showControls, setShowControls] = React137__default.useState(true);
|
|
12394
|
+
React137__default.useImperativeHandle(ref, () => containerRef.current);
|
|
12395
|
+
React137__default.useEffect(() => {
|
|
12037
12396
|
const v = videoRef.current;
|
|
12038
12397
|
if (!v) return;
|
|
12039
12398
|
v.volume = volume;
|
|
12040
12399
|
v.muted = isMuted;
|
|
12041
12400
|
}, [volume, isMuted]);
|
|
12042
|
-
const showAndScheduleHide =
|
|
12401
|
+
const showAndScheduleHide = React137__default.useCallback(() => {
|
|
12043
12402
|
setShowControls(true);
|
|
12044
12403
|
if (hideTimerRef.current) clearTimeout(hideTimerRef.current);
|
|
12045
12404
|
if (isPlaying) {
|
|
12046
12405
|
hideTimerRef.current = setTimeout(() => setShowControls(false), 3e3);
|
|
12047
12406
|
}
|
|
12048
12407
|
}, [isPlaying]);
|
|
12049
|
-
|
|
12408
|
+
React137__default.useEffect(() => {
|
|
12050
12409
|
if (!isPlaying) {
|
|
12051
12410
|
if (hideTimerRef.current) clearTimeout(hideTimerRef.current);
|
|
12052
12411
|
setShowControls(true);
|
|
@@ -12057,7 +12416,7 @@ var VideoPlayer = React136__default.forwardRef(
|
|
|
12057
12416
|
if (hideTimerRef.current) clearTimeout(hideTimerRef.current);
|
|
12058
12417
|
};
|
|
12059
12418
|
}, [isPlaying]);
|
|
12060
|
-
|
|
12419
|
+
React137__default.useEffect(() => {
|
|
12061
12420
|
const onFsChange = () => setIsFullscreen(isFullscreenActive());
|
|
12062
12421
|
document.addEventListener("fullscreenchange", onFsChange);
|
|
12063
12422
|
document.addEventListener("webkitfullscreenchange", onFsChange);
|
|
@@ -12066,7 +12425,7 @@ var VideoPlayer = React136__default.forwardRef(
|
|
|
12066
12425
|
document.removeEventListener("webkitfullscreenchange", onFsChange);
|
|
12067
12426
|
};
|
|
12068
12427
|
}, []);
|
|
12069
|
-
const togglePlay =
|
|
12428
|
+
const togglePlay = React137__default.useCallback(() => {
|
|
12070
12429
|
const v = videoRef.current;
|
|
12071
12430
|
if (!v) return;
|
|
12072
12431
|
if (v.paused) {
|
|
@@ -12075,22 +12434,22 @@ var VideoPlayer = React136__default.forwardRef(
|
|
|
12075
12434
|
v.pause();
|
|
12076
12435
|
}
|
|
12077
12436
|
}, []);
|
|
12078
|
-
const toggleMute =
|
|
12437
|
+
const toggleMute = React137__default.useCallback(() => {
|
|
12079
12438
|
setIsMuted((m) => !m);
|
|
12080
12439
|
}, []);
|
|
12081
|
-
const toggleFullscreen =
|
|
12440
|
+
const toggleFullscreen = React137__default.useCallback(() => {
|
|
12082
12441
|
const el = containerRef.current;
|
|
12083
12442
|
if (!el) return;
|
|
12084
12443
|
if (isFullscreenActive()) void exitFs();
|
|
12085
12444
|
else void requestFs(el);
|
|
12086
12445
|
}, []);
|
|
12087
|
-
const seekTo =
|
|
12446
|
+
const seekTo = React137__default.useCallback((time) => {
|
|
12088
12447
|
const v = videoRef.current;
|
|
12089
12448
|
if (!v) return;
|
|
12090
12449
|
const clamped = Math.max(0, Math.min(v.duration || 0, time));
|
|
12091
12450
|
v.currentTime = clamped;
|
|
12092
12451
|
}, []);
|
|
12093
|
-
const seekBy =
|
|
12452
|
+
const seekBy = React137__default.useCallback(
|
|
12094
12453
|
(delta) => {
|
|
12095
12454
|
seekTo((videoRef.current?.currentTime ?? 0) + delta);
|
|
12096
12455
|
},
|
|
@@ -12438,7 +12797,7 @@ function Combobox({
|
|
|
12438
12797
|
className,
|
|
12439
12798
|
contentWidth = "trigger"
|
|
12440
12799
|
}) {
|
|
12441
|
-
const [open, setOpen] =
|
|
12800
|
+
const [open, setOpen] = React137__default.useState(false);
|
|
12442
12801
|
const selected = options.find((o) => o.value === value);
|
|
12443
12802
|
return /* @__PURE__ */ jsxs(Popover, { open, onOpenChange: setOpen, children: [
|
|
12444
12803
|
/* @__PURE__ */ jsx(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxs(
|
|
@@ -12532,9 +12891,9 @@ function ColorSchemeSelect({
|
|
|
12532
12891
|
className
|
|
12533
12892
|
}) {
|
|
12534
12893
|
const fallback = defaultValue ?? options[0]?.value ?? "";
|
|
12535
|
-
const [value, setValue] =
|
|
12536
|
-
const didMount =
|
|
12537
|
-
|
|
12894
|
+
const [value, setValue] = React137__default.useState(() => readInitial2(fallback));
|
|
12895
|
+
const didMount = React137__default.useRef(false);
|
|
12896
|
+
React137__default.useEffect(() => {
|
|
12538
12897
|
if (!didMount.current) {
|
|
12539
12898
|
didMount.current = true;
|
|
12540
12899
|
return;
|
|
@@ -12980,6 +13339,6 @@ function SortableNav({ items, onReorder, className }) {
|
|
|
12980
13339
|
return /* @__PURE__ */ jsx(DndContext, { sensors, collisionDetection: closestCenter, onDragEnd: handleDragEnd, children: /* @__PURE__ */ jsx(SortableContext, { items: items.map((i) => i.id), strategy: verticalListSortingStrategy, children: /* @__PURE__ */ jsx("nav", { "data-slot": "sortable-nav", className: cn("space-y-0.5 px-2 py-1", className), children: items.map((item) => /* @__PURE__ */ jsx(SortableNavItemWrapper, { item }, item.id)) }) }) });
|
|
12981
13340
|
}
|
|
12982
13341
|
|
|
12983
|
-
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, ActivityHeatmap, Alert, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AlertTitle, AnimatedGradient, AnimatedNumber, AppShell, AppShellMain, AppShellSidebar, AppShellUserMenu, Sidebar as AppSidebar, AreaChart, ArrayField, AspectRatio, AutoForm, Avatar, AvatarFallback, AvatarGroup, AvatarImage, Badge, Banner, BarChart, BarList, Beacon, BillingStatus, Body, Breadcrumb, BreadcrumbItem, BreadcrumbPage, BreadcrumbSeparator, BulkActions, Button, Calendar, CalendarDayButton, Caption, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Carousel, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious, CartLineItem, ChartContainer, ChartLegend, ChartLegendContent, ChartStyle, ChartTooltip, ChartTooltipContent, ChatDetail, Checkbox, Checklist, ChecklistItem, Code3 as Code, CodeBlock, Collapsible, CollapsibleContent2 as CollapsibleContent, CollapsibleTrigger2 as CollapsibleTrigger, ColorPicker, ColorSchemeSelect, Combobox, Command, CommandBar, CommandBarEmpty, CommandBarGroup, CommandBarItem, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandItem2 as CommandListItem, CommandPalette, CommandPaletteProvider, CommandSeparator, CommandShortcut, Comparison, Container, ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuPortal, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, DEFAULT_THEME_OPTIONS, DEFAULT_TRANSITION, DataGrid, DataList, DataListItem, DataTable, DataTableColumnHeader, DataTablePagination, DataTableToolbar, DatePicker, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DottedBackground, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, EmptyCart, EmptyState, EmptyStateIcon, EventCalendar, FadeIn, FeedbackModal, Field, FieldDescription, FieldError, FieldLabel, FileCards, FileUpload, FileUploadPreview, FilesList, FilterBadge, FilterItem, Filters, FloatingActionButton, FloatingLabelInput, FloatingThemePicker, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, Gantt, GradientBackground, GradientHeading, GridList, GridListItem, HStack, Heading, Heatmap, HelpSheet, HeroShaderA, HotkeyBadge, Hotkeys, HotkeysProvider, HoverCard, HoverCardContent, HoverCardTrigger, IconBadge, ImageCrop, Input, InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot, IntegrationCard, IntroDisclosure, InviteModal, Kanban, KanbanCard, KanbanColumn, Label3 as Label, LineChart, LoadingOverlay, LogoCarousel, MOTION_PRESETS, ManageTagsModal, Marquee, Menubar, MenubarCheckboxItem, MenubarContent, MenubarGroup, MenubarItem, MenubarLabel, MenubarMenu, MenubarPortal, MenubarRadioGroup, MenubarRadioItem, MenubarSeparator, MenubarShortcut, MenubarSub, MenubarSubContent, MenubarSubTrigger, MenubarTrigger, MessagesCard, MetricCard, MetricCardWithButton, MetricCardWithIcon, MobileSidebarTrigger, Morph, Navbar, NavbarBrand, NavbarContent, NavbarItem, NavigationMenu, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, NavigationMenuViewport, NoiseBackground, NotificationSettings, ObjectField, OrgMenu, Page, PageActions, PageBody, PageContainer, PageDescription, PageHeader, PageLayout, PageMain, PageTitle, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, PaletteSwatches, Parallax, PasswordInput, Persona, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, PriceTag, Progress, PropertyItem, PropertyList, QrCode, QuantityStepper, RadioGroup4 as RadioGroup, RadioGroupItem, Rating, ResizableHandle, ResizablePanel, ResizablePanelGroup, ResizeBox, ResizeHandle, Reveal, RichEditor, Ripple, RolesMenu, ScaleIn, ScrollArea, ScrollBar, ScrollHeader, SearchInput, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectUsersModal, SelectValue, Separator6 as Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, AppShell2 as Shell, Sidebar2 as Sidebar, SidebarContent, SidebarFooter2 as SidebarFooter, SidebarGroup, SidebarGroupLabel, SidebarHeader2 as SidebarHeader, SidebarItem2 as SidebarItem, SidebarLayoutDashboard, SidebarLayoutGroups, SidebarLayoutMinimal, SidebarLayoutSearch, SidebarLayoutUser, SidebarResizer, SidebarSeparator2 as SidebarSeparator, Skeleton, SlideIn, Slider, SortableNav, SortableTaskList, Sparkline, Spinner, SplitPage, SplitPageDetail, SplitPageList, Stack, StackedLayoutBranded, StackedLayoutTabs, Stagger, Stat, StatGroup, StepForm, StepFormNavigation, StepFormStep, Stepper, StepperStep, StructuredList, StructuredListItem, StructuredListSection, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Tags, TaskCard, TaskCardWithLabels, TextReveal, Textarea, TextureCard, TextureCardDescription, TextureCardHeader, TextureCardTitle, ThemeSwitch, Timeline, TimelineConnector, TimelineContent, TimelineItem, Toaster, Toggle, ToggleButton, ToggleButtonGroup, ToggleGroup, ToggleGroupItem, Tooltip2 as Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, Tour, TourStep, Transition, Tree, Typewriter, UserMenu, VStack, VariantPicker, VideoPlayer, WorkspaceMembers, WorkspacesMenu, badgeVariants, buttonVariants, cn, navigationMenuTriggerStyle, toastFn as toast, toastEmitter, toggleVariants, useAppShell, useCommandBar, useCommandPalette, useHotkeys, useLayoutId, useSidebar, useTour };
|
|
13342
|
+
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, ActivityHeatmap, DataGrid2 as AdvancedDataGrid, Alert, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AlertTitle, AnimatedGradient, AnimatedNumber, AppShell, AppShellMain, AppShellSidebar, AppShellUserMenu, Sidebar as AppSidebar, AreaChart, ArrayField, AspectRatio, AutoForm, Avatar, AvatarFallback, AvatarGroup, AvatarImage, Badge, Banner, BarChart, BarList, Beacon, BillingStatus, Body, Breadcrumb, BreadcrumbItem, BreadcrumbPage, BreadcrumbSeparator, BulkActions, Button, Calendar, CalendarDayButton, Caption, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Carousel, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious, CartLineItem, ChartContainer, ChartLegend, ChartLegendContent, ChartStyle, ChartTooltip, ChartTooltipContent, ChatDetail, Checkbox, Checklist, ChecklistItem, Code3 as Code, CodeBlock, Collapsible, CollapsibleContent2 as CollapsibleContent, CollapsibleTrigger2 as CollapsibleTrigger, ColorPicker, ColorSchemeSelect, Combobox, Command, CommandBar, CommandBarEmpty, CommandBarGroup, CommandBarItem, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandItem2 as CommandListItem, CommandPalette, CommandPaletteProvider, CommandSeparator, CommandShortcut, Comparison, Container, ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuPortal, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, DEFAULT_THEME_OPTIONS, DEFAULT_TRANSITION, DataGrid, DataList, DataListItem, DataTable, DataTableColumnHeader, DataTablePagination, DataTableToolbar, DatePicker, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DottedBackground, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, EmptyCart, EmptyState, EmptyStateIcon, EventCalendar, FadeIn, FeedbackModal, Field, FieldDescription, FieldError, FieldLabel, FileCards, FileUpload, FileUploadPreview, FilesList, FilterBadge, FilterItem, Filters, FloatingActionButton, FloatingLabelInput, FloatingThemePicker, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, Gantt, GradientBackground, GradientHeading, GridList, GridListItem, HStack, Heading, Heatmap, HelpSheet, HeroShaderA, HotkeyBadge, Hotkeys, HotkeysProvider, HoverCard, HoverCardContent, HoverCardTrigger, IconBadge, IconButton, ImageCrop, Input, InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot, IntegrationCard, IntroDisclosure, InviteModal, Kanban, KanbanCard, KanbanColumn, Label3 as Label, LineChart, LoadingOverlay, LogoCarousel, MOTION_PRESETS, ManageTagsModal, Marquee, Menubar, MenubarCheckboxItem, MenubarContent, MenubarGroup, MenubarItem, MenubarLabel, MenubarMenu, MenubarPortal, MenubarRadioGroup, MenubarRadioItem, MenubarSeparator, MenubarShortcut, MenubarSub, MenubarSubContent, MenubarSubTrigger, MenubarTrigger, MessagesCard, MetricCard, MetricCardWithButton, MetricCardWithIcon, MobileSidebarTrigger, Morph, Navbar, NavbarBrand, NavbarContent, NavbarItem, NavigationMenu, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, NavigationMenuViewport, NoiseBackground, NotificationSettings, ObjectField, OrgMenu, Page, PageActions, PageBody, PageContainer, PageDescription, PageHeader, PageLayout, PageMain, PageTitle, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, PaletteSwatches, Parallax, PasswordInput, Persona, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, PriceTag, Progress, PropertyItem, PropertyList, QrCode, QuantityStepper, RadioGroup4 as RadioGroup, RadioGroupItem, Rating, ResizableHandle, ResizablePanel, ResizablePanelGroup, ResizeBox, ResizeHandle, Reveal, RichEditor, Ripple, RolesMenu, ScaleIn, ScrollArea, ScrollBar, ScrollHeader, SearchInput, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectUsersModal, SelectValue, Separator6 as Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, AppShell2 as Shell, Sidebar2 as Sidebar, SidebarContent, SidebarFooter2 as SidebarFooter, SidebarGroup, SidebarGroupLabel, SidebarHeader2 as SidebarHeader, SidebarItem2 as SidebarItem, SidebarLayoutDashboard, SidebarLayoutGroups, SidebarLayoutMinimal, SidebarLayoutSearch, SidebarLayoutUser, SidebarResizer, SidebarSeparator2 as SidebarSeparator, Skeleton, SlideIn, Slider, SortableNav, SortableTaskList, Sparkline, Spinner, SplitPage, SplitPageDetail, SplitPageList, Stack, StackedLayoutBranded, StackedLayoutTabs, Stagger, Stat, StatGroup, StepForm, StepFormNavigation, StepFormStep, Stepper, StepperStep, StructuredList, StructuredListItem, StructuredListSection, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Tags, TaskCard, TaskCardWithLabels, TextReveal, Textarea, TextureCard, TextureCardDescription, TextureCardHeader, TextureCardTitle, ThemeSwitch, Timeline, TimelineConnector, TimelineContent, TimelineItem, Toaster, Toggle, ToggleButton, ToggleButtonGroup, ToggleGroup, ToggleGroupItem, Tooltip2 as Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, Tour, TourStep, Transition, Tree, Typewriter, UserMenu, VStack, VariantPicker, VideoPlayer, WorkspaceMembers, WorkspacesMenu, badgeVariants, buttonVariants, cn, navigationMenuTriggerStyle, toastFn as toast, toastEmitter, toggleVariants, useAppShell, useCommandBar, useCommandPalette, useHotkeys, useLayoutId, useSidebar, useTour };
|
|
12984
13343
|
//# sourceMappingURL=index.mjs.map
|
|
12985
13344
|
//# sourceMappingURL=index.mjs.map
|