@sikka/hawa 0.10.21-next → 0.10.22-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/index.d.mts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +5 -4
- package/dist/index.mjs +3 -2
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -6917,9 +6917,10 @@ var import_zod = require("@hookform/resolvers/zod");
|
|
|
6917
6917
|
var import_libphonenumber_js = require("libphonenumber-js");
|
|
6918
6918
|
var z = __toESM(require("zod"));
|
|
6919
6919
|
var LoginForm = function(_param) {
|
|
6920
|
-
var loginType = _param.loginType, texts = _param.texts, props = _object_without_properties(_param, [
|
|
6920
|
+
var loginType = _param.loginType, texts = _param.texts, _param_passwordLength = _param.passwordLength, passwordLength = _param_passwordLength === void 0 ? 8 : _param_passwordLength, props = _object_without_properties(_param, [
|
|
6921
6921
|
"loginType",
|
|
6922
|
-
"texts"
|
|
6922
|
+
"texts",
|
|
6923
|
+
"passwordLength"
|
|
6923
6924
|
]);
|
|
6924
6925
|
var formSchema;
|
|
6925
6926
|
if (loginType === "email") {
|
|
@@ -6935,7 +6936,7 @@ var LoginForm = function(_param) {
|
|
|
6935
6936
|
required_error: texts === null || texts === void 0 ? void 0 : texts.passwordRequired
|
|
6936
6937
|
}).min(1, {
|
|
6937
6938
|
message: texts === null || texts === void 0 ? void 0 : texts.passwordRequired
|
|
6938
|
-
}).min(
|
|
6939
|
+
}).min(passwordLength, {
|
|
6939
6940
|
message: texts === null || texts === void 0 ? void 0 : texts.passwordTooShort
|
|
6940
6941
|
})
|
|
6941
6942
|
});
|
|
@@ -6955,7 +6956,7 @@ var LoginForm = function(_param) {
|
|
|
6955
6956
|
required_error: texts === null || texts === void 0 ? void 0 : texts.passwordRequired
|
|
6956
6957
|
}).min(1, {
|
|
6957
6958
|
message: texts === null || texts === void 0 ? void 0 : texts.passwordRequired
|
|
6958
|
-
}).min(
|
|
6959
|
+
}).min(passwordLength, {
|
|
6959
6960
|
message: texts === null || texts === void 0 ? void 0 : texts.passwordTooShort
|
|
6960
6961
|
})
|
|
6961
6962
|
});
|
package/dist/index.mjs
CHANGED
|
@@ -6781,13 +6781,14 @@ import * as z from "zod";
|
|
|
6781
6781
|
var LoginForm = ({
|
|
6782
6782
|
loginType,
|
|
6783
6783
|
texts,
|
|
6784
|
+
passwordLength = 8,
|
|
6784
6785
|
...props
|
|
6785
6786
|
}) => {
|
|
6786
6787
|
let formSchema;
|
|
6787
6788
|
if (loginType === "email") {
|
|
6788
6789
|
formSchema = z.object({
|
|
6789
6790
|
email: z.string({ required_error: texts?.emailRequired }).min(1, { message: texts?.emailRequired }).email({ message: texts?.emailInvalid }),
|
|
6790
|
-
password: z.string({ required_error: texts?.passwordRequired }).min(1, { message: texts?.passwordRequired }).min(
|
|
6791
|
+
password: z.string({ required_error: texts?.passwordRequired }).min(1, { message: texts?.passwordRequired }).min(passwordLength, { message: texts?.passwordTooShort })
|
|
6791
6792
|
});
|
|
6792
6793
|
} else if (loginType === "username") {
|
|
6793
6794
|
formSchema = z.object({
|
|
@@ -6798,7 +6799,7 @@ var LoginForm = ({
|
|
|
6798
6799
|
},
|
|
6799
6800
|
{ message: texts?.usernameInvalid }
|
|
6800
6801
|
),
|
|
6801
|
-
password: z.string({ required_error: texts?.passwordRequired }).min(1, { message: texts?.passwordRequired }).min(
|
|
6802
|
+
password: z.string({ required_error: texts?.passwordRequired }).min(1, { message: texts?.passwordRequired }).min(passwordLength, { message: texts?.passwordTooShort })
|
|
6802
6803
|
});
|
|
6803
6804
|
} else if (loginType === "phone") {
|
|
6804
6805
|
formSchema = z.object({
|