@hai3/uikit 0.1.0-alpha.6 → 0.1.0-alpha.9

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.js CHANGED
@@ -1,12 +1,12 @@
1
- import * as AspectRatioPrimitive from '@radix-ui/react-aspect-ratio';
2
- import { jsx, jsxs } from 'react/jsx-runtime';
3
- import * as React20 from 'react';
4
- import React20__default from 'react';
5
- import * as AvatarPrimitive from '@radix-ui/react-avatar';
1
+ import { cva } from 'class-variance-authority';
6
2
  import { clsx } from 'clsx';
7
3
  import { twMerge } from 'tailwind-merge';
4
+ import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
5
+ import * as AspectRatioPrimitive from '@radix-ui/react-aspect-ratio';
6
+ import * as React24 from 'react';
7
+ import React24__default, { useMemo } from 'react';
8
+ import * as AvatarPrimitive from '@radix-ui/react-avatar';
8
9
  import { Slot } from '@radix-ui/react-slot';
9
- import { cva } from 'class-variance-authority';
10
10
  import { ButtonSize, ButtonVariant, IconButtonSize } from '@hai3/uikit-contracts';
11
11
  export { ButtonSize, ButtonVariant, IconButtonSize } from '@hai3/uikit-contracts';
12
12
  import { getDefaultClassNames, DayPicker } from 'react-day-picker';
@@ -14,11 +14,19 @@ import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
14
14
  import * as RadioGroupPrimitive from '@radix-ui/react-radio-group';
15
15
  import { OTPInput, OTPInputContext } from 'input-otp';
16
16
  import * as LabelPrimitive from '@radix-ui/react-label';
17
+ import * as SeparatorPrimitive from '@radix-ui/react-separator';
18
+ import { FormProvider, Controller, useFormContext, useFormState } from 'react-hook-form';
17
19
  import * as SwitchPrimitives from '@radix-ui/react-switch';
18
- import { Loader2, X, ArrowLeft, ArrowRight, ChevronRight, MoreHorizontal, GripVertical, User, Bot, Paperclip, Send, Plus, Search } from 'lucide-react';
20
+ import { useReactTable, getFilteredRowModel, getSortedRowModel, getPaginationRowModel, getCoreRowModel, flexRender } from '@tanstack/react-table';
21
+ export { flexRender, getCoreRowModel, getFilteredRowModel, getPaginationRowModel, getSortedRowModel, useReactTable } from '@tanstack/react-table';
22
+ import { Loader2, X, ArrowLeft, ArrowRight, ChevronsLeft, ChevronLeft, ChevronRight, ChevronsRight, ArrowDown, ArrowUp, ChevronsUpDown, EyeOff, Settings2, XOctagon, AlertTriangle, Info, CheckCircle2, MoreHorizontal, GripVertical, User, Bot, Paperclip, Send, Plus, Search } from 'lucide-react';
23
+ import * as SelectPrimitive from '@radix-ui/react-select';
24
+ import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
19
25
  import { trim, toUpper } from 'lodash';
20
26
  import * as SliderPrimitive from '@radix-ui/react-slider';
21
27
  import * as ProgressPrimitive from '@radix-ui/react-progress';
28
+ import { Toaster as Toaster$1 } from 'sonner';
29
+ export { toast } from 'sonner';
22
30
  import * as TooltipPrimitive from '@radix-ui/react-tooltip';
23
31
  import * as PopoverPrimitive from '@radix-ui/react-popover';
24
32
  import * as HoverCardPrimitive from '@radix-ui/react-hover-card';
@@ -26,28 +34,176 @@ import * as NavigationMenuPrimitive from '@radix-ui/react-navigation-menu';
26
34
  import * as MenubarPrimitive from '@radix-ui/react-menubar';
27
35
  import * as TabsPrimitive from '@radix-ui/react-tabs';
28
36
  import * as SheetPrimitive from '@radix-ui/react-dialog';
37
+ import * as AlertDialogPrimitive from '@radix-ui/react-alert-dialog';
29
38
  import { Drawer as Drawer$1 } from 'vaul';
30
39
  import * as ResizablePrimitive from 'react-resizable-panels';
31
40
  import * as ScrollAreaPrimitive from '@radix-ui/react-scroll-area';
32
- import * as SeparatorPrimitive from '@radix-ui/react-separator';
33
41
  import * as AccordionPrimitive from '@radix-ui/react-accordion';
34
42
  import useEmblaCarousel from 'embla-carousel-react';
35
43
  import * as CollapsiblePrimitive from '@radix-ui/react-collapsible';
36
44
  export { Area, AreaChart, Bar, BarChart, Brush, CartesianGrid, Cell, Label as ChartLabel, Legend as ChartLegend, Tooltip as ChartTooltip, ComposedChart, Cross, Curve, Customized, Dot, ErrorBar, Funnel, FunnelChart, LabelList, Line, LineChart, Pie, PieChart, PolarAngleAxis, PolarGrid, PolarRadiusAxis, Polygon, Radar, RadarChart, RadialBar, RadialBarChart, Rectangle, ReferenceArea, ReferenceDot, ReferenceLine, ResponsiveContainer, Sankey, Scatter, ScatterChart, Sector, Text, Treemap, XAxis, YAxis, ZAxis } from 'recharts';
37
- import * as SelectPrimitive from '@radix-ui/react-select';
38
- import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
39
45
  import * as ContextMenuPrimitive from '@radix-ui/react-context-menu';
46
+ import { format } from 'date-fns';
40
47
 
41
- // src/base/aspect-ratio.tsx
48
+ // src/base/alert.tsx
49
+ function cn(...inputs) {
50
+ return twMerge(clsx(inputs));
51
+ }
52
+ var alertVariants = cva(
53
+ "relative w-full rounded-lg border px-4 py-3 text-sm grid has-[>svg]:grid-cols-[calc(var(--spacing)*4)_1fr] grid-cols-[0_1fr] has-[>svg]:gap-x-3 gap-y-0.5 items-start [&>svg]:size-4 [&>svg]:translate-y-0.5 [&>svg]:text-current",
54
+ {
55
+ variants: {
56
+ variant: {
57
+ default: "bg-card text-card-foreground",
58
+ destructive: "text-destructive bg-card [&>svg]:text-current [&_[data-slot=alert-description]]:text-destructive/90"
59
+ }
60
+ },
61
+ defaultVariants: {
62
+ variant: "default"
63
+ }
64
+ }
65
+ );
66
+ function Alert({
67
+ className,
68
+ variant,
69
+ ...props
70
+ }) {
71
+ return /* @__PURE__ */ jsx(
72
+ "div",
73
+ {
74
+ "data-slot": "alert",
75
+ role: "alert",
76
+ className: cn(alertVariants({ variant }), className),
77
+ ...props
78
+ }
79
+ );
80
+ }
81
+ function AlertTitle({ className, ...props }) {
82
+ return /* @__PURE__ */ jsx(
83
+ "div",
84
+ {
85
+ "data-slot": "alert-title",
86
+ className: cn(
87
+ "col-start-2 line-clamp-1 min-h-4 font-medium tracking-tight",
88
+ className
89
+ ),
90
+ ...props
91
+ }
92
+ );
93
+ }
94
+ function AlertDescription({
95
+ className,
96
+ ...props
97
+ }) {
98
+ return /* @__PURE__ */ jsx(
99
+ "div",
100
+ {
101
+ "data-slot": "alert-description",
102
+ className: cn(
103
+ "text-muted-foreground col-start-2 grid justify-items-start gap-1 text-sm [&_p]:leading-relaxed",
104
+ className
105
+ ),
106
+ ...props
107
+ }
108
+ );
109
+ }
42
110
  function AspectRatio({
43
111
  ...props
44
112
  }) {
45
113
  return /* @__PURE__ */ jsx(AspectRatioPrimitive.Root, { "data-slot": "aspect-ratio", ...props });
46
114
  }
47
- function cn(...inputs) {
48
- return twMerge(clsx(inputs));
115
+ function Empty({ className, ...props }) {
116
+ return /* @__PURE__ */ jsx(
117
+ "div",
118
+ {
119
+ "data-slot": "empty",
120
+ className: cn(
121
+ "flex min-w-0 flex-1 flex-col items-center justify-center gap-6 rounded-lg border-dashed p-6 text-center text-balance md:p-12",
122
+ className
123
+ ),
124
+ ...props
125
+ }
126
+ );
127
+ }
128
+ function EmptyHeader({ className, ...props }) {
129
+ return /* @__PURE__ */ jsx(
130
+ "div",
131
+ {
132
+ "data-slot": "empty-header",
133
+ className: cn(
134
+ "flex max-w-sm flex-col items-center gap-2 text-center",
135
+ className
136
+ ),
137
+ ...props
138
+ }
139
+ );
140
+ }
141
+ var emptyMediaVariants = cva(
142
+ "flex shrink-0 items-center justify-center mb-2 [&_svg]:pointer-events-none [&_svg]:shrink-0",
143
+ {
144
+ variants: {
145
+ variant: {
146
+ default: "bg-transparent",
147
+ icon: "bg-muted text-foreground flex size-10 shrink-0 items-center justify-center rounded-lg [&_svg:not([class*='size-'])]:size-6"
148
+ }
149
+ },
150
+ defaultVariants: {
151
+ variant: "default"
152
+ }
153
+ }
154
+ );
155
+ function EmptyMedia({
156
+ className,
157
+ variant = "default",
158
+ ...props
159
+ }) {
160
+ return /* @__PURE__ */ jsx(
161
+ "div",
162
+ {
163
+ "data-slot": "empty-media",
164
+ "data-variant": variant,
165
+ className: cn(emptyMediaVariants({ variant, className })),
166
+ ...props
167
+ }
168
+ );
169
+ }
170
+ function EmptyTitle({ className, ...props }) {
171
+ return /* @__PURE__ */ jsx(
172
+ "div",
173
+ {
174
+ "data-slot": "empty-title",
175
+ className: cn("text-lg font-medium tracking-tight", className),
176
+ ...props
177
+ }
178
+ );
179
+ }
180
+ function EmptyDescription({ className, ...props }) {
181
+ return /* @__PURE__ */ jsx(
182
+ "div",
183
+ {
184
+ "data-slot": "empty-description",
185
+ className: cn(
186
+ "text-muted-foreground [&>a:hover]:text-primary text-sm/relaxed [&>a]:underline [&>a]:underline-offset-4",
187
+ className
188
+ ),
189
+ ...props
190
+ }
191
+ );
192
+ }
193
+ function EmptyContent({ className, ...props }) {
194
+ return /* @__PURE__ */ jsx(
195
+ "div",
196
+ {
197
+ "data-slot": "empty-content",
198
+ className: cn(
199
+ "flex w-full max-w-sm min-w-0 flex-col items-center gap-4 text-sm text-balance",
200
+ className
201
+ ),
202
+ ...props
203
+ }
204
+ );
49
205
  }
50
- var Avatar = React20.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
206
+ var Avatar = React24.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
51
207
  AvatarPrimitive.Root,
52
208
  {
53
209
  ref,
@@ -59,7 +215,7 @@ var Avatar = React20.forwardRef(({ className, ...props }, ref) => /* @__PURE__ *
59
215
  }
60
216
  ));
61
217
  Avatar.displayName = AvatarPrimitive.Root.displayName;
62
- var AvatarImage = React20.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
218
+ var AvatarImage = React24.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
63
219
  AvatarPrimitive.Image,
64
220
  {
65
221
  ref,
@@ -68,7 +224,7 @@ var AvatarImage = React20.forwardRef(({ className, ...props }, ref) => /* @__PUR
68
224
  }
69
225
  ));
70
226
  AvatarImage.displayName = AvatarPrimitive.Image.displayName;
71
- var AvatarFallback = React20.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
227
+ var AvatarFallback = React24.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
72
228
  AvatarPrimitive.Fallback,
73
229
  {
74
230
  ref,
@@ -105,7 +261,7 @@ var buttonVariants = cva(
105
261
  }
106
262
  }
107
263
  );
108
- var Button = React20.forwardRef(
264
+ var Button = React24.forwardRef(
109
265
  ({ className, variant, size, asChild = false, ...props }, ref) => {
110
266
  const Comp = asChild ? Slot : "button";
111
267
  return /* @__PURE__ */ jsx(
@@ -352,8 +508,8 @@ function CalendarDayButton({
352
508
  ...props
353
509
  }) {
354
510
  const defaultClassNames = getDefaultClassNames();
355
- const ref = React20.useRef(null);
356
- React20.useEffect(() => {
511
+ const ref = React24.useRef(null);
512
+ React24.useEffect(() => {
357
513
  if (modifiers.focused) ref.current?.focus();
358
514
  }, [modifiers.focused]);
359
515
  return /* @__PURE__ */ jsx(
@@ -573,7 +729,7 @@ function InputOTPSlot({
573
729
  className,
574
730
  ...props
575
731
  }) {
576
- const inputOTPContext = React20.useContext(OTPInputContext);
732
+ const inputOTPContext = React24.useContext(OTPInputContext);
577
733
  const { char, hasFakeCaret, isActive } = inputOTPContext?.slots[index] ?? {};
578
734
  return /* @__PURE__ */ jsxs(
579
735
  "div",
@@ -595,7 +751,7 @@ function InputOTPSlot({
595
751
  function InputOTPSeparator({ ...props }) {
596
752
  return /* @__PURE__ */ jsx("div", { "data-slot": "input-otp-separator", role: "separator", ...props, children: /* @__PURE__ */ jsx(MinusIcon, {}) });
597
753
  }
598
- var Input = React20.forwardRef(
754
+ var Input = React24.forwardRef(
599
755
  ({ className, type, ...props }, ref) => {
600
756
  return /* @__PURE__ */ jsx(
601
757
  "input",
@@ -628,117 +784,1059 @@ function Label({
628
784
  }
629
785
  );
630
786
  }
631
- var Textarea = React20.forwardRef(
632
- ({ className, autoResize = false, minHeight = 50, maxHeight = 350, size = "default", onChange, ...props }, ref) => {
633
- const internalRef = React20.useRef(null);
634
- React20.useImperativeHandle(ref, () => internalRef.current);
635
- const sizeClasses = {
636
- sm: "min-h-11 h-11",
637
- // 44px / 2.75rem - exact height
638
- default: "min-h-[60px]",
639
- // 60px / 3.75rem
640
- lg: "min-h-20"
641
- // 80px / 5rem
642
- };
643
- const paddingClasses = {
644
- sm: "py-3",
645
- // 12px top + 12px bottom + 20px line-height = 44px
646
- default: "py-2",
647
- // 8px top + 8px bottom (default)
648
- lg: "py-2"
649
- // 8px top + 8px bottom (default)
650
- };
651
- const handleResize = React20.useCallback(() => {
652
- if (autoResize && size !== "sm" && internalRef.current) {
653
- const textarea = internalRef.current;
654
- textarea.style.height = "auto";
655
- const scrollHeight = textarea.scrollHeight;
656
- textarea.style.height = `${Math.min(Math.max(scrollHeight, minHeight), maxHeight)}px`;
657
- }
658
- }, [autoResize, size, minHeight, maxHeight]);
659
- React20.useEffect(() => {
660
- handleResize();
661
- }, [handleResize, props.value]);
662
- const handleChange = React20.useCallback(
663
- (e) => {
664
- handleResize();
665
- onChange?.(e);
666
- },
667
- [onChange, handleResize]
668
- );
669
- return /* @__PURE__ */ jsx(
670
- "textarea",
671
- {
672
- className: cn(
673
- "flex w-full rounded-md border border-input bg-transparent px-3 text-base shadow-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",
674
- sizeClasses[size],
675
- paddingClasses[size],
676
- className
677
- ),
678
- ref: internalRef,
679
- onChange: handleChange,
680
- ...props
681
- }
682
- );
683
- }
684
- );
685
- Textarea.displayName = "Textarea";
686
- var Switch = React20.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
687
- SwitchPrimitives.Root,
688
- {
689
- className: cn(
690
- "peer inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent shadow-sm transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",
691
- className
692
- ),
693
- ...props,
694
- ref,
695
- children: /* @__PURE__ */ jsx(
696
- SwitchPrimitives.Thumb,
697
- {
698
- className: cn(
699
- "pointer-events-none block h-4 w-4 rounded-full bg-background shadow-lg ring-0 transition-transform",
700
- "data-[state=checked]:ltr:translate-x-4 data-[state=checked]:rtl:-translate-x-4",
701
- "data-[state=unchecked]:translate-x-0"
702
- )
703
- }
704
- )
705
- }
706
- ));
707
- Switch.displayName = SwitchPrimitives.Root.displayName;
708
- function Skeleton({
787
+ function Separator({
709
788
  className,
710
- inheritColor = false,
789
+ orientation = "horizontal",
790
+ decorative = true,
791
+ ...props
792
+ }) {
793
+ return /* @__PURE__ */ jsx(
794
+ SeparatorPrimitive.Root,
795
+ {
796
+ "data-slot": "separator",
797
+ decorative,
798
+ orientation,
799
+ className: cn(
800
+ "bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",
801
+ className
802
+ ),
803
+ ...props
804
+ }
805
+ );
806
+ }
807
+ function FieldSet({ className, ...props }) {
808
+ return /* @__PURE__ */ jsx(
809
+ "fieldset",
810
+ {
811
+ "data-slot": "field-set",
812
+ className: cn(
813
+ "flex flex-col gap-6",
814
+ "has-[>[data-slot=checkbox-group]]:gap-3 has-[>[data-slot=radio-group]]:gap-3",
815
+ className
816
+ ),
817
+ ...props
818
+ }
819
+ );
820
+ }
821
+ function FieldLegend({
822
+ className,
823
+ variant = "legend",
711
824
  ...props
712
825
  }) {
826
+ return /* @__PURE__ */ jsx(
827
+ "legend",
828
+ {
829
+ "data-slot": "field-legend",
830
+ "data-variant": variant,
831
+ className: cn(
832
+ "mb-3 font-medium",
833
+ "data-[variant=legend]:text-base",
834
+ "data-[variant=label]:text-sm",
835
+ className
836
+ ),
837
+ ...props
838
+ }
839
+ );
840
+ }
841
+ function FieldGroup({ className, ...props }) {
713
842
  return /* @__PURE__ */ jsx(
714
843
  "div",
715
844
  {
845
+ "data-slot": "field-group",
716
846
  className: cn(
717
- "animate-pulse rounded-md",
718
- inheritColor ? "bg-current opacity-20" : "bg-muted",
847
+ "group/field-group @container/field-group flex w-full flex-col gap-7 data-[slot=checkbox-group]:gap-3 [&>[data-slot=field-group]]:gap-4",
719
848
  className
720
849
  ),
721
850
  ...props
722
851
  }
723
852
  );
724
853
  }
725
- var Spinner = React20.forwardRef(
726
- ({ className, icon: Icon2 = Loader2, size = "size-4", ...props }, ref) => {
727
- const textColorClasses = className?.match(/\btext-\S+/g)?.join(" ") || "";
728
- const wrapperClasses = trim(className?.replace(/\btext-\S+/g, "") || "");
729
- return /* @__PURE__ */ jsx(
730
- "div",
731
- {
732
- ref,
733
- className: cn("inline-flex items-center justify-center", wrapperClasses),
734
- ...props,
735
- children: /* @__PURE__ */ jsx(Icon2, { className: cn("animate-spin", size, textColorClasses) })
854
+ var fieldVariants = cva(
855
+ "group/field flex w-full gap-3 data-[invalid=true]:text-destructive",
856
+ {
857
+ variants: {
858
+ orientation: {
859
+ vertical: ["flex-col [&>*]:w-full [&>.sr-only]:w-auto"],
860
+ horizontal: [
861
+ "flex-row items-center",
862
+ "[&>[data-slot=field-label]]:flex-auto",
863
+ "has-[>[data-slot=field-content]]:items-start has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px"
864
+ ],
865
+ responsive: [
866
+ "flex-col [&>*]:w-full [&>.sr-only]:w-auto @md/field-group:flex-row @md/field-group:items-center @md/field-group:[&>*]:w-auto",
867
+ "@md/field-group:[&>[data-slot=field-label]]:flex-auto",
868
+ "@md/field-group:has-[>[data-slot=field-content]]:items-start @md/field-group:has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px"
869
+ ]
736
870
  }
737
- );
738
- }
871
+ },
872
+ defaultVariants: {
873
+ orientation: "vertical"
874
+ }
875
+ }
876
+ );
877
+ function Field({
878
+ className,
879
+ orientation = "vertical",
880
+ ...props
881
+ }) {
882
+ return /* @__PURE__ */ jsx(
883
+ "div",
884
+ {
885
+ role: "group",
886
+ "data-slot": "field",
887
+ "data-orientation": orientation,
888
+ className: cn(fieldVariants({ orientation }), className),
889
+ ...props
890
+ }
891
+ );
892
+ }
893
+ function FieldContent({ className, ...props }) {
894
+ return /* @__PURE__ */ jsx(
895
+ "div",
896
+ {
897
+ "data-slot": "field-content",
898
+ className: cn(
899
+ "group/field-content flex flex-1 flex-col gap-1.5 leading-snug",
900
+ className
901
+ ),
902
+ ...props
903
+ }
904
+ );
905
+ }
906
+ function FieldLabel({
907
+ className,
908
+ ...props
909
+ }) {
910
+ return /* @__PURE__ */ jsx(
911
+ Label,
912
+ {
913
+ "data-slot": "field-label",
914
+ className: cn(
915
+ "group/field-label peer/field-label flex w-fit gap-2 leading-snug group-data-[disabled=true]/field:opacity-50",
916
+ "has-[>[data-slot=field]]:w-full has-[>[data-slot=field]]:flex-col has-[>[data-slot=field]]:rounded-md has-[>[data-slot=field]]:border [&>*]:data-[slot=field]:p-4",
917
+ "has-data-[state=checked]:bg-primary/5 has-data-[state=checked]:border-primary dark:has-data-[state=checked]:bg-primary/10",
918
+ className
919
+ ),
920
+ ...props
921
+ }
922
+ );
923
+ }
924
+ function FieldTitle({ className, ...props }) {
925
+ return /* @__PURE__ */ jsx(
926
+ "div",
927
+ {
928
+ "data-slot": "field-label",
929
+ className: cn(
930
+ "flex w-fit items-center gap-2 text-sm leading-snug font-medium group-data-[disabled=true]/field:opacity-50",
931
+ className
932
+ ),
933
+ ...props
934
+ }
935
+ );
936
+ }
937
+ function FieldDescription({ className, ...props }) {
938
+ return /* @__PURE__ */ jsx(
939
+ "p",
940
+ {
941
+ "data-slot": "field-description",
942
+ className: cn(
943
+ "text-muted-foreground text-sm leading-normal font-normal group-has-[[data-orientation=horizontal]]/field:text-balance",
944
+ "last:mt-0 nth-last-2:-mt-1 [[data-variant=legend]+&]:-mt-1.5",
945
+ "[&>a:hover]:text-primary [&>a]:underline [&>a]:underline-offset-4",
946
+ className
947
+ ),
948
+ ...props
949
+ }
950
+ );
951
+ }
952
+ function FieldSeparator({
953
+ children,
954
+ className,
955
+ ...props
956
+ }) {
957
+ return /* @__PURE__ */ jsxs(
958
+ "div",
959
+ {
960
+ "data-slot": "field-separator",
961
+ "data-content": !!children,
962
+ className: cn(
963
+ "relative -my-2 h-5 text-sm group-data-[variant=outline]/field-group:-mb-2",
964
+ className
965
+ ),
966
+ ...props,
967
+ children: [
968
+ /* @__PURE__ */ jsx(Separator, { className: "absolute inset-0 top-1/2" }),
969
+ children && /* @__PURE__ */ jsx(
970
+ "span",
971
+ {
972
+ className: "bg-background text-muted-foreground relative mx-auto block w-fit px-2",
973
+ "data-slot": "field-separator-content",
974
+ children
975
+ }
976
+ )
977
+ ]
978
+ }
979
+ );
980
+ }
981
+ function FieldError({
982
+ className,
983
+ children,
984
+ errors,
985
+ ...props
986
+ }) {
987
+ const content = useMemo(() => {
988
+ if (children) {
989
+ return children;
990
+ }
991
+ if (!errors?.length) {
992
+ return null;
993
+ }
994
+ const uniqueErrors = [
995
+ ...new Map(errors.map((error) => [error?.message, error])).values()
996
+ ];
997
+ if (uniqueErrors?.length == 1) {
998
+ return uniqueErrors[0]?.message;
999
+ }
1000
+ return /* @__PURE__ */ jsx("ul", { className: "ml-4 flex list-disc flex-col gap-1", children: uniqueErrors.map(
1001
+ (error, index) => error?.message && /* @__PURE__ */ jsx("li", { children: error.message }, index)
1002
+ ) });
1003
+ }, [children, errors]);
1004
+ if (!content) {
1005
+ return null;
1006
+ }
1007
+ return /* @__PURE__ */ jsx(
1008
+ "div",
1009
+ {
1010
+ role: "alert",
1011
+ "data-slot": "field-error",
1012
+ className: cn("text-destructive text-sm font-normal", className),
1013
+ ...props,
1014
+ children: content
1015
+ }
1016
+ );
1017
+ }
1018
+ var Form = FormProvider;
1019
+ var FormFieldContext = React24.createContext(
1020
+ {}
1021
+ );
1022
+ var FormField = ({
1023
+ ...props
1024
+ }) => {
1025
+ return /* @__PURE__ */ jsx(FormFieldContext.Provider, { value: { name: props.name }, children: /* @__PURE__ */ jsx(Controller, { ...props }) });
1026
+ };
1027
+ var FormItemContext = React24.createContext(
1028
+ {}
1029
+ );
1030
+ var useFormField = () => {
1031
+ const fieldContext = React24.useContext(FormFieldContext);
1032
+ const itemContext = React24.useContext(FormItemContext);
1033
+ const { getFieldState } = useFormContext();
1034
+ const formState = useFormState({ name: fieldContext.name });
1035
+ const fieldState = getFieldState(fieldContext.name, formState);
1036
+ if (!fieldContext) {
1037
+ throw new Error("useFormField should be used within <FormField>");
1038
+ }
1039
+ const { id } = itemContext;
1040
+ return {
1041
+ id,
1042
+ name: fieldContext.name,
1043
+ formItemId: `${id}-form-item`,
1044
+ formDescriptionId: `${id}-form-item-description`,
1045
+ formMessageId: `${id}-form-item-message`,
1046
+ ...fieldState
1047
+ };
1048
+ };
1049
+ function FormItem({ className, ...props }) {
1050
+ const id = React24.useId();
1051
+ return /* @__PURE__ */ jsx(FormItemContext.Provider, { value: { id }, children: /* @__PURE__ */ jsx(
1052
+ "div",
1053
+ {
1054
+ "data-slot": "form-item",
1055
+ className: cn("grid gap-2", className),
1056
+ ...props
1057
+ }
1058
+ ) });
1059
+ }
1060
+ function FormLabel({
1061
+ className,
1062
+ ...props
1063
+ }) {
1064
+ const { error, formItemId } = useFormField();
1065
+ return /* @__PURE__ */ jsx(
1066
+ Label,
1067
+ {
1068
+ "data-slot": "form-label",
1069
+ "data-error": !!error,
1070
+ className: cn("data-[error=true]:text-destructive", className),
1071
+ htmlFor: formItemId,
1072
+ ...props
1073
+ }
1074
+ );
1075
+ }
1076
+ function FormControl({ ...props }) {
1077
+ const { error, formItemId, formDescriptionId, formMessageId } = useFormField();
1078
+ return /* @__PURE__ */ jsx(
1079
+ Slot,
1080
+ {
1081
+ "data-slot": "form-control",
1082
+ id: formItemId,
1083
+ "aria-describedby": !error ? `${formDescriptionId}` : `${formDescriptionId} ${formMessageId}`,
1084
+ "aria-invalid": !!error,
1085
+ ...props
1086
+ }
1087
+ );
1088
+ }
1089
+ function FormDescription({ className, ...props }) {
1090
+ const { formDescriptionId } = useFormField();
1091
+ return /* @__PURE__ */ jsx(
1092
+ "p",
1093
+ {
1094
+ "data-slot": "form-description",
1095
+ id: formDescriptionId,
1096
+ className: cn("text-muted-foreground text-sm", className),
1097
+ ...props
1098
+ }
1099
+ );
1100
+ }
1101
+ function FormMessage({ className, ...props }) {
1102
+ const { error, formMessageId } = useFormField();
1103
+ const body = error ? String(error?.message ?? "") : props.children;
1104
+ if (!body) {
1105
+ return null;
1106
+ }
1107
+ return /* @__PURE__ */ jsx(
1108
+ "p",
1109
+ {
1110
+ "data-slot": "form-message",
1111
+ id: formMessageId,
1112
+ className: cn("text-destructive text-sm", className),
1113
+ ...props,
1114
+ children: body
1115
+ }
1116
+ );
1117
+ }
1118
+ var Textarea = React24.forwardRef(
1119
+ ({ className, autoResize = false, minHeight = 50, maxHeight = 350, size = "default", onChange, ...props }, ref) => {
1120
+ const internalRef = React24.useRef(null);
1121
+ React24.useImperativeHandle(ref, () => internalRef.current);
1122
+ const sizeClasses = {
1123
+ sm: "min-h-11 h-11",
1124
+ // 44px / 2.75rem - exact height
1125
+ default: "min-h-[60px]",
1126
+ // 60px / 3.75rem
1127
+ lg: "min-h-20"
1128
+ // 80px / 5rem
1129
+ };
1130
+ const paddingClasses = {
1131
+ sm: "py-3",
1132
+ // 12px top + 12px bottom + 20px line-height = 44px
1133
+ default: "py-2",
1134
+ // 8px top + 8px bottom (default)
1135
+ lg: "py-2"
1136
+ // 8px top + 8px bottom (default)
1137
+ };
1138
+ const handleResize = React24.useCallback(() => {
1139
+ if (autoResize && size !== "sm" && internalRef.current) {
1140
+ const textarea = internalRef.current;
1141
+ textarea.style.height = "auto";
1142
+ const scrollHeight = textarea.scrollHeight;
1143
+ textarea.style.height = `${Math.min(Math.max(scrollHeight, minHeight), maxHeight)}px`;
1144
+ }
1145
+ }, [autoResize, size, minHeight, maxHeight]);
1146
+ React24.useEffect(() => {
1147
+ handleResize();
1148
+ }, [handleResize, props.value]);
1149
+ const handleChange = React24.useCallback(
1150
+ (e) => {
1151
+ handleResize();
1152
+ onChange?.(e);
1153
+ },
1154
+ [onChange, handleResize]
1155
+ );
1156
+ return /* @__PURE__ */ jsx(
1157
+ "textarea",
1158
+ {
1159
+ className: cn(
1160
+ "flex w-full rounded-md border border-input bg-transparent px-3 text-base shadow-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",
1161
+ sizeClasses[size],
1162
+ paddingClasses[size],
1163
+ className
1164
+ ),
1165
+ ref: internalRef,
1166
+ onChange: handleChange,
1167
+ ...props
1168
+ }
1169
+ );
1170
+ }
1171
+ );
1172
+ Textarea.displayName = "Textarea";
1173
+ var Switch = React24.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
1174
+ SwitchPrimitives.Root,
1175
+ {
1176
+ className: cn(
1177
+ "peer inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent shadow-sm transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",
1178
+ className
1179
+ ),
1180
+ ...props,
1181
+ ref,
1182
+ children: /* @__PURE__ */ jsx(
1183
+ SwitchPrimitives.Thumb,
1184
+ {
1185
+ className: cn(
1186
+ "pointer-events-none block h-4 w-4 rounded-full bg-background shadow-lg ring-0 transition-transform",
1187
+ "data-[state=checked]:ltr:translate-x-4 data-[state=checked]:rtl:-translate-x-4",
1188
+ "data-[state=unchecked]:translate-x-0"
1189
+ )
1190
+ }
1191
+ )
1192
+ }
1193
+ ));
1194
+ Switch.displayName = SwitchPrimitives.Root.displayName;
1195
+ function Table({ className, ...props }) {
1196
+ return /* @__PURE__ */ jsx(
1197
+ "div",
1198
+ {
1199
+ "data-slot": "table-container",
1200
+ className: "relative w-full overflow-x-auto",
1201
+ children: /* @__PURE__ */ jsx(
1202
+ "table",
1203
+ {
1204
+ "data-slot": "table",
1205
+ className: cn("w-full caption-bottom text-sm", className),
1206
+ ...props
1207
+ }
1208
+ )
1209
+ }
1210
+ );
1211
+ }
1212
+ function TableHeader({ className, ...props }) {
1213
+ return /* @__PURE__ */ jsx(
1214
+ "thead",
1215
+ {
1216
+ "data-slot": "table-header",
1217
+ className: cn("[&_tr]:border-b", className),
1218
+ ...props
1219
+ }
1220
+ );
1221
+ }
1222
+ function TableBody({ className, ...props }) {
1223
+ return /* @__PURE__ */ jsx(
1224
+ "tbody",
1225
+ {
1226
+ "data-slot": "table-body",
1227
+ className: cn("[&_tr:last-child]:border-0", className),
1228
+ ...props
1229
+ }
1230
+ );
1231
+ }
1232
+ function TableFooter({ className, ...props }) {
1233
+ return /* @__PURE__ */ jsx(
1234
+ "tfoot",
1235
+ {
1236
+ "data-slot": "table-footer",
1237
+ className: cn(
1238
+ "bg-muted/50 border-t font-medium [&>tr]:last:border-b-0",
1239
+ className
1240
+ ),
1241
+ ...props
1242
+ }
1243
+ );
1244
+ }
1245
+ function TableRow({ className, ...props }) {
1246
+ return /* @__PURE__ */ jsx(
1247
+ "tr",
1248
+ {
1249
+ "data-slot": "table-row",
1250
+ className: cn(
1251
+ "hover:bg-muted/50 data-[state=selected]:bg-muted border-b transition-colors",
1252
+ className
1253
+ ),
1254
+ ...props
1255
+ }
1256
+ );
1257
+ }
1258
+ function TableHead({ className, ...props }) {
1259
+ return /* @__PURE__ */ jsx(
1260
+ "th",
1261
+ {
1262
+ "data-slot": "table-head",
1263
+ className: cn(
1264
+ "text-foreground h-10 px-2 text-left align-middle font-medium whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",
1265
+ className
1266
+ ),
1267
+ ...props
1268
+ }
1269
+ );
1270
+ }
1271
+ function TableCell({ className, ...props }) {
1272
+ return /* @__PURE__ */ jsx(
1273
+ "td",
1274
+ {
1275
+ "data-slot": "table-cell",
1276
+ className: cn(
1277
+ "p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",
1278
+ className
1279
+ ),
1280
+ ...props
1281
+ }
1282
+ );
1283
+ }
1284
+ function TableCaption({
1285
+ className,
1286
+ ...props
1287
+ }) {
1288
+ return /* @__PURE__ */ jsx(
1289
+ "caption",
1290
+ {
1291
+ "data-slot": "table-caption",
1292
+ className: cn("text-muted-foreground mt-4 text-sm", className),
1293
+ ...props
1294
+ }
1295
+ );
1296
+ }
1297
+ var ChevronUpIcon = ({
1298
+ className = "",
1299
+ ...props
1300
+ }) => {
1301
+ return /* @__PURE__ */ jsx(
1302
+ "svg",
1303
+ {
1304
+ className,
1305
+ width: "16",
1306
+ height: "16",
1307
+ viewBox: "0 0 24 24",
1308
+ fill: "none",
1309
+ stroke: "currentColor",
1310
+ strokeWidth: "2",
1311
+ strokeLinecap: "round",
1312
+ strokeLinejoin: "round",
1313
+ ...props,
1314
+ children: /* @__PURE__ */ jsx("path", { d: "m18 15-6-6-6 6" })
1315
+ }
1316
+ );
1317
+ };
1318
+ var Select = SelectPrimitive.Root;
1319
+ var SelectGroup = SelectPrimitive.Group;
1320
+ var SelectValue = SelectPrimitive.Value;
1321
+ var SelectTrigger = React24.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(
1322
+ SelectPrimitive.Trigger,
1323
+ {
1324
+ ref,
1325
+ className: cn(
1326
+ // HAI3 customization: bg-background and hover states for consistency with Button Outline
1327
+ "flex h-9 w-full items-center justify-between whitespace-nowrap rounded-md border border-input bg-background px-3 py-2 text-sm shadow-sm ring-offset-background hover:bg-accent hover:text-bg-accent-foreground data-[placeholder]:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",
1328
+ className
1329
+ ),
1330
+ ...props,
1331
+ children: [
1332
+ children,
1333
+ /* @__PURE__ */ jsx(SelectPrimitive.Icon, { asChild: true, children: /* @__PURE__ */ jsx(ChevronDownIcon, { className: "h-4 w-4 opacity-50" }) })
1334
+ ]
1335
+ }
1336
+ ));
1337
+ SelectTrigger.displayName = SelectPrimitive.Trigger.displayName;
1338
+ var SelectScrollUpButton = React24.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
1339
+ SelectPrimitive.ScrollUpButton,
1340
+ {
1341
+ ref,
1342
+ className: cn(
1343
+ "flex cursor-default items-center justify-center py-1",
1344
+ className
1345
+ ),
1346
+ ...props,
1347
+ children: /* @__PURE__ */ jsx(ChevronUpIcon, { className: "h-4 w-4" })
1348
+ }
1349
+ ));
1350
+ SelectScrollUpButton.displayName = SelectPrimitive.ScrollUpButton.displayName;
1351
+ var SelectScrollDownButton = React24.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
1352
+ SelectPrimitive.ScrollDownButton,
1353
+ {
1354
+ ref,
1355
+ className: cn(
1356
+ "flex cursor-default items-center justify-center py-1",
1357
+ className
1358
+ ),
1359
+ ...props,
1360
+ children: /* @__PURE__ */ jsx(ChevronDownIcon, { className: "h-4 w-4" })
1361
+ }
1362
+ ));
1363
+ SelectScrollDownButton.displayName = SelectPrimitive.ScrollDownButton.displayName;
1364
+ var SelectContent = React24.forwardRef(({ className, children, position = "popper", ...props }, ref) => /* @__PURE__ */ jsx(SelectPrimitive.Portal, { children: /* @__PURE__ */ jsxs(
1365
+ SelectPrimitive.Content,
1366
+ {
1367
+ ref,
1368
+ className: cn(
1369
+ "relative z-50 max-h-[--radix-select-content-available-height] min-w-[8rem] overflow-y-auto overflow-x-hidden rounded-md border bg-popover text-popover-foreground shadow-md 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-[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 origin-[--radix-select-content-transform-origin]",
1370
+ position === "popper" && "data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",
1371
+ className
1372
+ ),
1373
+ position,
1374
+ ...props,
1375
+ children: [
1376
+ /* @__PURE__ */ jsx(SelectScrollUpButton, {}),
1377
+ /* @__PURE__ */ jsx(
1378
+ SelectPrimitive.Viewport,
1379
+ {
1380
+ className: cn(
1381
+ "p-1",
1382
+ position === "popper" && "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"
1383
+ ),
1384
+ children
1385
+ }
1386
+ ),
1387
+ /* @__PURE__ */ jsx(SelectScrollDownButton, {})
1388
+ ]
1389
+ }
1390
+ ) }));
1391
+ SelectContent.displayName = SelectPrimitive.Content.displayName;
1392
+ var SelectLabel = React24.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
1393
+ SelectPrimitive.Label,
1394
+ {
1395
+ ref,
1396
+ className: cn("px-2 py-1.5 text-sm font-semibold", className),
1397
+ ...props
1398
+ }
1399
+ ));
1400
+ SelectLabel.displayName = SelectPrimitive.Label.displayName;
1401
+ var SelectItem = React24.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(
1402
+ SelectPrimitive.Item,
1403
+ {
1404
+ ref,
1405
+ className: cn(
1406
+ "relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm outline-none focus:bg-accent focus:text-bg-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
1407
+ className
1408
+ ),
1409
+ ...props,
1410
+ children: [
1411
+ /* @__PURE__ */ jsx("span", { className: "absolute right-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsx(SelectPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx(CheckIcon, { className: "h-4 w-4" }) }) }),
1412
+ /* @__PURE__ */ jsx(SelectPrimitive.ItemText, { children })
1413
+ ]
1414
+ }
1415
+ ));
1416
+ SelectItem.displayName = SelectPrimitive.Item.displayName;
1417
+ var SelectSeparator = React24.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
1418
+ SelectPrimitive.Separator,
1419
+ {
1420
+ ref,
1421
+ className: cn("-mx-1 my-1 h-px bg-muted", className),
1422
+ ...props
1423
+ }
1424
+ ));
1425
+ SelectSeparator.displayName = SelectPrimitive.Separator.displayName;
1426
+ function DataTablePagination({
1427
+ table,
1428
+ pageSizeOptions = [10, 20, 30, 40, 50]
1429
+ }) {
1430
+ return /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between px-2", children: [
1431
+ /* @__PURE__ */ jsxs("div", { className: "text-muted-foreground flex-1 text-sm", children: [
1432
+ table.getFilteredSelectedRowModel().rows.length,
1433
+ " of",
1434
+ " ",
1435
+ table.getFilteredRowModel().rows.length,
1436
+ " row(s) selected."
1437
+ ] }),
1438
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center space-x-6 lg:space-x-8", children: [
1439
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center space-x-2", children: [
1440
+ /* @__PURE__ */ jsx("p", { className: "text-sm font-medium", children: "Rows per page" }),
1441
+ /* @__PURE__ */ jsxs(
1442
+ Select,
1443
+ {
1444
+ value: `${table.getState().pagination.pageSize}`,
1445
+ onValueChange: (value) => {
1446
+ table.setPageSize(Number(value));
1447
+ },
1448
+ children: [
1449
+ /* @__PURE__ */ jsx(SelectTrigger, { className: "h-8 w-[70px]", children: /* @__PURE__ */ jsx(SelectValue, { placeholder: table.getState().pagination.pageSize }) }),
1450
+ /* @__PURE__ */ jsx(SelectContent, { side: "top", children: pageSizeOptions.map((pageSize) => /* @__PURE__ */ jsx(SelectItem, { value: `${pageSize}`, children: pageSize }, pageSize)) })
1451
+ ]
1452
+ }
1453
+ )
1454
+ ] }),
1455
+ /* @__PURE__ */ jsxs("div", { className: "flex w-[100px] items-center justify-center text-sm font-medium", children: [
1456
+ "Page ",
1457
+ table.getState().pagination.pageIndex + 1,
1458
+ " of",
1459
+ " ",
1460
+ table.getPageCount()
1461
+ ] }),
1462
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center space-x-2", children: [
1463
+ /* @__PURE__ */ jsxs(
1464
+ Button,
1465
+ {
1466
+ variant: ButtonVariant.Outline,
1467
+ size: ButtonSize.Icon,
1468
+ className: "hidden size-8 lg:flex",
1469
+ onClick: () => table.setPageIndex(0),
1470
+ disabled: !table.getCanPreviousPage(),
1471
+ children: [
1472
+ /* @__PURE__ */ jsx("span", { className: "sr-only", children: "Go to first page" }),
1473
+ /* @__PURE__ */ jsx(ChevronsLeft, { className: "size-4" })
1474
+ ]
1475
+ }
1476
+ ),
1477
+ /* @__PURE__ */ jsxs(
1478
+ Button,
1479
+ {
1480
+ variant: ButtonVariant.Outline,
1481
+ size: ButtonSize.Icon,
1482
+ className: "size-8",
1483
+ onClick: () => table.previousPage(),
1484
+ disabled: !table.getCanPreviousPage(),
1485
+ children: [
1486
+ /* @__PURE__ */ jsx("span", { className: "sr-only", children: "Go to previous page" }),
1487
+ /* @__PURE__ */ jsx(ChevronLeft, { className: "size-4" })
1488
+ ]
1489
+ }
1490
+ ),
1491
+ /* @__PURE__ */ jsxs(
1492
+ Button,
1493
+ {
1494
+ variant: ButtonVariant.Outline,
1495
+ size: ButtonSize.Icon,
1496
+ className: "size-8",
1497
+ onClick: () => table.nextPage(),
1498
+ disabled: !table.getCanNextPage(),
1499
+ children: [
1500
+ /* @__PURE__ */ jsx("span", { className: "sr-only", children: "Go to next page" }),
1501
+ /* @__PURE__ */ jsx(ChevronRight, { className: "size-4" })
1502
+ ]
1503
+ }
1504
+ ),
1505
+ /* @__PURE__ */ jsxs(
1506
+ Button,
1507
+ {
1508
+ variant: ButtonVariant.Outline,
1509
+ size: ButtonSize.Icon,
1510
+ className: "hidden size-8 lg:flex",
1511
+ onClick: () => table.setPageIndex(table.getPageCount() - 1),
1512
+ disabled: !table.getCanNextPage(),
1513
+ children: [
1514
+ /* @__PURE__ */ jsx("span", { className: "sr-only", children: "Go to last page" }),
1515
+ /* @__PURE__ */ jsx(ChevronsRight, { className: "size-4" })
1516
+ ]
1517
+ }
1518
+ )
1519
+ ] })
1520
+ ] })
1521
+ ] });
1522
+ }
1523
+ function DataTable({
1524
+ columns,
1525
+ data,
1526
+ table: externalTable,
1527
+ filterInput,
1528
+ toolbar,
1529
+ showPagination = true,
1530
+ pageSize = 10,
1531
+ noResultsMessage = "No results."
1532
+ }) {
1533
+ const [sorting, setSorting] = React24.useState([]);
1534
+ const [columnFilters, setColumnFilters] = React24.useState([]);
1535
+ const [columnVisibility, setColumnVisibility] = React24.useState({});
1536
+ const [rowSelection, setRowSelection] = React24.useState({});
1537
+ const internalTable = useReactTable({
1538
+ data,
1539
+ columns,
1540
+ onSortingChange: setSorting,
1541
+ onColumnFiltersChange: setColumnFilters,
1542
+ getCoreRowModel: getCoreRowModel(),
1543
+ getPaginationRowModel: getPaginationRowModel(),
1544
+ getSortedRowModel: getSortedRowModel(),
1545
+ getFilteredRowModel: getFilteredRowModel(),
1546
+ onColumnVisibilityChange: setColumnVisibility,
1547
+ onRowSelectionChange: setRowSelection,
1548
+ initialState: {
1549
+ pagination: {
1550
+ pageSize
1551
+ }
1552
+ },
1553
+ state: {
1554
+ sorting,
1555
+ columnFilters,
1556
+ columnVisibility,
1557
+ rowSelection
1558
+ }
1559
+ });
1560
+ const table = externalTable ?? internalTable;
1561
+ return /* @__PURE__ */ jsxs("div", { className: "w-full space-y-4", children: [
1562
+ (filterInput || toolbar) && /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-4", children: [
1563
+ filterInput,
1564
+ toolbar
1565
+ ] }),
1566
+ /* @__PURE__ */ jsx("div", { className: "rounded-md border", children: /* @__PURE__ */ jsxs(Table, { children: [
1567
+ /* @__PURE__ */ jsx(TableHeader, { children: table.getHeaderGroups().map((headerGroup) => /* @__PURE__ */ jsx(TableRow, { children: headerGroup.headers.map((header) => /* @__PURE__ */ jsx(TableHead, { children: header.isPlaceholder ? null : flexRender(
1568
+ header.column.columnDef.header,
1569
+ header.getContext()
1570
+ ) }, header.id)) }, headerGroup.id)) }),
1571
+ /* @__PURE__ */ jsx(TableBody, { children: table.getRowModel().rows?.length ? table.getRowModel().rows.map((row) => /* @__PURE__ */ jsx(
1572
+ TableRow,
1573
+ {
1574
+ "data-state": row.getIsSelected() && "selected",
1575
+ children: row.getVisibleCells().map((cell) => /* @__PURE__ */ jsx(TableCell, { children: flexRender(
1576
+ cell.column.columnDef.cell,
1577
+ cell.getContext()
1578
+ ) }, cell.id))
1579
+ },
1580
+ row.id
1581
+ )) : /* @__PURE__ */ jsx(TableRow, { children: /* @__PURE__ */ jsx(
1582
+ TableCell,
1583
+ {
1584
+ colSpan: columns.length,
1585
+ className: "h-24 text-center",
1586
+ children: noResultsMessage
1587
+ }
1588
+ ) }) })
1589
+ ] }) }),
1590
+ showPagination && /* @__PURE__ */ jsx(DataTablePagination, { table })
1591
+ ] });
1592
+ }
1593
+ var DropdownMenu = ({ dir, ...props }) => /* @__PURE__ */ jsx(
1594
+ DropdownMenuPrimitive.Root,
1595
+ {
1596
+ ...props,
1597
+ dir
1598
+ }
1599
+ );
1600
+ DropdownMenu.displayName = "DropdownMenu";
1601
+ var DropdownMenuTrigger = DropdownMenuPrimitive.Trigger;
1602
+ var DropdownMenuGroup = DropdownMenuPrimitive.Group;
1603
+ var DropdownMenuPortal = DropdownMenuPrimitive.Portal;
1604
+ var DropdownMenuSub = DropdownMenuPrimitive.Sub;
1605
+ var DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup;
1606
+ var DropdownMenuSubTrigger = React24.forwardRef(({ className, inset, children, ...props }, ref) => /* @__PURE__ */ jsxs(
1607
+ DropdownMenuPrimitive.SubTrigger,
1608
+ {
1609
+ ref,
1610
+ className: cn(
1611
+ "flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent data-[state=open]:bg-accent [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
1612
+ inset && "pl-8",
1613
+ className
1614
+ ),
1615
+ ...props,
1616
+ children: [
1617
+ children,
1618
+ /* @__PURE__ */ jsx(ChevronRightIcon, { className: "ms-auto rtl:rotate-180" })
1619
+ ]
1620
+ }
1621
+ ));
1622
+ DropdownMenuSubTrigger.displayName = DropdownMenuPrimitive.SubTrigger.displayName;
1623
+ var DropdownMenuSubContent = React24.forwardRef(({ className, container, ...props }, ref) => /* @__PURE__ */ jsx(DropdownMenuPrimitive.Portal, { container: container ?? void 0, children: /* @__PURE__ */ jsx(
1624
+ DropdownMenuPrimitive.SubContent,
1625
+ {
1626
+ ref,
1627
+ className: cn(
1628
+ "z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg 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-[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 origin-[--radix-dropdown-menu-content-transform-origin]",
1629
+ className
1630
+ ),
1631
+ ...props
1632
+ }
1633
+ ) }));
1634
+ DropdownMenuSubContent.displayName = DropdownMenuPrimitive.SubContent.displayName;
1635
+ var DropdownMenuContent = React24.forwardRef(({ className, sideOffset = 4, container, ...props }, ref) => /* @__PURE__ */ jsx(DropdownMenuPrimitive.Portal, { container: container ?? void 0, children: /* @__PURE__ */ jsx(
1636
+ DropdownMenuPrimitive.Content,
1637
+ {
1638
+ ref,
1639
+ sideOffset,
1640
+ className: cn(
1641
+ "z-50 max-h-[var(--radix-dropdown-menu-content-available-height)] min-w-[8rem] overflow-y-auto overflow-x-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md",
1642
+ "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-[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 origin-[--radix-dropdown-menu-content-transform-origin]",
1643
+ className
1644
+ ),
1645
+ ...props
1646
+ }
1647
+ ) }));
1648
+ DropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName;
1649
+ var DropdownMenuItem = React24.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx(
1650
+ DropdownMenuPrimitive.Item,
1651
+ {
1652
+ ref,
1653
+ className: cn(
1654
+ "relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&>svg]:size-4 [&>svg]:shrink-0",
1655
+ inset && "pl-8",
1656
+ className
1657
+ ),
1658
+ ...props
1659
+ }
1660
+ ));
1661
+ DropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName;
1662
+ var DropdownMenuCheckboxItem = React24.forwardRef(({ className, children, checked, ...props }, ref) => /* @__PURE__ */ jsxs(
1663
+ DropdownMenuPrimitive.CheckboxItem,
1664
+ {
1665
+ ref,
1666
+ className: cn(
1667
+ "relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
1668
+ className
1669
+ ),
1670
+ checked,
1671
+ ...props,
1672
+ children: [
1673
+ /* @__PURE__ */ jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsx(DropdownMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx(CheckIcon, { className: "h-4 w-4" }) }) }),
1674
+ children
1675
+ ]
1676
+ }
1677
+ ));
1678
+ DropdownMenuCheckboxItem.displayName = DropdownMenuPrimitive.CheckboxItem.displayName;
1679
+ var DropdownMenuRadioItem = React24.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(
1680
+ DropdownMenuPrimitive.RadioItem,
1681
+ {
1682
+ ref,
1683
+ className: cn(
1684
+ "relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
1685
+ className
1686
+ ),
1687
+ ...props,
1688
+ children: [
1689
+ /* @__PURE__ */ jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsx(DropdownMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx(CircleIcon, { className: "h-2 w-2 fill-current" }) }) }),
1690
+ children
1691
+ ]
1692
+ }
1693
+ ));
1694
+ DropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName;
1695
+ var DropdownMenuLabel = React24.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx(
1696
+ DropdownMenuPrimitive.Label,
1697
+ {
1698
+ ref,
1699
+ className: cn(
1700
+ "px-2 py-1.5 text-sm font-semibold",
1701
+ inset && "pl-8",
1702
+ className
1703
+ ),
1704
+ ...props
1705
+ }
1706
+ ));
1707
+ DropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName;
1708
+ var DropdownMenuSeparator = React24.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
1709
+ DropdownMenuPrimitive.Separator,
1710
+ {
1711
+ ref,
1712
+ className: cn("-mx-1 my-1 h-px bg-muted", className),
1713
+ ...props
1714
+ }
1715
+ ));
1716
+ DropdownMenuSeparator.displayName = DropdownMenuPrimitive.Separator.displayName;
1717
+ var DropdownMenuShortcut = ({
1718
+ className,
1719
+ ...props
1720
+ }) => {
1721
+ return /* @__PURE__ */ jsx(
1722
+ "span",
1723
+ {
1724
+ className: cn("ml-auto text-xs tracking-widest opacity-60", className),
1725
+ ...props
1726
+ }
1727
+ );
1728
+ };
1729
+ DropdownMenuShortcut.displayName = "DropdownMenuShortcut";
1730
+ function DataTableColumnHeader({
1731
+ column,
1732
+ title,
1733
+ className
1734
+ }) {
1735
+ if (!column.getCanSort()) {
1736
+ return /* @__PURE__ */ jsx("div", { className: cn(className), children: title });
1737
+ }
1738
+ return /* @__PURE__ */ jsx("div", { className: cn("flex items-center gap-2", className), children: /* @__PURE__ */ jsxs(DropdownMenu, { children: [
1739
+ /* @__PURE__ */ jsx(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsxs(
1740
+ Button,
1741
+ {
1742
+ variant: ButtonVariant.Ghost,
1743
+ size: ButtonSize.Sm,
1744
+ className: "data-[state=open]:bg-accent -ml-3 h-8",
1745
+ children: [
1746
+ /* @__PURE__ */ jsx("span", { children: title }),
1747
+ column.getIsSorted() === "desc" ? /* @__PURE__ */ jsx(ArrowDown, { className: "size-4" }) : column.getIsSorted() === "asc" ? /* @__PURE__ */ jsx(ArrowUp, { className: "size-4" }) : /* @__PURE__ */ jsx(ChevronsUpDown, { className: "size-4" })
1748
+ ]
1749
+ }
1750
+ ) }),
1751
+ /* @__PURE__ */ jsxs(DropdownMenuContent, { align: "start", children: [
1752
+ /* @__PURE__ */ jsxs(DropdownMenuItem, { onClick: () => column.toggleSorting(false), children: [
1753
+ /* @__PURE__ */ jsx(ArrowUp, { className: "size-4" }),
1754
+ "Asc"
1755
+ ] }),
1756
+ /* @__PURE__ */ jsxs(DropdownMenuItem, { onClick: () => column.toggleSorting(true), children: [
1757
+ /* @__PURE__ */ jsx(ArrowDown, { className: "size-4" }),
1758
+ "Desc"
1759
+ ] }),
1760
+ /* @__PURE__ */ jsx(DropdownMenuSeparator, {}),
1761
+ /* @__PURE__ */ jsxs(DropdownMenuItem, { onClick: () => column.toggleVisibility(false), children: [
1762
+ /* @__PURE__ */ jsx(EyeOff, { className: "size-4" }),
1763
+ "Hide"
1764
+ ] })
1765
+ ] })
1766
+ ] }) });
1767
+ }
1768
+ function DataTableViewOptions({
1769
+ table,
1770
+ label = "Toggle columns",
1771
+ buttonText = "View"
1772
+ }) {
1773
+ return /* @__PURE__ */ jsxs(DropdownMenu, { children: [
1774
+ /* @__PURE__ */ jsx(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsxs(
1775
+ Button,
1776
+ {
1777
+ variant: ButtonVariant.Outline,
1778
+ size: ButtonSize.Sm,
1779
+ className: "ml-auto hidden h-8 lg:flex",
1780
+ children: [
1781
+ /* @__PURE__ */ jsx(Settings2, { className: "size-4" }),
1782
+ buttonText
1783
+ ]
1784
+ }
1785
+ ) }),
1786
+ /* @__PURE__ */ jsxs(DropdownMenuContent, { align: "end", className: "w-[150px]", children: [
1787
+ /* @__PURE__ */ jsx(DropdownMenuLabel, { children: label }),
1788
+ /* @__PURE__ */ jsx(DropdownMenuSeparator, {}),
1789
+ table.getAllColumns().filter(
1790
+ (column) => typeof column.accessorFn !== "undefined" && column.getCanHide()
1791
+ ).map((column) => {
1792
+ return /* @__PURE__ */ jsx(
1793
+ DropdownMenuCheckboxItem,
1794
+ {
1795
+ className: "capitalize",
1796
+ checked: column.getIsVisible(),
1797
+ onCheckedChange: (value) => column.toggleVisibility(!!value),
1798
+ children: column.id
1799
+ },
1800
+ column.id
1801
+ );
1802
+ })
1803
+ ] })
1804
+ ] });
1805
+ }
1806
+ function Skeleton({
1807
+ className,
1808
+ inheritColor = false,
1809
+ ...props
1810
+ }) {
1811
+ return /* @__PURE__ */ jsx(
1812
+ "div",
1813
+ {
1814
+ className: cn(
1815
+ "animate-pulse rounded-md",
1816
+ inheritColor ? "bg-current opacity-20" : "bg-muted",
1817
+ className
1818
+ ),
1819
+ ...props
1820
+ }
1821
+ );
1822
+ }
1823
+ var Spinner = React24.forwardRef(
1824
+ ({ className, icon: Icon2 = Loader2, size = "size-4", ...props }, ref) => {
1825
+ const textColorClasses = className?.match(/\btext-\S+/g)?.join(" ") || "";
1826
+ const wrapperClasses = trim(className?.replace(/\btext-\S+/g, "") || "");
1827
+ return /* @__PURE__ */ jsx(
1828
+ "div",
1829
+ {
1830
+ ref,
1831
+ className: cn("inline-flex items-center justify-center", wrapperClasses),
1832
+ ...props,
1833
+ children: /* @__PURE__ */ jsx(Icon2, { className: cn("animate-spin", size, textColorClasses) })
1834
+ }
1835
+ );
1836
+ }
739
1837
  );
740
1838
  Spinner.displayName = "Spinner";
741
- var Slider = React20.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
1839
+ var Slider = React24.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
742
1840
  SliderPrimitive.Root,
743
1841
  {
744
1842
  ref,
@@ -750,7 +1848,7 @@ var Slider = React20.forwardRef(({ className, ...props }, ref) => /* @__PURE__ *
750
1848
  }
751
1849
  ));
752
1850
  Slider.displayName = SliderPrimitive.Root.displayName;
753
- var SliderTrack = React20.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
1851
+ var SliderTrack = React24.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
754
1852
  SliderPrimitive.Track,
755
1853
  {
756
1854
  ref,
@@ -762,7 +1860,7 @@ var SliderTrack = React20.forwardRef(({ className, ...props }, ref) => /* @__PUR
762
1860
  }
763
1861
  ));
764
1862
  SliderTrack.displayName = SliderPrimitive.Track.displayName;
765
- var SliderRange = React20.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
1863
+ var SliderRange = React24.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
766
1864
  SliderPrimitive.Range,
767
1865
  {
768
1866
  ref,
@@ -771,7 +1869,7 @@ var SliderRange = React20.forwardRef(({ className, ...props }, ref) => /* @__PUR
771
1869
  }
772
1870
  ));
773
1871
  SliderRange.displayName = SliderPrimitive.Range.displayName;
774
- var SliderThumb = React20.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
1872
+ var SliderThumb = React24.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
775
1873
  SliderPrimitive.Thumb,
776
1874
  {
777
1875
  ref,
@@ -783,7 +1881,7 @@ var SliderThumb = React20.forwardRef(({ className, ...props }, ref) => /* @__PUR
783
1881
  }
784
1882
  ));
785
1883
  SliderThumb.displayName = SliderPrimitive.Thumb.displayName;
786
- var Progress = React20.forwardRef(({ className, value, ...props }, ref) => /* @__PURE__ */ jsx(
1884
+ var Progress = React24.forwardRef(({ className, value, ...props }, ref) => /* @__PURE__ */ jsx(
787
1885
  ProgressPrimitive.Root,
788
1886
  {
789
1887
  ref,
@@ -802,6 +1900,22 @@ var Progress = React20.forwardRef(({ className, value, ...props }, ref) => /* @_
802
1900
  }
803
1901
  ));
804
1902
  Progress.displayName = ProgressPrimitive.Root.displayName;
1903
+ var Toaster = ({ ...props }) => {
1904
+ return /* @__PURE__ */ jsx(
1905
+ Toaster$1,
1906
+ {
1907
+ className: "toaster group",
1908
+ icons: {
1909
+ success: /* @__PURE__ */ jsx(CheckCircle2, { className: "size-4" }),
1910
+ info: /* @__PURE__ */ jsx(Info, { className: "size-4" }),
1911
+ warning: /* @__PURE__ */ jsx(AlertTriangle, { className: "size-4" }),
1912
+ error: /* @__PURE__ */ jsx(XOctagon, { className: "size-4" }),
1913
+ loading: /* @__PURE__ */ jsx(Loader2, { className: "size-4 animate-spin" })
1914
+ },
1915
+ ...props
1916
+ }
1917
+ );
1918
+ };
805
1919
  var TooltipProvider = ({
806
1920
  delayDuration = 0,
807
1921
  ...props
@@ -817,9 +1931,9 @@ var Tooltip = ({
817
1931
  ...props
818
1932
  }) => /* @__PURE__ */ jsx(TooltipProvider, { children: /* @__PURE__ */ jsx(TooltipPrimitive.Root, { ...props }) });
819
1933
  Tooltip.displayName = TooltipPrimitive.Root.displayName;
820
- var TooltipTrigger = React20.forwardRef(({ ...props }, ref) => /* @__PURE__ */ jsx(TooltipPrimitive.Trigger, { ref, ...props }));
1934
+ var TooltipTrigger = React24.forwardRef(({ ...props }, ref) => /* @__PURE__ */ jsx(TooltipPrimitive.Trigger, { ref, ...props }));
821
1935
  TooltipTrigger.displayName = TooltipPrimitive.Trigger.displayName;
822
- var TooltipContent = React20.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsx(TooltipPrimitive.Portal, { children: /* @__PURE__ */ jsx(
1936
+ var TooltipContent = React24.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsx(TooltipPrimitive.Portal, { children: /* @__PURE__ */ jsx(
823
1937
  TooltipPrimitive.Content,
824
1938
  {
825
1939
  ref,
@@ -834,7 +1948,7 @@ var TooltipContent = React20.forwardRef(({ className, sideOffset = 4, ...props }
834
1948
  TooltipContent.displayName = TooltipPrimitive.Content.displayName;
835
1949
  var Popover = PopoverPrimitive.Root;
836
1950
  Popover.displayName = "Popover";
837
- var PopoverTrigger = React20.forwardRef(({ ...props }, ref) => /* @__PURE__ */ jsx(
1951
+ var PopoverTrigger = React24.forwardRef(({ ...props }, ref) => /* @__PURE__ */ jsx(
838
1952
  PopoverPrimitive.Trigger,
839
1953
  {
840
1954
  ref,
@@ -843,7 +1957,7 @@ var PopoverTrigger = React20.forwardRef(({ ...props }, ref) => /* @__PURE__ */ j
843
1957
  }
844
1958
  ));
845
1959
  PopoverTrigger.displayName = "PopoverTrigger";
846
- var PopoverContent = React20.forwardRef(({ className, align = "center", sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsx(PopoverPrimitive.Portal, { children: /* @__PURE__ */ jsx(
1960
+ var PopoverContent = React24.forwardRef(({ className, align = "center", sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsx(PopoverPrimitive.Portal, { children: /* @__PURE__ */ jsx(
847
1961
  PopoverPrimitive.Content,
848
1962
  {
849
1963
  ref,
@@ -858,7 +1972,7 @@ var PopoverContent = React20.forwardRef(({ className, align = "center", sideOffs
858
1972
  }
859
1973
  ) }));
860
1974
  PopoverContent.displayName = "PopoverContent";
861
- var PopoverAnchor = React20.forwardRef(({ ...props }, ref) => /* @__PURE__ */ jsx(
1975
+ var PopoverAnchor = React24.forwardRef(({ ...props }, ref) => /* @__PURE__ */ jsx(
862
1976
  PopoverPrimitive.Anchor,
863
1977
  {
864
1978
  ref,
@@ -869,7 +1983,7 @@ var PopoverAnchor = React20.forwardRef(({ ...props }, ref) => /* @__PURE__ */ js
869
1983
  PopoverAnchor.displayName = "PopoverAnchor";
870
1984
  var HoverCard = HoverCardPrimitive.Root;
871
1985
  HoverCard.displayName = "HoverCard";
872
- var HoverCardTrigger = React20.forwardRef(({ ...props }, ref) => /* @__PURE__ */ jsx(
1986
+ var HoverCardTrigger = React24.forwardRef(({ ...props }, ref) => /* @__PURE__ */ jsx(
873
1987
  HoverCardPrimitive.Trigger,
874
1988
  {
875
1989
  ref,
@@ -878,7 +1992,7 @@ var HoverCardTrigger = React20.forwardRef(({ ...props }, ref) => /* @__PURE__ */
878
1992
  }
879
1993
  ));
880
1994
  HoverCardTrigger.displayName = "HoverCardTrigger";
881
- var HoverCardContent = React20.forwardRef(({ className, align = "center", sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsx(HoverCardPrimitive.Portal, { "data-slot": "hover-card-portal", children: /* @__PURE__ */ jsx(
1995
+ var HoverCardContent = React24.forwardRef(({ className, align = "center", sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsx(HoverCardPrimitive.Portal, { "data-slot": "hover-card-portal", children: /* @__PURE__ */ jsx(
882
1996
  HoverCardPrimitive.Content,
883
1997
  {
884
1998
  ref,
@@ -893,7 +2007,7 @@ var HoverCardContent = React20.forwardRef(({ className, align = "center", sideOf
893
2007
  }
894
2008
  ) }));
895
2009
  HoverCardContent.displayName = "HoverCardContent";
896
- var Card = React20.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
2010
+ var Card = React24.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
897
2011
  "div",
898
2012
  {
899
2013
  ref,
@@ -905,7 +2019,7 @@ var Card = React20.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
905
2019
  }
906
2020
  ));
907
2021
  Card.displayName = "Card";
908
- var CardHeader = React20.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
2022
+ var CardHeader = React24.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
909
2023
  "div",
910
2024
  {
911
2025
  ref,
@@ -914,7 +2028,7 @@ var CardHeader = React20.forwardRef(({ className, ...props }, ref) => /* @__PURE
914
2028
  }
915
2029
  ));
916
2030
  CardHeader.displayName = "CardHeader";
917
- var CardTitle = React20.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
2031
+ var CardTitle = React24.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
918
2032
  "div",
919
2033
  {
920
2034
  ref,
@@ -923,7 +2037,7 @@ var CardTitle = React20.forwardRef(({ className, ...props }, ref) => /* @__PURE_
923
2037
  }
924
2038
  ));
925
2039
  CardTitle.displayName = "CardTitle";
926
- var CardDescription = React20.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
2040
+ var CardDescription = React24.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
927
2041
  "div",
928
2042
  {
929
2043
  ref,
@@ -932,9 +2046,9 @@ var CardDescription = React20.forwardRef(({ className, ...props }, ref) => /* @_
932
2046
  }
933
2047
  ));
934
2048
  CardDescription.displayName = "CardDescription";
935
- var CardContent = React20.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("p-6 pt-0", className), ...props }));
2049
+ var CardContent = React24.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("p-6 pt-0", className), ...props }));
936
2050
  CardContent.displayName = "CardContent";
937
- var CardFooter = React20.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
2051
+ var CardFooter = React24.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
938
2052
  "div",
939
2053
  {
940
2054
  ref,
@@ -943,7 +2057,7 @@ var CardFooter = React20.forwardRef(({ className, ...props }, ref) => /* @__PURE
943
2057
  }
944
2058
  ));
945
2059
  CardFooter.displayName = "CardFooter";
946
- var Header = React20__default.forwardRef(
2060
+ var Header = React24__default.forwardRef(
947
2061
  ({ children, className }, ref) => {
948
2062
  return /* @__PURE__ */ jsx(
949
2063
  "header",
@@ -959,7 +2073,7 @@ var Header = React20__default.forwardRef(
959
2073
  }
960
2074
  );
961
2075
  Header.displayName = "Header";
962
- var NavigationMenu = React20.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(
2076
+ var NavigationMenu = React24.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(
963
2077
  NavigationMenuPrimitive.Root,
964
2078
  {
965
2079
  ref,
@@ -975,7 +2089,7 @@ var NavigationMenu = React20.forwardRef(({ className, children, ...props }, ref)
975
2089
  }
976
2090
  ));
977
2091
  NavigationMenu.displayName = NavigationMenuPrimitive.Root.displayName;
978
- var NavigationMenuList = React20.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
2092
+ var NavigationMenuList = React24.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
979
2093
  NavigationMenuPrimitive.List,
980
2094
  {
981
2095
  ref,
@@ -991,7 +2105,7 @@ var NavigationMenuItem = NavigationMenuPrimitive.Item;
991
2105
  var navigationMenuTriggerStyle = cva(
992
2106
  "group inline-flex h-9 w-max items-center justify-center rounded-md bg-background px-4 py-2 text-sm font-medium transition-colors hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground focus:outline-none disabled:pointer-events-none disabled:opacity-50 data-[state=open]:text-accent-foreground data-[state=open]:bg-accent/50 data-[state=open]:hover:bg-accent data-[state=open]:focus:bg-accent"
993
2107
  );
994
- var NavigationMenuTrigger = React20.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(
2108
+ var NavigationMenuTrigger = React24.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(
995
2109
  NavigationMenuPrimitive.Trigger,
996
2110
  {
997
2111
  ref,
@@ -1011,7 +2125,7 @@ var NavigationMenuTrigger = React20.forwardRef(({ className, children, ...props
1011
2125
  }
1012
2126
  ));
1013
2127
  NavigationMenuTrigger.displayName = NavigationMenuPrimitive.Trigger.displayName;
1014
- var NavigationMenuContent = React20.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
2128
+ var NavigationMenuContent = React24.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
1015
2129
  NavigationMenuPrimitive.Content,
1016
2130
  {
1017
2131
  ref,
@@ -1024,7 +2138,7 @@ var NavigationMenuContent = React20.forwardRef(({ className, ...props }, ref) =>
1024
2138
  ));
1025
2139
  NavigationMenuContent.displayName = NavigationMenuPrimitive.Content.displayName;
1026
2140
  var NavigationMenuLink = NavigationMenuPrimitive.Link;
1027
- var NavigationMenuViewport = React20.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { className: cn("absolute left-0 top-full flex justify-center"), children: /* @__PURE__ */ jsx(
2141
+ var NavigationMenuViewport = React24.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { className: cn("absolute left-0 top-full flex justify-center"), children: /* @__PURE__ */ jsx(
1028
2142
  NavigationMenuPrimitive.Viewport,
1029
2143
  {
1030
2144
  className: cn(
@@ -1036,7 +2150,7 @@ var NavigationMenuViewport = React20.forwardRef(({ className, ...props }, ref) =
1036
2150
  }
1037
2151
  ) }));
1038
2152
  NavigationMenuViewport.displayName = NavigationMenuPrimitive.Viewport.displayName;
1039
- var NavigationMenuIndicator = React20.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
2153
+ var NavigationMenuIndicator = React24.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
1040
2154
  NavigationMenuPrimitive.Indicator,
1041
2155
  {
1042
2156
  ref,
@@ -1560,7 +2674,7 @@ var Sheet = SheetPrimitive.Root;
1560
2674
  var SheetTrigger = SheetPrimitive.Trigger;
1561
2675
  var SheetClose = SheetPrimitive.Close;
1562
2676
  var SheetPortal = SheetPrimitive.Portal;
1563
- var SheetOverlay = React20.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
2677
+ var SheetOverlay = React24.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
1564
2678
  SheetPrimitive.Overlay,
1565
2679
  {
1566
2680
  className: cn(
@@ -1588,7 +2702,7 @@ var sheetVariants = cva(
1588
2702
  }
1589
2703
  }
1590
2704
  );
1591
- var SheetContent = React20.forwardRef(({ side = "right", className, children, ...props }, ref) => /* @__PURE__ */ jsxs(SheetPortal, { children: [
2705
+ var SheetContent = React24.forwardRef(({ side = "right", className, children, ...props }, ref) => /* @__PURE__ */ jsxs(SheetPortal, { children: [
1592
2706
  /* @__PURE__ */ jsx(SheetOverlay, {}),
1593
2707
  /* @__PURE__ */ jsxs(
1594
2708
  SheetPrimitive.Content,
@@ -1635,7 +2749,7 @@ var SheetFooter = ({
1635
2749
  }
1636
2750
  );
1637
2751
  SheetFooter.displayName = "SheetFooter";
1638
- var SheetTitle = React20.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
2752
+ var SheetTitle = React24.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
1639
2753
  SheetPrimitive.Title,
1640
2754
  {
1641
2755
  ref,
@@ -1644,7 +2758,7 @@ var SheetTitle = React20.forwardRef(({ className, ...props }, ref) => /* @__PURE
1644
2758
  }
1645
2759
  ));
1646
2760
  SheetTitle.displayName = SheetPrimitive.Title.displayName;
1647
- var SheetDescription = React20.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
2761
+ var SheetDescription = React24.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
1648
2762
  SheetPrimitive.Description,
1649
2763
  {
1650
2764
  ref,
@@ -1657,7 +2771,7 @@ var Dialog = SheetPrimitive.Root;
1657
2771
  var DialogTrigger = SheetPrimitive.Trigger;
1658
2772
  var DialogPortal = SheetPrimitive.Portal;
1659
2773
  var DialogClose = SheetPrimitive.Close;
1660
- var DialogOverlay = React20.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
2774
+ var DialogOverlay = React24.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
1661
2775
  SheetPrimitive.Overlay,
1662
2776
  {
1663
2777
  ref,
@@ -1669,7 +2783,7 @@ var DialogOverlay = React20.forwardRef(({ className, ...props }, ref) => /* @__P
1669
2783
  }
1670
2784
  ));
1671
2785
  DialogOverlay.displayName = SheetPrimitive.Overlay.displayName;
1672
- var DialogContent = React20.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(DialogPortal, { children: [
2786
+ var DialogContent = React24.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(DialogPortal, { children: [
1673
2787
  /* @__PURE__ */ jsx(DialogOverlay, {}),
1674
2788
  /* @__PURE__ */ jsxs(
1675
2789
  SheetPrimitive.Content,
@@ -1719,7 +2833,7 @@ var DialogFooter = ({
1719
2833
  }
1720
2834
  );
1721
2835
  DialogFooter.displayName = "DialogFooter";
1722
- var DialogTitle = React20.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
2836
+ var DialogTitle = React24.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
1723
2837
  SheetPrimitive.Title,
1724
2838
  {
1725
2839
  ref,
@@ -1731,7 +2845,7 @@ var DialogTitle = React20.forwardRef(({ className, ...props }, ref) => /* @__PUR
1731
2845
  }
1732
2846
  ));
1733
2847
  DialogTitle.displayName = SheetPrimitive.Title.displayName;
1734
- var DialogDescription = React20.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
2848
+ var DialogDescription = React24.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
1735
2849
  SheetPrimitive.Description,
1736
2850
  {
1737
2851
  ref,
@@ -1740,34 +2854,29 @@ var DialogDescription = React20.forwardRef(({ className, ...props }, ref) => /*
1740
2854
  }
1741
2855
  ));
1742
2856
  DialogDescription.displayName = SheetPrimitive.Description.displayName;
1743
- function Drawer({
1744
- ...props
1745
- }) {
1746
- return /* @__PURE__ */ jsx(Drawer$1.Root, { "data-slot": "drawer", ...props });
1747
- }
1748
- function DrawerTrigger({
2857
+ function AlertDialog({
1749
2858
  ...props
1750
2859
  }) {
1751
- return /* @__PURE__ */ jsx(Drawer$1.Trigger, { "data-slot": "drawer-trigger", ...props });
2860
+ return /* @__PURE__ */ jsx(AlertDialogPrimitive.Root, { "data-slot": "alert-dialog", ...props });
1752
2861
  }
1753
- function DrawerPortal({
2862
+ function AlertDialogTrigger({
1754
2863
  ...props
1755
2864
  }) {
1756
- return /* @__PURE__ */ jsx(Drawer$1.Portal, { "data-slot": "drawer-portal", ...props });
2865
+ return /* @__PURE__ */ jsx(AlertDialogPrimitive.Trigger, { "data-slot": "alert-dialog-trigger", ...props });
1757
2866
  }
1758
- function DrawerClose({
2867
+ function AlertDialogPortal({
1759
2868
  ...props
1760
2869
  }) {
1761
- return /* @__PURE__ */ jsx(Drawer$1.Close, { "data-slot": "drawer-close", ...props });
2870
+ return /* @__PURE__ */ jsx(AlertDialogPrimitive.Portal, { "data-slot": "alert-dialog-portal", ...props });
1762
2871
  }
1763
- function DrawerOverlay({
2872
+ function AlertDialogOverlay({
1764
2873
  className,
1765
2874
  ...props
1766
2875
  }) {
1767
2876
  return /* @__PURE__ */ jsx(
1768
- Drawer$1.Overlay,
2877
+ AlertDialogPrimitive.Overlay,
1769
2878
  {
1770
- "data-slot": "drawer-overlay",
2879
+ "data-slot": "alert-dialog-overlay",
1771
2880
  className: cn(
1772
2881
  "data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",
1773
2882
  className
@@ -1776,800 +2885,818 @@ function DrawerOverlay({
1776
2885
  }
1777
2886
  );
1778
2887
  }
1779
- function DrawerContent({
2888
+ function AlertDialogContent({
1780
2889
  className,
1781
- children,
1782
2890
  ...props
1783
2891
  }) {
1784
- return /* @__PURE__ */ jsxs(DrawerPortal, { "data-slot": "drawer-portal", children: [
1785
- /* @__PURE__ */ jsx(DrawerOverlay, {}),
1786
- /* @__PURE__ */ jsxs(
1787
- Drawer$1.Content,
2892
+ return /* @__PURE__ */ jsxs(AlertDialogPortal, { children: [
2893
+ /* @__PURE__ */ jsx(AlertDialogOverlay, {}),
2894
+ /* @__PURE__ */ jsx(
2895
+ AlertDialogPrimitive.Content,
1788
2896
  {
1789
- "data-slot": "drawer-content",
2897
+ "data-slot": "alert-dialog-content",
1790
2898
  className: cn(
1791
- "group/drawer-content bg-background fixed z-50 flex h-auto flex-col",
1792
- "data-[vaul-drawer-direction=top]:inset-x-0 data-[vaul-drawer-direction=top]:top-0 data-[vaul-drawer-direction=top]:mb-24 data-[vaul-drawer-direction=top]:max-h-[80vh] data-[vaul-drawer-direction=top]:rounded-b-lg data-[vaul-drawer-direction=top]:border-b",
1793
- "data-[vaul-drawer-direction=bottom]:inset-x-0 data-[vaul-drawer-direction=bottom]:bottom-0 data-[vaul-drawer-direction=bottom]:mt-24 data-[vaul-drawer-direction=bottom]:max-h-[80vh] data-[vaul-drawer-direction=bottom]:rounded-t-lg data-[vaul-drawer-direction=bottom]:border-t",
1794
- "data-[vaul-drawer-direction=right]:inset-y-0 data-[vaul-drawer-direction=right]:right-0 data-[vaul-drawer-direction=right]:w-3/4 data-[vaul-drawer-direction=right]:border-l data-[vaul-drawer-direction=right]:sm:max-w-sm",
1795
- "data-[vaul-drawer-direction=left]:inset-y-0 data-[vaul-drawer-direction=left]:left-0 data-[vaul-drawer-direction=left]:w-3/4 data-[vaul-drawer-direction=left]:border-r data-[vaul-drawer-direction=left]:sm:max-w-sm",
2899
+ "bg-background 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 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg",
1796
2900
  className
1797
2901
  ),
1798
- ...props,
1799
- children: [
1800
- /* @__PURE__ */ jsx("div", { className: "bg-muted mx-auto mt-4 hidden h-2 w-[100px] shrink-0 rounded-full group-data-[vaul-drawer-direction=bottom]/drawer-content:block" }),
1801
- children
1802
- ]
2902
+ ...props
1803
2903
  }
1804
2904
  )
1805
2905
  ] });
1806
2906
  }
1807
- function DrawerHeader({ className, ...props }) {
1808
- return /* @__PURE__ */ jsx(
1809
- "div",
1810
- {
1811
- "data-slot": "drawer-header",
1812
- className: cn(
1813
- "flex flex-col gap-1.5 p-4 text-center sm:text-left",
1814
- className
1815
- ),
1816
- ...props
1817
- }
1818
- );
1819
- }
1820
- function DrawerFooter({ className, ...props }) {
1821
- return /* @__PURE__ */ jsx(
1822
- "div",
1823
- {
1824
- "data-slot": "drawer-footer",
1825
- className: cn("mt-auto flex flex-col gap-2 p-4", className),
1826
- ...props
1827
- }
1828
- );
1829
- }
1830
- function DrawerTitle({
1831
- className,
1832
- ...props
1833
- }) {
1834
- return /* @__PURE__ */ jsx(
1835
- Drawer$1.Title,
1836
- {
1837
- "data-slot": "drawer-title",
1838
- className: cn("text-lg font-semibold text-foreground", className),
1839
- ...props
1840
- }
1841
- );
1842
- }
1843
- function DrawerDescription({
2907
+ function AlertDialogHeader({
1844
2908
  className,
1845
2909
  ...props
1846
2910
  }) {
1847
2911
  return /* @__PURE__ */ jsx(
1848
- Drawer$1.Description,
2912
+ "div",
1849
2913
  {
1850
- "data-slot": "drawer-description",
1851
- className: cn("text-sm text-muted-foreground", className),
2914
+ "data-slot": "alert-dialog-header",
2915
+ className: cn("flex flex-col gap-2 text-center sm:text-left", className),
1852
2916
  ...props
1853
2917
  }
1854
2918
  );
1855
2919
  }
1856
- function ResizablePanelGroup({
2920
+ function AlertDialogFooter({
1857
2921
  className,
1858
2922
  ...props
1859
2923
  }) {
1860
2924
  return /* @__PURE__ */ jsx(
1861
- ResizablePrimitive.PanelGroup,
2925
+ "div",
1862
2926
  {
1863
- "data-slot": "resizable-panel-group",
2927
+ "data-slot": "alert-dialog-footer",
1864
2928
  className: cn(
1865
- "flex h-full w-full data-[panel-group-direction=vertical]:flex-col",
2929
+ "flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",
1866
2930
  className
1867
2931
  ),
1868
2932
  ...props
1869
2933
  }
1870
2934
  );
1871
2935
  }
1872
- function ResizablePanel({
2936
+ function AlertDialogTitle({
2937
+ className,
1873
2938
  ...props
1874
2939
  }) {
1875
- return /* @__PURE__ */ jsx(ResizablePrimitive.Panel, { "data-slot": "resizable-panel", ...props });
2940
+ return /* @__PURE__ */ jsx(
2941
+ AlertDialogPrimitive.Title,
2942
+ {
2943
+ "data-slot": "alert-dialog-title",
2944
+ className: cn("text-lg font-semibold", className),
2945
+ ...props
2946
+ }
2947
+ );
1876
2948
  }
1877
- function ResizableHandle({
1878
- withHandle,
2949
+ function AlertDialogDescription({
1879
2950
  className,
1880
2951
  ...props
1881
2952
  }) {
1882
2953
  return /* @__PURE__ */ jsx(
1883
- ResizablePrimitive.PanelResizeHandle,
2954
+ AlertDialogPrimitive.Description,
1884
2955
  {
1885
- "data-slot": "resizable-handle",
1886
- className: cn(
1887
- "bg-border focus-visible:ring-ring relative flex w-px items-center justify-center after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:ring-1 focus-visible:ring-offset-1 focus-visible:outline-hidden data-[panel-group-direction=vertical]:h-px data-[panel-group-direction=vertical]:w-full data-[panel-group-direction=vertical]:after:left-0 data-[panel-group-direction=vertical]:after:h-1 data-[panel-group-direction=vertical]:after:w-full data-[panel-group-direction=vertical]:after:translate-x-0 data-[panel-group-direction=vertical]:after:-translate-y-1/2 [&[data-panel-group-direction=vertical]>div]:rotate-90",
1888
- className
1889
- ),
1890
- ...props,
1891
- children: withHandle && /* @__PURE__ */ jsx("div", { className: "bg-border z-10 flex h-4 w-3 items-center justify-center rounded-sm border", children: /* @__PURE__ */ jsx(GripVertical, { className: "size-2.5" }) })
2956
+ "data-slot": "alert-dialog-description",
2957
+ className: cn("text-muted-foreground text-sm", className),
2958
+ ...props
1892
2959
  }
1893
2960
  );
1894
2961
  }
1895
- function ScrollArea({
2962
+ function AlertDialogAction({
1896
2963
  className,
1897
- children,
1898
2964
  ...props
1899
2965
  }) {
1900
- return /* @__PURE__ */ jsxs(
1901
- ScrollAreaPrimitive.Root,
2966
+ return /* @__PURE__ */ jsx(
2967
+ AlertDialogPrimitive.Action,
1902
2968
  {
1903
- "data-slot": "scroll-area",
1904
- className: cn("relative", className),
1905
- ...props,
1906
- children: [
1907
- /* @__PURE__ */ jsx(
1908
- ScrollAreaPrimitive.Viewport,
1909
- {
1910
- "data-slot": "scroll-area-viewport",
1911
- className: "focus-visible:ring-ring/50 size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:outline-1",
1912
- children
1913
- }
1914
- ),
1915
- /* @__PURE__ */ jsx(ScrollBar, {}),
1916
- /* @__PURE__ */ jsx(ScrollAreaPrimitive.Corner, {})
1917
- ]
2969
+ className: cn(buttonVariants(), className),
2970
+ ...props
1918
2971
  }
1919
2972
  );
1920
2973
  }
1921
- function ScrollBar({
2974
+ function AlertDialogCancel({
1922
2975
  className,
1923
- orientation = "vertical",
1924
2976
  ...props
1925
2977
  }) {
1926
2978
  return /* @__PURE__ */ jsx(
1927
- ScrollAreaPrimitive.ScrollAreaScrollbar,
2979
+ AlertDialogPrimitive.Cancel,
1928
2980
  {
1929
- "data-slot": "scroll-area-scrollbar",
1930
- orientation,
1931
- className: cn(
1932
- "flex touch-none p-px transition-colors select-none",
1933
- orientation === "vertical" && "h-full w-2.5 border-l border-l-transparent",
1934
- orientation === "horizontal" && "h-2.5 flex-col border-t border-t-transparent",
1935
- className
1936
- ),
1937
- ...props,
1938
- children: /* @__PURE__ */ jsx(
1939
- ScrollAreaPrimitive.ScrollAreaThumb,
1940
- {
1941
- "data-slot": "scroll-area-thumb",
1942
- className: "bg-border relative flex-1 rounded-full"
1943
- }
1944
- )
2981
+ className: cn(buttonVariants({ variant: ButtonVariant.Outline }), className),
2982
+ ...props
1945
2983
  }
1946
2984
  );
1947
2985
  }
1948
- function Separator2({
2986
+ function Drawer({
2987
+ ...props
2988
+ }) {
2989
+ return /* @__PURE__ */ jsx(Drawer$1.Root, { "data-slot": "drawer", ...props });
2990
+ }
2991
+ function DrawerTrigger({
2992
+ ...props
2993
+ }) {
2994
+ return /* @__PURE__ */ jsx(Drawer$1.Trigger, { "data-slot": "drawer-trigger", ...props });
2995
+ }
2996
+ function DrawerPortal({
2997
+ ...props
2998
+ }) {
2999
+ return /* @__PURE__ */ jsx(Drawer$1.Portal, { "data-slot": "drawer-portal", ...props });
3000
+ }
3001
+ function DrawerClose({
3002
+ ...props
3003
+ }) {
3004
+ return /* @__PURE__ */ jsx(Drawer$1.Close, { "data-slot": "drawer-close", ...props });
3005
+ }
3006
+ function DrawerOverlay({
1949
3007
  className,
1950
- orientation = "horizontal",
1951
- decorative = true,
1952
3008
  ...props
1953
3009
  }) {
1954
3010
  return /* @__PURE__ */ jsx(
1955
- SeparatorPrimitive.Root,
3011
+ Drawer$1.Overlay,
1956
3012
  {
1957
- "data-slot": "separator",
1958
- decorative,
1959
- orientation,
3013
+ "data-slot": "drawer-overlay",
1960
3014
  className: cn(
1961
- "bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",
3015
+ "data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",
1962
3016
  className
1963
3017
  ),
1964
3018
  ...props
1965
3019
  }
1966
3020
  );
1967
3021
  }
1968
- var Accordion = React20.forwardRef(({ ...props }, ref) => /* @__PURE__ */ jsx(
1969
- AccordionPrimitive.Root,
1970
- {
1971
- ref,
1972
- "data-slot": "accordion",
1973
- ...props
1974
- }
1975
- ));
1976
- Accordion.displayName = "Accordion";
1977
- var AccordionItem = React20.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
1978
- AccordionPrimitive.Item,
1979
- {
1980
- ref,
1981
- "data-slot": "accordion-item",
1982
- className: cn("border-b last:border-b-0", className),
1983
- ...props
1984
- }
1985
- ));
1986
- AccordionItem.displayName = "AccordionItem";
1987
- var AccordionTrigger = React20.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsx(AccordionPrimitive.Header, { className: "flex", children: /* @__PURE__ */ jsxs(
1988
- AccordionPrimitive.Trigger,
1989
- {
1990
- ref,
1991
- "data-slot": "accordion-trigger",
1992
- className: cn(
1993
- "flex flex-1 items-start justify-between gap-4 rounded-md py-4 text-left text-sm font-medium transition-all outline-none hover:underline focus-visible:ring-[3px] focus-visible:border-ring focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 [&[data-state=open]>svg]:rotate-180",
1994
- className
1995
- ),
1996
- ...props,
1997
- children: [
1998
- children,
1999
- /* @__PURE__ */ jsx(ChevronDownIcon, { className: "h-4 w-4 shrink-0 text-muted-foreground transition-transform duration-200" })
2000
- ]
2001
- }
2002
- ) }));
2003
- AccordionTrigger.displayName = "AccordionTrigger";
2004
- var AccordionContent = React20.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsx(
2005
- AccordionPrimitive.Content,
2006
- {
2007
- ref,
2008
- "data-slot": "accordion-content",
2009
- className: "overflow-hidden text-sm data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",
2010
- ...props,
2011
- children: /* @__PURE__ */ jsx("div", { className: cn("pt-0 pb-4", className), children })
2012
- }
2013
- ));
2014
- AccordionContent.displayName = "AccordionContent";
2015
- var CarouselContext = React20.createContext(null);
2016
- function useCarousel() {
2017
- const context = React20.useContext(CarouselContext);
2018
- if (!context) {
2019
- throw new Error("useCarousel must be used within a <Carousel />");
2020
- }
2021
- return context;
2022
- }
2023
- var Carousel = React20.forwardRef(
2024
- ({
2025
- orientation = "horizontal",
2026
- opts,
2027
- setApi,
2028
- plugins,
2029
- className,
2030
- children,
2031
- ...props
2032
- }, ref) => {
2033
- const [carouselRef, api] = useEmblaCarousel(
2034
- {
2035
- ...opts,
2036
- axis: orientation === "horizontal" ? "x" : "y"
2037
- },
2038
- plugins
2039
- );
2040
- const [canScrollPrev, setCanScrollPrev] = React20.useState(false);
2041
- const [canScrollNext, setCanScrollNext] = React20.useState(false);
2042
- const onSelect = React20.useCallback((api2) => {
2043
- if (!api2) return;
2044
- setCanScrollPrev(api2.canScrollPrev());
2045
- setCanScrollNext(api2.canScrollNext());
2046
- }, []);
2047
- const scrollPrev = React20.useCallback(() => {
2048
- api?.scrollPrev();
2049
- }, [api]);
2050
- const scrollNext = React20.useCallback(() => {
2051
- api?.scrollNext();
2052
- }, [api]);
2053
- const handleKeyDown = React20.useCallback(
2054
- (event) => {
2055
- if (event.key === "ArrowLeft") {
2056
- event.preventDefault();
2057
- scrollPrev();
2058
- } else if (event.key === "ArrowRight") {
2059
- event.preventDefault();
2060
- scrollNext();
2061
- }
2062
- },
2063
- [scrollPrev, scrollNext]
2064
- );
2065
- React20.useEffect(() => {
2066
- if (!api || !setApi) return;
2067
- setApi(api);
2068
- }, [api, setApi]);
2069
- React20.useEffect(() => {
2070
- if (!api) return;
2071
- onSelect(api);
2072
- api.on("reInit", onSelect);
2073
- api.on("select", onSelect);
2074
- return () => {
2075
- api?.off("select", onSelect);
2076
- };
2077
- }, [api, onSelect]);
2078
- return /* @__PURE__ */ jsx(
2079
- CarouselContext.Provider,
3022
+ function DrawerContent({
3023
+ className,
3024
+ children,
3025
+ ...props
3026
+ }) {
3027
+ return /* @__PURE__ */ jsxs(DrawerPortal, { "data-slot": "drawer-portal", children: [
3028
+ /* @__PURE__ */ jsx(DrawerOverlay, {}),
3029
+ /* @__PURE__ */ jsxs(
3030
+ Drawer$1.Content,
2080
3031
  {
2081
- value: {
2082
- carouselRef,
2083
- api,
2084
- opts,
2085
- orientation: orientation || (opts?.axis === "y" ? "vertical" : "horizontal"),
2086
- scrollPrev,
2087
- scrollNext,
2088
- canScrollPrev,
2089
- canScrollNext
2090
- },
2091
- children: /* @__PURE__ */ jsx(
2092
- "div",
2093
- {
2094
- ref,
2095
- onKeyDownCapture: handleKeyDown,
2096
- className: cn("relative", className),
2097
- role: "region",
2098
- "aria-roledescription": "carousel",
2099
- "data-slot": "carousel",
2100
- ...props,
2101
- children
2102
- }
2103
- )
3032
+ "data-slot": "drawer-content",
3033
+ className: cn(
3034
+ "group/drawer-content bg-background fixed z-50 flex h-auto flex-col",
3035
+ "data-[vaul-drawer-direction=top]:inset-x-0 data-[vaul-drawer-direction=top]:top-0 data-[vaul-drawer-direction=top]:mb-24 data-[vaul-drawer-direction=top]:max-h-[80vh] data-[vaul-drawer-direction=top]:rounded-b-lg data-[vaul-drawer-direction=top]:border-b",
3036
+ "data-[vaul-drawer-direction=bottom]:inset-x-0 data-[vaul-drawer-direction=bottom]:bottom-0 data-[vaul-drawer-direction=bottom]:mt-24 data-[vaul-drawer-direction=bottom]:max-h-[80vh] data-[vaul-drawer-direction=bottom]:rounded-t-lg data-[vaul-drawer-direction=bottom]:border-t",
3037
+ "data-[vaul-drawer-direction=right]:inset-y-0 data-[vaul-drawer-direction=right]:right-0 data-[vaul-drawer-direction=right]:w-3/4 data-[vaul-drawer-direction=right]:border-l data-[vaul-drawer-direction=right]:sm:max-w-sm",
3038
+ "data-[vaul-drawer-direction=left]:inset-y-0 data-[vaul-drawer-direction=left]:left-0 data-[vaul-drawer-direction=left]:w-3/4 data-[vaul-drawer-direction=left]:border-r data-[vaul-drawer-direction=left]:sm:max-w-sm",
3039
+ className
3040
+ ),
3041
+ ...props,
3042
+ children: [
3043
+ /* @__PURE__ */ jsx("div", { className: "bg-muted mx-auto mt-4 hidden h-2 w-[100px] shrink-0 rounded-full group-data-[vaul-drawer-direction=bottom]/drawer-content:block" }),
3044
+ children
3045
+ ]
2104
3046
  }
2105
- );
2106
- }
2107
- );
2108
- Carousel.displayName = "Carousel";
2109
- var CarouselContent = React20.forwardRef(({ className, ...props }, ref) => {
2110
- const { carouselRef, orientation } = useCarousel();
3047
+ )
3048
+ ] });
3049
+ }
3050
+ function DrawerHeader({ className, ...props }) {
3051
+ return /* @__PURE__ */ jsx(
3052
+ "div",
3053
+ {
3054
+ "data-slot": "drawer-header",
3055
+ className: cn(
3056
+ "flex flex-col gap-1.5 p-4 text-center sm:text-left",
3057
+ className
3058
+ ),
3059
+ ...props
3060
+ }
3061
+ );
3062
+ }
3063
+ function DrawerFooter({ className, ...props }) {
2111
3064
  return /* @__PURE__ */ jsx(
2112
3065
  "div",
2113
3066
  {
2114
- ref: carouselRef,
2115
- className: "overflow-hidden",
2116
- "data-slot": "carousel-content",
2117
- children: /* @__PURE__ */ jsx(
2118
- "div",
2119
- {
2120
- ref,
2121
- className: cn(
2122
- "flex",
2123
- orientation === "horizontal" ? "-ml-4" : "-mt-4 flex-col",
2124
- className
2125
- ),
2126
- ...props
2127
- }
2128
- )
3067
+ "data-slot": "drawer-footer",
3068
+ className: cn("mt-auto flex flex-col gap-2 p-4", className),
3069
+ ...props
2129
3070
  }
2130
3071
  );
2131
- });
2132
- CarouselContent.displayName = "CarouselContent";
2133
- var CarouselItem = React20.forwardRef(({ className, ...props }, ref) => {
2134
- const { orientation } = useCarousel();
3072
+ }
3073
+ function DrawerTitle({
3074
+ className,
3075
+ ...props
3076
+ }) {
2135
3077
  return /* @__PURE__ */ jsx(
2136
- "div",
3078
+ Drawer$1.Title,
2137
3079
  {
2138
- ref,
2139
- role: "group",
2140
- "aria-roledescription": "slide",
2141
- "data-slot": "carousel-item",
3080
+ "data-slot": "drawer-title",
3081
+ className: cn("text-lg font-semibold text-foreground", className),
3082
+ ...props
3083
+ }
3084
+ );
3085
+ }
3086
+ function DrawerDescription({
3087
+ className,
3088
+ ...props
3089
+ }) {
3090
+ return /* @__PURE__ */ jsx(
3091
+ Drawer$1.Description,
3092
+ {
3093
+ "data-slot": "drawer-description",
3094
+ className: cn("text-sm text-muted-foreground", className),
3095
+ ...props
3096
+ }
3097
+ );
3098
+ }
3099
+ function ResizablePanelGroup({
3100
+ className,
3101
+ ...props
3102
+ }) {
3103
+ return /* @__PURE__ */ jsx(
3104
+ ResizablePrimitive.PanelGroup,
3105
+ {
3106
+ "data-slot": "resizable-panel-group",
2142
3107
  className: cn(
2143
- "min-w-0 shrink-0 grow-0 basis-full",
2144
- orientation === "horizontal" ? "pl-4" : "pt-4",
3108
+ "flex h-full w-full data-[panel-group-direction=vertical]:flex-col",
2145
3109
  className
2146
3110
  ),
2147
3111
  ...props
2148
3112
  }
2149
3113
  );
2150
- });
2151
- CarouselItem.displayName = "CarouselItem";
2152
- var CarouselPrevious = React20.forwardRef(({ className, variant = ButtonVariant.Outline, size = ButtonSize.Icon, ...props }, ref) => {
2153
- const { orientation, scrollPrev, canScrollPrev } = useCarousel();
2154
- return /* @__PURE__ */ jsxs(
2155
- Button,
3114
+ }
3115
+ function ResizablePanel({
3116
+ ...props
3117
+ }) {
3118
+ return /* @__PURE__ */ jsx(ResizablePrimitive.Panel, { "data-slot": "resizable-panel", ...props });
3119
+ }
3120
+ function ResizableHandle({
3121
+ withHandle,
3122
+ className,
3123
+ ...props
3124
+ }) {
3125
+ return /* @__PURE__ */ jsx(
3126
+ ResizablePrimitive.PanelResizeHandle,
2156
3127
  {
2157
- ref,
2158
- "data-slot": "carousel-previous",
2159
- variant,
2160
- size,
3128
+ "data-slot": "resizable-handle",
2161
3129
  className: cn(
2162
- "absolute h-8 w-8 rounded-full",
2163
- orientation === "horizontal" ? "top-1/2 -left-12 -translate-y-1/2" : "-top-12 left-1/2 -translate-x-1/2 rotate-90",
3130
+ "bg-border focus-visible:ring-ring relative flex w-px items-center justify-center after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:ring-1 focus-visible:ring-offset-1 focus-visible:outline-hidden data-[panel-group-direction=vertical]:h-px data-[panel-group-direction=vertical]:w-full data-[panel-group-direction=vertical]:after:left-0 data-[panel-group-direction=vertical]:after:h-1 data-[panel-group-direction=vertical]:after:w-full data-[panel-group-direction=vertical]:after:translate-x-0 data-[panel-group-direction=vertical]:after:-translate-y-1/2 [&[data-panel-group-direction=vertical]>div]:rotate-90",
2164
3131
  className
2165
3132
  ),
2166
- disabled: !canScrollPrev,
2167
- onClick: scrollPrev,
3133
+ ...props,
3134
+ children: withHandle && /* @__PURE__ */ jsx("div", { className: "bg-border z-10 flex h-4 w-3 items-center justify-center rounded-sm border", children: /* @__PURE__ */ jsx(GripVertical, { className: "size-2.5" }) })
3135
+ }
3136
+ );
3137
+ }
3138
+ function ScrollArea({
3139
+ className,
3140
+ children,
3141
+ ...props
3142
+ }) {
3143
+ return /* @__PURE__ */ jsxs(
3144
+ ScrollAreaPrimitive.Root,
3145
+ {
3146
+ "data-slot": "scroll-area",
3147
+ className: cn("relative", className),
2168
3148
  ...props,
2169
3149
  children: [
2170
- /* @__PURE__ */ jsx(ArrowLeft, { className: "h-4 w-4" }),
2171
- /* @__PURE__ */ jsx("span", { className: "sr-only", children: "Previous slide" })
3150
+ /* @__PURE__ */ jsx(
3151
+ ScrollAreaPrimitive.Viewport,
3152
+ {
3153
+ "data-slot": "scroll-area-viewport",
3154
+ className: "focus-visible:ring-ring/50 size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:outline-1",
3155
+ children
3156
+ }
3157
+ ),
3158
+ /* @__PURE__ */ jsx(ScrollBar, {}),
3159
+ /* @__PURE__ */ jsx(ScrollAreaPrimitive.Corner, {})
2172
3160
  ]
2173
3161
  }
2174
3162
  );
2175
- });
2176
- CarouselPrevious.displayName = "CarouselPrevious";
2177
- var CarouselNext = React20.forwardRef(({ className, variant = ButtonVariant.Outline, size = ButtonSize.Icon, ...props }, ref) => {
2178
- const { orientation, scrollNext, canScrollNext } = useCarousel();
2179
- return /* @__PURE__ */ jsxs(
2180
- Button,
3163
+ }
3164
+ function ScrollBar({
3165
+ className,
3166
+ orientation = "vertical",
3167
+ ...props
3168
+ }) {
3169
+ return /* @__PURE__ */ jsx(
3170
+ ScrollAreaPrimitive.ScrollAreaScrollbar,
2181
3171
  {
2182
- ref,
2183
- "data-slot": "carousel-next",
2184
- variant,
2185
- size,
3172
+ "data-slot": "scroll-area-scrollbar",
3173
+ orientation,
2186
3174
  className: cn(
2187
- "absolute h-8 w-8 rounded-full",
2188
- orientation === "horizontal" ? "top-1/2 -right-12 -translate-y-1/2" : "-bottom-12 left-1/2 -translate-x-1/2 rotate-90",
3175
+ "flex touch-none p-px transition-colors select-none",
3176
+ orientation === "vertical" && "h-full w-2.5 border-l border-l-transparent",
3177
+ orientation === "horizontal" && "h-2.5 flex-col border-t border-t-transparent",
2189
3178
  className
2190
3179
  ),
2191
- disabled: !canScrollNext,
2192
- onClick: scrollNext,
2193
3180
  ...props,
2194
- children: [
2195
- /* @__PURE__ */ jsx(ArrowRight, { className: "h-4 w-4" }),
2196
- /* @__PURE__ */ jsx("span", { className: "sr-only", children: "Next slide" })
2197
- ]
3181
+ children: /* @__PURE__ */ jsx(
3182
+ ScrollAreaPrimitive.ScrollAreaThumb,
3183
+ {
3184
+ "data-slot": "scroll-area-thumb",
3185
+ className: "bg-border relative flex-1 rounded-full"
3186
+ }
3187
+ )
2198
3188
  }
2199
3189
  );
2200
- });
2201
- CarouselNext.displayName = "CarouselNext";
2202
- var Collapsible = React20.forwardRef(({ ...props }, ref) => /* @__PURE__ */ jsx(
2203
- CollapsiblePrimitive.Root,
2204
- {
2205
- ref,
2206
- "data-slot": "collapsible",
2207
- ...props
2208
- }
2209
- ));
2210
- Collapsible.displayName = "Collapsible";
2211
- var CollapsibleTrigger2 = React20.forwardRef(({ ...props }, ref) => /* @__PURE__ */ jsx(
2212
- CollapsiblePrimitive.CollapsibleTrigger,
3190
+ }
3191
+ function ItemGroup({ className, ...props }) {
3192
+ return /* @__PURE__ */ jsx(
3193
+ "div",
3194
+ {
3195
+ role: "list",
3196
+ "data-slot": "item-group",
3197
+ className: cn("group/item-group flex flex-col", className),
3198
+ ...props
3199
+ }
3200
+ );
3201
+ }
3202
+ function ItemSeparator({
3203
+ className,
3204
+ ...props
3205
+ }) {
3206
+ return /* @__PURE__ */ jsx(
3207
+ Separator,
3208
+ {
3209
+ "data-slot": "item-separator",
3210
+ orientation: "horizontal",
3211
+ className: cn("my-0", className),
3212
+ ...props
3213
+ }
3214
+ );
3215
+ }
3216
+ var itemVariants = cva(
3217
+ "group/item flex items-center border border-transparent text-sm rounded-md transition-colors [a]:hover:bg-accent/50 [a]:transition-colors duration-100 flex-wrap outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]",
2213
3218
  {
2214
- ref,
2215
- "data-slot": "collapsible-trigger",
2216
- ...props
3219
+ variants: {
3220
+ variant: {
3221
+ default: "bg-transparent",
3222
+ outline: "border-border",
3223
+ muted: "bg-muted/50"
3224
+ },
3225
+ size: {
3226
+ default: "p-4 gap-4 ",
3227
+ sm: "py-3 px-4 gap-2.5"
3228
+ }
3229
+ },
3230
+ defaultVariants: {
3231
+ variant: "default",
3232
+ size: "default"
3233
+ }
2217
3234
  }
2218
- ));
2219
- CollapsibleTrigger2.displayName = "CollapsibleTrigger";
2220
- var CollapsibleContent2 = React20.forwardRef(({ ...props }, ref) => /* @__PURE__ */ jsx(
2221
- CollapsiblePrimitive.CollapsibleContent,
3235
+ );
3236
+ function Item6({
3237
+ className,
3238
+ variant = "default",
3239
+ size = "default",
3240
+ asChild = false,
3241
+ ...props
3242
+ }) {
3243
+ const Comp = asChild ? Slot : "div";
3244
+ return /* @__PURE__ */ jsx(
3245
+ Comp,
3246
+ {
3247
+ "data-slot": "item",
3248
+ "data-variant": variant,
3249
+ "data-size": size,
3250
+ className: cn(itemVariants({ variant, size, className })),
3251
+ ...props
3252
+ }
3253
+ );
3254
+ }
3255
+ var itemMediaVariants = cva(
3256
+ "flex shrink-0 items-center justify-center gap-2 group-has-[[data-slot=item-description]]/item:self-start [&_svg]:pointer-events-none group-has-[[data-slot=item-description]]/item:translate-y-0.5",
2222
3257
  {
2223
- ref,
2224
- "data-slot": "collapsible-content",
2225
- ...props
3258
+ variants: {
3259
+ variant: {
3260
+ default: "bg-transparent",
3261
+ icon: "size-8 border rounded-sm bg-muted [&_svg:not([class*='size-'])]:size-4",
3262
+ image: "size-10 rounded-sm overflow-hidden [&_img]:size-full [&_img]:object-cover"
3263
+ }
3264
+ },
3265
+ defaultVariants: {
3266
+ variant: "default"
3267
+ }
2226
3268
  }
2227
- ));
2228
- CollapsibleContent2.displayName = "CollapsibleContent";
2229
- function ChartContainer({
3269
+ );
3270
+ function ItemMedia({
2230
3271
  className,
2231
- children,
2232
- width = "100%",
2233
- height = 350
3272
+ variant = "default",
3273
+ ...props
2234
3274
  }) {
2235
3275
  return /* @__PURE__ */ jsx(
2236
3276
  "div",
2237
3277
  {
2238
- "data-slot": "chart-container",
2239
- className: cn("w-full", className),
2240
- style: { width, height: typeof height === "number" ? `${height}px` : height },
2241
- children
3278
+ "data-slot": "item-media",
3279
+ "data-variant": variant,
3280
+ className: cn(itemMediaVariants({ variant, className })),
3281
+ ...props
3282
+ }
3283
+ );
3284
+ }
3285
+ function ItemContent({ className, ...props }) {
3286
+ return /* @__PURE__ */ jsx(
3287
+ "div",
3288
+ {
3289
+ "data-slot": "item-content",
3290
+ className: cn(
3291
+ "flex flex-1 flex-col gap-1 [&+[data-slot=item-content]]:flex-none",
3292
+ className
3293
+ ),
3294
+ ...props
3295
+ }
3296
+ );
3297
+ }
3298
+ function ItemTitle({ className, ...props }) {
3299
+ return /* @__PURE__ */ jsx(
3300
+ "div",
3301
+ {
3302
+ "data-slot": "item-title",
3303
+ className: cn(
3304
+ "flex w-fit items-center gap-2 text-sm leading-snug font-medium",
3305
+ className
3306
+ ),
3307
+ ...props
2242
3308
  }
2243
3309
  );
2244
3310
  }
2245
- function ChartTooltipContent({
2246
- className,
2247
- label,
2248
- payload,
2249
- active
2250
- }) {
2251
- if (!active || !payload || payload.length === 0) {
2252
- return null;
2253
- }
2254
- return /* @__PURE__ */ jsxs(
2255
- "div",
3311
+ function ItemDescription({ className, ...props }) {
3312
+ return /* @__PURE__ */ jsx(
3313
+ "p",
2256
3314
  {
2257
- "data-slot": "chart-tooltip-content",
3315
+ "data-slot": "item-description",
2258
3316
  className: cn(
2259
- "bg-background border-border text-foreground rounded-lg border p-2 shadow-md",
3317
+ "text-muted-foreground line-clamp-2 text-sm leading-normal font-normal text-balance",
3318
+ "[&>a:hover]:text-primary [&>a]:underline [&>a]:underline-offset-4",
2260
3319
  className
2261
3320
  ),
2262
- children: [
2263
- label && /* @__PURE__ */ jsx("div", { className: "mb-1 text-xs font-medium text-muted-foreground", children: label }),
2264
- /* @__PURE__ */ jsx("div", { className: "flex flex-col gap-1", children: payload.map((item, index) => /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 text-xs", children: [
2265
- /* @__PURE__ */ jsx(
2266
- "div",
2267
- {
2268
- className: "h-2 w-2 rounded-full",
2269
- style: { backgroundColor: item.color }
2270
- }
2271
- ),
2272
- /* @__PURE__ */ jsxs("span", { className: "font-medium", children: [
2273
- item.name,
2274
- ":"
2275
- ] }),
2276
- /* @__PURE__ */ jsx("span", { className: "text-muted-foreground", children: item.value })
2277
- ] }, index)) })
2278
- ]
3321
+ ...props
2279
3322
  }
2280
3323
  );
2281
3324
  }
2282
- function ChartLegendContent({
2283
- className,
2284
- payload
2285
- }) {
2286
- if (!payload || payload.length === 0) {
2287
- return null;
2288
- }
3325
+ function ItemActions({ className, ...props }) {
2289
3326
  return /* @__PURE__ */ jsx(
2290
3327
  "div",
2291
3328
  {
2292
- "data-slot": "chart-legend-content",
2293
- className: cn("flex items-center justify-center gap-4 text-sm pt-4", className),
2294
- children: payload.map((item, index) => /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
2295
- /* @__PURE__ */ jsx(
2296
- "div",
2297
- {
2298
- className: "h-3 w-3 rounded-sm",
2299
- style: { backgroundColor: item.color }
2300
- }
2301
- ),
2302
- /* @__PURE__ */ jsx("span", { className: "text-muted-foreground", children: item.value })
2303
- ] }, index))
3329
+ "data-slot": "item-actions",
3330
+ className: cn("flex items-center gap-2", className),
3331
+ ...props
2304
3332
  }
2305
3333
  );
2306
3334
  }
2307
- var ChevronUpIcon = ({
2308
- className = "",
2309
- ...props
2310
- }) => {
3335
+ function ItemHeader({ className, ...props }) {
2311
3336
  return /* @__PURE__ */ jsx(
2312
- "svg",
3337
+ "div",
2313
3338
  {
2314
- className,
2315
- width: "16",
2316
- height: "16",
2317
- viewBox: "0 0 24 24",
2318
- fill: "none",
2319
- stroke: "currentColor",
2320
- strokeWidth: "2",
2321
- strokeLinecap: "round",
2322
- strokeLinejoin: "round",
2323
- ...props,
2324
- children: /* @__PURE__ */ jsx("path", { d: "m18 15-6-6-6 6" })
3339
+ "data-slot": "item-header",
3340
+ className: cn(
3341
+ "flex basis-full items-center justify-between gap-2",
3342
+ className
3343
+ ),
3344
+ ...props
2325
3345
  }
2326
3346
  );
2327
- };
2328
- var Select = SelectPrimitive.Root;
2329
- var SelectGroup = SelectPrimitive.Group;
2330
- var SelectValue = SelectPrimitive.Value;
2331
- var SelectTrigger = React20.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(
2332
- SelectPrimitive.Trigger,
2333
- {
2334
- ref,
2335
- className: cn(
2336
- // HAI3 customization: bg-background and hover states for consistency with Button Outline
2337
- "flex h-9 w-full items-center justify-between whitespace-nowrap rounded-md border border-input bg-background px-3 py-2 text-sm shadow-sm ring-offset-background hover:bg-accent hover:text-bg-accent-foreground data-[placeholder]:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",
2338
- className
2339
- ),
2340
- ...props,
2341
- children: [
2342
- children,
2343
- /* @__PURE__ */ jsx(SelectPrimitive.Icon, { asChild: true, children: /* @__PURE__ */ jsx(ChevronDownIcon, { className: "h-4 w-4 opacity-50" }) })
2344
- ]
2345
- }
2346
- ));
2347
- SelectTrigger.displayName = SelectPrimitive.Trigger.displayName;
2348
- var SelectScrollUpButton = React20.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
2349
- SelectPrimitive.ScrollUpButton,
2350
- {
2351
- ref,
2352
- className: cn(
2353
- "flex cursor-default items-center justify-center py-1",
2354
- className
2355
- ),
2356
- ...props,
2357
- children: /* @__PURE__ */ jsx(ChevronUpIcon, { className: "h-4 w-4" })
2358
- }
2359
- ));
2360
- SelectScrollUpButton.displayName = SelectPrimitive.ScrollUpButton.displayName;
2361
- var SelectScrollDownButton = React20.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
2362
- SelectPrimitive.ScrollDownButton,
2363
- {
2364
- ref,
2365
- className: cn(
2366
- "flex cursor-default items-center justify-center py-1",
2367
- className
2368
- ),
2369
- ...props,
2370
- children: /* @__PURE__ */ jsx(ChevronDownIcon, { className: "h-4 w-4" })
2371
- }
2372
- ));
2373
- SelectScrollDownButton.displayName = SelectPrimitive.ScrollDownButton.displayName;
2374
- var SelectContent = React20.forwardRef(({ className, children, position = "popper", ...props }, ref) => /* @__PURE__ */ jsx(SelectPrimitive.Portal, { children: /* @__PURE__ */ jsxs(
2375
- SelectPrimitive.Content,
2376
- {
2377
- ref,
2378
- className: cn(
2379
- "relative z-50 max-h-[--radix-select-content-available-height] min-w-[8rem] overflow-y-auto overflow-x-hidden rounded-md border bg-popover text-popover-foreground shadow-md 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-[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 origin-[--radix-select-content-transform-origin]",
2380
- position === "popper" && "data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",
2381
- className
2382
- ),
2383
- position,
2384
- ...props,
2385
- children: [
2386
- /* @__PURE__ */ jsx(SelectScrollUpButton, {}),
2387
- /* @__PURE__ */ jsx(
2388
- SelectPrimitive.Viewport,
2389
- {
2390
- className: cn(
2391
- "p-1",
2392
- position === "popper" && "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"
2393
- ),
2394
- children
2395
- }
3347
+ }
3348
+ function ItemFooter({ className, ...props }) {
3349
+ return /* @__PURE__ */ jsx(
3350
+ "div",
3351
+ {
3352
+ "data-slot": "item-footer",
3353
+ className: cn(
3354
+ "flex basis-full items-center justify-between gap-2",
3355
+ className
2396
3356
  ),
2397
- /* @__PURE__ */ jsx(SelectScrollDownButton, {})
2398
- ]
2399
- }
2400
- ) }));
2401
- SelectContent.displayName = SelectPrimitive.Content.displayName;
2402
- var SelectLabel = React20.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
2403
- SelectPrimitive.Label,
2404
- {
2405
- ref,
2406
- className: cn("px-2 py-1.5 text-sm font-semibold", className),
2407
- ...props
2408
- }
2409
- ));
2410
- SelectLabel.displayName = SelectPrimitive.Label.displayName;
2411
- var SelectItem = React20.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(
2412
- SelectPrimitive.Item,
2413
- {
2414
- ref,
2415
- className: cn(
2416
- "relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm outline-none focus:bg-accent focus:text-bg-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
2417
- className
2418
- ),
2419
- ...props,
2420
- children: [
2421
- /* @__PURE__ */ jsx("span", { className: "absolute right-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsx(SelectPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx(CheckIcon, { className: "h-4 w-4" }) }) }),
2422
- /* @__PURE__ */ jsx(SelectPrimitive.ItemText, { children })
2423
- ]
2424
- }
2425
- ));
2426
- SelectItem.displayName = SelectPrimitive.Item.displayName;
2427
- var SelectSeparator = React20.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
2428
- SelectPrimitive.Separator,
3357
+ ...props
3358
+ }
3359
+ );
3360
+ }
3361
+ var Accordion = React24.forwardRef(({ ...props }, ref) => /* @__PURE__ */ jsx(
3362
+ AccordionPrimitive.Root,
2429
3363
  {
2430
3364
  ref,
2431
- className: cn("-mx-1 my-1 h-px bg-muted", className),
3365
+ "data-slot": "accordion",
2432
3366
  ...props
2433
3367
  }
2434
3368
  ));
2435
- SelectSeparator.displayName = SelectPrimitive.Separator.displayName;
2436
- var DropdownMenu = ({ dir, ...props }) => /* @__PURE__ */ jsx(
2437
- DropdownMenuPrimitive.Root,
2438
- {
2439
- ...props,
2440
- dir
2441
- }
2442
- );
2443
- DropdownMenu.displayName = "DropdownMenu";
2444
- var DropdownMenuTrigger = DropdownMenuPrimitive.Trigger;
2445
- var DropdownMenuGroup = DropdownMenuPrimitive.Group;
2446
- var DropdownMenuPortal = DropdownMenuPrimitive.Portal;
2447
- var DropdownMenuSub = DropdownMenuPrimitive.Sub;
2448
- var DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup;
2449
- var DropdownMenuSubTrigger = React20.forwardRef(({ className, inset, children, ...props }, ref) => /* @__PURE__ */ jsxs(
2450
- DropdownMenuPrimitive.SubTrigger,
2451
- {
2452
- ref,
2453
- className: cn(
2454
- "flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent data-[state=open]:bg-accent [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
2455
- inset && "pl-8",
2456
- className
2457
- ),
2458
- ...props,
2459
- children: [
2460
- children,
2461
- /* @__PURE__ */ jsx(ChevronRightIcon, { className: "ms-auto rtl:rotate-180" })
2462
- ]
2463
- }
2464
- ));
2465
- DropdownMenuSubTrigger.displayName = DropdownMenuPrimitive.SubTrigger.displayName;
2466
- var DropdownMenuSubContent = React20.forwardRef(({ className, container, ...props }, ref) => /* @__PURE__ */ jsx(DropdownMenuPrimitive.Portal, { container: container ?? void 0, children: /* @__PURE__ */ jsx(
2467
- DropdownMenuPrimitive.SubContent,
2468
- {
2469
- ref,
2470
- className: cn(
2471
- "z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg 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-[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 origin-[--radix-dropdown-menu-content-transform-origin]",
2472
- className
2473
- ),
2474
- ...props
2475
- }
2476
- ) }));
2477
- DropdownMenuSubContent.displayName = DropdownMenuPrimitive.SubContent.displayName;
2478
- var DropdownMenuContent = React20.forwardRef(({ className, sideOffset = 4, container, ...props }, ref) => /* @__PURE__ */ jsx(DropdownMenuPrimitive.Portal, { container: container ?? void 0, children: /* @__PURE__ */ jsx(
2479
- DropdownMenuPrimitive.Content,
2480
- {
2481
- ref,
2482
- sideOffset,
2483
- className: cn(
2484
- "z-50 max-h-[var(--radix-dropdown-menu-content-available-height)] min-w-[8rem] overflow-y-auto overflow-x-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md",
2485
- "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-[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 origin-[--radix-dropdown-menu-content-transform-origin]",
2486
- className
2487
- ),
2488
- ...props
2489
- }
2490
- ) }));
2491
- DropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName;
2492
- var DropdownMenuItem = React20.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx(
2493
- DropdownMenuPrimitive.Item,
3369
+ Accordion.displayName = "Accordion";
3370
+ var AccordionItem = React24.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
3371
+ AccordionPrimitive.Item,
2494
3372
  {
2495
3373
  ref,
2496
- className: cn(
2497
- "relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&>svg]:size-4 [&>svg]:shrink-0",
2498
- inset && "pl-8",
2499
- className
2500
- ),
3374
+ "data-slot": "accordion-item",
3375
+ className: cn("border-b last:border-b-0", className),
2501
3376
  ...props
2502
3377
  }
2503
3378
  ));
2504
- DropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName;
2505
- var DropdownMenuCheckboxItem = React20.forwardRef(({ className, children, checked, ...props }, ref) => /* @__PURE__ */ jsxs(
2506
- DropdownMenuPrimitive.CheckboxItem,
3379
+ AccordionItem.displayName = "AccordionItem";
3380
+ var AccordionTrigger = React24.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsx(AccordionPrimitive.Header, { className: "flex", children: /* @__PURE__ */ jsxs(
3381
+ AccordionPrimitive.Trigger,
2507
3382
  {
2508
3383
  ref,
3384
+ "data-slot": "accordion-trigger",
2509
3385
  className: cn(
2510
- "relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
3386
+ "flex flex-1 items-start justify-between gap-4 rounded-md py-4 text-left text-sm font-medium transition-all outline-none hover:underline focus-visible:ring-[3px] focus-visible:border-ring focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 [&[data-state=open]>svg]:rotate-180",
2511
3387
  className
2512
3388
  ),
2513
- checked,
2514
3389
  ...props,
2515
3390
  children: [
2516
- /* @__PURE__ */ jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsx(DropdownMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx(CheckIcon, { className: "h-4 w-4" }) }) }),
2517
- children
3391
+ children,
3392
+ /* @__PURE__ */ jsx(ChevronDownIcon, { className: "h-4 w-4 shrink-0 text-muted-foreground transition-transform duration-200" })
2518
3393
  ]
2519
3394
  }
2520
- ));
2521
- DropdownMenuCheckboxItem.displayName = DropdownMenuPrimitive.CheckboxItem.displayName;
2522
- var DropdownMenuRadioItem = React20.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(
2523
- DropdownMenuPrimitive.RadioItem,
3395
+ ) }));
3396
+ AccordionTrigger.displayName = "AccordionTrigger";
3397
+ var AccordionContent = React24.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsx(
3398
+ AccordionPrimitive.Content,
2524
3399
  {
2525
3400
  ref,
2526
- className: cn(
2527
- "relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
2528
- className
2529
- ),
3401
+ "data-slot": "accordion-content",
3402
+ className: "overflow-hidden text-sm data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",
2530
3403
  ...props,
2531
- children: [
2532
- /* @__PURE__ */ jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsx(DropdownMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx(CircleIcon, { className: "h-2 w-2 fill-current" }) }) }),
2533
- children
2534
- ]
3404
+ children: /* @__PURE__ */ jsx("div", { className: cn("pt-0 pb-4", className), children })
2535
3405
  }
2536
3406
  ));
2537
- DropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName;
2538
- var DropdownMenuLabel = React20.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx(
2539
- DropdownMenuPrimitive.Label,
3407
+ AccordionContent.displayName = "AccordionContent";
3408
+ var CarouselContext = React24.createContext(null);
3409
+ function useCarousel() {
3410
+ const context = React24.useContext(CarouselContext);
3411
+ if (!context) {
3412
+ throw new Error("useCarousel must be used within a <Carousel />");
3413
+ }
3414
+ return context;
3415
+ }
3416
+ var Carousel = React24.forwardRef(
3417
+ ({
3418
+ orientation = "horizontal",
3419
+ opts,
3420
+ setApi,
3421
+ plugins,
3422
+ className,
3423
+ children,
3424
+ ...props
3425
+ }, ref) => {
3426
+ const [carouselRef, api] = useEmblaCarousel(
3427
+ {
3428
+ ...opts,
3429
+ axis: orientation === "horizontal" ? "x" : "y"
3430
+ },
3431
+ plugins
3432
+ );
3433
+ const [canScrollPrev, setCanScrollPrev] = React24.useState(false);
3434
+ const [canScrollNext, setCanScrollNext] = React24.useState(false);
3435
+ const onSelect = React24.useCallback((api2) => {
3436
+ if (!api2) return;
3437
+ setCanScrollPrev(api2.canScrollPrev());
3438
+ setCanScrollNext(api2.canScrollNext());
3439
+ }, []);
3440
+ const scrollPrev = React24.useCallback(() => {
3441
+ api?.scrollPrev();
3442
+ }, [api]);
3443
+ const scrollNext = React24.useCallback(() => {
3444
+ api?.scrollNext();
3445
+ }, [api]);
3446
+ const handleKeyDown = React24.useCallback(
3447
+ (event) => {
3448
+ if (event.key === "ArrowLeft") {
3449
+ event.preventDefault();
3450
+ scrollPrev();
3451
+ } else if (event.key === "ArrowRight") {
3452
+ event.preventDefault();
3453
+ scrollNext();
3454
+ }
3455
+ },
3456
+ [scrollPrev, scrollNext]
3457
+ );
3458
+ React24.useEffect(() => {
3459
+ if (!api || !setApi) return;
3460
+ setApi(api);
3461
+ }, [api, setApi]);
3462
+ React24.useEffect(() => {
3463
+ if (!api) return;
3464
+ onSelect(api);
3465
+ api.on("reInit", onSelect);
3466
+ api.on("select", onSelect);
3467
+ return () => {
3468
+ api?.off("select", onSelect);
3469
+ };
3470
+ }, [api, onSelect]);
3471
+ return /* @__PURE__ */ jsx(
3472
+ CarouselContext.Provider,
3473
+ {
3474
+ value: {
3475
+ carouselRef,
3476
+ api,
3477
+ opts,
3478
+ orientation: orientation || (opts?.axis === "y" ? "vertical" : "horizontal"),
3479
+ scrollPrev,
3480
+ scrollNext,
3481
+ canScrollPrev,
3482
+ canScrollNext
3483
+ },
3484
+ children: /* @__PURE__ */ jsx(
3485
+ "div",
3486
+ {
3487
+ ref,
3488
+ onKeyDownCapture: handleKeyDown,
3489
+ className: cn("relative", className),
3490
+ role: "region",
3491
+ "aria-roledescription": "carousel",
3492
+ "data-slot": "carousel",
3493
+ ...props,
3494
+ children
3495
+ }
3496
+ )
3497
+ }
3498
+ );
3499
+ }
3500
+ );
3501
+ Carousel.displayName = "Carousel";
3502
+ var CarouselContent = React24.forwardRef(({ className, ...props }, ref) => {
3503
+ const { carouselRef, orientation } = useCarousel();
3504
+ return /* @__PURE__ */ jsx(
3505
+ "div",
3506
+ {
3507
+ ref: carouselRef,
3508
+ className: "overflow-hidden",
3509
+ "data-slot": "carousel-content",
3510
+ children: /* @__PURE__ */ jsx(
3511
+ "div",
3512
+ {
3513
+ ref,
3514
+ className: cn(
3515
+ "flex",
3516
+ orientation === "horizontal" ? "-ml-4" : "-mt-4 flex-col",
3517
+ className
3518
+ ),
3519
+ ...props
3520
+ }
3521
+ )
3522
+ }
3523
+ );
3524
+ });
3525
+ CarouselContent.displayName = "CarouselContent";
3526
+ var CarouselItem = React24.forwardRef(({ className, ...props }, ref) => {
3527
+ const { orientation } = useCarousel();
3528
+ return /* @__PURE__ */ jsx(
3529
+ "div",
3530
+ {
3531
+ ref,
3532
+ role: "group",
3533
+ "aria-roledescription": "slide",
3534
+ "data-slot": "carousel-item",
3535
+ className: cn(
3536
+ "min-w-0 shrink-0 grow-0 basis-full",
3537
+ orientation === "horizontal" ? "pl-4" : "pt-4",
3538
+ className
3539
+ ),
3540
+ ...props
3541
+ }
3542
+ );
3543
+ });
3544
+ CarouselItem.displayName = "CarouselItem";
3545
+ var CarouselPrevious = React24.forwardRef(({ className, variant = ButtonVariant.Outline, size = ButtonSize.Icon, ...props }, ref) => {
3546
+ const { orientation, scrollPrev, canScrollPrev } = useCarousel();
3547
+ return /* @__PURE__ */ jsxs(
3548
+ Button,
3549
+ {
3550
+ ref,
3551
+ "data-slot": "carousel-previous",
3552
+ variant,
3553
+ size,
3554
+ className: cn(
3555
+ "absolute h-8 w-8 rounded-full",
3556
+ orientation === "horizontal" ? "top-1/2 -left-12 -translate-y-1/2" : "-top-12 left-1/2 -translate-x-1/2 rotate-90",
3557
+ className
3558
+ ),
3559
+ disabled: !canScrollPrev,
3560
+ onClick: scrollPrev,
3561
+ ...props,
3562
+ children: [
3563
+ /* @__PURE__ */ jsx(ArrowLeft, { className: "h-4 w-4" }),
3564
+ /* @__PURE__ */ jsx("span", { className: "sr-only", children: "Previous slide" })
3565
+ ]
3566
+ }
3567
+ );
3568
+ });
3569
+ CarouselPrevious.displayName = "CarouselPrevious";
3570
+ var CarouselNext = React24.forwardRef(({ className, variant = ButtonVariant.Outline, size = ButtonSize.Icon, ...props }, ref) => {
3571
+ const { orientation, scrollNext, canScrollNext } = useCarousel();
3572
+ return /* @__PURE__ */ jsxs(
3573
+ Button,
3574
+ {
3575
+ ref,
3576
+ "data-slot": "carousel-next",
3577
+ variant,
3578
+ size,
3579
+ className: cn(
3580
+ "absolute h-8 w-8 rounded-full",
3581
+ orientation === "horizontal" ? "top-1/2 -right-12 -translate-y-1/2" : "-bottom-12 left-1/2 -translate-x-1/2 rotate-90",
3582
+ className
3583
+ ),
3584
+ disabled: !canScrollNext,
3585
+ onClick: scrollNext,
3586
+ ...props,
3587
+ children: [
3588
+ /* @__PURE__ */ jsx(ArrowRight, { className: "h-4 w-4" }),
3589
+ /* @__PURE__ */ jsx("span", { className: "sr-only", children: "Next slide" })
3590
+ ]
3591
+ }
3592
+ );
3593
+ });
3594
+ CarouselNext.displayName = "CarouselNext";
3595
+ var Collapsible = React24.forwardRef(({ ...props }, ref) => /* @__PURE__ */ jsx(
3596
+ CollapsiblePrimitive.Root,
2540
3597
  {
2541
3598
  ref,
2542
- className: cn(
2543
- "px-2 py-1.5 text-sm font-semibold",
2544
- inset && "pl-8",
2545
- className
2546
- ),
3599
+ "data-slot": "collapsible",
2547
3600
  ...props
2548
3601
  }
2549
3602
  ));
2550
- DropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName;
2551
- var DropdownMenuSeparator = React20.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
2552
- DropdownMenuPrimitive.Separator,
3603
+ Collapsible.displayName = "Collapsible";
3604
+ var CollapsibleTrigger2 = React24.forwardRef(({ ...props }, ref) => /* @__PURE__ */ jsx(
3605
+ CollapsiblePrimitive.CollapsibleTrigger,
2553
3606
  {
2554
3607
  ref,
2555
- className: cn("-mx-1 my-1 h-px bg-muted", className),
3608
+ "data-slot": "collapsible-trigger",
2556
3609
  ...props
2557
3610
  }
2558
3611
  ));
2559
- DropdownMenuSeparator.displayName = DropdownMenuPrimitive.Separator.displayName;
2560
- var DropdownMenuShortcut = ({
3612
+ CollapsibleTrigger2.displayName = "CollapsibleTrigger";
3613
+ var CollapsibleContent2 = React24.forwardRef(({ ...props }, ref) => /* @__PURE__ */ jsx(
3614
+ CollapsiblePrimitive.CollapsibleContent,
3615
+ {
3616
+ ref,
3617
+ "data-slot": "collapsible-content",
3618
+ ...props
3619
+ }
3620
+ ));
3621
+ CollapsibleContent2.displayName = "CollapsibleContent";
3622
+ function ChartContainer({
3623
+ className,
3624
+ children,
3625
+ width = "100%",
3626
+ height = 350
3627
+ }) {
3628
+ return /* @__PURE__ */ jsx(
3629
+ "div",
3630
+ {
3631
+ "data-slot": "chart-container",
3632
+ className: cn("w-full", className),
3633
+ style: { width, height: typeof height === "number" ? `${height}px` : height },
3634
+ children
3635
+ }
3636
+ );
3637
+ }
3638
+ function ChartTooltipContent({
3639
+ className,
3640
+ label,
3641
+ payload,
3642
+ active
3643
+ }) {
3644
+ if (!active || !payload || payload.length === 0) {
3645
+ return null;
3646
+ }
3647
+ return /* @__PURE__ */ jsxs(
3648
+ "div",
3649
+ {
3650
+ "data-slot": "chart-tooltip-content",
3651
+ className: cn(
3652
+ "bg-background border-border text-foreground rounded-lg border p-2 shadow-md",
3653
+ className
3654
+ ),
3655
+ children: [
3656
+ label && /* @__PURE__ */ jsx("div", { className: "mb-1 text-xs font-medium text-muted-foreground", children: label }),
3657
+ /* @__PURE__ */ jsx("div", { className: "flex flex-col gap-1", children: payload.map((item, index) => /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 text-xs", children: [
3658
+ /* @__PURE__ */ jsx(
3659
+ "div",
3660
+ {
3661
+ className: "h-2 w-2 rounded-full",
3662
+ style: { backgroundColor: item.color }
3663
+ }
3664
+ ),
3665
+ /* @__PURE__ */ jsxs("span", { className: "font-medium", children: [
3666
+ item.name,
3667
+ ":"
3668
+ ] }),
3669
+ /* @__PURE__ */ jsx("span", { className: "text-muted-foreground", children: item.value })
3670
+ ] }, index)) })
3671
+ ]
3672
+ }
3673
+ );
3674
+ }
3675
+ function ChartLegendContent({
2561
3676
  className,
2562
- ...props
2563
- }) => {
3677
+ payload
3678
+ }) {
3679
+ if (!payload || payload.length === 0) {
3680
+ return null;
3681
+ }
2564
3682
  return /* @__PURE__ */ jsx(
2565
- "span",
3683
+ "div",
2566
3684
  {
2567
- className: cn("ml-auto text-xs tracking-widest opacity-60", className),
2568
- ...props
3685
+ "data-slot": "chart-legend-content",
3686
+ className: cn("flex items-center justify-center gap-4 text-sm pt-4", className),
3687
+ children: payload.map((item, index) => /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
3688
+ /* @__PURE__ */ jsx(
3689
+ "div",
3690
+ {
3691
+ className: "h-3 w-3 rounded-sm",
3692
+ style: { backgroundColor: item.color }
3693
+ }
3694
+ ),
3695
+ /* @__PURE__ */ jsx("span", { className: "text-muted-foreground", children: item.value })
3696
+ ] }, index))
2569
3697
  }
2570
3698
  );
2571
- };
2572
- DropdownMenuShortcut.displayName = "DropdownMenuShortcut";
3699
+ }
2573
3700
  function ContextMenu({
2574
3701
  ...props
2575
3702
  }) {
@@ -2772,7 +3899,7 @@ function ContextMenuShortcut({
2772
3899
  }
2773
3900
  );
2774
3901
  }
2775
- var IconButton = React20__default.forwardRef(
3902
+ var IconButton = React24__default.forwardRef(
2776
3903
  ({ variant = ButtonVariant.Ghost, size = IconButtonSize.Default, className, ...props }, ref) => {
2777
3904
  const sizeStyles = {
2778
3905
  [IconButtonSize.Small]: "h-8 w-8",
@@ -2792,7 +3919,7 @@ var IconButton = React20__default.forwardRef(
2792
3919
  }
2793
3920
  );
2794
3921
  IconButton.displayName = "IconButton";
2795
- var DropdownButton = React20__default.forwardRef(({ children, variant = ButtonVariant.Outline, className, ...props }, ref) => {
3922
+ var DropdownButton = React24__default.forwardRef(({ children, variant = ButtonVariant.Outline, className, ...props }, ref) => {
2796
3923
  return /* @__PURE__ */ jsxs(
2797
3924
  Button,
2798
3925
  {
@@ -2808,7 +3935,354 @@ var DropdownButton = React20__default.forwardRef(({ children, variant = ButtonVa
2808
3935
  );
2809
3936
  });
2810
3937
  DropdownButton.displayName = "DropdownButton";
2811
- var Sidebar = React20.forwardRef(({ collapsed = false, className, children, ...props }, ref) => {
3938
+ function InputGroup({ className, ...props }) {
3939
+ return /* @__PURE__ */ jsx(
3940
+ "div",
3941
+ {
3942
+ "data-slot": "input-group",
3943
+ role: "group",
3944
+ className: cn(
3945
+ "group/input-group border-input dark:bg-input/30 relative flex w-full items-center rounded-md border shadow-xs transition-[color,box-shadow] outline-none",
3946
+ "h-9 min-w-0 has-[>textarea]:h-auto",
3947
+ // Variants based on alignment.
3948
+ "has-[>[data-align=inline-start]]:[&>input]:pl-2",
3949
+ "has-[>[data-align=inline-end]]:[&>input]:pr-2",
3950
+ "has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>[data-align=block-start]]:[&>input]:pb-3",
3951
+ "has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-end]]:[&>input]:pt-3",
3952
+ // Focus state.
3953
+ "has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-ring/50 has-[[data-slot=input-group-control]:focus-visible]:ring-[3px]",
3954
+ // Error state.
3955
+ "has-[[data-slot][aria-invalid=true]]:ring-destructive/20 has-[[data-slot][aria-invalid=true]]:border-destructive dark:has-[[data-slot][aria-invalid=true]]:ring-destructive/40",
3956
+ className
3957
+ ),
3958
+ ...props
3959
+ }
3960
+ );
3961
+ }
3962
+ var inputGroupAddonVariants = cva(
3963
+ "text-muted-foreground flex h-auto cursor-text items-center justify-center gap-2 py-1.5 text-sm font-medium select-none [&>svg:not([class*='size-'])]:size-4 [&>kbd]:rounded-[calc(var(--radius)-5px)] group-data-[disabled=true]/input-group:opacity-50",
3964
+ {
3965
+ variants: {
3966
+ align: {
3967
+ "inline-start": "order-first pl-3 has-[>button]:ml-[-0.45rem] has-[>kbd]:ml-[-0.35rem]",
3968
+ "inline-end": "order-last pr-3 has-[>button]:mr-[-0.45rem] has-[>kbd]:mr-[-0.35rem]",
3969
+ "block-start": "order-first w-full justify-start px-3 pt-3 [.border-b]:pb-3 group-has-[>input]/input-group:pt-2.5",
3970
+ "block-end": "order-last w-full justify-start px-3 pb-3 [.border-t]:pt-3 group-has-[>input]/input-group:pb-2.5"
3971
+ }
3972
+ },
3973
+ defaultVariants: {
3974
+ align: "inline-start"
3975
+ }
3976
+ }
3977
+ );
3978
+ function InputGroupAddon({
3979
+ className,
3980
+ align = "inline-start",
3981
+ ...props
3982
+ }) {
3983
+ return /* @__PURE__ */ jsx(
3984
+ "div",
3985
+ {
3986
+ role: "group",
3987
+ "data-slot": "input-group-addon",
3988
+ "data-align": align,
3989
+ className: cn(inputGroupAddonVariants({ align }), className),
3990
+ onClick: (e) => {
3991
+ if (e.target.closest("button")) {
3992
+ return;
3993
+ }
3994
+ e.currentTarget.parentElement?.querySelector("input")?.focus();
3995
+ },
3996
+ ...props
3997
+ }
3998
+ );
3999
+ }
4000
+ var inputGroupButtonVariants = cva(
4001
+ "text-sm shadow-none flex gap-2 items-center",
4002
+ {
4003
+ variants: {
4004
+ size: {
4005
+ xs: "h-6 gap-1 px-2 rounded-[calc(var(--radius)-5px)] [&>svg:not([class*='size-'])]:size-3.5 has-[>svg]:px-2",
4006
+ sm: "h-8 px-2.5 gap-1.5 rounded-md has-[>svg]:px-2.5",
4007
+ "icon-xs": "size-6 rounded-[calc(var(--radius)-5px)] p-0 has-[>svg]:p-0",
4008
+ "icon-sm": "size-8 p-0 has-[>svg]:p-0"
4009
+ }
4010
+ },
4011
+ defaultVariants: {
4012
+ size: "xs"
4013
+ }
4014
+ }
4015
+ );
4016
+ function InputGroupButton({
4017
+ className,
4018
+ type = "button",
4019
+ variant = ButtonVariant.Ghost,
4020
+ size = "xs",
4021
+ ...props
4022
+ }) {
4023
+ return /* @__PURE__ */ jsx(
4024
+ Button,
4025
+ {
4026
+ type,
4027
+ "data-size": size,
4028
+ variant,
4029
+ className: cn(inputGroupButtonVariants({ size }), className),
4030
+ ...props
4031
+ }
4032
+ );
4033
+ }
4034
+ function InputGroupText({ className, ...props }) {
4035
+ return /* @__PURE__ */ jsx(
4036
+ "span",
4037
+ {
4038
+ className: cn(
4039
+ "text-muted-foreground flex items-center gap-2 text-sm [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4",
4040
+ className
4041
+ ),
4042
+ ...props
4043
+ }
4044
+ );
4045
+ }
4046
+ function InputGroupInput({
4047
+ className,
4048
+ ...props
4049
+ }) {
4050
+ return /* @__PURE__ */ jsx(
4051
+ Input,
4052
+ {
4053
+ "data-slot": "input-group-control",
4054
+ className: cn(
4055
+ "flex-1 rounded-none border-0 bg-transparent shadow-none focus-visible:ring-0 dark:bg-transparent",
4056
+ className
4057
+ ),
4058
+ ...props
4059
+ }
4060
+ );
4061
+ }
4062
+ function InputGroupTextarea({
4063
+ className,
4064
+ ...props
4065
+ }) {
4066
+ return /* @__PURE__ */ jsx(
4067
+ Textarea,
4068
+ {
4069
+ "data-slot": "input-group-control",
4070
+ className: cn(
4071
+ "flex-1 resize-none rounded-none border-0 bg-transparent py-3 shadow-none focus-visible:ring-0 dark:bg-transparent",
4072
+ className
4073
+ ),
4074
+ ...props
4075
+ }
4076
+ );
4077
+ }
4078
+ var CalendarIcon = ({
4079
+ className = "",
4080
+ ...props
4081
+ }) => {
4082
+ return /* @__PURE__ */ jsxs(
4083
+ "svg",
4084
+ {
4085
+ className,
4086
+ width: "16",
4087
+ height: "16",
4088
+ viewBox: "0 0 24 24",
4089
+ fill: "none",
4090
+ stroke: "currentColor",
4091
+ strokeWidth: "2",
4092
+ strokeLinecap: "round",
4093
+ strokeLinejoin: "round",
4094
+ ...props,
4095
+ children: [
4096
+ /* @__PURE__ */ jsx("path", { d: "M8 2v4" }),
4097
+ /* @__PURE__ */ jsx("path", { d: "M16 2v4" }),
4098
+ /* @__PURE__ */ jsx("rect", { width: "18", height: "18", x: "3", y: "4", rx: "2" }),
4099
+ /* @__PURE__ */ jsx("path", { d: "M3 10h18" })
4100
+ ]
4101
+ }
4102
+ );
4103
+ };
4104
+ var DatePickerContext = React24.createContext(null);
4105
+ function useDatePickerContext() {
4106
+ const context = React24.useContext(DatePickerContext);
4107
+ if (!context) {
4108
+ throw new Error("DatePicker components must be used within a DatePicker");
4109
+ }
4110
+ return context;
4111
+ }
4112
+ function defaultFormatDate(date) {
4113
+ return format(date, "PPP");
4114
+ }
4115
+ function DatePicker({
4116
+ children,
4117
+ date: controlledDate,
4118
+ onDateChange,
4119
+ defaultDate,
4120
+ open: controlledOpen,
4121
+ onOpenChange,
4122
+ defaultOpen = false,
4123
+ formatDate: formatDateProp = defaultFormatDate
4124
+ }) {
4125
+ const [uncontrolledDate, setUncontrolledDate] = React24.useState(defaultDate);
4126
+ const [uncontrolledOpen, setUncontrolledOpen] = React24.useState(defaultOpen);
4127
+ const isDateControlled = controlledDate !== void 0;
4128
+ const isOpenControlled = controlledOpen !== void 0;
4129
+ const date = isDateControlled ? controlledDate : uncontrolledDate;
4130
+ const open = isOpenControlled ? controlledOpen : uncontrolledOpen;
4131
+ const setDate = React24.useCallback((newDate) => {
4132
+ if (!isDateControlled) {
4133
+ setUncontrolledDate(newDate);
4134
+ }
4135
+ onDateChange?.(newDate);
4136
+ }, [isDateControlled, onDateChange]);
4137
+ const setOpen = React24.useCallback((newOpen) => {
4138
+ if (!isOpenControlled) {
4139
+ setUncontrolledOpen(newOpen);
4140
+ }
4141
+ onOpenChange?.(newOpen);
4142
+ }, [isOpenControlled, onOpenChange]);
4143
+ const contextValue = React24.useMemo(() => ({
4144
+ date,
4145
+ setDate,
4146
+ open,
4147
+ setOpen,
4148
+ formatDate: formatDateProp
4149
+ }), [date, setDate, open, setOpen, formatDateProp]);
4150
+ return /* @__PURE__ */ jsx(DatePickerContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsx(Popover, { open, onOpenChange: setOpen, children }) });
4151
+ }
4152
+ function DatePickerTrigger({
4153
+ className,
4154
+ placeholder = "Pick a date",
4155
+ icon = "calendar",
4156
+ children,
4157
+ ...props
4158
+ }) {
4159
+ const { date, formatDate } = useDatePickerContext();
4160
+ return /* @__PURE__ */ jsx(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsx(
4161
+ Button,
4162
+ {
4163
+ variant: ButtonVariant.Outline,
4164
+ "data-slot": "date-picker-trigger",
4165
+ "data-empty": !date,
4166
+ className: cn(
4167
+ "w-[280px] justify-start text-left font-normal data-[empty=true]:text-muted-foreground",
4168
+ className
4169
+ ),
4170
+ ...props,
4171
+ children: children ?? /* @__PURE__ */ jsxs(Fragment, { children: [
4172
+ icon === "calendar" && /* @__PURE__ */ jsx(CalendarIcon, { className: "mr-2 size-4" }),
4173
+ date ? formatDate(date) : /* @__PURE__ */ jsx("span", { children: placeholder }),
4174
+ icon === "chevron" && /* @__PURE__ */ jsx(ChevronDownIcon, { className: "ml-auto size-4" })
4175
+ ] })
4176
+ }
4177
+ ) });
4178
+ }
4179
+ function DatePickerContent({
4180
+ className,
4181
+ calendarProps,
4182
+ children,
4183
+ align = "start",
4184
+ ...props
4185
+ }) {
4186
+ const { date, setDate, setOpen } = useDatePickerContext();
4187
+ return /* @__PURE__ */ jsx(
4188
+ PopoverContent,
4189
+ {
4190
+ "data-slot": "date-picker-content",
4191
+ className: cn("w-auto overflow-hidden p-0", className),
4192
+ align,
4193
+ ...props,
4194
+ children: children ?? /* @__PURE__ */ jsx(
4195
+ Calendar,
4196
+ {
4197
+ mode: "single",
4198
+ selected: date,
4199
+ onSelect: (newDate) => {
4200
+ setDate(newDate);
4201
+ setOpen(false);
4202
+ },
4203
+ ...calendarProps
4204
+ }
4205
+ )
4206
+ }
4207
+ );
4208
+ }
4209
+ function DatePickerInput({
4210
+ className,
4211
+ inputProps,
4212
+ placeholder = "Select date",
4213
+ id
4214
+ }) {
4215
+ const { date, setDate, setOpen, formatDate } = useDatePickerContext();
4216
+ const [inputValue, setInputValue] = React24.useState(date ? formatDate(date) : "");
4217
+ const [month, setMonth] = React24.useState(date);
4218
+ React24.useEffect(() => {
4219
+ setInputValue(date ? formatDate(date) : "");
4220
+ }, [date, formatDate]);
4221
+ const handleInputChange = (e) => {
4222
+ const value = e.target.value;
4223
+ setInputValue(value);
4224
+ const parsed = new Date(value);
4225
+ if (!isNaN(parsed.getTime())) {
4226
+ setDate(parsed);
4227
+ setMonth(parsed);
4228
+ }
4229
+ };
4230
+ const handleKeyDown = (e) => {
4231
+ if (e.key === "ArrowDown") {
4232
+ e.preventDefault();
4233
+ setOpen(true);
4234
+ }
4235
+ };
4236
+ const handleCalendarSelect = (newDate) => {
4237
+ setDate(newDate);
4238
+ setInputValue(newDate ? formatDate(newDate) : "");
4239
+ setOpen(false);
4240
+ };
4241
+ return /* @__PURE__ */ jsxs("div", { className: cn("relative flex gap-2", className), "data-slot": "date-picker-input", children: [
4242
+ /* @__PURE__ */ jsx(
4243
+ Input,
4244
+ {
4245
+ id,
4246
+ value: inputValue,
4247
+ placeholder,
4248
+ className: "bg-background pr-10",
4249
+ onChange: handleInputChange,
4250
+ onKeyDown: handleKeyDown,
4251
+ ...inputProps
4252
+ }
4253
+ ),
4254
+ /* @__PURE__ */ jsx(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsx(
4255
+ Button,
4256
+ {
4257
+ variant: ButtonVariant.Ghost,
4258
+ className: "absolute top-1/2 right-2 size-6 -translate-y-1/2 p-0",
4259
+ "aria-label": "Select date",
4260
+ children: /* @__PURE__ */ jsx(CalendarIcon, { className: "size-3.5" })
4261
+ }
4262
+ ) }),
4263
+ /* @__PURE__ */ jsx(
4264
+ PopoverContent,
4265
+ {
4266
+ className: "w-auto overflow-hidden p-0",
4267
+ align: "end",
4268
+ alignOffset: -8,
4269
+ sideOffset: 10,
4270
+ children: /* @__PURE__ */ jsx(
4271
+ Calendar,
4272
+ {
4273
+ mode: "single",
4274
+ selected: date,
4275
+ captionLayout: "dropdown",
4276
+ month,
4277
+ onMonthChange: setMonth,
4278
+ onSelect: handleCalendarSelect
4279
+ }
4280
+ )
4281
+ }
4282
+ )
4283
+ ] });
4284
+ }
4285
+ var Sidebar = React24.forwardRef(({ collapsed = false, className, children, ...props }, ref) => {
2812
4286
  return /* @__PURE__ */ jsx(
2813
4287
  "aside",
2814
4288
  {
@@ -2827,7 +4301,7 @@ var Sidebar = React20.forwardRef(({ collapsed = false, className, children, ...p
2827
4301
  );
2828
4302
  });
2829
4303
  Sidebar.displayName = "Sidebar";
2830
- var SidebarContent = React20.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
4304
+ var SidebarContent = React24.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
2831
4305
  "div",
2832
4306
  {
2833
4307
  ref,
@@ -2841,7 +4315,7 @@ var SidebarContent = React20.forwardRef(({ className, ...props }, ref) => /* @__
2841
4315
  }
2842
4316
  ));
2843
4317
  SidebarContent.displayName = "SidebarContent";
2844
- var SidebarMenu = React20.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
4318
+ var SidebarMenu = React24.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
2845
4319
  "ul",
2846
4320
  {
2847
4321
  ref,
@@ -2851,7 +4325,7 @@ var SidebarMenu = React20.forwardRef(({ className, ...props }, ref) => /* @__PUR
2851
4325
  }
2852
4326
  ));
2853
4327
  SidebarMenu.displayName = "SidebarMenu";
2854
- var SidebarMenuItem = React20.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
4328
+ var SidebarMenuItem = React24.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
2855
4329
  "li",
2856
4330
  {
2857
4331
  ref,
@@ -2883,7 +4357,7 @@ var sidebarMenuButtonVariants = cva(
2883
4357
  }
2884
4358
  }
2885
4359
  );
2886
- var SidebarMenuButton = React20.forwardRef(
4360
+ var SidebarMenuButton = React24.forwardRef(
2887
4361
  ({
2888
4362
  asChild = false,
2889
4363
  isActive = false,
@@ -2909,7 +4383,7 @@ var SidebarMenuButton = React20.forwardRef(
2909
4383
  }
2910
4384
  );
2911
4385
  SidebarMenuButton.displayName = "SidebarMenuButton";
2912
- var SidebarMenuIcon = React20.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
4386
+ var SidebarMenuIcon = React24.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
2913
4387
  "span",
2914
4388
  {
2915
4389
  ref,
@@ -2918,7 +4392,7 @@ var SidebarMenuIcon = React20.forwardRef(({ className, ...props }, ref) => /* @_
2918
4392
  }
2919
4393
  ));
2920
4394
  SidebarMenuIcon.displayName = "SidebarMenuIcon";
2921
- var SidebarMenuLabel = React20.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
4395
+ var SidebarMenuLabel = React24.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
2922
4396
  "span",
2923
4397
  {
2924
4398
  ref,
@@ -2927,7 +4401,7 @@ var SidebarMenuLabel = React20.forwardRef(({ className, ...props }, ref) => /* @
2927
4401
  }
2928
4402
  ));
2929
4403
  SidebarMenuLabel.displayName = "SidebarMenuLabel";
2930
- var SidebarHeader = React20.forwardRef(
4404
+ var SidebarHeader = React24.forwardRef(
2931
4405
  ({ logo, logoText, collapsed = false, onClick, className, ...props }, ref) => {
2932
4406
  return /* @__PURE__ */ jsxs(
2933
4407
  "div",
@@ -2950,7 +4424,7 @@ var SidebarHeader = React20.forwardRef(
2950
4424
  }
2951
4425
  );
2952
4426
  SidebarHeader.displayName = "SidebarHeader";
2953
- var UserInfo = React20__default.forwardRef(
4427
+ var UserInfo = React24__default.forwardRef(
2954
4428
  ({ displayName, email, avatarUrl, className, loading }, ref) => {
2955
4429
  const getInitials = () => {
2956
4430
  if (!displayName) return toUpper(email?.[0] || "") || "?";
@@ -3296,32 +4770,6 @@ var CloseIcon = ({ className = "" }) => {
3296
4770
  }
3297
4771
  );
3298
4772
  };
3299
- var CalendarIcon = ({
3300
- className = "",
3301
- ...props
3302
- }) => {
3303
- return /* @__PURE__ */ jsxs(
3304
- "svg",
3305
- {
3306
- className,
3307
- width: "16",
3308
- height: "16",
3309
- viewBox: "0 0 24 24",
3310
- fill: "none",
3311
- stroke: "currentColor",
3312
- strokeWidth: "2",
3313
- strokeLinecap: "round",
3314
- strokeLinejoin: "round",
3315
- ...props,
3316
- children: [
3317
- /* @__PURE__ */ jsx("path", { d: "M8 2v4" }),
3318
- /* @__PURE__ */ jsx("path", { d: "M16 2v4" }),
3319
- /* @__PURE__ */ jsx("rect", { width: "18", height: "18", x: "3", y: "4", rx: "2" }),
3320
- /* @__PURE__ */ jsx("path", { d: "M3 10h18" })
3321
- ]
3322
- }
3323
- );
3324
- };
3325
4773
 
3326
4774
  // src/styles/applyTheme.ts
3327
4775
  var hslToVar = (color) => {
@@ -3390,6 +4838,6 @@ var applyTheme = (theme, themeName) => {
3390
4838
  }
3391
4839
  };
3392
4840
 
3393
- export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, AspectRatio, Avatar, AvatarFallback, AvatarImage, Badge, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, CLOSE_ICON_ID, Calendar, CalendarDayButton, CalendarIcon, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Carousel, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious, ChartContainer, ChartLegendContent, ChartTooltipContent, ChatInput, Checkbox, ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon, ChevronUpIcon, CloseIcon, Collapsible, CollapsibleContent2 as CollapsibleContent, CollapsibleTrigger2 as CollapsibleTrigger, ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuPortal, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, DropdownButton, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, Header, HoverCard, HoverCardContent, HoverCardTrigger, IconButton, Input, InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot, Label, MENU_ICON_ID, MenuIcon, Menubar, MenubarCheckboxItem, MenubarContent, MenubarGroup, MenubarItem, MenubarLabel, MenubarMenu, MenubarPortal, MenubarRadioGroup, MenubarRadioItem, MenubarSeparator, MenubarShortcut, MenubarSub, MenubarSubContent, MenubarSubTrigger, MenubarTrigger, MessageBubble, MessageType, NativeSelect, NativeSelectOptGroup, NativeSelectOption, NavigationMenu, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, NavigationMenuViewport, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, Progress, RadioGroup, RadioGroupItem, ResizableHandle, ResizablePanel, ResizablePanelGroup, ScrollArea, ScrollBar, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator2 as Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, Sidebar, SidebarContent, SidebarHeader, SidebarMenu, SidebarMenuButton, SidebarMenuIcon, SidebarMenuItem, SidebarMenuLabel, Skeleton, Slider, SliderRange, SliderThumb, SliderTrack, Spinner, Switch, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, ThreadList, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, UserInfo, applyTheme, badgeVariants };
4841
+ export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, Alert, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AlertTitle, AspectRatio, Avatar, AvatarFallback, AvatarImage, Badge, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, CLOSE_ICON_ID, Calendar, CalendarDayButton, CalendarIcon, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Carousel, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious, ChartContainer, ChartLegendContent, ChartTooltipContent, ChatInput, Checkbox, ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon, ChevronUpIcon, CloseIcon, Collapsible, CollapsibleContent2 as CollapsibleContent, CollapsibleTrigger2 as CollapsibleTrigger, ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuPortal, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, DataTable, DataTableColumnHeader, DataTablePagination, DataTableViewOptions, DatePicker, DatePickerContent, DatePickerInput, DatePickerTrigger, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, DropdownButton, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyTitle, Field, FieldContent, FieldDescription, FieldError, FieldGroup, FieldLabel, FieldLegend, FieldSeparator, FieldSet, FieldTitle, Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, Header, HoverCard, HoverCardContent, HoverCardTrigger, IconButton, Input, InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, InputGroupText, InputGroupTextarea, InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot, Item6 as Item, ItemActions, ItemContent, ItemDescription, ItemFooter, ItemGroup, ItemHeader, ItemMedia, ItemSeparator, ItemTitle, Label, MENU_ICON_ID, MenuIcon, Menubar, MenubarCheckboxItem, MenubarContent, MenubarGroup, MenubarItem, MenubarLabel, MenubarMenu, MenubarPortal, MenubarRadioGroup, MenubarRadioItem, MenubarSeparator, MenubarShortcut, MenubarSub, MenubarSubContent, MenubarSubTrigger, MenubarTrigger, MessageBubble, MessageType, NativeSelect, NativeSelectOptGroup, NativeSelectOption, NavigationMenu, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, NavigationMenuViewport, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, Progress, RadioGroup, RadioGroupItem, ResizableHandle, ResizablePanel, ResizablePanelGroup, ScrollArea, ScrollBar, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, Sidebar, SidebarContent, SidebarHeader, SidebarMenu, SidebarMenuButton, SidebarMenuIcon, SidebarMenuItem, SidebarMenuLabel, Skeleton, Slider, SliderRange, SliderThumb, SliderTrack, Spinner, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, ThreadList, Toaster, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, UserInfo, alertVariants, applyTheme, badgeVariants, emptyMediaVariants, useFormField };
3394
4842
  //# sourceMappingURL=index.js.map
3395
4843
  //# sourceMappingURL=index.js.map