@mvn-ui/react 0.1.3 → 0.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.css +119 -28
- package/dist/index.css.map +1 -1
- package/dist/index.d.mts +455 -4
- package/dist/index.d.ts +455 -4
- package/dist/index.js +1618 -610
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1401 -492
- 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
|
}
|
|
@@ -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 = () => {
|
|
@@ -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
|
{
|
|
@@ -1200,7 +1201,7 @@ var toggleVariants = classVarianceAuthority.cva(
|
|
|
1200
1201
|
}
|
|
1201
1202
|
}
|
|
1202
1203
|
);
|
|
1203
|
-
var Toggle =
|
|
1204
|
+
var Toggle = React50__namespace.forwardRef(({ className, variant, size, icon, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1204
1205
|
TogglePrimitive__namespace.Root,
|
|
1205
1206
|
{
|
|
1206
1207
|
ref,
|
|
@@ -1246,9 +1247,9 @@ var toggleGroupItemVariants = classVarianceAuthority.cva(
|
|
|
1246
1247
|
}
|
|
1247
1248
|
}
|
|
1248
1249
|
);
|
|
1249
|
-
var ToggleGroup =
|
|
1250
|
+
var ToggleGroup = React50__namespace.forwardRef(
|
|
1250
1251
|
({ className, size, items, itemClassName, renderItem, children, ...props }, ref) => {
|
|
1251
|
-
const defaultRenderItem =
|
|
1252
|
+
const defaultRenderItem = React50__namespace.useCallback(
|
|
1252
1253
|
(item) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1253
1254
|
ToggleGroupPrimitive__namespace.Item,
|
|
1254
1255
|
{
|
|
@@ -1278,7 +1279,7 @@ var ToggleGroup = React49__namespace.forwardRef(
|
|
|
1278
1279
|
}
|
|
1279
1280
|
);
|
|
1280
1281
|
ToggleGroup.displayName = "ToggleGroup";
|
|
1281
|
-
var ToggleGroupItem =
|
|
1282
|
+
var ToggleGroupItem = React50__namespace.forwardRef(({ className, size, children, ...props }, ref) => {
|
|
1282
1283
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1283
1284
|
ToggleGroupPrimitive__namespace.Item,
|
|
1284
1285
|
{
|
|
@@ -1293,7 +1294,7 @@ ToggleGroupItem.displayName = "ToggleGroupItem";
|
|
|
1293
1294
|
|
|
1294
1295
|
// src/components/ui/slider/index.tsx
|
|
1295
1296
|
init_utils();
|
|
1296
|
-
var Slider =
|
|
1297
|
+
var Slider = React50__namespace.forwardRef(
|
|
1297
1298
|
({
|
|
1298
1299
|
className,
|
|
1299
1300
|
showValue,
|
|
@@ -1352,7 +1353,7 @@ var inputGroupVariants = classVarianceAuthority.cva("flex items-stretch w-full",
|
|
|
1352
1353
|
size: "default"
|
|
1353
1354
|
}
|
|
1354
1355
|
});
|
|
1355
|
-
var InputGroup =
|
|
1356
|
+
var InputGroup = React50__namespace.forwardRef(
|
|
1356
1357
|
({
|
|
1357
1358
|
className,
|
|
1358
1359
|
size,
|
|
@@ -1388,9 +1389,9 @@ var InputGroup = React49__namespace.forwardRef(
|
|
|
1388
1389
|
}
|
|
1389
1390
|
),
|
|
1390
1391
|
leftElement && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "inline-flex items-center", children: leftElement }),
|
|
1391
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-1 min-w-0", children:
|
|
1392
|
-
if (
|
|
1393
|
-
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, {
|
|
1394
1395
|
className: cn(
|
|
1395
1396
|
child.props.className,
|
|
1396
1397
|
(leftAddon || leftElement) && "rounded-l-none border-l-0",
|
|
@@ -1421,7 +1422,7 @@ InputGroup.displayName = "InputGroup";
|
|
|
1421
1422
|
|
|
1422
1423
|
// src/components/ui/input-otp/index.tsx
|
|
1423
1424
|
init_utils();
|
|
1424
|
-
var InputOTP =
|
|
1425
|
+
var InputOTP = React50__namespace.forwardRef(({ containerClassName, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1425
1426
|
inputOtp.OTPInput,
|
|
1426
1427
|
{
|
|
1427
1428
|
ref,
|
|
@@ -1434,10 +1435,10 @@ var InputOTP = React49__namespace.forwardRef(({ containerClassName, children, ..
|
|
|
1434
1435
|
}
|
|
1435
1436
|
));
|
|
1436
1437
|
InputOTP.displayName = "InputOTP";
|
|
1437
|
-
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 }));
|
|
1438
1439
|
InputOTPGroup.displayName = "InputOTPGroup";
|
|
1439
|
-
var InputOTPSlot =
|
|
1440
|
-
const inputOTPContext =
|
|
1440
|
+
var InputOTPSlot = React50__namespace.forwardRef(({ index, className, ...props }, ref) => {
|
|
1441
|
+
const inputOTPContext = React50__namespace.useContext(inputOtp.OTPInputContext);
|
|
1441
1442
|
if (!inputOTPContext) {
|
|
1442
1443
|
console.error("InputOTPSlot must be used within InputOTP");
|
|
1443
1444
|
return null;
|
|
@@ -1471,7 +1472,7 @@ var InputOTPSlot = React49__namespace.forwardRef(({ index, className, ...props }
|
|
|
1471
1472
|
);
|
|
1472
1473
|
});
|
|
1473
1474
|
InputOTPSlot.displayName = "InputOTPSlot";
|
|
1474
|
-
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" }) }));
|
|
1475
1476
|
InputOTPSeparator.displayName = "InputOTPSeparator";
|
|
1476
1477
|
|
|
1477
1478
|
// src/components/ui/form/form-utils.ts
|
|
@@ -1906,9 +1907,9 @@ function createFormInstance(name) {
|
|
|
1906
1907
|
}
|
|
1907
1908
|
|
|
1908
1909
|
// src/components/ui/form/form-context.tsx
|
|
1909
|
-
var FormContext =
|
|
1910
|
+
var FormContext = React50.createContext(null);
|
|
1910
1911
|
function useForm(name) {
|
|
1911
|
-
const ref =
|
|
1912
|
+
const ref = React50.useRef();
|
|
1912
1913
|
if (!ref.current) {
|
|
1913
1914
|
const instance = createFormInstance(name);
|
|
1914
1915
|
ref.current = instance;
|
|
@@ -1918,17 +1919,17 @@ function useForm(name) {
|
|
|
1918
1919
|
return ref.current;
|
|
1919
1920
|
}
|
|
1920
1921
|
function useWatch(name, formInstance) {
|
|
1921
|
-
const ctx =
|
|
1922
|
+
const ctx = React50.useContext(FormContext);
|
|
1922
1923
|
const form = formInstance ?? ctx?.form;
|
|
1923
1924
|
if (!form)
|
|
1924
1925
|
throw new Error(
|
|
1925
1926
|
"useWatch must be used inside Form or receive a form instance."
|
|
1926
1927
|
);
|
|
1927
|
-
const [state, setState] =
|
|
1928
|
+
const [state, setState] = React50.useState(() => ({
|
|
1928
1929
|
value: name === void 0 ? form.getFieldsValue() : Array.isArray(name) ? name.map((n) => form.getFieldValue(n)) : form.getFieldValue(name),
|
|
1929
1930
|
revision: 0
|
|
1930
1931
|
}));
|
|
1931
|
-
|
|
1932
|
+
React50.useEffect(() => {
|
|
1932
1933
|
const readValue = () => {
|
|
1933
1934
|
if (name === void 0) return form.getFieldsValue();
|
|
1934
1935
|
if (Array.isArray(name)) return name.map((n) => form.getFieldValue(n));
|
|
@@ -2032,7 +2033,7 @@ var maxValueRule = (max, message2) => ({
|
|
|
2032
2033
|
message: message2 || `Must be at most ${max}`
|
|
2033
2034
|
});
|
|
2034
2035
|
var composeRules = (...rules) => rules.filter(Boolean);
|
|
2035
|
-
var Form =
|
|
2036
|
+
var Form = React50.forwardRef(function Form2(props, ref) {
|
|
2036
2037
|
const {
|
|
2037
2038
|
form: formProp,
|
|
2038
2039
|
initialValues,
|
|
@@ -2044,11 +2045,11 @@ var Form = React49.forwardRef(function Form2(props, ref) {
|
|
|
2044
2045
|
onFieldsChange,
|
|
2045
2046
|
children
|
|
2046
2047
|
} = props;
|
|
2047
|
-
const createdFormRef =
|
|
2048
|
+
const createdFormRef = React50.useRef(null);
|
|
2048
2049
|
const form = formProp || (createdFormRef.current ?? (createdFormRef.current = useForm()));
|
|
2049
|
-
const initialAppliedRef =
|
|
2050
|
-
const [, forceUpdate] =
|
|
2051
|
-
|
|
2050
|
+
const initialAppliedRef = React50.useRef(false);
|
|
2051
|
+
const [, forceUpdate] = React50.useState(0);
|
|
2052
|
+
React50.useEffect(() => {
|
|
2052
2053
|
if (!initialAppliedRef.current && initialValues) {
|
|
2053
2054
|
form.setFieldsValue(initialValues);
|
|
2054
2055
|
initialAppliedRef.current = true;
|
|
@@ -2111,8 +2112,8 @@ var Form = React49.forwardRef(function Form2(props, ref) {
|
|
|
2111
2112
|
onValuesChange,
|
|
2112
2113
|
onFieldsChange
|
|
2113
2114
|
]);
|
|
2114
|
-
|
|
2115
|
-
const handleSubmit =
|
|
2115
|
+
React50.useImperativeHandle(ref, () => ({ ...form, nativeElement: null }));
|
|
2116
|
+
const handleSubmit = React50.useCallback(
|
|
2116
2117
|
(event) => {
|
|
2117
2118
|
if (event) event.preventDefault();
|
|
2118
2119
|
form.validateFields().then((values) => {
|
|
@@ -2138,11 +2139,11 @@ var FormItem = (props) => {
|
|
|
2138
2139
|
variant = "outlined",
|
|
2139
2140
|
requiredMark
|
|
2140
2141
|
} = props;
|
|
2141
|
-
const ctx =
|
|
2142
|
+
const ctx = React50.useContext(FormContext);
|
|
2142
2143
|
if (!ctx) throw new Error("FormItem must be used inside Form");
|
|
2143
2144
|
const { form, disabled: contextDisabled } = ctx;
|
|
2144
|
-
const [, tick] =
|
|
2145
|
-
|
|
2145
|
+
const [, tick] = React50.useState(0);
|
|
2146
|
+
React50.useEffect(() => {
|
|
2146
2147
|
const meta = {
|
|
2147
2148
|
rules,
|
|
2148
2149
|
onStoreChange: () => tick((value) => value + 1),
|
|
@@ -2160,7 +2161,7 @@ var FormItem = (props) => {
|
|
|
2160
2161
|
const isRequired = Array.isArray(rules) ? rules.some((rule) => rule && rule.required) : false;
|
|
2161
2162
|
const isDisabled = !!contextDisabled;
|
|
2162
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 });
|
|
2163
|
-
if (!children || !
|
|
2164
|
+
if (!children || !React50__namespace.default.isValidElement(children)) return null;
|
|
2164
2165
|
const childProps = {};
|
|
2165
2166
|
childProps[valuePropName] = fieldValue;
|
|
2166
2167
|
const childClass = children.props.className;
|
|
@@ -2207,23 +2208,23 @@ var FormItem = (props) => {
|
|
|
2207
2208
|
isRequired ? requiredIndicator : null,
|
|
2208
2209
|
/* @__PURE__ */ jsxRuntime.jsx("span", { children: label })
|
|
2209
2210
|
] }) : null,
|
|
2210
|
-
|
|
2211
|
+
React50.cloneElement(children, childProps),
|
|
2211
2212
|
help ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-sm text-muted-foreground mt-2", children: help }) : null,
|
|
2212
2213
|
fieldErrors && fieldErrors.length ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-destructive mt-1 text-sm font-medium", children: fieldErrors[0] }) : null
|
|
2213
2214
|
] });
|
|
2214
2215
|
};
|
|
2215
2216
|
var FormList = (props) => {
|
|
2216
2217
|
const { name, initialValue, children } = props;
|
|
2217
|
-
const ctx =
|
|
2218
|
+
const ctx = React50.useContext(FormContext);
|
|
2218
2219
|
if (!ctx) throw new Error("FormList must be used inside Form");
|
|
2219
2220
|
const { form, disabled: contextDisabled } = ctx;
|
|
2220
2221
|
const isDisabled = !!contextDisabled;
|
|
2221
|
-
const [fields, setFields] =
|
|
2222
|
-
const [errors, setErrors] =
|
|
2222
|
+
const [fields, setFields] = React50.useState([]);
|
|
2223
|
+
const [errors, setErrors] = React50.useState(
|
|
2223
2224
|
() => form.getFieldError(name) || []
|
|
2224
2225
|
);
|
|
2225
|
-
const initializedRef =
|
|
2226
|
-
const syncFields =
|
|
2226
|
+
const initializedRef = React50.useRef(false);
|
|
2227
|
+
const syncFields = React50.useCallback((list) => {
|
|
2227
2228
|
const next = list.map((_, index) => ({
|
|
2228
2229
|
key: index,
|
|
2229
2230
|
name: index,
|
|
@@ -2231,24 +2232,24 @@ var FormList = (props) => {
|
|
|
2231
2232
|
}));
|
|
2232
2233
|
setFields(next);
|
|
2233
2234
|
}, []);
|
|
2234
|
-
const updateState =
|
|
2235
|
+
const updateState = React50.useCallback(() => {
|
|
2235
2236
|
const raw = form.getFieldValue(name);
|
|
2236
2237
|
const list = Array.isArray(raw) ? raw : [];
|
|
2237
2238
|
syncFields(list);
|
|
2238
2239
|
setErrors(form.getFieldError(name) || []);
|
|
2239
2240
|
}, [form, name, syncFields]);
|
|
2240
|
-
const ensureList =
|
|
2241
|
+
const ensureList = React50.useCallback(() => {
|
|
2241
2242
|
const raw = form.getFieldValue(name);
|
|
2242
2243
|
return Array.isArray(raw) ? [...raw] : [];
|
|
2243
2244
|
}, [form, name]);
|
|
2244
|
-
const setList =
|
|
2245
|
+
const setList = React50.useCallback(
|
|
2245
2246
|
(next) => {
|
|
2246
2247
|
form.setFieldValue(name, next);
|
|
2247
2248
|
updateState();
|
|
2248
2249
|
},
|
|
2249
2250
|
[form, name, updateState]
|
|
2250
2251
|
);
|
|
2251
|
-
const add =
|
|
2252
|
+
const add = React50.useCallback(
|
|
2252
2253
|
(defaultValue, index) => {
|
|
2253
2254
|
if (isDisabled) return;
|
|
2254
2255
|
const list = ensureList();
|
|
@@ -2258,7 +2259,7 @@ var FormList = (props) => {
|
|
|
2258
2259
|
},
|
|
2259
2260
|
[ensureList, isDisabled, setList]
|
|
2260
2261
|
);
|
|
2261
|
-
const remove =
|
|
2262
|
+
const remove = React50.useCallback(
|
|
2262
2263
|
(index) => {
|
|
2263
2264
|
if (isDisabled) return;
|
|
2264
2265
|
const list = ensureList();
|
|
@@ -2270,7 +2271,7 @@ var FormList = (props) => {
|
|
|
2270
2271
|
},
|
|
2271
2272
|
[ensureList, isDisabled, setList]
|
|
2272
2273
|
);
|
|
2273
|
-
const move =
|
|
2274
|
+
const move = React50.useCallback(
|
|
2274
2275
|
(from, to) => {
|
|
2275
2276
|
if (isDisabled) return;
|
|
2276
2277
|
const list = ensureList();
|
|
@@ -2283,7 +2284,7 @@ var FormList = (props) => {
|
|
|
2283
2284
|
},
|
|
2284
2285
|
[ensureList, isDisabled, setList]
|
|
2285
2286
|
);
|
|
2286
|
-
|
|
2287
|
+
React50.useEffect(() => {
|
|
2287
2288
|
if (initializedRef.current) return;
|
|
2288
2289
|
if (initialValue === void 0) return;
|
|
2289
2290
|
const current = form.getFieldValue(name);
|
|
@@ -2296,7 +2297,7 @@ var FormList = (props) => {
|
|
|
2296
2297
|
}
|
|
2297
2298
|
initializedRef.current = true;
|
|
2298
2299
|
}, [form, name, initialValue, updateState]);
|
|
2299
|
-
|
|
2300
|
+
React50.useEffect(() => {
|
|
2300
2301
|
const handleChange = () => updateState();
|
|
2301
2302
|
handleChange();
|
|
2302
2303
|
let unsubscribe = null;
|
|
@@ -2328,7 +2329,7 @@ var fieldVariants = classVarianceAuthority.cva("", {
|
|
|
2328
2329
|
orientation: "vertical"
|
|
2329
2330
|
}
|
|
2330
2331
|
});
|
|
2331
|
-
var Field =
|
|
2332
|
+
var Field = React50__namespace.forwardRef(
|
|
2332
2333
|
({
|
|
2333
2334
|
className,
|
|
2334
2335
|
orientation,
|
|
@@ -2341,7 +2342,7 @@ var Field = React49__namespace.forwardRef(
|
|
|
2341
2342
|
children,
|
|
2342
2343
|
...props
|
|
2343
2344
|
}, ref) => {
|
|
2344
|
-
const generatedId =
|
|
2345
|
+
const generatedId = React50__namespace.useId();
|
|
2345
2346
|
const fieldId = htmlFor || generatedId;
|
|
2346
2347
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2347
2348
|
"div",
|
|
@@ -2390,7 +2391,7 @@ var alertVariants = classVarianceAuthority.cva(
|
|
|
2390
2391
|
}
|
|
2391
2392
|
}
|
|
2392
2393
|
);
|
|
2393
|
-
var Alert =
|
|
2394
|
+
var Alert = React50__namespace.forwardRef(
|
|
2394
2395
|
({
|
|
2395
2396
|
className,
|
|
2396
2397
|
variant,
|
|
@@ -2403,8 +2404,8 @@ var Alert = React49__namespace.forwardRef(
|
|
|
2403
2404
|
descriptionClassName,
|
|
2404
2405
|
...props
|
|
2405
2406
|
}, ref) => {
|
|
2406
|
-
const [isVisible, setIsVisible] =
|
|
2407
|
-
const handleDismiss =
|
|
2407
|
+
const [isVisible, setIsVisible] = React50__namespace.useState(true);
|
|
2408
|
+
const handleDismiss = React50__namespace.useCallback(() => {
|
|
2408
2409
|
setIsVisible(false);
|
|
2409
2410
|
onClose?.();
|
|
2410
2411
|
}, [onClose]);
|
|
@@ -2466,14 +2467,14 @@ Alert.displayName = "Alert";
|
|
|
2466
2467
|
|
|
2467
2468
|
// src/components/ui/toast/index.tsx
|
|
2468
2469
|
init_utils();
|
|
2469
|
-
var ToastContext =
|
|
2470
|
+
var ToastContext = React50.createContext(void 0);
|
|
2470
2471
|
function ToastProvider({
|
|
2471
2472
|
children,
|
|
2472
2473
|
defaultDuration = 5e3,
|
|
2473
2474
|
position = "top-right"
|
|
2474
2475
|
}) {
|
|
2475
|
-
const [toasts, setToasts] =
|
|
2476
|
-
const toast2 =
|
|
2476
|
+
const [toasts, setToasts] = React50.useState([]);
|
|
2477
|
+
const toast2 = React50.useCallback(
|
|
2477
2478
|
(props) => {
|
|
2478
2479
|
const id = Math.random().toString(36).substring(7);
|
|
2479
2480
|
const duration = props.duration ?? defaultDuration;
|
|
@@ -2492,7 +2493,7 @@ function ToastProvider({
|
|
|
2492
2493
|
},
|
|
2493
2494
|
[defaultDuration]
|
|
2494
2495
|
);
|
|
2495
|
-
const dismiss =
|
|
2496
|
+
const dismiss = React50.useCallback((id) => {
|
|
2496
2497
|
setToasts((prev) => prev.filter((toast3) => toast3.id !== id));
|
|
2497
2498
|
}, []);
|
|
2498
2499
|
const getPositionClasses = () => {
|
|
@@ -2539,7 +2540,7 @@ function ToastProvider({
|
|
|
2539
2540
|
] });
|
|
2540
2541
|
}
|
|
2541
2542
|
function useToastContext() {
|
|
2542
|
-
const context =
|
|
2543
|
+
const context = React50.useContext(ToastContext);
|
|
2543
2544
|
if (!context) {
|
|
2544
2545
|
throw new Error("useToast must be used within ToastProvider");
|
|
2545
2546
|
}
|
|
@@ -2573,7 +2574,7 @@ var toastVariants = classVarianceAuthority.cva(
|
|
|
2573
2574
|
}
|
|
2574
2575
|
}
|
|
2575
2576
|
);
|
|
2576
|
-
var Toast =
|
|
2577
|
+
var Toast = React50__namespace.forwardRef(
|
|
2577
2578
|
({
|
|
2578
2579
|
className,
|
|
2579
2580
|
variant,
|
|
@@ -2586,8 +2587,8 @@ var Toast = React49__namespace.forwardRef(
|
|
|
2586
2587
|
descriptionClassName,
|
|
2587
2588
|
...props
|
|
2588
2589
|
}, ref) => {
|
|
2589
|
-
const [isVisible, setIsVisible] =
|
|
2590
|
-
const handleDismiss =
|
|
2590
|
+
const [isVisible, setIsVisible] = React50__namespace.useState(true);
|
|
2591
|
+
const handleDismiss = React50__namespace.useCallback(() => {
|
|
2591
2592
|
setIsVisible(false);
|
|
2592
2593
|
onClose?.();
|
|
2593
2594
|
}, [onClose]);
|
|
@@ -2683,7 +2684,7 @@ var progressVariants = classVarianceAuthority.cva(
|
|
|
2683
2684
|
}
|
|
2684
2685
|
}
|
|
2685
2686
|
);
|
|
2686
|
-
var Progress =
|
|
2687
|
+
var Progress = React50__namespace.forwardRef(
|
|
2687
2688
|
({
|
|
2688
2689
|
className,
|
|
2689
2690
|
value = 0,
|
|
@@ -2749,7 +2750,7 @@ var spinnerVariants = classVarianceAuthority.cva("animate-spin", {
|
|
|
2749
2750
|
variant: "default"
|
|
2750
2751
|
}
|
|
2751
2752
|
});
|
|
2752
|
-
var Spinner =
|
|
2753
|
+
var Spinner = React50__namespace.forwardRef(
|
|
2753
2754
|
({ className, size, variant, label, centered, overlay, icon, ...props }, ref) => {
|
|
2754
2755
|
const spinnerContent = /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2755
2756
|
"div",
|
|
@@ -2780,7 +2781,7 @@ var Spinner = React49__namespace.forwardRef(
|
|
|
2780
2781
|
}
|
|
2781
2782
|
);
|
|
2782
2783
|
Spinner.displayName = "Spinner";
|
|
2783
|
-
var DotsSpinner =
|
|
2784
|
+
var DotsSpinner = React50__namespace.forwardRef(
|
|
2784
2785
|
({ className, size = "default", dotCount = 3, ...props }, ref) => {
|
|
2785
2786
|
const dotSizeMap = {
|
|
2786
2787
|
xs: "h-1 w-1",
|
|
@@ -2833,7 +2834,7 @@ var skeletonVariants = classVarianceAuthority.cva(
|
|
|
2833
2834
|
}
|
|
2834
2835
|
}
|
|
2835
2836
|
);
|
|
2836
|
-
var Skeleton =
|
|
2837
|
+
var Skeleton = React50__namespace.forwardRef(
|
|
2837
2838
|
({
|
|
2838
2839
|
className,
|
|
2839
2840
|
variant,
|
|
@@ -2882,7 +2883,7 @@ var Skeleton = React49__namespace.forwardRef(
|
|
|
2882
2883
|
}
|
|
2883
2884
|
);
|
|
2884
2885
|
Skeleton.displayName = "Skeleton";
|
|
2885
|
-
var SkeletonCard =
|
|
2886
|
+
var SkeletonCard = React50__namespace.forwardRef(
|
|
2886
2887
|
({ className, avatar = false, lines = 3, ...props }, ref) => {
|
|
2887
2888
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { ref, className: cn("space-y-4", className), ...props, children: [
|
|
2888
2889
|
avatar && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-3", children: [
|
|
@@ -2922,7 +2923,7 @@ var emptyVariants = classVarianceAuthority.cva(
|
|
|
2922
2923
|
}
|
|
2923
2924
|
}
|
|
2924
2925
|
);
|
|
2925
|
-
var Empty =
|
|
2926
|
+
var Empty = React50__namespace.forwardRef(
|
|
2926
2927
|
({
|
|
2927
2928
|
className,
|
|
2928
2929
|
size,
|
|
@@ -2963,7 +2964,7 @@ var Dialog = DialogPrimitive__namespace.Root;
|
|
|
2963
2964
|
var DialogTrigger = DialogPrimitive__namespace.Trigger;
|
|
2964
2965
|
var DialogPortal = DialogPrimitive__namespace.Portal;
|
|
2965
2966
|
var DialogClose = DialogPrimitive__namespace.Close;
|
|
2966
|
-
var DialogOverlay =
|
|
2967
|
+
var DialogOverlay = React50__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
2967
2968
|
DialogPrimitive__namespace.Overlay,
|
|
2968
2969
|
{
|
|
2969
2970
|
ref,
|
|
@@ -2975,7 +2976,7 @@ var DialogOverlay = React49__namespace.forwardRef(({ className, ...props }, ref)
|
|
|
2975
2976
|
}
|
|
2976
2977
|
));
|
|
2977
2978
|
DialogOverlay.displayName = DialogPrimitive__namespace.Overlay.displayName;
|
|
2978
|
-
var DialogContent =
|
|
2979
|
+
var DialogContent = React50__namespace.forwardRef(
|
|
2979
2980
|
({
|
|
2980
2981
|
className,
|
|
2981
2982
|
children,
|
|
@@ -3040,7 +3041,7 @@ var DialogFooter = ({
|
|
|
3040
3041
|
}
|
|
3041
3042
|
);
|
|
3042
3043
|
DialogFooter.displayName = "DialogFooter";
|
|
3043
|
-
var DialogTitle =
|
|
3044
|
+
var DialogTitle = React50__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
3044
3045
|
DialogPrimitive__namespace.Title,
|
|
3045
3046
|
{
|
|
3046
3047
|
ref,
|
|
@@ -3052,7 +3053,7 @@ var DialogTitle = React49__namespace.forwardRef(({ className, ...props }, ref) =
|
|
|
3052
3053
|
}
|
|
3053
3054
|
));
|
|
3054
3055
|
DialogTitle.displayName = DialogPrimitive__namespace.Title.displayName;
|
|
3055
|
-
var DialogDescription =
|
|
3056
|
+
var DialogDescription = React50__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
3056
3057
|
DialogPrimitive__namespace.Description,
|
|
3057
3058
|
{
|
|
3058
3059
|
ref,
|
|
@@ -3067,7 +3068,7 @@ init_utils();
|
|
|
3067
3068
|
var AlertDialog = AlertDialogPrimitive__namespace.Root;
|
|
3068
3069
|
var AlertDialogTrigger = AlertDialogPrimitive__namespace.Trigger;
|
|
3069
3070
|
var AlertDialogPortal = AlertDialogPrimitive__namespace.Portal;
|
|
3070
|
-
var AlertDialogOverlay =
|
|
3071
|
+
var AlertDialogOverlay = React50__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
3071
3072
|
AlertDialogPrimitive__namespace.Overlay,
|
|
3072
3073
|
{
|
|
3073
3074
|
className: cn(
|
|
@@ -3079,7 +3080,7 @@ var AlertDialogOverlay = React49__namespace.forwardRef(({ className, ...props },
|
|
|
3079
3080
|
}
|
|
3080
3081
|
));
|
|
3081
3082
|
AlertDialogOverlay.displayName = AlertDialogPrimitive__namespace.Overlay.displayName;
|
|
3082
|
-
var AlertDialogContent =
|
|
3083
|
+
var AlertDialogContent = React50__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(AlertDialogPortal, { children: [
|
|
3083
3084
|
/* @__PURE__ */ jsxRuntime.jsx(AlertDialogOverlay, {}),
|
|
3084
3085
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3085
3086
|
AlertDialogPrimitive__namespace.Content,
|
|
@@ -3122,7 +3123,7 @@ var AlertDialogFooter = ({
|
|
|
3122
3123
|
}
|
|
3123
3124
|
);
|
|
3124
3125
|
AlertDialogFooter.displayName = "AlertDialogFooter";
|
|
3125
|
-
var AlertDialogTitle =
|
|
3126
|
+
var AlertDialogTitle = React50__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
3126
3127
|
AlertDialogPrimitive__namespace.Title,
|
|
3127
3128
|
{
|
|
3128
3129
|
ref,
|
|
@@ -3131,7 +3132,7 @@ var AlertDialogTitle = React49__namespace.forwardRef(({ className, ...props }, r
|
|
|
3131
3132
|
}
|
|
3132
3133
|
));
|
|
3133
3134
|
AlertDialogTitle.displayName = AlertDialogPrimitive__namespace.Title.displayName;
|
|
3134
|
-
var AlertDialogDescription =
|
|
3135
|
+
var AlertDialogDescription = React50__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
3135
3136
|
AlertDialogPrimitive__namespace.Description,
|
|
3136
3137
|
{
|
|
3137
3138
|
ref,
|
|
@@ -3140,7 +3141,7 @@ var AlertDialogDescription = React49__namespace.forwardRef(({ className, ...prop
|
|
|
3140
3141
|
}
|
|
3141
3142
|
));
|
|
3142
3143
|
AlertDialogDescription.displayName = AlertDialogPrimitive__namespace.Description.displayName;
|
|
3143
|
-
var AlertDialogAction =
|
|
3144
|
+
var AlertDialogAction = React50__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
3144
3145
|
AlertDialogPrimitive__namespace.Action,
|
|
3145
3146
|
{
|
|
3146
3147
|
ref,
|
|
@@ -3149,7 +3150,7 @@ var AlertDialogAction = React49__namespace.forwardRef(({ className, ...props },
|
|
|
3149
3150
|
}
|
|
3150
3151
|
));
|
|
3151
3152
|
AlertDialogAction.displayName = AlertDialogPrimitive__namespace.Action.displayName;
|
|
3152
|
-
var AlertDialogCancel =
|
|
3153
|
+
var AlertDialogCancel = React50__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
3153
3154
|
AlertDialogPrimitive__namespace.Cancel,
|
|
3154
3155
|
{
|
|
3155
3156
|
ref,
|
|
@@ -3169,7 +3170,7 @@ var Sheet = DialogPrimitive__namespace.Root;
|
|
|
3169
3170
|
var SheetTrigger = DialogPrimitive__namespace.Trigger;
|
|
3170
3171
|
var SheetClose = DialogPrimitive__namespace.Close;
|
|
3171
3172
|
var SheetPortal = DialogPrimitive__namespace.Portal;
|
|
3172
|
-
var SheetOverlay =
|
|
3173
|
+
var SheetOverlay = React50__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
3173
3174
|
DialogPrimitive__namespace.Overlay,
|
|
3174
3175
|
{
|
|
3175
3176
|
className: cn(
|
|
@@ -3197,7 +3198,7 @@ var sheetVariants = classVarianceAuthority.cva(
|
|
|
3197
3198
|
}
|
|
3198
3199
|
}
|
|
3199
3200
|
);
|
|
3200
|
-
var SheetContent =
|
|
3201
|
+
var SheetContent = React50__namespace.forwardRef(({ side = "right", className, children, hideClose, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(SheetPortal, { children: [
|
|
3201
3202
|
/* @__PURE__ */ jsxRuntime.jsx(SheetOverlay, {}),
|
|
3202
3203
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
3203
3204
|
DialogPrimitive__namespace.Content,
|
|
@@ -3244,7 +3245,7 @@ var SheetFooter = ({
|
|
|
3244
3245
|
}
|
|
3245
3246
|
);
|
|
3246
3247
|
SheetFooter.displayName = "SheetFooter";
|
|
3247
|
-
var SheetTitle =
|
|
3248
|
+
var SheetTitle = React50__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
3248
3249
|
DialogPrimitive__namespace.Title,
|
|
3249
3250
|
{
|
|
3250
3251
|
ref,
|
|
@@ -3253,7 +3254,7 @@ var SheetTitle = React49__namespace.forwardRef(({ className, ...props }, ref) =>
|
|
|
3253
3254
|
}
|
|
3254
3255
|
));
|
|
3255
3256
|
SheetTitle.displayName = DialogPrimitive__namespace.Title.displayName;
|
|
3256
|
-
var SheetDescription =
|
|
3257
|
+
var SheetDescription = React50__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
3257
3258
|
DialogPrimitive__namespace.Description,
|
|
3258
3259
|
{
|
|
3259
3260
|
ref,
|
|
@@ -3265,7 +3266,7 @@ SheetDescription.displayName = DialogPrimitive__namespace.Description.displayNam
|
|
|
3265
3266
|
|
|
3266
3267
|
// src/components/ui/drawer/index.tsx
|
|
3267
3268
|
init_utils();
|
|
3268
|
-
var DrawerContext =
|
|
3269
|
+
var DrawerContext = React50__namespace.createContext({
|
|
3269
3270
|
direction: "bottom"
|
|
3270
3271
|
});
|
|
3271
3272
|
var Drawer = ({
|
|
@@ -3284,7 +3285,7 @@ Drawer.displayName = "Drawer";
|
|
|
3284
3285
|
var DrawerTrigger = vaul.Drawer.Trigger;
|
|
3285
3286
|
var DrawerPortal = vaul.Drawer.Portal;
|
|
3286
3287
|
var DrawerClose = vaul.Drawer.Close;
|
|
3287
|
-
var DrawerOverlay =
|
|
3288
|
+
var DrawerOverlay = React50__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
3288
3289
|
vaul.Drawer.Overlay,
|
|
3289
3290
|
{
|
|
3290
3291
|
ref,
|
|
@@ -3293,7 +3294,7 @@ var DrawerOverlay = React49__namespace.forwardRef(({ className, ...props }, ref)
|
|
|
3293
3294
|
}
|
|
3294
3295
|
));
|
|
3295
3296
|
DrawerOverlay.displayName = vaul.Drawer.Overlay.displayName;
|
|
3296
|
-
var DrawerContent =
|
|
3297
|
+
var DrawerContent = React50__namespace.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(DrawerPortal, { children: [
|
|
3297
3298
|
/* @__PURE__ */ jsxRuntime.jsx(DrawerOverlay, {}),
|
|
3298
3299
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
3299
3300
|
vaul.Drawer.Content,
|
|
@@ -3328,7 +3329,7 @@ var DrawerFooter = ({
|
|
|
3328
3329
|
}
|
|
3329
3330
|
);
|
|
3330
3331
|
DrawerFooter.displayName = "DrawerFooter";
|
|
3331
|
-
var DrawerTitle =
|
|
3332
|
+
var DrawerTitle = React50__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
3332
3333
|
vaul.Drawer.Title,
|
|
3333
3334
|
{
|
|
3334
3335
|
ref,
|
|
@@ -3340,7 +3341,7 @@ var DrawerTitle = React49__namespace.forwardRef(({ className, ...props }, ref) =
|
|
|
3340
3341
|
}
|
|
3341
3342
|
));
|
|
3342
3343
|
DrawerTitle.displayName = vaul.Drawer.Title.displayName;
|
|
3343
|
-
var DrawerDescription =
|
|
3344
|
+
var DrawerDescription = React50__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
3344
3345
|
vaul.Drawer.Description,
|
|
3345
3346
|
{
|
|
3346
3347
|
ref,
|
|
@@ -3355,7 +3356,7 @@ init_utils();
|
|
|
3355
3356
|
var Popover = PopoverPrimitive__namespace.Root;
|
|
3356
3357
|
var PopoverTrigger = PopoverPrimitive__namespace.Trigger;
|
|
3357
3358
|
var PopoverAnchor = PopoverPrimitive__namespace.Anchor;
|
|
3358
|
-
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(
|
|
3359
3360
|
PopoverPrimitive__namespace.Content,
|
|
3360
3361
|
{
|
|
3361
3362
|
ref,
|
|
@@ -3375,13 +3376,13 @@ init_utils();
|
|
|
3375
3376
|
var TooltipProvider = TooltipPrimitive__namespace.Provider;
|
|
3376
3377
|
var Tooltip = TooltipPrimitive__namespace.Root;
|
|
3377
3378
|
var TooltipTrigger = TooltipPrimitive__namespace.Trigger;
|
|
3378
|
-
var TooltipContent =
|
|
3379
|
+
var TooltipContent = React50__namespace.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
3379
3380
|
TooltipPrimitive__namespace.Content,
|
|
3380
3381
|
{
|
|
3381
3382
|
ref,
|
|
3382
3383
|
sideOffset,
|
|
3383
3384
|
className: cn(
|
|
3384
|
-
"z-50 overflow-hidden rounded-md bg-mvn-gray-900 px-3 py-1.5 text-xs text-primary-50
|
|
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",
|
|
3385
3386
|
"data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95",
|
|
3386
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",
|
|
3387
3388
|
className
|
|
@@ -3390,7 +3391,7 @@ var TooltipContent = React49__namespace.forwardRef(({ className, sideOffset = 4,
|
|
|
3390
3391
|
}
|
|
3391
3392
|
));
|
|
3392
3393
|
TooltipContent.displayName = TooltipPrimitive__namespace.Content.displayName;
|
|
3393
|
-
var SimpleTooltip =
|
|
3394
|
+
var SimpleTooltip = React50__namespace.forwardRef(
|
|
3394
3395
|
({
|
|
3395
3396
|
children,
|
|
3396
3397
|
content,
|
|
@@ -3421,7 +3422,7 @@ init_utils();
|
|
|
3421
3422
|
var HoverCard = HoverCardPrimitive__namespace.Root;
|
|
3422
3423
|
var HoverCardTrigger = HoverCardPrimitive__namespace.Trigger;
|
|
3423
3424
|
var HoverCardArrow = HoverCardPrimitive__namespace.Arrow;
|
|
3424
|
-
var HoverCardContent =
|
|
3425
|
+
var HoverCardContent = React50__namespace.forwardRef(
|
|
3425
3426
|
({
|
|
3426
3427
|
className,
|
|
3427
3428
|
align = "center",
|
|
@@ -3465,7 +3466,7 @@ var DropdownMenuGroup = DropdownMenuPrimitive__namespace.Group;
|
|
|
3465
3466
|
var DropdownMenuPortal = DropdownMenuPrimitive__namespace.Portal;
|
|
3466
3467
|
var DropdownMenuSub = DropdownMenuPrimitive__namespace.Sub;
|
|
3467
3468
|
var DropdownMenuRadioGroup = DropdownMenuPrimitive__namespace.RadioGroup;
|
|
3468
|
-
var DropdownMenuSubTrigger =
|
|
3469
|
+
var DropdownMenuSubTrigger = React50__namespace.forwardRef(({ className, inset, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3469
3470
|
DropdownMenuPrimitive__namespace.SubTrigger,
|
|
3470
3471
|
{
|
|
3471
3472
|
ref,
|
|
@@ -3482,7 +3483,7 @@ var DropdownMenuSubTrigger = React49__namespace.forwardRef(({ className, inset,
|
|
|
3482
3483
|
}
|
|
3483
3484
|
));
|
|
3484
3485
|
DropdownMenuSubTrigger.displayName = DropdownMenuPrimitive__namespace.SubTrigger.displayName;
|
|
3485
|
-
var DropdownMenuSubContent =
|
|
3486
|
+
var DropdownMenuSubContent = React50__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
3486
3487
|
DropdownMenuPrimitive__namespace.SubContent,
|
|
3487
3488
|
{
|
|
3488
3489
|
ref,
|
|
@@ -3494,7 +3495,7 @@ var DropdownMenuSubContent = React49__namespace.forwardRef(({ className, ...prop
|
|
|
3494
3495
|
}
|
|
3495
3496
|
));
|
|
3496
3497
|
DropdownMenuSubContent.displayName = DropdownMenuPrimitive__namespace.SubContent.displayName;
|
|
3497
|
-
var DropdownMenuContent =
|
|
3498
|
+
var DropdownMenuContent = React50__namespace.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuPrimitive__namespace.Portal, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
3498
3499
|
DropdownMenuPrimitive__namespace.Content,
|
|
3499
3500
|
{
|
|
3500
3501
|
ref,
|
|
@@ -3507,7 +3508,7 @@ var DropdownMenuContent = React49__namespace.forwardRef(({ className, sideOffset
|
|
|
3507
3508
|
}
|
|
3508
3509
|
) }));
|
|
3509
3510
|
DropdownMenuContent.displayName = DropdownMenuPrimitive__namespace.Content.displayName;
|
|
3510
|
-
var DropdownMenuItem =
|
|
3511
|
+
var DropdownMenuItem = React50__namespace.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
3511
3512
|
DropdownMenuPrimitive__namespace.Item,
|
|
3512
3513
|
{
|
|
3513
3514
|
ref,
|
|
@@ -3520,7 +3521,7 @@ var DropdownMenuItem = React49__namespace.forwardRef(({ className, inset, ...pro
|
|
|
3520
3521
|
}
|
|
3521
3522
|
));
|
|
3522
3523
|
DropdownMenuItem.displayName = DropdownMenuPrimitive__namespace.Item.displayName;
|
|
3523
|
-
var DropdownMenuCheckboxItem =
|
|
3524
|
+
var DropdownMenuCheckboxItem = React50__namespace.forwardRef(({ className, children, checked, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3524
3525
|
DropdownMenuPrimitive__namespace.CheckboxItem,
|
|
3525
3526
|
{
|
|
3526
3527
|
ref,
|
|
@@ -3537,7 +3538,7 @@ var DropdownMenuCheckboxItem = React49__namespace.forwardRef(({ className, child
|
|
|
3537
3538
|
}
|
|
3538
3539
|
));
|
|
3539
3540
|
DropdownMenuCheckboxItem.displayName = DropdownMenuPrimitive__namespace.CheckboxItem.displayName;
|
|
3540
|
-
var DropdownMenuRadioItem =
|
|
3541
|
+
var DropdownMenuRadioItem = React50__namespace.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3541
3542
|
DropdownMenuPrimitive__namespace.RadioItem,
|
|
3542
3543
|
{
|
|
3543
3544
|
ref,
|
|
@@ -3553,7 +3554,7 @@ var DropdownMenuRadioItem = React49__namespace.forwardRef(({ className, children
|
|
|
3553
3554
|
}
|
|
3554
3555
|
));
|
|
3555
3556
|
DropdownMenuRadioItem.displayName = DropdownMenuPrimitive__namespace.RadioItem.displayName;
|
|
3556
|
-
var DropdownMenuLabel =
|
|
3557
|
+
var DropdownMenuLabel = React50__namespace.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
3557
3558
|
DropdownMenuPrimitive__namespace.Label,
|
|
3558
3559
|
{
|
|
3559
3560
|
ref,
|
|
@@ -3566,7 +3567,7 @@ var DropdownMenuLabel = React49__namespace.forwardRef(({ className, inset, ...pr
|
|
|
3566
3567
|
}
|
|
3567
3568
|
));
|
|
3568
3569
|
DropdownMenuLabel.displayName = DropdownMenuPrimitive__namespace.Label.displayName;
|
|
3569
|
-
var DropdownMenuSeparator =
|
|
3570
|
+
var DropdownMenuSeparator = React50__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
3570
3571
|
DropdownMenuPrimitive__namespace.Separator,
|
|
3571
3572
|
{
|
|
3572
3573
|
ref,
|
|
@@ -3597,7 +3598,7 @@ var ContextMenuGroup = ContextMenuPrimitive__namespace.Group;
|
|
|
3597
3598
|
var ContextMenuPortal = ContextMenuPrimitive__namespace.Portal;
|
|
3598
3599
|
var ContextMenuSub = ContextMenuPrimitive__namespace.Sub;
|
|
3599
3600
|
var ContextMenuRadioGroup = ContextMenuPrimitive__namespace.RadioGroup;
|
|
3600
|
-
var ContextMenuSubTrigger =
|
|
3601
|
+
var ContextMenuSubTrigger = React50__namespace.forwardRef(({ className, inset, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3601
3602
|
ContextMenuPrimitive__namespace.SubTrigger,
|
|
3602
3603
|
{
|
|
3603
3604
|
ref,
|
|
@@ -3614,7 +3615,7 @@ var ContextMenuSubTrigger = React49__namespace.forwardRef(({ className, inset, c
|
|
|
3614
3615
|
}
|
|
3615
3616
|
));
|
|
3616
3617
|
ContextMenuSubTrigger.displayName = ContextMenuPrimitive__namespace.SubTrigger.displayName;
|
|
3617
|
-
var ContextMenuSubContent =
|
|
3618
|
+
var ContextMenuSubContent = React50__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
3618
3619
|
ContextMenuPrimitive__namespace.SubContent,
|
|
3619
3620
|
{
|
|
3620
3621
|
ref,
|
|
@@ -3626,7 +3627,7 @@ var ContextMenuSubContent = React49__namespace.forwardRef(({ className, ...props
|
|
|
3626
3627
|
}
|
|
3627
3628
|
));
|
|
3628
3629
|
ContextMenuSubContent.displayName = ContextMenuPrimitive__namespace.SubContent.displayName;
|
|
3629
|
-
var ContextMenuContent =
|
|
3630
|
+
var ContextMenuContent = React50__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(ContextMenuPrimitive__namespace.Portal, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
3630
3631
|
ContextMenuPrimitive__namespace.Content,
|
|
3631
3632
|
{
|
|
3632
3633
|
ref,
|
|
@@ -3638,7 +3639,7 @@ var ContextMenuContent = React49__namespace.forwardRef(({ className, ...props },
|
|
|
3638
3639
|
}
|
|
3639
3640
|
) }));
|
|
3640
3641
|
ContextMenuContent.displayName = ContextMenuPrimitive__namespace.Content.displayName;
|
|
3641
|
-
var ContextMenuItem =
|
|
3642
|
+
var ContextMenuItem = React50__namespace.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
3642
3643
|
ContextMenuPrimitive__namespace.Item,
|
|
3643
3644
|
{
|
|
3644
3645
|
ref,
|
|
@@ -3651,7 +3652,7 @@ var ContextMenuItem = React49__namespace.forwardRef(({ className, inset, ...prop
|
|
|
3651
3652
|
}
|
|
3652
3653
|
));
|
|
3653
3654
|
ContextMenuItem.displayName = ContextMenuPrimitive__namespace.Item.displayName;
|
|
3654
|
-
var ContextMenuCheckboxItem =
|
|
3655
|
+
var ContextMenuCheckboxItem = React50__namespace.forwardRef(({ className, children, checked, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3655
3656
|
ContextMenuPrimitive__namespace.CheckboxItem,
|
|
3656
3657
|
{
|
|
3657
3658
|
ref,
|
|
@@ -3668,7 +3669,7 @@ var ContextMenuCheckboxItem = React49__namespace.forwardRef(({ className, childr
|
|
|
3668
3669
|
}
|
|
3669
3670
|
));
|
|
3670
3671
|
ContextMenuCheckboxItem.displayName = ContextMenuPrimitive__namespace.CheckboxItem.displayName;
|
|
3671
|
-
var ContextMenuRadioItem =
|
|
3672
|
+
var ContextMenuRadioItem = React50__namespace.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3672
3673
|
ContextMenuPrimitive__namespace.RadioItem,
|
|
3673
3674
|
{
|
|
3674
3675
|
ref,
|
|
@@ -3684,7 +3685,7 @@ var ContextMenuRadioItem = React49__namespace.forwardRef(({ className, children,
|
|
|
3684
3685
|
}
|
|
3685
3686
|
));
|
|
3686
3687
|
ContextMenuRadioItem.displayName = ContextMenuPrimitive__namespace.RadioItem.displayName;
|
|
3687
|
-
var ContextMenuLabel =
|
|
3688
|
+
var ContextMenuLabel = React50__namespace.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
3688
3689
|
ContextMenuPrimitive__namespace.Label,
|
|
3689
3690
|
{
|
|
3690
3691
|
ref,
|
|
@@ -3697,7 +3698,7 @@ var ContextMenuLabel = React49__namespace.forwardRef(({ className, inset, ...pro
|
|
|
3697
3698
|
}
|
|
3698
3699
|
));
|
|
3699
3700
|
ContextMenuLabel.displayName = ContextMenuPrimitive__namespace.Label.displayName;
|
|
3700
|
-
var ContextMenuSeparator =
|
|
3701
|
+
var ContextMenuSeparator = React50__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
3701
3702
|
ContextMenuPrimitive__namespace.Separator,
|
|
3702
3703
|
{
|
|
3703
3704
|
ref,
|
|
@@ -3730,7 +3731,7 @@ var MenubarGroup = MenubarPrimitive__namespace.Group;
|
|
|
3730
3731
|
var MenubarPortal = MenubarPrimitive__namespace.Portal;
|
|
3731
3732
|
var MenubarSub = MenubarPrimitive__namespace.Sub;
|
|
3732
3733
|
var MenubarRadioGroup = MenubarPrimitive__namespace.RadioGroup;
|
|
3733
|
-
var Menubar =
|
|
3734
|
+
var Menubar = React50__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
3734
3735
|
MenubarPrimitive__namespace.Root,
|
|
3735
3736
|
{
|
|
3736
3737
|
ref,
|
|
@@ -3742,7 +3743,7 @@ var Menubar = React49__namespace.forwardRef(({ className, ...props }, ref) => /*
|
|
|
3742
3743
|
}
|
|
3743
3744
|
));
|
|
3744
3745
|
Menubar.displayName = MenubarPrimitive__namespace.Root.displayName;
|
|
3745
|
-
var MenubarTrigger =
|
|
3746
|
+
var MenubarTrigger = React50__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
3746
3747
|
MenubarPrimitive__namespace.Trigger,
|
|
3747
3748
|
{
|
|
3748
3749
|
ref,
|
|
@@ -3754,7 +3755,7 @@ var MenubarTrigger = React49__namespace.forwardRef(({ className, ...props }, ref
|
|
|
3754
3755
|
}
|
|
3755
3756
|
));
|
|
3756
3757
|
MenubarTrigger.displayName = MenubarPrimitive__namespace.Trigger.displayName;
|
|
3757
|
-
var MenubarSubTrigger =
|
|
3758
|
+
var MenubarSubTrigger = React50__namespace.forwardRef(({ className, inset, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3758
3759
|
MenubarPrimitive__namespace.SubTrigger,
|
|
3759
3760
|
{
|
|
3760
3761
|
ref,
|
|
@@ -3771,7 +3772,7 @@ var MenubarSubTrigger = React49__namespace.forwardRef(({ className, inset, child
|
|
|
3771
3772
|
}
|
|
3772
3773
|
));
|
|
3773
3774
|
MenubarSubTrigger.displayName = MenubarPrimitive__namespace.SubTrigger.displayName;
|
|
3774
|
-
var MenubarSubContent =
|
|
3775
|
+
var MenubarSubContent = React50__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
3775
3776
|
MenubarPrimitive__namespace.SubContent,
|
|
3776
3777
|
{
|
|
3777
3778
|
ref,
|
|
@@ -3783,7 +3784,7 @@ var MenubarSubContent = React49__namespace.forwardRef(({ className, ...props },
|
|
|
3783
3784
|
}
|
|
3784
3785
|
));
|
|
3785
3786
|
MenubarSubContent.displayName = MenubarPrimitive__namespace.SubContent.displayName;
|
|
3786
|
-
var MenubarContent =
|
|
3787
|
+
var MenubarContent = React50__namespace.forwardRef(
|
|
3787
3788
|
({ className, align = "start", alignOffset = -4, sideOffset = 8, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(MenubarPrimitive__namespace.Portal, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
3788
3789
|
MenubarPrimitive__namespace.Content,
|
|
3789
3790
|
{
|
|
@@ -3800,7 +3801,7 @@ var MenubarContent = React49__namespace.forwardRef(
|
|
|
3800
3801
|
) })
|
|
3801
3802
|
);
|
|
3802
3803
|
MenubarContent.displayName = MenubarPrimitive__namespace.Content.displayName;
|
|
3803
|
-
var MenubarItem =
|
|
3804
|
+
var MenubarItem = React50__namespace.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
3804
3805
|
MenubarPrimitive__namespace.Item,
|
|
3805
3806
|
{
|
|
3806
3807
|
ref,
|
|
@@ -3813,7 +3814,7 @@ var MenubarItem = React49__namespace.forwardRef(({ className, inset, ...props },
|
|
|
3813
3814
|
}
|
|
3814
3815
|
));
|
|
3815
3816
|
MenubarItem.displayName = MenubarPrimitive__namespace.Item.displayName;
|
|
3816
|
-
var MenubarCheckboxItem =
|
|
3817
|
+
var MenubarCheckboxItem = React50__namespace.forwardRef(({ className, children, checked, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3817
3818
|
MenubarPrimitive__namespace.CheckboxItem,
|
|
3818
3819
|
{
|
|
3819
3820
|
ref,
|
|
@@ -3830,7 +3831,7 @@ var MenubarCheckboxItem = React49__namespace.forwardRef(({ className, children,
|
|
|
3830
3831
|
}
|
|
3831
3832
|
));
|
|
3832
3833
|
MenubarCheckboxItem.displayName = MenubarPrimitive__namespace.CheckboxItem.displayName;
|
|
3833
|
-
var MenubarRadioItem =
|
|
3834
|
+
var MenubarRadioItem = React50__namespace.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3834
3835
|
MenubarPrimitive__namespace.RadioItem,
|
|
3835
3836
|
{
|
|
3836
3837
|
ref,
|
|
@@ -3846,7 +3847,7 @@ var MenubarRadioItem = React49__namespace.forwardRef(({ className, children, ...
|
|
|
3846
3847
|
}
|
|
3847
3848
|
));
|
|
3848
3849
|
MenubarRadioItem.displayName = MenubarPrimitive__namespace.RadioItem.displayName;
|
|
3849
|
-
var MenubarLabel =
|
|
3850
|
+
var MenubarLabel = React50__namespace.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
3850
3851
|
MenubarPrimitive__namespace.Label,
|
|
3851
3852
|
{
|
|
3852
3853
|
ref,
|
|
@@ -3859,7 +3860,7 @@ var MenubarLabel = React49__namespace.forwardRef(({ className, inset, ...props }
|
|
|
3859
3860
|
}
|
|
3860
3861
|
));
|
|
3861
3862
|
MenubarLabel.displayName = MenubarPrimitive__namespace.Label.displayName;
|
|
3862
|
-
var MenubarSeparator =
|
|
3863
|
+
var MenubarSeparator = React50__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
3863
3864
|
MenubarPrimitive__namespace.Separator,
|
|
3864
3865
|
{
|
|
3865
3866
|
ref,
|
|
@@ -3887,7 +3888,7 @@ MenubarShortcut.displayName = "MenubarShortcut";
|
|
|
3887
3888
|
|
|
3888
3889
|
// src/components/ui/navigation-menu/index.tsx
|
|
3889
3890
|
init_utils();
|
|
3890
|
-
var NavigationMenu =
|
|
3891
|
+
var NavigationMenu = React50__namespace.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3891
3892
|
NavigationMenuPrimitive__namespace.Root,
|
|
3892
3893
|
{
|
|
3893
3894
|
ref,
|
|
@@ -3903,7 +3904,7 @@ var NavigationMenu = React49__namespace.forwardRef(({ className, children, ...pr
|
|
|
3903
3904
|
}
|
|
3904
3905
|
));
|
|
3905
3906
|
NavigationMenu.displayName = NavigationMenuPrimitive__namespace.Root.displayName;
|
|
3906
|
-
var NavigationMenuList =
|
|
3907
|
+
var NavigationMenuList = React50__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
3907
3908
|
NavigationMenuPrimitive__namespace.List,
|
|
3908
3909
|
{
|
|
3909
3910
|
ref,
|
|
@@ -3919,7 +3920,7 @@ var NavigationMenuItem = NavigationMenuPrimitive__namespace.Item;
|
|
|
3919
3920
|
var navigationMenuTriggerStyle = classVarianceAuthority.cva(
|
|
3920
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"
|
|
3921
3922
|
);
|
|
3922
|
-
var NavigationMenuTrigger =
|
|
3923
|
+
var NavigationMenuTrigger = React50__namespace.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3923
3924
|
NavigationMenuPrimitive__namespace.Trigger,
|
|
3924
3925
|
{
|
|
3925
3926
|
ref,
|
|
@@ -3939,7 +3940,7 @@ var NavigationMenuTrigger = React49__namespace.forwardRef(({ className, children
|
|
|
3939
3940
|
}
|
|
3940
3941
|
));
|
|
3941
3942
|
NavigationMenuTrigger.displayName = NavigationMenuPrimitive__namespace.Trigger.displayName;
|
|
3942
|
-
var NavigationMenuContent =
|
|
3943
|
+
var NavigationMenuContent = React50__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
3943
3944
|
NavigationMenuPrimitive__namespace.Content,
|
|
3944
3945
|
{
|
|
3945
3946
|
ref,
|
|
@@ -3952,7 +3953,7 @@ var NavigationMenuContent = React49__namespace.forwardRef(({ className, ...props
|
|
|
3952
3953
|
));
|
|
3953
3954
|
NavigationMenuContent.displayName = NavigationMenuPrimitive__namespace.Content.displayName;
|
|
3954
3955
|
var NavigationMenuLink = NavigationMenuPrimitive__namespace.Link;
|
|
3955
|
-
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(
|
|
3956
3957
|
NavigationMenuPrimitive__namespace.Viewport,
|
|
3957
3958
|
{
|
|
3958
3959
|
className: cn(
|
|
@@ -3964,7 +3965,7 @@ var NavigationMenuViewport = React49__namespace.forwardRef(({ className, ...prop
|
|
|
3964
3965
|
}
|
|
3965
3966
|
) }));
|
|
3966
3967
|
NavigationMenuViewport.displayName = NavigationMenuPrimitive__namespace.Viewport.displayName;
|
|
3967
|
-
var NavigationMenuIndicator =
|
|
3968
|
+
var NavigationMenuIndicator = React50__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
3968
3969
|
NavigationMenuPrimitive__namespace.Indicator,
|
|
3969
3970
|
{
|
|
3970
3971
|
ref,
|
|
@@ -3980,7 +3981,7 @@ NavigationMenuIndicator.displayName = NavigationMenuPrimitive__namespace.Indicat
|
|
|
3980
3981
|
|
|
3981
3982
|
// src/components/ui/command/index.tsx
|
|
3982
3983
|
init_utils();
|
|
3983
|
-
var Command =
|
|
3984
|
+
var Command = React50__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
3984
3985
|
cmdk.Command,
|
|
3985
3986
|
{
|
|
3986
3987
|
ref,
|
|
@@ -3995,7 +3996,7 @@ Command.displayName = cmdk.Command.displayName;
|
|
|
3995
3996
|
var CommandDialog = ({ children, ...props }) => {
|
|
3996
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 }) }) });
|
|
3997
3998
|
};
|
|
3998
|
-
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: [
|
|
3999
4000
|
/* @__PURE__ */ jsxRuntime.jsx(reactIcons.MagnifyingGlassIcon, { className: "mr-2 h-4 w-4 shrink-0 opacity-50" }),
|
|
4000
4001
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4001
4002
|
cmdk.Command.Input,
|
|
@@ -4010,7 +4011,7 @@ var CommandInput = React49__namespace.forwardRef(({ className, ...props }, ref)
|
|
|
4010
4011
|
)
|
|
4011
4012
|
] }));
|
|
4012
4013
|
CommandInput.displayName = cmdk.Command.Input.displayName;
|
|
4013
|
-
var CommandList =
|
|
4014
|
+
var CommandList = React50__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
4014
4015
|
cmdk.Command.List,
|
|
4015
4016
|
{
|
|
4016
4017
|
ref,
|
|
@@ -4019,7 +4020,7 @@ var CommandList = React49__namespace.forwardRef(({ className, ...props }, ref) =
|
|
|
4019
4020
|
}
|
|
4020
4021
|
));
|
|
4021
4022
|
CommandList.displayName = cmdk.Command.List.displayName;
|
|
4022
|
-
var CommandEmpty =
|
|
4023
|
+
var CommandEmpty = React50__namespace.forwardRef((props, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
4023
4024
|
cmdk.Command.Empty,
|
|
4024
4025
|
{
|
|
4025
4026
|
ref,
|
|
@@ -4028,7 +4029,7 @@ var CommandEmpty = React49__namespace.forwardRef((props, ref) => /* @__PURE__ */
|
|
|
4028
4029
|
}
|
|
4029
4030
|
));
|
|
4030
4031
|
CommandEmpty.displayName = cmdk.Command.Empty.displayName;
|
|
4031
|
-
var CommandGroup =
|
|
4032
|
+
var CommandGroup = React50__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
4032
4033
|
cmdk.Command.Group,
|
|
4033
4034
|
{
|
|
4034
4035
|
ref,
|
|
@@ -4040,7 +4041,7 @@ var CommandGroup = React49__namespace.forwardRef(({ className, ...props }, ref)
|
|
|
4040
4041
|
}
|
|
4041
4042
|
));
|
|
4042
4043
|
CommandGroup.displayName = cmdk.Command.Group.displayName;
|
|
4043
|
-
var CommandSeparator =
|
|
4044
|
+
var CommandSeparator = React50__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
4044
4045
|
cmdk.Command.Separator,
|
|
4045
4046
|
{
|
|
4046
4047
|
ref,
|
|
@@ -4049,7 +4050,7 @@ var CommandSeparator = React49__namespace.forwardRef(({ className, ...props }, r
|
|
|
4049
4050
|
}
|
|
4050
4051
|
));
|
|
4051
4052
|
CommandSeparator.displayName = cmdk.Command.Separator.displayName;
|
|
4052
|
-
var CommandItem =
|
|
4053
|
+
var CommandItem = React50__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
4053
4054
|
cmdk.Command.Item,
|
|
4054
4055
|
{
|
|
4055
4056
|
ref,
|
|
@@ -4080,7 +4081,7 @@ CommandShortcut.displayName = "CommandShortcut";
|
|
|
4080
4081
|
|
|
4081
4082
|
// src/components/ui/combobox/index.tsx
|
|
4082
4083
|
init_utils();
|
|
4083
|
-
var Combobox =
|
|
4084
|
+
var Combobox = React50__namespace.forwardRef(
|
|
4084
4085
|
({
|
|
4085
4086
|
options,
|
|
4086
4087
|
value,
|
|
@@ -4092,7 +4093,7 @@ var Combobox = React49__namespace.forwardRef(
|
|
|
4092
4093
|
disabled,
|
|
4093
4094
|
clearable
|
|
4094
4095
|
}, ref) => {
|
|
4095
|
-
const [open, setOpen] =
|
|
4096
|
+
const [open, setOpen] = React50__namespace.useState(false);
|
|
4096
4097
|
const selectedOption = options.find((option) => option.value === value);
|
|
4097
4098
|
const handleClear = (e) => {
|
|
4098
4099
|
e.stopPropagation();
|
|
@@ -4164,9 +4165,9 @@ Combobox.displayName = "Combobox";
|
|
|
4164
4165
|
|
|
4165
4166
|
// src/components/ui/breadcrumb/index.tsx
|
|
4166
4167
|
init_utils();
|
|
4167
|
-
var Breadcrumb =
|
|
4168
|
+
var Breadcrumb = React50__namespace.forwardRef(({ ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("nav", { ref, "aria-label": "breadcrumb", ...props }));
|
|
4168
4169
|
Breadcrumb.displayName = "Breadcrumb";
|
|
4169
|
-
var BreadcrumbList =
|
|
4170
|
+
var BreadcrumbList = React50__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
4170
4171
|
"ol",
|
|
4171
4172
|
{
|
|
4172
4173
|
ref,
|
|
@@ -4178,7 +4179,7 @@ var BreadcrumbList = React49__namespace.forwardRef(({ className, ...props }, ref
|
|
|
4178
4179
|
}
|
|
4179
4180
|
));
|
|
4180
4181
|
BreadcrumbList.displayName = "BreadcrumbList";
|
|
4181
|
-
var BreadcrumbItem =
|
|
4182
|
+
var BreadcrumbItem = React50__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
4182
4183
|
"li",
|
|
4183
4184
|
{
|
|
4184
4185
|
ref,
|
|
@@ -4187,7 +4188,7 @@ var BreadcrumbItem = React49__namespace.forwardRef(({ className, ...props }, ref
|
|
|
4187
4188
|
}
|
|
4188
4189
|
));
|
|
4189
4190
|
BreadcrumbItem.displayName = "BreadcrumbItem";
|
|
4190
|
-
var BreadcrumbLink =
|
|
4191
|
+
var BreadcrumbLink = React50__namespace.forwardRef(({ asChild, className, ...props }, ref) => {
|
|
4191
4192
|
const Comp = "a";
|
|
4192
4193
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
4193
4194
|
Comp,
|
|
@@ -4202,7 +4203,7 @@ var BreadcrumbLink = React49__namespace.forwardRef(({ asChild, className, ...pro
|
|
|
4202
4203
|
);
|
|
4203
4204
|
});
|
|
4204
4205
|
BreadcrumbLink.displayName = "BreadcrumbLink";
|
|
4205
|
-
var BreadcrumbPage =
|
|
4206
|
+
var BreadcrumbPage = React50__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
4206
4207
|
"span",
|
|
4207
4208
|
{
|
|
4208
4209
|
ref,
|
|
@@ -4269,7 +4270,7 @@ var Pagination = ({
|
|
|
4269
4270
|
}
|
|
4270
4271
|
);
|
|
4271
4272
|
Pagination.displayName = "Pagination";
|
|
4272
|
-
var PaginationContent =
|
|
4273
|
+
var PaginationContent = React50__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
4273
4274
|
"ul",
|
|
4274
4275
|
{
|
|
4275
4276
|
ref,
|
|
@@ -4278,7 +4279,7 @@ var PaginationContent = React49__namespace.forwardRef(({ className, ...props },
|
|
|
4278
4279
|
}
|
|
4279
4280
|
));
|
|
4280
4281
|
PaginationContent.displayName = "PaginationContent";
|
|
4281
|
-
var PaginationItem =
|
|
4282
|
+
var PaginationItem = React50__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("li", { ref, className: cn("", className), ...props }));
|
|
4282
4283
|
PaginationItem.displayName = "PaginationItem";
|
|
4283
4284
|
var PaginationLink = ({
|
|
4284
4285
|
className,
|
|
@@ -4385,12 +4386,12 @@ PaginationEllipsis.displayName = "PaginationEllipsis";
|
|
|
4385
4386
|
|
|
4386
4387
|
// src/components/ui/tabs/index.tsx
|
|
4387
4388
|
init_utils();
|
|
4388
|
-
var TabsContext =
|
|
4389
|
+
var TabsContext = React50__namespace.createContext({
|
|
4389
4390
|
destroyInactiveTabs: true
|
|
4390
4391
|
});
|
|
4391
|
-
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 }) }));
|
|
4392
4393
|
Tabs.displayName = TabsPrimitive__namespace.Root.displayName;
|
|
4393
|
-
var TabsList =
|
|
4394
|
+
var TabsList = React50__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
4394
4395
|
TabsPrimitive__namespace.List,
|
|
4395
4396
|
{
|
|
4396
4397
|
ref,
|
|
@@ -4405,26 +4406,30 @@ var TabsList = React49__namespace.forwardRef(({ className, ...props }, ref) => /
|
|
|
4405
4406
|
}
|
|
4406
4407
|
));
|
|
4407
4408
|
TabsList.displayName = TabsPrimitive__namespace.List.displayName;
|
|
4408
|
-
var TabsTrigger =
|
|
4409
|
+
var TabsTrigger = React50__namespace.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
4409
4410
|
TabsPrimitive__namespace.Trigger,
|
|
4410
4411
|
{
|
|
4411
4412
|
ref,
|
|
4412
4413
|
className: cn(
|
|
4413
|
-
"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",
|
|
4414
4415
|
"transition-all duration-150 text-muted-foreground hover:text-primary",
|
|
4415
4416
|
"ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
|
|
4416
4417
|
"data-[orientation=horizontal]:px-4 data-[orientation=horizontal]:py-3 data-[orientation=horizontal]:border-b-2 data-[orientation=horizontal]:border-transparent",
|
|
4417
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",
|
|
4418
|
-
"data-[state=active]:text-primary data-[state=active]:
|
|
4419
|
+
"data-[state=active]:text-primary data-[state=active]:border-primary",
|
|
4419
4420
|
"disabled:pointer-events-none disabled:opacity-50 disabled:cursor-not-allowed",
|
|
4420
4421
|
className
|
|
4421
4422
|
),
|
|
4422
|
-
...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
|
+
] })
|
|
4423
4428
|
}
|
|
4424
4429
|
));
|
|
4425
4430
|
TabsTrigger.displayName = TabsPrimitive__namespace.Trigger.displayName;
|
|
4426
|
-
var TabsContent =
|
|
4427
|
-
const { destroyInactiveTabs } =
|
|
4431
|
+
var TabsContent = React50__namespace.forwardRef(({ className, ...props }, ref) => {
|
|
4432
|
+
const { destroyInactiveTabs } = React50__namespace.useContext(TabsContext);
|
|
4428
4433
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
4429
4434
|
TabsPrimitive__namespace.Content,
|
|
4430
4435
|
{
|
|
@@ -4513,7 +4518,7 @@ var separatorVariants = classVarianceAuthority.cva("shrink-0 bg-line-normal", {
|
|
|
4513
4518
|
variant: "default"
|
|
4514
4519
|
}
|
|
4515
4520
|
});
|
|
4516
|
-
var Separator5 =
|
|
4521
|
+
var Separator5 = React50__namespace.forwardRef(
|
|
4517
4522
|
({
|
|
4518
4523
|
className,
|
|
4519
4524
|
orientation = "horizontal",
|
|
@@ -4570,7 +4575,7 @@ var AspectRatio = AspectRatioPrimitive__namespace.Root;
|
|
|
4570
4575
|
|
|
4571
4576
|
// src/components/ui/accordion/index.tsx
|
|
4572
4577
|
init_utils();
|
|
4573
|
-
var Accordion =
|
|
4578
|
+
var Accordion = React50__namespace.forwardRef(
|
|
4574
4579
|
({
|
|
4575
4580
|
items,
|
|
4576
4581
|
className,
|
|
@@ -4580,7 +4585,7 @@ var Accordion = React49__namespace.forwardRef(
|
|
|
4580
4585
|
renderItem,
|
|
4581
4586
|
...props
|
|
4582
4587
|
}, ref) => {
|
|
4583
|
-
const defaultRenderItem =
|
|
4588
|
+
const defaultRenderItem = React50__namespace.useCallback(
|
|
4584
4589
|
(item) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
4585
4590
|
AccordionPrimitive__namespace.Item,
|
|
4586
4591
|
{
|
|
@@ -4628,7 +4633,7 @@ Accordion.displayName = "Accordion";
|
|
|
4628
4633
|
// src/components/ui/collapsible/index.tsx
|
|
4629
4634
|
init_utils();
|
|
4630
4635
|
var Collapsible = CollapsiblePrimitive__namespace.Root;
|
|
4631
|
-
var CollapsibleItem =
|
|
4636
|
+
var CollapsibleItem = React50__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
4632
4637
|
"div",
|
|
4633
4638
|
{
|
|
4634
4639
|
ref,
|
|
@@ -4640,7 +4645,7 @@ var CollapsibleItem = React49__namespace.forwardRef(({ className, ...props }, re
|
|
|
4640
4645
|
}
|
|
4641
4646
|
));
|
|
4642
4647
|
CollapsibleItem.displayName = "CollapsibleItem";
|
|
4643
|
-
var CollapsibleTrigger =
|
|
4648
|
+
var CollapsibleTrigger = React50__namespace.forwardRef(({ className, children, indicator, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
4644
4649
|
CollapsiblePrimitive__namespace.Trigger,
|
|
4645
4650
|
{
|
|
4646
4651
|
ref,
|
|
@@ -4666,7 +4671,7 @@ var CollapsibleTrigger = React49__namespace.forwardRef(({ className, children, i
|
|
|
4666
4671
|
}
|
|
4667
4672
|
));
|
|
4668
4673
|
CollapsibleTrigger.displayName = CollapsiblePrimitive__namespace.Trigger.displayName;
|
|
4669
|
-
var CollapsibleContent =
|
|
4674
|
+
var CollapsibleContent = React50__namespace.forwardRef(({ className, contentClassName, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
4670
4675
|
CollapsiblePrimitive__namespace.Content,
|
|
4671
4676
|
{
|
|
4672
4677
|
ref,
|
|
@@ -4717,7 +4722,7 @@ var ResizableHandle = ({
|
|
|
4717
4722
|
|
|
4718
4723
|
// src/components/ui/scroll-area/index.tsx
|
|
4719
4724
|
init_utils();
|
|
4720
|
-
var ScrollArea =
|
|
4725
|
+
var ScrollArea = React50__namespace.forwardRef(
|
|
4721
4726
|
({
|
|
4722
4727
|
className,
|
|
4723
4728
|
children,
|
|
@@ -4772,7 +4777,7 @@ var ScrollArea = React49__namespace.forwardRef(
|
|
|
4772
4777
|
}
|
|
4773
4778
|
);
|
|
4774
4779
|
ScrollArea.displayName = ScrollAreaPrimitive__namespace.Root.displayName;
|
|
4775
|
-
var ScrollBar =
|
|
4780
|
+
var ScrollBar = React50__namespace.forwardRef(({ className, orientation = "vertical", thumbClassName, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
4776
4781
|
ScrollAreaPrimitive__namespace.ScrollAreaScrollbar,
|
|
4777
4782
|
{
|
|
4778
4783
|
ref,
|
|
@@ -4804,9 +4809,9 @@ var SIDEBAR_COOKIE_MAX_AGE = 60 * 60 * 24 * 7;
|
|
|
4804
4809
|
var SIDEBAR_WIDTH = "16rem";
|
|
4805
4810
|
var SIDEBAR_WIDTH_ICON = "3rem";
|
|
4806
4811
|
var SIDEBAR_KEYBOARD_SHORTCUT = "b";
|
|
4807
|
-
var SidebarContext =
|
|
4812
|
+
var SidebarContext = React50__namespace.createContext(null);
|
|
4808
4813
|
function useSidebar() {
|
|
4809
|
-
const context =
|
|
4814
|
+
const context = React50__namespace.useContext(SidebarContext);
|
|
4810
4815
|
if (!context) {
|
|
4811
4816
|
throw new Error("useSidebar must be used within a SidebarProvider.");
|
|
4812
4817
|
}
|
|
@@ -4821,9 +4826,9 @@ function SidebarProvider({
|
|
|
4821
4826
|
children,
|
|
4822
4827
|
...props
|
|
4823
4828
|
}) {
|
|
4824
|
-
const [_open, _setOpen] =
|
|
4829
|
+
const [_open, _setOpen] = React50__namespace.useState(defaultOpen);
|
|
4825
4830
|
const open = openProp ?? _open;
|
|
4826
|
-
const setOpen =
|
|
4831
|
+
const setOpen = React50__namespace.useCallback(
|
|
4827
4832
|
(value) => {
|
|
4828
4833
|
const openState = typeof value === "function" ? value(open) : value;
|
|
4829
4834
|
if (setOpenProp) {
|
|
@@ -4835,10 +4840,10 @@ function SidebarProvider({
|
|
|
4835
4840
|
},
|
|
4836
4841
|
[setOpenProp, open]
|
|
4837
4842
|
);
|
|
4838
|
-
const toggleSidebar =
|
|
4843
|
+
const toggleSidebar = React50__namespace.useCallback(() => {
|
|
4839
4844
|
return setOpen((open2) => !open2);
|
|
4840
4845
|
}, [setOpen]);
|
|
4841
|
-
|
|
4846
|
+
React50__namespace.useEffect(() => {
|
|
4842
4847
|
const handleKeyDown = (event) => {
|
|
4843
4848
|
if (event.key === SIDEBAR_KEYBOARD_SHORTCUT && (event.metaKey || event.ctrlKey)) {
|
|
4844
4849
|
event.preventDefault();
|
|
@@ -4849,7 +4854,7 @@ function SidebarProvider({
|
|
|
4849
4854
|
return () => window.removeEventListener("keydown", handleKeyDown);
|
|
4850
4855
|
}, [toggleSidebar]);
|
|
4851
4856
|
const state = open ? "expanded" : "collapsed";
|
|
4852
|
-
const contextValue =
|
|
4857
|
+
const contextValue = React50__namespace.useMemo(
|
|
4853
4858
|
() => ({
|
|
4854
4859
|
state,
|
|
4855
4860
|
open,
|
|
@@ -5315,7 +5320,7 @@ function SidebarMenuSkeleton({
|
|
|
5315
5320
|
showIcon = false,
|
|
5316
5321
|
...props
|
|
5317
5322
|
}) {
|
|
5318
|
-
const width =
|
|
5323
|
+
const width = React50__namespace.useMemo(() => {
|
|
5319
5324
|
return `${Math.floor(Math.random() * 40) + 50}%`;
|
|
5320
5325
|
}, []);
|
|
5321
5326
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -5434,7 +5439,7 @@ var tableVariants = classVarianceAuthority.cva("w-full caption-bottom text-sm",
|
|
|
5434
5439
|
size: "default"
|
|
5435
5440
|
}
|
|
5436
5441
|
});
|
|
5437
|
-
var Table =
|
|
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(
|
|
5438
5443
|
"table",
|
|
5439
5444
|
{
|
|
5440
5445
|
ref,
|
|
@@ -5443,9 +5448,9 @@ var Table = React49__namespace.forwardRef(({ className, variant, size, wrapperCl
|
|
|
5443
5448
|
}
|
|
5444
5449
|
) }));
|
|
5445
5450
|
Table.displayName = "Table";
|
|
5446
|
-
var TableHeader =
|
|
5451
|
+
var TableHeader = React50__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("thead", { ref, className: cn("[&_tr]:border-b", className), ...props }));
|
|
5447
5452
|
TableHeader.displayName = "TableHeader";
|
|
5448
|
-
var TableBody =
|
|
5453
|
+
var TableBody = React50__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
5449
5454
|
"tbody",
|
|
5450
5455
|
{
|
|
5451
5456
|
ref,
|
|
@@ -5454,7 +5459,7 @@ var TableBody = React49__namespace.forwardRef(({ className, ...props }, ref) =>
|
|
|
5454
5459
|
}
|
|
5455
5460
|
));
|
|
5456
5461
|
TableBody.displayName = "TableBody";
|
|
5457
|
-
var TableFooter =
|
|
5462
|
+
var TableFooter = React50__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
5458
5463
|
"tfoot",
|
|
5459
5464
|
{
|
|
5460
5465
|
ref,
|
|
@@ -5466,7 +5471,7 @@ var TableFooter = React49__namespace.forwardRef(({ className, ...props }, ref) =
|
|
|
5466
5471
|
}
|
|
5467
5472
|
));
|
|
5468
5473
|
TableFooter.displayName = "TableFooter";
|
|
5469
|
-
var TableRow =
|
|
5474
|
+
var TableRow = React50__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
5470
5475
|
"tr",
|
|
5471
5476
|
{
|
|
5472
5477
|
ref,
|
|
@@ -5478,7 +5483,7 @@ var TableRow = React49__namespace.forwardRef(({ className, ...props }, ref) => /
|
|
|
5478
5483
|
}
|
|
5479
5484
|
));
|
|
5480
5485
|
TableRow.displayName = "TableRow";
|
|
5481
|
-
var TableHead =
|
|
5486
|
+
var TableHead = React50__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
5482
5487
|
"th",
|
|
5483
5488
|
{
|
|
5484
5489
|
ref,
|
|
@@ -5490,7 +5495,7 @@ var TableHead = React49__namespace.forwardRef(({ className, ...props }, ref) =>
|
|
|
5490
5495
|
}
|
|
5491
5496
|
));
|
|
5492
5497
|
TableHead.displayName = "TableHead";
|
|
5493
|
-
var TableCell =
|
|
5498
|
+
var TableCell = React50__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
5494
5499
|
"td",
|
|
5495
5500
|
{
|
|
5496
5501
|
ref,
|
|
@@ -5502,7 +5507,7 @@ var TableCell = React49__namespace.forwardRef(({ className, ...props }, ref) =>
|
|
|
5502
5507
|
}
|
|
5503
5508
|
));
|
|
5504
5509
|
TableCell.displayName = "TableCell";
|
|
5505
|
-
var TableCaption =
|
|
5510
|
+
var TableCaption = React50__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
5506
5511
|
"caption",
|
|
5507
5512
|
{
|
|
5508
5513
|
ref,
|
|
@@ -5548,9 +5553,10 @@ var TableBodyComponent = ({
|
|
|
5548
5553
|
rowClassName,
|
|
5549
5554
|
onRowClick,
|
|
5550
5555
|
getRowExpandable,
|
|
5551
|
-
invalidateCache
|
|
5556
|
+
invalidateCache,
|
|
5557
|
+
headers
|
|
5552
5558
|
}) => {
|
|
5553
|
-
const resolveRowClassName =
|
|
5559
|
+
const resolveRowClassName = React50.useCallback(
|
|
5554
5560
|
(record, index) => {
|
|
5555
5561
|
if (!rowClassName) return "";
|
|
5556
5562
|
return typeof rowClassName === "function" ? rowClassName(record, index) : rowClassName;
|
|
@@ -5589,7 +5595,42 @@ var TableBodyComponent = ({
|
|
|
5589
5595
|
}
|
|
5590
5596
|
return reactTable.flexRender(cell.column.columnDef.cell, cell.getContext());
|
|
5591
5597
|
};
|
|
5592
|
-
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(
|
|
5593
5634
|
(rowData, options = {}) => {
|
|
5594
5635
|
const { ref, virtualIndex } = options;
|
|
5595
5636
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -5610,6 +5651,25 @@ var TableBodyComponent = ({
|
|
|
5610
5651
|
onClick: () => onRowClick?.(rowData.original, rowData.index),
|
|
5611
5652
|
children: rowData.getVisibleCells().map((cell) => {
|
|
5612
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;
|
|
5613
5673
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
5614
5674
|
TableCell,
|
|
5615
5675
|
{
|
|
@@ -5617,9 +5677,13 @@ var TableBodyComponent = ({
|
|
|
5617
5677
|
meta?.className,
|
|
5618
5678
|
meta?.align === "center" && "text-center",
|
|
5619
5679
|
meta?.align === "right" && "text-right",
|
|
5620
|
-
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"
|
|
5621
5685
|
),
|
|
5622
|
-
style:
|
|
5686
|
+
style: Object.keys(pinnedStyle).length > 0 ? pinnedStyle : void 0,
|
|
5623
5687
|
children: onRenderedRow(cell, virtualIndex)
|
|
5624
5688
|
},
|
|
5625
5689
|
cell.id
|
|
@@ -5629,9 +5693,16 @@ var TableBodyComponent = ({
|
|
|
5629
5693
|
`row-${rowData.index}`
|
|
5630
5694
|
);
|
|
5631
5695
|
},
|
|
5632
|
-
[
|
|
5696
|
+
[
|
|
5697
|
+
onRowClick,
|
|
5698
|
+
resolveRowClassName,
|
|
5699
|
+
leftOffsets,
|
|
5700
|
+
rightOffsets,
|
|
5701
|
+
lastLeftId,
|
|
5702
|
+
firstRightId
|
|
5703
|
+
]
|
|
5633
5704
|
);
|
|
5634
|
-
const renderExpandedRow =
|
|
5705
|
+
const renderExpandedRow = React50.useCallback(
|
|
5635
5706
|
(rowData, options = {}) => {
|
|
5636
5707
|
if (!renderExpandedContent) return null;
|
|
5637
5708
|
const { ref, virtualIndex } = options;
|
|
@@ -5712,7 +5783,7 @@ var TableBodyComponent = ({
|
|
|
5712
5783
|
) })
|
|
5713
5784
|
] });
|
|
5714
5785
|
}
|
|
5715
|
-
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: [
|
|
5716
5787
|
renderBaseRow(row),
|
|
5717
5788
|
expandable && renderExpandedRow(row)
|
|
5718
5789
|
] }, row.id)) });
|
|
@@ -5733,9 +5804,8 @@ var pinOptions = [
|
|
|
5733
5804
|
{ value: "right", label: "Pin Right" }
|
|
5734
5805
|
];
|
|
5735
5806
|
var sizingOptions = [
|
|
5736
|
-
{ value: "single", label: "
|
|
5737
|
-
{ value: "all", label: "
|
|
5738
|
-
{ value: "reset", label: "Reset All Columns" }
|
|
5807
|
+
{ value: "reset-single", label: "Reset This Column" },
|
|
5808
|
+
{ value: "reset-all", label: "Reset All Columns" }
|
|
5739
5809
|
];
|
|
5740
5810
|
var sortOptions = [
|
|
5741
5811
|
{ value: "asc", label: "Sort Ascending" },
|
|
@@ -5746,7 +5816,11 @@ var TableHeaderComponent = ({
|
|
|
5746
5816
|
enableColumnOrdering,
|
|
5747
5817
|
baseColumnOrder,
|
|
5748
5818
|
setColumnOrder,
|
|
5749
|
-
draggedColumnId
|
|
5819
|
+
draggedColumnId,
|
|
5820
|
+
pinnedLeftOffset,
|
|
5821
|
+
pinnedRightOffset,
|
|
5822
|
+
isLastLeftPinned,
|
|
5823
|
+
isFirstRightPinned
|
|
5750
5824
|
}) => {
|
|
5751
5825
|
const column = header.column;
|
|
5752
5826
|
const meta = column.columnDef.meta;
|
|
@@ -5778,25 +5852,25 @@ var TableHeaderComponent = ({
|
|
|
5778
5852
|
return next;
|
|
5779
5853
|
});
|
|
5780
5854
|
};
|
|
5781
|
-
const [inputValue, setInputValue] =
|
|
5782
|
-
const debounceTimeoutRef =
|
|
5783
|
-
|
|
5855
|
+
const [inputValue, setInputValue] = React50.useState(value);
|
|
5856
|
+
const debounceTimeoutRef = React50.useRef(null);
|
|
5857
|
+
React50.useEffect(() => {
|
|
5784
5858
|
setInputValue(value);
|
|
5785
5859
|
}, [value]);
|
|
5786
|
-
|
|
5860
|
+
React50.useEffect(() => {
|
|
5787
5861
|
return () => {
|
|
5788
5862
|
if (debounceTimeoutRef.current !== null) {
|
|
5789
5863
|
window.clearTimeout(debounceTimeoutRef.current);
|
|
5790
5864
|
}
|
|
5791
5865
|
};
|
|
5792
5866
|
}, []);
|
|
5793
|
-
const handleFilterChange =
|
|
5867
|
+
const handleFilterChange = React50.useCallback(
|
|
5794
5868
|
(type, nextValue) => {
|
|
5795
5869
|
column.setFilterValue({ filterType: type, value: nextValue });
|
|
5796
5870
|
},
|
|
5797
5871
|
[column]
|
|
5798
5872
|
);
|
|
5799
|
-
const debouncedFilterChange =
|
|
5873
|
+
const debouncedFilterChange = React50.useCallback(
|
|
5800
5874
|
(type, nextValue) => {
|
|
5801
5875
|
if (debounceTimeoutRef.current !== null) {
|
|
5802
5876
|
window.clearTimeout(debounceTimeoutRef.current);
|
|
@@ -5808,7 +5882,7 @@ var TableHeaderComponent = ({
|
|
|
5808
5882
|
},
|
|
5809
5883
|
[handleFilterChange]
|
|
5810
5884
|
);
|
|
5811
|
-
const handleInputChange =
|
|
5885
|
+
const handleInputChange = React50.useCallback(
|
|
5812
5886
|
(event) => {
|
|
5813
5887
|
const nextValue = event.target.value;
|
|
5814
5888
|
setInputValue(nextValue);
|
|
@@ -5817,7 +5891,17 @@ var TableHeaderComponent = ({
|
|
|
5817
5891
|
[debouncedFilterChange, filterType]
|
|
5818
5892
|
);
|
|
5819
5893
|
const showPopover = column.getCanSort() || column.getCanPin() || column.getCanFilter() || column.getCanResize();
|
|
5820
|
-
|
|
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(
|
|
5821
5905
|
TableHead,
|
|
5822
5906
|
{
|
|
5823
5907
|
className: cn(
|
|
@@ -5826,157 +5910,212 @@ var TableHeaderComponent = ({
|
|
|
5826
5910
|
meta?.align === "right" && "text-right",
|
|
5827
5911
|
meta?.align === "left" && "text-left",
|
|
5828
5912
|
column.getCanSort() && "select-none",
|
|
5829
|
-
"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"
|
|
5830
5918
|
),
|
|
5831
|
-
style:
|
|
5832
|
-
children:
|
|
5833
|
-
|
|
5834
|
-
|
|
5835
|
-
|
|
5836
|
-
|
|
5837
|
-
|
|
5838
|
-
|
|
5839
|
-
|
|
5840
|
-
|
|
5841
|
-
|
|
5842
|
-
|
|
5843
|
-
|
|
5844
|
-
|
|
5845
|
-
|
|
5846
|
-
|
|
5847
|
-
|
|
5848
|
-
|
|
5849
|
-
|
|
5850
|
-
|
|
5851
|
-
|
|
5852
|
-
|
|
5853
|
-
|
|
5854
|
-
|
|
5855
|
-
|
|
5856
|
-
|
|
5857
|
-
|
|
5858
|
-
|
|
5859
|
-
|
|
5860
|
-
|
|
5861
|
-
|
|
5862
|
-
|
|
5863
|
-
|
|
5864
|
-
|
|
5865
|
-
|
|
5866
|
-
"
|
|
5867
|
-
|
|
5868
|
-
|
|
5869
|
-
|
|
5870
|
-
|
|
5871
|
-
|
|
5872
|
-
|
|
5873
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
5874
|
-
|
|
5875
|
-
|
|
5876
|
-
|
|
5877
|
-
|
|
5878
|
-
|
|
5879
|
-
|
|
5880
|
-
|
|
5881
|
-
{
|
|
5882
|
-
value: option.value,
|
|
5883
|
-
onSelect: () => {
|
|
5884
|
-
},
|
|
5885
|
-
children: option.label
|
|
5886
|
-
},
|
|
5887
|
-
option.value
|
|
5888
|
-
)) }) }) }) }),
|
|
5889
|
-
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(
|
|
5890
|
-
CommandItem,
|
|
5891
|
-
{
|
|
5892
|
-
value: option.value,
|
|
5893
|
-
onSelect: () => {
|
|
5894
|
-
if (option.value === sortDirection) {
|
|
5895
|
-
column.clearSorting();
|
|
5896
|
-
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" })
|
|
5897
5969
|
}
|
|
5898
|
-
|
|
5899
|
-
|
|
5900
|
-
|
|
5901
|
-
|
|
5902
|
-
|
|
5903
|
-
|
|
5904
|
-
{
|
|
5905
|
-
className: cn(
|
|
5906
|
-
"ml-auto h-4 w-4",
|
|
5907
|
-
sortDirection === option.value ? "opacity-100" : "opacity-0"
|
|
5908
|
-
)
|
|
5909
|
-
}
|
|
5910
|
-
)
|
|
5911
|
-
]
|
|
5912
|
-
},
|
|
5913
|
-
option.value
|
|
5914
|
-
)) }) }) }) }),
|
|
5915
|
-
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(
|
|
5916
|
-
CommandItem,
|
|
5917
|
-
{
|
|
5918
|
-
value: option.value,
|
|
5919
|
-
onSelect: () => {
|
|
5920
|
-
if (option.value === pinPosition) {
|
|
5921
|
-
column.pin(false);
|
|
5922
|
-
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" })
|
|
5923
5977
|
}
|
|
5924
|
-
|
|
5925
|
-
|
|
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" })
|
|
5926
5985
|
}
|
|
5927
|
-
|
|
5928
|
-
|
|
5929
|
-
|
|
5930
|
-
|
|
5931
|
-
|
|
5932
|
-
|
|
5933
|
-
|
|
5934
|
-
|
|
5935
|
-
|
|
5936
|
-
|
|
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();
|
|
5937
6005
|
}
|
|
5938
|
-
|
|
5939
|
-
|
|
5940
|
-
|
|
5941
|
-
|
|
5942
|
-
|
|
5943
|
-
|
|
5944
|
-
|
|
5945
|
-
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,
|
|
5946
6013
|
{
|
|
5947
|
-
value:
|
|
5948
|
-
|
|
5949
|
-
if (
|
|
5950
|
-
|
|
5951
|
-
|
|
6014
|
+
value: option.value,
|
|
6015
|
+
onSelect: () => {
|
|
6016
|
+
if (option.value === sortDirection) {
|
|
6017
|
+
column.clearSorting();
|
|
6018
|
+
return;
|
|
5952
6019
|
}
|
|
5953
|
-
|
|
6020
|
+
column.toggleSorting(option.value === "desc");
|
|
5954
6021
|
},
|
|
5955
6022
|
children: [
|
|
5956
|
-
|
|
5957
|
-
/* @__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
|
+
)
|
|
5958
6033
|
]
|
|
5959
|
-
}
|
|
5960
|
-
|
|
5961
|
-
|
|
5962
|
-
|
|
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,
|
|
5963
6039
|
{
|
|
5964
|
-
|
|
5965
|
-
|
|
5966
|
-
|
|
5967
|
-
|
|
5968
|
-
|
|
5969
|
-
|
|
5970
|
-
|
|
5971
|
-
|
|
5972
|
-
|
|
5973
|
-
|
|
5974
|
-
|
|
5975
|
-
|
|
5976
|
-
|
|
5977
|
-
|
|
5978
|
-
|
|
5979
|
-
|
|
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
|
+
]
|
|
5980
6119
|
},
|
|
5981
6120
|
header.id
|
|
5982
6121
|
);
|
|
@@ -5992,6 +6131,46 @@ var TableToolbarComponent = ({
|
|
|
5992
6131
|
customizeToolbar
|
|
5993
6132
|
}) => {
|
|
5994
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]);
|
|
5995
6174
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-2", children: [
|
|
5996
6175
|
toolbarVisible && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
5997
6176
|
enableExport && /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -6009,9 +6188,10 @@ var TableToolbarComponent = ({
|
|
|
6009
6188
|
Input,
|
|
6010
6189
|
{
|
|
6011
6190
|
leftIcon: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.SearchIcon, {}),
|
|
6012
|
-
value:
|
|
6013
|
-
onChange:
|
|
6191
|
+
value: inputValue,
|
|
6192
|
+
onChange: handleInputChange,
|
|
6014
6193
|
clearable: true,
|
|
6194
|
+
onClear: handleClear,
|
|
6015
6195
|
placeholder: globalFilterPlaceholder
|
|
6016
6196
|
}
|
|
6017
6197
|
)
|
|
@@ -6109,37 +6289,40 @@ function useTableCore({
|
|
|
6109
6289
|
manualSorting,
|
|
6110
6290
|
onFilterChange,
|
|
6111
6291
|
getCheckboxProps,
|
|
6112
|
-
selectedRowKey
|
|
6292
|
+
selectedRowKey,
|
|
6293
|
+
defaultColumnPinning,
|
|
6294
|
+
enableColumnResizing = false,
|
|
6295
|
+
columnResizeMode = "onChange"
|
|
6113
6296
|
}) {
|
|
6114
|
-
const [sorting, setSorting] =
|
|
6297
|
+
const [sorting, setSorting] = React50.useState(
|
|
6115
6298
|
sortBy ? [{ id: sortBy, desc: sortDirection === "desc" }] : []
|
|
6116
6299
|
);
|
|
6117
|
-
const [columnFilters, setColumnFilters] =
|
|
6118
|
-
const [globalFilter, setGlobalFilter] =
|
|
6119
|
-
const [rowSelection, setRowSelection] =
|
|
6120
|
-
const [expanded, setExpanded] =
|
|
6121
|
-
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({
|
|
6122
6305
|
pageIndex: Math.max(currentPage - 1, 0),
|
|
6123
6306
|
pageSize
|
|
6124
6307
|
});
|
|
6125
|
-
const [columnPinning, setColumnPinning] =
|
|
6126
|
-
left: [],
|
|
6127
|
-
right: []
|
|
6308
|
+
const [columnPinning, setColumnPinning] = React50.useState({
|
|
6309
|
+
left: defaultColumnPinning?.left ?? [],
|
|
6310
|
+
right: defaultColumnPinning?.right ?? []
|
|
6128
6311
|
});
|
|
6129
6312
|
const dataLength = data.length;
|
|
6130
|
-
const enableColumnFilters =
|
|
6313
|
+
const enableColumnFilters = React50.useMemo(() => {
|
|
6131
6314
|
return columns.some((column) => column.filterable === true);
|
|
6132
6315
|
}, [columns]);
|
|
6133
|
-
const enableColumnSorter =
|
|
6316
|
+
const enableColumnSorter = React50.useMemo(() => {
|
|
6134
6317
|
return columns.some((column) => column.sortable === true);
|
|
6135
6318
|
}, [columns]);
|
|
6136
|
-
const pinnableColumnIds =
|
|
6319
|
+
const pinnableColumnIds = React50.useMemo(() => {
|
|
6137
6320
|
return columns.filter((column) => column.pinnable === true).map(
|
|
6138
6321
|
(column) => typeof column.key === "string" ? column.key : String(column.key)
|
|
6139
6322
|
);
|
|
6140
6323
|
}, [columns]);
|
|
6141
6324
|
const enableColumnPin = pinnableColumnIds.length > 0;
|
|
6142
|
-
const baseColumnOrder =
|
|
6325
|
+
const baseColumnOrder = React50.useMemo(() => {
|
|
6143
6326
|
const ids = [];
|
|
6144
6327
|
if (showIndex) ids.push("_mvn_index");
|
|
6145
6328
|
if (expandable) ids.push("_mvn_expand");
|
|
@@ -6150,8 +6333,8 @@ function useTableCore({
|
|
|
6150
6333
|
});
|
|
6151
6334
|
return ids;
|
|
6152
6335
|
}, [columns, selectable, expandable, showIndex]);
|
|
6153
|
-
const [columnOrder, setColumnOrder] =
|
|
6154
|
-
|
|
6336
|
+
const [columnOrder, setColumnOrder] = React50.useState(baseColumnOrder);
|
|
6337
|
+
React50.useEffect(() => {
|
|
6155
6338
|
setColumnOrder((previous) => {
|
|
6156
6339
|
if (isEqual__default.default(previous, baseColumnOrder)) {
|
|
6157
6340
|
return previous;
|
|
@@ -6159,7 +6342,7 @@ function useTableCore({
|
|
|
6159
6342
|
return baseColumnOrder;
|
|
6160
6343
|
});
|
|
6161
6344
|
}, [baseColumnOrder]);
|
|
6162
|
-
|
|
6345
|
+
React50.useEffect(() => {
|
|
6163
6346
|
if (!sortBy) {
|
|
6164
6347
|
setSorting([]);
|
|
6165
6348
|
return;
|
|
@@ -6172,7 +6355,7 @@ function useTableCore({
|
|
|
6172
6355
|
return [next];
|
|
6173
6356
|
});
|
|
6174
6357
|
}, [sortBy, sortDirection]);
|
|
6175
|
-
|
|
6358
|
+
React50.useEffect(() => {
|
|
6176
6359
|
if (!enableColumnFilters) return;
|
|
6177
6360
|
if (!columns.some((column) => column.filterable && column?.defaultFilterValue))
|
|
6178
6361
|
return;
|
|
@@ -6189,7 +6372,7 @@ function useTableCore({
|
|
|
6189
6372
|
return next;
|
|
6190
6373
|
});
|
|
6191
6374
|
}, [columns, enableColumnFilters]);
|
|
6192
|
-
const resolveRowId =
|
|
6375
|
+
const resolveRowId = React50.useCallback(
|
|
6193
6376
|
(record, index) => {
|
|
6194
6377
|
if (typeof rowKey === "function") {
|
|
6195
6378
|
return String(rowKey(record, index));
|
|
@@ -6199,7 +6382,7 @@ function useTableCore({
|
|
|
6199
6382
|
},
|
|
6200
6383
|
[rowKey]
|
|
6201
6384
|
);
|
|
6202
|
-
|
|
6385
|
+
React50.useEffect(() => {
|
|
6203
6386
|
const map = {};
|
|
6204
6387
|
selectedRowKey?.forEach((k) => {
|
|
6205
6388
|
map[k] = true;
|
|
@@ -6211,7 +6394,7 @@ function useTableCore({
|
|
|
6211
6394
|
await onFilterChange(filters);
|
|
6212
6395
|
}
|
|
6213
6396
|
};
|
|
6214
|
-
const handleFilteringChange =
|
|
6397
|
+
const handleFilteringChange = React50.useCallback(
|
|
6215
6398
|
(updater) => {
|
|
6216
6399
|
setColumnFilters((previous) => {
|
|
6217
6400
|
const next = typeof updater === "function" ? updater(previous) : updater;
|
|
@@ -6221,7 +6404,7 @@ function useTableCore({
|
|
|
6221
6404
|
},
|
|
6222
6405
|
[enableColumnFilters, onFilterChange, columnFilters]
|
|
6223
6406
|
);
|
|
6224
|
-
const handleSortingChange =
|
|
6407
|
+
const handleSortingChange = React50.useCallback(
|
|
6225
6408
|
(updater) => {
|
|
6226
6409
|
setSorting((previous) => {
|
|
6227
6410
|
const next = typeof updater === "function" ? updater(previous) : updater;
|
|
@@ -6238,7 +6421,7 @@ function useTableCore({
|
|
|
6238
6421
|
},
|
|
6239
6422
|
[onSortChange]
|
|
6240
6423
|
);
|
|
6241
|
-
const columnDefs =
|
|
6424
|
+
const columnDefs = React50.useMemo(() => {
|
|
6242
6425
|
const defs = columns.map((column) => {
|
|
6243
6426
|
const key = typeof column.key === "string" ? column.key : String(column.key);
|
|
6244
6427
|
return {
|
|
@@ -6342,7 +6525,7 @@ function useTableCore({
|
|
|
6342
6525
|
expandable,
|
|
6343
6526
|
showIndex
|
|
6344
6527
|
]);
|
|
6345
|
-
|
|
6528
|
+
React50.useEffect(() => {
|
|
6346
6529
|
if (!pagination) return;
|
|
6347
6530
|
setPaginationState((previous) => {
|
|
6348
6531
|
const newPageIndex = Math.max(currentPage - 1, 0);
|
|
@@ -6356,7 +6539,7 @@ function useTableCore({
|
|
|
6356
6539
|
return next;
|
|
6357
6540
|
});
|
|
6358
6541
|
}, [pagination, currentPage, pageSize]);
|
|
6359
|
-
const handlePaginationChange =
|
|
6542
|
+
const handlePaginationChange = React50.useCallback(
|
|
6360
6543
|
(updater) => {
|
|
6361
6544
|
if (!pagination) return;
|
|
6362
6545
|
setPaginationState((previous) => {
|
|
@@ -6372,7 +6555,7 @@ function useTableCore({
|
|
|
6372
6555
|
},
|
|
6373
6556
|
[pagination, onPageChange]
|
|
6374
6557
|
);
|
|
6375
|
-
const tablePaginationState =
|
|
6558
|
+
const tablePaginationState = React50.useMemo(() => {
|
|
6376
6559
|
if (!pagination) {
|
|
6377
6560
|
const fallbackSize = dataLength || paginationState.pageSize || 1;
|
|
6378
6561
|
return { pageIndex: 0, pageSize: fallbackSize };
|
|
@@ -6384,6 +6567,8 @@ function useTableCore({
|
|
|
6384
6567
|
columns: columnDefs,
|
|
6385
6568
|
manualFiltering,
|
|
6386
6569
|
manualSorting,
|
|
6570
|
+
enableColumnResizing,
|
|
6571
|
+
columnResizeMode,
|
|
6387
6572
|
state: {
|
|
6388
6573
|
sorting,
|
|
6389
6574
|
columnFilters,
|
|
@@ -6413,11 +6598,11 @@ function useTableCore({
|
|
|
6413
6598
|
getRowId: (originalRow, index) => resolveRowId(originalRow, index),
|
|
6414
6599
|
getRowCanExpand: expandable ? (row) => getRowCanExpand ? getRowCanExpand(row.original) : !!renderExpandedContent : void 0
|
|
6415
6600
|
});
|
|
6416
|
-
const pageCount =
|
|
6601
|
+
const pageCount = React50.useMemo(
|
|
6417
6602
|
() => table.getPageCount(),
|
|
6418
6603
|
[table, sorting, columnFilters]
|
|
6419
6604
|
);
|
|
6420
|
-
|
|
6605
|
+
React50.useEffect(() => {
|
|
6421
6606
|
if (!enableColumnPin) {
|
|
6422
6607
|
setColumnPinning({ left: [], right: [] });
|
|
6423
6608
|
return;
|
|
@@ -6435,7 +6620,7 @@ function useTableCore({
|
|
|
6435
6620
|
return next;
|
|
6436
6621
|
});
|
|
6437
6622
|
}, [enableColumnPin, pinnableColumnIds]);
|
|
6438
|
-
|
|
6623
|
+
React50.useEffect(() => {
|
|
6439
6624
|
if (!pagination) return;
|
|
6440
6625
|
setPaginationState((previous) => {
|
|
6441
6626
|
const lastPage = Math.max(pageCount - 1, 0);
|
|
@@ -6445,11 +6630,11 @@ function useTableCore({
|
|
|
6445
6630
|
return previous;
|
|
6446
6631
|
});
|
|
6447
6632
|
}, [pagination, pageCount]);
|
|
6448
|
-
const shouldShowPagination =
|
|
6633
|
+
const shouldShowPagination = React50.useCallback(
|
|
6449
6634
|
() => pagination && pageCount > 1,
|
|
6450
6635
|
[pagination, pageCount]
|
|
6451
6636
|
);
|
|
6452
|
-
const pageNumbers =
|
|
6637
|
+
const pageNumbers = React50.useMemo(() => {
|
|
6453
6638
|
if (!pagination || pageCount <= 0) return [];
|
|
6454
6639
|
const windowSize = Math.max(Math.min(numberOfPageButtons, pageCount), 1);
|
|
6455
6640
|
const half = Math.floor(windowSize / 2);
|
|
@@ -6483,7 +6668,7 @@ function useTableVirtualization({
|
|
|
6483
6668
|
overScan,
|
|
6484
6669
|
shouldVirtualize
|
|
6485
6670
|
}) {
|
|
6486
|
-
const virtualRowPointers =
|
|
6671
|
+
const virtualRowPointers = React50.useMemo(() => {
|
|
6487
6672
|
const arr = [];
|
|
6488
6673
|
rows.forEach((row, index) => {
|
|
6489
6674
|
arr.push({
|
|
@@ -6500,14 +6685,14 @@ function useTableVirtualization({
|
|
|
6500
6685
|
});
|
|
6501
6686
|
return arr;
|
|
6502
6687
|
}, [rows, expandable]);
|
|
6503
|
-
const virtualRowPointersRef =
|
|
6688
|
+
const virtualRowPointersRef = React50.useRef(virtualRowPointers);
|
|
6504
6689
|
virtualRowPointersRef.current = virtualRowPointers;
|
|
6505
|
-
const cacheBackingRef =
|
|
6690
|
+
const cacheBackingRef = React50.useRef(
|
|
6506
6691
|
/* @__PURE__ */ new Map()
|
|
6507
6692
|
);
|
|
6508
|
-
const heightCacheByIndexRef =
|
|
6509
|
-
const heightCacheByKeyRef =
|
|
6510
|
-
const cacheRef =
|
|
6693
|
+
const heightCacheByIndexRef = React50.useRef(/* @__PURE__ */ new Map());
|
|
6694
|
+
const heightCacheByKeyRef = React50.useRef(/* @__PURE__ */ new Map());
|
|
6695
|
+
const cacheRef = React50.useRef({
|
|
6511
6696
|
get: (index) => cacheBackingRef.current.get(index)?.size,
|
|
6512
6697
|
set: (index, size, key) => {
|
|
6513
6698
|
cacheBackingRef.current.set(index, { size, key });
|
|
@@ -6525,23 +6710,23 @@ function useTableVirtualization({
|
|
|
6525
6710
|
});
|
|
6526
6711
|
}
|
|
6527
6712
|
});
|
|
6528
|
-
const [virtualWindow, setVirtualWindow] =
|
|
6529
|
-
const virtualWindowRef =
|
|
6530
|
-
const rafRef =
|
|
6531
|
-
const debounceTimeoutRef =
|
|
6532
|
-
const measurementQueueRef =
|
|
6533
|
-
const measurementRafRef =
|
|
6534
|
-
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(
|
|
6535
6720
|
null
|
|
6536
6721
|
);
|
|
6537
|
-
const measurementIdleRef =
|
|
6538
|
-
const prefixSumCacheRef =
|
|
6722
|
+
const measurementIdleRef = React50.useRef(null);
|
|
6723
|
+
const prefixSumCacheRef = React50.useRef({
|
|
6539
6724
|
count: 0,
|
|
6540
6725
|
itemSizes: [],
|
|
6541
6726
|
offsets: [],
|
|
6542
6727
|
totalSize: 0
|
|
6543
6728
|
});
|
|
6544
|
-
const cleanupRaf =
|
|
6729
|
+
const cleanupRaf = React50.useCallback(() => {
|
|
6545
6730
|
if (debounceTimeoutRef.current != null) {
|
|
6546
6731
|
clearTimeout(debounceTimeoutRef.current);
|
|
6547
6732
|
debounceTimeoutRef.current = null;
|
|
@@ -6572,7 +6757,7 @@ function useTableVirtualization({
|
|
|
6572
6757
|
totalSize: 0
|
|
6573
6758
|
};
|
|
6574
6759
|
}, []);
|
|
6575
|
-
const estimateSize =
|
|
6760
|
+
const estimateSize = React50.useCallback(
|
|
6576
6761
|
(index) => {
|
|
6577
6762
|
const item = virtualRowPointersRef.current[index];
|
|
6578
6763
|
if (!item) return baseRowEstimateSize;
|
|
@@ -6589,7 +6774,7 @@ function useTableVirtualization({
|
|
|
6589
6774
|
},
|
|
6590
6775
|
[baseRowEstimateSize, expandContentEstimateSize]
|
|
6591
6776
|
);
|
|
6592
|
-
const recomputeVirtualWindow =
|
|
6777
|
+
const recomputeVirtualWindow = React50.useCallback(() => {
|
|
6593
6778
|
if (!shouldVirtualize) {
|
|
6594
6779
|
setVirtualWindow(EMPTY_WINDOW);
|
|
6595
6780
|
return;
|
|
@@ -6607,7 +6792,7 @@ function useTableVirtualization({
|
|
|
6607
6792
|
});
|
|
6608
6793
|
setVirtualWindow(nextWindow);
|
|
6609
6794
|
}, [estimateSize, overScan]);
|
|
6610
|
-
const scheduleRecompute =
|
|
6795
|
+
const scheduleRecompute = React50.useCallback(() => {
|
|
6611
6796
|
if (!shouldVirtualize) return;
|
|
6612
6797
|
if (debounceTimeoutRef.current != null) {
|
|
6613
6798
|
clearTimeout(debounceTimeoutRef.current);
|
|
@@ -6626,7 +6811,7 @@ function useTableVirtualization({
|
|
|
6626
6811
|
};
|
|
6627
6812
|
debounceTimeoutRef.current = setTimeout(run, SCROLL_RESIZE_DEBOUNCE_MS);
|
|
6628
6813
|
}, [recomputeVirtualWindow]);
|
|
6629
|
-
const flushMeasurementQueue =
|
|
6814
|
+
const flushMeasurementQueue = React50.useCallback(() => {
|
|
6630
6815
|
if (!shouldVirtualize) {
|
|
6631
6816
|
measurementQueueRef.current.clear();
|
|
6632
6817
|
return;
|
|
@@ -6655,7 +6840,7 @@ function useTableVirtualization({
|
|
|
6655
6840
|
measurementQueueRef.current.clear();
|
|
6656
6841
|
scheduleRecompute();
|
|
6657
6842
|
}, [scheduleRecompute]);
|
|
6658
|
-
const scheduleMeasurementFlush =
|
|
6843
|
+
const scheduleMeasurementFlush = React50.useCallback(() => {
|
|
6659
6844
|
if (!shouldVirtualize) {
|
|
6660
6845
|
measurementQueueRef.current.clear();
|
|
6661
6846
|
return;
|
|
@@ -6683,7 +6868,7 @@ function useTableVirtualization({
|
|
|
6683
6868
|
measurementTimeoutRef.current = setTimeout(runFlush, 16);
|
|
6684
6869
|
}
|
|
6685
6870
|
}, [flushMeasurementQueue]);
|
|
6686
|
-
const measureElement =
|
|
6871
|
+
const measureElement = React50.useCallback(
|
|
6687
6872
|
(height, index) => {
|
|
6688
6873
|
if (!height || !shouldVirtualize || index == null) return;
|
|
6689
6874
|
if (shouldVirtualize) {
|
|
@@ -6700,7 +6885,7 @@ function useTableVirtualization({
|
|
|
6700
6885
|
},
|
|
6701
6886
|
[scheduleMeasurementFlush]
|
|
6702
6887
|
);
|
|
6703
|
-
|
|
6888
|
+
React50.useEffect(() => {
|
|
6704
6889
|
if (!shouldVirtualize) {
|
|
6705
6890
|
cacheRef.current.clear();
|
|
6706
6891
|
heightCacheByIndexRef.current.clear();
|
|
@@ -6718,7 +6903,7 @@ function useTableVirtualization({
|
|
|
6718
6903
|
});
|
|
6719
6904
|
scheduleRecompute();
|
|
6720
6905
|
}, [scheduleRecompute]);
|
|
6721
|
-
const invalidateCache =
|
|
6906
|
+
const invalidateCache = React50.useCallback(
|
|
6722
6907
|
(index, key) => {
|
|
6723
6908
|
const result = cacheRef.current.invalidateIndex?.(index);
|
|
6724
6909
|
if (!result) return;
|
|
@@ -6729,7 +6914,7 @@ function useTableVirtualization({
|
|
|
6729
6914
|
},
|
|
6730
6915
|
[scheduleRecompute]
|
|
6731
6916
|
);
|
|
6732
|
-
|
|
6917
|
+
React50.useEffect(() => {
|
|
6733
6918
|
if (!shouldVirtualize) return;
|
|
6734
6919
|
const element = tableContainerRef.current;
|
|
6735
6920
|
if (!element) return;
|
|
@@ -6758,11 +6943,11 @@ function useTableVirtualization({
|
|
|
6758
6943
|
if (frameId != null) cancelAnimationFrame(frameId);
|
|
6759
6944
|
};
|
|
6760
6945
|
}, [scheduleRecompute]);
|
|
6761
|
-
|
|
6762
|
-
|
|
6946
|
+
React50.useEffect(() => () => cleanupRaf(), [cleanupRaf]);
|
|
6947
|
+
React50.useEffect(() => {
|
|
6763
6948
|
virtualWindowRef.current = virtualWindow;
|
|
6764
6949
|
}, [virtualWindow]);
|
|
6765
|
-
const virtualItems =
|
|
6950
|
+
const virtualItems = React50.useMemo(() => {
|
|
6766
6951
|
if (!shouldVirtualize) return [];
|
|
6767
6952
|
return virtualWindow.items.map(({ index, offset, size }) => {
|
|
6768
6953
|
const start = offset;
|
|
@@ -6977,10 +7162,11 @@ function SimpleTable({
|
|
|
6977
7162
|
maxRecords,
|
|
6978
7163
|
loadingText,
|
|
6979
7164
|
pagingPosition = "right",
|
|
6980
|
-
recordPerChunk = 100
|
|
7165
|
+
recordPerChunk = 100,
|
|
7166
|
+
defaultColumnPinning
|
|
6981
7167
|
}) {
|
|
6982
|
-
const [internalLazyLoading, setInternalLazyLoading] =
|
|
6983
|
-
const pendingLazyLoad =
|
|
7168
|
+
const [internalLazyLoading, setInternalLazyLoading] = React50.useState(false);
|
|
7169
|
+
const pendingLazyLoad = React50.useRef(false);
|
|
6984
7170
|
const isControlledLoading = loading !== void 0;
|
|
6985
7171
|
const resolvedLoading = isControlledLoading ? loading : internalLazyLoading;
|
|
6986
7172
|
const showOverlayLoading = resolvedLoading && lazyLoadIndicatorType === "overlay";
|
|
@@ -7020,9 +7206,10 @@ function SimpleTable({
|
|
|
7020
7206
|
numberOfPageButtons,
|
|
7021
7207
|
manualSorting,
|
|
7022
7208
|
manualFiltering,
|
|
7023
|
-
onFilterChange
|
|
7209
|
+
onFilterChange,
|
|
7210
|
+
defaultColumnPinning
|
|
7024
7211
|
});
|
|
7025
|
-
const handleLazyLoad =
|
|
7212
|
+
const handleLazyLoad = React50.useCallback(async () => {
|
|
7026
7213
|
if (!onLazyScrollLoad || pendingLazyLoad.current || resolvedLoading) return;
|
|
7027
7214
|
pendingLazyLoad.current = true;
|
|
7028
7215
|
if (!isControlledLoading) setInternalLazyLoading(true);
|
|
@@ -7034,8 +7221,8 @@ function SimpleTable({
|
|
|
7034
7221
|
}
|
|
7035
7222
|
}, [onLazyScrollLoad, resolvedLoading]);
|
|
7036
7223
|
const virtualizationActive = data.length * (expandable ? 2 : 1) > virtualizationThreshold;
|
|
7037
|
-
const [chunkCount, setChunkCount] =
|
|
7038
|
-
const onLoadChunk =
|
|
7224
|
+
const [chunkCount, setChunkCount] = React50.useState(recordPerChunk);
|
|
7225
|
+
const onLoadChunk = React50.useCallback(() => {
|
|
7039
7226
|
if (resolvedLoading || pendingLazyLoad.current) return;
|
|
7040
7227
|
if (data.length > chunkCount) {
|
|
7041
7228
|
setChunkCount(() => Math.min(chunkCount + recordPerChunk, data.length));
|
|
@@ -7044,25 +7231,25 @@ function SimpleTable({
|
|
|
7044
7231
|
if (typeof maxRecords === "number" && data.length >= maxRecords) return;
|
|
7045
7232
|
void handleLazyLoad();
|
|
7046
7233
|
}, [recordPerChunk, data.length, handleLazyLoad, chunkCount, maxRecords]);
|
|
7047
|
-
const onLoadChunkRef =
|
|
7048
|
-
|
|
7234
|
+
const onLoadChunkRef = React50.useRef(onLoadChunk);
|
|
7235
|
+
React50.useEffect(() => {
|
|
7049
7236
|
onLoadChunkRef.current = onLoadChunk;
|
|
7050
7237
|
}, [onLoadChunk]);
|
|
7051
|
-
const rows =
|
|
7238
|
+
const rows = React50.useMemo(
|
|
7052
7239
|
() => table.getRowModel().rows,
|
|
7053
|
-
[paginationState, sorting, columnFilters]
|
|
7240
|
+
[paginationState, sorting, columnFilters, globalFilter]
|
|
7054
7241
|
);
|
|
7055
|
-
const splittedRows =
|
|
7242
|
+
const splittedRows = React50.useMemo(
|
|
7056
7243
|
() => rows.slice(0, chunkCount),
|
|
7057
7244
|
[rows, chunkCount]
|
|
7058
7245
|
);
|
|
7059
|
-
const selectedRows =
|
|
7246
|
+
const selectedRows = React50.useMemo(
|
|
7060
7247
|
() => table.getSelectedRowModel().rows.map((row) => row.original),
|
|
7061
7248
|
[rowSelection]
|
|
7062
7249
|
);
|
|
7063
7250
|
const tablePagination = table.getState().pagination;
|
|
7064
|
-
const draggedColumnId =
|
|
7065
|
-
const tableContainerRef =
|
|
7251
|
+
const draggedColumnId = React50.useRef(null);
|
|
7252
|
+
const tableContainerRef = React50.useRef(null);
|
|
7066
7253
|
const {
|
|
7067
7254
|
virtualRowPointers,
|
|
7068
7255
|
virtualItems,
|
|
@@ -7079,8 +7266,8 @@ function SimpleTable({
|
|
|
7079
7266
|
overScan,
|
|
7080
7267
|
shouldVirtualize: virtualizationActive
|
|
7081
7268
|
});
|
|
7082
|
-
const rafRef =
|
|
7083
|
-
|
|
7269
|
+
const rafRef = React50.useRef(null);
|
|
7270
|
+
React50.useEffect(() => {
|
|
7084
7271
|
const container = tableContainerRef.current;
|
|
7085
7272
|
if (!container || virtualizationActive) return;
|
|
7086
7273
|
const scheduleCheck = () => {
|
|
@@ -7103,24 +7290,64 @@ function SimpleTable({
|
|
|
7103
7290
|
}
|
|
7104
7291
|
};
|
|
7105
7292
|
}, [scrollLoadThreshold, virtualizationActive]);
|
|
7106
|
-
|
|
7293
|
+
React50.useEffect(() => {
|
|
7107
7294
|
if (virtualizationActive) return;
|
|
7108
7295
|
if (table.getState().pagination.pageIndex === 0) {
|
|
7109
7296
|
tableContainerRef.current?.scrollTo({ top: 0 });
|
|
7110
7297
|
}
|
|
7111
7298
|
}, [virtualizationActive]);
|
|
7112
|
-
|
|
7299
|
+
React50.useEffect(() => {
|
|
7113
7300
|
if (!virtualItems.length || !virtualizationActive) return;
|
|
7114
7301
|
if (paddingBottom <= scrollLoadThreshold) {
|
|
7115
7302
|
onLoadChunkRef.current();
|
|
7116
7303
|
}
|
|
7117
7304
|
}, [paddingBottom, scrollLoadThreshold, virtualizationActive]);
|
|
7118
7305
|
const columnCount = table.getAllLeafColumns().length;
|
|
7119
|
-
|
|
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(() => {
|
|
7120
7347
|
if (!selectable || !onSelectionChange) return;
|
|
7121
7348
|
onSelectionChange(selectedRows);
|
|
7122
7349
|
}, [selectable, onSelectionChange, selectedRows]);
|
|
7123
|
-
|
|
7350
|
+
React50.useEffect(() => {
|
|
7124
7351
|
if (!expandable || !onExpandedChange) return;
|
|
7125
7352
|
onExpandedChange(
|
|
7126
7353
|
table.getExpandedRowModel().rows.map((row) => row.original)
|
|
@@ -7177,6 +7404,7 @@ function SimpleTable({
|
|
|
7177
7404
|
caption && /* @__PURE__ */ jsxRuntime.jsx(TableCaption, { children: caption }),
|
|
7178
7405
|
/* @__PURE__ */ jsxRuntime.jsx(TableHeader, { children: table.getHeaderGroups().map((headerGroup) => /* @__PURE__ */ jsxRuntime.jsx(TableRow, { children: headerGroup.headers.map((header) => {
|
|
7179
7406
|
if (header.isPlaceholder) return null;
|
|
7407
|
+
const pinPosition = header.column.getIsPinned();
|
|
7180
7408
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
7181
7409
|
TableHeaderComponent,
|
|
7182
7410
|
{
|
|
@@ -7184,7 +7412,11 @@ function SimpleTable({
|
|
|
7184
7412
|
draggedColumnId,
|
|
7185
7413
|
enableColumnOrdering,
|
|
7186
7414
|
baseColumnOrder,
|
|
7187
|
-
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
|
|
7188
7420
|
},
|
|
7189
7421
|
header.id
|
|
7190
7422
|
);
|
|
@@ -7207,7 +7439,8 @@ function SimpleTable({
|
|
|
7207
7439
|
renderExpandedContent,
|
|
7208
7440
|
virtualItems,
|
|
7209
7441
|
invalidateCache,
|
|
7210
|
-
getRowExpandable
|
|
7442
|
+
getRowExpandable,
|
|
7443
|
+
headers: allHeaders
|
|
7211
7444
|
}
|
|
7212
7445
|
),
|
|
7213
7446
|
showInlineLoadingRow && resolvedLoading && /* @__PURE__ */ jsxRuntime.jsx(TableRow, { "data-loading-row": true, className: "pointer-events-none", children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -7268,12 +7501,12 @@ function DataTable({
|
|
|
7268
7501
|
pageSize = 10,
|
|
7269
7502
|
className
|
|
7270
7503
|
}) {
|
|
7271
|
-
const [sorting, setSorting] =
|
|
7272
|
-
const [columnFilters, setColumnFilters] =
|
|
7504
|
+
const [sorting, setSorting] = React50__namespace.useState([]);
|
|
7505
|
+
const [columnFilters, setColumnFilters] = React50__namespace.useState(
|
|
7273
7506
|
[]
|
|
7274
7507
|
);
|
|
7275
|
-
const [columnVisibility, setColumnVisibility] =
|
|
7276
|
-
const [rowSelection, setRowSelection] =
|
|
7508
|
+
const [columnVisibility, setColumnVisibility] = React50__namespace.useState({});
|
|
7509
|
+
const [rowSelection, setRowSelection] = React50__namespace.useState({});
|
|
7277
7510
|
const table = reactTable.useReactTable({
|
|
7278
7511
|
data,
|
|
7279
7512
|
columns,
|
|
@@ -7430,7 +7663,7 @@ var avatarFallbackVariants = classVarianceAuthority.cva(
|
|
|
7430
7663
|
}
|
|
7431
7664
|
}
|
|
7432
7665
|
);
|
|
7433
|
-
var Avatar =
|
|
7666
|
+
var Avatar = React50__namespace.forwardRef(({ className, size, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
7434
7667
|
AvatarPrimitive__namespace.Root,
|
|
7435
7668
|
{
|
|
7436
7669
|
ref,
|
|
@@ -7439,7 +7672,7 @@ var Avatar = React49__namespace.forwardRef(({ className, size, ...props }, ref)
|
|
|
7439
7672
|
}
|
|
7440
7673
|
));
|
|
7441
7674
|
Avatar.displayName = AvatarPrimitive__namespace.Root.displayName;
|
|
7442
|
-
var AvatarImage =
|
|
7675
|
+
var AvatarImage = React50__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
7443
7676
|
AvatarPrimitive__namespace.Image,
|
|
7444
7677
|
{
|
|
7445
7678
|
ref,
|
|
@@ -7448,7 +7681,7 @@ var AvatarImage = React49__namespace.forwardRef(({ className, ...props }, ref) =
|
|
|
7448
7681
|
}
|
|
7449
7682
|
));
|
|
7450
7683
|
AvatarImage.displayName = AvatarPrimitive__namespace.Image.displayName;
|
|
7451
|
-
var AvatarFallback =
|
|
7684
|
+
var AvatarFallback = React50__namespace.forwardRef(({ className, size, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
7452
7685
|
AvatarPrimitive__namespace.Fallback,
|
|
7453
7686
|
{
|
|
7454
7687
|
ref,
|
|
@@ -7612,7 +7845,7 @@ var itemVariants = classVarianceAuthority.cva(
|
|
|
7612
7845
|
}
|
|
7613
7846
|
}
|
|
7614
7847
|
);
|
|
7615
|
-
var Item9 =
|
|
7848
|
+
var Item9 = React50__namespace.forwardRef(
|
|
7616
7849
|
({
|
|
7617
7850
|
className,
|
|
7618
7851
|
variant,
|
|
@@ -7678,7 +7911,7 @@ var Item9 = React49__namespace.forwardRef(
|
|
|
7678
7911
|
}
|
|
7679
7912
|
);
|
|
7680
7913
|
Item9.displayName = "Item";
|
|
7681
|
-
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: [
|
|
7682
7915
|
(label || description) && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "px-3 py-2 space-y-0.5", children: [
|
|
7683
7916
|
label && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-xs font-semibold text-muted-foreground uppercase tracking-wider", children: label }),
|
|
7684
7917
|
description && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-xs text-muted-foreground", children: description })
|
|
@@ -7686,7 +7919,7 @@ var ItemGroup = React49__namespace.forwardRef(({ className, label, description,
|
|
|
7686
7919
|
children
|
|
7687
7920
|
] }));
|
|
7688
7921
|
ItemGroup.displayName = "ItemGroup";
|
|
7689
|
-
var ItemList =
|
|
7922
|
+
var ItemList = React50__namespace.forwardRef(({ className, divided, spacing = "default", children, ...props }, ref) => {
|
|
7690
7923
|
const spacingClasses = {
|
|
7691
7924
|
none: "space-y-0",
|
|
7692
7925
|
sm: "space-y-0.5",
|
|
@@ -7709,7 +7942,7 @@ var ItemList = React49__namespace.forwardRef(({ className, divided, spacing = "d
|
|
|
7709
7942
|
);
|
|
7710
7943
|
});
|
|
7711
7944
|
ItemList.displayName = "ItemList";
|
|
7712
|
-
var ItemSeparator =
|
|
7945
|
+
var ItemSeparator = React50__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
7713
7946
|
"div",
|
|
7714
7947
|
{
|
|
7715
7948
|
ref,
|
|
@@ -7747,7 +7980,7 @@ var badgeVariants = classVarianceAuthority.cva(
|
|
|
7747
7980
|
}
|
|
7748
7981
|
}
|
|
7749
7982
|
);
|
|
7750
|
-
var Badge =
|
|
7983
|
+
var Badge = React50__namespace.forwardRef(
|
|
7751
7984
|
({
|
|
7752
7985
|
className,
|
|
7753
7986
|
variant,
|
|
@@ -7814,7 +8047,7 @@ function Calendar({
|
|
|
7814
8047
|
...props
|
|
7815
8048
|
}) {
|
|
7816
8049
|
const defaultClassNames = reactDayPicker.getDefaultClassNames();
|
|
7817
|
-
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(() => {
|
|
7818
8051
|
try {
|
|
7819
8052
|
const cardComponents = (init_card(), __toCommonJS(card_exports));
|
|
7820
8053
|
return cardComponents;
|
|
@@ -7828,7 +8061,7 @@ function Calendar({
|
|
|
7828
8061
|
};
|
|
7829
8062
|
}
|
|
7830
8063
|
}, []);
|
|
7831
|
-
const defaultPresets =
|
|
8064
|
+
const defaultPresets = React50__namespace.useMemo(() => {
|
|
7832
8065
|
if (!quickSelect && !presets) return [];
|
|
7833
8066
|
const mode = props.mode;
|
|
7834
8067
|
if (mode === "single") {
|
|
@@ -7836,7 +8069,7 @@ function Calendar({
|
|
|
7836
8069
|
{
|
|
7837
8070
|
label: "Today",
|
|
7838
8071
|
value: () => /* @__PURE__ */ new Date(),
|
|
7839
|
-
icon:
|
|
8072
|
+
icon: React50__namespace.createElement(lucideReact.Calendar, { className: "h-3 w-3" })
|
|
7840
8073
|
},
|
|
7841
8074
|
{
|
|
7842
8075
|
label: "Tomorrow",
|
|
@@ -7845,7 +8078,7 @@ function Calendar({
|
|
|
7845
8078
|
tomorrow.setDate(tomorrow.getDate() + 1);
|
|
7846
8079
|
return tomorrow;
|
|
7847
8080
|
},
|
|
7848
|
-
icon:
|
|
8081
|
+
icon: React50__namespace.createElement("span", { className: "text-xs" }, "\u27A1\uFE0F")
|
|
7849
8082
|
},
|
|
7850
8083
|
{
|
|
7851
8084
|
label: "Next Week",
|
|
@@ -7854,7 +8087,7 @@ function Calendar({
|
|
|
7854
8087
|
nextWeek.setDate(nextWeek.getDate() + 7);
|
|
7855
8088
|
return nextWeek;
|
|
7856
8089
|
},
|
|
7857
|
-
icon:
|
|
8090
|
+
icon: React50__namespace.createElement(lucideReact.Calendar, { className: "h-3 w-3" })
|
|
7858
8091
|
}
|
|
7859
8092
|
];
|
|
7860
8093
|
} else if (mode === "range") {
|
|
@@ -7867,7 +8100,7 @@ function Calendar({
|
|
|
7867
8100
|
end.setDate(start.getDate() + 6);
|
|
7868
8101
|
return { from: start, to: end };
|
|
7869
8102
|
},
|
|
7870
|
-
icon:
|
|
8103
|
+
icon: React50__namespace.createElement(lucideReact.Calendar, { className: "h-3 w-3" })
|
|
7871
8104
|
},
|
|
7872
8105
|
{
|
|
7873
8106
|
label: "Next 7 Days",
|
|
@@ -7877,7 +8110,7 @@ function Calendar({
|
|
|
7877
8110
|
end.setDate(start.getDate() + 7);
|
|
7878
8111
|
return { from: start, to: end };
|
|
7879
8112
|
},
|
|
7880
|
-
icon:
|
|
8113
|
+
icon: React50__namespace.createElement("span", { className: "text-xs" }, "\u27A1\uFE0F")
|
|
7881
8114
|
}
|
|
7882
8115
|
];
|
|
7883
8116
|
} else {
|
|
@@ -7893,7 +8126,7 @@ function Calendar({
|
|
|
7893
8126
|
}
|
|
7894
8127
|
return dates;
|
|
7895
8128
|
},
|
|
7896
|
-
icon:
|
|
8129
|
+
icon: React50__namespace.createElement(lucideReact.Calendar, { className: "h-3 w-3" })
|
|
7897
8130
|
}
|
|
7898
8131
|
];
|
|
7899
8132
|
}
|
|
@@ -7904,24 +8137,24 @@ function Calendar({
|
|
|
7904
8137
|
const selected = props.selected;
|
|
7905
8138
|
const mode = props.mode;
|
|
7906
8139
|
if (mode === "single" && selected) {
|
|
7907
|
-
return
|
|
8140
|
+
return React50__namespace.createElement(
|
|
7908
8141
|
"div",
|
|
7909
8142
|
{
|
|
7910
8143
|
className: "p-3 border rounded-lg bg-muted/50"
|
|
7911
8144
|
},
|
|
7912
8145
|
[
|
|
7913
|
-
|
|
8146
|
+
React50__namespace.createElement(
|
|
7914
8147
|
"div",
|
|
7915
8148
|
{
|
|
7916
8149
|
key: "header",
|
|
7917
8150
|
className: "flex items-center gap-2 mb-1"
|
|
7918
8151
|
},
|
|
7919
8152
|
[
|
|
7920
|
-
|
|
8153
|
+
React50__namespace.createElement(lucideReact.Calendar, {
|
|
7921
8154
|
key: "icon",
|
|
7922
8155
|
className: "h-4 w-4"
|
|
7923
8156
|
}),
|
|
7924
|
-
|
|
8157
|
+
React50__namespace.createElement(
|
|
7925
8158
|
"span",
|
|
7926
8159
|
{
|
|
7927
8160
|
key: "label",
|
|
@@ -7931,7 +8164,7 @@ function Calendar({
|
|
|
7931
8164
|
)
|
|
7932
8165
|
]
|
|
7933
8166
|
),
|
|
7934
|
-
|
|
8167
|
+
React50__namespace.createElement(
|
|
7935
8168
|
"p",
|
|
7936
8169
|
{
|
|
7937
8170
|
key: "date",
|
|
@@ -7949,24 +8182,24 @@ function Calendar({
|
|
|
7949
8182
|
}
|
|
7950
8183
|
if (mode === "range" && selected?.from) {
|
|
7951
8184
|
const elements = [
|
|
7952
|
-
|
|
8185
|
+
React50__namespace.createElement(
|
|
7953
8186
|
"div",
|
|
7954
8187
|
{
|
|
7955
8188
|
key: "from",
|
|
7956
8189
|
className: "flex items-center gap-2 text-sm"
|
|
7957
8190
|
},
|
|
7958
8191
|
[
|
|
7959
|
-
|
|
8192
|
+
React50__namespace.createElement(
|
|
7960
8193
|
"span",
|
|
7961
8194
|
{ key: "icon", className: "text-green-600" },
|
|
7962
8195
|
"\u{1F7E2}"
|
|
7963
8196
|
),
|
|
7964
|
-
|
|
8197
|
+
React50__namespace.createElement(
|
|
7965
8198
|
"span",
|
|
7966
8199
|
{ key: "label", className: "font-medium" },
|
|
7967
8200
|
"From:"
|
|
7968
8201
|
),
|
|
7969
|
-
|
|
8202
|
+
React50__namespace.createElement(
|
|
7970
8203
|
"span",
|
|
7971
8204
|
{ key: "date" },
|
|
7972
8205
|
selected.from.toLocaleDateString()
|
|
@@ -7976,43 +8209,43 @@ function Calendar({
|
|
|
7976
8209
|
];
|
|
7977
8210
|
if (selected.to) {
|
|
7978
8211
|
elements.push(
|
|
7979
|
-
|
|
8212
|
+
React50__namespace.createElement(
|
|
7980
8213
|
"div",
|
|
7981
8214
|
{
|
|
7982
8215
|
key: "to",
|
|
7983
8216
|
className: "flex items-center gap-2 text-sm"
|
|
7984
8217
|
},
|
|
7985
8218
|
[
|
|
7986
|
-
|
|
8219
|
+
React50__namespace.createElement(
|
|
7987
8220
|
"span",
|
|
7988
8221
|
{ key: "icon", className: "text-red-600" },
|
|
7989
8222
|
"\u{1F534}"
|
|
7990
8223
|
),
|
|
7991
|
-
|
|
8224
|
+
React50__namespace.createElement(
|
|
7992
8225
|
"span",
|
|
7993
8226
|
{ key: "label", className: "font-medium" },
|
|
7994
8227
|
"To:"
|
|
7995
8228
|
),
|
|
7996
|
-
|
|
8229
|
+
React50__namespace.createElement(
|
|
7997
8230
|
"span",
|
|
7998
8231
|
{ key: "date" },
|
|
7999
8232
|
selected.to.toLocaleDateString()
|
|
8000
8233
|
)
|
|
8001
8234
|
]
|
|
8002
8235
|
),
|
|
8003
|
-
|
|
8236
|
+
React50__namespace.createElement(
|
|
8004
8237
|
"div",
|
|
8005
8238
|
{
|
|
8006
8239
|
key: "duration",
|
|
8007
8240
|
className: "flex items-center gap-2 pt-2 border-t text-sm"
|
|
8008
8241
|
},
|
|
8009
8242
|
[
|
|
8010
|
-
|
|
8243
|
+
React50__namespace.createElement(
|
|
8011
8244
|
"span",
|
|
8012
8245
|
{ key: "icon", className: "text-mvn-blue-600" },
|
|
8013
8246
|
"\u23F1\uFE0F"
|
|
8014
8247
|
),
|
|
8015
|
-
|
|
8248
|
+
React50__namespace.createElement(
|
|
8016
8249
|
"span",
|
|
8017
8250
|
{ key: "text" },
|
|
8018
8251
|
`Duration: ${Math.ceil(
|
|
@@ -8023,25 +8256,25 @@ function Calendar({
|
|
|
8023
8256
|
)
|
|
8024
8257
|
);
|
|
8025
8258
|
}
|
|
8026
|
-
return
|
|
8259
|
+
return React50__namespace.createElement(
|
|
8027
8260
|
"div",
|
|
8028
8261
|
{
|
|
8029
8262
|
className: "p-3 border rounded-lg bg-muted/50"
|
|
8030
8263
|
},
|
|
8031
|
-
|
|
8264
|
+
React50__namespace.createElement("div", { className: "space-y-2" }, elements)
|
|
8032
8265
|
);
|
|
8033
8266
|
}
|
|
8034
8267
|
if (mode === "multiple" && Array.isArray(selected) && selected.length > 0) {
|
|
8035
8268
|
const sortedDates = selected.sort((a, b) => a.getTime() - b.getTime()).slice(0, 5);
|
|
8036
8269
|
const dateElements = sortedDates.map(
|
|
8037
|
-
(date, index) =>
|
|
8270
|
+
(date, index) => React50__namespace.createElement(
|
|
8038
8271
|
"div",
|
|
8039
8272
|
{
|
|
8040
8273
|
key: index,
|
|
8041
8274
|
className: "flex items-center justify-between p-2 bg-background rounded border"
|
|
8042
8275
|
},
|
|
8043
8276
|
[
|
|
8044
|
-
|
|
8277
|
+
React50__namespace.createElement(
|
|
8045
8278
|
"span",
|
|
8046
8279
|
{
|
|
8047
8280
|
key: "date",
|
|
@@ -8053,7 +8286,7 @@ function Calendar({
|
|
|
8053
8286
|
year: "numeric"
|
|
8054
8287
|
})
|
|
8055
8288
|
),
|
|
8056
|
-
|
|
8289
|
+
React50__namespace.createElement(
|
|
8057
8290
|
"button",
|
|
8058
8291
|
{
|
|
8059
8292
|
key: "remove",
|
|
@@ -8074,18 +8307,18 @@ function Calendar({
|
|
|
8074
8307
|
)
|
|
8075
8308
|
);
|
|
8076
8309
|
const elements = [
|
|
8077
|
-
|
|
8310
|
+
React50__namespace.createElement(
|
|
8078
8311
|
"div",
|
|
8079
8312
|
{
|
|
8080
8313
|
key: "header",
|
|
8081
8314
|
className: "flex items-center gap-2 mb-2"
|
|
8082
8315
|
},
|
|
8083
8316
|
[
|
|
8084
|
-
|
|
8317
|
+
React50__namespace.createElement(lucideReact.Star, {
|
|
8085
8318
|
key: "icon",
|
|
8086
8319
|
className: "h-4 w-4 text-yellow-500"
|
|
8087
8320
|
}),
|
|
8088
|
-
|
|
8321
|
+
React50__namespace.createElement(
|
|
8089
8322
|
"span",
|
|
8090
8323
|
{
|
|
8091
8324
|
key: "label",
|
|
@@ -8095,7 +8328,7 @@ function Calendar({
|
|
|
8095
8328
|
)
|
|
8096
8329
|
]
|
|
8097
8330
|
),
|
|
8098
|
-
|
|
8331
|
+
React50__namespace.createElement(
|
|
8099
8332
|
"div",
|
|
8100
8333
|
{
|
|
8101
8334
|
key: "dates",
|
|
@@ -8106,7 +8339,7 @@ function Calendar({
|
|
|
8106
8339
|
];
|
|
8107
8340
|
if (selected.length > 5) {
|
|
8108
8341
|
elements.push(
|
|
8109
|
-
|
|
8342
|
+
React50__namespace.createElement(
|
|
8110
8343
|
"p",
|
|
8111
8344
|
{
|
|
8112
8345
|
key: "more",
|
|
@@ -8116,7 +8349,7 @@ function Calendar({
|
|
|
8116
8349
|
)
|
|
8117
8350
|
);
|
|
8118
8351
|
}
|
|
8119
|
-
return
|
|
8352
|
+
return React50__namespace.createElement(
|
|
8120
8353
|
"div",
|
|
8121
8354
|
{
|
|
8122
8355
|
className: "p-3 border rounded-lg bg-muted/50 max-h-48 overflow-y-auto"
|
|
@@ -8131,7 +8364,7 @@ function Calendar({
|
|
|
8131
8364
|
const elements = [];
|
|
8132
8365
|
if ((quickSelect || presets) && activePresets.length > 0) {
|
|
8133
8366
|
const presetButtons = activePresets.map(
|
|
8134
|
-
(preset, index) =>
|
|
8367
|
+
(preset, index) => React50__namespace.createElement(
|
|
8135
8368
|
"button",
|
|
8136
8369
|
{
|
|
8137
8370
|
key: index,
|
|
@@ -8140,19 +8373,19 @@ function Calendar({
|
|
|
8140
8373
|
},
|
|
8141
8374
|
[
|
|
8142
8375
|
preset.icon,
|
|
8143
|
-
|
|
8376
|
+
React50__namespace.createElement("span", { key: "label" }, preset.label)
|
|
8144
8377
|
]
|
|
8145
8378
|
)
|
|
8146
8379
|
);
|
|
8147
8380
|
elements.push(
|
|
8148
|
-
|
|
8381
|
+
React50__namespace.createElement(
|
|
8149
8382
|
"div",
|
|
8150
8383
|
{
|
|
8151
8384
|
key: "presets",
|
|
8152
8385
|
className: "space-y-2"
|
|
8153
8386
|
},
|
|
8154
8387
|
[
|
|
8155
|
-
|
|
8388
|
+
React50__namespace.createElement(
|
|
8156
8389
|
"h5",
|
|
8157
8390
|
{
|
|
8158
8391
|
key: "title",
|
|
@@ -8160,7 +8393,7 @@ function Calendar({
|
|
|
8160
8393
|
},
|
|
8161
8394
|
"Quick Select:"
|
|
8162
8395
|
),
|
|
8163
|
-
|
|
8396
|
+
React50__namespace.createElement(
|
|
8164
8397
|
"div",
|
|
8165
8398
|
{
|
|
8166
8399
|
key: "buttons",
|
|
@@ -8185,7 +8418,7 @@ function Calendar({
|
|
|
8185
8418
|
label = "Clear Range";
|
|
8186
8419
|
}
|
|
8187
8420
|
elements.push(
|
|
8188
|
-
|
|
8421
|
+
React50__namespace.createElement(
|
|
8189
8422
|
"button",
|
|
8190
8423
|
{
|
|
8191
8424
|
key: "clear",
|
|
@@ -8201,7 +8434,7 @@ function Calendar({
|
|
|
8201
8434
|
disabled
|
|
8202
8435
|
},
|
|
8203
8436
|
[
|
|
8204
|
-
|
|
8437
|
+
React50__namespace.createElement(lucideReact.RotateCcw, {
|
|
8205
8438
|
key: "icon",
|
|
8206
8439
|
className: "mr-1 h-3 w-3"
|
|
8207
8440
|
}),
|
|
@@ -8210,7 +8443,7 @@ function Calendar({
|
|
|
8210
8443
|
)
|
|
8211
8444
|
);
|
|
8212
8445
|
}
|
|
8213
|
-
return
|
|
8446
|
+
return React50__namespace.createElement(
|
|
8214
8447
|
"div",
|
|
8215
8448
|
{
|
|
8216
8449
|
className: cn("space-y-3", sidebarClassName)
|
|
@@ -8218,7 +8451,7 @@ function Calendar({
|
|
|
8218
8451
|
elements
|
|
8219
8452
|
);
|
|
8220
8453
|
};
|
|
8221
|
-
const calendarElement =
|
|
8454
|
+
const calendarElement = React50__namespace.createElement(reactDayPicker.DayPicker, {
|
|
8222
8455
|
showOutsideDays,
|
|
8223
8456
|
className: cn(
|
|
8224
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",
|
|
@@ -8320,7 +8553,7 @@ function Calendar({
|
|
|
8320
8553
|
},
|
|
8321
8554
|
components: {
|
|
8322
8555
|
Root: ({ className: className2, rootRef, ...props2 }) => {
|
|
8323
|
-
return
|
|
8556
|
+
return React50__namespace.createElement("div", {
|
|
8324
8557
|
"data-slot": "calendar",
|
|
8325
8558
|
ref: rootRef,
|
|
8326
8559
|
className: cn(className2),
|
|
@@ -8329,28 +8562,28 @@ function Calendar({
|
|
|
8329
8562
|
},
|
|
8330
8563
|
Chevron: ({ className: className2, orientation, ...props2 }) => {
|
|
8331
8564
|
if (orientation === "left") {
|
|
8332
|
-
return
|
|
8565
|
+
return React50__namespace.createElement(lucideReact.ChevronLeft, {
|
|
8333
8566
|
className: cn("size-4", className2),
|
|
8334
8567
|
...props2
|
|
8335
8568
|
});
|
|
8336
8569
|
}
|
|
8337
8570
|
if (orientation === "right") {
|
|
8338
|
-
return
|
|
8571
|
+
return React50__namespace.createElement(lucideReact.ChevronRight, {
|
|
8339
8572
|
className: cn("size-4", className2),
|
|
8340
8573
|
...props2
|
|
8341
8574
|
});
|
|
8342
8575
|
}
|
|
8343
|
-
return
|
|
8576
|
+
return React50__namespace.createElement(lucideReact.ChevronDown, {
|
|
8344
8577
|
className: cn("size-4", className2),
|
|
8345
8578
|
...props2
|
|
8346
8579
|
});
|
|
8347
8580
|
},
|
|
8348
8581
|
DayButton: CalendarDayButton,
|
|
8349
8582
|
WeekNumber: ({ children, ...props2 }) => {
|
|
8350
|
-
return
|
|
8583
|
+
return React50__namespace.createElement(
|
|
8351
8584
|
"td",
|
|
8352
8585
|
props2,
|
|
8353
|
-
|
|
8586
|
+
React50__namespace.createElement(
|
|
8354
8587
|
"div",
|
|
8355
8588
|
{
|
|
8356
8589
|
className: "flex size-10 items-center justify-center text-center text-sm font-medium text-muted-foreground"
|
|
@@ -8365,25 +8598,25 @@ function Calendar({
|
|
|
8365
8598
|
});
|
|
8366
8599
|
if (layout === "compact") {
|
|
8367
8600
|
if (withCard) {
|
|
8368
|
-
return
|
|
8601
|
+
return React50__namespace.createElement(
|
|
8369
8602
|
Card2,
|
|
8370
8603
|
{
|
|
8371
8604
|
className: cn("w-fit", cardClassName)
|
|
8372
8605
|
},
|
|
8373
|
-
|
|
8606
|
+
React50__namespace.createElement(CardContent2, { className: "p-3" }, calendarElement)
|
|
8374
8607
|
);
|
|
8375
8608
|
}
|
|
8376
8609
|
return calendarElement;
|
|
8377
8610
|
}
|
|
8378
8611
|
if (layout === "inline") {
|
|
8379
|
-
const sidebarElement2 = renderDateInfo() || renderQuickActions() ?
|
|
8612
|
+
const sidebarElement2 = renderDateInfo() || renderQuickActions() ? React50__namespace.createElement(
|
|
8380
8613
|
"div",
|
|
8381
8614
|
{
|
|
8382
8615
|
className: cn("min-w-[240px] space-y-3", sidebarClassName)
|
|
8383
8616
|
},
|
|
8384
8617
|
[renderDateInfo(), renderQuickActions()].filter(Boolean)
|
|
8385
8618
|
) : null;
|
|
8386
|
-
const content = sidebarElement2 ?
|
|
8619
|
+
const content = sidebarElement2 ? React50__namespace.createElement(
|
|
8387
8620
|
"div",
|
|
8388
8621
|
{
|
|
8389
8622
|
className: cn("flex gap-4 items-start", containerClassName)
|
|
@@ -8391,25 +8624,25 @@ function Calendar({
|
|
|
8391
8624
|
[calendarElement, sidebarElement2]
|
|
8392
8625
|
) : calendarElement;
|
|
8393
8626
|
if (withCard) {
|
|
8394
|
-
return
|
|
8627
|
+
return React50__namespace.createElement(
|
|
8395
8628
|
Card2,
|
|
8396
8629
|
{
|
|
8397
8630
|
className: cn("w-fit", cardClassName)
|
|
8398
8631
|
},
|
|
8399
8632
|
[
|
|
8400
|
-
(cardTitle || cardDescription) &&
|
|
8401
|
-
cardTitle &&
|
|
8633
|
+
(cardTitle || cardDescription) && React50__namespace.createElement(CardHeader2, { key: "header" }, [
|
|
8634
|
+
cardTitle && React50__namespace.createElement(
|
|
8402
8635
|
CardTitle2,
|
|
8403
8636
|
{ key: "title", className: "text-base" },
|
|
8404
8637
|
cardTitle
|
|
8405
8638
|
),
|
|
8406
|
-
cardDescription &&
|
|
8639
|
+
cardDescription && React50__namespace.createElement(
|
|
8407
8640
|
CardDescription2,
|
|
8408
8641
|
{ key: "desc" },
|
|
8409
8642
|
cardDescription
|
|
8410
8643
|
)
|
|
8411
8644
|
]),
|
|
8412
|
-
|
|
8645
|
+
React50__namespace.createElement(
|
|
8413
8646
|
CardContent2,
|
|
8414
8647
|
{
|
|
8415
8648
|
key: "content",
|
|
@@ -8422,7 +8655,7 @@ function Calendar({
|
|
|
8422
8655
|
}
|
|
8423
8656
|
return content;
|
|
8424
8657
|
}
|
|
8425
|
-
const sidebarElement = renderDateInfo() || renderQuickActions() ?
|
|
8658
|
+
const sidebarElement = renderDateInfo() || renderQuickActions() ? React50__namespace.createElement(
|
|
8426
8659
|
"div",
|
|
8427
8660
|
{
|
|
8428
8661
|
className: cn("min-w-[240px] space-y-3", sidebarClassName)
|
|
@@ -8430,7 +8663,7 @@ function Calendar({
|
|
|
8430
8663
|
[renderDateInfo(), renderQuickActions()].filter(Boolean)
|
|
8431
8664
|
) : null;
|
|
8432
8665
|
if (withCard) {
|
|
8433
|
-
const cardElement =
|
|
8666
|
+
const cardElement = React50__namespace.createElement(
|
|
8434
8667
|
Card2,
|
|
8435
8668
|
{
|
|
8436
8669
|
className: cn(
|
|
@@ -8441,19 +8674,19 @@ function Calendar({
|
|
|
8441
8674
|
)
|
|
8442
8675
|
},
|
|
8443
8676
|
[
|
|
8444
|
-
(cardTitle || cardDescription) &&
|
|
8445
|
-
cardTitle &&
|
|
8677
|
+
(cardTitle || cardDescription) && React50__namespace.createElement(CardHeader2, { key: "header" }, [
|
|
8678
|
+
cardTitle && React50__namespace.createElement(
|
|
8446
8679
|
CardTitle2,
|
|
8447
8680
|
{ key: "title", className: "text-base" },
|
|
8448
8681
|
cardTitle
|
|
8449
8682
|
),
|
|
8450
|
-
cardDescription &&
|
|
8683
|
+
cardDescription && React50__namespace.createElement(
|
|
8451
8684
|
CardDescription2,
|
|
8452
8685
|
{ key: "desc" },
|
|
8453
8686
|
cardDescription
|
|
8454
8687
|
)
|
|
8455
8688
|
]),
|
|
8456
|
-
|
|
8689
|
+
React50__namespace.createElement(
|
|
8457
8690
|
CardContent2,
|
|
8458
8691
|
{
|
|
8459
8692
|
key: "content",
|
|
@@ -8464,7 +8697,7 @@ function Calendar({
|
|
|
8464
8697
|
].filter(Boolean)
|
|
8465
8698
|
);
|
|
8466
8699
|
if (sidebarElement) {
|
|
8467
|
-
return
|
|
8700
|
+
return React50__namespace.createElement(
|
|
8468
8701
|
"div",
|
|
8469
8702
|
{
|
|
8470
8703
|
className: cn("flex gap-4 flex-wrap items-start", containerClassName)
|
|
@@ -8475,7 +8708,7 @@ function Calendar({
|
|
|
8475
8708
|
return cardElement;
|
|
8476
8709
|
}
|
|
8477
8710
|
if (sidebarElement) {
|
|
8478
|
-
return
|
|
8711
|
+
return React50__namespace.createElement(
|
|
8479
8712
|
"div",
|
|
8480
8713
|
{
|
|
8481
8714
|
className: cn("flex gap-4 flex-wrap items-start", containerClassName)
|
|
@@ -8492,8 +8725,8 @@ function CalendarDayButton({
|
|
|
8492
8725
|
...props
|
|
8493
8726
|
}) {
|
|
8494
8727
|
const defaultClassNames = reactDayPicker.getDefaultClassNames();
|
|
8495
|
-
const ref =
|
|
8496
|
-
|
|
8728
|
+
const ref = React50__namespace.useRef(null);
|
|
8729
|
+
React50__namespace.useEffect(() => {
|
|
8497
8730
|
if (modifiers.focused) ref.current?.focus();
|
|
8498
8731
|
}, [modifiers.focused]);
|
|
8499
8732
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -10109,7 +10342,7 @@ var pickerVariants = classVarianceAuthority.cva("w-full justify-start text-left
|
|
|
10109
10342
|
variant: "outlined"
|
|
10110
10343
|
}
|
|
10111
10344
|
});
|
|
10112
|
-
var DatePicker =
|
|
10345
|
+
var DatePicker = React50__namespace.forwardRef(
|
|
10113
10346
|
({
|
|
10114
10347
|
date,
|
|
10115
10348
|
onDateChange,
|
|
@@ -10156,7 +10389,7 @@ var DatePicker = React49__namespace.forwardRef(
|
|
|
10156
10389
|
}
|
|
10157
10390
|
);
|
|
10158
10391
|
DatePicker.displayName = "DatePicker";
|
|
10159
|
-
var DateRangePicker =
|
|
10392
|
+
var DateRangePicker = React50__namespace.forwardRef(
|
|
10160
10393
|
({
|
|
10161
10394
|
dateRange,
|
|
10162
10395
|
onDateRangeChange,
|
|
@@ -10214,15 +10447,15 @@ DateRangePicker.displayName = "DateRangePicker";
|
|
|
10214
10447
|
|
|
10215
10448
|
// src/components/ui/carousel/index.tsx
|
|
10216
10449
|
init_utils();
|
|
10217
|
-
var CarouselContext =
|
|
10450
|
+
var CarouselContext = React50__namespace.createContext(null);
|
|
10218
10451
|
function useCarousel() {
|
|
10219
|
-
const context =
|
|
10452
|
+
const context = React50__namespace.useContext(CarouselContext);
|
|
10220
10453
|
if (!context) {
|
|
10221
10454
|
throw new Error("useCarousel must be used within a <Carousel />");
|
|
10222
10455
|
}
|
|
10223
10456
|
return context;
|
|
10224
10457
|
}
|
|
10225
|
-
var Carousel =
|
|
10458
|
+
var Carousel = React50__namespace.forwardRef(
|
|
10226
10459
|
({
|
|
10227
10460
|
orientation = "horizontal",
|
|
10228
10461
|
opts,
|
|
@@ -10239,22 +10472,22 @@ var Carousel = React49__namespace.forwardRef(
|
|
|
10239
10472
|
},
|
|
10240
10473
|
plugins
|
|
10241
10474
|
);
|
|
10242
|
-
const [canScrollPrev, setCanScrollPrev] =
|
|
10243
|
-
const [canScrollNext, setCanScrollNext] =
|
|
10244
|
-
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) => {
|
|
10245
10478
|
if (!api2) {
|
|
10246
10479
|
return;
|
|
10247
10480
|
}
|
|
10248
10481
|
setCanScrollPrev(api2.canScrollPrev());
|
|
10249
10482
|
setCanScrollNext(api2.canScrollNext());
|
|
10250
10483
|
}, []);
|
|
10251
|
-
const scrollPrev =
|
|
10484
|
+
const scrollPrev = React50__namespace.useCallback(() => {
|
|
10252
10485
|
api?.scrollPrev();
|
|
10253
10486
|
}, [api]);
|
|
10254
|
-
const scrollNext =
|
|
10487
|
+
const scrollNext = React50__namespace.useCallback(() => {
|
|
10255
10488
|
api?.scrollNext();
|
|
10256
10489
|
}, [api]);
|
|
10257
|
-
const handleKeyDown =
|
|
10490
|
+
const handleKeyDown = React50__namespace.useCallback(
|
|
10258
10491
|
(event) => {
|
|
10259
10492
|
if (event.key === "ArrowLeft") {
|
|
10260
10493
|
event.preventDefault();
|
|
@@ -10266,13 +10499,13 @@ var Carousel = React49__namespace.forwardRef(
|
|
|
10266
10499
|
},
|
|
10267
10500
|
[scrollPrev, scrollNext]
|
|
10268
10501
|
);
|
|
10269
|
-
|
|
10502
|
+
React50__namespace.useEffect(() => {
|
|
10270
10503
|
if (!api || !setApi) {
|
|
10271
10504
|
return;
|
|
10272
10505
|
}
|
|
10273
10506
|
setApi(api);
|
|
10274
10507
|
}, [api, setApi]);
|
|
10275
|
-
|
|
10508
|
+
React50__namespace.useEffect(() => {
|
|
10276
10509
|
if (!api) {
|
|
10277
10510
|
return;
|
|
10278
10511
|
}
|
|
@@ -10301,7 +10534,11 @@ var Carousel = React49__namespace.forwardRef(
|
|
|
10301
10534
|
{
|
|
10302
10535
|
ref,
|
|
10303
10536
|
onKeyDownCapture: handleKeyDown,
|
|
10304
|
-
className: cn(
|
|
10537
|
+
className: cn(
|
|
10538
|
+
"relative",
|
|
10539
|
+
orientation === "vertical" && "h-full",
|
|
10540
|
+
className
|
|
10541
|
+
),
|
|
10305
10542
|
role: "region",
|
|
10306
10543
|
"aria-roledescription": "carousel",
|
|
10307
10544
|
...props,
|
|
@@ -10313,9 +10550,9 @@ var Carousel = React49__namespace.forwardRef(
|
|
|
10313
10550
|
}
|
|
10314
10551
|
);
|
|
10315
10552
|
Carousel.displayName = "Carousel";
|
|
10316
|
-
var CarouselContent =
|
|
10553
|
+
var CarouselContent = React50__namespace.forwardRef(({ className, ...props }, ref) => {
|
|
10317
10554
|
const { carouselRef, orientation } = useCarousel();
|
|
10318
|
-
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(
|
|
10319
10556
|
"div",
|
|
10320
10557
|
{
|
|
10321
10558
|
ref,
|
|
@@ -10329,7 +10566,7 @@ var CarouselContent = React49__namespace.forwardRef(({ className, ...props }, re
|
|
|
10329
10566
|
) });
|
|
10330
10567
|
});
|
|
10331
10568
|
CarouselContent.displayName = "CarouselContent";
|
|
10332
|
-
var CarouselItem =
|
|
10569
|
+
var CarouselItem = React50__namespace.forwardRef(({ className, ...props }, ref) => {
|
|
10333
10570
|
const { orientation } = useCarousel();
|
|
10334
10571
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
10335
10572
|
"div",
|
|
@@ -10347,7 +10584,7 @@ var CarouselItem = React49__namespace.forwardRef(({ className, ...props }, ref)
|
|
|
10347
10584
|
);
|
|
10348
10585
|
});
|
|
10349
10586
|
CarouselItem.displayName = "CarouselItem";
|
|
10350
|
-
var CarouselPrevious =
|
|
10587
|
+
var CarouselPrevious = React50__namespace.forwardRef(({ className, variant = "outline", size = "icon", ...props }, ref) => {
|
|
10351
10588
|
const { orientation, scrollPrev, canScrollPrev } = useCarousel();
|
|
10352
10589
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
10353
10590
|
Button,
|
|
@@ -10356,8 +10593,8 @@ var CarouselPrevious = React49__namespace.forwardRef(({ className, variant = "ou
|
|
|
10356
10593
|
variant,
|
|
10357
10594
|
size,
|
|
10358
10595
|
className: cn(
|
|
10359
|
-
"absolute h-8 w-8 rounded-full",
|
|
10360
|
-
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",
|
|
10361
10598
|
className
|
|
10362
10599
|
),
|
|
10363
10600
|
disabled: !canScrollPrev,
|
|
@@ -10371,7 +10608,7 @@ var CarouselPrevious = React49__namespace.forwardRef(({ className, variant = "ou
|
|
|
10371
10608
|
);
|
|
10372
10609
|
});
|
|
10373
10610
|
CarouselPrevious.displayName = "CarouselPrevious";
|
|
10374
|
-
var CarouselNext =
|
|
10611
|
+
var CarouselNext = React50__namespace.forwardRef(({ className, variant = "outline", size = "icon", ...props }, ref) => {
|
|
10375
10612
|
const { orientation, scrollNext, canScrollNext } = useCarousel();
|
|
10376
10613
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
10377
10614
|
Button,
|
|
@@ -10380,8 +10617,8 @@ var CarouselNext = React49__namespace.forwardRef(({ className, variant = "outlin
|
|
|
10380
10617
|
variant,
|
|
10381
10618
|
size,
|
|
10382
10619
|
className: cn(
|
|
10383
|
-
"absolute h-8 w-8 rounded-full",
|
|
10384
|
-
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",
|
|
10385
10622
|
className
|
|
10386
10623
|
),
|
|
10387
10624
|
disabled: !canScrollNext,
|
|
@@ -10410,10 +10647,10 @@ function SimpleCarousel({
|
|
|
10410
10647
|
nextArrow,
|
|
10411
10648
|
onSlideChange
|
|
10412
10649
|
}) {
|
|
10413
|
-
const [api, setApi] =
|
|
10414
|
-
const [current, setCurrent] =
|
|
10415
|
-
const [count, setCount] =
|
|
10416
|
-
|
|
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(() => {
|
|
10417
10654
|
if (!api) {
|
|
10418
10655
|
return;
|
|
10419
10656
|
}
|
|
@@ -10425,7 +10662,7 @@ function SimpleCarousel({
|
|
|
10425
10662
|
onSlideChange?.(selectedIndex);
|
|
10426
10663
|
});
|
|
10427
10664
|
}, [api, onSlideChange]);
|
|
10428
|
-
|
|
10665
|
+
React50__namespace.useEffect(() => {
|
|
10429
10666
|
if (!api || !autoPlay) {
|
|
10430
10667
|
return;
|
|
10431
10668
|
}
|
|
@@ -10439,55 +10676,65 @@ function SimpleCarousel({
|
|
|
10439
10676
|
return () => clearInterval(interval);
|
|
10440
10677
|
}, [api, autoPlay, loop]);
|
|
10441
10678
|
const slideWidth = slidesToShow > 1 ? `${100 / slidesToShow}%` : "100%";
|
|
10442
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
10443
|
-
|
|
10444
|
-
|
|
10445
|
-
|
|
10446
|
-
|
|
10447
|
-
|
|
10448
|
-
|
|
10449
|
-
|
|
10450
|
-
|
|
10451
|
-
|
|
10452
|
-
|
|
10453
|
-
|
|
10454
|
-
/* @__PURE__ */ jsxRuntime.jsx(CarouselContent, { children: items.map((item, index) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
10455
|
-
CarouselItem,
|
|
10456
|
-
{
|
|
10457
|
-
className: cn(itemClassName, item.className),
|
|
10458
|
-
style: { flexBasis: slideWidth },
|
|
10459
|
-
onClick: item.onClick,
|
|
10460
|
-
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
|
|
10461
10691
|
},
|
|
10462
|
-
|
|
10463
|
-
|
|
10464
|
-
|
|
10465
|
-
|
|
10466
|
-
|
|
10467
|
-
|
|
10468
|
-
|
|
10469
|
-
|
|
10470
|
-
|
|
10471
|
-
|
|
10472
|
-
|
|
10473
|
-
|
|
10474
|
-
|
|
10475
|
-
|
|
10476
|
-
|
|
10477
|
-
|
|
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
|
+
}
|
|
10478
10715
|
),
|
|
10479
|
-
|
|
10480
|
-
|
|
10481
|
-
|
|
10482
|
-
|
|
10483
|
-
|
|
10484
|
-
|
|
10485
|
-
|
|
10486
|
-
|
|
10487
|
-
|
|
10488
|
-
|
|
10489
|
-
|
|
10490
|
-
|
|
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
|
+
);
|
|
10491
10738
|
}
|
|
10492
10739
|
|
|
10493
10740
|
// src/components/ui/typography/index.tsx
|
|
@@ -10565,7 +10812,7 @@ var typeToTag = {
|
|
|
10565
10812
|
list: "ul",
|
|
10566
10813
|
"list-item": "li"
|
|
10567
10814
|
};
|
|
10568
|
-
var Typography =
|
|
10815
|
+
var Typography = React50__namespace.forwardRef(
|
|
10569
10816
|
({
|
|
10570
10817
|
type,
|
|
10571
10818
|
size,
|
|
@@ -10602,7 +10849,7 @@ var Typography = React49__namespace.forwardRef(
|
|
|
10602
10849
|
);
|
|
10603
10850
|
Typography.displayName = "Typography";
|
|
10604
10851
|
function createWrapper(fixedType) {
|
|
10605
|
-
return
|
|
10852
|
+
return React50__namespace.forwardRef(
|
|
10606
10853
|
({ ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(Typography, { ref, type: fixedType, ...props })
|
|
10607
10854
|
);
|
|
10608
10855
|
}
|
|
@@ -10649,10 +10896,751 @@ var TypographyGroup = {
|
|
|
10649
10896
|
// src/index.ts
|
|
10650
10897
|
init_utils();
|
|
10651
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
|
+
|
|
10652
11560
|
Object.defineProperty(exports, "toast", {
|
|
10653
11561
|
enumerable: true,
|
|
10654
11562
|
get: function () { return sonner.toast; }
|
|
10655
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
|
+
});
|
|
10656
11644
|
exports.Accordion = Accordion;
|
|
10657
11645
|
exports.Alert = Alert;
|
|
10658
11646
|
exports.AlertDialog = AlertDialog;
|
|
@@ -10666,12 +11654,14 @@ exports.AlertDialogOverlay = AlertDialogOverlay;
|
|
|
10666
11654
|
exports.AlertDialogPortal = AlertDialogPortal;
|
|
10667
11655
|
exports.AlertDialogTitle = AlertDialogTitle;
|
|
10668
11656
|
exports.AlertDialogTrigger = AlertDialogTrigger;
|
|
11657
|
+
exports.AreaChart = AreaChart;
|
|
10669
11658
|
exports.AspectRatio = AspectRatio;
|
|
10670
11659
|
exports.Avatar = Avatar;
|
|
10671
11660
|
exports.AvatarFallback = AvatarFallback;
|
|
10672
11661
|
exports.AvatarGroup = AvatarGroup;
|
|
10673
11662
|
exports.AvatarImage = AvatarImage;
|
|
10674
11663
|
exports.Badge = Badge;
|
|
11664
|
+
exports.BarChart = BarChart;
|
|
10675
11665
|
exports.Blockquote = Blockquote;
|
|
10676
11666
|
exports.Breadcrumb = Breadcrumb;
|
|
10677
11667
|
exports.BreadcrumbEllipsis = BreadcrumbEllipsis;
|
|
@@ -10684,6 +11674,8 @@ exports.Button = Button;
|
|
|
10684
11674
|
exports.ButtonGroup = ButtonGroup;
|
|
10685
11675
|
exports.ButtonGroupSeparator = ButtonGroupSeparator;
|
|
10686
11676
|
exports.ButtonGroupText = ButtonGroupText;
|
|
11677
|
+
exports.CHART_COLORS = CHART_COLORS;
|
|
11678
|
+
exports.CHART_PALETTE = CHART_PALETTE;
|
|
10687
11679
|
exports.Calendar = Calendar;
|
|
10688
11680
|
exports.CalendarDayButton = CalendarDayButton;
|
|
10689
11681
|
exports.Carousel = Carousel;
|
|
@@ -10786,6 +11778,7 @@ exports.ItemList = ItemList;
|
|
|
10786
11778
|
exports.ItemSeparator = ItemSeparator;
|
|
10787
11779
|
exports.Label = Label;
|
|
10788
11780
|
exports.Lead = Lead;
|
|
11781
|
+
exports.LineChart = LineChart;
|
|
10789
11782
|
exports.List = List3;
|
|
10790
11783
|
exports.ListItem = ListItem;
|
|
10791
11784
|
exports.Menubar = Menubar;
|
|
@@ -10823,6 +11816,7 @@ exports.PaginationLast = PaginationLast;
|
|
|
10823
11816
|
exports.PaginationLink = PaginationLink;
|
|
10824
11817
|
exports.PaginationNext = PaginationNext;
|
|
10825
11818
|
exports.PaginationPrevious = PaginationPrevious;
|
|
11819
|
+
exports.PieChart = PieChart;
|
|
10826
11820
|
exports.Popover = Popover;
|
|
10827
11821
|
exports.PopoverAnchor = PopoverAnchor;
|
|
10828
11822
|
exports.PopoverContent = PopoverContent;
|
|
@@ -10830,11 +11824,13 @@ exports.PopoverTrigger = PopoverTrigger;
|
|
|
10830
11824
|
exports.ProductCard = ProductCard;
|
|
10831
11825
|
exports.ProfileCard = ProfileCard;
|
|
10832
11826
|
exports.Progress = Progress;
|
|
11827
|
+
exports.RadarChart = RadarChart;
|
|
10833
11828
|
exports.RadioGroup = RadioGroup;
|
|
10834
11829
|
exports.RadioGroupItem = RadioGroupItem;
|
|
10835
11830
|
exports.ResizableHandle = ResizableHandle;
|
|
10836
11831
|
exports.ResizablePanel = ResizablePanel;
|
|
10837
11832
|
exports.ResizablePanelGroup = ResizablePanelGroup;
|
|
11833
|
+
exports.ScatterChart = ScatterChart;
|
|
10838
11834
|
exports.ScrollArea = ScrollArea;
|
|
10839
11835
|
exports.ScrollBar = ScrollBar;
|
|
10840
11836
|
exports.Select = Select;
|
|
@@ -10893,6 +11889,8 @@ exports.Slider = Slider;
|
|
|
10893
11889
|
exports.Small = Small;
|
|
10894
11890
|
exports.Spinner = Spinner;
|
|
10895
11891
|
exports.Switch = Switch;
|
|
11892
|
+
exports.THEMES = THEMES;
|
|
11893
|
+
exports.THEME_CATALOG = THEME_CATALOG;
|
|
10896
11894
|
exports.Table = Table;
|
|
10897
11895
|
exports.TableBody = TableBody;
|
|
10898
11896
|
exports.TableCaption = TableCaption;
|
|
@@ -10906,6 +11904,7 @@ exports.TabsContent = TabsContent;
|
|
|
10906
11904
|
exports.TabsList = TabsList;
|
|
10907
11905
|
exports.TabsTrigger = TabsTrigger;
|
|
10908
11906
|
exports.Textarea = Textarea;
|
|
11907
|
+
exports.ThemeProvider = ThemeProvider;
|
|
10909
11908
|
exports.Toast = Toast;
|
|
10910
11909
|
exports.ToastProvider = ToastProvider;
|
|
10911
11910
|
exports.Toaster = Toaster;
|
|
@@ -10928,11 +11927,16 @@ exports.composeRules = composeRules;
|
|
|
10928
11927
|
exports.emailRule = emailRule;
|
|
10929
11928
|
exports.emptyVariants = emptyVariants;
|
|
10930
11929
|
exports.fieldVariants = fieldVariants;
|
|
11930
|
+
exports.getCurrentMode = getCurrentMode;
|
|
11931
|
+
exports.getCurrentTheme = getCurrentTheme;
|
|
10931
11932
|
exports.getInitials = getInitials;
|
|
11933
|
+
exports.getThemeColors = getThemeColors;
|
|
11934
|
+
exports.initializeTheme = initializeTheme;
|
|
10932
11935
|
exports.inputGroupVariants = inputGroupVariants;
|
|
10933
11936
|
exports.inputVariants = inputVariants;
|
|
10934
11937
|
exports.itemVariants = itemVariants;
|
|
10935
11938
|
exports.labelVariants = labelVariants;
|
|
11939
|
+
exports.legendStyle = legendStyle;
|
|
10936
11940
|
exports.maxLengthRule = maxLengthRule;
|
|
10937
11941
|
exports.maxValueRule = maxValueRule;
|
|
10938
11942
|
exports.minLengthRule = minLengthRule;
|
|
@@ -10944,6 +11948,8 @@ exports.progressVariants = progressVariants;
|
|
|
10944
11948
|
exports.radioGroupVariants = radioGroupVariants;
|
|
10945
11949
|
exports.requiredRule = requiredRule;
|
|
10946
11950
|
exports.separatorVariants = separatorVariants;
|
|
11951
|
+
exports.setMode = setMode;
|
|
11952
|
+
exports.setTheme = setTheme;
|
|
10947
11953
|
exports.skeletonVariants = skeletonVariants;
|
|
10948
11954
|
exports.spinnerVariants = spinnerVariants;
|
|
10949
11955
|
exports.tableVariants = tableVariants;
|
|
@@ -10951,10 +11957,12 @@ exports.textareaVariants = textareaVariants;
|
|
|
10951
11957
|
exports.toastVariants = toastVariants;
|
|
10952
11958
|
exports.toggleGroupVariants = toggleGroupVariants;
|
|
10953
11959
|
exports.toggleVariants = toggleVariants;
|
|
11960
|
+
exports.tooltipStyle = tooltipStyle;
|
|
10954
11961
|
exports.urlRule = urlRule;
|
|
10955
11962
|
exports.useCarousel = useCarousel;
|
|
10956
11963
|
exports.useForm = useForm;
|
|
10957
11964
|
exports.useSidebar = useSidebar;
|
|
11965
|
+
exports.useTheme = useTheme2;
|
|
10958
11966
|
exports.useToast = useToast;
|
|
10959
11967
|
exports.useWatch = useWatch;
|
|
10960
11968
|
//# sourceMappingURL=index.js.map
|