@mvn-ui/react 0.1.2 → 0.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.css +140 -29
- package/dist/index.css.map +1 -1
- package/dist/index.d.mts +471 -10
- package/dist/index.d.ts +471 -10
- package/dist/index.js +1813 -709
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1600 -595
- package/dist/index.mjs.map +1 -1
- package/dist/themes.css +653 -0
- package/package.json +5 -3
package/dist/index.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
var clsx = require('clsx');
|
|
4
4
|
var tailwindMerge = require('tailwind-merge');
|
|
5
|
-
var
|
|
5
|
+
var React50 = require('react');
|
|
6
6
|
var classVarianceAuthority = require('class-variance-authority');
|
|
7
7
|
var jsxRuntime = require('react/jsx-runtime');
|
|
8
8
|
var reactSlot = require('@radix-ui/react-slot');
|
|
@@ -43,6 +43,7 @@ var isEqual = require('react-fast-compare');
|
|
|
43
43
|
var AvatarPrimitive = require('@radix-ui/react-avatar');
|
|
44
44
|
var reactDayPicker = require('react-day-picker');
|
|
45
45
|
var useEmblaCarousel = require('embla-carousel-react');
|
|
46
|
+
var recharts = require('recharts');
|
|
46
47
|
|
|
47
48
|
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
48
49
|
|
|
@@ -64,7 +65,7 @@ function _interopNamespace(e) {
|
|
|
64
65
|
return Object.freeze(n);
|
|
65
66
|
}
|
|
66
67
|
|
|
67
|
-
var
|
|
68
|
+
var React50__namespace = /*#__PURE__*/_interopNamespace(React50);
|
|
68
69
|
var LabelPrimitive__namespace = /*#__PURE__*/_interopNamespace(LabelPrimitive);
|
|
69
70
|
var SelectPrimitive__namespace = /*#__PURE__*/_interopNamespace(SelectPrimitive);
|
|
70
71
|
var CheckboxPrimitive__namespace = /*#__PURE__*/_interopNamespace(CheckboxPrimitive);
|
|
@@ -336,7 +337,7 @@ var init_card = __esm({
|
|
|
336
337
|
}
|
|
337
338
|
}
|
|
338
339
|
);
|
|
339
|
-
exports.Card =
|
|
340
|
+
exports.Card = React50__namespace.forwardRef(({ className, variant, size, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
340
341
|
"div",
|
|
341
342
|
{
|
|
342
343
|
ref,
|
|
@@ -345,7 +346,7 @@ var init_card = __esm({
|
|
|
345
346
|
}
|
|
346
347
|
));
|
|
347
348
|
exports.Card.displayName = "Card";
|
|
348
|
-
exports.CardHeader =
|
|
349
|
+
exports.CardHeader = React50__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
349
350
|
"div",
|
|
350
351
|
{
|
|
351
352
|
ref,
|
|
@@ -354,7 +355,7 @@ var init_card = __esm({
|
|
|
354
355
|
}
|
|
355
356
|
));
|
|
356
357
|
exports.CardHeader.displayName = "CardHeader";
|
|
357
|
-
exports.CardTitle =
|
|
358
|
+
exports.CardTitle = React50__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
358
359
|
"h3",
|
|
359
360
|
{
|
|
360
361
|
ref,
|
|
@@ -363,7 +364,7 @@ var init_card = __esm({
|
|
|
363
364
|
}
|
|
364
365
|
));
|
|
365
366
|
exports.CardTitle.displayName = "CardTitle";
|
|
366
|
-
exports.CardDescription =
|
|
367
|
+
exports.CardDescription = React50__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
367
368
|
"div",
|
|
368
369
|
{
|
|
369
370
|
ref,
|
|
@@ -372,9 +373,9 @@ var init_card = __esm({
|
|
|
372
373
|
}
|
|
373
374
|
));
|
|
374
375
|
exports.CardDescription.displayName = "CardDescription";
|
|
375
|
-
exports.CardContent =
|
|
376
|
+
exports.CardContent = React50__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("div", { ref, className: cn("p-6 pt-0", className), ...props }));
|
|
376
377
|
exports.CardContent.displayName = "CardContent";
|
|
377
|
-
exports.CardFooter =
|
|
378
|
+
exports.CardFooter = React50__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
378
379
|
"div",
|
|
379
380
|
{
|
|
380
381
|
ref,
|
|
@@ -417,7 +418,7 @@ var buttonVariants = classVarianceAuthority.cva(
|
|
|
417
418
|
}
|
|
418
419
|
}
|
|
419
420
|
);
|
|
420
|
-
var Button =
|
|
421
|
+
var Button = React50__namespace.forwardRef(
|
|
421
422
|
({
|
|
422
423
|
className,
|
|
423
424
|
variant,
|
|
@@ -467,7 +468,7 @@ var Button = React49__namespace.forwardRef(
|
|
|
467
468
|
}
|
|
468
469
|
);
|
|
469
470
|
Button.displayName = "Button";
|
|
470
|
-
var IconButton =
|
|
471
|
+
var IconButton = React50__namespace.forwardRef(
|
|
471
472
|
({ icon, size = "icon", className, ...props }, ref) => {
|
|
472
473
|
return /* @__PURE__ */ jsxRuntime.jsx(Button, { ref, size, className, ...props, children: icon });
|
|
473
474
|
}
|
|
@@ -489,10 +490,10 @@ function ButtonGroup({
|
|
|
489
490
|
"data-orientation": orientation,
|
|
490
491
|
className: cn(
|
|
491
492
|
"inline-flex",
|
|
493
|
+
className,
|
|
492
494
|
isVertical ? "flex-col" : "flex-row",
|
|
493
495
|
// Join children and normalize border radius so the group looks contiguous
|
|
494
|
-
isVertical ? "[&>*]:rounded-none [&>*]:-mt-px [&>:first-child]:mt-0 [&>:first-child]:rounded-t-md [&>:last-child]:rounded-b-md" : "[&>*]:rounded-none [&>*]:-ml-px [&>:first-child]:ml-0 [&>:first-child]:rounded-l-md [&>:last-child]:rounded-r-md"
|
|
495
|
-
className
|
|
496
|
+
isVertical ? "[&>*]:rounded-none [&>*]:-mt-px [&>:first-child]:mt-0 [&>:first-child]:rounded-t-md [&>:last-child]:rounded-b-md" : "[&>*]:rounded-none [&>*]:-ml-px [&>:first-child]:ml-0 [&>:first-child]:rounded-l-md [&>:last-child]:rounded-r-md"
|
|
496
497
|
),
|
|
497
498
|
...props
|
|
498
499
|
}
|
|
@@ -561,7 +562,7 @@ var inputVariants = classVarianceAuthority.cva(
|
|
|
561
562
|
}
|
|
562
563
|
}
|
|
563
564
|
);
|
|
564
|
-
var Input =
|
|
565
|
+
var Input = React50__namespace.forwardRef(
|
|
565
566
|
({
|
|
566
567
|
className,
|
|
567
568
|
containerClassName,
|
|
@@ -579,12 +580,12 @@ var Input = React49__namespace.forwardRef(
|
|
|
579
580
|
value,
|
|
580
581
|
...props
|
|
581
582
|
}, ref) => {
|
|
582
|
-
const [showPassword, setShowPassword] =
|
|
583
|
-
const [internalValue, setInternalValue] =
|
|
584
|
-
const generatedId =
|
|
583
|
+
const [showPassword, setShowPassword] = React50__namespace.useState(false);
|
|
584
|
+
const [internalValue, setInternalValue] = React50__namespace.useState(value || "");
|
|
585
|
+
const generatedId = React50__namespace.useId();
|
|
585
586
|
const inputId = id || generatedId;
|
|
586
587
|
const hasError = !!error;
|
|
587
|
-
|
|
588
|
+
React50__namespace.useEffect(() => {
|
|
588
589
|
setInternalValue(value || "");
|
|
589
590
|
}, [value]);
|
|
590
591
|
const handleClear = () => {
|
|
@@ -603,8 +604,8 @@ var Input = React49__namespace.forwardRef(
|
|
|
603
604
|
children: label
|
|
604
605
|
}
|
|
605
606
|
),
|
|
606
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative", children: [
|
|
607
|
-
leftIcon && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute left-3
|
|
607
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative flex items-center", children: [
|
|
608
|
+
leftIcon && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute left-3 text-muted-foreground pointer-events-none flex items-center justify-center [&_svg]:size-4", children: leftIcon }),
|
|
608
609
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
609
610
|
"input",
|
|
610
611
|
{
|
|
@@ -629,7 +630,7 @@ var Input = React49__namespace.forwardRef(
|
|
|
629
630
|
...props
|
|
630
631
|
}
|
|
631
632
|
),
|
|
632
|
-
(showClearButton || showPasswordToggle || rightIcon) && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "absolute right-3
|
|
633
|
+
(showClearButton || showPasswordToggle || rightIcon) && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "absolute right-3 flex items-center gap-1", children: [
|
|
633
634
|
showClearButton && /* @__PURE__ */ jsxRuntime.jsx(
|
|
634
635
|
"button",
|
|
635
636
|
{
|
|
@@ -650,7 +651,7 @@ var Input = React49__namespace.forwardRef(
|
|
|
650
651
|
children: showPassword ? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.EyeOffIcon, { className: "h-4 w-4" }) : /* @__PURE__ */ jsxRuntime.jsx(lucideReact.EyeIcon, { className: "h-4 w-4" })
|
|
651
652
|
}
|
|
652
653
|
),
|
|
653
|
-
rightIcon && !showPasswordToggle && !showClearButton && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-muted-foreground [&_svg]:size-4", children: rightIcon })
|
|
654
|
+
rightIcon && !showPasswordToggle && !showClearButton && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-muted-foreground flex items-center justify-center [&_svg]:size-4", children: rightIcon })
|
|
654
655
|
] })
|
|
655
656
|
] }),
|
|
656
657
|
error && /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -693,7 +694,7 @@ var labelVariants = classVarianceAuthority.cva(
|
|
|
693
694
|
}
|
|
694
695
|
}
|
|
695
696
|
);
|
|
696
|
-
var Label =
|
|
697
|
+
var Label = React50__namespace.forwardRef(({ className, variant, required, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
697
698
|
LabelPrimitive__namespace.Root,
|
|
698
699
|
{
|
|
699
700
|
ref,
|
|
@@ -734,7 +735,7 @@ var textareaVariants = classVarianceAuthority.cva(
|
|
|
734
735
|
}
|
|
735
736
|
}
|
|
736
737
|
);
|
|
737
|
-
var Textarea =
|
|
738
|
+
var Textarea = React50__namespace.forwardRef(
|
|
738
739
|
({
|
|
739
740
|
className,
|
|
740
741
|
containerClassName,
|
|
@@ -752,8 +753,8 @@ var Textarea = React49__namespace.forwardRef(
|
|
|
752
753
|
id,
|
|
753
754
|
...props
|
|
754
755
|
}, ref) => {
|
|
755
|
-
const internalRef =
|
|
756
|
-
const [charCount, setCharCount] =
|
|
756
|
+
const internalRef = React50__namespace.useRef(null);
|
|
757
|
+
const [charCount, setCharCount] = React50__namespace.useState(0);
|
|
757
758
|
const textareaRef = (node) => {
|
|
758
759
|
internalRef.current = node;
|
|
759
760
|
if (typeof ref === "function") {
|
|
@@ -762,14 +763,14 @@ var Textarea = React49__namespace.forwardRef(
|
|
|
762
763
|
ref.current = node;
|
|
763
764
|
}
|
|
764
765
|
};
|
|
765
|
-
|
|
766
|
+
React50__namespace.useEffect(() => {
|
|
766
767
|
if (autoResize && internalRef.current) {
|
|
767
768
|
const textarea = internalRef.current;
|
|
768
769
|
textarea.style.height = "auto";
|
|
769
770
|
textarea.style.height = `${textarea.scrollHeight}px`;
|
|
770
771
|
}
|
|
771
772
|
}, [value, autoResize]);
|
|
772
|
-
const handleChange =
|
|
773
|
+
const handleChange = React50__namespace.useCallback(
|
|
773
774
|
(e) => {
|
|
774
775
|
if (showCount || maxLength) {
|
|
775
776
|
setCharCount(e.target.value.length);
|
|
@@ -778,13 +779,13 @@ var Textarea = React49__namespace.forwardRef(
|
|
|
778
779
|
},
|
|
779
780
|
[onChange, showCount, maxLength]
|
|
780
781
|
);
|
|
781
|
-
|
|
782
|
+
React50__namespace.useEffect(() => {
|
|
782
783
|
if (showCount || maxLength) {
|
|
783
784
|
setCharCount(String(value || "").length);
|
|
784
785
|
}
|
|
785
786
|
}, [value, showCount, maxLength]);
|
|
786
787
|
const hasError = !!error;
|
|
787
|
-
const generatedId =
|
|
788
|
+
const generatedId = React50__namespace.useId();
|
|
788
789
|
const textareaId = id || generatedId;
|
|
789
790
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("w-full space-y-2", containerClassName), children: [
|
|
790
791
|
label && /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -845,10 +846,10 @@ Textarea.displayName = "Textarea";
|
|
|
845
846
|
|
|
846
847
|
// src/components/ui/select/index.tsx
|
|
847
848
|
init_utils();
|
|
848
|
-
var Select =
|
|
849
|
+
var Select = React50__namespace.forwardRef(
|
|
849
850
|
({ children, value, onValueChange, ...props }, _ref) => {
|
|
850
|
-
const [internalValue, setInternalValue] =
|
|
851
|
-
|
|
851
|
+
const [internalValue, setInternalValue] = React50__namespace.useState(value ?? "");
|
|
852
|
+
React50__namespace.useEffect(() => {
|
|
852
853
|
setInternalValue(value ?? "");
|
|
853
854
|
}, [value]);
|
|
854
855
|
const handleValueChange = (newValue) => {
|
|
@@ -885,7 +886,7 @@ var triggerVariants = classVarianceAuthority.cva(
|
|
|
885
886
|
}
|
|
886
887
|
}
|
|
887
888
|
);
|
|
888
|
-
var SelectTrigger =
|
|
889
|
+
var SelectTrigger = React50__namespace.forwardRef(({ className, children, variant, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
889
890
|
SelectPrimitive__namespace.Trigger,
|
|
890
891
|
{
|
|
891
892
|
ref,
|
|
@@ -898,7 +899,7 @@ var SelectTrigger = React49__namespace.forwardRef(({ className, children, varian
|
|
|
898
899
|
}
|
|
899
900
|
));
|
|
900
901
|
SelectTrigger.displayName = SelectPrimitive__namespace.Trigger.displayName;
|
|
901
|
-
var SelectScrollUpButton =
|
|
902
|
+
var SelectScrollUpButton = React50__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
902
903
|
SelectPrimitive__namespace.ScrollUpButton,
|
|
903
904
|
{
|
|
904
905
|
ref,
|
|
@@ -911,7 +912,7 @@ var SelectScrollUpButton = React49__namespace.forwardRef(({ className, ...props
|
|
|
911
912
|
}
|
|
912
913
|
));
|
|
913
914
|
SelectScrollUpButton.displayName = SelectPrimitive__namespace.ScrollUpButton.displayName;
|
|
914
|
-
var SelectScrollDownButton =
|
|
915
|
+
var SelectScrollDownButton = React50__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
915
916
|
SelectPrimitive__namespace.ScrollDownButton,
|
|
916
917
|
{
|
|
917
918
|
ref,
|
|
@@ -924,7 +925,7 @@ var SelectScrollDownButton = React49__namespace.forwardRef(({ className, ...prop
|
|
|
924
925
|
}
|
|
925
926
|
));
|
|
926
927
|
SelectScrollDownButton.displayName = SelectPrimitive__namespace.ScrollDownButton.displayName;
|
|
927
|
-
var SelectContent =
|
|
928
|
+
var SelectContent = React50__namespace.forwardRef(({ className, children, position = "popper", ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(SelectPrimitive__namespace.Portal, { children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
928
929
|
SelectPrimitive__namespace.Content,
|
|
929
930
|
{
|
|
930
931
|
ref,
|
|
@@ -952,7 +953,7 @@ var SelectContent = React49__namespace.forwardRef(({ className, children, positi
|
|
|
952
953
|
}
|
|
953
954
|
) }));
|
|
954
955
|
SelectContent.displayName = SelectPrimitive__namespace.Content.displayName;
|
|
955
|
-
var SelectLabel =
|
|
956
|
+
var SelectLabel = React50__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
956
957
|
SelectPrimitive__namespace.Label,
|
|
957
958
|
{
|
|
958
959
|
ref,
|
|
@@ -964,7 +965,7 @@ var SelectLabel = React49__namespace.forwardRef(({ className, ...props }, ref) =
|
|
|
964
965
|
}
|
|
965
966
|
));
|
|
966
967
|
SelectLabel.displayName = SelectPrimitive__namespace.Label.displayName;
|
|
967
|
-
var SelectItem =
|
|
968
|
+
var SelectItem = React50__namespace.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
968
969
|
SelectPrimitive__namespace.Item,
|
|
969
970
|
{
|
|
970
971
|
ref,
|
|
@@ -980,7 +981,7 @@ var SelectItem = React49__namespace.forwardRef(({ className, children, ...props
|
|
|
980
981
|
}
|
|
981
982
|
));
|
|
982
983
|
SelectItem.displayName = SelectPrimitive__namespace.Item.displayName;
|
|
983
|
-
var SelectSeparator =
|
|
984
|
+
var SelectSeparator = React50__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
984
985
|
SelectPrimitive__namespace.Separator,
|
|
985
986
|
{
|
|
986
987
|
ref,
|
|
@@ -1007,8 +1008,8 @@ var checkboxVariants = classVarianceAuthority.cva(
|
|
|
1007
1008
|
}
|
|
1008
1009
|
}
|
|
1009
1010
|
);
|
|
1010
|
-
var Checkbox =
|
|
1011
|
-
const generatedId =
|
|
1011
|
+
var Checkbox = React50__namespace.forwardRef(({ className, size, label, description, indeterminate, ...props }, ref) => {
|
|
1012
|
+
const generatedId = React50__namespace.useId();
|
|
1012
1013
|
const checkboxId = props.id || generatedId;
|
|
1013
1014
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start gap-2.5", children: [
|
|
1014
1015
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -1056,7 +1057,7 @@ var radioGroupVariants = classVarianceAuthority.cva("grid gap-2", {
|
|
|
1056
1057
|
orientation: "vertical"
|
|
1057
1058
|
}
|
|
1058
1059
|
});
|
|
1059
|
-
var RadioGroup =
|
|
1060
|
+
var RadioGroup = React50__namespace.forwardRef(
|
|
1060
1061
|
({
|
|
1061
1062
|
className,
|
|
1062
1063
|
orientation = "vertical",
|
|
@@ -1069,8 +1070,8 @@ var RadioGroup = React49__namespace.forwardRef(
|
|
|
1069
1070
|
children,
|
|
1070
1071
|
...props
|
|
1071
1072
|
}, ref) => {
|
|
1072
|
-
const generatedId =
|
|
1073
|
-
const defaultRenderItem =
|
|
1073
|
+
const generatedId = React50__namespace.useId();
|
|
1074
|
+
const defaultRenderItem = React50__namespace.useCallback(
|
|
1074
1075
|
(item) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1075
1076
|
"div",
|
|
1076
1077
|
{
|
|
@@ -1128,7 +1129,7 @@ var RadioGroup = React49__namespace.forwardRef(
|
|
|
1128
1129
|
}
|
|
1129
1130
|
);
|
|
1130
1131
|
RadioGroup.displayName = RadioGroupPrimitive__namespace.Root.displayName;
|
|
1131
|
-
var RadioGroupItem =
|
|
1132
|
+
var RadioGroupItem = React50__namespace.forwardRef(({ className, ...props }, ref) => {
|
|
1132
1133
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1133
1134
|
RadioGroupPrimitive__namespace.Item,
|
|
1134
1135
|
{
|
|
@@ -1146,7 +1147,7 @@ RadioGroupItem.displayName = RadioGroupPrimitive__namespace.Item.displayName;
|
|
|
1146
1147
|
|
|
1147
1148
|
// src/components/ui/switch/index.tsx
|
|
1148
1149
|
init_utils();
|
|
1149
|
-
var Switch =
|
|
1150
|
+
var Switch = React50__namespace.forwardRef(({ className, offNode, onNode, ...props }, ref) => {
|
|
1150
1151
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1151
1152
|
SwitchPrimitives__namespace.Root,
|
|
1152
1153
|
{
|
|
@@ -1159,13 +1160,17 @@ var Switch = React49__namespace.forwardRef(({ className, ...props }, ref) => {
|
|
|
1159
1160
|
className
|
|
1160
1161
|
),
|
|
1161
1162
|
...props,
|
|
1162
|
-
children: /* @__PURE__ */ jsxRuntime.
|
|
1163
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1163
1164
|
SwitchPrimitives__namespace.Thumb,
|
|
1164
1165
|
{
|
|
1165
1166
|
className: cn(
|
|
1166
|
-
"pointer-events-none
|
|
1167
|
+
"group pointer-events-none relative flex items-center justify-center h-5 w-5 rounded-full bg-background shadow-lg ring-0 transition-transform",
|
|
1167
1168
|
"data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0"
|
|
1168
|
-
)
|
|
1169
|
+
),
|
|
1170
|
+
children: [
|
|
1171
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "absolute opacity-0 group-data-[state=checked]:opacity-100 transition-all duration-200", children: onNode }),
|
|
1172
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "absolute opacity-100 group-data-[state=checked]:opacity-0 transition-all duration-200", children: offNode })
|
|
1173
|
+
]
|
|
1169
1174
|
}
|
|
1170
1175
|
)
|
|
1171
1176
|
}
|
|
@@ -1196,7 +1201,7 @@ var toggleVariants = classVarianceAuthority.cva(
|
|
|
1196
1201
|
}
|
|
1197
1202
|
}
|
|
1198
1203
|
);
|
|
1199
|
-
var Toggle =
|
|
1204
|
+
var Toggle = React50__namespace.forwardRef(({ className, variant, size, icon, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1200
1205
|
TogglePrimitive__namespace.Root,
|
|
1201
1206
|
{
|
|
1202
1207
|
ref,
|
|
@@ -1242,9 +1247,9 @@ var toggleGroupItemVariants = classVarianceAuthority.cva(
|
|
|
1242
1247
|
}
|
|
1243
1248
|
}
|
|
1244
1249
|
);
|
|
1245
|
-
var ToggleGroup =
|
|
1250
|
+
var ToggleGroup = React50__namespace.forwardRef(
|
|
1246
1251
|
({ className, size, items, itemClassName, renderItem, children, ...props }, ref) => {
|
|
1247
|
-
const defaultRenderItem =
|
|
1252
|
+
const defaultRenderItem = React50__namespace.useCallback(
|
|
1248
1253
|
(item) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1249
1254
|
ToggleGroupPrimitive__namespace.Item,
|
|
1250
1255
|
{
|
|
@@ -1274,7 +1279,7 @@ var ToggleGroup = React49__namespace.forwardRef(
|
|
|
1274
1279
|
}
|
|
1275
1280
|
);
|
|
1276
1281
|
ToggleGroup.displayName = "ToggleGroup";
|
|
1277
|
-
var ToggleGroupItem =
|
|
1282
|
+
var ToggleGroupItem = React50__namespace.forwardRef(({ className, size, children, ...props }, ref) => {
|
|
1278
1283
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1279
1284
|
ToggleGroupPrimitive__namespace.Item,
|
|
1280
1285
|
{
|
|
@@ -1289,7 +1294,7 @@ ToggleGroupItem.displayName = "ToggleGroupItem";
|
|
|
1289
1294
|
|
|
1290
1295
|
// src/components/ui/slider/index.tsx
|
|
1291
1296
|
init_utils();
|
|
1292
|
-
var Slider =
|
|
1297
|
+
var Slider = React50__namespace.forwardRef(
|
|
1293
1298
|
({
|
|
1294
1299
|
className,
|
|
1295
1300
|
showValue,
|
|
@@ -1348,7 +1353,7 @@ var inputGroupVariants = classVarianceAuthority.cva("flex items-stretch w-full",
|
|
|
1348
1353
|
size: "default"
|
|
1349
1354
|
}
|
|
1350
1355
|
});
|
|
1351
|
-
var InputGroup =
|
|
1356
|
+
var InputGroup = React50__namespace.forwardRef(
|
|
1352
1357
|
({
|
|
1353
1358
|
className,
|
|
1354
1359
|
size,
|
|
@@ -1384,9 +1389,9 @@ var InputGroup = React49__namespace.forwardRef(
|
|
|
1384
1389
|
}
|
|
1385
1390
|
),
|
|
1386
1391
|
leftElement && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "inline-flex items-center", children: leftElement }),
|
|
1387
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-1 min-w-0", children:
|
|
1388
|
-
if (
|
|
1389
|
-
return
|
|
1392
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-1 min-w-0", children: React50__namespace.Children.map(children, (child) => {
|
|
1393
|
+
if (React50__namespace.isValidElement(child)) {
|
|
1394
|
+
return React50__namespace.cloneElement(child, {
|
|
1390
1395
|
className: cn(
|
|
1391
1396
|
child.props.className,
|
|
1392
1397
|
(leftAddon || leftElement) && "rounded-l-none border-l-0",
|
|
@@ -1417,7 +1422,7 @@ InputGroup.displayName = "InputGroup";
|
|
|
1417
1422
|
|
|
1418
1423
|
// src/components/ui/input-otp/index.tsx
|
|
1419
1424
|
init_utils();
|
|
1420
|
-
var InputOTP =
|
|
1425
|
+
var InputOTP = React50__namespace.forwardRef(({ containerClassName, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1421
1426
|
inputOtp.OTPInput,
|
|
1422
1427
|
{
|
|
1423
1428
|
ref,
|
|
@@ -1430,10 +1435,10 @@ var InputOTP = React49__namespace.forwardRef(({ containerClassName, children, ..
|
|
|
1430
1435
|
}
|
|
1431
1436
|
));
|
|
1432
1437
|
InputOTP.displayName = "InputOTP";
|
|
1433
|
-
var InputOTPGroup =
|
|
1438
|
+
var InputOTPGroup = React50__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("div", { ref, className: cn("flex items-center gap-2", className), ...props }));
|
|
1434
1439
|
InputOTPGroup.displayName = "InputOTPGroup";
|
|
1435
|
-
var InputOTPSlot =
|
|
1436
|
-
const inputOTPContext =
|
|
1440
|
+
var InputOTPSlot = React50__namespace.forwardRef(({ index, className, ...props }, ref) => {
|
|
1441
|
+
const inputOTPContext = React50__namespace.useContext(inputOtp.OTPInputContext);
|
|
1437
1442
|
if (!inputOTPContext) {
|
|
1438
1443
|
console.error("InputOTPSlot must be used within InputOTP");
|
|
1439
1444
|
return null;
|
|
@@ -1467,7 +1472,7 @@ var InputOTPSlot = React49__namespace.forwardRef(({ index, className, ...props }
|
|
|
1467
1472
|
);
|
|
1468
1473
|
});
|
|
1469
1474
|
InputOTPSlot.displayName = "InputOTPSlot";
|
|
1470
|
-
var InputOTPSeparator =
|
|
1475
|
+
var InputOTPSeparator = React50__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("div", { ref, role: "separator", className, ...props, children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.MinusIcon, { className: "h-4 w-4 text-muted-foreground" }) }));
|
|
1471
1476
|
InputOTPSeparator.displayName = "InputOTPSeparator";
|
|
1472
1477
|
|
|
1473
1478
|
// src/components/ui/form/form-utils.ts
|
|
@@ -1902,9 +1907,9 @@ function createFormInstance(name) {
|
|
|
1902
1907
|
}
|
|
1903
1908
|
|
|
1904
1909
|
// src/components/ui/form/form-context.tsx
|
|
1905
|
-
var FormContext =
|
|
1910
|
+
var FormContext = React50.createContext(null);
|
|
1906
1911
|
function useForm(name) {
|
|
1907
|
-
const ref =
|
|
1912
|
+
const ref = React50.useRef();
|
|
1908
1913
|
if (!ref.current) {
|
|
1909
1914
|
const instance = createFormInstance(name);
|
|
1910
1915
|
ref.current = instance;
|
|
@@ -1914,17 +1919,17 @@ function useForm(name) {
|
|
|
1914
1919
|
return ref.current;
|
|
1915
1920
|
}
|
|
1916
1921
|
function useWatch(name, formInstance) {
|
|
1917
|
-
const ctx =
|
|
1922
|
+
const ctx = React50.useContext(FormContext);
|
|
1918
1923
|
const form = formInstance ?? ctx?.form;
|
|
1919
1924
|
if (!form)
|
|
1920
1925
|
throw new Error(
|
|
1921
1926
|
"useWatch must be used inside Form or receive a form instance."
|
|
1922
1927
|
);
|
|
1923
|
-
const [state, setState] =
|
|
1928
|
+
const [state, setState] = React50.useState(() => ({
|
|
1924
1929
|
value: name === void 0 ? form.getFieldsValue() : Array.isArray(name) ? name.map((n) => form.getFieldValue(n)) : form.getFieldValue(name),
|
|
1925
1930
|
revision: 0
|
|
1926
1931
|
}));
|
|
1927
|
-
|
|
1932
|
+
React50.useEffect(() => {
|
|
1928
1933
|
const readValue = () => {
|
|
1929
1934
|
if (name === void 0) return form.getFieldsValue();
|
|
1930
1935
|
if (Array.isArray(name)) return name.map((n) => form.getFieldValue(n));
|
|
@@ -2028,7 +2033,7 @@ var maxValueRule = (max, message2) => ({
|
|
|
2028
2033
|
message: message2 || `Must be at most ${max}`
|
|
2029
2034
|
});
|
|
2030
2035
|
var composeRules = (...rules) => rules.filter(Boolean);
|
|
2031
|
-
var Form =
|
|
2036
|
+
var Form = React50.forwardRef(function Form2(props, ref) {
|
|
2032
2037
|
const {
|
|
2033
2038
|
form: formProp,
|
|
2034
2039
|
initialValues,
|
|
@@ -2040,11 +2045,11 @@ var Form = React49.forwardRef(function Form2(props, ref) {
|
|
|
2040
2045
|
onFieldsChange,
|
|
2041
2046
|
children
|
|
2042
2047
|
} = props;
|
|
2043
|
-
const createdFormRef =
|
|
2048
|
+
const createdFormRef = React50.useRef(null);
|
|
2044
2049
|
const form = formProp || (createdFormRef.current ?? (createdFormRef.current = useForm()));
|
|
2045
|
-
const initialAppliedRef =
|
|
2046
|
-
const [, forceUpdate] =
|
|
2047
|
-
|
|
2050
|
+
const initialAppliedRef = React50.useRef(false);
|
|
2051
|
+
const [, forceUpdate] = React50.useState(0);
|
|
2052
|
+
React50.useEffect(() => {
|
|
2048
2053
|
if (!initialAppliedRef.current && initialValues) {
|
|
2049
2054
|
form.setFieldsValue(initialValues);
|
|
2050
2055
|
initialAppliedRef.current = true;
|
|
@@ -2107,8 +2112,8 @@ var Form = React49.forwardRef(function Form2(props, ref) {
|
|
|
2107
2112
|
onValuesChange,
|
|
2108
2113
|
onFieldsChange
|
|
2109
2114
|
]);
|
|
2110
|
-
|
|
2111
|
-
const handleSubmit =
|
|
2115
|
+
React50.useImperativeHandle(ref, () => ({ ...form, nativeElement: null }));
|
|
2116
|
+
const handleSubmit = React50.useCallback(
|
|
2112
2117
|
(event) => {
|
|
2113
2118
|
if (event) event.preventDefault();
|
|
2114
2119
|
form.validateFields().then((values) => {
|
|
@@ -2134,11 +2139,11 @@ var FormItem = (props) => {
|
|
|
2134
2139
|
variant = "outlined",
|
|
2135
2140
|
requiredMark
|
|
2136
2141
|
} = props;
|
|
2137
|
-
const ctx =
|
|
2142
|
+
const ctx = React50.useContext(FormContext);
|
|
2138
2143
|
if (!ctx) throw new Error("FormItem must be used inside Form");
|
|
2139
2144
|
const { form, disabled: contextDisabled } = ctx;
|
|
2140
|
-
const [, tick] =
|
|
2141
|
-
|
|
2145
|
+
const [, tick] = React50.useState(0);
|
|
2146
|
+
React50.useEffect(() => {
|
|
2142
2147
|
const meta = {
|
|
2143
2148
|
rules,
|
|
2144
2149
|
onStoreChange: () => tick((value) => value + 1),
|
|
@@ -2156,7 +2161,7 @@ var FormItem = (props) => {
|
|
|
2156
2161
|
const isRequired = Array.isArray(rules) ? rules.some((rule) => rule && rule.required) : false;
|
|
2157
2162
|
const isDisabled = !!contextDisabled;
|
|
2158
2163
|
const requiredIndicator = requiredMark === void 0 ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-destructive mr-1", "aria-hidden": "true", children: "*" }) : /* @__PURE__ */ jsxRuntime.jsx("span", { className: "mr-1", "aria-hidden": "true", children: requiredMark });
|
|
2159
|
-
if (!children || !
|
|
2164
|
+
if (!children || !React50__namespace.default.isValidElement(children)) return null;
|
|
2160
2165
|
const childProps = {};
|
|
2161
2166
|
childProps[valuePropName] = fieldValue;
|
|
2162
2167
|
const childClass = children.props.className;
|
|
@@ -2203,23 +2208,23 @@ var FormItem = (props) => {
|
|
|
2203
2208
|
isRequired ? requiredIndicator : null,
|
|
2204
2209
|
/* @__PURE__ */ jsxRuntime.jsx("span", { children: label })
|
|
2205
2210
|
] }) : null,
|
|
2206
|
-
|
|
2211
|
+
React50.cloneElement(children, childProps),
|
|
2207
2212
|
help ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-sm text-muted-foreground mt-2", children: help }) : null,
|
|
2208
2213
|
fieldErrors && fieldErrors.length ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-destructive mt-1 text-sm font-medium", children: fieldErrors[0] }) : null
|
|
2209
2214
|
] });
|
|
2210
2215
|
};
|
|
2211
2216
|
var FormList = (props) => {
|
|
2212
2217
|
const { name, initialValue, children } = props;
|
|
2213
|
-
const ctx =
|
|
2218
|
+
const ctx = React50.useContext(FormContext);
|
|
2214
2219
|
if (!ctx) throw new Error("FormList must be used inside Form");
|
|
2215
2220
|
const { form, disabled: contextDisabled } = ctx;
|
|
2216
2221
|
const isDisabled = !!contextDisabled;
|
|
2217
|
-
const [fields, setFields] =
|
|
2218
|
-
const [errors, setErrors] =
|
|
2222
|
+
const [fields, setFields] = React50.useState([]);
|
|
2223
|
+
const [errors, setErrors] = React50.useState(
|
|
2219
2224
|
() => form.getFieldError(name) || []
|
|
2220
2225
|
);
|
|
2221
|
-
const initializedRef =
|
|
2222
|
-
const syncFields =
|
|
2226
|
+
const initializedRef = React50.useRef(false);
|
|
2227
|
+
const syncFields = React50.useCallback((list) => {
|
|
2223
2228
|
const next = list.map((_, index) => ({
|
|
2224
2229
|
key: index,
|
|
2225
2230
|
name: index,
|
|
@@ -2227,24 +2232,24 @@ var FormList = (props) => {
|
|
|
2227
2232
|
}));
|
|
2228
2233
|
setFields(next);
|
|
2229
2234
|
}, []);
|
|
2230
|
-
const updateState =
|
|
2235
|
+
const updateState = React50.useCallback(() => {
|
|
2231
2236
|
const raw = form.getFieldValue(name);
|
|
2232
2237
|
const list = Array.isArray(raw) ? raw : [];
|
|
2233
2238
|
syncFields(list);
|
|
2234
2239
|
setErrors(form.getFieldError(name) || []);
|
|
2235
2240
|
}, [form, name, syncFields]);
|
|
2236
|
-
const ensureList =
|
|
2241
|
+
const ensureList = React50.useCallback(() => {
|
|
2237
2242
|
const raw = form.getFieldValue(name);
|
|
2238
2243
|
return Array.isArray(raw) ? [...raw] : [];
|
|
2239
2244
|
}, [form, name]);
|
|
2240
|
-
const setList =
|
|
2245
|
+
const setList = React50.useCallback(
|
|
2241
2246
|
(next) => {
|
|
2242
2247
|
form.setFieldValue(name, next);
|
|
2243
2248
|
updateState();
|
|
2244
2249
|
},
|
|
2245
2250
|
[form, name, updateState]
|
|
2246
2251
|
);
|
|
2247
|
-
const add =
|
|
2252
|
+
const add = React50.useCallback(
|
|
2248
2253
|
(defaultValue, index) => {
|
|
2249
2254
|
if (isDisabled) return;
|
|
2250
2255
|
const list = ensureList();
|
|
@@ -2254,7 +2259,7 @@ var FormList = (props) => {
|
|
|
2254
2259
|
},
|
|
2255
2260
|
[ensureList, isDisabled, setList]
|
|
2256
2261
|
);
|
|
2257
|
-
const remove =
|
|
2262
|
+
const remove = React50.useCallback(
|
|
2258
2263
|
(index) => {
|
|
2259
2264
|
if (isDisabled) return;
|
|
2260
2265
|
const list = ensureList();
|
|
@@ -2266,7 +2271,7 @@ var FormList = (props) => {
|
|
|
2266
2271
|
},
|
|
2267
2272
|
[ensureList, isDisabled, setList]
|
|
2268
2273
|
);
|
|
2269
|
-
const move =
|
|
2274
|
+
const move = React50.useCallback(
|
|
2270
2275
|
(from, to) => {
|
|
2271
2276
|
if (isDisabled) return;
|
|
2272
2277
|
const list = ensureList();
|
|
@@ -2279,7 +2284,7 @@ var FormList = (props) => {
|
|
|
2279
2284
|
},
|
|
2280
2285
|
[ensureList, isDisabled, setList]
|
|
2281
2286
|
);
|
|
2282
|
-
|
|
2287
|
+
React50.useEffect(() => {
|
|
2283
2288
|
if (initializedRef.current) return;
|
|
2284
2289
|
if (initialValue === void 0) return;
|
|
2285
2290
|
const current = form.getFieldValue(name);
|
|
@@ -2292,7 +2297,7 @@ var FormList = (props) => {
|
|
|
2292
2297
|
}
|
|
2293
2298
|
initializedRef.current = true;
|
|
2294
2299
|
}, [form, name, initialValue, updateState]);
|
|
2295
|
-
|
|
2300
|
+
React50.useEffect(() => {
|
|
2296
2301
|
const handleChange = () => updateState();
|
|
2297
2302
|
handleChange();
|
|
2298
2303
|
let unsubscribe = null;
|
|
@@ -2324,7 +2329,7 @@ var fieldVariants = classVarianceAuthority.cva("", {
|
|
|
2324
2329
|
orientation: "vertical"
|
|
2325
2330
|
}
|
|
2326
2331
|
});
|
|
2327
|
-
var Field =
|
|
2332
|
+
var Field = React50__namespace.forwardRef(
|
|
2328
2333
|
({
|
|
2329
2334
|
className,
|
|
2330
2335
|
orientation,
|
|
@@ -2337,7 +2342,7 @@ var Field = React49__namespace.forwardRef(
|
|
|
2337
2342
|
children,
|
|
2338
2343
|
...props
|
|
2339
2344
|
}, ref) => {
|
|
2340
|
-
const generatedId =
|
|
2345
|
+
const generatedId = React50__namespace.useId();
|
|
2341
2346
|
const fieldId = htmlFor || generatedId;
|
|
2342
2347
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2343
2348
|
"div",
|
|
@@ -2386,7 +2391,7 @@ var alertVariants = classVarianceAuthority.cva(
|
|
|
2386
2391
|
}
|
|
2387
2392
|
}
|
|
2388
2393
|
);
|
|
2389
|
-
var Alert =
|
|
2394
|
+
var Alert = React50__namespace.forwardRef(
|
|
2390
2395
|
({
|
|
2391
2396
|
className,
|
|
2392
2397
|
variant,
|
|
@@ -2399,8 +2404,8 @@ var Alert = React49__namespace.forwardRef(
|
|
|
2399
2404
|
descriptionClassName,
|
|
2400
2405
|
...props
|
|
2401
2406
|
}, ref) => {
|
|
2402
|
-
const [isVisible, setIsVisible] =
|
|
2403
|
-
const handleDismiss =
|
|
2407
|
+
const [isVisible, setIsVisible] = React50__namespace.useState(true);
|
|
2408
|
+
const handleDismiss = React50__namespace.useCallback(() => {
|
|
2404
2409
|
setIsVisible(false);
|
|
2405
2410
|
onClose?.();
|
|
2406
2411
|
}, [onClose]);
|
|
@@ -2462,14 +2467,14 @@ Alert.displayName = "Alert";
|
|
|
2462
2467
|
|
|
2463
2468
|
// src/components/ui/toast/index.tsx
|
|
2464
2469
|
init_utils();
|
|
2465
|
-
var ToastContext =
|
|
2470
|
+
var ToastContext = React50.createContext(void 0);
|
|
2466
2471
|
function ToastProvider({
|
|
2467
2472
|
children,
|
|
2468
2473
|
defaultDuration = 5e3,
|
|
2469
2474
|
position = "top-right"
|
|
2470
2475
|
}) {
|
|
2471
|
-
const [toasts, setToasts] =
|
|
2472
|
-
const toast2 =
|
|
2476
|
+
const [toasts, setToasts] = React50.useState([]);
|
|
2477
|
+
const toast2 = React50.useCallback(
|
|
2473
2478
|
(props) => {
|
|
2474
2479
|
const id = Math.random().toString(36).substring(7);
|
|
2475
2480
|
const duration = props.duration ?? defaultDuration;
|
|
@@ -2488,7 +2493,7 @@ function ToastProvider({
|
|
|
2488
2493
|
},
|
|
2489
2494
|
[defaultDuration]
|
|
2490
2495
|
);
|
|
2491
|
-
const dismiss =
|
|
2496
|
+
const dismiss = React50.useCallback((id) => {
|
|
2492
2497
|
setToasts((prev) => prev.filter((toast3) => toast3.id !== id));
|
|
2493
2498
|
}, []);
|
|
2494
2499
|
const getPositionClasses = () => {
|
|
@@ -2535,7 +2540,7 @@ function ToastProvider({
|
|
|
2535
2540
|
] });
|
|
2536
2541
|
}
|
|
2537
2542
|
function useToastContext() {
|
|
2538
|
-
const context =
|
|
2543
|
+
const context = React50.useContext(ToastContext);
|
|
2539
2544
|
if (!context) {
|
|
2540
2545
|
throw new Error("useToast must be used within ToastProvider");
|
|
2541
2546
|
}
|
|
@@ -2569,7 +2574,7 @@ var toastVariants = classVarianceAuthority.cva(
|
|
|
2569
2574
|
}
|
|
2570
2575
|
}
|
|
2571
2576
|
);
|
|
2572
|
-
var Toast =
|
|
2577
|
+
var Toast = React50__namespace.forwardRef(
|
|
2573
2578
|
({
|
|
2574
2579
|
className,
|
|
2575
2580
|
variant,
|
|
@@ -2582,8 +2587,8 @@ var Toast = React49__namespace.forwardRef(
|
|
|
2582
2587
|
descriptionClassName,
|
|
2583
2588
|
...props
|
|
2584
2589
|
}, ref) => {
|
|
2585
|
-
const [isVisible, setIsVisible] =
|
|
2586
|
-
const handleDismiss =
|
|
2590
|
+
const [isVisible, setIsVisible] = React50__namespace.useState(true);
|
|
2591
|
+
const handleDismiss = React50__namespace.useCallback(() => {
|
|
2587
2592
|
setIsVisible(false);
|
|
2588
2593
|
onClose?.();
|
|
2589
2594
|
}, [onClose]);
|
|
@@ -2679,7 +2684,7 @@ var progressVariants = classVarianceAuthority.cva(
|
|
|
2679
2684
|
}
|
|
2680
2685
|
}
|
|
2681
2686
|
);
|
|
2682
|
-
var Progress =
|
|
2687
|
+
var Progress = React50__namespace.forwardRef(
|
|
2683
2688
|
({
|
|
2684
2689
|
className,
|
|
2685
2690
|
value = 0,
|
|
@@ -2745,7 +2750,7 @@ var spinnerVariants = classVarianceAuthority.cva("animate-spin", {
|
|
|
2745
2750
|
variant: "default"
|
|
2746
2751
|
}
|
|
2747
2752
|
});
|
|
2748
|
-
var Spinner =
|
|
2753
|
+
var Spinner = React50__namespace.forwardRef(
|
|
2749
2754
|
({ className, size, variant, label, centered, overlay, icon, ...props }, ref) => {
|
|
2750
2755
|
const spinnerContent = /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2751
2756
|
"div",
|
|
@@ -2776,7 +2781,7 @@ var Spinner = React49__namespace.forwardRef(
|
|
|
2776
2781
|
}
|
|
2777
2782
|
);
|
|
2778
2783
|
Spinner.displayName = "Spinner";
|
|
2779
|
-
var DotsSpinner =
|
|
2784
|
+
var DotsSpinner = React50__namespace.forwardRef(
|
|
2780
2785
|
({ className, size = "default", dotCount = 3, ...props }, ref) => {
|
|
2781
2786
|
const dotSizeMap = {
|
|
2782
2787
|
xs: "h-1 w-1",
|
|
@@ -2829,7 +2834,7 @@ var skeletonVariants = classVarianceAuthority.cva(
|
|
|
2829
2834
|
}
|
|
2830
2835
|
}
|
|
2831
2836
|
);
|
|
2832
|
-
var Skeleton =
|
|
2837
|
+
var Skeleton = React50__namespace.forwardRef(
|
|
2833
2838
|
({
|
|
2834
2839
|
className,
|
|
2835
2840
|
variant,
|
|
@@ -2878,7 +2883,7 @@ var Skeleton = React49__namespace.forwardRef(
|
|
|
2878
2883
|
}
|
|
2879
2884
|
);
|
|
2880
2885
|
Skeleton.displayName = "Skeleton";
|
|
2881
|
-
var SkeletonCard =
|
|
2886
|
+
var SkeletonCard = React50__namespace.forwardRef(
|
|
2882
2887
|
({ className, avatar = false, lines = 3, ...props }, ref) => {
|
|
2883
2888
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { ref, className: cn("space-y-4", className), ...props, children: [
|
|
2884
2889
|
avatar && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-3", children: [
|
|
@@ -2918,7 +2923,7 @@ var emptyVariants = classVarianceAuthority.cva(
|
|
|
2918
2923
|
}
|
|
2919
2924
|
}
|
|
2920
2925
|
);
|
|
2921
|
-
var Empty =
|
|
2926
|
+
var Empty = React50__namespace.forwardRef(
|
|
2922
2927
|
({
|
|
2923
2928
|
className,
|
|
2924
2929
|
size,
|
|
@@ -2959,7 +2964,7 @@ var Dialog = DialogPrimitive__namespace.Root;
|
|
|
2959
2964
|
var DialogTrigger = DialogPrimitive__namespace.Trigger;
|
|
2960
2965
|
var DialogPortal = DialogPrimitive__namespace.Portal;
|
|
2961
2966
|
var DialogClose = DialogPrimitive__namespace.Close;
|
|
2962
|
-
var DialogOverlay =
|
|
2967
|
+
var DialogOverlay = React50__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
2963
2968
|
DialogPrimitive__namespace.Overlay,
|
|
2964
2969
|
{
|
|
2965
2970
|
ref,
|
|
@@ -2971,27 +2976,45 @@ var DialogOverlay = React49__namespace.forwardRef(({ className, ...props }, ref)
|
|
|
2971
2976
|
}
|
|
2972
2977
|
));
|
|
2973
2978
|
DialogOverlay.displayName = DialogPrimitive__namespace.Overlay.displayName;
|
|
2974
|
-
var DialogContent =
|
|
2975
|
-
|
|
2976
|
-
|
|
2977
|
-
|
|
2978
|
-
|
|
2979
|
-
|
|
2980
|
-
|
|
2981
|
-
|
|
2982
|
-
|
|
2983
|
-
|
|
2984
|
-
|
|
2985
|
-
|
|
2986
|
-
|
|
2987
|
-
|
|
2988
|
-
|
|
2989
|
-
|
|
2990
|
-
|
|
2991
|
-
|
|
2992
|
-
|
|
2993
|
-
|
|
2994
|
-
|
|
2979
|
+
var DialogContent = React50__namespace.forwardRef(
|
|
2980
|
+
({
|
|
2981
|
+
className,
|
|
2982
|
+
children,
|
|
2983
|
+
showClose = true,
|
|
2984
|
+
closeClassName,
|
|
2985
|
+
customClose,
|
|
2986
|
+
...props
|
|
2987
|
+
}, ref) => /* @__PURE__ */ jsxRuntime.jsxs(DialogPortal, { children: [
|
|
2988
|
+
/* @__PURE__ */ jsxRuntime.jsx(DialogOverlay, {}),
|
|
2989
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
2990
|
+
DialogPrimitive__namespace.Content,
|
|
2991
|
+
{
|
|
2992
|
+
ref,
|
|
2993
|
+
className: cn(
|
|
2994
|
+
"fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border border-mvn-gray-200 bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] rounded-lg",
|
|
2995
|
+
className
|
|
2996
|
+
),
|
|
2997
|
+
...props,
|
|
2998
|
+
children: [
|
|
2999
|
+
children,
|
|
3000
|
+
showClose && (customClose ? customClose : /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3001
|
+
DialogPrimitive__namespace.Close,
|
|
3002
|
+
{
|
|
3003
|
+
className: cn(
|
|
3004
|
+
"absolute right-4 top-4 rounded-sm opacity-70 transition-opacity hover:opacity-100 focus:outline-none disabled:pointer-events-none data-[state=open]:bg-mvn-gray-100",
|
|
3005
|
+
closeClassName
|
|
3006
|
+
),
|
|
3007
|
+
children: [
|
|
3008
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, { className: "h-5 w-5" }),
|
|
3009
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only", children: "Close" })
|
|
3010
|
+
]
|
|
3011
|
+
}
|
|
3012
|
+
))
|
|
3013
|
+
]
|
|
3014
|
+
}
|
|
3015
|
+
)
|
|
3016
|
+
] })
|
|
3017
|
+
);
|
|
2995
3018
|
DialogContent.displayName = DialogPrimitive__namespace.Content.displayName;
|
|
2996
3019
|
var DialogHeader = ({
|
|
2997
3020
|
className,
|
|
@@ -2999,10 +3022,7 @@ var DialogHeader = ({
|
|
|
2999
3022
|
}) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
3000
3023
|
"div",
|
|
3001
3024
|
{
|
|
3002
|
-
className: cn(
|
|
3003
|
-
"flex flex-col space-y-1.5 text-left",
|
|
3004
|
-
className
|
|
3005
|
-
),
|
|
3025
|
+
className: cn("flex flex-col space-y-1.5 text-left", className),
|
|
3006
3026
|
...props
|
|
3007
3027
|
}
|
|
3008
3028
|
);
|
|
@@ -3021,7 +3041,7 @@ var DialogFooter = ({
|
|
|
3021
3041
|
}
|
|
3022
3042
|
);
|
|
3023
3043
|
DialogFooter.displayName = "DialogFooter";
|
|
3024
|
-
var DialogTitle =
|
|
3044
|
+
var DialogTitle = React50__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
3025
3045
|
DialogPrimitive__namespace.Title,
|
|
3026
3046
|
{
|
|
3027
3047
|
ref,
|
|
@@ -3033,7 +3053,7 @@ var DialogTitle = React49__namespace.forwardRef(({ className, ...props }, ref) =
|
|
|
3033
3053
|
}
|
|
3034
3054
|
));
|
|
3035
3055
|
DialogTitle.displayName = DialogPrimitive__namespace.Title.displayName;
|
|
3036
|
-
var DialogDescription =
|
|
3056
|
+
var DialogDescription = React50__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
3037
3057
|
DialogPrimitive__namespace.Description,
|
|
3038
3058
|
{
|
|
3039
3059
|
ref,
|
|
@@ -3048,7 +3068,7 @@ init_utils();
|
|
|
3048
3068
|
var AlertDialog = AlertDialogPrimitive__namespace.Root;
|
|
3049
3069
|
var AlertDialogTrigger = AlertDialogPrimitive__namespace.Trigger;
|
|
3050
3070
|
var AlertDialogPortal = AlertDialogPrimitive__namespace.Portal;
|
|
3051
|
-
var AlertDialogOverlay =
|
|
3071
|
+
var AlertDialogOverlay = React50__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
3052
3072
|
AlertDialogPrimitive__namespace.Overlay,
|
|
3053
3073
|
{
|
|
3054
3074
|
className: cn(
|
|
@@ -3060,7 +3080,7 @@ var AlertDialogOverlay = React49__namespace.forwardRef(({ className, ...props },
|
|
|
3060
3080
|
}
|
|
3061
3081
|
));
|
|
3062
3082
|
AlertDialogOverlay.displayName = AlertDialogPrimitive__namespace.Overlay.displayName;
|
|
3063
|
-
var AlertDialogContent =
|
|
3083
|
+
var AlertDialogContent = React50__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(AlertDialogPortal, { children: [
|
|
3064
3084
|
/* @__PURE__ */ jsxRuntime.jsx(AlertDialogOverlay, {}),
|
|
3065
3085
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3066
3086
|
AlertDialogPrimitive__namespace.Content,
|
|
@@ -3103,7 +3123,7 @@ var AlertDialogFooter = ({
|
|
|
3103
3123
|
}
|
|
3104
3124
|
);
|
|
3105
3125
|
AlertDialogFooter.displayName = "AlertDialogFooter";
|
|
3106
|
-
var AlertDialogTitle =
|
|
3126
|
+
var AlertDialogTitle = React50__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
3107
3127
|
AlertDialogPrimitive__namespace.Title,
|
|
3108
3128
|
{
|
|
3109
3129
|
ref,
|
|
@@ -3112,7 +3132,7 @@ var AlertDialogTitle = React49__namespace.forwardRef(({ className, ...props }, r
|
|
|
3112
3132
|
}
|
|
3113
3133
|
));
|
|
3114
3134
|
AlertDialogTitle.displayName = AlertDialogPrimitive__namespace.Title.displayName;
|
|
3115
|
-
var AlertDialogDescription =
|
|
3135
|
+
var AlertDialogDescription = React50__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
3116
3136
|
AlertDialogPrimitive__namespace.Description,
|
|
3117
3137
|
{
|
|
3118
3138
|
ref,
|
|
@@ -3121,7 +3141,7 @@ var AlertDialogDescription = React49__namespace.forwardRef(({ className, ...prop
|
|
|
3121
3141
|
}
|
|
3122
3142
|
));
|
|
3123
3143
|
AlertDialogDescription.displayName = AlertDialogPrimitive__namespace.Description.displayName;
|
|
3124
|
-
var AlertDialogAction =
|
|
3144
|
+
var AlertDialogAction = React50__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
3125
3145
|
AlertDialogPrimitive__namespace.Action,
|
|
3126
3146
|
{
|
|
3127
3147
|
ref,
|
|
@@ -3130,7 +3150,7 @@ var AlertDialogAction = React49__namespace.forwardRef(({ className, ...props },
|
|
|
3130
3150
|
}
|
|
3131
3151
|
));
|
|
3132
3152
|
AlertDialogAction.displayName = AlertDialogPrimitive__namespace.Action.displayName;
|
|
3133
|
-
var AlertDialogCancel =
|
|
3153
|
+
var AlertDialogCancel = React50__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
3134
3154
|
AlertDialogPrimitive__namespace.Cancel,
|
|
3135
3155
|
{
|
|
3136
3156
|
ref,
|
|
@@ -3150,7 +3170,7 @@ var Sheet = DialogPrimitive__namespace.Root;
|
|
|
3150
3170
|
var SheetTrigger = DialogPrimitive__namespace.Trigger;
|
|
3151
3171
|
var SheetClose = DialogPrimitive__namespace.Close;
|
|
3152
3172
|
var SheetPortal = DialogPrimitive__namespace.Portal;
|
|
3153
|
-
var SheetOverlay =
|
|
3173
|
+
var SheetOverlay = React50__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
3154
3174
|
DialogPrimitive__namespace.Overlay,
|
|
3155
3175
|
{
|
|
3156
3176
|
className: cn(
|
|
@@ -3178,7 +3198,7 @@ var sheetVariants = classVarianceAuthority.cva(
|
|
|
3178
3198
|
}
|
|
3179
3199
|
}
|
|
3180
3200
|
);
|
|
3181
|
-
var SheetContent =
|
|
3201
|
+
var SheetContent = React50__namespace.forwardRef(({ side = "right", className, children, hideClose, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(SheetPortal, { children: [
|
|
3182
3202
|
/* @__PURE__ */ jsxRuntime.jsx(SheetOverlay, {}),
|
|
3183
3203
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
3184
3204
|
DialogPrimitive__namespace.Content,
|
|
@@ -3225,7 +3245,7 @@ var SheetFooter = ({
|
|
|
3225
3245
|
}
|
|
3226
3246
|
);
|
|
3227
3247
|
SheetFooter.displayName = "SheetFooter";
|
|
3228
|
-
var SheetTitle =
|
|
3248
|
+
var SheetTitle = React50__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
3229
3249
|
DialogPrimitive__namespace.Title,
|
|
3230
3250
|
{
|
|
3231
3251
|
ref,
|
|
@@ -3234,7 +3254,7 @@ var SheetTitle = React49__namespace.forwardRef(({ className, ...props }, ref) =>
|
|
|
3234
3254
|
}
|
|
3235
3255
|
));
|
|
3236
3256
|
SheetTitle.displayName = DialogPrimitive__namespace.Title.displayName;
|
|
3237
|
-
var SheetDescription =
|
|
3257
|
+
var SheetDescription = React50__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
3238
3258
|
DialogPrimitive__namespace.Description,
|
|
3239
3259
|
{
|
|
3240
3260
|
ref,
|
|
@@ -3246,7 +3266,7 @@ SheetDescription.displayName = DialogPrimitive__namespace.Description.displayNam
|
|
|
3246
3266
|
|
|
3247
3267
|
// src/components/ui/drawer/index.tsx
|
|
3248
3268
|
init_utils();
|
|
3249
|
-
var DrawerContext =
|
|
3269
|
+
var DrawerContext = React50__namespace.createContext({
|
|
3250
3270
|
direction: "bottom"
|
|
3251
3271
|
});
|
|
3252
3272
|
var Drawer = ({
|
|
@@ -3265,7 +3285,7 @@ Drawer.displayName = "Drawer";
|
|
|
3265
3285
|
var DrawerTrigger = vaul.Drawer.Trigger;
|
|
3266
3286
|
var DrawerPortal = vaul.Drawer.Portal;
|
|
3267
3287
|
var DrawerClose = vaul.Drawer.Close;
|
|
3268
|
-
var DrawerOverlay =
|
|
3288
|
+
var DrawerOverlay = React50__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
3269
3289
|
vaul.Drawer.Overlay,
|
|
3270
3290
|
{
|
|
3271
3291
|
ref,
|
|
@@ -3274,7 +3294,7 @@ var DrawerOverlay = React49__namespace.forwardRef(({ className, ...props }, ref)
|
|
|
3274
3294
|
}
|
|
3275
3295
|
));
|
|
3276
3296
|
DrawerOverlay.displayName = vaul.Drawer.Overlay.displayName;
|
|
3277
|
-
var DrawerContent =
|
|
3297
|
+
var DrawerContent = React50__namespace.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(DrawerPortal, { children: [
|
|
3278
3298
|
/* @__PURE__ */ jsxRuntime.jsx(DrawerOverlay, {}),
|
|
3279
3299
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
3280
3300
|
vaul.Drawer.Content,
|
|
@@ -3309,7 +3329,7 @@ var DrawerFooter = ({
|
|
|
3309
3329
|
}
|
|
3310
3330
|
);
|
|
3311
3331
|
DrawerFooter.displayName = "DrawerFooter";
|
|
3312
|
-
var DrawerTitle =
|
|
3332
|
+
var DrawerTitle = React50__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
3313
3333
|
vaul.Drawer.Title,
|
|
3314
3334
|
{
|
|
3315
3335
|
ref,
|
|
@@ -3321,7 +3341,7 @@ var DrawerTitle = React49__namespace.forwardRef(({ className, ...props }, ref) =
|
|
|
3321
3341
|
}
|
|
3322
3342
|
));
|
|
3323
3343
|
DrawerTitle.displayName = vaul.Drawer.Title.displayName;
|
|
3324
|
-
var DrawerDescription =
|
|
3344
|
+
var DrawerDescription = React50__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
3325
3345
|
vaul.Drawer.Description,
|
|
3326
3346
|
{
|
|
3327
3347
|
ref,
|
|
@@ -3336,7 +3356,7 @@ init_utils();
|
|
|
3336
3356
|
var Popover = PopoverPrimitive__namespace.Root;
|
|
3337
3357
|
var PopoverTrigger = PopoverPrimitive__namespace.Trigger;
|
|
3338
3358
|
var PopoverAnchor = PopoverPrimitive__namespace.Anchor;
|
|
3339
|
-
var PopoverContent =
|
|
3359
|
+
var PopoverContent = React50__namespace.forwardRef(({ className, align = "center", sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(PopoverPrimitive__namespace.Portal, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
3340
3360
|
PopoverPrimitive__namespace.Content,
|
|
3341
3361
|
{
|
|
3342
3362
|
ref,
|
|
@@ -3356,20 +3376,22 @@ init_utils();
|
|
|
3356
3376
|
var TooltipProvider = TooltipPrimitive__namespace.Provider;
|
|
3357
3377
|
var Tooltip = TooltipPrimitive__namespace.Root;
|
|
3358
3378
|
var TooltipTrigger = TooltipPrimitive__namespace.Trigger;
|
|
3359
|
-
var TooltipContent =
|
|
3379
|
+
var TooltipContent = React50__namespace.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
3360
3380
|
TooltipPrimitive__namespace.Content,
|
|
3361
3381
|
{
|
|
3362
3382
|
ref,
|
|
3363
3383
|
sideOffset,
|
|
3364
3384
|
className: cn(
|
|
3365
|
-
"z-50 overflow-hidden rounded-md bg-mvn-gray-900 px-3 py-1.5 text-xs text-
|
|
3385
|
+
"z-50 overflow-hidden rounded-md bg-mvn-gray-900 px-3 py-1.5 text-xs text-primary-50 animate-in fade-in-0 zoom-in-95",
|
|
3386
|
+
"data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95",
|
|
3387
|
+
"data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
|
|
3366
3388
|
className
|
|
3367
3389
|
),
|
|
3368
3390
|
...props
|
|
3369
3391
|
}
|
|
3370
3392
|
));
|
|
3371
3393
|
TooltipContent.displayName = TooltipPrimitive__namespace.Content.displayName;
|
|
3372
|
-
var SimpleTooltip =
|
|
3394
|
+
var SimpleTooltip = React50__namespace.forwardRef(
|
|
3373
3395
|
({
|
|
3374
3396
|
children,
|
|
3375
3397
|
content,
|
|
@@ -3400,7 +3422,7 @@ init_utils();
|
|
|
3400
3422
|
var HoverCard = HoverCardPrimitive__namespace.Root;
|
|
3401
3423
|
var HoverCardTrigger = HoverCardPrimitive__namespace.Trigger;
|
|
3402
3424
|
var HoverCardArrow = HoverCardPrimitive__namespace.Arrow;
|
|
3403
|
-
var HoverCardContent =
|
|
3425
|
+
var HoverCardContent = React50__namespace.forwardRef(
|
|
3404
3426
|
({
|
|
3405
3427
|
className,
|
|
3406
3428
|
align = "center",
|
|
@@ -3444,7 +3466,7 @@ var DropdownMenuGroup = DropdownMenuPrimitive__namespace.Group;
|
|
|
3444
3466
|
var DropdownMenuPortal = DropdownMenuPrimitive__namespace.Portal;
|
|
3445
3467
|
var DropdownMenuSub = DropdownMenuPrimitive__namespace.Sub;
|
|
3446
3468
|
var DropdownMenuRadioGroup = DropdownMenuPrimitive__namespace.RadioGroup;
|
|
3447
|
-
var DropdownMenuSubTrigger =
|
|
3469
|
+
var DropdownMenuSubTrigger = React50__namespace.forwardRef(({ className, inset, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3448
3470
|
DropdownMenuPrimitive__namespace.SubTrigger,
|
|
3449
3471
|
{
|
|
3450
3472
|
ref,
|
|
@@ -3461,7 +3483,7 @@ var DropdownMenuSubTrigger = React49__namespace.forwardRef(({ className, inset,
|
|
|
3461
3483
|
}
|
|
3462
3484
|
));
|
|
3463
3485
|
DropdownMenuSubTrigger.displayName = DropdownMenuPrimitive__namespace.SubTrigger.displayName;
|
|
3464
|
-
var DropdownMenuSubContent =
|
|
3486
|
+
var DropdownMenuSubContent = React50__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
3465
3487
|
DropdownMenuPrimitive__namespace.SubContent,
|
|
3466
3488
|
{
|
|
3467
3489
|
ref,
|
|
@@ -3473,7 +3495,7 @@ var DropdownMenuSubContent = React49__namespace.forwardRef(({ className, ...prop
|
|
|
3473
3495
|
}
|
|
3474
3496
|
));
|
|
3475
3497
|
DropdownMenuSubContent.displayName = DropdownMenuPrimitive__namespace.SubContent.displayName;
|
|
3476
|
-
var DropdownMenuContent =
|
|
3498
|
+
var DropdownMenuContent = React50__namespace.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuPrimitive__namespace.Portal, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
3477
3499
|
DropdownMenuPrimitive__namespace.Content,
|
|
3478
3500
|
{
|
|
3479
3501
|
ref,
|
|
@@ -3486,7 +3508,7 @@ var DropdownMenuContent = React49__namespace.forwardRef(({ className, sideOffset
|
|
|
3486
3508
|
}
|
|
3487
3509
|
) }));
|
|
3488
3510
|
DropdownMenuContent.displayName = DropdownMenuPrimitive__namespace.Content.displayName;
|
|
3489
|
-
var DropdownMenuItem =
|
|
3511
|
+
var DropdownMenuItem = React50__namespace.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
3490
3512
|
DropdownMenuPrimitive__namespace.Item,
|
|
3491
3513
|
{
|
|
3492
3514
|
ref,
|
|
@@ -3499,7 +3521,7 @@ var DropdownMenuItem = React49__namespace.forwardRef(({ className, inset, ...pro
|
|
|
3499
3521
|
}
|
|
3500
3522
|
));
|
|
3501
3523
|
DropdownMenuItem.displayName = DropdownMenuPrimitive__namespace.Item.displayName;
|
|
3502
|
-
var DropdownMenuCheckboxItem =
|
|
3524
|
+
var DropdownMenuCheckboxItem = React50__namespace.forwardRef(({ className, children, checked, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3503
3525
|
DropdownMenuPrimitive__namespace.CheckboxItem,
|
|
3504
3526
|
{
|
|
3505
3527
|
ref,
|
|
@@ -3516,7 +3538,7 @@ var DropdownMenuCheckboxItem = React49__namespace.forwardRef(({ className, child
|
|
|
3516
3538
|
}
|
|
3517
3539
|
));
|
|
3518
3540
|
DropdownMenuCheckboxItem.displayName = DropdownMenuPrimitive__namespace.CheckboxItem.displayName;
|
|
3519
|
-
var DropdownMenuRadioItem =
|
|
3541
|
+
var DropdownMenuRadioItem = React50__namespace.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3520
3542
|
DropdownMenuPrimitive__namespace.RadioItem,
|
|
3521
3543
|
{
|
|
3522
3544
|
ref,
|
|
@@ -3532,7 +3554,7 @@ var DropdownMenuRadioItem = React49__namespace.forwardRef(({ className, children
|
|
|
3532
3554
|
}
|
|
3533
3555
|
));
|
|
3534
3556
|
DropdownMenuRadioItem.displayName = DropdownMenuPrimitive__namespace.RadioItem.displayName;
|
|
3535
|
-
var DropdownMenuLabel =
|
|
3557
|
+
var DropdownMenuLabel = React50__namespace.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
3536
3558
|
DropdownMenuPrimitive__namespace.Label,
|
|
3537
3559
|
{
|
|
3538
3560
|
ref,
|
|
@@ -3545,7 +3567,7 @@ var DropdownMenuLabel = React49__namespace.forwardRef(({ className, inset, ...pr
|
|
|
3545
3567
|
}
|
|
3546
3568
|
));
|
|
3547
3569
|
DropdownMenuLabel.displayName = DropdownMenuPrimitive__namespace.Label.displayName;
|
|
3548
|
-
var DropdownMenuSeparator =
|
|
3570
|
+
var DropdownMenuSeparator = React50__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
3549
3571
|
DropdownMenuPrimitive__namespace.Separator,
|
|
3550
3572
|
{
|
|
3551
3573
|
ref,
|
|
@@ -3576,7 +3598,7 @@ var ContextMenuGroup = ContextMenuPrimitive__namespace.Group;
|
|
|
3576
3598
|
var ContextMenuPortal = ContextMenuPrimitive__namespace.Portal;
|
|
3577
3599
|
var ContextMenuSub = ContextMenuPrimitive__namespace.Sub;
|
|
3578
3600
|
var ContextMenuRadioGroup = ContextMenuPrimitive__namespace.RadioGroup;
|
|
3579
|
-
var ContextMenuSubTrigger =
|
|
3601
|
+
var ContextMenuSubTrigger = React50__namespace.forwardRef(({ className, inset, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3580
3602
|
ContextMenuPrimitive__namespace.SubTrigger,
|
|
3581
3603
|
{
|
|
3582
3604
|
ref,
|
|
@@ -3593,7 +3615,7 @@ var ContextMenuSubTrigger = React49__namespace.forwardRef(({ className, inset, c
|
|
|
3593
3615
|
}
|
|
3594
3616
|
));
|
|
3595
3617
|
ContextMenuSubTrigger.displayName = ContextMenuPrimitive__namespace.SubTrigger.displayName;
|
|
3596
|
-
var ContextMenuSubContent =
|
|
3618
|
+
var ContextMenuSubContent = React50__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
3597
3619
|
ContextMenuPrimitive__namespace.SubContent,
|
|
3598
3620
|
{
|
|
3599
3621
|
ref,
|
|
@@ -3605,7 +3627,7 @@ var ContextMenuSubContent = React49__namespace.forwardRef(({ className, ...props
|
|
|
3605
3627
|
}
|
|
3606
3628
|
));
|
|
3607
3629
|
ContextMenuSubContent.displayName = ContextMenuPrimitive__namespace.SubContent.displayName;
|
|
3608
|
-
var ContextMenuContent =
|
|
3630
|
+
var ContextMenuContent = React50__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(ContextMenuPrimitive__namespace.Portal, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
3609
3631
|
ContextMenuPrimitive__namespace.Content,
|
|
3610
3632
|
{
|
|
3611
3633
|
ref,
|
|
@@ -3617,7 +3639,7 @@ var ContextMenuContent = React49__namespace.forwardRef(({ className, ...props },
|
|
|
3617
3639
|
}
|
|
3618
3640
|
) }));
|
|
3619
3641
|
ContextMenuContent.displayName = ContextMenuPrimitive__namespace.Content.displayName;
|
|
3620
|
-
var ContextMenuItem =
|
|
3642
|
+
var ContextMenuItem = React50__namespace.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
3621
3643
|
ContextMenuPrimitive__namespace.Item,
|
|
3622
3644
|
{
|
|
3623
3645
|
ref,
|
|
@@ -3630,7 +3652,7 @@ var ContextMenuItem = React49__namespace.forwardRef(({ className, inset, ...prop
|
|
|
3630
3652
|
}
|
|
3631
3653
|
));
|
|
3632
3654
|
ContextMenuItem.displayName = ContextMenuPrimitive__namespace.Item.displayName;
|
|
3633
|
-
var ContextMenuCheckboxItem =
|
|
3655
|
+
var ContextMenuCheckboxItem = React50__namespace.forwardRef(({ className, children, checked, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3634
3656
|
ContextMenuPrimitive__namespace.CheckboxItem,
|
|
3635
3657
|
{
|
|
3636
3658
|
ref,
|
|
@@ -3647,7 +3669,7 @@ var ContextMenuCheckboxItem = React49__namespace.forwardRef(({ className, childr
|
|
|
3647
3669
|
}
|
|
3648
3670
|
));
|
|
3649
3671
|
ContextMenuCheckboxItem.displayName = ContextMenuPrimitive__namespace.CheckboxItem.displayName;
|
|
3650
|
-
var ContextMenuRadioItem =
|
|
3672
|
+
var ContextMenuRadioItem = React50__namespace.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3651
3673
|
ContextMenuPrimitive__namespace.RadioItem,
|
|
3652
3674
|
{
|
|
3653
3675
|
ref,
|
|
@@ -3663,7 +3685,7 @@ var ContextMenuRadioItem = React49__namespace.forwardRef(({ className, children,
|
|
|
3663
3685
|
}
|
|
3664
3686
|
));
|
|
3665
3687
|
ContextMenuRadioItem.displayName = ContextMenuPrimitive__namespace.RadioItem.displayName;
|
|
3666
|
-
var ContextMenuLabel =
|
|
3688
|
+
var ContextMenuLabel = React50__namespace.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
3667
3689
|
ContextMenuPrimitive__namespace.Label,
|
|
3668
3690
|
{
|
|
3669
3691
|
ref,
|
|
@@ -3676,7 +3698,7 @@ var ContextMenuLabel = React49__namespace.forwardRef(({ className, inset, ...pro
|
|
|
3676
3698
|
}
|
|
3677
3699
|
));
|
|
3678
3700
|
ContextMenuLabel.displayName = ContextMenuPrimitive__namespace.Label.displayName;
|
|
3679
|
-
var ContextMenuSeparator =
|
|
3701
|
+
var ContextMenuSeparator = React50__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
3680
3702
|
ContextMenuPrimitive__namespace.Separator,
|
|
3681
3703
|
{
|
|
3682
3704
|
ref,
|
|
@@ -3709,7 +3731,7 @@ var MenubarGroup = MenubarPrimitive__namespace.Group;
|
|
|
3709
3731
|
var MenubarPortal = MenubarPrimitive__namespace.Portal;
|
|
3710
3732
|
var MenubarSub = MenubarPrimitive__namespace.Sub;
|
|
3711
3733
|
var MenubarRadioGroup = MenubarPrimitive__namespace.RadioGroup;
|
|
3712
|
-
var Menubar =
|
|
3734
|
+
var Menubar = React50__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
3713
3735
|
MenubarPrimitive__namespace.Root,
|
|
3714
3736
|
{
|
|
3715
3737
|
ref,
|
|
@@ -3721,7 +3743,7 @@ var Menubar = React49__namespace.forwardRef(({ className, ...props }, ref) => /*
|
|
|
3721
3743
|
}
|
|
3722
3744
|
));
|
|
3723
3745
|
Menubar.displayName = MenubarPrimitive__namespace.Root.displayName;
|
|
3724
|
-
var MenubarTrigger =
|
|
3746
|
+
var MenubarTrigger = React50__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
3725
3747
|
MenubarPrimitive__namespace.Trigger,
|
|
3726
3748
|
{
|
|
3727
3749
|
ref,
|
|
@@ -3733,7 +3755,7 @@ var MenubarTrigger = React49__namespace.forwardRef(({ className, ...props }, ref
|
|
|
3733
3755
|
}
|
|
3734
3756
|
));
|
|
3735
3757
|
MenubarTrigger.displayName = MenubarPrimitive__namespace.Trigger.displayName;
|
|
3736
|
-
var MenubarSubTrigger =
|
|
3758
|
+
var MenubarSubTrigger = React50__namespace.forwardRef(({ className, inset, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3737
3759
|
MenubarPrimitive__namespace.SubTrigger,
|
|
3738
3760
|
{
|
|
3739
3761
|
ref,
|
|
@@ -3750,7 +3772,7 @@ var MenubarSubTrigger = React49__namespace.forwardRef(({ className, inset, child
|
|
|
3750
3772
|
}
|
|
3751
3773
|
));
|
|
3752
3774
|
MenubarSubTrigger.displayName = MenubarPrimitive__namespace.SubTrigger.displayName;
|
|
3753
|
-
var MenubarSubContent =
|
|
3775
|
+
var MenubarSubContent = React50__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
3754
3776
|
MenubarPrimitive__namespace.SubContent,
|
|
3755
3777
|
{
|
|
3756
3778
|
ref,
|
|
@@ -3762,7 +3784,7 @@ var MenubarSubContent = React49__namespace.forwardRef(({ className, ...props },
|
|
|
3762
3784
|
}
|
|
3763
3785
|
));
|
|
3764
3786
|
MenubarSubContent.displayName = MenubarPrimitive__namespace.SubContent.displayName;
|
|
3765
|
-
var MenubarContent =
|
|
3787
|
+
var MenubarContent = React50__namespace.forwardRef(
|
|
3766
3788
|
({ className, align = "start", alignOffset = -4, sideOffset = 8, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(MenubarPrimitive__namespace.Portal, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
3767
3789
|
MenubarPrimitive__namespace.Content,
|
|
3768
3790
|
{
|
|
@@ -3779,7 +3801,7 @@ var MenubarContent = React49__namespace.forwardRef(
|
|
|
3779
3801
|
) })
|
|
3780
3802
|
);
|
|
3781
3803
|
MenubarContent.displayName = MenubarPrimitive__namespace.Content.displayName;
|
|
3782
|
-
var MenubarItem =
|
|
3804
|
+
var MenubarItem = React50__namespace.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
3783
3805
|
MenubarPrimitive__namespace.Item,
|
|
3784
3806
|
{
|
|
3785
3807
|
ref,
|
|
@@ -3792,7 +3814,7 @@ var MenubarItem = React49__namespace.forwardRef(({ className, inset, ...props },
|
|
|
3792
3814
|
}
|
|
3793
3815
|
));
|
|
3794
3816
|
MenubarItem.displayName = MenubarPrimitive__namespace.Item.displayName;
|
|
3795
|
-
var MenubarCheckboxItem =
|
|
3817
|
+
var MenubarCheckboxItem = React50__namespace.forwardRef(({ className, children, checked, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3796
3818
|
MenubarPrimitive__namespace.CheckboxItem,
|
|
3797
3819
|
{
|
|
3798
3820
|
ref,
|
|
@@ -3809,7 +3831,7 @@ var MenubarCheckboxItem = React49__namespace.forwardRef(({ className, children,
|
|
|
3809
3831
|
}
|
|
3810
3832
|
));
|
|
3811
3833
|
MenubarCheckboxItem.displayName = MenubarPrimitive__namespace.CheckboxItem.displayName;
|
|
3812
|
-
var MenubarRadioItem =
|
|
3834
|
+
var MenubarRadioItem = React50__namespace.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3813
3835
|
MenubarPrimitive__namespace.RadioItem,
|
|
3814
3836
|
{
|
|
3815
3837
|
ref,
|
|
@@ -3825,7 +3847,7 @@ var MenubarRadioItem = React49__namespace.forwardRef(({ className, children, ...
|
|
|
3825
3847
|
}
|
|
3826
3848
|
));
|
|
3827
3849
|
MenubarRadioItem.displayName = MenubarPrimitive__namespace.RadioItem.displayName;
|
|
3828
|
-
var MenubarLabel =
|
|
3850
|
+
var MenubarLabel = React50__namespace.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
3829
3851
|
MenubarPrimitive__namespace.Label,
|
|
3830
3852
|
{
|
|
3831
3853
|
ref,
|
|
@@ -3838,7 +3860,7 @@ var MenubarLabel = React49__namespace.forwardRef(({ className, inset, ...props }
|
|
|
3838
3860
|
}
|
|
3839
3861
|
));
|
|
3840
3862
|
MenubarLabel.displayName = MenubarPrimitive__namespace.Label.displayName;
|
|
3841
|
-
var MenubarSeparator =
|
|
3863
|
+
var MenubarSeparator = React50__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
3842
3864
|
MenubarPrimitive__namespace.Separator,
|
|
3843
3865
|
{
|
|
3844
3866
|
ref,
|
|
@@ -3866,7 +3888,7 @@ MenubarShortcut.displayName = "MenubarShortcut";
|
|
|
3866
3888
|
|
|
3867
3889
|
// src/components/ui/navigation-menu/index.tsx
|
|
3868
3890
|
init_utils();
|
|
3869
|
-
var NavigationMenu =
|
|
3891
|
+
var NavigationMenu = React50__namespace.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3870
3892
|
NavigationMenuPrimitive__namespace.Root,
|
|
3871
3893
|
{
|
|
3872
3894
|
ref,
|
|
@@ -3882,7 +3904,7 @@ var NavigationMenu = React49__namespace.forwardRef(({ className, children, ...pr
|
|
|
3882
3904
|
}
|
|
3883
3905
|
));
|
|
3884
3906
|
NavigationMenu.displayName = NavigationMenuPrimitive__namespace.Root.displayName;
|
|
3885
|
-
var NavigationMenuList =
|
|
3907
|
+
var NavigationMenuList = React50__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
3886
3908
|
NavigationMenuPrimitive__namespace.List,
|
|
3887
3909
|
{
|
|
3888
3910
|
ref,
|
|
@@ -3898,7 +3920,7 @@ var NavigationMenuItem = NavigationMenuPrimitive__namespace.Item;
|
|
|
3898
3920
|
var navigationMenuTriggerStyle = classVarianceAuthority.cva(
|
|
3899
3921
|
"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"
|
|
3900
3922
|
);
|
|
3901
|
-
var NavigationMenuTrigger =
|
|
3923
|
+
var NavigationMenuTrigger = React50__namespace.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3902
3924
|
NavigationMenuPrimitive__namespace.Trigger,
|
|
3903
3925
|
{
|
|
3904
3926
|
ref,
|
|
@@ -3918,7 +3940,7 @@ var NavigationMenuTrigger = React49__namespace.forwardRef(({ className, children
|
|
|
3918
3940
|
}
|
|
3919
3941
|
));
|
|
3920
3942
|
NavigationMenuTrigger.displayName = NavigationMenuPrimitive__namespace.Trigger.displayName;
|
|
3921
|
-
var NavigationMenuContent =
|
|
3943
|
+
var NavigationMenuContent = React50__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
3922
3944
|
NavigationMenuPrimitive__namespace.Content,
|
|
3923
3945
|
{
|
|
3924
3946
|
ref,
|
|
@@ -3931,7 +3953,7 @@ var NavigationMenuContent = React49__namespace.forwardRef(({ className, ...props
|
|
|
3931
3953
|
));
|
|
3932
3954
|
NavigationMenuContent.displayName = NavigationMenuPrimitive__namespace.Content.displayName;
|
|
3933
3955
|
var NavigationMenuLink = NavigationMenuPrimitive__namespace.Link;
|
|
3934
|
-
var NavigationMenuViewport =
|
|
3956
|
+
var NavigationMenuViewport = React50__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("absolute left-0 top-full flex justify-center"), children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
3935
3957
|
NavigationMenuPrimitive__namespace.Viewport,
|
|
3936
3958
|
{
|
|
3937
3959
|
className: cn(
|
|
@@ -3943,7 +3965,7 @@ var NavigationMenuViewport = React49__namespace.forwardRef(({ className, ...prop
|
|
|
3943
3965
|
}
|
|
3944
3966
|
) }));
|
|
3945
3967
|
NavigationMenuViewport.displayName = NavigationMenuPrimitive__namespace.Viewport.displayName;
|
|
3946
|
-
var NavigationMenuIndicator =
|
|
3968
|
+
var NavigationMenuIndicator = React50__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
3947
3969
|
NavigationMenuPrimitive__namespace.Indicator,
|
|
3948
3970
|
{
|
|
3949
3971
|
ref,
|
|
@@ -3959,7 +3981,7 @@ NavigationMenuIndicator.displayName = NavigationMenuPrimitive__namespace.Indicat
|
|
|
3959
3981
|
|
|
3960
3982
|
// src/components/ui/command/index.tsx
|
|
3961
3983
|
init_utils();
|
|
3962
|
-
var Command =
|
|
3984
|
+
var Command = React50__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
3963
3985
|
cmdk.Command,
|
|
3964
3986
|
{
|
|
3965
3987
|
ref,
|
|
@@ -3974,7 +3996,7 @@ Command.displayName = cmdk.Command.displayName;
|
|
|
3974
3996
|
var CommandDialog = ({ children, ...props }) => {
|
|
3975
3997
|
return /* @__PURE__ */ jsxRuntime.jsx(Dialog, { ...props, children: /* @__PURE__ */ jsxRuntime.jsx(DialogContent, { className: "overflow-hidden p-0", children: /* @__PURE__ */ jsxRuntime.jsx(Command, { className: "[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5", children }) }) });
|
|
3976
3998
|
};
|
|
3977
|
-
var CommandInput =
|
|
3999
|
+
var CommandInput = React50__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center border-b border-mvn-gray-200 px-3", "cmdk-input-wrapper": "", children: [
|
|
3978
4000
|
/* @__PURE__ */ jsxRuntime.jsx(reactIcons.MagnifyingGlassIcon, { className: "mr-2 h-4 w-4 shrink-0 opacity-50" }),
|
|
3979
4001
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3980
4002
|
cmdk.Command.Input,
|
|
@@ -3989,7 +4011,7 @@ var CommandInput = React49__namespace.forwardRef(({ className, ...props }, ref)
|
|
|
3989
4011
|
)
|
|
3990
4012
|
] }));
|
|
3991
4013
|
CommandInput.displayName = cmdk.Command.Input.displayName;
|
|
3992
|
-
var CommandList =
|
|
4014
|
+
var CommandList = React50__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
3993
4015
|
cmdk.Command.List,
|
|
3994
4016
|
{
|
|
3995
4017
|
ref,
|
|
@@ -3998,7 +4020,7 @@ var CommandList = React49__namespace.forwardRef(({ className, ...props }, ref) =
|
|
|
3998
4020
|
}
|
|
3999
4021
|
));
|
|
4000
4022
|
CommandList.displayName = cmdk.Command.List.displayName;
|
|
4001
|
-
var CommandEmpty =
|
|
4023
|
+
var CommandEmpty = React50__namespace.forwardRef((props, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
4002
4024
|
cmdk.Command.Empty,
|
|
4003
4025
|
{
|
|
4004
4026
|
ref,
|
|
@@ -4007,7 +4029,7 @@ var CommandEmpty = React49__namespace.forwardRef((props, ref) => /* @__PURE__ */
|
|
|
4007
4029
|
}
|
|
4008
4030
|
));
|
|
4009
4031
|
CommandEmpty.displayName = cmdk.Command.Empty.displayName;
|
|
4010
|
-
var CommandGroup =
|
|
4032
|
+
var CommandGroup = React50__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
4011
4033
|
cmdk.Command.Group,
|
|
4012
4034
|
{
|
|
4013
4035
|
ref,
|
|
@@ -4019,7 +4041,7 @@ var CommandGroup = React49__namespace.forwardRef(({ className, ...props }, ref)
|
|
|
4019
4041
|
}
|
|
4020
4042
|
));
|
|
4021
4043
|
CommandGroup.displayName = cmdk.Command.Group.displayName;
|
|
4022
|
-
var CommandSeparator =
|
|
4044
|
+
var CommandSeparator = React50__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
4023
4045
|
cmdk.Command.Separator,
|
|
4024
4046
|
{
|
|
4025
4047
|
ref,
|
|
@@ -4028,7 +4050,7 @@ var CommandSeparator = React49__namespace.forwardRef(({ className, ...props }, r
|
|
|
4028
4050
|
}
|
|
4029
4051
|
));
|
|
4030
4052
|
CommandSeparator.displayName = cmdk.Command.Separator.displayName;
|
|
4031
|
-
var CommandItem =
|
|
4053
|
+
var CommandItem = React50__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
4032
4054
|
cmdk.Command.Item,
|
|
4033
4055
|
{
|
|
4034
4056
|
ref,
|
|
@@ -4059,7 +4081,7 @@ CommandShortcut.displayName = "CommandShortcut";
|
|
|
4059
4081
|
|
|
4060
4082
|
// src/components/ui/combobox/index.tsx
|
|
4061
4083
|
init_utils();
|
|
4062
|
-
var Combobox =
|
|
4084
|
+
var Combobox = React50__namespace.forwardRef(
|
|
4063
4085
|
({
|
|
4064
4086
|
options,
|
|
4065
4087
|
value,
|
|
@@ -4071,7 +4093,7 @@ var Combobox = React49__namespace.forwardRef(
|
|
|
4071
4093
|
disabled,
|
|
4072
4094
|
clearable
|
|
4073
4095
|
}, ref) => {
|
|
4074
|
-
const [open, setOpen] =
|
|
4096
|
+
const [open, setOpen] = React50__namespace.useState(false);
|
|
4075
4097
|
const selectedOption = options.find((option) => option.value === value);
|
|
4076
4098
|
const handleClear = (e) => {
|
|
4077
4099
|
e.stopPropagation();
|
|
@@ -4143,9 +4165,9 @@ Combobox.displayName = "Combobox";
|
|
|
4143
4165
|
|
|
4144
4166
|
// src/components/ui/breadcrumb/index.tsx
|
|
4145
4167
|
init_utils();
|
|
4146
|
-
var Breadcrumb =
|
|
4168
|
+
var Breadcrumb = React50__namespace.forwardRef(({ ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("nav", { ref, "aria-label": "breadcrumb", ...props }));
|
|
4147
4169
|
Breadcrumb.displayName = "Breadcrumb";
|
|
4148
|
-
var BreadcrumbList =
|
|
4170
|
+
var BreadcrumbList = React50__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
4149
4171
|
"ol",
|
|
4150
4172
|
{
|
|
4151
4173
|
ref,
|
|
@@ -4157,7 +4179,7 @@ var BreadcrumbList = React49__namespace.forwardRef(({ className, ...props }, ref
|
|
|
4157
4179
|
}
|
|
4158
4180
|
));
|
|
4159
4181
|
BreadcrumbList.displayName = "BreadcrumbList";
|
|
4160
|
-
var BreadcrumbItem =
|
|
4182
|
+
var BreadcrumbItem = React50__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
4161
4183
|
"li",
|
|
4162
4184
|
{
|
|
4163
4185
|
ref,
|
|
@@ -4166,7 +4188,7 @@ var BreadcrumbItem = React49__namespace.forwardRef(({ className, ...props }, ref
|
|
|
4166
4188
|
}
|
|
4167
4189
|
));
|
|
4168
4190
|
BreadcrumbItem.displayName = "BreadcrumbItem";
|
|
4169
|
-
var BreadcrumbLink =
|
|
4191
|
+
var BreadcrumbLink = React50__namespace.forwardRef(({ asChild, className, ...props }, ref) => {
|
|
4170
4192
|
const Comp = "a";
|
|
4171
4193
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
4172
4194
|
Comp,
|
|
@@ -4181,7 +4203,7 @@ var BreadcrumbLink = React49__namespace.forwardRef(({ asChild, className, ...pro
|
|
|
4181
4203
|
);
|
|
4182
4204
|
});
|
|
4183
4205
|
BreadcrumbLink.displayName = "BreadcrumbLink";
|
|
4184
|
-
var BreadcrumbPage =
|
|
4206
|
+
var BreadcrumbPage = React50__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
4185
4207
|
"span",
|
|
4186
4208
|
{
|
|
4187
4209
|
ref,
|
|
@@ -4248,7 +4270,7 @@ var Pagination = ({
|
|
|
4248
4270
|
}
|
|
4249
4271
|
);
|
|
4250
4272
|
Pagination.displayName = "Pagination";
|
|
4251
|
-
var PaginationContent =
|
|
4273
|
+
var PaginationContent = React50__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
4252
4274
|
"ul",
|
|
4253
4275
|
{
|
|
4254
4276
|
ref,
|
|
@@ -4257,7 +4279,7 @@ var PaginationContent = React49__namespace.forwardRef(({ className, ...props },
|
|
|
4257
4279
|
}
|
|
4258
4280
|
));
|
|
4259
4281
|
PaginationContent.displayName = "PaginationContent";
|
|
4260
|
-
var PaginationItem =
|
|
4282
|
+
var PaginationItem = React50__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("li", { ref, className: cn("", className), ...props }));
|
|
4261
4283
|
PaginationItem.displayName = "PaginationItem";
|
|
4262
4284
|
var PaginationLink = ({
|
|
4263
4285
|
className,
|
|
@@ -4364,18 +4386,18 @@ PaginationEllipsis.displayName = "PaginationEllipsis";
|
|
|
4364
4386
|
|
|
4365
4387
|
// src/components/ui/tabs/index.tsx
|
|
4366
4388
|
init_utils();
|
|
4367
|
-
var TabsContext =
|
|
4389
|
+
var TabsContext = React50__namespace.createContext({
|
|
4368
4390
|
destroyInactiveTabs: true
|
|
4369
4391
|
});
|
|
4370
|
-
var Tabs =
|
|
4392
|
+
var Tabs = React50__namespace.forwardRef(({ destroyInactiveTabs = true, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(TabsContext.Provider, { value: { destroyInactiveTabs }, children: /* @__PURE__ */ jsxRuntime.jsx(TabsPrimitive__namespace.Root, { ref, ...props }) }));
|
|
4371
4393
|
Tabs.displayName = TabsPrimitive__namespace.Root.displayName;
|
|
4372
|
-
var TabsList =
|
|
4394
|
+
var TabsList = React50__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
4373
4395
|
TabsPrimitive__namespace.List,
|
|
4374
4396
|
{
|
|
4375
4397
|
ref,
|
|
4376
4398
|
className: cn(
|
|
4377
4399
|
"flex items-stretch gap-0 text-muted-foreground",
|
|
4378
|
-
"data-[orientation=horizontal]:w-full
|
|
4400
|
+
"data-[orientation=horizontal]:w-full",
|
|
4379
4401
|
"data-[orientation=vertical]:w-56 data-[orientation=vertical]:border-r data-[orientation=vertical]:border-border",
|
|
4380
4402
|
"data-[orientation=vertical]:flex-col data-[orientation=vertical]:shrink-0",
|
|
4381
4403
|
className
|
|
@@ -4384,26 +4406,30 @@ var TabsList = React49__namespace.forwardRef(({ className, ...props }, ref) => /
|
|
|
4384
4406
|
}
|
|
4385
4407
|
));
|
|
4386
4408
|
TabsList.displayName = TabsPrimitive__namespace.List.displayName;
|
|
4387
|
-
var TabsTrigger =
|
|
4409
|
+
var TabsTrigger = React50__namespace.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
4388
4410
|
TabsPrimitive__namespace.Trigger,
|
|
4389
4411
|
{
|
|
4390
4412
|
ref,
|
|
4391
4413
|
className: cn(
|
|
4392
|
-
"inline-flex min-w-0 items-center justify-center whitespace-nowrap text-sm
|
|
4414
|
+
"group inline-flex min-w-0 items-center justify-center whitespace-nowrap text-sm",
|
|
4393
4415
|
"transition-all duration-150 text-muted-foreground hover:text-primary",
|
|
4394
4416
|
"ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
|
|
4395
|
-
"data-[orientation=horizontal]:
|
|
4417
|
+
"data-[orientation=horizontal]:px-4 data-[orientation=horizontal]:py-3 data-[orientation=horizontal]:border-b-2 data-[orientation=horizontal]:border-transparent",
|
|
4396
4418
|
"data-[orientation=vertical]:w-full data-[orientation=vertical]:justify-start data-[orientation=vertical]:px-3 data-[orientation=vertical]:py-2 data-[orientation=vertical]:border-l-2 data-[orientation=vertical]:border-border",
|
|
4397
|
-
"data-[state=active]:text-primary data-[state=active]:
|
|
4419
|
+
"data-[state=active]:text-primary data-[state=active]:border-primary",
|
|
4398
4420
|
"disabled:pointer-events-none disabled:opacity-50 disabled:cursor-not-allowed",
|
|
4399
4421
|
className
|
|
4400
4422
|
),
|
|
4401
|
-
...props
|
|
4423
|
+
...props,
|
|
4424
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "relative inline-flex", children: [
|
|
4425
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "invisible font-semibold", "aria-hidden": "true", children }),
|
|
4426
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "absolute inset-0 flex items-center justify-center font-medium group-data-[state=active]:font-semibold", children })
|
|
4427
|
+
] })
|
|
4402
4428
|
}
|
|
4403
4429
|
));
|
|
4404
4430
|
TabsTrigger.displayName = TabsPrimitive__namespace.Trigger.displayName;
|
|
4405
|
-
var TabsContent =
|
|
4406
|
-
const { destroyInactiveTabs } =
|
|
4431
|
+
var TabsContent = React50__namespace.forwardRef(({ className, ...props }, ref) => {
|
|
4432
|
+
const { destroyInactiveTabs } = React50__namespace.useContext(TabsContext);
|
|
4407
4433
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
4408
4434
|
TabsPrimitive__namespace.Content,
|
|
4409
4435
|
{
|
|
@@ -4492,7 +4518,7 @@ var separatorVariants = classVarianceAuthority.cva("shrink-0 bg-line-normal", {
|
|
|
4492
4518
|
variant: "default"
|
|
4493
4519
|
}
|
|
4494
4520
|
});
|
|
4495
|
-
var Separator5 =
|
|
4521
|
+
var Separator5 = React50__namespace.forwardRef(
|
|
4496
4522
|
({
|
|
4497
4523
|
className,
|
|
4498
4524
|
orientation = "horizontal",
|
|
@@ -4549,7 +4575,7 @@ var AspectRatio = AspectRatioPrimitive__namespace.Root;
|
|
|
4549
4575
|
|
|
4550
4576
|
// src/components/ui/accordion/index.tsx
|
|
4551
4577
|
init_utils();
|
|
4552
|
-
var Accordion =
|
|
4578
|
+
var Accordion = React50__namespace.forwardRef(
|
|
4553
4579
|
({
|
|
4554
4580
|
items,
|
|
4555
4581
|
className,
|
|
@@ -4559,7 +4585,7 @@ var Accordion = React49__namespace.forwardRef(
|
|
|
4559
4585
|
renderItem,
|
|
4560
4586
|
...props
|
|
4561
4587
|
}, ref) => {
|
|
4562
|
-
const defaultRenderItem =
|
|
4588
|
+
const defaultRenderItem = React50__namespace.useCallback(
|
|
4563
4589
|
(item) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
4564
4590
|
AccordionPrimitive__namespace.Item,
|
|
4565
4591
|
{
|
|
@@ -4607,7 +4633,7 @@ Accordion.displayName = "Accordion";
|
|
|
4607
4633
|
// src/components/ui/collapsible/index.tsx
|
|
4608
4634
|
init_utils();
|
|
4609
4635
|
var Collapsible = CollapsiblePrimitive__namespace.Root;
|
|
4610
|
-
var CollapsibleItem =
|
|
4636
|
+
var CollapsibleItem = React50__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
4611
4637
|
"div",
|
|
4612
4638
|
{
|
|
4613
4639
|
ref,
|
|
@@ -4619,7 +4645,7 @@ var CollapsibleItem = React49__namespace.forwardRef(({ className, ...props }, re
|
|
|
4619
4645
|
}
|
|
4620
4646
|
));
|
|
4621
4647
|
CollapsibleItem.displayName = "CollapsibleItem";
|
|
4622
|
-
var CollapsibleTrigger =
|
|
4648
|
+
var CollapsibleTrigger = React50__namespace.forwardRef(({ className, children, indicator, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
4623
4649
|
CollapsiblePrimitive__namespace.Trigger,
|
|
4624
4650
|
{
|
|
4625
4651
|
ref,
|
|
@@ -4645,7 +4671,7 @@ var CollapsibleTrigger = React49__namespace.forwardRef(({ className, children, i
|
|
|
4645
4671
|
}
|
|
4646
4672
|
));
|
|
4647
4673
|
CollapsibleTrigger.displayName = CollapsiblePrimitive__namespace.Trigger.displayName;
|
|
4648
|
-
var CollapsibleContent =
|
|
4674
|
+
var CollapsibleContent = React50__namespace.forwardRef(({ className, contentClassName, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
4649
4675
|
CollapsiblePrimitive__namespace.Content,
|
|
4650
4676
|
{
|
|
4651
4677
|
ref,
|
|
@@ -4696,13 +4722,14 @@ var ResizableHandle = ({
|
|
|
4696
4722
|
|
|
4697
4723
|
// src/components/ui/scroll-area/index.tsx
|
|
4698
4724
|
init_utils();
|
|
4699
|
-
var ScrollArea =
|
|
4725
|
+
var ScrollArea = React50__namespace.forwardRef(
|
|
4700
4726
|
({
|
|
4701
4727
|
className,
|
|
4702
4728
|
children,
|
|
4703
4729
|
orientation = "vertical",
|
|
4704
4730
|
scrollbarClassName,
|
|
4705
4731
|
thumbClassName,
|
|
4732
|
+
type = "auto",
|
|
4706
4733
|
...props
|
|
4707
4734
|
}, ref) => {
|
|
4708
4735
|
const showVertical = orientation === "vertical" || orientation === "both";
|
|
@@ -4711,12 +4738,38 @@ var ScrollArea = React49__namespace.forwardRef(
|
|
|
4711
4738
|
ScrollAreaPrimitive__namespace.Root,
|
|
4712
4739
|
{
|
|
4713
4740
|
ref,
|
|
4741
|
+
type,
|
|
4714
4742
|
className: cn("relative overflow-hidden", className),
|
|
4715
4743
|
...props,
|
|
4716
4744
|
children: [
|
|
4717
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4718
|
-
|
|
4719
|
-
|
|
4745
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4746
|
+
ScrollAreaPrimitive__namespace.Viewport,
|
|
4747
|
+
{
|
|
4748
|
+
className: cn(
|
|
4749
|
+
"h-full w-full rounded-[inherit]",
|
|
4750
|
+
// Fix overflow based on orientation to prevent unwanted scrolling
|
|
4751
|
+
orientation === "vertical" && "!overflow-x-hidden",
|
|
4752
|
+
orientation === "horizontal" && "!overflow-y-hidden"
|
|
4753
|
+
),
|
|
4754
|
+
children
|
|
4755
|
+
}
|
|
4756
|
+
),
|
|
4757
|
+
showVertical && /* @__PURE__ */ jsxRuntime.jsx(
|
|
4758
|
+
ScrollBar,
|
|
4759
|
+
{
|
|
4760
|
+
orientation: "vertical",
|
|
4761
|
+
className: scrollbarClassName,
|
|
4762
|
+
thumbClassName
|
|
4763
|
+
}
|
|
4764
|
+
),
|
|
4765
|
+
showHorizontal && /* @__PURE__ */ jsxRuntime.jsx(
|
|
4766
|
+
ScrollBar,
|
|
4767
|
+
{
|
|
4768
|
+
orientation: "horizontal",
|
|
4769
|
+
className: scrollbarClassName,
|
|
4770
|
+
thumbClassName
|
|
4771
|
+
}
|
|
4772
|
+
),
|
|
4720
4773
|
/* @__PURE__ */ jsxRuntime.jsx(ScrollAreaPrimitive__namespace.Corner, {})
|
|
4721
4774
|
]
|
|
4722
4775
|
}
|
|
@@ -4724,7 +4777,7 @@ var ScrollArea = React49__namespace.forwardRef(
|
|
|
4724
4777
|
}
|
|
4725
4778
|
);
|
|
4726
4779
|
ScrollArea.displayName = ScrollAreaPrimitive__namespace.Root.displayName;
|
|
4727
|
-
var ScrollBar =
|
|
4780
|
+
var ScrollBar = React50__namespace.forwardRef(({ className, orientation = "vertical", thumbClassName, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
4728
4781
|
ScrollAreaPrimitive__namespace.ScrollAreaScrollbar,
|
|
4729
4782
|
{
|
|
4730
4783
|
ref,
|
|
@@ -4740,7 +4793,7 @@ var ScrollBar = React49__namespace.forwardRef(({ className, orientation = "verti
|
|
|
4740
4793
|
ScrollAreaPrimitive__namespace.ScrollAreaThumb,
|
|
4741
4794
|
{
|
|
4742
4795
|
className: cn(
|
|
4743
|
-
"relative flex-1 rounded-full bg-
|
|
4796
|
+
"relative flex-1 rounded-full bg-muted-foreground/50 hover:bg-muted-foreground transition-colors",
|
|
4744
4797
|
thumbClassName
|
|
4745
4798
|
)
|
|
4746
4799
|
}
|
|
@@ -4756,9 +4809,9 @@ var SIDEBAR_COOKIE_MAX_AGE = 60 * 60 * 24 * 7;
|
|
|
4756
4809
|
var SIDEBAR_WIDTH = "16rem";
|
|
4757
4810
|
var SIDEBAR_WIDTH_ICON = "3rem";
|
|
4758
4811
|
var SIDEBAR_KEYBOARD_SHORTCUT = "b";
|
|
4759
|
-
var SidebarContext =
|
|
4812
|
+
var SidebarContext = React50__namespace.createContext(null);
|
|
4760
4813
|
function useSidebar() {
|
|
4761
|
-
const context =
|
|
4814
|
+
const context = React50__namespace.useContext(SidebarContext);
|
|
4762
4815
|
if (!context) {
|
|
4763
4816
|
throw new Error("useSidebar must be used within a SidebarProvider.");
|
|
4764
4817
|
}
|
|
@@ -4773,9 +4826,9 @@ function SidebarProvider({
|
|
|
4773
4826
|
children,
|
|
4774
4827
|
...props
|
|
4775
4828
|
}) {
|
|
4776
|
-
const [_open, _setOpen] =
|
|
4829
|
+
const [_open, _setOpen] = React50__namespace.useState(defaultOpen);
|
|
4777
4830
|
const open = openProp ?? _open;
|
|
4778
|
-
const setOpen =
|
|
4831
|
+
const setOpen = React50__namespace.useCallback(
|
|
4779
4832
|
(value) => {
|
|
4780
4833
|
const openState = typeof value === "function" ? value(open) : value;
|
|
4781
4834
|
if (setOpenProp) {
|
|
@@ -4787,10 +4840,10 @@ function SidebarProvider({
|
|
|
4787
4840
|
},
|
|
4788
4841
|
[setOpenProp, open]
|
|
4789
4842
|
);
|
|
4790
|
-
const toggleSidebar =
|
|
4843
|
+
const toggleSidebar = React50__namespace.useCallback(() => {
|
|
4791
4844
|
return setOpen((open2) => !open2);
|
|
4792
4845
|
}, [setOpen]);
|
|
4793
|
-
|
|
4846
|
+
React50__namespace.useEffect(() => {
|
|
4794
4847
|
const handleKeyDown = (event) => {
|
|
4795
4848
|
if (event.key === SIDEBAR_KEYBOARD_SHORTCUT && (event.metaKey || event.ctrlKey)) {
|
|
4796
4849
|
event.preventDefault();
|
|
@@ -4801,7 +4854,7 @@ function SidebarProvider({
|
|
|
4801
4854
|
return () => window.removeEventListener("keydown", handleKeyDown);
|
|
4802
4855
|
}, [toggleSidebar]);
|
|
4803
4856
|
const state = open ? "expanded" : "collapsed";
|
|
4804
|
-
const contextValue =
|
|
4857
|
+
const contextValue = React50__namespace.useMemo(
|
|
4805
4858
|
() => ({
|
|
4806
4859
|
state,
|
|
4807
4860
|
open,
|
|
@@ -5267,7 +5320,7 @@ function SidebarMenuSkeleton({
|
|
|
5267
5320
|
showIcon = false,
|
|
5268
5321
|
...props
|
|
5269
5322
|
}) {
|
|
5270
|
-
const width =
|
|
5323
|
+
const width = React50__namespace.useMemo(() => {
|
|
5271
5324
|
return `${Math.floor(Math.random() * 40) + 50}%`;
|
|
5272
5325
|
}, []);
|
|
5273
5326
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -5386,24 +5439,18 @@ var tableVariants = classVarianceAuthority.cva("w-full caption-bottom text-sm",
|
|
|
5386
5439
|
size: "default"
|
|
5387
5440
|
}
|
|
5388
5441
|
});
|
|
5389
|
-
var Table =
|
|
5390
|
-
"
|
|
5442
|
+
var Table = React50__namespace.forwardRef(({ className, variant, size, wrapperClassName, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("relative w-full overflow-auto", wrapperClassName), children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
5443
|
+
"table",
|
|
5391
5444
|
{
|
|
5392
|
-
|
|
5393
|
-
|
|
5394
|
-
|
|
5395
|
-
{
|
|
5396
|
-
ref,
|
|
5397
|
-
className: cn(tableVariants({ variant, size, className })),
|
|
5398
|
-
...props
|
|
5399
|
-
}
|
|
5400
|
-
)
|
|
5445
|
+
ref,
|
|
5446
|
+
className: cn(tableVariants({ variant, size, className })),
|
|
5447
|
+
...props
|
|
5401
5448
|
}
|
|
5402
|
-
));
|
|
5449
|
+
) }));
|
|
5403
5450
|
Table.displayName = "Table";
|
|
5404
|
-
var TableHeader =
|
|
5451
|
+
var TableHeader = React50__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("thead", { ref, className: cn("[&_tr]:border-b", className), ...props }));
|
|
5405
5452
|
TableHeader.displayName = "TableHeader";
|
|
5406
|
-
var TableBody =
|
|
5453
|
+
var TableBody = React50__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
5407
5454
|
"tbody",
|
|
5408
5455
|
{
|
|
5409
5456
|
ref,
|
|
@@ -5412,7 +5459,7 @@ var TableBody = React49__namespace.forwardRef(({ className, ...props }, ref) =>
|
|
|
5412
5459
|
}
|
|
5413
5460
|
));
|
|
5414
5461
|
TableBody.displayName = "TableBody";
|
|
5415
|
-
var TableFooter =
|
|
5462
|
+
var TableFooter = React50__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
5416
5463
|
"tfoot",
|
|
5417
5464
|
{
|
|
5418
5465
|
ref,
|
|
@@ -5424,7 +5471,7 @@ var TableFooter = React49__namespace.forwardRef(({ className, ...props }, ref) =
|
|
|
5424
5471
|
}
|
|
5425
5472
|
));
|
|
5426
5473
|
TableFooter.displayName = "TableFooter";
|
|
5427
|
-
var TableRow =
|
|
5474
|
+
var TableRow = React50__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
5428
5475
|
"tr",
|
|
5429
5476
|
{
|
|
5430
5477
|
ref,
|
|
@@ -5436,7 +5483,7 @@ var TableRow = React49__namespace.forwardRef(({ className, ...props }, ref) => /
|
|
|
5436
5483
|
}
|
|
5437
5484
|
));
|
|
5438
5485
|
TableRow.displayName = "TableRow";
|
|
5439
|
-
var TableHead =
|
|
5486
|
+
var TableHead = React50__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
5440
5487
|
"th",
|
|
5441
5488
|
{
|
|
5442
5489
|
ref,
|
|
@@ -5448,7 +5495,7 @@ var TableHead = React49__namespace.forwardRef(({ className, ...props }, ref) =>
|
|
|
5448
5495
|
}
|
|
5449
5496
|
));
|
|
5450
5497
|
TableHead.displayName = "TableHead";
|
|
5451
|
-
var TableCell =
|
|
5498
|
+
var TableCell = React50__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
5452
5499
|
"td",
|
|
5453
5500
|
{
|
|
5454
5501
|
ref,
|
|
@@ -5460,7 +5507,7 @@ var TableCell = React49__namespace.forwardRef(({ className, ...props }, ref) =>
|
|
|
5460
5507
|
}
|
|
5461
5508
|
));
|
|
5462
5509
|
TableCell.displayName = "TableCell";
|
|
5463
|
-
var TableCaption =
|
|
5510
|
+
var TableCaption = React50__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
5464
5511
|
"caption",
|
|
5465
5512
|
{
|
|
5466
5513
|
ref,
|
|
@@ -5506,9 +5553,10 @@ var TableBodyComponent = ({
|
|
|
5506
5553
|
rowClassName,
|
|
5507
5554
|
onRowClick,
|
|
5508
5555
|
getRowExpandable,
|
|
5509
|
-
invalidateCache
|
|
5556
|
+
invalidateCache,
|
|
5557
|
+
headers
|
|
5510
5558
|
}) => {
|
|
5511
|
-
const resolveRowClassName =
|
|
5559
|
+
const resolveRowClassName = React50.useCallback(
|
|
5512
5560
|
(record, index) => {
|
|
5513
5561
|
if (!rowClassName) return "";
|
|
5514
5562
|
return typeof rowClassName === "function" ? rowClassName(record, index) : rowClassName;
|
|
@@ -5547,7 +5595,42 @@ var TableBodyComponent = ({
|
|
|
5547
5595
|
}
|
|
5548
5596
|
return reactTable.flexRender(cell.column.columnDef.cell, cell.getContext());
|
|
5549
5597
|
};
|
|
5550
|
-
const
|
|
5598
|
+
const { leftOffsets, rightOffsets, lastLeftId, firstRightId } = React50.useMemo(() => {
|
|
5599
|
+
if (!headers || headers.length === 0) {
|
|
5600
|
+
return {
|
|
5601
|
+
leftOffsets: /* @__PURE__ */ new Map(),
|
|
5602
|
+
rightOffsets: /* @__PURE__ */ new Map(),
|
|
5603
|
+
lastLeftId: null,
|
|
5604
|
+
firstRightId: null
|
|
5605
|
+
};
|
|
5606
|
+
}
|
|
5607
|
+
const leftPinned = headers.filter(
|
|
5608
|
+
(h) => h.column.getIsPinned() === "left"
|
|
5609
|
+
);
|
|
5610
|
+
const rightPinned = headers.filter(
|
|
5611
|
+
(h) => h.column.getIsPinned() === "right"
|
|
5612
|
+
);
|
|
5613
|
+
const leftMap = /* @__PURE__ */ new Map();
|
|
5614
|
+
let leftAcc = 0;
|
|
5615
|
+
for (const h of leftPinned) {
|
|
5616
|
+
leftMap.set(h.column.id, leftAcc);
|
|
5617
|
+
leftAcc += h.getSize();
|
|
5618
|
+
}
|
|
5619
|
+
const rightMap = /* @__PURE__ */ new Map();
|
|
5620
|
+
let rightAcc = 0;
|
|
5621
|
+
for (let i = rightPinned.length - 1; i >= 0; i--) {
|
|
5622
|
+
const h = rightPinned[i];
|
|
5623
|
+
rightMap.set(h.column.id, rightAcc);
|
|
5624
|
+
rightAcc += h.getSize();
|
|
5625
|
+
}
|
|
5626
|
+
return {
|
|
5627
|
+
leftOffsets: leftMap,
|
|
5628
|
+
rightOffsets: rightMap,
|
|
5629
|
+
lastLeftId: leftPinned.length > 0 ? leftPinned[leftPinned.length - 1].column.id : null,
|
|
5630
|
+
firstRightId: rightPinned.length > 0 ? rightPinned[0].column.id : null
|
|
5631
|
+
};
|
|
5632
|
+
}, [headers]);
|
|
5633
|
+
const renderBaseRow = React50.useCallback(
|
|
5551
5634
|
(rowData, options = {}) => {
|
|
5552
5635
|
const { ref, virtualIndex } = options;
|
|
5553
5636
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -5568,6 +5651,25 @@ var TableBodyComponent = ({
|
|
|
5568
5651
|
onClick: () => onRowClick?.(rowData.original, rowData.index),
|
|
5569
5652
|
children: rowData.getVisibleCells().map((cell) => {
|
|
5570
5653
|
const meta = cell.column.columnDef.meta;
|
|
5654
|
+
const pinPosition = cell.column.getIsPinned();
|
|
5655
|
+
const pinnedStyle = meta?.width ? { width: meta.width } : {};
|
|
5656
|
+
if (pinPosition === "left") {
|
|
5657
|
+
const offset = leftOffsets.get(cell.column.id);
|
|
5658
|
+
if (offset !== void 0) {
|
|
5659
|
+
pinnedStyle.position = "sticky";
|
|
5660
|
+
pinnedStyle.left = offset;
|
|
5661
|
+
pinnedStyle.zIndex = 5;
|
|
5662
|
+
}
|
|
5663
|
+
} else if (pinPosition === "right") {
|
|
5664
|
+
const offset = rightOffsets.get(cell.column.id);
|
|
5665
|
+
if (offset !== void 0) {
|
|
5666
|
+
pinnedStyle.position = "sticky";
|
|
5667
|
+
pinnedStyle.right = offset;
|
|
5668
|
+
pinnedStyle.zIndex = 5;
|
|
5669
|
+
}
|
|
5670
|
+
}
|
|
5671
|
+
const isLastLeftPinned = cell.column.id === lastLeftId;
|
|
5672
|
+
const isFirstRightPinned = cell.column.id === firstRightId;
|
|
5571
5673
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
5572
5674
|
TableCell,
|
|
5573
5675
|
{
|
|
@@ -5575,9 +5677,13 @@ var TableBodyComponent = ({
|
|
|
5575
5677
|
meta?.className,
|
|
5576
5678
|
meta?.align === "center" && "text-center",
|
|
5577
5679
|
meta?.align === "right" && "text-right",
|
|
5578
|
-
meta?.align === "left" && "text-left"
|
|
5680
|
+
meta?.align === "left" && "text-left",
|
|
5681
|
+
// Pinned cell styling
|
|
5682
|
+
pinPosition && "bg-background",
|
|
5683
|
+
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",
|
|
5684
|
+
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"
|
|
5579
5685
|
),
|
|
5580
|
-
style:
|
|
5686
|
+
style: Object.keys(pinnedStyle).length > 0 ? pinnedStyle : void 0,
|
|
5581
5687
|
children: onRenderedRow(cell, virtualIndex)
|
|
5582
5688
|
},
|
|
5583
5689
|
cell.id
|
|
@@ -5587,9 +5693,16 @@ var TableBodyComponent = ({
|
|
|
5587
5693
|
`row-${rowData.index}`
|
|
5588
5694
|
);
|
|
5589
5695
|
},
|
|
5590
|
-
[
|
|
5696
|
+
[
|
|
5697
|
+
onRowClick,
|
|
5698
|
+
resolveRowClassName,
|
|
5699
|
+
leftOffsets,
|
|
5700
|
+
rightOffsets,
|
|
5701
|
+
lastLeftId,
|
|
5702
|
+
firstRightId
|
|
5703
|
+
]
|
|
5591
5704
|
);
|
|
5592
|
-
const renderExpandedRow =
|
|
5705
|
+
const renderExpandedRow = React50.useCallback(
|
|
5593
5706
|
(rowData, options = {}) => {
|
|
5594
5707
|
if (!renderExpandedContent) return null;
|
|
5595
5708
|
const { ref, virtualIndex } = options;
|
|
@@ -5670,7 +5783,7 @@ var TableBodyComponent = ({
|
|
|
5670
5783
|
) })
|
|
5671
5784
|
] });
|
|
5672
5785
|
}
|
|
5673
|
-
return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: rows.map((row) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
5786
|
+
return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: rows.map((row) => /* @__PURE__ */ jsxRuntime.jsxs(React50.Fragment, { children: [
|
|
5674
5787
|
renderBaseRow(row),
|
|
5675
5788
|
expandable && renderExpandedRow(row)
|
|
5676
5789
|
] }, row.id)) });
|
|
@@ -5691,9 +5804,8 @@ var pinOptions = [
|
|
|
5691
5804
|
{ value: "right", label: "Pin Right" }
|
|
5692
5805
|
];
|
|
5693
5806
|
var sizingOptions = [
|
|
5694
|
-
{ value: "single", label: "
|
|
5695
|
-
{ value: "all", label: "
|
|
5696
|
-
{ value: "reset", label: "Reset All Columns" }
|
|
5807
|
+
{ value: "reset-single", label: "Reset This Column" },
|
|
5808
|
+
{ value: "reset-all", label: "Reset All Columns" }
|
|
5697
5809
|
];
|
|
5698
5810
|
var sortOptions = [
|
|
5699
5811
|
{ value: "asc", label: "Sort Ascending" },
|
|
@@ -5704,7 +5816,11 @@ var TableHeaderComponent = ({
|
|
|
5704
5816
|
enableColumnOrdering,
|
|
5705
5817
|
baseColumnOrder,
|
|
5706
5818
|
setColumnOrder,
|
|
5707
|
-
draggedColumnId
|
|
5819
|
+
draggedColumnId,
|
|
5820
|
+
pinnedLeftOffset,
|
|
5821
|
+
pinnedRightOffset,
|
|
5822
|
+
isLastLeftPinned,
|
|
5823
|
+
isFirstRightPinned
|
|
5708
5824
|
}) => {
|
|
5709
5825
|
const column = header.column;
|
|
5710
5826
|
const meta = column.columnDef.meta;
|
|
@@ -5736,25 +5852,25 @@ var TableHeaderComponent = ({
|
|
|
5736
5852
|
return next;
|
|
5737
5853
|
});
|
|
5738
5854
|
};
|
|
5739
|
-
const [inputValue, setInputValue] =
|
|
5740
|
-
const debounceTimeoutRef =
|
|
5741
|
-
|
|
5855
|
+
const [inputValue, setInputValue] = React50.useState(value);
|
|
5856
|
+
const debounceTimeoutRef = React50.useRef(null);
|
|
5857
|
+
React50.useEffect(() => {
|
|
5742
5858
|
setInputValue(value);
|
|
5743
5859
|
}, [value]);
|
|
5744
|
-
|
|
5860
|
+
React50.useEffect(() => {
|
|
5745
5861
|
return () => {
|
|
5746
5862
|
if (debounceTimeoutRef.current !== null) {
|
|
5747
5863
|
window.clearTimeout(debounceTimeoutRef.current);
|
|
5748
5864
|
}
|
|
5749
5865
|
};
|
|
5750
5866
|
}, []);
|
|
5751
|
-
const handleFilterChange =
|
|
5867
|
+
const handleFilterChange = React50.useCallback(
|
|
5752
5868
|
(type, nextValue) => {
|
|
5753
5869
|
column.setFilterValue({ filterType: type, value: nextValue });
|
|
5754
5870
|
},
|
|
5755
5871
|
[column]
|
|
5756
5872
|
);
|
|
5757
|
-
const debouncedFilterChange =
|
|
5873
|
+
const debouncedFilterChange = React50.useCallback(
|
|
5758
5874
|
(type, nextValue) => {
|
|
5759
5875
|
if (debounceTimeoutRef.current !== null) {
|
|
5760
5876
|
window.clearTimeout(debounceTimeoutRef.current);
|
|
@@ -5766,7 +5882,7 @@ var TableHeaderComponent = ({
|
|
|
5766
5882
|
},
|
|
5767
5883
|
[handleFilterChange]
|
|
5768
5884
|
);
|
|
5769
|
-
const handleInputChange =
|
|
5885
|
+
const handleInputChange = React50.useCallback(
|
|
5770
5886
|
(event) => {
|
|
5771
5887
|
const nextValue = event.target.value;
|
|
5772
5888
|
setInputValue(nextValue);
|
|
@@ -5775,7 +5891,17 @@ var TableHeaderComponent = ({
|
|
|
5775
5891
|
[debouncedFilterChange, filterType]
|
|
5776
5892
|
);
|
|
5777
5893
|
const showPopover = column.getCanSort() || column.getCanPin() || column.getCanFilter() || column.getCanResize();
|
|
5778
|
-
|
|
5894
|
+
const pinnedStyle = meta?.width ? { width: meta.width } : {};
|
|
5895
|
+
if (pinPosition === "left" && pinnedLeftOffset !== void 0) {
|
|
5896
|
+
pinnedStyle.position = "sticky";
|
|
5897
|
+
pinnedStyle.left = pinnedLeftOffset;
|
|
5898
|
+
pinnedStyle.zIndex = 20;
|
|
5899
|
+
} else if (pinPosition === "right" && pinnedRightOffset !== void 0) {
|
|
5900
|
+
pinnedStyle.position = "sticky";
|
|
5901
|
+
pinnedStyle.right = pinnedRightOffset;
|
|
5902
|
+
pinnedStyle.zIndex = 20;
|
|
5903
|
+
}
|
|
5904
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
5779
5905
|
TableHead,
|
|
5780
5906
|
{
|
|
5781
5907
|
className: cn(
|
|
@@ -5784,157 +5910,212 @@ var TableHeaderComponent = ({
|
|
|
5784
5910
|
meta?.align === "right" && "text-right",
|
|
5785
5911
|
meta?.align === "left" && "text-left",
|
|
5786
5912
|
column.getCanSort() && "select-none",
|
|
5787
|
-
"bg-mvn-gray-100 text-foreground sticky top-0 z-10"
|
|
5913
|
+
"bg-mvn-gray-100 text-foreground sticky top-0 z-10",
|
|
5914
|
+
// Pinned column styling
|
|
5915
|
+
pinPosition && "bg-background",
|
|
5916
|
+
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",
|
|
5917
|
+
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"
|
|
5788
5918
|
),
|
|
5789
|
-
style:
|
|
5790
|
-
children:
|
|
5791
|
-
|
|
5792
|
-
|
|
5793
|
-
|
|
5794
|
-
|
|
5795
|
-
|
|
5796
|
-
|
|
5797
|
-
|
|
5798
|
-
|
|
5799
|
-
|
|
5800
|
-
|
|
5801
|
-
|
|
5802
|
-
|
|
5803
|
-
|
|
5804
|
-
|
|
5805
|
-
|
|
5806
|
-
|
|
5807
|
-
|
|
5808
|
-
|
|
5809
|
-
|
|
5810
|
-
|
|
5811
|
-
|
|
5812
|
-
|
|
5813
|
-
|
|
5814
|
-
|
|
5815
|
-
|
|
5816
|
-
|
|
5817
|
-
|
|
5818
|
-
|
|
5819
|
-
|
|
5820
|
-
|
|
5821
|
-
|
|
5822
|
-
|
|
5823
|
-
|
|
5824
|
-
"
|
|
5825
|
-
|
|
5826
|
-
|
|
5827
|
-
|
|
5828
|
-
|
|
5829
|
-
|
|
5830
|
-
|
|
5831
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
5832
|
-
|
|
5833
|
-
|
|
5834
|
-
|
|
5835
|
-
|
|
5836
|
-
|
|
5837
|
-
|
|
5838
|
-
|
|
5839
|
-
{
|
|
5840
|
-
value: option.value,
|
|
5841
|
-
onSelect: () => {
|
|
5842
|
-
},
|
|
5843
|
-
children: option.label
|
|
5844
|
-
},
|
|
5845
|
-
option.value
|
|
5846
|
-
)) }) }) }) }),
|
|
5847
|
-
column.getCanSort() && /* @__PURE__ */ jsxRuntime.jsx(TabsContent, { value: "sort", children: /* @__PURE__ */ jsxRuntime.jsx(Command, { className: "h-auto", children: /* @__PURE__ */ jsxRuntime.jsx(CommandList, { children: /* @__PURE__ */ jsxRuntime.jsx(CommandGroup, { children: sortOptions.map((option) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
5848
|
-
CommandItem,
|
|
5849
|
-
{
|
|
5850
|
-
value: option.value,
|
|
5851
|
-
onSelect: () => {
|
|
5852
|
-
if (option.value === sortDirection) {
|
|
5853
|
-
column.clearSorting();
|
|
5854
|
-
return;
|
|
5919
|
+
style: pinnedStyle,
|
|
5920
|
+
children: [
|
|
5921
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
5922
|
+
"div",
|
|
5923
|
+
{
|
|
5924
|
+
className: cn(
|
|
5925
|
+
"flex items-center w-full",
|
|
5926
|
+
meta?.align === "center" && "justify-center",
|
|
5927
|
+
meta?.align === "right" && "justify-end",
|
|
5928
|
+
meta?.align === "left" && "justify-start",
|
|
5929
|
+
column.getCanSort() && "cursor-pointer"
|
|
5930
|
+
),
|
|
5931
|
+
draggable: isReorderTable,
|
|
5932
|
+
onDragStart: (event) => {
|
|
5933
|
+
if (!isReorderTable) return;
|
|
5934
|
+
event.dataTransfer.effectAllowed = "move";
|
|
5935
|
+
draggedColumnId.current = column.id;
|
|
5936
|
+
},
|
|
5937
|
+
onDragEnd: () => {
|
|
5938
|
+
draggedColumnId.current = null;
|
|
5939
|
+
},
|
|
5940
|
+
onDragOver: (event) => {
|
|
5941
|
+
if (!isReorderTable || !draggedColumnId.current || draggedColumnId.current === column.id) {
|
|
5942
|
+
return;
|
|
5943
|
+
}
|
|
5944
|
+
event.preventDefault();
|
|
5945
|
+
event.dataTransfer.dropEffect = "move";
|
|
5946
|
+
},
|
|
5947
|
+
onDrop: (event) => {
|
|
5948
|
+
if (!isReorderTable) return;
|
|
5949
|
+
event.preventDefault();
|
|
5950
|
+
handleColumnDrop(column.id);
|
|
5951
|
+
},
|
|
5952
|
+
children: [
|
|
5953
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex gap-2 text-[16px] font-medium", children: reactTable.flexRender(column.columnDef.header, header.getContext()) }),
|
|
5954
|
+
!column.id.startsWith("_mvn_") && showPopover && /* @__PURE__ */ jsxRuntime.jsx(
|
|
5955
|
+
"span",
|
|
5956
|
+
{
|
|
5957
|
+
onClick: (event) => event.stopPropagation(),
|
|
5958
|
+
className: "ml-auto",
|
|
5959
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs(Popover, { children: [
|
|
5960
|
+
/* @__PURE__ */ jsxRuntime.jsx(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.TextAlignJustify, { className: "p-1 h-6 w-6" }) }),
|
|
5961
|
+
/* @__PURE__ */ jsxRuntime.jsx(PopoverContent, { side: "bottom", children: /* @__PURE__ */ jsxRuntime.jsxs(Tabs, { defaultValue: "size", children: [
|
|
5962
|
+
/* @__PURE__ */ jsxRuntime.jsxs(TabsList, { children: [
|
|
5963
|
+
column.getCanResize() && /* @__PURE__ */ jsxRuntime.jsx(
|
|
5964
|
+
TabsTrigger,
|
|
5965
|
+
{
|
|
5966
|
+
value: "size",
|
|
5967
|
+
className: "data-[orientation=horizontal]:p-2",
|
|
5968
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Scaling, { className: "p-1 h-6 w-6" })
|
|
5855
5969
|
}
|
|
5856
|
-
|
|
5857
|
-
|
|
5858
|
-
|
|
5859
|
-
|
|
5860
|
-
|
|
5861
|
-
|
|
5862
|
-
{
|
|
5863
|
-
className: cn(
|
|
5864
|
-
"ml-auto h-4 w-4",
|
|
5865
|
-
sortDirection === option.value ? "opacity-100" : "opacity-0"
|
|
5866
|
-
)
|
|
5867
|
-
}
|
|
5868
|
-
)
|
|
5869
|
-
]
|
|
5870
|
-
},
|
|
5871
|
-
option.value
|
|
5872
|
-
)) }) }) }) }),
|
|
5873
|
-
column.getCanPin() && /* @__PURE__ */ jsxRuntime.jsx(TabsContent, { value: "pin", children: /* @__PURE__ */ jsxRuntime.jsx(Command, { className: "h-auto", children: /* @__PURE__ */ jsxRuntime.jsx(CommandList, { children: /* @__PURE__ */ jsxRuntime.jsx(CommandGroup, { children: pinOptions.map((option) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
5874
|
-
CommandItem,
|
|
5875
|
-
{
|
|
5876
|
-
value: option.value,
|
|
5877
|
-
onSelect: () => {
|
|
5878
|
-
if (option.value === pinPosition) {
|
|
5879
|
-
column.pin(false);
|
|
5880
|
-
return;
|
|
5970
|
+
),
|
|
5971
|
+
column.getCanSort() && /* @__PURE__ */ jsxRuntime.jsx(
|
|
5972
|
+
TabsTrigger,
|
|
5973
|
+
{
|
|
5974
|
+
value: "sort",
|
|
5975
|
+
className: "data-[orientation=horizontal]:p-2",
|
|
5976
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Scaling, { className: "p-1 h-6 w-6" })
|
|
5881
5977
|
}
|
|
5882
|
-
|
|
5883
|
-
|
|
5978
|
+
),
|
|
5979
|
+
column.getCanPin() && /* @__PURE__ */ jsxRuntime.jsx(
|
|
5980
|
+
TabsTrigger,
|
|
5981
|
+
{
|
|
5982
|
+
value: "pin",
|
|
5983
|
+
className: "data-[orientation=horizontal]:p-2",
|
|
5984
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Pin, { className: "p-1 h-6 w-6" })
|
|
5884
5985
|
}
|
|
5885
|
-
|
|
5886
|
-
|
|
5887
|
-
|
|
5888
|
-
|
|
5889
|
-
|
|
5890
|
-
|
|
5891
|
-
|
|
5892
|
-
|
|
5893
|
-
|
|
5894
|
-
|
|
5986
|
+
),
|
|
5987
|
+
column.getCanFilter() && /* @__PURE__ */ jsxRuntime.jsx(
|
|
5988
|
+
TabsTrigger,
|
|
5989
|
+
{
|
|
5990
|
+
value: "filter",
|
|
5991
|
+
className: "data-[orientation=horizontal]:p-2",
|
|
5992
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ListFilter, { className: "p-1 h-6 w-6" })
|
|
5993
|
+
}
|
|
5994
|
+
)
|
|
5995
|
+
] }),
|
|
5996
|
+
column.getCanResize() && /* @__PURE__ */ jsxRuntime.jsx(TabsContent, { value: "size", className: "mt-2", children: /* @__PURE__ */ jsxRuntime.jsx(Command, { className: "h-auto", children: /* @__PURE__ */ jsxRuntime.jsx(CommandList, { children: /* @__PURE__ */ jsxRuntime.jsx(CommandGroup, { children: sizingOptions.map((option) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
5997
|
+
CommandItem,
|
|
5998
|
+
{
|
|
5999
|
+
value: option.value,
|
|
6000
|
+
onSelect: () => {
|
|
6001
|
+
if (option.value === "reset-single") {
|
|
6002
|
+
column.resetSize();
|
|
6003
|
+
} else if (option.value === "reset-all") {
|
|
6004
|
+
header.getContext().table.resetColumnSizing();
|
|
5895
6005
|
}
|
|
5896
|
-
|
|
5897
|
-
|
|
5898
|
-
|
|
5899
|
-
|
|
5900
|
-
|
|
5901
|
-
|
|
5902
|
-
|
|
5903
|
-
Select,
|
|
6006
|
+
},
|
|
6007
|
+
children: option.label
|
|
6008
|
+
},
|
|
6009
|
+
option.value
|
|
6010
|
+
)) }) }) }) }),
|
|
6011
|
+
column.getCanSort() && /* @__PURE__ */ jsxRuntime.jsx(TabsContent, { value: "sort", className: "mt-2", children: /* @__PURE__ */ jsxRuntime.jsx(Command, { className: "h-auto", children: /* @__PURE__ */ jsxRuntime.jsx(CommandList, { children: /* @__PURE__ */ jsxRuntime.jsx(CommandGroup, { children: sortOptions.map((option) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
6012
|
+
CommandItem,
|
|
5904
6013
|
{
|
|
5905
|
-
value:
|
|
5906
|
-
|
|
5907
|
-
if (
|
|
5908
|
-
|
|
5909
|
-
|
|
6014
|
+
value: option.value,
|
|
6015
|
+
onSelect: () => {
|
|
6016
|
+
if (option.value === sortDirection) {
|
|
6017
|
+
column.clearSorting();
|
|
6018
|
+
return;
|
|
5910
6019
|
}
|
|
5911
|
-
|
|
6020
|
+
column.toggleSorting(option.value === "desc");
|
|
5912
6021
|
},
|
|
5913
6022
|
children: [
|
|
5914
|
-
|
|
5915
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6023
|
+
option.label,
|
|
6024
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6025
|
+
lucideReact.CheckIcon,
|
|
6026
|
+
{
|
|
6027
|
+
className: cn(
|
|
6028
|
+
"ml-auto h-4 w-4",
|
|
6029
|
+
sortDirection === option.value ? "opacity-100" : "opacity-0"
|
|
6030
|
+
)
|
|
6031
|
+
}
|
|
6032
|
+
)
|
|
5916
6033
|
]
|
|
5917
|
-
}
|
|
5918
|
-
|
|
5919
|
-
|
|
5920
|
-
|
|
6034
|
+
},
|
|
6035
|
+
option.value
|
|
6036
|
+
)) }) }) }) }),
|
|
6037
|
+
column.getCanPin() && /* @__PURE__ */ jsxRuntime.jsx(TabsContent, { value: "pin", className: "mt-2", children: /* @__PURE__ */ jsxRuntime.jsx(Command, { className: "h-auto", children: /* @__PURE__ */ jsxRuntime.jsx(CommandList, { children: /* @__PURE__ */ jsxRuntime.jsx(CommandGroup, { children: pinOptions.map((option) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
6038
|
+
CommandItem,
|
|
5921
6039
|
{
|
|
5922
|
-
|
|
5923
|
-
|
|
5924
|
-
|
|
5925
|
-
|
|
5926
|
-
|
|
5927
|
-
|
|
5928
|
-
|
|
5929
|
-
|
|
5930
|
-
|
|
5931
|
-
|
|
5932
|
-
|
|
5933
|
-
|
|
5934
|
-
|
|
5935
|
-
|
|
5936
|
-
|
|
5937
|
-
|
|
6040
|
+
value: option.value,
|
|
6041
|
+
onSelect: () => {
|
|
6042
|
+
if (option.value === pinPosition) {
|
|
6043
|
+
column.pin(false);
|
|
6044
|
+
return;
|
|
6045
|
+
}
|
|
6046
|
+
if (option.value === "left" || option.value === "right") {
|
|
6047
|
+
column.pin(option.value);
|
|
6048
|
+
}
|
|
6049
|
+
},
|
|
6050
|
+
children: [
|
|
6051
|
+
option.label,
|
|
6052
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6053
|
+
lucideReact.CheckIcon,
|
|
6054
|
+
{
|
|
6055
|
+
className: cn(
|
|
6056
|
+
"ml-auto h-4 w-4",
|
|
6057
|
+
pinPosition === option.value ? "opacity-100" : "opacity-0"
|
|
6058
|
+
)
|
|
6059
|
+
}
|
|
6060
|
+
)
|
|
6061
|
+
]
|
|
6062
|
+
},
|
|
6063
|
+
option.value
|
|
6064
|
+
)) }) }) }) }),
|
|
6065
|
+
column.getCanFilter() && /* @__PURE__ */ jsxRuntime.jsxs(TabsContent, { value: "filter", className: "mt-2", children: [
|
|
6066
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
6067
|
+
Select,
|
|
6068
|
+
{
|
|
6069
|
+
value: filterType,
|
|
6070
|
+
onValueChange: (selected) => {
|
|
6071
|
+
if (debounceTimeoutRef.current !== null) {
|
|
6072
|
+
window.clearTimeout(debounceTimeoutRef.current);
|
|
6073
|
+
debounceTimeoutRef.current = null;
|
|
6074
|
+
}
|
|
6075
|
+
handleFilterChange(selected, inputValue);
|
|
6076
|
+
},
|
|
6077
|
+
children: [
|
|
6078
|
+
/* @__PURE__ */ jsxRuntime.jsx(SelectTrigger, { className: "mb-4", children: /* @__PURE__ */ jsxRuntime.jsx(SelectValue, {}) }),
|
|
6079
|
+
/* @__PURE__ */ jsxRuntime.jsx(SelectContent, { children: TableFilterOptions.map((option) => /* @__PURE__ */ jsxRuntime.jsx(SelectItem, { value: option.value, children: option.label }, option.value)) })
|
|
6080
|
+
]
|
|
6081
|
+
}
|
|
6082
|
+
),
|
|
6083
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6084
|
+
Input,
|
|
6085
|
+
{
|
|
6086
|
+
leftIcon: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.SearchIcon, {}),
|
|
6087
|
+
value: inputValue,
|
|
6088
|
+
onChange: handleInputChange,
|
|
6089
|
+
clearable: true,
|
|
6090
|
+
onClear: () => column.setFilterValue({ filterType, value: "" }),
|
|
6091
|
+
placeholder: meta?.filterPlaceholder ?? "Filter\u2026"
|
|
6092
|
+
}
|
|
6093
|
+
)
|
|
6094
|
+
] })
|
|
6095
|
+
] }) })
|
|
6096
|
+
] })
|
|
6097
|
+
}
|
|
6098
|
+
)
|
|
6099
|
+
]
|
|
6100
|
+
}
|
|
6101
|
+
),
|
|
6102
|
+
column.getCanResize() && /* @__PURE__ */ jsxRuntime.jsx(
|
|
6103
|
+
"div",
|
|
6104
|
+
{
|
|
6105
|
+
onMouseDown: header.getResizeHandler(),
|
|
6106
|
+
onTouchStart: header.getResizeHandler(),
|
|
6107
|
+
onDoubleClick: () => header.column.resetSize(),
|
|
6108
|
+
className: cn(
|
|
6109
|
+
"absolute right-0 top-0 h-full w-1 cursor-col-resize select-none touch-none",
|
|
6110
|
+
"hover:bg-primary/50 active:bg-primary",
|
|
6111
|
+
header.column.getIsResizing() && "bg-primary"
|
|
6112
|
+
),
|
|
6113
|
+
style: {
|
|
6114
|
+
transform: "translateX(50%)"
|
|
6115
|
+
}
|
|
6116
|
+
}
|
|
6117
|
+
)
|
|
6118
|
+
]
|
|
5938
6119
|
},
|
|
5939
6120
|
header.id
|
|
5940
6121
|
);
|
|
@@ -5950,6 +6131,46 @@ var TableToolbarComponent = ({
|
|
|
5950
6131
|
customizeToolbar
|
|
5951
6132
|
}) => {
|
|
5952
6133
|
const toolbarVisible = enableExport || customizeToolbar || enableGlobalFilter;
|
|
6134
|
+
const [inputValue, setInputValue] = React50.useState(globalFilter);
|
|
6135
|
+
const debounceTimeoutRef = React50.useRef(null);
|
|
6136
|
+
React50.useEffect(() => {
|
|
6137
|
+
setInputValue(globalFilter);
|
|
6138
|
+
}, [globalFilter]);
|
|
6139
|
+
React50.useEffect(() => {
|
|
6140
|
+
return () => {
|
|
6141
|
+
if (debounceTimeoutRef.current !== null) {
|
|
6142
|
+
window.clearTimeout(debounceTimeoutRef.current);
|
|
6143
|
+
}
|
|
6144
|
+
};
|
|
6145
|
+
}, []);
|
|
6146
|
+
const debouncedSetGlobalFilter = React50.useCallback(
|
|
6147
|
+
(nextValue) => {
|
|
6148
|
+
if (debounceTimeoutRef.current !== null) {
|
|
6149
|
+
window.clearTimeout(debounceTimeoutRef.current);
|
|
6150
|
+
}
|
|
6151
|
+
debounceTimeoutRef.current = window.setTimeout(() => {
|
|
6152
|
+
setGlobalFilter(nextValue);
|
|
6153
|
+
debounceTimeoutRef.current = null;
|
|
6154
|
+
}, 300);
|
|
6155
|
+
},
|
|
6156
|
+
[setGlobalFilter]
|
|
6157
|
+
);
|
|
6158
|
+
const handleInputChange = React50.useCallback(
|
|
6159
|
+
(event) => {
|
|
6160
|
+
const nextValue = event.target.value;
|
|
6161
|
+
setInputValue(nextValue);
|
|
6162
|
+
debouncedSetGlobalFilter(nextValue);
|
|
6163
|
+
},
|
|
6164
|
+
[debouncedSetGlobalFilter]
|
|
6165
|
+
);
|
|
6166
|
+
const handleClear = React50.useCallback(() => {
|
|
6167
|
+
if (debounceTimeoutRef.current !== null) {
|
|
6168
|
+
window.clearTimeout(debounceTimeoutRef.current);
|
|
6169
|
+
debounceTimeoutRef.current = null;
|
|
6170
|
+
}
|
|
6171
|
+
setInputValue("");
|
|
6172
|
+
setGlobalFilter("");
|
|
6173
|
+
}, [setGlobalFilter]);
|
|
5953
6174
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-2", children: [
|
|
5954
6175
|
toolbarVisible && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
5955
6176
|
enableExport && /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -5967,9 +6188,10 @@ var TableToolbarComponent = ({
|
|
|
5967
6188
|
Input,
|
|
5968
6189
|
{
|
|
5969
6190
|
leftIcon: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.SearchIcon, {}),
|
|
5970
|
-
value:
|
|
5971
|
-
onChange:
|
|
6191
|
+
value: inputValue,
|
|
6192
|
+
onChange: handleInputChange,
|
|
5972
6193
|
clearable: true,
|
|
6194
|
+
onClear: handleClear,
|
|
5973
6195
|
placeholder: globalFilterPlaceholder
|
|
5974
6196
|
}
|
|
5975
6197
|
)
|
|
@@ -6067,37 +6289,40 @@ function useTableCore({
|
|
|
6067
6289
|
manualSorting,
|
|
6068
6290
|
onFilterChange,
|
|
6069
6291
|
getCheckboxProps,
|
|
6070
|
-
selectedRowKey
|
|
6292
|
+
selectedRowKey,
|
|
6293
|
+
defaultColumnPinning,
|
|
6294
|
+
enableColumnResizing = false,
|
|
6295
|
+
columnResizeMode = "onChange"
|
|
6071
6296
|
}) {
|
|
6072
|
-
const [sorting, setSorting] =
|
|
6297
|
+
const [sorting, setSorting] = React50.useState(
|
|
6073
6298
|
sortBy ? [{ id: sortBy, desc: sortDirection === "desc" }] : []
|
|
6074
6299
|
);
|
|
6075
|
-
const [columnFilters, setColumnFilters] =
|
|
6076
|
-
const [globalFilter, setGlobalFilter] =
|
|
6077
|
-
const [rowSelection, setRowSelection] =
|
|
6078
|
-
const [expanded, setExpanded] =
|
|
6079
|
-
const [paginationState, setPaginationState] =
|
|
6300
|
+
const [columnFilters, setColumnFilters] = React50.useState([]);
|
|
6301
|
+
const [globalFilter, setGlobalFilter] = React50.useState("");
|
|
6302
|
+
const [rowSelection, setRowSelection] = React50.useState({});
|
|
6303
|
+
const [expanded, setExpanded] = React50.useState({});
|
|
6304
|
+
const [paginationState, setPaginationState] = React50.useState({
|
|
6080
6305
|
pageIndex: Math.max(currentPage - 1, 0),
|
|
6081
6306
|
pageSize
|
|
6082
6307
|
});
|
|
6083
|
-
const [columnPinning, setColumnPinning] =
|
|
6084
|
-
left: [],
|
|
6085
|
-
right: []
|
|
6308
|
+
const [columnPinning, setColumnPinning] = React50.useState({
|
|
6309
|
+
left: defaultColumnPinning?.left ?? [],
|
|
6310
|
+
right: defaultColumnPinning?.right ?? []
|
|
6086
6311
|
});
|
|
6087
6312
|
const dataLength = data.length;
|
|
6088
|
-
const enableColumnFilters =
|
|
6313
|
+
const enableColumnFilters = React50.useMemo(() => {
|
|
6089
6314
|
return columns.some((column) => column.filterable === true);
|
|
6090
6315
|
}, [columns]);
|
|
6091
|
-
const enableColumnSorter =
|
|
6316
|
+
const enableColumnSorter = React50.useMemo(() => {
|
|
6092
6317
|
return columns.some((column) => column.sortable === true);
|
|
6093
6318
|
}, [columns]);
|
|
6094
|
-
const pinnableColumnIds =
|
|
6319
|
+
const pinnableColumnIds = React50.useMemo(() => {
|
|
6095
6320
|
return columns.filter((column) => column.pinnable === true).map(
|
|
6096
6321
|
(column) => typeof column.key === "string" ? column.key : String(column.key)
|
|
6097
6322
|
);
|
|
6098
6323
|
}, [columns]);
|
|
6099
6324
|
const enableColumnPin = pinnableColumnIds.length > 0;
|
|
6100
|
-
const baseColumnOrder =
|
|
6325
|
+
const baseColumnOrder = React50.useMemo(() => {
|
|
6101
6326
|
const ids = [];
|
|
6102
6327
|
if (showIndex) ids.push("_mvn_index");
|
|
6103
6328
|
if (expandable) ids.push("_mvn_expand");
|
|
@@ -6108,8 +6333,8 @@ function useTableCore({
|
|
|
6108
6333
|
});
|
|
6109
6334
|
return ids;
|
|
6110
6335
|
}, [columns, selectable, expandable, showIndex]);
|
|
6111
|
-
const [columnOrder, setColumnOrder] =
|
|
6112
|
-
|
|
6336
|
+
const [columnOrder, setColumnOrder] = React50.useState(baseColumnOrder);
|
|
6337
|
+
React50.useEffect(() => {
|
|
6113
6338
|
setColumnOrder((previous) => {
|
|
6114
6339
|
if (isEqual__default.default(previous, baseColumnOrder)) {
|
|
6115
6340
|
return previous;
|
|
@@ -6117,7 +6342,7 @@ function useTableCore({
|
|
|
6117
6342
|
return baseColumnOrder;
|
|
6118
6343
|
});
|
|
6119
6344
|
}, [baseColumnOrder]);
|
|
6120
|
-
|
|
6345
|
+
React50.useEffect(() => {
|
|
6121
6346
|
if (!sortBy) {
|
|
6122
6347
|
setSorting([]);
|
|
6123
6348
|
return;
|
|
@@ -6130,7 +6355,7 @@ function useTableCore({
|
|
|
6130
6355
|
return [next];
|
|
6131
6356
|
});
|
|
6132
6357
|
}, [sortBy, sortDirection]);
|
|
6133
|
-
|
|
6358
|
+
React50.useEffect(() => {
|
|
6134
6359
|
if (!enableColumnFilters) return;
|
|
6135
6360
|
if (!columns.some((column) => column.filterable && column?.defaultFilterValue))
|
|
6136
6361
|
return;
|
|
@@ -6147,7 +6372,7 @@ function useTableCore({
|
|
|
6147
6372
|
return next;
|
|
6148
6373
|
});
|
|
6149
6374
|
}, [columns, enableColumnFilters]);
|
|
6150
|
-
const resolveRowId =
|
|
6375
|
+
const resolveRowId = React50.useCallback(
|
|
6151
6376
|
(record, index) => {
|
|
6152
6377
|
if (typeof rowKey === "function") {
|
|
6153
6378
|
return String(rowKey(record, index));
|
|
@@ -6157,7 +6382,7 @@ function useTableCore({
|
|
|
6157
6382
|
},
|
|
6158
6383
|
[rowKey]
|
|
6159
6384
|
);
|
|
6160
|
-
|
|
6385
|
+
React50.useEffect(() => {
|
|
6161
6386
|
const map = {};
|
|
6162
6387
|
selectedRowKey?.forEach((k) => {
|
|
6163
6388
|
map[k] = true;
|
|
@@ -6169,7 +6394,7 @@ function useTableCore({
|
|
|
6169
6394
|
await onFilterChange(filters);
|
|
6170
6395
|
}
|
|
6171
6396
|
};
|
|
6172
|
-
const handleFilteringChange =
|
|
6397
|
+
const handleFilteringChange = React50.useCallback(
|
|
6173
6398
|
(updater) => {
|
|
6174
6399
|
setColumnFilters((previous) => {
|
|
6175
6400
|
const next = typeof updater === "function" ? updater(previous) : updater;
|
|
@@ -6179,7 +6404,7 @@ function useTableCore({
|
|
|
6179
6404
|
},
|
|
6180
6405
|
[enableColumnFilters, onFilterChange, columnFilters]
|
|
6181
6406
|
);
|
|
6182
|
-
const handleSortingChange =
|
|
6407
|
+
const handleSortingChange = React50.useCallback(
|
|
6183
6408
|
(updater) => {
|
|
6184
6409
|
setSorting((previous) => {
|
|
6185
6410
|
const next = typeof updater === "function" ? updater(previous) : updater;
|
|
@@ -6196,7 +6421,7 @@ function useTableCore({
|
|
|
6196
6421
|
},
|
|
6197
6422
|
[onSortChange]
|
|
6198
6423
|
);
|
|
6199
|
-
const columnDefs =
|
|
6424
|
+
const columnDefs = React50.useMemo(() => {
|
|
6200
6425
|
const defs = columns.map((column) => {
|
|
6201
6426
|
const key = typeof column.key === "string" ? column.key : String(column.key);
|
|
6202
6427
|
return {
|
|
@@ -6300,7 +6525,7 @@ function useTableCore({
|
|
|
6300
6525
|
expandable,
|
|
6301
6526
|
showIndex
|
|
6302
6527
|
]);
|
|
6303
|
-
|
|
6528
|
+
React50.useEffect(() => {
|
|
6304
6529
|
if (!pagination) return;
|
|
6305
6530
|
setPaginationState((previous) => {
|
|
6306
6531
|
const newPageIndex = Math.max(currentPage - 1, 0);
|
|
@@ -6314,7 +6539,7 @@ function useTableCore({
|
|
|
6314
6539
|
return next;
|
|
6315
6540
|
});
|
|
6316
6541
|
}, [pagination, currentPage, pageSize]);
|
|
6317
|
-
const handlePaginationChange =
|
|
6542
|
+
const handlePaginationChange = React50.useCallback(
|
|
6318
6543
|
(updater) => {
|
|
6319
6544
|
if (!pagination) return;
|
|
6320
6545
|
setPaginationState((previous) => {
|
|
@@ -6330,7 +6555,7 @@ function useTableCore({
|
|
|
6330
6555
|
},
|
|
6331
6556
|
[pagination, onPageChange]
|
|
6332
6557
|
);
|
|
6333
|
-
const tablePaginationState =
|
|
6558
|
+
const tablePaginationState = React50.useMemo(() => {
|
|
6334
6559
|
if (!pagination) {
|
|
6335
6560
|
const fallbackSize = dataLength || paginationState.pageSize || 1;
|
|
6336
6561
|
return { pageIndex: 0, pageSize: fallbackSize };
|
|
@@ -6342,6 +6567,8 @@ function useTableCore({
|
|
|
6342
6567
|
columns: columnDefs,
|
|
6343
6568
|
manualFiltering,
|
|
6344
6569
|
manualSorting,
|
|
6570
|
+
enableColumnResizing,
|
|
6571
|
+
columnResizeMode,
|
|
6345
6572
|
state: {
|
|
6346
6573
|
sorting,
|
|
6347
6574
|
columnFilters,
|
|
@@ -6371,11 +6598,11 @@ function useTableCore({
|
|
|
6371
6598
|
getRowId: (originalRow, index) => resolveRowId(originalRow, index),
|
|
6372
6599
|
getRowCanExpand: expandable ? (row) => getRowCanExpand ? getRowCanExpand(row.original) : !!renderExpandedContent : void 0
|
|
6373
6600
|
});
|
|
6374
|
-
const pageCount =
|
|
6601
|
+
const pageCount = React50.useMemo(
|
|
6375
6602
|
() => table.getPageCount(),
|
|
6376
6603
|
[table, sorting, columnFilters]
|
|
6377
6604
|
);
|
|
6378
|
-
|
|
6605
|
+
React50.useEffect(() => {
|
|
6379
6606
|
if (!enableColumnPin) {
|
|
6380
6607
|
setColumnPinning({ left: [], right: [] });
|
|
6381
6608
|
return;
|
|
@@ -6393,7 +6620,7 @@ function useTableCore({
|
|
|
6393
6620
|
return next;
|
|
6394
6621
|
});
|
|
6395
6622
|
}, [enableColumnPin, pinnableColumnIds]);
|
|
6396
|
-
|
|
6623
|
+
React50.useEffect(() => {
|
|
6397
6624
|
if (!pagination) return;
|
|
6398
6625
|
setPaginationState((previous) => {
|
|
6399
6626
|
const lastPage = Math.max(pageCount - 1, 0);
|
|
@@ -6403,11 +6630,11 @@ function useTableCore({
|
|
|
6403
6630
|
return previous;
|
|
6404
6631
|
});
|
|
6405
6632
|
}, [pagination, pageCount]);
|
|
6406
|
-
const shouldShowPagination =
|
|
6633
|
+
const shouldShowPagination = React50.useCallback(
|
|
6407
6634
|
() => pagination && pageCount > 1,
|
|
6408
6635
|
[pagination, pageCount]
|
|
6409
6636
|
);
|
|
6410
|
-
const pageNumbers =
|
|
6637
|
+
const pageNumbers = React50.useMemo(() => {
|
|
6411
6638
|
if (!pagination || pageCount <= 0) return [];
|
|
6412
6639
|
const windowSize = Math.max(Math.min(numberOfPageButtons, pageCount), 1);
|
|
6413
6640
|
const half = Math.floor(windowSize / 2);
|
|
@@ -6441,7 +6668,7 @@ function useTableVirtualization({
|
|
|
6441
6668
|
overScan,
|
|
6442
6669
|
shouldVirtualize
|
|
6443
6670
|
}) {
|
|
6444
|
-
const virtualRowPointers =
|
|
6671
|
+
const virtualRowPointers = React50.useMemo(() => {
|
|
6445
6672
|
const arr = [];
|
|
6446
6673
|
rows.forEach((row, index) => {
|
|
6447
6674
|
arr.push({
|
|
@@ -6458,12 +6685,14 @@ function useTableVirtualization({
|
|
|
6458
6685
|
});
|
|
6459
6686
|
return arr;
|
|
6460
6687
|
}, [rows, expandable]);
|
|
6461
|
-
const
|
|
6688
|
+
const virtualRowPointersRef = React50.useRef(virtualRowPointers);
|
|
6689
|
+
virtualRowPointersRef.current = virtualRowPointers;
|
|
6690
|
+
const cacheBackingRef = React50.useRef(
|
|
6462
6691
|
/* @__PURE__ */ new Map()
|
|
6463
6692
|
);
|
|
6464
|
-
const heightCacheByIndexRef =
|
|
6465
|
-
const heightCacheByKeyRef =
|
|
6466
|
-
const cacheRef =
|
|
6693
|
+
const heightCacheByIndexRef = React50.useRef(/* @__PURE__ */ new Map());
|
|
6694
|
+
const heightCacheByKeyRef = React50.useRef(/* @__PURE__ */ new Map());
|
|
6695
|
+
const cacheRef = React50.useRef({
|
|
6467
6696
|
get: (index) => cacheBackingRef.current.get(index)?.size,
|
|
6468
6697
|
set: (index, size, key) => {
|
|
6469
6698
|
cacheBackingRef.current.set(index, { size, key });
|
|
@@ -6481,17 +6710,23 @@ function useTableVirtualization({
|
|
|
6481
6710
|
});
|
|
6482
6711
|
}
|
|
6483
6712
|
});
|
|
6484
|
-
const [virtualWindow, setVirtualWindow] =
|
|
6485
|
-
const virtualWindowRef =
|
|
6486
|
-
const rafRef =
|
|
6487
|
-
const debounceTimeoutRef =
|
|
6488
|
-
const measurementQueueRef =
|
|
6489
|
-
const measurementRafRef =
|
|
6490
|
-
const measurementTimeoutRef =
|
|
6713
|
+
const [virtualWindow, setVirtualWindow] = React50.useState(EMPTY_WINDOW);
|
|
6714
|
+
const virtualWindowRef = React50.useRef(EMPTY_WINDOW);
|
|
6715
|
+
const rafRef = React50.useRef(null);
|
|
6716
|
+
const debounceTimeoutRef = React50.useRef(null);
|
|
6717
|
+
const measurementQueueRef = React50.useRef(/* @__PURE__ */ new Map());
|
|
6718
|
+
const measurementRafRef = React50.useRef(null);
|
|
6719
|
+
const measurementTimeoutRef = React50.useRef(
|
|
6491
6720
|
null
|
|
6492
6721
|
);
|
|
6493
|
-
const measurementIdleRef =
|
|
6494
|
-
const
|
|
6722
|
+
const measurementIdleRef = React50.useRef(null);
|
|
6723
|
+
const prefixSumCacheRef = React50.useRef({
|
|
6724
|
+
count: 0,
|
|
6725
|
+
itemSizes: [],
|
|
6726
|
+
offsets: [],
|
|
6727
|
+
totalSize: 0
|
|
6728
|
+
});
|
|
6729
|
+
const cleanupRaf = React50.useCallback(() => {
|
|
6495
6730
|
if (debounceTimeoutRef.current != null) {
|
|
6496
6731
|
clearTimeout(debounceTimeoutRef.current);
|
|
6497
6732
|
debounceTimeoutRef.current = null;
|
|
@@ -6515,10 +6750,16 @@ function useTableVirtualization({
|
|
|
6515
6750
|
measurementIdleRef.current = null;
|
|
6516
6751
|
}
|
|
6517
6752
|
measurementQueueRef.current.clear();
|
|
6753
|
+
prefixSumCacheRef.current = {
|
|
6754
|
+
count: 0,
|
|
6755
|
+
itemSizes: [],
|
|
6756
|
+
offsets: [],
|
|
6757
|
+
totalSize: 0
|
|
6758
|
+
};
|
|
6518
6759
|
}, []);
|
|
6519
|
-
const estimateSize =
|
|
6760
|
+
const estimateSize = React50.useCallback(
|
|
6520
6761
|
(index) => {
|
|
6521
|
-
const item =
|
|
6762
|
+
const item = virtualRowPointersRef.current[index];
|
|
6522
6763
|
if (!item) return baseRowEstimateSize;
|
|
6523
6764
|
const key = item.key;
|
|
6524
6765
|
if (item.kind === "expanded" && !rows[item.rowIndex]?.getIsExpanded()) {
|
|
@@ -6531,25 +6772,27 @@ function useTableVirtualization({
|
|
|
6531
6772
|
if (cached != null) return cached;
|
|
6532
6773
|
return item.kind === "expanded" ? expandContentEstimateSize : baseRowEstimateSize;
|
|
6533
6774
|
},
|
|
6534
|
-
[
|
|
6775
|
+
[baseRowEstimateSize, expandContentEstimateSize]
|
|
6535
6776
|
);
|
|
6536
|
-
const recomputeVirtualWindow =
|
|
6777
|
+
const recomputeVirtualWindow = React50.useCallback(() => {
|
|
6537
6778
|
if (!shouldVirtualize) {
|
|
6538
6779
|
setVirtualWindow(EMPTY_WINDOW);
|
|
6539
6780
|
return;
|
|
6540
6781
|
}
|
|
6782
|
+
const pointers = virtualRowPointersRef.current;
|
|
6541
6783
|
const nextWindow = computeVirtualizedRows({
|
|
6542
|
-
count:
|
|
6784
|
+
count: pointers.length,
|
|
6543
6785
|
getScrollElement: () => tableContainerRef.current,
|
|
6544
6786
|
estimateSize,
|
|
6545
6787
|
overScan,
|
|
6546
6788
|
cache: cacheRef.current,
|
|
6547
6789
|
heightCacheByKey: heightCacheByKeyRef.current,
|
|
6548
|
-
getItemKey: (index) =>
|
|
6790
|
+
getItemKey: (index) => pointers[index]?.key ?? "",
|
|
6791
|
+
prefixSumCache: prefixSumCacheRef.current
|
|
6549
6792
|
});
|
|
6550
6793
|
setVirtualWindow(nextWindow);
|
|
6551
6794
|
}, [estimateSize, overScan]);
|
|
6552
|
-
const scheduleRecompute =
|
|
6795
|
+
const scheduleRecompute = React50.useCallback(() => {
|
|
6553
6796
|
if (!shouldVirtualize) return;
|
|
6554
6797
|
if (debounceTimeoutRef.current != null) {
|
|
6555
6798
|
clearTimeout(debounceTimeoutRef.current);
|
|
@@ -6568,7 +6811,7 @@ function useTableVirtualization({
|
|
|
6568
6811
|
};
|
|
6569
6812
|
debounceTimeoutRef.current = setTimeout(run, SCROLL_RESIZE_DEBOUNCE_MS);
|
|
6570
6813
|
}, [recomputeVirtualWindow]);
|
|
6571
|
-
const flushMeasurementQueue =
|
|
6814
|
+
const flushMeasurementQueue = React50.useCallback(() => {
|
|
6572
6815
|
if (!shouldVirtualize) {
|
|
6573
6816
|
measurementQueueRef.current.clear();
|
|
6574
6817
|
return;
|
|
@@ -6578,7 +6821,7 @@ function useTableVirtualization({
|
|
|
6578
6821
|
const { startIndex, endIndex } = virtualWindowRef.current;
|
|
6579
6822
|
if (index < startIndex || index > endIndex) return;
|
|
6580
6823
|
}
|
|
6581
|
-
const item =
|
|
6824
|
+
const item = virtualRowPointersRef.current[index];
|
|
6582
6825
|
if (!item) return;
|
|
6583
6826
|
if (!Number.isFinite(height)) return;
|
|
6584
6827
|
const size = normalizeVirtualSize(height);
|
|
@@ -6597,7 +6840,7 @@ function useTableVirtualization({
|
|
|
6597
6840
|
measurementQueueRef.current.clear();
|
|
6598
6841
|
scheduleRecompute();
|
|
6599
6842
|
}, [scheduleRecompute]);
|
|
6600
|
-
const scheduleMeasurementFlush =
|
|
6843
|
+
const scheduleMeasurementFlush = React50.useCallback(() => {
|
|
6601
6844
|
if (!shouldVirtualize) {
|
|
6602
6845
|
measurementQueueRef.current.clear();
|
|
6603
6846
|
return;
|
|
@@ -6625,14 +6868,14 @@ function useTableVirtualization({
|
|
|
6625
6868
|
measurementTimeoutRef.current = setTimeout(runFlush, 16);
|
|
6626
6869
|
}
|
|
6627
6870
|
}, [flushMeasurementQueue]);
|
|
6628
|
-
const measureElement =
|
|
6871
|
+
const measureElement = React50.useCallback(
|
|
6629
6872
|
(height, index) => {
|
|
6630
6873
|
if (!height || !shouldVirtualize || index == null) return;
|
|
6631
6874
|
if (shouldVirtualize) {
|
|
6632
6875
|
const { startIndex, endIndex } = virtualWindowRef.current;
|
|
6633
6876
|
if (index < startIndex || index > endIndex) return;
|
|
6634
6877
|
}
|
|
6635
|
-
const item =
|
|
6878
|
+
const item = virtualRowPointersRef.current[index];
|
|
6636
6879
|
const key = item?.key;
|
|
6637
6880
|
if (key != null && heightCacheByKeyRef.current.has(key) || heightCacheByIndexRef.current.has(index)) {
|
|
6638
6881
|
return;
|
|
@@ -6642,7 +6885,7 @@ function useTableVirtualization({
|
|
|
6642
6885
|
},
|
|
6643
6886
|
[scheduleMeasurementFlush]
|
|
6644
6887
|
);
|
|
6645
|
-
|
|
6888
|
+
React50.useEffect(() => {
|
|
6646
6889
|
if (!shouldVirtualize) {
|
|
6647
6890
|
cacheRef.current.clear();
|
|
6648
6891
|
heightCacheByIndexRef.current.clear();
|
|
@@ -6652,7 +6895,7 @@ function useTableVirtualization({
|
|
|
6652
6895
|
return;
|
|
6653
6896
|
}
|
|
6654
6897
|
cacheRef.current.forEach((index, _, key) => {
|
|
6655
|
-
if (index >=
|
|
6898
|
+
if (index >= virtualRowPointersRef.current.length) {
|
|
6656
6899
|
cacheRef.current.remove(index);
|
|
6657
6900
|
heightCacheByIndexRef.current.delete(index);
|
|
6658
6901
|
if (key != null) heightCacheByKeyRef.current.delete(key);
|
|
@@ -6660,7 +6903,7 @@ function useTableVirtualization({
|
|
|
6660
6903
|
});
|
|
6661
6904
|
scheduleRecompute();
|
|
6662
6905
|
}, [scheduleRecompute]);
|
|
6663
|
-
const invalidateCache =
|
|
6906
|
+
const invalidateCache = React50.useCallback(
|
|
6664
6907
|
(index, key) => {
|
|
6665
6908
|
const result = cacheRef.current.invalidateIndex?.(index);
|
|
6666
6909
|
if (!result) return;
|
|
@@ -6671,7 +6914,7 @@ function useTableVirtualization({
|
|
|
6671
6914
|
},
|
|
6672
6915
|
[scheduleRecompute]
|
|
6673
6916
|
);
|
|
6674
|
-
|
|
6917
|
+
React50.useEffect(() => {
|
|
6675
6918
|
if (!shouldVirtualize) return;
|
|
6676
6919
|
const element = tableContainerRef.current;
|
|
6677
6920
|
if (!element) return;
|
|
@@ -6700,11 +6943,11 @@ function useTableVirtualization({
|
|
|
6700
6943
|
if (frameId != null) cancelAnimationFrame(frameId);
|
|
6701
6944
|
};
|
|
6702
6945
|
}, [scheduleRecompute]);
|
|
6703
|
-
|
|
6704
|
-
|
|
6946
|
+
React50.useEffect(() => () => cleanupRaf(), [cleanupRaf]);
|
|
6947
|
+
React50.useEffect(() => {
|
|
6705
6948
|
virtualWindowRef.current = virtualWindow;
|
|
6706
6949
|
}, [virtualWindow]);
|
|
6707
|
-
const virtualItems =
|
|
6950
|
+
const virtualItems = React50.useMemo(() => {
|
|
6708
6951
|
if (!shouldVirtualize) return [];
|
|
6709
6952
|
return virtualWindow.items.map(({ index, offset, size }) => {
|
|
6710
6953
|
const start = offset;
|
|
@@ -6742,7 +6985,8 @@ var computeVirtualizedRows = (config) => {
|
|
|
6742
6985
|
cache,
|
|
6743
6986
|
getItemKey,
|
|
6744
6987
|
getHorizontalScrollElement,
|
|
6745
|
-
heightCacheByKey
|
|
6988
|
+
heightCacheByKey,
|
|
6989
|
+
prefixSumCache
|
|
6746
6990
|
} = config;
|
|
6747
6991
|
if (count <= 0) return EMPTY_WINDOW;
|
|
6748
6992
|
const scrollElement = getScrollElement() ?? null;
|
|
@@ -6756,24 +7000,60 @@ var computeVirtualizedRows = (config) => {
|
|
|
6756
7000
|
Math.max(rawHorizontalScrollOffset, 0),
|
|
6757
7001
|
horizontalTotalSize - horizontalViewportSize
|
|
6758
7002
|
) : Math.max(rawHorizontalScrollOffset, 0);
|
|
6759
|
-
|
|
6760
|
-
|
|
6761
|
-
let totalSize
|
|
6762
|
-
|
|
6763
|
-
|
|
6764
|
-
|
|
6765
|
-
|
|
6766
|
-
|
|
6767
|
-
|
|
6768
|
-
|
|
6769
|
-
|
|
6770
|
-
|
|
6771
|
-
|
|
6772
|
-
|
|
6773
|
-
|
|
7003
|
+
let itemSizes;
|
|
7004
|
+
let offsets;
|
|
7005
|
+
let totalSize;
|
|
7006
|
+
const cachedCount = prefixSumCache?.count ?? 0;
|
|
7007
|
+
if (prefixSumCache && cachedCount > 0 && count >= cachedCount) {
|
|
7008
|
+
itemSizes = prefixSumCache.itemSizes.slice(0, cachedCount);
|
|
7009
|
+
offsets = prefixSumCache.offsets.slice(0, cachedCount);
|
|
7010
|
+
totalSize = prefixSumCache.totalSize;
|
|
7011
|
+
if (count > cachedCount) {
|
|
7012
|
+
itemSizes.length = count;
|
|
7013
|
+
offsets.length = count;
|
|
7014
|
+
for (let index = cachedCount; index < count; index++) {
|
|
7015
|
+
offsets[index] = totalSize;
|
|
7016
|
+
const key = getItemKey(index);
|
|
7017
|
+
let size = cache.get(index);
|
|
7018
|
+
if (size == null && key != null) {
|
|
7019
|
+
size = heightCacheByKey.get(key);
|
|
7020
|
+
}
|
|
7021
|
+
if (size == null) {
|
|
7022
|
+
const estimate = estimateSize(index);
|
|
7023
|
+
size = normalizeVirtualSize(estimate);
|
|
7024
|
+
} else {
|
|
7025
|
+
size = normalizeVirtualSize(size);
|
|
7026
|
+
}
|
|
7027
|
+
itemSizes[index] = size;
|
|
7028
|
+
totalSize += size;
|
|
7029
|
+
}
|
|
7030
|
+
}
|
|
7031
|
+
} else {
|
|
7032
|
+
itemSizes = new Array(count);
|
|
7033
|
+
offsets = new Array(count);
|
|
7034
|
+
totalSize = 0;
|
|
7035
|
+
for (let index = 0; index < count; index++) {
|
|
7036
|
+
offsets[index] = totalSize;
|
|
7037
|
+
const key = getItemKey(index);
|
|
7038
|
+
let size = cache.get(index);
|
|
7039
|
+
if (size == null && key != null) {
|
|
7040
|
+
size = heightCacheByKey.get(key);
|
|
7041
|
+
}
|
|
7042
|
+
if (size == null) {
|
|
7043
|
+
const estimate = estimateSize(index);
|
|
7044
|
+
size = normalizeVirtualSize(estimate);
|
|
7045
|
+
} else {
|
|
7046
|
+
size = normalizeVirtualSize(size);
|
|
7047
|
+
}
|
|
7048
|
+
itemSizes[index] = size;
|
|
7049
|
+
totalSize += size;
|
|
6774
7050
|
}
|
|
6775
|
-
|
|
6776
|
-
|
|
7051
|
+
}
|
|
7052
|
+
if (prefixSumCache) {
|
|
7053
|
+
prefixSumCache.count = count;
|
|
7054
|
+
prefixSumCache.itemSizes = itemSizes;
|
|
7055
|
+
prefixSumCache.offsets = offsets;
|
|
7056
|
+
prefixSumCache.totalSize = totalSize;
|
|
6777
7057
|
}
|
|
6778
7058
|
const viewportActive = clientHeight > 0;
|
|
6779
7059
|
const scrollOffset = viewportActive ? Math.min(scrollTop, Math.max(totalSize - clientHeight, 0)) : 0;
|
|
@@ -6781,19 +7061,28 @@ var computeVirtualizedRows = (config) => {
|
|
|
6781
7061
|
let visibleStartIndex = 0;
|
|
6782
7062
|
let visibleEndIndex = 0;
|
|
6783
7063
|
if (viewportActive && totalSize > 0) {
|
|
6784
|
-
|
|
6785
|
-
|
|
6786
|
-
|
|
6787
|
-
|
|
7064
|
+
let low = 0;
|
|
7065
|
+
let high = count - 1;
|
|
7066
|
+
while (low < high) {
|
|
7067
|
+
const mid = Math.floor((low + high) / 2);
|
|
7068
|
+
if (offsets[mid] + itemSizes[mid] > scrollOffset) {
|
|
7069
|
+
high = mid;
|
|
7070
|
+
} else {
|
|
7071
|
+
low = mid + 1;
|
|
6788
7072
|
}
|
|
6789
7073
|
}
|
|
6790
|
-
|
|
6791
|
-
|
|
6792
|
-
|
|
6793
|
-
|
|
7074
|
+
visibleStartIndex = low;
|
|
7075
|
+
low = visibleStartIndex;
|
|
7076
|
+
high = count - 1;
|
|
7077
|
+
while (low < high) {
|
|
7078
|
+
const mid = Math.ceil((low + high) / 2);
|
|
7079
|
+
if (offsets[mid] >= viewportLimit) {
|
|
7080
|
+
high = mid - 1;
|
|
7081
|
+
} else {
|
|
7082
|
+
low = mid;
|
|
6794
7083
|
}
|
|
6795
|
-
visibleEndIndex = index;
|
|
6796
7084
|
}
|
|
7085
|
+
visibleEndIndex = Math.max(visibleStartIndex, low);
|
|
6797
7086
|
}
|
|
6798
7087
|
const overScanCount = Math.max(0, Math.ceil(overScan));
|
|
6799
7088
|
const startIndex = Math.max(0, visibleStartIndex - overScanCount);
|
|
@@ -6855,7 +7144,7 @@ function SimpleTable({
|
|
|
6855
7144
|
getRowExpandable,
|
|
6856
7145
|
onExpandedChange,
|
|
6857
7146
|
onLazyScrollLoad,
|
|
6858
|
-
scrollLoadThreshold =
|
|
7147
|
+
scrollLoadThreshold = 42,
|
|
6859
7148
|
numberOfPageButtons = 5,
|
|
6860
7149
|
onClickExport,
|
|
6861
7150
|
baseRowEstimateSize = 42,
|
|
@@ -6873,10 +7162,11 @@ function SimpleTable({
|
|
|
6873
7162
|
maxRecords,
|
|
6874
7163
|
loadingText,
|
|
6875
7164
|
pagingPosition = "right",
|
|
6876
|
-
recordPerChunk = 100
|
|
7165
|
+
recordPerChunk = 100,
|
|
7166
|
+
defaultColumnPinning
|
|
6877
7167
|
}) {
|
|
6878
|
-
const [internalLazyLoading, setInternalLazyLoading] =
|
|
6879
|
-
const pendingLazyLoad =
|
|
7168
|
+
const [internalLazyLoading, setInternalLazyLoading] = React50.useState(false);
|
|
7169
|
+
const pendingLazyLoad = React50.useRef(false);
|
|
6880
7170
|
const isControlledLoading = loading !== void 0;
|
|
6881
7171
|
const resolvedLoading = isControlledLoading ? loading : internalLazyLoading;
|
|
6882
7172
|
const showOverlayLoading = resolvedLoading && lazyLoadIndicatorType === "overlay";
|
|
@@ -6916,9 +7206,10 @@ function SimpleTable({
|
|
|
6916
7206
|
numberOfPageButtons,
|
|
6917
7207
|
manualSorting,
|
|
6918
7208
|
manualFiltering,
|
|
6919
|
-
onFilterChange
|
|
7209
|
+
onFilterChange,
|
|
7210
|
+
defaultColumnPinning
|
|
6920
7211
|
});
|
|
6921
|
-
const handleLazyLoad =
|
|
7212
|
+
const handleLazyLoad = React50.useCallback(async () => {
|
|
6922
7213
|
if (!onLazyScrollLoad || pendingLazyLoad.current || resolvedLoading) return;
|
|
6923
7214
|
pendingLazyLoad.current = true;
|
|
6924
7215
|
if (!isControlledLoading) setInternalLazyLoading(true);
|
|
@@ -6930,8 +7221,8 @@ function SimpleTable({
|
|
|
6930
7221
|
}
|
|
6931
7222
|
}, [onLazyScrollLoad, resolvedLoading]);
|
|
6932
7223
|
const virtualizationActive = data.length * (expandable ? 2 : 1) > virtualizationThreshold;
|
|
6933
|
-
const [chunkCount, setChunkCount] =
|
|
6934
|
-
const onLoadChunk =
|
|
7224
|
+
const [chunkCount, setChunkCount] = React50.useState(recordPerChunk);
|
|
7225
|
+
const onLoadChunk = React50.useCallback(() => {
|
|
6935
7226
|
if (resolvedLoading || pendingLazyLoad.current) return;
|
|
6936
7227
|
if (data.length > chunkCount) {
|
|
6937
7228
|
setChunkCount(() => Math.min(chunkCount + recordPerChunk, data.length));
|
|
@@ -6940,21 +7231,25 @@ function SimpleTable({
|
|
|
6940
7231
|
if (typeof maxRecords === "number" && data.length >= maxRecords) return;
|
|
6941
7232
|
void handleLazyLoad();
|
|
6942
7233
|
}, [recordPerChunk, data.length, handleLazyLoad, chunkCount, maxRecords]);
|
|
6943
|
-
const
|
|
7234
|
+
const onLoadChunkRef = React50.useRef(onLoadChunk);
|
|
7235
|
+
React50.useEffect(() => {
|
|
7236
|
+
onLoadChunkRef.current = onLoadChunk;
|
|
7237
|
+
}, [onLoadChunk]);
|
|
7238
|
+
const rows = React50.useMemo(
|
|
6944
7239
|
() => table.getRowModel().rows,
|
|
6945
|
-
[paginationState, sorting, columnFilters]
|
|
7240
|
+
[paginationState, sorting, columnFilters, globalFilter]
|
|
6946
7241
|
);
|
|
6947
|
-
const splittedRows =
|
|
7242
|
+
const splittedRows = React50.useMemo(
|
|
6948
7243
|
() => rows.slice(0, chunkCount),
|
|
6949
7244
|
[rows, chunkCount]
|
|
6950
7245
|
);
|
|
6951
|
-
const selectedRows =
|
|
7246
|
+
const selectedRows = React50.useMemo(
|
|
6952
7247
|
() => table.getSelectedRowModel().rows.map((row) => row.original),
|
|
6953
7248
|
[rowSelection]
|
|
6954
7249
|
);
|
|
6955
7250
|
const tablePagination = table.getState().pagination;
|
|
6956
|
-
const draggedColumnId =
|
|
6957
|
-
const tableContainerRef =
|
|
7251
|
+
const draggedColumnId = React50.useRef(null);
|
|
7252
|
+
const tableContainerRef = React50.useRef(null);
|
|
6958
7253
|
const {
|
|
6959
7254
|
virtualRowPointers,
|
|
6960
7255
|
virtualItems,
|
|
@@ -6971,8 +7266,8 @@ function SimpleTable({
|
|
|
6971
7266
|
overScan,
|
|
6972
7267
|
shouldVirtualize: virtualizationActive
|
|
6973
7268
|
});
|
|
6974
|
-
const rafRef =
|
|
6975
|
-
|
|
7269
|
+
const rafRef = React50.useRef(null);
|
|
7270
|
+
React50.useEffect(() => {
|
|
6976
7271
|
const container = tableContainerRef.current;
|
|
6977
7272
|
if (!container || virtualizationActive) return;
|
|
6978
7273
|
const scheduleCheck = () => {
|
|
@@ -6981,7 +7276,7 @@ function SimpleTable({
|
|
|
6981
7276
|
rafRef.current = null;
|
|
6982
7277
|
const { scrollTop, scrollHeight, clientHeight } = container;
|
|
6983
7278
|
if (scrollHeight - (scrollTop + clientHeight) <= scrollLoadThreshold && scrollTop !== 0 && scrollHeight > clientHeight) {
|
|
6984
|
-
|
|
7279
|
+
onLoadChunkRef.current();
|
|
6985
7280
|
}
|
|
6986
7281
|
});
|
|
6987
7282
|
};
|
|
@@ -6994,38 +7289,65 @@ function SimpleTable({
|
|
|
6994
7289
|
rafRef.current = null;
|
|
6995
7290
|
}
|
|
6996
7291
|
};
|
|
6997
|
-
}, [scrollLoadThreshold,
|
|
6998
|
-
|
|
7292
|
+
}, [scrollLoadThreshold, virtualizationActive]);
|
|
7293
|
+
React50.useEffect(() => {
|
|
6999
7294
|
if (virtualizationActive) return;
|
|
7000
7295
|
if (table.getState().pagination.pageIndex === 0) {
|
|
7001
7296
|
tableContainerRef.current?.scrollTo({ top: 0 });
|
|
7002
7297
|
}
|
|
7003
7298
|
}, [virtualizationActive]);
|
|
7004
|
-
|
|
7299
|
+
React50.useEffect(() => {
|
|
7005
7300
|
if (!virtualItems.length || !virtualizationActive) return;
|
|
7006
|
-
|
|
7007
|
-
|
|
7008
|
-
|
|
7009
|
-
|
|
7010
|
-
if (paddingBottom <= scrollLoadThreshold) {
|
|
7011
|
-
onLoadChunk();
|
|
7012
|
-
}
|
|
7013
|
-
});
|
|
7014
|
-
};
|
|
7015
|
-
scheduleCheck();
|
|
7016
|
-
return () => {
|
|
7017
|
-
if (rafRef.current != null) {
|
|
7018
|
-
cancelAnimationFrame(rafRef.current);
|
|
7019
|
-
rafRef.current = null;
|
|
7020
|
-
}
|
|
7021
|
-
};
|
|
7022
|
-
}, [paddingBottom]);
|
|
7301
|
+
if (paddingBottom <= scrollLoadThreshold) {
|
|
7302
|
+
onLoadChunkRef.current();
|
|
7303
|
+
}
|
|
7304
|
+
}, [paddingBottom, scrollLoadThreshold, virtualizationActive]);
|
|
7023
7305
|
const columnCount = table.getAllLeafColumns().length;
|
|
7024
|
-
|
|
7306
|
+
const allHeaders = React50.useMemo(() => {
|
|
7307
|
+
const groups = table.getHeaderGroups();
|
|
7308
|
+
if (groups.length === 0) return [];
|
|
7309
|
+
return groups[0].headers;
|
|
7310
|
+
}, [table]);
|
|
7311
|
+
const { leftOffsets, rightOffsets, lastLeftId, firstRightId } = React50.useMemo(() => {
|
|
7312
|
+
if (!allHeaders || allHeaders.length === 0) {
|
|
7313
|
+
return {
|
|
7314
|
+
leftOffsets: /* @__PURE__ */ new Map(),
|
|
7315
|
+
rightOffsets: /* @__PURE__ */ new Map(),
|
|
7316
|
+
lastLeftId: null,
|
|
7317
|
+
firstRightId: null
|
|
7318
|
+
};
|
|
7319
|
+
}
|
|
7320
|
+
const leftPinned = allHeaders.filter(
|
|
7321
|
+
(h) => h.column.getIsPinned() === "left"
|
|
7322
|
+
);
|
|
7323
|
+
const rightPinned = allHeaders.filter(
|
|
7324
|
+
(h) => h.column.getIsPinned() === "right"
|
|
7325
|
+
);
|
|
7326
|
+
const leftMap = /* @__PURE__ */ new Map();
|
|
7327
|
+
let leftAcc = 0;
|
|
7328
|
+
for (const h of leftPinned) {
|
|
7329
|
+
leftMap.set(h.column.id, leftAcc);
|
|
7330
|
+
leftAcc += h.getSize();
|
|
7331
|
+
}
|
|
7332
|
+
const rightMap = /* @__PURE__ */ new Map();
|
|
7333
|
+
let rightAcc = 0;
|
|
7334
|
+
for (let i = rightPinned.length - 1; i >= 0; i--) {
|
|
7335
|
+
const h = rightPinned[i];
|
|
7336
|
+
rightMap.set(h.column.id, rightAcc);
|
|
7337
|
+
rightAcc += h.getSize();
|
|
7338
|
+
}
|
|
7339
|
+
return {
|
|
7340
|
+
leftOffsets: leftMap,
|
|
7341
|
+
rightOffsets: rightMap,
|
|
7342
|
+
lastLeftId: leftPinned.length > 0 ? leftPinned[leftPinned.length - 1].column.id : null,
|
|
7343
|
+
firstRightId: rightPinned.length > 0 ? rightPinned[0].column.id : null
|
|
7344
|
+
};
|
|
7345
|
+
}, [allHeaders]);
|
|
7346
|
+
React50.useEffect(() => {
|
|
7025
7347
|
if (!selectable || !onSelectionChange) return;
|
|
7026
7348
|
onSelectionChange(selectedRows);
|
|
7027
7349
|
}, [selectable, onSelectionChange, selectedRows]);
|
|
7028
|
-
|
|
7350
|
+
React50.useEffect(() => {
|
|
7029
7351
|
if (!expandable || !onExpandedChange) return;
|
|
7030
7352
|
onExpandedChange(
|
|
7031
7353
|
table.getExpandedRowModel().rows.map((row) => row.original)
|
|
@@ -7082,6 +7404,7 @@ function SimpleTable({
|
|
|
7082
7404
|
caption && /* @__PURE__ */ jsxRuntime.jsx(TableCaption, { children: caption }),
|
|
7083
7405
|
/* @__PURE__ */ jsxRuntime.jsx(TableHeader, { children: table.getHeaderGroups().map((headerGroup) => /* @__PURE__ */ jsxRuntime.jsx(TableRow, { children: headerGroup.headers.map((header) => {
|
|
7084
7406
|
if (header.isPlaceholder) return null;
|
|
7407
|
+
const pinPosition = header.column.getIsPinned();
|
|
7085
7408
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
7086
7409
|
TableHeaderComponent,
|
|
7087
7410
|
{
|
|
@@ -7089,7 +7412,11 @@ function SimpleTable({
|
|
|
7089
7412
|
draggedColumnId,
|
|
7090
7413
|
enableColumnOrdering,
|
|
7091
7414
|
baseColumnOrder,
|
|
7092
|
-
setColumnOrder
|
|
7415
|
+
setColumnOrder,
|
|
7416
|
+
pinnedLeftOffset: pinPosition === "left" ? leftOffsets.get(header.column.id) : void 0,
|
|
7417
|
+
pinnedRightOffset: pinPosition === "right" ? rightOffsets.get(header.column.id) : void 0,
|
|
7418
|
+
isLastLeftPinned: header.column.id === lastLeftId,
|
|
7419
|
+
isFirstRightPinned: header.column.id === firstRightId
|
|
7093
7420
|
},
|
|
7094
7421
|
header.id
|
|
7095
7422
|
);
|
|
@@ -7112,7 +7439,8 @@ function SimpleTable({
|
|
|
7112
7439
|
renderExpandedContent,
|
|
7113
7440
|
virtualItems,
|
|
7114
7441
|
invalidateCache,
|
|
7115
|
-
getRowExpandable
|
|
7442
|
+
getRowExpandable,
|
|
7443
|
+
headers: allHeaders
|
|
7116
7444
|
}
|
|
7117
7445
|
),
|
|
7118
7446
|
showInlineLoadingRow && resolvedLoading && /* @__PURE__ */ jsxRuntime.jsx(TableRow, { "data-loading-row": true, className: "pointer-events-none", children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -7173,12 +7501,12 @@ function DataTable({
|
|
|
7173
7501
|
pageSize = 10,
|
|
7174
7502
|
className
|
|
7175
7503
|
}) {
|
|
7176
|
-
const [sorting, setSorting] =
|
|
7177
|
-
const [columnFilters, setColumnFilters] =
|
|
7504
|
+
const [sorting, setSorting] = React50__namespace.useState([]);
|
|
7505
|
+
const [columnFilters, setColumnFilters] = React50__namespace.useState(
|
|
7178
7506
|
[]
|
|
7179
7507
|
);
|
|
7180
|
-
const [columnVisibility, setColumnVisibility] =
|
|
7181
|
-
const [rowSelection, setRowSelection] =
|
|
7508
|
+
const [columnVisibility, setColumnVisibility] = React50__namespace.useState({});
|
|
7509
|
+
const [rowSelection, setRowSelection] = React50__namespace.useState({});
|
|
7182
7510
|
const table = reactTable.useReactTable({
|
|
7183
7511
|
data,
|
|
7184
7512
|
columns,
|
|
@@ -7335,7 +7663,7 @@ var avatarFallbackVariants = classVarianceAuthority.cva(
|
|
|
7335
7663
|
}
|
|
7336
7664
|
}
|
|
7337
7665
|
);
|
|
7338
|
-
var Avatar =
|
|
7666
|
+
var Avatar = React50__namespace.forwardRef(({ className, size, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
7339
7667
|
AvatarPrimitive__namespace.Root,
|
|
7340
7668
|
{
|
|
7341
7669
|
ref,
|
|
@@ -7344,7 +7672,7 @@ var Avatar = React49__namespace.forwardRef(({ className, size, ...props }, ref)
|
|
|
7344
7672
|
}
|
|
7345
7673
|
));
|
|
7346
7674
|
Avatar.displayName = AvatarPrimitive__namespace.Root.displayName;
|
|
7347
|
-
var AvatarImage =
|
|
7675
|
+
var AvatarImage = React50__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
7348
7676
|
AvatarPrimitive__namespace.Image,
|
|
7349
7677
|
{
|
|
7350
7678
|
ref,
|
|
@@ -7353,7 +7681,7 @@ var AvatarImage = React49__namespace.forwardRef(({ className, ...props }, ref) =
|
|
|
7353
7681
|
}
|
|
7354
7682
|
));
|
|
7355
7683
|
AvatarImage.displayName = AvatarPrimitive__namespace.Image.displayName;
|
|
7356
|
-
var AvatarFallback =
|
|
7684
|
+
var AvatarFallback = React50__namespace.forwardRef(({ className, size, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
7357
7685
|
AvatarPrimitive__namespace.Fallback,
|
|
7358
7686
|
{
|
|
7359
7687
|
ref,
|
|
@@ -7517,7 +7845,7 @@ var itemVariants = classVarianceAuthority.cva(
|
|
|
7517
7845
|
}
|
|
7518
7846
|
}
|
|
7519
7847
|
);
|
|
7520
|
-
var Item9 =
|
|
7848
|
+
var Item9 = React50__namespace.forwardRef(
|
|
7521
7849
|
({
|
|
7522
7850
|
className,
|
|
7523
7851
|
variant,
|
|
@@ -7583,7 +7911,7 @@ var Item9 = React49__namespace.forwardRef(
|
|
|
7583
7911
|
}
|
|
7584
7912
|
);
|
|
7585
7913
|
Item9.displayName = "Item";
|
|
7586
|
-
var ItemGroup =
|
|
7914
|
+
var ItemGroup = React50__namespace.forwardRef(({ className, label, description, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs("div", { ref, className: cn("space-y-1", className), ...props, children: [
|
|
7587
7915
|
(label || description) && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "px-3 py-2 space-y-0.5", children: [
|
|
7588
7916
|
label && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-xs font-semibold text-muted-foreground uppercase tracking-wider", children: label }),
|
|
7589
7917
|
description && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-xs text-muted-foreground", children: description })
|
|
@@ -7591,7 +7919,7 @@ var ItemGroup = React49__namespace.forwardRef(({ className, label, description,
|
|
|
7591
7919
|
children
|
|
7592
7920
|
] }));
|
|
7593
7921
|
ItemGroup.displayName = "ItemGroup";
|
|
7594
|
-
var ItemList =
|
|
7922
|
+
var ItemList = React50__namespace.forwardRef(({ className, divided, spacing = "default", children, ...props }, ref) => {
|
|
7595
7923
|
const spacingClasses = {
|
|
7596
7924
|
none: "space-y-0",
|
|
7597
7925
|
sm: "space-y-0.5",
|
|
@@ -7614,7 +7942,7 @@ var ItemList = React49__namespace.forwardRef(({ className, divided, spacing = "d
|
|
|
7614
7942
|
);
|
|
7615
7943
|
});
|
|
7616
7944
|
ItemList.displayName = "ItemList";
|
|
7617
|
-
var ItemSeparator =
|
|
7945
|
+
var ItemSeparator = React50__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
7618
7946
|
"div",
|
|
7619
7947
|
{
|
|
7620
7948
|
ref,
|
|
@@ -7652,7 +7980,7 @@ var badgeVariants = classVarianceAuthority.cva(
|
|
|
7652
7980
|
}
|
|
7653
7981
|
}
|
|
7654
7982
|
);
|
|
7655
|
-
var Badge =
|
|
7983
|
+
var Badge = React50__namespace.forwardRef(
|
|
7656
7984
|
({
|
|
7657
7985
|
className,
|
|
7658
7986
|
variant,
|
|
@@ -7719,7 +8047,7 @@ function Calendar({
|
|
|
7719
8047
|
...props
|
|
7720
8048
|
}) {
|
|
7721
8049
|
const defaultClassNames = reactDayPicker.getDefaultClassNames();
|
|
7722
|
-
const { Card: Card2, CardHeader: CardHeader2, CardTitle: CardTitle2, CardContent: CardContent2, CardDescription: CardDescription2 } =
|
|
8050
|
+
const { Card: Card2, CardHeader: CardHeader2, CardTitle: CardTitle2, CardContent: CardContent2, CardDescription: CardDescription2 } = React50__namespace.useMemo(() => {
|
|
7723
8051
|
try {
|
|
7724
8052
|
const cardComponents = (init_card(), __toCommonJS(card_exports));
|
|
7725
8053
|
return cardComponents;
|
|
@@ -7733,7 +8061,7 @@ function Calendar({
|
|
|
7733
8061
|
};
|
|
7734
8062
|
}
|
|
7735
8063
|
}, []);
|
|
7736
|
-
const defaultPresets =
|
|
8064
|
+
const defaultPresets = React50__namespace.useMemo(() => {
|
|
7737
8065
|
if (!quickSelect && !presets) return [];
|
|
7738
8066
|
const mode = props.mode;
|
|
7739
8067
|
if (mode === "single") {
|
|
@@ -7741,7 +8069,7 @@ function Calendar({
|
|
|
7741
8069
|
{
|
|
7742
8070
|
label: "Today",
|
|
7743
8071
|
value: () => /* @__PURE__ */ new Date(),
|
|
7744
|
-
icon:
|
|
8072
|
+
icon: React50__namespace.createElement(lucideReact.Calendar, { className: "h-3 w-3" })
|
|
7745
8073
|
},
|
|
7746
8074
|
{
|
|
7747
8075
|
label: "Tomorrow",
|
|
@@ -7750,7 +8078,7 @@ function Calendar({
|
|
|
7750
8078
|
tomorrow.setDate(tomorrow.getDate() + 1);
|
|
7751
8079
|
return tomorrow;
|
|
7752
8080
|
},
|
|
7753
|
-
icon:
|
|
8081
|
+
icon: React50__namespace.createElement("span", { className: "text-xs" }, "\u27A1\uFE0F")
|
|
7754
8082
|
},
|
|
7755
8083
|
{
|
|
7756
8084
|
label: "Next Week",
|
|
@@ -7759,7 +8087,7 @@ function Calendar({
|
|
|
7759
8087
|
nextWeek.setDate(nextWeek.getDate() + 7);
|
|
7760
8088
|
return nextWeek;
|
|
7761
8089
|
},
|
|
7762
|
-
icon:
|
|
8090
|
+
icon: React50__namespace.createElement(lucideReact.Calendar, { className: "h-3 w-3" })
|
|
7763
8091
|
}
|
|
7764
8092
|
];
|
|
7765
8093
|
} else if (mode === "range") {
|
|
@@ -7772,7 +8100,7 @@ function Calendar({
|
|
|
7772
8100
|
end.setDate(start.getDate() + 6);
|
|
7773
8101
|
return { from: start, to: end };
|
|
7774
8102
|
},
|
|
7775
|
-
icon:
|
|
8103
|
+
icon: React50__namespace.createElement(lucideReact.Calendar, { className: "h-3 w-3" })
|
|
7776
8104
|
},
|
|
7777
8105
|
{
|
|
7778
8106
|
label: "Next 7 Days",
|
|
@@ -7782,7 +8110,7 @@ function Calendar({
|
|
|
7782
8110
|
end.setDate(start.getDate() + 7);
|
|
7783
8111
|
return { from: start, to: end };
|
|
7784
8112
|
},
|
|
7785
|
-
icon:
|
|
8113
|
+
icon: React50__namespace.createElement("span", { className: "text-xs" }, "\u27A1\uFE0F")
|
|
7786
8114
|
}
|
|
7787
8115
|
];
|
|
7788
8116
|
} else {
|
|
@@ -7798,7 +8126,7 @@ function Calendar({
|
|
|
7798
8126
|
}
|
|
7799
8127
|
return dates;
|
|
7800
8128
|
},
|
|
7801
|
-
icon:
|
|
8129
|
+
icon: React50__namespace.createElement(lucideReact.Calendar, { className: "h-3 w-3" })
|
|
7802
8130
|
}
|
|
7803
8131
|
];
|
|
7804
8132
|
}
|
|
@@ -7809,24 +8137,24 @@ function Calendar({
|
|
|
7809
8137
|
const selected = props.selected;
|
|
7810
8138
|
const mode = props.mode;
|
|
7811
8139
|
if (mode === "single" && selected) {
|
|
7812
|
-
return
|
|
8140
|
+
return React50__namespace.createElement(
|
|
7813
8141
|
"div",
|
|
7814
8142
|
{
|
|
7815
8143
|
className: "p-3 border rounded-lg bg-muted/50"
|
|
7816
8144
|
},
|
|
7817
8145
|
[
|
|
7818
|
-
|
|
8146
|
+
React50__namespace.createElement(
|
|
7819
8147
|
"div",
|
|
7820
8148
|
{
|
|
7821
8149
|
key: "header",
|
|
7822
8150
|
className: "flex items-center gap-2 mb-1"
|
|
7823
8151
|
},
|
|
7824
8152
|
[
|
|
7825
|
-
|
|
8153
|
+
React50__namespace.createElement(lucideReact.Calendar, {
|
|
7826
8154
|
key: "icon",
|
|
7827
8155
|
className: "h-4 w-4"
|
|
7828
8156
|
}),
|
|
7829
|
-
|
|
8157
|
+
React50__namespace.createElement(
|
|
7830
8158
|
"span",
|
|
7831
8159
|
{
|
|
7832
8160
|
key: "label",
|
|
@@ -7836,7 +8164,7 @@ function Calendar({
|
|
|
7836
8164
|
)
|
|
7837
8165
|
]
|
|
7838
8166
|
),
|
|
7839
|
-
|
|
8167
|
+
React50__namespace.createElement(
|
|
7840
8168
|
"p",
|
|
7841
8169
|
{
|
|
7842
8170
|
key: "date",
|
|
@@ -7854,24 +8182,24 @@ function Calendar({
|
|
|
7854
8182
|
}
|
|
7855
8183
|
if (mode === "range" && selected?.from) {
|
|
7856
8184
|
const elements = [
|
|
7857
|
-
|
|
8185
|
+
React50__namespace.createElement(
|
|
7858
8186
|
"div",
|
|
7859
8187
|
{
|
|
7860
8188
|
key: "from",
|
|
7861
8189
|
className: "flex items-center gap-2 text-sm"
|
|
7862
8190
|
},
|
|
7863
8191
|
[
|
|
7864
|
-
|
|
8192
|
+
React50__namespace.createElement(
|
|
7865
8193
|
"span",
|
|
7866
8194
|
{ key: "icon", className: "text-green-600" },
|
|
7867
8195
|
"\u{1F7E2}"
|
|
7868
8196
|
),
|
|
7869
|
-
|
|
8197
|
+
React50__namespace.createElement(
|
|
7870
8198
|
"span",
|
|
7871
8199
|
{ key: "label", className: "font-medium" },
|
|
7872
8200
|
"From:"
|
|
7873
8201
|
),
|
|
7874
|
-
|
|
8202
|
+
React50__namespace.createElement(
|
|
7875
8203
|
"span",
|
|
7876
8204
|
{ key: "date" },
|
|
7877
8205
|
selected.from.toLocaleDateString()
|
|
@@ -7881,43 +8209,43 @@ function Calendar({
|
|
|
7881
8209
|
];
|
|
7882
8210
|
if (selected.to) {
|
|
7883
8211
|
elements.push(
|
|
7884
|
-
|
|
8212
|
+
React50__namespace.createElement(
|
|
7885
8213
|
"div",
|
|
7886
8214
|
{
|
|
7887
8215
|
key: "to",
|
|
7888
8216
|
className: "flex items-center gap-2 text-sm"
|
|
7889
8217
|
},
|
|
7890
8218
|
[
|
|
7891
|
-
|
|
8219
|
+
React50__namespace.createElement(
|
|
7892
8220
|
"span",
|
|
7893
8221
|
{ key: "icon", className: "text-red-600" },
|
|
7894
8222
|
"\u{1F534}"
|
|
7895
8223
|
),
|
|
7896
|
-
|
|
8224
|
+
React50__namespace.createElement(
|
|
7897
8225
|
"span",
|
|
7898
8226
|
{ key: "label", className: "font-medium" },
|
|
7899
8227
|
"To:"
|
|
7900
8228
|
),
|
|
7901
|
-
|
|
8229
|
+
React50__namespace.createElement(
|
|
7902
8230
|
"span",
|
|
7903
8231
|
{ key: "date" },
|
|
7904
8232
|
selected.to.toLocaleDateString()
|
|
7905
8233
|
)
|
|
7906
8234
|
]
|
|
7907
8235
|
),
|
|
7908
|
-
|
|
8236
|
+
React50__namespace.createElement(
|
|
7909
8237
|
"div",
|
|
7910
8238
|
{
|
|
7911
8239
|
key: "duration",
|
|
7912
8240
|
className: "flex items-center gap-2 pt-2 border-t text-sm"
|
|
7913
8241
|
},
|
|
7914
8242
|
[
|
|
7915
|
-
|
|
8243
|
+
React50__namespace.createElement(
|
|
7916
8244
|
"span",
|
|
7917
8245
|
{ key: "icon", className: "text-mvn-blue-600" },
|
|
7918
8246
|
"\u23F1\uFE0F"
|
|
7919
8247
|
),
|
|
7920
|
-
|
|
8248
|
+
React50__namespace.createElement(
|
|
7921
8249
|
"span",
|
|
7922
8250
|
{ key: "text" },
|
|
7923
8251
|
`Duration: ${Math.ceil(
|
|
@@ -7928,25 +8256,25 @@ function Calendar({
|
|
|
7928
8256
|
)
|
|
7929
8257
|
);
|
|
7930
8258
|
}
|
|
7931
|
-
return
|
|
8259
|
+
return React50__namespace.createElement(
|
|
7932
8260
|
"div",
|
|
7933
8261
|
{
|
|
7934
8262
|
className: "p-3 border rounded-lg bg-muted/50"
|
|
7935
8263
|
},
|
|
7936
|
-
|
|
8264
|
+
React50__namespace.createElement("div", { className: "space-y-2" }, elements)
|
|
7937
8265
|
);
|
|
7938
8266
|
}
|
|
7939
8267
|
if (mode === "multiple" && Array.isArray(selected) && selected.length > 0) {
|
|
7940
8268
|
const sortedDates = selected.sort((a, b) => a.getTime() - b.getTime()).slice(0, 5);
|
|
7941
8269
|
const dateElements = sortedDates.map(
|
|
7942
|
-
(date, index) =>
|
|
8270
|
+
(date, index) => React50__namespace.createElement(
|
|
7943
8271
|
"div",
|
|
7944
8272
|
{
|
|
7945
8273
|
key: index,
|
|
7946
8274
|
className: "flex items-center justify-between p-2 bg-background rounded border"
|
|
7947
8275
|
},
|
|
7948
8276
|
[
|
|
7949
|
-
|
|
8277
|
+
React50__namespace.createElement(
|
|
7950
8278
|
"span",
|
|
7951
8279
|
{
|
|
7952
8280
|
key: "date",
|
|
@@ -7958,7 +8286,7 @@ function Calendar({
|
|
|
7958
8286
|
year: "numeric"
|
|
7959
8287
|
})
|
|
7960
8288
|
),
|
|
7961
|
-
|
|
8289
|
+
React50__namespace.createElement(
|
|
7962
8290
|
"button",
|
|
7963
8291
|
{
|
|
7964
8292
|
key: "remove",
|
|
@@ -7979,18 +8307,18 @@ function Calendar({
|
|
|
7979
8307
|
)
|
|
7980
8308
|
);
|
|
7981
8309
|
const elements = [
|
|
7982
|
-
|
|
8310
|
+
React50__namespace.createElement(
|
|
7983
8311
|
"div",
|
|
7984
8312
|
{
|
|
7985
8313
|
key: "header",
|
|
7986
8314
|
className: "flex items-center gap-2 mb-2"
|
|
7987
8315
|
},
|
|
7988
8316
|
[
|
|
7989
|
-
|
|
8317
|
+
React50__namespace.createElement(lucideReact.Star, {
|
|
7990
8318
|
key: "icon",
|
|
7991
8319
|
className: "h-4 w-4 text-yellow-500"
|
|
7992
8320
|
}),
|
|
7993
|
-
|
|
8321
|
+
React50__namespace.createElement(
|
|
7994
8322
|
"span",
|
|
7995
8323
|
{
|
|
7996
8324
|
key: "label",
|
|
@@ -8000,7 +8328,7 @@ function Calendar({
|
|
|
8000
8328
|
)
|
|
8001
8329
|
]
|
|
8002
8330
|
),
|
|
8003
|
-
|
|
8331
|
+
React50__namespace.createElement(
|
|
8004
8332
|
"div",
|
|
8005
8333
|
{
|
|
8006
8334
|
key: "dates",
|
|
@@ -8011,7 +8339,7 @@ function Calendar({
|
|
|
8011
8339
|
];
|
|
8012
8340
|
if (selected.length > 5) {
|
|
8013
8341
|
elements.push(
|
|
8014
|
-
|
|
8342
|
+
React50__namespace.createElement(
|
|
8015
8343
|
"p",
|
|
8016
8344
|
{
|
|
8017
8345
|
key: "more",
|
|
@@ -8021,7 +8349,7 @@ function Calendar({
|
|
|
8021
8349
|
)
|
|
8022
8350
|
);
|
|
8023
8351
|
}
|
|
8024
|
-
return
|
|
8352
|
+
return React50__namespace.createElement(
|
|
8025
8353
|
"div",
|
|
8026
8354
|
{
|
|
8027
8355
|
className: "p-3 border rounded-lg bg-muted/50 max-h-48 overflow-y-auto"
|
|
@@ -8036,7 +8364,7 @@ function Calendar({
|
|
|
8036
8364
|
const elements = [];
|
|
8037
8365
|
if ((quickSelect || presets) && activePresets.length > 0) {
|
|
8038
8366
|
const presetButtons = activePresets.map(
|
|
8039
|
-
(preset, index) =>
|
|
8367
|
+
(preset, index) => React50__namespace.createElement(
|
|
8040
8368
|
"button",
|
|
8041
8369
|
{
|
|
8042
8370
|
key: index,
|
|
@@ -8045,19 +8373,19 @@ function Calendar({
|
|
|
8045
8373
|
},
|
|
8046
8374
|
[
|
|
8047
8375
|
preset.icon,
|
|
8048
|
-
|
|
8376
|
+
React50__namespace.createElement("span", { key: "label" }, preset.label)
|
|
8049
8377
|
]
|
|
8050
8378
|
)
|
|
8051
8379
|
);
|
|
8052
8380
|
elements.push(
|
|
8053
|
-
|
|
8381
|
+
React50__namespace.createElement(
|
|
8054
8382
|
"div",
|
|
8055
8383
|
{
|
|
8056
8384
|
key: "presets",
|
|
8057
8385
|
className: "space-y-2"
|
|
8058
8386
|
},
|
|
8059
8387
|
[
|
|
8060
|
-
|
|
8388
|
+
React50__namespace.createElement(
|
|
8061
8389
|
"h5",
|
|
8062
8390
|
{
|
|
8063
8391
|
key: "title",
|
|
@@ -8065,7 +8393,7 @@ function Calendar({
|
|
|
8065
8393
|
},
|
|
8066
8394
|
"Quick Select:"
|
|
8067
8395
|
),
|
|
8068
|
-
|
|
8396
|
+
React50__namespace.createElement(
|
|
8069
8397
|
"div",
|
|
8070
8398
|
{
|
|
8071
8399
|
key: "buttons",
|
|
@@ -8090,7 +8418,7 @@ function Calendar({
|
|
|
8090
8418
|
label = "Clear Range";
|
|
8091
8419
|
}
|
|
8092
8420
|
elements.push(
|
|
8093
|
-
|
|
8421
|
+
React50__namespace.createElement(
|
|
8094
8422
|
"button",
|
|
8095
8423
|
{
|
|
8096
8424
|
key: "clear",
|
|
@@ -8106,7 +8434,7 @@ function Calendar({
|
|
|
8106
8434
|
disabled
|
|
8107
8435
|
},
|
|
8108
8436
|
[
|
|
8109
|
-
|
|
8437
|
+
React50__namespace.createElement(lucideReact.RotateCcw, {
|
|
8110
8438
|
key: "icon",
|
|
8111
8439
|
className: "mr-1 h-3 w-3"
|
|
8112
8440
|
}),
|
|
@@ -8115,7 +8443,7 @@ function Calendar({
|
|
|
8115
8443
|
)
|
|
8116
8444
|
);
|
|
8117
8445
|
}
|
|
8118
|
-
return
|
|
8446
|
+
return React50__namespace.createElement(
|
|
8119
8447
|
"div",
|
|
8120
8448
|
{
|
|
8121
8449
|
className: cn("space-y-3", sidebarClassName)
|
|
@@ -8123,7 +8451,7 @@ function Calendar({
|
|
|
8123
8451
|
elements
|
|
8124
8452
|
);
|
|
8125
8453
|
};
|
|
8126
|
-
const calendarElement =
|
|
8454
|
+
const calendarElement = React50__namespace.createElement(reactDayPicker.DayPicker, {
|
|
8127
8455
|
showOutsideDays,
|
|
8128
8456
|
className: cn(
|
|
8129
8457
|
"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",
|
|
@@ -8225,7 +8553,7 @@ function Calendar({
|
|
|
8225
8553
|
},
|
|
8226
8554
|
components: {
|
|
8227
8555
|
Root: ({ className: className2, rootRef, ...props2 }) => {
|
|
8228
|
-
return
|
|
8556
|
+
return React50__namespace.createElement("div", {
|
|
8229
8557
|
"data-slot": "calendar",
|
|
8230
8558
|
ref: rootRef,
|
|
8231
8559
|
className: cn(className2),
|
|
@@ -8234,28 +8562,28 @@ function Calendar({
|
|
|
8234
8562
|
},
|
|
8235
8563
|
Chevron: ({ className: className2, orientation, ...props2 }) => {
|
|
8236
8564
|
if (orientation === "left") {
|
|
8237
|
-
return
|
|
8565
|
+
return React50__namespace.createElement(lucideReact.ChevronLeft, {
|
|
8238
8566
|
className: cn("size-4", className2),
|
|
8239
8567
|
...props2
|
|
8240
8568
|
});
|
|
8241
8569
|
}
|
|
8242
8570
|
if (orientation === "right") {
|
|
8243
|
-
return
|
|
8571
|
+
return React50__namespace.createElement(lucideReact.ChevronRight, {
|
|
8244
8572
|
className: cn("size-4", className2),
|
|
8245
8573
|
...props2
|
|
8246
8574
|
});
|
|
8247
8575
|
}
|
|
8248
|
-
return
|
|
8576
|
+
return React50__namespace.createElement(lucideReact.ChevronDown, {
|
|
8249
8577
|
className: cn("size-4", className2),
|
|
8250
8578
|
...props2
|
|
8251
8579
|
});
|
|
8252
8580
|
},
|
|
8253
8581
|
DayButton: CalendarDayButton,
|
|
8254
8582
|
WeekNumber: ({ children, ...props2 }) => {
|
|
8255
|
-
return
|
|
8583
|
+
return React50__namespace.createElement(
|
|
8256
8584
|
"td",
|
|
8257
8585
|
props2,
|
|
8258
|
-
|
|
8586
|
+
React50__namespace.createElement(
|
|
8259
8587
|
"div",
|
|
8260
8588
|
{
|
|
8261
8589
|
className: "flex size-10 items-center justify-center text-center text-sm font-medium text-muted-foreground"
|
|
@@ -8270,25 +8598,25 @@ function Calendar({
|
|
|
8270
8598
|
});
|
|
8271
8599
|
if (layout === "compact") {
|
|
8272
8600
|
if (withCard) {
|
|
8273
|
-
return
|
|
8601
|
+
return React50__namespace.createElement(
|
|
8274
8602
|
Card2,
|
|
8275
8603
|
{
|
|
8276
8604
|
className: cn("w-fit", cardClassName)
|
|
8277
8605
|
},
|
|
8278
|
-
|
|
8606
|
+
React50__namespace.createElement(CardContent2, { className: "p-3" }, calendarElement)
|
|
8279
8607
|
);
|
|
8280
8608
|
}
|
|
8281
8609
|
return calendarElement;
|
|
8282
8610
|
}
|
|
8283
8611
|
if (layout === "inline") {
|
|
8284
|
-
const sidebarElement2 = renderDateInfo() || renderQuickActions() ?
|
|
8612
|
+
const sidebarElement2 = renderDateInfo() || renderQuickActions() ? React50__namespace.createElement(
|
|
8285
8613
|
"div",
|
|
8286
8614
|
{
|
|
8287
8615
|
className: cn("min-w-[240px] space-y-3", sidebarClassName)
|
|
8288
8616
|
},
|
|
8289
8617
|
[renderDateInfo(), renderQuickActions()].filter(Boolean)
|
|
8290
8618
|
) : null;
|
|
8291
|
-
const content = sidebarElement2 ?
|
|
8619
|
+
const content = sidebarElement2 ? React50__namespace.createElement(
|
|
8292
8620
|
"div",
|
|
8293
8621
|
{
|
|
8294
8622
|
className: cn("flex gap-4 items-start", containerClassName)
|
|
@@ -8296,25 +8624,25 @@ function Calendar({
|
|
|
8296
8624
|
[calendarElement, sidebarElement2]
|
|
8297
8625
|
) : calendarElement;
|
|
8298
8626
|
if (withCard) {
|
|
8299
|
-
return
|
|
8627
|
+
return React50__namespace.createElement(
|
|
8300
8628
|
Card2,
|
|
8301
8629
|
{
|
|
8302
8630
|
className: cn("w-fit", cardClassName)
|
|
8303
8631
|
},
|
|
8304
8632
|
[
|
|
8305
|
-
(cardTitle || cardDescription) &&
|
|
8306
|
-
cardTitle &&
|
|
8633
|
+
(cardTitle || cardDescription) && React50__namespace.createElement(CardHeader2, { key: "header" }, [
|
|
8634
|
+
cardTitle && React50__namespace.createElement(
|
|
8307
8635
|
CardTitle2,
|
|
8308
8636
|
{ key: "title", className: "text-base" },
|
|
8309
8637
|
cardTitle
|
|
8310
8638
|
),
|
|
8311
|
-
cardDescription &&
|
|
8639
|
+
cardDescription && React50__namespace.createElement(
|
|
8312
8640
|
CardDescription2,
|
|
8313
8641
|
{ key: "desc" },
|
|
8314
8642
|
cardDescription
|
|
8315
8643
|
)
|
|
8316
8644
|
]),
|
|
8317
|
-
|
|
8645
|
+
React50__namespace.createElement(
|
|
8318
8646
|
CardContent2,
|
|
8319
8647
|
{
|
|
8320
8648
|
key: "content",
|
|
@@ -8327,7 +8655,7 @@ function Calendar({
|
|
|
8327
8655
|
}
|
|
8328
8656
|
return content;
|
|
8329
8657
|
}
|
|
8330
|
-
const sidebarElement = renderDateInfo() || renderQuickActions() ?
|
|
8658
|
+
const sidebarElement = renderDateInfo() || renderQuickActions() ? React50__namespace.createElement(
|
|
8331
8659
|
"div",
|
|
8332
8660
|
{
|
|
8333
8661
|
className: cn("min-w-[240px] space-y-3", sidebarClassName)
|
|
@@ -8335,7 +8663,7 @@ function Calendar({
|
|
|
8335
8663
|
[renderDateInfo(), renderQuickActions()].filter(Boolean)
|
|
8336
8664
|
) : null;
|
|
8337
8665
|
if (withCard) {
|
|
8338
|
-
const cardElement =
|
|
8666
|
+
const cardElement = React50__namespace.createElement(
|
|
8339
8667
|
Card2,
|
|
8340
8668
|
{
|
|
8341
8669
|
className: cn(
|
|
@@ -8346,19 +8674,19 @@ function Calendar({
|
|
|
8346
8674
|
)
|
|
8347
8675
|
},
|
|
8348
8676
|
[
|
|
8349
|
-
(cardTitle || cardDescription) &&
|
|
8350
|
-
cardTitle &&
|
|
8677
|
+
(cardTitle || cardDescription) && React50__namespace.createElement(CardHeader2, { key: "header" }, [
|
|
8678
|
+
cardTitle && React50__namespace.createElement(
|
|
8351
8679
|
CardTitle2,
|
|
8352
8680
|
{ key: "title", className: "text-base" },
|
|
8353
8681
|
cardTitle
|
|
8354
8682
|
),
|
|
8355
|
-
cardDescription &&
|
|
8683
|
+
cardDescription && React50__namespace.createElement(
|
|
8356
8684
|
CardDescription2,
|
|
8357
8685
|
{ key: "desc" },
|
|
8358
8686
|
cardDescription
|
|
8359
8687
|
)
|
|
8360
8688
|
]),
|
|
8361
|
-
|
|
8689
|
+
React50__namespace.createElement(
|
|
8362
8690
|
CardContent2,
|
|
8363
8691
|
{
|
|
8364
8692
|
key: "content",
|
|
@@ -8369,7 +8697,7 @@ function Calendar({
|
|
|
8369
8697
|
].filter(Boolean)
|
|
8370
8698
|
);
|
|
8371
8699
|
if (sidebarElement) {
|
|
8372
|
-
return
|
|
8700
|
+
return React50__namespace.createElement(
|
|
8373
8701
|
"div",
|
|
8374
8702
|
{
|
|
8375
8703
|
className: cn("flex gap-4 flex-wrap items-start", containerClassName)
|
|
@@ -8380,7 +8708,7 @@ function Calendar({
|
|
|
8380
8708
|
return cardElement;
|
|
8381
8709
|
}
|
|
8382
8710
|
if (sidebarElement) {
|
|
8383
|
-
return
|
|
8711
|
+
return React50__namespace.createElement(
|
|
8384
8712
|
"div",
|
|
8385
8713
|
{
|
|
8386
8714
|
className: cn("flex gap-4 flex-wrap items-start", containerClassName)
|
|
@@ -8397,8 +8725,8 @@ function CalendarDayButton({
|
|
|
8397
8725
|
...props
|
|
8398
8726
|
}) {
|
|
8399
8727
|
const defaultClassNames = reactDayPicker.getDefaultClassNames();
|
|
8400
|
-
const ref =
|
|
8401
|
-
|
|
8728
|
+
const ref = React50__namespace.useRef(null);
|
|
8729
|
+
React50__namespace.useEffect(() => {
|
|
8402
8730
|
if (modifiers.focused) ref.current?.focus();
|
|
8403
8731
|
}, [modifiers.focused]);
|
|
8404
8732
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -10014,7 +10342,7 @@ var pickerVariants = classVarianceAuthority.cva("w-full justify-start text-left
|
|
|
10014
10342
|
variant: "outlined"
|
|
10015
10343
|
}
|
|
10016
10344
|
});
|
|
10017
|
-
var DatePicker =
|
|
10345
|
+
var DatePicker = React50__namespace.forwardRef(
|
|
10018
10346
|
({
|
|
10019
10347
|
date,
|
|
10020
10348
|
onDateChange,
|
|
@@ -10061,7 +10389,7 @@ var DatePicker = React49__namespace.forwardRef(
|
|
|
10061
10389
|
}
|
|
10062
10390
|
);
|
|
10063
10391
|
DatePicker.displayName = "DatePicker";
|
|
10064
|
-
var DateRangePicker =
|
|
10392
|
+
var DateRangePicker = React50__namespace.forwardRef(
|
|
10065
10393
|
({
|
|
10066
10394
|
dateRange,
|
|
10067
10395
|
onDateRangeChange,
|
|
@@ -10119,15 +10447,15 @@ DateRangePicker.displayName = "DateRangePicker";
|
|
|
10119
10447
|
|
|
10120
10448
|
// src/components/ui/carousel/index.tsx
|
|
10121
10449
|
init_utils();
|
|
10122
|
-
var CarouselContext =
|
|
10450
|
+
var CarouselContext = React50__namespace.createContext(null);
|
|
10123
10451
|
function useCarousel() {
|
|
10124
|
-
const context =
|
|
10452
|
+
const context = React50__namespace.useContext(CarouselContext);
|
|
10125
10453
|
if (!context) {
|
|
10126
10454
|
throw new Error("useCarousel must be used within a <Carousel />");
|
|
10127
10455
|
}
|
|
10128
10456
|
return context;
|
|
10129
10457
|
}
|
|
10130
|
-
var Carousel =
|
|
10458
|
+
var Carousel = React50__namespace.forwardRef(
|
|
10131
10459
|
({
|
|
10132
10460
|
orientation = "horizontal",
|
|
10133
10461
|
opts,
|
|
@@ -10144,22 +10472,22 @@ var Carousel = React49__namespace.forwardRef(
|
|
|
10144
10472
|
},
|
|
10145
10473
|
plugins
|
|
10146
10474
|
);
|
|
10147
|
-
const [canScrollPrev, setCanScrollPrev] =
|
|
10148
|
-
const [canScrollNext, setCanScrollNext] =
|
|
10149
|
-
const onSelect =
|
|
10475
|
+
const [canScrollPrev, setCanScrollPrev] = React50__namespace.useState(false);
|
|
10476
|
+
const [canScrollNext, setCanScrollNext] = React50__namespace.useState(false);
|
|
10477
|
+
const onSelect = React50__namespace.useCallback((api2) => {
|
|
10150
10478
|
if (!api2) {
|
|
10151
10479
|
return;
|
|
10152
10480
|
}
|
|
10153
10481
|
setCanScrollPrev(api2.canScrollPrev());
|
|
10154
10482
|
setCanScrollNext(api2.canScrollNext());
|
|
10155
10483
|
}, []);
|
|
10156
|
-
const scrollPrev =
|
|
10484
|
+
const scrollPrev = React50__namespace.useCallback(() => {
|
|
10157
10485
|
api?.scrollPrev();
|
|
10158
10486
|
}, [api]);
|
|
10159
|
-
const scrollNext =
|
|
10487
|
+
const scrollNext = React50__namespace.useCallback(() => {
|
|
10160
10488
|
api?.scrollNext();
|
|
10161
10489
|
}, [api]);
|
|
10162
|
-
const handleKeyDown =
|
|
10490
|
+
const handleKeyDown = React50__namespace.useCallback(
|
|
10163
10491
|
(event) => {
|
|
10164
10492
|
if (event.key === "ArrowLeft") {
|
|
10165
10493
|
event.preventDefault();
|
|
@@ -10171,13 +10499,13 @@ var Carousel = React49__namespace.forwardRef(
|
|
|
10171
10499
|
},
|
|
10172
10500
|
[scrollPrev, scrollNext]
|
|
10173
10501
|
);
|
|
10174
|
-
|
|
10502
|
+
React50__namespace.useEffect(() => {
|
|
10175
10503
|
if (!api || !setApi) {
|
|
10176
10504
|
return;
|
|
10177
10505
|
}
|
|
10178
10506
|
setApi(api);
|
|
10179
10507
|
}, [api, setApi]);
|
|
10180
|
-
|
|
10508
|
+
React50__namespace.useEffect(() => {
|
|
10181
10509
|
if (!api) {
|
|
10182
10510
|
return;
|
|
10183
10511
|
}
|
|
@@ -10206,7 +10534,11 @@ var Carousel = React49__namespace.forwardRef(
|
|
|
10206
10534
|
{
|
|
10207
10535
|
ref,
|
|
10208
10536
|
onKeyDownCapture: handleKeyDown,
|
|
10209
|
-
className: cn(
|
|
10537
|
+
className: cn(
|
|
10538
|
+
"relative",
|
|
10539
|
+
orientation === "vertical" && "h-full",
|
|
10540
|
+
className
|
|
10541
|
+
),
|
|
10210
10542
|
role: "region",
|
|
10211
10543
|
"aria-roledescription": "carousel",
|
|
10212
10544
|
...props,
|
|
@@ -10218,9 +10550,9 @@ var Carousel = React49__namespace.forwardRef(
|
|
|
10218
10550
|
}
|
|
10219
10551
|
);
|
|
10220
10552
|
Carousel.displayName = "Carousel";
|
|
10221
|
-
var CarouselContent =
|
|
10553
|
+
var CarouselContent = React50__namespace.forwardRef(({ className, ...props }, ref) => {
|
|
10222
10554
|
const { carouselRef, orientation } = useCarousel();
|
|
10223
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { ref: carouselRef, className: "overflow-hidden", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
10555
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { ref: carouselRef, className: "overflow-hidden h-full", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
10224
10556
|
"div",
|
|
10225
10557
|
{
|
|
10226
10558
|
ref,
|
|
@@ -10234,7 +10566,7 @@ var CarouselContent = React49__namespace.forwardRef(({ className, ...props }, re
|
|
|
10234
10566
|
) });
|
|
10235
10567
|
});
|
|
10236
10568
|
CarouselContent.displayName = "CarouselContent";
|
|
10237
|
-
var CarouselItem =
|
|
10569
|
+
var CarouselItem = React50__namespace.forwardRef(({ className, ...props }, ref) => {
|
|
10238
10570
|
const { orientation } = useCarousel();
|
|
10239
10571
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
10240
10572
|
"div",
|
|
@@ -10252,7 +10584,7 @@ var CarouselItem = React49__namespace.forwardRef(({ className, ...props }, ref)
|
|
|
10252
10584
|
);
|
|
10253
10585
|
});
|
|
10254
10586
|
CarouselItem.displayName = "CarouselItem";
|
|
10255
|
-
var CarouselPrevious =
|
|
10587
|
+
var CarouselPrevious = React50__namespace.forwardRef(({ className, variant = "outline", size = "icon", ...props }, ref) => {
|
|
10256
10588
|
const { orientation, scrollPrev, canScrollPrev } = useCarousel();
|
|
10257
10589
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
10258
10590
|
Button,
|
|
@@ -10261,8 +10593,8 @@ var CarouselPrevious = React49__namespace.forwardRef(({ className, variant = "ou
|
|
|
10261
10593
|
variant,
|
|
10262
10594
|
size,
|
|
10263
10595
|
className: cn(
|
|
10264
|
-
"absolute h-8 w-8 rounded-full",
|
|
10265
|
-
orientation === "horizontal" ? "
|
|
10596
|
+
"absolute z-10 h-8 w-8 rounded-full",
|
|
10597
|
+
orientation === "horizontal" ? "left-2 top-1/2 -translate-y-[1rem]" : "top-2 left-1/2 -translate-x-[1rem] rotate-90",
|
|
10266
10598
|
className
|
|
10267
10599
|
),
|
|
10268
10600
|
disabled: !canScrollPrev,
|
|
@@ -10276,7 +10608,7 @@ var CarouselPrevious = React49__namespace.forwardRef(({ className, variant = "ou
|
|
|
10276
10608
|
);
|
|
10277
10609
|
});
|
|
10278
10610
|
CarouselPrevious.displayName = "CarouselPrevious";
|
|
10279
|
-
var CarouselNext =
|
|
10611
|
+
var CarouselNext = React50__namespace.forwardRef(({ className, variant = "outline", size = "icon", ...props }, ref) => {
|
|
10280
10612
|
const { orientation, scrollNext, canScrollNext } = useCarousel();
|
|
10281
10613
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
10282
10614
|
Button,
|
|
@@ -10285,8 +10617,8 @@ var CarouselNext = React49__namespace.forwardRef(({ className, variant = "outlin
|
|
|
10285
10617
|
variant,
|
|
10286
10618
|
size,
|
|
10287
10619
|
className: cn(
|
|
10288
|
-
"absolute h-8 w-8 rounded-full",
|
|
10289
|
-
orientation === "horizontal" ? "
|
|
10620
|
+
"absolute z-10 h-8 w-8 rounded-full",
|
|
10621
|
+
orientation === "horizontal" ? "right-2 top-1/2 -translate-y-[1rem]" : "bottom-2 left-1/2 -translate-x-[1rem] rotate-90",
|
|
10290
10622
|
className
|
|
10291
10623
|
),
|
|
10292
10624
|
disabled: !canScrollNext,
|
|
@@ -10315,10 +10647,10 @@ function SimpleCarousel({
|
|
|
10315
10647
|
nextArrow,
|
|
10316
10648
|
onSlideChange
|
|
10317
10649
|
}) {
|
|
10318
|
-
const [api, setApi] =
|
|
10319
|
-
const [current, setCurrent] =
|
|
10320
|
-
const [count, setCount] =
|
|
10321
|
-
|
|
10650
|
+
const [api, setApi] = React50__namespace.useState();
|
|
10651
|
+
const [current, setCurrent] = React50__namespace.useState(0);
|
|
10652
|
+
const [count, setCount] = React50__namespace.useState(0);
|
|
10653
|
+
React50__namespace.useEffect(() => {
|
|
10322
10654
|
if (!api) {
|
|
10323
10655
|
return;
|
|
10324
10656
|
}
|
|
@@ -10330,7 +10662,7 @@ function SimpleCarousel({
|
|
|
10330
10662
|
onSlideChange?.(selectedIndex);
|
|
10331
10663
|
});
|
|
10332
10664
|
}, [api, onSlideChange]);
|
|
10333
|
-
|
|
10665
|
+
React50__namespace.useEffect(() => {
|
|
10334
10666
|
if (!api || !autoPlay) {
|
|
10335
10667
|
return;
|
|
10336
10668
|
}
|
|
@@ -10344,54 +10676,65 @@ function SimpleCarousel({
|
|
|
10344
10676
|
return () => clearInterval(interval);
|
|
10345
10677
|
}, [api, autoPlay, loop]);
|
|
10346
10678
|
const slideWidth = slidesToShow > 1 ? `${100 / slidesToShow}%` : "100%";
|
|
10347
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
10348
|
-
|
|
10349
|
-
|
|
10350
|
-
|
|
10351
|
-
|
|
10352
|
-
|
|
10353
|
-
|
|
10354
|
-
|
|
10355
|
-
|
|
10356
|
-
|
|
10357
|
-
|
|
10358
|
-
|
|
10359
|
-
/* @__PURE__ */ jsxRuntime.jsx(CarouselContent, { children: items.map((item, index) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
10360
|
-
CarouselItem,
|
|
10361
|
-
{
|
|
10362
|
-
className: cn(itemClassName, item.className),
|
|
10363
|
-
style: { flexBasis: slideWidth },
|
|
10364
|
-
onClick: item.onClick,
|
|
10365
|
-
children: item.content
|
|
10679
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
10680
|
+
"div",
|
|
10681
|
+
{
|
|
10682
|
+
className: cn("w-full", orientation === "vertical" && "h-64", className),
|
|
10683
|
+
children: [
|
|
10684
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
10685
|
+
Carousel,
|
|
10686
|
+
{
|
|
10687
|
+
setApi,
|
|
10688
|
+
opts: {
|
|
10689
|
+
align: "start",
|
|
10690
|
+
loop
|
|
10366
10691
|
},
|
|
10367
|
-
|
|
10368
|
-
|
|
10369
|
-
|
|
10370
|
-
|
|
10371
|
-
|
|
10372
|
-
|
|
10373
|
-
|
|
10374
|
-
|
|
10375
|
-
|
|
10376
|
-
|
|
10377
|
-
|
|
10378
|
-
|
|
10379
|
-
|
|
10380
|
-
|
|
10381
|
-
|
|
10692
|
+
orientation,
|
|
10693
|
+
className: cn(
|
|
10694
|
+
"w-full mx-auto",
|
|
10695
|
+
orientation === "vertical" && "h-full",
|
|
10696
|
+
containerClassName
|
|
10697
|
+
),
|
|
10698
|
+
children: [
|
|
10699
|
+
/* @__PURE__ */ jsxRuntime.jsx(CarouselContent, { children: items.map((item, index) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
10700
|
+
CarouselItem,
|
|
10701
|
+
{
|
|
10702
|
+
className: cn(itemClassName, item.className),
|
|
10703
|
+
style: { flexBasis: slideWidth },
|
|
10704
|
+
onClick: item.onClick,
|
|
10705
|
+
children: item.content
|
|
10706
|
+
},
|
|
10707
|
+
item.id || index
|
|
10708
|
+
)) }),
|
|
10709
|
+
showArrows && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
10710
|
+
prevArrow || /* @__PURE__ */ jsxRuntime.jsx(CarouselPrevious, {}),
|
|
10711
|
+
nextArrow || /* @__PURE__ */ jsxRuntime.jsx(CarouselNext, {})
|
|
10712
|
+
] })
|
|
10713
|
+
]
|
|
10714
|
+
}
|
|
10382
10715
|
),
|
|
10383
|
-
|
|
10384
|
-
|
|
10385
|
-
|
|
10386
|
-
|
|
10387
|
-
|
|
10388
|
-
|
|
10389
|
-
|
|
10390
|
-
|
|
10391
|
-
|
|
10392
|
-
|
|
10393
|
-
|
|
10394
|
-
|
|
10716
|
+
showDots && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex justify-center space-x-2 mt-4", children: Array.from({ length: count }).map((_, index) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
10717
|
+
Button,
|
|
10718
|
+
{
|
|
10719
|
+
variant: "ghost",
|
|
10720
|
+
className: cn(
|
|
10721
|
+
"h-2 w-2 rounded-full transition-colors",
|
|
10722
|
+
current === index + 1 ? "bg-primary" : "bg-primary/20 hover:bg-primary/40"
|
|
10723
|
+
),
|
|
10724
|
+
onClick: () => api?.scrollTo(index),
|
|
10725
|
+
"aria-label": `Go to slide ${index + 1}`
|
|
10726
|
+
},
|
|
10727
|
+
index
|
|
10728
|
+
)) }),
|
|
10729
|
+
count > 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "py-2 text-center text-sm text-muted-foreground", children: [
|
|
10730
|
+
"Slide ",
|
|
10731
|
+
current,
|
|
10732
|
+
" of ",
|
|
10733
|
+
count
|
|
10734
|
+
] })
|
|
10735
|
+
]
|
|
10736
|
+
}
|
|
10737
|
+
);
|
|
10395
10738
|
}
|
|
10396
10739
|
|
|
10397
10740
|
// src/components/ui/typography/index.tsx
|
|
@@ -10469,7 +10812,7 @@ var typeToTag = {
|
|
|
10469
10812
|
list: "ul",
|
|
10470
10813
|
"list-item": "li"
|
|
10471
10814
|
};
|
|
10472
|
-
var Typography =
|
|
10815
|
+
var Typography = React50__namespace.forwardRef(
|
|
10473
10816
|
({
|
|
10474
10817
|
type,
|
|
10475
10818
|
size,
|
|
@@ -10506,7 +10849,7 @@ var Typography = React49__namespace.forwardRef(
|
|
|
10506
10849
|
);
|
|
10507
10850
|
Typography.displayName = "Typography";
|
|
10508
10851
|
function createWrapper(fixedType) {
|
|
10509
|
-
return
|
|
10852
|
+
return React50__namespace.forwardRef(
|
|
10510
10853
|
({ ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(Typography, { ref, type: fixedType, ...props })
|
|
10511
10854
|
);
|
|
10512
10855
|
}
|
|
@@ -10553,10 +10896,751 @@ var TypographyGroup = {
|
|
|
10553
10896
|
// src/index.ts
|
|
10554
10897
|
init_utils();
|
|
10555
10898
|
|
|
10899
|
+
// src/components/ui/charts/chart-theme.ts
|
|
10900
|
+
var getCSSVariable = (name) => {
|
|
10901
|
+
if (typeof window === "undefined") return "";
|
|
10902
|
+
return getComputedStyle(document.documentElement).getPropertyValue(name).trim();
|
|
10903
|
+
};
|
|
10904
|
+
var CHART_COLORS = {
|
|
10905
|
+
primary: "var(--chart-1)",
|
|
10906
|
+
secondary: "var(--chart-2)",
|
|
10907
|
+
tertiary: "var(--chart-3)",
|
|
10908
|
+
quaternary: "var(--chart-4)",
|
|
10909
|
+
quinary: "var(--chart-5)",
|
|
10910
|
+
// Semantic colors (fixed values)
|
|
10911
|
+
success: "#22a55b",
|
|
10912
|
+
warning: "#f59e0b",
|
|
10913
|
+
error: "#ef4444",
|
|
10914
|
+
info: "var(--chart-1)",
|
|
10915
|
+
// Neutral - uses theme variables
|
|
10916
|
+
muted: "var(--muted-foreground)",
|
|
10917
|
+
foreground: "var(--foreground)",
|
|
10918
|
+
background: "var(--background)",
|
|
10919
|
+
grid: "var(--border)"
|
|
10920
|
+
};
|
|
10921
|
+
var CHART_PALETTE = [
|
|
10922
|
+
CHART_COLORS.primary,
|
|
10923
|
+
CHART_COLORS.secondary,
|
|
10924
|
+
CHART_COLORS.tertiary,
|
|
10925
|
+
CHART_COLORS.quaternary,
|
|
10926
|
+
CHART_COLORS.quinary,
|
|
10927
|
+
CHART_COLORS.success,
|
|
10928
|
+
CHART_COLORS.warning,
|
|
10929
|
+
CHART_COLORS.error
|
|
10930
|
+
];
|
|
10931
|
+
var getThemeColors = () => {
|
|
10932
|
+
const chart1 = getCSSVariable("--chart-1");
|
|
10933
|
+
const primary = getCSSVariable("--primary");
|
|
10934
|
+
return {
|
|
10935
|
+
primary: chart1 || primary || "#007bff",
|
|
10936
|
+
chart1: chart1 || "#007bff",
|
|
10937
|
+
chart2: getCSSVariable("--chart-2") || "#3d9bff",
|
|
10938
|
+
chart3: getCSSVariable("--chart-3") || "#7abaff",
|
|
10939
|
+
chart4: getCSSVariable("--chart-4") || "#0563c7",
|
|
10940
|
+
chart5: getCSSVariable("--chart-5") || "#084f9b",
|
|
10941
|
+
foreground: getCSSVariable("--foreground") || "#23252a",
|
|
10942
|
+
muted: getCSSVariable("--muted-foreground") || "#616875",
|
|
10943
|
+
grid: getCSSVariable("--border") || "#dbdde1",
|
|
10944
|
+
background: getCSSVariable("--background") || "#fff"
|
|
10945
|
+
};
|
|
10946
|
+
};
|
|
10947
|
+
var tooltipStyle = {
|
|
10948
|
+
backgroundColor: "var(--popover)",
|
|
10949
|
+
border: "1px solid var(--border)",
|
|
10950
|
+
borderRadius: "6px",
|
|
10951
|
+
padding: "8px 12px",
|
|
10952
|
+
boxShadow: "0 4px 6px -1px rgb(0 0 0 / 0.1)",
|
|
10953
|
+
color: "var(--foreground)"
|
|
10954
|
+
};
|
|
10955
|
+
var legendStyle = {
|
|
10956
|
+
fontSize: "12px",
|
|
10957
|
+
color: "var(--muted-foreground, #616875)"
|
|
10958
|
+
};
|
|
10959
|
+
function LineChart({
|
|
10960
|
+
data,
|
|
10961
|
+
xAxisKey,
|
|
10962
|
+
lines,
|
|
10963
|
+
width = "100%",
|
|
10964
|
+
height = 300,
|
|
10965
|
+
showGrid = true,
|
|
10966
|
+
showTooltip = true,
|
|
10967
|
+
showLegend = true,
|
|
10968
|
+
showXAxis = true,
|
|
10969
|
+
showYAxis = true,
|
|
10970
|
+
margin = { top: 20, right: 30, left: 20, bottom: 5 },
|
|
10971
|
+
className
|
|
10972
|
+
}) {
|
|
10973
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className, children: /* @__PURE__ */ jsxRuntime.jsx(recharts.ResponsiveContainer, { width, height, children: /* @__PURE__ */ jsxRuntime.jsxs(recharts.LineChart, { data, margin, children: [
|
|
10974
|
+
showGrid && /* @__PURE__ */ jsxRuntime.jsx(
|
|
10975
|
+
recharts.CartesianGrid,
|
|
10976
|
+
{
|
|
10977
|
+
strokeDasharray: "3 3",
|
|
10978
|
+
stroke: CHART_COLORS.grid,
|
|
10979
|
+
strokeOpacity: 0.5
|
|
10980
|
+
}
|
|
10981
|
+
),
|
|
10982
|
+
showXAxis && /* @__PURE__ */ jsxRuntime.jsx(
|
|
10983
|
+
recharts.XAxis,
|
|
10984
|
+
{
|
|
10985
|
+
dataKey: xAxisKey,
|
|
10986
|
+
stroke: CHART_COLORS.muted,
|
|
10987
|
+
fontSize: 12,
|
|
10988
|
+
tickLine: false,
|
|
10989
|
+
axisLine: false
|
|
10990
|
+
}
|
|
10991
|
+
),
|
|
10992
|
+
showYAxis && /* @__PURE__ */ jsxRuntime.jsx(
|
|
10993
|
+
recharts.YAxis,
|
|
10994
|
+
{
|
|
10995
|
+
stroke: CHART_COLORS.muted,
|
|
10996
|
+
fontSize: 12,
|
|
10997
|
+
tickLine: false,
|
|
10998
|
+
axisLine: false
|
|
10999
|
+
}
|
|
11000
|
+
),
|
|
11001
|
+
showTooltip && /* @__PURE__ */ jsxRuntime.jsx(
|
|
11002
|
+
recharts.Tooltip,
|
|
11003
|
+
{
|
|
11004
|
+
contentStyle: tooltipStyle,
|
|
11005
|
+
labelStyle: { color: CHART_COLORS.foreground, fontWeight: 500 }
|
|
11006
|
+
}
|
|
11007
|
+
),
|
|
11008
|
+
showLegend && /* @__PURE__ */ jsxRuntime.jsx(recharts.Legend, {}),
|
|
11009
|
+
lines.map((line, index) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
11010
|
+
recharts.Line,
|
|
11011
|
+
{
|
|
11012
|
+
type: line.type ?? "monotone",
|
|
11013
|
+
dataKey: line.dataKey,
|
|
11014
|
+
name: line.name ?? line.dataKey,
|
|
11015
|
+
stroke: line.stroke ?? CHART_PALETTE[index % CHART_PALETTE.length],
|
|
11016
|
+
strokeWidth: line.strokeWidth ?? 2,
|
|
11017
|
+
dot: line.dot ?? false,
|
|
11018
|
+
activeDot: { r: 4 }
|
|
11019
|
+
},
|
|
11020
|
+
line.dataKey
|
|
11021
|
+
))
|
|
11022
|
+
] }) }) });
|
|
11023
|
+
}
|
|
11024
|
+
function BarChart({
|
|
11025
|
+
data,
|
|
11026
|
+
xAxisKey,
|
|
11027
|
+
bars,
|
|
11028
|
+
width = "100%",
|
|
11029
|
+
height = 300,
|
|
11030
|
+
showGrid = true,
|
|
11031
|
+
showTooltip = true,
|
|
11032
|
+
showLegend = true,
|
|
11033
|
+
layout = "horizontal",
|
|
11034
|
+
margin,
|
|
11035
|
+
className
|
|
11036
|
+
}) {
|
|
11037
|
+
const defaultMargin = layout === "vertical" ? { top: 20, right: 30, left: 60, bottom: 5 } : { top: 20, right: 30, left: 20, bottom: 5 };
|
|
11038
|
+
const chartMargin = margin ?? defaultMargin;
|
|
11039
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className, children: /* @__PURE__ */ jsxRuntime.jsx(recharts.ResponsiveContainer, { width, height, children: /* @__PURE__ */ jsxRuntime.jsxs(recharts.BarChart, { data, layout, margin: chartMargin, children: [
|
|
11040
|
+
showGrid && /* @__PURE__ */ jsxRuntime.jsx(
|
|
11041
|
+
recharts.CartesianGrid,
|
|
11042
|
+
{
|
|
11043
|
+
strokeDasharray: "3 3",
|
|
11044
|
+
stroke: CHART_COLORS.grid,
|
|
11045
|
+
strokeOpacity: 0.5
|
|
11046
|
+
}
|
|
11047
|
+
),
|
|
11048
|
+
layout === "horizontal" ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
11049
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
11050
|
+
recharts.XAxis,
|
|
11051
|
+
{
|
|
11052
|
+
dataKey: xAxisKey,
|
|
11053
|
+
stroke: CHART_COLORS.muted,
|
|
11054
|
+
fontSize: 12,
|
|
11055
|
+
tickLine: false,
|
|
11056
|
+
axisLine: false
|
|
11057
|
+
}
|
|
11058
|
+
),
|
|
11059
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
11060
|
+
recharts.YAxis,
|
|
11061
|
+
{
|
|
11062
|
+
stroke: CHART_COLORS.muted,
|
|
11063
|
+
fontSize: 12,
|
|
11064
|
+
tickLine: false,
|
|
11065
|
+
axisLine: false
|
|
11066
|
+
}
|
|
11067
|
+
)
|
|
11068
|
+
] }) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
11069
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
11070
|
+
recharts.XAxis,
|
|
11071
|
+
{
|
|
11072
|
+
type: "number",
|
|
11073
|
+
domain: [0, "dataMax"],
|
|
11074
|
+
stroke: CHART_COLORS.muted,
|
|
11075
|
+
fontSize: 12,
|
|
11076
|
+
tickLine: false,
|
|
11077
|
+
axisLine: false
|
|
11078
|
+
}
|
|
11079
|
+
),
|
|
11080
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
11081
|
+
recharts.YAxis,
|
|
11082
|
+
{
|
|
11083
|
+
dataKey: xAxisKey,
|
|
11084
|
+
type: "category",
|
|
11085
|
+
width: 80,
|
|
11086
|
+
stroke: CHART_COLORS.muted,
|
|
11087
|
+
fontSize: 12,
|
|
11088
|
+
tickLine: false,
|
|
11089
|
+
axisLine: false
|
|
11090
|
+
}
|
|
11091
|
+
)
|
|
11092
|
+
] }),
|
|
11093
|
+
showTooltip && /* @__PURE__ */ jsxRuntime.jsx(
|
|
11094
|
+
recharts.Tooltip,
|
|
11095
|
+
{
|
|
11096
|
+
contentStyle: tooltipStyle,
|
|
11097
|
+
labelStyle: { color: CHART_COLORS.foreground, fontWeight: 500 }
|
|
11098
|
+
}
|
|
11099
|
+
),
|
|
11100
|
+
showLegend && /* @__PURE__ */ jsxRuntime.jsx(recharts.Legend, {}),
|
|
11101
|
+
bars.map((bar, index) => {
|
|
11102
|
+
const defaultRadius = layout === "vertical" ? [0, 4, 4, 0] : [4, 4, 0, 0];
|
|
11103
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
11104
|
+
recharts.Bar,
|
|
11105
|
+
{
|
|
11106
|
+
dataKey: bar.dataKey,
|
|
11107
|
+
name: bar.name ?? bar.dataKey,
|
|
11108
|
+
fill: bar.fill ?? CHART_PALETTE[index % CHART_PALETTE.length],
|
|
11109
|
+
stackId: bar.stackId,
|
|
11110
|
+
radius: bar.radius ?? defaultRadius
|
|
11111
|
+
},
|
|
11112
|
+
bar.dataKey
|
|
11113
|
+
);
|
|
11114
|
+
})
|
|
11115
|
+
] }) }) });
|
|
11116
|
+
}
|
|
11117
|
+
function PieChart({
|
|
11118
|
+
data,
|
|
11119
|
+
dataKey = "value",
|
|
11120
|
+
nameKey = "name",
|
|
11121
|
+
width = "100%",
|
|
11122
|
+
height = 300,
|
|
11123
|
+
showTooltip = true,
|
|
11124
|
+
showLegend = true,
|
|
11125
|
+
innerRadius = 0,
|
|
11126
|
+
outerRadius = 80,
|
|
11127
|
+
showLabel = false,
|
|
11128
|
+
margin = { top: 20, right: 30, left: 20, bottom: 5 },
|
|
11129
|
+
className
|
|
11130
|
+
}) {
|
|
11131
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className, children: /* @__PURE__ */ jsxRuntime.jsx(recharts.ResponsiveContainer, { width, height, children: /* @__PURE__ */ jsxRuntime.jsxs(recharts.PieChart, { margin, children: [
|
|
11132
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
11133
|
+
recharts.Pie,
|
|
11134
|
+
{
|
|
11135
|
+
data,
|
|
11136
|
+
dataKey,
|
|
11137
|
+
nameKey,
|
|
11138
|
+
cx: "50%",
|
|
11139
|
+
cy: "50%",
|
|
11140
|
+
innerRadius,
|
|
11141
|
+
outerRadius,
|
|
11142
|
+
label: showLabel,
|
|
11143
|
+
labelLine: showLabel,
|
|
11144
|
+
children: data.map((entry, index) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
11145
|
+
recharts.Cell,
|
|
11146
|
+
{
|
|
11147
|
+
fill: entry.fill ?? CHART_PALETTE[index % CHART_PALETTE.length]
|
|
11148
|
+
},
|
|
11149
|
+
`cell-${index}`
|
|
11150
|
+
))
|
|
11151
|
+
}
|
|
11152
|
+
),
|
|
11153
|
+
showTooltip && /* @__PURE__ */ jsxRuntime.jsx(
|
|
11154
|
+
recharts.Tooltip,
|
|
11155
|
+
{
|
|
11156
|
+
contentStyle: tooltipStyle,
|
|
11157
|
+
labelStyle: { color: CHART_COLORS.foreground, fontWeight: 500 }
|
|
11158
|
+
}
|
|
11159
|
+
),
|
|
11160
|
+
showLegend && /* @__PURE__ */ jsxRuntime.jsx(recharts.Legend, {})
|
|
11161
|
+
] }) }) });
|
|
11162
|
+
}
|
|
11163
|
+
function AreaChart({
|
|
11164
|
+
data,
|
|
11165
|
+
xAxisKey,
|
|
11166
|
+
areas,
|
|
11167
|
+
width = "100%",
|
|
11168
|
+
height = 300,
|
|
11169
|
+
showGrid = true,
|
|
11170
|
+
showTooltip = true,
|
|
11171
|
+
showLegend = true,
|
|
11172
|
+
margin = { top: 20, right: 30, left: 20, bottom: 5 },
|
|
11173
|
+
className
|
|
11174
|
+
}) {
|
|
11175
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className, children: /* @__PURE__ */ jsxRuntime.jsx(recharts.ResponsiveContainer, { width, height, children: /* @__PURE__ */ jsxRuntime.jsxs(recharts.AreaChart, { data, margin, children: [
|
|
11176
|
+
showGrid && /* @__PURE__ */ jsxRuntime.jsx(
|
|
11177
|
+
recharts.CartesianGrid,
|
|
11178
|
+
{
|
|
11179
|
+
strokeDasharray: "3 3",
|
|
11180
|
+
stroke: CHART_COLORS.grid,
|
|
11181
|
+
strokeOpacity: 0.5
|
|
11182
|
+
}
|
|
11183
|
+
),
|
|
11184
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
11185
|
+
recharts.XAxis,
|
|
11186
|
+
{
|
|
11187
|
+
dataKey: xAxisKey,
|
|
11188
|
+
stroke: CHART_COLORS.muted,
|
|
11189
|
+
fontSize: 12,
|
|
11190
|
+
tickLine: false,
|
|
11191
|
+
axisLine: false
|
|
11192
|
+
}
|
|
11193
|
+
),
|
|
11194
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
11195
|
+
recharts.YAxis,
|
|
11196
|
+
{
|
|
11197
|
+
stroke: CHART_COLORS.muted,
|
|
11198
|
+
fontSize: 12,
|
|
11199
|
+
tickLine: false,
|
|
11200
|
+
axisLine: false
|
|
11201
|
+
}
|
|
11202
|
+
),
|
|
11203
|
+
showTooltip && /* @__PURE__ */ jsxRuntime.jsx(
|
|
11204
|
+
recharts.Tooltip,
|
|
11205
|
+
{
|
|
11206
|
+
contentStyle: tooltipStyle,
|
|
11207
|
+
labelStyle: { color: CHART_COLORS.foreground, fontWeight: 500 }
|
|
11208
|
+
}
|
|
11209
|
+
),
|
|
11210
|
+
showLegend && /* @__PURE__ */ jsxRuntime.jsx(recharts.Legend, {}),
|
|
11211
|
+
areas.map((area, index) => {
|
|
11212
|
+
const color = area.stroke ?? CHART_PALETTE[index % CHART_PALETTE.length];
|
|
11213
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
11214
|
+
recharts.Area,
|
|
11215
|
+
{
|
|
11216
|
+
type: area.type ?? "monotone",
|
|
11217
|
+
dataKey: area.dataKey,
|
|
11218
|
+
name: area.name ?? area.dataKey,
|
|
11219
|
+
stroke: color,
|
|
11220
|
+
fill: area.fill ?? color,
|
|
11221
|
+
fillOpacity: area.fillOpacity ?? 0.3,
|
|
11222
|
+
stackId: area.stackId
|
|
11223
|
+
},
|
|
11224
|
+
area.dataKey
|
|
11225
|
+
);
|
|
11226
|
+
})
|
|
11227
|
+
] }) }) });
|
|
11228
|
+
}
|
|
11229
|
+
function ScatterChart({
|
|
11230
|
+
series,
|
|
11231
|
+
xAxisKey,
|
|
11232
|
+
yAxisKey,
|
|
11233
|
+
zAxisKey,
|
|
11234
|
+
width = "100%",
|
|
11235
|
+
height = 300,
|
|
11236
|
+
showGrid = true,
|
|
11237
|
+
showTooltip = true,
|
|
11238
|
+
showLegend = true,
|
|
11239
|
+
margin = { top: 20, right: 30, left: 20, bottom: 5 },
|
|
11240
|
+
className
|
|
11241
|
+
}) {
|
|
11242
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className, children: /* @__PURE__ */ jsxRuntime.jsx(recharts.ResponsiveContainer, { width, height, children: /* @__PURE__ */ jsxRuntime.jsxs(recharts.ScatterChart, { margin, children: [
|
|
11243
|
+
showGrid && /* @__PURE__ */ jsxRuntime.jsx(
|
|
11244
|
+
recharts.CartesianGrid,
|
|
11245
|
+
{
|
|
11246
|
+
strokeDasharray: "3 3",
|
|
11247
|
+
stroke: CHART_COLORS.grid,
|
|
11248
|
+
strokeOpacity: 0.5
|
|
11249
|
+
}
|
|
11250
|
+
),
|
|
11251
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
11252
|
+
recharts.XAxis,
|
|
11253
|
+
{
|
|
11254
|
+
dataKey: xAxisKey,
|
|
11255
|
+
type: "number",
|
|
11256
|
+
stroke: CHART_COLORS.muted,
|
|
11257
|
+
fontSize: 12,
|
|
11258
|
+
tickLine: false,
|
|
11259
|
+
axisLine: false
|
|
11260
|
+
}
|
|
11261
|
+
),
|
|
11262
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
11263
|
+
recharts.YAxis,
|
|
11264
|
+
{
|
|
11265
|
+
dataKey: yAxisKey,
|
|
11266
|
+
type: "number",
|
|
11267
|
+
stroke: CHART_COLORS.muted,
|
|
11268
|
+
fontSize: 12,
|
|
11269
|
+
tickLine: false,
|
|
11270
|
+
axisLine: false
|
|
11271
|
+
}
|
|
11272
|
+
),
|
|
11273
|
+
zAxisKey && /* @__PURE__ */ jsxRuntime.jsx(recharts.ZAxis, { dataKey: zAxisKey, range: [60, 400] }),
|
|
11274
|
+
showTooltip && /* @__PURE__ */ jsxRuntime.jsx(
|
|
11275
|
+
recharts.Tooltip,
|
|
11276
|
+
{
|
|
11277
|
+
contentStyle: tooltipStyle,
|
|
11278
|
+
labelStyle: { color: CHART_COLORS.foreground, fontWeight: 500 },
|
|
11279
|
+
cursor: { strokeDasharray: "3 3" }
|
|
11280
|
+
}
|
|
11281
|
+
),
|
|
11282
|
+
showLegend && /* @__PURE__ */ jsxRuntime.jsx(recharts.Legend, {}),
|
|
11283
|
+
series.map((s, index) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
11284
|
+
recharts.Scatter,
|
|
11285
|
+
{
|
|
11286
|
+
name: s.name,
|
|
11287
|
+
data: s.data,
|
|
11288
|
+
fill: s.fill ?? CHART_PALETTE[index % CHART_PALETTE.length]
|
|
11289
|
+
},
|
|
11290
|
+
s.name
|
|
11291
|
+
))
|
|
11292
|
+
] }) }) });
|
|
11293
|
+
}
|
|
11294
|
+
function RadarChart({
|
|
11295
|
+
data,
|
|
11296
|
+
angleKey,
|
|
11297
|
+
radars,
|
|
11298
|
+
width = "100%",
|
|
11299
|
+
height = 300,
|
|
11300
|
+
showTooltip = true,
|
|
11301
|
+
showLegend = true,
|
|
11302
|
+
outerRadius = "80%",
|
|
11303
|
+
margin = { top: 20, right: 30, left: 20, bottom: 5 },
|
|
11304
|
+
domain,
|
|
11305
|
+
className
|
|
11306
|
+
}) {
|
|
11307
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className, children: /* @__PURE__ */ jsxRuntime.jsx(recharts.ResponsiveContainer, { width, height, children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
11308
|
+
recharts.RadarChart,
|
|
11309
|
+
{
|
|
11310
|
+
data,
|
|
11311
|
+
margin,
|
|
11312
|
+
outerRadius,
|
|
11313
|
+
children: [
|
|
11314
|
+
/* @__PURE__ */ jsxRuntime.jsx(recharts.PolarGrid, { stroke: CHART_COLORS.grid, strokeOpacity: 0.5 }),
|
|
11315
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
11316
|
+
recharts.PolarAngleAxis,
|
|
11317
|
+
{
|
|
11318
|
+
dataKey: angleKey,
|
|
11319
|
+
stroke: CHART_COLORS.muted,
|
|
11320
|
+
fontSize: 12
|
|
11321
|
+
}
|
|
11322
|
+
),
|
|
11323
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
11324
|
+
recharts.PolarRadiusAxis,
|
|
11325
|
+
{
|
|
11326
|
+
stroke: CHART_COLORS.muted,
|
|
11327
|
+
fontSize: 10,
|
|
11328
|
+
angle: 90,
|
|
11329
|
+
domain
|
|
11330
|
+
}
|
|
11331
|
+
),
|
|
11332
|
+
showTooltip && /* @__PURE__ */ jsxRuntime.jsx(
|
|
11333
|
+
recharts.Tooltip,
|
|
11334
|
+
{
|
|
11335
|
+
contentStyle: tooltipStyle,
|
|
11336
|
+
labelStyle: { color: CHART_COLORS.foreground, fontWeight: 500 }
|
|
11337
|
+
}
|
|
11338
|
+
),
|
|
11339
|
+
showLegend && /* @__PURE__ */ jsxRuntime.jsx(recharts.Legend, {}),
|
|
11340
|
+
radars.map((radar, index) => {
|
|
11341
|
+
const color = radar.stroke ?? CHART_PALETTE[index % CHART_PALETTE.length];
|
|
11342
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
11343
|
+
recharts.Radar,
|
|
11344
|
+
{
|
|
11345
|
+
name: radar.name ?? radar.dataKey,
|
|
11346
|
+
dataKey: radar.dataKey,
|
|
11347
|
+
stroke: color,
|
|
11348
|
+
fill: radar.fill ?? color,
|
|
11349
|
+
fillOpacity: radar.fillOpacity ?? 0.3
|
|
11350
|
+
},
|
|
11351
|
+
radar.dataKey
|
|
11352
|
+
);
|
|
11353
|
+
})
|
|
11354
|
+
]
|
|
11355
|
+
}
|
|
11356
|
+
) }) });
|
|
11357
|
+
}
|
|
11358
|
+
var THEMES = {
|
|
11359
|
+
default: "default",
|
|
11360
|
+
sunset: "sunset",
|
|
11361
|
+
lavender: "lavender",
|
|
11362
|
+
rose: "rose",
|
|
11363
|
+
slate: "slate",
|
|
11364
|
+
midnight: "midnight",
|
|
11365
|
+
emerald: "emerald",
|
|
11366
|
+
amber: "amber",
|
|
11367
|
+
crimson: "crimson"
|
|
11368
|
+
};
|
|
11369
|
+
var THEME_CATALOG = [
|
|
11370
|
+
{
|
|
11371
|
+
name: "default",
|
|
11372
|
+
label: "Default (Toss Blue)",
|
|
11373
|
+
description: "Clean, professional blue theme",
|
|
11374
|
+
primaryColor: "hsl(211, 100%, 50%)"
|
|
11375
|
+
},
|
|
11376
|
+
{
|
|
11377
|
+
name: "sunset",
|
|
11378
|
+
label: "Sunset",
|
|
11379
|
+
description: "Warm orange for energy and creativity",
|
|
11380
|
+
primaryColor: "hsl(24, 95%, 53%)"
|
|
11381
|
+
},
|
|
11382
|
+
{
|
|
11383
|
+
name: "lavender",
|
|
11384
|
+
label: "Lavender",
|
|
11385
|
+
description: "Elegant purple for creative projects",
|
|
11386
|
+
primaryColor: "hsl(262, 83%, 58%)"
|
|
11387
|
+
},
|
|
11388
|
+
{
|
|
11389
|
+
name: "rose",
|
|
11390
|
+
label: "Rose",
|
|
11391
|
+
description: "Soft pink for modern, approachable design",
|
|
11392
|
+
primaryColor: "hsl(346, 77%, 50%)"
|
|
11393
|
+
},
|
|
11394
|
+
{
|
|
11395
|
+
name: "slate",
|
|
11396
|
+
label: "Slate",
|
|
11397
|
+
description: "Minimal gray for clean, professional look",
|
|
11398
|
+
primaryColor: "hsl(215, 16%, 47%)"
|
|
11399
|
+
},
|
|
11400
|
+
{
|
|
11401
|
+
name: "midnight",
|
|
11402
|
+
label: "Midnight",
|
|
11403
|
+
description: "Deep purple-blue optimized for dark mode",
|
|
11404
|
+
primaryColor: "hsl(240, 65%, 52%)"
|
|
11405
|
+
},
|
|
11406
|
+
{
|
|
11407
|
+
name: "emerald",
|
|
11408
|
+
label: "Emerald",
|
|
11409
|
+
description: "Fresh teal-green for tech-forward apps",
|
|
11410
|
+
primaryColor: "hsl(160, 84%, 39%)"
|
|
11411
|
+
},
|
|
11412
|
+
{
|
|
11413
|
+
name: "amber",
|
|
11414
|
+
label: "Amber",
|
|
11415
|
+
description: "Premium gold for attention-grabbing UI",
|
|
11416
|
+
primaryColor: "hsl(38, 92%, 50%)"
|
|
11417
|
+
},
|
|
11418
|
+
{
|
|
11419
|
+
name: "crimson",
|
|
11420
|
+
label: "Crimson",
|
|
11421
|
+
description: "Bold red for urgent, passionate design",
|
|
11422
|
+
primaryColor: "hsl(0, 84%, 50%)"
|
|
11423
|
+
}
|
|
11424
|
+
];
|
|
11425
|
+
function getCurrentTheme() {
|
|
11426
|
+
if (typeof document === "undefined") return "default";
|
|
11427
|
+
const html = document.documentElement;
|
|
11428
|
+
for (const theme of Object.keys(THEMES)) {
|
|
11429
|
+
if (theme !== "default" && html.classList.contains(`theme-${theme}`)) {
|
|
11430
|
+
return theme;
|
|
11431
|
+
}
|
|
11432
|
+
}
|
|
11433
|
+
return "default";
|
|
11434
|
+
}
|
|
11435
|
+
function getCurrentMode() {
|
|
11436
|
+
if (typeof document === "undefined") return "light";
|
|
11437
|
+
return document.documentElement.classList.contains("dark") ? "dark" : "light";
|
|
11438
|
+
}
|
|
11439
|
+
function setTheme(theme) {
|
|
11440
|
+
if (typeof document === "undefined") return;
|
|
11441
|
+
const html = document.documentElement;
|
|
11442
|
+
for (const t of Object.keys(THEMES)) {
|
|
11443
|
+
if (t !== "default") {
|
|
11444
|
+
html.classList.remove(`theme-${t}`);
|
|
11445
|
+
}
|
|
11446
|
+
}
|
|
11447
|
+
if (theme !== "default") {
|
|
11448
|
+
html.classList.add(`theme-${theme}`);
|
|
11449
|
+
}
|
|
11450
|
+
try {
|
|
11451
|
+
localStorage.setItem("mvn-theme", theme);
|
|
11452
|
+
} catch {
|
|
11453
|
+
}
|
|
11454
|
+
}
|
|
11455
|
+
function setMode(mode) {
|
|
11456
|
+
if (typeof document === "undefined") return;
|
|
11457
|
+
const html = document.documentElement;
|
|
11458
|
+
if (mode === "system") {
|
|
11459
|
+
const prefersDark = window.matchMedia("(prefers-color-scheme: dark)").matches;
|
|
11460
|
+
html.classList.toggle("dark", prefersDark);
|
|
11461
|
+
} else {
|
|
11462
|
+
html.classList.toggle("dark", mode === "dark");
|
|
11463
|
+
}
|
|
11464
|
+
try {
|
|
11465
|
+
localStorage.setItem("mvn-mode", mode);
|
|
11466
|
+
} catch {
|
|
11467
|
+
}
|
|
11468
|
+
}
|
|
11469
|
+
function initializeTheme() {
|
|
11470
|
+
if (typeof window === "undefined") return;
|
|
11471
|
+
try {
|
|
11472
|
+
const savedTheme = localStorage.getItem("mvn-theme");
|
|
11473
|
+
const savedMode = localStorage.getItem("mvn-mode");
|
|
11474
|
+
if (savedTheme && savedTheme in THEMES) {
|
|
11475
|
+
setTheme(savedTheme);
|
|
11476
|
+
}
|
|
11477
|
+
if (savedMode) {
|
|
11478
|
+
setMode(savedMode);
|
|
11479
|
+
} else {
|
|
11480
|
+
setMode("system");
|
|
11481
|
+
}
|
|
11482
|
+
} catch {
|
|
11483
|
+
}
|
|
11484
|
+
}
|
|
11485
|
+
var ThemeContext = React50.createContext(void 0);
|
|
11486
|
+
function ThemeProvider({
|
|
11487
|
+
children,
|
|
11488
|
+
defaultTheme = "default",
|
|
11489
|
+
defaultMode = "system",
|
|
11490
|
+
storageKey = "mvn-theme"
|
|
11491
|
+
}) {
|
|
11492
|
+
const [theme, setThemeState] = React50.useState(defaultTheme);
|
|
11493
|
+
const [mode, setModeState] = React50.useState(defaultMode);
|
|
11494
|
+
const [resolvedMode, setResolvedMode] = React50.useState("light");
|
|
11495
|
+
React50.useEffect(() => {
|
|
11496
|
+
try {
|
|
11497
|
+
const savedTheme = localStorage.getItem(storageKey);
|
|
11498
|
+
const savedMode = localStorage.getItem(`${storageKey}-mode`);
|
|
11499
|
+
if (savedTheme && savedTheme in THEMES) {
|
|
11500
|
+
setThemeState(savedTheme);
|
|
11501
|
+
}
|
|
11502
|
+
if (savedMode) {
|
|
11503
|
+
setModeState(savedMode);
|
|
11504
|
+
}
|
|
11505
|
+
} catch {
|
|
11506
|
+
}
|
|
11507
|
+
}, [storageKey]);
|
|
11508
|
+
React50.useEffect(() => {
|
|
11509
|
+
const html = document.documentElement;
|
|
11510
|
+
for (const t of Object.keys(THEMES)) {
|
|
11511
|
+
if (t !== "default") {
|
|
11512
|
+
html.classList.remove(`theme-${t}`);
|
|
11513
|
+
}
|
|
11514
|
+
}
|
|
11515
|
+
if (theme !== "default") {
|
|
11516
|
+
html.classList.add(`theme-${theme}`);
|
|
11517
|
+
}
|
|
11518
|
+
try {
|
|
11519
|
+
localStorage.setItem(storageKey, theme);
|
|
11520
|
+
} catch {
|
|
11521
|
+
}
|
|
11522
|
+
}, [theme, storageKey]);
|
|
11523
|
+
React50.useEffect(() => {
|
|
11524
|
+
const html = document.documentElement;
|
|
11525
|
+
const applyMode = (isDark) => {
|
|
11526
|
+
html.classList.toggle("dark", isDark);
|
|
11527
|
+
setResolvedMode(isDark ? "dark" : "light");
|
|
11528
|
+
};
|
|
11529
|
+
if (mode === "system") {
|
|
11530
|
+
const mediaQuery = window.matchMedia("(prefers-color-scheme: dark)");
|
|
11531
|
+
applyMode(mediaQuery.matches);
|
|
11532
|
+
const handler = (e) => applyMode(e.matches);
|
|
11533
|
+
mediaQuery.addEventListener("change", handler);
|
|
11534
|
+
return () => mediaQuery.removeEventListener("change", handler);
|
|
11535
|
+
} else {
|
|
11536
|
+
applyMode(mode === "dark");
|
|
11537
|
+
}
|
|
11538
|
+
try {
|
|
11539
|
+
localStorage.setItem(`${storageKey}-mode`, mode);
|
|
11540
|
+
} catch {
|
|
11541
|
+
}
|
|
11542
|
+
}, [mode, storageKey]);
|
|
11543
|
+
const value = {
|
|
11544
|
+
theme,
|
|
11545
|
+
mode,
|
|
11546
|
+
resolvedMode,
|
|
11547
|
+
setTheme: setThemeState,
|
|
11548
|
+
setMode: setModeState
|
|
11549
|
+
};
|
|
11550
|
+
return /* @__PURE__ */ jsxRuntime.jsx(ThemeContext.Provider, { value, children });
|
|
11551
|
+
}
|
|
11552
|
+
function useTheme2() {
|
|
11553
|
+
const context = React50.useContext(ThemeContext);
|
|
11554
|
+
if (!context) {
|
|
11555
|
+
throw new Error("useTheme must be used within a ThemeProvider");
|
|
11556
|
+
}
|
|
11557
|
+
return context;
|
|
11558
|
+
}
|
|
11559
|
+
|
|
10556
11560
|
Object.defineProperty(exports, "toast", {
|
|
10557
11561
|
enumerable: true,
|
|
10558
11562
|
get: function () { return sonner.toast; }
|
|
10559
11563
|
});
|
|
11564
|
+
Object.defineProperty(exports, "Area", {
|
|
11565
|
+
enumerable: true,
|
|
11566
|
+
get: function () { return recharts.Area; }
|
|
11567
|
+
});
|
|
11568
|
+
Object.defineProperty(exports, "Bar", {
|
|
11569
|
+
enumerable: true,
|
|
11570
|
+
get: function () { return recharts.Bar; }
|
|
11571
|
+
});
|
|
11572
|
+
Object.defineProperty(exports, "Brush", {
|
|
11573
|
+
enumerable: true,
|
|
11574
|
+
get: function () { return recharts.Brush; }
|
|
11575
|
+
});
|
|
11576
|
+
Object.defineProperty(exports, "CartesianGrid", {
|
|
11577
|
+
enumerable: true,
|
|
11578
|
+
get: function () { return recharts.CartesianGrid; }
|
|
11579
|
+
});
|
|
11580
|
+
Object.defineProperty(exports, "Cell", {
|
|
11581
|
+
enumerable: true,
|
|
11582
|
+
get: function () { return recharts.Cell; }
|
|
11583
|
+
});
|
|
11584
|
+
Object.defineProperty(exports, "ChartLegend", {
|
|
11585
|
+
enumerable: true,
|
|
11586
|
+
get: function () { return recharts.Legend; }
|
|
11587
|
+
});
|
|
11588
|
+
Object.defineProperty(exports, "ChartTooltip", {
|
|
11589
|
+
enumerable: true,
|
|
11590
|
+
get: function () { return recharts.Tooltip; }
|
|
11591
|
+
});
|
|
11592
|
+
Object.defineProperty(exports, "Line", {
|
|
11593
|
+
enumerable: true,
|
|
11594
|
+
get: function () { return recharts.Line; }
|
|
11595
|
+
});
|
|
11596
|
+
Object.defineProperty(exports, "Pie", {
|
|
11597
|
+
enumerable: true,
|
|
11598
|
+
get: function () { return recharts.Pie; }
|
|
11599
|
+
});
|
|
11600
|
+
Object.defineProperty(exports, "PolarAngleAxis", {
|
|
11601
|
+
enumerable: true,
|
|
11602
|
+
get: function () { return recharts.PolarAngleAxis; }
|
|
11603
|
+
});
|
|
11604
|
+
Object.defineProperty(exports, "PolarGrid", {
|
|
11605
|
+
enumerable: true,
|
|
11606
|
+
get: function () { return recharts.PolarGrid; }
|
|
11607
|
+
});
|
|
11608
|
+
Object.defineProperty(exports, "PolarRadiusAxis", {
|
|
11609
|
+
enumerable: true,
|
|
11610
|
+
get: function () { return recharts.PolarRadiusAxis; }
|
|
11611
|
+
});
|
|
11612
|
+
Object.defineProperty(exports, "Radar", {
|
|
11613
|
+
enumerable: true,
|
|
11614
|
+
get: function () { return recharts.Radar; }
|
|
11615
|
+
});
|
|
11616
|
+
Object.defineProperty(exports, "ReferenceArea", {
|
|
11617
|
+
enumerable: true,
|
|
11618
|
+
get: function () { return recharts.ReferenceArea; }
|
|
11619
|
+
});
|
|
11620
|
+
Object.defineProperty(exports, "ReferenceLine", {
|
|
11621
|
+
enumerable: true,
|
|
11622
|
+
get: function () { return recharts.ReferenceLine; }
|
|
11623
|
+
});
|
|
11624
|
+
Object.defineProperty(exports, "ResponsiveContainer", {
|
|
11625
|
+
enumerable: true,
|
|
11626
|
+
get: function () { return recharts.ResponsiveContainer; }
|
|
11627
|
+
});
|
|
11628
|
+
Object.defineProperty(exports, "Scatter", {
|
|
11629
|
+
enumerable: true,
|
|
11630
|
+
get: function () { return recharts.Scatter; }
|
|
11631
|
+
});
|
|
11632
|
+
Object.defineProperty(exports, "XAxis", {
|
|
11633
|
+
enumerable: true,
|
|
11634
|
+
get: function () { return recharts.XAxis; }
|
|
11635
|
+
});
|
|
11636
|
+
Object.defineProperty(exports, "YAxis", {
|
|
11637
|
+
enumerable: true,
|
|
11638
|
+
get: function () { return recharts.YAxis; }
|
|
11639
|
+
});
|
|
11640
|
+
Object.defineProperty(exports, "ZAxis", {
|
|
11641
|
+
enumerable: true,
|
|
11642
|
+
get: function () { return recharts.ZAxis; }
|
|
11643
|
+
});
|
|
10560
11644
|
exports.Accordion = Accordion;
|
|
10561
11645
|
exports.Alert = Alert;
|
|
10562
11646
|
exports.AlertDialog = AlertDialog;
|
|
@@ -10570,12 +11654,14 @@ exports.AlertDialogOverlay = AlertDialogOverlay;
|
|
|
10570
11654
|
exports.AlertDialogPortal = AlertDialogPortal;
|
|
10571
11655
|
exports.AlertDialogTitle = AlertDialogTitle;
|
|
10572
11656
|
exports.AlertDialogTrigger = AlertDialogTrigger;
|
|
11657
|
+
exports.AreaChart = AreaChart;
|
|
10573
11658
|
exports.AspectRatio = AspectRatio;
|
|
10574
11659
|
exports.Avatar = Avatar;
|
|
10575
11660
|
exports.AvatarFallback = AvatarFallback;
|
|
10576
11661
|
exports.AvatarGroup = AvatarGroup;
|
|
10577
11662
|
exports.AvatarImage = AvatarImage;
|
|
10578
11663
|
exports.Badge = Badge;
|
|
11664
|
+
exports.BarChart = BarChart;
|
|
10579
11665
|
exports.Blockquote = Blockquote;
|
|
10580
11666
|
exports.Breadcrumb = Breadcrumb;
|
|
10581
11667
|
exports.BreadcrumbEllipsis = BreadcrumbEllipsis;
|
|
@@ -10588,6 +11674,8 @@ exports.Button = Button;
|
|
|
10588
11674
|
exports.ButtonGroup = ButtonGroup;
|
|
10589
11675
|
exports.ButtonGroupSeparator = ButtonGroupSeparator;
|
|
10590
11676
|
exports.ButtonGroupText = ButtonGroupText;
|
|
11677
|
+
exports.CHART_COLORS = CHART_COLORS;
|
|
11678
|
+
exports.CHART_PALETTE = CHART_PALETTE;
|
|
10591
11679
|
exports.Calendar = Calendar;
|
|
10592
11680
|
exports.CalendarDayButton = CalendarDayButton;
|
|
10593
11681
|
exports.Carousel = Carousel;
|
|
@@ -10690,6 +11778,7 @@ exports.ItemList = ItemList;
|
|
|
10690
11778
|
exports.ItemSeparator = ItemSeparator;
|
|
10691
11779
|
exports.Label = Label;
|
|
10692
11780
|
exports.Lead = Lead;
|
|
11781
|
+
exports.LineChart = LineChart;
|
|
10693
11782
|
exports.List = List3;
|
|
10694
11783
|
exports.ListItem = ListItem;
|
|
10695
11784
|
exports.Menubar = Menubar;
|
|
@@ -10727,6 +11816,7 @@ exports.PaginationLast = PaginationLast;
|
|
|
10727
11816
|
exports.PaginationLink = PaginationLink;
|
|
10728
11817
|
exports.PaginationNext = PaginationNext;
|
|
10729
11818
|
exports.PaginationPrevious = PaginationPrevious;
|
|
11819
|
+
exports.PieChart = PieChart;
|
|
10730
11820
|
exports.Popover = Popover;
|
|
10731
11821
|
exports.PopoverAnchor = PopoverAnchor;
|
|
10732
11822
|
exports.PopoverContent = PopoverContent;
|
|
@@ -10734,11 +11824,13 @@ exports.PopoverTrigger = PopoverTrigger;
|
|
|
10734
11824
|
exports.ProductCard = ProductCard;
|
|
10735
11825
|
exports.ProfileCard = ProfileCard;
|
|
10736
11826
|
exports.Progress = Progress;
|
|
11827
|
+
exports.RadarChart = RadarChart;
|
|
10737
11828
|
exports.RadioGroup = RadioGroup;
|
|
10738
11829
|
exports.RadioGroupItem = RadioGroupItem;
|
|
10739
11830
|
exports.ResizableHandle = ResizableHandle;
|
|
10740
11831
|
exports.ResizablePanel = ResizablePanel;
|
|
10741
11832
|
exports.ResizablePanelGroup = ResizablePanelGroup;
|
|
11833
|
+
exports.ScatterChart = ScatterChart;
|
|
10742
11834
|
exports.ScrollArea = ScrollArea;
|
|
10743
11835
|
exports.ScrollBar = ScrollBar;
|
|
10744
11836
|
exports.Select = Select;
|
|
@@ -10797,6 +11889,8 @@ exports.Slider = Slider;
|
|
|
10797
11889
|
exports.Small = Small;
|
|
10798
11890
|
exports.Spinner = Spinner;
|
|
10799
11891
|
exports.Switch = Switch;
|
|
11892
|
+
exports.THEMES = THEMES;
|
|
11893
|
+
exports.THEME_CATALOG = THEME_CATALOG;
|
|
10800
11894
|
exports.Table = Table;
|
|
10801
11895
|
exports.TableBody = TableBody;
|
|
10802
11896
|
exports.TableCaption = TableCaption;
|
|
@@ -10810,6 +11904,7 @@ exports.TabsContent = TabsContent;
|
|
|
10810
11904
|
exports.TabsList = TabsList;
|
|
10811
11905
|
exports.TabsTrigger = TabsTrigger;
|
|
10812
11906
|
exports.Textarea = Textarea;
|
|
11907
|
+
exports.ThemeProvider = ThemeProvider;
|
|
10813
11908
|
exports.Toast = Toast;
|
|
10814
11909
|
exports.ToastProvider = ToastProvider;
|
|
10815
11910
|
exports.Toaster = Toaster;
|
|
@@ -10832,11 +11927,16 @@ exports.composeRules = composeRules;
|
|
|
10832
11927
|
exports.emailRule = emailRule;
|
|
10833
11928
|
exports.emptyVariants = emptyVariants;
|
|
10834
11929
|
exports.fieldVariants = fieldVariants;
|
|
11930
|
+
exports.getCurrentMode = getCurrentMode;
|
|
11931
|
+
exports.getCurrentTheme = getCurrentTheme;
|
|
10835
11932
|
exports.getInitials = getInitials;
|
|
11933
|
+
exports.getThemeColors = getThemeColors;
|
|
11934
|
+
exports.initializeTheme = initializeTheme;
|
|
10836
11935
|
exports.inputGroupVariants = inputGroupVariants;
|
|
10837
11936
|
exports.inputVariants = inputVariants;
|
|
10838
11937
|
exports.itemVariants = itemVariants;
|
|
10839
11938
|
exports.labelVariants = labelVariants;
|
|
11939
|
+
exports.legendStyle = legendStyle;
|
|
10840
11940
|
exports.maxLengthRule = maxLengthRule;
|
|
10841
11941
|
exports.maxValueRule = maxValueRule;
|
|
10842
11942
|
exports.minLengthRule = minLengthRule;
|
|
@@ -10848,6 +11948,8 @@ exports.progressVariants = progressVariants;
|
|
|
10848
11948
|
exports.radioGroupVariants = radioGroupVariants;
|
|
10849
11949
|
exports.requiredRule = requiredRule;
|
|
10850
11950
|
exports.separatorVariants = separatorVariants;
|
|
11951
|
+
exports.setMode = setMode;
|
|
11952
|
+
exports.setTheme = setTheme;
|
|
10851
11953
|
exports.skeletonVariants = skeletonVariants;
|
|
10852
11954
|
exports.spinnerVariants = spinnerVariants;
|
|
10853
11955
|
exports.tableVariants = tableVariants;
|
|
@@ -10855,10 +11957,12 @@ exports.textareaVariants = textareaVariants;
|
|
|
10855
11957
|
exports.toastVariants = toastVariants;
|
|
10856
11958
|
exports.toggleGroupVariants = toggleGroupVariants;
|
|
10857
11959
|
exports.toggleVariants = toggleVariants;
|
|
11960
|
+
exports.tooltipStyle = tooltipStyle;
|
|
10858
11961
|
exports.urlRule = urlRule;
|
|
10859
11962
|
exports.useCarousel = useCarousel;
|
|
10860
11963
|
exports.useForm = useForm;
|
|
10861
11964
|
exports.useSidebar = useSidebar;
|
|
11965
|
+
exports.useTheme = useTheme2;
|
|
10862
11966
|
exports.useToast = useToast;
|
|
10863
11967
|
exports.useWatch = useWatch;
|
|
10864
11968
|
//# sourceMappingURL=index.js.map
|