@sikka/hawa 0.11.6-next → 0.11.8-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.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +35 -40
- package/dist/index.mjs +105 -97
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -1193,8 +1193,8 @@ type ComponentTypes$2 = {
|
|
|
1193
1193
|
tag?: any;
|
|
1194
1194
|
options?: RadioOptionsTypes[];
|
|
1195
1195
|
position?: "bottom-right" | "bottom-left";
|
|
1196
|
-
onOptionClicked?: (option: any) => void;
|
|
1197
1196
|
direction?: "rtl" | "ltr";
|
|
1197
|
+
onSubmitForm?: (e: any) => void;
|
|
1198
1198
|
texts?: {
|
|
1199
1199
|
pleaseSelectOption: string;
|
|
1200
1200
|
textTooShort: string;
|
package/dist/index.d.ts
CHANGED
|
@@ -1193,8 +1193,8 @@ type ComponentTypes$2 = {
|
|
|
1193
1193
|
tag?: any;
|
|
1194
1194
|
options?: RadioOptionsTypes[];
|
|
1195
1195
|
position?: "bottom-right" | "bottom-left";
|
|
1196
|
-
onOptionClicked?: (option: any) => void;
|
|
1197
1196
|
direction?: "rtl" | "ltr";
|
|
1197
|
+
onSubmitForm?: (e: any) => void;
|
|
1198
1198
|
texts?: {
|
|
1199
1199
|
pleaseSelectOption: string;
|
|
1200
1200
|
textTooShort: string;
|
package/dist/index.js
CHANGED
|
@@ -4953,18 +4953,20 @@ var Input = function(_param) {
|
|
|
4953
4953
|
full: "hawa-w-full",
|
|
4954
4954
|
auto: ""
|
|
4955
4955
|
};
|
|
4956
|
-
var defaultStyle = "hawa-flex hawa-max-h-fit hawa-relative hawa-flex-col hawa-justify-center hawa-gap-0";
|
|
4956
|
+
var defaultStyle = "hawa-flex hawa-max-h-fit hawa-h-fit hawa-relative hawa-flex-col hawa-justify-center hawa-gap-0";
|
|
4957
4957
|
var defaultInputStyle = "hawa-block hawa-w-full hawa-rounded hawa-border hawa-transition-all hawa-bg-background hawa-p-3 hawa-text-sm ";
|
|
4958
4958
|
return /* @__PURE__ */ import_react24.default.createElement("div", {
|
|
4959
|
-
className: cn(defaultStyle, marginStyles[margin], widthStyles[width], props.containerClassName, "hawa-w-full hawa-gap-2")
|
|
4959
|
+
className: cn(defaultStyle, marginStyles[margin], widthStyles[width], props.containerClassName, "hawa-w-full hawa-gap-2 ")
|
|
4960
4960
|
}, props.label && /* @__PURE__ */ import_react24.default.createElement(Label2, {
|
|
4961
4961
|
htmlFor: props.id,
|
|
4962
4962
|
hint: props.hint,
|
|
4963
4963
|
hintSide: props.hintSide,
|
|
4964
4964
|
required: props.isRequired
|
|
4965
|
-
}, props.label), props.isLoading ? /* @__PURE__ */ import_react24.default.createElement(
|
|
4965
|
+
}, props.label), props.isLoading ? /* @__PURE__ */ import_react24.default.createElement("div", {
|
|
4966
|
+
className: "hawa-pb-2"
|
|
4967
|
+
}, /* @__PURE__ */ import_react24.default.createElement(Skeleton, {
|
|
4966
4968
|
className: "hawa-h-[40px] hawa-w-full"
|
|
4967
|
-
}) : /* @__PURE__ */ import_react24.default.createElement(import_react24.default.Fragment, null, /* @__PURE__ */ import_react24.default.createElement("div", {
|
|
4969
|
+
})) : /* @__PURE__ */ import_react24.default.createElement(import_react24.default.Fragment, null, /* @__PURE__ */ import_react24.default.createElement("div", {
|
|
4968
4970
|
className: cn("hawa-absolute hawa-top-[22px] hawa-h-[0.8px] hawa-w-full hawa-bg-gray-200 hawa-transition-all dark:hawa-bg-gray-800", preview ? "hawa-opacity-100" : "hawa-opacity-0")
|
|
4969
4971
|
}), /* @__PURE__ */ import_react24.default.createElement(import_react24.default.Fragment, null, /* @__PURE__ */ import_react24.default.createElement("div", {
|
|
4970
4972
|
className: cn("hawa-relative")
|
|
@@ -6031,15 +6033,19 @@ var Combobox = function(_param) {
|
|
|
6031
6033
|
var _React47_useState = _sliced_to_array(React47.useState(false), 2), open = _React47_useState[0], setOpen = _React47_useState[1];
|
|
6032
6034
|
var _React47_useState1 = _sliced_to_array(React47.useState(defaultValue), 2), value = _React47_useState1[0], setValue = _React47_useState1[1];
|
|
6033
6035
|
return /* @__PURE__ */ React47.createElement("div", {
|
|
6034
|
-
className: cn("hawa-flex hawa-flex-col hawa-gap-2 hawa-relative", props.width === "fit" ? "hawa-w-fit" : "hawa-w-full")
|
|
6036
|
+
className: cn("hawa-flex hawa-flex-col hawa-gap-2 hawa-relative hawa-h-fit", props.width === "fit" ? "hawa-w-fit" : "hawa-w-full")
|
|
6035
6037
|
}, props.label && /* @__PURE__ */ React47.createElement(Label2, null, props.label), /* @__PURE__ */ React47.createElement(PopoverPrimitive2.Root, {
|
|
6036
6038
|
open: open,
|
|
6037
6039
|
onOpenChange: setOpen
|
|
6038
6040
|
}, /* @__PURE__ */ React47.createElement(PopoverTrigger, {
|
|
6039
6041
|
disabled: props.isLoading || props.preview
|
|
6040
|
-
}, props.isLoading ? /* @__PURE__ */ React47.createElement(
|
|
6042
|
+
}, props.isLoading ? /* @__PURE__ */ React47.createElement("div", {
|
|
6043
|
+
className: "hawa-pb-2"
|
|
6044
|
+
}, /* @__PURE__ */ React47.createElement(Skeleton, {
|
|
6041
6045
|
className: "hawa-h-[40px] hawa-w-full"
|
|
6042
|
-
}) : /* @__PURE__ */ React47.createElement("div",
|
|
6046
|
+
})) : /* @__PURE__ */ React47.createElement("div", {
|
|
6047
|
+
className: "hawa-flex hawa-flex-col hawa-gap-2 "
|
|
6048
|
+
}, /* @__PURE__ */ React47.createElement("div", {
|
|
6043
6049
|
className: cn("hawa-absolute hawa-top-[22px] hawa-h-[0.8px] hawa-w-full hawa-bg-gray-200 hawa-transition-all dark:hawa-bg-gray-800", props.preview ? "hawa-opacity-100" : "hawa-opacity-0")
|
|
6044
6050
|
}), /* @__PURE__ */ React47.createElement("button", {
|
|
6045
6051
|
role: "combobox",
|
|
@@ -6058,7 +6064,9 @@ var Combobox = function(_param) {
|
|
|
6058
6064
|
strokeLinejoin: "round"
|
|
6059
6065
|
}, /* @__PURE__ */ React47.createElement("path", {
|
|
6060
6066
|
d: "m6 9 6 6 6-6"
|
|
6061
|
-
})))
|
|
6067
|
+
}))), /* @__PURE__ */ React47.createElement("p", {
|
|
6068
|
+
className: cn("hawa-my-0 hawa-text-xs hawa-text-helper-color hawa-transition-all", props.helperText ? "hawa-opacity-100 hawa-h-4" : "hawa-opacity-0 hawa-h-0")
|
|
6069
|
+
}, props.helperText), " ")), /* @__PURE__ */ React47.createElement(PopoverContent, {
|
|
6062
6070
|
className: cn("popover-w-parent")
|
|
6063
6071
|
}, /* @__PURE__ */ React47.createElement(Command, null, !props.hideInput && /* @__PURE__ */ React47.createElement(CommandInput, {
|
|
6064
6072
|
placeholder: props.searchPlaceholder
|
|
@@ -6089,9 +6097,7 @@ var Combobox = function(_param) {
|
|
|
6089
6097
|
}, /* @__PURE__ */ React47.createElement("polyline", {
|
|
6090
6098
|
points: "20 6 9 17 4 12"
|
|
6091
6099
|
})), getProperty(item, labelKey));
|
|
6092
|
-
})))))
|
|
6093
|
-
className: cn("hawa-my-0 hawa-text-xs hawa-text-helper-color hawa-transition-all", props.helperText && !props.isLoading ? "hawa-opacity-100 hawa-h-4" : "hawa-opacity-0 hawa-h-0")
|
|
6094
|
-
}, props.helperText));
|
|
6100
|
+
}))))));
|
|
6095
6101
|
};
|
|
6096
6102
|
// components/elements/Count.tsx
|
|
6097
6103
|
var import_react31 = __toESM(require("react"));
|
|
@@ -7716,7 +7722,6 @@ var UserReferralSource = function(_param) {
|
|
|
7716
7722
|
]);
|
|
7717
7723
|
var _props_texts, _props_texts1;
|
|
7718
7724
|
var _ref = _sliced_to_array((0, import_react45.useState)(false), 2), closed = _ref[0], setClosed = _ref[1];
|
|
7719
|
-
var _ref1 = _sliced_to_array((0, import_react45.useState)(5), 2), closingTimer = _ref1[0], setClosingTimer = _ref1[1];
|
|
7720
7725
|
var popUpRef = (0, import_react45.useRef)(null);
|
|
7721
7726
|
var formSchema = z6.object({
|
|
7722
7727
|
source: z6.string({
|
|
@@ -7724,35 +7729,17 @@ var UserReferralSource = function(_param) {
|
|
|
7724
7729
|
}),
|
|
7725
7730
|
feedback: z6.string().optional()
|
|
7726
7731
|
});
|
|
7727
|
-
var
|
|
7732
|
+
var _ref1 = (0, import_react_hook_form6.useForm)({
|
|
7728
7733
|
resolver: (0, import_zod6.zodResolver)(formSchema)
|
|
7729
|
-
}), handleSubmit =
|
|
7734
|
+
}), handleSubmit = _ref1.handleSubmit, control = _ref1.control, formState = _ref1.formState;
|
|
7730
7735
|
var boxPosition = {
|
|
7731
7736
|
"bottom-right": "hawa-right-4",
|
|
7732
7737
|
"bottom-left": "hawa-left-4"
|
|
7733
7738
|
};
|
|
7734
|
-
|
|
7735
|
-
|
|
7736
|
-
|
|
7737
|
-
|
|
7738
|
-
}
|
|
7739
|
-
}, 1e3);
|
|
7740
|
-
return function() {
|
|
7741
|
-
clearTimeout(timeoutHide);
|
|
7742
|
-
};
|
|
7743
|
-
}, [
|
|
7744
|
-
closingTimer
|
|
7745
|
-
]);
|
|
7746
|
-
var slowClose = function() {
|
|
7747
|
-
setClosed(true);
|
|
7748
|
-
setTimeout(function() {
|
|
7749
|
-
if (popUpRef.current) {
|
|
7750
|
-
popUpRef.current.removeChild(popUpRef.current.children[0]);
|
|
7751
|
-
}
|
|
7752
|
-
}, 200);
|
|
7753
|
-
};
|
|
7754
|
-
return /* @__PURE__ */ import_react45.default.createElement(Card, {
|
|
7755
|
-
ref: popUpRef,
|
|
7739
|
+
return /* @__PURE__ */ import_react45.default.createElement("div", {
|
|
7740
|
+
className: cn("hawa-transition-all", closed ? "hawa-opacity-0" : "hawa-opacity-100"),
|
|
7741
|
+
ref: popUpRef
|
|
7742
|
+
}, /* @__PURE__ */ import_react45.default.createElement(Card, {
|
|
7756
7743
|
className: cn("hawa-fixed hawa-bottom-4 hawa-p-0 ", boxPosition[position]),
|
|
7757
7744
|
dir: props.direction
|
|
7758
7745
|
}, /* @__PURE__ */ import_react45.default.createElement("button", {
|
|
@@ -7761,7 +7748,12 @@ var UserReferralSource = function(_param) {
|
|
|
7761
7748
|
"data-dismiss-target": "#toast-default",
|
|
7762
7749
|
"aria-label": "Close",
|
|
7763
7750
|
onClick: function() {
|
|
7764
|
-
|
|
7751
|
+
setClosed(true);
|
|
7752
|
+
setTimeout(function() {
|
|
7753
|
+
if (popUpRef === null || popUpRef === void 0 ? void 0 : popUpRef.current) {
|
|
7754
|
+
popUpRef === null || popUpRef === void 0 ? void 0 : popUpRef.current.removeChild(popUpRef === null || popUpRef === void 0 ? void 0 : popUpRef.current.children[0]);
|
|
7755
|
+
}
|
|
7756
|
+
}, 200);
|
|
7765
7757
|
}
|
|
7766
7758
|
}, /* @__PURE__ */ import_react45.default.createElement("svg", {
|
|
7767
7759
|
"aria-hidden": "true",
|
|
@@ -7776,10 +7768,13 @@ var UserReferralSource = function(_param) {
|
|
|
7776
7768
|
headless: true
|
|
7777
7769
|
}, /* @__PURE__ */ import_react45.default.createElement("form", {
|
|
7778
7770
|
onSubmit: handleSubmit(function(e) {
|
|
7779
|
-
|
|
7771
|
+
if (props.onSubmitForm) {
|
|
7772
|
+
props.onSubmitForm(e);
|
|
7773
|
+
}
|
|
7774
|
+
console.log("onSubmitForm was not provided");
|
|
7780
7775
|
})
|
|
7781
7776
|
}, /* @__PURE__ */ import_react45.default.createElement("div", {
|
|
7782
|
-
className: cn("hawa-flex hawa-flex-col hawa-gap-4", closed ? "hawa-opacity-0" : "hawa-opacity-100")
|
|
7777
|
+
className: cn("hawa-flex hawa-flex-col hawa-gap-4 hawa-transition-all", closed ? "hawa-opacity-0" : "hawa-opacity-100")
|
|
7783
7778
|
}, /* @__PURE__ */ import_react45.default.createElement("div", {
|
|
7784
7779
|
className: "hawa-mt-4 hawa-font-bold"
|
|
7785
7780
|
}, props.question), /* @__PURE__ */ import_react45.default.createElement("div", {
|
|
@@ -7814,7 +7809,7 @@ var UserReferralSource = function(_param) {
|
|
|
7814
7809
|
}))), /* @__PURE__ */ import_react45.default.createElement(Button, {
|
|
7815
7810
|
type: "submit",
|
|
7816
7811
|
className: "hawa-mt-4 hawa-w-full"
|
|
7817
|
-
}, ((_props_texts1 = props.texts) === null || _props_texts1 === void 0 ? void 0 : _props_texts1.submit) || "Submit"))));
|
|
7812
|
+
}, ((_props_texts1 = props.texts) === null || _props_texts1 === void 0 ? void 0 : _props_texts1.submit) || "Submit")))));
|
|
7818
7813
|
};
|
|
7819
7814
|
// components/blocks/feedback/FeedbackRating.tsx
|
|
7820
7815
|
var import_react46 = __toESM(require("react"));
|
package/dist/index.mjs
CHANGED
|
@@ -4601,7 +4601,7 @@ var Input = ({
|
|
|
4601
4601
|
full: "hawa-w-full",
|
|
4602
4602
|
auto: ""
|
|
4603
4603
|
};
|
|
4604
|
-
let defaultStyle = "hawa-flex hawa-max-h-fit hawa-relative hawa-flex-col hawa-justify-center hawa-gap-0";
|
|
4604
|
+
let defaultStyle = "hawa-flex hawa-max-h-fit hawa-h-fit hawa-relative hawa-flex-col hawa-justify-center hawa-gap-0";
|
|
4605
4605
|
let defaultInputStyle = "hawa-block hawa-w-full hawa-rounded hawa-border hawa-transition-all hawa-bg-background hawa-p-3 hawa-text-sm ";
|
|
4606
4606
|
return /* @__PURE__ */ React36.createElement(
|
|
4607
4607
|
"div",
|
|
@@ -4611,7 +4611,7 @@ var Input = ({
|
|
|
4611
4611
|
marginStyles[margin],
|
|
4612
4612
|
widthStyles[width],
|
|
4613
4613
|
props.containerClassName,
|
|
4614
|
-
"hawa-w-full hawa-gap-2"
|
|
4614
|
+
"hawa-w-full hawa-gap-2 "
|
|
4615
4615
|
)
|
|
4616
4616
|
},
|
|
4617
4617
|
props.label && /* @__PURE__ */ React36.createElement(
|
|
@@ -4624,7 +4624,7 @@ var Input = ({
|
|
|
4624
4624
|
},
|
|
4625
4625
|
props.label
|
|
4626
4626
|
),
|
|
4627
|
-
props.isLoading ? /* @__PURE__ */ React36.createElement(Skeleton, { className: "hawa-h-[40px] hawa-w-full" }) : /* @__PURE__ */ React36.createElement(React36.Fragment, null, /* @__PURE__ */ React36.createElement(
|
|
4627
|
+
props.isLoading ? /* @__PURE__ */ React36.createElement("div", { className: "hawa-pb-2" }, /* @__PURE__ */ React36.createElement(Skeleton, { className: "hawa-h-[40px] hawa-w-full" })) : /* @__PURE__ */ React36.createElement(React36.Fragment, null, /* @__PURE__ */ React36.createElement(
|
|
4628
4628
|
"div",
|
|
4629
4629
|
{
|
|
4630
4630
|
className: cn(
|
|
@@ -5757,12 +5757,12 @@ var Combobox = ({
|
|
|
5757
5757
|
"div",
|
|
5758
5758
|
{
|
|
5759
5759
|
className: cn(
|
|
5760
|
-
"hawa-flex hawa-flex-col hawa-gap-2 hawa-relative",
|
|
5760
|
+
"hawa-flex hawa-flex-col hawa-gap-2 hawa-relative hawa-h-fit",
|
|
5761
5761
|
props.width === "fit" ? "hawa-w-fit" : "hawa-w-full"
|
|
5762
5762
|
)
|
|
5763
5763
|
},
|
|
5764
5764
|
props.label && /* @__PURE__ */ React47.createElement(Label2, null, props.label),
|
|
5765
|
-
/* @__PURE__ */ React47.createElement(PopoverPrimitive2.Root, { open, onOpenChange: setOpen }, /* @__PURE__ */ React47.createElement(PopoverTrigger, { disabled: props.isLoading || props.preview }, props.isLoading ? /* @__PURE__ */ React47.createElement(Skeleton, { className: "hawa-h-[40px] hawa-w-full" }) : /* @__PURE__ */ React47.createElement("div",
|
|
5765
|
+
/* @__PURE__ */ React47.createElement(PopoverPrimitive2.Root, { open, onOpenChange: setOpen }, /* @__PURE__ */ React47.createElement(PopoverTrigger, { disabled: props.isLoading || props.preview }, props.isLoading ? /* @__PURE__ */ React47.createElement("div", { className: "hawa-pb-2" }, /* @__PURE__ */ React47.createElement(Skeleton, { className: "hawa-h-[40px] hawa-w-full" })) : /* @__PURE__ */ React47.createElement("div", { className: "hawa-flex hawa-flex-col hawa-gap-2 " }, /* @__PURE__ */ React47.createElement(
|
|
5766
5766
|
"div",
|
|
5767
5767
|
{
|
|
5768
5768
|
className: cn(
|
|
@@ -5801,7 +5801,16 @@ var Combobox = ({
|
|
|
5801
5801
|
},
|
|
5802
5802
|
/* @__PURE__ */ React47.createElement("path", { d: "m6 9 6 6 6-6" })
|
|
5803
5803
|
)
|
|
5804
|
-
)
|
|
5804
|
+
), /* @__PURE__ */ React47.createElement(
|
|
5805
|
+
"p",
|
|
5806
|
+
{
|
|
5807
|
+
className: cn(
|
|
5808
|
+
"hawa-my-0 hawa-text-xs hawa-text-helper-color hawa-transition-all",
|
|
5809
|
+
props.helperText ? "hawa-opacity-100 hawa-h-4" : "hawa-opacity-0 hawa-h-0"
|
|
5810
|
+
)
|
|
5811
|
+
},
|
|
5812
|
+
props.helperText
|
|
5813
|
+
), " ")), /* @__PURE__ */ React47.createElement(PopoverContent, { className: cn("popover-w-parent") }, /* @__PURE__ */ React47.createElement(Command, null, !props.hideInput && /* @__PURE__ */ React47.createElement(CommandInput, { placeholder: props.searchPlaceholder }), /* @__PURE__ */ React47.createElement(CommandEmpty, null, "No framework found."), /* @__PURE__ */ React47.createElement(CommandGroup, { className: " hawa-max-h-[200px] hawa-overflow-y-auto" }, data.map((item) => /* @__PURE__ */ React47.createElement(
|
|
5805
5814
|
CommandItem,
|
|
5806
5815
|
{
|
|
5807
5816
|
key: getProperty(item, valueKey),
|
|
@@ -5836,17 +5845,7 @@ var Combobox = ({
|
|
|
5836
5845
|
/* @__PURE__ */ React47.createElement("polyline", { points: "20 6 9 17 4 12" })
|
|
5837
5846
|
),
|
|
5838
5847
|
getProperty(item, labelKey)
|
|
5839
|
-
))))))
|
|
5840
|
-
/* @__PURE__ */ React47.createElement(
|
|
5841
|
-
"p",
|
|
5842
|
-
{
|
|
5843
|
-
className: cn(
|
|
5844
|
-
"hawa-my-0 hawa-text-xs hawa-text-helper-color hawa-transition-all",
|
|
5845
|
-
props.helperText && !props.isLoading ? "hawa-opacity-100 hawa-h-4" : "hawa-opacity-0 hawa-h-0"
|
|
5846
|
-
)
|
|
5847
|
-
},
|
|
5848
|
-
props.helperText
|
|
5849
|
-
)
|
|
5848
|
+
))))))
|
|
5850
5849
|
);
|
|
5851
5850
|
};
|
|
5852
5851
|
|
|
@@ -7624,7 +7623,7 @@ var CodeConfirmation = (props) => {
|
|
|
7624
7623
|
};
|
|
7625
7624
|
|
|
7626
7625
|
// components/blocks/feedback/UserReferralSource.tsx
|
|
7627
|
-
import React64, {
|
|
7626
|
+
import React64, { useRef as useRef8, useState as useState25 } from "react";
|
|
7628
7627
|
import { Controller as Controller6, useForm as useForm6 } from "react-hook-form";
|
|
7629
7628
|
import { zodResolver as zodResolver6 } from "@hookform/resolvers/zod";
|
|
7630
7629
|
import * as z6 from "zod";
|
|
@@ -7634,7 +7633,6 @@ var UserReferralSource = ({
|
|
|
7634
7633
|
...props
|
|
7635
7634
|
}) => {
|
|
7636
7635
|
const [closed, setClosed] = useState25(false);
|
|
7637
|
-
const [closingTimer, setClosingTimer] = useState25(5);
|
|
7638
7636
|
const popUpRef = useRef8(null);
|
|
7639
7637
|
const formSchema = z6.object({
|
|
7640
7638
|
source: z6.string({ required_error: props.texts?.pleaseSelectOption }),
|
|
@@ -7647,106 +7645,116 @@ var UserReferralSource = ({
|
|
|
7647
7645
|
"bottom-right": "hawa-right-4",
|
|
7648
7646
|
"bottom-left": "hawa-left-4"
|
|
7649
7647
|
};
|
|
7650
|
-
useEffect15(() => {
|
|
7651
|
-
const timeoutHide = setTimeout(() => {
|
|
7652
|
-
if (closingTimer >= 0) {
|
|
7653
|
-
setClosingTimer(closingTimer - 1);
|
|
7654
|
-
}
|
|
7655
|
-
}, 1e3);
|
|
7656
|
-
return () => {
|
|
7657
|
-
clearTimeout(timeoutHide);
|
|
7658
|
-
};
|
|
7659
|
-
}, [closingTimer]);
|
|
7660
|
-
const slowClose = () => {
|
|
7661
|
-
setClosed(true);
|
|
7662
|
-
setTimeout(() => {
|
|
7663
|
-
if (popUpRef.current) {
|
|
7664
|
-
popUpRef.current.removeChild(popUpRef.current.children[0]);
|
|
7665
|
-
}
|
|
7666
|
-
}, 200);
|
|
7667
|
-
};
|
|
7668
7648
|
return /* @__PURE__ */ React64.createElement(
|
|
7669
|
-
|
|
7649
|
+
"div",
|
|
7670
7650
|
{
|
|
7671
|
-
ref: popUpRef,
|
|
7672
7651
|
className: cn(
|
|
7673
|
-
"hawa-
|
|
7674
|
-
|
|
7652
|
+
"hawa-transition-all",
|
|
7653
|
+
closed ? "hawa-opacity-0" : "hawa-opacity-100"
|
|
7675
7654
|
),
|
|
7676
|
-
|
|
7655
|
+
ref: popUpRef
|
|
7677
7656
|
},
|
|
7678
7657
|
/* @__PURE__ */ React64.createElement(
|
|
7679
|
-
|
|
7658
|
+
Card,
|
|
7680
7659
|
{
|
|
7681
|
-
type: "button",
|
|
7682
7660
|
className: cn(
|
|
7683
|
-
|
|
7684
|
-
|
|
7661
|
+
"hawa-fixed hawa-bottom-4 hawa-p-0 ",
|
|
7662
|
+
boxPosition[position]
|
|
7685
7663
|
),
|
|
7686
|
-
|
|
7687
|
-
"aria-label": "Close",
|
|
7688
|
-
onClick: () => slowClose()
|
|
7664
|
+
dir: props.direction
|
|
7689
7665
|
},
|
|
7690
7666
|
/* @__PURE__ */ React64.createElement(
|
|
7691
|
-
"
|
|
7667
|
+
"button",
|
|
7692
7668
|
{
|
|
7693
|
-
|
|
7694
|
-
className:
|
|
7695
|
-
|
|
7696
|
-
|
|
7669
|
+
type: "button",
|
|
7670
|
+
className: cn(
|
|
7671
|
+
props.direction === "rtl" ? "hawa-left-2" : "hawa-right-2",
|
|
7672
|
+
"hawa-absolute hawa-top-2 hawa-inline-flex hawa-h-8 hawa-w-8 hawa-rounded hawa-p-1.5 hawa-text-gray-400 hawa-transition-all hover:hawa-bg-gray-100 hover:hawa-text-gray-900 focus:hawa-ring-2 focus:hawa-ring-gray-300 dark:hawa-bg-gray-800 dark:hawa-text-gray-500 dark:hover:hawa-bg-gray-700 dark:hover:hawa-text-white"
|
|
7673
|
+
),
|
|
7674
|
+
"data-dismiss-target": "#toast-default",
|
|
7675
|
+
"aria-label": "Close",
|
|
7676
|
+
onClick: () => {
|
|
7677
|
+
setClosed(true);
|
|
7678
|
+
setTimeout(() => {
|
|
7679
|
+
if (popUpRef?.current) {
|
|
7680
|
+
popUpRef?.current.removeChild(popUpRef?.current.children[0]);
|
|
7681
|
+
}
|
|
7682
|
+
}, 200);
|
|
7683
|
+
}
|
|
7697
7684
|
},
|
|
7698
7685
|
/* @__PURE__ */ React64.createElement(
|
|
7699
|
-
"
|
|
7686
|
+
"svg",
|
|
7700
7687
|
{
|
|
7701
|
-
|
|
7702
|
-
|
|
7703
|
-
|
|
7704
|
-
|
|
7705
|
-
|
|
7706
|
-
|
|
7707
|
-
|
|
7708
|
-
/* @__PURE__ */ React64.createElement(CardContent, { headless: true }, /* @__PURE__ */ React64.createElement("form", { onSubmit: handleSubmit((e) => console.log("e is ", e)) }, /* @__PURE__ */ React64.createElement(
|
|
7709
|
-
"div",
|
|
7710
|
-
{
|
|
7711
|
-
className: cn(
|
|
7712
|
-
"hawa-flex hawa-flex-col hawa-gap-4",
|
|
7713
|
-
closed ? "hawa-opacity-0" : "hawa-opacity-100"
|
|
7714
|
-
)
|
|
7715
|
-
},
|
|
7716
|
-
/* @__PURE__ */ React64.createElement("div", { className: "hawa-mt-4 hawa-font-bold" }, props.question),
|
|
7717
|
-
/* @__PURE__ */ React64.createElement("div", { className: "hawa-flex hawa-w-full hawa-flex-row hawa-gap-1 hawa-rounded " }, /* @__PURE__ */ React64.createElement(
|
|
7718
|
-
Controller6,
|
|
7719
|
-
{
|
|
7720
|
-
control,
|
|
7721
|
-
name: "source",
|
|
7722
|
-
render: ({ field }) => /* @__PURE__ */ React64.createElement(
|
|
7723
|
-
Radio,
|
|
7688
|
+
"aria-hidden": "true",
|
|
7689
|
+
className: "hawa-h-5 hawa-w-5",
|
|
7690
|
+
fill: "currentColor",
|
|
7691
|
+
viewBox: "0 0 20 20"
|
|
7692
|
+
},
|
|
7693
|
+
/* @__PURE__ */ React64.createElement(
|
|
7694
|
+
"path",
|
|
7724
7695
|
{
|
|
7725
|
-
|
|
7726
|
-
|
|
7727
|
-
|
|
7728
|
-
defaultValue: field.value,
|
|
7729
|
-
onChangeTab: (e) => field.onChange(e),
|
|
7730
|
-
helperText: formState.errors.source?.message?.toString()
|
|
7696
|
+
fillRule: "evenodd",
|
|
7697
|
+
d: "M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z",
|
|
7698
|
+
clipRule: "evenodd"
|
|
7731
7699
|
}
|
|
7732
7700
|
)
|
|
7733
|
-
|
|
7734
|
-
)
|
|
7735
|
-
/* @__PURE__ */ React64.createElement(
|
|
7736
|
-
|
|
7701
|
+
)
|
|
7702
|
+
),
|
|
7703
|
+
/* @__PURE__ */ React64.createElement(CardContent, { headless: true }, /* @__PURE__ */ React64.createElement(
|
|
7704
|
+
"form",
|
|
7737
7705
|
{
|
|
7738
|
-
|
|
7739
|
-
|
|
7740
|
-
|
|
7741
|
-
|
|
7706
|
+
onSubmit: handleSubmit((e) => {
|
|
7707
|
+
if (props.onSubmitForm) {
|
|
7708
|
+
props.onSubmitForm(e);
|
|
7709
|
+
}
|
|
7710
|
+
console.log("onSubmitForm was not provided");
|
|
7711
|
+
})
|
|
7712
|
+
},
|
|
7713
|
+
/* @__PURE__ */ React64.createElement(
|
|
7714
|
+
"div",
|
|
7715
|
+
{
|
|
7716
|
+
className: cn(
|
|
7717
|
+
"hawa-flex hawa-flex-col hawa-gap-4 hawa-transition-all",
|
|
7718
|
+
closed ? "hawa-opacity-0" : "hawa-opacity-100"
|
|
7719
|
+
)
|
|
7720
|
+
},
|
|
7721
|
+
/* @__PURE__ */ React64.createElement("div", { className: "hawa-mt-4 hawa-font-bold" }, props.question),
|
|
7722
|
+
/* @__PURE__ */ React64.createElement("div", { className: "hawa-flex hawa-w-full hawa-flex-row hawa-gap-1 hawa-rounded " }, /* @__PURE__ */ React64.createElement(
|
|
7723
|
+
Controller6,
|
|
7742
7724
|
{
|
|
7743
|
-
|
|
7744
|
-
|
|
7725
|
+
control,
|
|
7726
|
+
name: "source",
|
|
7727
|
+
render: ({ field }) => /* @__PURE__ */ React64.createElement(
|
|
7728
|
+
Radio,
|
|
7729
|
+
{
|
|
7730
|
+
direction: props.direction,
|
|
7731
|
+
orientation: "vertical",
|
|
7732
|
+
options,
|
|
7733
|
+
defaultValue: field.value,
|
|
7734
|
+
onChangeTab: (e) => field.onChange(e),
|
|
7735
|
+
helperText: formState.errors.source?.message?.toString()
|
|
7736
|
+
}
|
|
7737
|
+
)
|
|
7745
7738
|
}
|
|
7746
|
-
)
|
|
7747
|
-
|
|
7739
|
+
)),
|
|
7740
|
+
/* @__PURE__ */ React64.createElement("div", null, /* @__PURE__ */ React64.createElement(
|
|
7741
|
+
Controller6,
|
|
7742
|
+
{
|
|
7743
|
+
control,
|
|
7744
|
+
name: "feedback",
|
|
7745
|
+
render: ({ field }) => /* @__PURE__ */ React64.createElement(
|
|
7746
|
+
Textarea,
|
|
7747
|
+
{
|
|
7748
|
+
...field,
|
|
7749
|
+
helperText: formState.errors.feedback?.message?.toString()
|
|
7750
|
+
}
|
|
7751
|
+
)
|
|
7752
|
+
}
|
|
7753
|
+
))
|
|
7754
|
+
),
|
|
7755
|
+
/* @__PURE__ */ React64.createElement(Button, { type: "submit", className: "hawa-mt-4 hawa-w-full" }, props.texts?.submit || "Submit")
|
|
7748
7756
|
))
|
|
7749
|
-
)
|
|
7757
|
+
)
|
|
7750
7758
|
);
|
|
7751
7759
|
};
|
|
7752
7760
|
|