@better-auth-ui/heroui 1.6.8 → 1.6.10
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/dist/components/auth/api-key/api-key.d.ts +5 -1
- package/dist/components/auth/api-key/api-keys-empty.d.ts +3 -1
- package/dist/components/auth/api-key/api-keys.d.ts +9 -1
- package/dist/components/auth/api-key/create-api-key-dialog.d.ts +3 -1
- package/dist/components/auth/api-key/delete-api-key-dialog.d.ts +3 -1
- package/dist/components/auth/api-key/organization-api-keys.d.ts +14 -0
- package/dist/components/auth/delete-user/danger-zone.d.ts +1 -1
- package/dist/components/auth/delete-user/{delete-user.d.ts → delete-account.d.ts} +2 -2
- package/dist/components/auth/email/organization-invitation-email.d.ts +3 -0
- package/dist/components/auth/multi-session/switch-account-submenu-content.d.ts +3 -1
- package/dist/components/auth/multi-session/switch-account-submenu-item.d.ts +2 -1
- package/dist/components/auth/multi-session/switch-account-submenu.d.ts +2 -1
- package/dist/components/auth/organization/change-organization-logo.d.ts +4 -0
- package/dist/components/auth/organization/create-organization-dialog.d.ts +13 -0
- package/dist/components/auth/organization/delete-organization-dialog.d.ts +7 -0
- package/dist/components/auth/organization/delete-organization-skeleton.d.ts +4 -0
- package/dist/components/auth/organization/delete-organization.d.ts +5 -0
- package/dist/components/auth/organization/invite-member-dialog.d.ts +13 -0
- package/dist/components/auth/organization/leave-organization-dialog.d.ts +7 -0
- package/dist/components/auth/organization/leave-organization.d.ts +4 -0
- package/dist/components/auth/organization/organization-danger-zone.d.ts +16 -0
- package/dist/components/auth/organization/organization-invitation-row-skeleton.d.ts +5 -0
- package/dist/components/auth/organization/organization-invitation-row.d.ts +5 -0
- package/dist/components/auth/organization/organization-invitations-empty.d.ts +8 -0
- package/dist/components/auth/organization/organization-invitations.d.ts +9 -0
- package/dist/components/auth/organization/organization-logo.d.ts +15 -0
- package/dist/components/auth/organization/organization-member-row-skeleton.d.ts +4 -0
- package/dist/components/auth/organization/organization-member-row.d.ts +9 -0
- package/dist/components/auth/organization/organization-members.d.ts +9 -0
- package/dist/components/auth/organization/organization-people.d.ts +10 -0
- package/dist/components/auth/organization/organization-profile.d.ts +9 -0
- package/dist/components/auth/organization/organization-row.d.ts +8 -0
- package/dist/components/auth/organization/organization-settings.d.ts +12 -0
- package/dist/components/auth/organization/organization-switcher.d.ts +20 -0
- package/dist/components/auth/organization/organization-view-skeleton.d.ts +6 -0
- package/dist/components/auth/organization/organization-view.d.ts +15 -0
- package/dist/components/auth/organization/organization.d.ts +17 -0
- package/dist/components/auth/organization/organizations-empty.d.ts +4 -0
- package/dist/components/auth/organization/organizations-settings.d.ts +17 -0
- package/dist/components/auth/organization/organizations.d.ts +10 -0
- package/dist/components/auth/organization/remove-member-dialog.d.ts +9 -0
- package/dist/components/auth/organization/slug-field.d.ts +19 -0
- package/dist/components/auth/organization/user-invitation-row-skeleton.d.ts +4 -0
- package/dist/components/auth/organization/user-invitation-row.d.ts +10 -0
- package/dist/components/auth/organization/user-invitations-empty.d.ts +4 -0
- package/dist/components/auth/organization/user-invitations.d.ts +10 -0
- package/dist/components/auth/settings/settings.d.ts +1 -1
- package/dist/components/auth/user/user-avatar.d.ts +1 -1
- package/dist/components/auth/user/user-button.d.ts +4 -5
- package/dist/components/auth/user/user-view.d.ts +10 -4
- package/dist/email.d.ts +1 -0
- package/dist/email.js +211 -8
- package/dist/index.js +1682 -22
- package/dist/lib/auth/api-key-plugin.d.ts +5 -2
- package/dist/lib/auth/auth-plugin.d.ts +6 -2
- package/dist/lib/auth/delete-user-plugin.d.ts +4 -4
- package/dist/lib/auth/magic-link-plugin.d.ts +2 -2
- package/dist/lib/auth/multi-session-plugin.d.ts +2 -2
- package/dist/lib/auth/organization-plugin.d.ts +37 -0
- package/dist/lib/auth/passkey-plugin.d.ts +2 -2
- package/dist/lib/auth/theme-plugin.d.ts +3 -3
- package/dist/lib/auth/username-plugin.d.ts +8 -8
- package/dist/plugins.d.ts +25 -1
- package/dist/plugins.js +2824 -22
- package/dist/user-view--47tVtJ3.js +113 -0
- package/package.json +23 -18
- package/src/components/auth/api-key/api-key.tsx +25 -16
- package/src/components/auth/api-key/api-keys-empty.tsx +8 -4
- package/src/components/auth/api-key/api-keys.tsx +52 -14
- package/src/components/auth/api-key/create-api-key-dialog.tsx +15 -2
- package/src/components/auth/api-key/delete-api-key-dialog.tsx +10 -2
- package/src/components/auth/api-key/organization-api-keys.tsx +55 -0
- package/src/components/auth/delete-user/danger-zone.tsx +3 -3
- package/src/components/auth/delete-user/{delete-user.tsx → delete-account.tsx} +9 -9
- package/src/components/auth/email/organization-invitation-email.tsx +38 -0
- package/src/components/auth/error-toaster.tsx +28 -10
- package/src/components/auth/forgot-password.tsx +10 -2
- package/src/components/auth/multi-session/manage-accounts.tsx +1 -1
- package/src/components/auth/multi-session/switch-account-submenu-content.tsx +7 -2
- package/src/components/auth/multi-session/switch-account-submenu-item.tsx +4 -2
- package/src/components/auth/multi-session/switch-account-submenu.tsx +8 -4
- package/src/components/auth/organization/change-organization-logo.tsx +171 -0
- package/src/components/auth/organization/create-organization-dialog.tsx +133 -0
- package/src/components/auth/organization/delete-organization-dialog.tsx +97 -0
- package/src/components/auth/organization/delete-organization-skeleton.tsx +17 -0
- package/src/components/auth/organization/delete-organization.tsx +77 -0
- package/src/components/auth/organization/invite-member-dialog.tsx +177 -0
- package/src/components/auth/organization/leave-organization-dialog.tsx +95 -0
- package/src/components/auth/organization/leave-organization.tsx +59 -0
- package/src/components/auth/organization/organization-danger-zone.tsx +68 -0
- package/src/components/auth/organization/organization-invitation-row-skeleton.tsx +29 -0
- package/src/components/auth/organization/organization-invitation-row.tsx +97 -0
- package/src/components/auth/organization/organization-invitations-empty.tsx +39 -0
- package/src/components/auth/organization/organization-invitations.tsx +351 -0
- package/src/components/auth/organization/organization-logo.tsx +64 -0
- package/src/components/auth/organization/organization-member-row-skeleton.tsx +24 -0
- package/src/components/auth/organization/organization-member-row.tsx +157 -0
- package/src/components/auth/organization/organization-members.tsx +284 -0
- package/src/components/auth/organization/organization-people.tsx +26 -0
- package/src/components/auth/organization/organization-profile.tsx +141 -0
- package/src/components/auth/organization/organization-row.tsx +66 -0
- package/src/components/auth/organization/organization-settings.tsx +38 -0
- package/src/components/auth/organization/organization-switcher.tsx +233 -0
- package/src/components/auth/organization/organization-view-skeleton.tsx +36 -0
- package/src/components/auth/organization/organization-view.tsx +109 -0
- package/src/components/auth/organization/organization.tsx +162 -0
- package/src/components/auth/organization/organizations-empty.tsx +35 -0
- package/src/components/auth/organization/organizations-settings.tsx +36 -0
- package/src/components/auth/organization/organizations.tsx +80 -0
- package/src/components/auth/organization/remove-member-dialog.tsx +95 -0
- package/src/components/auth/organization/slug-field.tsx +111 -0
- package/src/components/auth/organization/user-invitation-row-skeleton.tsx +17 -0
- package/src/components/auth/organization/user-invitation-row.tsx +90 -0
- package/src/components/auth/organization/user-invitations-empty.tsx +30 -0
- package/src/components/auth/organization/user-invitations.tsx +59 -0
- package/src/components/auth/settings/account/change-email.tsx +1 -1
- package/src/components/auth/settings/account/user-profile.tsx +5 -5
- package/src/components/auth/settings/security/active-sessions.tsx +6 -4
- package/src/components/auth/settings/security/linked-accounts.tsx +2 -2
- package/src/components/auth/settings/settings.tsx +77 -14
- package/src/components/auth/user/user-avatar.tsx +4 -1
- package/src/components/auth/user/user-button.tsx +14 -11
- package/src/components/auth/user/user-view.tsx +32 -12
- package/src/email.ts +1 -0
- package/src/lib/auth/api-key-plugin.ts +10 -4
- package/src/lib/auth/auth-plugin.ts +6 -1
- package/src/lib/auth/organization-plugin.tsx +32 -0
- package/src/plugins.ts +25 -1
- package/dist/components/auth/additional-field.js +0 -270
- package/dist/components/auth/api-key/api-key-skeleton.js +0 -21
- package/dist/components/auth/api-key/api-key.js +0 -55
- package/dist/components/auth/api-key/api-keys-empty.js +0 -35
- package/dist/components/auth/api-key/api-keys.js +0 -41
- package/dist/components/auth/api-key/create-api-key-dialog.js +0 -74
- package/dist/components/auth/api-key/delete-api-key-dialog.js +0 -51
- package/dist/components/auth/api-key/new-api-key-dialog.js +0 -60
- package/dist/components/auth/auth-provider.js +0 -17
- package/dist/components/auth/auth.js +0 -63
- package/dist/components/auth/delete-user/danger-zone.js +0 -18
- package/dist/components/auth/delete-user/delete-user.js +0 -95
- package/dist/components/auth/email/email-changed-email.js +0 -30
- package/dist/components/auth/email/email-verification-email.js +0 -30
- package/dist/components/auth/email/magic-link-email.js +0 -30
- package/dist/components/auth/email/new-device-email.js +0 -30
- package/dist/components/auth/email/otp-email.js +0 -29
- package/dist/components/auth/email/password-changed-email.js +0 -30
- package/dist/components/auth/email/reset-password-email.js +0 -30
- package/dist/components/auth/error-toaster.js +0 -17
- package/dist/components/auth/field-separator.js +0 -18
- package/dist/components/auth/forgot-password.js +0 -89
- package/dist/components/auth/magic-link/magic-link-button.js +0 -20
- package/dist/components/auth/magic-link/magic-link.js +0 -87
- package/dist/components/auth/multi-session/manage-account.js +0 -49
- package/dist/components/auth/multi-session/manage-accounts.js +0 -34
- package/dist/components/auth/multi-session/switch-account-submenu-content.js +0 -28
- package/dist/components/auth/multi-session/switch-account-submenu-item.js +0 -20
- package/dist/components/auth/multi-session/switch-account-submenu.js +0 -24
- package/dist/components/auth/passkey/add-passkey-dialog.js +0 -65
- package/dist/components/auth/passkey/delete-passkey-dialog.js +0 -47
- package/dist/components/auth/passkey/passkey-button.js +0 -24
- package/dist/components/auth/passkey/passkey-skeleton.js +0 -17
- package/dist/components/auth/passkey/passkey.js +0 -48
- package/dist/components/auth/passkey/passkeys-empty.js +0 -35
- package/dist/components/auth/passkey/passkeys.js +0 -42
- package/dist/components/auth/provider-button.js +0 -25
- package/dist/components/auth/provider-buttons.js +0 -19
- package/dist/components/auth/reset-password.js +0 -147
- package/dist/components/auth/settings/account/account-settings.js +0 -20
- package/dist/components/auth/settings/account/change-avatar.js +0 -89
- package/dist/components/auth/settings/account/change-email.js +0 -54
- package/dist/components/auth/settings/account/user-profile.js +0 -86
- package/dist/components/auth/settings/security/active-session.js +0 -59
- package/dist/components/auth/settings/security/active-sessions.js +0 -34
- package/dist/components/auth/settings/security/change-password.js +0 -189
- package/dist/components/auth/settings/security/linked-account.js +0 -56
- package/dist/components/auth/settings/security/linked-accounts.js +0 -45
- package/dist/components/auth/settings/security/security-settings.js +0 -22
- package/dist/components/auth/settings/settings.js +0 -45
- package/dist/components/auth/sign-in.js +0 -133
- package/dist/components/auth/sign-out.js +0 -27
- package/dist/components/auth/sign-up.js +0 -212
- package/dist/components/auth/theme/appearance.js +0 -72
- package/dist/components/auth/theme/theme-toggle-item.js +0 -62
- package/dist/components/auth/user/user-avatar.js +0 -29
- package/dist/components/auth/user/user-button.js +0 -74
- package/dist/components/auth/user/user-view.js +0 -37
- package/dist/components/auth/username/sign-in-username.js +0 -148
- package/dist/components/auth/username/username-field.js +0 -53
- package/dist/lib/auth/api-key-plugin.js +0 -10
- package/dist/lib/auth/delete-user-plugin.js +0 -10
- package/dist/lib/auth/magic-link-plugin.js +0 -13
- package/dist/lib/auth/multi-session-plugin.js +0 -12
- package/dist/lib/auth/passkey-plugin.js +0 -12
- package/dist/lib/auth/theme-plugin.js +0 -23
- package/dist/lib/auth/username-plugin.js +0 -18
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
import { usernamePlugin as e } from "../../../lib/auth/username-plugin.js";
|
|
2
|
-
import { useAuth as t, useAuthPlugin as n, useIsUsernameAvailable as r } from "@better-auth-ui/react";
|
|
3
|
-
import { Check as i, Xmark as a } from "@gravity-ui/icons";
|
|
4
|
-
import { FieldError as o, InputGroup as s, Label as c, Spinner as l, TextField as u } from "@heroui/react";
|
|
5
|
-
import { useState as d } from "react";
|
|
6
|
-
import { jsx as f, jsxs as p } from "react/jsx-runtime";
|
|
7
|
-
import { useDebouncer as m } from "@tanstack/react-pacer";
|
|
8
|
-
//#region src/components/auth/username/username-field.tsx
|
|
9
|
-
function h({ name: h, field: g, isPending: _, variant: v }) {
|
|
10
|
-
let { authClient: y } = t(), { localization: b, minUsernameLength: x, maxUsernameLength: S, isUsernameAvailable: C } = n(e), w = String(g.defaultValue ?? ""), [T, E] = d(w), { mutate: D, data: O, error: k, reset: A } = r(y, { onError: () => {} }), j = m((e) => {
|
|
11
|
-
let t = e.trim();
|
|
12
|
-
if (!t || t === w) {
|
|
13
|
-
A();
|
|
14
|
-
return;
|
|
15
|
-
}
|
|
16
|
-
D({ username: t });
|
|
17
|
-
}, { wait: 500 });
|
|
18
|
-
function M(e) {
|
|
19
|
-
E(e), A(), C && j.maybeExecute(e);
|
|
20
|
-
}
|
|
21
|
-
let N = !!C && !!T.trim() && T.trim() !== w;
|
|
22
|
-
return /* @__PURE__ */ p(u, {
|
|
23
|
-
name: h,
|
|
24
|
-
type: "text",
|
|
25
|
-
autoComplete: "username",
|
|
26
|
-
minLength: x,
|
|
27
|
-
maxLength: S,
|
|
28
|
-
isDisabled: _,
|
|
29
|
-
isReadOnly: g.readOnly,
|
|
30
|
-
value: T,
|
|
31
|
-
onChange: M,
|
|
32
|
-
children: [
|
|
33
|
-
/* @__PURE__ */ f(c, { children: g.label }),
|
|
34
|
-
/* @__PURE__ */ p(s, {
|
|
35
|
-
variant: v === "transparent" ? "primary" : "secondary",
|
|
36
|
-
children: [/* @__PURE__ */ f(s.Input, {
|
|
37
|
-
placeholder: g.placeholder,
|
|
38
|
-
required: g.required
|
|
39
|
-
}), N && /* @__PURE__ */ f(s.Suffix, {
|
|
40
|
-
"aria-label": O?.available ? b.usernameAvailable : O?.available === !1 ? b.usernameTaken : void 0,
|
|
41
|
-
className: "px-2",
|
|
42
|
-
children: O?.available ? /* @__PURE__ */ f(i, { className: "text-success" }) : k || O?.available === !1 ? /* @__PURE__ */ f(a, { className: "text-danger" }) : /* @__PURE__ */ f(l, {
|
|
43
|
-
size: "sm",
|
|
44
|
-
color: "current"
|
|
45
|
-
})
|
|
46
|
-
})]
|
|
47
|
-
}),
|
|
48
|
-
/* @__PURE__ */ f(o, {})
|
|
49
|
-
]
|
|
50
|
-
});
|
|
51
|
-
}
|
|
52
|
-
//#endregion
|
|
53
|
-
export { h as UsernameField };
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { ApiKeys as e } from "../../components/auth/api-key/api-keys.js";
|
|
2
|
-
import { createAuthPlugin as t } from "@better-auth-ui/core";
|
|
3
|
-
import { apiKeyPlugin as n } from "@better-auth-ui/core/plugins";
|
|
4
|
-
//#region src/lib/auth/api-key-plugin.ts
|
|
5
|
-
var r = t(n.id, (t = {}) => ({
|
|
6
|
-
...n(t),
|
|
7
|
-
securityCards: [e]
|
|
8
|
-
}));
|
|
9
|
-
//#endregion
|
|
10
|
-
export { r as apiKeyPlugin };
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { DangerZone as e } from "../../components/auth/delete-user/danger-zone.js";
|
|
2
|
-
import { createAuthPlugin as t } from "@better-auth-ui/core";
|
|
3
|
-
import { deleteUserPlugin as n } from "@better-auth-ui/core/plugins";
|
|
4
|
-
//#region src/lib/auth/delete-user-plugin.ts
|
|
5
|
-
var r = t(n.id, (t = {}) => ({
|
|
6
|
-
...n(t),
|
|
7
|
-
securityCards: [e]
|
|
8
|
-
}));
|
|
9
|
-
//#endregion
|
|
10
|
-
export { r as deleteUserPlugin };
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { MagicLinkButton as e } from "../../components/auth/magic-link/magic-link-button.js";
|
|
2
|
-
import { MagicLink as t } from "../../components/auth/magic-link/magic-link.js";
|
|
3
|
-
import { createAuthPlugin as n } from "@better-auth-ui/core";
|
|
4
|
-
import { magicLinkPlugin as r } from "@better-auth-ui/core/plugins";
|
|
5
|
-
//#region src/lib/auth/magic-link-plugin.ts
|
|
6
|
-
var i = n(r.id, (n = {}) => ({
|
|
7
|
-
...r(n),
|
|
8
|
-
authButtons: [e],
|
|
9
|
-
views: { auth: { magicLink: t } },
|
|
10
|
-
fallbackViews: { auth: { signIn: t } }
|
|
11
|
-
}));
|
|
12
|
-
//#endregion
|
|
13
|
-
export { i as magicLinkPlugin };
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { ManageAccounts as e } from "../../components/auth/multi-session/manage-accounts.js";
|
|
2
|
-
import { SwitchAccountSubmenu as t } from "../../components/auth/multi-session/switch-account-submenu.js";
|
|
3
|
-
import { createAuthPlugin as n } from "@better-auth-ui/core";
|
|
4
|
-
import { multiSessionPlugin as r } from "@better-auth-ui/core/plugins";
|
|
5
|
-
//#region src/lib/auth/multi-session-plugin.ts
|
|
6
|
-
var i = n(r.id, (n = {}) => ({
|
|
7
|
-
...r(n),
|
|
8
|
-
accountCards: [e],
|
|
9
|
-
userMenuItems: [t]
|
|
10
|
-
}));
|
|
11
|
-
//#endregion
|
|
12
|
-
export { i as multiSessionPlugin };
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { PasskeyButton as e } from "../../components/auth/passkey/passkey-button.js";
|
|
2
|
-
import { Passkeys as t } from "../../components/auth/passkey/passkeys.js";
|
|
3
|
-
import { createAuthPlugin as n } from "@better-auth-ui/core";
|
|
4
|
-
import { passkeyPlugin as r } from "@better-auth-ui/core/plugins";
|
|
5
|
-
//#region src/lib/auth/passkey-plugin.ts
|
|
6
|
-
var i = n(r.id, (n = {}) => ({
|
|
7
|
-
...r(n),
|
|
8
|
-
authButtons: [e],
|
|
9
|
-
securityCards: [t]
|
|
10
|
-
}));
|
|
11
|
-
//#endregion
|
|
12
|
-
export { i as passkeyPlugin };
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { ThemeToggleItem as e } from "../../components/auth/theme/theme-toggle-item.js";
|
|
2
|
-
import { Appearance as t } from "../../components/auth/theme/appearance.js";
|
|
3
|
-
import { createAuthPlugin as n } from "@better-auth-ui/core";
|
|
4
|
-
import { themePlugin as r } from "@better-auth-ui/core/plugins";
|
|
5
|
-
//#region src/lib/auth/theme-plugin.ts
|
|
6
|
-
var i = n(r.id, ({ useTheme: n, ...i }) => {
|
|
7
|
-
let a = r({
|
|
8
|
-
setTheme: () => {},
|
|
9
|
-
...i
|
|
10
|
-
});
|
|
11
|
-
return {
|
|
12
|
-
...a,
|
|
13
|
-
useTheme: n ?? (() => ({
|
|
14
|
-
theme: a.theme,
|
|
15
|
-
setTheme: a.setTheme,
|
|
16
|
-
themes: a.themes
|
|
17
|
-
})),
|
|
18
|
-
userMenuItems: [e],
|
|
19
|
-
accountCards: [t]
|
|
20
|
-
};
|
|
21
|
-
});
|
|
22
|
-
//#endregion
|
|
23
|
-
export { i as themePlugin };
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { UsernameField as e } from "../../components/auth/username/username-field.js";
|
|
2
|
-
import { SignInUsername as t } from "../../components/auth/username/sign-in-username.js";
|
|
3
|
-
import { createAuthPlugin as n } from "@better-auth-ui/core";
|
|
4
|
-
import { usernamePlugin as r } from "@better-auth-ui/core/plugins";
|
|
5
|
-
//#region src/lib/auth/username-plugin.tsx
|
|
6
|
-
var i = n(r.id, (n = {}) => {
|
|
7
|
-
let i = r(n);
|
|
8
|
-
return {
|
|
9
|
-
...i,
|
|
10
|
-
additionalFields: i.additionalFields?.map((t) => t.name === "username" ? {
|
|
11
|
-
...t,
|
|
12
|
-
render: e
|
|
13
|
-
} : t),
|
|
14
|
-
views: { auth: { signIn: t } }
|
|
15
|
-
};
|
|
16
|
-
});
|
|
17
|
-
//#endregion
|
|
18
|
-
export { i as usernamePlugin };
|