doct-ui-auth-kit 1.0.7 → 1.0.8

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.
Files changed (65) hide show
  1. package/dist/components/common/default-footer.d.ts +5 -0
  2. package/dist/components/common/enterprise-header.d.ts +5 -0
  3. package/dist/components/common/index.d.ts +2 -0
  4. package/dist/components/form/rhf-doct-phone-input.d.ts +2 -1
  5. package/dist/components/form/rhf-input-field.d.ts +2 -1
  6. package/dist/components/form/rhf-otp-input-field.d.ts +2 -1
  7. package/dist/components/layout/auth-layout-preset.d.ts +1 -1
  8. package/dist/components/layout/auth-layout-wrapper.d.ts +19 -2
  9. package/dist/components/layout/auth-layout.d.ts +1 -1
  10. package/dist/components/layout/index.d.ts +1 -1
  11. package/dist/constants/layout-presets.d.ts +1 -1
  12. package/dist/core/auth-flow.d.ts +2 -2
  13. package/dist/core/auth-provider.d.ts +3 -1
  14. package/dist/doct-ui-auth-kit.css +1 -1
  15. package/dist/hooks/use-login-entry-form.d.ts +6 -2
  16. package/dist/hooks/use-main-auth-page-handlers.d.ts +4 -3
  17. package/dist/hooks/use-otp-verification.d.ts +4 -1
  18. package/dist/hooks/use-repeat-login.d.ts +4 -2
  19. package/dist/hooks/use-signup-form.d.ts +6 -1
  20. package/dist/index.js +28 -27
  21. package/dist/pages/index.d.ts +4 -1
  22. package/dist/pages/login-entry/index.d.ts +3 -0
  23. package/dist/pages/login-entry/login-entry-page.d.ts +21 -0
  24. package/dist/pages/login-entry/login-entry.d.ts +21 -0
  25. package/dist/pages/main-login/index.d.ts +3 -0
  26. package/dist/pages/main-login/main-login-page.d.ts +16 -0
  27. package/dist/pages/main-login/main-login.d.ts +25 -0
  28. package/dist/pages/otp-verification/index.d.ts +3 -0
  29. package/dist/pages/otp-verification/otp-verification-page.d.ts +23 -0
  30. package/dist/pages/otp-verification/otp-verification.d.ts +22 -0
  31. package/dist/pages/repeat-login/index.d.ts +3 -0
  32. package/dist/pages/repeat-login/repeat-login-page.d.ts +24 -0
  33. package/dist/pages/repeat-login/repeat-login.d.ts +25 -0
  34. package/dist/pages/signup/index.d.ts +3 -0
  35. package/dist/pages/signup/signup-page.d.ts +6 -0
  36. package/dist/pages/signup/signup.d.ts +7 -0
  37. package/dist/pages.js +1 -1
  38. package/dist/signup-page-DBRzdhNj.js +1546 -0
  39. package/dist/types/auth/index.d.ts +9 -0
  40. package/dist/types/components/index.d.ts +7 -0
  41. package/dist/types/index.d.ts +4 -17
  42. package/dist/types/pages/index.d.ts +9 -0
  43. package/dist/types/{login-form.d.ts → pages/login-form.d.ts} +4 -4
  44. package/dist/types/{otp-verification.d.ts → pages/otp-verification.d.ts} +4 -4
  45. package/dist/types/{pages.d.ts → pages/pages.d.ts} +29 -29
  46. package/dist/types/{repeat-login.d.ts → pages/repeat-login.d.ts} +6 -6
  47. package/dist/types/{signup-form.d.ts → pages/signup-form.d.ts} +5 -5
  48. package/package.json +1 -1
  49. package/dist/pages/login-entry.d.ts +0 -42
  50. package/dist/pages/main-login.d.ts +0 -32
  51. package/dist/pages/otp-verification.d.ts +0 -45
  52. package/dist/pages/repeat-login.d.ts +0 -49
  53. package/dist/pages/signup.d.ts +0 -6
  54. package/dist/signup-DeeuWsoF.js +0 -1718
  55. /package/dist/types/{auth-api-adapter.d.ts → auth/auth-api-adapter.d.ts} +0 -0
  56. /package/dist/types/{auth-provider.d.ts → auth/auth-provider.d.ts} +0 -0
  57. /package/dist/types/{auth-types.d.ts → auth/auth-types.d.ts} +0 -0
  58. /package/dist/types/{device-detection.d.ts → auth/device-detection.d.ts} +0 -0
  59. /package/dist/types/{flow.d.ts → auth/flow.d.ts} +0 -0
  60. /package/dist/types/{sso-session.d.ts → auth/sso-session.d.ts} +0 -0
  61. /package/dist/types/{auth-layout-types.d.ts → components/auth-layout-types.d.ts} +0 -0
  62. /package/dist/types/{forms.d.ts → components/forms.d.ts} +0 -0
  63. /package/dist/types/{layout-presets.d.ts → components/layout-presets.d.ts} +0 -0
  64. /package/dist/types/{layout.d.ts → components/layout.d.ts} +0 -0
  65. /package/dist/types/{main-login.d.ts → pages/main-login.d.ts} +0 -0
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Auth domain types: session, adapter, provider, flow state, errors, device detection.
3
+ */
4
+ export * from './auth-types';
5
+ export * from './auth-api-adapter';
6
+ export * from './auth-provider';
7
+ export * from './sso-session';
8
+ export * from './device-detection';
9
+ export * from './flow';
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Component prop types: form fields, layouts, auth-layout compound, presets.
3
+ */
4
+ export * from './forms';
5
+ export * from './layout';
6
+ export * from './auth-layout-types';
7
+ export * from './layout-presets';
@@ -1,20 +1,7 @@
1
1
  /**
2
- * Central export file for all types and interfaces.
3
- * Import types from here: import type { RHFInputFieldProps } from '@/types';
2
+ * Central export for all types and interfaces.
3
+ * Organized by domain: auth (SSO), components (props), pages (page-specific).
4
4
  */
5
- export * from './auth-api-adapter';
6
- export * from './auth-layout-types';
7
- export * from './auth-provider';
8
- export * from './auth-types';
9
- export * from './device-detection';
10
- export * from './flow';
11
- export * from './forms';
12
- export * from './layout';
13
- export * from './layout-presets';
14
- export * from './login-form';
15
- export * from './main-login';
16
- export * from './otp-verification';
5
+ export * from './auth';
6
+ export * from './components';
17
7
  export * from './pages';
18
- export * from './repeat-login';
19
- export * from './signup-form';
20
- export * from './sso-session';
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Page-specific types: props, form values, hook options/return types.
3
+ */
4
+ export * from './pages';
5
+ export * from './login-form';
6
+ export * from './signup-form';
7
+ export * from './otp-verification';
8
+ export * from './main-login';
9
+ export * from './repeat-login';
@@ -1,6 +1,6 @@
1
1
  import { UseFormReturn } from 'react-hook-form';
2
2
  import { z } from 'zod';
3
- import { loginEmailFormSchema, loginPhoneFormSchema } from '../validations';
3
+ import { loginEmailFormSchema, loginPhoneFormSchema } from '../../validations';
4
4
  /** Login mode: phone number or email */
5
5
  export type LoginEntryMode = 'phone' | 'email';
6
6
  /** Form values for phone-based login, inferred from the Zod schema. */
@@ -35,11 +35,11 @@ export interface UseLoginEntryFormOptions {
35
35
  * When provided, hook runs business logic: validate → call submitApi(data) → onSuccess(params).
36
36
  * Use from consumer (e.g. Next.js): submitApi = sendOtp, onSuccess = (params) => router.push(`/otp?mode=${params.mode}&recipient=${encodeURIComponent(params.recipient)}`).
37
37
  */
38
- submitApi?: (data: LoginEntrySubmitData) => Promise<void>;
38
+ submitApi?: ((data: LoginEntrySubmitData) => Promise<void>) | undefined;
39
39
  /** Called after submitApi resolves successfully; receives mode and recipient for OTP redirect/display. */
40
- onSuccess?: (params: LoginEntrySuccessParams) => void;
40
+ onSuccess?: ((params: LoginEntrySuccessParams) => void) | undefined;
41
41
  /** Called when submitApi rejects or throws. */
42
- onError?: (error: unknown) => void;
42
+ onError?: ((error: unknown) => void) | undefined;
43
43
  }
44
44
  /** Return value of the `useLoginEntryForm` hook, providing form state and mode info. */
45
45
  export interface UseLoginEntryFormReturn {
@@ -1,6 +1,6 @@
1
1
  import { UseFormReturn } from 'react-hook-form';
2
2
  import { z } from 'zod';
3
- import { OtpVerificationMode, otpFormSchema } from '../validations';
3
+ import { OtpVerificationMode, otpFormSchema } from '../../validations';
4
4
  export type { OtpVerificationMode };
5
5
  /** Form values for the OTP verification form, inferred from the Zod schema. */
6
6
  export type OtpFormValues = z.infer<typeof otpFormSchema>;
@@ -13,11 +13,11 @@ export interface UseOtpVerificationOptions {
13
13
  /** Called when the user requests a new OTP code (resend). Ignored when submitApi is provided. */
14
14
  onResendCode?: (() => void) | undefined;
15
15
  /** When provided, hook runs: validate → submitApi(otp) → onSuccess(). Consumer passes redirect in onSuccess. */
16
- submitApi?: (otp: string) => Promise<void>;
16
+ submitApi?: ((otp: string) => Promise<void>) | undefined;
17
17
  /** Called after submitApi resolves (e.g. router.push('/dashboard')). */
18
- onSuccess?: () => void;
18
+ onSuccess?: (() => void) | undefined;
19
19
  /** Called when submitApi rejects or throws. */
20
- onError?: (error: unknown) => void;
20
+ onError?: ((error: unknown) => void) | undefined;
21
21
  }
22
22
  /** Return value of the `useOtpVerification` hook, providing form state and resend controls. */
23
23
  export interface UseOtpVerificationReturn {
@@ -1,5 +1,5 @@
1
- import { UserType } from './auth-types';
2
- import { IdentifierType } from './flow';
1
+ import { UserType } from '../auth/auth-types';
2
+ import { IdentifierType } from '../auth/flow';
3
3
  import { LoginEntryMode } from './login-form';
4
4
  import { UseMainAuthPageHandlersOptions } from './main-login';
5
5
  import { OtpVerificationMode } from './otp-verification';
@@ -19,25 +19,25 @@ export interface LoginEntryProps {
19
19
  * Sync callback with valid data. Use when parent owns API (e.g. AuthFlow).
20
20
  * Ignored when submitApi is provided.
21
21
  */
22
- onSubmit?: (data: {
22
+ onSubmit?: ((data: {
23
23
  phone?: string;
24
24
  email?: string;
25
- }) => void;
25
+ }) => void) | undefined;
26
26
  /**
27
27
  * Async API call (e.g. send OTP). When provided, hook runs: validate → submitApi(data) → onSuccess().
28
28
  * Consumer (e.g. Next.js) can pass redirect in onSuccess.
29
29
  */
30
- submitApi?: (data: {
30
+ submitApi?: ((data: {
31
31
  phone?: string;
32
32
  email?: string;
33
- }) => Promise<void>;
33
+ }) => Promise<void>) | undefined;
34
34
  /** Called after submitApi succeeds; receives { mode, recipient } for OTP redirect/recipientDisplay. */
35
- onSuccess?: (params: {
35
+ onSuccess?: ((params: {
36
36
  mode: LoginEntryMode;
37
37
  recipient: string;
38
- }) => void;
38
+ }) => void) | undefined;
39
39
  /** Called when submitApi fails. */
40
- onError?: (error: unknown) => void;
40
+ onError?: ((error: unknown) => void) | undefined;
41
41
  }
42
42
  /** Props for the full LoginEntryPage (adds optional layout overrides for story/viewport). */
43
43
  export interface LoginEntryPageProps extends LoginEntryProps {
@@ -55,23 +55,23 @@ export interface SignupPageProps {
55
55
  /** Indian only: which field to collect (phone or email). */
56
56
  signupCollectField: IdentifierType;
57
57
  /** Foreign only: phone when user entered phone before signup details. */
58
- pendingPhone?: string;
58
+ pendingPhone?: string | undefined;
59
59
  /** Sync callback with valid data. Use when parent owns API (e.g. AuthFlow). Ignored when submitApi is provided. */
60
- onSubmit?: (data: {
60
+ onSubmit?: ((data: {
61
61
  fullName: string;
62
62
  phone?: string;
63
63
  email?: string;
64
- }) => void;
64
+ }) => void) | undefined;
65
65
  /** Async API (e.g. complete profile). When provided, hook runs: validate → submitApi(data) → onSuccess(). */
66
- submitApi?: (data: {
66
+ submitApi?: ((data: {
67
67
  fullName: string;
68
68
  phone?: string;
69
69
  email?: string;
70
- }) => Promise<void>;
70
+ }) => Promise<void>) | undefined;
71
71
  /** Called after submitApi succeeds (e.g. router.push('/otp') or next step). */
72
- onSuccess?: () => void;
72
+ onSuccess?: (() => void) | undefined;
73
73
  /** Called when submitApi fails. */
74
- onError?: (error: unknown) => void;
74
+ onError?: ((error: unknown) => void) | undefined;
75
75
  }
76
76
  /** Props for the full SignupPage (adds optional layout overrides). */
77
77
  export interface SignupPageFullProps extends SignupPageProps {
@@ -83,23 +83,23 @@ export interface OtpVerificationProps {
83
83
  /** Mode: mobile (phone) or email OTP */
84
84
  mode: OtpVerificationMode;
85
85
  /** Title override. Default: "6 digit OTP has been sent to your Mobile" | "..." Email */
86
- title?: string;
86
+ title?: string | undefined;
87
87
  /** Masked phone (e.g. "+91 9825910X0X") or email (e.g. "j***@gmail.com") */
88
88
  recipientDisplay: string;
89
89
  /** When true, show instruction line ("Kindly check your Email Inbox."). Used for foreign user flow. */
90
- isForeignUser?: boolean;
90
+ isForeignUser?: boolean | undefined;
91
91
  /** Handler when back is clicked */
92
- onBack?: () => void;
92
+ onBack?: (() => void) | undefined;
93
93
  /** Sync callback with OTP. Use when parent owns API (e.g. AuthFlow). Ignored when submitApi is provided. */
94
- onSubmit?: (otp: string) => void;
94
+ onSubmit?: ((otp: string) => void) | undefined;
95
95
  /** Handler when user requests resend code */
96
- onResendCode?: () => void;
96
+ onResendCode?: (() => void) | undefined;
97
97
  /** Async API (e.g. verify OTP). When provided, hook runs: validate → submitApi(otp) → onSuccess(). */
98
- submitApi?: (otp: string) => Promise<void>;
98
+ submitApi?: ((otp: string) => Promise<void>) | undefined;
99
99
  /** Called after submitApi succeeds (e.g. router.push('/dashboard')). */
100
- onSuccess?: () => void;
100
+ onSuccess?: (() => void) | undefined;
101
101
  /** Called when submitApi fails. */
102
- onError?: (error: unknown) => void;
102
+ onError?: ((error: unknown) => void) | undefined;
103
103
  }
104
104
  /** Props for the full OtpVerificationPage (adds optional layout overrides). */
105
105
  export interface OtpVerificationPageProps extends OtpVerificationProps {
@@ -116,15 +116,15 @@ export interface RepeatLoginProps {
116
116
  */
117
117
  lastUsedMethod?: string;
118
118
  /** Sync handler for primary action. Use when caller owns API (e.g. AuthFlow). Ignored when continueApi is provided. */
119
- onContinueWithLastMethod?: () => void;
119
+ onContinueWithLastMethod?: (() => void) | undefined;
120
120
  /** Handler for the secondary action (choose another method). */
121
- onUseAnotherMethod?: () => void;
121
+ onUseAnotherMethod?: (() => void) | undefined;
122
122
  /** Async API for continue (e.g. validate session). When provided, hook runs: continueApi() → onSuccess(). */
123
- continueApi?: () => Promise<void>;
123
+ continueApi?: (() => Promise<void>) | undefined;
124
124
  /** Called after continueApi succeeds (e.g. router.push('/dashboard')). */
125
- onSuccess?: () => void;
125
+ onSuccess?: (() => void) | undefined;
126
126
  /** Called when continueApi fails. */
127
- onError?: (error: unknown) => void;
127
+ onError?: ((error: unknown) => void) | undefined;
128
128
  }
129
129
  /** Props for the full RepeatLoginPage (adds optional layout overrides). */
130
130
  export interface RepeatLoginPageProps extends RepeatLoginProps {
@@ -6,17 +6,17 @@ export interface UseRepeatLoginOptions {
6
6
  * Last used authentication method shown in the primary button label.
7
7
  * @default "Mobile"
8
8
  */
9
- lastUsedMethod?: string;
9
+ lastUsedMethod?: string | undefined;
10
10
  /** Sync handler for primary action. Use when caller owns API (e.g. AuthFlow). Ignored when continueApi is provided. */
11
- onContinueWithLastMethod?: () => void;
11
+ onContinueWithLastMethod?: (() => void) | undefined;
12
12
  /** Handler for the secondary action (choose another method). */
13
- onUseAnotherMethod?: () => void;
13
+ onUseAnotherMethod?: (() => void) | undefined;
14
14
  /** Async API for continue (e.g. validate session). When provided, hook runs: continueApi() → onSuccess(). */
15
- continueApi?: () => Promise<void>;
15
+ continueApi?: (() => Promise<void>) | undefined;
16
16
  /** Called after continueApi succeeds (e.g. router.push('/dashboard')). */
17
- onSuccess?: () => void;
17
+ onSuccess?: (() => void) | undefined;
18
18
  /** Called when continueApi fails. */
19
- onError?: (error: unknown) => void;
19
+ onError?: ((error: unknown) => void) | undefined;
20
20
  }
21
21
  /** Return value of the `useRepeatLogin` hook, providing continue handler and display state. */
22
22
  export interface UseRepeatLoginReturn {
@@ -1,6 +1,6 @@
1
1
  import { UseFormReturn } from 'react-hook-form';
2
2
  import { z } from 'zod';
3
- import { signupEmailFormSchema, signupForeignFormSchema, signupPhoneFormSchema } from '../validations';
3
+ import { signupEmailFormSchema, signupForeignFormSchema, signupPhoneFormSchema } from '../../validations';
4
4
  /** Signup mode: phone, email as second field, or foreign (full name + email + phone). */
5
5
  export type SignupEntryMode = 'phone' | 'email' | 'foreign';
6
6
  /** Form values for phone-based signup, inferred from the Zod schema. */
@@ -21,15 +21,15 @@ export interface UseSignupFormOptions {
21
21
  /** Mode: phone, email as second field, or foreign (name + email + phone) */
22
22
  mode: SignupEntryMode;
23
23
  /** For foreign mode: pre-fill phone when user already entered it. */
24
- defaultPhone?: string;
24
+ defaultPhone?: string | undefined;
25
25
  /** Sync callback with valid data. Use when parent owns API (e.g. AuthFlow). Ignored when submitApi is provided. */
26
26
  onSubmit?: ((data: SignupSubmitData) => void) | undefined;
27
27
  /** When provided, hook runs: validate → submitApi(data) → onSuccess(). Consumer passes redirect in onSuccess. */
28
- submitApi?: (data: SignupSubmitData) => Promise<void>;
28
+ submitApi?: ((data: SignupSubmitData) => Promise<void>) | undefined;
29
29
  /** Called after submitApi succeeds (e.g. router.push('/otp') or next step). */
30
- onSuccess?: () => void;
30
+ onSuccess?: (() => void) | undefined;
31
31
  /** Called when submitApi rejects or throws. */
32
- onError?: (error: unknown) => void;
32
+ onError?: ((error: unknown) => void) | undefined;
33
33
  }
34
34
  /** Return value of the `useSignupForm` hook, providing form state and mode flags. */
35
35
  export interface UseSignupFormReturn {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "doct-ui-auth-kit",
3
- "version": "1.0.7",
3
+ "version": "1.0.8",
4
4
  "description": "Composable React auth SDK – layouts, login/signup/OTP pages, SSO provider, and auth flow hooks for Docthub",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1,42 +0,0 @@
1
- import { LoginEntryPageProps, LoginEntryProps } from '../types';
2
- export type { LoginEntryMode, LoginEntryPageProps, LoginEntryProps, } from '../types';
3
- /**
4
- * Full LoginEntry page with AuthLayoutWrapper, back button, and slider/standalone layout.
5
- * Use when rendering the login entry screen as a standalone page.
6
- *
7
- * @example Next.js: API call in hook, redirect with mode + recipient for OTP page
8
- * ```tsx
9
- * <LoginEntryPage
10
- * mode="phone"
11
- * onBack={() => router.back()}
12
- * submitApi={(data) => api.sendOtp(data)}
13
- * onSuccess={(params) => router.push(`/otp?mode=${params.mode}&recipient=${encodeURIComponent(params.recipient)}`)}
14
- * />
15
- * ```
16
- *
17
- * @example Sync callback (caller owns API)
18
- * ```tsx
19
- * <LoginEntryPage mode="phone" onSubmit={(data) => sendOtp(data)} />
20
- * ```
21
- */
22
- export declare function LoginEntryPage(props: Readonly<LoginEntryPageProps>): import("react/jsx-runtime").JSX.Element;
23
- /**
24
- * Login entry form body without layout wrapper.
25
- * Single form for phone or email based on mode. Use inside your own layout or AuthFlow.
26
- * Validation per PRODUCT_PROTOCOLS and edge cases 3–5, 18; cursor focus on first field (#26).
27
- *
28
- * @example With AuthFlow (sync onSubmit)
29
- * ```tsx
30
- * <LoginEntry mode="phone" onSubmit={(data) => actions.submitIdentifier(data)} />
31
- * ```
32
- *
33
- * @example Standalone Next.js (API + redirect in hook)
34
- * ```tsx
35
- * <LoginEntry
36
- * mode="phone"
37
- * submitApi={(data) => api.sendOtp(data)}
38
- * onSuccess={() => router.push('/otp')}
39
- * />
40
- * ```
41
- */
42
- export declare function LoginEntry(props: Readonly<LoginEntryProps>): import("react/jsx-runtime").JSX.Element;
@@ -1,32 +0,0 @@
1
- import { MainLoginPageProps } from '../types';
2
- export type { MainLoginAppleProviderConfig, MainLoginGoogleProviderConfig, MainLoginPageProps, MainLoginPageProvidersConfig, } from '../types';
3
- /**
4
- * Full MainLogin page with AuthLayoutWrapper, header, footer, and slider layout.
5
- * Includes default branding and layout configuration.
6
- *
7
- * @example
8
- * ```tsx
9
- * <MainLoginPage
10
- * onContinueWithMobile={() => navigate('/auth/phone')}
11
- * onContinueWithEmail={() => navigate('/auth/email')}
12
- * onContinueWithGoogle={() => navigate('/auth/google')}
13
- * onContinueWithApple={() => navigate('/auth/apple')}
14
- * />
15
- * ```
16
- */
17
- export declare const MainLoginPage: (props: Readonly<MainLoginPageProps>) => import("react/jsx-runtime").JSX.Element;
18
- /**
19
- * Login body component without layout wrapper.
20
- * Displays four authentication method buttons (Mobile, Email, Google, Apple).
21
- *
22
- * Use this when you need custom layout or when integrating with AuthFlow.
23
- *
24
- * @example
25
- * ```tsx
26
- * <MainLogin
27
- * onContinueWithMobile={() => navigate('/auth/phone')}
28
- * onContinueWithEmail={() => navigate('/auth/email')}
29
- * />
30
- * ```
31
- */
32
- export declare function MainLogin(props: Readonly<MainLoginPageProps>): import("react/jsx-runtime").JSX.Element;
@@ -1,45 +0,0 @@
1
- import { OtpVerificationPageProps, OtpVerificationProps } from '../types';
2
- export type { OtpVerificationMode, OtpVerificationPageProps, OtpVerificationProps, } from '../types';
3
- /**
4
- * Full OTP verification page with AuthLayoutWrapper and back button.
5
- * Use when rendering the OTP screen as a standalone page.
6
- *
7
- * @example Next.js: API in hook, redirect from consumer
8
- * ```tsx
9
- * <OtpVerificationPage
10
- * mode="phone"
11
- * recipientDisplay="+91 9825910X0X"
12
- * onBack={() => router.back()}
13
- * submitApi={(otp) => api.verifyOtp(otp)}
14
- * onSuccess={() => router.push('/dashboard')}
15
- * onResendCode={() => api.resendOtp()}
16
- * />
17
- * ```
18
- *
19
- * @example Sync callback (AuthFlow)
20
- * ```tsx
21
- * <OtpVerificationPage onSubmit={(otp) => actions.verifyOtp(otp)} ... />
22
- * ```
23
- */
24
- export declare function OtpVerificationPage(props: Readonly<OtpVerificationPageProps>): import("react/jsx-runtime").JSX.Element;
25
- /**
26
- * OTP verification form body without layout wrapper.
27
- * 6-digit OTP input, resend countdown, and submit. Use inside your own layout or AuthFlow.
28
- * Validation per edge cases 6, 7 (invalid/expired OTP); cursor focus on first OTP box (#26).
29
- *
30
- * @example With submitApi + onSuccess (consumer redirect)
31
- * ```tsx
32
- * <OtpVerification
33
- * mode="phone"
34
- * recipientDisplay="+91 9825910X0X"
35
- * submitApi={(otp) => api.verifyOtp(otp)}
36
- * onSuccess={() => router.push('/dashboard')}
37
- * />
38
- * ```
39
- *
40
- * @example Sync onSubmit (AuthFlow)
41
- * ```tsx
42
- * <OtpVerification onSubmit={(otp) => actions.verifyOtp(otp)} ... />
43
- * ```
44
- */
45
- export declare function OtpVerification(props: Readonly<OtpVerificationProps>): import("react/jsx-runtime").JSX.Element;
@@ -1,49 +0,0 @@
1
- import { RepeatLoginPageProps, RepeatLoginProps } from '../types';
2
- export type { RepeatLoginPageProps, RepeatLoginProps } from '../types';
3
- /**
4
- * Full Repeat Login page with AuthLayoutWrapper, logo, title, description, and footer.
5
- * Use when rendering the repeat login screen as a standalone page.
6
- *
7
- * @example Next.js: API in lib, redirect from consumer
8
- * ```tsx
9
- * <RepeatLoginPage
10
- * lastUsedMethod="Mobile"
11
- * continueApi={() => api.validateSession()}
12
- * onSuccess={() => router.push('/dashboard')}
13
- * onUseAnotherMethod={() => resetFlow()}
14
- * />
15
- * ```
16
- *
17
- * @example Sync (AuthFlow)
18
- * ```tsx
19
- * <RepeatLoginPage
20
- * onContinueWithLastMethod={() => actions.continueWithLastMethod()}
21
- * onUseAnotherMethod={() => actions.reset()}
22
- * />
23
- * ```
24
- */
25
- export declare function RepeatLoginPage(props: Readonly<RepeatLoginPageProps>): import("react/jsx-runtime").JSX.Element;
26
- /**
27
- * Repeat login body without layout wrapper.
28
- * Primary CTA (continue with last method) and secondary "Use another method" button.
29
- * When continueApi is provided, primary runs: continueApi() → onSuccess() (e.g. redirect).
30
- *
31
- * @example With continueApi + onSuccess (consumer redirect)
32
- * ```tsx
33
- * <RepeatLogin
34
- * lastUsedMethod="Mobile"
35
- * continueApi={() => api.validateSession()}
36
- * onSuccess={() => router.push('/dashboard')}
37
- * onUseAnotherMethod={() => resetFlow()}
38
- * />
39
- * ```
40
- *
41
- * @example Sync (AuthFlow)
42
- * ```tsx
43
- * <RepeatLogin
44
- * onContinueWithLastMethod={() => actions.continueWithLastMethod()}
45
- * onUseAnotherMethod={() => actions.reset()}
46
- * />
47
- * ```
48
- */
49
- export declare function RepeatLogin(props: Readonly<RepeatLoginProps>): import("react/jsx-runtime").JSX.Element;
@@ -1,6 +0,0 @@
1
- import { SignupPageFullProps, SignupPageProps } from '../types';
2
- export type { SignupEntryMode, SignupPageFullProps, SignupPageProps, } from '../types';
3
- /** Full signup page with layout wrapper, logo, title, and description. Renders the {@link Signup} form body inside an `AuthLayoutWrapper`. */
4
- export declare function SignupPage(props: Readonly<SignupPageFullProps>): import("react/jsx-runtime").JSX.Element;
5
- /** Standalone signup form component (without layout). Use inside a custom layout or when layout is handled externally. */
6
- export declare function Signup(props: Readonly<SignupPageProps>): import("react/jsx-runtime").JSX.Element;