@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.
Files changed (42) hide show
  1. package/dist/chrome/PersonaSurfaceControls.js +82 -189
  2. package/dist/chrome/PersonaViewsList.d.ts +28 -0
  3. package/dist/chrome/PersonaViewsList.js +139 -0
  4. package/dist/chrome/personaViewOptions.d.ts +8 -0
  5. package/dist/chrome/personaViewOptions.js +14 -0
  6. package/dist/chrome/shell/NewMenu.d.ts +13 -1
  7. package/dist/chrome/shell/NewMenu.js +27 -14
  8. package/dist/chrome/shell/ShellSidebar.js +159 -157
  9. package/dist/chrome/shell/SidebarProfileMenu.d.ts +36 -4
  10. package/dist/chrome/shell/SidebarProfileMenu.js +408 -313
  11. package/dist/chrome/shell/WorkspaceAccountCard.d.ts +22 -0
  12. package/dist/chrome/shell/WorkspaceAccountCard.js +107 -0
  13. package/dist/chrome/shell/WorkspaceMenu.js +140 -136
  14. package/dist/chrome/shell/pageHost.d.ts +19 -0
  15. package/dist/chrome/shell/pageHost.js +21 -0
  16. package/dist/chrome/shell/pageWidth.d.ts +39 -0
  17. package/dist/chrome/shell/pageWidth.js +18 -0
  18. package/dist/chrome/shell/shellSidebarAppearance.d.ts +4 -0
  19. package/dist/chrome/shell/shellSidebarAppearance.js +7 -0
  20. package/dist/chrome/shell/sidebarPopupPlacement.d.ts +21 -0
  21. package/dist/chrome/shell/sidebarPopupPlacement.js +28 -0
  22. package/dist/shared/backgrounds/BackgroundSettingsSection.d.ts +11 -0
  23. package/dist/shared/backgrounds/BackgroundSettingsSection.js +67 -0
  24. package/dist/shared/backgrounds/backgroundSectionLabels.d.ts +14 -0
  25. package/dist/shared/backgrounds/backgroundSectionLabels.js +36 -0
  26. package/dist/shared/backgrounds/index.d.ts +3 -0
  27. package/dist/shared/backgrounds/useStartPageBackground.d.ts +12 -0
  28. package/dist/shared/backgrounds/useStartPageBackground.js +23 -0
  29. package/dist/shared-backgrounds.js +4 -1
  30. package/dist/ui/dropdown-menu.d.ts +12 -2
  31. package/dist/ui/dropdown-menu.js +53 -50
  32. package/dist/ui/glass-surface.d.ts +7 -0
  33. package/dist/ui/glass-surface.js +14 -0
  34. package/dist/ui/popover.d.ts +1 -1
  35. package/dist/ui/popover.js +17 -15
  36. package/dist/ui/select.js +69 -68
  37. package/dist/ui/tooltip.d.ts +6 -0
  38. package/dist/ui/tooltip.js +18 -14
  39. package/package.json +5 -1
  40. package/src/shared/styles/page-widths.css +38 -0
  41. package/src/shared/tokens/build/brands/healthybowl.css +25 -3
  42. 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 { cn as r } from "../../shared-utils.js";
4
- import { Button as i } from "../../ui/button.js";
5
- import { DropdownMenu as a, DropdownMenuContent as o, DropdownMenuGroup as s, DropdownMenuItem as c, DropdownMenuRadioGroup as l, DropdownMenuRadioItem as u, DropdownMenuSeparator as ee, DropdownMenuShortcut as d, DropdownMenuSub as f, DropdownMenuSubContent as p, DropdownMenuSubTrigger as m, DropdownMenuTrigger as te } from "../../ui/dropdown-menu.js";
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 { hasProfileHelpContent as oe, profileHelpBody as h, useProfileHelp as se } from "./profileHelpMenu.js";
8
- import { ICON as g, MENU_ROW as _, MENU_SURFACE as ce, SHEET_ROW as v, SUB_SURFACE as y, VALUE as le } from "./profileMenuClasses.js";
9
- import { createContext as ue, useContext as b, useEffect as de, useId as fe, useMemo as pe, useRef as me, useState as he } from "react";
10
- import { Check as ge, ChevronRight as x, Gem as _e, Keyboard as ve, Languages as ye, LifeBuoy as be, LogOut as xe, Monitor as Se, Moon as S, Plus as Ce, Settings as we, Sun as C, UserRound as Te, X as Ee } from "lucide-react";
11
- import { Fragment as w, jsx as T, jsxs as E } from "react/jsx-runtime";
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 D = {
14
- dark: S,
15
- light: C,
16
- system: Se
16
+ var Ae = {
17
+ dark: T,
18
+ light: E,
19
+ system: we
17
20
  };
18
- function O(e) {
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 k = {
25
+ var j = {
23
26
  sm: "size-6",
24
27
  md: "size-8",
25
28
  lg: "size-10"
26
29
  };
27
- function A(e, t, n) {
28
- return /* @__PURE__ */ T("span", {
30
+ function M(e, t, n) {
31
+ return /* @__PURE__ */ O("span", {
29
32
  "aria-hidden": "true",
30
- className: `${k[n]} flex flex-shrink-0 items-center justify-center overflow-hidden rounded-full bg-linear-to-br from-brand-primary to-brand-secondary`,
31
- children: t ? /* @__PURE__ */ T("img", {
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__ */ T("span", {
38
+ }) : /* @__PURE__ */ O("span", {
36
39
  className: `${n === "lg" ? "text-body-sm" : "text-caption"} font-semibold text-action-primary-text`,
37
- children: O(e)
40
+ children: A(e)
38
41
  })
39
42
  });
40
43
  }
41
- var De = ue(!1);
42
- function j({ planName: e, onManage: r, used: a, limit: o, caption: s }) {
43
- let l = t(), u = n(), ee = b(De), d = l("shell.plan.manage", "Manage"), f = typeof a == "number" && typeof o == "number" && o > 0, p = f ? Math.min(100, Math.max(0, Math.round(a / o * 100))) : 0, m = s ?? (f ? l("shell.plan.usage", "{{used}} of {{limit}} used", {
44
- used: u(a),
45
- limit: u(o)
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__ */ E("div", {
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__ */ E("div", {
54
+ /* @__PURE__ */ k("div", {
52
55
  className: "flex items-center gap-2",
53
56
  children: [
54
- /* @__PURE__ */ T(_e, {
57
+ /* @__PURE__ */ O(ye, {
55
58
  className: "size-4 flex-shrink-0 text-text-primary",
56
59
  "aria-hidden": "true"
57
60
  }),
58
- /* @__PURE__ */ T("span", {
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
- ee ? /* @__PURE__ */ T(c, {
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__ */ T("span", {
69
+ children: /* @__PURE__ */ O("span", {
67
70
  className: "text-xs",
68
71
  children: d
69
72
  })
70
- }) : /* @__PURE__ */ T(i, {
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__ */ T("span", {
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__ */ T("div", {
87
+ f && /* @__PURE__ */ O("div", {
85
88
  role: "progressbar",
86
89
  "aria-valuemin": 0,
87
90
  "aria-valuemax": o,
88
- "aria-valuenow": a,
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__ */ T("div", {
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__ */ T("p", {
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 M({ user: n, roleLabel: i, orgName: ue, planChip: b, accounts: _e = [], activeAccountId: Se, onSwitchAccount: S, onAddAccount: C, onRemoveAccount: O, onViewProfile: k, onLogout: j, planCard: M, doors: Oe = [], extraItems: N = [], onOpenSettings: ke, settingsShortcut: P, theme: F, language: I, helpItems: L = [], help: R, onKeyboardShortcuts: Ae, collapsed: z = !1, variant: je = "popover", open: B, onOpenChange: Me, trigger: Ne }) {
104
- let V = t(), Pe = se(), Fe = fe(), [Ie, Le] = he(!1), [H, Re] = he(null), ze = B ?? Ie, U = (e) => {
105
- B === void 0 && Le(e), e || Re(null), Me?.(e);
106
- }, Be = me(j);
107
- de(() => {
108
- Be.current = j;
109
- }, [j]);
110
- let Ve = pe(() => ({ run: () => (Be.current(), { status: "done" }) }), []);
111
- e("account.logout", Ve);
112
- let W = me(I);
113
- de(() => {
114
- W.current = I;
115
- }, [I]);
116
- let He = pe(() => ({
117
- languages: () => W.current.options.map((e) => ({
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: () => W.current.current,
132
+ current: () => Y.current.current,
122
133
  set: (e) => {
123
- let t = W.current, n = e.toLowerCase(), r = t.options.find((e) => e.code.toLowerCase() === n);
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", He), !n) return null;
128
- let Ue = je === "sheet", G = V("appShell.userMenu", "User menu"), We = V("auth.security.switchAccount", "Switch Account"), K = _e.filter((e) => e.id !== Se), q = !!S && K.length > 0, Ge = !!k || q || !!C, Ke = [i, ue].filter(Boolean).join(" · "), qe = [n.email, i].filter(Boolean).join(" · "), J = {
129
- dark: V("shell.profile.themeDark", "Dark"),
130
- light: V("shell.profile.themeLight", "Light"),
131
- system: V("shell.profile.themeSystem", "Match my device")
132
- }, Je = J[F.value], Y = D[F.value], Ye = I.options.find((e) => e.code === I.current)?.label ?? I.current, X = [
133
- "dark",
134
- "light",
135
- "system"
136
- ], Xe = R ? oe(R) : L.length > 0, Z = {
137
- viewProfile: V("userMenu.viewProfile", "View Profile"),
138
- addAccount: V("auth.profileMenu.addAccount", "Add account"),
139
- settings: V("common.actions.settings", "Settings"),
140
- appearance: V("shell.profile.appearance", "Appearance"),
141
- language: V("shell.profile.language", "Language"),
142
- help: V("shell.profile.helpSupport", "Help & support"),
143
- shortcuts: V("appShell.keyboardShortcuts", "Keyboard shortcuts"),
144
- signOut: V("auth.security.signOutDialogConfirm", "Sign out")
145
- }, Ze = (e) => V("userMenu.removeNamedAccount", "Remove {{name}}", { name: e.name || e.email }), Q = /* @__PURE__ */ E(w, { children: [A(n.name, n.avatarUrl, "lg"), /* @__PURE__ */ E("span", {
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__ */ T("span", {
163
+ children: [/* @__PURE__ */ O("span", {
148
164
  className: "block truncate text-body-sm font-bold text-text-primary",
149
165
  children: n.name
150
- }), qe && /* @__PURE__ */ T("span", {
166
+ }), at && /* @__PURE__ */ O("span", {
151
167
  className: "block truncate text-xs text-text-muted",
152
- children: qe
168
+ children: at
153
169
  })]
154
- })] }), Qe = (e) => {
170
+ })] }), ft = (e) => {
155
171
  let t = e.icon;
156
- return /* @__PURE__ */ E(w, { children: [
157
- /* @__PURE__ */ T("span", {
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__ */ T(t, { className: "size-4" })
175
+ children: /* @__PURE__ */ O(t, { className: "size-4" })
160
176
  }),
161
- /* @__PURE__ */ E("span", {
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__ */ T("span", {
179
+ children: [/* @__PURE__ */ O("span", {
164
180
  className: "min-w-0 flex-1",
165
181
  children: e.title
166
- }), /* @__PURE__ */ T(x, {
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__ */ T("span", {
187
+ /* @__PURE__ */ O("span", {
172
188
  className: "text-xs text-text-muted",
173
189
  children: e.description
174
190
  })
175
191
  ] });
176
- }, $e = (e) => Oe.length > 0 ? /* @__PURE__ */ T("div", {
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: Oe.map(e)
180
- }) : null, $ = M ? /* @__PURE__ */ T("div", {
195
+ children: Me.map(e)
196
+ }) : null, mt = P ? /* @__PURE__ */ O("div", {
181
197
  className: "py-1",
182
- children: M
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 (Ue) {
241
+ if ($e) {
185
242
  let e = (e) => {
186
- U(!1), e();
187
- }, t = (e) => Re((t) => t === e ? null : e), r = (e, n, r, i) => /* @__PURE__ */ E("button", {
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": H === e,
247
+ "aria-expanded": G === e,
191
248
  onClick: () => t(e),
192
249
  "data-testid": `sidebar-profile-${e}`,
193
250
  children: [
194
- /* @__PURE__ */ T(n, {
251
+ /* @__PURE__ */ O(n, {
195
252
  className: g,
196
253
  "aria-hidden": "true"
197
254
  }),
198
- /* @__PURE__ */ T("span", {
255
+ /* @__PURE__ */ O("span", {
199
256
  className: "min-w-0 flex-1 truncate",
200
257
  children: r
201
258
  }),
202
- i && /* @__PURE__ */ T("span", {
259
+ i && /* @__PURE__ */ O("span", {
203
260
  className: "truncate text-xs text-text-muted",
204
261
  children: i
205
262
  }),
206
- /* @__PURE__ */ T(x, {
207
- className: `size-4 flex-shrink-0 text-text-muted transition-transform ${H === e ? "rotate-90 rtl:-rotate-90" : "rtl:rotate-180"}`,
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
- }), i = {
212
- accounts: G,
213
- appearance: Z.appearance,
214
- language: Z.language,
215
- help: Z.help
216
- }, a = (t, n) => H === t ? /* @__PURE__ */ T("div", {
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": i[t],
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__ */ E("button", {
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__ */ T("span", {
286
+ children: [/* @__PURE__ */ O("span", {
229
287
  className: "min-w-0 flex-1 truncate",
230
288
  children: n.label
231
- }), n.selected && /* @__PURE__ */ T(ge, {
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__ */ E("div", {
294
+ return i ? /* @__PURE__ */ k("div", {
237
295
  className: "flex items-center gap-1",
238
- children: [/* @__PURE__ */ T("div", {
296
+ children: [/* @__PURE__ */ O("div", {
239
297
  className: "min-w-0 flex-1",
240
298
  children: r
241
- }), /* @__PURE__ */ T("button", {
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__ */ T(Ee, {
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, o = [
255
- ...k ? [{
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: Z.viewProfile,
258
- onSelect: k
321
+ label: Q.viewProfile,
322
+ onSelect: j
259
323
  }] : [],
260
- ...q ? K.map((e) => ({
324
+ ...nt ? tt.map((e) => ({
261
325
  id: `account-${e.id}`,
262
326
  label: e.name || e.email,
263
- onSelect: () => S?.(e.id),
264
- remove: O ? {
265
- label: Ze(e),
266
- onSelect: () => O(e.id)
327
+ onSelect: () => T?.(e.id),
328
+ remove: A ? {
329
+ label: dt(e),
330
+ onSelect: () => A(e.id)
267
331
  } : void 0
268
332
  })) : [],
269
- ...C ? [{
333
+ ...E ? [{
270
334
  id: "add-account",
271
- label: Z.addAccount,
272
- onSelect: C
335
+ label: Q.addAccount,
336
+ onSelect: E
273
337
  }] : []
274
- ], s = B === void 0 ? /* @__PURE__ */ T("button", {
338
+ ], c = U === void 0 ? /* @__PURE__ */ O("button", {
275
339
  type: "button",
276
- "aria-label": G,
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: A(n.name, n.avatarUrl, "md")
280
- }) : null, c = Ne ?? s;
281
- return /* @__PURE__ */ E(ne, {
282
- open: ze,
283
- onOpenChange: U,
284
- children: [c && /* @__PURE__ */ T(ae, {
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: c
287
- }), /* @__PURE__ */ E(re, {
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__ */ T("div", {
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__ */ T(ie, {
362
+ /* @__PURE__ */ O(ie, {
299
363
  className: "sr-only",
300
- children: V("appShell.userMenuSheetTitle", "Account")
364
+ children: W("appShell.userMenuSheetTitle", "Account")
301
365
  }),
302
- Ge ? /* @__PURE__ */ E("button", {
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": H === "accounts",
369
+ "aria-expanded": G === "accounts",
306
370
  onClick: () => t("accounts"),
307
371
  "data-testid": "sidebar-profile-identity",
308
- children: [Q, /* @__PURE__ */ T(x, {
309
- className: `size-4 flex-shrink-0 text-text-muted transition-transform ${H === "accounts" ? "rotate-90 rtl:-rotate-90" : "rtl:rotate-180"}`,
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__ */ T("div", {
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: Q
379
+ children: $
316
380
  }),
317
- a("accounts", o),
318
- $,
319
- $e((t) => /* @__PURE__ */ T("button", {
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: Qe(t)
388
+ children: ft(t)
325
389
  }, t.id)),
326
- /* @__PURE__ */ E("div", {
390
+ /* @__PURE__ */ k("div", {
327
391
  className: "pt-1.5",
328
392
  children: [
329
- N.length > 0 && /* @__PURE__ */ T("div", {
393
+ F.length > 0 && /* @__PURE__ */ O("div", {
330
394
  role: "group",
331
395
  "data-testid": "sidebar-profile-extra",
332
- children: N.map((t) => {
396
+ children: F.map((t) => {
333
397
  let n = t.icon;
334
- return /* @__PURE__ */ E("button", {
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__ */ T(n, { className: "size-4 flex-shrink-0 text-text-secondary" }), /* @__PURE__ */ T("span", {
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__ */ E("button", {
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(ke),
430
+ onClick: () => e(Ne),
351
431
  "data-testid": "sidebar-profile-settings",
352
432
  children: [
353
- /* @__PURE__ */ T(we, {
433
+ /* @__PURE__ */ O(De, {
354
434
  className: g,
355
435
  "aria-hidden": "true"
356
436
  }),
357
- /* @__PURE__ */ T("span", {
437
+ /* @__PURE__ */ O("span", {
358
438
  className: "min-w-0 flex-1 truncate",
359
- children: Z.settings
439
+ children: Q.settings
360
440
  }),
361
- P && /* @__PURE__ */ T("span", {
441
+ I && /* @__PURE__ */ O("span", {
362
442
  className: "text-xs text-text-muted",
363
- children: P
443
+ children: I
364
444
  })
365
445
  ]
366
446
  }),
367
- r("appearance", Y, Z.appearance, Je),
368
- a("appearance", X.map((e) => ({
447
+ r("appearance", ct, Q.appearance, st),
448
+ o("appearance", [...Z.map(({ value: e, label: t }) => ({
369
449
  id: e,
370
- label: J[e],
371
- selected: e === F.value,
372
- onSelect: () => F.onChange(e)
373
- }))),
374
- r("language", ye, Z.language, Ye),
375
- a("language", I.options.map((e) => ({
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 === I.current,
379
- onSelect: () => I.onChange(e.code)
462
+ selected: e.code === R.current,
463
+ onSelect: () => R.onChange(e.code)
380
464
  }))),
381
- Xe && /* @__PURE__ */ E(w, { children: [r("help", be, Z.help, void 0), R ? H === "help" && /* @__PURE__ */ T("div", {
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": Z.help,
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: h({
387
- help: R,
470
+ children: ce({
471
+ help: B,
388
472
  variant: "sheet",
389
- state: Pe,
390
- close: () => U(!1),
391
- idBase: Fe
473
+ state: Re,
474
+ close: () => J(!1),
475
+ idBase: ze
392
476
  })
393
- }) : a("help", L.map((e) => ({
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__ */ T("div", {
484
+ /* @__PURE__ */ O("div", {
401
485
  className: "mt-2 border-t border-border-subtle pt-2",
402
- children: /* @__PURE__ */ E("button", {
486
+ children: /* @__PURE__ */ k("button", {
403
487
  type: "button",
404
488
  className: v,
405
- onClick: () => e(j),
489
+ onClick: () => e(N),
406
490
  "data-testid": "sidebar-profile-logout",
407
- children: [/* @__PURE__ */ T(xe, {
491
+ children: [/* @__PURE__ */ O(Ce, {
408
492
  className: g,
409
493
  "aria-hidden": "true"
410
- }), /* @__PURE__ */ T("span", {
494
+ }), /* @__PURE__ */ O("span", {
411
495
  className: "truncate",
412
- children: Z.signOut
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 et = /* @__PURE__ */ E("button", {
504
+ let yt = /* @__PURE__ */ k("button", {
421
505
  type: "button",
422
- "aria-label": z ? G : void 0,
423
- title: z ? n.name : void 0,
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 ${z ? "justify-center" : ""}`,
426
- children: [A(n.name, n.avatarUrl, "md"), !z && /* @__PURE__ */ E(w, { children: [/* @__PURE__ */ E("span", {
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__ */ T("span", {
512
+ children: [/* @__PURE__ */ O("span", {
429
513
  className: "block truncate text-body-sm font-semibold text-text-primary",
430
514
  children: n.name
431
- }), Ke && /* @__PURE__ */ T("span", {
515
+ }), it && /* @__PURE__ */ O("span", {
432
516
  className: "block truncate text-xs text-text-muted",
433
- children: Ke
517
+ children: it
434
518
  })]
435
- }), b && /* @__PURE__ */ T("span", {
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__ */ E(a, {
442
- open: ze,
443
- onOpenChange: U,
525
+ return /* @__PURE__ */ k(o, {
526
+ open: Ye,
527
+ onOpenChange: J,
444
528
  modal: !1,
445
- children: [/* @__PURE__ */ T(te, {
529
+ children: [/* @__PURE__ */ O(te, {
446
530
  asChild: !0,
447
- children: Ne ?? et
448
- }), /* @__PURE__ */ E(o, {
449
- side: "top",
450
- align: "start",
451
- sideOffset: 8,
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": G,
539
+ "aria-label": X,
454
540
  "data-testid": "sidebar-profile-menu",
455
- className: r(ce, "max-h-[calc(100dvh-5rem)] w-[315px] overflow-y-auto"),
541
+ className: i(ue, "max-h-[calc(100dvh-5rem)] w-[315px] overflow-y-auto"),
456
542
  children: [
457
- Ge ? /* @__PURE__ */ E(f, { children: [/* @__PURE__ */ T(m, {
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: Q
461
- }), /* @__PURE__ */ E(p, {
546
+ children: $
547
+ }), /* @__PURE__ */ k(m, {
462
548
  sideOffset: 8,
463
549
  "data-testid": "sidebar-profile-accounts",
464
- className: r(y, "w-72"),
550
+ className: i(y, "w-72"),
465
551
  children: [
466
- k && /* @__PURE__ */ E(c, {
552
+ j && /* @__PURE__ */ k(c, {
467
553
  className: "h-control-sm gap-3 rounded-button px-2.5 focus:bg-bg-sunken",
468
- onSelect: () => k(),
554
+ onSelect: () => j(),
469
555
  "data-testid": "sidebar-profile-view-profile",
470
- children: [/* @__PURE__ */ T(Te, {
556
+ children: [/* @__PURE__ */ O(Oe, {
471
557
  className: "size-4 flex-shrink-0 text-text-secondary",
472
558
  "aria-hidden": "true"
473
- }), /* @__PURE__ */ T("span", {
559
+ }), /* @__PURE__ */ O("span", {
474
560
  className: "truncate",
475
- children: Z.viewProfile
561
+ children: Q.viewProfile
476
562
  })]
477
563
  }),
478
- q && /* @__PURE__ */ E(w, { children: [/* @__PURE__ */ T("div", {
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: We
482
- }), K.map((e) => /* @__PURE__ */ E("div", {
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__ */ E(c, {
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: () => S?.(e.id),
573
+ onSelect: () => T?.(e.id),
488
574
  "data-testid": `sidebar-profile-account-${e.id}`,
489
- children: [A(e.name || e.email, e.avatar, "sm"), /* @__PURE__ */ E("span", {
575
+ children: [M(e.name || e.email, e.avatar, "sm"), /* @__PURE__ */ k("span", {
490
576
  className: "min-w-0 flex-1",
491
- children: [/* @__PURE__ */ T("span", {
577
+ children: [/* @__PURE__ */ O("span", {
492
578
  className: "block truncate font-medium",
493
579
  children: e.name || e.email
494
- }), e.name && /* @__PURE__ */ T("span", {
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
- }), O && /* @__PURE__ */ T(c, {
500
- "aria-label": Ze(e),
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: () => O(e.id),
588
+ onSelect: () => A(e.id),
503
589
  "data-testid": `sidebar-profile-remove-${e.id}`,
504
- children: /* @__PURE__ */ T(Ee, {
590
+ children: /* @__PURE__ */ O(ke, {
505
591
  className: "size-4",
506
592
  "aria-hidden": "true"
507
593
  })
508
594
  })]
509
595
  }, e.id))] }),
510
- C && /* @__PURE__ */ E(c, {
596
+ E && /* @__PURE__ */ k(c, {
511
597
  className: "h-control-sm gap-3 rounded-button px-2.5 focus:bg-bg-sunken",
512
- onSelect: () => C(),
598
+ onSelect: () => E(),
513
599
  "data-testid": "sidebar-profile-add-account",
514
- children: [/* @__PURE__ */ T(Ce, {
600
+ children: [/* @__PURE__ */ O(Ee, {
515
601
  className: "size-4 flex-shrink-0 text-text-secondary",
516
602
  "aria-hidden": "true"
517
- }), /* @__PURE__ */ T("span", {
603
+ }), /* @__PURE__ */ O("span", {
518
604
  className: "truncate",
519
- children: Z.addAccount
605
+ children: Q.addAccount
520
606
  })]
521
607
  })
522
608
  ]
523
- })] }) : /* @__PURE__ */ T("div", {
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: Q
612
+ children: $
527
613
  }),
528
- $ && /* @__PURE__ */ T(De.Provider, {
614
+ mt && /* @__PURE__ */ O(je.Provider, {
529
615
  value: !0,
530
- children: $
616
+ children: mt
531
617
  }),
532
- $e((e) => /* @__PURE__ */ T(c, {
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: Qe(e)
622
+ children: ft(e)
537
623
  }, e.id)),
538
- N.length > 0 && /* @__PURE__ */ T(s, {
624
+ F.length > 0 && /* @__PURE__ */ O(s, {
539
625
  className: "mt-1",
540
626
  "data-testid": "sidebar-profile-extra",
541
- children: N.map((e) => {
627
+ children: F.map((e) => {
542
628
  let t = e.icon;
543
- return /* @__PURE__ */ E(c, {
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__ */ T(t, { className: "size-4 flex-shrink-0 text-text-secondary" }),
550
- /* @__PURE__ */ T("span", {
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__ */ T(d, {
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
- /* @__PURE__ */ E(c, {
563
- className: r(_, N.length > 0 ? void 0 : "mt-1"),
564
- onSelect: () => ke(),
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__ */ T(we, {
654
+ /* @__PURE__ */ O(De, {
568
655
  className: g,
569
656
  "aria-hidden": "true"
570
657
  }),
571
- /* @__PURE__ */ T("span", {
658
+ /* @__PURE__ */ O("span", {
572
659
  className: "min-w-0 flex-1 truncate",
573
- children: Z.settings
660
+ children: Q.settings
574
661
  }),
575
- P && /* @__PURE__ */ T(d, {
662
+ I && /* @__PURE__ */ O(f, {
576
663
  className: "tracking-normal",
577
- children: P
664
+ children: I
578
665
  })
579
666
  ]
580
667
  }),
581
- /* @__PURE__ */ E(f, { children: [/* @__PURE__ */ E(m, {
668
+ /* @__PURE__ */ k(p, { children: [/* @__PURE__ */ k(h, {
582
669
  className: _,
583
670
  "data-testid": "sidebar-profile-appearance",
584
671
  children: [
585
- /* @__PURE__ */ T(Y, {
672
+ /* @__PURE__ */ O(ct, {
586
673
  className: g,
587
674
  "aria-hidden": "true"
588
675
  }),
589
- /* @__PURE__ */ T("span", {
676
+ /* @__PURE__ */ O("span", {
590
677
  className: "flex-shrink-0",
591
- children: Z.appearance
678
+ children: Q.appearance
592
679
  }),
593
- /* @__PURE__ */ T("span", {
594
- className: le,
595
- children: Je
680
+ /* @__PURE__ */ O("span", {
681
+ className: fe,
682
+ children: st
596
683
  })
597
684
  ]
598
- }), /* @__PURE__ */ T(p, {
685
+ }), /* @__PURE__ */ k(m, {
599
686
  sideOffset: 8,
600
687
  "data-testid": "sidebar-profile-appearance-menu",
601
- className: r(y, "w-56"),
602
- children: /* @__PURE__ */ T(l, {
603
- value: F.value,
688
+ className: i(y, "w-56"),
689
+ children: [/* @__PURE__ */ O(l, {
690
+ value: L.value,
604
691
  onValueChange: (e) => {
605
- let t = X.find((t) => t === e);
606
- t && F.onChange(t);
692
+ let t = Z.find((t) => t.value === e);
693
+ t && L.onChange(t.value);
607
694
  },
608
- children: X.map((e) => {
609
- let t = D[e];
610
- return /* @__PURE__ */ E(u, {
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__ */ T(t, {
701
+ children: [/* @__PURE__ */ O(n, {
615
702
  className: g,
616
703
  "aria-hidden": "true"
617
- }), /* @__PURE__ */ T("span", {
704
+ }), /* @__PURE__ */ O("span", {
618
705
  className: "truncate",
619
- children: J[e]
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__ */ E(f, { children: [/* @__PURE__ */ E(m, {
720
+ /* @__PURE__ */ k(p, { children: [/* @__PURE__ */ k(h, {
626
721
  className: _,
627
722
  "data-testid": "sidebar-profile-language",
628
723
  children: [
629
- /* @__PURE__ */ T(ye, {
724
+ /* @__PURE__ */ O(xe, {
630
725
  className: g,
631
726
  "aria-hidden": "true"
632
727
  }),
633
- /* @__PURE__ */ T("span", {
728
+ /* @__PURE__ */ O("span", {
634
729
  className: "flex-shrink-0",
635
- children: Z.language
730
+ children: Q.language
636
731
  }),
637
- /* @__PURE__ */ T("span", {
638
- className: le,
639
- children: Ye
732
+ /* @__PURE__ */ O("span", {
733
+ className: fe,
734
+ children: lt
640
735
  })
641
736
  ]
642
- }), /* @__PURE__ */ T(p, {
737
+ }), /* @__PURE__ */ O(m, {
643
738
  sideOffset: 8,
644
739
  "data-testid": "sidebar-profile-language-menu",
645
- className: r(y, "w-56"),
646
- children: /* @__PURE__ */ T(l, {
647
- value: I.current,
648
- onValueChange: (e) => I.onChange(e),
649
- children: I.options.map((e) => /* @__PURE__ */ T(u, {
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__ */ T("span", {
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
- Xe && /* @__PURE__ */ E(f, { children: [/* @__PURE__ */ E(m, {
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__ */ T(be, {
758
+ children: [/* @__PURE__ */ O(Se, {
664
759
  className: "size-4 flex-shrink-0 text-text-secondary",
665
760
  "aria-hidden": "true"
666
- }), /* @__PURE__ */ T("span", {
761
+ }), /* @__PURE__ */ O("span", {
667
762
  className: "min-w-0 flex-1 truncate",
668
- children: Z.help
763
+ children: Q.help
669
764
  })]
670
- }), R ? /* @__PURE__ */ T(p, {
765
+ }), B ? /* @__PURE__ */ O(m, {
671
766
  sideOffset: 8,
672
767
  collisionPadding: 8,
673
768
  "data-testid": "sidebar-profile-help-menu",
674
- className: r("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"),
675
- children: h({
676
- help: R,
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: Pe,
679
- close: () => U(!1),
680
- idBase: Fe
773
+ state: Re,
774
+ close: () => J(!1),
775
+ idBase: ze
681
776
  })
682
- }) : /* @__PURE__ */ T(p, {
777
+ }) : /* @__PURE__ */ O(m, {
683
778
  sideOffset: 8,
684
779
  "data-testid": "sidebar-profile-help-menu",
685
- className: r("max-h-80 overflow-y-auto rounded-card border border-border-subtle bg-popover p-1.5 shadow-overlay", "w-60"),
686
- children: L.map((e) => {
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__ */ E(c, {
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__ */ T(t, { className: "size-4 flex-shrink-0 text-text-secondary" }),
695
- /* @__PURE__ */ T("span", {
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__ */ T(d, {
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
- Ae && /* @__PURE__ */ E(c, {
802
+ Pe && /* @__PURE__ */ k(c, {
708
803
  className: "h-control-sm gap-3 rounded-button px-2.5 focus:bg-bg-sunken",
709
- onSelect: () => Ae(),
804
+ onSelect: () => Pe(),
710
805
  "data-testid": "sidebar-profile-shortcuts",
711
806
  children: [
712
- /* @__PURE__ */ T(ve, {
807
+ /* @__PURE__ */ O(be, {
713
808
  className: "size-4 flex-shrink-0 text-text-secondary",
714
809
  "aria-hidden": "true"
715
810
  }),
716
- /* @__PURE__ */ T("span", {
811
+ /* @__PURE__ */ O("span", {
717
812
  className: "min-w-0 flex-1 truncate",
718
- children: Z.shortcuts
813
+ children: Q.shortcuts
719
814
  }),
720
- /* @__PURE__ */ T(d, {
815
+ /* @__PURE__ */ O(f, {
721
816
  className: "tracking-normal",
722
817
  children: "?"
723
818
  })
724
819
  ]
725
820
  }),
726
- /* @__PURE__ */ T(ee, { className: "my-1.5" }),
727
- /* @__PURE__ */ E(c, {
821
+ /* @__PURE__ */ O(d, { className: "my-1.5" }),
822
+ /* @__PURE__ */ k(c, {
728
823
  className: _,
729
- onSelect: () => j(),
824
+ onSelect: () => N(),
730
825
  "data-testid": "sidebar-profile-logout",
731
- children: [/* @__PURE__ */ T(xe, {
826
+ children: [/* @__PURE__ */ O(Ce, {
732
827
  className: g,
733
828
  "aria-hidden": "true"
734
- }), /* @__PURE__ */ T("span", {
829
+ }), /* @__PURE__ */ O("span", {
735
830
  className: "truncate",
736
- children: Z.signOut
831
+ children: Q.signOut
737
832
  })]
738
833
  })
739
834
  ]
740
835
  })]
741
836
  });
742
837
  }
743
- export { j as PlanUsageCard, M as SidebarProfileMenu };
838
+ export { N as PlanUsageCard, P as SidebarProfileMenu };