@burdenoff/fe-libs 2026.1117.8 → 2026.1118.1
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/index.d.ts +2 -2
- package/dist/chrome/shell/NewMenu.d.ts +7 -2
- package/dist/chrome/shell/NewMenu.js +21 -18
- package/dist/chrome/shell/ShellSidebar.d.ts +39 -5
- package/dist/chrome/shell/ShellSidebar.js +541 -389
- package/dist/chrome/shell/SidebarSearchTrigger.d.ts +8 -1
- package/dist/chrome/shell/SidebarSearchTrigger.js +19 -13
- package/dist/chrome/shell/WorkspaceMenu.d.ts +7 -0
- package/dist/chrome/shell/WorkspaceMenu.js +84 -72
- package/dist/chrome/shell/types.d.ts +11 -0
- package/package.json +1 -1
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ShellSidebarAppearance } from './types';
|
|
1
2
|
export interface SidebarSearchTriggerProps {
|
|
2
3
|
onOpen: () => void;
|
|
3
4
|
/** Kbd chip text, e.g. "Ctrl K". No chip when absent. */
|
|
@@ -5,5 +6,11 @@ export interface SidebarSearchTriggerProps {
|
|
|
5
6
|
/** Icon-only tile for the collapsed rail. */
|
|
6
7
|
collapsed?: boolean;
|
|
7
8
|
className?: string;
|
|
9
|
+
/**
|
|
10
|
+
* BOFF-15168: `floating` makes the field 32 px with a sunken fill and a
|
|
11
|
+
* hairline border, beside the floating sidebar's 32 px New button. The
|
|
12
|
+
* collapsed tile is the same in both. Default: the field of before.
|
|
13
|
+
*/
|
|
14
|
+
appearance?: ShellSidebarAppearance;
|
|
8
15
|
}
|
|
9
|
-
export declare function SidebarSearchTrigger({ onOpen, shortcut, collapsed, className, }: SidebarSearchTriggerProps): import('react').JSX.Element;
|
|
16
|
+
export declare function SidebarSearchTrigger({ onOpen, shortcut, collapsed, className, appearance, }: SidebarSearchTriggerProps): import('react').JSX.Element;
|
|
@@ -6,15 +6,21 @@ var i = "outline-none focus-visible:ring-2 focus-visible:ring-focus-ring", a = (
|
|
|
6
6
|
e,
|
|
7
7
|
i,
|
|
8
8
|
t
|
|
9
|
-
].filter(Boolean).join(" ")
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
9
|
+
].filter(Boolean).join(" "), o = {
|
|
10
|
+
default: "inline-flex h-5 flex-shrink-0 items-center rounded border border-border-subtle bg-bg-sunken px-1.5 font-sans text-caption text-text-muted",
|
|
11
|
+
floating: "inline-flex h-5 flex-shrink-0 items-center rounded border border-border-subtle bg-bg-surface px-1.5 font-sans text-caption text-text-muted"
|
|
12
|
+
}, s = {
|
|
13
|
+
default: "flex h-control-sm min-w-0 flex-1 items-center gap-2 rounded-button border border-border-subtle bg-bg-elevated px-2.5 text-start text-body-sm text-text-muted transition-colors hover:bg-bg-sunken",
|
|
14
|
+
floating: "flex h-8 min-w-0 flex-1 items-center gap-2 rounded-button border border-border-subtle bg-bg-sunken px-2.5 text-start text-body-sm text-text-muted transition-colors hover:border-border-default"
|
|
15
|
+
};
|
|
16
|
+
function c({ onOpen: i, shortcut: c, collapsed: l = !1, className: u, appearance: d = "default" }) {
|
|
17
|
+
let f = e(), p = f("common.search", "Search");
|
|
18
|
+
return l ? /* @__PURE__ */ n("button", {
|
|
13
19
|
type: "button",
|
|
14
20
|
onClick: i,
|
|
15
|
-
"aria-label":
|
|
21
|
+
"aria-label": p,
|
|
16
22
|
"data-testid": "shell-search-trigger",
|
|
17
|
-
className: a("flex size-10 items-center justify-center rounded-button text-text-secondary transition-colors hover:bg-bg-sunken hover:text-text-primary",
|
|
23
|
+
className: a("flex size-10 items-center justify-center rounded-button text-text-secondary transition-colors hover:bg-bg-sunken hover:text-text-primary", u),
|
|
18
24
|
children: /* @__PURE__ */ n(t, {
|
|
19
25
|
className: "size-4",
|
|
20
26
|
"aria-hidden": "true"
|
|
@@ -22,9 +28,9 @@ function o({ onOpen: i, shortcut: o, collapsed: s = !1, className: c }) {
|
|
|
22
28
|
}) : /* @__PURE__ */ r("button", {
|
|
23
29
|
type: "button",
|
|
24
30
|
onClick: i,
|
|
25
|
-
"aria-label":
|
|
31
|
+
"aria-label": c ? f("appShell.searchHint", "Search ({{shortcut}})", { shortcut: c }) : p,
|
|
26
32
|
"data-testid": "shell-search-trigger",
|
|
27
|
-
className: a(
|
|
33
|
+
className: a(s[d], u),
|
|
28
34
|
children: [
|
|
29
35
|
/* @__PURE__ */ n(t, {
|
|
30
36
|
className: "size-3.5 flex-shrink-0",
|
|
@@ -32,14 +38,14 @@ function o({ onOpen: i, shortcut: o, collapsed: s = !1, className: c }) {
|
|
|
32
38
|
}),
|
|
33
39
|
/* @__PURE__ */ n("span", {
|
|
34
40
|
className: "min-w-0 flex-1 truncate",
|
|
35
|
-
children:
|
|
41
|
+
children: p
|
|
36
42
|
}),
|
|
37
|
-
|
|
43
|
+
c && /* @__PURE__ */ n("kbd", {
|
|
38
44
|
"aria-hidden": "true",
|
|
39
|
-
className:
|
|
40
|
-
children:
|
|
45
|
+
className: o[d],
|
|
46
|
+
children: c
|
|
41
47
|
})
|
|
42
48
|
]
|
|
43
49
|
});
|
|
44
50
|
}
|
|
45
|
-
export {
|
|
51
|
+
export { c as SidebarSearchTrigger };
|
|
@@ -64,5 +64,12 @@ export interface WorkspaceMenuProps {
|
|
|
64
64
|
* Absent or false: the menu of before.
|
|
65
65
|
*/
|
|
66
66
|
searchableLists?: boolean;
|
|
67
|
+
/**
|
|
68
|
+
* BOFF-15168: `card` draws the trigger as a card (a hairline border, a
|
|
69
|
+
* raised fill, 12 px corners, 44 px tall: its two lines are set tight), as
|
|
70
|
+
* the floating sidebar's header shows it. Absent or `default`: the trigger
|
|
71
|
+
* of before.
|
|
72
|
+
*/
|
|
73
|
+
appearance?: 'default' | 'card';
|
|
67
74
|
}
|
|
68
75
|
export declare function WorkspaceMenu(props: WorkspaceMenuProps): import('react').JSX.Element;
|
|
@@ -11,8 +11,20 @@ import { Check as v, ChevronDown as y, ChevronsUpDown as b, Folders as x, Landma
|
|
|
11
11
|
import { Fragment as E, jsx as D, jsxs as O } from "react/jsx-runtime";
|
|
12
12
|
import * as k from "@radix-ui/react-scroll-area";
|
|
13
13
|
// src/chrome/shell/WorkspaceMenu.tsx
|
|
14
|
-
var A = "rounded-card border border-border-subtle bg-popover p-1.5 shadow-overlay", j =
|
|
15
|
-
|
|
14
|
+
var A = "rounded-card border border-border-subtle bg-popover p-1.5 shadow-overlay", j = {
|
|
15
|
+
default: "group flex min-w-0 items-center gap-2.5 rounded-button p-1 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",
|
|
16
|
+
card: "group flex min-w-0 items-center gap-2.5 rounded-card border border-border-default bg-text-primary/6 p-1.25 pe-2 text-start outline-none transition-colors hover:border-border-strong hover:bg-text-primary/8 focus-visible:ring-2 focus-visible:ring-focus-ring data-[state=open]:border-border-strong data-[state=open]:bg-text-primary/8"
|
|
17
|
+
}, M = {
|
|
18
|
+
default: {
|
|
19
|
+
name: "block truncate text-body-sm font-semibold text-text-primary",
|
|
20
|
+
org: "block truncate text-xs text-text-muted"
|
|
21
|
+
},
|
|
22
|
+
card: {
|
|
23
|
+
name: "block truncate text-body-sm font-semibold leading-tight text-text-primary",
|
|
24
|
+
org: "block truncate text-xs leading-tight text-text-secondary"
|
|
25
|
+
}
|
|
26
|
+
}, N = "h-control-sm gap-2.5 rounded-button px-2.5 focus:bg-bg-sunken", P = "px-2.5 pb-1 pt-2 text-caption font-semibold uppercase tracking-wider text-text-muted", F = "max-h-80 overflow-y-auto rounded-card border border-border-subtle bg-popover p-1.5 shadow-overlay";
|
|
27
|
+
function I(e) {
|
|
16
28
|
let t = e.trim().charAt(0).toUpperCase() || "?";
|
|
17
29
|
return /* @__PURE__ */ D("span", {
|
|
18
30
|
"aria-hidden": "true",
|
|
@@ -20,16 +32,16 @@ function P(e) {
|
|
|
20
32
|
children: t
|
|
21
33
|
});
|
|
22
34
|
}
|
|
23
|
-
var
|
|
24
|
-
function
|
|
35
|
+
var L = [];
|
|
36
|
+
function R(e) {
|
|
25
37
|
return e ? /* @__PURE__ */ D(v, {
|
|
26
38
|
className: "ms-auto size-4 flex-shrink-0 text-accent-primary",
|
|
27
39
|
"aria-hidden": "true"
|
|
28
40
|
}) : null;
|
|
29
41
|
}
|
|
30
|
-
function
|
|
42
|
+
function z({ id: e, testId: t, current: n, onPick: r, icon: a, label: o, rowProps: s }) {
|
|
31
43
|
return /* @__PURE__ */ O(i, {
|
|
32
|
-
className:
|
|
44
|
+
className: N,
|
|
33
45
|
onSelect: () => r(),
|
|
34
46
|
"data-testid": t,
|
|
35
47
|
"aria-current": n ? "true" : void 0,
|
|
@@ -40,13 +52,13 @@ function L({ id: e, testId: t, current: n, onPick: r, icon: a, label: o, rowProp
|
|
|
40
52
|
className: "min-w-0 flex-1 truncate",
|
|
41
53
|
children: o
|
|
42
54
|
}),
|
|
43
|
-
|
|
55
|
+
R(n)
|
|
44
56
|
]
|
|
45
57
|
}, e);
|
|
46
58
|
}
|
|
47
|
-
function
|
|
59
|
+
function B(e, t, n) {
|
|
48
60
|
return /* @__PURE__ */ O(i, {
|
|
49
|
-
className:
|
|
61
|
+
className: N,
|
|
50
62
|
onSelect: () => n(),
|
|
51
63
|
"data-testid": e,
|
|
52
64
|
children: [/* @__PURE__ */ D(w, {
|
|
@@ -58,16 +70,16 @@ function R(e, t, n) {
|
|
|
58
70
|
})]
|
|
59
71
|
});
|
|
60
72
|
}
|
|
61
|
-
function
|
|
73
|
+
function V(e, t) {
|
|
62
74
|
return /* @__PURE__ */ D("div", {
|
|
63
75
|
role: "presentation",
|
|
64
|
-
className:
|
|
76
|
+
className: P,
|
|
65
77
|
...t ? { id: t } : {},
|
|
66
78
|
children: e
|
|
67
79
|
});
|
|
68
80
|
}
|
|
69
|
-
var
|
|
70
|
-
function
|
|
81
|
+
var H = "max-h-[calc(var(--size-controlHeight-sm)*6.5)] pe-2.5 [&>div]:block! focus-visible:outline-none", U = "pointer-events-none absolute start-3 top-1/2 size-4 -translate-y-1/2 text-text-muted", W = "px-2.5 py-2 text-body-sm text-text-muted", G = "max-h-[var(--radix-dropdown-menu-content-available-height)] overflow-auto";
|
|
82
|
+
function K({ labelledBy: e, testId: t, rows: n, search: r }) {
|
|
71
83
|
return /* @__PURE__ */ O("div", {
|
|
72
84
|
role: "group",
|
|
73
85
|
"aria-labelledby": e,
|
|
@@ -77,7 +89,7 @@ function W({ labelledBy: e, testId: t, rows: n, search: r }) {
|
|
|
77
89
|
r && /* @__PURE__ */ O("div", {
|
|
78
90
|
className: "relative px-1 pb-1",
|
|
79
91
|
children: [/* @__PURE__ */ D(T, {
|
|
80
|
-
className:
|
|
92
|
+
className: U,
|
|
81
93
|
"aria-hidden": "true"
|
|
82
94
|
}), /* @__PURE__ */ D(u, {
|
|
83
95
|
type: "search",
|
|
@@ -96,7 +108,7 @@ function W({ labelledBy: e, testId: t, rows: n, search: r }) {
|
|
|
96
108
|
type: "auto",
|
|
97
109
|
className: "relative overflow-hidden",
|
|
98
110
|
children: [/* @__PURE__ */ D(k.Viewport, {
|
|
99
|
-
className:
|
|
111
|
+
className: H,
|
|
100
112
|
"data-testid": t,
|
|
101
113
|
children: n
|
|
102
114
|
}), /* @__PURE__ */ D(d, {})]
|
|
@@ -105,15 +117,15 @@ function W({ labelledBy: e, testId: t, rows: n, search: r }) {
|
|
|
105
117
|
role: "status",
|
|
106
118
|
"data-testid": `shell-workspace-nomatch-${r.name}`,
|
|
107
119
|
children: r.noMatch ? /* @__PURE__ */ D("p", {
|
|
108
|
-
className:
|
|
120
|
+
className: W,
|
|
109
121
|
children: r.noMatch
|
|
110
122
|
}) : null
|
|
111
123
|
})
|
|
112
124
|
]
|
|
113
125
|
});
|
|
114
126
|
}
|
|
115
|
-
function
|
|
116
|
-
return e.searchable ?
|
|
127
|
+
function q(e, { name: t, testId: n, plainTestId: r, rows: i }) {
|
|
128
|
+
return e.searchable ? K({
|
|
117
129
|
labelledBy: `${e.labelIds}-${t}`,
|
|
118
130
|
testId: n,
|
|
119
131
|
rows: i,
|
|
@@ -124,32 +136,32 @@ function G(e, { name: t, testId: n, plainTestId: r, rows: i }) {
|
|
|
124
136
|
children: i
|
|
125
137
|
});
|
|
126
138
|
}
|
|
127
|
-
function
|
|
128
|
-
let { props: t, lists: n, shellLabel: r, labelIds: i, orgLabel: a, searchable: o } = e, { activeWorkspaceId: s, onSelectWorkspace: c, onNewWorkspace: l } = t, u = n.workspaces, d = u.shown.map((e) =>
|
|
139
|
+
function J(e) {
|
|
140
|
+
let { props: t, lists: n, shellLabel: r, labelIds: i, orgLabel: a, searchable: o } = e, { activeWorkspaceId: s, onSelectWorkspace: c, onNewWorkspace: l } = t, u = n.workspaces, d = u.shown.map((e) => z({
|
|
129
141
|
id: e.id,
|
|
130
142
|
testId: `shell-workspace-item-${e.id}`,
|
|
131
143
|
current: e.id === s,
|
|
132
144
|
onPick: () => {
|
|
133
145
|
e.id !== s && c(e.id);
|
|
134
146
|
},
|
|
135
|
-
icon:
|
|
147
|
+
icon: I(e.name),
|
|
136
148
|
label: e.name,
|
|
137
149
|
rowProps: u.rowProps
|
|
138
150
|
}));
|
|
139
151
|
return /* @__PURE__ */ O(E, { children: [
|
|
140
|
-
|
|
141
|
-
|
|
152
|
+
V(r("shell.workspaceMenu.workspacesIn", "Workspaces in {{org}}", { org: a }), o ? `${i}-workspaces` : void 0),
|
|
153
|
+
q(e, {
|
|
142
154
|
name: "workspaces",
|
|
143
155
|
testId: "shell-workspace-workspaces",
|
|
144
156
|
rows: d
|
|
145
157
|
}),
|
|
146
|
-
l &&
|
|
158
|
+
l && B("shell-workspace-new", r("shell.workspaceMenu.newWorkspace", "New workspace"), () => l())
|
|
147
159
|
] });
|
|
148
160
|
}
|
|
149
|
-
function
|
|
161
|
+
function Y(e) {
|
|
150
162
|
let { props: t, projects: n, lists: r, shellLabel: i, labelIds: o, searchable: s } = e, { activeWorkspaceId: c, activeProjectId: l, onSelectProject: u, onSelectWorkspaceWide: d } = t, { onNewProject: f } = t, p = n.length > 0 && u !== void 0, m = f !== void 0 && !!c;
|
|
151
163
|
if (!p && !m) return null;
|
|
152
|
-
let h = r.projects, g = !!c && d !== void 0 && !h.filtering, _ = /* @__PURE__ */ O(E, { children: [g &&
|
|
164
|
+
let h = r.projects, g = !!c && d !== void 0 && !h.filtering, _ = /* @__PURE__ */ O(E, { children: [g && z({
|
|
153
165
|
id: "workspace-wide",
|
|
154
166
|
testId: "shell-workspace-all-projects",
|
|
155
167
|
current: !l,
|
|
@@ -163,32 +175,32 @@ function q(e) {
|
|
|
163
175
|
}),
|
|
164
176
|
label: i("contextSwitcher.allProjectsWorkspaceWide", "All projects (workspace-wide)"),
|
|
165
177
|
rowProps: h.rowProps
|
|
166
|
-
}), h.shown.map((e) =>
|
|
178
|
+
}), h.shown.map((e) => z({
|
|
167
179
|
id: e.id,
|
|
168
180
|
testId: `shell-workspace-project-${e.id}`,
|
|
169
181
|
current: e.id === l,
|
|
170
182
|
onPick: () => {
|
|
171
183
|
e.id !== l && u?.(e.id);
|
|
172
184
|
},
|
|
173
|
-
icon:
|
|
185
|
+
icon: I(e.name),
|
|
174
186
|
label: e.name,
|
|
175
187
|
rowProps: h.rowProps
|
|
176
188
|
}))] });
|
|
177
189
|
return /* @__PURE__ */ O(E, { children: [
|
|
178
190
|
/* @__PURE__ */ D(a, { className: "my-1.5" }),
|
|
179
|
-
|
|
180
|
-
p &&
|
|
191
|
+
V(i("contextSwitcher.project", "Project"), s ? `${o}-projects` : void 0),
|
|
192
|
+
p && q(e, {
|
|
181
193
|
name: "projects",
|
|
182
194
|
testId: "shell-workspace-projects",
|
|
183
195
|
plainTestId: "shell-workspace-projects",
|
|
184
196
|
rows: _
|
|
185
197
|
}),
|
|
186
|
-
m &&
|
|
198
|
+
m && B("shell-workspace-new-project", i("shell.workspaceMenu.newProject", "New project"), () => f?.())
|
|
187
199
|
] });
|
|
188
200
|
}
|
|
189
|
-
function
|
|
201
|
+
function X(t, n) {
|
|
190
202
|
return /* @__PURE__ */ O(o, { children: [/* @__PURE__ */ O(c, {
|
|
191
|
-
className:
|
|
203
|
+
className: N,
|
|
192
204
|
"data-testid": "shell-workspace-org-trigger",
|
|
193
205
|
indicator: /* @__PURE__ */ D(b, {
|
|
194
206
|
className: "size-4 flex-shrink-0 text-text-muted",
|
|
@@ -204,14 +216,14 @@ function J(t, n) {
|
|
|
204
216
|
}), /* @__PURE__ */ D(s, {
|
|
205
217
|
sideOffset: 6,
|
|
206
218
|
"data-testid": "shell-workspace-org-menu",
|
|
207
|
-
className: e(
|
|
219
|
+
className: e(F, "w-64"),
|
|
208
220
|
children: n
|
|
209
221
|
})] });
|
|
210
222
|
}
|
|
211
|
-
function
|
|
223
|
+
function Z(e) {
|
|
212
224
|
let { props: t, lists: n, shellLabel: r, labelIds: i, orgLabel: o, searchable: s } = e, { organizations: c, activeOrganizationId: l, onSelectOrganization: u } = t;
|
|
213
225
|
if (c.length === 0) return null;
|
|
214
|
-
let d = n.organizations, f = d.shown.map((e) =>
|
|
226
|
+
let d = n.organizations, f = d.shown.map((e) => z({
|
|
215
227
|
id: e.id,
|
|
216
228
|
testId: `shell-workspace-org-${e.id}`,
|
|
217
229
|
current: e.id === l,
|
|
@@ -227,38 +239,38 @@ function Y(e) {
|
|
|
227
239
|
}));
|
|
228
240
|
return /* @__PURE__ */ O(E, { children: [
|
|
229
241
|
/* @__PURE__ */ D(a, { className: "my-1.5" }),
|
|
230
|
-
|
|
231
|
-
s ?
|
|
242
|
+
V(r("shell.workspaceMenu.organization", "Organization"), s ? `${i}-organizations` : void 0),
|
|
243
|
+
s ? K({
|
|
232
244
|
labelledBy: `${i}-organizations`,
|
|
233
245
|
testId: "shell-workspace-orgs",
|
|
234
246
|
rows: f,
|
|
235
247
|
search: d.search
|
|
236
|
-
}) :
|
|
248
|
+
}) : X(o, f)
|
|
237
249
|
] });
|
|
238
250
|
}
|
|
239
|
-
function
|
|
251
|
+
function Q({ props: t, shellLabel: n }) {
|
|
240
252
|
let { currentProduct: r, products: l, onSelectProduct: u } = t, d = l.filter((e) => e.id !== r.id);
|
|
241
253
|
return /* @__PURE__ */ O(E, { children: [
|
|
242
254
|
/* @__PURE__ */ D(a, { className: "my-1.5" }),
|
|
243
|
-
|
|
255
|
+
V(n("shell.workspaceMenu.product", "Product")),
|
|
244
256
|
/* @__PURE__ */ O(i, {
|
|
245
|
-
className:
|
|
257
|
+
className: N,
|
|
246
258
|
"aria-current": "true",
|
|
247
259
|
"data-testid": `shell-workspace-product-${r.id}`,
|
|
248
260
|
children: [
|
|
249
261
|
/* @__PURE__ */ D("span", {
|
|
250
262
|
className: "flex size-5 flex-shrink-0 items-center justify-center",
|
|
251
|
-
children: r.logo ??
|
|
263
|
+
children: r.logo ?? I(r.name)
|
|
252
264
|
}),
|
|
253
265
|
/* @__PURE__ */ D("span", {
|
|
254
266
|
className: "min-w-0 flex-1 truncate",
|
|
255
267
|
children: r.name
|
|
256
268
|
}),
|
|
257
|
-
|
|
269
|
+
R(!0)
|
|
258
270
|
]
|
|
259
271
|
}),
|
|
260
272
|
d.length > 0 && /* @__PURE__ */ O(o, { children: [/* @__PURE__ */ O(c, {
|
|
261
|
-
className:
|
|
273
|
+
className: N,
|
|
262
274
|
"data-testid": "shell-workspace-switch-product",
|
|
263
275
|
children: [/* @__PURE__ */ D(C, {
|
|
264
276
|
className: "size-4 flex-shrink-0 text-text-secondary",
|
|
@@ -270,14 +282,14 @@ function X({ props: t, shellLabel: n }) {
|
|
|
270
282
|
}), /* @__PURE__ */ D(s, {
|
|
271
283
|
sideOffset: 6,
|
|
272
284
|
"data-testid": "shell-workspace-product-menu",
|
|
273
|
-
className: e(
|
|
285
|
+
className: e(F, "w-64"),
|
|
274
286
|
children: d.map((e) => /* @__PURE__ */ O(i, {
|
|
275
|
-
className:
|
|
287
|
+
className: N,
|
|
276
288
|
onSelect: () => u(e.id),
|
|
277
289
|
"data-testid": `shell-workspace-product-${e.id}`,
|
|
278
290
|
children: [/* @__PURE__ */ D("span", {
|
|
279
291
|
className: "flex size-5 flex-shrink-0 items-center justify-center",
|
|
280
|
-
children: e.icon ??
|
|
292
|
+
children: e.icon ?? I(e.name)
|
|
281
293
|
}), /* @__PURE__ */ D("span", {
|
|
282
294
|
className: "min-w-0 flex-1 truncate",
|
|
283
295
|
children: e.name
|
|
@@ -286,41 +298,41 @@ function X({ props: t, shellLabel: n }) {
|
|
|
286
298
|
})] })
|
|
287
299
|
] });
|
|
288
300
|
}
|
|
289
|
-
function
|
|
290
|
-
let { logo: a, workspaceName: o, orgName: s, workspaces: c, organizations: u } = i, { activeWorkspaceId: d, onSelectWorkspace: f, activeOrganizationId: p } = i, v = i.compact ?? !1, b = i.searchableLists ?? !1, x = i.
|
|
301
|
+
function $(i) {
|
|
302
|
+
let { logo: a, workspaceName: o, orgName: s, workspaces: c, organizations: u } = i, { activeWorkspaceId: d, onSelectWorkspace: f, activeOrganizationId: p } = i, v = i.compact ?? !1, b = i.searchableLists ?? !1, x = i.appearance ?? "default", S = i.projects ?? L, C = t(), [w, T] = _(!1), E = g(), k = m(b, {
|
|
291
303
|
workspaces: c,
|
|
292
|
-
projects:
|
|
304
|
+
projects: S,
|
|
293
305
|
organizations: u
|
|
294
306
|
});
|
|
295
307
|
h({
|
|
296
|
-
open:
|
|
297
|
-
setOpen:
|
|
308
|
+
open: w,
|
|
309
|
+
setOpen: T,
|
|
298
310
|
workspaces: c,
|
|
299
311
|
activeWorkspaceId: d,
|
|
300
312
|
onSelectWorkspace: f
|
|
301
313
|
});
|
|
302
|
-
let
|
|
314
|
+
let N = u.find((e) => e.id === p)?.name ?? s, P = {
|
|
303
315
|
props: i,
|
|
304
|
-
projects:
|
|
305
|
-
lists:
|
|
306
|
-
shellLabel:
|
|
307
|
-
labelIds:
|
|
308
|
-
orgLabel:
|
|
316
|
+
projects: S,
|
|
317
|
+
lists: k,
|
|
318
|
+
shellLabel: C,
|
|
319
|
+
labelIds: E,
|
|
320
|
+
orgLabel: N,
|
|
309
321
|
searchable: b
|
|
310
322
|
};
|
|
311
323
|
return /* @__PURE__ */ O(n, {
|
|
312
|
-
open:
|
|
324
|
+
open: w,
|
|
313
325
|
onOpenChange: (e) => {
|
|
314
|
-
|
|
326
|
+
T(e), e || k.clear();
|
|
315
327
|
},
|
|
316
328
|
modal: !1,
|
|
317
329
|
children: [/* @__PURE__ */ D(l, {
|
|
318
330
|
asChild: !0,
|
|
319
331
|
children: /* @__PURE__ */ O("button", {
|
|
320
332
|
type: "button",
|
|
321
|
-
"aria-label":
|
|
333
|
+
"aria-label": C("shell.workspaceMenu.trigger", "Switch workspace: {{name}}", { name: o }),
|
|
322
334
|
"data-testid": "shell-workspace-trigger",
|
|
323
|
-
className: e(
|
|
335
|
+
className: e(j[x], v ? "w-full" : "flex-1"),
|
|
324
336
|
children: [
|
|
325
337
|
/* @__PURE__ */ D("span", {
|
|
326
338
|
className: "flex size-8 flex-shrink-0 items-center justify-center",
|
|
@@ -329,11 +341,11 @@ function Z(i) {
|
|
|
329
341
|
/* @__PURE__ */ O("span", {
|
|
330
342
|
className: "min-w-0 flex-1",
|
|
331
343
|
children: [/* @__PURE__ */ D("span", {
|
|
332
|
-
className:
|
|
344
|
+
className: M[x].name,
|
|
333
345
|
children: o
|
|
334
346
|
}), /* @__PURE__ */ D("span", {
|
|
335
|
-
className:
|
|
336
|
-
children:
|
|
347
|
+
className: M[x].org,
|
|
348
|
+
children: N
|
|
337
349
|
})]
|
|
338
350
|
}),
|
|
339
351
|
/* @__PURE__ */ D(y, {
|
|
@@ -347,14 +359,14 @@ function Z(i) {
|
|
|
347
359
|
align: "start",
|
|
348
360
|
sideOffset: 6,
|
|
349
361
|
"data-testid": "shell-workspace-menu",
|
|
350
|
-
className: e(A, "w-[300px]", b &&
|
|
362
|
+
className: e(A, "w-[300px]", b && G),
|
|
351
363
|
children: [
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
364
|
+
J(P),
|
|
365
|
+
Y(P),
|
|
366
|
+
Z(P),
|
|
367
|
+
Q(P)
|
|
356
368
|
]
|
|
357
369
|
})]
|
|
358
370
|
});
|
|
359
371
|
}
|
|
360
|
-
export {
|
|
372
|
+
export { $ as WorkspaceMenu };
|
|
@@ -2,6 +2,17 @@ import { ComponentType, ReactNode } from 'react';
|
|
|
2
2
|
export type ShellIcon = ComponentType<{
|
|
3
3
|
className?: string;
|
|
4
4
|
}>;
|
|
5
|
+
/**
|
|
6
|
+
* How the sidebar is drawn (BOFF-15168, opt-in).
|
|
7
|
+
*
|
|
8
|
+
* - `default`: the edge-to-edge panel with a border on its end edge, every
|
|
9
|
+
* product's sidebar.
|
|
10
|
+
* - `floating` (FluidGrids): a panel inset 8 px from the window's edges, with
|
|
11
|
+
* a hairline border and 16 px corners; 32 px rows whose current row is a
|
|
12
|
+
* raised fill with a hairline border (no accent wash or bar); section names
|
|
13
|
+
* in sentence case. The sidebar keeps its width (272 px, the rail 64 px).
|
|
14
|
+
*/
|
|
15
|
+
export type ShellSidebarAppearance = 'default' | 'floating';
|
|
5
16
|
export interface ShellNavBadge {
|
|
6
17
|
value: number | string;
|
|
7
18
|
tone: 'accent' | 'neutral';
|