@sikka/hawa 0.18.20-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 +11 -2
- package/dist/index.d.mts +6 -4
- package/dist/index.d.ts +6 -4
- package/dist/index.js +406 -398
- package/dist/index.mjs +386 -378
- 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"));
|
|
@@ -352,6 +352,7 @@ var import_react3 = __toESM(require("react"));
|
|
|
352
352
|
var Loading = ({
|
|
353
353
|
design = "spinner",
|
|
354
354
|
size = "sm",
|
|
355
|
+
themeMode = "light",
|
|
355
356
|
color,
|
|
356
357
|
...props
|
|
357
358
|
}) => {
|
|
@@ -492,7 +493,10 @@ var Loading = ({
|
|
|
492
493
|
/* @__PURE__ */ import_react3.default.createElement(
|
|
493
494
|
"circle",
|
|
494
495
|
{
|
|
495
|
-
className: "circle-track",
|
|
496
|
+
className: cn("circle-track", {
|
|
497
|
+
"hawa-stroke-primary-foreground": themeMode === "dark",
|
|
498
|
+
"hawa-stroke-primary": themeMode === "light"
|
|
499
|
+
}),
|
|
496
500
|
cx: "20",
|
|
497
501
|
cy: "20",
|
|
498
502
|
r: "17.5",
|
|
@@ -504,7 +508,10 @@ var Loading = ({
|
|
|
504
508
|
/* @__PURE__ */ import_react3.default.createElement(
|
|
505
509
|
"circle",
|
|
506
510
|
{
|
|
507
|
-
className: "circle-car",
|
|
511
|
+
className: cn("circle-car", {
|
|
512
|
+
"hawa-stroke-primary-foreground": themeMode === "dark",
|
|
513
|
+
"hawa-stroke-primary": themeMode === "light"
|
|
514
|
+
}),
|
|
508
515
|
cx: "20",
|
|
509
516
|
cy: "20",
|
|
510
517
|
r: "17.5",
|
|
@@ -537,8 +544,8 @@ var buttonVariants = (0, import_class_variance_authority.cva)(
|
|
|
537
544
|
size: {
|
|
538
545
|
default: "hawa-h-10 hawa-px-4 hawa-py-2",
|
|
539
546
|
heightless: "hawa-px-4 hawa-py-4",
|
|
540
|
-
xs: "hawa-h-fit hawa-py-1 hawa-text-[10px] hawa-px-2 ",
|
|
541
|
-
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",
|
|
542
549
|
lg: "hawa-h-11 hawa-rounded-md hawa-px-8",
|
|
543
550
|
xl: "hawa-h-14 hawa-rounded-md hawa-px-10",
|
|
544
551
|
icon: "hawa-h-10 hawa-w-10",
|
|
@@ -577,9 +584,10 @@ var Button = React5.forwardRef(
|
|
|
577
584
|
isLoading ? /* @__PURE__ */ React5.createElement(
|
|
578
585
|
Loading,
|
|
579
586
|
{
|
|
580
|
-
design: "dots-pulse",
|
|
587
|
+
design: size === "icon" || size === "smallIcon" ? "spinner" : "dots-pulse",
|
|
588
|
+
themeMode: variant === "outline" ? "light" : "dark",
|
|
581
589
|
color: loadingColor,
|
|
582
|
-
size: size === "sm" ? "xs" : "button"
|
|
590
|
+
size: size === "sm" || size === "xs" ? "xs" : "button"
|
|
583
591
|
}
|
|
584
592
|
) : children
|
|
585
593
|
);
|
|
@@ -668,6 +676,114 @@ var CardFooter = React6.forwardRef(({ className, ...props }, ref) => /* @__PURE_
|
|
|
668
676
|
));
|
|
669
677
|
CardFooter.displayName = "CardFooter";
|
|
670
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
|
+
|
|
671
787
|
// components/elements/cards/PricingCard.tsx
|
|
672
788
|
var PricingCard = ({
|
|
673
789
|
size = "medium",
|
|
@@ -681,7 +797,7 @@ var PricingCard = ({
|
|
|
681
797
|
medium: "hawa-mx-1 hawa-w-full hawa-rounded hawa-min-w-fit hawa-border dark:hawa-border-gray-700 hawa-bg-background ",
|
|
682
798
|
large: "hawa-mx-1 hawa-w-full hawa-max-w-lg hawa-rounded hawa-border dark:hawa-border-gray-700 hawa-bg-background "
|
|
683
799
|
};
|
|
684
|
-
return /* @__PURE__ */
|
|
800
|
+
return /* @__PURE__ */ import_react6.default.createElement(
|
|
685
801
|
Card,
|
|
686
802
|
{
|
|
687
803
|
dir: direction,
|
|
@@ -691,13 +807,13 @@ var PricingCard = ({
|
|
|
691
807
|
"hawa-flex hawa-flex-col hawa-gap-4 hawa-rounded hawa-p-4 "
|
|
692
808
|
)
|
|
693
809
|
},
|
|
694
|
-
props.discount && /* @__PURE__ */
|
|
810
|
+
props.discount && /* @__PURE__ */ import_react6.default.createElement(Chip, { label: props.discount, size: "large", color: "hyper" }),
|
|
695
811
|
" ",
|
|
696
|
-
/* @__PURE__ */
|
|
697
|
-
/* @__PURE__ */
|
|
698
|
-
/* @__PURE__ */
|
|
699
|
-
props.features && /* @__PURE__ */
|
|
700
|
-
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(
|
|
701
817
|
"li",
|
|
702
818
|
{
|
|
703
819
|
key: o,
|
|
@@ -706,7 +822,7 @@ var PricingCard = ({
|
|
|
706
822
|
!feature.included && "hawa-line-through"
|
|
707
823
|
)
|
|
708
824
|
},
|
|
709
|
-
feature.included ? /* @__PURE__ */
|
|
825
|
+
feature.included ? /* @__PURE__ */ import_react6.default.createElement(
|
|
710
826
|
"svg",
|
|
711
827
|
{
|
|
712
828
|
"aria-label": "Check Icon",
|
|
@@ -715,7 +831,7 @@ var PricingCard = ({
|
|
|
715
831
|
fill: "currentColor",
|
|
716
832
|
viewBox: "0 0 20 20"
|
|
717
833
|
},
|
|
718
|
-
/* @__PURE__ */
|
|
834
|
+
/* @__PURE__ */ import_react6.default.createElement(
|
|
719
835
|
"path",
|
|
720
836
|
{
|
|
721
837
|
fillRule: "evenodd",
|
|
@@ -723,11 +839,11 @@ var PricingCard = ({
|
|
|
723
839
|
clipRule: "evenodd"
|
|
724
840
|
}
|
|
725
841
|
)
|
|
726
|
-
) : /* @__PURE__ */
|
|
727
|
-
/* @__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" }))
|
|
728
844
|
);
|
|
729
845
|
})),
|
|
730
|
-
/* @__PURE__ */
|
|
846
|
+
/* @__PURE__ */ import_react6.default.createElement(
|
|
731
847
|
Button,
|
|
732
848
|
{
|
|
733
849
|
onClick: props.onPlanClicked,
|
|
@@ -740,16 +856,16 @@ var PricingCard = ({
|
|
|
740
856
|
};
|
|
741
857
|
|
|
742
858
|
// components/elements/cards/ItemCard.tsx
|
|
743
|
-
var
|
|
859
|
+
var import_react8 = __toESM(require("react"));
|
|
744
860
|
|
|
745
861
|
// components/elements/DropdownMenu.tsx
|
|
746
|
-
var
|
|
862
|
+
var React10 = __toESM(require("react"));
|
|
747
863
|
var DropdownMenuPrimitive = __toESM(require("@radix-ui/react-dropdown-menu"));
|
|
748
864
|
var DropdownMenuRoot = DropdownMenuPrimitive.Root;
|
|
749
865
|
var DropdownMenuTrigger = DropdownMenuPrimitive.Trigger;
|
|
750
866
|
var DropdownMenuPortal = DropdownMenuPrimitive.Portal;
|
|
751
867
|
var DropdownMenuSub = DropdownMenuPrimitive.Sub;
|
|
752
|
-
var DropdownMenuSubTrigger =
|
|
868
|
+
var DropdownMenuSubTrigger = React10.forwardRef(({ className, inset, children, ...props }, ref) => /* @__PURE__ */ React10.createElement(
|
|
753
869
|
DropdownMenuPrimitive.SubTrigger,
|
|
754
870
|
{
|
|
755
871
|
ref,
|
|
@@ -760,9 +876,9 @@ var DropdownMenuSubTrigger = React8.forwardRef(({ className, inset, children, ..
|
|
|
760
876
|
),
|
|
761
877
|
...props
|
|
762
878
|
},
|
|
763
|
-
/* @__PURE__ */
|
|
879
|
+
/* @__PURE__ */ React10.createElement("div", { className: "hawa-flex hawa-flex-row hawa-items-center hawa-gap-2" }, children),
|
|
764
880
|
" ",
|
|
765
|
-
/* @__PURE__ */
|
|
881
|
+
/* @__PURE__ */ React10.createElement(
|
|
766
882
|
"svg",
|
|
767
883
|
{
|
|
768
884
|
"aria-label": "Chevron Right Icon",
|
|
@@ -774,7 +890,7 @@ var DropdownMenuSubTrigger = React8.forwardRef(({ className, inset, children, ..
|
|
|
774
890
|
width: "1em",
|
|
775
891
|
className: cn(props.dir === "rtl" ? "hawa-rotate-180" : "")
|
|
776
892
|
},
|
|
777
|
-
/* @__PURE__ */
|
|
893
|
+
/* @__PURE__ */ React10.createElement(
|
|
778
894
|
"path",
|
|
779
895
|
{
|
|
780
896
|
fillRule: "evenodd",
|
|
@@ -784,7 +900,7 @@ var DropdownMenuSubTrigger = React8.forwardRef(({ className, inset, children, ..
|
|
|
784
900
|
)
|
|
785
901
|
));
|
|
786
902
|
DropdownMenuSubTrigger.displayName = DropdownMenuPrimitive.SubTrigger.displayName;
|
|
787
|
-
var DropdownMenuSubContent =
|
|
903
|
+
var DropdownMenuSubContent = React10.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React10.createElement(
|
|
788
904
|
DropdownMenuPrimitive.SubContent,
|
|
789
905
|
{
|
|
790
906
|
ref,
|
|
@@ -796,7 +912,7 @@ var DropdownMenuSubContent = React8.forwardRef(({ className, ...props }, ref) =>
|
|
|
796
912
|
}
|
|
797
913
|
));
|
|
798
914
|
DropdownMenuSubContent.displayName = DropdownMenuPrimitive.SubContent.displayName;
|
|
799
|
-
var DropdownMenuContent =
|
|
915
|
+
var DropdownMenuContent = React10.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ React10.createElement(DropdownMenuPrimitive.Portal, null, /* @__PURE__ */ React10.createElement(
|
|
800
916
|
DropdownMenuPrimitive.Content,
|
|
801
917
|
{
|
|
802
918
|
ref,
|
|
@@ -809,8 +925,8 @@ var DropdownMenuContent = React8.forwardRef(({ className, sideOffset = 4, ...pro
|
|
|
809
925
|
}
|
|
810
926
|
)));
|
|
811
927
|
DropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName;
|
|
812
|
-
var DropdownMenuItem =
|
|
813
|
-
return /* @__PURE__ */
|
|
928
|
+
var DropdownMenuItem = React10.forwardRef(({ className, inset, slug, ...props }, ref) => {
|
|
929
|
+
return /* @__PURE__ */ React10.createElement("a", { href: slug }, /* @__PURE__ */ React10.createElement(
|
|
814
930
|
DropdownMenuPrimitive.Item,
|
|
815
931
|
{
|
|
816
932
|
disabled: props.disabled,
|
|
@@ -823,14 +939,14 @@ var DropdownMenuItem = React8.forwardRef(({ className, inset, slug, ...props },
|
|
|
823
939
|
),
|
|
824
940
|
...props
|
|
825
941
|
},
|
|
826
|
-
/* @__PURE__ */
|
|
942
|
+
/* @__PURE__ */ React10.createElement("div", { className: "hawa-flex hawa-flex-row hawa-items-center hawa-gap-2 " }, props.children),
|
|
827
943
|
props.end && props.end,
|
|
828
|
-
!props.end && props.shortcut && /* @__PURE__ */
|
|
829
|
-
!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" })
|
|
830
946
|
));
|
|
831
947
|
});
|
|
832
948
|
DropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName;
|
|
833
|
-
var DropdownMenuCheckboxItem =
|
|
949
|
+
var DropdownMenuCheckboxItem = React10.forwardRef(({ className, children, checked, ...props }, ref) => /* @__PURE__ */ React10.createElement(
|
|
834
950
|
DropdownMenuPrimitive.CheckboxItem,
|
|
835
951
|
{
|
|
836
952
|
ref,
|
|
@@ -841,7 +957,7 @@ var DropdownMenuCheckboxItem = React8.forwardRef(({ className, children, checked
|
|
|
841
957
|
checked,
|
|
842
958
|
...props
|
|
843
959
|
},
|
|
844
|
-
/* @__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(
|
|
845
961
|
"svg",
|
|
846
962
|
{
|
|
847
963
|
"aria-label": "Check Mark",
|
|
@@ -852,12 +968,12 @@ var DropdownMenuCheckboxItem = React8.forwardRef(({ className, children, checked
|
|
|
852
968
|
height: "0.60em",
|
|
853
969
|
width: "0.60em"
|
|
854
970
|
},
|
|
855
|
-
/* @__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" })
|
|
856
972
|
), " ")),
|
|
857
973
|
children
|
|
858
974
|
));
|
|
859
975
|
DropdownMenuCheckboxItem.displayName = DropdownMenuPrimitive.CheckboxItem.displayName;
|
|
860
|
-
var DropdownMenuRadioItem =
|
|
976
|
+
var DropdownMenuRadioItem = React10.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ React10.createElement(
|
|
861
977
|
DropdownMenuPrimitive.RadioItem,
|
|
862
978
|
{
|
|
863
979
|
ref,
|
|
@@ -867,7 +983,7 @@ var DropdownMenuRadioItem = React8.forwardRef(({ className, children, ...props }
|
|
|
867
983
|
),
|
|
868
984
|
...props
|
|
869
985
|
},
|
|
870
|
-
/* @__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(
|
|
871
987
|
"svg",
|
|
872
988
|
{
|
|
873
989
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -882,12 +998,12 @@ var DropdownMenuRadioItem = React8.forwardRef(({ className, children, ...props }
|
|
|
882
998
|
strokeLinejoin: "round",
|
|
883
999
|
className: "hawa-h-2 hawa-w-2 hawa-fill-current"
|
|
884
1000
|
},
|
|
885
|
-
/* @__PURE__ */
|
|
1001
|
+
/* @__PURE__ */ React10.createElement("circle", { cx: "12", cy: "12", r: "10" })
|
|
886
1002
|
))),
|
|
887
1003
|
children
|
|
888
1004
|
));
|
|
889
1005
|
DropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName;
|
|
890
|
-
var DropdownMenuLabel =
|
|
1006
|
+
var DropdownMenuLabel = React10.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ React10.createElement(
|
|
891
1007
|
DropdownMenuPrimitive.Label,
|
|
892
1008
|
{
|
|
893
1009
|
ref,
|
|
@@ -900,7 +1016,7 @@ var DropdownMenuLabel = React8.forwardRef(({ className, inset, ...props }, ref)
|
|
|
900
1016
|
}
|
|
901
1017
|
));
|
|
902
1018
|
DropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName;
|
|
903
|
-
var DropdownMenuSeparator =
|
|
1019
|
+
var DropdownMenuSeparator = React10.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React10.createElement(
|
|
904
1020
|
DropdownMenuPrimitive.Separator,
|
|
905
1021
|
{
|
|
906
1022
|
ref,
|
|
@@ -913,7 +1029,7 @@ var DropdownMenuShortcut = ({
|
|
|
913
1029
|
className,
|
|
914
1030
|
...props
|
|
915
1031
|
}) => {
|
|
916
|
-
return /* @__PURE__ */
|
|
1032
|
+
return /* @__PURE__ */ React10.createElement(
|
|
917
1033
|
"span",
|
|
918
1034
|
{
|
|
919
1035
|
className: cn(
|
|
@@ -952,7 +1068,7 @@ var DropdownMenu = ({
|
|
|
952
1068
|
default: "hawa-px-2 hawa-py-3 ",
|
|
953
1069
|
sm: "hawa-text-xs hawa-px-1.5 hawa-py-1.5 "
|
|
954
1070
|
};
|
|
955
|
-
return /* @__PURE__ */
|
|
1071
|
+
return /* @__PURE__ */ React10.createElement(
|
|
956
1072
|
DropdownMenuRoot,
|
|
957
1073
|
{
|
|
958
1074
|
onOpenChange,
|
|
@@ -960,8 +1076,8 @@ var DropdownMenu = ({
|
|
|
960
1076
|
modal: false,
|
|
961
1077
|
dir: direction
|
|
962
1078
|
},
|
|
963
|
-
/* @__PURE__ */
|
|
964
|
-
/* @__PURE__ */
|
|
1079
|
+
/* @__PURE__ */ React10.createElement(DropdownMenuTrigger, { asChild: true, className: triggerClassname }, trigger),
|
|
1080
|
+
/* @__PURE__ */ React10.createElement(DropdownMenuPortal, null, /* @__PURE__ */ React10.createElement(
|
|
965
1081
|
DropdownMenuContent,
|
|
966
1082
|
{
|
|
967
1083
|
side,
|
|
@@ -977,13 +1093,13 @@ var DropdownMenu = ({
|
|
|
977
1093
|
header && header,
|
|
978
1094
|
items && items.map((item, index) => {
|
|
979
1095
|
if (item.itemType === "separator") {
|
|
980
|
-
return /* @__PURE__ */
|
|
1096
|
+
return /* @__PURE__ */ React10.createElement(DropdownMenuSeparator, { key: index });
|
|
981
1097
|
} else if (item.itemType === "label") {
|
|
982
|
-
return /* @__PURE__ */
|
|
1098
|
+
return /* @__PURE__ */ React10.createElement(DropdownMenuLabel, { key: index }, item.label);
|
|
983
1099
|
} else if (item.itemType === "custom") {
|
|
984
|
-
return /* @__PURE__ */
|
|
1100
|
+
return /* @__PURE__ */ React10.createElement("div", { key: index }, item.content);
|
|
985
1101
|
} else {
|
|
986
|
-
return item.subitems ? /* @__PURE__ */
|
|
1102
|
+
return item.subitems ? /* @__PURE__ */ React10.createElement(DropdownMenuSub, { key: index }, /* @__PURE__ */ React10.createElement(
|
|
987
1103
|
DropdownMenuSubTrigger,
|
|
988
1104
|
{
|
|
989
1105
|
className: cn(sizeStyles[size]),
|
|
@@ -991,7 +1107,7 @@ var DropdownMenu = ({
|
|
|
991
1107
|
},
|
|
992
1108
|
item.icon && item.icon,
|
|
993
1109
|
item.label && item.label
|
|
994
|
-
), /* @__PURE__ */
|
|
1110
|
+
), /* @__PURE__ */ React10.createElement(DropdownMenuPortal, null, /* @__PURE__ */ React10.createElement(DropdownMenuSubContent, null, item.subitems.map((subitem, subIndex) => /* @__PURE__ */ React10.createElement(
|
|
995
1111
|
DropdownMenuItem,
|
|
996
1112
|
{
|
|
997
1113
|
slug: subitem.slug,
|
|
@@ -1018,7 +1134,7 @@ var DropdownMenu = ({
|
|
|
1018
1134
|
},
|
|
1019
1135
|
subitem.icon && subitem.icon,
|
|
1020
1136
|
subitem.label && subitem.label
|
|
1021
|
-
))))) : /* @__PURE__ */
|
|
1137
|
+
))))) : /* @__PURE__ */ React10.createElement(
|
|
1022
1138
|
DropdownMenuItem,
|
|
1023
1139
|
{
|
|
1024
1140
|
slug: item.slug,
|
|
@@ -1071,12 +1187,12 @@ var DropdownMenu = ({
|
|
|
1071
1187
|
};
|
|
1072
1188
|
|
|
1073
1189
|
// components/elements/StopPropagationWrapper.tsx
|
|
1074
|
-
var
|
|
1190
|
+
var import_react7 = __toESM(require("react"));
|
|
1075
1191
|
var StopPropagationWrapper = (props) => {
|
|
1076
1192
|
const handleClick = (e) => {
|
|
1077
1193
|
e.stopPropagation();
|
|
1078
1194
|
};
|
|
1079
|
-
return /* @__PURE__ */
|
|
1195
|
+
return /* @__PURE__ */ import_react7.default.createElement("div", { onClick: handleClick }, props.children);
|
|
1080
1196
|
};
|
|
1081
1197
|
|
|
1082
1198
|
// components/elements/cards/ItemCard.tsx
|
|
@@ -1108,12 +1224,12 @@ var ItemCard = ({
|
|
|
1108
1224
|
)
|
|
1109
1225
|
};
|
|
1110
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";
|
|
1111
|
-
const [openActionHeader, setOpenActionHeader] = (0,
|
|
1227
|
+
const [openActionHeader, setOpenActionHeader] = (0, import_react8.useState)(false);
|
|
1112
1228
|
function handleOpenActionHeader(e) {
|
|
1113
1229
|
e.stopPropagation();
|
|
1114
1230
|
setOpenActionHeader(!openActionHeader);
|
|
1115
1231
|
}
|
|
1116
|
-
(0,
|
|
1232
|
+
(0, import_react8.useEffect)(() => {
|
|
1117
1233
|
window.onclick = () => {
|
|
1118
1234
|
if (openActionHeader) {
|
|
1119
1235
|
setOpenActionHeader(false);
|
|
@@ -1121,7 +1237,7 @@ var ItemCard = ({
|
|
|
1121
1237
|
};
|
|
1122
1238
|
return () => window.onclick = null;
|
|
1123
1239
|
}, [openActionHeader]);
|
|
1124
|
-
return /* @__PURE__ */
|
|
1240
|
+
return /* @__PURE__ */ import_react8.default.createElement(
|
|
1125
1241
|
"div",
|
|
1126
1242
|
{
|
|
1127
1243
|
className: cn(
|
|
@@ -1137,7 +1253,7 @@ var ItemCard = ({
|
|
|
1137
1253
|
},
|
|
1138
1254
|
...props
|
|
1139
1255
|
},
|
|
1140
|
-
cardImage && /* @__PURE__ */
|
|
1256
|
+
cardImage && /* @__PURE__ */ import_react8.default.createElement("div", { className: "hawa-group hawa-relative hawa-overflow-clip" }, /* @__PURE__ */ import_react8.default.createElement(
|
|
1141
1257
|
"img",
|
|
1142
1258
|
{
|
|
1143
1259
|
src: cardImage,
|
|
@@ -1146,7 +1262,7 @@ var ItemCard = ({
|
|
|
1146
1262
|
clickableImage ? "hawa-overflow-clip hawa-transition-all group-hover:hawa-blur-lg" : ""
|
|
1147
1263
|
)
|
|
1148
1264
|
}
|
|
1149
|
-
), 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(
|
|
1150
1266
|
Button,
|
|
1151
1267
|
{
|
|
1152
1268
|
variant: "secondary",
|
|
@@ -1156,19 +1272,19 @@ var ItemCard = ({
|
|
|
1156
1272
|
clickableImageActionIcon,
|
|
1157
1273
|
clickableImageActionText || "Click"
|
|
1158
1274
|
)))),
|
|
1159
|
-
/* @__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(
|
|
1160
1276
|
DropdownMenu,
|
|
1161
1277
|
{
|
|
1162
1278
|
items: headerActions,
|
|
1163
|
-
trigger: /* @__PURE__ */
|
|
1279
|
+
trigger: /* @__PURE__ */ import_react8.default.createElement(
|
|
1164
1280
|
Button,
|
|
1165
1281
|
{
|
|
1166
1282
|
variant: "ghost",
|
|
1167
1283
|
size: "smallIcon",
|
|
1168
1284
|
onClick: handleOpenActionHeader
|
|
1169
1285
|
},
|
|
1170
|
-
/* @__PURE__ */
|
|
1171
|
-
/* @__PURE__ */
|
|
1286
|
+
/* @__PURE__ */ import_react8.default.createElement("span", { className: "hawa-sr-only" }, "Open dropdown"),
|
|
1287
|
+
/* @__PURE__ */ import_react8.default.createElement(
|
|
1172
1288
|
"svg",
|
|
1173
1289
|
{
|
|
1174
1290
|
className: "hawa-h-5 hawa-w-5",
|
|
@@ -1176,11 +1292,11 @@ var ItemCard = ({
|
|
|
1176
1292
|
fill: "currentColor",
|
|
1177
1293
|
viewBox: "0 0 20 20"
|
|
1178
1294
|
},
|
|
1179
|
-
/* @__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" })
|
|
1180
1296
|
)
|
|
1181
1297
|
)
|
|
1182
1298
|
}
|
|
1183
|
-
))), /* @__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(
|
|
1184
1300
|
"div",
|
|
1185
1301
|
{
|
|
1186
1302
|
className: cn(
|
|
@@ -1189,19 +1305,19 @@ var ItemCard = ({
|
|
|
1189
1305
|
)
|
|
1190
1306
|
},
|
|
1191
1307
|
counts,
|
|
1192
|
-
/* @__PURE__ */
|
|
1308
|
+
/* @__PURE__ */ import_react8.default.createElement(StopPropagationWrapper, null, actions)
|
|
1193
1309
|
) : null)
|
|
1194
1310
|
);
|
|
1195
1311
|
};
|
|
1196
1312
|
|
|
1197
1313
|
// components/elements/cards/LandingCard.tsx
|
|
1198
|
-
var
|
|
1314
|
+
var import_react9 = __toESM(require("react"));
|
|
1199
1315
|
var LandingCard = (props) => {
|
|
1200
|
-
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)));
|
|
1201
1317
|
};
|
|
1202
1318
|
|
|
1203
1319
|
// components/elements/PinInput.tsx
|
|
1204
|
-
var
|
|
1320
|
+
var import_react10 = __toESM(require("react"));
|
|
1205
1321
|
var PinInput = ({
|
|
1206
1322
|
label,
|
|
1207
1323
|
icon,
|
|
@@ -1210,7 +1326,7 @@ var PinInput = ({
|
|
|
1210
1326
|
getPins,
|
|
1211
1327
|
...props
|
|
1212
1328
|
}) => {
|
|
1213
|
-
const [pin, setPin] = (0,
|
|
1329
|
+
const [pin, setPin] = (0, import_react10.useState)(Array.from(Array(digits)));
|
|
1214
1330
|
const handleKeyDown = (e, index) => {
|
|
1215
1331
|
let backTo = 0;
|
|
1216
1332
|
if (e.key === "Backspace") {
|
|
@@ -1219,7 +1335,7 @@ var PinInput = ({
|
|
|
1219
1335
|
previousInput == null ? void 0 : previousInput.focus();
|
|
1220
1336
|
}
|
|
1221
1337
|
};
|
|
1222
|
-
(0,
|
|
1338
|
+
(0, import_react10.useEffect)(() => {
|
|
1223
1339
|
let unfilled = pin.includes(void 0);
|
|
1224
1340
|
if (!unfilled && getPins) {
|
|
1225
1341
|
getPins(pin);
|
|
@@ -1244,13 +1360,13 @@ var PinInput = ({
|
|
|
1244
1360
|
}
|
|
1245
1361
|
}
|
|
1246
1362
|
};
|
|
1247
|
-
return /* @__PURE__ */
|
|
1363
|
+
return /* @__PURE__ */ import_react10.default.createElement("div", { className: "hawa-flex hawa-flex-col hawa-gap-2" }, /* @__PURE__ */ import_react10.default.createElement(
|
|
1248
1364
|
"div",
|
|
1249
1365
|
{
|
|
1250
1366
|
className: "hawa-flex hawa-w-full hawa-flex-row hawa-justify-center hawa-gap-2",
|
|
1251
1367
|
dir: "ltr"
|
|
1252
1368
|
},
|
|
1253
|
-
pin.map((value, index) => /* @__PURE__ */
|
|
1369
|
+
pin.map((value, index) => /* @__PURE__ */ import_react10.default.createElement(
|
|
1254
1370
|
"input",
|
|
1255
1371
|
{
|
|
1256
1372
|
key: index,
|
|
@@ -1269,7 +1385,7 @@ var PinInput = ({
|
|
|
1269
1385
|
...props
|
|
1270
1386
|
}
|
|
1271
1387
|
))
|
|
1272
|
-
), /* @__PURE__ */
|
|
1388
|
+
), /* @__PURE__ */ import_react10.default.createElement(
|
|
1273
1389
|
"p",
|
|
1274
1390
|
{
|
|
1275
1391
|
className: cn(
|
|
@@ -1282,7 +1398,7 @@ var PinInput = ({
|
|
|
1282
1398
|
};
|
|
1283
1399
|
|
|
1284
1400
|
// components/elements/PhoneInput.tsx
|
|
1285
|
-
var
|
|
1401
|
+
var import_react13 = __toESM(require("react"));
|
|
1286
1402
|
|
|
1287
1403
|
// components/countries.ts
|
|
1288
1404
|
var countries = [
|
|
@@ -2979,17 +3095,17 @@ var countries_default = countries;
|
|
|
2979
3095
|
|
|
2980
3096
|
// components/elements/Select.tsx
|
|
2981
3097
|
var import_clsx2 = __toESM(require("clsx"));
|
|
2982
|
-
var
|
|
3098
|
+
var import_react12 = __toESM(require("react"));
|
|
2983
3099
|
var import_react_select = __toESM(require("react-select"));
|
|
2984
3100
|
var import_creatable = __toESM(require("react-select/creatable"));
|
|
2985
3101
|
|
|
2986
3102
|
// components/elements/Label.tsx
|
|
2987
|
-
var
|
|
3103
|
+
var React16 = __toESM(require("react"));
|
|
2988
3104
|
|
|
2989
3105
|
// components/elements/Tooltip.tsx
|
|
2990
|
-
var
|
|
3106
|
+
var import_react11 = __toESM(require("react"));
|
|
2991
3107
|
var TooltipPrimitive = __toESM(require("@radix-ui/react-tooltip"));
|
|
2992
|
-
var TooltipContent =
|
|
3108
|
+
var TooltipContent = import_react11.default.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ import_react11.default.createElement(
|
|
2993
3109
|
TooltipPrimitive.Content,
|
|
2994
3110
|
{
|
|
2995
3111
|
ref,
|
|
@@ -3002,7 +3118,7 @@ var TooltipContent = import_react9.default.forwardRef(({ className, sideOffset =
|
|
|
3002
3118
|
}
|
|
3003
3119
|
));
|
|
3004
3120
|
TooltipContent.displayName = TooltipPrimitive.Content.displayName;
|
|
3005
|
-
var TooltipArrow =
|
|
3121
|
+
var TooltipArrow = import_react11.default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ import_react11.default.createElement(TooltipPrimitive.Arrow, { ref, className: cn(className), ...props }));
|
|
3006
3122
|
TooltipArrow.displayName = TooltipPrimitive.Arrow.displayName;
|
|
3007
3123
|
var Tooltip = ({
|
|
3008
3124
|
side,
|
|
@@ -3017,13 +3133,13 @@ var Tooltip = ({
|
|
|
3017
3133
|
delayDuration = 300,
|
|
3018
3134
|
...props
|
|
3019
3135
|
}) => {
|
|
3020
|
-
return /* @__PURE__ */
|
|
3136
|
+
return /* @__PURE__ */ import_react11.default.createElement(
|
|
3021
3137
|
TooltipPrimitive.TooltipProvider,
|
|
3022
3138
|
{
|
|
3023
3139
|
delayDuration,
|
|
3024
3140
|
...providerProps
|
|
3025
3141
|
},
|
|
3026
|
-
/* @__PURE__ */
|
|
3142
|
+
/* @__PURE__ */ import_react11.default.createElement(
|
|
3027
3143
|
TooltipPrimitive.Root,
|
|
3028
3144
|
{
|
|
3029
3145
|
open,
|
|
@@ -3031,14 +3147,14 @@ var Tooltip = ({
|
|
|
3031
3147
|
onOpenChange,
|
|
3032
3148
|
...props
|
|
3033
3149
|
},
|
|
3034
|
-
/* @__PURE__ */
|
|
3035
|
-
/* @__PURE__ */
|
|
3150
|
+
/* @__PURE__ */ import_react11.default.createElement(TooltipPrimitive.Trigger, { ...triggerProps }, children),
|
|
3151
|
+
/* @__PURE__ */ import_react11.default.createElement(TooltipContent, { side, align: "center", ...contentProps }, content)
|
|
3036
3152
|
)
|
|
3037
3153
|
);
|
|
3038
3154
|
};
|
|
3039
3155
|
|
|
3040
3156
|
// components/elements/Label.tsx
|
|
3041
|
-
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(
|
|
3042
3158
|
"label",
|
|
3043
3159
|
{
|
|
3044
3160
|
ref,
|
|
@@ -3049,8 +3165,8 @@ var Label2 = React14.forwardRef(({ className, hint, hintSide, required, children
|
|
|
3049
3165
|
...props
|
|
3050
3166
|
},
|
|
3051
3167
|
children,
|
|
3052
|
-
required && /* @__PURE__ */
|
|
3053
|
-
), 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(
|
|
3054
3170
|
"svg",
|
|
3055
3171
|
{
|
|
3056
3172
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -3062,39 +3178,12 @@ var Label2 = React14.forwardRef(({ className, hint, hintSide, required, children
|
|
|
3062
3178
|
strokeLinecap: "round",
|
|
3063
3179
|
strokeLinejoin: "round"
|
|
3064
3180
|
},
|
|
3065
|
-
/* @__PURE__ */
|
|
3066
|
-
/* @__PURE__ */
|
|
3067
|
-
/* @__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" })
|
|
3068
3184
|
))));
|
|
3069
3185
|
Label2.displayName = "Label";
|
|
3070
3186
|
|
|
3071
|
-
// components/elements/Skeleton.tsx
|
|
3072
|
-
var import_react10 = __toESM(require("react"));
|
|
3073
|
-
function Skeleton({
|
|
3074
|
-
className,
|
|
3075
|
-
content,
|
|
3076
|
-
animation = "pulse",
|
|
3077
|
-
...props
|
|
3078
|
-
}) {
|
|
3079
|
-
const animationStyles = {
|
|
3080
|
-
none: "hawa-rounded hawa-bg-muted",
|
|
3081
|
-
pulse: "hawa-animate-pulse hawa-rounded hawa-bg-muted",
|
|
3082
|
-
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"
|
|
3083
|
-
};
|
|
3084
|
-
return /* @__PURE__ */ import_react10.default.createElement(
|
|
3085
|
-
"div",
|
|
3086
|
-
{
|
|
3087
|
-
className: cn(
|
|
3088
|
-
animationStyles[animation],
|
|
3089
|
-
content && "hawa-flex hawa-flex-col hawa-justify-center hawa-items-center",
|
|
3090
|
-
className
|
|
3091
|
-
),
|
|
3092
|
-
...props
|
|
3093
|
-
},
|
|
3094
|
-
content && content
|
|
3095
|
-
);
|
|
3096
|
-
}
|
|
3097
|
-
|
|
3098
3187
|
// components/elements/Select.tsx
|
|
3099
3188
|
var Select = ({
|
|
3100
3189
|
labelProps,
|
|
@@ -3103,10 +3192,10 @@ var Select = ({
|
|
|
3103
3192
|
}) => {
|
|
3104
3193
|
const NoOption = () => {
|
|
3105
3194
|
var _a, _b;
|
|
3106
|
-
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");
|
|
3107
3196
|
};
|
|
3108
3197
|
const Control = ({ children, innerProps, innerRef }) => {
|
|
3109
|
-
return /* @__PURE__ */
|
|
3198
|
+
return /* @__PURE__ */ import_react12.default.createElement(
|
|
3110
3199
|
"div",
|
|
3111
3200
|
{
|
|
3112
3201
|
ref: innerRef,
|
|
@@ -3119,7 +3208,7 @@ var Select = ({
|
|
|
3119
3208
|
);
|
|
3120
3209
|
};
|
|
3121
3210
|
const Option = ({ children, innerProps, innerRef }) => {
|
|
3122
|
-
return /* @__PURE__ */
|
|
3211
|
+
return /* @__PURE__ */ import_react12.default.createElement(
|
|
3123
3212
|
"div",
|
|
3124
3213
|
{
|
|
3125
3214
|
ref: innerRef,
|
|
@@ -3140,7 +3229,7 @@ var Select = ({
|
|
|
3140
3229
|
...menuProps
|
|
3141
3230
|
}) => {
|
|
3142
3231
|
const menuOpen = menuProps.selectProps.menuIsOpen;
|
|
3143
|
-
return /* @__PURE__ */
|
|
3232
|
+
return /* @__PURE__ */ import_react12.default.createElement(
|
|
3144
3233
|
"div",
|
|
3145
3234
|
{
|
|
3146
3235
|
className: cn(
|
|
@@ -3154,7 +3243,7 @@ var Select = ({
|
|
|
3154
3243
|
children
|
|
3155
3244
|
);
|
|
3156
3245
|
};
|
|
3157
|
-
return /* @__PURE__ */
|
|
3246
|
+
return /* @__PURE__ */ import_react12.default.createElement(
|
|
3158
3247
|
"div",
|
|
3159
3248
|
{
|
|
3160
3249
|
className: cn(
|
|
@@ -3162,10 +3251,10 @@ var Select = ({
|
|
|
3162
3251
|
props.width === "fit" ? "hawa-w-fit" : "hawa-w-full"
|
|
3163
3252
|
)
|
|
3164
3253
|
},
|
|
3165
|
-
props.label && /* @__PURE__ */
|
|
3166
|
-
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 ? (
|
|
3167
3256
|
// TODO: enable keyboard to go to the next item in the list
|
|
3168
|
-
/* @__PURE__ */
|
|
3257
|
+
/* @__PURE__ */ import_react12.default.createElement(
|
|
3169
3258
|
import_react_select.default,
|
|
3170
3259
|
{
|
|
3171
3260
|
noOptionsMessage: NoOption,
|
|
@@ -3202,7 +3291,7 @@ var Select = ({
|
|
|
3202
3291
|
isSearchable: props.isSearchable
|
|
3203
3292
|
}
|
|
3204
3293
|
)
|
|
3205
|
-
) : /* @__PURE__ */
|
|
3294
|
+
) : /* @__PURE__ */ import_react12.default.createElement(
|
|
3206
3295
|
import_creatable.default,
|
|
3207
3296
|
{
|
|
3208
3297
|
formatCreateLabel: (inputValue) => {
|
|
@@ -3232,7 +3321,7 @@ var Select = ({
|
|
|
3232
3321
|
onInputChange: (newValue, action) => props.onInputChange(newValue, action)
|
|
3233
3322
|
}
|
|
3234
3323
|
),
|
|
3235
|
-
!props.hideHelperText && /* @__PURE__ */
|
|
3324
|
+
!props.hideHelperText && /* @__PURE__ */ import_react12.default.createElement(
|
|
3236
3325
|
"p",
|
|
3237
3326
|
{
|
|
3238
3327
|
className: cn(
|
|
@@ -3247,10 +3336,10 @@ var Select = ({
|
|
|
3247
3336
|
|
|
3248
3337
|
// components/elements/PhoneInput.tsx
|
|
3249
3338
|
var PhoneInput = ({ labelProps, ...props }) => {
|
|
3250
|
-
const [phoneNumber, setPhoneNumber] = (0,
|
|
3251
|
-
const [countryCode, setCountryCode] = (0,
|
|
3252
|
-
const inputRef = (0,
|
|
3253
|
-
(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)(() => {
|
|
3254
3343
|
var _a;
|
|
3255
3344
|
if (inputRef.current) {
|
|
3256
3345
|
(_a = inputRef.current) == null ? void 0 : _a.focus();
|
|
@@ -3268,7 +3357,7 @@ var PhoneInput = ({ labelProps, ...props }) => {
|
|
|
3268
3357
|
console.log("handleChange prop was not provided in <PhoneInput/>");
|
|
3269
3358
|
}
|
|
3270
3359
|
};
|
|
3271
|
-
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(
|
|
3272
3361
|
Select,
|
|
3273
3362
|
{
|
|
3274
3363
|
width: "fit",
|
|
@@ -3284,7 +3373,7 @@ var PhoneInput = ({ labelProps, ...props }) => {
|
|
|
3284
3373
|
value: countryCode == null ? void 0 : countryCode.label,
|
|
3285
3374
|
onChange: setCountryCode
|
|
3286
3375
|
}
|
|
3287
|
-
), /* @__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(
|
|
3288
3377
|
"input",
|
|
3289
3378
|
{
|
|
3290
3379
|
ref: inputRef,
|
|
@@ -3297,7 +3386,7 @@ var PhoneInput = ({ labelProps, ...props }) => {
|
|
|
3297
3386
|
type: "tel",
|
|
3298
3387
|
placeholder: "531045453"
|
|
3299
3388
|
}
|
|
3300
|
-
))), /* @__PURE__ */
|
|
3389
|
+
))), /* @__PURE__ */ import_react13.default.createElement(
|
|
3301
3390
|
"p",
|
|
3302
3391
|
{
|
|
3303
3392
|
className: cn(
|
|
@@ -3310,7 +3399,7 @@ var PhoneInput = ({ labelProps, ...props }) => {
|
|
|
3310
3399
|
};
|
|
3311
3400
|
|
|
3312
3401
|
// components/elements/Checkbox.tsx
|
|
3313
|
-
var
|
|
3402
|
+
var React19 = __toESM(require("react"));
|
|
3314
3403
|
var CheckboxPrimitive = __toESM(require("@radix-ui/react-checkbox"));
|
|
3315
3404
|
var Checkbox = ({
|
|
3316
3405
|
id,
|
|
@@ -3320,7 +3409,7 @@ var Checkbox = ({
|
|
|
3320
3409
|
disabled,
|
|
3321
3410
|
...props
|
|
3322
3411
|
}) => {
|
|
3323
|
-
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(
|
|
3324
3413
|
"label",
|
|
3325
3414
|
{
|
|
3326
3415
|
htmlFor: id,
|
|
@@ -3330,7 +3419,7 @@ var Checkbox = ({
|
|
|
3330
3419
|
)
|
|
3331
3420
|
},
|
|
3332
3421
|
label
|
|
3333
|
-
), sublabel && /* @__PURE__ */
|
|
3422
|
+
), sublabel && /* @__PURE__ */ React19.createElement(
|
|
3334
3423
|
"label",
|
|
3335
3424
|
{
|
|
3336
3425
|
htmlFor: id,
|
|
@@ -3340,7 +3429,7 @@ var Checkbox = ({
|
|
|
3340
3429
|
)
|
|
3341
3430
|
},
|
|
3342
3431
|
sublabel
|
|
3343
|
-
), helperText && !disabled && /* @__PURE__ */
|
|
3432
|
+
), helperText && !disabled && /* @__PURE__ */ React19.createElement(
|
|
3344
3433
|
"label",
|
|
3345
3434
|
{
|
|
3346
3435
|
htmlFor: id,
|
|
@@ -3352,7 +3441,7 @@ var Checkbox = ({
|
|
|
3352
3441
|
helperText
|
|
3353
3442
|
)));
|
|
3354
3443
|
};
|
|
3355
|
-
var CheckboxElement =
|
|
3444
|
+
var CheckboxElement = React19.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React19.createElement(
|
|
3356
3445
|
CheckboxPrimitive.Root,
|
|
3357
3446
|
{
|
|
3358
3447
|
ref,
|
|
@@ -3362,14 +3451,14 @@ var CheckboxElement = React18.forwardRef(({ className, ...props }, ref) => /* @_
|
|
|
3362
3451
|
),
|
|
3363
3452
|
...props
|
|
3364
3453
|
},
|
|
3365
|
-
/* @__PURE__ */
|
|
3454
|
+
/* @__PURE__ */ React19.createElement(
|
|
3366
3455
|
CheckboxPrimitive.Indicator,
|
|
3367
3456
|
{
|
|
3368
3457
|
className: cn(
|
|
3369
3458
|
"hawa-flex hawa-items-center hawa-justify-center hawa-text-current"
|
|
3370
3459
|
)
|
|
3371
3460
|
},
|
|
3372
|
-
/* @__PURE__ */
|
|
3461
|
+
/* @__PURE__ */ React19.createElement(
|
|
3373
3462
|
"svg",
|
|
3374
3463
|
{
|
|
3375
3464
|
"aria-label": "Check Mark",
|
|
@@ -3380,7 +3469,7 @@ var CheckboxElement = React18.forwardRef(({ className, ...props }, ref) => /* @_
|
|
|
3380
3469
|
height: "0.60em",
|
|
3381
3470
|
width: "0.60em"
|
|
3382
3471
|
},
|
|
3383
|
-
/* @__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" })
|
|
3384
3473
|
),
|
|
3385
3474
|
" "
|
|
3386
3475
|
)
|
|
@@ -3388,7 +3477,7 @@ var CheckboxElement = React18.forwardRef(({ className, ...props }, ref) => /* @_
|
|
|
3388
3477
|
CheckboxElement.displayName = CheckboxPrimitive.Root.displayName;
|
|
3389
3478
|
|
|
3390
3479
|
// components/elements/Radio.tsx
|
|
3391
|
-
var
|
|
3480
|
+
var import_react14 = __toESM(require("react"));
|
|
3392
3481
|
var Radio = ({
|
|
3393
3482
|
design = "default",
|
|
3394
3483
|
width = "default",
|
|
@@ -3397,7 +3486,7 @@ var Radio = ({
|
|
|
3397
3486
|
...props
|
|
3398
3487
|
}) => {
|
|
3399
3488
|
var _a, _b, _c;
|
|
3400
|
-
const [selectedOption, setSelectedOption] = (0,
|
|
3489
|
+
const [selectedOption, setSelectedOption] = (0, import_react14.useState)(props.defaultValue);
|
|
3401
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 ";
|
|
3402
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";
|
|
3403
3492
|
let orientationStyle = {
|
|
@@ -3408,11 +3497,11 @@ var Radio = ({
|
|
|
3408
3497
|
default: "hawa-max-w-fit",
|
|
3409
3498
|
full: "hawa-w-full"
|
|
3410
3499
|
};
|
|
3411
|
-
const [parentDirection, setParentDirection] =
|
|
3500
|
+
const [parentDirection, setParentDirection] = import_react14.default.useState(
|
|
3412
3501
|
null
|
|
3413
3502
|
);
|
|
3414
|
-
const parentRef = (0,
|
|
3415
|
-
(0,
|
|
3503
|
+
const parentRef = (0, import_react14.useRef)(null);
|
|
3504
|
+
(0, import_react14.useEffect)(() => {
|
|
3416
3505
|
var _a2;
|
|
3417
3506
|
const parentNode = (_a2 = parentRef.current) == null ? void 0 : _a2.parentNode;
|
|
3418
3507
|
if (parentNode) {
|
|
@@ -3422,7 +3511,7 @@ var Radio = ({
|
|
|
3422
3511
|
});
|
|
3423
3512
|
switch (design) {
|
|
3424
3513
|
case "tabs":
|
|
3425
|
-
return /* @__PURE__ */
|
|
3514
|
+
return /* @__PURE__ */ import_react14.default.createElement(
|
|
3426
3515
|
"ul",
|
|
3427
3516
|
{
|
|
3428
3517
|
ref: parentRef,
|
|
@@ -3433,7 +3522,7 @@ var Radio = ({
|
|
|
3433
3522
|
orientationStyle[orientation]
|
|
3434
3523
|
)
|
|
3435
3524
|
},
|
|
3436
|
-
(_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(
|
|
3437
3526
|
"li",
|
|
3438
3527
|
{
|
|
3439
3528
|
"aria-current": "page",
|
|
@@ -3460,13 +3549,13 @@ var Radio = ({
|
|
|
3460
3549
|
))
|
|
3461
3550
|
);
|
|
3462
3551
|
case "bordered":
|
|
3463
|
-
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(
|
|
3464
3553
|
"div",
|
|
3465
3554
|
{
|
|
3466
3555
|
key: i,
|
|
3467
3556
|
className: "hawa-rounded hawa-border hawa-border-gray-200 "
|
|
3468
3557
|
},
|
|
3469
|
-
/* @__PURE__ */
|
|
3558
|
+
/* @__PURE__ */ import_react14.default.createElement(
|
|
3470
3559
|
"div",
|
|
3471
3560
|
{
|
|
3472
3561
|
className: cn(
|
|
@@ -3475,7 +3564,7 @@ var Radio = ({
|
|
|
3475
3564
|
),
|
|
3476
3565
|
key: i + 1
|
|
3477
3566
|
},
|
|
3478
|
-
/* @__PURE__ */
|
|
3567
|
+
/* @__PURE__ */ import_react14.default.createElement(
|
|
3479
3568
|
"input",
|
|
3480
3569
|
{
|
|
3481
3570
|
disabled: opt.disabled,
|
|
@@ -3485,7 +3574,7 @@ var Radio = ({
|
|
|
3485
3574
|
name: "bordered-radio"
|
|
3486
3575
|
}
|
|
3487
3576
|
),
|
|
3488
|
-
/* @__PURE__ */
|
|
3577
|
+
/* @__PURE__ */ import_react14.default.createElement(
|
|
3489
3578
|
"label",
|
|
3490
3579
|
{
|
|
3491
3580
|
htmlFor: opt.value.toString(),
|
|
@@ -3499,7 +3588,7 @@ var Radio = ({
|
|
|
3499
3588
|
)
|
|
3500
3589
|
)));
|
|
3501
3590
|
case "cards":
|
|
3502
|
-
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(
|
|
3503
3592
|
"input",
|
|
3504
3593
|
{
|
|
3505
3594
|
type: "radio",
|
|
@@ -3510,7 +3599,7 @@ var Radio = ({
|
|
|
3510
3599
|
required: true,
|
|
3511
3600
|
disabled: opt.disabled
|
|
3512
3601
|
}
|
|
3513
|
-
), /* @__PURE__ */
|
|
3602
|
+
), /* @__PURE__ */ import_react14.default.createElement(
|
|
3514
3603
|
"label",
|
|
3515
3604
|
{
|
|
3516
3605
|
htmlFor: opt.value.toString(),
|
|
@@ -3519,10 +3608,10 @@ var Radio = ({
|
|
|
3519
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"
|
|
3520
3609
|
)
|
|
3521
3610
|
},
|
|
3522
|
-
/* @__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))
|
|
3523
3612
|
))));
|
|
3524
3613
|
default:
|
|
3525
|
-
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(
|
|
3526
3615
|
"div",
|
|
3527
3616
|
{
|
|
3528
3617
|
className: cn(
|
|
@@ -3531,7 +3620,7 @@ var Radio = ({
|
|
|
3531
3620
|
),
|
|
3532
3621
|
key: i + 1
|
|
3533
3622
|
},
|
|
3534
|
-
/* @__PURE__ */
|
|
3623
|
+
/* @__PURE__ */ import_react14.default.createElement(
|
|
3535
3624
|
"input",
|
|
3536
3625
|
{
|
|
3537
3626
|
disabled: opt.disabled,
|
|
@@ -3549,7 +3638,7 @@ var Radio = ({
|
|
|
3549
3638
|
}
|
|
3550
3639
|
}
|
|
3551
3640
|
),
|
|
3552
|
-
/* @__PURE__ */
|
|
3641
|
+
/* @__PURE__ */ import_react14.default.createElement(
|
|
3553
3642
|
"label",
|
|
3554
3643
|
{
|
|
3555
3644
|
htmlFor: opt.value.toString(),
|
|
@@ -3560,7 +3649,7 @@ var Radio = ({
|
|
|
3560
3649
|
},
|
|
3561
3650
|
opt.label
|
|
3562
3651
|
)
|
|
3563
|
-
))), /* @__PURE__ */
|
|
3652
|
+
))), /* @__PURE__ */ import_react14.default.createElement(
|
|
3564
3653
|
"p",
|
|
3565
3654
|
{
|
|
3566
3655
|
className: cn(
|
|
@@ -3574,15 +3663,15 @@ var Radio = ({
|
|
|
3574
3663
|
};
|
|
3575
3664
|
|
|
3576
3665
|
// components/elements/Switch.tsx
|
|
3577
|
-
var
|
|
3666
|
+
var React21 = __toESM(require("react"));
|
|
3578
3667
|
var SwitchPrimitives = __toESM(require("@radix-ui/react-switch"));
|
|
3579
|
-
var Switch =
|
|
3668
|
+
var Switch = React21.forwardRef(
|
|
3580
3669
|
({ className, size = "default", roundedness = "inherit", label, ...props }, ref) => {
|
|
3581
|
-
const [parentDirection, setParentDirection] =
|
|
3670
|
+
const [parentDirection, setParentDirection] = React21.useState(
|
|
3582
3671
|
null
|
|
3583
3672
|
);
|
|
3584
|
-
const parentRef =
|
|
3585
|
-
|
|
3673
|
+
const parentRef = React21.useRef(null);
|
|
3674
|
+
React21.useEffect(() => {
|
|
3586
3675
|
var _a;
|
|
3587
3676
|
const parentNode = (_a = parentRef.current) == null ? void 0 : _a.parentNode;
|
|
3588
3677
|
if (parentNode) {
|
|
@@ -3610,13 +3699,13 @@ var Switch = React20.forwardRef(
|
|
|
3610
3699
|
full: "hawa-rounded-full",
|
|
3611
3700
|
inherit: "hawa-rounded-inner"
|
|
3612
3701
|
};
|
|
3613
|
-
return /* @__PURE__ */
|
|
3702
|
+
return /* @__PURE__ */ React21.createElement(
|
|
3614
3703
|
"div",
|
|
3615
3704
|
{
|
|
3616
3705
|
className: "hawa-flex hawa-flex-row hawa-items-center",
|
|
3617
3706
|
ref: parentRef
|
|
3618
3707
|
},
|
|
3619
|
-
/* @__PURE__ */
|
|
3708
|
+
/* @__PURE__ */ React21.createElement(
|
|
3620
3709
|
SwitchPrimitives.Root,
|
|
3621
3710
|
{
|
|
3622
3711
|
className: cn(
|
|
@@ -3630,7 +3719,7 @@ var Switch = React20.forwardRef(
|
|
|
3630
3719
|
...props,
|
|
3631
3720
|
ref
|
|
3632
3721
|
},
|
|
3633
|
-
/* @__PURE__ */
|
|
3722
|
+
/* @__PURE__ */ React21.createElement(
|
|
3634
3723
|
SwitchPrimitives.Thumb,
|
|
3635
3724
|
{
|
|
3636
3725
|
className: cn(
|
|
@@ -3644,17 +3733,17 @@ var Switch = React20.forwardRef(
|
|
|
3644
3733
|
}
|
|
3645
3734
|
)
|
|
3646
3735
|
),
|
|
3647
|
-
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)
|
|
3648
3737
|
);
|
|
3649
3738
|
}
|
|
3650
3739
|
);
|
|
3651
3740
|
Switch.displayName = SwitchPrimitives.Root.displayName;
|
|
3652
3741
|
|
|
3653
3742
|
// components/elements/Textarea.tsx
|
|
3654
|
-
var
|
|
3655
|
-
var Textarea =
|
|
3743
|
+
var React22 = __toESM(require("react"));
|
|
3744
|
+
var Textarea = React22.forwardRef(
|
|
3656
3745
|
({ className, ...props }, ref) => {
|
|
3657
|
-
return /* @__PURE__ */
|
|
3746
|
+
return /* @__PURE__ */ React22.createElement("div", { className: "hawa-flex hawa-flex-col hawa-gap-2" }, /* @__PURE__ */ React22.createElement(
|
|
3658
3747
|
"textarea",
|
|
3659
3748
|
{
|
|
3660
3749
|
className: cn(
|
|
@@ -3664,7 +3753,7 @@ var Textarea = React21.forwardRef(
|
|
|
3664
3753
|
ref,
|
|
3665
3754
|
...props
|
|
3666
3755
|
}
|
|
3667
|
-
), /* @__PURE__ */
|
|
3756
|
+
), /* @__PURE__ */ React22.createElement(
|
|
3668
3757
|
"p",
|
|
3669
3758
|
{
|
|
3670
3759
|
className: cn(
|
|
@@ -3679,9 +3768,9 @@ var Textarea = React21.forwardRef(
|
|
|
3679
3768
|
Textarea.displayName = "Textarea";
|
|
3680
3769
|
|
|
3681
3770
|
// components/elements/Slider.tsx
|
|
3682
|
-
var
|
|
3771
|
+
var React23 = __toESM(require("react"));
|
|
3683
3772
|
var SliderPrimitive = __toESM(require("@radix-ui/react-slider"));
|
|
3684
|
-
var Slider =
|
|
3773
|
+
var Slider = React23.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React23.createElement(
|
|
3685
3774
|
SliderPrimitive.Root,
|
|
3686
3775
|
{
|
|
3687
3776
|
ref,
|
|
@@ -3691,13 +3780,13 @@ var Slider = React22.forwardRef(({ className, ...props }, ref) => /* @__PURE__ *
|
|
|
3691
3780
|
),
|
|
3692
3781
|
...props
|
|
3693
3782
|
},
|
|
3694
|
-
/* @__PURE__ */
|
|
3695
|
-
/* @__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" })
|
|
3696
3785
|
));
|
|
3697
3786
|
Slider.displayName = SliderPrimitive.Root.displayName;
|
|
3698
3787
|
|
|
3699
3788
|
// components/elements/ColorPicker.tsx
|
|
3700
|
-
var
|
|
3789
|
+
var import_react15 = __toESM(require("react"));
|
|
3701
3790
|
var ColorPicker = ({
|
|
3702
3791
|
containerProps,
|
|
3703
3792
|
colorPickerProps,
|
|
@@ -3705,8 +3794,8 @@ var ColorPicker = ({
|
|
|
3705
3794
|
labelProps,
|
|
3706
3795
|
...props
|
|
3707
3796
|
}) => {
|
|
3708
|
-
const [selectedColor, setSelectedColor] = (0,
|
|
3709
|
-
(0,
|
|
3797
|
+
const [selectedColor, setSelectedColor] = (0, import_react15.useState)(props.color);
|
|
3798
|
+
(0, import_react15.useEffect)(() => {
|
|
3710
3799
|
if (selectedColor && selectedColor[0] !== "#") {
|
|
3711
3800
|
setSelectedColor(`#${selectedColor}`);
|
|
3712
3801
|
}
|
|
@@ -3728,13 +3817,13 @@ var ColorPicker = ({
|
|
|
3728
3817
|
inputElement.dispatchEvent(event);
|
|
3729
3818
|
}
|
|
3730
3819
|
};
|
|
3731
|
-
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(
|
|
3732
3821
|
"div",
|
|
3733
3822
|
{
|
|
3734
3823
|
style: { height: 40, backgroundColor: selectedColor },
|
|
3735
3824
|
className: "hawa-rounded-bl-lg hawa-rounded-tl-lg hawa-border"
|
|
3736
3825
|
},
|
|
3737
|
-
/* @__PURE__ */
|
|
3826
|
+
/* @__PURE__ */ import_react15.default.createElement(
|
|
3738
3827
|
"input",
|
|
3739
3828
|
{
|
|
3740
3829
|
type: "color",
|
|
@@ -3752,7 +3841,7 @@ var ColorPicker = ({
|
|
|
3752
3841
|
...colorPickerProps
|
|
3753
3842
|
}
|
|
3754
3843
|
)
|
|
3755
|
-
), /* @__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(
|
|
3756
3845
|
"input",
|
|
3757
3846
|
{
|
|
3758
3847
|
maxLength: 7,
|
|
@@ -3765,7 +3854,7 @@ var ColorPicker = ({
|
|
|
3765
3854
|
),
|
|
3766
3855
|
...textInputProps
|
|
3767
3856
|
}
|
|
3768
|
-
))), /* @__PURE__ */
|
|
3857
|
+
))), /* @__PURE__ */ import_react15.default.createElement(
|
|
3769
3858
|
"p",
|
|
3770
3859
|
{
|
|
3771
3860
|
className: cn(
|
|
@@ -3778,8 +3867,8 @@ var ColorPicker = ({
|
|
|
3778
3867
|
};
|
|
3779
3868
|
|
|
3780
3869
|
// components/elements/Input.tsx
|
|
3781
|
-
var
|
|
3782
|
-
var Input = (0,
|
|
3870
|
+
var import_react16 = __toESM(require("react"));
|
|
3871
|
+
var Input = (0, import_react16.forwardRef)(
|
|
3783
3872
|
({
|
|
3784
3873
|
margin = "none",
|
|
3785
3874
|
width = "full",
|
|
@@ -3805,7 +3894,7 @@ var Input = (0, import_react15.forwardRef)(
|
|
|
3805
3894
|
};
|
|
3806
3895
|
let defaultStyle = "hawa-flex hawa-max-h-fit hawa-h-fit hawa-relative hawa-flex-col hawa-justify-center hawa-gap-0";
|
|
3807
3896
|
let defaultInputStyle = "hawa-block hawa-w-full hawa-rounded hawa-border hawa-transition-all hawa-bg-background hawa-p-3 hawa-text-sm ";
|
|
3808
|
-
return /* @__PURE__ */
|
|
3897
|
+
return /* @__PURE__ */ import_react16.default.createElement(
|
|
3809
3898
|
"div",
|
|
3810
3899
|
{
|
|
3811
3900
|
className: cn(
|
|
@@ -3816,8 +3905,8 @@ var Input = (0, import_react15.forwardRef)(
|
|
|
3816
3905
|
"hawa-w-full hawa-gap-2"
|
|
3817
3906
|
)
|
|
3818
3907
|
},
|
|
3819
|
-
props.label && /* @__PURE__ */
|
|
3820
|
-
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(
|
|
3821
3910
|
"div",
|
|
3822
3911
|
{
|
|
3823
3912
|
className: cn(
|
|
@@ -3825,7 +3914,7 @@ var Input = (0, import_react15.forwardRef)(
|
|
|
3825
3914
|
preview ? "hawa-opacity-100" : "hawa-opacity-0"
|
|
3826
3915
|
)
|
|
3827
3916
|
}
|
|
3828
|
-
), /* @__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(
|
|
3829
3918
|
"div",
|
|
3830
3919
|
{
|
|
3831
3920
|
className: cn(
|
|
@@ -3834,7 +3923,7 @@ var Input = (0, import_react15.forwardRef)(
|
|
|
3834
3923
|
)
|
|
3835
3924
|
},
|
|
3836
3925
|
props.endIcon
|
|
3837
|
-
), /* @__PURE__ */
|
|
3926
|
+
), /* @__PURE__ */ import_react16.default.createElement(
|
|
3838
3927
|
"input",
|
|
3839
3928
|
{
|
|
3840
3929
|
...props,
|
|
@@ -3860,7 +3949,7 @@ var Input = (0, import_react15.forwardRef)(
|
|
|
3860
3949
|
(_b = props.inputProps) == null ? void 0 : _b.className
|
|
3861
3950
|
)
|
|
3862
3951
|
}
|
|
3863
|
-
)), !forceHideHelperText && /* @__PURE__ */
|
|
3952
|
+
)), !forceHideHelperText && /* @__PURE__ */ import_react16.default.createElement(
|
|
3864
3953
|
"p",
|
|
3865
3954
|
{
|
|
3866
3955
|
className: cn(
|
|
@@ -3869,7 +3958,7 @@ var Input = (0, import_react15.forwardRef)(
|
|
|
3869
3958
|
)
|
|
3870
3959
|
},
|
|
3871
3960
|
props.helperText
|
|
3872
|
-
), !props.disabled && forceHideHelperText && /* @__PURE__ */
|
|
3961
|
+
), !props.disabled && forceHideHelperText && /* @__PURE__ */ import_react16.default.createElement(
|
|
3873
3962
|
"div",
|
|
3874
3963
|
{
|
|
3875
3964
|
className: cn(
|
|
@@ -3878,7 +3967,7 @@ var Input = (0, import_react15.forwardRef)(
|
|
|
3878
3967
|
)
|
|
3879
3968
|
},
|
|
3880
3969
|
props.helperText
|
|
3881
|
-
), showCount && /* @__PURE__ */
|
|
3970
|
+
), showCount && /* @__PURE__ */ import_react16.default.createElement(
|
|
3882
3971
|
"div",
|
|
3883
3972
|
{
|
|
3884
3973
|
className: cn(
|
|
@@ -3899,20 +3988,20 @@ var Input = (0, import_react15.forwardRef)(
|
|
|
3899
3988
|
);
|
|
3900
3989
|
|
|
3901
3990
|
// components/elements/Combobox.tsx
|
|
3902
|
-
var
|
|
3991
|
+
var React29 = __toESM(require("react"));
|
|
3903
3992
|
var PopoverPrimitive2 = __toESM(require("@radix-ui/react-popover"));
|
|
3904
3993
|
|
|
3905
3994
|
// components/elements/Command.tsx
|
|
3906
|
-
var
|
|
3995
|
+
var React27 = __toESM(require("react"));
|
|
3907
3996
|
var import_cmdk = require("cmdk");
|
|
3908
3997
|
|
|
3909
3998
|
// components/elements/Dialog.tsx
|
|
3910
|
-
var
|
|
3999
|
+
var React26 = __toESM(require("react"));
|
|
3911
4000
|
var DialogPrimitive = __toESM(require("@radix-ui/react-dialog"));
|
|
3912
4001
|
var Dialog = DialogPrimitive.Root;
|
|
3913
4002
|
var DialogTrigger = DialogPrimitive.Trigger;
|
|
3914
|
-
var DialogPortal = ({ ...props }) => /* @__PURE__ */
|
|
3915
|
-
var DialogOverlay =
|
|
4003
|
+
var DialogPortal = ({ ...props }) => /* @__PURE__ */ React26.createElement(DialogPrimitive.Portal, { ...props });
|
|
4004
|
+
var DialogOverlay = React26.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React26.createElement(
|
|
3916
4005
|
DialogPrimitive.Overlay,
|
|
3917
4006
|
{
|
|
3918
4007
|
ref,
|
|
@@ -3923,7 +4012,7 @@ var DialogOverlay = React25.forwardRef(({ className, ...props }, ref) => /* @__P
|
|
|
3923
4012
|
...props
|
|
3924
4013
|
}
|
|
3925
4014
|
));
|
|
3926
|
-
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(
|
|
3927
4016
|
DialogPrimitive.Content,
|
|
3928
4017
|
{
|
|
3929
4018
|
onPointerDownOutside: (e) => {
|
|
@@ -3939,7 +4028,7 @@ var DialogContent = React25.forwardRef(({ className, children, persist, ...props
|
|
|
3939
4028
|
...props
|
|
3940
4029
|
},
|
|
3941
4030
|
children,
|
|
3942
|
-
/* @__PURE__ */
|
|
4031
|
+
/* @__PURE__ */ React26.createElement(
|
|
3943
4032
|
DialogPrimitive.Close,
|
|
3944
4033
|
{
|
|
3945
4034
|
className: cn(
|
|
@@ -3947,7 +4036,7 @@ var DialogContent = React25.forwardRef(({ className, children, persist, ...props
|
|
|
3947
4036
|
props.dir === "rtl" ? " hawa-left-4" : " hawa-right-4"
|
|
3948
4037
|
)
|
|
3949
4038
|
},
|
|
3950
|
-
/* @__PURE__ */
|
|
4039
|
+
/* @__PURE__ */ React26.createElement(
|
|
3951
4040
|
"svg",
|
|
3952
4041
|
{
|
|
3953
4042
|
"aria-label": "Close Icon",
|
|
@@ -3956,7 +4045,7 @@ var DialogContent = React25.forwardRef(({ className, children, persist, ...props
|
|
|
3956
4045
|
fill: "currentColor",
|
|
3957
4046
|
viewBox: "0 0 20 20"
|
|
3958
4047
|
},
|
|
3959
|
-
/* @__PURE__ */
|
|
4048
|
+
/* @__PURE__ */ React26.createElement(
|
|
3960
4049
|
"path",
|
|
3961
4050
|
{
|
|
3962
4051
|
fillRule: "evenodd",
|
|
@@ -3965,10 +4054,10 @@ var DialogContent = React25.forwardRef(({ className, children, persist, ...props
|
|
|
3965
4054
|
}
|
|
3966
4055
|
)
|
|
3967
4056
|
),
|
|
3968
|
-
/* @__PURE__ */
|
|
4057
|
+
/* @__PURE__ */ React26.createElement("span", { className: "hawa-sr-only" }, "Close")
|
|
3969
4058
|
)
|
|
3970
4059
|
)));
|
|
3971
|
-
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(
|
|
3972
4061
|
DialogPrimitive.Content,
|
|
3973
4062
|
{
|
|
3974
4063
|
onPointerDownOutside: (e) => {
|
|
@@ -3984,7 +4073,7 @@ var DialogCarouselContent = React25.forwardRef(({ className, children, onPrev, p
|
|
|
3984
4073
|
...props
|
|
3985
4074
|
},
|
|
3986
4075
|
children,
|
|
3987
|
-
/* @__PURE__ */
|
|
4076
|
+
/* @__PURE__ */ React26.createElement(
|
|
3988
4077
|
"div",
|
|
3989
4078
|
{
|
|
3990
4079
|
className: cn(
|
|
@@ -3992,7 +4081,7 @@ var DialogCarouselContent = React25.forwardRef(({ className, children, onPrev, p
|
|
|
3992
4081
|
onPrev ? "hawa-justify-between" : "hawa-justify-end"
|
|
3993
4082
|
)
|
|
3994
4083
|
},
|
|
3995
|
-
onPrev && /* @__PURE__ */
|
|
4084
|
+
onPrev && /* @__PURE__ */ React26.createElement(
|
|
3996
4085
|
"div",
|
|
3997
4086
|
{
|
|
3998
4087
|
onClick: onPrev,
|
|
@@ -4001,7 +4090,7 @@ var DialogCarouselContent = React25.forwardRef(({ className, children, onPrev, p
|
|
|
4001
4090
|
props.dir === "rtl" && "hawa-rotate-180"
|
|
4002
4091
|
)
|
|
4003
4092
|
},
|
|
4004
|
-
/* @__PURE__ */
|
|
4093
|
+
/* @__PURE__ */ React26.createElement(
|
|
4005
4094
|
"svg",
|
|
4006
4095
|
{
|
|
4007
4096
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -4015,10 +4104,10 @@ var DialogCarouselContent = React25.forwardRef(({ className, children, onPrev, p
|
|
|
4015
4104
|
strokeLinecap: "round",
|
|
4016
4105
|
strokeLinejoin: "round"
|
|
4017
4106
|
},
|
|
4018
|
-
/* @__PURE__ */
|
|
4107
|
+
/* @__PURE__ */ React26.createElement("path", { d: "m15 18-6-6 6-6" })
|
|
4019
4108
|
)
|
|
4020
4109
|
),
|
|
4021
|
-
/* @__PURE__ */
|
|
4110
|
+
/* @__PURE__ */ React26.createElement(
|
|
4022
4111
|
DialogPrimitive.Close,
|
|
4023
4112
|
{
|
|
4024
4113
|
className: cn(
|
|
@@ -4026,7 +4115,7 @@ var DialogCarouselContent = React25.forwardRef(({ className, children, onPrev, p
|
|
|
4026
4115
|
props.dir === "rtl" ? " hawa-left-4" : " hawa-right-4"
|
|
4027
4116
|
)
|
|
4028
4117
|
},
|
|
4029
|
-
/* @__PURE__ */
|
|
4118
|
+
/* @__PURE__ */ React26.createElement(
|
|
4030
4119
|
"svg",
|
|
4031
4120
|
{
|
|
4032
4121
|
"aria-label": "Close Icon",
|
|
@@ -4035,7 +4124,7 @@ var DialogCarouselContent = React25.forwardRef(({ className, children, onPrev, p
|
|
|
4035
4124
|
fill: "currentColor",
|
|
4036
4125
|
viewBox: "0 0 20 20"
|
|
4037
4126
|
},
|
|
4038
|
-
/* @__PURE__ */
|
|
4127
|
+
/* @__PURE__ */ React26.createElement(
|
|
4039
4128
|
"path",
|
|
4040
4129
|
{
|
|
4041
4130
|
fillRule: "evenodd",
|
|
@@ -4044,14 +4133,14 @@ var DialogCarouselContent = React25.forwardRef(({ className, children, onPrev, p
|
|
|
4044
4133
|
}
|
|
4045
4134
|
)
|
|
4046
4135
|
),
|
|
4047
|
-
/* @__PURE__ */
|
|
4136
|
+
/* @__PURE__ */ React26.createElement("span", { className: "hawa-sr-only" }, "Close")
|
|
4048
4137
|
)
|
|
4049
4138
|
)
|
|
4050
4139
|
)));
|
|
4051
4140
|
var DialogHeader = ({
|
|
4052
4141
|
className,
|
|
4053
4142
|
...props
|
|
4054
|
-
}) => /* @__PURE__ */
|
|
4143
|
+
}) => /* @__PURE__ */ React26.createElement(
|
|
4055
4144
|
"div",
|
|
4056
4145
|
{
|
|
4057
4146
|
className: cn(
|
|
@@ -4061,7 +4150,7 @@ var DialogHeader = ({
|
|
|
4061
4150
|
...props
|
|
4062
4151
|
}
|
|
4063
4152
|
);
|
|
4064
|
-
var DialogTitle =
|
|
4153
|
+
var DialogTitle = React26.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React26.createElement(
|
|
4065
4154
|
DialogPrimitive.Title,
|
|
4066
4155
|
{
|
|
4067
4156
|
ref,
|
|
@@ -4072,7 +4161,7 @@ var DialogTitle = React25.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
|
4072
4161
|
...props
|
|
4073
4162
|
}
|
|
4074
4163
|
));
|
|
4075
|
-
var DialogDescription =
|
|
4164
|
+
var DialogDescription = React26.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React26.createElement(
|
|
4076
4165
|
DialogPrimitive.Description,
|
|
4077
4166
|
{
|
|
4078
4167
|
ref,
|
|
@@ -4086,7 +4175,7 @@ var DialogDescription = React25.forwardRef(({ className, ...props }, ref) => /*
|
|
|
4086
4175
|
var DialogFooter = ({
|
|
4087
4176
|
className,
|
|
4088
4177
|
...props
|
|
4089
|
-
}) => /* @__PURE__ */
|
|
4178
|
+
}) => /* @__PURE__ */ React26.createElement(
|
|
4090
4179
|
"div",
|
|
4091
4180
|
{
|
|
4092
4181
|
className: cn(
|
|
@@ -4102,12 +4191,12 @@ var DialogCarousel = ({
|
|
|
4102
4191
|
children,
|
|
4103
4192
|
direction
|
|
4104
4193
|
}) => {
|
|
4105
|
-
|
|
4194
|
+
React26.useEffect(() => {
|
|
4106
4195
|
if (stepsApi) {
|
|
4107
4196
|
stepsApi.reInit();
|
|
4108
4197
|
}
|
|
4109
4198
|
}, [stepsApi, children]);
|
|
4110
|
-
return /* @__PURE__ */
|
|
4199
|
+
return /* @__PURE__ */ React26.createElement("div", { className: "hawa-overflow-hidden" }, /* @__PURE__ */ React26.createElement("div", { ref: stepsRef, dir: direction }, /* @__PURE__ */ React26.createElement(
|
|
4111
4200
|
"div",
|
|
4112
4201
|
{
|
|
4113
4202
|
className: "hawa-flex",
|
|
@@ -4115,7 +4204,7 @@ var DialogCarousel = ({
|
|
|
4115
4204
|
transition: "height 0.2s"
|
|
4116
4205
|
}
|
|
4117
4206
|
},
|
|
4118
|
-
|
|
4207
|
+
React26.Children.map(children, (child, index) => /* @__PURE__ */ React26.createElement(
|
|
4119
4208
|
"div",
|
|
4120
4209
|
{
|
|
4121
4210
|
className: cn(
|
|
@@ -4132,14 +4221,14 @@ var DialogSteps = ({
|
|
|
4132
4221
|
visibleStepRef,
|
|
4133
4222
|
children
|
|
4134
4223
|
}) => {
|
|
4135
|
-
const [dialogHeight, setDialogHeight] =
|
|
4136
|
-
|
|
4224
|
+
const [dialogHeight, setDialogHeight] = React26.useState(null);
|
|
4225
|
+
React26.useEffect(() => {
|
|
4137
4226
|
if (visibleStepRef.current) {
|
|
4138
4227
|
setDialogHeight(visibleStepRef.current.offsetHeight);
|
|
4139
4228
|
console.log("height is ", visibleStepRef.current.offsetHeight);
|
|
4140
4229
|
}
|
|
4141
4230
|
}, [currentStep, visibleStepRef]);
|
|
4142
|
-
return /* @__PURE__ */
|
|
4231
|
+
return /* @__PURE__ */ React26.createElement(
|
|
4143
4232
|
"div",
|
|
4144
4233
|
{
|
|
4145
4234
|
className: "hawa-relative hawa-overflow-clip",
|
|
@@ -4148,7 +4237,7 @@ var DialogSteps = ({
|
|
|
4148
4237
|
transition: "height 0.2s"
|
|
4149
4238
|
}
|
|
4150
4239
|
},
|
|
4151
|
-
|
|
4240
|
+
React26.Children.map(children, (child, index) => /* @__PURE__ */ React26.createElement(
|
|
4152
4241
|
"div",
|
|
4153
4242
|
{
|
|
4154
4243
|
ref: currentStep === `step-${index + 1}` ? visibleStepRef : null,
|
|
@@ -4166,7 +4255,7 @@ var DialogStep = ({
|
|
|
4166
4255
|
className,
|
|
4167
4256
|
stepRef
|
|
4168
4257
|
}) => {
|
|
4169
|
-
return /* @__PURE__ */
|
|
4258
|
+
return /* @__PURE__ */ React26.createElement(
|
|
4170
4259
|
"div",
|
|
4171
4260
|
{
|
|
4172
4261
|
id,
|
|
@@ -4177,7 +4266,7 @@ var DialogStep = ({
|
|
|
4177
4266
|
);
|
|
4178
4267
|
};
|
|
4179
4268
|
var DialogBody = ({ children, className }) => {
|
|
4180
|
-
return /* @__PURE__ */
|
|
4269
|
+
return /* @__PURE__ */ React26.createElement("div", { className: cn("hawa-py-6", className) }, children);
|
|
4181
4270
|
};
|
|
4182
4271
|
DialogBody.displayName = "DialogBody";
|
|
4183
4272
|
DialogStep.displayName = "DialogStep";
|
|
@@ -4193,7 +4282,7 @@ DialogContent.displayName = DialogPrimitive.Content.displayName;
|
|
|
4193
4282
|
DialogDescription.displayName = DialogPrimitive.Description.displayName;
|
|
4194
4283
|
|
|
4195
4284
|
// components/elements/Command.tsx
|
|
4196
|
-
var Command =
|
|
4285
|
+
var Command = React27.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React27.createElement(
|
|
4197
4286
|
import_cmdk.Command,
|
|
4198
4287
|
{
|
|
4199
4288
|
ref,
|
|
@@ -4206,15 +4295,15 @@ var Command = React26.forwardRef(({ className, ...props }, ref) => /* @__PURE__
|
|
|
4206
4295
|
));
|
|
4207
4296
|
Command.displayName = import_cmdk.Command.displayName;
|
|
4208
4297
|
var CommandDialog = ({ children, ...props }) => {
|
|
4209
|
-
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)));
|
|
4210
4299
|
};
|
|
4211
|
-
var CommandInput =
|
|
4300
|
+
var CommandInput = React27.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React27.createElement(
|
|
4212
4301
|
"div",
|
|
4213
4302
|
{
|
|
4214
4303
|
className: "hawa-flex hawa-items-center hawa-border-b hawa-px-3",
|
|
4215
4304
|
"cmdk-input-wrapper": ""
|
|
4216
4305
|
},
|
|
4217
|
-
/* @__PURE__ */
|
|
4306
|
+
/* @__PURE__ */ React27.createElement(
|
|
4218
4307
|
"svg",
|
|
4219
4308
|
{
|
|
4220
4309
|
"aria-label": "Search Icon",
|
|
@@ -4229,10 +4318,10 @@ var CommandInput = React26.forwardRef(({ className, ...props }, ref) => /* @__PU
|
|
|
4229
4318
|
strokeLinejoin: "round",
|
|
4230
4319
|
className: "hawa-mr-2 hawa-icon hawa-shrink-0 hawa-opacity-50"
|
|
4231
4320
|
},
|
|
4232
|
-
/* @__PURE__ */
|
|
4233
|
-
/* @__PURE__ */
|
|
4321
|
+
/* @__PURE__ */ React27.createElement("circle", { cx: "11", cy: "11", r: "8" }),
|
|
4322
|
+
/* @__PURE__ */ React27.createElement("path", { d: "m21 21-4.3-4.3" })
|
|
4234
4323
|
),
|
|
4235
|
-
/* @__PURE__ */
|
|
4324
|
+
/* @__PURE__ */ React27.createElement(
|
|
4236
4325
|
import_cmdk.Command.Input,
|
|
4237
4326
|
{
|
|
4238
4327
|
ref,
|
|
@@ -4245,7 +4334,7 @@ var CommandInput = React26.forwardRef(({ className, ...props }, ref) => /* @__PU
|
|
|
4245
4334
|
)
|
|
4246
4335
|
));
|
|
4247
4336
|
CommandInput.displayName = import_cmdk.Command.Input.displayName;
|
|
4248
|
-
var CommandList =
|
|
4337
|
+
var CommandList = React27.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React27.createElement(
|
|
4249
4338
|
import_cmdk.Command.List,
|
|
4250
4339
|
{
|
|
4251
4340
|
ref,
|
|
@@ -4257,7 +4346,7 @@ var CommandList = React26.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
|
4257
4346
|
}
|
|
4258
4347
|
));
|
|
4259
4348
|
CommandList.displayName = import_cmdk.Command.List.displayName;
|
|
4260
|
-
var CommandEmpty =
|
|
4349
|
+
var CommandEmpty = React27.forwardRef((props, ref) => /* @__PURE__ */ React27.createElement(
|
|
4261
4350
|
import_cmdk.Command.Empty,
|
|
4262
4351
|
{
|
|
4263
4352
|
ref,
|
|
@@ -4266,7 +4355,7 @@ var CommandEmpty = React26.forwardRef((props, ref) => /* @__PURE__ */ React26.cr
|
|
|
4266
4355
|
}
|
|
4267
4356
|
));
|
|
4268
4357
|
CommandEmpty.displayName = import_cmdk.Command.Empty.displayName;
|
|
4269
|
-
var CommandGroup =
|
|
4358
|
+
var CommandGroup = React27.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React27.createElement(
|
|
4270
4359
|
import_cmdk.Command.Group,
|
|
4271
4360
|
{
|
|
4272
4361
|
ref,
|
|
@@ -4278,7 +4367,7 @@ var CommandGroup = React26.forwardRef(({ className, ...props }, ref) => /* @__PU
|
|
|
4278
4367
|
}
|
|
4279
4368
|
));
|
|
4280
4369
|
CommandGroup.displayName = import_cmdk.Command.Group.displayName;
|
|
4281
|
-
var CommandSeparator =
|
|
4370
|
+
var CommandSeparator = React27.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React27.createElement(
|
|
4282
4371
|
import_cmdk.Command.Separator,
|
|
4283
4372
|
{
|
|
4284
4373
|
ref,
|
|
@@ -4287,7 +4376,7 @@ var CommandSeparator = React26.forwardRef(({ className, ...props }, ref) => /* @
|
|
|
4287
4376
|
}
|
|
4288
4377
|
));
|
|
4289
4378
|
CommandSeparator.displayName = import_cmdk.Command.Separator.displayName;
|
|
4290
|
-
var CommandItem =
|
|
4379
|
+
var CommandItem = React27.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React27.createElement(
|
|
4291
4380
|
import_cmdk.Command.Item,
|
|
4292
4381
|
{
|
|
4293
4382
|
ref,
|
|
@@ -4303,7 +4392,7 @@ var CommandShortcut = ({
|
|
|
4303
4392
|
className,
|
|
4304
4393
|
...props
|
|
4305
4394
|
}) => {
|
|
4306
|
-
return /* @__PURE__ */
|
|
4395
|
+
return /* @__PURE__ */ React27.createElement(
|
|
4307
4396
|
"span",
|
|
4308
4397
|
{
|
|
4309
4398
|
className: cn(
|
|
@@ -4317,9 +4406,9 @@ var CommandShortcut = ({
|
|
|
4317
4406
|
CommandShortcut.displayName = "CommandShortcut";
|
|
4318
4407
|
|
|
4319
4408
|
// components/elements/Popover.tsx
|
|
4320
|
-
var
|
|
4409
|
+
var React28 = __toESM(require("react"));
|
|
4321
4410
|
var PopoverPrimitive = __toESM(require("@radix-ui/react-popover"));
|
|
4322
|
-
var PopoverContent =
|
|
4411
|
+
var PopoverContent = React28.forwardRef(({ className, align = "center", sideOffset = 4, ...props }, ref) => /* @__PURE__ */ React28.createElement(PopoverPrimitive.Portal, null, /* @__PURE__ */ React28.createElement(
|
|
4323
4412
|
PopoverPrimitive.Content,
|
|
4324
4413
|
{
|
|
4325
4414
|
ref,
|
|
@@ -4351,7 +4440,7 @@ var Popover = ({
|
|
|
4351
4440
|
trigger: "var(--radix-popover-trigger-width)",
|
|
4352
4441
|
default: "auto"
|
|
4353
4442
|
};
|
|
4354
|
-
return /* @__PURE__ */
|
|
4443
|
+
return /* @__PURE__ */ React28.createElement(PopoverPrimitive.Root, { open, ...props }, /* @__PURE__ */ React28.createElement(
|
|
4355
4444
|
PopoverPrimitive.Trigger,
|
|
4356
4445
|
{
|
|
4357
4446
|
className: "hawa-w-full",
|
|
@@ -4359,7 +4448,7 @@ var Popover = ({
|
|
|
4359
4448
|
...triggerProps
|
|
4360
4449
|
},
|
|
4361
4450
|
trigger
|
|
4362
|
-
), /* @__PURE__ */
|
|
4451
|
+
), /* @__PURE__ */ React28.createElement(
|
|
4363
4452
|
PopoverContent,
|
|
4364
4453
|
{
|
|
4365
4454
|
side,
|
|
@@ -4377,7 +4466,7 @@ var Popover = ({
|
|
|
4377
4466
|
var PopoverTrigger = PopoverPrimitive.Trigger;
|
|
4378
4467
|
|
|
4379
4468
|
// components/elements/Combobox.tsx
|
|
4380
|
-
var Combobox =
|
|
4469
|
+
var Combobox = React29.forwardRef(
|
|
4381
4470
|
({
|
|
4382
4471
|
labelKey = "label",
|
|
4383
4472
|
valueKey = "value",
|
|
@@ -4388,8 +4477,8 @@ var Combobox = React28.forwardRef(
|
|
|
4388
4477
|
...props
|
|
4389
4478
|
}, ref) => {
|
|
4390
4479
|
var _a, _b, _c;
|
|
4391
|
-
const [open, setOpen] =
|
|
4392
|
-
const [value, setValue] =
|
|
4480
|
+
const [open, setOpen] = React29.useState(false);
|
|
4481
|
+
const [value, setValue] = React29.useState(defaultValue);
|
|
4393
4482
|
function getProperty(obj, key) {
|
|
4394
4483
|
return obj[key];
|
|
4395
4484
|
}
|
|
@@ -4398,7 +4487,7 @@ var Combobox = React28.forwardRef(
|
|
|
4398
4487
|
setOpen(open2);
|
|
4399
4488
|
}
|
|
4400
4489
|
};
|
|
4401
|
-
return /* @__PURE__ */
|
|
4490
|
+
return /* @__PURE__ */ React29.createElement(
|
|
4402
4491
|
"div",
|
|
4403
4492
|
{
|
|
4404
4493
|
className: cn(
|
|
@@ -4406,8 +4495,8 @@ var Combobox = React28.forwardRef(
|
|
|
4406
4495
|
props.width === "fit" ? "hawa-w-fit" : "hawa-w-full"
|
|
4407
4496
|
)
|
|
4408
4497
|
},
|
|
4409
|
-
props.label && /* @__PURE__ */
|
|
4410
|
-
/* @__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(
|
|
4411
4500
|
"div",
|
|
4412
4501
|
{
|
|
4413
4502
|
className: cn(
|
|
@@ -4415,7 +4504,7 @@ var Combobox = React28.forwardRef(
|
|
|
4415
4504
|
props.preview ? "hawa-opacity-100" : "hawa-opacity-0"
|
|
4416
4505
|
)
|
|
4417
4506
|
}
|
|
4418
|
-
), /* @__PURE__ */
|
|
4507
|
+
), /* @__PURE__ */ React29.createElement(
|
|
4419
4508
|
"button",
|
|
4420
4509
|
{
|
|
4421
4510
|
role: "combobox",
|
|
@@ -4429,7 +4518,7 @@ var Combobox = React28.forwardRef(
|
|
|
4429
4518
|
data.find((item) => item[valueKey] === value) || {},
|
|
4430
4519
|
labelKey
|
|
4431
4520
|
) : ((_a = props.texts) == null ? void 0 : _a.placeholder) || "...",
|
|
4432
|
-
/* @__PURE__ */
|
|
4521
|
+
/* @__PURE__ */ React29.createElement(
|
|
4433
4522
|
"svg",
|
|
4434
4523
|
{
|
|
4435
4524
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -4445,9 +4534,9 @@ var Combobox = React28.forwardRef(
|
|
|
4445
4534
|
strokeLinecap: "round",
|
|
4446
4535
|
strokeLinejoin: "round"
|
|
4447
4536
|
},
|
|
4448
|
-
/* @__PURE__ */
|
|
4537
|
+
/* @__PURE__ */ React29.createElement("path", { d: "m6 9 6 6 6-6" })
|
|
4449
4538
|
)
|
|
4450
|
-
), /* @__PURE__ */
|
|
4539
|
+
), /* @__PURE__ */ React29.createElement(
|
|
4451
4540
|
"p",
|
|
4452
4541
|
{
|
|
4453
4542
|
className: cn(
|
|
@@ -4456,17 +4545,17 @@ var Combobox = React28.forwardRef(
|
|
|
4456
4545
|
)
|
|
4457
4546
|
},
|
|
4458
4547
|
props.helperText
|
|
4459
|
-
))), /* @__PURE__ */
|
|
4548
|
+
))), /* @__PURE__ */ React29.createElement(
|
|
4460
4549
|
PopoverContent,
|
|
4461
4550
|
{
|
|
4462
4551
|
className: cn("popover-w-parent", props.helperText && "-hawa-mt-4")
|
|
4463
4552
|
},
|
|
4464
|
-
/* @__PURE__ */
|
|
4553
|
+
/* @__PURE__ */ React29.createElement(Command, null, !props.hideInput && /* @__PURE__ */ React29.createElement(
|
|
4465
4554
|
CommandInput,
|
|
4466
4555
|
{
|
|
4467
4556
|
placeholder: ((_b = props.texts) == null ? void 0 : _b.searchPlaceholder) || "Search"
|
|
4468
4557
|
}
|
|
4469
|
-
), /* @__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(
|
|
4470
4559
|
CommandItem,
|
|
4471
4560
|
{
|
|
4472
4561
|
key: i,
|
|
@@ -4481,7 +4570,7 @@ var Combobox = React28.forwardRef(
|
|
|
4481
4570
|
setOpen(false);
|
|
4482
4571
|
}
|
|
4483
4572
|
},
|
|
4484
|
-
/* @__PURE__ */
|
|
4573
|
+
/* @__PURE__ */ React29.createElement(
|
|
4485
4574
|
"svg",
|
|
4486
4575
|
{
|
|
4487
4576
|
"aria-label": "Check Icon",
|
|
@@ -4499,7 +4588,7 @@ var Combobox = React28.forwardRef(
|
|
|
4499
4588
|
value === getProperty(item, valueKey) ? "hawa-opacity-100" : "hawa-opacity-0"
|
|
4500
4589
|
)
|
|
4501
4590
|
},
|
|
4502
|
-
/* @__PURE__ */
|
|
4591
|
+
/* @__PURE__ */ React29.createElement("polyline", { points: "20 6 9 17 4 12" })
|
|
4503
4592
|
),
|
|
4504
4593
|
getProperty(item, labelKey)
|
|
4505
4594
|
))))
|
|
@@ -4509,12 +4598,12 @@ var Combobox = React28.forwardRef(
|
|
|
4509
4598
|
);
|
|
4510
4599
|
|
|
4511
4600
|
// components/elements/Avatar.tsx
|
|
4512
|
-
var
|
|
4601
|
+
var import_react18 = __toESM(require("react"));
|
|
4513
4602
|
|
|
4514
4603
|
// components/elements/FileUploader.tsx
|
|
4515
|
-
var
|
|
4604
|
+
var import_react17 = __toESM(require("react"));
|
|
4516
4605
|
var FileUploader = ({ handleFile, className }) => {
|
|
4517
|
-
const hiddenFileInput = (0,
|
|
4606
|
+
const hiddenFileInput = (0, import_react17.useRef)(null);
|
|
4518
4607
|
const handleClick = () => {
|
|
4519
4608
|
var _a;
|
|
4520
4609
|
(_a = hiddenFileInput.current) == null ? void 0 : _a.click();
|
|
@@ -4523,7 +4612,7 @@ var FileUploader = ({ handleFile, className }) => {
|
|
|
4523
4612
|
const fileUploaded = event.target.files[0];
|
|
4524
4613
|
handleFile(fileUploaded);
|
|
4525
4614
|
};
|
|
4526
|
-
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(
|
|
4527
4616
|
"input",
|
|
4528
4617
|
{
|
|
4529
4618
|
type: "file",
|
|
@@ -4562,7 +4651,7 @@ var Avatar = ({
|
|
|
4562
4651
|
inherit: "hawa-rounded",
|
|
4563
4652
|
none: "hawa-rounded-none"
|
|
4564
4653
|
};
|
|
4565
|
-
return /* @__PURE__ */
|
|
4654
|
+
return /* @__PURE__ */ import_react18.default.createElement(
|
|
4566
4655
|
"div",
|
|
4567
4656
|
{
|
|
4568
4657
|
className: cn(
|
|
@@ -4572,7 +4661,7 @@ var Avatar = ({
|
|
|
4572
4661
|
className
|
|
4573
4662
|
)
|
|
4574
4663
|
},
|
|
4575
|
-
/* @__PURE__ */
|
|
4664
|
+
/* @__PURE__ */ import_react18.default.createElement(
|
|
4576
4665
|
FileUploader,
|
|
4577
4666
|
{
|
|
4578
4667
|
className: cn(
|
|
@@ -4583,7 +4672,7 @@ var Avatar = ({
|
|
|
4583
4672
|
)
|
|
4584
4673
|
}
|
|
4585
4674
|
),
|
|
4586
|
-
/* @__PURE__ */
|
|
4675
|
+
/* @__PURE__ */ import_react18.default.createElement(
|
|
4587
4676
|
"img",
|
|
4588
4677
|
{
|
|
4589
4678
|
className: cn(
|
|
@@ -4596,7 +4685,7 @@ var Avatar = ({
|
|
|
4596
4685
|
alt
|
|
4597
4686
|
}
|
|
4598
4687
|
),
|
|
4599
|
-
!src && !isUploadable && /* @__PURE__ */
|
|
4688
|
+
!src && !isUploadable && /* @__PURE__ */ import_react18.default.createElement(
|
|
4600
4689
|
"div",
|
|
4601
4690
|
{
|
|
4602
4691
|
className: cn(
|
|
@@ -4604,7 +4693,7 @@ var Avatar = ({
|
|
|
4604
4693
|
"hawa-justify-center hawa-items-center hawa-flex hawa-flex-col"
|
|
4605
4694
|
)
|
|
4606
4695
|
},
|
|
4607
|
-
/* @__PURE__ */
|
|
4696
|
+
/* @__PURE__ */ import_react18.default.createElement(
|
|
4608
4697
|
"svg",
|
|
4609
4698
|
{
|
|
4610
4699
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -4616,28 +4705,28 @@ var Avatar = ({
|
|
|
4616
4705
|
strokeLinecap: "round",
|
|
4617
4706
|
strokeLinejoin: "round"
|
|
4618
4707
|
},
|
|
4619
|
-
/* @__PURE__ */
|
|
4620
|
-
/* @__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" })
|
|
4621
4710
|
)
|
|
4622
4711
|
)
|
|
4623
4712
|
);
|
|
4624
4713
|
};
|
|
4625
4714
|
|
|
4626
4715
|
// components/elements/SplitButton.tsx
|
|
4627
|
-
var
|
|
4716
|
+
var React32 = __toESM(require("react"));
|
|
4628
4717
|
var SplitButton = ({
|
|
4629
4718
|
variant,
|
|
4630
4719
|
direction = "ltr",
|
|
4631
4720
|
menuItems = [],
|
|
4632
4721
|
children,
|
|
4633
4722
|
...props
|
|
4634
|
-
}) => /* @__PURE__ */
|
|
4723
|
+
}) => /* @__PURE__ */ React32.createElement(
|
|
4635
4724
|
"div",
|
|
4636
4725
|
{
|
|
4637
4726
|
dir: "ltr",
|
|
4638
4727
|
className: cn("hawa-h-fit hawa-flex hawa-justify-center hawa-row")
|
|
4639
4728
|
},
|
|
4640
|
-
/* @__PURE__ */
|
|
4729
|
+
/* @__PURE__ */ React32.createElement(
|
|
4641
4730
|
Button,
|
|
4642
4731
|
{
|
|
4643
4732
|
variant,
|
|
@@ -4646,14 +4735,14 @@ var SplitButton = ({
|
|
|
4646
4735
|
},
|
|
4647
4736
|
children
|
|
4648
4737
|
),
|
|
4649
|
-
/* @__PURE__ */
|
|
4738
|
+
/* @__PURE__ */ React32.createElement(
|
|
4650
4739
|
DropdownMenu,
|
|
4651
4740
|
{
|
|
4652
4741
|
size: "sm",
|
|
4653
4742
|
width: "sm",
|
|
4654
4743
|
direction,
|
|
4655
4744
|
items: menuItems,
|
|
4656
|
-
trigger: /* @__PURE__ */
|
|
4745
|
+
trigger: /* @__PURE__ */ React32.createElement(
|
|
4657
4746
|
Button,
|
|
4658
4747
|
{
|
|
4659
4748
|
asChild: true,
|
|
@@ -4664,7 +4753,7 @@ var SplitButton = ({
|
|
|
4664
4753
|
props.className
|
|
4665
4754
|
)
|
|
4666
4755
|
},
|
|
4667
|
-
/* @__PURE__ */
|
|
4756
|
+
/* @__PURE__ */ React32.createElement(
|
|
4668
4757
|
"svg",
|
|
4669
4758
|
{
|
|
4670
4759
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -4677,7 +4766,7 @@ var SplitButton = ({
|
|
|
4677
4766
|
strokeLinecap: "round",
|
|
4678
4767
|
strokeLinejoin: "round"
|
|
4679
4768
|
},
|
|
4680
|
-
/* @__PURE__ */
|
|
4769
|
+
/* @__PURE__ */ React32.createElement("path", { d: "m6 9 6 6 6-6" })
|
|
4681
4770
|
)
|
|
4682
4771
|
)
|
|
4683
4772
|
}
|
|
@@ -4686,18 +4775,18 @@ var SplitButton = ({
|
|
|
4686
4775
|
SplitButton.displayName = "SplitButton";
|
|
4687
4776
|
|
|
4688
4777
|
// components/elements/Breadcrumb.tsx
|
|
4689
|
-
var
|
|
4778
|
+
var import_react19 = __toESM(require("react"));
|
|
4690
4779
|
var Breadcrumb = ({
|
|
4691
4780
|
breadcrumbLinks,
|
|
4692
4781
|
separator = ">"
|
|
4693
4782
|
}) => {
|
|
4694
|
-
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(
|
|
4695
4784
|
"div",
|
|
4696
4785
|
{
|
|
4697
4786
|
key: index,
|
|
4698
4787
|
className: "hawa-flex hawa-flex-row hawa-items-center hawa-justify-center hawa-gap-2"
|
|
4699
4788
|
},
|
|
4700
|
-
/* @__PURE__ */
|
|
4789
|
+
/* @__PURE__ */ import_react19.default.createElement(
|
|
4701
4790
|
"a",
|
|
4702
4791
|
{
|
|
4703
4792
|
href: singleBreadcrumbLink.href,
|
|
@@ -4705,19 +4794,19 @@ var Breadcrumb = ({
|
|
|
4705
4794
|
},
|
|
4706
4795
|
singleBreadcrumbLink.label
|
|
4707
4796
|
),
|
|
4708
|
-
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
|
|
4709
4798
|
)));
|
|
4710
4799
|
};
|
|
4711
4800
|
|
|
4712
4801
|
// components/elements/CodeBlock.tsx
|
|
4713
|
-
var
|
|
4802
|
+
var import_react21 = __toESM(require("react"));
|
|
4714
4803
|
|
|
4715
4804
|
// components/hooks/useClipboard.ts
|
|
4716
|
-
var
|
|
4805
|
+
var import_react20 = require("react");
|
|
4717
4806
|
function useClipboard({ timeout = 2e3 } = {}) {
|
|
4718
|
-
const [error, setError] = (0,
|
|
4719
|
-
const [copied, setCopied] = (0,
|
|
4720
|
-
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);
|
|
4721
4810
|
const handleCopyResult = (value) => {
|
|
4722
4811
|
clearTimeout(copyTimeout);
|
|
4723
4812
|
setCopyTimeout(setTimeout(() => setCopied(false), timeout));
|
|
@@ -4751,7 +4840,7 @@ var CodeBlock = ({
|
|
|
4751
4840
|
...props
|
|
4752
4841
|
}) => {
|
|
4753
4842
|
const clipboard = useClipboard();
|
|
4754
|
-
const [selectedTab, setSelectedTab] = (0,
|
|
4843
|
+
const [selectedTab, setSelectedTab] = (0, import_react21.useState)(0);
|
|
4755
4844
|
const isDarkMode = props.forcedDarkMode || document.body.classList.contains("dark");
|
|
4756
4845
|
const theme = isDarkMode ? import_prism_react_renderer.themes.vsDark : import_prism_react_renderer.themes.vsLight;
|
|
4757
4846
|
let widthStyles = {
|
|
@@ -4760,7 +4849,7 @@ var CodeBlock = ({
|
|
|
4760
4849
|
sm: "hawa-w-full hawa-max-w-sm",
|
|
4761
4850
|
xs: "hawa-w-full hawa-max-w-xs"
|
|
4762
4851
|
};
|
|
4763
|
-
return /* @__PURE__ */
|
|
4852
|
+
return /* @__PURE__ */ import_react21.default.createElement(
|
|
4764
4853
|
"div",
|
|
4765
4854
|
{
|
|
4766
4855
|
className: cn(
|
|
@@ -4769,7 +4858,7 @@ var CodeBlock = ({
|
|
|
4769
4858
|
className
|
|
4770
4859
|
)
|
|
4771
4860
|
},
|
|
4772
|
-
fileName && /* @__PURE__ */
|
|
4861
|
+
fileName && /* @__PURE__ */ import_react21.default.createElement(
|
|
4773
4862
|
"div",
|
|
4774
4863
|
{
|
|
4775
4864
|
className: cn(
|
|
@@ -4777,7 +4866,7 @@ var CodeBlock = ({
|
|
|
4777
4866
|
fileName && tabs ? "hawa-bg-gray-300 dark:hawa-bg-muted/50" : "hawa-bg-gray-200"
|
|
4778
4867
|
)
|
|
4779
4868
|
},
|
|
4780
|
-
/* @__PURE__ */
|
|
4869
|
+
/* @__PURE__ */ import_react21.default.createElement(
|
|
4781
4870
|
"div",
|
|
4782
4871
|
{
|
|
4783
4872
|
className: cn(
|
|
@@ -4787,7 +4876,7 @@ var CodeBlock = ({
|
|
|
4787
4876
|
fileName
|
|
4788
4877
|
)
|
|
4789
4878
|
),
|
|
4790
|
-
tabs && /* @__PURE__ */
|
|
4879
|
+
tabs && /* @__PURE__ */ import_react21.default.createElement(
|
|
4791
4880
|
"div",
|
|
4792
4881
|
{
|
|
4793
4882
|
className: cn(
|
|
@@ -4795,7 +4884,7 @@ var CodeBlock = ({
|
|
|
4795
4884
|
tabs && fileName && "hawa-rounded-t-none"
|
|
4796
4885
|
)
|
|
4797
4886
|
},
|
|
4798
|
-
tabs.map((tab, i) => /* @__PURE__ */
|
|
4887
|
+
tabs.map((tab, i) => /* @__PURE__ */ import_react21.default.createElement(
|
|
4799
4888
|
"div",
|
|
4800
4889
|
{
|
|
4801
4890
|
key: i,
|
|
@@ -4803,7 +4892,7 @@ var CodeBlock = ({
|
|
|
4803
4892
|
selectedTab === i ? " hawa-border-b-2 hawa-border-primary" : "hawa-bg-transparent"
|
|
4804
4893
|
)
|
|
4805
4894
|
},
|
|
4806
|
-
/* @__PURE__ */
|
|
4895
|
+
/* @__PURE__ */ import_react21.default.createElement(
|
|
4807
4896
|
"div",
|
|
4808
4897
|
{
|
|
4809
4898
|
onClick: () => setSelectedTab(i),
|
|
@@ -4815,7 +4904,7 @@ var CodeBlock = ({
|
|
|
4815
4904
|
)
|
|
4816
4905
|
))
|
|
4817
4906
|
),
|
|
4818
|
-
/* @__PURE__ */
|
|
4907
|
+
/* @__PURE__ */ import_react21.default.createElement(
|
|
4819
4908
|
"div",
|
|
4820
4909
|
{
|
|
4821
4910
|
className: cn(
|
|
@@ -4823,23 +4912,23 @@ var CodeBlock = ({
|
|
|
4823
4912
|
tabs || fileName ? "hawa-rounded-b hawa-rounded-t-none" : "hawa-rounded"
|
|
4824
4913
|
)
|
|
4825
4914
|
},
|
|
4826
|
-
/* @__PURE__ */
|
|
4915
|
+
/* @__PURE__ */ import_react21.default.createElement(
|
|
4827
4916
|
import_prism_react_renderer.Highlight,
|
|
4828
4917
|
{
|
|
4829
4918
|
theme,
|
|
4830
4919
|
code: tabs ? tabs[selectedTab].code : code || "",
|
|
4831
4920
|
language
|
|
4832
4921
|
},
|
|
4833
|
-
({ 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 }) })))))
|
|
4834
4923
|
),
|
|
4835
|
-
/* @__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(
|
|
4836
4925
|
Tooltip,
|
|
4837
4926
|
{
|
|
4838
4927
|
open: clipboard.copied,
|
|
4839
4928
|
side: "left",
|
|
4840
|
-
content: /* @__PURE__ */
|
|
4929
|
+
content: /* @__PURE__ */ import_react21.default.createElement("div", null, "Copied!")
|
|
4841
4930
|
},
|
|
4842
|
-
/* @__PURE__ */
|
|
4931
|
+
/* @__PURE__ */ import_react21.default.createElement(
|
|
4843
4932
|
Button,
|
|
4844
4933
|
{
|
|
4845
4934
|
size: "icon",
|
|
@@ -4847,7 +4936,7 @@ var CodeBlock = ({
|
|
|
4847
4936
|
variant: "outline",
|
|
4848
4937
|
className: "hawa-opacity-50 sm:hawa-opacity-100 hawa-text-foreground"
|
|
4849
4938
|
},
|
|
4850
|
-
/* @__PURE__ */
|
|
4939
|
+
/* @__PURE__ */ import_react21.default.createElement(
|
|
4851
4940
|
"svg",
|
|
4852
4941
|
{
|
|
4853
4942
|
"aria-label": "Copy Icon",
|
|
@@ -4860,8 +4949,8 @@ var CodeBlock = ({
|
|
|
4860
4949
|
height: "1em",
|
|
4861
4950
|
width: "1em"
|
|
4862
4951
|
},
|
|
4863
|
-
/* @__PURE__ */
|
|
4864
|
-
/* @__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" })
|
|
4865
4954
|
)
|
|
4866
4955
|
)
|
|
4867
4956
|
))
|
|
@@ -4870,7 +4959,7 @@ var CodeBlock = ({
|
|
|
4870
4959
|
};
|
|
4871
4960
|
|
|
4872
4961
|
// components/elements/Toast.tsx
|
|
4873
|
-
var
|
|
4962
|
+
var React35 = __toESM(require("react"));
|
|
4874
4963
|
var ToastPrimitives = __toESM(require("@radix-ui/react-toast"));
|
|
4875
4964
|
var import_class_variance_authority2 = require("class-variance-authority");
|
|
4876
4965
|
var toastVariants = (0, import_class_variance_authority2.cva)(
|
|
@@ -4895,7 +4984,7 @@ var toastVariants = (0, import_class_variance_authority2.cva)(
|
|
|
4895
4984
|
}
|
|
4896
4985
|
);
|
|
4897
4986
|
var ToastProvider = ToastPrimitives.Provider;
|
|
4898
|
-
var ToastViewport =
|
|
4987
|
+
var ToastViewport = React35.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React35.createElement(
|
|
4899
4988
|
ToastPrimitives.Viewport,
|
|
4900
4989
|
{
|
|
4901
4990
|
ref,
|
|
@@ -4907,8 +4996,8 @@ var ToastViewport = React34.forwardRef(({ className, ...props }, ref) => /* @__P
|
|
|
4907
4996
|
}
|
|
4908
4997
|
));
|
|
4909
4998
|
ToastViewport.displayName = ToastPrimitives.Viewport.displayName;
|
|
4910
|
-
var Toast =
|
|
4911
|
-
return /* @__PURE__ */
|
|
4999
|
+
var Toast = React35.forwardRef(({ className, variant, severity = "none", direction, ...props }, ref) => {
|
|
5000
|
+
return /* @__PURE__ */ React35.createElement(
|
|
4912
5001
|
ToastPrimitives.Root,
|
|
4913
5002
|
{
|
|
4914
5003
|
ref,
|
|
@@ -4923,8 +5012,8 @@ var Toast = React34.forwardRef(({ className, variant, severity = "none", directi
|
|
|
4923
5012
|
);
|
|
4924
5013
|
});
|
|
4925
5014
|
Toast.displayName = ToastPrimitives.Root.displayName;
|
|
4926
|
-
var ToastAction =
|
|
4927
|
-
return /* @__PURE__ */
|
|
5015
|
+
var ToastAction = React35.forwardRef(({ className, ...props }, ref) => {
|
|
5016
|
+
return /* @__PURE__ */ React35.createElement(
|
|
4928
5017
|
ToastPrimitives.Action,
|
|
4929
5018
|
{
|
|
4930
5019
|
ref,
|
|
@@ -4941,7 +5030,7 @@ var ToastAction = React34.forwardRef(({ className, ...props }, ref) => {
|
|
|
4941
5030
|
);
|
|
4942
5031
|
});
|
|
4943
5032
|
ToastAction.displayName = ToastPrimitives.Action.displayName;
|
|
4944
|
-
var ToastClose =
|
|
5033
|
+
var ToastClose = React35.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React35.createElement(
|
|
4945
5034
|
ToastPrimitives.Close,
|
|
4946
5035
|
{
|
|
4947
5036
|
ref,
|
|
@@ -4952,7 +5041,7 @@ var ToastClose = React34.forwardRef(({ className, ...props }, ref) => /* @__PURE
|
|
|
4952
5041
|
"toast-close": "",
|
|
4953
5042
|
...props
|
|
4954
5043
|
},
|
|
4955
|
-
/* @__PURE__ */
|
|
5044
|
+
/* @__PURE__ */ React35.createElement(
|
|
4956
5045
|
"svg",
|
|
4957
5046
|
{
|
|
4958
5047
|
"aria-label": "Close Icon",
|
|
@@ -4961,7 +5050,7 @@ var ToastClose = React34.forwardRef(({ className, ...props }, ref) => /* @__PURE
|
|
|
4961
5050
|
fill: "currentColor",
|
|
4962
5051
|
viewBox: "0 0 20 20"
|
|
4963
5052
|
},
|
|
4964
|
-
/* @__PURE__ */
|
|
5053
|
+
/* @__PURE__ */ React35.createElement(
|
|
4965
5054
|
"path",
|
|
4966
5055
|
{
|
|
4967
5056
|
fillRule: "evenodd",
|
|
@@ -4972,7 +5061,7 @@ var ToastClose = React34.forwardRef(({ className, ...props }, ref) => /* @__PURE
|
|
|
4972
5061
|
)
|
|
4973
5062
|
));
|
|
4974
5063
|
ToastClose.displayName = ToastPrimitives.Close.displayName;
|
|
4975
|
-
var ToastTitle =
|
|
5064
|
+
var ToastTitle = React35.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React35.createElement(
|
|
4976
5065
|
ToastPrimitives.Title,
|
|
4977
5066
|
{
|
|
4978
5067
|
ref,
|
|
@@ -4984,7 +5073,7 @@ var ToastTitle = React34.forwardRef(({ className, ...props }, ref) => /* @__PURE
|
|
|
4984
5073
|
}
|
|
4985
5074
|
));
|
|
4986
5075
|
ToastTitle.displayName = ToastPrimitives.Title.displayName;
|
|
4987
|
-
var ToastDescription =
|
|
5076
|
+
var ToastDescription = React35.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React35.createElement(
|
|
4988
5077
|
ToastPrimitives.Description,
|
|
4989
5078
|
{
|
|
4990
5079
|
ref,
|
|
@@ -4995,10 +5084,10 @@ var ToastDescription = React34.forwardRef(({ className, ...props }, ref) => /* @
|
|
|
4995
5084
|
ToastDescription.displayName = ToastPrimitives.Description.displayName;
|
|
4996
5085
|
|
|
4997
5086
|
// components/elements/Toaster.tsx
|
|
4998
|
-
var
|
|
5087
|
+
var import_react22 = __toESM(require("react"));
|
|
4999
5088
|
|
|
5000
5089
|
// components/hooks/useToast.ts
|
|
5001
|
-
var
|
|
5090
|
+
var React36 = __toESM(require("react"));
|
|
5002
5091
|
var TOAST_LIMIT = 5;
|
|
5003
5092
|
var TOAST_REMOVE_DELAY = 1e5;
|
|
5004
5093
|
var count = 0;
|
|
@@ -5094,8 +5183,8 @@ function toast({ ...props }) {
|
|
|
5094
5183
|
};
|
|
5095
5184
|
}
|
|
5096
5185
|
function useToast() {
|
|
5097
|
-
const [state, setState] =
|
|
5098
|
-
|
|
5186
|
+
const [state, setState] = React36.useState(memoryState);
|
|
5187
|
+
React36.useEffect(() => {
|
|
5099
5188
|
listeners.push(setState);
|
|
5100
5189
|
return () => {
|
|
5101
5190
|
const index = listeners.indexOf(setState);
|
|
@@ -5115,9 +5204,9 @@ function useToast() {
|
|
|
5115
5204
|
function Toaster(props) {
|
|
5116
5205
|
const { toasts } = useToast();
|
|
5117
5206
|
let isRTL = props.direction === "rtl";
|
|
5118
|
-
return /* @__PURE__ */
|
|
5119
|
-
return /* @__PURE__ */
|
|
5120
|
-
}), /* @__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(
|
|
5121
5210
|
ToastViewport,
|
|
5122
5211
|
{
|
|
5123
5212
|
className: cn("hawa-gap-2", isRTL && "hawa-fixed hawa-left-0")
|
|
@@ -5125,87 +5214,6 @@ function Toaster(props) {
|
|
|
5125
5214
|
));
|
|
5126
5215
|
}
|
|
5127
5216
|
|
|
5128
|
-
// components/elements/Chip.tsx
|
|
5129
|
-
var import_react22 = __toESM(require("react"));
|
|
5130
|
-
var Chip = import_react22.default.forwardRef(
|
|
5131
|
-
({
|
|
5132
|
-
label,
|
|
5133
|
-
size = "normal",
|
|
5134
|
-
icon,
|
|
5135
|
-
color,
|
|
5136
|
-
radius = "inherit",
|
|
5137
|
-
dotType,
|
|
5138
|
-
...rest
|
|
5139
|
-
}, ref) => {
|
|
5140
|
-
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 ";
|
|
5141
|
-
let radiusStyles = {
|
|
5142
|
-
inherit: " hawa-rounded",
|
|
5143
|
-
full: "hawa-rounded-full",
|
|
5144
|
-
none: "hawa-rounded-none"
|
|
5145
|
-
};
|
|
5146
|
-
let sizeStyles = {
|
|
5147
|
-
small: "hawa-h-[15px] hawa-leading-4 hawa-px-0 hawa-py-0 hawa-text-[9px] hawa-gap-0.5 ",
|
|
5148
|
-
normal: "hawa-h-fit hawa-text-xs",
|
|
5149
|
-
large: "hawa-text-base"
|
|
5150
|
-
};
|
|
5151
|
-
let dotStyles = {
|
|
5152
|
-
small: "hawa-flex hawa-h-1 hawa-w-1 hawa-rounded-full",
|
|
5153
|
-
normal: "hawa-flex hawa-h-2 hawa-w-2 hawa-rounded-full",
|
|
5154
|
-
large: "hawa-flex hawa-h-3 hawa-w-3 hawa-rounded-full"
|
|
5155
|
-
};
|
|
5156
|
-
let dotTypeStyles = {
|
|
5157
|
-
available: "hawa-bg-green-500",
|
|
5158
|
-
unavailable: "hawa-bg-red-500"
|
|
5159
|
-
};
|
|
5160
|
-
let colorStyles = {
|
|
5161
|
-
green: "hawa-bg-green-100 hawa-text-green-500 dark:hawa-bg-green-400 dark:hawa-text-green-800",
|
|
5162
|
-
blue: "hawa-bg-blue-100 hawa-text-blue-500 dark:hawa-bg-blue-400 dark:hawa-text-blue-100",
|
|
5163
|
-
red: "hawa-bg-red-100 hawa-text-red-500 dark:hawa-bg-red-400 dark:hawa-text-red-100",
|
|
5164
|
-
yellow: "hawa-bg-yellow-100 hawa-text-yellow-600 dark:hawa-bg-yellow-400 dark:hawa-text-yellow-800",
|
|
5165
|
-
orange: "hawa-bg-orange-100 hawa-text-orange-500 dark:hawa-bg-orange-400 dark:hawa-text-orange-100",
|
|
5166
|
-
purple: "hawa-bg-purple-100 hawa-text-purple-500 dark:hawa-bg-purple-400 dark:hawa-text-purple-100",
|
|
5167
|
-
cyan: "hawa-bg-cyan-100 hawa-text-cyan-800 dark:hawa-bg-cyan-400 dark:hawa-text-cyan-800",
|
|
5168
|
-
hyper: "hawa-text-white hawa-bg-gradient-to-tl hawa-from-pink-500 hawa-via-red-500 hawa-to-yellow-500 ",
|
|
5169
|
-
oceanic: "hawa-text-white hawa-bg-gradient-to-bl hawa-from-green-300 hawa-via-blue-500 hawa-to-purple-600"
|
|
5170
|
-
};
|
|
5171
|
-
if (label) {
|
|
5172
|
-
return /* @__PURE__ */ import_react22.default.createElement(
|
|
5173
|
-
"span",
|
|
5174
|
-
{
|
|
5175
|
-
...rest,
|
|
5176
|
-
ref,
|
|
5177
|
-
className: cn(
|
|
5178
|
-
defaultStyles,
|
|
5179
|
-
sizeStyles[size],
|
|
5180
|
-
radiusStyles[radius],
|
|
5181
|
-
color ? colorStyles[color] : "hawa-border hawa-bg-none"
|
|
5182
|
-
)
|
|
5183
|
-
},
|
|
5184
|
-
dotType && /* @__PURE__ */ import_react22.default.createElement(
|
|
5185
|
-
"span",
|
|
5186
|
-
{
|
|
5187
|
-
className: cn(dotStyles[size], dotTypeStyles[dotType])
|
|
5188
|
-
}
|
|
5189
|
-
),
|
|
5190
|
-
icon && icon,
|
|
5191
|
-
label
|
|
5192
|
-
);
|
|
5193
|
-
} else {
|
|
5194
|
-
return /* @__PURE__ */ import_react22.default.createElement(
|
|
5195
|
-
"span",
|
|
5196
|
-
{
|
|
5197
|
-
...rest,
|
|
5198
|
-
ref,
|
|
5199
|
-
className: cn(
|
|
5200
|
-
"hawa-w-2 hawa-h-2 hawa-rounded-full",
|
|
5201
|
-
color ? colorStyles[color] : "hawa-border hawa-bg-none"
|
|
5202
|
-
)
|
|
5203
|
-
}
|
|
5204
|
-
);
|
|
5205
|
-
}
|
|
5206
|
-
}
|
|
5207
|
-
);
|
|
5208
|
-
|
|
5209
5217
|
// components/elements/Alert.tsx
|
|
5210
5218
|
var import_react23 = __toESM(require("react"));
|
|
5211
5219
|
var Alert = ({
|