@sikka/hawa 0.37.2-next → 0.38.0-next
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{Radio-y9uhxitu.d.ts → Radio-lgoClQrv.d.ts} +2 -2
- package/dist/{Radio-BCD7k628.d.mts → Radio-uQ7DtzcI.d.mts} +2 -2
- package/dist/alert/index.js.map +1 -1
- package/dist/alert/index.mjs.map +1 -1
- package/dist/appLayout/index.js.map +1 -1
- package/dist/appLayout/index.mjs.map +1 -1
- package/dist/backToTop/index.js.map +1 -1
- package/dist/backToTop/index.mjs.map +1 -1
- package/dist/blocks/auth/index.d.mts +1 -0
- package/dist/blocks/auth/index.d.ts +1 -0
- package/dist/blocks/auth/index.js +207 -123
- package/dist/blocks/auth/index.mjs +204 -101
- package/dist/blocks/feedback/index.js +4 -40
- package/dist/blocks/feedback/index.mjs +5 -5
- package/dist/blocks/index.d.mts +2 -1
- package/dist/blocks/index.d.ts +2 -1
- package/dist/blocks/index.js +457 -400
- package/dist/blocks/index.mjs +10 -8
- package/dist/blocks/misc/index.js +5 -32
- package/dist/blocks/misc/index.mjs +5 -5
- package/dist/blocks/pricing/index.js +4 -22
- package/dist/blocks/pricing/index.mjs +4 -4
- package/dist/button/index.js.map +1 -1
- package/dist/button/index.mjs.map +1 -1
- package/dist/calendar/index.js.map +1 -1
- package/dist/calendar/index.mjs.map +1 -1
- package/dist/checkbox/index.d.mts +1 -1
- package/dist/checkbox/index.d.ts +1 -1
- package/dist/checkbox/index.js.map +1 -1
- package/dist/checkbox/index.mjs.map +1 -1
- package/dist/{chunk-BPHQFAWM.mjs → chunk-4EZL2A64.mjs} +3 -11
- package/dist/{chunk-DS3AACQJ.mjs → chunk-E6C3LDHD.mjs} +1 -1
- package/dist/{chunk-ODOCZAWC.mjs → chunk-E77TUADR.mjs} +1 -1
- package/dist/{chunk-QXH7ZDMN.mjs → chunk-IA5FLRFL.mjs} +3 -11
- package/dist/{chunk-ZTUWU652.mjs → chunk-JJMRBD3S.mjs} +3 -3
- package/dist/{chunk-RNFJAEEU.mjs → chunk-LDJD5ITW.mjs} +1 -0
- package/dist/{chunk-QYWOI3DO.mjs → chunk-MHSSZ6XE.mjs} +204 -144
- package/dist/{chunk-BTDR3VAG.mjs → chunk-Q3HJI7ZE.mjs} +4 -21
- package/dist/{chunk-MDHDHEPZ.mjs → chunk-TMUQCNLO.mjs} +3 -11
- package/dist/{chunk-PXGL7ZXQ.mjs → chunk-V4SUYEVH.mjs} +1 -0
- package/dist/codeBlock/index.js.map +1 -1
- package/dist/codeBlock/index.mjs.map +1 -1
- package/dist/colorPicker/index.d.mts +1 -1
- package/dist/colorPicker/index.d.ts +1 -1
- package/dist/colorPicker/index.js +35 -31
- package/dist/colorPicker/index.js.map +1 -1
- package/dist/colorPicker/index.mjs +33 -29
- package/dist/colorPicker/index.mjs.map +1 -1
- package/dist/combobox/index.d.mts +1 -1
- package/dist/combobox/index.d.ts +1 -1
- package/dist/combobox/index.js +52 -48
- package/dist/combobox/index.js.map +1 -1
- package/dist/combobox/index.mjs +52 -48
- package/dist/combobox/index.mjs.map +1 -1
- package/dist/dataTable/index.js +1 -10
- package/dist/dataTable/index.js.map +1 -1
- package/dist/dataTable/index.mjs +1 -10
- package/dist/dataTable/index.mjs.map +1 -1
- package/dist/datePicker/index.js.map +1 -1
- package/dist/datePicker/index.mjs.map +1 -1
- package/dist/docsLayout/index.js.map +1 -1
- package/dist/docsLayout/index.mjs.map +1 -1
- package/dist/elements/index.d.mts +42 -21
- package/dist/elements/index.d.ts +42 -21
- package/dist/elements/index.js +335 -290
- package/dist/elements/index.mjs +14 -23
- package/dist/fileDropzone/index.js.map +1 -1
- package/dist/fileDropzone/index.mjs.map +1 -1
- package/dist/index.css +29 -3
- package/dist/index.d.mts +44 -22
- package/dist/index.d.ts +44 -22
- package/dist/index.js +764 -717
- package/dist/index.mjs +287 -244
- package/dist/input/index.d.mts +1 -1
- package/dist/input/index.d.ts +1 -1
- package/dist/input/index.js +46 -42
- package/dist/input/index.js.map +1 -1
- package/dist/input/index.mjs +45 -41
- package/dist/input/index.mjs.map +1 -1
- package/dist/interfaceSettings/index.js +64 -69
- package/dist/interfaceSettings/index.js.map +1 -1
- package/dist/interfaceSettings/index.mjs +57 -62
- package/dist/interfaceSettings/index.mjs.map +1 -1
- package/dist/layout/index.d.mts +1 -1
- package/dist/layout/index.d.ts +1 -1
- package/dist/layout/index.mjs +2 -2
- package/dist/passwordInput/index.js +70 -66
- package/dist/passwordInput/index.js.map +1 -1
- package/dist/passwordInput/index.mjs +59 -55
- package/dist/passwordInput/index.mjs.map +1 -1
- package/dist/phoneInput/index.js +50 -55
- package/dist/phoneInput/index.js.map +1 -1
- package/dist/phoneInput/index.mjs +47 -52
- package/dist/phoneInput/index.mjs.map +1 -1
- package/dist/pinInput/index.d.mts +37 -16
- package/dist/pinInput/index.d.ts +37 -16
- package/dist/pinInput/index.js +208 -78
- package/dist/pinInput/index.js.map +1 -1
- package/dist/pinInput/index.mjs +203 -77
- package/dist/pinInput/index.mjs.map +1 -1
- package/dist/radio/index.d.mts +1 -1
- package/dist/radio/index.d.ts +1 -1
- package/dist/radio/index.js +55 -60
- package/dist/radio/index.js.map +1 -1
- package/dist/radio/index.mjs +50 -55
- package/dist/radio/index.mjs.map +1 -1
- package/dist/scrollArea/index.js +2 -2
- package/dist/scrollArea/index.js.map +1 -1
- package/dist/scrollArea/index.mjs +2 -2
- package/dist/scrollArea/index.mjs.map +1 -1
- package/dist/select/index.d.mts +1 -1
- package/dist/select/index.d.ts +1 -1
- package/dist/select/index.js +43 -39
- package/dist/select/index.js.map +1 -1
- package/dist/select/index.mjs +43 -39
- package/dist/select/index.mjs.map +1 -1
- package/dist/signature/index.d.mts +1 -1
- package/dist/signature/index.d.ts +1 -1
- package/dist/signature/index.js.map +1 -1
- package/dist/signature/index.mjs.map +1 -1
- package/dist/sortButton/index.js.map +1 -1
- package/dist/sortButton/index.mjs.map +1 -1
- package/dist/splitButton/index.js.map +1 -1
- package/dist/splitButton/index.mjs.map +1 -1
- package/dist/stats/index.d.mts +1 -1
- package/dist/stats/index.d.ts +1 -1
- package/dist/stats/index.js.map +1 -1
- package/dist/stats/index.mjs.map +1 -1
- package/dist/tabs/index.js +2 -2
- package/dist/tabs/index.js.map +1 -1
- package/dist/tabs/index.mjs +2 -2
- package/dist/tabs/index.mjs.map +1 -1
- package/dist/textarea/index.d.mts +1 -1
- package/dist/textarea/index.d.ts +1 -1
- package/dist/textarea/index.js +34 -30
- package/dist/textarea/index.js.map +1 -1
- package/dist/textarea/index.mjs +34 -30
- package/dist/textarea/index.mjs.map +1 -1
- package/package.json +2 -1
@@ -1341,16 +1341,7 @@ var Input = (0, import_react8.forwardRef)(
|
|
1341
1341
|
inputProps == null ? void 0 : inputProps.className
|
1342
1342
|
)
|
1343
1343
|
}
|
1344
|
-
)), !forceHideHelperText && /* @__PURE__ */ import_react8.default.createElement(
|
1345
|
-
"p",
|
1346
|
-
{
|
1347
|
-
className: cn(
|
1348
|
-
"hawa-my-0 hawa-text-start hawa-text-xs hawa-text-helper-color hawa-transition-all",
|
1349
|
-
props.helperText ? "hawa-h-4 hawa-opacity-100" : "hawa-h-0 hawa-opacity-0"
|
1350
|
-
)
|
1351
|
-
},
|
1352
|
-
props.helperText
|
1353
|
-
), !props.disabled && forceHideHelperText && /* @__PURE__ */ import_react8.default.createElement(
|
1344
|
+
)), !forceHideHelperText && /* @__PURE__ */ import_react8.default.createElement(HelperText, { helperText: props.helperText }), !props.disabled && forceHideHelperText && /* @__PURE__ */ import_react8.default.createElement(
|
1354
1345
|
"div",
|
1355
1346
|
{
|
1356
1347
|
className: cn(
|
@@ -3246,16 +3237,7 @@ var Select = ({
|
|
3246
3237
|
onInputChange: (newValue, action) => props.onInputChange(newValue, action)
|
3247
3238
|
}
|
3248
3239
|
),
|
3249
|
-
!props.hideHelperText && /* @__PURE__ */ import_react9.default.createElement(
|
3250
|
-
"p",
|
3251
|
-
{
|
3252
|
-
className: cn(
|
3253
|
-
"hawa-my-0 hawa-text-start hawa-text-xs hawa-text-helper-color hawa-transition-all",
|
3254
|
-
props.helperText ? "hawa-h-4 hawa-opacity-100" : "hawa-h-0 hawa-opacity-0"
|
3255
|
-
)
|
3256
|
-
},
|
3257
|
-
props.helperText
|
3258
|
-
)
|
3240
|
+
!props.hideHelperText && /* @__PURE__ */ import_react9.default.createElement(HelperText, { helperText: props.helperText })
|
3259
3241
|
);
|
3260
3242
|
};
|
3261
3243
|
|
@@ -3312,16 +3294,7 @@ var PhoneInput = ({
|
|
3312
3294
|
),
|
3313
3295
|
...inputProps
|
3314
3296
|
}
|
3315
|
-
))), /* @__PURE__ */ import_react10.default.createElement(
|
3316
|
-
"p",
|
3317
|
-
{
|
3318
|
-
className: cn(
|
3319
|
-
"hawa-my-0 hawa-text-start hawa-text-xs hawa-text-helper-color hawa-transition-all",
|
3320
|
-
props.helperText ? "hawa-h-4 hawa-opacity-100" : "hawa-h-0 hawa-opacity-0"
|
3321
|
-
)
|
3322
|
-
},
|
3323
|
-
props.helperText
|
3324
|
-
));
|
3297
|
+
))), /* @__PURE__ */ import_react10.default.createElement(HelperText, { helperText: props.helperText }));
|
3325
3298
|
};
|
3326
3299
|
|
3327
3300
|
// icons/Emojis.tsx
|
@@ -4470,106 +4443,168 @@ var ResetPasswordForm = ({
|
|
4470
4443
|
};
|
4471
4444
|
|
4472
4445
|
// blocks/auth/CodeConfirmation.tsx
|
4473
|
-
var
|
4446
|
+
var import_react24 = __toESM(require("react"));
|
4474
4447
|
var import_react_hook_form5 = require("react-hook-form");
|
4475
4448
|
var import_zod5 = require("@hookform/resolvers/zod");
|
4476
4449
|
var z5 = __toESM(require("zod"));
|
4477
4450
|
|
4478
4451
|
// elements/pinInput/PinInput.tsx
|
4479
|
-
var
|
4480
|
-
var
|
4481
|
-
|
4482
|
-
|
4483
|
-
|
4484
|
-
|
4485
|
-
|
4486
|
-
|
4487
|
-
|
4488
|
-
|
4489
|
-
|
4490
|
-
|
4491
|
-
|
4492
|
-
|
4493
|
-
|
4494
|
-
|
4495
|
-
|
4496
|
-
|
4497
|
-
|
4498
|
-
|
4499
|
-
|
4500
|
-
|
4501
|
-
|
4502
|
-
|
4503
|
-
|
4504
|
-
|
4505
|
-
|
4506
|
-
|
4507
|
-
|
4508
|
-
|
4509
|
-
|
4510
|
-
|
4511
|
-
|
4512
|
-
|
4513
|
-
|
4514
|
-
|
4515
|
-
|
4516
|
-
|
4517
|
-
|
4518
|
-
|
4519
|
-
|
4520
|
-
|
4521
|
-
}
|
4522
|
-
};
|
4523
|
-
return /* @__PURE__ */ import_react22.default.createElement("div", { className: "hawa-flex hawa-flex-col hawa-gap-2" }, /* @__PURE__ */ import_react22.default.createElement(
|
4524
|
-
"div",
|
4525
|
-
{
|
4526
|
-
className: "hawa-flex hawa-w-full hawa-flex-row hawa-justify-center hawa-gap-2",
|
4527
|
-
dir: "ltr"
|
4528
|
-
},
|
4529
|
-
pin.map((value, index) => /* @__PURE__ */ import_react22.default.createElement(
|
4530
|
-
"input",
|
4452
|
+
var React25 = __toESM(require("react"));
|
4453
|
+
var import_input_otp = require("input-otp");
|
4454
|
+
|
4455
|
+
// ../../node_modules/.pnpm/lucide-react@0.379.0_react@18.3.1/node_modules/lucide-react/dist/esm/createLucideIcon.js
|
4456
|
+
var import_react23 = require("react");
|
4457
|
+
|
4458
|
+
// ../../node_modules/.pnpm/lucide-react@0.379.0_react@18.3.1/node_modules/lucide-react/dist/esm/shared/src/utils.js
|
4459
|
+
var toKebabCase = (string6) => string6.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
|
4460
|
+
var mergeClasses = (...classes) => classes.filter((className, index, array) => {
|
4461
|
+
return Boolean(className) && array.indexOf(className) === index;
|
4462
|
+
}).join(" ");
|
4463
|
+
|
4464
|
+
// ../../node_modules/.pnpm/lucide-react@0.379.0_react@18.3.1/node_modules/lucide-react/dist/esm/Icon.js
|
4465
|
+
var import_react22 = require("react");
|
4466
|
+
|
4467
|
+
// ../../node_modules/.pnpm/lucide-react@0.379.0_react@18.3.1/node_modules/lucide-react/dist/esm/defaultAttributes.js
|
4468
|
+
var defaultAttributes = {
|
4469
|
+
xmlns: "http://www.w3.org/2000/svg",
|
4470
|
+
width: 24,
|
4471
|
+
height: 24,
|
4472
|
+
viewBox: "0 0 24 24",
|
4473
|
+
fill: "none",
|
4474
|
+
stroke: "currentColor",
|
4475
|
+
strokeWidth: 2,
|
4476
|
+
strokeLinecap: "round",
|
4477
|
+
strokeLinejoin: "round"
|
4478
|
+
};
|
4479
|
+
|
4480
|
+
// ../../node_modules/.pnpm/lucide-react@0.379.0_react@18.3.1/node_modules/lucide-react/dist/esm/Icon.js
|
4481
|
+
var Icon = (0, import_react22.forwardRef)(
|
4482
|
+
({
|
4483
|
+
color = "currentColor",
|
4484
|
+
size = 24,
|
4485
|
+
strokeWidth = 2,
|
4486
|
+
absoluteStrokeWidth,
|
4487
|
+
className = "",
|
4488
|
+
children,
|
4489
|
+
iconNode,
|
4490
|
+
...rest
|
4491
|
+
}, ref) => {
|
4492
|
+
return (0, import_react22.createElement)(
|
4493
|
+
"svg",
|
4531
4494
|
{
|
4532
|
-
|
4533
|
-
|
4534
|
-
|
4535
|
-
|
4536
|
-
|
4537
|
-
|
4538
|
-
|
4539
|
-
|
4540
|
-
|
4541
|
-
|
4542
|
-
),
|
4543
|
-
|
4544
|
-
|
4545
|
-
|
4546
|
-
|
4547
|
-
|
4548
|
-
|
4549
|
-
|
4550
|
-
|
4495
|
+
ref,
|
4496
|
+
...defaultAttributes,
|
4497
|
+
width: size,
|
4498
|
+
height: size,
|
4499
|
+
stroke: color,
|
4500
|
+
strokeWidth: absoluteStrokeWidth ? Number(strokeWidth) * 24 / Number(size) : strokeWidth,
|
4501
|
+
className: mergeClasses("lucide", className),
|
4502
|
+
...rest
|
4503
|
+
},
|
4504
|
+
[
|
4505
|
+
...iconNode.map(([tag, attrs]) => (0, import_react22.createElement)(tag, attrs)),
|
4506
|
+
...Array.isArray(children) ? children : [children]
|
4507
|
+
]
|
4508
|
+
);
|
4509
|
+
}
|
4510
|
+
);
|
4511
|
+
|
4512
|
+
// ../../node_modules/.pnpm/lucide-react@0.379.0_react@18.3.1/node_modules/lucide-react/dist/esm/createLucideIcon.js
|
4513
|
+
var createLucideIcon = (iconName, iconNode) => {
|
4514
|
+
const Component = (0, import_react23.forwardRef)(
|
4515
|
+
({ className, ...props }, ref) => (0, import_react23.createElement)(Icon, {
|
4516
|
+
ref,
|
4517
|
+
iconNode,
|
4518
|
+
className: mergeClasses(`lucide-${toKebabCase(iconName)}`, className),
|
4519
|
+
...props
|
4520
|
+
})
|
4521
|
+
);
|
4522
|
+
Component.displayName = `${iconName}`;
|
4523
|
+
return Component;
|
4524
|
+
};
|
4525
|
+
|
4526
|
+
// ../../node_modules/.pnpm/lucide-react@0.379.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/dot.js
|
4527
|
+
var Dot = createLucideIcon("Dot", [
|
4528
|
+
["circle", { cx: "12.1", cy: "12.1", r: "1", key: "18d7e5" }]
|
4529
|
+
]);
|
4530
|
+
|
4531
|
+
// elements/pinInput/PinInput.tsx
|
4532
|
+
var PinInputRoot = React25.forwardRef(({ className, containerClassName, ...props }, ref) => /* @__PURE__ */ React25.createElement(
|
4533
|
+
import_input_otp.OTPInput,
|
4534
|
+
{
|
4535
|
+
ref,
|
4536
|
+
containerClassName: cn(
|
4537
|
+
"hawa-flex hawa-items-center hawa-gap-2 has-[:disabled]:hawa-opacity-50",
|
4538
|
+
containerClassName
|
4539
|
+
),
|
4540
|
+
className: cn("disabled:hawa-cursor-not-allowed", className),
|
4541
|
+
...props
|
4542
|
+
}
|
4543
|
+
));
|
4544
|
+
PinInputRoot.displayName = "PinInputRoot";
|
4545
|
+
var PinInputGroup = React25.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React25.createElement(
|
4546
|
+
"div",
|
4547
|
+
{
|
4548
|
+
ref,
|
4549
|
+
className: cn("hawa-flex hawa-items-center", className),
|
4550
|
+
...props
|
4551
|
+
}
|
4552
|
+
));
|
4553
|
+
PinInputGroup.displayName = "PinInputGroup";
|
4554
|
+
var PinInputSlot = React25.forwardRef(({ index, className, ...props }, ref) => {
|
4555
|
+
const pinInputContext = React25.useContext(import_input_otp.OTPInputContext);
|
4556
|
+
const { char, hasFakeCaret, isActive } = pinInputContext.slots[index];
|
4557
|
+
return /* @__PURE__ */ React25.createElement(
|
4558
|
+
"div",
|
4551
4559
|
{
|
4560
|
+
ref,
|
4552
4561
|
className: cn(
|
4553
|
-
"hawa-
|
4554
|
-
|
4555
|
-
|
4562
|
+
"hawa-border-input hawa-relative hawa-flex hawa-h-10 hawa-w-10 hawa-items-center hawa-justify-center hawa-border-y hawa-border-r hawa-text-sm hawa-transition-all first:hawa-rounded-l-md first:hawa-border-l last:hawa-rounded-r-md",
|
4563
|
+
isActive && "hawa-ring-ring hawa-ring-offset-background hawa-z-10 hawa-ring-2",
|
4564
|
+
className
|
4565
|
+
),
|
4566
|
+
...props
|
4556
4567
|
},
|
4557
|
-
|
4558
|
-
|
4568
|
+
char,
|
4569
|
+
hasFakeCaret && /* @__PURE__ */ React25.createElement("div", { className: "hawa-pointer-events-none hawa-absolute hawa-inset-0 hawa-flex hawa-items-center hawa-justify-center" }, /* @__PURE__ */ React25.createElement("div", { className: "hawa-animate-caret-blink hawa-bg-foreground hawa-h-4 hawa-w-px hawa-duration-1000" }))
|
4570
|
+
);
|
4571
|
+
});
|
4572
|
+
PinInputSlot.displayName = "PinInputSlot";
|
4573
|
+
var PinInputSeperator = React25.forwardRef(({ ...props }, ref) => /* @__PURE__ */ React25.createElement("div", { ref, role: "separator", ...props }, /* @__PURE__ */ React25.createElement(Dot, null)));
|
4574
|
+
PinInputSeperator.displayName = "PinInputSeperator";
|
4575
|
+
var PinInput = ({
|
4576
|
+
separatorPosition = 0,
|
4577
|
+
...props
|
4578
|
+
}) => {
|
4579
|
+
const maxLength = props.maxLength || 6;
|
4580
|
+
const clampedSeparatorPosition = Math.min(separatorPosition, maxLength);
|
4581
|
+
const firstGroupLength = clampedSeparatorPosition > 0 ? clampedSeparatorPosition : 0;
|
4582
|
+
const secondGroupLength = maxLength - firstGroupLength;
|
4583
|
+
return /* @__PURE__ */ React25.createElement("div", { className: "hawa-flex hawa-flex-col hawa-gap-2" }, /* @__PURE__ */ React25.createElement(PinInputRoot, { ...props }, firstGroupLength > 0 && /* @__PURE__ */ React25.createElement(PinInputGroup, { className: "hawa-w-full" }, [...Array(firstGroupLength)].map((_, index) => /* @__PURE__ */ React25.createElement(PinInputSlot, { key: index, index, className: "hawa-w-full" }))), separatorPosition > 0 && separatorPosition < props.maxLength && /* @__PURE__ */ React25.createElement(PinInputSeperator, null), secondGroupLength > 0 && /* @__PURE__ */ React25.createElement(PinInputGroup, { className: "hawa-w-full" }, [...Array(secondGroupLength)].map((_, index) => /* @__PURE__ */ React25.createElement(
|
4584
|
+
PinInputSlot,
|
4585
|
+
{
|
4586
|
+
key: index + firstGroupLength,
|
4587
|
+
index: index + firstGroupLength,
|
4588
|
+
className: "hawa-w-full"
|
4589
|
+
}
|
4590
|
+
)))), /* @__PURE__ */ React25.createElement(HelperText, { helperText: props.helperText }));
|
4559
4591
|
};
|
4560
4592
|
|
4561
4593
|
// blocks/auth/CodeConfirmation.tsx
|
4562
|
-
var CodeConfirmation = (
|
4594
|
+
var CodeConfirmation = ({
|
4595
|
+
codeLength = 6,
|
4596
|
+
...props
|
4597
|
+
}) => {
|
4563
4598
|
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k;
|
4564
4599
|
const formSchema = z5.object({
|
4565
|
-
otp_code: z5.string({ required_error: (_a = props.texts) == null ? void 0 : _a.codeRequiredText }).min(
|
4600
|
+
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 })
|
4566
4601
|
});
|
4567
4602
|
const { handleSubmit, control, formState, setValue } = (0, import_react_hook_form5.useForm)({
|
4568
4603
|
resolver: (0, import_zod5.zodResolver)(formSchema)
|
4569
4604
|
});
|
4570
|
-
const [resendTimer, setResendTimer] = (0,
|
4571
|
-
const [remainingTime, setRemainingTime] = (0,
|
4572
|
-
const [showResendTimer, setShowResendTimer] = (0,
|
4605
|
+
const [resendTimer, setResendTimer] = (0, import_react24.useState)(null);
|
4606
|
+
const [remainingTime, setRemainingTime] = (0, import_react24.useState)(0);
|
4607
|
+
const [showResendTimer, setShowResendTimer] = (0, import_react24.useState)(false);
|
4573
4608
|
const startResendTimer = () => {
|
4574
4609
|
if (resendTimer !== null) {
|
4575
4610
|
clearInterval(resendTimer);
|
@@ -4591,21 +4626,21 @@ var CodeConfirmation = (props) => {
|
|
4591
4626
|
}, 1e3);
|
4592
4627
|
setResendTimer(newTimer);
|
4593
4628
|
};
|
4594
|
-
(0,
|
4629
|
+
(0, import_react24.useEffect)(() => {
|
4595
4630
|
return () => {
|
4596
4631
|
if (resendTimer !== null) {
|
4597
4632
|
clearInterval(resendTimer);
|
4598
4633
|
}
|
4599
4634
|
};
|
4600
4635
|
}, []);
|
4601
|
-
return /* @__PURE__ */
|
4636
|
+
return /* @__PURE__ */ import_react24.default.createElement(Card, null, /* @__PURE__ */ import_react24.default.createElement(CardContent, { headless: true }, props.showError && /* @__PURE__ */ import_react24.default.createElement(
|
4602
4637
|
Alert,
|
4603
4638
|
{
|
4604
4639
|
title: props.errorTitle,
|
4605
4640
|
text: props.errorText,
|
4606
4641
|
severity: "error"
|
4607
4642
|
}
|
4608
|
-
), /* @__PURE__ */
|
4643
|
+
), /* @__PURE__ */ import_react24.default.createElement("div", { className: "hawa-mb-4 dark:hawa-text-white" }, /* @__PURE__ */ import_react24.default.createElement("div", { className: "hawa-text-lg hawa-font-bold" }, ((_c = props.texts) == null ? void 0 : _c.checkYourPhone) || "Please check your phone"), /* @__PURE__ */ import_react24.default.createElement("div", { className: "hawa-text-muted-foreground" }, /* @__PURE__ */ import_react24.default.createElement("span", null, ((_d = props.texts) == null ? void 0 : _d.weSentCode) || "We've sent a code to "), /* @__PURE__ */ import_react24.default.createElement("span", null, props.phoneNumber))), /* @__PURE__ */ import_react24.default.createElement(
|
4609
4644
|
"form",
|
4610
4645
|
{
|
4611
4646
|
noValidate: true,
|
@@ -4619,26 +4654,25 @@ var CodeConfirmation = (props) => {
|
|
4619
4654
|
}
|
4620
4655
|
})
|
4621
4656
|
},
|
4622
|
-
/* @__PURE__ */
|
4657
|
+
/* @__PURE__ */ import_react24.default.createElement(
|
4623
4658
|
import_react_hook_form5.Controller,
|
4624
4659
|
{
|
4625
4660
|
control,
|
4626
4661
|
name: "otp_code",
|
4627
4662
|
render: ({ field }) => {
|
4628
4663
|
var _a2;
|
4629
|
-
return /* @__PURE__ */
|
4664
|
+
return /* @__PURE__ */ import_react24.default.createElement(
|
4630
4665
|
PinInput,
|
4631
4666
|
{
|
4632
|
-
|
4633
|
-
|
4634
|
-
|
4635
|
-
helperText: (_a2 = formState.errors.otp_code) == null ? void 0 : _a2.message
|
4667
|
+
maxLength: codeLength,
|
4668
|
+
helperText: (_a2 = formState.errors.otp_code) == null ? void 0 : _a2.message,
|
4669
|
+
...field
|
4636
4670
|
}
|
4637
4671
|
);
|
4638
4672
|
}
|
4639
4673
|
}
|
4640
4674
|
),
|
4641
|
-
showResendTimer ? /* @__PURE__ */
|
4675
|
+
showResendTimer ? /* @__PURE__ */ import_react24.default.createElement("div", { className: " hawa-py-2 hawa-text-center hawa-text-xs hawa-text-muted-foreground" }, (_e = props.texts) == null ? void 0 : _e.resendCodeTimer, " ", /* @__PURE__ */ import_react24.default.createElement("strong", null, remainingTime), " ", (_f = props.texts) == null ? void 0 : _f.seconds) : /* @__PURE__ */ import_react24.default.createElement("div", { className: " hawa-py-2 hawa-text-center hawa-text-xs hawa-text-muted-foreground" }, /* @__PURE__ */ import_react24.default.createElement("span", null, (_h = (_g = props.texts) == null ? void 0 : _g.didntGetCode) != null ? _h : "Didn't get the code?"), " ", /* @__PURE__ */ import_react24.default.createElement(
|
4642
4676
|
"span",
|
4643
4677
|
{
|
4644
4678
|
className: "clickable-link",
|
@@ -4649,7 +4683,7 @@ var CodeConfirmation = (props) => {
|
|
4649
4683
|
},
|
4650
4684
|
((_i = props.texts) == null ? void 0 : _i.resendCode) || "Click to resend"
|
4651
4685
|
)),
|
4652
|
-
/* @__PURE__ */
|
4686
|
+
/* @__PURE__ */ import_react24.default.createElement("div", { className: "hawa-mt-4 hawa-grid hawa-grid-cols-2 hawa-gap-2" }, /* @__PURE__ */ import_react24.default.createElement(Button, { variant: "outline" }, ((_j = props.texts) == null ? void 0 : _j.cancel) || "Cancel"), /* @__PURE__ */ import_react24.default.createElement(Button, { isLoading: props.confirmLoading }, ((_k = props.texts) == null ? void 0 : _k.confirm) || "Confirm"))
|
4653
4687
|
)));
|
4654
4688
|
};
|
4655
4689
|
// Annotate the CommonJS export names for ESM import in node:
|
@@ -4663,3 +4697,53 @@ var CodeConfirmation = (props) => {
|
|
4663
4697
|
RegisterForm,
|
4664
4698
|
ResetPasswordForm
|
4665
4699
|
});
|
4700
|
+
/*! Bundled license information:
|
4701
|
+
|
4702
|
+
lucide-react/dist/esm/shared/src/utils.js:
|
4703
|
+
(**
|
4704
|
+
* @license lucide-react v0.379.0 - ISC
|
4705
|
+
*
|
4706
|
+
* This source code is licensed under the ISC license.
|
4707
|
+
* See the LICENSE file in the root directory of this source tree.
|
4708
|
+
*)
|
4709
|
+
|
4710
|
+
lucide-react/dist/esm/defaultAttributes.js:
|
4711
|
+
(**
|
4712
|
+
* @license lucide-react v0.379.0 - ISC
|
4713
|
+
*
|
4714
|
+
* This source code is licensed under the ISC license.
|
4715
|
+
* See the LICENSE file in the root directory of this source tree.
|
4716
|
+
*)
|
4717
|
+
|
4718
|
+
lucide-react/dist/esm/Icon.js:
|
4719
|
+
(**
|
4720
|
+
* @license lucide-react v0.379.0 - ISC
|
4721
|
+
*
|
4722
|
+
* This source code is licensed under the ISC license.
|
4723
|
+
* See the LICENSE file in the root directory of this source tree.
|
4724
|
+
*)
|
4725
|
+
|
4726
|
+
lucide-react/dist/esm/createLucideIcon.js:
|
4727
|
+
(**
|
4728
|
+
* @license lucide-react v0.379.0 - ISC
|
4729
|
+
*
|
4730
|
+
* This source code is licensed under the ISC license.
|
4731
|
+
* See the LICENSE file in the root directory of this source tree.
|
4732
|
+
*)
|
4733
|
+
|
4734
|
+
lucide-react/dist/esm/icons/dot.js:
|
4735
|
+
(**
|
4736
|
+
* @license lucide-react v0.379.0 - ISC
|
4737
|
+
*
|
4738
|
+
* This source code is licensed under the ISC license.
|
4739
|
+
* See the LICENSE file in the root directory of this source tree.
|
4740
|
+
*)
|
4741
|
+
|
4742
|
+
lucide-react/dist/esm/lucide-react.js:
|
4743
|
+
(**
|
4744
|
+
* @license lucide-react v0.379.0 - ISC
|
4745
|
+
*
|
4746
|
+
* This source code is licensed under the ISC license.
|
4747
|
+
* See the LICENSE file in the root directory of this source tree.
|
4748
|
+
*)
|
4749
|
+
*/
|