@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 CHANGED
@@ -988,6 +988,7 @@ type LoginFormTypes = {
988
988
  onTwitterLogin?: () => void;
989
989
  /** Additional buttons to add under the login button */
990
990
  additionalButtons?: any;
991
+ passwordLength?: number;
991
992
  };
992
993
  declare const LoginForm: FC<LoginFormTypes>;
993
994
 
package/dist/index.d.ts CHANGED
@@ -988,6 +988,7 @@ type LoginFormTypes = {
988
988
  onTwitterLogin?: () => void;
989
989
  /** Additional buttons to add under the login button */
990
990
  additionalButtons?: any;
991
+ passwordLength?: number;
991
992
  };
992
993
  declare const LoginForm: FC<LoginFormTypes>;
993
994
 
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(8, {
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(8, {
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(8, { message: texts?.passwordTooShort })
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(8, { message: texts?.passwordTooShort })
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({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sikka/hawa",
3
- "version": "0.10.21-next",
3
+ "version": "0.10.22-next",
4
4
  "main": "./dist/index.js",
5
5
  "types": "./dist/index.d.ts",
6
6
  "exports": {