@sikka/hawa 0.42.6-next → 0.42.8-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/blocks/auth/index.d.mts +4 -2
- package/dist/blocks/auth/index.d.ts +4 -2
- package/dist/blocks/auth/index.js +25 -22
- package/dist/blocks/auth/index.mjs +25 -22
- package/dist/blocks/index.d.mts +4 -2
- package/dist/blocks/index.d.ts +4 -2
- package/dist/blocks/index.js +25 -22
- package/dist/blocks/index.mjs +13 -10
- package/dist/{chunk-EBVZY3RJ.mjs → chunk-RIZBMJNK.mjs} +13 -13
- package/dist/dataTable/index.d.mts +2 -1
- package/dist/dataTable/index.d.ts +2 -1
- package/dist/dataTable/index.js +4 -0
- package/dist/dataTable/index.js.map +1 -1
- package/dist/dataTable/index.mjs +4 -0
- package/dist/dataTable/index.mjs.map +1 -1
- package/dist/elements/index.d.mts +2 -1
- package/dist/elements/index.d.ts +2 -1
- package/dist/elements/index.js +17 -13
- package/dist/elements/index.mjs +5 -1
- package/dist/index.css +3 -19
- package/dist/index.d.mts +6 -3
- package/dist/index.d.ts +6 -3
- package/dist/index.js +29 -22
- package/dist/index.mjs +29 -22
- package/dist/pinInput/index.js +13 -13
- package/dist/pinInput/index.js.map +1 -1
- package/dist/pinInput/index.mjs +13 -13
- package/dist/pinInput/index.mjs.map +1 -1
- package/package.json +14 -14
@@ -103,8 +103,8 @@ type LoginFormTypes = {
|
|
103
103
|
onTwitterLogin?: () => void;
|
104
104
|
/** Additional buttons to add under the login button */
|
105
105
|
additionalButtons?: any;
|
106
|
-
/** The
|
107
|
-
|
106
|
+
/** The minimum length of the password input field */
|
107
|
+
minPasswordLength?: number;
|
108
108
|
/** If true, the form is displayed without a card container styling.*/
|
109
109
|
cardless?: boolean;
|
110
110
|
/** Props to pass to the PhoneInput component */
|
@@ -183,6 +183,8 @@ type RegisterFormTypes = {
|
|
183
183
|
form?: string;
|
184
184
|
card?: string;
|
185
185
|
};
|
186
|
+
/** The minimum length of the password input field */
|
187
|
+
minPasswordLength?: number;
|
186
188
|
/** If true, the form is displayed without a card container styling.*/
|
187
189
|
cardless?: boolean;
|
188
190
|
};
|
@@ -103,8 +103,8 @@ type LoginFormTypes = {
|
|
103
103
|
onTwitterLogin?: () => void;
|
104
104
|
/** Additional buttons to add under the login button */
|
105
105
|
additionalButtons?: any;
|
106
|
-
/** The
|
107
|
-
|
106
|
+
/** The minimum length of the password input field */
|
107
|
+
minPasswordLength?: number;
|
108
108
|
/** If true, the form is displayed without a card container styling.*/
|
109
109
|
cardless?: boolean;
|
110
110
|
/** Props to pass to the PhoneInput component */
|
@@ -183,6 +183,8 @@ type RegisterFormTypes = {
|
|
183
183
|
form?: string;
|
184
184
|
card?: string;
|
185
185
|
};
|
186
|
+
/** The minimum length of the password input field */
|
187
|
+
minPasswordLength?: number;
|
186
188
|
/** If true, the form is displayed without a card container styling.*/
|
187
189
|
cardless?: boolean;
|
188
190
|
};
|
@@ -3528,7 +3528,7 @@ var import_react13 = __toESM(require("react"));
|
|
3528
3528
|
// blocks/auth/LoginForm.tsx
|
3529
3529
|
var LoginForm = ({
|
3530
3530
|
loginType = "email",
|
3531
|
-
|
3531
|
+
minPasswordLength = 8,
|
3532
3532
|
texts,
|
3533
3533
|
...props
|
3534
3534
|
}) => {
|
@@ -3549,7 +3549,7 @@ var LoginForm = ({
|
|
3549
3549
|
email: z.string({ required_error: ((_a = texts == null ? void 0 : texts.email) == null ? void 0 : _a.required) || "Email Required" }).min(1, { message: ((_b = texts == null ? void 0 : texts.email) == null ? void 0 : _b.required) || "Email Required" }).email({ message: ((_c = texts == null ? void 0 : texts.email) == null ? void 0 : _c.invalid) || "Email Invalid" }),
|
3550
3550
|
password: z.string({
|
3551
3551
|
required_error: ((_d = texts == null ? void 0 : texts.password) == null ? void 0 : _d.required) || "Password Required"
|
3552
|
-
}).min(1, { message: ((_e = texts == null ? void 0 : texts.password) == null ? void 0 : _e.required) || "Password Required" }).min(
|
3552
|
+
}).min(1, { message: ((_e = texts == null ? void 0 : texts.password) == null ? void 0 : _e.required) || "Password Required" }).min(minPasswordLength, {
|
3553
3553
|
message: ((_f = texts == null ? void 0 : texts.password) == null ? void 0 : _f.tooShort) || "Password too short"
|
3554
3554
|
})
|
3555
3555
|
});
|
@@ -3566,7 +3566,7 @@ var LoginForm = ({
|
|
3566
3566
|
),
|
3567
3567
|
password: z.string({
|
3568
3568
|
required_error: ((_j = texts == null ? void 0 : texts.password) == null ? void 0 : _j.required) || "Password Required"
|
3569
|
-
}).min(1, { message: ((_k = texts == null ? void 0 : texts.password) == null ? void 0 : _k.required) || "Password Required" }).min(
|
3569
|
+
}).min(1, { message: ((_k = texts == null ? void 0 : texts.password) == null ? void 0 : _k.required) || "Password Required" }).min(minPasswordLength, {
|
3570
3570
|
message: ((_l = texts == null ? void 0 : texts.password) == null ? void 0 : _l.tooShort) || "Password too short"
|
3571
3571
|
})
|
3572
3572
|
});
|
@@ -4006,11 +4006,12 @@ var StopPropagationWrapper = (props) => {
|
|
4006
4006
|
var RegisterForm = ({
|
4007
4007
|
texts,
|
4008
4008
|
registerFields = ["email"],
|
4009
|
+
minPasswordLength = 8,
|
4009
4010
|
showTermsOption = false,
|
4010
4011
|
showNewsletterOption = false,
|
4011
4012
|
...props
|
4012
4013
|
}) => {
|
4013
|
-
var _a, _b, _c, _d, _e, _f, _g, _h;
|
4014
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i;
|
4014
4015
|
const [passwordVisible, setPasswordVisible] = (0, import_react17.useState)(false);
|
4015
4016
|
const thirdPartyAuthTexts = {
|
4016
4017
|
continueWithGoogle: texts == null ? void 0 : texts.continueWithGoogle,
|
@@ -4055,15 +4056,17 @@ var RegisterForm = ({
|
|
4055
4056
|
...fieldSchemas,
|
4056
4057
|
password: z2.string({
|
4057
4058
|
required_error: ((_a = texts == null ? void 0 : texts.password) == null ? void 0 : _a.required) || "Password is required"
|
4058
|
-
}).min(
|
4059
|
+
}).min(minPasswordLength, {
|
4059
4060
|
message: ((_b = texts == null ? void 0 : texts.password) == null ? void 0 : _b.tooShort) || "Password is too short"
|
4060
4061
|
}).refine((value) => value !== "", {
|
4061
4062
|
message: ((_c = texts == null ? void 0 : texts.password) == null ? void 0 : _c.required) || "Password is required"
|
4062
4063
|
}),
|
4063
4064
|
confirm_password: z2.string({
|
4064
4065
|
required_error: ((_d = texts == null ? void 0 : texts.confirm) == null ? void 0 : _d.required) || "Confirm password required"
|
4066
|
+
}).min(minPasswordLength, {
|
4067
|
+
message: ((_e = texts == null ? void 0 : texts.password) == null ? void 0 : _e.tooShort) || "Password is too short"
|
4065
4068
|
}).refine((value) => value !== "", {
|
4066
|
-
message: ((
|
4069
|
+
message: ((_f = texts == null ? void 0 : texts.password) == null ? void 0 : _f.required) || "Confirm password is required"
|
4067
4070
|
}),
|
4068
4071
|
refCode: z2.string().optional(),
|
4069
4072
|
reference: z2.string().optional(),
|
@@ -4072,7 +4075,7 @@ var RegisterForm = ({
|
|
4072
4075
|
}),
|
4073
4076
|
newsletter_accepted: z2.boolean().optional()
|
4074
4077
|
}).refine((data) => data.password === data.confirm_password, {
|
4075
|
-
message: ((
|
4078
|
+
message: ((_g = texts == null ? void 0 : texts.confirm) == null ? void 0 : _g.dontMatch) || "Passwords don't match",
|
4076
4079
|
path: ["confirm_password"]
|
4077
4080
|
});
|
4078
4081
|
const { handleSubmit, control, formState } = (0, import_react_hook_form2.useForm)({
|
@@ -4083,7 +4086,7 @@ var RegisterForm = ({
|
|
4083
4086
|
{
|
4084
4087
|
className: cn(
|
4085
4088
|
"hawa-flex hawa-flex-col hawa-gap-4",
|
4086
|
-
(
|
4089
|
+
(_h = props.classNames) == null ? void 0 : _h.root
|
4087
4090
|
)
|
4088
4091
|
},
|
4089
4092
|
/* @__PURE__ */ import_react17.default.createElement(
|
@@ -4091,7 +4094,7 @@ var RegisterForm = ({
|
|
4091
4094
|
{
|
4092
4095
|
dir: props.direction,
|
4093
4096
|
className: cn(
|
4094
|
-
(
|
4097
|
+
(_i = props.classNames) == null ? void 0 : _i.card,
|
4095
4098
|
props.cardless && "hawa-border-none hawa-bg-transparent !hawa-shadow-none !hawa-drop-shadow-none"
|
4096
4099
|
)
|
4097
4100
|
},
|
@@ -4641,19 +4644,19 @@ var z5 = __toESM(require("zod"));
|
|
4641
4644
|
var React25 = __toESM(require("react"));
|
4642
4645
|
var import_input_otp = require("input-otp");
|
4643
4646
|
|
4644
|
-
// ../../node_modules/.pnpm/lucide-react@0.
|
4647
|
+
// ../../node_modules/.pnpm/lucide-react@0.403.0_react@18.3.1/node_modules/lucide-react/dist/esm/createLucideIcon.js
|
4645
4648
|
var import_react23 = require("react");
|
4646
4649
|
|
4647
|
-
// ../../node_modules/.pnpm/lucide-react@0.
|
4650
|
+
// ../../node_modules/.pnpm/lucide-react@0.403.0_react@18.3.1/node_modules/lucide-react/dist/esm/shared/src/utils.js
|
4648
4651
|
var toKebabCase = (string6) => string6.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
|
4649
4652
|
var mergeClasses = (...classes) => classes.filter((className, index, array) => {
|
4650
4653
|
return Boolean(className) && array.indexOf(className) === index;
|
4651
4654
|
}).join(" ");
|
4652
4655
|
|
4653
|
-
// ../../node_modules/.pnpm/lucide-react@0.
|
4656
|
+
// ../../node_modules/.pnpm/lucide-react@0.403.0_react@18.3.1/node_modules/lucide-react/dist/esm/Icon.js
|
4654
4657
|
var import_react22 = require("react");
|
4655
4658
|
|
4656
|
-
// ../../node_modules/.pnpm/lucide-react@0.
|
4659
|
+
// ../../node_modules/.pnpm/lucide-react@0.403.0_react@18.3.1/node_modules/lucide-react/dist/esm/defaultAttributes.js
|
4657
4660
|
var defaultAttributes = {
|
4658
4661
|
xmlns: "http://www.w3.org/2000/svg",
|
4659
4662
|
width: 24,
|
@@ -4666,7 +4669,7 @@ var defaultAttributes = {
|
|
4666
4669
|
strokeLinejoin: "round"
|
4667
4670
|
};
|
4668
4671
|
|
4669
|
-
// ../../node_modules/.pnpm/lucide-react@0.
|
4672
|
+
// ../../node_modules/.pnpm/lucide-react@0.403.0_react@18.3.1/node_modules/lucide-react/dist/esm/Icon.js
|
4670
4673
|
var Icon = (0, import_react22.forwardRef)(
|
4671
4674
|
({
|
4672
4675
|
color = "currentColor",
|
@@ -4698,7 +4701,7 @@ var Icon = (0, import_react22.forwardRef)(
|
|
4698
4701
|
}
|
4699
4702
|
);
|
4700
4703
|
|
4701
|
-
// ../../node_modules/.pnpm/lucide-react@0.
|
4704
|
+
// ../../node_modules/.pnpm/lucide-react@0.403.0_react@18.3.1/node_modules/lucide-react/dist/esm/createLucideIcon.js
|
4702
4705
|
var createLucideIcon = (iconName, iconNode) => {
|
4703
4706
|
const Component = (0, import_react23.forwardRef)(
|
4704
4707
|
({ className, ...props }, ref) => (0, import_react23.createElement)(Icon, {
|
@@ -4712,7 +4715,7 @@ var createLucideIcon = (iconName, iconNode) => {
|
|
4712
4715
|
return Component;
|
4713
4716
|
};
|
4714
4717
|
|
4715
|
-
// ../../node_modules/.pnpm/lucide-react@0.
|
4718
|
+
// ../../node_modules/.pnpm/lucide-react@0.403.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/dot.js
|
4716
4719
|
var Dot = createLucideIcon("Dot", [
|
4717
4720
|
["circle", { cx: "12.1", cy: "12.1", r: "1", key: "18d7e5" }]
|
4718
4721
|
]);
|
@@ -4890,7 +4893,7 @@ var CodeConfirmation = ({
|
|
4890
4893
|
|
4891
4894
|
lucide-react/dist/esm/shared/src/utils.js:
|
4892
4895
|
(**
|
4893
|
-
* @license lucide-react v0.
|
4896
|
+
* @license lucide-react v0.403.0 - ISC
|
4894
4897
|
*
|
4895
4898
|
* This source code is licensed under the ISC license.
|
4896
4899
|
* See the LICENSE file in the root directory of this source tree.
|
@@ -4898,7 +4901,7 @@ lucide-react/dist/esm/shared/src/utils.js:
|
|
4898
4901
|
|
4899
4902
|
lucide-react/dist/esm/defaultAttributes.js:
|
4900
4903
|
(**
|
4901
|
-
* @license lucide-react v0.
|
4904
|
+
* @license lucide-react v0.403.0 - ISC
|
4902
4905
|
*
|
4903
4906
|
* This source code is licensed under the ISC license.
|
4904
4907
|
* See the LICENSE file in the root directory of this source tree.
|
@@ -4906,7 +4909,7 @@ lucide-react/dist/esm/defaultAttributes.js:
|
|
4906
4909
|
|
4907
4910
|
lucide-react/dist/esm/Icon.js:
|
4908
4911
|
(**
|
4909
|
-
* @license lucide-react v0.
|
4912
|
+
* @license lucide-react v0.403.0 - ISC
|
4910
4913
|
*
|
4911
4914
|
* This source code is licensed under the ISC license.
|
4912
4915
|
* See the LICENSE file in the root directory of this source tree.
|
@@ -4914,7 +4917,7 @@ lucide-react/dist/esm/Icon.js:
|
|
4914
4917
|
|
4915
4918
|
lucide-react/dist/esm/createLucideIcon.js:
|
4916
4919
|
(**
|
4917
|
-
* @license lucide-react v0.
|
4920
|
+
* @license lucide-react v0.403.0 - ISC
|
4918
4921
|
*
|
4919
4922
|
* This source code is licensed under the ISC license.
|
4920
4923
|
* See the LICENSE file in the root directory of this source tree.
|
@@ -4922,7 +4925,7 @@ lucide-react/dist/esm/createLucideIcon.js:
|
|
4922
4925
|
|
4923
4926
|
lucide-react/dist/esm/icons/dot.js:
|
4924
4927
|
(**
|
4925
|
-
* @license lucide-react v0.
|
4928
|
+
* @license lucide-react v0.403.0 - ISC
|
4926
4929
|
*
|
4927
4930
|
* This source code is licensed under the ISC license.
|
4928
4931
|
* See the LICENSE file in the root directory of this source tree.
|
@@ -4930,7 +4933,7 @@ lucide-react/dist/esm/icons/dot.js:
|
|
4930
4933
|
|
4931
4934
|
lucide-react/dist/esm/lucide-react.js:
|
4932
4935
|
(**
|
4933
|
-
* @license lucide-react v0.
|
4936
|
+
* @license lucide-react v0.403.0 - ISC
|
4934
4937
|
*
|
4935
4938
|
* This source code is licensed under the ISC license.
|
4936
4939
|
* See the LICENSE file in the root directory of this source tree.
|
@@ -2555,7 +2555,7 @@ var PhoneInput = ({
|
|
2555
2555
|
// blocks/auth/LoginForm.tsx
|
2556
2556
|
var LoginForm = ({
|
2557
2557
|
loginType = "email",
|
2558
|
-
|
2558
|
+
minPasswordLength = 8,
|
2559
2559
|
texts,
|
2560
2560
|
...props
|
2561
2561
|
}) => {
|
@@ -2576,7 +2576,7 @@ var LoginForm = ({
|
|
2576
2576
|
email: z.string({ required_error: ((_a = texts == null ? void 0 : texts.email) == null ? void 0 : _a.required) || "Email Required" }).min(1, { message: ((_b = texts == null ? void 0 : texts.email) == null ? void 0 : _b.required) || "Email Required" }).email({ message: ((_c = texts == null ? void 0 : texts.email) == null ? void 0 : _c.invalid) || "Email Invalid" }),
|
2577
2577
|
password: z.string({
|
2578
2578
|
required_error: ((_d = texts == null ? void 0 : texts.password) == null ? void 0 : _d.required) || "Password Required"
|
2579
|
-
}).min(1, { message: ((_e = texts == null ? void 0 : texts.password) == null ? void 0 : _e.required) || "Password Required" }).min(
|
2579
|
+
}).min(1, { message: ((_e = texts == null ? void 0 : texts.password) == null ? void 0 : _e.required) || "Password Required" }).min(minPasswordLength, {
|
2580
2580
|
message: ((_f = texts == null ? void 0 : texts.password) == null ? void 0 : _f.tooShort) || "Password too short"
|
2581
2581
|
})
|
2582
2582
|
});
|
@@ -2593,7 +2593,7 @@ var LoginForm = ({
|
|
2593
2593
|
),
|
2594
2594
|
password: z.string({
|
2595
2595
|
required_error: ((_j = texts == null ? void 0 : texts.password) == null ? void 0 : _j.required) || "Password Required"
|
2596
|
-
}).min(1, { message: ((_k = texts == null ? void 0 : texts.password) == null ? void 0 : _k.required) || "Password Required" }).min(
|
2596
|
+
}).min(1, { message: ((_k = texts == null ? void 0 : texts.password) == null ? void 0 : _k.required) || "Password Required" }).min(minPasswordLength, {
|
2597
2597
|
message: ((_l = texts == null ? void 0 : texts.password) == null ? void 0 : _l.tooShort) || "Password too short"
|
2598
2598
|
})
|
2599
2599
|
});
|
@@ -3024,11 +3024,12 @@ CheckboxElement.displayName = CheckboxPrimitive.Root.displayName;
|
|
3024
3024
|
var RegisterForm = ({
|
3025
3025
|
texts,
|
3026
3026
|
registerFields = ["email"],
|
3027
|
+
minPasswordLength = 8,
|
3027
3028
|
showTermsOption = false,
|
3028
3029
|
showNewsletterOption = false,
|
3029
3030
|
...props
|
3030
3031
|
}) => {
|
3031
|
-
var _a, _b, _c, _d, _e, _f, _g, _h;
|
3032
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i;
|
3032
3033
|
const [passwordVisible, setPasswordVisible] = useState4(false);
|
3033
3034
|
const thirdPartyAuthTexts = {
|
3034
3035
|
continueWithGoogle: texts == null ? void 0 : texts.continueWithGoogle,
|
@@ -3073,15 +3074,17 @@ var RegisterForm = ({
|
|
3073
3074
|
...fieldSchemas,
|
3074
3075
|
password: z2.string({
|
3075
3076
|
required_error: ((_a = texts == null ? void 0 : texts.password) == null ? void 0 : _a.required) || "Password is required"
|
3076
|
-
}).min(
|
3077
|
+
}).min(minPasswordLength, {
|
3077
3078
|
message: ((_b = texts == null ? void 0 : texts.password) == null ? void 0 : _b.tooShort) || "Password is too short"
|
3078
3079
|
}).refine((value) => value !== "", {
|
3079
3080
|
message: ((_c = texts == null ? void 0 : texts.password) == null ? void 0 : _c.required) || "Password is required"
|
3080
3081
|
}),
|
3081
3082
|
confirm_password: z2.string({
|
3082
3083
|
required_error: ((_d = texts == null ? void 0 : texts.confirm) == null ? void 0 : _d.required) || "Confirm password required"
|
3084
|
+
}).min(minPasswordLength, {
|
3085
|
+
message: ((_e = texts == null ? void 0 : texts.password) == null ? void 0 : _e.tooShort) || "Password is too short"
|
3083
3086
|
}).refine((value) => value !== "", {
|
3084
|
-
message: ((
|
3087
|
+
message: ((_f = texts == null ? void 0 : texts.password) == null ? void 0 : _f.required) || "Confirm password is required"
|
3085
3088
|
}),
|
3086
3089
|
refCode: z2.string().optional(),
|
3087
3090
|
reference: z2.string().optional(),
|
@@ -3090,7 +3093,7 @@ var RegisterForm = ({
|
|
3090
3093
|
}),
|
3091
3094
|
newsletter_accepted: z2.boolean().optional()
|
3092
3095
|
}).refine((data) => data.password === data.confirm_password, {
|
3093
|
-
message: ((
|
3096
|
+
message: ((_g = texts == null ? void 0 : texts.confirm) == null ? void 0 : _g.dontMatch) || "Passwords don't match",
|
3094
3097
|
path: ["confirm_password"]
|
3095
3098
|
});
|
3096
3099
|
const { handleSubmit, control, formState } = useForm2({
|
@@ -3101,7 +3104,7 @@ var RegisterForm = ({
|
|
3101
3104
|
{
|
3102
3105
|
className: cn(
|
3103
3106
|
"hawa-flex hawa-flex-col hawa-gap-4",
|
3104
|
-
(
|
3107
|
+
(_h = props.classNames) == null ? void 0 : _h.root
|
3105
3108
|
)
|
3106
3109
|
},
|
3107
3110
|
/* @__PURE__ */ React7.createElement(
|
@@ -3109,7 +3112,7 @@ var RegisterForm = ({
|
|
3109
3112
|
{
|
3110
3113
|
dir: props.direction,
|
3111
3114
|
className: cn(
|
3112
|
-
(
|
3115
|
+
(_i = props.classNames) == null ? void 0 : _i.card,
|
3113
3116
|
props.cardless && "hawa-border-none hawa-bg-transparent !hawa-shadow-none !hawa-drop-shadow-none"
|
3114
3117
|
)
|
3115
3118
|
},
|
@@ -3659,19 +3662,19 @@ import * as z5 from "zod";
|
|
3659
3662
|
import * as React12 from "react";
|
3660
3663
|
import { OTPInput, OTPInputContext } from "input-otp";
|
3661
3664
|
|
3662
|
-
// ../../node_modules/.pnpm/lucide-react@0.
|
3665
|
+
// ../../node_modules/.pnpm/lucide-react@0.403.0_react@18.3.1/node_modules/lucide-react/dist/esm/createLucideIcon.js
|
3663
3666
|
import { forwardRef as forwardRef3, createElement as createElement3 } from "react";
|
3664
3667
|
|
3665
|
-
// ../../node_modules/.pnpm/lucide-react@0.
|
3668
|
+
// ../../node_modules/.pnpm/lucide-react@0.403.0_react@18.3.1/node_modules/lucide-react/dist/esm/shared/src/utils.js
|
3666
3669
|
var toKebabCase = (string6) => string6.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
|
3667
3670
|
var mergeClasses = (...classes) => classes.filter((className, index, array) => {
|
3668
3671
|
return Boolean(className) && array.indexOf(className) === index;
|
3669
3672
|
}).join(" ");
|
3670
3673
|
|
3671
|
-
// ../../node_modules/.pnpm/lucide-react@0.
|
3674
|
+
// ../../node_modules/.pnpm/lucide-react@0.403.0_react@18.3.1/node_modules/lucide-react/dist/esm/Icon.js
|
3672
3675
|
import { forwardRef as forwardRef2, createElement as createElement2 } from "react";
|
3673
3676
|
|
3674
|
-
// ../../node_modules/.pnpm/lucide-react@0.
|
3677
|
+
// ../../node_modules/.pnpm/lucide-react@0.403.0_react@18.3.1/node_modules/lucide-react/dist/esm/defaultAttributes.js
|
3675
3678
|
var defaultAttributes = {
|
3676
3679
|
xmlns: "http://www.w3.org/2000/svg",
|
3677
3680
|
width: 24,
|
@@ -3684,7 +3687,7 @@ var defaultAttributes = {
|
|
3684
3687
|
strokeLinejoin: "round"
|
3685
3688
|
};
|
3686
3689
|
|
3687
|
-
// ../../node_modules/.pnpm/lucide-react@0.
|
3690
|
+
// ../../node_modules/.pnpm/lucide-react@0.403.0_react@18.3.1/node_modules/lucide-react/dist/esm/Icon.js
|
3688
3691
|
var Icon = forwardRef2(
|
3689
3692
|
({
|
3690
3693
|
color = "currentColor",
|
@@ -3716,7 +3719,7 @@ var Icon = forwardRef2(
|
|
3716
3719
|
}
|
3717
3720
|
);
|
3718
3721
|
|
3719
|
-
// ../../node_modules/.pnpm/lucide-react@0.
|
3722
|
+
// ../../node_modules/.pnpm/lucide-react@0.403.0_react@18.3.1/node_modules/lucide-react/dist/esm/createLucideIcon.js
|
3720
3723
|
var createLucideIcon = (iconName, iconNode) => {
|
3721
3724
|
const Component = forwardRef3(
|
3722
3725
|
({ className, ...props }, ref) => createElement3(Icon, {
|
@@ -3730,7 +3733,7 @@ var createLucideIcon = (iconName, iconNode) => {
|
|
3730
3733
|
return Component;
|
3731
3734
|
};
|
3732
3735
|
|
3733
|
-
// ../../node_modules/.pnpm/lucide-react@0.
|
3736
|
+
// ../../node_modules/.pnpm/lucide-react@0.403.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/dot.js
|
3734
3737
|
var Dot = createLucideIcon("Dot", [
|
3735
3738
|
["circle", { cx: "12.1", cy: "12.1", r: "1", key: "18d7e5" }]
|
3736
3739
|
]);
|
@@ -3907,7 +3910,7 @@ export {
|
|
3907
3910
|
|
3908
3911
|
lucide-react/dist/esm/shared/src/utils.js:
|
3909
3912
|
(**
|
3910
|
-
* @license lucide-react v0.
|
3913
|
+
* @license lucide-react v0.403.0 - ISC
|
3911
3914
|
*
|
3912
3915
|
* This source code is licensed under the ISC license.
|
3913
3916
|
* See the LICENSE file in the root directory of this source tree.
|
@@ -3915,7 +3918,7 @@ lucide-react/dist/esm/shared/src/utils.js:
|
|
3915
3918
|
|
3916
3919
|
lucide-react/dist/esm/defaultAttributes.js:
|
3917
3920
|
(**
|
3918
|
-
* @license lucide-react v0.
|
3921
|
+
* @license lucide-react v0.403.0 - ISC
|
3919
3922
|
*
|
3920
3923
|
* This source code is licensed under the ISC license.
|
3921
3924
|
* See the LICENSE file in the root directory of this source tree.
|
@@ -3923,7 +3926,7 @@ lucide-react/dist/esm/defaultAttributes.js:
|
|
3923
3926
|
|
3924
3927
|
lucide-react/dist/esm/Icon.js:
|
3925
3928
|
(**
|
3926
|
-
* @license lucide-react v0.
|
3929
|
+
* @license lucide-react v0.403.0 - ISC
|
3927
3930
|
*
|
3928
3931
|
* This source code is licensed under the ISC license.
|
3929
3932
|
* See the LICENSE file in the root directory of this source tree.
|
@@ -3931,7 +3934,7 @@ lucide-react/dist/esm/Icon.js:
|
|
3931
3934
|
|
3932
3935
|
lucide-react/dist/esm/createLucideIcon.js:
|
3933
3936
|
(**
|
3934
|
-
* @license lucide-react v0.
|
3937
|
+
* @license lucide-react v0.403.0 - ISC
|
3935
3938
|
*
|
3936
3939
|
* This source code is licensed under the ISC license.
|
3937
3940
|
* See the LICENSE file in the root directory of this source tree.
|
@@ -3939,7 +3942,7 @@ lucide-react/dist/esm/createLucideIcon.js:
|
|
3939
3942
|
|
3940
3943
|
lucide-react/dist/esm/icons/dot.js:
|
3941
3944
|
(**
|
3942
|
-
* @license lucide-react v0.
|
3945
|
+
* @license lucide-react v0.403.0 - ISC
|
3943
3946
|
*
|
3944
3947
|
* This source code is licensed under the ISC license.
|
3945
3948
|
* See the LICENSE file in the root directory of this source tree.
|
@@ -3947,7 +3950,7 @@ lucide-react/dist/esm/icons/dot.js:
|
|
3947
3950
|
|
3948
3951
|
lucide-react/dist/esm/lucide-react.js:
|
3949
3952
|
(**
|
3950
|
-
* @license lucide-react v0.
|
3953
|
+
* @license lucide-react v0.403.0 - ISC
|
3951
3954
|
*
|
3952
3955
|
* This source code is licensed under the ISC license.
|
3953
3956
|
* See the LICENSE file in the root directory of this source tree.
|
package/dist/blocks/index.d.mts
CHANGED
@@ -85,8 +85,8 @@ type LoginFormTypes = {
|
|
85
85
|
onTwitterLogin?: () => void;
|
86
86
|
/** Additional buttons to add under the login button */
|
87
87
|
additionalButtons?: any;
|
88
|
-
/** The
|
89
|
-
|
88
|
+
/** The minimum length of the password input field */
|
89
|
+
minPasswordLength?: number;
|
90
90
|
/** If true, the form is displayed without a card container styling.*/
|
91
91
|
cardless?: boolean;
|
92
92
|
/** Props to pass to the PhoneInput component */
|
@@ -160,6 +160,8 @@ type RegisterFormTypes = {
|
|
160
160
|
form?: string;
|
161
161
|
card?: string;
|
162
162
|
};
|
163
|
+
/** The minimum length of the password input field */
|
164
|
+
minPasswordLength?: number;
|
163
165
|
/** If true, the form is displayed without a card container styling.*/
|
164
166
|
cardless?: boolean;
|
165
167
|
};
|
package/dist/blocks/index.d.ts
CHANGED
@@ -85,8 +85,8 @@ type LoginFormTypes = {
|
|
85
85
|
onTwitterLogin?: () => void;
|
86
86
|
/** Additional buttons to add under the login button */
|
87
87
|
additionalButtons?: any;
|
88
|
-
/** The
|
89
|
-
|
88
|
+
/** The minimum length of the password input field */
|
89
|
+
minPasswordLength?: number;
|
90
90
|
/** If true, the form is displayed without a card container styling.*/
|
91
91
|
cardless?: boolean;
|
92
92
|
/** Props to pass to the PhoneInput component */
|
@@ -160,6 +160,8 @@ type RegisterFormTypes = {
|
|
160
160
|
form?: string;
|
161
161
|
card?: string;
|
162
162
|
};
|
163
|
+
/** The minimum length of the password input field */
|
164
|
+
minPasswordLength?: number;
|
163
165
|
/** If true, the form is displayed without a card container styling.*/
|
164
166
|
cardless?: boolean;
|
165
167
|
};
|
package/dist/blocks/index.js
CHANGED
@@ -3685,7 +3685,7 @@ var UncheckMark = ({ size = "default", className }) => {
|
|
3685
3685
|
// blocks/auth/LoginForm.tsx
|
3686
3686
|
var LoginForm = ({
|
3687
3687
|
loginType = "email",
|
3688
|
-
|
3688
|
+
minPasswordLength = 8,
|
3689
3689
|
texts,
|
3690
3690
|
...props
|
3691
3691
|
}) => {
|
@@ -3706,7 +3706,7 @@ var LoginForm = ({
|
|
3706
3706
|
email: z.string({ required_error: ((_a = texts == null ? void 0 : texts.email) == null ? void 0 : _a.required) || "Email Required" }).min(1, { message: ((_b = texts == null ? void 0 : texts.email) == null ? void 0 : _b.required) || "Email Required" }).email({ message: ((_c = texts == null ? void 0 : texts.email) == null ? void 0 : _c.invalid) || "Email Invalid" }),
|
3707
3707
|
password: z.string({
|
3708
3708
|
required_error: ((_d = texts == null ? void 0 : texts.password) == null ? void 0 : _d.required) || "Password Required"
|
3709
|
-
}).min(1, { message: ((_e = texts == null ? void 0 : texts.password) == null ? void 0 : _e.required) || "Password Required" }).min(
|
3709
|
+
}).min(1, { message: ((_e = texts == null ? void 0 : texts.password) == null ? void 0 : _e.required) || "Password Required" }).min(minPasswordLength, {
|
3710
3710
|
message: ((_f = texts == null ? void 0 : texts.password) == null ? void 0 : _f.tooShort) || "Password too short"
|
3711
3711
|
})
|
3712
3712
|
});
|
@@ -3723,7 +3723,7 @@ var LoginForm = ({
|
|
3723
3723
|
),
|
3724
3724
|
password: z.string({
|
3725
3725
|
required_error: ((_j = texts == null ? void 0 : texts.password) == null ? void 0 : _j.required) || "Password Required"
|
3726
|
-
}).min(1, { message: ((_k = texts == null ? void 0 : texts.password) == null ? void 0 : _k.required) || "Password Required" }).min(
|
3726
|
+
}).min(1, { message: ((_k = texts == null ? void 0 : texts.password) == null ? void 0 : _k.required) || "Password Required" }).min(minPasswordLength, {
|
3727
3727
|
message: ((_l = texts == null ? void 0 : texts.password) == null ? void 0 : _l.tooShort) || "Password too short"
|
3728
3728
|
})
|
3729
3729
|
});
|
@@ -4163,11 +4163,12 @@ var StopPropagationWrapper = (props) => {
|
|
4163
4163
|
var RegisterForm = ({
|
4164
4164
|
texts,
|
4165
4165
|
registerFields = ["email"],
|
4166
|
+
minPasswordLength = 8,
|
4166
4167
|
showTermsOption = false,
|
4167
4168
|
showNewsletterOption = false,
|
4168
4169
|
...props
|
4169
4170
|
}) => {
|
4170
|
-
var _a, _b, _c, _d, _e, _f, _g, _h;
|
4171
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i;
|
4171
4172
|
const [passwordVisible, setPasswordVisible] = (0, import_react17.useState)(false);
|
4172
4173
|
const thirdPartyAuthTexts = {
|
4173
4174
|
continueWithGoogle: texts == null ? void 0 : texts.continueWithGoogle,
|
@@ -4212,15 +4213,17 @@ var RegisterForm = ({
|
|
4212
4213
|
...fieldSchemas,
|
4213
4214
|
password: z2.string({
|
4214
4215
|
required_error: ((_a = texts == null ? void 0 : texts.password) == null ? void 0 : _a.required) || "Password is required"
|
4215
|
-
}).min(
|
4216
|
+
}).min(minPasswordLength, {
|
4216
4217
|
message: ((_b = texts == null ? void 0 : texts.password) == null ? void 0 : _b.tooShort) || "Password is too short"
|
4217
4218
|
}).refine((value) => value !== "", {
|
4218
4219
|
message: ((_c = texts == null ? void 0 : texts.password) == null ? void 0 : _c.required) || "Password is required"
|
4219
4220
|
}),
|
4220
4221
|
confirm_password: z2.string({
|
4221
4222
|
required_error: ((_d = texts == null ? void 0 : texts.confirm) == null ? void 0 : _d.required) || "Confirm password required"
|
4223
|
+
}).min(minPasswordLength, {
|
4224
|
+
message: ((_e = texts == null ? void 0 : texts.password) == null ? void 0 : _e.tooShort) || "Password is too short"
|
4222
4225
|
}).refine((value) => value !== "", {
|
4223
|
-
message: ((
|
4226
|
+
message: ((_f = texts == null ? void 0 : texts.password) == null ? void 0 : _f.required) || "Confirm password is required"
|
4224
4227
|
}),
|
4225
4228
|
refCode: z2.string().optional(),
|
4226
4229
|
reference: z2.string().optional(),
|
@@ -4229,7 +4232,7 @@ var RegisterForm = ({
|
|
4229
4232
|
}),
|
4230
4233
|
newsletter_accepted: z2.boolean().optional()
|
4231
4234
|
}).refine((data) => data.password === data.confirm_password, {
|
4232
|
-
message: ((
|
4235
|
+
message: ((_g = texts == null ? void 0 : texts.confirm) == null ? void 0 : _g.dontMatch) || "Passwords don't match",
|
4233
4236
|
path: ["confirm_password"]
|
4234
4237
|
});
|
4235
4238
|
const { handleSubmit, control, formState } = (0, import_react_hook_form2.useForm)({
|
@@ -4240,7 +4243,7 @@ var RegisterForm = ({
|
|
4240
4243
|
{
|
4241
4244
|
className: cn(
|
4242
4245
|
"hawa-flex hawa-flex-col hawa-gap-4",
|
4243
|
-
(
|
4246
|
+
(_h = props.classNames) == null ? void 0 : _h.root
|
4244
4247
|
)
|
4245
4248
|
},
|
4246
4249
|
/* @__PURE__ */ import_react17.default.createElement(
|
@@ -4248,7 +4251,7 @@ var RegisterForm = ({
|
|
4248
4251
|
{
|
4249
4252
|
dir: props.direction,
|
4250
4253
|
className: cn(
|
4251
|
-
(
|
4254
|
+
(_i = props.classNames) == null ? void 0 : _i.card,
|
4252
4255
|
props.cardless && "hawa-border-none hawa-bg-transparent !hawa-shadow-none !hawa-drop-shadow-none"
|
4253
4256
|
)
|
4254
4257
|
},
|
@@ -4798,19 +4801,19 @@ var z5 = __toESM(require("zod"));
|
|
4798
4801
|
var React25 = __toESM(require("react"));
|
4799
4802
|
var import_input_otp = require("input-otp");
|
4800
4803
|
|
4801
|
-
// ../../node_modules/.pnpm/lucide-react@0.
|
4804
|
+
// ../../node_modules/.pnpm/lucide-react@0.403.0_react@18.3.1/node_modules/lucide-react/dist/esm/createLucideIcon.js
|
4802
4805
|
var import_react23 = require("react");
|
4803
4806
|
|
4804
|
-
// ../../node_modules/.pnpm/lucide-react@0.
|
4807
|
+
// ../../node_modules/.pnpm/lucide-react@0.403.0_react@18.3.1/node_modules/lucide-react/dist/esm/shared/src/utils.js
|
4805
4808
|
var toKebabCase = (string9) => string9.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
|
4806
4809
|
var mergeClasses = (...classes) => classes.filter((className, index, array) => {
|
4807
4810
|
return Boolean(className) && array.indexOf(className) === index;
|
4808
4811
|
}).join(" ");
|
4809
4812
|
|
4810
|
-
// ../../node_modules/.pnpm/lucide-react@0.
|
4813
|
+
// ../../node_modules/.pnpm/lucide-react@0.403.0_react@18.3.1/node_modules/lucide-react/dist/esm/Icon.js
|
4811
4814
|
var import_react22 = require("react");
|
4812
4815
|
|
4813
|
-
// ../../node_modules/.pnpm/lucide-react@0.
|
4816
|
+
// ../../node_modules/.pnpm/lucide-react@0.403.0_react@18.3.1/node_modules/lucide-react/dist/esm/defaultAttributes.js
|
4814
4817
|
var defaultAttributes = {
|
4815
4818
|
xmlns: "http://www.w3.org/2000/svg",
|
4816
4819
|
width: 24,
|
@@ -4823,7 +4826,7 @@ var defaultAttributes = {
|
|
4823
4826
|
strokeLinejoin: "round"
|
4824
4827
|
};
|
4825
4828
|
|
4826
|
-
// ../../node_modules/.pnpm/lucide-react@0.
|
4829
|
+
// ../../node_modules/.pnpm/lucide-react@0.403.0_react@18.3.1/node_modules/lucide-react/dist/esm/Icon.js
|
4827
4830
|
var Icon = (0, import_react22.forwardRef)(
|
4828
4831
|
({
|
4829
4832
|
color = "currentColor",
|
@@ -4855,7 +4858,7 @@ var Icon = (0, import_react22.forwardRef)(
|
|
4855
4858
|
}
|
4856
4859
|
);
|
4857
4860
|
|
4858
|
-
// ../../node_modules/.pnpm/lucide-react@0.
|
4861
|
+
// ../../node_modules/.pnpm/lucide-react@0.403.0_react@18.3.1/node_modules/lucide-react/dist/esm/createLucideIcon.js
|
4859
4862
|
var createLucideIcon = (iconName, iconNode) => {
|
4860
4863
|
const Component = (0, import_react23.forwardRef)(
|
4861
4864
|
({ className, ...props }, ref) => (0, import_react23.createElement)(Icon, {
|
@@ -4869,7 +4872,7 @@ var createLucideIcon = (iconName, iconNode) => {
|
|
4869
4872
|
return Component;
|
4870
4873
|
};
|
4871
4874
|
|
4872
|
-
// ../../node_modules/.pnpm/lucide-react@0.
|
4875
|
+
// ../../node_modules/.pnpm/lucide-react@0.403.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/dot.js
|
4873
4876
|
var Dot = createLucideIcon("Dot", [
|
4874
4877
|
["circle", { cx: "12.1", cy: "12.1", r: "1", key: "18d7e5" }]
|
4875
4878
|
]);
|
@@ -7920,7 +7923,7 @@ var Usage = (props) => {
|
|
7920
7923
|
|
7921
7924
|
lucide-react/dist/esm/shared/src/utils.js:
|
7922
7925
|
(**
|
7923
|
-
* @license lucide-react v0.
|
7926
|
+
* @license lucide-react v0.403.0 - ISC
|
7924
7927
|
*
|
7925
7928
|
* This source code is licensed under the ISC license.
|
7926
7929
|
* See the LICENSE file in the root directory of this source tree.
|
@@ -7928,7 +7931,7 @@ lucide-react/dist/esm/shared/src/utils.js:
|
|
7928
7931
|
|
7929
7932
|
lucide-react/dist/esm/defaultAttributes.js:
|
7930
7933
|
(**
|
7931
|
-
* @license lucide-react v0.
|
7934
|
+
* @license lucide-react v0.403.0 - ISC
|
7932
7935
|
*
|
7933
7936
|
* This source code is licensed under the ISC license.
|
7934
7937
|
* See the LICENSE file in the root directory of this source tree.
|
@@ -7936,7 +7939,7 @@ lucide-react/dist/esm/defaultAttributes.js:
|
|
7936
7939
|
|
7937
7940
|
lucide-react/dist/esm/Icon.js:
|
7938
7941
|
(**
|
7939
|
-
* @license lucide-react v0.
|
7942
|
+
* @license lucide-react v0.403.0 - ISC
|
7940
7943
|
*
|
7941
7944
|
* This source code is licensed under the ISC license.
|
7942
7945
|
* See the LICENSE file in the root directory of this source tree.
|
@@ -7944,7 +7947,7 @@ lucide-react/dist/esm/Icon.js:
|
|
7944
7947
|
|
7945
7948
|
lucide-react/dist/esm/createLucideIcon.js:
|
7946
7949
|
(**
|
7947
|
-
* @license lucide-react v0.
|
7950
|
+
* @license lucide-react v0.403.0 - ISC
|
7948
7951
|
*
|
7949
7952
|
* This source code is licensed under the ISC license.
|
7950
7953
|
* See the LICENSE file in the root directory of this source tree.
|
@@ -7952,7 +7955,7 @@ lucide-react/dist/esm/createLucideIcon.js:
|
|
7952
7955
|
|
7953
7956
|
lucide-react/dist/esm/icons/dot.js:
|
7954
7957
|
(**
|
7955
|
-
* @license lucide-react v0.
|
7958
|
+
* @license lucide-react v0.403.0 - ISC
|
7956
7959
|
*
|
7957
7960
|
* This source code is licensed under the ISC license.
|
7958
7961
|
* See the LICENSE file in the root directory of this source tree.
|
@@ -7960,7 +7963,7 @@ lucide-react/dist/esm/icons/dot.js:
|
|
7960
7963
|
|
7961
7964
|
lucide-react/dist/esm/lucide-react.js:
|
7962
7965
|
(**
|
7963
|
-
* @license lucide-react v0.
|
7966
|
+
* @license lucide-react v0.403.0 - ISC
|
7964
7967
|
*
|
7965
7968
|
* This source code is licensed under the ISC license.
|
7966
7969
|
* See the LICENSE file in the root directory of this source tree.
|