@sikka/hawa 0.31.1-next → 0.31.3-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 +0 -1
- package/dist/alert/index.js.map +1 -1
- package/dist/alert/index.mjs +0 -1
- package/dist/alert/index.mjs.map +1 -1
- package/dist/appLayout/index.js +0 -1
- package/dist/appLayout/index.js.map +1 -1
- package/dist/appLayout/index.mjs +0 -1
- package/dist/appLayout/index.mjs.map +1 -1
- package/dist/backToTop/index.js +0 -1
- package/dist/backToTop/index.js.map +1 -1
- package/dist/backToTop/index.mjs +0 -1
- package/dist/backToTop/index.mjs.map +1 -1
- package/dist/blocks/auth/index.d.mts +13 -2
- package/dist/blocks/auth/index.d.ts +13 -2
- package/dist/blocks/auth/index.js +63 -57
- package/dist/blocks/auth/index.mjs +71 -66
- package/dist/blocks/feedback/index.js +0 -1
- package/dist/blocks/feedback/index.mjs +5 -5
- package/dist/blocks/index.d.mts +13 -2
- package/dist/blocks/index.d.ts +13 -2
- package/dist/blocks/index.js +64 -58
- package/dist/blocks/index.mjs +87 -82
- package/dist/blocks/misc/index.js +1 -2
- package/dist/blocks/misc/index.mjs +6 -6
- package/dist/blocks/pricing/index.js +0 -1
- package/dist/blocks/pricing/index.mjs +4 -4
- package/dist/button/index.js +3 -2
- package/dist/button/index.js.map +1 -1
- package/dist/button/index.mjs +3 -2
- package/dist/button/index.mjs.map +1 -1
- package/dist/{chunk-XTGWVGTN.mjs → chunk-CRKKOXUP.mjs} +2 -2
- package/dist/{chunk-KNG6AWIO.mjs → chunk-DNUJA5QC.mjs} +1 -1
- package/dist/{chunk-XLMVXGNC.mjs → chunk-HR37LWAO.mjs} +1 -1
- package/dist/{chunk-ER7YWU7Z.mjs → chunk-IKHGAGYN.mjs} +1 -1
- package/dist/{chunk-BXGDHNAY.mjs → chunk-MS7B36BZ.mjs} +1 -1
- package/dist/{chunk-ZGNBKYX7.mjs → chunk-NEJHLLDI.mjs} +0 -1
- package/dist/{chunk-AEFNDLFD.mjs → chunk-VYAFGNRW.mjs} +1 -1
- package/dist/{chunk-YR2YA3DQ.mjs → chunk-X5YH2OOE.mjs} +1 -1
- package/dist/{chunk-DGOT2FVH.mjs → chunk-XQ3GJWXB.mjs} +0 -1
- package/dist/{chunk-TKSAYWDH.mjs → chunk-YAGZ6WVL.mjs} +1 -1
- package/dist/codeBlock/index.js +0 -1
- package/dist/codeBlock/index.js.map +1 -1
- package/dist/codeBlock/index.mjs +0 -1
- package/dist/codeBlock/index.mjs.map +1 -1
- package/dist/dataTable/index.js +0 -1
- package/dist/dataTable/index.js.map +1 -1
- package/dist/dataTable/index.mjs +0 -1
- package/dist/dataTable/index.mjs.map +1 -1
- package/dist/docsLayout/index.js +3 -2
- package/dist/docsLayout/index.js.map +1 -1
- package/dist/docsLayout/index.mjs +3 -2
- package/dist/docsLayout/index.mjs.map +1 -1
- package/dist/elements/index.js +1 -2
- package/dist/elements/index.mjs +3 -3
- package/dist/fileDropzone/index.js +0 -1
- package/dist/fileDropzone/index.js.map +1 -1
- package/dist/fileDropzone/index.mjs +0 -1
- package/dist/fileDropzone/index.mjs.map +1 -1
- package/dist/floatBox/index.js +1 -1
- package/dist/floatBox/index.js.map +1 -1
- package/dist/floatBox/index.mjs +1 -1
- package/dist/floatBox/index.mjs.map +1 -1
- package/dist/index.d.mts +13 -2
- package/dist/index.d.ts +13 -2
- package/dist/index.js +61 -57
- package/dist/index.mjs +86 -82
- package/dist/layout/index.js +0 -1
- package/dist/layout/index.mjs +2 -2
- package/dist/sortButton/index.js +0 -1
- package/dist/sortButton/index.js.map +1 -1
- package/dist/sortButton/index.mjs +0 -1
- package/dist/sortButton/index.mjs.map +1 -1
- package/dist/splitButton/index.js +0 -1
- package/dist/splitButton/index.js.map +1 -1
- package/dist/splitButton/index.mjs +0 -1
- package/dist/splitButton/index.mjs.map +1 -1
- package/dist/tabs/index.js +1 -1
- package/dist/tabs/index.js.map +1 -1
- package/dist/tabs/index.mjs +1 -1
- package/dist/tabs/index.mjs.map +1 -1
- package/package.json +1 -1
@@ -1,17 +1,17 @@
|
|
1
1
|
"use client";
|
2
2
|
import {
|
3
3
|
Input
|
4
|
-
} from "../../chunk-
|
4
|
+
} from "../../chunk-DNUJA5QC.mjs";
|
5
5
|
import {
|
6
6
|
StopPropagationWrapper
|
7
7
|
} from "../../chunk-47APBDKK.mjs";
|
8
8
|
import {
|
9
9
|
Select
|
10
|
-
} from "../../chunk-
|
10
|
+
} from "../../chunk-IKHGAGYN.mjs";
|
11
11
|
import {
|
12
12
|
EyeIcon,
|
13
13
|
HiddenEyeIcon
|
14
|
-
} from "../../chunk-
|
14
|
+
} from "../../chunk-HR37LWAO.mjs";
|
15
15
|
import {
|
16
16
|
Button,
|
17
17
|
Card,
|
@@ -23,7 +23,7 @@ import {
|
|
23
23
|
Label,
|
24
24
|
Loading,
|
25
25
|
cn
|
26
|
-
} from "../../chunk-
|
26
|
+
} from "../../chunk-NEJHLLDI.mjs";
|
27
27
|
|
28
28
|
// blocks/auth/AuthButtons.tsx
|
29
29
|
import React2 from "react";
|
@@ -3288,7 +3288,7 @@ var CheckEmail = ({ texts, handleResend }) => {
|
|
3288
3288
|
};
|
3289
3289
|
|
3290
3290
|
// blocks/auth/NewPassword.tsx
|
3291
|
-
import React10
|
3291
|
+
import React10 from "react";
|
3292
3292
|
import { Controller as Controller3, useForm as useForm3 } from "react-hook-form";
|
3293
3293
|
import { zodResolver as zodResolver3 } from "@hookform/resolvers/zod";
|
3294
3294
|
import * as z3 from "zod";
|
@@ -3297,7 +3297,7 @@ var NewPasswordForm = ({
|
|
3297
3297
|
isLoading,
|
3298
3298
|
...props
|
3299
3299
|
}) => {
|
3300
|
-
var _a, _b, _c, _d, _e, _f, _g, _h
|
3300
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
3301
3301
|
const formSchema = z3.object({
|
3302
3302
|
password: z3.string({ required_error: (_a = texts == null ? void 0 : texts.password) == null ? void 0 : _a.required }).min(1, { message: (_b = texts == null ? void 0 : texts.password) == null ? void 0 : _b.required }).min(8, { message: (_c = texts == null ? void 0 : texts.password) == null ? void 0 : _c.tooShort }),
|
3303
3303
|
confirm_password: z3.string({ required_error: (_d = texts == null ? void 0 : texts.confirm) == null ? void 0 : _d.required }).refine((value) => value !== "", {
|
@@ -3310,8 +3310,7 @@ var NewPasswordForm = ({
|
|
3310
3310
|
const { handleSubmit, control, formState } = useForm3({
|
3311
3311
|
resolver: zodResolver3(formSchema)
|
3312
3312
|
});
|
3313
|
-
|
3314
|
-
return /* @__PURE__ */ React10.createElement(Card, { dir: props.direction }, matchError && /* @__PURE__ */ React10.createElement(Alert, { text: (_g = texts == null ? void 0 : texts.confirm) == null ? void 0 : _g.dontMatch, severity: "error" }), props.passwordChanged ? /* @__PURE__ */ React10.createElement(CardContent, { headless: true }, /* @__PURE__ */ React10.createElement("div", { className: "hawa-text-center" }, texts == null ? void 0 : texts.passwordChanged)) : /* @__PURE__ */ React10.createElement(
|
3313
|
+
return /* @__PURE__ */ React10.createElement(Card, { dir: props.direction }, props.showSuccess ? /* @__PURE__ */ React10.createElement(CardContent, { headless: true }, /* @__PURE__ */ React10.createElement("div", { className: "hawa-text-center" }, texts == null ? void 0 : texts.passwordChanged)) : /* @__PURE__ */ React10.createElement(
|
3315
3314
|
"form",
|
3316
3315
|
{
|
3317
3316
|
noValidate: true,
|
@@ -3325,65 +3324,63 @@ var NewPasswordForm = ({
|
|
3325
3324
|
}
|
3326
3325
|
})
|
3327
3326
|
},
|
3328
|
-
|
3329
|
-
|
3330
|
-
CardContent,
|
3327
|
+
/* @__PURE__ */ React10.createElement(CardContent, { headless: true, className: "hawa-flex hawa-flex-col" }, props.showError && /* @__PURE__ */ React10.createElement(
|
3328
|
+
Alert,
|
3331
3329
|
{
|
3332
|
-
|
3333
|
-
|
3334
|
-
|
3335
|
-
|
3336
|
-
|
3337
|
-
|
3338
|
-
|
3339
|
-
|
3340
|
-
|
3341
|
-
|
3342
|
-
|
3343
|
-
|
3344
|
-
|
3345
|
-
|
3346
|
-
|
3347
|
-
|
3348
|
-
|
3349
|
-
|
3350
|
-
|
3351
|
-
|
3352
|
-
|
3353
|
-
|
3354
|
-
|
3330
|
+
direction: props.direction,
|
3331
|
+
title: props.errorTitle,
|
3332
|
+
text: props.errorText,
|
3333
|
+
severity: "error"
|
3334
|
+
}
|
3335
|
+
), /* @__PURE__ */ React10.createElement("div", { className: "hawa-flex hawa-flex-col hawa-gap-4 hawa-mb-4" }, /* @__PURE__ */ React10.createElement(
|
3336
|
+
Controller3,
|
3337
|
+
{
|
3338
|
+
control,
|
3339
|
+
name: "password",
|
3340
|
+
render: ({ field }) => {
|
3341
|
+
var _a2, _b2, _c2;
|
3342
|
+
return /* @__PURE__ */ React10.createElement(
|
3343
|
+
Input,
|
3344
|
+
{
|
3345
|
+
width: "full",
|
3346
|
+
type: "password",
|
3347
|
+
autoComplete: "new-password",
|
3348
|
+
label: (_a2 = texts == null ? void 0 : texts.password) == null ? void 0 : _a2.label,
|
3349
|
+
placeholder: (_b2 = texts == null ? void 0 : texts.password) == null ? void 0 : _b2.placeholder,
|
3350
|
+
helperText: (_c2 = formState.errors.password) == null ? void 0 : _c2.message,
|
3351
|
+
...field
|
3352
|
+
}
|
3353
|
+
);
|
3355
3354
|
}
|
3356
|
-
|
3357
|
-
|
3358
|
-
|
3359
|
-
|
3360
|
-
|
3361
|
-
|
3362
|
-
|
3363
|
-
|
3364
|
-
|
3365
|
-
|
3366
|
-
|
3367
|
-
|
3368
|
-
|
3369
|
-
|
3370
|
-
|
3371
|
-
|
3372
|
-
|
3373
|
-
|
3374
|
-
|
3375
|
-
|
3376
|
-
}
|
3355
|
+
}
|
3356
|
+
), /* @__PURE__ */ React10.createElement(
|
3357
|
+
Controller3,
|
3358
|
+
{
|
3359
|
+
control,
|
3360
|
+
name: "confirm_password",
|
3361
|
+
render: ({ field }) => {
|
3362
|
+
var _a2, _b2, _c2;
|
3363
|
+
return /* @__PURE__ */ React10.createElement(
|
3364
|
+
Input,
|
3365
|
+
{
|
3366
|
+
width: "full",
|
3367
|
+
type: "password",
|
3368
|
+
autoComplete: "new-password",
|
3369
|
+
label: (_a2 = texts == null ? void 0 : texts.confirm) == null ? void 0 : _a2.label,
|
3370
|
+
placeholder: (_b2 = texts == null ? void 0 : texts.confirm) == null ? void 0 : _b2.placeholder,
|
3371
|
+
helperText: (_c2 = formState.errors.confirm_password) == null ? void 0 : _c2.message,
|
3372
|
+
...field
|
3373
|
+
}
|
3374
|
+
);
|
3377
3375
|
}
|
3378
|
-
|
3379
|
-
),
|
3380
|
-
/* @__PURE__ */ React10.createElement(CardFooter, { className: "hawa-flex hawa-flex-col" }, /* @__PURE__ */ React10.createElement(Button, { className: "hawa-w-full", type: "submit", isLoading }, texts == null ? void 0 : texts.updatePassword), props.allowRegister && /* @__PURE__ */ React10.createElement("div", { className: "hawa-mt-4 hawa-pb-0 hawa-text-center hawa-text-sm dark:hawa-text-gray-300" }, (_h = texts == null ? void 0 : texts.dontHaveAccount) != null ? _h : "Don't have an account? ", /* @__PURE__ */ React10.createElement(
|
3376
|
+
}
|
3377
|
+
)), /* @__PURE__ */ React10.createElement(Button, { className: "hawa-w-full", type: "submit", isLoading }, texts == null ? void 0 : texts.updatePassword), props.allowRegister && /* @__PURE__ */ React10.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__ */ React10.createElement(
|
3381
3378
|
"span",
|
3382
3379
|
{
|
3383
3380
|
className: "clickable-link",
|
3384
3381
|
onClick: props.handleRouteToRegister
|
3385
3382
|
},
|
3386
|
-
(
|
3383
|
+
(_h = texts == null ? void 0 : texts.registerText) != null ? _h : "Register"
|
3387
3384
|
)))
|
3388
3385
|
));
|
3389
3386
|
};
|
@@ -3419,7 +3416,15 @@ var ResetPasswordForm = ({
|
|
3419
3416
|
}
|
3420
3417
|
})
|
3421
3418
|
},
|
3422
|
-
/* @__PURE__ */ React11.createElement(CardContent, { headless: props.headless, className: "hawa-pb-4" }, /* @__PURE__ */ React11.createElement(
|
3419
|
+
/* @__PURE__ */ React11.createElement(CardContent, { headless: props.headless, className: "hawa-pb-4" }, props.showError && /* @__PURE__ */ React11.createElement(
|
3420
|
+
Alert,
|
3421
|
+
{
|
3422
|
+
direction: props.direction,
|
3423
|
+
title: props.errorTitle,
|
3424
|
+
text: props.errorText,
|
3425
|
+
severity: "error"
|
3426
|
+
}
|
3427
|
+
), /* @__PURE__ */ React11.createElement(
|
3423
3428
|
Controller4,
|
3424
3429
|
{
|
3425
3430
|
control,
|
@@ -3459,13 +3464,13 @@ var ResetPasswordForm = ({
|
|
3459
3464
|
};
|
3460
3465
|
|
3461
3466
|
// blocks/auth/CodeConfirmation.tsx
|
3462
|
-
import React13, { useEffect as useEffect4, useState as
|
3467
|
+
import React13, { useEffect as useEffect4, useState as useState6 } from "react";
|
3463
3468
|
import { Controller as Controller5, useForm as useForm5 } from "react-hook-form";
|
3464
3469
|
import { zodResolver as zodResolver5 } from "@hookform/resolvers/zod";
|
3465
3470
|
import * as z5 from "zod";
|
3466
3471
|
|
3467
3472
|
// elements/pinInput/PinInput.tsx
|
3468
|
-
import React12, { useEffect as useEffect3, useState as
|
3473
|
+
import React12, { useEffect as useEffect3, useState as useState5 } from "react";
|
3469
3474
|
var PinInput = ({
|
3470
3475
|
label,
|
3471
3476
|
icon,
|
@@ -3475,7 +3480,7 @@ var PinInput = ({
|
|
3475
3480
|
inputProps,
|
3476
3481
|
...props
|
3477
3482
|
}) => {
|
3478
|
-
const [pin, setPin] =
|
3483
|
+
const [pin, setPin] = useState5(Array.from(Array(digits)));
|
3479
3484
|
const handleKeyDown = (e, index) => {
|
3480
3485
|
let backTo = 0;
|
3481
3486
|
if (e.key === "Backspace") {
|
@@ -3556,9 +3561,9 @@ var CodeConfirmation = (props) => {
|
|
3556
3561
|
const { handleSubmit, control, formState, setValue } = useForm5({
|
3557
3562
|
resolver: zodResolver5(formSchema)
|
3558
3563
|
});
|
3559
|
-
const [resendTimer, setResendTimer] =
|
3560
|
-
const [remainingTime, setRemainingTime] =
|
3561
|
-
const [showResendTimer, setShowResendTimer] =
|
3564
|
+
const [resendTimer, setResendTimer] = useState6(null);
|
3565
|
+
const [remainingTime, setRemainingTime] = useState6(0);
|
3566
|
+
const [showResendTimer, setShowResendTimer] = useState6(false);
|
3562
3567
|
const startResendTimer = () => {
|
3563
3568
|
if (resendTimer !== null) {
|
3564
3569
|
clearInterval(resendTimer);
|
@@ -1,26 +1,26 @@
|
|
1
1
|
"use client";
|
2
2
|
import {
|
3
3
|
Textarea
|
4
|
-
} from "../../chunk-
|
4
|
+
} from "../../chunk-VYAFGNRW.mjs";
|
5
5
|
import {
|
6
6
|
Select
|
7
|
-
} from "../../chunk-
|
7
|
+
} from "../../chunk-IKHGAGYN.mjs";
|
8
8
|
import {
|
9
9
|
Radio
|
10
|
-
} from "../../chunk-
|
10
|
+
} from "../../chunk-X5YH2OOE.mjs";
|
11
11
|
import {
|
12
12
|
BadEmoji,
|
13
13
|
GoodEmoji,
|
14
14
|
VeryBadEmoji,
|
15
15
|
VeryGoodEmoji
|
16
|
-
} from "../../chunk-
|
16
|
+
} from "../../chunk-HR37LWAO.mjs";
|
17
17
|
import {
|
18
18
|
Button,
|
19
19
|
Card,
|
20
20
|
CardContent,
|
21
21
|
Label,
|
22
22
|
cn
|
23
|
-
} from "../../chunk-
|
23
|
+
} from "../../chunk-NEJHLLDI.mjs";
|
24
24
|
|
25
25
|
// blocks/feedback/UserReferralSource.tsx
|
26
26
|
import React, { useRef, useState } from "react";
|
package/dist/blocks/index.d.mts
CHANGED
@@ -204,10 +204,15 @@ type NewPasswordTypes = {
|
|
204
204
|
handleRouteToRegister: () => void;
|
205
205
|
isLoading: boolean;
|
206
206
|
direction?: DirectionType;
|
207
|
-
headless?: boolean;
|
208
207
|
allowRegister?: boolean;
|
209
|
-
|
208
|
+
showSuccess: boolean;
|
210
209
|
texts: NewPasswordTextsTypes;
|
210
|
+
/** If true, an error alert is displayed at the top of the form. */
|
211
|
+
showError?: boolean;
|
212
|
+
/** Title text of error alert. */
|
213
|
+
errorTitle?: string;
|
214
|
+
/** Description text of error alert. */
|
215
|
+
errorText?: string;
|
211
216
|
};
|
212
217
|
declare const NewPasswordForm: FC<NewPasswordTypes>;
|
213
218
|
|
@@ -220,6 +225,12 @@ type ResetPasswordType = {
|
|
220
225
|
allowRegister?: boolean;
|
221
226
|
direction?: DirectionType;
|
222
227
|
texts?: ResetPasswordTextsTypes;
|
228
|
+
/** If true, an error alert is displayed at the top of the form. */
|
229
|
+
showError?: boolean;
|
230
|
+
/** Title text of error alert. */
|
231
|
+
errorTitle?: string;
|
232
|
+
/** Description text of error alert. */
|
233
|
+
errorText?: string;
|
223
234
|
};
|
224
235
|
declare const ResetPasswordForm: FC<ResetPasswordType>;
|
225
236
|
|
package/dist/blocks/index.d.ts
CHANGED
@@ -204,10 +204,15 @@ type NewPasswordTypes = {
|
|
204
204
|
handleRouteToRegister: () => void;
|
205
205
|
isLoading: boolean;
|
206
206
|
direction?: DirectionType;
|
207
|
-
headless?: boolean;
|
208
207
|
allowRegister?: boolean;
|
209
|
-
|
208
|
+
showSuccess: boolean;
|
210
209
|
texts: NewPasswordTextsTypes;
|
210
|
+
/** If true, an error alert is displayed at the top of the form. */
|
211
|
+
showError?: boolean;
|
212
|
+
/** Title text of error alert. */
|
213
|
+
errorTitle?: string;
|
214
|
+
/** Description text of error alert. */
|
215
|
+
errorText?: string;
|
211
216
|
};
|
212
217
|
declare const NewPasswordForm: FC<NewPasswordTypes>;
|
213
218
|
|
@@ -220,6 +225,12 @@ type ResetPasswordType = {
|
|
220
225
|
allowRegister?: boolean;
|
221
226
|
direction?: DirectionType;
|
222
227
|
texts?: ResetPasswordTextsTypes;
|
228
|
+
/** If true, an error alert is displayed at the top of the form. */
|
229
|
+
showError?: boolean;
|
230
|
+
/** Title text of error alert. */
|
231
|
+
errorTitle?: string;
|
232
|
+
/** Description text of error alert. */
|
233
|
+
errorText?: string;
|
223
234
|
};
|
224
235
|
declare const ResetPasswordForm: FC<ResetPasswordType>;
|
225
236
|
|
package/dist/blocks/index.js
CHANGED
@@ -68,7 +68,6 @@ var import_react3 = __toESM(require("react"));
|
|
68
68
|
|
69
69
|
// elements/button/Button.tsx
|
70
70
|
var React2 = __toESM(require("react"));
|
71
|
-
var import_class_variance_authority = require("class-variance-authority");
|
72
71
|
|
73
72
|
// util/index.ts
|
74
73
|
var import_clsx = require("clsx");
|
@@ -77,6 +76,9 @@ function cn(...inputs) {
|
|
77
76
|
return (0, import_tailwind_merge.twMerge)((0, import_clsx.clsx)(inputs));
|
78
77
|
}
|
79
78
|
|
79
|
+
// elements/button/Button.tsx
|
80
|
+
var import_class_variance_authority = require("class-variance-authority");
|
81
|
+
|
80
82
|
// elements/loading/Loading.tsx
|
81
83
|
var import_react = __toESM(require("react"));
|
82
84
|
var Loading = ({
|
@@ -348,7 +350,6 @@ var Button = React2.forwardRef(
|
|
348
350
|
className: cn(
|
349
351
|
buttonVariants({ variant, size, className }),
|
350
352
|
centered && "hawa-justify-center"
|
351
|
-
// "hawa-bg-red-500"
|
352
353
|
),
|
353
354
|
ref,
|
354
355
|
...props
|
@@ -4360,7 +4361,7 @@ var NewPasswordForm = ({
|
|
4360
4361
|
isLoading,
|
4361
4362
|
...props
|
4362
4363
|
}) => {
|
4363
|
-
var _a, _b, _c, _d, _e, _f, _g, _h
|
4364
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
4364
4365
|
const formSchema = z3.object({
|
4365
4366
|
password: z3.string({ required_error: (_a = texts == null ? void 0 : texts.password) == null ? void 0 : _a.required }).min(1, { message: (_b = texts == null ? void 0 : texts.password) == null ? void 0 : _b.required }).min(8, { message: (_c = texts == null ? void 0 : texts.password) == null ? void 0 : _c.tooShort }),
|
4366
4367
|
confirm_password: z3.string({ required_error: (_d = texts == null ? void 0 : texts.confirm) == null ? void 0 : _d.required }).refine((value) => value !== "", {
|
@@ -4373,8 +4374,7 @@ var NewPasswordForm = ({
|
|
4373
4374
|
const { handleSubmit, control, formState } = (0, import_react_hook_form3.useForm)({
|
4374
4375
|
resolver: (0, import_zod3.zodResolver)(formSchema)
|
4375
4376
|
});
|
4376
|
-
|
4377
|
-
return /* @__PURE__ */ import_react18.default.createElement(Card, { dir: props.direction }, matchError && /* @__PURE__ */ import_react18.default.createElement(Alert, { text: (_g = texts == null ? void 0 : texts.confirm) == null ? void 0 : _g.dontMatch, severity: "error" }), props.passwordChanged ? /* @__PURE__ */ import_react18.default.createElement(CardContent, { headless: true }, /* @__PURE__ */ import_react18.default.createElement("div", { className: "hawa-text-center" }, texts == null ? void 0 : texts.passwordChanged)) : /* @__PURE__ */ import_react18.default.createElement(
|
4377
|
+
return /* @__PURE__ */ import_react18.default.createElement(Card, { dir: props.direction }, props.showSuccess ? /* @__PURE__ */ import_react18.default.createElement(CardContent, { headless: true }, /* @__PURE__ */ import_react18.default.createElement("div", { className: "hawa-text-center" }, texts == null ? void 0 : texts.passwordChanged)) : /* @__PURE__ */ import_react18.default.createElement(
|
4378
4378
|
"form",
|
4379
4379
|
{
|
4380
4380
|
noValidate: true,
|
@@ -4388,65 +4388,63 @@ var NewPasswordForm = ({
|
|
4388
4388
|
}
|
4389
4389
|
})
|
4390
4390
|
},
|
4391
|
-
|
4392
|
-
|
4393
|
-
CardContent,
|
4391
|
+
/* @__PURE__ */ import_react18.default.createElement(CardContent, { headless: true, className: "hawa-flex hawa-flex-col" }, props.showError && /* @__PURE__ */ import_react18.default.createElement(
|
4392
|
+
Alert,
|
4394
4393
|
{
|
4395
|
-
|
4396
|
-
|
4397
|
-
|
4398
|
-
|
4399
|
-
|
4400
|
-
|
4401
|
-
|
4402
|
-
|
4403
|
-
|
4404
|
-
|
4405
|
-
|
4406
|
-
|
4407
|
-
|
4408
|
-
|
4409
|
-
|
4410
|
-
|
4411
|
-
|
4412
|
-
|
4413
|
-
|
4414
|
-
|
4415
|
-
|
4416
|
-
|
4417
|
-
|
4394
|
+
direction: props.direction,
|
4395
|
+
title: props.errorTitle,
|
4396
|
+
text: props.errorText,
|
4397
|
+
severity: "error"
|
4398
|
+
}
|
4399
|
+
), /* @__PURE__ */ import_react18.default.createElement("div", { className: "hawa-flex hawa-flex-col hawa-gap-4 hawa-mb-4" }, /* @__PURE__ */ import_react18.default.createElement(
|
4400
|
+
import_react_hook_form3.Controller,
|
4401
|
+
{
|
4402
|
+
control,
|
4403
|
+
name: "password",
|
4404
|
+
render: ({ field }) => {
|
4405
|
+
var _a2, _b2, _c2;
|
4406
|
+
return /* @__PURE__ */ import_react18.default.createElement(
|
4407
|
+
Input,
|
4408
|
+
{
|
4409
|
+
width: "full",
|
4410
|
+
type: "password",
|
4411
|
+
autoComplete: "new-password",
|
4412
|
+
label: (_a2 = texts == null ? void 0 : texts.password) == null ? void 0 : _a2.label,
|
4413
|
+
placeholder: (_b2 = texts == null ? void 0 : texts.password) == null ? void 0 : _b2.placeholder,
|
4414
|
+
helperText: (_c2 = formState.errors.password) == null ? void 0 : _c2.message,
|
4415
|
+
...field
|
4416
|
+
}
|
4417
|
+
);
|
4418
4418
|
}
|
4419
|
-
|
4420
|
-
|
4421
|
-
|
4422
|
-
|
4423
|
-
|
4424
|
-
|
4425
|
-
|
4426
|
-
|
4427
|
-
|
4428
|
-
|
4429
|
-
|
4430
|
-
|
4431
|
-
|
4432
|
-
|
4433
|
-
|
4434
|
-
|
4435
|
-
|
4436
|
-
|
4437
|
-
|
4438
|
-
|
4439
|
-
}
|
4419
|
+
}
|
4420
|
+
), /* @__PURE__ */ import_react18.default.createElement(
|
4421
|
+
import_react_hook_form3.Controller,
|
4422
|
+
{
|
4423
|
+
control,
|
4424
|
+
name: "confirm_password",
|
4425
|
+
render: ({ field }) => {
|
4426
|
+
var _a2, _b2, _c2;
|
4427
|
+
return /* @__PURE__ */ import_react18.default.createElement(
|
4428
|
+
Input,
|
4429
|
+
{
|
4430
|
+
width: "full",
|
4431
|
+
type: "password",
|
4432
|
+
autoComplete: "new-password",
|
4433
|
+
label: (_a2 = texts == null ? void 0 : texts.confirm) == null ? void 0 : _a2.label,
|
4434
|
+
placeholder: (_b2 = texts == null ? void 0 : texts.confirm) == null ? void 0 : _b2.placeholder,
|
4435
|
+
helperText: (_c2 = formState.errors.confirm_password) == null ? void 0 : _c2.message,
|
4436
|
+
...field
|
4437
|
+
}
|
4438
|
+
);
|
4440
4439
|
}
|
4441
|
-
|
4442
|
-
),
|
4443
|
-
/* @__PURE__ */ import_react18.default.createElement(CardFooter, { className: "hawa-flex hawa-flex-col" }, /* @__PURE__ */ import_react18.default.createElement(Button, { className: "hawa-w-full", type: "submit", isLoading }, texts == null ? void 0 : texts.updatePassword), props.allowRegister && /* @__PURE__ */ import_react18.default.createElement("div", { className: "hawa-mt-4 hawa-pb-0 hawa-text-center hawa-text-sm dark:hawa-text-gray-300" }, (_h = texts == null ? void 0 : texts.dontHaveAccount) != null ? _h : "Don't have an account? ", /* @__PURE__ */ import_react18.default.createElement(
|
4440
|
+
}
|
4441
|
+
)), /* @__PURE__ */ import_react18.default.createElement(Button, { className: "hawa-w-full", type: "submit", isLoading }, texts == null ? void 0 : texts.updatePassword), props.allowRegister && /* @__PURE__ */ import_react18.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_react18.default.createElement(
|
4444
4442
|
"span",
|
4445
4443
|
{
|
4446
4444
|
className: "clickable-link",
|
4447
4445
|
onClick: props.handleRouteToRegister
|
4448
4446
|
},
|
4449
|
-
(
|
4447
|
+
(_h = texts == null ? void 0 : texts.registerText) != null ? _h : "Register"
|
4450
4448
|
)))
|
4451
4449
|
));
|
4452
4450
|
};
|
@@ -4482,7 +4480,15 @@ var ResetPasswordForm = ({
|
|
4482
4480
|
}
|
4483
4481
|
})
|
4484
4482
|
},
|
4485
|
-
/* @__PURE__ */ import_react19.default.createElement(CardContent, { headless: props.headless, className: "hawa-pb-4" }, /* @__PURE__ */ import_react19.default.createElement(
|
4483
|
+
/* @__PURE__ */ import_react19.default.createElement(CardContent, { headless: props.headless, className: "hawa-pb-4" }, props.showError && /* @__PURE__ */ import_react19.default.createElement(
|
4484
|
+
Alert,
|
4485
|
+
{
|
4486
|
+
direction: props.direction,
|
4487
|
+
title: props.errorTitle,
|
4488
|
+
text: props.errorText,
|
4489
|
+
severity: "error"
|
4490
|
+
}
|
4491
|
+
), /* @__PURE__ */ import_react19.default.createElement(
|
4486
4492
|
import_react_hook_form4.Controller,
|
4487
4493
|
{
|
4488
4494
|
control,
|
@@ -5777,7 +5783,7 @@ var FloatBox = ({
|
|
5777
5783
|
"data-side": side,
|
5778
5784
|
"data-floatbox-state": open ? "open" : "closed"
|
5779
5785
|
},
|
5780
|
-
withArrow && /* @__PURE__ */ React43.createElement("div", { className: cn(
|
5786
|
+
withArrow && /* @__PURE__ */ React43.createElement("div", { className: cn(arrowDirection[side]) }),
|
5781
5787
|
/* @__PURE__ */ React43.createElement("span", null, props.children)
|
5782
5788
|
);
|
5783
5789
|
};
|