better-auth-ui 3.2.5
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/LICENSE +21 -0
- package/README.md +53 -0
- package/dist/auth-hooks-IOEvlYYv.d.cts +6966 -0
- package/dist/auth-hooks-IOEvlYYv.d.ts +6966 -0
- package/dist/auth-mutators-DdqOmQ32.d.cts +29 -0
- package/dist/auth-mutators-DdqOmQ32.d.ts +29 -0
- package/dist/auth-ui-provider-BsH3xJDw.d.ts +697 -0
- package/dist/auth-ui-provider-DhZfncd3.d.cts +697 -0
- package/dist/chunk-BDFQSFBU.js +750 -0
- package/dist/chunk-CRAHKL2C.cjs +801 -0
- package/dist/chunk-MJPOA6PK.js +801 -0
- package/dist/chunk-SV64DXGW.cjs +750 -0
- package/dist/index.cjs +12618 -0
- package/dist/index.d.cts +771 -0
- package/dist/index.d.ts +771 -0
- package/dist/index.js +12618 -0
- package/dist/instantdb.cjs +189 -0
- package/dist/instantdb.d.cts +36 -0
- package/dist/instantdb.d.ts +36 -0
- package/dist/instantdb.js +189 -0
- package/dist/metafile-cjs.json +1 -0
- package/dist/metafile-esm.json +1 -0
- package/dist/server.cjs +194 -0
- package/dist/server.d.cts +35 -0
- package/dist/server.d.ts +35 -0
- package/dist/server.js +194 -0
- package/dist/style.css +1 -0
- package/dist/tanstack.cjs +153 -0
- package/dist/tanstack.d.cts +18 -0
- package/dist/tanstack.d.ts +18 -0
- package/dist/tanstack.js +153 -0
- package/dist/triplit.cjs +201 -0
- package/dist/triplit.d.cts +31 -0
- package/dist/triplit.d.ts +31 -0
- package/dist/triplit.js +201 -0
- package/dist/utils-C5R37WDe.d.cts +3 -0
- package/dist/utils-C5R37WDe.d.ts +3 -0
- package/dist/view-paths-CHSJf5dv.d.cts +645 -0
- package/dist/view-paths-CHSJf5dv.d.ts +645 -0
- package/package.json +156 -0
- package/src/components/account/account-view.tsx +220 -0
- package/src/components/auth/auth-callback.tsx +36 -0
- package/src/components/auth/auth-form.tsx +277 -0
- package/src/components/auth/auth-view.tsx +389 -0
- package/src/components/auth/email-otp-button.tsx +53 -0
- package/src/components/auth/forms/email-otp-form.tsx +288 -0
- package/src/components/auth/forms/forgot-password-form.tsx +168 -0
- package/src/components/auth/forms/magic-link-form.tsx +191 -0
- package/src/components/auth/forms/recover-account-form.tsx +138 -0
- package/src/components/auth/forms/reset-password-form.tsx +215 -0
- package/src/components/auth/forms/sign-in-form.tsx +289 -0
- package/src/components/auth/forms/sign-up-form.tsx +788 -0
- package/src/components/auth/forms/two-factor-form.tsx +372 -0
- package/src/components/auth/magic-link-button.tsx +54 -0
- package/src/components/auth/one-tap.tsx +48 -0
- package/src/components/auth/otp-input-group.tsx +65 -0
- package/src/components/auth/passkey-button.tsx +85 -0
- package/src/components/auth/provider-button.tsx +141 -0
- package/src/components/auth/sign-out.tsx +25 -0
- package/src/components/auth-loading.tsx +21 -0
- package/src/components/captcha/captcha.tsx +79 -0
- package/src/components/captcha/recaptcha-badge.tsx +61 -0
- package/src/components/captcha/recaptcha-v2.tsx +58 -0
- package/src/components/captcha/recaptcha-v3.tsx +73 -0
- package/src/components/email/email-template.tsx +216 -0
- package/src/components/form-error.tsx +27 -0
- package/src/components/organization/accept-invitation-card.tsx +362 -0
- package/src/components/organization/create-organization-dialog.tsx +395 -0
- package/src/components/organization/delete-organization-card.tsx +101 -0
- package/src/components/organization/delete-organization-dialog.tsx +209 -0
- package/src/components/organization/invitation-cell.tsx +156 -0
- package/src/components/organization/invite-member-dialog.tsx +258 -0
- package/src/components/organization/leave-organization-dialog.tsx +150 -0
- package/src/components/organization/member-cell.tsx +187 -0
- package/src/components/organization/organization-cell-view.tsx +122 -0
- package/src/components/organization/organization-cell.tsx +154 -0
- package/src/components/organization/organization-invitations-card.tsx +94 -0
- package/src/components/organization/organization-logo-card.tsx +308 -0
- package/src/components/organization/organization-logo.tsx +120 -0
- package/src/components/organization/organization-members-card.tsx +155 -0
- package/src/components/organization/organization-name-card.tsx +204 -0
- package/src/components/organization/organization-settings-cards.tsx +67 -0
- package/src/components/organization/organization-slug-card.tsx +223 -0
- package/src/components/organization/organization-switcher.tsx +512 -0
- package/src/components/organization/organization-view.tsx +228 -0
- package/src/components/organization/organizations-card.tsx +72 -0
- package/src/components/organization/personal-account-view.tsx +115 -0
- package/src/components/organization/remove-member-dialog.tsx +144 -0
- package/src/components/organization/update-member-role-dialog.tsx +213 -0
- package/src/components/organization/user-invitations-card.tsx +238 -0
- package/src/components/password-input.tsx +56 -0
- package/src/components/provider-icons.tsx +385 -0
- package/src/components/redirect-to-sign-in.tsx +16 -0
- package/src/components/redirect-to-sign-up.tsx +16 -0
- package/src/components/settings/account/account-cell.tsx +158 -0
- package/src/components/settings/account/accounts-card.tsx +75 -0
- package/src/components/settings/account/delete-account-card.tsx +65 -0
- package/src/components/settings/account/delete-account-dialog.tsx +231 -0
- package/src/components/settings/account/update-avatar-card.tsx +198 -0
- package/src/components/settings/account/update-field-card.tsx +282 -0
- package/src/components/settings/account/update-name-card.tsx +39 -0
- package/src/components/settings/account/update-username-card.tsx +42 -0
- package/src/components/settings/account-settings-cards.tsx +123 -0
- package/src/components/settings/api-key/api-key-cell.tsx +108 -0
- package/src/components/settings/api-key/api-key-delete-dialog.tsx +162 -0
- package/src/components/settings/api-key/api-key-display-dialog.tsx +110 -0
- package/src/components/settings/api-key/api-keys-card.tsx +98 -0
- package/src/components/settings/api-key/create-api-key-dialog.tsx +376 -0
- package/src/components/settings/passkey/passkey-cell.tsx +113 -0
- package/src/components/settings/passkey/passkeys-card.tsx +111 -0
- package/src/components/settings/providers/provider-cell.tsx +152 -0
- package/src/components/settings/providers/providers-card.tsx +108 -0
- package/src/components/settings/security/change-email-card.tsx +200 -0
- package/src/components/settings/security/change-password-card.tsx +326 -0
- package/src/components/settings/security/session-cell.tsx +120 -0
- package/src/components/settings/security/sessions-card.tsx +58 -0
- package/src/components/settings/security-settings-cards.tsx +111 -0
- package/src/components/settings/shared/session-freshness-dialog.tsx +97 -0
- package/src/components/settings/shared/settings-action-button.tsx +51 -0
- package/src/components/settings/shared/settings-card-footer.tsx +94 -0
- package/src/components/settings/shared/settings-card-header.tsx +67 -0
- package/src/components/settings/shared/settings-card.tsx +106 -0
- package/src/components/settings/skeletons/input-field-skeleton.tsx +18 -0
- package/src/components/settings/skeletons/settings-cell-skeleton.tsx +37 -0
- package/src/components/settings/two-factor/backup-codes-dialog.tsx +113 -0
- package/src/components/settings/two-factor/two-factor-card.tsx +63 -0
- package/src/components/settings/two-factor/two-factor-password-dialog.tsx +226 -0
- package/src/components/signed-in.tsx +20 -0
- package/src/components/signed-out.tsx +20 -0
- package/src/components/ui/alert.tsx +66 -0
- package/src/components/ui/avatar.tsx +53 -0
- package/src/components/ui/button.tsx +59 -0
- package/src/components/ui/card.tsx +92 -0
- package/src/components/ui/checkbox.tsx +32 -0
- package/src/components/ui/dialog.tsx +143 -0
- package/src/components/ui/drawer.tsx +135 -0
- package/src/components/ui/dropdown-menu.tsx +257 -0
- package/src/components/ui/form.tsx +167 -0
- package/src/components/ui/input-otp.tsx +77 -0
- package/src/components/ui/input.tsx +21 -0
- package/src/components/ui/label.tsx +24 -0
- package/src/components/ui/select.tsx +185 -0
- package/src/components/ui/separator.tsx +28 -0
- package/src/components/ui/skeleton.tsx +13 -0
- package/src/components/ui/tabs.tsx +66 -0
- package/src/components/ui/textarea.tsx +18 -0
- package/src/components/user-avatar.tsx +147 -0
- package/src/components/user-button.tsx +409 -0
- package/src/components/user-view.tsx +138 -0
- package/src/hooks/use-auth-data.ts +184 -0
- package/src/hooks/use-authenticate.ts +62 -0
- package/src/hooks/use-captcha.tsx +138 -0
- package/src/hooks/use-current-organization.ts +59 -0
- package/src/hooks/use-hydrated.ts +13 -0
- package/src/hooks/use-lang.ts +32 -0
- package/src/hooks/use-success-transition.ts +51 -0
- package/src/hooks/use-theme.ts +39 -0
- package/src/index.ts +65 -0
- package/src/instantdb.ts +1 -0
- package/src/lib/auth-data-cache.ts +90 -0
- package/src/lib/auth-ui-provider.tsx +658 -0
- package/src/lib/gravatar-utils.ts +58 -0
- package/src/lib/image-utils.ts +55 -0
- package/src/lib/instantdb/model-names.ts +24 -0
- package/src/lib/instantdb/use-instant-options.ts +98 -0
- package/src/lib/instantdb/use-list-accounts.ts +38 -0
- package/src/lib/instantdb/use-list-sessions.ts +53 -0
- package/src/lib/instantdb/use-session.ts +55 -0
- package/src/lib/organization-refetcher.tsx +56 -0
- package/src/lib/social-providers.ts +144 -0
- package/src/lib/tanstack/auth-ui-provider-tanstack.tsx +49 -0
- package/src/lib/tanstack/use-tanstack-options.ts +112 -0
- package/src/lib/triplit/model-names.ts +24 -0
- package/src/lib/triplit/use-conditional-query.ts +82 -0
- package/src/lib/triplit/use-list-accounts.ts +31 -0
- package/src/lib/triplit/use-list-sessions.ts +33 -0
- package/src/lib/triplit/use-session.ts +42 -0
- package/src/lib/triplit/use-triplit-hooks.ts +68 -0
- package/src/lib/triplit/use-triplit-token.ts +44 -0
- package/src/lib/utils.ts +105 -0
- package/src/lib/view-paths.ts +55 -0
- package/src/localization/admin-error-codes.ts +20 -0
- package/src/localization/anonymous-error-codes.ts +6 -0
- package/src/localization/api-key-error-codes.ts +32 -0
- package/src/localization/auth-localization.ts +740 -0
- package/src/localization/base-error-codes.ts +27 -0
- package/src/localization/captcha-error-codes.ts +17 -0
- package/src/localization/email-otp-error-codes.ts +7 -0
- package/src/localization/generic-oauth-error-codes.ts +3 -0
- package/src/localization/haveibeenpwned-error-codes.ts +4 -0
- package/src/localization/multi-session-error-codes.ts +3 -0
- package/src/localization/organization-error-codes.ts +57 -0
- package/src/localization/passkey-error-codes.ts +10 -0
- package/src/localization/phone-number-error-codes.ts +10 -0
- package/src/localization/stripe-localization.ts +12 -0
- package/src/localization/two-factor-error-codes.ts +12 -0
- package/src/localization/username-error-codes.ts +9 -0
- package/src/server.ts +4 -0
- package/src/style.css +1 -0
- package/src/tanstack.ts +1 -0
- package/src/triplit.ts +1 -0
- package/src/types/account-options.ts +35 -0
- package/src/types/additional-fields.ts +21 -0
- package/src/types/any-auth-client.ts +6 -0
- package/src/types/api-key.ts +9 -0
- package/src/types/auth-client.ts +37 -0
- package/src/types/auth-hooks.ts +61 -0
- package/src/types/auth-mutators.ts +17 -0
- package/src/types/avatar-options.ts +29 -0
- package/src/types/captcha-options.ts +32 -0
- package/src/types/captcha-provider.ts +6 -0
- package/src/types/credentials-options.ts +32 -0
- package/src/types/delete-user-options.ts +7 -0
- package/src/types/fetch-error.ts +6 -0
- package/src/types/generic-oauth-options.ts +16 -0
- package/src/types/gravatar-options.ts +21 -0
- package/src/types/image.ts +7 -0
- package/src/types/invitation.ts +10 -0
- package/src/types/link.ts +7 -0
- package/src/types/organization-options.ts +106 -0
- package/src/types/password-validation.ts +16 -0
- package/src/types/profile.ts +15 -0
- package/src/types/refetch.ts +1 -0
- package/src/types/render-toast.ts +9 -0
- package/src/types/sign-up-options.ts +7 -0
- package/src/types/social-options.ts +16 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,771 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { A as AuthLocalization, a as AccountViewPath, b as AuthViewPath, c as AuthViewPaths, O as OrganizationViewPath } from './view-paths-CHSJf5dv.js';
|
|
3
|
+
export { f as AccountViewPaths, g as OrganizationViewPaths, e as accountViewPaths, h as authLocalization, d as authViewPaths, o as organizationViewPaths } from './view-paths-CHSJf5dv.js';
|
|
4
|
+
import * as React from 'react';
|
|
5
|
+
import { ComponentProps, ReactNode } from 'react';
|
|
6
|
+
import * as AvatarPrimitive from '@radix-ui/react-avatar';
|
|
7
|
+
import { P as PasswordValidation, F as FieldType } from './auth-ui-provider-BsH3xJDw.js';
|
|
8
|
+
export { A as AppleIcon, m as AuthUIContext, k as AuthUIContextType, n as AuthUIProvider, l as AuthUIProviderProps, D as DiscordIcon, c as DropboxIcon, d as FacebookIcon, G as GitHubIcon, e as GitLabIcon, f as GoogleIcon, H as HuggingFaceIcon, K as KickIcon, L as LinearIcon, g as LinkedInIcon, M as MicrosoftIcon, N as NotionIcon, o as Provider, b as ProviderIcon, a as ProviderIconProps, R as RedditIcon, h as RobloxIcon, S as SlackIcon, i as SpotifyIcon, T as TikTokIcon, j as TwitchIcon, V as VKIcon, X as XIcon, Z as ZoomIcon, s as socialProviders } from './auth-ui-provider-BsH3xJDw.js';
|
|
9
|
+
import * as DialogPrimitive from '@radix-ui/react-dialog';
|
|
10
|
+
import { Organization } from 'better-auth/plugins/organization';
|
|
11
|
+
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
12
|
+
import { VariantProps } from 'class-variance-authority';
|
|
13
|
+
import * as better_auth from 'better-auth';
|
|
14
|
+
import { Account } from 'better-auth';
|
|
15
|
+
import { R as Refetch, A as AnyAuthClient } from './auth-hooks-IOEvlYYv.js';
|
|
16
|
+
export { a as AuthHooks } from './auth-hooks-IOEvlYYv.js';
|
|
17
|
+
import * as _better_fetch_fetch from '@better-fetch/fetch';
|
|
18
|
+
export { g as getViewByPath } from './utils-C5R37WDe.js';
|
|
19
|
+
export { A as AuthMutators } from './auth-mutators-DdqOmQ32.js';
|
|
20
|
+
import 'better-auth/social-providers';
|
|
21
|
+
import 'better-auth/react';
|
|
22
|
+
import 'inspector';
|
|
23
|
+
import 'better-auth/client/plugins';
|
|
24
|
+
import 'better-auth/plugins/passkey';
|
|
25
|
+
|
|
26
|
+
declare function Card({ className, ...props }: React.ComponentProps<"div">): react_jsx_runtime.JSX.Element;
|
|
27
|
+
|
|
28
|
+
type Profile = {
|
|
29
|
+
id?: string | number;
|
|
30
|
+
email?: string | null;
|
|
31
|
+
name?: string | null;
|
|
32
|
+
displayUsername?: string | null;
|
|
33
|
+
username?: string | null;
|
|
34
|
+
displayName?: string | null;
|
|
35
|
+
firstName?: string | null;
|
|
36
|
+
fullName?: string | null;
|
|
37
|
+
isAnonymous?: boolean | null;
|
|
38
|
+
emailVerified?: boolean | null;
|
|
39
|
+
image?: string | null;
|
|
40
|
+
avatar?: string | null;
|
|
41
|
+
avatarUrl?: string | null;
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
declare function Avatar({ className, ...props }: React.ComponentProps<typeof AvatarPrimitive.Root>): react_jsx_runtime.JSX.Element;
|
|
45
|
+
|
|
46
|
+
interface UserAvatarClassNames {
|
|
47
|
+
base?: string;
|
|
48
|
+
image?: string;
|
|
49
|
+
fallback?: string;
|
|
50
|
+
fallbackIcon?: string;
|
|
51
|
+
skeleton?: string;
|
|
52
|
+
}
|
|
53
|
+
interface UserAvatarProps {
|
|
54
|
+
classNames?: UserAvatarClassNames;
|
|
55
|
+
isPending?: boolean;
|
|
56
|
+
size?: "sm" | "default" | "lg" | "xl" | null;
|
|
57
|
+
user?: Profile | null;
|
|
58
|
+
/**
|
|
59
|
+
* @default authLocalization
|
|
60
|
+
* @remarks `AuthLocalization`
|
|
61
|
+
*/
|
|
62
|
+
localization?: Partial<AuthLocalization>;
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Displays a user avatar with image and fallback support
|
|
66
|
+
*
|
|
67
|
+
* Renders a user's avatar image when available, with appropriate fallbacks:
|
|
68
|
+
* - Shows a skeleton when isPending is true
|
|
69
|
+
* - Displays first two characters of user's name when no image is available
|
|
70
|
+
* - Falls back to a generic user icon when neither image nor name is available
|
|
71
|
+
*/
|
|
72
|
+
declare function UserAvatar({ className, classNames, isPending, size, user, localization: propLocalization, ...props }: UserAvatarProps & ComponentProps<typeof Avatar>): react_jsx_runtime.JSX.Element;
|
|
73
|
+
|
|
74
|
+
type SettingsCardClassNames = {
|
|
75
|
+
base?: string;
|
|
76
|
+
avatar?: UserAvatarClassNames;
|
|
77
|
+
button?: string;
|
|
78
|
+
cell?: string;
|
|
79
|
+
checkbox?: string;
|
|
80
|
+
destructiveButton?: string;
|
|
81
|
+
content?: string;
|
|
82
|
+
description?: string;
|
|
83
|
+
dialog?: {
|
|
84
|
+
content?: string;
|
|
85
|
+
footer?: string;
|
|
86
|
+
header?: string;
|
|
87
|
+
};
|
|
88
|
+
error?: string;
|
|
89
|
+
footer?: string;
|
|
90
|
+
header?: string;
|
|
91
|
+
icon?: string;
|
|
92
|
+
input?: string;
|
|
93
|
+
instructions?: string;
|
|
94
|
+
label?: string;
|
|
95
|
+
primaryButton?: string;
|
|
96
|
+
secondaryButton?: string;
|
|
97
|
+
outlineButton?: string;
|
|
98
|
+
skeleton?: string;
|
|
99
|
+
title?: string;
|
|
100
|
+
};
|
|
101
|
+
interface SettingsCardProps extends Omit<ComponentProps<typeof Card>, "title"> {
|
|
102
|
+
children?: ReactNode;
|
|
103
|
+
className?: string;
|
|
104
|
+
classNames?: SettingsCardClassNames;
|
|
105
|
+
title?: ReactNode;
|
|
106
|
+
description?: ReactNode;
|
|
107
|
+
instructions?: ReactNode;
|
|
108
|
+
actionLabel?: ReactNode;
|
|
109
|
+
isSubmitting?: boolean;
|
|
110
|
+
disabled?: boolean;
|
|
111
|
+
isPending?: boolean;
|
|
112
|
+
optimistic?: boolean;
|
|
113
|
+
variant?: "default" | "destructive";
|
|
114
|
+
localization?: AuthLocalization;
|
|
115
|
+
action?: () => Promise<unknown> | unknown;
|
|
116
|
+
}
|
|
117
|
+
declare function SettingsCard({ children, className, classNames, title, description, instructions, actionLabel, disabled, isPending, isSubmitting, optimistic, variant, action, ...props }: SettingsCardProps): react_jsx_runtime.JSX.Element;
|
|
118
|
+
|
|
119
|
+
interface AccountViewProps {
|
|
120
|
+
className?: string;
|
|
121
|
+
classNames?: {
|
|
122
|
+
base?: string;
|
|
123
|
+
cards?: string;
|
|
124
|
+
drawer?: {
|
|
125
|
+
menuItem?: string;
|
|
126
|
+
};
|
|
127
|
+
sidebar?: {
|
|
128
|
+
base?: string;
|
|
129
|
+
button?: string;
|
|
130
|
+
buttonActive?: string;
|
|
131
|
+
};
|
|
132
|
+
card?: SettingsCardClassNames;
|
|
133
|
+
};
|
|
134
|
+
localization?: AuthLocalization;
|
|
135
|
+
path?: string;
|
|
136
|
+
pathname?: string;
|
|
137
|
+
view?: AccountViewPath;
|
|
138
|
+
hideNav?: boolean;
|
|
139
|
+
}
|
|
140
|
+
declare function AccountView({ className, classNames, localization: localizationProp, path: pathProp, pathname, view: viewProp, hideNav }: AccountViewProps): react_jsx_runtime.JSX.Element | null;
|
|
141
|
+
|
|
142
|
+
declare function AuthCallback({ redirectTo }: {
|
|
143
|
+
redirectTo?: string;
|
|
144
|
+
}): react_jsx_runtime.JSX.Element;
|
|
145
|
+
|
|
146
|
+
type AuthFormClassNames = {
|
|
147
|
+
base?: string;
|
|
148
|
+
button?: string;
|
|
149
|
+
checkbox?: string;
|
|
150
|
+
description?: string;
|
|
151
|
+
error?: string;
|
|
152
|
+
forgotPasswordLink?: string;
|
|
153
|
+
icon?: string;
|
|
154
|
+
input?: string;
|
|
155
|
+
label?: string;
|
|
156
|
+
otpInput?: string;
|
|
157
|
+
otpInputContainer?: string;
|
|
158
|
+
outlineButton?: string;
|
|
159
|
+
primaryButton?: string;
|
|
160
|
+
providerButton?: string;
|
|
161
|
+
qrCode?: string;
|
|
162
|
+
secondaryButton?: string;
|
|
163
|
+
};
|
|
164
|
+
interface AuthFormProps {
|
|
165
|
+
className?: string;
|
|
166
|
+
classNames?: AuthFormClassNames;
|
|
167
|
+
callbackURL?: string;
|
|
168
|
+
isSubmitting?: boolean;
|
|
169
|
+
localization?: Partial<AuthLocalization>;
|
|
170
|
+
pathname?: string;
|
|
171
|
+
redirectTo?: string;
|
|
172
|
+
view?: AuthViewPath;
|
|
173
|
+
otpSeparators?: 0 | 1 | 2;
|
|
174
|
+
setIsSubmitting?: (isSubmitting: boolean) => void;
|
|
175
|
+
}
|
|
176
|
+
declare function AuthForm({ className, classNames, callbackURL, isSubmitting, localization, pathname, redirectTo, view, otpSeparators, setIsSubmitting }: AuthFormProps): false | react_jsx_runtime.JSX.Element | null | undefined;
|
|
177
|
+
|
|
178
|
+
type AuthViewClassNames = {
|
|
179
|
+
base?: string;
|
|
180
|
+
content?: string;
|
|
181
|
+
description?: string;
|
|
182
|
+
footer?: string;
|
|
183
|
+
footerLink?: string;
|
|
184
|
+
continueWith?: string;
|
|
185
|
+
form?: AuthFormClassNames;
|
|
186
|
+
header?: string;
|
|
187
|
+
separator?: string;
|
|
188
|
+
title?: string;
|
|
189
|
+
};
|
|
190
|
+
interface AuthViewProps {
|
|
191
|
+
className?: string;
|
|
192
|
+
classNames?: AuthViewClassNames;
|
|
193
|
+
callbackURL?: string;
|
|
194
|
+
cardHeader?: ReactNode;
|
|
195
|
+
localization?: AuthLocalization;
|
|
196
|
+
path?: string;
|
|
197
|
+
pathname?: string;
|
|
198
|
+
redirectTo?: string;
|
|
199
|
+
socialLayout?: "auto" | "horizontal" | "grid" | "vertical";
|
|
200
|
+
view?: keyof AuthViewPaths;
|
|
201
|
+
otpSeparators?: 0 | 1 | 2;
|
|
202
|
+
}
|
|
203
|
+
declare function AuthView({ className, classNames, callbackURL, cardHeader, localization, path: pathProp, pathname, redirectTo, socialLayout: socialLayoutProp, view: viewProp, otpSeparators }: AuthViewProps): react_jsx_runtime.JSX.Element;
|
|
204
|
+
|
|
205
|
+
interface ForgotPasswordFormProps {
|
|
206
|
+
className?: string;
|
|
207
|
+
classNames?: AuthFormClassNames;
|
|
208
|
+
isSubmitting?: boolean;
|
|
209
|
+
localization: Partial<AuthLocalization>;
|
|
210
|
+
setIsSubmitting?: (value: boolean) => void;
|
|
211
|
+
}
|
|
212
|
+
declare function ForgotPasswordForm({ className, classNames, isSubmitting, localization, setIsSubmitting }: ForgotPasswordFormProps): react_jsx_runtime.JSX.Element;
|
|
213
|
+
|
|
214
|
+
interface MagicLinkFormProps {
|
|
215
|
+
className?: string;
|
|
216
|
+
classNames?: AuthFormClassNames;
|
|
217
|
+
callbackURL?: string;
|
|
218
|
+
isSubmitting?: boolean;
|
|
219
|
+
localization: Partial<AuthLocalization>;
|
|
220
|
+
redirectTo?: string;
|
|
221
|
+
setIsSubmitting?: (value: boolean) => void;
|
|
222
|
+
}
|
|
223
|
+
declare function MagicLinkForm({ className, classNames, callbackURL: callbackURLProp, isSubmitting, localization, redirectTo: redirectToProp, setIsSubmitting }: MagicLinkFormProps): react_jsx_runtime.JSX.Element;
|
|
224
|
+
|
|
225
|
+
interface RecoverAccountFormProps {
|
|
226
|
+
className?: string;
|
|
227
|
+
classNames?: AuthFormClassNames;
|
|
228
|
+
isSubmitting?: boolean;
|
|
229
|
+
localization: Partial<AuthLocalization>;
|
|
230
|
+
redirectTo?: string;
|
|
231
|
+
setIsSubmitting?: (value: boolean) => void;
|
|
232
|
+
}
|
|
233
|
+
declare function RecoverAccountForm({ className, classNames, isSubmitting, localization, redirectTo, setIsSubmitting }: RecoverAccountFormProps): react_jsx_runtime.JSX.Element;
|
|
234
|
+
|
|
235
|
+
interface ResetPasswordFormProps {
|
|
236
|
+
className?: string;
|
|
237
|
+
classNames?: AuthFormClassNames;
|
|
238
|
+
localization: Partial<AuthLocalization>;
|
|
239
|
+
passwordValidation?: PasswordValidation;
|
|
240
|
+
}
|
|
241
|
+
declare function ResetPasswordForm({ className, classNames, localization, passwordValidation }: ResetPasswordFormProps): react_jsx_runtime.JSX.Element;
|
|
242
|
+
|
|
243
|
+
interface SignInFormProps {
|
|
244
|
+
className?: string;
|
|
245
|
+
classNames?: AuthFormClassNames;
|
|
246
|
+
isSubmitting?: boolean;
|
|
247
|
+
localization: Partial<AuthLocalization>;
|
|
248
|
+
redirectTo?: string;
|
|
249
|
+
setIsSubmitting?: (isSubmitting: boolean) => void;
|
|
250
|
+
passwordValidation?: PasswordValidation;
|
|
251
|
+
}
|
|
252
|
+
declare function SignInForm({ className, classNames, isSubmitting, localization, redirectTo, setIsSubmitting, passwordValidation }: SignInFormProps): react_jsx_runtime.JSX.Element;
|
|
253
|
+
|
|
254
|
+
interface SignUpFormProps {
|
|
255
|
+
className?: string;
|
|
256
|
+
classNames?: AuthFormClassNames;
|
|
257
|
+
callbackURL?: string;
|
|
258
|
+
isSubmitting?: boolean;
|
|
259
|
+
localization: Partial<AuthLocalization>;
|
|
260
|
+
redirectTo?: string;
|
|
261
|
+
setIsSubmitting?: (value: boolean) => void;
|
|
262
|
+
passwordValidation?: PasswordValidation;
|
|
263
|
+
}
|
|
264
|
+
declare function SignUpForm({ className, classNames, callbackURL, isSubmitting, localization, redirectTo, setIsSubmitting, passwordValidation }: SignUpFormProps): react_jsx_runtime.JSX.Element;
|
|
265
|
+
|
|
266
|
+
interface TwoFactorFormProps {
|
|
267
|
+
className?: string;
|
|
268
|
+
classNames?: AuthFormClassNames;
|
|
269
|
+
isSubmitting?: boolean;
|
|
270
|
+
localization?: Partial<AuthLocalization>;
|
|
271
|
+
otpSeparators?: 0 | 1 | 2;
|
|
272
|
+
redirectTo?: string;
|
|
273
|
+
setIsSubmitting?: (value: boolean) => void;
|
|
274
|
+
}
|
|
275
|
+
declare function TwoFactorForm({ className, classNames, isSubmitting, localization, otpSeparators, redirectTo, setIsSubmitting }: TwoFactorFormProps): react_jsx_runtime.JSX.Element;
|
|
276
|
+
|
|
277
|
+
declare function SignOut(): react_jsx_runtime.JSX.Element;
|
|
278
|
+
|
|
279
|
+
/**
|
|
280
|
+
* Conditionally renders content during authentication loading state
|
|
281
|
+
*
|
|
282
|
+
* Renders its children only when the authentication state is being determined
|
|
283
|
+
* (during the loading/pending phase). Once the authentication state is resolved,
|
|
284
|
+
* nothing is rendered. Useful for displaying loading indicators or temporary
|
|
285
|
+
* content while waiting for the authentication check to complete.
|
|
286
|
+
*/
|
|
287
|
+
declare function AuthLoading({ children }: {
|
|
288
|
+
children: ReactNode;
|
|
289
|
+
}): ReactNode;
|
|
290
|
+
|
|
291
|
+
interface AcceptInvitationCardProps {
|
|
292
|
+
className?: string;
|
|
293
|
+
classNames?: SettingsCardClassNames;
|
|
294
|
+
localization?: Partial<AuthLocalization>;
|
|
295
|
+
}
|
|
296
|
+
declare function AcceptInvitationCard({ className, classNames, localization: localizationProp }: AcceptInvitationCardProps): react_jsx_runtime.JSX.Element;
|
|
297
|
+
|
|
298
|
+
declare function Dialog({ ...props }: React.ComponentProps<typeof DialogPrimitive.Root>): react_jsx_runtime.JSX.Element;
|
|
299
|
+
|
|
300
|
+
interface CreateOrganizationDialogProps extends ComponentProps<typeof Dialog> {
|
|
301
|
+
className?: string;
|
|
302
|
+
classNames?: SettingsCardClassNames;
|
|
303
|
+
localization?: AuthLocalization;
|
|
304
|
+
}
|
|
305
|
+
declare function CreateOrganizationDialog({ className, classNames, localization: localizationProp, onOpenChange, ...props }: CreateOrganizationDialogProps): react_jsx_runtime.JSX.Element;
|
|
306
|
+
|
|
307
|
+
declare function DeleteOrganizationCard({ className, classNames, localization: localizationProp, slug, ...props }: SettingsCardProps & {
|
|
308
|
+
slug?: string;
|
|
309
|
+
}): react_jsx_runtime.JSX.Element;
|
|
310
|
+
|
|
311
|
+
interface OrganizationLogoClassNames {
|
|
312
|
+
base?: string;
|
|
313
|
+
image?: string;
|
|
314
|
+
fallback?: string;
|
|
315
|
+
fallbackIcon?: string;
|
|
316
|
+
skeleton?: string;
|
|
317
|
+
}
|
|
318
|
+
interface OrganizationLogoProps {
|
|
319
|
+
classNames?: OrganizationLogoClassNames;
|
|
320
|
+
isPending?: boolean;
|
|
321
|
+
size?: "sm" | "default" | "lg" | "xl" | null;
|
|
322
|
+
organization?: Partial<Organization> | null;
|
|
323
|
+
/**
|
|
324
|
+
* @default authLocalization
|
|
325
|
+
* @remarks `AuthLocalization`
|
|
326
|
+
*/
|
|
327
|
+
localization?: AuthLocalization;
|
|
328
|
+
}
|
|
329
|
+
/**
|
|
330
|
+
* Displays an organization logo with image and fallback support
|
|
331
|
+
*
|
|
332
|
+
* Renders an organization's logo image when available, with appropriate fallbacks:
|
|
333
|
+
* - Shows a skeleton when isPending is true
|
|
334
|
+
* - Falls back to a building icon when no logo is available
|
|
335
|
+
*/
|
|
336
|
+
declare function OrganizationLogo({ className, classNames, isPending, size, organization, localization: propLocalization, ...props }: OrganizationLogoProps & ComponentProps<typeof Avatar>): react_jsx_runtime.JSX.Element;
|
|
337
|
+
|
|
338
|
+
interface OrganizationViewClassNames {
|
|
339
|
+
base?: string;
|
|
340
|
+
avatar?: OrganizationLogoClassNames;
|
|
341
|
+
content?: string;
|
|
342
|
+
title?: string;
|
|
343
|
+
subtitle?: string;
|
|
344
|
+
skeleton?: string;
|
|
345
|
+
}
|
|
346
|
+
interface OrganizationViewProps {
|
|
347
|
+
className?: string;
|
|
348
|
+
classNames?: OrganizationViewClassNames;
|
|
349
|
+
isPending?: boolean;
|
|
350
|
+
size?: "sm" | "default" | "lg" | null;
|
|
351
|
+
organization?: Organization | null;
|
|
352
|
+
/**
|
|
353
|
+
* @default authLocalization
|
|
354
|
+
* @remarks `AuthLocalization`
|
|
355
|
+
*/
|
|
356
|
+
localization?: AuthLocalization;
|
|
357
|
+
}
|
|
358
|
+
declare function OrganizationCellView({ className, classNames, isPending, size, organization, localization: propLocalization }: OrganizationViewProps): react_jsx_runtime.JSX.Element;
|
|
359
|
+
|
|
360
|
+
declare function OrganizationInvitationsCard({ className, classNames, localization: localizationProp, slug: slugProp, ...props }: SettingsCardProps & {
|
|
361
|
+
slug?: string;
|
|
362
|
+
}): react_jsx_runtime.JSX.Element | null;
|
|
363
|
+
|
|
364
|
+
interface OrganizationLogoCardProps extends ComponentProps<typeof Card> {
|
|
365
|
+
className?: string;
|
|
366
|
+
classNames?: SettingsCardClassNames;
|
|
367
|
+
localization?: AuthLocalization;
|
|
368
|
+
slug?: string;
|
|
369
|
+
}
|
|
370
|
+
declare function OrganizationLogoCard({ className, classNames, localization: localizationProp, slug, ...props }: OrganizationLogoCardProps): react_jsx_runtime.JSX.Element;
|
|
371
|
+
|
|
372
|
+
declare function OrganizationMembersCard({ className, classNames, localization: localizationProp, slug: slugProp, ...props }: SettingsCardProps & {
|
|
373
|
+
slug?: string;
|
|
374
|
+
}): react_jsx_runtime.JSX.Element;
|
|
375
|
+
|
|
376
|
+
interface OrganizationNameCardProps extends SettingsCardProps {
|
|
377
|
+
slug?: string;
|
|
378
|
+
}
|
|
379
|
+
declare function OrganizationNameCard({ className, classNames, localization: localizationProp, slug, ...props }: OrganizationNameCardProps): react_jsx_runtime.JSX.Element;
|
|
380
|
+
|
|
381
|
+
type OrganizationSettingsCardsProps = {
|
|
382
|
+
className?: string;
|
|
383
|
+
classNames?: {
|
|
384
|
+
card?: SettingsCardClassNames;
|
|
385
|
+
cards?: string;
|
|
386
|
+
};
|
|
387
|
+
localization?: Partial<AuthLocalization>;
|
|
388
|
+
slug?: string;
|
|
389
|
+
};
|
|
390
|
+
declare function OrganizationSettingsCards({ className, classNames, localization, slug }: OrganizationSettingsCardsProps): react_jsx_runtime.JSX.Element;
|
|
391
|
+
|
|
392
|
+
interface OrganizationSlugCardProps extends SettingsCardProps {
|
|
393
|
+
slug?: string;
|
|
394
|
+
}
|
|
395
|
+
declare function OrganizationSlugCard({ className, classNames, localization: localizationProp, slug: slugProp, ...props }: OrganizationSlugCardProps): react_jsx_runtime.JSX.Element;
|
|
396
|
+
|
|
397
|
+
declare const buttonVariants: (props?: ({
|
|
398
|
+
variant?: "link" | "default" | "destructive" | "outline" | "secondary" | "ghost" | null | undefined;
|
|
399
|
+
size?: "default" | "icon" | "sm" | "lg" | null | undefined;
|
|
400
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
401
|
+
declare function Button({ className, variant, size, asChild, ...props }: React.ComponentProps<"button"> & VariantProps<typeof buttonVariants> & {
|
|
402
|
+
asChild?: boolean;
|
|
403
|
+
}): react_jsx_runtime.JSX.Element;
|
|
404
|
+
|
|
405
|
+
interface UserViewClassNames {
|
|
406
|
+
base?: string;
|
|
407
|
+
avatar?: UserAvatarClassNames;
|
|
408
|
+
content?: string;
|
|
409
|
+
title?: string;
|
|
410
|
+
subtitle?: string;
|
|
411
|
+
skeleton?: string;
|
|
412
|
+
}
|
|
413
|
+
interface UserViewProps {
|
|
414
|
+
className?: string;
|
|
415
|
+
classNames?: UserViewClassNames;
|
|
416
|
+
isPending?: boolean;
|
|
417
|
+
size?: "sm" | "default" | "lg" | null;
|
|
418
|
+
user?: Profile | null;
|
|
419
|
+
/**
|
|
420
|
+
* @default authLocalization
|
|
421
|
+
* @remarks `AuthLocalization`
|
|
422
|
+
*/
|
|
423
|
+
localization?: AuthLocalization;
|
|
424
|
+
}
|
|
425
|
+
/**
|
|
426
|
+
* Displays user information with avatar and details in a compact view
|
|
427
|
+
*
|
|
428
|
+
* Renders a user's profile information with appropriate fallbacks:
|
|
429
|
+
* - Shows avatar alongside user name and email when available
|
|
430
|
+
* - Shows loading skeletons when isPending is true
|
|
431
|
+
* - Falls back to generic "User" text when neither name nor email is available
|
|
432
|
+
* - Supports customization through classNames prop
|
|
433
|
+
*/
|
|
434
|
+
declare function UserView({ className, classNames, isPending, size, user, localization: propLocalization }: UserViewProps): react_jsx_runtime.JSX.Element;
|
|
435
|
+
|
|
436
|
+
interface OrganizationSwitcherClassNames {
|
|
437
|
+
base?: string;
|
|
438
|
+
skeleton?: string;
|
|
439
|
+
trigger?: {
|
|
440
|
+
base?: string;
|
|
441
|
+
avatar?: UserAvatarClassNames;
|
|
442
|
+
user?: UserViewClassNames;
|
|
443
|
+
organization?: OrganizationViewClassNames;
|
|
444
|
+
skeleton?: string;
|
|
445
|
+
};
|
|
446
|
+
content?: {
|
|
447
|
+
base?: string;
|
|
448
|
+
user?: UserViewClassNames;
|
|
449
|
+
organization?: OrganizationViewClassNames;
|
|
450
|
+
avatar?: UserAvatarClassNames;
|
|
451
|
+
menuItem?: string;
|
|
452
|
+
separator?: string;
|
|
453
|
+
};
|
|
454
|
+
}
|
|
455
|
+
interface OrganizationSwitcherProps extends Omit<ComponentProps<typeof Button>, "trigger"> {
|
|
456
|
+
classNames?: OrganizationSwitcherClassNames;
|
|
457
|
+
align?: "center" | "start" | "end";
|
|
458
|
+
alignOffset?: number;
|
|
459
|
+
side?: "top" | "right" | "bottom" | "left";
|
|
460
|
+
sideOffset?: number;
|
|
461
|
+
trigger?: ReactNode;
|
|
462
|
+
localization?: AuthLocalization;
|
|
463
|
+
slug?: string;
|
|
464
|
+
onSetActive?: (organization: Organization | null) => void;
|
|
465
|
+
/**
|
|
466
|
+
* Hide the personal organization option from the switcher.
|
|
467
|
+
* When true, users can only switch between organizations and cannot access their personal account.
|
|
468
|
+
* If no organization is active, the first available organization will be automatically selected.
|
|
469
|
+
* @default false
|
|
470
|
+
*/
|
|
471
|
+
hidePersonal?: boolean;
|
|
472
|
+
}
|
|
473
|
+
/**
|
|
474
|
+
* Displays an interactive user button with dropdown menu functionality
|
|
475
|
+
*
|
|
476
|
+
* Renders a user interface element that can be displayed as either an icon or full button:
|
|
477
|
+
* - Shows a user avatar or placeholder when in icon mode
|
|
478
|
+
* - Displays user name and email with dropdown indicator in full mode
|
|
479
|
+
* - Provides dropdown menu with authentication options (sign in/out, settings, etc.)
|
|
480
|
+
* - Supports multi-session functionality for switching between accounts
|
|
481
|
+
* - Can be customized with additional links and styling options
|
|
482
|
+
*/
|
|
483
|
+
declare function OrganizationSwitcher({ className, classNames, align, alignOffset, side, sideOffset, trigger, localization: localizationProp, slug: slugProp, size, onSetActive, hidePersonal, ...props }: OrganizationSwitcherProps): react_jsx_runtime.JSX.Element;
|
|
484
|
+
|
|
485
|
+
type OrganizationViewPageProps = Omit<AccountViewProps, "view"> & {
|
|
486
|
+
slug?: string;
|
|
487
|
+
view?: OrganizationViewPath;
|
|
488
|
+
};
|
|
489
|
+
declare function OrganizationView({ className, classNames, localization: localizationProp, path: pathProp, pathname, view: viewProp, hideNav, slug: slugProp }: OrganizationViewPageProps): react_jsx_runtime.JSX.Element;
|
|
490
|
+
|
|
491
|
+
declare function OrganizationsCard({ className, classNames, localization, ...props }: SettingsCardProps): react_jsx_runtime.JSX.Element;
|
|
492
|
+
|
|
493
|
+
declare function UserInvitationsCard({ className, classNames, localization: localizationProp, ...props }: SettingsCardProps): react_jsx_runtime.JSX.Element | null;
|
|
494
|
+
|
|
495
|
+
declare function Input({ className, type, ...props }: React.ComponentProps<"input">): react_jsx_runtime.JSX.Element;
|
|
496
|
+
|
|
497
|
+
declare function PasswordInput({ className, enableToggle, onChange, ...props }: ComponentProps<typeof Input> & {
|
|
498
|
+
enableToggle?: boolean;
|
|
499
|
+
}): react_jsx_runtime.JSX.Element;
|
|
500
|
+
|
|
501
|
+
/**
|
|
502
|
+
* Redirects the user to the sign-in page
|
|
503
|
+
*
|
|
504
|
+
* Renders nothing and automatically redirects the current user to the authentication
|
|
505
|
+
* sign-in page. Useful for protecting routes that require authentication or
|
|
506
|
+
* redirecting users to sign in from various parts of the application.
|
|
507
|
+
*/
|
|
508
|
+
declare function RedirectToSignIn(): ReactNode;
|
|
509
|
+
|
|
510
|
+
/**
|
|
511
|
+
* Redirects the user to the sign-up page
|
|
512
|
+
*
|
|
513
|
+
* Renders nothing and automatically redirects the current user to the authentication
|
|
514
|
+
* sign-up page. Useful for directing new users to create an account or
|
|
515
|
+
* for redirecting from marketing pages to the registration flow.
|
|
516
|
+
*/
|
|
517
|
+
declare function RedirectToSignUp(): ReactNode;
|
|
518
|
+
|
|
519
|
+
interface AccountsCardProps {
|
|
520
|
+
className?: string;
|
|
521
|
+
classNames?: SettingsCardClassNames;
|
|
522
|
+
localization?: Partial<AuthLocalization>;
|
|
523
|
+
}
|
|
524
|
+
declare function AccountsCard({ className, classNames, localization }: AccountsCardProps): react_jsx_runtime.JSX.Element;
|
|
525
|
+
|
|
526
|
+
interface DeleteAccountCardProps {
|
|
527
|
+
className?: string;
|
|
528
|
+
classNames?: SettingsCardClassNames;
|
|
529
|
+
accounts?: Account[] | null;
|
|
530
|
+
isPending?: boolean;
|
|
531
|
+
localization?: AuthLocalization;
|
|
532
|
+
skipHook?: boolean;
|
|
533
|
+
}
|
|
534
|
+
declare function DeleteAccountCard({ className, classNames, accounts, isPending, localization, skipHook }: DeleteAccountCardProps): react_jsx_runtime.JSX.Element;
|
|
535
|
+
|
|
536
|
+
interface UpdateAvatarCardProps extends ComponentProps<typeof Card> {
|
|
537
|
+
className?: string;
|
|
538
|
+
classNames?: SettingsCardClassNames;
|
|
539
|
+
localization?: AuthLocalization;
|
|
540
|
+
}
|
|
541
|
+
declare function UpdateAvatarCard({ className, classNames, localization, ...props }: UpdateAvatarCardProps): react_jsx_runtime.JSX.Element;
|
|
542
|
+
|
|
543
|
+
interface UpdateFieldCardProps {
|
|
544
|
+
className?: string;
|
|
545
|
+
classNames?: SettingsCardClassNames;
|
|
546
|
+
description?: ReactNode;
|
|
547
|
+
instructions?: ReactNode;
|
|
548
|
+
localization?: Partial<AuthLocalization>;
|
|
549
|
+
name: string;
|
|
550
|
+
placeholder?: string;
|
|
551
|
+
required?: boolean;
|
|
552
|
+
label?: ReactNode;
|
|
553
|
+
type?: FieldType;
|
|
554
|
+
multiline?: boolean;
|
|
555
|
+
value?: unknown;
|
|
556
|
+
validate?: (value: string) => boolean | Promise<boolean>;
|
|
557
|
+
}
|
|
558
|
+
declare function UpdateFieldCard({ className, classNames, description, instructions, localization: localizationProp, name, placeholder, required, label, type, multiline, value, validate }: UpdateFieldCardProps): react_jsx_runtime.JSX.Element;
|
|
559
|
+
|
|
560
|
+
declare function UpdateNameCard({ className, classNames, localization, ...props }: SettingsCardProps): react_jsx_runtime.JSX.Element;
|
|
561
|
+
|
|
562
|
+
declare function UpdateUsernameCard({ className, classNames, localization, ...props }: SettingsCardProps): react_jsx_runtime.JSX.Element;
|
|
563
|
+
|
|
564
|
+
declare function AccountSettingsCards({ className, classNames, localization }: {
|
|
565
|
+
className?: string;
|
|
566
|
+
classNames?: {
|
|
567
|
+
card?: SettingsCardClassNames;
|
|
568
|
+
cards?: string;
|
|
569
|
+
};
|
|
570
|
+
localization?: Partial<AuthLocalization>;
|
|
571
|
+
}): react_jsx_runtime.JSX.Element;
|
|
572
|
+
|
|
573
|
+
interface ApiKeysCardProps extends SettingsCardProps {
|
|
574
|
+
organizationId?: string;
|
|
575
|
+
}
|
|
576
|
+
declare function ApiKeysCard({ className, classNames, localization, organizationId, ...props }: ApiKeysCardProps): react_jsx_runtime.JSX.Element;
|
|
577
|
+
|
|
578
|
+
interface PasskeysCardProps {
|
|
579
|
+
className?: string;
|
|
580
|
+
classNames?: SettingsCardClassNames;
|
|
581
|
+
localization?: AuthLocalization;
|
|
582
|
+
}
|
|
583
|
+
declare function PasskeysCard({ className, classNames, localization }: PasskeysCardProps): react_jsx_runtime.JSX.Element;
|
|
584
|
+
|
|
585
|
+
interface ProvidersCardProps {
|
|
586
|
+
className?: string;
|
|
587
|
+
classNames?: SettingsCardClassNames;
|
|
588
|
+
accounts?: Account[] | null;
|
|
589
|
+
isPending?: boolean;
|
|
590
|
+
localization?: Partial<AuthLocalization>;
|
|
591
|
+
skipHook?: boolean;
|
|
592
|
+
refetch?: Refetch;
|
|
593
|
+
}
|
|
594
|
+
declare function ProvidersCard({ className, classNames, accounts, isPending, localization, skipHook, refetch }: ProvidersCardProps): react_jsx_runtime.JSX.Element;
|
|
595
|
+
|
|
596
|
+
declare function ChangeEmailCard({ className, classNames, localization, ...props }: SettingsCardProps): react_jsx_runtime.JSX.Element;
|
|
597
|
+
|
|
598
|
+
interface ChangePasswordCardProps {
|
|
599
|
+
className?: string;
|
|
600
|
+
classNames?: SettingsCardClassNames;
|
|
601
|
+
accounts?: {
|
|
602
|
+
providerId: string;
|
|
603
|
+
}[] | null;
|
|
604
|
+
isPending?: boolean;
|
|
605
|
+
localization?: AuthLocalization;
|
|
606
|
+
skipHook?: boolean;
|
|
607
|
+
passwordValidation?: PasswordValidation;
|
|
608
|
+
}
|
|
609
|
+
declare function ChangePasswordCard({ className, classNames, accounts, isPending, localization, skipHook, passwordValidation }: ChangePasswordCardProps): react_jsx_runtime.JSX.Element;
|
|
610
|
+
|
|
611
|
+
interface SessionsCardProps {
|
|
612
|
+
className?: string;
|
|
613
|
+
classNames?: SettingsCardClassNames;
|
|
614
|
+
localization?: Partial<AuthLocalization>;
|
|
615
|
+
}
|
|
616
|
+
declare function SessionsCard({ className, classNames, localization }: SessionsCardProps): react_jsx_runtime.JSX.Element;
|
|
617
|
+
|
|
618
|
+
declare function SecuritySettingsCards({ className, classNames, localization }: {
|
|
619
|
+
className?: string;
|
|
620
|
+
classNames?: {
|
|
621
|
+
card?: SettingsCardClassNames;
|
|
622
|
+
cards?: string;
|
|
623
|
+
};
|
|
624
|
+
localization?: Partial<AuthLocalization>;
|
|
625
|
+
}): react_jsx_runtime.JSX.Element;
|
|
626
|
+
|
|
627
|
+
declare function InputFieldSkeleton({ classNames }: {
|
|
628
|
+
classNames?: SettingsCardClassNames;
|
|
629
|
+
}): react_jsx_runtime.JSX.Element;
|
|
630
|
+
|
|
631
|
+
declare function SettingsCellSkeleton({ classNames }: {
|
|
632
|
+
classNames?: SettingsCardClassNames;
|
|
633
|
+
}): react_jsx_runtime.JSX.Element;
|
|
634
|
+
|
|
635
|
+
interface TwoFactorCardProps {
|
|
636
|
+
className?: string;
|
|
637
|
+
classNames?: SettingsCardClassNames;
|
|
638
|
+
localization?: AuthLocalization;
|
|
639
|
+
}
|
|
640
|
+
declare function TwoFactorCard({ className, classNames, localization }: TwoFactorCardProps): react_jsx_runtime.JSX.Element;
|
|
641
|
+
|
|
642
|
+
/**
|
|
643
|
+
* Conditionally renders content for authenticated users only
|
|
644
|
+
*
|
|
645
|
+
* Renders its children only when a user is authenticated with a valid session.
|
|
646
|
+
* If no session exists, nothing is rendered. Useful for displaying protected
|
|
647
|
+
* content or UI elements that should only be visible to signed-in users.
|
|
648
|
+
*/
|
|
649
|
+
declare function SignedIn({ children }: {
|
|
650
|
+
children: ReactNode;
|
|
651
|
+
}): ReactNode;
|
|
652
|
+
|
|
653
|
+
/**
|
|
654
|
+
* Conditionally renders content for unauthenticated users only
|
|
655
|
+
*
|
|
656
|
+
* Renders its children only when no user is authenticated and the authentication
|
|
657
|
+
* state is not pending. If a session exists or is being loaded, nothing is rendered.
|
|
658
|
+
* Useful for displaying sign-in prompts or content exclusive to guests.
|
|
659
|
+
*/
|
|
660
|
+
declare function SignedOut({ children }: {
|
|
661
|
+
children: ReactNode;
|
|
662
|
+
}): ReactNode;
|
|
663
|
+
|
|
664
|
+
interface UserButtonClassNames {
|
|
665
|
+
base?: string;
|
|
666
|
+
skeleton?: string;
|
|
667
|
+
trigger?: {
|
|
668
|
+
base?: string;
|
|
669
|
+
avatar?: UserAvatarClassNames;
|
|
670
|
+
user?: UserViewClassNames;
|
|
671
|
+
skeleton?: string;
|
|
672
|
+
};
|
|
673
|
+
content?: {
|
|
674
|
+
base?: string;
|
|
675
|
+
user?: UserViewClassNames;
|
|
676
|
+
avatar?: UserAvatarClassNames;
|
|
677
|
+
menuItem?: string;
|
|
678
|
+
separator?: string;
|
|
679
|
+
};
|
|
680
|
+
}
|
|
681
|
+
interface UserButtonProps {
|
|
682
|
+
className?: string;
|
|
683
|
+
classNames?: UserButtonClassNames;
|
|
684
|
+
align?: "center" | "start" | "end";
|
|
685
|
+
alignOffset?: number;
|
|
686
|
+
side?: "top" | "right" | "bottom" | "left";
|
|
687
|
+
sideOffset?: number;
|
|
688
|
+
additionalLinks?: {
|
|
689
|
+
href: string;
|
|
690
|
+
icon?: ReactNode;
|
|
691
|
+
label: ReactNode;
|
|
692
|
+
signedIn?: boolean;
|
|
693
|
+
separator?: boolean;
|
|
694
|
+
}[];
|
|
695
|
+
trigger?: ReactNode;
|
|
696
|
+
disableDefaultLinks?: boolean;
|
|
697
|
+
/**
|
|
698
|
+
* @default authLocalization
|
|
699
|
+
* @remarks `AuthLocalization`
|
|
700
|
+
*/
|
|
701
|
+
localization?: AuthLocalization;
|
|
702
|
+
}
|
|
703
|
+
/**
|
|
704
|
+
* Displays an interactive user button with dropdown menu functionality
|
|
705
|
+
*
|
|
706
|
+
* Renders a user interface element that can be displayed as either an icon or full button:
|
|
707
|
+
* - Shows a user avatar or placeholder when in icon mode
|
|
708
|
+
* - Displays user name and email with dropdown indicator in full mode
|
|
709
|
+
* - Provides dropdown menu with authentication options (sign in/out, settings, etc.)
|
|
710
|
+
* - Supports multi-session functionality for switching between accounts
|
|
711
|
+
* - Can be customized with additional links and styling options
|
|
712
|
+
*/
|
|
713
|
+
declare function UserButton({ className, classNames, align, alignOffset, side, sideOffset, trigger, additionalLinks, disableDefaultLinks, localization: propLocalization, size, ...props }: UserButtonProps & ComponentProps<typeof Button>): react_jsx_runtime.JSX.Element;
|
|
714
|
+
|
|
715
|
+
type FetchError = {
|
|
716
|
+
code?: string | undefined;
|
|
717
|
+
message?: string | undefined;
|
|
718
|
+
status?: number;
|
|
719
|
+
statusText?: string;
|
|
720
|
+
};
|
|
721
|
+
|
|
722
|
+
declare function useAuthData<T>({ queryFn, cacheKey, staleTime }: {
|
|
723
|
+
queryFn: () => Promise<{
|
|
724
|
+
data: T | null;
|
|
725
|
+
error?: FetchError | null;
|
|
726
|
+
}>;
|
|
727
|
+
cacheKey?: string;
|
|
728
|
+
staleTime?: number;
|
|
729
|
+
}): {
|
|
730
|
+
data: NonNullable<T> | null;
|
|
731
|
+
isPending: boolean;
|
|
732
|
+
isRefetching: boolean;
|
|
733
|
+
error: FetchError | null;
|
|
734
|
+
refetch: () => Promise<void>;
|
|
735
|
+
};
|
|
736
|
+
|
|
737
|
+
interface AuthenticateOptions<TAuthClient extends AnyAuthClient> {
|
|
738
|
+
authClient?: TAuthClient;
|
|
739
|
+
authView?: AuthViewPath;
|
|
740
|
+
enabled?: boolean;
|
|
741
|
+
}
|
|
742
|
+
declare function useAuthenticate<TAuthClient extends AnyAuthClient>(options?: AuthenticateOptions<TAuthClient>): {
|
|
743
|
+
data: {
|
|
744
|
+
session: TAuthClient["$Infer"]["Session"]["session"];
|
|
745
|
+
user: TAuthClient["$Infer"]["Session"]["user"];
|
|
746
|
+
} | null | undefined;
|
|
747
|
+
user: TAuthClient["$Infer"]["Session"]["user"] | undefined;
|
|
748
|
+
isPending: boolean;
|
|
749
|
+
error: _better_fetch_fetch.BetterFetchError | null;
|
|
750
|
+
refetch: (queryParams?: {
|
|
751
|
+
query?: better_auth.SessionQueryParams;
|
|
752
|
+
}) => void;
|
|
753
|
+
};
|
|
754
|
+
|
|
755
|
+
declare function useCurrentOrganization({ slug: slugProp }?: {
|
|
756
|
+
slug?: string;
|
|
757
|
+
}): {
|
|
758
|
+
data: {
|
|
759
|
+
id: string;
|
|
760
|
+
name: string;
|
|
761
|
+
slug: string;
|
|
762
|
+
createdAt: Date;
|
|
763
|
+
logo?: string | null | undefined;
|
|
764
|
+
metadata?: any;
|
|
765
|
+
} | null | undefined;
|
|
766
|
+
isPending: boolean | undefined;
|
|
767
|
+
isRefetching: boolean | undefined;
|
|
768
|
+
refetch: (() => void) | undefined;
|
|
769
|
+
};
|
|
770
|
+
|
|
771
|
+
export { AcceptInvitationCard, type AcceptInvitationCardProps, AccountSettingsCards, AccountView, AccountViewPath, type AccountViewProps, AccountsCard, type AccountsCardProps, ApiKeysCard, type ApiKeysCardProps, AuthCallback, AuthForm, type AuthFormClassNames, type AuthFormProps, AuthLoading, AuthLocalization, AuthView, type AuthViewClassNames, AuthViewPath, AuthViewPaths, type AuthViewProps, ChangeEmailCard, ChangePasswordCard, type ChangePasswordCardProps, CreateOrganizationDialog, type CreateOrganizationDialogProps, DeleteAccountCard, type DeleteAccountCardProps, DeleteOrganizationCard, ForgotPasswordForm, type ForgotPasswordFormProps, InputFieldSkeleton, MagicLinkForm, type MagicLinkFormProps, OrganizationCellView, OrganizationInvitationsCard, OrganizationLogo, OrganizationLogoCard, type OrganizationLogoCardProps, type OrganizationLogoClassNames, type OrganizationLogoProps, OrganizationMembersCard, OrganizationNameCard, type OrganizationNameCardProps, OrganizationSettingsCards, type OrganizationSettingsCardsProps, OrganizationSlugCard, type OrganizationSlugCardProps, OrganizationSwitcher, type OrganizationSwitcherClassNames, type OrganizationSwitcherProps, OrganizationView, type OrganizationViewClassNames, type OrganizationViewPageProps, OrganizationViewPath, type OrganizationViewProps, OrganizationsCard, PasskeysCard, type PasskeysCardProps, PasswordInput, ProvidersCard, type ProvidersCardProps, RecoverAccountForm, type RecoverAccountFormProps, RedirectToSignIn, RedirectToSignUp, ResetPasswordForm, type ResetPasswordFormProps, SecuritySettingsCards, SessionsCard, type SessionsCardProps, SettingsCard, type SettingsCardClassNames, type SettingsCardProps, SettingsCellSkeleton, SignInForm, type SignInFormProps, SignOut, SignUpForm, type SignUpFormProps, SignedIn, SignedOut, TwoFactorCard, type TwoFactorCardProps, TwoFactorForm, type TwoFactorFormProps, UpdateAvatarCard, type UpdateAvatarCardProps, UpdateFieldCard, type UpdateFieldCardProps, UpdateNameCard, UpdateUsernameCard, UserAvatar, type UserAvatarClassNames, type UserAvatarProps, UserButton, type UserButtonClassNames, type UserButtonProps, UserInvitationsCard, UserView, type UserViewClassNames, type UserViewProps, useAuthData, useAuthenticate, useCurrentOrganization };
|