@sikka/hawa 0.31.0-next → 0.31.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.
@@ -213,10 +213,15 @@ type NewPasswordTypes = {
213
213
  handleRouteToRegister: () => void;
214
214
  isLoading: boolean;
215
215
  direction?: DirectionType;
216
- headless?: boolean;
217
216
  allowRegister?: boolean;
218
- passwordChanged: any;
217
+ showSuccess: boolean;
219
218
  texts: NewPasswordTextsTypes;
219
+ /** If true, an error alert is displayed at the top of the form. */
220
+ showError?: boolean;
221
+ /** Title text of error alert. */
222
+ errorTitle?: string;
223
+ /** Description text of error alert. */
224
+ errorText?: string;
220
225
  };
221
226
  declare const NewPasswordForm: FC<NewPasswordTypes>;
222
227
 
@@ -229,6 +234,12 @@ type ResetPasswordType = {
229
234
  allowRegister?: boolean;
230
235
  direction?: DirectionType;
231
236
  texts?: ResetPasswordTextsTypes;
237
+ /** If true, an error alert is displayed at the top of the form. */
238
+ showError?: boolean;
239
+ /** Title text of error alert. */
240
+ errorTitle?: string;
241
+ /** Description text of error alert. */
242
+ errorText?: string;
232
243
  };
233
244
  declare const ResetPasswordForm: FC<ResetPasswordType>;
234
245
 
@@ -213,10 +213,15 @@ type NewPasswordTypes = {
213
213
  handleRouteToRegister: () => void;
214
214
  isLoading: boolean;
215
215
  direction?: DirectionType;
216
- headless?: boolean;
217
216
  allowRegister?: boolean;
218
- passwordChanged: any;
217
+ showSuccess: boolean;
219
218
  texts: NewPasswordTextsTypes;
219
+ /** If true, an error alert is displayed at the top of the form. */
220
+ showError?: boolean;
221
+ /** Title text of error alert. */
222
+ errorTitle?: string;
223
+ /** Description text of error alert. */
224
+ errorText?: string;
220
225
  };
221
226
  declare const NewPasswordForm: FC<NewPasswordTypes>;
222
227
 
@@ -229,6 +234,12 @@ type ResetPasswordType = {
229
234
  allowRegister?: boolean;
230
235
  direction?: DirectionType;
231
236
  texts?: ResetPasswordTextsTypes;
237
+ /** If true, an error alert is displayed at the top of the form. */
238
+ showError?: boolean;
239
+ /** Title text of error alert. */
240
+ errorTitle?: string;
241
+ /** Description text of error alert. */
242
+ errorText?: string;
232
243
  };
233
244
  declare const ResetPasswordForm: FC<ResetPasswordType>;
234
245
 
@@ -3528,7 +3528,7 @@ var LoginForm = ({
3528
3528
  props.cardless && "!hawa-border-none !hawa-bg-transparent !hawa-shadow-none !hawa-drop-shadow-none"
3529
3529
  )
3530
3530
  },
3531
- /* @__PURE__ */ import_react13.default.createElement(CardContent, { headless: true, noPadding: props.cardless }, props.showError && /* @__PURE__ */ import_react13.default.createElement(
3531
+ /* @__PURE__ */ import_react13.default.createElement(CardContent, { headless: true, noPadding: props.cardless, className: "hawa-bg-red-400" }, props.showError && /* @__PURE__ */ import_react13.default.createElement(
3532
3532
  Alert,
3533
3533
  {
3534
3534
  direction: props.direction,
@@ -4203,7 +4203,7 @@ var NewPasswordForm = ({
4203
4203
  isLoading,
4204
4204
  ...props
4205
4205
  }) => {
4206
- var _a, _b, _c, _d, _e, _f, _g, _h, _i;
4206
+ var _a, _b, _c, _d, _e, _f, _g, _h;
4207
4207
  const formSchema = z3.object({
4208
4208
  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 }),
4209
4209
  confirm_password: z3.string({ required_error: (_d = texts == null ? void 0 : texts.confirm) == null ? void 0 : _d.required }).refine((value) => value !== "", {
@@ -4216,8 +4216,7 @@ var NewPasswordForm = ({
4216
4216
  const { handleSubmit, control, formState } = (0, import_react_hook_form3.useForm)({
4217
4217
  resolver: (0, import_zod3.zodResolver)(formSchema)
4218
4218
  });
4219
- const [matchError, setMatchError] = (0, import_react18.useState)(false);
4220
- 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(
4219
+ 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(
4221
4220
  "form",
4222
4221
  {
4223
4222
  noValidate: true,
@@ -4231,65 +4230,63 @@ var NewPasswordForm = ({
4231
4230
  }
4232
4231
  })
4233
4232
  },
4234
- !props.headless && /* @__PURE__ */ import_react18.default.createElement(CardHeader, null, /* @__PURE__ */ import_react18.default.createElement(CardTitle, null, "Create Password"), /* @__PURE__ */ import_react18.default.createElement(CardDescription, null, "Set a new password for your account")),
4235
- /* @__PURE__ */ import_react18.default.createElement(
4236
- CardContent,
4233
+ /* @__PURE__ */ import_react18.default.createElement(CardContent, { headless: true, className: "hawa-flex hawa-flex-col" }, props.showError && /* @__PURE__ */ import_react18.default.createElement(
4234
+ Alert,
4237
4235
  {
4238
- headless: props.headless,
4239
- className: "hawa-flex hawa-flex-col hawa-gap-4"
4240
- },
4241
- /* @__PURE__ */ import_react18.default.createElement(
4242
- import_react_hook_form3.Controller,
4243
- {
4244
- control,
4245
- name: "password",
4246
- render: ({ field }) => {
4247
- var _a2, _b2, _c2;
4248
- return /* @__PURE__ */ import_react18.default.createElement(
4249
- Input,
4250
- {
4251
- width: "full",
4252
- type: "password",
4253
- autoComplete: "new-password",
4254
- label: (_a2 = texts == null ? void 0 : texts.password) == null ? void 0 : _a2.label,
4255
- placeholder: (_b2 = texts == null ? void 0 : texts.password) == null ? void 0 : _b2.placeholder,
4256
- helperText: (_c2 = formState.errors.password) == null ? void 0 : _c2.message,
4257
- ...field
4258
- }
4259
- );
4260
- }
4236
+ direction: props.direction,
4237
+ title: props.errorTitle,
4238
+ text: props.errorText,
4239
+ severity: "error"
4240
+ }
4241
+ ), /* @__PURE__ */ import_react18.default.createElement("div", { className: "hawa-flex hawa-flex-col hawa-gap-4 hawa-mb-4" }, /* @__PURE__ */ import_react18.default.createElement(
4242
+ import_react_hook_form3.Controller,
4243
+ {
4244
+ control,
4245
+ name: "password",
4246
+ render: ({ field }) => {
4247
+ var _a2, _b2, _c2;
4248
+ return /* @__PURE__ */ import_react18.default.createElement(
4249
+ Input,
4250
+ {
4251
+ width: "full",
4252
+ type: "password",
4253
+ autoComplete: "new-password",
4254
+ label: (_a2 = texts == null ? void 0 : texts.password) == null ? void 0 : _a2.label,
4255
+ placeholder: (_b2 = texts == null ? void 0 : texts.password) == null ? void 0 : _b2.placeholder,
4256
+ helperText: (_c2 = formState.errors.password) == null ? void 0 : _c2.message,
4257
+ ...field
4258
+ }
4259
+ );
4261
4260
  }
4262
- ),
4263
- /* @__PURE__ */ import_react18.default.createElement(
4264
- import_react_hook_form3.Controller,
4265
- {
4266
- control,
4267
- name: "confirm_password",
4268
- render: ({ field }) => {
4269
- var _a2, _b2, _c2;
4270
- return /* @__PURE__ */ import_react18.default.createElement(
4271
- Input,
4272
- {
4273
- width: "full",
4274
- type: "password",
4275
- autoComplete: "new-password",
4276
- label: (_a2 = texts == null ? void 0 : texts.confirm) == null ? void 0 : _a2.label,
4277
- placeholder: (_b2 = texts == null ? void 0 : texts.confirm) == null ? void 0 : _b2.placeholder,
4278
- helperText: (_c2 = formState.errors.confirm_password) == null ? void 0 : _c2.message,
4279
- ...field
4280
- }
4281
- );
4282
- }
4261
+ }
4262
+ ), /* @__PURE__ */ import_react18.default.createElement(
4263
+ import_react_hook_form3.Controller,
4264
+ {
4265
+ control,
4266
+ name: "confirm_password",
4267
+ render: ({ field }) => {
4268
+ var _a2, _b2, _c2;
4269
+ return /* @__PURE__ */ import_react18.default.createElement(
4270
+ Input,
4271
+ {
4272
+ width: "full",
4273
+ type: "password",
4274
+ autoComplete: "new-password",
4275
+ label: (_a2 = texts == null ? void 0 : texts.confirm) == null ? void 0 : _a2.label,
4276
+ placeholder: (_b2 = texts == null ? void 0 : texts.confirm) == null ? void 0 : _b2.placeholder,
4277
+ helperText: (_c2 = formState.errors.confirm_password) == null ? void 0 : _c2.message,
4278
+ ...field
4279
+ }
4280
+ );
4283
4281
  }
4284
- )
4285
- ),
4286
- /* @__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(
4282
+ }
4283
+ )), /* @__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(
4287
4284
  "span",
4288
4285
  {
4289
4286
  className: "clickable-link",
4290
4287
  onClick: props.handleRouteToRegister
4291
4288
  },
4292
- (_i = texts == null ? void 0 : texts.registerText) != null ? _i : "Register"
4289
+ (_h = texts == null ? void 0 : texts.registerText) != null ? _h : "Register"
4293
4290
  )))
4294
4291
  ));
4295
4292
  };
@@ -4325,7 +4322,15 @@ var ResetPasswordForm = ({
4325
4322
  }
4326
4323
  })
4327
4324
  },
4328
- /* @__PURE__ */ import_react19.default.createElement(CardContent, { headless: props.headless, className: "hawa-pb-4" }, /* @__PURE__ */ import_react19.default.createElement(
4325
+ /* @__PURE__ */ import_react19.default.createElement(CardContent, { headless: props.headless, className: "hawa-pb-4" }, props.showError && /* @__PURE__ */ import_react19.default.createElement(
4326
+ Alert,
4327
+ {
4328
+ direction: props.direction,
4329
+ title: props.errorTitle,
4330
+ text: props.errorText,
4331
+ severity: "error"
4332
+ }
4333
+ ), /* @__PURE__ */ import_react19.default.createElement(
4329
4334
  import_react_hook_form4.Controller,
4330
4335
  {
4331
4336
  control,
@@ -2631,7 +2631,7 @@ var LoginForm = ({
2631
2631
  props.cardless && "!hawa-border-none !hawa-bg-transparent !hawa-shadow-none !hawa-drop-shadow-none"
2632
2632
  )
2633
2633
  },
2634
- /* @__PURE__ */ React5.createElement(CardContent, { headless: true, noPadding: props.cardless }, props.showError && /* @__PURE__ */ React5.createElement(
2634
+ /* @__PURE__ */ React5.createElement(CardContent, { headless: true, noPadding: props.cardless, className: "hawa-bg-red-400" }, props.showError && /* @__PURE__ */ React5.createElement(
2635
2635
  Alert,
2636
2636
  {
2637
2637
  direction: props.direction,
@@ -3288,7 +3288,7 @@ var CheckEmail = ({ texts, handleResend }) => {
3288
3288
  };
3289
3289
 
3290
3290
  // blocks/auth/NewPassword.tsx
3291
- import React10, { useState as useState5 } from "react";
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, _i;
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
- const [matchError, setMatchError] = useState5(false);
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
- !props.headless && /* @__PURE__ */ React10.createElement(CardHeader, null, /* @__PURE__ */ React10.createElement(CardTitle, null, "Create Password"), /* @__PURE__ */ React10.createElement(CardDescription, null, "Set a new password for your account")),
3329
- /* @__PURE__ */ React10.createElement(
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
- headless: props.headless,
3333
- className: "hawa-flex hawa-flex-col hawa-gap-4"
3334
- },
3335
- /* @__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
- );
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
- /* @__PURE__ */ React10.createElement(
3358
- Controller3,
3359
- {
3360
- control,
3361
- name: "confirm_password",
3362
- render: ({ field }) => {
3363
- var _a2, _b2, _c2;
3364
- return /* @__PURE__ */ React10.createElement(
3365
- Input,
3366
- {
3367
- width: "full",
3368
- type: "password",
3369
- autoComplete: "new-password",
3370
- label: (_a2 = texts == null ? void 0 : texts.confirm) == null ? void 0 : _a2.label,
3371
- placeholder: (_b2 = texts == null ? void 0 : texts.confirm) == null ? void 0 : _b2.placeholder,
3372
- helperText: (_c2 = formState.errors.confirm_password) == null ? void 0 : _c2.message,
3373
- ...field
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
- (_i = texts == null ? void 0 : texts.registerText) != null ? _i : "Register"
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 useState7 } from "react";
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 useState6 } from "react";
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] = useState6(Array.from(Array(digits)));
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] = useState7(null);
3560
- const [remainingTime, setRemainingTime] = useState7(0);
3561
- const [showResendTimer, setShowResendTimer] = useState7(false);
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);
@@ -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
- passwordChanged: any;
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
 
@@ -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
- passwordChanged: any;
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