@mvn-ui/react 0.1.4 → 0.1.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.css +84 -63
- package/dist/index.css.map +1 -1
- package/dist/index.d.mts +185 -32
- package/dist/index.d.ts +185 -32
- package/dist/index.js +1380 -632
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1235 -500
- package/dist/index.mjs.map +1 -1
- package/dist/themes.css +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { clsx } from 'clsx';
|
|
2
2
|
import { twMerge } from 'tailwind-merge';
|
|
3
|
-
import * as
|
|
4
|
-
import
|
|
3
|
+
import * as React52 from 'react';
|
|
4
|
+
import React52__default, { createContext, forwardRef, useRef, useState, useEffect, useImperativeHandle, useCallback, useMemo, useContext, cloneElement, Fragment as Fragment$1 } from 'react';
|
|
5
5
|
import { cva } from 'class-variance-authority';
|
|
6
6
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
7
7
|
import { Slot } from '@radix-ui/react-slot';
|
|
8
|
-
import { Loader2Icon, XIcon, EyeOffIcon, EyeIcon, ChevronDownIcon, ChevronUpIcon, CheckIcon, MinusIcon, CircleIcon, X, InboxIcon, ChevronRightIcon, ChevronsUpDownIcon, CalendarIcon, ArrowLeft, ArrowRight, Calendar as Calendar$1, ChevronLeft, ChevronRight, ChevronDown, Star, RotateCcw, MoreHorizontalIcon, ChevronLeftIcon, ChevronsLeftIcon, ChevronsRightIcon, GripVerticalIcon, PanelLeftIcon, FileDown, SearchIcon,
|
|
8
|
+
import { Loader2Icon, XIcon, EyeOffIcon, EyeIcon, ChevronDownIcon, ChevronUpIcon, CheckIcon, MinusIcon, CircleIcon, X, InboxIcon, ChevronRightIcon, ChevronsUpDownIcon, CalendarIcon, ArrowLeft, ArrowRight, Calendar as Calendar$1, ChevronLeft, ChevronRight, ChevronDown, Star, RotateCcw, MoreHorizontalIcon, ChevronLeftIcon, ChevronsLeftIcon, ChevronsRightIcon, GripVerticalIcon, PanelLeftIcon, MenuIcon, FileDown, SearchIcon, ArrowUp, ArrowDown, MoreHorizontal, Pin, ListFilter, Minus, Plus } from 'lucide-react';
|
|
9
9
|
import * as LabelPrimitive from '@radix-ui/react-label';
|
|
10
10
|
import * as SelectPrimitive from '@radix-ui/react-select';
|
|
11
11
|
import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
|
|
@@ -288,7 +288,7 @@ var init_card = __esm({
|
|
|
288
288
|
}
|
|
289
289
|
}
|
|
290
290
|
);
|
|
291
|
-
Card =
|
|
291
|
+
Card = React52.forwardRef(({ className, variant, size, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
292
292
|
"div",
|
|
293
293
|
{
|
|
294
294
|
ref,
|
|
@@ -297,7 +297,7 @@ var init_card = __esm({
|
|
|
297
297
|
}
|
|
298
298
|
));
|
|
299
299
|
Card.displayName = "Card";
|
|
300
|
-
CardHeader =
|
|
300
|
+
CardHeader = React52.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
301
301
|
"div",
|
|
302
302
|
{
|
|
303
303
|
ref,
|
|
@@ -306,7 +306,7 @@ var init_card = __esm({
|
|
|
306
306
|
}
|
|
307
307
|
));
|
|
308
308
|
CardHeader.displayName = "CardHeader";
|
|
309
|
-
CardTitle =
|
|
309
|
+
CardTitle = React52.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
310
310
|
"h3",
|
|
311
311
|
{
|
|
312
312
|
ref,
|
|
@@ -315,7 +315,7 @@ var init_card = __esm({
|
|
|
315
315
|
}
|
|
316
316
|
));
|
|
317
317
|
CardTitle.displayName = "CardTitle";
|
|
318
|
-
CardDescription =
|
|
318
|
+
CardDescription = React52.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
319
319
|
"div",
|
|
320
320
|
{
|
|
321
321
|
ref,
|
|
@@ -324,9 +324,9 @@ var init_card = __esm({
|
|
|
324
324
|
}
|
|
325
325
|
));
|
|
326
326
|
CardDescription.displayName = "CardDescription";
|
|
327
|
-
CardContent =
|
|
327
|
+
CardContent = React52.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("p-6 pt-0", className), ...props }));
|
|
328
328
|
CardContent.displayName = "CardContent";
|
|
329
|
-
CardFooter =
|
|
329
|
+
CardFooter = React52.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
330
330
|
"div",
|
|
331
331
|
{
|
|
332
332
|
ref,
|
|
@@ -337,6 +337,132 @@ var init_card = __esm({
|
|
|
337
337
|
CardFooter.displayName = "CardFooter";
|
|
338
338
|
}
|
|
339
339
|
});
|
|
340
|
+
var BREAKPOINTS = {
|
|
341
|
+
sm: 640,
|
|
342
|
+
md: 768,
|
|
343
|
+
lg: 1024,
|
|
344
|
+
xl: 1280
|
|
345
|
+
};
|
|
346
|
+
function useBreakpoint(ssrFallback = "md") {
|
|
347
|
+
const [breakpoint, setBreakpoint] = useState(ssrFallback);
|
|
348
|
+
useEffect(() => {
|
|
349
|
+
const getBreakpoint = () => {
|
|
350
|
+
const width = window.innerWidth;
|
|
351
|
+
if (width >= BREAKPOINTS.xl) return "xl";
|
|
352
|
+
if (width >= BREAKPOINTS.lg) return "lg";
|
|
353
|
+
if (width >= BREAKPOINTS.md) return "md";
|
|
354
|
+
if (width >= BREAKPOINTS.sm) return "sm";
|
|
355
|
+
return "xs";
|
|
356
|
+
};
|
|
357
|
+
setBreakpoint(getBreakpoint());
|
|
358
|
+
let timeoutId;
|
|
359
|
+
const handleResize = () => {
|
|
360
|
+
clearTimeout(timeoutId);
|
|
361
|
+
timeoutId = setTimeout(() => setBreakpoint(getBreakpoint()), 150);
|
|
362
|
+
};
|
|
363
|
+
window.addEventListener("resize", handleResize);
|
|
364
|
+
return () => {
|
|
365
|
+
window.removeEventListener("resize", handleResize);
|
|
366
|
+
clearTimeout(timeoutId);
|
|
367
|
+
};
|
|
368
|
+
}, []);
|
|
369
|
+
return breakpoint;
|
|
370
|
+
}
|
|
371
|
+
function useBreakpointValue(values, fallback) {
|
|
372
|
+
const breakpoint = useBreakpoint();
|
|
373
|
+
return useMemo(() => {
|
|
374
|
+
const order = ["xs", "sm", "md", "lg", "xl"];
|
|
375
|
+
const currentIndex = order.indexOf(breakpoint);
|
|
376
|
+
for (let i = currentIndex; i >= 0; i--) {
|
|
377
|
+
const bp = order[i];
|
|
378
|
+
if (values[bp] !== void 0) {
|
|
379
|
+
return values[bp];
|
|
380
|
+
}
|
|
381
|
+
}
|
|
382
|
+
return fallback;
|
|
383
|
+
}, [breakpoint, values, fallback]);
|
|
384
|
+
}
|
|
385
|
+
|
|
386
|
+
// src/hooks/useIsMobile.ts
|
|
387
|
+
function useIsMobile(ssrFallback = false) {
|
|
388
|
+
const fallbackBreakpoint = ssrFallback ? "xs" : "md";
|
|
389
|
+
const breakpoint = useBreakpoint(fallbackBreakpoint);
|
|
390
|
+
return breakpoint === "xs" || breakpoint === "sm";
|
|
391
|
+
}
|
|
392
|
+
function useIsTablet() {
|
|
393
|
+
const breakpoint = useBreakpoint();
|
|
394
|
+
return breakpoint === "md";
|
|
395
|
+
}
|
|
396
|
+
function useIsDesktop() {
|
|
397
|
+
const breakpoint = useBreakpoint();
|
|
398
|
+
return breakpoint === "lg" || breakpoint === "xl";
|
|
399
|
+
}
|
|
400
|
+
function useSwipeActions({
|
|
401
|
+
leftActions = [],
|
|
402
|
+
rightActions = [],
|
|
403
|
+
threshold = 80,
|
|
404
|
+
disabled = false
|
|
405
|
+
} = {}) {
|
|
406
|
+
const [offsetX, setOffsetX] = useState(0);
|
|
407
|
+
const [isDragging, setIsDragging] = useState(false);
|
|
408
|
+
const [revealed, setRevealed] = useState(null);
|
|
409
|
+
const startX = useRef(0);
|
|
410
|
+
const currentOffsetX = useRef(0);
|
|
411
|
+
currentOffsetX.current = offsetX;
|
|
412
|
+
const reset = useCallback(() => {
|
|
413
|
+
setOffsetX(0);
|
|
414
|
+
setRevealed(null);
|
|
415
|
+
}, []);
|
|
416
|
+
const handleTouchStart = useCallback(
|
|
417
|
+
(e) => {
|
|
418
|
+
if (disabled) return;
|
|
419
|
+
startX.current = e.touches[0].clientX;
|
|
420
|
+
setIsDragging(true);
|
|
421
|
+
},
|
|
422
|
+
[disabled]
|
|
423
|
+
);
|
|
424
|
+
const handleTouchMove = useCallback(
|
|
425
|
+
(e) => {
|
|
426
|
+
if (disabled || !isDragging) return;
|
|
427
|
+
const currentX = e.touches[0].clientX;
|
|
428
|
+
const deltaX = currentX - startX.current;
|
|
429
|
+
const maxLeft = rightActions.length > 0 ? -threshold * 1.5 : 0;
|
|
430
|
+
const maxRight = leftActions.length > 0 ? threshold * 1.5 : 0;
|
|
431
|
+
const clampedX = Math.max(maxLeft, Math.min(maxRight, deltaX));
|
|
432
|
+
setOffsetX(clampedX);
|
|
433
|
+
},
|
|
434
|
+
[disabled, isDragging, threshold, leftActions.length, rightActions.length]
|
|
435
|
+
);
|
|
436
|
+
const handleTouchEnd = useCallback(() => {
|
|
437
|
+
setIsDragging(false);
|
|
438
|
+
const offset = currentOffsetX.current;
|
|
439
|
+
if (Math.abs(offset) >= threshold) {
|
|
440
|
+
if (offset < 0 && rightActions.length > 0) {
|
|
441
|
+
setRevealed("right");
|
|
442
|
+
setOffsetX(-threshold);
|
|
443
|
+
} else if (offset > 0 && leftActions.length > 0) {
|
|
444
|
+
setRevealed("left");
|
|
445
|
+
setOffsetX(threshold);
|
|
446
|
+
} else {
|
|
447
|
+
reset();
|
|
448
|
+
}
|
|
449
|
+
} else {
|
|
450
|
+
reset();
|
|
451
|
+
}
|
|
452
|
+
}, [threshold, leftActions.length, rightActions.length, reset]);
|
|
453
|
+
const computedOffsetX = revealed === "right" ? -threshold : revealed === "left" ? threshold : offsetX;
|
|
454
|
+
return {
|
|
455
|
+
offsetX: computedOffsetX,
|
|
456
|
+
revealed,
|
|
457
|
+
isDragging,
|
|
458
|
+
handlers: {
|
|
459
|
+
onTouchStart: handleTouchStart,
|
|
460
|
+
onTouchMove: handleTouchMove,
|
|
461
|
+
onTouchEnd: handleTouchEnd
|
|
462
|
+
},
|
|
463
|
+
reset
|
|
464
|
+
};
|
|
465
|
+
}
|
|
340
466
|
|
|
341
467
|
// src/components/ui/button/index.tsx
|
|
342
468
|
init_utils();
|
|
@@ -356,8 +482,10 @@ var buttonVariants = cva(
|
|
|
356
482
|
default: "h-10 px-4 py-2.5 rounded-md text-[0.9375rem]",
|
|
357
483
|
sm: "h-8 px-3 py-1.5 rounded text-sm",
|
|
358
484
|
lg: "h-12 px-5 py-3 rounded-md text-base",
|
|
485
|
+
touch: "h-11 min-h-[44px] px-4 py-2.5 rounded-md text-base",
|
|
359
486
|
icon: "h-10 w-10 rounded-md",
|
|
360
|
-
"icon-sm": "h-8 w-8 rounded"
|
|
487
|
+
"icon-sm": "h-8 w-8 rounded",
|
|
488
|
+
"icon-touch": "h-11 w-11 min-h-[44px] min-w-[44px] rounded-md"
|
|
361
489
|
},
|
|
362
490
|
fullWidth: {
|
|
363
491
|
true: "w-full"
|
|
@@ -369,7 +497,7 @@ var buttonVariants = cva(
|
|
|
369
497
|
}
|
|
370
498
|
}
|
|
371
499
|
);
|
|
372
|
-
var Button =
|
|
500
|
+
var Button = React52.forwardRef(
|
|
373
501
|
({
|
|
374
502
|
className,
|
|
375
503
|
variant,
|
|
@@ -419,7 +547,7 @@ var Button = React50.forwardRef(
|
|
|
419
547
|
}
|
|
420
548
|
);
|
|
421
549
|
Button.displayName = "Button";
|
|
422
|
-
var IconButton =
|
|
550
|
+
var IconButton = React52.forwardRef(
|
|
423
551
|
({ icon, size = "icon", className, ...props }, ref) => {
|
|
424
552
|
return /* @__PURE__ */ jsx(Button, { ref, size, className, ...props, children: icon });
|
|
425
553
|
}
|
|
@@ -502,9 +630,10 @@ var inputVariants = cva(
|
|
|
502
630
|
underlined: "rounded-md border-0 border-b-2 border-mvn-gray-300 px-3.5 py-2.5 hover:border-mvn-gray-400 focus:border-primary bg-transparent"
|
|
503
631
|
},
|
|
504
632
|
inputSize: {
|
|
505
|
-
sm: "h-8 text-
|
|
506
|
-
default: "h-10 text-
|
|
507
|
-
lg: "h-12 text-base px-4 py-3 rounded-md"
|
|
633
|
+
sm: "h-8 text-base px-2.5 py-1.5 rounded",
|
|
634
|
+
default: "h-10 text-base px-3.5 py-2.5 rounded-md",
|
|
635
|
+
lg: "h-12 text-base px-4 py-3 rounded-md",
|
|
636
|
+
touch: "h-11 min-h-[44px] text-base px-3.5 py-2.5 rounded-md"
|
|
508
637
|
}
|
|
509
638
|
},
|
|
510
639
|
defaultVariants: {
|
|
@@ -513,7 +642,7 @@ var inputVariants = cva(
|
|
|
513
642
|
}
|
|
514
643
|
}
|
|
515
644
|
);
|
|
516
|
-
var Input =
|
|
645
|
+
var Input = React52.forwardRef(
|
|
517
646
|
({
|
|
518
647
|
className,
|
|
519
648
|
containerClassName,
|
|
@@ -531,12 +660,12 @@ var Input = React50.forwardRef(
|
|
|
531
660
|
value,
|
|
532
661
|
...props
|
|
533
662
|
}, ref) => {
|
|
534
|
-
const [showPassword, setShowPassword] =
|
|
535
|
-
const [internalValue, setInternalValue] =
|
|
536
|
-
const generatedId =
|
|
663
|
+
const [showPassword, setShowPassword] = React52.useState(false);
|
|
664
|
+
const [internalValue, setInternalValue] = React52.useState(value || "");
|
|
665
|
+
const generatedId = React52.useId();
|
|
537
666
|
const inputId = id || generatedId;
|
|
538
667
|
const hasError = !!error;
|
|
539
|
-
|
|
668
|
+
React52.useEffect(() => {
|
|
540
669
|
setInternalValue(value || "");
|
|
541
670
|
}, [value]);
|
|
542
671
|
const handleClear = () => {
|
|
@@ -645,7 +774,7 @@ var labelVariants = cva(
|
|
|
645
774
|
}
|
|
646
775
|
}
|
|
647
776
|
);
|
|
648
|
-
var Label =
|
|
777
|
+
var Label = React52.forwardRef(({ className, variant, required, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
649
778
|
LabelPrimitive.Root,
|
|
650
779
|
{
|
|
651
780
|
ref,
|
|
@@ -686,7 +815,7 @@ var textareaVariants = cva(
|
|
|
686
815
|
}
|
|
687
816
|
}
|
|
688
817
|
);
|
|
689
|
-
var Textarea =
|
|
818
|
+
var Textarea = React52.forwardRef(
|
|
690
819
|
({
|
|
691
820
|
className,
|
|
692
821
|
containerClassName,
|
|
@@ -704,8 +833,8 @@ var Textarea = React50.forwardRef(
|
|
|
704
833
|
id,
|
|
705
834
|
...props
|
|
706
835
|
}, ref) => {
|
|
707
|
-
const internalRef =
|
|
708
|
-
const [charCount, setCharCount] =
|
|
836
|
+
const internalRef = React52.useRef(null);
|
|
837
|
+
const [charCount, setCharCount] = React52.useState(0);
|
|
709
838
|
const textareaRef = (node) => {
|
|
710
839
|
internalRef.current = node;
|
|
711
840
|
if (typeof ref === "function") {
|
|
@@ -714,14 +843,14 @@ var Textarea = React50.forwardRef(
|
|
|
714
843
|
ref.current = node;
|
|
715
844
|
}
|
|
716
845
|
};
|
|
717
|
-
|
|
846
|
+
React52.useEffect(() => {
|
|
718
847
|
if (autoResize && internalRef.current) {
|
|
719
848
|
const textarea = internalRef.current;
|
|
720
849
|
textarea.style.height = "auto";
|
|
721
850
|
textarea.style.height = `${textarea.scrollHeight}px`;
|
|
722
851
|
}
|
|
723
852
|
}, [value, autoResize]);
|
|
724
|
-
const handleChange =
|
|
853
|
+
const handleChange = React52.useCallback(
|
|
725
854
|
(e) => {
|
|
726
855
|
if (showCount || maxLength) {
|
|
727
856
|
setCharCount(e.target.value.length);
|
|
@@ -730,13 +859,13 @@ var Textarea = React50.forwardRef(
|
|
|
730
859
|
},
|
|
731
860
|
[onChange, showCount, maxLength]
|
|
732
861
|
);
|
|
733
|
-
|
|
862
|
+
React52.useEffect(() => {
|
|
734
863
|
if (showCount || maxLength) {
|
|
735
864
|
setCharCount(String(value || "").length);
|
|
736
865
|
}
|
|
737
866
|
}, [value, showCount, maxLength]);
|
|
738
867
|
const hasError = !!error;
|
|
739
|
-
const generatedId =
|
|
868
|
+
const generatedId = React52.useId();
|
|
740
869
|
const textareaId = id || generatedId;
|
|
741
870
|
return /* @__PURE__ */ jsxs("div", { className: cn("w-full space-y-2", containerClassName), children: [
|
|
742
871
|
label && /* @__PURE__ */ jsx(
|
|
@@ -797,10 +926,10 @@ Textarea.displayName = "Textarea";
|
|
|
797
926
|
|
|
798
927
|
// src/components/ui/select/index.tsx
|
|
799
928
|
init_utils();
|
|
800
|
-
var Select =
|
|
929
|
+
var Select = React52.forwardRef(
|
|
801
930
|
({ children, value, onValueChange, ...props }, _ref) => {
|
|
802
|
-
const [internalValue, setInternalValue] =
|
|
803
|
-
|
|
931
|
+
const [internalValue, setInternalValue] = React52.useState(value ?? "");
|
|
932
|
+
React52.useEffect(() => {
|
|
804
933
|
setInternalValue(value ?? "");
|
|
805
934
|
}, [value]);
|
|
806
935
|
const handleValueChange = (newValue) => {
|
|
@@ -822,7 +951,7 @@ Select.displayName = "Select";
|
|
|
822
951
|
var SelectGroup = SelectPrimitive.Group;
|
|
823
952
|
var SelectValue = SelectPrimitive.Value;
|
|
824
953
|
var triggerVariants = cva(
|
|
825
|
-
"flex
|
|
954
|
+
"flex w-full items-center justify-between text-[0.9375rem] transition-colors placeholder:text-muted-foreground focus:outline-none disabled:cursor-not-allowed disabled:bg-mvn-gray-100 disabled:opacity-60 [&>span]:line-clamp-1",
|
|
826
955
|
{
|
|
827
956
|
variants: {
|
|
828
957
|
variant: {
|
|
@@ -830,18 +959,25 @@ var triggerVariants = cva(
|
|
|
830
959
|
filled: "rounded-md border border-transparent bg-mvn-gray-100 px-3.5 py-2.5 hover:bg-mvn-gray-200 focus:border-primary focus:bg-background",
|
|
831
960
|
borderless: "rounded-md border border-transparent bg-transparent px-3.5 py-2.5 shadow-none",
|
|
832
961
|
underlined: "rounded-md border-0 border-b-2 border-mvn-gray-300 px-3.5 py-2.5 hover:border-mvn-gray-400 focus:border-primary"
|
|
962
|
+
},
|
|
963
|
+
size: {
|
|
964
|
+
sm: "h-8 text-sm px-2.5",
|
|
965
|
+
default: "h-10",
|
|
966
|
+
lg: "h-12 text-base px-4",
|
|
967
|
+
touch: "h-11 min-h-[44px] text-base"
|
|
833
968
|
}
|
|
834
969
|
},
|
|
835
970
|
defaultVariants: {
|
|
836
|
-
variant: "outlined"
|
|
971
|
+
variant: "outlined",
|
|
972
|
+
size: "default"
|
|
837
973
|
}
|
|
838
974
|
}
|
|
839
975
|
);
|
|
840
|
-
var SelectTrigger =
|
|
976
|
+
var SelectTrigger = React52.forwardRef(({ className, children, variant, size, ...props }, ref) => /* @__PURE__ */ jsxs(
|
|
841
977
|
SelectPrimitive.Trigger,
|
|
842
978
|
{
|
|
843
979
|
ref,
|
|
844
|
-
className: cn(triggerVariants({ variant }), className),
|
|
980
|
+
className: cn(triggerVariants({ variant, size }), className),
|
|
845
981
|
...props,
|
|
846
982
|
children: [
|
|
847
983
|
children,
|
|
@@ -850,7 +986,7 @@ var SelectTrigger = React50.forwardRef(({ className, children, variant, ...props
|
|
|
850
986
|
}
|
|
851
987
|
));
|
|
852
988
|
SelectTrigger.displayName = SelectPrimitive.Trigger.displayName;
|
|
853
|
-
var SelectScrollUpButton =
|
|
989
|
+
var SelectScrollUpButton = React52.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
854
990
|
SelectPrimitive.ScrollUpButton,
|
|
855
991
|
{
|
|
856
992
|
ref,
|
|
@@ -863,7 +999,7 @@ var SelectScrollUpButton = React50.forwardRef(({ className, ...props }, ref) =>
|
|
|
863
999
|
}
|
|
864
1000
|
));
|
|
865
1001
|
SelectScrollUpButton.displayName = SelectPrimitive.ScrollUpButton.displayName;
|
|
866
|
-
var SelectScrollDownButton =
|
|
1002
|
+
var SelectScrollDownButton = React52.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
867
1003
|
SelectPrimitive.ScrollDownButton,
|
|
868
1004
|
{
|
|
869
1005
|
ref,
|
|
@@ -876,7 +1012,7 @@ var SelectScrollDownButton = React50.forwardRef(({ className, ...props }, ref) =
|
|
|
876
1012
|
}
|
|
877
1013
|
));
|
|
878
1014
|
SelectScrollDownButton.displayName = SelectPrimitive.ScrollDownButton.displayName;
|
|
879
|
-
var SelectContent =
|
|
1015
|
+
var SelectContent = React52.forwardRef(({ className, children, position = "popper", ...props }, ref) => /* @__PURE__ */ jsx(SelectPrimitive.Portal, { children: /* @__PURE__ */ jsxs(
|
|
880
1016
|
SelectPrimitive.Content,
|
|
881
1017
|
{
|
|
882
1018
|
ref,
|
|
@@ -904,7 +1040,7 @@ var SelectContent = React50.forwardRef(({ className, children, position = "poppe
|
|
|
904
1040
|
}
|
|
905
1041
|
) }));
|
|
906
1042
|
SelectContent.displayName = SelectPrimitive.Content.displayName;
|
|
907
|
-
var SelectLabel =
|
|
1043
|
+
var SelectLabel = React52.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
908
1044
|
SelectPrimitive.Label,
|
|
909
1045
|
{
|
|
910
1046
|
ref,
|
|
@@ -916,7 +1052,7 @@ var SelectLabel = React50.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
|
916
1052
|
}
|
|
917
1053
|
));
|
|
918
1054
|
SelectLabel.displayName = SelectPrimitive.Label.displayName;
|
|
919
|
-
var SelectItem =
|
|
1055
|
+
var SelectItem = React52.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(
|
|
920
1056
|
SelectPrimitive.Item,
|
|
921
1057
|
{
|
|
922
1058
|
ref,
|
|
@@ -932,7 +1068,7 @@ var SelectItem = React50.forwardRef(({ className, children, ...props }, ref) =>
|
|
|
932
1068
|
}
|
|
933
1069
|
));
|
|
934
1070
|
SelectItem.displayName = SelectPrimitive.Item.displayName;
|
|
935
|
-
var SelectSeparator =
|
|
1071
|
+
var SelectSeparator = React52.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
936
1072
|
SelectPrimitive.Separator,
|
|
937
1073
|
{
|
|
938
1074
|
ref,
|
|
@@ -951,7 +1087,8 @@ var checkboxVariants = cva(
|
|
|
951
1087
|
size: {
|
|
952
1088
|
sm: "h-4 w-4 rounded",
|
|
953
1089
|
default: "h-[18px] w-[18px] rounded",
|
|
954
|
-
lg: "h-5 w-5 rounded-md"
|
|
1090
|
+
lg: "h-5 w-5 rounded-md",
|
|
1091
|
+
touch: "h-6 w-6 rounded-md"
|
|
955
1092
|
}
|
|
956
1093
|
},
|
|
957
1094
|
defaultVariants: {
|
|
@@ -959,10 +1096,23 @@ var checkboxVariants = cva(
|
|
|
959
1096
|
}
|
|
960
1097
|
}
|
|
961
1098
|
);
|
|
962
|
-
var
|
|
963
|
-
|
|
1099
|
+
var checkboxWrapperVariants = cva("flex items-start", {
|
|
1100
|
+
variants: {
|
|
1101
|
+
size: {
|
|
1102
|
+
sm: "gap-2.5",
|
|
1103
|
+
default: "gap-2.5",
|
|
1104
|
+
lg: "gap-3",
|
|
1105
|
+
touch: "gap-3 min-h-[44px] items-center"
|
|
1106
|
+
}
|
|
1107
|
+
},
|
|
1108
|
+
defaultVariants: {
|
|
1109
|
+
size: "default"
|
|
1110
|
+
}
|
|
1111
|
+
});
|
|
1112
|
+
var Checkbox = React52.forwardRef(({ className, size, label, description, indeterminate, ...props }, ref) => {
|
|
1113
|
+
const generatedId = React52.useId();
|
|
964
1114
|
const checkboxId = props.id || generatedId;
|
|
965
|
-
return /* @__PURE__ */ jsxs("div", { className:
|
|
1115
|
+
return /* @__PURE__ */ jsxs("div", { className: cn(checkboxWrapperVariants({ size })), children: [
|
|
966
1116
|
/* @__PURE__ */ jsx(
|
|
967
1117
|
CheckboxPrimitive.Root,
|
|
968
1118
|
{
|
|
@@ -1008,10 +1158,40 @@ var radioGroupVariants = cva("grid gap-2", {
|
|
|
1008
1158
|
orientation: "vertical"
|
|
1009
1159
|
}
|
|
1010
1160
|
});
|
|
1011
|
-
var
|
|
1161
|
+
var radioItemVariants = cva(
|
|
1162
|
+
"aspect-square rounded-full border border-line-strong text-primary ring-offset-background focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:border-primary shrink-0",
|
|
1163
|
+
{
|
|
1164
|
+
variants: {
|
|
1165
|
+
size: {
|
|
1166
|
+
sm: "h-3.5 w-3.5",
|
|
1167
|
+
default: "h-4 w-4",
|
|
1168
|
+
lg: "h-5 w-5",
|
|
1169
|
+
touch: "h-6 w-6"
|
|
1170
|
+
}
|
|
1171
|
+
},
|
|
1172
|
+
defaultVariants: {
|
|
1173
|
+
size: "default"
|
|
1174
|
+
}
|
|
1175
|
+
}
|
|
1176
|
+
);
|
|
1177
|
+
var radioIndicatorVariants = cva("fill-primary text-primary", {
|
|
1178
|
+
variants: {
|
|
1179
|
+
size: {
|
|
1180
|
+
sm: "h-2 w-2",
|
|
1181
|
+
default: "h-2.5 w-2.5",
|
|
1182
|
+
lg: "h-3 w-3",
|
|
1183
|
+
touch: "h-3.5 w-3.5"
|
|
1184
|
+
}
|
|
1185
|
+
},
|
|
1186
|
+
defaultVariants: {
|
|
1187
|
+
size: "default"
|
|
1188
|
+
}
|
|
1189
|
+
});
|
|
1190
|
+
var RadioGroup = React52.forwardRef(
|
|
1012
1191
|
({
|
|
1013
1192
|
className,
|
|
1014
1193
|
orientation = "vertical",
|
|
1194
|
+
size,
|
|
1015
1195
|
items,
|
|
1016
1196
|
itemClassName,
|
|
1017
1197
|
renderItem,
|
|
@@ -1021,14 +1201,15 @@ var RadioGroup = React50.forwardRef(
|
|
|
1021
1201
|
children,
|
|
1022
1202
|
...props
|
|
1023
1203
|
}, ref) => {
|
|
1024
|
-
const generatedId =
|
|
1025
|
-
const defaultRenderItem =
|
|
1204
|
+
const generatedId = React52.useId();
|
|
1205
|
+
const defaultRenderItem = React52.useCallback(
|
|
1026
1206
|
(item) => /* @__PURE__ */ jsxs(
|
|
1027
1207
|
"div",
|
|
1028
1208
|
{
|
|
1029
1209
|
className: cn(
|
|
1030
1210
|
"flex items-start gap-3 rounded-lg border border-line-soft p-4 transition-colors hover:bg-surface-2 has-[[data-state=checked]]:border-primary has-[[data-state=checked]]:bg-primary/5",
|
|
1031
1211
|
item.disabled && "opacity-50 cursor-not-allowed",
|
|
1212
|
+
size === "touch" && "min-h-[44px] items-center",
|
|
1032
1213
|
itemClassName
|
|
1033
1214
|
),
|
|
1034
1215
|
children: [
|
|
@@ -1038,8 +1219,8 @@ var RadioGroup = React50.forwardRef(
|
|
|
1038
1219
|
value: item.value,
|
|
1039
1220
|
id: `${generatedId}-${item.value}`,
|
|
1040
1221
|
disabled: item.disabled,
|
|
1041
|
-
className:
|
|
1042
|
-
children: /* @__PURE__ */ jsx(RadioGroupPrimitive.Indicator, { className: "flex items-center justify-center", children: /* @__PURE__ */ jsx(CircleIcon, { className:
|
|
1222
|
+
className: cn(radioItemVariants({ size }), "mt-0.5"),
|
|
1223
|
+
children: /* @__PURE__ */ jsx(RadioGroupPrimitive.Indicator, { className: "flex items-center justify-center", children: /* @__PURE__ */ jsx(CircleIcon, { className: cn(radioIndicatorVariants({ size })) }) })
|
|
1043
1224
|
}
|
|
1044
1225
|
),
|
|
1045
1226
|
/* @__PURE__ */ jsxs("div", { className: "flex-1 space-y-1", children: [
|
|
@@ -1060,7 +1241,7 @@ var RadioGroup = React50.forwardRef(
|
|
|
1060
1241
|
},
|
|
1061
1242
|
item.value
|
|
1062
1243
|
),
|
|
1063
|
-
[generatedId, itemClassName]
|
|
1244
|
+
[generatedId, itemClassName, size]
|
|
1064
1245
|
);
|
|
1065
1246
|
const renderFunction = renderItem || defaultRenderItem;
|
|
1066
1247
|
return /* @__PURE__ */ jsxs("div", { className: "space-y-3", children: [
|
|
@@ -1080,17 +1261,14 @@ var RadioGroup = React50.forwardRef(
|
|
|
1080
1261
|
}
|
|
1081
1262
|
);
|
|
1082
1263
|
RadioGroup.displayName = RadioGroupPrimitive.Root.displayName;
|
|
1083
|
-
var RadioGroupItem =
|
|
1264
|
+
var RadioGroupItem = React52.forwardRef(({ className, size, ...props }, ref) => {
|
|
1084
1265
|
return /* @__PURE__ */ jsx(
|
|
1085
1266
|
RadioGroupPrimitive.Item,
|
|
1086
1267
|
{
|
|
1087
1268
|
ref,
|
|
1088
|
-
className: cn(
|
|
1089
|
-
"aspect-square h-4 w-4 rounded-full border border-line-strong text-primary ring-offset-background focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:border-primary",
|
|
1090
|
-
className
|
|
1091
|
-
),
|
|
1269
|
+
className: cn(radioItemVariants({ size }), className),
|
|
1092
1270
|
...props,
|
|
1093
|
-
children: /* @__PURE__ */ jsx(RadioGroupPrimitive.Indicator, { className: "flex items-center justify-center", children: /* @__PURE__ */ jsx(CircleIcon, { className:
|
|
1271
|
+
children: /* @__PURE__ */ jsx(RadioGroupPrimitive.Indicator, { className: "flex items-center justify-center", children: /* @__PURE__ */ jsx(CircleIcon, { className: cn(radioIndicatorVariants({ size })) }) })
|
|
1094
1272
|
}
|
|
1095
1273
|
);
|
|
1096
1274
|
});
|
|
@@ -1098,32 +1276,49 @@ RadioGroupItem.displayName = RadioGroupPrimitive.Item.displayName;
|
|
|
1098
1276
|
|
|
1099
1277
|
// src/components/ui/switch/index.tsx
|
|
1100
1278
|
init_utils();
|
|
1101
|
-
var
|
|
1279
|
+
var switchVariants = cva(
|
|
1280
|
+
"peer inline-flex shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",
|
|
1281
|
+
{
|
|
1282
|
+
variants: {
|
|
1283
|
+
size: {
|
|
1284
|
+
sm: "h-5 w-9",
|
|
1285
|
+
default: "h-6 w-11",
|
|
1286
|
+
lg: "h-7 w-[52px]",
|
|
1287
|
+
touch: "h-7 w-[52px] min-h-[44px] min-w-[44px]"
|
|
1288
|
+
}
|
|
1289
|
+
},
|
|
1290
|
+
defaultVariants: {
|
|
1291
|
+
size: "default"
|
|
1292
|
+
}
|
|
1293
|
+
}
|
|
1294
|
+
);
|
|
1295
|
+
var thumbVariants = cva(
|
|
1296
|
+
"group pointer-events-none relative flex items-center justify-center rounded-full bg-background shadow-lg ring-0 transition-transform",
|
|
1297
|
+
{
|
|
1298
|
+
variants: {
|
|
1299
|
+
size: {
|
|
1300
|
+
sm: "h-4 w-4 data-[state=checked]:translate-x-4 data-[state=unchecked]:translate-x-0",
|
|
1301
|
+
default: "h-5 w-5 data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0",
|
|
1302
|
+
lg: "h-6 w-6 data-[state=checked]:translate-x-6 data-[state=unchecked]:translate-x-0",
|
|
1303
|
+
touch: "h-6 w-6 data-[state=checked]:translate-x-6 data-[state=unchecked]:translate-x-0"
|
|
1304
|
+
}
|
|
1305
|
+
},
|
|
1306
|
+
defaultVariants: {
|
|
1307
|
+
size: "default"
|
|
1308
|
+
}
|
|
1309
|
+
}
|
|
1310
|
+
);
|
|
1311
|
+
var Switch = React52.forwardRef(({ className, size, offNode, onNode, ...props }, ref) => {
|
|
1102
1312
|
return /* @__PURE__ */ jsx(
|
|
1103
1313
|
SwitchPrimitives.Root,
|
|
1104
1314
|
{
|
|
1105
1315
|
ref,
|
|
1106
|
-
className: cn(
|
|
1107
|
-
"peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors",
|
|
1108
|
-
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
|
|
1109
|
-
"disabled:cursor-not-allowed disabled:opacity-50",
|
|
1110
|
-
"data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",
|
|
1111
|
-
className
|
|
1112
|
-
),
|
|
1316
|
+
className: cn(switchVariants({ size }), className),
|
|
1113
1317
|
...props,
|
|
1114
|
-
children: /* @__PURE__ */ jsxs(
|
|
1115
|
-
|
|
1116
|
-
{
|
|
1117
|
-
|
|
1118
|
-
"group pointer-events-none relative flex items-center justify-center h-5 w-5 rounded-full bg-background shadow-lg ring-0 transition-transform",
|
|
1119
|
-
"data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0"
|
|
1120
|
-
),
|
|
1121
|
-
children: [
|
|
1122
|
-
/* @__PURE__ */ jsx("span", { className: "absolute opacity-0 group-data-[state=checked]:opacity-100 transition-all duration-200", children: onNode }),
|
|
1123
|
-
/* @__PURE__ */ jsx("span", { className: "absolute opacity-100 group-data-[state=checked]:opacity-0 transition-all duration-200", children: offNode })
|
|
1124
|
-
]
|
|
1125
|
-
}
|
|
1126
|
-
)
|
|
1318
|
+
children: /* @__PURE__ */ jsxs(SwitchPrimitives.Thumb, { className: cn(thumbVariants({ size })), children: [
|
|
1319
|
+
/* @__PURE__ */ jsx("span", { className: "absolute opacity-0 group-data-[state=checked]:opacity-100 transition-all duration-200", children: onNode }),
|
|
1320
|
+
/* @__PURE__ */ jsx("span", { className: "absolute opacity-100 group-data-[state=checked]:opacity-0 transition-all duration-200", children: offNode })
|
|
1321
|
+
] })
|
|
1127
1322
|
}
|
|
1128
1323
|
);
|
|
1129
1324
|
});
|
|
@@ -1152,7 +1347,7 @@ var toggleVariants = cva(
|
|
|
1152
1347
|
}
|
|
1153
1348
|
}
|
|
1154
1349
|
);
|
|
1155
|
-
var Toggle =
|
|
1350
|
+
var Toggle = React52.forwardRef(({ className, variant, size, icon, children, ...props }, ref) => /* @__PURE__ */ jsxs(
|
|
1156
1351
|
TogglePrimitive.Root,
|
|
1157
1352
|
{
|
|
1158
1353
|
ref,
|
|
@@ -1198,9 +1393,9 @@ var toggleGroupItemVariants = cva(
|
|
|
1198
1393
|
}
|
|
1199
1394
|
}
|
|
1200
1395
|
);
|
|
1201
|
-
var ToggleGroup =
|
|
1396
|
+
var ToggleGroup = React52.forwardRef(
|
|
1202
1397
|
({ className, size, items, itemClassName, renderItem, children, ...props }, ref) => {
|
|
1203
|
-
const defaultRenderItem =
|
|
1398
|
+
const defaultRenderItem = React52.useCallback(
|
|
1204
1399
|
(item) => /* @__PURE__ */ jsxs(
|
|
1205
1400
|
ToggleGroupPrimitive.Item,
|
|
1206
1401
|
{
|
|
@@ -1230,7 +1425,7 @@ var ToggleGroup = React50.forwardRef(
|
|
|
1230
1425
|
}
|
|
1231
1426
|
);
|
|
1232
1427
|
ToggleGroup.displayName = "ToggleGroup";
|
|
1233
|
-
var ToggleGroupItem =
|
|
1428
|
+
var ToggleGroupItem = React52.forwardRef(({ className, size, children, ...props }, ref) => {
|
|
1234
1429
|
return /* @__PURE__ */ jsx(
|
|
1235
1430
|
ToggleGroupPrimitive.Item,
|
|
1236
1431
|
{
|
|
@@ -1245,7 +1440,7 @@ ToggleGroupItem.displayName = "ToggleGroupItem";
|
|
|
1245
1440
|
|
|
1246
1441
|
// src/components/ui/slider/index.tsx
|
|
1247
1442
|
init_utils();
|
|
1248
|
-
var Slider =
|
|
1443
|
+
var Slider = React52.forwardRef(
|
|
1249
1444
|
({
|
|
1250
1445
|
className,
|
|
1251
1446
|
showValue,
|
|
@@ -1304,7 +1499,7 @@ var inputGroupVariants = cva("flex items-stretch w-full", {
|
|
|
1304
1499
|
size: "default"
|
|
1305
1500
|
}
|
|
1306
1501
|
});
|
|
1307
|
-
var InputGroup =
|
|
1502
|
+
var InputGroup = React52.forwardRef(
|
|
1308
1503
|
({
|
|
1309
1504
|
className,
|
|
1310
1505
|
size,
|
|
@@ -1340,9 +1535,9 @@ var InputGroup = React50.forwardRef(
|
|
|
1340
1535
|
}
|
|
1341
1536
|
),
|
|
1342
1537
|
leftElement && /* @__PURE__ */ jsx("div", { className: "inline-flex items-center", children: leftElement }),
|
|
1343
|
-
/* @__PURE__ */ jsx("div", { className: "flex-1 min-w-0", children:
|
|
1344
|
-
if (
|
|
1345
|
-
return
|
|
1538
|
+
/* @__PURE__ */ jsx("div", { className: "flex-1 min-w-0", children: React52.Children.map(children, (child) => {
|
|
1539
|
+
if (React52.isValidElement(child)) {
|
|
1540
|
+
return React52.cloneElement(child, {
|
|
1346
1541
|
className: cn(
|
|
1347
1542
|
child.props.className,
|
|
1348
1543
|
(leftAddon || leftElement) && "rounded-l-none border-l-0",
|
|
@@ -1373,7 +1568,7 @@ InputGroup.displayName = "InputGroup";
|
|
|
1373
1568
|
|
|
1374
1569
|
// src/components/ui/input-otp/index.tsx
|
|
1375
1570
|
init_utils();
|
|
1376
|
-
var InputOTP =
|
|
1571
|
+
var InputOTP = React52.forwardRef(({ containerClassName, children, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
1377
1572
|
OTPInput,
|
|
1378
1573
|
{
|
|
1379
1574
|
ref,
|
|
@@ -1386,10 +1581,10 @@ var InputOTP = React50.forwardRef(({ containerClassName, children, ...props }, r
|
|
|
1386
1581
|
}
|
|
1387
1582
|
));
|
|
1388
1583
|
InputOTP.displayName = "InputOTP";
|
|
1389
|
-
var InputOTPGroup =
|
|
1584
|
+
var InputOTPGroup = React52.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("flex items-center gap-2", className), ...props }));
|
|
1390
1585
|
InputOTPGroup.displayName = "InputOTPGroup";
|
|
1391
|
-
var InputOTPSlot =
|
|
1392
|
-
const inputOTPContext =
|
|
1586
|
+
var InputOTPSlot = React52.forwardRef(({ index, className, ...props }, ref) => {
|
|
1587
|
+
const inputOTPContext = React52.useContext(OTPInputContext);
|
|
1393
1588
|
if (!inputOTPContext) {
|
|
1394
1589
|
console.error("InputOTPSlot must be used within InputOTP");
|
|
1395
1590
|
return null;
|
|
@@ -1423,7 +1618,7 @@ var InputOTPSlot = React50.forwardRef(({ index, className, ...props }, ref) => {
|
|
|
1423
1618
|
);
|
|
1424
1619
|
});
|
|
1425
1620
|
InputOTPSlot.displayName = "InputOTPSlot";
|
|
1426
|
-
var InputOTPSeparator =
|
|
1621
|
+
var InputOTPSeparator = React52.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, role: "separator", className, ...props, children: /* @__PURE__ */ jsx(MinusIcon, { className: "h-4 w-4 text-muted-foreground" }) }));
|
|
1427
1622
|
InputOTPSeparator.displayName = "InputOTPSeparator";
|
|
1428
1623
|
|
|
1429
1624
|
// src/components/ui/form/form-utils.ts
|
|
@@ -2112,7 +2307,7 @@ var FormItem = (props) => {
|
|
|
2112
2307
|
const isRequired = Array.isArray(rules) ? rules.some((rule) => rule && rule.required) : false;
|
|
2113
2308
|
const isDisabled = !!contextDisabled;
|
|
2114
2309
|
const requiredIndicator = requiredMark === void 0 ? /* @__PURE__ */ jsx("span", { className: "text-destructive mr-1", "aria-hidden": "true", children: "*" }) : /* @__PURE__ */ jsx("span", { className: "mr-1", "aria-hidden": "true", children: requiredMark });
|
|
2115
|
-
if (!children || !
|
|
2310
|
+
if (!children || !React52__default.isValidElement(children)) return null;
|
|
2116
2311
|
const childProps = {};
|
|
2117
2312
|
childProps[valuePropName] = fieldValue;
|
|
2118
2313
|
const childClass = children.props.className;
|
|
@@ -2280,7 +2475,7 @@ var fieldVariants = cva("", {
|
|
|
2280
2475
|
orientation: "vertical"
|
|
2281
2476
|
}
|
|
2282
2477
|
});
|
|
2283
|
-
var Field =
|
|
2478
|
+
var Field = React52.forwardRef(
|
|
2284
2479
|
({
|
|
2285
2480
|
className,
|
|
2286
2481
|
orientation,
|
|
@@ -2293,7 +2488,7 @@ var Field = React50.forwardRef(
|
|
|
2293
2488
|
children,
|
|
2294
2489
|
...props
|
|
2295
2490
|
}, ref) => {
|
|
2296
|
-
const generatedId =
|
|
2491
|
+
const generatedId = React52.useId();
|
|
2297
2492
|
const fieldId = htmlFor || generatedId;
|
|
2298
2493
|
return /* @__PURE__ */ jsxs(
|
|
2299
2494
|
"div",
|
|
@@ -2342,7 +2537,7 @@ var alertVariants = cva(
|
|
|
2342
2537
|
}
|
|
2343
2538
|
}
|
|
2344
2539
|
);
|
|
2345
|
-
var Alert =
|
|
2540
|
+
var Alert = React52.forwardRef(
|
|
2346
2541
|
({
|
|
2347
2542
|
className,
|
|
2348
2543
|
variant,
|
|
@@ -2355,8 +2550,8 @@ var Alert = React50.forwardRef(
|
|
|
2355
2550
|
descriptionClassName,
|
|
2356
2551
|
...props
|
|
2357
2552
|
}, ref) => {
|
|
2358
|
-
const [isVisible, setIsVisible] =
|
|
2359
|
-
const handleDismiss =
|
|
2553
|
+
const [isVisible, setIsVisible] = React52.useState(true);
|
|
2554
|
+
const handleDismiss = React52.useCallback(() => {
|
|
2360
2555
|
setIsVisible(false);
|
|
2361
2556
|
onClose?.();
|
|
2362
2557
|
}, [onClose]);
|
|
@@ -2525,7 +2720,7 @@ var toastVariants = cva(
|
|
|
2525
2720
|
}
|
|
2526
2721
|
}
|
|
2527
2722
|
);
|
|
2528
|
-
var Toast =
|
|
2723
|
+
var Toast = React52.forwardRef(
|
|
2529
2724
|
({
|
|
2530
2725
|
className,
|
|
2531
2726
|
variant,
|
|
@@ -2538,8 +2733,8 @@ var Toast = React50.forwardRef(
|
|
|
2538
2733
|
descriptionClassName,
|
|
2539
2734
|
...props
|
|
2540
2735
|
}, ref) => {
|
|
2541
|
-
const [isVisible, setIsVisible] =
|
|
2542
|
-
const handleDismiss =
|
|
2736
|
+
const [isVisible, setIsVisible] = React52.useState(true);
|
|
2737
|
+
const handleDismiss = React52.useCallback(() => {
|
|
2543
2738
|
setIsVisible(false);
|
|
2544
2739
|
onClose?.();
|
|
2545
2740
|
}, [onClose]);
|
|
@@ -2635,7 +2830,7 @@ var progressVariants = cva(
|
|
|
2635
2830
|
}
|
|
2636
2831
|
}
|
|
2637
2832
|
);
|
|
2638
|
-
var Progress =
|
|
2833
|
+
var Progress = React52.forwardRef(
|
|
2639
2834
|
({
|
|
2640
2835
|
className,
|
|
2641
2836
|
value = 0,
|
|
@@ -2701,7 +2896,7 @@ var spinnerVariants = cva("animate-spin", {
|
|
|
2701
2896
|
variant: "default"
|
|
2702
2897
|
}
|
|
2703
2898
|
});
|
|
2704
|
-
var Spinner =
|
|
2899
|
+
var Spinner = React52.forwardRef(
|
|
2705
2900
|
({ className, size, variant, label, centered, overlay, icon, ...props }, ref) => {
|
|
2706
2901
|
const spinnerContent = /* @__PURE__ */ jsxs(
|
|
2707
2902
|
"div",
|
|
@@ -2732,7 +2927,7 @@ var Spinner = React50.forwardRef(
|
|
|
2732
2927
|
}
|
|
2733
2928
|
);
|
|
2734
2929
|
Spinner.displayName = "Spinner";
|
|
2735
|
-
var DotsSpinner =
|
|
2930
|
+
var DotsSpinner = React52.forwardRef(
|
|
2736
2931
|
({ className, size = "default", dotCount = 3, ...props }, ref) => {
|
|
2737
2932
|
const dotSizeMap = {
|
|
2738
2933
|
xs: "h-1 w-1",
|
|
@@ -2785,7 +2980,7 @@ var skeletonVariants = cva(
|
|
|
2785
2980
|
}
|
|
2786
2981
|
}
|
|
2787
2982
|
);
|
|
2788
|
-
var Skeleton =
|
|
2983
|
+
var Skeleton = React52.forwardRef(
|
|
2789
2984
|
({
|
|
2790
2985
|
className,
|
|
2791
2986
|
variant,
|
|
@@ -2834,7 +3029,7 @@ var Skeleton = React50.forwardRef(
|
|
|
2834
3029
|
}
|
|
2835
3030
|
);
|
|
2836
3031
|
Skeleton.displayName = "Skeleton";
|
|
2837
|
-
var SkeletonCard =
|
|
3032
|
+
var SkeletonCard = React52.forwardRef(
|
|
2838
3033
|
({ className, avatar = false, lines = 3, ...props }, ref) => {
|
|
2839
3034
|
return /* @__PURE__ */ jsxs("div", { ref, className: cn("space-y-4", className), ...props, children: [
|
|
2840
3035
|
avatar && /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3", children: [
|
|
@@ -2874,7 +3069,7 @@ var emptyVariants = cva(
|
|
|
2874
3069
|
}
|
|
2875
3070
|
}
|
|
2876
3071
|
);
|
|
2877
|
-
var Empty =
|
|
3072
|
+
var Empty = React52.forwardRef(
|
|
2878
3073
|
({
|
|
2879
3074
|
className,
|
|
2880
3075
|
size,
|
|
@@ -2915,7 +3110,7 @@ var Dialog = DialogPrimitive.Root;
|
|
|
2915
3110
|
var DialogTrigger = DialogPrimitive.Trigger;
|
|
2916
3111
|
var DialogPortal = DialogPrimitive.Portal;
|
|
2917
3112
|
var DialogClose = DialogPrimitive.Close;
|
|
2918
|
-
var DialogOverlay =
|
|
3113
|
+
var DialogOverlay = React52.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
2919
3114
|
DialogPrimitive.Overlay,
|
|
2920
3115
|
{
|
|
2921
3116
|
ref,
|
|
@@ -2927,7 +3122,7 @@ var DialogOverlay = React50.forwardRef(({ className, ...props }, ref) => /* @__P
|
|
|
2927
3122
|
}
|
|
2928
3123
|
));
|
|
2929
3124
|
DialogOverlay.displayName = DialogPrimitive.Overlay.displayName;
|
|
2930
|
-
var DialogContent =
|
|
3125
|
+
var DialogContent = React52.forwardRef(
|
|
2931
3126
|
({
|
|
2932
3127
|
className,
|
|
2933
3128
|
children,
|
|
@@ -2992,7 +3187,7 @@ var DialogFooter = ({
|
|
|
2992
3187
|
}
|
|
2993
3188
|
);
|
|
2994
3189
|
DialogFooter.displayName = "DialogFooter";
|
|
2995
|
-
var DialogTitle =
|
|
3190
|
+
var DialogTitle = React52.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
2996
3191
|
DialogPrimitive.Title,
|
|
2997
3192
|
{
|
|
2998
3193
|
ref,
|
|
@@ -3004,7 +3199,7 @@ var DialogTitle = React50.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
|
3004
3199
|
}
|
|
3005
3200
|
));
|
|
3006
3201
|
DialogTitle.displayName = DialogPrimitive.Title.displayName;
|
|
3007
|
-
var DialogDescription =
|
|
3202
|
+
var DialogDescription = React52.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
3008
3203
|
DialogPrimitive.Description,
|
|
3009
3204
|
{
|
|
3010
3205
|
ref,
|
|
@@ -3019,7 +3214,7 @@ init_utils();
|
|
|
3019
3214
|
var AlertDialog = AlertDialogPrimitive.Root;
|
|
3020
3215
|
var AlertDialogTrigger = AlertDialogPrimitive.Trigger;
|
|
3021
3216
|
var AlertDialogPortal = AlertDialogPrimitive.Portal;
|
|
3022
|
-
var AlertDialogOverlay =
|
|
3217
|
+
var AlertDialogOverlay = React52.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
3023
3218
|
AlertDialogPrimitive.Overlay,
|
|
3024
3219
|
{
|
|
3025
3220
|
className: cn(
|
|
@@ -3031,7 +3226,7 @@ var AlertDialogOverlay = React50.forwardRef(({ className, ...props }, ref) => /*
|
|
|
3031
3226
|
}
|
|
3032
3227
|
));
|
|
3033
3228
|
AlertDialogOverlay.displayName = AlertDialogPrimitive.Overlay.displayName;
|
|
3034
|
-
var AlertDialogContent =
|
|
3229
|
+
var AlertDialogContent = React52.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxs(AlertDialogPortal, { children: [
|
|
3035
3230
|
/* @__PURE__ */ jsx(AlertDialogOverlay, {}),
|
|
3036
3231
|
/* @__PURE__ */ jsx(
|
|
3037
3232
|
AlertDialogPrimitive.Content,
|
|
@@ -3074,7 +3269,7 @@ var AlertDialogFooter = ({
|
|
|
3074
3269
|
}
|
|
3075
3270
|
);
|
|
3076
3271
|
AlertDialogFooter.displayName = "AlertDialogFooter";
|
|
3077
|
-
var AlertDialogTitle =
|
|
3272
|
+
var AlertDialogTitle = React52.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
3078
3273
|
AlertDialogPrimitive.Title,
|
|
3079
3274
|
{
|
|
3080
3275
|
ref,
|
|
@@ -3083,7 +3278,7 @@ var AlertDialogTitle = React50.forwardRef(({ className, ...props }, ref) => /* @
|
|
|
3083
3278
|
}
|
|
3084
3279
|
));
|
|
3085
3280
|
AlertDialogTitle.displayName = AlertDialogPrimitive.Title.displayName;
|
|
3086
|
-
var AlertDialogDescription =
|
|
3281
|
+
var AlertDialogDescription = React52.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
3087
3282
|
AlertDialogPrimitive.Description,
|
|
3088
3283
|
{
|
|
3089
3284
|
ref,
|
|
@@ -3092,7 +3287,7 @@ var AlertDialogDescription = React50.forwardRef(({ className, ...props }, ref) =
|
|
|
3092
3287
|
}
|
|
3093
3288
|
));
|
|
3094
3289
|
AlertDialogDescription.displayName = AlertDialogPrimitive.Description.displayName;
|
|
3095
|
-
var AlertDialogAction =
|
|
3290
|
+
var AlertDialogAction = React52.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
3096
3291
|
AlertDialogPrimitive.Action,
|
|
3097
3292
|
{
|
|
3098
3293
|
ref,
|
|
@@ -3101,7 +3296,7 @@ var AlertDialogAction = React50.forwardRef(({ className, ...props }, ref) => /*
|
|
|
3101
3296
|
}
|
|
3102
3297
|
));
|
|
3103
3298
|
AlertDialogAction.displayName = AlertDialogPrimitive.Action.displayName;
|
|
3104
|
-
var AlertDialogCancel =
|
|
3299
|
+
var AlertDialogCancel = React52.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
3105
3300
|
AlertDialogPrimitive.Cancel,
|
|
3106
3301
|
{
|
|
3107
3302
|
ref,
|
|
@@ -3121,7 +3316,7 @@ var Sheet = DialogPrimitive.Root;
|
|
|
3121
3316
|
var SheetTrigger = DialogPrimitive.Trigger;
|
|
3122
3317
|
var SheetClose = DialogPrimitive.Close;
|
|
3123
3318
|
var SheetPortal = DialogPrimitive.Portal;
|
|
3124
|
-
var SheetOverlay =
|
|
3319
|
+
var SheetOverlay = React52.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
3125
3320
|
DialogPrimitive.Overlay,
|
|
3126
3321
|
{
|
|
3127
3322
|
className: cn(
|
|
@@ -3149,7 +3344,7 @@ var sheetVariants = cva(
|
|
|
3149
3344
|
}
|
|
3150
3345
|
}
|
|
3151
3346
|
);
|
|
3152
|
-
var SheetContent =
|
|
3347
|
+
var SheetContent = React52.forwardRef(({ side = "right", className, children, hideClose, ...props }, ref) => /* @__PURE__ */ jsxs(SheetPortal, { children: [
|
|
3153
3348
|
/* @__PURE__ */ jsx(SheetOverlay, {}),
|
|
3154
3349
|
/* @__PURE__ */ jsxs(
|
|
3155
3350
|
DialogPrimitive.Content,
|
|
@@ -3196,7 +3391,7 @@ var SheetFooter = ({
|
|
|
3196
3391
|
}
|
|
3197
3392
|
);
|
|
3198
3393
|
SheetFooter.displayName = "SheetFooter";
|
|
3199
|
-
var SheetTitle =
|
|
3394
|
+
var SheetTitle = React52.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
3200
3395
|
DialogPrimitive.Title,
|
|
3201
3396
|
{
|
|
3202
3397
|
ref,
|
|
@@ -3205,7 +3400,7 @@ var SheetTitle = React50.forwardRef(({ className, ...props }, ref) => /* @__PURE
|
|
|
3205
3400
|
}
|
|
3206
3401
|
));
|
|
3207
3402
|
SheetTitle.displayName = DialogPrimitive.Title.displayName;
|
|
3208
|
-
var SheetDescription =
|
|
3403
|
+
var SheetDescription = React52.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
3209
3404
|
DialogPrimitive.Description,
|
|
3210
3405
|
{
|
|
3211
3406
|
ref,
|
|
@@ -3217,7 +3412,7 @@ SheetDescription.displayName = DialogPrimitive.Description.displayName;
|
|
|
3217
3412
|
|
|
3218
3413
|
// src/components/ui/drawer/index.tsx
|
|
3219
3414
|
init_utils();
|
|
3220
|
-
var DrawerContext =
|
|
3415
|
+
var DrawerContext = React52.createContext({
|
|
3221
3416
|
direction: "bottom"
|
|
3222
3417
|
});
|
|
3223
3418
|
var Drawer = ({
|
|
@@ -3236,7 +3431,7 @@ Drawer.displayName = "Drawer";
|
|
|
3236
3431
|
var DrawerTrigger = Drawer$1.Trigger;
|
|
3237
3432
|
var DrawerPortal = Drawer$1.Portal;
|
|
3238
3433
|
var DrawerClose = Drawer$1.Close;
|
|
3239
|
-
var DrawerOverlay =
|
|
3434
|
+
var DrawerOverlay = React52.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
3240
3435
|
Drawer$1.Overlay,
|
|
3241
3436
|
{
|
|
3242
3437
|
ref,
|
|
@@ -3245,7 +3440,7 @@ var DrawerOverlay = React50.forwardRef(({ className, ...props }, ref) => /* @__P
|
|
|
3245
3440
|
}
|
|
3246
3441
|
));
|
|
3247
3442
|
DrawerOverlay.displayName = Drawer$1.Overlay.displayName;
|
|
3248
|
-
var DrawerContent =
|
|
3443
|
+
var DrawerContent = React52.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(DrawerPortal, { children: [
|
|
3249
3444
|
/* @__PURE__ */ jsx(DrawerOverlay, {}),
|
|
3250
3445
|
/* @__PURE__ */ jsxs(
|
|
3251
3446
|
Drawer$1.Content,
|
|
@@ -3280,7 +3475,7 @@ var DrawerFooter = ({
|
|
|
3280
3475
|
}
|
|
3281
3476
|
);
|
|
3282
3477
|
DrawerFooter.displayName = "DrawerFooter";
|
|
3283
|
-
var DrawerTitle =
|
|
3478
|
+
var DrawerTitle = React52.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
3284
3479
|
Drawer$1.Title,
|
|
3285
3480
|
{
|
|
3286
3481
|
ref,
|
|
@@ -3292,7 +3487,7 @@ var DrawerTitle = React50.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
|
3292
3487
|
}
|
|
3293
3488
|
));
|
|
3294
3489
|
DrawerTitle.displayName = Drawer$1.Title.displayName;
|
|
3295
|
-
var DrawerDescription =
|
|
3490
|
+
var DrawerDescription = React52.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
3296
3491
|
Drawer$1.Description,
|
|
3297
3492
|
{
|
|
3298
3493
|
ref,
|
|
@@ -3307,7 +3502,7 @@ init_utils();
|
|
|
3307
3502
|
var Popover = PopoverPrimitive.Root;
|
|
3308
3503
|
var PopoverTrigger = PopoverPrimitive.Trigger;
|
|
3309
3504
|
var PopoverAnchor = PopoverPrimitive.Anchor;
|
|
3310
|
-
var PopoverContent =
|
|
3505
|
+
var PopoverContent = React52.forwardRef(({ className, align = "center", sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsx(PopoverPrimitive.Portal, { children: /* @__PURE__ */ jsx(
|
|
3311
3506
|
PopoverPrimitive.Content,
|
|
3312
3507
|
{
|
|
3313
3508
|
ref,
|
|
@@ -3327,7 +3522,7 @@ init_utils();
|
|
|
3327
3522
|
var TooltipProvider = TooltipPrimitive.Provider;
|
|
3328
3523
|
var Tooltip = TooltipPrimitive.Root;
|
|
3329
3524
|
var TooltipTrigger = TooltipPrimitive.Trigger;
|
|
3330
|
-
var TooltipContent =
|
|
3525
|
+
var TooltipContent = React52.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
3331
3526
|
TooltipPrimitive.Content,
|
|
3332
3527
|
{
|
|
3333
3528
|
ref,
|
|
@@ -3342,7 +3537,7 @@ var TooltipContent = React50.forwardRef(({ className, sideOffset = 4, ...props }
|
|
|
3342
3537
|
}
|
|
3343
3538
|
));
|
|
3344
3539
|
TooltipContent.displayName = TooltipPrimitive.Content.displayName;
|
|
3345
|
-
var SimpleTooltip =
|
|
3540
|
+
var SimpleTooltip = React52.forwardRef(
|
|
3346
3541
|
({
|
|
3347
3542
|
children,
|
|
3348
3543
|
content,
|
|
@@ -3373,7 +3568,7 @@ init_utils();
|
|
|
3373
3568
|
var HoverCard = HoverCardPrimitive.Root;
|
|
3374
3569
|
var HoverCardTrigger = HoverCardPrimitive.Trigger;
|
|
3375
3570
|
var HoverCardArrow = HoverCardPrimitive.Arrow;
|
|
3376
|
-
var HoverCardContent =
|
|
3571
|
+
var HoverCardContent = React52.forwardRef(
|
|
3377
3572
|
({
|
|
3378
3573
|
className,
|
|
3379
3574
|
align = "center",
|
|
@@ -3417,7 +3612,7 @@ var DropdownMenuGroup = DropdownMenuPrimitive.Group;
|
|
|
3417
3612
|
var DropdownMenuPortal = DropdownMenuPrimitive.Portal;
|
|
3418
3613
|
var DropdownMenuSub = DropdownMenuPrimitive.Sub;
|
|
3419
3614
|
var DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup;
|
|
3420
|
-
var DropdownMenuSubTrigger =
|
|
3615
|
+
var DropdownMenuSubTrigger = React52.forwardRef(({ className, inset, children, ...props }, ref) => /* @__PURE__ */ jsxs(
|
|
3421
3616
|
DropdownMenuPrimitive.SubTrigger,
|
|
3422
3617
|
{
|
|
3423
3618
|
ref,
|
|
@@ -3434,7 +3629,7 @@ var DropdownMenuSubTrigger = React50.forwardRef(({ className, inset, children, .
|
|
|
3434
3629
|
}
|
|
3435
3630
|
));
|
|
3436
3631
|
DropdownMenuSubTrigger.displayName = DropdownMenuPrimitive.SubTrigger.displayName;
|
|
3437
|
-
var DropdownMenuSubContent =
|
|
3632
|
+
var DropdownMenuSubContent = React52.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
3438
3633
|
DropdownMenuPrimitive.SubContent,
|
|
3439
3634
|
{
|
|
3440
3635
|
ref,
|
|
@@ -3446,7 +3641,7 @@ var DropdownMenuSubContent = React50.forwardRef(({ className, ...props }, ref) =
|
|
|
3446
3641
|
}
|
|
3447
3642
|
));
|
|
3448
3643
|
DropdownMenuSubContent.displayName = DropdownMenuPrimitive.SubContent.displayName;
|
|
3449
|
-
var DropdownMenuContent =
|
|
3644
|
+
var DropdownMenuContent = React52.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsx(DropdownMenuPrimitive.Portal, { children: /* @__PURE__ */ jsx(
|
|
3450
3645
|
DropdownMenuPrimitive.Content,
|
|
3451
3646
|
{
|
|
3452
3647
|
ref,
|
|
@@ -3459,7 +3654,7 @@ var DropdownMenuContent = React50.forwardRef(({ className, sideOffset = 4, ...pr
|
|
|
3459
3654
|
}
|
|
3460
3655
|
) }));
|
|
3461
3656
|
DropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName;
|
|
3462
|
-
var DropdownMenuItem =
|
|
3657
|
+
var DropdownMenuItem = React52.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
3463
3658
|
DropdownMenuPrimitive.Item,
|
|
3464
3659
|
{
|
|
3465
3660
|
ref,
|
|
@@ -3472,7 +3667,7 @@ var DropdownMenuItem = React50.forwardRef(({ className, inset, ...props }, ref)
|
|
|
3472
3667
|
}
|
|
3473
3668
|
));
|
|
3474
3669
|
DropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName;
|
|
3475
|
-
var DropdownMenuCheckboxItem =
|
|
3670
|
+
var DropdownMenuCheckboxItem = React52.forwardRef(({ className, children, checked, ...props }, ref) => /* @__PURE__ */ jsxs(
|
|
3476
3671
|
DropdownMenuPrimitive.CheckboxItem,
|
|
3477
3672
|
{
|
|
3478
3673
|
ref,
|
|
@@ -3489,7 +3684,7 @@ var DropdownMenuCheckboxItem = React50.forwardRef(({ className, children, checke
|
|
|
3489
3684
|
}
|
|
3490
3685
|
));
|
|
3491
3686
|
DropdownMenuCheckboxItem.displayName = DropdownMenuPrimitive.CheckboxItem.displayName;
|
|
3492
|
-
var DropdownMenuRadioItem =
|
|
3687
|
+
var DropdownMenuRadioItem = React52.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(
|
|
3493
3688
|
DropdownMenuPrimitive.RadioItem,
|
|
3494
3689
|
{
|
|
3495
3690
|
ref,
|
|
@@ -3505,7 +3700,7 @@ var DropdownMenuRadioItem = React50.forwardRef(({ className, children, ...props
|
|
|
3505
3700
|
}
|
|
3506
3701
|
));
|
|
3507
3702
|
DropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName;
|
|
3508
|
-
var DropdownMenuLabel =
|
|
3703
|
+
var DropdownMenuLabel = React52.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
3509
3704
|
DropdownMenuPrimitive.Label,
|
|
3510
3705
|
{
|
|
3511
3706
|
ref,
|
|
@@ -3518,7 +3713,7 @@ var DropdownMenuLabel = React50.forwardRef(({ className, inset, ...props }, ref)
|
|
|
3518
3713
|
}
|
|
3519
3714
|
));
|
|
3520
3715
|
DropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName;
|
|
3521
|
-
var DropdownMenuSeparator =
|
|
3716
|
+
var DropdownMenuSeparator = React52.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
3522
3717
|
DropdownMenuPrimitive.Separator,
|
|
3523
3718
|
{
|
|
3524
3719
|
ref,
|
|
@@ -3549,7 +3744,7 @@ var ContextMenuGroup = ContextMenuPrimitive.Group;
|
|
|
3549
3744
|
var ContextMenuPortal = ContextMenuPrimitive.Portal;
|
|
3550
3745
|
var ContextMenuSub = ContextMenuPrimitive.Sub;
|
|
3551
3746
|
var ContextMenuRadioGroup = ContextMenuPrimitive.RadioGroup;
|
|
3552
|
-
var ContextMenuSubTrigger =
|
|
3747
|
+
var ContextMenuSubTrigger = React52.forwardRef(({ className, inset, children, ...props }, ref) => /* @__PURE__ */ jsxs(
|
|
3553
3748
|
ContextMenuPrimitive.SubTrigger,
|
|
3554
3749
|
{
|
|
3555
3750
|
ref,
|
|
@@ -3566,7 +3761,7 @@ var ContextMenuSubTrigger = React50.forwardRef(({ className, inset, children, ..
|
|
|
3566
3761
|
}
|
|
3567
3762
|
));
|
|
3568
3763
|
ContextMenuSubTrigger.displayName = ContextMenuPrimitive.SubTrigger.displayName;
|
|
3569
|
-
var ContextMenuSubContent =
|
|
3764
|
+
var ContextMenuSubContent = React52.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
3570
3765
|
ContextMenuPrimitive.SubContent,
|
|
3571
3766
|
{
|
|
3572
3767
|
ref,
|
|
@@ -3578,7 +3773,7 @@ var ContextMenuSubContent = React50.forwardRef(({ className, ...props }, ref) =>
|
|
|
3578
3773
|
}
|
|
3579
3774
|
));
|
|
3580
3775
|
ContextMenuSubContent.displayName = ContextMenuPrimitive.SubContent.displayName;
|
|
3581
|
-
var ContextMenuContent =
|
|
3776
|
+
var ContextMenuContent = React52.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(ContextMenuPrimitive.Portal, { children: /* @__PURE__ */ jsx(
|
|
3582
3777
|
ContextMenuPrimitive.Content,
|
|
3583
3778
|
{
|
|
3584
3779
|
ref,
|
|
@@ -3590,7 +3785,7 @@ var ContextMenuContent = React50.forwardRef(({ className, ...props }, ref) => /*
|
|
|
3590
3785
|
}
|
|
3591
3786
|
) }));
|
|
3592
3787
|
ContextMenuContent.displayName = ContextMenuPrimitive.Content.displayName;
|
|
3593
|
-
var ContextMenuItem =
|
|
3788
|
+
var ContextMenuItem = React52.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
3594
3789
|
ContextMenuPrimitive.Item,
|
|
3595
3790
|
{
|
|
3596
3791
|
ref,
|
|
@@ -3603,7 +3798,7 @@ var ContextMenuItem = React50.forwardRef(({ className, inset, ...props }, ref) =
|
|
|
3603
3798
|
}
|
|
3604
3799
|
));
|
|
3605
3800
|
ContextMenuItem.displayName = ContextMenuPrimitive.Item.displayName;
|
|
3606
|
-
var ContextMenuCheckboxItem =
|
|
3801
|
+
var ContextMenuCheckboxItem = React52.forwardRef(({ className, children, checked, ...props }, ref) => /* @__PURE__ */ jsxs(
|
|
3607
3802
|
ContextMenuPrimitive.CheckboxItem,
|
|
3608
3803
|
{
|
|
3609
3804
|
ref,
|
|
@@ -3620,7 +3815,7 @@ var ContextMenuCheckboxItem = React50.forwardRef(({ className, children, checked
|
|
|
3620
3815
|
}
|
|
3621
3816
|
));
|
|
3622
3817
|
ContextMenuCheckboxItem.displayName = ContextMenuPrimitive.CheckboxItem.displayName;
|
|
3623
|
-
var ContextMenuRadioItem =
|
|
3818
|
+
var ContextMenuRadioItem = React52.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(
|
|
3624
3819
|
ContextMenuPrimitive.RadioItem,
|
|
3625
3820
|
{
|
|
3626
3821
|
ref,
|
|
@@ -3636,7 +3831,7 @@ var ContextMenuRadioItem = React50.forwardRef(({ className, children, ...props }
|
|
|
3636
3831
|
}
|
|
3637
3832
|
));
|
|
3638
3833
|
ContextMenuRadioItem.displayName = ContextMenuPrimitive.RadioItem.displayName;
|
|
3639
|
-
var ContextMenuLabel =
|
|
3834
|
+
var ContextMenuLabel = React52.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
3640
3835
|
ContextMenuPrimitive.Label,
|
|
3641
3836
|
{
|
|
3642
3837
|
ref,
|
|
@@ -3649,7 +3844,7 @@ var ContextMenuLabel = React50.forwardRef(({ className, inset, ...props }, ref)
|
|
|
3649
3844
|
}
|
|
3650
3845
|
));
|
|
3651
3846
|
ContextMenuLabel.displayName = ContextMenuPrimitive.Label.displayName;
|
|
3652
|
-
var ContextMenuSeparator =
|
|
3847
|
+
var ContextMenuSeparator = React52.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
3653
3848
|
ContextMenuPrimitive.Separator,
|
|
3654
3849
|
{
|
|
3655
3850
|
ref,
|
|
@@ -3682,7 +3877,7 @@ var MenubarGroup = MenubarPrimitive.Group;
|
|
|
3682
3877
|
var MenubarPortal = MenubarPrimitive.Portal;
|
|
3683
3878
|
var MenubarSub = MenubarPrimitive.Sub;
|
|
3684
3879
|
var MenubarRadioGroup = MenubarPrimitive.RadioGroup;
|
|
3685
|
-
var Menubar =
|
|
3880
|
+
var Menubar = React52.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
3686
3881
|
MenubarPrimitive.Root,
|
|
3687
3882
|
{
|
|
3688
3883
|
ref,
|
|
@@ -3694,7 +3889,7 @@ var Menubar = React50.forwardRef(({ className, ...props }, ref) => /* @__PURE__
|
|
|
3694
3889
|
}
|
|
3695
3890
|
));
|
|
3696
3891
|
Menubar.displayName = MenubarPrimitive.Root.displayName;
|
|
3697
|
-
var MenubarTrigger =
|
|
3892
|
+
var MenubarTrigger = React52.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
3698
3893
|
MenubarPrimitive.Trigger,
|
|
3699
3894
|
{
|
|
3700
3895
|
ref,
|
|
@@ -3706,7 +3901,7 @@ var MenubarTrigger = React50.forwardRef(({ className, ...props }, ref) => /* @__
|
|
|
3706
3901
|
}
|
|
3707
3902
|
));
|
|
3708
3903
|
MenubarTrigger.displayName = MenubarPrimitive.Trigger.displayName;
|
|
3709
|
-
var MenubarSubTrigger =
|
|
3904
|
+
var MenubarSubTrigger = React52.forwardRef(({ className, inset, children, ...props }, ref) => /* @__PURE__ */ jsxs(
|
|
3710
3905
|
MenubarPrimitive.SubTrigger,
|
|
3711
3906
|
{
|
|
3712
3907
|
ref,
|
|
@@ -3723,7 +3918,7 @@ var MenubarSubTrigger = React50.forwardRef(({ className, inset, children, ...pro
|
|
|
3723
3918
|
}
|
|
3724
3919
|
));
|
|
3725
3920
|
MenubarSubTrigger.displayName = MenubarPrimitive.SubTrigger.displayName;
|
|
3726
|
-
var MenubarSubContent =
|
|
3921
|
+
var MenubarSubContent = React52.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
3727
3922
|
MenubarPrimitive.SubContent,
|
|
3728
3923
|
{
|
|
3729
3924
|
ref,
|
|
@@ -3735,7 +3930,7 @@ var MenubarSubContent = React50.forwardRef(({ className, ...props }, ref) => /*
|
|
|
3735
3930
|
}
|
|
3736
3931
|
));
|
|
3737
3932
|
MenubarSubContent.displayName = MenubarPrimitive.SubContent.displayName;
|
|
3738
|
-
var MenubarContent =
|
|
3933
|
+
var MenubarContent = React52.forwardRef(
|
|
3739
3934
|
({ className, align = "start", alignOffset = -4, sideOffset = 8, ...props }, ref) => /* @__PURE__ */ jsx(MenubarPrimitive.Portal, { children: /* @__PURE__ */ jsx(
|
|
3740
3935
|
MenubarPrimitive.Content,
|
|
3741
3936
|
{
|
|
@@ -3752,7 +3947,7 @@ var MenubarContent = React50.forwardRef(
|
|
|
3752
3947
|
) })
|
|
3753
3948
|
);
|
|
3754
3949
|
MenubarContent.displayName = MenubarPrimitive.Content.displayName;
|
|
3755
|
-
var MenubarItem =
|
|
3950
|
+
var MenubarItem = React52.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
3756
3951
|
MenubarPrimitive.Item,
|
|
3757
3952
|
{
|
|
3758
3953
|
ref,
|
|
@@ -3765,7 +3960,7 @@ var MenubarItem = React50.forwardRef(({ className, inset, ...props }, ref) => /*
|
|
|
3765
3960
|
}
|
|
3766
3961
|
));
|
|
3767
3962
|
MenubarItem.displayName = MenubarPrimitive.Item.displayName;
|
|
3768
|
-
var MenubarCheckboxItem =
|
|
3963
|
+
var MenubarCheckboxItem = React52.forwardRef(({ className, children, checked, ...props }, ref) => /* @__PURE__ */ jsxs(
|
|
3769
3964
|
MenubarPrimitive.CheckboxItem,
|
|
3770
3965
|
{
|
|
3771
3966
|
ref,
|
|
@@ -3782,7 +3977,7 @@ var MenubarCheckboxItem = React50.forwardRef(({ className, children, checked, ..
|
|
|
3782
3977
|
}
|
|
3783
3978
|
));
|
|
3784
3979
|
MenubarCheckboxItem.displayName = MenubarPrimitive.CheckboxItem.displayName;
|
|
3785
|
-
var MenubarRadioItem =
|
|
3980
|
+
var MenubarRadioItem = React52.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(
|
|
3786
3981
|
MenubarPrimitive.RadioItem,
|
|
3787
3982
|
{
|
|
3788
3983
|
ref,
|
|
@@ -3798,7 +3993,7 @@ var MenubarRadioItem = React50.forwardRef(({ className, children, ...props }, re
|
|
|
3798
3993
|
}
|
|
3799
3994
|
));
|
|
3800
3995
|
MenubarRadioItem.displayName = MenubarPrimitive.RadioItem.displayName;
|
|
3801
|
-
var MenubarLabel =
|
|
3996
|
+
var MenubarLabel = React52.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
3802
3997
|
MenubarPrimitive.Label,
|
|
3803
3998
|
{
|
|
3804
3999
|
ref,
|
|
@@ -3811,7 +4006,7 @@ var MenubarLabel = React50.forwardRef(({ className, inset, ...props }, ref) => /
|
|
|
3811
4006
|
}
|
|
3812
4007
|
));
|
|
3813
4008
|
MenubarLabel.displayName = MenubarPrimitive.Label.displayName;
|
|
3814
|
-
var MenubarSeparator =
|
|
4009
|
+
var MenubarSeparator = React52.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
3815
4010
|
MenubarPrimitive.Separator,
|
|
3816
4011
|
{
|
|
3817
4012
|
ref,
|
|
@@ -3839,7 +4034,7 @@ MenubarShortcut.displayName = "MenubarShortcut";
|
|
|
3839
4034
|
|
|
3840
4035
|
// src/components/ui/navigation-menu/index.tsx
|
|
3841
4036
|
init_utils();
|
|
3842
|
-
var NavigationMenu =
|
|
4037
|
+
var NavigationMenu = React52.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(
|
|
3843
4038
|
NavigationMenuPrimitive.Root,
|
|
3844
4039
|
{
|
|
3845
4040
|
ref,
|
|
@@ -3855,7 +4050,7 @@ var NavigationMenu = React50.forwardRef(({ className, children, ...props }, ref)
|
|
|
3855
4050
|
}
|
|
3856
4051
|
));
|
|
3857
4052
|
NavigationMenu.displayName = NavigationMenuPrimitive.Root.displayName;
|
|
3858
|
-
var NavigationMenuList =
|
|
4053
|
+
var NavigationMenuList = React52.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
3859
4054
|
NavigationMenuPrimitive.List,
|
|
3860
4055
|
{
|
|
3861
4056
|
ref,
|
|
@@ -3871,7 +4066,7 @@ var NavigationMenuItem = NavigationMenuPrimitive.Item;
|
|
|
3871
4066
|
var navigationMenuTriggerStyle = cva(
|
|
3872
4067
|
"group inline-flex h-10 w-max items-center justify-center rounded-md bg-background px-4 py-2 text-[0.9375rem] font-medium transition-colors hover:bg-mvn-gray-100 focus:bg-mvn-gray-100 focus:outline-none disabled:pointer-events-none disabled:opacity-50 data-[active]:bg-mvn-gray-100 data-[state=open]:bg-mvn-gray-100"
|
|
3873
4068
|
);
|
|
3874
|
-
var NavigationMenuTrigger =
|
|
4069
|
+
var NavigationMenuTrigger = React52.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(
|
|
3875
4070
|
NavigationMenuPrimitive.Trigger,
|
|
3876
4071
|
{
|
|
3877
4072
|
ref,
|
|
@@ -3891,7 +4086,7 @@ var NavigationMenuTrigger = React50.forwardRef(({ className, children, ...props
|
|
|
3891
4086
|
}
|
|
3892
4087
|
));
|
|
3893
4088
|
NavigationMenuTrigger.displayName = NavigationMenuPrimitive.Trigger.displayName;
|
|
3894
|
-
var NavigationMenuContent =
|
|
4089
|
+
var NavigationMenuContent = React52.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
3895
4090
|
NavigationMenuPrimitive.Content,
|
|
3896
4091
|
{
|
|
3897
4092
|
ref,
|
|
@@ -3904,7 +4099,7 @@ var NavigationMenuContent = React50.forwardRef(({ className, ...props }, ref) =>
|
|
|
3904
4099
|
));
|
|
3905
4100
|
NavigationMenuContent.displayName = NavigationMenuPrimitive.Content.displayName;
|
|
3906
4101
|
var NavigationMenuLink = NavigationMenuPrimitive.Link;
|
|
3907
|
-
var NavigationMenuViewport =
|
|
4102
|
+
var NavigationMenuViewport = React52.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { className: cn("absolute left-0 top-full flex justify-center"), children: /* @__PURE__ */ jsx(
|
|
3908
4103
|
NavigationMenuPrimitive.Viewport,
|
|
3909
4104
|
{
|
|
3910
4105
|
className: cn(
|
|
@@ -3916,7 +4111,7 @@ var NavigationMenuViewport = React50.forwardRef(({ className, ...props }, ref) =
|
|
|
3916
4111
|
}
|
|
3917
4112
|
) }));
|
|
3918
4113
|
NavigationMenuViewport.displayName = NavigationMenuPrimitive.Viewport.displayName;
|
|
3919
|
-
var NavigationMenuIndicator =
|
|
4114
|
+
var NavigationMenuIndicator = React52.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
3920
4115
|
NavigationMenuPrimitive.Indicator,
|
|
3921
4116
|
{
|
|
3922
4117
|
ref,
|
|
@@ -3932,7 +4127,7 @@ NavigationMenuIndicator.displayName = NavigationMenuPrimitive.Indicator.displayN
|
|
|
3932
4127
|
|
|
3933
4128
|
// src/components/ui/command/index.tsx
|
|
3934
4129
|
init_utils();
|
|
3935
|
-
var Command =
|
|
4130
|
+
var Command = React52.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
3936
4131
|
Command$1,
|
|
3937
4132
|
{
|
|
3938
4133
|
ref,
|
|
@@ -3947,7 +4142,7 @@ Command.displayName = Command$1.displayName;
|
|
|
3947
4142
|
var CommandDialog = ({ children, ...props }) => {
|
|
3948
4143
|
return /* @__PURE__ */ jsx(Dialog, { ...props, children: /* @__PURE__ */ jsx(DialogContent, { className: "overflow-hidden p-0", children: /* @__PURE__ */ jsx(Command, { className: "[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5", children }) }) });
|
|
3949
4144
|
};
|
|
3950
|
-
var CommandInput =
|
|
4145
|
+
var CommandInput = React52.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxs("div", { className: "flex items-center border-b border-mvn-gray-200 px-3", "cmdk-input-wrapper": "", children: [
|
|
3951
4146
|
/* @__PURE__ */ jsx(MagnifyingGlassIcon, { className: "mr-2 h-4 w-4 shrink-0 opacity-50" }),
|
|
3952
4147
|
/* @__PURE__ */ jsx(
|
|
3953
4148
|
Command$1.Input,
|
|
@@ -3962,7 +4157,7 @@ var CommandInput = React50.forwardRef(({ className, ...props }, ref) => /* @__PU
|
|
|
3962
4157
|
)
|
|
3963
4158
|
] }));
|
|
3964
4159
|
CommandInput.displayName = Command$1.Input.displayName;
|
|
3965
|
-
var CommandList =
|
|
4160
|
+
var CommandList = React52.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
3966
4161
|
Command$1.List,
|
|
3967
4162
|
{
|
|
3968
4163
|
ref,
|
|
@@ -3971,7 +4166,7 @@ var CommandList = React50.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
|
3971
4166
|
}
|
|
3972
4167
|
));
|
|
3973
4168
|
CommandList.displayName = Command$1.List.displayName;
|
|
3974
|
-
var CommandEmpty =
|
|
4169
|
+
var CommandEmpty = React52.forwardRef((props, ref) => /* @__PURE__ */ jsx(
|
|
3975
4170
|
Command$1.Empty,
|
|
3976
4171
|
{
|
|
3977
4172
|
ref,
|
|
@@ -3980,7 +4175,7 @@ var CommandEmpty = React50.forwardRef((props, ref) => /* @__PURE__ */ jsx(
|
|
|
3980
4175
|
}
|
|
3981
4176
|
));
|
|
3982
4177
|
CommandEmpty.displayName = Command$1.Empty.displayName;
|
|
3983
|
-
var CommandGroup =
|
|
4178
|
+
var CommandGroup = React52.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
3984
4179
|
Command$1.Group,
|
|
3985
4180
|
{
|
|
3986
4181
|
ref,
|
|
@@ -3992,7 +4187,7 @@ var CommandGroup = React50.forwardRef(({ className, ...props }, ref) => /* @__PU
|
|
|
3992
4187
|
}
|
|
3993
4188
|
));
|
|
3994
4189
|
CommandGroup.displayName = Command$1.Group.displayName;
|
|
3995
|
-
var CommandSeparator =
|
|
4190
|
+
var CommandSeparator = React52.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
3996
4191
|
Command$1.Separator,
|
|
3997
4192
|
{
|
|
3998
4193
|
ref,
|
|
@@ -4001,7 +4196,7 @@ var CommandSeparator = React50.forwardRef(({ className, ...props }, ref) => /* @
|
|
|
4001
4196
|
}
|
|
4002
4197
|
));
|
|
4003
4198
|
CommandSeparator.displayName = Command$1.Separator.displayName;
|
|
4004
|
-
var CommandItem =
|
|
4199
|
+
var CommandItem = React52.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
4005
4200
|
Command$1.Item,
|
|
4006
4201
|
{
|
|
4007
4202
|
ref,
|
|
@@ -4032,7 +4227,7 @@ CommandShortcut.displayName = "CommandShortcut";
|
|
|
4032
4227
|
|
|
4033
4228
|
// src/components/ui/combobox/index.tsx
|
|
4034
4229
|
init_utils();
|
|
4035
|
-
var Combobox =
|
|
4230
|
+
var Combobox = React52.forwardRef(
|
|
4036
4231
|
({
|
|
4037
4232
|
options,
|
|
4038
4233
|
value,
|
|
@@ -4044,7 +4239,7 @@ var Combobox = React50.forwardRef(
|
|
|
4044
4239
|
disabled,
|
|
4045
4240
|
clearable
|
|
4046
4241
|
}, ref) => {
|
|
4047
|
-
const [open, setOpen] =
|
|
4242
|
+
const [open, setOpen] = React52.useState(false);
|
|
4048
4243
|
const selectedOption = options.find((option) => option.value === value);
|
|
4049
4244
|
const handleClear = (e) => {
|
|
4050
4245
|
e.stopPropagation();
|
|
@@ -4116,9 +4311,9 @@ Combobox.displayName = "Combobox";
|
|
|
4116
4311
|
|
|
4117
4312
|
// src/components/ui/breadcrumb/index.tsx
|
|
4118
4313
|
init_utils();
|
|
4119
|
-
var Breadcrumb =
|
|
4314
|
+
var Breadcrumb = React52.forwardRef(({ ...props }, ref) => /* @__PURE__ */ jsx("nav", { ref, "aria-label": "breadcrumb", ...props }));
|
|
4120
4315
|
Breadcrumb.displayName = "Breadcrumb";
|
|
4121
|
-
var BreadcrumbList =
|
|
4316
|
+
var BreadcrumbList = React52.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
4122
4317
|
"ol",
|
|
4123
4318
|
{
|
|
4124
4319
|
ref,
|
|
@@ -4130,7 +4325,7 @@ var BreadcrumbList = React50.forwardRef(({ className, ...props }, ref) => /* @__
|
|
|
4130
4325
|
}
|
|
4131
4326
|
));
|
|
4132
4327
|
BreadcrumbList.displayName = "BreadcrumbList";
|
|
4133
|
-
var BreadcrumbItem =
|
|
4328
|
+
var BreadcrumbItem = React52.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
4134
4329
|
"li",
|
|
4135
4330
|
{
|
|
4136
4331
|
ref,
|
|
@@ -4139,7 +4334,7 @@ var BreadcrumbItem = React50.forwardRef(({ className, ...props }, ref) => /* @__
|
|
|
4139
4334
|
}
|
|
4140
4335
|
));
|
|
4141
4336
|
BreadcrumbItem.displayName = "BreadcrumbItem";
|
|
4142
|
-
var BreadcrumbLink =
|
|
4337
|
+
var BreadcrumbLink = React52.forwardRef(({ asChild, className, ...props }, ref) => {
|
|
4143
4338
|
const Comp = "a";
|
|
4144
4339
|
return /* @__PURE__ */ jsx(
|
|
4145
4340
|
Comp,
|
|
@@ -4154,7 +4349,7 @@ var BreadcrumbLink = React50.forwardRef(({ asChild, className, ...props }, ref)
|
|
|
4154
4349
|
);
|
|
4155
4350
|
});
|
|
4156
4351
|
BreadcrumbLink.displayName = "BreadcrumbLink";
|
|
4157
|
-
var BreadcrumbPage =
|
|
4352
|
+
var BreadcrumbPage = React52.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
4158
4353
|
"span",
|
|
4159
4354
|
{
|
|
4160
4355
|
ref,
|
|
@@ -4221,7 +4416,7 @@ var Pagination = ({
|
|
|
4221
4416
|
}
|
|
4222
4417
|
);
|
|
4223
4418
|
Pagination.displayName = "Pagination";
|
|
4224
|
-
var PaginationContent =
|
|
4419
|
+
var PaginationContent = React52.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
4225
4420
|
"ul",
|
|
4226
4421
|
{
|
|
4227
4422
|
ref,
|
|
@@ -4230,7 +4425,7 @@ var PaginationContent = React50.forwardRef(({ className, ...props }, ref) => /*
|
|
|
4230
4425
|
}
|
|
4231
4426
|
));
|
|
4232
4427
|
PaginationContent.displayName = "PaginationContent";
|
|
4233
|
-
var PaginationItem =
|
|
4428
|
+
var PaginationItem = React52.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("li", { ref, className: cn("", className), ...props }));
|
|
4234
4429
|
PaginationItem.displayName = "PaginationItem";
|
|
4235
4430
|
var PaginationLink = ({
|
|
4236
4431
|
className,
|
|
@@ -4337,12 +4532,12 @@ PaginationEllipsis.displayName = "PaginationEllipsis";
|
|
|
4337
4532
|
|
|
4338
4533
|
// src/components/ui/tabs/index.tsx
|
|
4339
4534
|
init_utils();
|
|
4340
|
-
var TabsContext =
|
|
4535
|
+
var TabsContext = React52.createContext({
|
|
4341
4536
|
destroyInactiveTabs: true
|
|
4342
4537
|
});
|
|
4343
|
-
var Tabs =
|
|
4538
|
+
var Tabs = React52.forwardRef(({ destroyInactiveTabs = true, ...props }, ref) => /* @__PURE__ */ jsx(TabsContext.Provider, { value: { destroyInactiveTabs }, children: /* @__PURE__ */ jsx(TabsPrimitive.Root, { ref, ...props }) }));
|
|
4344
4539
|
Tabs.displayName = TabsPrimitive.Root.displayName;
|
|
4345
|
-
var TabsList =
|
|
4540
|
+
var TabsList = React52.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
4346
4541
|
TabsPrimitive.List,
|
|
4347
4542
|
{
|
|
4348
4543
|
ref,
|
|
@@ -4357,7 +4552,7 @@ var TabsList = React50.forwardRef(({ className, ...props }, ref) => /* @__PURE__
|
|
|
4357
4552
|
}
|
|
4358
4553
|
));
|
|
4359
4554
|
TabsList.displayName = TabsPrimitive.List.displayName;
|
|
4360
|
-
var TabsTrigger =
|
|
4555
|
+
var TabsTrigger = React52.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
4361
4556
|
TabsPrimitive.Trigger,
|
|
4362
4557
|
{
|
|
4363
4558
|
ref,
|
|
@@ -4379,8 +4574,8 @@ var TabsTrigger = React50.forwardRef(({ className, children, ...props }, ref) =>
|
|
|
4379
4574
|
}
|
|
4380
4575
|
));
|
|
4381
4576
|
TabsTrigger.displayName = TabsPrimitive.Trigger.displayName;
|
|
4382
|
-
var TabsContent =
|
|
4383
|
-
const { destroyInactiveTabs } =
|
|
4577
|
+
var TabsContent = React52.forwardRef(({ className, ...props }, ref) => {
|
|
4578
|
+
const { destroyInactiveTabs } = React52.useContext(TabsContext);
|
|
4384
4579
|
return /* @__PURE__ */ jsx(
|
|
4385
4580
|
TabsPrimitive.Content,
|
|
4386
4581
|
{
|
|
@@ -4469,7 +4664,7 @@ var separatorVariants = cva("shrink-0 bg-line-normal", {
|
|
|
4469
4664
|
variant: "default"
|
|
4470
4665
|
}
|
|
4471
4666
|
});
|
|
4472
|
-
var Separator5 =
|
|
4667
|
+
var Separator5 = React52.forwardRef(
|
|
4473
4668
|
({
|
|
4474
4669
|
className,
|
|
4475
4670
|
orientation = "horizontal",
|
|
@@ -4526,7 +4721,7 @@ var AspectRatio = AspectRatioPrimitive.Root;
|
|
|
4526
4721
|
|
|
4527
4722
|
// src/components/ui/accordion/index.tsx
|
|
4528
4723
|
init_utils();
|
|
4529
|
-
var Accordion =
|
|
4724
|
+
var Accordion = React52.forwardRef(
|
|
4530
4725
|
({
|
|
4531
4726
|
items,
|
|
4532
4727
|
className,
|
|
@@ -4536,7 +4731,7 @@ var Accordion = React50.forwardRef(
|
|
|
4536
4731
|
renderItem,
|
|
4537
4732
|
...props
|
|
4538
4733
|
}, ref) => {
|
|
4539
|
-
const defaultRenderItem =
|
|
4734
|
+
const defaultRenderItem = React52.useCallback(
|
|
4540
4735
|
(item) => /* @__PURE__ */ jsxs(
|
|
4541
4736
|
AccordionPrimitive.Item,
|
|
4542
4737
|
{
|
|
@@ -4584,7 +4779,7 @@ Accordion.displayName = "Accordion";
|
|
|
4584
4779
|
// src/components/ui/collapsible/index.tsx
|
|
4585
4780
|
init_utils();
|
|
4586
4781
|
var Collapsible = CollapsiblePrimitive.Root;
|
|
4587
|
-
var CollapsibleItem =
|
|
4782
|
+
var CollapsibleItem = React52.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
4588
4783
|
"div",
|
|
4589
4784
|
{
|
|
4590
4785
|
ref,
|
|
@@ -4596,7 +4791,7 @@ var CollapsibleItem = React50.forwardRef(({ className, ...props }, ref) => /* @_
|
|
|
4596
4791
|
}
|
|
4597
4792
|
));
|
|
4598
4793
|
CollapsibleItem.displayName = "CollapsibleItem";
|
|
4599
|
-
var CollapsibleTrigger =
|
|
4794
|
+
var CollapsibleTrigger = React52.forwardRef(({ className, children, indicator, ...props }, ref) => /* @__PURE__ */ jsxs(
|
|
4600
4795
|
CollapsiblePrimitive.Trigger,
|
|
4601
4796
|
{
|
|
4602
4797
|
ref,
|
|
@@ -4622,7 +4817,7 @@ var CollapsibleTrigger = React50.forwardRef(({ className, children, indicator, .
|
|
|
4622
4817
|
}
|
|
4623
4818
|
));
|
|
4624
4819
|
CollapsibleTrigger.displayName = CollapsiblePrimitive.Trigger.displayName;
|
|
4625
|
-
var CollapsibleContent =
|
|
4820
|
+
var CollapsibleContent = React52.forwardRef(({ className, contentClassName, children, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
4626
4821
|
CollapsiblePrimitive.Content,
|
|
4627
4822
|
{
|
|
4628
4823
|
ref,
|
|
@@ -4673,7 +4868,7 @@ var ResizableHandle = ({
|
|
|
4673
4868
|
|
|
4674
4869
|
// src/components/ui/scroll-area/index.tsx
|
|
4675
4870
|
init_utils();
|
|
4676
|
-
var ScrollArea =
|
|
4871
|
+
var ScrollArea = React52.forwardRef(
|
|
4677
4872
|
({
|
|
4678
4873
|
className,
|
|
4679
4874
|
children,
|
|
@@ -4728,7 +4923,7 @@ var ScrollArea = React50.forwardRef(
|
|
|
4728
4923
|
}
|
|
4729
4924
|
);
|
|
4730
4925
|
ScrollArea.displayName = ScrollAreaPrimitive.Root.displayName;
|
|
4731
|
-
var ScrollBar =
|
|
4926
|
+
var ScrollBar = React52.forwardRef(({ className, orientation = "vertical", thumbClassName, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
4732
4927
|
ScrollAreaPrimitive.ScrollAreaScrollbar,
|
|
4733
4928
|
{
|
|
4734
4929
|
ref,
|
|
@@ -4760,9 +4955,9 @@ var SIDEBAR_COOKIE_MAX_AGE = 60 * 60 * 24 * 7;
|
|
|
4760
4955
|
var SIDEBAR_WIDTH = "16rem";
|
|
4761
4956
|
var SIDEBAR_WIDTH_ICON = "3rem";
|
|
4762
4957
|
var SIDEBAR_KEYBOARD_SHORTCUT = "b";
|
|
4763
|
-
var SidebarContext =
|
|
4958
|
+
var SidebarContext = React52.createContext(null);
|
|
4764
4959
|
function useSidebar() {
|
|
4765
|
-
const context =
|
|
4960
|
+
const context = React52.useContext(SidebarContext);
|
|
4766
4961
|
if (!context) {
|
|
4767
4962
|
throw new Error("useSidebar must be used within a SidebarProvider.");
|
|
4768
4963
|
}
|
|
@@ -4777,9 +4972,9 @@ function SidebarProvider({
|
|
|
4777
4972
|
children,
|
|
4778
4973
|
...props
|
|
4779
4974
|
}) {
|
|
4780
|
-
const [_open, _setOpen] =
|
|
4975
|
+
const [_open, _setOpen] = React52.useState(defaultOpen);
|
|
4781
4976
|
const open = openProp ?? _open;
|
|
4782
|
-
const setOpen =
|
|
4977
|
+
const setOpen = React52.useCallback(
|
|
4783
4978
|
(value) => {
|
|
4784
4979
|
const openState = typeof value === "function" ? value(open) : value;
|
|
4785
4980
|
if (setOpenProp) {
|
|
@@ -4791,10 +4986,10 @@ function SidebarProvider({
|
|
|
4791
4986
|
},
|
|
4792
4987
|
[setOpenProp, open]
|
|
4793
4988
|
);
|
|
4794
|
-
const toggleSidebar =
|
|
4989
|
+
const toggleSidebar = React52.useCallback(() => {
|
|
4795
4990
|
return setOpen((open2) => !open2);
|
|
4796
4991
|
}, [setOpen]);
|
|
4797
|
-
|
|
4992
|
+
React52.useEffect(() => {
|
|
4798
4993
|
const handleKeyDown = (event) => {
|
|
4799
4994
|
if (event.key === SIDEBAR_KEYBOARD_SHORTCUT && (event.metaKey || event.ctrlKey)) {
|
|
4800
4995
|
event.preventDefault();
|
|
@@ -4805,7 +5000,7 @@ function SidebarProvider({
|
|
|
4805
5000
|
return () => window.removeEventListener("keydown", handleKeyDown);
|
|
4806
5001
|
}, [toggleSidebar]);
|
|
4807
5002
|
const state = open ? "expanded" : "collapsed";
|
|
4808
|
-
const contextValue =
|
|
5003
|
+
const contextValue = React52.useMemo(
|
|
4809
5004
|
() => ({
|
|
4810
5005
|
state,
|
|
4811
5006
|
open,
|
|
@@ -4840,7 +5035,25 @@ function Sidebar({
|
|
|
4840
5035
|
children,
|
|
4841
5036
|
...props
|
|
4842
5037
|
}) {
|
|
4843
|
-
const { state } = useSidebar();
|
|
5038
|
+
const { state, open, setOpen } = useSidebar();
|
|
5039
|
+
const isMobile = useIsMobile();
|
|
5040
|
+
if (isMobile) {
|
|
5041
|
+
return /* @__PURE__ */ jsx(Sheet, { open, onOpenChange: setOpen, children: /* @__PURE__ */ jsx(
|
|
5042
|
+
SheetContent,
|
|
5043
|
+
{
|
|
5044
|
+
side,
|
|
5045
|
+
className: cn(
|
|
5046
|
+
"w-[280px] max-w-[80vw] p-0",
|
|
5047
|
+
"pt-[var(--mvn-safe-area-top)]",
|
|
5048
|
+
className
|
|
5049
|
+
),
|
|
5050
|
+
hideClose: true,
|
|
5051
|
+
"data-slot": "sidebar",
|
|
5052
|
+
"data-mobile": "true",
|
|
5053
|
+
children: /* @__PURE__ */ jsx("div", { className: "bg-sidebar text-sidebar-foreground flex h-full w-full flex-col", children })
|
|
5054
|
+
}
|
|
5055
|
+
) });
|
|
5056
|
+
}
|
|
4844
5057
|
if (collapsible === "none") {
|
|
4845
5058
|
return /* @__PURE__ */ jsx(
|
|
4846
5059
|
"div",
|
|
@@ -5271,7 +5484,7 @@ function SidebarMenuSkeleton({
|
|
|
5271
5484
|
showIcon = false,
|
|
5272
5485
|
...props
|
|
5273
5486
|
}) {
|
|
5274
|
-
const width =
|
|
5487
|
+
const width = React52.useMemo(() => {
|
|
5275
5488
|
return `${Math.floor(Math.random() * 40) + 50}%`;
|
|
5276
5489
|
}, []);
|
|
5277
5490
|
return /* @__PURE__ */ jsxs(
|
|
@@ -5364,6 +5577,166 @@ function SidebarMenuSubButton({
|
|
|
5364
5577
|
);
|
|
5365
5578
|
}
|
|
5366
5579
|
|
|
5580
|
+
// src/components/ui/mobile-header/index.tsx
|
|
5581
|
+
init_utils();
|
|
5582
|
+
function MobileHeader({
|
|
5583
|
+
logo,
|
|
5584
|
+
title,
|
|
5585
|
+
rightActions,
|
|
5586
|
+
showSidebarTrigger = true,
|
|
5587
|
+
stickyTop = true,
|
|
5588
|
+
className,
|
|
5589
|
+
...props
|
|
5590
|
+
}) {
|
|
5591
|
+
const sidebar = useSidebar();
|
|
5592
|
+
return /* @__PURE__ */ jsxs(
|
|
5593
|
+
"header",
|
|
5594
|
+
{
|
|
5595
|
+
"data-slot": "mobile-header",
|
|
5596
|
+
className: cn(
|
|
5597
|
+
"flex items-center h-14 bg-background border-b border-border px-4 gap-3 md:hidden",
|
|
5598
|
+
"pt-[var(--mvn-safe-area-top)]",
|
|
5599
|
+
stickyTop && "sticky top-0 z-40",
|
|
5600
|
+
className
|
|
5601
|
+
),
|
|
5602
|
+
...props,
|
|
5603
|
+
children: [
|
|
5604
|
+
showSidebarTrigger && /* @__PURE__ */ jsx(
|
|
5605
|
+
Button,
|
|
5606
|
+
{
|
|
5607
|
+
variant: "ghost",
|
|
5608
|
+
size: "icon",
|
|
5609
|
+
className: "-ml-2",
|
|
5610
|
+
onClick: () => sidebar.setOpen(true),
|
|
5611
|
+
"aria-label": "Open menu",
|
|
5612
|
+
children: /* @__PURE__ */ jsx(MenuIcon, { className: "h-5 w-5" })
|
|
5613
|
+
}
|
|
5614
|
+
),
|
|
5615
|
+
logo && /* @__PURE__ */ jsx("div", { className: "shrink-0", children: logo }),
|
|
5616
|
+
title && /* @__PURE__ */ jsx("span", { className: "font-semibold truncate flex-1 text-foreground", children: title }),
|
|
5617
|
+
rightActions && /* @__PURE__ */ jsx("div", { className: "flex items-center gap-2 shrink-0", children: rightActions })
|
|
5618
|
+
]
|
|
5619
|
+
}
|
|
5620
|
+
);
|
|
5621
|
+
}
|
|
5622
|
+
MobileHeader.displayName = "MobileHeader";
|
|
5623
|
+
|
|
5624
|
+
// src/components/ui/bottom-navigation/index.tsx
|
|
5625
|
+
init_utils();
|
|
5626
|
+
function BottomNavigation({
|
|
5627
|
+
items,
|
|
5628
|
+
activeKey,
|
|
5629
|
+
onActiveChange,
|
|
5630
|
+
hideOnDesktop = true,
|
|
5631
|
+
className,
|
|
5632
|
+
...props
|
|
5633
|
+
}) {
|
|
5634
|
+
return /* @__PURE__ */ jsx(
|
|
5635
|
+
"nav",
|
|
5636
|
+
{
|
|
5637
|
+
"data-slot": "bottom-navigation",
|
|
5638
|
+
className: cn(
|
|
5639
|
+
"fixed bottom-0 left-0 right-0 bg-background border-t border-border",
|
|
5640
|
+
"flex justify-around items-center h-16",
|
|
5641
|
+
"pb-[var(--mvn-safe-area-bottom)]",
|
|
5642
|
+
"z-40",
|
|
5643
|
+
hideOnDesktop && "md:hidden",
|
|
5644
|
+
className
|
|
5645
|
+
),
|
|
5646
|
+
...props,
|
|
5647
|
+
children: items.map((item) => {
|
|
5648
|
+
const isActive = activeKey === item.key;
|
|
5649
|
+
const Component = item.href ? "a" : "button";
|
|
5650
|
+
return /* @__PURE__ */ jsxs(
|
|
5651
|
+
Component,
|
|
5652
|
+
{
|
|
5653
|
+
href: item.href,
|
|
5654
|
+
onClick: () => {
|
|
5655
|
+
if (!item.disabled) {
|
|
5656
|
+
item.onClick?.();
|
|
5657
|
+
onActiveChange?.(item.key);
|
|
5658
|
+
}
|
|
5659
|
+
},
|
|
5660
|
+
disabled: item.disabled,
|
|
5661
|
+
className: cn(
|
|
5662
|
+
"flex flex-col items-center justify-center gap-1 flex-1 h-full relative",
|
|
5663
|
+
"text-muted-foreground transition-colors",
|
|
5664
|
+
"min-w-[64px] min-h-[48px]",
|
|
5665
|
+
"hover:text-foreground focus:outline-none focus-visible:text-foreground",
|
|
5666
|
+
isActive && "text-primary",
|
|
5667
|
+
item.disabled && "opacity-50 pointer-events-none"
|
|
5668
|
+
),
|
|
5669
|
+
"aria-current": isActive ? "page" : void 0,
|
|
5670
|
+
children: [
|
|
5671
|
+
/* @__PURE__ */ jsxs("span", { className: "relative", children: [
|
|
5672
|
+
item.icon,
|
|
5673
|
+
item.badge !== void 0 && /* @__PURE__ */ jsx(
|
|
5674
|
+
"span",
|
|
5675
|
+
{
|
|
5676
|
+
className: cn(
|
|
5677
|
+
"absolute -top-1 -right-2 min-w-[18px] h-[18px]",
|
|
5678
|
+
"bg-destructive text-destructive-foreground",
|
|
5679
|
+
"rounded-full text-[10px] font-medium",
|
|
5680
|
+
"flex items-center justify-center px-1"
|
|
5681
|
+
),
|
|
5682
|
+
children: typeof item.badge === "number" && item.badge > 99 ? "99+" : item.badge
|
|
5683
|
+
}
|
|
5684
|
+
)
|
|
5685
|
+
] }),
|
|
5686
|
+
/* @__PURE__ */ jsx("span", { className: "text-[11px] font-medium leading-tight", children: item.label })
|
|
5687
|
+
]
|
|
5688
|
+
},
|
|
5689
|
+
item.key
|
|
5690
|
+
);
|
|
5691
|
+
})
|
|
5692
|
+
}
|
|
5693
|
+
);
|
|
5694
|
+
}
|
|
5695
|
+
BottomNavigation.displayName = "BottomNavigation";
|
|
5696
|
+
var MobileNavContext = React52.createContext(
|
|
5697
|
+
null
|
|
5698
|
+
);
|
|
5699
|
+
function useMobileNav() {
|
|
5700
|
+
const context = React52.useContext(MobileNavContext);
|
|
5701
|
+
if (!context) {
|
|
5702
|
+
throw new Error(
|
|
5703
|
+
"useMobileNav must be used within MobileNavigationProvider"
|
|
5704
|
+
);
|
|
5705
|
+
}
|
|
5706
|
+
return context;
|
|
5707
|
+
}
|
|
5708
|
+
function MobileNavigationProvider({
|
|
5709
|
+
children,
|
|
5710
|
+
hideBottomNavOnScroll = false
|
|
5711
|
+
}) {
|
|
5712
|
+
const [bottomNavVisible, setBottomNavVisible] = React52.useState(true);
|
|
5713
|
+
const lastScrollY = React52.useRef(0);
|
|
5714
|
+
React52.useEffect(() => {
|
|
5715
|
+
if (!hideBottomNavOnScroll) return;
|
|
5716
|
+
const handleScroll = () => {
|
|
5717
|
+
const currentY = window.scrollY;
|
|
5718
|
+
const direction = currentY > lastScrollY.current ? "down" : "up";
|
|
5719
|
+
if (direction === "down" && currentY > 50) {
|
|
5720
|
+
setBottomNavVisible(false);
|
|
5721
|
+
} else if (direction === "up") {
|
|
5722
|
+
setBottomNavVisible(true);
|
|
5723
|
+
}
|
|
5724
|
+
lastScrollY.current = currentY;
|
|
5725
|
+
};
|
|
5726
|
+
window.addEventListener("scroll", handleScroll, { passive: true });
|
|
5727
|
+
return () => window.removeEventListener("scroll", handleScroll);
|
|
5728
|
+
}, [hideBottomNavOnScroll]);
|
|
5729
|
+
const value = React52.useMemo(
|
|
5730
|
+
() => ({
|
|
5731
|
+
bottomNavVisible,
|
|
5732
|
+
setBottomNavVisible
|
|
5733
|
+
}),
|
|
5734
|
+
[bottomNavVisible]
|
|
5735
|
+
);
|
|
5736
|
+
return /* @__PURE__ */ jsx(MobileNavContext.Provider, { value, children });
|
|
5737
|
+
}
|
|
5738
|
+
MobileNavigationProvider.displayName = "MobileNavigationProvider";
|
|
5739
|
+
|
|
5367
5740
|
// src/components/ui/table/index.tsx
|
|
5368
5741
|
init_utils();
|
|
5369
5742
|
|
|
@@ -5390,7 +5763,7 @@ var tableVariants = cva("w-full caption-bottom text-sm", {
|
|
|
5390
5763
|
size: "default"
|
|
5391
5764
|
}
|
|
5392
5765
|
});
|
|
5393
|
-
var Table =
|
|
5766
|
+
var Table = React52.forwardRef(({ className, variant, size, wrapperClassName, ...props }, ref) => /* @__PURE__ */ jsx("div", { className: cn("relative w-full overflow-auto", wrapperClassName), children: /* @__PURE__ */ jsx(
|
|
5394
5767
|
"table",
|
|
5395
5768
|
{
|
|
5396
5769
|
ref,
|
|
@@ -5399,9 +5772,9 @@ var Table = React50.forwardRef(({ className, variant, size, wrapperClassName, ..
|
|
|
5399
5772
|
}
|
|
5400
5773
|
) }));
|
|
5401
5774
|
Table.displayName = "Table";
|
|
5402
|
-
var TableHeader =
|
|
5775
|
+
var TableHeader = React52.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("thead", { ref, className: cn("[&_tr]:border-b", className), ...props }));
|
|
5403
5776
|
TableHeader.displayName = "TableHeader";
|
|
5404
|
-
var TableBody =
|
|
5777
|
+
var TableBody = React52.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
5405
5778
|
"tbody",
|
|
5406
5779
|
{
|
|
5407
5780
|
ref,
|
|
@@ -5410,7 +5783,7 @@ var TableBody = React50.forwardRef(({ className, ...props }, ref) => /* @__PURE_
|
|
|
5410
5783
|
}
|
|
5411
5784
|
));
|
|
5412
5785
|
TableBody.displayName = "TableBody";
|
|
5413
|
-
var TableFooter =
|
|
5786
|
+
var TableFooter = React52.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
5414
5787
|
"tfoot",
|
|
5415
5788
|
{
|
|
5416
5789
|
ref,
|
|
@@ -5422,7 +5795,7 @@ var TableFooter = React50.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
|
5422
5795
|
}
|
|
5423
5796
|
));
|
|
5424
5797
|
TableFooter.displayName = "TableFooter";
|
|
5425
|
-
var TableRow =
|
|
5798
|
+
var TableRow = React52.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
5426
5799
|
"tr",
|
|
5427
5800
|
{
|
|
5428
5801
|
ref,
|
|
@@ -5434,7 +5807,7 @@ var TableRow = React50.forwardRef(({ className, ...props }, ref) => /* @__PURE__
|
|
|
5434
5807
|
}
|
|
5435
5808
|
));
|
|
5436
5809
|
TableRow.displayName = "TableRow";
|
|
5437
|
-
var TableHead =
|
|
5810
|
+
var TableHead = React52.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
5438
5811
|
"th",
|
|
5439
5812
|
{
|
|
5440
5813
|
ref,
|
|
@@ -5446,7 +5819,7 @@ var TableHead = React50.forwardRef(({ className, ...props }, ref) => /* @__PURE_
|
|
|
5446
5819
|
}
|
|
5447
5820
|
));
|
|
5448
5821
|
TableHead.displayName = "TableHead";
|
|
5449
|
-
var TableCell =
|
|
5822
|
+
var TableCell = React52.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
5450
5823
|
"td",
|
|
5451
5824
|
{
|
|
5452
5825
|
ref,
|
|
@@ -5458,7 +5831,7 @@ var TableCell = React50.forwardRef(({ className, ...props }, ref) => /* @__PURE_
|
|
|
5458
5831
|
}
|
|
5459
5832
|
));
|
|
5460
5833
|
TableCell.displayName = "TableCell";
|
|
5461
|
-
var TableCaption =
|
|
5834
|
+
var TableCaption = React52.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
5462
5835
|
"caption",
|
|
5463
5836
|
{
|
|
5464
5837
|
ref,
|
|
@@ -5505,7 +5878,8 @@ var TableBodyComponent = ({
|
|
|
5505
5878
|
onRowClick,
|
|
5506
5879
|
getRowExpandable,
|
|
5507
5880
|
invalidateCache,
|
|
5508
|
-
headers
|
|
5881
|
+
headers,
|
|
5882
|
+
hasInitializedSizing
|
|
5509
5883
|
}) => {
|
|
5510
5884
|
const resolveRowClassName = useCallback(
|
|
5511
5885
|
(record, index) => {
|
|
@@ -5546,13 +5920,11 @@ var TableBodyComponent = ({
|
|
|
5546
5920
|
}
|
|
5547
5921
|
return flexRender(cell.column.columnDef.cell, cell.getContext());
|
|
5548
5922
|
};
|
|
5549
|
-
const { leftOffsets, rightOffsets
|
|
5923
|
+
const { leftOffsets, rightOffsets } = useMemo(() => {
|
|
5550
5924
|
if (!headers || headers.length === 0) {
|
|
5551
5925
|
return {
|
|
5552
5926
|
leftOffsets: /* @__PURE__ */ new Map(),
|
|
5553
|
-
rightOffsets: /* @__PURE__ */ new Map()
|
|
5554
|
-
lastLeftId: null,
|
|
5555
|
-
firstRightId: null
|
|
5927
|
+
rightOffsets: /* @__PURE__ */ new Map()
|
|
5556
5928
|
};
|
|
5557
5929
|
}
|
|
5558
5930
|
const leftPinned = headers.filter(
|
|
@@ -5576,9 +5948,7 @@ var TableBodyComponent = ({
|
|
|
5576
5948
|
}
|
|
5577
5949
|
return {
|
|
5578
5950
|
leftOffsets: leftMap,
|
|
5579
|
-
rightOffsets: rightMap
|
|
5580
|
-
lastLeftId: leftPinned.length > 0 ? leftPinned[leftPinned.length - 1].column.id : null,
|
|
5581
|
-
firstRightId: rightPinned.length > 0 ? rightPinned[0].column.id : null
|
|
5951
|
+
rightOffsets: rightMap
|
|
5582
5952
|
};
|
|
5583
5953
|
}, [headers]);
|
|
5584
5954
|
const renderBaseRow = useCallback(
|
|
@@ -5603,24 +5973,31 @@ var TableBodyComponent = ({
|
|
|
5603
5973
|
children: rowData.getVisibleCells().map((cell) => {
|
|
5604
5974
|
const meta = cell.column.columnDef.meta;
|
|
5605
5975
|
const pinPosition = cell.column.getIsPinned();
|
|
5606
|
-
const
|
|
5976
|
+
const cellStyle = {};
|
|
5977
|
+
if (hasInitializedSizing) {
|
|
5978
|
+
const fallbackWidth = cell.column.getSize();
|
|
5979
|
+
cellStyle.width = `var(--mvn-col-${cell.column.id}-width, ${fallbackWidth}px)`;
|
|
5980
|
+
cellStyle.maxWidth = `var(--mvn-col-${cell.column.id}-width, ${fallbackWidth}px)`;
|
|
5981
|
+
cellStyle.overflow = "hidden";
|
|
5982
|
+
cellStyle.textOverflow = "ellipsis";
|
|
5983
|
+
cellStyle.whiteSpace = "nowrap";
|
|
5984
|
+
}
|
|
5607
5985
|
if (pinPosition === "left") {
|
|
5608
5986
|
const offset = leftOffsets.get(cell.column.id);
|
|
5609
5987
|
if (offset !== void 0) {
|
|
5610
|
-
|
|
5611
|
-
|
|
5612
|
-
|
|
5988
|
+
cellStyle.position = "sticky";
|
|
5989
|
+
cellStyle.left = `var(--mvn-col-${cell.column.id}-left, ${offset}px)`;
|
|
5990
|
+
cellStyle.zIndex = 5;
|
|
5613
5991
|
}
|
|
5614
5992
|
} else if (pinPosition === "right") {
|
|
5615
5993
|
const offset = rightOffsets.get(cell.column.id);
|
|
5616
5994
|
if (offset !== void 0) {
|
|
5617
|
-
|
|
5618
|
-
|
|
5619
|
-
|
|
5995
|
+
cellStyle.position = "sticky";
|
|
5996
|
+
cellStyle.right = `var(--mvn-col-${cell.column.id}-right, ${offset}px)`;
|
|
5997
|
+
cellStyle.zIndex = 5;
|
|
5620
5998
|
}
|
|
5621
5999
|
}
|
|
5622
|
-
const
|
|
5623
|
-
const isFirstRightPinned = cell.column.id === firstRightId;
|
|
6000
|
+
const hasStyles = Object.keys(cellStyle).length > 0;
|
|
5624
6001
|
return /* @__PURE__ */ jsx(
|
|
5625
6002
|
TableCell,
|
|
5626
6003
|
{
|
|
@@ -5630,11 +6007,9 @@ var TableBodyComponent = ({
|
|
|
5630
6007
|
meta?.align === "right" && "text-right",
|
|
5631
6008
|
meta?.align === "left" && "text-left",
|
|
5632
6009
|
// Pinned cell styling
|
|
5633
|
-
pinPosition && "bg-background"
|
|
5634
|
-
isLastLeftPinned && "after:absolute after:right-0 after:top-0 after:bottom-0 after:w-[4px] after:bg-gradient-to-r after:from-black/10 after:to-transparent",
|
|
5635
|
-
isFirstRightPinned && "before:absolute before:left-0 before:top-0 before:bottom-0 before:w-[4px] before:bg-gradient-to-l before:from-black/10 before:to-transparent"
|
|
6010
|
+
pinPosition && "bg-background"
|
|
5636
6011
|
),
|
|
5637
|
-
style:
|
|
6012
|
+
style: hasStyles ? cellStyle : void 0,
|
|
5638
6013
|
children: onRenderedRow(cell, virtualIndex)
|
|
5639
6014
|
},
|
|
5640
6015
|
cell.id
|
|
@@ -5649,8 +6024,7 @@ var TableBodyComponent = ({
|
|
|
5649
6024
|
resolveRowClassName,
|
|
5650
6025
|
leftOffsets,
|
|
5651
6026
|
rightOffsets,
|
|
5652
|
-
|
|
5653
|
-
firstRightId
|
|
6027
|
+
hasInitializedSizing
|
|
5654
6028
|
]
|
|
5655
6029
|
);
|
|
5656
6030
|
const renderExpandedRow = useCallback(
|
|
@@ -5740,9 +6114,146 @@ var TableBodyComponent = ({
|
|
|
5740
6114
|
] }, row.id)) });
|
|
5741
6115
|
};
|
|
5742
6116
|
|
|
6117
|
+
// src/components/ui/table/components/TableCardView.tsx
|
|
6118
|
+
init_utils();
|
|
6119
|
+
var CARD_BASE_CLASSES = "border border-border rounded-lg bg-card overflow-hidden transition-shadow hover:shadow-md";
|
|
6120
|
+
function renderCellValue(col, value, record, index) {
|
|
6121
|
+
if (col.mobileRender) return col.mobileRender(value, record, index);
|
|
6122
|
+
if (col.render) return col.render(value, record, index);
|
|
6123
|
+
return String(value ?? "");
|
|
6124
|
+
}
|
|
6125
|
+
function TableCardView({
|
|
6126
|
+
rows,
|
|
6127
|
+
columns,
|
|
6128
|
+
selectable,
|
|
6129
|
+
expandable,
|
|
6130
|
+
onRowClick,
|
|
6131
|
+
rowClassName,
|
|
6132
|
+
renderExpandedContent,
|
|
6133
|
+
mobileCardActions,
|
|
6134
|
+
emptyMessage = "No data",
|
|
6135
|
+
renderMobileCard
|
|
6136
|
+
}) {
|
|
6137
|
+
if (rows.length === 0) {
|
|
6138
|
+
return /* @__PURE__ */ jsx("div", { className: "flex items-center justify-center py-12 text-muted-foreground", children: emptyMessage });
|
|
6139
|
+
}
|
|
6140
|
+
const mobileColumns = React52.useMemo(() => {
|
|
6141
|
+
return columns.filter((col) => !col.mobileHidden && (col.mobileVisible ?? true)).sort((a, b) => (a.mobilePriority ?? 99) - (b.mobilePriority ?? 99)).slice(0, 6);
|
|
6142
|
+
}, [columns]);
|
|
6143
|
+
const headerColumn = mobileColumns[0];
|
|
6144
|
+
const bodyColumns = mobileColumns.slice(1);
|
|
6145
|
+
const hasCardContent = bodyColumns.length > 0 || mobileCardActions;
|
|
6146
|
+
return /* @__PURE__ */ jsx("div", { className: "space-y-3", children: rows.map((row) => {
|
|
6147
|
+
const record = row.original;
|
|
6148
|
+
const isSelected = row.getIsSelected();
|
|
6149
|
+
const isExpanded = row.getIsExpanded();
|
|
6150
|
+
const rowClasses = typeof rowClassName === "function" ? rowClassName(record, row.index) : rowClassName;
|
|
6151
|
+
const cardClassName = cn(
|
|
6152
|
+
CARD_BASE_CLASSES,
|
|
6153
|
+
isSelected && "ring-2 ring-primary",
|
|
6154
|
+
rowClasses
|
|
6155
|
+
);
|
|
6156
|
+
if (renderMobileCard) {
|
|
6157
|
+
return /* @__PURE__ */ jsx("div", { className: cardClassName, children: renderMobileCard(record, columns) }, row.id);
|
|
6158
|
+
}
|
|
6159
|
+
return /* @__PURE__ */ jsxs("div", { className: cardClassName, children: [
|
|
6160
|
+
/* @__PURE__ */ jsxs(
|
|
6161
|
+
"div",
|
|
6162
|
+
{
|
|
6163
|
+
className: cn(
|
|
6164
|
+
"flex items-center gap-3 p-4",
|
|
6165
|
+
hasCardContent && "border-b border-border",
|
|
6166
|
+
onRowClick && "cursor-pointer"
|
|
6167
|
+
),
|
|
6168
|
+
onClick: () => onRowClick?.(record, row.index),
|
|
6169
|
+
onKeyDown: onRowClick ? (e) => {
|
|
6170
|
+
if (e.key === "Enter" || e.key === " ") {
|
|
6171
|
+
e.preventDefault();
|
|
6172
|
+
onRowClick(record, row.index);
|
|
6173
|
+
}
|
|
6174
|
+
} : void 0,
|
|
6175
|
+
role: onRowClick ? "button" : void 0,
|
|
6176
|
+
tabIndex: onRowClick ? 0 : void 0,
|
|
6177
|
+
children: [
|
|
6178
|
+
selectable && /* @__PURE__ */ jsx(
|
|
6179
|
+
Checkbox,
|
|
6180
|
+
{
|
|
6181
|
+
checked: isSelected,
|
|
6182
|
+
onCheckedChange: (checked) => row.toggleSelected(!!checked),
|
|
6183
|
+
onClick: (e) => e.stopPropagation(),
|
|
6184
|
+
"aria-label": "Select row"
|
|
6185
|
+
}
|
|
6186
|
+
),
|
|
6187
|
+
/* @__PURE__ */ jsx("div", { className: "flex-1 font-medium text-foreground truncate", children: headerColumn && renderCellValue(
|
|
6188
|
+
headerColumn,
|
|
6189
|
+
row.getValue(headerColumn.key),
|
|
6190
|
+
record,
|
|
6191
|
+
row.index
|
|
6192
|
+
) }),
|
|
6193
|
+
expandable && /* @__PURE__ */ jsx(
|
|
6194
|
+
"button",
|
|
6195
|
+
{
|
|
6196
|
+
onClick: (e) => {
|
|
6197
|
+
e.stopPropagation();
|
|
6198
|
+
row.toggleExpanded();
|
|
6199
|
+
},
|
|
6200
|
+
className: "p-1 text-muted-foreground hover:text-foreground transition-colors",
|
|
6201
|
+
"aria-label": isExpanded ? "Collapse" : "Expand",
|
|
6202
|
+
children: /* @__PURE__ */ jsx(
|
|
6203
|
+
ChevronDownIcon,
|
|
6204
|
+
{
|
|
6205
|
+
className: cn(
|
|
6206
|
+
"h-5 w-5 transition-transform",
|
|
6207
|
+
isExpanded && "rotate-180"
|
|
6208
|
+
)
|
|
6209
|
+
}
|
|
6210
|
+
)
|
|
6211
|
+
}
|
|
6212
|
+
)
|
|
6213
|
+
]
|
|
6214
|
+
}
|
|
6215
|
+
),
|
|
6216
|
+
bodyColumns.length > 0 && /* @__PURE__ */ jsx("div", { className: "p-4 space-y-2", children: bodyColumns.map((col) => {
|
|
6217
|
+
const isFullWidth = col.mobileWidth === "full";
|
|
6218
|
+
return /* @__PURE__ */ jsxs(
|
|
6219
|
+
"div",
|
|
6220
|
+
{
|
|
6221
|
+
className: cn(
|
|
6222
|
+
"flex justify-between items-start gap-2",
|
|
6223
|
+
isFullWidth && "flex-col"
|
|
6224
|
+
),
|
|
6225
|
+
children: [
|
|
6226
|
+
/* @__PURE__ */ jsx("span", { className: "text-sm text-muted-foreground shrink-0", children: col.mobileLabel ?? col.title }),
|
|
6227
|
+
/* @__PURE__ */ jsx(
|
|
6228
|
+
"span",
|
|
6229
|
+
{
|
|
6230
|
+
className: cn(
|
|
6231
|
+
"text-sm text-foreground text-right",
|
|
6232
|
+
isFullWidth && "text-left w-full"
|
|
6233
|
+
),
|
|
6234
|
+
children: renderCellValue(
|
|
6235
|
+
col,
|
|
6236
|
+
row.getValue(col.key),
|
|
6237
|
+
record,
|
|
6238
|
+
row.index
|
|
6239
|
+
)
|
|
6240
|
+
}
|
|
6241
|
+
)
|
|
6242
|
+
]
|
|
6243
|
+
},
|
|
6244
|
+
col.key
|
|
6245
|
+
);
|
|
6246
|
+
}) }),
|
|
6247
|
+
mobileCardActions && /* @__PURE__ */ jsx("div", { className: "flex items-center gap-2 p-4 pt-0 border-t border-border mt-2", children: mobileCardActions(record) }),
|
|
6248
|
+
expandable && isExpanded && renderExpandedContent && /* @__PURE__ */ jsx("div", { className: "p-4 border-t border-border bg-muted/50", children: renderExpandedContent(record, row) })
|
|
6249
|
+
] }, row.id);
|
|
6250
|
+
}) });
|
|
6251
|
+
}
|
|
6252
|
+
TableCardView.displayName = "TableCardView";
|
|
6253
|
+
|
|
5743
6254
|
// src/components/ui/table/components/TableHeaderComponent.tsx
|
|
5744
6255
|
init_utils();
|
|
5745
|
-
var
|
|
6256
|
+
var TABLE_FILTER_OPTIONS = [
|
|
5746
6257
|
{ value: "includesString", label: "Contains" },
|
|
5747
6258
|
{ value: "notContains", label: "Does not contain" },
|
|
5748
6259
|
{ value: "equals", label: "Equals" },
|
|
@@ -5750,18 +6261,10 @@ var TableFilterOptions = [
|
|
|
5750
6261
|
{ value: "startsWith", label: "Starts with" },
|
|
5751
6262
|
{ value: "endsWith", label: "Ends with" }
|
|
5752
6263
|
];
|
|
5753
|
-
var
|
|
6264
|
+
var PIN_OPTIONS = [
|
|
5754
6265
|
{ value: "left", label: "Pin Left" },
|
|
5755
6266
|
{ value: "right", label: "Pin Right" }
|
|
5756
6267
|
];
|
|
5757
|
-
var sizingOptions = [
|
|
5758
|
-
{ value: "reset-single", label: "Reset This Column" },
|
|
5759
|
-
{ value: "reset-all", label: "Reset All Columns" }
|
|
5760
|
-
];
|
|
5761
|
-
var sortOptions = [
|
|
5762
|
-
{ value: "asc", label: "Sort Ascending" },
|
|
5763
|
-
{ value: "desc", label: "Sort Descending" }
|
|
5764
|
-
];
|
|
5765
6268
|
var TableHeaderComponent = ({
|
|
5766
6269
|
header,
|
|
5767
6270
|
enableColumnOrdering,
|
|
@@ -5770,8 +6273,8 @@ var TableHeaderComponent = ({
|
|
|
5770
6273
|
draggedColumnId,
|
|
5771
6274
|
pinnedLeftOffset,
|
|
5772
6275
|
pinnedRightOffset,
|
|
5773
|
-
|
|
5774
|
-
|
|
6276
|
+
hasInitializedSizing,
|
|
6277
|
+
startResize
|
|
5775
6278
|
}) => {
|
|
5776
6279
|
const column = header.column;
|
|
5777
6280
|
const meta = column.columnDef.meta;
|
|
@@ -5781,28 +6284,8 @@ var TableHeaderComponent = ({
|
|
|
5781
6284
|
};
|
|
5782
6285
|
const pinPosition = column.getIsPinned();
|
|
5783
6286
|
const sortDirection = column.getIsSorted();
|
|
5784
|
-
const
|
|
5785
|
-
const
|
|
5786
|
-
const sourceId = draggedColumnId.current;
|
|
5787
|
-
draggedColumnId.current = null;
|
|
5788
|
-
if (!sourceId || sourceId === targetId) return;
|
|
5789
|
-
moveColumnTo(sourceId, targetId);
|
|
5790
|
-
};
|
|
5791
|
-
const moveColumnTo = (sourceId, targetId) => {
|
|
5792
|
-
if (!enableColumnOrdering || sourceId.startsWith("_mvn_") || targetId.startsWith("_mvn_"))
|
|
5793
|
-
return;
|
|
5794
|
-
setColumnOrder((previous) => {
|
|
5795
|
-
const order = previous.length ? [...previous] : [...baseColumnOrder];
|
|
5796
|
-
const sourceIndex = order.indexOf(sourceId);
|
|
5797
|
-
const targetIndex = order.indexOf(targetId);
|
|
5798
|
-
if (sourceIndex === -1 || targetIndex === -1 || sourceIndex === targetIndex)
|
|
5799
|
-
return order;
|
|
5800
|
-
const next = [...order];
|
|
5801
|
-
next.splice(sourceIndex, 1);
|
|
5802
|
-
next.splice(targetIndex, 0, sourceId);
|
|
5803
|
-
return next;
|
|
5804
|
-
});
|
|
5805
|
-
};
|
|
6287
|
+
const isMvnColumn = column.id.startsWith("_mvn_");
|
|
6288
|
+
const isReorderTable = enableColumnOrdering && !isMvnColumn;
|
|
5806
6289
|
const [inputValue, setInputValue] = useState(value);
|
|
5807
6290
|
const debounceTimeoutRef = useRef(null);
|
|
5808
6291
|
useEffect(() => {
|
|
@@ -5841,33 +6324,96 @@ var TableHeaderComponent = ({
|
|
|
5841
6324
|
},
|
|
5842
6325
|
[debouncedFilterChange, filterType]
|
|
5843
6326
|
);
|
|
5844
|
-
const
|
|
5845
|
-
|
|
6327
|
+
const moveColumnTo = useCallback(
|
|
6328
|
+
(sourceId, targetId) => {
|
|
6329
|
+
if (!enableColumnOrdering || sourceId.startsWith("_mvn_") || targetId.startsWith("_mvn_")) {
|
|
6330
|
+
return;
|
|
6331
|
+
}
|
|
6332
|
+
setColumnOrder((previous) => {
|
|
6333
|
+
const order = previous.length ? [...previous] : [...baseColumnOrder];
|
|
6334
|
+
const sourceIndex = order.indexOf(sourceId);
|
|
6335
|
+
const targetIndex = order.indexOf(targetId);
|
|
6336
|
+
if (sourceIndex === -1 || targetIndex === -1 || sourceIndex === targetIndex) {
|
|
6337
|
+
return order;
|
|
6338
|
+
}
|
|
6339
|
+
const next = [...order];
|
|
6340
|
+
next.splice(sourceIndex, 1);
|
|
6341
|
+
next.splice(targetIndex, 0, sourceId);
|
|
6342
|
+
return next;
|
|
6343
|
+
});
|
|
6344
|
+
},
|
|
6345
|
+
[baseColumnOrder, enableColumnOrdering, setColumnOrder]
|
|
6346
|
+
);
|
|
6347
|
+
const handleColumnDrop = useCallback(
|
|
6348
|
+
(targetId) => {
|
|
6349
|
+
const sourceId = draggedColumnId.current;
|
|
6350
|
+
draggedColumnId.current = null;
|
|
6351
|
+
if (!sourceId || sourceId === targetId) return;
|
|
6352
|
+
moveColumnTo(sourceId, targetId);
|
|
6353
|
+
},
|
|
6354
|
+
[draggedColumnId, moveColumnTo]
|
|
6355
|
+
);
|
|
6356
|
+
const handleResizeStart = useCallback(
|
|
6357
|
+
(event) => {
|
|
6358
|
+
event.stopPropagation();
|
|
6359
|
+
if (startResize) {
|
|
6360
|
+
const minSize = column.columnDef.minSize ?? 36;
|
|
6361
|
+
const maxSize = column.columnDef.maxSize ?? 9999;
|
|
6362
|
+
startResize(column.id, event, header.getSize(), minSize, maxSize);
|
|
6363
|
+
} else {
|
|
6364
|
+
header.getResizeHandler()(event);
|
|
6365
|
+
}
|
|
6366
|
+
},
|
|
6367
|
+
[
|
|
6368
|
+
column.columnDef.minSize,
|
|
6369
|
+
column.columnDef.maxSize,
|
|
6370
|
+
column.id,
|
|
6371
|
+
header,
|
|
6372
|
+
startResize
|
|
6373
|
+
]
|
|
6374
|
+
);
|
|
6375
|
+
const handleFilterTypeChange = useCallback(
|
|
6376
|
+
(selected) => {
|
|
6377
|
+
if (debounceTimeoutRef.current !== null) {
|
|
6378
|
+
window.clearTimeout(debounceTimeoutRef.current);
|
|
6379
|
+
debounceTimeoutRef.current = null;
|
|
6380
|
+
}
|
|
6381
|
+
handleFilterChange(selected, inputValue);
|
|
6382
|
+
},
|
|
6383
|
+
[debounceTimeoutRef, handleFilterChange, inputValue]
|
|
6384
|
+
);
|
|
6385
|
+
const showPopover = column.getCanPin() || column.getCanFilter();
|
|
6386
|
+
const cellStyle = {};
|
|
6387
|
+
if (hasInitializedSizing) {
|
|
6388
|
+
const fallbackWidth = Math.max(header.getSize(), 36);
|
|
6389
|
+
cellStyle.width = `var(--mvn-col-${column.id}-width, ${fallbackWidth}px)`;
|
|
6390
|
+
cellStyle.overflow = "hidden";
|
|
6391
|
+
cellStyle.textOverflow = "ellipsis";
|
|
6392
|
+
cellStyle.whiteSpace = "nowrap";
|
|
6393
|
+
}
|
|
5846
6394
|
if (pinPosition === "left" && pinnedLeftOffset !== void 0) {
|
|
5847
|
-
|
|
5848
|
-
|
|
5849
|
-
|
|
6395
|
+
cellStyle.position = "sticky";
|
|
6396
|
+
cellStyle.left = `var(--mvn-col-${column.id}-left, ${pinnedLeftOffset}px)`;
|
|
6397
|
+
cellStyle.zIndex = 20;
|
|
5850
6398
|
} else if (pinPosition === "right" && pinnedRightOffset !== void 0) {
|
|
5851
|
-
|
|
5852
|
-
|
|
5853
|
-
|
|
6399
|
+
cellStyle.position = "sticky";
|
|
6400
|
+
cellStyle.right = `var(--mvn-col-${column.id}-right, ${pinnedRightOffset}px)`;
|
|
6401
|
+
cellStyle.zIndex = 20;
|
|
5854
6402
|
}
|
|
5855
6403
|
return /* @__PURE__ */ jsxs(
|
|
5856
6404
|
TableHead,
|
|
5857
6405
|
{
|
|
5858
6406
|
className: cn(
|
|
6407
|
+
"group",
|
|
5859
6408
|
meta?.headerClassName,
|
|
5860
6409
|
meta?.align === "center" && "text-center",
|
|
5861
6410
|
meta?.align === "right" && "text-right",
|
|
5862
6411
|
meta?.align === "left" && "text-left",
|
|
5863
6412
|
column.getCanSort() && "select-none",
|
|
5864
6413
|
"bg-mvn-gray-100 text-foreground sticky top-0 z-10",
|
|
5865
|
-
|
|
5866
|
-
pinPosition && "bg-background",
|
|
5867
|
-
isLastLeftPinned && "after:absolute after:right-0 after:top-0 after:bottom-0 after:w-[4px] after:bg-gradient-to-r after:from-black/10 after:to-transparent",
|
|
5868
|
-
isFirstRightPinned && "before:absolute before:left-0 before:top-0 before:bottom-0 before:w-[4px] before:bg-gradient-to-l before:from-black/10 before:to-transparent"
|
|
6414
|
+
pinPosition && "bg-background"
|
|
5869
6415
|
),
|
|
5870
|
-
style:
|
|
6416
|
+
style: cellStyle,
|
|
5871
6417
|
children: [
|
|
5872
6418
|
/* @__PURE__ */ jsxs(
|
|
5873
6419
|
"div",
|
|
@@ -5876,8 +6422,7 @@ var TableHeaderComponent = ({
|
|
|
5876
6422
|
"flex items-center w-full",
|
|
5877
6423
|
meta?.align === "center" && "justify-center",
|
|
5878
6424
|
meta?.align === "right" && "justify-end",
|
|
5879
|
-
meta?.align === "left" && "justify-start"
|
|
5880
|
-
column.getCanSort() && "cursor-pointer"
|
|
6425
|
+
meta?.align === "left" && "justify-start"
|
|
5881
6426
|
),
|
|
5882
6427
|
draggable: isReorderTable,
|
|
5883
6428
|
onDragStart: (event) => {
|
|
@@ -5901,38 +6446,41 @@ var TableHeaderComponent = ({
|
|
|
5901
6446
|
handleColumnDrop(column.id);
|
|
5902
6447
|
},
|
|
5903
6448
|
children: [
|
|
5904
|
-
/* @__PURE__ */
|
|
5905
|
-
|
|
6449
|
+
/* @__PURE__ */ jsxs(
|
|
6450
|
+
"div",
|
|
6451
|
+
{
|
|
6452
|
+
className: cn(
|
|
6453
|
+
"flex gap-2 text-[16px] font-medium items-center",
|
|
6454
|
+
column.getCanSort() && "cursor-pointer"
|
|
6455
|
+
),
|
|
6456
|
+
onClick: () => {
|
|
6457
|
+
if (draggedColumnId.current) return;
|
|
6458
|
+
if (column.getCanSort()) {
|
|
6459
|
+
column.toggleSorting();
|
|
6460
|
+
}
|
|
6461
|
+
},
|
|
6462
|
+
children: [
|
|
6463
|
+
flexRender(column.columnDef.header, header.getContext()),
|
|
6464
|
+
sortDirection === "asc" && /* @__PURE__ */ jsx(ArrowUp, { className: "h-4 w-4 text-primary flex-shrink-0" }),
|
|
6465
|
+
sortDirection === "desc" && /* @__PURE__ */ jsx(ArrowDown, { className: "h-4 w-4 text-primary flex-shrink-0" })
|
|
6466
|
+
]
|
|
6467
|
+
}
|
|
6468
|
+
),
|
|
6469
|
+
!isMvnColumn && showPopover && /* @__PURE__ */ jsx(
|
|
5906
6470
|
"span",
|
|
5907
6471
|
{
|
|
5908
6472
|
onClick: (event) => event.stopPropagation(),
|
|
5909
6473
|
className: "ml-auto",
|
|
5910
6474
|
children: /* @__PURE__ */ jsxs(Popover, { children: [
|
|
5911
|
-
/* @__PURE__ */ jsx(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsx(
|
|
5912
|
-
/* @__PURE__ */ jsx(PopoverContent, { side: "bottom", children: /* @__PURE__ */ jsxs(Tabs, { defaultValue: "
|
|
6475
|
+
/* @__PURE__ */ jsx(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsx(MoreHorizontal, { className: "p-1 h-4 w-4 rounded-sm cursor-pointer hover:bg-muted transition-colors" }) }),
|
|
6476
|
+
/* @__PURE__ */ jsx(PopoverContent, { side: "bottom", className: "pt-2", children: /* @__PURE__ */ jsxs(Tabs, { defaultValue: column.getCanPin() ? "pin" : "filter", children: [
|
|
5913
6477
|
/* @__PURE__ */ jsxs(TabsList, { children: [
|
|
5914
|
-
column.getCanResize() && /* @__PURE__ */ jsx(
|
|
5915
|
-
TabsTrigger,
|
|
5916
|
-
{
|
|
5917
|
-
value: "size",
|
|
5918
|
-
className: "data-[orientation=horizontal]:p-2",
|
|
5919
|
-
children: /* @__PURE__ */ jsx(Scaling, { className: "p-1 h-6 w-6" })
|
|
5920
|
-
}
|
|
5921
|
-
),
|
|
5922
|
-
column.getCanSort() && /* @__PURE__ */ jsx(
|
|
5923
|
-
TabsTrigger,
|
|
5924
|
-
{
|
|
5925
|
-
value: "sort",
|
|
5926
|
-
className: "data-[orientation=horizontal]:p-2",
|
|
5927
|
-
children: /* @__PURE__ */ jsx(Scaling, { className: "p-1 h-6 w-6" })
|
|
5928
|
-
}
|
|
5929
|
-
),
|
|
5930
6478
|
column.getCanPin() && /* @__PURE__ */ jsx(
|
|
5931
6479
|
TabsTrigger,
|
|
5932
6480
|
{
|
|
5933
6481
|
value: "pin",
|
|
5934
6482
|
className: "data-[orientation=horizontal]:p-2",
|
|
5935
|
-
children: /* @__PURE__ */ jsx(Pin, { className: "
|
|
6483
|
+
children: /* @__PURE__ */ jsx(Pin, { className: "h-4 w-4" })
|
|
5936
6484
|
}
|
|
5937
6485
|
),
|
|
5938
6486
|
column.getCanFilter() && /* @__PURE__ */ jsx(
|
|
@@ -5940,63 +6488,18 @@ var TableHeaderComponent = ({
|
|
|
5940
6488
|
{
|
|
5941
6489
|
value: "filter",
|
|
5942
6490
|
className: "data-[orientation=horizontal]:p-2",
|
|
5943
|
-
children: /* @__PURE__ */ jsx(ListFilter, { className: "
|
|
6491
|
+
children: /* @__PURE__ */ jsx(ListFilter, { className: "h-4 w-4" })
|
|
5944
6492
|
}
|
|
5945
6493
|
)
|
|
5946
6494
|
] }),
|
|
5947
|
-
column.
|
|
6495
|
+
column.getCanPin() && /* @__PURE__ */ jsx(TabsContent, { value: "pin", className: "mt-4", children: /* @__PURE__ */ jsx(Command, { className: "h-auto", children: /* @__PURE__ */ jsx(CommandList, { children: /* @__PURE__ */ jsx(CommandGroup, { children: PIN_OPTIONS.map((option) => /* @__PURE__ */ jsxs(
|
|
5948
6496
|
CommandItem,
|
|
5949
6497
|
{
|
|
5950
6498
|
value: option.value,
|
|
5951
6499
|
onSelect: () => {
|
|
5952
|
-
|
|
5953
|
-
|
|
5954
|
-
|
|
5955
|
-
header.getContext().table.resetColumnSizing();
|
|
5956
|
-
}
|
|
5957
|
-
},
|
|
5958
|
-
children: option.label
|
|
5959
|
-
},
|
|
5960
|
-
option.value
|
|
5961
|
-
)) }) }) }) }),
|
|
5962
|
-
column.getCanSort() && /* @__PURE__ */ jsx(TabsContent, { value: "sort", className: "mt-2", children: /* @__PURE__ */ jsx(Command, { className: "h-auto", children: /* @__PURE__ */ jsx(CommandList, { children: /* @__PURE__ */ jsx(CommandGroup, { children: sortOptions.map((option) => /* @__PURE__ */ jsxs(
|
|
5963
|
-
CommandItem,
|
|
5964
|
-
{
|
|
5965
|
-
value: option.value,
|
|
5966
|
-
onSelect: () => {
|
|
5967
|
-
if (option.value === sortDirection) {
|
|
5968
|
-
column.clearSorting();
|
|
5969
|
-
return;
|
|
5970
|
-
}
|
|
5971
|
-
column.toggleSorting(option.value === "desc");
|
|
5972
|
-
},
|
|
5973
|
-
children: [
|
|
5974
|
-
option.label,
|
|
5975
|
-
/* @__PURE__ */ jsx(
|
|
5976
|
-
CheckIcon,
|
|
5977
|
-
{
|
|
5978
|
-
className: cn(
|
|
5979
|
-
"ml-auto h-4 w-4",
|
|
5980
|
-
sortDirection === option.value ? "opacity-100" : "opacity-0"
|
|
5981
|
-
)
|
|
5982
|
-
}
|
|
5983
|
-
)
|
|
5984
|
-
]
|
|
5985
|
-
},
|
|
5986
|
-
option.value
|
|
5987
|
-
)) }) }) }) }),
|
|
5988
|
-
column.getCanPin() && /* @__PURE__ */ jsx(TabsContent, { value: "pin", className: "mt-2", children: /* @__PURE__ */ jsx(Command, { className: "h-auto", children: /* @__PURE__ */ jsx(CommandList, { children: /* @__PURE__ */ jsx(CommandGroup, { children: pinOptions.map((option) => /* @__PURE__ */ jsxs(
|
|
5989
|
-
CommandItem,
|
|
5990
|
-
{
|
|
5991
|
-
value: option.value,
|
|
5992
|
-
onSelect: () => {
|
|
5993
|
-
if (option.value === pinPosition) {
|
|
5994
|
-
column.pin(false);
|
|
5995
|
-
return;
|
|
5996
|
-
}
|
|
5997
|
-
if (option.value === "left" || option.value === "right") {
|
|
5998
|
-
column.pin(option.value);
|
|
5999
|
-
}
|
|
6500
|
+
column.pin(
|
|
6501
|
+
option.value === pinPosition ? false : option.value
|
|
6502
|
+
);
|
|
6000
6503
|
},
|
|
6001
6504
|
children: [
|
|
6002
6505
|
option.label,
|
|
@@ -6018,16 +6521,10 @@ var TableHeaderComponent = ({
|
|
|
6018
6521
|
Select,
|
|
6019
6522
|
{
|
|
6020
6523
|
value: filterType,
|
|
6021
|
-
onValueChange:
|
|
6022
|
-
if (debounceTimeoutRef.current !== null) {
|
|
6023
|
-
window.clearTimeout(debounceTimeoutRef.current);
|
|
6024
|
-
debounceTimeoutRef.current = null;
|
|
6025
|
-
}
|
|
6026
|
-
handleFilterChange(selected, inputValue);
|
|
6027
|
-
},
|
|
6524
|
+
onValueChange: handleFilterTypeChange,
|
|
6028
6525
|
children: [
|
|
6029
6526
|
/* @__PURE__ */ jsx(SelectTrigger, { className: "mb-4", children: /* @__PURE__ */ jsx(SelectValue, {}) }),
|
|
6030
|
-
/* @__PURE__ */ jsx(SelectContent, { children:
|
|
6527
|
+
/* @__PURE__ */ jsx(SelectContent, { children: TABLE_FILTER_OPTIONS.map((option) => /* @__PURE__ */ jsx(SelectItem, { value: option.value, children: option.label }, option.value)) })
|
|
6031
6528
|
]
|
|
6032
6529
|
}
|
|
6033
6530
|
),
|
|
@@ -6053,17 +6550,16 @@ var TableHeaderComponent = ({
|
|
|
6053
6550
|
column.getCanResize() && /* @__PURE__ */ jsx(
|
|
6054
6551
|
"div",
|
|
6055
6552
|
{
|
|
6056
|
-
onMouseDown:
|
|
6057
|
-
onTouchStart:
|
|
6553
|
+
onMouseDown: handleResizeStart,
|
|
6554
|
+
onTouchStart: handleResizeStart,
|
|
6058
6555
|
onDoubleClick: () => header.column.resetSize(),
|
|
6059
6556
|
className: cn(
|
|
6060
|
-
"absolute right-0 top-0 h-full w-
|
|
6061
|
-
"
|
|
6062
|
-
|
|
6557
|
+
"absolute right-0 top-0 h-full w-4 cursor-w-resize select-none touch-none",
|
|
6558
|
+
"flex items-center justify-center",
|
|
6559
|
+
"opacity-0 group-hover:opacity-100 transition-opacity duration-150",
|
|
6560
|
+
header.column.getIsResizing() && "opacity-100 bg-primary/10"
|
|
6063
6561
|
),
|
|
6064
|
-
style: {
|
|
6065
|
-
transform: "translateX(50%)"
|
|
6066
|
-
}
|
|
6562
|
+
style: { transform: "translateX(50%)" }
|
|
6067
6563
|
}
|
|
6068
6564
|
)
|
|
6069
6565
|
]
|
|
@@ -6260,6 +6756,22 @@ function useTableCore({
|
|
|
6260
6756
|
left: defaultColumnPinning?.left ?? [],
|
|
6261
6757
|
right: defaultColumnPinning?.right ?? []
|
|
6262
6758
|
});
|
|
6759
|
+
const [columnSizing, setColumnSizing] = useState(() => {
|
|
6760
|
+
if (!enableColumnResizing) return {};
|
|
6761
|
+
const initial = {};
|
|
6762
|
+
columns.forEach((col) => {
|
|
6763
|
+
if (col.size !== void 0) {
|
|
6764
|
+
const key = typeof col.key === "string" ? col.key : String(col.key);
|
|
6765
|
+
initial[key] = col.size;
|
|
6766
|
+
}
|
|
6767
|
+
});
|
|
6768
|
+
return initial;
|
|
6769
|
+
});
|
|
6770
|
+
const [columnSizingInfo, setColumnSizingInfo] = useState({});
|
|
6771
|
+
const [hasInitializedSizing, setHasInitializedSizing] = useState(() => {
|
|
6772
|
+
if (!enableColumnResizing) return false;
|
|
6773
|
+
return columns.some((col) => col.size !== void 0);
|
|
6774
|
+
});
|
|
6263
6775
|
const dataLength = data.length;
|
|
6264
6776
|
const enableColumnFilters = useMemo(() => {
|
|
6265
6777
|
return columns.some((column) => column.filterable === true);
|
|
@@ -6384,6 +6896,9 @@ function useTableCore({
|
|
|
6384
6896
|
enableColumnFilter: column.filterable === true,
|
|
6385
6897
|
enablePinning: column.pinnable === true,
|
|
6386
6898
|
enableResizing: column.resizable === true,
|
|
6899
|
+
size: column.size,
|
|
6900
|
+
minSize: column.minSize,
|
|
6901
|
+
maxSize: column.maxSize,
|
|
6387
6902
|
meta: {
|
|
6388
6903
|
align: column.align,
|
|
6389
6904
|
className: column.className,
|
|
@@ -6513,6 +7028,149 @@ function useTableCore({
|
|
|
6513
7028
|
}
|
|
6514
7029
|
return paginationState;
|
|
6515
7030
|
}, [pagination, dataLength, paginationState]);
|
|
7031
|
+
const tableRef = useRef(null);
|
|
7032
|
+
const tableContainerRef = useRef(null);
|
|
7033
|
+
const resizeStateRef = useRef({
|
|
7034
|
+
isResizing: false,
|
|
7035
|
+
columnId: null,
|
|
7036
|
+
startX: 0,
|
|
7037
|
+
startWidth: 0,
|
|
7038
|
+
minSize: 36,
|
|
7039
|
+
maxSize: 9999
|
|
7040
|
+
});
|
|
7041
|
+
const pinnedColumnsRef = useRef({ left: [], right: [] });
|
|
7042
|
+
const updatePinnedOffsets = useCallback(() => {
|
|
7043
|
+
const container = tableContainerRef.current;
|
|
7044
|
+
if (!container) return;
|
|
7045
|
+
const { left, right } = pinnedColumnsRef.current;
|
|
7046
|
+
const computedStyle = getComputedStyle(container);
|
|
7047
|
+
let leftAcc = 0;
|
|
7048
|
+
for (const col of left) {
|
|
7049
|
+
container.style.setProperty(`--mvn-col-${col.id}-left`, `${leftAcc}px`);
|
|
7050
|
+
const widthVar = computedStyle.getPropertyValue(
|
|
7051
|
+
`--mvn-col-${col.id}-width`
|
|
7052
|
+
);
|
|
7053
|
+
const width = widthVar ? parseFloat(widthVar) : 0;
|
|
7054
|
+
leftAcc += width;
|
|
7055
|
+
}
|
|
7056
|
+
let rightAcc = 0;
|
|
7057
|
+
for (let i = right.length - 1; i >= 0; i--) {
|
|
7058
|
+
const col = right[i];
|
|
7059
|
+
container.style.setProperty(`--mvn-col-${col.id}-right`, `${rightAcc}px`);
|
|
7060
|
+
const widthVar = computedStyle.getPropertyValue(
|
|
7061
|
+
`--mvn-col-${col.id}-width`
|
|
7062
|
+
);
|
|
7063
|
+
const width = widthVar ? parseFloat(widthVar) : 0;
|
|
7064
|
+
rightAcc += width;
|
|
7065
|
+
}
|
|
7066
|
+
}, []);
|
|
7067
|
+
const handleResizeMove = useCallback(
|
|
7068
|
+
(event) => {
|
|
7069
|
+
const state = resizeStateRef.current;
|
|
7070
|
+
if (!state.isResizing || !state.columnId || !tableContainerRef.current)
|
|
7071
|
+
return;
|
|
7072
|
+
const clientX = "touches" in event ? event.touches[0].clientX : event.clientX;
|
|
7073
|
+
const delta = clientX - state.startX;
|
|
7074
|
+
const newWidth = Math.max(
|
|
7075
|
+
state.minSize,
|
|
7076
|
+
Math.min(state.maxSize, state.startWidth + delta)
|
|
7077
|
+
);
|
|
7078
|
+
tableContainerRef.current.style.setProperty(
|
|
7079
|
+
`--mvn-col-${state.columnId}-width`,
|
|
7080
|
+
`${newWidth}px`
|
|
7081
|
+
);
|
|
7082
|
+
const { left, right } = pinnedColumnsRef.current;
|
|
7083
|
+
const isPinned = left.some((c) => c.id === state.columnId) || right.some((c) => c.id === state.columnId);
|
|
7084
|
+
if (isPinned) {
|
|
7085
|
+
updatePinnedOffsets();
|
|
7086
|
+
}
|
|
7087
|
+
},
|
|
7088
|
+
[updatePinnedOffsets]
|
|
7089
|
+
);
|
|
7090
|
+
const handleResizeEnd = useCallback(() => {
|
|
7091
|
+
const state = resizeStateRef.current;
|
|
7092
|
+
if (!state.isResizing || !tableContainerRef.current) return;
|
|
7093
|
+
const container = tableContainerRef.current;
|
|
7094
|
+
const computedStyle = getComputedStyle(container);
|
|
7095
|
+
const newSizing = {};
|
|
7096
|
+
const headers = tableRef.current?.getHeaderGroups()[0]?.headers ?? [];
|
|
7097
|
+
for (const header of headers) {
|
|
7098
|
+
if (header.column.getCanResize()) {
|
|
7099
|
+
const varName = `--mvn-col-${header.column.id}-width`;
|
|
7100
|
+
const value = computedStyle.getPropertyValue(varName);
|
|
7101
|
+
if (value) {
|
|
7102
|
+
newSizing[header.column.id] = parseFloat(value);
|
|
7103
|
+
}
|
|
7104
|
+
}
|
|
7105
|
+
}
|
|
7106
|
+
if (Object.keys(newSizing).length > 0) {
|
|
7107
|
+
setColumnSizing(newSizing);
|
|
7108
|
+
if (!hasInitializedSizing) {
|
|
7109
|
+
setHasInitializedSizing(true);
|
|
7110
|
+
}
|
|
7111
|
+
}
|
|
7112
|
+
resizeStateRef.current = {
|
|
7113
|
+
isResizing: false,
|
|
7114
|
+
columnId: null,
|
|
7115
|
+
startX: 0,
|
|
7116
|
+
startWidth: 0,
|
|
7117
|
+
minSize: 36,
|
|
7118
|
+
maxSize: 9999
|
|
7119
|
+
};
|
|
7120
|
+
document.removeEventListener("mousemove", handleResizeMove);
|
|
7121
|
+
document.removeEventListener("mouseup", handleResizeEnd);
|
|
7122
|
+
document.removeEventListener("touchmove", handleResizeMove);
|
|
7123
|
+
document.removeEventListener("touchend", handleResizeEnd);
|
|
7124
|
+
}, [hasInitializedSizing, handleResizeMove]);
|
|
7125
|
+
const startResize = useCallback(
|
|
7126
|
+
(columnId, event, initialWidth, minSize = 36, maxSize = 9999) => {
|
|
7127
|
+
const clientX = "touches" in event ? event.touches[0].clientX : event.clientX;
|
|
7128
|
+
resizeStateRef.current = {
|
|
7129
|
+
isResizing: true,
|
|
7130
|
+
columnId,
|
|
7131
|
+
startX: clientX,
|
|
7132
|
+
startWidth: initialWidth,
|
|
7133
|
+
minSize,
|
|
7134
|
+
maxSize
|
|
7135
|
+
};
|
|
7136
|
+
document.addEventListener("mousemove", handleResizeMove);
|
|
7137
|
+
document.addEventListener("mouseup", handleResizeEnd);
|
|
7138
|
+
document.addEventListener("touchmove", handleResizeMove);
|
|
7139
|
+
document.addEventListener("touchend", handleResizeEnd);
|
|
7140
|
+
},
|
|
7141
|
+
[handleResizeMove, handleResizeEnd]
|
|
7142
|
+
);
|
|
7143
|
+
useEffect(() => {
|
|
7144
|
+
return () => {
|
|
7145
|
+
document.removeEventListener("mousemove", handleResizeMove);
|
|
7146
|
+
document.removeEventListener("mouseup", handleResizeEnd);
|
|
7147
|
+
document.removeEventListener("touchmove", handleResizeMove);
|
|
7148
|
+
document.removeEventListener("touchend", handleResizeEnd);
|
|
7149
|
+
};
|
|
7150
|
+
}, [handleResizeMove, handleResizeEnd]);
|
|
7151
|
+
const handleColumnSizingInfoChange = useCallback(
|
|
7152
|
+
(updater) => {
|
|
7153
|
+
setColumnSizingInfo((prev) => {
|
|
7154
|
+
const next = typeof updater === "function" ? updater(prev) : updater;
|
|
7155
|
+
const shouldInitializeSizing = next.isResizingColumn && !hasInitializedSizing && tableRef.current;
|
|
7156
|
+
if (shouldInitializeSizing) {
|
|
7157
|
+
const headers = tableRef.current.getHeaderGroups()[0]?.headers ?? [];
|
|
7158
|
+
const allWidths = {};
|
|
7159
|
+
for (const header of headers) {
|
|
7160
|
+
if (header.column.getCanResize()) {
|
|
7161
|
+
allWidths[header.column.id] = header.getSize();
|
|
7162
|
+
}
|
|
7163
|
+
}
|
|
7164
|
+
if (Object.keys(allWidths).length > 0) {
|
|
7165
|
+
setColumnSizing(allWidths);
|
|
7166
|
+
setHasInitializedSizing(true);
|
|
7167
|
+
}
|
|
7168
|
+
}
|
|
7169
|
+
return next;
|
|
7170
|
+
});
|
|
7171
|
+
},
|
|
7172
|
+
[hasInitializedSizing]
|
|
7173
|
+
);
|
|
6516
7174
|
const table = useReactTable({
|
|
6517
7175
|
data,
|
|
6518
7176
|
columns: columnDefs,
|
|
@@ -6528,7 +7186,9 @@ function useTableCore({
|
|
|
6528
7186
|
...enableColumnOrdering ? { columnOrder } : {},
|
|
6529
7187
|
...enableGlobalFilter ? { globalFilter } : {},
|
|
6530
7188
|
pagination: tablePaginationState,
|
|
6531
|
-
columnPinning
|
|
7189
|
+
columnPinning,
|
|
7190
|
+
columnSizing,
|
|
7191
|
+
columnSizingInfo
|
|
6532
7192
|
},
|
|
6533
7193
|
onSortingChange: enableColumnSorter ? handleSortingChange : void 0,
|
|
6534
7194
|
onColumnFiltersChange: enableColumnFilters ? handleFilteringChange : void 0,
|
|
@@ -6538,6 +7198,8 @@ function useTableCore({
|
|
|
6538
7198
|
onGlobalFilterChange: enableGlobalFilter ? setGlobalFilter : void 0,
|
|
6539
7199
|
onPaginationChange: pagination ? handlePaginationChange : void 0,
|
|
6540
7200
|
onColumnPinningChange: enableColumnPin ? setColumnPinning : void 0,
|
|
7201
|
+
onColumnSizingChange: enableColumnResizing ? setColumnSizing : void 0,
|
|
7202
|
+
onColumnSizingInfoChange: enableColumnResizing ? handleColumnSizingInfoChange : void 0,
|
|
6541
7203
|
getCoreRowModel: getCoreRowModel(),
|
|
6542
7204
|
getSortedRowModel: getSortedRowModel(),
|
|
6543
7205
|
getFilteredRowModel: getFilteredRowModel(),
|
|
@@ -6549,6 +7211,18 @@ function useTableCore({
|
|
|
6549
7211
|
getRowId: (originalRow, index) => resolveRowId(originalRow, index),
|
|
6550
7212
|
getRowCanExpand: expandable ? (row) => getRowCanExpand ? getRowCanExpand(row.original) : !!renderExpandedContent : void 0
|
|
6551
7213
|
});
|
|
7214
|
+
tableRef.current = table;
|
|
7215
|
+
useEffect(() => {
|
|
7216
|
+
const headers = table.getHeaderGroups()[0]?.headers ?? [];
|
|
7217
|
+
const leftPinned = [];
|
|
7218
|
+
const rightPinned = [];
|
|
7219
|
+
headers.forEach((h) => {
|
|
7220
|
+
const pin = h.column.getIsPinned();
|
|
7221
|
+
if (pin === "left") leftPinned.push({ id: h.column.id });
|
|
7222
|
+
if (pin === "right") rightPinned.push({ id: h.column.id });
|
|
7223
|
+
});
|
|
7224
|
+
pinnedColumnsRef.current = { left: leftPinned, right: rightPinned };
|
|
7225
|
+
}, [table, columnPinning]);
|
|
6552
7226
|
const pageCount = useMemo(
|
|
6553
7227
|
() => table.getPageCount(),
|
|
6554
7228
|
[table, sorting, columnFilters]
|
|
@@ -6607,7 +7281,11 @@ function useTableCore({
|
|
|
6607
7281
|
pageNumbers,
|
|
6608
7282
|
paginationState,
|
|
6609
7283
|
sorting,
|
|
6610
|
-
columnFilters
|
|
7284
|
+
columnFilters,
|
|
7285
|
+
hasInitializedSizing,
|
|
7286
|
+
tableContainerRef,
|
|
7287
|
+
startResize,
|
|
7288
|
+
updatePinnedOffsets
|
|
6611
7289
|
};
|
|
6612
7290
|
}
|
|
6613
7291
|
function useTableVirtualization({
|
|
@@ -7114,7 +7792,13 @@ function SimpleTable({
|
|
|
7114
7792
|
loadingText,
|
|
7115
7793
|
pagingPosition = "right",
|
|
7116
7794
|
recordPerChunk = 100,
|
|
7117
|
-
defaultColumnPinning
|
|
7795
|
+
defaultColumnPinning,
|
|
7796
|
+
enableColumnResizing = false,
|
|
7797
|
+
columnResizeMode = "onChange",
|
|
7798
|
+
// Mobile props
|
|
7799
|
+
mobileLayout = "auto",
|
|
7800
|
+
mobileCardActions,
|
|
7801
|
+
renderMobileCard
|
|
7118
7802
|
}) {
|
|
7119
7803
|
const [internalLazyLoading, setInternalLazyLoading] = useState(false);
|
|
7120
7804
|
const pendingLazyLoad = useRef(false);
|
|
@@ -7133,7 +7817,11 @@ function SimpleTable({
|
|
|
7133
7817
|
pageNumbers,
|
|
7134
7818
|
paginationState,
|
|
7135
7819
|
sorting,
|
|
7136
|
-
columnFilters
|
|
7820
|
+
columnFilters,
|
|
7821
|
+
hasInitializedSizing,
|
|
7822
|
+
tableContainerRef,
|
|
7823
|
+
startResize,
|
|
7824
|
+
updatePinnedOffsets
|
|
7137
7825
|
} = useTableCore({
|
|
7138
7826
|
data,
|
|
7139
7827
|
columns,
|
|
@@ -7158,7 +7846,9 @@ function SimpleTable({
|
|
|
7158
7846
|
manualSorting,
|
|
7159
7847
|
manualFiltering,
|
|
7160
7848
|
onFilterChange,
|
|
7161
|
-
defaultColumnPinning
|
|
7849
|
+
defaultColumnPinning,
|
|
7850
|
+
enableColumnResizing,
|
|
7851
|
+
columnResizeMode
|
|
7162
7852
|
});
|
|
7163
7853
|
const handleLazyLoad = useCallback(async () => {
|
|
7164
7854
|
if (!onLazyScrollLoad || pendingLazyLoad.current || resolvedLoading) return;
|
|
@@ -7172,6 +7862,8 @@ function SimpleTable({
|
|
|
7172
7862
|
}
|
|
7173
7863
|
}, [onLazyScrollLoad, resolvedLoading]);
|
|
7174
7864
|
const virtualizationActive = data.length * (expandable ? 2 : 1) > virtualizationThreshold;
|
|
7865
|
+
const isMobile = useIsMobile();
|
|
7866
|
+
const shouldUseCardView = mobileLayout === "card" || mobileLayout === "auto" && isMobile;
|
|
7175
7867
|
const [chunkCount, setChunkCount] = useState(recordPerChunk);
|
|
7176
7868
|
const onLoadChunk = useCallback(() => {
|
|
7177
7869
|
if (resolvedLoading || pendingLazyLoad.current) return;
|
|
@@ -7188,7 +7880,7 @@ function SimpleTable({
|
|
|
7188
7880
|
}, [onLoadChunk]);
|
|
7189
7881
|
const rows = useMemo(
|
|
7190
7882
|
() => table.getRowModel().rows,
|
|
7191
|
-
[paginationState, sorting, columnFilters, globalFilter]
|
|
7883
|
+
[paginationState, sorting, columnFilters, globalFilter, data]
|
|
7192
7884
|
);
|
|
7193
7885
|
const splittedRows = useMemo(
|
|
7194
7886
|
() => rows.slice(0, chunkCount),
|
|
@@ -7200,7 +7892,6 @@ function SimpleTable({
|
|
|
7200
7892
|
);
|
|
7201
7893
|
const tablePagination = table.getState().pagination;
|
|
7202
7894
|
const draggedColumnId = useRef(null);
|
|
7203
|
-
const tableContainerRef = useRef(null);
|
|
7204
7895
|
const {
|
|
7205
7896
|
virtualRowPointers,
|
|
7206
7897
|
virtualItems,
|
|
@@ -7220,7 +7911,7 @@ function SimpleTable({
|
|
|
7220
7911
|
const rafRef = useRef(null);
|
|
7221
7912
|
useEffect(() => {
|
|
7222
7913
|
const container = tableContainerRef.current;
|
|
7223
|
-
if (!container || virtualizationActive) return;
|
|
7914
|
+
if (!container || virtualizationActive && !shouldUseCardView) return;
|
|
7224
7915
|
const scheduleCheck = () => {
|
|
7225
7916
|
if (rafRef.current != null) return;
|
|
7226
7917
|
rafRef.current = requestAnimationFrame(() => {
|
|
@@ -7248,7 +7939,8 @@ function SimpleTable({
|
|
|
7248
7939
|
}
|
|
7249
7940
|
}, [virtualizationActive]);
|
|
7250
7941
|
useEffect(() => {
|
|
7251
|
-
if (!virtualItems.length || !virtualizationActive)
|
|
7942
|
+
if (!virtualItems.length || !virtualizationActive || shouldUseCardView)
|
|
7943
|
+
return;
|
|
7252
7944
|
if (paddingBottom <= scrollLoadThreshold) {
|
|
7253
7945
|
onLoadChunkRef.current();
|
|
7254
7946
|
}
|
|
@@ -7259,13 +7951,11 @@ function SimpleTable({
|
|
|
7259
7951
|
if (groups.length === 0) return [];
|
|
7260
7952
|
return groups[0].headers;
|
|
7261
7953
|
}, [table]);
|
|
7262
|
-
const { leftOffsets, rightOffsets
|
|
7954
|
+
const { leftOffsets, rightOffsets } = useMemo(() => {
|
|
7263
7955
|
if (!allHeaders || allHeaders.length === 0) {
|
|
7264
7956
|
return {
|
|
7265
7957
|
leftOffsets: /* @__PURE__ */ new Map(),
|
|
7266
|
-
rightOffsets: /* @__PURE__ */ new Map()
|
|
7267
|
-
lastLeftId: null,
|
|
7268
|
-
firstRightId: null
|
|
7958
|
+
rightOffsets: /* @__PURE__ */ new Map()
|
|
7269
7959
|
};
|
|
7270
7960
|
}
|
|
7271
7961
|
const leftPinned = allHeaders.filter(
|
|
@@ -7289,11 +7979,24 @@ function SimpleTable({
|
|
|
7289
7979
|
}
|
|
7290
7980
|
return {
|
|
7291
7981
|
leftOffsets: leftMap,
|
|
7292
|
-
rightOffsets: rightMap
|
|
7293
|
-
lastLeftId: leftPinned.length > 0 ? leftPinned[leftPinned.length - 1].column.id : null,
|
|
7294
|
-
firstRightId: rightPinned.length > 0 ? rightPinned[0].column.id : null
|
|
7982
|
+
rightOffsets: rightMap
|
|
7295
7983
|
};
|
|
7296
7984
|
}, [allHeaders]);
|
|
7985
|
+
useEffect(() => {
|
|
7986
|
+
if (!hasInitializedSizing || !tableContainerRef.current) return;
|
|
7987
|
+
const container = tableContainerRef.current;
|
|
7988
|
+
const headers = table.getHeaderGroups()[0]?.headers ?? [];
|
|
7989
|
+
for (const header of headers) {
|
|
7990
|
+
if (header.column.getCanResize()) {
|
|
7991
|
+
const width = header.getSize();
|
|
7992
|
+
container.style.setProperty(
|
|
7993
|
+
`--mvn-col-${header.column.id}-width`,
|
|
7994
|
+
`${width}px`
|
|
7995
|
+
);
|
|
7996
|
+
}
|
|
7997
|
+
}
|
|
7998
|
+
updatePinnedOffsets();
|
|
7999
|
+
}, [hasInitializedSizing, table, updatePinnedOffsets]);
|
|
7297
8000
|
useEffect(() => {
|
|
7298
8001
|
if (!selectable || !onSelectionChange) return;
|
|
7299
8002
|
onSelectionChange(selectedRows);
|
|
@@ -7344,13 +8047,31 @@ function SimpleTable({
|
|
|
7344
8047
|
},
|
|
7345
8048
|
children: [
|
|
7346
8049
|
showOverlayLoading && (loadingComponent ?? /* @__PURE__ */ jsx(DefaultLoadingComponent, { loadingText })),
|
|
7347
|
-
/* @__PURE__ */
|
|
8050
|
+
shouldUseCardView ? /* @__PURE__ */ jsx(
|
|
8051
|
+
TableCardView,
|
|
8052
|
+
{
|
|
8053
|
+
rows: splittedRows,
|
|
8054
|
+
columns,
|
|
8055
|
+
selectable,
|
|
8056
|
+
expandable,
|
|
8057
|
+
onRowClick,
|
|
8058
|
+
rowClassName,
|
|
8059
|
+
renderExpandedContent,
|
|
8060
|
+
mobileCardActions,
|
|
8061
|
+
emptyMessage,
|
|
8062
|
+
renderMobileCard
|
|
8063
|
+
}
|
|
8064
|
+
) : /* @__PURE__ */ jsxs(
|
|
7348
8065
|
Table,
|
|
7349
8066
|
{
|
|
7350
8067
|
variant,
|
|
7351
8068
|
size,
|
|
7352
8069
|
wrapperClassName: "overflow-visible",
|
|
7353
8070
|
className: showOverlayLoading ? "pointer-events-none opacity-50" : void 0,
|
|
8071
|
+
style: enableColumnResizing ? {
|
|
8072
|
+
width: hasInitializedSizing ? table.getTotalSize() : void 0,
|
|
8073
|
+
tableLayout: hasInitializedSizing ? "fixed" : "auto"
|
|
8074
|
+
} : void 0,
|
|
7354
8075
|
children: [
|
|
7355
8076
|
caption && /* @__PURE__ */ jsx(TableCaption, { children: caption }),
|
|
7356
8077
|
/* @__PURE__ */ jsx(TableHeader, { children: table.getHeaderGroups().map((headerGroup) => /* @__PURE__ */ jsx(TableRow, { children: headerGroup.headers.map((header) => {
|
|
@@ -7366,8 +8087,8 @@ function SimpleTable({
|
|
|
7366
8087
|
setColumnOrder,
|
|
7367
8088
|
pinnedLeftOffset: pinPosition === "left" ? leftOffsets.get(header.column.id) : void 0,
|
|
7368
8089
|
pinnedRightOffset: pinPosition === "right" ? rightOffsets.get(header.column.id) : void 0,
|
|
7369
|
-
|
|
7370
|
-
|
|
8090
|
+
hasInitializedSizing,
|
|
8091
|
+
startResize
|
|
7371
8092
|
},
|
|
7372
8093
|
header.id
|
|
7373
8094
|
);
|
|
@@ -7391,7 +8112,8 @@ function SimpleTable({
|
|
|
7391
8112
|
virtualItems,
|
|
7392
8113
|
invalidateCache,
|
|
7393
8114
|
getRowExpandable,
|
|
7394
|
-
headers: allHeaders
|
|
8115
|
+
headers: allHeaders,
|
|
8116
|
+
hasInitializedSizing
|
|
7395
8117
|
}
|
|
7396
8118
|
),
|
|
7397
8119
|
showInlineLoadingRow && resolvedLoading && /* @__PURE__ */ jsx(TableRow, { "data-loading-row": true, className: "pointer-events-none", children: /* @__PURE__ */ jsxs(
|
|
@@ -7452,12 +8174,12 @@ function DataTable({
|
|
|
7452
8174
|
pageSize = 10,
|
|
7453
8175
|
className
|
|
7454
8176
|
}) {
|
|
7455
|
-
const [sorting, setSorting] =
|
|
7456
|
-
const [columnFilters, setColumnFilters] =
|
|
8177
|
+
const [sorting, setSorting] = React52.useState([]);
|
|
8178
|
+
const [columnFilters, setColumnFilters] = React52.useState(
|
|
7457
8179
|
[]
|
|
7458
8180
|
);
|
|
7459
|
-
const [columnVisibility, setColumnVisibility] =
|
|
7460
|
-
const [rowSelection, setRowSelection] =
|
|
8181
|
+
const [columnVisibility, setColumnVisibility] = React52.useState({});
|
|
8182
|
+
const [rowSelection, setRowSelection] = React52.useState({});
|
|
7461
8183
|
const table = useReactTable({
|
|
7462
8184
|
data,
|
|
7463
8185
|
columns,
|
|
@@ -7614,7 +8336,7 @@ var avatarFallbackVariants = cva(
|
|
|
7614
8336
|
}
|
|
7615
8337
|
}
|
|
7616
8338
|
);
|
|
7617
|
-
var Avatar =
|
|
8339
|
+
var Avatar = React52.forwardRef(({ className, size, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
7618
8340
|
AvatarPrimitive.Root,
|
|
7619
8341
|
{
|
|
7620
8342
|
ref,
|
|
@@ -7623,7 +8345,7 @@ var Avatar = React50.forwardRef(({ className, size, ...props }, ref) => /* @__PU
|
|
|
7623
8345
|
}
|
|
7624
8346
|
));
|
|
7625
8347
|
Avatar.displayName = AvatarPrimitive.Root.displayName;
|
|
7626
|
-
var AvatarImage =
|
|
8348
|
+
var AvatarImage = React52.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
7627
8349
|
AvatarPrimitive.Image,
|
|
7628
8350
|
{
|
|
7629
8351
|
ref,
|
|
@@ -7632,7 +8354,7 @@ var AvatarImage = React50.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
|
7632
8354
|
}
|
|
7633
8355
|
));
|
|
7634
8356
|
AvatarImage.displayName = AvatarPrimitive.Image.displayName;
|
|
7635
|
-
var AvatarFallback =
|
|
8357
|
+
var AvatarFallback = React52.forwardRef(({ className, size, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
7636
8358
|
AvatarPrimitive.Fallback,
|
|
7637
8359
|
{
|
|
7638
8360
|
ref,
|
|
@@ -7796,7 +8518,7 @@ var itemVariants = cva(
|
|
|
7796
8518
|
}
|
|
7797
8519
|
}
|
|
7798
8520
|
);
|
|
7799
|
-
var Item9 =
|
|
8521
|
+
var Item9 = React52.forwardRef(
|
|
7800
8522
|
({
|
|
7801
8523
|
className,
|
|
7802
8524
|
variant,
|
|
@@ -7862,7 +8584,7 @@ var Item9 = React50.forwardRef(
|
|
|
7862
8584
|
}
|
|
7863
8585
|
);
|
|
7864
8586
|
Item9.displayName = "Item";
|
|
7865
|
-
var ItemGroup =
|
|
8587
|
+
var ItemGroup = React52.forwardRef(({ className, label, description, children, ...props }, ref) => /* @__PURE__ */ jsxs("div", { ref, className: cn("space-y-1", className), ...props, children: [
|
|
7866
8588
|
(label || description) && /* @__PURE__ */ jsxs("div", { className: "px-3 py-2 space-y-0.5", children: [
|
|
7867
8589
|
label && /* @__PURE__ */ jsx("div", { className: "text-xs font-semibold text-muted-foreground uppercase tracking-wider", children: label }),
|
|
7868
8590
|
description && /* @__PURE__ */ jsx("div", { className: "text-xs text-muted-foreground", children: description })
|
|
@@ -7870,7 +8592,7 @@ var ItemGroup = React50.forwardRef(({ className, label, description, children, .
|
|
|
7870
8592
|
children
|
|
7871
8593
|
] }));
|
|
7872
8594
|
ItemGroup.displayName = "ItemGroup";
|
|
7873
|
-
var ItemList =
|
|
8595
|
+
var ItemList = React52.forwardRef(({ className, divided, spacing = "default", children, ...props }, ref) => {
|
|
7874
8596
|
const spacingClasses = {
|
|
7875
8597
|
none: "space-y-0",
|
|
7876
8598
|
sm: "space-y-0.5",
|
|
@@ -7893,7 +8615,7 @@ var ItemList = React50.forwardRef(({ className, divided, spacing = "default", ch
|
|
|
7893
8615
|
);
|
|
7894
8616
|
});
|
|
7895
8617
|
ItemList.displayName = "ItemList";
|
|
7896
|
-
var ItemSeparator =
|
|
8618
|
+
var ItemSeparator = React52.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
7897
8619
|
"div",
|
|
7898
8620
|
{
|
|
7899
8621
|
ref,
|
|
@@ -7931,7 +8653,7 @@ var badgeVariants = cva(
|
|
|
7931
8653
|
}
|
|
7932
8654
|
}
|
|
7933
8655
|
);
|
|
7934
|
-
var Badge =
|
|
8656
|
+
var Badge = React52.forwardRef(
|
|
7935
8657
|
({
|
|
7936
8658
|
className,
|
|
7937
8659
|
variant,
|
|
@@ -7998,7 +8720,7 @@ function Calendar({
|
|
|
7998
8720
|
...props
|
|
7999
8721
|
}) {
|
|
8000
8722
|
const defaultClassNames = getDefaultClassNames();
|
|
8001
|
-
const { Card: Card2, CardHeader: CardHeader2, CardTitle: CardTitle2, CardContent: CardContent2, CardDescription: CardDescription2 } =
|
|
8723
|
+
const { Card: Card2, CardHeader: CardHeader2, CardTitle: CardTitle2, CardContent: CardContent2, CardDescription: CardDescription2 } = React52.useMemo(() => {
|
|
8002
8724
|
try {
|
|
8003
8725
|
const cardComponents = (init_card(), __toCommonJS(card_exports));
|
|
8004
8726
|
return cardComponents;
|
|
@@ -8012,7 +8734,7 @@ function Calendar({
|
|
|
8012
8734
|
};
|
|
8013
8735
|
}
|
|
8014
8736
|
}, []);
|
|
8015
|
-
const defaultPresets =
|
|
8737
|
+
const defaultPresets = React52.useMemo(() => {
|
|
8016
8738
|
if (!quickSelect && !presets) return [];
|
|
8017
8739
|
const mode = props.mode;
|
|
8018
8740
|
if (mode === "single") {
|
|
@@ -8020,7 +8742,7 @@ function Calendar({
|
|
|
8020
8742
|
{
|
|
8021
8743
|
label: "Today",
|
|
8022
8744
|
value: () => /* @__PURE__ */ new Date(),
|
|
8023
|
-
icon:
|
|
8745
|
+
icon: React52.createElement(Calendar$1, { className: "h-3 w-3" })
|
|
8024
8746
|
},
|
|
8025
8747
|
{
|
|
8026
8748
|
label: "Tomorrow",
|
|
@@ -8029,7 +8751,7 @@ function Calendar({
|
|
|
8029
8751
|
tomorrow.setDate(tomorrow.getDate() + 1);
|
|
8030
8752
|
return tomorrow;
|
|
8031
8753
|
},
|
|
8032
|
-
icon:
|
|
8754
|
+
icon: React52.createElement("span", { className: "text-xs" }, "\u27A1\uFE0F")
|
|
8033
8755
|
},
|
|
8034
8756
|
{
|
|
8035
8757
|
label: "Next Week",
|
|
@@ -8038,7 +8760,7 @@ function Calendar({
|
|
|
8038
8760
|
nextWeek.setDate(nextWeek.getDate() + 7);
|
|
8039
8761
|
return nextWeek;
|
|
8040
8762
|
},
|
|
8041
|
-
icon:
|
|
8763
|
+
icon: React52.createElement(Calendar$1, { className: "h-3 w-3" })
|
|
8042
8764
|
}
|
|
8043
8765
|
];
|
|
8044
8766
|
} else if (mode === "range") {
|
|
@@ -8051,7 +8773,7 @@ function Calendar({
|
|
|
8051
8773
|
end.setDate(start.getDate() + 6);
|
|
8052
8774
|
return { from: start, to: end };
|
|
8053
8775
|
},
|
|
8054
|
-
icon:
|
|
8776
|
+
icon: React52.createElement(Calendar$1, { className: "h-3 w-3" })
|
|
8055
8777
|
},
|
|
8056
8778
|
{
|
|
8057
8779
|
label: "Next 7 Days",
|
|
@@ -8061,7 +8783,7 @@ function Calendar({
|
|
|
8061
8783
|
end.setDate(start.getDate() + 7);
|
|
8062
8784
|
return { from: start, to: end };
|
|
8063
8785
|
},
|
|
8064
|
-
icon:
|
|
8786
|
+
icon: React52.createElement("span", { className: "text-xs" }, "\u27A1\uFE0F")
|
|
8065
8787
|
}
|
|
8066
8788
|
];
|
|
8067
8789
|
} else {
|
|
@@ -8077,7 +8799,7 @@ function Calendar({
|
|
|
8077
8799
|
}
|
|
8078
8800
|
return dates;
|
|
8079
8801
|
},
|
|
8080
|
-
icon:
|
|
8802
|
+
icon: React52.createElement(Calendar$1, { className: "h-3 w-3" })
|
|
8081
8803
|
}
|
|
8082
8804
|
];
|
|
8083
8805
|
}
|
|
@@ -8088,24 +8810,24 @@ function Calendar({
|
|
|
8088
8810
|
const selected = props.selected;
|
|
8089
8811
|
const mode = props.mode;
|
|
8090
8812
|
if (mode === "single" && selected) {
|
|
8091
|
-
return
|
|
8813
|
+
return React52.createElement(
|
|
8092
8814
|
"div",
|
|
8093
8815
|
{
|
|
8094
8816
|
className: "p-3 border rounded-lg bg-muted/50"
|
|
8095
8817
|
},
|
|
8096
8818
|
[
|
|
8097
|
-
|
|
8819
|
+
React52.createElement(
|
|
8098
8820
|
"div",
|
|
8099
8821
|
{
|
|
8100
8822
|
key: "header",
|
|
8101
8823
|
className: "flex items-center gap-2 mb-1"
|
|
8102
8824
|
},
|
|
8103
8825
|
[
|
|
8104
|
-
|
|
8826
|
+
React52.createElement(Calendar$1, {
|
|
8105
8827
|
key: "icon",
|
|
8106
8828
|
className: "h-4 w-4"
|
|
8107
8829
|
}),
|
|
8108
|
-
|
|
8830
|
+
React52.createElement(
|
|
8109
8831
|
"span",
|
|
8110
8832
|
{
|
|
8111
8833
|
key: "label",
|
|
@@ -8115,7 +8837,7 @@ function Calendar({
|
|
|
8115
8837
|
)
|
|
8116
8838
|
]
|
|
8117
8839
|
),
|
|
8118
|
-
|
|
8840
|
+
React52.createElement(
|
|
8119
8841
|
"p",
|
|
8120
8842
|
{
|
|
8121
8843
|
key: "date",
|
|
@@ -8133,24 +8855,24 @@ function Calendar({
|
|
|
8133
8855
|
}
|
|
8134
8856
|
if (mode === "range" && selected?.from) {
|
|
8135
8857
|
const elements = [
|
|
8136
|
-
|
|
8858
|
+
React52.createElement(
|
|
8137
8859
|
"div",
|
|
8138
8860
|
{
|
|
8139
8861
|
key: "from",
|
|
8140
8862
|
className: "flex items-center gap-2 text-sm"
|
|
8141
8863
|
},
|
|
8142
8864
|
[
|
|
8143
|
-
|
|
8865
|
+
React52.createElement(
|
|
8144
8866
|
"span",
|
|
8145
8867
|
{ key: "icon", className: "text-green-600" },
|
|
8146
8868
|
"\u{1F7E2}"
|
|
8147
8869
|
),
|
|
8148
|
-
|
|
8870
|
+
React52.createElement(
|
|
8149
8871
|
"span",
|
|
8150
8872
|
{ key: "label", className: "font-medium" },
|
|
8151
8873
|
"From:"
|
|
8152
8874
|
),
|
|
8153
|
-
|
|
8875
|
+
React52.createElement(
|
|
8154
8876
|
"span",
|
|
8155
8877
|
{ key: "date" },
|
|
8156
8878
|
selected.from.toLocaleDateString()
|
|
@@ -8160,43 +8882,43 @@ function Calendar({
|
|
|
8160
8882
|
];
|
|
8161
8883
|
if (selected.to) {
|
|
8162
8884
|
elements.push(
|
|
8163
|
-
|
|
8885
|
+
React52.createElement(
|
|
8164
8886
|
"div",
|
|
8165
8887
|
{
|
|
8166
8888
|
key: "to",
|
|
8167
8889
|
className: "flex items-center gap-2 text-sm"
|
|
8168
8890
|
},
|
|
8169
8891
|
[
|
|
8170
|
-
|
|
8892
|
+
React52.createElement(
|
|
8171
8893
|
"span",
|
|
8172
8894
|
{ key: "icon", className: "text-red-600" },
|
|
8173
8895
|
"\u{1F534}"
|
|
8174
8896
|
),
|
|
8175
|
-
|
|
8897
|
+
React52.createElement(
|
|
8176
8898
|
"span",
|
|
8177
8899
|
{ key: "label", className: "font-medium" },
|
|
8178
8900
|
"To:"
|
|
8179
8901
|
),
|
|
8180
|
-
|
|
8902
|
+
React52.createElement(
|
|
8181
8903
|
"span",
|
|
8182
8904
|
{ key: "date" },
|
|
8183
8905
|
selected.to.toLocaleDateString()
|
|
8184
8906
|
)
|
|
8185
8907
|
]
|
|
8186
8908
|
),
|
|
8187
|
-
|
|
8909
|
+
React52.createElement(
|
|
8188
8910
|
"div",
|
|
8189
8911
|
{
|
|
8190
8912
|
key: "duration",
|
|
8191
8913
|
className: "flex items-center gap-2 pt-2 border-t text-sm"
|
|
8192
8914
|
},
|
|
8193
8915
|
[
|
|
8194
|
-
|
|
8916
|
+
React52.createElement(
|
|
8195
8917
|
"span",
|
|
8196
8918
|
{ key: "icon", className: "text-mvn-blue-600" },
|
|
8197
8919
|
"\u23F1\uFE0F"
|
|
8198
8920
|
),
|
|
8199
|
-
|
|
8921
|
+
React52.createElement(
|
|
8200
8922
|
"span",
|
|
8201
8923
|
{ key: "text" },
|
|
8202
8924
|
`Duration: ${Math.ceil(
|
|
@@ -8207,25 +8929,25 @@ function Calendar({
|
|
|
8207
8929
|
)
|
|
8208
8930
|
);
|
|
8209
8931
|
}
|
|
8210
|
-
return
|
|
8932
|
+
return React52.createElement(
|
|
8211
8933
|
"div",
|
|
8212
8934
|
{
|
|
8213
8935
|
className: "p-3 border rounded-lg bg-muted/50"
|
|
8214
8936
|
},
|
|
8215
|
-
|
|
8937
|
+
React52.createElement("div", { className: "space-y-2" }, elements)
|
|
8216
8938
|
);
|
|
8217
8939
|
}
|
|
8218
8940
|
if (mode === "multiple" && Array.isArray(selected) && selected.length > 0) {
|
|
8219
8941
|
const sortedDates = selected.sort((a, b) => a.getTime() - b.getTime()).slice(0, 5);
|
|
8220
8942
|
const dateElements = sortedDates.map(
|
|
8221
|
-
(date, index) =>
|
|
8943
|
+
(date, index) => React52.createElement(
|
|
8222
8944
|
"div",
|
|
8223
8945
|
{
|
|
8224
8946
|
key: index,
|
|
8225
8947
|
className: "flex items-center justify-between p-2 bg-background rounded border"
|
|
8226
8948
|
},
|
|
8227
8949
|
[
|
|
8228
|
-
|
|
8950
|
+
React52.createElement(
|
|
8229
8951
|
"span",
|
|
8230
8952
|
{
|
|
8231
8953
|
key: "date",
|
|
@@ -8237,7 +8959,7 @@ function Calendar({
|
|
|
8237
8959
|
year: "numeric"
|
|
8238
8960
|
})
|
|
8239
8961
|
),
|
|
8240
|
-
|
|
8962
|
+
React52.createElement(
|
|
8241
8963
|
"button",
|
|
8242
8964
|
{
|
|
8243
8965
|
key: "remove",
|
|
@@ -8258,18 +8980,18 @@ function Calendar({
|
|
|
8258
8980
|
)
|
|
8259
8981
|
);
|
|
8260
8982
|
const elements = [
|
|
8261
|
-
|
|
8983
|
+
React52.createElement(
|
|
8262
8984
|
"div",
|
|
8263
8985
|
{
|
|
8264
8986
|
key: "header",
|
|
8265
8987
|
className: "flex items-center gap-2 mb-2"
|
|
8266
8988
|
},
|
|
8267
8989
|
[
|
|
8268
|
-
|
|
8990
|
+
React52.createElement(Star, {
|
|
8269
8991
|
key: "icon",
|
|
8270
8992
|
className: "h-4 w-4 text-yellow-500"
|
|
8271
8993
|
}),
|
|
8272
|
-
|
|
8994
|
+
React52.createElement(
|
|
8273
8995
|
"span",
|
|
8274
8996
|
{
|
|
8275
8997
|
key: "label",
|
|
@@ -8279,7 +9001,7 @@ function Calendar({
|
|
|
8279
9001
|
)
|
|
8280
9002
|
]
|
|
8281
9003
|
),
|
|
8282
|
-
|
|
9004
|
+
React52.createElement(
|
|
8283
9005
|
"div",
|
|
8284
9006
|
{
|
|
8285
9007
|
key: "dates",
|
|
@@ -8290,7 +9012,7 @@ function Calendar({
|
|
|
8290
9012
|
];
|
|
8291
9013
|
if (selected.length > 5) {
|
|
8292
9014
|
elements.push(
|
|
8293
|
-
|
|
9015
|
+
React52.createElement(
|
|
8294
9016
|
"p",
|
|
8295
9017
|
{
|
|
8296
9018
|
key: "more",
|
|
@@ -8300,7 +9022,7 @@ function Calendar({
|
|
|
8300
9022
|
)
|
|
8301
9023
|
);
|
|
8302
9024
|
}
|
|
8303
|
-
return
|
|
9025
|
+
return React52.createElement(
|
|
8304
9026
|
"div",
|
|
8305
9027
|
{
|
|
8306
9028
|
className: "p-3 border rounded-lg bg-muted/50 max-h-48 overflow-y-auto"
|
|
@@ -8315,7 +9037,7 @@ function Calendar({
|
|
|
8315
9037
|
const elements = [];
|
|
8316
9038
|
if ((quickSelect || presets) && activePresets.length > 0) {
|
|
8317
9039
|
const presetButtons = activePresets.map(
|
|
8318
|
-
(preset, index) =>
|
|
9040
|
+
(preset, index) => React52.createElement(
|
|
8319
9041
|
"button",
|
|
8320
9042
|
{
|
|
8321
9043
|
key: index,
|
|
@@ -8324,19 +9046,19 @@ function Calendar({
|
|
|
8324
9046
|
},
|
|
8325
9047
|
[
|
|
8326
9048
|
preset.icon,
|
|
8327
|
-
|
|
9049
|
+
React52.createElement("span", { key: "label" }, preset.label)
|
|
8328
9050
|
]
|
|
8329
9051
|
)
|
|
8330
9052
|
);
|
|
8331
9053
|
elements.push(
|
|
8332
|
-
|
|
9054
|
+
React52.createElement(
|
|
8333
9055
|
"div",
|
|
8334
9056
|
{
|
|
8335
9057
|
key: "presets",
|
|
8336
9058
|
className: "space-y-2"
|
|
8337
9059
|
},
|
|
8338
9060
|
[
|
|
8339
|
-
|
|
9061
|
+
React52.createElement(
|
|
8340
9062
|
"h5",
|
|
8341
9063
|
{
|
|
8342
9064
|
key: "title",
|
|
@@ -8344,7 +9066,7 @@ function Calendar({
|
|
|
8344
9066
|
},
|
|
8345
9067
|
"Quick Select:"
|
|
8346
9068
|
),
|
|
8347
|
-
|
|
9069
|
+
React52.createElement(
|
|
8348
9070
|
"div",
|
|
8349
9071
|
{
|
|
8350
9072
|
key: "buttons",
|
|
@@ -8369,7 +9091,7 @@ function Calendar({
|
|
|
8369
9091
|
label = "Clear Range";
|
|
8370
9092
|
}
|
|
8371
9093
|
elements.push(
|
|
8372
|
-
|
|
9094
|
+
React52.createElement(
|
|
8373
9095
|
"button",
|
|
8374
9096
|
{
|
|
8375
9097
|
key: "clear",
|
|
@@ -8385,7 +9107,7 @@ function Calendar({
|
|
|
8385
9107
|
disabled
|
|
8386
9108
|
},
|
|
8387
9109
|
[
|
|
8388
|
-
|
|
9110
|
+
React52.createElement(RotateCcw, {
|
|
8389
9111
|
key: "icon",
|
|
8390
9112
|
className: "mr-1 h-3 w-3"
|
|
8391
9113
|
}),
|
|
@@ -8394,7 +9116,7 @@ function Calendar({
|
|
|
8394
9116
|
)
|
|
8395
9117
|
);
|
|
8396
9118
|
}
|
|
8397
|
-
return
|
|
9119
|
+
return React52.createElement(
|
|
8398
9120
|
"div",
|
|
8399
9121
|
{
|
|
8400
9122
|
className: cn("space-y-3", sidebarClassName)
|
|
@@ -8402,7 +9124,7 @@ function Calendar({
|
|
|
8402
9124
|
elements
|
|
8403
9125
|
);
|
|
8404
9126
|
};
|
|
8405
|
-
const calendarElement =
|
|
9127
|
+
const calendarElement = React52.createElement(DayPicker, {
|
|
8406
9128
|
showOutsideDays,
|
|
8407
9129
|
className: cn(
|
|
8408
9130
|
"bg-background group/calendar p-4 border rounded-lg shadow-sm [--cell-size:theme(spacing.10)] [[data-slot=card-content]_&]:bg-transparent [[data-slot=popover-content]_&]:bg-transparent",
|
|
@@ -8504,7 +9226,7 @@ function Calendar({
|
|
|
8504
9226
|
},
|
|
8505
9227
|
components: {
|
|
8506
9228
|
Root: ({ className: className2, rootRef, ...props2 }) => {
|
|
8507
|
-
return
|
|
9229
|
+
return React52.createElement("div", {
|
|
8508
9230
|
"data-slot": "calendar",
|
|
8509
9231
|
ref: rootRef,
|
|
8510
9232
|
className: cn(className2),
|
|
@@ -8513,28 +9235,28 @@ function Calendar({
|
|
|
8513
9235
|
},
|
|
8514
9236
|
Chevron: ({ className: className2, orientation, ...props2 }) => {
|
|
8515
9237
|
if (orientation === "left") {
|
|
8516
|
-
return
|
|
9238
|
+
return React52.createElement(ChevronLeft, {
|
|
8517
9239
|
className: cn("size-4", className2),
|
|
8518
9240
|
...props2
|
|
8519
9241
|
});
|
|
8520
9242
|
}
|
|
8521
9243
|
if (orientation === "right") {
|
|
8522
|
-
return
|
|
9244
|
+
return React52.createElement(ChevronRight, {
|
|
8523
9245
|
className: cn("size-4", className2),
|
|
8524
9246
|
...props2
|
|
8525
9247
|
});
|
|
8526
9248
|
}
|
|
8527
|
-
return
|
|
9249
|
+
return React52.createElement(ChevronDown, {
|
|
8528
9250
|
className: cn("size-4", className2),
|
|
8529
9251
|
...props2
|
|
8530
9252
|
});
|
|
8531
9253
|
},
|
|
8532
9254
|
DayButton: CalendarDayButton,
|
|
8533
9255
|
WeekNumber: ({ children, ...props2 }) => {
|
|
8534
|
-
return
|
|
9256
|
+
return React52.createElement(
|
|
8535
9257
|
"td",
|
|
8536
9258
|
props2,
|
|
8537
|
-
|
|
9259
|
+
React52.createElement(
|
|
8538
9260
|
"div",
|
|
8539
9261
|
{
|
|
8540
9262
|
className: "flex size-10 items-center justify-center text-center text-sm font-medium text-muted-foreground"
|
|
@@ -8549,25 +9271,25 @@ function Calendar({
|
|
|
8549
9271
|
});
|
|
8550
9272
|
if (layout === "compact") {
|
|
8551
9273
|
if (withCard) {
|
|
8552
|
-
return
|
|
9274
|
+
return React52.createElement(
|
|
8553
9275
|
Card2,
|
|
8554
9276
|
{
|
|
8555
9277
|
className: cn("w-fit", cardClassName)
|
|
8556
9278
|
},
|
|
8557
|
-
|
|
9279
|
+
React52.createElement(CardContent2, { className: "p-3" }, calendarElement)
|
|
8558
9280
|
);
|
|
8559
9281
|
}
|
|
8560
9282
|
return calendarElement;
|
|
8561
9283
|
}
|
|
8562
9284
|
if (layout === "inline") {
|
|
8563
|
-
const sidebarElement2 = renderDateInfo() || renderQuickActions() ?
|
|
9285
|
+
const sidebarElement2 = renderDateInfo() || renderQuickActions() ? React52.createElement(
|
|
8564
9286
|
"div",
|
|
8565
9287
|
{
|
|
8566
9288
|
className: cn("min-w-[240px] space-y-3", sidebarClassName)
|
|
8567
9289
|
},
|
|
8568
9290
|
[renderDateInfo(), renderQuickActions()].filter(Boolean)
|
|
8569
9291
|
) : null;
|
|
8570
|
-
const content = sidebarElement2 ?
|
|
9292
|
+
const content = sidebarElement2 ? React52.createElement(
|
|
8571
9293
|
"div",
|
|
8572
9294
|
{
|
|
8573
9295
|
className: cn("flex gap-4 items-start", containerClassName)
|
|
@@ -8575,25 +9297,25 @@ function Calendar({
|
|
|
8575
9297
|
[calendarElement, sidebarElement2]
|
|
8576
9298
|
) : calendarElement;
|
|
8577
9299
|
if (withCard) {
|
|
8578
|
-
return
|
|
9300
|
+
return React52.createElement(
|
|
8579
9301
|
Card2,
|
|
8580
9302
|
{
|
|
8581
9303
|
className: cn("w-fit", cardClassName)
|
|
8582
9304
|
},
|
|
8583
9305
|
[
|
|
8584
|
-
(cardTitle || cardDescription) &&
|
|
8585
|
-
cardTitle &&
|
|
9306
|
+
(cardTitle || cardDescription) && React52.createElement(CardHeader2, { key: "header" }, [
|
|
9307
|
+
cardTitle && React52.createElement(
|
|
8586
9308
|
CardTitle2,
|
|
8587
9309
|
{ key: "title", className: "text-base" },
|
|
8588
9310
|
cardTitle
|
|
8589
9311
|
),
|
|
8590
|
-
cardDescription &&
|
|
9312
|
+
cardDescription && React52.createElement(
|
|
8591
9313
|
CardDescription2,
|
|
8592
9314
|
{ key: "desc" },
|
|
8593
9315
|
cardDescription
|
|
8594
9316
|
)
|
|
8595
9317
|
]),
|
|
8596
|
-
|
|
9318
|
+
React52.createElement(
|
|
8597
9319
|
CardContent2,
|
|
8598
9320
|
{
|
|
8599
9321
|
key: "content",
|
|
@@ -8606,7 +9328,7 @@ function Calendar({
|
|
|
8606
9328
|
}
|
|
8607
9329
|
return content;
|
|
8608
9330
|
}
|
|
8609
|
-
const sidebarElement = renderDateInfo() || renderQuickActions() ?
|
|
9331
|
+
const sidebarElement = renderDateInfo() || renderQuickActions() ? React52.createElement(
|
|
8610
9332
|
"div",
|
|
8611
9333
|
{
|
|
8612
9334
|
className: cn("min-w-[240px] space-y-3", sidebarClassName)
|
|
@@ -8614,7 +9336,7 @@ function Calendar({
|
|
|
8614
9336
|
[renderDateInfo(), renderQuickActions()].filter(Boolean)
|
|
8615
9337
|
) : null;
|
|
8616
9338
|
if (withCard) {
|
|
8617
|
-
const cardElement =
|
|
9339
|
+
const cardElement = React52.createElement(
|
|
8618
9340
|
Card2,
|
|
8619
9341
|
{
|
|
8620
9342
|
className: cn(
|
|
@@ -8625,19 +9347,19 @@ function Calendar({
|
|
|
8625
9347
|
)
|
|
8626
9348
|
},
|
|
8627
9349
|
[
|
|
8628
|
-
(cardTitle || cardDescription) &&
|
|
8629
|
-
cardTitle &&
|
|
9350
|
+
(cardTitle || cardDescription) && React52.createElement(CardHeader2, { key: "header" }, [
|
|
9351
|
+
cardTitle && React52.createElement(
|
|
8630
9352
|
CardTitle2,
|
|
8631
9353
|
{ key: "title", className: "text-base" },
|
|
8632
9354
|
cardTitle
|
|
8633
9355
|
),
|
|
8634
|
-
cardDescription &&
|
|
9356
|
+
cardDescription && React52.createElement(
|
|
8635
9357
|
CardDescription2,
|
|
8636
9358
|
{ key: "desc" },
|
|
8637
9359
|
cardDescription
|
|
8638
9360
|
)
|
|
8639
9361
|
]),
|
|
8640
|
-
|
|
9362
|
+
React52.createElement(
|
|
8641
9363
|
CardContent2,
|
|
8642
9364
|
{
|
|
8643
9365
|
key: "content",
|
|
@@ -8648,7 +9370,7 @@ function Calendar({
|
|
|
8648
9370
|
].filter(Boolean)
|
|
8649
9371
|
);
|
|
8650
9372
|
if (sidebarElement) {
|
|
8651
|
-
return
|
|
9373
|
+
return React52.createElement(
|
|
8652
9374
|
"div",
|
|
8653
9375
|
{
|
|
8654
9376
|
className: cn("flex gap-4 flex-wrap items-start", containerClassName)
|
|
@@ -8659,7 +9381,7 @@ function Calendar({
|
|
|
8659
9381
|
return cardElement;
|
|
8660
9382
|
}
|
|
8661
9383
|
if (sidebarElement) {
|
|
8662
|
-
return
|
|
9384
|
+
return React52.createElement(
|
|
8663
9385
|
"div",
|
|
8664
9386
|
{
|
|
8665
9387
|
className: cn("flex gap-4 flex-wrap items-start", containerClassName)
|
|
@@ -8676,8 +9398,8 @@ function CalendarDayButton({
|
|
|
8676
9398
|
...props
|
|
8677
9399
|
}) {
|
|
8678
9400
|
const defaultClassNames = getDefaultClassNames();
|
|
8679
|
-
const ref =
|
|
8680
|
-
|
|
9401
|
+
const ref = React52.useRef(null);
|
|
9402
|
+
React52.useEffect(() => {
|
|
8681
9403
|
if (modifiers.focused) ref.current?.focus();
|
|
8682
9404
|
}, [modifiers.focused]);
|
|
8683
9405
|
return /* @__PURE__ */ jsx(
|
|
@@ -10293,7 +11015,7 @@ var pickerVariants = cva("w-full justify-start text-left font-normal", {
|
|
|
10293
11015
|
variant: "outlined"
|
|
10294
11016
|
}
|
|
10295
11017
|
});
|
|
10296
|
-
var DatePicker =
|
|
11018
|
+
var DatePicker = React52.forwardRef(
|
|
10297
11019
|
({
|
|
10298
11020
|
date,
|
|
10299
11021
|
onDateChange,
|
|
@@ -10340,7 +11062,7 @@ var DatePicker = React50.forwardRef(
|
|
|
10340
11062
|
}
|
|
10341
11063
|
);
|
|
10342
11064
|
DatePicker.displayName = "DatePicker";
|
|
10343
|
-
var DateRangePicker =
|
|
11065
|
+
var DateRangePicker = React52.forwardRef(
|
|
10344
11066
|
({
|
|
10345
11067
|
dateRange,
|
|
10346
11068
|
onDateRangeChange,
|
|
@@ -10398,15 +11120,15 @@ DateRangePicker.displayName = "DateRangePicker";
|
|
|
10398
11120
|
|
|
10399
11121
|
// src/components/ui/carousel/index.tsx
|
|
10400
11122
|
init_utils();
|
|
10401
|
-
var CarouselContext =
|
|
11123
|
+
var CarouselContext = React52.createContext(null);
|
|
10402
11124
|
function useCarousel() {
|
|
10403
|
-
const context =
|
|
11125
|
+
const context = React52.useContext(CarouselContext);
|
|
10404
11126
|
if (!context) {
|
|
10405
11127
|
throw new Error("useCarousel must be used within a <Carousel />");
|
|
10406
11128
|
}
|
|
10407
11129
|
return context;
|
|
10408
11130
|
}
|
|
10409
|
-
var Carousel =
|
|
11131
|
+
var Carousel = React52.forwardRef(
|
|
10410
11132
|
({
|
|
10411
11133
|
orientation = "horizontal",
|
|
10412
11134
|
opts,
|
|
@@ -10423,22 +11145,22 @@ var Carousel = React50.forwardRef(
|
|
|
10423
11145
|
},
|
|
10424
11146
|
plugins
|
|
10425
11147
|
);
|
|
10426
|
-
const [canScrollPrev, setCanScrollPrev] =
|
|
10427
|
-
const [canScrollNext, setCanScrollNext] =
|
|
10428
|
-
const onSelect =
|
|
11148
|
+
const [canScrollPrev, setCanScrollPrev] = React52.useState(false);
|
|
11149
|
+
const [canScrollNext, setCanScrollNext] = React52.useState(false);
|
|
11150
|
+
const onSelect = React52.useCallback((api2) => {
|
|
10429
11151
|
if (!api2) {
|
|
10430
11152
|
return;
|
|
10431
11153
|
}
|
|
10432
11154
|
setCanScrollPrev(api2.canScrollPrev());
|
|
10433
11155
|
setCanScrollNext(api2.canScrollNext());
|
|
10434
11156
|
}, []);
|
|
10435
|
-
const scrollPrev =
|
|
11157
|
+
const scrollPrev = React52.useCallback(() => {
|
|
10436
11158
|
api?.scrollPrev();
|
|
10437
11159
|
}, [api]);
|
|
10438
|
-
const scrollNext =
|
|
11160
|
+
const scrollNext = React52.useCallback(() => {
|
|
10439
11161
|
api?.scrollNext();
|
|
10440
11162
|
}, [api]);
|
|
10441
|
-
const handleKeyDown =
|
|
11163
|
+
const handleKeyDown = React52.useCallback(
|
|
10442
11164
|
(event) => {
|
|
10443
11165
|
if (event.key === "ArrowLeft") {
|
|
10444
11166
|
event.preventDefault();
|
|
@@ -10450,13 +11172,13 @@ var Carousel = React50.forwardRef(
|
|
|
10450
11172
|
},
|
|
10451
11173
|
[scrollPrev, scrollNext]
|
|
10452
11174
|
);
|
|
10453
|
-
|
|
11175
|
+
React52.useEffect(() => {
|
|
10454
11176
|
if (!api || !setApi) {
|
|
10455
11177
|
return;
|
|
10456
11178
|
}
|
|
10457
11179
|
setApi(api);
|
|
10458
11180
|
}, [api, setApi]);
|
|
10459
|
-
|
|
11181
|
+
React52.useEffect(() => {
|
|
10460
11182
|
if (!api) {
|
|
10461
11183
|
return;
|
|
10462
11184
|
}
|
|
@@ -10501,7 +11223,7 @@ var Carousel = React50.forwardRef(
|
|
|
10501
11223
|
}
|
|
10502
11224
|
);
|
|
10503
11225
|
Carousel.displayName = "Carousel";
|
|
10504
|
-
var CarouselContent =
|
|
11226
|
+
var CarouselContent = React52.forwardRef(({ className, ...props }, ref) => {
|
|
10505
11227
|
const { carouselRef, orientation } = useCarousel();
|
|
10506
11228
|
return /* @__PURE__ */ jsx("div", { ref: carouselRef, className: "overflow-hidden h-full", children: /* @__PURE__ */ jsx(
|
|
10507
11229
|
"div",
|
|
@@ -10517,7 +11239,7 @@ var CarouselContent = React50.forwardRef(({ className, ...props }, ref) => {
|
|
|
10517
11239
|
) });
|
|
10518
11240
|
});
|
|
10519
11241
|
CarouselContent.displayName = "CarouselContent";
|
|
10520
|
-
var CarouselItem =
|
|
11242
|
+
var CarouselItem = React52.forwardRef(({ className, ...props }, ref) => {
|
|
10521
11243
|
const { orientation } = useCarousel();
|
|
10522
11244
|
return /* @__PURE__ */ jsx(
|
|
10523
11245
|
"div",
|
|
@@ -10535,7 +11257,7 @@ var CarouselItem = React50.forwardRef(({ className, ...props }, ref) => {
|
|
|
10535
11257
|
);
|
|
10536
11258
|
});
|
|
10537
11259
|
CarouselItem.displayName = "CarouselItem";
|
|
10538
|
-
var CarouselPrevious =
|
|
11260
|
+
var CarouselPrevious = React52.forwardRef(({ className, variant = "outline", size = "icon", ...props }, ref) => {
|
|
10539
11261
|
const { orientation, scrollPrev, canScrollPrev } = useCarousel();
|
|
10540
11262
|
return /* @__PURE__ */ jsxs(
|
|
10541
11263
|
Button,
|
|
@@ -10559,7 +11281,7 @@ var CarouselPrevious = React50.forwardRef(({ className, variant = "outline", siz
|
|
|
10559
11281
|
);
|
|
10560
11282
|
});
|
|
10561
11283
|
CarouselPrevious.displayName = "CarouselPrevious";
|
|
10562
|
-
var CarouselNext =
|
|
11284
|
+
var CarouselNext = React52.forwardRef(({ className, variant = "outline", size = "icon", ...props }, ref) => {
|
|
10563
11285
|
const { orientation, scrollNext, canScrollNext } = useCarousel();
|
|
10564
11286
|
return /* @__PURE__ */ jsxs(
|
|
10565
11287
|
Button,
|
|
@@ -10598,10 +11320,10 @@ function SimpleCarousel({
|
|
|
10598
11320
|
nextArrow,
|
|
10599
11321
|
onSlideChange
|
|
10600
11322
|
}) {
|
|
10601
|
-
const [api, setApi] =
|
|
10602
|
-
const [current, setCurrent] =
|
|
10603
|
-
const [count, setCount] =
|
|
10604
|
-
|
|
11323
|
+
const [api, setApi] = React52.useState();
|
|
11324
|
+
const [current, setCurrent] = React52.useState(0);
|
|
11325
|
+
const [count, setCount] = React52.useState(0);
|
|
11326
|
+
React52.useEffect(() => {
|
|
10605
11327
|
if (!api) {
|
|
10606
11328
|
return;
|
|
10607
11329
|
}
|
|
@@ -10613,7 +11335,7 @@ function SimpleCarousel({
|
|
|
10613
11335
|
onSlideChange?.(selectedIndex);
|
|
10614
11336
|
});
|
|
10615
11337
|
}, [api, onSlideChange]);
|
|
10616
|
-
|
|
11338
|
+
React52.useEffect(() => {
|
|
10617
11339
|
if (!api || !autoPlay) {
|
|
10618
11340
|
return;
|
|
10619
11341
|
}
|
|
@@ -10763,7 +11485,7 @@ var typeToTag = {
|
|
|
10763
11485
|
list: "ul",
|
|
10764
11486
|
"list-item": "li"
|
|
10765
11487
|
};
|
|
10766
|
-
var Typography =
|
|
11488
|
+
var Typography = React52.forwardRef(
|
|
10767
11489
|
({
|
|
10768
11490
|
type,
|
|
10769
11491
|
size,
|
|
@@ -10800,7 +11522,7 @@ var Typography = React50.forwardRef(
|
|
|
10800
11522
|
);
|
|
10801
11523
|
Typography.displayName = "Typography";
|
|
10802
11524
|
function createWrapper(fixedType) {
|
|
10803
|
-
return
|
|
11525
|
+
return React52.forwardRef(
|
|
10804
11526
|
({ ...props }, ref) => /* @__PURE__ */ jsx(Typography, { ref, type: fixedType, ...props })
|
|
10805
11527
|
);
|
|
10806
11528
|
}
|
|
@@ -10903,6 +11625,13 @@ var tooltipStyle = {
|
|
|
10903
11625
|
boxShadow: "0 4px 6px -1px rgb(0 0 0 / 0.1)",
|
|
10904
11626
|
color: "var(--foreground)"
|
|
10905
11627
|
};
|
|
11628
|
+
var tooltipLabelStyle = {
|
|
11629
|
+
color: "var(--foreground)",
|
|
11630
|
+
fontWeight: 500
|
|
11631
|
+
};
|
|
11632
|
+
var tooltipItemStyle = {
|
|
11633
|
+
color: "var(--foreground)"
|
|
11634
|
+
};
|
|
10906
11635
|
var legendStyle = {
|
|
10907
11636
|
fontSize: "12px",
|
|
10908
11637
|
color: "var(--muted-foreground, #616875)"
|
|
@@ -10953,7 +11682,8 @@ function LineChart({
|
|
|
10953
11682
|
Tooltip$1,
|
|
10954
11683
|
{
|
|
10955
11684
|
contentStyle: tooltipStyle,
|
|
10956
|
-
labelStyle:
|
|
11685
|
+
labelStyle: tooltipLabelStyle,
|
|
11686
|
+
itemStyle: tooltipItemStyle
|
|
10957
11687
|
}
|
|
10958
11688
|
),
|
|
10959
11689
|
showLegend && /* @__PURE__ */ jsx(Legend, {}),
|
|
@@ -11045,7 +11775,8 @@ function BarChart({
|
|
|
11045
11775
|
Tooltip$1,
|
|
11046
11776
|
{
|
|
11047
11777
|
contentStyle: tooltipStyle,
|
|
11048
|
-
labelStyle:
|
|
11778
|
+
labelStyle: tooltipLabelStyle,
|
|
11779
|
+
itemStyle: tooltipItemStyle
|
|
11049
11780
|
}
|
|
11050
11781
|
),
|
|
11051
11782
|
showLegend && /* @__PURE__ */ jsx(Legend, {}),
|
|
@@ -11105,7 +11836,8 @@ function PieChart({
|
|
|
11105
11836
|
Tooltip$1,
|
|
11106
11837
|
{
|
|
11107
11838
|
contentStyle: tooltipStyle,
|
|
11108
|
-
labelStyle:
|
|
11839
|
+
labelStyle: tooltipLabelStyle,
|
|
11840
|
+
itemStyle: tooltipItemStyle
|
|
11109
11841
|
}
|
|
11110
11842
|
),
|
|
11111
11843
|
showLegend && /* @__PURE__ */ jsx(Legend, {})
|
|
@@ -11155,7 +11887,8 @@ function AreaChart({
|
|
|
11155
11887
|
Tooltip$1,
|
|
11156
11888
|
{
|
|
11157
11889
|
contentStyle: tooltipStyle,
|
|
11158
|
-
labelStyle:
|
|
11890
|
+
labelStyle: tooltipLabelStyle,
|
|
11891
|
+
itemStyle: tooltipItemStyle
|
|
11159
11892
|
}
|
|
11160
11893
|
),
|
|
11161
11894
|
showLegend && /* @__PURE__ */ jsx(Legend, {}),
|
|
@@ -11226,7 +11959,8 @@ function ScatterChart({
|
|
|
11226
11959
|
Tooltip$1,
|
|
11227
11960
|
{
|
|
11228
11961
|
contentStyle: tooltipStyle,
|
|
11229
|
-
labelStyle:
|
|
11962
|
+
labelStyle: tooltipLabelStyle,
|
|
11963
|
+
itemStyle: tooltipItemStyle,
|
|
11230
11964
|
cursor: { strokeDasharray: "3 3" }
|
|
11231
11965
|
}
|
|
11232
11966
|
),
|
|
@@ -11284,7 +12018,8 @@ function RadarChart({
|
|
|
11284
12018
|
Tooltip$1,
|
|
11285
12019
|
{
|
|
11286
12020
|
contentStyle: tooltipStyle,
|
|
11287
|
-
labelStyle:
|
|
12021
|
+
labelStyle: tooltipLabelStyle,
|
|
12022
|
+
itemStyle: tooltipItemStyle
|
|
11288
12023
|
}
|
|
11289
12024
|
),
|
|
11290
12025
|
showLegend && /* @__PURE__ */ jsx(Legend, {}),
|
|
@@ -11508,6 +12243,6 @@ function useTheme2() {
|
|
|
11508
12243
|
return context;
|
|
11509
12244
|
}
|
|
11510
12245
|
|
|
11511
|
-
export { Accordion, Alert, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AreaChart, AspectRatio, Avatar, AvatarFallback, AvatarGroup, AvatarImage, Badge, BarChart, Blockquote, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, ButtonGroup, ButtonGroupSeparator, ButtonGroupText, CHART_COLORS, CHART_PALETTE, Calendar, CalendarDayButton, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Carousel, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious, Checkbox, Collapsible, CollapsibleContent, CollapsibleItem, CollapsibleTrigger, Combobox, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuPortal, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, DataTable, DatePicker, DateRangePicker, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DotsSpinner, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, Empty, Field, Form, FormItem, FormList, H1, H2, H3, H4, HoverCard, HoverCardContent, HoverCardTrigger, IconButton, InlineCode, Input, InputGroup, InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot, Item9 as Item, ItemGroup, ItemList, ItemSeparator, Label, Lead, LineChart, List3 as List, ListItem, Menubar, MenubarCheckboxItem, MenubarContent, MenubarGroup, MenubarItem, MenubarLabel, MenubarMenu, MenubarPortal, MenubarRadioGroup, MenubarRadioItem, MenubarSeparator, MenubarShortcut, MenubarSub, MenubarSubContent, MenubarSubTrigger, MenubarTrigger, Muted, NavigationMenu, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, NavigationMenuViewport, P, Pagination, PaginationContent, PaginationEllipsis, PaginationFirst, PaginationItem, PaginationLast, PaginationLink, PaginationNext, PaginationPrevious, PieChart, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, ProductCard, ProfileCard, Progress, RadarChart, RadioGroup, RadioGroupItem, ResizableHandle, ResizablePanel, ResizablePanelGroup, ScatterChart, ScrollArea, ScrollBar, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator5 as Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, SimpleAvatar, SimpleCard, SimpleCarousel, SimpleTable, SimpleTabs, SimpleTooltip, Skeleton, SkeletonCard, Slider, Small, Spinner, Switch, THEMES, THEME_CATALOG, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, ThemeProvider, Toast, ToastProvider, Toaster, Toggle, ToggleGroup, ToggleGroupItem, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, Typography, TypographyGroup, alertVariants, avatarVariants, badgeVariants, buttonVariants, cardVariants, checkboxVariants, cn, composeRules, emailRule, emptyVariants, fieldVariants, getCurrentMode, getCurrentTheme, getInitials, getThemeColors, initializeTheme, inputGroupVariants, inputVariants, itemVariants, labelVariants, legendStyle, maxLengthRule, maxValueRule, minLengthRule, minValueRule, navigationMenuTriggerStyle, numberRule, patternRule, progressVariants, radioGroupVariants, requiredRule, separatorVariants, setMode, setTheme, skeletonVariants, spinnerVariants, tableVariants, textareaVariants, toastVariants, toggleGroupVariants, toggleVariants, tooltipStyle, urlRule, useCarousel, useForm, useSidebar, useTheme2 as useTheme, useToast, useWatch };
|
|
12246
|
+
export { Accordion, Alert, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AreaChart, AspectRatio, Avatar, AvatarFallback, AvatarGroup, AvatarImage, BREAKPOINTS, Badge, BarChart, Blockquote, BottomNavigation, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, ButtonGroup, ButtonGroupSeparator, ButtonGroupText, CHART_COLORS, CHART_PALETTE, Calendar, CalendarDayButton, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Carousel, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious, Checkbox, Collapsible, CollapsibleContent, CollapsibleItem, CollapsibleTrigger, Combobox, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuPortal, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, DataTable, DatePicker, DateRangePicker, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DotsSpinner, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, Empty, Field, Form, FormItem, FormList, H1, H2, H3, H4, HoverCard, HoverCardContent, HoverCardTrigger, IconButton, InlineCode, Input, InputGroup, InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot, Item9 as Item, ItemGroup, ItemList, ItemSeparator, Label, Lead, LineChart, List3 as List, ListItem, Menubar, MenubarCheckboxItem, MenubarContent, MenubarGroup, MenubarItem, MenubarLabel, MenubarMenu, MenubarPortal, MenubarRadioGroup, MenubarRadioItem, MenubarSeparator, MenubarShortcut, MenubarSub, MenubarSubContent, MenubarSubTrigger, MenubarTrigger, MobileHeader, MobileNavigationProvider, Muted, NavigationMenu, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, NavigationMenuViewport, P, Pagination, PaginationContent, PaginationEllipsis, PaginationFirst, PaginationItem, PaginationLast, PaginationLink, PaginationNext, PaginationPrevious, PieChart, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, ProductCard, ProfileCard, Progress, RadarChart, RadioGroup, RadioGroupItem, ResizableHandle, ResizablePanel, ResizablePanelGroup, ScatterChart, ScrollArea, ScrollBar, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator5 as Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, SimpleAvatar, SimpleCard, SimpleCarousel, SimpleTable, SimpleTabs, SimpleTooltip, Skeleton, SkeletonCard, Slider, Small, Spinner, Switch, THEMES, THEME_CATALOG, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, ThemeProvider, Toast, ToastProvider, Toaster, Toggle, ToggleGroup, ToggleGroupItem, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, Typography, TypographyGroup, alertVariants, avatarVariants, badgeVariants, buttonVariants, cardVariants, checkboxVariants, cn, composeRules, emailRule, emptyVariants, fieldVariants, getCurrentMode, getCurrentTheme, getInitials, getThemeColors, initializeTheme, inputGroupVariants, inputVariants, itemVariants, labelVariants, legendStyle, maxLengthRule, maxValueRule, minLengthRule, minValueRule, navigationMenuTriggerStyle, numberRule, patternRule, progressVariants, radioGroupVariants, radioItemVariants, requiredRule, separatorVariants, setMode, setTheme, skeletonVariants, spinnerVariants, switchVariants, tableVariants, textareaVariants, toastVariants, toggleGroupVariants, toggleVariants, tooltipStyle, urlRule, useBreakpoint, useBreakpointValue, useCarousel, useForm, useIsDesktop, useIsMobile, useIsTablet, useMobileNav, useSidebar, useSwipeActions, useTheme2 as useTheme, useToast, useWatch };
|
|
11512
12247
|
//# sourceMappingURL=index.mjs.map
|
|
11513
12248
|
//# sourceMappingURL=index.mjs.map
|