@burdenoff/fe-libs 2026.1119.6 → 2026.1119.8
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/PersonaSurfaceControls.js +82 -189
- package/dist/chrome/PersonaViewsList.d.ts +28 -0
- package/dist/chrome/PersonaViewsList.js +139 -0
- package/dist/chrome/personaViewOptions.d.ts +8 -0
- package/dist/chrome/personaViewOptions.js +14 -0
- package/dist/chrome/shell/NewMenu.d.ts +13 -1
- package/dist/chrome/shell/NewMenu.js +27 -14
- package/dist/chrome/shell/ShellSidebar.js +159 -157
- package/dist/chrome/shell/SidebarProfileMenu.d.ts +36 -4
- package/dist/chrome/shell/SidebarProfileMenu.js +408 -313
- package/dist/chrome/shell/WorkspaceAccountCard.d.ts +22 -0
- package/dist/chrome/shell/WorkspaceAccountCard.js +107 -0
- package/dist/chrome/shell/WorkspaceMenu.js +140 -136
- package/dist/chrome/shell/pageHost.d.ts +19 -0
- package/dist/chrome/shell/pageHost.js +21 -0
- package/dist/chrome/shell/pageWidth.d.ts +39 -0
- package/dist/chrome/shell/pageWidth.js +18 -0
- 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/shared/backgrounds/BackgroundSettingsSection.d.ts +11 -0
- package/dist/shared/backgrounds/BackgroundSettingsSection.js +67 -0
- package/dist/shared/backgrounds/backgroundSectionLabels.d.ts +14 -0
- package/dist/shared/backgrounds/backgroundSectionLabels.js +36 -0
- package/dist/shared/backgrounds/index.d.ts +3 -0
- package/dist/shared/backgrounds/useStartPageBackground.d.ts +12 -0
- package/dist/shared/backgrounds/useStartPageBackground.js +23 -0
- package/dist/shared-backgrounds.js +4 -1
- 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 +5 -1
- package/src/shared/styles/page-widths.css +38 -0
- package/src/shared/tokens/build/brands/healthybowl.css +25 -3
- package/src/shared/tokens/display-settings.css +3 -0
|
@@ -1,415 +1,499 @@
|
|
|
1
1
|
import { useAssistantControl as e } from "../../shared/assistant/appControls/useAssistantControl.js";
|
|
2
2
|
import { useShellLabel as t, useShellNumberFormat as n } from "../../shared/providers/shell/useShellLabel.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
3
|
+
import { useSafePersonaSurface as r } from "../../shared/providers/shell/PersonaSurfaceProvider.js";
|
|
4
|
+
import { cn as i } from "../../shared-utils.js";
|
|
5
|
+
import { Button as a } from "../../ui/button.js";
|
|
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";
|
|
6
7
|
import { Sheet as ne, SheetContent as re, SheetTitle as ie, SheetTrigger as ae } from "../../ui/sheet.js";
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
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";
|
|
14
|
+
import { Fragment as D, jsx as O, jsxs as k } from "react/jsx-runtime";
|
|
12
15
|
// src/chrome/shell/SidebarProfileMenu.tsx
|
|
13
|
-
var
|
|
14
|
-
dark:
|
|
15
|
-
light:
|
|
16
|
-
system:
|
|
16
|
+
var Ae = {
|
|
17
|
+
dark: T,
|
|
18
|
+
light: E,
|
|
19
|
+
system: we
|
|
17
20
|
};
|
|
18
|
-
function
|
|
21
|
+
function A(e) {
|
|
19
22
|
let t = e.trim().split(/\s+/).filter(Boolean);
|
|
20
23
|
return `${t[0]?.charAt(0) ?? ""}${t.length > 1 ? t[t.length - 1]?.charAt(0) ?? "" : ""}`.toUpperCase() || "?";
|
|
21
24
|
}
|
|
22
|
-
var
|
|
25
|
+
var j = {
|
|
23
26
|
sm: "size-6",
|
|
24
27
|
md: "size-8",
|
|
25
28
|
lg: "size-10"
|
|
26
29
|
};
|
|
27
|
-
function
|
|
28
|
-
return /* @__PURE__ */
|
|
30
|
+
function M(e, t, n) {
|
|
31
|
+
return /* @__PURE__ */ O("span", {
|
|
29
32
|
"aria-hidden": "true",
|
|
30
|
-
className: `${
|
|
31
|
-
children: t ? /* @__PURE__ */
|
|
33
|
+
className: `${j[n]} flex flex-shrink-0 items-center justify-center overflow-hidden rounded-full bg-linear-to-br from-brand-primary to-brand-secondary`,
|
|
34
|
+
children: t ? /* @__PURE__ */ O("img", {
|
|
32
35
|
src: t,
|
|
33
36
|
alt: "",
|
|
34
37
|
className: "h-full w-full object-cover"
|
|
35
|
-
}) : /* @__PURE__ */
|
|
38
|
+
}) : /* @__PURE__ */ O("span", {
|
|
36
39
|
className: `${n === "lg" ? "text-body-sm" : "text-caption"} font-semibold text-action-primary-text`,
|
|
37
|
-
children:
|
|
40
|
+
children: A(e)
|
|
38
41
|
})
|
|
39
42
|
});
|
|
40
43
|
}
|
|
41
|
-
var
|
|
42
|
-
function
|
|
43
|
-
let
|
|
44
|
-
used:
|
|
45
|
-
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)
|
|
46
49
|
}) : void 0);
|
|
47
|
-
return /* @__PURE__ */
|
|
50
|
+
return /* @__PURE__ */ k("div", {
|
|
48
51
|
className: "rounded-button border border-border-subtle bg-bg-surface p-3",
|
|
49
52
|
"data-testid": "shell-plan-card",
|
|
50
53
|
children: [
|
|
51
|
-
/* @__PURE__ */
|
|
54
|
+
/* @__PURE__ */ k("div", {
|
|
52
55
|
className: "flex items-center gap-2",
|
|
53
56
|
children: [
|
|
54
|
-
/* @__PURE__ */
|
|
57
|
+
/* @__PURE__ */ O(ye, {
|
|
55
58
|
className: "size-4 flex-shrink-0 text-text-primary",
|
|
56
59
|
"aria-hidden": "true"
|
|
57
60
|
}),
|
|
58
|
-
/* @__PURE__ */
|
|
61
|
+
/* @__PURE__ */ O("span", {
|
|
59
62
|
className: "min-w-0 flex-1 truncate text-body-sm font-semibold text-text-primary",
|
|
60
63
|
children: e
|
|
61
64
|
}),
|
|
62
|
-
|
|
65
|
+
u ? /* @__PURE__ */ O(c, {
|
|
63
66
|
onSelect: () => r(),
|
|
64
67
|
"data-testid": "shell-plan-manage",
|
|
65
68
|
className: "h-7 flex-shrink-0 rounded-button border border-border-default px-2.5 font-medium focus:bg-bg-sunken",
|
|
66
|
-
children: /* @__PURE__ */
|
|
69
|
+
children: /* @__PURE__ */ O("span", {
|
|
67
70
|
className: "text-xs",
|
|
68
71
|
children: d
|
|
69
72
|
})
|
|
70
|
-
}) : /* @__PURE__ */
|
|
73
|
+
}) : /* @__PURE__ */ O(a, {
|
|
71
74
|
type: "button",
|
|
72
75
|
variant: "outline",
|
|
73
76
|
size: "sm",
|
|
74
77
|
onClick: r,
|
|
75
78
|
"data-testid": "shell-plan-manage",
|
|
76
79
|
className: "h-7 px-2.5",
|
|
77
|
-
children: /* @__PURE__ */
|
|
80
|
+
children: /* @__PURE__ */ O("span", {
|
|
78
81
|
className: "text-xs",
|
|
79
82
|
children: d
|
|
80
83
|
})
|
|
81
84
|
})
|
|
82
85
|
]
|
|
83
86
|
}),
|
|
84
|
-
f && /* @__PURE__ */
|
|
87
|
+
f && /* @__PURE__ */ O("div", {
|
|
85
88
|
role: "progressbar",
|
|
86
89
|
"aria-valuemin": 0,
|
|
87
90
|
"aria-valuemax": o,
|
|
88
|
-
"aria-valuenow":
|
|
91
|
+
"aria-valuenow": i,
|
|
89
92
|
"aria-label": m ?? e,
|
|
90
93
|
className: "mt-3 h-1 w-full overflow-hidden rounded-pill bg-bg-sunken",
|
|
91
|
-
children: /* @__PURE__ */
|
|
94
|
+
children: /* @__PURE__ */ O("div", {
|
|
92
95
|
className: "h-full rounded-pill bg-linear-to-r from-action-primary-bg to-brand-secondary",
|
|
93
96
|
style: { width: `${p}%` }
|
|
94
97
|
})
|
|
95
98
|
}),
|
|
96
|
-
m && /* @__PURE__ */
|
|
99
|
+
m && /* @__PURE__ */ O("p", {
|
|
97
100
|
className: "mt-2 truncate text-xs text-text-muted",
|
|
98
101
|
children: m
|
|
99
102
|
})
|
|
100
103
|
]
|
|
101
104
|
});
|
|
102
105
|
}
|
|
103
|
-
function
|
|
104
|
-
let
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
let
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
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?.();
|
|
110
|
+
}, [
|
|
111
|
+
G,
|
|
112
|
+
We,
|
|
113
|
+
Ge
|
|
114
|
+
]);
|
|
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;
|
|
120
|
+
}, [N]);
|
|
121
|
+
let Ze = ge(() => ({ run: () => (Xe.current(), { status: "done" }) }), []);
|
|
122
|
+
e("account.logout", Ze);
|
|
123
|
+
let Y = S(R);
|
|
124
|
+
x(() => {
|
|
125
|
+
Y.current = R;
|
|
126
|
+
}, [R]);
|
|
127
|
+
let Qe = ge(() => ({
|
|
128
|
+
languages: () => Y.current.options.map((e) => ({
|
|
118
129
|
code: e.code,
|
|
119
130
|
label: e.label
|
|
120
131
|
})),
|
|
121
|
-
current: () =>
|
|
132
|
+
current: () => Y.current.current,
|
|
122
133
|
set: (e) => {
|
|
123
|
-
let t =
|
|
134
|
+
let t = Y.current, n = e.toLowerCase(), r = t.options.find((e) => e.code.toLowerCase() === n);
|
|
124
135
|
return r ? r.code === t.current ? { status: "already" } : (t.onChange(r.code), { status: "done" }) : { status: "failed" };
|
|
125
136
|
}
|
|
126
137
|
}), []);
|
|
127
|
-
if (e("language",
|
|
128
|
-
let
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
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 = [
|
|
140
|
+
{
|
|
141
|
+
value: "dark",
|
|
142
|
+
label: W("shell.profile.themeDark", "Dark")
|
|
143
|
+
},
|
|
144
|
+
{
|
|
145
|
+
value: "light",
|
|
146
|
+
label: W("shell.profile.themeLight", "Light")
|
|
147
|
+
},
|
|
148
|
+
{
|
|
149
|
+
value: "system",
|
|
150
|
+
label: W("shell.profile.themeSystem", "Match my device")
|
|
151
|
+
}
|
|
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 = {
|
|
153
|
+
viewProfile: W("userMenu.viewProfile", "View Profile"),
|
|
154
|
+
addAccount: W("auth.profileMenu.addAccount", "Add account"),
|
|
155
|
+
settings: W("common.actions.settings", "Settings"),
|
|
156
|
+
appearance: W("shell.profile.appearance", "Appearance"),
|
|
157
|
+
language: W("shell.profile.language", "Language"),
|
|
158
|
+
help: W("shell.profile.helpSupport", "Help & support"),
|
|
159
|
+
shortcuts: W("appShell.keyboardShortcuts", "Keyboard shortcuts"),
|
|
160
|
+
signOut: W("auth.security.signOutDialogConfirm", "Sign out")
|
|
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", {
|
|
146
162
|
className: "min-w-0 flex-1",
|
|
147
|
-
children: [/* @__PURE__ */
|
|
163
|
+
children: [/* @__PURE__ */ O("span", {
|
|
148
164
|
className: "block truncate text-body-sm font-bold text-text-primary",
|
|
149
165
|
children: n.name
|
|
150
|
-
}),
|
|
166
|
+
}), at && /* @__PURE__ */ O("span", {
|
|
151
167
|
className: "block truncate text-xs text-text-muted",
|
|
152
|
-
children:
|
|
168
|
+
children: at
|
|
153
169
|
})]
|
|
154
|
-
})] }),
|
|
170
|
+
})] }), ft = (e) => {
|
|
155
171
|
let t = e.icon;
|
|
156
|
-
return /* @__PURE__ */
|
|
157
|
-
/* @__PURE__ */
|
|
172
|
+
return /* @__PURE__ */ k(D, { children: [
|
|
173
|
+
/* @__PURE__ */ O("span", {
|
|
158
174
|
className: "flex size-7 items-center justify-center rounded-button bg-accent-soft text-accent-primary",
|
|
159
|
-
children: /* @__PURE__ */
|
|
175
|
+
children: /* @__PURE__ */ O(t, { className: "size-4" })
|
|
160
176
|
}),
|
|
161
|
-
/* @__PURE__ */
|
|
177
|
+
/* @__PURE__ */ k("span", {
|
|
162
178
|
className: "flex w-full items-start gap-1 text-body-sm font-semibold text-text-primary",
|
|
163
|
-
children: [/* @__PURE__ */
|
|
179
|
+
children: [/* @__PURE__ */ O("span", {
|
|
164
180
|
className: "min-w-0 flex-1",
|
|
165
181
|
children: e.title
|
|
166
|
-
}), /* @__PURE__ */
|
|
182
|
+
}), /* @__PURE__ */ O(w, {
|
|
167
183
|
className: "mt-0.5 size-4 flex-shrink-0 text-text-muted rtl:rotate-180",
|
|
168
184
|
"aria-hidden": "true"
|
|
169
185
|
})]
|
|
170
186
|
}),
|
|
171
|
-
/* @__PURE__ */
|
|
187
|
+
/* @__PURE__ */ O("span", {
|
|
172
188
|
className: "text-xs text-text-muted",
|
|
173
189
|
children: e.description
|
|
174
190
|
})
|
|
175
191
|
] });
|
|
176
|
-
},
|
|
192
|
+
}, pt = (e) => Me.length > 0 ? /* @__PURE__ */ O("div", {
|
|
177
193
|
className: "grid grid-cols-2 gap-2 py-1.5",
|
|
178
194
|
"data-testid": "sidebar-profile-doors",
|
|
179
|
-
children:
|
|
180
|
-
}) : null,
|
|
195
|
+
children: Me.map(e)
|
|
196
|
+
}) : null, mt = P ? /* @__PURE__ */ O("div", {
|
|
181
197
|
className: "py-1",
|
|
182
|
-
children:
|
|
198
|
+
children: P
|
|
199
|
+
}) : null, ht = !!V && !!K, gt = () => {
|
|
200
|
+
q(""), J(!1);
|
|
201
|
+
}, _t = () => K?.setCustomizeOpen(!0), vt = ht && V && K ? /* @__PURE__ */ k(p, {
|
|
202
|
+
onOpenChange: (e) => {
|
|
203
|
+
e && K.canSimulate && K.loadSimulatableRoles(), e || q("");
|
|
204
|
+
},
|
|
205
|
+
children: [/* @__PURE__ */ k(h, {
|
|
206
|
+
className: i(_, "mt-1"),
|
|
207
|
+
"data-testid": "sidebar-profile-views",
|
|
208
|
+
children: [/* @__PURE__ */ O(ve, {
|
|
209
|
+
className: g,
|
|
210
|
+
"aria-hidden": "true"
|
|
211
|
+
}), /* @__PURE__ */ O("span", {
|
|
212
|
+
className: "min-w-0 flex-1 truncate",
|
|
213
|
+
children: V.label
|
|
214
|
+
})]
|
|
215
|
+
}), /* @__PURE__ */ O(m, {
|
|
216
|
+
sideOffset: 8,
|
|
217
|
+
"data-testid": "sidebar-profile-views-menu",
|
|
218
|
+
className: i(ue, "flex max-h-80 w-[300px] flex-col overflow-hidden p-0"),
|
|
219
|
+
children: /* @__PURE__ */ O(oe, {
|
|
220
|
+
persona: K,
|
|
221
|
+
everythingLabel: W("nav.everything", "Everything"),
|
|
222
|
+
query: Ue,
|
|
223
|
+
onQueryChange: q,
|
|
224
|
+
close: gt,
|
|
225
|
+
onOpenCustomize: _t,
|
|
226
|
+
onSearchKeyDown: (e) => {
|
|
227
|
+
e.key !== "Escape" && e.stopPropagation();
|
|
228
|
+
},
|
|
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"),
|
|
232
|
+
onPointerMove: (e) => e.preventDefault(),
|
|
233
|
+
onPointerLeave: (e) => e.preventDefault(),
|
|
234
|
+
onSelect: () => t(),
|
|
235
|
+
"data-testid": `sidebar-profile-${e}`,
|
|
236
|
+
children: r
|
|
237
|
+
}, e)
|
|
238
|
+
})
|
|
239
|
+
})]
|
|
183
240
|
}) : null;
|
|
184
|
-
if (
|
|
241
|
+
if ($e) {
|
|
185
242
|
let e = (e) => {
|
|
186
|
-
|
|
187
|
-
}, t = (e) =>
|
|
243
|
+
J(!1), e();
|
|
244
|
+
}, t = (e) => He((t) => t === e ? null : e), r = (e, n, r, i) => /* @__PURE__ */ k("button", {
|
|
188
245
|
type: "button",
|
|
189
246
|
className: v,
|
|
190
|
-
"aria-expanded":
|
|
247
|
+
"aria-expanded": G === e,
|
|
191
248
|
onClick: () => t(e),
|
|
192
249
|
"data-testid": `sidebar-profile-${e}`,
|
|
193
250
|
children: [
|
|
194
|
-
/* @__PURE__ */
|
|
251
|
+
/* @__PURE__ */ O(n, {
|
|
195
252
|
className: g,
|
|
196
253
|
"aria-hidden": "true"
|
|
197
254
|
}),
|
|
198
|
-
/* @__PURE__ */
|
|
255
|
+
/* @__PURE__ */ O("span", {
|
|
199
256
|
className: "min-w-0 flex-1 truncate",
|
|
200
257
|
children: r
|
|
201
258
|
}),
|
|
202
|
-
i && /* @__PURE__ */
|
|
259
|
+
i && /* @__PURE__ */ O("span", {
|
|
203
260
|
className: "truncate text-xs text-text-muted",
|
|
204
261
|
children: i
|
|
205
262
|
}),
|
|
206
|
-
/* @__PURE__ */
|
|
207
|
-
className: `size-4 flex-shrink-0 text-text-muted transition-transform ${
|
|
263
|
+
/* @__PURE__ */ O(w, {
|
|
264
|
+
className: `size-4 flex-shrink-0 text-text-muted transition-transform ${G === e ? "rotate-90 rtl:-rotate-90" : "rtl:rotate-180"}`,
|
|
208
265
|
"aria-hidden": "true"
|
|
209
266
|
})
|
|
210
267
|
]
|
|
211
|
-
}),
|
|
212
|
-
accounts:
|
|
213
|
-
appearance:
|
|
214
|
-
language:
|
|
215
|
-
help:
|
|
216
|
-
|
|
268
|
+
}), a = {
|
|
269
|
+
accounts: X,
|
|
270
|
+
appearance: Q.appearance,
|
|
271
|
+
language: Q.language,
|
|
272
|
+
help: Q.help,
|
|
273
|
+
views: V?.label ?? ""
|
|
274
|
+
}, o = (t, n) => G === t ? /* @__PURE__ */ O("div", {
|
|
217
275
|
role: "group",
|
|
218
|
-
"aria-label":
|
|
276
|
+
"aria-label": a[t],
|
|
219
277
|
className: "mb-1 ms-6 border-s border-border-subtle ps-2",
|
|
220
278
|
"data-testid": `sidebar-profile-${t}-list`,
|
|
221
279
|
children: n.map((n) => {
|
|
222
|
-
let r = /* @__PURE__ */
|
|
280
|
+
let r = /* @__PURE__ */ k("button", {
|
|
223
281
|
type: "button",
|
|
224
282
|
className: v,
|
|
225
283
|
"aria-pressed": n.selected,
|
|
226
284
|
onClick: () => e(n.onSelect),
|
|
227
285
|
"data-testid": `sidebar-profile-${t}-${n.id}`,
|
|
228
|
-
children: [/* @__PURE__ */
|
|
286
|
+
children: [/* @__PURE__ */ O("span", {
|
|
229
287
|
className: "min-w-0 flex-1 truncate",
|
|
230
288
|
children: n.label
|
|
231
|
-
}), n.selected && /* @__PURE__ */
|
|
289
|
+
}), n.selected && /* @__PURE__ */ O(_e, {
|
|
232
290
|
className: "size-4 flex-shrink-0 text-accent-primary",
|
|
233
291
|
"aria-hidden": "true"
|
|
234
292
|
})]
|
|
235
293
|
}, n.id), i = n.remove;
|
|
236
|
-
return i ? /* @__PURE__ */
|
|
294
|
+
return i ? /* @__PURE__ */ k("div", {
|
|
237
295
|
className: "flex items-center gap-1",
|
|
238
|
-
children: [/* @__PURE__ */
|
|
296
|
+
children: [/* @__PURE__ */ O("div", {
|
|
239
297
|
className: "min-w-0 flex-1",
|
|
240
298
|
children: r
|
|
241
|
-
}), /* @__PURE__ */
|
|
299
|
+
}), /* @__PURE__ */ O("button", {
|
|
242
300
|
type: "button",
|
|
243
301
|
"aria-label": i.label,
|
|
244
302
|
onClick: () => e(i.onSelect),
|
|
245
303
|
"data-testid": `sidebar-profile-${t}-${n.id}-remove`,
|
|
246
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",
|
|
247
|
-
children: /* @__PURE__ */
|
|
305
|
+
children: /* @__PURE__ */ O(ke, {
|
|
248
306
|
className: "size-4",
|
|
249
307
|
"aria-hidden": "true"
|
|
250
308
|
})
|
|
251
309
|
})]
|
|
252
310
|
}, n.id) : r;
|
|
253
311
|
})
|
|
254
|
-
}) : null,
|
|
255
|
-
|
|
312
|
+
}) : null, ee = ({ testId: e, onSelect: t, tone: n, children: r }) => /* @__PURE__ */ O("button", {
|
|
313
|
+
type: "button",
|
|
314
|
+
className: i(v, n === "muted" && "text-text-secondary", n === "warning" && "text-status-warning-text"),
|
|
315
|
+
onClick: t,
|
|
316
|
+
"data-testid": `sidebar-profile-${e}`,
|
|
317
|
+
children: r
|
|
318
|
+
}, e), s = [
|
|
319
|
+
...j ? [{
|
|
256
320
|
id: "view-profile",
|
|
257
|
-
label:
|
|
258
|
-
onSelect:
|
|
321
|
+
label: Q.viewProfile,
|
|
322
|
+
onSelect: j
|
|
259
323
|
}] : [],
|
|
260
|
-
...
|
|
324
|
+
...nt ? tt.map((e) => ({
|
|
261
325
|
id: `account-${e.id}`,
|
|
262
326
|
label: e.name || e.email,
|
|
263
|
-
onSelect: () =>
|
|
264
|
-
remove:
|
|
265
|
-
label:
|
|
266
|
-
onSelect: () =>
|
|
327
|
+
onSelect: () => T?.(e.id),
|
|
328
|
+
remove: A ? {
|
|
329
|
+
label: dt(e),
|
|
330
|
+
onSelect: () => A(e.id)
|
|
267
331
|
} : void 0
|
|
268
332
|
})) : [],
|
|
269
|
-
...
|
|
333
|
+
...E ? [{
|
|
270
334
|
id: "add-account",
|
|
271
|
-
label:
|
|
272
|
-
onSelect:
|
|
335
|
+
label: Q.addAccount,
|
|
336
|
+
onSelect: E
|
|
273
337
|
}] : []
|
|
274
|
-
],
|
|
338
|
+
], c = U === void 0 ? /* @__PURE__ */ O("button", {
|
|
275
339
|
type: "button",
|
|
276
|
-
"aria-label":
|
|
340
|
+
"aria-label": X,
|
|
277
341
|
"data-testid": "sidebar-profile-trigger",
|
|
278
342
|
className: "flex items-center justify-center rounded-full outline-none focus-visible:ring-2 focus-visible:ring-focus-ring",
|
|
279
|
-
children:
|
|
280
|
-
}) : null,
|
|
281
|
-
return /* @__PURE__ */
|
|
282
|
-
open:
|
|
283
|
-
onOpenChange:
|
|
284
|
-
children: [
|
|
343
|
+
children: M(n.name, n.avatarUrl, "md")
|
|
344
|
+
}) : null, l = Le ?? c;
|
|
345
|
+
return /* @__PURE__ */ k(ne, {
|
|
346
|
+
open: Ye,
|
|
347
|
+
onOpenChange: J,
|
|
348
|
+
children: [l && /* @__PURE__ */ O(ae, {
|
|
285
349
|
asChild: !0,
|
|
286
|
-
children:
|
|
287
|
-
}), /* @__PURE__ */
|
|
350
|
+
children: l
|
|
351
|
+
}), /* @__PURE__ */ k(re, {
|
|
288
352
|
side: "bottom",
|
|
289
353
|
"aria-describedby": void 0,
|
|
290
354
|
"data-testid": "sidebar-profile-sheet",
|
|
291
355
|
className: "max-h-[85dvh] gap-0 overflow-y-auto rounded-t-card bg-popover px-3 pb-6 pt-2",
|
|
292
356
|
children: [
|
|
293
|
-
/* @__PURE__ */
|
|
357
|
+
/* @__PURE__ */ O("div", {
|
|
294
358
|
"aria-hidden": "true",
|
|
295
359
|
className: "mx-auto mb-3 h-1 w-10 flex-shrink-0 rounded-pill bg-border-strong",
|
|
296
360
|
"data-testid": "sidebar-profile-grab-handle"
|
|
297
361
|
}),
|
|
298
|
-
/* @__PURE__ */
|
|
362
|
+
/* @__PURE__ */ O(ie, {
|
|
299
363
|
className: "sr-only",
|
|
300
|
-
children:
|
|
364
|
+
children: W("appShell.userMenuSheetTitle", "Account")
|
|
301
365
|
}),
|
|
302
|
-
|
|
366
|
+
rt ? /* @__PURE__ */ k("button", {
|
|
303
367
|
type: "button",
|
|
304
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",
|
|
305
|
-
"aria-expanded":
|
|
369
|
+
"aria-expanded": G === "accounts",
|
|
306
370
|
onClick: () => t("accounts"),
|
|
307
371
|
"data-testid": "sidebar-profile-identity",
|
|
308
|
-
children: [
|
|
309
|
-
className: `size-4 flex-shrink-0 text-text-muted transition-transform ${
|
|
372
|
+
children: [$, /* @__PURE__ */ O(w, {
|
|
373
|
+
className: `size-4 flex-shrink-0 text-text-muted transition-transform ${G === "accounts" ? "rotate-90 rtl:-rotate-90" : "rtl:rotate-180"}`,
|
|
310
374
|
"aria-hidden": "true"
|
|
311
375
|
})]
|
|
312
|
-
}) : /* @__PURE__ */
|
|
376
|
+
}) : /* @__PURE__ */ O("div", {
|
|
313
377
|
className: "flex items-center gap-3 px-1 py-2",
|
|
314
378
|
"data-testid": "sidebar-profile-identity",
|
|
315
|
-
children:
|
|
379
|
+
children: $
|
|
316
380
|
}),
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
381
|
+
o("accounts", s),
|
|
382
|
+
mt,
|
|
383
|
+
pt((t) => /* @__PURE__ */ O("button", {
|
|
320
384
|
type: "button",
|
|
321
385
|
onClick: () => e(t.onSelect),
|
|
322
386
|
"data-testid": `sidebar-profile-door-${t.id}`,
|
|
323
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",
|
|
324
|
-
children:
|
|
388
|
+
children: ft(t)
|
|
325
389
|
}, t.id)),
|
|
326
|
-
/* @__PURE__ */
|
|
390
|
+
/* @__PURE__ */ k("div", {
|
|
327
391
|
className: "pt-1.5",
|
|
328
392
|
children: [
|
|
329
|
-
|
|
393
|
+
F.length > 0 && /* @__PURE__ */ O("div", {
|
|
330
394
|
role: "group",
|
|
331
395
|
"data-testid": "sidebar-profile-extra",
|
|
332
|
-
children:
|
|
396
|
+
children: F.map((t) => {
|
|
333
397
|
let n = t.icon;
|
|
334
|
-
return /* @__PURE__ */
|
|
398
|
+
return /* @__PURE__ */ k("button", {
|
|
335
399
|
type: "button",
|
|
336
400
|
className: "flex h-control-sm w-full items-center gap-3 rounded-button px-2.5 text-start text-body-sm text-text-primary transition-colors hover:bg-bg-sunken outline-none focus-visible:ring-2 focus-visible:ring-focus-ring disabled:opacity-50",
|
|
337
401
|
disabled: t.disabled,
|
|
338
402
|
onClick: () => e(t.onSelect),
|
|
339
403
|
"data-testid": `sidebar-profile-extra-${t.id}`,
|
|
340
|
-
children: [n && /* @__PURE__ */
|
|
404
|
+
children: [n && /* @__PURE__ */ O(n, { className: "size-4 flex-shrink-0 text-text-secondary" }), /* @__PURE__ */ O("span", {
|
|
341
405
|
className: "min-w-0 flex-1 truncate",
|
|
342
406
|
children: t.label
|
|
343
407
|
})]
|
|
344
408
|
}, t.id);
|
|
345
409
|
})
|
|
346
410
|
}),
|
|
347
|
-
/* @__PURE__ */
|
|
411
|
+
ht && V && K && /* @__PURE__ */ k(D, { children: [r("views", ve, V.label, void 0), G === "views" && /* @__PURE__ */ O("div", {
|
|
412
|
+
role: "group",
|
|
413
|
+
"aria-label": V.label,
|
|
414
|
+
className: "mb-1 ms-6 border-s border-border-subtle ps-2",
|
|
415
|
+
"data-testid": "sidebar-profile-views-list",
|
|
416
|
+
children: /* @__PURE__ */ O(oe, {
|
|
417
|
+
persona: K,
|
|
418
|
+
everythingLabel: W("nav.everything", "Everything"),
|
|
419
|
+
query: Ue,
|
|
420
|
+
onQueryChange: q,
|
|
421
|
+
close: gt,
|
|
422
|
+
onOpenCustomize: _t,
|
|
423
|
+
sectionClass: "px-2.5 pb-1 pt-2 text-caption font-semibold uppercase tracking-wider text-text-muted",
|
|
424
|
+
renderRow: ee
|
|
425
|
+
})
|
|
426
|
+
})] }),
|
|
427
|
+
/* @__PURE__ */ k("button", {
|
|
348
428
|
type: "button",
|
|
349
429
|
className: v,
|
|
350
|
-
onClick: () => e(
|
|
430
|
+
onClick: () => e(Ne),
|
|
351
431
|
"data-testid": "sidebar-profile-settings",
|
|
352
432
|
children: [
|
|
353
|
-
/* @__PURE__ */
|
|
433
|
+
/* @__PURE__ */ O(De, {
|
|
354
434
|
className: g,
|
|
355
435
|
"aria-hidden": "true"
|
|
356
436
|
}),
|
|
357
|
-
/* @__PURE__ */
|
|
437
|
+
/* @__PURE__ */ O("span", {
|
|
358
438
|
className: "min-w-0 flex-1 truncate",
|
|
359
|
-
children:
|
|
439
|
+
children: Q.settings
|
|
360
440
|
}),
|
|
361
|
-
|
|
441
|
+
I && /* @__PURE__ */ O("span", {
|
|
362
442
|
className: "text-xs text-text-muted",
|
|
363
|
-
children:
|
|
443
|
+
children: I
|
|
364
444
|
})
|
|
365
445
|
]
|
|
366
446
|
}),
|
|
367
|
-
r("appearance",
|
|
368
|
-
|
|
447
|
+
r("appearance", ct, Q.appearance, st),
|
|
448
|
+
o("appearance", [...Z.map(({ value: e, label: t }) => ({
|
|
369
449
|
id: e,
|
|
370
|
-
label:
|
|
371
|
-
selected: e ===
|
|
372
|
-
onSelect: () =>
|
|
373
|
-
}))
|
|
374
|
-
|
|
375
|
-
|
|
450
|
+
label: t,
|
|
451
|
+
selected: e === L.value,
|
|
452
|
+
onSelect: () => L.onChange(e)
|
|
453
|
+
})), ...L.more ? [{
|
|
454
|
+
id: "more",
|
|
455
|
+
label: L.more.label,
|
|
456
|
+
onSelect: L.more.onSelect
|
|
457
|
+
}] : []]),
|
|
458
|
+
r("language", xe, Q.language, lt),
|
|
459
|
+
o("language", R.options.map((e) => ({
|
|
376
460
|
id: e.code,
|
|
377
461
|
label: e.label,
|
|
378
|
-
selected: e.code ===
|
|
379
|
-
onSelect: () =>
|
|
462
|
+
selected: e.code === R.current,
|
|
463
|
+
onSelect: () => R.onChange(e.code)
|
|
380
464
|
}))),
|
|
381
|
-
|
|
465
|
+
ut && /* @__PURE__ */ k(D, { children: [r("help", Se, Q.help, void 0), B ? G === "help" && /* @__PURE__ */ O("div", {
|
|
382
466
|
role: "group",
|
|
383
|
-
"aria-label":
|
|
467
|
+
"aria-label": Q.help,
|
|
384
468
|
className: "mb-1 ms-6 border-s border-border-subtle ps-2",
|
|
385
469
|
"data-testid": "sidebar-profile-help-list",
|
|
386
|
-
children:
|
|
387
|
-
help:
|
|
470
|
+
children: ce({
|
|
471
|
+
help: B,
|
|
388
472
|
variant: "sheet",
|
|
389
|
-
state:
|
|
390
|
-
close: () =>
|
|
391
|
-
idBase:
|
|
473
|
+
state: Re,
|
|
474
|
+
close: () => J(!1),
|
|
475
|
+
idBase: ze
|
|
392
476
|
})
|
|
393
|
-
}) :
|
|
477
|
+
}) : o("help", z.map((e) => ({
|
|
394
478
|
id: e.id,
|
|
395
479
|
label: e.label,
|
|
396
480
|
onSelect: e.onSelect
|
|
397
481
|
})))] })
|
|
398
482
|
]
|
|
399
483
|
}),
|
|
400
|
-
/* @__PURE__ */
|
|
484
|
+
/* @__PURE__ */ O("div", {
|
|
401
485
|
className: "mt-2 border-t border-border-subtle pt-2",
|
|
402
|
-
children: /* @__PURE__ */
|
|
486
|
+
children: /* @__PURE__ */ k("button", {
|
|
403
487
|
type: "button",
|
|
404
488
|
className: v,
|
|
405
|
-
onClick: () => e(
|
|
489
|
+
onClick: () => e(N),
|
|
406
490
|
"data-testid": "sidebar-profile-logout",
|
|
407
|
-
children: [/* @__PURE__ */
|
|
491
|
+
children: [/* @__PURE__ */ O(Ce, {
|
|
408
492
|
className: g,
|
|
409
493
|
"aria-hidden": "true"
|
|
410
|
-
}), /* @__PURE__ */
|
|
494
|
+
}), /* @__PURE__ */ O("span", {
|
|
411
495
|
className: "truncate",
|
|
412
|
-
children:
|
|
496
|
+
children: Q.signOut
|
|
413
497
|
})]
|
|
414
498
|
})
|
|
415
499
|
})
|
|
@@ -417,141 +501,143 @@ function M({ user: n, roleLabel: i, orgName: ue, planChip: b, accounts: _e = [],
|
|
|
417
501
|
})]
|
|
418
502
|
});
|
|
419
503
|
}
|
|
420
|
-
let
|
|
504
|
+
let yt = /* @__PURE__ */ k("button", {
|
|
421
505
|
type: "button",
|
|
422
|
-
"aria-label":
|
|
423
|
-
title:
|
|
506
|
+
"aria-label": H ? X : void 0,
|
|
507
|
+
title: H ? n.name : void 0,
|
|
424
508
|
"data-testid": "sidebar-profile-trigger",
|
|
425
|
-
className: `flex w-full min-w-0 items-center gap-2.5 rounded-button p-1.5 text-start outline-none transition-colors hover:bg-bg-sunken focus-visible:ring-2 focus-visible:ring-focus-ring data-[state=open]:bg-bg-elevated ${
|
|
426
|
-
children: [
|
|
509
|
+
className: `flex w-full min-w-0 items-center gap-2.5 rounded-button p-1.5 text-start outline-none transition-colors hover:bg-bg-sunken focus-visible:ring-2 focus-visible:ring-focus-ring data-[state=open]:bg-bg-elevated ${H ? "justify-center" : ""}`,
|
|
510
|
+
children: [M(n.name, n.avatarUrl, "md"), !H && /* @__PURE__ */ k(D, { children: [/* @__PURE__ */ k("span", {
|
|
427
511
|
className: "min-w-0 flex-1",
|
|
428
|
-
children: [/* @__PURE__ */
|
|
512
|
+
children: [/* @__PURE__ */ O("span", {
|
|
429
513
|
className: "block truncate text-body-sm font-semibold text-text-primary",
|
|
430
514
|
children: n.name
|
|
431
|
-
}),
|
|
515
|
+
}), it && /* @__PURE__ */ O("span", {
|
|
432
516
|
className: "block truncate text-xs text-text-muted",
|
|
433
|
-
children:
|
|
517
|
+
children: it
|
|
434
518
|
})]
|
|
435
|
-
}), b && /* @__PURE__ */
|
|
519
|
+
}), b && /* @__PURE__ */ O("span", {
|
|
436
520
|
className: "flex-shrink-0 rounded-pill bg-accent-soft px-2 py-0.5 text-caption font-semibold text-accent-primary",
|
|
437
521
|
"data-testid": "sidebar-profile-plan-chip",
|
|
438
522
|
children: b
|
|
439
523
|
})] })]
|
|
440
524
|
});
|
|
441
|
-
return /* @__PURE__ */
|
|
442
|
-
open:
|
|
443
|
-
onOpenChange:
|
|
525
|
+
return /* @__PURE__ */ k(o, {
|
|
526
|
+
open: Ye,
|
|
527
|
+
onOpenChange: J,
|
|
444
528
|
modal: !1,
|
|
445
|
-
children: [/* @__PURE__ */
|
|
529
|
+
children: [/* @__PURE__ */ O(te, {
|
|
446
530
|
asChild: !0,
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
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,
|
|
452
538
|
collisionPadding: 8,
|
|
453
|
-
"aria-label":
|
|
539
|
+
"aria-label": X,
|
|
454
540
|
"data-testid": "sidebar-profile-menu",
|
|
455
|
-
className:
|
|
541
|
+
className: i(ue, "max-h-[calc(100dvh-5rem)] w-[315px] overflow-y-auto"),
|
|
456
542
|
children: [
|
|
457
|
-
|
|
543
|
+
rt ? /* @__PURE__ */ k(p, { children: [/* @__PURE__ */ O(h, {
|
|
458
544
|
className: "gap-3 rounded-button px-1.5 py-2 focus:bg-bg-sunken",
|
|
459
545
|
"data-testid": "sidebar-profile-identity",
|
|
460
|
-
children:
|
|
461
|
-
}), /* @__PURE__ */
|
|
546
|
+
children: $
|
|
547
|
+
}), /* @__PURE__ */ k(m, {
|
|
462
548
|
sideOffset: 8,
|
|
463
549
|
"data-testid": "sidebar-profile-accounts",
|
|
464
|
-
className:
|
|
550
|
+
className: i(y, "w-72"),
|
|
465
551
|
children: [
|
|
466
|
-
|
|
552
|
+
j && /* @__PURE__ */ k(c, {
|
|
467
553
|
className: "h-control-sm gap-3 rounded-button px-2.5 focus:bg-bg-sunken",
|
|
468
|
-
onSelect: () =>
|
|
554
|
+
onSelect: () => j(),
|
|
469
555
|
"data-testid": "sidebar-profile-view-profile",
|
|
470
|
-
children: [/* @__PURE__ */
|
|
556
|
+
children: [/* @__PURE__ */ O(Oe, {
|
|
471
557
|
className: "size-4 flex-shrink-0 text-text-secondary",
|
|
472
558
|
"aria-hidden": "true"
|
|
473
|
-
}), /* @__PURE__ */
|
|
559
|
+
}), /* @__PURE__ */ O("span", {
|
|
474
560
|
className: "truncate",
|
|
475
|
-
children:
|
|
561
|
+
children: Q.viewProfile
|
|
476
562
|
})]
|
|
477
563
|
}),
|
|
478
|
-
|
|
564
|
+
nt && /* @__PURE__ */ k(D, { children: [/* @__PURE__ */ O("div", {
|
|
479
565
|
role: "presentation",
|
|
480
566
|
className: "px-2.5 pb-1 pt-2 text-caption font-semibold uppercase tracking-wider text-text-muted",
|
|
481
|
-
children:
|
|
482
|
-
}),
|
|
567
|
+
children: et
|
|
568
|
+
}), tt.map((e) => /* @__PURE__ */ k("div", {
|
|
483
569
|
role: "none",
|
|
484
570
|
className: "flex items-center gap-1",
|
|
485
|
-
children: [/* @__PURE__ */
|
|
571
|
+
children: [/* @__PURE__ */ k(c, {
|
|
486
572
|
className: "min-w-0 flex-1 gap-3 rounded-button px-2.5 py-1.5 focus:bg-bg-sunken",
|
|
487
|
-
onSelect: () =>
|
|
573
|
+
onSelect: () => T?.(e.id),
|
|
488
574
|
"data-testid": `sidebar-profile-account-${e.id}`,
|
|
489
|
-
children: [
|
|
575
|
+
children: [M(e.name || e.email, e.avatar, "sm"), /* @__PURE__ */ k("span", {
|
|
490
576
|
className: "min-w-0 flex-1",
|
|
491
|
-
children: [/* @__PURE__ */
|
|
577
|
+
children: [/* @__PURE__ */ O("span", {
|
|
492
578
|
className: "block truncate font-medium",
|
|
493
579
|
children: e.name || e.email
|
|
494
|
-
}), e.name && /* @__PURE__ */
|
|
580
|
+
}), e.name && /* @__PURE__ */ O("span", {
|
|
495
581
|
className: "block truncate text-xs text-text-muted",
|
|
496
582
|
children: e.email
|
|
497
583
|
})]
|
|
498
584
|
})]
|
|
499
|
-
}),
|
|
500
|
-
"aria-label":
|
|
585
|
+
}), A && /* @__PURE__ */ O(c, {
|
|
586
|
+
"aria-label": dt(e),
|
|
501
587
|
className: "size-8 flex-shrink-0 justify-center rounded-button p-0 text-text-muted focus:bg-bg-sunken",
|
|
502
|
-
onSelect: () =>
|
|
588
|
+
onSelect: () => A(e.id),
|
|
503
589
|
"data-testid": `sidebar-profile-remove-${e.id}`,
|
|
504
|
-
children: /* @__PURE__ */
|
|
590
|
+
children: /* @__PURE__ */ O(ke, {
|
|
505
591
|
className: "size-4",
|
|
506
592
|
"aria-hidden": "true"
|
|
507
593
|
})
|
|
508
594
|
})]
|
|
509
595
|
}, e.id))] }),
|
|
510
|
-
|
|
596
|
+
E && /* @__PURE__ */ k(c, {
|
|
511
597
|
className: "h-control-sm gap-3 rounded-button px-2.5 focus:bg-bg-sunken",
|
|
512
|
-
onSelect: () =>
|
|
598
|
+
onSelect: () => E(),
|
|
513
599
|
"data-testid": "sidebar-profile-add-account",
|
|
514
|
-
children: [/* @__PURE__ */
|
|
600
|
+
children: [/* @__PURE__ */ O(Ee, {
|
|
515
601
|
className: "size-4 flex-shrink-0 text-text-secondary",
|
|
516
602
|
"aria-hidden": "true"
|
|
517
|
-
}), /* @__PURE__ */
|
|
603
|
+
}), /* @__PURE__ */ O("span", {
|
|
518
604
|
className: "truncate",
|
|
519
|
-
children:
|
|
605
|
+
children: Q.addAccount
|
|
520
606
|
})]
|
|
521
607
|
})
|
|
522
608
|
]
|
|
523
|
-
})] }) : /* @__PURE__ */
|
|
609
|
+
})] }) : /* @__PURE__ */ O("div", {
|
|
524
610
|
className: "flex items-center gap-3 px-1.5 py-2",
|
|
525
611
|
"data-testid": "sidebar-profile-identity",
|
|
526
|
-
children:
|
|
612
|
+
children: $
|
|
527
613
|
}),
|
|
528
|
-
|
|
614
|
+
mt && /* @__PURE__ */ O(je.Provider, {
|
|
529
615
|
value: !0,
|
|
530
|
-
children:
|
|
616
|
+
children: mt
|
|
531
617
|
}),
|
|
532
|
-
|
|
618
|
+
pt((e) => /* @__PURE__ */ O(c, {
|
|
533
619
|
onSelect: () => e.onSelect(),
|
|
534
620
|
"data-testid": `sidebar-profile-door-${e.id}`,
|
|
535
621
|
className: "flex-col items-start gap-1.5 rounded-card border border-border-default p-3 focus:bg-bg-sunken",
|
|
536
|
-
children:
|
|
622
|
+
children: ft(e)
|
|
537
623
|
}, e.id)),
|
|
538
|
-
|
|
624
|
+
F.length > 0 && /* @__PURE__ */ O(s, {
|
|
539
625
|
className: "mt-1",
|
|
540
626
|
"data-testid": "sidebar-profile-extra",
|
|
541
|
-
children:
|
|
627
|
+
children: F.map((e) => {
|
|
542
628
|
let t = e.icon;
|
|
543
|
-
return /* @__PURE__ */
|
|
629
|
+
return /* @__PURE__ */ k(c, {
|
|
544
630
|
className: "h-control-sm gap-3 rounded-button px-2.5 focus:bg-bg-sunken",
|
|
545
631
|
disabled: e.disabled,
|
|
546
632
|
onSelect: () => e.onSelect(),
|
|
547
633
|
"data-testid": `sidebar-profile-extra-${e.id}`,
|
|
548
634
|
children: [
|
|
549
|
-
t && /* @__PURE__ */
|
|
550
|
-
/* @__PURE__ */
|
|
635
|
+
t && /* @__PURE__ */ O(t, { className: "size-4 flex-shrink-0 text-text-secondary" }),
|
|
636
|
+
/* @__PURE__ */ O("span", {
|
|
551
637
|
className: "min-w-0 flex-1 truncate",
|
|
552
638
|
children: e.label
|
|
553
639
|
}),
|
|
554
|
-
e.shortcut && /* @__PURE__ */
|
|
640
|
+
e.shortcut && /* @__PURE__ */ O(f, {
|
|
555
641
|
className: "tracking-normal",
|
|
556
642
|
children: e.shortcut
|
|
557
643
|
})
|
|
@@ -559,144 +645,153 @@ function M({ user: n, roleLabel: i, orgName: ue, planChip: b, accounts: _e = [],
|
|
|
559
645
|
}, e.id);
|
|
560
646
|
})
|
|
561
647
|
}),
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
648
|
+
vt,
|
|
649
|
+
/* @__PURE__ */ k(c, {
|
|
650
|
+
className: i(_, F.length > 0 || vt ? void 0 : "mt-1"),
|
|
651
|
+
onSelect: () => Ne(),
|
|
565
652
|
"data-testid": "sidebar-profile-settings",
|
|
566
653
|
children: [
|
|
567
|
-
/* @__PURE__ */
|
|
654
|
+
/* @__PURE__ */ O(De, {
|
|
568
655
|
className: g,
|
|
569
656
|
"aria-hidden": "true"
|
|
570
657
|
}),
|
|
571
|
-
/* @__PURE__ */
|
|
658
|
+
/* @__PURE__ */ O("span", {
|
|
572
659
|
className: "min-w-0 flex-1 truncate",
|
|
573
|
-
children:
|
|
660
|
+
children: Q.settings
|
|
574
661
|
}),
|
|
575
|
-
|
|
662
|
+
I && /* @__PURE__ */ O(f, {
|
|
576
663
|
className: "tracking-normal",
|
|
577
|
-
children:
|
|
664
|
+
children: I
|
|
578
665
|
})
|
|
579
666
|
]
|
|
580
667
|
}),
|
|
581
|
-
/* @__PURE__ */
|
|
668
|
+
/* @__PURE__ */ k(p, { children: [/* @__PURE__ */ k(h, {
|
|
582
669
|
className: _,
|
|
583
670
|
"data-testid": "sidebar-profile-appearance",
|
|
584
671
|
children: [
|
|
585
|
-
/* @__PURE__ */
|
|
672
|
+
/* @__PURE__ */ O(ct, {
|
|
586
673
|
className: g,
|
|
587
674
|
"aria-hidden": "true"
|
|
588
675
|
}),
|
|
589
|
-
/* @__PURE__ */
|
|
676
|
+
/* @__PURE__ */ O("span", {
|
|
590
677
|
className: "flex-shrink-0",
|
|
591
|
-
children:
|
|
678
|
+
children: Q.appearance
|
|
592
679
|
}),
|
|
593
|
-
/* @__PURE__ */
|
|
594
|
-
className:
|
|
595
|
-
children:
|
|
680
|
+
/* @__PURE__ */ O("span", {
|
|
681
|
+
className: fe,
|
|
682
|
+
children: st
|
|
596
683
|
})
|
|
597
684
|
]
|
|
598
|
-
}), /* @__PURE__ */
|
|
685
|
+
}), /* @__PURE__ */ k(m, {
|
|
599
686
|
sideOffset: 8,
|
|
600
687
|
"data-testid": "sidebar-profile-appearance-menu",
|
|
601
|
-
className:
|
|
602
|
-
children: /* @__PURE__ */
|
|
603
|
-
value:
|
|
688
|
+
className: i(y, "w-56"),
|
|
689
|
+
children: [/* @__PURE__ */ O(l, {
|
|
690
|
+
value: L.value,
|
|
604
691
|
onValueChange: (e) => {
|
|
605
|
-
let t =
|
|
606
|
-
t &&
|
|
692
|
+
let t = Z.find((t) => t.value === e);
|
|
693
|
+
t && L.onChange(t.value);
|
|
607
694
|
},
|
|
608
|
-
children:
|
|
609
|
-
let
|
|
610
|
-
return /* @__PURE__ */
|
|
695
|
+
children: Z.map(({ value: e, label: t }) => {
|
|
696
|
+
let n = Ae[e] ?? Te;
|
|
697
|
+
return /* @__PURE__ */ k(u, {
|
|
611
698
|
value: e,
|
|
612
699
|
className: "h-control-sm gap-2.5 rounded-button focus:bg-bg-sunken",
|
|
613
700
|
"data-testid": `sidebar-profile-appearance-${e}`,
|
|
614
|
-
children: [/* @__PURE__ */
|
|
701
|
+
children: [/* @__PURE__ */ O(n, {
|
|
615
702
|
className: g,
|
|
616
703
|
"aria-hidden": "true"
|
|
617
|
-
}), /* @__PURE__ */
|
|
704
|
+
}), /* @__PURE__ */ O("span", {
|
|
618
705
|
className: "truncate",
|
|
619
|
-
children:
|
|
706
|
+
children: t
|
|
620
707
|
})]
|
|
621
708
|
}, e);
|
|
622
709
|
})
|
|
623
|
-
})
|
|
710
|
+
}), L.more && /* @__PURE__ */ k(D, { children: [/* @__PURE__ */ O(d, {}), /* @__PURE__ */ O(c, {
|
|
711
|
+
className: "h-control-sm gap-3 rounded-button px-2.5 focus:bg-bg-sunken",
|
|
712
|
+
onSelect: () => L.more?.onSelect(),
|
|
713
|
+
"data-testid": "sidebar-profile-appearance-more",
|
|
714
|
+
children: /* @__PURE__ */ O("span", {
|
|
715
|
+
className: "min-w-0 flex-1 truncate",
|
|
716
|
+
children: L.more.label
|
|
717
|
+
})
|
|
718
|
+
})] })]
|
|
624
719
|
})] }),
|
|
625
|
-
/* @__PURE__ */
|
|
720
|
+
/* @__PURE__ */ k(p, { children: [/* @__PURE__ */ k(h, {
|
|
626
721
|
className: _,
|
|
627
722
|
"data-testid": "sidebar-profile-language",
|
|
628
723
|
children: [
|
|
629
|
-
/* @__PURE__ */
|
|
724
|
+
/* @__PURE__ */ O(xe, {
|
|
630
725
|
className: g,
|
|
631
726
|
"aria-hidden": "true"
|
|
632
727
|
}),
|
|
633
|
-
/* @__PURE__ */
|
|
728
|
+
/* @__PURE__ */ O("span", {
|
|
634
729
|
className: "flex-shrink-0",
|
|
635
|
-
children:
|
|
730
|
+
children: Q.language
|
|
636
731
|
}),
|
|
637
|
-
/* @__PURE__ */
|
|
638
|
-
className:
|
|
639
|
-
children:
|
|
732
|
+
/* @__PURE__ */ O("span", {
|
|
733
|
+
className: fe,
|
|
734
|
+
children: lt
|
|
640
735
|
})
|
|
641
736
|
]
|
|
642
|
-
}), /* @__PURE__ */
|
|
737
|
+
}), /* @__PURE__ */ O(m, {
|
|
643
738
|
sideOffset: 8,
|
|
644
739
|
"data-testid": "sidebar-profile-language-menu",
|
|
645
|
-
className:
|
|
646
|
-
children: /* @__PURE__ */
|
|
647
|
-
value:
|
|
648
|
-
onValueChange: (e) =>
|
|
649
|
-
children:
|
|
740
|
+
className: i(y, "w-56"),
|
|
741
|
+
children: /* @__PURE__ */ O(l, {
|
|
742
|
+
value: R.current,
|
|
743
|
+
onValueChange: (e) => R.onChange(e),
|
|
744
|
+
children: R.options.map((e) => /* @__PURE__ */ O(u, {
|
|
650
745
|
value: e.code,
|
|
651
746
|
className: "h-control-sm rounded-button focus:bg-bg-sunken",
|
|
652
747
|
"data-testid": `sidebar-profile-language-${e.code}`,
|
|
653
|
-
children: /* @__PURE__ */
|
|
748
|
+
children: /* @__PURE__ */ O("span", {
|
|
654
749
|
className: "truncate",
|
|
655
750
|
children: e.label
|
|
656
751
|
})
|
|
657
752
|
}, e.code))
|
|
658
753
|
})
|
|
659
754
|
})] }),
|
|
660
|
-
|
|
755
|
+
ut && /* @__PURE__ */ k(p, { children: [/* @__PURE__ */ k(h, {
|
|
661
756
|
className: "h-control-sm gap-3 rounded-button px-2.5 focus:bg-bg-sunken",
|
|
662
757
|
"data-testid": "sidebar-profile-help",
|
|
663
|
-
children: [/* @__PURE__ */
|
|
758
|
+
children: [/* @__PURE__ */ O(Se, {
|
|
664
759
|
className: "size-4 flex-shrink-0 text-text-secondary",
|
|
665
760
|
"aria-hidden": "true"
|
|
666
|
-
}), /* @__PURE__ */
|
|
761
|
+
}), /* @__PURE__ */ O("span", {
|
|
667
762
|
className: "min-w-0 flex-1 truncate",
|
|
668
|
-
children:
|
|
763
|
+
children: Q.help
|
|
669
764
|
})]
|
|
670
|
-
}),
|
|
765
|
+
}), B ? /* @__PURE__ */ O(m, {
|
|
671
766
|
sideOffset: 8,
|
|
672
767
|
collisionPadding: 8,
|
|
673
768
|
"data-testid": "sidebar-profile-help-menu",
|
|
674
|
-
className:
|
|
675
|
-
children:
|
|
676
|
-
help:
|
|
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"),
|
|
770
|
+
children: ce({
|
|
771
|
+
help: B,
|
|
677
772
|
variant: "popover",
|
|
678
|
-
state:
|
|
679
|
-
close: () =>
|
|
680
|
-
idBase:
|
|
773
|
+
state: Re,
|
|
774
|
+
close: () => J(!1),
|
|
775
|
+
idBase: ze
|
|
681
776
|
})
|
|
682
|
-
}) : /* @__PURE__ */
|
|
777
|
+
}) : /* @__PURE__ */ O(m, {
|
|
683
778
|
sideOffset: 8,
|
|
684
779
|
"data-testid": "sidebar-profile-help-menu",
|
|
685
|
-
className:
|
|
686
|
-
children:
|
|
780
|
+
className: i("max-h-80 overflow-y-auto rounded-card border border-border-subtle bg-popover p-1.5 shadow-overlay", "w-60"),
|
|
781
|
+
children: z.map((e) => {
|
|
687
782
|
let t = e.icon;
|
|
688
|
-
return /* @__PURE__ */
|
|
783
|
+
return /* @__PURE__ */ k(c, {
|
|
689
784
|
className: "h-control-sm gap-3 rounded-button px-2.5 focus:bg-bg-sunken",
|
|
690
785
|
disabled: e.disabled,
|
|
691
786
|
onSelect: () => e.onSelect(),
|
|
692
787
|
"data-testid": `sidebar-profile-help-${e.id}`,
|
|
693
788
|
children: [
|
|
694
|
-
t && /* @__PURE__ */
|
|
695
|
-
/* @__PURE__ */
|
|
789
|
+
t && /* @__PURE__ */ O(t, { className: "size-4 flex-shrink-0 text-text-secondary" }),
|
|
790
|
+
/* @__PURE__ */ O("span", {
|
|
696
791
|
className: "min-w-0 flex-1 truncate",
|
|
697
792
|
children: e.label
|
|
698
793
|
}),
|
|
699
|
-
e.shortcut && /* @__PURE__ */
|
|
794
|
+
e.shortcut && /* @__PURE__ */ O(f, {
|
|
700
795
|
className: "tracking-normal",
|
|
701
796
|
children: e.shortcut
|
|
702
797
|
})
|
|
@@ -704,40 +799,40 @@ function M({ user: n, roleLabel: i, orgName: ue, planChip: b, accounts: _e = [],
|
|
|
704
799
|
}, e.id);
|
|
705
800
|
})
|
|
706
801
|
})] }),
|
|
707
|
-
|
|
802
|
+
Pe && /* @__PURE__ */ k(c, {
|
|
708
803
|
className: "h-control-sm gap-3 rounded-button px-2.5 focus:bg-bg-sunken",
|
|
709
|
-
onSelect: () =>
|
|
804
|
+
onSelect: () => Pe(),
|
|
710
805
|
"data-testid": "sidebar-profile-shortcuts",
|
|
711
806
|
children: [
|
|
712
|
-
/* @__PURE__ */
|
|
807
|
+
/* @__PURE__ */ O(be, {
|
|
713
808
|
className: "size-4 flex-shrink-0 text-text-secondary",
|
|
714
809
|
"aria-hidden": "true"
|
|
715
810
|
}),
|
|
716
|
-
/* @__PURE__ */
|
|
811
|
+
/* @__PURE__ */ O("span", {
|
|
717
812
|
className: "min-w-0 flex-1 truncate",
|
|
718
|
-
children:
|
|
813
|
+
children: Q.shortcuts
|
|
719
814
|
}),
|
|
720
|
-
/* @__PURE__ */
|
|
815
|
+
/* @__PURE__ */ O(f, {
|
|
721
816
|
className: "tracking-normal",
|
|
722
817
|
children: "?"
|
|
723
818
|
})
|
|
724
819
|
]
|
|
725
820
|
}),
|
|
726
|
-
/* @__PURE__ */
|
|
727
|
-
/* @__PURE__ */
|
|
821
|
+
/* @__PURE__ */ O(d, { className: "my-1.5" }),
|
|
822
|
+
/* @__PURE__ */ k(c, {
|
|
728
823
|
className: _,
|
|
729
|
-
onSelect: () =>
|
|
824
|
+
onSelect: () => N(),
|
|
730
825
|
"data-testid": "sidebar-profile-logout",
|
|
731
|
-
children: [/* @__PURE__ */
|
|
826
|
+
children: [/* @__PURE__ */ O(Ce, {
|
|
732
827
|
className: g,
|
|
733
828
|
"aria-hidden": "true"
|
|
734
|
-
}), /* @__PURE__ */
|
|
829
|
+
}), /* @__PURE__ */ O("span", {
|
|
735
830
|
className: "truncate",
|
|
736
|
-
children:
|
|
831
|
+
children: Q.signOut
|
|
737
832
|
})]
|
|
738
833
|
})
|
|
739
834
|
]
|
|
740
835
|
})]
|
|
741
836
|
});
|
|
742
837
|
}
|
|
743
|
-
export {
|
|
838
|
+
export { N as PlanUsageCard, P as SidebarProfileMenu };
|