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