@elqnt/react 1.0.2 → 1.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/form-controls/icon.js +54 -3
- package/dist/components/form-controls/icon.js.map +1 -1
- package/dist/components/form-controls/icon.mjs +28 -3
- package/dist/components/form-controls/icon.mjs.map +1 -1
- package/dist/components/index.d.mts +587 -0
- package/dist/components/index.d.ts +587 -0
- package/dist/components/index.js +6252 -0
- package/dist/components/index.js.map +1 -0
- package/dist/components/index.mjs +6185 -0
- package/dist/components/index.mjs.map +1 -0
- package/dist/components/upload/upload-actions.js +147 -8
- package/dist/components/upload/upload-actions.js.map +1 -1
- package/dist/components/upload/upload-actions.mjs +118 -4
- package/dist/components/upload/upload-actions.mjs.map +1 -1
- package/dist/index.d.mts +21 -585
- package/dist/index.d.ts +21 -585
- package/dist/index.js +1414 -1201
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +626 -483
- package/dist/index.mjs.map +1 -1
- package/package.json +6 -1
- package/dist/chunk-FLTEIMWJ.mjs +0 -36
- package/dist/chunk-FLTEIMWJ.mjs.map +0 -1
- package/dist/chunk-UXJQ7CBV.mjs +0 -122
- package/dist/chunk-UXJQ7CBV.mjs.map +0 -1
- package/dist/chunk-W4AIK44N.js +0 -122
- package/dist/chunk-W4AIK44N.js.map +0 -1
- package/dist/chunk-ZCBGKBZS.js +0 -36
- package/dist/chunk-ZCBGKBZS.js.map +0 -1
package/dist/index.mjs
CHANGED
|
@@ -1,17 +1,21 @@
|
|
|
1
|
-
|
|
2
|
-
Icon,
|
|
3
|
-
cn,
|
|
4
|
-
getBadgeVariant
|
|
5
|
-
} from "./chunk-FLTEIMWJ.mjs";
|
|
6
|
-
import {
|
|
7
|
-
uploadFile,
|
|
8
|
-
uploadToS3
|
|
9
|
-
} from "./chunk-UXJQ7CBV.mjs";
|
|
1
|
+
"use client";
|
|
10
2
|
|
|
11
3
|
// components/ui/button.tsx
|
|
12
4
|
import * as React from "react";
|
|
13
5
|
import { Slot } from "@radix-ui/react-slot";
|
|
14
6
|
import { cva } from "class-variance-authority";
|
|
7
|
+
|
|
8
|
+
// lib/utils.ts
|
|
9
|
+
import { clsx } from "clsx";
|
|
10
|
+
import { twMerge } from "tailwind-merge";
|
|
11
|
+
function cn(...inputs) {
|
|
12
|
+
return twMerge(clsx(inputs));
|
|
13
|
+
}
|
|
14
|
+
function getBadgeVariant(status) {
|
|
15
|
+
return status === "open" ? "default" : "secondary";
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
// components/ui/button.tsx
|
|
15
19
|
import { jsx } from "react/jsx-runtime";
|
|
16
20
|
var buttonVariants = cva(
|
|
17
21
|
"inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50",
|
|
@@ -592,35 +596,55 @@ function BackButton() {
|
|
|
592
596
|
}, children: "Back" });
|
|
593
597
|
}
|
|
594
598
|
|
|
599
|
+
// components/form-controls/icon.tsx
|
|
600
|
+
import { icons } from "lucide-react";
|
|
601
|
+
import { memo } from "react";
|
|
602
|
+
import { jsx as jsx9 } from "react/jsx-runtime";
|
|
603
|
+
var Icon2 = memo(({ name, className, strokeWidth, size }) => {
|
|
604
|
+
const IconComponent = icons[name];
|
|
605
|
+
if (!IconComponent) {
|
|
606
|
+
return null;
|
|
607
|
+
}
|
|
608
|
+
return /* @__PURE__ */ jsx9(
|
|
609
|
+
IconComponent,
|
|
610
|
+
{
|
|
611
|
+
className: cn(className),
|
|
612
|
+
strokeWidth: strokeWidth || 2.5,
|
|
613
|
+
size
|
|
614
|
+
}
|
|
615
|
+
);
|
|
616
|
+
});
|
|
617
|
+
Icon2.displayName = "Icon";
|
|
618
|
+
|
|
595
619
|
// components/form-controls/action-bar/action-bar-button.tsx
|
|
596
|
-
import { jsx as
|
|
620
|
+
import { jsx as jsx10, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
597
621
|
function ActionBarButton({
|
|
598
622
|
label,
|
|
599
623
|
onClick,
|
|
600
624
|
icon
|
|
601
625
|
}) {
|
|
602
626
|
return /* @__PURE__ */ jsxs4(Button2, { onClick, className: "flex items-center gap-2", children: [
|
|
603
|
-
/* @__PURE__ */
|
|
627
|
+
/* @__PURE__ */ jsx10(Icon2, { name: icon, size: 20, strokeWidth: 1 }),
|
|
604
628
|
label
|
|
605
629
|
] });
|
|
606
630
|
}
|
|
607
631
|
|
|
608
632
|
// components/form-controls/action-bar/action-bar.tsx
|
|
609
|
-
import { jsx as
|
|
633
|
+
import { jsx as jsx11, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
610
634
|
var ActionBar = ({ actions }) => {
|
|
611
635
|
function backHandler() {
|
|
612
636
|
window.history.back();
|
|
613
637
|
}
|
|
614
638
|
return /* @__PURE__ */ jsxs5("div", { className: "flex items-center justify-center gap-4 bg-primary text-primary-foreground shadow rounded-md text-sm font-medium w-fit divide-solid divide-x", children: [
|
|
615
|
-
/* @__PURE__ */
|
|
639
|
+
/* @__PURE__ */ jsx11("div", { className: "cursor-pointer pl-4 py-2", onClick: backHandler, children: /* @__PURE__ */ jsx11(Icon2, { name: "ArrowBigLeft" }) }),
|
|
616
640
|
actions.map((item) => /* @__PURE__ */ jsxs5(
|
|
617
641
|
"div",
|
|
618
642
|
{
|
|
619
643
|
className: "flex items-center justify-center gap-2 cursor-pointer py-2 px-4",
|
|
620
644
|
onClick: item.onClick,
|
|
621
645
|
children: [
|
|
622
|
-
/* @__PURE__ */
|
|
623
|
-
/* @__PURE__ */
|
|
646
|
+
/* @__PURE__ */ jsx11(Icon2, { name: item.icon }),
|
|
647
|
+
/* @__PURE__ */ jsx11("p", { children: item.label })
|
|
624
648
|
]
|
|
625
649
|
},
|
|
626
650
|
item.label
|
|
@@ -631,7 +655,7 @@ var ActionBar = ({ actions }) => {
|
|
|
631
655
|
// components/ui/alert.tsx
|
|
632
656
|
import * as React6 from "react";
|
|
633
657
|
import { cva as cva3 } from "class-variance-authority";
|
|
634
|
-
import { jsx as
|
|
658
|
+
import { jsx as jsx12 } from "react/jsx-runtime";
|
|
635
659
|
var alertVariants = cva3(
|
|
636
660
|
"relative w-full rounded-lg border px-4 py-3 text-sm [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground [&>svg~*]:pl-7",
|
|
637
661
|
{
|
|
@@ -646,7 +670,7 @@ var alertVariants = cva3(
|
|
|
646
670
|
}
|
|
647
671
|
}
|
|
648
672
|
);
|
|
649
|
-
var Alert = React6.forwardRef(({ className, variant, ...props }, ref) => /* @__PURE__ */
|
|
673
|
+
var Alert = React6.forwardRef(({ className, variant, ...props }, ref) => /* @__PURE__ */ jsx12(
|
|
650
674
|
"div",
|
|
651
675
|
{
|
|
652
676
|
ref,
|
|
@@ -656,7 +680,7 @@ var Alert = React6.forwardRef(({ className, variant, ...props }, ref) => /* @__P
|
|
|
656
680
|
}
|
|
657
681
|
));
|
|
658
682
|
Alert.displayName = "Alert";
|
|
659
|
-
var AlertTitle = React6.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
|
|
683
|
+
var AlertTitle = React6.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx12(
|
|
660
684
|
"h5",
|
|
661
685
|
{
|
|
662
686
|
ref,
|
|
@@ -665,7 +689,7 @@ var AlertTitle = React6.forwardRef(({ className, ...props }, ref) => /* @__PURE_
|
|
|
665
689
|
}
|
|
666
690
|
));
|
|
667
691
|
AlertTitle.displayName = "AlertTitle";
|
|
668
|
-
var AlertDescription = React6.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
|
|
692
|
+
var AlertDescription = React6.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx12(
|
|
669
693
|
"div",
|
|
670
694
|
{
|
|
671
695
|
ref,
|
|
@@ -677,20 +701,20 @@ AlertDescription.displayName = "AlertDescription";
|
|
|
677
701
|
|
|
678
702
|
// components/form-controls/alert.tsx
|
|
679
703
|
import { RocketIcon } from "@radix-ui/react-icons";
|
|
680
|
-
import { jsx as
|
|
704
|
+
import { jsx as jsx13, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
681
705
|
var Alert2 = ({ title, description }) => {
|
|
682
706
|
return /* @__PURE__ */ jsxs6(Alert, { children: [
|
|
683
|
-
/* @__PURE__ */
|
|
684
|
-
/* @__PURE__ */
|
|
685
|
-
/* @__PURE__ */
|
|
707
|
+
/* @__PURE__ */ jsx13(RocketIcon, { className: "h-4 w-4" }),
|
|
708
|
+
/* @__PURE__ */ jsx13(AlertTitle, { children: title }),
|
|
709
|
+
/* @__PURE__ */ jsx13(AlertDescription, { children: description })
|
|
686
710
|
] });
|
|
687
711
|
};
|
|
688
712
|
|
|
689
713
|
// components/ui/avatar.tsx
|
|
690
714
|
import * as React7 from "react";
|
|
691
715
|
import * as AvatarPrimitive from "@radix-ui/react-avatar";
|
|
692
|
-
import { jsx as
|
|
693
|
-
var Avatar = React7.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
|
|
716
|
+
import { jsx as jsx14 } from "react/jsx-runtime";
|
|
717
|
+
var Avatar = React7.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx14(
|
|
694
718
|
AvatarPrimitive.Root,
|
|
695
719
|
{
|
|
696
720
|
ref,
|
|
@@ -702,7 +726,7 @@ var Avatar = React7.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
|
|
|
702
726
|
}
|
|
703
727
|
));
|
|
704
728
|
Avatar.displayName = AvatarPrimitive.Root.displayName;
|
|
705
|
-
var AvatarImage = React7.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
|
|
729
|
+
var AvatarImage = React7.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx14(
|
|
706
730
|
AvatarPrimitive.Image,
|
|
707
731
|
{
|
|
708
732
|
ref,
|
|
@@ -711,7 +735,7 @@ var AvatarImage = React7.forwardRef(({ className, ...props }, ref) => /* @__PURE
|
|
|
711
735
|
}
|
|
712
736
|
));
|
|
713
737
|
AvatarImage.displayName = AvatarPrimitive.Image.displayName;
|
|
714
|
-
var AvatarFallback = React7.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
|
|
738
|
+
var AvatarFallback = React7.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx14(
|
|
715
739
|
AvatarPrimitive.Fallback,
|
|
716
740
|
{
|
|
717
741
|
ref,
|
|
@@ -725,11 +749,11 @@ var AvatarFallback = React7.forwardRef(({ className, ...props }, ref) => /* @__P
|
|
|
725
749
|
AvatarFallback.displayName = AvatarPrimitive.Fallback.displayName;
|
|
726
750
|
|
|
727
751
|
// components/form-controls/avatar.tsx
|
|
728
|
-
import { jsx as
|
|
752
|
+
import { jsx as jsx15, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
729
753
|
var Avatar2 = ({ image, fallback }) => {
|
|
730
754
|
return /* @__PURE__ */ jsxs7(Avatar, { className: "w-fit", children: [
|
|
731
|
-
/* @__PURE__ */
|
|
732
|
-
/* @__PURE__ */
|
|
755
|
+
/* @__PURE__ */ jsx15(AvatarImage, { src: image }),
|
|
756
|
+
/* @__PURE__ */ jsx15(AvatarFallback, { children: fallback })
|
|
733
757
|
] });
|
|
734
758
|
};
|
|
735
759
|
|
|
@@ -740,10 +764,10 @@ import { Fragment as Fragment2 } from "react";
|
|
|
740
764
|
import * as React8 from "react";
|
|
741
765
|
import { ChevronRightIcon, DotsHorizontalIcon } from "@radix-ui/react-icons";
|
|
742
766
|
import { Slot as Slot2 } from "@radix-ui/react-slot";
|
|
743
|
-
import { jsx as
|
|
744
|
-
var Breadcrumb = React8.forwardRef(({ ...props }, ref) => /* @__PURE__ */
|
|
767
|
+
import { jsx as jsx16, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
768
|
+
var Breadcrumb = React8.forwardRef(({ ...props }, ref) => /* @__PURE__ */ jsx16("nav", { ref, "aria-label": "breadcrumb", ...props }));
|
|
745
769
|
Breadcrumb.displayName = "Breadcrumb";
|
|
746
|
-
var BreadcrumbList = React8.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
|
|
770
|
+
var BreadcrumbList = React8.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx16(
|
|
747
771
|
"ol",
|
|
748
772
|
{
|
|
749
773
|
ref,
|
|
@@ -755,7 +779,7 @@ var BreadcrumbList = React8.forwardRef(({ className, ...props }, ref) => /* @__P
|
|
|
755
779
|
}
|
|
756
780
|
));
|
|
757
781
|
BreadcrumbList.displayName = "BreadcrumbList";
|
|
758
|
-
var BreadcrumbItem = React8.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
|
|
782
|
+
var BreadcrumbItem = React8.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx16(
|
|
759
783
|
"li",
|
|
760
784
|
{
|
|
761
785
|
ref,
|
|
@@ -766,7 +790,7 @@ var BreadcrumbItem = React8.forwardRef(({ className, ...props }, ref) => /* @__P
|
|
|
766
790
|
BreadcrumbItem.displayName = "BreadcrumbItem";
|
|
767
791
|
var BreadcrumbLink = React8.forwardRef(({ asChild, className, ...props }, ref) => {
|
|
768
792
|
const Comp = asChild ? Slot2 : "a";
|
|
769
|
-
return /* @__PURE__ */
|
|
793
|
+
return /* @__PURE__ */ jsx16(
|
|
770
794
|
Comp,
|
|
771
795
|
{
|
|
772
796
|
ref,
|
|
@@ -776,7 +800,7 @@ var BreadcrumbLink = React8.forwardRef(({ asChild, className, ...props }, ref) =
|
|
|
776
800
|
);
|
|
777
801
|
});
|
|
778
802
|
BreadcrumbLink.displayName = "BreadcrumbLink";
|
|
779
|
-
var BreadcrumbPage = React8.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
|
|
803
|
+
var BreadcrumbPage = React8.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx16(
|
|
780
804
|
"span",
|
|
781
805
|
{
|
|
782
806
|
ref,
|
|
@@ -792,14 +816,14 @@ var BreadcrumbSeparator = ({
|
|
|
792
816
|
children,
|
|
793
817
|
className,
|
|
794
818
|
...props
|
|
795
|
-
}) => /* @__PURE__ */
|
|
819
|
+
}) => /* @__PURE__ */ jsx16(
|
|
796
820
|
"li",
|
|
797
821
|
{
|
|
798
822
|
role: "presentation",
|
|
799
823
|
"aria-hidden": "true",
|
|
800
824
|
className: cn("[&>svg]:size-3.5", className),
|
|
801
825
|
...props,
|
|
802
|
-
children: children ?? /* @__PURE__ */
|
|
826
|
+
children: children ?? /* @__PURE__ */ jsx16(ChevronRightIcon, {})
|
|
803
827
|
}
|
|
804
828
|
);
|
|
805
829
|
BreadcrumbSeparator.displayName = "BreadcrumbSeparator";
|
|
@@ -814,26 +838,26 @@ var BreadcrumbEllipsis = ({
|
|
|
814
838
|
className: cn("flex h-9 w-9 items-center justify-center", className),
|
|
815
839
|
...props,
|
|
816
840
|
children: [
|
|
817
|
-
/* @__PURE__ */
|
|
818
|
-
/* @__PURE__ */
|
|
841
|
+
/* @__PURE__ */ jsx16(DotsHorizontalIcon, { className: "h-4 w-4" }),
|
|
842
|
+
/* @__PURE__ */ jsx16("span", { className: "sr-only", children: "More" })
|
|
819
843
|
]
|
|
820
844
|
}
|
|
821
845
|
);
|
|
822
846
|
BreadcrumbEllipsis.displayName = "BreadcrumbElipssis";
|
|
823
847
|
|
|
824
848
|
// components/form-controls/breadcrumb.tsx
|
|
825
|
-
import { jsx as
|
|
849
|
+
import { jsx as jsx17, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
826
850
|
var Breadcrumb2 = ({ breadcrumb }) => {
|
|
827
|
-
return /* @__PURE__ */
|
|
828
|
-
/* @__PURE__ */
|
|
829
|
-
index < breadcrumb.length - 1 && /* @__PURE__ */
|
|
851
|
+
return /* @__PURE__ */ jsx17(Breadcrumb, { className: "p-4", children: /* @__PURE__ */ jsx17(BreadcrumbList, { children: breadcrumb.map(({ href, label }, index) => /* @__PURE__ */ jsxs9(Fragment2, { children: [
|
|
852
|
+
/* @__PURE__ */ jsx17(BreadcrumbItem, { children: index !== breadcrumb.length - 1 ? /* @__PURE__ */ jsx17(BreadcrumbLink, { className: "cursor-pointer", href, children: label.replace(/-/g, " ") }) : /* @__PURE__ */ jsx17(BreadcrumbPage, { children: label.replace(/-/g, " ") }) }),
|
|
853
|
+
index < breadcrumb.length - 1 && /* @__PURE__ */ jsx17(BreadcrumbSeparator, {})
|
|
830
854
|
] }, index)) }) });
|
|
831
855
|
};
|
|
832
856
|
|
|
833
857
|
// components/ui/card.tsx
|
|
834
858
|
import * as React9 from "react";
|
|
835
|
-
import { jsx as
|
|
836
|
-
var Card = React9.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
|
|
859
|
+
import { jsx as jsx18 } from "react/jsx-runtime";
|
|
860
|
+
var Card = React9.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx18(
|
|
837
861
|
"div",
|
|
838
862
|
{
|
|
839
863
|
ref,
|
|
@@ -845,7 +869,7 @@ var Card = React9.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ j
|
|
|
845
869
|
}
|
|
846
870
|
));
|
|
847
871
|
Card.displayName = "Card";
|
|
848
|
-
var CardHeader = React9.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
|
|
872
|
+
var CardHeader = React9.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx18(
|
|
849
873
|
"div",
|
|
850
874
|
{
|
|
851
875
|
ref,
|
|
@@ -854,7 +878,7 @@ var CardHeader = React9.forwardRef(({ className, ...props }, ref) => /* @__PURE_
|
|
|
854
878
|
}
|
|
855
879
|
));
|
|
856
880
|
CardHeader.displayName = "CardHeader";
|
|
857
|
-
var CardTitle = React9.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
|
|
881
|
+
var CardTitle = React9.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx18(
|
|
858
882
|
"h3",
|
|
859
883
|
{
|
|
860
884
|
ref,
|
|
@@ -863,7 +887,7 @@ var CardTitle = React9.forwardRef(({ className, ...props }, ref) => /* @__PURE__
|
|
|
863
887
|
}
|
|
864
888
|
));
|
|
865
889
|
CardTitle.displayName = "CardTitle";
|
|
866
|
-
var CardDescription = React9.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
|
|
890
|
+
var CardDescription = React9.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx18(
|
|
867
891
|
"p",
|
|
868
892
|
{
|
|
869
893
|
ref,
|
|
@@ -872,9 +896,9 @@ var CardDescription = React9.forwardRef(({ className, ...props }, ref) => /* @__
|
|
|
872
896
|
}
|
|
873
897
|
));
|
|
874
898
|
CardDescription.displayName = "CardDescription";
|
|
875
|
-
var CardContent = React9.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
|
|
899
|
+
var CardContent = React9.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx18("div", { ref, className: cn("p-6 pt-0", className), ...props }));
|
|
876
900
|
CardContent.displayName = "CardContent";
|
|
877
|
-
var CardFooter = React9.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
|
|
901
|
+
var CardFooter = React9.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx18(
|
|
878
902
|
"div",
|
|
879
903
|
{
|
|
880
904
|
ref,
|
|
@@ -885,15 +909,15 @@ var CardFooter = React9.forwardRef(({ className, ...props }, ref) => /* @__PURE_
|
|
|
885
909
|
CardFooter.displayName = "CardFooter";
|
|
886
910
|
|
|
887
911
|
// components/form-controls/card.tsx
|
|
888
|
-
import { jsx as
|
|
912
|
+
import { jsx as jsx19, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
889
913
|
var Card2 = ({ title, description, content, footer }) => {
|
|
890
914
|
return /* @__PURE__ */ jsxs10(Card, { children: [
|
|
891
915
|
/* @__PURE__ */ jsxs10(CardHeader, { children: [
|
|
892
|
-
/* @__PURE__ */
|
|
893
|
-
description && /* @__PURE__ */
|
|
916
|
+
/* @__PURE__ */ jsx19(CardTitle, { children: title }),
|
|
917
|
+
description && /* @__PURE__ */ jsx19(CardDescription, { children: description })
|
|
894
918
|
] }),
|
|
895
|
-
/* @__PURE__ */
|
|
896
|
-
footer && /* @__PURE__ */
|
|
919
|
+
/* @__PURE__ */ jsx19(CardContent, { children: /* @__PURE__ */ jsx19("p", { children: content }) }),
|
|
920
|
+
footer && /* @__PURE__ */ jsx19(CardFooter, { children: /* @__PURE__ */ jsx19("p", { children: footer }) })
|
|
897
921
|
] });
|
|
898
922
|
};
|
|
899
923
|
|
|
@@ -904,8 +928,8 @@ import * as React13 from "react";
|
|
|
904
928
|
import * as React10 from "react";
|
|
905
929
|
import * as CheckboxPrimitive from "@radix-ui/react-checkbox";
|
|
906
930
|
import { CheckIcon as CheckIcon2 } from "@radix-ui/react-icons";
|
|
907
|
-
import { jsx as
|
|
908
|
-
var Checkbox = React10.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
|
|
931
|
+
import { jsx as jsx20 } from "react/jsx-runtime";
|
|
932
|
+
var Checkbox = React10.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx20(
|
|
909
933
|
CheckboxPrimitive.Root,
|
|
910
934
|
{
|
|
911
935
|
ref,
|
|
@@ -914,11 +938,11 @@ var Checkbox = React10.forwardRef(({ className, ...props }, ref) => /* @__PURE__
|
|
|
914
938
|
className
|
|
915
939
|
),
|
|
916
940
|
...props,
|
|
917
|
-
children: /* @__PURE__ */
|
|
941
|
+
children: /* @__PURE__ */ jsx20(
|
|
918
942
|
CheckboxPrimitive.Indicator,
|
|
919
943
|
{
|
|
920
944
|
className: cn("flex items-center justify-center text-current"),
|
|
921
|
-
children: /* @__PURE__ */
|
|
945
|
+
children: /* @__PURE__ */ jsx20(CheckIcon2, { className: "h-4 w-4" })
|
|
922
946
|
}
|
|
923
947
|
)
|
|
924
948
|
}
|
|
@@ -938,11 +962,11 @@ import {
|
|
|
938
962
|
import * as React11 from "react";
|
|
939
963
|
import * as LabelPrimitive from "@radix-ui/react-label";
|
|
940
964
|
import { cva as cva4 } from "class-variance-authority";
|
|
941
|
-
import { jsx as
|
|
965
|
+
import { jsx as jsx21 } from "react/jsx-runtime";
|
|
942
966
|
var labelVariants = cva4(
|
|
943
967
|
"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"
|
|
944
968
|
);
|
|
945
|
-
var Label2 = React11.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
|
|
969
|
+
var Label2 = React11.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx21(
|
|
946
970
|
LabelPrimitive.Root,
|
|
947
971
|
{
|
|
948
972
|
ref,
|
|
@@ -953,7 +977,7 @@ var Label2 = React11.forwardRef(({ className, ...props }, ref) => /* @__PURE__ *
|
|
|
953
977
|
Label2.displayName = LabelPrimitive.Root.displayName;
|
|
954
978
|
|
|
955
979
|
// components/ui/form.tsx
|
|
956
|
-
import { jsx as
|
|
980
|
+
import { jsx as jsx22 } from "react/jsx-runtime";
|
|
957
981
|
var Form = FormProvider;
|
|
958
982
|
var FormFieldContext = React12.createContext(
|
|
959
983
|
{}
|
|
@@ -961,7 +985,7 @@ var FormFieldContext = React12.createContext(
|
|
|
961
985
|
var FormField = ({
|
|
962
986
|
...props
|
|
963
987
|
}) => {
|
|
964
|
-
return /* @__PURE__ */
|
|
988
|
+
return /* @__PURE__ */ jsx22(FormFieldContext.Provider, { value: { name: props.name }, children: /* @__PURE__ */ jsx22(Controller, { ...props }) });
|
|
965
989
|
};
|
|
966
990
|
var useFormField = () => {
|
|
967
991
|
const fieldContext = React12.useContext(FormFieldContext);
|
|
@@ -986,12 +1010,12 @@ var FormItemContext = React12.createContext(
|
|
|
986
1010
|
);
|
|
987
1011
|
var FormItem = React12.forwardRef(({ className, ...props }, ref) => {
|
|
988
1012
|
const id = React12.useId();
|
|
989
|
-
return /* @__PURE__ */
|
|
1013
|
+
return /* @__PURE__ */ jsx22(FormItemContext.Provider, { value: { id }, children: /* @__PURE__ */ jsx22("div", { ref, className: cn("space-y-2", className), ...props }) });
|
|
990
1014
|
});
|
|
991
1015
|
FormItem.displayName = "FormItem";
|
|
992
1016
|
var FormLabel = React12.forwardRef(({ className, ...props }, ref) => {
|
|
993
1017
|
const { error, formItemId } = useFormField();
|
|
994
|
-
return /* @__PURE__ */
|
|
1018
|
+
return /* @__PURE__ */ jsx22(
|
|
995
1019
|
Label2,
|
|
996
1020
|
{
|
|
997
1021
|
ref,
|
|
@@ -1004,7 +1028,7 @@ var FormLabel = React12.forwardRef(({ className, ...props }, ref) => {
|
|
|
1004
1028
|
FormLabel.displayName = "FormLabel";
|
|
1005
1029
|
var FormControl = React12.forwardRef(({ ...props }, ref) => {
|
|
1006
1030
|
const { error, formItemId, formDescriptionId, formMessageId } = useFormField();
|
|
1007
|
-
return /* @__PURE__ */
|
|
1031
|
+
return /* @__PURE__ */ jsx22(
|
|
1008
1032
|
Slot3,
|
|
1009
1033
|
{
|
|
1010
1034
|
ref,
|
|
@@ -1018,7 +1042,7 @@ var FormControl = React12.forwardRef(({ ...props }, ref) => {
|
|
|
1018
1042
|
FormControl.displayName = "FormControl";
|
|
1019
1043
|
var FormDescription = React12.forwardRef(({ className, ...props }, ref) => {
|
|
1020
1044
|
const { formDescriptionId } = useFormField();
|
|
1021
|
-
return /* @__PURE__ */
|
|
1045
|
+
return /* @__PURE__ */ jsx22(
|
|
1022
1046
|
"p",
|
|
1023
1047
|
{
|
|
1024
1048
|
ref,
|
|
@@ -1035,7 +1059,7 @@ var FormMessage = React12.forwardRef(({ className, children, ...props }, ref) =>
|
|
|
1035
1059
|
if (!body) {
|
|
1036
1060
|
return null;
|
|
1037
1061
|
}
|
|
1038
|
-
return /* @__PURE__ */
|
|
1062
|
+
return /* @__PURE__ */ jsx22(
|
|
1039
1063
|
"p",
|
|
1040
1064
|
{
|
|
1041
1065
|
ref,
|
|
@@ -1049,16 +1073,16 @@ var FormMessage = React12.forwardRef(({ className, children, ...props }, ref) =>
|
|
|
1049
1073
|
FormMessage.displayName = "FormMessage";
|
|
1050
1074
|
|
|
1051
1075
|
// components/form-controls/checkbox.tsx
|
|
1052
|
-
import { jsx as
|
|
1076
|
+
import { jsx as jsx23, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
1053
1077
|
var Checkbox2 = React13.forwardRef(
|
|
1054
|
-
({ className, title, name, control, isFormField, ...props }, ref) => isFormField ? /* @__PURE__ */
|
|
1078
|
+
({ className, title, name, control, isFormField, ...props }, ref) => isFormField ? /* @__PURE__ */ jsx23(
|
|
1055
1079
|
FormField,
|
|
1056
1080
|
{
|
|
1057
1081
|
control,
|
|
1058
1082
|
name,
|
|
1059
1083
|
render: ({ field }) => /* @__PURE__ */ jsxs11(FormItem, { children: [
|
|
1060
|
-
/* @__PURE__ */
|
|
1061
|
-
/* @__PURE__ */
|
|
1084
|
+
/* @__PURE__ */ jsx23(FormLabel, { children: title }),
|
|
1085
|
+
/* @__PURE__ */ jsx23(FormControl, { children: /* @__PURE__ */ jsx23(
|
|
1062
1086
|
Checkbox,
|
|
1063
1087
|
{
|
|
1064
1088
|
className,
|
|
@@ -1066,10 +1090,10 @@ var Checkbox2 = React13.forwardRef(
|
|
|
1066
1090
|
onCheckedChange: field.onChange
|
|
1067
1091
|
}
|
|
1068
1092
|
) }),
|
|
1069
|
-
/* @__PURE__ */
|
|
1093
|
+
/* @__PURE__ */ jsx23(FormMessage, {})
|
|
1070
1094
|
] })
|
|
1071
1095
|
}
|
|
1072
|
-
) : /* @__PURE__ */
|
|
1096
|
+
) : /* @__PURE__ */ jsx23(Checkbox, { ref, className, ...props })
|
|
1073
1097
|
);
|
|
1074
1098
|
Checkbox2.displayName = "Checkbox";
|
|
1075
1099
|
|
|
@@ -1081,8 +1105,8 @@ import { useEffect as useEffect2, useState as useState2 } from "react";
|
|
|
1081
1105
|
import * as React14 from "react";
|
|
1082
1106
|
import { MagnifyingGlassIcon } from "@radix-ui/react-icons";
|
|
1083
1107
|
import { Command as CommandPrimitive } from "cmdk";
|
|
1084
|
-
import { jsx as
|
|
1085
|
-
var Command = React14.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
|
|
1108
|
+
import { jsx as jsx24, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
1109
|
+
var Command = React14.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx24(
|
|
1086
1110
|
CommandPrimitive,
|
|
1087
1111
|
{
|
|
1088
1112
|
ref,
|
|
@@ -1095,8 +1119,8 @@ var Command = React14.forwardRef(({ className, ...props }, ref) => /* @__PURE__
|
|
|
1095
1119
|
));
|
|
1096
1120
|
Command.displayName = CommandPrimitive.displayName;
|
|
1097
1121
|
var CommandInput = React14.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxs12("div", { className: "flex items-center border-b px-3", "cmdk-input-wrapper": "", children: [
|
|
1098
|
-
/* @__PURE__ */
|
|
1099
|
-
/* @__PURE__ */
|
|
1122
|
+
/* @__PURE__ */ jsx24(MagnifyingGlassIcon, { className: "mr-2 h-4 w-4 shrink-0 opacity-50" }),
|
|
1123
|
+
/* @__PURE__ */ jsx24(
|
|
1100
1124
|
CommandPrimitive.Input,
|
|
1101
1125
|
{
|
|
1102
1126
|
ref,
|
|
@@ -1109,7 +1133,7 @@ var CommandInput = React14.forwardRef(({ className, ...props }, ref) => /* @__PU
|
|
|
1109
1133
|
)
|
|
1110
1134
|
] }));
|
|
1111
1135
|
CommandInput.displayName = CommandPrimitive.Input.displayName;
|
|
1112
|
-
var CommandList = React14.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
|
|
1136
|
+
var CommandList = React14.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx24(
|
|
1113
1137
|
CommandPrimitive.List,
|
|
1114
1138
|
{
|
|
1115
1139
|
ref,
|
|
@@ -1118,7 +1142,7 @@ var CommandList = React14.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
|
1118
1142
|
}
|
|
1119
1143
|
));
|
|
1120
1144
|
CommandList.displayName = CommandPrimitive.List.displayName;
|
|
1121
|
-
var CommandEmpty = React14.forwardRef((props, ref) => /* @__PURE__ */
|
|
1145
|
+
var CommandEmpty = React14.forwardRef((props, ref) => /* @__PURE__ */ jsx24(
|
|
1122
1146
|
CommandPrimitive.Empty,
|
|
1123
1147
|
{
|
|
1124
1148
|
ref,
|
|
@@ -1127,7 +1151,7 @@ var CommandEmpty = React14.forwardRef((props, ref) => /* @__PURE__ */ jsx23(
|
|
|
1127
1151
|
}
|
|
1128
1152
|
));
|
|
1129
1153
|
CommandEmpty.displayName = CommandPrimitive.Empty.displayName;
|
|
1130
|
-
var CommandGroup = React14.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
|
|
1154
|
+
var CommandGroup = React14.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx24(
|
|
1131
1155
|
CommandPrimitive.Group,
|
|
1132
1156
|
{
|
|
1133
1157
|
ref,
|
|
@@ -1139,7 +1163,7 @@ var CommandGroup = React14.forwardRef(({ className, ...props }, ref) => /* @__PU
|
|
|
1139
1163
|
}
|
|
1140
1164
|
));
|
|
1141
1165
|
CommandGroup.displayName = CommandPrimitive.Group.displayName;
|
|
1142
|
-
var CommandSeparator = React14.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
|
|
1166
|
+
var CommandSeparator = React14.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx24(
|
|
1143
1167
|
CommandPrimitive.Separator,
|
|
1144
1168
|
{
|
|
1145
1169
|
ref,
|
|
@@ -1148,7 +1172,7 @@ var CommandSeparator = React14.forwardRef(({ className, ...props }, ref) => /* @
|
|
|
1148
1172
|
}
|
|
1149
1173
|
));
|
|
1150
1174
|
CommandSeparator.displayName = CommandPrimitive.Separator.displayName;
|
|
1151
|
-
var CommandItem = React14.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
|
|
1175
|
+
var CommandItem = React14.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx24(
|
|
1152
1176
|
CommandPrimitive.Item,
|
|
1153
1177
|
{
|
|
1154
1178
|
ref,
|
|
@@ -1164,7 +1188,7 @@ var CommandShortcut = ({
|
|
|
1164
1188
|
className,
|
|
1165
1189
|
...props
|
|
1166
1190
|
}) => {
|
|
1167
|
-
return /* @__PURE__ */
|
|
1191
|
+
return /* @__PURE__ */ jsx24(
|
|
1168
1192
|
"span",
|
|
1169
1193
|
{
|
|
1170
1194
|
className: cn(
|
|
@@ -1180,10 +1204,10 @@ CommandShortcut.displayName = "CommandShortcut";
|
|
|
1180
1204
|
// components/ui/popover.tsx
|
|
1181
1205
|
import * as React15 from "react";
|
|
1182
1206
|
import * as PopoverPrimitive from "@radix-ui/react-popover";
|
|
1183
|
-
import { jsx as
|
|
1207
|
+
import { jsx as jsx25 } from "react/jsx-runtime";
|
|
1184
1208
|
var Popover = PopoverPrimitive.Root;
|
|
1185
1209
|
var PopoverTrigger = PopoverPrimitive.Trigger;
|
|
1186
|
-
var PopoverContent = React15.forwardRef(({ className, align = "center", sideOffset = 4, ...props }, ref) => /* @__PURE__ */
|
|
1210
|
+
var PopoverContent = React15.forwardRef(({ className, align = "center", sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsx25(PopoverPrimitive.Portal, { children: /* @__PURE__ */ jsx25(
|
|
1187
1211
|
PopoverPrimitive.Content,
|
|
1188
1212
|
{
|
|
1189
1213
|
ref,
|
|
@@ -1199,7 +1223,7 @@ var PopoverContent = React15.forwardRef(({ className, align = "center", sideOffs
|
|
|
1199
1223
|
PopoverContent.displayName = PopoverPrimitive.Content.displayName;
|
|
1200
1224
|
|
|
1201
1225
|
// components/form-controls/combobox.tsx
|
|
1202
|
-
import { jsx as
|
|
1226
|
+
import { jsx as jsx26, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
1203
1227
|
function Combobox({
|
|
1204
1228
|
label,
|
|
1205
1229
|
options,
|
|
@@ -1216,7 +1240,7 @@ function Combobox({
|
|
|
1216
1240
|
}, [defaultValue]);
|
|
1217
1241
|
if (!isFormField) {
|
|
1218
1242
|
return /* @__PURE__ */ jsxs13(Popover, { open, onOpenChange: setOpen, children: [
|
|
1219
|
-
/* @__PURE__ */
|
|
1243
|
+
/* @__PURE__ */ jsx26(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxs13(
|
|
1220
1244
|
Button,
|
|
1221
1245
|
{
|
|
1222
1246
|
variant: "outline",
|
|
@@ -1225,14 +1249,14 @@ function Combobox({
|
|
|
1225
1249
|
className: "w-full justify-between capitalize",
|
|
1226
1250
|
children: [
|
|
1227
1251
|
value ? options.find((option) => option.value === value)?.label || label : label,
|
|
1228
|
-
/* @__PURE__ */
|
|
1252
|
+
/* @__PURE__ */ jsx26(ChevronsUpDown, { className: "ml-2 h-4 w-4 shrink-0 opacity-50" })
|
|
1229
1253
|
]
|
|
1230
1254
|
}
|
|
1231
1255
|
) }),
|
|
1232
|
-
/* @__PURE__ */
|
|
1233
|
-
/* @__PURE__ */
|
|
1234
|
-
/* @__PURE__ */
|
|
1235
|
-
/* @__PURE__ */
|
|
1256
|
+
/* @__PURE__ */ jsx26(PopoverContent, { className: "w-full p-0", children: /* @__PURE__ */ jsxs13(Command, { children: [
|
|
1257
|
+
/* @__PURE__ */ jsx26(CommandInput, { placeholder: "Search..." }),
|
|
1258
|
+
/* @__PURE__ */ jsx26(CommandEmpty, { children: "No item found." }),
|
|
1259
|
+
/* @__PURE__ */ jsx26(CommandList, { children: /* @__PURE__ */ jsx26(CommandGroup, { children: options.map((option) => /* @__PURE__ */ jsxs13(
|
|
1236
1260
|
CommandItem,
|
|
1237
1261
|
{
|
|
1238
1262
|
value: option.value,
|
|
@@ -1242,7 +1266,7 @@ function Combobox({
|
|
|
1242
1266
|
setOpen(false);
|
|
1243
1267
|
},
|
|
1244
1268
|
children: [
|
|
1245
|
-
/* @__PURE__ */
|
|
1269
|
+
/* @__PURE__ */ jsx26(
|
|
1246
1270
|
Check,
|
|
1247
1271
|
{
|
|
1248
1272
|
className: cn(
|
|
@@ -1259,15 +1283,15 @@ function Combobox({
|
|
|
1259
1283
|
] }) })
|
|
1260
1284
|
] });
|
|
1261
1285
|
}
|
|
1262
|
-
return /* @__PURE__ */
|
|
1286
|
+
return /* @__PURE__ */ jsx26(
|
|
1263
1287
|
FormField,
|
|
1264
1288
|
{
|
|
1265
1289
|
control,
|
|
1266
1290
|
name,
|
|
1267
1291
|
render: ({ field }) => /* @__PURE__ */ jsxs13(FormItem, { children: [
|
|
1268
|
-
/* @__PURE__ */
|
|
1269
|
-
/* @__PURE__ */
|
|
1270
|
-
/* @__PURE__ */
|
|
1292
|
+
/* @__PURE__ */ jsx26(FormLabel, { children: label }),
|
|
1293
|
+
/* @__PURE__ */ jsx26(FormControl, { children: /* @__PURE__ */ jsxs13(Popover, { open, onOpenChange: setOpen, children: [
|
|
1294
|
+
/* @__PURE__ */ jsx26(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxs13(
|
|
1271
1295
|
Button,
|
|
1272
1296
|
{
|
|
1273
1297
|
variant: "outline",
|
|
@@ -1276,14 +1300,14 @@ function Combobox({
|
|
|
1276
1300
|
className: "w-full justify-between capitalize",
|
|
1277
1301
|
children: [
|
|
1278
1302
|
field.value ? options.find((option) => option.value === field.value)?.label || label : label,
|
|
1279
|
-
/* @__PURE__ */
|
|
1303
|
+
/* @__PURE__ */ jsx26(ChevronsUpDown, { className: "ml-2 h-4 w-4 shrink-0 opacity-50" })
|
|
1280
1304
|
]
|
|
1281
1305
|
}
|
|
1282
1306
|
) }),
|
|
1283
|
-
/* @__PURE__ */
|
|
1284
|
-
/* @__PURE__ */
|
|
1285
|
-
/* @__PURE__ */
|
|
1286
|
-
/* @__PURE__ */
|
|
1307
|
+
/* @__PURE__ */ jsx26(PopoverContent, { className: "w-full p-0", children: /* @__PURE__ */ jsxs13(Command, { children: [
|
|
1308
|
+
/* @__PURE__ */ jsx26(CommandInput, { placeholder: "Search..." }),
|
|
1309
|
+
/* @__PURE__ */ jsx26(CommandEmpty, { children: "No item found." }),
|
|
1310
|
+
/* @__PURE__ */ jsx26(CommandList, { children: /* @__PURE__ */ jsx26(CommandGroup, { children: options.map((option) => /* @__PURE__ */ jsxs13(
|
|
1287
1311
|
CommandItem,
|
|
1288
1312
|
{
|
|
1289
1313
|
value: option.value,
|
|
@@ -1294,7 +1318,7 @@ function Combobox({
|
|
|
1294
1318
|
setOpen(false);
|
|
1295
1319
|
},
|
|
1296
1320
|
children: [
|
|
1297
|
-
/* @__PURE__ */
|
|
1321
|
+
/* @__PURE__ */ jsx26(
|
|
1298
1322
|
Check,
|
|
1299
1323
|
{
|
|
1300
1324
|
className: cn(
|
|
@@ -1310,7 +1334,7 @@ function Combobox({
|
|
|
1310
1334
|
)) }) })
|
|
1311
1335
|
] }) })
|
|
1312
1336
|
] }) }),
|
|
1313
|
-
/* @__PURE__ */
|
|
1337
|
+
/* @__PURE__ */ jsx26(FormMessage, {})
|
|
1314
1338
|
] })
|
|
1315
1339
|
}
|
|
1316
1340
|
);
|
|
@@ -1318,14 +1342,14 @@ function Combobox({
|
|
|
1318
1342
|
|
|
1319
1343
|
// components/form-controls/command.tsx
|
|
1320
1344
|
import * as React16 from "react";
|
|
1321
|
-
import { jsx as
|
|
1345
|
+
import { jsx as jsx27, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
1322
1346
|
var Command2 = React16.forwardRef(({ className, placeholder, commandGroup, ...props }, ref) => /* @__PURE__ */ jsxs14(Command, { ...props, ref, className, children: [
|
|
1323
|
-
/* @__PURE__ */
|
|
1347
|
+
/* @__PURE__ */ jsx27(CommandInput, { placeholder }),
|
|
1324
1348
|
/* @__PURE__ */ jsxs14(CommandList, { children: [
|
|
1325
|
-
/* @__PURE__ */
|
|
1349
|
+
/* @__PURE__ */ jsx27(CommandEmpty, { children: "No results found." }),
|
|
1326
1350
|
commandGroup.map((group, index) => /* @__PURE__ */ jsxs14(React16.Fragment, { children: [
|
|
1327
|
-
/* @__PURE__ */
|
|
1328
|
-
commandGroup.length - 1 !== index && /* @__PURE__ */
|
|
1351
|
+
/* @__PURE__ */ jsx27(CommandGroup, { heading: group.header, children: group.items.map((item, itemIndex) => /* @__PURE__ */ jsx27(CommandItem, { children: item }, itemIndex)) }, index),
|
|
1352
|
+
commandGroup.length - 1 !== index && /* @__PURE__ */ jsx27(CommandSeparator, {})
|
|
1329
1353
|
] }, index))
|
|
1330
1354
|
] })
|
|
1331
1355
|
] }));
|
|
@@ -1358,7 +1382,7 @@ import {
|
|
|
1358
1382
|
ChevronRightIcon as ChevronRightIcon2,
|
|
1359
1383
|
DotFilledIcon
|
|
1360
1384
|
} from "@radix-ui/react-icons";
|
|
1361
|
-
import { jsx as
|
|
1385
|
+
import { jsx as jsx28, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
1362
1386
|
var DropdownMenu = DropdownMenuPrimitive.Root;
|
|
1363
1387
|
var DropdownMenuTrigger = DropdownMenuPrimitive.Trigger;
|
|
1364
1388
|
var DropdownMenuSubTrigger = React17.forwardRef(({ className, inset, children, ...props }, ref) => /* @__PURE__ */ jsxs15(
|
|
@@ -1373,12 +1397,12 @@ var DropdownMenuSubTrigger = React17.forwardRef(({ className, inset, children, .
|
|
|
1373
1397
|
...props,
|
|
1374
1398
|
children: [
|
|
1375
1399
|
children,
|
|
1376
|
-
/* @__PURE__ */
|
|
1400
|
+
/* @__PURE__ */ jsx28(ChevronRightIcon2, { className: "ml-auto h-4 w-4" })
|
|
1377
1401
|
]
|
|
1378
1402
|
}
|
|
1379
1403
|
));
|
|
1380
1404
|
DropdownMenuSubTrigger.displayName = DropdownMenuPrimitive.SubTrigger.displayName;
|
|
1381
|
-
var DropdownMenuSubContent = React17.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
|
|
1405
|
+
var DropdownMenuSubContent = React17.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx28(
|
|
1382
1406
|
DropdownMenuPrimitive.SubContent,
|
|
1383
1407
|
{
|
|
1384
1408
|
ref,
|
|
@@ -1390,7 +1414,7 @@ var DropdownMenuSubContent = React17.forwardRef(({ className, ...props }, ref) =
|
|
|
1390
1414
|
}
|
|
1391
1415
|
));
|
|
1392
1416
|
DropdownMenuSubContent.displayName = DropdownMenuPrimitive.SubContent.displayName;
|
|
1393
|
-
var DropdownMenuContent = React17.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */
|
|
1417
|
+
var DropdownMenuContent = React17.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsx28(DropdownMenuPrimitive.Portal, { children: /* @__PURE__ */ jsx28(
|
|
1394
1418
|
DropdownMenuPrimitive.Content,
|
|
1395
1419
|
{
|
|
1396
1420
|
ref,
|
|
@@ -1404,7 +1428,7 @@ var DropdownMenuContent = React17.forwardRef(({ className, sideOffset = 4, ...pr
|
|
|
1404
1428
|
}
|
|
1405
1429
|
) }));
|
|
1406
1430
|
DropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName;
|
|
1407
|
-
var DropdownMenuItem = React17.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */
|
|
1431
|
+
var DropdownMenuItem = React17.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx28(
|
|
1408
1432
|
DropdownMenuPrimitive.Item,
|
|
1409
1433
|
{
|
|
1410
1434
|
ref,
|
|
@@ -1428,7 +1452,7 @@ var DropdownMenuCheckboxItem = React17.forwardRef(({ className, children, checke
|
|
|
1428
1452
|
checked,
|
|
1429
1453
|
...props,
|
|
1430
1454
|
children: [
|
|
1431
|
-
/* @__PURE__ */
|
|
1455
|
+
/* @__PURE__ */ jsx28("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsx28(DropdownMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx28(CheckIcon3, { className: "h-4 w-4" }) }) }),
|
|
1432
1456
|
children
|
|
1433
1457
|
]
|
|
1434
1458
|
}
|
|
@@ -1444,13 +1468,13 @@ var DropdownMenuRadioItem = React17.forwardRef(({ className, children, ...props
|
|
|
1444
1468
|
),
|
|
1445
1469
|
...props,
|
|
1446
1470
|
children: [
|
|
1447
|
-
/* @__PURE__ */
|
|
1471
|
+
/* @__PURE__ */ jsx28("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsx28(DropdownMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx28(DotFilledIcon, { className: "h-4 w-4 fill-current" }) }) }),
|
|
1448
1472
|
children
|
|
1449
1473
|
]
|
|
1450
1474
|
}
|
|
1451
1475
|
));
|
|
1452
1476
|
DropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName;
|
|
1453
|
-
var DropdownMenuLabel = React17.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */
|
|
1477
|
+
var DropdownMenuLabel = React17.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx28(
|
|
1454
1478
|
DropdownMenuPrimitive.Label,
|
|
1455
1479
|
{
|
|
1456
1480
|
ref,
|
|
@@ -1463,7 +1487,7 @@ var DropdownMenuLabel = React17.forwardRef(({ className, inset, ...props }, ref)
|
|
|
1463
1487
|
}
|
|
1464
1488
|
));
|
|
1465
1489
|
DropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName;
|
|
1466
|
-
var DropdownMenuSeparator = React17.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
|
|
1490
|
+
var DropdownMenuSeparator = React17.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx28(
|
|
1467
1491
|
DropdownMenuPrimitive.Separator,
|
|
1468
1492
|
{
|
|
1469
1493
|
ref,
|
|
@@ -1476,7 +1500,7 @@ var DropdownMenuShortcut = ({
|
|
|
1476
1500
|
className,
|
|
1477
1501
|
...props
|
|
1478
1502
|
}) => {
|
|
1479
|
-
return /* @__PURE__ */
|
|
1503
|
+
return /* @__PURE__ */ jsx28(
|
|
1480
1504
|
"span",
|
|
1481
1505
|
{
|
|
1482
1506
|
className: cn("ml-auto text-xs tracking-widest opacity-60", className),
|
|
@@ -1488,8 +1512,8 @@ DropdownMenuShortcut.displayName = "DropdownMenuShortcut";
|
|
|
1488
1512
|
|
|
1489
1513
|
// components/ui/table.tsx
|
|
1490
1514
|
import * as React18 from "react";
|
|
1491
|
-
import { jsx as
|
|
1492
|
-
var Table = React18.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
|
|
1515
|
+
import { jsx as jsx29 } from "react/jsx-runtime";
|
|
1516
|
+
var Table = React18.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx29("div", { className: "relative w-full overflow-auto", children: /* @__PURE__ */ jsx29(
|
|
1493
1517
|
"table",
|
|
1494
1518
|
{
|
|
1495
1519
|
ref,
|
|
@@ -1498,9 +1522,9 @@ var Table = React18.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
|
|
|
1498
1522
|
}
|
|
1499
1523
|
) }));
|
|
1500
1524
|
Table.displayName = "Table";
|
|
1501
|
-
var TableHeader = React18.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
|
|
1525
|
+
var TableHeader = React18.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx29("thead", { ref, className: cn("[&_tr]:border-b", className), ...props }));
|
|
1502
1526
|
TableHeader.displayName = "TableHeader";
|
|
1503
|
-
var TableBody = React18.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
|
|
1527
|
+
var TableBody = React18.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx29(
|
|
1504
1528
|
"tbody",
|
|
1505
1529
|
{
|
|
1506
1530
|
ref,
|
|
@@ -1509,7 +1533,7 @@ var TableBody = React18.forwardRef(({ className, ...props }, ref) => /* @__PURE_
|
|
|
1509
1533
|
}
|
|
1510
1534
|
));
|
|
1511
1535
|
TableBody.displayName = "TableBody";
|
|
1512
|
-
var TableFooter = React18.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
|
|
1536
|
+
var TableFooter = React18.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx29(
|
|
1513
1537
|
"tfoot",
|
|
1514
1538
|
{
|
|
1515
1539
|
ref,
|
|
@@ -1521,7 +1545,7 @@ var TableFooter = React18.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
|
1521
1545
|
}
|
|
1522
1546
|
));
|
|
1523
1547
|
TableFooter.displayName = "TableFooter";
|
|
1524
|
-
var TableRow = React18.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
|
|
1548
|
+
var TableRow = React18.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx29(
|
|
1525
1549
|
"tr",
|
|
1526
1550
|
{
|
|
1527
1551
|
ref,
|
|
@@ -1533,7 +1557,7 @@ var TableRow = React18.forwardRef(({ className, ...props }, ref) => /* @__PURE__
|
|
|
1533
1557
|
}
|
|
1534
1558
|
));
|
|
1535
1559
|
TableRow.displayName = "TableRow";
|
|
1536
|
-
var TableHead = React18.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
|
|
1560
|
+
var TableHead = React18.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx29(
|
|
1537
1561
|
"th",
|
|
1538
1562
|
{
|
|
1539
1563
|
ref,
|
|
@@ -1545,7 +1569,7 @@ var TableHead = React18.forwardRef(({ className, ...props }, ref) => /* @__PURE_
|
|
|
1545
1569
|
}
|
|
1546
1570
|
));
|
|
1547
1571
|
TableHead.displayName = "TableHead";
|
|
1548
|
-
var TableCell = React18.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
|
|
1572
|
+
var TableCell = React18.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx29(
|
|
1549
1573
|
"td",
|
|
1550
1574
|
{
|
|
1551
1575
|
ref,
|
|
@@ -1557,7 +1581,7 @@ var TableCell = React18.forwardRef(({ className, ...props }, ref) => /* @__PURE_
|
|
|
1557
1581
|
}
|
|
1558
1582
|
));
|
|
1559
1583
|
TableCell.displayName = "TableCell";
|
|
1560
|
-
var TableCaption = React18.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
|
|
1584
|
+
var TableCaption = React18.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx29(
|
|
1561
1585
|
"caption",
|
|
1562
1586
|
{
|
|
1563
1587
|
ref,
|
|
@@ -1568,7 +1592,7 @@ var TableCaption = React18.forwardRef(({ className, ...props }, ref) => /* @__PU
|
|
|
1568
1592
|
TableCaption.displayName = "TableCaption";
|
|
1569
1593
|
|
|
1570
1594
|
// components/form-controls/data-table.tsx
|
|
1571
|
-
import { jsx as
|
|
1595
|
+
import { jsx as jsx30, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
1572
1596
|
function DataTable({
|
|
1573
1597
|
data,
|
|
1574
1598
|
columns,
|
|
@@ -1601,9 +1625,9 @@ function DataTable({
|
|
|
1601
1625
|
}
|
|
1602
1626
|
});
|
|
1603
1627
|
return /* @__PURE__ */ jsxs16("div", { className: "w-full mt-4 relative", children: [
|
|
1604
|
-
isLoading && /* @__PURE__ */
|
|
1628
|
+
isLoading && /* @__PURE__ */ jsx30(Loader2, { className: "h-4 w-4 animate-spin absolute top-2 right-32" }),
|
|
1605
1629
|
filterField && /* @__PURE__ */ jsxs16("div", { className: "flex items-center justify-between", children: [
|
|
1606
|
-
/* @__PURE__ */
|
|
1630
|
+
/* @__PURE__ */ jsx30(
|
|
1607
1631
|
Input,
|
|
1608
1632
|
{
|
|
1609
1633
|
placeholder: `Filter by ${filterField}...`,
|
|
@@ -1613,14 +1637,14 @@ function DataTable({
|
|
|
1613
1637
|
}
|
|
1614
1638
|
),
|
|
1615
1639
|
/* @__PURE__ */ jsxs16("div", { className: "flex items-center space-x-4", children: [
|
|
1616
|
-
refresh && /* @__PURE__ */
|
|
1640
|
+
refresh && /* @__PURE__ */ jsx30(Button, { variant: "outline", onClick: refresh, children: /* @__PURE__ */ jsx30(Icon2, { name: "RotateCcw", strokeWidth: 2, size: 20 }) }),
|
|
1617
1641
|
/* @__PURE__ */ jsxs16(DropdownMenu, { children: [
|
|
1618
|
-
/* @__PURE__ */
|
|
1642
|
+
/* @__PURE__ */ jsx30(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsxs16(Button, { variant: "outline", children: [
|
|
1619
1643
|
"Columns ",
|
|
1620
|
-
/* @__PURE__ */
|
|
1644
|
+
/* @__PURE__ */ jsx30(ChevronDownIcon2, { className: "ml-2 h-4 w-4" })
|
|
1621
1645
|
] }) }),
|
|
1622
|
-
/* @__PURE__ */
|
|
1623
|
-
return /* @__PURE__ */
|
|
1646
|
+
/* @__PURE__ */ jsx30(DropdownMenuContent, { align: "end", children: table.getAllColumns().filter((column) => column.getCanHide()).map((column) => {
|
|
1647
|
+
return /* @__PURE__ */ jsx30(
|
|
1624
1648
|
DropdownMenuCheckboxItem,
|
|
1625
1649
|
{
|
|
1626
1650
|
className: "capitalize",
|
|
@@ -1634,24 +1658,24 @@ function DataTable({
|
|
|
1634
1658
|
] })
|
|
1635
1659
|
] })
|
|
1636
1660
|
] }),
|
|
1637
|
-
/* @__PURE__ */
|
|
1638
|
-
/* @__PURE__ */
|
|
1639
|
-
return /* @__PURE__ */
|
|
1661
|
+
/* @__PURE__ */ jsx30("div", { className: "rounded-md border mt-4", children: /* @__PURE__ */ jsxs16(Table, { children: [
|
|
1662
|
+
/* @__PURE__ */ jsx30(TableHeader, { children: table.getHeaderGroups().map((headerGroup) => /* @__PURE__ */ jsx30(TableRow, { children: headerGroup.headers.map((header) => {
|
|
1663
|
+
return /* @__PURE__ */ jsx30(TableHead, { children: header.isPlaceholder ? null : flexRender(
|
|
1640
1664
|
header.column.columnDef.header,
|
|
1641
1665
|
header.getContext()
|
|
1642
1666
|
) }, header.id);
|
|
1643
1667
|
}) }, headerGroup.id)) }),
|
|
1644
|
-
/* @__PURE__ */
|
|
1668
|
+
/* @__PURE__ */ jsx30(TableBody, { children: table.getRowModel().rows?.length > 0 ? table.getRowModel().rows.map((row) => /* @__PURE__ */ jsx30(
|
|
1645
1669
|
TableRow,
|
|
1646
1670
|
{
|
|
1647
1671
|
"data-state": row.getIsSelected() && "selected",
|
|
1648
|
-
children: row.getVisibleCells().map((cell) => /* @__PURE__ */
|
|
1672
|
+
children: row.getVisibleCells().map((cell) => /* @__PURE__ */ jsx30(TableCell, { children: flexRender(
|
|
1649
1673
|
cell.column.columnDef.cell,
|
|
1650
1674
|
cell.getContext()
|
|
1651
1675
|
) }, cell.id))
|
|
1652
1676
|
},
|
|
1653
1677
|
row.id
|
|
1654
|
-
)) : /* @__PURE__ */
|
|
1678
|
+
)) : /* @__PURE__ */ jsx30(TableRow, { children: /* @__PURE__ */ jsx30(
|
|
1655
1679
|
TableCell,
|
|
1656
1680
|
{
|
|
1657
1681
|
colSpan: columns.length,
|
|
@@ -1669,7 +1693,7 @@ function DataTable({
|
|
|
1669
1693
|
] }),
|
|
1670
1694
|
/* @__PURE__ */ jsxs16("div", { className: "flex items-center space-x-6 lg:space-x-8", children: [
|
|
1671
1695
|
/* @__PURE__ */ jsxs16("div", { className: "flex items-center space-x-2", children: [
|
|
1672
|
-
/* @__PURE__ */
|
|
1696
|
+
/* @__PURE__ */ jsx30("p", { className: "text-sm font-medium", children: "Rows per page" }),
|
|
1673
1697
|
/* @__PURE__ */ jsxs16(
|
|
1674
1698
|
Select,
|
|
1675
1699
|
{
|
|
@@ -1678,13 +1702,13 @@ function DataTable({
|
|
|
1678
1702
|
table.setPageSize(Number(value));
|
|
1679
1703
|
},
|
|
1680
1704
|
children: [
|
|
1681
|
-
/* @__PURE__ */
|
|
1705
|
+
/* @__PURE__ */ jsx30(SelectTrigger, { className: "h-8 w-[70px]", children: /* @__PURE__ */ jsx30(
|
|
1682
1706
|
SelectValue,
|
|
1683
1707
|
{
|
|
1684
1708
|
placeholder: table.getState().pagination.pageSize
|
|
1685
1709
|
}
|
|
1686
1710
|
) }),
|
|
1687
|
-
/* @__PURE__ */
|
|
1711
|
+
/* @__PURE__ */ jsx30(SelectContent, { side: "top", children: [10, 20, 30, 40, 50].map((pageSize) => /* @__PURE__ */ jsx30(SelectItem, { value: `${pageSize}`, children: pageSize }, pageSize)) })
|
|
1688
1712
|
]
|
|
1689
1713
|
}
|
|
1690
1714
|
)
|
|
@@ -1705,8 +1729,8 @@ function DataTable({
|
|
|
1705
1729
|
onClick: () => table.setPageIndex(0),
|
|
1706
1730
|
disabled: !table.getCanPreviousPage(),
|
|
1707
1731
|
children: [
|
|
1708
|
-
/* @__PURE__ */
|
|
1709
|
-
/* @__PURE__ */
|
|
1732
|
+
/* @__PURE__ */ jsx30("span", { className: "sr-only", children: "Go to first page" }),
|
|
1733
|
+
/* @__PURE__ */ jsx30(DoubleArrowLeftIcon, { className: "h-4 w-4" })
|
|
1710
1734
|
]
|
|
1711
1735
|
}
|
|
1712
1736
|
),
|
|
@@ -1718,8 +1742,8 @@ function DataTable({
|
|
|
1718
1742
|
onClick: () => table.previousPage(),
|
|
1719
1743
|
disabled: !table.getCanPreviousPage(),
|
|
1720
1744
|
children: [
|
|
1721
|
-
/* @__PURE__ */
|
|
1722
|
-
/* @__PURE__ */
|
|
1745
|
+
/* @__PURE__ */ jsx30("span", { className: "sr-only", children: "Go to previous page" }),
|
|
1746
|
+
/* @__PURE__ */ jsx30(ChevronLeftIcon, { className: "h-4 w-4" })
|
|
1723
1747
|
]
|
|
1724
1748
|
}
|
|
1725
1749
|
),
|
|
@@ -1731,8 +1755,8 @@ function DataTable({
|
|
|
1731
1755
|
onClick: () => table.nextPage(),
|
|
1732
1756
|
disabled: !table.getCanNextPage(),
|
|
1733
1757
|
children: [
|
|
1734
|
-
/* @__PURE__ */
|
|
1735
|
-
/* @__PURE__ */
|
|
1758
|
+
/* @__PURE__ */ jsx30("span", { className: "sr-only", children: "Go to next page" }),
|
|
1759
|
+
/* @__PURE__ */ jsx30(ChevronRightIcon3, { className: "h-4 w-4" })
|
|
1736
1760
|
]
|
|
1737
1761
|
}
|
|
1738
1762
|
),
|
|
@@ -1744,8 +1768,8 @@ function DataTable({
|
|
|
1744
1768
|
onClick: () => table.setPageIndex(table.getPageCount() - 1),
|
|
1745
1769
|
disabled: !table.getCanNextPage(),
|
|
1746
1770
|
children: [
|
|
1747
|
-
/* @__PURE__ */
|
|
1748
|
-
/* @__PURE__ */
|
|
1771
|
+
/* @__PURE__ */ jsx30("span", { className: "sr-only", children: "Go to last page" }),
|
|
1772
|
+
/* @__PURE__ */ jsx30(DoubleArrowRightIcon, { className: "h-4 w-4" })
|
|
1749
1773
|
]
|
|
1750
1774
|
}
|
|
1751
1775
|
)
|
|
@@ -3329,14 +3353,14 @@ function cleanEscapedString(input) {
|
|
|
3329
3353
|
|
|
3330
3354
|
// components/ui/calendar.tsx
|
|
3331
3355
|
import { DayPicker } from "react-day-picker";
|
|
3332
|
-
import { jsx as
|
|
3356
|
+
import { jsx as jsx31 } from "react/jsx-runtime";
|
|
3333
3357
|
function Calendar({
|
|
3334
3358
|
className,
|
|
3335
3359
|
classNames,
|
|
3336
3360
|
showOutsideDays = true,
|
|
3337
3361
|
...props
|
|
3338
3362
|
}) {
|
|
3339
|
-
return /* @__PURE__ */
|
|
3363
|
+
return /* @__PURE__ */ jsx31(
|
|
3340
3364
|
DayPicker,
|
|
3341
3365
|
{
|
|
3342
3366
|
showOutsideDays,
|
|
@@ -3386,10 +3410,10 @@ function Calendar({
|
|
|
3386
3410
|
Calendar.displayName = "Calendar";
|
|
3387
3411
|
|
|
3388
3412
|
// components/form-controls/date-filter.tsx
|
|
3389
|
-
import { Fragment as Fragment4, jsx as
|
|
3413
|
+
import { Fragment as Fragment4, jsx as jsx32, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
3390
3414
|
function DateFilter({ className, date, setDate }) {
|
|
3391
|
-
return /* @__PURE__ */
|
|
3392
|
-
/* @__PURE__ */
|
|
3415
|
+
return /* @__PURE__ */ jsx32("div", { className: cn("grid gap-2", className), children: /* @__PURE__ */ jsxs17(Popover, { children: [
|
|
3416
|
+
/* @__PURE__ */ jsx32(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxs17(
|
|
3393
3417
|
Button,
|
|
3394
3418
|
{
|
|
3395
3419
|
id: "date",
|
|
@@ -3399,17 +3423,17 @@ function DateFilter({ className, date, setDate }) {
|
|
|
3399
3423
|
!date && "text-muted-foreground"
|
|
3400
3424
|
),
|
|
3401
3425
|
children: [
|
|
3402
|
-
/* @__PURE__ */
|
|
3426
|
+
/* @__PURE__ */ jsx32(CalendarIcon, { className: "mr-2 h-4 w-4" }),
|
|
3403
3427
|
date?.from ? date.to ? /* @__PURE__ */ jsxs17(Fragment4, { children: [
|
|
3404
3428
|
format(date.from, "LLL dd, y"),
|
|
3405
3429
|
" -",
|
|
3406
3430
|
" ",
|
|
3407
3431
|
format(date.to, "LLL dd, y")
|
|
3408
|
-
] }) : format(date.from, "LLL dd, y") : /* @__PURE__ */
|
|
3432
|
+
] }) : format(date.from, "LLL dd, y") : /* @__PURE__ */ jsx32("span", { children: "Pick a date" })
|
|
3409
3433
|
]
|
|
3410
3434
|
}
|
|
3411
3435
|
) }),
|
|
3412
|
-
/* @__PURE__ */
|
|
3436
|
+
/* @__PURE__ */ jsx32(PopoverContent, { className: "w-auto p-0", align: "start", children: /* @__PURE__ */ jsx32(
|
|
3413
3437
|
Calendar,
|
|
3414
3438
|
{
|
|
3415
3439
|
initialFocus: true,
|
|
@@ -3424,8 +3448,8 @@ function DateFilter({ className, date, setDate }) {
|
|
|
3424
3448
|
}
|
|
3425
3449
|
|
|
3426
3450
|
// components/form-controls/dialog.tsx
|
|
3427
|
-
import { icons } from "lucide-react";
|
|
3428
|
-
import { jsx as
|
|
3451
|
+
import { icons as icons2 } from "lucide-react";
|
|
3452
|
+
import { jsx as jsx33, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
3429
3453
|
var Dialog2 = ({
|
|
3430
3454
|
title,
|
|
3431
3455
|
description,
|
|
@@ -3438,14 +3462,14 @@ var Dialog2 = ({
|
|
|
3438
3462
|
iconClassName,
|
|
3439
3463
|
actions
|
|
3440
3464
|
}) => {
|
|
3441
|
-
const IconComponent = icon ?
|
|
3465
|
+
const IconComponent = icon ? icons2[icon] : null;
|
|
3442
3466
|
return /* @__PURE__ */ jsxs18(Dialog, { open, onOpenChange, children: [
|
|
3443
|
-
/* @__PURE__ */
|
|
3467
|
+
/* @__PURE__ */ jsx33(DialogTrigger, { children: trigger }),
|
|
3444
3468
|
/* @__PURE__ */ jsxs18(DialogContent, { className, children: [
|
|
3445
3469
|
/* @__PURE__ */ jsxs18(DialogHeader, { children: [
|
|
3446
3470
|
/* @__PURE__ */ jsxs18(DialogTitle, { className: "capitalize flex items-center gap-2 justify-between pr-8", children: [
|
|
3447
3471
|
/* @__PURE__ */ jsxs18("div", { className: "flex items-center gap-2", children: [
|
|
3448
|
-
IconComponent && /* @__PURE__ */
|
|
3472
|
+
IconComponent && /* @__PURE__ */ jsx33(
|
|
3449
3473
|
IconComponent,
|
|
3450
3474
|
{
|
|
3451
3475
|
size: 20,
|
|
@@ -3455,7 +3479,7 @@ var Dialog2 = ({
|
|
|
3455
3479
|
),
|
|
3456
3480
|
title
|
|
3457
3481
|
] }),
|
|
3458
|
-
actions && /* @__PURE__ */
|
|
3482
|
+
actions && /* @__PURE__ */ jsx33("div", { className: "flex items-center gap-2", children: actions.map((action) => /* @__PURE__ */ jsxs18(
|
|
3459
3483
|
Button2,
|
|
3460
3484
|
{
|
|
3461
3485
|
variant: action.type,
|
|
@@ -3464,8 +3488,8 @@ var Dialog2 = ({
|
|
|
3464
3488
|
disabled: action.disabled,
|
|
3465
3489
|
children: [
|
|
3466
3490
|
action.label,
|
|
3467
|
-
action.icon && /* @__PURE__ */
|
|
3468
|
-
|
|
3491
|
+
action.icon && /* @__PURE__ */ jsx33(
|
|
3492
|
+
Icon2,
|
|
3469
3493
|
{
|
|
3470
3494
|
name: action.icon,
|
|
3471
3495
|
className: cn(action.iconClassName),
|
|
@@ -3478,7 +3502,7 @@ var Dialog2 = ({
|
|
|
3478
3502
|
action.label
|
|
3479
3503
|
)) })
|
|
3480
3504
|
] }),
|
|
3481
|
-
/* @__PURE__ */
|
|
3505
|
+
/* @__PURE__ */ jsx33(DialogDescription, { children: description })
|
|
3482
3506
|
] }),
|
|
3483
3507
|
children
|
|
3484
3508
|
] })
|
|
@@ -3488,11 +3512,11 @@ var Dialog2 = ({
|
|
|
3488
3512
|
// components/ui/drawer.tsx
|
|
3489
3513
|
import * as React20 from "react";
|
|
3490
3514
|
import { Drawer as DrawerPrimitive } from "vaul";
|
|
3491
|
-
import { jsx as
|
|
3515
|
+
import { jsx as jsx34, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
3492
3516
|
var Drawer = ({
|
|
3493
3517
|
shouldScaleBackground = true,
|
|
3494
3518
|
...props
|
|
3495
|
-
}) => /* @__PURE__ */
|
|
3519
|
+
}) => /* @__PURE__ */ jsx34(
|
|
3496
3520
|
DrawerPrimitive.Root,
|
|
3497
3521
|
{
|
|
3498
3522
|
shouldScaleBackground,
|
|
@@ -3503,7 +3527,7 @@ Drawer.displayName = "Drawer";
|
|
|
3503
3527
|
var DrawerTrigger = DrawerPrimitive.Trigger;
|
|
3504
3528
|
var DrawerPortal = DrawerPrimitive.Portal;
|
|
3505
3529
|
var DrawerClose = DrawerPrimitive.Close;
|
|
3506
|
-
var DrawerOverlay = React20.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
|
|
3530
|
+
var DrawerOverlay = React20.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx34(
|
|
3507
3531
|
DrawerPrimitive.Overlay,
|
|
3508
3532
|
{
|
|
3509
3533
|
ref,
|
|
@@ -3513,7 +3537,7 @@ var DrawerOverlay = React20.forwardRef(({ className, ...props }, ref) => /* @__P
|
|
|
3513
3537
|
));
|
|
3514
3538
|
DrawerOverlay.displayName = DrawerPrimitive.Overlay.displayName;
|
|
3515
3539
|
var DrawerContent = React20.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs19(DrawerPortal, { children: [
|
|
3516
|
-
/* @__PURE__ */
|
|
3540
|
+
/* @__PURE__ */ jsx34(DrawerOverlay, {}),
|
|
3517
3541
|
/* @__PURE__ */ jsxs19(
|
|
3518
3542
|
DrawerPrimitive.Content,
|
|
3519
3543
|
{
|
|
@@ -3524,7 +3548,7 @@ var DrawerContent = React20.forwardRef(({ className, children, ...props }, ref)
|
|
|
3524
3548
|
),
|
|
3525
3549
|
...props,
|
|
3526
3550
|
children: [
|
|
3527
|
-
/* @__PURE__ */
|
|
3551
|
+
/* @__PURE__ */ jsx34("div", { className: "mx-auto mt-4 h-2 w-[100px] rounded-full bg-muted" }),
|
|
3528
3552
|
children
|
|
3529
3553
|
]
|
|
3530
3554
|
}
|
|
@@ -3534,7 +3558,7 @@ DrawerContent.displayName = "DrawerContent";
|
|
|
3534
3558
|
var DrawerHeader = ({
|
|
3535
3559
|
className,
|
|
3536
3560
|
...props
|
|
3537
|
-
}) => /* @__PURE__ */
|
|
3561
|
+
}) => /* @__PURE__ */ jsx34(
|
|
3538
3562
|
"div",
|
|
3539
3563
|
{
|
|
3540
3564
|
className: cn("grid gap-1.5 p-4 text-center sm:text-left", className),
|
|
@@ -3545,7 +3569,7 @@ DrawerHeader.displayName = "DrawerHeader";
|
|
|
3545
3569
|
var DrawerFooter = ({
|
|
3546
3570
|
className,
|
|
3547
3571
|
...props
|
|
3548
|
-
}) => /* @__PURE__ */
|
|
3572
|
+
}) => /* @__PURE__ */ jsx34(
|
|
3549
3573
|
"div",
|
|
3550
3574
|
{
|
|
3551
3575
|
className: cn("mt-auto flex flex-col gap-2 p-4", className),
|
|
@@ -3553,7 +3577,7 @@ var DrawerFooter = ({
|
|
|
3553
3577
|
}
|
|
3554
3578
|
);
|
|
3555
3579
|
DrawerFooter.displayName = "DrawerFooter";
|
|
3556
|
-
var DrawerTitle = React20.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
|
|
3580
|
+
var DrawerTitle = React20.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx34(
|
|
3557
3581
|
DrawerPrimitive.Title,
|
|
3558
3582
|
{
|
|
3559
3583
|
ref,
|
|
@@ -3565,7 +3589,7 @@ var DrawerTitle = React20.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
|
3565
3589
|
}
|
|
3566
3590
|
));
|
|
3567
3591
|
DrawerTitle.displayName = DrawerPrimitive.Title.displayName;
|
|
3568
|
-
var DrawerDescription = React20.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
|
|
3592
|
+
var DrawerDescription = React20.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx34(
|
|
3569
3593
|
DrawerPrimitive.Description,
|
|
3570
3594
|
{
|
|
3571
3595
|
ref,
|
|
@@ -3578,7 +3602,7 @@ DrawerDescription.displayName = DrawerPrimitive.Description.displayName;
|
|
|
3578
3602
|
// components/ui/scroll-area.tsx
|
|
3579
3603
|
import * as React21 from "react";
|
|
3580
3604
|
import * as ScrollAreaPrimitive from "@radix-ui/react-scroll-area";
|
|
3581
|
-
import { jsx as
|
|
3605
|
+
import { jsx as jsx35, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
3582
3606
|
var ScrollArea = React21.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs20(
|
|
3583
3607
|
ScrollAreaPrimitive.Root,
|
|
3584
3608
|
{
|
|
@@ -3586,14 +3610,14 @@ var ScrollArea = React21.forwardRef(({ className, children, ...props }, ref) =>
|
|
|
3586
3610
|
className: cn("relative overflow-hidden", className),
|
|
3587
3611
|
...props,
|
|
3588
3612
|
children: [
|
|
3589
|
-
/* @__PURE__ */
|
|
3590
|
-
/* @__PURE__ */
|
|
3591
|
-
/* @__PURE__ */
|
|
3613
|
+
/* @__PURE__ */ jsx35(ScrollAreaPrimitive.Viewport, { className: "h-full w-full rounded-[inherit]", children }),
|
|
3614
|
+
/* @__PURE__ */ jsx35(ScrollBar, {}),
|
|
3615
|
+
/* @__PURE__ */ jsx35(ScrollAreaPrimitive.Corner, {})
|
|
3592
3616
|
]
|
|
3593
3617
|
}
|
|
3594
3618
|
));
|
|
3595
3619
|
ScrollArea.displayName = ScrollAreaPrimitive.Root.displayName;
|
|
3596
|
-
var ScrollBar = React21.forwardRef(({ className, orientation = "vertical", ...props }, ref) => /* @__PURE__ */
|
|
3620
|
+
var ScrollBar = React21.forwardRef(({ className, orientation = "vertical", ...props }, ref) => /* @__PURE__ */ jsx35(
|
|
3597
3621
|
ScrollAreaPrimitive.ScrollAreaScrollbar,
|
|
3598
3622
|
{
|
|
3599
3623
|
ref,
|
|
@@ -3605,13 +3629,13 @@ var ScrollBar = React21.forwardRef(({ className, orientation = "vertical", ...pr
|
|
|
3605
3629
|
className
|
|
3606
3630
|
),
|
|
3607
3631
|
...props,
|
|
3608
|
-
children: /* @__PURE__ */
|
|
3632
|
+
children: /* @__PURE__ */ jsx35(ScrollAreaPrimitive.ScrollAreaThumb, { className: "relative flex-1 rounded-full bg-border" })
|
|
3609
3633
|
}
|
|
3610
3634
|
));
|
|
3611
3635
|
ScrollBar.displayName = ScrollAreaPrimitive.ScrollAreaScrollbar.displayName;
|
|
3612
3636
|
|
|
3613
3637
|
// components/form-controls/drawer.tsx
|
|
3614
|
-
import { jsx as
|
|
3638
|
+
import { jsx as jsx36, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
3615
3639
|
var Drawer2 = ({
|
|
3616
3640
|
title,
|
|
3617
3641
|
trigger,
|
|
@@ -3629,11 +3653,11 @@ var Drawer2 = ({
|
|
|
3629
3653
|
onOpenChange: setOpenDrawer,
|
|
3630
3654
|
...props,
|
|
3631
3655
|
children: [
|
|
3632
|
-
trigger && /* @__PURE__ */
|
|
3633
|
-
/* @__PURE__ */
|
|
3656
|
+
trigger && /* @__PURE__ */ jsx36(DrawerTrigger, { children: trigger }),
|
|
3657
|
+
/* @__PURE__ */ jsx36(DrawerContent, { className: "h-screen top-0 right-0 left-auto mt-0 w-[500px] rounded-none", children: /* @__PURE__ */ jsx36(ScrollArea, { className: "h-screen", children: /* @__PURE__ */ jsxs21("div", { className: "mx-auto w-full p-5", children: [
|
|
3634
3658
|
/* @__PURE__ */ jsxs21(DrawerHeader, { children: [
|
|
3635
|
-
/* @__PURE__ */
|
|
3636
|
-
/* @__PURE__ */
|
|
3659
|
+
/* @__PURE__ */ jsx36(DrawerTitle, { children: title }),
|
|
3660
|
+
/* @__PURE__ */ jsx36(DrawerDescription, { children: description })
|
|
3637
3661
|
] }),
|
|
3638
3662
|
children
|
|
3639
3663
|
] }) }) })
|
|
@@ -3643,7 +3667,7 @@ var Drawer2 = ({
|
|
|
3643
3667
|
};
|
|
3644
3668
|
|
|
3645
3669
|
// components/form-controls/dropdown-menu.tsx
|
|
3646
|
-
import { jsx as
|
|
3670
|
+
import { jsx as jsx37, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
3647
3671
|
var DropdownMenu2 = ({
|
|
3648
3672
|
trigger,
|
|
3649
3673
|
items,
|
|
@@ -3651,8 +3675,8 @@ var DropdownMenu2 = ({
|
|
|
3651
3675
|
onClick
|
|
3652
3676
|
}) => {
|
|
3653
3677
|
return /* @__PURE__ */ jsxs22(DropdownMenu, { children: [
|
|
3654
|
-
/* @__PURE__ */
|
|
3655
|
-
/* @__PURE__ */
|
|
3678
|
+
/* @__PURE__ */ jsx37(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsx37("div", { className, children: trigger }) }),
|
|
3679
|
+
/* @__PURE__ */ jsx37(DropdownMenuContent, { className: "cursor-pointer", children: items.map((item, index) => /* @__PURE__ */ jsx37(
|
|
3656
3680
|
DropdownMenuItem,
|
|
3657
3681
|
{
|
|
3658
3682
|
className: "cursor-pointer!",
|
|
@@ -3666,7 +3690,7 @@ var DropdownMenu2 = ({
|
|
|
3666
3690
|
|
|
3667
3691
|
// components/form-controls/duration-input.tsx
|
|
3668
3692
|
import { useEffect as useEffect3, useState as useState4 } from "react";
|
|
3669
|
-
import { jsx as
|
|
3693
|
+
import { jsx as jsx38, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
3670
3694
|
var unitOptions = [
|
|
3671
3695
|
{ label: "Seconds", value: "s", ns: 1e9 },
|
|
3672
3696
|
{ label: "Minutes", value: "m", ns: 6e10 },
|
|
@@ -3750,7 +3774,7 @@ function DurationInput({ value, onChange }) {
|
|
|
3750
3774
|
}
|
|
3751
3775
|
};
|
|
3752
3776
|
return /* @__PURE__ */ jsxs23("div", { className: "flex items-center gap-2", children: [
|
|
3753
|
-
/* @__PURE__ */
|
|
3777
|
+
/* @__PURE__ */ jsx38(
|
|
3754
3778
|
Input,
|
|
3755
3779
|
{
|
|
3756
3780
|
type: "number",
|
|
@@ -3761,8 +3785,8 @@ function DurationInput({ value, onChange }) {
|
|
|
3761
3785
|
}
|
|
3762
3786
|
),
|
|
3763
3787
|
/* @__PURE__ */ jsxs23(Select, { value: unit, onValueChange: handleUnitChange, children: [
|
|
3764
|
-
/* @__PURE__ */
|
|
3765
|
-
/* @__PURE__ */
|
|
3788
|
+
/* @__PURE__ */ jsx38(SelectTrigger, { className: "w-24", children: /* @__PURE__ */ jsx38(SelectValue, {}) }),
|
|
3789
|
+
/* @__PURE__ */ jsx38(SelectContent, { children: unitOptions.map((opt) => /* @__PURE__ */ jsx38(SelectItem, { value: opt.value, children: opt.label }, opt.value)) })
|
|
3766
3790
|
] })
|
|
3767
3791
|
] });
|
|
3768
3792
|
}
|
|
@@ -3774,9 +3798,9 @@ import { CheckIcon as CheckIcon4 } from "@radix-ui/react-icons";
|
|
|
3774
3798
|
// components/ui/separator.tsx
|
|
3775
3799
|
import * as React22 from "react";
|
|
3776
3800
|
import * as SeparatorPrimitive from "@radix-ui/react-separator";
|
|
3777
|
-
import { jsx as
|
|
3801
|
+
import { jsx as jsx39 } from "react/jsx-runtime";
|
|
3778
3802
|
var Separator3 = React22.forwardRef(
|
|
3779
|
-
({ className, orientation = "horizontal", decorative = true, ...props }, ref) => /* @__PURE__ */
|
|
3803
|
+
({ className, orientation = "horizontal", decorative = true, ...props }, ref) => /* @__PURE__ */ jsx39(
|
|
3780
3804
|
SeparatorPrimitive.Root,
|
|
3781
3805
|
{
|
|
3782
3806
|
ref,
|
|
@@ -3794,7 +3818,7 @@ var Separator3 = React22.forwardRef(
|
|
|
3794
3818
|
Separator3.displayName = SeparatorPrimitive.Root.displayName;
|
|
3795
3819
|
|
|
3796
3820
|
// components/form-controls/filter-combobox.tsx
|
|
3797
|
-
import { Fragment as Fragment5, jsx as
|
|
3821
|
+
import { Fragment as Fragment5, jsx as jsx40, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
3798
3822
|
function FilterCombobox({ title, options, clearLabel }) {
|
|
3799
3823
|
const [selectedValues, setSelectedValues] = useState5([]);
|
|
3800
3824
|
const handleValueSelect = (value) => {
|
|
@@ -3805,12 +3829,12 @@ function FilterCombobox({ title, options, clearLabel }) {
|
|
|
3805
3829
|
}
|
|
3806
3830
|
};
|
|
3807
3831
|
return /* @__PURE__ */ jsxs24(Popover, { children: [
|
|
3808
|
-
/* @__PURE__ */
|
|
3809
|
-
/* @__PURE__ */
|
|
3832
|
+
/* @__PURE__ */ jsx40(PopoverTrigger, { asChild: true, className: "w-fit", children: /* @__PURE__ */ jsxs24(Button, { variant: "outline", size: "sm", className: "h-8 border-dashed", children: [
|
|
3833
|
+
/* @__PURE__ */ jsx40(Icon2, { name: "CirclePlus", className: "h-4 w-4 mr-2" }),
|
|
3810
3834
|
title,
|
|
3811
3835
|
selectedValues?.length > 0 && /* @__PURE__ */ jsxs24("div", { className: "flex items-center gap-2 ml-2", children: [
|
|
3812
|
-
/* @__PURE__ */
|
|
3813
|
-
/* @__PURE__ */
|
|
3836
|
+
/* @__PURE__ */ jsx40(Separator3, { orientation: "vertical", className: "h-4" }),
|
|
3837
|
+
/* @__PURE__ */ jsx40(Fragment5, { children: selectedValues.length > 2 ? /* @__PURE__ */ jsxs24(
|
|
3814
3838
|
Badge,
|
|
3815
3839
|
{
|
|
3816
3840
|
variant: "secondary",
|
|
@@ -3822,7 +3846,7 @@ function FilterCombobox({ title, options, clearLabel }) {
|
|
|
3822
3846
|
}
|
|
3823
3847
|
) : options.filter(
|
|
3824
3848
|
(option) => selectedValues.some((item) => item.value === option.value)
|
|
3825
|
-
).map((option) => /* @__PURE__ */
|
|
3849
|
+
).map((option) => /* @__PURE__ */ jsx40(
|
|
3826
3850
|
Badge,
|
|
3827
3851
|
{
|
|
3828
3852
|
variant: "secondary",
|
|
@@ -3833,11 +3857,11 @@ function FilterCombobox({ title, options, clearLabel }) {
|
|
|
3833
3857
|
)) })
|
|
3834
3858
|
] })
|
|
3835
3859
|
] }) }),
|
|
3836
|
-
/* @__PURE__ */
|
|
3837
|
-
/* @__PURE__ */
|
|
3860
|
+
/* @__PURE__ */ jsx40(PopoverContent, { className: "w-[200px] p-0", align: "start", children: /* @__PURE__ */ jsxs24(Command, { children: [
|
|
3861
|
+
/* @__PURE__ */ jsx40(CommandInput, { placeholder: title }),
|
|
3838
3862
|
/* @__PURE__ */ jsxs24(CommandList, { children: [
|
|
3839
|
-
/* @__PURE__ */
|
|
3840
|
-
/* @__PURE__ */
|
|
3863
|
+
/* @__PURE__ */ jsx40(CommandEmpty, { children: "No results found." }),
|
|
3864
|
+
/* @__PURE__ */ jsx40(CommandGroup, { children: options.map((option) => {
|
|
3841
3865
|
const isSelected = selectedValues.some(
|
|
3842
3866
|
(item) => item.value === option.value
|
|
3843
3867
|
);
|
|
@@ -3847,26 +3871,26 @@ function FilterCombobox({ title, options, clearLabel }) {
|
|
|
3847
3871
|
onSelect: () => handleValueSelect(option),
|
|
3848
3872
|
className: "cursor-pointer",
|
|
3849
3873
|
children: [
|
|
3850
|
-
/* @__PURE__ */
|
|
3874
|
+
/* @__PURE__ */ jsx40(
|
|
3851
3875
|
"div",
|
|
3852
3876
|
{
|
|
3853
3877
|
className: cn(
|
|
3854
3878
|
"mr-2 flex h-4 w-4 items-center justify-center rounded-sm border border-primary",
|
|
3855
3879
|
isSelected ? "bg-primary text-primary-foreground" : "opacity-50 [&_svg]:invisible"
|
|
3856
3880
|
),
|
|
3857
|
-
children: /* @__PURE__ */
|
|
3881
|
+
children: /* @__PURE__ */ jsx40(CheckIcon4, { className: cn("h-4 w-4") })
|
|
3858
3882
|
}
|
|
3859
3883
|
),
|
|
3860
|
-
option?.icon && /* @__PURE__ */
|
|
3861
|
-
/* @__PURE__ */
|
|
3884
|
+
option?.icon && /* @__PURE__ */ jsx40(Icon2, { name: option?.icon, className: "mr-2 h-4 w-4 text-muted-foreground" }),
|
|
3885
|
+
/* @__PURE__ */ jsx40("span", { children: option.label })
|
|
3862
3886
|
]
|
|
3863
3887
|
},
|
|
3864
3888
|
option.value
|
|
3865
3889
|
);
|
|
3866
3890
|
}) }),
|
|
3867
3891
|
selectedValues.length > 0 && /* @__PURE__ */ jsxs24(Fragment5, { children: [
|
|
3868
|
-
/* @__PURE__ */
|
|
3869
|
-
/* @__PURE__ */
|
|
3892
|
+
/* @__PURE__ */ jsx40(CommandSeparator, {}),
|
|
3893
|
+
/* @__PURE__ */ jsx40(CommandGroup, { children: /* @__PURE__ */ jsx40(
|
|
3870
3894
|
CommandItem,
|
|
3871
3895
|
{
|
|
3872
3896
|
onSelect: () => setSelectedValues([]),
|
|
@@ -3881,7 +3905,7 @@ function FilterCombobox({ title, options, clearLabel }) {
|
|
|
3881
3905
|
}
|
|
3882
3906
|
|
|
3883
3907
|
// components/form-controls/form-combobox.tsx
|
|
3884
|
-
import { jsx as
|
|
3908
|
+
import { jsx as jsx41, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
3885
3909
|
function FormCombobox({
|
|
3886
3910
|
title,
|
|
3887
3911
|
name,
|
|
@@ -3890,15 +3914,15 @@ function FormCombobox({
|
|
|
3890
3914
|
data,
|
|
3891
3915
|
label
|
|
3892
3916
|
}) {
|
|
3893
|
-
return /* @__PURE__ */
|
|
3917
|
+
return /* @__PURE__ */ jsx41(
|
|
3894
3918
|
FormField,
|
|
3895
3919
|
{
|
|
3896
3920
|
control,
|
|
3897
3921
|
name,
|
|
3898
3922
|
rules,
|
|
3899
3923
|
render: ({ field }) => /* @__PURE__ */ jsxs25(FormItem, { children: [
|
|
3900
|
-
title && /* @__PURE__ */
|
|
3901
|
-
/* @__PURE__ */
|
|
3924
|
+
title && /* @__PURE__ */ jsx41(FormLabel, { children: title }),
|
|
3925
|
+
/* @__PURE__ */ jsx41(FormControl, { children: /* @__PURE__ */ jsx41(
|
|
3902
3926
|
Combobox,
|
|
3903
3927
|
{
|
|
3904
3928
|
label,
|
|
@@ -3907,7 +3931,7 @@ function FormCombobox({
|
|
|
3907
3931
|
onChange: (value) => field.onChange(value)
|
|
3908
3932
|
}
|
|
3909
3933
|
) }),
|
|
3910
|
-
/* @__PURE__ */
|
|
3934
|
+
/* @__PURE__ */ jsx41(FormMessage, {})
|
|
3911
3935
|
] })
|
|
3912
3936
|
}
|
|
3913
3937
|
);
|
|
@@ -3915,7 +3939,7 @@ function FormCombobox({
|
|
|
3915
3939
|
|
|
3916
3940
|
// components/form-controls/form-layout.tsx
|
|
3917
3941
|
import { FormProvider as FormProvider2 } from "react-hook-form";
|
|
3918
|
-
import { jsx as
|
|
3942
|
+
import { jsx as jsx42, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
3919
3943
|
function FormLayout({
|
|
3920
3944
|
children,
|
|
3921
3945
|
formTitle,
|
|
@@ -3927,34 +3951,34 @@ function FormLayout({
|
|
|
3927
3951
|
PrimaryActionText,
|
|
3928
3952
|
CancelText
|
|
3929
3953
|
}) {
|
|
3930
|
-
return /* @__PURE__ */
|
|
3954
|
+
return /* @__PURE__ */ jsx42(FormProvider2, { ...form, children: /* @__PURE__ */ jsxs26("form", { onSubmit: onSave, className: `flex flex-col gap-6 ${className}`, children: [
|
|
3931
3955
|
/* @__PURE__ */ jsxs26("div", { className: "flex items-center justify-between w-full border-b pb-6 border-border", children: [
|
|
3932
3956
|
/* @__PURE__ */ jsxs26("div", { className: "flex flex-col", children: [
|
|
3933
|
-
/* @__PURE__ */
|
|
3934
|
-
/* @__PURE__ */
|
|
3957
|
+
/* @__PURE__ */ jsx42("p", { className: "font-semibold text-lg", children: formTitle }),
|
|
3958
|
+
/* @__PURE__ */ jsx42("p", { className: "text-gray-500", children: formDescription })
|
|
3935
3959
|
] }),
|
|
3936
3960
|
/* @__PURE__ */ jsxs26("div", { className: "flex items-center gap-2", children: [
|
|
3937
|
-
/* @__PURE__ */
|
|
3938
|
-
/* @__PURE__ */
|
|
3961
|
+
/* @__PURE__ */ jsx42(Button2, { type: "button", onClick: onCanel, variant: "secondary", children: CancelText }),
|
|
3962
|
+
/* @__PURE__ */ jsx42(Button2, { type: "submit", children: PrimaryActionText })
|
|
3939
3963
|
] })
|
|
3940
3964
|
] }),
|
|
3941
3965
|
children,
|
|
3942
3966
|
/* @__PURE__ */ jsxs26("div", { className: "flex items-center gap-2 justify-end", children: [
|
|
3943
|
-
/* @__PURE__ */
|
|
3944
|
-
/* @__PURE__ */
|
|
3967
|
+
/* @__PURE__ */ jsx42(Button2, { type: "button", onClick: onCanel, variant: "secondary", children: CancelText }),
|
|
3968
|
+
/* @__PURE__ */ jsx42(Button2, { type: "submit", children: PrimaryActionText })
|
|
3945
3969
|
] })
|
|
3946
3970
|
] }) });
|
|
3947
3971
|
}
|
|
3948
3972
|
|
|
3949
3973
|
// components/form-controls/form-row.tsx
|
|
3950
|
-
import { jsx as
|
|
3974
|
+
import { jsx as jsx43, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
3951
3975
|
function FormRow({ children, title, description }) {
|
|
3952
3976
|
return /* @__PURE__ */ jsxs27("div", { className: "grid grid-cols-3 w-full border-b pb-6 border-border", children: [
|
|
3953
3977
|
/* @__PURE__ */ jsxs27("div", { className: "flex flex-col", children: [
|
|
3954
|
-
/* @__PURE__ */
|
|
3955
|
-
/* @__PURE__ */
|
|
3978
|
+
/* @__PURE__ */ jsx43("p", { className: "font-medium", children: title }),
|
|
3979
|
+
/* @__PURE__ */ jsx43("p", { className: "text-gray-500 text-sm", children: description })
|
|
3956
3980
|
] }),
|
|
3957
|
-
/* @__PURE__ */
|
|
3981
|
+
/* @__PURE__ */ jsx43("div", { className: "col-span-2 w-[80%]", children })
|
|
3958
3982
|
] });
|
|
3959
3983
|
}
|
|
3960
3984
|
|
|
@@ -3962,9 +3986,9 @@ function FormRow({ children, title, description }) {
|
|
|
3962
3986
|
import * as React23 from "react";
|
|
3963
3987
|
import { CheckIcon as CheckIcon5 } from "@radix-ui/react-icons";
|
|
3964
3988
|
import * as RadioGroupPrimitive from "@radix-ui/react-radio-group";
|
|
3965
|
-
import { jsx as
|
|
3989
|
+
import { jsx as jsx44 } from "react/jsx-runtime";
|
|
3966
3990
|
var RadioGroup2 = React23.forwardRef(({ className, ...props }, ref) => {
|
|
3967
|
-
return /* @__PURE__ */
|
|
3991
|
+
return /* @__PURE__ */ jsx44(
|
|
3968
3992
|
RadioGroupPrimitive.Root,
|
|
3969
3993
|
{
|
|
3970
3994
|
className: cn("grid gap-2", className),
|
|
@@ -3975,7 +3999,7 @@ var RadioGroup2 = React23.forwardRef(({ className, ...props }, ref) => {
|
|
|
3975
3999
|
});
|
|
3976
4000
|
RadioGroup2.displayName = RadioGroupPrimitive.Root.displayName;
|
|
3977
4001
|
var RadioGroupItem = React23.forwardRef(({ className, ...props }, ref) => {
|
|
3978
|
-
return /* @__PURE__ */
|
|
4002
|
+
return /* @__PURE__ */ jsx44(
|
|
3979
4003
|
RadioGroupPrimitive.Item,
|
|
3980
4004
|
{
|
|
3981
4005
|
ref,
|
|
@@ -3984,7 +4008,7 @@ var RadioGroupItem = React23.forwardRef(({ className, ...props }, ref) => {
|
|
|
3984
4008
|
className
|
|
3985
4009
|
),
|
|
3986
4010
|
...props,
|
|
3987
|
-
children: /* @__PURE__ */
|
|
4011
|
+
children: /* @__PURE__ */ jsx44(RadioGroupPrimitive.Indicator, { className: "flex items-center justify-center", children: /* @__PURE__ */ jsx44(CheckIcon5, { className: "h-3.5 w-3.5 fill-primary" }) })
|
|
3988
4012
|
}
|
|
3989
4013
|
);
|
|
3990
4014
|
});
|
|
@@ -3995,11 +4019,11 @@ import * as React24 from "react";
|
|
|
3995
4019
|
import * as SheetPrimitive from "@radix-ui/react-dialog";
|
|
3996
4020
|
import { Cross2Icon as Cross2Icon2 } from "@radix-ui/react-icons";
|
|
3997
4021
|
import { cva as cva5 } from "class-variance-authority";
|
|
3998
|
-
import { jsx as
|
|
4022
|
+
import { jsx as jsx45, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
3999
4023
|
var Sheet = SheetPrimitive.Root;
|
|
4000
4024
|
var SheetTrigger = SheetPrimitive.Trigger;
|
|
4001
4025
|
var SheetPortal = SheetPrimitive.Portal;
|
|
4002
|
-
var SheetOverlay = React24.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
|
|
4026
|
+
var SheetOverlay = React24.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx45(
|
|
4003
4027
|
SheetPrimitive.Overlay,
|
|
4004
4028
|
{
|
|
4005
4029
|
className: cn(
|
|
@@ -4028,7 +4052,7 @@ var sheetVariants = cva5(
|
|
|
4028
4052
|
}
|
|
4029
4053
|
);
|
|
4030
4054
|
var SheetContent = React24.forwardRef(({ side = "right", className, children, ...props }, ref) => /* @__PURE__ */ jsxs28(SheetPortal, { children: [
|
|
4031
|
-
/* @__PURE__ */
|
|
4055
|
+
/* @__PURE__ */ jsx45(SheetOverlay, {}),
|
|
4032
4056
|
/* @__PURE__ */ jsxs28(
|
|
4033
4057
|
SheetPrimitive.Content,
|
|
4034
4058
|
{
|
|
@@ -4037,8 +4061,8 @@ var SheetContent = React24.forwardRef(({ side = "right", className, children, ..
|
|
|
4037
4061
|
...props,
|
|
4038
4062
|
children: [
|
|
4039
4063
|
/* @__PURE__ */ jsxs28(SheetPrimitive.Close, { className: "absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary", children: [
|
|
4040
|
-
/* @__PURE__ */
|
|
4041
|
-
/* @__PURE__ */
|
|
4064
|
+
/* @__PURE__ */ jsx45(Cross2Icon2, { className: "h-4 w-4" }),
|
|
4065
|
+
/* @__PURE__ */ jsx45("span", { className: "sr-only", children: "Close" })
|
|
4042
4066
|
] }),
|
|
4043
4067
|
children
|
|
4044
4068
|
]
|
|
@@ -4049,7 +4073,7 @@ SheetContent.displayName = SheetPrimitive.Content.displayName;
|
|
|
4049
4073
|
var SheetHeader = ({
|
|
4050
4074
|
className,
|
|
4051
4075
|
...props
|
|
4052
|
-
}) => /* @__PURE__ */
|
|
4076
|
+
}) => /* @__PURE__ */ jsx45(
|
|
4053
4077
|
"div",
|
|
4054
4078
|
{
|
|
4055
4079
|
className: cn(
|
|
@@ -4063,7 +4087,7 @@ SheetHeader.displayName = "SheetHeader";
|
|
|
4063
4087
|
var SheetFooter = ({
|
|
4064
4088
|
className,
|
|
4065
4089
|
...props
|
|
4066
|
-
}) => /* @__PURE__ */
|
|
4090
|
+
}) => /* @__PURE__ */ jsx45(
|
|
4067
4091
|
"div",
|
|
4068
4092
|
{
|
|
4069
4093
|
className: cn(
|
|
@@ -4074,7 +4098,7 @@ var SheetFooter = ({
|
|
|
4074
4098
|
}
|
|
4075
4099
|
);
|
|
4076
4100
|
SheetFooter.displayName = "SheetFooter";
|
|
4077
|
-
var SheetTitle = React24.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
|
|
4101
|
+
var SheetTitle = React24.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx45(
|
|
4078
4102
|
SheetPrimitive.Title,
|
|
4079
4103
|
{
|
|
4080
4104
|
ref,
|
|
@@ -4083,7 +4107,7 @@ var SheetTitle = React24.forwardRef(({ className, ...props }, ref) => /* @__PURE
|
|
|
4083
4107
|
}
|
|
4084
4108
|
));
|
|
4085
4109
|
SheetTitle.displayName = SheetPrimitive.Title.displayName;
|
|
4086
|
-
var SheetDescription = React24.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
|
|
4110
|
+
var SheetDescription = React24.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx45(
|
|
4087
4111
|
SheetPrimitive.Description,
|
|
4088
4112
|
{
|
|
4089
4113
|
ref,
|
|
@@ -4095,10 +4119,10 @@ SheetDescription.displayName = SheetPrimitive.Description.displayName;
|
|
|
4095
4119
|
|
|
4096
4120
|
// components/ui/textarea.tsx
|
|
4097
4121
|
import * as React25 from "react";
|
|
4098
|
-
import { jsx as
|
|
4122
|
+
import { jsx as jsx46 } from "react/jsx-runtime";
|
|
4099
4123
|
var Textarea = React25.forwardRef(
|
|
4100
4124
|
({ className, ...props }, ref) => {
|
|
4101
|
-
return /* @__PURE__ */
|
|
4125
|
+
return /* @__PURE__ */ jsx46(
|
|
4102
4126
|
"textarea",
|
|
4103
4127
|
{
|
|
4104
4128
|
className: cn(
|
|
@@ -4116,11 +4140,11 @@ Textarea.displayName = "Textarea";
|
|
|
4116
4140
|
// components/ui/tooltip.tsx
|
|
4117
4141
|
import * as React26 from "react";
|
|
4118
4142
|
import * as TooltipPrimitive from "@radix-ui/react-tooltip";
|
|
4119
|
-
import { jsx as
|
|
4143
|
+
import { jsx as jsx47 } from "react/jsx-runtime";
|
|
4120
4144
|
var TooltipProvider = TooltipPrimitive.Provider;
|
|
4121
4145
|
var Tooltip = TooltipPrimitive.Root;
|
|
4122
4146
|
var TooltipTrigger = TooltipPrimitive.Trigger;
|
|
4123
|
-
var TooltipContent = React26.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */
|
|
4147
|
+
var TooltipContent = React26.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsx47(
|
|
4124
4148
|
TooltipPrimitive.Content,
|
|
4125
4149
|
{
|
|
4126
4150
|
ref,
|
|
@@ -4137,7 +4161,7 @@ TooltipContent.displayName = TooltipPrimitive.Content.displayName;
|
|
|
4137
4161
|
// components/ui/chart.tsx
|
|
4138
4162
|
import * as React27 from "react";
|
|
4139
4163
|
import * as RechartsPrimitive from "recharts";
|
|
4140
|
-
import { Fragment as Fragment6, jsx as
|
|
4164
|
+
import { Fragment as Fragment6, jsx as jsx48, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
4141
4165
|
var THEMES = { light: "", dark: ".dark" };
|
|
4142
4166
|
var ChartContext = React27.createContext(null);
|
|
4143
4167
|
function useChart() {
|
|
@@ -4150,7 +4174,7 @@ function useChart() {
|
|
|
4150
4174
|
var ChartContainer = React27.forwardRef(({ id, className, children, config, ...props }, ref) => {
|
|
4151
4175
|
const uniqueId = React27.useId();
|
|
4152
4176
|
const chartId = `chart-${id || uniqueId.replace(/:/g, "")}`;
|
|
4153
|
-
return /* @__PURE__ */
|
|
4177
|
+
return /* @__PURE__ */ jsx48(ChartContext.Provider, { value: { config }, children: /* @__PURE__ */ jsxs29(
|
|
4154
4178
|
"div",
|
|
4155
4179
|
{
|
|
4156
4180
|
"data-chart": chartId,
|
|
@@ -4161,8 +4185,8 @@ var ChartContainer = React27.forwardRef(({ id, className, children, config, ...p
|
|
|
4161
4185
|
),
|
|
4162
4186
|
...props,
|
|
4163
4187
|
children: [
|
|
4164
|
-
/* @__PURE__ */
|
|
4165
|
-
/* @__PURE__ */
|
|
4188
|
+
/* @__PURE__ */ jsx48(ChartStyle, { id: chartId, config }),
|
|
4189
|
+
/* @__PURE__ */ jsx48(RechartsPrimitive.ResponsiveContainer, { children })
|
|
4166
4190
|
]
|
|
4167
4191
|
}
|
|
4168
4192
|
) });
|
|
@@ -4175,7 +4199,7 @@ var ChartStyle = ({ id, config }) => {
|
|
|
4175
4199
|
if (!colorConfig.length) {
|
|
4176
4200
|
return null;
|
|
4177
4201
|
}
|
|
4178
|
-
return /* @__PURE__ */
|
|
4202
|
+
return /* @__PURE__ */ jsx48(
|
|
4179
4203
|
"style",
|
|
4180
4204
|
{
|
|
4181
4205
|
dangerouslySetInnerHTML: {
|
|
@@ -4219,12 +4243,12 @@ var ChartTooltipContent = React27.forwardRef(
|
|
|
4219
4243
|
const itemConfig = getPayloadConfigFromPayload(config, item, key);
|
|
4220
4244
|
const value = !labelKey && typeof label === "string" ? config[label]?.label || label : itemConfig?.label;
|
|
4221
4245
|
if (labelFormatter) {
|
|
4222
|
-
return /* @__PURE__ */
|
|
4246
|
+
return /* @__PURE__ */ jsx48("div", { className: cn("font-medium", labelClassName), children: labelFormatter(value, payload) });
|
|
4223
4247
|
}
|
|
4224
4248
|
if (!value) {
|
|
4225
4249
|
return null;
|
|
4226
4250
|
}
|
|
4227
|
-
return /* @__PURE__ */
|
|
4251
|
+
return /* @__PURE__ */ jsx48("div", { className: cn("font-medium", labelClassName), children: value });
|
|
4228
4252
|
}, [
|
|
4229
4253
|
label,
|
|
4230
4254
|
labelFormatter,
|
|
@@ -4248,11 +4272,11 @@ var ChartTooltipContent = React27.forwardRef(
|
|
|
4248
4272
|
),
|
|
4249
4273
|
children: [
|
|
4250
4274
|
!nestLabel ? tooltipLabel : null,
|
|
4251
|
-
/* @__PURE__ */
|
|
4275
|
+
/* @__PURE__ */ jsx48("div", { className: "grid gap-1.5", children: payload.map((item, index) => {
|
|
4252
4276
|
const key = `${nameKey || item.name || item.dataKey || "value"}`;
|
|
4253
4277
|
const itemConfig = getPayloadConfigFromPayload(config, item, key);
|
|
4254
4278
|
const indicatorColor = color || item.payload.fill || item.color;
|
|
4255
|
-
return /* @__PURE__ */
|
|
4279
|
+
return /* @__PURE__ */ jsx48(
|
|
4256
4280
|
"div",
|
|
4257
4281
|
{
|
|
4258
4282
|
className: cn(
|
|
@@ -4260,7 +4284,7 @@ var ChartTooltipContent = React27.forwardRef(
|
|
|
4260
4284
|
indicator === "dot" && "items-center"
|
|
4261
4285
|
),
|
|
4262
4286
|
children: formatter && item?.value !== void 0 && item.name ? formatter(item.value, item.name, item, index, item.payload) : /* @__PURE__ */ jsxs29(Fragment6, { children: [
|
|
4263
|
-
itemConfig?.icon ? /* @__PURE__ */
|
|
4287
|
+
itemConfig?.icon ? /* @__PURE__ */ jsx48(itemConfig.icon, {}) : !hideIndicator && /* @__PURE__ */ jsx48(
|
|
4264
4288
|
"div",
|
|
4265
4289
|
{
|
|
4266
4290
|
className: cn(
|
|
@@ -4288,9 +4312,9 @@ var ChartTooltipContent = React27.forwardRef(
|
|
|
4288
4312
|
children: [
|
|
4289
4313
|
/* @__PURE__ */ jsxs29("div", { className: "grid gap-1.5", children: [
|
|
4290
4314
|
nestLabel ? tooltipLabel : null,
|
|
4291
|
-
/* @__PURE__ */
|
|
4315
|
+
/* @__PURE__ */ jsx48("span", { className: "text-muted-foreground", children: itemConfig?.label || item.name })
|
|
4292
4316
|
] }),
|
|
4293
|
-
item.value && /* @__PURE__ */
|
|
4317
|
+
item.value && /* @__PURE__ */ jsx48("span", { className: "font-mono font-medium tabular-nums text-foreground", children: item.value.toLocaleString() })
|
|
4294
4318
|
]
|
|
4295
4319
|
}
|
|
4296
4320
|
)
|
|
@@ -4311,7 +4335,7 @@ var ChartLegendContent = React27.forwardRef(
|
|
|
4311
4335
|
if (!payload?.length) {
|
|
4312
4336
|
return null;
|
|
4313
4337
|
}
|
|
4314
|
-
return /* @__PURE__ */
|
|
4338
|
+
return /* @__PURE__ */ jsx48(
|
|
4315
4339
|
"div",
|
|
4316
4340
|
{
|
|
4317
4341
|
ref,
|
|
@@ -4330,7 +4354,7 @@ var ChartLegendContent = React27.forwardRef(
|
|
|
4330
4354
|
"flex items-center gap-1.5 [&>svg]:h-3 [&>svg]:w-3 [&>svg]:text-muted-foreground"
|
|
4331
4355
|
),
|
|
4332
4356
|
children: [
|
|
4333
|
-
itemConfig?.icon && !hideIcon ? /* @__PURE__ */
|
|
4357
|
+
itemConfig?.icon && !hideIcon ? /* @__PURE__ */ jsx48(itemConfig.icon, {}) : /* @__PURE__ */ jsx48(
|
|
4334
4358
|
"div",
|
|
4335
4359
|
{
|
|
4336
4360
|
className: "h-2 w-2 shrink-0 rounded-[2px]",
|
|
@@ -4367,7 +4391,7 @@ function getPayloadConfigFromPayload(config, payload, key) {
|
|
|
4367
4391
|
// components/ui/slider.tsx
|
|
4368
4392
|
import * as React28 from "react";
|
|
4369
4393
|
import * as SliderPrimitive from "@radix-ui/react-slider";
|
|
4370
|
-
import { jsx as
|
|
4394
|
+
import { jsx as jsx49, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
4371
4395
|
var Slider = React28.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxs30(
|
|
4372
4396
|
SliderPrimitive.Root,
|
|
4373
4397
|
{
|
|
@@ -4378,15 +4402,15 @@ var Slider = React28.forwardRef(({ className, ...props }, ref) => /* @__PURE__ *
|
|
|
4378
4402
|
),
|
|
4379
4403
|
...props,
|
|
4380
4404
|
children: [
|
|
4381
|
-
/* @__PURE__ */
|
|
4382
|
-
/* @__PURE__ */
|
|
4405
|
+
/* @__PURE__ */ jsx49(SliderPrimitive.Track, { className: "relative h-1.5 w-full grow overflow-hidden rounded-full bg-primary/20", children: /* @__PURE__ */ jsx49(SliderPrimitive.Range, { className: "absolute h-full bg-primary" }) }),
|
|
4406
|
+
/* @__PURE__ */ jsx49(SliderPrimitive.Thumb, { className: "block h-4 w-4 rounded-full border border-primary/50 bg-background shadow transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50" })
|
|
4383
4407
|
]
|
|
4384
4408
|
}
|
|
4385
4409
|
));
|
|
4386
4410
|
Slider.displayName = SliderPrimitive.Root.displayName;
|
|
4387
4411
|
|
|
4388
4412
|
// components/form-controls/form-with-action-buttons.tsx
|
|
4389
|
-
import { jsx as
|
|
4413
|
+
import { jsx as jsx50, jsxs as jsxs31 } from "react/jsx-runtime";
|
|
4390
4414
|
var FormWithActionButtons = ({
|
|
4391
4415
|
children,
|
|
4392
4416
|
form,
|
|
@@ -4397,10 +4421,10 @@ var FormWithActionButtons = ({
|
|
|
4397
4421
|
secondaryButtonAction,
|
|
4398
4422
|
showSecondaryButton = false
|
|
4399
4423
|
}) => {
|
|
4400
|
-
return /* @__PURE__ */
|
|
4424
|
+
return /* @__PURE__ */ jsx50(Form, { ...form, children: /* @__PURE__ */ jsxs31("form", { onSubmit: form.handleSubmit(onSubmit), className: "space-y-4", children: [
|
|
4401
4425
|
children,
|
|
4402
4426
|
/* @__PURE__ */ jsxs31("div", { className: "flex justify-end gap-2", children: [
|
|
4403
|
-
showSecondaryButton && /* @__PURE__ */
|
|
4427
|
+
showSecondaryButton && /* @__PURE__ */ jsx50(
|
|
4404
4428
|
Button,
|
|
4405
4429
|
{
|
|
4406
4430
|
variant: "link",
|
|
@@ -4409,29 +4433,29 @@ var FormWithActionButtons = ({
|
|
|
4409
4433
|
children: secondaryButtonText
|
|
4410
4434
|
}
|
|
4411
4435
|
),
|
|
4412
|
-
/* @__PURE__ */
|
|
4436
|
+
/* @__PURE__ */ jsx50(Button, { variant: "default", type: "submit", children: primaryButtonText })
|
|
4413
4437
|
] })
|
|
4414
4438
|
] }) });
|
|
4415
4439
|
};
|
|
4416
4440
|
|
|
4417
4441
|
// components/form-controls/helpers.tsx
|
|
4418
4442
|
import { File, FileSpreadsheet, FileText } from "lucide-react";
|
|
4419
|
-
import { jsx as
|
|
4443
|
+
import { jsx as jsx51 } from "react/jsx-runtime";
|
|
4420
4444
|
var getFileIcon = (fileName) => {
|
|
4421
4445
|
const extensionMatch = fileName.match(/\.([^.]+)$/);
|
|
4422
4446
|
const extension = extensionMatch ? extensionMatch[1].toLowerCase() : null;
|
|
4423
|
-
if (!extension) return /* @__PURE__ */
|
|
4447
|
+
if (!extension) return /* @__PURE__ */ jsx51(File, { className: "w-8 h-8 text-gray-500" });
|
|
4424
4448
|
switch (extension) {
|
|
4425
4449
|
case "pdf":
|
|
4426
|
-
return /* @__PURE__ */
|
|
4450
|
+
return /* @__PURE__ */ jsx51(File, { className: "w-8 h-8 text-red-500" });
|
|
4427
4451
|
case "doc":
|
|
4428
4452
|
case "docx":
|
|
4429
|
-
return /* @__PURE__ */
|
|
4453
|
+
return /* @__PURE__ */ jsx51(FileText, { className: "w-8 h-8 text-blue-500" });
|
|
4430
4454
|
case "xls":
|
|
4431
4455
|
case "xlsx":
|
|
4432
|
-
return /* @__PURE__ */
|
|
4456
|
+
return /* @__PURE__ */ jsx51(FileSpreadsheet, { className: "w-8 h-8 text-green-500" });
|
|
4433
4457
|
default:
|
|
4434
|
-
return /* @__PURE__ */
|
|
4458
|
+
return /* @__PURE__ */ jsx51(File, { className: "w-8 h-8 text-gray-500" });
|
|
4435
4459
|
}
|
|
4436
4460
|
};
|
|
4437
4461
|
var getFileName = (url) => {
|
|
@@ -4441,7 +4465,7 @@ var getFileName = (url) => {
|
|
|
4441
4465
|
};
|
|
4442
4466
|
|
|
4443
4467
|
// components/form-controls/icon-button.tsx
|
|
4444
|
-
import { jsx as
|
|
4468
|
+
import { jsx as jsx52, jsxs as jsxs32 } from "react/jsx-runtime";
|
|
4445
4469
|
var IconButton = ({
|
|
4446
4470
|
item,
|
|
4447
4471
|
variant,
|
|
@@ -4457,8 +4481,8 @@ var IconButton = ({
|
|
|
4457
4481
|
onClick,
|
|
4458
4482
|
...props,
|
|
4459
4483
|
children: [
|
|
4460
|
-
/* @__PURE__ */
|
|
4461
|
-
/* @__PURE__ */
|
|
4484
|
+
/* @__PURE__ */ jsx52("span", { className: "w-4 flex items-center justify-center", children: /* @__PURE__ */ jsx52(Icon2, { name: item.icon, size: 20, strokeWidth: 1 }) }),
|
|
4485
|
+
/* @__PURE__ */ jsx52("span", { className: "text-sm", children: item.title })
|
|
4462
4486
|
]
|
|
4463
4487
|
}
|
|
4464
4488
|
);
|
|
@@ -4466,7 +4490,7 @@ var IconButton = ({
|
|
|
4466
4490
|
|
|
4467
4491
|
// components/form-controls/input.tsx
|
|
4468
4492
|
import * as React29 from "react";
|
|
4469
|
-
import { jsx as
|
|
4493
|
+
import { jsx as jsx53, jsxs as jsxs33 } from "react/jsx-runtime";
|
|
4470
4494
|
var Input2 = React29.forwardRef(
|
|
4471
4495
|
({
|
|
4472
4496
|
variant = "default",
|
|
@@ -4478,19 +4502,19 @@ var Input2 = React29.forwardRef(
|
|
|
4478
4502
|
rules,
|
|
4479
4503
|
...props
|
|
4480
4504
|
}, ref) => {
|
|
4481
|
-
return isFormField ? /* @__PURE__ */
|
|
4505
|
+
return isFormField ? /* @__PURE__ */ jsx53(
|
|
4482
4506
|
FormField,
|
|
4483
4507
|
{
|
|
4484
4508
|
control,
|
|
4485
4509
|
name,
|
|
4486
4510
|
rules,
|
|
4487
4511
|
render: ({ field }) => /* @__PURE__ */ jsxs33(FormItem, { children: [
|
|
4488
|
-
title && /* @__PURE__ */
|
|
4489
|
-
/* @__PURE__ */
|
|
4490
|
-
/* @__PURE__ */
|
|
4512
|
+
title && /* @__PURE__ */ jsx53(FormLabel, { children: title }),
|
|
4513
|
+
/* @__PURE__ */ jsx53(FormControl, { children: /* @__PURE__ */ jsx53(Input, { className, ...props, ...field }) }),
|
|
4514
|
+
/* @__PURE__ */ jsx53(FormMessage, {})
|
|
4491
4515
|
] })
|
|
4492
4516
|
}
|
|
4493
|
-
) : /* @__PURE__ */
|
|
4517
|
+
) : /* @__PURE__ */ jsx53(Input, { className, ref, ...props });
|
|
4494
4518
|
}
|
|
4495
4519
|
);
|
|
4496
4520
|
Input2.displayName = "Input";
|
|
@@ -4498,7 +4522,7 @@ Input2.displayName = "Input";
|
|
|
4498
4522
|
// components/form-controls/knowledge-graph-word-cloud.tsx
|
|
4499
4523
|
import { useKnowledgeGraphContext } from "@elqnt/kg";
|
|
4500
4524
|
import { Loader2 as Loader22 } from "lucide-react";
|
|
4501
|
-
import { Fragment as Fragment7, jsx as
|
|
4525
|
+
import { Fragment as Fragment7, jsx as jsx54, jsxs as jsxs34 } from "react/jsx-runtime";
|
|
4502
4526
|
function KnowledgeGraphWordCloud() {
|
|
4503
4527
|
const { labels } = useKnowledgeGraphContext();
|
|
4504
4528
|
if (!labels || !(labels instanceof Array)) {
|
|
@@ -4508,15 +4532,15 @@ function KnowledgeGraphWordCloud() {
|
|
|
4508
4532
|
return { text: item?.label, value: item?.count };
|
|
4509
4533
|
});
|
|
4510
4534
|
return /* @__PURE__ */ jsxs34("div", { className: "rounded-xl border bg-card h-full shadow relative p-5", children: [
|
|
4511
|
-
/* @__PURE__ */
|
|
4512
|
-
!data ? /* @__PURE__ */
|
|
4535
|
+
/* @__PURE__ */ jsx54("p", { className: "capitalize mb-10 font-semibold text-xl", children: "Graph Distribution" }),
|
|
4536
|
+
!data ? /* @__PURE__ */ jsx54("div", { className: "absolute w-full flex justify-end", children: /* @__PURE__ */ jsx54(Loader22, { className: "animate-spin" }) }) : /* @__PURE__ */ jsx54(Fragment7, {})
|
|
4513
4537
|
] });
|
|
4514
4538
|
}
|
|
4515
4539
|
|
|
4516
4540
|
// components/form-controls/layout/org-selector.tsx
|
|
4517
4541
|
import { useUserContext } from "@elqnt/auth";
|
|
4518
4542
|
import { useEffect as useEffect4, useState as useState6 } from "react";
|
|
4519
|
-
import { jsx as
|
|
4543
|
+
import { jsx as jsx55 } from "react/jsx-runtime";
|
|
4520
4544
|
function OrgSelector() {
|
|
4521
4545
|
const { user, selectedOrgId, setSelectedOrgId } = useUserContext();
|
|
4522
4546
|
const [orgAccess, setOrgAccess] = useState6([]);
|
|
@@ -4535,7 +4559,7 @@ function OrgSelector() {
|
|
|
4535
4559
|
if (!user) {
|
|
4536
4560
|
return null;
|
|
4537
4561
|
}
|
|
4538
|
-
return /* @__PURE__ */
|
|
4562
|
+
return /* @__PURE__ */ jsx55(
|
|
4539
4563
|
Combobox,
|
|
4540
4564
|
{
|
|
4541
4565
|
defaultValue: selectedOrgId,
|
|
@@ -4550,7 +4574,7 @@ function OrgSelector() {
|
|
|
4550
4574
|
import { ChevronLeft } from "lucide-react";
|
|
4551
4575
|
import Link from "next/link";
|
|
4552
4576
|
import { useRouter } from "next/navigation";
|
|
4553
|
-
import { jsx as
|
|
4577
|
+
import { jsx as jsx56, jsxs as jsxs35 } from "react/jsx-runtime";
|
|
4554
4578
|
function PageHeader({
|
|
4555
4579
|
title,
|
|
4556
4580
|
description,
|
|
@@ -4597,24 +4621,24 @@ function PageHeader({
|
|
|
4597
4621
|
),
|
|
4598
4622
|
children: [
|
|
4599
4623
|
/* @__PURE__ */ jsxs35("div", { children: [
|
|
4600
|
-
/* @__PURE__ */
|
|
4601
|
-
goBackLink && /* @__PURE__ */
|
|
4602
|
-
showBack && !goBackLink && /* @__PURE__ */
|
|
4624
|
+
/* @__PURE__ */ jsx56("div", { children: /* @__PURE__ */ jsxs35("div", { className: "flex items-center gap-2", children: [
|
|
4625
|
+
goBackLink && /* @__PURE__ */ jsx56(Link, { href: goBackLink, children: /* @__PURE__ */ jsx56(ChevronLeft, { className: "h-4 w-4" }) }),
|
|
4626
|
+
showBack && !goBackLink && /* @__PURE__ */ jsx56(
|
|
4603
4627
|
"button",
|
|
4604
4628
|
{
|
|
4605
4629
|
onClick: handleBack,
|
|
4606
4630
|
className: "h-8 w-8 p-0 flex items-center justify-center rounded-md border border-gray-200 hover:bg-gray-50 transition-colors",
|
|
4607
|
-
children: /* @__PURE__ */
|
|
4631
|
+
children: /* @__PURE__ */ jsx56(ChevronLeft, { className: "h-4 w-4" })
|
|
4608
4632
|
}
|
|
4609
4633
|
),
|
|
4610
|
-
titleComponent ?? (title && /* @__PURE__ */
|
|
4634
|
+
titleComponent ?? (title && /* @__PURE__ */ jsx56("h2", { className: "font-semibold text-lg text-primary p-0 m-0", children: title }))
|
|
4611
4635
|
] }) }),
|
|
4612
|
-
description && /* @__PURE__ */
|
|
4636
|
+
description && /* @__PURE__ */ jsx56("p", { className: "text-sm text-gray-500", children: description })
|
|
4613
4637
|
] }),
|
|
4614
4638
|
/* @__PURE__ */ jsxs35("div", { className: "flex gap-2 items-center", children: [
|
|
4615
4639
|
rightSideComponent,
|
|
4616
4640
|
actions?.map(
|
|
4617
|
-
(action, index) => action.href ? /* @__PURE__ */
|
|
4641
|
+
(action, index) => action.href ? /* @__PURE__ */ jsx56(Link, { href: action.href, children: /* @__PURE__ */ jsx56(Button2, { variant: action.type, children: action.label }) }, index) : /* @__PURE__ */ jsx56(Button2, { variant: action.type, onClick: action.onAction, children: action.label }, index)
|
|
4618
4642
|
)
|
|
4619
4643
|
] })
|
|
4620
4644
|
]
|
|
@@ -4632,7 +4656,7 @@ import { useEffect as useEffect5, useState as useState7 } from "react";
|
|
|
4632
4656
|
import { signOut } from "next-auth/react";
|
|
4633
4657
|
import Link2 from "next/link";
|
|
4634
4658
|
import { useRouter as useRouter2 } from "next/navigation";
|
|
4635
|
-
import { jsx as
|
|
4659
|
+
import { jsx as jsx57, jsxs as jsxs36 } from "react/jsx-runtime";
|
|
4636
4660
|
function ProfileMenu({ children, pathName }) {
|
|
4637
4661
|
const router = useRouter2();
|
|
4638
4662
|
const handleSignOut = async () => {
|
|
@@ -4655,8 +4679,8 @@ function ProfileMenu({ children, pathName }) {
|
|
|
4655
4679
|
}
|
|
4656
4680
|
];
|
|
4657
4681
|
return /* @__PURE__ */ jsxs36(Popover, { children: [
|
|
4658
|
-
/* @__PURE__ */
|
|
4659
|
-
/* @__PURE__ */
|
|
4682
|
+
/* @__PURE__ */ jsx57(PopoverTrigger, { asChild: true, children }),
|
|
4683
|
+
/* @__PURE__ */ jsx57(PopoverContent, { className: "p-0! flex flex-col", children: links.map((link) => /* @__PURE__ */ jsxs36(
|
|
4660
4684
|
Link2,
|
|
4661
4685
|
{
|
|
4662
4686
|
href: link?.href,
|
|
@@ -4664,7 +4688,7 @@ function ProfileMenu({ children, pathName }) {
|
|
|
4664
4688
|
className: `cursor-pointer w-full hover:bg-primary/10 hover:text-primary p-4 flex items-center gap-4 text-gray-500
|
|
4665
4689
|
${pathName.includes(link?.href) && "bg-primary/10 text-primary"}`,
|
|
4666
4690
|
children: [
|
|
4667
|
-
/* @__PURE__ */
|
|
4691
|
+
/* @__PURE__ */ jsx57(Icon2, { name: link?.icon, size: 20 }),
|
|
4668
4692
|
link?.title
|
|
4669
4693
|
]
|
|
4670
4694
|
},
|
|
@@ -4674,7 +4698,7 @@ function ProfileMenu({ children, pathName }) {
|
|
|
4674
4698
|
}
|
|
4675
4699
|
|
|
4676
4700
|
// components/form-controls/layout/left-nav.tsx
|
|
4677
|
-
import { Fragment as Fragment8, jsx as
|
|
4701
|
+
import { Fragment as Fragment8, jsx as jsx58, jsxs as jsxs37 } from "react/jsx-runtime";
|
|
4678
4702
|
var articles = [
|
|
4679
4703
|
{ key: "getting-started", title: "Getting Started", href: "#" },
|
|
4680
4704
|
{ key: "helpdesk", title: "Helpdesk", href: "#" }
|
|
@@ -4712,26 +4736,26 @@ function LeftNav({
|
|
|
4712
4736
|
useEffect5(() => {
|
|
4713
4737
|
localStorage.setItem("isExpanded", isExpanded.toString());
|
|
4714
4738
|
}, [isExpanded]);
|
|
4715
|
-
return /* @__PURE__ */
|
|
4739
|
+
return /* @__PURE__ */ jsx58(
|
|
4716
4740
|
"div",
|
|
4717
4741
|
{
|
|
4718
4742
|
style: { height: "calc(100vh - 32px)" },
|
|
4719
4743
|
className: `relative pt-4 ${isExpanded ? "min-w-72" : "min-w-16"} transition-width duration-300 rounded-lg text-gray-500 sticky top-4 bg-white`,
|
|
4720
|
-
children: /* @__PURE__ */
|
|
4744
|
+
children: /* @__PURE__ */ jsx58(TooltipProvider, { children: /* @__PURE__ */ jsxs37("div", { className: "absolute top-0 flex flex-col gap-8 justify-between h-full w-full duration-300 ease-in-out sc-card bg-white! p-3 overflow-y-scroll hide-scrollbar", children: [
|
|
4721
4745
|
/* @__PURE__ */ jsxs37(
|
|
4722
4746
|
"div",
|
|
4723
4747
|
{
|
|
4724
4748
|
className: `flex flex-col gap-1 ${!isExpanded && "items-center"}`,
|
|
4725
4749
|
children: [
|
|
4726
4750
|
/* @__PURE__ */ jsxs37("div", { className: "cursor-pointer flex items-center justify-between mb-4 w-full", children: [
|
|
4727
|
-
/* @__PURE__ */
|
|
4751
|
+
/* @__PURE__ */ jsx58(
|
|
4728
4752
|
"div",
|
|
4729
4753
|
{
|
|
4730
4754
|
onClick: () => isExpanded ? router.push("/") : setIsExpanded(true),
|
|
4731
|
-
children: isExpanded ? /* @__PURE__ */
|
|
4755
|
+
children: isExpanded ? /* @__PURE__ */ jsx58(ExpandedLogo, {}) : /* @__PURE__ */ jsx58(Logo, {})
|
|
4732
4756
|
}
|
|
4733
4757
|
),
|
|
4734
|
-
isExpanded && /* @__PURE__ */
|
|
4758
|
+
isExpanded && /* @__PURE__ */ jsx58("span", { onClick: () => setIsExpanded(false), children: /* @__PURE__ */ jsx58(Icon2, { name: "ChevronsLeftRight" }) })
|
|
4735
4759
|
] }),
|
|
4736
4760
|
items ? /* @__PURE__ */ jsxs37(Fragment8, { children: [
|
|
4737
4761
|
/* @__PURE__ */ jsxs37(
|
|
@@ -4740,12 +4764,12 @@ function LeftNav({
|
|
|
4740
4764
|
onClick: () => setItems(void 0),
|
|
4741
4765
|
className: "flex items-center px-1 gap-2 cursor-pointer mb-4 text-lg",
|
|
4742
4766
|
children: [
|
|
4743
|
-
/* @__PURE__ */
|
|
4744
|
-
isExpanded && /* @__PURE__ */
|
|
4767
|
+
/* @__PURE__ */ jsx58(Icon2, { name: "ArrowLeft", size: 19 }),
|
|
4768
|
+
isExpanded && /* @__PURE__ */ jsx58("span", { children: pageTitle })
|
|
4745
4769
|
]
|
|
4746
4770
|
}
|
|
4747
4771
|
),
|
|
4748
|
-
menuItems?.map((item) => /* @__PURE__ */
|
|
4772
|
+
menuItems?.map((item) => /* @__PURE__ */ jsx58(
|
|
4749
4773
|
Link3,
|
|
4750
4774
|
{
|
|
4751
4775
|
href: item.href,
|
|
@@ -4753,19 +4777,19 @@ function LeftNav({
|
|
|
4753
4777
|
${item.href && (item.href?.split("/").length > 2 ? pathName?.includes(item.href) ?? "" : pathName === item.href) && isExpanded ? "bg-primary/10 text-primary" : ""}
|
|
4754
4778
|
`,
|
|
4755
4779
|
children: isExpanded ? /* @__PURE__ */ jsxs37(Fragment8, { children: [
|
|
4756
|
-
/* @__PURE__ */
|
|
4757
|
-
/* @__PURE__ */
|
|
4780
|
+
/* @__PURE__ */ jsx58(Icon2, { name: item.icon, size: 19 }),
|
|
4781
|
+
/* @__PURE__ */ jsx58("span", { children: item.title })
|
|
4758
4782
|
] }) : /* @__PURE__ */ jsxs37(Tooltip, { delayDuration: 0, children: [
|
|
4759
|
-
/* @__PURE__ */
|
|
4760
|
-
/* @__PURE__ */
|
|
4783
|
+
/* @__PURE__ */ jsx58(TooltipTrigger, { children: /* @__PURE__ */ jsx58(Icon2, { name: item.icon }) }),
|
|
4784
|
+
/* @__PURE__ */ jsx58(TooltipContent, { side: "right", children: /* @__PURE__ */ jsx58("p", { children: item.title }) })
|
|
4761
4785
|
] })
|
|
4762
4786
|
},
|
|
4763
4787
|
item.title
|
|
4764
4788
|
))
|
|
4765
4789
|
] }) : isExpanded ? /* @__PURE__ */ jsxs37(Fragment8, { children: [
|
|
4766
4790
|
/* @__PURE__ */ jsxs37("div", { id: "menu-row", children: [
|
|
4767
|
-
/* @__PURE__ */
|
|
4768
|
-
/* @__PURE__ */
|
|
4791
|
+
/* @__PURE__ */ jsx58("h2", { className: "text-xl font-semibold", children: "Apps" }),
|
|
4792
|
+
/* @__PURE__ */ jsx58("div", { className: "grid grid-cols-2 gap-2 mt-6", children: apps.filter((item) => item.key !== "home").map((item) => /* @__PURE__ */ jsx58(
|
|
4769
4793
|
IconButton,
|
|
4770
4794
|
{
|
|
4771
4795
|
item,
|
|
@@ -4779,9 +4803,9 @@ function LeftNav({
|
|
|
4779
4803
|
)) })
|
|
4780
4804
|
] }),
|
|
4781
4805
|
/* @__PURE__ */ jsxs37("div", { id: "help-row", className: "mt-12 ml-2", children: [
|
|
4782
|
-
/* @__PURE__ */
|
|
4783
|
-
/* @__PURE__ */
|
|
4784
|
-
/* @__PURE__ */
|
|
4806
|
+
/* @__PURE__ */ jsx58("h2", { className: "text-xl font-semibold", children: "Help" }),
|
|
4807
|
+
/* @__PURE__ */ jsx58("div", { className: "mt-6", children: /* @__PURE__ */ jsx58(Input, { placeholder: "Search help content" }) }),
|
|
4808
|
+
/* @__PURE__ */ jsx58("ul", { className: "mt-6 ml-4 list-disc", children: articles.map((item) => /* @__PURE__ */ jsx58("li", { children: /* @__PURE__ */ jsx58(
|
|
4785
4809
|
Link3,
|
|
4786
4810
|
{
|
|
4787
4811
|
href: item.href,
|
|
@@ -4791,24 +4815,24 @@ function LeftNav({
|
|
|
4791
4815
|
}
|
|
4792
4816
|
) }, item.key)) })
|
|
4793
4817
|
] })
|
|
4794
|
-
] }) : /* @__PURE__ */
|
|
4795
|
-
/* @__PURE__ */
|
|
4818
|
+
] }) : /* @__PURE__ */ jsx58("div", { className: "flex flex-col gap-6 mt-2", children: apps?.map((item) => /* @__PURE__ */ jsxs37(Tooltip, { delayDuration: 0, children: [
|
|
4819
|
+
/* @__PURE__ */ jsx58(TooltipTrigger, { children: /* @__PURE__ */ jsx58(
|
|
4796
4820
|
"div",
|
|
4797
4821
|
{
|
|
4798
4822
|
onClick: () => {
|
|
4799
4823
|
router.push(item.href);
|
|
4800
4824
|
setItems(menuItems);
|
|
4801
4825
|
},
|
|
4802
|
-
children: /* @__PURE__ */
|
|
4826
|
+
children: /* @__PURE__ */ jsx58(Icon2, { name: item.icon })
|
|
4803
4827
|
}
|
|
4804
4828
|
) }),
|
|
4805
|
-
/* @__PURE__ */
|
|
4829
|
+
/* @__PURE__ */ jsx58(TooltipContent, { side: "right", children: /* @__PURE__ */ jsx58("p", { children: item.title }) })
|
|
4806
4830
|
] }, item.key)) })
|
|
4807
4831
|
]
|
|
4808
4832
|
}
|
|
4809
4833
|
),
|
|
4810
4834
|
/* @__PURE__ */ jsxs37("div", { children: [
|
|
4811
|
-
isExpanded && /* @__PURE__ */
|
|
4835
|
+
isExpanded && /* @__PURE__ */ jsx58("div", { className: "mb-2", children: /* @__PURE__ */ jsx58(OrgSelector, {}) }),
|
|
4812
4836
|
/* @__PURE__ */ jsxs37(
|
|
4813
4837
|
Link3,
|
|
4814
4838
|
{
|
|
@@ -4817,8 +4841,8 @@ function LeftNav({
|
|
|
4817
4841
|
${pathName?.includes("/settings") && isExpanded ? "bg-primary/10 text-primary" : ""}
|
|
4818
4842
|
`,
|
|
4819
4843
|
children: [
|
|
4820
|
-
/* @__PURE__ */
|
|
4821
|
-
isExpanded && /* @__PURE__ */
|
|
4844
|
+
/* @__PURE__ */ jsx58(Icon2, { name: "Settings" }),
|
|
4845
|
+
isExpanded && /* @__PURE__ */ jsx58("span", { children: "Settings" })
|
|
4822
4846
|
]
|
|
4823
4847
|
}
|
|
4824
4848
|
),
|
|
@@ -4830,18 +4854,18 @@ function LeftNav({
|
|
|
4830
4854
|
${pathName?.includes("/help") && isExpanded ? "bg-primary/10 text-primary" : ""}
|
|
4831
4855
|
`,
|
|
4832
4856
|
children: [
|
|
4833
|
-
/* @__PURE__ */
|
|
4834
|
-
isExpanded && /* @__PURE__ */
|
|
4857
|
+
/* @__PURE__ */ jsx58(Icon2, { name: "HeartHandshake" }),
|
|
4858
|
+
isExpanded && /* @__PURE__ */ jsx58("span", { children: "Help" })
|
|
4835
4859
|
]
|
|
4836
4860
|
}
|
|
4837
4861
|
),
|
|
4838
|
-
/* @__PURE__ */
|
|
4862
|
+
/* @__PURE__ */ jsx58(ProfileMenu, { pathName: pathName ?? "", children: /* @__PURE__ */ jsxs37(
|
|
4839
4863
|
"div",
|
|
4840
4864
|
{
|
|
4841
4865
|
className: `flex items-center gap-4 cursor-pointer w-full rounded-lg py-2 ${isExpanded ? "pl-2 hover:bg-primary/10 hover:text-primary" : "pl-0"}`,
|
|
4842
4866
|
children: [
|
|
4843
|
-
/* @__PURE__ */
|
|
4844
|
-
isExpanded && /* @__PURE__ */
|
|
4867
|
+
/* @__PURE__ */ jsx58(Icon2, { name: "User" }),
|
|
4868
|
+
isExpanded && /* @__PURE__ */ jsx58("span", { children: user?.firstName })
|
|
4845
4869
|
]
|
|
4846
4870
|
}
|
|
4847
4871
|
) })
|
|
@@ -4854,7 +4878,7 @@ function LeftNav({
|
|
|
4854
4878
|
// components/form-controls/multi-select.tsx
|
|
4855
4879
|
import { Check as Check2, X as X2 } from "lucide-react";
|
|
4856
4880
|
import { useState as useState8 } from "react";
|
|
4857
|
-
import { jsx as
|
|
4881
|
+
import { jsx as jsx59, jsxs as jsxs38 } from "react/jsx-runtime";
|
|
4858
4882
|
var MultiSelect = ({
|
|
4859
4883
|
defaultValue = [],
|
|
4860
4884
|
placeholder,
|
|
@@ -4881,7 +4905,7 @@ var MultiSelect = ({
|
|
|
4881
4905
|
onValueChange(updatedValues);
|
|
4882
4906
|
};
|
|
4883
4907
|
return /* @__PURE__ */ jsxs38(Popover, { open, onOpenChange: setOpen, children: [
|
|
4884
|
-
/* @__PURE__ */
|
|
4908
|
+
/* @__PURE__ */ jsx59(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsx59(
|
|
4885
4909
|
Button,
|
|
4886
4910
|
{
|
|
4887
4911
|
variant: "outline",
|
|
@@ -4898,7 +4922,7 @@ var MultiSelect = ({
|
|
|
4898
4922
|
onClick: (e) => handleClear(value, e),
|
|
4899
4923
|
children: [
|
|
4900
4924
|
options.find((opt) => opt.value === value)?.label,
|
|
4901
|
-
/* @__PURE__ */
|
|
4925
|
+
/* @__PURE__ */ jsx59(X2, { className: "ml-1 h-3 w-3" })
|
|
4902
4926
|
]
|
|
4903
4927
|
},
|
|
4904
4928
|
value
|
|
@@ -4906,12 +4930,12 @@ var MultiSelect = ({
|
|
|
4906
4930
|
] })
|
|
4907
4931
|
}
|
|
4908
4932
|
) }),
|
|
4909
|
-
/* @__PURE__ */
|
|
4933
|
+
/* @__PURE__ */ jsx59(PopoverContent, { className: "p-0", children: /* @__PURE__ */ jsx59(Command, { children: /* @__PURE__ */ jsx59(CommandGroup, { children: options.map((option) => /* @__PURE__ */ jsxs38(
|
|
4910
4934
|
CommandItem,
|
|
4911
4935
|
{
|
|
4912
4936
|
onSelect: () => handleSelect(option.value),
|
|
4913
4937
|
children: [
|
|
4914
|
-
/* @__PURE__ */
|
|
4938
|
+
/* @__PURE__ */ jsx59(
|
|
4915
4939
|
Check2,
|
|
4916
4940
|
{
|
|
4917
4941
|
className: cn(
|
|
@@ -4931,7 +4955,7 @@ var MultiSelect = ({
|
|
|
4931
4955
|
// components/form-controls/multi-step-process.tsx
|
|
4932
4956
|
import { Check as Check3, Loader2 as Loader23 } from "lucide-react";
|
|
4933
4957
|
import { useEffect as useEffect6, useState as useState9 } from "react";
|
|
4934
|
-
import { jsx as
|
|
4958
|
+
import { jsx as jsx60, jsxs as jsxs39 } from "react/jsx-runtime";
|
|
4935
4959
|
var MultiStepProcess = ({
|
|
4936
4960
|
initialSteps,
|
|
4937
4961
|
onFinish,
|
|
@@ -4980,7 +5004,7 @@ var MultiStepProcess = ({
|
|
|
4980
5004
|
};
|
|
4981
5005
|
const renderStepComponent = (step, index) => {
|
|
4982
5006
|
const StepComponent = step.component;
|
|
4983
|
-
return /* @__PURE__ */
|
|
5007
|
+
return /* @__PURE__ */ jsx60(
|
|
4984
5008
|
StepComponent,
|
|
4985
5009
|
{
|
|
4986
5010
|
step,
|
|
@@ -4991,22 +5015,22 @@ var MultiStepProcess = ({
|
|
|
4991
5015
|
const isLastStep = currentStepIndex === steps.length - 1;
|
|
4992
5016
|
const currentStepData = steps[currentStepIndex];
|
|
4993
5017
|
return /* @__PURE__ */ jsxs39(Card, { className: "p-6", children: [
|
|
4994
|
-
/* @__PURE__ */
|
|
4995
|
-
/* @__PURE__ */
|
|
5018
|
+
/* @__PURE__ */ jsx60("div", { className: "mb-8", children: /* @__PURE__ */ jsx60("div", { className: "flex justify-between items-start", children: steps.map((step, i) => /* @__PURE__ */ jsxs39("div", { className: "flex flex-col items-center", children: [
|
|
5019
|
+
/* @__PURE__ */ jsx60(
|
|
4996
5020
|
"div",
|
|
4997
5021
|
{
|
|
4998
5022
|
className: `
|
|
4999
5023
|
w-10 h-10 rounded-full flex items-center justify-center mb-2
|
|
5000
5024
|
${i < currentStepIndex ? "bg-green-500 text-white" : i === currentStepIndex ? "bg-blue-500 text-white" : "bg-gray-200 text-gray-500"}
|
|
5001
5025
|
`,
|
|
5002
|
-
children: i < currentStepIndex ? /* @__PURE__ */
|
|
5026
|
+
children: i < currentStepIndex ? /* @__PURE__ */ jsx60(Check3, { className: "w-6 h-6" }) : /* @__PURE__ */ jsx60("span", { children: step.id })
|
|
5003
5027
|
}
|
|
5004
5028
|
),
|
|
5005
|
-
/* @__PURE__ */
|
|
5029
|
+
/* @__PURE__ */ jsx60("span", { className: "text-sm text-center max-w-[100px]", children: step.title })
|
|
5006
5030
|
] }, i)) }) }),
|
|
5007
|
-
/* @__PURE__ */
|
|
5031
|
+
/* @__PURE__ */ jsx60("div", { className: "mb-3", children: renderStepComponent(currentStepData, currentStepIndex) }),
|
|
5008
5032
|
/* @__PURE__ */ jsxs39("div", { className: "flex justify-between", children: [
|
|
5009
|
-
/* @__PURE__ */
|
|
5033
|
+
/* @__PURE__ */ jsx60(
|
|
5010
5034
|
Button,
|
|
5011
5035
|
{
|
|
5012
5036
|
onClick: goToPreviousStep,
|
|
@@ -5015,12 +5039,12 @@ var MultiStepProcess = ({
|
|
|
5015
5039
|
children: "Previous"
|
|
5016
5040
|
}
|
|
5017
5041
|
),
|
|
5018
|
-
/* @__PURE__ */
|
|
5042
|
+
/* @__PURE__ */ jsx60(
|
|
5019
5043
|
Button,
|
|
5020
5044
|
{
|
|
5021
5045
|
onClick: goToNextStep,
|
|
5022
5046
|
disabled: !currentStepData.isValid || currentStepData.isLoading,
|
|
5023
|
-
children: currentStepData.isLoading ? /* @__PURE__ */
|
|
5047
|
+
children: currentStepData.isLoading ? /* @__PURE__ */ jsx60(Loader23, { className: "h-6 w-6 animate-spin" }) : isLastStep ? finishButtonText ?? "Finish" : "Next"
|
|
5024
5048
|
}
|
|
5025
5049
|
)
|
|
5026
5050
|
] })
|
|
@@ -5028,7 +5052,7 @@ var MultiStepProcess = ({
|
|
|
5028
5052
|
};
|
|
5029
5053
|
|
|
5030
5054
|
// components/form-controls/popover.tsx
|
|
5031
|
-
import { jsx as
|
|
5055
|
+
import { jsx as jsx61, jsxs as jsxs40 } from "react/jsx-runtime";
|
|
5032
5056
|
var Popover2 = ({
|
|
5033
5057
|
trigger,
|
|
5034
5058
|
children,
|
|
@@ -5037,8 +5061,8 @@ var Popover2 = ({
|
|
|
5037
5061
|
sideOffset = 4
|
|
5038
5062
|
}) => {
|
|
5039
5063
|
return /* @__PURE__ */ jsxs40(Popover, { children: [
|
|
5040
|
-
/* @__PURE__ */
|
|
5041
|
-
/* @__PURE__ */
|
|
5064
|
+
/* @__PURE__ */ jsx61(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsx61("div", { className, children: trigger }) }),
|
|
5065
|
+
/* @__PURE__ */ jsx61(
|
|
5042
5066
|
PopoverContent,
|
|
5043
5067
|
{
|
|
5044
5068
|
align,
|
|
@@ -5052,34 +5076,34 @@ var Popover2 = ({
|
|
|
5052
5076
|
|
|
5053
5077
|
// components/form-controls/radio-group.tsx
|
|
5054
5078
|
import * as React31 from "react";
|
|
5055
|
-
import { jsx as
|
|
5079
|
+
import { jsx as jsx62, jsxs as jsxs41 } from "react/jsx-runtime";
|
|
5056
5080
|
var RadioGroup3 = React31.forwardRef(({ className, options, defaultValue, title, name, control, isFormField, ...props }, ref) => {
|
|
5057
5081
|
if (!isFormField) {
|
|
5058
|
-
return /* @__PURE__ */
|
|
5059
|
-
/* @__PURE__ */
|
|
5060
|
-
/* @__PURE__ */
|
|
5082
|
+
return /* @__PURE__ */ jsx62(RadioGroup2, { defaultValue, ...props, ref, children: options?.map((option) => /* @__PURE__ */ jsxs41("div", { className: "flex items-center space-x-2 cursor-pointer", children: [
|
|
5083
|
+
/* @__PURE__ */ jsx62(RadioGroupItem, { value: option.value, id: option.value }),
|
|
5084
|
+
/* @__PURE__ */ jsx62("label", { htmlFor: option.value, children: option.label })
|
|
5061
5085
|
] }, option.value)) });
|
|
5062
5086
|
}
|
|
5063
|
-
return /* @__PURE__ */
|
|
5087
|
+
return /* @__PURE__ */ jsx62(
|
|
5064
5088
|
FormField,
|
|
5065
5089
|
{
|
|
5066
5090
|
control,
|
|
5067
5091
|
name,
|
|
5068
5092
|
render: ({ field }) => /* @__PURE__ */ jsxs41(FormItem, { children: [
|
|
5069
|
-
title && /* @__PURE__ */
|
|
5070
|
-
/* @__PURE__ */
|
|
5093
|
+
title && /* @__PURE__ */ jsx62(FormLabel, { children: title }),
|
|
5094
|
+
/* @__PURE__ */ jsx62(FormControl, { children: /* @__PURE__ */ jsx62(
|
|
5071
5095
|
RadioGroup2,
|
|
5072
5096
|
{
|
|
5073
5097
|
onValueChange: field.onChange,
|
|
5074
5098
|
defaultValue: field.value,
|
|
5075
5099
|
...props,
|
|
5076
5100
|
children: options?.map((option) => /* @__PURE__ */ jsxs41("div", { className: "flex items-center space-x-2 cursor-pointer", children: [
|
|
5077
|
-
/* @__PURE__ */
|
|
5078
|
-
/* @__PURE__ */
|
|
5101
|
+
/* @__PURE__ */ jsx62(RadioGroupItem, { value: option.value, id: option.value }),
|
|
5102
|
+
/* @__PURE__ */ jsx62("label", { htmlFor: option.value, children: option.label })
|
|
5079
5103
|
] }, option.value))
|
|
5080
5104
|
}
|
|
5081
5105
|
) }),
|
|
5082
|
-
/* @__PURE__ */
|
|
5106
|
+
/* @__PURE__ */ jsx62(FormMessage, {})
|
|
5083
5107
|
] })
|
|
5084
5108
|
}
|
|
5085
5109
|
);
|
|
@@ -5095,7 +5119,7 @@ import {
|
|
|
5095
5119
|
ScrollAreaThumb as ShadcnScrollAreaThumb,
|
|
5096
5120
|
ScrollAreaCorner as ShadcnScrollAreaCorner
|
|
5097
5121
|
} from "@radix-ui/react-scroll-area";
|
|
5098
|
-
import { jsx as
|
|
5122
|
+
import { jsx as jsx63, jsxs as jsxs42 } from "react/jsx-runtime";
|
|
5099
5123
|
var ScrollArea2 = React32.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs42(
|
|
5100
5124
|
ShadcnScrollArea,
|
|
5101
5125
|
{
|
|
@@ -5103,14 +5127,14 @@ var ScrollArea2 = React32.forwardRef(({ className, children, ...props }, ref) =>
|
|
|
5103
5127
|
className: cn("relative overflow-hidden", className),
|
|
5104
5128
|
...props,
|
|
5105
5129
|
children: [
|
|
5106
|
-
/* @__PURE__ */
|
|
5107
|
-
/* @__PURE__ */
|
|
5108
|
-
/* @__PURE__ */
|
|
5130
|
+
/* @__PURE__ */ jsx63(ShadcnScrollAreaViewport, { className: "h-full w-full rounded-[inherit]", children }),
|
|
5131
|
+
/* @__PURE__ */ jsx63(ScrollBar2, {}),
|
|
5132
|
+
/* @__PURE__ */ jsx63(ShadcnScrollAreaCorner, {})
|
|
5109
5133
|
]
|
|
5110
5134
|
}
|
|
5111
5135
|
));
|
|
5112
5136
|
ScrollArea2.displayName = ShadcnScrollArea.displayName;
|
|
5113
|
-
var ScrollBar2 = React32.forwardRef(({ className, orientation = "vertical", ...props }, ref) => /* @__PURE__ */
|
|
5137
|
+
var ScrollBar2 = React32.forwardRef(({ className, orientation = "vertical", ...props }, ref) => /* @__PURE__ */ jsx63(
|
|
5114
5138
|
ShadcnScrollAreaScrollbar,
|
|
5115
5139
|
{
|
|
5116
5140
|
ref,
|
|
@@ -5122,13 +5146,13 @@ var ScrollBar2 = React32.forwardRef(({ className, orientation = "vertical", ...p
|
|
|
5122
5146
|
className
|
|
5123
5147
|
),
|
|
5124
5148
|
...props,
|
|
5125
|
-
children: /* @__PURE__ */
|
|
5149
|
+
children: /* @__PURE__ */ jsx63(ShadcnScrollAreaThumb, { className: "relative flex-1 rounded-full bg-border" })
|
|
5126
5150
|
}
|
|
5127
5151
|
));
|
|
5128
5152
|
ScrollBar2.displayName = ShadcnScrollAreaScrollbar.displayName;
|
|
5129
5153
|
|
|
5130
5154
|
// components/form-controls/select.tsx
|
|
5131
|
-
import { jsx as
|
|
5155
|
+
import { jsx as jsx64, jsxs as jsxs43 } from "react/jsx-runtime";
|
|
5132
5156
|
var Select2 = ({
|
|
5133
5157
|
defaultValue,
|
|
5134
5158
|
placeholder,
|
|
@@ -5137,8 +5161,8 @@ var Select2 = ({
|
|
|
5137
5161
|
onValueChange
|
|
5138
5162
|
}) => {
|
|
5139
5163
|
return /* @__PURE__ */ jsxs43(Select, { value: defaultValue, onValueChange, children: [
|
|
5140
|
-
/* @__PURE__ */
|
|
5141
|
-
/* @__PURE__ */
|
|
5164
|
+
/* @__PURE__ */ jsx64(SelectTrigger, { className, children: /* @__PURE__ */ jsx64(SelectValue, { placeholder }) }),
|
|
5165
|
+
/* @__PURE__ */ jsx64(SelectContent, { children: options?.map((option, i) => /* @__PURE__ */ jsx64(SelectItem, { value: option.value, children: option.label }, i)) })
|
|
5142
5166
|
] });
|
|
5143
5167
|
};
|
|
5144
5168
|
|
|
@@ -5150,8 +5174,8 @@ var CollapsibleContent2 = CollapsiblePrimitive.CollapsibleContent;
|
|
|
5150
5174
|
// components/ui/progress.tsx
|
|
5151
5175
|
import * as React33 from "react";
|
|
5152
5176
|
import * as ProgressPrimitive from "@radix-ui/react-progress";
|
|
5153
|
-
import { jsx as
|
|
5154
|
-
var Progress = React33.forwardRef(({ className, value, ...props }, ref) => /* @__PURE__ */
|
|
5177
|
+
import { jsx as jsx65 } from "react/jsx-runtime";
|
|
5178
|
+
var Progress = React33.forwardRef(({ className, value, ...props }, ref) => /* @__PURE__ */ jsx65(
|
|
5155
5179
|
ProgressPrimitive.Root,
|
|
5156
5180
|
{
|
|
5157
5181
|
ref,
|
|
@@ -5160,7 +5184,7 @@ var Progress = React33.forwardRef(({ className, value, ...props }, ref) => /* @_
|
|
|
5160
5184
|
className
|
|
5161
5185
|
),
|
|
5162
5186
|
...props,
|
|
5163
|
-
children: /* @__PURE__ */
|
|
5187
|
+
children: /* @__PURE__ */ jsx65(
|
|
5164
5188
|
ProgressPrimitive.Indicator,
|
|
5165
5189
|
{
|
|
5166
5190
|
className: "h-full w-full flex-1 bg-primary transition-all",
|
|
@@ -5174,7 +5198,7 @@ Progress.displayName = ProgressPrimitive.Root.displayName;
|
|
|
5174
5198
|
// components/form-controls/setup-guide.tsx
|
|
5175
5199
|
import { Check as Check4 } from "lucide-react";
|
|
5176
5200
|
import { useId as useId3, useState as useState10 } from "react";
|
|
5177
|
-
import { jsx as
|
|
5201
|
+
import { jsx as jsx66, jsxs as jsxs44 } from "react/jsx-runtime";
|
|
5178
5202
|
var SetupGuide = ({
|
|
5179
5203
|
onDismiss,
|
|
5180
5204
|
onStepComplete,
|
|
@@ -5187,12 +5211,12 @@ var SetupGuide = ({
|
|
|
5187
5211
|
const accessId = useId3();
|
|
5188
5212
|
const completedItemsLength = items.filter((item) => item.complete).length;
|
|
5189
5213
|
return /* @__PURE__ */ jsxs44("div", { className: "p-0", children: [
|
|
5190
|
-
/* @__PURE__ */
|
|
5214
|
+
/* @__PURE__ */ jsx66("div", { className: "px-4 pb-4", children: /* @__PURE__ */ jsx66("div", { className: "space-y-4", children: /* @__PURE__ */ jsx66("div", { className: "mt-2", children: /* @__PURE__ */ jsxs44("div", { className: "flex items-center gap-2", children: [
|
|
5191
5215
|
completedItemsLength === items.length ? /* @__PURE__ */ jsxs44("div", { className: "flex items-center gap-1", children: [
|
|
5192
|
-
/* @__PURE__ */
|
|
5193
|
-
/* @__PURE__ */
|
|
5194
|
-
] }) : /* @__PURE__ */
|
|
5195
|
-
completedItemsLength !== items.length && /* @__PURE__ */
|
|
5216
|
+
/* @__PURE__ */ jsx66(Check4, { className: "h-4 w-4 text-gray-400" }),
|
|
5217
|
+
/* @__PURE__ */ jsx66("span", { className: "text-sm text-gray-400", children: "Done" })
|
|
5218
|
+
] }) : /* @__PURE__ */ jsx66("span", { className: "text-sm", children: `${completedItemsLength} / ${items.length} completed` }),
|
|
5219
|
+
completedItemsLength !== items.length && /* @__PURE__ */ jsx66("div", { className: "w-24", children: /* @__PURE__ */ jsx66(
|
|
5196
5220
|
Progress,
|
|
5197
5221
|
{
|
|
5198
5222
|
value: completedItemsLength / items.length * 100,
|
|
@@ -5200,7 +5224,7 @@ var SetupGuide = ({
|
|
|
5200
5224
|
}
|
|
5201
5225
|
) })
|
|
5202
5226
|
] }) }) }) }),
|
|
5203
|
-
/* @__PURE__ */
|
|
5227
|
+
/* @__PURE__ */ jsx66(Collapsible, { open: isGuideOpen, id: accessId, children: /* @__PURE__ */ jsx66(CollapsibleContent2, { className: "p-2", children: /* @__PURE__ */ jsx66("div", { className: "space-y-1", children: items.map((item) => /* @__PURE__ */ jsx66(
|
|
5204
5228
|
SetupItem,
|
|
5205
5229
|
{
|
|
5206
5230
|
expanded: expanded === item.id,
|
|
@@ -5210,7 +5234,7 @@ var SetupGuide = ({
|
|
|
5210
5234
|
},
|
|
5211
5235
|
item.id
|
|
5212
5236
|
)) }) }) }),
|
|
5213
|
-
completedItemsLength === items.length && /* @__PURE__ */
|
|
5237
|
+
completedItemsLength === items.length && /* @__PURE__ */ jsx66("div", { className: "border-t border-gray-200 bg-gray-50 p-3", children: /* @__PURE__ */ jsx66("div", { className: "flex justify-end", children: /* @__PURE__ */ jsx66(Button, { onClick: onDismiss, children: "Dismiss Guide" }) }) })
|
|
5214
5238
|
] });
|
|
5215
5239
|
};
|
|
5216
5240
|
var SetupItem = ({
|
|
@@ -5231,38 +5255,38 @@ var SetupItem = ({
|
|
|
5231
5255
|
await onComplete(id);
|
|
5232
5256
|
setLoading(false);
|
|
5233
5257
|
};
|
|
5234
|
-
return /* @__PURE__ */
|
|
5235
|
-
/* @__PURE__ */
|
|
5236
|
-
/* @__PURE__ */
|
|
5258
|
+
return /* @__PURE__ */ jsx66("div", { className: `rounded ${expanded ? "bg-gray-100" : ""}`, children: /* @__PURE__ */ jsx66("div", { className: `p-2 ${expanded ? "" : "hover:bg-gray-50"}`, children: /* @__PURE__ */ jsxs44("div", { className: "flex gap-2 items-start", children: [
|
|
5259
|
+
/* @__PURE__ */ jsx66(TooltipProvider, { children: /* @__PURE__ */ jsxs44(Tooltip, { children: [
|
|
5260
|
+
/* @__PURE__ */ jsx66(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx66(
|
|
5237
5261
|
Button,
|
|
5238
5262
|
{
|
|
5239
5263
|
variant: "ghost",
|
|
5240
5264
|
size: "icon",
|
|
5241
5265
|
className: "mt-0.5",
|
|
5242
5266
|
onClick: completeItem,
|
|
5243
|
-
children: loading ? /* @__PURE__ */
|
|
5267
|
+
children: loading ? /* @__PURE__ */ jsx66("div", { className: "h-5 w-5 animate-spin rounded-full border-2 border-gray-300 border-t-gray-600" }) : complete ? /* @__PURE__ */ jsx66("div", { className: "h-5 w-5 rounded-full bg-gray-900 flex items-center justify-center", children: /* @__PURE__ */ jsx66(Check4, { className: "h-3 w-3 text-white" }) }) : /* @__PURE__ */ jsx66("div", { className: "h-5 w-5 rounded-full border-2 border-gray-300" })
|
|
5244
5268
|
}
|
|
5245
5269
|
) }),
|
|
5246
|
-
/* @__PURE__ */
|
|
5270
|
+
/* @__PURE__ */ jsx66(TooltipContent, { children: complete ? "Mark as not done" : "Mark as done" })
|
|
5247
5271
|
] }) }),
|
|
5248
|
-
/* @__PURE__ */
|
|
5272
|
+
/* @__PURE__ */ jsx66(
|
|
5249
5273
|
"div",
|
|
5250
5274
|
{
|
|
5251
5275
|
className: `grow ${expanded ? "" : "cursor-pointer"}`,
|
|
5252
5276
|
onClick: expanded ? void 0 : setExpanded,
|
|
5253
5277
|
children: /* @__PURE__ */ jsxs44("div", { className: "space-y-3", id: id.toString(), children: [
|
|
5254
|
-
/* @__PURE__ */
|
|
5255
|
-
/* @__PURE__ */
|
|
5256
|
-
/* @__PURE__ */
|
|
5278
|
+
/* @__PURE__ */ jsx66("h4", { className: expanded ? "text-sm font-semibold" : "text-sm", children: title }),
|
|
5279
|
+
/* @__PURE__ */ jsx66(Collapsible, { open: expanded, children: /* @__PURE__ */ jsx66(CollapsibleContent2, { className: "pb-2 pr-2", children: /* @__PURE__ */ jsxs44("div", { className: "space-y-4", children: [
|
|
5280
|
+
/* @__PURE__ */ jsx66("p", { className: "text-sm text-gray-600", children: description }),
|
|
5257
5281
|
(primaryButton || secondaryButton) && /* @__PURE__ */ jsxs44("div", { className: "space-x-3", children: [
|
|
5258
|
-
primaryButton && /* @__PURE__ */
|
|
5259
|
-
secondaryButton && /* @__PURE__ */
|
|
5282
|
+
primaryButton && /* @__PURE__ */ jsx66(Button, { ...primaryButton.props, children: primaryButton.content }),
|
|
5283
|
+
secondaryButton && /* @__PURE__ */ jsx66(Button, { variant: "outline", ...secondaryButton.props, children: secondaryButton.content })
|
|
5260
5284
|
] })
|
|
5261
5285
|
] }) }) })
|
|
5262
5286
|
] })
|
|
5263
5287
|
}
|
|
5264
5288
|
),
|
|
5265
|
-
image && expanded && /* @__PURE__ */
|
|
5289
|
+
image && expanded && /* @__PURE__ */ jsx66(
|
|
5266
5290
|
"img",
|
|
5267
5291
|
{
|
|
5268
5292
|
src: image.url,
|
|
@@ -5274,7 +5298,7 @@ var SetupItem = ({
|
|
|
5274
5298
|
};
|
|
5275
5299
|
|
|
5276
5300
|
// components/form-controls/sheet.tsx
|
|
5277
|
-
import { jsx as
|
|
5301
|
+
import { jsx as jsx67, jsxs as jsxs45 } from "react/jsx-runtime";
|
|
5278
5302
|
var Sheet2 = ({
|
|
5279
5303
|
title,
|
|
5280
5304
|
trigger,
|
|
@@ -5283,10 +5307,10 @@ var Sheet2 = ({
|
|
|
5283
5307
|
...props
|
|
5284
5308
|
}) => {
|
|
5285
5309
|
return /* @__PURE__ */ jsxs45(Sheet, { ...props, children: [
|
|
5286
|
-
trigger && /* @__PURE__ */
|
|
5287
|
-
/* @__PURE__ */
|
|
5288
|
-
/* @__PURE__ */
|
|
5289
|
-
/* @__PURE__ */
|
|
5310
|
+
trigger && /* @__PURE__ */ jsx67(SheetTrigger, { children: trigger }),
|
|
5311
|
+
/* @__PURE__ */ jsx67(SheetContent, { children: /* @__PURE__ */ jsxs45(SheetHeader, { children: [
|
|
5312
|
+
/* @__PURE__ */ jsx67(SheetTitle, { children: title }),
|
|
5313
|
+
/* @__PURE__ */ jsx67(SheetDescription, { children: description }),
|
|
5290
5314
|
children
|
|
5291
5315
|
] }) })
|
|
5292
5316
|
] });
|
|
@@ -5295,7 +5319,7 @@ var Sheet2 = ({
|
|
|
5295
5319
|
// components/form-controls/tags-input.tsx
|
|
5296
5320
|
import { X as X3 } from "lucide-react";
|
|
5297
5321
|
import * as React35 from "react";
|
|
5298
|
-
import { jsx as
|
|
5322
|
+
import { jsx as jsx68, jsxs as jsxs46 } from "react/jsx-runtime";
|
|
5299
5323
|
var TagsInput = React35.forwardRef(
|
|
5300
5324
|
({ variant = "default", className, value, onChange, ...props }, ref) => {
|
|
5301
5325
|
const [inputValue, setInputValue] = React35.useState("");
|
|
@@ -5321,7 +5345,7 @@ var TagsInput = React35.forwardRef(
|
|
|
5321
5345
|
className: "bg-gray-200 px-2 py-1 rounded flex items-center",
|
|
5322
5346
|
children: [
|
|
5323
5347
|
tag,
|
|
5324
|
-
/* @__PURE__ */
|
|
5348
|
+
/* @__PURE__ */ jsx68(
|
|
5325
5349
|
X3,
|
|
5326
5350
|
{
|
|
5327
5351
|
className: "ml-1 w-4 h-4 cursor-pointer",
|
|
@@ -5332,7 +5356,7 @@ var TagsInput = React35.forwardRef(
|
|
|
5332
5356
|
},
|
|
5333
5357
|
index
|
|
5334
5358
|
)),
|
|
5335
|
-
/* @__PURE__ */
|
|
5359
|
+
/* @__PURE__ */ jsx68(
|
|
5336
5360
|
"input",
|
|
5337
5361
|
{
|
|
5338
5362
|
className: "grow border-none focus:ring-0",
|
|
@@ -5350,7 +5374,7 @@ TagsInput.displayName = "TagsInput";
|
|
|
5350
5374
|
|
|
5351
5375
|
// components/form-controls/textarea.tsx
|
|
5352
5376
|
import * as React36 from "react";
|
|
5353
|
-
import { jsx as
|
|
5377
|
+
import { jsx as jsx69, jsxs as jsxs47 } from "react/jsx-runtime";
|
|
5354
5378
|
var Textarea2 = React36.forwardRef(
|
|
5355
5379
|
({
|
|
5356
5380
|
variant = "default",
|
|
@@ -5362,15 +5386,15 @@ var Textarea2 = React36.forwardRef(
|
|
|
5362
5386
|
rules,
|
|
5363
5387
|
...props
|
|
5364
5388
|
}, ref) => {
|
|
5365
|
-
return isFormField ? /* @__PURE__ */
|
|
5389
|
+
return isFormField ? /* @__PURE__ */ jsx69(
|
|
5366
5390
|
FormField,
|
|
5367
5391
|
{
|
|
5368
5392
|
control,
|
|
5369
5393
|
name,
|
|
5370
5394
|
rules,
|
|
5371
5395
|
render: ({ field }) => /* @__PURE__ */ jsxs47(FormItem, { children: [
|
|
5372
|
-
title && /* @__PURE__ */
|
|
5373
|
-
/* @__PURE__ */
|
|
5396
|
+
title && /* @__PURE__ */ jsx69(FormLabel, { children: title }),
|
|
5397
|
+
/* @__PURE__ */ jsx69(FormControl, { children: /* @__PURE__ */ jsx69(
|
|
5374
5398
|
Textarea,
|
|
5375
5399
|
{
|
|
5376
5400
|
className: `${className} resize-none`,
|
|
@@ -5378,10 +5402,10 @@ var Textarea2 = React36.forwardRef(
|
|
|
5378
5402
|
...props
|
|
5379
5403
|
}
|
|
5380
5404
|
) }),
|
|
5381
|
-
/* @__PURE__ */
|
|
5405
|
+
/* @__PURE__ */ jsx69(FormMessage, {})
|
|
5382
5406
|
] })
|
|
5383
5407
|
}
|
|
5384
|
-
) : /* @__PURE__ */
|
|
5408
|
+
) : /* @__PURE__ */ jsx69(
|
|
5385
5409
|
Textarea,
|
|
5386
5410
|
{
|
|
5387
5411
|
className: `${className} resize-none`,
|
|
@@ -5396,7 +5420,7 @@ Textarea2.displayName = "Textarea";
|
|
|
5396
5420
|
// components/form-controls/time-picker.tsx
|
|
5397
5421
|
import { Clock } from "lucide-react";
|
|
5398
5422
|
import { useState as useState12 } from "react";
|
|
5399
|
-
import { jsx as
|
|
5423
|
+
import { jsx as jsx70, jsxs as jsxs48 } from "react/jsx-runtime";
|
|
5400
5424
|
var TimePicker = ({
|
|
5401
5425
|
value,
|
|
5402
5426
|
onValueChange,
|
|
@@ -5421,20 +5445,20 @@ var TimePicker = ({
|
|
|
5421
5445
|
onValueChange(`${hour}:${newMinute}`);
|
|
5422
5446
|
};
|
|
5423
5447
|
return /* @__PURE__ */ jsxs48(Popover, { open, onOpenChange: setOpen, children: [
|
|
5424
|
-
/* @__PURE__ */
|
|
5448
|
+
/* @__PURE__ */ jsx70(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxs48(
|
|
5425
5449
|
Button,
|
|
5426
5450
|
{
|
|
5427
5451
|
variant: "outline",
|
|
5428
5452
|
className: `w-full justify-start text-left font-normal ${className}`,
|
|
5429
5453
|
disabled,
|
|
5430
5454
|
children: [
|
|
5431
|
-
/* @__PURE__ */
|
|
5455
|
+
/* @__PURE__ */ jsx70(Clock, { className: "mr-2 h-4 w-4" }),
|
|
5432
5456
|
value || placeholder
|
|
5433
5457
|
]
|
|
5434
5458
|
}
|
|
5435
5459
|
) }),
|
|
5436
|
-
/* @__PURE__ */
|
|
5437
|
-
/* @__PURE__ */
|
|
5460
|
+
/* @__PURE__ */ jsx70(PopoverContent, { className: "w-auto p-4", align: "start", children: /* @__PURE__ */ jsxs48("div", { className: "flex items-center gap-2", children: [
|
|
5461
|
+
/* @__PURE__ */ jsx70(
|
|
5438
5462
|
Select2,
|
|
5439
5463
|
{
|
|
5440
5464
|
defaultValue: hour,
|
|
@@ -5444,8 +5468,8 @@ var TimePicker = ({
|
|
|
5444
5468
|
className: "w-[80px]"
|
|
5445
5469
|
}
|
|
5446
5470
|
),
|
|
5447
|
-
/* @__PURE__ */
|
|
5448
|
-
/* @__PURE__ */
|
|
5471
|
+
/* @__PURE__ */ jsx70("span", { className: "text-lg", children: ":" }),
|
|
5472
|
+
/* @__PURE__ */ jsx70(
|
|
5449
5473
|
Select2,
|
|
5450
5474
|
{
|
|
5451
5475
|
defaultValue: minute,
|
|
@@ -5460,11 +5484,11 @@ var TimePicker = ({
|
|
|
5460
5484
|
};
|
|
5461
5485
|
|
|
5462
5486
|
// components/form-controls/tooltip.tsx
|
|
5463
|
-
import { jsx as
|
|
5487
|
+
import { jsx as jsx71, jsxs as jsxs49 } from "react/jsx-runtime";
|
|
5464
5488
|
var Tooltip3 = ({ children, tipContent }) => {
|
|
5465
|
-
return /* @__PURE__ */
|
|
5466
|
-
/* @__PURE__ */
|
|
5467
|
-
/* @__PURE__ */
|
|
5489
|
+
return /* @__PURE__ */ jsx71(TooltipProvider, { children: /* @__PURE__ */ jsxs49(Tooltip, { delayDuration: 0, children: [
|
|
5490
|
+
/* @__PURE__ */ jsx71(TooltipTrigger, { children }),
|
|
5491
|
+
/* @__PURE__ */ jsx71(TooltipContent, { children: /* @__PURE__ */ jsx71("p", { children: tipContent }) })
|
|
5468
5492
|
] }) });
|
|
5469
5493
|
};
|
|
5470
5494
|
|
|
@@ -5472,7 +5496,7 @@ var Tooltip3 = ({ children, tipContent }) => {
|
|
|
5472
5496
|
import { Loader2 as Loader24, Upload } from "lucide-react";
|
|
5473
5497
|
import { useDropzone } from "react-dropzone";
|
|
5474
5498
|
import { toast } from "sonner";
|
|
5475
|
-
import { jsx as
|
|
5499
|
+
import { jsx as jsx72, jsxs as jsxs50 } from "react/jsx-runtime";
|
|
5476
5500
|
function UploadWidget({
|
|
5477
5501
|
accept,
|
|
5478
5502
|
maxSize,
|
|
@@ -5510,11 +5534,11 @@ function UploadWidget({
|
|
|
5510
5534
|
...getRootProps(),
|
|
5511
5535
|
className: "relative border-2 border-dashed border-gray-300 rounded-lg p-6 text-center cursor-pointer min-h-[160px]",
|
|
5512
5536
|
children: [
|
|
5513
|
-
isUploading && /* @__PURE__ */
|
|
5514
|
-
/* @__PURE__ */
|
|
5515
|
-
isDragActive ? /* @__PURE__ */
|
|
5516
|
-
/* @__PURE__ */
|
|
5517
|
-
/* @__PURE__ */
|
|
5537
|
+
isUploading && /* @__PURE__ */ jsx72("div", { className: "absolute top-3 right-3", children: /* @__PURE__ */ jsx72(Loader24, { className: "animate-spin h-6 w-6 text-primary" }) }),
|
|
5538
|
+
/* @__PURE__ */ jsx72("input", { ...getInputProps() }),
|
|
5539
|
+
isDragActive ? /* @__PURE__ */ jsx72("p", { children: "Drop the files here ..." }) : /* @__PURE__ */ jsxs50("div", { children: [
|
|
5540
|
+
/* @__PURE__ */ jsx72(Upload, { className: "mx-auto h-12 w-12 text-gray-400" }),
|
|
5541
|
+
/* @__PURE__ */ jsx72("p", { children: "Drag n drop some files here, or click to select files" }),
|
|
5518
5542
|
/* @__PURE__ */ jsxs50("p", { className: "text-sm text-gray-500", children: [
|
|
5519
5543
|
"Only ",
|
|
5520
5544
|
acceptedTypes,
|
|
@@ -5523,11 +5547,11 @@ function UploadWidget({
|
|
|
5523
5547
|
"MB are accepted"
|
|
5524
5548
|
] })
|
|
5525
5549
|
] }),
|
|
5526
|
-
fileUrls.length > 0 && /* @__PURE__ */
|
|
5550
|
+
fileUrls.length > 0 && /* @__PURE__ */ jsx72("div", { className: "mt-4 border-t border-gray-300 pt-4", children: /* @__PURE__ */ jsx72("ul", { className: "flex flex-wrap gap-2", children: fileUrls.map((url, i) => {
|
|
5527
5551
|
const fileName = getFileName(url);
|
|
5528
5552
|
return /* @__PURE__ */ jsxs50("li", { className: "flex items-center space-x-2 text-sm", children: [
|
|
5529
|
-
/* @__PURE__ */
|
|
5530
|
-
/* @__PURE__ */
|
|
5553
|
+
/* @__PURE__ */ jsx72("div", { children: getFileIcon(fileName) }),
|
|
5554
|
+
/* @__PURE__ */ jsx72("span", { children: fileName })
|
|
5531
5555
|
] }, i);
|
|
5532
5556
|
}) }) })
|
|
5533
5557
|
]
|
|
@@ -5538,15 +5562,15 @@ function UploadWidget({
|
|
|
5538
5562
|
// components/general/markdown-renderer.tsx
|
|
5539
5563
|
import ReactMarkdown from "react-markdown";
|
|
5540
5564
|
import remarkGfm from "remark-gfm";
|
|
5541
|
-
import { jsx as
|
|
5565
|
+
import { jsx as jsx73 } from "react/jsx-runtime";
|
|
5542
5566
|
function MarkdownRenderer({ content }) {
|
|
5543
|
-
return /* @__PURE__ */
|
|
5567
|
+
return /* @__PURE__ */ jsx73(
|
|
5544
5568
|
ReactMarkdown,
|
|
5545
5569
|
{
|
|
5546
5570
|
remarkPlugins: [remarkGfm],
|
|
5547
5571
|
className: "text-primary-900",
|
|
5548
5572
|
components: {
|
|
5549
|
-
a: ({ node, ...props }) => /* @__PURE__ */
|
|
5573
|
+
a: ({ node, ...props }) => /* @__PURE__ */ jsx73(
|
|
5550
5574
|
"a",
|
|
5551
5575
|
{
|
|
5552
5576
|
target: "_blank",
|
|
@@ -5555,20 +5579,20 @@ function MarkdownRenderer({ content }) {
|
|
|
5555
5579
|
...props
|
|
5556
5580
|
}
|
|
5557
5581
|
),
|
|
5558
|
-
h1: ({ node, ...props }) => /* @__PURE__ */
|
|
5559
|
-
h2: ({ node, ...props }) => /* @__PURE__ */
|
|
5560
|
-
h3: ({ node, ...props }) => /* @__PURE__ */
|
|
5561
|
-
code: ({ node, ...props }) => /* @__PURE__ */
|
|
5582
|
+
h1: ({ node, ...props }) => /* @__PURE__ */ jsx73("h1", { className: "text-2xl font-bold mt-6 mb-4", ...props }),
|
|
5583
|
+
h2: ({ node, ...props }) => /* @__PURE__ */ jsx73("h2", { className: "text-xl font-semibold mt-5 mb-3", ...props }),
|
|
5584
|
+
h3: ({ node, ...props }) => /* @__PURE__ */ jsx73("h3", { className: "text-lg font-semibold mt-4 mb-2", ...props }),
|
|
5585
|
+
code: ({ node, ...props }) => /* @__PURE__ */ jsx73(
|
|
5562
5586
|
"code",
|
|
5563
5587
|
{
|
|
5564
5588
|
className: "block bg-stone-100 p-3 rounded font-mono",
|
|
5565
5589
|
...props
|
|
5566
5590
|
}
|
|
5567
5591
|
),
|
|
5568
|
-
ul: ({ node, ...props }) => /* @__PURE__ */
|
|
5569
|
-
ol: ({ node, ...props }) => /* @__PURE__ */
|
|
5570
|
-
p: ({ node, ...props }) => /* @__PURE__ */
|
|
5571
|
-
blockquote: ({ node, ...props }) => /* @__PURE__ */
|
|
5592
|
+
ul: ({ node, ...props }) => /* @__PURE__ */ jsx73("ul", { className: "list-disc pl-6 my-4", ...props }),
|
|
5593
|
+
ol: ({ node, ...props }) => /* @__PURE__ */ jsx73("ol", { className: "list-decimal pl-6 my-4", ...props }),
|
|
5594
|
+
p: ({ node, ...props }) => /* @__PURE__ */ jsx73("p", { className: "my-4", ...props }),
|
|
5595
|
+
blockquote: ({ node, ...props }) => /* @__PURE__ */ jsx73(
|
|
5572
5596
|
"blockquote",
|
|
5573
5597
|
{
|
|
5574
5598
|
className: "border-l-4 border-stone-200 pl-4 my-4 italic",
|
|
@@ -5582,7 +5606,7 @@ function MarkdownRenderer({ content }) {
|
|
|
5582
5606
|
}
|
|
5583
5607
|
|
|
5584
5608
|
// components/general/chat-loading.tsx
|
|
5585
|
-
import { jsx as
|
|
5609
|
+
import { jsx as jsx74, jsxs as jsxs51 } from "react/jsx-runtime";
|
|
5586
5610
|
function ChatLoading() {
|
|
5587
5611
|
return /* @__PURE__ */ jsxs51(
|
|
5588
5612
|
"svg",
|
|
@@ -5592,7 +5616,7 @@ function ChatLoading() {
|
|
|
5592
5616
|
width: "60",
|
|
5593
5617
|
height: "15",
|
|
5594
5618
|
children: [
|
|
5595
|
-
/* @__PURE__ */
|
|
5619
|
+
/* @__PURE__ */ jsx74("circle", { cx: "7.5", cy: "7.5", r: "3.5", fill: "#444444", children: /* @__PURE__ */ jsx74(
|
|
5596
5620
|
"animate",
|
|
5597
5621
|
{
|
|
5598
5622
|
attributeName: "cy",
|
|
@@ -5605,7 +5629,7 @@ function ChatLoading() {
|
|
|
5605
5629
|
values: "7.5;3.5;7.5"
|
|
5606
5630
|
}
|
|
5607
5631
|
) }),
|
|
5608
|
-
/* @__PURE__ */
|
|
5632
|
+
/* @__PURE__ */ jsx74("circle", { cx: "30", cy: "7.5", r: "3.5", fill: "#444444", children: /* @__PURE__ */ jsx74(
|
|
5609
5633
|
"animate",
|
|
5610
5634
|
{
|
|
5611
5635
|
attributeName: "cy",
|
|
@@ -5618,7 +5642,7 @@ function ChatLoading() {
|
|
|
5618
5642
|
values: "7.5;3.5;7.5"
|
|
5619
5643
|
}
|
|
5620
5644
|
) }),
|
|
5621
|
-
/* @__PURE__ */
|
|
5645
|
+
/* @__PURE__ */ jsx74("circle", { cx: "52.5", cy: "7.5", r: "3.5", fill: "#444444", children: /* @__PURE__ */ jsx74(
|
|
5622
5646
|
"animate",
|
|
5623
5647
|
{
|
|
5624
5648
|
attributeName: "cy",
|
|
@@ -5637,10 +5661,10 @@ function ChatLoading() {
|
|
|
5637
5661
|
}
|
|
5638
5662
|
|
|
5639
5663
|
// components/layout/action-bar.tsx
|
|
5640
|
-
import { ArrowLeft, icons as
|
|
5664
|
+
import { ArrowLeft, icons as icons3, Loader2 as Loader25 } from "lucide-react";
|
|
5641
5665
|
import { useRouter as useRouter4 } from "next/navigation";
|
|
5642
5666
|
import React37 from "react";
|
|
5643
|
-
import { Fragment as Fragment9, jsx as
|
|
5667
|
+
import { Fragment as Fragment9, jsx as jsx75, jsxs as jsxs52 } from "react/jsx-runtime";
|
|
5644
5668
|
var colorStyles = {
|
|
5645
5669
|
red: "bg-red-50 hover:bg-red-100 text-red-600",
|
|
5646
5670
|
blue: "bg-blue-50 hover:bg-blue-100 text-blue-600",
|
|
@@ -5655,7 +5679,7 @@ function EloquentActionBar({
|
|
|
5655
5679
|
title
|
|
5656
5680
|
}) {
|
|
5657
5681
|
const router = useRouter4();
|
|
5658
|
-
const LucideIcons =
|
|
5682
|
+
const LucideIcons = icons3;
|
|
5659
5683
|
return /* @__PURE__ */ jsxs52("div", { className: "flex bg-white border-gray-200 border-b border-x rounded-t-lg items-center", children: [
|
|
5660
5684
|
showBack && /* @__PURE__ */ jsxs52(Fragment9, { children: [
|
|
5661
5685
|
/* @__PURE__ */ jsxs52(
|
|
@@ -5664,14 +5688,14 @@ function EloquentActionBar({
|
|
|
5664
5688
|
onClick: () => router.back(),
|
|
5665
5689
|
className: "flex items-center px-3 py-2 hover:bg-gray-100 transition-colors",
|
|
5666
5690
|
children: [
|
|
5667
|
-
/* @__PURE__ */
|
|
5668
|
-
/* @__PURE__ */
|
|
5691
|
+
/* @__PURE__ */ jsx75(ArrowLeft, { className: "w-5 h-5 mr-2 text-gray-600" }),
|
|
5692
|
+
/* @__PURE__ */ jsx75("span", { className: "text-gray-600 font-medium", children: "Back" })
|
|
5669
5693
|
]
|
|
5670
5694
|
}
|
|
5671
5695
|
),
|
|
5672
|
-
/* @__PURE__ */
|
|
5696
|
+
/* @__PURE__ */ jsx75(Separator3, { orientation: "vertical", className: "h-full" })
|
|
5673
5697
|
] }),
|
|
5674
|
-
/* @__PURE__ */
|
|
5698
|
+
/* @__PURE__ */ jsx75("div", { className: "flex items-center", children: buttons.map((button, index) => {
|
|
5675
5699
|
const Icon3 = LucideIcons[button.icon];
|
|
5676
5700
|
return /* @__PURE__ */ jsxs52(React37.Fragment, { children: [
|
|
5677
5701
|
/* @__PURE__ */ jsxs52(
|
|
@@ -5681,23 +5705,23 @@ function EloquentActionBar({
|
|
|
5681
5705
|
disabled: button.isLoading,
|
|
5682
5706
|
className: `flex items-center px-4 py-2 transition-colors ${colorStyles[button.color]} ${button.isLoading ? "opacity-70 cursor-not-allowed" : ""}`,
|
|
5683
5707
|
children: [
|
|
5684
|
-
button.isLoading ? /* @__PURE__ */
|
|
5685
|
-
/* @__PURE__ */
|
|
5708
|
+
button.isLoading ? /* @__PURE__ */ jsx75(Loader25, { className: "w-5 h-5 mr-2 animate-spin" }) : /* @__PURE__ */ jsx75(Icon3, { className: "w-5 h-5 mr-2" }),
|
|
5709
|
+
/* @__PURE__ */ jsx75("span", { className: "font-medium", children: button.label })
|
|
5686
5710
|
]
|
|
5687
5711
|
}
|
|
5688
5712
|
),
|
|
5689
|
-
index < buttons.length - 1 && /* @__PURE__ */
|
|
5713
|
+
index < buttons.length - 1 && /* @__PURE__ */ jsx75(Separator3, { orientation: "vertical", className: "h-full" })
|
|
5690
5714
|
] }, button.label);
|
|
5691
5715
|
}) }),
|
|
5692
|
-
title && /* @__PURE__ */
|
|
5716
|
+
title && /* @__PURE__ */ jsx75("span", { className: "text-lg", children: title })
|
|
5693
5717
|
] });
|
|
5694
5718
|
}
|
|
5695
5719
|
|
|
5696
5720
|
// components/schema-fields/dropdown-field.tsx
|
|
5697
|
-
import { jsx as
|
|
5721
|
+
import { jsx as jsx76, jsxs as jsxs53 } from "react/jsx-runtime";
|
|
5698
5722
|
function ColorDot({ color }) {
|
|
5699
5723
|
if (!color) return null;
|
|
5700
|
-
return /* @__PURE__ */
|
|
5724
|
+
return /* @__PURE__ */ jsx76(
|
|
5701
5725
|
"div",
|
|
5702
5726
|
{
|
|
5703
5727
|
className: "w-3 h-3 rounded-full mr-2 inline-block",
|
|
@@ -5715,7 +5739,7 @@ function DropdownField({ schema, value, onChange }) {
|
|
|
5715
5739
|
const selectedOption = options?.find((opt) => opt.value === value);
|
|
5716
5740
|
if (!selectedOption) return null;
|
|
5717
5741
|
return /* @__PURE__ */ jsxs53("div", { className: "flex items-center", children: [
|
|
5718
|
-
/* @__PURE__ */
|
|
5742
|
+
/* @__PURE__ */ jsx76(ColorDot, { color: selectedOption.color }),
|
|
5719
5743
|
selectedOption.label
|
|
5720
5744
|
] });
|
|
5721
5745
|
};
|
|
@@ -5725,14 +5749,14 @@ function DropdownField({ schema, value, onChange }) {
|
|
|
5725
5749
|
value: value ?? "",
|
|
5726
5750
|
onValueChange: onChange,
|
|
5727
5751
|
children: [
|
|
5728
|
-
/* @__PURE__ */
|
|
5729
|
-
/* @__PURE__ */
|
|
5752
|
+
/* @__PURE__ */ jsx76(SelectTrigger, { children: /* @__PURE__ */ jsx76(SelectValue, { children: renderSelectedValue() }) }),
|
|
5753
|
+
/* @__PURE__ */ jsx76(SelectContent, { children: options?.map((option) => /* @__PURE__ */ jsxs53(
|
|
5730
5754
|
SelectItem,
|
|
5731
5755
|
{
|
|
5732
5756
|
value: option.value,
|
|
5733
5757
|
className: "flex items-center",
|
|
5734
5758
|
children: [
|
|
5735
|
-
/* @__PURE__ */
|
|
5759
|
+
/* @__PURE__ */ jsx76(ColorDot, { color: option.color }),
|
|
5736
5760
|
option.label
|
|
5737
5761
|
]
|
|
5738
5762
|
},
|
|
@@ -5744,7 +5768,7 @@ function DropdownField({ schema, value, onChange }) {
|
|
|
5744
5768
|
}
|
|
5745
5769
|
|
|
5746
5770
|
// components/schema-fields/string-field.tsx
|
|
5747
|
-
import { jsx as
|
|
5771
|
+
import { jsx as jsx77 } from "react/jsx-runtime";
|
|
5748
5772
|
function StringField({
|
|
5749
5773
|
name,
|
|
5750
5774
|
schema,
|
|
@@ -5776,7 +5800,7 @@ function StringField({
|
|
|
5776
5800
|
return "text";
|
|
5777
5801
|
}
|
|
5778
5802
|
};
|
|
5779
|
-
return /* @__PURE__ */
|
|
5803
|
+
return /* @__PURE__ */ jsx77(
|
|
5780
5804
|
Input,
|
|
5781
5805
|
{
|
|
5782
5806
|
value: value || "",
|
|
@@ -5795,14 +5819,14 @@ function StringField({
|
|
|
5795
5819
|
}
|
|
5796
5820
|
|
|
5797
5821
|
// components/schema-fields/string-multi-line-field.tsx
|
|
5798
|
-
import { jsx as
|
|
5822
|
+
import { jsx as jsx78 } from "react/jsx-runtime";
|
|
5799
5823
|
function StringMultiLineField({
|
|
5800
5824
|
name,
|
|
5801
5825
|
schema,
|
|
5802
5826
|
value,
|
|
5803
5827
|
onChange
|
|
5804
5828
|
}) {
|
|
5805
|
-
return /* @__PURE__ */
|
|
5829
|
+
return /* @__PURE__ */ jsx78(
|
|
5806
5830
|
Textarea,
|
|
5807
5831
|
{
|
|
5808
5832
|
value: value || "",
|
|
@@ -5817,9 +5841,9 @@ function StringMultiLineField({
|
|
|
5817
5841
|
// components/schema-fields/text-field.tsx
|
|
5818
5842
|
import { RiCheckLine } from "@remixicon/react";
|
|
5819
5843
|
import { useState as useState13 } from "react";
|
|
5820
|
-
import { jsx as
|
|
5844
|
+
import { jsx as jsx79, jsxs as jsxs54 } from "react/jsx-runtime";
|
|
5821
5845
|
function TextField({ schema, value, onChange }) {
|
|
5822
|
-
return /* @__PURE__ */
|
|
5846
|
+
return /* @__PURE__ */ jsx79(TooltipProvider, { children: /* @__PURE__ */ jsx79("div", { className: "rounded-lg border bg-background flex flex-col", children: /* @__PURE__ */ jsx79(
|
|
5823
5847
|
Input,
|
|
5824
5848
|
{
|
|
5825
5849
|
value,
|
|
@@ -5830,7 +5854,7 @@ function TextField({ schema, value, onChange }) {
|
|
|
5830
5854
|
}
|
|
5831
5855
|
|
|
5832
5856
|
// components/schema-fields/schema-field.tsx
|
|
5833
|
-
import { jsx as
|
|
5857
|
+
import { jsx as jsx80, jsxs as jsxs55 } from "react/jsx-runtime";
|
|
5834
5858
|
function getFieldType(schema) {
|
|
5835
5859
|
if (schema.enum) return "dropdown";
|
|
5836
5860
|
if (schema.format === "richtext") return "text";
|
|
@@ -5852,13 +5876,13 @@ function SchemaField(props) {
|
|
|
5852
5876
|
case "email":
|
|
5853
5877
|
case "phone":
|
|
5854
5878
|
case "url":
|
|
5855
|
-
return /* @__PURE__ */
|
|
5879
|
+
return /* @__PURE__ */ jsx80(StringField, { ...props });
|
|
5856
5880
|
case "stringMultiline":
|
|
5857
|
-
return /* @__PURE__ */
|
|
5881
|
+
return /* @__PURE__ */ jsx80(StringMultiLineField, { ...props });
|
|
5858
5882
|
case "text":
|
|
5859
|
-
return /* @__PURE__ */
|
|
5883
|
+
return /* @__PURE__ */ jsx80(TextField, { ...props });
|
|
5860
5884
|
case "dropdown":
|
|
5861
|
-
return /* @__PURE__ */
|
|
5885
|
+
return /* @__PURE__ */ jsx80(DropdownField, { ...props });
|
|
5862
5886
|
default:
|
|
5863
5887
|
return /* @__PURE__ */ jsxs55("div", { className: "text-red-500", children: [
|
|
5864
5888
|
"Unsupported field type: ",
|
|
@@ -5869,10 +5893,10 @@ function SchemaField(props) {
|
|
|
5869
5893
|
return /* @__PURE__ */ jsxs55("div", { className: cn("space-y-2", getColspanBySchema(schema)), children: [
|
|
5870
5894
|
/* @__PURE__ */ jsxs55(Label2, { children: [
|
|
5871
5895
|
label ?? schema.title ?? name,
|
|
5872
|
-
schema.required && /* @__PURE__ */
|
|
5896
|
+
schema.required && /* @__PURE__ */ jsx80("span", { className: "text-red-500", children: "*" })
|
|
5873
5897
|
] }),
|
|
5874
5898
|
renderField(),
|
|
5875
|
-
schema.description && /* @__PURE__ */
|
|
5899
|
+
schema.description && /* @__PURE__ */ jsx80("p", { className: "text-sm text-gray-500", children: schema.description })
|
|
5876
5900
|
] });
|
|
5877
5901
|
}
|
|
5878
5902
|
|
|
@@ -5882,7 +5906,126 @@ import { Loader2 as Loader26, UploadCloud } from "lucide-react";
|
|
|
5882
5906
|
import { useState as useState14 } from "react";
|
|
5883
5907
|
import { useDropzone as useDropzone2 } from "react-dropzone";
|
|
5884
5908
|
import { toast as toast2 } from "sonner";
|
|
5885
|
-
|
|
5909
|
+
|
|
5910
|
+
// components/upload/upload-actions.ts
|
|
5911
|
+
import { BlobServiceClient } from "@azure/storage-blob";
|
|
5912
|
+
import { PutObjectCommand, S3Client } from "@aws-sdk/client-s3";
|
|
5913
|
+
async function uploadFile(formData) {
|
|
5914
|
+
try {
|
|
5915
|
+
const file = formData.get("file");
|
|
5916
|
+
if (!file) {
|
|
5917
|
+
throw new Error("No file provided");
|
|
5918
|
+
}
|
|
5919
|
+
const STORAGE_CONNECTION_STRING = process.env.AZURE_STORAGE_CONNECTION_STRING;
|
|
5920
|
+
const STORAGE_CONTAINER_NAME = process.env.AZURE_STORAGE_CONTAINER_NAME;
|
|
5921
|
+
if (!STORAGE_CONNECTION_STRING || !STORAGE_CONTAINER_NAME) {
|
|
5922
|
+
throw new Error(
|
|
5923
|
+
"STORAGE_CONNECTION_STRING or STORAGE_CONTAINER_NAME not set"
|
|
5924
|
+
);
|
|
5925
|
+
}
|
|
5926
|
+
const fileExtension = file.name.split(".").pop()?.toLowerCase();
|
|
5927
|
+
const fileName = `${Date.now()}-${Math.random().toString(36).substring(2)}.${fileExtension}`;
|
|
5928
|
+
const contentType = getContentType(fileExtension);
|
|
5929
|
+
const buffer = Buffer.from(await file.arrayBuffer());
|
|
5930
|
+
const blobServiceClient = BlobServiceClient.fromConnectionString(
|
|
5931
|
+
STORAGE_CONNECTION_STRING
|
|
5932
|
+
);
|
|
5933
|
+
const containerClient = blobServiceClient.getContainerClient(
|
|
5934
|
+
STORAGE_CONTAINER_NAME
|
|
5935
|
+
);
|
|
5936
|
+
await containerClient.createIfNotExists();
|
|
5937
|
+
const blockBlobClient = containerClient.getBlockBlobClient(fileName);
|
|
5938
|
+
await blockBlobClient.upload(buffer, buffer.length, {
|
|
5939
|
+
blobHTTPHeaders: {
|
|
5940
|
+
blobContentType: contentType
|
|
5941
|
+
}
|
|
5942
|
+
});
|
|
5943
|
+
const fileUrl = blockBlobClient.url;
|
|
5944
|
+
return { success: true, fileUrl };
|
|
5945
|
+
} catch (error) {
|
|
5946
|
+
console.error("Upload error:", error);
|
|
5947
|
+
return {
|
|
5948
|
+
success: false,
|
|
5949
|
+
error: error instanceof Error ? error.message : "Failed to upload file"
|
|
5950
|
+
};
|
|
5951
|
+
}
|
|
5952
|
+
}
|
|
5953
|
+
function getContentType(fileExtension) {
|
|
5954
|
+
if (!fileExtension) return "application/octet-stream";
|
|
5955
|
+
const mimeTypes = {
|
|
5956
|
+
// Images
|
|
5957
|
+
png: "image/png",
|
|
5958
|
+
jpg: "image/jpeg",
|
|
5959
|
+
jpeg: "image/jpeg",
|
|
5960
|
+
gif: "image/gif",
|
|
5961
|
+
webp: "image/webp",
|
|
5962
|
+
svg: "image/svg+xml",
|
|
5963
|
+
// Documents
|
|
5964
|
+
pdf: "application/pdf",
|
|
5965
|
+
doc: "application/msword",
|
|
5966
|
+
docx: "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
|
|
5967
|
+
// Others
|
|
5968
|
+
txt: "text/plain",
|
|
5969
|
+
csv: "text/csv",
|
|
5970
|
+
json: "application/json"
|
|
5971
|
+
};
|
|
5972
|
+
return mimeTypes[fileExtension] || "application/octet-stream";
|
|
5973
|
+
}
|
|
5974
|
+
async function uploadToS3(formData) {
|
|
5975
|
+
try {
|
|
5976
|
+
const file = formData.get("file");
|
|
5977
|
+
if (!file) {
|
|
5978
|
+
throw new Error("No file provided");
|
|
5979
|
+
}
|
|
5980
|
+
const AWS_ACCESS_KEY_ID = process.env.LINODE_ACCESS_KEY;
|
|
5981
|
+
const AWS_SECRET_ACCESS_KEY = process.env.LINODE_SECRET_KEY;
|
|
5982
|
+
const S3_BUCKET_NAME = process.env.LINODE_BUCKET_NAME;
|
|
5983
|
+
let S3_ENDPOINT = process.env.LINODE_OBJECT_STORAGE_ENDPOINT;
|
|
5984
|
+
if (!AWS_ACCESS_KEY_ID || !AWS_SECRET_ACCESS_KEY || !S3_BUCKET_NAME || !S3_ENDPOINT) {
|
|
5985
|
+
throw new Error("S3 credentials or configuration not set");
|
|
5986
|
+
}
|
|
5987
|
+
const fileExtension = file.name.split(".").pop()?.toLowerCase();
|
|
5988
|
+
const fileName = `${Date.now()}-${Math.random().toString(36).substring(2)}.${fileExtension}`;
|
|
5989
|
+
const contentType = getContentType(fileExtension);
|
|
5990
|
+
const buffer = Buffer.from(await file.arrayBuffer());
|
|
5991
|
+
const s3Client = new S3Client({
|
|
5992
|
+
endpoint: S3_ENDPOINT,
|
|
5993
|
+
region: "us-east-1",
|
|
5994
|
+
// Linode requires a region but it's not used with custom endpoint
|
|
5995
|
+
credentials: {
|
|
5996
|
+
accessKeyId: AWS_ACCESS_KEY_ID,
|
|
5997
|
+
secretAccessKey: AWS_SECRET_ACCESS_KEY
|
|
5998
|
+
},
|
|
5999
|
+
forcePathStyle: true,
|
|
6000
|
+
// Required for Linode Object Storage
|
|
6001
|
+
maxAttempts: 3,
|
|
6002
|
+
requestHandler: {
|
|
6003
|
+
timeout: 1e4
|
|
6004
|
+
// 10 seconds timeout
|
|
6005
|
+
}
|
|
6006
|
+
});
|
|
6007
|
+
const command = new PutObjectCommand({
|
|
6008
|
+
Bucket: S3_BUCKET_NAME,
|
|
6009
|
+
Key: fileName,
|
|
6010
|
+
Body: buffer,
|
|
6011
|
+
ContentType: contentType,
|
|
6012
|
+
ACL: "public-read"
|
|
6013
|
+
// Make the object publicly readable
|
|
6014
|
+
});
|
|
6015
|
+
await s3Client.send(command);
|
|
6016
|
+
const fileUrl = `${S3_ENDPOINT}/${S3_BUCKET_NAME}/${fileName}`;
|
|
6017
|
+
return { success: true, fileUrl };
|
|
6018
|
+
} catch (error) {
|
|
6019
|
+
console.error("Upload error:", JSON.stringify(error, null, 2));
|
|
6020
|
+
return {
|
|
6021
|
+
success: false,
|
|
6022
|
+
error: error instanceof Error ? error.message : "Failed to upload file"
|
|
6023
|
+
};
|
|
6024
|
+
}
|
|
6025
|
+
}
|
|
6026
|
+
|
|
6027
|
+
// components/upload/upload-widget-v2.tsx
|
|
6028
|
+
import { jsx as jsx81, jsxs as jsxs56 } from "react/jsx-runtime";
|
|
5886
6029
|
function UploadWidgetV2({
|
|
5887
6030
|
accept,
|
|
5888
6031
|
maxSize,
|
|
@@ -5949,11 +6092,11 @@ function UploadWidgetV2({
|
|
|
5949
6092
|
className
|
|
5950
6093
|
),
|
|
5951
6094
|
children: [
|
|
5952
|
-
isUploading && /* @__PURE__ */
|
|
5953
|
-
/* @__PURE__ */
|
|
5954
|
-
isDragActive ? /* @__PURE__ */
|
|
5955
|
-
/* @__PURE__ */
|
|
5956
|
-
/* @__PURE__ */
|
|
6095
|
+
isUploading && /* @__PURE__ */ jsx81("div", { className: "absolute top-3 right-3", children: /* @__PURE__ */ jsx81(Loader26, { className: "animate-spin h-6 w-6 text-primary" }) }),
|
|
6096
|
+
/* @__PURE__ */ jsx81("input", { ...getInputProps() }),
|
|
6097
|
+
isDragActive ? /* @__PURE__ */ jsx81("p", { children: "Drop the files here ..." }) : /* @__PURE__ */ jsxs56("div", { children: [
|
|
6098
|
+
/* @__PURE__ */ jsx81(UploadCloud, { className: "mx-auto h-12 w-12 text-gray-400" }),
|
|
6099
|
+
/* @__PURE__ */ jsx81("p", { children: "Drag n drop some files here, or click to select files" }),
|
|
5957
6100
|
/* @__PURE__ */ jsxs56("p", { className: "text-sm text-gray-500", children: [
|
|
5958
6101
|
"Only ",
|
|
5959
6102
|
acceptedTypes,
|
|
@@ -5962,11 +6105,11 @@ function UploadWidgetV2({
|
|
|
5962
6105
|
"MB are accepted"
|
|
5963
6106
|
] })
|
|
5964
6107
|
] }),
|
|
5965
|
-
!hideUploadedFiles && fileUrls.length > 0 && /* @__PURE__ */
|
|
6108
|
+
!hideUploadedFiles && fileUrls.length > 0 && /* @__PURE__ */ jsx81("div", { className: "mt-4 border-t border-gray-300 pt-4", children: /* @__PURE__ */ jsx81("ul", { className: "flex flex-wrap gap-2", children: fileUrls.map((url, i) => {
|
|
5966
6109
|
const fileName = getFileName2(url);
|
|
5967
6110
|
return /* @__PURE__ */ jsxs56("li", { className: "flex items-center space-x-2 text-sm", children: [
|
|
5968
|
-
/* @__PURE__ */
|
|
5969
|
-
/* @__PURE__ */
|
|
6111
|
+
/* @__PURE__ */ jsx81("div", { children: getFileIcon2(fileName) }),
|
|
6112
|
+
/* @__PURE__ */ jsx81("span", { children: fileName })
|
|
5970
6113
|
] }, i);
|
|
5971
6114
|
}) }) })
|
|
5972
6115
|
]
|
|
@@ -6093,7 +6236,7 @@ export {
|
|
|
6093
6236
|
FormMessage,
|
|
6094
6237
|
FormRow,
|
|
6095
6238
|
FormWithActionButtons,
|
|
6096
|
-
Icon,
|
|
6239
|
+
Icon2 as Icon,
|
|
6097
6240
|
IconButton,
|
|
6098
6241
|
Input2 as Input,
|
|
6099
6242
|
KnowledgeGraphWordCloud,
|