@insforge/react 0.3.5 → 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.
Files changed (63) hide show
  1. package/README.md +485 -604
  2. package/dist/atoms.cjs +818 -0
  3. package/dist/atoms.cjs.map +1 -0
  4. package/dist/atoms.d.cts +222 -0
  5. package/dist/atoms.d.ts +72 -237
  6. package/dist/atoms.js +382 -456
  7. package/dist/atoms.js.map +1 -1
  8. package/dist/components.cjs +2254 -0
  9. package/dist/components.cjs.map +1 -0
  10. package/dist/{components.d.mts → components.d.cts} +10 -32
  11. package/dist/components.d.ts +9 -31
  12. package/dist/components.js +1046 -1180
  13. package/dist/components.js.map +1 -1
  14. package/dist/forms.cjs +1287 -0
  15. package/dist/forms.cjs.map +1 -0
  16. package/dist/forms.d.cts +138 -0
  17. package/dist/forms.d.ts +115 -162
  18. package/dist/forms.js +728 -921
  19. package/dist/forms.js.map +1 -1
  20. package/dist/{hooks.mjs → hooks.cjs} +15 -13
  21. package/dist/hooks.cjs.map +1 -0
  22. package/dist/{hooks.d.mts → hooks.d.cts} +1 -1
  23. package/dist/hooks.js +9 -15
  24. package/dist/hooks.js.map +1 -1
  25. package/dist/index.cjs +2674 -0
  26. package/dist/index.cjs.map +1 -0
  27. package/dist/{index.d.mts → index.d.cts} +10 -10
  28. package/dist/index.d.ts +4 -4
  29. package/dist/index.js +1093 -1235
  30. package/dist/index.js.map +1 -1
  31. package/dist/{lib.mjs → lib.cjs} +13 -11
  32. package/dist/lib.cjs.map +1 -0
  33. package/dist/{lib.d.mts → lib.d.cts} +1 -8
  34. package/dist/lib.d.ts +1 -8
  35. package/dist/lib.js +4 -17
  36. package/dist/lib.js.map +1 -1
  37. package/dist/{router.mjs → router.cjs} +14 -16
  38. package/dist/router.cjs.map +1 -0
  39. package/dist/router.js +10 -16
  40. package/dist/router.js.map +1 -1
  41. package/dist/styles.css +655 -2
  42. package/dist/types.cjs +4 -0
  43. package/dist/{types.mjs.map → types.cjs.map} +1 -1
  44. package/dist/{types.d.mts → types.d.cts} +2 -2
  45. package/dist/types.d.ts +2 -2
  46. package/dist/types.js +0 -1
  47. package/package.json +106 -98
  48. package/dist/atoms.d.mts +0 -387
  49. package/dist/atoms.mjs +0 -861
  50. package/dist/atoms.mjs.map +0 -1
  51. package/dist/components.mjs +0 -2327
  52. package/dist/components.mjs.map +0 -1
  53. package/dist/forms.d.mts +0 -185
  54. package/dist/forms.mjs +0 -1468
  55. package/dist/forms.mjs.map +0 -1
  56. package/dist/hooks.mjs.map +0 -1
  57. package/dist/index.mjs +0 -2724
  58. package/dist/index.mjs.map +0 -1
  59. package/dist/lib.mjs.map +0 -1
  60. package/dist/router.mjs.map +0 -1
  61. package/dist/types.mjs +0 -3
  62. package/src/styles.css +0 -15
  63. /package/dist/{router.d.mts → router.d.cts} +0 -0
@@ -1,5 +1,5 @@
1
- import { ReactNode, FormEvent, InputHTMLAttributes, CSSProperties } from 'react';
2
- import { OAuthProvidersSchema, GetPublicAuthConfigResponse } from '@insforge/shared-schemas';
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, FormEvent, InputHTMLAttributes, CSSProperties } from 'react';
2
- import { OAuthProvidersSchema, GetPublicAuthConfigResponse } from '@insforge/shared-schemas';
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
@@ -1,4 +1,3 @@
1
- 'use strict';
2
1
 
3
2
  //# sourceMappingURL=types.js.map
4
3
  //# sourceMappingURL=types.js.map
package/package.json CHANGED
@@ -1,98 +1,106 @@
1
- {
2
- "name": "@insforge/react",
3
- "version": "0.3.5",
4
- "description": "Framework-agnostic React authentication UI components for Insforge - reusable across all frameworks",
5
- "main": "./dist/index.js",
6
- "module": "./dist/index.mjs",
7
- "types": "./dist/index.d.ts",
8
- "exports": {
9
- ".": {
10
- "types": "./dist/index.d.ts",
11
- "import": "./dist/index.mjs",
12
- "require": "./dist/index.js"
13
- },
14
- "./atoms": {
15
- "types": "./dist/atoms.d.ts",
16
- "import": "./dist/atoms.mjs",
17
- "require": "./dist/atoms.js"
18
- },
19
- "./forms": {
20
- "types": "./dist/forms.d.ts",
21
- "import": "./dist/forms.mjs",
22
- "require": "./dist/forms.js"
23
- },
24
- "./components": {
25
- "types": "./dist/components.d.ts",
26
- "import": "./dist/components.mjs",
27
- "require": "./dist/components.js"
28
- },
29
- "./hooks": {
30
- "types": "./dist/hooks.d.ts",
31
- "import": "./dist/hooks.mjs",
32
- "require": "./dist/hooks.js"
33
- },
34
- "./lib": {
35
- "types": "./dist/lib.d.ts",
36
- "import": "./dist/lib.mjs",
37
- "require": "./dist/lib.js"
38
- },
39
- "./types": {
40
- "types": "./dist/types.d.ts",
41
- "import": "./dist/types.mjs",
42
- "require": "./dist/types.js"
43
- },
44
- "./router": {
45
- "types": "./dist/router.d.ts",
46
- "import": "./dist/router.mjs",
47
- "require": "./dist/router.js"
48
- },
49
- "./styles.css": "./src/styles.css"
50
- },
51
- "files": [
52
- "dist",
53
- "src/styles.css",
54
- "README.md"
55
- ],
56
- "scripts": {
57
- "build": "tsup",
58
- "dev": "concurrently \"npx @tailwindcss/cli -i ./src/styles.css -o ./dist/styles.css --watch\" \"tsup --watch\"",
59
- "type-check": "tsc --noEmit",
60
- "clean": "rimraf dist"
61
- },
62
- "keywords": [
63
- "insforge",
64
- "react",
65
- "authentication",
66
- "auth",
67
- "ui",
68
- "components",
69
- "headless",
70
- "framework-agnostic"
71
- ],
72
- "author": "Insforge",
73
- "license": "MIT",
74
- "peerDependencies": {
75
- "react": "^19.0.0",
76
- "react-dom": "^19.0.0",
77
- "react-router-dom": "^7.9.5"
78
- },
79
- "dependencies": {
80
- "@insforge/sdk": "^0.0.58-dev.14",
81
- "@insforge/shared-schemas": "^1.1.18",
82
- "clsx": "^2.1.1",
83
- "lucide-react": "^0.552.0",
84
- "tailwind-merge": "^3.3.1",
85
- "zod": "^4.1.12"
86
- },
87
- "devDependencies": {
88
- "@tailwindcss/postcss": "^4.1.16",
89
- "@types/node": "^24.9.2",
90
- "@types/react": "^19.2.2",
91
- "@types/react-dom": "^19.2.2",
92
- "concurrently": "^9.2.1",
93
- "rimraf": "^6.1.0",
94
- "tailwindcss": "^4.1.16",
95
- "tsup": "^8.5.0",
96
- "typescript": "^5.9.3"
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 };