doct-ui-auth-kit 1.0.7 → 1.0.9
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/doct-ui-auth-kit.css +1 -1
- package/dist/index.js +28 -27
- package/dist/pages.js +1 -1
- package/dist/signup-page-DBRzdhNj.js +1546 -0
- package/package.json +3 -2
- package/dist/adapters/http-auth-adapter.d.ts +0 -8
- package/dist/adapters/index.d.ts +0 -1
- package/dist/auth/index.d.ts +0 -23
- package/dist/auth-methods/apple.d.ts +0 -19
- package/dist/auth-methods/google.d.ts +0 -5
- package/dist/auth-methods/index.d.ts +0 -2
- package/dist/auth-methods/use-google-auth.d.ts +0 -69
- package/dist/components/form/rhf-doct-phone-input.d.ts +0 -2
- package/dist/components/form/rhf-input-field.d.ts +0 -2
- package/dist/components/form/rhf-otp-input-field.d.ts +0 -2
- package/dist/components/layout/auth-layout-preset.d.ts +0 -30
- package/dist/components/layout/auth-layout-public.d.ts +0 -13
- package/dist/components/layout/auth-layout-wrapper.d.ts +0 -42
- package/dist/components/layout/auth-layout.d.ts +0 -89
- package/dist/components/layout/image-slider.d.ts +0 -28
- package/dist/components/layout/index.d.ts +0 -8
- package/dist/components/layout/main-layout.d.ts +0 -30
- package/dist/constants/demo-slider.d.ts +0 -14
- package/dist/constants/index.d.ts +0 -2
- package/dist/constants/layout-presets.d.ts +0 -6
- package/dist/core/auth-api-adapter.d.ts +0 -6
- package/dist/core/auth-context.d.ts +0 -17
- package/dist/core/auth-flow.d.ts +0 -5
- package/dist/core/auth-provider.d.ts +0 -6
- package/dist/core/auth-types.d.ts +0 -5
- package/dist/core/device-detection.d.ts +0 -15
- package/dist/core/index.d.ts +0 -11
- package/dist/core/sso-session.d.ts +0 -29
- package/dist/core/use-auth-flow.d.ts +0 -5
- package/dist/hooks/index.d.ts +0 -5
- package/dist/hooks/use-login-entry-form.d.ts +0 -8
- package/dist/hooks/use-main-auth-page-handlers.d.ts +0 -8
- package/dist/hooks/use-otp-verification.d.ts +0 -12
- package/dist/hooks/use-repeat-login.d.ts +0 -7
- package/dist/hooks/use-signup-form.d.ts +0 -7
- package/dist/index.d.ts +0 -11
- package/dist/pages/index.d.ts +0 -5
- package/dist/pages/login-entry.d.ts +0 -42
- package/dist/pages/main-login.d.ts +0 -32
- package/dist/pages/otp-verification.d.ts +0 -45
- package/dist/pages/repeat-login.d.ts +0 -49
- package/dist/pages/signup.d.ts +0 -6
- package/dist/signup-DeeuWsoF.js +0 -1718
- package/dist/types/auth-api-adapter.d.ts +0 -39
- package/dist/types/auth-layout-types.d.ts +0 -94
- package/dist/types/auth-provider.d.ts +0 -40
- package/dist/types/auth-types.d.ts +0 -70
- package/dist/types/device-detection.d.ts +0 -10
- package/dist/types/flow.d.ts +0 -122
- package/dist/types/forms.d.ts +0 -68
- package/dist/types/index.d.ts +0 -20
- package/dist/types/layout-presets.d.ts +0 -24
- package/dist/types/layout.d.ts +0 -57
- package/dist/types/login-form.d.ts +0 -56
- package/dist/types/main-login.d.ts +0 -40
- package/dist/types/otp-verification.d.ts +0 -40
- package/dist/types/pages.d.ts +0 -133
- package/dist/types/repeat-login.d.ts +0 -29
- package/dist/types/signup-form.d.ts +0 -48
- package/dist/types/sso-session.d.ts +0 -33
- package/dist/utils/index.d.ts +0 -4
- package/dist/utils/set-form-errors-from-zod.d.ts +0 -11
- package/dist/validations/index.d.ts +0 -6
- package/dist/validations/schemas.d.ts +0 -73
package/dist/index.d.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
export { createHttpAuthAdapter } from './adapters';
|
|
2
|
-
export { Auth } from './auth';
|
|
3
|
-
export type { UseAppleSignInOptions, UseGoogleAuthOptions, UseGoogleAuthReturn, } from './auth-methods';
|
|
4
|
-
export { useAppleSignIn, useGoogleAuth } from './auth-methods';
|
|
5
|
-
export type { AuthLayoutPresetProps, AuthLayoutType, AuthLayoutWrapperProps, } from './components/layout';
|
|
6
|
-
export { AuthLayout, AuthLayoutPreset, AuthLayoutWrapper, ImageSlider, MainLayout, } from './components/layout';
|
|
7
|
-
export * from './core';
|
|
8
|
-
export * from './hooks';
|
|
9
|
-
export type { LoginEntryPageProps, LoginEntryProps, MainLoginPageProps, MainLoginPageProvidersConfig, OtpVerificationPageProps, OtpVerificationProps, RepeatLoginPageProps, RepeatLoginProps, SignupPageFullProps, SignupPageProps, } from './pages';
|
|
10
|
-
export { LoginEntry, LoginEntryPage, MainLogin, MainLoginPage, OtpVerification, OtpVerificationPage, RepeatLogin, RepeatLoginPage, Signup, SignupPage, } from './pages';
|
|
11
|
-
export * from './types';
|
package/dist/pages/index.d.ts
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
export { LoginEntry, type LoginEntryMode, LoginEntryPage, type LoginEntryPageProps, type LoginEntryProps, } from './login-entry';
|
|
2
|
-
export { MainLogin, type MainLoginAppleProviderConfig, type MainLoginGoogleProviderConfig, MainLoginPage, type MainLoginPageProps, type MainLoginPageProvidersConfig, } from './main-login';
|
|
3
|
-
export { OtpVerification, type OtpVerificationMode, OtpVerificationPage, type OtpVerificationPageProps, type OtpVerificationProps, } from './otp-verification';
|
|
4
|
-
export { RepeatLogin, RepeatLoginPage, type RepeatLoginPageProps, type RepeatLoginProps, } from './repeat-login';
|
|
5
|
-
export { Signup, SignupPage, type SignupPageFullProps, type SignupPageProps, } from './signup';
|
|
@@ -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;
|
package/dist/pages/signup.d.ts
DELETED
|
@@ -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;
|