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