@authon/react 0.2.1 → 0.3.1
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.ko.md +95 -0
- package/README.md +173 -90
- package/dist/index.cjs +2009 -157
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +174 -9
- package/dist/index.d.ts +174 -9
- package/dist/index.js +1996 -157
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
package/dist/index.d.cts
CHANGED
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import { ReactNode } from 'react';
|
|
2
|
+
import { ReactNode, CSSProperties, InputHTMLAttributes } from 'react';
|
|
3
3
|
import { Authon, AuthonConfig } from '@authon/js';
|
|
4
|
-
import { AuthonUser, OAuthProviderType } from '@authon/shared';
|
|
4
|
+
import { AuthonUser, AuthonOrganization, BrandingConfig, OAuthProviderType, MfaSetupResponse, MfaStatus, PasskeyCredential, Web3Chain, Web3WalletType, Web3NonceResponse, Web3Wallet, SessionInfo, OrganizationMember, CreateOrganizationParams } from '@authon/shared';
|
|
5
5
|
|
|
6
6
|
interface AuthonContextValue {
|
|
7
7
|
isSignedIn: boolean;
|
|
8
8
|
isLoading: boolean;
|
|
9
9
|
user: AuthonUser | null;
|
|
10
|
+
activeOrganization: AuthonOrganization | null;
|
|
11
|
+
setActiveOrganization: (org: AuthonOrganization | null) => void;
|
|
10
12
|
signOut: () => Promise<void>;
|
|
11
13
|
openSignIn: () => Promise<void>;
|
|
12
14
|
openSignUp: () => Promise<void>;
|
|
@@ -28,17 +30,33 @@ declare function useUser(): {
|
|
|
28
30
|
};
|
|
29
31
|
|
|
30
32
|
interface SignInProps {
|
|
31
|
-
|
|
32
|
-
|
|
33
|
+
appearance?: {
|
|
34
|
+
variables?: Partial<BrandingConfig>;
|
|
35
|
+
};
|
|
36
|
+
afterSignInUrl?: string;
|
|
37
|
+
onSignIn?: () => void;
|
|
38
|
+
onNavigateSignUp?: () => void;
|
|
33
39
|
}
|
|
34
|
-
declare function SignIn({
|
|
40
|
+
declare function SignIn({ appearance, afterSignInUrl, onSignIn, onNavigateSignUp }: SignInProps): react_jsx_runtime.JSX.Element;
|
|
35
41
|
|
|
36
42
|
interface SignUpProps {
|
|
37
|
-
|
|
43
|
+
appearance?: {
|
|
44
|
+
variables?: Partial<BrandingConfig>;
|
|
45
|
+
};
|
|
46
|
+
afterSignUpUrl?: string;
|
|
47
|
+
onSignUp?: () => void;
|
|
48
|
+
onNavigateSignIn?: () => void;
|
|
38
49
|
}
|
|
39
|
-
declare function SignUp({
|
|
50
|
+
declare function SignUp({ appearance, afterSignUpUrl, onSignUp, onNavigateSignIn }: SignUpProps): react_jsx_runtime.JSX.Element;
|
|
40
51
|
|
|
41
|
-
|
|
52
|
+
interface UserButtonProps {
|
|
53
|
+
appearance?: {
|
|
54
|
+
variables?: Partial<BrandingConfig>;
|
|
55
|
+
};
|
|
56
|
+
afterSignOutUrl?: string;
|
|
57
|
+
userProfileUrl?: string;
|
|
58
|
+
}
|
|
59
|
+
declare function UserButton({ appearance, afterSignOutUrl, userProfileUrl }: UserButtonProps): react_jsx_runtime.JSX.Element;
|
|
42
60
|
|
|
43
61
|
interface SignedInProps {
|
|
44
62
|
children: ReactNode;
|
|
@@ -101,4 +119,151 @@ interface SocialButtonsProps {
|
|
|
101
119
|
}
|
|
102
120
|
declare function SocialButtons({ onSuccess, onError, className, style: userStyle, gap, compact, labels, buttonProps, }: SocialButtonsProps): react_jsx_runtime.JSX.Element | null;
|
|
103
121
|
|
|
104
|
-
|
|
122
|
+
interface UseAuthonMfaReturn {
|
|
123
|
+
/** Start MFA setup — returns secret, QR code SVG, and backup codes */
|
|
124
|
+
setupMfa: () => Promise<(MfaSetupResponse & {
|
|
125
|
+
qrCodeSvg: string;
|
|
126
|
+
}) | null>;
|
|
127
|
+
/** Verify TOTP code to complete MFA setup */
|
|
128
|
+
verifyMfaSetup: (code: string) => Promise<boolean>;
|
|
129
|
+
/** Verify TOTP code during sign-in (after receiving mfaToken) */
|
|
130
|
+
verifyMfa: (mfaToken: string, code: string) => Promise<boolean>;
|
|
131
|
+
/** Disable MFA (requires current TOTP code) */
|
|
132
|
+
disableMfa: (code: string) => Promise<boolean>;
|
|
133
|
+
/** Get current MFA status */
|
|
134
|
+
getMfaStatus: () => Promise<MfaStatus | null>;
|
|
135
|
+
/** Regenerate backup codes (requires current TOTP code) */
|
|
136
|
+
regenerateBackupCodes: (code: string) => Promise<string[] | null>;
|
|
137
|
+
/** Loading state */
|
|
138
|
+
isLoading: boolean;
|
|
139
|
+
/** Last error */
|
|
140
|
+
error: Error | null;
|
|
141
|
+
}
|
|
142
|
+
declare function useAuthonMfa(): UseAuthonMfaReturn;
|
|
143
|
+
|
|
144
|
+
interface UseAuthonPasskeysReturn {
|
|
145
|
+
registerPasskey: (name?: string) => Promise<PasskeyCredential | null>;
|
|
146
|
+
authenticateWithPasskey: (email?: string) => Promise<boolean>;
|
|
147
|
+
listPasskeys: () => Promise<PasskeyCredential[] | null>;
|
|
148
|
+
renamePasskey: (id: string, name: string) => Promise<PasskeyCredential | null>;
|
|
149
|
+
revokePasskey: (id: string) => Promise<boolean>;
|
|
150
|
+
isLoading: boolean;
|
|
151
|
+
error: Error | null;
|
|
152
|
+
}
|
|
153
|
+
declare function useAuthonPasskeys(): UseAuthonPasskeysReturn;
|
|
154
|
+
|
|
155
|
+
interface UseAuthonPasswordlessReturn {
|
|
156
|
+
sendMagicLink: (email: string) => Promise<boolean>;
|
|
157
|
+
sendEmailOtp: (email: string) => Promise<boolean>;
|
|
158
|
+
verifyPasswordless: (opts: {
|
|
159
|
+
token?: string;
|
|
160
|
+
email?: string;
|
|
161
|
+
code?: string;
|
|
162
|
+
}) => Promise<boolean>;
|
|
163
|
+
isLoading: boolean;
|
|
164
|
+
error: Error | null;
|
|
165
|
+
}
|
|
166
|
+
declare function useAuthonPasswordless(): UseAuthonPasswordlessReturn;
|
|
167
|
+
|
|
168
|
+
interface LinkWalletParams {
|
|
169
|
+
address: string;
|
|
170
|
+
chain: Web3Chain;
|
|
171
|
+
walletType: Web3WalletType;
|
|
172
|
+
chainId?: number;
|
|
173
|
+
message: string;
|
|
174
|
+
signature: string;
|
|
175
|
+
}
|
|
176
|
+
interface UseAuthonWeb3Return {
|
|
177
|
+
getNonce: (address: string, chain: Web3Chain, walletType: Web3WalletType, chainId?: number) => Promise<Web3NonceResponse | null>;
|
|
178
|
+
verify: (message: string, signature: string, address: string, chain: Web3Chain, walletType: Web3WalletType) => Promise<boolean>;
|
|
179
|
+
listWallets: () => Promise<Web3Wallet[] | null>;
|
|
180
|
+
linkWallet: (params: LinkWalletParams) => Promise<Web3Wallet | null>;
|
|
181
|
+
unlinkWallet: (walletId: string) => Promise<boolean>;
|
|
182
|
+
isLoading: boolean;
|
|
183
|
+
error: Error | null;
|
|
184
|
+
}
|
|
185
|
+
declare function useAuthonWeb3(): UseAuthonWeb3Return;
|
|
186
|
+
|
|
187
|
+
interface UseAuthonSessionsReturn {
|
|
188
|
+
listSessions: () => Promise<SessionInfo[] | null>;
|
|
189
|
+
revokeSession: (sessionId: string) => Promise<boolean>;
|
|
190
|
+
isLoading: boolean;
|
|
191
|
+
error: Error | null;
|
|
192
|
+
}
|
|
193
|
+
declare function useAuthonSessions(): UseAuthonSessionsReturn;
|
|
194
|
+
|
|
195
|
+
interface UseOrganizationReturn {
|
|
196
|
+
organization: AuthonOrganization | null;
|
|
197
|
+
members: OrganizationMember[];
|
|
198
|
+
isLoaded: boolean;
|
|
199
|
+
}
|
|
200
|
+
declare function useOrganization(): UseOrganizationReturn;
|
|
201
|
+
|
|
202
|
+
interface UseOrganizationListReturn {
|
|
203
|
+
organizations: AuthonOrganization[];
|
|
204
|
+
isLoaded: boolean;
|
|
205
|
+
createOrganization: (params: CreateOrganizationParams) => Promise<AuthonOrganization | null>;
|
|
206
|
+
setActive: (org: AuthonOrganization | null) => void;
|
|
207
|
+
}
|
|
208
|
+
declare function useOrganizationList(): UseOrganizationListReturn;
|
|
209
|
+
|
|
210
|
+
interface BrandingState {
|
|
211
|
+
branding: BrandingConfig;
|
|
212
|
+
providers: OAuthProviderType[];
|
|
213
|
+
isLoaded: boolean;
|
|
214
|
+
}
|
|
215
|
+
declare function useBranding(): BrandingState;
|
|
216
|
+
|
|
217
|
+
interface UserProfileProps {
|
|
218
|
+
appearance?: {
|
|
219
|
+
variables?: Partial<BrandingConfig>;
|
|
220
|
+
};
|
|
221
|
+
}
|
|
222
|
+
declare function UserProfile({ appearance }: UserProfileProps): react_jsx_runtime.JSX.Element;
|
|
223
|
+
|
|
224
|
+
interface ThemeProviderProps {
|
|
225
|
+
branding: BrandingConfig;
|
|
226
|
+
children: ReactNode;
|
|
227
|
+
overrides?: Partial<BrandingConfig>;
|
|
228
|
+
style?: CSSProperties;
|
|
229
|
+
className?: string;
|
|
230
|
+
}
|
|
231
|
+
declare function ThemeProvider({ branding, children, overrides, style, className }: ThemeProviderProps): react_jsx_runtime.JSX.Element;
|
|
232
|
+
|
|
233
|
+
type ButtonVariant = 'primary' | 'secondary' | 'outline' | 'social' | 'ghost';
|
|
234
|
+
type ButtonSize = 'sm' | 'md' | 'lg';
|
|
235
|
+
interface ButtonProps {
|
|
236
|
+
variant?: ButtonVariant;
|
|
237
|
+
size?: ButtonSize;
|
|
238
|
+
fullWidth?: boolean;
|
|
239
|
+
loading?: boolean;
|
|
240
|
+
disabled?: boolean;
|
|
241
|
+
children: ReactNode;
|
|
242
|
+
onClick?: () => void | Promise<void>;
|
|
243
|
+
type?: 'button' | 'submit' | 'reset';
|
|
244
|
+
style?: CSSProperties;
|
|
245
|
+
}
|
|
246
|
+
declare function Button({ variant, size, fullWidth, loading, disabled, children, onClick, type, style: userStyle, }: ButtonProps): react_jsx_runtime.JSX.Element;
|
|
247
|
+
|
|
248
|
+
interface InputProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'onChange'> {
|
|
249
|
+
label?: string;
|
|
250
|
+
error?: string;
|
|
251
|
+
hint?: string;
|
|
252
|
+
inputStyle?: 'outline' | 'filled';
|
|
253
|
+
onChange?: (value: string) => void;
|
|
254
|
+
rightElement?: React.ReactNode;
|
|
255
|
+
}
|
|
256
|
+
declare function Input({ label, error, hint, inputStyle, onChange, rightElement, style: userStyle, ...rest }: InputProps): react_jsx_runtime.JSX.Element;
|
|
257
|
+
|
|
258
|
+
interface DividerProps {
|
|
259
|
+
label?: string;
|
|
260
|
+
}
|
|
261
|
+
declare function Divider({ label }: DividerProps): react_jsx_runtime.JSX.Element;
|
|
262
|
+
|
|
263
|
+
interface ProviderIconProps {
|
|
264
|
+
provider: OAuthProviderType;
|
|
265
|
+
size?: number;
|
|
266
|
+
}
|
|
267
|
+
declare function ProviderIcon({ provider, size }: ProviderIconProps): react_jsx_runtime.JSX.Element;
|
|
268
|
+
|
|
269
|
+
export { type AuthonContextValue, AuthonProvider, type BrandingState, Button, type ButtonProps, type ButtonSize, type ButtonVariant, Divider, Input, type InputProps, type LinkWalletParams, Protect, ProviderIcon, SignIn, type SignInProps, SignUp, type SignUpProps, SignedIn, SignedOut, SocialButton, type SocialButtonProps, SocialButtons, type SocialButtonsProps, ThemeProvider, type UseAuthonMfaReturn, type UseAuthonPasskeysReturn, type UseAuthonPasswordlessReturn, type UseAuthonSessionsReturn, type UseAuthonWeb3Return, type UseOrganizationListReturn, type UseOrganizationReturn, UserButton, type UserButtonProps, UserProfile, type UserProfileProps, useAuthon, useAuthonMfa, useAuthonPasskeys, useAuthonPasswordless, useAuthonSessions, useAuthonWeb3, useBranding, useOrganization, useOrganizationList, useUser };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import { ReactNode } from 'react';
|
|
2
|
+
import { ReactNode, CSSProperties, InputHTMLAttributes } from 'react';
|
|
3
3
|
import { Authon, AuthonConfig } from '@authon/js';
|
|
4
|
-
import { AuthonUser, OAuthProviderType } from '@authon/shared';
|
|
4
|
+
import { AuthonUser, AuthonOrganization, BrandingConfig, OAuthProviderType, MfaSetupResponse, MfaStatus, PasskeyCredential, Web3Chain, Web3WalletType, Web3NonceResponse, Web3Wallet, SessionInfo, OrganizationMember, CreateOrganizationParams } from '@authon/shared';
|
|
5
5
|
|
|
6
6
|
interface AuthonContextValue {
|
|
7
7
|
isSignedIn: boolean;
|
|
8
8
|
isLoading: boolean;
|
|
9
9
|
user: AuthonUser | null;
|
|
10
|
+
activeOrganization: AuthonOrganization | null;
|
|
11
|
+
setActiveOrganization: (org: AuthonOrganization | null) => void;
|
|
10
12
|
signOut: () => Promise<void>;
|
|
11
13
|
openSignIn: () => Promise<void>;
|
|
12
14
|
openSignUp: () => Promise<void>;
|
|
@@ -28,17 +30,33 @@ declare function useUser(): {
|
|
|
28
30
|
};
|
|
29
31
|
|
|
30
32
|
interface SignInProps {
|
|
31
|
-
|
|
32
|
-
|
|
33
|
+
appearance?: {
|
|
34
|
+
variables?: Partial<BrandingConfig>;
|
|
35
|
+
};
|
|
36
|
+
afterSignInUrl?: string;
|
|
37
|
+
onSignIn?: () => void;
|
|
38
|
+
onNavigateSignUp?: () => void;
|
|
33
39
|
}
|
|
34
|
-
declare function SignIn({
|
|
40
|
+
declare function SignIn({ appearance, afterSignInUrl, onSignIn, onNavigateSignUp }: SignInProps): react_jsx_runtime.JSX.Element;
|
|
35
41
|
|
|
36
42
|
interface SignUpProps {
|
|
37
|
-
|
|
43
|
+
appearance?: {
|
|
44
|
+
variables?: Partial<BrandingConfig>;
|
|
45
|
+
};
|
|
46
|
+
afterSignUpUrl?: string;
|
|
47
|
+
onSignUp?: () => void;
|
|
48
|
+
onNavigateSignIn?: () => void;
|
|
38
49
|
}
|
|
39
|
-
declare function SignUp({
|
|
50
|
+
declare function SignUp({ appearance, afterSignUpUrl, onSignUp, onNavigateSignIn }: SignUpProps): react_jsx_runtime.JSX.Element;
|
|
40
51
|
|
|
41
|
-
|
|
52
|
+
interface UserButtonProps {
|
|
53
|
+
appearance?: {
|
|
54
|
+
variables?: Partial<BrandingConfig>;
|
|
55
|
+
};
|
|
56
|
+
afterSignOutUrl?: string;
|
|
57
|
+
userProfileUrl?: string;
|
|
58
|
+
}
|
|
59
|
+
declare function UserButton({ appearance, afterSignOutUrl, userProfileUrl }: UserButtonProps): react_jsx_runtime.JSX.Element;
|
|
42
60
|
|
|
43
61
|
interface SignedInProps {
|
|
44
62
|
children: ReactNode;
|
|
@@ -101,4 +119,151 @@ interface SocialButtonsProps {
|
|
|
101
119
|
}
|
|
102
120
|
declare function SocialButtons({ onSuccess, onError, className, style: userStyle, gap, compact, labels, buttonProps, }: SocialButtonsProps): react_jsx_runtime.JSX.Element | null;
|
|
103
121
|
|
|
104
|
-
|
|
122
|
+
interface UseAuthonMfaReturn {
|
|
123
|
+
/** Start MFA setup — returns secret, QR code SVG, and backup codes */
|
|
124
|
+
setupMfa: () => Promise<(MfaSetupResponse & {
|
|
125
|
+
qrCodeSvg: string;
|
|
126
|
+
}) | null>;
|
|
127
|
+
/** Verify TOTP code to complete MFA setup */
|
|
128
|
+
verifyMfaSetup: (code: string) => Promise<boolean>;
|
|
129
|
+
/** Verify TOTP code during sign-in (after receiving mfaToken) */
|
|
130
|
+
verifyMfa: (mfaToken: string, code: string) => Promise<boolean>;
|
|
131
|
+
/** Disable MFA (requires current TOTP code) */
|
|
132
|
+
disableMfa: (code: string) => Promise<boolean>;
|
|
133
|
+
/** Get current MFA status */
|
|
134
|
+
getMfaStatus: () => Promise<MfaStatus | null>;
|
|
135
|
+
/** Regenerate backup codes (requires current TOTP code) */
|
|
136
|
+
regenerateBackupCodes: (code: string) => Promise<string[] | null>;
|
|
137
|
+
/** Loading state */
|
|
138
|
+
isLoading: boolean;
|
|
139
|
+
/** Last error */
|
|
140
|
+
error: Error | null;
|
|
141
|
+
}
|
|
142
|
+
declare function useAuthonMfa(): UseAuthonMfaReturn;
|
|
143
|
+
|
|
144
|
+
interface UseAuthonPasskeysReturn {
|
|
145
|
+
registerPasskey: (name?: string) => Promise<PasskeyCredential | null>;
|
|
146
|
+
authenticateWithPasskey: (email?: string) => Promise<boolean>;
|
|
147
|
+
listPasskeys: () => Promise<PasskeyCredential[] | null>;
|
|
148
|
+
renamePasskey: (id: string, name: string) => Promise<PasskeyCredential | null>;
|
|
149
|
+
revokePasskey: (id: string) => Promise<boolean>;
|
|
150
|
+
isLoading: boolean;
|
|
151
|
+
error: Error | null;
|
|
152
|
+
}
|
|
153
|
+
declare function useAuthonPasskeys(): UseAuthonPasskeysReturn;
|
|
154
|
+
|
|
155
|
+
interface UseAuthonPasswordlessReturn {
|
|
156
|
+
sendMagicLink: (email: string) => Promise<boolean>;
|
|
157
|
+
sendEmailOtp: (email: string) => Promise<boolean>;
|
|
158
|
+
verifyPasswordless: (opts: {
|
|
159
|
+
token?: string;
|
|
160
|
+
email?: string;
|
|
161
|
+
code?: string;
|
|
162
|
+
}) => Promise<boolean>;
|
|
163
|
+
isLoading: boolean;
|
|
164
|
+
error: Error | null;
|
|
165
|
+
}
|
|
166
|
+
declare function useAuthonPasswordless(): UseAuthonPasswordlessReturn;
|
|
167
|
+
|
|
168
|
+
interface LinkWalletParams {
|
|
169
|
+
address: string;
|
|
170
|
+
chain: Web3Chain;
|
|
171
|
+
walletType: Web3WalletType;
|
|
172
|
+
chainId?: number;
|
|
173
|
+
message: string;
|
|
174
|
+
signature: string;
|
|
175
|
+
}
|
|
176
|
+
interface UseAuthonWeb3Return {
|
|
177
|
+
getNonce: (address: string, chain: Web3Chain, walletType: Web3WalletType, chainId?: number) => Promise<Web3NonceResponse | null>;
|
|
178
|
+
verify: (message: string, signature: string, address: string, chain: Web3Chain, walletType: Web3WalletType) => Promise<boolean>;
|
|
179
|
+
listWallets: () => Promise<Web3Wallet[] | null>;
|
|
180
|
+
linkWallet: (params: LinkWalletParams) => Promise<Web3Wallet | null>;
|
|
181
|
+
unlinkWallet: (walletId: string) => Promise<boolean>;
|
|
182
|
+
isLoading: boolean;
|
|
183
|
+
error: Error | null;
|
|
184
|
+
}
|
|
185
|
+
declare function useAuthonWeb3(): UseAuthonWeb3Return;
|
|
186
|
+
|
|
187
|
+
interface UseAuthonSessionsReturn {
|
|
188
|
+
listSessions: () => Promise<SessionInfo[] | null>;
|
|
189
|
+
revokeSession: (sessionId: string) => Promise<boolean>;
|
|
190
|
+
isLoading: boolean;
|
|
191
|
+
error: Error | null;
|
|
192
|
+
}
|
|
193
|
+
declare function useAuthonSessions(): UseAuthonSessionsReturn;
|
|
194
|
+
|
|
195
|
+
interface UseOrganizationReturn {
|
|
196
|
+
organization: AuthonOrganization | null;
|
|
197
|
+
members: OrganizationMember[];
|
|
198
|
+
isLoaded: boolean;
|
|
199
|
+
}
|
|
200
|
+
declare function useOrganization(): UseOrganizationReturn;
|
|
201
|
+
|
|
202
|
+
interface UseOrganizationListReturn {
|
|
203
|
+
organizations: AuthonOrganization[];
|
|
204
|
+
isLoaded: boolean;
|
|
205
|
+
createOrganization: (params: CreateOrganizationParams) => Promise<AuthonOrganization | null>;
|
|
206
|
+
setActive: (org: AuthonOrganization | null) => void;
|
|
207
|
+
}
|
|
208
|
+
declare function useOrganizationList(): UseOrganizationListReturn;
|
|
209
|
+
|
|
210
|
+
interface BrandingState {
|
|
211
|
+
branding: BrandingConfig;
|
|
212
|
+
providers: OAuthProviderType[];
|
|
213
|
+
isLoaded: boolean;
|
|
214
|
+
}
|
|
215
|
+
declare function useBranding(): BrandingState;
|
|
216
|
+
|
|
217
|
+
interface UserProfileProps {
|
|
218
|
+
appearance?: {
|
|
219
|
+
variables?: Partial<BrandingConfig>;
|
|
220
|
+
};
|
|
221
|
+
}
|
|
222
|
+
declare function UserProfile({ appearance }: UserProfileProps): react_jsx_runtime.JSX.Element;
|
|
223
|
+
|
|
224
|
+
interface ThemeProviderProps {
|
|
225
|
+
branding: BrandingConfig;
|
|
226
|
+
children: ReactNode;
|
|
227
|
+
overrides?: Partial<BrandingConfig>;
|
|
228
|
+
style?: CSSProperties;
|
|
229
|
+
className?: string;
|
|
230
|
+
}
|
|
231
|
+
declare function ThemeProvider({ branding, children, overrides, style, className }: ThemeProviderProps): react_jsx_runtime.JSX.Element;
|
|
232
|
+
|
|
233
|
+
type ButtonVariant = 'primary' | 'secondary' | 'outline' | 'social' | 'ghost';
|
|
234
|
+
type ButtonSize = 'sm' | 'md' | 'lg';
|
|
235
|
+
interface ButtonProps {
|
|
236
|
+
variant?: ButtonVariant;
|
|
237
|
+
size?: ButtonSize;
|
|
238
|
+
fullWidth?: boolean;
|
|
239
|
+
loading?: boolean;
|
|
240
|
+
disabled?: boolean;
|
|
241
|
+
children: ReactNode;
|
|
242
|
+
onClick?: () => void | Promise<void>;
|
|
243
|
+
type?: 'button' | 'submit' | 'reset';
|
|
244
|
+
style?: CSSProperties;
|
|
245
|
+
}
|
|
246
|
+
declare function Button({ variant, size, fullWidth, loading, disabled, children, onClick, type, style: userStyle, }: ButtonProps): react_jsx_runtime.JSX.Element;
|
|
247
|
+
|
|
248
|
+
interface InputProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'onChange'> {
|
|
249
|
+
label?: string;
|
|
250
|
+
error?: string;
|
|
251
|
+
hint?: string;
|
|
252
|
+
inputStyle?: 'outline' | 'filled';
|
|
253
|
+
onChange?: (value: string) => void;
|
|
254
|
+
rightElement?: React.ReactNode;
|
|
255
|
+
}
|
|
256
|
+
declare function Input({ label, error, hint, inputStyle, onChange, rightElement, style: userStyle, ...rest }: InputProps): react_jsx_runtime.JSX.Element;
|
|
257
|
+
|
|
258
|
+
interface DividerProps {
|
|
259
|
+
label?: string;
|
|
260
|
+
}
|
|
261
|
+
declare function Divider({ label }: DividerProps): react_jsx_runtime.JSX.Element;
|
|
262
|
+
|
|
263
|
+
interface ProviderIconProps {
|
|
264
|
+
provider: OAuthProviderType;
|
|
265
|
+
size?: number;
|
|
266
|
+
}
|
|
267
|
+
declare function ProviderIcon({ provider, size }: ProviderIconProps): react_jsx_runtime.JSX.Element;
|
|
268
|
+
|
|
269
|
+
export { type AuthonContextValue, AuthonProvider, type BrandingState, Button, type ButtonProps, type ButtonSize, type ButtonVariant, Divider, Input, type InputProps, type LinkWalletParams, Protect, ProviderIcon, SignIn, type SignInProps, SignUp, type SignUpProps, SignedIn, SignedOut, SocialButton, type SocialButtonProps, SocialButtons, type SocialButtonsProps, ThemeProvider, type UseAuthonMfaReturn, type UseAuthonPasskeysReturn, type UseAuthonPasswordlessReturn, type UseAuthonSessionsReturn, type UseAuthonWeb3Return, type UseOrganizationListReturn, type UseOrganizationReturn, UserButton, type UserButtonProps, UserProfile, type UserProfileProps, useAuthon, useAuthonMfa, useAuthonPasskeys, useAuthonPasswordless, useAuthonSessions, useAuthonWeb3, useBranding, useOrganization, useOrganizationList, useUser };
|