@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
package/dist/index.js CHANGED
@@ -906,7 +906,6 @@ var DropdownMenu = ({
906
906
  let newValues = [...values];
907
907
  newValues[index] = e;
908
908
  setValues(newValues);
909
- console.log("changing to ", e);
910
909
  if (item.onOptionChange) {
911
910
  item.onOptionChange(e);
912
911
  }
@@ -2113,7 +2112,6 @@ var DialogSteps = ({ currentStep, visibleStepRef, children }) => {
2113
2112
  React14.useEffect(() => {
2114
2113
  if (visibleStepRef.current) {
2115
2114
  setDialogHeight(visibleStepRef.current.offsetHeight);
2116
- console.log("height is ", visibleStepRef.current.offsetHeight);
2117
2115
  }
2118
2116
  }, [currentStep, visibleStepRef]);
2119
2117
  return /* @__PURE__ */ React14.createElement(
@@ -4516,13 +4514,11 @@ var useDialogCarousel = (options) => {
4516
4514
  };
4517
4515
  const nextStep = () => {
4518
4516
  if (emblaApi) {
4519
- console.log("going to NEXT \u{1F449}");
4520
4517
  emblaApi.scrollNext();
4521
4518
  }
4522
4519
  };
4523
4520
  const prevStep = () => {
4524
4521
  if (emblaApi) {
4525
- console.log("going to BACK \u{1F448}");
4526
4522
  emblaApi.scrollPrev();
4527
4523
  }
4528
4524
  };
@@ -7375,19 +7371,19 @@ var PhoneInput = ({
7375
7371
  var React50 = __toESM(require("react"));
7376
7372
  var import_input_otp = require("input-otp");
7377
7373
 
7378
- // ../../node_modules/.pnpm/lucide-react@0.436.0_react@18.3.1/node_modules/lucide-react/dist/esm/createLucideIcon.js
7374
+ // ../../node_modules/.pnpm/lucide-react@0.441.0_react@18.3.1/node_modules/lucide-react/dist/esm/createLucideIcon.js
7379
7375
  var import_react41 = require("react");
7380
7376
 
7381
- // ../../node_modules/.pnpm/lucide-react@0.436.0_react@18.3.1/node_modules/lucide-react/dist/esm/shared/src/utils.js
7377
+ // ../../node_modules/.pnpm/lucide-react@0.441.0_react@18.3.1/node_modules/lucide-react/dist/esm/shared/src/utils.js
7382
7378
  var toKebabCase = (string9) => string9.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
7383
7379
  var mergeClasses = (...classes) => classes.filter((className, index, array) => {
7384
7380
  return Boolean(className) && array.indexOf(className) === index;
7385
7381
  }).join(" ");
7386
7382
 
7387
- // ../../node_modules/.pnpm/lucide-react@0.436.0_react@18.3.1/node_modules/lucide-react/dist/esm/Icon.js
7383
+ // ../../node_modules/.pnpm/lucide-react@0.441.0_react@18.3.1/node_modules/lucide-react/dist/esm/Icon.js
7388
7384
  var import_react40 = require("react");
7389
7385
 
7390
- // ../../node_modules/.pnpm/lucide-react@0.436.0_react@18.3.1/node_modules/lucide-react/dist/esm/defaultAttributes.js
7386
+ // ../../node_modules/.pnpm/lucide-react@0.441.0_react@18.3.1/node_modules/lucide-react/dist/esm/defaultAttributes.js
7391
7387
  var defaultAttributes = {
7392
7388
  xmlns: "http://www.w3.org/2000/svg",
7393
7389
  width: 24,
@@ -7400,7 +7396,7 @@ var defaultAttributes = {
7400
7396
  strokeLinejoin: "round"
7401
7397
  };
7402
7398
 
7403
- // ../../node_modules/.pnpm/lucide-react@0.436.0_react@18.3.1/node_modules/lucide-react/dist/esm/Icon.js
7399
+ // ../../node_modules/.pnpm/lucide-react@0.441.0_react@18.3.1/node_modules/lucide-react/dist/esm/Icon.js
7404
7400
  var Icon = (0, import_react40.forwardRef)(
7405
7401
  ({
7406
7402
  color = "currentColor",
@@ -7432,7 +7428,7 @@ var Icon = (0, import_react40.forwardRef)(
7432
7428
  }
7433
7429
  );
7434
7430
 
7435
- // ../../node_modules/.pnpm/lucide-react@0.436.0_react@18.3.1/node_modules/lucide-react/dist/esm/createLucideIcon.js
7431
+ // ../../node_modules/.pnpm/lucide-react@0.441.0_react@18.3.1/node_modules/lucide-react/dist/esm/createLucideIcon.js
7436
7432
  var createLucideIcon = (iconName, iconNode) => {
7437
7433
  const Component = (0, import_react41.forwardRef)(
7438
7434
  ({ className, ...props }, ref) => (0, import_react41.createElement)(Icon, {
@@ -7446,7 +7442,7 @@ var createLucideIcon = (iconName, iconNode) => {
7446
7442
  return Component;
7447
7443
  };
7448
7444
 
7449
- // ../../node_modules/.pnpm/lucide-react@0.436.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/dot.js
7445
+ // ../../node_modules/.pnpm/lucide-react@0.441.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/dot.js
7450
7446
  var Dot = createLucideIcon("Dot", [
7451
7447
  ["circle", { cx: "12.1", cy: "12.1", r: "1", key: "18d7e5" }]
7452
7448
  ]);
@@ -9311,7 +9307,6 @@ var AppLayout = ({
9311
9307
  width: profileMenuWidth,
9312
9308
  direction,
9313
9309
  items: finalProfileMenuItems || [],
9314
- onItemSelect: (e) => console.log("selecting item ", e),
9315
9310
  trigger: /* @__PURE__ */ import_react61.default.createElement(
9316
9311
  "div",
9317
9312
  {
@@ -9580,7 +9575,6 @@ var AppTopbar = ({ ...props }) => {
9580
9575
  sideOffset: 5,
9581
9576
  direction: isRTL ? "rtl" : "ltr",
9582
9577
  items: props.profileMenuItems || [],
9583
- onItemSelect: (e) => console.log("selecting item ", e),
9584
9578
  trigger: /* @__PURE__ */ import_react62.default.createElement("div", { className: "hawa-relative hawa-h-8 hawa-w-8 hawa-cursor-pointer hawa-overflow-clip hawa-rounded hawa-ring-1 hawa-ring-primary/30 dark:hawa-bg-gray-600" }, props.avatarImage ? /* @__PURE__ */ import_react62.default.createElement("img", { src: props.avatarImage, alt: "User Avatar" }) : /* @__PURE__ */ import_react62.default.createElement(
9585
9579
  "svg",
9586
9580
  {
@@ -10636,7 +10630,6 @@ var RegisterForm = ({
10636
10630
  resolver: (0, import_zod2.zodResolver)(finalSchema)
10637
10631
  });
10638
10632
  const onSubmit = (data) => {
10639
- console.log("Form submitted with data:", data);
10640
10633
  if (props.onRegister) {
10641
10634
  props.onRegister(data);
10642
10635
  } else {
@@ -11285,7 +11278,11 @@ var import_react74 = __toESM(require("react"));
11285
11278
  var import_react_hook_form5 = require("react-hook-form");
11286
11279
  var import_zod5 = require("@hookform/resolvers/zod");
11287
11280
  var z5 = __toESM(require("zod"));
11288
- var CodeConfirmation = ({ codeLength = 6, ...props }) => {
11281
+ var CodeConfirmation = ({
11282
+ autoSubmit = false,
11283
+ codeLength = 6,
11284
+ ...props
11285
+ }) => {
11289
11286
  var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k;
11290
11287
  const formSchema = z5.object({
11291
11288
  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 })
@@ -11324,6 +11321,18 @@ var CodeConfirmation = ({ codeLength = 6, ...props }) => {
11324
11321
  }
11325
11322
  };
11326
11323
  }, []);
11324
+ const otpCode = (0, import_react_hook_form5.useWatch)({ control, name: "otp_code" });
11325
+ (0, import_react74.useEffect)(() => {
11326
+ if (autoSubmit && (otpCode == null ? void 0 : otpCode.length) === codeLength) {
11327
+ handleSubmit((e) => {
11328
+ if (props.onConfirm) {
11329
+ return props.onConfirm(e);
11330
+ } else {
11331
+ console.log("Form is submitted but onConfirm prop is missing");
11332
+ }
11333
+ })();
11334
+ }
11335
+ }, [otpCode, autoSubmit, codeLength]);
11327
11336
  return /* @__PURE__ */ import_react74.default.createElement(
11328
11337
  Card,
11329
11338
  {
@@ -11331,7 +11340,15 @@ var CodeConfirmation = ({ codeLength = 6, ...props }) => {
11331
11340
  props.cardless && "hawa-border-none hawa-bg-transparent !hawa-shadow-none !hawa-drop-shadow-none"
11332
11341
  )
11333
11342
  },
11334
- /* @__PURE__ */ import_react74.default.createElement(CardContent, { headless: true, noPadding: props.cardless }, props.showError && /* @__PURE__ */ import_react74.default.createElement(Alert, { title: props.errorTitle, text: props.errorText, severity: "error" }), /* @__PURE__ */ import_react74.default.createElement("div", { className: "hawa-mb-4 dark:hawa-text-white" }, /* @__PURE__ */ import_react74.default.createElement("div", { className: "hawa-text-lg hawa-font-bold" }, ((_c = props.texts) == null ? void 0 : _c.checkYourIdentifier) || "Please check your phone"), /* @__PURE__ */ import_react74.default.createElement("div", { className: "hawa-text-muted-foreground hawa-flex hawa-flex-row" }, /* @__PURE__ */ import_react74.default.createElement("span", null, `${(_d = props.texts) == null ? void 0 : _d.weSentCode} ` || `We've sent a code to `, /* @__PURE__ */ import_react74.default.createElement("span", { dir: "ltr" }, props.identifier)))), /* @__PURE__ */ import_react74.default.createElement(
11343
+ /* @__PURE__ */ import_react74.default.createElement(CardContent, { headless: true, noPadding: props.cardless }, props.showError && /* @__PURE__ */ import_react74.default.createElement(
11344
+ Alert,
11345
+ {
11346
+ direction: props.direction || "ltr",
11347
+ title: props.errorTitle,
11348
+ text: props.errorText,
11349
+ severity: "error"
11350
+ }
11351
+ ), /* @__PURE__ */ import_react74.default.createElement("div", { className: "hawa-mb-4 dark:hawa-text-white" }, /* @__PURE__ */ import_react74.default.createElement("div", { className: "hawa-text-lg hawa-font-bold" }, ((_c = props.texts) == null ? void 0 : _c.checkYourIdentifier) || "Please check your phone"), /* @__PURE__ */ import_react74.default.createElement("div", { className: "hawa-text-muted-foreground hawa-flex hawa-flex-row" }, /* @__PURE__ */ import_react74.default.createElement("span", null, `${(_d = props.texts) == null ? void 0 : _d.weSentCode} ` || `We've sent a code to `, /* @__PURE__ */ import_react74.default.createElement("span", { dir: "ltr" }, props.identifier)))), /* @__PURE__ */ import_react74.default.createElement(
11335
11352
  "form",
11336
11353
  {
11337
11354
  noValidate: true,
@@ -12144,7 +12161,6 @@ var ContactForm = ({
12144
12161
  )
12145
12162
  ),
12146
12163
  customFields && customFields.map((customField) => {
12147
- console.log("custom", customField);
12148
12164
  return /* @__PURE__ */ import_react86.default.createElement(
12149
12165
  import_react_hook_form9.Controller,
12150
12166
  {
@@ -13071,7 +13087,7 @@ var Usage = (props) => {
13071
13087
 
13072
13088
  lucide-react/dist/esm/shared/src/utils.js:
13073
13089
  (**
13074
- * @license lucide-react v0.436.0 - ISC
13090
+ * @license lucide-react v0.441.0 - ISC
13075
13091
  *
13076
13092
  * This source code is licensed under the ISC license.
13077
13093
  * See the LICENSE file in the root directory of this source tree.
@@ -13079,7 +13095,7 @@ lucide-react/dist/esm/shared/src/utils.js:
13079
13095
 
13080
13096
  lucide-react/dist/esm/defaultAttributes.js:
13081
13097
  (**
13082
- * @license lucide-react v0.436.0 - ISC
13098
+ * @license lucide-react v0.441.0 - ISC
13083
13099
  *
13084
13100
  * This source code is licensed under the ISC license.
13085
13101
  * See the LICENSE file in the root directory of this source tree.
@@ -13087,7 +13103,7 @@ lucide-react/dist/esm/defaultAttributes.js:
13087
13103
 
13088
13104
  lucide-react/dist/esm/Icon.js:
13089
13105
  (**
13090
- * @license lucide-react v0.436.0 - ISC
13106
+ * @license lucide-react v0.441.0 - ISC
13091
13107
  *
13092
13108
  * This source code is licensed under the ISC license.
13093
13109
  * See the LICENSE file in the root directory of this source tree.
@@ -13095,7 +13111,7 @@ lucide-react/dist/esm/Icon.js:
13095
13111
 
13096
13112
  lucide-react/dist/esm/createLucideIcon.js:
13097
13113
  (**
13098
- * @license lucide-react v0.436.0 - ISC
13114
+ * @license lucide-react v0.441.0 - ISC
13099
13115
  *
13100
13116
  * This source code is licensed under the ISC license.
13101
13117
  * See the LICENSE file in the root directory of this source tree.
@@ -13103,7 +13119,7 @@ lucide-react/dist/esm/createLucideIcon.js:
13103
13119
 
13104
13120
  lucide-react/dist/esm/icons/dot.js:
13105
13121
  (**
13106
- * @license lucide-react v0.436.0 - ISC
13122
+ * @license lucide-react v0.441.0 - ISC
13107
13123
  *
13108
13124
  * This source code is licensed under the ISC license.
13109
13125
  * See the LICENSE file in the root directory of this source tree.
@@ -13111,7 +13127,7 @@ lucide-react/dist/esm/icons/dot.js:
13111
13127
 
13112
13128
  lucide-react/dist/esm/lucide-react.js:
13113
13129
  (**
13114
- * @license lucide-react v0.436.0 - ISC
13130
+ * @license lucide-react v0.441.0 - ISC
13115
13131
  *
13116
13132
  * This source code is licensed under the ISC license.
13117
13133
  * See the LICENSE file in the root directory of this source tree.
package/dist/index.mjs CHANGED
@@ -654,7 +654,6 @@ var DropdownMenu = ({
654
654
  let newValues = [...values];
655
655
  newValues[index] = e;
656
656
  setValues(newValues);
657
- console.log("changing to ", e);
658
657
  if (item.onOptionChange) {
659
658
  item.onOptionChange(e);
660
659
  }
@@ -1861,7 +1860,6 @@ var DialogSteps = ({ currentStep, visibleStepRef, children }) => {
1861
1860
  React14.useEffect(() => {
1862
1861
  if (visibleStepRef.current) {
1863
1862
  setDialogHeight(visibleStepRef.current.offsetHeight);
1864
- console.log("height is ", visibleStepRef.current.offsetHeight);
1865
1863
  }
1866
1864
  }, [currentStep, visibleStepRef]);
1867
1865
  return /* @__PURE__ */ React14.createElement(
@@ -4272,13 +4270,11 @@ var useDialogCarousel = (options) => {
4272
4270
  };
4273
4271
  const nextStep = () => {
4274
4272
  if (emblaApi) {
4275
- console.log("going to NEXT \u{1F449}");
4276
4273
  emblaApi.scrollNext();
4277
4274
  }
4278
4275
  };
4279
4276
  const prevStep = () => {
4280
4277
  if (emblaApi) {
4281
- console.log("going to BACK \u{1F448}");
4282
4278
  emblaApi.scrollPrev();
4283
4279
  }
4284
4280
  };
@@ -7131,19 +7127,19 @@ var PhoneInput = ({
7131
7127
  import * as React50 from "react";
7132
7128
  import { OTPInput, OTPInputContext } from "input-otp";
7133
7129
 
7134
- // ../../node_modules/.pnpm/lucide-react@0.436.0_react@18.3.1/node_modules/lucide-react/dist/esm/createLucideIcon.js
7130
+ // ../../node_modules/.pnpm/lucide-react@0.441.0_react@18.3.1/node_modules/lucide-react/dist/esm/createLucideIcon.js
7135
7131
  import { forwardRef as forwardRef25, createElement as createElement24 } from "react";
7136
7132
 
7137
- // ../../node_modules/.pnpm/lucide-react@0.436.0_react@18.3.1/node_modules/lucide-react/dist/esm/shared/src/utils.js
7133
+ // ../../node_modules/.pnpm/lucide-react@0.441.0_react@18.3.1/node_modules/lucide-react/dist/esm/shared/src/utils.js
7138
7134
  var toKebabCase = (string9) => string9.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
7139
7135
  var mergeClasses = (...classes) => classes.filter((className, index, array) => {
7140
7136
  return Boolean(className) && array.indexOf(className) === index;
7141
7137
  }).join(" ");
7142
7138
 
7143
- // ../../node_modules/.pnpm/lucide-react@0.436.0_react@18.3.1/node_modules/lucide-react/dist/esm/Icon.js
7139
+ // ../../node_modules/.pnpm/lucide-react@0.441.0_react@18.3.1/node_modules/lucide-react/dist/esm/Icon.js
7144
7140
  import { forwardRef as forwardRef24, createElement as createElement23 } from "react";
7145
7141
 
7146
- // ../../node_modules/.pnpm/lucide-react@0.436.0_react@18.3.1/node_modules/lucide-react/dist/esm/defaultAttributes.js
7142
+ // ../../node_modules/.pnpm/lucide-react@0.441.0_react@18.3.1/node_modules/lucide-react/dist/esm/defaultAttributes.js
7147
7143
  var defaultAttributes = {
7148
7144
  xmlns: "http://www.w3.org/2000/svg",
7149
7145
  width: 24,
@@ -7156,7 +7152,7 @@ var defaultAttributes = {
7156
7152
  strokeLinejoin: "round"
7157
7153
  };
7158
7154
 
7159
- // ../../node_modules/.pnpm/lucide-react@0.436.0_react@18.3.1/node_modules/lucide-react/dist/esm/Icon.js
7155
+ // ../../node_modules/.pnpm/lucide-react@0.441.0_react@18.3.1/node_modules/lucide-react/dist/esm/Icon.js
7160
7156
  var Icon = forwardRef24(
7161
7157
  ({
7162
7158
  color = "currentColor",
@@ -7188,7 +7184,7 @@ var Icon = forwardRef24(
7188
7184
  }
7189
7185
  );
7190
7186
 
7191
- // ../../node_modules/.pnpm/lucide-react@0.436.0_react@18.3.1/node_modules/lucide-react/dist/esm/createLucideIcon.js
7187
+ // ../../node_modules/.pnpm/lucide-react@0.441.0_react@18.3.1/node_modules/lucide-react/dist/esm/createLucideIcon.js
7192
7188
  var createLucideIcon = (iconName, iconNode) => {
7193
7189
  const Component = forwardRef25(
7194
7190
  ({ className, ...props }, ref) => createElement24(Icon, {
@@ -7202,7 +7198,7 @@ var createLucideIcon = (iconName, iconNode) => {
7202
7198
  return Component;
7203
7199
  };
7204
7200
 
7205
- // ../../node_modules/.pnpm/lucide-react@0.436.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/dot.js
7201
+ // ../../node_modules/.pnpm/lucide-react@0.441.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/dot.js
7206
7202
  var Dot = createLucideIcon("Dot", [
7207
7203
  ["circle", { cx: "12.1", cy: "12.1", r: "1", key: "18d7e5" }]
7208
7204
  ]);
@@ -9071,7 +9067,6 @@ var AppLayout = ({
9071
9067
  width: profileMenuWidth,
9072
9068
  direction,
9073
9069
  items: finalProfileMenuItems || [],
9074
- onItemSelect: (e) => console.log("selecting item ", e),
9075
9070
  trigger: /* @__PURE__ */ React75.createElement(
9076
9071
  "div",
9077
9072
  {
@@ -9340,7 +9335,6 @@ var AppTopbar = ({ ...props }) => {
9340
9335
  sideOffset: 5,
9341
9336
  direction: isRTL ? "rtl" : "ltr",
9342
9337
  items: props.profileMenuItems || [],
9343
- onItemSelect: (e) => console.log("selecting item ", e),
9344
9338
  trigger: /* @__PURE__ */ React76.createElement("div", { className: "hawa-relative hawa-h-8 hawa-w-8 hawa-cursor-pointer hawa-overflow-clip hawa-rounded hawa-ring-1 hawa-ring-primary/30 dark:hawa-bg-gray-600" }, props.avatarImage ? /* @__PURE__ */ React76.createElement("img", { src: props.avatarImage, alt: "User Avatar" }) : /* @__PURE__ */ React76.createElement(
9345
9339
  "svg",
9346
9340
  {
@@ -10406,7 +10400,6 @@ var RegisterForm = ({
10406
10400
  resolver: zodResolver2(finalSchema)
10407
10401
  });
10408
10402
  const onSubmit = (data) => {
10409
- console.log("Form submitted with data:", data);
10410
10403
  if (props.onRegister) {
10411
10404
  props.onRegister(data);
10412
10405
  } else {
@@ -11052,10 +11045,14 @@ var ResetPasswordForm = ({
11052
11045
 
11053
11046
  // blocks/auth/CodeConfirmation.tsx
11054
11047
  import React88, { useEffect as useEffect34, useState as useState43 } from "react";
11055
- import { Controller as Controller5, useForm as useForm5 } from "react-hook-form";
11048
+ import { Controller as Controller5, useForm as useForm5, useWatch } from "react-hook-form";
11056
11049
  import { zodResolver as zodResolver5 } from "@hookform/resolvers/zod";
11057
11050
  import * as z5 from "zod";
11058
- var CodeConfirmation = ({ codeLength = 6, ...props }) => {
11051
+ var CodeConfirmation = ({
11052
+ autoSubmit = false,
11053
+ codeLength = 6,
11054
+ ...props
11055
+ }) => {
11059
11056
  var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k;
11060
11057
  const formSchema = z5.object({
11061
11058
  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 })
@@ -11094,6 +11091,18 @@ var CodeConfirmation = ({ codeLength = 6, ...props }) => {
11094
11091
  }
11095
11092
  };
11096
11093
  }, []);
11094
+ const otpCode = useWatch({ control, name: "otp_code" });
11095
+ useEffect34(() => {
11096
+ if (autoSubmit && (otpCode == null ? void 0 : otpCode.length) === codeLength) {
11097
+ handleSubmit((e) => {
11098
+ if (props.onConfirm) {
11099
+ return props.onConfirm(e);
11100
+ } else {
11101
+ console.log("Form is submitted but onConfirm prop is missing");
11102
+ }
11103
+ })();
11104
+ }
11105
+ }, [otpCode, autoSubmit, codeLength]);
11097
11106
  return /* @__PURE__ */ React88.createElement(
11098
11107
  Card,
11099
11108
  {
@@ -11101,7 +11110,15 @@ var CodeConfirmation = ({ codeLength = 6, ...props }) => {
11101
11110
  props.cardless && "hawa-border-none hawa-bg-transparent !hawa-shadow-none !hawa-drop-shadow-none"
11102
11111
  )
11103
11112
  },
11104
- /* @__PURE__ */ React88.createElement(CardContent, { headless: true, noPadding: props.cardless }, props.showError && /* @__PURE__ */ React88.createElement(Alert, { title: props.errorTitle, text: props.errorText, severity: "error" }), /* @__PURE__ */ React88.createElement("div", { className: "hawa-mb-4 dark:hawa-text-white" }, /* @__PURE__ */ React88.createElement("div", { className: "hawa-text-lg hawa-font-bold" }, ((_c = props.texts) == null ? void 0 : _c.checkYourIdentifier) || "Please check your phone"), /* @__PURE__ */ React88.createElement("div", { className: "hawa-text-muted-foreground hawa-flex hawa-flex-row" }, /* @__PURE__ */ React88.createElement("span", null, `${(_d = props.texts) == null ? void 0 : _d.weSentCode} ` || `We've sent a code to `, /* @__PURE__ */ React88.createElement("span", { dir: "ltr" }, props.identifier)))), /* @__PURE__ */ React88.createElement(
11113
+ /* @__PURE__ */ React88.createElement(CardContent, { headless: true, noPadding: props.cardless }, props.showError && /* @__PURE__ */ React88.createElement(
11114
+ Alert,
11115
+ {
11116
+ direction: props.direction || "ltr",
11117
+ title: props.errorTitle,
11118
+ text: props.errorText,
11119
+ severity: "error"
11120
+ }
11121
+ ), /* @__PURE__ */ React88.createElement("div", { className: "hawa-mb-4 dark:hawa-text-white" }, /* @__PURE__ */ React88.createElement("div", { className: "hawa-text-lg hawa-font-bold" }, ((_c = props.texts) == null ? void 0 : _c.checkYourIdentifier) || "Please check your phone"), /* @__PURE__ */ React88.createElement("div", { className: "hawa-text-muted-foreground hawa-flex hawa-flex-row" }, /* @__PURE__ */ React88.createElement("span", null, `${(_d = props.texts) == null ? void 0 : _d.weSentCode} ` || `We've sent a code to `, /* @__PURE__ */ React88.createElement("span", { dir: "ltr" }, props.identifier)))), /* @__PURE__ */ React88.createElement(
11105
11122
  "form",
11106
11123
  {
11107
11124
  noValidate: true,
@@ -11914,7 +11931,6 @@ var ContactForm = ({
11914
11931
  )
11915
11932
  ),
11916
11933
  customFields && customFields.map((customField) => {
11917
- console.log("custom", customField);
11918
11934
  return /* @__PURE__ */ React100.createElement(
11919
11935
  Controller9,
11920
11936
  {
@@ -12840,7 +12856,7 @@ export {
12840
12856
 
12841
12857
  lucide-react/dist/esm/shared/src/utils.js:
12842
12858
  (**
12843
- * @license lucide-react v0.436.0 - ISC
12859
+ * @license lucide-react v0.441.0 - ISC
12844
12860
  *
12845
12861
  * This source code is licensed under the ISC license.
12846
12862
  * See the LICENSE file in the root directory of this source tree.
@@ -12848,7 +12864,7 @@ lucide-react/dist/esm/shared/src/utils.js:
12848
12864
 
12849
12865
  lucide-react/dist/esm/defaultAttributes.js:
12850
12866
  (**
12851
- * @license lucide-react v0.436.0 - ISC
12867
+ * @license lucide-react v0.441.0 - ISC
12852
12868
  *
12853
12869
  * This source code is licensed under the ISC license.
12854
12870
  * See the LICENSE file in the root directory of this source tree.
@@ -12856,7 +12872,7 @@ lucide-react/dist/esm/defaultAttributes.js:
12856
12872
 
12857
12873
  lucide-react/dist/esm/Icon.js:
12858
12874
  (**
12859
- * @license lucide-react v0.436.0 - ISC
12875
+ * @license lucide-react v0.441.0 - ISC
12860
12876
  *
12861
12877
  * This source code is licensed under the ISC license.
12862
12878
  * See the LICENSE file in the root directory of this source tree.
@@ -12864,7 +12880,7 @@ lucide-react/dist/esm/Icon.js:
12864
12880
 
12865
12881
  lucide-react/dist/esm/createLucideIcon.js:
12866
12882
  (**
12867
- * @license lucide-react v0.436.0 - ISC
12883
+ * @license lucide-react v0.441.0 - ISC
12868
12884
  *
12869
12885
  * This source code is licensed under the ISC license.
12870
12886
  * See the LICENSE file in the root directory of this source tree.
@@ -12872,7 +12888,7 @@ lucide-react/dist/esm/createLucideIcon.js:
12872
12888
 
12873
12889
  lucide-react/dist/esm/icons/dot.js:
12874
12890
  (**
12875
- * @license lucide-react v0.436.0 - ISC
12891
+ * @license lucide-react v0.441.0 - ISC
12876
12892
  *
12877
12893
  * This source code is licensed under the ISC license.
12878
12894
  * See the LICENSE file in the root directory of this source tree.
@@ -12880,7 +12896,7 @@ lucide-react/dist/esm/icons/dot.js:
12880
12896
 
12881
12897
  lucide-react/dist/esm/lucide-react.js:
12882
12898
  (**
12883
- * @license lucide-react v0.436.0 - ISC
12899
+ * @license lucide-react v0.441.0 - ISC
12884
12900
  *
12885
12901
  * This source code is licensed under the ISC license.
12886
12902
  * See the LICENSE file in the root directory of this source tree.
@@ -1285,7 +1285,6 @@ var DropdownMenu = ({
1285
1285
  let newValues = [...values];
1286
1286
  newValues[index] = e;
1287
1287
  setValues(newValues);
1288
- console.log("changing to ", e);
1289
1288
  if (item.onOptionChange) {
1290
1289
  item.onOptionChange(e);
1291
1290
  }
@@ -1564,7 +1563,6 @@ var AppLayout = ({
1564
1563
  width: profileMenuWidth,
1565
1564
  direction,
1566
1565
  items: finalProfileMenuItems || [],
1567
- onItemSelect: (e) => console.log("selecting item ", e),
1568
1566
  trigger: /* @__PURE__ */ import_react14.default.createElement(
1569
1567
  "div",
1570
1568
  {
@@ -1833,7 +1831,6 @@ var AppTopbar = ({ ...props }) => {
1833
1831
  sideOffset: 5,
1834
1832
  direction: isRTL ? "rtl" : "ltr",
1835
1833
  items: props.profileMenuItems || [],
1836
- onItemSelect: (e) => console.log("selecting item ", e),
1837
1834
  trigger: /* @__PURE__ */ import_react15.default.createElement("div", { className: "hawa-relative hawa-h-8 hawa-w-8 hawa-cursor-pointer hawa-overflow-clip hawa-rounded hawa-ring-1 hawa-ring-primary/30 dark:hawa-bg-gray-600" }, props.avatarImage ? /* @__PURE__ */ import_react15.default.createElement("img", { src: props.avatarImage, alt: "User Avatar" }) : /* @__PURE__ */ import_react15.default.createElement(
1838
1835
  "svg",
1839
1836
  {
@@ -3,7 +3,7 @@ import {
3
3
  Sheet,
4
4
  SheetContent,
5
5
  SheetTrigger
6
- } from "../chunk-3CHFVHTW.mjs";
6
+ } from "../chunk-QQ7C5DWR.mjs";
7
7
  import {
8
8
  Button,
9
9
  Card,
@@ -16,7 +16,7 @@ import {
16
16
  Skeleton,
17
17
  Tooltip,
18
18
  cn
19
- } from "../chunk-KDGJZPWK.mjs";
19
+ } from "../chunk-YGLAEAJY.mjs";
20
20
  import {
21
21
  useBreakpoint,
22
22
  useClickOutside
@@ -516,7 +516,6 @@ var AppLayout = ({
516
516
  width: profileMenuWidth,
517
517
  direction,
518
518
  items: finalProfileMenuItems || [],
519
- onItemSelect: (e) => console.log("selecting item ", e),
520
519
  trigger: /* @__PURE__ */ React5.createElement(
521
520
  "div",
522
521
  {
@@ -785,7 +784,6 @@ var AppTopbar = ({ ...props }) => {
785
784
  sideOffset: 5,
786
785
  direction: isRTL ? "rtl" : "ltr",
787
786
  items: props.profileMenuItems || [],
788
- onItemSelect: (e) => console.log("selecting item ", e),
789
787
  trigger: /* @__PURE__ */ React6.createElement("div", { className: "hawa-relative hawa-h-8 hawa-w-8 hawa-cursor-pointer hawa-overflow-clip hawa-rounded hawa-ring-1 hawa-ring-primary/30 dark:hawa-bg-gray-600" }, props.avatarImage ? /* @__PURE__ */ React6.createElement("img", { src: props.avatarImage, alt: "User Avatar" }) : /* @__PURE__ */ React6.createElement(
790
788
  "svg",
791
789
  {