@sikka/hawa 0.18.21-next → 0.18.22-next
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.css +6 -0
- package/dist/index.d.mts +4 -3
- package/dist/index.d.ts +4 -3
- package/dist/index.js +395 -395
- package/dist/index.mjs +375 -375
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -341,7 +341,7 @@ var AdCard = ({ orientation, ...props }) => {
|
|
|
341
341
|
};
|
|
342
342
|
|
|
343
343
|
// components/elements/cards/PricingCard.tsx
|
|
344
|
-
var
|
|
344
|
+
var import_react6 = __toESM(require("react"));
|
|
345
345
|
|
|
346
346
|
// components/elements/Button.tsx
|
|
347
347
|
var React5 = __toESM(require("react"));
|
|
@@ -544,8 +544,8 @@ var buttonVariants = (0, import_class_variance_authority.cva)(
|
|
|
544
544
|
size: {
|
|
545
545
|
default: "hawa-h-10 hawa-px-4 hawa-py-2",
|
|
546
546
|
heightless: "hawa-px-4 hawa-py-4",
|
|
547
|
-
xs: "hawa-h-fit hawa-py-1 hawa-text-[10px] hawa-px-2 ",
|
|
548
|
-
sm: "hawa-h-9
|
|
547
|
+
xs: "hawa-h-fit hawa-min-h-[25px] hawa-py-1 hawa-text-[10px] hawa-px-2 ",
|
|
548
|
+
sm: "hawa-h-9 hawa-text-[11px] hawa-rounded-md hawa-px-3",
|
|
549
549
|
lg: "hawa-h-11 hawa-rounded-md hawa-px-8",
|
|
550
550
|
xl: "hawa-h-14 hawa-rounded-md hawa-px-10",
|
|
551
551
|
icon: "hawa-h-10 hawa-w-10",
|
|
@@ -587,7 +587,7 @@ var Button = React5.forwardRef(
|
|
|
587
587
|
design: size === "icon" || size === "smallIcon" ? "spinner" : "dots-pulse",
|
|
588
588
|
themeMode: variant === "outline" ? "light" : "dark",
|
|
589
589
|
color: loadingColor,
|
|
590
|
-
size: size === "sm" ? "xs" : "button"
|
|
590
|
+
size: size === "sm" || size === "xs" ? "xs" : "button"
|
|
591
591
|
}
|
|
592
592
|
) : children
|
|
593
593
|
);
|
|
@@ -676,6 +676,114 @@ var CardFooter = React6.forwardRef(({ className, ...props }, ref) => /* @__PURE_
|
|
|
676
676
|
));
|
|
677
677
|
CardFooter.displayName = "CardFooter";
|
|
678
678
|
|
|
679
|
+
// components/elements/Chip.tsx
|
|
680
|
+
var import_react4 = __toESM(require("react"));
|
|
681
|
+
var Chip = import_react4.default.forwardRef(
|
|
682
|
+
({
|
|
683
|
+
label,
|
|
684
|
+
size = "normal",
|
|
685
|
+
icon,
|
|
686
|
+
color,
|
|
687
|
+
radius = "inherit",
|
|
688
|
+
dotType,
|
|
689
|
+
...rest
|
|
690
|
+
}, ref) => {
|
|
691
|
+
let defaultStyles = "hawa-flex hawa-flex-row hawa-w-fit hawa-gap-1 hawa-items-center hawa-px-2.5 hawa-py-1 hawa-font-bold ";
|
|
692
|
+
let radiusStyles = {
|
|
693
|
+
inherit: " hawa-rounded",
|
|
694
|
+
full: "hawa-rounded-full",
|
|
695
|
+
none: "hawa-rounded-none"
|
|
696
|
+
};
|
|
697
|
+
let sizeStyles = {
|
|
698
|
+
small: "hawa-h-[15px] hawa-leading-4 hawa-px-0 hawa-py-0 hawa-text-[9px] hawa-gap-0.5 ",
|
|
699
|
+
normal: "hawa-h-fit hawa-text-xs",
|
|
700
|
+
large: "hawa-text-base"
|
|
701
|
+
};
|
|
702
|
+
let dotStyles = {
|
|
703
|
+
small: "hawa-flex hawa-h-1 hawa-w-1 hawa-rounded-full",
|
|
704
|
+
normal: "hawa-flex hawa-h-2 hawa-w-2 hawa-rounded-full",
|
|
705
|
+
large: "hawa-flex hawa-h-3 hawa-w-3 hawa-rounded-full"
|
|
706
|
+
};
|
|
707
|
+
let dotTypeStyles = {
|
|
708
|
+
available: "hawa-bg-green-500",
|
|
709
|
+
unavailable: "hawa-bg-red-500"
|
|
710
|
+
};
|
|
711
|
+
let colorStyles = {
|
|
712
|
+
green: "hawa-bg-green-100 hawa-text-green-500 dark:hawa-bg-green-400 dark:hawa-text-green-800",
|
|
713
|
+
blue: "hawa-bg-blue-100 hawa-text-blue-500 dark:hawa-bg-blue-400 dark:hawa-text-blue-100",
|
|
714
|
+
red: "hawa-bg-red-100 hawa-text-red-500 dark:hawa-bg-red-400 dark:hawa-text-red-100",
|
|
715
|
+
yellow: "hawa-bg-yellow-100 hawa-text-yellow-600 dark:hawa-bg-yellow-400 dark:hawa-text-yellow-800",
|
|
716
|
+
orange: "hawa-bg-orange-100 hawa-text-orange-500 dark:hawa-bg-orange-400 dark:hawa-text-orange-100",
|
|
717
|
+
purple: "hawa-bg-purple-100 hawa-text-purple-500 dark:hawa-bg-purple-400 dark:hawa-text-purple-100",
|
|
718
|
+
cyan: "hawa-bg-cyan-100 hawa-text-cyan-800 dark:hawa-bg-cyan-400 dark:hawa-text-cyan-800",
|
|
719
|
+
hyper: "hawa-text-white hawa-bg-gradient-to-tl hawa-from-pink-500 hawa-via-red-500 hawa-to-yellow-500 ",
|
|
720
|
+
oceanic: "hawa-text-white hawa-bg-gradient-to-bl hawa-from-green-300 hawa-via-blue-500 hawa-to-purple-600"
|
|
721
|
+
};
|
|
722
|
+
if (label) {
|
|
723
|
+
return /* @__PURE__ */ import_react4.default.createElement(
|
|
724
|
+
"span",
|
|
725
|
+
{
|
|
726
|
+
...rest,
|
|
727
|
+
ref,
|
|
728
|
+
className: cn(
|
|
729
|
+
defaultStyles,
|
|
730
|
+
sizeStyles[size],
|
|
731
|
+
radiusStyles[radius],
|
|
732
|
+
color ? colorStyles[color] : "hawa-border hawa-bg-none"
|
|
733
|
+
)
|
|
734
|
+
},
|
|
735
|
+
dotType && /* @__PURE__ */ import_react4.default.createElement(
|
|
736
|
+
"span",
|
|
737
|
+
{
|
|
738
|
+
className: cn(dotStyles[size], dotTypeStyles[dotType])
|
|
739
|
+
}
|
|
740
|
+
),
|
|
741
|
+
icon && icon,
|
|
742
|
+
label
|
|
743
|
+
);
|
|
744
|
+
} else {
|
|
745
|
+
return /* @__PURE__ */ import_react4.default.createElement(
|
|
746
|
+
"span",
|
|
747
|
+
{
|
|
748
|
+
...rest,
|
|
749
|
+
ref,
|
|
750
|
+
className: cn(
|
|
751
|
+
"hawa-w-2 hawa-h-2 hawa-rounded-full",
|
|
752
|
+
color ? colorStyles[color] : "hawa-border hawa-bg-none"
|
|
753
|
+
)
|
|
754
|
+
}
|
|
755
|
+
);
|
|
756
|
+
}
|
|
757
|
+
}
|
|
758
|
+
);
|
|
759
|
+
|
|
760
|
+
// components/elements/Skeleton.tsx
|
|
761
|
+
var import_react5 = __toESM(require("react"));
|
|
762
|
+
function Skeleton({
|
|
763
|
+
className,
|
|
764
|
+
content,
|
|
765
|
+
animation = "pulse",
|
|
766
|
+
...props
|
|
767
|
+
}) {
|
|
768
|
+
const animationStyles = {
|
|
769
|
+
none: "hawa-rounded hawa-bg-muted",
|
|
770
|
+
pulse: "hawa-animate-pulse hawa-rounded hawa-bg-muted",
|
|
771
|
+
shimmer: "hawa-space-y-5 hawa-rounded hawa-bg-muted hawa-p-4 hawa-relative before:hawa-absolute before:hawa-inset-0 before:hawa--translate-x-full before:hawa-animate-[shimmer_2s_infinite] before:hawa-bg-gradient-to-r before:hawa-from-transparent before:hawa-via-gray-300/40 dark:before:hawa-via-white/10 before:hawa-to-transparent hawa-isolate hawa-overflow-hidden before:hawa-border-t before:hawa-border-rose-100/10"
|
|
772
|
+
};
|
|
773
|
+
return /* @__PURE__ */ import_react5.default.createElement(
|
|
774
|
+
"div",
|
|
775
|
+
{
|
|
776
|
+
className: cn(
|
|
777
|
+
animationStyles[animation],
|
|
778
|
+
content && "hawa-flex hawa-flex-col hawa-justify-center hawa-items-center",
|
|
779
|
+
className
|
|
780
|
+
),
|
|
781
|
+
...props
|
|
782
|
+
},
|
|
783
|
+
content && content
|
|
784
|
+
);
|
|
785
|
+
}
|
|
786
|
+
|
|
679
787
|
// components/elements/cards/PricingCard.tsx
|
|
680
788
|
var PricingCard = ({
|
|
681
789
|
size = "medium",
|
|
@@ -689,7 +797,7 @@ var PricingCard = ({
|
|
|
689
797
|
medium: "hawa-mx-1 hawa-w-full hawa-rounded hawa-min-w-fit hawa-border dark:hawa-border-gray-700 hawa-bg-background ",
|
|
690
798
|
large: "hawa-mx-1 hawa-w-full hawa-max-w-lg hawa-rounded hawa-border dark:hawa-border-gray-700 hawa-bg-background "
|
|
691
799
|
};
|
|
692
|
-
return /* @__PURE__ */
|
|
800
|
+
return /* @__PURE__ */ import_react6.default.createElement(
|
|
693
801
|
Card,
|
|
694
802
|
{
|
|
695
803
|
dir: direction,
|
|
@@ -699,13 +807,13 @@ var PricingCard = ({
|
|
|
699
807
|
"hawa-flex hawa-flex-col hawa-gap-4 hawa-rounded hawa-p-4 "
|
|
700
808
|
)
|
|
701
809
|
},
|
|
702
|
-
props.discount && /* @__PURE__ */
|
|
810
|
+
props.discount && /* @__PURE__ */ import_react6.default.createElement(Chip, { label: props.discount, size: "large", color: "hyper" }),
|
|
703
811
|
" ",
|
|
704
|
-
/* @__PURE__ */
|
|
705
|
-
/* @__PURE__ */
|
|
706
|
-
/* @__PURE__ */
|
|
707
|
-
props.features && /* @__PURE__ */
|
|
708
|
-
return /* @__PURE__ */
|
|
812
|
+
/* @__PURE__ */ import_react6.default.createElement("h5", { className: "hawa-text-md 0 hawa-font-bold hawa-text-primary/70" }, props.texts.title),
|
|
813
|
+
/* @__PURE__ */ import_react6.default.createElement("div", { className: " hawa-text-primary hawa-flex hawa-items-baseline" }, props.isLoading ? /* @__PURE__ */ import_react6.default.createElement(Skeleton, { className: "hawa-w-full hawa-max-w-[200px] hawa-h-[48px] hawa-p-0 " }) : /* @__PURE__ */ import_react6.default.createElement(import_react6.default.Fragment, null, /* @__PURE__ */ import_react6.default.createElement(import_react6.default.Fragment, null, /* @__PURE__ */ import_react6.default.createElement("span", { className: "hawa-text-5xl hawa-font-extrabold hawa-tracking-tight" }, props.price), /* @__PURE__ */ import_react6.default.createElement("span", { className: "hawa-mx-1 hawa-text-sm hawa-font-semibold" }, props.texts.currencyText)), /* @__PURE__ */ import_react6.default.createElement("span", { className: "hawa-ml-1 hawa-text-xl hawa-font-normal hawa-text-primary/70" }, "/ ", props.texts.cycleText))),
|
|
814
|
+
/* @__PURE__ */ import_react6.default.createElement("h5", { className: "hawa-text-sm hawa-font-normal hawa-text-primary/70" }, props.texts.subtitle),
|
|
815
|
+
props.features && /* @__PURE__ */ import_react6.default.createElement("ul", { role: "list", className: "hawa-space-y-0 " }, (_a = props.features) == null ? void 0 : _a.map((feature, o) => {
|
|
816
|
+
return /* @__PURE__ */ import_react6.default.createElement(
|
|
709
817
|
"li",
|
|
710
818
|
{
|
|
711
819
|
key: o,
|
|
@@ -714,7 +822,7 @@ var PricingCard = ({
|
|
|
714
822
|
!feature.included && "hawa-line-through"
|
|
715
823
|
)
|
|
716
824
|
},
|
|
717
|
-
feature.included ? /* @__PURE__ */
|
|
825
|
+
feature.included ? /* @__PURE__ */ import_react6.default.createElement(
|
|
718
826
|
"svg",
|
|
719
827
|
{
|
|
720
828
|
"aria-label": "Check Icon",
|
|
@@ -723,7 +831,7 @@ var PricingCard = ({
|
|
|
723
831
|
fill: "currentColor",
|
|
724
832
|
viewBox: "0 0 20 20"
|
|
725
833
|
},
|
|
726
|
-
/* @__PURE__ */
|
|
834
|
+
/* @__PURE__ */ import_react6.default.createElement(
|
|
727
835
|
"path",
|
|
728
836
|
{
|
|
729
837
|
fillRule: "evenodd",
|
|
@@ -731,11 +839,11 @@ var PricingCard = ({
|
|
|
731
839
|
clipRule: "evenodd"
|
|
732
840
|
}
|
|
733
841
|
)
|
|
734
|
-
) : /* @__PURE__ */
|
|
735
|
-
/* @__PURE__ */
|
|
842
|
+
) : /* @__PURE__ */ import_react6.default.createElement("div", { className: "hawa-w-4 hawa-h-4 hawa-rounded-full hawa-bg-primary/10 hawa-m-2 hawa-mx-2.5" }),
|
|
843
|
+
/* @__PURE__ */ import_react6.default.createElement("span", { className: "hawa-flex hawa-items-center hawa-flex-row hawa-gap-2 hawa-text-center hawa-font-normal hawa-leading-tight hawa-text-primary/70 " }, feature.text, " ", feature.soon && feature.included && /* @__PURE__ */ import_react6.default.createElement(Chip, { label: "soon", color: "oceanic", size: "small" }))
|
|
736
844
|
);
|
|
737
845
|
})),
|
|
738
|
-
/* @__PURE__ */
|
|
846
|
+
/* @__PURE__ */ import_react6.default.createElement(
|
|
739
847
|
Button,
|
|
740
848
|
{
|
|
741
849
|
onClick: props.onPlanClicked,
|
|
@@ -748,16 +856,16 @@ var PricingCard = ({
|
|
|
748
856
|
};
|
|
749
857
|
|
|
750
858
|
// components/elements/cards/ItemCard.tsx
|
|
751
|
-
var
|
|
859
|
+
var import_react8 = __toESM(require("react"));
|
|
752
860
|
|
|
753
861
|
// components/elements/DropdownMenu.tsx
|
|
754
|
-
var
|
|
862
|
+
var React10 = __toESM(require("react"));
|
|
755
863
|
var DropdownMenuPrimitive = __toESM(require("@radix-ui/react-dropdown-menu"));
|
|
756
864
|
var DropdownMenuRoot = DropdownMenuPrimitive.Root;
|
|
757
865
|
var DropdownMenuTrigger = DropdownMenuPrimitive.Trigger;
|
|
758
866
|
var DropdownMenuPortal = DropdownMenuPrimitive.Portal;
|
|
759
867
|
var DropdownMenuSub = DropdownMenuPrimitive.Sub;
|
|
760
|
-
var DropdownMenuSubTrigger =
|
|
868
|
+
var DropdownMenuSubTrigger = React10.forwardRef(({ className, inset, children, ...props }, ref) => /* @__PURE__ */ React10.createElement(
|
|
761
869
|
DropdownMenuPrimitive.SubTrigger,
|
|
762
870
|
{
|
|
763
871
|
ref,
|
|
@@ -768,9 +876,9 @@ var DropdownMenuSubTrigger = React8.forwardRef(({ className, inset, children, ..
|
|
|
768
876
|
),
|
|
769
877
|
...props
|
|
770
878
|
},
|
|
771
|
-
/* @__PURE__ */
|
|
879
|
+
/* @__PURE__ */ React10.createElement("div", { className: "hawa-flex hawa-flex-row hawa-items-center hawa-gap-2" }, children),
|
|
772
880
|
" ",
|
|
773
|
-
/* @__PURE__ */
|
|
881
|
+
/* @__PURE__ */ React10.createElement(
|
|
774
882
|
"svg",
|
|
775
883
|
{
|
|
776
884
|
"aria-label": "Chevron Right Icon",
|
|
@@ -782,7 +890,7 @@ var DropdownMenuSubTrigger = React8.forwardRef(({ className, inset, children, ..
|
|
|
782
890
|
width: "1em",
|
|
783
891
|
className: cn(props.dir === "rtl" ? "hawa-rotate-180" : "")
|
|
784
892
|
},
|
|
785
|
-
/* @__PURE__ */
|
|
893
|
+
/* @__PURE__ */ React10.createElement(
|
|
786
894
|
"path",
|
|
787
895
|
{
|
|
788
896
|
fillRule: "evenodd",
|
|
@@ -792,7 +900,7 @@ var DropdownMenuSubTrigger = React8.forwardRef(({ className, inset, children, ..
|
|
|
792
900
|
)
|
|
793
901
|
));
|
|
794
902
|
DropdownMenuSubTrigger.displayName = DropdownMenuPrimitive.SubTrigger.displayName;
|
|
795
|
-
var DropdownMenuSubContent =
|
|
903
|
+
var DropdownMenuSubContent = React10.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React10.createElement(
|
|
796
904
|
DropdownMenuPrimitive.SubContent,
|
|
797
905
|
{
|
|
798
906
|
ref,
|
|
@@ -804,7 +912,7 @@ var DropdownMenuSubContent = React8.forwardRef(({ className, ...props }, ref) =>
|
|
|
804
912
|
}
|
|
805
913
|
));
|
|
806
914
|
DropdownMenuSubContent.displayName = DropdownMenuPrimitive.SubContent.displayName;
|
|
807
|
-
var DropdownMenuContent =
|
|
915
|
+
var DropdownMenuContent = React10.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ React10.createElement(DropdownMenuPrimitive.Portal, null, /* @__PURE__ */ React10.createElement(
|
|
808
916
|
DropdownMenuPrimitive.Content,
|
|
809
917
|
{
|
|
810
918
|
ref,
|
|
@@ -817,8 +925,8 @@ var DropdownMenuContent = React8.forwardRef(({ className, sideOffset = 4, ...pro
|
|
|
817
925
|
}
|
|
818
926
|
)));
|
|
819
927
|
DropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName;
|
|
820
|
-
var DropdownMenuItem =
|
|
821
|
-
return /* @__PURE__ */
|
|
928
|
+
var DropdownMenuItem = React10.forwardRef(({ className, inset, slug, ...props }, ref) => {
|
|
929
|
+
return /* @__PURE__ */ React10.createElement("a", { href: slug }, /* @__PURE__ */ React10.createElement(
|
|
822
930
|
DropdownMenuPrimitive.Item,
|
|
823
931
|
{
|
|
824
932
|
disabled: props.disabled,
|
|
@@ -831,14 +939,14 @@ var DropdownMenuItem = React8.forwardRef(({ className, inset, slug, ...props },
|
|
|
831
939
|
),
|
|
832
940
|
...props
|
|
833
941
|
},
|
|
834
|
-
/* @__PURE__ */
|
|
942
|
+
/* @__PURE__ */ React10.createElement("div", { className: "hawa-flex hawa-flex-row hawa-items-center hawa-gap-2 " }, props.children),
|
|
835
943
|
props.end && props.end,
|
|
836
|
-
!props.end && props.shortcut && /* @__PURE__ */
|
|
837
|
-
!props.end && props.badged && /* @__PURE__ */
|
|
944
|
+
!props.end && props.shortcut && /* @__PURE__ */ React10.createElement(DropdownMenuShortcut, null, props.shortcut),
|
|
945
|
+
!props.end && props.badged && /* @__PURE__ */ React10.createElement("div", { className: "hawa-h-3 hawa-w-3 hawa-bg-red-500 hawa-rounded-full" })
|
|
838
946
|
));
|
|
839
947
|
});
|
|
840
948
|
DropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName;
|
|
841
|
-
var DropdownMenuCheckboxItem =
|
|
949
|
+
var DropdownMenuCheckboxItem = React10.forwardRef(({ className, children, checked, ...props }, ref) => /* @__PURE__ */ React10.createElement(
|
|
842
950
|
DropdownMenuPrimitive.CheckboxItem,
|
|
843
951
|
{
|
|
844
952
|
ref,
|
|
@@ -849,7 +957,7 @@ var DropdownMenuCheckboxItem = React8.forwardRef(({ className, children, checked
|
|
|
849
957
|
checked,
|
|
850
958
|
...props
|
|
851
959
|
},
|
|
852
|
-
/* @__PURE__ */
|
|
960
|
+
/* @__PURE__ */ React10.createElement("span", { className: "hawa-absolute hawa-left-2 hawa-flex hawa-h-3.5 hawa-w-3.5 hawa-items-center hawa-justify-center" }, /* @__PURE__ */ React10.createElement(DropdownMenuPrimitive.ItemIndicator, null, /* @__PURE__ */ React10.createElement(
|
|
853
961
|
"svg",
|
|
854
962
|
{
|
|
855
963
|
"aria-label": "Check Mark",
|
|
@@ -860,12 +968,12 @@ var DropdownMenuCheckboxItem = React8.forwardRef(({ className, children, checked
|
|
|
860
968
|
height: "0.60em",
|
|
861
969
|
width: "0.60em"
|
|
862
970
|
},
|
|
863
|
-
/* @__PURE__ */
|
|
971
|
+
/* @__PURE__ */ React10.createElement("path", { d: "M173.898 439.404l-166.4-166.4c-9.997-9.997-9.997-26.206 0-36.204l36.203-36.204c9.997-9.998 26.207-9.998 36.204 0L192 312.69 432.095 72.596c9.997-9.997 26.207-9.997 36.204 0l36.203 36.204c9.997 9.997 9.997 26.206 0 36.204l-294.4 294.401c-9.998 9.997-26.207 9.997-36.204-.001z" })
|
|
864
972
|
), " ")),
|
|
865
973
|
children
|
|
866
974
|
));
|
|
867
975
|
DropdownMenuCheckboxItem.displayName = DropdownMenuPrimitive.CheckboxItem.displayName;
|
|
868
|
-
var DropdownMenuRadioItem =
|
|
976
|
+
var DropdownMenuRadioItem = React10.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ React10.createElement(
|
|
869
977
|
DropdownMenuPrimitive.RadioItem,
|
|
870
978
|
{
|
|
871
979
|
ref,
|
|
@@ -875,7 +983,7 @@ var DropdownMenuRadioItem = React8.forwardRef(({ className, children, ...props }
|
|
|
875
983
|
),
|
|
876
984
|
...props
|
|
877
985
|
},
|
|
878
|
-
/* @__PURE__ */
|
|
986
|
+
/* @__PURE__ */ React10.createElement("span", { className: "hawa-absolute hawa-left-2 hawa-flex hawa-h-3.5 hawa-w-3.5 hawa-items-center hawa-justify-center" }, /* @__PURE__ */ React10.createElement(DropdownMenuPrimitive.ItemIndicator, null, /* @__PURE__ */ React10.createElement(
|
|
879
987
|
"svg",
|
|
880
988
|
{
|
|
881
989
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -890,12 +998,12 @@ var DropdownMenuRadioItem = React8.forwardRef(({ className, children, ...props }
|
|
|
890
998
|
strokeLinejoin: "round",
|
|
891
999
|
className: "hawa-h-2 hawa-w-2 hawa-fill-current"
|
|
892
1000
|
},
|
|
893
|
-
/* @__PURE__ */
|
|
1001
|
+
/* @__PURE__ */ React10.createElement("circle", { cx: "12", cy: "12", r: "10" })
|
|
894
1002
|
))),
|
|
895
1003
|
children
|
|
896
1004
|
));
|
|
897
1005
|
DropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName;
|
|
898
|
-
var DropdownMenuLabel =
|
|
1006
|
+
var DropdownMenuLabel = React10.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ React10.createElement(
|
|
899
1007
|
DropdownMenuPrimitive.Label,
|
|
900
1008
|
{
|
|
901
1009
|
ref,
|
|
@@ -908,7 +1016,7 @@ var DropdownMenuLabel = React8.forwardRef(({ className, inset, ...props }, ref)
|
|
|
908
1016
|
}
|
|
909
1017
|
));
|
|
910
1018
|
DropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName;
|
|
911
|
-
var DropdownMenuSeparator =
|
|
1019
|
+
var DropdownMenuSeparator = React10.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React10.createElement(
|
|
912
1020
|
DropdownMenuPrimitive.Separator,
|
|
913
1021
|
{
|
|
914
1022
|
ref,
|
|
@@ -921,7 +1029,7 @@ var DropdownMenuShortcut = ({
|
|
|
921
1029
|
className,
|
|
922
1030
|
...props
|
|
923
1031
|
}) => {
|
|
924
|
-
return /* @__PURE__ */
|
|
1032
|
+
return /* @__PURE__ */ React10.createElement(
|
|
925
1033
|
"span",
|
|
926
1034
|
{
|
|
927
1035
|
className: cn(
|
|
@@ -960,7 +1068,7 @@ var DropdownMenu = ({
|
|
|
960
1068
|
default: "hawa-px-2 hawa-py-3 ",
|
|
961
1069
|
sm: "hawa-text-xs hawa-px-1.5 hawa-py-1.5 "
|
|
962
1070
|
};
|
|
963
|
-
return /* @__PURE__ */
|
|
1071
|
+
return /* @__PURE__ */ React10.createElement(
|
|
964
1072
|
DropdownMenuRoot,
|
|
965
1073
|
{
|
|
966
1074
|
onOpenChange,
|
|
@@ -968,8 +1076,8 @@ var DropdownMenu = ({
|
|
|
968
1076
|
modal: false,
|
|
969
1077
|
dir: direction
|
|
970
1078
|
},
|
|
971
|
-
/* @__PURE__ */
|
|
972
|
-
/* @__PURE__ */
|
|
1079
|
+
/* @__PURE__ */ React10.createElement(DropdownMenuTrigger, { asChild: true, className: triggerClassname }, trigger),
|
|
1080
|
+
/* @__PURE__ */ React10.createElement(DropdownMenuPortal, null, /* @__PURE__ */ React10.createElement(
|
|
973
1081
|
DropdownMenuContent,
|
|
974
1082
|
{
|
|
975
1083
|
side,
|
|
@@ -985,13 +1093,13 @@ var DropdownMenu = ({
|
|
|
985
1093
|
header && header,
|
|
986
1094
|
items && items.map((item, index) => {
|
|
987
1095
|
if (item.itemType === "separator") {
|
|
988
|
-
return /* @__PURE__ */
|
|
1096
|
+
return /* @__PURE__ */ React10.createElement(DropdownMenuSeparator, { key: index });
|
|
989
1097
|
} else if (item.itemType === "label") {
|
|
990
|
-
return /* @__PURE__ */
|
|
1098
|
+
return /* @__PURE__ */ React10.createElement(DropdownMenuLabel, { key: index }, item.label);
|
|
991
1099
|
} else if (item.itemType === "custom") {
|
|
992
|
-
return /* @__PURE__ */
|
|
1100
|
+
return /* @__PURE__ */ React10.createElement("div", { key: index }, item.content);
|
|
993
1101
|
} else {
|
|
994
|
-
return item.subitems ? /* @__PURE__ */
|
|
1102
|
+
return item.subitems ? /* @__PURE__ */ React10.createElement(DropdownMenuSub, { key: index }, /* @__PURE__ */ React10.createElement(
|
|
995
1103
|
DropdownMenuSubTrigger,
|
|
996
1104
|
{
|
|
997
1105
|
className: cn(sizeStyles[size]),
|
|
@@ -999,7 +1107,7 @@ var DropdownMenu = ({
|
|
|
999
1107
|
},
|
|
1000
1108
|
item.icon && item.icon,
|
|
1001
1109
|
item.label && item.label
|
|
1002
|
-
), /* @__PURE__ */
|
|
1110
|
+
), /* @__PURE__ */ React10.createElement(DropdownMenuPortal, null, /* @__PURE__ */ React10.createElement(DropdownMenuSubContent, null, item.subitems.map((subitem, subIndex) => /* @__PURE__ */ React10.createElement(
|
|
1003
1111
|
DropdownMenuItem,
|
|
1004
1112
|
{
|
|
1005
1113
|
slug: subitem.slug,
|
|
@@ -1026,7 +1134,7 @@ var DropdownMenu = ({
|
|
|
1026
1134
|
},
|
|
1027
1135
|
subitem.icon && subitem.icon,
|
|
1028
1136
|
subitem.label && subitem.label
|
|
1029
|
-
))))) : /* @__PURE__ */
|
|
1137
|
+
))))) : /* @__PURE__ */ React10.createElement(
|
|
1030
1138
|
DropdownMenuItem,
|
|
1031
1139
|
{
|
|
1032
1140
|
slug: item.slug,
|
|
@@ -1079,12 +1187,12 @@ var DropdownMenu = ({
|
|
|
1079
1187
|
};
|
|
1080
1188
|
|
|
1081
1189
|
// components/elements/StopPropagationWrapper.tsx
|
|
1082
|
-
var
|
|
1190
|
+
var import_react7 = __toESM(require("react"));
|
|
1083
1191
|
var StopPropagationWrapper = (props) => {
|
|
1084
1192
|
const handleClick = (e) => {
|
|
1085
1193
|
e.stopPropagation();
|
|
1086
1194
|
};
|
|
1087
|
-
return /* @__PURE__ */
|
|
1195
|
+
return /* @__PURE__ */ import_react7.default.createElement("div", { onClick: handleClick }, props.children);
|
|
1088
1196
|
};
|
|
1089
1197
|
|
|
1090
1198
|
// components/elements/cards/ItemCard.tsx
|
|
@@ -1116,12 +1224,12 @@ var ItemCard = ({
|
|
|
1116
1224
|
)
|
|
1117
1225
|
};
|
|
1118
1226
|
let headerActionsButtonStyle = "hawa-inline-block hawa-rounded hawa-p-1 hawa-text-sm hawa-text-gray-500 hover:hawa-bg-gray-100 focus:hawa-outline-none focus:hawa-ring-4 focus:hawa-ring-gray-200 dark:hawa-text-gray-400 dark:hover:hawa-bg-gray-700 dark:focus:hawa-ring-gray-700";
|
|
1119
|
-
const [openActionHeader, setOpenActionHeader] = (0,
|
|
1227
|
+
const [openActionHeader, setOpenActionHeader] = (0, import_react8.useState)(false);
|
|
1120
1228
|
function handleOpenActionHeader(e) {
|
|
1121
1229
|
e.stopPropagation();
|
|
1122
1230
|
setOpenActionHeader(!openActionHeader);
|
|
1123
1231
|
}
|
|
1124
|
-
(0,
|
|
1232
|
+
(0, import_react8.useEffect)(() => {
|
|
1125
1233
|
window.onclick = () => {
|
|
1126
1234
|
if (openActionHeader) {
|
|
1127
1235
|
setOpenActionHeader(false);
|
|
@@ -1129,7 +1237,7 @@ var ItemCard = ({
|
|
|
1129
1237
|
};
|
|
1130
1238
|
return () => window.onclick = null;
|
|
1131
1239
|
}, [openActionHeader]);
|
|
1132
|
-
return /* @__PURE__ */
|
|
1240
|
+
return /* @__PURE__ */ import_react8.default.createElement(
|
|
1133
1241
|
"div",
|
|
1134
1242
|
{
|
|
1135
1243
|
className: cn(
|
|
@@ -1145,7 +1253,7 @@ var ItemCard = ({
|
|
|
1145
1253
|
},
|
|
1146
1254
|
...props
|
|
1147
1255
|
},
|
|
1148
|
-
cardImage && /* @__PURE__ */
|
|
1256
|
+
cardImage && /* @__PURE__ */ import_react8.default.createElement("div", { className: "hawa-group hawa-relative hawa-overflow-clip" }, /* @__PURE__ */ import_react8.default.createElement(
|
|
1149
1257
|
"img",
|
|
1150
1258
|
{
|
|
1151
1259
|
src: cardImage,
|
|
@@ -1154,7 +1262,7 @@ var ItemCard = ({
|
|
|
1154
1262
|
clickableImage ? "hawa-overflow-clip hawa-transition-all group-hover:hawa-blur-lg" : ""
|
|
1155
1263
|
)
|
|
1156
1264
|
}
|
|
1157
|
-
), clickableImage && /* @__PURE__ */
|
|
1265
|
+
), clickableImage && /* @__PURE__ */ import_react8.default.createElement(StopPropagationWrapper, null, /* @__PURE__ */ import_react8.default.createElement("div", { className: "hawa-absolute hawa-left-0 hawa-top-0 hawa-flex hawa-h-full hawa-w-full hawa-items-center hawa-justify-center hawa-opacity-0 hawa-transition-all group-hover:hawa-opacity-100 " }, /* @__PURE__ */ import_react8.default.createElement(
|
|
1158
1266
|
Button,
|
|
1159
1267
|
{
|
|
1160
1268
|
variant: "secondary",
|
|
@@ -1164,19 +1272,19 @@ var ItemCard = ({
|
|
|
1164
1272
|
clickableImageActionIcon,
|
|
1165
1273
|
clickableImageActionText || "Click"
|
|
1166
1274
|
)))),
|
|
1167
|
-
/* @__PURE__ */
|
|
1275
|
+
/* @__PURE__ */ import_react8.default.createElement("div", { className: "hawa-relative hawa-w-full hawa-p-4 xs:hawa-p-6 xs:hawa-pb-2 xs:hawa-px-2" }, headerActions && /* @__PURE__ */ import_react8.default.createElement("div", { className: "hawa-absolute hawa-right-0 hawa-top-0 hawa-flex hawa-justify-end hawa-pr-3 hawa-pt-3" }, /* @__PURE__ */ import_react8.default.createElement(StopPropagationWrapper, null, /* @__PURE__ */ import_react8.default.createElement(
|
|
1168
1276
|
DropdownMenu,
|
|
1169
1277
|
{
|
|
1170
1278
|
items: headerActions,
|
|
1171
|
-
trigger: /* @__PURE__ */
|
|
1279
|
+
trigger: /* @__PURE__ */ import_react8.default.createElement(
|
|
1172
1280
|
Button,
|
|
1173
1281
|
{
|
|
1174
1282
|
variant: "ghost",
|
|
1175
1283
|
size: "smallIcon",
|
|
1176
1284
|
onClick: handleOpenActionHeader
|
|
1177
1285
|
},
|
|
1178
|
-
/* @__PURE__ */
|
|
1179
|
-
/* @__PURE__ */
|
|
1286
|
+
/* @__PURE__ */ import_react8.default.createElement("span", { className: "hawa-sr-only" }, "Open dropdown"),
|
|
1287
|
+
/* @__PURE__ */ import_react8.default.createElement(
|
|
1180
1288
|
"svg",
|
|
1181
1289
|
{
|
|
1182
1290
|
className: "hawa-h-5 hawa-w-5",
|
|
@@ -1184,11 +1292,11 @@ var ItemCard = ({
|
|
|
1184
1292
|
fill: "currentColor",
|
|
1185
1293
|
viewBox: "0 0 20 20"
|
|
1186
1294
|
},
|
|
1187
|
-
/* @__PURE__ */
|
|
1295
|
+
/* @__PURE__ */ import_react8.default.createElement("path", { d: "M10 6a2 2 0 110-4 2 2 0 010 4zM10 12a2 2 0 110-4 2 2 0 010 4zM10 18a2 2 0 110-4 2 2 0 010 4z" })
|
|
1188
1296
|
)
|
|
1189
1297
|
)
|
|
1190
1298
|
}
|
|
1191
|
-
))), /* @__PURE__ */
|
|
1299
|
+
))), /* @__PURE__ */ import_react8.default.createElement("div", { className: " hawa-mx-2" }, header && /* @__PURE__ */ import_react8.default.createElement("h5", { className: "hawa-mb-2 hawa-text-2xl hawa-font-bold hawa-tracking-tight " }, header), content && /* @__PURE__ */ import_react8.default.createElement("span", { className: "hawa-w-full hawa-font-normal " }, content)), actions || counts ? /* @__PURE__ */ import_react8.default.createElement(
|
|
1192
1300
|
"div",
|
|
1193
1301
|
{
|
|
1194
1302
|
className: cn(
|
|
@@ -1197,19 +1305,19 @@ var ItemCard = ({
|
|
|
1197
1305
|
)
|
|
1198
1306
|
},
|
|
1199
1307
|
counts,
|
|
1200
|
-
/* @__PURE__ */
|
|
1308
|
+
/* @__PURE__ */ import_react8.default.createElement(StopPropagationWrapper, null, actions)
|
|
1201
1309
|
) : null)
|
|
1202
1310
|
);
|
|
1203
1311
|
};
|
|
1204
1312
|
|
|
1205
1313
|
// components/elements/cards/LandingCard.tsx
|
|
1206
|
-
var
|
|
1314
|
+
var import_react9 = __toESM(require("react"));
|
|
1207
1315
|
var LandingCard = (props) => {
|
|
1208
|
-
return /* @__PURE__ */
|
|
1316
|
+
return /* @__PURE__ */ import_react9.default.createElement(Card, { className: props.className }, /* @__PURE__ */ import_react9.default.createElement(CardHeader, null, props.icon, /* @__PURE__ */ import_react9.default.createElement(CardTitle, null, props.title), /* @__PURE__ */ import_react9.default.createElement(CardDescription, null, props.subtitle)));
|
|
1209
1317
|
};
|
|
1210
1318
|
|
|
1211
1319
|
// components/elements/PinInput.tsx
|
|
1212
|
-
var
|
|
1320
|
+
var import_react10 = __toESM(require("react"));
|
|
1213
1321
|
var PinInput = ({
|
|
1214
1322
|
label,
|
|
1215
1323
|
icon,
|
|
@@ -1218,7 +1326,7 @@ var PinInput = ({
|
|
|
1218
1326
|
getPins,
|
|
1219
1327
|
...props
|
|
1220
1328
|
}) => {
|
|
1221
|
-
const [pin, setPin] = (0,
|
|
1329
|
+
const [pin, setPin] = (0, import_react10.useState)(Array.from(Array(digits)));
|
|
1222
1330
|
const handleKeyDown = (e, index) => {
|
|
1223
1331
|
let backTo = 0;
|
|
1224
1332
|
if (e.key === "Backspace") {
|
|
@@ -1227,7 +1335,7 @@ var PinInput = ({
|
|
|
1227
1335
|
previousInput == null ? void 0 : previousInput.focus();
|
|
1228
1336
|
}
|
|
1229
1337
|
};
|
|
1230
|
-
(0,
|
|
1338
|
+
(0, import_react10.useEffect)(() => {
|
|
1231
1339
|
let unfilled = pin.includes(void 0);
|
|
1232
1340
|
if (!unfilled && getPins) {
|
|
1233
1341
|
getPins(pin);
|
|
@@ -1252,13 +1360,13 @@ var PinInput = ({
|
|
|
1252
1360
|
}
|
|
1253
1361
|
}
|
|
1254
1362
|
};
|
|
1255
|
-
return /* @__PURE__ */
|
|
1363
|
+
return /* @__PURE__ */ import_react10.default.createElement("div", { className: "hawa-flex hawa-flex-col hawa-gap-2" }, /* @__PURE__ */ import_react10.default.createElement(
|
|
1256
1364
|
"div",
|
|
1257
1365
|
{
|
|
1258
1366
|
className: "hawa-flex hawa-w-full hawa-flex-row hawa-justify-center hawa-gap-2",
|
|
1259
1367
|
dir: "ltr"
|
|
1260
1368
|
},
|
|
1261
|
-
pin.map((value, index) => /* @__PURE__ */
|
|
1369
|
+
pin.map((value, index) => /* @__PURE__ */ import_react10.default.createElement(
|
|
1262
1370
|
"input",
|
|
1263
1371
|
{
|
|
1264
1372
|
key: index,
|
|
@@ -1277,7 +1385,7 @@ var PinInput = ({
|
|
|
1277
1385
|
...props
|
|
1278
1386
|
}
|
|
1279
1387
|
))
|
|
1280
|
-
), /* @__PURE__ */
|
|
1388
|
+
), /* @__PURE__ */ import_react10.default.createElement(
|
|
1281
1389
|
"p",
|
|
1282
1390
|
{
|
|
1283
1391
|
className: cn(
|
|
@@ -1290,7 +1398,7 @@ var PinInput = ({
|
|
|
1290
1398
|
};
|
|
1291
1399
|
|
|
1292
1400
|
// components/elements/PhoneInput.tsx
|
|
1293
|
-
var
|
|
1401
|
+
var import_react13 = __toESM(require("react"));
|
|
1294
1402
|
|
|
1295
1403
|
// components/countries.ts
|
|
1296
1404
|
var countries = [
|
|
@@ -2987,17 +3095,17 @@ var countries_default = countries;
|
|
|
2987
3095
|
|
|
2988
3096
|
// components/elements/Select.tsx
|
|
2989
3097
|
var import_clsx2 = __toESM(require("clsx"));
|
|
2990
|
-
var
|
|
3098
|
+
var import_react12 = __toESM(require("react"));
|
|
2991
3099
|
var import_react_select = __toESM(require("react-select"));
|
|
2992
3100
|
var import_creatable = __toESM(require("react-select/creatable"));
|
|
2993
3101
|
|
|
2994
3102
|
// components/elements/Label.tsx
|
|
2995
|
-
var
|
|
3103
|
+
var React16 = __toESM(require("react"));
|
|
2996
3104
|
|
|
2997
3105
|
// components/elements/Tooltip.tsx
|
|
2998
|
-
var
|
|
3106
|
+
var import_react11 = __toESM(require("react"));
|
|
2999
3107
|
var TooltipPrimitive = __toESM(require("@radix-ui/react-tooltip"));
|
|
3000
|
-
var TooltipContent =
|
|
3108
|
+
var TooltipContent = import_react11.default.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ import_react11.default.createElement(
|
|
3001
3109
|
TooltipPrimitive.Content,
|
|
3002
3110
|
{
|
|
3003
3111
|
ref,
|
|
@@ -3010,7 +3118,7 @@ var TooltipContent = import_react9.default.forwardRef(({ className, sideOffset =
|
|
|
3010
3118
|
}
|
|
3011
3119
|
));
|
|
3012
3120
|
TooltipContent.displayName = TooltipPrimitive.Content.displayName;
|
|
3013
|
-
var TooltipArrow =
|
|
3121
|
+
var TooltipArrow = import_react11.default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ import_react11.default.createElement(TooltipPrimitive.Arrow, { ref, className: cn(className), ...props }));
|
|
3014
3122
|
TooltipArrow.displayName = TooltipPrimitive.Arrow.displayName;
|
|
3015
3123
|
var Tooltip = ({
|
|
3016
3124
|
side,
|
|
@@ -3025,13 +3133,13 @@ var Tooltip = ({
|
|
|
3025
3133
|
delayDuration = 300,
|
|
3026
3134
|
...props
|
|
3027
3135
|
}) => {
|
|
3028
|
-
return /* @__PURE__ */
|
|
3136
|
+
return /* @__PURE__ */ import_react11.default.createElement(
|
|
3029
3137
|
TooltipPrimitive.TooltipProvider,
|
|
3030
3138
|
{
|
|
3031
3139
|
delayDuration,
|
|
3032
3140
|
...providerProps
|
|
3033
3141
|
},
|
|
3034
|
-
/* @__PURE__ */
|
|
3142
|
+
/* @__PURE__ */ import_react11.default.createElement(
|
|
3035
3143
|
TooltipPrimitive.Root,
|
|
3036
3144
|
{
|
|
3037
3145
|
open,
|
|
@@ -3039,14 +3147,14 @@ var Tooltip = ({
|
|
|
3039
3147
|
onOpenChange,
|
|
3040
3148
|
...props
|
|
3041
3149
|
},
|
|
3042
|
-
/* @__PURE__ */
|
|
3043
|
-
/* @__PURE__ */
|
|
3150
|
+
/* @__PURE__ */ import_react11.default.createElement(TooltipPrimitive.Trigger, { ...triggerProps }, children),
|
|
3151
|
+
/* @__PURE__ */ import_react11.default.createElement(TooltipContent, { side, align: "center", ...contentProps }, content)
|
|
3044
3152
|
)
|
|
3045
3153
|
);
|
|
3046
3154
|
};
|
|
3047
3155
|
|
|
3048
3156
|
// components/elements/Label.tsx
|
|
3049
|
-
var Label2 =
|
|
3157
|
+
var Label2 = React16.forwardRef(({ className, hint, hintSide, required, children, ...props }, ref) => /* @__PURE__ */ React16.createElement("div", { className: "hawa-transition-all hawa-flex hawa-flex-row hawa-gap-1 hawa-items-center" }, /* @__PURE__ */ React16.createElement(
|
|
3050
3158
|
"label",
|
|
3051
3159
|
{
|
|
3052
3160
|
ref,
|
|
@@ -3057,8 +3165,8 @@ var Label2 = React14.forwardRef(({ className, hint, hintSide, required, children
|
|
|
3057
3165
|
...props
|
|
3058
3166
|
},
|
|
3059
3167
|
children,
|
|
3060
|
-
required && /* @__PURE__ */
|
|
3061
|
-
), hint && /* @__PURE__ */
|
|
3168
|
+
required && /* @__PURE__ */ React16.createElement("span", { className: "hawa-text-red-500 hawa-mx-0.5" }, "*")
|
|
3169
|
+
), hint && /* @__PURE__ */ React16.createElement(Tooltip, { content: hint, side: hintSide }, /* @__PURE__ */ React16.createElement(
|
|
3062
3170
|
"svg",
|
|
3063
3171
|
{
|
|
3064
3172
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -3070,39 +3178,12 @@ var Label2 = React14.forwardRef(({ className, hint, hintSide, required, children
|
|
|
3070
3178
|
strokeLinecap: "round",
|
|
3071
3179
|
strokeLinejoin: "round"
|
|
3072
3180
|
},
|
|
3073
|
-
/* @__PURE__ */
|
|
3074
|
-
/* @__PURE__ */
|
|
3075
|
-
/* @__PURE__ */
|
|
3181
|
+
/* @__PURE__ */ React16.createElement("circle", { cx: "12", cy: "12", r: "10" }),
|
|
3182
|
+
/* @__PURE__ */ React16.createElement("path", { d: "M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3" }),
|
|
3183
|
+
/* @__PURE__ */ React16.createElement("path", { d: "M12 17h.01" })
|
|
3076
3184
|
))));
|
|
3077
3185
|
Label2.displayName = "Label";
|
|
3078
3186
|
|
|
3079
|
-
// components/elements/Skeleton.tsx
|
|
3080
|
-
var import_react10 = __toESM(require("react"));
|
|
3081
|
-
function Skeleton({
|
|
3082
|
-
className,
|
|
3083
|
-
content,
|
|
3084
|
-
animation = "pulse",
|
|
3085
|
-
...props
|
|
3086
|
-
}) {
|
|
3087
|
-
const animationStyles = {
|
|
3088
|
-
none: "hawa-rounded hawa-bg-muted",
|
|
3089
|
-
pulse: "hawa-animate-pulse hawa-rounded hawa-bg-muted",
|
|
3090
|
-
shimmer: "hawa-space-y-5 hawa-rounded hawa-bg-muted hawa-p-4 hawa-relative before:hawa-absolute before:hawa-inset-0 before:hawa--translate-x-full before:hawa-animate-[shimmer_2s_infinite] before:hawa-bg-gradient-to-r before:hawa-from-transparent before:hawa-via-gray-300/40 dark:before:hawa-via-white/10 before:hawa-to-transparent hawa-isolate hawa-overflow-hidden before:hawa-border-t before:hawa-border-rose-100/10"
|
|
3091
|
-
};
|
|
3092
|
-
return /* @__PURE__ */ import_react10.default.createElement(
|
|
3093
|
-
"div",
|
|
3094
|
-
{
|
|
3095
|
-
className: cn(
|
|
3096
|
-
animationStyles[animation],
|
|
3097
|
-
content && "hawa-flex hawa-flex-col hawa-justify-center hawa-items-center",
|
|
3098
|
-
className
|
|
3099
|
-
),
|
|
3100
|
-
...props
|
|
3101
|
-
},
|
|
3102
|
-
content && content
|
|
3103
|
-
);
|
|
3104
|
-
}
|
|
3105
|
-
|
|
3106
3187
|
// components/elements/Select.tsx
|
|
3107
3188
|
var Select = ({
|
|
3108
3189
|
labelProps,
|
|
@@ -3111,10 +3192,10 @@ var Select = ({
|
|
|
3111
3192
|
}) => {
|
|
3112
3193
|
const NoOption = () => {
|
|
3113
3194
|
var _a, _b;
|
|
3114
|
-
return /* @__PURE__ */
|
|
3195
|
+
return /* @__PURE__ */ import_react12.default.createElement("div", null, (_b = (_a = props.texts) == null ? void 0 : _a.noOptions) != null ? _b : "No Items Found");
|
|
3115
3196
|
};
|
|
3116
3197
|
const Control = ({ children, innerProps, innerRef }) => {
|
|
3117
|
-
return /* @__PURE__ */
|
|
3198
|
+
return /* @__PURE__ */ import_react12.default.createElement(
|
|
3118
3199
|
"div",
|
|
3119
3200
|
{
|
|
3120
3201
|
ref: innerRef,
|
|
@@ -3127,7 +3208,7 @@ var Select = ({
|
|
|
3127
3208
|
);
|
|
3128
3209
|
};
|
|
3129
3210
|
const Option = ({ children, innerProps, innerRef }) => {
|
|
3130
|
-
return /* @__PURE__ */
|
|
3211
|
+
return /* @__PURE__ */ import_react12.default.createElement(
|
|
3131
3212
|
"div",
|
|
3132
3213
|
{
|
|
3133
3214
|
ref: innerRef,
|
|
@@ -3148,7 +3229,7 @@ var Select = ({
|
|
|
3148
3229
|
...menuProps
|
|
3149
3230
|
}) => {
|
|
3150
3231
|
const menuOpen = menuProps.selectProps.menuIsOpen;
|
|
3151
|
-
return /* @__PURE__ */
|
|
3232
|
+
return /* @__PURE__ */ import_react12.default.createElement(
|
|
3152
3233
|
"div",
|
|
3153
3234
|
{
|
|
3154
3235
|
className: cn(
|
|
@@ -3162,7 +3243,7 @@ var Select = ({
|
|
|
3162
3243
|
children
|
|
3163
3244
|
);
|
|
3164
3245
|
};
|
|
3165
|
-
return /* @__PURE__ */
|
|
3246
|
+
return /* @__PURE__ */ import_react12.default.createElement(
|
|
3166
3247
|
"div",
|
|
3167
3248
|
{
|
|
3168
3249
|
className: cn(
|
|
@@ -3170,10 +3251,10 @@ var Select = ({
|
|
|
3170
3251
|
props.width === "fit" ? "hawa-w-fit" : "hawa-w-full"
|
|
3171
3252
|
)
|
|
3172
3253
|
},
|
|
3173
|
-
props.label && /* @__PURE__ */
|
|
3174
|
-
props.isLoading ? /* @__PURE__ */
|
|
3254
|
+
props.label && /* @__PURE__ */ import_react12.default.createElement(Label2, { ...labelProps }, props.label),
|
|
3255
|
+
props.isLoading ? /* @__PURE__ */ import_react12.default.createElement(Skeleton, { className: "hawa-h-[40px] hawa-w-full" }) : !props.isCreatable ? (
|
|
3175
3256
|
// TODO: enable keyboard to go to the next item in the list
|
|
3176
|
-
/* @__PURE__ */
|
|
3257
|
+
/* @__PURE__ */ import_react12.default.createElement(
|
|
3177
3258
|
import_react_select.default,
|
|
3178
3259
|
{
|
|
3179
3260
|
noOptionsMessage: NoOption,
|
|
@@ -3210,7 +3291,7 @@ var Select = ({
|
|
|
3210
3291
|
isSearchable: props.isSearchable
|
|
3211
3292
|
}
|
|
3212
3293
|
)
|
|
3213
|
-
) : /* @__PURE__ */
|
|
3294
|
+
) : /* @__PURE__ */ import_react12.default.createElement(
|
|
3214
3295
|
import_creatable.default,
|
|
3215
3296
|
{
|
|
3216
3297
|
formatCreateLabel: (inputValue) => {
|
|
@@ -3240,7 +3321,7 @@ var Select = ({
|
|
|
3240
3321
|
onInputChange: (newValue, action) => props.onInputChange(newValue, action)
|
|
3241
3322
|
}
|
|
3242
3323
|
),
|
|
3243
|
-
!props.hideHelperText && /* @__PURE__ */
|
|
3324
|
+
!props.hideHelperText && /* @__PURE__ */ import_react12.default.createElement(
|
|
3244
3325
|
"p",
|
|
3245
3326
|
{
|
|
3246
3327
|
className: cn(
|
|
@@ -3255,10 +3336,10 @@ var Select = ({
|
|
|
3255
3336
|
|
|
3256
3337
|
// components/elements/PhoneInput.tsx
|
|
3257
3338
|
var PhoneInput = ({ labelProps, ...props }) => {
|
|
3258
|
-
const [phoneNumber, setPhoneNumber] = (0,
|
|
3259
|
-
const [countryCode, setCountryCode] = (0,
|
|
3260
|
-
const inputRef = (0,
|
|
3261
|
-
(0,
|
|
3339
|
+
const [phoneNumber, setPhoneNumber] = (0, import_react13.useState)("");
|
|
3340
|
+
const [countryCode, setCountryCode] = (0, import_react13.useState)(props.preferredCountry);
|
|
3341
|
+
const inputRef = (0, import_react13.useRef)(null);
|
|
3342
|
+
(0, import_react13.useEffect)(() => {
|
|
3262
3343
|
var _a;
|
|
3263
3344
|
if (inputRef.current) {
|
|
3264
3345
|
(_a = inputRef.current) == null ? void 0 : _a.focus();
|
|
@@ -3276,7 +3357,7 @@ var PhoneInput = ({ labelProps, ...props }) => {
|
|
|
3276
3357
|
console.log("handleChange prop was not provided in <PhoneInput/>");
|
|
3277
3358
|
}
|
|
3278
3359
|
};
|
|
3279
|
-
return /* @__PURE__ */
|
|
3360
|
+
return /* @__PURE__ */ import_react13.default.createElement("div", { className: "hawa-flex hawa-flex-col hawa-w-full hawa-gap-2 hawa-h-fit" }, props.label && /* @__PURE__ */ import_react13.default.createElement(Label2, { ...labelProps }, props.label), /* @__PURE__ */ import_react13.default.createElement("div", { dir: "ltr", className: "hawa-flex hawa-flex-row hawa-w-full" }, /* @__PURE__ */ import_react13.default.createElement(
|
|
3280
3361
|
Select,
|
|
3281
3362
|
{
|
|
3282
3363
|
width: "fit",
|
|
@@ -3292,7 +3373,7 @@ var PhoneInput = ({ labelProps, ...props }) => {
|
|
|
3292
3373
|
value: countryCode == null ? void 0 : countryCode.label,
|
|
3293
3374
|
onChange: setCountryCode
|
|
3294
3375
|
}
|
|
3295
|
-
), /* @__PURE__ */
|
|
3376
|
+
), /* @__PURE__ */ import_react13.default.createElement("div", { className: "hawa-flex hawa-h-fit hawa-relative hawa-flex-col hawa-justify-center hawa-w-full hawa-gap-0" }, /* @__PURE__ */ import_react13.default.createElement(
|
|
3296
3377
|
"input",
|
|
3297
3378
|
{
|
|
3298
3379
|
ref: inputRef,
|
|
@@ -3305,7 +3386,7 @@ var PhoneInput = ({ labelProps, ...props }) => {
|
|
|
3305
3386
|
type: "tel",
|
|
3306
3387
|
placeholder: "531045453"
|
|
3307
3388
|
}
|
|
3308
|
-
))), /* @__PURE__ */
|
|
3389
|
+
))), /* @__PURE__ */ import_react13.default.createElement(
|
|
3309
3390
|
"p",
|
|
3310
3391
|
{
|
|
3311
3392
|
className: cn(
|
|
@@ -3318,7 +3399,7 @@ var PhoneInput = ({ labelProps, ...props }) => {
|
|
|
3318
3399
|
};
|
|
3319
3400
|
|
|
3320
3401
|
// components/elements/Checkbox.tsx
|
|
3321
|
-
var
|
|
3402
|
+
var React19 = __toESM(require("react"));
|
|
3322
3403
|
var CheckboxPrimitive = __toESM(require("@radix-ui/react-checkbox"));
|
|
3323
3404
|
var Checkbox = ({
|
|
3324
3405
|
id,
|
|
@@ -3328,7 +3409,7 @@ var Checkbox = ({
|
|
|
3328
3409
|
disabled,
|
|
3329
3410
|
...props
|
|
3330
3411
|
}) => {
|
|
3331
|
-
return /* @__PURE__ */
|
|
3412
|
+
return /* @__PURE__ */ React19.createElement("div", { className: "hawa-items-top hawa-flex hawa-gap-2 " }, /* @__PURE__ */ React19.createElement(CheckboxElement, { ...props, disabled, id }), (label || helperText) && /* @__PURE__ */ React19.createElement("div", { className: "hawa-grid hawa-gap-1.5 hawa-leading-none" }, label && /* @__PURE__ */ React19.createElement(
|
|
3332
3413
|
"label",
|
|
3333
3414
|
{
|
|
3334
3415
|
htmlFor: id,
|
|
@@ -3338,7 +3419,7 @@ var Checkbox = ({
|
|
|
3338
3419
|
)
|
|
3339
3420
|
},
|
|
3340
3421
|
label
|
|
3341
|
-
), sublabel && /* @__PURE__ */
|
|
3422
|
+
), sublabel && /* @__PURE__ */ React19.createElement(
|
|
3342
3423
|
"label",
|
|
3343
3424
|
{
|
|
3344
3425
|
htmlFor: id,
|
|
@@ -3348,7 +3429,7 @@ var Checkbox = ({
|
|
|
3348
3429
|
)
|
|
3349
3430
|
},
|
|
3350
3431
|
sublabel
|
|
3351
|
-
), helperText && !disabled && /* @__PURE__ */
|
|
3432
|
+
), helperText && !disabled && /* @__PURE__ */ React19.createElement(
|
|
3352
3433
|
"label",
|
|
3353
3434
|
{
|
|
3354
3435
|
htmlFor: id,
|
|
@@ -3360,7 +3441,7 @@ var Checkbox = ({
|
|
|
3360
3441
|
helperText
|
|
3361
3442
|
)));
|
|
3362
3443
|
};
|
|
3363
|
-
var CheckboxElement =
|
|
3444
|
+
var CheckboxElement = React19.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React19.createElement(
|
|
3364
3445
|
CheckboxPrimitive.Root,
|
|
3365
3446
|
{
|
|
3366
3447
|
ref,
|
|
@@ -3370,14 +3451,14 @@ var CheckboxElement = React18.forwardRef(({ className, ...props }, ref) => /* @_
|
|
|
3370
3451
|
),
|
|
3371
3452
|
...props
|
|
3372
3453
|
},
|
|
3373
|
-
/* @__PURE__ */
|
|
3454
|
+
/* @__PURE__ */ React19.createElement(
|
|
3374
3455
|
CheckboxPrimitive.Indicator,
|
|
3375
3456
|
{
|
|
3376
3457
|
className: cn(
|
|
3377
3458
|
"hawa-flex hawa-items-center hawa-justify-center hawa-text-current"
|
|
3378
3459
|
)
|
|
3379
3460
|
},
|
|
3380
|
-
/* @__PURE__ */
|
|
3461
|
+
/* @__PURE__ */ React19.createElement(
|
|
3381
3462
|
"svg",
|
|
3382
3463
|
{
|
|
3383
3464
|
"aria-label": "Check Mark",
|
|
@@ -3388,7 +3469,7 @@ var CheckboxElement = React18.forwardRef(({ className, ...props }, ref) => /* @_
|
|
|
3388
3469
|
height: "0.60em",
|
|
3389
3470
|
width: "0.60em"
|
|
3390
3471
|
},
|
|
3391
|
-
/* @__PURE__ */
|
|
3472
|
+
/* @__PURE__ */ React19.createElement("path", { d: "M173.898 439.404l-166.4-166.4c-9.997-9.997-9.997-26.206 0-36.204l36.203-36.204c9.997-9.998 26.207-9.998 36.204 0L192 312.69 432.095 72.596c9.997-9.997 26.207-9.997 36.204 0l36.203 36.204c9.997 9.997 9.997 26.206 0 36.204l-294.4 294.401c-9.998 9.997-26.207 9.997-36.204-.001z" })
|
|
3392
3473
|
),
|
|
3393
3474
|
" "
|
|
3394
3475
|
)
|
|
@@ -3396,7 +3477,7 @@ var CheckboxElement = React18.forwardRef(({ className, ...props }, ref) => /* @_
|
|
|
3396
3477
|
CheckboxElement.displayName = CheckboxPrimitive.Root.displayName;
|
|
3397
3478
|
|
|
3398
3479
|
// components/elements/Radio.tsx
|
|
3399
|
-
var
|
|
3480
|
+
var import_react14 = __toESM(require("react"));
|
|
3400
3481
|
var Radio = ({
|
|
3401
3482
|
design = "default",
|
|
3402
3483
|
width = "default",
|
|
@@ -3405,7 +3486,7 @@ var Radio = ({
|
|
|
3405
3486
|
...props
|
|
3406
3487
|
}) => {
|
|
3407
3488
|
var _a, _b, _c;
|
|
3408
|
-
const [selectedOption, setSelectedOption] = (0,
|
|
3489
|
+
const [selectedOption, setSelectedOption] = (0, import_react14.useState)(props.defaultValue);
|
|
3409
3490
|
let activeTabStyle = "hawa-inline-block hawa-py-2 hawa-px-4 hawa-w-full hawa-text-primary-foreground hawa-bg-primary hawa-active dark:hawa-bg-primary ";
|
|
3410
3491
|
let inactiveTabStyle = "hawa-inline-block hawa-py-2 hawa-px-4 hawa-w-full hawa-transition-all hover:hawa-bg-primary/10 dark:hawa-bg-background hawa-bg-primary/5 dark:hover:hawa-text-white dark:hawa-bg-primary/5";
|
|
3411
3492
|
let orientationStyle = {
|
|
@@ -3416,11 +3497,11 @@ var Radio = ({
|
|
|
3416
3497
|
default: "hawa-max-w-fit",
|
|
3417
3498
|
full: "hawa-w-full"
|
|
3418
3499
|
};
|
|
3419
|
-
const [parentDirection, setParentDirection] =
|
|
3500
|
+
const [parentDirection, setParentDirection] = import_react14.default.useState(
|
|
3420
3501
|
null
|
|
3421
3502
|
);
|
|
3422
|
-
const parentRef = (0,
|
|
3423
|
-
(0,
|
|
3503
|
+
const parentRef = (0, import_react14.useRef)(null);
|
|
3504
|
+
(0, import_react14.useEffect)(() => {
|
|
3424
3505
|
var _a2;
|
|
3425
3506
|
const parentNode = (_a2 = parentRef.current) == null ? void 0 : _a2.parentNode;
|
|
3426
3507
|
if (parentNode) {
|
|
@@ -3430,7 +3511,7 @@ var Radio = ({
|
|
|
3430
3511
|
});
|
|
3431
3512
|
switch (design) {
|
|
3432
3513
|
case "tabs":
|
|
3433
|
-
return /* @__PURE__ */
|
|
3514
|
+
return /* @__PURE__ */ import_react14.default.createElement(
|
|
3434
3515
|
"ul",
|
|
3435
3516
|
{
|
|
3436
3517
|
ref: parentRef,
|
|
@@ -3441,7 +3522,7 @@ var Radio = ({
|
|
|
3441
3522
|
orientationStyle[orientation]
|
|
3442
3523
|
)
|
|
3443
3524
|
},
|
|
3444
|
-
(_b = props.options) == null ? void 0 : _b.map((opt, o) => /* @__PURE__ */
|
|
3525
|
+
(_b = props.options) == null ? void 0 : _b.map((opt, o) => /* @__PURE__ */ import_react14.default.createElement(
|
|
3445
3526
|
"li",
|
|
3446
3527
|
{
|
|
3447
3528
|
"aria-current": "page",
|
|
@@ -3468,13 +3549,13 @@ var Radio = ({
|
|
|
3468
3549
|
))
|
|
3469
3550
|
);
|
|
3470
3551
|
case "bordered":
|
|
3471
|
-
return /* @__PURE__ */
|
|
3552
|
+
return /* @__PURE__ */ import_react14.default.createElement("div", { className: cn(orientationStyle[orientation], "hawa-gap-4") }, props.options && props.options.map((opt, i) => /* @__PURE__ */ import_react14.default.createElement(
|
|
3472
3553
|
"div",
|
|
3473
3554
|
{
|
|
3474
3555
|
key: i,
|
|
3475
3556
|
className: "hawa-rounded hawa-border hawa-border-gray-200 "
|
|
3476
3557
|
},
|
|
3477
|
-
/* @__PURE__ */
|
|
3558
|
+
/* @__PURE__ */ import_react14.default.createElement(
|
|
3478
3559
|
"div",
|
|
3479
3560
|
{
|
|
3480
3561
|
className: cn(
|
|
@@ -3483,7 +3564,7 @@ var Radio = ({
|
|
|
3483
3564
|
),
|
|
3484
3565
|
key: i + 1
|
|
3485
3566
|
},
|
|
3486
|
-
/* @__PURE__ */
|
|
3567
|
+
/* @__PURE__ */ import_react14.default.createElement(
|
|
3487
3568
|
"input",
|
|
3488
3569
|
{
|
|
3489
3570
|
disabled: opt.disabled,
|
|
@@ -3493,7 +3574,7 @@ var Radio = ({
|
|
|
3493
3574
|
name: "bordered-radio"
|
|
3494
3575
|
}
|
|
3495
3576
|
),
|
|
3496
|
-
/* @__PURE__ */
|
|
3577
|
+
/* @__PURE__ */ import_react14.default.createElement(
|
|
3497
3578
|
"label",
|
|
3498
3579
|
{
|
|
3499
3580
|
htmlFor: opt.value.toString(),
|
|
@@ -3507,7 +3588,7 @@ var Radio = ({
|
|
|
3507
3588
|
)
|
|
3508
3589
|
)));
|
|
3509
3590
|
case "cards":
|
|
3510
|
-
return /* @__PURE__ */
|
|
3591
|
+
return /* @__PURE__ */ import_react14.default.createElement("ul", { className: cn(orientationStyle[orientation], "hawa-gap-4") }, (_c = props.options) == null ? void 0 : _c.map((opt, o) => /* @__PURE__ */ import_react14.default.createElement("li", { key: o }, /* @__PURE__ */ import_react14.default.createElement(
|
|
3511
3592
|
"input",
|
|
3512
3593
|
{
|
|
3513
3594
|
type: "radio",
|
|
@@ -3518,7 +3599,7 @@ var Radio = ({
|
|
|
3518
3599
|
required: true,
|
|
3519
3600
|
disabled: opt.disabled
|
|
3520
3601
|
}
|
|
3521
|
-
), /* @__PURE__ */
|
|
3602
|
+
), /* @__PURE__ */ import_react14.default.createElement(
|
|
3522
3603
|
"label",
|
|
3523
3604
|
{
|
|
3524
3605
|
htmlFor: opt.value.toString(),
|
|
@@ -3527,10 +3608,10 @@ var Radio = ({
|
|
|
3527
3608
|
opt.disabled ? "hawa-opacity-50" : "hawa-cursor-pointer hover:hawa-bg-gray-100 hover:hawa-text-gray-600 dark:hover:hawa-bg-gray-700 dark:hover:hawa-text-gray-300"
|
|
3528
3609
|
)
|
|
3529
3610
|
},
|
|
3530
|
-
/* @__PURE__ */
|
|
3611
|
+
/* @__PURE__ */ import_react14.default.createElement("div", { className: "hawa-block hawa-h-full hawa-w-full" }, /* @__PURE__ */ import_react14.default.createElement("div", { className: "hawa-w-full hawa-text-lg hawa-font-semibold" }, opt.label), /* @__PURE__ */ import_react14.default.createElement("div", { className: "hawa-w-full" }, opt.sublabel))
|
|
3531
3612
|
))));
|
|
3532
3613
|
default:
|
|
3533
|
-
return /* @__PURE__ */
|
|
3614
|
+
return /* @__PURE__ */ import_react14.default.createElement("div", { className: "hawa-flex hawa-flex-col hawa-gap-2" }, props.label && /* @__PURE__ */ import_react14.default.createElement(Label2, { ...labelProps }, props.label), /* @__PURE__ */ import_react14.default.createElement("div", { className: cn(orientationStyle[orientation], "hawa-gap-2") }, props.options && props.options.map((opt, i) => /* @__PURE__ */ import_react14.default.createElement(
|
|
3534
3615
|
"div",
|
|
3535
3616
|
{
|
|
3536
3617
|
className: cn(
|
|
@@ -3539,7 +3620,7 @@ var Radio = ({
|
|
|
3539
3620
|
),
|
|
3540
3621
|
key: i + 1
|
|
3541
3622
|
},
|
|
3542
|
-
/* @__PURE__ */
|
|
3623
|
+
/* @__PURE__ */ import_react14.default.createElement(
|
|
3543
3624
|
"input",
|
|
3544
3625
|
{
|
|
3545
3626
|
disabled: opt.disabled,
|
|
@@ -3557,7 +3638,7 @@ var Radio = ({
|
|
|
3557
3638
|
}
|
|
3558
3639
|
}
|
|
3559
3640
|
),
|
|
3560
|
-
/* @__PURE__ */
|
|
3641
|
+
/* @__PURE__ */ import_react14.default.createElement(
|
|
3561
3642
|
"label",
|
|
3562
3643
|
{
|
|
3563
3644
|
htmlFor: opt.value.toString(),
|
|
@@ -3568,7 +3649,7 @@ var Radio = ({
|
|
|
3568
3649
|
},
|
|
3569
3650
|
opt.label
|
|
3570
3651
|
)
|
|
3571
|
-
))), /* @__PURE__ */
|
|
3652
|
+
))), /* @__PURE__ */ import_react14.default.createElement(
|
|
3572
3653
|
"p",
|
|
3573
3654
|
{
|
|
3574
3655
|
className: cn(
|
|
@@ -3582,15 +3663,15 @@ var Radio = ({
|
|
|
3582
3663
|
};
|
|
3583
3664
|
|
|
3584
3665
|
// components/elements/Switch.tsx
|
|
3585
|
-
var
|
|
3666
|
+
var React21 = __toESM(require("react"));
|
|
3586
3667
|
var SwitchPrimitives = __toESM(require("@radix-ui/react-switch"));
|
|
3587
|
-
var Switch =
|
|
3668
|
+
var Switch = React21.forwardRef(
|
|
3588
3669
|
({ className, size = "default", roundedness = "inherit", label, ...props }, ref) => {
|
|
3589
|
-
const [parentDirection, setParentDirection] =
|
|
3670
|
+
const [parentDirection, setParentDirection] = React21.useState(
|
|
3590
3671
|
null
|
|
3591
3672
|
);
|
|
3592
|
-
const parentRef =
|
|
3593
|
-
|
|
3673
|
+
const parentRef = React21.useRef(null);
|
|
3674
|
+
React21.useEffect(() => {
|
|
3594
3675
|
var _a;
|
|
3595
3676
|
const parentNode = (_a = parentRef.current) == null ? void 0 : _a.parentNode;
|
|
3596
3677
|
if (parentNode) {
|
|
@@ -3618,13 +3699,13 @@ var Switch = React20.forwardRef(
|
|
|
3618
3699
|
full: "hawa-rounded-full",
|
|
3619
3700
|
inherit: "hawa-rounded-inner"
|
|
3620
3701
|
};
|
|
3621
|
-
return /* @__PURE__ */
|
|
3702
|
+
return /* @__PURE__ */ React21.createElement(
|
|
3622
3703
|
"div",
|
|
3623
3704
|
{
|
|
3624
3705
|
className: "hawa-flex hawa-flex-row hawa-items-center",
|
|
3625
3706
|
ref: parentRef
|
|
3626
3707
|
},
|
|
3627
|
-
/* @__PURE__ */
|
|
3708
|
+
/* @__PURE__ */ React21.createElement(
|
|
3628
3709
|
SwitchPrimitives.Root,
|
|
3629
3710
|
{
|
|
3630
3711
|
className: cn(
|
|
@@ -3638,7 +3719,7 @@ var Switch = React20.forwardRef(
|
|
|
3638
3719
|
...props,
|
|
3639
3720
|
ref
|
|
3640
3721
|
},
|
|
3641
|
-
/* @__PURE__ */
|
|
3722
|
+
/* @__PURE__ */ React21.createElement(
|
|
3642
3723
|
SwitchPrimitives.Thumb,
|
|
3643
3724
|
{
|
|
3644
3725
|
className: cn(
|
|
@@ -3652,17 +3733,17 @@ var Switch = React20.forwardRef(
|
|
|
3652
3733
|
}
|
|
3653
3734
|
)
|
|
3654
3735
|
),
|
|
3655
|
-
label && /* @__PURE__ */
|
|
3736
|
+
label && /* @__PURE__ */ React21.createElement("span", { className: "hawa-mx-2 hawa-text-sm hawa-font-medium hawa-text-gray-900 dark:hawa-text-gray-300" }, label)
|
|
3656
3737
|
);
|
|
3657
3738
|
}
|
|
3658
3739
|
);
|
|
3659
3740
|
Switch.displayName = SwitchPrimitives.Root.displayName;
|
|
3660
3741
|
|
|
3661
3742
|
// components/elements/Textarea.tsx
|
|
3662
|
-
var
|
|
3663
|
-
var Textarea =
|
|
3743
|
+
var React22 = __toESM(require("react"));
|
|
3744
|
+
var Textarea = React22.forwardRef(
|
|
3664
3745
|
({ className, ...props }, ref) => {
|
|
3665
|
-
return /* @__PURE__ */
|
|
3746
|
+
return /* @__PURE__ */ React22.createElement("div", { className: "hawa-flex hawa-flex-col hawa-gap-2" }, /* @__PURE__ */ React22.createElement(
|
|
3666
3747
|
"textarea",
|
|
3667
3748
|
{
|
|
3668
3749
|
className: cn(
|
|
@@ -3672,7 +3753,7 @@ var Textarea = React21.forwardRef(
|
|
|
3672
3753
|
ref,
|
|
3673
3754
|
...props
|
|
3674
3755
|
}
|
|
3675
|
-
), /* @__PURE__ */
|
|
3756
|
+
), /* @__PURE__ */ React22.createElement(
|
|
3676
3757
|
"p",
|
|
3677
3758
|
{
|
|
3678
3759
|
className: cn(
|
|
@@ -3687,9 +3768,9 @@ var Textarea = React21.forwardRef(
|
|
|
3687
3768
|
Textarea.displayName = "Textarea";
|
|
3688
3769
|
|
|
3689
3770
|
// components/elements/Slider.tsx
|
|
3690
|
-
var
|
|
3771
|
+
var React23 = __toESM(require("react"));
|
|
3691
3772
|
var SliderPrimitive = __toESM(require("@radix-ui/react-slider"));
|
|
3692
|
-
var Slider =
|
|
3773
|
+
var Slider = React23.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React23.createElement(
|
|
3693
3774
|
SliderPrimitive.Root,
|
|
3694
3775
|
{
|
|
3695
3776
|
ref,
|
|
@@ -3699,13 +3780,13 @@ var Slider = React22.forwardRef(({ className, ...props }, ref) => /* @__PURE__ *
|
|
|
3699
3780
|
),
|
|
3700
3781
|
...props
|
|
3701
3782
|
},
|
|
3702
|
-
/* @__PURE__ */
|
|
3703
|
-
/* @__PURE__ */
|
|
3783
|
+
/* @__PURE__ */ React23.createElement(SliderPrimitive.Track, { className: "hawa-relative hawa-h-2 hawa-w-full hawa-grow hawa-overflow-hidden hawa-rounded-full hawa-bg-background hawa-border" }, /* @__PURE__ */ React23.createElement(SliderPrimitive.Range, { className: "hawa-absolute hawa-h-full hawa-bg-primary" })),
|
|
3784
|
+
/* @__PURE__ */ React23.createElement(SliderPrimitive.Thumb, { className: "hawa-block hawa-h-5 hawa-w-5 hawa-rounded-full hawa-border-2 hawa-border-primary hawa-bg-background hawa-ring-offset-background hawa-transition-colors focus-visible:hawa-outline-none focus-visible:hawa-ring-2 focus-visible:hawa-ring-ring focus-visible:hawa-ring-offset-2 disabled:hawa-pointer-events-none disabled:hawa-opacity-50" })
|
|
3704
3785
|
));
|
|
3705
3786
|
Slider.displayName = SliderPrimitive.Root.displayName;
|
|
3706
3787
|
|
|
3707
3788
|
// components/elements/ColorPicker.tsx
|
|
3708
|
-
var
|
|
3789
|
+
var import_react15 = __toESM(require("react"));
|
|
3709
3790
|
var ColorPicker = ({
|
|
3710
3791
|
containerProps,
|
|
3711
3792
|
colorPickerProps,
|
|
@@ -3713,8 +3794,8 @@ var ColorPicker = ({
|
|
|
3713
3794
|
labelProps,
|
|
3714
3795
|
...props
|
|
3715
3796
|
}) => {
|
|
3716
|
-
const [selectedColor, setSelectedColor] = (0,
|
|
3717
|
-
(0,
|
|
3797
|
+
const [selectedColor, setSelectedColor] = (0, import_react15.useState)(props.color);
|
|
3798
|
+
(0, import_react15.useEffect)(() => {
|
|
3718
3799
|
if (selectedColor && selectedColor[0] !== "#") {
|
|
3719
3800
|
setSelectedColor(`#${selectedColor}`);
|
|
3720
3801
|
}
|
|
@@ -3736,13 +3817,13 @@ var ColorPicker = ({
|
|
|
3736
3817
|
inputElement.dispatchEvent(event);
|
|
3737
3818
|
}
|
|
3738
3819
|
};
|
|
3739
|
-
return /* @__PURE__ */
|
|
3820
|
+
return /* @__PURE__ */ import_react15.default.createElement("div", { className: "hawa-flex hawa-flex-col hawa-w-full hawa-gap-2" }, props.label && /* @__PURE__ */ import_react15.default.createElement(Label2, { ...labelProps }, props.label), /* @__PURE__ */ import_react15.default.createElement("div", { dir: "ltr", className: "hawa-flex hawa-flex-row hawa-w-full" }, /* @__PURE__ */ import_react15.default.createElement(
|
|
3740
3821
|
"div",
|
|
3741
3822
|
{
|
|
3742
3823
|
style: { height: 40, backgroundColor: selectedColor },
|
|
3743
3824
|
className: "hawa-rounded-bl-lg hawa-rounded-tl-lg hawa-border"
|
|
3744
3825
|
},
|
|
3745
|
-
/* @__PURE__ */
|
|
3826
|
+
/* @__PURE__ */ import_react15.default.createElement(
|
|
3746
3827
|
"input",
|
|
3747
3828
|
{
|
|
3748
3829
|
type: "color",
|
|
@@ -3760,7 +3841,7 @@ var ColorPicker = ({
|
|
|
3760
3841
|
...colorPickerProps
|
|
3761
3842
|
}
|
|
3762
3843
|
)
|
|
3763
|
-
), /* @__PURE__ */
|
|
3844
|
+
), /* @__PURE__ */ import_react15.default.createElement("div", { className: "hawa-flex hawa-max-h-fit hawa-relative hawa-flex-col hawa-justify-center hawa-w-full hawa-gap-0" }, /* @__PURE__ */ import_react15.default.createElement(
|
|
3764
3845
|
"input",
|
|
3765
3846
|
{
|
|
3766
3847
|
maxLength: 7,
|
|
@@ -3773,7 +3854,7 @@ var ColorPicker = ({
|
|
|
3773
3854
|
),
|
|
3774
3855
|
...textInputProps
|
|
3775
3856
|
}
|
|
3776
|
-
))), /* @__PURE__ */
|
|
3857
|
+
))), /* @__PURE__ */ import_react15.default.createElement(
|
|
3777
3858
|
"p",
|
|
3778
3859
|
{
|
|
3779
3860
|
className: cn(
|
|
@@ -3786,8 +3867,8 @@ var ColorPicker = ({
|
|
|
3786
3867
|
};
|
|
3787
3868
|
|
|
3788
3869
|
// components/elements/Input.tsx
|
|
3789
|
-
var
|
|
3790
|
-
var Input = (0,
|
|
3870
|
+
var import_react16 = __toESM(require("react"));
|
|
3871
|
+
var Input = (0, import_react16.forwardRef)(
|
|
3791
3872
|
({
|
|
3792
3873
|
margin = "none",
|
|
3793
3874
|
width = "full",
|
|
@@ -3813,7 +3894,7 @@ var Input = (0, import_react15.forwardRef)(
|
|
|
3813
3894
|
};
|
|
3814
3895
|
let defaultStyle = "hawa-flex hawa-max-h-fit hawa-h-fit hawa-relative hawa-flex-col hawa-justify-center hawa-gap-0";
|
|
3815
3896
|
let defaultInputStyle = "hawa-block hawa-w-full hawa-rounded hawa-border hawa-transition-all hawa-bg-background hawa-p-3 hawa-text-sm ";
|
|
3816
|
-
return /* @__PURE__ */
|
|
3897
|
+
return /* @__PURE__ */ import_react16.default.createElement(
|
|
3817
3898
|
"div",
|
|
3818
3899
|
{
|
|
3819
3900
|
className: cn(
|
|
@@ -3824,8 +3905,8 @@ var Input = (0, import_react15.forwardRef)(
|
|
|
3824
3905
|
"hawa-w-full hawa-gap-2"
|
|
3825
3906
|
)
|
|
3826
3907
|
},
|
|
3827
|
-
props.label && /* @__PURE__ */
|
|
3828
|
-
props.isLoading ? /* @__PURE__ */
|
|
3908
|
+
props.label && /* @__PURE__ */ import_react16.default.createElement(Label2, { ...labelProps }, props.label),
|
|
3909
|
+
props.isLoading ? /* @__PURE__ */ import_react16.default.createElement("div", { className: "hawa-pb-2" }, /* @__PURE__ */ import_react16.default.createElement(Skeleton, { className: "hawa-h-[40px] hawa-w-full" })) : /* @__PURE__ */ import_react16.default.createElement(import_react16.default.Fragment, null, !props.hideSeparator && /* @__PURE__ */ import_react16.default.createElement(
|
|
3829
3910
|
"div",
|
|
3830
3911
|
{
|
|
3831
3912
|
className: cn(
|
|
@@ -3833,7 +3914,7 @@ var Input = (0, import_react15.forwardRef)(
|
|
|
3833
3914
|
preview ? "hawa-opacity-100" : "hawa-opacity-0"
|
|
3834
3915
|
)
|
|
3835
3916
|
}
|
|
3836
|
-
), /* @__PURE__ */
|
|
3917
|
+
), /* @__PURE__ */ import_react16.default.createElement(import_react16.default.Fragment, null, /* @__PURE__ */ import_react16.default.createElement("div", { className: cn("hawa-relative") }, props.startIcon && /* @__PURE__ */ import_react16.default.createElement("div", { className: "hawa-absolute hawa-start-3 hawa-top-1/2 hawa--translate-y-1/2" }, props.startIcon), props.endIcon && /* @__PURE__ */ import_react16.default.createElement(
|
|
3837
3918
|
"div",
|
|
3838
3919
|
{
|
|
3839
3920
|
className: cn(
|
|
@@ -3842,7 +3923,7 @@ var Input = (0, import_react15.forwardRef)(
|
|
|
3842
3923
|
)
|
|
3843
3924
|
},
|
|
3844
3925
|
props.endIcon
|
|
3845
|
-
), /* @__PURE__ */
|
|
3926
|
+
), /* @__PURE__ */ import_react16.default.createElement(
|
|
3846
3927
|
"input",
|
|
3847
3928
|
{
|
|
3848
3929
|
...props,
|
|
@@ -3868,7 +3949,7 @@ var Input = (0, import_react15.forwardRef)(
|
|
|
3868
3949
|
(_b = props.inputProps) == null ? void 0 : _b.className
|
|
3869
3950
|
)
|
|
3870
3951
|
}
|
|
3871
|
-
)), !forceHideHelperText && /* @__PURE__ */
|
|
3952
|
+
)), !forceHideHelperText && /* @__PURE__ */ import_react16.default.createElement(
|
|
3872
3953
|
"p",
|
|
3873
3954
|
{
|
|
3874
3955
|
className: cn(
|
|
@@ -3877,7 +3958,7 @@ var Input = (0, import_react15.forwardRef)(
|
|
|
3877
3958
|
)
|
|
3878
3959
|
},
|
|
3879
3960
|
props.helperText
|
|
3880
|
-
), !props.disabled && forceHideHelperText && /* @__PURE__ */
|
|
3961
|
+
), !props.disabled && forceHideHelperText && /* @__PURE__ */ import_react16.default.createElement(
|
|
3881
3962
|
"div",
|
|
3882
3963
|
{
|
|
3883
3964
|
className: cn(
|
|
@@ -3886,7 +3967,7 @@ var Input = (0, import_react15.forwardRef)(
|
|
|
3886
3967
|
)
|
|
3887
3968
|
},
|
|
3888
3969
|
props.helperText
|
|
3889
|
-
), showCount && /* @__PURE__ */
|
|
3970
|
+
), showCount && /* @__PURE__ */ import_react16.default.createElement(
|
|
3890
3971
|
"div",
|
|
3891
3972
|
{
|
|
3892
3973
|
className: cn(
|
|
@@ -3907,20 +3988,20 @@ var Input = (0, import_react15.forwardRef)(
|
|
|
3907
3988
|
);
|
|
3908
3989
|
|
|
3909
3990
|
// components/elements/Combobox.tsx
|
|
3910
|
-
var
|
|
3991
|
+
var React29 = __toESM(require("react"));
|
|
3911
3992
|
var PopoverPrimitive2 = __toESM(require("@radix-ui/react-popover"));
|
|
3912
3993
|
|
|
3913
3994
|
// components/elements/Command.tsx
|
|
3914
|
-
var
|
|
3995
|
+
var React27 = __toESM(require("react"));
|
|
3915
3996
|
var import_cmdk = require("cmdk");
|
|
3916
3997
|
|
|
3917
3998
|
// components/elements/Dialog.tsx
|
|
3918
|
-
var
|
|
3999
|
+
var React26 = __toESM(require("react"));
|
|
3919
4000
|
var DialogPrimitive = __toESM(require("@radix-ui/react-dialog"));
|
|
3920
4001
|
var Dialog = DialogPrimitive.Root;
|
|
3921
4002
|
var DialogTrigger = DialogPrimitive.Trigger;
|
|
3922
|
-
var DialogPortal = ({ ...props }) => /* @__PURE__ */
|
|
3923
|
-
var DialogOverlay =
|
|
4003
|
+
var DialogPortal = ({ ...props }) => /* @__PURE__ */ React26.createElement(DialogPrimitive.Portal, { ...props });
|
|
4004
|
+
var DialogOverlay = React26.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React26.createElement(
|
|
3924
4005
|
DialogPrimitive.Overlay,
|
|
3925
4006
|
{
|
|
3926
4007
|
ref,
|
|
@@ -3931,7 +4012,7 @@ var DialogOverlay = React25.forwardRef(({ className, ...props }, ref) => /* @__P
|
|
|
3931
4012
|
...props
|
|
3932
4013
|
}
|
|
3933
4014
|
));
|
|
3934
|
-
var DialogContent =
|
|
4015
|
+
var DialogContent = React26.forwardRef(({ className, children, persist, ...props }, ref) => /* @__PURE__ */ React26.createElement(DialogPortal, null, /* @__PURE__ */ React26.createElement(DialogOverlay, null), /* @__PURE__ */ React26.createElement(
|
|
3935
4016
|
DialogPrimitive.Content,
|
|
3936
4017
|
{
|
|
3937
4018
|
onPointerDownOutside: (e) => {
|
|
@@ -3947,7 +4028,7 @@ var DialogContent = React25.forwardRef(({ className, children, persist, ...props
|
|
|
3947
4028
|
...props
|
|
3948
4029
|
},
|
|
3949
4030
|
children,
|
|
3950
|
-
/* @__PURE__ */
|
|
4031
|
+
/* @__PURE__ */ React26.createElement(
|
|
3951
4032
|
DialogPrimitive.Close,
|
|
3952
4033
|
{
|
|
3953
4034
|
className: cn(
|
|
@@ -3955,7 +4036,7 @@ var DialogContent = React25.forwardRef(({ className, children, persist, ...props
|
|
|
3955
4036
|
props.dir === "rtl" ? " hawa-left-4" : " hawa-right-4"
|
|
3956
4037
|
)
|
|
3957
4038
|
},
|
|
3958
|
-
/* @__PURE__ */
|
|
4039
|
+
/* @__PURE__ */ React26.createElement(
|
|
3959
4040
|
"svg",
|
|
3960
4041
|
{
|
|
3961
4042
|
"aria-label": "Close Icon",
|
|
@@ -3964,7 +4045,7 @@ var DialogContent = React25.forwardRef(({ className, children, persist, ...props
|
|
|
3964
4045
|
fill: "currentColor",
|
|
3965
4046
|
viewBox: "0 0 20 20"
|
|
3966
4047
|
},
|
|
3967
|
-
/* @__PURE__ */
|
|
4048
|
+
/* @__PURE__ */ React26.createElement(
|
|
3968
4049
|
"path",
|
|
3969
4050
|
{
|
|
3970
4051
|
fillRule: "evenodd",
|
|
@@ -3973,10 +4054,10 @@ var DialogContent = React25.forwardRef(({ className, children, persist, ...props
|
|
|
3973
4054
|
}
|
|
3974
4055
|
)
|
|
3975
4056
|
),
|
|
3976
|
-
/* @__PURE__ */
|
|
4057
|
+
/* @__PURE__ */ React26.createElement("span", { className: "hawa-sr-only" }, "Close")
|
|
3977
4058
|
)
|
|
3978
4059
|
)));
|
|
3979
|
-
var DialogCarouselContent =
|
|
4060
|
+
var DialogCarouselContent = React26.forwardRef(({ className, children, onPrev, persist, ...props }, ref) => /* @__PURE__ */ React26.createElement(DialogPortal, null, /* @__PURE__ */ React26.createElement(DialogOverlay, null), /* @__PURE__ */ React26.createElement(
|
|
3980
4061
|
DialogPrimitive.Content,
|
|
3981
4062
|
{
|
|
3982
4063
|
onPointerDownOutside: (e) => {
|
|
@@ -3992,7 +4073,7 @@ var DialogCarouselContent = React25.forwardRef(({ className, children, onPrev, p
|
|
|
3992
4073
|
...props
|
|
3993
4074
|
},
|
|
3994
4075
|
children,
|
|
3995
|
-
/* @__PURE__ */
|
|
4076
|
+
/* @__PURE__ */ React26.createElement(
|
|
3996
4077
|
"div",
|
|
3997
4078
|
{
|
|
3998
4079
|
className: cn(
|
|
@@ -4000,7 +4081,7 @@ var DialogCarouselContent = React25.forwardRef(({ className, children, onPrev, p
|
|
|
4000
4081
|
onPrev ? "hawa-justify-between" : "hawa-justify-end"
|
|
4001
4082
|
)
|
|
4002
4083
|
},
|
|
4003
|
-
onPrev && /* @__PURE__ */
|
|
4084
|
+
onPrev && /* @__PURE__ */ React26.createElement(
|
|
4004
4085
|
"div",
|
|
4005
4086
|
{
|
|
4006
4087
|
onClick: onPrev,
|
|
@@ -4009,7 +4090,7 @@ var DialogCarouselContent = React25.forwardRef(({ className, children, onPrev, p
|
|
|
4009
4090
|
props.dir === "rtl" && "hawa-rotate-180"
|
|
4010
4091
|
)
|
|
4011
4092
|
},
|
|
4012
|
-
/* @__PURE__ */
|
|
4093
|
+
/* @__PURE__ */ React26.createElement(
|
|
4013
4094
|
"svg",
|
|
4014
4095
|
{
|
|
4015
4096
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -4023,10 +4104,10 @@ var DialogCarouselContent = React25.forwardRef(({ className, children, onPrev, p
|
|
|
4023
4104
|
strokeLinecap: "round",
|
|
4024
4105
|
strokeLinejoin: "round"
|
|
4025
4106
|
},
|
|
4026
|
-
/* @__PURE__ */
|
|
4107
|
+
/* @__PURE__ */ React26.createElement("path", { d: "m15 18-6-6 6-6" })
|
|
4027
4108
|
)
|
|
4028
4109
|
),
|
|
4029
|
-
/* @__PURE__ */
|
|
4110
|
+
/* @__PURE__ */ React26.createElement(
|
|
4030
4111
|
DialogPrimitive.Close,
|
|
4031
4112
|
{
|
|
4032
4113
|
className: cn(
|
|
@@ -4034,7 +4115,7 @@ var DialogCarouselContent = React25.forwardRef(({ className, children, onPrev, p
|
|
|
4034
4115
|
props.dir === "rtl" ? " hawa-left-4" : " hawa-right-4"
|
|
4035
4116
|
)
|
|
4036
4117
|
},
|
|
4037
|
-
/* @__PURE__ */
|
|
4118
|
+
/* @__PURE__ */ React26.createElement(
|
|
4038
4119
|
"svg",
|
|
4039
4120
|
{
|
|
4040
4121
|
"aria-label": "Close Icon",
|
|
@@ -4043,7 +4124,7 @@ var DialogCarouselContent = React25.forwardRef(({ className, children, onPrev, p
|
|
|
4043
4124
|
fill: "currentColor",
|
|
4044
4125
|
viewBox: "0 0 20 20"
|
|
4045
4126
|
},
|
|
4046
|
-
/* @__PURE__ */
|
|
4127
|
+
/* @__PURE__ */ React26.createElement(
|
|
4047
4128
|
"path",
|
|
4048
4129
|
{
|
|
4049
4130
|
fillRule: "evenodd",
|
|
@@ -4052,14 +4133,14 @@ var DialogCarouselContent = React25.forwardRef(({ className, children, onPrev, p
|
|
|
4052
4133
|
}
|
|
4053
4134
|
)
|
|
4054
4135
|
),
|
|
4055
|
-
/* @__PURE__ */
|
|
4136
|
+
/* @__PURE__ */ React26.createElement("span", { className: "hawa-sr-only" }, "Close")
|
|
4056
4137
|
)
|
|
4057
4138
|
)
|
|
4058
4139
|
)));
|
|
4059
4140
|
var DialogHeader = ({
|
|
4060
4141
|
className,
|
|
4061
4142
|
...props
|
|
4062
|
-
}) => /* @__PURE__ */
|
|
4143
|
+
}) => /* @__PURE__ */ React26.createElement(
|
|
4063
4144
|
"div",
|
|
4064
4145
|
{
|
|
4065
4146
|
className: cn(
|
|
@@ -4069,7 +4150,7 @@ var DialogHeader = ({
|
|
|
4069
4150
|
...props
|
|
4070
4151
|
}
|
|
4071
4152
|
);
|
|
4072
|
-
var DialogTitle =
|
|
4153
|
+
var DialogTitle = React26.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React26.createElement(
|
|
4073
4154
|
DialogPrimitive.Title,
|
|
4074
4155
|
{
|
|
4075
4156
|
ref,
|
|
@@ -4080,7 +4161,7 @@ var DialogTitle = React25.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
|
4080
4161
|
...props
|
|
4081
4162
|
}
|
|
4082
4163
|
));
|
|
4083
|
-
var DialogDescription =
|
|
4164
|
+
var DialogDescription = React26.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React26.createElement(
|
|
4084
4165
|
DialogPrimitive.Description,
|
|
4085
4166
|
{
|
|
4086
4167
|
ref,
|
|
@@ -4094,7 +4175,7 @@ var DialogDescription = React25.forwardRef(({ className, ...props }, ref) => /*
|
|
|
4094
4175
|
var DialogFooter = ({
|
|
4095
4176
|
className,
|
|
4096
4177
|
...props
|
|
4097
|
-
}) => /* @__PURE__ */
|
|
4178
|
+
}) => /* @__PURE__ */ React26.createElement(
|
|
4098
4179
|
"div",
|
|
4099
4180
|
{
|
|
4100
4181
|
className: cn(
|
|
@@ -4110,12 +4191,12 @@ var DialogCarousel = ({
|
|
|
4110
4191
|
children,
|
|
4111
4192
|
direction
|
|
4112
4193
|
}) => {
|
|
4113
|
-
|
|
4194
|
+
React26.useEffect(() => {
|
|
4114
4195
|
if (stepsApi) {
|
|
4115
4196
|
stepsApi.reInit();
|
|
4116
4197
|
}
|
|
4117
4198
|
}, [stepsApi, children]);
|
|
4118
|
-
return /* @__PURE__ */
|
|
4199
|
+
return /* @__PURE__ */ React26.createElement("div", { className: "hawa-overflow-hidden" }, /* @__PURE__ */ React26.createElement("div", { ref: stepsRef, dir: direction }, /* @__PURE__ */ React26.createElement(
|
|
4119
4200
|
"div",
|
|
4120
4201
|
{
|
|
4121
4202
|
className: "hawa-flex",
|
|
@@ -4123,7 +4204,7 @@ var DialogCarousel = ({
|
|
|
4123
4204
|
transition: "height 0.2s"
|
|
4124
4205
|
}
|
|
4125
4206
|
},
|
|
4126
|
-
|
|
4207
|
+
React26.Children.map(children, (child, index) => /* @__PURE__ */ React26.createElement(
|
|
4127
4208
|
"div",
|
|
4128
4209
|
{
|
|
4129
4210
|
className: cn(
|
|
@@ -4140,14 +4221,14 @@ var DialogSteps = ({
|
|
|
4140
4221
|
visibleStepRef,
|
|
4141
4222
|
children
|
|
4142
4223
|
}) => {
|
|
4143
|
-
const [dialogHeight, setDialogHeight] =
|
|
4144
|
-
|
|
4224
|
+
const [dialogHeight, setDialogHeight] = React26.useState(null);
|
|
4225
|
+
React26.useEffect(() => {
|
|
4145
4226
|
if (visibleStepRef.current) {
|
|
4146
4227
|
setDialogHeight(visibleStepRef.current.offsetHeight);
|
|
4147
4228
|
console.log("height is ", visibleStepRef.current.offsetHeight);
|
|
4148
4229
|
}
|
|
4149
4230
|
}, [currentStep, visibleStepRef]);
|
|
4150
|
-
return /* @__PURE__ */
|
|
4231
|
+
return /* @__PURE__ */ React26.createElement(
|
|
4151
4232
|
"div",
|
|
4152
4233
|
{
|
|
4153
4234
|
className: "hawa-relative hawa-overflow-clip",
|
|
@@ -4156,7 +4237,7 @@ var DialogSteps = ({
|
|
|
4156
4237
|
transition: "height 0.2s"
|
|
4157
4238
|
}
|
|
4158
4239
|
},
|
|
4159
|
-
|
|
4240
|
+
React26.Children.map(children, (child, index) => /* @__PURE__ */ React26.createElement(
|
|
4160
4241
|
"div",
|
|
4161
4242
|
{
|
|
4162
4243
|
ref: currentStep === `step-${index + 1}` ? visibleStepRef : null,
|
|
@@ -4174,7 +4255,7 @@ var DialogStep = ({
|
|
|
4174
4255
|
className,
|
|
4175
4256
|
stepRef
|
|
4176
4257
|
}) => {
|
|
4177
|
-
return /* @__PURE__ */
|
|
4258
|
+
return /* @__PURE__ */ React26.createElement(
|
|
4178
4259
|
"div",
|
|
4179
4260
|
{
|
|
4180
4261
|
id,
|
|
@@ -4185,7 +4266,7 @@ var DialogStep = ({
|
|
|
4185
4266
|
);
|
|
4186
4267
|
};
|
|
4187
4268
|
var DialogBody = ({ children, className }) => {
|
|
4188
|
-
return /* @__PURE__ */
|
|
4269
|
+
return /* @__PURE__ */ React26.createElement("div", { className: cn("hawa-py-6", className) }, children);
|
|
4189
4270
|
};
|
|
4190
4271
|
DialogBody.displayName = "DialogBody";
|
|
4191
4272
|
DialogStep.displayName = "DialogStep";
|
|
@@ -4201,7 +4282,7 @@ DialogContent.displayName = DialogPrimitive.Content.displayName;
|
|
|
4201
4282
|
DialogDescription.displayName = DialogPrimitive.Description.displayName;
|
|
4202
4283
|
|
|
4203
4284
|
// components/elements/Command.tsx
|
|
4204
|
-
var Command =
|
|
4285
|
+
var Command = React27.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React27.createElement(
|
|
4205
4286
|
import_cmdk.Command,
|
|
4206
4287
|
{
|
|
4207
4288
|
ref,
|
|
@@ -4214,15 +4295,15 @@ var Command = React26.forwardRef(({ className, ...props }, ref) => /* @__PURE__
|
|
|
4214
4295
|
));
|
|
4215
4296
|
Command.displayName = import_cmdk.Command.displayName;
|
|
4216
4297
|
var CommandDialog = ({ children, ...props }) => {
|
|
4217
|
-
return /* @__PURE__ */
|
|
4298
|
+
return /* @__PURE__ */ React27.createElement(Dialog, { ...props }, /* @__PURE__ */ React27.createElement(DialogContent, { className: "hawa-overflow-hidden hawa-p-0 hawa-shadow-lg" }, /* @__PURE__ */ React27.createElement(Command, { className: "[&_[cmdk-group-heading]]:hawa-px-2 [&_[cmdk-group-heading]]:hawa-font-medium [&_[cmdk-group-heading]]:hawa-text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:hawa-pt-0 [&_[cmdk-group]]:hawa-px-2 [&_[cmdk-input-wrapper]_svg]:hawa-h-5 [&_[cmdk-input-wrapper]_svg]:hawa-w-5 [&_[cmdk-input]]:hawa-h-12 [&_[cmdk-item]]:hawa-px-2 [&_[cmdk-item]]:hawa-py-3 [&_[cmdk-item]_svg]:hawa-h-5 [&_[cmdk-item]_svg]:hawa-w-5" }, children)));
|
|
4218
4299
|
};
|
|
4219
|
-
var CommandInput =
|
|
4300
|
+
var CommandInput = React27.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React27.createElement(
|
|
4220
4301
|
"div",
|
|
4221
4302
|
{
|
|
4222
4303
|
className: "hawa-flex hawa-items-center hawa-border-b hawa-px-3",
|
|
4223
4304
|
"cmdk-input-wrapper": ""
|
|
4224
4305
|
},
|
|
4225
|
-
/* @__PURE__ */
|
|
4306
|
+
/* @__PURE__ */ React27.createElement(
|
|
4226
4307
|
"svg",
|
|
4227
4308
|
{
|
|
4228
4309
|
"aria-label": "Search Icon",
|
|
@@ -4237,10 +4318,10 @@ var CommandInput = React26.forwardRef(({ className, ...props }, ref) => /* @__PU
|
|
|
4237
4318
|
strokeLinejoin: "round",
|
|
4238
4319
|
className: "hawa-mr-2 hawa-icon hawa-shrink-0 hawa-opacity-50"
|
|
4239
4320
|
},
|
|
4240
|
-
/* @__PURE__ */
|
|
4241
|
-
/* @__PURE__ */
|
|
4321
|
+
/* @__PURE__ */ React27.createElement("circle", { cx: "11", cy: "11", r: "8" }),
|
|
4322
|
+
/* @__PURE__ */ React27.createElement("path", { d: "m21 21-4.3-4.3" })
|
|
4242
4323
|
),
|
|
4243
|
-
/* @__PURE__ */
|
|
4324
|
+
/* @__PURE__ */ React27.createElement(
|
|
4244
4325
|
import_cmdk.Command.Input,
|
|
4245
4326
|
{
|
|
4246
4327
|
ref,
|
|
@@ -4253,7 +4334,7 @@ var CommandInput = React26.forwardRef(({ className, ...props }, ref) => /* @__PU
|
|
|
4253
4334
|
)
|
|
4254
4335
|
));
|
|
4255
4336
|
CommandInput.displayName = import_cmdk.Command.Input.displayName;
|
|
4256
|
-
var CommandList =
|
|
4337
|
+
var CommandList = React27.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React27.createElement(
|
|
4257
4338
|
import_cmdk.Command.List,
|
|
4258
4339
|
{
|
|
4259
4340
|
ref,
|
|
@@ -4265,7 +4346,7 @@ var CommandList = React26.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
|
4265
4346
|
}
|
|
4266
4347
|
));
|
|
4267
4348
|
CommandList.displayName = import_cmdk.Command.List.displayName;
|
|
4268
|
-
var CommandEmpty =
|
|
4349
|
+
var CommandEmpty = React27.forwardRef((props, ref) => /* @__PURE__ */ React27.createElement(
|
|
4269
4350
|
import_cmdk.Command.Empty,
|
|
4270
4351
|
{
|
|
4271
4352
|
ref,
|
|
@@ -4274,7 +4355,7 @@ var CommandEmpty = React26.forwardRef((props, ref) => /* @__PURE__ */ React26.cr
|
|
|
4274
4355
|
}
|
|
4275
4356
|
));
|
|
4276
4357
|
CommandEmpty.displayName = import_cmdk.Command.Empty.displayName;
|
|
4277
|
-
var CommandGroup =
|
|
4358
|
+
var CommandGroup = React27.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React27.createElement(
|
|
4278
4359
|
import_cmdk.Command.Group,
|
|
4279
4360
|
{
|
|
4280
4361
|
ref,
|
|
@@ -4286,7 +4367,7 @@ var CommandGroup = React26.forwardRef(({ className, ...props }, ref) => /* @__PU
|
|
|
4286
4367
|
}
|
|
4287
4368
|
));
|
|
4288
4369
|
CommandGroup.displayName = import_cmdk.Command.Group.displayName;
|
|
4289
|
-
var CommandSeparator =
|
|
4370
|
+
var CommandSeparator = React27.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React27.createElement(
|
|
4290
4371
|
import_cmdk.Command.Separator,
|
|
4291
4372
|
{
|
|
4292
4373
|
ref,
|
|
@@ -4295,7 +4376,7 @@ var CommandSeparator = React26.forwardRef(({ className, ...props }, ref) => /* @
|
|
|
4295
4376
|
}
|
|
4296
4377
|
));
|
|
4297
4378
|
CommandSeparator.displayName = import_cmdk.Command.Separator.displayName;
|
|
4298
|
-
var CommandItem =
|
|
4379
|
+
var CommandItem = React27.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React27.createElement(
|
|
4299
4380
|
import_cmdk.Command.Item,
|
|
4300
4381
|
{
|
|
4301
4382
|
ref,
|
|
@@ -4311,7 +4392,7 @@ var CommandShortcut = ({
|
|
|
4311
4392
|
className,
|
|
4312
4393
|
...props
|
|
4313
4394
|
}) => {
|
|
4314
|
-
return /* @__PURE__ */
|
|
4395
|
+
return /* @__PURE__ */ React27.createElement(
|
|
4315
4396
|
"span",
|
|
4316
4397
|
{
|
|
4317
4398
|
className: cn(
|
|
@@ -4325,9 +4406,9 @@ var CommandShortcut = ({
|
|
|
4325
4406
|
CommandShortcut.displayName = "CommandShortcut";
|
|
4326
4407
|
|
|
4327
4408
|
// components/elements/Popover.tsx
|
|
4328
|
-
var
|
|
4409
|
+
var React28 = __toESM(require("react"));
|
|
4329
4410
|
var PopoverPrimitive = __toESM(require("@radix-ui/react-popover"));
|
|
4330
|
-
var PopoverContent =
|
|
4411
|
+
var PopoverContent = React28.forwardRef(({ className, align = "center", sideOffset = 4, ...props }, ref) => /* @__PURE__ */ React28.createElement(PopoverPrimitive.Portal, null, /* @__PURE__ */ React28.createElement(
|
|
4331
4412
|
PopoverPrimitive.Content,
|
|
4332
4413
|
{
|
|
4333
4414
|
ref,
|
|
@@ -4359,7 +4440,7 @@ var Popover = ({
|
|
|
4359
4440
|
trigger: "var(--radix-popover-trigger-width)",
|
|
4360
4441
|
default: "auto"
|
|
4361
4442
|
};
|
|
4362
|
-
return /* @__PURE__ */
|
|
4443
|
+
return /* @__PURE__ */ React28.createElement(PopoverPrimitive.Root, { open, ...props }, /* @__PURE__ */ React28.createElement(
|
|
4363
4444
|
PopoverPrimitive.Trigger,
|
|
4364
4445
|
{
|
|
4365
4446
|
className: "hawa-w-full",
|
|
@@ -4367,7 +4448,7 @@ var Popover = ({
|
|
|
4367
4448
|
...triggerProps
|
|
4368
4449
|
},
|
|
4369
4450
|
trigger
|
|
4370
|
-
), /* @__PURE__ */
|
|
4451
|
+
), /* @__PURE__ */ React28.createElement(
|
|
4371
4452
|
PopoverContent,
|
|
4372
4453
|
{
|
|
4373
4454
|
side,
|
|
@@ -4385,7 +4466,7 @@ var Popover = ({
|
|
|
4385
4466
|
var PopoverTrigger = PopoverPrimitive.Trigger;
|
|
4386
4467
|
|
|
4387
4468
|
// components/elements/Combobox.tsx
|
|
4388
|
-
var Combobox =
|
|
4469
|
+
var Combobox = React29.forwardRef(
|
|
4389
4470
|
({
|
|
4390
4471
|
labelKey = "label",
|
|
4391
4472
|
valueKey = "value",
|
|
@@ -4396,8 +4477,8 @@ var Combobox = React28.forwardRef(
|
|
|
4396
4477
|
...props
|
|
4397
4478
|
}, ref) => {
|
|
4398
4479
|
var _a, _b, _c;
|
|
4399
|
-
const [open, setOpen] =
|
|
4400
|
-
const [value, setValue] =
|
|
4480
|
+
const [open, setOpen] = React29.useState(false);
|
|
4481
|
+
const [value, setValue] = React29.useState(defaultValue);
|
|
4401
4482
|
function getProperty(obj, key) {
|
|
4402
4483
|
return obj[key];
|
|
4403
4484
|
}
|
|
@@ -4406,7 +4487,7 @@ var Combobox = React28.forwardRef(
|
|
|
4406
4487
|
setOpen(open2);
|
|
4407
4488
|
}
|
|
4408
4489
|
};
|
|
4409
|
-
return /* @__PURE__ */
|
|
4490
|
+
return /* @__PURE__ */ React29.createElement(
|
|
4410
4491
|
"div",
|
|
4411
4492
|
{
|
|
4412
4493
|
className: cn(
|
|
@@ -4414,8 +4495,8 @@ var Combobox = React28.forwardRef(
|
|
|
4414
4495
|
props.width === "fit" ? "hawa-w-fit" : "hawa-w-full"
|
|
4415
4496
|
)
|
|
4416
4497
|
},
|
|
4417
|
-
props.label && /* @__PURE__ */
|
|
4418
|
-
/* @__PURE__ */
|
|
4498
|
+
props.label && /* @__PURE__ */ React29.createElement(Label2, { ...labelProps }, props.label),
|
|
4499
|
+
/* @__PURE__ */ React29.createElement(PopoverPrimitive2.Root, { open, onOpenChange: handleOpenChange }, /* @__PURE__ */ React29.createElement(PopoverTrigger, { asChild: true }, props.isLoading ? /* @__PURE__ */ React29.createElement("div", { className: "hawa-pb-2" }, /* @__PURE__ */ React29.createElement(Skeleton, { className: "hawa-h-[40px] hawa-w-full" })) : /* @__PURE__ */ React29.createElement("div", { className: "hawa-flex hawa-flex-col hawa-gap-2 hawa-items-start " }, /* @__PURE__ */ React29.createElement(
|
|
4419
4500
|
"div",
|
|
4420
4501
|
{
|
|
4421
4502
|
className: cn(
|
|
@@ -4423,7 +4504,7 @@ var Combobox = React28.forwardRef(
|
|
|
4423
4504
|
props.preview ? "hawa-opacity-100" : "hawa-opacity-0"
|
|
4424
4505
|
)
|
|
4425
4506
|
}
|
|
4426
|
-
), /* @__PURE__ */
|
|
4507
|
+
), /* @__PURE__ */ React29.createElement(
|
|
4427
4508
|
"button",
|
|
4428
4509
|
{
|
|
4429
4510
|
role: "combobox",
|
|
@@ -4437,7 +4518,7 @@ var Combobox = React28.forwardRef(
|
|
|
4437
4518
|
data.find((item) => item[valueKey] === value) || {},
|
|
4438
4519
|
labelKey
|
|
4439
4520
|
) : ((_a = props.texts) == null ? void 0 : _a.placeholder) || "...",
|
|
4440
|
-
/* @__PURE__ */
|
|
4521
|
+
/* @__PURE__ */ React29.createElement(
|
|
4441
4522
|
"svg",
|
|
4442
4523
|
{
|
|
4443
4524
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -4453,9 +4534,9 @@ var Combobox = React28.forwardRef(
|
|
|
4453
4534
|
strokeLinecap: "round",
|
|
4454
4535
|
strokeLinejoin: "round"
|
|
4455
4536
|
},
|
|
4456
|
-
/* @__PURE__ */
|
|
4537
|
+
/* @__PURE__ */ React29.createElement("path", { d: "m6 9 6 6 6-6" })
|
|
4457
4538
|
)
|
|
4458
|
-
), /* @__PURE__ */
|
|
4539
|
+
), /* @__PURE__ */ React29.createElement(
|
|
4459
4540
|
"p",
|
|
4460
4541
|
{
|
|
4461
4542
|
className: cn(
|
|
@@ -4464,17 +4545,17 @@ var Combobox = React28.forwardRef(
|
|
|
4464
4545
|
)
|
|
4465
4546
|
},
|
|
4466
4547
|
props.helperText
|
|
4467
|
-
))), /* @__PURE__ */
|
|
4548
|
+
))), /* @__PURE__ */ React29.createElement(
|
|
4468
4549
|
PopoverContent,
|
|
4469
4550
|
{
|
|
4470
4551
|
className: cn("popover-w-parent", props.helperText && "-hawa-mt-4")
|
|
4471
4552
|
},
|
|
4472
|
-
/* @__PURE__ */
|
|
4553
|
+
/* @__PURE__ */ React29.createElement(Command, null, !props.hideInput && /* @__PURE__ */ React29.createElement(
|
|
4473
4554
|
CommandInput,
|
|
4474
4555
|
{
|
|
4475
4556
|
placeholder: ((_b = props.texts) == null ? void 0 : _b.searchPlaceholder) || "Search"
|
|
4476
4557
|
}
|
|
4477
|
-
), /* @__PURE__ */
|
|
4558
|
+
), /* @__PURE__ */ React29.createElement(CommandEmpty, null, ((_c = props.texts) == null ? void 0 : _c.noItems) || "No items found."), /* @__PURE__ */ React29.createElement(CommandGroup, { className: "hawa-max-h-[200px] hawa-overflow-y-auto" }, data.map((item, i) => /* @__PURE__ */ React29.createElement(
|
|
4478
4559
|
CommandItem,
|
|
4479
4560
|
{
|
|
4480
4561
|
key: i,
|
|
@@ -4489,7 +4570,7 @@ var Combobox = React28.forwardRef(
|
|
|
4489
4570
|
setOpen(false);
|
|
4490
4571
|
}
|
|
4491
4572
|
},
|
|
4492
|
-
/* @__PURE__ */
|
|
4573
|
+
/* @__PURE__ */ React29.createElement(
|
|
4493
4574
|
"svg",
|
|
4494
4575
|
{
|
|
4495
4576
|
"aria-label": "Check Icon",
|
|
@@ -4507,7 +4588,7 @@ var Combobox = React28.forwardRef(
|
|
|
4507
4588
|
value === getProperty(item, valueKey) ? "hawa-opacity-100" : "hawa-opacity-0"
|
|
4508
4589
|
)
|
|
4509
4590
|
},
|
|
4510
|
-
/* @__PURE__ */
|
|
4591
|
+
/* @__PURE__ */ React29.createElement("polyline", { points: "20 6 9 17 4 12" })
|
|
4511
4592
|
),
|
|
4512
4593
|
getProperty(item, labelKey)
|
|
4513
4594
|
))))
|
|
@@ -4517,12 +4598,12 @@ var Combobox = React28.forwardRef(
|
|
|
4517
4598
|
);
|
|
4518
4599
|
|
|
4519
4600
|
// components/elements/Avatar.tsx
|
|
4520
|
-
var
|
|
4601
|
+
var import_react18 = __toESM(require("react"));
|
|
4521
4602
|
|
|
4522
4603
|
// components/elements/FileUploader.tsx
|
|
4523
|
-
var
|
|
4604
|
+
var import_react17 = __toESM(require("react"));
|
|
4524
4605
|
var FileUploader = ({ handleFile, className }) => {
|
|
4525
|
-
const hiddenFileInput = (0,
|
|
4606
|
+
const hiddenFileInput = (0, import_react17.useRef)(null);
|
|
4526
4607
|
const handleClick = () => {
|
|
4527
4608
|
var _a;
|
|
4528
4609
|
(_a = hiddenFileInput.current) == null ? void 0 : _a.click();
|
|
@@ -4531,7 +4612,7 @@ var FileUploader = ({ handleFile, className }) => {
|
|
|
4531
4612
|
const fileUploaded = event.target.files[0];
|
|
4532
4613
|
handleFile(fileUploaded);
|
|
4533
4614
|
};
|
|
4534
|
-
return /* @__PURE__ */
|
|
4615
|
+
return /* @__PURE__ */ import_react17.default.createElement("div", { className }, /* @__PURE__ */ import_react17.default.createElement("button", { className: "hawa-h-full hawa-w-full", onClick: handleClick }), /* @__PURE__ */ import_react17.default.createElement(
|
|
4535
4616
|
"input",
|
|
4536
4617
|
{
|
|
4537
4618
|
type: "file",
|
|
@@ -4570,7 +4651,7 @@ var Avatar = ({
|
|
|
4570
4651
|
inherit: "hawa-rounded",
|
|
4571
4652
|
none: "hawa-rounded-none"
|
|
4572
4653
|
};
|
|
4573
|
-
return /* @__PURE__ */
|
|
4654
|
+
return /* @__PURE__ */ import_react18.default.createElement(
|
|
4574
4655
|
"div",
|
|
4575
4656
|
{
|
|
4576
4657
|
className: cn(
|
|
@@ -4580,7 +4661,7 @@ var Avatar = ({
|
|
|
4580
4661
|
className
|
|
4581
4662
|
)
|
|
4582
4663
|
},
|
|
4583
|
-
/* @__PURE__ */
|
|
4664
|
+
/* @__PURE__ */ import_react18.default.createElement(
|
|
4584
4665
|
FileUploader,
|
|
4585
4666
|
{
|
|
4586
4667
|
className: cn(
|
|
@@ -4591,7 +4672,7 @@ var Avatar = ({
|
|
|
4591
4672
|
)
|
|
4592
4673
|
}
|
|
4593
4674
|
),
|
|
4594
|
-
/* @__PURE__ */
|
|
4675
|
+
/* @__PURE__ */ import_react18.default.createElement(
|
|
4595
4676
|
"img",
|
|
4596
4677
|
{
|
|
4597
4678
|
className: cn(
|
|
@@ -4604,7 +4685,7 @@ var Avatar = ({
|
|
|
4604
4685
|
alt
|
|
4605
4686
|
}
|
|
4606
4687
|
),
|
|
4607
|
-
!src && !isUploadable && /* @__PURE__ */
|
|
4688
|
+
!src && !isUploadable && /* @__PURE__ */ import_react18.default.createElement(
|
|
4608
4689
|
"div",
|
|
4609
4690
|
{
|
|
4610
4691
|
className: cn(
|
|
@@ -4612,7 +4693,7 @@ var Avatar = ({
|
|
|
4612
4693
|
"hawa-justify-center hawa-items-center hawa-flex hawa-flex-col"
|
|
4613
4694
|
)
|
|
4614
4695
|
},
|
|
4615
|
-
/* @__PURE__ */
|
|
4696
|
+
/* @__PURE__ */ import_react18.default.createElement(
|
|
4616
4697
|
"svg",
|
|
4617
4698
|
{
|
|
4618
4699
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -4624,28 +4705,28 @@ var Avatar = ({
|
|
|
4624
4705
|
strokeLinecap: "round",
|
|
4625
4706
|
strokeLinejoin: "round"
|
|
4626
4707
|
},
|
|
4627
|
-
/* @__PURE__ */
|
|
4628
|
-
/* @__PURE__ */
|
|
4708
|
+
/* @__PURE__ */ import_react18.default.createElement("circle", { cx: "12", cy: "8", r: "5" }),
|
|
4709
|
+
/* @__PURE__ */ import_react18.default.createElement("path", { d: "M20 21a8 8 0 1 0-16 0" })
|
|
4629
4710
|
)
|
|
4630
4711
|
)
|
|
4631
4712
|
);
|
|
4632
4713
|
};
|
|
4633
4714
|
|
|
4634
4715
|
// components/elements/SplitButton.tsx
|
|
4635
|
-
var
|
|
4716
|
+
var React32 = __toESM(require("react"));
|
|
4636
4717
|
var SplitButton = ({
|
|
4637
4718
|
variant,
|
|
4638
4719
|
direction = "ltr",
|
|
4639
4720
|
menuItems = [],
|
|
4640
4721
|
children,
|
|
4641
4722
|
...props
|
|
4642
|
-
}) => /* @__PURE__ */
|
|
4723
|
+
}) => /* @__PURE__ */ React32.createElement(
|
|
4643
4724
|
"div",
|
|
4644
4725
|
{
|
|
4645
4726
|
dir: "ltr",
|
|
4646
4727
|
className: cn("hawa-h-fit hawa-flex hawa-justify-center hawa-row")
|
|
4647
4728
|
},
|
|
4648
|
-
/* @__PURE__ */
|
|
4729
|
+
/* @__PURE__ */ React32.createElement(
|
|
4649
4730
|
Button,
|
|
4650
4731
|
{
|
|
4651
4732
|
variant,
|
|
@@ -4654,14 +4735,14 @@ var SplitButton = ({
|
|
|
4654
4735
|
},
|
|
4655
4736
|
children
|
|
4656
4737
|
),
|
|
4657
|
-
/* @__PURE__ */
|
|
4738
|
+
/* @__PURE__ */ React32.createElement(
|
|
4658
4739
|
DropdownMenu,
|
|
4659
4740
|
{
|
|
4660
4741
|
size: "sm",
|
|
4661
4742
|
width: "sm",
|
|
4662
4743
|
direction,
|
|
4663
4744
|
items: menuItems,
|
|
4664
|
-
trigger: /* @__PURE__ */
|
|
4745
|
+
trigger: /* @__PURE__ */ React32.createElement(
|
|
4665
4746
|
Button,
|
|
4666
4747
|
{
|
|
4667
4748
|
asChild: true,
|
|
@@ -4672,7 +4753,7 @@ var SplitButton = ({
|
|
|
4672
4753
|
props.className
|
|
4673
4754
|
)
|
|
4674
4755
|
},
|
|
4675
|
-
/* @__PURE__ */
|
|
4756
|
+
/* @__PURE__ */ React32.createElement(
|
|
4676
4757
|
"svg",
|
|
4677
4758
|
{
|
|
4678
4759
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -4685,7 +4766,7 @@ var SplitButton = ({
|
|
|
4685
4766
|
strokeLinecap: "round",
|
|
4686
4767
|
strokeLinejoin: "round"
|
|
4687
4768
|
},
|
|
4688
|
-
/* @__PURE__ */
|
|
4769
|
+
/* @__PURE__ */ React32.createElement("path", { d: "m6 9 6 6 6-6" })
|
|
4689
4770
|
)
|
|
4690
4771
|
)
|
|
4691
4772
|
}
|
|
@@ -4694,18 +4775,18 @@ var SplitButton = ({
|
|
|
4694
4775
|
SplitButton.displayName = "SplitButton";
|
|
4695
4776
|
|
|
4696
4777
|
// components/elements/Breadcrumb.tsx
|
|
4697
|
-
var
|
|
4778
|
+
var import_react19 = __toESM(require("react"));
|
|
4698
4779
|
var Breadcrumb = ({
|
|
4699
4780
|
breadcrumbLinks,
|
|
4700
4781
|
separator = ">"
|
|
4701
4782
|
}) => {
|
|
4702
|
-
return /* @__PURE__ */
|
|
4783
|
+
return /* @__PURE__ */ import_react19.default.createElement("div", { className: "hawa-flex hawa-flex-row hawa-items-center hawa-gap-2 hawa-text-sm" }, breadcrumbLinks.map((singleBreadcrumbLink, index) => /* @__PURE__ */ import_react19.default.createElement(
|
|
4703
4784
|
"div",
|
|
4704
4785
|
{
|
|
4705
4786
|
key: index,
|
|
4706
4787
|
className: "hawa-flex hawa-flex-row hawa-items-center hawa-justify-center hawa-gap-2"
|
|
4707
4788
|
},
|
|
4708
|
-
/* @__PURE__ */
|
|
4789
|
+
/* @__PURE__ */ import_react19.default.createElement(
|
|
4709
4790
|
"a",
|
|
4710
4791
|
{
|
|
4711
4792
|
href: singleBreadcrumbLink.href,
|
|
@@ -4713,19 +4794,19 @@ var Breadcrumb = ({
|
|
|
4713
4794
|
},
|
|
4714
4795
|
singleBreadcrumbLink.label
|
|
4715
4796
|
),
|
|
4716
|
-
index != breadcrumbLinks.length - 1 ? typeof separator == "string" ? /* @__PURE__ */
|
|
4797
|
+
index != breadcrumbLinks.length - 1 ? typeof separator == "string" ? /* @__PURE__ */ import_react19.default.createElement("div", null, separator) : /* @__PURE__ */ import_react19.default.createElement("div", null, separator) : null
|
|
4717
4798
|
)));
|
|
4718
4799
|
};
|
|
4719
4800
|
|
|
4720
4801
|
// components/elements/CodeBlock.tsx
|
|
4721
|
-
var
|
|
4802
|
+
var import_react21 = __toESM(require("react"));
|
|
4722
4803
|
|
|
4723
4804
|
// components/hooks/useClipboard.ts
|
|
4724
|
-
var
|
|
4805
|
+
var import_react20 = require("react");
|
|
4725
4806
|
function useClipboard({ timeout = 2e3 } = {}) {
|
|
4726
|
-
const [error, setError] = (0,
|
|
4727
|
-
const [copied, setCopied] = (0,
|
|
4728
|
-
const [copyTimeout, setCopyTimeout] = (0,
|
|
4807
|
+
const [error, setError] = (0, import_react20.useState)(null);
|
|
4808
|
+
const [copied, setCopied] = (0, import_react20.useState)(false);
|
|
4809
|
+
const [copyTimeout, setCopyTimeout] = (0, import_react20.useState)(null);
|
|
4729
4810
|
const handleCopyResult = (value) => {
|
|
4730
4811
|
clearTimeout(copyTimeout);
|
|
4731
4812
|
setCopyTimeout(setTimeout(() => setCopied(false), timeout));
|
|
@@ -4759,7 +4840,7 @@ var CodeBlock = ({
|
|
|
4759
4840
|
...props
|
|
4760
4841
|
}) => {
|
|
4761
4842
|
const clipboard = useClipboard();
|
|
4762
|
-
const [selectedTab, setSelectedTab] = (0,
|
|
4843
|
+
const [selectedTab, setSelectedTab] = (0, import_react21.useState)(0);
|
|
4763
4844
|
const isDarkMode = props.forcedDarkMode || document.body.classList.contains("dark");
|
|
4764
4845
|
const theme = isDarkMode ? import_prism_react_renderer.themes.vsDark : import_prism_react_renderer.themes.vsLight;
|
|
4765
4846
|
let widthStyles = {
|
|
@@ -4768,7 +4849,7 @@ var CodeBlock = ({
|
|
|
4768
4849
|
sm: "hawa-w-full hawa-max-w-sm",
|
|
4769
4850
|
xs: "hawa-w-full hawa-max-w-xs"
|
|
4770
4851
|
};
|
|
4771
|
-
return /* @__PURE__ */
|
|
4852
|
+
return /* @__PURE__ */ import_react21.default.createElement(
|
|
4772
4853
|
"div",
|
|
4773
4854
|
{
|
|
4774
4855
|
className: cn(
|
|
@@ -4777,7 +4858,7 @@ var CodeBlock = ({
|
|
|
4777
4858
|
className
|
|
4778
4859
|
)
|
|
4779
4860
|
},
|
|
4780
|
-
fileName && /* @__PURE__ */
|
|
4861
|
+
fileName && /* @__PURE__ */ import_react21.default.createElement(
|
|
4781
4862
|
"div",
|
|
4782
4863
|
{
|
|
4783
4864
|
className: cn(
|
|
@@ -4785,7 +4866,7 @@ var CodeBlock = ({
|
|
|
4785
4866
|
fileName && tabs ? "hawa-bg-gray-300 dark:hawa-bg-muted/50" : "hawa-bg-gray-200"
|
|
4786
4867
|
)
|
|
4787
4868
|
},
|
|
4788
|
-
/* @__PURE__ */
|
|
4869
|
+
/* @__PURE__ */ import_react21.default.createElement(
|
|
4789
4870
|
"div",
|
|
4790
4871
|
{
|
|
4791
4872
|
className: cn(
|
|
@@ -4795,7 +4876,7 @@ var CodeBlock = ({
|
|
|
4795
4876
|
fileName
|
|
4796
4877
|
)
|
|
4797
4878
|
),
|
|
4798
|
-
tabs && /* @__PURE__ */
|
|
4879
|
+
tabs && /* @__PURE__ */ import_react21.default.createElement(
|
|
4799
4880
|
"div",
|
|
4800
4881
|
{
|
|
4801
4882
|
className: cn(
|
|
@@ -4803,7 +4884,7 @@ var CodeBlock = ({
|
|
|
4803
4884
|
tabs && fileName && "hawa-rounded-t-none"
|
|
4804
4885
|
)
|
|
4805
4886
|
},
|
|
4806
|
-
tabs.map((tab, i) => /* @__PURE__ */
|
|
4887
|
+
tabs.map((tab, i) => /* @__PURE__ */ import_react21.default.createElement(
|
|
4807
4888
|
"div",
|
|
4808
4889
|
{
|
|
4809
4890
|
key: i,
|
|
@@ -4811,7 +4892,7 @@ var CodeBlock = ({
|
|
|
4811
4892
|
selectedTab === i ? " hawa-border-b-2 hawa-border-primary" : "hawa-bg-transparent"
|
|
4812
4893
|
)
|
|
4813
4894
|
},
|
|
4814
|
-
/* @__PURE__ */
|
|
4895
|
+
/* @__PURE__ */ import_react21.default.createElement(
|
|
4815
4896
|
"div",
|
|
4816
4897
|
{
|
|
4817
4898
|
onClick: () => setSelectedTab(i),
|
|
@@ -4823,7 +4904,7 @@ var CodeBlock = ({
|
|
|
4823
4904
|
)
|
|
4824
4905
|
))
|
|
4825
4906
|
),
|
|
4826
|
-
/* @__PURE__ */
|
|
4907
|
+
/* @__PURE__ */ import_react21.default.createElement(
|
|
4827
4908
|
"div",
|
|
4828
4909
|
{
|
|
4829
4910
|
className: cn(
|
|
@@ -4831,23 +4912,23 @@ var CodeBlock = ({
|
|
|
4831
4912
|
tabs || fileName ? "hawa-rounded-b hawa-rounded-t-none" : "hawa-rounded"
|
|
4832
4913
|
)
|
|
4833
4914
|
},
|
|
4834
|
-
/* @__PURE__ */
|
|
4915
|
+
/* @__PURE__ */ import_react21.default.createElement(
|
|
4835
4916
|
import_prism_react_renderer.Highlight,
|
|
4836
4917
|
{
|
|
4837
4918
|
theme,
|
|
4838
4919
|
code: tabs ? tabs[selectedTab].code : code || "",
|
|
4839
4920
|
language
|
|
4840
4921
|
},
|
|
4841
|
-
({ className: className2, style, tokens, getLineProps, getTokenProps }) => /* @__PURE__ */
|
|
4922
|
+
({ className: className2, style, tokens, getLineProps, getTokenProps }) => /* @__PURE__ */ import_react21.default.createElement("pre", { className: "hawa-min-h-[37.75px] hawa-w-full hawa-overflow-auto hawa-p-4 hawa-text-foreground hawa-font-mono" }, tokens.map((line, i) => /* @__PURE__ */ import_react21.default.createElement("div", { key: i, ...getLineProps({ line }) }, props.lineNumbers && /* @__PURE__ */ import_react21.default.createElement("span", { className: "hawa-mr-4" }, i + 1), line.map((token, key) => /* @__PURE__ */ import_react21.default.createElement("span", { key, ...getTokenProps({ token }) })))))
|
|
4842
4923
|
),
|
|
4843
|
-
/* @__PURE__ */
|
|
4924
|
+
/* @__PURE__ */ import_react21.default.createElement("div", { className: "hawa-flex hawa-w-fit hawa-flex-row hawa-items-center hawa-gap-2 hawa-p-2" }, /* @__PURE__ */ import_react21.default.createElement(
|
|
4844
4925
|
Tooltip,
|
|
4845
4926
|
{
|
|
4846
4927
|
open: clipboard.copied,
|
|
4847
4928
|
side: "left",
|
|
4848
|
-
content: /* @__PURE__ */
|
|
4929
|
+
content: /* @__PURE__ */ import_react21.default.createElement("div", null, "Copied!")
|
|
4849
4930
|
},
|
|
4850
|
-
/* @__PURE__ */
|
|
4931
|
+
/* @__PURE__ */ import_react21.default.createElement(
|
|
4851
4932
|
Button,
|
|
4852
4933
|
{
|
|
4853
4934
|
size: "icon",
|
|
@@ -4855,7 +4936,7 @@ var CodeBlock = ({
|
|
|
4855
4936
|
variant: "outline",
|
|
4856
4937
|
className: "hawa-opacity-50 sm:hawa-opacity-100 hawa-text-foreground"
|
|
4857
4938
|
},
|
|
4858
|
-
/* @__PURE__ */
|
|
4939
|
+
/* @__PURE__ */ import_react21.default.createElement(
|
|
4859
4940
|
"svg",
|
|
4860
4941
|
{
|
|
4861
4942
|
"aria-label": "Copy Icon",
|
|
@@ -4868,8 +4949,8 @@ var CodeBlock = ({
|
|
|
4868
4949
|
height: "1em",
|
|
4869
4950
|
width: "1em"
|
|
4870
4951
|
},
|
|
4871
|
-
/* @__PURE__ */
|
|
4872
|
-
/* @__PURE__ */
|
|
4952
|
+
/* @__PURE__ */ import_react21.default.createElement("rect", { width: "14", height: "14", x: "8", y: "8", rx: "2", ry: "2" }),
|
|
4953
|
+
/* @__PURE__ */ import_react21.default.createElement("path", { d: "M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2" })
|
|
4873
4954
|
)
|
|
4874
4955
|
)
|
|
4875
4956
|
))
|
|
@@ -4878,7 +4959,7 @@ var CodeBlock = ({
|
|
|
4878
4959
|
};
|
|
4879
4960
|
|
|
4880
4961
|
// components/elements/Toast.tsx
|
|
4881
|
-
var
|
|
4962
|
+
var React35 = __toESM(require("react"));
|
|
4882
4963
|
var ToastPrimitives = __toESM(require("@radix-ui/react-toast"));
|
|
4883
4964
|
var import_class_variance_authority2 = require("class-variance-authority");
|
|
4884
4965
|
var toastVariants = (0, import_class_variance_authority2.cva)(
|
|
@@ -4903,7 +4984,7 @@ var toastVariants = (0, import_class_variance_authority2.cva)(
|
|
|
4903
4984
|
}
|
|
4904
4985
|
);
|
|
4905
4986
|
var ToastProvider = ToastPrimitives.Provider;
|
|
4906
|
-
var ToastViewport =
|
|
4987
|
+
var ToastViewport = React35.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React35.createElement(
|
|
4907
4988
|
ToastPrimitives.Viewport,
|
|
4908
4989
|
{
|
|
4909
4990
|
ref,
|
|
@@ -4915,8 +4996,8 @@ var ToastViewport = React34.forwardRef(({ className, ...props }, ref) => /* @__P
|
|
|
4915
4996
|
}
|
|
4916
4997
|
));
|
|
4917
4998
|
ToastViewport.displayName = ToastPrimitives.Viewport.displayName;
|
|
4918
|
-
var Toast =
|
|
4919
|
-
return /* @__PURE__ */
|
|
4999
|
+
var Toast = React35.forwardRef(({ className, variant, severity = "none", direction, ...props }, ref) => {
|
|
5000
|
+
return /* @__PURE__ */ React35.createElement(
|
|
4920
5001
|
ToastPrimitives.Root,
|
|
4921
5002
|
{
|
|
4922
5003
|
ref,
|
|
@@ -4931,8 +5012,8 @@ var Toast = React34.forwardRef(({ className, variant, severity = "none", directi
|
|
|
4931
5012
|
);
|
|
4932
5013
|
});
|
|
4933
5014
|
Toast.displayName = ToastPrimitives.Root.displayName;
|
|
4934
|
-
var ToastAction =
|
|
4935
|
-
return /* @__PURE__ */
|
|
5015
|
+
var ToastAction = React35.forwardRef(({ className, ...props }, ref) => {
|
|
5016
|
+
return /* @__PURE__ */ React35.createElement(
|
|
4936
5017
|
ToastPrimitives.Action,
|
|
4937
5018
|
{
|
|
4938
5019
|
ref,
|
|
@@ -4949,7 +5030,7 @@ var ToastAction = React34.forwardRef(({ className, ...props }, ref) => {
|
|
|
4949
5030
|
);
|
|
4950
5031
|
});
|
|
4951
5032
|
ToastAction.displayName = ToastPrimitives.Action.displayName;
|
|
4952
|
-
var ToastClose =
|
|
5033
|
+
var ToastClose = React35.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React35.createElement(
|
|
4953
5034
|
ToastPrimitives.Close,
|
|
4954
5035
|
{
|
|
4955
5036
|
ref,
|
|
@@ -4960,7 +5041,7 @@ var ToastClose = React34.forwardRef(({ className, ...props }, ref) => /* @__PURE
|
|
|
4960
5041
|
"toast-close": "",
|
|
4961
5042
|
...props
|
|
4962
5043
|
},
|
|
4963
|
-
/* @__PURE__ */
|
|
5044
|
+
/* @__PURE__ */ React35.createElement(
|
|
4964
5045
|
"svg",
|
|
4965
5046
|
{
|
|
4966
5047
|
"aria-label": "Close Icon",
|
|
@@ -4969,7 +5050,7 @@ var ToastClose = React34.forwardRef(({ className, ...props }, ref) => /* @__PURE
|
|
|
4969
5050
|
fill: "currentColor",
|
|
4970
5051
|
viewBox: "0 0 20 20"
|
|
4971
5052
|
},
|
|
4972
|
-
/* @__PURE__ */
|
|
5053
|
+
/* @__PURE__ */ React35.createElement(
|
|
4973
5054
|
"path",
|
|
4974
5055
|
{
|
|
4975
5056
|
fillRule: "evenodd",
|
|
@@ -4980,7 +5061,7 @@ var ToastClose = React34.forwardRef(({ className, ...props }, ref) => /* @__PURE
|
|
|
4980
5061
|
)
|
|
4981
5062
|
));
|
|
4982
5063
|
ToastClose.displayName = ToastPrimitives.Close.displayName;
|
|
4983
|
-
var ToastTitle =
|
|
5064
|
+
var ToastTitle = React35.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React35.createElement(
|
|
4984
5065
|
ToastPrimitives.Title,
|
|
4985
5066
|
{
|
|
4986
5067
|
ref,
|
|
@@ -4992,7 +5073,7 @@ var ToastTitle = React34.forwardRef(({ className, ...props }, ref) => /* @__PURE
|
|
|
4992
5073
|
}
|
|
4993
5074
|
));
|
|
4994
5075
|
ToastTitle.displayName = ToastPrimitives.Title.displayName;
|
|
4995
|
-
var ToastDescription =
|
|
5076
|
+
var ToastDescription = React35.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React35.createElement(
|
|
4996
5077
|
ToastPrimitives.Description,
|
|
4997
5078
|
{
|
|
4998
5079
|
ref,
|
|
@@ -5003,10 +5084,10 @@ var ToastDescription = React34.forwardRef(({ className, ...props }, ref) => /* @
|
|
|
5003
5084
|
ToastDescription.displayName = ToastPrimitives.Description.displayName;
|
|
5004
5085
|
|
|
5005
5086
|
// components/elements/Toaster.tsx
|
|
5006
|
-
var
|
|
5087
|
+
var import_react22 = __toESM(require("react"));
|
|
5007
5088
|
|
|
5008
5089
|
// components/hooks/useToast.ts
|
|
5009
|
-
var
|
|
5090
|
+
var React36 = __toESM(require("react"));
|
|
5010
5091
|
var TOAST_LIMIT = 5;
|
|
5011
5092
|
var TOAST_REMOVE_DELAY = 1e5;
|
|
5012
5093
|
var count = 0;
|
|
@@ -5102,8 +5183,8 @@ function toast({ ...props }) {
|
|
|
5102
5183
|
};
|
|
5103
5184
|
}
|
|
5104
5185
|
function useToast() {
|
|
5105
|
-
const [state, setState] =
|
|
5106
|
-
|
|
5186
|
+
const [state, setState] = React36.useState(memoryState);
|
|
5187
|
+
React36.useEffect(() => {
|
|
5107
5188
|
listeners.push(setState);
|
|
5108
5189
|
return () => {
|
|
5109
5190
|
const index = listeners.indexOf(setState);
|
|
@@ -5123,9 +5204,9 @@ function useToast() {
|
|
|
5123
5204
|
function Toaster(props) {
|
|
5124
5205
|
const { toasts } = useToast();
|
|
5125
5206
|
let isRTL = props.direction === "rtl";
|
|
5126
|
-
return /* @__PURE__ */
|
|
5127
|
-
return /* @__PURE__ */
|
|
5128
|
-
}), /* @__PURE__ */
|
|
5207
|
+
return /* @__PURE__ */ import_react22.default.createElement(ToastProvider, { swipeDirection: isRTL ? "left" : "right" }, toasts.map(function({ id, title, description, action, ...toastProps }) {
|
|
5208
|
+
return /* @__PURE__ */ import_react22.default.createElement(Toast, { direction: props.direction, key: id, ...toastProps }, /* @__PURE__ */ import_react22.default.createElement("div", { className: "hawa-grid hawa-gap-1 hawa-text-start" }, title && /* @__PURE__ */ import_react22.default.createElement(ToastTitle, null, title), description && /* @__PURE__ */ import_react22.default.createElement(ToastDescription, null, description)), action, /* @__PURE__ */ import_react22.default.createElement(ToastClose, null));
|
|
5209
|
+
}), /* @__PURE__ */ import_react22.default.createElement(
|
|
5129
5210
|
ToastViewport,
|
|
5130
5211
|
{
|
|
5131
5212
|
className: cn("hawa-gap-2", isRTL && "hawa-fixed hawa-left-0")
|
|
@@ -5133,87 +5214,6 @@ function Toaster(props) {
|
|
|
5133
5214
|
));
|
|
5134
5215
|
}
|
|
5135
5216
|
|
|
5136
|
-
// components/elements/Chip.tsx
|
|
5137
|
-
var import_react22 = __toESM(require("react"));
|
|
5138
|
-
var Chip = import_react22.default.forwardRef(
|
|
5139
|
-
({
|
|
5140
|
-
label,
|
|
5141
|
-
size = "normal",
|
|
5142
|
-
icon,
|
|
5143
|
-
color,
|
|
5144
|
-
radius = "inherit",
|
|
5145
|
-
dotType,
|
|
5146
|
-
...rest
|
|
5147
|
-
}, ref) => {
|
|
5148
|
-
let defaultStyles = "hawa-flex hawa-flex-row hawa-w-fit hawa-gap-1 hawa-items-center hawa-px-2.5 hawa-py-1 hawa-font-bold ";
|
|
5149
|
-
let radiusStyles = {
|
|
5150
|
-
inherit: " hawa-rounded",
|
|
5151
|
-
full: "hawa-rounded-full",
|
|
5152
|
-
none: "hawa-rounded-none"
|
|
5153
|
-
};
|
|
5154
|
-
let sizeStyles = {
|
|
5155
|
-
small: "hawa-h-[15px] hawa-leading-4 hawa-px-0 hawa-py-0 hawa-text-[9px] hawa-gap-0.5 ",
|
|
5156
|
-
normal: "hawa-h-fit hawa-text-xs",
|
|
5157
|
-
large: "hawa-text-base"
|
|
5158
|
-
};
|
|
5159
|
-
let dotStyles = {
|
|
5160
|
-
small: "hawa-flex hawa-h-1 hawa-w-1 hawa-rounded-full",
|
|
5161
|
-
normal: "hawa-flex hawa-h-2 hawa-w-2 hawa-rounded-full",
|
|
5162
|
-
large: "hawa-flex hawa-h-3 hawa-w-3 hawa-rounded-full"
|
|
5163
|
-
};
|
|
5164
|
-
let dotTypeStyles = {
|
|
5165
|
-
available: "hawa-bg-green-500",
|
|
5166
|
-
unavailable: "hawa-bg-red-500"
|
|
5167
|
-
};
|
|
5168
|
-
let colorStyles = {
|
|
5169
|
-
green: "hawa-bg-green-100 hawa-text-green-500 dark:hawa-bg-green-400 dark:hawa-text-green-800",
|
|
5170
|
-
blue: "hawa-bg-blue-100 hawa-text-blue-500 dark:hawa-bg-blue-400 dark:hawa-text-blue-100",
|
|
5171
|
-
red: "hawa-bg-red-100 hawa-text-red-500 dark:hawa-bg-red-400 dark:hawa-text-red-100",
|
|
5172
|
-
yellow: "hawa-bg-yellow-100 hawa-text-yellow-600 dark:hawa-bg-yellow-400 dark:hawa-text-yellow-800",
|
|
5173
|
-
orange: "hawa-bg-orange-100 hawa-text-orange-500 dark:hawa-bg-orange-400 dark:hawa-text-orange-100",
|
|
5174
|
-
purple: "hawa-bg-purple-100 hawa-text-purple-500 dark:hawa-bg-purple-400 dark:hawa-text-purple-100",
|
|
5175
|
-
cyan: "hawa-bg-cyan-100 hawa-text-cyan-800 dark:hawa-bg-cyan-400 dark:hawa-text-cyan-800",
|
|
5176
|
-
hyper: "hawa-text-white hawa-bg-gradient-to-tl hawa-from-pink-500 hawa-via-red-500 hawa-to-yellow-500 ",
|
|
5177
|
-
oceanic: "hawa-text-white hawa-bg-gradient-to-bl hawa-from-green-300 hawa-via-blue-500 hawa-to-purple-600"
|
|
5178
|
-
};
|
|
5179
|
-
if (label) {
|
|
5180
|
-
return /* @__PURE__ */ import_react22.default.createElement(
|
|
5181
|
-
"span",
|
|
5182
|
-
{
|
|
5183
|
-
...rest,
|
|
5184
|
-
ref,
|
|
5185
|
-
className: cn(
|
|
5186
|
-
defaultStyles,
|
|
5187
|
-
sizeStyles[size],
|
|
5188
|
-
radiusStyles[radius],
|
|
5189
|
-
color ? colorStyles[color] : "hawa-border hawa-bg-none"
|
|
5190
|
-
)
|
|
5191
|
-
},
|
|
5192
|
-
dotType && /* @__PURE__ */ import_react22.default.createElement(
|
|
5193
|
-
"span",
|
|
5194
|
-
{
|
|
5195
|
-
className: cn(dotStyles[size], dotTypeStyles[dotType])
|
|
5196
|
-
}
|
|
5197
|
-
),
|
|
5198
|
-
icon && icon,
|
|
5199
|
-
label
|
|
5200
|
-
);
|
|
5201
|
-
} else {
|
|
5202
|
-
return /* @__PURE__ */ import_react22.default.createElement(
|
|
5203
|
-
"span",
|
|
5204
|
-
{
|
|
5205
|
-
...rest,
|
|
5206
|
-
ref,
|
|
5207
|
-
className: cn(
|
|
5208
|
-
"hawa-w-2 hawa-h-2 hawa-rounded-full",
|
|
5209
|
-
color ? colorStyles[color] : "hawa-border hawa-bg-none"
|
|
5210
|
-
)
|
|
5211
|
-
}
|
|
5212
|
-
);
|
|
5213
|
-
}
|
|
5214
|
-
}
|
|
5215
|
-
);
|
|
5216
|
-
|
|
5217
5217
|
// components/elements/Alert.tsx
|
|
5218
5218
|
var import_react23 = __toESM(require("react"));
|
|
5219
5219
|
var Alert = ({
|