@mvn-ui/react 0.1.2 → 0.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -1,7 +1,7 @@
1
1
  import { clsx } from 'clsx';
2
2
  import { twMerge } from 'tailwind-merge';
3
- import * as React49 from 'react';
4
- import React49__default, { createContext, forwardRef, useRef, useState, useEffect, useImperativeHandle, useCallback, useContext, cloneElement, useMemo, Fragment as Fragment$1 } from 'react';
3
+ import * as React50 from 'react';
4
+ import React50__default, { createContext, forwardRef, useRef, useState, useEffect, useImperativeHandle, useCallback, useContext, cloneElement, useMemo, Fragment as Fragment$1 } from 'react';
5
5
  import { cva } from 'class-variance-authority';
6
6
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
7
7
  import { Slot } from '@radix-ui/react-slot';
@@ -43,6 +43,8 @@ import isEqual from 'react-fast-compare';
43
43
  import * as AvatarPrimitive from '@radix-ui/react-avatar';
44
44
  import { getDefaultClassNames, DayPicker } from 'react-day-picker';
45
45
  import useEmblaCarousel from 'embla-carousel-react';
46
+ import { ResponsiveContainer, LineChart as LineChart$1, CartesianGrid, XAxis, YAxis, Tooltip as Tooltip$1, Legend, Line, BarChart as BarChart$1, Bar, PieChart as PieChart$1, Pie, Cell, AreaChart as AreaChart$1, Area, ScatterChart as ScatterChart$1, ZAxis, Scatter, RadarChart as RadarChart$1, PolarGrid, PolarAngleAxis, PolarRadiusAxis, Radar } from 'recharts';
47
+ export { Area, Bar, Brush, CartesianGrid, Cell, Legend as ChartLegend, Tooltip as ChartTooltip, Line, Pie, PolarAngleAxis, PolarGrid, PolarRadiusAxis, Radar, ReferenceArea, ReferenceLine, ResponsiveContainer, Scatter, XAxis, YAxis, ZAxis } from 'recharts';
46
48
 
47
49
  var __defProp = Object.defineProperty;
48
50
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
@@ -286,7 +288,7 @@ var init_card = __esm({
286
288
  }
287
289
  }
288
290
  );
289
- Card = React49.forwardRef(({ className, variant, size, ...props }, ref) => /* @__PURE__ */ jsx(
291
+ Card = React50.forwardRef(({ className, variant, size, ...props }, ref) => /* @__PURE__ */ jsx(
290
292
  "div",
291
293
  {
292
294
  ref,
@@ -295,7 +297,7 @@ var init_card = __esm({
295
297
  }
296
298
  ));
297
299
  Card.displayName = "Card";
298
- CardHeader = React49.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
300
+ CardHeader = React50.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
299
301
  "div",
300
302
  {
301
303
  ref,
@@ -304,7 +306,7 @@ var init_card = __esm({
304
306
  }
305
307
  ));
306
308
  CardHeader.displayName = "CardHeader";
307
- CardTitle = React49.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
309
+ CardTitle = React50.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
308
310
  "h3",
309
311
  {
310
312
  ref,
@@ -313,7 +315,7 @@ var init_card = __esm({
313
315
  }
314
316
  ));
315
317
  CardTitle.displayName = "CardTitle";
316
- CardDescription = React49.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
318
+ CardDescription = React50.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
317
319
  "div",
318
320
  {
319
321
  ref,
@@ -322,9 +324,9 @@ var init_card = __esm({
322
324
  }
323
325
  ));
324
326
  CardDescription.displayName = "CardDescription";
325
- CardContent = React49.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("p-6 pt-0", className), ...props }));
327
+ CardContent = React50.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("p-6 pt-0", className), ...props }));
326
328
  CardContent.displayName = "CardContent";
327
- CardFooter = React49.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
329
+ CardFooter = React50.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
328
330
  "div",
329
331
  {
330
332
  ref,
@@ -367,7 +369,7 @@ var buttonVariants = cva(
367
369
  }
368
370
  }
369
371
  );
370
- var Button = React49.forwardRef(
372
+ var Button = React50.forwardRef(
371
373
  ({
372
374
  className,
373
375
  variant,
@@ -417,7 +419,7 @@ var Button = React49.forwardRef(
417
419
  }
418
420
  );
419
421
  Button.displayName = "Button";
420
- var IconButton = React49.forwardRef(
422
+ var IconButton = React50.forwardRef(
421
423
  ({ icon, size = "icon", className, ...props }, ref) => {
422
424
  return /* @__PURE__ */ jsx(Button, { ref, size, className, ...props, children: icon });
423
425
  }
@@ -439,10 +441,10 @@ function ButtonGroup({
439
441
  "data-orientation": orientation,
440
442
  className: cn(
441
443
  "inline-flex",
444
+ className,
442
445
  isVertical ? "flex-col" : "flex-row",
443
446
  // Join children and normalize border radius so the group looks contiguous
444
- isVertical ? "[&>*]:rounded-none [&>*]:-mt-px [&>:first-child]:mt-0 [&>:first-child]:rounded-t-md [&>:last-child]:rounded-b-md" : "[&>*]:rounded-none [&>*]:-ml-px [&>:first-child]:ml-0 [&>:first-child]:rounded-l-md [&>:last-child]:rounded-r-md",
445
- className
447
+ isVertical ? "[&>*]:rounded-none [&>*]:-mt-px [&>:first-child]:mt-0 [&>:first-child]:rounded-t-md [&>:last-child]:rounded-b-md" : "[&>*]:rounded-none [&>*]:-ml-px [&>:first-child]:ml-0 [&>:first-child]:rounded-l-md [&>:last-child]:rounded-r-md"
446
448
  ),
447
449
  ...props
448
450
  }
@@ -511,7 +513,7 @@ var inputVariants = cva(
511
513
  }
512
514
  }
513
515
  );
514
- var Input = React49.forwardRef(
516
+ var Input = React50.forwardRef(
515
517
  ({
516
518
  className,
517
519
  containerClassName,
@@ -529,12 +531,12 @@ var Input = React49.forwardRef(
529
531
  value,
530
532
  ...props
531
533
  }, ref) => {
532
- const [showPassword, setShowPassword] = React49.useState(false);
533
- const [internalValue, setInternalValue] = React49.useState(value || "");
534
- const generatedId = React49.useId();
534
+ const [showPassword, setShowPassword] = React50.useState(false);
535
+ const [internalValue, setInternalValue] = React50.useState(value || "");
536
+ const generatedId = React50.useId();
535
537
  const inputId = id || generatedId;
536
538
  const hasError = !!error;
537
- React49.useEffect(() => {
539
+ React50.useEffect(() => {
538
540
  setInternalValue(value || "");
539
541
  }, [value]);
540
542
  const handleClear = () => {
@@ -553,8 +555,8 @@ var Input = React49.forwardRef(
553
555
  children: label
554
556
  }
555
557
  ),
556
- /* @__PURE__ */ jsxs("div", { className: "relative", children: [
557
- leftIcon && /* @__PURE__ */ jsx("div", { className: "absolute left-3 top-1/2 -translate-y-1/2 text-muted-foreground pointer-events-none [&_svg]:size-4", children: leftIcon }),
558
+ /* @__PURE__ */ jsxs("div", { className: "relative flex items-center", children: [
559
+ leftIcon && /* @__PURE__ */ jsx("div", { className: "absolute left-3 text-muted-foreground pointer-events-none flex items-center justify-center [&_svg]:size-4", children: leftIcon }),
558
560
  /* @__PURE__ */ jsx(
559
561
  "input",
560
562
  {
@@ -579,7 +581,7 @@ var Input = React49.forwardRef(
579
581
  ...props
580
582
  }
581
583
  ),
582
- (showClearButton || showPasswordToggle || rightIcon) && /* @__PURE__ */ jsxs("div", { className: "absolute right-3 top-1/2 -translate-y-1/2 flex items-center gap-1", children: [
584
+ (showClearButton || showPasswordToggle || rightIcon) && /* @__PURE__ */ jsxs("div", { className: "absolute right-3 flex items-center gap-1", children: [
583
585
  showClearButton && /* @__PURE__ */ jsx(
584
586
  "button",
585
587
  {
@@ -600,7 +602,7 @@ var Input = React49.forwardRef(
600
602
  children: showPassword ? /* @__PURE__ */ jsx(EyeOffIcon, { className: "h-4 w-4" }) : /* @__PURE__ */ jsx(EyeIcon, { className: "h-4 w-4" })
601
603
  }
602
604
  ),
603
- rightIcon && !showPasswordToggle && !showClearButton && /* @__PURE__ */ jsx("div", { className: "text-muted-foreground [&_svg]:size-4", children: rightIcon })
605
+ rightIcon && !showPasswordToggle && !showClearButton && /* @__PURE__ */ jsx("div", { className: "text-muted-foreground flex items-center justify-center [&_svg]:size-4", children: rightIcon })
604
606
  ] })
605
607
  ] }),
606
608
  error && /* @__PURE__ */ jsx(
@@ -643,7 +645,7 @@ var labelVariants = cva(
643
645
  }
644
646
  }
645
647
  );
646
- var Label = React49.forwardRef(({ className, variant, required, ...props }, ref) => /* @__PURE__ */ jsx(
648
+ var Label = React50.forwardRef(({ className, variant, required, ...props }, ref) => /* @__PURE__ */ jsx(
647
649
  LabelPrimitive.Root,
648
650
  {
649
651
  ref,
@@ -684,7 +686,7 @@ var textareaVariants = cva(
684
686
  }
685
687
  }
686
688
  );
687
- var Textarea = React49.forwardRef(
689
+ var Textarea = React50.forwardRef(
688
690
  ({
689
691
  className,
690
692
  containerClassName,
@@ -702,8 +704,8 @@ var Textarea = React49.forwardRef(
702
704
  id,
703
705
  ...props
704
706
  }, ref) => {
705
- const internalRef = React49.useRef(null);
706
- const [charCount, setCharCount] = React49.useState(0);
707
+ const internalRef = React50.useRef(null);
708
+ const [charCount, setCharCount] = React50.useState(0);
707
709
  const textareaRef = (node) => {
708
710
  internalRef.current = node;
709
711
  if (typeof ref === "function") {
@@ -712,14 +714,14 @@ var Textarea = React49.forwardRef(
712
714
  ref.current = node;
713
715
  }
714
716
  };
715
- React49.useEffect(() => {
717
+ React50.useEffect(() => {
716
718
  if (autoResize && internalRef.current) {
717
719
  const textarea = internalRef.current;
718
720
  textarea.style.height = "auto";
719
721
  textarea.style.height = `${textarea.scrollHeight}px`;
720
722
  }
721
723
  }, [value, autoResize]);
722
- const handleChange = React49.useCallback(
724
+ const handleChange = React50.useCallback(
723
725
  (e) => {
724
726
  if (showCount || maxLength) {
725
727
  setCharCount(e.target.value.length);
@@ -728,13 +730,13 @@ var Textarea = React49.forwardRef(
728
730
  },
729
731
  [onChange, showCount, maxLength]
730
732
  );
731
- React49.useEffect(() => {
733
+ React50.useEffect(() => {
732
734
  if (showCount || maxLength) {
733
735
  setCharCount(String(value || "").length);
734
736
  }
735
737
  }, [value, showCount, maxLength]);
736
738
  const hasError = !!error;
737
- const generatedId = React49.useId();
739
+ const generatedId = React50.useId();
738
740
  const textareaId = id || generatedId;
739
741
  return /* @__PURE__ */ jsxs("div", { className: cn("w-full space-y-2", containerClassName), children: [
740
742
  label && /* @__PURE__ */ jsx(
@@ -795,10 +797,10 @@ Textarea.displayName = "Textarea";
795
797
 
796
798
  // src/components/ui/select/index.tsx
797
799
  init_utils();
798
- var Select = React49.forwardRef(
800
+ var Select = React50.forwardRef(
799
801
  ({ children, value, onValueChange, ...props }, _ref) => {
800
- const [internalValue, setInternalValue] = React49.useState(value ?? "");
801
- React49.useEffect(() => {
802
+ const [internalValue, setInternalValue] = React50.useState(value ?? "");
803
+ React50.useEffect(() => {
802
804
  setInternalValue(value ?? "");
803
805
  }, [value]);
804
806
  const handleValueChange = (newValue) => {
@@ -835,7 +837,7 @@ var triggerVariants = cva(
835
837
  }
836
838
  }
837
839
  );
838
- var SelectTrigger = React49.forwardRef(({ className, children, variant, ...props }, ref) => /* @__PURE__ */ jsxs(
840
+ var SelectTrigger = React50.forwardRef(({ className, children, variant, ...props }, ref) => /* @__PURE__ */ jsxs(
839
841
  SelectPrimitive.Trigger,
840
842
  {
841
843
  ref,
@@ -848,7 +850,7 @@ var SelectTrigger = React49.forwardRef(({ className, children, variant, ...props
848
850
  }
849
851
  ));
850
852
  SelectTrigger.displayName = SelectPrimitive.Trigger.displayName;
851
- var SelectScrollUpButton = React49.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
853
+ var SelectScrollUpButton = React50.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
852
854
  SelectPrimitive.ScrollUpButton,
853
855
  {
854
856
  ref,
@@ -861,7 +863,7 @@ var SelectScrollUpButton = React49.forwardRef(({ className, ...props }, ref) =>
861
863
  }
862
864
  ));
863
865
  SelectScrollUpButton.displayName = SelectPrimitive.ScrollUpButton.displayName;
864
- var SelectScrollDownButton = React49.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
866
+ var SelectScrollDownButton = React50.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
865
867
  SelectPrimitive.ScrollDownButton,
866
868
  {
867
869
  ref,
@@ -874,7 +876,7 @@ var SelectScrollDownButton = React49.forwardRef(({ className, ...props }, ref) =
874
876
  }
875
877
  ));
876
878
  SelectScrollDownButton.displayName = SelectPrimitive.ScrollDownButton.displayName;
877
- var SelectContent = React49.forwardRef(({ className, children, position = "popper", ...props }, ref) => /* @__PURE__ */ jsx(SelectPrimitive.Portal, { children: /* @__PURE__ */ jsxs(
879
+ var SelectContent = React50.forwardRef(({ className, children, position = "popper", ...props }, ref) => /* @__PURE__ */ jsx(SelectPrimitive.Portal, { children: /* @__PURE__ */ jsxs(
878
880
  SelectPrimitive.Content,
879
881
  {
880
882
  ref,
@@ -902,7 +904,7 @@ var SelectContent = React49.forwardRef(({ className, children, position = "poppe
902
904
  }
903
905
  ) }));
904
906
  SelectContent.displayName = SelectPrimitive.Content.displayName;
905
- var SelectLabel = React49.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
907
+ var SelectLabel = React50.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
906
908
  SelectPrimitive.Label,
907
909
  {
908
910
  ref,
@@ -914,7 +916,7 @@ var SelectLabel = React49.forwardRef(({ className, ...props }, ref) => /* @__PUR
914
916
  }
915
917
  ));
916
918
  SelectLabel.displayName = SelectPrimitive.Label.displayName;
917
- var SelectItem = React49.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(
919
+ var SelectItem = React50.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(
918
920
  SelectPrimitive.Item,
919
921
  {
920
922
  ref,
@@ -930,7 +932,7 @@ var SelectItem = React49.forwardRef(({ className, children, ...props }, ref) =>
930
932
  }
931
933
  ));
932
934
  SelectItem.displayName = SelectPrimitive.Item.displayName;
933
- var SelectSeparator = React49.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
935
+ var SelectSeparator = React50.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
934
936
  SelectPrimitive.Separator,
935
937
  {
936
938
  ref,
@@ -957,8 +959,8 @@ var checkboxVariants = cva(
957
959
  }
958
960
  }
959
961
  );
960
- var Checkbox = React49.forwardRef(({ className, size, label, description, indeterminate, ...props }, ref) => {
961
- const generatedId = React49.useId();
962
+ var Checkbox = React50.forwardRef(({ className, size, label, description, indeterminate, ...props }, ref) => {
963
+ const generatedId = React50.useId();
962
964
  const checkboxId = props.id || generatedId;
963
965
  return /* @__PURE__ */ jsxs("div", { className: "flex items-start gap-2.5", children: [
964
966
  /* @__PURE__ */ jsx(
@@ -1006,7 +1008,7 @@ var radioGroupVariants = cva("grid gap-2", {
1006
1008
  orientation: "vertical"
1007
1009
  }
1008
1010
  });
1009
- var RadioGroup = React49.forwardRef(
1011
+ var RadioGroup = React50.forwardRef(
1010
1012
  ({
1011
1013
  className,
1012
1014
  orientation = "vertical",
@@ -1019,8 +1021,8 @@ var RadioGroup = React49.forwardRef(
1019
1021
  children,
1020
1022
  ...props
1021
1023
  }, ref) => {
1022
- const generatedId = React49.useId();
1023
- const defaultRenderItem = React49.useCallback(
1024
+ const generatedId = React50.useId();
1025
+ const defaultRenderItem = React50.useCallback(
1024
1026
  (item) => /* @__PURE__ */ jsxs(
1025
1027
  "div",
1026
1028
  {
@@ -1078,7 +1080,7 @@ var RadioGroup = React49.forwardRef(
1078
1080
  }
1079
1081
  );
1080
1082
  RadioGroup.displayName = RadioGroupPrimitive.Root.displayName;
1081
- var RadioGroupItem = React49.forwardRef(({ className, ...props }, ref) => {
1083
+ var RadioGroupItem = React50.forwardRef(({ className, ...props }, ref) => {
1082
1084
  return /* @__PURE__ */ jsx(
1083
1085
  RadioGroupPrimitive.Item,
1084
1086
  {
@@ -1096,7 +1098,7 @@ RadioGroupItem.displayName = RadioGroupPrimitive.Item.displayName;
1096
1098
 
1097
1099
  // src/components/ui/switch/index.tsx
1098
1100
  init_utils();
1099
- var Switch = React49.forwardRef(({ className, ...props }, ref) => {
1101
+ var Switch = React50.forwardRef(({ className, offNode, onNode, ...props }, ref) => {
1100
1102
  return /* @__PURE__ */ jsx(
1101
1103
  SwitchPrimitives.Root,
1102
1104
  {
@@ -1109,13 +1111,17 @@ var Switch = React49.forwardRef(({ className, ...props }, ref) => {
1109
1111
  className
1110
1112
  ),
1111
1113
  ...props,
1112
- children: /* @__PURE__ */ jsx(
1114
+ children: /* @__PURE__ */ jsxs(
1113
1115
  SwitchPrimitives.Thumb,
1114
1116
  {
1115
1117
  className: cn(
1116
- "pointer-events-none block h-5 w-5 rounded-full bg-background shadow-lg ring-0 transition-transform",
1118
+ "group pointer-events-none relative flex items-center justify-center h-5 w-5 rounded-full bg-background shadow-lg ring-0 transition-transform",
1117
1119
  "data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0"
1118
- )
1120
+ ),
1121
+ children: [
1122
+ /* @__PURE__ */ jsx("span", { className: "absolute opacity-0 group-data-[state=checked]:opacity-100 transition-all duration-200", children: onNode }),
1123
+ /* @__PURE__ */ jsx("span", { className: "absolute opacity-100 group-data-[state=checked]:opacity-0 transition-all duration-200", children: offNode })
1124
+ ]
1119
1125
  }
1120
1126
  )
1121
1127
  }
@@ -1146,7 +1152,7 @@ var toggleVariants = cva(
1146
1152
  }
1147
1153
  }
1148
1154
  );
1149
- var Toggle = React49.forwardRef(({ className, variant, size, icon, children, ...props }, ref) => /* @__PURE__ */ jsxs(
1155
+ var Toggle = React50.forwardRef(({ className, variant, size, icon, children, ...props }, ref) => /* @__PURE__ */ jsxs(
1150
1156
  TogglePrimitive.Root,
1151
1157
  {
1152
1158
  ref,
@@ -1192,9 +1198,9 @@ var toggleGroupItemVariants = cva(
1192
1198
  }
1193
1199
  }
1194
1200
  );
1195
- var ToggleGroup = React49.forwardRef(
1201
+ var ToggleGroup = React50.forwardRef(
1196
1202
  ({ className, size, items, itemClassName, renderItem, children, ...props }, ref) => {
1197
- const defaultRenderItem = React49.useCallback(
1203
+ const defaultRenderItem = React50.useCallback(
1198
1204
  (item) => /* @__PURE__ */ jsxs(
1199
1205
  ToggleGroupPrimitive.Item,
1200
1206
  {
@@ -1224,7 +1230,7 @@ var ToggleGroup = React49.forwardRef(
1224
1230
  }
1225
1231
  );
1226
1232
  ToggleGroup.displayName = "ToggleGroup";
1227
- var ToggleGroupItem = React49.forwardRef(({ className, size, children, ...props }, ref) => {
1233
+ var ToggleGroupItem = React50.forwardRef(({ className, size, children, ...props }, ref) => {
1228
1234
  return /* @__PURE__ */ jsx(
1229
1235
  ToggleGroupPrimitive.Item,
1230
1236
  {
@@ -1239,7 +1245,7 @@ ToggleGroupItem.displayName = "ToggleGroupItem";
1239
1245
 
1240
1246
  // src/components/ui/slider/index.tsx
1241
1247
  init_utils();
1242
- var Slider = React49.forwardRef(
1248
+ var Slider = React50.forwardRef(
1243
1249
  ({
1244
1250
  className,
1245
1251
  showValue,
@@ -1298,7 +1304,7 @@ var inputGroupVariants = cva("flex items-stretch w-full", {
1298
1304
  size: "default"
1299
1305
  }
1300
1306
  });
1301
- var InputGroup = React49.forwardRef(
1307
+ var InputGroup = React50.forwardRef(
1302
1308
  ({
1303
1309
  className,
1304
1310
  size,
@@ -1334,9 +1340,9 @@ var InputGroup = React49.forwardRef(
1334
1340
  }
1335
1341
  ),
1336
1342
  leftElement && /* @__PURE__ */ jsx("div", { className: "inline-flex items-center", children: leftElement }),
1337
- /* @__PURE__ */ jsx("div", { className: "flex-1 min-w-0", children: React49.Children.map(children, (child) => {
1338
- if (React49.isValidElement(child)) {
1339
- return React49.cloneElement(child, {
1343
+ /* @__PURE__ */ jsx("div", { className: "flex-1 min-w-0", children: React50.Children.map(children, (child) => {
1344
+ if (React50.isValidElement(child)) {
1345
+ return React50.cloneElement(child, {
1340
1346
  className: cn(
1341
1347
  child.props.className,
1342
1348
  (leftAddon || leftElement) && "rounded-l-none border-l-0",
@@ -1367,7 +1373,7 @@ InputGroup.displayName = "InputGroup";
1367
1373
 
1368
1374
  // src/components/ui/input-otp/index.tsx
1369
1375
  init_utils();
1370
- var InputOTP = React49.forwardRef(({ containerClassName, children, ...props }, ref) => /* @__PURE__ */ jsx(
1376
+ var InputOTP = React50.forwardRef(({ containerClassName, children, ...props }, ref) => /* @__PURE__ */ jsx(
1371
1377
  OTPInput,
1372
1378
  {
1373
1379
  ref,
@@ -1380,10 +1386,10 @@ var InputOTP = React49.forwardRef(({ containerClassName, children, ...props }, r
1380
1386
  }
1381
1387
  ));
1382
1388
  InputOTP.displayName = "InputOTP";
1383
- var InputOTPGroup = React49.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("flex items-center gap-2", className), ...props }));
1389
+ var InputOTPGroup = React50.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("flex items-center gap-2", className), ...props }));
1384
1390
  InputOTPGroup.displayName = "InputOTPGroup";
1385
- var InputOTPSlot = React49.forwardRef(({ index, className, ...props }, ref) => {
1386
- const inputOTPContext = React49.useContext(OTPInputContext);
1391
+ var InputOTPSlot = React50.forwardRef(({ index, className, ...props }, ref) => {
1392
+ const inputOTPContext = React50.useContext(OTPInputContext);
1387
1393
  if (!inputOTPContext) {
1388
1394
  console.error("InputOTPSlot must be used within InputOTP");
1389
1395
  return null;
@@ -1417,7 +1423,7 @@ var InputOTPSlot = React49.forwardRef(({ index, className, ...props }, ref) => {
1417
1423
  );
1418
1424
  });
1419
1425
  InputOTPSlot.displayName = "InputOTPSlot";
1420
- var InputOTPSeparator = React49.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, role: "separator", className, ...props, children: /* @__PURE__ */ jsx(MinusIcon, { className: "h-4 w-4 text-muted-foreground" }) }));
1426
+ var InputOTPSeparator = React50.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, role: "separator", className, ...props, children: /* @__PURE__ */ jsx(MinusIcon, { className: "h-4 w-4 text-muted-foreground" }) }));
1421
1427
  InputOTPSeparator.displayName = "InputOTPSeparator";
1422
1428
 
1423
1429
  // src/components/ui/form/form-utils.ts
@@ -2106,7 +2112,7 @@ var FormItem = (props) => {
2106
2112
  const isRequired = Array.isArray(rules) ? rules.some((rule) => rule && rule.required) : false;
2107
2113
  const isDisabled = !!contextDisabled;
2108
2114
  const requiredIndicator = requiredMark === void 0 ? /* @__PURE__ */ jsx("span", { className: "text-destructive mr-1", "aria-hidden": "true", children: "*" }) : /* @__PURE__ */ jsx("span", { className: "mr-1", "aria-hidden": "true", children: requiredMark });
2109
- if (!children || !React49__default.isValidElement(children)) return null;
2115
+ if (!children || !React50__default.isValidElement(children)) return null;
2110
2116
  const childProps = {};
2111
2117
  childProps[valuePropName] = fieldValue;
2112
2118
  const childClass = children.props.className;
@@ -2274,7 +2280,7 @@ var fieldVariants = cva("", {
2274
2280
  orientation: "vertical"
2275
2281
  }
2276
2282
  });
2277
- var Field = React49.forwardRef(
2283
+ var Field = React50.forwardRef(
2278
2284
  ({
2279
2285
  className,
2280
2286
  orientation,
@@ -2287,7 +2293,7 @@ var Field = React49.forwardRef(
2287
2293
  children,
2288
2294
  ...props
2289
2295
  }, ref) => {
2290
- const generatedId = React49.useId();
2296
+ const generatedId = React50.useId();
2291
2297
  const fieldId = htmlFor || generatedId;
2292
2298
  return /* @__PURE__ */ jsxs(
2293
2299
  "div",
@@ -2336,7 +2342,7 @@ var alertVariants = cva(
2336
2342
  }
2337
2343
  }
2338
2344
  );
2339
- var Alert = React49.forwardRef(
2345
+ var Alert = React50.forwardRef(
2340
2346
  ({
2341
2347
  className,
2342
2348
  variant,
@@ -2349,8 +2355,8 @@ var Alert = React49.forwardRef(
2349
2355
  descriptionClassName,
2350
2356
  ...props
2351
2357
  }, ref) => {
2352
- const [isVisible, setIsVisible] = React49.useState(true);
2353
- const handleDismiss = React49.useCallback(() => {
2358
+ const [isVisible, setIsVisible] = React50.useState(true);
2359
+ const handleDismiss = React50.useCallback(() => {
2354
2360
  setIsVisible(false);
2355
2361
  onClose?.();
2356
2362
  }, [onClose]);
@@ -2519,7 +2525,7 @@ var toastVariants = cva(
2519
2525
  }
2520
2526
  }
2521
2527
  );
2522
- var Toast = React49.forwardRef(
2528
+ var Toast = React50.forwardRef(
2523
2529
  ({
2524
2530
  className,
2525
2531
  variant,
@@ -2532,8 +2538,8 @@ var Toast = React49.forwardRef(
2532
2538
  descriptionClassName,
2533
2539
  ...props
2534
2540
  }, ref) => {
2535
- const [isVisible, setIsVisible] = React49.useState(true);
2536
- const handleDismiss = React49.useCallback(() => {
2541
+ const [isVisible, setIsVisible] = React50.useState(true);
2542
+ const handleDismiss = React50.useCallback(() => {
2537
2543
  setIsVisible(false);
2538
2544
  onClose?.();
2539
2545
  }, [onClose]);
@@ -2629,7 +2635,7 @@ var progressVariants = cva(
2629
2635
  }
2630
2636
  }
2631
2637
  );
2632
- var Progress = React49.forwardRef(
2638
+ var Progress = React50.forwardRef(
2633
2639
  ({
2634
2640
  className,
2635
2641
  value = 0,
@@ -2695,7 +2701,7 @@ var spinnerVariants = cva("animate-spin", {
2695
2701
  variant: "default"
2696
2702
  }
2697
2703
  });
2698
- var Spinner = React49.forwardRef(
2704
+ var Spinner = React50.forwardRef(
2699
2705
  ({ className, size, variant, label, centered, overlay, icon, ...props }, ref) => {
2700
2706
  const spinnerContent = /* @__PURE__ */ jsxs(
2701
2707
  "div",
@@ -2726,7 +2732,7 @@ var Spinner = React49.forwardRef(
2726
2732
  }
2727
2733
  );
2728
2734
  Spinner.displayName = "Spinner";
2729
- var DotsSpinner = React49.forwardRef(
2735
+ var DotsSpinner = React50.forwardRef(
2730
2736
  ({ className, size = "default", dotCount = 3, ...props }, ref) => {
2731
2737
  const dotSizeMap = {
2732
2738
  xs: "h-1 w-1",
@@ -2779,7 +2785,7 @@ var skeletonVariants = cva(
2779
2785
  }
2780
2786
  }
2781
2787
  );
2782
- var Skeleton = React49.forwardRef(
2788
+ var Skeleton = React50.forwardRef(
2783
2789
  ({
2784
2790
  className,
2785
2791
  variant,
@@ -2828,7 +2834,7 @@ var Skeleton = React49.forwardRef(
2828
2834
  }
2829
2835
  );
2830
2836
  Skeleton.displayName = "Skeleton";
2831
- var SkeletonCard = React49.forwardRef(
2837
+ var SkeletonCard = React50.forwardRef(
2832
2838
  ({ className, avatar = false, lines = 3, ...props }, ref) => {
2833
2839
  return /* @__PURE__ */ jsxs("div", { ref, className: cn("space-y-4", className), ...props, children: [
2834
2840
  avatar && /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3", children: [
@@ -2868,7 +2874,7 @@ var emptyVariants = cva(
2868
2874
  }
2869
2875
  }
2870
2876
  );
2871
- var Empty = React49.forwardRef(
2877
+ var Empty = React50.forwardRef(
2872
2878
  ({
2873
2879
  className,
2874
2880
  size,
@@ -2909,7 +2915,7 @@ var Dialog = DialogPrimitive.Root;
2909
2915
  var DialogTrigger = DialogPrimitive.Trigger;
2910
2916
  var DialogPortal = DialogPrimitive.Portal;
2911
2917
  var DialogClose = DialogPrimitive.Close;
2912
- var DialogOverlay = React49.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
2918
+ var DialogOverlay = React50.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
2913
2919
  DialogPrimitive.Overlay,
2914
2920
  {
2915
2921
  ref,
@@ -2921,27 +2927,45 @@ var DialogOverlay = React49.forwardRef(({ className, ...props }, ref) => /* @__P
2921
2927
  }
2922
2928
  ));
2923
2929
  DialogOverlay.displayName = DialogPrimitive.Overlay.displayName;
2924
- var DialogContent = React49.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(DialogPortal, { children: [
2925
- /* @__PURE__ */ jsx(DialogOverlay, {}),
2926
- /* @__PURE__ */ jsxs(
2927
- DialogPrimitive.Content,
2928
- {
2929
- ref,
2930
- className: cn(
2931
- "fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border border-mvn-gray-200 bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] rounded-lg",
2932
- className
2933
- ),
2934
- ...props,
2935
- children: [
2936
- children,
2937
- /* @__PURE__ */ jsxs(DialogPrimitive.Close, { className: "absolute right-4 top-4 rounded-sm opacity-70 transition-opacity hover:opacity-100 focus:outline-none disabled:pointer-events-none data-[state=open]:bg-mvn-gray-100", children: [
2938
- /* @__PURE__ */ jsx(XIcon, { className: "h-4 w-4" }),
2939
- /* @__PURE__ */ jsx("span", { className: "sr-only", children: "\uB2EB\uAE30" })
2940
- ] })
2941
- ]
2942
- }
2943
- )
2944
- ] }));
2930
+ var DialogContent = React50.forwardRef(
2931
+ ({
2932
+ className,
2933
+ children,
2934
+ showClose = true,
2935
+ closeClassName,
2936
+ customClose,
2937
+ ...props
2938
+ }, ref) => /* @__PURE__ */ jsxs(DialogPortal, { children: [
2939
+ /* @__PURE__ */ jsx(DialogOverlay, {}),
2940
+ /* @__PURE__ */ jsxs(
2941
+ DialogPrimitive.Content,
2942
+ {
2943
+ ref,
2944
+ className: cn(
2945
+ "fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border border-mvn-gray-200 bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] rounded-lg",
2946
+ className
2947
+ ),
2948
+ ...props,
2949
+ children: [
2950
+ children,
2951
+ showClose && (customClose ? customClose : /* @__PURE__ */ jsxs(
2952
+ DialogPrimitive.Close,
2953
+ {
2954
+ className: cn(
2955
+ "absolute right-4 top-4 rounded-sm opacity-70 transition-opacity hover:opacity-100 focus:outline-none disabled:pointer-events-none data-[state=open]:bg-mvn-gray-100",
2956
+ closeClassName
2957
+ ),
2958
+ children: [
2959
+ /* @__PURE__ */ jsx(X, { className: "h-5 w-5" }),
2960
+ /* @__PURE__ */ jsx("span", { className: "sr-only", children: "Close" })
2961
+ ]
2962
+ }
2963
+ ))
2964
+ ]
2965
+ }
2966
+ )
2967
+ ] })
2968
+ );
2945
2969
  DialogContent.displayName = DialogPrimitive.Content.displayName;
2946
2970
  var DialogHeader = ({
2947
2971
  className,
@@ -2949,10 +2973,7 @@ var DialogHeader = ({
2949
2973
  }) => /* @__PURE__ */ jsx(
2950
2974
  "div",
2951
2975
  {
2952
- className: cn(
2953
- "flex flex-col space-y-1.5 text-left",
2954
- className
2955
- ),
2976
+ className: cn("flex flex-col space-y-1.5 text-left", className),
2956
2977
  ...props
2957
2978
  }
2958
2979
  );
@@ -2971,7 +2992,7 @@ var DialogFooter = ({
2971
2992
  }
2972
2993
  );
2973
2994
  DialogFooter.displayName = "DialogFooter";
2974
- var DialogTitle = React49.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
2995
+ var DialogTitle = React50.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
2975
2996
  DialogPrimitive.Title,
2976
2997
  {
2977
2998
  ref,
@@ -2983,7 +3004,7 @@ var DialogTitle = React49.forwardRef(({ className, ...props }, ref) => /* @__PUR
2983
3004
  }
2984
3005
  ));
2985
3006
  DialogTitle.displayName = DialogPrimitive.Title.displayName;
2986
- var DialogDescription = React49.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
3007
+ var DialogDescription = React50.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
2987
3008
  DialogPrimitive.Description,
2988
3009
  {
2989
3010
  ref,
@@ -2998,7 +3019,7 @@ init_utils();
2998
3019
  var AlertDialog = AlertDialogPrimitive.Root;
2999
3020
  var AlertDialogTrigger = AlertDialogPrimitive.Trigger;
3000
3021
  var AlertDialogPortal = AlertDialogPrimitive.Portal;
3001
- var AlertDialogOverlay = React49.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
3022
+ var AlertDialogOverlay = React50.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
3002
3023
  AlertDialogPrimitive.Overlay,
3003
3024
  {
3004
3025
  className: cn(
@@ -3010,7 +3031,7 @@ var AlertDialogOverlay = React49.forwardRef(({ className, ...props }, ref) => /*
3010
3031
  }
3011
3032
  ));
3012
3033
  AlertDialogOverlay.displayName = AlertDialogPrimitive.Overlay.displayName;
3013
- var AlertDialogContent = React49.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxs(AlertDialogPortal, { children: [
3034
+ var AlertDialogContent = React50.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxs(AlertDialogPortal, { children: [
3014
3035
  /* @__PURE__ */ jsx(AlertDialogOverlay, {}),
3015
3036
  /* @__PURE__ */ jsx(
3016
3037
  AlertDialogPrimitive.Content,
@@ -3053,7 +3074,7 @@ var AlertDialogFooter = ({
3053
3074
  }
3054
3075
  );
3055
3076
  AlertDialogFooter.displayName = "AlertDialogFooter";
3056
- var AlertDialogTitle = React49.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
3077
+ var AlertDialogTitle = React50.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
3057
3078
  AlertDialogPrimitive.Title,
3058
3079
  {
3059
3080
  ref,
@@ -3062,7 +3083,7 @@ var AlertDialogTitle = React49.forwardRef(({ className, ...props }, ref) => /* @
3062
3083
  }
3063
3084
  ));
3064
3085
  AlertDialogTitle.displayName = AlertDialogPrimitive.Title.displayName;
3065
- var AlertDialogDescription = React49.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
3086
+ var AlertDialogDescription = React50.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
3066
3087
  AlertDialogPrimitive.Description,
3067
3088
  {
3068
3089
  ref,
@@ -3071,7 +3092,7 @@ var AlertDialogDescription = React49.forwardRef(({ className, ...props }, ref) =
3071
3092
  }
3072
3093
  ));
3073
3094
  AlertDialogDescription.displayName = AlertDialogPrimitive.Description.displayName;
3074
- var AlertDialogAction = React49.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
3095
+ var AlertDialogAction = React50.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
3075
3096
  AlertDialogPrimitive.Action,
3076
3097
  {
3077
3098
  ref,
@@ -3080,7 +3101,7 @@ var AlertDialogAction = React49.forwardRef(({ className, ...props }, ref) => /*
3080
3101
  }
3081
3102
  ));
3082
3103
  AlertDialogAction.displayName = AlertDialogPrimitive.Action.displayName;
3083
- var AlertDialogCancel = React49.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
3104
+ var AlertDialogCancel = React50.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
3084
3105
  AlertDialogPrimitive.Cancel,
3085
3106
  {
3086
3107
  ref,
@@ -3100,7 +3121,7 @@ var Sheet = DialogPrimitive.Root;
3100
3121
  var SheetTrigger = DialogPrimitive.Trigger;
3101
3122
  var SheetClose = DialogPrimitive.Close;
3102
3123
  var SheetPortal = DialogPrimitive.Portal;
3103
- var SheetOverlay = React49.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
3124
+ var SheetOverlay = React50.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
3104
3125
  DialogPrimitive.Overlay,
3105
3126
  {
3106
3127
  className: cn(
@@ -3128,7 +3149,7 @@ var sheetVariants = cva(
3128
3149
  }
3129
3150
  }
3130
3151
  );
3131
- var SheetContent = React49.forwardRef(({ side = "right", className, children, hideClose, ...props }, ref) => /* @__PURE__ */ jsxs(SheetPortal, { children: [
3152
+ var SheetContent = React50.forwardRef(({ side = "right", className, children, hideClose, ...props }, ref) => /* @__PURE__ */ jsxs(SheetPortal, { children: [
3132
3153
  /* @__PURE__ */ jsx(SheetOverlay, {}),
3133
3154
  /* @__PURE__ */ jsxs(
3134
3155
  DialogPrimitive.Content,
@@ -3175,7 +3196,7 @@ var SheetFooter = ({
3175
3196
  }
3176
3197
  );
3177
3198
  SheetFooter.displayName = "SheetFooter";
3178
- var SheetTitle = React49.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
3199
+ var SheetTitle = React50.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
3179
3200
  DialogPrimitive.Title,
3180
3201
  {
3181
3202
  ref,
@@ -3184,7 +3205,7 @@ var SheetTitle = React49.forwardRef(({ className, ...props }, ref) => /* @__PURE
3184
3205
  }
3185
3206
  ));
3186
3207
  SheetTitle.displayName = DialogPrimitive.Title.displayName;
3187
- var SheetDescription = React49.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
3208
+ var SheetDescription = React50.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
3188
3209
  DialogPrimitive.Description,
3189
3210
  {
3190
3211
  ref,
@@ -3196,7 +3217,7 @@ SheetDescription.displayName = DialogPrimitive.Description.displayName;
3196
3217
 
3197
3218
  // src/components/ui/drawer/index.tsx
3198
3219
  init_utils();
3199
- var DrawerContext = React49.createContext({
3220
+ var DrawerContext = React50.createContext({
3200
3221
  direction: "bottom"
3201
3222
  });
3202
3223
  var Drawer = ({
@@ -3215,7 +3236,7 @@ Drawer.displayName = "Drawer";
3215
3236
  var DrawerTrigger = Drawer$1.Trigger;
3216
3237
  var DrawerPortal = Drawer$1.Portal;
3217
3238
  var DrawerClose = Drawer$1.Close;
3218
- var DrawerOverlay = React49.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
3239
+ var DrawerOverlay = React50.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
3219
3240
  Drawer$1.Overlay,
3220
3241
  {
3221
3242
  ref,
@@ -3224,7 +3245,7 @@ var DrawerOverlay = React49.forwardRef(({ className, ...props }, ref) => /* @__P
3224
3245
  }
3225
3246
  ));
3226
3247
  DrawerOverlay.displayName = Drawer$1.Overlay.displayName;
3227
- var DrawerContent = React49.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(DrawerPortal, { children: [
3248
+ var DrawerContent = React50.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(DrawerPortal, { children: [
3228
3249
  /* @__PURE__ */ jsx(DrawerOverlay, {}),
3229
3250
  /* @__PURE__ */ jsxs(
3230
3251
  Drawer$1.Content,
@@ -3259,7 +3280,7 @@ var DrawerFooter = ({
3259
3280
  }
3260
3281
  );
3261
3282
  DrawerFooter.displayName = "DrawerFooter";
3262
- var DrawerTitle = React49.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
3283
+ var DrawerTitle = React50.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
3263
3284
  Drawer$1.Title,
3264
3285
  {
3265
3286
  ref,
@@ -3271,7 +3292,7 @@ var DrawerTitle = React49.forwardRef(({ className, ...props }, ref) => /* @__PUR
3271
3292
  }
3272
3293
  ));
3273
3294
  DrawerTitle.displayName = Drawer$1.Title.displayName;
3274
- var DrawerDescription = React49.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
3295
+ var DrawerDescription = React50.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
3275
3296
  Drawer$1.Description,
3276
3297
  {
3277
3298
  ref,
@@ -3286,7 +3307,7 @@ init_utils();
3286
3307
  var Popover = PopoverPrimitive.Root;
3287
3308
  var PopoverTrigger = PopoverPrimitive.Trigger;
3288
3309
  var PopoverAnchor = PopoverPrimitive.Anchor;
3289
- var PopoverContent = React49.forwardRef(({ className, align = "center", sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsx(PopoverPrimitive.Portal, { children: /* @__PURE__ */ jsx(
3310
+ var PopoverContent = React50.forwardRef(({ className, align = "center", sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsx(PopoverPrimitive.Portal, { children: /* @__PURE__ */ jsx(
3290
3311
  PopoverPrimitive.Content,
3291
3312
  {
3292
3313
  ref,
@@ -3306,20 +3327,22 @@ init_utils();
3306
3327
  var TooltipProvider = TooltipPrimitive.Provider;
3307
3328
  var Tooltip = TooltipPrimitive.Root;
3308
3329
  var TooltipTrigger = TooltipPrimitive.Trigger;
3309
- var TooltipContent = React49.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsx(
3330
+ var TooltipContent = React50.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsx(
3310
3331
  TooltipPrimitive.Content,
3311
3332
  {
3312
3333
  ref,
3313
3334
  sideOffset,
3314
3335
  className: cn(
3315
- "z-50 overflow-hidden rounded-md bg-mvn-gray-900 px-3 py-1.5 text-xs text-white animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 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",
3336
+ "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",
3337
+ "data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95",
3338
+ "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",
3316
3339
  className
3317
3340
  ),
3318
3341
  ...props
3319
3342
  }
3320
3343
  ));
3321
3344
  TooltipContent.displayName = TooltipPrimitive.Content.displayName;
3322
- var SimpleTooltip = React49.forwardRef(
3345
+ var SimpleTooltip = React50.forwardRef(
3323
3346
  ({
3324
3347
  children,
3325
3348
  content,
@@ -3350,7 +3373,7 @@ init_utils();
3350
3373
  var HoverCard = HoverCardPrimitive.Root;
3351
3374
  var HoverCardTrigger = HoverCardPrimitive.Trigger;
3352
3375
  var HoverCardArrow = HoverCardPrimitive.Arrow;
3353
- var HoverCardContent = React49.forwardRef(
3376
+ var HoverCardContent = React50.forwardRef(
3354
3377
  ({
3355
3378
  className,
3356
3379
  align = "center",
@@ -3394,7 +3417,7 @@ var DropdownMenuGroup = DropdownMenuPrimitive.Group;
3394
3417
  var DropdownMenuPortal = DropdownMenuPrimitive.Portal;
3395
3418
  var DropdownMenuSub = DropdownMenuPrimitive.Sub;
3396
3419
  var DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup;
3397
- var DropdownMenuSubTrigger = React49.forwardRef(({ className, inset, children, ...props }, ref) => /* @__PURE__ */ jsxs(
3420
+ var DropdownMenuSubTrigger = React50.forwardRef(({ className, inset, children, ...props }, ref) => /* @__PURE__ */ jsxs(
3398
3421
  DropdownMenuPrimitive.SubTrigger,
3399
3422
  {
3400
3423
  ref,
@@ -3411,7 +3434,7 @@ var DropdownMenuSubTrigger = React49.forwardRef(({ className, inset, children, .
3411
3434
  }
3412
3435
  ));
3413
3436
  DropdownMenuSubTrigger.displayName = DropdownMenuPrimitive.SubTrigger.displayName;
3414
- var DropdownMenuSubContent = React49.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
3437
+ var DropdownMenuSubContent = React50.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
3415
3438
  DropdownMenuPrimitive.SubContent,
3416
3439
  {
3417
3440
  ref,
@@ -3423,7 +3446,7 @@ var DropdownMenuSubContent = React49.forwardRef(({ className, ...props }, ref) =
3423
3446
  }
3424
3447
  ));
3425
3448
  DropdownMenuSubContent.displayName = DropdownMenuPrimitive.SubContent.displayName;
3426
- var DropdownMenuContent = React49.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsx(DropdownMenuPrimitive.Portal, { children: /* @__PURE__ */ jsx(
3449
+ var DropdownMenuContent = React50.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsx(DropdownMenuPrimitive.Portal, { children: /* @__PURE__ */ jsx(
3427
3450
  DropdownMenuPrimitive.Content,
3428
3451
  {
3429
3452
  ref,
@@ -3436,7 +3459,7 @@ var DropdownMenuContent = React49.forwardRef(({ className, sideOffset = 4, ...pr
3436
3459
  }
3437
3460
  ) }));
3438
3461
  DropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName;
3439
- var DropdownMenuItem = React49.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx(
3462
+ var DropdownMenuItem = React50.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx(
3440
3463
  DropdownMenuPrimitive.Item,
3441
3464
  {
3442
3465
  ref,
@@ -3449,7 +3472,7 @@ var DropdownMenuItem = React49.forwardRef(({ className, inset, ...props }, ref)
3449
3472
  }
3450
3473
  ));
3451
3474
  DropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName;
3452
- var DropdownMenuCheckboxItem = React49.forwardRef(({ className, children, checked, ...props }, ref) => /* @__PURE__ */ jsxs(
3475
+ var DropdownMenuCheckboxItem = React50.forwardRef(({ className, children, checked, ...props }, ref) => /* @__PURE__ */ jsxs(
3453
3476
  DropdownMenuPrimitive.CheckboxItem,
3454
3477
  {
3455
3478
  ref,
@@ -3466,7 +3489,7 @@ var DropdownMenuCheckboxItem = React49.forwardRef(({ className, children, checke
3466
3489
  }
3467
3490
  ));
3468
3491
  DropdownMenuCheckboxItem.displayName = DropdownMenuPrimitive.CheckboxItem.displayName;
3469
- var DropdownMenuRadioItem = React49.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(
3492
+ var DropdownMenuRadioItem = React50.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(
3470
3493
  DropdownMenuPrimitive.RadioItem,
3471
3494
  {
3472
3495
  ref,
@@ -3482,7 +3505,7 @@ var DropdownMenuRadioItem = React49.forwardRef(({ className, children, ...props
3482
3505
  }
3483
3506
  ));
3484
3507
  DropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName;
3485
- var DropdownMenuLabel = React49.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx(
3508
+ var DropdownMenuLabel = React50.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx(
3486
3509
  DropdownMenuPrimitive.Label,
3487
3510
  {
3488
3511
  ref,
@@ -3495,7 +3518,7 @@ var DropdownMenuLabel = React49.forwardRef(({ className, inset, ...props }, ref)
3495
3518
  }
3496
3519
  ));
3497
3520
  DropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName;
3498
- var DropdownMenuSeparator = React49.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
3521
+ var DropdownMenuSeparator = React50.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
3499
3522
  DropdownMenuPrimitive.Separator,
3500
3523
  {
3501
3524
  ref,
@@ -3526,7 +3549,7 @@ var ContextMenuGroup = ContextMenuPrimitive.Group;
3526
3549
  var ContextMenuPortal = ContextMenuPrimitive.Portal;
3527
3550
  var ContextMenuSub = ContextMenuPrimitive.Sub;
3528
3551
  var ContextMenuRadioGroup = ContextMenuPrimitive.RadioGroup;
3529
- var ContextMenuSubTrigger = React49.forwardRef(({ className, inset, children, ...props }, ref) => /* @__PURE__ */ jsxs(
3552
+ var ContextMenuSubTrigger = React50.forwardRef(({ className, inset, children, ...props }, ref) => /* @__PURE__ */ jsxs(
3530
3553
  ContextMenuPrimitive.SubTrigger,
3531
3554
  {
3532
3555
  ref,
@@ -3543,7 +3566,7 @@ var ContextMenuSubTrigger = React49.forwardRef(({ className, inset, children, ..
3543
3566
  }
3544
3567
  ));
3545
3568
  ContextMenuSubTrigger.displayName = ContextMenuPrimitive.SubTrigger.displayName;
3546
- var ContextMenuSubContent = React49.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
3569
+ var ContextMenuSubContent = React50.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
3547
3570
  ContextMenuPrimitive.SubContent,
3548
3571
  {
3549
3572
  ref,
@@ -3555,7 +3578,7 @@ var ContextMenuSubContent = React49.forwardRef(({ className, ...props }, ref) =>
3555
3578
  }
3556
3579
  ));
3557
3580
  ContextMenuSubContent.displayName = ContextMenuPrimitive.SubContent.displayName;
3558
- var ContextMenuContent = React49.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(ContextMenuPrimitive.Portal, { children: /* @__PURE__ */ jsx(
3581
+ var ContextMenuContent = React50.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(ContextMenuPrimitive.Portal, { children: /* @__PURE__ */ jsx(
3559
3582
  ContextMenuPrimitive.Content,
3560
3583
  {
3561
3584
  ref,
@@ -3567,7 +3590,7 @@ var ContextMenuContent = React49.forwardRef(({ className, ...props }, ref) => /*
3567
3590
  }
3568
3591
  ) }));
3569
3592
  ContextMenuContent.displayName = ContextMenuPrimitive.Content.displayName;
3570
- var ContextMenuItem = React49.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx(
3593
+ var ContextMenuItem = React50.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx(
3571
3594
  ContextMenuPrimitive.Item,
3572
3595
  {
3573
3596
  ref,
@@ -3580,7 +3603,7 @@ var ContextMenuItem = React49.forwardRef(({ className, inset, ...props }, ref) =
3580
3603
  }
3581
3604
  ));
3582
3605
  ContextMenuItem.displayName = ContextMenuPrimitive.Item.displayName;
3583
- var ContextMenuCheckboxItem = React49.forwardRef(({ className, children, checked, ...props }, ref) => /* @__PURE__ */ jsxs(
3606
+ var ContextMenuCheckboxItem = React50.forwardRef(({ className, children, checked, ...props }, ref) => /* @__PURE__ */ jsxs(
3584
3607
  ContextMenuPrimitive.CheckboxItem,
3585
3608
  {
3586
3609
  ref,
@@ -3597,7 +3620,7 @@ var ContextMenuCheckboxItem = React49.forwardRef(({ className, children, checked
3597
3620
  }
3598
3621
  ));
3599
3622
  ContextMenuCheckboxItem.displayName = ContextMenuPrimitive.CheckboxItem.displayName;
3600
- var ContextMenuRadioItem = React49.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(
3623
+ var ContextMenuRadioItem = React50.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(
3601
3624
  ContextMenuPrimitive.RadioItem,
3602
3625
  {
3603
3626
  ref,
@@ -3613,7 +3636,7 @@ var ContextMenuRadioItem = React49.forwardRef(({ className, children, ...props }
3613
3636
  }
3614
3637
  ));
3615
3638
  ContextMenuRadioItem.displayName = ContextMenuPrimitive.RadioItem.displayName;
3616
- var ContextMenuLabel = React49.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx(
3639
+ var ContextMenuLabel = React50.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx(
3617
3640
  ContextMenuPrimitive.Label,
3618
3641
  {
3619
3642
  ref,
@@ -3626,7 +3649,7 @@ var ContextMenuLabel = React49.forwardRef(({ className, inset, ...props }, ref)
3626
3649
  }
3627
3650
  ));
3628
3651
  ContextMenuLabel.displayName = ContextMenuPrimitive.Label.displayName;
3629
- var ContextMenuSeparator = React49.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
3652
+ var ContextMenuSeparator = React50.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
3630
3653
  ContextMenuPrimitive.Separator,
3631
3654
  {
3632
3655
  ref,
@@ -3659,7 +3682,7 @@ var MenubarGroup = MenubarPrimitive.Group;
3659
3682
  var MenubarPortal = MenubarPrimitive.Portal;
3660
3683
  var MenubarSub = MenubarPrimitive.Sub;
3661
3684
  var MenubarRadioGroup = MenubarPrimitive.RadioGroup;
3662
- var Menubar = React49.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
3685
+ var Menubar = React50.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
3663
3686
  MenubarPrimitive.Root,
3664
3687
  {
3665
3688
  ref,
@@ -3671,7 +3694,7 @@ var Menubar = React49.forwardRef(({ className, ...props }, ref) => /* @__PURE__
3671
3694
  }
3672
3695
  ));
3673
3696
  Menubar.displayName = MenubarPrimitive.Root.displayName;
3674
- var MenubarTrigger = React49.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
3697
+ var MenubarTrigger = React50.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
3675
3698
  MenubarPrimitive.Trigger,
3676
3699
  {
3677
3700
  ref,
@@ -3683,7 +3706,7 @@ var MenubarTrigger = React49.forwardRef(({ className, ...props }, ref) => /* @__
3683
3706
  }
3684
3707
  ));
3685
3708
  MenubarTrigger.displayName = MenubarPrimitive.Trigger.displayName;
3686
- var MenubarSubTrigger = React49.forwardRef(({ className, inset, children, ...props }, ref) => /* @__PURE__ */ jsxs(
3709
+ var MenubarSubTrigger = React50.forwardRef(({ className, inset, children, ...props }, ref) => /* @__PURE__ */ jsxs(
3687
3710
  MenubarPrimitive.SubTrigger,
3688
3711
  {
3689
3712
  ref,
@@ -3700,7 +3723,7 @@ var MenubarSubTrigger = React49.forwardRef(({ className, inset, children, ...pro
3700
3723
  }
3701
3724
  ));
3702
3725
  MenubarSubTrigger.displayName = MenubarPrimitive.SubTrigger.displayName;
3703
- var MenubarSubContent = React49.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
3726
+ var MenubarSubContent = React50.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
3704
3727
  MenubarPrimitive.SubContent,
3705
3728
  {
3706
3729
  ref,
@@ -3712,7 +3735,7 @@ var MenubarSubContent = React49.forwardRef(({ className, ...props }, ref) => /*
3712
3735
  }
3713
3736
  ));
3714
3737
  MenubarSubContent.displayName = MenubarPrimitive.SubContent.displayName;
3715
- var MenubarContent = React49.forwardRef(
3738
+ var MenubarContent = React50.forwardRef(
3716
3739
  ({ className, align = "start", alignOffset = -4, sideOffset = 8, ...props }, ref) => /* @__PURE__ */ jsx(MenubarPrimitive.Portal, { children: /* @__PURE__ */ jsx(
3717
3740
  MenubarPrimitive.Content,
3718
3741
  {
@@ -3729,7 +3752,7 @@ var MenubarContent = React49.forwardRef(
3729
3752
  ) })
3730
3753
  );
3731
3754
  MenubarContent.displayName = MenubarPrimitive.Content.displayName;
3732
- var MenubarItem = React49.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx(
3755
+ var MenubarItem = React50.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx(
3733
3756
  MenubarPrimitive.Item,
3734
3757
  {
3735
3758
  ref,
@@ -3742,7 +3765,7 @@ var MenubarItem = React49.forwardRef(({ className, inset, ...props }, ref) => /*
3742
3765
  }
3743
3766
  ));
3744
3767
  MenubarItem.displayName = MenubarPrimitive.Item.displayName;
3745
- var MenubarCheckboxItem = React49.forwardRef(({ className, children, checked, ...props }, ref) => /* @__PURE__ */ jsxs(
3768
+ var MenubarCheckboxItem = React50.forwardRef(({ className, children, checked, ...props }, ref) => /* @__PURE__ */ jsxs(
3746
3769
  MenubarPrimitive.CheckboxItem,
3747
3770
  {
3748
3771
  ref,
@@ -3759,7 +3782,7 @@ var MenubarCheckboxItem = React49.forwardRef(({ className, children, checked, ..
3759
3782
  }
3760
3783
  ));
3761
3784
  MenubarCheckboxItem.displayName = MenubarPrimitive.CheckboxItem.displayName;
3762
- var MenubarRadioItem = React49.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(
3785
+ var MenubarRadioItem = React50.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(
3763
3786
  MenubarPrimitive.RadioItem,
3764
3787
  {
3765
3788
  ref,
@@ -3775,7 +3798,7 @@ var MenubarRadioItem = React49.forwardRef(({ className, children, ...props }, re
3775
3798
  }
3776
3799
  ));
3777
3800
  MenubarRadioItem.displayName = MenubarPrimitive.RadioItem.displayName;
3778
- var MenubarLabel = React49.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx(
3801
+ var MenubarLabel = React50.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx(
3779
3802
  MenubarPrimitive.Label,
3780
3803
  {
3781
3804
  ref,
@@ -3788,7 +3811,7 @@ var MenubarLabel = React49.forwardRef(({ className, inset, ...props }, ref) => /
3788
3811
  }
3789
3812
  ));
3790
3813
  MenubarLabel.displayName = MenubarPrimitive.Label.displayName;
3791
- var MenubarSeparator = React49.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
3814
+ var MenubarSeparator = React50.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
3792
3815
  MenubarPrimitive.Separator,
3793
3816
  {
3794
3817
  ref,
@@ -3816,7 +3839,7 @@ MenubarShortcut.displayName = "MenubarShortcut";
3816
3839
 
3817
3840
  // src/components/ui/navigation-menu/index.tsx
3818
3841
  init_utils();
3819
- var NavigationMenu = React49.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(
3842
+ var NavigationMenu = React50.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(
3820
3843
  NavigationMenuPrimitive.Root,
3821
3844
  {
3822
3845
  ref,
@@ -3832,7 +3855,7 @@ var NavigationMenu = React49.forwardRef(({ className, children, ...props }, ref)
3832
3855
  }
3833
3856
  ));
3834
3857
  NavigationMenu.displayName = NavigationMenuPrimitive.Root.displayName;
3835
- var NavigationMenuList = React49.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
3858
+ var NavigationMenuList = React50.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
3836
3859
  NavigationMenuPrimitive.List,
3837
3860
  {
3838
3861
  ref,
@@ -3848,7 +3871,7 @@ var NavigationMenuItem = NavigationMenuPrimitive.Item;
3848
3871
  var navigationMenuTriggerStyle = cva(
3849
3872
  "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"
3850
3873
  );
3851
- var NavigationMenuTrigger = React49.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(
3874
+ var NavigationMenuTrigger = React50.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(
3852
3875
  NavigationMenuPrimitive.Trigger,
3853
3876
  {
3854
3877
  ref,
@@ -3868,7 +3891,7 @@ var NavigationMenuTrigger = React49.forwardRef(({ className, children, ...props
3868
3891
  }
3869
3892
  ));
3870
3893
  NavigationMenuTrigger.displayName = NavigationMenuPrimitive.Trigger.displayName;
3871
- var NavigationMenuContent = React49.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
3894
+ var NavigationMenuContent = React50.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
3872
3895
  NavigationMenuPrimitive.Content,
3873
3896
  {
3874
3897
  ref,
@@ -3881,7 +3904,7 @@ var NavigationMenuContent = React49.forwardRef(({ className, ...props }, ref) =>
3881
3904
  ));
3882
3905
  NavigationMenuContent.displayName = NavigationMenuPrimitive.Content.displayName;
3883
3906
  var NavigationMenuLink = NavigationMenuPrimitive.Link;
3884
- var NavigationMenuViewport = React49.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { className: cn("absolute left-0 top-full flex justify-center"), children: /* @__PURE__ */ jsx(
3907
+ var NavigationMenuViewport = React50.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { className: cn("absolute left-0 top-full flex justify-center"), children: /* @__PURE__ */ jsx(
3885
3908
  NavigationMenuPrimitive.Viewport,
3886
3909
  {
3887
3910
  className: cn(
@@ -3893,7 +3916,7 @@ var NavigationMenuViewport = React49.forwardRef(({ className, ...props }, ref) =
3893
3916
  }
3894
3917
  ) }));
3895
3918
  NavigationMenuViewport.displayName = NavigationMenuPrimitive.Viewport.displayName;
3896
- var NavigationMenuIndicator = React49.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
3919
+ var NavigationMenuIndicator = React50.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
3897
3920
  NavigationMenuPrimitive.Indicator,
3898
3921
  {
3899
3922
  ref,
@@ -3909,7 +3932,7 @@ NavigationMenuIndicator.displayName = NavigationMenuPrimitive.Indicator.displayN
3909
3932
 
3910
3933
  // src/components/ui/command/index.tsx
3911
3934
  init_utils();
3912
- var Command = React49.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
3935
+ var Command = React50.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
3913
3936
  Command$1,
3914
3937
  {
3915
3938
  ref,
@@ -3924,7 +3947,7 @@ Command.displayName = Command$1.displayName;
3924
3947
  var CommandDialog = ({ children, ...props }) => {
3925
3948
  return /* @__PURE__ */ jsx(Dialog, { ...props, children: /* @__PURE__ */ jsx(DialogContent, { className: "overflow-hidden p-0", children: /* @__PURE__ */ jsx(Command, { className: "[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5", children }) }) });
3926
3949
  };
3927
- var CommandInput = React49.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxs("div", { className: "flex items-center border-b border-mvn-gray-200 px-3", "cmdk-input-wrapper": "", children: [
3950
+ var CommandInput = React50.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxs("div", { className: "flex items-center border-b border-mvn-gray-200 px-3", "cmdk-input-wrapper": "", children: [
3928
3951
  /* @__PURE__ */ jsx(MagnifyingGlassIcon, { className: "mr-2 h-4 w-4 shrink-0 opacity-50" }),
3929
3952
  /* @__PURE__ */ jsx(
3930
3953
  Command$1.Input,
@@ -3939,7 +3962,7 @@ var CommandInput = React49.forwardRef(({ className, ...props }, ref) => /* @__PU
3939
3962
  )
3940
3963
  ] }));
3941
3964
  CommandInput.displayName = Command$1.Input.displayName;
3942
- var CommandList = React49.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
3965
+ var CommandList = React50.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
3943
3966
  Command$1.List,
3944
3967
  {
3945
3968
  ref,
@@ -3948,7 +3971,7 @@ var CommandList = React49.forwardRef(({ className, ...props }, ref) => /* @__PUR
3948
3971
  }
3949
3972
  ));
3950
3973
  CommandList.displayName = Command$1.List.displayName;
3951
- var CommandEmpty = React49.forwardRef((props, ref) => /* @__PURE__ */ jsx(
3974
+ var CommandEmpty = React50.forwardRef((props, ref) => /* @__PURE__ */ jsx(
3952
3975
  Command$1.Empty,
3953
3976
  {
3954
3977
  ref,
@@ -3957,7 +3980,7 @@ var CommandEmpty = React49.forwardRef((props, ref) => /* @__PURE__ */ jsx(
3957
3980
  }
3958
3981
  ));
3959
3982
  CommandEmpty.displayName = Command$1.Empty.displayName;
3960
- var CommandGroup = React49.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
3983
+ var CommandGroup = React50.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
3961
3984
  Command$1.Group,
3962
3985
  {
3963
3986
  ref,
@@ -3969,7 +3992,7 @@ var CommandGroup = React49.forwardRef(({ className, ...props }, ref) => /* @__PU
3969
3992
  }
3970
3993
  ));
3971
3994
  CommandGroup.displayName = Command$1.Group.displayName;
3972
- var CommandSeparator = React49.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
3995
+ var CommandSeparator = React50.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
3973
3996
  Command$1.Separator,
3974
3997
  {
3975
3998
  ref,
@@ -3978,7 +4001,7 @@ var CommandSeparator = React49.forwardRef(({ className, ...props }, ref) => /* @
3978
4001
  }
3979
4002
  ));
3980
4003
  CommandSeparator.displayName = Command$1.Separator.displayName;
3981
- var CommandItem = React49.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
4004
+ var CommandItem = React50.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
3982
4005
  Command$1.Item,
3983
4006
  {
3984
4007
  ref,
@@ -4009,7 +4032,7 @@ CommandShortcut.displayName = "CommandShortcut";
4009
4032
 
4010
4033
  // src/components/ui/combobox/index.tsx
4011
4034
  init_utils();
4012
- var Combobox = React49.forwardRef(
4035
+ var Combobox = React50.forwardRef(
4013
4036
  ({
4014
4037
  options,
4015
4038
  value,
@@ -4021,7 +4044,7 @@ var Combobox = React49.forwardRef(
4021
4044
  disabled,
4022
4045
  clearable
4023
4046
  }, ref) => {
4024
- const [open, setOpen] = React49.useState(false);
4047
+ const [open, setOpen] = React50.useState(false);
4025
4048
  const selectedOption = options.find((option) => option.value === value);
4026
4049
  const handleClear = (e) => {
4027
4050
  e.stopPropagation();
@@ -4093,9 +4116,9 @@ Combobox.displayName = "Combobox";
4093
4116
 
4094
4117
  // src/components/ui/breadcrumb/index.tsx
4095
4118
  init_utils();
4096
- var Breadcrumb = React49.forwardRef(({ ...props }, ref) => /* @__PURE__ */ jsx("nav", { ref, "aria-label": "breadcrumb", ...props }));
4119
+ var Breadcrumb = React50.forwardRef(({ ...props }, ref) => /* @__PURE__ */ jsx("nav", { ref, "aria-label": "breadcrumb", ...props }));
4097
4120
  Breadcrumb.displayName = "Breadcrumb";
4098
- var BreadcrumbList = React49.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
4121
+ var BreadcrumbList = React50.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
4099
4122
  "ol",
4100
4123
  {
4101
4124
  ref,
@@ -4107,7 +4130,7 @@ var BreadcrumbList = React49.forwardRef(({ className, ...props }, ref) => /* @__
4107
4130
  }
4108
4131
  ));
4109
4132
  BreadcrumbList.displayName = "BreadcrumbList";
4110
- var BreadcrumbItem = React49.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
4133
+ var BreadcrumbItem = React50.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
4111
4134
  "li",
4112
4135
  {
4113
4136
  ref,
@@ -4116,7 +4139,7 @@ var BreadcrumbItem = React49.forwardRef(({ className, ...props }, ref) => /* @__
4116
4139
  }
4117
4140
  ));
4118
4141
  BreadcrumbItem.displayName = "BreadcrumbItem";
4119
- var BreadcrumbLink = React49.forwardRef(({ asChild, className, ...props }, ref) => {
4142
+ var BreadcrumbLink = React50.forwardRef(({ asChild, className, ...props }, ref) => {
4120
4143
  const Comp = "a";
4121
4144
  return /* @__PURE__ */ jsx(
4122
4145
  Comp,
@@ -4131,7 +4154,7 @@ var BreadcrumbLink = React49.forwardRef(({ asChild, className, ...props }, ref)
4131
4154
  );
4132
4155
  });
4133
4156
  BreadcrumbLink.displayName = "BreadcrumbLink";
4134
- var BreadcrumbPage = React49.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
4157
+ var BreadcrumbPage = React50.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
4135
4158
  "span",
4136
4159
  {
4137
4160
  ref,
@@ -4198,7 +4221,7 @@ var Pagination = ({
4198
4221
  }
4199
4222
  );
4200
4223
  Pagination.displayName = "Pagination";
4201
- var PaginationContent = React49.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
4224
+ var PaginationContent = React50.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
4202
4225
  "ul",
4203
4226
  {
4204
4227
  ref,
@@ -4207,7 +4230,7 @@ var PaginationContent = React49.forwardRef(({ className, ...props }, ref) => /*
4207
4230
  }
4208
4231
  ));
4209
4232
  PaginationContent.displayName = "PaginationContent";
4210
- var PaginationItem = React49.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("li", { ref, className: cn("", className), ...props }));
4233
+ var PaginationItem = React50.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("li", { ref, className: cn("", className), ...props }));
4211
4234
  PaginationItem.displayName = "PaginationItem";
4212
4235
  var PaginationLink = ({
4213
4236
  className,
@@ -4314,18 +4337,18 @@ PaginationEllipsis.displayName = "PaginationEllipsis";
4314
4337
 
4315
4338
  // src/components/ui/tabs/index.tsx
4316
4339
  init_utils();
4317
- var TabsContext = React49.createContext({
4340
+ var TabsContext = React50.createContext({
4318
4341
  destroyInactiveTabs: true
4319
4342
  });
4320
- var Tabs = React49.forwardRef(({ destroyInactiveTabs = true, ...props }, ref) => /* @__PURE__ */ jsx(TabsContext.Provider, { value: { destroyInactiveTabs }, children: /* @__PURE__ */ jsx(TabsPrimitive.Root, { ref, ...props }) }));
4343
+ var Tabs = React50.forwardRef(({ destroyInactiveTabs = true, ...props }, ref) => /* @__PURE__ */ jsx(TabsContext.Provider, { value: { destroyInactiveTabs }, children: /* @__PURE__ */ jsx(TabsPrimitive.Root, { ref, ...props }) }));
4321
4344
  Tabs.displayName = TabsPrimitive.Root.displayName;
4322
- var TabsList = React49.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
4345
+ var TabsList = React50.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
4323
4346
  TabsPrimitive.List,
4324
4347
  {
4325
4348
  ref,
4326
4349
  className: cn(
4327
4350
  "flex items-stretch gap-0 text-muted-foreground",
4328
- "data-[orientation=horizontal]:w-full data-[orientation=horizontal]:border-b data-[orientation=vertical]:border-border",
4351
+ "data-[orientation=horizontal]:w-full",
4329
4352
  "data-[orientation=vertical]:w-56 data-[orientation=vertical]:border-r data-[orientation=vertical]:border-border",
4330
4353
  "data-[orientation=vertical]:flex-col data-[orientation=vertical]:shrink-0",
4331
4354
  className
@@ -4334,26 +4357,30 @@ var TabsList = React49.forwardRef(({ className, ...props }, ref) => /* @__PURE__
4334
4357
  }
4335
4358
  ));
4336
4359
  TabsList.displayName = TabsPrimitive.List.displayName;
4337
- var TabsTrigger = React49.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
4360
+ var TabsTrigger = React50.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsx(
4338
4361
  TabsPrimitive.Trigger,
4339
4362
  {
4340
4363
  ref,
4341
4364
  className: cn(
4342
- "inline-flex min-w-0 items-center justify-center whitespace-nowrap text-sm font-medium",
4365
+ "group inline-flex min-w-0 items-center justify-center whitespace-nowrap text-sm",
4343
4366
  "transition-all duration-150 text-muted-foreground hover:text-primary",
4344
4367
  "ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
4345
- "data-[orientation=horizontal]:flex-1 data-[orientation=horizontal]:px-4 data-[orientation=horizontal]:py-3 data-[orientation=horizontal]:border-b-2 data-[orientation=horizontal]:border-border",
4368
+ "data-[orientation=horizontal]:px-4 data-[orientation=horizontal]:py-3 data-[orientation=horizontal]:border-b-2 data-[orientation=horizontal]:border-transparent",
4346
4369
  "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",
4347
- "data-[state=active]:text-primary data-[state=active]:font-semibold data-[state=active]:bg-muted/60 data-[state=active]:border-primary",
4370
+ "data-[state=active]:text-primary data-[state=active]:border-primary",
4348
4371
  "disabled:pointer-events-none disabled:opacity-50 disabled:cursor-not-allowed",
4349
4372
  className
4350
4373
  ),
4351
- ...props
4374
+ ...props,
4375
+ children: /* @__PURE__ */ jsxs("span", { className: "relative inline-flex", children: [
4376
+ /* @__PURE__ */ jsx("span", { className: "invisible font-semibold", "aria-hidden": "true", children }),
4377
+ /* @__PURE__ */ jsx("span", { className: "absolute inset-0 flex items-center justify-center font-medium group-data-[state=active]:font-semibold", children })
4378
+ ] })
4352
4379
  }
4353
4380
  ));
4354
4381
  TabsTrigger.displayName = TabsPrimitive.Trigger.displayName;
4355
- var TabsContent = React49.forwardRef(({ className, ...props }, ref) => {
4356
- const { destroyInactiveTabs } = React49.useContext(TabsContext);
4382
+ var TabsContent = React50.forwardRef(({ className, ...props }, ref) => {
4383
+ const { destroyInactiveTabs } = React50.useContext(TabsContext);
4357
4384
  return /* @__PURE__ */ jsx(
4358
4385
  TabsPrimitive.Content,
4359
4386
  {
@@ -4442,7 +4469,7 @@ var separatorVariants = cva("shrink-0 bg-line-normal", {
4442
4469
  variant: "default"
4443
4470
  }
4444
4471
  });
4445
- var Separator5 = React49.forwardRef(
4472
+ var Separator5 = React50.forwardRef(
4446
4473
  ({
4447
4474
  className,
4448
4475
  orientation = "horizontal",
@@ -4499,7 +4526,7 @@ var AspectRatio = AspectRatioPrimitive.Root;
4499
4526
 
4500
4527
  // src/components/ui/accordion/index.tsx
4501
4528
  init_utils();
4502
- var Accordion = React49.forwardRef(
4529
+ var Accordion = React50.forwardRef(
4503
4530
  ({
4504
4531
  items,
4505
4532
  className,
@@ -4509,7 +4536,7 @@ var Accordion = React49.forwardRef(
4509
4536
  renderItem,
4510
4537
  ...props
4511
4538
  }, ref) => {
4512
- const defaultRenderItem = React49.useCallback(
4539
+ const defaultRenderItem = React50.useCallback(
4513
4540
  (item) => /* @__PURE__ */ jsxs(
4514
4541
  AccordionPrimitive.Item,
4515
4542
  {
@@ -4557,7 +4584,7 @@ Accordion.displayName = "Accordion";
4557
4584
  // src/components/ui/collapsible/index.tsx
4558
4585
  init_utils();
4559
4586
  var Collapsible = CollapsiblePrimitive.Root;
4560
- var CollapsibleItem = React49.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
4587
+ var CollapsibleItem = React50.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
4561
4588
  "div",
4562
4589
  {
4563
4590
  ref,
@@ -4569,7 +4596,7 @@ var CollapsibleItem = React49.forwardRef(({ className, ...props }, ref) => /* @_
4569
4596
  }
4570
4597
  ));
4571
4598
  CollapsibleItem.displayName = "CollapsibleItem";
4572
- var CollapsibleTrigger = React49.forwardRef(({ className, children, indicator, ...props }, ref) => /* @__PURE__ */ jsxs(
4599
+ var CollapsibleTrigger = React50.forwardRef(({ className, children, indicator, ...props }, ref) => /* @__PURE__ */ jsxs(
4573
4600
  CollapsiblePrimitive.Trigger,
4574
4601
  {
4575
4602
  ref,
@@ -4595,7 +4622,7 @@ var CollapsibleTrigger = React49.forwardRef(({ className, children, indicator, .
4595
4622
  }
4596
4623
  ));
4597
4624
  CollapsibleTrigger.displayName = CollapsiblePrimitive.Trigger.displayName;
4598
- var CollapsibleContent = React49.forwardRef(({ className, contentClassName, children, ...props }, ref) => /* @__PURE__ */ jsx(
4625
+ var CollapsibleContent = React50.forwardRef(({ className, contentClassName, children, ...props }, ref) => /* @__PURE__ */ jsx(
4599
4626
  CollapsiblePrimitive.Content,
4600
4627
  {
4601
4628
  ref,
@@ -4646,13 +4673,14 @@ var ResizableHandle = ({
4646
4673
 
4647
4674
  // src/components/ui/scroll-area/index.tsx
4648
4675
  init_utils();
4649
- var ScrollArea = React49.forwardRef(
4676
+ var ScrollArea = React50.forwardRef(
4650
4677
  ({
4651
4678
  className,
4652
4679
  children,
4653
4680
  orientation = "vertical",
4654
4681
  scrollbarClassName,
4655
4682
  thumbClassName,
4683
+ type = "auto",
4656
4684
  ...props
4657
4685
  }, ref) => {
4658
4686
  const showVertical = orientation === "vertical" || orientation === "both";
@@ -4661,12 +4689,38 @@ var ScrollArea = React49.forwardRef(
4661
4689
  ScrollAreaPrimitive.Root,
4662
4690
  {
4663
4691
  ref,
4692
+ type,
4664
4693
  className: cn("relative overflow-hidden", className),
4665
4694
  ...props,
4666
4695
  children: [
4667
- /* @__PURE__ */ jsx(ScrollAreaPrimitive.Viewport, { className: "h-full w-full rounded-[inherit]", children }),
4668
- showVertical && /* @__PURE__ */ jsx(ScrollBar, { orientation: "vertical", className: scrollbarClassName, thumbClassName }),
4669
- showHorizontal && /* @__PURE__ */ jsx(ScrollBar, { orientation: "horizontal", className: scrollbarClassName, thumbClassName }),
4696
+ /* @__PURE__ */ jsx(
4697
+ ScrollAreaPrimitive.Viewport,
4698
+ {
4699
+ className: cn(
4700
+ "h-full w-full rounded-[inherit]",
4701
+ // Fix overflow based on orientation to prevent unwanted scrolling
4702
+ orientation === "vertical" && "!overflow-x-hidden",
4703
+ orientation === "horizontal" && "!overflow-y-hidden"
4704
+ ),
4705
+ children
4706
+ }
4707
+ ),
4708
+ showVertical && /* @__PURE__ */ jsx(
4709
+ ScrollBar,
4710
+ {
4711
+ orientation: "vertical",
4712
+ className: scrollbarClassName,
4713
+ thumbClassName
4714
+ }
4715
+ ),
4716
+ showHorizontal && /* @__PURE__ */ jsx(
4717
+ ScrollBar,
4718
+ {
4719
+ orientation: "horizontal",
4720
+ className: scrollbarClassName,
4721
+ thumbClassName
4722
+ }
4723
+ ),
4670
4724
  /* @__PURE__ */ jsx(ScrollAreaPrimitive.Corner, {})
4671
4725
  ]
4672
4726
  }
@@ -4674,7 +4728,7 @@ var ScrollArea = React49.forwardRef(
4674
4728
  }
4675
4729
  );
4676
4730
  ScrollArea.displayName = ScrollAreaPrimitive.Root.displayName;
4677
- var ScrollBar = React49.forwardRef(({ className, orientation = "vertical", thumbClassName, ...props }, ref) => /* @__PURE__ */ jsx(
4731
+ var ScrollBar = React50.forwardRef(({ className, orientation = "vertical", thumbClassName, ...props }, ref) => /* @__PURE__ */ jsx(
4678
4732
  ScrollAreaPrimitive.ScrollAreaScrollbar,
4679
4733
  {
4680
4734
  ref,
@@ -4690,7 +4744,7 @@ var ScrollBar = React49.forwardRef(({ className, orientation = "vertical", thumb
4690
4744
  ScrollAreaPrimitive.ScrollAreaThumb,
4691
4745
  {
4692
4746
  className: cn(
4693
- "relative flex-1 rounded-full bg-line-normal hover:bg-line-strong transition-colors",
4747
+ "relative flex-1 rounded-full bg-muted-foreground/50 hover:bg-muted-foreground transition-colors",
4694
4748
  thumbClassName
4695
4749
  )
4696
4750
  }
@@ -4706,9 +4760,9 @@ var SIDEBAR_COOKIE_MAX_AGE = 60 * 60 * 24 * 7;
4706
4760
  var SIDEBAR_WIDTH = "16rem";
4707
4761
  var SIDEBAR_WIDTH_ICON = "3rem";
4708
4762
  var SIDEBAR_KEYBOARD_SHORTCUT = "b";
4709
- var SidebarContext = React49.createContext(null);
4763
+ var SidebarContext = React50.createContext(null);
4710
4764
  function useSidebar() {
4711
- const context = React49.useContext(SidebarContext);
4765
+ const context = React50.useContext(SidebarContext);
4712
4766
  if (!context) {
4713
4767
  throw new Error("useSidebar must be used within a SidebarProvider.");
4714
4768
  }
@@ -4723,9 +4777,9 @@ function SidebarProvider({
4723
4777
  children,
4724
4778
  ...props
4725
4779
  }) {
4726
- const [_open, _setOpen] = React49.useState(defaultOpen);
4780
+ const [_open, _setOpen] = React50.useState(defaultOpen);
4727
4781
  const open = openProp ?? _open;
4728
- const setOpen = React49.useCallback(
4782
+ const setOpen = React50.useCallback(
4729
4783
  (value) => {
4730
4784
  const openState = typeof value === "function" ? value(open) : value;
4731
4785
  if (setOpenProp) {
@@ -4737,10 +4791,10 @@ function SidebarProvider({
4737
4791
  },
4738
4792
  [setOpenProp, open]
4739
4793
  );
4740
- const toggleSidebar = React49.useCallback(() => {
4794
+ const toggleSidebar = React50.useCallback(() => {
4741
4795
  return setOpen((open2) => !open2);
4742
4796
  }, [setOpen]);
4743
- React49.useEffect(() => {
4797
+ React50.useEffect(() => {
4744
4798
  const handleKeyDown = (event) => {
4745
4799
  if (event.key === SIDEBAR_KEYBOARD_SHORTCUT && (event.metaKey || event.ctrlKey)) {
4746
4800
  event.preventDefault();
@@ -4751,7 +4805,7 @@ function SidebarProvider({
4751
4805
  return () => window.removeEventListener("keydown", handleKeyDown);
4752
4806
  }, [toggleSidebar]);
4753
4807
  const state = open ? "expanded" : "collapsed";
4754
- const contextValue = React49.useMemo(
4808
+ const contextValue = React50.useMemo(
4755
4809
  () => ({
4756
4810
  state,
4757
4811
  open,
@@ -5217,7 +5271,7 @@ function SidebarMenuSkeleton({
5217
5271
  showIcon = false,
5218
5272
  ...props
5219
5273
  }) {
5220
- const width = React49.useMemo(() => {
5274
+ const width = React50.useMemo(() => {
5221
5275
  return `${Math.floor(Math.random() * 40) + 50}%`;
5222
5276
  }, []);
5223
5277
  return /* @__PURE__ */ jsxs(
@@ -5336,24 +5390,18 @@ var tableVariants = cva("w-full caption-bottom text-sm", {
5336
5390
  size: "default"
5337
5391
  }
5338
5392
  });
5339
- var Table = React49.forwardRef(({ className, variant, size, wrapperClassName, ...props }, ref) => /* @__PURE__ */ jsx(
5340
- "div",
5393
+ var Table = React50.forwardRef(({ className, variant, size, wrapperClassName, ...props }, ref) => /* @__PURE__ */ jsx("div", { className: cn("relative w-full overflow-auto", wrapperClassName), children: /* @__PURE__ */ jsx(
5394
+ "table",
5341
5395
  {
5342
- className: cn("relative w-full overflow-auto", wrapperClassName),
5343
- children: /* @__PURE__ */ jsx(
5344
- "table",
5345
- {
5346
- ref,
5347
- className: cn(tableVariants({ variant, size, className })),
5348
- ...props
5349
- }
5350
- )
5396
+ ref,
5397
+ className: cn(tableVariants({ variant, size, className })),
5398
+ ...props
5351
5399
  }
5352
- ));
5400
+ ) }));
5353
5401
  Table.displayName = "Table";
5354
- var TableHeader = React49.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("thead", { ref, className: cn("[&_tr]:border-b", className), ...props }));
5402
+ var TableHeader = React50.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("thead", { ref, className: cn("[&_tr]:border-b", className), ...props }));
5355
5403
  TableHeader.displayName = "TableHeader";
5356
- var TableBody = React49.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
5404
+ var TableBody = React50.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
5357
5405
  "tbody",
5358
5406
  {
5359
5407
  ref,
@@ -5362,7 +5410,7 @@ var TableBody = React49.forwardRef(({ className, ...props }, ref) => /* @__PURE_
5362
5410
  }
5363
5411
  ));
5364
5412
  TableBody.displayName = "TableBody";
5365
- var TableFooter = React49.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
5413
+ var TableFooter = React50.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
5366
5414
  "tfoot",
5367
5415
  {
5368
5416
  ref,
@@ -5374,7 +5422,7 @@ var TableFooter = React49.forwardRef(({ className, ...props }, ref) => /* @__PUR
5374
5422
  }
5375
5423
  ));
5376
5424
  TableFooter.displayName = "TableFooter";
5377
- var TableRow = React49.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
5425
+ var TableRow = React50.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
5378
5426
  "tr",
5379
5427
  {
5380
5428
  ref,
@@ -5386,7 +5434,7 @@ var TableRow = React49.forwardRef(({ className, ...props }, ref) => /* @__PURE__
5386
5434
  }
5387
5435
  ));
5388
5436
  TableRow.displayName = "TableRow";
5389
- var TableHead = React49.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
5437
+ var TableHead = React50.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
5390
5438
  "th",
5391
5439
  {
5392
5440
  ref,
@@ -5398,7 +5446,7 @@ var TableHead = React49.forwardRef(({ className, ...props }, ref) => /* @__PURE_
5398
5446
  }
5399
5447
  ));
5400
5448
  TableHead.displayName = "TableHead";
5401
- var TableCell = React49.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
5449
+ var TableCell = React50.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
5402
5450
  "td",
5403
5451
  {
5404
5452
  ref,
@@ -5410,7 +5458,7 @@ var TableCell = React49.forwardRef(({ className, ...props }, ref) => /* @__PURE_
5410
5458
  }
5411
5459
  ));
5412
5460
  TableCell.displayName = "TableCell";
5413
- var TableCaption = React49.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
5461
+ var TableCaption = React50.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
5414
5462
  "caption",
5415
5463
  {
5416
5464
  ref,
@@ -5456,7 +5504,8 @@ var TableBodyComponent = ({
5456
5504
  rowClassName,
5457
5505
  onRowClick,
5458
5506
  getRowExpandable,
5459
- invalidateCache
5507
+ invalidateCache,
5508
+ headers
5460
5509
  }) => {
5461
5510
  const resolveRowClassName = useCallback(
5462
5511
  (record, index) => {
@@ -5497,6 +5546,41 @@ var TableBodyComponent = ({
5497
5546
  }
5498
5547
  return flexRender(cell.column.columnDef.cell, cell.getContext());
5499
5548
  };
5549
+ const { leftOffsets, rightOffsets, lastLeftId, firstRightId } = useMemo(() => {
5550
+ if (!headers || headers.length === 0) {
5551
+ return {
5552
+ leftOffsets: /* @__PURE__ */ new Map(),
5553
+ rightOffsets: /* @__PURE__ */ new Map(),
5554
+ lastLeftId: null,
5555
+ firstRightId: null
5556
+ };
5557
+ }
5558
+ const leftPinned = headers.filter(
5559
+ (h) => h.column.getIsPinned() === "left"
5560
+ );
5561
+ const rightPinned = headers.filter(
5562
+ (h) => h.column.getIsPinned() === "right"
5563
+ );
5564
+ const leftMap = /* @__PURE__ */ new Map();
5565
+ let leftAcc = 0;
5566
+ for (const h of leftPinned) {
5567
+ leftMap.set(h.column.id, leftAcc);
5568
+ leftAcc += h.getSize();
5569
+ }
5570
+ const rightMap = /* @__PURE__ */ new Map();
5571
+ let rightAcc = 0;
5572
+ for (let i = rightPinned.length - 1; i >= 0; i--) {
5573
+ const h = rightPinned[i];
5574
+ rightMap.set(h.column.id, rightAcc);
5575
+ rightAcc += h.getSize();
5576
+ }
5577
+ return {
5578
+ leftOffsets: leftMap,
5579
+ rightOffsets: rightMap,
5580
+ lastLeftId: leftPinned.length > 0 ? leftPinned[leftPinned.length - 1].column.id : null,
5581
+ firstRightId: rightPinned.length > 0 ? rightPinned[0].column.id : null
5582
+ };
5583
+ }, [headers]);
5500
5584
  const renderBaseRow = useCallback(
5501
5585
  (rowData, options = {}) => {
5502
5586
  const { ref, virtualIndex } = options;
@@ -5518,6 +5602,25 @@ var TableBodyComponent = ({
5518
5602
  onClick: () => onRowClick?.(rowData.original, rowData.index),
5519
5603
  children: rowData.getVisibleCells().map((cell) => {
5520
5604
  const meta = cell.column.columnDef.meta;
5605
+ const pinPosition = cell.column.getIsPinned();
5606
+ const pinnedStyle = meta?.width ? { width: meta.width } : {};
5607
+ if (pinPosition === "left") {
5608
+ const offset = leftOffsets.get(cell.column.id);
5609
+ if (offset !== void 0) {
5610
+ pinnedStyle.position = "sticky";
5611
+ pinnedStyle.left = offset;
5612
+ pinnedStyle.zIndex = 5;
5613
+ }
5614
+ } else if (pinPosition === "right") {
5615
+ const offset = rightOffsets.get(cell.column.id);
5616
+ if (offset !== void 0) {
5617
+ pinnedStyle.position = "sticky";
5618
+ pinnedStyle.right = offset;
5619
+ pinnedStyle.zIndex = 5;
5620
+ }
5621
+ }
5622
+ const isLastLeftPinned = cell.column.id === lastLeftId;
5623
+ const isFirstRightPinned = cell.column.id === firstRightId;
5521
5624
  return /* @__PURE__ */ jsx(
5522
5625
  TableCell,
5523
5626
  {
@@ -5525,9 +5628,13 @@ var TableBodyComponent = ({
5525
5628
  meta?.className,
5526
5629
  meta?.align === "center" && "text-center",
5527
5630
  meta?.align === "right" && "text-right",
5528
- meta?.align === "left" && "text-left"
5631
+ meta?.align === "left" && "text-left",
5632
+ // Pinned cell styling
5633
+ pinPosition && "bg-background",
5634
+ isLastLeftPinned && "after:absolute after:right-0 after:top-0 after:bottom-0 after:w-[4px] after:bg-gradient-to-r after:from-black/10 after:to-transparent",
5635
+ isFirstRightPinned && "before:absolute before:left-0 before:top-0 before:bottom-0 before:w-[4px] before:bg-gradient-to-l before:from-black/10 before:to-transparent"
5529
5636
  ),
5530
- style: meta?.width ? { width: meta.width } : void 0,
5637
+ style: Object.keys(pinnedStyle).length > 0 ? pinnedStyle : void 0,
5531
5638
  children: onRenderedRow(cell, virtualIndex)
5532
5639
  },
5533
5640
  cell.id
@@ -5537,7 +5644,14 @@ var TableBodyComponent = ({
5537
5644
  `row-${rowData.index}`
5538
5645
  );
5539
5646
  },
5540
- [onRowClick, resolveRowClassName]
5647
+ [
5648
+ onRowClick,
5649
+ resolveRowClassName,
5650
+ leftOffsets,
5651
+ rightOffsets,
5652
+ lastLeftId,
5653
+ firstRightId
5654
+ ]
5541
5655
  );
5542
5656
  const renderExpandedRow = useCallback(
5543
5657
  (rowData, options = {}) => {
@@ -5641,9 +5755,8 @@ var pinOptions = [
5641
5755
  { value: "right", label: "Pin Right" }
5642
5756
  ];
5643
5757
  var sizingOptions = [
5644
- { value: "single", label: "Autosize This Column" },
5645
- { value: "all", label: "Autosize All Columns" },
5646
- { value: "reset", label: "Reset All Columns" }
5758
+ { value: "reset-single", label: "Reset This Column" },
5759
+ { value: "reset-all", label: "Reset All Columns" }
5647
5760
  ];
5648
5761
  var sortOptions = [
5649
5762
  { value: "asc", label: "Sort Ascending" },
@@ -5654,7 +5767,11 @@ var TableHeaderComponent = ({
5654
5767
  enableColumnOrdering,
5655
5768
  baseColumnOrder,
5656
5769
  setColumnOrder,
5657
- draggedColumnId
5770
+ draggedColumnId,
5771
+ pinnedLeftOffset,
5772
+ pinnedRightOffset,
5773
+ isLastLeftPinned,
5774
+ isFirstRightPinned
5658
5775
  }) => {
5659
5776
  const column = header.column;
5660
5777
  const meta = column.columnDef.meta;
@@ -5725,7 +5842,17 @@ var TableHeaderComponent = ({
5725
5842
  [debouncedFilterChange, filterType]
5726
5843
  );
5727
5844
  const showPopover = column.getCanSort() || column.getCanPin() || column.getCanFilter() || column.getCanResize();
5728
- return /* @__PURE__ */ jsx(
5845
+ const pinnedStyle = meta?.width ? { width: meta.width } : {};
5846
+ if (pinPosition === "left" && pinnedLeftOffset !== void 0) {
5847
+ pinnedStyle.position = "sticky";
5848
+ pinnedStyle.left = pinnedLeftOffset;
5849
+ pinnedStyle.zIndex = 20;
5850
+ } else if (pinPosition === "right" && pinnedRightOffset !== void 0) {
5851
+ pinnedStyle.position = "sticky";
5852
+ pinnedStyle.right = pinnedRightOffset;
5853
+ pinnedStyle.zIndex = 20;
5854
+ }
5855
+ return /* @__PURE__ */ jsxs(
5729
5856
  TableHead,
5730
5857
  {
5731
5858
  className: cn(
@@ -5734,157 +5861,212 @@ var TableHeaderComponent = ({
5734
5861
  meta?.align === "right" && "text-right",
5735
5862
  meta?.align === "left" && "text-left",
5736
5863
  column.getCanSort() && "select-none",
5737
- "bg-mvn-gray-100 text-foreground sticky top-0 z-10"
5864
+ "bg-mvn-gray-100 text-foreground sticky top-0 z-10",
5865
+ // Pinned column styling
5866
+ pinPosition && "bg-background",
5867
+ isLastLeftPinned && "after:absolute after:right-0 after:top-0 after:bottom-0 after:w-[4px] after:bg-gradient-to-r after:from-black/10 after:to-transparent",
5868
+ isFirstRightPinned && "before:absolute before:left-0 before:top-0 before:bottom-0 before:w-[4px] before:bg-gradient-to-l before:from-black/10 before:to-transparent"
5738
5869
  ),
5739
- style: meta?.width ? { width: meta.width } : void 0,
5740
- children: /* @__PURE__ */ jsxs(
5741
- "div",
5742
- {
5743
- className: cn(
5744
- "flex items-center w-full",
5745
- meta?.align === "center" && "justify-center",
5746
- meta?.align === "right" && "justify-end",
5747
- meta?.align === "left" && "justify-start",
5748
- column.getCanSort() && "cursor-pointer"
5749
- ),
5750
- draggable: isReorderTable,
5751
- onDragStart: (event) => {
5752
- if (!isReorderTable) return;
5753
- event.dataTransfer.effectAllowed = "move";
5754
- draggedColumnId.current = column.id;
5755
- },
5756
- onDragEnd: () => {
5757
- draggedColumnId.current = null;
5758
- },
5759
- onDragOver: (event) => {
5760
- if (!isReorderTable || !draggedColumnId.current || draggedColumnId.current === column.id) {
5761
- return;
5762
- }
5763
- event.preventDefault();
5764
- event.dataTransfer.dropEffect = "move";
5765
- },
5766
- onDrop: (event) => {
5767
- if (!isReorderTable) return;
5768
- event.preventDefault();
5769
- handleColumnDrop(column.id);
5770
- },
5771
- children: [
5772
- /* @__PURE__ */ jsx("div", { className: "flex gap-2 text-[16px] font-medium", children: flexRender(column.columnDef.header, header.getContext()) }),
5773
- !column.id.startsWith("_mvn_") && showPopover && /* @__PURE__ */ jsx(
5774
- "span",
5775
- {
5776
- onClick: (event) => event.stopPropagation(),
5777
- className: "ml-auto",
5778
- children: /* @__PURE__ */ jsxs(Popover, { children: [
5779
- /* @__PURE__ */ jsx(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsx(TextAlignJustify, { className: "p-1 h-6 w-6" }) }),
5780
- /* @__PURE__ */ jsx(PopoverContent, { side: "bottom", children: /* @__PURE__ */ jsxs(Tabs, { defaultValue: "size", children: [
5781
- /* @__PURE__ */ jsxs(TabsList, { children: [
5782
- column.getCanResize() && /* @__PURE__ */ jsx(TabsTrigger, { value: "size", children: /* @__PURE__ */ jsx(Scaling, { className: "p-1 h-6 w-6" }) }),
5783
- column.getCanSort() && /* @__PURE__ */ jsx(TabsTrigger, { value: "sort", children: /* @__PURE__ */ jsx(Scaling, { className: "p-1 h-6 w-6" }) }),
5784
- column.getCanPin() && /* @__PURE__ */ jsx(TabsTrigger, { value: "pin", children: /* @__PURE__ */ jsx(Pin, { className: "p-1 h-6 w-6" }) }),
5785
- column.getCanFilter() && /* @__PURE__ */ jsx(TabsTrigger, { value: "filter", children: /* @__PURE__ */ jsx(ListFilter, { className: "p-1 h-6 w-6" }) })
5786
- ] }),
5787
- column.getCanResize() && /* @__PURE__ */ jsx(TabsContent, { value: "size", children: /* @__PURE__ */ jsx(Command, { className: "h-auto", children: /* @__PURE__ */ jsx(CommandList, { children: /* @__PURE__ */ jsx(CommandGroup, { children: sizingOptions.map((option) => /* @__PURE__ */ jsx(
5788
- CommandItem,
5789
- {
5790
- value: option.value,
5791
- onSelect: () => {
5792
- },
5793
- children: option.label
5794
- },
5795
- option.value
5796
- )) }) }) }) }),
5797
- column.getCanSort() && /* @__PURE__ */ jsx(TabsContent, { value: "sort", children: /* @__PURE__ */ jsx(Command, { className: "h-auto", children: /* @__PURE__ */ jsx(CommandList, { children: /* @__PURE__ */ jsx(CommandGroup, { children: sortOptions.map((option) => /* @__PURE__ */ jsxs(
5798
- CommandItem,
5799
- {
5800
- value: option.value,
5801
- onSelect: () => {
5802
- if (option.value === sortDirection) {
5803
- column.clearSorting();
5804
- return;
5870
+ style: pinnedStyle,
5871
+ children: [
5872
+ /* @__PURE__ */ jsxs(
5873
+ "div",
5874
+ {
5875
+ className: cn(
5876
+ "flex items-center w-full",
5877
+ meta?.align === "center" && "justify-center",
5878
+ meta?.align === "right" && "justify-end",
5879
+ meta?.align === "left" && "justify-start",
5880
+ column.getCanSort() && "cursor-pointer"
5881
+ ),
5882
+ draggable: isReorderTable,
5883
+ onDragStart: (event) => {
5884
+ if (!isReorderTable) return;
5885
+ event.dataTransfer.effectAllowed = "move";
5886
+ draggedColumnId.current = column.id;
5887
+ },
5888
+ onDragEnd: () => {
5889
+ draggedColumnId.current = null;
5890
+ },
5891
+ onDragOver: (event) => {
5892
+ if (!isReorderTable || !draggedColumnId.current || draggedColumnId.current === column.id) {
5893
+ return;
5894
+ }
5895
+ event.preventDefault();
5896
+ event.dataTransfer.dropEffect = "move";
5897
+ },
5898
+ onDrop: (event) => {
5899
+ if (!isReorderTable) return;
5900
+ event.preventDefault();
5901
+ handleColumnDrop(column.id);
5902
+ },
5903
+ children: [
5904
+ /* @__PURE__ */ jsx("div", { className: "flex gap-2 text-[16px] font-medium", children: flexRender(column.columnDef.header, header.getContext()) }),
5905
+ !column.id.startsWith("_mvn_") && showPopover && /* @__PURE__ */ jsx(
5906
+ "span",
5907
+ {
5908
+ onClick: (event) => event.stopPropagation(),
5909
+ className: "ml-auto",
5910
+ children: /* @__PURE__ */ jsxs(Popover, { children: [
5911
+ /* @__PURE__ */ jsx(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsx(TextAlignJustify, { className: "p-1 h-6 w-6" }) }),
5912
+ /* @__PURE__ */ jsx(PopoverContent, { side: "bottom", children: /* @__PURE__ */ jsxs(Tabs, { defaultValue: "size", children: [
5913
+ /* @__PURE__ */ jsxs(TabsList, { children: [
5914
+ column.getCanResize() && /* @__PURE__ */ jsx(
5915
+ TabsTrigger,
5916
+ {
5917
+ value: "size",
5918
+ className: "data-[orientation=horizontal]:p-2",
5919
+ children: /* @__PURE__ */ jsx(Scaling, { className: "p-1 h-6 w-6" })
5805
5920
  }
5806
- column.toggleSorting(option.value === "desc");
5807
- },
5808
- children: [
5809
- option.label,
5810
- /* @__PURE__ */ jsx(
5811
- CheckIcon,
5812
- {
5813
- className: cn(
5814
- "ml-auto h-4 w-4",
5815
- sortDirection === option.value ? "opacity-100" : "opacity-0"
5816
- )
5817
- }
5818
- )
5819
- ]
5820
- },
5821
- option.value
5822
- )) }) }) }) }),
5823
- column.getCanPin() && /* @__PURE__ */ jsx(TabsContent, { value: "pin", children: /* @__PURE__ */ jsx(Command, { className: "h-auto", children: /* @__PURE__ */ jsx(CommandList, { children: /* @__PURE__ */ jsx(CommandGroup, { children: pinOptions.map((option) => /* @__PURE__ */ jsxs(
5824
- CommandItem,
5825
- {
5826
- value: option.value,
5827
- onSelect: () => {
5828
- if (option.value === pinPosition) {
5829
- column.pin(false);
5830
- return;
5921
+ ),
5922
+ column.getCanSort() && /* @__PURE__ */ jsx(
5923
+ TabsTrigger,
5924
+ {
5925
+ value: "sort",
5926
+ className: "data-[orientation=horizontal]:p-2",
5927
+ children: /* @__PURE__ */ jsx(Scaling, { className: "p-1 h-6 w-6" })
5831
5928
  }
5832
- if (option.value === "left" || option.value === "right") {
5833
- column.pin(option.value);
5929
+ ),
5930
+ column.getCanPin() && /* @__PURE__ */ jsx(
5931
+ TabsTrigger,
5932
+ {
5933
+ value: "pin",
5934
+ className: "data-[orientation=horizontal]:p-2",
5935
+ children: /* @__PURE__ */ jsx(Pin, { className: "p-1 h-6 w-6" })
5834
5936
  }
5835
- },
5836
- children: [
5837
- option.label,
5838
- /* @__PURE__ */ jsx(
5839
- CheckIcon,
5840
- {
5841
- className: cn(
5842
- "ml-auto h-4 w-4",
5843
- pinPosition === option.value ? "opacity-100" : "opacity-0"
5844
- )
5937
+ ),
5938
+ column.getCanFilter() && /* @__PURE__ */ jsx(
5939
+ TabsTrigger,
5940
+ {
5941
+ value: "filter",
5942
+ className: "data-[orientation=horizontal]:p-2",
5943
+ children: /* @__PURE__ */ jsx(ListFilter, { className: "p-1 h-6 w-6" })
5944
+ }
5945
+ )
5946
+ ] }),
5947
+ column.getCanResize() && /* @__PURE__ */ jsx(TabsContent, { value: "size", className: "mt-2", children: /* @__PURE__ */ jsx(Command, { className: "h-auto", children: /* @__PURE__ */ jsx(CommandList, { children: /* @__PURE__ */ jsx(CommandGroup, { children: sizingOptions.map((option) => /* @__PURE__ */ jsx(
5948
+ CommandItem,
5949
+ {
5950
+ value: option.value,
5951
+ onSelect: () => {
5952
+ if (option.value === "reset-single") {
5953
+ column.resetSize();
5954
+ } else if (option.value === "reset-all") {
5955
+ header.getContext().table.resetColumnSizing();
5845
5956
  }
5846
- )
5847
- ]
5848
- },
5849
- option.value
5850
- )) }) }) }) }),
5851
- column.getCanFilter() && /* @__PURE__ */ jsxs(TabsContent, { value: "filter", children: [
5852
- /* @__PURE__ */ jsxs(
5853
- Select,
5957
+ },
5958
+ children: option.label
5959
+ },
5960
+ option.value
5961
+ )) }) }) }) }),
5962
+ column.getCanSort() && /* @__PURE__ */ jsx(TabsContent, { value: "sort", className: "mt-2", children: /* @__PURE__ */ jsx(Command, { className: "h-auto", children: /* @__PURE__ */ jsx(CommandList, { children: /* @__PURE__ */ jsx(CommandGroup, { children: sortOptions.map((option) => /* @__PURE__ */ jsxs(
5963
+ CommandItem,
5854
5964
  {
5855
- value: filterType,
5856
- onValueChange: (selected) => {
5857
- if (debounceTimeoutRef.current !== null) {
5858
- window.clearTimeout(debounceTimeoutRef.current);
5859
- debounceTimeoutRef.current = null;
5965
+ value: option.value,
5966
+ onSelect: () => {
5967
+ if (option.value === sortDirection) {
5968
+ column.clearSorting();
5969
+ return;
5860
5970
  }
5861
- handleFilterChange(selected, inputValue);
5971
+ column.toggleSorting(option.value === "desc");
5862
5972
  },
5863
5973
  children: [
5864
- /* @__PURE__ */ jsx(SelectTrigger, { className: "mb-4", children: /* @__PURE__ */ jsx(SelectValue, {}) }),
5865
- /* @__PURE__ */ jsx(SelectContent, { children: TableFilterOptions.map((option) => /* @__PURE__ */ jsx(SelectItem, { value: option.value, children: option.label }, option.value)) })
5974
+ option.label,
5975
+ /* @__PURE__ */ jsx(
5976
+ CheckIcon,
5977
+ {
5978
+ className: cn(
5979
+ "ml-auto h-4 w-4",
5980
+ sortDirection === option.value ? "opacity-100" : "opacity-0"
5981
+ )
5982
+ }
5983
+ )
5866
5984
  ]
5867
- }
5868
- ),
5869
- /* @__PURE__ */ jsx(
5870
- Input,
5985
+ },
5986
+ option.value
5987
+ )) }) }) }) }),
5988
+ column.getCanPin() && /* @__PURE__ */ jsx(TabsContent, { value: "pin", className: "mt-2", children: /* @__PURE__ */ jsx(Command, { className: "h-auto", children: /* @__PURE__ */ jsx(CommandList, { children: /* @__PURE__ */ jsx(CommandGroup, { children: pinOptions.map((option) => /* @__PURE__ */ jsxs(
5989
+ CommandItem,
5871
5990
  {
5872
- leftIcon: /* @__PURE__ */ jsx(SearchIcon, {}),
5873
- value: inputValue,
5874
- onChange: handleInputChange,
5875
- clearable: true,
5876
- onClear: () => column.setFilterValue({ filterType, value: "" }),
5877
- placeholder: meta?.filterPlaceholder ?? "Filter\u2026"
5878
- }
5879
- )
5880
- ] })
5881
- ] }) })
5882
- ] })
5883
- }
5884
- )
5885
- ]
5886
- }
5887
- )
5991
+ value: option.value,
5992
+ onSelect: () => {
5993
+ if (option.value === pinPosition) {
5994
+ column.pin(false);
5995
+ return;
5996
+ }
5997
+ if (option.value === "left" || option.value === "right") {
5998
+ column.pin(option.value);
5999
+ }
6000
+ },
6001
+ children: [
6002
+ option.label,
6003
+ /* @__PURE__ */ jsx(
6004
+ CheckIcon,
6005
+ {
6006
+ className: cn(
6007
+ "ml-auto h-4 w-4",
6008
+ pinPosition === option.value ? "opacity-100" : "opacity-0"
6009
+ )
6010
+ }
6011
+ )
6012
+ ]
6013
+ },
6014
+ option.value
6015
+ )) }) }) }) }),
6016
+ column.getCanFilter() && /* @__PURE__ */ jsxs(TabsContent, { value: "filter", className: "mt-2", children: [
6017
+ /* @__PURE__ */ jsxs(
6018
+ Select,
6019
+ {
6020
+ value: filterType,
6021
+ onValueChange: (selected) => {
6022
+ if (debounceTimeoutRef.current !== null) {
6023
+ window.clearTimeout(debounceTimeoutRef.current);
6024
+ debounceTimeoutRef.current = null;
6025
+ }
6026
+ handleFilterChange(selected, inputValue);
6027
+ },
6028
+ children: [
6029
+ /* @__PURE__ */ jsx(SelectTrigger, { className: "mb-4", children: /* @__PURE__ */ jsx(SelectValue, {}) }),
6030
+ /* @__PURE__ */ jsx(SelectContent, { children: TableFilterOptions.map((option) => /* @__PURE__ */ jsx(SelectItem, { value: option.value, children: option.label }, option.value)) })
6031
+ ]
6032
+ }
6033
+ ),
6034
+ /* @__PURE__ */ jsx(
6035
+ Input,
6036
+ {
6037
+ leftIcon: /* @__PURE__ */ jsx(SearchIcon, {}),
6038
+ value: inputValue,
6039
+ onChange: handleInputChange,
6040
+ clearable: true,
6041
+ onClear: () => column.setFilterValue({ filterType, value: "" }),
6042
+ placeholder: meta?.filterPlaceholder ?? "Filter\u2026"
6043
+ }
6044
+ )
6045
+ ] })
6046
+ ] }) })
6047
+ ] })
6048
+ }
6049
+ )
6050
+ ]
6051
+ }
6052
+ ),
6053
+ column.getCanResize() && /* @__PURE__ */ jsx(
6054
+ "div",
6055
+ {
6056
+ onMouseDown: header.getResizeHandler(),
6057
+ onTouchStart: header.getResizeHandler(),
6058
+ onDoubleClick: () => header.column.resetSize(),
6059
+ className: cn(
6060
+ "absolute right-0 top-0 h-full w-1 cursor-col-resize select-none touch-none",
6061
+ "hover:bg-primary/50 active:bg-primary",
6062
+ header.column.getIsResizing() && "bg-primary"
6063
+ ),
6064
+ style: {
6065
+ transform: "translateX(50%)"
6066
+ }
6067
+ }
6068
+ )
6069
+ ]
5888
6070
  },
5889
6071
  header.id
5890
6072
  );
@@ -5900,6 +6082,46 @@ var TableToolbarComponent = ({
5900
6082
  customizeToolbar
5901
6083
  }) => {
5902
6084
  const toolbarVisible = enableExport || customizeToolbar || enableGlobalFilter;
6085
+ const [inputValue, setInputValue] = useState(globalFilter);
6086
+ const debounceTimeoutRef = useRef(null);
6087
+ useEffect(() => {
6088
+ setInputValue(globalFilter);
6089
+ }, [globalFilter]);
6090
+ useEffect(() => {
6091
+ return () => {
6092
+ if (debounceTimeoutRef.current !== null) {
6093
+ window.clearTimeout(debounceTimeoutRef.current);
6094
+ }
6095
+ };
6096
+ }, []);
6097
+ const debouncedSetGlobalFilter = useCallback(
6098
+ (nextValue) => {
6099
+ if (debounceTimeoutRef.current !== null) {
6100
+ window.clearTimeout(debounceTimeoutRef.current);
6101
+ }
6102
+ debounceTimeoutRef.current = window.setTimeout(() => {
6103
+ setGlobalFilter(nextValue);
6104
+ debounceTimeoutRef.current = null;
6105
+ }, 300);
6106
+ },
6107
+ [setGlobalFilter]
6108
+ );
6109
+ const handleInputChange = useCallback(
6110
+ (event) => {
6111
+ const nextValue = event.target.value;
6112
+ setInputValue(nextValue);
6113
+ debouncedSetGlobalFilter(nextValue);
6114
+ },
6115
+ [debouncedSetGlobalFilter]
6116
+ );
6117
+ const handleClear = useCallback(() => {
6118
+ if (debounceTimeoutRef.current !== null) {
6119
+ window.clearTimeout(debounceTimeoutRef.current);
6120
+ debounceTimeoutRef.current = null;
6121
+ }
6122
+ setInputValue("");
6123
+ setGlobalFilter("");
6124
+ }, [setGlobalFilter]);
5903
6125
  return /* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
5904
6126
  toolbarVisible && /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
5905
6127
  enableExport && /* @__PURE__ */ jsx(
@@ -5917,9 +6139,10 @@ var TableToolbarComponent = ({
5917
6139
  Input,
5918
6140
  {
5919
6141
  leftIcon: /* @__PURE__ */ jsx(SearchIcon, {}),
5920
- value: globalFilter,
5921
- onChange: (event) => setGlobalFilter(event.target.value),
6142
+ value: inputValue,
6143
+ onChange: handleInputChange,
5922
6144
  clearable: true,
6145
+ onClear: handleClear,
5923
6146
  placeholder: globalFilterPlaceholder
5924
6147
  }
5925
6148
  )
@@ -6017,7 +6240,10 @@ function useTableCore({
6017
6240
  manualSorting,
6018
6241
  onFilterChange,
6019
6242
  getCheckboxProps,
6020
- selectedRowKey
6243
+ selectedRowKey,
6244
+ defaultColumnPinning,
6245
+ enableColumnResizing = false,
6246
+ columnResizeMode = "onChange"
6021
6247
  }) {
6022
6248
  const [sorting, setSorting] = useState(
6023
6249
  sortBy ? [{ id: sortBy, desc: sortDirection === "desc" }] : []
@@ -6031,8 +6257,8 @@ function useTableCore({
6031
6257
  pageSize
6032
6258
  });
6033
6259
  const [columnPinning, setColumnPinning] = useState({
6034
- left: [],
6035
- right: []
6260
+ left: defaultColumnPinning?.left ?? [],
6261
+ right: defaultColumnPinning?.right ?? []
6036
6262
  });
6037
6263
  const dataLength = data.length;
6038
6264
  const enableColumnFilters = useMemo(() => {
@@ -6292,6 +6518,8 @@ function useTableCore({
6292
6518
  columns: columnDefs,
6293
6519
  manualFiltering,
6294
6520
  manualSorting,
6521
+ enableColumnResizing,
6522
+ columnResizeMode,
6295
6523
  state: {
6296
6524
  sorting,
6297
6525
  columnFilters,
@@ -6408,6 +6636,8 @@ function useTableVirtualization({
6408
6636
  });
6409
6637
  return arr;
6410
6638
  }, [rows, expandable]);
6639
+ const virtualRowPointersRef = useRef(virtualRowPointers);
6640
+ virtualRowPointersRef.current = virtualRowPointers;
6411
6641
  const cacheBackingRef = useRef(
6412
6642
  /* @__PURE__ */ new Map()
6413
6643
  );
@@ -6441,6 +6671,12 @@ function useTableVirtualization({
6441
6671
  null
6442
6672
  );
6443
6673
  const measurementIdleRef = useRef(null);
6674
+ const prefixSumCacheRef = useRef({
6675
+ count: 0,
6676
+ itemSizes: [],
6677
+ offsets: [],
6678
+ totalSize: 0
6679
+ });
6444
6680
  const cleanupRaf = useCallback(() => {
6445
6681
  if (debounceTimeoutRef.current != null) {
6446
6682
  clearTimeout(debounceTimeoutRef.current);
@@ -6465,10 +6701,16 @@ function useTableVirtualization({
6465
6701
  measurementIdleRef.current = null;
6466
6702
  }
6467
6703
  measurementQueueRef.current.clear();
6704
+ prefixSumCacheRef.current = {
6705
+ count: 0,
6706
+ itemSizes: [],
6707
+ offsets: [],
6708
+ totalSize: 0
6709
+ };
6468
6710
  }, []);
6469
6711
  const estimateSize = useCallback(
6470
6712
  (index) => {
6471
- const item = virtualRowPointers[index];
6713
+ const item = virtualRowPointersRef.current[index];
6472
6714
  if (!item) return baseRowEstimateSize;
6473
6715
  const key = item.key;
6474
6716
  if (item.kind === "expanded" && !rows[item.rowIndex]?.getIsExpanded()) {
@@ -6481,21 +6723,23 @@ function useTableVirtualization({
6481
6723
  if (cached != null) return cached;
6482
6724
  return item.kind === "expanded" ? expandContentEstimateSize : baseRowEstimateSize;
6483
6725
  },
6484
- [virtualRowPointers, baseRowEstimateSize, expandContentEstimateSize]
6726
+ [baseRowEstimateSize, expandContentEstimateSize]
6485
6727
  );
6486
6728
  const recomputeVirtualWindow = useCallback(() => {
6487
6729
  if (!shouldVirtualize) {
6488
6730
  setVirtualWindow(EMPTY_WINDOW);
6489
6731
  return;
6490
6732
  }
6733
+ const pointers = virtualRowPointersRef.current;
6491
6734
  const nextWindow = computeVirtualizedRows({
6492
- count: virtualRowPointers.length,
6735
+ count: pointers.length,
6493
6736
  getScrollElement: () => tableContainerRef.current,
6494
6737
  estimateSize,
6495
6738
  overScan,
6496
6739
  cache: cacheRef.current,
6497
6740
  heightCacheByKey: heightCacheByKeyRef.current,
6498
- getItemKey: (index) => virtualRowPointers[index]?.key ?? ""
6741
+ getItemKey: (index) => pointers[index]?.key ?? "",
6742
+ prefixSumCache: prefixSumCacheRef.current
6499
6743
  });
6500
6744
  setVirtualWindow(nextWindow);
6501
6745
  }, [estimateSize, overScan]);
@@ -6528,7 +6772,7 @@ function useTableVirtualization({
6528
6772
  const { startIndex, endIndex } = virtualWindowRef.current;
6529
6773
  if (index < startIndex || index > endIndex) return;
6530
6774
  }
6531
- const item = virtualRowPointers[index];
6775
+ const item = virtualRowPointersRef.current[index];
6532
6776
  if (!item) return;
6533
6777
  if (!Number.isFinite(height)) return;
6534
6778
  const size = normalizeVirtualSize(height);
@@ -6582,7 +6826,7 @@ function useTableVirtualization({
6582
6826
  const { startIndex, endIndex } = virtualWindowRef.current;
6583
6827
  if (index < startIndex || index > endIndex) return;
6584
6828
  }
6585
- const item = virtualRowPointers[index];
6829
+ const item = virtualRowPointersRef.current[index];
6586
6830
  const key = item?.key;
6587
6831
  if (key != null && heightCacheByKeyRef.current.has(key) || heightCacheByIndexRef.current.has(index)) {
6588
6832
  return;
@@ -6602,7 +6846,7 @@ function useTableVirtualization({
6602
6846
  return;
6603
6847
  }
6604
6848
  cacheRef.current.forEach((index, _, key) => {
6605
- if (index >= virtualRowPointers.length) {
6849
+ if (index >= virtualRowPointersRef.current.length) {
6606
6850
  cacheRef.current.remove(index);
6607
6851
  heightCacheByIndexRef.current.delete(index);
6608
6852
  if (key != null) heightCacheByKeyRef.current.delete(key);
@@ -6692,7 +6936,8 @@ var computeVirtualizedRows = (config) => {
6692
6936
  cache,
6693
6937
  getItemKey,
6694
6938
  getHorizontalScrollElement,
6695
- heightCacheByKey
6939
+ heightCacheByKey,
6940
+ prefixSumCache
6696
6941
  } = config;
6697
6942
  if (count <= 0) return EMPTY_WINDOW;
6698
6943
  const scrollElement = getScrollElement() ?? null;
@@ -6706,24 +6951,60 @@ var computeVirtualizedRows = (config) => {
6706
6951
  Math.max(rawHorizontalScrollOffset, 0),
6707
6952
  horizontalTotalSize - horizontalViewportSize
6708
6953
  ) : Math.max(rawHorizontalScrollOffset, 0);
6709
- const itemSizes = new Array(count);
6710
- const offsets = new Array(count);
6711
- let totalSize = 0;
6712
- for (let index = 0; index < count; index++) {
6713
- offsets[index] = totalSize;
6714
- const key = getItemKey(index);
6715
- let size = cache.get(index);
6716
- if (size == null && key != null) {
6717
- size = heightCacheByKey.get(key);
6718
- }
6719
- if (size == null) {
6720
- const estimate = estimateSize(index);
6721
- size = normalizeVirtualSize(estimate);
6722
- } else {
6723
- size = normalizeVirtualSize(size);
6954
+ let itemSizes;
6955
+ let offsets;
6956
+ let totalSize;
6957
+ const cachedCount = prefixSumCache?.count ?? 0;
6958
+ if (prefixSumCache && cachedCount > 0 && count >= cachedCount) {
6959
+ itemSizes = prefixSumCache.itemSizes.slice(0, cachedCount);
6960
+ offsets = prefixSumCache.offsets.slice(0, cachedCount);
6961
+ totalSize = prefixSumCache.totalSize;
6962
+ if (count > cachedCount) {
6963
+ itemSizes.length = count;
6964
+ offsets.length = count;
6965
+ for (let index = cachedCount; index < count; index++) {
6966
+ offsets[index] = totalSize;
6967
+ const key = getItemKey(index);
6968
+ let size = cache.get(index);
6969
+ if (size == null && key != null) {
6970
+ size = heightCacheByKey.get(key);
6971
+ }
6972
+ if (size == null) {
6973
+ const estimate = estimateSize(index);
6974
+ size = normalizeVirtualSize(estimate);
6975
+ } else {
6976
+ size = normalizeVirtualSize(size);
6977
+ }
6978
+ itemSizes[index] = size;
6979
+ totalSize += size;
6980
+ }
6724
6981
  }
6725
- itemSizes[index] = size;
6726
- totalSize += size;
6982
+ } else {
6983
+ itemSizes = new Array(count);
6984
+ offsets = new Array(count);
6985
+ totalSize = 0;
6986
+ for (let index = 0; index < count; index++) {
6987
+ offsets[index] = totalSize;
6988
+ const key = getItemKey(index);
6989
+ let size = cache.get(index);
6990
+ if (size == null && key != null) {
6991
+ size = heightCacheByKey.get(key);
6992
+ }
6993
+ if (size == null) {
6994
+ const estimate = estimateSize(index);
6995
+ size = normalizeVirtualSize(estimate);
6996
+ } else {
6997
+ size = normalizeVirtualSize(size);
6998
+ }
6999
+ itemSizes[index] = size;
7000
+ totalSize += size;
7001
+ }
7002
+ }
7003
+ if (prefixSumCache) {
7004
+ prefixSumCache.count = count;
7005
+ prefixSumCache.itemSizes = itemSizes;
7006
+ prefixSumCache.offsets = offsets;
7007
+ prefixSumCache.totalSize = totalSize;
6727
7008
  }
6728
7009
  const viewportActive = clientHeight > 0;
6729
7010
  const scrollOffset = viewportActive ? Math.min(scrollTop, Math.max(totalSize - clientHeight, 0)) : 0;
@@ -6731,19 +7012,28 @@ var computeVirtualizedRows = (config) => {
6731
7012
  let visibleStartIndex = 0;
6732
7013
  let visibleEndIndex = 0;
6733
7014
  if (viewportActive && totalSize > 0) {
6734
- for (let index = 0; index < count; index++) {
6735
- if (offsets[index] + itemSizes[index] > scrollOffset) {
6736
- visibleStartIndex = index;
6737
- break;
7015
+ let low = 0;
7016
+ let high = count - 1;
7017
+ while (low < high) {
7018
+ const mid = Math.floor((low + high) / 2);
7019
+ if (offsets[mid] + itemSizes[mid] > scrollOffset) {
7020
+ high = mid;
7021
+ } else {
7022
+ low = mid + 1;
6738
7023
  }
6739
7024
  }
6740
- for (let index = visibleStartIndex; index < count; index++) {
6741
- if (offsets[index] >= viewportLimit) {
6742
- visibleEndIndex = Math.max(visibleStartIndex, index - 1);
6743
- break;
7025
+ visibleStartIndex = low;
7026
+ low = visibleStartIndex;
7027
+ high = count - 1;
7028
+ while (low < high) {
7029
+ const mid = Math.ceil((low + high) / 2);
7030
+ if (offsets[mid] >= viewportLimit) {
7031
+ high = mid - 1;
7032
+ } else {
7033
+ low = mid;
6744
7034
  }
6745
- visibleEndIndex = index;
6746
7035
  }
7036
+ visibleEndIndex = Math.max(visibleStartIndex, low);
6747
7037
  }
6748
7038
  const overScanCount = Math.max(0, Math.ceil(overScan));
6749
7039
  const startIndex = Math.max(0, visibleStartIndex - overScanCount);
@@ -6805,7 +7095,7 @@ function SimpleTable({
6805
7095
  getRowExpandable,
6806
7096
  onExpandedChange,
6807
7097
  onLazyScrollLoad,
6808
- scrollLoadThreshold = 5,
7098
+ scrollLoadThreshold = 42,
6809
7099
  numberOfPageButtons = 5,
6810
7100
  onClickExport,
6811
7101
  baseRowEstimateSize = 42,
@@ -6823,7 +7113,8 @@ function SimpleTable({
6823
7113
  maxRecords,
6824
7114
  loadingText,
6825
7115
  pagingPosition = "right",
6826
- recordPerChunk = 100
7116
+ recordPerChunk = 100,
7117
+ defaultColumnPinning
6827
7118
  }) {
6828
7119
  const [internalLazyLoading, setInternalLazyLoading] = useState(false);
6829
7120
  const pendingLazyLoad = useRef(false);
@@ -6866,7 +7157,8 @@ function SimpleTable({
6866
7157
  numberOfPageButtons,
6867
7158
  manualSorting,
6868
7159
  manualFiltering,
6869
- onFilterChange
7160
+ onFilterChange,
7161
+ defaultColumnPinning
6870
7162
  });
6871
7163
  const handleLazyLoad = useCallback(async () => {
6872
7164
  if (!onLazyScrollLoad || pendingLazyLoad.current || resolvedLoading) return;
@@ -6890,9 +7182,13 @@ function SimpleTable({
6890
7182
  if (typeof maxRecords === "number" && data.length >= maxRecords) return;
6891
7183
  void handleLazyLoad();
6892
7184
  }, [recordPerChunk, data.length, handleLazyLoad, chunkCount, maxRecords]);
7185
+ const onLoadChunkRef = useRef(onLoadChunk);
7186
+ useEffect(() => {
7187
+ onLoadChunkRef.current = onLoadChunk;
7188
+ }, [onLoadChunk]);
6893
7189
  const rows = useMemo(
6894
7190
  () => table.getRowModel().rows,
6895
- [paginationState, sorting, columnFilters]
7191
+ [paginationState, sorting, columnFilters, globalFilter]
6896
7192
  );
6897
7193
  const splittedRows = useMemo(
6898
7194
  () => rows.slice(0, chunkCount),
@@ -6931,7 +7227,7 @@ function SimpleTable({
6931
7227
  rafRef.current = null;
6932
7228
  const { scrollTop, scrollHeight, clientHeight } = container;
6933
7229
  if (scrollHeight - (scrollTop + clientHeight) <= scrollLoadThreshold && scrollTop !== 0 && scrollHeight > clientHeight) {
6934
- onLoadChunk();
7230
+ onLoadChunkRef.current();
6935
7231
  }
6936
7232
  });
6937
7233
  };
@@ -6944,7 +7240,7 @@ function SimpleTable({
6944
7240
  rafRef.current = null;
6945
7241
  }
6946
7242
  };
6947
- }, [scrollLoadThreshold, onLoadChunk]);
7243
+ }, [scrollLoadThreshold, virtualizationActive]);
6948
7244
  useEffect(() => {
6949
7245
  if (virtualizationActive) return;
6950
7246
  if (table.getState().pagination.pageIndex === 0) {
@@ -6953,24 +7249,51 @@ function SimpleTable({
6953
7249
  }, [virtualizationActive]);
6954
7250
  useEffect(() => {
6955
7251
  if (!virtualItems.length || !virtualizationActive) return;
6956
- const scheduleCheck = () => {
6957
- if (rafRef.current != null) return;
6958
- rafRef.current = requestAnimationFrame(() => {
6959
- rafRef.current = null;
6960
- if (paddingBottom <= scrollLoadThreshold) {
6961
- onLoadChunk();
6962
- }
6963
- });
6964
- };
6965
- scheduleCheck();
6966
- return () => {
6967
- if (rafRef.current != null) {
6968
- cancelAnimationFrame(rafRef.current);
6969
- rafRef.current = null;
6970
- }
6971
- };
6972
- }, [paddingBottom]);
7252
+ if (paddingBottom <= scrollLoadThreshold) {
7253
+ onLoadChunkRef.current();
7254
+ }
7255
+ }, [paddingBottom, scrollLoadThreshold, virtualizationActive]);
6973
7256
  const columnCount = table.getAllLeafColumns().length;
7257
+ const allHeaders = useMemo(() => {
7258
+ const groups = table.getHeaderGroups();
7259
+ if (groups.length === 0) return [];
7260
+ return groups[0].headers;
7261
+ }, [table]);
7262
+ const { leftOffsets, rightOffsets, lastLeftId, firstRightId } = useMemo(() => {
7263
+ if (!allHeaders || allHeaders.length === 0) {
7264
+ return {
7265
+ leftOffsets: /* @__PURE__ */ new Map(),
7266
+ rightOffsets: /* @__PURE__ */ new Map(),
7267
+ lastLeftId: null,
7268
+ firstRightId: null
7269
+ };
7270
+ }
7271
+ const leftPinned = allHeaders.filter(
7272
+ (h) => h.column.getIsPinned() === "left"
7273
+ );
7274
+ const rightPinned = allHeaders.filter(
7275
+ (h) => h.column.getIsPinned() === "right"
7276
+ );
7277
+ const leftMap = /* @__PURE__ */ new Map();
7278
+ let leftAcc = 0;
7279
+ for (const h of leftPinned) {
7280
+ leftMap.set(h.column.id, leftAcc);
7281
+ leftAcc += h.getSize();
7282
+ }
7283
+ const rightMap = /* @__PURE__ */ new Map();
7284
+ let rightAcc = 0;
7285
+ for (let i = rightPinned.length - 1; i >= 0; i--) {
7286
+ const h = rightPinned[i];
7287
+ rightMap.set(h.column.id, rightAcc);
7288
+ rightAcc += h.getSize();
7289
+ }
7290
+ return {
7291
+ leftOffsets: leftMap,
7292
+ rightOffsets: rightMap,
7293
+ lastLeftId: leftPinned.length > 0 ? leftPinned[leftPinned.length - 1].column.id : null,
7294
+ firstRightId: rightPinned.length > 0 ? rightPinned[0].column.id : null
7295
+ };
7296
+ }, [allHeaders]);
6974
7297
  useEffect(() => {
6975
7298
  if (!selectable || !onSelectionChange) return;
6976
7299
  onSelectionChange(selectedRows);
@@ -7032,6 +7355,7 @@ function SimpleTable({
7032
7355
  caption && /* @__PURE__ */ jsx(TableCaption, { children: caption }),
7033
7356
  /* @__PURE__ */ jsx(TableHeader, { children: table.getHeaderGroups().map((headerGroup) => /* @__PURE__ */ jsx(TableRow, { children: headerGroup.headers.map((header) => {
7034
7357
  if (header.isPlaceholder) return null;
7358
+ const pinPosition = header.column.getIsPinned();
7035
7359
  return /* @__PURE__ */ jsx(
7036
7360
  TableHeaderComponent,
7037
7361
  {
@@ -7039,7 +7363,11 @@ function SimpleTable({
7039
7363
  draggedColumnId,
7040
7364
  enableColumnOrdering,
7041
7365
  baseColumnOrder,
7042
- setColumnOrder
7366
+ setColumnOrder,
7367
+ pinnedLeftOffset: pinPosition === "left" ? leftOffsets.get(header.column.id) : void 0,
7368
+ pinnedRightOffset: pinPosition === "right" ? rightOffsets.get(header.column.id) : void 0,
7369
+ isLastLeftPinned: header.column.id === lastLeftId,
7370
+ isFirstRightPinned: header.column.id === firstRightId
7043
7371
  },
7044
7372
  header.id
7045
7373
  );
@@ -7062,7 +7390,8 @@ function SimpleTable({
7062
7390
  renderExpandedContent,
7063
7391
  virtualItems,
7064
7392
  invalidateCache,
7065
- getRowExpandable
7393
+ getRowExpandable,
7394
+ headers: allHeaders
7066
7395
  }
7067
7396
  ),
7068
7397
  showInlineLoadingRow && resolvedLoading && /* @__PURE__ */ jsx(TableRow, { "data-loading-row": true, className: "pointer-events-none", children: /* @__PURE__ */ jsxs(
@@ -7123,12 +7452,12 @@ function DataTable({
7123
7452
  pageSize = 10,
7124
7453
  className
7125
7454
  }) {
7126
- const [sorting, setSorting] = React49.useState([]);
7127
- const [columnFilters, setColumnFilters] = React49.useState(
7455
+ const [sorting, setSorting] = React50.useState([]);
7456
+ const [columnFilters, setColumnFilters] = React50.useState(
7128
7457
  []
7129
7458
  );
7130
- const [columnVisibility, setColumnVisibility] = React49.useState({});
7131
- const [rowSelection, setRowSelection] = React49.useState({});
7459
+ const [columnVisibility, setColumnVisibility] = React50.useState({});
7460
+ const [rowSelection, setRowSelection] = React50.useState({});
7132
7461
  const table = useReactTable({
7133
7462
  data,
7134
7463
  columns,
@@ -7285,7 +7614,7 @@ var avatarFallbackVariants = cva(
7285
7614
  }
7286
7615
  }
7287
7616
  );
7288
- var Avatar = React49.forwardRef(({ className, size, ...props }, ref) => /* @__PURE__ */ jsx(
7617
+ var Avatar = React50.forwardRef(({ className, size, ...props }, ref) => /* @__PURE__ */ jsx(
7289
7618
  AvatarPrimitive.Root,
7290
7619
  {
7291
7620
  ref,
@@ -7294,7 +7623,7 @@ var Avatar = React49.forwardRef(({ className, size, ...props }, ref) => /* @__PU
7294
7623
  }
7295
7624
  ));
7296
7625
  Avatar.displayName = AvatarPrimitive.Root.displayName;
7297
- var AvatarImage = React49.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
7626
+ var AvatarImage = React50.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
7298
7627
  AvatarPrimitive.Image,
7299
7628
  {
7300
7629
  ref,
@@ -7303,7 +7632,7 @@ var AvatarImage = React49.forwardRef(({ className, ...props }, ref) => /* @__PUR
7303
7632
  }
7304
7633
  ));
7305
7634
  AvatarImage.displayName = AvatarPrimitive.Image.displayName;
7306
- var AvatarFallback = React49.forwardRef(({ className, size, ...props }, ref) => /* @__PURE__ */ jsx(
7635
+ var AvatarFallback = React50.forwardRef(({ className, size, ...props }, ref) => /* @__PURE__ */ jsx(
7307
7636
  AvatarPrimitive.Fallback,
7308
7637
  {
7309
7638
  ref,
@@ -7467,7 +7796,7 @@ var itemVariants = cva(
7467
7796
  }
7468
7797
  }
7469
7798
  );
7470
- var Item9 = React49.forwardRef(
7799
+ var Item9 = React50.forwardRef(
7471
7800
  ({
7472
7801
  className,
7473
7802
  variant,
@@ -7533,7 +7862,7 @@ var Item9 = React49.forwardRef(
7533
7862
  }
7534
7863
  );
7535
7864
  Item9.displayName = "Item";
7536
- var ItemGroup = React49.forwardRef(({ className, label, description, children, ...props }, ref) => /* @__PURE__ */ jsxs("div", { ref, className: cn("space-y-1", className), ...props, children: [
7865
+ var ItemGroup = React50.forwardRef(({ className, label, description, children, ...props }, ref) => /* @__PURE__ */ jsxs("div", { ref, className: cn("space-y-1", className), ...props, children: [
7537
7866
  (label || description) && /* @__PURE__ */ jsxs("div", { className: "px-3 py-2 space-y-0.5", children: [
7538
7867
  label && /* @__PURE__ */ jsx("div", { className: "text-xs font-semibold text-muted-foreground uppercase tracking-wider", children: label }),
7539
7868
  description && /* @__PURE__ */ jsx("div", { className: "text-xs text-muted-foreground", children: description })
@@ -7541,7 +7870,7 @@ var ItemGroup = React49.forwardRef(({ className, label, description, children, .
7541
7870
  children
7542
7871
  ] }));
7543
7872
  ItemGroup.displayName = "ItemGroup";
7544
- var ItemList = React49.forwardRef(({ className, divided, spacing = "default", children, ...props }, ref) => {
7873
+ var ItemList = React50.forwardRef(({ className, divided, spacing = "default", children, ...props }, ref) => {
7545
7874
  const spacingClasses = {
7546
7875
  none: "space-y-0",
7547
7876
  sm: "space-y-0.5",
@@ -7564,7 +7893,7 @@ var ItemList = React49.forwardRef(({ className, divided, spacing = "default", ch
7564
7893
  );
7565
7894
  });
7566
7895
  ItemList.displayName = "ItemList";
7567
- var ItemSeparator = React49.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
7896
+ var ItemSeparator = React50.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
7568
7897
  "div",
7569
7898
  {
7570
7899
  ref,
@@ -7602,7 +7931,7 @@ var badgeVariants = cva(
7602
7931
  }
7603
7932
  }
7604
7933
  );
7605
- var Badge = React49.forwardRef(
7934
+ var Badge = React50.forwardRef(
7606
7935
  ({
7607
7936
  className,
7608
7937
  variant,
@@ -7669,7 +7998,7 @@ function Calendar({
7669
7998
  ...props
7670
7999
  }) {
7671
8000
  const defaultClassNames = getDefaultClassNames();
7672
- const { Card: Card2, CardHeader: CardHeader2, CardTitle: CardTitle2, CardContent: CardContent2, CardDescription: CardDescription2 } = React49.useMemo(() => {
8001
+ const { Card: Card2, CardHeader: CardHeader2, CardTitle: CardTitle2, CardContent: CardContent2, CardDescription: CardDescription2 } = React50.useMemo(() => {
7673
8002
  try {
7674
8003
  const cardComponents = (init_card(), __toCommonJS(card_exports));
7675
8004
  return cardComponents;
@@ -7683,7 +8012,7 @@ function Calendar({
7683
8012
  };
7684
8013
  }
7685
8014
  }, []);
7686
- const defaultPresets = React49.useMemo(() => {
8015
+ const defaultPresets = React50.useMemo(() => {
7687
8016
  if (!quickSelect && !presets) return [];
7688
8017
  const mode = props.mode;
7689
8018
  if (mode === "single") {
@@ -7691,7 +8020,7 @@ function Calendar({
7691
8020
  {
7692
8021
  label: "Today",
7693
8022
  value: () => /* @__PURE__ */ new Date(),
7694
- icon: React49.createElement(Calendar$1, { className: "h-3 w-3" })
8023
+ icon: React50.createElement(Calendar$1, { className: "h-3 w-3" })
7695
8024
  },
7696
8025
  {
7697
8026
  label: "Tomorrow",
@@ -7700,7 +8029,7 @@ function Calendar({
7700
8029
  tomorrow.setDate(tomorrow.getDate() + 1);
7701
8030
  return tomorrow;
7702
8031
  },
7703
- icon: React49.createElement("span", { className: "text-xs" }, "\u27A1\uFE0F")
8032
+ icon: React50.createElement("span", { className: "text-xs" }, "\u27A1\uFE0F")
7704
8033
  },
7705
8034
  {
7706
8035
  label: "Next Week",
@@ -7709,7 +8038,7 @@ function Calendar({
7709
8038
  nextWeek.setDate(nextWeek.getDate() + 7);
7710
8039
  return nextWeek;
7711
8040
  },
7712
- icon: React49.createElement(Calendar$1, { className: "h-3 w-3" })
8041
+ icon: React50.createElement(Calendar$1, { className: "h-3 w-3" })
7713
8042
  }
7714
8043
  ];
7715
8044
  } else if (mode === "range") {
@@ -7722,7 +8051,7 @@ function Calendar({
7722
8051
  end.setDate(start.getDate() + 6);
7723
8052
  return { from: start, to: end };
7724
8053
  },
7725
- icon: React49.createElement(Calendar$1, { className: "h-3 w-3" })
8054
+ icon: React50.createElement(Calendar$1, { className: "h-3 w-3" })
7726
8055
  },
7727
8056
  {
7728
8057
  label: "Next 7 Days",
@@ -7732,7 +8061,7 @@ function Calendar({
7732
8061
  end.setDate(start.getDate() + 7);
7733
8062
  return { from: start, to: end };
7734
8063
  },
7735
- icon: React49.createElement("span", { className: "text-xs" }, "\u27A1\uFE0F")
8064
+ icon: React50.createElement("span", { className: "text-xs" }, "\u27A1\uFE0F")
7736
8065
  }
7737
8066
  ];
7738
8067
  } else {
@@ -7748,7 +8077,7 @@ function Calendar({
7748
8077
  }
7749
8078
  return dates;
7750
8079
  },
7751
- icon: React49.createElement(Calendar$1, { className: "h-3 w-3" })
8080
+ icon: React50.createElement(Calendar$1, { className: "h-3 w-3" })
7752
8081
  }
7753
8082
  ];
7754
8083
  }
@@ -7759,24 +8088,24 @@ function Calendar({
7759
8088
  const selected = props.selected;
7760
8089
  const mode = props.mode;
7761
8090
  if (mode === "single" && selected) {
7762
- return React49.createElement(
8091
+ return React50.createElement(
7763
8092
  "div",
7764
8093
  {
7765
8094
  className: "p-3 border rounded-lg bg-muted/50"
7766
8095
  },
7767
8096
  [
7768
- React49.createElement(
8097
+ React50.createElement(
7769
8098
  "div",
7770
8099
  {
7771
8100
  key: "header",
7772
8101
  className: "flex items-center gap-2 mb-1"
7773
8102
  },
7774
8103
  [
7775
- React49.createElement(Calendar$1, {
8104
+ React50.createElement(Calendar$1, {
7776
8105
  key: "icon",
7777
8106
  className: "h-4 w-4"
7778
8107
  }),
7779
- React49.createElement(
8108
+ React50.createElement(
7780
8109
  "span",
7781
8110
  {
7782
8111
  key: "label",
@@ -7786,7 +8115,7 @@ function Calendar({
7786
8115
  )
7787
8116
  ]
7788
8117
  ),
7789
- React49.createElement(
8118
+ React50.createElement(
7790
8119
  "p",
7791
8120
  {
7792
8121
  key: "date",
@@ -7804,24 +8133,24 @@ function Calendar({
7804
8133
  }
7805
8134
  if (mode === "range" && selected?.from) {
7806
8135
  const elements = [
7807
- React49.createElement(
8136
+ React50.createElement(
7808
8137
  "div",
7809
8138
  {
7810
8139
  key: "from",
7811
8140
  className: "flex items-center gap-2 text-sm"
7812
8141
  },
7813
8142
  [
7814
- React49.createElement(
8143
+ React50.createElement(
7815
8144
  "span",
7816
8145
  { key: "icon", className: "text-green-600" },
7817
8146
  "\u{1F7E2}"
7818
8147
  ),
7819
- React49.createElement(
8148
+ React50.createElement(
7820
8149
  "span",
7821
8150
  { key: "label", className: "font-medium" },
7822
8151
  "From:"
7823
8152
  ),
7824
- React49.createElement(
8153
+ React50.createElement(
7825
8154
  "span",
7826
8155
  { key: "date" },
7827
8156
  selected.from.toLocaleDateString()
@@ -7831,43 +8160,43 @@ function Calendar({
7831
8160
  ];
7832
8161
  if (selected.to) {
7833
8162
  elements.push(
7834
- React49.createElement(
8163
+ React50.createElement(
7835
8164
  "div",
7836
8165
  {
7837
8166
  key: "to",
7838
8167
  className: "flex items-center gap-2 text-sm"
7839
8168
  },
7840
8169
  [
7841
- React49.createElement(
8170
+ React50.createElement(
7842
8171
  "span",
7843
8172
  { key: "icon", className: "text-red-600" },
7844
8173
  "\u{1F534}"
7845
8174
  ),
7846
- React49.createElement(
8175
+ React50.createElement(
7847
8176
  "span",
7848
8177
  { key: "label", className: "font-medium" },
7849
8178
  "To:"
7850
8179
  ),
7851
- React49.createElement(
8180
+ React50.createElement(
7852
8181
  "span",
7853
8182
  { key: "date" },
7854
8183
  selected.to.toLocaleDateString()
7855
8184
  )
7856
8185
  ]
7857
8186
  ),
7858
- React49.createElement(
8187
+ React50.createElement(
7859
8188
  "div",
7860
8189
  {
7861
8190
  key: "duration",
7862
8191
  className: "flex items-center gap-2 pt-2 border-t text-sm"
7863
8192
  },
7864
8193
  [
7865
- React49.createElement(
8194
+ React50.createElement(
7866
8195
  "span",
7867
8196
  { key: "icon", className: "text-mvn-blue-600" },
7868
8197
  "\u23F1\uFE0F"
7869
8198
  ),
7870
- React49.createElement(
8199
+ React50.createElement(
7871
8200
  "span",
7872
8201
  { key: "text" },
7873
8202
  `Duration: ${Math.ceil(
@@ -7878,25 +8207,25 @@ function Calendar({
7878
8207
  )
7879
8208
  );
7880
8209
  }
7881
- return React49.createElement(
8210
+ return React50.createElement(
7882
8211
  "div",
7883
8212
  {
7884
8213
  className: "p-3 border rounded-lg bg-muted/50"
7885
8214
  },
7886
- React49.createElement("div", { className: "space-y-2" }, elements)
8215
+ React50.createElement("div", { className: "space-y-2" }, elements)
7887
8216
  );
7888
8217
  }
7889
8218
  if (mode === "multiple" && Array.isArray(selected) && selected.length > 0) {
7890
8219
  const sortedDates = selected.sort((a, b) => a.getTime() - b.getTime()).slice(0, 5);
7891
8220
  const dateElements = sortedDates.map(
7892
- (date, index) => React49.createElement(
8221
+ (date, index) => React50.createElement(
7893
8222
  "div",
7894
8223
  {
7895
8224
  key: index,
7896
8225
  className: "flex items-center justify-between p-2 bg-background rounded border"
7897
8226
  },
7898
8227
  [
7899
- React49.createElement(
8228
+ React50.createElement(
7900
8229
  "span",
7901
8230
  {
7902
8231
  key: "date",
@@ -7908,7 +8237,7 @@ function Calendar({
7908
8237
  year: "numeric"
7909
8238
  })
7910
8239
  ),
7911
- React49.createElement(
8240
+ React50.createElement(
7912
8241
  "button",
7913
8242
  {
7914
8243
  key: "remove",
@@ -7929,18 +8258,18 @@ function Calendar({
7929
8258
  )
7930
8259
  );
7931
8260
  const elements = [
7932
- React49.createElement(
8261
+ React50.createElement(
7933
8262
  "div",
7934
8263
  {
7935
8264
  key: "header",
7936
8265
  className: "flex items-center gap-2 mb-2"
7937
8266
  },
7938
8267
  [
7939
- React49.createElement(Star, {
8268
+ React50.createElement(Star, {
7940
8269
  key: "icon",
7941
8270
  className: "h-4 w-4 text-yellow-500"
7942
8271
  }),
7943
- React49.createElement(
8272
+ React50.createElement(
7944
8273
  "span",
7945
8274
  {
7946
8275
  key: "label",
@@ -7950,7 +8279,7 @@ function Calendar({
7950
8279
  )
7951
8280
  ]
7952
8281
  ),
7953
- React49.createElement(
8282
+ React50.createElement(
7954
8283
  "div",
7955
8284
  {
7956
8285
  key: "dates",
@@ -7961,7 +8290,7 @@ function Calendar({
7961
8290
  ];
7962
8291
  if (selected.length > 5) {
7963
8292
  elements.push(
7964
- React49.createElement(
8293
+ React50.createElement(
7965
8294
  "p",
7966
8295
  {
7967
8296
  key: "more",
@@ -7971,7 +8300,7 @@ function Calendar({
7971
8300
  )
7972
8301
  );
7973
8302
  }
7974
- return React49.createElement(
8303
+ return React50.createElement(
7975
8304
  "div",
7976
8305
  {
7977
8306
  className: "p-3 border rounded-lg bg-muted/50 max-h-48 overflow-y-auto"
@@ -7986,7 +8315,7 @@ function Calendar({
7986
8315
  const elements = [];
7987
8316
  if ((quickSelect || presets) && activePresets.length > 0) {
7988
8317
  const presetButtons = activePresets.map(
7989
- (preset, index) => React49.createElement(
8318
+ (preset, index) => React50.createElement(
7990
8319
  "button",
7991
8320
  {
7992
8321
  key: index,
@@ -7995,19 +8324,19 @@ function Calendar({
7995
8324
  },
7996
8325
  [
7997
8326
  preset.icon,
7998
- React49.createElement("span", { key: "label" }, preset.label)
8327
+ React50.createElement("span", { key: "label" }, preset.label)
7999
8328
  ]
8000
8329
  )
8001
8330
  );
8002
8331
  elements.push(
8003
- React49.createElement(
8332
+ React50.createElement(
8004
8333
  "div",
8005
8334
  {
8006
8335
  key: "presets",
8007
8336
  className: "space-y-2"
8008
8337
  },
8009
8338
  [
8010
- React49.createElement(
8339
+ React50.createElement(
8011
8340
  "h5",
8012
8341
  {
8013
8342
  key: "title",
@@ -8015,7 +8344,7 @@ function Calendar({
8015
8344
  },
8016
8345
  "Quick Select:"
8017
8346
  ),
8018
- React49.createElement(
8347
+ React50.createElement(
8019
8348
  "div",
8020
8349
  {
8021
8350
  key: "buttons",
@@ -8040,7 +8369,7 @@ function Calendar({
8040
8369
  label = "Clear Range";
8041
8370
  }
8042
8371
  elements.push(
8043
- React49.createElement(
8372
+ React50.createElement(
8044
8373
  "button",
8045
8374
  {
8046
8375
  key: "clear",
@@ -8056,7 +8385,7 @@ function Calendar({
8056
8385
  disabled
8057
8386
  },
8058
8387
  [
8059
- React49.createElement(RotateCcw, {
8388
+ React50.createElement(RotateCcw, {
8060
8389
  key: "icon",
8061
8390
  className: "mr-1 h-3 w-3"
8062
8391
  }),
@@ -8065,7 +8394,7 @@ function Calendar({
8065
8394
  )
8066
8395
  );
8067
8396
  }
8068
- return React49.createElement(
8397
+ return React50.createElement(
8069
8398
  "div",
8070
8399
  {
8071
8400
  className: cn("space-y-3", sidebarClassName)
@@ -8073,7 +8402,7 @@ function Calendar({
8073
8402
  elements
8074
8403
  );
8075
8404
  };
8076
- const calendarElement = React49.createElement(DayPicker, {
8405
+ const calendarElement = React50.createElement(DayPicker, {
8077
8406
  showOutsideDays,
8078
8407
  className: cn(
8079
8408
  "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",
@@ -8175,7 +8504,7 @@ function Calendar({
8175
8504
  },
8176
8505
  components: {
8177
8506
  Root: ({ className: className2, rootRef, ...props2 }) => {
8178
- return React49.createElement("div", {
8507
+ return React50.createElement("div", {
8179
8508
  "data-slot": "calendar",
8180
8509
  ref: rootRef,
8181
8510
  className: cn(className2),
@@ -8184,28 +8513,28 @@ function Calendar({
8184
8513
  },
8185
8514
  Chevron: ({ className: className2, orientation, ...props2 }) => {
8186
8515
  if (orientation === "left") {
8187
- return React49.createElement(ChevronLeft, {
8516
+ return React50.createElement(ChevronLeft, {
8188
8517
  className: cn("size-4", className2),
8189
8518
  ...props2
8190
8519
  });
8191
8520
  }
8192
8521
  if (orientation === "right") {
8193
- return React49.createElement(ChevronRight, {
8522
+ return React50.createElement(ChevronRight, {
8194
8523
  className: cn("size-4", className2),
8195
8524
  ...props2
8196
8525
  });
8197
8526
  }
8198
- return React49.createElement(ChevronDown, {
8527
+ return React50.createElement(ChevronDown, {
8199
8528
  className: cn("size-4", className2),
8200
8529
  ...props2
8201
8530
  });
8202
8531
  },
8203
8532
  DayButton: CalendarDayButton,
8204
8533
  WeekNumber: ({ children, ...props2 }) => {
8205
- return React49.createElement(
8534
+ return React50.createElement(
8206
8535
  "td",
8207
8536
  props2,
8208
- React49.createElement(
8537
+ React50.createElement(
8209
8538
  "div",
8210
8539
  {
8211
8540
  className: "flex size-10 items-center justify-center text-center text-sm font-medium text-muted-foreground"
@@ -8220,25 +8549,25 @@ function Calendar({
8220
8549
  });
8221
8550
  if (layout === "compact") {
8222
8551
  if (withCard) {
8223
- return React49.createElement(
8552
+ return React50.createElement(
8224
8553
  Card2,
8225
8554
  {
8226
8555
  className: cn("w-fit", cardClassName)
8227
8556
  },
8228
- React49.createElement(CardContent2, { className: "p-3" }, calendarElement)
8557
+ React50.createElement(CardContent2, { className: "p-3" }, calendarElement)
8229
8558
  );
8230
8559
  }
8231
8560
  return calendarElement;
8232
8561
  }
8233
8562
  if (layout === "inline") {
8234
- const sidebarElement2 = renderDateInfo() || renderQuickActions() ? React49.createElement(
8563
+ const sidebarElement2 = renderDateInfo() || renderQuickActions() ? React50.createElement(
8235
8564
  "div",
8236
8565
  {
8237
8566
  className: cn("min-w-[240px] space-y-3", sidebarClassName)
8238
8567
  },
8239
8568
  [renderDateInfo(), renderQuickActions()].filter(Boolean)
8240
8569
  ) : null;
8241
- const content = sidebarElement2 ? React49.createElement(
8570
+ const content = sidebarElement2 ? React50.createElement(
8242
8571
  "div",
8243
8572
  {
8244
8573
  className: cn("flex gap-4 items-start", containerClassName)
@@ -8246,25 +8575,25 @@ function Calendar({
8246
8575
  [calendarElement, sidebarElement2]
8247
8576
  ) : calendarElement;
8248
8577
  if (withCard) {
8249
- return React49.createElement(
8578
+ return React50.createElement(
8250
8579
  Card2,
8251
8580
  {
8252
8581
  className: cn("w-fit", cardClassName)
8253
8582
  },
8254
8583
  [
8255
- (cardTitle || cardDescription) && React49.createElement(CardHeader2, { key: "header" }, [
8256
- cardTitle && React49.createElement(
8584
+ (cardTitle || cardDescription) && React50.createElement(CardHeader2, { key: "header" }, [
8585
+ cardTitle && React50.createElement(
8257
8586
  CardTitle2,
8258
8587
  { key: "title", className: "text-base" },
8259
8588
  cardTitle
8260
8589
  ),
8261
- cardDescription && React49.createElement(
8590
+ cardDescription && React50.createElement(
8262
8591
  CardDescription2,
8263
8592
  { key: "desc" },
8264
8593
  cardDescription
8265
8594
  )
8266
8595
  ]),
8267
- React49.createElement(
8596
+ React50.createElement(
8268
8597
  CardContent2,
8269
8598
  {
8270
8599
  key: "content",
@@ -8277,7 +8606,7 @@ function Calendar({
8277
8606
  }
8278
8607
  return content;
8279
8608
  }
8280
- const sidebarElement = renderDateInfo() || renderQuickActions() ? React49.createElement(
8609
+ const sidebarElement = renderDateInfo() || renderQuickActions() ? React50.createElement(
8281
8610
  "div",
8282
8611
  {
8283
8612
  className: cn("min-w-[240px] space-y-3", sidebarClassName)
@@ -8285,7 +8614,7 @@ function Calendar({
8285
8614
  [renderDateInfo(), renderQuickActions()].filter(Boolean)
8286
8615
  ) : null;
8287
8616
  if (withCard) {
8288
- const cardElement = React49.createElement(
8617
+ const cardElement = React50.createElement(
8289
8618
  Card2,
8290
8619
  {
8291
8620
  className: cn(
@@ -8296,19 +8625,19 @@ function Calendar({
8296
8625
  )
8297
8626
  },
8298
8627
  [
8299
- (cardTitle || cardDescription) && React49.createElement(CardHeader2, { key: "header" }, [
8300
- cardTitle && React49.createElement(
8628
+ (cardTitle || cardDescription) && React50.createElement(CardHeader2, { key: "header" }, [
8629
+ cardTitle && React50.createElement(
8301
8630
  CardTitle2,
8302
8631
  { key: "title", className: "text-base" },
8303
8632
  cardTitle
8304
8633
  ),
8305
- cardDescription && React49.createElement(
8634
+ cardDescription && React50.createElement(
8306
8635
  CardDescription2,
8307
8636
  { key: "desc" },
8308
8637
  cardDescription
8309
8638
  )
8310
8639
  ]),
8311
- React49.createElement(
8640
+ React50.createElement(
8312
8641
  CardContent2,
8313
8642
  {
8314
8643
  key: "content",
@@ -8319,7 +8648,7 @@ function Calendar({
8319
8648
  ].filter(Boolean)
8320
8649
  );
8321
8650
  if (sidebarElement) {
8322
- return React49.createElement(
8651
+ return React50.createElement(
8323
8652
  "div",
8324
8653
  {
8325
8654
  className: cn("flex gap-4 flex-wrap items-start", containerClassName)
@@ -8330,7 +8659,7 @@ function Calendar({
8330
8659
  return cardElement;
8331
8660
  }
8332
8661
  if (sidebarElement) {
8333
- return React49.createElement(
8662
+ return React50.createElement(
8334
8663
  "div",
8335
8664
  {
8336
8665
  className: cn("flex gap-4 flex-wrap items-start", containerClassName)
@@ -8347,8 +8676,8 @@ function CalendarDayButton({
8347
8676
  ...props
8348
8677
  }) {
8349
8678
  const defaultClassNames = getDefaultClassNames();
8350
- const ref = React49.useRef(null);
8351
- React49.useEffect(() => {
8679
+ const ref = React50.useRef(null);
8680
+ React50.useEffect(() => {
8352
8681
  if (modifiers.focused) ref.current?.focus();
8353
8682
  }, [modifiers.focused]);
8354
8683
  return /* @__PURE__ */ jsx(
@@ -9964,7 +10293,7 @@ var pickerVariants = cva("w-full justify-start text-left font-normal", {
9964
10293
  variant: "outlined"
9965
10294
  }
9966
10295
  });
9967
- var DatePicker = React49.forwardRef(
10296
+ var DatePicker = React50.forwardRef(
9968
10297
  ({
9969
10298
  date,
9970
10299
  onDateChange,
@@ -10011,7 +10340,7 @@ var DatePicker = React49.forwardRef(
10011
10340
  }
10012
10341
  );
10013
10342
  DatePicker.displayName = "DatePicker";
10014
- var DateRangePicker = React49.forwardRef(
10343
+ var DateRangePicker = React50.forwardRef(
10015
10344
  ({
10016
10345
  dateRange,
10017
10346
  onDateRangeChange,
@@ -10069,15 +10398,15 @@ DateRangePicker.displayName = "DateRangePicker";
10069
10398
 
10070
10399
  // src/components/ui/carousel/index.tsx
10071
10400
  init_utils();
10072
- var CarouselContext = React49.createContext(null);
10401
+ var CarouselContext = React50.createContext(null);
10073
10402
  function useCarousel() {
10074
- const context = React49.useContext(CarouselContext);
10403
+ const context = React50.useContext(CarouselContext);
10075
10404
  if (!context) {
10076
10405
  throw new Error("useCarousel must be used within a <Carousel />");
10077
10406
  }
10078
10407
  return context;
10079
10408
  }
10080
- var Carousel = React49.forwardRef(
10409
+ var Carousel = React50.forwardRef(
10081
10410
  ({
10082
10411
  orientation = "horizontal",
10083
10412
  opts,
@@ -10094,22 +10423,22 @@ var Carousel = React49.forwardRef(
10094
10423
  },
10095
10424
  plugins
10096
10425
  );
10097
- const [canScrollPrev, setCanScrollPrev] = React49.useState(false);
10098
- const [canScrollNext, setCanScrollNext] = React49.useState(false);
10099
- const onSelect = React49.useCallback((api2) => {
10426
+ const [canScrollPrev, setCanScrollPrev] = React50.useState(false);
10427
+ const [canScrollNext, setCanScrollNext] = React50.useState(false);
10428
+ const onSelect = React50.useCallback((api2) => {
10100
10429
  if (!api2) {
10101
10430
  return;
10102
10431
  }
10103
10432
  setCanScrollPrev(api2.canScrollPrev());
10104
10433
  setCanScrollNext(api2.canScrollNext());
10105
10434
  }, []);
10106
- const scrollPrev = React49.useCallback(() => {
10435
+ const scrollPrev = React50.useCallback(() => {
10107
10436
  api?.scrollPrev();
10108
10437
  }, [api]);
10109
- const scrollNext = React49.useCallback(() => {
10438
+ const scrollNext = React50.useCallback(() => {
10110
10439
  api?.scrollNext();
10111
10440
  }, [api]);
10112
- const handleKeyDown = React49.useCallback(
10441
+ const handleKeyDown = React50.useCallback(
10113
10442
  (event) => {
10114
10443
  if (event.key === "ArrowLeft") {
10115
10444
  event.preventDefault();
@@ -10121,13 +10450,13 @@ var Carousel = React49.forwardRef(
10121
10450
  },
10122
10451
  [scrollPrev, scrollNext]
10123
10452
  );
10124
- React49.useEffect(() => {
10453
+ React50.useEffect(() => {
10125
10454
  if (!api || !setApi) {
10126
10455
  return;
10127
10456
  }
10128
10457
  setApi(api);
10129
10458
  }, [api, setApi]);
10130
- React49.useEffect(() => {
10459
+ React50.useEffect(() => {
10131
10460
  if (!api) {
10132
10461
  return;
10133
10462
  }
@@ -10156,7 +10485,11 @@ var Carousel = React49.forwardRef(
10156
10485
  {
10157
10486
  ref,
10158
10487
  onKeyDownCapture: handleKeyDown,
10159
- className: cn("relative", className),
10488
+ className: cn(
10489
+ "relative",
10490
+ orientation === "vertical" && "h-full",
10491
+ className
10492
+ ),
10160
10493
  role: "region",
10161
10494
  "aria-roledescription": "carousel",
10162
10495
  ...props,
@@ -10168,9 +10501,9 @@ var Carousel = React49.forwardRef(
10168
10501
  }
10169
10502
  );
10170
10503
  Carousel.displayName = "Carousel";
10171
- var CarouselContent = React49.forwardRef(({ className, ...props }, ref) => {
10504
+ var CarouselContent = React50.forwardRef(({ className, ...props }, ref) => {
10172
10505
  const { carouselRef, orientation } = useCarousel();
10173
- return /* @__PURE__ */ jsx("div", { ref: carouselRef, className: "overflow-hidden", children: /* @__PURE__ */ jsx(
10506
+ return /* @__PURE__ */ jsx("div", { ref: carouselRef, className: "overflow-hidden h-full", children: /* @__PURE__ */ jsx(
10174
10507
  "div",
10175
10508
  {
10176
10509
  ref,
@@ -10184,7 +10517,7 @@ var CarouselContent = React49.forwardRef(({ className, ...props }, ref) => {
10184
10517
  ) });
10185
10518
  });
10186
10519
  CarouselContent.displayName = "CarouselContent";
10187
- var CarouselItem = React49.forwardRef(({ className, ...props }, ref) => {
10520
+ var CarouselItem = React50.forwardRef(({ className, ...props }, ref) => {
10188
10521
  const { orientation } = useCarousel();
10189
10522
  return /* @__PURE__ */ jsx(
10190
10523
  "div",
@@ -10202,7 +10535,7 @@ var CarouselItem = React49.forwardRef(({ className, ...props }, ref) => {
10202
10535
  );
10203
10536
  });
10204
10537
  CarouselItem.displayName = "CarouselItem";
10205
- var CarouselPrevious = React49.forwardRef(({ className, variant = "outline", size = "icon", ...props }, ref) => {
10538
+ var CarouselPrevious = React50.forwardRef(({ className, variant = "outline", size = "icon", ...props }, ref) => {
10206
10539
  const { orientation, scrollPrev, canScrollPrev } = useCarousel();
10207
10540
  return /* @__PURE__ */ jsxs(
10208
10541
  Button,
@@ -10211,8 +10544,8 @@ var CarouselPrevious = React49.forwardRef(({ className, variant = "outline", siz
10211
10544
  variant,
10212
10545
  size,
10213
10546
  className: cn(
10214
- "absolute h-8 w-8 rounded-full",
10215
- orientation === "horizontal" ? "-left-12 top-1/2 -translate-y-1/2" : "-top-12 left-1/2 -translate-x-1/2 rotate-90",
10547
+ "absolute z-10 h-8 w-8 rounded-full",
10548
+ orientation === "horizontal" ? "left-2 top-1/2 -translate-y-[1rem]" : "top-2 left-1/2 -translate-x-[1rem] rotate-90",
10216
10549
  className
10217
10550
  ),
10218
10551
  disabled: !canScrollPrev,
@@ -10226,7 +10559,7 @@ var CarouselPrevious = React49.forwardRef(({ className, variant = "outline", siz
10226
10559
  );
10227
10560
  });
10228
10561
  CarouselPrevious.displayName = "CarouselPrevious";
10229
- var CarouselNext = React49.forwardRef(({ className, variant = "outline", size = "icon", ...props }, ref) => {
10562
+ var CarouselNext = React50.forwardRef(({ className, variant = "outline", size = "icon", ...props }, ref) => {
10230
10563
  const { orientation, scrollNext, canScrollNext } = useCarousel();
10231
10564
  return /* @__PURE__ */ jsxs(
10232
10565
  Button,
@@ -10235,8 +10568,8 @@ var CarouselNext = React49.forwardRef(({ className, variant = "outline", size =
10235
10568
  variant,
10236
10569
  size,
10237
10570
  className: cn(
10238
- "absolute h-8 w-8 rounded-full",
10239
- orientation === "horizontal" ? "-right-12 top-1/2 -translate-y-1/2" : "-bottom-12 left-1/2 -translate-x-1/2 rotate-90",
10571
+ "absolute z-10 h-8 w-8 rounded-full",
10572
+ orientation === "horizontal" ? "right-2 top-1/2 -translate-y-[1rem]" : "bottom-2 left-1/2 -translate-x-[1rem] rotate-90",
10240
10573
  className
10241
10574
  ),
10242
10575
  disabled: !canScrollNext,
@@ -10265,10 +10598,10 @@ function SimpleCarousel({
10265
10598
  nextArrow,
10266
10599
  onSlideChange
10267
10600
  }) {
10268
- const [api, setApi] = React49.useState();
10269
- const [current, setCurrent] = React49.useState(0);
10270
- const [count, setCount] = React49.useState(0);
10271
- React49.useEffect(() => {
10601
+ const [api, setApi] = React50.useState();
10602
+ const [current, setCurrent] = React50.useState(0);
10603
+ const [count, setCount] = React50.useState(0);
10604
+ React50.useEffect(() => {
10272
10605
  if (!api) {
10273
10606
  return;
10274
10607
  }
@@ -10280,7 +10613,7 @@ function SimpleCarousel({
10280
10613
  onSlideChange?.(selectedIndex);
10281
10614
  });
10282
10615
  }, [api, onSlideChange]);
10283
- React49.useEffect(() => {
10616
+ React50.useEffect(() => {
10284
10617
  if (!api || !autoPlay) {
10285
10618
  return;
10286
10619
  }
@@ -10294,54 +10627,65 @@ function SimpleCarousel({
10294
10627
  return () => clearInterval(interval);
10295
10628
  }, [api, autoPlay, loop]);
10296
10629
  const slideWidth = slidesToShow > 1 ? `${100 / slidesToShow}%` : "100%";
10297
- return /* @__PURE__ */ jsxs("div", { className: cn("w-full", className), children: [
10298
- /* @__PURE__ */ jsxs(
10299
- Carousel,
10300
- {
10301
- setApi,
10302
- opts: {
10303
- align: "start",
10304
- loop
10305
- },
10306
- orientation,
10307
- className: cn("w-full mx-auto", containerClassName),
10308
- children: [
10309
- /* @__PURE__ */ jsx(CarouselContent, { children: items.map((item, index) => /* @__PURE__ */ jsx(
10310
- CarouselItem,
10311
- {
10312
- className: cn(itemClassName, item.className),
10313
- style: { flexBasis: slideWidth },
10314
- onClick: item.onClick,
10315
- children: item.content
10630
+ return /* @__PURE__ */ jsxs(
10631
+ "div",
10632
+ {
10633
+ className: cn("w-full", orientation === "vertical" && "h-64", className),
10634
+ children: [
10635
+ /* @__PURE__ */ jsxs(
10636
+ Carousel,
10637
+ {
10638
+ setApi,
10639
+ opts: {
10640
+ align: "start",
10641
+ loop
10316
10642
  },
10317
- item.id || index
10318
- )) }),
10319
- showArrows && /* @__PURE__ */ jsxs(Fragment, { children: [
10320
- prevArrow || /* @__PURE__ */ jsx(CarouselPrevious, {}),
10321
- nextArrow || /* @__PURE__ */ jsx(CarouselNext, {})
10322
- ] })
10323
- ]
10324
- }
10325
- ),
10326
- showDots && /* @__PURE__ */ jsx("div", { className: "flex justify-center space-x-2 mt-4", children: Array.from({ length: count }).map((_, index) => /* @__PURE__ */ jsx(
10327
- "button",
10328
- {
10329
- className: cn(
10330
- "h-2 w-2 rounded-full transition-colors",
10331
- current === index + 1 ? "bg-primary" : "bg-primary/20 hover:bg-primary/40"
10643
+ orientation,
10644
+ className: cn(
10645
+ "w-full mx-auto",
10646
+ orientation === "vertical" && "h-full",
10647
+ containerClassName
10648
+ ),
10649
+ children: [
10650
+ /* @__PURE__ */ jsx(CarouselContent, { children: items.map((item, index) => /* @__PURE__ */ jsx(
10651
+ CarouselItem,
10652
+ {
10653
+ className: cn(itemClassName, item.className),
10654
+ style: { flexBasis: slideWidth },
10655
+ onClick: item.onClick,
10656
+ children: item.content
10657
+ },
10658
+ item.id || index
10659
+ )) }),
10660
+ showArrows && /* @__PURE__ */ jsxs(Fragment, { children: [
10661
+ prevArrow || /* @__PURE__ */ jsx(CarouselPrevious, {}),
10662
+ nextArrow || /* @__PURE__ */ jsx(CarouselNext, {})
10663
+ ] })
10664
+ ]
10665
+ }
10332
10666
  ),
10333
- onClick: () => api?.scrollTo(index),
10334
- "aria-label": `Go to slide ${index + 1}`
10335
- },
10336
- index
10337
- )) }),
10338
- count > 0 && /* @__PURE__ */ jsxs("div", { className: "py-2 text-center text-sm text-muted-foreground", children: [
10339
- "Slide ",
10340
- current,
10341
- " of ",
10342
- count
10343
- ] })
10344
- ] });
10667
+ showDots && /* @__PURE__ */ jsx("div", { className: "flex justify-center space-x-2 mt-4", children: Array.from({ length: count }).map((_, index) => /* @__PURE__ */ jsx(
10668
+ Button,
10669
+ {
10670
+ variant: "ghost",
10671
+ className: cn(
10672
+ "h-2 w-2 rounded-full transition-colors",
10673
+ current === index + 1 ? "bg-primary" : "bg-primary/20 hover:bg-primary/40"
10674
+ ),
10675
+ onClick: () => api?.scrollTo(index),
10676
+ "aria-label": `Go to slide ${index + 1}`
10677
+ },
10678
+ index
10679
+ )) }),
10680
+ count > 0 && /* @__PURE__ */ jsxs("div", { className: "py-2 text-center text-sm text-muted-foreground", children: [
10681
+ "Slide ",
10682
+ current,
10683
+ " of ",
10684
+ count
10685
+ ] })
10686
+ ]
10687
+ }
10688
+ );
10345
10689
  }
10346
10690
 
10347
10691
  // src/components/ui/typography/index.tsx
@@ -10419,7 +10763,7 @@ var typeToTag = {
10419
10763
  list: "ul",
10420
10764
  "list-item": "li"
10421
10765
  };
10422
- var Typography = React49.forwardRef(
10766
+ var Typography = React50.forwardRef(
10423
10767
  ({
10424
10768
  type,
10425
10769
  size,
@@ -10456,7 +10800,7 @@ var Typography = React49.forwardRef(
10456
10800
  );
10457
10801
  Typography.displayName = "Typography";
10458
10802
  function createWrapper(fixedType) {
10459
- return React49.forwardRef(
10803
+ return React50.forwardRef(
10460
10804
  ({ ...props }, ref) => /* @__PURE__ */ jsx(Typography, { ref, type: fixedType, ...props })
10461
10805
  );
10462
10806
  }
@@ -10503,6 +10847,667 @@ var TypographyGroup = {
10503
10847
  // src/index.ts
10504
10848
  init_utils();
10505
10849
 
10506
- export { Accordion, Alert, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AspectRatio, Avatar, AvatarFallback, AvatarGroup, AvatarImage, Badge, Blockquote, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, ButtonGroup, ButtonGroupSeparator, ButtonGroupText, Calendar, CalendarDayButton, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Carousel, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious, Checkbox, Collapsible, CollapsibleContent, CollapsibleItem, CollapsibleTrigger, Combobox, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuPortal, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, DataTable, DatePicker, DateRangePicker, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DotsSpinner, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, Empty, Field, Form, FormItem, FormList, H1, H2, H3, H4, HoverCard, HoverCardContent, HoverCardTrigger, IconButton, InlineCode, Input, InputGroup, InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot, Item9 as Item, ItemGroup, ItemList, ItemSeparator, Label, Lead, List3 as List, ListItem, Menubar, MenubarCheckboxItem, MenubarContent, MenubarGroup, MenubarItem, MenubarLabel, MenubarMenu, MenubarPortal, MenubarRadioGroup, MenubarRadioItem, MenubarSeparator, MenubarShortcut, MenubarSub, MenubarSubContent, MenubarSubTrigger, MenubarTrigger, Muted, NavigationMenu, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, NavigationMenuViewport, P, Pagination, PaginationContent, PaginationEllipsis, PaginationFirst, PaginationItem, PaginationLast, PaginationLink, PaginationNext, PaginationPrevious, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, ProductCard, ProfileCard, Progress, RadioGroup, RadioGroupItem, ResizableHandle, ResizablePanel, ResizablePanelGroup, ScrollArea, ScrollBar, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator5 as Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, SimpleAvatar, SimpleCard, SimpleCarousel, SimpleTable, SimpleTabs, SimpleTooltip, Skeleton, SkeletonCard, Slider, Small, Spinner, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, Toast, ToastProvider, Toaster, Toggle, ToggleGroup, ToggleGroupItem, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, Typography, TypographyGroup, alertVariants, avatarVariants, badgeVariants, buttonVariants, cardVariants, checkboxVariants, cn, composeRules, emailRule, emptyVariants, fieldVariants, getInitials, inputGroupVariants, inputVariants, itemVariants, labelVariants, maxLengthRule, maxValueRule, minLengthRule, minValueRule, navigationMenuTriggerStyle, numberRule, patternRule, progressVariants, radioGroupVariants, requiredRule, separatorVariants, skeletonVariants, spinnerVariants, tableVariants, textareaVariants, toastVariants, toggleGroupVariants, toggleVariants, urlRule, useCarousel, useForm, useSidebar, useToast, useWatch };
10850
+ // src/components/ui/charts/chart-theme.ts
10851
+ var getCSSVariable = (name) => {
10852
+ if (typeof window === "undefined") return "";
10853
+ return getComputedStyle(document.documentElement).getPropertyValue(name).trim();
10854
+ };
10855
+ var CHART_COLORS = {
10856
+ primary: "var(--chart-1)",
10857
+ secondary: "var(--chart-2)",
10858
+ tertiary: "var(--chart-3)",
10859
+ quaternary: "var(--chart-4)",
10860
+ quinary: "var(--chart-5)",
10861
+ // Semantic colors (fixed values)
10862
+ success: "#22a55b",
10863
+ warning: "#f59e0b",
10864
+ error: "#ef4444",
10865
+ info: "var(--chart-1)",
10866
+ // Neutral - uses theme variables
10867
+ muted: "var(--muted-foreground)",
10868
+ foreground: "var(--foreground)",
10869
+ background: "var(--background)",
10870
+ grid: "var(--border)"
10871
+ };
10872
+ var CHART_PALETTE = [
10873
+ CHART_COLORS.primary,
10874
+ CHART_COLORS.secondary,
10875
+ CHART_COLORS.tertiary,
10876
+ CHART_COLORS.quaternary,
10877
+ CHART_COLORS.quinary,
10878
+ CHART_COLORS.success,
10879
+ CHART_COLORS.warning,
10880
+ CHART_COLORS.error
10881
+ ];
10882
+ var getThemeColors = () => {
10883
+ const chart1 = getCSSVariable("--chart-1");
10884
+ const primary = getCSSVariable("--primary");
10885
+ return {
10886
+ primary: chart1 || primary || "#007bff",
10887
+ chart1: chart1 || "#007bff",
10888
+ chart2: getCSSVariable("--chart-2") || "#3d9bff",
10889
+ chart3: getCSSVariable("--chart-3") || "#7abaff",
10890
+ chart4: getCSSVariable("--chart-4") || "#0563c7",
10891
+ chart5: getCSSVariable("--chart-5") || "#084f9b",
10892
+ foreground: getCSSVariable("--foreground") || "#23252a",
10893
+ muted: getCSSVariable("--muted-foreground") || "#616875",
10894
+ grid: getCSSVariable("--border") || "#dbdde1",
10895
+ background: getCSSVariable("--background") || "#fff"
10896
+ };
10897
+ };
10898
+ var tooltipStyle = {
10899
+ backgroundColor: "var(--popover)",
10900
+ border: "1px solid var(--border)",
10901
+ borderRadius: "6px",
10902
+ padding: "8px 12px",
10903
+ boxShadow: "0 4px 6px -1px rgb(0 0 0 / 0.1)",
10904
+ color: "var(--foreground)"
10905
+ };
10906
+ var legendStyle = {
10907
+ fontSize: "12px",
10908
+ color: "var(--muted-foreground, #616875)"
10909
+ };
10910
+ function LineChart({
10911
+ data,
10912
+ xAxisKey,
10913
+ lines,
10914
+ width = "100%",
10915
+ height = 300,
10916
+ showGrid = true,
10917
+ showTooltip = true,
10918
+ showLegend = true,
10919
+ showXAxis = true,
10920
+ showYAxis = true,
10921
+ margin = { top: 20, right: 30, left: 20, bottom: 5 },
10922
+ className
10923
+ }) {
10924
+ return /* @__PURE__ */ jsx("div", { className, children: /* @__PURE__ */ jsx(ResponsiveContainer, { width, height, children: /* @__PURE__ */ jsxs(LineChart$1, { data, margin, children: [
10925
+ showGrid && /* @__PURE__ */ jsx(
10926
+ CartesianGrid,
10927
+ {
10928
+ strokeDasharray: "3 3",
10929
+ stroke: CHART_COLORS.grid,
10930
+ strokeOpacity: 0.5
10931
+ }
10932
+ ),
10933
+ showXAxis && /* @__PURE__ */ jsx(
10934
+ XAxis,
10935
+ {
10936
+ dataKey: xAxisKey,
10937
+ stroke: CHART_COLORS.muted,
10938
+ fontSize: 12,
10939
+ tickLine: false,
10940
+ axisLine: false
10941
+ }
10942
+ ),
10943
+ showYAxis && /* @__PURE__ */ jsx(
10944
+ YAxis,
10945
+ {
10946
+ stroke: CHART_COLORS.muted,
10947
+ fontSize: 12,
10948
+ tickLine: false,
10949
+ axisLine: false
10950
+ }
10951
+ ),
10952
+ showTooltip && /* @__PURE__ */ jsx(
10953
+ Tooltip$1,
10954
+ {
10955
+ contentStyle: tooltipStyle,
10956
+ labelStyle: { color: CHART_COLORS.foreground, fontWeight: 500 }
10957
+ }
10958
+ ),
10959
+ showLegend && /* @__PURE__ */ jsx(Legend, {}),
10960
+ lines.map((line, index) => /* @__PURE__ */ jsx(
10961
+ Line,
10962
+ {
10963
+ type: line.type ?? "monotone",
10964
+ dataKey: line.dataKey,
10965
+ name: line.name ?? line.dataKey,
10966
+ stroke: line.stroke ?? CHART_PALETTE[index % CHART_PALETTE.length],
10967
+ strokeWidth: line.strokeWidth ?? 2,
10968
+ dot: line.dot ?? false,
10969
+ activeDot: { r: 4 }
10970
+ },
10971
+ line.dataKey
10972
+ ))
10973
+ ] }) }) });
10974
+ }
10975
+ function BarChart({
10976
+ data,
10977
+ xAxisKey,
10978
+ bars,
10979
+ width = "100%",
10980
+ height = 300,
10981
+ showGrid = true,
10982
+ showTooltip = true,
10983
+ showLegend = true,
10984
+ layout = "horizontal",
10985
+ margin,
10986
+ className
10987
+ }) {
10988
+ const defaultMargin = layout === "vertical" ? { top: 20, right: 30, left: 60, bottom: 5 } : { top: 20, right: 30, left: 20, bottom: 5 };
10989
+ const chartMargin = margin ?? defaultMargin;
10990
+ return /* @__PURE__ */ jsx("div", { className, children: /* @__PURE__ */ jsx(ResponsiveContainer, { width, height, children: /* @__PURE__ */ jsxs(BarChart$1, { data, layout, margin: chartMargin, children: [
10991
+ showGrid && /* @__PURE__ */ jsx(
10992
+ CartesianGrid,
10993
+ {
10994
+ strokeDasharray: "3 3",
10995
+ stroke: CHART_COLORS.grid,
10996
+ strokeOpacity: 0.5
10997
+ }
10998
+ ),
10999
+ layout === "horizontal" ? /* @__PURE__ */ jsxs(Fragment, { children: [
11000
+ /* @__PURE__ */ jsx(
11001
+ XAxis,
11002
+ {
11003
+ dataKey: xAxisKey,
11004
+ stroke: CHART_COLORS.muted,
11005
+ fontSize: 12,
11006
+ tickLine: false,
11007
+ axisLine: false
11008
+ }
11009
+ ),
11010
+ /* @__PURE__ */ jsx(
11011
+ YAxis,
11012
+ {
11013
+ stroke: CHART_COLORS.muted,
11014
+ fontSize: 12,
11015
+ tickLine: false,
11016
+ axisLine: false
11017
+ }
11018
+ )
11019
+ ] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
11020
+ /* @__PURE__ */ jsx(
11021
+ XAxis,
11022
+ {
11023
+ type: "number",
11024
+ domain: [0, "dataMax"],
11025
+ stroke: CHART_COLORS.muted,
11026
+ fontSize: 12,
11027
+ tickLine: false,
11028
+ axisLine: false
11029
+ }
11030
+ ),
11031
+ /* @__PURE__ */ jsx(
11032
+ YAxis,
11033
+ {
11034
+ dataKey: xAxisKey,
11035
+ type: "category",
11036
+ width: 80,
11037
+ stroke: CHART_COLORS.muted,
11038
+ fontSize: 12,
11039
+ tickLine: false,
11040
+ axisLine: false
11041
+ }
11042
+ )
11043
+ ] }),
11044
+ showTooltip && /* @__PURE__ */ jsx(
11045
+ Tooltip$1,
11046
+ {
11047
+ contentStyle: tooltipStyle,
11048
+ labelStyle: { color: CHART_COLORS.foreground, fontWeight: 500 }
11049
+ }
11050
+ ),
11051
+ showLegend && /* @__PURE__ */ jsx(Legend, {}),
11052
+ bars.map((bar, index) => {
11053
+ const defaultRadius = layout === "vertical" ? [0, 4, 4, 0] : [4, 4, 0, 0];
11054
+ return /* @__PURE__ */ jsx(
11055
+ Bar,
11056
+ {
11057
+ dataKey: bar.dataKey,
11058
+ name: bar.name ?? bar.dataKey,
11059
+ fill: bar.fill ?? CHART_PALETTE[index % CHART_PALETTE.length],
11060
+ stackId: bar.stackId,
11061
+ radius: bar.radius ?? defaultRadius
11062
+ },
11063
+ bar.dataKey
11064
+ );
11065
+ })
11066
+ ] }) }) });
11067
+ }
11068
+ function PieChart({
11069
+ data,
11070
+ dataKey = "value",
11071
+ nameKey = "name",
11072
+ width = "100%",
11073
+ height = 300,
11074
+ showTooltip = true,
11075
+ showLegend = true,
11076
+ innerRadius = 0,
11077
+ outerRadius = 80,
11078
+ showLabel = false,
11079
+ margin = { top: 20, right: 30, left: 20, bottom: 5 },
11080
+ className
11081
+ }) {
11082
+ return /* @__PURE__ */ jsx("div", { className, children: /* @__PURE__ */ jsx(ResponsiveContainer, { width, height, children: /* @__PURE__ */ jsxs(PieChart$1, { margin, children: [
11083
+ /* @__PURE__ */ jsx(
11084
+ Pie,
11085
+ {
11086
+ data,
11087
+ dataKey,
11088
+ nameKey,
11089
+ cx: "50%",
11090
+ cy: "50%",
11091
+ innerRadius,
11092
+ outerRadius,
11093
+ label: showLabel,
11094
+ labelLine: showLabel,
11095
+ children: data.map((entry, index) => /* @__PURE__ */ jsx(
11096
+ Cell,
11097
+ {
11098
+ fill: entry.fill ?? CHART_PALETTE[index % CHART_PALETTE.length]
11099
+ },
11100
+ `cell-${index}`
11101
+ ))
11102
+ }
11103
+ ),
11104
+ showTooltip && /* @__PURE__ */ jsx(
11105
+ Tooltip$1,
11106
+ {
11107
+ contentStyle: tooltipStyle,
11108
+ labelStyle: { color: CHART_COLORS.foreground, fontWeight: 500 }
11109
+ }
11110
+ ),
11111
+ showLegend && /* @__PURE__ */ jsx(Legend, {})
11112
+ ] }) }) });
11113
+ }
11114
+ function AreaChart({
11115
+ data,
11116
+ xAxisKey,
11117
+ areas,
11118
+ width = "100%",
11119
+ height = 300,
11120
+ showGrid = true,
11121
+ showTooltip = true,
11122
+ showLegend = true,
11123
+ margin = { top: 20, right: 30, left: 20, bottom: 5 },
11124
+ className
11125
+ }) {
11126
+ return /* @__PURE__ */ jsx("div", { className, children: /* @__PURE__ */ jsx(ResponsiveContainer, { width, height, children: /* @__PURE__ */ jsxs(AreaChart$1, { data, margin, children: [
11127
+ showGrid && /* @__PURE__ */ jsx(
11128
+ CartesianGrid,
11129
+ {
11130
+ strokeDasharray: "3 3",
11131
+ stroke: CHART_COLORS.grid,
11132
+ strokeOpacity: 0.5
11133
+ }
11134
+ ),
11135
+ /* @__PURE__ */ jsx(
11136
+ XAxis,
11137
+ {
11138
+ dataKey: xAxisKey,
11139
+ stroke: CHART_COLORS.muted,
11140
+ fontSize: 12,
11141
+ tickLine: false,
11142
+ axisLine: false
11143
+ }
11144
+ ),
11145
+ /* @__PURE__ */ jsx(
11146
+ YAxis,
11147
+ {
11148
+ stroke: CHART_COLORS.muted,
11149
+ fontSize: 12,
11150
+ tickLine: false,
11151
+ axisLine: false
11152
+ }
11153
+ ),
11154
+ showTooltip && /* @__PURE__ */ jsx(
11155
+ Tooltip$1,
11156
+ {
11157
+ contentStyle: tooltipStyle,
11158
+ labelStyle: { color: CHART_COLORS.foreground, fontWeight: 500 }
11159
+ }
11160
+ ),
11161
+ showLegend && /* @__PURE__ */ jsx(Legend, {}),
11162
+ areas.map((area, index) => {
11163
+ const color = area.stroke ?? CHART_PALETTE[index % CHART_PALETTE.length];
11164
+ return /* @__PURE__ */ jsx(
11165
+ Area,
11166
+ {
11167
+ type: area.type ?? "monotone",
11168
+ dataKey: area.dataKey,
11169
+ name: area.name ?? area.dataKey,
11170
+ stroke: color,
11171
+ fill: area.fill ?? color,
11172
+ fillOpacity: area.fillOpacity ?? 0.3,
11173
+ stackId: area.stackId
11174
+ },
11175
+ area.dataKey
11176
+ );
11177
+ })
11178
+ ] }) }) });
11179
+ }
11180
+ function ScatterChart({
11181
+ series,
11182
+ xAxisKey,
11183
+ yAxisKey,
11184
+ zAxisKey,
11185
+ width = "100%",
11186
+ height = 300,
11187
+ showGrid = true,
11188
+ showTooltip = true,
11189
+ showLegend = true,
11190
+ margin = { top: 20, right: 30, left: 20, bottom: 5 },
11191
+ className
11192
+ }) {
11193
+ return /* @__PURE__ */ jsx("div", { className, children: /* @__PURE__ */ jsx(ResponsiveContainer, { width, height, children: /* @__PURE__ */ jsxs(ScatterChart$1, { margin, children: [
11194
+ showGrid && /* @__PURE__ */ jsx(
11195
+ CartesianGrid,
11196
+ {
11197
+ strokeDasharray: "3 3",
11198
+ stroke: CHART_COLORS.grid,
11199
+ strokeOpacity: 0.5
11200
+ }
11201
+ ),
11202
+ /* @__PURE__ */ jsx(
11203
+ XAxis,
11204
+ {
11205
+ dataKey: xAxisKey,
11206
+ type: "number",
11207
+ stroke: CHART_COLORS.muted,
11208
+ fontSize: 12,
11209
+ tickLine: false,
11210
+ axisLine: false
11211
+ }
11212
+ ),
11213
+ /* @__PURE__ */ jsx(
11214
+ YAxis,
11215
+ {
11216
+ dataKey: yAxisKey,
11217
+ type: "number",
11218
+ stroke: CHART_COLORS.muted,
11219
+ fontSize: 12,
11220
+ tickLine: false,
11221
+ axisLine: false
11222
+ }
11223
+ ),
11224
+ zAxisKey && /* @__PURE__ */ jsx(ZAxis, { dataKey: zAxisKey, range: [60, 400] }),
11225
+ showTooltip && /* @__PURE__ */ jsx(
11226
+ Tooltip$1,
11227
+ {
11228
+ contentStyle: tooltipStyle,
11229
+ labelStyle: { color: CHART_COLORS.foreground, fontWeight: 500 },
11230
+ cursor: { strokeDasharray: "3 3" }
11231
+ }
11232
+ ),
11233
+ showLegend && /* @__PURE__ */ jsx(Legend, {}),
11234
+ series.map((s, index) => /* @__PURE__ */ jsx(
11235
+ Scatter,
11236
+ {
11237
+ name: s.name,
11238
+ data: s.data,
11239
+ fill: s.fill ?? CHART_PALETTE[index % CHART_PALETTE.length]
11240
+ },
11241
+ s.name
11242
+ ))
11243
+ ] }) }) });
11244
+ }
11245
+ function RadarChart({
11246
+ data,
11247
+ angleKey,
11248
+ radars,
11249
+ width = "100%",
11250
+ height = 300,
11251
+ showTooltip = true,
11252
+ showLegend = true,
11253
+ outerRadius = "80%",
11254
+ margin = { top: 20, right: 30, left: 20, bottom: 5 },
11255
+ domain,
11256
+ className
11257
+ }) {
11258
+ return /* @__PURE__ */ jsx("div", { className, children: /* @__PURE__ */ jsx(ResponsiveContainer, { width, height, children: /* @__PURE__ */ jsxs(
11259
+ RadarChart$1,
11260
+ {
11261
+ data,
11262
+ margin,
11263
+ outerRadius,
11264
+ children: [
11265
+ /* @__PURE__ */ jsx(PolarGrid, { stroke: CHART_COLORS.grid, strokeOpacity: 0.5 }),
11266
+ /* @__PURE__ */ jsx(
11267
+ PolarAngleAxis,
11268
+ {
11269
+ dataKey: angleKey,
11270
+ stroke: CHART_COLORS.muted,
11271
+ fontSize: 12
11272
+ }
11273
+ ),
11274
+ /* @__PURE__ */ jsx(
11275
+ PolarRadiusAxis,
11276
+ {
11277
+ stroke: CHART_COLORS.muted,
11278
+ fontSize: 10,
11279
+ angle: 90,
11280
+ domain
11281
+ }
11282
+ ),
11283
+ showTooltip && /* @__PURE__ */ jsx(
11284
+ Tooltip$1,
11285
+ {
11286
+ contentStyle: tooltipStyle,
11287
+ labelStyle: { color: CHART_COLORS.foreground, fontWeight: 500 }
11288
+ }
11289
+ ),
11290
+ showLegend && /* @__PURE__ */ jsx(Legend, {}),
11291
+ radars.map((radar, index) => {
11292
+ const color = radar.stroke ?? CHART_PALETTE[index % CHART_PALETTE.length];
11293
+ return /* @__PURE__ */ jsx(
11294
+ Radar,
11295
+ {
11296
+ name: radar.name ?? radar.dataKey,
11297
+ dataKey: radar.dataKey,
11298
+ stroke: color,
11299
+ fill: radar.fill ?? color,
11300
+ fillOpacity: radar.fillOpacity ?? 0.3
11301
+ },
11302
+ radar.dataKey
11303
+ );
11304
+ })
11305
+ ]
11306
+ }
11307
+ ) }) });
11308
+ }
11309
+ var THEMES = {
11310
+ default: "default",
11311
+ sunset: "sunset",
11312
+ lavender: "lavender",
11313
+ rose: "rose",
11314
+ slate: "slate",
11315
+ midnight: "midnight",
11316
+ emerald: "emerald",
11317
+ amber: "amber",
11318
+ crimson: "crimson"
11319
+ };
11320
+ var THEME_CATALOG = [
11321
+ {
11322
+ name: "default",
11323
+ label: "Default (Toss Blue)",
11324
+ description: "Clean, professional blue theme",
11325
+ primaryColor: "hsl(211, 100%, 50%)"
11326
+ },
11327
+ {
11328
+ name: "sunset",
11329
+ label: "Sunset",
11330
+ description: "Warm orange for energy and creativity",
11331
+ primaryColor: "hsl(24, 95%, 53%)"
11332
+ },
11333
+ {
11334
+ name: "lavender",
11335
+ label: "Lavender",
11336
+ description: "Elegant purple for creative projects",
11337
+ primaryColor: "hsl(262, 83%, 58%)"
11338
+ },
11339
+ {
11340
+ name: "rose",
11341
+ label: "Rose",
11342
+ description: "Soft pink for modern, approachable design",
11343
+ primaryColor: "hsl(346, 77%, 50%)"
11344
+ },
11345
+ {
11346
+ name: "slate",
11347
+ label: "Slate",
11348
+ description: "Minimal gray for clean, professional look",
11349
+ primaryColor: "hsl(215, 16%, 47%)"
11350
+ },
11351
+ {
11352
+ name: "midnight",
11353
+ label: "Midnight",
11354
+ description: "Deep purple-blue optimized for dark mode",
11355
+ primaryColor: "hsl(240, 65%, 52%)"
11356
+ },
11357
+ {
11358
+ name: "emerald",
11359
+ label: "Emerald",
11360
+ description: "Fresh teal-green for tech-forward apps",
11361
+ primaryColor: "hsl(160, 84%, 39%)"
11362
+ },
11363
+ {
11364
+ name: "amber",
11365
+ label: "Amber",
11366
+ description: "Premium gold for attention-grabbing UI",
11367
+ primaryColor: "hsl(38, 92%, 50%)"
11368
+ },
11369
+ {
11370
+ name: "crimson",
11371
+ label: "Crimson",
11372
+ description: "Bold red for urgent, passionate design",
11373
+ primaryColor: "hsl(0, 84%, 50%)"
11374
+ }
11375
+ ];
11376
+ function getCurrentTheme() {
11377
+ if (typeof document === "undefined") return "default";
11378
+ const html = document.documentElement;
11379
+ for (const theme of Object.keys(THEMES)) {
11380
+ if (theme !== "default" && html.classList.contains(`theme-${theme}`)) {
11381
+ return theme;
11382
+ }
11383
+ }
11384
+ return "default";
11385
+ }
11386
+ function getCurrentMode() {
11387
+ if (typeof document === "undefined") return "light";
11388
+ return document.documentElement.classList.contains("dark") ? "dark" : "light";
11389
+ }
11390
+ function setTheme(theme) {
11391
+ if (typeof document === "undefined") return;
11392
+ const html = document.documentElement;
11393
+ for (const t of Object.keys(THEMES)) {
11394
+ if (t !== "default") {
11395
+ html.classList.remove(`theme-${t}`);
11396
+ }
11397
+ }
11398
+ if (theme !== "default") {
11399
+ html.classList.add(`theme-${theme}`);
11400
+ }
11401
+ try {
11402
+ localStorage.setItem("mvn-theme", theme);
11403
+ } catch {
11404
+ }
11405
+ }
11406
+ function setMode(mode) {
11407
+ if (typeof document === "undefined") return;
11408
+ const html = document.documentElement;
11409
+ if (mode === "system") {
11410
+ const prefersDark = window.matchMedia("(prefers-color-scheme: dark)").matches;
11411
+ html.classList.toggle("dark", prefersDark);
11412
+ } else {
11413
+ html.classList.toggle("dark", mode === "dark");
11414
+ }
11415
+ try {
11416
+ localStorage.setItem("mvn-mode", mode);
11417
+ } catch {
11418
+ }
11419
+ }
11420
+ function initializeTheme() {
11421
+ if (typeof window === "undefined") return;
11422
+ try {
11423
+ const savedTheme = localStorage.getItem("mvn-theme");
11424
+ const savedMode = localStorage.getItem("mvn-mode");
11425
+ if (savedTheme && savedTheme in THEMES) {
11426
+ setTheme(savedTheme);
11427
+ }
11428
+ if (savedMode) {
11429
+ setMode(savedMode);
11430
+ } else {
11431
+ setMode("system");
11432
+ }
11433
+ } catch {
11434
+ }
11435
+ }
11436
+ var ThemeContext = createContext(void 0);
11437
+ function ThemeProvider({
11438
+ children,
11439
+ defaultTheme = "default",
11440
+ defaultMode = "system",
11441
+ storageKey = "mvn-theme"
11442
+ }) {
11443
+ const [theme, setThemeState] = useState(defaultTheme);
11444
+ const [mode, setModeState] = useState(defaultMode);
11445
+ const [resolvedMode, setResolvedMode] = useState("light");
11446
+ useEffect(() => {
11447
+ try {
11448
+ const savedTheme = localStorage.getItem(storageKey);
11449
+ const savedMode = localStorage.getItem(`${storageKey}-mode`);
11450
+ if (savedTheme && savedTheme in THEMES) {
11451
+ setThemeState(savedTheme);
11452
+ }
11453
+ if (savedMode) {
11454
+ setModeState(savedMode);
11455
+ }
11456
+ } catch {
11457
+ }
11458
+ }, [storageKey]);
11459
+ useEffect(() => {
11460
+ const html = document.documentElement;
11461
+ for (const t of Object.keys(THEMES)) {
11462
+ if (t !== "default") {
11463
+ html.classList.remove(`theme-${t}`);
11464
+ }
11465
+ }
11466
+ if (theme !== "default") {
11467
+ html.classList.add(`theme-${theme}`);
11468
+ }
11469
+ try {
11470
+ localStorage.setItem(storageKey, theme);
11471
+ } catch {
11472
+ }
11473
+ }, [theme, storageKey]);
11474
+ useEffect(() => {
11475
+ const html = document.documentElement;
11476
+ const applyMode = (isDark) => {
11477
+ html.classList.toggle("dark", isDark);
11478
+ setResolvedMode(isDark ? "dark" : "light");
11479
+ };
11480
+ if (mode === "system") {
11481
+ const mediaQuery = window.matchMedia("(prefers-color-scheme: dark)");
11482
+ applyMode(mediaQuery.matches);
11483
+ const handler = (e) => applyMode(e.matches);
11484
+ mediaQuery.addEventListener("change", handler);
11485
+ return () => mediaQuery.removeEventListener("change", handler);
11486
+ } else {
11487
+ applyMode(mode === "dark");
11488
+ }
11489
+ try {
11490
+ localStorage.setItem(`${storageKey}-mode`, mode);
11491
+ } catch {
11492
+ }
11493
+ }, [mode, storageKey]);
11494
+ const value = {
11495
+ theme,
11496
+ mode,
11497
+ resolvedMode,
11498
+ setTheme: setThemeState,
11499
+ setMode: setModeState
11500
+ };
11501
+ return /* @__PURE__ */ jsx(ThemeContext.Provider, { value, children });
11502
+ }
11503
+ function useTheme2() {
11504
+ const context = useContext(ThemeContext);
11505
+ if (!context) {
11506
+ throw new Error("useTheme must be used within a ThemeProvider");
11507
+ }
11508
+ return context;
11509
+ }
11510
+
11511
+ export { Accordion, Alert, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AreaChart, AspectRatio, Avatar, AvatarFallback, AvatarGroup, AvatarImage, Badge, BarChart, Blockquote, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, ButtonGroup, ButtonGroupSeparator, ButtonGroupText, CHART_COLORS, CHART_PALETTE, Calendar, CalendarDayButton, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Carousel, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious, Checkbox, Collapsible, CollapsibleContent, CollapsibleItem, CollapsibleTrigger, Combobox, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuPortal, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, DataTable, DatePicker, DateRangePicker, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DotsSpinner, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, Empty, Field, Form, FormItem, FormList, H1, H2, H3, H4, HoverCard, HoverCardContent, HoverCardTrigger, IconButton, InlineCode, Input, InputGroup, InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot, Item9 as Item, ItemGroup, ItemList, ItemSeparator, Label, Lead, LineChart, List3 as List, ListItem, Menubar, MenubarCheckboxItem, MenubarContent, MenubarGroup, MenubarItem, MenubarLabel, MenubarMenu, MenubarPortal, MenubarRadioGroup, MenubarRadioItem, MenubarSeparator, MenubarShortcut, MenubarSub, MenubarSubContent, MenubarSubTrigger, MenubarTrigger, Muted, NavigationMenu, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, NavigationMenuViewport, P, Pagination, PaginationContent, PaginationEllipsis, PaginationFirst, PaginationItem, PaginationLast, PaginationLink, PaginationNext, PaginationPrevious, PieChart, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, ProductCard, ProfileCard, Progress, RadarChart, RadioGroup, RadioGroupItem, ResizableHandle, ResizablePanel, ResizablePanelGroup, ScatterChart, ScrollArea, ScrollBar, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator5 as Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, SimpleAvatar, SimpleCard, SimpleCarousel, SimpleTable, SimpleTabs, SimpleTooltip, Skeleton, SkeletonCard, Slider, Small, Spinner, Switch, THEMES, THEME_CATALOG, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, ThemeProvider, Toast, ToastProvider, Toaster, Toggle, ToggleGroup, ToggleGroupItem, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, Typography, TypographyGroup, alertVariants, avatarVariants, badgeVariants, buttonVariants, cardVariants, checkboxVariants, cn, composeRules, emailRule, emptyVariants, fieldVariants, getCurrentMode, getCurrentTheme, getInitials, getThemeColors, initializeTheme, inputGroupVariants, inputVariants, itemVariants, labelVariants, legendStyle, maxLengthRule, maxValueRule, minLengthRule, minValueRule, navigationMenuTriggerStyle, numberRule, patternRule, progressVariants, radioGroupVariants, requiredRule, separatorVariants, setMode, setTheme, skeletonVariants, spinnerVariants, tableVariants, textareaVariants, toastVariants, toggleGroupVariants, toggleVariants, tooltipStyle, urlRule, useCarousel, useForm, useSidebar, useTheme2 as useTheme, useToast, useWatch };
10507
11512
  //# sourceMappingURL=index.mjs.map
10508
11513
  //# sourceMappingURL=index.mjs.map