@nubase/frontend 0.1.18 → 0.1.19
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.js +29 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +29 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -15739,7 +15739,8 @@ function SignInScreen() {
|
|
|
15739
15739
|
{
|
|
15740
15740
|
name: "email",
|
|
15741
15741
|
validators: {
|
|
15742
|
-
onBlur: ({ value }) => !value ? "Email is required" : void 0
|
|
15742
|
+
onBlur: ({ value }) => !value ? "Email is required" : void 0,
|
|
15743
|
+
onChange: ({ value }) => !value ? "Email is required" : void 0
|
|
15743
15744
|
},
|
|
15744
15745
|
children: (field) => /* @__PURE__ */ jsx113(FormControl, { label: "Email", required: true, field, children: /* @__PURE__ */ jsx113(
|
|
15745
15746
|
TextInput,
|
|
@@ -15749,6 +15750,7 @@ function SignInScreen() {
|
|
|
15749
15750
|
placeholder: "Enter your email",
|
|
15750
15751
|
value: field.state.value,
|
|
15751
15752
|
onChange: (e) => field.handleChange(e.target.value),
|
|
15753
|
+
onInput: (e) => field.handleChange(e.target.value),
|
|
15752
15754
|
onBlur: field.handleBlur,
|
|
15753
15755
|
autoComplete: "email",
|
|
15754
15756
|
disabled: isLoading,
|
|
@@ -15762,7 +15764,8 @@ function SignInScreen() {
|
|
|
15762
15764
|
{
|
|
15763
15765
|
name: "password",
|
|
15764
15766
|
validators: {
|
|
15765
|
-
onBlur: ({ value }) => !value ? "Password is required" : void 0
|
|
15767
|
+
onBlur: ({ value }) => !value ? "Password is required" : void 0,
|
|
15768
|
+
onChange: ({ value }) => !value ? "Password is required" : void 0
|
|
15766
15769
|
},
|
|
15767
15770
|
children: (field) => /* @__PURE__ */ jsx113(FormControl, { label: "Password", required: true, field, children: /* @__PURE__ */ jsx113(
|
|
15768
15771
|
TextInput,
|
|
@@ -15772,6 +15775,7 @@ function SignInScreen() {
|
|
|
15772
15775
|
placeholder: "Enter your password",
|
|
15773
15776
|
value: field.state.value,
|
|
15774
15777
|
onChange: (e) => field.handleChange(e.target.value),
|
|
15778
|
+
onInput: (e) => field.handleChange(e.target.value),
|
|
15775
15779
|
onBlur: field.handleBlur,
|
|
15776
15780
|
autoComplete: "current-password",
|
|
15777
15781
|
disabled: isLoading,
|
|
@@ -15945,6 +15949,13 @@ function SignUpScreen() {
|
|
|
15945
15949
|
return "Please enter a valid email address";
|
|
15946
15950
|
}
|
|
15947
15951
|
return void 0;
|
|
15952
|
+
},
|
|
15953
|
+
onChange: ({ value }) => {
|
|
15954
|
+
if (!value) return "Email is required";
|
|
15955
|
+
if (!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(value)) {
|
|
15956
|
+
return "Please enter a valid email address";
|
|
15957
|
+
}
|
|
15958
|
+
return void 0;
|
|
15948
15959
|
}
|
|
15949
15960
|
},
|
|
15950
15961
|
children: (field) => /* @__PURE__ */ jsx114(FormControl, { label: "Email", required: true, field, children: /* @__PURE__ */ jsx114(
|
|
@@ -15955,6 +15966,7 @@ function SignUpScreen() {
|
|
|
15955
15966
|
placeholder: "Enter your email",
|
|
15956
15967
|
value: field.state.value,
|
|
15957
15968
|
onChange: (e) => field.handleChange(e.target.value),
|
|
15969
|
+
onInput: (e) => field.handleChange(e.target.value),
|
|
15958
15970
|
onBlur: field.handleBlur,
|
|
15959
15971
|
autoComplete: "email",
|
|
15960
15972
|
disabled: isLoading,
|
|
@@ -15997,6 +16009,13 @@ function SignUpScreen() {
|
|
|
15997
16009
|
return "Password must be at least 8 characters";
|
|
15998
16010
|
}
|
|
15999
16011
|
return void 0;
|
|
16012
|
+
},
|
|
16013
|
+
onChange: ({ value }) => {
|
|
16014
|
+
if (!value) return "Password is required";
|
|
16015
|
+
if (value.length < 8) {
|
|
16016
|
+
return "Password must be at least 8 characters";
|
|
16017
|
+
}
|
|
16018
|
+
return void 0;
|
|
16000
16019
|
}
|
|
16001
16020
|
},
|
|
16002
16021
|
children: (field) => /* @__PURE__ */ jsx114(FormControl, { label: "Password", required: true, field, children: /* @__PURE__ */ jsx114(
|
|
@@ -16007,6 +16026,7 @@ function SignUpScreen() {
|
|
|
16007
16026
|
placeholder: "Enter your password",
|
|
16008
16027
|
value: field.state.value,
|
|
16009
16028
|
onChange: (e) => field.handleChange(e.target.value),
|
|
16029
|
+
onInput: (e) => field.handleChange(e.target.value),
|
|
16010
16030
|
onBlur: field.handleBlur,
|
|
16011
16031
|
autoComplete: "new-password",
|
|
16012
16032
|
disabled: isLoading,
|
|
@@ -16025,6 +16045,12 @@ function SignUpScreen() {
|
|
|
16025
16045
|
if (!value) return "Please confirm your password";
|
|
16026
16046
|
if (value !== password) return "Passwords do not match";
|
|
16027
16047
|
return void 0;
|
|
16048
|
+
},
|
|
16049
|
+
onChange: ({ value, fieldApi }) => {
|
|
16050
|
+
const password = fieldApi.form.getFieldValue("password");
|
|
16051
|
+
if (!value) return "Please confirm your password";
|
|
16052
|
+
if (value !== password) return "Passwords do not match";
|
|
16053
|
+
return void 0;
|
|
16028
16054
|
}
|
|
16029
16055
|
},
|
|
16030
16056
|
children: (field) => /* @__PURE__ */ jsx114(FormControl, { label: "Confirm Password", required: true, field, children: /* @__PURE__ */ jsx114(
|
|
@@ -16035,6 +16061,7 @@ function SignUpScreen() {
|
|
|
16035
16061
|
placeholder: "Confirm your password",
|
|
16036
16062
|
value: field.state.value,
|
|
16037
16063
|
onChange: (e) => field.handleChange(e.target.value),
|
|
16064
|
+
onInput: (e) => field.handleChange(e.target.value),
|
|
16038
16065
|
onBlur: field.handleBlur,
|
|
16039
16066
|
autoComplete: "new-password",
|
|
16040
16067
|
disabled: isLoading,
|