better-auth-ui 3.2.6 → 3.2.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +30 -3
- package/dist/index.cjs +653 -661
- package/dist/index.d.cts +19 -15
- package/dist/index.d.ts +19 -15
- package/dist/index.js +665 -673
- package/dist/metafile-cjs.json +1 -1
- package/dist/metafile-esm.json +1 -1
- package/package.json +161 -156
- package/src/components/organization/organization-cell-view.tsx +2 -2
- package/src/components/organization/organization-invitations-card.tsx +3 -1
- package/src/components/organization/organization-view.tsx +6 -6
- package/src/components/organization/organizations-card.tsx +3 -1
- package/src/components/organization/user-invitations-card.tsx +3 -1
- package/src/components/ui/alert.tsx +37 -44
- package/src/components/ui/avatar.tsx +39 -44
- package/src/components/ui/button.tsx +28 -30
- package/src/components/ui/card.tsx +66 -82
- package/src/components/ui/checkbox.tsx +20 -24
- package/src/components/ui/dialog.tsx +92 -113
- package/src/components/ui/drawer.tsx +82 -101
- package/src/components/ui/dropdown-menu.tsx +183 -224
- package/src/components/ui/form.tsx +50 -41
- package/src/components/ui/input-otp.tsx +43 -51
- package/src/components/ui/input.tsx +16 -15
- package/src/components/ui/label.tsx +17 -17
- package/src/components/ui/select.tsx +130 -156
- package/src/components/ui/separator.tsx +13 -12
- package/src/components/ui/skeleton.tsx +5 -3
- package/src/components/ui/tabs.tsx +43 -54
- package/src/components/ui/textarea.tsx +8 -4
package/dist/index.d.cts
CHANGED
|
@@ -23,7 +23,7 @@ import 'inspector';
|
|
|
23
23
|
import 'better-auth/client/plugins';
|
|
24
24
|
import 'better-auth/plugins/passkey';
|
|
25
25
|
|
|
26
|
-
declare
|
|
26
|
+
declare const Card: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
27
27
|
|
|
28
28
|
type Profile = {
|
|
29
29
|
id?: string | number;
|
|
@@ -41,7 +41,7 @@ type Profile = {
|
|
|
41
41
|
avatarUrl?: string | null;
|
|
42
42
|
};
|
|
43
43
|
|
|
44
|
-
declare
|
|
44
|
+
declare const Avatar: React.ForwardRefExoticComponent<Omit<AvatarPrimitive.AvatarProps & React.RefAttributes<HTMLSpanElement>, "ref"> & React.RefAttributes<HTMLSpanElement>>;
|
|
45
45
|
|
|
46
46
|
interface UserAvatarClassNames {
|
|
47
47
|
base?: string;
|
|
@@ -295,7 +295,7 @@ interface AcceptInvitationCardProps {
|
|
|
295
295
|
}
|
|
296
296
|
declare function AcceptInvitationCard({ className, classNames, localization: localizationProp }: AcceptInvitationCardProps): react_jsx_runtime.JSX.Element;
|
|
297
297
|
|
|
298
|
-
declare
|
|
298
|
+
declare const Dialog: React.FC<DialogPrimitive.DialogProps>;
|
|
299
299
|
|
|
300
300
|
interface CreateOrganizationDialogProps extends ComponentProps<typeof Dialog> {
|
|
301
301
|
className?: string;
|
|
@@ -343,7 +343,7 @@ interface OrganizationViewClassNames {
|
|
|
343
343
|
subtitle?: string;
|
|
344
344
|
skeleton?: string;
|
|
345
345
|
}
|
|
346
|
-
interface
|
|
346
|
+
interface OrganizationCellViewProps {
|
|
347
347
|
className?: string;
|
|
348
348
|
classNames?: OrganizationViewClassNames;
|
|
349
349
|
isPending?: boolean;
|
|
@@ -355,11 +355,12 @@ interface OrganizationViewProps {
|
|
|
355
355
|
*/
|
|
356
356
|
localization?: AuthLocalization;
|
|
357
357
|
}
|
|
358
|
-
declare function OrganizationCellView({ className, classNames, isPending, size, organization, localization: propLocalization }:
|
|
358
|
+
declare function OrganizationCellView({ className, classNames, isPending, size, organization, localization: propLocalization }: OrganizationCellViewProps): react_jsx_runtime.JSX.Element;
|
|
359
359
|
|
|
360
|
-
|
|
360
|
+
type OrganizationInvitationsCardProps = SettingsCardProps & {
|
|
361
361
|
slug?: string;
|
|
362
|
-
}
|
|
362
|
+
};
|
|
363
|
+
declare function OrganizationInvitationsCard({ className, classNames, localization: localizationProp, slug: slugProp, ...props }: OrganizationInvitationsCardProps): react_jsx_runtime.JSX.Element | null;
|
|
363
364
|
|
|
364
365
|
interface OrganizationLogoCardProps extends ComponentProps<typeof Card> {
|
|
365
366
|
className?: string;
|
|
@@ -398,9 +399,10 @@ declare const buttonVariants: (props?: ({
|
|
|
398
399
|
variant?: "link" | "default" | "destructive" | "outline" | "secondary" | "ghost" | null | undefined;
|
|
399
400
|
size?: "default" | "icon" | "sm" | "lg" | null | undefined;
|
|
400
401
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
401
|
-
|
|
402
|
+
interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
|
|
402
403
|
asChild?: boolean;
|
|
403
|
-
}
|
|
404
|
+
}
|
|
405
|
+
declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
404
406
|
|
|
405
407
|
interface UserViewClassNames {
|
|
406
408
|
base?: string;
|
|
@@ -482,17 +484,19 @@ interface OrganizationSwitcherProps extends Omit<ComponentProps<typeof Button>,
|
|
|
482
484
|
*/
|
|
483
485
|
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
486
|
|
|
485
|
-
type
|
|
487
|
+
type OrganizationViewProps = Omit<AccountViewProps, "view"> & {
|
|
486
488
|
slug?: string;
|
|
487
489
|
view?: OrganizationViewPath;
|
|
488
490
|
};
|
|
489
|
-
declare function OrganizationView({ className, classNames, localization: localizationProp, path: pathProp, pathname, view: viewProp, hideNav, slug: slugProp }:
|
|
491
|
+
declare function OrganizationView({ className, classNames, localization: localizationProp, path: pathProp, pathname, view: viewProp, hideNav, slug: slugProp }: OrganizationViewProps): react_jsx_runtime.JSX.Element;
|
|
490
492
|
|
|
491
|
-
|
|
493
|
+
type OrganizationsCardProps = SettingsCardProps;
|
|
494
|
+
declare function OrganizationsCard({ className, classNames, localization, ...props }: OrganizationsCardProps): react_jsx_runtime.JSX.Element;
|
|
492
495
|
|
|
493
|
-
|
|
496
|
+
type UserInvitationsCardProps = SettingsCardProps;
|
|
497
|
+
declare function UserInvitationsCard({ className, classNames, localization: localizationProp, ...props }: UserInvitationsCardProps): react_jsx_runtime.JSX.Element | null;
|
|
494
498
|
|
|
495
|
-
declare
|
|
499
|
+
declare const Input: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref"> & React.RefAttributes<HTMLInputElement>>;
|
|
496
500
|
|
|
497
501
|
declare function PasswordInput({ className, enableToggle, onChange, ...props }: ComponentProps<typeof Input> & {
|
|
498
502
|
enableToggle?: boolean;
|
|
@@ -768,4 +772,4 @@ declare function useCurrentOrganization({ slug: slugProp }?: {
|
|
|
768
772
|
refetch: (() => void) | undefined;
|
|
769
773
|
};
|
|
770
774
|
|
|
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,
|
|
775
|
+
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, type OrganizationCellViewProps, OrganizationInvitationsCard, type OrganizationInvitationsCardProps, 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, OrganizationViewPath, type OrganizationViewProps, OrganizationsCard, type OrganizationsCardProps, 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, type UserInvitationsCardProps, UserView, type UserViewClassNames, type UserViewProps, useAuthData, useAuthenticate, useCurrentOrganization };
|
package/dist/index.d.ts
CHANGED
|
@@ -23,7 +23,7 @@ import 'inspector';
|
|
|
23
23
|
import 'better-auth/client/plugins';
|
|
24
24
|
import 'better-auth/plugins/passkey';
|
|
25
25
|
|
|
26
|
-
declare
|
|
26
|
+
declare const Card: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
27
27
|
|
|
28
28
|
type Profile = {
|
|
29
29
|
id?: string | number;
|
|
@@ -41,7 +41,7 @@ type Profile = {
|
|
|
41
41
|
avatarUrl?: string | null;
|
|
42
42
|
};
|
|
43
43
|
|
|
44
|
-
declare
|
|
44
|
+
declare const Avatar: React.ForwardRefExoticComponent<Omit<AvatarPrimitive.AvatarProps & React.RefAttributes<HTMLSpanElement>, "ref"> & React.RefAttributes<HTMLSpanElement>>;
|
|
45
45
|
|
|
46
46
|
interface UserAvatarClassNames {
|
|
47
47
|
base?: string;
|
|
@@ -295,7 +295,7 @@ interface AcceptInvitationCardProps {
|
|
|
295
295
|
}
|
|
296
296
|
declare function AcceptInvitationCard({ className, classNames, localization: localizationProp }: AcceptInvitationCardProps): react_jsx_runtime.JSX.Element;
|
|
297
297
|
|
|
298
|
-
declare
|
|
298
|
+
declare const Dialog: React.FC<DialogPrimitive.DialogProps>;
|
|
299
299
|
|
|
300
300
|
interface CreateOrganizationDialogProps extends ComponentProps<typeof Dialog> {
|
|
301
301
|
className?: string;
|
|
@@ -343,7 +343,7 @@ interface OrganizationViewClassNames {
|
|
|
343
343
|
subtitle?: string;
|
|
344
344
|
skeleton?: string;
|
|
345
345
|
}
|
|
346
|
-
interface
|
|
346
|
+
interface OrganizationCellViewProps {
|
|
347
347
|
className?: string;
|
|
348
348
|
classNames?: OrganizationViewClassNames;
|
|
349
349
|
isPending?: boolean;
|
|
@@ -355,11 +355,12 @@ interface OrganizationViewProps {
|
|
|
355
355
|
*/
|
|
356
356
|
localization?: AuthLocalization;
|
|
357
357
|
}
|
|
358
|
-
declare function OrganizationCellView({ className, classNames, isPending, size, organization, localization: propLocalization }:
|
|
358
|
+
declare function OrganizationCellView({ className, classNames, isPending, size, organization, localization: propLocalization }: OrganizationCellViewProps): react_jsx_runtime.JSX.Element;
|
|
359
359
|
|
|
360
|
-
|
|
360
|
+
type OrganizationInvitationsCardProps = SettingsCardProps & {
|
|
361
361
|
slug?: string;
|
|
362
|
-
}
|
|
362
|
+
};
|
|
363
|
+
declare function OrganizationInvitationsCard({ className, classNames, localization: localizationProp, slug: slugProp, ...props }: OrganizationInvitationsCardProps): react_jsx_runtime.JSX.Element | null;
|
|
363
364
|
|
|
364
365
|
interface OrganizationLogoCardProps extends ComponentProps<typeof Card> {
|
|
365
366
|
className?: string;
|
|
@@ -398,9 +399,10 @@ declare const buttonVariants: (props?: ({
|
|
|
398
399
|
variant?: "link" | "default" | "destructive" | "outline" | "secondary" | "ghost" | null | undefined;
|
|
399
400
|
size?: "default" | "icon" | "sm" | "lg" | null | undefined;
|
|
400
401
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
401
|
-
|
|
402
|
+
interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
|
|
402
403
|
asChild?: boolean;
|
|
403
|
-
}
|
|
404
|
+
}
|
|
405
|
+
declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
404
406
|
|
|
405
407
|
interface UserViewClassNames {
|
|
406
408
|
base?: string;
|
|
@@ -482,17 +484,19 @@ interface OrganizationSwitcherProps extends Omit<ComponentProps<typeof Button>,
|
|
|
482
484
|
*/
|
|
483
485
|
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
486
|
|
|
485
|
-
type
|
|
487
|
+
type OrganizationViewProps = Omit<AccountViewProps, "view"> & {
|
|
486
488
|
slug?: string;
|
|
487
489
|
view?: OrganizationViewPath;
|
|
488
490
|
};
|
|
489
|
-
declare function OrganizationView({ className, classNames, localization: localizationProp, path: pathProp, pathname, view: viewProp, hideNav, slug: slugProp }:
|
|
491
|
+
declare function OrganizationView({ className, classNames, localization: localizationProp, path: pathProp, pathname, view: viewProp, hideNav, slug: slugProp }: OrganizationViewProps): react_jsx_runtime.JSX.Element;
|
|
490
492
|
|
|
491
|
-
|
|
493
|
+
type OrganizationsCardProps = SettingsCardProps;
|
|
494
|
+
declare function OrganizationsCard({ className, classNames, localization, ...props }: OrganizationsCardProps): react_jsx_runtime.JSX.Element;
|
|
492
495
|
|
|
493
|
-
|
|
496
|
+
type UserInvitationsCardProps = SettingsCardProps;
|
|
497
|
+
declare function UserInvitationsCard({ className, classNames, localization: localizationProp, ...props }: UserInvitationsCardProps): react_jsx_runtime.JSX.Element | null;
|
|
494
498
|
|
|
495
|
-
declare
|
|
499
|
+
declare const Input: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref"> & React.RefAttributes<HTMLInputElement>>;
|
|
496
500
|
|
|
497
501
|
declare function PasswordInput({ className, enableToggle, onChange, ...props }: ComponentProps<typeof Input> & {
|
|
498
502
|
enableToggle?: boolean;
|
|
@@ -768,4 +772,4 @@ declare function useCurrentOrganization({ slug: slugProp }?: {
|
|
|
768
772
|
refetch: (() => void) | undefined;
|
|
769
773
|
};
|
|
770
774
|
|
|
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,
|
|
775
|
+
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, type OrganizationCellViewProps, OrganizationInvitationsCard, type OrganizationInvitationsCardProps, 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, OrganizationViewPath, type OrganizationViewProps, OrganizationsCard, type OrganizationsCardProps, 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, type UserInvitationsCardProps, UserView, type UserViewClassNames, type UserViewProps, useAuthData, useAuthenticate, useCurrentOrganization };
|