@burdenoff/fe-libs 2026.1119.7 → 2026.1119.9
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/chrome/shell/ShellSidebar.js +159 -157
- package/dist/chrome/shell/SidebarProfileMenu.js +193 -190
- package/dist/chrome/shell/WorkspaceAccountCard.js +45 -40
- package/dist/chrome/shell/WorkspaceMenu.js +140 -136
- package/dist/chrome/shell/shellSidebarAppearance.d.ts +4 -0
- package/dist/chrome/shell/shellSidebarAppearance.js +7 -0
- package/dist/chrome/shell/sidebarPopupPlacement.d.ts +21 -0
- package/dist/chrome/shell/sidebarPopupPlacement.js +28 -0
- package/dist/connections/ConnectionDialogPanel.js +222 -203
- package/dist/connections/ConnectionFormTab.d.ts +6 -0
- package/dist/connections/ConnectionFormTab.js +2 -2
- package/dist/connections/api.d.ts +28 -0
- package/dist/connections/api.js +107 -71
- package/dist/connections/connectionFlow.d.ts +63 -1
- package/dist/connections/connectionFlow.js +139 -47
- package/dist/connections/index.d.ts +2 -2
- package/dist/connections/oauthPopup.d.ts +16 -1
- package/dist/connections/oauthPopup.js +45 -37
- package/dist/connections/useConnectionSubmit.d.ts +7 -2
- package/dist/connections/useConnectionSubmit.js +69 -55
- package/dist/connections.js +6 -6
- package/dist/ui/dropdown-menu.d.ts +12 -2
- package/dist/ui/dropdown-menu.js +53 -50
- package/dist/ui/glass-surface.d.ts +7 -0
- package/dist/ui/glass-surface.js +14 -0
- package/dist/ui/popover.d.ts +1 -1
- package/dist/ui/popover.js +17 -15
- package/dist/ui/select.js +69 -68
- package/dist/ui/tooltip.d.ts +6 -0
- package/dist/ui/tooltip.js +18 -14
- package/package.json +1 -1
- package/src/shared/tokens/display-settings.css +3 -0
|
@@ -21,25 +21,28 @@ function p(e) {
|
|
|
21
21
|
let t = window.screenX + (window.innerWidth - d) / 2, n = window.screenY + (window.innerHeight - f) / 2;
|
|
22
22
|
return window.open(e, "oauth_popup", `width=${d},height=${f},left=${t},top=${n},toolbar=no,menubar=no,scrollbars=yes,resizable=yes`);
|
|
23
23
|
}
|
|
24
|
-
function m({ api: e, callbackUrl: d, translate: f, onConnectionCreated: m, onError: h, onEvent: g, reconnectConnection: _ }) {
|
|
25
|
-
let [
|
|
26
|
-
a(() =>
|
|
27
|
-
|
|
24
|
+
function m({ api: e, callbackUrl: d, translate: f, onConnectionCreated: m, onError: h, onEvent: g, reconnectConnection: _, reconnectSettings: v }) {
|
|
25
|
+
let [y, b] = s(!1), [x, S] = s(!1), [C, w] = s(""), [T, E] = s(null), [D, O] = s(null), k = o(null), A = o(null), j = o(null), M = o(v ?? null);
|
|
26
|
+
a(() => {
|
|
27
|
+
M.current = v ?? null;
|
|
28
|
+
}, [v]), a(() => () => {
|
|
29
|
+
k.current?.(), A.current && !A.current.closed && A.current.close();
|
|
28
30
|
}, []);
|
|
29
|
-
let
|
|
30
|
-
|
|
31
|
-
}, [m]),
|
|
32
|
-
|
|
33
|
-
}, [h]),
|
|
34
|
-
|
|
31
|
+
let N = i((e) => {
|
|
32
|
+
j.current = null, O(null), E(e), m?.(e);
|
|
33
|
+
}, [m]), P = i((e) => {
|
|
34
|
+
w(e), h?.(Error(e));
|
|
35
|
+
}, [h]), F = i((t, n, i, a) => {
|
|
36
|
+
A.current = n, O(null), S(!0), g?.({
|
|
35
37
|
type: "oauth-started",
|
|
36
38
|
connectionId: t,
|
|
37
39
|
providerKey: i.key
|
|
38
|
-
}),
|
|
40
|
+
}), k.current?.(), k.current = r({
|
|
39
41
|
connectionId: t,
|
|
40
42
|
popup: n,
|
|
41
43
|
fetchConnection: () => e.getConnection(t),
|
|
42
|
-
|
|
44
|
+
baseline: a,
|
|
45
|
+
onSuccess: (e) => N({
|
|
43
46
|
...e,
|
|
44
47
|
provider: i
|
|
45
48
|
}),
|
|
@@ -49,94 +52,105 @@ function m({ api: e, callbackUrl: d, translate: f, onConnectionCreated: m, onErr
|
|
|
49
52
|
connectionId: t,
|
|
50
53
|
providerKey: i.key,
|
|
51
54
|
error: e
|
|
52
|
-
}),
|
|
55
|
+
}), P(e);
|
|
53
56
|
},
|
|
54
57
|
onSettled: () => {
|
|
55
|
-
|
|
58
|
+
k.current = null, A.current = null, S(!1);
|
|
56
59
|
}
|
|
57
60
|
});
|
|
58
61
|
}, [
|
|
59
62
|
e,
|
|
60
63
|
g,
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
]),
|
|
64
|
-
if (!
|
|
65
|
-
let e = p(
|
|
66
|
-
e && (
|
|
67
|
-
}, [
|
|
68
|
-
|
|
64
|
+
N,
|
|
65
|
+
P
|
|
66
|
+
]), I = i(() => {
|
|
67
|
+
if (!D) return;
|
|
68
|
+
let e = p(D.redirectUrl);
|
|
69
|
+
e && (w(""), F(D.connectionId, e, D.provider, D.baseline));
|
|
70
|
+
}, [D, F]), L = i(() => {
|
|
71
|
+
k.current?.(), k.current = null, A.current && !A.current.closed && A.current.close(), A.current = null, S(!1);
|
|
69
72
|
}, []);
|
|
70
73
|
return {
|
|
71
74
|
submit: i(async (r, i) => {
|
|
72
|
-
if (
|
|
75
|
+
if (y || x) return;
|
|
73
76
|
let a = n(r, f);
|
|
74
77
|
if (a) {
|
|
75
|
-
|
|
78
|
+
w(a);
|
|
76
79
|
return;
|
|
77
80
|
}
|
|
78
81
|
let { provider: o } = r;
|
|
79
|
-
|
|
80
|
-
let s = _ ? null : c(r), m = l(_,
|
|
82
|
+
w(""), O(null), b(!0);
|
|
83
|
+
let s = _ ? null : c(r), m = l(_, j.current, s);
|
|
81
84
|
try {
|
|
82
|
-
let n
|
|
85
|
+
let n;
|
|
86
|
+
if (_) {
|
|
87
|
+
let e = M.current;
|
|
88
|
+
if (!e) throw Error(f("integrations.addConnection.reconnect.settingsUnavailable", "This connection's current settings could not be read. Close the dialog and try again."));
|
|
89
|
+
n = e;
|
|
90
|
+
}
|
|
91
|
+
let a = await t(e, r, {
|
|
83
92
|
redirectUri: d,
|
|
84
93
|
scopes: i,
|
|
85
94
|
existing: m,
|
|
95
|
+
reconnectFrom: n,
|
|
96
|
+
onReconnectSaved: (e) => {
|
|
97
|
+
M.current = e;
|
|
98
|
+
},
|
|
86
99
|
onCreated: (e) => {
|
|
87
|
-
s !== null && (
|
|
100
|
+
s !== null && (j.current = {
|
|
88
101
|
inputKey: s,
|
|
89
102
|
connection: e,
|
|
90
103
|
announced: !1
|
|
91
104
|
});
|
|
92
105
|
}
|
|
93
106
|
});
|
|
94
|
-
if (u(
|
|
107
|
+
if (u(a.connection.id, j.current, _) && (j.current?.connection.id === a.connection.id && (j.current.announced = !0), g?.({
|
|
95
108
|
type: "connection-created",
|
|
96
|
-
connectionId:
|
|
109
|
+
connectionId: a.connection.id,
|
|
97
110
|
providerKey: o.key
|
|
98
|
-
})),
|
|
99
|
-
|
|
100
|
-
...
|
|
111
|
+
})), a.kind === "done") {
|
|
112
|
+
N({
|
|
113
|
+
...a.connection,
|
|
101
114
|
provider: o
|
|
102
115
|
});
|
|
103
116
|
return;
|
|
104
117
|
}
|
|
105
|
-
let
|
|
106
|
-
if (!
|
|
107
|
-
|
|
108
|
-
connectionId:
|
|
109
|
-
redirectUrl:
|
|
110
|
-
provider: o
|
|
111
|
-
|
|
118
|
+
let c = p(a.redirectUrl);
|
|
119
|
+
if (!c) {
|
|
120
|
+
O({
|
|
121
|
+
connectionId: a.connection.id,
|
|
122
|
+
redirectUrl: a.redirectUrl,
|
|
123
|
+
provider: o,
|
|
124
|
+
baseline: a.baseline
|
|
125
|
+
}), P(f("integrations.addConnection.authentication.popupBlocked", "Popup was blocked. Please allow popups for this site and try again.", { provider: o.name }));
|
|
112
126
|
return;
|
|
113
127
|
}
|
|
114
|
-
|
|
128
|
+
F(a.connection.id, c, o, a.baseline);
|
|
115
129
|
} catch (e) {
|
|
116
|
-
|
|
130
|
+
P(e instanceof Error ? e.message : f("integrations.addConnection.errors.authFailed", "Authentication failed"));
|
|
117
131
|
} finally {
|
|
118
|
-
|
|
132
|
+
b(!1);
|
|
119
133
|
}
|
|
120
134
|
}, [
|
|
121
|
-
|
|
122
|
-
|
|
135
|
+
y,
|
|
136
|
+
x,
|
|
123
137
|
f,
|
|
124
138
|
e,
|
|
125
139
|
d,
|
|
126
140
|
g,
|
|
127
|
-
j,
|
|
128
|
-
M,
|
|
129
141
|
N,
|
|
142
|
+
P,
|
|
143
|
+
F,
|
|
130
144
|
_
|
|
131
145
|
]),
|
|
132
|
-
busy:
|
|
133
|
-
oauthWaiting:
|
|
134
|
-
errorMessage:
|
|
135
|
-
setErrorMessage:
|
|
136
|
-
created:
|
|
137
|
-
signInBlocked:
|
|
138
|
-
openBlockedSignIn:
|
|
139
|
-
cancelSignIn:
|
|
146
|
+
busy: y || x,
|
|
147
|
+
oauthWaiting: x,
|
|
148
|
+
errorMessage: C,
|
|
149
|
+
setErrorMessage: w,
|
|
150
|
+
created: T,
|
|
151
|
+
signInBlocked: D !== null,
|
|
152
|
+
openBlockedSignIn: I,
|
|
153
|
+
cancelSignIn: L
|
|
140
154
|
};
|
|
141
155
|
}
|
|
142
156
|
export { c as createInputKey, l as reusableRecord, u as shouldAnnounce, m as useConnectionSubmit };
|
package/dist/connections.js
CHANGED
|
@@ -13,9 +13,9 @@ import { EMPTY_STORAGE as x, compatibleSecrets as S, defaultVault as C, withDefa
|
|
|
13
13
|
import { POPULAR_PROVIDER_KEYS as T, groupByCategory as E, isPopularProvider as D, needsAdminSetup as O, pickableProviders as k, popularFirst as A } from "./connections/picker.js";
|
|
14
14
|
import { ScopePicker as j } from "./connections/ScopePicker.js";
|
|
15
15
|
import { createConnectionsApi as M, mapProvider as N, normalizeAuthType as P } from "./connections/api.js";
|
|
16
|
-
import {
|
|
17
|
-
import { isOAuthCallbackMessage as
|
|
18
|
-
import { getProviderAccent as
|
|
19
|
-
import { isScopeChecked as
|
|
20
|
-
import { authTypeLabel as
|
|
21
|
-
export { t as CONNECTION_DIALOG_FRAME_CLASSES, y as CONNECT_MORE_OPTIONS_KEY, e as ConnectionDialog, v as CredentialStorageSelector, x as EMPTY_STORAGE, b as OneScreenConnectionForm, T as POPULAR_PROVIDER_KEYS, n as ProviderIcon, s as ResourceShareDialog, c as ResourceSharePanel, p as SHARE_PICKER_LIMIT, r as SHARE_TITLE_ID, j as ScopePicker, i as ShareConnectionDialog, f as VisibilityChoice,
|
|
16
|
+
import { applyReconnectUpdate as F, buildCreateInput as I, buildReconnectUpdate as L, collectsOwnClientId as R, flowForAuthType as z, isSecretField as B, reconnectEditsConfig as V, reconnectInitialValues as H, reconnectSchema as U, resolveFlow as W, resolveMethod as G, resolveSchema as K, submitConnection as q, submittedValues as J, validateDraft as Y } from "./connections/connectionFlow.js";
|
|
17
|
+
import { isOAuthCallbackMessage as X, waitForOAuthCompletion as Z } from "./connections/oauthPopup.js";
|
|
18
|
+
import { getProviderAccent as Q, getProviderIconName as $, getProviderImageSource as ee, getProviderTextIcon as te, normalizeProviderCategory as ne } from "./connections/providerIdentity.js";
|
|
19
|
+
import { isScopeChecked as re, parseScopeOptions as ie, requestedScopes as ae, toggleScope as oe } from "./connections/scopes.js";
|
|
20
|
+
import { authTypeLabel as se, categoryLabel as ce } from "./connections/labels.js";
|
|
21
|
+
export { t as CONNECTION_DIALOG_FRAME_CLASSES, y as CONNECT_MORE_OPTIONS_KEY, e as ConnectionDialog, v as CredentialStorageSelector, x as EMPTY_STORAGE, b as OneScreenConnectionForm, T as POPULAR_PROVIDER_KEYS, n as ProviderIcon, s as ResourceShareDialog, c as ResourceSharePanel, p as SHARE_PICKER_LIMIT, r as SHARE_TITLE_ID, j as ScopePicker, i as ShareConnectionDialog, f as VisibilityChoice, F as applyReconnectUpdate, se as authTypeLabel, I as buildCreateInput, L as buildReconnectUpdate, m as canManageSharing, ce as categoryLabel, R as collectsOwnClientId, S as compatibleSecrets, a as connectionShareCopy, o as connectionVisibilityCopy, h as createConnectionSharingApi, M as createConnectionsApi, g as createSharePrincipalLister, C as defaultVault, z as flowForAuthType, Q as getProviderAccent, $ as getProviderIconName, ee as getProviderImageSource, te as getProviderTextIcon, E as groupByCategory, X as isOAuthCallbackMessage, D as isPopularProvider, re as isScopeChecked, B as isSecretField, _ as mapConnectionSharing, N as mapProvider, O as needsAdminSetup, P as normalizeAuthType, ne as normalizeProviderCategory, ie as parseScopeOptions, k as pickableProviders, A as popularFirst, l as principalKey, V as reconnectEditsConfig, H as reconnectInitialValues, U as reconnectSchema, ae as requestedScopes, W as resolveFlow, G as resolveMethod, K as resolveSchema, u as resourceShareInput, q as submitConnection, J as submittedValues, oe as toggleScope, d as useResourceSharingDraft, Y as validateDraft, Z as waitForOAuthCompletion, w as withDefaultVault };
|
|
@@ -16,13 +16,23 @@ declare function DropdownMenuSubTrigger({ ref, className, inset, indicator, chil
|
|
|
16
16
|
declare namespace DropdownMenuSubTrigger {
|
|
17
17
|
var displayName: string | undefined;
|
|
18
18
|
}
|
|
19
|
-
|
|
19
|
+
/**
|
|
20
|
+
* ★ BOFF-15567: portalled to <body>, like every menu's content. Rendered inside its menu, a
|
|
21
|
+
* sub-menu was cut away under Glass (the menu's backdrop-filter made the menu its containing
|
|
22
|
+
* block, and the menu's overflow clipped everything beside it; see `./glass-surface`). Radix
|
|
23
|
+
* keeps it working across the portal: ArrowRight opens it and focuses its first item,
|
|
24
|
+
* ArrowLeft closes it and focuses its row again, the pointer's path to it keeps it open, and
|
|
25
|
+
* Escape closes the whole menu. At the menu's own `z-50` it is the later body child, so it
|
|
26
|
+
* paints over its menu, and an open sheet or shell overlay lifts it with its menu
|
|
27
|
+
* (`sheetLayer.ts`, `chrome/shellOverlayLayer.ts`).
|
|
28
|
+
*/
|
|
29
|
+
declare function DropdownMenuSubContent({ ref, className, children, ...props }: ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.SubContent> & {
|
|
20
30
|
ref?: React.Ref<ElementRef<typeof DropdownMenuPrimitive.SubContent>>;
|
|
21
31
|
}): import('react').JSX.Element;
|
|
22
32
|
declare namespace DropdownMenuSubContent {
|
|
23
33
|
var displayName: string | undefined;
|
|
24
34
|
}
|
|
25
|
-
declare function DropdownMenuContent({ ref, className, sideOffset, ...props }: ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Content> & {
|
|
35
|
+
declare function DropdownMenuContent({ ref, className, sideOffset, children, ...props }: ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Content> & {
|
|
26
36
|
ref?: React.Ref<ElementRef<typeof DropdownMenuPrimitive.Content>>;
|
|
27
37
|
}): import('react').JSX.Element;
|
|
28
38
|
declare namespace DropdownMenuContent {
|
package/dist/ui/dropdown-menu.js
CHANGED
|
@@ -1,89 +1,92 @@
|
|
|
1
1
|
import { cn as e } from "../shared-utils.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
2
|
+
import { GlassSurfaceScope as t } from "./glass-surface.js";
|
|
3
|
+
import { Check as n, ChevronRight as r, Circle as i } from "lucide-react";
|
|
4
|
+
import { jsx as a, jsxs as o } from "react/jsx-runtime";
|
|
5
|
+
import * as s from "@radix-ui/react-dropdown-menu";
|
|
5
6
|
// src/ui/dropdown-menu.tsx
|
|
6
|
-
var
|
|
7
|
-
function
|
|
8
|
-
return /* @__PURE__ */
|
|
7
|
+
var c = s.Root, l = s.Trigger, u = s.Group, d = s.Portal, f = s.Sub, p = s.RadioGroup;
|
|
8
|
+
function m({ ref: t, className: n, inset: i, indicator: c, children: l, ...u }) {
|
|
9
|
+
return /* @__PURE__ */ o(s.SubTrigger, {
|
|
9
10
|
ref: t,
|
|
10
|
-
className: e("flex cursor-default select-none items-center rounded-button px-2 py-1.5 text-sm text-text-primary outline-none transition-colors focus:bg-[var(--color-accent-soft)] data-[state=open]:bg-[var(--color-accent-soft)]",
|
|
11
|
+
className: e("flex cursor-default select-none items-center rounded-button px-2 py-1.5 text-sm text-text-primary outline-none transition-colors focus:bg-[var(--color-accent-soft)] data-[state=open]:bg-[var(--color-accent-soft)]", i && "ps-8", n),
|
|
11
12
|
...u,
|
|
12
|
-
children: [l, c ?? /* @__PURE__ */
|
|
13
|
+
children: [l, c ?? /* @__PURE__ */ a(r, { className: "ms-auto size-4 text-text-muted rtl:rotate-180" })]
|
|
13
14
|
});
|
|
14
15
|
}
|
|
15
|
-
|
|
16
|
-
function
|
|
17
|
-
return /* @__PURE__ */
|
|
18
|
-
ref:
|
|
16
|
+
m.displayName = s.SubTrigger.displayName;
|
|
17
|
+
function h({ ref: n, className: r, children: i, ...o }) {
|
|
18
|
+
return /* @__PURE__ */ a(s.Portal, { children: /* @__PURE__ */ a(s.SubContent, {
|
|
19
|
+
ref: n,
|
|
19
20
|
"data-glass-surface": "elevated",
|
|
20
|
-
className: e("z-50 min-w-[8rem] overflow-hidden rounded-card border border-border-subtle bg-bg-elevated p-1 text-text-primary shadow-elevation-3 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
|
|
21
|
-
...
|
|
22
|
-
|
|
21
|
+
className: e("z-50 min-w-[8rem] overflow-hidden rounded-card border border-border-subtle bg-bg-elevated p-1 text-text-primary shadow-elevation-3 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2", r),
|
|
22
|
+
...o,
|
|
23
|
+
children: o.asChild ? i : /* @__PURE__ */ a(t, { children: i })
|
|
24
|
+
}) });
|
|
23
25
|
}
|
|
24
|
-
|
|
25
|
-
function
|
|
26
|
-
return /* @__PURE__ */
|
|
27
|
-
ref:
|
|
26
|
+
h.displayName = s.SubContent.displayName;
|
|
27
|
+
function g({ ref: n, className: r, sideOffset: i = 4, children: o, ...c }) {
|
|
28
|
+
return /* @__PURE__ */ a(s.Portal, { children: /* @__PURE__ */ a(s.Content, {
|
|
29
|
+
ref: n,
|
|
28
30
|
"data-glass-surface": "elevated",
|
|
29
|
-
sideOffset:
|
|
30
|
-
className: e("z-50 min-w-[8rem] overflow-hidden rounded-card border border-border-subtle bg-bg-elevated p-1 text-text-primary shadow-elevation-3 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
|
|
31
|
-
...
|
|
31
|
+
sideOffset: i,
|
|
32
|
+
className: e("z-50 min-w-[8rem] overflow-hidden rounded-card border border-border-subtle bg-bg-elevated p-1 text-text-primary shadow-elevation-3 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2", r),
|
|
33
|
+
...c,
|
|
34
|
+
children: c.asChild ? o : /* @__PURE__ */ a(t, { children: o })
|
|
32
35
|
}) });
|
|
33
36
|
}
|
|
34
|
-
|
|
35
|
-
function
|
|
36
|
-
return /* @__PURE__ */
|
|
37
|
+
g.displayName = s.Content.displayName;
|
|
38
|
+
function _({ ref: t, className: n, inset: r, ...i }) {
|
|
39
|
+
return /* @__PURE__ */ a(s.Item, {
|
|
37
40
|
ref: t,
|
|
38
41
|
className: e("relative flex cursor-default select-none items-center rounded-button px-2 py-1.5 text-sm text-text-primary outline-none transition-colors focus:bg-[var(--color-accent-soft)] focus:text-text-primary data-[disabled]:pointer-events-none data-[disabled]:opacity-50", r && "ps-8", n),
|
|
39
|
-
...
|
|
42
|
+
...i
|
|
40
43
|
});
|
|
41
44
|
}
|
|
42
|
-
|
|
43
|
-
function
|
|
44
|
-
return /* @__PURE__ */
|
|
45
|
-
ref:
|
|
45
|
+
_.displayName = s.Item.displayName;
|
|
46
|
+
function v({ ref: t, className: r, children: i, checked: c, ...l }) {
|
|
47
|
+
return /* @__PURE__ */ o(s.CheckboxItem, {
|
|
48
|
+
ref: t,
|
|
46
49
|
className: e("relative flex cursor-default select-none items-center rounded-button py-1.5 ps-8 pe-2 text-sm text-text-primary outline-none transition-colors focus:bg-[var(--color-accent-soft)] focus:text-text-primary data-[disabled]:pointer-events-none data-[disabled]:opacity-50", r),
|
|
47
50
|
checked: c,
|
|
48
51
|
...l,
|
|
49
|
-
children: [/* @__PURE__ */
|
|
52
|
+
children: [/* @__PURE__ */ a("span", {
|
|
50
53
|
className: "absolute start-2 flex size-3.5 items-center justify-center",
|
|
51
|
-
children: /* @__PURE__ */
|
|
52
|
-
}),
|
|
54
|
+
children: /* @__PURE__ */ a(s.ItemIndicator, { children: /* @__PURE__ */ a(n, { className: "size-4" }) })
|
|
55
|
+
}), i]
|
|
53
56
|
});
|
|
54
57
|
}
|
|
55
|
-
|
|
56
|
-
function
|
|
57
|
-
return /* @__PURE__ */
|
|
58
|
+
v.displayName = s.CheckboxItem.displayName;
|
|
59
|
+
function y({ ref: t, className: n, children: r, indicator: c, ...l }) {
|
|
60
|
+
return /* @__PURE__ */ o(s.RadioItem, {
|
|
58
61
|
ref: t,
|
|
59
62
|
className: e("relative flex cursor-default select-none items-center rounded-button py-1.5 ps-8 pe-2 text-sm text-text-primary outline-none transition-colors focus:bg-[var(--color-accent-soft)] focus:text-text-primary data-[disabled]:pointer-events-none data-[disabled]:opacity-50", n),
|
|
60
63
|
...l,
|
|
61
|
-
children: [/* @__PURE__ */
|
|
64
|
+
children: [/* @__PURE__ */ a("span", {
|
|
62
65
|
className: "absolute start-2 flex size-3.5 items-center justify-center",
|
|
63
|
-
children: /* @__PURE__ */
|
|
64
|
-
}),
|
|
66
|
+
children: /* @__PURE__ */ a(s.ItemIndicator, { children: c ?? /* @__PURE__ */ a(i, { className: "size-2 fill-current" }) })
|
|
67
|
+
}), r]
|
|
65
68
|
});
|
|
66
69
|
}
|
|
67
|
-
|
|
68
|
-
function
|
|
69
|
-
return /* @__PURE__ */
|
|
70
|
+
y.displayName = s.RadioItem.displayName;
|
|
71
|
+
function b({ ref: t, className: n, inset: r, ...i }) {
|
|
72
|
+
return /* @__PURE__ */ a(s.Label, {
|
|
70
73
|
ref: t,
|
|
71
74
|
className: e("px-2 py-1.5 text-xs font-medium uppercase tracking-wide text-text-muted", r && "ps-8", n),
|
|
72
|
-
...
|
|
75
|
+
...i
|
|
73
76
|
});
|
|
74
77
|
}
|
|
75
|
-
|
|
76
|
-
function
|
|
77
|
-
return /* @__PURE__ */
|
|
78
|
+
b.displayName = s.Label.displayName;
|
|
79
|
+
function x({ ref: t, className: n, ...r }) {
|
|
80
|
+
return /* @__PURE__ */ a(s.Separator, {
|
|
78
81
|
ref: t,
|
|
79
82
|
className: e("-mx-1 my-1 h-px bg-border-subtle", n),
|
|
80
83
|
...r
|
|
81
84
|
});
|
|
82
85
|
}
|
|
83
|
-
|
|
84
|
-
var
|
|
86
|
+
x.displayName = s.Separator.displayName;
|
|
87
|
+
var S = ({ className: t, ...n }) => /* @__PURE__ */ a("span", {
|
|
85
88
|
className: e("ms-auto text-xs tracking-widest text-text-muted", t),
|
|
86
89
|
...n
|
|
87
90
|
});
|
|
88
|
-
|
|
89
|
-
export {
|
|
91
|
+
S.displayName = "DropdownMenuShortcut";
|
|
92
|
+
export { c as DropdownMenu, v as DropdownMenuCheckboxItem, g as DropdownMenuContent, u as DropdownMenuGroup, _ as DropdownMenuItem, b as DropdownMenuLabel, d as DropdownMenuPortal, p as DropdownMenuRadioGroup, y as DropdownMenuRadioItem, x as DropdownMenuSeparator, S as DropdownMenuShortcut, f as DropdownMenuSub, h as DropdownMenuSubContent, m as DropdownMenuSubTrigger, l as DropdownMenuTrigger };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
/** Marks `children` as rendered inside a glass surface. Renders no element of its own. */
|
|
3
|
+
export declare function GlassSurfaceScope({ children }: {
|
|
4
|
+
children?: ReactNode;
|
|
5
|
+
}): import('react').JSX.Element;
|
|
6
|
+
/** Whether the caller renders inside a glass surface (a `GlassSurfaceScope`). */
|
|
7
|
+
export declare function useInsideGlassSurface(): boolean;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { createContext as e, useContext as t } from "react";
|
|
2
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
3
|
+
// src/ui/glass-surface.tsx
|
|
4
|
+
var r = e(!1);
|
|
5
|
+
function i({ children: e }) {
|
|
6
|
+
return /* @__PURE__ */ n(r.Provider, {
|
|
7
|
+
value: !0,
|
|
8
|
+
children: e
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
function a() {
|
|
12
|
+
return t(r);
|
|
13
|
+
}
|
|
14
|
+
export { i as GlassSurfaceScope, a as useInsideGlassSurface };
|
package/dist/ui/popover.d.ts
CHANGED
|
@@ -2,6 +2,6 @@ import * as React from 'react';
|
|
|
2
2
|
import * as PopoverPrimitive from '@radix-ui/react-popover';
|
|
3
3
|
declare function Popover({ ...props }: React.ComponentProps<typeof PopoverPrimitive.Root>): React.JSX.Element;
|
|
4
4
|
declare function PopoverTrigger({ ...props }: React.ComponentProps<typeof PopoverPrimitive.Trigger>): React.JSX.Element;
|
|
5
|
-
declare function PopoverContent({ className, align, sideOffset, ...props }: React.ComponentProps<typeof PopoverPrimitive.Content>): React.JSX.Element;
|
|
5
|
+
declare function PopoverContent({ className, align, sideOffset, children, ...props }: React.ComponentProps<typeof PopoverPrimitive.Content>): React.JSX.Element;
|
|
6
6
|
declare function PopoverAnchor({ ...props }: React.ComponentProps<typeof PopoverPrimitive.Anchor>): React.JSX.Element;
|
|
7
7
|
export { Popover, PopoverTrigger, PopoverContent, PopoverAnchor };
|
package/dist/ui/popover.js
CHANGED
|
@@ -1,35 +1,37 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { cn as e } from "../lib/utils.js";
|
|
3
|
+
import { GlassSurfaceScope as t } from "./glass-surface.js";
|
|
3
4
|
import "react";
|
|
4
|
-
import { jsx as
|
|
5
|
-
import * as
|
|
5
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
6
|
+
import * as r from "@radix-ui/react-popover";
|
|
6
7
|
// src/ui/popover.tsx
|
|
7
|
-
function
|
|
8
|
-
return /* @__PURE__ */
|
|
8
|
+
function i({ ...e }) {
|
|
9
|
+
return /* @__PURE__ */ n(r.Root, {
|
|
9
10
|
"data-slot": "popover",
|
|
10
11
|
...e
|
|
11
12
|
});
|
|
12
13
|
}
|
|
13
|
-
function
|
|
14
|
-
return /* @__PURE__ */
|
|
14
|
+
function a({ ...e }) {
|
|
15
|
+
return /* @__PURE__ */ n(r.Trigger, {
|
|
15
16
|
"data-slot": "popover-trigger",
|
|
16
17
|
...e
|
|
17
18
|
});
|
|
18
19
|
}
|
|
19
|
-
function
|
|
20
|
-
return /* @__PURE__ */
|
|
20
|
+
function o({ className: i, align: a = "center", sideOffset: o = 4, children: s, ...c }) {
|
|
21
|
+
return /* @__PURE__ */ n(r.Portal, { children: /* @__PURE__ */ n(r.Content, {
|
|
21
22
|
"data-slot": "popover-content",
|
|
22
23
|
"data-glass-surface": "elevated",
|
|
23
|
-
align:
|
|
24
|
-
sideOffset:
|
|
25
|
-
className: e("bg-bg-elevated text-text-primary border-border-subtle data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-card border p-4 shadow-elevation-3 outline-hidden",
|
|
26
|
-
...
|
|
24
|
+
align: a,
|
|
25
|
+
sideOffset: o,
|
|
26
|
+
className: e("bg-bg-elevated text-text-primary border-border-subtle data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-card border p-4 shadow-elevation-3 outline-hidden", i),
|
|
27
|
+
...c,
|
|
28
|
+
children: c.asChild ? s : /* @__PURE__ */ n(t, { children: s })
|
|
27
29
|
}) });
|
|
28
30
|
}
|
|
29
|
-
function
|
|
30
|
-
return /* @__PURE__ */
|
|
31
|
+
function s({ ...e }) {
|
|
32
|
+
return /* @__PURE__ */ n(r.Anchor, {
|
|
31
33
|
"data-slot": "popover-anchor",
|
|
32
34
|
...e
|
|
33
35
|
});
|
|
34
36
|
}
|
|
35
|
-
export {
|
|
37
|
+
export { i as Popover, s as PopoverAnchor, o as PopoverContent, a as PopoverTrigger };
|