@otfdashkit/ui 0.1.3 → 0.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -4
- package/dist/index.js +907 -546
- package/dist/index.mjs +774 -415
- package/package.json +1 -1
- package/src/index.ts +2 -1
- package/src/primitives/Button/Button.tsx +2 -131
- package/src/primitives/button.tsx +52 -0
package/dist/index.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
var clsx = require('clsx');
|
|
4
4
|
var tailwindMerge = require('tailwind-merge');
|
|
5
|
-
var
|
|
5
|
+
var React137 = require('react');
|
|
6
6
|
var AccordionPrimitive = require('@radix-ui/react-accordion');
|
|
7
7
|
var lucideReact = require('lucide-react');
|
|
8
8
|
var jsxRuntime = require('react/jsx-runtime');
|
|
@@ -60,9 +60,9 @@ var zod = require('@hookform/resolvers/zod');
|
|
|
60
60
|
var z = require('zod');
|
|
61
61
|
var reactColorful = require('react-colorful');
|
|
62
62
|
var react = require('motion/react');
|
|
63
|
+
var reactVirtual = require('@tanstack/react-virtual');
|
|
63
64
|
var ReactCrop = require('react-image-crop');
|
|
64
65
|
require('react-image-crop/dist/ReactCrop.css');
|
|
65
|
-
var reactVirtual = require('@tanstack/react-virtual');
|
|
66
66
|
|
|
67
67
|
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
68
68
|
|
|
@@ -84,7 +84,7 @@ function _interopNamespace(e) {
|
|
|
84
84
|
return Object.freeze(n);
|
|
85
85
|
}
|
|
86
86
|
|
|
87
|
-
var
|
|
87
|
+
var React137__namespace = /*#__PURE__*/_interopNamespace(React137);
|
|
88
88
|
var AccordionPrimitive__namespace = /*#__PURE__*/_interopNamespace(AccordionPrimitive);
|
|
89
89
|
var AlertDialogPrimitive__namespace = /*#__PURE__*/_interopNamespace(AlertDialogPrimitive);
|
|
90
90
|
var AspectRatioPrimitive__namespace = /*#__PURE__*/_interopNamespace(AspectRatioPrimitive);
|
|
@@ -124,7 +124,7 @@ function cn(...inputs) {
|
|
|
124
124
|
return tailwindMerge.twMerge(clsx.clsx(inputs));
|
|
125
125
|
}
|
|
126
126
|
var Accordion = AccordionPrimitive__namespace.Root;
|
|
127
|
-
var AccordionItem =
|
|
127
|
+
var AccordionItem = React137__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
128
128
|
AccordionPrimitive__namespace.Item,
|
|
129
129
|
{
|
|
130
130
|
ref,
|
|
@@ -133,7 +133,7 @@ var AccordionItem = React136__namespace.forwardRef(({ className, ...props }, ref
|
|
|
133
133
|
}
|
|
134
134
|
));
|
|
135
135
|
AccordionItem.displayName = "AccordionItem";
|
|
136
|
-
var AccordionTrigger =
|
|
136
|
+
var AccordionTrigger = React137__namespace.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(AccordionPrimitive__namespace.Header, { className: "flex", children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
137
137
|
AccordionPrimitive__namespace.Trigger,
|
|
138
138
|
{
|
|
139
139
|
ref,
|
|
@@ -149,7 +149,7 @@ var AccordionTrigger = React136__namespace.forwardRef(({ className, children, ..
|
|
|
149
149
|
}
|
|
150
150
|
) }));
|
|
151
151
|
AccordionTrigger.displayName = AccordionPrimitive__namespace.Trigger.displayName;
|
|
152
|
-
var AccordionContent =
|
|
152
|
+
var AccordionContent = React137__namespace.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
153
153
|
AccordionPrimitive__namespace.Content,
|
|
154
154
|
{
|
|
155
155
|
ref,
|
|
@@ -169,29 +169,67 @@ var buttonVariants = classVarianceAuthority.cva(
|
|
|
169
169
|
outline: "border border-border bg-transparent hover:bg-accent hover:text-accent-foreground",
|
|
170
170
|
ghost: "hover:bg-accent hover:text-accent-foreground",
|
|
171
171
|
destructive: "bg-destructive text-destructive-foreground hover:bg-destructive/90",
|
|
172
|
-
link: "text-primary underline-offset-4 hover:underline"
|
|
172
|
+
link: "text-primary underline-offset-4 hover:underline",
|
|
173
|
+
gradient: [
|
|
174
|
+
"bg-gradient-to-b from-primary to-[hsl(var(--primary)/0.8)]",
|
|
175
|
+
"text-primary-foreground",
|
|
176
|
+
"shadow-[0_1px_0_0_rgba(255,255,255,0.1)_inset,0_-1px_0_0_rgba(0,0,0,0.25)_inset]",
|
|
177
|
+
"hover:from-[hsl(var(--primary)/0.9)] hover:to-[hsl(var(--primary)/0.7)]",
|
|
178
|
+
"active:from-[hsl(var(--primary)/0.8)] active:to-[hsl(var(--primary)/0.6)]"
|
|
179
|
+
].join(" "),
|
|
180
|
+
texture: [
|
|
181
|
+
"relative border border-border/40",
|
|
182
|
+
"bg-gradient-to-b from-card to-[hsl(var(--card)/0.9)]",
|
|
183
|
+
"text-foreground",
|
|
184
|
+
"shadow-[0_0_0_1px_hsl(var(--border)/0.2)_inset]",
|
|
185
|
+
"hover:border-border/60 hover:bg-accent",
|
|
186
|
+
"active:shadow-none"
|
|
187
|
+
].join(" "),
|
|
188
|
+
// Loud by design: keep for primary CTAs. The sweep keyframe ships in themes/base.css.
|
|
189
|
+
shimmer: [
|
|
190
|
+
"relative isolate overflow-hidden",
|
|
191
|
+
"bg-primary text-primary-foreground",
|
|
192
|
+
"shadow-[0_1px_0_rgba(255,255,255,0.18)_inset,0_-1px_0_rgba(0,0,0,0.25)_inset]",
|
|
193
|
+
"hover:bg-primary/95",
|
|
194
|
+
"before:absolute before:inset-[-1px] before:rounded-[inherit] before:-z-10",
|
|
195
|
+
"before:bg-[conic-gradient(from_0deg,transparent_0deg,transparent_70deg,rgba(255,255,255,0.55)_90deg,transparent_110deg,transparent_360deg)]",
|
|
196
|
+
"before:animate-[shimmer-rotate_2.6s_linear_infinite] motion-reduce:before:animate-none",
|
|
197
|
+
"after:absolute after:inset-0 after:rounded-[inherit] after:pointer-events-none",
|
|
198
|
+
"after:bg-[linear-gradient(115deg,transparent_30%,rgba(255,255,255,0.22)_50%,transparent_70%)]",
|
|
199
|
+
"after:translate-x-[-120%] hover:after:translate-x-[120%] after:transition-transform after:duration-[900ms] after:ease-out"
|
|
200
|
+
].join(" ")
|
|
173
201
|
},
|
|
174
202
|
size: {
|
|
175
203
|
sm: "h-8 px-3 text-xs",
|
|
176
204
|
default: "h-9 px-4 py-2",
|
|
177
205
|
lg: "h-11 px-6 text-base",
|
|
178
|
-
|
|
206
|
+
xl: "h-12 px-8 text-base",
|
|
207
|
+
icon: "h-9 w-9",
|
|
208
|
+
"icon-sm": "h-7 w-7 p-0 text-xs"
|
|
179
209
|
}
|
|
180
210
|
},
|
|
181
211
|
defaultVariants: { variant: "default", size: "default" }
|
|
182
212
|
}
|
|
183
213
|
);
|
|
184
|
-
var Button =
|
|
214
|
+
var Button = React137__namespace.default.forwardRef(
|
|
185
215
|
({ className, variant, size, asChild = false, ...props }, ref) => {
|
|
186
216
|
const Comp = asChild ? reactSlot.Slot : "button";
|
|
187
217
|
return /* @__PURE__ */ jsxRuntime.jsx(Comp, { className: cn(buttonVariants({ variant, size }), className), ref, ...props });
|
|
188
218
|
}
|
|
189
219
|
);
|
|
190
220
|
Button.displayName = "Button";
|
|
221
|
+
var IconButton = React137__namespace.default.forwardRef(
|
|
222
|
+
({ icon, label, size = "default", variant = "ghost", className, asChild = false, ...props }, ref) => {
|
|
223
|
+
const Comp = asChild ? reactSlot.Slot : "button";
|
|
224
|
+
const sizeClass = size === "sm" ? "h-7 w-7" : size === "lg" ? "h-10 w-10" : "h-9 w-9";
|
|
225
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Comp, { ref, "aria-label": label, className: cn(buttonVariants({ variant }), sizeClass, "p-0 shrink-0", className), ...props, children: icon });
|
|
226
|
+
}
|
|
227
|
+
);
|
|
228
|
+
IconButton.displayName = "IconButton";
|
|
191
229
|
var AlertDialog = AlertDialogPrimitive__namespace.Root;
|
|
192
230
|
var AlertDialogTrigger = AlertDialogPrimitive__namespace.Trigger;
|
|
193
231
|
var AlertDialogPortal = AlertDialogPrimitive__namespace.Portal;
|
|
194
|
-
var AlertDialogOverlay =
|
|
232
|
+
var AlertDialogOverlay = React137__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
195
233
|
AlertDialogPrimitive__namespace.Overlay,
|
|
196
234
|
{
|
|
197
235
|
className: cn(
|
|
@@ -203,7 +241,7 @@ var AlertDialogOverlay = React136__namespace.forwardRef(({ className, ...props }
|
|
|
203
241
|
}
|
|
204
242
|
));
|
|
205
243
|
AlertDialogOverlay.displayName = AlertDialogPrimitive__namespace.Overlay.displayName;
|
|
206
|
-
var AlertDialogContent =
|
|
244
|
+
var AlertDialogContent = React137__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(AlertDialogPortal, { children: [
|
|
207
245
|
/* @__PURE__ */ jsxRuntime.jsx(AlertDialogOverlay, {}),
|
|
208
246
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
209
247
|
AlertDialogPrimitive__namespace.Content,
|
|
@@ -246,7 +284,7 @@ var AlertDialogFooter = ({
|
|
|
246
284
|
}
|
|
247
285
|
);
|
|
248
286
|
AlertDialogFooter.displayName = "AlertDialogFooter";
|
|
249
|
-
var AlertDialogTitle =
|
|
287
|
+
var AlertDialogTitle = React137__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
250
288
|
AlertDialogPrimitive__namespace.Title,
|
|
251
289
|
{
|
|
252
290
|
ref,
|
|
@@ -255,7 +293,7 @@ var AlertDialogTitle = React136__namespace.forwardRef(({ className, ...props },
|
|
|
255
293
|
}
|
|
256
294
|
));
|
|
257
295
|
AlertDialogTitle.displayName = AlertDialogPrimitive__namespace.Title.displayName;
|
|
258
|
-
var AlertDialogDescription =
|
|
296
|
+
var AlertDialogDescription = React137__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
259
297
|
AlertDialogPrimitive__namespace.Description,
|
|
260
298
|
{
|
|
261
299
|
ref,
|
|
@@ -264,7 +302,7 @@ var AlertDialogDescription = React136__namespace.forwardRef(({ className, ...pro
|
|
|
264
302
|
}
|
|
265
303
|
));
|
|
266
304
|
AlertDialogDescription.displayName = AlertDialogPrimitive__namespace.Description.displayName;
|
|
267
|
-
var AlertDialogAction =
|
|
305
|
+
var AlertDialogAction = React137__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
268
306
|
AlertDialogPrimitive__namespace.Action,
|
|
269
307
|
{
|
|
270
308
|
ref,
|
|
@@ -273,7 +311,7 @@ var AlertDialogAction = React136__namespace.forwardRef(({ className, ...props },
|
|
|
273
311
|
}
|
|
274
312
|
));
|
|
275
313
|
AlertDialogAction.displayName = AlertDialogPrimitive__namespace.Action.displayName;
|
|
276
|
-
var AlertDialogCancel =
|
|
314
|
+
var AlertDialogCancel = React137__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
277
315
|
AlertDialogPrimitive__namespace.Cancel,
|
|
278
316
|
{
|
|
279
317
|
ref,
|
|
@@ -300,7 +338,7 @@ var alertVariants = classVarianceAuthority.cva(
|
|
|
300
338
|
}
|
|
301
339
|
}
|
|
302
340
|
);
|
|
303
|
-
var Alert =
|
|
341
|
+
var Alert = React137__namespace.forwardRef(({ className, variant, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
304
342
|
"div",
|
|
305
343
|
{
|
|
306
344
|
ref,
|
|
@@ -310,7 +348,7 @@ var Alert = React136__namespace.forwardRef(({ className, variant, ...props }, re
|
|
|
310
348
|
}
|
|
311
349
|
));
|
|
312
350
|
Alert.displayName = "Alert";
|
|
313
|
-
var AlertTitle =
|
|
351
|
+
var AlertTitle = React137__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
314
352
|
"h5",
|
|
315
353
|
{
|
|
316
354
|
ref,
|
|
@@ -319,7 +357,7 @@ var AlertTitle = React136__namespace.forwardRef(({ className, ...props }, ref) =
|
|
|
319
357
|
}
|
|
320
358
|
));
|
|
321
359
|
AlertTitle.displayName = "AlertTitle";
|
|
322
|
-
var AlertDescription =
|
|
360
|
+
var AlertDescription = React137__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
323
361
|
"div",
|
|
324
362
|
{
|
|
325
363
|
ref,
|
|
@@ -329,7 +367,7 @@ var AlertDescription = React136__namespace.forwardRef(({ className, ...props },
|
|
|
329
367
|
));
|
|
330
368
|
AlertDescription.displayName = "AlertDescription";
|
|
331
369
|
var AspectRatio = AspectRatioPrimitive__namespace.Root;
|
|
332
|
-
var Avatar =
|
|
370
|
+
var Avatar = React137__namespace.default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
333
371
|
AvatarPrimitive__namespace.Root,
|
|
334
372
|
{
|
|
335
373
|
ref,
|
|
@@ -338,9 +376,9 @@ var Avatar = React136__namespace.default.forwardRef(({ className, ...props }, re
|
|
|
338
376
|
}
|
|
339
377
|
));
|
|
340
378
|
Avatar.displayName = AvatarPrimitive__namespace.Root.displayName;
|
|
341
|
-
var AvatarImage =
|
|
379
|
+
var AvatarImage = React137__namespace.default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(AvatarPrimitive__namespace.Image, { ref, className: cn("aspect-square h-full w-full object-cover", className), ...props }));
|
|
342
380
|
AvatarImage.displayName = AvatarPrimitive__namespace.Image.displayName;
|
|
343
|
-
var AvatarFallback =
|
|
381
|
+
var AvatarFallback = React137__namespace.default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
344
382
|
AvatarPrimitive__namespace.Fallback,
|
|
345
383
|
{
|
|
346
384
|
ref,
|
|
@@ -349,15 +387,15 @@ var AvatarFallback = React136__namespace.default.forwardRef(({ className, ...pro
|
|
|
349
387
|
}
|
|
350
388
|
));
|
|
351
389
|
AvatarFallback.displayName = AvatarPrimitive__namespace.Fallback.displayName;
|
|
352
|
-
var AvatarGroup =
|
|
390
|
+
var AvatarGroup = React137__namespace.default.forwardRef(
|
|
353
391
|
({ className, max = 4, size = 32, spacing, renderOverflow, children, ...props }, ref) => {
|
|
354
|
-
const items =
|
|
392
|
+
const items = React137__namespace.default.Children.toArray(children).filter(React137__namespace.default.isValidElement);
|
|
355
393
|
const overlap = spacing ?? Math.round(size / 3);
|
|
356
394
|
const visible = items.slice(0, max);
|
|
357
395
|
const remaining = Math.max(0, items.length - max);
|
|
358
396
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { ref, className: cn("flex items-center", className), "data-slot": "avatar-group", ...props, children: [
|
|
359
397
|
visible.map(
|
|
360
|
-
(child, i) =>
|
|
398
|
+
(child, i) => React137__namespace.default.cloneElement(child, {
|
|
361
399
|
key: child.key ?? i,
|
|
362
400
|
style: {
|
|
363
401
|
width: size,
|
|
@@ -563,8 +601,8 @@ function CalendarDayButton({
|
|
|
563
601
|
...props
|
|
564
602
|
}) {
|
|
565
603
|
const defaultClassNames = reactDayPicker.getDefaultClassNames();
|
|
566
|
-
const ref =
|
|
567
|
-
|
|
604
|
+
const ref = React137__namespace.useRef(null);
|
|
605
|
+
React137__namespace.useEffect(() => {
|
|
568
606
|
if (modifiers.focused) ref.current?.focus();
|
|
569
607
|
}, [modifiers.focused]);
|
|
570
608
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -587,7 +625,7 @@ function CalendarDayButton({
|
|
|
587
625
|
}
|
|
588
626
|
);
|
|
589
627
|
}
|
|
590
|
-
var Card =
|
|
628
|
+
var Card = React137__namespace.default.forwardRef(
|
|
591
629
|
({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
592
630
|
"div",
|
|
593
631
|
{
|
|
@@ -598,35 +636,35 @@ var Card = React136__namespace.default.forwardRef(
|
|
|
598
636
|
)
|
|
599
637
|
);
|
|
600
638
|
Card.displayName = "Card";
|
|
601
|
-
var CardHeader =
|
|
639
|
+
var CardHeader = React137__namespace.default.forwardRef(
|
|
602
640
|
({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("div", { ref, className: cn("flex flex-col space-y-1.5 p-6", className), ...props })
|
|
603
641
|
);
|
|
604
642
|
CardHeader.displayName = "CardHeader";
|
|
605
|
-
var CardTitle =
|
|
643
|
+
var CardTitle = React137__namespace.default.forwardRef(
|
|
606
644
|
({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("div", { ref, className: cn("font-semibold leading-none tracking-tight", className), ...props })
|
|
607
645
|
);
|
|
608
646
|
CardTitle.displayName = "CardTitle";
|
|
609
|
-
var CardDescription =
|
|
647
|
+
var CardDescription = React137__namespace.default.forwardRef(
|
|
610
648
|
({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("div", { ref, className: cn("text-sm text-muted-foreground", className), ...props })
|
|
611
649
|
);
|
|
612
650
|
CardDescription.displayName = "CardDescription";
|
|
613
|
-
var CardContent =
|
|
651
|
+
var CardContent = React137__namespace.default.forwardRef(
|
|
614
652
|
({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("div", { ref, className: cn("p-6 pt-0", className), ...props })
|
|
615
653
|
);
|
|
616
654
|
CardContent.displayName = "CardContent";
|
|
617
|
-
var CardFooter =
|
|
655
|
+
var CardFooter = React137__namespace.default.forwardRef(
|
|
618
656
|
({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("div", { ref, className: cn("flex items-center p-6 pt-0", className), ...props })
|
|
619
657
|
);
|
|
620
658
|
CardFooter.displayName = "CardFooter";
|
|
621
|
-
var CarouselContext =
|
|
659
|
+
var CarouselContext = React137__namespace.createContext(null);
|
|
622
660
|
function useCarousel() {
|
|
623
|
-
const context =
|
|
661
|
+
const context = React137__namespace.useContext(CarouselContext);
|
|
624
662
|
if (!context) {
|
|
625
663
|
throw new Error("useCarousel must be used within a <Carousel />");
|
|
626
664
|
}
|
|
627
665
|
return context;
|
|
628
666
|
}
|
|
629
|
-
var Carousel =
|
|
667
|
+
var Carousel = React137__namespace.forwardRef(
|
|
630
668
|
({
|
|
631
669
|
orientation = "horizontal",
|
|
632
670
|
opts,
|
|
@@ -643,22 +681,22 @@ var Carousel = React136__namespace.forwardRef(
|
|
|
643
681
|
},
|
|
644
682
|
plugins
|
|
645
683
|
);
|
|
646
|
-
const [canScrollPrev, setCanScrollPrev] =
|
|
647
|
-
const [canScrollNext, setCanScrollNext] =
|
|
648
|
-
const onSelect =
|
|
684
|
+
const [canScrollPrev, setCanScrollPrev] = React137__namespace.useState(false);
|
|
685
|
+
const [canScrollNext, setCanScrollNext] = React137__namespace.useState(false);
|
|
686
|
+
const onSelect = React137__namespace.useCallback((api2) => {
|
|
649
687
|
if (!api2) {
|
|
650
688
|
return;
|
|
651
689
|
}
|
|
652
690
|
setCanScrollPrev(api2.canScrollPrev());
|
|
653
691
|
setCanScrollNext(api2.canScrollNext());
|
|
654
692
|
}, []);
|
|
655
|
-
const scrollPrev =
|
|
693
|
+
const scrollPrev = React137__namespace.useCallback(() => {
|
|
656
694
|
api?.scrollPrev();
|
|
657
695
|
}, [api]);
|
|
658
|
-
const scrollNext =
|
|
696
|
+
const scrollNext = React137__namespace.useCallback(() => {
|
|
659
697
|
api?.scrollNext();
|
|
660
698
|
}, [api]);
|
|
661
|
-
const handleKeyDown =
|
|
699
|
+
const handleKeyDown = React137__namespace.useCallback(
|
|
662
700
|
(event) => {
|
|
663
701
|
if (event.key === "ArrowLeft") {
|
|
664
702
|
event.preventDefault();
|
|
@@ -670,13 +708,13 @@ var Carousel = React136__namespace.forwardRef(
|
|
|
670
708
|
},
|
|
671
709
|
[scrollPrev, scrollNext]
|
|
672
710
|
);
|
|
673
|
-
|
|
711
|
+
React137__namespace.useEffect(() => {
|
|
674
712
|
if (!api || !setApi) {
|
|
675
713
|
return;
|
|
676
714
|
}
|
|
677
715
|
setApi(api);
|
|
678
716
|
}, [api, setApi]);
|
|
679
|
-
|
|
717
|
+
React137__namespace.useEffect(() => {
|
|
680
718
|
if (!api) {
|
|
681
719
|
return;
|
|
682
720
|
}
|
|
@@ -717,7 +755,7 @@ var Carousel = React136__namespace.forwardRef(
|
|
|
717
755
|
}
|
|
718
756
|
);
|
|
719
757
|
Carousel.displayName = "Carousel";
|
|
720
|
-
var CarouselContent =
|
|
758
|
+
var CarouselContent = React137__namespace.forwardRef(({ className, ...props }, ref) => {
|
|
721
759
|
const { carouselRef, orientation } = useCarousel();
|
|
722
760
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { ref: carouselRef, className: "overflow-hidden", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
723
761
|
"div",
|
|
@@ -733,7 +771,7 @@ var CarouselContent = React136__namespace.forwardRef(({ className, ...props }, r
|
|
|
733
771
|
) });
|
|
734
772
|
});
|
|
735
773
|
CarouselContent.displayName = "CarouselContent";
|
|
736
|
-
var CarouselItem =
|
|
774
|
+
var CarouselItem = React137__namespace.forwardRef(({ className, ...props }, ref) => {
|
|
737
775
|
const { orientation } = useCarousel();
|
|
738
776
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
739
777
|
"div",
|
|
@@ -751,7 +789,7 @@ var CarouselItem = React136__namespace.forwardRef(({ className, ...props }, ref)
|
|
|
751
789
|
);
|
|
752
790
|
});
|
|
753
791
|
CarouselItem.displayName = "CarouselItem";
|
|
754
|
-
var CarouselPrevious =
|
|
792
|
+
var CarouselPrevious = React137__namespace.forwardRef(({ className, variant = "outline", size = "icon", ...props }, ref) => {
|
|
755
793
|
const { orientation, scrollPrev, canScrollPrev } = useCarousel();
|
|
756
794
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
757
795
|
Button,
|
|
@@ -775,7 +813,7 @@ var CarouselPrevious = React136__namespace.forwardRef(({ className, variant = "o
|
|
|
775
813
|
);
|
|
776
814
|
});
|
|
777
815
|
CarouselPrevious.displayName = "CarouselPrevious";
|
|
778
|
-
var CarouselNext =
|
|
816
|
+
var CarouselNext = React137__namespace.forwardRef(({ className, variant = "outline", size = "icon", ...props }, ref) => {
|
|
779
817
|
const { orientation, scrollNext, canScrollNext } = useCarousel();
|
|
780
818
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
781
819
|
Button,
|
|
@@ -807,7 +845,7 @@ var SIZE = {
|
|
|
807
845
|
function formatMoney(minor, currency, locale) {
|
|
808
846
|
return new Intl.NumberFormat(locale, { style: "currency", currency }).format(minor / 100);
|
|
809
847
|
}
|
|
810
|
-
var PriceTag =
|
|
848
|
+
var PriceTag = React137__namespace.default.forwardRef(
|
|
811
849
|
({ amount, compareAt, currency = "USD", locale = "en-US", size = "md", showDiscount = true, className, ...props }, ref) => {
|
|
812
850
|
const onSale = compareAt !== void 0 && compareAt > amount;
|
|
813
851
|
const pct = onSale ? Math.round((1 - amount / compareAt) * 100) : 0;
|
|
@@ -826,7 +864,7 @@ var PriceTag = React136__namespace.default.forwardRef(
|
|
|
826
864
|
}
|
|
827
865
|
);
|
|
828
866
|
PriceTag.displayName = "PriceTag";
|
|
829
|
-
var QuantityStepper =
|
|
867
|
+
var QuantityStepper = React137__namespace.default.forwardRef(
|
|
830
868
|
({
|
|
831
869
|
value: valueProp,
|
|
832
870
|
defaultValue = 1,
|
|
@@ -841,7 +879,7 @@ var QuantityStepper = React136__namespace.default.forwardRef(
|
|
|
841
879
|
...props
|
|
842
880
|
}, ref) => {
|
|
843
881
|
const isControlled = valueProp !== void 0;
|
|
844
|
-
const [internal, setInternal] =
|
|
882
|
+
const [internal, setInternal] = React137__namespace.default.useState(defaultValue);
|
|
845
883
|
const value = isControlled ? valueProp : internal;
|
|
846
884
|
const commit = (next) => {
|
|
847
885
|
const clamped = Math.max(min, Math.min(max, next));
|
|
@@ -898,7 +936,7 @@ var QuantityStepper = React136__namespace.default.forwardRef(
|
|
|
898
936
|
}
|
|
899
937
|
);
|
|
900
938
|
QuantityStepper.displayName = "QuantityStepper";
|
|
901
|
-
var CartLineItem =
|
|
939
|
+
var CartLineItem = React137__namespace.default.forwardRef(
|
|
902
940
|
({
|
|
903
941
|
image,
|
|
904
942
|
title,
|
|
@@ -956,16 +994,16 @@ var CartLineItem = React136__namespace.default.forwardRef(
|
|
|
956
994
|
);
|
|
957
995
|
CartLineItem.displayName = "CartLineItem";
|
|
958
996
|
var THEMES = { light: "", dark: ".dark" };
|
|
959
|
-
var ChartContext =
|
|
997
|
+
var ChartContext = React137__namespace.createContext(null);
|
|
960
998
|
function useChart() {
|
|
961
|
-
const context =
|
|
999
|
+
const context = React137__namespace.useContext(ChartContext);
|
|
962
1000
|
if (!context) {
|
|
963
1001
|
throw new Error("useChart must be used within a <ChartContainer />");
|
|
964
1002
|
}
|
|
965
1003
|
return context;
|
|
966
1004
|
}
|
|
967
|
-
var ChartContainer =
|
|
968
|
-
const uniqueId =
|
|
1005
|
+
var ChartContainer = React137__namespace.forwardRef(({ id, className, children, config, ...props }, ref) => {
|
|
1006
|
+
const uniqueId = React137__namespace.useId();
|
|
969
1007
|
const chartId = `chart-${id || uniqueId.replace(/:/g, "")}`;
|
|
970
1008
|
return /* @__PURE__ */ jsxRuntime.jsx(ChartContext.Provider, { value: { config }, children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
971
1009
|
"div",
|
|
@@ -1011,7 +1049,7 @@ ${colorConfig.map(([key, itemConfig]) => {
|
|
|
1011
1049
|
);
|
|
1012
1050
|
};
|
|
1013
1051
|
var ChartTooltip = RechartsPrimitive__namespace.Tooltip;
|
|
1014
|
-
var ChartTooltipContent =
|
|
1052
|
+
var ChartTooltipContent = React137__namespace.forwardRef(
|
|
1015
1053
|
({
|
|
1016
1054
|
active,
|
|
1017
1055
|
payload,
|
|
@@ -1028,7 +1066,7 @@ var ChartTooltipContent = React136__namespace.forwardRef(
|
|
|
1028
1066
|
labelKey
|
|
1029
1067
|
}, ref) => {
|
|
1030
1068
|
const { config } = useChart();
|
|
1031
|
-
const tooltipLabel =
|
|
1069
|
+
const tooltipLabel = React137__namespace.useMemo(() => {
|
|
1032
1070
|
if (hideLabel || !payload?.length) {
|
|
1033
1071
|
return null;
|
|
1034
1072
|
}
|
|
@@ -1124,7 +1162,7 @@ var ChartTooltipContent = React136__namespace.forwardRef(
|
|
|
1124
1162
|
);
|
|
1125
1163
|
ChartTooltipContent.displayName = "ChartTooltip";
|
|
1126
1164
|
var ChartLegend = RechartsPrimitive__namespace.Legend;
|
|
1127
|
-
var ChartLegendContent =
|
|
1165
|
+
var ChartLegendContent = React137__namespace.forwardRef(
|
|
1128
1166
|
({ className, hideIcon = false, payload, verticalAlign = "bottom", nameKey }, ref) => {
|
|
1129
1167
|
const { config } = useChart();
|
|
1130
1168
|
if (!payload?.length) {
|
|
@@ -1182,7 +1220,7 @@ function getPayloadConfigFromPayload(config, payload, key) {
|
|
|
1182
1220
|
}
|
|
1183
1221
|
return configLabelKey in config ? config[configLabelKey] : config[key];
|
|
1184
1222
|
}
|
|
1185
|
-
var Checkbox =
|
|
1223
|
+
var Checkbox = React137__namespace.default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1186
1224
|
CheckboxPrimitive__namespace.Root,
|
|
1187
1225
|
{
|
|
1188
1226
|
ref,
|
|
@@ -1222,7 +1260,7 @@ function detectTheme(node) {
|
|
|
1222
1260
|
}
|
|
1223
1261
|
return document.documentElement.classList.contains("dark") ? "dark" : "light";
|
|
1224
1262
|
}
|
|
1225
|
-
var CodeBlock =
|
|
1263
|
+
var CodeBlock = React137__namespace.default.forwardRef(
|
|
1226
1264
|
({
|
|
1227
1265
|
code,
|
|
1228
1266
|
language = "tsx",
|
|
@@ -1233,10 +1271,10 @@ var CodeBlock = React136__namespace.default.forwardRef(
|
|
|
1233
1271
|
className,
|
|
1234
1272
|
...props
|
|
1235
1273
|
}, ref) => {
|
|
1236
|
-
const containerRef =
|
|
1237
|
-
const [html, setHtml] =
|
|
1238
|
-
const [copied, setCopied] =
|
|
1239
|
-
|
|
1274
|
+
const containerRef = React137__namespace.default.useRef(null);
|
|
1275
|
+
const [html, setHtml] = React137__namespace.default.useState(null);
|
|
1276
|
+
const [copied, setCopied] = React137__namespace.default.useState(false);
|
|
1277
|
+
React137__namespace.default.useEffect(() => {
|
|
1240
1278
|
let cancelled = false;
|
|
1241
1279
|
getHighlighter().then((hl) => {
|
|
1242
1280
|
if (cancelled) return;
|
|
@@ -1251,7 +1289,7 @@ var CodeBlock = React136__namespace.default.forwardRef(
|
|
|
1251
1289
|
cancelled = true;
|
|
1252
1290
|
};
|
|
1253
1291
|
}, [code, language, theme]);
|
|
1254
|
-
const onCopy =
|
|
1292
|
+
const onCopy = React137__namespace.default.useCallback(async () => {
|
|
1255
1293
|
try {
|
|
1256
1294
|
await navigator.clipboard.writeText(code);
|
|
1257
1295
|
setCopied(true);
|
|
@@ -1259,7 +1297,7 @@ var CodeBlock = React136__namespace.default.forwardRef(
|
|
|
1259
1297
|
} catch {
|
|
1260
1298
|
}
|
|
1261
1299
|
}, [code]);
|
|
1262
|
-
const lines =
|
|
1300
|
+
const lines = React137__namespace.default.useMemo(() => code.split("\n"), [code]);
|
|
1263
1301
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1264
1302
|
"div",
|
|
1265
1303
|
{
|
|
@@ -1327,7 +1365,7 @@ var Dialog = DialogPrimitive__namespace.Root;
|
|
|
1327
1365
|
var DialogTrigger = DialogPrimitive__namespace.Trigger;
|
|
1328
1366
|
var DialogPortal = DialogPrimitive__namespace.Portal;
|
|
1329
1367
|
var DialogClose = DialogPrimitive__namespace.Close;
|
|
1330
|
-
var DialogOverlay =
|
|
1368
|
+
var DialogOverlay = React137__namespace.default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1331
1369
|
DialogPrimitive__namespace.Overlay,
|
|
1332
1370
|
{
|
|
1333
1371
|
ref,
|
|
@@ -1341,7 +1379,7 @@ var DialogOverlay = React136__namespace.default.forwardRef(({ className, ...prop
|
|
|
1341
1379
|
}
|
|
1342
1380
|
));
|
|
1343
1381
|
DialogOverlay.displayName = DialogPrimitive__namespace.Overlay.displayName;
|
|
1344
|
-
var DialogContent =
|
|
1382
|
+
var DialogContent = React137__namespace.default.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(DialogPortal, { children: [
|
|
1345
1383
|
/* @__PURE__ */ jsxRuntime.jsx(DialogOverlay, {}),
|
|
1346
1384
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
1347
1385
|
DialogPrimitive__namespace.Content,
|
|
@@ -1371,7 +1409,7 @@ var DialogHeader = ({ className, ...props }) => /* @__PURE__ */ jsxRuntime.jsx("
|
|
|
1371
1409
|
DialogHeader.displayName = "DialogHeader";
|
|
1372
1410
|
var DialogFooter = ({ className, ...props }) => /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2", className), ...props });
|
|
1373
1411
|
DialogFooter.displayName = "DialogFooter";
|
|
1374
|
-
var DialogTitle =
|
|
1412
|
+
var DialogTitle = React137__namespace.default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1375
1413
|
DialogPrimitive__namespace.Title,
|
|
1376
1414
|
{
|
|
1377
1415
|
ref,
|
|
@@ -1380,7 +1418,7 @@ var DialogTitle = React136__namespace.default.forwardRef(({ className, ...props
|
|
|
1380
1418
|
}
|
|
1381
1419
|
));
|
|
1382
1420
|
DialogTitle.displayName = DialogPrimitive__namespace.Title.displayName;
|
|
1383
|
-
var DialogDescription =
|
|
1421
|
+
var DialogDescription = React137__namespace.default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1384
1422
|
DialogPrimitive__namespace.Description,
|
|
1385
1423
|
{
|
|
1386
1424
|
ref,
|
|
@@ -1389,7 +1427,7 @@ var DialogDescription = React136__namespace.default.forwardRef(({ className, ...
|
|
|
1389
1427
|
}
|
|
1390
1428
|
));
|
|
1391
1429
|
DialogDescription.displayName = DialogPrimitive__namespace.Description.displayName;
|
|
1392
|
-
var Command =
|
|
1430
|
+
var Command = React137__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1393
1431
|
cmdk.Command,
|
|
1394
1432
|
{
|
|
1395
1433
|
ref,
|
|
@@ -1404,7 +1442,7 @@ Command.displayName = cmdk.Command.displayName;
|
|
|
1404
1442
|
var CommandDialog = ({ children, ...props }) => {
|
|
1405
1443
|
return /* @__PURE__ */ jsxRuntime.jsx(Dialog, { ...props, children: /* @__PURE__ */ jsxRuntime.jsx(DialogContent, { className: "overflow-hidden p-0", children: /* @__PURE__ */ jsxRuntime.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 }) }) });
|
|
1406
1444
|
};
|
|
1407
|
-
var CommandInput =
|
|
1445
|
+
var CommandInput = React137__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center border-b px-3", "cmdk-input-wrapper": "", children: [
|
|
1408
1446
|
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Search, { className: "mr-2 h-4 w-4 shrink-0 opacity-50" }),
|
|
1409
1447
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1410
1448
|
cmdk.Command.Input,
|
|
@@ -1419,7 +1457,7 @@ var CommandInput = React136__namespace.forwardRef(({ className, ...props }, ref)
|
|
|
1419
1457
|
)
|
|
1420
1458
|
] }));
|
|
1421
1459
|
CommandInput.displayName = cmdk.Command.Input.displayName;
|
|
1422
|
-
var CommandList =
|
|
1460
|
+
var CommandList = React137__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1423
1461
|
cmdk.Command.List,
|
|
1424
1462
|
{
|
|
1425
1463
|
ref,
|
|
@@ -1428,7 +1466,7 @@ var CommandList = React136__namespace.forwardRef(({ className, ...props }, ref)
|
|
|
1428
1466
|
}
|
|
1429
1467
|
));
|
|
1430
1468
|
CommandList.displayName = cmdk.Command.List.displayName;
|
|
1431
|
-
var CommandEmpty =
|
|
1469
|
+
var CommandEmpty = React137__namespace.forwardRef((props, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1432
1470
|
cmdk.Command.Empty,
|
|
1433
1471
|
{
|
|
1434
1472
|
ref,
|
|
@@ -1437,7 +1475,7 @@ var CommandEmpty = React136__namespace.forwardRef((props, ref) => /* @__PURE__ *
|
|
|
1437
1475
|
}
|
|
1438
1476
|
));
|
|
1439
1477
|
CommandEmpty.displayName = cmdk.Command.Empty.displayName;
|
|
1440
|
-
var CommandGroup =
|
|
1478
|
+
var CommandGroup = React137__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1441
1479
|
cmdk.Command.Group,
|
|
1442
1480
|
{
|
|
1443
1481
|
ref,
|
|
@@ -1449,7 +1487,7 @@ var CommandGroup = React136__namespace.forwardRef(({ className, ...props }, ref)
|
|
|
1449
1487
|
}
|
|
1450
1488
|
));
|
|
1451
1489
|
CommandGroup.displayName = cmdk.Command.Group.displayName;
|
|
1452
|
-
var CommandSeparator =
|
|
1490
|
+
var CommandSeparator = React137__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1453
1491
|
cmdk.Command.Separator,
|
|
1454
1492
|
{
|
|
1455
1493
|
ref,
|
|
@@ -1458,7 +1496,7 @@ var CommandSeparator = React136__namespace.forwardRef(({ className, ...props },
|
|
|
1458
1496
|
}
|
|
1459
1497
|
));
|
|
1460
1498
|
CommandSeparator.displayName = cmdk.Command.Separator.displayName;
|
|
1461
|
-
var CommandItem =
|
|
1499
|
+
var CommandItem = React137__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1462
1500
|
cmdk.Command.Item,
|
|
1463
1501
|
{
|
|
1464
1502
|
ref,
|
|
@@ -1486,7 +1524,7 @@ var CommandShortcut = ({
|
|
|
1486
1524
|
);
|
|
1487
1525
|
};
|
|
1488
1526
|
CommandShortcut.displayName = "CommandShortcut";
|
|
1489
|
-
var Comparison =
|
|
1527
|
+
var Comparison = React137__namespace.default.forwardRef(
|
|
1490
1528
|
({
|
|
1491
1529
|
before,
|
|
1492
1530
|
after,
|
|
@@ -1502,10 +1540,10 @@ var Comparison = React136__namespace.default.forwardRef(
|
|
|
1502
1540
|
...props
|
|
1503
1541
|
}, ref) => {
|
|
1504
1542
|
const isControlled = valueProp !== void 0;
|
|
1505
|
-
const [internal, setInternal] =
|
|
1543
|
+
const [internal, setInternal] = React137__namespace.default.useState(defaultValue);
|
|
1506
1544
|
const value = Math.max(0, Math.min(100, isControlled ? valueProp : internal));
|
|
1507
|
-
const containerRef =
|
|
1508
|
-
const commit =
|
|
1545
|
+
const containerRef = React137__namespace.default.useRef(null);
|
|
1546
|
+
const commit = React137__namespace.default.useCallback(
|
|
1509
1547
|
(next) => {
|
|
1510
1548
|
const clamped = Math.max(0, Math.min(100, next));
|
|
1511
1549
|
if (!isControlled) setInternal(clamped);
|
|
@@ -1513,7 +1551,7 @@ var Comparison = React136__namespace.default.forwardRef(
|
|
|
1513
1551
|
},
|
|
1514
1552
|
[isControlled, onValueChange]
|
|
1515
1553
|
);
|
|
1516
|
-
const updateFromPointer =
|
|
1554
|
+
const updateFromPointer = React137__namespace.default.useCallback(
|
|
1517
1555
|
(clientX, clientY) => {
|
|
1518
1556
|
const el = containerRef.current;
|
|
1519
1557
|
if (!el) return;
|
|
@@ -1636,30 +1674,30 @@ var ContextMenuSub = ContextMenuPrimitive__namespace.Sub;
|
|
|
1636
1674
|
var ContextMenuRadioGroup = ContextMenuPrimitive__namespace.RadioGroup;
|
|
1637
1675
|
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";
|
|
1638
1676
|
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";
|
|
1639
|
-
var ContextMenuContent =
|
|
1677
|
+
var ContextMenuContent = React137__namespace.default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(ContextMenuPrimitive__namespace.Portal, { children: /* @__PURE__ */ jsxRuntime.jsx(ContextMenuPrimitive__namespace.Content, { ref, className: cn(contentStyle, className), ...props }) }));
|
|
1640
1678
|
ContextMenuContent.displayName = ContextMenuPrimitive__namespace.Content.displayName;
|
|
1641
|
-
var ContextMenuItem =
|
|
1679
|
+
var ContextMenuItem = React137__namespace.default.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(ContextMenuPrimitive__namespace.Item, { ref, className: cn(itemStyle, inset && "pl-8", className), ...props }));
|
|
1642
1680
|
ContextMenuItem.displayName = ContextMenuPrimitive__namespace.Item.displayName;
|
|
1643
|
-
var ContextMenuCheckboxItem =
|
|
1681
|
+
var ContextMenuCheckboxItem = React137__namespace.default.forwardRef(({ className, children, checked, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(ContextMenuPrimitive__namespace.CheckboxItem, { ref, className: cn(itemStyle, "pl-8", className), checked, ...props, children: [
|
|
1644
1682
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsx(ContextMenuPrimitive__namespace.ItemIndicator, { children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Check, { className: "h-4 w-4" }) }) }),
|
|
1645
1683
|
children
|
|
1646
1684
|
] }));
|
|
1647
1685
|
ContextMenuCheckboxItem.displayName = ContextMenuPrimitive__namespace.CheckboxItem.displayName;
|
|
1648
|
-
var ContextMenuRadioItem =
|
|
1686
|
+
var ContextMenuRadioItem = React137__namespace.default.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(ContextMenuPrimitive__namespace.RadioItem, { ref, className: cn(itemStyle, "pl-8", className), ...props, children: [
|
|
1649
1687
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsx(ContextMenuPrimitive__namespace.ItemIndicator, { children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Circle, { className: "h-2 w-2 fill-current" }) }) }),
|
|
1650
1688
|
children
|
|
1651
1689
|
] }));
|
|
1652
1690
|
ContextMenuRadioItem.displayName = ContextMenuPrimitive__namespace.RadioItem.displayName;
|
|
1653
|
-
var ContextMenuLabel =
|
|
1691
|
+
var ContextMenuLabel = React137__namespace.default.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(ContextMenuPrimitive__namespace.Label, { ref, className: cn("px-2 py-1.5 text-xs font-semibold text-[hsl(var(--muted-foreground))]", inset && "pl-8", className), ...props }));
|
|
1654
1692
|
ContextMenuLabel.displayName = ContextMenuPrimitive__namespace.Label.displayName;
|
|
1655
|
-
var ContextMenuSeparator =
|
|
1693
|
+
var ContextMenuSeparator = React137__namespace.default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(ContextMenuPrimitive__namespace.Separator, { ref, className: cn("-mx-1 my-1 h-px bg-[hsl(var(--muted))]", className), ...props }));
|
|
1656
1694
|
ContextMenuSeparator.displayName = ContextMenuPrimitive__namespace.Separator.displayName;
|
|
1657
|
-
var ContextMenuSubTrigger =
|
|
1695
|
+
var ContextMenuSubTrigger = React137__namespace.default.forwardRef(({ className, inset, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(ContextMenuPrimitive__namespace.SubTrigger, { ref, className: cn(itemStyle, inset && "pl-8", className), ...props, children: [
|
|
1658
1696
|
children,
|
|
1659
1697
|
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronRight, { className: "ml-auto h-4 w-4" })
|
|
1660
1698
|
] }));
|
|
1661
1699
|
ContextMenuSubTrigger.displayName = ContextMenuPrimitive__namespace.SubTrigger.displayName;
|
|
1662
|
-
var ContextMenuSubContent =
|
|
1700
|
+
var ContextMenuSubContent = React137__namespace.default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(ContextMenuPrimitive__namespace.SubContent, { ref, className: cn(contentStyle, className), ...props }));
|
|
1663
1701
|
ContextMenuSubContent.displayName = ContextMenuPrimitive__namespace.SubContent.displayName;
|
|
1664
1702
|
var ContextMenuShortcut = ({ className, ...props }) => /* @__PURE__ */ jsxRuntime.jsx("span", { className: cn("ml-auto text-xs tracking-widest opacity-60", className), ...props });
|
|
1665
1703
|
var Drawer = ({
|
|
@@ -1676,7 +1714,7 @@ Drawer.displayName = "Drawer";
|
|
|
1676
1714
|
var DrawerTrigger = vaul.Drawer.Trigger;
|
|
1677
1715
|
var DrawerPortal = vaul.Drawer.Portal;
|
|
1678
1716
|
var DrawerClose = vaul.Drawer.Close;
|
|
1679
|
-
var DrawerOverlay =
|
|
1717
|
+
var DrawerOverlay = React137__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1680
1718
|
vaul.Drawer.Overlay,
|
|
1681
1719
|
{
|
|
1682
1720
|
ref,
|
|
@@ -1685,7 +1723,7 @@ var DrawerOverlay = React136__namespace.forwardRef(({ className, ...props }, ref
|
|
|
1685
1723
|
}
|
|
1686
1724
|
));
|
|
1687
1725
|
DrawerOverlay.displayName = vaul.Drawer.Overlay.displayName;
|
|
1688
|
-
var DrawerContent =
|
|
1726
|
+
var DrawerContent = React137__namespace.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(DrawerPortal, { children: [
|
|
1689
1727
|
/* @__PURE__ */ jsxRuntime.jsx(DrawerOverlay, {}),
|
|
1690
1728
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
1691
1729
|
vaul.Drawer.Content,
|
|
@@ -1726,7 +1764,7 @@ var DrawerFooter = ({
|
|
|
1726
1764
|
}
|
|
1727
1765
|
);
|
|
1728
1766
|
DrawerFooter.displayName = "DrawerFooter";
|
|
1729
|
-
var DrawerTitle =
|
|
1767
|
+
var DrawerTitle = React137__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1730
1768
|
vaul.Drawer.Title,
|
|
1731
1769
|
{
|
|
1732
1770
|
ref,
|
|
@@ -1738,7 +1776,7 @@ var DrawerTitle = React136__namespace.forwardRef(({ className, ...props }, ref)
|
|
|
1738
1776
|
}
|
|
1739
1777
|
));
|
|
1740
1778
|
DrawerTitle.displayName = vaul.Drawer.Title.displayName;
|
|
1741
|
-
var DrawerDescription =
|
|
1779
|
+
var DrawerDescription = React137__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1742
1780
|
vaul.Drawer.Description,
|
|
1743
1781
|
{
|
|
1744
1782
|
ref,
|
|
@@ -1763,34 +1801,34 @@ var itemStyle2 = cn(
|
|
|
1763
1801
|
"focus:bg-[hsl(var(--accent))] focus:text-[hsl(var(--accent-foreground))]",
|
|
1764
1802
|
"data-[disabled]:pointer-events-none data-[disabled]:opacity-50"
|
|
1765
1803
|
);
|
|
1766
|
-
var DropdownMenuContent =
|
|
1804
|
+
var DropdownMenuContent = React137__namespace.default.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuPrimitive__namespace.Portal, { children: /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuPrimitive__namespace.Content, { ref, sideOffset, className: cn(contentStyle2, className), ...props }) }));
|
|
1767
1805
|
DropdownMenuContent.displayName = DropdownMenuPrimitive__namespace.Content.displayName;
|
|
1768
|
-
var DropdownMenuItem =
|
|
1806
|
+
var DropdownMenuItem = React137__namespace.default.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuPrimitive__namespace.Item, { ref, className: cn(itemStyle2, inset && "pl-8", className), ...props }));
|
|
1769
1807
|
DropdownMenuItem.displayName = DropdownMenuPrimitive__namespace.Item.displayName;
|
|
1770
|
-
var DropdownMenuCheckboxItem =
|
|
1808
|
+
var DropdownMenuCheckboxItem = React137__namespace.default.forwardRef(({ className, children, checked, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(DropdownMenuPrimitive__namespace.CheckboxItem, { ref, className: cn(itemStyle2, "pl-8", className), checked, ...props, children: [
|
|
1771
1809
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuPrimitive__namespace.ItemIndicator, { children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Check, { className: "h-4 w-4" }) }) }),
|
|
1772
1810
|
children
|
|
1773
1811
|
] }));
|
|
1774
1812
|
DropdownMenuCheckboxItem.displayName = DropdownMenuPrimitive__namespace.CheckboxItem.displayName;
|
|
1775
|
-
var DropdownMenuRadioItem =
|
|
1813
|
+
var DropdownMenuRadioItem = React137__namespace.default.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(DropdownMenuPrimitive__namespace.RadioItem, { ref, className: cn(itemStyle2, "pl-8", className), ...props, children: [
|
|
1776
1814
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuPrimitive__namespace.ItemIndicator, { children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Circle, { className: "h-2 w-2 fill-current" }) }) }),
|
|
1777
1815
|
children
|
|
1778
1816
|
] }));
|
|
1779
1817
|
DropdownMenuRadioItem.displayName = DropdownMenuPrimitive__namespace.RadioItem.displayName;
|
|
1780
|
-
var DropdownMenuLabel =
|
|
1818
|
+
var DropdownMenuLabel = React137__namespace.default.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuPrimitive__namespace.Label, { ref, className: cn("px-2 py-1.5 text-xs font-semibold text-[hsl(var(--muted-foreground))]", inset && "pl-8", className), ...props }));
|
|
1781
1819
|
DropdownMenuLabel.displayName = DropdownMenuPrimitive__namespace.Label.displayName;
|
|
1782
|
-
var DropdownMenuSeparator =
|
|
1820
|
+
var DropdownMenuSeparator = React137__namespace.default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuPrimitive__namespace.Separator, { ref, className: cn("-mx-1 my-1 h-px bg-[hsl(var(--muted))]", className), ...props }));
|
|
1783
1821
|
DropdownMenuSeparator.displayName = DropdownMenuPrimitive__namespace.Separator.displayName;
|
|
1784
|
-
var DropdownMenuSubTrigger =
|
|
1822
|
+
var DropdownMenuSubTrigger = React137__namespace.default.forwardRef(({ className, inset, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(DropdownMenuPrimitive__namespace.SubTrigger, { ref, className: cn(itemStyle2, inset && "pl-8", "data-[state=open]:bg-[hsl(var(--accent))]", className), ...props, children: [
|
|
1785
1823
|
children,
|
|
1786
1824
|
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronRight, { className: "ml-auto h-4 w-4" })
|
|
1787
1825
|
] }));
|
|
1788
1826
|
DropdownMenuSubTrigger.displayName = DropdownMenuPrimitive__namespace.SubTrigger.displayName;
|
|
1789
|
-
var DropdownMenuSubContent =
|
|
1827
|
+
var DropdownMenuSubContent = React137__namespace.default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuPrimitive__namespace.SubContent, { ref, className: cn(contentStyle2, className), ...props }));
|
|
1790
1828
|
DropdownMenuSubContent.displayName = DropdownMenuPrimitive__namespace.SubContent.displayName;
|
|
1791
1829
|
var DropdownMenuShortcut = ({ className, ...props }) => /* @__PURE__ */ jsxRuntime.jsx("span", { className: cn("ml-auto text-xs tracking-widest opacity-60", className), ...props });
|
|
1792
1830
|
DropdownMenuShortcut.displayName = "DropdownMenuShortcut";
|
|
1793
|
-
var EmptyCart =
|
|
1831
|
+
var EmptyCart = React137__namespace.default.forwardRef(
|
|
1794
1832
|
({
|
|
1795
1833
|
title = "Your cart is empty",
|
|
1796
1834
|
description = "Browse the catalog and add something you love.",
|
|
@@ -1821,7 +1859,7 @@ var EmptyCart = React136__namespace.default.forwardRef(
|
|
|
1821
1859
|
EmptyCart.displayName = "EmptyCart";
|
|
1822
1860
|
var HoverCard = HoverCardPrimitive__namespace.Root;
|
|
1823
1861
|
var HoverCardTrigger = HoverCardPrimitive__namespace.Trigger;
|
|
1824
|
-
var HoverCardContent =
|
|
1862
|
+
var HoverCardContent = React137__namespace.forwardRef(({ className, align = "center", sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1825
1863
|
HoverCardPrimitive__namespace.Content,
|
|
1826
1864
|
{
|
|
1827
1865
|
ref,
|
|
@@ -1835,7 +1873,7 @@ var HoverCardContent = React136__namespace.forwardRef(({ className, align = "cen
|
|
|
1835
1873
|
}
|
|
1836
1874
|
));
|
|
1837
1875
|
HoverCardContent.displayName = HoverCardPrimitive__namespace.Content.displayName;
|
|
1838
|
-
var InputOTP =
|
|
1876
|
+
var InputOTP = React137__namespace.forwardRef(({ className, containerClassName, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1839
1877
|
inputOtp.OTPInput,
|
|
1840
1878
|
{
|
|
1841
1879
|
ref,
|
|
@@ -1848,10 +1886,10 @@ var InputOTP = React136__namespace.forwardRef(({ className, containerClassName,
|
|
|
1848
1886
|
}
|
|
1849
1887
|
));
|
|
1850
1888
|
InputOTP.displayName = "InputOTP";
|
|
1851
|
-
var InputOTPGroup =
|
|
1889
|
+
var InputOTPGroup = React137__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("div", { ref, className: cn("flex items-center", className), ...props }));
|
|
1852
1890
|
InputOTPGroup.displayName = "InputOTPGroup";
|
|
1853
|
-
var InputOTPSlot =
|
|
1854
|
-
const inputOTPContext =
|
|
1891
|
+
var InputOTPSlot = React137__namespace.forwardRef(({ index, className, ...props }, ref) => {
|
|
1892
|
+
const inputOTPContext = React137__namespace.useContext(inputOtp.OTPInputContext);
|
|
1855
1893
|
const { char, hasFakeCaret, isActive } = inputOTPContext.slots[index];
|
|
1856
1894
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1857
1895
|
"div",
|
|
@@ -1871,9 +1909,9 @@ var InputOTPSlot = React136__namespace.forwardRef(({ index, className, ...props
|
|
|
1871
1909
|
);
|
|
1872
1910
|
});
|
|
1873
1911
|
InputOTPSlot.displayName = "InputOTPSlot";
|
|
1874
|
-
var InputOTPSeparator =
|
|
1912
|
+
var InputOTPSeparator = React137__namespace.forwardRef(({ ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("div", { ref, role: "separator", ...props, children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Minus, {}) }));
|
|
1875
1913
|
InputOTPSeparator.displayName = "InputOTPSeparator";
|
|
1876
|
-
var Input =
|
|
1914
|
+
var Input = React137__namespace.default.forwardRef(
|
|
1877
1915
|
({ className, type, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1878
1916
|
"input",
|
|
1879
1917
|
{
|
|
@@ -1895,7 +1933,7 @@ Input.displayName = "Input";
|
|
|
1895
1933
|
var labelVariants = classVarianceAuthority.cva(
|
|
1896
1934
|
"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"
|
|
1897
1935
|
);
|
|
1898
|
-
var Label3 =
|
|
1936
|
+
var Label3 = React137__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1899
1937
|
LabelPrimitive__namespace.Root,
|
|
1900
1938
|
{
|
|
1901
1939
|
ref,
|
|
@@ -1904,7 +1942,7 @@ var Label3 = React136__namespace.forwardRef(({ className, ...props }, ref) => /*
|
|
|
1904
1942
|
}
|
|
1905
1943
|
));
|
|
1906
1944
|
Label3.displayName = LabelPrimitive__namespace.Root.displayName;
|
|
1907
|
-
var LogoCarousel =
|
|
1945
|
+
var LogoCarousel = React137__namespace.default.forwardRef(
|
|
1908
1946
|
({
|
|
1909
1947
|
className,
|
|
1910
1948
|
logos,
|
|
@@ -1998,7 +2036,7 @@ var SPEED_DURATION = {
|
|
|
1998
2036
|
normal: "40s",
|
|
1999
2037
|
fast: "20s"
|
|
2000
2038
|
};
|
|
2001
|
-
var Marquee =
|
|
2039
|
+
var Marquee = React137__namespace.default.forwardRef(
|
|
2002
2040
|
({
|
|
2003
2041
|
children,
|
|
2004
2042
|
speed = "normal",
|
|
@@ -2062,7 +2100,7 @@ function MenubarSub({
|
|
|
2062
2100
|
}) {
|
|
2063
2101
|
return /* @__PURE__ */ jsxRuntime.jsx(MenubarPrimitive__namespace.Sub, { "data-slot": "menubar-sub", ...props });
|
|
2064
2102
|
}
|
|
2065
|
-
var Menubar =
|
|
2103
|
+
var Menubar = React137__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
2066
2104
|
MenubarPrimitive__namespace.Root,
|
|
2067
2105
|
{
|
|
2068
2106
|
ref,
|
|
@@ -2074,7 +2112,7 @@ var Menubar = React136__namespace.forwardRef(({ className, ...props }, ref) => /
|
|
|
2074
2112
|
}
|
|
2075
2113
|
));
|
|
2076
2114
|
Menubar.displayName = MenubarPrimitive__namespace.Root.displayName;
|
|
2077
|
-
var MenubarTrigger =
|
|
2115
|
+
var MenubarTrigger = React137__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
2078
2116
|
MenubarPrimitive__namespace.Trigger,
|
|
2079
2117
|
{
|
|
2080
2118
|
ref,
|
|
@@ -2086,7 +2124,7 @@ var MenubarTrigger = React136__namespace.forwardRef(({ className, ...props }, re
|
|
|
2086
2124
|
}
|
|
2087
2125
|
));
|
|
2088
2126
|
MenubarTrigger.displayName = MenubarPrimitive__namespace.Trigger.displayName;
|
|
2089
|
-
var MenubarSubTrigger =
|
|
2127
|
+
var MenubarSubTrigger = React137__namespace.forwardRef(({ className, inset, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2090
2128
|
MenubarPrimitive__namespace.SubTrigger,
|
|
2091
2129
|
{
|
|
2092
2130
|
ref,
|
|
@@ -2103,7 +2141,7 @@ var MenubarSubTrigger = React136__namespace.forwardRef(({ className, inset, chil
|
|
|
2103
2141
|
}
|
|
2104
2142
|
));
|
|
2105
2143
|
MenubarSubTrigger.displayName = MenubarPrimitive__namespace.SubTrigger.displayName;
|
|
2106
|
-
var MenubarSubContent =
|
|
2144
|
+
var MenubarSubContent = React137__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
2107
2145
|
MenubarPrimitive__namespace.SubContent,
|
|
2108
2146
|
{
|
|
2109
2147
|
ref,
|
|
@@ -2115,7 +2153,7 @@ var MenubarSubContent = React136__namespace.forwardRef(({ className, ...props },
|
|
|
2115
2153
|
}
|
|
2116
2154
|
));
|
|
2117
2155
|
MenubarSubContent.displayName = MenubarPrimitive__namespace.SubContent.displayName;
|
|
2118
|
-
var MenubarContent =
|
|
2156
|
+
var MenubarContent = React137__namespace.forwardRef(
|
|
2119
2157
|
({ className, align = "start", alignOffset = -4, sideOffset = 8, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(MenubarPrimitive__namespace.Portal, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2120
2158
|
MenubarPrimitive__namespace.Content,
|
|
2121
2159
|
{
|
|
@@ -2132,7 +2170,7 @@ var MenubarContent = React136__namespace.forwardRef(
|
|
|
2132
2170
|
) })
|
|
2133
2171
|
);
|
|
2134
2172
|
MenubarContent.displayName = MenubarPrimitive__namespace.Content.displayName;
|
|
2135
|
-
var MenubarItem =
|
|
2173
|
+
var MenubarItem = React137__namespace.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
2136
2174
|
MenubarPrimitive__namespace.Item,
|
|
2137
2175
|
{
|
|
2138
2176
|
ref,
|
|
@@ -2145,7 +2183,7 @@ var MenubarItem = React136__namespace.forwardRef(({ className, inset, ...props }
|
|
|
2145
2183
|
}
|
|
2146
2184
|
));
|
|
2147
2185
|
MenubarItem.displayName = MenubarPrimitive__namespace.Item.displayName;
|
|
2148
|
-
var MenubarCheckboxItem =
|
|
2186
|
+
var MenubarCheckboxItem = React137__namespace.forwardRef(({ className, children, checked, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2149
2187
|
MenubarPrimitive__namespace.CheckboxItem,
|
|
2150
2188
|
{
|
|
2151
2189
|
ref,
|
|
@@ -2162,7 +2200,7 @@ var MenubarCheckboxItem = React136__namespace.forwardRef(({ className, children,
|
|
|
2162
2200
|
}
|
|
2163
2201
|
));
|
|
2164
2202
|
MenubarCheckboxItem.displayName = MenubarPrimitive__namespace.CheckboxItem.displayName;
|
|
2165
|
-
var MenubarRadioItem =
|
|
2203
|
+
var MenubarRadioItem = React137__namespace.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2166
2204
|
MenubarPrimitive__namespace.RadioItem,
|
|
2167
2205
|
{
|
|
2168
2206
|
ref,
|
|
@@ -2178,7 +2216,7 @@ var MenubarRadioItem = React136__namespace.forwardRef(({ className, children, ..
|
|
|
2178
2216
|
}
|
|
2179
2217
|
));
|
|
2180
2218
|
MenubarRadioItem.displayName = MenubarPrimitive__namespace.RadioItem.displayName;
|
|
2181
|
-
var MenubarLabel =
|
|
2219
|
+
var MenubarLabel = React137__namespace.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
2182
2220
|
MenubarPrimitive__namespace.Label,
|
|
2183
2221
|
{
|
|
2184
2222
|
ref,
|
|
@@ -2191,7 +2229,7 @@ var MenubarLabel = React136__namespace.forwardRef(({ className, inset, ...props
|
|
|
2191
2229
|
}
|
|
2192
2230
|
));
|
|
2193
2231
|
MenubarLabel.displayName = MenubarPrimitive__namespace.Label.displayName;
|
|
2194
|
-
var MenubarSeparator =
|
|
2232
|
+
var MenubarSeparator = React137__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
2195
2233
|
MenubarPrimitive__namespace.Separator,
|
|
2196
2234
|
{
|
|
2197
2235
|
ref,
|
|
@@ -2216,7 +2254,7 @@ var MenubarShortcut = ({
|
|
|
2216
2254
|
);
|
|
2217
2255
|
};
|
|
2218
2256
|
MenubarShortcut.displayname = "MenubarShortcut";
|
|
2219
|
-
var NavigationMenu =
|
|
2257
|
+
var NavigationMenu = React137__namespace.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2220
2258
|
NavigationMenuPrimitive__namespace.Root,
|
|
2221
2259
|
{
|
|
2222
2260
|
ref,
|
|
@@ -2232,7 +2270,7 @@ var NavigationMenu = React136__namespace.forwardRef(({ className, children, ...p
|
|
|
2232
2270
|
}
|
|
2233
2271
|
));
|
|
2234
2272
|
NavigationMenu.displayName = NavigationMenuPrimitive__namespace.Root.displayName;
|
|
2235
|
-
var NavigationMenuList =
|
|
2273
|
+
var NavigationMenuList = React137__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
2236
2274
|
NavigationMenuPrimitive__namespace.List,
|
|
2237
2275
|
{
|
|
2238
2276
|
ref,
|
|
@@ -2248,7 +2286,7 @@ var NavigationMenuItem = NavigationMenuPrimitive__namespace.Item;
|
|
|
2248
2286
|
var navigationMenuTriggerStyle = classVarianceAuthority.cva(
|
|
2249
2287
|
"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"
|
|
2250
2288
|
);
|
|
2251
|
-
var NavigationMenuTrigger =
|
|
2289
|
+
var NavigationMenuTrigger = React137__namespace.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2252
2290
|
NavigationMenuPrimitive__namespace.Trigger,
|
|
2253
2291
|
{
|
|
2254
2292
|
ref,
|
|
@@ -2268,7 +2306,7 @@ var NavigationMenuTrigger = React136__namespace.forwardRef(({ className, childre
|
|
|
2268
2306
|
}
|
|
2269
2307
|
));
|
|
2270
2308
|
NavigationMenuTrigger.displayName = NavigationMenuPrimitive__namespace.Trigger.displayName;
|
|
2271
|
-
var NavigationMenuContent =
|
|
2309
|
+
var NavigationMenuContent = React137__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
2272
2310
|
NavigationMenuPrimitive__namespace.Content,
|
|
2273
2311
|
{
|
|
2274
2312
|
ref,
|
|
@@ -2281,7 +2319,7 @@ var NavigationMenuContent = React136__namespace.forwardRef(({ className, ...prop
|
|
|
2281
2319
|
));
|
|
2282
2320
|
NavigationMenuContent.displayName = NavigationMenuPrimitive__namespace.Content.displayName;
|
|
2283
2321
|
var NavigationMenuLink = NavigationMenuPrimitive__namespace.Link;
|
|
2284
|
-
var NavigationMenuViewport =
|
|
2322
|
+
var NavigationMenuViewport = React137__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("absolute left-0 top-full flex justify-center"), children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2285
2323
|
NavigationMenuPrimitive__namespace.Viewport,
|
|
2286
2324
|
{
|
|
2287
2325
|
className: cn(
|
|
@@ -2293,7 +2331,7 @@ var NavigationMenuViewport = React136__namespace.forwardRef(({ className, ...pro
|
|
|
2293
2331
|
}
|
|
2294
2332
|
) }));
|
|
2295
2333
|
NavigationMenuViewport.displayName = NavigationMenuPrimitive__namespace.Viewport.displayName;
|
|
2296
|
-
var NavigationMenuIndicator =
|
|
2334
|
+
var NavigationMenuIndicator = React137__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
2297
2335
|
NavigationMenuPrimitive__namespace.Indicator,
|
|
2298
2336
|
{
|
|
2299
2337
|
ref,
|
|
@@ -2316,7 +2354,7 @@ var Pagination = ({ className, ...props }) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
|
2316
2354
|
}
|
|
2317
2355
|
);
|
|
2318
2356
|
Pagination.displayName = "Pagination";
|
|
2319
|
-
var PaginationContent =
|
|
2357
|
+
var PaginationContent = React137__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
2320
2358
|
"ul",
|
|
2321
2359
|
{
|
|
2322
2360
|
ref,
|
|
@@ -2325,7 +2363,7 @@ var PaginationContent = React136__namespace.forwardRef(({ className, ...props },
|
|
|
2325
2363
|
}
|
|
2326
2364
|
));
|
|
2327
2365
|
PaginationContent.displayName = "PaginationContent";
|
|
2328
|
-
var PaginationItem =
|
|
2366
|
+
var PaginationItem = React137__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("li", { ref, className: cn("", className), ...props }));
|
|
2329
2367
|
PaginationItem.displayName = "PaginationItem";
|
|
2330
2368
|
var PaginationLink = ({
|
|
2331
2369
|
className,
|
|
@@ -2400,7 +2438,7 @@ PaginationEllipsis.displayName = "PaginationEllipsis";
|
|
|
2400
2438
|
var Popover = PopoverPrimitive__namespace.Root;
|
|
2401
2439
|
var PopoverTrigger = PopoverPrimitive__namespace.Trigger;
|
|
2402
2440
|
var PopoverAnchor = PopoverPrimitive__namespace.Anchor;
|
|
2403
|
-
var PopoverContent =
|
|
2441
|
+
var PopoverContent = React137__namespace.default.forwardRef(({ className, align = "center", sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(PopoverPrimitive__namespace.Portal, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2404
2442
|
PopoverPrimitive__namespace.Content,
|
|
2405
2443
|
{
|
|
2406
2444
|
ref,
|
|
@@ -2417,7 +2455,7 @@ var PopoverContent = React136__namespace.default.forwardRef(({ className, align
|
|
|
2417
2455
|
}
|
|
2418
2456
|
) }));
|
|
2419
2457
|
PopoverContent.displayName = PopoverPrimitive__namespace.Content.displayName;
|
|
2420
|
-
var Progress =
|
|
2458
|
+
var Progress = React137__namespace.default.forwardRef(({ className, value, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
2421
2459
|
ProgressPrimitive__namespace.Root,
|
|
2422
2460
|
{
|
|
2423
2461
|
ref,
|
|
@@ -2433,7 +2471,7 @@ var Progress = React136__namespace.default.forwardRef(({ className, value, ...pr
|
|
|
2433
2471
|
}
|
|
2434
2472
|
));
|
|
2435
2473
|
Progress.displayName = ProgressPrimitive__namespace.Root.displayName;
|
|
2436
|
-
var QrCode =
|
|
2474
|
+
var QrCode = React137__namespace.default.forwardRef(
|
|
2437
2475
|
({
|
|
2438
2476
|
value,
|
|
2439
2477
|
size = 192,
|
|
@@ -2490,9 +2528,9 @@ var QrCode = React136__namespace.default.forwardRef(
|
|
|
2490
2528
|
}
|
|
2491
2529
|
);
|
|
2492
2530
|
QrCode.displayName = "QrCode";
|
|
2493
|
-
var RadioGroup4 =
|
|
2531
|
+
var RadioGroup4 = React137__namespace.default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(RadioGroupPrimitive__namespace.Root, { className: cn("grid gap-2", className), ref, ...props }));
|
|
2494
2532
|
RadioGroup4.displayName = RadioGroupPrimitive__namespace.Root.displayName;
|
|
2495
|
-
var RadioGroupItem =
|
|
2533
|
+
var RadioGroupItem = React137__namespace.default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
2496
2534
|
RadioGroupPrimitive__namespace.Item,
|
|
2497
2535
|
{
|
|
2498
2536
|
ref,
|
|
@@ -2512,7 +2550,7 @@ var SIZE2 = {
|
|
|
2512
2550
|
md: "h-5 w-5",
|
|
2513
2551
|
lg: "h-6 w-6"
|
|
2514
2552
|
};
|
|
2515
|
-
var Rating =
|
|
2553
|
+
var Rating = React137__namespace.default.forwardRef(
|
|
2516
2554
|
({
|
|
2517
2555
|
value: valueProp,
|
|
2518
2556
|
defaultValue = 0,
|
|
@@ -2528,10 +2566,10 @@ var Rating = React136__namespace.default.forwardRef(
|
|
|
2528
2566
|
...props
|
|
2529
2567
|
}, ref) => {
|
|
2530
2568
|
const isControlled = valueProp !== void 0;
|
|
2531
|
-
const [internal, setInternal] =
|
|
2569
|
+
const [internal, setInternal] = React137__namespace.default.useState(defaultValue);
|
|
2532
2570
|
const value = isControlled ? valueProp : internal;
|
|
2533
2571
|
const step = allowHalf ? 0.5 : 1;
|
|
2534
|
-
const commit =
|
|
2572
|
+
const commit = React137__namespace.default.useCallback(
|
|
2535
2573
|
(next) => {
|
|
2536
2574
|
const clamped = Math.max(0, Math.min(max, next));
|
|
2537
2575
|
if (!isControlled) setInternal(clamped);
|
|
@@ -2645,7 +2683,7 @@ var ResizableHandle = ({
|
|
|
2645
2683
|
children: withHandle && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "z-10 flex h-4 w-3 items-center justify-center rounded-sm border bg-border", children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.GripVertical, { className: "h-2.5 w-2.5" }) })
|
|
2646
2684
|
}
|
|
2647
2685
|
);
|
|
2648
|
-
var ScrollArea =
|
|
2686
|
+
var ScrollArea = React137__namespace.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2649
2687
|
ScrollAreaPrimitive__namespace.Root,
|
|
2650
2688
|
{
|
|
2651
2689
|
ref,
|
|
@@ -2659,7 +2697,7 @@ var ScrollArea = React136__namespace.forwardRef(({ className, children, ...props
|
|
|
2659
2697
|
}
|
|
2660
2698
|
));
|
|
2661
2699
|
ScrollArea.displayName = ScrollAreaPrimitive__namespace.Root.displayName;
|
|
2662
|
-
var ScrollBar =
|
|
2700
|
+
var ScrollBar = React137__namespace.forwardRef(({ className, orientation = "vertical", ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
2663
2701
|
ScrollAreaPrimitive__namespace.ScrollAreaScrollbar,
|
|
2664
2702
|
{
|
|
2665
2703
|
ref,
|
|
@@ -2678,7 +2716,7 @@ ScrollBar.displayName = ScrollAreaPrimitive__namespace.ScrollAreaScrollbar.displ
|
|
|
2678
2716
|
var Select = SelectPrimitive__namespace.Root;
|
|
2679
2717
|
var SelectGroup = SelectPrimitive__namespace.Group;
|
|
2680
2718
|
var SelectValue = SelectPrimitive__namespace.Value;
|
|
2681
|
-
var SelectTrigger =
|
|
2719
|
+
var SelectTrigger = React137__namespace.default.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2682
2720
|
SelectPrimitive__namespace.Trigger,
|
|
2683
2721
|
{
|
|
2684
2722
|
ref,
|
|
@@ -2698,7 +2736,7 @@ var SelectTrigger = React136__namespace.default.forwardRef(({ className, childre
|
|
|
2698
2736
|
}
|
|
2699
2737
|
));
|
|
2700
2738
|
SelectTrigger.displayName = SelectPrimitive__namespace.Trigger.displayName;
|
|
2701
|
-
var SelectScrollUpButton =
|
|
2739
|
+
var SelectScrollUpButton = React137__namespace.default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
2702
2740
|
SelectPrimitive__namespace.ScrollUpButton,
|
|
2703
2741
|
{
|
|
2704
2742
|
ref,
|
|
@@ -2708,7 +2746,7 @@ var SelectScrollUpButton = React136__namespace.default.forwardRef(({ className,
|
|
|
2708
2746
|
}
|
|
2709
2747
|
));
|
|
2710
2748
|
SelectScrollUpButton.displayName = SelectPrimitive__namespace.ScrollUpButton.displayName;
|
|
2711
|
-
var SelectScrollDownButton =
|
|
2749
|
+
var SelectScrollDownButton = React137__namespace.default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
2712
2750
|
SelectPrimitive__namespace.ScrollDownButton,
|
|
2713
2751
|
{
|
|
2714
2752
|
ref,
|
|
@@ -2718,7 +2756,7 @@ var SelectScrollDownButton = React136__namespace.default.forwardRef(({ className
|
|
|
2718
2756
|
}
|
|
2719
2757
|
));
|
|
2720
2758
|
SelectScrollDownButton.displayName = SelectPrimitive__namespace.ScrollDownButton.displayName;
|
|
2721
|
-
var SelectContent =
|
|
2759
|
+
var SelectContent = React137__namespace.default.forwardRef(({ className, children, position = "popper", ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(SelectPrimitive__namespace.Portal, { children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2722
2760
|
SelectPrimitive__namespace.Content,
|
|
2723
2761
|
{
|
|
2724
2762
|
ref,
|
|
@@ -2745,7 +2783,7 @@ var SelectContent = React136__namespace.default.forwardRef(({ className, childre
|
|
|
2745
2783
|
}
|
|
2746
2784
|
) }));
|
|
2747
2785
|
SelectContent.displayName = SelectPrimitive__namespace.Content.displayName;
|
|
2748
|
-
var SelectLabel =
|
|
2786
|
+
var SelectLabel = React137__namespace.default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
2749
2787
|
SelectPrimitive__namespace.Label,
|
|
2750
2788
|
{
|
|
2751
2789
|
ref,
|
|
@@ -2754,7 +2792,7 @@ var SelectLabel = React136__namespace.default.forwardRef(({ className, ...props
|
|
|
2754
2792
|
}
|
|
2755
2793
|
));
|
|
2756
2794
|
SelectLabel.displayName = SelectPrimitive__namespace.Label.displayName;
|
|
2757
|
-
var SelectItem =
|
|
2795
|
+
var SelectItem = React137__namespace.default.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2758
2796
|
SelectPrimitive__namespace.Item,
|
|
2759
2797
|
{
|
|
2760
2798
|
ref,
|
|
@@ -2772,7 +2810,7 @@ var SelectItem = React136__namespace.default.forwardRef(({ className, children,
|
|
|
2772
2810
|
}
|
|
2773
2811
|
));
|
|
2774
2812
|
SelectItem.displayName = SelectPrimitive__namespace.Item.displayName;
|
|
2775
|
-
var SelectSeparator =
|
|
2813
|
+
var SelectSeparator = React137__namespace.default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
2776
2814
|
SelectPrimitive__namespace.Separator,
|
|
2777
2815
|
{
|
|
2778
2816
|
ref,
|
|
@@ -2781,7 +2819,7 @@ var SelectSeparator = React136__namespace.default.forwardRef(({ className, ...pr
|
|
|
2781
2819
|
}
|
|
2782
2820
|
));
|
|
2783
2821
|
SelectSeparator.displayName = SelectPrimitive__namespace.Separator.displayName;
|
|
2784
|
-
var Separator6 =
|
|
2822
|
+
var Separator6 = React137__namespace.default.forwardRef(({ className, orientation = "horizontal", decorative = true, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
2785
2823
|
SeparatorPrimitive__namespace.Root,
|
|
2786
2824
|
{
|
|
2787
2825
|
ref,
|
|
@@ -2800,7 +2838,7 @@ var Sheet = DialogPrimitive__namespace.Root;
|
|
|
2800
2838
|
var SheetTrigger = DialogPrimitive__namespace.Trigger;
|
|
2801
2839
|
var SheetClose = DialogPrimitive__namespace.Close;
|
|
2802
2840
|
var SheetPortal = DialogPrimitive__namespace.Portal;
|
|
2803
|
-
var SheetOverlay =
|
|
2841
|
+
var SheetOverlay = React137__namespace.default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
2804
2842
|
DialogPrimitive__namespace.Overlay,
|
|
2805
2843
|
{
|
|
2806
2844
|
ref,
|
|
@@ -2828,7 +2866,7 @@ var sheetVariants = classVarianceAuthority.cva(
|
|
|
2828
2866
|
defaultVariants: { side: "right" }
|
|
2829
2867
|
}
|
|
2830
2868
|
);
|
|
2831
|
-
var SheetContent =
|
|
2869
|
+
var SheetContent = React137__namespace.default.forwardRef(({ side = "right", className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(SheetPortal, { children: [
|
|
2832
2870
|
/* @__PURE__ */ jsxRuntime.jsx(SheetOverlay, {}),
|
|
2833
2871
|
/* @__PURE__ */ jsxRuntime.jsxs(DialogPrimitive__namespace.Content, { ref, className: cn(sheetVariants({ side }), className), ...props, children: [
|
|
2834
2872
|
/* @__PURE__ */ jsxRuntime.jsxs(DialogPrimitive__namespace.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: [
|
|
@@ -2841,9 +2879,9 @@ var SheetContent = React136__namespace.default.forwardRef(({ side = "right", cla
|
|
|
2841
2879
|
SheetContent.displayName = DialogPrimitive__namespace.Content.displayName;
|
|
2842
2880
|
var SheetHeader = ({ className, ...props }) => /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("flex flex-col space-y-2 text-center sm:text-left", className), ...props });
|
|
2843
2881
|
var SheetFooter = ({ className, ...props }) => /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2", className), ...props });
|
|
2844
|
-
var SheetTitle =
|
|
2882
|
+
var SheetTitle = React137__namespace.default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(DialogPrimitive__namespace.Title, { ref, className: cn("text-lg font-semibold", className), ...props }));
|
|
2845
2883
|
SheetTitle.displayName = DialogPrimitive__namespace.Title.displayName;
|
|
2846
|
-
var SheetDescription =
|
|
2884
|
+
var SheetDescription = React137__namespace.default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(DialogPrimitive__namespace.Description, { ref, className: cn("text-sm text-[hsl(var(--muted-foreground))]", className), ...props }));
|
|
2847
2885
|
SheetDescription.displayName = DialogPrimitive__namespace.Description.displayName;
|
|
2848
2886
|
function Skeleton({ className, ...props }) {
|
|
2849
2887
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -2854,7 +2892,7 @@ function Skeleton({ className, ...props }) {
|
|
|
2854
2892
|
}
|
|
2855
2893
|
);
|
|
2856
2894
|
}
|
|
2857
|
-
var Slider =
|
|
2895
|
+
var Slider = React137__namespace.default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2858
2896
|
SliderPrimitive__namespace.Root,
|
|
2859
2897
|
{
|
|
2860
2898
|
ref,
|
|
@@ -2878,7 +2916,7 @@ function Spinner({ className, ...props }) {
|
|
|
2878
2916
|
}
|
|
2879
2917
|
);
|
|
2880
2918
|
}
|
|
2881
|
-
var Switch =
|
|
2919
|
+
var Switch = React137__namespace.default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
2882
2920
|
SwitchPrimitive__namespace.Root,
|
|
2883
2921
|
{
|
|
2884
2922
|
ref,
|
|
@@ -2904,7 +2942,7 @@ var Switch = React136__namespace.default.forwardRef(({ className, ...props }, re
|
|
|
2904
2942
|
}
|
|
2905
2943
|
));
|
|
2906
2944
|
Switch.displayName = SwitchPrimitive__namespace.Root.displayName;
|
|
2907
|
-
var Table =
|
|
2945
|
+
var Table = React137__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("div", { className: "relative w-full overflow-auto", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2908
2946
|
"table",
|
|
2909
2947
|
{
|
|
2910
2948
|
ref,
|
|
@@ -2913,9 +2951,9 @@ var Table = React136__namespace.forwardRef(({ className, ...props }, ref) => /*
|
|
|
2913
2951
|
}
|
|
2914
2952
|
) }));
|
|
2915
2953
|
Table.displayName = "Table";
|
|
2916
|
-
var TableHeader =
|
|
2954
|
+
var TableHeader = React137__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("thead", { ref, className: cn("[&_tr]:border-b", className), ...props }));
|
|
2917
2955
|
TableHeader.displayName = "TableHeader";
|
|
2918
|
-
var TableBody =
|
|
2956
|
+
var TableBody = React137__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
2919
2957
|
"tbody",
|
|
2920
2958
|
{
|
|
2921
2959
|
ref,
|
|
@@ -2924,7 +2962,7 @@ var TableBody = React136__namespace.forwardRef(({ className, ...props }, ref) =>
|
|
|
2924
2962
|
}
|
|
2925
2963
|
));
|
|
2926
2964
|
TableBody.displayName = "TableBody";
|
|
2927
|
-
var TableFooter =
|
|
2965
|
+
var TableFooter = React137__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
2928
2966
|
"tfoot",
|
|
2929
2967
|
{
|
|
2930
2968
|
ref,
|
|
@@ -2936,7 +2974,7 @@ var TableFooter = React136__namespace.forwardRef(({ className, ...props }, ref)
|
|
|
2936
2974
|
}
|
|
2937
2975
|
));
|
|
2938
2976
|
TableFooter.displayName = "TableFooter";
|
|
2939
|
-
var TableRow =
|
|
2977
|
+
var TableRow = React137__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
2940
2978
|
"tr",
|
|
2941
2979
|
{
|
|
2942
2980
|
ref,
|
|
@@ -2948,7 +2986,7 @@ var TableRow = React136__namespace.forwardRef(({ className, ...props }, ref) =>
|
|
|
2948
2986
|
}
|
|
2949
2987
|
));
|
|
2950
2988
|
TableRow.displayName = "TableRow";
|
|
2951
|
-
var TableHead =
|
|
2989
|
+
var TableHead = React137__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
2952
2990
|
"th",
|
|
2953
2991
|
{
|
|
2954
2992
|
ref,
|
|
@@ -2960,7 +2998,7 @@ var TableHead = React136__namespace.forwardRef(({ className, ...props }, ref) =>
|
|
|
2960
2998
|
}
|
|
2961
2999
|
));
|
|
2962
3000
|
TableHead.displayName = "TableHead";
|
|
2963
|
-
var TableCell =
|
|
3001
|
+
var TableCell = React137__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
2964
3002
|
"td",
|
|
2965
3003
|
{
|
|
2966
3004
|
ref,
|
|
@@ -2972,7 +3010,7 @@ var TableCell = React136__namespace.forwardRef(({ className, ...props }, ref) =>
|
|
|
2972
3010
|
}
|
|
2973
3011
|
));
|
|
2974
3012
|
TableCell.displayName = "TableCell";
|
|
2975
|
-
var TableCaption =
|
|
3013
|
+
var TableCaption = React137__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
2976
3014
|
"caption",
|
|
2977
3015
|
{
|
|
2978
3016
|
ref,
|
|
@@ -2982,7 +3020,7 @@ var TableCaption = React136__namespace.forwardRef(({ className, ...props }, ref)
|
|
|
2982
3020
|
));
|
|
2983
3021
|
TableCaption.displayName = "TableCaption";
|
|
2984
3022
|
var Tabs = TabsPrimitive__namespace.Root;
|
|
2985
|
-
var TabsList =
|
|
3023
|
+
var TabsList = React137__namespace.default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
2986
3024
|
TabsPrimitive__namespace.List,
|
|
2987
3025
|
{
|
|
2988
3026
|
ref,
|
|
@@ -2994,7 +3032,7 @@ var TabsList = React136__namespace.default.forwardRef(({ className, ...props },
|
|
|
2994
3032
|
}
|
|
2995
3033
|
));
|
|
2996
3034
|
TabsList.displayName = TabsPrimitive__namespace.List.displayName;
|
|
2997
|
-
var TabsTrigger =
|
|
3035
|
+
var TabsTrigger = React137__namespace.default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
2998
3036
|
TabsPrimitive__namespace.Trigger,
|
|
2999
3037
|
{
|
|
3000
3038
|
ref,
|
|
@@ -3009,7 +3047,7 @@ var TabsTrigger = React136__namespace.default.forwardRef(({ className, ...props
|
|
|
3009
3047
|
}
|
|
3010
3048
|
));
|
|
3011
3049
|
TabsTrigger.displayName = TabsPrimitive__namespace.Trigger.displayName;
|
|
3012
|
-
var TabsContent =
|
|
3050
|
+
var TabsContent = React137__namespace.default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
3013
3051
|
TabsPrimitive__namespace.Content,
|
|
3014
3052
|
{
|
|
3015
3053
|
ref,
|
|
@@ -3021,7 +3059,7 @@ var TabsContent = React136__namespace.default.forwardRef(({ className, ...props
|
|
|
3021
3059
|
}
|
|
3022
3060
|
));
|
|
3023
3061
|
TabsContent.displayName = TabsPrimitive__namespace.Content.displayName;
|
|
3024
|
-
var Textarea =
|
|
3062
|
+
var Textarea = React137__namespace.default.forwardRef(
|
|
3025
3063
|
({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
3026
3064
|
"textarea",
|
|
3027
3065
|
{
|
|
@@ -3039,7 +3077,7 @@ var Textarea = React136__namespace.default.forwardRef(
|
|
|
3039
3077
|
)
|
|
3040
3078
|
);
|
|
3041
3079
|
Textarea.displayName = "Textarea";
|
|
3042
|
-
var TextureCard =
|
|
3080
|
+
var TextureCard = React137__namespace.forwardRef(
|
|
3043
3081
|
({ children, className, padding = true, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
3044
3082
|
"div",
|
|
3045
3083
|
{
|
|
@@ -3056,15 +3094,15 @@ var TextureCard = React136__namespace.forwardRef(
|
|
|
3056
3094
|
)
|
|
3057
3095
|
);
|
|
3058
3096
|
TextureCard.displayName = "TextureCard";
|
|
3059
|
-
var TextureCardHeader =
|
|
3097
|
+
var TextureCardHeader = React137__namespace.forwardRef(
|
|
3060
3098
|
({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("div", { ref, className: cn("flex flex-col gap-1.5 mb-4", className), ...props })
|
|
3061
3099
|
);
|
|
3062
3100
|
TextureCardHeader.displayName = "TextureCardHeader";
|
|
3063
|
-
var TextureCardTitle =
|
|
3101
|
+
var TextureCardTitle = React137__namespace.forwardRef(
|
|
3064
3102
|
({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("h3", { ref, className: cn("font-semibold text-base leading-tight tracking-tight text-foreground", className), ...props })
|
|
3065
3103
|
);
|
|
3066
3104
|
TextureCardTitle.displayName = "TextureCardTitle";
|
|
3067
|
-
var TextureCardDescription =
|
|
3105
|
+
var TextureCardDescription = React137__namespace.forwardRef(
|
|
3068
3106
|
({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("p", { ref, className: cn("text-sm text-muted-foreground", className), ...props })
|
|
3069
3107
|
);
|
|
3070
3108
|
TextureCardDescription.displayName = "TextureCardDescription";
|
|
@@ -3088,7 +3126,7 @@ var toggleVariants = classVarianceAuthority.cva(
|
|
|
3088
3126
|
}
|
|
3089
3127
|
}
|
|
3090
3128
|
);
|
|
3091
|
-
var Toggle =
|
|
3129
|
+
var Toggle = React137__namespace.forwardRef(({ className, variant, size, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
3092
3130
|
TogglePrimitive__namespace.Root,
|
|
3093
3131
|
{
|
|
3094
3132
|
ref,
|
|
@@ -3097,11 +3135,11 @@ var Toggle = React136__namespace.forwardRef(({ className, variant, size, ...prop
|
|
|
3097
3135
|
}
|
|
3098
3136
|
));
|
|
3099
3137
|
Toggle.displayName = TogglePrimitive__namespace.Root.displayName;
|
|
3100
|
-
var ToggleGroupContext =
|
|
3138
|
+
var ToggleGroupContext = React137__namespace.createContext({
|
|
3101
3139
|
size: "default",
|
|
3102
3140
|
variant: "default"
|
|
3103
3141
|
});
|
|
3104
|
-
var ToggleGroup =
|
|
3142
|
+
var ToggleGroup = React137__namespace.forwardRef(({ className, variant, size, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
3105
3143
|
ToggleGroupPrimitive__namespace.Root,
|
|
3106
3144
|
{
|
|
3107
3145
|
ref,
|
|
@@ -3111,8 +3149,8 @@ var ToggleGroup = React136__namespace.forwardRef(({ className, variant, size, ch
|
|
|
3111
3149
|
}
|
|
3112
3150
|
));
|
|
3113
3151
|
ToggleGroup.displayName = ToggleGroupPrimitive__namespace.Root.displayName;
|
|
3114
|
-
var ToggleGroupItem =
|
|
3115
|
-
const context =
|
|
3152
|
+
var ToggleGroupItem = React137__namespace.forwardRef(({ className, children, variant, size, ...props }, ref) => {
|
|
3153
|
+
const context = React137__namespace.useContext(ToggleGroupContext);
|
|
3116
3154
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3117
3155
|
ToggleGroupPrimitive__namespace.Item,
|
|
3118
3156
|
{
|
|
@@ -3133,7 +3171,7 @@ ToggleGroupItem.displayName = ToggleGroupPrimitive__namespace.Item.displayName;
|
|
|
3133
3171
|
var TooltipProvider = TooltipPrimitive__namespace.Provider;
|
|
3134
3172
|
var Tooltip2 = TooltipPrimitive__namespace.Root;
|
|
3135
3173
|
var TooltipTrigger = TooltipPrimitive__namespace.Trigger;
|
|
3136
|
-
var TooltipContent =
|
|
3174
|
+
var TooltipContent = React137__namespace.default.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(TooltipPrimitive__namespace.Portal, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
3137
3175
|
TooltipPrimitive__namespace.Content,
|
|
3138
3176
|
{
|
|
3139
3177
|
ref,
|
|
@@ -3149,10 +3187,10 @@ var TooltipContent = React136__namespace.default.forwardRef(({ className, sideOf
|
|
|
3149
3187
|
}
|
|
3150
3188
|
) }));
|
|
3151
3189
|
TooltipContent.displayName = TooltipPrimitive__namespace.Content.displayName;
|
|
3152
|
-
var VariantPicker =
|
|
3190
|
+
var VariantPicker = React137__namespace.default.forwardRef(
|
|
3153
3191
|
({ label, options, value: valueProp, defaultValue, onValueChange, className, ...props }, ref) => {
|
|
3154
3192
|
const isControlled = valueProp !== void 0;
|
|
3155
|
-
const [internal, setInternal] =
|
|
3193
|
+
const [internal, setInternal] = React137__namespace.default.useState(defaultValue);
|
|
3156
3194
|
const value = isControlled ? valueProp : internal;
|
|
3157
3195
|
const select = (v) => {
|
|
3158
3196
|
if (!isControlled) setInternal(v);
|
|
@@ -3291,8 +3329,8 @@ function Banner({
|
|
|
3291
3329
|
className,
|
|
3292
3330
|
children
|
|
3293
3331
|
}) {
|
|
3294
|
-
const [dismissed, setDismissed] =
|
|
3295
|
-
const [exiting, setExiting] =
|
|
3332
|
+
const [dismissed, setDismissed] = React137__namespace.default.useState(false);
|
|
3333
|
+
const [exiting, setExiting] = React137__namespace.default.useState(false);
|
|
3296
3334
|
const handleDismiss = () => {
|
|
3297
3335
|
setExiting(true);
|
|
3298
3336
|
setTimeout(() => {
|
|
@@ -3353,7 +3391,7 @@ function BreadcrumbSeparator({ className }) {
|
|
|
3353
3391
|
return /* @__PURE__ */ jsxRuntime.jsx("li", { role: "presentation", "aria-hidden": "true", className: cn("flex items-center text-[hsl(var(--muted-foreground))]", className), children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronRight, { className: "h-3.5 w-3.5" }) });
|
|
3354
3392
|
}
|
|
3355
3393
|
function Breadcrumb({ children, className }) {
|
|
3356
|
-
const items =
|
|
3394
|
+
const items = React137__namespace.default.Children.toArray(children);
|
|
3357
3395
|
const withSeparators = [];
|
|
3358
3396
|
items.forEach((item, i) => {
|
|
3359
3397
|
withSeparators.push(item);
|
|
@@ -3383,8 +3421,8 @@ function CommandItem2({ icon, label, description, shortcut, active, onClick, cla
|
|
|
3383
3421
|
);
|
|
3384
3422
|
}
|
|
3385
3423
|
function EditableCell({ value: initial, onSave }) {
|
|
3386
|
-
const [editing, setEditing] =
|
|
3387
|
-
const [val, setVal] =
|
|
3424
|
+
const [editing, setEditing] = React137__namespace.default.useState(false);
|
|
3425
|
+
const [val, setVal] = React137__namespace.default.useState(String(initial ?? ""));
|
|
3388
3426
|
const commit = () => {
|
|
3389
3427
|
onSave(val);
|
|
3390
3428
|
setEditing(false);
|
|
@@ -3415,10 +3453,10 @@ var selectionCol = () => ({
|
|
|
3415
3453
|
enableResizing: false
|
|
3416
3454
|
});
|
|
3417
3455
|
function DataGrid({ columns, data: initialData, onDataChange, editable, className }) {
|
|
3418
|
-
const [data, setData] =
|
|
3419
|
-
const [rowSelection, setRowSelection] =
|
|
3456
|
+
const [data, setData] = React137__namespace.default.useState(initialData);
|
|
3457
|
+
const [rowSelection, setRowSelection] = React137__namespace.default.useState({});
|
|
3420
3458
|
const columnResizeMode = "onChange";
|
|
3421
|
-
const editableColumns =
|
|
3459
|
+
const editableColumns = React137__namespace.default.useMemo(() => {
|
|
3422
3460
|
if (!editable) return columns;
|
|
3423
3461
|
return columns.map((col) => ({
|
|
3424
3462
|
...col,
|
|
@@ -3437,7 +3475,7 @@ function DataGrid({ columns, data: initialData, onDataChange, editable, classNam
|
|
|
3437
3475
|
)
|
|
3438
3476
|
}));
|
|
3439
3477
|
}, [columns, data, editable, onDataChange]);
|
|
3440
|
-
const allColumns =
|
|
3478
|
+
const allColumns = React137__namespace.default.useMemo(() => [selectionCol(), ...editableColumns], [editableColumns]);
|
|
3441
3479
|
const table = reactTable.useReactTable({
|
|
3442
3480
|
data,
|
|
3443
3481
|
columns: allColumns,
|
|
@@ -3508,7 +3546,7 @@ function DataTableToolbar({ table, searchColumn }) {
|
|
|
3508
3546
|
) });
|
|
3509
3547
|
}
|
|
3510
3548
|
function DataTable({ columns, data, pageSize = 10, searchable, searchColumn, loading }) {
|
|
3511
|
-
const [sorting, setSorting] =
|
|
3549
|
+
const [sorting, setSorting] = React137__namespace.default.useState([]);
|
|
3512
3550
|
const table = reactTable.useReactTable({
|
|
3513
3551
|
data,
|
|
3514
3552
|
columns,
|
|
@@ -3533,7 +3571,7 @@ function DataTable({ columns, data, pageSize = 10, searchable, searchColumn, loa
|
|
|
3533
3571
|
/* @__PURE__ */ jsxRuntime.jsx(DataTablePagination, { table })
|
|
3534
3572
|
] });
|
|
3535
3573
|
}
|
|
3536
|
-
var EmptyStateIcon =
|
|
3574
|
+
var EmptyStateIcon = React137__namespace.default.forwardRef(
|
|
3537
3575
|
({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.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 })
|
|
3538
3576
|
);
|
|
3539
3577
|
EmptyStateIcon.displayName = "EmptyStateIcon";
|
|
@@ -3648,7 +3686,7 @@ function Persona({ name, subtitle, src, size = "md", badge, className }) {
|
|
|
3648
3686
|
] })
|
|
3649
3687
|
] });
|
|
3650
3688
|
}
|
|
3651
|
-
var PropertyList =
|
|
3689
|
+
var PropertyList = React137__namespace.default.forwardRef(
|
|
3652
3690
|
({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("dl", { ref, className: cn("divide-y divide-[hsl(var(--border))]", className), ...props })
|
|
3653
3691
|
);
|
|
3654
3692
|
PropertyList.displayName = "PropertyList";
|
|
@@ -3734,7 +3772,7 @@ function StructuredListItem({ left, title, description, right, onClick, classNam
|
|
|
3734
3772
|
}
|
|
3735
3773
|
);
|
|
3736
3774
|
}
|
|
3737
|
-
var StructuredList =
|
|
3775
|
+
var StructuredList = React137__namespace.default.forwardRef(
|
|
3738
3776
|
({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("div", { ref, className: cn("space-y-4", className), ...props })
|
|
3739
3777
|
);
|
|
3740
3778
|
StructuredList.displayName = "StructuredList";
|
|
@@ -3744,7 +3782,7 @@ var dotColors = {
|
|
|
3744
3782
|
error: "bg-red-500",
|
|
3745
3783
|
warning: "bg-yellow-500"
|
|
3746
3784
|
};
|
|
3747
|
-
var TimelineContent =
|
|
3785
|
+
var TimelineContent = React137__namespace.default.forwardRef(
|
|
3748
3786
|
({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("div", { ref, className: cn("pb-1", className), ...props })
|
|
3749
3787
|
);
|
|
3750
3788
|
TimelineContent.displayName = "TimelineContent";
|
|
@@ -3767,9 +3805,9 @@ function TimelineItem({ icon, title, description, timestamp, variant = "default"
|
|
|
3767
3805
|
] });
|
|
3768
3806
|
}
|
|
3769
3807
|
function Timeline({ children, className }) {
|
|
3770
|
-
const items =
|
|
3808
|
+
const items = React137__namespace.default.Children.toArray(children);
|
|
3771
3809
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("", className), children: items.map(
|
|
3772
|
-
(child, i) =>
|
|
3810
|
+
(child, i) => React137__namespace.default.isValidElement(child) ? React137__namespace.default.cloneElement(child, { isLast: i === items.length - 1 }) : child
|
|
3773
3811
|
) });
|
|
3774
3812
|
}
|
|
3775
3813
|
var INITIAL_MESSAGES = [
|
|
@@ -3794,8 +3832,8 @@ function ChatBubble({ msg }) {
|
|
|
3794
3832
|
] });
|
|
3795
3833
|
}
|
|
3796
3834
|
function ChatDetail({ className }) {
|
|
3797
|
-
const [messages, setMessages] =
|
|
3798
|
-
const [input, setInput] =
|
|
3835
|
+
const [messages, setMessages] = React137.useState(INITIAL_MESSAGES);
|
|
3836
|
+
const [input, setInput] = React137.useState("");
|
|
3799
3837
|
const send = () => {
|
|
3800
3838
|
if (!input.trim()) return;
|
|
3801
3839
|
const now = (/* @__PURE__ */ new Date()).toLocaleTimeString([], { hour: "2-digit", minute: "2-digit" });
|
|
@@ -3828,9 +3866,9 @@ function ChatDetail({ className }) {
|
|
|
3828
3866
|
}
|
|
3829
3867
|
var REACTIONS = ["\u{1F60A}", "\u{1F610}", "\u{1F615}", "\u{1F621}", "\u{1F929}"];
|
|
3830
3868
|
function FeedbackModal({ onSubmit, className }) {
|
|
3831
|
-
const [reaction, setReaction] =
|
|
3832
|
-
const [text, setText] =
|
|
3833
|
-
const [submitted, setSubmitted] =
|
|
3869
|
+
const [reaction, setReaction] = React137.useState("");
|
|
3870
|
+
const [text, setText] = React137.useState("");
|
|
3871
|
+
const [submitted, setSubmitted] = React137.useState(false);
|
|
3834
3872
|
const handleSubmit = () => {
|
|
3835
3873
|
onSubmit?.({ reaction, text });
|
|
3836
3874
|
setSubmitted(true);
|
|
@@ -3953,7 +3991,7 @@ function FileRow({ file, onDelete }) {
|
|
|
3953
3991
|
] });
|
|
3954
3992
|
}
|
|
3955
3993
|
function FilesList({ className }) {
|
|
3956
|
-
const [files, setFiles] =
|
|
3994
|
+
const [files, setFiles] = React137__namespace.default.useState(FILES2);
|
|
3957
3995
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("rounded-md border border-[hsl(var(--border))] overflow-hidden", className), children: /* @__PURE__ */ jsxRuntime.jsxs("table", { className: "w-full", children: [
|
|
3958
3996
|
/* @__PURE__ */ jsxRuntime.jsx("thead", { className: "bg-[hsl(var(--muted)/0.5)]", children: /* @__PURE__ */ jsxRuntime.jsx("tr", { children: ["Name", "Type", "Size", "Modified", ""].map((h) => /* @__PURE__ */ jsxRuntime.jsx("th", { className: "px-4 py-2.5 text-left text-xs font-medium text-[hsl(var(--muted-foreground))]", children: h }, h)) }) }),
|
|
3959
3997
|
/* @__PURE__ */ jsxRuntime.jsx("tbody", { children: files.map((f) => /* @__PURE__ */ jsxRuntime.jsx(FileRow, { file: f, onDelete: () => setFiles((fs) => fs.filter((x) => x.id !== f.id)) }, f.id)) })
|
|
@@ -3966,7 +4004,7 @@ function IntegrationCard({
|
|
|
3966
4004
|
connected = false,
|
|
3967
4005
|
className
|
|
3968
4006
|
}) {
|
|
3969
|
-
const [isConnected, setIsConnected] =
|
|
4007
|
+
const [isConnected, setIsConnected] = React137.useState(connected);
|
|
3970
4008
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("flex items-center gap-4 rounded-md border border-[hsl(var(--border))] bg-[hsl(var(--card))] p-4", className), children: [
|
|
3971
4009
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex h-10 w-10 shrink-0 items-center justify-center rounded-md bg-[hsl(var(--muted))] text-[hsl(var(--muted-foreground))]", children: icon ?? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-base font-bold", children: name[0] }) }),
|
|
3972
4010
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex-1 min-w-0", children: [
|
|
@@ -4000,9 +4038,9 @@ var PENDING = [
|
|
|
4000
4038
|
{ email: "sam@startup.io", role: "Viewer" }
|
|
4001
4039
|
];
|
|
4002
4040
|
function InviteModal({ className }) {
|
|
4003
|
-
const [email, setEmail] =
|
|
4004
|
-
const [role, setRole] =
|
|
4005
|
-
const [pending, setPending] =
|
|
4041
|
+
const [email, setEmail] = React137.useState("");
|
|
4042
|
+
const [role, setRole] = React137.useState("Member");
|
|
4043
|
+
const [pending, setPending] = React137.useState(PENDING);
|
|
4006
4044
|
const invite = () => {
|
|
4007
4045
|
if (!email.trim()) return;
|
|
4008
4046
|
setPending((p) => [...p, { email: email.trim(), role }]);
|
|
@@ -4049,9 +4087,9 @@ var INITIAL_TAGS = [
|
|
|
4049
4087
|
{ id: "4", name: "Research", color: "bg-purple-500" }
|
|
4050
4088
|
];
|
|
4051
4089
|
function ManageTagsModal({ className }) {
|
|
4052
|
-
const [tags, setTags] =
|
|
4053
|
-
const [newTag, setNewTag] =
|
|
4054
|
-
const [colorIdx, setColorIdx] =
|
|
4090
|
+
const [tags, setTags] = React137.useState(INITIAL_TAGS);
|
|
4091
|
+
const [newTag, setNewTag] = React137.useState("");
|
|
4092
|
+
const [colorIdx, setColorIdx] = React137.useState(0);
|
|
4055
4093
|
const addTag = () => {
|
|
4056
4094
|
if (!newTag.trim()) return;
|
|
4057
4095
|
const id = `tag-${Date.now()}`;
|
|
@@ -4253,13 +4291,13 @@ function Heatmap({
|
|
|
4253
4291
|
showLegend = true,
|
|
4254
4292
|
formatTooltip
|
|
4255
4293
|
}) {
|
|
4256
|
-
const valueByDate =
|
|
4294
|
+
const valueByDate = React137.useMemo(() => {
|
|
4257
4295
|
const m = /* @__PURE__ */ new Map();
|
|
4258
4296
|
for (const d of data) m.set(d.date, d.value);
|
|
4259
4297
|
return m;
|
|
4260
4298
|
}, [data]);
|
|
4261
|
-
const max =
|
|
4262
|
-
const grid =
|
|
4299
|
+
const max = React137.useMemo(() => Math.max(1, ...data.map((d) => d.value)), [data]);
|
|
4300
|
+
const grid = React137.useMemo(() => {
|
|
4263
4301
|
const end = startOfWeek(endDate);
|
|
4264
4302
|
end.setDate(end.getDate() + 6);
|
|
4265
4303
|
const cols = [];
|
|
@@ -4277,7 +4315,7 @@ function Heatmap({
|
|
|
4277
4315
|
}
|
|
4278
4316
|
return cols;
|
|
4279
4317
|
}, [endDate, weeks, valueByDate]);
|
|
4280
|
-
const monthLabels =
|
|
4318
|
+
const monthLabels = React137.useMemo(() => {
|
|
4281
4319
|
const labels = [];
|
|
4282
4320
|
let lastMonth = -1;
|
|
4283
4321
|
grid.forEach((col, i) => {
|
|
@@ -4448,9 +4486,9 @@ function apply(mode) {
|
|
|
4448
4486
|
document.documentElement.classList.toggle("dark", isDark);
|
|
4449
4487
|
}
|
|
4450
4488
|
function ThemeSwitch({ defaultMode, onChange, className, variant = "segmented" }) {
|
|
4451
|
-
const [mode, setMode] =
|
|
4452
|
-
const didMount =
|
|
4453
|
-
|
|
4489
|
+
const [mode, setMode] = React137__namespace.default.useState(() => defaultMode ?? readInitial());
|
|
4490
|
+
const didMount = React137__namespace.default.useRef(false);
|
|
4491
|
+
React137__namespace.default.useEffect(() => {
|
|
4454
4492
|
if (!didMount.current) {
|
|
4455
4493
|
didMount.current = true;
|
|
4456
4494
|
return;
|
|
@@ -4462,7 +4500,7 @@ function ThemeSwitch({ defaultMode, onChange, className, variant = "segmented" }
|
|
|
4462
4500
|
}
|
|
4463
4501
|
onChange?.(mode);
|
|
4464
4502
|
}, [mode, onChange]);
|
|
4465
|
-
|
|
4503
|
+
React137__namespace.default.useEffect(() => {
|
|
4466
4504
|
if (mode !== "system" || typeof window === "undefined") return;
|
|
4467
4505
|
const mql = window.matchMedia("(prefers-color-scheme: dark)");
|
|
4468
4506
|
const handler = () => apply("system");
|
|
@@ -4553,7 +4591,7 @@ function FloatingActionButton({
|
|
|
4553
4591
|
position = "bottom-right",
|
|
4554
4592
|
className
|
|
4555
4593
|
}) {
|
|
4556
|
-
const [open, setOpen] =
|
|
4594
|
+
const [open, setOpen] = React137__namespace.default.useState(false);
|
|
4557
4595
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
4558
4596
|
"div",
|
|
4559
4597
|
{
|
|
@@ -4594,7 +4632,7 @@ function FloatingActionButton({
|
|
|
4594
4632
|
] }),
|
|
4595
4633
|
sections.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(Separator6, {})
|
|
4596
4634
|
] }),
|
|
4597
|
-
sections.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "px-3 py-2.5 space-y-3", children: sections.map((section, i) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
4635
|
+
sections.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "px-3 py-2.5 space-y-3", children: sections.map((section, i) => /* @__PURE__ */ jsxRuntime.jsxs(React137__namespace.default.Fragment, { children: [
|
|
4598
4636
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
4599
4637
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-[9px] font-semibold uppercase tracking-widest text-muted-foreground mb-1.5", children: section.label }),
|
|
4600
4638
|
section.content
|
|
@@ -4636,7 +4674,7 @@ function applyTheme(val) {
|
|
|
4636
4674
|
}
|
|
4637
4675
|
}
|
|
4638
4676
|
function PaletteSwatches({ options = DEFAULT_THEME_OPTIONS }) {
|
|
4639
|
-
const [activeValue, setActiveValue] =
|
|
4677
|
+
const [activeValue, setActiveValue] = React137__namespace.default.useState(readStoredTheme);
|
|
4640
4678
|
const activeOption = options.find((o) => o.value === activeValue) ?? options[0];
|
|
4641
4679
|
const handleSelect = (value) => {
|
|
4642
4680
|
setActiveValue(value);
|
|
@@ -4713,7 +4751,7 @@ function NotifRow({ label, description, checked, onChange }) {
|
|
|
4713
4751
|
] });
|
|
4714
4752
|
}
|
|
4715
4753
|
function NotificationSettings({ className }) {
|
|
4716
|
-
const [states, setStates] =
|
|
4754
|
+
const [states, setStates] = React137.useState(
|
|
4717
4755
|
Object.fromEntries(NOTIFICATIONS.map((n) => [n.id, n.default]))
|
|
4718
4756
|
);
|
|
4719
4757
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("rounded-md border border-[hsl(var(--border))] bg-[hsl(var(--card))] p-6", className), children: [
|
|
@@ -4733,16 +4771,16 @@ function NotificationSettings({ className }) {
|
|
|
4733
4771
|
)) })
|
|
4734
4772
|
] });
|
|
4735
4773
|
}
|
|
4736
|
-
var SidebarCtx =
|
|
4774
|
+
var SidebarCtx = React137.createContext({
|
|
4737
4775
|
collapsed: false,
|
|
4738
4776
|
toggleCollapsed: () => {
|
|
4739
4777
|
}
|
|
4740
4778
|
});
|
|
4741
4779
|
function useSidebar() {
|
|
4742
|
-
return
|
|
4780
|
+
return React137.useContext(SidebarCtx);
|
|
4743
4781
|
}
|
|
4744
4782
|
function SidebarRoot({ children, storageKey = "sidebar-collapsed", defaultCollapsed = false, className }) {
|
|
4745
|
-
const [collapsed, setCollapsed] =
|
|
4783
|
+
const [collapsed, setCollapsed] = React137.useState(() => {
|
|
4746
4784
|
if (typeof window === "undefined") return defaultCollapsed;
|
|
4747
4785
|
try {
|
|
4748
4786
|
return JSON.parse(localStorage.getItem(storageKey) ?? String(defaultCollapsed));
|
|
@@ -4750,7 +4788,7 @@ function SidebarRoot({ children, storageKey = "sidebar-collapsed", defaultCollap
|
|
|
4750
4788
|
return defaultCollapsed;
|
|
4751
4789
|
}
|
|
4752
4790
|
});
|
|
4753
|
-
const toggleCollapsed =
|
|
4791
|
+
const toggleCollapsed = React137.useCallback(() => {
|
|
4754
4792
|
setCollapsed((v) => {
|
|
4755
4793
|
const next = !v;
|
|
4756
4794
|
try {
|
|
@@ -4878,7 +4916,7 @@ function OrgMenu({
|
|
|
4878
4916
|
onCreateOrg,
|
|
4879
4917
|
className
|
|
4880
4918
|
}) {
|
|
4881
|
-
const [internalId, setInternalId] =
|
|
4919
|
+
const [internalId, setInternalId] = React137.useState(defaultOrgId ?? ORGS[0]?.id ?? "1");
|
|
4882
4920
|
const activeId = currentOrgId ?? internalId;
|
|
4883
4921
|
const current = ORGS.find((o) => o.id === activeId) ?? ORGS[0];
|
|
4884
4922
|
const { collapsed } = useSidebar();
|
|
@@ -4927,7 +4965,7 @@ var ROLES = [
|
|
|
4927
4965
|
{ value: "viewer", label: "Viewer", description: "Read-only access" }
|
|
4928
4966
|
];
|
|
4929
4967
|
function RolesMenu({ value = "member", onChange, className }) {
|
|
4930
|
-
const [role, setRole] =
|
|
4968
|
+
const [role, setRole] = React137.useState(value);
|
|
4931
4969
|
const current = ROLES.find((r) => r.value === role) ?? ROLES[0];
|
|
4932
4970
|
const handleChange = (v) => {
|
|
4933
4971
|
setRole(v);
|
|
@@ -4957,8 +4995,8 @@ var USERS = [
|
|
|
4957
4995
|
{ id: "6", name: "Mike Liu", email: "mike@acme.com", initials: "ML" }
|
|
4958
4996
|
];
|
|
4959
4997
|
function SelectUsersModal({ onConfirm, className }) {
|
|
4960
|
-
const [query, setQuery] =
|
|
4961
|
-
const [selected, setSelected] =
|
|
4998
|
+
const [query, setQuery] = React137.useState("");
|
|
4999
|
+
const [selected, setSelected] = React137.useState(/* @__PURE__ */ new Set());
|
|
4962
5000
|
const filtered = USERS.filter(
|
|
4963
5001
|
(u) => u.name.toLowerCase().includes(query.toLowerCase()) || u.email.toLowerCase().includes(query.toLowerCase())
|
|
4964
5002
|
);
|
|
@@ -5168,7 +5206,7 @@ function SidebarLayoutSearch({
|
|
|
5168
5206
|
children,
|
|
5169
5207
|
className
|
|
5170
5208
|
}) {
|
|
5171
|
-
const [query, setQuery] =
|
|
5209
|
+
const [query, setQuery] = React137.useState("");
|
|
5172
5210
|
const filtered = ALL_ITEMS.filter((i) => i.label.toLowerCase().includes(query.toLowerCase()));
|
|
5173
5211
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("flex h-[600px] overflow-hidden rounded-md border border-[hsl(var(--border))] bg-[hsl(var(--background))]", className), children: [
|
|
5174
5212
|
/* @__PURE__ */ jsxRuntime.jsxs("aside", { className: "flex w-60 flex-col border-r border-[hsl(var(--border))] bg-[hsl(var(--card))]", children: [
|
|
@@ -5259,7 +5297,7 @@ function TaskRow({ task, onToggle }) {
|
|
|
5259
5297
|
] });
|
|
5260
5298
|
}
|
|
5261
5299
|
function SortableTaskList({ className }) {
|
|
5262
|
-
const [tasks, setTasks] =
|
|
5300
|
+
const [tasks, setTasks] = React137.useState(TASKS);
|
|
5263
5301
|
const toggle = (id) => setTasks((ts) => ts.map((t) => t.id === id ? { ...t, done: !t.done } : t));
|
|
5264
5302
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("rounded-md border border-[hsl(var(--border))] bg-[hsl(var(--card))] p-4 space-y-4", className), children: SECTIONS.map((section) => {
|
|
5265
5303
|
const items = tasks.filter((t) => t.status === section);
|
|
@@ -5313,8 +5351,8 @@ function StackedLayoutTabs({
|
|
|
5313
5351
|
children,
|
|
5314
5352
|
className
|
|
5315
5353
|
}) {
|
|
5316
|
-
const [activeTab, setActiveTab] =
|
|
5317
|
-
const [activeNav, setActiveNav] =
|
|
5354
|
+
const [activeTab, setActiveTab] = React137.useState(0);
|
|
5355
|
+
const [activeNav, setActiveNav] = React137.useState(0);
|
|
5318
5356
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("flex h-[600px] flex-col overflow-hidden rounded-md border border-[hsl(var(--border))] bg-[hsl(var(--background))]", className), children: [
|
|
5319
5357
|
/* @__PURE__ */ jsxRuntime.jsxs("nav", { className: "flex h-14 items-center gap-6 border-b border-[hsl(var(--border))] bg-[hsl(var(--card))] px-4", children: [
|
|
5320
5358
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-semibold text-sm shrink-0", children: brandName }),
|
|
@@ -5457,8 +5495,8 @@ var MEMBERS = [
|
|
|
5457
5495
|
];
|
|
5458
5496
|
var roleVariant = (role) => role === "Owner" ? "default" : role === "Admin" ? "secondary" : "outline";
|
|
5459
5497
|
function WorkspaceMembers({ className }) {
|
|
5460
|
-
const [query, setQuery] =
|
|
5461
|
-
const [members, setMembers] =
|
|
5498
|
+
const [query, setQuery] = React137.useState("");
|
|
5499
|
+
const [members, setMembers] = React137.useState(MEMBERS);
|
|
5462
5500
|
const filtered = members.filter(
|
|
5463
5501
|
(m) => m.name.toLowerCase().includes(query.toLowerCase()) || m.email.toLowerCase().includes(query.toLowerCase())
|
|
5464
5502
|
);
|
|
@@ -5512,8 +5550,8 @@ function BulkActions({ count, actions, onClear, className }) {
|
|
|
5512
5550
|
] });
|
|
5513
5551
|
}
|
|
5514
5552
|
function useCommandBar() {
|
|
5515
|
-
const [open, setOpen] =
|
|
5516
|
-
|
|
5553
|
+
const [open, setOpen] = React137__namespace.default.useState(false);
|
|
5554
|
+
React137__namespace.default.useEffect(() => {
|
|
5517
5555
|
const handler = (e) => {
|
|
5518
5556
|
if ((e.metaKey || e.ctrlKey) && e.key === "k") {
|
|
5519
5557
|
e.preventDefault();
|
|
@@ -5553,12 +5591,12 @@ function CommandBarItem({ icon, label, shortcut, onSelect, active, className })
|
|
|
5553
5591
|
);
|
|
5554
5592
|
}
|
|
5555
5593
|
function CommandBar({ open, onOpenChange, children, placeholder = "Search commands...", onSearch }) {
|
|
5556
|
-
const [query, setQuery] =
|
|
5594
|
+
const [query, setQuery] = React137__namespace.default.useState("");
|
|
5557
5595
|
const handleSearch = (v) => {
|
|
5558
5596
|
setQuery(v);
|
|
5559
5597
|
onSearch?.(v);
|
|
5560
5598
|
};
|
|
5561
|
-
const items =
|
|
5599
|
+
const items = React137__namespace.default.useRef(null);
|
|
5562
5600
|
const handleKeyDown = (e) => {
|
|
5563
5601
|
if (e.key === "Escape") {
|
|
5564
5602
|
onOpenChange(false);
|
|
@@ -5599,10 +5637,10 @@ function CommandBar({ open, onOpenChange, children, placeholder = "Search comman
|
|
|
5599
5637
|
var textOps = ["contains", "equals", "starts with"];
|
|
5600
5638
|
var numOps = ["=", ">", "<", ">=", "<="];
|
|
5601
5639
|
function AddFilterPopover({ filters, onAdd }) {
|
|
5602
|
-
const [open, setOpen] =
|
|
5603
|
-
const [key, setKey] =
|
|
5604
|
-
const [op, setOp] =
|
|
5605
|
-
const [val, setVal] =
|
|
5640
|
+
const [open, setOpen] = React137__namespace.default.useState(false);
|
|
5641
|
+
const [key, setKey] = React137__namespace.default.useState("");
|
|
5642
|
+
const [op, setOp] = React137__namespace.default.useState("");
|
|
5643
|
+
const [val, setVal] = React137__namespace.default.useState("");
|
|
5606
5644
|
const def = filters.find((f) => f.key === key);
|
|
5607
5645
|
const ops = def?.type === "number" ? numOps : textOps;
|
|
5608
5646
|
const handleAdd = () => {
|
|
@@ -5714,7 +5752,7 @@ function formatColumnSubLabel(date, scale) {
|
|
|
5714
5752
|
function snapDate(date, scale) {
|
|
5715
5753
|
return startOfScale(date, scale);
|
|
5716
5754
|
}
|
|
5717
|
-
var Gantt =
|
|
5755
|
+
var Gantt = React137__namespace.default.forwardRef(
|
|
5718
5756
|
({
|
|
5719
5757
|
items,
|
|
5720
5758
|
scale = "days",
|
|
@@ -5732,7 +5770,7 @@ var Gantt = React136__namespace.default.forwardRef(
|
|
|
5732
5770
|
}, ref) => {
|
|
5733
5771
|
const interactive = !!onItemMove || !!onItemResize;
|
|
5734
5772
|
const columnWidth = DEFAULT_COLUMN_WIDTH[scale];
|
|
5735
|
-
const viewport =
|
|
5773
|
+
const viewport = React137__namespace.default.useMemo(() => {
|
|
5736
5774
|
const earliest = startDate ?? (items.length ? new Date(Math.min(...items.map((i) => i.start.getTime()))) : /* @__PURE__ */ new Date());
|
|
5737
5775
|
const latest = endDate ?? (items.length ? new Date(Math.max(...items.map((i) => i.end.getTime()))) : dateFns.addDays(/* @__PURE__ */ new Date(), 14));
|
|
5738
5776
|
return {
|
|
@@ -5742,7 +5780,7 @@ var Gantt = React136__namespace.default.forwardRef(
|
|
|
5742
5780
|
}, [items, startDate, endDate, scale]);
|
|
5743
5781
|
const colCount = totalColumns(viewport.start, viewport.end, scale);
|
|
5744
5782
|
const timelineWidth = colCount * columnWidth;
|
|
5745
|
-
const grouped =
|
|
5783
|
+
const grouped = React137__namespace.default.useMemo(() => {
|
|
5746
5784
|
const map = /* @__PURE__ */ new Map();
|
|
5747
5785
|
for (const it of items) {
|
|
5748
5786
|
const k = it.group ?? void 0;
|
|
@@ -5752,7 +5790,7 @@ var Gantt = React136__namespace.default.forwardRef(
|
|
|
5752
5790
|
return Array.from(map.entries());
|
|
5753
5791
|
}, [items]);
|
|
5754
5792
|
const hasGroups = grouped.some(([k]) => k !== void 0);
|
|
5755
|
-
const [collapsed, setCollapsed] =
|
|
5793
|
+
const [collapsed, setCollapsed] = React137__namespace.default.useState(() => /* @__PURE__ */ new Set());
|
|
5756
5794
|
const toggleGroup = (key) => {
|
|
5757
5795
|
setCollapsed((prev) => {
|
|
5758
5796
|
const next = new Set(prev);
|
|
@@ -5761,7 +5799,7 @@ var Gantt = React136__namespace.default.forwardRef(
|
|
|
5761
5799
|
return next;
|
|
5762
5800
|
});
|
|
5763
5801
|
};
|
|
5764
|
-
const rows =
|
|
5802
|
+
const rows = React137__namespace.default.useMemo(() => {
|
|
5765
5803
|
const out = [];
|
|
5766
5804
|
for (const [groupKey, list] of grouped) {
|
|
5767
5805
|
if (groupKey !== void 0) {
|
|
@@ -5772,21 +5810,21 @@ var Gantt = React136__namespace.default.forwardRef(
|
|
|
5772
5810
|
}
|
|
5773
5811
|
return out;
|
|
5774
5812
|
}, [grouped, collapsed]);
|
|
5775
|
-
const itemRowIndex =
|
|
5813
|
+
const itemRowIndex = React137__namespace.default.useMemo(() => {
|
|
5776
5814
|
const m = /* @__PURE__ */ new Map();
|
|
5777
5815
|
rows.forEach((r, i) => {
|
|
5778
5816
|
if (r.kind === "item") m.set(r.item.id, i);
|
|
5779
5817
|
});
|
|
5780
5818
|
return m;
|
|
5781
5819
|
}, [rows]);
|
|
5782
|
-
const todayOffsetPx =
|
|
5820
|
+
const todayOffsetPx = React137__namespace.default.useMemo(() => {
|
|
5783
5821
|
if (!showToday) return null;
|
|
5784
5822
|
const now = /* @__PURE__ */ new Date();
|
|
5785
5823
|
const u = unitsBetween(viewport.start, now, scale);
|
|
5786
5824
|
if (u < 0 || u > colCount) return null;
|
|
5787
5825
|
return u * columnWidth;
|
|
5788
5826
|
}, [showToday, viewport.start, scale, colCount, columnWidth]);
|
|
5789
|
-
const columnDates =
|
|
5827
|
+
const columnDates = React137__namespace.default.useMemo(() => {
|
|
5790
5828
|
return Array.from(
|
|
5791
5829
|
{ length: colCount },
|
|
5792
5830
|
(_, i) => addUnits(viewport.start, i, scale)
|
|
@@ -6010,12 +6048,12 @@ function GanttBar({
|
|
|
6010
6048
|
}) {
|
|
6011
6049
|
const color = item.color ?? DEFAULT_COLOR2;
|
|
6012
6050
|
const progress = Math.max(0, Math.min(100, item.progress ?? 0));
|
|
6013
|
-
const [previewLeftDelta, setPreviewLeftDelta] =
|
|
6014
|
-
const [previewRightDelta, setPreviewRightDelta] =
|
|
6015
|
-
const dragMode =
|
|
6016
|
-
const startX =
|
|
6017
|
-
const longPressTimer =
|
|
6018
|
-
const moved =
|
|
6051
|
+
const [previewLeftDelta, setPreviewLeftDelta] = React137__namespace.default.useState(0);
|
|
6052
|
+
const [previewRightDelta, setPreviewRightDelta] = React137__namespace.default.useState(0);
|
|
6053
|
+
const dragMode = React137__namespace.default.useRef(null);
|
|
6054
|
+
const startX = React137__namespace.default.useRef(0);
|
|
6055
|
+
const longPressTimer = React137__namespace.default.useRef(null);
|
|
6056
|
+
const moved = React137__namespace.default.useRef(false);
|
|
6019
6057
|
const baseLeft = unitsBetween(viewportStart, item.start, scale) * columnWidth;
|
|
6020
6058
|
const baseRight = unitsBetween(viewportStart, item.end, scale) * columnWidth;
|
|
6021
6059
|
const baseWidth = Math.max(columnWidth * 0.25, baseRight - baseLeft);
|
|
@@ -6221,7 +6259,7 @@ function DependencyLayer({
|
|
|
6221
6259
|
timelineWidth,
|
|
6222
6260
|
totalHeight
|
|
6223
6261
|
}) {
|
|
6224
|
-
const itemById =
|
|
6262
|
+
const itemById = React137__namespace.default.useMemo(() => {
|
|
6225
6263
|
const m = /* @__PURE__ */ new Map();
|
|
6226
6264
|
for (const it of items) m.set(it.id, it);
|
|
6227
6265
|
return m;
|
|
@@ -6320,9 +6358,9 @@ function KanbanColumn({ column, isOver }) {
|
|
|
6320
6358
|
] });
|
|
6321
6359
|
}
|
|
6322
6360
|
function Kanban({ columns: initialColumns, onMoveCard, className }) {
|
|
6323
|
-
const [cols, setCols] =
|
|
6324
|
-
const [activeCard, setActiveCard] =
|
|
6325
|
-
const [overColId, setOverColId] =
|
|
6361
|
+
const [cols, setCols] = React137__namespace.default.useState(initialColumns);
|
|
6362
|
+
const [activeCard, setActiveCard] = React137__namespace.default.useState(null);
|
|
6363
|
+
const [overColId, setOverColId] = React137__namespace.default.useState(null);
|
|
6326
6364
|
const sensors = core.useSensors(core.useSensor(core.PointerSensor, { activationConstraint: { distance: 5 } }));
|
|
6327
6365
|
const findColByCard = (cardId) => cols.find((c) => c.cards.some((card) => card.id === cardId));
|
|
6328
6366
|
const onDragStart = ({ active }) => {
|
|
@@ -6391,10 +6429,10 @@ function ToolbarButton({
|
|
|
6391
6429
|
] });
|
|
6392
6430
|
}
|
|
6393
6431
|
function LinkPopover({ editor }) {
|
|
6394
|
-
const [open, setOpen] =
|
|
6395
|
-
const [url, setUrl] =
|
|
6432
|
+
const [open, setOpen] = React137__namespace.default.useState(false);
|
|
6433
|
+
const [url, setUrl] = React137__namespace.default.useState("");
|
|
6396
6434
|
const isActive = editor.isActive("link");
|
|
6397
|
-
|
|
6435
|
+
React137__namespace.default.useEffect(() => {
|
|
6398
6436
|
if (!open) return;
|
|
6399
6437
|
const current = editor.getAttributes("link")?.href;
|
|
6400
6438
|
setUrl(current ?? "");
|
|
@@ -6859,7 +6897,7 @@ var proseClasses = cn(
|
|
|
6859
6897
|
// Selected cells in tables
|
|
6860
6898
|
"[&_.selectedCell]:bg-[hsl(var(--accent))]/40"
|
|
6861
6899
|
);
|
|
6862
|
-
var RichEditor =
|
|
6900
|
+
var RichEditor = React137__namespace.default.forwardRef(
|
|
6863
6901
|
function RichEditor2({
|
|
6864
6902
|
value,
|
|
6865
6903
|
defaultValue,
|
|
@@ -6873,12 +6911,12 @@ var RichEditor = React136__namespace.default.forwardRef(
|
|
|
6873
6911
|
}, ref) {
|
|
6874
6912
|
const isControlled = value !== void 0;
|
|
6875
6913
|
const initialContent = isControlled ? value ?? "" : defaultValue ?? "";
|
|
6876
|
-
const debounceRef =
|
|
6877
|
-
const onChangeRef =
|
|
6878
|
-
|
|
6914
|
+
const debounceRef = React137__namespace.default.useRef(null);
|
|
6915
|
+
const onChangeRef = React137__namespace.default.useRef(onChange);
|
|
6916
|
+
React137__namespace.default.useEffect(() => {
|
|
6879
6917
|
onChangeRef.current = onChange;
|
|
6880
6918
|
}, [onChange]);
|
|
6881
|
-
const [charCount, setCharCount] =
|
|
6919
|
+
const [charCount, setCharCount] = React137__namespace.default.useState(0);
|
|
6882
6920
|
const editor = react$1.useEditor({
|
|
6883
6921
|
editable,
|
|
6884
6922
|
content: initialContent,
|
|
@@ -6921,18 +6959,18 @@ var RichEditor = React136__namespace.default.forwardRef(
|
|
|
6921
6959
|
}, 100);
|
|
6922
6960
|
}
|
|
6923
6961
|
});
|
|
6924
|
-
|
|
6962
|
+
React137__namespace.default.useEffect(() => {
|
|
6925
6963
|
if (!editor || !isControlled) return;
|
|
6926
6964
|
const current = editor.getHTML();
|
|
6927
6965
|
if ((value ?? "") !== current) {
|
|
6928
6966
|
editor.commands.setContent(value ?? "", { emitUpdate: false });
|
|
6929
6967
|
}
|
|
6930
6968
|
}, [editor, isControlled, value]);
|
|
6931
|
-
|
|
6969
|
+
React137__namespace.default.useEffect(() => {
|
|
6932
6970
|
if (!editor) return;
|
|
6933
6971
|
if (editor.isEditable !== editable) editor.setEditable(editable);
|
|
6934
6972
|
}, [editor, editable]);
|
|
6935
|
-
|
|
6973
|
+
React137__namespace.default.useEffect(() => {
|
|
6936
6974
|
return () => {
|
|
6937
6975
|
if (debounceRef.current) clearTimeout(debounceRef.current);
|
|
6938
6976
|
};
|
|
@@ -7030,10 +7068,10 @@ function ToggleButtonGroup(props) {
|
|
|
7030
7068
|
props.onChange(val);
|
|
7031
7069
|
}
|
|
7032
7070
|
};
|
|
7033
|
-
return /* @__PURE__ */ jsxRuntime.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:
|
|
7034
|
-
if (!
|
|
7071
|
+
return /* @__PURE__ */ jsxRuntime.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__namespace.default.Children.map(children, (child) => {
|
|
7072
|
+
if (!React137__namespace.default.isValidElement(child)) return child;
|
|
7035
7073
|
const tb = child;
|
|
7036
|
-
return
|
|
7074
|
+
return React137__namespace.default.cloneElement(tb, {
|
|
7037
7075
|
pressed: isPressed(tb.props.value),
|
|
7038
7076
|
onClick: () => handleClick(tb.props.value)
|
|
7039
7077
|
});
|
|
@@ -7317,24 +7355,24 @@ function Beacon({ color = "primary", size = "md", children, className }) {
|
|
|
7317
7355
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "absolute -top-1 -right-1 flex", children: /* @__PURE__ */ jsxRuntime.jsx(BeaconDot, { color, size }) })
|
|
7318
7356
|
] });
|
|
7319
7357
|
}
|
|
7320
|
-
var TourContext =
|
|
7358
|
+
var TourContext = React137.createContext(null);
|
|
7321
7359
|
function useTour() {
|
|
7322
|
-
const ctx =
|
|
7360
|
+
const ctx = React137.useContext(TourContext);
|
|
7323
7361
|
if (!ctx) throw new Error("useTour must be used within <Tour>");
|
|
7324
7362
|
return ctx;
|
|
7325
7363
|
}
|
|
7326
7364
|
function Tour({ totalSteps, children }) {
|
|
7327
|
-
const [currentStep, setCurrentStep] =
|
|
7328
|
-
const [isActive, setIsActive] =
|
|
7329
|
-
const stop =
|
|
7330
|
-
const start =
|
|
7365
|
+
const [currentStep, setCurrentStep] = React137.useState(0);
|
|
7366
|
+
const [isActive, setIsActive] = React137.useState(false);
|
|
7367
|
+
const stop = React137.useCallback(() => setIsActive(false), []);
|
|
7368
|
+
const start = React137.useCallback(() => {
|
|
7331
7369
|
setCurrentStep(0);
|
|
7332
7370
|
setIsActive(true);
|
|
7333
7371
|
}, []);
|
|
7334
|
-
const next =
|
|
7335
|
-
const prev =
|
|
7336
|
-
const goTo =
|
|
7337
|
-
|
|
7372
|
+
const next = React137.useCallback(() => setCurrentStep((s) => Math.min(s + 1, totalSteps - 1)), [totalSteps]);
|
|
7373
|
+
const prev = React137.useCallback(() => setCurrentStep((s) => Math.max(s - 1, 0)), []);
|
|
7374
|
+
const goTo = React137.useCallback((step) => setCurrentStep(Math.max(0, Math.min(step, totalSteps - 1))), [totalSteps]);
|
|
7375
|
+
React137.useEffect(() => {
|
|
7338
7376
|
if (!isActive) return;
|
|
7339
7377
|
const onKey = (e) => {
|
|
7340
7378
|
if (e.key === "Escape") stop();
|
|
@@ -7382,13 +7420,13 @@ function TourStep({ step, title, description, placement = "bottom", children })
|
|
|
7382
7420
|
] })
|
|
7383
7421
|
] });
|
|
7384
7422
|
}
|
|
7385
|
-
var ChecklistContext =
|
|
7423
|
+
var ChecklistContext = React137.createContext(null);
|
|
7386
7424
|
function useChecklist() {
|
|
7387
|
-
const ctx =
|
|
7425
|
+
const ctx = React137.useContext(ChecklistContext);
|
|
7388
7426
|
if (!ctx) throw new Error("<ChecklistItem> must be used inside <Checklist>");
|
|
7389
7427
|
return ctx;
|
|
7390
7428
|
}
|
|
7391
|
-
var Checklist =
|
|
7429
|
+
var Checklist = React137__namespace.default.forwardRef(
|
|
7392
7430
|
({
|
|
7393
7431
|
title = "Getting started",
|
|
7394
7432
|
description,
|
|
@@ -7402,32 +7440,32 @@ var Checklist = React136__namespace.default.forwardRef(
|
|
|
7402
7440
|
children,
|
|
7403
7441
|
...props
|
|
7404
7442
|
}, ref) => {
|
|
7405
|
-
const [internalCompleted, setInternalCompleted] =
|
|
7406
|
-
const [open, setOpen] =
|
|
7407
|
-
const completedFiredRef =
|
|
7443
|
+
const [internalCompleted, setInternalCompleted] = React137.useState({});
|
|
7444
|
+
const [open, setOpen] = React137.useState(defaultOpen);
|
|
7445
|
+
const completedFiredRef = React137__namespace.default.useRef(false);
|
|
7408
7446
|
const isControlled = controlledCompleted !== void 0;
|
|
7409
7447
|
const completed = isControlled ? controlledCompleted : internalCompleted;
|
|
7410
|
-
const setCompleted =
|
|
7448
|
+
const setCompleted = React137.useCallback(
|
|
7411
7449
|
(id, value) => {
|
|
7412
7450
|
if (!isControlled) setInternalCompleted((prev) => ({ ...prev, [id]: value }));
|
|
7413
7451
|
onItemChange?.(id, value);
|
|
7414
7452
|
},
|
|
7415
7453
|
[isControlled, onItemChange]
|
|
7416
7454
|
);
|
|
7417
|
-
const total =
|
|
7455
|
+
const total = React137.useMemo(() => {
|
|
7418
7456
|
let n = 0;
|
|
7419
|
-
|
|
7420
|
-
if (
|
|
7457
|
+
React137__namespace.default.Children.forEach(children, (child) => {
|
|
7458
|
+
if (React137__namespace.default.isValidElement(child) && child.type.displayName === "ChecklistItem") {
|
|
7421
7459
|
n++;
|
|
7422
7460
|
}
|
|
7423
7461
|
});
|
|
7424
7462
|
return n;
|
|
7425
7463
|
}, [children]);
|
|
7426
|
-
const doneCount =
|
|
7464
|
+
const doneCount = React137.useMemo(
|
|
7427
7465
|
() => Object.values(completed).filter(Boolean).length,
|
|
7428
7466
|
[completed]
|
|
7429
7467
|
);
|
|
7430
|
-
|
|
7468
|
+
React137__namespace.default.useEffect(() => {
|
|
7431
7469
|
if (!completedFiredRef.current && total > 0 && doneCount >= total) {
|
|
7432
7470
|
completedFiredRef.current = true;
|
|
7433
7471
|
onComplete?.();
|
|
@@ -7488,11 +7526,11 @@ var Checklist = React136__namespace.default.forwardRef(
|
|
|
7488
7526
|
}
|
|
7489
7527
|
);
|
|
7490
7528
|
Checklist.displayName = "Checklist";
|
|
7491
|
-
var ChecklistItem =
|
|
7529
|
+
var ChecklistItem = React137__namespace.default.forwardRef(
|
|
7492
7530
|
({ id, title, description, action, onActivate, className, ...props }, ref) => {
|
|
7493
7531
|
const { completed, setCompleted } = useChecklist();
|
|
7494
7532
|
const done = !!completed[id];
|
|
7495
|
-
const toggle =
|
|
7533
|
+
const toggle = React137.useCallback(() => {
|
|
7496
7534
|
setCompleted(id, !done);
|
|
7497
7535
|
}, [id, done, setCompleted]);
|
|
7498
7536
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -7571,9 +7609,9 @@ function IntroDisclosure({
|
|
|
7571
7609
|
finishLabel = "Get started"
|
|
7572
7610
|
}) {
|
|
7573
7611
|
const isControlled = controlledOpen !== void 0;
|
|
7574
|
-
const [internalOpen, setInternalOpen] =
|
|
7575
|
-
const [step, setStep] =
|
|
7576
|
-
|
|
7612
|
+
const [internalOpen, setInternalOpen] = React137.useState(false);
|
|
7613
|
+
const [step, setStep] = React137.useState(0);
|
|
7614
|
+
React137.useEffect(() => {
|
|
7577
7615
|
if (isControlled) return;
|
|
7578
7616
|
if (typeof window === "undefined") return;
|
|
7579
7617
|
if (!storageKey) {
|
|
@@ -7586,19 +7624,19 @@ function IntroDisclosure({
|
|
|
7586
7624
|
const isOpen = isControlled ? controlledOpen : internalOpen;
|
|
7587
7625
|
const total = steps.length;
|
|
7588
7626
|
const isLast = step === total - 1;
|
|
7589
|
-
const close =
|
|
7627
|
+
const close = React137.useCallback(() => {
|
|
7590
7628
|
if (!isControlled) {
|
|
7591
7629
|
setInternalOpen(false);
|
|
7592
7630
|
if (storageKey && typeof window !== "undefined") window.localStorage.setItem(storageKey, "1");
|
|
7593
7631
|
}
|
|
7594
7632
|
onOpenChange?.(false);
|
|
7595
7633
|
}, [isControlled, onOpenChange, storageKey]);
|
|
7596
|
-
const next =
|
|
7634
|
+
const next = React137.useCallback(() => {
|
|
7597
7635
|
if (isLast) close();
|
|
7598
7636
|
else setStep((s) => s + 1);
|
|
7599
7637
|
}, [isLast, close]);
|
|
7600
|
-
const prev =
|
|
7601
|
-
|
|
7638
|
+
const prev = React137.useCallback(() => setStep((s) => Math.max(0, s - 1)), []);
|
|
7639
|
+
React137.useEffect(() => {
|
|
7602
7640
|
if (!isOpen) return;
|
|
7603
7641
|
const onKey = (e) => {
|
|
7604
7642
|
if (e.key === "Escape") close();
|
|
@@ -7608,7 +7646,7 @@ function IntroDisclosure({
|
|
|
7608
7646
|
window.addEventListener("keydown", onKey);
|
|
7609
7647
|
return () => window.removeEventListener("keydown", onKey);
|
|
7610
7648
|
}, [isOpen, close, next, prev]);
|
|
7611
|
-
const current =
|
|
7649
|
+
const current = React137.useMemo(() => steps[Math.min(step, total - 1)], [steps, step, total]);
|
|
7612
7650
|
if (!isOpen || total === 0 || !current) return null;
|
|
7613
7651
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
7614
7652
|
"div",
|
|
@@ -7788,9 +7826,9 @@ function CalendarGrid({ year, month, selected, onSelect }) {
|
|
|
7788
7826
|
] });
|
|
7789
7827
|
}
|
|
7790
7828
|
function DatePicker({ value, onChange, placeholder = "Pick a date", disabled, className }) {
|
|
7791
|
-
const [open, setOpen] =
|
|
7829
|
+
const [open, setOpen] = React137.useState(false);
|
|
7792
7830
|
const now = value ?? /* @__PURE__ */ new Date();
|
|
7793
|
-
const [view, setView] =
|
|
7831
|
+
const [view, setView] = React137.useState({ year: now.getFullYear(), month: now.getMonth() });
|
|
7794
7832
|
function navigate(delta) {
|
|
7795
7833
|
setView((v) => {
|
|
7796
7834
|
const date = new Date(v.year, v.month + delta);
|
|
@@ -7836,7 +7874,7 @@ function Field({ label, description, error, required, children, className }) {
|
|
|
7836
7874
|
error && /* @__PURE__ */ jsxRuntime.jsx(FieldError, { children: error })
|
|
7837
7875
|
] });
|
|
7838
7876
|
}
|
|
7839
|
-
var FieldLabel =
|
|
7877
|
+
var FieldLabel = React137__namespace.default.forwardRef(
|
|
7840
7878
|
({ className, required, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
7841
7879
|
"label",
|
|
7842
7880
|
{
|
|
@@ -7851,7 +7889,7 @@ var FieldLabel = React136__namespace.default.forwardRef(
|
|
|
7851
7889
|
)
|
|
7852
7890
|
);
|
|
7853
7891
|
FieldLabel.displayName = "FieldLabel";
|
|
7854
|
-
var FieldDescription =
|
|
7892
|
+
var FieldDescription = React137__namespace.default.forwardRef(
|
|
7855
7893
|
({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
7856
7894
|
"p",
|
|
7857
7895
|
{
|
|
@@ -7862,7 +7900,7 @@ var FieldDescription = React136__namespace.default.forwardRef(
|
|
|
7862
7900
|
)
|
|
7863
7901
|
);
|
|
7864
7902
|
FieldDescription.displayName = "FieldDescription";
|
|
7865
|
-
var FieldError =
|
|
7903
|
+
var FieldError = React137__namespace.default.forwardRef(
|
|
7866
7904
|
({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
7867
7905
|
"p",
|
|
7868
7906
|
{
|
|
@@ -7963,7 +8001,7 @@ function defaultFor(format3, showAlpha) {
|
|
|
7963
8001
|
if (format3 === "rgb") return showAlpha ? "rgba(59, 130, 246, 1)" : "rgb(59, 130, 246)";
|
|
7964
8002
|
return showAlpha ? "hsla(217, 91%, 60%, 1)" : "hsl(217, 91%, 60%)";
|
|
7965
8003
|
}
|
|
7966
|
-
var ColorPicker =
|
|
8004
|
+
var ColorPicker = React137__namespace.default.forwardRef(
|
|
7967
8005
|
({
|
|
7968
8006
|
value: valueProp,
|
|
7969
8007
|
defaultValue,
|
|
@@ -7978,21 +8016,21 @@ var ColorPicker = React136__namespace.default.forwardRef(
|
|
|
7978
8016
|
}, ref) => {
|
|
7979
8017
|
const fallback = defaultValue ?? defaultFor(format3, showAlpha);
|
|
7980
8018
|
const isControlled = valueProp !== void 0;
|
|
7981
|
-
const [internal, setInternal] =
|
|
8019
|
+
const [internal, setInternal] = React137__namespace.default.useState(fallback);
|
|
7982
8020
|
const value = isControlled ? valueProp : internal;
|
|
7983
|
-
const [draft, setDraft] =
|
|
7984
|
-
const [draftValid, setDraftValid] =
|
|
7985
|
-
|
|
8021
|
+
const [draft, setDraft] = React137__namespace.default.useState(value);
|
|
8022
|
+
const [draftValid, setDraftValid] = React137__namespace.default.useState(true);
|
|
8023
|
+
React137__namespace.default.useEffect(() => {
|
|
7986
8024
|
setDraft(value);
|
|
7987
8025
|
setDraftValid(true);
|
|
7988
8026
|
}, [value]);
|
|
7989
|
-
const [eyeDropperSupported, setEyeDropperSupported] =
|
|
7990
|
-
|
|
8027
|
+
const [eyeDropperSupported, setEyeDropperSupported] = React137__namespace.default.useState(false);
|
|
8028
|
+
React137__namespace.default.useEffect(() => {
|
|
7991
8029
|
if (typeof window !== "undefined" && "EyeDropper" in window) {
|
|
7992
8030
|
setEyeDropperSupported(true);
|
|
7993
8031
|
}
|
|
7994
8032
|
}, []);
|
|
7995
|
-
const commit =
|
|
8033
|
+
const commit = React137__namespace.default.useCallback(
|
|
7996
8034
|
(next) => {
|
|
7997
8035
|
if (!isControlled) setInternal(next);
|
|
7998
8036
|
onValueChange?.(next);
|
|
@@ -8155,8 +8193,8 @@ function filterBySize(files, maxSize) {
|
|
|
8155
8193
|
return maxSize ? files.filter((f) => f.size <= maxSize) : files;
|
|
8156
8194
|
}
|
|
8157
8195
|
function FileUpload({ accept, multiple, maxSize, onFiles, className, disabled }) {
|
|
8158
|
-
const inputRef =
|
|
8159
|
-
const [dragging, setDragging] =
|
|
8196
|
+
const inputRef = React137.useRef(null);
|
|
8197
|
+
const [dragging, setDragging] = React137.useState(false);
|
|
8160
8198
|
function handleFiles(raw) {
|
|
8161
8199
|
if (!raw) return;
|
|
8162
8200
|
const files = filterBySize(Array.from(raw), maxSize);
|
|
@@ -8229,15 +8267,15 @@ function FileUploadPreview({ files, onRemove, className }) {
|
|
|
8229
8267
|
] })
|
|
8230
8268
|
] }, i)) });
|
|
8231
8269
|
}
|
|
8232
|
-
var FloatingLabelInput =
|
|
8270
|
+
var FloatingLabelInput = React137__namespace.default.forwardRef(
|
|
8233
8271
|
({ label, error, hint, wrapperClassName, className, id, value, defaultValue, onFocus, onBlur, onChange, ...props }, ref) => {
|
|
8234
|
-
const autoId =
|
|
8272
|
+
const autoId = React137.useId();
|
|
8235
8273
|
const inputId = id ?? autoId;
|
|
8236
8274
|
const errorId = error ? `${inputId}-error` : void 0;
|
|
8237
8275
|
const hintId = hint ? `${inputId}-hint` : void 0;
|
|
8238
8276
|
const describedBy = [errorId, hintId].filter(Boolean).join(" ") || void 0;
|
|
8239
|
-
const [focused, setFocused] =
|
|
8240
|
-
const [filled, setFilled] =
|
|
8277
|
+
const [focused, setFocused] = React137.useState(false);
|
|
8278
|
+
const [filled, setFilled] = React137.useState(() => {
|
|
8241
8279
|
if (value !== void 0 && value !== null && value !== "") return true;
|
|
8242
8280
|
if (defaultValue !== void 0 && defaultValue !== null && defaultValue !== "") return true;
|
|
8243
8281
|
return false;
|
|
@@ -8313,7 +8351,7 @@ function FormField(props) {
|
|
|
8313
8351
|
function FormItem({ className, ...props }) {
|
|
8314
8352
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("flex flex-col gap-1.5", className), ...props });
|
|
8315
8353
|
}
|
|
8316
|
-
var FormLabel =
|
|
8354
|
+
var FormLabel = React137__namespace.default.forwardRef(
|
|
8317
8355
|
({ className, error, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
8318
8356
|
"label",
|
|
8319
8357
|
{
|
|
@@ -8328,9 +8366,9 @@ var FormLabel = React136__namespace.default.forwardRef(
|
|
|
8328
8366
|
)
|
|
8329
8367
|
);
|
|
8330
8368
|
FormLabel.displayName = "FormLabel";
|
|
8331
|
-
var FormControl =
|
|
8369
|
+
var FormControl = React137__namespace.default.forwardRef(
|
|
8332
8370
|
({ ...props }, ref) => {
|
|
8333
|
-
const id =
|
|
8371
|
+
const id = React137.useId();
|
|
8334
8372
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { ref, id, ...props });
|
|
8335
8373
|
}
|
|
8336
8374
|
);
|
|
@@ -8353,7 +8391,7 @@ function ObjectField({
|
|
|
8353
8391
|
children,
|
|
8354
8392
|
className
|
|
8355
8393
|
}) {
|
|
8356
|
-
const [open, setOpen] =
|
|
8394
|
+
const [open, setOpen] = React137.useState(defaultOpen);
|
|
8357
8395
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("rounded-md border border-[hsl(var(--border))] overflow-hidden", className), children: [
|
|
8358
8396
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
8359
8397
|
"div",
|
|
@@ -8385,9 +8423,9 @@ function getStrength(value) {
|
|
|
8385
8423
|
if (score <= 3) return { level: "medium", width: "w-2/3", color: "bg-yellow-500" };
|
|
8386
8424
|
return { level: "strong", width: "w-full", color: "bg-green-500" };
|
|
8387
8425
|
}
|
|
8388
|
-
var PasswordInput =
|
|
8426
|
+
var PasswordInput = React137__namespace.default.forwardRef(
|
|
8389
8427
|
({ className, strength, ...props }, ref) => {
|
|
8390
|
-
const [show, setShow] =
|
|
8428
|
+
const [show, setShow] = React137.useState(false);
|
|
8391
8429
|
const value = String(props.value ?? "");
|
|
8392
8430
|
const str = getStrength(value);
|
|
8393
8431
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-1.5", children: [
|
|
@@ -8420,9 +8458,9 @@ var PasswordInput = React136__namespace.default.forwardRef(
|
|
|
8420
8458
|
}
|
|
8421
8459
|
);
|
|
8422
8460
|
PasswordInput.displayName = "PasswordInput";
|
|
8423
|
-
var SearchInput =
|
|
8461
|
+
var SearchInput = React137__namespace.default.forwardRef(
|
|
8424
8462
|
({ className, shortcut, onClear, onChange, value: valueProp, defaultValue, ...props }, ref) => {
|
|
8425
|
-
const [internalValue, setInternalValue] =
|
|
8463
|
+
const [internalValue, setInternalValue] = React137.useState(defaultValue ?? "");
|
|
8426
8464
|
const isControlled = valueProp !== void 0;
|
|
8427
8465
|
const value = isControlled ? String(valueProp) : String(internalValue);
|
|
8428
8466
|
function handleChange(e) {
|
|
@@ -8465,14 +8503,14 @@ var SearchInput = React136__namespace.default.forwardRef(
|
|
|
8465
8503
|
}
|
|
8466
8504
|
);
|
|
8467
8505
|
SearchInput.displayName = "SearchInput";
|
|
8468
|
-
var StepFormContext =
|
|
8506
|
+
var StepFormContext = React137.createContext(null);
|
|
8469
8507
|
function useStepForm() {
|
|
8470
|
-
const ctx =
|
|
8508
|
+
const ctx = React137.useContext(StepFormContext);
|
|
8471
8509
|
if (!ctx) throw new Error("useStepForm must be used within StepForm");
|
|
8472
8510
|
return ctx;
|
|
8473
8511
|
}
|
|
8474
8512
|
function StepForm({ steps, onSubmit, children, className }) {
|
|
8475
|
-
const [currentStep, setCurrentStep] =
|
|
8513
|
+
const [currentStep, setCurrentStep] = React137.useState(0);
|
|
8476
8514
|
const totalSteps = steps.length;
|
|
8477
8515
|
const ctx = {
|
|
8478
8516
|
currentStep,
|
|
@@ -8483,7 +8521,7 @@ function StepForm({ steps, onSubmit, children, className }) {
|
|
|
8483
8521
|
isFirst: currentStep === 0,
|
|
8484
8522
|
isLast: currentStep === totalSteps - 1
|
|
8485
8523
|
};
|
|
8486
|
-
const childArray =
|
|
8524
|
+
const childArray = React137__namespace.default.Children.toArray(children);
|
|
8487
8525
|
const currentChild = childArray[currentStep];
|
|
8488
8526
|
return /* @__PURE__ */ jsxRuntime.jsx(StepFormContext.Provider, { value: ctx, children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("flex flex-col gap-6", className), children: [
|
|
8489
8527
|
/* @__PURE__ */ jsxRuntime.jsx(StepIndicator, { steps, currentStep }),
|
|
@@ -8492,7 +8530,7 @@ function StepForm({ steps, onSubmit, children, className }) {
|
|
|
8492
8530
|
] }) });
|
|
8493
8531
|
}
|
|
8494
8532
|
function StepIndicator({ steps, currentStep }) {
|
|
8495
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center gap-2", children: steps.map((label, i) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
8533
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center gap-2", children: steps.map((label, i) => /* @__PURE__ */ jsxRuntime.jsxs(React137__namespace.default.Fragment, { children: [
|
|
8496
8534
|
i > 0 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("h-px flex-1 bg-[hsl(var(--border))]", i <= currentStep && "bg-[hsl(var(--primary))]") }),
|
|
8497
8535
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col items-center gap-1", children: [
|
|
8498
8536
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: cn(
|
|
@@ -8521,7 +8559,7 @@ function StepFormNavigation({ onSubmit, submitLabel = "Submit" }) {
|
|
|
8521
8559
|
isLast ? /* @__PURE__ */ jsxRuntime.jsx(Button, { type: "button", onClick: onSubmit, children: submitLabel }) : /* @__PURE__ */ jsxRuntime.jsx(Button, { type: "button", onClick: next, children: "Next" })
|
|
8522
8560
|
] });
|
|
8523
8561
|
}
|
|
8524
|
-
var Tags =
|
|
8562
|
+
var Tags = React137__namespace.default.forwardRef(
|
|
8525
8563
|
({
|
|
8526
8564
|
value: valueProp,
|
|
8527
8565
|
defaultValue,
|
|
@@ -8537,25 +8575,25 @@ var Tags = React136__namespace.default.forwardRef(
|
|
|
8537
8575
|
...props
|
|
8538
8576
|
}, ref) => {
|
|
8539
8577
|
const isControlled = valueProp !== void 0;
|
|
8540
|
-
const [internal, setInternal] =
|
|
8578
|
+
const [internal, setInternal] = React137__namespace.default.useState(defaultValue ?? []);
|
|
8541
8579
|
const tags = isControlled ? valueProp : internal;
|
|
8542
|
-
const [input, setInput] =
|
|
8543
|
-
const [error, setError] =
|
|
8544
|
-
const [focused, setFocused] =
|
|
8545
|
-
const [activeIndex, setActiveIndex] =
|
|
8546
|
-
const inputRef =
|
|
8547
|
-
const containerRef =
|
|
8548
|
-
|
|
8580
|
+
const [input, setInput] = React137__namespace.default.useState("");
|
|
8581
|
+
const [error, setError] = React137__namespace.default.useState(null);
|
|
8582
|
+
const [focused, setFocused] = React137__namespace.default.useState(false);
|
|
8583
|
+
const [activeIndex, setActiveIndex] = React137__namespace.default.useState(0);
|
|
8584
|
+
const inputRef = React137__namespace.default.useRef(null);
|
|
8585
|
+
const containerRef = React137__namespace.default.useRef(null);
|
|
8586
|
+
React137__namespace.default.useImperativeHandle(ref, () => containerRef.current);
|
|
8549
8587
|
const atMax = maxTags !== void 0 && tags.length >= maxTags;
|
|
8550
8588
|
const inputDisabled = disabled || atMax;
|
|
8551
|
-
const commit =
|
|
8589
|
+
const commit = React137__namespace.default.useCallback(
|
|
8552
8590
|
(next) => {
|
|
8553
8591
|
if (!isControlled) setInternal(next);
|
|
8554
8592
|
onValueChange?.(next);
|
|
8555
8593
|
},
|
|
8556
8594
|
[isControlled, onValueChange]
|
|
8557
8595
|
);
|
|
8558
|
-
const addTag =
|
|
8596
|
+
const addTag = React137__namespace.default.useCallback(
|
|
8559
8597
|
(raw) => {
|
|
8560
8598
|
const tag = raw.trim();
|
|
8561
8599
|
if (!tag) return false;
|
|
@@ -8581,20 +8619,20 @@ var Tags = React136__namespace.default.forwardRef(
|
|
|
8581
8619
|
},
|
|
8582
8620
|
[tags, allowDuplicates, validate, atMax, commit]
|
|
8583
8621
|
);
|
|
8584
|
-
const removeTag =
|
|
8622
|
+
const removeTag = React137__namespace.default.useCallback(
|
|
8585
8623
|
(index) => {
|
|
8586
8624
|
commit(tags.filter((_, i) => i !== index));
|
|
8587
8625
|
setError(null);
|
|
8588
8626
|
},
|
|
8589
8627
|
[tags, commit]
|
|
8590
8628
|
);
|
|
8591
|
-
const filteredSuggestions =
|
|
8629
|
+
const filteredSuggestions = React137__namespace.default.useMemo(() => {
|
|
8592
8630
|
if (!suggestions || !input.trim()) return [];
|
|
8593
8631
|
const q = input.trim().toLowerCase();
|
|
8594
8632
|
return suggestions.filter((s) => s.toLowerCase().includes(q)).filter((s) => allowDuplicates || !tags.includes(s)).slice(0, 8);
|
|
8595
8633
|
}, [suggestions, input, tags, allowDuplicates]);
|
|
8596
8634
|
const showPopover = focused && !inputDisabled && filteredSuggestions.length > 0;
|
|
8597
|
-
|
|
8635
|
+
React137__namespace.default.useEffect(() => {
|
|
8598
8636
|
if (activeIndex >= filteredSuggestions.length) setActiveIndex(0);
|
|
8599
8637
|
}, [filteredSuggestions.length, activeIndex]);
|
|
8600
8638
|
const handleKeyDown = (e) => {
|
|
@@ -8736,7 +8774,7 @@ var Tags = React136__namespace.default.forwardRef(
|
|
|
8736
8774
|
}
|
|
8737
8775
|
);
|
|
8738
8776
|
Tags.displayName = "Tags";
|
|
8739
|
-
var AppShellCtx =
|
|
8777
|
+
var AppShellCtx = React137__namespace.default.createContext({
|
|
8740
8778
|
collapsed: false,
|
|
8741
8779
|
setCollapsed: () => {
|
|
8742
8780
|
},
|
|
@@ -8744,12 +8782,12 @@ var AppShellCtx = React136__namespace.default.createContext({
|
|
|
8744
8782
|
setMobileOpen: () => {
|
|
8745
8783
|
}
|
|
8746
8784
|
});
|
|
8747
|
-
var useAppShell = () =>
|
|
8748
|
-
var AppShell =
|
|
8785
|
+
var useAppShell = () => React137__namespace.default.useContext(AppShellCtx);
|
|
8786
|
+
var AppShell = React137__namespace.default.forwardRef(
|
|
8749
8787
|
({ className, defaultCollapsed = false, children, ...props }, ref) => {
|
|
8750
|
-
const [collapsed, setCollapsed] =
|
|
8751
|
-
const [mobileOpen, setMobileOpen] =
|
|
8752
|
-
|
|
8788
|
+
const [collapsed, setCollapsed] = React137__namespace.default.useState(defaultCollapsed);
|
|
8789
|
+
const [mobileOpen, setMobileOpen] = React137__namespace.default.useState(false);
|
|
8790
|
+
React137__namespace.default.useEffect(() => {
|
|
8753
8791
|
const handleClick = (e) => {
|
|
8754
8792
|
const target = e.target;
|
|
8755
8793
|
if (target.closest("a[href]") || target.closest("[data-mobile-close]")) {
|
|
@@ -8780,7 +8818,7 @@ var AppShell = React136__namespace.default.forwardRef(
|
|
|
8780
8818
|
}
|
|
8781
8819
|
);
|
|
8782
8820
|
AppShell.displayName = "AppShell";
|
|
8783
|
-
var AppShellSidebar =
|
|
8821
|
+
var AppShellSidebar = React137__namespace.default.forwardRef(
|
|
8784
8822
|
({ className, ...props }, ref) => {
|
|
8785
8823
|
const { mobileOpen } = useAppShell();
|
|
8786
8824
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -8801,11 +8839,11 @@ var AppShellSidebar = React136__namespace.default.forwardRef(
|
|
|
8801
8839
|
}
|
|
8802
8840
|
);
|
|
8803
8841
|
AppShellSidebar.displayName = "AppShellSidebar";
|
|
8804
|
-
var AppShellMain =
|
|
8842
|
+
var AppShellMain = React137__namespace.default.forwardRef(
|
|
8805
8843
|
({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("div", { ref, className: cn("flex-1 min-w-0 flex flex-col overflow-auto", className), ...props })
|
|
8806
8844
|
);
|
|
8807
8845
|
AppShellMain.displayName = "AppShellMain";
|
|
8808
|
-
var MobileSidebarTrigger =
|
|
8846
|
+
var MobileSidebarTrigger = React137__namespace.default.forwardRef(
|
|
8809
8847
|
({ className, ...props }, ref) => {
|
|
8810
8848
|
const { mobileOpen, setMobileOpen } = useAppShell();
|
|
8811
8849
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -8834,7 +8872,7 @@ var sizeMap5 = {
|
|
|
8834
8872
|
xl: "max-w-screen-xl",
|
|
8835
8873
|
full: "max-w-full"
|
|
8836
8874
|
};
|
|
8837
|
-
var Container =
|
|
8875
|
+
var Container = React137__namespace.default.forwardRef(
|
|
8838
8876
|
({ className, size = "lg", noPadding = false, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
8839
8877
|
"div",
|
|
8840
8878
|
{
|
|
@@ -8850,7 +8888,7 @@ var Container = React136__namespace.default.forwardRef(
|
|
|
8850
8888
|
)
|
|
8851
8889
|
);
|
|
8852
8890
|
Container.displayName = "Container";
|
|
8853
|
-
var Navbar =
|
|
8891
|
+
var Navbar = React137__namespace.default.forwardRef(
|
|
8854
8892
|
({ className, sticky = false, border = true, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
8855
8893
|
"nav",
|
|
8856
8894
|
{
|
|
@@ -8866,7 +8904,7 @@ var Navbar = React136__namespace.default.forwardRef(
|
|
|
8866
8904
|
)
|
|
8867
8905
|
);
|
|
8868
8906
|
Navbar.displayName = "Navbar";
|
|
8869
|
-
var NavbarBrand =
|
|
8907
|
+
var NavbarBrand = React137__namespace.default.forwardRef(
|
|
8870
8908
|
({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("div", { ref, className: cn("flex items-center gap-2 px-4 shrink-0", className), ...props })
|
|
8871
8909
|
);
|
|
8872
8910
|
NavbarBrand.displayName = "NavbarBrand";
|
|
@@ -8875,7 +8913,7 @@ var alignMap = {
|
|
|
8875
8913
|
center: "justify-center flex-1",
|
|
8876
8914
|
end: "justify-end ml-auto"
|
|
8877
8915
|
};
|
|
8878
|
-
var NavbarContent =
|
|
8916
|
+
var NavbarContent = React137__namespace.default.forwardRef(
|
|
8879
8917
|
({ className, align = "start", ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
8880
8918
|
"div",
|
|
8881
8919
|
{
|
|
@@ -8886,11 +8924,11 @@ var NavbarContent = React136__namespace.default.forwardRef(
|
|
|
8886
8924
|
)
|
|
8887
8925
|
);
|
|
8888
8926
|
NavbarContent.displayName = "NavbarContent";
|
|
8889
|
-
var NavbarItem =
|
|
8927
|
+
var NavbarItem = React137__namespace.default.forwardRef(
|
|
8890
8928
|
({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("div", { ref, className: cn("flex items-center", className), ...props })
|
|
8891
8929
|
);
|
|
8892
8930
|
NavbarItem.displayName = "NavbarItem";
|
|
8893
|
-
var Page =
|
|
8931
|
+
var Page = React137__namespace.default.forwardRef(
|
|
8894
8932
|
({ className, maxWidth, style, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
8895
8933
|
"div",
|
|
8896
8934
|
{
|
|
@@ -8902,7 +8940,7 @@ var Page = React136__namespace.default.forwardRef(
|
|
|
8902
8940
|
)
|
|
8903
8941
|
);
|
|
8904
8942
|
Page.displayName = "Page";
|
|
8905
|
-
var PageHeader =
|
|
8943
|
+
var PageHeader = React137__namespace.default.forwardRef(
|
|
8906
8944
|
({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
8907
8945
|
"div",
|
|
8908
8946
|
{
|
|
@@ -8913,7 +8951,7 @@ var PageHeader = React136__namespace.default.forwardRef(
|
|
|
8913
8951
|
)
|
|
8914
8952
|
);
|
|
8915
8953
|
PageHeader.displayName = "PageHeader";
|
|
8916
|
-
var PageTitle =
|
|
8954
|
+
var PageTitle = React137__namespace.default.forwardRef(
|
|
8917
8955
|
({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
8918
8956
|
"h1",
|
|
8919
8957
|
{
|
|
@@ -8924,19 +8962,19 @@ var PageTitle = React136__namespace.default.forwardRef(
|
|
|
8924
8962
|
)
|
|
8925
8963
|
);
|
|
8926
8964
|
PageTitle.displayName = "PageTitle";
|
|
8927
|
-
var PageDescription =
|
|
8965
|
+
var PageDescription = React137__namespace.default.forwardRef(
|
|
8928
8966
|
({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("p", { ref, className: cn("text-sm text-[hsl(var(--muted-foreground))] mt-1", className), ...props })
|
|
8929
8967
|
);
|
|
8930
8968
|
PageDescription.displayName = "PageDescription";
|
|
8931
|
-
var PageActions =
|
|
8969
|
+
var PageActions = React137__namespace.default.forwardRef(
|
|
8932
8970
|
({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("div", { ref, className: cn("flex items-center gap-2 shrink-0", className), ...props })
|
|
8933
8971
|
);
|
|
8934
8972
|
PageActions.displayName = "PageActions";
|
|
8935
|
-
var PageBody =
|
|
8973
|
+
var PageBody = React137__namespace.default.forwardRef(
|
|
8936
8974
|
({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("div", { ref, className: cn("flex-1 p-6 flex flex-col gap-6", className), ...props })
|
|
8937
8975
|
);
|
|
8938
8976
|
PageBody.displayName = "PageBody";
|
|
8939
|
-
var ResizeBox =
|
|
8977
|
+
var ResizeBox = React137__namespace.default.forwardRef(
|
|
8940
8978
|
({ className, resize = "both", minWidth = 100, minHeight = 100, style, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
8941
8979
|
"div",
|
|
8942
8980
|
{
|
|
@@ -8953,7 +8991,7 @@ var HandleIcon = () => /* @__PURE__ */ jsxRuntime.jsxs("svg", { width: "10", hei
|
|
|
8953
8991
|
/* @__PURE__ */ jsxRuntime.jsx("path", { d: "M8 5L5 8", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round" }),
|
|
8954
8992
|
/* @__PURE__ */ jsxRuntime.jsx("path", { d: "M8 8L8 8", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round" })
|
|
8955
8993
|
] });
|
|
8956
|
-
var ResizeHandle =
|
|
8994
|
+
var ResizeHandle = React137__namespace.default.forwardRef(
|
|
8957
8995
|
({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
8958
8996
|
"div",
|
|
8959
8997
|
{
|
|
@@ -8969,16 +9007,16 @@ var ResizeHandle = React136__namespace.default.forwardRef(
|
|
|
8969
9007
|
)
|
|
8970
9008
|
);
|
|
8971
9009
|
ResizeHandle.displayName = "ResizeHandle";
|
|
8972
|
-
var SidebarCtx2 =
|
|
8973
|
-
var useSidebarCtx = () =>
|
|
9010
|
+
var SidebarCtx2 = React137__namespace.default.createContext({ collapsed: false });
|
|
9011
|
+
var useSidebarCtx = () => React137__namespace.default.useContext(SidebarCtx2);
|
|
8974
9012
|
var makeSlot = (name, cls) => {
|
|
8975
|
-
const C =
|
|
9013
|
+
const C = React137__namespace.default.forwardRef(
|
|
8976
9014
|
({ className, ...p }, ref) => /* @__PURE__ */ jsxRuntime.jsx("div", { ref, className: cn(cls, className), ...p })
|
|
8977
9015
|
);
|
|
8978
9016
|
C.displayName = name;
|
|
8979
9017
|
return C;
|
|
8980
9018
|
};
|
|
8981
|
-
var Sidebar2 =
|
|
9019
|
+
var Sidebar2 = React137__namespace.default.forwardRef(
|
|
8982
9020
|
({ className, collapsed = false, onCollapse, width = "240px", style, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(SidebarCtx2.Provider, { value: { collapsed }, children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
8983
9021
|
"div",
|
|
8984
9022
|
{
|
|
@@ -9006,7 +9044,7 @@ var SidebarContent = makeSlot("SidebarContent", "flex-1 overflow-y-auto py-2");
|
|
|
9006
9044
|
var SidebarFooter2 = makeSlot("SidebarFooter", "px-3 py-3 border-t border-[hsl(var(--border))] shrink-0");
|
|
9007
9045
|
var SidebarGroup = makeSlot("SidebarGroup", "mb-2");
|
|
9008
9046
|
var SidebarSeparator2 = makeSlot("SidebarSeparator", "h-px bg-[hsl(var(--border))] mx-3 my-2");
|
|
9009
|
-
var SidebarGroupLabel =
|
|
9047
|
+
var SidebarGroupLabel = React137__namespace.default.forwardRef(
|
|
9010
9048
|
({ className, ...props }, ref) => {
|
|
9011
9049
|
const { collapsed } = useSidebarCtx();
|
|
9012
9050
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -9020,7 +9058,7 @@ var SidebarGroupLabel = React136__namespace.default.forwardRef(
|
|
|
9020
9058
|
}
|
|
9021
9059
|
);
|
|
9022
9060
|
SidebarGroupLabel.displayName = "SidebarGroupLabel";
|
|
9023
|
-
var SidebarItem2 =
|
|
9061
|
+
var SidebarItem2 = React137__namespace.default.forwardRef(
|
|
9024
9062
|
({ className, icon, label, active, href, badge, onClick, ...props }, ref) => {
|
|
9025
9063
|
const { collapsed } = useSidebarCtx();
|
|
9026
9064
|
const cls = cn(
|
|
@@ -9039,11 +9077,11 @@ var SidebarItem2 = React136__namespace.default.forwardRef(
|
|
|
9039
9077
|
}
|
|
9040
9078
|
);
|
|
9041
9079
|
SidebarItem2.displayName = "SidebarItem";
|
|
9042
|
-
var SplitPage =
|
|
9080
|
+
var SplitPage = React137__namespace.default.forwardRef(
|
|
9043
9081
|
({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("div", { ref, className: cn("flex h-full w-full overflow-hidden", className), ...props })
|
|
9044
9082
|
);
|
|
9045
9083
|
SplitPage.displayName = "SplitPage";
|
|
9046
|
-
var SplitPageList =
|
|
9084
|
+
var SplitPageList = React137__namespace.default.forwardRef(
|
|
9047
9085
|
({ className, width = "320px", style, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
9048
9086
|
"div",
|
|
9049
9087
|
{
|
|
@@ -9055,7 +9093,7 @@ var SplitPageList = React136__namespace.default.forwardRef(
|
|
|
9055
9093
|
)
|
|
9056
9094
|
);
|
|
9057
9095
|
SplitPageList.displayName = "SplitPageList";
|
|
9058
|
-
var SplitPageDetail =
|
|
9096
|
+
var SplitPageDetail = React137__namespace.default.forwardRef(
|
|
9059
9097
|
({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("div", { ref, className: cn("flex-1 min-w-0 h-full overflow-auto", className), ...props })
|
|
9060
9098
|
);
|
|
9061
9099
|
SplitPageDetail.displayName = "SplitPageDetail";
|
|
@@ -9080,7 +9118,7 @@ var justifyMap = {
|
|
|
9080
9118
|
around: "justify-around",
|
|
9081
9119
|
evenly: "justify-evenly"
|
|
9082
9120
|
};
|
|
9083
|
-
var Stack =
|
|
9121
|
+
var Stack = React137__namespace.default.forwardRef(
|
|
9084
9122
|
({ className, gap, direction = "col", align, justify, wrap, style, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
9085
9123
|
"div",
|
|
9086
9124
|
{
|
|
@@ -9099,15 +9137,15 @@ var Stack = React136__namespace.default.forwardRef(
|
|
|
9099
9137
|
)
|
|
9100
9138
|
);
|
|
9101
9139
|
Stack.displayName = "Stack";
|
|
9102
|
-
var HStack =
|
|
9140
|
+
var HStack = React137__namespace.default.forwardRef(
|
|
9103
9141
|
(props, ref) => /* @__PURE__ */ jsxRuntime.jsx(Stack, { ref, direction: "row", ...props })
|
|
9104
9142
|
);
|
|
9105
9143
|
HStack.displayName = "HStack";
|
|
9106
|
-
var VStack =
|
|
9144
|
+
var VStack = React137__namespace.default.forwardRef(
|
|
9107
9145
|
(props, ref) => /* @__PURE__ */ jsxRuntime.jsx(Stack, { ref, direction: "col", ...props })
|
|
9108
9146
|
);
|
|
9109
9147
|
VStack.displayName = "VStack";
|
|
9110
|
-
var PageLayout =
|
|
9148
|
+
var PageLayout = React137__namespace.default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
9111
9149
|
"div",
|
|
9112
9150
|
{
|
|
9113
9151
|
ref,
|
|
@@ -9117,7 +9155,7 @@ var PageLayout = React136__namespace.default.forwardRef(({ className, ...props }
|
|
|
9117
9155
|
}
|
|
9118
9156
|
));
|
|
9119
9157
|
PageLayout.displayName = "PageLayout";
|
|
9120
|
-
var PageHeader2 =
|
|
9158
|
+
var PageHeader2 = React137__namespace.default.forwardRef(
|
|
9121
9159
|
({ className, title, description, actions, back, children }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
9122
9160
|
"div",
|
|
9123
9161
|
{
|
|
@@ -9139,7 +9177,7 @@ var PageHeader2 = React136__namespace.default.forwardRef(
|
|
|
9139
9177
|
)
|
|
9140
9178
|
);
|
|
9141
9179
|
PageHeader2.displayName = "PageHeader";
|
|
9142
|
-
var PageContainer =
|
|
9180
|
+
var PageContainer = React137__namespace.default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
9143
9181
|
"div",
|
|
9144
9182
|
{
|
|
9145
9183
|
ref,
|
|
@@ -9153,7 +9191,7 @@ var PageContainer = React136__namespace.default.forwardRef(({ className, ...prop
|
|
|
9153
9191
|
}
|
|
9154
9192
|
));
|
|
9155
9193
|
PageContainer.displayName = "PageContainer";
|
|
9156
|
-
var PageMain =
|
|
9194
|
+
var PageMain = React137__namespace.default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
9157
9195
|
"div",
|
|
9158
9196
|
{
|
|
9159
9197
|
ref,
|
|
@@ -9168,7 +9206,7 @@ var PageMain = React136__namespace.default.forwardRef(({ className, ...props },
|
|
|
9168
9206
|
}
|
|
9169
9207
|
));
|
|
9170
9208
|
PageMain.displayName = "PageMain";
|
|
9171
|
-
var CommandPaletteCtx =
|
|
9209
|
+
var CommandPaletteCtx = React137.createContext({
|
|
9172
9210
|
open: false,
|
|
9173
9211
|
setOpen: () => {
|
|
9174
9212
|
},
|
|
@@ -9178,9 +9216,9 @@ var CommandPaletteCtx = React136.createContext({
|
|
|
9178
9216
|
function CommandPaletteProvider({
|
|
9179
9217
|
children
|
|
9180
9218
|
}) {
|
|
9181
|
-
const [open, setOpen] =
|
|
9182
|
-
const toggle =
|
|
9183
|
-
|
|
9219
|
+
const [open, setOpen] = React137.useState(false);
|
|
9220
|
+
const toggle = React137.useCallback(() => setOpen((v) => !v), []);
|
|
9221
|
+
React137.useEffect(() => {
|
|
9184
9222
|
const down = (e) => {
|
|
9185
9223
|
if (e.key === "k" && (e.metaKey || e.ctrlKey) || e.key === "/") {
|
|
9186
9224
|
if (e.key === "/" && e.target.tagName !== "BODY") return;
|
|
@@ -9194,7 +9232,7 @@ function CommandPaletteProvider({
|
|
|
9194
9232
|
return /* @__PURE__ */ jsxRuntime.jsx(CommandPaletteCtx.Provider, { value: { open, setOpen, toggle }, children });
|
|
9195
9233
|
}
|
|
9196
9234
|
function useCommandPalette() {
|
|
9197
|
-
return
|
|
9235
|
+
return React137.useContext(CommandPaletteCtx);
|
|
9198
9236
|
}
|
|
9199
9237
|
function CommandPalette({
|
|
9200
9238
|
open,
|
|
@@ -9302,7 +9340,7 @@ function CommandPalette({
|
|
|
9302
9340
|
)
|
|
9303
9341
|
] });
|
|
9304
9342
|
}
|
|
9305
|
-
var HotkeysCtx =
|
|
9343
|
+
var HotkeysCtx = React137.createContext({
|
|
9306
9344
|
hotkeys: [],
|
|
9307
9345
|
registerHotkeys: () => () => {
|
|
9308
9346
|
}
|
|
@@ -9325,16 +9363,16 @@ function HotkeysProvider({
|
|
|
9325
9363
|
children,
|
|
9326
9364
|
hotkeys: initialHotkeys = []
|
|
9327
9365
|
}) {
|
|
9328
|
-
const [hotkeys, setHotkeys] =
|
|
9329
|
-
const seqRef =
|
|
9330
|
-
const seqTimerRef =
|
|
9331
|
-
const registerHotkeys =
|
|
9366
|
+
const [hotkeys, setHotkeys] = React137.useState(initialHotkeys);
|
|
9367
|
+
const seqRef = React137.useRef([]);
|
|
9368
|
+
const seqTimerRef = React137.useRef(null);
|
|
9369
|
+
const registerHotkeys = React137.useCallback((newHotkeys) => {
|
|
9332
9370
|
setHotkeys((prev) => [...prev, ...newHotkeys]);
|
|
9333
9371
|
return () => {
|
|
9334
9372
|
setHotkeys((prev) => prev.filter((h) => !newHotkeys.includes(h)));
|
|
9335
9373
|
};
|
|
9336
9374
|
}, []);
|
|
9337
|
-
|
|
9375
|
+
React137.useEffect(() => {
|
|
9338
9376
|
const handleKeyDown = (e) => {
|
|
9339
9377
|
const target = e.target;
|
|
9340
9378
|
if (target.tagName === "INPUT" || target.tagName === "TEXTAREA" || target.tagName === "SELECT" || target.isContentEditable) {
|
|
@@ -9374,14 +9412,14 @@ function HotkeysProvider({
|
|
|
9374
9412
|
return /* @__PURE__ */ jsxRuntime.jsx(HotkeysCtx.Provider, { value: { hotkeys, registerHotkeys }, children });
|
|
9375
9413
|
}
|
|
9376
9414
|
function useHotkeys() {
|
|
9377
|
-
return
|
|
9415
|
+
return React137.useContext(HotkeysCtx);
|
|
9378
9416
|
}
|
|
9379
9417
|
function HelpSheet({
|
|
9380
9418
|
open,
|
|
9381
9419
|
onClose
|
|
9382
9420
|
}) {
|
|
9383
9421
|
const { hotkeys } = useHotkeys();
|
|
9384
|
-
|
|
9422
|
+
React137.useEffect(() => {
|
|
9385
9423
|
const handleEsc = (e) => {
|
|
9386
9424
|
if (e.key === "Escape" && open) onClose();
|
|
9387
9425
|
};
|
|
@@ -9535,9 +9573,9 @@ function ToastItem({ toast: t, onDismiss }) {
|
|
|
9535
9573
|
);
|
|
9536
9574
|
}
|
|
9537
9575
|
function Toaster() {
|
|
9538
|
-
const [toasts, setToasts] =
|
|
9539
|
-
const timers =
|
|
9540
|
-
const dismiss =
|
|
9576
|
+
const [toasts, setToasts] = React137.useState([]);
|
|
9577
|
+
const timers = React137.useRef(/* @__PURE__ */ new Map());
|
|
9578
|
+
const dismiss = React137.useCallback((id) => {
|
|
9541
9579
|
setToasts(
|
|
9542
9580
|
(prev) => prev.map((t) => t.id === id ? { ...t, visible: false } : t)
|
|
9543
9581
|
);
|
|
@@ -9550,7 +9588,7 @@ function Toaster() {
|
|
|
9550
9588
|
timers.current.delete(id);
|
|
9551
9589
|
}
|
|
9552
9590
|
}, []);
|
|
9553
|
-
|
|
9591
|
+
React137.useEffect(() => {
|
|
9554
9592
|
const unsubToast = toastEmitter.onToast((event) => {
|
|
9555
9593
|
setToasts((prev) => {
|
|
9556
9594
|
const next = [
|
|
@@ -9599,7 +9637,7 @@ var directionClasses = {
|
|
|
9599
9637
|
bl: "bg-gradient-to-bl",
|
|
9600
9638
|
l: "bg-gradient-to-l"
|
|
9601
9639
|
};
|
|
9602
|
-
var GradientHeading =
|
|
9640
|
+
var GradientHeading = React137__namespace.default.forwardRef(
|
|
9603
9641
|
({
|
|
9604
9642
|
as: Tag = "h2",
|
|
9605
9643
|
preset = "primary",
|
|
@@ -9645,7 +9683,7 @@ function formatNumber(value, decimals, format3, locale) {
|
|
|
9645
9683
|
}
|
|
9646
9684
|
return decimals > 0 ? value.toFixed(decimals) : String(Math.round(value));
|
|
9647
9685
|
}
|
|
9648
|
-
var AnimatedNumber =
|
|
9686
|
+
var AnimatedNumber = React137__namespace.default.forwardRef(
|
|
9649
9687
|
({
|
|
9650
9688
|
value,
|
|
9651
9689
|
from = 0,
|
|
@@ -9660,12 +9698,12 @@ var AnimatedNumber = React136__namespace.default.forwardRef(
|
|
|
9660
9698
|
className,
|
|
9661
9699
|
...props
|
|
9662
9700
|
}, ref) => {
|
|
9663
|
-
const [displayed, setDisplayed] =
|
|
9664
|
-
const rafRef =
|
|
9665
|
-
const startTimeRef =
|
|
9666
|
-
const containerRef =
|
|
9667
|
-
const hasStarted =
|
|
9668
|
-
const runAnimation =
|
|
9701
|
+
const [displayed, setDisplayed] = React137.useState(autoStart ? from : value);
|
|
9702
|
+
const rafRef = React137.useRef(null);
|
|
9703
|
+
const startTimeRef = React137.useRef(null);
|
|
9704
|
+
const containerRef = React137.useRef(null);
|
|
9705
|
+
const hasStarted = React137.useRef(false);
|
|
9706
|
+
const runAnimation = React137__namespace.default.useCallback(
|
|
9669
9707
|
(startFrom) => {
|
|
9670
9708
|
if (rafRef.current !== null) cancelAnimationFrame(rafRef.current);
|
|
9671
9709
|
startTimeRef.current = null;
|
|
@@ -9688,7 +9726,7 @@ var AnimatedNumber = React136__namespace.default.forwardRef(
|
|
|
9688
9726
|
},
|
|
9689
9727
|
[value, duration, easing]
|
|
9690
9728
|
);
|
|
9691
|
-
|
|
9729
|
+
React137.useEffect(() => {
|
|
9692
9730
|
if (!autoStart) return void 0;
|
|
9693
9731
|
if (typeof IntersectionObserver !== "undefined") {
|
|
9694
9732
|
const el = containerRef.current;
|
|
@@ -9709,11 +9747,11 @@ var AnimatedNumber = React136__namespace.default.forwardRef(
|
|
|
9709
9747
|
return void 0;
|
|
9710
9748
|
}
|
|
9711
9749
|
}, []);
|
|
9712
|
-
|
|
9750
|
+
React137.useEffect(() => {
|
|
9713
9751
|
if (!hasStarted.current) return;
|
|
9714
9752
|
runAnimation(displayed);
|
|
9715
9753
|
}, [value]);
|
|
9716
|
-
|
|
9754
|
+
React137.useEffect(() => {
|
|
9717
9755
|
return () => {
|
|
9718
9756
|
if (rafRef.current !== null) cancelAnimationFrame(rafRef.current);
|
|
9719
9757
|
};
|
|
@@ -9753,9 +9791,9 @@ function TextReveal({
|
|
|
9753
9791
|
className,
|
|
9754
9792
|
style
|
|
9755
9793
|
}) {
|
|
9756
|
-
const [revealed, setRevealed] =
|
|
9757
|
-
const containerRef =
|
|
9758
|
-
|
|
9794
|
+
const [revealed, setRevealed] = React137.useState(false);
|
|
9795
|
+
const containerRef = React137.useRef(null);
|
|
9796
|
+
React137.useEffect(() => {
|
|
9759
9797
|
if (!autoStart) return void 0;
|
|
9760
9798
|
const el = containerRef.current;
|
|
9761
9799
|
if (!el) return void 0;
|
|
@@ -9777,7 +9815,7 @@ function TextReveal({
|
|
|
9777
9815
|
}
|
|
9778
9816
|
}, [autoStart, delay]);
|
|
9779
9817
|
const units = mode === "chars" ? text.split("") : mode === "words" ? text.split(" ") : [text];
|
|
9780
|
-
return
|
|
9818
|
+
return React137__namespace.default.createElement(
|
|
9781
9819
|
Tag,
|
|
9782
9820
|
{
|
|
9783
9821
|
ref: containerRef,
|
|
@@ -9817,16 +9855,16 @@ function Typewriter({
|
|
|
9817
9855
|
className,
|
|
9818
9856
|
style
|
|
9819
9857
|
}) {
|
|
9820
|
-
const [display, setDisplay] =
|
|
9821
|
-
const [phase, setPhase] =
|
|
9822
|
-
const [wordIdx, setWordIdx] =
|
|
9823
|
-
const [cursorVisible, setCursorVisible] =
|
|
9824
|
-
const timerRef =
|
|
9825
|
-
|
|
9858
|
+
const [display, setDisplay] = React137.useState("");
|
|
9859
|
+
const [phase, setPhase] = React137.useState("typing");
|
|
9860
|
+
const [wordIdx, setWordIdx] = React137.useState(0);
|
|
9861
|
+
const [cursorVisible, setCursorVisible] = React137.useState(true);
|
|
9862
|
+
const timerRef = React137.useRef(null);
|
|
9863
|
+
React137.useEffect(() => {
|
|
9826
9864
|
const id = setInterval(() => setCursorVisible((v) => !v), 530);
|
|
9827
9865
|
return () => clearInterval(id);
|
|
9828
9866
|
}, []);
|
|
9829
|
-
|
|
9867
|
+
React137.useEffect(() => {
|
|
9830
9868
|
if (!words.length) return void 0;
|
|
9831
9869
|
const word = words[wordIdx] ?? "";
|
|
9832
9870
|
if (phase === "typing") {
|
|
@@ -9857,7 +9895,7 @@ function Typewriter({
|
|
|
9857
9895
|
if (timerRef.current) clearTimeout(timerRef.current);
|
|
9858
9896
|
};
|
|
9859
9897
|
}, [display, phase, wordIdx, words, typeSpeed, deleteSpeed, pauseAfter, loop]);
|
|
9860
|
-
return
|
|
9898
|
+
return React137__namespace.default.createElement(
|
|
9861
9899
|
Tag,
|
|
9862
9900
|
{
|
|
9863
9901
|
"data-slot": "typewriter",
|
|
@@ -9896,9 +9934,9 @@ var headingVariants = classVarianceAuthority.cva("font-heading tracking-tight te
|
|
|
9896
9934
|
},
|
|
9897
9935
|
defaultVariants: { size: "lg", tone: "default" }
|
|
9898
9936
|
});
|
|
9899
|
-
var Heading =
|
|
9937
|
+
var Heading = React137__namespace.default.forwardRef(
|
|
9900
9938
|
({ as: Tag = "h2", size, tone, className, ...props }, ref) => {
|
|
9901
|
-
return
|
|
9939
|
+
return React137__namespace.default.createElement(Tag, {
|
|
9902
9940
|
ref,
|
|
9903
9941
|
"data-slot": "heading",
|
|
9904
9942
|
className: cn(headingVariants({ size, tone }), className),
|
|
@@ -9928,9 +9966,9 @@ var bodyVariants = classVarianceAuthority.cva("font-sans", {
|
|
|
9928
9966
|
},
|
|
9929
9967
|
defaultVariants: { size: "md", tone: "default", weight: "normal" }
|
|
9930
9968
|
});
|
|
9931
|
-
var Body =
|
|
9969
|
+
var Body = React137__namespace.default.forwardRef(
|
|
9932
9970
|
({ as: Tag = "p", size, tone, weight, className, ...props }, ref) => {
|
|
9933
|
-
return
|
|
9971
|
+
return React137__namespace.default.createElement(Tag, {
|
|
9934
9972
|
ref,
|
|
9935
9973
|
"data-slot": "body",
|
|
9936
9974
|
className: cn(bodyVariants({ size, tone, weight }), className),
|
|
@@ -9949,7 +9987,7 @@ var captionVariants = classVarianceAuthority.cva("font-sans text-[11px] font-sem
|
|
|
9949
9987
|
},
|
|
9950
9988
|
defaultVariants: { tone: "default" }
|
|
9951
9989
|
});
|
|
9952
|
-
var Caption =
|
|
9990
|
+
var Caption = React137__namespace.default.forwardRef(
|
|
9953
9991
|
({ tone, className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
9954
9992
|
"span",
|
|
9955
9993
|
{
|
|
@@ -9961,7 +9999,7 @@ var Caption = React136__namespace.default.forwardRef(
|
|
|
9961
9999
|
)
|
|
9962
10000
|
);
|
|
9963
10001
|
Caption.displayName = "Caption";
|
|
9964
|
-
var Code3 =
|
|
10002
|
+
var Code3 = React137__namespace.default.forwardRef(
|
|
9965
10003
|
({ block, className, children, ...props }, ref) => {
|
|
9966
10004
|
if (block) {
|
|
9967
10005
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -10013,7 +10051,7 @@ var presetStyles = {
|
|
|
10013
10051
|
},
|
|
10014
10052
|
custom: {}
|
|
10015
10053
|
};
|
|
10016
|
-
var GradientBackground =
|
|
10054
|
+
var GradientBackground = React137__namespace.default.forwardRef(
|
|
10017
10055
|
({
|
|
10018
10056
|
fixed = false,
|
|
10019
10057
|
preset = "slate",
|
|
@@ -10072,7 +10110,7 @@ var DEFAULT_COLORS4 = [
|
|
|
10072
10110
|
"hsl(280 100% 70% / 0.25)",
|
|
10073
10111
|
"hsl(217 33% 17% / 0.4)"
|
|
10074
10112
|
];
|
|
10075
|
-
var AnimatedGradient =
|
|
10113
|
+
var AnimatedGradient = React137__namespace.default.forwardRef(
|
|
10076
10114
|
({
|
|
10077
10115
|
colors = DEFAULT_COLORS4,
|
|
10078
10116
|
speed = 1,
|
|
@@ -10083,7 +10121,7 @@ var AnimatedGradient = React136__namespace.default.forwardRef(
|
|
|
10083
10121
|
style,
|
|
10084
10122
|
...props
|
|
10085
10123
|
}, ref) => {
|
|
10086
|
-
const idRef =
|
|
10124
|
+
const idRef = React137.useRef(`ag-${Math.random().toString(36).slice(2, 7)}`);
|
|
10087
10125
|
idRef.current;
|
|
10088
10126
|
const [c0 = DEFAULT_COLORS4[0], c1 = DEFAULT_COLORS4[1], c2 = DEFAULT_COLORS4[2]] = colors;
|
|
10089
10127
|
const duration0 = (12 / speed).toFixed(1);
|
|
@@ -10191,7 +10229,7 @@ var AnimatedGradient = React136__namespace.default.forwardRef(
|
|
|
10191
10229
|
}
|
|
10192
10230
|
);
|
|
10193
10231
|
AnimatedGradient.displayName = "AnimatedGradient";
|
|
10194
|
-
var DottedBackground =
|
|
10232
|
+
var DottedBackground = React137__namespace.default.forwardRef(
|
|
10195
10233
|
({
|
|
10196
10234
|
color,
|
|
10197
10235
|
dotSize = 1,
|
|
@@ -10238,7 +10276,7 @@ var DottedBackground = React136__namespace.default.forwardRef(
|
|
|
10238
10276
|
}
|
|
10239
10277
|
);
|
|
10240
10278
|
DottedBackground.displayName = "DottedBackground";
|
|
10241
|
-
var NoiseBackground =
|
|
10279
|
+
var NoiseBackground = React137__namespace.default.forwardRef(
|
|
10242
10280
|
({
|
|
10243
10281
|
opacity = 0.04,
|
|
10244
10282
|
frequency = 0.65,
|
|
@@ -10334,7 +10372,7 @@ var DEFAULT_COLORS5 = [
|
|
|
10334
10372
|
[0.55, 0.3, 0.95]
|
|
10335
10373
|
// chart-3 violet
|
|
10336
10374
|
];
|
|
10337
|
-
var HeroShaderA =
|
|
10375
|
+
var HeroShaderA = React137__namespace.default.forwardRef(
|
|
10338
10376
|
({
|
|
10339
10377
|
className,
|
|
10340
10378
|
colors = DEFAULT_COLORS5,
|
|
@@ -10345,11 +10383,11 @@ var HeroShaderA = React136__namespace.default.forwardRef(
|
|
|
10345
10383
|
style,
|
|
10346
10384
|
...props
|
|
10347
10385
|
}, ref) => {
|
|
10348
|
-
const wrapRef =
|
|
10349
|
-
const canvasRef =
|
|
10350
|
-
const fallbackRef =
|
|
10351
|
-
|
|
10352
|
-
|
|
10386
|
+
const wrapRef = React137.useRef(null);
|
|
10387
|
+
const canvasRef = React137.useRef(null);
|
|
10388
|
+
const fallbackRef = React137.useRef(false);
|
|
10389
|
+
React137__namespace.default.useImperativeHandle(ref, () => wrapRef.current);
|
|
10390
|
+
React137.useEffect(() => {
|
|
10353
10391
|
if (typeof window === "undefined") return;
|
|
10354
10392
|
const reduceMotion = window.matchMedia("(prefers-reduced-motion: reduce)").matches;
|
|
10355
10393
|
const canvas = canvasRef.current;
|
|
@@ -10485,7 +10523,7 @@ var HeroShaderA = React136__namespace.default.forwardRef(
|
|
|
10485
10523
|
}
|
|
10486
10524
|
);
|
|
10487
10525
|
HeroShaderA.displayName = "HeroShaderA";
|
|
10488
|
-
var ScrollHeader =
|
|
10526
|
+
var ScrollHeader = React137__namespace.default.forwardRef(
|
|
10489
10527
|
({
|
|
10490
10528
|
title,
|
|
10491
10529
|
subtitle,
|
|
@@ -10497,8 +10535,8 @@ var ScrollHeader = React136__namespace.default.forwardRef(
|
|
|
10497
10535
|
sticky = true,
|
|
10498
10536
|
className
|
|
10499
10537
|
}, ref) => {
|
|
10500
|
-
const [scrolled, setScrolled] =
|
|
10501
|
-
|
|
10538
|
+
const [scrolled, setScrolled] = React137.useState(false);
|
|
10539
|
+
React137.useEffect(() => {
|
|
10502
10540
|
const container = scrollRef?.current ?? window;
|
|
10503
10541
|
const handleScroll = () => {
|
|
10504
10542
|
const scrollY = container === window ? window.scrollY : container.scrollTop;
|
|
@@ -10572,7 +10610,7 @@ var DEFAULT_TRANSITION = {
|
|
|
10572
10610
|
ease: [0.16, 1, 0.3, 1]
|
|
10573
10611
|
// ease-out-expo (BezierDefinition)
|
|
10574
10612
|
};
|
|
10575
|
-
var FadeIn =
|
|
10613
|
+
var FadeIn = React137__namespace.default.forwardRef(
|
|
10576
10614
|
({ delay = 0, duration, children, ...props }, ref) => {
|
|
10577
10615
|
const transition = {
|
|
10578
10616
|
...DEFAULT_TRANSITION,
|
|
@@ -10600,7 +10638,7 @@ var DIRECTION_PRESET_MAP = {
|
|
|
10600
10638
|
left: "slideLeft",
|
|
10601
10639
|
right: "slideRight"
|
|
10602
10640
|
};
|
|
10603
|
-
var SlideIn =
|
|
10641
|
+
var SlideIn = React137__namespace.default.forwardRef(
|
|
10604
10642
|
({ direction = "up", delay = 0, duration, children, ...props }, ref) => {
|
|
10605
10643
|
const preset = MOTION_PRESETS[DIRECTION_PRESET_MAP[direction]];
|
|
10606
10644
|
const transition = {
|
|
@@ -10623,7 +10661,7 @@ var SlideIn = React136__namespace.default.forwardRef(
|
|
|
10623
10661
|
}
|
|
10624
10662
|
);
|
|
10625
10663
|
SlideIn.displayName = "SlideIn";
|
|
10626
|
-
var ScaleIn =
|
|
10664
|
+
var ScaleIn = React137__namespace.default.forwardRef(
|
|
10627
10665
|
({ delay = 0, duration, children, ...props }, ref) => {
|
|
10628
10666
|
const transition = {
|
|
10629
10667
|
...DEFAULT_TRANSITION,
|
|
@@ -10646,7 +10684,7 @@ var ScaleIn = React136__namespace.default.forwardRef(
|
|
|
10646
10684
|
);
|
|
10647
10685
|
ScaleIn.displayName = "ScaleIn";
|
|
10648
10686
|
function Reveal({ preset = "fadeIn", delay = 0, once = true, children, className }) {
|
|
10649
|
-
const ref =
|
|
10687
|
+
const ref = React137.useRef(null);
|
|
10650
10688
|
const isInView = react.useInView(ref, { once });
|
|
10651
10689
|
const variants = MOTION_PRESETS[preset];
|
|
10652
10690
|
const transition = { ...DEFAULT_TRANSITION, delay };
|
|
@@ -10664,7 +10702,7 @@ function Reveal({ preset = "fadeIn", delay = 0, once = true, children, className
|
|
|
10664
10702
|
);
|
|
10665
10703
|
}
|
|
10666
10704
|
function Stagger({ staggerDelay = 0.05, preset = "fadeIn", children, className, once = true }) {
|
|
10667
|
-
const ref =
|
|
10705
|
+
const ref = React137.useRef(null);
|
|
10668
10706
|
const isInView = react.useInView(ref, { once });
|
|
10669
10707
|
const childVariants = MOTION_PRESETS[preset];
|
|
10670
10708
|
const containerVariants = {
|
|
@@ -10687,19 +10725,19 @@ function Stagger({ staggerDelay = 0.05, preset = "fadeIn", children, className,
|
|
|
10687
10725
|
initial: "hidden",
|
|
10688
10726
|
animate: isInView ? "visible" : "hidden",
|
|
10689
10727
|
className,
|
|
10690
|
-
children:
|
|
10728
|
+
children: React137__namespace.default.Children.map(children, (child, i) => /* @__PURE__ */ jsxRuntime.jsx(react.motion.div, { variants: itemVariants, children: child }, i))
|
|
10691
10729
|
}
|
|
10692
10730
|
);
|
|
10693
10731
|
}
|
|
10694
|
-
var Morph =
|
|
10732
|
+
var Morph = React137__namespace.default.forwardRef(
|
|
10695
10733
|
({ layoutId, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(react.motion.div, { ref, layoutId, layout: true, ...props, children })
|
|
10696
10734
|
);
|
|
10697
10735
|
Morph.displayName = "Morph";
|
|
10698
10736
|
var rippleCounter = 0;
|
|
10699
|
-
var Ripple =
|
|
10737
|
+
var Ripple = React137__namespace.default.forwardRef(
|
|
10700
10738
|
({ color = "currentColor", duration = 0.6, children, style, ...props }, ref) => {
|
|
10701
|
-
const [ripples, setRipples] =
|
|
10702
|
-
const handlePointerDown =
|
|
10739
|
+
const [ripples, setRipples] = React137.useState([]);
|
|
10740
|
+
const handlePointerDown = React137.useCallback(
|
|
10703
10741
|
(e) => {
|
|
10704
10742
|
const rect = e.currentTarget.getBoundingClientRect();
|
|
10705
10743
|
const x = e.clientX - rect.left;
|
|
@@ -10710,7 +10748,7 @@ var Ripple = React136__namespace.default.forwardRef(
|
|
|
10710
10748
|
},
|
|
10711
10749
|
[]
|
|
10712
10750
|
);
|
|
10713
|
-
const removeRipple =
|
|
10751
|
+
const removeRipple = React137.useCallback((key) => {
|
|
10714
10752
|
setRipples((prev) => prev.filter((r) => r.key !== key));
|
|
10715
10753
|
}, []);
|
|
10716
10754
|
const rippleTransition = {
|
|
@@ -10752,9 +10790,9 @@ var Ripple = React136__namespace.default.forwardRef(
|
|
|
10752
10790
|
}
|
|
10753
10791
|
);
|
|
10754
10792
|
Ripple.displayName = "Ripple";
|
|
10755
|
-
var Parallax =
|
|
10793
|
+
var Parallax = React137__namespace.default.forwardRef(
|
|
10756
10794
|
({ offset = 50, scrollRef, children, style, ...props }, ref) => {
|
|
10757
|
-
const innerRef =
|
|
10795
|
+
const innerRef = React137.useRef(null);
|
|
10758
10796
|
const resolvedRef = ref ?? innerRef;
|
|
10759
10797
|
const { scrollYProgress } = react.useScroll({
|
|
10760
10798
|
target: resolvedRef,
|
|
@@ -10775,13 +10813,334 @@ var Parallax = React136__namespace.default.forwardRef(
|
|
|
10775
10813
|
);
|
|
10776
10814
|
Parallax.displayName = "Parallax";
|
|
10777
10815
|
function useLayoutId(key) {
|
|
10778
|
-
const id =
|
|
10816
|
+
const id = React137.useId();
|
|
10779
10817
|
return `${key}-${id}`;
|
|
10780
10818
|
}
|
|
10781
10819
|
function Transition({ show = true, children, mode = "wait" }) {
|
|
10782
10820
|
return /* @__PURE__ */ jsxRuntime.jsx(react.AnimatePresence, { mode, children: show ? children : null });
|
|
10783
10821
|
}
|
|
10784
|
-
|
|
10822
|
+
function Checkbox2({
|
|
10823
|
+
checked,
|
|
10824
|
+
onCheckedChange,
|
|
10825
|
+
className
|
|
10826
|
+
}) {
|
|
10827
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
10828
|
+
"input",
|
|
10829
|
+
{
|
|
10830
|
+
type: "checkbox",
|
|
10831
|
+
checked: checked === true,
|
|
10832
|
+
ref: (el) => {
|
|
10833
|
+
if (el) el.indeterminate = checked === "indeterminate";
|
|
10834
|
+
},
|
|
10835
|
+
onChange: (e) => onCheckedChange(e.target.checked),
|
|
10836
|
+
className: cn(
|
|
10837
|
+
"h-4 w-4 rounded border border-input accent-primary cursor-pointer",
|
|
10838
|
+
"focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1",
|
|
10839
|
+
className
|
|
10840
|
+
)
|
|
10841
|
+
}
|
|
10842
|
+
);
|
|
10843
|
+
}
|
|
10844
|
+
function SortIcon({ dir }) {
|
|
10845
|
+
if (dir === "asc") return /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ArrowUp, { className: "h-3.5 w-3.5 shrink-0" });
|
|
10846
|
+
if (dir === "desc") return /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ArrowDown, { className: "h-3.5 w-3.5 shrink-0" });
|
|
10847
|
+
return /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ArrowUpDown, { className: "h-3.5 w-3.5 shrink-0 opacity-30" });
|
|
10848
|
+
}
|
|
10849
|
+
function ColumnVisibilityDropdown({
|
|
10850
|
+
columns,
|
|
10851
|
+
visibility,
|
|
10852
|
+
onVisibilityChange
|
|
10853
|
+
}) {
|
|
10854
|
+
const [open, setOpen] = React137.useState(false);
|
|
10855
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative", children: [
|
|
10856
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
10857
|
+
"button",
|
|
10858
|
+
{
|
|
10859
|
+
onClick: () => setOpen((v) => !v),
|
|
10860
|
+
className: cn(
|
|
10861
|
+
"inline-flex items-center gap-1.5 rounded-md border border-border px-2.5 py-1.5 text-xs font-medium",
|
|
10862
|
+
"bg-transparent text-muted-foreground hover:bg-accent hover:text-accent-foreground",
|
|
10863
|
+
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
|
|
10864
|
+
"transition-colors"
|
|
10865
|
+
),
|
|
10866
|
+
children: [
|
|
10867
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Columns3, { className: "h-3.5 w-3.5" }),
|
|
10868
|
+
"Columns",
|
|
10869
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronDown, { className: "h-3 w-3" })
|
|
10870
|
+
]
|
|
10871
|
+
}
|
|
10872
|
+
),
|
|
10873
|
+
open && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
10874
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "fixed inset-0 z-10", onClick: () => setOpen(false) }),
|
|
10875
|
+
/* @__PURE__ */ jsxRuntime.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__ */ jsxRuntime.jsxs(
|
|
10876
|
+
"label",
|
|
10877
|
+
{
|
|
10878
|
+
className: "flex items-center gap-2 px-3 py-1.5 text-xs text-foreground hover:bg-accent cursor-pointer",
|
|
10879
|
+
children: [
|
|
10880
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
10881
|
+
"input",
|
|
10882
|
+
{
|
|
10883
|
+
type: "checkbox",
|
|
10884
|
+
className: "h-3.5 w-3.5 accent-primary",
|
|
10885
|
+
checked: visibility[col.id] !== false,
|
|
10886
|
+
onChange: (e) => onVisibilityChange(col.id, e.target.checked)
|
|
10887
|
+
}
|
|
10888
|
+
),
|
|
10889
|
+
col.label
|
|
10890
|
+
]
|
|
10891
|
+
},
|
|
10892
|
+
col.id
|
|
10893
|
+
)) })
|
|
10894
|
+
] })
|
|
10895
|
+
] });
|
|
10896
|
+
}
|
|
10897
|
+
function SkeletonRow({ cols }) {
|
|
10898
|
+
return /* @__PURE__ */ jsxRuntime.jsx("tr", { className: "border-t border-border", children: Array.from({ length: cols }, (_, i) => /* @__PURE__ */ jsxRuntime.jsx("td", { className: "px-3 py-2.5", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
10899
|
+
"div",
|
|
10900
|
+
{
|
|
10901
|
+
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]",
|
|
10902
|
+
style: { width: `${60 + Math.random() * 30}%` }
|
|
10903
|
+
}
|
|
10904
|
+
) }, i)) });
|
|
10905
|
+
}
|
|
10906
|
+
function DataGrid2({
|
|
10907
|
+
columns,
|
|
10908
|
+
data,
|
|
10909
|
+
selectable = false,
|
|
10910
|
+
onSelectionChange,
|
|
10911
|
+
sortable = true,
|
|
10912
|
+
columnVisibility: showColumnVisibility = false,
|
|
10913
|
+
resizable = true,
|
|
10914
|
+
filterable = false,
|
|
10915
|
+
virtual = false,
|
|
10916
|
+
virtualHeight = 480,
|
|
10917
|
+
rowHeight = 40,
|
|
10918
|
+
emptyState,
|
|
10919
|
+
loading = false,
|
|
10920
|
+
skeletonRows = 5,
|
|
10921
|
+
className,
|
|
10922
|
+
onRowClick
|
|
10923
|
+
}) {
|
|
10924
|
+
const [rowSelection, setRowSelection] = React137.useState({});
|
|
10925
|
+
const [sorting, setSorting] = React137.useState([]);
|
|
10926
|
+
const [columnFilters, setColumnFilters] = React137.useState([]);
|
|
10927
|
+
const [colVisibility, setColVisibility] = React137.useState({});
|
|
10928
|
+
const scrollContainerRef = React137__namespace.default.useRef(null);
|
|
10929
|
+
const selectionColumn = React137.useMemo(
|
|
10930
|
+
() => ({
|
|
10931
|
+
id: "_select",
|
|
10932
|
+
size: 40,
|
|
10933
|
+
enableResizing: false,
|
|
10934
|
+
enableSorting: false,
|
|
10935
|
+
header: ({ table: table2 }) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
10936
|
+
Checkbox2,
|
|
10937
|
+
{
|
|
10938
|
+
checked: table2.getIsAllPageRowsSelected() ? true : table2.getIsSomePageRowsSelected() ? "indeterminate" : false,
|
|
10939
|
+
onCheckedChange: (v) => table2.toggleAllPageRowsSelected(v)
|
|
10940
|
+
}
|
|
10941
|
+
),
|
|
10942
|
+
cell: ({ row }) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
10943
|
+
Checkbox2,
|
|
10944
|
+
{
|
|
10945
|
+
checked: row.getIsSelected(),
|
|
10946
|
+
onCheckedChange: (v) => row.toggleSelected(v)
|
|
10947
|
+
}
|
|
10948
|
+
)
|
|
10949
|
+
}),
|
|
10950
|
+
[]
|
|
10951
|
+
);
|
|
10952
|
+
const allColumns = React137.useMemo(
|
|
10953
|
+
() => selectable ? [selectionColumn, ...columns] : columns,
|
|
10954
|
+
[selectable, selectionColumn, columns]
|
|
10955
|
+
);
|
|
10956
|
+
const table = reactTable.useReactTable({
|
|
10957
|
+
data,
|
|
10958
|
+
columns: allColumns,
|
|
10959
|
+
columnResizeMode: "onChange",
|
|
10960
|
+
state: {
|
|
10961
|
+
rowSelection,
|
|
10962
|
+
sorting,
|
|
10963
|
+
columnFilters,
|
|
10964
|
+
columnVisibility: colVisibility
|
|
10965
|
+
},
|
|
10966
|
+
onRowSelectionChange: (updater) => {
|
|
10967
|
+
const next = typeof updater === "function" ? updater(rowSelection) : updater;
|
|
10968
|
+
setRowSelection(next);
|
|
10969
|
+
if (onSelectionChange) {
|
|
10970
|
+
const selectedRows = Object.keys(next).filter((k) => next[k]).map((k) => data[Number(k)]).filter(Boolean);
|
|
10971
|
+
onSelectionChange(selectedRows);
|
|
10972
|
+
}
|
|
10973
|
+
},
|
|
10974
|
+
onSortingChange: setSorting,
|
|
10975
|
+
onColumnFiltersChange: setColumnFilters,
|
|
10976
|
+
onColumnVisibilityChange: setColVisibility,
|
|
10977
|
+
getCoreRowModel: reactTable.getCoreRowModel(),
|
|
10978
|
+
getSortedRowModel: sortable ? reactTable.getSortedRowModel() : void 0,
|
|
10979
|
+
getFilteredRowModel: filterable ? reactTable.getFilteredRowModel() : void 0,
|
|
10980
|
+
enableColumnResizing: resizable,
|
|
10981
|
+
enableRowSelection: selectable
|
|
10982
|
+
});
|
|
10983
|
+
const { rows } = table.getRowModel();
|
|
10984
|
+
const virtualizer = reactVirtual.useVirtualizer({
|
|
10985
|
+
count: virtual ? rows.length : 0,
|
|
10986
|
+
getScrollElement: () => scrollContainerRef.current,
|
|
10987
|
+
estimateSize: () => rowHeight,
|
|
10988
|
+
overscan: 10
|
|
10989
|
+
});
|
|
10990
|
+
const visibleColumnDefs = table.getAllLeafColumns().filter((c) => c.id !== "_select" && c.getIsVisible());
|
|
10991
|
+
const columnVisibilityItems = visibleColumnDefs.map((c) => ({
|
|
10992
|
+
id: c.id,
|
|
10993
|
+
label: typeof c.columnDef.header === "string" ? c.columnDef.header : c.id
|
|
10994
|
+
}));
|
|
10995
|
+
const renderRows = () => {
|
|
10996
|
+
if (loading) {
|
|
10997
|
+
return Array.from({ length: skeletonRows }, (_, i) => /* @__PURE__ */ jsxRuntime.jsx(SkeletonRow, { cols: allColumns.length }, i));
|
|
10998
|
+
}
|
|
10999
|
+
if (rows.length === 0) {
|
|
11000
|
+
return /* @__PURE__ */ jsxRuntime.jsx("tr", { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
11001
|
+
"td",
|
|
11002
|
+
{
|
|
11003
|
+
colSpan: allColumns.length,
|
|
11004
|
+
className: "py-16 text-center text-sm text-muted-foreground",
|
|
11005
|
+
children: emptyState ?? "No results."
|
|
11006
|
+
}
|
|
11007
|
+
) });
|
|
11008
|
+
}
|
|
11009
|
+
if (virtual) {
|
|
11010
|
+
const virtualItems = virtualizer.getVirtualItems();
|
|
11011
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
11012
|
+
virtualItems.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("tr", { style: { height: virtualItems[0].start }, children: /* @__PURE__ */ jsxRuntime.jsx("td", { colSpan: allColumns.length }) }),
|
|
11013
|
+
virtualItems.map((vRow) => {
|
|
11014
|
+
const row = rows[vRow.index];
|
|
11015
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
11016
|
+
"tr",
|
|
11017
|
+
{
|
|
11018
|
+
"data-index": vRow.index,
|
|
11019
|
+
className: cn(
|
|
11020
|
+
"border-t border-border transition-colors",
|
|
11021
|
+
onRowClick && "cursor-pointer",
|
|
11022
|
+
row.getIsSelected() ? "bg-primary/5" : "hover:bg-accent/40"
|
|
11023
|
+
),
|
|
11024
|
+
onClick: () => onRowClick?.(row.original),
|
|
11025
|
+
children: row.getVisibleCells().map((cell) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
11026
|
+
"td",
|
|
11027
|
+
{
|
|
11028
|
+
style: { width: cell.column.getSize() },
|
|
11029
|
+
className: "px-3 py-2 text-sm border-r border-border last:border-r-0 truncate max-w-0",
|
|
11030
|
+
children: reactTable.flexRender(cell.column.columnDef.cell, cell.getContext())
|
|
11031
|
+
},
|
|
11032
|
+
cell.id
|
|
11033
|
+
))
|
|
11034
|
+
},
|
|
11035
|
+
row.id
|
|
11036
|
+
);
|
|
11037
|
+
}),
|
|
11038
|
+
virtualItems.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(
|
|
11039
|
+
"tr",
|
|
11040
|
+
{
|
|
11041
|
+
style: {
|
|
11042
|
+
height: virtualizer.getTotalSize() - (virtualItems[virtualItems.length - 1]?.end ?? 0)
|
|
11043
|
+
},
|
|
11044
|
+
children: /* @__PURE__ */ jsxRuntime.jsx("td", { colSpan: allColumns.length })
|
|
11045
|
+
}
|
|
11046
|
+
)
|
|
11047
|
+
] });
|
|
11048
|
+
}
|
|
11049
|
+
return rows.map((row) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
11050
|
+
"tr",
|
|
11051
|
+
{
|
|
11052
|
+
className: cn(
|
|
11053
|
+
"border-t border-border transition-colors",
|
|
11054
|
+
onRowClick && "cursor-pointer",
|
|
11055
|
+
row.getIsSelected() ? "bg-primary/5" : "hover:bg-accent/40"
|
|
11056
|
+
),
|
|
11057
|
+
onClick: () => onRowClick?.(row.original),
|
|
11058
|
+
children: row.getVisibleCells().map((cell) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
11059
|
+
"td",
|
|
11060
|
+
{
|
|
11061
|
+
style: { width: cell.column.getSize() },
|
|
11062
|
+
className: "px-3 py-2 text-sm border-r border-border last:border-r-0 truncate max-w-0",
|
|
11063
|
+
children: reactTable.flexRender(cell.column.columnDef.cell, cell.getContext())
|
|
11064
|
+
},
|
|
11065
|
+
cell.id
|
|
11066
|
+
))
|
|
11067
|
+
},
|
|
11068
|
+
row.id
|
|
11069
|
+
));
|
|
11070
|
+
};
|
|
11071
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { "data-slot": "data-grid", className: cn("flex flex-col gap-2", className), children: [
|
|
11072
|
+
showColumnVisibility && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center justify-end gap-2", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
11073
|
+
ColumnVisibilityDropdown,
|
|
11074
|
+
{
|
|
11075
|
+
columns: columnVisibilityItems,
|
|
11076
|
+
visibility: colVisibility,
|
|
11077
|
+
onVisibilityChange: (id, visible) => setColVisibility((prev) => ({ ...prev, [id]: visible }))
|
|
11078
|
+
}
|
|
11079
|
+
) }),
|
|
11080
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
11081
|
+
"div",
|
|
11082
|
+
{
|
|
11083
|
+
ref: virtual ? scrollContainerRef : void 0,
|
|
11084
|
+
className: "overflow-auto rounded-md border border-border",
|
|
11085
|
+
style: virtual ? { height: virtualHeight } : void 0,
|
|
11086
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
11087
|
+
"table",
|
|
11088
|
+
{
|
|
11089
|
+
className: "w-full text-sm",
|
|
11090
|
+
style: { width: table.getCenterTotalSize() },
|
|
11091
|
+
children: [
|
|
11092
|
+
/* @__PURE__ */ jsxRuntime.jsx("thead", { className: "sticky top-0 z-10 bg-muted/60 backdrop-blur-sm", children: table.getHeaderGroups().map((hg) => /* @__PURE__ */ jsxRuntime.jsx("tr", { children: hg.headers.map((h) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
11093
|
+
"th",
|
|
11094
|
+
{
|
|
11095
|
+
style: { width: h.getSize() },
|
|
11096
|
+
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",
|
|
11097
|
+
children: [
|
|
11098
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
11099
|
+
"div",
|
|
11100
|
+
{
|
|
11101
|
+
className: cn(
|
|
11102
|
+
"flex items-center gap-1.5 select-none",
|
|
11103
|
+
h.column.getCanSort() && "cursor-pointer hover:text-foreground transition-colors"
|
|
11104
|
+
),
|
|
11105
|
+
onClick: h.column.getCanSort() ? h.column.getToggleSortingHandler() : void 0,
|
|
11106
|
+
children: [
|
|
11107
|
+
h.isPlaceholder ? null : reactTable.flexRender(h.column.columnDef.header, h.getContext()),
|
|
11108
|
+
h.column.getCanSort() && /* @__PURE__ */ jsxRuntime.jsx(SortIcon, { dir: h.column.getIsSorted() })
|
|
11109
|
+
]
|
|
11110
|
+
}
|
|
11111
|
+
),
|
|
11112
|
+
h.column.getCanResize() && /* @__PURE__ */ jsxRuntime.jsx(
|
|
11113
|
+
"div",
|
|
11114
|
+
{
|
|
11115
|
+
onMouseDown: h.getResizeHandler(),
|
|
11116
|
+
onTouchStart: h.getResizeHandler(),
|
|
11117
|
+
className: cn(
|
|
11118
|
+
"absolute right-0 top-0 h-full w-1 cursor-col-resize touch-none select-none",
|
|
11119
|
+
"hover:bg-primary/40",
|
|
11120
|
+
h.column.getIsResizing() && "bg-primary/60"
|
|
11121
|
+
)
|
|
11122
|
+
}
|
|
11123
|
+
)
|
|
11124
|
+
]
|
|
11125
|
+
},
|
|
11126
|
+
h.id
|
|
11127
|
+
)) }, hg.id)) }),
|
|
11128
|
+
/* @__PURE__ */ jsxRuntime.jsx("tbody", { children: renderRows() })
|
|
11129
|
+
]
|
|
11130
|
+
}
|
|
11131
|
+
)
|
|
11132
|
+
}
|
|
11133
|
+
),
|
|
11134
|
+
selectable && Object.keys(rowSelection).length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("p", { className: "text-xs text-muted-foreground", children: [
|
|
11135
|
+
Object.keys(rowSelection).filter((k) => rowSelection[k]).length,
|
|
11136
|
+
" of",
|
|
11137
|
+
" ",
|
|
11138
|
+
data.length,
|
|
11139
|
+
" row(s) selected"
|
|
11140
|
+
] })
|
|
11141
|
+
] });
|
|
11142
|
+
}
|
|
11143
|
+
var DataList = React137__namespace.default.forwardRef(
|
|
10785
11144
|
({ divided = true, bordered = true, className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
10786
11145
|
"ul",
|
|
10787
11146
|
{
|
|
@@ -10798,7 +11157,7 @@ var DataList = React136__namespace.default.forwardRef(
|
|
|
10798
11157
|
)
|
|
10799
11158
|
);
|
|
10800
11159
|
DataList.displayName = "DataList";
|
|
10801
|
-
var DataListItem =
|
|
11160
|
+
var DataListItem = React137__namespace.default.forwardRef(
|
|
10802
11161
|
({ left, title, description, right, interactive, onSelect, className, children, ...props }, ref) => {
|
|
10803
11162
|
const clickable = interactive || !!onSelect;
|
|
10804
11163
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -10858,7 +11217,7 @@ function getWeekDays(date, weekStartsOn) {
|
|
|
10858
11217
|
const start = dateFns.startOfWeek(date, { weekStartsOn });
|
|
10859
11218
|
return Array.from({ length: 7 }, (_, i) => dateFns.addDays(start, i));
|
|
10860
11219
|
}
|
|
10861
|
-
var EventCalendar =
|
|
11220
|
+
var EventCalendar = React137__namespace.default.forwardRef(
|
|
10862
11221
|
({
|
|
10863
11222
|
events,
|
|
10864
11223
|
view: viewProp,
|
|
@@ -10873,20 +11232,20 @@ var EventCalendar = React136__namespace.default.forwardRef(
|
|
|
10873
11232
|
className,
|
|
10874
11233
|
...props
|
|
10875
11234
|
}, ref) => {
|
|
10876
|
-
const [internalView, setInternalView] =
|
|
11235
|
+
const [internalView, setInternalView] = React137__namespace.default.useState("month");
|
|
10877
11236
|
const view = viewProp ?? internalView;
|
|
10878
|
-
const commitView =
|
|
11237
|
+
const commitView = React137__namespace.default.useCallback(
|
|
10879
11238
|
(next) => {
|
|
10880
11239
|
if (viewProp === void 0) setInternalView(next);
|
|
10881
11240
|
onViewChange?.(next);
|
|
10882
11241
|
},
|
|
10883
11242
|
[viewProp, onViewChange]
|
|
10884
11243
|
);
|
|
10885
|
-
const [internalDate, setInternalDate] =
|
|
11244
|
+
const [internalDate, setInternalDate] = React137__namespace.default.useState(
|
|
10886
11245
|
() => defaultDate ?? /* @__PURE__ */ new Date()
|
|
10887
11246
|
);
|
|
10888
11247
|
const date = dateProp ?? internalDate;
|
|
10889
|
-
const commitDate =
|
|
11248
|
+
const commitDate = React137__namespace.default.useCallback(
|
|
10890
11249
|
(next) => {
|
|
10891
11250
|
if (dateProp === void 0) setInternalDate(next);
|
|
10892
11251
|
onDateChange?.(next);
|
|
@@ -10912,7 +11271,7 @@ var EventCalendar = React136__namespace.default.forwardRef(
|
|
|
10912
11271
|
handleToday();
|
|
10913
11272
|
}
|
|
10914
11273
|
};
|
|
10915
|
-
const headerLabel =
|
|
11274
|
+
const headerLabel = React137__namespace.default.useMemo(() => {
|
|
10916
11275
|
if (view === "month") return dateFns.format(date, "MMMM yyyy");
|
|
10917
11276
|
if (view === "week") {
|
|
10918
11277
|
const start = dateFns.startOfWeek(date, { weekStartsOn });
|
|
@@ -11061,11 +11420,11 @@ function MonthView({
|
|
|
11061
11420
|
onEventCreate,
|
|
11062
11421
|
onDayPick
|
|
11063
11422
|
}) {
|
|
11064
|
-
const cells =
|
|
11423
|
+
const cells = React137__namespace.default.useMemo(
|
|
11065
11424
|
() => getMonthMatrix(date, weekStartsOn),
|
|
11066
11425
|
[date, weekStartsOn]
|
|
11067
11426
|
);
|
|
11068
|
-
const weekdayLabels =
|
|
11427
|
+
const weekdayLabels = React137__namespace.default.useMemo(() => {
|
|
11069
11428
|
const start = dateFns.startOfWeek(/* @__PURE__ */ new Date(), { weekStartsOn });
|
|
11070
11429
|
return Array.from({ length: 7 }, (_, i) => dateFns.format(dateFns.addDays(start, i), "EEE"));
|
|
11071
11430
|
}, [weekStartsOn]);
|
|
@@ -11212,7 +11571,7 @@ function HourGrid({
|
|
|
11212
11571
|
onEventCreate,
|
|
11213
11572
|
onEventResize
|
|
11214
11573
|
}) {
|
|
11215
|
-
const hours =
|
|
11574
|
+
const hours = React137__namespace.default.useMemo(() => Array.from({ length: 24 }, (_, i) => i), []);
|
|
11216
11575
|
const today = /* @__PURE__ */ new Date();
|
|
11217
11576
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
11218
11577
|
"div",
|
|
@@ -11266,7 +11625,7 @@ function DayColumn({
|
|
|
11266
11625
|
onEventResize,
|
|
11267
11626
|
showHeader
|
|
11268
11627
|
}) {
|
|
11269
|
-
const bodyRef =
|
|
11628
|
+
const bodyRef = React137__namespace.default.useRef(null);
|
|
11270
11629
|
const handleEmptyClick = (e) => {
|
|
11271
11630
|
if (e.target.closest("[data-event-block]")) return;
|
|
11272
11631
|
if (!onEventCreate) return;
|
|
@@ -11347,10 +11706,10 @@ function EventBlock({ event, day, onClick, onResize }) {
|
|
|
11347
11706
|
dateFns.differenceInMinutes(visibleEnd, visibleStart)
|
|
11348
11707
|
);
|
|
11349
11708
|
const top = startMinutes / 60 * HOUR_ROW_PX;
|
|
11350
|
-
const [resizingDelta, setResizingDelta] =
|
|
11709
|
+
const [resizingDelta, setResizingDelta] = React137__namespace.default.useState(0);
|
|
11351
11710
|
const height = durationMinutes / 60 * HOUR_ROW_PX + resizingDelta;
|
|
11352
|
-
const isResizing =
|
|
11353
|
-
const startY =
|
|
11711
|
+
const isResizing = React137__namespace.default.useRef(false);
|
|
11712
|
+
const startY = React137__namespace.default.useRef(0);
|
|
11354
11713
|
const handleResizePointerDown = (e) => {
|
|
11355
11714
|
if (!onResize) return;
|
|
11356
11715
|
e.preventDefault();
|
|
@@ -11439,7 +11798,7 @@ function WeekView({
|
|
|
11439
11798
|
onEventCreate,
|
|
11440
11799
|
onEventResize
|
|
11441
11800
|
}) {
|
|
11442
|
-
const days =
|
|
11801
|
+
const days = React137__namespace.default.useMemo(
|
|
11443
11802
|
() => getWeekDays(date, weekStartsOn),
|
|
11444
11803
|
[date, weekStartsOn]
|
|
11445
11804
|
);
|
|
@@ -11472,7 +11831,7 @@ function DayView({
|
|
|
11472
11831
|
}
|
|
11473
11832
|
) });
|
|
11474
11833
|
}
|
|
11475
|
-
var GridList =
|
|
11834
|
+
var GridList = React137__namespace.default.forwardRef(
|
|
11476
11835
|
({ minItemWidth = 240, gap = 1, className, style, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
11477
11836
|
"ul",
|
|
11478
11837
|
{
|
|
@@ -11489,7 +11848,7 @@ var GridList = React136__namespace.default.forwardRef(
|
|
|
11489
11848
|
)
|
|
11490
11849
|
);
|
|
11491
11850
|
GridList.displayName = "GridList";
|
|
11492
|
-
var GridListItem =
|
|
11851
|
+
var GridListItem = React137__namespace.default.forwardRef(
|
|
11493
11852
|
({ interactive, onSelect, className, ...props }, ref) => {
|
|
11494
11853
|
const clickable = interactive || !!onSelect;
|
|
11495
11854
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -11560,7 +11919,7 @@ async function extractCroppedDataUrl(image, crop, format3, quality) {
|
|
|
11560
11919
|
const mime = format3 === "jpeg" ? "image/jpeg" : format3 === "webp" ? "image/webp" : "image/png";
|
|
11561
11920
|
return canvas.toDataURL(mime, quality);
|
|
11562
11921
|
}
|
|
11563
|
-
var ImageCrop =
|
|
11922
|
+
var ImageCrop = React137__namespace.default.forwardRef(
|
|
11564
11923
|
({
|
|
11565
11924
|
src,
|
|
11566
11925
|
aspect,
|
|
@@ -11575,13 +11934,13 @@ var ImageCrop = React136__namespace.default.forwardRef(
|
|
|
11575
11934
|
className,
|
|
11576
11935
|
...props
|
|
11577
11936
|
}, ref) => {
|
|
11578
|
-
const [crop, setCrop] =
|
|
11579
|
-
const imgRef =
|
|
11580
|
-
const timerRef =
|
|
11581
|
-
|
|
11937
|
+
const [crop, setCrop] = React137__namespace.default.useState(void 0);
|
|
11938
|
+
const imgRef = React137__namespace.default.useRef(null);
|
|
11939
|
+
const timerRef = React137__namespace.default.useRef(null);
|
|
11940
|
+
React137__namespace.default.useEffect(() => {
|
|
11582
11941
|
setCrop(void 0);
|
|
11583
11942
|
}, [src]);
|
|
11584
|
-
|
|
11943
|
+
React137__namespace.default.useEffect(() => {
|
|
11585
11944
|
return () => {
|
|
11586
11945
|
if (timerRef.current) clearTimeout(timerRef.current);
|
|
11587
11946
|
};
|
|
@@ -11806,7 +12165,7 @@ function TreeRow({
|
|
|
11806
12165
|
}
|
|
11807
12166
|
);
|
|
11808
12167
|
}
|
|
11809
|
-
var Tree =
|
|
12168
|
+
var Tree = React137__namespace.default.forwardRef(
|
|
11810
12169
|
({
|
|
11811
12170
|
data,
|
|
11812
12171
|
defaultExpandedIds,
|
|
@@ -11822,21 +12181,21 @@ var Tree = React136__namespace.default.forwardRef(
|
|
|
11822
12181
|
...props
|
|
11823
12182
|
}, ref) => {
|
|
11824
12183
|
const isControlled = expandedIds !== void 0;
|
|
11825
|
-
const [internalExpanded, setInternalExpanded] =
|
|
12184
|
+
const [internalExpanded, setInternalExpanded] = React137__namespace.default.useState(
|
|
11826
12185
|
() => new Set(defaultExpandedIds ?? [])
|
|
11827
12186
|
);
|
|
11828
|
-
const expandedSet =
|
|
12187
|
+
const expandedSet = React137__namespace.default.useMemo(
|
|
11829
12188
|
() => isControlled ? new Set(expandedIds) : internalExpanded,
|
|
11830
12189
|
[isControlled, expandedIds, internalExpanded]
|
|
11831
12190
|
);
|
|
11832
|
-
const commitExpanded =
|
|
12191
|
+
const commitExpanded = React137__namespace.default.useCallback(
|
|
11833
12192
|
(next) => {
|
|
11834
12193
|
if (!isControlled) setInternalExpanded(next);
|
|
11835
12194
|
onExpandedChange?.(Array.from(next));
|
|
11836
12195
|
},
|
|
11837
12196
|
[isControlled, onExpandedChange]
|
|
11838
12197
|
);
|
|
11839
|
-
const toggle =
|
|
12198
|
+
const toggle = React137__namespace.default.useCallback(
|
|
11840
12199
|
(id) => {
|
|
11841
12200
|
const next = new Set(expandedSet);
|
|
11842
12201
|
if (next.has(id)) next.delete(id);
|
|
@@ -11845,7 +12204,7 @@ var Tree = React136__namespace.default.forwardRef(
|
|
|
11845
12204
|
},
|
|
11846
12205
|
[expandedSet, commitExpanded]
|
|
11847
12206
|
);
|
|
11848
|
-
const expand =
|
|
12207
|
+
const expand = React137__namespace.default.useCallback(
|
|
11849
12208
|
(id) => {
|
|
11850
12209
|
if (expandedSet.has(id)) return;
|
|
11851
12210
|
const next = new Set(expandedSet);
|
|
@@ -11854,7 +12213,7 @@ var Tree = React136__namespace.default.forwardRef(
|
|
|
11854
12213
|
},
|
|
11855
12214
|
[expandedSet, commitExpanded]
|
|
11856
12215
|
);
|
|
11857
|
-
const collapse =
|
|
12216
|
+
const collapse = React137__namespace.default.useCallback(
|
|
11858
12217
|
(id) => {
|
|
11859
12218
|
if (!expandedSet.has(id)) return;
|
|
11860
12219
|
const next = new Set(expandedSet);
|
|
@@ -11863,27 +12222,27 @@ var Tree = React136__namespace.default.forwardRef(
|
|
|
11863
12222
|
},
|
|
11864
12223
|
[expandedSet, commitExpanded]
|
|
11865
12224
|
);
|
|
11866
|
-
const rows =
|
|
12225
|
+
const rows = React137__namespace.default.useMemo(
|
|
11867
12226
|
() => flatten(data, expandedSet),
|
|
11868
12227
|
[data, expandedSet]
|
|
11869
12228
|
);
|
|
11870
|
-
const [focusedId, setFocusedId] =
|
|
12229
|
+
const [focusedId, setFocusedId] = React137__namespace.default.useState(
|
|
11871
12230
|
() => selectedId ?? data[0]?.id ?? null
|
|
11872
12231
|
);
|
|
11873
|
-
const rowRefs =
|
|
11874
|
-
const registerRef =
|
|
12232
|
+
const rowRefs = React137__namespace.default.useRef(/* @__PURE__ */ new Map());
|
|
12233
|
+
const registerRef = React137__namespace.default.useCallback(
|
|
11875
12234
|
(id, el) => {
|
|
11876
12235
|
if (el) rowRefs.current.set(id, el);
|
|
11877
12236
|
else rowRefs.current.delete(id);
|
|
11878
12237
|
},
|
|
11879
12238
|
[]
|
|
11880
12239
|
);
|
|
11881
|
-
const moveFocus =
|
|
12240
|
+
const moveFocus = React137__namespace.default.useCallback((id) => {
|
|
11882
12241
|
setFocusedId(id);
|
|
11883
12242
|
const el = rowRefs.current.get(id);
|
|
11884
12243
|
el?.focus();
|
|
11885
12244
|
}, []);
|
|
11886
|
-
const onRowKeyDown =
|
|
12245
|
+
const onRowKeyDown = React137__namespace.default.useCallback(
|
|
11887
12246
|
(e, row) => {
|
|
11888
12247
|
const idx = rows.findIndex((r) => r.node.id === row.node.id);
|
|
11889
12248
|
if (idx === -1) return;
|
|
@@ -11933,11 +12292,11 @@ var Tree = React136__namespace.default.forwardRef(
|
|
|
11933
12292
|
core.useSensor(core.PointerSensor, { activationConstraint: { distance: 5 } }),
|
|
11934
12293
|
core.useSensor(core.KeyboardSensor)
|
|
11935
12294
|
);
|
|
11936
|
-
const [activeDragId, setActiveDragId] =
|
|
11937
|
-
const handleDragStart =
|
|
12295
|
+
const [activeDragId, setActiveDragId] = React137__namespace.default.useState(null);
|
|
12296
|
+
const handleDragStart = React137__namespace.default.useCallback((e) => {
|
|
11938
12297
|
setActiveDragId(String(e.active.id));
|
|
11939
12298
|
}, []);
|
|
11940
|
-
const handleDragEnd =
|
|
12299
|
+
const handleDragEnd = React137__namespace.default.useCallback(
|
|
11941
12300
|
(e) => {
|
|
11942
12301
|
setActiveDragId(null);
|
|
11943
12302
|
const { active, over } = e;
|
|
@@ -11953,8 +12312,8 @@ var Tree = React136__namespace.default.forwardRef(
|
|
|
11953
12312
|
},
|
|
11954
12313
|
[onMove]
|
|
11955
12314
|
);
|
|
11956
|
-
const handleDragCancel =
|
|
11957
|
-
const scrollerRef =
|
|
12315
|
+
const handleDragCancel = React137__namespace.default.useCallback(() => setActiveDragId(null), []);
|
|
12316
|
+
const scrollerRef = React137__namespace.default.useRef(null);
|
|
11958
12317
|
const virtualizer = reactVirtual.useVirtualizer({
|
|
11959
12318
|
count: virtualize ? rows.length : 0,
|
|
11960
12319
|
getScrollElement: () => scrollerRef.current,
|
|
@@ -12056,7 +12415,7 @@ async function exitFs() {
|
|
|
12056
12415
|
if (d.exitFullscreen) return void d.exitFullscreen();
|
|
12057
12416
|
if (d.webkitExitFullscreen) return void d.webkitExitFullscreen();
|
|
12058
12417
|
}
|
|
12059
|
-
var VideoPlayer =
|
|
12418
|
+
var VideoPlayer = React137__namespace.default.forwardRef(
|
|
12060
12419
|
({
|
|
12061
12420
|
src,
|
|
12062
12421
|
poster,
|
|
@@ -12073,33 +12432,33 @@ var VideoPlayer = React136__namespace.default.forwardRef(
|
|
|
12073
12432
|
muted: mutedProp,
|
|
12074
12433
|
...videoProps
|
|
12075
12434
|
}, ref) => {
|
|
12076
|
-
const containerRef =
|
|
12077
|
-
const videoRef =
|
|
12078
|
-
const hideTimerRef =
|
|
12079
|
-
const [isPlaying, setIsPlaying] =
|
|
12080
|
-
const [hasPlayed, setHasPlayed] =
|
|
12081
|
-
const [currentTime, setCurrentTime] =
|
|
12082
|
-
const [duration, setDuration] =
|
|
12083
|
-
const [buffered, setBuffered] =
|
|
12084
|
-
const [volume, setVolume] =
|
|
12085
|
-
const [isMuted, setIsMuted] =
|
|
12086
|
-
const [isFullscreen, setIsFullscreen] =
|
|
12087
|
-
const [showControls, setShowControls] =
|
|
12088
|
-
|
|
12089
|
-
|
|
12435
|
+
const containerRef = React137__namespace.default.useRef(null);
|
|
12436
|
+
const videoRef = React137__namespace.default.useRef(null);
|
|
12437
|
+
const hideTimerRef = React137__namespace.default.useRef(null);
|
|
12438
|
+
const [isPlaying, setIsPlaying] = React137__namespace.default.useState(false);
|
|
12439
|
+
const [hasPlayed, setHasPlayed] = React137__namespace.default.useState(Boolean(autoPlay));
|
|
12440
|
+
const [currentTime, setCurrentTime] = React137__namespace.default.useState(0);
|
|
12441
|
+
const [duration, setDuration] = React137__namespace.default.useState(0);
|
|
12442
|
+
const [buffered, setBuffered] = React137__namespace.default.useState(0);
|
|
12443
|
+
const [volume, setVolume] = React137__namespace.default.useState(1);
|
|
12444
|
+
const [isMuted, setIsMuted] = React137__namespace.default.useState(Boolean(mutedProp ?? autoPlay));
|
|
12445
|
+
const [isFullscreen, setIsFullscreen] = React137__namespace.default.useState(false);
|
|
12446
|
+
const [showControls, setShowControls] = React137__namespace.default.useState(true);
|
|
12447
|
+
React137__namespace.default.useImperativeHandle(ref, () => containerRef.current);
|
|
12448
|
+
React137__namespace.default.useEffect(() => {
|
|
12090
12449
|
const v = videoRef.current;
|
|
12091
12450
|
if (!v) return;
|
|
12092
12451
|
v.volume = volume;
|
|
12093
12452
|
v.muted = isMuted;
|
|
12094
12453
|
}, [volume, isMuted]);
|
|
12095
|
-
const showAndScheduleHide =
|
|
12454
|
+
const showAndScheduleHide = React137__namespace.default.useCallback(() => {
|
|
12096
12455
|
setShowControls(true);
|
|
12097
12456
|
if (hideTimerRef.current) clearTimeout(hideTimerRef.current);
|
|
12098
12457
|
if (isPlaying) {
|
|
12099
12458
|
hideTimerRef.current = setTimeout(() => setShowControls(false), 3e3);
|
|
12100
12459
|
}
|
|
12101
12460
|
}, [isPlaying]);
|
|
12102
|
-
|
|
12461
|
+
React137__namespace.default.useEffect(() => {
|
|
12103
12462
|
if (!isPlaying) {
|
|
12104
12463
|
if (hideTimerRef.current) clearTimeout(hideTimerRef.current);
|
|
12105
12464
|
setShowControls(true);
|
|
@@ -12110,7 +12469,7 @@ var VideoPlayer = React136__namespace.default.forwardRef(
|
|
|
12110
12469
|
if (hideTimerRef.current) clearTimeout(hideTimerRef.current);
|
|
12111
12470
|
};
|
|
12112
12471
|
}, [isPlaying]);
|
|
12113
|
-
|
|
12472
|
+
React137__namespace.default.useEffect(() => {
|
|
12114
12473
|
const onFsChange = () => setIsFullscreen(isFullscreenActive());
|
|
12115
12474
|
document.addEventListener("fullscreenchange", onFsChange);
|
|
12116
12475
|
document.addEventListener("webkitfullscreenchange", onFsChange);
|
|
@@ -12119,7 +12478,7 @@ var VideoPlayer = React136__namespace.default.forwardRef(
|
|
|
12119
12478
|
document.removeEventListener("webkitfullscreenchange", onFsChange);
|
|
12120
12479
|
};
|
|
12121
12480
|
}, []);
|
|
12122
|
-
const togglePlay =
|
|
12481
|
+
const togglePlay = React137__namespace.default.useCallback(() => {
|
|
12123
12482
|
const v = videoRef.current;
|
|
12124
12483
|
if (!v) return;
|
|
12125
12484
|
if (v.paused) {
|
|
@@ -12128,22 +12487,22 @@ var VideoPlayer = React136__namespace.default.forwardRef(
|
|
|
12128
12487
|
v.pause();
|
|
12129
12488
|
}
|
|
12130
12489
|
}, []);
|
|
12131
|
-
const toggleMute =
|
|
12490
|
+
const toggleMute = React137__namespace.default.useCallback(() => {
|
|
12132
12491
|
setIsMuted((m) => !m);
|
|
12133
12492
|
}, []);
|
|
12134
|
-
const toggleFullscreen =
|
|
12493
|
+
const toggleFullscreen = React137__namespace.default.useCallback(() => {
|
|
12135
12494
|
const el = containerRef.current;
|
|
12136
12495
|
if (!el) return;
|
|
12137
12496
|
if (isFullscreenActive()) void exitFs();
|
|
12138
12497
|
else void requestFs(el);
|
|
12139
12498
|
}, []);
|
|
12140
|
-
const seekTo =
|
|
12499
|
+
const seekTo = React137__namespace.default.useCallback((time) => {
|
|
12141
12500
|
const v = videoRef.current;
|
|
12142
12501
|
if (!v) return;
|
|
12143
12502
|
const clamped = Math.max(0, Math.min(v.duration || 0, time));
|
|
12144
12503
|
v.currentTime = clamped;
|
|
12145
12504
|
}, []);
|
|
12146
|
-
const seekBy =
|
|
12505
|
+
const seekBy = React137__namespace.default.useCallback(
|
|
12147
12506
|
(delta) => {
|
|
12148
12507
|
seekTo((videoRef.current?.currentTime ?? 0) + delta);
|
|
12149
12508
|
},
|
|
@@ -12491,7 +12850,7 @@ function Combobox({
|
|
|
12491
12850
|
className,
|
|
12492
12851
|
contentWidth = "trigger"
|
|
12493
12852
|
}) {
|
|
12494
|
-
const [open, setOpen] =
|
|
12853
|
+
const [open, setOpen] = React137__namespace.default.useState(false);
|
|
12495
12854
|
const selected = options.find((o) => o.value === value);
|
|
12496
12855
|
return /* @__PURE__ */ jsxRuntime.jsxs(Popover, { open, onOpenChange: setOpen, children: [
|
|
12497
12856
|
/* @__PURE__ */ jsxRuntime.jsx(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -12585,9 +12944,9 @@ function ColorSchemeSelect({
|
|
|
12585
12944
|
className
|
|
12586
12945
|
}) {
|
|
12587
12946
|
const fallback = defaultValue ?? options[0]?.value ?? "";
|
|
12588
|
-
const [value, setValue] =
|
|
12589
|
-
const didMount =
|
|
12590
|
-
|
|
12947
|
+
const [value, setValue] = React137__namespace.default.useState(() => readInitial2(fallback));
|
|
12948
|
+
const didMount = React137__namespace.default.useRef(false);
|
|
12949
|
+
React137__namespace.default.useEffect(() => {
|
|
12591
12950
|
if (!didMount.current) {
|
|
12592
12951
|
didMount.current = true;
|
|
12593
12952
|
return;
|
|
@@ -12632,10 +12991,10 @@ function SidebarResizer({
|
|
|
12632
12991
|
onWidthChange,
|
|
12633
12992
|
className
|
|
12634
12993
|
}) {
|
|
12635
|
-
const [isDragging, setIsDragging] =
|
|
12636
|
-
const startX =
|
|
12637
|
-
const startWidth =
|
|
12638
|
-
|
|
12994
|
+
const [isDragging, setIsDragging] = React137.useState(false);
|
|
12995
|
+
const startX = React137.useRef(0);
|
|
12996
|
+
const startWidth = React137.useRef(defaultWidth);
|
|
12997
|
+
React137.useEffect(() => {
|
|
12639
12998
|
if (typeof window === "undefined") return;
|
|
12640
12999
|
try {
|
|
12641
13000
|
const stored = localStorage.getItem(storageKey);
|
|
@@ -12647,7 +13006,7 @@ function SidebarResizer({
|
|
|
12647
13006
|
} catch {
|
|
12648
13007
|
}
|
|
12649
13008
|
}, [storageKey, min, max, onWidthChange]);
|
|
12650
|
-
const handlePointerDown =
|
|
13009
|
+
const handlePointerDown = React137.useCallback(
|
|
12651
13010
|
(e) => {
|
|
12652
13011
|
e.preventDefault();
|
|
12653
13012
|
e.currentTarget.setPointerCapture(e.pointerId);
|
|
@@ -12660,7 +13019,7 @@ function SidebarResizer({
|
|
|
12660
13019
|
},
|
|
12661
13020
|
[]
|
|
12662
13021
|
);
|
|
12663
|
-
const handlePointerMove =
|
|
13022
|
+
const handlePointerMove = React137.useCallback(
|
|
12664
13023
|
(e) => {
|
|
12665
13024
|
if (!isDragging) return;
|
|
12666
13025
|
const delta = e.clientX - startX.current;
|
|
@@ -12673,7 +13032,7 @@ function SidebarResizer({
|
|
|
12673
13032
|
},
|
|
12674
13033
|
[isDragging, min, max, onWidthChange]
|
|
12675
13034
|
);
|
|
12676
|
-
const handlePointerUp =
|
|
13035
|
+
const handlePointerUp = React137.useCallback(
|
|
12677
13036
|
(e) => {
|
|
12678
13037
|
if (!isDragging) return;
|
|
12679
13038
|
setIsDragging(false);
|
|
@@ -12711,10 +13070,10 @@ function getInitials(name) {
|
|
|
12711
13070
|
}
|
|
12712
13071
|
function WorkspacesMenu({ workspaces, current, onSelect, className }) {
|
|
12713
13072
|
const { collapsed } = useSidebar();
|
|
12714
|
-
const [open, setOpen] =
|
|
12715
|
-
const ref =
|
|
13073
|
+
const [open, setOpen] = React137.useState(false);
|
|
13074
|
+
const ref = React137.useRef(null);
|
|
12716
13075
|
const currentWorkspace = workspaces.find((w) => w.id === current);
|
|
12717
|
-
|
|
13076
|
+
React137.useEffect(() => {
|
|
12718
13077
|
if (!open) return;
|
|
12719
13078
|
function handleClickOutside(e) {
|
|
12720
13079
|
if (ref.current && !ref.current.contains(e.target)) {
|
|
@@ -12797,9 +13156,9 @@ function getInitials2(name) {
|
|
|
12797
13156
|
}
|
|
12798
13157
|
function AppShellUserMenu({ name, email, avatar, onSignOut, onProfile, onSettings, className }) {
|
|
12799
13158
|
const { collapsed } = useSidebar();
|
|
12800
|
-
const [open, setOpen] =
|
|
12801
|
-
const ref =
|
|
12802
|
-
|
|
13159
|
+
const [open, setOpen] = React137.useState(false);
|
|
13160
|
+
const ref = React137.useRef(null);
|
|
13161
|
+
React137.useEffect(() => {
|
|
12803
13162
|
if (!open) return;
|
|
12804
13163
|
function handleClickOutside(e) {
|
|
12805
13164
|
if (ref.current && !ref.current.contains(e.target)) {
|
|
@@ -13070,6 +13429,7 @@ exports.AccordionContent = AccordionContent;
|
|
|
13070
13429
|
exports.AccordionItem = AccordionItem;
|
|
13071
13430
|
exports.AccordionTrigger = AccordionTrigger;
|
|
13072
13431
|
exports.ActivityHeatmap = ActivityHeatmap;
|
|
13432
|
+
exports.AdvancedDataGrid = DataGrid2;
|
|
13073
13433
|
exports.Alert = Alert;
|
|
13074
13434
|
exports.AlertDescription = AlertDescription;
|
|
13075
13435
|
exports.AlertDialog = AlertDialog;
|
|
@@ -13267,6 +13627,7 @@ exports.HoverCard = HoverCard;
|
|
|
13267
13627
|
exports.HoverCardContent = HoverCardContent;
|
|
13268
13628
|
exports.HoverCardTrigger = HoverCardTrigger;
|
|
13269
13629
|
exports.IconBadge = IconBadge;
|
|
13630
|
+
exports.IconButton = IconButton;
|
|
13270
13631
|
exports.ImageCrop = ImageCrop;
|
|
13271
13632
|
exports.Input = Input;
|
|
13272
13633
|
exports.InputOTP = InputOTP;
|