@ttoss/react-auth-core 0.2.1 → 0.2.2

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/esm/index.js CHANGED
@@ -241,7 +241,7 @@ var AuthForgotPassword = props => {
241
241
  }).required();
242
242
  const formMethods = useForm2({
243
243
  resolver: yupResolver2(schema),
244
- mode: "onBlur"
244
+ mode: "onChange"
245
245
  });
246
246
  return /* @__PURE__ */jsx4(Form2, {
247
247
  ...formMethods,
@@ -370,7 +370,7 @@ var AuthForgotPasswordResetPassword = props => {
370
370
  });
371
371
  const formMethods = useForm3({
372
372
  resolver: yupResolver3(schema),
373
- mode: "onBlur"
373
+ mode: "onChange"
374
374
  });
375
375
  return /* @__PURE__ */jsx5(Form3, {
376
376
  ...formMethods,
@@ -517,7 +517,7 @@ var AuthSignIn = ({
517
517
  });
518
518
  const formMethods = useForm4({
519
519
  defaultValues,
520
- mode: "onBlur",
520
+ mode: "onChange",
521
521
  resolver: yupResolver4(schema)
522
522
  });
523
523
  const onSubmitForm = data => {
@@ -726,7 +726,7 @@ var AuthSignUp = props => {
726
726
  }
727
727
  }, [props.signUpTerms, signUpTermsLabel]);
728
728
  const formMethods = useForm5({
729
- mode: "onBlur",
729
+ mode: "onChange",
730
730
  resolver: yupResolver5(schema)
731
731
  });
732
732
  const onSubmitForm = data => {
package/dist/index.d.cts CHANGED
@@ -24,7 +24,7 @@ type AuthData = {
24
24
  isAuthenticated: boolean | undefined;
25
25
  };
26
26
  type AuthContextValue = {
27
- signOut?: () => Promise<void>;
27
+ signOut: () => Promise<void>;
28
28
  isAuthenticated: boolean;
29
29
  user: AuthUser | null;
30
30
  tokens: AuthTokens | null;
@@ -141,9 +141,8 @@ declare const AuthFullScreen: ({ children }: AuthFullScreenProps) => react_jsx_r
141
141
 
142
142
  type AuthProviderProps = {
143
143
  children: React$1.ReactNode;
144
- initialScreen?: AuthScreen;
145
- getAuthData?: () => Promise<AuthData | null>;
146
- signOut?: () => Promise<void>;
144
+ getAuthData: () => Promise<AuthData | null>;
145
+ signOut: () => Promise<void>;
147
146
  };
148
147
  declare const AuthProvider: (props: AuthProviderProps) => react_jsx_runtime.JSX.Element | null;
149
148
  declare const useAuth: () => AuthContextValue;
package/dist/index.d.ts CHANGED
@@ -24,7 +24,7 @@ type AuthData = {
24
24
  isAuthenticated: boolean | undefined;
25
25
  };
26
26
  type AuthContextValue = {
27
- signOut?: () => Promise<void>;
27
+ signOut: () => Promise<void>;
28
28
  isAuthenticated: boolean;
29
29
  user: AuthUser | null;
30
30
  tokens: AuthTokens | null;
@@ -141,9 +141,8 @@ declare const AuthFullScreen: ({ children }: AuthFullScreenProps) => react_jsx_r
141
141
 
142
142
  type AuthProviderProps = {
143
143
  children: React$1.ReactNode;
144
- initialScreen?: AuthScreen;
145
- getAuthData?: () => Promise<AuthData | null>;
146
- signOut?: () => Promise<void>;
144
+ getAuthData: () => Promise<AuthData | null>;
145
+ signOut: () => Promise<void>;
147
146
  };
148
147
  declare const AuthProvider: (props: AuthProviderProps) => react_jsx_runtime.JSX.Element | null;
149
148
  declare const useAuth: () => AuthContextValue;
package/dist/index.js CHANGED
@@ -294,7 +294,7 @@ var AuthForgotPassword = props => {
294
294
  }).required();
295
295
  const formMethods = (0, import_forms2.useForm)({
296
296
  resolver: (0, import_forms2.yupResolver)(schema),
297
- mode: "onBlur"
297
+ mode: "onChange"
298
298
  });
299
299
  return /* @__PURE__ */(0, import_jsx_runtime4.jsx)(import_forms2.Form, {
300
300
  ...formMethods,
@@ -423,7 +423,7 @@ var AuthForgotPasswordResetPassword = props => {
423
423
  });
424
424
  const formMethods = (0, import_forms3.useForm)({
425
425
  resolver: (0, import_forms3.yupResolver)(schema),
426
- mode: "onBlur"
426
+ mode: "onChange"
427
427
  });
428
428
  return /* @__PURE__ */(0, import_jsx_runtime5.jsx)(import_forms3.Form, {
429
429
  ...formMethods,
@@ -570,7 +570,7 @@ var AuthSignIn = ({
570
570
  });
571
571
  const formMethods = (0, import_forms4.useForm)({
572
572
  defaultValues,
573
- mode: "onBlur",
573
+ mode: "onChange",
574
574
  resolver: (0, import_forms4.yupResolver)(schema)
575
575
  });
576
576
  const onSubmitForm = data => {
@@ -779,7 +779,7 @@ var AuthSignUp = props => {
779
779
  }
780
780
  }, [props.signUpTerms, signUpTermsLabel]);
781
781
  const formMethods = (0, import_forms5.useForm)({
782
- mode: "onBlur",
782
+ mode: "onChange",
783
783
  resolver: (0, import_forms5.yupResolver)(schema)
784
784
  });
785
785
  const onSubmitForm = data => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ttoss/react-auth-core",
3
- "version": "0.2.1",
3
+ "version": "0.2.2",
4
4
  "description": "Core authentication components and abstractions for React apps.",
5
5
  "license": "MIT",
6
6
  "author": "ttoss",
@@ -29,10 +29,10 @@
29
29
  },
30
30
  "peerDependencies": {
31
31
  "react": ">=16.8.0",
32
- "@ttoss/components": "^2.2.26",
33
32
  "@ttoss/forms": "^0.31.3",
34
33
  "@ttoss/logger": "^0.6.4",
35
34
  "@ttoss/react-notifications": "^2.4.3",
35
+ "@ttoss/components": "^2.2.26",
36
36
  "@ttoss/react-i18n": "^2.0.14",
37
37
  "@ttoss/ui": "^5.9.2"
38
38
  },
@@ -44,13 +44,13 @@
44
44
  "tsup": "^8.5.0",
45
45
  "@ttoss/components": "^2.2.26",
46
46
  "@ttoss/config": "^1.35.6",
47
- "@ttoss/logger": "^0.6.4",
48
47
  "@ttoss/forms": "^0.31.3",
48
+ "@ttoss/logger": "^0.6.4",
49
+ "@ttoss/i18n-cli": "^0.7.31",
49
50
  "@ttoss/react-i18n": "^2.0.14",
50
51
  "@ttoss/react-notifications": "^2.4.3",
51
- "@ttoss/ui": "^5.9.2",
52
52
  "@ttoss/test-utils": "^2.1.26",
53
- "@ttoss/i18n-cli": "^0.7.31"
53
+ "@ttoss/ui": "^5.9.2"
54
54
  },
55
55
  "keywords": [
56
56
  "React",