@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
|
@@ -3,19 +3,20 @@ import { useShellLabel as t, useShellNumberFormat as n } from "../../shared/prov
|
|
|
3
3
|
import { useSafePersonaSurface as r } from "../../shared/providers/shell/PersonaSurfaceProvider.js";
|
|
4
4
|
import { cn as i } from "../../shared-utils.js";
|
|
5
5
|
import { Button as a } from "../../ui/button.js";
|
|
6
|
-
import { DropdownMenu as o, DropdownMenuContent as
|
|
7
|
-
import { Sheet as
|
|
8
|
-
import { PersonaViewsList as
|
|
9
|
-
import { hasProfileHelpContent as
|
|
10
|
-
import { ICON as
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
6
|
+
import { DropdownMenu as o, DropdownMenuContent as ee, DropdownMenuGroup as s, DropdownMenuItem as c, DropdownMenuRadioGroup as l, DropdownMenuRadioItem as u, DropdownMenuSeparator as d, DropdownMenuShortcut as f, DropdownMenuSub as p, DropdownMenuSubContent as m, DropdownMenuSubTrigger as h, DropdownMenuTrigger as te } from "../../ui/dropdown-menu.js";
|
|
7
|
+
import { Sheet as ne, SheetContent as re, SheetTitle as ie, SheetTrigger as ae } from "../../ui/sheet.js";
|
|
8
|
+
import { PersonaViewsList as oe } from "../PersonaViewsList.js";
|
|
9
|
+
import { hasProfileHelpContent as se, profileHelpBody as ce, useProfileHelp as le } from "./profileHelpMenu.js";
|
|
10
|
+
import { ICON as g, MENU_ROW as _, MENU_SURFACE as ue, SECTION_LABEL as de, SHEET_ROW as v, SUB_SURFACE as y, VALUE as fe } from "./profileMenuClasses.js";
|
|
11
|
+
import { useSidebarPopupPlacement as pe } from "./sidebarPopupPlacement.js";
|
|
12
|
+
import { createContext as me, useContext as b, useEffect as x, useId as he, useMemo as ge, useRef as S, useState as C } from "react";
|
|
13
|
+
import { Check as _e, ChevronRight as w, Eye as ve, Gem as ye, Keyboard as be, Languages as xe, LifeBuoy as Se, LogOut as Ce, Monitor as we, Moon as T, Palette as Te, Plus as Ee, Settings as De, Sun as E, UserRound as Oe, X as ke } from "lucide-react";
|
|
13
14
|
import { Fragment as D, jsx as O, jsxs as k } from "react/jsx-runtime";
|
|
14
15
|
// src/chrome/shell/SidebarProfileMenu.tsx
|
|
15
|
-
var
|
|
16
|
+
var Ae = {
|
|
16
17
|
dark: T,
|
|
17
18
|
light: E,
|
|
18
|
-
system:
|
|
19
|
+
system: we
|
|
19
20
|
};
|
|
20
21
|
function A(e) {
|
|
21
22
|
let t = e.trim().split(/\s+/).filter(Boolean);
|
|
@@ -40,11 +41,11 @@ function M(e, t, n) {
|
|
|
40
41
|
})
|
|
41
42
|
});
|
|
42
43
|
}
|
|
43
|
-
var
|
|
44
|
-
function N({ planName: e, onManage: r, used: i, limit: o, caption:
|
|
45
|
-
let
|
|
46
|
-
used:
|
|
47
|
-
limit:
|
|
44
|
+
var je = me(!1);
|
|
45
|
+
function N({ planName: e, onManage: r, used: i, limit: o, caption: ee }) {
|
|
46
|
+
let s = t(), l = n(), u = b(je), d = s("shell.plan.manage", "Manage"), f = typeof i == "number" && typeof o == "number" && o > 0, p = f ? Math.min(100, Math.max(0, Math.round(i / o * 100))) : 0, m = ee ?? (f ? s("shell.plan.usage", "{{used}} of {{limit}} used", {
|
|
47
|
+
used: l(i),
|
|
48
|
+
limit: l(o)
|
|
48
49
|
}) : void 0);
|
|
49
50
|
return /* @__PURE__ */ k("div", {
|
|
50
51
|
className: "rounded-button border border-border-subtle bg-bg-surface p-3",
|
|
@@ -53,7 +54,7 @@ function N({ planName: e, onManage: r, used: i, limit: o, caption: s }) {
|
|
|
53
54
|
/* @__PURE__ */ k("div", {
|
|
54
55
|
className: "flex items-center gap-2",
|
|
55
56
|
children: [
|
|
56
|
-
/* @__PURE__ */ O(
|
|
57
|
+
/* @__PURE__ */ O(ye, {
|
|
57
58
|
className: "size-4 flex-shrink-0 text-text-primary",
|
|
58
59
|
"aria-hidden": "true"
|
|
59
60
|
}),
|
|
@@ -61,13 +62,13 @@ function N({ planName: e, onManage: r, used: i, limit: o, caption: s }) {
|
|
|
61
62
|
className: "min-w-0 flex-1 truncate text-body-sm font-semibold text-text-primary",
|
|
62
63
|
children: e
|
|
63
64
|
}),
|
|
64
|
-
|
|
65
|
+
u ? /* @__PURE__ */ O(c, {
|
|
65
66
|
onSelect: () => r(),
|
|
66
67
|
"data-testid": "shell-plan-manage",
|
|
67
68
|
className: "h-7 flex-shrink-0 rounded-button border border-border-default px-2.5 font-medium focus:bg-bg-sunken",
|
|
68
69
|
children: /* @__PURE__ */ O("span", {
|
|
69
70
|
className: "text-xs",
|
|
70
|
-
children:
|
|
71
|
+
children: d
|
|
71
72
|
})
|
|
72
73
|
}) : /* @__PURE__ */ O(a, {
|
|
73
74
|
type: "button",
|
|
@@ -78,52 +79,52 @@ function N({ planName: e, onManage: r, used: i, limit: o, caption: s }) {
|
|
|
78
79
|
className: "h-7 px-2.5",
|
|
79
80
|
children: /* @__PURE__ */ O("span", {
|
|
80
81
|
className: "text-xs",
|
|
81
|
-
children:
|
|
82
|
+
children: d
|
|
82
83
|
})
|
|
83
84
|
})
|
|
84
85
|
]
|
|
85
86
|
}),
|
|
86
|
-
|
|
87
|
+
f && /* @__PURE__ */ O("div", {
|
|
87
88
|
role: "progressbar",
|
|
88
89
|
"aria-valuemin": 0,
|
|
89
90
|
"aria-valuemax": o,
|
|
90
91
|
"aria-valuenow": i,
|
|
91
|
-
"aria-label":
|
|
92
|
+
"aria-label": m ?? e,
|
|
92
93
|
className: "mt-3 h-1 w-full overflow-hidden rounded-pill bg-bg-sunken",
|
|
93
94
|
children: /* @__PURE__ */ O("div", {
|
|
94
95
|
className: "h-full rounded-pill bg-linear-to-r from-action-primary-bg to-brand-secondary",
|
|
95
|
-
style: { width: `${
|
|
96
|
+
style: { width: `${p}%` }
|
|
96
97
|
})
|
|
97
98
|
}),
|
|
98
|
-
|
|
99
|
+
m && /* @__PURE__ */ O("p", {
|
|
99
100
|
className: "mt-2 truncate text-xs text-text-muted",
|
|
100
|
-
children:
|
|
101
|
+
children: m
|
|
101
102
|
})
|
|
102
103
|
]
|
|
103
104
|
});
|
|
104
105
|
}
|
|
105
|
-
function P({ user: n, roleLabel: a, orgName:
|
|
106
|
-
let W = t(),
|
|
107
|
-
|
|
108
|
-
G === "views" &&
|
|
106
|
+
function P({ user: n, roleLabel: a, orgName: me, planChip: b, accounts: ye = [], activeAccountId: we, onSwitchAccount: T, onAddAccount: E, onRemoveAccount: A, onViewProfile: j, onLogout: N, planCard: P, doors: Me = [], extraItems: F = [], onOpenSettings: Ne, settingsShortcut: I, theme: L, language: R, helpItems: z = [], help: B, personaViews: V, onKeyboardShortcuts: Pe, collapsed: H = !1, variant: Fe = "popover", open: U, onOpenChange: Ie, trigger: Le }) {
|
|
107
|
+
let W = t(), Re = le(), ze = he(), [Be, Ve] = C(!1), [G, He] = C(null), K = r(), [Ue, q] = C(""), We = K?.canSimulate ?? !1, Ge = K?.loadSimulatableRoles;
|
|
108
|
+
x(() => {
|
|
109
|
+
G === "views" && We && Ge?.();
|
|
109
110
|
}, [
|
|
110
111
|
G,
|
|
111
|
-
|
|
112
|
-
|
|
112
|
+
We,
|
|
113
|
+
Ge
|
|
113
114
|
]);
|
|
114
|
-
let
|
|
115
|
-
U === void 0 &&
|
|
116
|
-
},
|
|
117
|
-
|
|
118
|
-
|
|
115
|
+
let Ke = S(null), { beside: qe, contentRef: Je } = pe(Ke, "end"), Ye = U ?? Be, J = (e) => {
|
|
116
|
+
U === void 0 && Ve(e), e || He(null), Ie?.(e);
|
|
117
|
+
}, Xe = S(N);
|
|
118
|
+
x(() => {
|
|
119
|
+
Xe.current = N;
|
|
119
120
|
}, [N]);
|
|
120
|
-
let
|
|
121
|
-
e("account.logout",
|
|
122
|
-
let Y =
|
|
123
|
-
|
|
121
|
+
let Ze = ge(() => ({ run: () => (Xe.current(), { status: "done" }) }), []);
|
|
122
|
+
e("account.logout", Ze);
|
|
123
|
+
let Y = S(R);
|
|
124
|
+
x(() => {
|
|
124
125
|
Y.current = R;
|
|
125
126
|
}, [R]);
|
|
126
|
-
let
|
|
127
|
+
let Qe = ge(() => ({
|
|
127
128
|
languages: () => Y.current.options.map((e) => ({
|
|
128
129
|
code: e.code,
|
|
129
130
|
label: e.label
|
|
@@ -134,8 +135,8 @@ function P({ user: n, roleLabel: a, orgName: fe, planChip: x, accounts: ve = [],
|
|
|
134
135
|
return r ? r.code === t.current ? { status: "already" } : (t.onChange(r.code), { status: "done" }) : { status: "failed" };
|
|
135
136
|
}
|
|
136
137
|
}), []);
|
|
137
|
-
if (e("language",
|
|
138
|
-
let
|
|
138
|
+
if (e("language", Qe), !n) return null;
|
|
139
|
+
let $e = Fe === "sheet", X = W("appShell.userMenu", "User menu"), et = W("auth.security.switchAccount", "Switch Account"), tt = ye.filter((e) => e.id !== we), nt = !!T && tt.length > 0, rt = !!j || nt || !!E, it = [a, me].filter(Boolean).join(" · "), at = [n.email, a].filter(Boolean).join(" · "), ot = [
|
|
139
140
|
{
|
|
140
141
|
value: "dark",
|
|
141
142
|
label: W("shell.profile.themeDark", "Dark")
|
|
@@ -148,7 +149,7 @@ function P({ user: n, roleLabel: a, orgName: fe, planChip: x, accounts: ve = [],
|
|
|
148
149
|
value: "system",
|
|
149
150
|
label: W("shell.profile.themeSystem", "Match my device")
|
|
150
151
|
}
|
|
151
|
-
], Z = L.options ??
|
|
152
|
+
], Z = L.options ?? ot, st = Z.find((e) => e.value === L.value)?.label ?? L.value, ct = Ae[L.value] ?? Te, lt = R.options.find((e) => e.code === R.current)?.label ?? R.current, ut = B ? se(B) : z.length > 0, Q = {
|
|
152
153
|
viewProfile: W("userMenu.viewProfile", "View Profile"),
|
|
153
154
|
addAccount: W("auth.profileMenu.addAccount", "Add account"),
|
|
154
155
|
settings: W("common.actions.settings", "Settings"),
|
|
@@ -157,16 +158,16 @@ function P({ user: n, roleLabel: a, orgName: fe, planChip: x, accounts: ve = [],
|
|
|
157
158
|
help: W("shell.profile.helpSupport", "Help & support"),
|
|
158
159
|
shortcuts: W("appShell.keyboardShortcuts", "Keyboard shortcuts"),
|
|
159
160
|
signOut: W("auth.security.signOutDialogConfirm", "Sign out")
|
|
160
|
-
},
|
|
161
|
+
}, dt = (e) => W("userMenu.removeNamedAccount", "Remove {{name}}", { name: e.name || e.email }), $ = /* @__PURE__ */ k(D, { children: [M(n.name, n.avatarUrl, "lg"), /* @__PURE__ */ k("span", {
|
|
161
162
|
className: "min-w-0 flex-1",
|
|
162
163
|
children: [/* @__PURE__ */ O("span", {
|
|
163
164
|
className: "block truncate text-body-sm font-bold text-text-primary",
|
|
164
165
|
children: n.name
|
|
165
|
-
}),
|
|
166
|
+
}), at && /* @__PURE__ */ O("span", {
|
|
166
167
|
className: "block truncate text-xs text-text-muted",
|
|
167
|
-
children:
|
|
168
|
+
children: at
|
|
168
169
|
})]
|
|
169
|
-
})] }),
|
|
170
|
+
})] }), ft = (e) => {
|
|
170
171
|
let t = e.icon;
|
|
171
172
|
return /* @__PURE__ */ k(D, { children: [
|
|
172
173
|
/* @__PURE__ */ O("span", {
|
|
@@ -188,46 +189,46 @@ function P({ user: n, roleLabel: a, orgName: fe, planChip: x, accounts: ve = [],
|
|
|
188
189
|
children: e.description
|
|
189
190
|
})
|
|
190
191
|
] });
|
|
191
|
-
},
|
|
192
|
+
}, pt = (e) => Me.length > 0 ? /* @__PURE__ */ O("div", {
|
|
192
193
|
className: "grid grid-cols-2 gap-2 py-1.5",
|
|
193
194
|
"data-testid": "sidebar-profile-doors",
|
|
194
|
-
children:
|
|
195
|
-
}) : null,
|
|
195
|
+
children: Me.map(e)
|
|
196
|
+
}) : null, mt = P ? /* @__PURE__ */ O("div", {
|
|
196
197
|
className: "py-1",
|
|
197
198
|
children: P
|
|
198
|
-
}) : null,
|
|
199
|
+
}) : null, ht = !!V && !!K, gt = () => {
|
|
199
200
|
q(""), J(!1);
|
|
200
|
-
},
|
|
201
|
+
}, _t = () => K?.setCustomizeOpen(!0), vt = ht && V && K ? /* @__PURE__ */ k(p, {
|
|
201
202
|
onOpenChange: (e) => {
|
|
202
203
|
e && K.canSimulate && K.loadSimulatableRoles(), e || q("");
|
|
203
204
|
},
|
|
204
|
-
children: [/* @__PURE__ */ k(
|
|
205
|
-
className: i(
|
|
205
|
+
children: [/* @__PURE__ */ k(h, {
|
|
206
|
+
className: i(_, "mt-1"),
|
|
206
207
|
"data-testid": "sidebar-profile-views",
|
|
207
|
-
children: [/* @__PURE__ */ O(
|
|
208
|
-
className:
|
|
208
|
+
children: [/* @__PURE__ */ O(ve, {
|
|
209
|
+
className: g,
|
|
209
210
|
"aria-hidden": "true"
|
|
210
211
|
}), /* @__PURE__ */ O("span", {
|
|
211
212
|
className: "min-w-0 flex-1 truncate",
|
|
212
213
|
children: V.label
|
|
213
214
|
})]
|
|
214
|
-
}), /* @__PURE__ */ O(
|
|
215
|
+
}), /* @__PURE__ */ O(m, {
|
|
215
216
|
sideOffset: 8,
|
|
216
217
|
"data-testid": "sidebar-profile-views-menu",
|
|
217
|
-
className: i(
|
|
218
|
-
children: /* @__PURE__ */ O(
|
|
218
|
+
className: i(ue, "flex max-h-80 w-[300px] flex-col overflow-hidden p-0"),
|
|
219
|
+
children: /* @__PURE__ */ O(oe, {
|
|
219
220
|
persona: K,
|
|
220
221
|
everythingLabel: W("nav.everything", "Everything"),
|
|
221
|
-
query:
|
|
222
|
+
query: Ue,
|
|
222
223
|
onQueryChange: q,
|
|
223
|
-
close:
|
|
224
|
-
onOpenCustomize:
|
|
224
|
+
close: gt,
|
|
225
|
+
onOpenCustomize: _t,
|
|
225
226
|
onSearchKeyDown: (e) => {
|
|
226
227
|
e.key !== "Escape" && e.stopPropagation();
|
|
227
228
|
},
|
|
228
|
-
sectionClass:
|
|
229
|
-
renderRow: ({ testId: e, onSelect: t, tone: n, children: r }) => /* @__PURE__ */ O(
|
|
230
|
-
className: i(
|
|
229
|
+
sectionClass: de,
|
|
230
|
+
renderRow: ({ testId: e, onSelect: t, tone: n, children: r }) => /* @__PURE__ */ O(c, {
|
|
231
|
+
className: i(_, "hover:bg-bg-sunken", n === "muted" && "text-text-secondary", n === "warning" && "text-status-warning-text"),
|
|
231
232
|
onPointerMove: (e) => e.preventDefault(),
|
|
232
233
|
onPointerLeave: (e) => e.preventDefault(),
|
|
233
234
|
onSelect: () => t(),
|
|
@@ -237,18 +238,18 @@ function P({ user: n, roleLabel: a, orgName: fe, planChip: x, accounts: ve = [],
|
|
|
237
238
|
})
|
|
238
239
|
})]
|
|
239
240
|
}) : null;
|
|
240
|
-
if (
|
|
241
|
+
if ($e) {
|
|
241
242
|
let e = (e) => {
|
|
242
243
|
J(!1), e();
|
|
243
|
-
}, t = (e) =>
|
|
244
|
+
}, t = (e) => He((t) => t === e ? null : e), r = (e, n, r, i) => /* @__PURE__ */ k("button", {
|
|
244
245
|
type: "button",
|
|
245
|
-
className:
|
|
246
|
+
className: v,
|
|
246
247
|
"aria-expanded": G === e,
|
|
247
248
|
onClick: () => t(e),
|
|
248
249
|
"data-testid": `sidebar-profile-${e}`,
|
|
249
250
|
children: [
|
|
250
251
|
/* @__PURE__ */ O(n, {
|
|
251
|
-
className:
|
|
252
|
+
className: g,
|
|
252
253
|
"aria-hidden": "true"
|
|
253
254
|
}),
|
|
254
255
|
/* @__PURE__ */ O("span", {
|
|
@@ -278,14 +279,14 @@ function P({ user: n, roleLabel: a, orgName: fe, planChip: x, accounts: ve = [],
|
|
|
278
279
|
children: n.map((n) => {
|
|
279
280
|
let r = /* @__PURE__ */ k("button", {
|
|
280
281
|
type: "button",
|
|
281
|
-
className:
|
|
282
|
+
className: v,
|
|
282
283
|
"aria-pressed": n.selected,
|
|
283
284
|
onClick: () => e(n.onSelect),
|
|
284
285
|
"data-testid": `sidebar-profile-${t}-${n.id}`,
|
|
285
286
|
children: [/* @__PURE__ */ O("span", {
|
|
286
287
|
className: "min-w-0 flex-1 truncate",
|
|
287
288
|
children: n.label
|
|
288
|
-
}), n.selected && /* @__PURE__ */ O(
|
|
289
|
+
}), n.selected && /* @__PURE__ */ O(_e, {
|
|
289
290
|
className: "size-4 flex-shrink-0 text-accent-primary",
|
|
290
291
|
"aria-hidden": "true"
|
|
291
292
|
})]
|
|
@@ -301,31 +302,31 @@ function P({ user: n, roleLabel: a, orgName: fe, planChip: x, accounts: ve = [],
|
|
|
301
302
|
onClick: () => e(i.onSelect),
|
|
302
303
|
"data-testid": `sidebar-profile-${t}-${n.id}-remove`,
|
|
303
304
|
className: "flex size-9 flex-shrink-0 items-center justify-center rounded-button text-text-muted outline-none hover:bg-bg-sunken hover:text-text-primary focus-visible:ring-2 focus-visible:ring-focus-ring",
|
|
304
|
-
children: /* @__PURE__ */ O(
|
|
305
|
+
children: /* @__PURE__ */ O(ke, {
|
|
305
306
|
className: "size-4",
|
|
306
307
|
"aria-hidden": "true"
|
|
307
308
|
})
|
|
308
309
|
})]
|
|
309
310
|
}, n.id) : r;
|
|
310
311
|
})
|
|
311
|
-
}) : null,
|
|
312
|
+
}) : null, ee = ({ testId: e, onSelect: t, tone: n, children: r }) => /* @__PURE__ */ O("button", {
|
|
312
313
|
type: "button",
|
|
313
|
-
className: i(
|
|
314
|
+
className: i(v, n === "muted" && "text-text-secondary", n === "warning" && "text-status-warning-text"),
|
|
314
315
|
onClick: t,
|
|
315
316
|
"data-testid": `sidebar-profile-${e}`,
|
|
316
317
|
children: r
|
|
317
|
-
}, e),
|
|
318
|
+
}, e), s = [
|
|
318
319
|
...j ? [{
|
|
319
320
|
id: "view-profile",
|
|
320
321
|
label: Q.viewProfile,
|
|
321
322
|
onSelect: j
|
|
322
323
|
}] : [],
|
|
323
|
-
...
|
|
324
|
+
...nt ? tt.map((e) => ({
|
|
324
325
|
id: `account-${e.id}`,
|
|
325
326
|
label: e.name || e.email,
|
|
326
327
|
onSelect: () => T?.(e.id),
|
|
327
328
|
remove: A ? {
|
|
328
|
-
label:
|
|
329
|
+
label: dt(e),
|
|
329
330
|
onSelect: () => A(e.id)
|
|
330
331
|
} : void 0
|
|
331
332
|
})) : [],
|
|
@@ -334,20 +335,20 @@ function P({ user: n, roleLabel: a, orgName: fe, planChip: x, accounts: ve = [],
|
|
|
334
335
|
label: Q.addAccount,
|
|
335
336
|
onSelect: E
|
|
336
337
|
}] : []
|
|
337
|
-
],
|
|
338
|
+
], c = U === void 0 ? /* @__PURE__ */ O("button", {
|
|
338
339
|
type: "button",
|
|
339
340
|
"aria-label": X,
|
|
340
341
|
"data-testid": "sidebar-profile-trigger",
|
|
341
342
|
className: "flex items-center justify-center rounded-full outline-none focus-visible:ring-2 focus-visible:ring-focus-ring",
|
|
342
343
|
children: M(n.name, n.avatarUrl, "md")
|
|
343
|
-
}) : null,
|
|
344
|
-
return /* @__PURE__ */ k(
|
|
345
|
-
open:
|
|
344
|
+
}) : null, l = Le ?? c;
|
|
345
|
+
return /* @__PURE__ */ k(ne, {
|
|
346
|
+
open: Ye,
|
|
346
347
|
onOpenChange: J,
|
|
347
|
-
children: [
|
|
348
|
+
children: [l && /* @__PURE__ */ O(ae, {
|
|
348
349
|
asChild: !0,
|
|
349
|
-
children:
|
|
350
|
-
}), /* @__PURE__ */ k(
|
|
350
|
+
children: l
|
|
351
|
+
}), /* @__PURE__ */ k(re, {
|
|
351
352
|
side: "bottom",
|
|
352
353
|
"aria-describedby": void 0,
|
|
353
354
|
"data-testid": "sidebar-profile-sheet",
|
|
@@ -358,11 +359,11 @@ function P({ user: n, roleLabel: a, orgName: fe, planChip: x, accounts: ve = [],
|
|
|
358
359
|
className: "mx-auto mb-3 h-1 w-10 flex-shrink-0 rounded-pill bg-border-strong",
|
|
359
360
|
"data-testid": "sidebar-profile-grab-handle"
|
|
360
361
|
}),
|
|
361
|
-
/* @__PURE__ */ O(
|
|
362
|
+
/* @__PURE__ */ O(ie, {
|
|
362
363
|
className: "sr-only",
|
|
363
364
|
children: W("appShell.userMenuSheetTitle", "Account")
|
|
364
365
|
}),
|
|
365
|
-
|
|
366
|
+
rt ? /* @__PURE__ */ k("button", {
|
|
366
367
|
type: "button",
|
|
367
368
|
className: "flex w-full items-center gap-3 rounded-button px-1 py-2 text-start outline-none hover:bg-bg-sunken focus-visible:ring-2 focus-visible:ring-focus-ring",
|
|
368
369
|
"aria-expanded": G === "accounts",
|
|
@@ -377,14 +378,14 @@ function P({ user: n, roleLabel: a, orgName: fe, planChip: x, accounts: ve = [],
|
|
|
377
378
|
"data-testid": "sidebar-profile-identity",
|
|
378
379
|
children: $
|
|
379
380
|
}),
|
|
380
|
-
o("accounts",
|
|
381
|
-
|
|
382
|
-
|
|
381
|
+
o("accounts", s),
|
|
382
|
+
mt,
|
|
383
|
+
pt((t) => /* @__PURE__ */ O("button", {
|
|
383
384
|
type: "button",
|
|
384
385
|
onClick: () => e(t.onSelect),
|
|
385
386
|
"data-testid": `sidebar-profile-door-${t.id}`,
|
|
386
387
|
className: "flex flex-col items-start gap-1.5 rounded-card border border-border-default p-3 text-start outline-none transition-colors hover:bg-bg-sunken focus-visible:ring-2 focus-visible:ring-focus-ring",
|
|
387
|
-
children:
|
|
388
|
+
children: ft(t)
|
|
388
389
|
}, t.id)),
|
|
389
390
|
/* @__PURE__ */ k("div", {
|
|
390
391
|
className: "pt-1.5",
|
|
@@ -407,30 +408,30 @@ function P({ user: n, roleLabel: a, orgName: fe, planChip: x, accounts: ve = [],
|
|
|
407
408
|
}, t.id);
|
|
408
409
|
})
|
|
409
410
|
}),
|
|
410
|
-
|
|
411
|
+
ht && V && K && /* @__PURE__ */ k(D, { children: [r("views", ve, V.label, void 0), G === "views" && /* @__PURE__ */ O("div", {
|
|
411
412
|
role: "group",
|
|
412
413
|
"aria-label": V.label,
|
|
413
414
|
className: "mb-1 ms-6 border-s border-border-subtle ps-2",
|
|
414
415
|
"data-testid": "sidebar-profile-views-list",
|
|
415
|
-
children: /* @__PURE__ */ O(
|
|
416
|
+
children: /* @__PURE__ */ O(oe, {
|
|
416
417
|
persona: K,
|
|
417
418
|
everythingLabel: W("nav.everything", "Everything"),
|
|
418
|
-
query:
|
|
419
|
+
query: Ue,
|
|
419
420
|
onQueryChange: q,
|
|
420
|
-
close:
|
|
421
|
-
onOpenCustomize:
|
|
421
|
+
close: gt,
|
|
422
|
+
onOpenCustomize: _t,
|
|
422
423
|
sectionClass: "px-2.5 pb-1 pt-2 text-caption font-semibold uppercase tracking-wider text-text-muted",
|
|
423
|
-
renderRow:
|
|
424
|
+
renderRow: ee
|
|
424
425
|
})
|
|
425
426
|
})] }),
|
|
426
427
|
/* @__PURE__ */ k("button", {
|
|
427
428
|
type: "button",
|
|
428
|
-
className:
|
|
429
|
-
onClick: () => e(
|
|
429
|
+
className: v,
|
|
430
|
+
onClick: () => e(Ne),
|
|
430
431
|
"data-testid": "sidebar-profile-settings",
|
|
431
432
|
children: [
|
|
432
|
-
/* @__PURE__ */ O(
|
|
433
|
-
className:
|
|
433
|
+
/* @__PURE__ */ O(De, {
|
|
434
|
+
className: g,
|
|
434
435
|
"aria-hidden": "true"
|
|
435
436
|
}),
|
|
436
437
|
/* @__PURE__ */ O("span", {
|
|
@@ -443,7 +444,7 @@ function P({ user: n, roleLabel: a, orgName: fe, planChip: x, accounts: ve = [],
|
|
|
443
444
|
})
|
|
444
445
|
]
|
|
445
446
|
}),
|
|
446
|
-
r("appearance",
|
|
447
|
+
r("appearance", ct, Q.appearance, st),
|
|
447
448
|
o("appearance", [...Z.map(({ value: e, label: t }) => ({
|
|
448
449
|
id: e,
|
|
449
450
|
label: t,
|
|
@@ -454,24 +455,24 @@ function P({ user: n, roleLabel: a, orgName: fe, planChip: x, accounts: ve = [],
|
|
|
454
455
|
label: L.more.label,
|
|
455
456
|
onSelect: L.more.onSelect
|
|
456
457
|
}] : []]),
|
|
457
|
-
r("language",
|
|
458
|
+
r("language", xe, Q.language, lt),
|
|
458
459
|
o("language", R.options.map((e) => ({
|
|
459
460
|
id: e.code,
|
|
460
461
|
label: e.label,
|
|
461
462
|
selected: e.code === R.current,
|
|
462
463
|
onSelect: () => R.onChange(e.code)
|
|
463
464
|
}))),
|
|
464
|
-
|
|
465
|
+
ut && /* @__PURE__ */ k(D, { children: [r("help", Se, Q.help, void 0), B ? G === "help" && /* @__PURE__ */ O("div", {
|
|
465
466
|
role: "group",
|
|
466
467
|
"aria-label": Q.help,
|
|
467
468
|
className: "mb-1 ms-6 border-s border-border-subtle ps-2",
|
|
468
469
|
"data-testid": "sidebar-profile-help-list",
|
|
469
|
-
children:
|
|
470
|
+
children: ce({
|
|
470
471
|
help: B,
|
|
471
472
|
variant: "sheet",
|
|
472
|
-
state:
|
|
473
|
+
state: Re,
|
|
473
474
|
close: () => J(!1),
|
|
474
|
-
idBase:
|
|
475
|
+
idBase: ze
|
|
475
476
|
})
|
|
476
477
|
}) : o("help", z.map((e) => ({
|
|
477
478
|
id: e.id,
|
|
@@ -484,11 +485,11 @@ function P({ user: n, roleLabel: a, orgName: fe, planChip: x, accounts: ve = [],
|
|
|
484
485
|
className: "mt-2 border-t border-border-subtle pt-2",
|
|
485
486
|
children: /* @__PURE__ */ k("button", {
|
|
486
487
|
type: "button",
|
|
487
|
-
className:
|
|
488
|
+
className: v,
|
|
488
489
|
onClick: () => e(N),
|
|
489
490
|
"data-testid": "sidebar-profile-logout",
|
|
490
|
-
children: [/* @__PURE__ */ O(
|
|
491
|
-
className:
|
|
491
|
+
children: [/* @__PURE__ */ O(Ce, {
|
|
492
|
+
className: g,
|
|
492
493
|
"aria-hidden": "true"
|
|
493
494
|
}), /* @__PURE__ */ O("span", {
|
|
494
495
|
className: "truncate",
|
|
@@ -500,7 +501,7 @@ function P({ user: n, roleLabel: a, orgName: fe, planChip: x, accounts: ve = [],
|
|
|
500
501
|
})]
|
|
501
502
|
});
|
|
502
503
|
}
|
|
503
|
-
let
|
|
504
|
+
let yt = /* @__PURE__ */ k("button", {
|
|
504
505
|
type: "button",
|
|
505
506
|
"aria-label": H ? X : void 0,
|
|
506
507
|
title: H ? n.name : void 0,
|
|
@@ -511,46 +512,48 @@ function P({ user: n, roleLabel: a, orgName: fe, planChip: x, accounts: ve = [],
|
|
|
511
512
|
children: [/* @__PURE__ */ O("span", {
|
|
512
513
|
className: "block truncate text-body-sm font-semibold text-text-primary",
|
|
513
514
|
children: n.name
|
|
514
|
-
}),
|
|
515
|
+
}), it && /* @__PURE__ */ O("span", {
|
|
515
516
|
className: "block truncate text-xs text-text-muted",
|
|
516
|
-
children:
|
|
517
|
+
children: it
|
|
517
518
|
})]
|
|
518
|
-
}),
|
|
519
|
+
}), b && /* @__PURE__ */ O("span", {
|
|
519
520
|
className: "flex-shrink-0 rounded-pill bg-accent-soft px-2 py-0.5 text-caption font-semibold text-accent-primary",
|
|
520
521
|
"data-testid": "sidebar-profile-plan-chip",
|
|
521
|
-
children:
|
|
522
|
+
children: b
|
|
522
523
|
})] })]
|
|
523
524
|
});
|
|
524
525
|
return /* @__PURE__ */ k(o, {
|
|
525
|
-
open:
|
|
526
|
+
open: Ye,
|
|
526
527
|
onOpenChange: J,
|
|
527
528
|
modal: !1,
|
|
528
|
-
children: [/* @__PURE__ */ O(
|
|
529
|
+
children: [/* @__PURE__ */ O(te, {
|
|
529
530
|
asChild: !0,
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
531
|
+
ref: Ke,
|
|
532
|
+
children: Le ?? yt
|
|
533
|
+
}), /* @__PURE__ */ k(ee, {
|
|
534
|
+
ref: Je,
|
|
535
|
+
side: qe?.side ?? "top",
|
|
536
|
+
align: qe?.align ?? "start",
|
|
537
|
+
sideOffset: qe?.sideOffset ?? 8,
|
|
535
538
|
collisionPadding: 8,
|
|
536
539
|
"aria-label": X,
|
|
537
540
|
"data-testid": "sidebar-profile-menu",
|
|
538
|
-
className: i(
|
|
541
|
+
className: i(ue, "max-h-[calc(100dvh-5rem)] w-[315px] overflow-y-auto"),
|
|
539
542
|
children: [
|
|
540
|
-
|
|
543
|
+
rt ? /* @__PURE__ */ k(p, { children: [/* @__PURE__ */ O(h, {
|
|
541
544
|
className: "gap-3 rounded-button px-1.5 py-2 focus:bg-bg-sunken",
|
|
542
545
|
"data-testid": "sidebar-profile-identity",
|
|
543
546
|
children: $
|
|
544
|
-
}), /* @__PURE__ */ k(
|
|
547
|
+
}), /* @__PURE__ */ k(m, {
|
|
545
548
|
sideOffset: 8,
|
|
546
549
|
"data-testid": "sidebar-profile-accounts",
|
|
547
|
-
className: i(
|
|
550
|
+
className: i(y, "w-72"),
|
|
548
551
|
children: [
|
|
549
|
-
j && /* @__PURE__ */ k(
|
|
552
|
+
j && /* @__PURE__ */ k(c, {
|
|
550
553
|
className: "h-control-sm gap-3 rounded-button px-2.5 focus:bg-bg-sunken",
|
|
551
554
|
onSelect: () => j(),
|
|
552
555
|
"data-testid": "sidebar-profile-view-profile",
|
|
553
|
-
children: [/* @__PURE__ */ O(
|
|
556
|
+
children: [/* @__PURE__ */ O(Oe, {
|
|
554
557
|
className: "size-4 flex-shrink-0 text-text-secondary",
|
|
555
558
|
"aria-hidden": "true"
|
|
556
559
|
}), /* @__PURE__ */ O("span", {
|
|
@@ -558,14 +561,14 @@ function P({ user: n, roleLabel: a, orgName: fe, planChip: x, accounts: ve = [],
|
|
|
558
561
|
children: Q.viewProfile
|
|
559
562
|
})]
|
|
560
563
|
}),
|
|
561
|
-
|
|
564
|
+
nt && /* @__PURE__ */ k(D, { children: [/* @__PURE__ */ O("div", {
|
|
562
565
|
role: "presentation",
|
|
563
566
|
className: "px-2.5 pb-1 pt-2 text-caption font-semibold uppercase tracking-wider text-text-muted",
|
|
564
|
-
children:
|
|
565
|
-
}),
|
|
567
|
+
children: et
|
|
568
|
+
}), tt.map((e) => /* @__PURE__ */ k("div", {
|
|
566
569
|
role: "none",
|
|
567
570
|
className: "flex items-center gap-1",
|
|
568
|
-
children: [/* @__PURE__ */ k(
|
|
571
|
+
children: [/* @__PURE__ */ k(c, {
|
|
569
572
|
className: "min-w-0 flex-1 gap-3 rounded-button px-2.5 py-1.5 focus:bg-bg-sunken",
|
|
570
573
|
onSelect: () => T?.(e.id),
|
|
571
574
|
"data-testid": `sidebar-profile-account-${e.id}`,
|
|
@@ -579,22 +582,22 @@ function P({ user: n, roleLabel: a, orgName: fe, planChip: x, accounts: ve = [],
|
|
|
579
582
|
children: e.email
|
|
580
583
|
})]
|
|
581
584
|
})]
|
|
582
|
-
}), A && /* @__PURE__ */ O(
|
|
583
|
-
"aria-label":
|
|
585
|
+
}), A && /* @__PURE__ */ O(c, {
|
|
586
|
+
"aria-label": dt(e),
|
|
584
587
|
className: "size-8 flex-shrink-0 justify-center rounded-button p-0 text-text-muted focus:bg-bg-sunken",
|
|
585
588
|
onSelect: () => A(e.id),
|
|
586
589
|
"data-testid": `sidebar-profile-remove-${e.id}`,
|
|
587
|
-
children: /* @__PURE__ */ O(
|
|
590
|
+
children: /* @__PURE__ */ O(ke, {
|
|
588
591
|
className: "size-4",
|
|
589
592
|
"aria-hidden": "true"
|
|
590
593
|
})
|
|
591
594
|
})]
|
|
592
595
|
}, e.id))] }),
|
|
593
|
-
E && /* @__PURE__ */ k(
|
|
596
|
+
E && /* @__PURE__ */ k(c, {
|
|
594
597
|
className: "h-control-sm gap-3 rounded-button px-2.5 focus:bg-bg-sunken",
|
|
595
598
|
onSelect: () => E(),
|
|
596
599
|
"data-testid": "sidebar-profile-add-account",
|
|
597
|
-
children: [/* @__PURE__ */ O(
|
|
600
|
+
children: [/* @__PURE__ */ O(Ee, {
|
|
598
601
|
className: "size-4 flex-shrink-0 text-text-secondary",
|
|
599
602
|
"aria-hidden": "true"
|
|
600
603
|
}), /* @__PURE__ */ O("span", {
|
|
@@ -608,22 +611,22 @@ function P({ user: n, roleLabel: a, orgName: fe, planChip: x, accounts: ve = [],
|
|
|
608
611
|
"data-testid": "sidebar-profile-identity",
|
|
609
612
|
children: $
|
|
610
613
|
}),
|
|
611
|
-
|
|
614
|
+
mt && /* @__PURE__ */ O(je.Provider, {
|
|
612
615
|
value: !0,
|
|
613
|
-
children:
|
|
616
|
+
children: mt
|
|
614
617
|
}),
|
|
615
|
-
|
|
618
|
+
pt((e) => /* @__PURE__ */ O(c, {
|
|
616
619
|
onSelect: () => e.onSelect(),
|
|
617
620
|
"data-testid": `sidebar-profile-door-${e.id}`,
|
|
618
621
|
className: "flex-col items-start gap-1.5 rounded-card border border-border-default p-3 focus:bg-bg-sunken",
|
|
619
|
-
children:
|
|
622
|
+
children: ft(e)
|
|
620
623
|
}, e.id)),
|
|
621
|
-
F.length > 0 && /* @__PURE__ */ O(
|
|
624
|
+
F.length > 0 && /* @__PURE__ */ O(s, {
|
|
622
625
|
className: "mt-1",
|
|
623
626
|
"data-testid": "sidebar-profile-extra",
|
|
624
627
|
children: F.map((e) => {
|
|
625
628
|
let t = e.icon;
|
|
626
|
-
return /* @__PURE__ */ k(
|
|
629
|
+
return /* @__PURE__ */ k(c, {
|
|
627
630
|
className: "h-control-sm gap-3 rounded-button px-2.5 focus:bg-bg-sunken",
|
|
628
631
|
disabled: e.disabled,
|
|
629
632
|
onSelect: () => e.onSelect(),
|
|
@@ -634,7 +637,7 @@ function P({ user: n, roleLabel: a, orgName: fe, planChip: x, accounts: ve = [],
|
|
|
634
637
|
className: "min-w-0 flex-1 truncate",
|
|
635
638
|
children: e.label
|
|
636
639
|
}),
|
|
637
|
-
e.shortcut && /* @__PURE__ */ O(
|
|
640
|
+
e.shortcut && /* @__PURE__ */ O(f, {
|
|
638
641
|
className: "tracking-normal",
|
|
639
642
|
children: e.shortcut
|
|
640
643
|
})
|
|
@@ -642,32 +645,32 @@ function P({ user: n, roleLabel: a, orgName: fe, planChip: x, accounts: ve = [],
|
|
|
642
645
|
}, e.id);
|
|
643
646
|
})
|
|
644
647
|
}),
|
|
645
|
-
|
|
646
|
-
/* @__PURE__ */ k(
|
|
647
|
-
className: i(
|
|
648
|
-
onSelect: () =>
|
|
648
|
+
vt,
|
|
649
|
+
/* @__PURE__ */ k(c, {
|
|
650
|
+
className: i(_, F.length > 0 || vt ? void 0 : "mt-1"),
|
|
651
|
+
onSelect: () => Ne(),
|
|
649
652
|
"data-testid": "sidebar-profile-settings",
|
|
650
653
|
children: [
|
|
651
|
-
/* @__PURE__ */ O(
|
|
652
|
-
className:
|
|
654
|
+
/* @__PURE__ */ O(De, {
|
|
655
|
+
className: g,
|
|
653
656
|
"aria-hidden": "true"
|
|
654
657
|
}),
|
|
655
658
|
/* @__PURE__ */ O("span", {
|
|
656
659
|
className: "min-w-0 flex-1 truncate",
|
|
657
660
|
children: Q.settings
|
|
658
661
|
}),
|
|
659
|
-
I && /* @__PURE__ */ O(
|
|
662
|
+
I && /* @__PURE__ */ O(f, {
|
|
660
663
|
className: "tracking-normal",
|
|
661
664
|
children: I
|
|
662
665
|
})
|
|
663
666
|
]
|
|
664
667
|
}),
|
|
665
|
-
/* @__PURE__ */ k(
|
|
666
|
-
className:
|
|
668
|
+
/* @__PURE__ */ k(p, { children: [/* @__PURE__ */ k(h, {
|
|
669
|
+
className: _,
|
|
667
670
|
"data-testid": "sidebar-profile-appearance",
|
|
668
671
|
children: [
|
|
669
|
-
/* @__PURE__ */ O(
|
|
670
|
-
className:
|
|
672
|
+
/* @__PURE__ */ O(ct, {
|
|
673
|
+
className: g,
|
|
671
674
|
"aria-hidden": "true"
|
|
672
675
|
}),
|
|
673
676
|
/* @__PURE__ */ O("span", {
|
|
@@ -675,28 +678,28 @@ function P({ user: n, roleLabel: a, orgName: fe, planChip: x, accounts: ve = [],
|
|
|
675
678
|
children: Q.appearance
|
|
676
679
|
}),
|
|
677
680
|
/* @__PURE__ */ O("span", {
|
|
678
|
-
className:
|
|
679
|
-
children:
|
|
681
|
+
className: fe,
|
|
682
|
+
children: st
|
|
680
683
|
})
|
|
681
684
|
]
|
|
682
|
-
}), /* @__PURE__ */ k(
|
|
685
|
+
}), /* @__PURE__ */ k(m, {
|
|
683
686
|
sideOffset: 8,
|
|
684
687
|
"data-testid": "sidebar-profile-appearance-menu",
|
|
685
|
-
className: i(
|
|
686
|
-
children: [/* @__PURE__ */ O(
|
|
688
|
+
className: i(y, "w-56"),
|
|
689
|
+
children: [/* @__PURE__ */ O(l, {
|
|
687
690
|
value: L.value,
|
|
688
691
|
onValueChange: (e) => {
|
|
689
692
|
let t = Z.find((t) => t.value === e);
|
|
690
693
|
t && L.onChange(t.value);
|
|
691
694
|
},
|
|
692
695
|
children: Z.map(({ value: e, label: t }) => {
|
|
693
|
-
let n =
|
|
694
|
-
return /* @__PURE__ */ k(
|
|
696
|
+
let n = Ae[e] ?? Te;
|
|
697
|
+
return /* @__PURE__ */ k(u, {
|
|
695
698
|
value: e,
|
|
696
699
|
className: "h-control-sm gap-2.5 rounded-button focus:bg-bg-sunken",
|
|
697
700
|
"data-testid": `sidebar-profile-appearance-${e}`,
|
|
698
701
|
children: [/* @__PURE__ */ O(n, {
|
|
699
|
-
className:
|
|
702
|
+
className: g,
|
|
700
703
|
"aria-hidden": "true"
|
|
701
704
|
}), /* @__PURE__ */ O("span", {
|
|
702
705
|
className: "truncate",
|
|
@@ -704,7 +707,7 @@ function P({ user: n, roleLabel: a, orgName: fe, planChip: x, accounts: ve = [],
|
|
|
704
707
|
})]
|
|
705
708
|
}, e);
|
|
706
709
|
})
|
|
707
|
-
}), L.more && /* @__PURE__ */ k(D, { children: [/* @__PURE__ */ O(
|
|
710
|
+
}), L.more && /* @__PURE__ */ k(D, { children: [/* @__PURE__ */ O(d, {}), /* @__PURE__ */ O(c, {
|
|
708
711
|
className: "h-control-sm gap-3 rounded-button px-2.5 focus:bg-bg-sunken",
|
|
709
712
|
onSelect: () => L.more?.onSelect(),
|
|
710
713
|
"data-testid": "sidebar-profile-appearance-more",
|
|
@@ -714,12 +717,12 @@ function P({ user: n, roleLabel: a, orgName: fe, planChip: x, accounts: ve = [],
|
|
|
714
717
|
})
|
|
715
718
|
})] })]
|
|
716
719
|
})] }),
|
|
717
|
-
/* @__PURE__ */ k(
|
|
718
|
-
className:
|
|
720
|
+
/* @__PURE__ */ k(p, { children: [/* @__PURE__ */ k(h, {
|
|
721
|
+
className: _,
|
|
719
722
|
"data-testid": "sidebar-profile-language",
|
|
720
723
|
children: [
|
|
721
|
-
/* @__PURE__ */ O(
|
|
722
|
-
className:
|
|
724
|
+
/* @__PURE__ */ O(xe, {
|
|
725
|
+
className: g,
|
|
723
726
|
"aria-hidden": "true"
|
|
724
727
|
}),
|
|
725
728
|
/* @__PURE__ */ O("span", {
|
|
@@ -727,18 +730,18 @@ function P({ user: n, roleLabel: a, orgName: fe, planChip: x, accounts: ve = [],
|
|
|
727
730
|
children: Q.language
|
|
728
731
|
}),
|
|
729
732
|
/* @__PURE__ */ O("span", {
|
|
730
|
-
className:
|
|
731
|
-
children:
|
|
733
|
+
className: fe,
|
|
734
|
+
children: lt
|
|
732
735
|
})
|
|
733
736
|
]
|
|
734
|
-
}), /* @__PURE__ */ O(
|
|
737
|
+
}), /* @__PURE__ */ O(m, {
|
|
735
738
|
sideOffset: 8,
|
|
736
739
|
"data-testid": "sidebar-profile-language-menu",
|
|
737
|
-
className: i(
|
|
738
|
-
children: /* @__PURE__ */ O(
|
|
740
|
+
className: i(y, "w-56"),
|
|
741
|
+
children: /* @__PURE__ */ O(l, {
|
|
739
742
|
value: R.current,
|
|
740
743
|
onValueChange: (e) => R.onChange(e),
|
|
741
|
-
children: R.options.map((e) => /* @__PURE__ */ O(
|
|
744
|
+
children: R.options.map((e) => /* @__PURE__ */ O(u, {
|
|
742
745
|
value: e.code,
|
|
743
746
|
className: "h-control-sm rounded-button focus:bg-bg-sunken",
|
|
744
747
|
"data-testid": `sidebar-profile-language-${e.code}`,
|
|
@@ -749,35 +752,35 @@ function P({ user: n, roleLabel: a, orgName: fe, planChip: x, accounts: ve = [],
|
|
|
749
752
|
}, e.code))
|
|
750
753
|
})
|
|
751
754
|
})] }),
|
|
752
|
-
|
|
755
|
+
ut && /* @__PURE__ */ k(p, { children: [/* @__PURE__ */ k(h, {
|
|
753
756
|
className: "h-control-sm gap-3 rounded-button px-2.5 focus:bg-bg-sunken",
|
|
754
757
|
"data-testid": "sidebar-profile-help",
|
|
755
|
-
children: [/* @__PURE__ */ O(
|
|
758
|
+
children: [/* @__PURE__ */ O(Se, {
|
|
756
759
|
className: "size-4 flex-shrink-0 text-text-secondary",
|
|
757
760
|
"aria-hidden": "true"
|
|
758
761
|
}), /* @__PURE__ */ O("span", {
|
|
759
762
|
className: "min-w-0 flex-1 truncate",
|
|
760
763
|
children: Q.help
|
|
761
764
|
})]
|
|
762
|
-
}), B ? /* @__PURE__ */ O(
|
|
765
|
+
}), B ? /* @__PURE__ */ O(m, {
|
|
763
766
|
sideOffset: 8,
|
|
764
767
|
collisionPadding: 8,
|
|
765
768
|
"data-testid": "sidebar-profile-help-menu",
|
|
766
769
|
className: i("rounded-card border border-border-subtle bg-popover p-1.5 shadow-overlay", "w-[340px] max-w-[calc(100vw-1rem)] max-h-[var(--radix-dropdown-menu-content-available-height)] overflow-y-auto overscroll-contain data-[state=open]:animate-none data-[state=closed]:animate-none motion-safe:data-[state=open]:animate-in motion-safe:data-[state=closed]:animate-out"),
|
|
767
|
-
children:
|
|
770
|
+
children: ce({
|
|
768
771
|
help: B,
|
|
769
772
|
variant: "popover",
|
|
770
|
-
state:
|
|
773
|
+
state: Re,
|
|
771
774
|
close: () => J(!1),
|
|
772
|
-
idBase:
|
|
775
|
+
idBase: ze
|
|
773
776
|
})
|
|
774
|
-
}) : /* @__PURE__ */ O(
|
|
777
|
+
}) : /* @__PURE__ */ O(m, {
|
|
775
778
|
sideOffset: 8,
|
|
776
779
|
"data-testid": "sidebar-profile-help-menu",
|
|
777
780
|
className: i("max-h-80 overflow-y-auto rounded-card border border-border-subtle bg-popover p-1.5 shadow-overlay", "w-60"),
|
|
778
781
|
children: z.map((e) => {
|
|
779
782
|
let t = e.icon;
|
|
780
|
-
return /* @__PURE__ */ k(
|
|
783
|
+
return /* @__PURE__ */ k(c, {
|
|
781
784
|
className: "h-control-sm gap-3 rounded-button px-2.5 focus:bg-bg-sunken",
|
|
782
785
|
disabled: e.disabled,
|
|
783
786
|
onSelect: () => e.onSelect(),
|
|
@@ -788,7 +791,7 @@ function P({ user: n, roleLabel: a, orgName: fe, planChip: x, accounts: ve = [],
|
|
|
788
791
|
className: "min-w-0 flex-1 truncate",
|
|
789
792
|
children: e.label
|
|
790
793
|
}),
|
|
791
|
-
e.shortcut && /* @__PURE__ */ O(
|
|
794
|
+
e.shortcut && /* @__PURE__ */ O(f, {
|
|
792
795
|
className: "tracking-normal",
|
|
793
796
|
children: e.shortcut
|
|
794
797
|
})
|
|
@@ -796,12 +799,12 @@ function P({ user: n, roleLabel: a, orgName: fe, planChip: x, accounts: ve = [],
|
|
|
796
799
|
}, e.id);
|
|
797
800
|
})
|
|
798
801
|
})] }),
|
|
799
|
-
|
|
802
|
+
Pe && /* @__PURE__ */ k(c, {
|
|
800
803
|
className: "h-control-sm gap-3 rounded-button px-2.5 focus:bg-bg-sunken",
|
|
801
|
-
onSelect: () =>
|
|
804
|
+
onSelect: () => Pe(),
|
|
802
805
|
"data-testid": "sidebar-profile-shortcuts",
|
|
803
806
|
children: [
|
|
804
|
-
/* @__PURE__ */ O(
|
|
807
|
+
/* @__PURE__ */ O(be, {
|
|
805
808
|
className: "size-4 flex-shrink-0 text-text-secondary",
|
|
806
809
|
"aria-hidden": "true"
|
|
807
810
|
}),
|
|
@@ -809,19 +812,19 @@ function P({ user: n, roleLabel: a, orgName: fe, planChip: x, accounts: ve = [],
|
|
|
809
812
|
className: "min-w-0 flex-1 truncate",
|
|
810
813
|
children: Q.shortcuts
|
|
811
814
|
}),
|
|
812
|
-
/* @__PURE__ */ O(
|
|
815
|
+
/* @__PURE__ */ O(f, {
|
|
813
816
|
className: "tracking-normal",
|
|
814
817
|
children: "?"
|
|
815
818
|
})
|
|
816
819
|
]
|
|
817
820
|
}),
|
|
818
|
-
/* @__PURE__ */ O(
|
|
819
|
-
/* @__PURE__ */ k(
|
|
820
|
-
className:
|
|
821
|
+
/* @__PURE__ */ O(d, { className: "my-1.5" }),
|
|
822
|
+
/* @__PURE__ */ k(c, {
|
|
823
|
+
className: _,
|
|
821
824
|
onSelect: () => N(),
|
|
822
825
|
"data-testid": "sidebar-profile-logout",
|
|
823
|
-
children: [/* @__PURE__ */ O(
|
|
824
|
-
className:
|
|
826
|
+
children: [/* @__PURE__ */ O(Ce, {
|
|
827
|
+
className: g,
|
|
825
828
|
"aria-hidden": "true"
|
|
826
829
|
}), /* @__PURE__ */ O("span", {
|
|
827
830
|
className: "truncate",
|