@sikka/hawa 0.35.0-next → 0.35.2-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/alert/index.js +38 -37
- package/dist/alert/index.js.map +1 -1
- package/dist/alert/index.mjs +1 -0
- package/dist/alert/index.mjs.map +1 -1
- package/dist/appLayout/index.js +63 -62
- package/dist/appLayout/index.js.map +1 -1
- package/dist/appLayout/index.mjs +5 -4
- package/dist/appLayout/index.mjs.map +1 -1
- package/dist/backToTop/index.js +34 -33
- package/dist/backToTop/index.js.map +1 -1
- package/dist/backToTop/index.mjs +1 -0
- package/dist/backToTop/index.mjs.map +1 -1
- package/dist/blocks/auth/index.js +255 -254
- package/dist/blocks/auth/index.mjs +4 -4
- package/dist/blocks/feedback/index.js +137 -136
- package/dist/blocks/feedback/index.mjs +5 -5
- package/dist/blocks/index.js +511 -510
- package/dist/blocks/index.mjs +2 -2
- package/dist/blocks/misc/index.js +115 -114
- package/dist/blocks/misc/index.mjs +5 -5
- package/dist/blocks/pricing/index.js +121 -120
- package/dist/blocks/pricing/index.mjs +4 -4
- package/dist/button/index.js +25 -24
- package/dist/button/index.js.map +1 -1
- package/dist/button/index.mjs +1 -0
- package/dist/button/index.mjs.map +1 -1
- package/dist/calendar/index.js +25 -24
- package/dist/calendar/index.js.map +1 -1
- package/dist/calendar/index.mjs +1 -0
- package/dist/calendar/index.mjs.map +1 -1
- package/dist/{chunk-XJMDUR5A.mjs → chunk-7L2JUNG2.mjs} +1 -1
- package/dist/{chunk-GVZWOUGN.mjs → chunk-CD6AQVU3.mjs} +1 -1
- package/dist/{chunk-IDKXEJET.mjs → chunk-FY7BKFH7.mjs} +33 -32
- package/dist/{chunk-A376BKNX.mjs → chunk-JEZLVXSU.mjs} +1 -1
- package/dist/{chunk-YOT2GVXO.mjs → chunk-LVXG3SMD.mjs} +1 -1
- package/dist/{chunk-HHC34DXN.mjs → chunk-MVKP55SZ.mjs} +1 -1
- package/dist/{chunk-L56XQRQI.mjs → chunk-WABHQMUI.mjs} +1 -1
- package/dist/{chunk-XFRJ62W3.mjs → chunk-WVMMGOXW.mjs} +1 -1
- package/dist/{chunk-DFWFQWWT.mjs → chunk-Y6XTMPVO.mjs} +1 -1
- package/dist/{chunk-DABX3SU6.mjs → chunk-YP2CCKZG.mjs} +33 -32
- package/dist/codeBlock/index.js +45 -44
- package/dist/codeBlock/index.js.map +1 -1
- package/dist/codeBlock/index.mjs +1 -0
- package/dist/codeBlock/index.mjs.map +1 -1
- package/dist/dataTable/index.js +38 -37
- package/dist/dataTable/index.js.map +1 -1
- package/dist/dataTable/index.mjs +1 -0
- package/dist/dataTable/index.mjs.map +1 -1
- package/dist/datePicker/index.d.mts +18 -0
- package/dist/datePicker/index.d.ts +18 -0
- package/dist/datePicker/index.js +37 -33
- package/dist/datePicker/index.js.map +1 -1
- package/dist/datePicker/index.mjs +5 -1
- package/dist/datePicker/index.mjs.map +1 -1
- package/dist/docsLayout/index.js +106 -105
- package/dist/docsLayout/index.js.map +1 -1
- package/dist/docsLayout/index.mjs +1 -0
- package/dist/docsLayout/index.mjs.map +1 -1
- package/dist/elements/index.js +432 -431
- package/dist/elements/index.mjs +3 -3
- package/dist/fileDropzone/index.js +71 -70
- package/dist/fileDropzone/index.js.map +1 -1
- package/dist/fileDropzone/index.mjs +1 -0
- package/dist/fileDropzone/index.mjs.map +1 -1
- package/dist/index.js +871 -870
- package/dist/index.mjs +204 -203
- package/dist/layout/index.js +185 -184
- package/dist/layout/index.mjs +2 -2
- package/dist/sortButton/index.js +32 -31
- package/dist/sortButton/index.js.map +1 -1
- package/dist/sortButton/index.mjs +1 -0
- package/dist/sortButton/index.mjs.map +1 -1
- package/dist/splitButton/index.js +60 -59
- package/dist/splitButton/index.js.map +1 -1
- package/dist/splitButton/index.mjs +37 -36
- package/dist/splitButton/index.mjs.map +1 -1
- package/package.json +1 -1
@@ -39,7 +39,7 @@ __export(feedback_exports, {
|
|
39
39
|
module.exports = __toCommonJS(feedback_exports);
|
40
40
|
|
41
41
|
// blocks/feedback/UserReferralSource.tsx
|
42
|
-
var
|
42
|
+
var import_react6 = __toESM(require("react"));
|
43
43
|
var import_react_hook_form = require("react-hook-form");
|
44
44
|
var import_zod = require("@hookform/resolvers/zod");
|
45
45
|
|
@@ -58,7 +58,8 @@ var React5 = __toESM(require("react"));
|
|
58
58
|
var import_class_variance_authority = require("class-variance-authority");
|
59
59
|
|
60
60
|
// elements/helperText/HelperText.tsx
|
61
|
-
var
|
61
|
+
var import_react = __toESM(require("react"));
|
62
|
+
var HelperText = ({ helperText }) => /* @__PURE__ */ import_react.default.createElement(
|
62
63
|
"p",
|
63
64
|
{
|
64
65
|
className: cn(
|
@@ -73,9 +74,9 @@ var HelperText = ({ helperText }) => /* @__PURE__ */ React.createElement(
|
|
73
74
|
var React3 = __toESM(require("react"));
|
74
75
|
|
75
76
|
// elements/tooltip/Tooltip.tsx
|
76
|
-
var
|
77
|
+
var import_react2 = __toESM(require("react"));
|
77
78
|
var TooltipPrimitive = __toESM(require("@radix-ui/react-tooltip"));
|
78
|
-
var TooltipContent =
|
79
|
+
var TooltipContent = import_react2.default.forwardRef(({ className, sideOffset = 4, size = "default", ...props }, ref) => /* @__PURE__ */ import_react2.default.createElement(
|
79
80
|
TooltipPrimitive.Content,
|
80
81
|
{
|
81
82
|
ref,
|
@@ -92,7 +93,7 @@ var TooltipContent = import_react.default.forwardRef(({ className, sideOffset =
|
|
92
93
|
}
|
93
94
|
));
|
94
95
|
TooltipContent.displayName = TooltipPrimitive.Content.displayName;
|
95
|
-
var TooltipArrow =
|
96
|
+
var TooltipArrow = import_react2.default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ import_react2.default.createElement(TooltipPrimitive.Arrow, { ref, className: cn(className), ...props }));
|
96
97
|
TooltipArrow.displayName = TooltipPrimitive.Arrow.displayName;
|
97
98
|
var Tooltip = ({
|
98
99
|
side,
|
@@ -109,13 +110,13 @@ var Tooltip = ({
|
|
109
110
|
delayDuration = 300,
|
110
111
|
...props
|
111
112
|
}) => {
|
112
|
-
return /* @__PURE__ */
|
113
|
+
return /* @__PURE__ */ import_react2.default.createElement(
|
113
114
|
TooltipPrimitive.TooltipProvider,
|
114
115
|
{
|
115
116
|
delayDuration,
|
116
117
|
...providerProps
|
117
118
|
},
|
118
|
-
/* @__PURE__ */
|
119
|
+
/* @__PURE__ */ import_react2.default.createElement(
|
119
120
|
TooltipPrimitive.Root,
|
120
121
|
{
|
121
122
|
open: !disabled && open,
|
@@ -123,8 +124,8 @@ var Tooltip = ({
|
|
123
124
|
onOpenChange,
|
124
125
|
...props
|
125
126
|
},
|
126
|
-
/* @__PURE__ */
|
127
|
-
/* @__PURE__ */
|
127
|
+
/* @__PURE__ */ import_react2.default.createElement(TooltipPrimitive.Trigger, { ...triggerProps }, children),
|
128
|
+
/* @__PURE__ */ import_react2.default.createElement(
|
128
129
|
TooltipContent,
|
129
130
|
{
|
130
131
|
size,
|
@@ -186,7 +187,7 @@ var Label = React3.forwardRef(({ className, hint, hintSide, required, children,
|
|
186
187
|
Label.displayName = "Label";
|
187
188
|
|
188
189
|
// elements/loading/Loading.tsx
|
189
|
-
var
|
190
|
+
var import_react3 = __toESM(require("react"));
|
190
191
|
var Loading = ({
|
191
192
|
design = "spinner",
|
192
193
|
size = "normal",
|
@@ -217,7 +218,7 @@ var Loading = ({
|
|
217
218
|
};
|
218
219
|
switch (design.split("-")[0]) {
|
219
220
|
case "dots":
|
220
|
-
return /* @__PURE__ */
|
221
|
+
return /* @__PURE__ */ import_react3.default.createElement(
|
221
222
|
"div",
|
222
223
|
{
|
223
224
|
className: cn(
|
@@ -225,7 +226,7 @@ var Loading = ({
|
|
225
226
|
classNames == null ? void 0 : classNames.container
|
226
227
|
)
|
227
228
|
},
|
228
|
-
/* @__PURE__ */
|
229
|
+
/* @__PURE__ */ import_react3.default.createElement(
|
229
230
|
"div",
|
230
231
|
{
|
231
232
|
className: cn(
|
@@ -236,7 +237,7 @@ var Loading = ({
|
|
236
237
|
)
|
237
238
|
}
|
238
239
|
),
|
239
|
-
/* @__PURE__ */
|
240
|
+
/* @__PURE__ */ import_react3.default.createElement(
|
240
241
|
"div",
|
241
242
|
{
|
242
243
|
className: cn(
|
@@ -247,7 +248,7 @@ var Loading = ({
|
|
247
248
|
)
|
248
249
|
}
|
249
250
|
),
|
250
|
-
/* @__PURE__ */
|
251
|
+
/* @__PURE__ */ import_react3.default.createElement(
|
251
252
|
"div",
|
252
253
|
{
|
253
254
|
className: cn(
|
@@ -260,7 +261,7 @@ var Loading = ({
|
|
260
261
|
)
|
261
262
|
);
|
262
263
|
case "square":
|
263
|
-
return /* @__PURE__ */
|
264
|
+
return /* @__PURE__ */ import_react3.default.createElement(
|
264
265
|
"svg",
|
265
266
|
{
|
266
267
|
className: cn(
|
@@ -272,7 +273,7 @@ var Loading = ({
|
|
272
273
|
height: "35",
|
273
274
|
width: "35"
|
274
275
|
},
|
275
|
-
/* @__PURE__ */
|
276
|
+
/* @__PURE__ */ import_react3.default.createElement(
|
276
277
|
"rect",
|
277
278
|
{
|
278
279
|
className: "squircle-track",
|
@@ -284,7 +285,7 @@ var Loading = ({
|
|
284
285
|
height: "32.5"
|
285
286
|
}
|
286
287
|
),
|
287
|
-
/* @__PURE__ */
|
288
|
+
/* @__PURE__ */ import_react3.default.createElement(
|
288
289
|
"rect",
|
289
290
|
{
|
290
291
|
className: "square-car",
|
@@ -299,7 +300,7 @@ var Loading = ({
|
|
299
300
|
)
|
300
301
|
);
|
301
302
|
case "squircle":
|
302
|
-
return /* @__PURE__ */
|
303
|
+
return /* @__PURE__ */ import_react3.default.createElement(
|
303
304
|
"svg",
|
304
305
|
{
|
305
306
|
x: "0px",
|
@@ -314,7 +315,7 @@ var Loading = ({
|
|
314
315
|
classNames == null ? void 0 : classNames.container
|
315
316
|
)
|
316
317
|
},
|
317
|
-
/* @__PURE__ */
|
318
|
+
/* @__PURE__ */ import_react3.default.createElement(
|
318
319
|
"path",
|
319
320
|
{
|
320
321
|
className: cn("squircle-track", classNames == null ? void 0 : classNames.track),
|
@@ -324,7 +325,7 @@ var Loading = ({
|
|
324
325
|
d: "M0.37 18.5 C0.37 5.772 5.772 0.37 18.5 0.37 S36.63 5.772 36.63 18.5 S31.228 36.63 18.5 36.63 S0.37 31.228 0.37 18.5"
|
325
326
|
}
|
326
327
|
),
|
327
|
-
/* @__PURE__ */
|
328
|
+
/* @__PURE__ */ import_react3.default.createElement(
|
328
329
|
"path",
|
329
330
|
{
|
330
331
|
className: cn("squircle-car", classNames == null ? void 0 : classNames.car),
|
@@ -336,7 +337,7 @@ var Loading = ({
|
|
336
337
|
)
|
337
338
|
);
|
338
339
|
case "progress":
|
339
|
-
return /* @__PURE__ */
|
340
|
+
return /* @__PURE__ */ import_react3.default.createElement(
|
340
341
|
"div",
|
341
342
|
{
|
342
343
|
className: cn(
|
@@ -347,9 +348,9 @@ var Loading = ({
|
|
347
348
|
}
|
348
349
|
);
|
349
350
|
case "orbit":
|
350
|
-
return /* @__PURE__ */
|
351
|
+
return /* @__PURE__ */ import_react3.default.createElement("div", { className: cn("orbit-container", classNames == null ? void 0 : classNames.container) });
|
351
352
|
default:
|
352
|
-
return /* @__PURE__ */
|
353
|
+
return /* @__PURE__ */ import_react3.default.createElement(
|
353
354
|
"svg",
|
354
355
|
{
|
355
356
|
viewBox: "0 0 40 40",
|
@@ -361,7 +362,7 @@ var Loading = ({
|
|
361
362
|
classNames == null ? void 0 : classNames.container
|
362
363
|
)
|
363
364
|
},
|
364
|
-
/* @__PURE__ */
|
365
|
+
/* @__PURE__ */ import_react3.default.createElement(
|
365
366
|
"circle",
|
366
367
|
{
|
367
368
|
className: cn(
|
@@ -380,7 +381,7 @@ var Loading = ({
|
|
380
381
|
pathLength: "100"
|
381
382
|
}
|
382
383
|
),
|
383
|
-
/* @__PURE__ */
|
384
|
+
/* @__PURE__ */ import_react3.default.createElement(
|
384
385
|
"circle",
|
385
386
|
{
|
386
387
|
className: cn(
|
@@ -566,7 +567,7 @@ CardTitle.displayName = "CardTitle";
|
|
566
567
|
Card.displayName = "Card";
|
567
568
|
|
568
569
|
// elements/radio/Radio.tsx
|
569
|
-
var
|
570
|
+
var import_react4 = __toESM(require("react"));
|
570
571
|
|
571
572
|
// elements/popover/Popover.tsx
|
572
573
|
var React7 = __toESM(require("react"));
|
@@ -634,7 +635,7 @@ var PopoverTrigger = PopoverPrimitive.Trigger;
|
|
634
635
|
var PopoverRoot = PopoverPrimitive.Root;
|
635
636
|
|
636
637
|
// elements/radio/Radio.tsx
|
637
|
-
var Radio = (0,
|
638
|
+
var Radio = (0, import_react4.forwardRef)(
|
638
639
|
({
|
639
640
|
design = "default",
|
640
641
|
width = "default",
|
@@ -666,15 +667,15 @@ var Radio = (0, import_react3.forwardRef)(
|
|
666
667
|
default: "hawa-max-w-fit",
|
667
668
|
full: "hawa-w-full"
|
668
669
|
};
|
669
|
-
const [parentDirection, setParentDirection] =
|
670
|
+
const [parentDirection, setParentDirection] = import_react4.default.useState(
|
670
671
|
null
|
671
672
|
);
|
672
|
-
const [selectedOption, setSelectedOption] = (0,
|
673
|
+
const [selectedOption, setSelectedOption] = (0, import_react4.useState)(
|
673
674
|
props.defaultValue || props.value
|
674
675
|
);
|
675
|
-
const [openTooltip, setOpenTooltip] = (0,
|
676
|
-
const parentRef = (0,
|
677
|
-
(0,
|
676
|
+
const [openTooltip, setOpenTooltip] = (0, import_react4.useState)(null);
|
677
|
+
const parentRef = (0, import_react4.useRef)(null);
|
678
|
+
(0, import_react4.useEffect)(() => {
|
678
679
|
var _a2;
|
679
680
|
const parentNode = (_a2 = parentRef.current) == null ? void 0 : _a2.parentNode;
|
680
681
|
if (parentNode) {
|
@@ -700,7 +701,7 @@ var Radio = (0, import_react3.forwardRef)(
|
|
700
701
|
];
|
701
702
|
switch (design) {
|
702
703
|
case "tabs":
|
703
|
-
return /* @__PURE__ */
|
704
|
+
return /* @__PURE__ */ import_react4.default.createElement("div", { className: "hawa-gap-2 hawa-flex hawa-flex-col" }, props.label && /* @__PURE__ */ import_react4.default.createElement(Label, { ...labelProps }, props.label), /* @__PURE__ */ import_react4.default.createElement(
|
704
705
|
"ul",
|
705
706
|
{
|
706
707
|
ref: parentRef,
|
@@ -713,21 +714,21 @@ var Radio = (0, import_react3.forwardRef)(
|
|
713
714
|
)
|
714
715
|
},
|
715
716
|
(_b = props.options) == null ? void 0 : _b.map((opt, o) => {
|
716
|
-
return opt.tooltip ? /* @__PURE__ */
|
717
|
+
return opt.tooltip ? /* @__PURE__ */ import_react4.default.createElement(
|
717
718
|
PopoverRoot,
|
718
719
|
{
|
719
720
|
key: o,
|
720
721
|
open: o === openTooltip,
|
721
722
|
onOpenChange: (bool) => setOpenTooltip(bool ? o : null)
|
722
723
|
},
|
723
|
-
/* @__PURE__ */
|
724
|
+
/* @__PURE__ */ import_react4.default.createElement(
|
724
725
|
PopoverTrigger,
|
725
726
|
{
|
726
727
|
onMouseEnter: () => setOpenTooltip(o),
|
727
728
|
onMouseLeave: () => setOpenTooltip(null),
|
728
729
|
asChild: true
|
729
730
|
},
|
730
|
-
/* @__PURE__ */
|
731
|
+
/* @__PURE__ */ import_react4.default.createElement(
|
731
732
|
"li",
|
732
733
|
{
|
733
734
|
"aria-current": "page",
|
@@ -745,8 +746,8 @@ var Radio = (0, import_react3.forwardRef)(
|
|
745
746
|
opt.label
|
746
747
|
)
|
747
748
|
),
|
748
|
-
/* @__PURE__ */
|
749
|
-
) : /* @__PURE__ */
|
749
|
+
/* @__PURE__ */ import_react4.default.createElement(PopoverContent, { ...opt.tooltipContentProps }, opt.tooltip)
|
750
|
+
) : /* @__PURE__ */ import_react4.default.createElement(
|
750
751
|
"li",
|
751
752
|
{
|
752
753
|
key: o,
|
@@ -765,7 +766,7 @@ var Radio = (0, import_react3.forwardRef)(
|
|
765
766
|
opt.label
|
766
767
|
);
|
767
768
|
})
|
768
|
-
), !forceHideHelperText && /* @__PURE__ */
|
769
|
+
), !forceHideHelperText && /* @__PURE__ */ import_react4.default.createElement(
|
769
770
|
"p",
|
770
771
|
{
|
771
772
|
className: cn(
|
@@ -776,7 +777,7 @@ var Radio = (0, import_react3.forwardRef)(
|
|
776
777
|
props.helperText
|
777
778
|
));
|
778
779
|
case "bordered":
|
779
|
-
return /* @__PURE__ */
|
780
|
+
return /* @__PURE__ */ import_react4.default.createElement("div", { className: cn(orientationStyle[orientation], "hawa-gap-4") }, props.options && props.options.map((opt, i) => /* @__PURE__ */ import_react4.default.createElement("div", { key: i, className: "hawa-w-full hawa-rounded hawa-border" }, /* @__PURE__ */ import_react4.default.createElement(
|
780
781
|
"div",
|
781
782
|
{
|
782
783
|
className: cn(
|
@@ -785,7 +786,7 @@ var Radio = (0, import_react3.forwardRef)(
|
|
785
786
|
),
|
786
787
|
key: i + 1
|
787
788
|
},
|
788
|
-
/* @__PURE__ */
|
789
|
+
/* @__PURE__ */ import_react4.default.createElement(
|
789
790
|
"input",
|
790
791
|
{
|
791
792
|
disabled: opt.disabled,
|
@@ -796,7 +797,7 @@ var Radio = (0, import_react3.forwardRef)(
|
|
796
797
|
onChange: () => handleChange(opt)
|
797
798
|
}
|
798
799
|
),
|
799
|
-
/* @__PURE__ */
|
800
|
+
/* @__PURE__ */ import_react4.default.createElement(
|
800
801
|
"label",
|
801
802
|
{
|
802
803
|
htmlFor: opt.value.toString(),
|
@@ -809,7 +810,7 @@ var Radio = (0, import_react3.forwardRef)(
|
|
809
810
|
)
|
810
811
|
))));
|
811
812
|
case "cards":
|
812
|
-
return /* @__PURE__ */
|
813
|
+
return /* @__PURE__ */ import_react4.default.createElement("ul", { className: cn(orientationStyle[orientation], "hawa-gap-4") }, (_c = props.options) == null ? void 0 : _c.map((opt, o) => /* @__PURE__ */ import_react4.default.createElement("li", { key: o, onClick: () => handleChange(opt) }, /* @__PURE__ */ import_react4.default.createElement(
|
813
814
|
"input",
|
814
815
|
{
|
815
816
|
type: "radio",
|
@@ -820,7 +821,7 @@ var Radio = (0, import_react3.forwardRef)(
|
|
820
821
|
required: true,
|
821
822
|
disabled: opt.disabled
|
822
823
|
}
|
823
|
-
), /* @__PURE__ */
|
824
|
+
), /* @__PURE__ */ import_react4.default.createElement(
|
824
825
|
"label",
|
825
826
|
{
|
826
827
|
htmlFor: opt.value.toString(),
|
@@ -829,10 +830,10 @@ var Radio = (0, import_react3.forwardRef)(
|
|
829
830
|
opt.disabled ? "hawa-opacity-50" : "hawa-cursor-pointer hover:hawa-bg-foreground/10 hover:hawa-text-gray-600 dark:hover:hawa-bg-foreground/20 dark:hover:hawa-text-gray-300"
|
830
831
|
)
|
831
832
|
},
|
832
|
-
/* @__PURE__ */
|
833
|
+
/* @__PURE__ */ import_react4.default.createElement("div", { className: "hawa-block hawa-h-full hawa-w-full" }, /* @__PURE__ */ import_react4.default.createElement("div", { className: "hawa-w-full hawa-text-lg hawa-font-semibold" }, opt.label), /* @__PURE__ */ import_react4.default.createElement("div", { className: "hawa-w-full" }, opt.sublabel))
|
833
834
|
))));
|
834
835
|
default:
|
835
|
-
return /* @__PURE__ */
|
836
|
+
return /* @__PURE__ */ import_react4.default.createElement("div", { className: "hawa-flex hawa-flex-col hawa-gap-2" }, props.label && /* @__PURE__ */ import_react4.default.createElement(Label, { ...labelProps }, props.label), /* @__PURE__ */ import_react4.default.createElement("div", { className: cn(orientationStyle[orientation], "hawa-gap-2") }, props.options && props.options.map((opt, i) => /* @__PURE__ */ import_react4.default.createElement(
|
836
837
|
"div",
|
837
838
|
{
|
838
839
|
className: cn(
|
@@ -841,7 +842,7 @@ var Radio = (0, import_react3.forwardRef)(
|
|
841
842
|
),
|
842
843
|
key: i + 1
|
843
844
|
},
|
844
|
-
/* @__PURE__ */
|
845
|
+
/* @__PURE__ */ import_react4.default.createElement(
|
845
846
|
"input",
|
846
847
|
{
|
847
848
|
disabled: opt.disabled,
|
@@ -852,7 +853,7 @@ var Radio = (0, import_react3.forwardRef)(
|
|
852
853
|
onChange: () => handleChange(opt)
|
853
854
|
}
|
854
855
|
),
|
855
|
-
/* @__PURE__ */
|
856
|
+
/* @__PURE__ */ import_react4.default.createElement(
|
856
857
|
"label",
|
857
858
|
{
|
858
859
|
htmlFor: opt.value.toString(),
|
@@ -863,7 +864,7 @@ var Radio = (0, import_react3.forwardRef)(
|
|
863
864
|
},
|
864
865
|
opt.label
|
865
866
|
)
|
866
|
-
))), /* @__PURE__ */
|
867
|
+
))), /* @__PURE__ */ import_react4.default.createElement(
|
867
868
|
"p",
|
868
869
|
{
|
869
870
|
className: cn(
|
@@ -881,7 +882,7 @@ var Radio = (0, import_react3.forwardRef)(
|
|
881
882
|
var React10 = __toESM(require("react"));
|
882
883
|
|
883
884
|
// elements/skeleton/Skeleton.tsx
|
884
|
-
var
|
885
|
+
var import_react5 = __toESM(require("react"));
|
885
886
|
function Skeleton({
|
886
887
|
className,
|
887
888
|
content,
|
@@ -900,7 +901,7 @@ function Skeleton({
|
|
900
901
|
right: "hawa-mask-fade-right",
|
901
902
|
left: "hawa-mask-fade-left "
|
902
903
|
};
|
903
|
-
return /* @__PURE__ */
|
904
|
+
return /* @__PURE__ */ import_react5.default.createElement(
|
904
905
|
"div",
|
905
906
|
{
|
906
907
|
className: cn(
|
@@ -979,8 +980,8 @@ var UserReferralSource = ({
|
|
979
980
|
...props
|
980
981
|
}) => {
|
981
982
|
var _a, _b;
|
982
|
-
const [closed, setClosed] = (0,
|
983
|
-
const popUpRef = (0,
|
983
|
+
const [closed, setClosed] = (0, import_react6.useState)(false);
|
984
|
+
const popUpRef = (0, import_react6.useRef)(null);
|
984
985
|
const formSchema = z.object({
|
985
986
|
source: z.string({ required_error: (_a = props.texts) == null ? void 0 : _a.pleaseSelectOption }),
|
986
987
|
feedback: z.string().optional()
|
@@ -1000,7 +1001,7 @@ var UserReferralSource = ({
|
|
1000
1001
|
label: "Other"
|
1001
1002
|
}
|
1002
1003
|
];
|
1003
|
-
return /* @__PURE__ */
|
1004
|
+
return /* @__PURE__ */ import_react6.default.createElement(
|
1004
1005
|
"div",
|
1005
1006
|
{
|
1006
1007
|
className: cn(
|
@@ -1009,7 +1010,7 @@ var UserReferralSource = ({
|
|
1009
1010
|
),
|
1010
1011
|
ref: popUpRef
|
1011
1012
|
},
|
1012
|
-
/* @__PURE__ */
|
1013
|
+
/* @__PURE__ */ import_react6.default.createElement(
|
1013
1014
|
Card,
|
1014
1015
|
{
|
1015
1016
|
className: cn(
|
@@ -1018,7 +1019,7 @@ var UserReferralSource = ({
|
|
1018
1019
|
),
|
1019
1020
|
dir: props.direction
|
1020
1021
|
},
|
1021
|
-
/* @__PURE__ */
|
1022
|
+
/* @__PURE__ */ import_react6.default.createElement(
|
1022
1023
|
"button",
|
1023
1024
|
{
|
1024
1025
|
type: "button",
|
@@ -1037,7 +1038,7 @@ var UserReferralSource = ({
|
|
1037
1038
|
}, 200);
|
1038
1039
|
}
|
1039
1040
|
},
|
1040
|
-
/* @__PURE__ */
|
1041
|
+
/* @__PURE__ */ import_react6.default.createElement(
|
1041
1042
|
"svg",
|
1042
1043
|
{
|
1043
1044
|
"aria-hidden": "true",
|
@@ -1045,7 +1046,7 @@ var UserReferralSource = ({
|
|
1045
1046
|
fill: "currentColor",
|
1046
1047
|
viewBox: "0 0 20 20"
|
1047
1048
|
},
|
1048
|
-
/* @__PURE__ */
|
1049
|
+
/* @__PURE__ */ import_react6.default.createElement(
|
1049
1050
|
"path",
|
1050
1051
|
{
|
1051
1052
|
fillRule: "evenodd",
|
@@ -1055,7 +1056,7 @@ var UserReferralSource = ({
|
|
1055
1056
|
)
|
1056
1057
|
)
|
1057
1058
|
),
|
1058
|
-
/* @__PURE__ */
|
1059
|
+
/* @__PURE__ */ import_react6.default.createElement(CardContent, { headless: true }, /* @__PURE__ */ import_react6.default.createElement(
|
1059
1060
|
"form",
|
1060
1061
|
{
|
1061
1062
|
noValidate: true,
|
@@ -1067,7 +1068,7 @@ var UserReferralSource = ({
|
|
1067
1068
|
}
|
1068
1069
|
})
|
1069
1070
|
},
|
1070
|
-
/* @__PURE__ */
|
1071
|
+
/* @__PURE__ */ import_react6.default.createElement(
|
1071
1072
|
"div",
|
1072
1073
|
{
|
1073
1074
|
className: cn(
|
@@ -1075,15 +1076,15 @@ var UserReferralSource = ({
|
|
1075
1076
|
closed ? "hawa-opacity-0" : "hawa-opacity-100"
|
1076
1077
|
)
|
1077
1078
|
},
|
1078
|
-
/* @__PURE__ */
|
1079
|
-
/* @__PURE__ */
|
1079
|
+
/* @__PURE__ */ import_react6.default.createElement("div", { className: "hawa-mt-4 hawa-font-bold" }, props.question),
|
1080
|
+
/* @__PURE__ */ import_react6.default.createElement("div", { className: "hawa-flex hawa-w-full hawa-flex-row hawa-gap-1 hawa-rounded " }, /* @__PURE__ */ import_react6.default.createElement(
|
1080
1081
|
import_react_hook_form.Controller,
|
1081
1082
|
{
|
1082
1083
|
control,
|
1083
1084
|
name: "source",
|
1084
1085
|
render: ({ field }) => {
|
1085
1086
|
var _a2, _b2;
|
1086
|
-
return /* @__PURE__ */
|
1087
|
+
return /* @__PURE__ */ import_react6.default.createElement(
|
1087
1088
|
Radio,
|
1088
1089
|
{
|
1089
1090
|
name: "source",
|
@@ -1098,14 +1099,14 @@ var UserReferralSource = ({
|
|
1098
1099
|
}
|
1099
1100
|
}
|
1100
1101
|
)),
|
1101
|
-
/* @__PURE__ */
|
1102
|
+
/* @__PURE__ */ import_react6.default.createElement("div", null, /* @__PURE__ */ import_react6.default.createElement(
|
1102
1103
|
import_react_hook_form.Controller,
|
1103
1104
|
{
|
1104
1105
|
control,
|
1105
1106
|
name: "feedback",
|
1106
1107
|
render: ({ field }) => {
|
1107
1108
|
var _a2, _b2;
|
1108
|
-
return /* @__PURE__ */
|
1109
|
+
return /* @__PURE__ */ import_react6.default.createElement(
|
1109
1110
|
Textarea,
|
1110
1111
|
{
|
1111
1112
|
...field,
|
@@ -1120,28 +1121,28 @@ var UserReferralSource = ({
|
|
1120
1121
|
}
|
1121
1122
|
))
|
1122
1123
|
),
|
1123
|
-
/* @__PURE__ */
|
1124
|
+
/* @__PURE__ */ import_react6.default.createElement(Button, { type: "submit", className: "hawa-mt-4 hawa-w-full" }, ((_b = props.texts) == null ? void 0 : _b.submit) || "Submit")
|
1124
1125
|
))
|
1125
1126
|
)
|
1126
1127
|
);
|
1127
1128
|
};
|
1128
1129
|
|
1129
1130
|
// blocks/feedback/FeedbackRating.tsx
|
1130
|
-
var
|
1131
|
+
var import_react7 = __toESM(require("react"));
|
1131
1132
|
var FeedbackRating = ({
|
1132
1133
|
position = "bottom-right",
|
1133
1134
|
...props
|
1134
1135
|
}) => {
|
1135
|
-
const [closed, setClosed] = (0,
|
1136
|
-
const [answered, setAnswered] = (0,
|
1137
|
-
const [clickedOption, setClickedOption] = (0,
|
1138
|
-
const [closingTimer, setClosingTimer] = (0,
|
1139
|
-
const popUpRef = (0,
|
1136
|
+
const [closed, setClosed] = (0, import_react7.useState)(false);
|
1137
|
+
const [answered, setAnswered] = (0, import_react7.useState)(false);
|
1138
|
+
const [clickedOption, setClickedOption] = (0, import_react7.useState)(null);
|
1139
|
+
const [closingTimer, setClosingTimer] = (0, import_react7.useState)(5);
|
1140
|
+
const popUpRef = (0, import_react7.useRef)(null);
|
1140
1141
|
const boxPosition = {
|
1141
1142
|
"bottom-right": "hawa-right-4",
|
1142
1143
|
"bottom-left": "hawa-left-4"
|
1143
1144
|
};
|
1144
|
-
(0,
|
1145
|
+
(0, import_react7.useEffect)(() => {
|
1145
1146
|
const timeoutHide = setTimeout(() => {
|
1146
1147
|
if (closingTimer >= 0) {
|
1147
1148
|
setClosingTimer(closingTimer - 1);
|
@@ -1159,7 +1160,7 @@ var FeedbackRating = ({
|
|
1159
1160
|
}
|
1160
1161
|
}, 200);
|
1161
1162
|
};
|
1162
|
-
return /* @__PURE__ */
|
1163
|
+
return /* @__PURE__ */ import_react7.default.createElement(
|
1163
1164
|
"div",
|
1164
1165
|
{
|
1165
1166
|
ref: popUpRef,
|
@@ -1168,7 +1169,7 @@ var FeedbackRating = ({
|
|
1168
1169
|
boxPosition[position]
|
1169
1170
|
)
|
1170
1171
|
},
|
1171
|
-
/* @__PURE__ */
|
1172
|
+
/* @__PURE__ */ import_react7.default.createElement(
|
1172
1173
|
"div",
|
1173
1174
|
{
|
1174
1175
|
className: cn(
|
@@ -1177,8 +1178,8 @@ var FeedbackRating = ({
|
|
1177
1178
|
props.banner && "hawa-rounded-none hawa-px-4 md:hawa-rounded-t md:hawa-px-64"
|
1178
1179
|
)
|
1179
1180
|
},
|
1180
|
-
/* @__PURE__ */
|
1181
|
-
/* @__PURE__ */
|
1181
|
+
/* @__PURE__ */ import_react7.default.createElement("div", { className: "hawa-absolute hawa-left-2 hawa-top-2 hawa-p-1.5 hawa-text-sm" }, props.title),
|
1182
|
+
/* @__PURE__ */ import_react7.default.createElement(
|
1182
1183
|
"button",
|
1183
1184
|
{
|
1184
1185
|
type: "button",
|
@@ -1187,7 +1188,7 @@ var FeedbackRating = ({
|
|
1187
1188
|
"aria-label": "Close",
|
1188
1189
|
onClick: () => slowClose()
|
1189
1190
|
},
|
1190
|
-
/* @__PURE__ */
|
1191
|
+
/* @__PURE__ */ import_react7.default.createElement(
|
1191
1192
|
"svg",
|
1192
1193
|
{
|
1193
1194
|
"aria-hidden": "true",
|
@@ -1195,7 +1196,7 @@ var FeedbackRating = ({
|
|
1195
1196
|
fill: "currentColor",
|
1196
1197
|
viewBox: "0 0 20 20"
|
1197
1198
|
},
|
1198
|
-
/* @__PURE__ */
|
1199
|
+
/* @__PURE__ */ import_react7.default.createElement(
|
1199
1200
|
"path",
|
1200
1201
|
{
|
1201
1202
|
fillRule: "evenodd",
|
@@ -1205,8 +1206,8 @@ var FeedbackRating = ({
|
|
1205
1206
|
)
|
1206
1207
|
)
|
1207
1208
|
),
|
1208
|
-
/* @__PURE__ */
|
1209
|
-
/* @__PURE__ */
|
1209
|
+
/* @__PURE__ */ import_react7.default.createElement("div", { className: "hawa-mt-8" }, props.question),
|
1210
|
+
/* @__PURE__ */ import_react7.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_react7.default.createElement(
|
1210
1211
|
"span",
|
1211
1212
|
{
|
1212
1213
|
key: i,
|
@@ -1234,18 +1235,18 @@ var FeedbackRating = ({
|
|
1234
1235
|
},
|
1235
1236
|
op
|
1236
1237
|
))),
|
1237
|
-
props.texts && /* @__PURE__ */
|
1238
|
-
answered && /* @__PURE__ */
|
1238
|
+
props.texts && /* @__PURE__ */ import_react7.default.createElement("div", { className: " hawa-flex hawa-flex-row hawa-justify-between hawa-text-xs" }, /* @__PURE__ */ import_react7.default.createElement("span", null, props.texts.least), /* @__PURE__ */ import_react7.default.createElement("span", null, props.texts.most)),
|
1239
|
+
answered && /* @__PURE__ */ import_react7.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_react7.default.createElement("span", { className: "hawa-font-bold hawa-text-white" }, "Thank you for your answer. This box will disappear in", " " + closingTimer, " seconds"), /* @__PURE__ */ import_react7.default.createElement("div", { className: "hawa-flex hawa-flex-row hawa-gap-2" }, /* @__PURE__ */ import_react7.default.createElement(Button, { variant: "secondary", onClick: () => slowClose() }, "Close")))
|
1239
1240
|
)
|
1240
1241
|
);
|
1241
1242
|
};
|
1242
1243
|
|
1243
1244
|
// blocks/feedback/FeedbackEmoji.tsx
|
1244
|
-
var
|
1245
|
+
var import_react11 = __toESM(require("react"));
|
1245
1246
|
|
1246
1247
|
// icons/Emojis.tsx
|
1247
|
-
var
|
1248
|
-
var VeryGoodEmoji = () => /* @__PURE__ */
|
1248
|
+
var import_react8 = __toESM(require("react"));
|
1249
|
+
var VeryGoodEmoji = () => /* @__PURE__ */ import_react8.default.createElement(
|
1249
1250
|
"svg",
|
1250
1251
|
{
|
1251
1252
|
fill: "none",
|
@@ -1254,7 +1255,7 @@ var VeryGoodEmoji = () => /* @__PURE__ */ import_react7.default.createElement(
|
|
1254
1255
|
width: "16",
|
1255
1256
|
xmlns: "http://www.w3.org/2000/svg"
|
1256
1257
|
},
|
1257
|
-
/* @__PURE__ */
|
1258
|
+
/* @__PURE__ */ import_react8.default.createElement("g", { clipPath: "url(#clip0_53_166)" }, /* @__PURE__ */ import_react8.default.createElement(
|
1258
1259
|
"path",
|
1259
1260
|
{
|
1260
1261
|
clipRule: "evenodd",
|
@@ -1262,7 +1263,7 @@ var VeryGoodEmoji = () => /* @__PURE__ */ import_react7.default.createElement(
|
|
1262
1263
|
fill: "currentColor",
|
1263
1264
|
fillRule: "evenodd"
|
1264
1265
|
}
|
1265
|
-
), /* @__PURE__ */
|
1266
|
+
), /* @__PURE__ */ import_react8.default.createElement(
|
1266
1267
|
"path",
|
1267
1268
|
{
|
1268
1269
|
clipRule: "evenodd",
|
@@ -1272,7 +1273,7 @@ var VeryGoodEmoji = () => /* @__PURE__ */ import_react7.default.createElement(
|
|
1272
1273
|
}
|
1273
1274
|
))
|
1274
1275
|
);
|
1275
|
-
var GoodEmoji = () => /* @__PURE__ */
|
1276
|
+
var GoodEmoji = () => /* @__PURE__ */ import_react8.default.createElement(
|
1276
1277
|
"svg",
|
1277
1278
|
{
|
1278
1279
|
fill: "none",
|
@@ -1281,7 +1282,7 @@ var GoodEmoji = () => /* @__PURE__ */ import_react7.default.createElement(
|
|
1281
1282
|
width: "16",
|
1282
1283
|
xmlns: "http://www.w3.org/2000/svg"
|
1283
1284
|
},
|
1284
|
-
/* @__PURE__ */
|
1285
|
+
/* @__PURE__ */ import_react8.default.createElement("g", { clipPath: "url(#clip0_53_167)" }, /* @__PURE__ */ import_react8.default.createElement(
|
1285
1286
|
"path",
|
1286
1287
|
{
|
1287
1288
|
clipRule: "evenodd",
|
@@ -1291,7 +1292,7 @@ var GoodEmoji = () => /* @__PURE__ */ import_react7.default.createElement(
|
|
1291
1292
|
}
|
1292
1293
|
))
|
1293
1294
|
);
|
1294
|
-
var BadEmoji = () => /* @__PURE__ */
|
1295
|
+
var BadEmoji = () => /* @__PURE__ */ import_react8.default.createElement(
|
1295
1296
|
"svg",
|
1296
1297
|
{
|
1297
1298
|
fill: "none",
|
@@ -1300,7 +1301,7 @@ var BadEmoji = () => /* @__PURE__ */ import_react7.default.createElement(
|
|
1300
1301
|
width: "16",
|
1301
1302
|
xmlns: "http://www.w3.org/2000/svg"
|
1302
1303
|
},
|
1303
|
-
/* @__PURE__ */
|
1304
|
+
/* @__PURE__ */ import_react8.default.createElement("g", { clipPath: "url(#clip0_53_152)" }, /* @__PURE__ */ import_react8.default.createElement(
|
1304
1305
|
"path",
|
1305
1306
|
{
|
1306
1307
|
clipRule: "evenodd",
|
@@ -1310,7 +1311,7 @@ var BadEmoji = () => /* @__PURE__ */ import_react7.default.createElement(
|
|
1310
1311
|
}
|
1311
1312
|
))
|
1312
1313
|
);
|
1313
|
-
var VeryBadEmoji = () => /* @__PURE__ */
|
1314
|
+
var VeryBadEmoji = () => /* @__PURE__ */ import_react8.default.createElement(
|
1314
1315
|
"svg",
|
1315
1316
|
{
|
1316
1317
|
fill: "none",
|
@@ -1319,13 +1320,13 @@ var VeryBadEmoji = () => /* @__PURE__ */ import_react7.default.createElement(
|
|
1319
1320
|
width: "16",
|
1320
1321
|
xmlns: "http://www.w3.org/2000/svg"
|
1321
1322
|
},
|
1322
|
-
/* @__PURE__ */
|
1323
|
+
/* @__PURE__ */ import_react8.default.createElement("g", { clipPath: "url(#clip0_53_151)" }, /* @__PURE__ */ import_react8.default.createElement(
|
1323
1324
|
"path",
|
1324
1325
|
{
|
1325
1326
|
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",
|
1326
1327
|
fill: "#0070F3"
|
1327
1328
|
}
|
1328
|
-
), /* @__PURE__ */
|
1329
|
+
), /* @__PURE__ */ import_react8.default.createElement(
|
1329
1330
|
"path",
|
1330
1331
|
{
|
1331
1332
|
clipRule: "evenodd",
|
@@ -1337,22 +1338,22 @@ var VeryBadEmoji = () => /* @__PURE__ */ import_react7.default.createElement(
|
|
1337
1338
|
);
|
1338
1339
|
|
1339
1340
|
// icons/InputIcons.tsx
|
1340
|
-
var
|
1341
|
+
var import_react9 = __toESM(require("react"));
|
1341
1342
|
|
1342
1343
|
// icons/CommonIcons.tsx
|
1343
|
-
var
|
1344
|
+
var import_react10 = __toESM(require("react"));
|
1344
1345
|
|
1345
1346
|
// blocks/feedback/FeedbackEmoji.tsx
|
1346
1347
|
var FeedbackEmoji = (props) => {
|
1347
|
-
const [selectedEmoji, setSelectedEmoji] = (0,
|
1348
|
-
const [loadingSubmit, setLoadingSubmit] = (0,
|
1349
|
-
const [feedbackText, setFeedbackText] = (0,
|
1350
|
-
const [helperText, setHelperText] = (0,
|
1348
|
+
const [selectedEmoji, setSelectedEmoji] = (0, import_react11.useState)(null);
|
1349
|
+
const [loadingSubmit, setLoadingSubmit] = (0, import_react11.useState)(false);
|
1350
|
+
const [feedbackText, setFeedbackText] = (0, import_react11.useState)("");
|
1351
|
+
const [helperText, setHelperText] = (0, import_react11.useState)(false);
|
1351
1352
|
let emojis = [
|
1352
|
-
{ icon: /* @__PURE__ */
|
1353
|
-
{ icon: /* @__PURE__ */
|
1354
|
-
{ icon: /* @__PURE__ */
|
1355
|
-
{ icon: /* @__PURE__ */
|
1353
|
+
{ icon: /* @__PURE__ */ import_react11.default.createElement(VeryGoodEmoji, null), value: "very-good" },
|
1354
|
+
{ icon: /* @__PURE__ */ import_react11.default.createElement(GoodEmoji, null), value: "good" },
|
1355
|
+
{ icon: /* @__PURE__ */ import_react11.default.createElement(BadEmoji, null), value: "bad" },
|
1356
|
+
{ icon: /* @__PURE__ */ import_react11.default.createElement(VeryBadEmoji, null), value: "very-bad" }
|
1356
1357
|
];
|
1357
1358
|
const onFeedbackSubmit = async () => {
|
1358
1359
|
if (feedbackText) {
|
@@ -1372,7 +1373,7 @@ var FeedbackEmoji = (props) => {
|
|
1372
1373
|
setHelperText(true);
|
1373
1374
|
}
|
1374
1375
|
};
|
1375
|
-
return /* @__PURE__ */
|
1376
|
+
return /* @__PURE__ */ import_react11.default.createElement(
|
1376
1377
|
"div",
|
1377
1378
|
{
|
1378
1379
|
className: cn(
|
@@ -1380,7 +1381,7 @@ var FeedbackEmoji = (props) => {
|
|
1380
1381
|
selectedEmoji ? "hawa-h-[189px] hawa-min-w-fit" : "hawa-h-[44px] "
|
1381
1382
|
)
|
1382
1383
|
},
|
1383
|
-
/* @__PURE__ */
|
1384
|
+
/* @__PURE__ */ import_react11.default.createElement("div", { className: "hawa-flex hawa-flex-row hawa-items-center hawa-justify-center hawa-gap-2 " }, /* @__PURE__ */ import_react11.default.createElement("div", { className: "hawa-flex hawa-flex-row hawa-justify-center hawa-gap-0.5 " }, emojis.map((emoji, i) => /* @__PURE__ */ import_react11.default.createElement(
|
1384
1385
|
Button,
|
1385
1386
|
{
|
1386
1387
|
key: i,
|
@@ -1399,7 +1400,7 @@ var FeedbackEmoji = (props) => {
|
|
1399
1400
|
},
|
1400
1401
|
emoji.icon
|
1401
1402
|
)))),
|
1402
|
-
/* @__PURE__ */
|
1403
|
+
/* @__PURE__ */ import_react11.default.createElement(
|
1403
1404
|
"div",
|
1404
1405
|
{
|
1405
1406
|
className: cn(
|
@@ -1407,7 +1408,7 @@ var FeedbackEmoji = (props) => {
|
|
1407
1408
|
selectedEmoji ? "hawa-visible hawa-opacity-100" : "hawa-invisible hawa-opacity-0 "
|
1408
1409
|
)
|
1409
1410
|
},
|
1410
|
-
props.showSuccess ? /* @__PURE__ */
|
1411
|
+
props.showSuccess ? /* @__PURE__ */ import_react11.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_react11.default.createElement("div", { className: "hawa-rounded hawa-bg-primary hawa-p-2 hawa-text-primary-foreground" }, /* @__PURE__ */ import_react11.default.createElement(
|
1411
1412
|
"svg",
|
1412
1413
|
{
|
1413
1414
|
stroke: "currentColor",
|
@@ -1417,13 +1418,13 @@ var FeedbackEmoji = (props) => {
|
|
1417
1418
|
height: "0.5em",
|
1418
1419
|
width: "0.5em"
|
1419
1420
|
},
|
1420
|
-
/* @__PURE__ */
|
1421
|
-
)), /* @__PURE__ */
|
1421
|
+
/* @__PURE__ */ import_react11.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" })
|
1422
|
+
)), /* @__PURE__ */ import_react11.default.createElement("div", { className: "hawa-flex hawa-flex-col hawa-text-center hawa-text-sm" }, /* @__PURE__ */ import_react11.default.createElement("span", null, "Your feedback has been received!"), /* @__PURE__ */ import_react11.default.createElement("span", null, "Thank you for your help"))) : /* @__PURE__ */ import_react11.default.createElement("div", { className: "hawa-flex hawa-flex-col hawa-gap-1 hawa-p-1" }, /* @__PURE__ */ import_react11.default.createElement(
|
1422
1423
|
Popover,
|
1423
1424
|
{
|
1424
1425
|
className: "hawa-select-none hawa-p-1 hawa-text-xs ",
|
1425
1426
|
open: helperText,
|
1426
|
-
trigger: /* @__PURE__ */
|
1427
|
+
trigger: /* @__PURE__ */ import_react11.default.createElement(
|
1427
1428
|
Textarea,
|
1428
1429
|
{
|
1429
1430
|
classNames: {
|
@@ -1441,8 +1442,8 @@ var FeedbackEmoji = (props) => {
|
|
1441
1442
|
}
|
1442
1443
|
)
|
1443
1444
|
},
|
1444
|
-
/* @__PURE__ */
|
1445
|
-
), /* @__PURE__ */
|
1445
|
+
/* @__PURE__ */ import_react11.default.createElement("span", { className: "hawa-m-0" }, "Please enter your feedback")
|
1446
|
+
), /* @__PURE__ */ import_react11.default.createElement(
|
1446
1447
|
Button,
|
1447
1448
|
{
|
1448
1449
|
isLoading: loadingSubmit,
|
@@ -1457,13 +1458,13 @@ var FeedbackEmoji = (props) => {
|
|
1457
1458
|
};
|
1458
1459
|
|
1459
1460
|
// blocks/feedback/FeedbackForm.tsx
|
1460
|
-
var
|
1461
|
+
var import_react13 = __toESM(require("react"));
|
1461
1462
|
var import_react_hook_form2 = require("react-hook-form");
|
1462
1463
|
var import_zod2 = require("@hookform/resolvers/zod");
|
1463
1464
|
var z2 = __toESM(require("zod"));
|
1464
1465
|
|
1465
1466
|
// elements/select/Select.tsx
|
1466
|
-
var
|
1467
|
+
var import_react12 = __toESM(require("react"));
|
1467
1468
|
var import_react_select = __toESM(require("react-select"));
|
1468
1469
|
var import_creatable = __toESM(require("react-select/creatable"));
|
1469
1470
|
var import_clsx2 = __toESM(require("clsx"));
|
@@ -1474,10 +1475,10 @@ var Select = ({
|
|
1474
1475
|
}) => {
|
1475
1476
|
const NoOption = () => {
|
1476
1477
|
var _a, _b;
|
1477
|
-
return /* @__PURE__ */
|
1478
|
+
return /* @__PURE__ */ import_react12.default.createElement("div", null, (_b = (_a = props.texts) == null ? void 0 : _a.noOptions) != null ? _b : "No Items Found");
|
1478
1479
|
};
|
1479
1480
|
const Control = ({ children, innerProps, innerRef }) => {
|
1480
|
-
return /* @__PURE__ */
|
1481
|
+
return /* @__PURE__ */ import_react12.default.createElement(
|
1481
1482
|
"div",
|
1482
1483
|
{
|
1483
1484
|
ref: innerRef,
|
@@ -1490,7 +1491,7 @@ var Select = ({
|
|
1490
1491
|
);
|
1491
1492
|
};
|
1492
1493
|
const Option = ({ children, innerProps, innerRef }) => {
|
1493
|
-
return /* @__PURE__ */
|
1494
|
+
return /* @__PURE__ */ import_react12.default.createElement(
|
1494
1495
|
"div",
|
1495
1496
|
{
|
1496
1497
|
ref: innerRef,
|
@@ -1511,7 +1512,7 @@ var Select = ({
|
|
1511
1512
|
...menuProps
|
1512
1513
|
}) => {
|
1513
1514
|
const menuOpen = menuProps.selectProps.menuIsOpen;
|
1514
|
-
return /* @__PURE__ */
|
1515
|
+
return /* @__PURE__ */ import_react12.default.createElement(
|
1515
1516
|
"div",
|
1516
1517
|
{
|
1517
1518
|
className: cn(
|
@@ -1525,7 +1526,7 @@ var Select = ({
|
|
1525
1526
|
children
|
1526
1527
|
);
|
1527
1528
|
};
|
1528
|
-
return /* @__PURE__ */
|
1529
|
+
return /* @__PURE__ */ import_react12.default.createElement(
|
1529
1530
|
"div",
|
1530
1531
|
{
|
1531
1532
|
className: cn(
|
@@ -1533,10 +1534,10 @@ var Select = ({
|
|
1533
1534
|
props.width === "fit" ? "hawa-w-fit" : "hawa-w-full"
|
1534
1535
|
)
|
1535
1536
|
},
|
1536
|
-
props.label && /* @__PURE__ */
|
1537
|
-
props.isLoading ? /* @__PURE__ */
|
1537
|
+
props.label && /* @__PURE__ */ import_react12.default.createElement(Label, { ...labelProps }, props.label),
|
1538
|
+
props.isLoading ? /* @__PURE__ */ import_react12.default.createElement(Skeleton, { className: "hawa-h-[40px] hawa-w-full" }) : !props.isCreatable ? (
|
1538
1539
|
// TODO: enable keyboard to go to the next item in the list
|
1539
|
-
/* @__PURE__ */
|
1540
|
+
/* @__PURE__ */ import_react12.default.createElement(
|
1540
1541
|
import_react_select.default,
|
1541
1542
|
{
|
1542
1543
|
noOptionsMessage: NoOption,
|
@@ -1575,7 +1576,7 @@ var Select = ({
|
|
1575
1576
|
// {...e}
|
1576
1577
|
// />
|
1577
1578
|
// ),
|
1578
|
-
ValueContainer: (e) => /* @__PURE__ */
|
1579
|
+
ValueContainer: (e) => /* @__PURE__ */ import_react12.default.createElement(
|
1579
1580
|
"div",
|
1580
1581
|
{
|
1581
1582
|
className: cn(
|
@@ -1585,7 +1586,7 @@ var Select = ({
|
|
1585
1586
|
...e
|
1586
1587
|
}
|
1587
1588
|
),
|
1588
|
-
MultiValueContainer: (e) => /* @__PURE__ */
|
1589
|
+
MultiValueContainer: (e) => /* @__PURE__ */ import_react12.default.createElement(
|
1589
1590
|
"div",
|
1590
1591
|
{
|
1591
1592
|
className: cn(
|
@@ -1607,7 +1608,7 @@ var Select = ({
|
|
1607
1608
|
isSearchable: props.isSearchable
|
1608
1609
|
}
|
1609
1610
|
)
|
1610
|
-
) : /* @__PURE__ */
|
1611
|
+
) : /* @__PURE__ */ import_react12.default.createElement(
|
1611
1612
|
import_creatable.default,
|
1612
1613
|
{
|
1613
1614
|
formatCreateLabel: (inputValue) => {
|
@@ -1637,7 +1638,7 @@ var Select = ({
|
|
1637
1638
|
onInputChange: (newValue, action) => props.onInputChange(newValue, action)
|
1638
1639
|
}
|
1639
1640
|
),
|
1640
|
-
!props.hideHelperText && /* @__PURE__ */
|
1641
|
+
!props.hideHelperText && /* @__PURE__ */ import_react12.default.createElement(
|
1641
1642
|
"p",
|
1642
1643
|
{
|
1643
1644
|
className: cn(
|
@@ -1661,7 +1662,7 @@ var FeedbackForm = (props) => {
|
|
1661
1662
|
resolver: (0, import_zod2.zodResolver)(formSchema),
|
1662
1663
|
defaultValues: { requestType: "", description: "" }
|
1663
1664
|
});
|
1664
|
-
return /* @__PURE__ */
|
1665
|
+
return /* @__PURE__ */ import_react13.default.createElement(
|
1665
1666
|
Card,
|
1666
1667
|
{
|
1667
1668
|
className: cn(
|
@@ -1669,7 +1670,7 @@ var FeedbackForm = (props) => {
|
|
1669
1670
|
),
|
1670
1671
|
style: props.cardless ? { boxShadow: "none" } : void 0
|
1671
1672
|
},
|
1672
|
-
/* @__PURE__ */
|
1673
|
+
/* @__PURE__ */ import_react13.default.createElement(CardContent, { headless: true, className: props.cardless ? "!hawa-p-0" : "" }, props.sent ? /* @__PURE__ */ import_react13.default.createElement("div", { className: "hawa-text-center hawa-min-h-[200px] hawa-flex hawa-flex-col hawa-justify-center" }, /* @__PURE__ */ import_react13.default.createElement("div", { className: "hawa-font-bold hawa-text-lg" }, props.texts.sentTitle || "Form submitted"), /* @__PURE__ */ import_react13.default.createElement("div", { className: "hawa-text-md" }, props.texts.sentSubtitle || "Thank you for your submission")) : /* @__PURE__ */ import_react13.default.createElement(
|
1673
1674
|
"form",
|
1674
1675
|
{
|
1675
1676
|
noValidate: true,
|
@@ -1682,15 +1683,15 @@ var FeedbackForm = (props) => {
|
|
1682
1683
|
}),
|
1683
1684
|
className: "hawa-flex hawa-flex-col hawa-gap-2"
|
1684
1685
|
},
|
1685
|
-
/* @__PURE__ */
|
1686
|
-
/* @__PURE__ */
|
1686
|
+
/* @__PURE__ */ import_react13.default.createElement(Label, null),
|
1687
|
+
/* @__PURE__ */ import_react13.default.createElement(
|
1687
1688
|
import_react_hook_form2.Controller,
|
1688
1689
|
{
|
1689
1690
|
name: "requestType",
|
1690
1691
|
control,
|
1691
1692
|
render: ({ field }) => {
|
1692
1693
|
var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2;
|
1693
|
-
return /* @__PURE__ */
|
1694
|
+
return /* @__PURE__ */ import_react13.default.createElement(
|
1694
1695
|
Select,
|
1695
1696
|
{
|
1696
1697
|
...field,
|
@@ -1708,14 +1709,14 @@ var FeedbackForm = (props) => {
|
|
1708
1709
|
}
|
1709
1710
|
}
|
1710
1711
|
),
|
1711
|
-
/* @__PURE__ */
|
1712
|
+
/* @__PURE__ */ import_react13.default.createElement(
|
1712
1713
|
import_react_hook_form2.Controller,
|
1713
1714
|
{
|
1714
1715
|
name: "description",
|
1715
1716
|
control,
|
1716
1717
|
render: ({ field }) => {
|
1717
1718
|
var _a2, _b2, _c2, _d2, _e2, _f2;
|
1718
|
-
return /* @__PURE__ */
|
1719
|
+
return /* @__PURE__ */ import_react13.default.createElement(
|
1719
1720
|
Textarea,
|
1720
1721
|
{
|
1721
1722
|
helperText: formState.errors.description && ((_b2 = (_a2 = formState.errors.description) == null ? void 0 : _a2.message) == null ? void 0 : _b2.toString()),
|
@@ -1733,7 +1734,7 @@ var FeedbackForm = (props) => {
|
|
1733
1734
|
}
|
1734
1735
|
}
|
1735
1736
|
),
|
1736
|
-
/* @__PURE__ */
|
1737
|
+
/* @__PURE__ */ import_react13.default.createElement(Button, { isLoading: props.loadingSubmission, type: "submit" }, (_i = props.texts) == null ? void 0 : _i.submit)
|
1737
1738
|
))
|
1738
1739
|
);
|
1739
1740
|
};
|