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