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