@sikka/hawa 0.31.6-next → 0.31.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/{Chip-hr2gRBJ-.d.mts → Chip-BT2hUlGJ.d.mts} +1 -1
- package/dist/{Chip-H5BnuDdx.d.ts → Chip-Dt7zJ-jZ.d.ts} +1 -1
- package/dist/{DropdownMenu-p-Ha-y2R.d.ts → DropdownMenu-CJblb-9q.d.ts} +1 -1
- package/dist/{DropdownMenu-o_-MnT5h.d.mts → DropdownMenu-K3ztliYc.d.mts} +1 -1
- package/dist/{Radio-3B8RZYJA.d.ts → Radio-B-DG0FMr.d.ts} +1 -1
- package/dist/{Radio-L369ID7b.d.mts → Radio-D52-m4Ns.d.mts} +1 -1
- package/dist/{Toast-ySvjL_-K.d.mts → Toast-BcFD9aeQ.d.mts} +1 -1
- package/dist/{Toast-YaClwi7z.d.ts → Toast-fy9tBz19.d.ts} +1 -1
- package/dist/accordion/index.d.mts +1 -1
- package/dist/accordion/index.d.ts +1 -1
- package/dist/alert/index.d.mts +1 -1
- package/dist/alert/index.d.ts +1 -1
- package/dist/appTopbar/index.d.mts +1 -1
- package/dist/appTopbar/index.d.ts +1 -1
- package/dist/blocks/auth/index.d.mts +1 -1
- package/dist/blocks/auth/index.d.ts +1 -1
- package/dist/blocks/auth/index.js +92 -92
- package/dist/blocks/auth/index.mjs +18 -18
- package/dist/blocks/feedback/index.d.mts +1 -1
- package/dist/blocks/feedback/index.d.ts +1 -1
- package/dist/blocks/index.d.mts +3 -3
- package/dist/blocks/index.d.ts +3 -3
- package/dist/blocks/index.js +328 -328
- package/dist/blocks/index.mjs +3 -2
- package/dist/blocks/misc/index.d.mts +1 -1
- package/dist/blocks/misc/index.d.ts +1 -1
- package/dist/blocks/pricing/index.d.mts +1 -1
- package/dist/blocks/pricing/index.d.ts +1 -1
- package/dist/carousel/index.d.mts +1 -1
- package/dist/carousel/index.d.ts +1 -1
- 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-NPD4FUIM.mjs → chunk-JXN2PVGT.mjs} +16 -17
- package/dist/dataTable/index.d.mts +1 -1
- package/dist/dataTable/index.d.ts +1 -1
- package/dist/destroyableCard/index.d.mts +1 -1
- package/dist/destroyableCard/index.d.ts +1 -1
- package/dist/dialog/index.d.mts +1 -1
- package/dist/dialog/index.d.ts +1 -1
- package/dist/docsLayout/index.d.mts +1 -1
- package/dist/docsLayout/index.d.ts +1 -1
- package/dist/docsSidebar/index.d.mts +1 -1
- package/dist/docsSidebar/index.d.ts +1 -1
- package/dist/elements/index.d.mts +9 -8
- package/dist/elements/index.d.ts +9 -8
- package/dist/elements/index.js +15 -16
- package/dist/elements/index.mjs +1 -1
- package/dist/hooks/index.d.mts +2 -2
- package/dist/hooks/index.d.ts +2 -2
- package/dist/index.d.mts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +277 -277
- package/dist/index.mjs +18 -18
- package/dist/interfaceSettings/index.d.mts +1 -1
- package/dist/interfaceSettings/index.d.ts +1 -1
- package/dist/label/index.d.mts +1 -1
- package/dist/label/index.d.ts +1 -1
- package/dist/layout/index.d.mts +3 -3
- package/dist/layout/index.d.ts +3 -3
- package/dist/navigationMenu/index.d.mts +1 -1
- package/dist/navigationMenu/index.d.ts +1 -1
- package/dist/pagination/index.d.mts +1 -1
- package/dist/pagination/index.d.ts +1 -1
- package/dist/phoneInput/index.d.mts +2 -1
- package/dist/phoneInput/index.d.ts +2 -1
- package/dist/phoneInput/index.js +15 -16
- package/dist/phoneInput/index.js.map +1 -1
- package/dist/phoneInput/index.mjs +16 -17
- package/dist/phoneInput/index.mjs.map +1 -1
- package/dist/popover/index.d.mts +1 -1
- package/dist/popover/index.d.ts +1 -1
- package/dist/progress/index.d.mts +1 -1
- package/dist/progress/index.d.ts +1 -1
- package/dist/radio/index.d.mts +1 -1
- package/dist/radio/index.d.ts +1 -1
- package/dist/scrollArea/index.d.mts +1 -1
- package/dist/scrollArea/index.d.ts +1 -1
- package/dist/select/index.d.mts +1 -1
- package/dist/select/index.d.ts +1 -1
- package/dist/separator/index.d.mts +1 -1
- package/dist/separator/index.d.ts +1 -1
- package/dist/sidebar/index.d.mts +1 -1
- package/dist/sidebar/index.d.ts +1 -1
- package/dist/signature/index.d.mts +1 -1
- package/dist/signature/index.d.ts +1 -1
- package/dist/simpleTable/index.d.mts +1 -1
- package/dist/simpleTable/index.d.ts +1 -1
- package/dist/sonner/index.d.mts +1 -1
- package/dist/sonner/index.d.ts +1 -1
- package/dist/switch/index.d.mts +1 -1
- package/dist/switch/index.d.ts +1 -1
- package/dist/tabs/index.d.mts +1 -1
- package/dist/tabs/index.d.ts +1 -1
- package/dist/textarea/index.d.mts +1 -1
- package/dist/textarea/index.d.ts +1 -1
- package/dist/toast/index.d.mts +1 -1
- package/dist/toast/index.d.ts +1 -1
- package/dist/toaster/index.d.mts +1 -1
- package/dist/toaster/index.d.ts +1 -1
- package/dist/tooltip/index.d.mts +1 -1
- package/dist/tooltip/index.d.ts +1 -1
- package/dist/types/index.d.mts +2 -2
- package/dist/types/index.d.ts +2 -2
- package/package.json +1 -1
- /package/dist/{commonTypes-2IGtJ5cq.d.mts → commonTypes-BIZhOigS.d.mts} +0 -0
- /package/dist/{commonTypes-2IGtJ5cq.d.ts → commonTypes-BIZhOigS.d.ts} +0 -0
- /package/dist/{commonTypes-_11epZYh.d.mts → commonTypes-BtF87PmG.d.mts} +0 -0
- /package/dist/{commonTypes-_11epZYh.d.ts → commonTypes-BtF87PmG.d.ts} +0 -0
- /package/dist/{commonTypes-CKtkuNFH.d.mts → commonTypes-C-g8nFFC.d.mts} +0 -0
- /package/dist/{commonTypes-CKtkuNFH.d.ts → commonTypes-C-g8nFFC.d.ts} +0 -0
- /package/dist/{commonTypes-WPhcN3Vr.d.mts → commonTypes-C0OLP6TN.d.mts} +0 -0
- /package/dist/{commonTypes-WPhcN3Vr.d.ts → commonTypes-C0OLP6TN.d.ts} +0 -0
- /package/dist/{commonTypes-eIwARo5g.d.mts → commonTypes-CMqMLkhN.d.mts} +0 -0
- /package/dist/{commonTypes-eIwARo5g.d.ts → commonTypes-CMqMLkhN.d.ts} +0 -0
- /package/dist/{commonTypes-ko_NGEoT.d.mts → commonTypes-ClC9C8Mh.d.mts} +0 -0
- /package/dist/{commonTypes-ko_NGEoT.d.ts → commonTypes-ClC9C8Mh.d.ts} +0 -0
- /package/dist/{commonTypes-2k6FnHw5.d.mts → commonTypes-D23Z4zYt.d.mts} +0 -0
- /package/dist/{commonTypes-2k6FnHw5.d.ts → commonTypes-D23Z4zYt.d.ts} +0 -0
- /package/dist/{commonTypes-LrR8QrYP.d.mts → commonTypes-D_7LV7Ri.d.mts} +0 -0
- /package/dist/{commonTypes-LrR8QrYP.d.ts → commonTypes-D_7LV7Ri.d.ts} +0 -0
- /package/dist/{commonTypes-GhKAraJw.d.mts → commonTypes-DinbCdmt.d.mts} +0 -0
- /package/dist/{commonTypes-GhKAraJw.d.ts → commonTypes-DinbCdmt.d.ts} +0 -0
- /package/dist/{commonTypes-52DloiYq.d.mts → commonTypes-TGqbHlp_.d.mts} +0 -0
- /package/dist/{commonTypes-52DloiYq.d.ts → commonTypes-TGqbHlp_.d.ts} +0 -0
- /package/dist/{textTypes-0bvyKoeH.d.mts → textTypes-DXLtO2fL.d.mts} +0 -0
- /package/dist/{textTypes-0bvyKoeH.d.ts → textTypes-DXLtO2fL.d.ts} +0 -0
@@ -798,6 +798,7 @@ var AuthButtons = (props) => {
|
|
798
798
|
|
799
799
|
// blocks/auth/LoginForm.tsx
|
800
800
|
var import_react13 = __toESM(require("react"));
|
801
|
+
var import_react14 = require("react");
|
801
802
|
var import_react_hook_form = require("react-hook-form");
|
802
803
|
var import_zod = require("@hookform/resolvers/zod");
|
803
804
|
var import_libphonenumber_js = require("libphonenumber-js");
|
@@ -3224,16 +3225,14 @@ var Select = ({
|
|
3224
3225
|
};
|
3225
3226
|
|
3226
3227
|
// elements/phoneInput/PhoneInput.tsx
|
3227
|
-
var PhoneInput = ({
|
3228
|
+
var PhoneInput = ({
|
3229
|
+
labelProps,
|
3230
|
+
inputProps,
|
3231
|
+
...props
|
3232
|
+
}) => {
|
3228
3233
|
const [phoneNumber, setPhoneNumber] = (0, import_react9.useState)("");
|
3229
3234
|
const [countryCode, setCountryCode] = (0, import_react9.useState)(props.preferredCountry);
|
3230
3235
|
const inputRef = (0, import_react9.useRef)(null);
|
3231
|
-
(0, import_react9.useEffect)(() => {
|
3232
|
-
var _a;
|
3233
|
-
if (inputRef.current) {
|
3234
|
-
(_a = inputRef.current) == null ? void 0 : _a.focus();
|
3235
|
-
}
|
3236
|
-
}, []);
|
3237
3236
|
const handleInputChange = (e) => {
|
3238
3237
|
const validChars = /^[0-9-()]+$/;
|
3239
3238
|
const input = e.target.value;
|
@@ -3249,31 +3248,32 @@ var PhoneInput = ({ labelProps, ...props }) => {
|
|
3249
3248
|
return /* @__PURE__ */ import_react9.default.createElement("div", { className: "hawa-flex hawa-h-fit hawa-w-full hawa-flex-col hawa-gap-2" }, props.label && /* @__PURE__ */ import_react9.default.createElement(Label, { ...labelProps }, props.label), /* @__PURE__ */ import_react9.default.createElement("div", { dir: "ltr", className: "hawa-flex hawa-w-full hawa-flex-row" }, /* @__PURE__ */ import_react9.default.createElement(
|
3250
3249
|
Select,
|
3251
3250
|
{
|
3251
|
+
phoneCode: true,
|
3252
3252
|
width: "fit",
|
3253
3253
|
hideHelperText: true,
|
3254
|
-
phoneCode: true,
|
3255
3254
|
hideIndicator: true,
|
3256
|
-
placeholder: "Code",
|
3257
|
-
options: countries_default,
|
3258
3255
|
isMulti: false,
|
3259
3256
|
isSearchable: true,
|
3260
3257
|
isClearable: false,
|
3261
|
-
|
3258
|
+
placeholder: "Code",
|
3259
|
+
options: countries_default,
|
3260
|
+
onChange: setCountryCode,
|
3262
3261
|
value: countryCode == null ? void 0 : countryCode.label,
|
3263
|
-
|
3262
|
+
defaultValue: props.preferredCountry
|
3264
3263
|
}
|
3265
3264
|
), /* @__PURE__ */ import_react9.default.createElement("div", { className: "hawa-relative hawa-flex hawa-h-fit hawa-w-full hawa-flex-col hawa-justify-center hawa-gap-0" }, /* @__PURE__ */ import_react9.default.createElement(
|
3266
3265
|
"input",
|
3267
3266
|
{
|
3267
|
+
type: "tel",
|
3268
3268
|
ref: inputRef,
|
3269
3269
|
id: "phone-number",
|
3270
|
+
value: phoneNumber,
|
3271
|
+
onChange: handleInputChange,
|
3272
|
+
placeholder: props.placeholder,
|
3270
3273
|
className: cn(
|
3271
3274
|
"hawa-block hawa-h-[40px] hawa-w-full hawa-rounded hawa-rounded-l-none hawa-border hawa-border-l-0 hawa-border-l-transparent hawa-bg-background hawa-p-2 hawa-text-sm hawa-transition-all"
|
3272
3275
|
),
|
3273
|
-
|
3274
|
-
value: phoneNumber,
|
3275
|
-
type: "tel",
|
3276
|
-
placeholder: props.placeholder
|
3276
|
+
...inputProps
|
3277
3277
|
}
|
3278
3278
|
))), /* @__PURE__ */ import_react9.default.createElement(
|
3279
3279
|
"p",
|
@@ -3334,7 +3334,7 @@ var LoginForm = ({
|
|
3334
3334
|
...props
|
3335
3335
|
}) => {
|
3336
3336
|
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q;
|
3337
|
-
const [passwordVisible, setPasswordVisible] = (0,
|
3337
|
+
const [passwordVisible, setPasswordVisible] = (0, import_react14.useState)(false);
|
3338
3338
|
const thirdPartyAuthTexts = {
|
3339
3339
|
continueWithGoogle: texts == null ? void 0 : texts.continueWithGoogle,
|
3340
3340
|
continueWithTwitter: texts == null ? void 0 : texts.continueWithTwitter,
|
@@ -3639,7 +3639,7 @@ var LoginForm = ({
|
|
3639
3639
|
};
|
3640
3640
|
|
3641
3641
|
// blocks/auth/RegisterForm.tsx
|
3642
|
-
var
|
3642
|
+
var import_react16 = __toESM(require("react"));
|
3643
3643
|
var import_react_hook_form2 = require("react-hook-form");
|
3644
3644
|
var import_zod2 = require("@hookform/resolvers/zod");
|
3645
3645
|
var z2 = __toESM(require("zod"));
|
@@ -3781,12 +3781,12 @@ var CheckboxElement = React17.forwardRef(({ radius = "inherit", size = "default"
|
|
3781
3781
|
CheckboxElement.displayName = CheckboxPrimitive.Root.displayName;
|
3782
3782
|
|
3783
3783
|
// elements/stopPropagationWrapper/StopPropagationWrapper.tsx
|
3784
|
-
var
|
3784
|
+
var import_react15 = __toESM(require("react"));
|
3785
3785
|
var StopPropagationWrapper = (props) => {
|
3786
3786
|
const handleClick = (e) => {
|
3787
3787
|
e.stopPropagation();
|
3788
3788
|
};
|
3789
|
-
return /* @__PURE__ */
|
3789
|
+
return /* @__PURE__ */ import_react15.default.createElement("div", { onClick: handleClick }, props.children);
|
3790
3790
|
};
|
3791
3791
|
|
3792
3792
|
// blocks/auth/RegisterForm.tsx
|
@@ -3798,7 +3798,7 @@ var RegisterForm = ({
|
|
3798
3798
|
...props
|
3799
3799
|
}) => {
|
3800
3800
|
var _a, _b, _c, _d, _e, _f, _g, _h;
|
3801
|
-
const [passwordVisible, setPasswordVisible] = (0,
|
3801
|
+
const [passwordVisible, setPasswordVisible] = (0, import_react16.useState)(false);
|
3802
3802
|
const thirdPartyAuthTexts = {
|
3803
3803
|
continueWithGoogle: texts == null ? void 0 : texts.continueWithGoogle,
|
3804
3804
|
continueWithTwitter: texts == null ? void 0 : texts.continueWithTwitter,
|
@@ -3865,7 +3865,7 @@ var RegisterForm = ({
|
|
3865
3865
|
const { handleSubmit, control, formState } = (0, import_react_hook_form2.useForm)({
|
3866
3866
|
resolver: (0, import_zod2.zodResolver)(formSchema)
|
3867
3867
|
});
|
3868
|
-
return /* @__PURE__ */
|
3868
|
+
return /* @__PURE__ */ import_react16.default.createElement(
|
3869
3869
|
"div",
|
3870
3870
|
{
|
3871
3871
|
className: cn(
|
@@ -3873,7 +3873,7 @@ var RegisterForm = ({
|
|
3873
3873
|
(_g = props.classNames) == null ? void 0 : _g.root
|
3874
3874
|
)
|
3875
3875
|
},
|
3876
|
-
/* @__PURE__ */
|
3876
|
+
/* @__PURE__ */ import_react16.default.createElement(
|
3877
3877
|
Card,
|
3878
3878
|
{
|
3879
3879
|
dir: props.direction,
|
@@ -3882,7 +3882,7 @@ var RegisterForm = ({
|
|
3882
3882
|
props.cardless && "hawa-border-none hawa-bg-transparent !hawa-shadow-none !hawa-drop-shadow-none"
|
3883
3883
|
)
|
3884
3884
|
},
|
3885
|
-
/* @__PURE__ */
|
3885
|
+
/* @__PURE__ */ import_react16.default.createElement(CardContent, { headless: true, noPadding: props.cardless }, /* @__PURE__ */ import_react16.default.createElement("div", null, props.showError && /* @__PURE__ */ import_react16.default.createElement(
|
3886
3886
|
Alert,
|
3887
3887
|
{
|
3888
3888
|
direction: props.direction,
|
@@ -3895,7 +3895,7 @@ var RegisterForm = ({
|
|
3895
3895
|
}
|
3896
3896
|
}
|
3897
3897
|
}
|
3898
|
-
), /* @__PURE__ */
|
3898
|
+
), /* @__PURE__ */ import_react16.default.createElement(import_react_hook_form2.FormProvider, { ...methods }, /* @__PURE__ */ import_react16.default.createElement(
|
3899
3899
|
"form",
|
3900
3900
|
{
|
3901
3901
|
noValidate: true,
|
@@ -3910,9 +3910,9 @@ var RegisterForm = ({
|
|
3910
3910
|
}),
|
3911
3911
|
className: "hawa-flex hawa-flex-col hawa-gap-4"
|
3912
3912
|
},
|
3913
|
-
/* @__PURE__ */
|
3913
|
+
/* @__PURE__ */ import_react16.default.createElement("div", { className: "hawa-flex hawa-flex-col hawa-gap-4" }, registerFields.map((fld, i) => {
|
3914
3914
|
if (fld === "fullname") {
|
3915
|
-
return /* @__PURE__ */
|
3915
|
+
return /* @__PURE__ */ import_react16.default.createElement(
|
3916
3916
|
import_react_hook_form2.Controller,
|
3917
3917
|
{
|
3918
3918
|
key: i,
|
@@ -3920,7 +3920,7 @@ var RegisterForm = ({
|
|
3920
3920
|
name: "fullName",
|
3921
3921
|
render: ({ field }) => {
|
3922
3922
|
var _a2, _b2, _c2;
|
3923
|
-
return /* @__PURE__ */
|
3923
|
+
return /* @__PURE__ */ import_react16.default.createElement(
|
3924
3924
|
Input,
|
3925
3925
|
{
|
3926
3926
|
width: "full",
|
@@ -3935,7 +3935,7 @@ var RegisterForm = ({
|
|
3935
3935
|
);
|
3936
3936
|
}
|
3937
3937
|
if (fld === "email") {
|
3938
|
-
return /* @__PURE__ */
|
3938
|
+
return /* @__PURE__ */ import_react16.default.createElement(
|
3939
3939
|
import_react_hook_form2.Controller,
|
3940
3940
|
{
|
3941
3941
|
key: i,
|
@@ -3943,7 +3943,7 @@ var RegisterForm = ({
|
|
3943
3943
|
name: "email",
|
3944
3944
|
render: ({ field }) => {
|
3945
3945
|
var _a2, _b2, _c2;
|
3946
|
-
return /* @__PURE__ */
|
3946
|
+
return /* @__PURE__ */ import_react16.default.createElement(
|
3947
3947
|
Input,
|
3948
3948
|
{
|
3949
3949
|
dir: "ltr",
|
@@ -3963,7 +3963,7 @@ var RegisterForm = ({
|
|
3963
3963
|
);
|
3964
3964
|
}
|
3965
3965
|
if (fld === "username") {
|
3966
|
-
return /* @__PURE__ */
|
3966
|
+
return /* @__PURE__ */ import_react16.default.createElement(
|
3967
3967
|
import_react_hook_form2.Controller,
|
3968
3968
|
{
|
3969
3969
|
key: i,
|
@@ -3971,7 +3971,7 @@ var RegisterForm = ({
|
|
3971
3971
|
name: "username",
|
3972
3972
|
render: ({ field }) => {
|
3973
3973
|
var _a2, _b2, _c2, _d2;
|
3974
|
-
return /* @__PURE__ */
|
3974
|
+
return /* @__PURE__ */ import_react16.default.createElement(
|
3975
3975
|
Input,
|
3976
3976
|
{
|
3977
3977
|
width: "full",
|
@@ -3990,25 +3990,25 @@ var RegisterForm = ({
|
|
3990
3990
|
);
|
3991
3991
|
}
|
3992
3992
|
})),
|
3993
|
-
/* @__PURE__ */
|
3993
|
+
/* @__PURE__ */ import_react16.default.createElement(
|
3994
3994
|
import_react_hook_form2.Controller,
|
3995
3995
|
{
|
3996
3996
|
control,
|
3997
3997
|
name: "password",
|
3998
3998
|
render: ({ field }) => {
|
3999
3999
|
var _a2, _b2, _c2;
|
4000
|
-
return /* @__PURE__ */
|
4000
|
+
return /* @__PURE__ */ import_react16.default.createElement(
|
4001
4001
|
Input,
|
4002
4002
|
{
|
4003
4003
|
width: "full",
|
4004
4004
|
type: passwordVisible ? "text" : "password",
|
4005
|
-
endIcon: /* @__PURE__ */
|
4005
|
+
endIcon: /* @__PURE__ */ import_react16.default.createElement(
|
4006
4006
|
"div",
|
4007
4007
|
{
|
4008
4008
|
className: "hawa-cursor-pointer",
|
4009
4009
|
onClick: () => setPasswordVisible(!passwordVisible)
|
4010
4010
|
},
|
4011
|
-
passwordVisible ? /* @__PURE__ */
|
4011
|
+
passwordVisible ? /* @__PURE__ */ import_react16.default.createElement(EyeIcon, { className: "hawa-text-gray-500" }) : /* @__PURE__ */ import_react16.default.createElement(HiddenEyeIcon, { className: "hawa-text-gray-500" }),
|
4012
4012
|
" "
|
4013
4013
|
),
|
4014
4014
|
autoComplete: "new-password",
|
@@ -4021,14 +4021,14 @@ var RegisterForm = ({
|
|
4021
4021
|
}
|
4022
4022
|
}
|
4023
4023
|
),
|
4024
|
-
/* @__PURE__ */
|
4024
|
+
/* @__PURE__ */ import_react16.default.createElement(
|
4025
4025
|
import_react_hook_form2.Controller,
|
4026
4026
|
{
|
4027
4027
|
control,
|
4028
4028
|
name: "confirm_password",
|
4029
4029
|
render: ({ field }) => {
|
4030
4030
|
var _a2, _b2, _c2;
|
4031
|
-
return /* @__PURE__ */
|
4031
|
+
return /* @__PURE__ */ import_react16.default.createElement(
|
4032
4032
|
Input,
|
4033
4033
|
{
|
4034
4034
|
width: "full",
|
@@ -4044,14 +4044,14 @@ var RegisterForm = ({
|
|
4044
4044
|
}
|
4045
4045
|
),
|
4046
4046
|
props.additionalInputs,
|
4047
|
-
props.showRefCode && /* @__PURE__ */
|
4047
|
+
props.showRefCode && /* @__PURE__ */ import_react16.default.createElement(
|
4048
4048
|
import_react_hook_form2.Controller,
|
4049
4049
|
{
|
4050
4050
|
control,
|
4051
4051
|
name: "refCode",
|
4052
4052
|
render: ({ field }) => {
|
4053
4053
|
var _a2;
|
4054
|
-
return /* @__PURE__ */
|
4054
|
+
return /* @__PURE__ */ import_react16.default.createElement(
|
4055
4055
|
Input,
|
4056
4056
|
{
|
4057
4057
|
width: "full",
|
@@ -4064,14 +4064,14 @@ var RegisterForm = ({
|
|
4064
4064
|
}
|
4065
4065
|
}
|
4066
4066
|
),
|
4067
|
-
props.showUserSource && /* @__PURE__ */
|
4067
|
+
props.showUserSource && /* @__PURE__ */ import_react16.default.createElement(
|
4068
4068
|
import_react_hook_form2.Controller,
|
4069
4069
|
{
|
4070
4070
|
control,
|
4071
4071
|
name: "reference",
|
4072
4072
|
render: ({ field }) => {
|
4073
4073
|
var _a2, _b2;
|
4074
|
-
return /* @__PURE__ */
|
4074
|
+
return /* @__PURE__ */ import_react16.default.createElement(
|
4075
4075
|
Select,
|
4076
4076
|
{
|
4077
4077
|
label: ((_a2 = texts == null ? void 0 : texts.userReference) == null ? void 0 : _a2.label) || "How did you learn about us?",
|
@@ -4087,20 +4087,20 @@ var RegisterForm = ({
|
|
4087
4087
|
}
|
4088
4088
|
}
|
4089
4089
|
),
|
4090
|
-
showTermsOption || showNewsletterOption ? /* @__PURE__ */
|
4090
|
+
showTermsOption || showNewsletterOption ? /* @__PURE__ */ import_react16.default.createElement("div", { className: "hawa-flex hawa-flex-col hawa-gap-3 hawa-mb-2" }, showTermsOption && /* @__PURE__ */ import_react16.default.createElement(
|
4091
4091
|
import_react_hook_form2.Controller,
|
4092
4092
|
{
|
4093
4093
|
control,
|
4094
4094
|
name: "terms_accepted",
|
4095
4095
|
render: ({ field }) => {
|
4096
4096
|
var _a2, _b2;
|
4097
|
-
return /* @__PURE__ */
|
4097
|
+
return /* @__PURE__ */ import_react16.default.createElement(
|
4098
4098
|
Checkbox,
|
4099
4099
|
{
|
4100
4100
|
id: "terms_accepted",
|
4101
4101
|
helperText: (_b2 = (_a2 = formState.errors.terms_accepted) == null ? void 0 : _a2.message) == null ? void 0 : _b2.toString(),
|
4102
4102
|
onCheckedChange: (e) => field.onChange(e),
|
4103
|
-
label: /* @__PURE__ */
|
4103
|
+
label: /* @__PURE__ */ import_react16.default.createElement("div", { className: "hawa-flex hawa-flex-row hawa-gap-0.5 hawa-whitespace-nowrap hawa-flex-wrap" }, (texts == null ? void 0 : texts.iAcceptText) || "I accept the", " ", /* @__PURE__ */ import_react16.default.createElement(StopPropagationWrapper, null, /* @__PURE__ */ import_react16.default.createElement(
|
4104
4104
|
"span",
|
4105
4105
|
{
|
4106
4106
|
onClick: (e) => {
|
@@ -4117,12 +4117,12 @@ var RegisterForm = ({
|
|
4117
4117
|
);
|
4118
4118
|
}
|
4119
4119
|
}
|
4120
|
-
), showNewsletterOption && /* @__PURE__ */
|
4120
|
+
), showNewsletterOption && /* @__PURE__ */ import_react16.default.createElement(
|
4121
4121
|
import_react_hook_form2.Controller,
|
4122
4122
|
{
|
4123
4123
|
control,
|
4124
4124
|
name: "newsletter_accepted",
|
4125
|
-
render: ({ field }) => /* @__PURE__ */
|
4125
|
+
render: ({ field }) => /* @__PURE__ */ import_react16.default.createElement(
|
4126
4126
|
Checkbox,
|
4127
4127
|
{
|
4128
4128
|
id: "newsletter_accepted",
|
@@ -4132,7 +4132,7 @@ var RegisterForm = ({
|
|
4132
4132
|
)
|
4133
4133
|
}
|
4134
4134
|
)) : null,
|
4135
|
-
/* @__PURE__ */
|
4135
|
+
/* @__PURE__ */ import_react16.default.createElement(
|
4136
4136
|
Button,
|
4137
4137
|
{
|
4138
4138
|
className: " hawa-w-full",
|
@@ -4143,8 +4143,8 @@ var RegisterForm = ({
|
|
4143
4143
|
(texts == null ? void 0 : texts.registerText) || "Register"
|
4144
4144
|
),
|
4145
4145
|
props.additionalButtons
|
4146
|
-
)), props.onRouteToLogin && /* @__PURE__ */
|
4147
|
-
props.viaGithub || props.viaGoogle || props.viaTwitter ? /* @__PURE__ */
|
4146
|
+
)), props.onRouteToLogin && /* @__PURE__ */ import_react16.default.createElement("div", { className: "hawa-flex hawa-flex-row hawa-items-center hawa-justify-center hawa-gap-1 hawa-p-3 hawa-text-center hawa-text-sm hawa-font-normal dark:hawa-text-white" }, /* @__PURE__ */ import_react16.default.createElement("span", null, (texts == null ? void 0 : texts.existingUserText) || "Already have an account?"), /* @__PURE__ */ import_react16.default.createElement("span", { onClick: props.onRouteToLogin, className: "clickable-link" }, (texts == null ? void 0 : texts.loginText) || "Login")))),
|
4147
|
+
props.viaGithub || props.viaGoogle || props.viaTwitter ? /* @__PURE__ */ import_react16.default.createElement(
|
4148
4148
|
CardFooter,
|
4149
4149
|
{
|
4150
4150
|
noPadding: props.cardless,
|
@@ -4152,7 +4152,7 @@ var RegisterForm = ({
|
|
4152
4152
|
props.logosOnly ? "hawa-flex hawa-flex-row hawa-justify-center hawa-gap-2" : "hawa-grid hawa-grid-cols-1 hawa-gap-2"
|
4153
4153
|
)
|
4154
4154
|
},
|
4155
|
-
/* @__PURE__ */
|
4155
|
+
/* @__PURE__ */ import_react16.default.createElement(
|
4156
4156
|
AuthButtons,
|
4157
4157
|
{
|
4158
4158
|
texts: thirdPartyAuthTexts,
|
@@ -4173,7 +4173,7 @@ var RegisterForm = ({
|
|
4173
4173
|
};
|
4174
4174
|
|
4175
4175
|
// blocks/auth/AppLanding.tsx
|
4176
|
-
var
|
4176
|
+
var import_react17 = __toESM(require("react"));
|
4177
4177
|
var AppLanding = ({ texts, ...props }) => {
|
4178
4178
|
const thirdPartyAuthTexts = {
|
4179
4179
|
continueWithGoogle: texts == null ? void 0 : texts.continueWithGoogle,
|
@@ -4184,7 +4184,7 @@ var AppLanding = ({ texts, ...props }) => {
|
|
4184
4184
|
continueWithEmail: texts == null ? void 0 : texts.continueWithEmail,
|
4185
4185
|
continueWithPhone: texts == null ? void 0 : texts.continueWithPhone
|
4186
4186
|
};
|
4187
|
-
return /* @__PURE__ */
|
4187
|
+
return /* @__PURE__ */ import_react17.default.createElement("div", { dir: props.direction }, /* @__PURE__ */ import_react17.default.createElement(Card, null, /* @__PURE__ */ import_react17.default.createElement(CardContent, { headless: true, className: "hawa-flex hawa-flex-col hawa-gap-6" }, /* @__PURE__ */ import_react17.default.createElement(
|
4188
4188
|
AuthButtons,
|
4189
4189
|
{
|
4190
4190
|
texts: thirdPartyAuthTexts,
|
@@ -4203,7 +4203,7 @@ var AppLanding = ({ texts, ...props }) => {
|
|
4203
4203
|
handleEmail: props.handleEmail,
|
4204
4204
|
handlePhone: props.handlePhone
|
4205
4205
|
}
|
4206
|
-
), props.allowRegister && /* @__PURE__ */
|
4206
|
+
), props.allowRegister && /* @__PURE__ */ import_react17.default.createElement("div", { className: "hawa-p-3 hawa-text-center hawa-text-sm hawa-font-normal dark:hawa-text-gray-300" }, texts == null ? void 0 : texts.newUserText, " ", /* @__PURE__ */ import_react17.default.createElement(
|
4207
4207
|
"span",
|
4208
4208
|
{
|
4209
4209
|
onClick: props.handleRouteToRegister,
|
@@ -4214,9 +4214,9 @@ var AppLanding = ({ texts, ...props }) => {
|
|
4214
4214
|
};
|
4215
4215
|
|
4216
4216
|
// blocks/auth/CheckEmail.tsx
|
4217
|
-
var
|
4217
|
+
var import_react18 = __toESM(require("react"));
|
4218
4218
|
var CheckEmail = ({ texts, handleResend }) => {
|
4219
|
-
return /* @__PURE__ */
|
4219
|
+
return /* @__PURE__ */ import_react18.default.createElement(Card, null, /* @__PURE__ */ import_react18.default.createElement(CardContent, { headless: true }, /* @__PURE__ */ import_react18.default.createElement("div", { className: "hawa-flex hawa-flex-col hawa-items-center hawa-justify-center hawa-text-center" }, /* @__PURE__ */ import_react18.default.createElement("div", { className: "hawa-flex hawa-h-16 hawa-w-16 hawa-flex-col hawa-items-center hawa-justify-center hawa-rounded-3xl hawa-bg-primary hawa-text-6xl hawa-font-bold hawa-text-primary-foreground" }, /* @__PURE__ */ import_react18.default.createElement(
|
4220
4220
|
"svg",
|
4221
4221
|
{
|
4222
4222
|
stroke: "currentColor",
|
@@ -4229,13 +4229,13 @@ var CheckEmail = ({ texts, handleResend }) => {
|
|
4229
4229
|
width: "0.5em",
|
4230
4230
|
xmlns: "http://www.w3.org/2000/svg"
|
4231
4231
|
},
|
4232
|
-
/* @__PURE__ */
|
4233
|
-
/* @__PURE__ */
|
4234
|
-
)), /* @__PURE__ */
|
4232
|
+
/* @__PURE__ */ import_react18.default.createElement("path", { d: "M4 4h16c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2z" }),
|
4233
|
+
/* @__PURE__ */ import_react18.default.createElement("polyline", { points: "22,6 12,13 2,6" })
|
4234
|
+
)), /* @__PURE__ */ import_react18.default.createElement("div", { className: "hawa-m-2 hawa-text-xl hawa-font-bold" }, (texts == null ? void 0 : texts.checkEmail) || "Check your Email"), /* @__PURE__ */ import_react18.default.createElement("div", { className: "hawa-text-sm" }, (texts == null ? void 0 : texts.pleaseVerify) || "Thank you for signing up! To complete your registration, we've sent a verification email to the address you provided. Please check your inbox and follow the instructions in the email to activate your account."))), /* @__PURE__ */ import_react18.default.createElement(CardFooter, { className: "hawa-flex hawa-flex-col hawa-justify-center " }, /* @__PURE__ */ import_react18.default.createElement("span", { className: "clickable-link hawa-text-sm", onClick: handleResend }, (texts == null ? void 0 : texts.resendEmail) || "Resend Email")));
|
4235
4235
|
};
|
4236
4236
|
|
4237
4237
|
// blocks/auth/NewPassword.tsx
|
4238
|
-
var
|
4238
|
+
var import_react19 = __toESM(require("react"));
|
4239
4239
|
var import_react_hook_form3 = require("react-hook-form");
|
4240
4240
|
var import_zod3 = require("@hookform/resolvers/zod");
|
4241
4241
|
var z3 = __toESM(require("zod"));
|
@@ -4257,7 +4257,7 @@ var NewPasswordForm = ({
|
|
4257
4257
|
const { handleSubmit, control, formState } = (0, import_react_hook_form3.useForm)({
|
4258
4258
|
resolver: (0, import_zod3.zodResolver)(formSchema)
|
4259
4259
|
});
|
4260
|
-
return /* @__PURE__ */
|
4260
|
+
return /* @__PURE__ */ import_react19.default.createElement(Card, { dir: props.direction }, props.showSuccess ? /* @__PURE__ */ import_react19.default.createElement(CardContent, { headless: true }, /* @__PURE__ */ import_react19.default.createElement("div", { className: "hawa-text-center" }, texts == null ? void 0 : texts.passwordChanged)) : /* @__PURE__ */ import_react19.default.createElement(
|
4261
4261
|
"form",
|
4262
4262
|
{
|
4263
4263
|
noValidate: true,
|
@@ -4271,7 +4271,7 @@ var NewPasswordForm = ({
|
|
4271
4271
|
}
|
4272
4272
|
})
|
4273
4273
|
},
|
4274
|
-
/* @__PURE__ */
|
4274
|
+
/* @__PURE__ */ import_react19.default.createElement(CardContent, { headless: true, className: "hawa-flex hawa-flex-col" }, props.showError && /* @__PURE__ */ import_react19.default.createElement(
|
4275
4275
|
Alert,
|
4276
4276
|
{
|
4277
4277
|
direction: props.direction,
|
@@ -4279,14 +4279,14 @@ var NewPasswordForm = ({
|
|
4279
4279
|
text: props.errorText,
|
4280
4280
|
severity: "error"
|
4281
4281
|
}
|
4282
|
-
), /* @__PURE__ */
|
4282
|
+
), /* @__PURE__ */ import_react19.default.createElement("div", { className: "hawa-flex hawa-flex-col hawa-gap-4 hawa-mb-4" }, /* @__PURE__ */ import_react19.default.createElement(
|
4283
4283
|
import_react_hook_form3.Controller,
|
4284
4284
|
{
|
4285
4285
|
control,
|
4286
4286
|
name: "password",
|
4287
4287
|
render: ({ field }) => {
|
4288
4288
|
var _a2, _b2, _c2;
|
4289
|
-
return /* @__PURE__ */
|
4289
|
+
return /* @__PURE__ */ import_react19.default.createElement(
|
4290
4290
|
Input,
|
4291
4291
|
{
|
4292
4292
|
width: "full",
|
@@ -4300,14 +4300,14 @@ var NewPasswordForm = ({
|
|
4300
4300
|
);
|
4301
4301
|
}
|
4302
4302
|
}
|
4303
|
-
), /* @__PURE__ */
|
4303
|
+
), /* @__PURE__ */ import_react19.default.createElement(
|
4304
4304
|
import_react_hook_form3.Controller,
|
4305
4305
|
{
|
4306
4306
|
control,
|
4307
4307
|
name: "confirm_password",
|
4308
4308
|
render: ({ field }) => {
|
4309
4309
|
var _a2, _b2, _c2;
|
4310
|
-
return /* @__PURE__ */
|
4310
|
+
return /* @__PURE__ */ import_react19.default.createElement(
|
4311
4311
|
Input,
|
4312
4312
|
{
|
4313
4313
|
width: "full",
|
@@ -4321,7 +4321,7 @@ var NewPasswordForm = ({
|
|
4321
4321
|
);
|
4322
4322
|
}
|
4323
4323
|
}
|
4324
|
-
)), /* @__PURE__ */
|
4324
|
+
)), /* @__PURE__ */ import_react19.default.createElement(Button, { className: "hawa-w-full", type: "submit", isLoading }, texts == null ? void 0 : texts.updatePassword), props.allowRegister && /* @__PURE__ */ import_react19.default.createElement("div", { className: "hawa-mt-4 hawa-pb-0 hawa-text-center hawa-text-sm dark:hawa-text-gray-300" }, (_g = texts == null ? void 0 : texts.dontHaveAccount) != null ? _g : "Don't have an account? ", /* @__PURE__ */ import_react19.default.createElement(
|
4325
4325
|
"span",
|
4326
4326
|
{
|
4327
4327
|
className: "clickable-link",
|
@@ -4333,7 +4333,7 @@ var NewPasswordForm = ({
|
|
4333
4333
|
};
|
4334
4334
|
|
4335
4335
|
// blocks/auth/ResetPassword.tsx
|
4336
|
-
var
|
4336
|
+
var import_react20 = __toESM(require("react"));
|
4337
4337
|
var import_react_hook_form4 = require("react-hook-form");
|
4338
4338
|
var import_zod4 = require("@hookform/resolvers/zod");
|
4339
4339
|
var z4 = __toESM(require("zod"));
|
@@ -4351,7 +4351,7 @@ var ResetPasswordForm = ({
|
|
4351
4351
|
const { handleSubmit, control, formState } = (0, import_react_hook_form4.useForm)({
|
4352
4352
|
resolver: (0, import_zod4.zodResolver)(formSchema)
|
4353
4353
|
});
|
4354
|
-
return /* @__PURE__ */
|
4354
|
+
return /* @__PURE__ */ import_react20.default.createElement(Card, { dir: props.direction }, !props.sent ? /* @__PURE__ */ import_react20.default.createElement(import_react20.default.Fragment, null, !props.headless && /* @__PURE__ */ import_react20.default.createElement(CardHeader, null, /* @__PURE__ */ import_react20.default.createElement(CardTitle, null, ((_g = props.texts) == null ? void 0 : _g.headTitle) || "Reset Password"), /* @__PURE__ */ import_react20.default.createElement(CardDescription, null, ((_h = props.texts) == null ? void 0 : _h.headDescription) || "Enter your email to reset your account password")), /* @__PURE__ */ import_react20.default.createElement(
|
4355
4355
|
"form",
|
4356
4356
|
{
|
4357
4357
|
noValidate: true,
|
@@ -4363,7 +4363,7 @@ var ResetPasswordForm = ({
|
|
4363
4363
|
}
|
4364
4364
|
})
|
4365
4365
|
},
|
4366
|
-
/* @__PURE__ */
|
4366
|
+
/* @__PURE__ */ import_react20.default.createElement(CardContent, { headless: props.headless, className: "hawa-pb-4" }, props.showError && /* @__PURE__ */ import_react20.default.createElement(
|
4367
4367
|
Alert,
|
4368
4368
|
{
|
4369
4369
|
direction: props.direction,
|
@@ -4371,14 +4371,14 @@ var ResetPasswordForm = ({
|
|
4371
4371
|
text: props.errorText,
|
4372
4372
|
severity: "error"
|
4373
4373
|
}
|
4374
|
-
), /* @__PURE__ */
|
4374
|
+
), /* @__PURE__ */ import_react20.default.createElement(
|
4375
4375
|
import_react_hook_form4.Controller,
|
4376
4376
|
{
|
4377
4377
|
control,
|
4378
4378
|
name: "email",
|
4379
4379
|
render: ({ field }) => {
|
4380
4380
|
var _a2, _b2, _c2, _d2, _e2;
|
4381
|
-
return /* @__PURE__ */
|
4381
|
+
return /* @__PURE__ */ import_react20.default.createElement(
|
4382
4382
|
Input,
|
4383
4383
|
{
|
4384
4384
|
width: "full",
|
@@ -4391,7 +4391,7 @@ var ResetPasswordForm = ({
|
|
4391
4391
|
}
|
4392
4392
|
}
|
4393
4393
|
)),
|
4394
|
-
/* @__PURE__ */
|
4394
|
+
/* @__PURE__ */ import_react20.default.createElement(CardFooter, { className: "hawa-flex hawa-flex-col" }, /* @__PURE__ */ import_react20.default.createElement(
|
4395
4395
|
Button,
|
4396
4396
|
{
|
4397
4397
|
type: "submit",
|
@@ -4399,7 +4399,7 @@ var ResetPasswordForm = ({
|
|
4399
4399
|
isLoading
|
4400
4400
|
},
|
4401
4401
|
((_i = props.texts) == null ? void 0 : _i.resetPassword) || "Reset Password"
|
4402
|
-
), allowRegister && /* @__PURE__ */
|
4402
|
+
), allowRegister && /* @__PURE__ */ import_react20.default.createElement("div", { className: "hawa-mt-4 hawa-pb-0 hawa-text-center hawa-text-sm dark:hawa-text-gray-300" }, (_k = (_j = props.texts) == null ? void 0 : _j.dontHaveAccount) != null ? _k : "Don't have an account? ", /* @__PURE__ */ import_react20.default.createElement(
|
4403
4403
|
"span",
|
4404
4404
|
{
|
4405
4405
|
className: "clickable-link",
|
@@ -4407,17 +4407,17 @@ var ResetPasswordForm = ({
|
|
4407
4407
|
},
|
4408
4408
|
(_m = (_l = props.texts) == null ? void 0 : _l.registerText) != null ? _m : "Register"
|
4409
4409
|
)))
|
4410
|
-
)) : /* @__PURE__ */
|
4410
|
+
)) : /* @__PURE__ */ import_react20.default.createElement(CardContent, { headless: true }, /* @__PURE__ */ import_react20.default.createElement("div", { className: "hawa-text-center" }, ((_n = props.texts) == null ? void 0 : _n.emailSentText) || "An email has been sent with a link to set a new password")));
|
4411
4411
|
};
|
4412
4412
|
|
4413
4413
|
// blocks/auth/CodeConfirmation.tsx
|
4414
|
-
var
|
4414
|
+
var import_react22 = __toESM(require("react"));
|
4415
4415
|
var import_react_hook_form5 = require("react-hook-form");
|
4416
4416
|
var import_zod5 = require("@hookform/resolvers/zod");
|
4417
4417
|
var z5 = __toESM(require("zod"));
|
4418
4418
|
|
4419
4419
|
// elements/pinInput/PinInput.tsx
|
4420
|
-
var
|
4420
|
+
var import_react21 = __toESM(require("react"));
|
4421
4421
|
var PinInput = ({
|
4422
4422
|
label,
|
4423
4423
|
icon,
|
@@ -4427,7 +4427,7 @@ var PinInput = ({
|
|
4427
4427
|
inputProps,
|
4428
4428
|
...props
|
4429
4429
|
}) => {
|
4430
|
-
const [pin, setPin] = (0,
|
4430
|
+
const [pin, setPin] = (0, import_react21.useState)(Array.from(Array(digits)));
|
4431
4431
|
const handleKeyDown = (e, index) => {
|
4432
4432
|
let backTo = 0;
|
4433
4433
|
if (e.key === "Backspace") {
|
@@ -4436,7 +4436,7 @@ var PinInput = ({
|
|
4436
4436
|
previousInput == null ? void 0 : previousInput.focus();
|
4437
4437
|
}
|
4438
4438
|
};
|
4439
|
-
(0,
|
4439
|
+
(0, import_react21.useEffect)(() => {
|
4440
4440
|
let unfilled = pin.includes(void 0);
|
4441
4441
|
if (!unfilled && getPins) {
|
4442
4442
|
getPins(pin);
|
@@ -4461,13 +4461,13 @@ var PinInput = ({
|
|
4461
4461
|
}
|
4462
4462
|
}
|
4463
4463
|
};
|
4464
|
-
return /* @__PURE__ */
|
4464
|
+
return /* @__PURE__ */ import_react21.default.createElement("div", { className: "hawa-flex hawa-flex-col hawa-gap-2" }, /* @__PURE__ */ import_react21.default.createElement(
|
4465
4465
|
"div",
|
4466
4466
|
{
|
4467
4467
|
className: "hawa-flex hawa-w-full hawa-flex-row hawa-justify-center hawa-gap-2",
|
4468
4468
|
dir: "ltr"
|
4469
4469
|
},
|
4470
|
-
pin.map((value, index) => /* @__PURE__ */
|
4470
|
+
pin.map((value, index) => /* @__PURE__ */ import_react21.default.createElement(
|
4471
4471
|
"input",
|
4472
4472
|
{
|
4473
4473
|
key: index,
|
@@ -4487,7 +4487,7 @@ var PinInput = ({
|
|
4487
4487
|
...inputProps
|
4488
4488
|
}
|
4489
4489
|
))
|
4490
|
-
), /* @__PURE__ */
|
4490
|
+
), /* @__PURE__ */ import_react21.default.createElement(
|
4491
4491
|
"p",
|
4492
4492
|
{
|
4493
4493
|
className: cn(
|
@@ -4508,9 +4508,9 @@ var CodeConfirmation = (props) => {
|
|
4508
4508
|
const { handleSubmit, control, formState, setValue } = (0, import_react_hook_form5.useForm)({
|
4509
4509
|
resolver: (0, import_zod5.zodResolver)(formSchema)
|
4510
4510
|
});
|
4511
|
-
const [resendTimer, setResendTimer] = (0,
|
4512
|
-
const [remainingTime, setRemainingTime] = (0,
|
4513
|
-
const [showResendTimer, setShowResendTimer] = (0,
|
4511
|
+
const [resendTimer, setResendTimer] = (0, import_react22.useState)(null);
|
4512
|
+
const [remainingTime, setRemainingTime] = (0, import_react22.useState)(0);
|
4513
|
+
const [showResendTimer, setShowResendTimer] = (0, import_react22.useState)(false);
|
4514
4514
|
const startResendTimer = () => {
|
4515
4515
|
if (resendTimer !== null) {
|
4516
4516
|
clearInterval(resendTimer);
|
@@ -4532,21 +4532,21 @@ var CodeConfirmation = (props) => {
|
|
4532
4532
|
}, 1e3);
|
4533
4533
|
setResendTimer(newTimer);
|
4534
4534
|
};
|
4535
|
-
(0,
|
4535
|
+
(0, import_react22.useEffect)(() => {
|
4536
4536
|
return () => {
|
4537
4537
|
if (resendTimer !== null) {
|
4538
4538
|
clearInterval(resendTimer);
|
4539
4539
|
}
|
4540
4540
|
};
|
4541
4541
|
}, []);
|
4542
|
-
return /* @__PURE__ */
|
4542
|
+
return /* @__PURE__ */ import_react22.default.createElement(Card, null, /* @__PURE__ */ import_react22.default.createElement(CardContent, { headless: true }, props.showError && /* @__PURE__ */ import_react22.default.createElement(
|
4543
4543
|
Alert,
|
4544
4544
|
{
|
4545
4545
|
title: props.errorTitle,
|
4546
4546
|
text: props.errorText,
|
4547
4547
|
severity: "error"
|
4548
4548
|
}
|
4549
|
-
), /* @__PURE__ */
|
4549
|
+
), /* @__PURE__ */ import_react22.default.createElement("div", { className: "hawa-mb-4 dark:hawa-text-white" }, /* @__PURE__ */ import_react22.default.createElement("div", { className: "hawa-text-lg hawa-font-bold" }, ((_c = props.texts) == null ? void 0 : _c.checkYourPhone) || "Please check your phone"), /* @__PURE__ */ import_react22.default.createElement("div", { className: "hawa-text-muted-foreground" }, /* @__PURE__ */ import_react22.default.createElement("span", null, ((_d = props.texts) == null ? void 0 : _d.weSentCode) || "We've sent a code to "), /* @__PURE__ */ import_react22.default.createElement("span", null, props.phoneNumber))), /* @__PURE__ */ import_react22.default.createElement(
|
4550
4550
|
"form",
|
4551
4551
|
{
|
4552
4552
|
noValidate: true,
|
@@ -4560,14 +4560,14 @@ var CodeConfirmation = (props) => {
|
|
4560
4560
|
}
|
4561
4561
|
})
|
4562
4562
|
},
|
4563
|
-
/* @__PURE__ */
|
4563
|
+
/* @__PURE__ */ import_react22.default.createElement(
|
4564
4564
|
import_react_hook_form5.Controller,
|
4565
4565
|
{
|
4566
4566
|
control,
|
4567
4567
|
name: "otp_code",
|
4568
4568
|
render: ({ field }) => {
|
4569
4569
|
var _a2;
|
4570
|
-
return /* @__PURE__ */
|
4570
|
+
return /* @__PURE__ */ import_react22.default.createElement(
|
4571
4571
|
PinInput,
|
4572
4572
|
{
|
4573
4573
|
width: "full",
|
@@ -4579,7 +4579,7 @@ var CodeConfirmation = (props) => {
|
|
4579
4579
|
}
|
4580
4580
|
}
|
4581
4581
|
),
|
4582
|
-
showResendTimer ? /* @__PURE__ */
|
4582
|
+
showResendTimer ? /* @__PURE__ */ import_react22.default.createElement("div", { className: " hawa-py-2 hawa-text-center hawa-text-xs hawa-text-muted-foreground" }, (_e = props.texts) == null ? void 0 : _e.resendCodeTimer, " ", /* @__PURE__ */ import_react22.default.createElement("strong", null, remainingTime), " ", (_f = props.texts) == null ? void 0 : _f.seconds) : /* @__PURE__ */ import_react22.default.createElement("div", { className: " hawa-py-2 hawa-text-center hawa-text-xs hawa-text-muted-foreground" }, /* @__PURE__ */ import_react22.default.createElement("span", null, (_h = (_g = props.texts) == null ? void 0 : _g.didntGetCode) != null ? _h : "Didn't get the code?"), " ", /* @__PURE__ */ import_react22.default.createElement(
|
4583
4583
|
"span",
|
4584
4584
|
{
|
4585
4585
|
className: "clickable-link",
|
@@ -4590,7 +4590,7 @@ var CodeConfirmation = (props) => {
|
|
4590
4590
|
},
|
4591
4591
|
((_i = props.texts) == null ? void 0 : _i.resendCode) || "Click to resend"
|
4592
4592
|
)),
|
4593
|
-
/* @__PURE__ */
|
4593
|
+
/* @__PURE__ */ import_react22.default.createElement("div", { className: "hawa-mt-4 hawa-grid hawa-grid-cols-2 hawa-gap-2" }, /* @__PURE__ */ import_react22.default.createElement(Button, { variant: "secondary" }, ((_j = props.texts) == null ? void 0 : _j.cancel) || "Cancel"), /* @__PURE__ */ import_react22.default.createElement(Button, { isLoading: props.confirmLoading }, ((_k = props.texts) == null ? void 0 : _k.confirm) || "Confirm"))
|
4594
4594
|
)));
|
4595
4595
|
};
|
4596
4596
|
// Annotate the CommonJS export names for ESM import in node:
|