@insforge/react 0.3.4 → 0.4.0
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/README.md +485 -604
- package/dist/atoms.cjs +818 -0
- package/dist/atoms.cjs.map +1 -0
- package/dist/atoms.d.cts +222 -0
- package/dist/atoms.d.ts +72 -237
- package/dist/atoms.js +382 -456
- package/dist/atoms.js.map +1 -1
- package/dist/components.cjs +2254 -0
- package/dist/components.cjs.map +1 -0
- package/dist/{components.d.mts → components.d.cts} +10 -32
- package/dist/components.d.ts +9 -31
- package/dist/components.js +1049 -1183
- package/dist/components.js.map +1 -1
- package/dist/forms.cjs +1287 -0
- package/dist/forms.cjs.map +1 -0
- package/dist/forms.d.cts +138 -0
- package/dist/forms.d.ts +115 -162
- package/dist/forms.js +728 -921
- package/dist/forms.js.map +1 -1
- package/dist/{hooks.mjs → hooks.cjs} +15 -13
- package/dist/hooks.cjs.map +1 -0
- package/dist/{hooks.d.mts → hooks.d.cts} +1 -1
- package/dist/hooks.js +9 -15
- package/dist/hooks.js.map +1 -1
- package/dist/index.cjs +2674 -0
- package/dist/index.cjs.map +1 -0
- package/dist/{index.d.mts → index.d.cts} +10 -10
- package/dist/index.d.ts +4 -4
- package/dist/index.js +1096 -1238
- package/dist/index.js.map +1 -1
- package/dist/{lib.mjs → lib.cjs} +13 -11
- package/dist/lib.cjs.map +1 -0
- package/dist/{lib.d.mts → lib.d.cts} +1 -8
- package/dist/lib.d.ts +1 -8
- package/dist/lib.js +4 -17
- package/dist/lib.js.map +1 -1
- package/dist/{router.mjs → router.cjs} +14 -16
- package/dist/router.cjs.map +1 -0
- package/dist/router.js +10 -16
- package/dist/router.js.map +1 -1
- package/dist/styles.css +655 -2
- package/dist/types.cjs +4 -0
- package/dist/{types.mjs.map → types.cjs.map} +1 -1
- package/dist/{types.d.mts → types.d.cts} +2 -2
- package/dist/types.d.ts +2 -2
- package/dist/types.js +0 -1
- package/package.json +106 -98
- package/dist/atoms.d.mts +0 -387
- package/dist/atoms.mjs +0 -861
- package/dist/atoms.mjs.map +0 -1
- package/dist/components.mjs +0 -2327
- package/dist/components.mjs.map +0 -1
- package/dist/forms.d.mts +0 -185
- package/dist/forms.mjs +0 -1468
- package/dist/forms.mjs.map +0 -1
- package/dist/hooks.mjs.map +0 -1
- package/dist/index.mjs +0 -2724
- package/dist/index.mjs.map +0 -1
- package/dist/lib.mjs.map +0 -1
- package/dist/router.mjs.map +0 -1
- package/dist/types.mjs +0 -3
- package/src/styles.css +0 -15
- /package/dist/{router.d.mts → router.d.cts} +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ReactNode,
|
|
2
|
-
import {
|
|
1
|
+
import { ReactNode, InputHTMLAttributes, CSSProperties, FormEvent } from 'react';
|
|
2
|
+
import { GetPublicAuthConfigResponse, OAuthProvidersSchema } from '@insforge/shared-schemas';
|
|
3
3
|
|
|
4
4
|
type OAuthProvider = OAuthProvidersSchema;
|
|
5
5
|
type AuthConfig = GetPublicAuthConfigResponse;
|
package/dist/types.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ReactNode,
|
|
2
|
-
import {
|
|
1
|
+
import { ReactNode, InputHTMLAttributes, CSSProperties, FormEvent } from 'react';
|
|
2
|
+
import { GetPublicAuthConfigResponse, OAuthProvidersSchema } from '@insforge/shared-schemas';
|
|
3
3
|
|
|
4
4
|
type OAuthProvider = OAuthProvidersSchema;
|
|
5
5
|
type AuthConfig = GetPublicAuthConfigResponse;
|
package/dist/types.js
CHANGED
package/package.json
CHANGED
|
@@ -1,98 +1,106 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@insforge/react",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
"
|
|
7
|
-
"
|
|
8
|
-
"
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
"
|
|
12
|
-
"
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
"
|
|
17
|
-
"
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
"
|
|
22
|
-
"
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
"
|
|
27
|
-
"
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
"
|
|
32
|
-
"
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
"
|
|
37
|
-
"
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
"
|
|
42
|
-
"
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
"
|
|
47
|
-
"
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
"
|
|
54
|
-
"README.md"
|
|
55
|
-
],
|
|
56
|
-
"scripts": {
|
|
57
|
-
"build": "tsup",
|
|
58
|
-
"dev": "
|
|
59
|
-
"type-check": "tsc --noEmit",
|
|
60
|
-
"
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
"
|
|
64
|
-
"
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
"
|
|
68
|
-
"
|
|
69
|
-
"
|
|
70
|
-
"
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
"
|
|
81
|
-
"
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
"
|
|
85
|
-
"
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
"@
|
|
91
|
-
"@types/
|
|
92
|
-
"
|
|
93
|
-
"
|
|
94
|
-
"
|
|
95
|
-
"
|
|
96
|
-
"
|
|
97
|
-
|
|
98
|
-
|
|
1
|
+
{
|
|
2
|
+
"name": "@insforge/react",
|
|
3
|
+
"version": "0.4.0",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"description": "Framework-agnostic React authentication UI components for Insforge - reusable across all frameworks",
|
|
6
|
+
"main": "./dist/index.cjs",
|
|
7
|
+
"module": "./dist/index.js",
|
|
8
|
+
"types": "./dist/index.d.ts",
|
|
9
|
+
"exports": {
|
|
10
|
+
".": {
|
|
11
|
+
"types": "./dist/index.d.ts",
|
|
12
|
+
"import": "./dist/index.js",
|
|
13
|
+
"require": "./dist/index.cjs"
|
|
14
|
+
},
|
|
15
|
+
"./atoms": {
|
|
16
|
+
"types": "./dist/atoms.d.ts",
|
|
17
|
+
"import": "./dist/atoms.js",
|
|
18
|
+
"require": "./dist/atoms.cjs"
|
|
19
|
+
},
|
|
20
|
+
"./forms": {
|
|
21
|
+
"types": "./dist/forms.d.ts",
|
|
22
|
+
"import": "./dist/forms.js",
|
|
23
|
+
"require": "./dist/forms.cjs"
|
|
24
|
+
},
|
|
25
|
+
"./components": {
|
|
26
|
+
"types": "./dist/components.d.ts",
|
|
27
|
+
"import": "./dist/components.js",
|
|
28
|
+
"require": "./dist/components.cjs"
|
|
29
|
+
},
|
|
30
|
+
"./hooks": {
|
|
31
|
+
"types": "./dist/hooks.d.ts",
|
|
32
|
+
"import": "./dist/hooks.js",
|
|
33
|
+
"require": "./dist/hooks.cjs"
|
|
34
|
+
},
|
|
35
|
+
"./lib": {
|
|
36
|
+
"types": "./dist/lib.d.ts",
|
|
37
|
+
"import": "./dist/lib.js",
|
|
38
|
+
"require": "./dist/lib.cjs"
|
|
39
|
+
},
|
|
40
|
+
"./types": {
|
|
41
|
+
"types": "./dist/types.d.ts",
|
|
42
|
+
"import": "./dist/types.js",
|
|
43
|
+
"require": "./dist/types.cjs"
|
|
44
|
+
},
|
|
45
|
+
"./router": {
|
|
46
|
+
"types": "./dist/router.d.ts",
|
|
47
|
+
"import": "./dist/router.js",
|
|
48
|
+
"require": "./dist/router.cjs"
|
|
49
|
+
},
|
|
50
|
+
"./styles.css": "./dist/styles.css"
|
|
51
|
+
},
|
|
52
|
+
"files": [
|
|
53
|
+
"dist",
|
|
54
|
+
"README.md"
|
|
55
|
+
],
|
|
56
|
+
"scripts": {
|
|
57
|
+
"build": "tsup",
|
|
58
|
+
"dev": "tsup --watch",
|
|
59
|
+
"type-check": "tsc --noEmit",
|
|
60
|
+
"lint": "eslint src --ext .ts,.tsx --max-warnings 0",
|
|
61
|
+
"lint:fix": "eslint src --ext .ts,.tsx --fix",
|
|
62
|
+
"format": "prettier --write \"src/**/*.{ts,tsx,css}\"",
|
|
63
|
+
"format:check": "prettier --check \"src/**/*.{ts,tsx,css}\"",
|
|
64
|
+
"clean": "rimraf dist"
|
|
65
|
+
},
|
|
66
|
+
"keywords": [
|
|
67
|
+
"insforge",
|
|
68
|
+
"react",
|
|
69
|
+
"authentication",
|
|
70
|
+
"auth",
|
|
71
|
+
"ui",
|
|
72
|
+
"components",
|
|
73
|
+
"headless",
|
|
74
|
+
"framework-agnostic"
|
|
75
|
+
],
|
|
76
|
+
"author": "Insforge",
|
|
77
|
+
"license": "MIT",
|
|
78
|
+
"peerDependencies": {
|
|
79
|
+
"react": "^19.0.0",
|
|
80
|
+
"react-dom": "^19.0.0",
|
|
81
|
+
"react-router-dom": "^7.9.5"
|
|
82
|
+
},
|
|
83
|
+
"dependencies": {
|
|
84
|
+
"@insforge/sdk": "^0.0.58-dev.14",
|
|
85
|
+
"@insforge/shared-schemas": "^1.1.18",
|
|
86
|
+
"lucide-react": "^0.552.0",
|
|
87
|
+
"zod": "^4.1.12"
|
|
88
|
+
},
|
|
89
|
+
"devDependencies": {
|
|
90
|
+
"@eslint/js": "^9.21.0",
|
|
91
|
+
"@types/node": "^24.9.2",
|
|
92
|
+
"@types/react": "^19.2.2",
|
|
93
|
+
"@types/react-dom": "^19.2.2",
|
|
94
|
+
"eslint": "^9.21.0",
|
|
95
|
+
"eslint-config-prettier": "^10.0.2",
|
|
96
|
+
"eslint-plugin-prettier": "^5.2.1",
|
|
97
|
+
"eslint-plugin-react": "^7.37.5",
|
|
98
|
+
"eslint-plugin-react-hooks": "^5.1.2",
|
|
99
|
+
"globals": "^15.12.0",
|
|
100
|
+
"prettier": "^3.4.2",
|
|
101
|
+
"rimraf": "^6.1.0",
|
|
102
|
+
"tsup": "^8.5.0",
|
|
103
|
+
"typescript": "^5.9.3",
|
|
104
|
+
"typescript-eslint": "^8.23.0"
|
|
105
|
+
}
|
|
106
|
+
}
|
package/dist/atoms.d.mts
DELETED
|
@@ -1,387 +0,0 @@
|
|
|
1
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import { AuthContainerProps, AuthHeaderProps, AuthErrorBannerProps, AuthFormFieldProps, AuthPasswordFieldProps, AuthPasswordStrengthIndicatorProps, AuthConfig, AuthSubmitButtonProps, AuthLinkProps, AuthDividerProps, AuthOAuthButtonProps, AuthOAuthProvidersProps, AuthVerificationCodeInputProps } from './types.mjs';
|
|
3
|
-
import 'react';
|
|
4
|
-
import '@insforge/shared-schemas';
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* Insforge branding component for authentication pages.
|
|
8
|
-
*
|
|
9
|
-
* @component
|
|
10
|
-
* @example
|
|
11
|
-
* ```tsx
|
|
12
|
-
* <AuthBranding />
|
|
13
|
-
* ```
|
|
14
|
-
*/
|
|
15
|
-
declare function AuthBranding(): react_jsx_runtime.JSX.Element;
|
|
16
|
-
|
|
17
|
-
/**
|
|
18
|
-
* Main container component for authentication forms.
|
|
19
|
-
*
|
|
20
|
-
* @component
|
|
21
|
-
* @example
|
|
22
|
-
* ```tsx
|
|
23
|
-
* <AuthContainer>
|
|
24
|
-
* <AuthHeader title="Sign In" />
|
|
25
|
-
* <form>...</form>
|
|
26
|
-
* </AuthContainer>
|
|
27
|
-
*
|
|
28
|
-
* // With custom styling
|
|
29
|
-
* <AuthContainer
|
|
30
|
-
* appearance={{
|
|
31
|
-
* cardClassName: "bg-gray-50"
|
|
32
|
-
* }}
|
|
33
|
-
* >
|
|
34
|
-
* <AuthHeader title="Sign In" />
|
|
35
|
-
* <form>...</form>
|
|
36
|
-
* </AuthContainer>
|
|
37
|
-
* ```
|
|
38
|
-
*
|
|
39
|
-
* @param {ReactNode} children - Form content
|
|
40
|
-
* @param {object} [appearance] - Tailwind CSS classes for styling
|
|
41
|
-
* - `appearance.containerClassName`: Outer container element
|
|
42
|
-
* - `appearance.cardClassName`: Inner card element (white background area)
|
|
43
|
-
*/
|
|
44
|
-
declare function AuthContainer({ children, appearance }: AuthContainerProps): react_jsx_runtime.JSX.Element;
|
|
45
|
-
|
|
46
|
-
/**
|
|
47
|
-
* Header component for authentication forms displaying title and optional subtitle.
|
|
48
|
-
*
|
|
49
|
-
* @component
|
|
50
|
-
* @example
|
|
51
|
-
* ```tsx
|
|
52
|
-
* // Basic usage
|
|
53
|
-
* <AuthHeader
|
|
54
|
-
* title="Welcome Back"
|
|
55
|
-
* subtitle="Sign in to continue"
|
|
56
|
-
* />
|
|
57
|
-
*
|
|
58
|
-
* // With custom styling
|
|
59
|
-
* <AuthHeader
|
|
60
|
-
* title="Welcome Back"
|
|
61
|
-
* appearance={{
|
|
62
|
-
* titleClassName: "text-purple-900 text-3xl",
|
|
63
|
-
* subtitleClassName: "text-purple-700"
|
|
64
|
-
* }}
|
|
65
|
-
* />
|
|
66
|
-
* ```
|
|
67
|
-
*
|
|
68
|
-
* @param {string} title - Main heading text
|
|
69
|
-
* @param {string} [subtitle] - Optional subheading text
|
|
70
|
-
* @param {object} [appearance] - Tailwind CSS classes for styling
|
|
71
|
-
* - `appearance.containerClassName`: Container element
|
|
72
|
-
* - `appearance.titleClassName`: Title element
|
|
73
|
-
* - `appearance.subtitleClassName`: Subtitle element
|
|
74
|
-
*/
|
|
75
|
-
declare function AuthHeader({ title, subtitle, appearance }: AuthHeaderProps): react_jsx_runtime.JSX.Element;
|
|
76
|
-
|
|
77
|
-
/**
|
|
78
|
-
* Error message banner for authentication forms.
|
|
79
|
-
*
|
|
80
|
-
* @component
|
|
81
|
-
* @example
|
|
82
|
-
* ```tsx
|
|
83
|
-
* <AuthErrorBanner error={error} />
|
|
84
|
-
* ```
|
|
85
|
-
*
|
|
86
|
-
* @param {string} error - Error message to display
|
|
87
|
-
* @param {string} [className] - Banner element classes
|
|
88
|
-
*/
|
|
89
|
-
declare function AuthErrorBanner({ error, className }: AuthErrorBannerProps): react_jsx_runtime.JSX.Element | null;
|
|
90
|
-
|
|
91
|
-
/**
|
|
92
|
-
* Standard form input field with label for authentication forms.
|
|
93
|
-
*
|
|
94
|
-
* @component
|
|
95
|
-
* @example
|
|
96
|
-
* ```tsx
|
|
97
|
-
* // Basic usage
|
|
98
|
-
* <AuthFormField
|
|
99
|
-
* id="email"
|
|
100
|
-
* type="email"
|
|
101
|
-
* label="Email Address"
|
|
102
|
-
* />
|
|
103
|
-
*
|
|
104
|
-
* // With custom styling
|
|
105
|
-
* <AuthFormField
|
|
106
|
-
* id="email"
|
|
107
|
-
* label="Email"
|
|
108
|
-
* appearance={{
|
|
109
|
-
* containerClassName: "flex flex-col justify-center items-stretch gap-1",
|
|
110
|
-
* inputClassName: "border-blue-500 focus:ring-blue-500",
|
|
111
|
-
* labelClassName: "text-blue-900 font-semibold"
|
|
112
|
-
* }}
|
|
113
|
-
* />
|
|
114
|
-
* ```
|
|
115
|
-
*
|
|
116
|
-
* @param {string} label - Label text
|
|
117
|
-
* @param {string} id - Input element ID
|
|
118
|
-
* @param {object} [appearance] - Tailwind CSS classes for styling
|
|
119
|
-
* - `appearance.containerClassName`: Container element
|
|
120
|
-
* - `appearance.labelClassName`: Label element
|
|
121
|
-
* - `appearance.inputClassName`: Input element
|
|
122
|
-
*/
|
|
123
|
-
declare function AuthFormField({ label, id, appearance, ...props }: AuthFormFieldProps): react_jsx_runtime.JSX.Element;
|
|
124
|
-
|
|
125
|
-
/**
|
|
126
|
-
* Password input field with visibility toggle and optional strength indicator.
|
|
127
|
-
*
|
|
128
|
-
* @component
|
|
129
|
-
* @example
|
|
130
|
-
* ```tsx
|
|
131
|
-
* // With forgot password link
|
|
132
|
-
* <AuthPasswordField
|
|
133
|
-
* id="password"
|
|
134
|
-
* label="Password"
|
|
135
|
-
* forgotPasswordLink={{ href: '/forgot-password' }}
|
|
136
|
-
* authConfig={config}
|
|
137
|
-
* />
|
|
138
|
-
*
|
|
139
|
-
* // With custom styling
|
|
140
|
-
* <AuthPasswordField
|
|
141
|
-
* id="password"
|
|
142
|
-
* label="Password"
|
|
143
|
-
* authConfig={config}
|
|
144
|
-
* appearance={{
|
|
145
|
-
* inputClassName: "border-blue-500",
|
|
146
|
-
* labelClassName: "text-blue-900"
|
|
147
|
-
* }}
|
|
148
|
-
* />
|
|
149
|
-
* ```
|
|
150
|
-
*
|
|
151
|
-
* @param {string} label - Label text
|
|
152
|
-
* @param {string} id - Input element ID
|
|
153
|
-
* @param {boolean} [showStrengthIndicator] - Show password strength requirements
|
|
154
|
-
* @param {object} [forgotPasswordLink] - Forgot password link config
|
|
155
|
-
* @param {object} [appearance] - Tailwind CSS classes for styling
|
|
156
|
-
* - `appearance.containerClassName`: Container element
|
|
157
|
-
* - `appearance.labelClassName`: Label element
|
|
158
|
-
* - `appearance.inputClassName`: Input element
|
|
159
|
-
*/
|
|
160
|
-
declare function AuthPasswordField({ label, id, showStrengthIndicator, authConfig, forgotPasswordLink, value, appearance, onFocus, ...props }: AuthPasswordFieldProps): react_jsx_runtime.JSX.Element;
|
|
161
|
-
|
|
162
|
-
/**
|
|
163
|
-
* Password strength indicator showing requirement checklist.
|
|
164
|
-
*
|
|
165
|
-
* @component
|
|
166
|
-
* @example
|
|
167
|
-
* ```tsx
|
|
168
|
-
* <AuthPasswordStrengthIndicator
|
|
169
|
-
* password={password}
|
|
170
|
-
* config={authConfig}
|
|
171
|
-
* />
|
|
172
|
-
*
|
|
173
|
-
* // With custom styling
|
|
174
|
-
* <AuthPasswordStrengthIndicator
|
|
175
|
-
* password={password}
|
|
176
|
-
* config={authConfig}
|
|
177
|
-
* appearance={{
|
|
178
|
-
* requirementClassName: "text-lg"
|
|
179
|
-
* }}
|
|
180
|
-
* />
|
|
181
|
-
* ```
|
|
182
|
-
*
|
|
183
|
-
* @param {string} password - Current password value
|
|
184
|
-
* @param {object} config - Email auth configuration
|
|
185
|
-
* @param {object} [appearance] - Tailwind CSS classes for styling
|
|
186
|
-
* - `appearance.containerClassName`: Container element
|
|
187
|
-
* - `appearance.requirementClassName`: Requirement text elements
|
|
188
|
-
*/
|
|
189
|
-
declare function AuthPasswordStrengthIndicator({ password, config, appearance, }: AuthPasswordStrengthIndicatorProps): react_jsx_runtime.JSX.Element;
|
|
190
|
-
/**
|
|
191
|
-
* Validates that a password meets all strength requirements based on email auth configuration.
|
|
192
|
-
*
|
|
193
|
-
* @param password - The password string to validate
|
|
194
|
-
* @param config - Email authentication configuration from backend
|
|
195
|
-
* @returns true if all requirements are met, false otherwise
|
|
196
|
-
*/
|
|
197
|
-
declare function validatePasswordStrength(password: string, config: AuthConfig): boolean;
|
|
198
|
-
|
|
199
|
-
/**
|
|
200
|
-
* Primary submit button for authentication forms with loading and confirmed states.
|
|
201
|
-
*
|
|
202
|
-
* @component
|
|
203
|
-
* @example
|
|
204
|
-
* ```tsx
|
|
205
|
-
* // Basic usage
|
|
206
|
-
* <AuthSubmitButton isLoading={loading}>
|
|
207
|
-
* Sign In
|
|
208
|
-
* </AuthSubmitButton>
|
|
209
|
-
*
|
|
210
|
-
* // With custom styling
|
|
211
|
-
* <AuthSubmitButton className="bg-purple-600 hover:bg-purple-700">
|
|
212
|
-
* Sign In
|
|
213
|
-
* </AuthSubmitButton>
|
|
214
|
-
* ```
|
|
215
|
-
*
|
|
216
|
-
* @param {ReactNode} children - Button text
|
|
217
|
-
* @param {boolean} [isLoading] - Loading state (shows spinner)
|
|
218
|
-
* @param {boolean} [confirmed] - Confirmed state (shows checkmark)
|
|
219
|
-
* @param {boolean} [disabled] - Disabled state
|
|
220
|
-
* @param {string} [className] - Button element classes
|
|
221
|
-
*/
|
|
222
|
-
declare function AuthSubmitButton({ children, isLoading, confirmed, disabled, className, }: AuthSubmitButtonProps): react_jsx_runtime.JSX.Element;
|
|
223
|
-
|
|
224
|
-
/**
|
|
225
|
-
* Call-to-action link component for navigation between auth pages.
|
|
226
|
-
*
|
|
227
|
-
* @component
|
|
228
|
-
* @example
|
|
229
|
-
* ```tsx
|
|
230
|
-
* <AuthLink
|
|
231
|
-
* text="Don't have an account?"
|
|
232
|
-
* linkText="Sign up"
|
|
233
|
-
* href="/sign-up"
|
|
234
|
-
* />
|
|
235
|
-
*
|
|
236
|
-
* // With custom styling
|
|
237
|
-
* <AuthLink
|
|
238
|
-
* text="Don't have an account?"
|
|
239
|
-
* linkText="Sign up"
|
|
240
|
-
* href="/sign-up"
|
|
241
|
-
* appearance={{
|
|
242
|
-
* linkClassName: "text-blue-500"
|
|
243
|
-
* }}
|
|
244
|
-
* />
|
|
245
|
-
* ```
|
|
246
|
-
*
|
|
247
|
-
* @param {string} text - Regular text before the link
|
|
248
|
-
* @param {string} linkText - Clickable link text
|
|
249
|
-
* @param {string} href - Link URL
|
|
250
|
-
* @param {object} [appearance] - Tailwind CSS classes for styling
|
|
251
|
-
* - `appearance.containerClassName`: Container element
|
|
252
|
-
* - `appearance.linkClassName`: Link element
|
|
253
|
-
*/
|
|
254
|
-
declare function AuthLink({ text, linkText, href, appearance }: AuthLinkProps): react_jsx_runtime.JSX.Element;
|
|
255
|
-
|
|
256
|
-
/**
|
|
257
|
-
* Visual divider with optional centered text for auth forms.
|
|
258
|
-
*
|
|
259
|
-
* @component
|
|
260
|
-
* @example
|
|
261
|
-
* ```tsx
|
|
262
|
-
* <AuthDivider text="or" />
|
|
263
|
-
* ```
|
|
264
|
-
*
|
|
265
|
-
* @param {string} [text='or'] - Centered text
|
|
266
|
-
* @param {string} [className] - Divider element classes
|
|
267
|
-
*/
|
|
268
|
-
declare function AuthDivider({ text, className }: AuthDividerProps): react_jsx_runtime.JSX.Element;
|
|
269
|
-
|
|
270
|
-
/**
|
|
271
|
-
* OAuth provider button with adaptive display modes.
|
|
272
|
-
*
|
|
273
|
-
* @component
|
|
274
|
-
* @example
|
|
275
|
-
* ```tsx
|
|
276
|
-
* <AuthOAuthButton
|
|
277
|
-
* provider="google"
|
|
278
|
-
* onClick={handleOAuth}
|
|
279
|
-
* displayMode="full"
|
|
280
|
-
* />
|
|
281
|
-
* ```
|
|
282
|
-
*
|
|
283
|
-
* @param {OAuthProvider} provider - Provider identifier (e.g., 'google', 'github')
|
|
284
|
-
* @param {function} onClick - Click handler
|
|
285
|
-
* @param {boolean} [disabled] - Disabled state
|
|
286
|
-
* @param {boolean} [loading] - Loading state (shows spinner)
|
|
287
|
-
* @param {string} [displayMode='full'] - Display mode ('full' | 'short' | 'icon')
|
|
288
|
-
* @param {string} [className] - Button element classes
|
|
289
|
-
*/
|
|
290
|
-
declare function AuthOAuthButton({ provider, onClick, disabled, loading, displayMode, style, className }: AuthOAuthButtonProps): react_jsx_runtime.JSX.Element | null;
|
|
291
|
-
|
|
292
|
-
/**
|
|
293
|
-
* Smart OAuth provider grid with adaptive layout.
|
|
294
|
-
*
|
|
295
|
-
* Automatically adjusts layout based on provider count:
|
|
296
|
-
* - 1 provider: Full-width
|
|
297
|
-
* - 2 or 4 providers: Two columns
|
|
298
|
-
* - 3+ providers: Three columns
|
|
299
|
-
*
|
|
300
|
-
* @component
|
|
301
|
-
* @example
|
|
302
|
-
* ```tsx
|
|
303
|
-
* <AuthOAuthProviders
|
|
304
|
-
* providers={['google', 'github', 'discord']}
|
|
305
|
-
* onClick={handleOAuth}
|
|
306
|
-
* loading={currentProvider}
|
|
307
|
-
* />
|
|
308
|
-
*
|
|
309
|
-
* // With custom styling
|
|
310
|
-
* <AuthOAuthProviders
|
|
311
|
-
* providers={['google', 'github']}
|
|
312
|
-
* onClick={handleOAuth}
|
|
313
|
-
* loading={currentProvider}
|
|
314
|
-
* appearance={{
|
|
315
|
-
* buttonClassName: "hover:bg-blue-50"
|
|
316
|
-
* }}
|
|
317
|
-
* />
|
|
318
|
-
* ```
|
|
319
|
-
*
|
|
320
|
-
* @param {OAuthProvider[]} providers - Provider identifiers array
|
|
321
|
-
* @param {function} onClick - Provider click handler
|
|
322
|
-
* @param {boolean} [disabled] - Disabled state for all buttons
|
|
323
|
-
* @param {OAuthProvider | null} loading - Currently loading provider
|
|
324
|
-
* @param {object} [appearance] - Tailwind CSS classes for styling
|
|
325
|
-
* - `appearance.containerClassName`: Grid container element
|
|
326
|
-
* - `appearance.buttonClassName`: OAuth button elements
|
|
327
|
-
*/
|
|
328
|
-
declare function AuthOAuthProviders({ providers, onClick, disabled, loading, appearance, }: AuthOAuthProvidersProps): react_jsx_runtime.JSX.Element | null;
|
|
329
|
-
|
|
330
|
-
/**
|
|
331
|
-
* 6-digit verification code input component with auto-focus and paste support.
|
|
332
|
-
*
|
|
333
|
-
* @component
|
|
334
|
-
* @example
|
|
335
|
-
* ```tsx
|
|
336
|
-
* const [code, setCode] = useState('');
|
|
337
|
-
*
|
|
338
|
-
* <AuthVerificationCodeInput
|
|
339
|
-
* email="user@example.com"
|
|
340
|
-
* value={code}
|
|
341
|
-
* onChange={setCode}
|
|
342
|
-
* />
|
|
343
|
-
*
|
|
344
|
-
* // With custom styling
|
|
345
|
-
* <AuthVerificationCodeInput
|
|
346
|
-
* email="user@example.com"
|
|
347
|
-
* value={code}
|
|
348
|
-
* onChange={setCode}
|
|
349
|
-
* appearance={{
|
|
350
|
-
* inputClassName: "border-blue-500"
|
|
351
|
-
* }}
|
|
352
|
-
* />
|
|
353
|
-
* ```
|
|
354
|
-
*
|
|
355
|
-
* @param {string} email - Email address to display in instructions
|
|
356
|
-
* @param {string} value - Current code value
|
|
357
|
-
* @param {function} onChange - Code change handler
|
|
358
|
-
* @param {number} [length=6] - Number of digits
|
|
359
|
-
* @param {boolean} [disabled] - Disabled state
|
|
360
|
-
* @param {object} [appearance] - Tailwind CSS classes for styling
|
|
361
|
-
* - `appearance.containerClassName`: Container element
|
|
362
|
-
* - `appearance.inputClassName`: Input elements
|
|
363
|
-
*/
|
|
364
|
-
declare function AuthVerificationCodeInput({ length, value, email, onChange, disabled, onComplete, appearance, }: AuthVerificationCodeInputProps): react_jsx_runtime.JSX.Element;
|
|
365
|
-
|
|
366
|
-
type VerificationMethod = 'code' | 'link';
|
|
367
|
-
interface AuthEmailVerificationStepProps {
|
|
368
|
-
email: string;
|
|
369
|
-
description?: string;
|
|
370
|
-
method?: VerificationMethod;
|
|
371
|
-
onVerifyCode?: (code: string) => Promise<void>;
|
|
372
|
-
}
|
|
373
|
-
/**
|
|
374
|
-
* Email verification step component (pure UI, no container)
|
|
375
|
-
*
|
|
376
|
-
* Designed to be embedded within a form container.
|
|
377
|
-
* Handles the email verification flow:
|
|
378
|
-
* - Automatically sends verification email on mount
|
|
379
|
-
* - Shows countdown timer for resend functionality
|
|
380
|
-
* - Manages rate limiting for resend attempts
|
|
381
|
-
* - Supports both code and link verification methods
|
|
382
|
-
*
|
|
383
|
-
* @param method - 'code' for OTP input, 'link' for magic link (default: 'code')
|
|
384
|
-
*/
|
|
385
|
-
declare function AuthEmailVerificationStep({ email, description, method, onVerifyCode, }: AuthEmailVerificationStepProps): react_jsx_runtime.JSX.Element;
|
|
386
|
-
|
|
387
|
-
export { AuthBranding, AuthContainer, AuthDivider, AuthEmailVerificationStep, AuthErrorBanner, AuthFormField, AuthHeader, AuthLink, AuthOAuthButton, AuthOAuthProviders, AuthPasswordField, AuthPasswordStrengthIndicator, AuthSubmitButton, AuthVerificationCodeInput, validatePasswordStrength };
|