@sikka/hawa 0.49.12-next → 0.49.14-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.
Files changed (68) hide show
  1. package/dist/appLayout/index.js +0 -2
  2. package/dist/appLayout/index.js.map +1 -1
  3. package/dist/appLayout/index.mjs +0 -2
  4. package/dist/appLayout/index.mjs.map +1 -1
  5. package/dist/appTopbar/index.js +0 -2
  6. package/dist/appTopbar/index.js.map +1 -1
  7. package/dist/appTopbar/index.mjs +0 -2
  8. package/dist/appTopbar/index.mjs.map +1 -1
  9. package/dist/blocks/auth/index.d.mts +2 -0
  10. package/dist/blocks/auth/index.d.ts +2 -0
  11. package/dist/blocks/auth/index.js +39 -16
  12. package/dist/blocks/auth/index.mjs +40 -17
  13. package/dist/blocks/index.d.mts +2 -0
  14. package/dist/blocks/index.d.ts +2 -0
  15. package/dist/blocks/index.js +39 -18
  16. package/dist/blocks/index.mjs +30 -8
  17. package/dist/blocks/misc/index.js +0 -1
  18. package/dist/blocks/misc/index.mjs +0 -1
  19. package/dist/{chunk-WQR4XZGL.mjs → chunk-3AANFRLZ.mjs} +0 -2
  20. package/dist/{chunk-BV3MFTYE.mjs → chunk-FTS7YP7U.mjs} +15 -15
  21. package/dist/{chunk-3CHFVHTW.mjs → chunk-QQ7C5DWR.mjs} +1 -1
  22. package/dist/{chunk-KDGJZPWK.mjs → chunk-YGLAEAJY.mjs} +0 -1
  23. package/dist/combobox/index.js +0 -1
  24. package/dist/combobox/index.js.map +1 -1
  25. package/dist/combobox/index.mjs +0 -1
  26. package/dist/combobox/index.mjs.map +1 -1
  27. package/dist/command/index.js +0 -1
  28. package/dist/command/index.js.map +1 -1
  29. package/dist/command/index.mjs +0 -1
  30. package/dist/command/index.mjs.map +1 -1
  31. package/dist/dataTable/index.js +0 -1
  32. package/dist/dataTable/index.js.map +1 -1
  33. package/dist/dataTable/index.mjs +0 -1
  34. package/dist/dataTable/index.mjs.map +1 -1
  35. package/dist/dialog/index.js +0 -1
  36. package/dist/dialog/index.js.map +1 -1
  37. package/dist/dialog/index.mjs +0 -1
  38. package/dist/dialog/index.mjs.map +1 -1
  39. package/dist/dropdownMenu/index.js +0 -1
  40. package/dist/dropdownMenu/index.js.map +1 -1
  41. package/dist/dropdownMenu/index.mjs +0 -1
  42. package/dist/dropdownMenu/index.mjs.map +1 -1
  43. package/dist/elements/index.js +13 -15
  44. package/dist/elements/index.mjs +4 -5
  45. package/dist/hooks/index.js +0 -2
  46. package/dist/hooks/index.mjs +1 -1
  47. package/dist/index.css +108 -110
  48. package/dist/index.d.mts +2 -0
  49. package/dist/index.d.ts +2 -0
  50. package/dist/index.js +39 -23
  51. package/dist/index.mjs +40 -24
  52. package/dist/layout/index.js +0 -3
  53. package/dist/layout/index.mjs +2 -4
  54. package/dist/phoneInput/index.js.map +1 -1
  55. package/dist/phoneInput/index.mjs.map +1 -1
  56. package/dist/pinInput/index.js +13 -13
  57. package/dist/pinInput/index.js.map +1 -1
  58. package/dist/pinInput/index.mjs +13 -13
  59. package/dist/pinInput/index.mjs.map +1 -1
  60. package/dist/select/index.js.map +1 -1
  61. package/dist/select/index.mjs.map +1 -1
  62. package/dist/splitButton/index.js +0 -1
  63. package/dist/splitButton/index.js.map +1 -1
  64. package/dist/splitButton/index.mjs +0 -1
  65. package/dist/splitButton/index.mjs.map +1 -1
  66. package/dist/tabs/index.js.map +1 -1
  67. package/dist/tabs/index.mjs.map +1 -1
  68. package/package.json +14 -14
@@ -4395,7 +4395,6 @@ var RegisterForm = ({
4395
4395
  resolver: (0, import_zod2.zodResolver)(finalSchema)
4396
4396
  });
4397
4397
  const onSubmit = (data) => {
4398
- console.log("Form submitted with data:", data);
4399
4398
  if (props.onRegister) {
4400
4399
  props.onRegister(data);
4401
4400
  } else {
@@ -5049,19 +5048,19 @@ var z5 = __toESM(require("zod"));
5049
5048
  var React36 = __toESM(require("react"));
5050
5049
  var import_input_otp = require("input-otp");
5051
5050
 
5052
- // ../../node_modules/.pnpm/lucide-react@0.436.0_react@18.3.1/node_modules/lucide-react/dist/esm/createLucideIcon.js
5051
+ // ../../node_modules/.pnpm/lucide-react@0.441.0_react@18.3.1/node_modules/lucide-react/dist/esm/createLucideIcon.js
5053
5052
  var import_react43 = require("react");
5054
5053
 
5055
- // ../../node_modules/.pnpm/lucide-react@0.436.0_react@18.3.1/node_modules/lucide-react/dist/esm/shared/src/utils.js
5054
+ // ../../node_modules/.pnpm/lucide-react@0.441.0_react@18.3.1/node_modules/lucide-react/dist/esm/shared/src/utils.js
5056
5055
  var toKebabCase = (string6) => string6.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
5057
5056
  var mergeClasses = (...classes) => classes.filter((className, index, array) => {
5058
5057
  return Boolean(className) && array.indexOf(className) === index;
5059
5058
  }).join(" ");
5060
5059
 
5061
- // ../../node_modules/.pnpm/lucide-react@0.436.0_react@18.3.1/node_modules/lucide-react/dist/esm/Icon.js
5060
+ // ../../node_modules/.pnpm/lucide-react@0.441.0_react@18.3.1/node_modules/lucide-react/dist/esm/Icon.js
5062
5061
  var import_react42 = require("react");
5063
5062
 
5064
- // ../../node_modules/.pnpm/lucide-react@0.436.0_react@18.3.1/node_modules/lucide-react/dist/esm/defaultAttributes.js
5063
+ // ../../node_modules/.pnpm/lucide-react@0.441.0_react@18.3.1/node_modules/lucide-react/dist/esm/defaultAttributes.js
5065
5064
  var defaultAttributes = {
5066
5065
  xmlns: "http://www.w3.org/2000/svg",
5067
5066
  width: 24,
@@ -5074,7 +5073,7 @@ var defaultAttributes = {
5074
5073
  strokeLinejoin: "round"
5075
5074
  };
5076
5075
 
5077
- // ../../node_modules/.pnpm/lucide-react@0.436.0_react@18.3.1/node_modules/lucide-react/dist/esm/Icon.js
5076
+ // ../../node_modules/.pnpm/lucide-react@0.441.0_react@18.3.1/node_modules/lucide-react/dist/esm/Icon.js
5078
5077
  var Icon = (0, import_react42.forwardRef)(
5079
5078
  ({
5080
5079
  color = "currentColor",
@@ -5106,7 +5105,7 @@ var Icon = (0, import_react42.forwardRef)(
5106
5105
  }
5107
5106
  );
5108
5107
 
5109
- // ../../node_modules/.pnpm/lucide-react@0.436.0_react@18.3.1/node_modules/lucide-react/dist/esm/createLucideIcon.js
5108
+ // ../../node_modules/.pnpm/lucide-react@0.441.0_react@18.3.1/node_modules/lucide-react/dist/esm/createLucideIcon.js
5110
5109
  var createLucideIcon = (iconName, iconNode) => {
5111
5110
  const Component = (0, import_react43.forwardRef)(
5112
5111
  ({ className, ...props }, ref) => (0, import_react43.createElement)(Icon, {
@@ -5120,7 +5119,7 @@ var createLucideIcon = (iconName, iconNode) => {
5120
5119
  return Component;
5121
5120
  };
5122
5121
 
5123
- // ../../node_modules/.pnpm/lucide-react@0.436.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/dot.js
5122
+ // ../../node_modules/.pnpm/lucide-react@0.441.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/dot.js
5124
5123
  var Dot = createLucideIcon("Dot", [
5125
5124
  ["circle", { cx: "12.1", cy: "12.1", r: "1", key: "18d7e5" }]
5126
5125
  ]);
@@ -5178,7 +5177,11 @@ var PinInput = ({ separatorPosition = 0, ...props }) => {
5178
5177
  };
5179
5178
 
5180
5179
  // blocks/auth/CodeConfirmation.tsx
5181
- var CodeConfirmation = ({ codeLength = 6, ...props }) => {
5180
+ var CodeConfirmation = ({
5181
+ autoSubmit = false,
5182
+ codeLength = 6,
5183
+ ...props
5184
+ }) => {
5182
5185
  var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k;
5183
5186
  const formSchema = z5.object({
5184
5187
  otp_code: z5.string({ required_error: (_a = props.texts) == null ? void 0 : _a.codeRequiredText }).min(codeLength, { message: (_b = props.texts) == null ? void 0 : _b.codeTooShort })
@@ -5217,6 +5220,18 @@ var CodeConfirmation = ({ codeLength = 6, ...props }) => {
5217
5220
  }
5218
5221
  };
5219
5222
  }, []);
5223
+ const otpCode = (0, import_react_hook_form5.useWatch)({ control, name: "otp_code" });
5224
+ (0, import_react44.useEffect)(() => {
5225
+ if (autoSubmit && (otpCode == null ? void 0 : otpCode.length) === codeLength) {
5226
+ handleSubmit((e) => {
5227
+ if (props.onConfirm) {
5228
+ return props.onConfirm(e);
5229
+ } else {
5230
+ console.log("Form is submitted but onConfirm prop is missing");
5231
+ }
5232
+ })();
5233
+ }
5234
+ }, [otpCode, autoSubmit, codeLength]);
5220
5235
  return /* @__PURE__ */ import_react44.default.createElement(
5221
5236
  Card,
5222
5237
  {
@@ -5224,7 +5239,15 @@ var CodeConfirmation = ({ codeLength = 6, ...props }) => {
5224
5239
  props.cardless && "hawa-border-none hawa-bg-transparent !hawa-shadow-none !hawa-drop-shadow-none"
5225
5240
  )
5226
5241
  },
5227
- /* @__PURE__ */ import_react44.default.createElement(CardContent, { headless: true, noPadding: props.cardless }, props.showError && /* @__PURE__ */ import_react44.default.createElement(Alert, { title: props.errorTitle, text: props.errorText, severity: "error" }), /* @__PURE__ */ import_react44.default.createElement("div", { className: "hawa-mb-4 dark:hawa-text-white" }, /* @__PURE__ */ import_react44.default.createElement("div", { className: "hawa-text-lg hawa-font-bold" }, ((_c = props.texts) == null ? void 0 : _c.checkYourIdentifier) || "Please check your phone"), /* @__PURE__ */ import_react44.default.createElement("div", { className: "hawa-text-muted-foreground hawa-flex hawa-flex-row" }, /* @__PURE__ */ import_react44.default.createElement("span", null, `${(_d = props.texts) == null ? void 0 : _d.weSentCode} ` || `We've sent a code to `, /* @__PURE__ */ import_react44.default.createElement("span", { dir: "ltr" }, props.identifier)))), /* @__PURE__ */ import_react44.default.createElement(
5242
+ /* @__PURE__ */ import_react44.default.createElement(CardContent, { headless: true, noPadding: props.cardless }, props.showError && /* @__PURE__ */ import_react44.default.createElement(
5243
+ Alert,
5244
+ {
5245
+ direction: props.direction || "ltr",
5246
+ title: props.errorTitle,
5247
+ text: props.errorText,
5248
+ severity: "error"
5249
+ }
5250
+ ), /* @__PURE__ */ import_react44.default.createElement("div", { className: "hawa-mb-4 dark:hawa-text-white" }, /* @__PURE__ */ import_react44.default.createElement("div", { className: "hawa-text-lg hawa-font-bold" }, ((_c = props.texts) == null ? void 0 : _c.checkYourIdentifier) || "Please check your phone"), /* @__PURE__ */ import_react44.default.createElement("div", { className: "hawa-text-muted-foreground hawa-flex hawa-flex-row" }, /* @__PURE__ */ import_react44.default.createElement("span", null, `${(_d = props.texts) == null ? void 0 : _d.weSentCode} ` || `We've sent a code to `, /* @__PURE__ */ import_react44.default.createElement("span", { dir: "ltr" }, props.identifier)))), /* @__PURE__ */ import_react44.default.createElement(
5228
5251
  "form",
5229
5252
  {
5230
5253
  noValidate: true,
@@ -5298,7 +5321,7 @@ var CodeConfirmation = ({ codeLength = 6, ...props }) => {
5298
5321
 
5299
5322
  lucide-react/dist/esm/shared/src/utils.js:
5300
5323
  (**
5301
- * @license lucide-react v0.436.0 - ISC
5324
+ * @license lucide-react v0.441.0 - ISC
5302
5325
  *
5303
5326
  * This source code is licensed under the ISC license.
5304
5327
  * See the LICENSE file in the root directory of this source tree.
@@ -5306,7 +5329,7 @@ lucide-react/dist/esm/shared/src/utils.js:
5306
5329
 
5307
5330
  lucide-react/dist/esm/defaultAttributes.js:
5308
5331
  (**
5309
- * @license lucide-react v0.436.0 - ISC
5332
+ * @license lucide-react v0.441.0 - ISC
5310
5333
  *
5311
5334
  * This source code is licensed under the ISC license.
5312
5335
  * See the LICENSE file in the root directory of this source tree.
@@ -5314,7 +5337,7 @@ lucide-react/dist/esm/defaultAttributes.js:
5314
5337
 
5315
5338
  lucide-react/dist/esm/Icon.js:
5316
5339
  (**
5317
- * @license lucide-react v0.436.0 - ISC
5340
+ * @license lucide-react v0.441.0 - ISC
5318
5341
  *
5319
5342
  * This source code is licensed under the ISC license.
5320
5343
  * See the LICENSE file in the root directory of this source tree.
@@ -5322,7 +5345,7 @@ lucide-react/dist/esm/Icon.js:
5322
5345
 
5323
5346
  lucide-react/dist/esm/createLucideIcon.js:
5324
5347
  (**
5325
- * @license lucide-react v0.436.0 - ISC
5348
+ * @license lucide-react v0.441.0 - ISC
5326
5349
  *
5327
5350
  * This source code is licensed under the ISC license.
5328
5351
  * See the LICENSE file in the root directory of this source tree.
@@ -5330,7 +5353,7 @@ lucide-react/dist/esm/createLucideIcon.js:
5330
5353
 
5331
5354
  lucide-react/dist/esm/icons/dot.js:
5332
5355
  (**
5333
- * @license lucide-react v0.436.0 - ISC
5356
+ * @license lucide-react v0.441.0 - ISC
5334
5357
  *
5335
5358
  * This source code is licensed under the ISC license.
5336
5359
  * See the LICENSE file in the root directory of this source tree.
@@ -5338,7 +5361,7 @@ lucide-react/dist/esm/icons/dot.js:
5338
5361
 
5339
5362
  lucide-react/dist/esm/lucide-react.js:
5340
5363
  (**
5341
- * @license lucide-react v0.436.0 - ISC
5364
+ * @license lucide-react v0.441.0 - ISC
5342
5365
  *
5343
5366
  * This source code is licensed under the ISC license.
5344
5367
  * See the LICENSE file in the root directory of this source tree.
@@ -3017,7 +3017,6 @@ var RegisterForm = ({
3017
3017
  resolver: zodResolver2(finalSchema)
3018
3018
  });
3019
3019
  const onSubmit = (data) => {
3020
- console.log("Form submitted with data:", data);
3021
3020
  if (props.onRegister) {
3022
3021
  props.onRegister(data);
3023
3022
  } else {
@@ -3663,7 +3662,7 @@ var ResetPasswordForm = ({
3663
3662
 
3664
3663
  // blocks/auth/CodeConfirmation.tsx
3665
3664
  import React13, { useEffect as useEffect3, useState as useState5 } from "react";
3666
- import { Controller as Controller5, useForm as useForm5 } from "react-hook-form";
3665
+ import { Controller as Controller5, useForm as useForm5, useWatch } from "react-hook-form";
3667
3666
  import { zodResolver as zodResolver5 } from "@hookform/resolvers/zod";
3668
3667
  import * as z5 from "zod";
3669
3668
 
@@ -3671,19 +3670,19 @@ import * as z5 from "zod";
3671
3670
  import * as React12 from "react";
3672
3671
  import { OTPInput, OTPInputContext } from "input-otp";
3673
3672
 
3674
- // ../../node_modules/.pnpm/lucide-react@0.436.0_react@18.3.1/node_modules/lucide-react/dist/esm/createLucideIcon.js
3673
+ // ../../node_modules/.pnpm/lucide-react@0.441.0_react@18.3.1/node_modules/lucide-react/dist/esm/createLucideIcon.js
3675
3674
  import { forwardRef as forwardRef3, createElement as createElement3 } from "react";
3676
3675
 
3677
- // ../../node_modules/.pnpm/lucide-react@0.436.0_react@18.3.1/node_modules/lucide-react/dist/esm/shared/src/utils.js
3676
+ // ../../node_modules/.pnpm/lucide-react@0.441.0_react@18.3.1/node_modules/lucide-react/dist/esm/shared/src/utils.js
3678
3677
  var toKebabCase = (string6) => string6.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
3679
3678
  var mergeClasses = (...classes) => classes.filter((className, index, array) => {
3680
3679
  return Boolean(className) && array.indexOf(className) === index;
3681
3680
  }).join(" ");
3682
3681
 
3683
- // ../../node_modules/.pnpm/lucide-react@0.436.0_react@18.3.1/node_modules/lucide-react/dist/esm/Icon.js
3682
+ // ../../node_modules/.pnpm/lucide-react@0.441.0_react@18.3.1/node_modules/lucide-react/dist/esm/Icon.js
3684
3683
  import { forwardRef as forwardRef2, createElement as createElement2 } from "react";
3685
3684
 
3686
- // ../../node_modules/.pnpm/lucide-react@0.436.0_react@18.3.1/node_modules/lucide-react/dist/esm/defaultAttributes.js
3685
+ // ../../node_modules/.pnpm/lucide-react@0.441.0_react@18.3.1/node_modules/lucide-react/dist/esm/defaultAttributes.js
3687
3686
  var defaultAttributes = {
3688
3687
  xmlns: "http://www.w3.org/2000/svg",
3689
3688
  width: 24,
@@ -3696,7 +3695,7 @@ var defaultAttributes = {
3696
3695
  strokeLinejoin: "round"
3697
3696
  };
3698
3697
 
3699
- // ../../node_modules/.pnpm/lucide-react@0.436.0_react@18.3.1/node_modules/lucide-react/dist/esm/Icon.js
3698
+ // ../../node_modules/.pnpm/lucide-react@0.441.0_react@18.3.1/node_modules/lucide-react/dist/esm/Icon.js
3700
3699
  var Icon = forwardRef2(
3701
3700
  ({
3702
3701
  color = "currentColor",
@@ -3728,7 +3727,7 @@ var Icon = forwardRef2(
3728
3727
  }
3729
3728
  );
3730
3729
 
3731
- // ../../node_modules/.pnpm/lucide-react@0.436.0_react@18.3.1/node_modules/lucide-react/dist/esm/createLucideIcon.js
3730
+ // ../../node_modules/.pnpm/lucide-react@0.441.0_react@18.3.1/node_modules/lucide-react/dist/esm/createLucideIcon.js
3732
3731
  var createLucideIcon = (iconName, iconNode) => {
3733
3732
  const Component = forwardRef3(
3734
3733
  ({ className, ...props }, ref) => createElement3(Icon, {
@@ -3742,7 +3741,7 @@ var createLucideIcon = (iconName, iconNode) => {
3742
3741
  return Component;
3743
3742
  };
3744
3743
 
3745
- // ../../node_modules/.pnpm/lucide-react@0.436.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/dot.js
3744
+ // ../../node_modules/.pnpm/lucide-react@0.441.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/dot.js
3746
3745
  var Dot = createLucideIcon("Dot", [
3747
3746
  ["circle", { cx: "12.1", cy: "12.1", r: "1", key: "18d7e5" }]
3748
3747
  ]);
@@ -3800,7 +3799,11 @@ var PinInput = ({ separatorPosition = 0, ...props }) => {
3800
3799
  };
3801
3800
 
3802
3801
  // blocks/auth/CodeConfirmation.tsx
3803
- var CodeConfirmation = ({ codeLength = 6, ...props }) => {
3802
+ var CodeConfirmation = ({
3803
+ autoSubmit = false,
3804
+ codeLength = 6,
3805
+ ...props
3806
+ }) => {
3804
3807
  var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k;
3805
3808
  const formSchema = z5.object({
3806
3809
  otp_code: z5.string({ required_error: (_a = props.texts) == null ? void 0 : _a.codeRequiredText }).min(codeLength, { message: (_b = props.texts) == null ? void 0 : _b.codeTooShort })
@@ -3839,6 +3842,18 @@ var CodeConfirmation = ({ codeLength = 6, ...props }) => {
3839
3842
  }
3840
3843
  };
3841
3844
  }, []);
3845
+ const otpCode = useWatch({ control, name: "otp_code" });
3846
+ useEffect3(() => {
3847
+ if (autoSubmit && (otpCode == null ? void 0 : otpCode.length) === codeLength) {
3848
+ handleSubmit((e) => {
3849
+ if (props.onConfirm) {
3850
+ return props.onConfirm(e);
3851
+ } else {
3852
+ console.log("Form is submitted but onConfirm prop is missing");
3853
+ }
3854
+ })();
3855
+ }
3856
+ }, [otpCode, autoSubmit, codeLength]);
3842
3857
  return /* @__PURE__ */ React13.createElement(
3843
3858
  Card,
3844
3859
  {
@@ -3846,7 +3861,15 @@ var CodeConfirmation = ({ codeLength = 6, ...props }) => {
3846
3861
  props.cardless && "hawa-border-none hawa-bg-transparent !hawa-shadow-none !hawa-drop-shadow-none"
3847
3862
  )
3848
3863
  },
3849
- /* @__PURE__ */ React13.createElement(CardContent, { headless: true, noPadding: props.cardless }, props.showError && /* @__PURE__ */ React13.createElement(Alert, { title: props.errorTitle, text: props.errorText, severity: "error" }), /* @__PURE__ */ React13.createElement("div", { className: "hawa-mb-4 dark:hawa-text-white" }, /* @__PURE__ */ React13.createElement("div", { className: "hawa-text-lg hawa-font-bold" }, ((_c = props.texts) == null ? void 0 : _c.checkYourIdentifier) || "Please check your phone"), /* @__PURE__ */ React13.createElement("div", { className: "hawa-text-muted-foreground hawa-flex hawa-flex-row" }, /* @__PURE__ */ React13.createElement("span", null, `${(_d = props.texts) == null ? void 0 : _d.weSentCode} ` || `We've sent a code to `, /* @__PURE__ */ React13.createElement("span", { dir: "ltr" }, props.identifier)))), /* @__PURE__ */ React13.createElement(
3864
+ /* @__PURE__ */ React13.createElement(CardContent, { headless: true, noPadding: props.cardless }, props.showError && /* @__PURE__ */ React13.createElement(
3865
+ Alert,
3866
+ {
3867
+ direction: props.direction || "ltr",
3868
+ title: props.errorTitle,
3869
+ text: props.errorText,
3870
+ severity: "error"
3871
+ }
3872
+ ), /* @__PURE__ */ React13.createElement("div", { className: "hawa-mb-4 dark:hawa-text-white" }, /* @__PURE__ */ React13.createElement("div", { className: "hawa-text-lg hawa-font-bold" }, ((_c = props.texts) == null ? void 0 : _c.checkYourIdentifier) || "Please check your phone"), /* @__PURE__ */ React13.createElement("div", { className: "hawa-text-muted-foreground hawa-flex hawa-flex-row" }, /* @__PURE__ */ React13.createElement("span", null, `${(_d = props.texts) == null ? void 0 : _d.weSentCode} ` || `We've sent a code to `, /* @__PURE__ */ React13.createElement("span", { dir: "ltr" }, props.identifier)))), /* @__PURE__ */ React13.createElement(
3850
3873
  "form",
3851
3874
  {
3852
3875
  noValidate: true,
@@ -3919,7 +3942,7 @@ export {
3919
3942
 
3920
3943
  lucide-react/dist/esm/shared/src/utils.js:
3921
3944
  (**
3922
- * @license lucide-react v0.436.0 - ISC
3945
+ * @license lucide-react v0.441.0 - ISC
3923
3946
  *
3924
3947
  * This source code is licensed under the ISC license.
3925
3948
  * See the LICENSE file in the root directory of this source tree.
@@ -3927,7 +3950,7 @@ lucide-react/dist/esm/shared/src/utils.js:
3927
3950
 
3928
3951
  lucide-react/dist/esm/defaultAttributes.js:
3929
3952
  (**
3930
- * @license lucide-react v0.436.0 - ISC
3953
+ * @license lucide-react v0.441.0 - ISC
3931
3954
  *
3932
3955
  * This source code is licensed under the ISC license.
3933
3956
  * See the LICENSE file in the root directory of this source tree.
@@ -3935,7 +3958,7 @@ lucide-react/dist/esm/defaultAttributes.js:
3935
3958
 
3936
3959
  lucide-react/dist/esm/Icon.js:
3937
3960
  (**
3938
- * @license lucide-react v0.436.0 - ISC
3961
+ * @license lucide-react v0.441.0 - ISC
3939
3962
  *
3940
3963
  * This source code is licensed under the ISC license.
3941
3964
  * See the LICENSE file in the root directory of this source tree.
@@ -3943,7 +3966,7 @@ lucide-react/dist/esm/Icon.js:
3943
3966
 
3944
3967
  lucide-react/dist/esm/createLucideIcon.js:
3945
3968
  (**
3946
- * @license lucide-react v0.436.0 - ISC
3969
+ * @license lucide-react v0.441.0 - ISC
3947
3970
  *
3948
3971
  * This source code is licensed under the ISC license.
3949
3972
  * See the LICENSE file in the root directory of this source tree.
@@ -3951,7 +3974,7 @@ lucide-react/dist/esm/createLucideIcon.js:
3951
3974
 
3952
3975
  lucide-react/dist/esm/icons/dot.js:
3953
3976
  (**
3954
- * @license lucide-react v0.436.0 - ISC
3977
+ * @license lucide-react v0.441.0 - ISC
3955
3978
  *
3956
3979
  * This source code is licensed under the ISC license.
3957
3980
  * See the LICENSE file in the root directory of this source tree.
@@ -3959,7 +3982,7 @@ lucide-react/dist/esm/icons/dot.js:
3959
3982
 
3960
3983
  lucide-react/dist/esm/lucide-react.js:
3961
3984
  (**
3962
- * @license lucide-react v0.436.0 - ISC
3985
+ * @license lucide-react v0.441.0 - ISC
3963
3986
  *
3964
3987
  * This source code is licensed under the ISC license.
3965
3988
  * See the LICENSE file in the root directory of this source tree.
@@ -275,6 +275,7 @@ type TConfirmation = {
275
275
  showError?: any;
276
276
  errorTitle?: any;
277
277
  errorText?: any;
278
+ direction?: "ltr" | "rtl";
278
279
  identifier?: string;
279
280
  confirmLoading?: boolean;
280
281
  onConfirm?: any;
@@ -282,6 +283,7 @@ type TConfirmation = {
282
283
  onCancel?: any;
283
284
  cardless?: boolean;
284
285
  codeLength?: number;
286
+ autoSubmit?: boolean;
285
287
  };
286
288
  declare const CodeConfirmation: FC<TConfirmation>;
287
289
 
@@ -275,6 +275,7 @@ type TConfirmation = {
275
275
  showError?: any;
276
276
  errorTitle?: any;
277
277
  errorText?: any;
278
+ direction?: "ltr" | "rtl";
278
279
  identifier?: string;
279
280
  confirmLoading?: boolean;
280
281
  onConfirm?: any;
@@ -282,6 +283,7 @@ type TConfirmation = {
282
283
  onCancel?: any;
283
284
  cardless?: boolean;
284
285
  codeLength?: number;
286
+ autoSubmit?: boolean;
285
287
  };
286
288
  declare const CodeConfirmation: FC<TConfirmation>;
287
289
 
@@ -4570,7 +4570,6 @@ var RegisterForm = ({
4570
4570
  resolver: (0, import_zod2.zodResolver)(finalSchema)
4571
4571
  });
4572
4572
  const onSubmit = (data) => {
4573
- console.log("Form submitted with data:", data);
4574
4573
  if (props.onRegister) {
4575
4574
  props.onRegister(data);
4576
4575
  } else {
@@ -5224,19 +5223,19 @@ var z5 = __toESM(require("zod"));
5224
5223
  var React36 = __toESM(require("react"));
5225
5224
  var import_input_otp = require("input-otp");
5226
5225
 
5227
- // ../../node_modules/.pnpm/lucide-react@0.436.0_react@18.3.1/node_modules/lucide-react/dist/esm/createLucideIcon.js
5226
+ // ../../node_modules/.pnpm/lucide-react@0.441.0_react@18.3.1/node_modules/lucide-react/dist/esm/createLucideIcon.js
5228
5227
  var import_react43 = require("react");
5229
5228
 
5230
- // ../../node_modules/.pnpm/lucide-react@0.436.0_react@18.3.1/node_modules/lucide-react/dist/esm/shared/src/utils.js
5229
+ // ../../node_modules/.pnpm/lucide-react@0.441.0_react@18.3.1/node_modules/lucide-react/dist/esm/shared/src/utils.js
5231
5230
  var toKebabCase = (string9) => string9.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
5232
5231
  var mergeClasses = (...classes) => classes.filter((className, index, array) => {
5233
5232
  return Boolean(className) && array.indexOf(className) === index;
5234
5233
  }).join(" ");
5235
5234
 
5236
- // ../../node_modules/.pnpm/lucide-react@0.436.0_react@18.3.1/node_modules/lucide-react/dist/esm/Icon.js
5235
+ // ../../node_modules/.pnpm/lucide-react@0.441.0_react@18.3.1/node_modules/lucide-react/dist/esm/Icon.js
5237
5236
  var import_react42 = require("react");
5238
5237
 
5239
- // ../../node_modules/.pnpm/lucide-react@0.436.0_react@18.3.1/node_modules/lucide-react/dist/esm/defaultAttributes.js
5238
+ // ../../node_modules/.pnpm/lucide-react@0.441.0_react@18.3.1/node_modules/lucide-react/dist/esm/defaultAttributes.js
5240
5239
  var defaultAttributes = {
5241
5240
  xmlns: "http://www.w3.org/2000/svg",
5242
5241
  width: 24,
@@ -5249,7 +5248,7 @@ var defaultAttributes = {
5249
5248
  strokeLinejoin: "round"
5250
5249
  };
5251
5250
 
5252
- // ../../node_modules/.pnpm/lucide-react@0.436.0_react@18.3.1/node_modules/lucide-react/dist/esm/Icon.js
5251
+ // ../../node_modules/.pnpm/lucide-react@0.441.0_react@18.3.1/node_modules/lucide-react/dist/esm/Icon.js
5253
5252
  var Icon = (0, import_react42.forwardRef)(
5254
5253
  ({
5255
5254
  color = "currentColor",
@@ -5281,7 +5280,7 @@ var Icon = (0, import_react42.forwardRef)(
5281
5280
  }
5282
5281
  );
5283
5282
 
5284
- // ../../node_modules/.pnpm/lucide-react@0.436.0_react@18.3.1/node_modules/lucide-react/dist/esm/createLucideIcon.js
5283
+ // ../../node_modules/.pnpm/lucide-react@0.441.0_react@18.3.1/node_modules/lucide-react/dist/esm/createLucideIcon.js
5285
5284
  var createLucideIcon = (iconName, iconNode) => {
5286
5285
  const Component = (0, import_react43.forwardRef)(
5287
5286
  ({ className, ...props }, ref) => (0, import_react43.createElement)(Icon, {
@@ -5295,7 +5294,7 @@ var createLucideIcon = (iconName, iconNode) => {
5295
5294
  return Component;
5296
5295
  };
5297
5296
 
5298
- // ../../node_modules/.pnpm/lucide-react@0.436.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/dot.js
5297
+ // ../../node_modules/.pnpm/lucide-react@0.441.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/dot.js
5299
5298
  var Dot = createLucideIcon("Dot", [
5300
5299
  ["circle", { cx: "12.1", cy: "12.1", r: "1", key: "18d7e5" }]
5301
5300
  ]);
@@ -5353,7 +5352,11 @@ var PinInput = ({ separatorPosition = 0, ...props }) => {
5353
5352
  };
5354
5353
 
5355
5354
  // blocks/auth/CodeConfirmation.tsx
5356
- var CodeConfirmation = ({ codeLength = 6, ...props }) => {
5355
+ var CodeConfirmation = ({
5356
+ autoSubmit = false,
5357
+ codeLength = 6,
5358
+ ...props
5359
+ }) => {
5357
5360
  var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k;
5358
5361
  const formSchema = z5.object({
5359
5362
  otp_code: z5.string({ required_error: (_a = props.texts) == null ? void 0 : _a.codeRequiredText }).min(codeLength, { message: (_b = props.texts) == null ? void 0 : _b.codeTooShort })
@@ -5392,6 +5395,18 @@ var CodeConfirmation = ({ codeLength = 6, ...props }) => {
5392
5395
  }
5393
5396
  };
5394
5397
  }, []);
5398
+ const otpCode = (0, import_react_hook_form5.useWatch)({ control, name: "otp_code" });
5399
+ (0, import_react44.useEffect)(() => {
5400
+ if (autoSubmit && (otpCode == null ? void 0 : otpCode.length) === codeLength) {
5401
+ handleSubmit((e) => {
5402
+ if (props.onConfirm) {
5403
+ return props.onConfirm(e);
5404
+ } else {
5405
+ console.log("Form is submitted but onConfirm prop is missing");
5406
+ }
5407
+ })();
5408
+ }
5409
+ }, [otpCode, autoSubmit, codeLength]);
5395
5410
  return /* @__PURE__ */ import_react44.default.createElement(
5396
5411
  Card,
5397
5412
  {
@@ -5399,7 +5414,15 @@ var CodeConfirmation = ({ codeLength = 6, ...props }) => {
5399
5414
  props.cardless && "hawa-border-none hawa-bg-transparent !hawa-shadow-none !hawa-drop-shadow-none"
5400
5415
  )
5401
5416
  },
5402
- /* @__PURE__ */ import_react44.default.createElement(CardContent, { headless: true, noPadding: props.cardless }, props.showError && /* @__PURE__ */ import_react44.default.createElement(Alert, { title: props.errorTitle, text: props.errorText, severity: "error" }), /* @__PURE__ */ import_react44.default.createElement("div", { className: "hawa-mb-4 dark:hawa-text-white" }, /* @__PURE__ */ import_react44.default.createElement("div", { className: "hawa-text-lg hawa-font-bold" }, ((_c = props.texts) == null ? void 0 : _c.checkYourIdentifier) || "Please check your phone"), /* @__PURE__ */ import_react44.default.createElement("div", { className: "hawa-text-muted-foreground hawa-flex hawa-flex-row" }, /* @__PURE__ */ import_react44.default.createElement("span", null, `${(_d = props.texts) == null ? void 0 : _d.weSentCode} ` || `We've sent a code to `, /* @__PURE__ */ import_react44.default.createElement("span", { dir: "ltr" }, props.identifier)))), /* @__PURE__ */ import_react44.default.createElement(
5417
+ /* @__PURE__ */ import_react44.default.createElement(CardContent, { headless: true, noPadding: props.cardless }, props.showError && /* @__PURE__ */ import_react44.default.createElement(
5418
+ Alert,
5419
+ {
5420
+ direction: props.direction || "ltr",
5421
+ title: props.errorTitle,
5422
+ text: props.errorText,
5423
+ severity: "error"
5424
+ }
5425
+ ), /* @__PURE__ */ import_react44.default.createElement("div", { className: "hawa-mb-4 dark:hawa-text-white" }, /* @__PURE__ */ import_react44.default.createElement("div", { className: "hawa-text-lg hawa-font-bold" }, ((_c = props.texts) == null ? void 0 : _c.checkYourIdentifier) || "Please check your phone"), /* @__PURE__ */ import_react44.default.createElement("div", { className: "hawa-text-muted-foreground hawa-flex hawa-flex-row" }, /* @__PURE__ */ import_react44.default.createElement("span", null, `${(_d = props.texts) == null ? void 0 : _d.weSentCode} ` || `We've sent a code to `, /* @__PURE__ */ import_react44.default.createElement("span", { dir: "ltr" }, props.identifier)))), /* @__PURE__ */ import_react44.default.createElement(
5403
5426
  "form",
5404
5427
  {
5405
5428
  noValidate: true,
@@ -6559,7 +6582,6 @@ var ContactForm = ({
6559
6582
  )
6560
6583
  ),
6561
6584
  customFields && customFields.map((customField) => {
6562
- console.log("custom", customField);
6563
6585
  return /* @__PURE__ */ import_react57.default.createElement(
6564
6586
  import_react_hook_form9.Controller,
6565
6587
  {
@@ -7102,7 +7124,6 @@ var DropdownMenu = ({
7102
7124
  let newValues = [...values];
7103
7125
  newValues[index] = e;
7104
7126
  setValues(newValues);
7105
- console.log("changing to ", e);
7106
7127
  if (item.onOptionChange) {
7107
7128
  item.onOptionChange(e);
7108
7129
  }
@@ -7687,7 +7708,7 @@ var Usage = (props) => {
7687
7708
 
7688
7709
  lucide-react/dist/esm/shared/src/utils.js:
7689
7710
  (**
7690
- * @license lucide-react v0.436.0 - ISC
7711
+ * @license lucide-react v0.441.0 - ISC
7691
7712
  *
7692
7713
  * This source code is licensed under the ISC license.
7693
7714
  * See the LICENSE file in the root directory of this source tree.
@@ -7695,7 +7716,7 @@ lucide-react/dist/esm/shared/src/utils.js:
7695
7716
 
7696
7717
  lucide-react/dist/esm/defaultAttributes.js:
7697
7718
  (**
7698
- * @license lucide-react v0.436.0 - ISC
7719
+ * @license lucide-react v0.441.0 - ISC
7699
7720
  *
7700
7721
  * This source code is licensed under the ISC license.
7701
7722
  * See the LICENSE file in the root directory of this source tree.
@@ -7703,7 +7724,7 @@ lucide-react/dist/esm/defaultAttributes.js:
7703
7724
 
7704
7725
  lucide-react/dist/esm/Icon.js:
7705
7726
  (**
7706
- * @license lucide-react v0.436.0 - ISC
7727
+ * @license lucide-react v0.441.0 - ISC
7707
7728
  *
7708
7729
  * This source code is licensed under the ISC license.
7709
7730
  * See the LICENSE file in the root directory of this source tree.
@@ -7711,7 +7732,7 @@ lucide-react/dist/esm/Icon.js:
7711
7732
 
7712
7733
  lucide-react/dist/esm/createLucideIcon.js:
7713
7734
  (**
7714
- * @license lucide-react v0.436.0 - ISC
7735
+ * @license lucide-react v0.441.0 - ISC
7715
7736
  *
7716
7737
  * This source code is licensed under the ISC license.
7717
7738
  * See the LICENSE file in the root directory of this source tree.
@@ -7719,7 +7740,7 @@ lucide-react/dist/esm/createLucideIcon.js:
7719
7740
 
7720
7741
  lucide-react/dist/esm/icons/dot.js:
7721
7742
  (**
7722
- * @license lucide-react v0.436.0 - ISC
7743
+ * @license lucide-react v0.441.0 - ISC
7723
7744
  *
7724
7745
  * This source code is licensed under the ISC license.
7725
7746
  * See the LICENSE file in the root directory of this source tree.
@@ -7727,7 +7748,7 @@ lucide-react/dist/esm/icons/dot.js:
7727
7748
 
7728
7749
  lucide-react/dist/esm/lucide-react.js:
7729
7750
  (**
7730
- * @license lucide-react v0.436.0 - ISC
7751
+ * @license lucide-react v0.441.0 - ISC
7731
7752
  *
7732
7753
  * This source code is licensed under the ISC license.
7733
7754
  * See the LICENSE file in the root directory of this source tree.
@@ -17,10 +17,10 @@ import {
17
17
  TabsList,
18
18
  TabsTrigger,
19
19
  Textarea
20
- } from "../chunk-BV3MFTYE.mjs";
20
+ } from "../chunk-FTS7YP7U.mjs";
21
21
  import {
22
22
  getHotkeyHandler
23
- } from "../chunk-WQR4XZGL.mjs";
23
+ } from "../chunk-3AANFRLZ.mjs";
24
24
  import {
25
25
  BadEmoji,
26
26
  Button,
@@ -44,7 +44,7 @@ import {
44
44
  VeryBadEmoji,
45
45
  VeryGoodEmoji,
46
46
  cn
47
- } from "../chunk-KDGJZPWK.mjs";
47
+ } from "../chunk-YGLAEAJY.mjs";
48
48
  import "../chunk-5SQBJRWE.mjs";
49
49
 
50
50
  // blocks/auth/AuthButtons.tsx
@@ -607,7 +607,6 @@ var RegisterForm = ({
607
607
  resolver: zodResolver2(finalSchema)
608
608
  });
609
609
  const onSubmit = (data) => {
610
- console.log("Form submitted with data:", data);
611
610
  if (props.onRegister) {
612
611
  props.onRegister(data);
613
612
  } else {
@@ -1253,10 +1252,14 @@ var ResetPasswordForm = ({
1253
1252
 
1254
1253
  // blocks/auth/CodeConfirmation.tsx
1255
1254
  import React8, { useEffect, useState as useState3 } from "react";
1256
- import { Controller as Controller5, useForm as useForm5 } from "react-hook-form";
1255
+ import { Controller as Controller5, useForm as useForm5, useWatch } from "react-hook-form";
1257
1256
  import { zodResolver as zodResolver5 } from "@hookform/resolvers/zod";
1258
1257
  import * as z5 from "zod";
1259
- var CodeConfirmation = ({ codeLength = 6, ...props }) => {
1258
+ var CodeConfirmation = ({
1259
+ autoSubmit = false,
1260
+ codeLength = 6,
1261
+ ...props
1262
+ }) => {
1260
1263
  var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k;
1261
1264
  const formSchema = z5.object({
1262
1265
  otp_code: z5.string({ required_error: (_a = props.texts) == null ? void 0 : _a.codeRequiredText }).min(codeLength, { message: (_b = props.texts) == null ? void 0 : _b.codeTooShort })
@@ -1295,6 +1298,18 @@ var CodeConfirmation = ({ codeLength = 6, ...props }) => {
1295
1298
  }
1296
1299
  };
1297
1300
  }, []);
1301
+ const otpCode = useWatch({ control, name: "otp_code" });
1302
+ useEffect(() => {
1303
+ if (autoSubmit && (otpCode == null ? void 0 : otpCode.length) === codeLength) {
1304
+ handleSubmit((e) => {
1305
+ if (props.onConfirm) {
1306
+ return props.onConfirm(e);
1307
+ } else {
1308
+ console.log("Form is submitted but onConfirm prop is missing");
1309
+ }
1310
+ })();
1311
+ }
1312
+ }, [otpCode, autoSubmit, codeLength]);
1298
1313
  return /* @__PURE__ */ React8.createElement(
1299
1314
  Card,
1300
1315
  {
@@ -1302,7 +1317,15 @@ var CodeConfirmation = ({ codeLength = 6, ...props }) => {
1302
1317
  props.cardless && "hawa-border-none hawa-bg-transparent !hawa-shadow-none !hawa-drop-shadow-none"
1303
1318
  )
1304
1319
  },
1305
- /* @__PURE__ */ React8.createElement(CardContent, { headless: true, noPadding: props.cardless }, props.showError && /* @__PURE__ */ React8.createElement(Alert, { title: props.errorTitle, text: props.errorText, severity: "error" }), /* @__PURE__ */ React8.createElement("div", { className: "hawa-mb-4 dark:hawa-text-white" }, /* @__PURE__ */ React8.createElement("div", { className: "hawa-text-lg hawa-font-bold" }, ((_c = props.texts) == null ? void 0 : _c.checkYourIdentifier) || "Please check your phone"), /* @__PURE__ */ React8.createElement("div", { className: "hawa-text-muted-foreground hawa-flex hawa-flex-row" }, /* @__PURE__ */ React8.createElement("span", null, `${(_d = props.texts) == null ? void 0 : _d.weSentCode} ` || `We've sent a code to `, /* @__PURE__ */ React8.createElement("span", { dir: "ltr" }, props.identifier)))), /* @__PURE__ */ React8.createElement(
1320
+ /* @__PURE__ */ React8.createElement(CardContent, { headless: true, noPadding: props.cardless }, props.showError && /* @__PURE__ */ React8.createElement(
1321
+ Alert,
1322
+ {
1323
+ direction: props.direction || "ltr",
1324
+ title: props.errorTitle,
1325
+ text: props.errorText,
1326
+ severity: "error"
1327
+ }
1328
+ ), /* @__PURE__ */ React8.createElement("div", { className: "hawa-mb-4 dark:hawa-text-white" }, /* @__PURE__ */ React8.createElement("div", { className: "hawa-text-lg hawa-font-bold" }, ((_c = props.texts) == null ? void 0 : _c.checkYourIdentifier) || "Please check your phone"), /* @__PURE__ */ React8.createElement("div", { className: "hawa-text-muted-foreground hawa-flex hawa-flex-row" }, /* @__PURE__ */ React8.createElement("span", null, `${(_d = props.texts) == null ? void 0 : _d.weSentCode} ` || `We've sent a code to `, /* @__PURE__ */ React8.createElement("span", { dir: "ltr" }, props.identifier)))), /* @__PURE__ */ React8.createElement(
1306
1329
  "form",
1307
1330
  {
1308
1331
  noValidate: true,
@@ -2115,7 +2138,6 @@ var ContactForm = ({
2115
2138
  )
2116
2139
  ),
2117
2140
  customFields && customFields.map((customField) => {
2118
- console.log("custom", customField);
2119
2141
  return /* @__PURE__ */ React20.createElement(
2120
2142
  Controller9,
2121
2143
  {
@@ -1764,7 +1764,6 @@ var ContactForm = ({
1764
1764
  )
1765
1765
  ),
1766
1766
  customFields && customFields.map((customField) => {
1767
- console.log("custom", customField);
1768
1767
  return /* @__PURE__ */ import_react34.default.createElement(
1769
1768
  import_react_hook_form2.Controller,
1770
1769
  {
@@ -315,7 +315,6 @@ var ContactForm = ({
315
315
  )
316
316
  ),
317
317
  customFields && customFields.map((customField) => {
318
- console.log("custom", customField);
319
318
  return /* @__PURE__ */ React8.createElement(
320
319
  Controller2,
321
320
  {
@@ -131,13 +131,11 @@ var useDialogCarousel = (options) => {
131
131
  };
132
132
  const nextStep = () => {
133
133
  if (emblaApi) {
134
- console.log("going to NEXT \u{1F449}");
135
134
  emblaApi.scrollNext();
136
135
  }
137
136
  };
138
137
  const prevStep = () => {
139
138
  if (emblaApi) {
140
- console.log("going to BACK \u{1F448}");
141
139
  emblaApi.scrollPrev();
142
140
  }
143
141
  };