@sikka/hawa 0.26.21 → 0.26.23
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/README.md +2 -18
- package/dist/alert/index.d.mts +1 -0
- package/dist/alert/index.d.ts +1 -0
- package/dist/blocks/auth/index.mjs +5 -4
- package/dist/blocks/feedback/index.js +114 -118
- package/dist/blocks/feedback/index.mjs +6 -5
- package/dist/blocks/index.js +28 -30
- package/dist/blocks/index.mjs +3 -2
- package/dist/blocks/misc/index.js +28 -30
- package/dist/blocks/misc/index.mjs +20 -17
- package/dist/blocks/pricing/index.mjs +4 -4
- package/dist/carousel/index.d.mts +2 -0
- package/dist/carousel/index.d.ts +2 -0
- package/dist/carousel/index.js +31 -16
- package/dist/carousel/index.mjs +30 -15
- package/dist/checkbox/index.d.mts +1 -1
- package/dist/checkbox/index.d.ts +1 -1
- package/dist/chip/index.d.mts +1 -1
- package/dist/chip/index.d.ts +1 -1
- package/dist/{chunk-OTGCLEKC.mjs → chunk-2R7F2GL7.mjs} +20 -0
- package/dist/{chunk-POIP5U4M.mjs → chunk-4EGKGSGY.mjs} +1 -1
- package/dist/{chunk-APZM24KK.mjs → chunk-5YXZXYLH.mjs} +15 -18
- package/dist/{chunk-WPSUV4AD.mjs → chunk-F3DQJHTG.mjs} +29 -31
- package/dist/{chunk-VQQ6MUX5.mjs → chunk-FQ6WVEHW.mjs} +1 -1
- package/dist/{chunk-U3TZWNDZ.mjs → chunk-GVJYACGA.mjs} +1 -1
- package/dist/{chunk-Z5SL5QTQ.mjs → chunk-MQUAGP7K.mjs} +20 -0
- package/dist/{chunk-OAXF3RCQ.mjs → chunk-NMS5LCSQ.mjs} +1 -1
- package/dist/{chunk-4IOG44R3.mjs → chunk-OY66MBXP.mjs} +1 -1
- package/dist/{chunk-FDKCMEMD.mjs → chunk-R4HAAT6R.mjs} +1 -1
- package/dist/chunk-WUHNPHD5.mjs +0 -0
- package/dist/chunk-ZFXKCRJC.mjs +11 -0
- package/dist/codeBlock/index.d.mts +2 -1
- package/dist/codeBlock/index.d.ts +2 -1
- package/dist/codeBlock/index.js +21 -17
- package/dist/codeBlock/index.mjs +21 -12
- package/dist/collapsible/index.mjs +2 -0
- package/dist/colorPicker/index.d.mts +4 -0
- package/dist/colorPicker/index.d.ts +4 -0
- package/dist/colorPicker/index.js +80 -23
- package/dist/colorPicker/index.mjs +55 -15
- package/dist/commonTypes-2k6FnHw5.d.mts +4 -0
- package/dist/commonTypes-2k6FnHw5.d.ts +4 -0
- package/dist/dataTable/index.d.mts +2 -1
- package/dist/dataTable/index.d.ts +2 -1
- package/dist/dataTable/index.js +1 -1
- package/dist/dataTable/index.mjs +1 -1
- package/dist/elements/index.d.mts +11 -2
- package/dist/elements/index.d.ts +11 -2
- package/dist/elements/index.js +104 -59
- package/dist/elements/index.mjs +69 -33
- package/dist/hooks/index.mjs +1 -0
- package/dist/index.css +377 -202
- package/dist/index.d.mts +11 -2
- package/dist/index.d.ts +11 -2
- package/dist/index.js +104 -59
- package/dist/index.mjs +117 -60
- package/dist/layout/index.mjs +3 -2
- package/dist/switch/index.d.mts +1 -1
- package/dist/switch/index.d.ts +1 -1
- package/dist/tabs/index.d.mts +2 -2
- package/dist/tabs/index.d.ts +2 -2
- package/dist/tabs/index.js +15 -13
- package/dist/tabs/index.mjs +15 -13
- package/dist/textarea/index.d.mts +1 -0
- package/dist/textarea/index.d.ts +1 -0
- package/dist/textarea/index.js +59 -36
- package/dist/textarea/index.mjs +59 -36
- package/package.json +11 -10
- package/dist/commonTypes-cyhMPvmz.d.mts +0 -4
- package/dist/commonTypes-cyhMPvmz.d.ts +0 -4
- /package/dist/{chunk-AREFDTXK.mjs → chunk-D36MPDGE.mjs} +0 -0
package/README.md
CHANGED
@@ -64,28 +64,12 @@ npm install @sikka/hawa
|
|
64
64
|
|
65
65
|
</br>
|
66
66
|
|
67
|
-
# Contributing
|
68
67
|
|
69
|
-
|
68
|
+
## Contributing
|
70
69
|
|
71
|
-
|
72
|
-
// To preview the components
|
73
|
-
npm run storybook
|
74
|
-
// To run the landing pages
|
75
|
-
npm run dev
|
76
|
-
```
|
77
|
-
|
78
|
-
To build the library to /dist
|
70
|
+
Please see our [contributing.md](/CONTRIBUTING.md).
|
79
71
|
|
80
|
-
```
|
81
|
-
npm run build-lib
|
82
|
-
```
|
83
72
|
|
84
|
-
To generate /dist/index.css
|
85
|
-
|
86
|
-
```
|
87
|
-
npm run build-css
|
88
|
-
```
|
89
73
|
|
90
74
|
</br>
|
91
75
|
|
package/dist/alert/index.d.mts
CHANGED
package/dist/alert/index.d.ts
CHANGED
@@ -1,16 +1,17 @@
|
|
1
1
|
import {
|
2
2
|
Input
|
3
|
-
} from "../../chunk-
|
3
|
+
} from "../../chunk-R4HAAT6R.mjs";
|
4
4
|
import {
|
5
5
|
StopPropagationWrapper
|
6
6
|
} from "../../chunk-ZS3FB3PO.mjs";
|
7
7
|
import {
|
8
8
|
Select
|
9
|
-
} from "../../chunk-
|
9
|
+
} from "../../chunk-OY66MBXP.mjs";
|
10
|
+
import "../../chunk-WUHNPHD5.mjs";
|
10
11
|
import {
|
11
12
|
EyeIcon,
|
12
13
|
HiddenEyeIcon
|
13
|
-
} from "../../chunk-
|
14
|
+
} from "../../chunk-GVJYACGA.mjs";
|
14
15
|
import {
|
15
16
|
Button,
|
16
17
|
Card,
|
@@ -22,7 +23,7 @@ import {
|
|
22
23
|
Label,
|
23
24
|
Loading,
|
24
25
|
cn
|
25
|
-
} from "../../chunk-
|
26
|
+
} from "../../chunk-D36MPDGE.mjs";
|
26
27
|
|
27
28
|
// blocks/auth/LoginForm.tsx
|
28
29
|
import React5, { useState as useState3 } from "react";
|
@@ -38,7 +38,7 @@ __export(feedback_exports, {
|
|
38
38
|
module.exports = __toCommonJS(feedback_exports);
|
39
39
|
|
40
40
|
// blocks/feedback/UserReferralSource.tsx
|
41
|
-
var
|
41
|
+
var import_react5 = __toESM(require("react"));
|
42
42
|
var import_react_hook_form = require("react-hook-form");
|
43
43
|
var import_zod = require("@hookform/resolvers/zod");
|
44
44
|
var z = __toESM(require("zod"));
|
@@ -670,8 +670,37 @@ var Radio = ({
|
|
670
670
|
};
|
671
671
|
|
672
672
|
// elements/textarea/Textarea.tsx
|
673
|
-
var
|
674
|
-
|
673
|
+
var React8 = __toESM(require("react"));
|
674
|
+
|
675
|
+
// elements/skeleton/Skeleton.tsx
|
676
|
+
var import_react4 = __toESM(require("react"));
|
677
|
+
function Skeleton({
|
678
|
+
className,
|
679
|
+
content,
|
680
|
+
animation = "pulse",
|
681
|
+
...props
|
682
|
+
}) {
|
683
|
+
const animationStyles = {
|
684
|
+
none: "hawa-rounded hawa-bg-muted",
|
685
|
+
pulse: "hawa-animate-pulse hawa-rounded hawa-bg-muted",
|
686
|
+
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"
|
687
|
+
};
|
688
|
+
return /* @__PURE__ */ import_react4.default.createElement(
|
689
|
+
"div",
|
690
|
+
{
|
691
|
+
className: cn(
|
692
|
+
animationStyles[animation],
|
693
|
+
content && "hawa-flex hawa-flex-col hawa-items-center hawa-justify-center",
|
694
|
+
className
|
695
|
+
),
|
696
|
+
...props
|
697
|
+
},
|
698
|
+
content && content
|
699
|
+
);
|
700
|
+
}
|
701
|
+
|
702
|
+
// elements/textarea/Textarea.tsx
|
703
|
+
var Textarea = React8.forwardRef(
|
675
704
|
({
|
676
705
|
className,
|
677
706
|
classNames,
|
@@ -680,9 +709,10 @@ var Textarea = React7.forwardRef(
|
|
680
709
|
forceHideHelperText,
|
681
710
|
textareaProps,
|
682
711
|
countPosition = "bottom",
|
712
|
+
isLoading,
|
683
713
|
...props
|
684
714
|
}, ref) => {
|
685
|
-
return /* @__PURE__ */
|
715
|
+
return /* @__PURE__ */ React8.createElement(
|
686
716
|
"div",
|
687
717
|
{
|
688
718
|
className: cn(
|
@@ -691,19 +721,27 @@ var Textarea = React7.forwardRef(
|
|
691
721
|
className
|
692
722
|
)
|
693
723
|
},
|
694
|
-
props.label && /* @__PURE__ */
|
695
|
-
|
724
|
+
/* @__PURE__ */ React8.createElement("div", { className: "hawa-flex hawa-flex-row hawa-justify-between" }, props.label && /* @__PURE__ */ React8.createElement(Label, { ...labelProps }, props.label), showCount && countPosition === "top" && /* @__PURE__ */ React8.createElement(
|
725
|
+
"div",
|
726
|
+
{
|
727
|
+
className: "hawa-text-start hawa-text-xs hawa-transition-all hawa-leading-none"
|
728
|
+
},
|
729
|
+
(textareaProps == null ? void 0 : textareaProps.value) ? String(textareaProps == null ? void 0 : textareaProps.value).length : 0,
|
730
|
+
"/",
|
731
|
+
textareaProps == null ? void 0 : textareaProps.maxLength
|
732
|
+
)),
|
733
|
+
isLoading ? /* @__PURE__ */ React8.createElement(Skeleton, { style: { height: 40 } }) : /* @__PURE__ */ React8.createElement(
|
696
734
|
"textarea",
|
697
735
|
{
|
698
736
|
className: cn(
|
699
|
-
"hawa-flex hawa-min-h-[40px] hawa-w-full hawa-rounded-md hawa-border hawa-border-input hawa-bg-background hawa-px-3 hawa-py-2 hawa-text-sm hawa-ring-offset-background placeholder:hawa-text-gray-400 placeholder:hawa-text-muted-foreground focus-visible:hawa-outline-none focus-visible:hawa-ring-2 focus-visible:hawa-ring-ring focus-visible:hawa-ring-offset-0 disabled:hawa-cursor-not-allowed disabled:hawa-opacity-50",
|
737
|
+
"hawa-flex hawa-min-h-[40px] hawa-h-[40px] hawa-w-full hawa-rounded-md hawa-border hawa-border-input hawa-bg-background hawa-px-3 hawa-py-2 hawa-text-sm hawa-ring-offset-background placeholder:hawa-text-gray-400 placeholder:hawa-text-muted-foreground focus-visible:hawa-outline-none focus-visible:hawa-ring-2 focus-visible:hawa-ring-ring focus-visible:hawa-ring-offset-0 disabled:hawa-cursor-not-allowed disabled:hawa-opacity-50",
|
700
738
|
classNames == null ? void 0 : classNames.textarea
|
701
739
|
),
|
702
740
|
ref,
|
703
741
|
...textareaProps
|
704
742
|
}
|
705
743
|
),
|
706
|
-
/* @__PURE__ */
|
744
|
+
/* @__PURE__ */ React8.createElement("div", { className: "hawa-flex hawa-flex-row hawa-justify-between" }, !forceHideHelperText && /* @__PURE__ */ React8.createElement(
|
707
745
|
"p",
|
708
746
|
{
|
709
747
|
className: cn(
|
@@ -712,20 +750,7 @@ var Textarea = React7.forwardRef(
|
|
712
750
|
)
|
713
751
|
},
|
714
752
|
props.helperText
|
715
|
-
), showCount && /* @__PURE__ */
|
716
|
-
"div",
|
717
|
-
{
|
718
|
-
className: cn(
|
719
|
-
"hawa-text-start hawa-text-xs hawa-transition-all",
|
720
|
-
{
|
721
|
-
"hawa-absolute hawa-bottom-[80px] hawa-end-0 hawa-translate-y-1/2": countPosition === "top"
|
722
|
-
}
|
723
|
-
)
|
724
|
-
},
|
725
|
-
(textareaProps == null ? void 0 : textareaProps.value) ? String(textareaProps == null ? void 0 : textareaProps.value).length : 0,
|
726
|
-
"/",
|
727
|
-
textareaProps == null ? void 0 : textareaProps.maxLength
|
728
|
-
))
|
753
|
+
), showCount && countPosition === "bottom" && /* @__PURE__ */ React8.createElement("div", { className: "hawa-text-start hawa-text-xs hawa-transition-all" }, (textareaProps == null ? void 0 : textareaProps.value) ? String(textareaProps == null ? void 0 : textareaProps.value).length : 0, "/", textareaProps == null ? void 0 : textareaProps.maxLength))
|
729
754
|
);
|
730
755
|
}
|
731
756
|
);
|
@@ -738,8 +763,8 @@ var UserReferralSource = ({
|
|
738
763
|
...props
|
739
764
|
}) => {
|
740
765
|
var _a, _b;
|
741
|
-
const [closed, setClosed] = (0,
|
742
|
-
const popUpRef = (0,
|
766
|
+
const [closed, setClosed] = (0, import_react5.useState)(false);
|
767
|
+
const popUpRef = (0, import_react5.useRef)(null);
|
743
768
|
const formSchema = z.object({
|
744
769
|
source: z.string({ required_error: (_a = props.texts) == null ? void 0 : _a.pleaseSelectOption }),
|
745
770
|
feedback: z.string().optional()
|
@@ -759,7 +784,7 @@ var UserReferralSource = ({
|
|
759
784
|
label: "Other"
|
760
785
|
}
|
761
786
|
];
|
762
|
-
return /* @__PURE__ */
|
787
|
+
return /* @__PURE__ */ import_react5.default.createElement(
|
763
788
|
"div",
|
764
789
|
{
|
765
790
|
className: cn(
|
@@ -768,7 +793,7 @@ var UserReferralSource = ({
|
|
768
793
|
),
|
769
794
|
ref: popUpRef
|
770
795
|
},
|
771
|
-
/* @__PURE__ */
|
796
|
+
/* @__PURE__ */ import_react5.default.createElement(
|
772
797
|
Card,
|
773
798
|
{
|
774
799
|
className: cn(
|
@@ -777,7 +802,7 @@ var UserReferralSource = ({
|
|
777
802
|
),
|
778
803
|
dir: props.direction
|
779
804
|
},
|
780
|
-
/* @__PURE__ */
|
805
|
+
/* @__PURE__ */ import_react5.default.createElement(
|
781
806
|
"button",
|
782
807
|
{
|
783
808
|
type: "button",
|
@@ -796,7 +821,7 @@ var UserReferralSource = ({
|
|
796
821
|
}, 200);
|
797
822
|
}
|
798
823
|
},
|
799
|
-
/* @__PURE__ */
|
824
|
+
/* @__PURE__ */ import_react5.default.createElement(
|
800
825
|
"svg",
|
801
826
|
{
|
802
827
|
"aria-hidden": "true",
|
@@ -804,7 +829,7 @@ var UserReferralSource = ({
|
|
804
829
|
fill: "currentColor",
|
805
830
|
viewBox: "0 0 20 20"
|
806
831
|
},
|
807
|
-
/* @__PURE__ */
|
832
|
+
/* @__PURE__ */ import_react5.default.createElement(
|
808
833
|
"path",
|
809
834
|
{
|
810
835
|
fillRule: "evenodd",
|
@@ -814,7 +839,7 @@ var UserReferralSource = ({
|
|
814
839
|
)
|
815
840
|
)
|
816
841
|
),
|
817
|
-
/* @__PURE__ */
|
842
|
+
/* @__PURE__ */ import_react5.default.createElement(CardContent, { headless: true }, /* @__PURE__ */ import_react5.default.createElement(
|
818
843
|
"form",
|
819
844
|
{
|
820
845
|
noValidate: true,
|
@@ -826,7 +851,7 @@ var UserReferralSource = ({
|
|
826
851
|
}
|
827
852
|
})
|
828
853
|
},
|
829
|
-
/* @__PURE__ */
|
854
|
+
/* @__PURE__ */ import_react5.default.createElement(
|
830
855
|
"div",
|
831
856
|
{
|
832
857
|
className: cn(
|
@@ -834,15 +859,15 @@ var UserReferralSource = ({
|
|
834
859
|
closed ? "hawa-opacity-0" : "hawa-opacity-100"
|
835
860
|
)
|
836
861
|
},
|
837
|
-
/* @__PURE__ */
|
838
|
-
/* @__PURE__ */
|
862
|
+
/* @__PURE__ */ import_react5.default.createElement("div", { className: "hawa-mt-4 hawa-font-bold" }, props.question),
|
863
|
+
/* @__PURE__ */ import_react5.default.createElement("div", { className: "hawa-flex hawa-w-full hawa-flex-row hawa-gap-1 hawa-rounded " }, /* @__PURE__ */ import_react5.default.createElement(
|
839
864
|
import_react_hook_form.Controller,
|
840
865
|
{
|
841
866
|
control,
|
842
867
|
name: "source",
|
843
868
|
render: ({ field }) => {
|
844
869
|
var _a2, _b2;
|
845
|
-
return /* @__PURE__ */
|
870
|
+
return /* @__PURE__ */ import_react5.default.createElement(
|
846
871
|
Radio,
|
847
872
|
{
|
848
873
|
direction: props.direction,
|
@@ -856,14 +881,14 @@ var UserReferralSource = ({
|
|
856
881
|
}
|
857
882
|
}
|
858
883
|
)),
|
859
|
-
/* @__PURE__ */
|
884
|
+
/* @__PURE__ */ import_react5.default.createElement("div", null, /* @__PURE__ */ import_react5.default.createElement(
|
860
885
|
import_react_hook_form.Controller,
|
861
886
|
{
|
862
887
|
control,
|
863
888
|
name: "feedback",
|
864
889
|
render: ({ field }) => {
|
865
890
|
var _a2, _b2;
|
866
|
-
return /* @__PURE__ */
|
891
|
+
return /* @__PURE__ */ import_react5.default.createElement(
|
867
892
|
Textarea,
|
868
893
|
{
|
869
894
|
...field,
|
@@ -878,28 +903,28 @@ var UserReferralSource = ({
|
|
878
903
|
}
|
879
904
|
))
|
880
905
|
),
|
881
|
-
/* @__PURE__ */
|
906
|
+
/* @__PURE__ */ import_react5.default.createElement(Button, { type: "submit", className: "hawa-mt-4 hawa-w-full" }, ((_b = props.texts) == null ? void 0 : _b.submit) || "Submit")
|
882
907
|
))
|
883
908
|
)
|
884
909
|
);
|
885
910
|
};
|
886
911
|
|
887
912
|
// blocks/feedback/FeedbackRating.tsx
|
888
|
-
var
|
913
|
+
var import_react6 = __toESM(require("react"));
|
889
914
|
var FeedbackRating = ({
|
890
915
|
position = "bottom-right",
|
891
916
|
...props
|
892
917
|
}) => {
|
893
|
-
const [closed, setClosed] = (0,
|
894
|
-
const [answered, setAnswered] = (0,
|
895
|
-
const [clickedOption, setClickedOption] = (0,
|
896
|
-
const [closingTimer, setClosingTimer] = (0,
|
897
|
-
const popUpRef = (0,
|
918
|
+
const [closed, setClosed] = (0, import_react6.useState)(false);
|
919
|
+
const [answered, setAnswered] = (0, import_react6.useState)(false);
|
920
|
+
const [clickedOption, setClickedOption] = (0, import_react6.useState)(null);
|
921
|
+
const [closingTimer, setClosingTimer] = (0, import_react6.useState)(5);
|
922
|
+
const popUpRef = (0, import_react6.useRef)(null);
|
898
923
|
const boxPosition = {
|
899
924
|
"bottom-right": "hawa-right-4",
|
900
925
|
"bottom-left": "hawa-left-4"
|
901
926
|
};
|
902
|
-
(0,
|
927
|
+
(0, import_react6.useEffect)(() => {
|
903
928
|
const timeoutHide = setTimeout(() => {
|
904
929
|
if (closingTimer >= 0) {
|
905
930
|
setClosingTimer(closingTimer - 1);
|
@@ -917,7 +942,7 @@ var FeedbackRating = ({
|
|
917
942
|
}
|
918
943
|
}, 200);
|
919
944
|
};
|
920
|
-
return /* @__PURE__ */
|
945
|
+
return /* @__PURE__ */ import_react6.default.createElement(
|
921
946
|
"div",
|
922
947
|
{
|
923
948
|
ref: popUpRef,
|
@@ -926,7 +951,7 @@ var FeedbackRating = ({
|
|
926
951
|
boxPosition[position]
|
927
952
|
)
|
928
953
|
},
|
929
|
-
/* @__PURE__ */
|
954
|
+
/* @__PURE__ */ import_react6.default.createElement(
|
930
955
|
"div",
|
931
956
|
{
|
932
957
|
className: cn(
|
@@ -935,8 +960,8 @@ var FeedbackRating = ({
|
|
935
960
|
props.banner && "hawa-rounded-none hawa-px-4 md:hawa-rounded-t md:hawa-px-64"
|
936
961
|
)
|
937
962
|
},
|
938
|
-
/* @__PURE__ */
|
939
|
-
/* @__PURE__ */
|
963
|
+
/* @__PURE__ */ import_react6.default.createElement("div", { className: "hawa-absolute hawa-left-2 hawa-top-2 hawa-p-1.5 hawa-text-sm" }, props.title),
|
964
|
+
/* @__PURE__ */ import_react6.default.createElement(
|
940
965
|
"button",
|
941
966
|
{
|
942
967
|
type: "button",
|
@@ -945,7 +970,7 @@ var FeedbackRating = ({
|
|
945
970
|
"aria-label": "Close",
|
946
971
|
onClick: () => slowClose()
|
947
972
|
},
|
948
|
-
/* @__PURE__ */
|
973
|
+
/* @__PURE__ */ import_react6.default.createElement(
|
949
974
|
"svg",
|
950
975
|
{
|
951
976
|
"aria-hidden": "true",
|
@@ -953,7 +978,7 @@ var FeedbackRating = ({
|
|
953
978
|
fill: "currentColor",
|
954
979
|
viewBox: "0 0 20 20"
|
955
980
|
},
|
956
|
-
/* @__PURE__ */
|
981
|
+
/* @__PURE__ */ import_react6.default.createElement(
|
957
982
|
"path",
|
958
983
|
{
|
959
984
|
fillRule: "evenodd",
|
@@ -963,8 +988,8 @@ var FeedbackRating = ({
|
|
963
988
|
)
|
964
989
|
)
|
965
990
|
),
|
966
|
-
/* @__PURE__ */
|
967
|
-
/* @__PURE__ */
|
991
|
+
/* @__PURE__ */ import_react6.default.createElement("div", { className: "hawa-mt-8" }, props.question),
|
992
|
+
/* @__PURE__ */ import_react6.default.createElement("div", { className: "hawa-flex hawa-w-full hawa-flex-row hawa-gap-1 hawa-rounded" }, props.options && props.options.map((op, i) => /* @__PURE__ */ import_react6.default.createElement(
|
968
993
|
"span",
|
969
994
|
{
|
970
995
|
key: i,
|
@@ -992,19 +1017,19 @@ var FeedbackRating = ({
|
|
992
1017
|
},
|
993
1018
|
op
|
994
1019
|
))),
|
995
|
-
props.texts && /* @__PURE__ */
|
996
|
-
answered && /* @__PURE__ */
|
1020
|
+
props.texts && /* @__PURE__ */ import_react6.default.createElement("div", { className: " hawa-flex hawa-flex-row hawa-justify-between hawa-text-xs" }, /* @__PURE__ */ import_react6.default.createElement("span", null, props.texts.least), /* @__PURE__ */ import_react6.default.createElement("span", null, props.texts.most)),
|
1021
|
+
answered && /* @__PURE__ */ import_react6.default.createElement("div", { className: "hawa-absolute hawa-left-0 hawa-top-0 hawa-flex hawa-h-full hawa-w-full hawa-flex-col hawa-items-center hawa-justify-center hawa-gap-2 hawa-rounded hawa-bg-black hawa-bg-opacity-80 hawa-p-4 hawa-text-center hawa-transition-all" }, /* @__PURE__ */ import_react6.default.createElement("span", { className: "hawa-font-bold hawa-text-white" }, "Thank you for your answer. This box will disappear in", " " + closingTimer, " seconds"), /* @__PURE__ */ import_react6.default.createElement("div", { className: "hawa-flex hawa-flex-row hawa-gap-2" }, /* @__PURE__ */ import_react6.default.createElement(Button, { variant: "secondary", onClick: () => slowClose() }, "Close")))
|
997
1022
|
)
|
998
1023
|
);
|
999
1024
|
};
|
1000
1025
|
|
1001
1026
|
// blocks/feedback/FeedbackEmoji.tsx
|
1002
|
-
var
|
1027
|
+
var import_react10 = __toESM(require("react"));
|
1003
1028
|
|
1004
1029
|
// elements/popover/Popover.tsx
|
1005
|
-
var
|
1030
|
+
var React11 = __toESM(require("react"));
|
1006
1031
|
var PopoverPrimitive = __toESM(require("@radix-ui/react-popover"));
|
1007
|
-
var PopoverContent =
|
1032
|
+
var PopoverContent = React11.forwardRef(({ className, align = "center", sideOffset = 4, ...props }, ref) => /* @__PURE__ */ React11.createElement(PopoverPrimitive.Portal, null, /* @__PURE__ */ React11.createElement(
|
1008
1033
|
PopoverPrimitive.Content,
|
1009
1034
|
{
|
1010
1035
|
ref,
|
@@ -1036,7 +1061,7 @@ var Popover = ({
|
|
1036
1061
|
trigger: "var(--radix-popover-trigger-width)",
|
1037
1062
|
default: "auto"
|
1038
1063
|
};
|
1039
|
-
return /* @__PURE__ */
|
1064
|
+
return /* @__PURE__ */ React11.createElement(PopoverPrimitive.Root, { open, ...props }, /* @__PURE__ */ React11.createElement(
|
1040
1065
|
PopoverPrimitive.Trigger,
|
1041
1066
|
{
|
1042
1067
|
className: "hawa-w-full",
|
@@ -1044,7 +1069,7 @@ var Popover = ({
|
|
1044
1069
|
...triggerProps
|
1045
1070
|
},
|
1046
1071
|
trigger
|
1047
|
-
), /* @__PURE__ */
|
1072
|
+
), /* @__PURE__ */ React11.createElement(
|
1048
1073
|
PopoverContent,
|
1049
1074
|
{
|
1050
1075
|
side,
|
@@ -1061,8 +1086,8 @@ var Popover = ({
|
|
1061
1086
|
};
|
1062
1087
|
|
1063
1088
|
// icons/Emojis.tsx
|
1064
|
-
var
|
1065
|
-
var VeryGoodEmoji = () => /* @__PURE__ */
|
1089
|
+
var import_react7 = __toESM(require("react"));
|
1090
|
+
var VeryGoodEmoji = () => /* @__PURE__ */ import_react7.default.createElement(
|
1066
1091
|
"svg",
|
1067
1092
|
{
|
1068
1093
|
fill: "none",
|
@@ -1071,7 +1096,7 @@ var VeryGoodEmoji = () => /* @__PURE__ */ import_react6.default.createElement(
|
|
1071
1096
|
width: "16",
|
1072
1097
|
xmlns: "http://www.w3.org/2000/svg"
|
1073
1098
|
},
|
1074
|
-
/* @__PURE__ */
|
1099
|
+
/* @__PURE__ */ import_react7.default.createElement("g", { clipPath: "url(#clip0_53_166)" }, /* @__PURE__ */ import_react7.default.createElement(
|
1075
1100
|
"path",
|
1076
1101
|
{
|
1077
1102
|
clipRule: "evenodd",
|
@@ -1079,7 +1104,7 @@ var VeryGoodEmoji = () => /* @__PURE__ */ import_react6.default.createElement(
|
|
1079
1104
|
fill: "currentColor",
|
1080
1105
|
fillRule: "evenodd"
|
1081
1106
|
}
|
1082
|
-
), /* @__PURE__ */
|
1107
|
+
), /* @__PURE__ */ import_react7.default.createElement(
|
1083
1108
|
"path",
|
1084
1109
|
{
|
1085
1110
|
clipRule: "evenodd",
|
@@ -1089,7 +1114,7 @@ var VeryGoodEmoji = () => /* @__PURE__ */ import_react6.default.createElement(
|
|
1089
1114
|
}
|
1090
1115
|
))
|
1091
1116
|
);
|
1092
|
-
var GoodEmoji = () => /* @__PURE__ */
|
1117
|
+
var GoodEmoji = () => /* @__PURE__ */ import_react7.default.createElement(
|
1093
1118
|
"svg",
|
1094
1119
|
{
|
1095
1120
|
fill: "none",
|
@@ -1098,7 +1123,7 @@ var GoodEmoji = () => /* @__PURE__ */ import_react6.default.createElement(
|
|
1098
1123
|
width: "16",
|
1099
1124
|
xmlns: "http://www.w3.org/2000/svg"
|
1100
1125
|
},
|
1101
|
-
/* @__PURE__ */
|
1126
|
+
/* @__PURE__ */ import_react7.default.createElement("g", { clipPath: "url(#clip0_53_167)" }, /* @__PURE__ */ import_react7.default.createElement(
|
1102
1127
|
"path",
|
1103
1128
|
{
|
1104
1129
|
clipRule: "evenodd",
|
@@ -1108,7 +1133,7 @@ var GoodEmoji = () => /* @__PURE__ */ import_react6.default.createElement(
|
|
1108
1133
|
}
|
1109
1134
|
))
|
1110
1135
|
);
|
1111
|
-
var BadEmoji = () => /* @__PURE__ */
|
1136
|
+
var BadEmoji = () => /* @__PURE__ */ import_react7.default.createElement(
|
1112
1137
|
"svg",
|
1113
1138
|
{
|
1114
1139
|
fill: "none",
|
@@ -1117,7 +1142,7 @@ var BadEmoji = () => /* @__PURE__ */ import_react6.default.createElement(
|
|
1117
1142
|
width: "16",
|
1118
1143
|
xmlns: "http://www.w3.org/2000/svg"
|
1119
1144
|
},
|
1120
|
-
/* @__PURE__ */
|
1145
|
+
/* @__PURE__ */ import_react7.default.createElement("g", { clipPath: "url(#clip0_53_152)" }, /* @__PURE__ */ import_react7.default.createElement(
|
1121
1146
|
"path",
|
1122
1147
|
{
|
1123
1148
|
clipRule: "evenodd",
|
@@ -1127,7 +1152,7 @@ var BadEmoji = () => /* @__PURE__ */ import_react6.default.createElement(
|
|
1127
1152
|
}
|
1128
1153
|
))
|
1129
1154
|
);
|
1130
|
-
var VeryBadEmoji = () => /* @__PURE__ */
|
1155
|
+
var VeryBadEmoji = () => /* @__PURE__ */ import_react7.default.createElement(
|
1131
1156
|
"svg",
|
1132
1157
|
{
|
1133
1158
|
fill: "none",
|
@@ -1136,13 +1161,13 @@ var VeryBadEmoji = () => /* @__PURE__ */ import_react6.default.createElement(
|
|
1136
1161
|
width: "16",
|
1137
1162
|
xmlns: "http://www.w3.org/2000/svg"
|
1138
1163
|
},
|
1139
|
-
/* @__PURE__ */
|
1164
|
+
/* @__PURE__ */ import_react7.default.createElement("g", { clipPath: "url(#clip0_53_151)" }, /* @__PURE__ */ import_react7.default.createElement(
|
1140
1165
|
"path",
|
1141
1166
|
{
|
1142
1167
|
d: "M11.841 12.0225C12.7197 12.9324 12.7197 14.4077 11.841 15.3176C10.9623 16.2275 9.53769 16.2275 8.65901 15.3176C7.78033 14.4077 7.78033 12.9324 8.65901 12.0225L10.25 10.375L11.841 12.0225Z",
|
1143
1168
|
fill: "#0070F3"
|
1144
1169
|
}
|
1145
|
-
), /* @__PURE__ */
|
1170
|
+
), /* @__PURE__ */ import_react7.default.createElement(
|
1146
1171
|
"path",
|
1147
1172
|
{
|
1148
1173
|
clipRule: "evenodd",
|
@@ -1154,22 +1179,22 @@ var VeryBadEmoji = () => /* @__PURE__ */ import_react6.default.createElement(
|
|
1154
1179
|
);
|
1155
1180
|
|
1156
1181
|
// icons/InputIcons.tsx
|
1157
|
-
var
|
1182
|
+
var import_react8 = __toESM(require("react"));
|
1158
1183
|
|
1159
1184
|
// icons/CommonIcons.tsx
|
1160
|
-
var
|
1185
|
+
var import_react9 = __toESM(require("react"));
|
1161
1186
|
|
1162
1187
|
// blocks/feedback/FeedbackEmoji.tsx
|
1163
1188
|
var FeedbackEmoji = (props) => {
|
1164
|
-
const [selectedEmoji, setSelectedEmoji] = (0,
|
1165
|
-
const [loadingSubmit, setLoadingSubmit] = (0,
|
1166
|
-
const [feedbackText, setFeedbackText] = (0,
|
1167
|
-
const [helperText, setHelperText] = (0,
|
1189
|
+
const [selectedEmoji, setSelectedEmoji] = (0, import_react10.useState)(null);
|
1190
|
+
const [loadingSubmit, setLoadingSubmit] = (0, import_react10.useState)(false);
|
1191
|
+
const [feedbackText, setFeedbackText] = (0, import_react10.useState)("");
|
1192
|
+
const [helperText, setHelperText] = (0, import_react10.useState)(false);
|
1168
1193
|
let emojis = [
|
1169
|
-
{ icon: /* @__PURE__ */
|
1170
|
-
{ icon: /* @__PURE__ */
|
1171
|
-
{ icon: /* @__PURE__ */
|
1172
|
-
{ icon: /* @__PURE__ */
|
1194
|
+
{ icon: /* @__PURE__ */ import_react10.default.createElement(VeryGoodEmoji, null), value: "very-good" },
|
1195
|
+
{ icon: /* @__PURE__ */ import_react10.default.createElement(GoodEmoji, null), value: "good" },
|
1196
|
+
{ icon: /* @__PURE__ */ import_react10.default.createElement(BadEmoji, null), value: "bad" },
|
1197
|
+
{ icon: /* @__PURE__ */ import_react10.default.createElement(VeryBadEmoji, null), value: "very-bad" }
|
1173
1198
|
];
|
1174
1199
|
const onFeedbackSubmit = async () => {
|
1175
1200
|
if (feedbackText) {
|
@@ -1189,7 +1214,7 @@ var FeedbackEmoji = (props) => {
|
|
1189
1214
|
setHelperText(true);
|
1190
1215
|
}
|
1191
1216
|
};
|
1192
|
-
return /* @__PURE__ */
|
1217
|
+
return /* @__PURE__ */ import_react10.default.createElement(
|
1193
1218
|
"div",
|
1194
1219
|
{
|
1195
1220
|
className: cn(
|
@@ -1197,7 +1222,7 @@ var FeedbackEmoji = (props) => {
|
|
1197
1222
|
selectedEmoji ? "hawa-h-[189px] hawa-min-w-fit" : "hawa-h-[44px] "
|
1198
1223
|
)
|
1199
1224
|
},
|
1200
|
-
/* @__PURE__ */
|
1225
|
+
/* @__PURE__ */ import_react10.default.createElement("div", { className: "hawa-flex hawa-flex-row hawa-items-center hawa-justify-center hawa-gap-2 " }, /* @__PURE__ */ import_react10.default.createElement("div", { className: "hawa-flex hawa-flex-row hawa-justify-center hawa-gap-0.5 " }, emojis.map((emoji, i) => /* @__PURE__ */ import_react10.default.createElement(
|
1201
1226
|
Button,
|
1202
1227
|
{
|
1203
1228
|
key: i,
|
@@ -1216,7 +1241,7 @@ var FeedbackEmoji = (props) => {
|
|
1216
1241
|
},
|
1217
1242
|
emoji.icon
|
1218
1243
|
)))),
|
1219
|
-
/* @__PURE__ */
|
1244
|
+
/* @__PURE__ */ import_react10.default.createElement(
|
1220
1245
|
"div",
|
1221
1246
|
{
|
1222
1247
|
className: cn(
|
@@ -1224,7 +1249,7 @@ var FeedbackEmoji = (props) => {
|
|
1224
1249
|
selectedEmoji ? "hawa-visible hawa-opacity-100" : "hawa-invisible hawa-opacity-0 "
|
1225
1250
|
)
|
1226
1251
|
},
|
1227
|
-
props.showSuccess ? /* @__PURE__ */
|
1252
|
+
props.showSuccess ? /* @__PURE__ */ import_react10.default.createElement("div", { className: "hawa-flex hawa-h-full hawa-flex-col hawa-items-center hawa-justify-center hawa-gap-2 hawa-pt-4" }, /* @__PURE__ */ import_react10.default.createElement("div", { className: "hawa-rounded hawa-bg-primary hawa-p-2 hawa-text-primary-foreground" }, /* @__PURE__ */ import_react10.default.createElement(
|
1228
1253
|
"svg",
|
1229
1254
|
{
|
1230
1255
|
stroke: "currentColor",
|
@@ -1234,13 +1259,13 @@ var FeedbackEmoji = (props) => {
|
|
1234
1259
|
height: "0.5em",
|
1235
1260
|
width: "0.5em"
|
1236
1261
|
},
|
1237
|
-
/* @__PURE__ */
|
1238
|
-
)), /* @__PURE__ */
|
1262
|
+
/* @__PURE__ */ import_react10.default.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" })
|
1263
|
+
)), /* @__PURE__ */ import_react10.default.createElement("div", { className: "hawa-flex hawa-flex-col hawa-text-center hawa-text-sm" }, /* @__PURE__ */ import_react10.default.createElement("span", null, "Your feedback has been received!"), /* @__PURE__ */ import_react10.default.createElement("span", null, "Thank you for your help"))) : /* @__PURE__ */ import_react10.default.createElement("div", { className: "hawa-flex hawa-flex-col hawa-gap-1 hawa-p-1" }, /* @__PURE__ */ import_react10.default.createElement(
|
1239
1264
|
Popover,
|
1240
1265
|
{
|
1241
1266
|
className: "hawa-select-none hawa-p-1 hawa-text-xs ",
|
1242
1267
|
open: helperText,
|
1243
|
-
trigger: /* @__PURE__ */
|
1268
|
+
trigger: /* @__PURE__ */ import_react10.default.createElement(
|
1244
1269
|
Textarea,
|
1245
1270
|
{
|
1246
1271
|
classNames: {
|
@@ -1256,8 +1281,8 @@ var FeedbackEmoji = (props) => {
|
|
1256
1281
|
}
|
1257
1282
|
)
|
1258
1283
|
},
|
1259
|
-
/* @__PURE__ */
|
1260
|
-
), /* @__PURE__ */
|
1284
|
+
/* @__PURE__ */ import_react10.default.createElement("span", { className: "hawa-m-0" }, "Please enter your feedback")
|
1285
|
+
), /* @__PURE__ */ import_react10.default.createElement(
|
1261
1286
|
Button,
|
1262
1287
|
{
|
1263
1288
|
isLoading: loadingSubmit,
|
@@ -1282,35 +1307,6 @@ var import_react11 = __toESM(require("react"));
|
|
1282
1307
|
var import_react_select = __toESM(require("react-select"));
|
1283
1308
|
var import_creatable = __toESM(require("react-select/creatable"));
|
1284
1309
|
var import_clsx2 = __toESM(require("clsx"));
|
1285
|
-
|
1286
|
-
// elements/skeleton/Skeleton.tsx
|
1287
|
-
var import_react10 = __toESM(require("react"));
|
1288
|
-
function Skeleton({
|
1289
|
-
className,
|
1290
|
-
content,
|
1291
|
-
animation = "pulse",
|
1292
|
-
...props
|
1293
|
-
}) {
|
1294
|
-
const animationStyles = {
|
1295
|
-
none: "hawa-rounded hawa-bg-muted",
|
1296
|
-
pulse: "hawa-animate-pulse hawa-rounded hawa-bg-muted",
|
1297
|
-
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"
|
1298
|
-
};
|
1299
|
-
return /* @__PURE__ */ import_react10.default.createElement(
|
1300
|
-
"div",
|
1301
|
-
{
|
1302
|
-
className: cn(
|
1303
|
-
animationStyles[animation],
|
1304
|
-
content && "hawa-flex hawa-flex-col hawa-items-center hawa-justify-center",
|
1305
|
-
className
|
1306
|
-
),
|
1307
|
-
...props
|
1308
|
-
},
|
1309
|
-
content && content
|
1310
|
-
);
|
1311
|
-
}
|
1312
|
-
|
1313
|
-
// elements/select/Select.tsx
|
1314
1310
|
var Select = ({
|
1315
1311
|
labelProps,
|
1316
1312
|
labelKey = "label",
|