@rafal.lemieszewski/tide-ui 0.87.2 → 0.87.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/cjs/components/fundamental/command.cjs +1 -1
- package/dist/cjs/components/product/app-frame.cjs +1 -1
- package/dist/es/components/fundamental/command.js +38 -31
- package/dist/es/components/product/app-frame.js +315 -272
- package/dist/types/components/fundamental/command.d.ts +2 -1
- package/dist/types/components/fundamental/custom-icons.d.cts +33 -0
- package/package.json +11 -1
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { jsxs as l, jsx as e, Fragment as
|
|
2
|
-
import * as
|
|
3
|
-
import { SidebarProvider as ie, SidebarInset as te, Sidebar as ne, SidebarHeader as ae, SidebarGroup as
|
|
1
|
+
import { jsxs as l, jsx as e, Fragment as Q } from "react/jsx-runtime";
|
|
2
|
+
import * as h from "react";
|
|
3
|
+
import { SidebarProvider as ie, SidebarInset as te, Sidebar as ne, SidebarHeader as ae, SidebarGroup as j, SidebarGroupContent as D, SidebarMenu as I, SidebarMenuItem as O, SidebarMenuButton as y, SidebarGroupLabel as q, SidebarMenuSub as Y, SidebarMenuSubItem as _, SidebarMenuSubButton as ee, SidebarFooter as oe, SidebarRail as se, useSidebar as ce, SidebarTrigger as de } from "../fundamental/sidebar.js";
|
|
4
4
|
import { Button as pe } from "../fundamental/button.js";
|
|
5
5
|
import { Icon as s } from "../fundamental/icon.js";
|
|
6
|
-
import { Bell as he, CircleHelp as ue, Globe as me, Container as fe, Anchor as be, Ship as ge, TrendingUp as ve, ScrollText as xe, ShieldCheck as ye, House as Ce, LayoutDashboard as we, Search as
|
|
6
|
+
import { Bell as he, CircleHelp as ue, Globe as me, Container as fe, Anchor as be, Ship as ge, TrendingUp as ve, ScrollText as xe, ShieldCheck as ye, House as Ce, LayoutDashboard as we, Search as W, ChevronRight as re, ChevronDown as ke, Check as K, User as Se, Settings as Ne, LogOut as ze, RotateCcw as Ae } from "lucide-react";
|
|
7
7
|
import { Avatar as z, AvatarImage as A, AvatarFallback as M } from "../fundamental/avatar.js";
|
|
8
|
-
import { Separator as
|
|
8
|
+
import { Separator as J } from "../fundamental/separator.js";
|
|
9
9
|
import { Kbd as E } from "../fundamental/kbd.js";
|
|
10
|
-
import { DropdownMenu as
|
|
11
|
-
import { TooltipProvider as Me, Tooltip as
|
|
12
|
-
import { CommandDialog as Ve, CommandInput as Le, CommandList as
|
|
10
|
+
import { DropdownMenu as G, DropdownMenuTrigger as $, DropdownMenuContent as X, DropdownMenuLabel as H, DropdownMenuSeparator as T, DropdownMenuItem as C } from "../fundamental/dropdown-menu.js";
|
|
11
|
+
import { TooltipProvider as Me, Tooltip as w, TooltipTrigger as k, TooltipContent as S } from "../fundamental/tooltip.js";
|
|
12
|
+
import { CommandDialog as Ve, CommandInput as Le, CommandList as Te, CommandEmpty as He, CommandGroup as F, CommandItem as V } from "../fundamental/command.js";
|
|
13
13
|
const Ee = {
|
|
14
14
|
name: "John Doe",
|
|
15
15
|
email: "john@example.com",
|
|
@@ -133,44 +133,44 @@ const Ee = {
|
|
|
133
133
|
isActive: !1
|
|
134
134
|
}
|
|
135
135
|
]
|
|
136
|
-
},
|
|
136
|
+
}, Z = (o) => o.split(" ").filter(Boolean).map((a) => a[0]).join("").slice(0, 2).toUpperCase(), B = (o) => o.split(" ").filter(Boolean).map((a) => a[0]).join("").slice(0, 2).toUpperCase(), P = () => typeof navigator < "u" && /Mac|iPod|iPhone|iPad/.test(navigator.userAgent);
|
|
137
137
|
function le(o) {
|
|
138
|
-
const
|
|
138
|
+
const a = {};
|
|
139
139
|
return [
|
|
140
140
|
...o.main || [],
|
|
141
141
|
...o.operations || [],
|
|
142
142
|
...o.intelligence || [],
|
|
143
143
|
...o.support || []
|
|
144
|
-
].forEach((
|
|
145
|
-
if (
|
|
146
|
-
const p =
|
|
147
|
-
n
|
|
144
|
+
].forEach((n) => {
|
|
145
|
+
if (n.items && n.items.length > 0) {
|
|
146
|
+
const p = n.items.some((u) => u.isActive);
|
|
147
|
+
a[n.title] = p;
|
|
148
148
|
}
|
|
149
|
-
}),
|
|
149
|
+
}), a;
|
|
150
150
|
}
|
|
151
|
-
function je({ navigationData: o, user:
|
|
152
|
-
const [
|
|
151
|
+
function je({ navigationData: o, user: a, teams: f, onNavigate: n, navigationMode: p, onNavigationModeChange: u }) {
|
|
152
|
+
const [b, d] = h.useState(!1), [x, g] = h.useState(""), [v, L] = h.useState(
|
|
153
153
|
() => le(o)
|
|
154
|
-
), [
|
|
155
|
-
|
|
156
|
-
...
|
|
157
|
-
[r]: !
|
|
154
|
+
), [m, R] = h.useState(f[0]), U = (r) => {
|
|
155
|
+
L((t) => ({
|
|
156
|
+
...t,
|
|
157
|
+
[r]: !t[r]
|
|
158
158
|
}));
|
|
159
|
-
},
|
|
159
|
+
}, i = (r) => r.items && r.items.some((t) => t.isActive), c = (r) => {
|
|
160
160
|
if (r.items && r.items.length > 0) {
|
|
161
|
-
const
|
|
162
|
-
if (
|
|
163
|
-
return `${r.title} → ${
|
|
161
|
+
const t = r.items.find((N) => N.isActive);
|
|
162
|
+
if (t)
|
|
163
|
+
return `${r.title} → ${t.title}`;
|
|
164
164
|
}
|
|
165
165
|
return r.title;
|
|
166
166
|
};
|
|
167
|
-
return
|
|
168
|
-
const r = (
|
|
169
|
-
|
|
167
|
+
return h.useEffect(() => {
|
|
168
|
+
const r = (t) => {
|
|
169
|
+
t.key === "k" && (t.metaKey || t.ctrlKey) && (t.preventDefault(), d((N) => !N));
|
|
170
170
|
};
|
|
171
171
|
return document.addEventListener("keydown", r), () => document.removeEventListener("keydown", r);
|
|
172
|
-
}, []),
|
|
173
|
-
|
|
172
|
+
}, []), h.useEffect(() => {
|
|
173
|
+
L(le(o));
|
|
174
174
|
}, [o]), /* @__PURE__ */ l(Me, { delayDuration: 100, children: [
|
|
175
175
|
/* @__PURE__ */ l(ne, { variant: "sidebar", collapsible: "icon", className: "flex h-full flex-col", children: [
|
|
176
176
|
/* @__PURE__ */ e(ae, { className: "sticky top-0 z-10 h-12 border-b border-[var(--color-border-primary-subtle)] bg-[var(--color-surface-primary)] group-data-[collapsible=icon]:flex group-data-[collapsible=icon]:justify-center group-data-[collapsible=icon]:px-2 box-border", children: /* @__PURE__ */ e("div", { className: "flex h-[22px] w-7 items-center justify-center", children: /* @__PURE__ */ e(
|
|
@@ -197,47 +197,47 @@ function je({ navigationData: o, user: n, teams: m, onNavigate: t, navigationMod
|
|
|
197
197
|
"data-sidebar": "content",
|
|
198
198
|
children: [
|
|
199
199
|
/* @__PURE__ */ e("div", { className: "p-[var(--space-m)] pt-[var(--space-s)] group-data-[collapsible=icon]:px-2", children: /* @__PURE__ */ l("div", { className: "relative", children: [
|
|
200
|
-
/* @__PURE__ */ e("div", { className: "absolute top-1/2 left-2 -translate-y-1/2 group-data-[collapsible=icon]:hidden", children: /* @__PURE__ */ e(s, { name:
|
|
200
|
+
/* @__PURE__ */ e("div", { className: "absolute top-1/2 left-2 -translate-y-1/2 group-data-[collapsible=icon]:hidden", children: /* @__PURE__ */ e(s, { name: W, size: "m", color: "tertiary" }) }),
|
|
201
201
|
/* @__PURE__ */ l("div", { className: "group-data-[collapsible=icon]:hidden", children: [
|
|
202
202
|
/* @__PURE__ */ e(
|
|
203
203
|
"button",
|
|
204
204
|
{
|
|
205
|
-
onClick: () =>
|
|
205
|
+
onClick: () => d(!0),
|
|
206
206
|
className: "text-body-md flex h-8 w-full cursor-pointer items-center rounded-m border border-[var(--color-border-primary-subtle)] bg-[var(--color-surface-primary)] px-3 py-1 pr-20 pl-8 text-left text-[var(--color-text-tertiary)] transition-colors hover:border-[var(--color-border-primary-medium)] hover:!bg-[var(--color-background-neutral-subtlest-hovered)] focus:border-[var(--color-border-brand-bold)] focus:ring-2 focus:ring-[var(--color-border-brand-bold)]/20 focus:ring-offset-0 focus:outline-none active:border-[var(--color-border-primary-medium)]",
|
|
207
207
|
children: "Search"
|
|
208
208
|
}
|
|
209
209
|
),
|
|
210
210
|
/* @__PURE__ */ l("div", { className: "absolute top-1/2 right-2 flex -translate-y-1/2 gap-1", children: [
|
|
211
|
-
/* @__PURE__ */ e(E, { size: "s", children:
|
|
211
|
+
/* @__PURE__ */ e(E, { size: "s", children: P() ? "⌘" : "Ctrl" }),
|
|
212
212
|
/* @__PURE__ */ e(E, { size: "s", children: "K" })
|
|
213
213
|
] })
|
|
214
214
|
] }),
|
|
215
|
-
/* @__PURE__ */ l(
|
|
216
|
-
/* @__PURE__ */ e(
|
|
215
|
+
/* @__PURE__ */ l(w, { delayDuration: 500, children: [
|
|
216
|
+
/* @__PURE__ */ e(k, { asChild: !0, children: /* @__PURE__ */ e(
|
|
217
217
|
"button",
|
|
218
218
|
{
|
|
219
|
-
onClick: () =>
|
|
219
|
+
onClick: () => d(!0),
|
|
220
220
|
className: "hidden h-8 w-8 cursor-pointer items-center justify-center rounded border border-[var(--color-border-primary-subtle)] bg-transparent transition-all duration-200 group-data-[collapsible=icon]:flex hover:border-[var(--color-border-primary-medium)] hover:!bg-[var(--color-background-neutral-subtlest-hovered)] focus:border-[var(--color-border-brand-bold)] focus:ring-2 focus:ring-[var(--color-border-brand-bold)]/20 focus:ring-offset-0 focus:outline-none active:border-[var(--color-border-primary-medium)]",
|
|
221
221
|
"aria-label": "Search",
|
|
222
|
-
children: /* @__PURE__ */ e(s, { name:
|
|
222
|
+
children: /* @__PURE__ */ e(s, { name: W, size: "m", color: "tertiary" })
|
|
223
223
|
}
|
|
224
224
|
) }),
|
|
225
|
-
/* @__PURE__ */ e(
|
|
225
|
+
/* @__PURE__ */ e(S, { side: "right", className: "hidden group-data-[collapsible=icon]:block", children: /* @__PURE__ */ l("div", { className: "flex items-center gap-2", children: [
|
|
226
226
|
/* @__PURE__ */ e("span", { children: "Search" }),
|
|
227
227
|
/* @__PURE__ */ l("div", { className: "flex gap-1", children: [
|
|
228
|
-
/* @__PURE__ */ e(E, { size: "s", variant: "dark", children:
|
|
228
|
+
/* @__PURE__ */ e(E, { size: "s", variant: "dark", children: P() ? "⌘" : "Ctrl" }),
|
|
229
229
|
/* @__PURE__ */ e(E, { size: "s", variant: "dark", children: "K" })
|
|
230
230
|
] })
|
|
231
231
|
] }) })
|
|
232
232
|
] })
|
|
233
233
|
] }) }),
|
|
234
|
-
/* @__PURE__ */ e(
|
|
235
|
-
/* @__PURE__ */ e(
|
|
236
|
-
|
|
234
|
+
/* @__PURE__ */ e(j, { className: "pb-1 mt-1 p-[var(--space-s)]", children: /* @__PURE__ */ e(D, { children: /* @__PURE__ */ e(I, { children: o.main.map((r) => /* @__PURE__ */ e(O, { children: /* @__PURE__ */ l(w, { children: [
|
|
235
|
+
/* @__PURE__ */ e(k, { asChild: !0, children: /* @__PURE__ */ l(
|
|
236
|
+
y,
|
|
237
237
|
{
|
|
238
238
|
isActive: r.isActive,
|
|
239
|
-
onClick: (
|
|
240
|
-
|
|
239
|
+
onClick: (t) => {
|
|
240
|
+
n && (t.preventDefault(), n(r.url));
|
|
241
241
|
},
|
|
242
242
|
children: [
|
|
243
243
|
/* @__PURE__ */ e(s, { name: r.icon, size: "s" }),
|
|
@@ -245,17 +245,17 @@ function je({ navigationData: o, user: n, teams: m, onNavigate: t, navigationMod
|
|
|
245
245
|
]
|
|
246
246
|
}
|
|
247
247
|
) }),
|
|
248
|
-
/* @__PURE__ */ e(
|
|
248
|
+
/* @__PURE__ */ e(S, { side: "right", className: "hidden group-data-[collapsible=icon]:block", children: c(r) })
|
|
249
249
|
] }) }, r.title)) }) }) }),
|
|
250
|
-
/* @__PURE__ */ e("div", { className: "my-2 hidden justify-center px-2 group-data-[collapsible=icon]:flex", children: /* @__PURE__ */ e(
|
|
251
|
-
/* @__PURE__ */ l(
|
|
250
|
+
/* @__PURE__ */ e("div", { className: "my-2 hidden justify-center px-2 group-data-[collapsible=icon]:flex", children: /* @__PURE__ */ e(J, { layout: "vertical" }) }),
|
|
251
|
+
/* @__PURE__ */ l(j, { className: "mt-1 p-[var(--space-s)]", children: [
|
|
252
252
|
/* @__PURE__ */ e(q, { className: "py-1 pb-1.5 group-data-[collapsible=icon]:hidden", children: "Operations" }),
|
|
253
|
-
/* @__PURE__ */ e(
|
|
253
|
+
/* @__PURE__ */ e(D, { children: /* @__PURE__ */ e(I, { children: o.operations.map((r) => /* @__PURE__ */ e(O, { children: r.items && r.items.length > 0 ? /* @__PURE__ */ l(Q, { children: [
|
|
254
254
|
/* @__PURE__ */ e("div", { className: "group-data-[collapsible=icon]:hidden", children: /* @__PURE__ */ l(
|
|
255
|
-
|
|
255
|
+
y,
|
|
256
256
|
{
|
|
257
257
|
isActive: r.isActive && !r.items?.length,
|
|
258
|
-
onClick: () =>
|
|
258
|
+
onClick: () => U(r.title),
|
|
259
259
|
children: [
|
|
260
260
|
/* @__PURE__ */ e(s, { name: r.icon, size: "s" }),
|
|
261
261
|
/* @__PURE__ */ e("span", { children: r.title }),
|
|
@@ -264,57 +264,57 @@ function je({ navigationData: o, user: n, teams: m, onNavigate: t, navigationMod
|
|
|
264
264
|
{
|
|
265
265
|
name: re,
|
|
266
266
|
size: "s",
|
|
267
|
-
className: `ml-auto transition-transform ${
|
|
267
|
+
className: `ml-auto transition-transform ${v[r.title] ? "rotate-90" : ""}`
|
|
268
268
|
}
|
|
269
269
|
)
|
|
270
270
|
]
|
|
271
271
|
}
|
|
272
272
|
) }),
|
|
273
|
-
r.items && r.items.length > 0 &&
|
|
273
|
+
r.items && r.items.length > 0 && v[r.title] && /* @__PURE__ */ e(Y, { children: r.items.map((t) => /* @__PURE__ */ e(_, { children: /* @__PURE__ */ e(
|
|
274
274
|
ee,
|
|
275
275
|
{
|
|
276
|
-
isActive:
|
|
277
|
-
onClick: (
|
|
278
|
-
|
|
276
|
+
isActive: t.isActive,
|
|
277
|
+
onClick: (N) => {
|
|
278
|
+
n && (N.preventDefault(), n(t.url));
|
|
279
279
|
},
|
|
280
|
-
children: /* @__PURE__ */ e("span", { children:
|
|
280
|
+
children: /* @__PURE__ */ e("span", { children: t.title })
|
|
281
281
|
}
|
|
282
|
-
) },
|
|
283
|
-
/* @__PURE__ */ e("div", { className: "hidden group-data-[collapsible=icon]:block", children: /* @__PURE__ */ l(
|
|
284
|
-
/* @__PURE__ */ l(
|
|
285
|
-
/* @__PURE__ */ e(
|
|
286
|
-
|
|
282
|
+
) }, t.title)) }),
|
|
283
|
+
/* @__PURE__ */ e("div", { className: "hidden group-data-[collapsible=icon]:block", children: /* @__PURE__ */ l(G, { children: [
|
|
284
|
+
/* @__PURE__ */ l(w, { children: [
|
|
285
|
+
/* @__PURE__ */ e($, { asChild: !0, children: /* @__PURE__ */ e(k, { asChild: !0, children: /* @__PURE__ */ e(
|
|
286
|
+
y,
|
|
287
287
|
{
|
|
288
|
-
isActive:
|
|
288
|
+
isActive: i(r),
|
|
289
289
|
className: "w-full justify-center",
|
|
290
290
|
children: /* @__PURE__ */ e(s, { name: r.icon, size: "s" })
|
|
291
291
|
}
|
|
292
292
|
) }) }),
|
|
293
|
-
/* @__PURE__ */ e(
|
|
293
|
+
/* @__PURE__ */ e(S, { side: "right", className: "hidden group-data-[collapsible=icon]:block", children: c(r) })
|
|
294
294
|
] }),
|
|
295
|
-
/* @__PURE__ */ l(
|
|
296
|
-
/* @__PURE__ */ e(
|
|
297
|
-
/* @__PURE__ */ e(
|
|
298
|
-
r.items.map((
|
|
299
|
-
|
|
295
|
+
/* @__PURE__ */ l(X, { side: "right", sideOffset: 8, align: "start", children: [
|
|
296
|
+
/* @__PURE__ */ e(H, { className: "text-body-medium-sm font-medium", children: r.title }),
|
|
297
|
+
/* @__PURE__ */ e(T, {}),
|
|
298
|
+
r.items.map((t) => /* @__PURE__ */ e(
|
|
299
|
+
C,
|
|
300
300
|
{
|
|
301
|
-
className:
|
|
301
|
+
className: t.isActive ? "bg-[var(--color-background-blue-subtle-selected)] text-[var(--color-text-brand-bold)]" : "",
|
|
302
302
|
onSelect: () => {
|
|
303
|
-
|
|
303
|
+
n && n(t.url);
|
|
304
304
|
},
|
|
305
|
-
children:
|
|
305
|
+
children: t.title
|
|
306
306
|
},
|
|
307
|
-
|
|
307
|
+
t.title
|
|
308
308
|
))
|
|
309
309
|
] })
|
|
310
310
|
] }) })
|
|
311
|
-
] }) : /* @__PURE__ */ l(
|
|
312
|
-
/* @__PURE__ */ e(
|
|
313
|
-
|
|
311
|
+
] }) : /* @__PURE__ */ l(w, { children: [
|
|
312
|
+
/* @__PURE__ */ e(k, { asChild: !0, children: /* @__PURE__ */ l(
|
|
313
|
+
y,
|
|
314
314
|
{
|
|
315
315
|
isActive: r.isActive,
|
|
316
|
-
onClick: (
|
|
317
|
-
|
|
316
|
+
onClick: (t) => {
|
|
317
|
+
n && (t.preventDefault(), n(r.url));
|
|
318
318
|
},
|
|
319
319
|
children: [
|
|
320
320
|
/* @__PURE__ */ e(s, { name: r.icon, size: "s" }),
|
|
@@ -322,18 +322,18 @@ function je({ navigationData: o, user: n, teams: m, onNavigate: t, navigationMod
|
|
|
322
322
|
]
|
|
323
323
|
}
|
|
324
324
|
) }),
|
|
325
|
-
/* @__PURE__ */ e(
|
|
325
|
+
/* @__PURE__ */ e(S, { side: "right", className: "hidden group-data-[collapsible=icon]:block", children: c(r) })
|
|
326
326
|
] }) }, r.title)) }) })
|
|
327
327
|
] }),
|
|
328
|
-
/* @__PURE__ */ e("div", { className: "my-2 hidden justify-center px-2 group-data-[collapsible=icon]:flex", children: /* @__PURE__ */ e(
|
|
329
|
-
/* @__PURE__ */ l(
|
|
328
|
+
/* @__PURE__ */ e("div", { className: "my-2 hidden justify-center px-2 group-data-[collapsible=icon]:flex", children: /* @__PURE__ */ e(J, { layout: "vertical" }) }),
|
|
329
|
+
/* @__PURE__ */ l(j, { className: "mt-1 p-[var(--space-s)]", children: [
|
|
330
330
|
/* @__PURE__ */ e(q, { className: "py-1 pb-1.5 group-data-[collapsible=icon]:hidden", children: "Intelligence" }),
|
|
331
|
-
/* @__PURE__ */ e(
|
|
331
|
+
/* @__PURE__ */ e(D, { children: /* @__PURE__ */ e(I, { children: o.intelligence.map((r) => /* @__PURE__ */ e(O, { children: r.items && r.items.length > 0 ? /* @__PURE__ */ l(Q, { children: [
|
|
332
332
|
/* @__PURE__ */ e("div", { className: "group-data-[collapsible=icon]:hidden", children: /* @__PURE__ */ l(
|
|
333
|
-
|
|
333
|
+
y,
|
|
334
334
|
{
|
|
335
335
|
isActive: r.isActive && !r.items?.length,
|
|
336
|
-
onClick: () =>
|
|
336
|
+
onClick: () => U(r.title),
|
|
337
337
|
children: [
|
|
338
338
|
/* @__PURE__ */ e(s, { name: r.icon, size: "s" }),
|
|
339
339
|
/* @__PURE__ */ e("span", { children: r.title }),
|
|
@@ -342,57 +342,57 @@ function je({ navigationData: o, user: n, teams: m, onNavigate: t, navigationMod
|
|
|
342
342
|
{
|
|
343
343
|
name: re,
|
|
344
344
|
size: "s",
|
|
345
|
-
className: `ml-auto transition-transform ${
|
|
345
|
+
className: `ml-auto transition-transform ${v[r.title] ? "rotate-90" : ""}`
|
|
346
346
|
}
|
|
347
347
|
)
|
|
348
348
|
]
|
|
349
349
|
}
|
|
350
350
|
) }),
|
|
351
|
-
r.items && r.items.length > 0 &&
|
|
351
|
+
r.items && r.items.length > 0 && v[r.title] && /* @__PURE__ */ e(Y, { children: r.items.map((t) => /* @__PURE__ */ e(_, { children: /* @__PURE__ */ e(
|
|
352
352
|
ee,
|
|
353
353
|
{
|
|
354
|
-
isActive:
|
|
355
|
-
onClick: (
|
|
356
|
-
|
|
354
|
+
isActive: t.isActive,
|
|
355
|
+
onClick: (N) => {
|
|
356
|
+
n && (N.preventDefault(), n(t.url));
|
|
357
357
|
},
|
|
358
|
-
children: /* @__PURE__ */ e("span", { children:
|
|
358
|
+
children: /* @__PURE__ */ e("span", { children: t.title })
|
|
359
359
|
}
|
|
360
|
-
) },
|
|
361
|
-
/* @__PURE__ */ e("div", { className: "hidden group-data-[collapsible=icon]:block", children: /* @__PURE__ */ l(
|
|
362
|
-
/* @__PURE__ */ l(
|
|
363
|
-
/* @__PURE__ */ e(
|
|
364
|
-
|
|
360
|
+
) }, t.title)) }),
|
|
361
|
+
/* @__PURE__ */ e("div", { className: "hidden group-data-[collapsible=icon]:block", children: /* @__PURE__ */ l(G, { children: [
|
|
362
|
+
/* @__PURE__ */ l(w, { children: [
|
|
363
|
+
/* @__PURE__ */ e($, { asChild: !0, children: /* @__PURE__ */ e(k, { asChild: !0, children: /* @__PURE__ */ e(
|
|
364
|
+
y,
|
|
365
365
|
{
|
|
366
|
-
isActive:
|
|
366
|
+
isActive: i(r),
|
|
367
367
|
className: "w-full justify-center",
|
|
368
368
|
children: /* @__PURE__ */ e(s, { name: r.icon, size: "s" })
|
|
369
369
|
}
|
|
370
370
|
) }) }),
|
|
371
|
-
/* @__PURE__ */ e(
|
|
371
|
+
/* @__PURE__ */ e(S, { side: "right", className: "hidden group-data-[collapsible=icon]:block", children: c(r) })
|
|
372
372
|
] }),
|
|
373
|
-
/* @__PURE__ */ l(
|
|
374
|
-
/* @__PURE__ */ e(
|
|
375
|
-
/* @__PURE__ */ e(
|
|
376
|
-
r.items.map((
|
|
377
|
-
|
|
373
|
+
/* @__PURE__ */ l(X, { side: "right", sideOffset: 8, align: "start", children: [
|
|
374
|
+
/* @__PURE__ */ e(H, { className: "text-body-medium-sm font-medium", children: r.title }),
|
|
375
|
+
/* @__PURE__ */ e(T, {}),
|
|
376
|
+
r.items.map((t) => /* @__PURE__ */ e(
|
|
377
|
+
C,
|
|
378
378
|
{
|
|
379
|
-
className:
|
|
379
|
+
className: t.isActive ? "bg-[var(--color-background-blue-subtle-selected)] text-[var(--color-text-brand-bold)]" : "",
|
|
380
380
|
onSelect: () => {
|
|
381
|
-
|
|
381
|
+
n && n(t.url);
|
|
382
382
|
},
|
|
383
|
-
children:
|
|
383
|
+
children: t.title
|
|
384
384
|
},
|
|
385
|
-
|
|
385
|
+
t.title
|
|
386
386
|
))
|
|
387
387
|
] })
|
|
388
388
|
] }) })
|
|
389
|
-
] }) : /* @__PURE__ */ l(
|
|
390
|
-
/* @__PURE__ */ e(
|
|
391
|
-
|
|
389
|
+
] }) : /* @__PURE__ */ l(w, { children: [
|
|
390
|
+
/* @__PURE__ */ e(k, { asChild: !0, children: /* @__PURE__ */ l(
|
|
391
|
+
y,
|
|
392
392
|
{
|
|
393
393
|
isActive: r.isActive,
|
|
394
|
-
onClick: (
|
|
395
|
-
|
|
394
|
+
onClick: (t) => {
|
|
395
|
+
n && (t.preventDefault(), n(r.url));
|
|
396
396
|
},
|
|
397
397
|
children: [
|
|
398
398
|
/* @__PURE__ */ e(s, { name: r.icon, size: "s" }),
|
|
@@ -400,16 +400,16 @@ function je({ navigationData: o, user: n, teams: m, onNavigate: t, navigationMod
|
|
|
400
400
|
]
|
|
401
401
|
}
|
|
402
402
|
) }),
|
|
403
|
-
/* @__PURE__ */ e(
|
|
403
|
+
/* @__PURE__ */ e(S, { side: "right", className: "hidden group-data-[collapsible=icon]:block", children: c(r) })
|
|
404
404
|
] }) }, r.title)) }) })
|
|
405
405
|
] }),
|
|
406
|
-
/* @__PURE__ */ e(
|
|
407
|
-
/* @__PURE__ */ e(
|
|
408
|
-
|
|
406
|
+
/* @__PURE__ */ e(j, { className: "pb-2 p-[var(--space-s)] mt-auto", children: /* @__PURE__ */ e(D, { children: /* @__PURE__ */ e(I, { children: o.support.map((r) => /* @__PURE__ */ e(O, { children: /* @__PURE__ */ l(w, { children: [
|
|
407
|
+
/* @__PURE__ */ e(k, { asChild: !0, children: /* @__PURE__ */ l(
|
|
408
|
+
y,
|
|
409
409
|
{
|
|
410
410
|
isActive: r.isActive,
|
|
411
|
-
onClick: (
|
|
412
|
-
|
|
411
|
+
onClick: (t) => {
|
|
412
|
+
n && (t.preventDefault(), n(r.url));
|
|
413
413
|
},
|
|
414
414
|
children: [
|
|
415
415
|
/* @__PURE__ */ e(s, { name: r.icon, size: "s" }),
|
|
@@ -417,13 +417,13 @@ function je({ navigationData: o, user: n, teams: m, onNavigate: t, navigationMod
|
|
|
417
417
|
]
|
|
418
418
|
}
|
|
419
419
|
) }),
|
|
420
|
-
/* @__PURE__ */ e(
|
|
420
|
+
/* @__PURE__ */ e(S, { side: "right", className: "hidden group-data-[collapsible=icon]:block", children: c(r) })
|
|
421
421
|
] }) }, r.title)) }) }) })
|
|
422
422
|
]
|
|
423
423
|
}
|
|
424
424
|
),
|
|
425
|
-
/* @__PURE__ */ e(oe, { className: "sticky bottom-0 z-10 border-t border-[var(--color-border-primary-subtle)] bg-[var(--color-surface-primary)] group-data-[collapsible=icon]:px-2 group-data-[collapsible=icon]:py-2", children: /* @__PURE__ */ e("div", { className: "group/user-menu rounded-m border border-[var(--color-border-primary-subtle)] transition-colors hover:border-[var(--color-border-primary-medium)] group-data-[collapsible=icon]:rounded-none group-data-[collapsible=icon]:border-none", children: /* @__PURE__ */ l(
|
|
426
|
-
/* @__PURE__ */ e(
|
|
425
|
+
/* @__PURE__ */ e(oe, { className: "sticky bottom-0 z-10 border-t border-[var(--color-border-primary-subtle)] bg-[var(--color-surface-primary)] group-data-[collapsible=icon]:px-2 group-data-[collapsible=icon]:py-2", children: /* @__PURE__ */ e("div", { className: "group/user-menu rounded-m border border-[var(--color-border-primary-subtle)] transition-colors hover:border-[var(--color-border-primary-medium)] group-data-[collapsible=icon]:rounded-none group-data-[collapsible=icon]:border-none", children: /* @__PURE__ */ l(G, { children: [
|
|
426
|
+
/* @__PURE__ */ e($, { asChild: !0, children: /* @__PURE__ */ l(
|
|
427
427
|
pe,
|
|
428
428
|
{
|
|
429
429
|
variant: "ghost",
|
|
@@ -432,66 +432,66 @@ function je({ navigationData: o, user: n, teams: m, onNavigate: t, navigationMod
|
|
|
432
432
|
/* @__PURE__ */ l("div", { className: "flex w-full items-center gap-3 group-data-[collapsible=icon]:hidden", children: [
|
|
433
433
|
/* @__PURE__ */ l("div", { className: "relative flex-shrink-0", children: [
|
|
434
434
|
/* @__PURE__ */ l(z, { size: "m", type: "user", children: [
|
|
435
|
-
/* @__PURE__ */ e(A, { src:
|
|
436
|
-
/* @__PURE__ */ e(M, { size: "m", type: "user", children:
|
|
435
|
+
/* @__PURE__ */ e(A, { src: a.avatarUrl, alt: a.name }),
|
|
436
|
+
/* @__PURE__ */ e(M, { size: "m", type: "user", children: Z(a.name) })
|
|
437
437
|
] }),
|
|
438
438
|
/* @__PURE__ */ e("div", { className: "absolute -right-1 -bottom-1 rounded-[4px] border-2 border-white p-0", children: /* @__PURE__ */ l(z, { size: "xxs", type: "organization", children: [
|
|
439
|
-
/* @__PURE__ */ e(A, { src:
|
|
440
|
-
/* @__PURE__ */ e(M, { size: "xxs", type: "organization", children:
|
|
439
|
+
/* @__PURE__ */ e(A, { src: m.avatarUrl, alt: m.name }),
|
|
440
|
+
/* @__PURE__ */ e(M, { size: "xxs", type: "organization", children: B(m.name) })
|
|
441
441
|
] }) })
|
|
442
442
|
] }),
|
|
443
443
|
/* @__PURE__ */ l("div", { className: "min-w-0 flex-1 text-left", children: [
|
|
444
|
-
/* @__PURE__ */ e("div", { className: "text-body-medium-sm truncate font-medium text-[var(--color-text-primary)]", children:
|
|
444
|
+
/* @__PURE__ */ e("div", { className: "text-body-medium-sm truncate font-medium text-[var(--color-text-primary)]", children: a.name }),
|
|
445
445
|
/* @__PURE__ */ l("div", { className: "text-body-xsm text-[var(--color-text-secondary)]", children: [
|
|
446
|
-
|
|
446
|
+
m.role,
|
|
447
447
|
" at ",
|
|
448
|
-
|
|
448
|
+
m.name
|
|
449
449
|
] })
|
|
450
450
|
] }),
|
|
451
451
|
/* @__PURE__ */ e(s, { name: ke, size: "m", className: "opacity-50" })
|
|
452
452
|
] }),
|
|
453
453
|
/* @__PURE__ */ l("div", { className: "relative hidden group-data-[collapsible=icon]:block", children: [
|
|
454
454
|
/* @__PURE__ */ l(z, { size: "s", type: "user", children: [
|
|
455
|
-
/* @__PURE__ */ e(A, { src:
|
|
456
|
-
/* @__PURE__ */ e(M, { size: "s", type: "user", children:
|
|
455
|
+
/* @__PURE__ */ e(A, { src: a.avatarUrl, alt: a.name }),
|
|
456
|
+
/* @__PURE__ */ e(M, { size: "s", type: "user", children: Z(a.name) })
|
|
457
457
|
] }),
|
|
458
458
|
/* @__PURE__ */ e("div", { className: "absolute -right-1 -bottom-1 rounded-[2px] border-2 border-white bg-[var(--color-surface-primary)]", children: /* @__PURE__ */ l(z, { size: "xxs", type: "organization", children: [
|
|
459
|
-
/* @__PURE__ */ e(A, { src:
|
|
460
|
-
/* @__PURE__ */ e(M, { size: "xxs", type: "organization", children:
|
|
459
|
+
/* @__PURE__ */ e(A, { src: m.avatarUrl, alt: m.name }),
|
|
460
|
+
/* @__PURE__ */ e(M, { size: "xxs", type: "organization", children: B(m.name) })
|
|
461
461
|
] }) })
|
|
462
462
|
] })
|
|
463
463
|
]
|
|
464
464
|
}
|
|
465
465
|
) }),
|
|
466
466
|
/* @__PURE__ */ l(
|
|
467
|
-
|
|
467
|
+
X,
|
|
468
468
|
{
|
|
469
469
|
className: "w-[--radix-dropdown-menu-trigger-width]",
|
|
470
470
|
align: "start",
|
|
471
471
|
side: "top",
|
|
472
472
|
sideOffset: 4,
|
|
473
473
|
children: [
|
|
474
|
-
/* @__PURE__ */ e(
|
|
474
|
+
/* @__PURE__ */ e(H, { className: "p-0 font-normal", children: /* @__PURE__ */ l("div", { className: "flex items-center gap-3 px-2 py-2", children: [
|
|
475
475
|
/* @__PURE__ */ l(z, { size: "s", type: "user", children: [
|
|
476
|
-
/* @__PURE__ */ e(A, { src:
|
|
477
|
-
/* @__PURE__ */ e(M, { size: "s", type: "user", children:
|
|
476
|
+
/* @__PURE__ */ e(A, { src: a.avatarUrl, alt: a.name }),
|
|
477
|
+
/* @__PURE__ */ e(M, { size: "s", type: "user", children: Z(a.name) })
|
|
478
478
|
] }),
|
|
479
479
|
/* @__PURE__ */ l("div", { className: "grid flex-1 text-left", children: [
|
|
480
|
-
/* @__PURE__ */ e("span", { className: "text-body-medium-sm truncate font-semibold text-[var(--color-text-primary)]", children:
|
|
481
|
-
/* @__PURE__ */ e("span", { className: "text-caption-xsm truncate text-[var(--color-text-secondary)]", children:
|
|
480
|
+
/* @__PURE__ */ e("span", { className: "text-body-medium-sm truncate font-semibold text-[var(--color-text-primary)]", children: a.name }),
|
|
481
|
+
/* @__PURE__ */ e("span", { className: "text-caption-xsm truncate text-[var(--color-text-secondary)]", children: a.email })
|
|
482
482
|
] })
|
|
483
483
|
] }) }),
|
|
484
|
-
/* @__PURE__ */ e(
|
|
485
|
-
/* @__PURE__ */ e(
|
|
486
|
-
|
|
487
|
-
|
|
484
|
+
/* @__PURE__ */ e(T, {}),
|
|
485
|
+
/* @__PURE__ */ e(H, { className: "px-2 py-1 text-[12px] font-medium text-[var(--color-text-tertiary)]", children: "Organizations" }),
|
|
486
|
+
f.map((r) => /* @__PURE__ */ l(
|
|
487
|
+
C,
|
|
488
488
|
{
|
|
489
|
-
onSelect: () =>
|
|
489
|
+
onSelect: () => R(r),
|
|
490
490
|
className: "mx-1 mb-1 h-10 cursor-pointer gap-2 px-1 pr-2 pl-1",
|
|
491
491
|
children: [
|
|
492
492
|
/* @__PURE__ */ l(z, { size: "s", type: "organization", children: [
|
|
493
493
|
/* @__PURE__ */ e(A, { src: r.avatarUrl, alt: r.name }),
|
|
494
|
-
/* @__PURE__ */ e(M, { size: "s", type: "organization", children:
|
|
494
|
+
/* @__PURE__ */ e(M, { size: "s", type: "organization", children: B(r.name) })
|
|
495
495
|
] }),
|
|
496
496
|
/* @__PURE__ */ l("div", { className: "flex flex-1 flex-col text-left", children: [
|
|
497
497
|
/* @__PURE__ */ e("span", { className: "text-body-medium-sm truncate font-semibold text-[var(--color-text-primary)]", children: r.name }),
|
|
@@ -502,18 +502,18 @@ function je({ navigationData: o, user: n, teams: m, onNavigate: t, navigationMod
|
|
|
502
502
|
" plan"
|
|
503
503
|
] })
|
|
504
504
|
] }),
|
|
505
|
-
|
|
505
|
+
m.name === r.name && /* @__PURE__ */ e(s, { name: K, size: "m", className: "text-[var(--color-icon-brand-bold)]" })
|
|
506
506
|
]
|
|
507
507
|
},
|
|
508
508
|
r.name
|
|
509
509
|
)),
|
|
510
|
-
/* @__PURE__ */ e(
|
|
511
|
-
/* @__PURE__ */ e(
|
|
510
|
+
/* @__PURE__ */ e(T, {}),
|
|
511
|
+
/* @__PURE__ */ e(H, { className: "px-2 py-1 text-[12px] font-medium text-[var(--color-text-tertiary)]", children: "Navigation" }),
|
|
512
512
|
/* @__PURE__ */ l(
|
|
513
|
-
|
|
513
|
+
C,
|
|
514
514
|
{
|
|
515
515
|
className: "mx-1 mb-0.5 cursor-pointer gap-2 px-2",
|
|
516
|
-
onSelect: () =>
|
|
516
|
+
onSelect: () => u("sidebar"),
|
|
517
517
|
children: [
|
|
518
518
|
/* @__PURE__ */ e("span", { className: "flex-1", children: "New sidebar navigation" }),
|
|
519
519
|
p === "sidebar" && /* @__PURE__ */ e(s, { name: K, size: "m", className: "text-[var(--color-icon-brand-bold)]" })
|
|
@@ -521,48 +521,48 @@ function je({ navigationData: o, user: n, teams: m, onNavigate: t, navigationMod
|
|
|
521
521
|
}
|
|
522
522
|
),
|
|
523
523
|
/* @__PURE__ */ l(
|
|
524
|
-
|
|
524
|
+
C,
|
|
525
525
|
{
|
|
526
526
|
className: "mx-1 mb-1 cursor-pointer gap-2 px-2",
|
|
527
|
-
onSelect: () =>
|
|
527
|
+
onSelect: () => u("horizontal"),
|
|
528
528
|
children: [
|
|
529
529
|
/* @__PURE__ */ e("span", { className: "flex-1", children: "Old horizontal menu" }),
|
|
530
530
|
p === "horizontal" && /* @__PURE__ */ e(s, { name: K, size: "m", className: "text-[var(--color-icon-brand-bold)]" })
|
|
531
531
|
]
|
|
532
532
|
}
|
|
533
533
|
),
|
|
534
|
-
/* @__PURE__ */ e(
|
|
534
|
+
/* @__PURE__ */ e(T, {}),
|
|
535
535
|
/* @__PURE__ */ e(
|
|
536
|
-
|
|
536
|
+
C,
|
|
537
537
|
{
|
|
538
|
-
icon:
|
|
538
|
+
icon: Se,
|
|
539
539
|
className: "cursor-pointer",
|
|
540
540
|
onSelect: () => {
|
|
541
|
-
|
|
541
|
+
n && n("/user/profile");
|
|
542
542
|
},
|
|
543
543
|
children: "User profile"
|
|
544
544
|
}
|
|
545
545
|
),
|
|
546
546
|
/* @__PURE__ */ e(
|
|
547
|
-
|
|
547
|
+
C,
|
|
548
548
|
{
|
|
549
|
-
icon:
|
|
549
|
+
icon: Ne,
|
|
550
550
|
className: "cursor-pointer",
|
|
551
551
|
onSelect: () => {
|
|
552
|
-
|
|
552
|
+
n && n("/organization/settings");
|
|
553
553
|
},
|
|
554
554
|
children: "Organization settings"
|
|
555
555
|
}
|
|
556
556
|
),
|
|
557
|
-
/* @__PURE__ */ e(
|
|
557
|
+
/* @__PURE__ */ e(T, {}),
|
|
558
558
|
/* @__PURE__ */ e(
|
|
559
|
-
|
|
559
|
+
C,
|
|
560
560
|
{
|
|
561
561
|
icon: ze,
|
|
562
562
|
destructive: !0,
|
|
563
563
|
className: "cursor-pointer",
|
|
564
564
|
onSelect: () => {
|
|
565
|
-
|
|
565
|
+
n && n("/auth/sign-out");
|
|
566
566
|
},
|
|
567
567
|
children: "Sign out"
|
|
568
568
|
}
|
|
@@ -573,58 +573,58 @@ function je({ navigationData: o, user: n, teams: m, onNavigate: t, navigationMod
|
|
|
573
573
|
] }) }) }),
|
|
574
574
|
/* @__PURE__ */ e(se, {})
|
|
575
575
|
] }),
|
|
576
|
-
/* @__PURE__ */ l(Ve, { open:
|
|
576
|
+
/* @__PURE__ */ l(Ve, { open: b, onOpenChange: d, children: [
|
|
577
577
|
/* @__PURE__ */ e(
|
|
578
578
|
Le,
|
|
579
579
|
{
|
|
580
580
|
placeholder: "Type a command or search...",
|
|
581
|
-
value:
|
|
582
|
-
onValueChange:
|
|
581
|
+
value: x,
|
|
582
|
+
onValueChange: g,
|
|
583
583
|
clearable: !1
|
|
584
584
|
}
|
|
585
585
|
),
|
|
586
|
-
/* @__PURE__ */ l(
|
|
587
|
-
/* @__PURE__ */ e(
|
|
588
|
-
/* @__PURE__ */ l(
|
|
586
|
+
/* @__PURE__ */ l(Te, { children: [
|
|
587
|
+
/* @__PURE__ */ e(He, { children: "No results found." }),
|
|
588
|
+
/* @__PURE__ */ l(F, { heading: "Quick actions", children: [
|
|
589
589
|
/* @__PURE__ */ l(V, { onSelect: () => console.log("Reload"), children: [
|
|
590
590
|
/* @__PURE__ */ e(s, { name: Ae, size: "s", className: "mr-2" }),
|
|
591
591
|
/* @__PURE__ */ e("span", { children: "Reload Page" }),
|
|
592
592
|
/* @__PURE__ */ l("span", { className: "text-caption-sm ml-auto text-[var(--color-text-tertiary)]", children: [
|
|
593
|
-
|
|
593
|
+
P() ? "⌘" : "Ctrl",
|
|
594
594
|
"R"
|
|
595
595
|
] })
|
|
596
596
|
] }),
|
|
597
|
-
/* @__PURE__ */ l(V, { onSelect: () =>
|
|
598
|
-
/* @__PURE__ */ e(s, { name:
|
|
597
|
+
/* @__PURE__ */ l(V, { onSelect: () => d(!1), children: [
|
|
598
|
+
/* @__PURE__ */ e(s, { name: W, size: "s", className: "mr-2" }),
|
|
599
599
|
/* @__PURE__ */ e("span", { children: "Search" }),
|
|
600
600
|
/* @__PURE__ */ l("span", { className: "text-caption-sm ml-auto text-[var(--color-text-tertiary)]", children: [
|
|
601
|
-
|
|
601
|
+
P() ? "⌘" : "Ctrl",
|
|
602
602
|
"K"
|
|
603
603
|
] })
|
|
604
604
|
] })
|
|
605
605
|
] }),
|
|
606
|
-
/* @__PURE__ */ l(
|
|
607
|
-
o.main.map((r) => /* @__PURE__ */ l(V, { onSelect: () =>
|
|
606
|
+
/* @__PURE__ */ l(F, { heading: "Navigation", children: [
|
|
607
|
+
o.main.map((r) => /* @__PURE__ */ l(V, { onSelect: () => d(!1), children: [
|
|
608
608
|
/* @__PURE__ */ e(s, { name: r.icon, size: "s", className: "mr-2" }),
|
|
609
609
|
/* @__PURE__ */ e("span", { children: r.title })
|
|
610
610
|
] }, r.title)),
|
|
611
|
-
o.operations.map((r) => /* @__PURE__ */ l(V, { onSelect: () =>
|
|
611
|
+
o.operations.map((r) => /* @__PURE__ */ l(V, { onSelect: () => d(!1), children: [
|
|
612
612
|
/* @__PURE__ */ e(s, { name: r.icon, size: "s", className: "mr-2" }),
|
|
613
613
|
/* @__PURE__ */ e("span", { children: r.title })
|
|
614
614
|
] }, r.title)),
|
|
615
|
-
o.intelligence.map((r) => /* @__PURE__ */ l(V, { onSelect: () =>
|
|
615
|
+
o.intelligence.map((r) => /* @__PURE__ */ l(V, { onSelect: () => d(!1), children: [
|
|
616
616
|
/* @__PURE__ */ e(s, { name: r.icon, size: "s", className: "mr-2" }),
|
|
617
617
|
/* @__PURE__ */ e("span", { children: r.title })
|
|
618
618
|
] }, r.title))
|
|
619
619
|
] }),
|
|
620
|
-
/* @__PURE__ */ e(
|
|
620
|
+
/* @__PURE__ */ e(F, { heading: "Settings", children: o.support.map((r) => /* @__PURE__ */ l(V, { onSelect: () => d(!1), children: [
|
|
621
621
|
/* @__PURE__ */ e(s, { name: r.icon, size: "s", className: "mr-2" }),
|
|
622
622
|
/* @__PURE__ */ e("span", { children: r.title })
|
|
623
623
|
] }, r.title)) }),
|
|
624
|
-
/* @__PURE__ */ e(
|
|
624
|
+
/* @__PURE__ */ e(F, { heading: "Switch team", children: f.map((r) => /* @__PURE__ */ l(V, { onSelect: () => d(!1), children: [
|
|
625
625
|
/* @__PURE__ */ l(z, { size: "s", className: "mr-2", type: "organization", children: [
|
|
626
626
|
/* @__PURE__ */ e(A, { src: r.avatarUrl, alt: r.name }),
|
|
627
|
-
/* @__PURE__ */ e(M, { size: "s", type: "organization", children:
|
|
627
|
+
/* @__PURE__ */ e(M, { size: "s", type: "organization", children: B(r.name) })
|
|
628
628
|
] }),
|
|
629
629
|
/* @__PURE__ */ e("span", { children: r.name })
|
|
630
630
|
] }, r.name)) })
|
|
@@ -632,27 +632,27 @@ function je({ navigationData: o, user: n, teams: m, onNavigate: t, navigationMod
|
|
|
632
632
|
] })
|
|
633
633
|
] });
|
|
634
634
|
}
|
|
635
|
-
function
|
|
635
|
+
function De({
|
|
636
636
|
navigationData: o,
|
|
637
|
-
user:
|
|
638
|
-
activeTeam:
|
|
639
|
-
onNavigate:
|
|
637
|
+
user: a,
|
|
638
|
+
activeTeam: f,
|
|
639
|
+
onNavigate: n,
|
|
640
640
|
navigationMode: p,
|
|
641
|
-
onNavigationModeChange:
|
|
641
|
+
onNavigationModeChange: u
|
|
642
642
|
}) {
|
|
643
|
-
const [
|
|
644
|
-
|
|
645
|
-
if (!
|
|
646
|
-
const
|
|
647
|
-
|
|
643
|
+
const [b, d] = h.useState(!1), x = h.useRef(null);
|
|
644
|
+
h.useEffect(() => {
|
|
645
|
+
if (!b) return;
|
|
646
|
+
const i = (c) => {
|
|
647
|
+
x.current && !x.current.contains(c.target) && d(!1);
|
|
648
648
|
};
|
|
649
|
-
return document.addEventListener("mousedown",
|
|
650
|
-
}, [
|
|
651
|
-
const
|
|
649
|
+
return document.addEventListener("mousedown", i), () => document.removeEventListener("mousedown", i);
|
|
650
|
+
}, [b]);
|
|
651
|
+
const g = [
|
|
652
652
|
...o.main,
|
|
653
653
|
...o.operations,
|
|
654
654
|
...o.intelligence
|
|
655
|
-
],
|
|
655
|
+
], v = g.find((i) => i.isActive || i.items?.some((c) => c.isActive))?.title ?? null, [L, m] = h.useState(v), R = g.find((i) => i.title === L)?.items ?? [], U = Z(a.name);
|
|
656
656
|
return /* @__PURE__ */ l("div", { style: { width: "100%" }, children: [
|
|
657
657
|
/* @__PURE__ */ l(
|
|
658
658
|
"div",
|
|
@@ -696,7 +696,7 @@ function Oe({
|
|
|
696
696
|
/* @__PURE__ */ e(
|
|
697
697
|
"button",
|
|
698
698
|
{
|
|
699
|
-
onClick: () =>
|
|
699
|
+
onClick: () => n?.("/notifications"),
|
|
700
700
|
style: {
|
|
701
701
|
background: "none",
|
|
702
702
|
border: "none",
|
|
@@ -707,11 +707,11 @@ function Oe({
|
|
|
707
707
|
alignItems: "center",
|
|
708
708
|
justifyContent: "center"
|
|
709
709
|
},
|
|
710
|
-
onMouseEnter: (
|
|
711
|
-
|
|
710
|
+
onMouseEnter: (i) => {
|
|
711
|
+
i.currentTarget.style.backgroundColor = "rgba(255,255,255,0.1)";
|
|
712
712
|
},
|
|
713
|
-
onMouseLeave: (
|
|
714
|
-
|
|
713
|
+
onMouseLeave: (i) => {
|
|
714
|
+
i.currentTarget.style.backgroundColor = "transparent";
|
|
715
715
|
},
|
|
716
716
|
children: /* @__PURE__ */ l("svg", { width: "18", height: "18", viewBox: "0 0 24 24", fill: "none", stroke: "white", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
717
717
|
/* @__PURE__ */ e("path", { d: "M6 8a6 6 0 0 1 12 0c0 7 3 9 3 9H3s3-2 3-9" }),
|
|
@@ -719,11 +719,11 @@ function Oe({
|
|
|
719
719
|
] })
|
|
720
720
|
}
|
|
721
721
|
),
|
|
722
|
-
/* @__PURE__ */ l("div", { ref:
|
|
722
|
+
/* @__PURE__ */ l("div", { ref: x, style: { position: "relative" }, children: [
|
|
723
723
|
/* @__PURE__ */ e(
|
|
724
724
|
"button",
|
|
725
725
|
{
|
|
726
|
-
onClick: () =>
|
|
726
|
+
onClick: () => d((i) => !i),
|
|
727
727
|
style: {
|
|
728
728
|
width: 32,
|
|
729
729
|
height: 32,
|
|
@@ -739,17 +739,17 @@ function Oe({
|
|
|
739
739
|
fontWeight: 600,
|
|
740
740
|
padding: 0
|
|
741
741
|
},
|
|
742
|
-
children:
|
|
742
|
+
children: a.avatarUrl ? /* @__PURE__ */ e(
|
|
743
743
|
"img",
|
|
744
744
|
{
|
|
745
|
-
src:
|
|
746
|
-
alt:
|
|
745
|
+
src: a.avatarUrl,
|
|
746
|
+
alt: a.name,
|
|
747
747
|
style: { width: "100%", height: "100%", borderRadius: "50%", objectFit: "cover" }
|
|
748
748
|
}
|
|
749
|
-
) :
|
|
749
|
+
) : U
|
|
750
750
|
}
|
|
751
751
|
),
|
|
752
|
-
|
|
752
|
+
b && /* @__PURE__ */ l(
|
|
753
753
|
"div",
|
|
754
754
|
{
|
|
755
755
|
style: {
|
|
@@ -766,8 +766,8 @@ function Oe({
|
|
|
766
766
|
},
|
|
767
767
|
children: [
|
|
768
768
|
/* @__PURE__ */ l("div", { style: { padding: "8px 12px", borderBottom: "1px solid #e5e7eb" }, children: [
|
|
769
|
-
/* @__PURE__ */ e("div", { style: { fontWeight: 600, color: "#111827" }, children:
|
|
770
|
-
/* @__PURE__ */ e("div", { style: { fontSize: 12, color: "#6b7280" }, children:
|
|
769
|
+
/* @__PURE__ */ e("div", { style: { fontWeight: 600, color: "#111827" }, children: a.name }),
|
|
770
|
+
/* @__PURE__ */ e("div", { style: { fontSize: 12, color: "#6b7280" }, children: a.email })
|
|
771
771
|
] }),
|
|
772
772
|
/* @__PURE__ */ l("div", { style: { padding: "4px 0", borderBottom: "1px solid #e5e7eb" }, children: [
|
|
773
773
|
/* @__PURE__ */ e("div", { style: { padding: "4px 12px", fontSize: 11, fontWeight: 500, color: "#9ca3af", textTransform: "uppercase", letterSpacing: "0.05em" }, children: "Navigation" }),
|
|
@@ -775,7 +775,7 @@ function Oe({
|
|
|
775
775
|
"button",
|
|
776
776
|
{
|
|
777
777
|
onClick: () => {
|
|
778
|
-
|
|
778
|
+
u("sidebar"), d(!1);
|
|
779
779
|
},
|
|
780
780
|
style: {
|
|
781
781
|
display: "flex",
|
|
@@ -789,11 +789,11 @@ function Oe({
|
|
|
789
789
|
color: "#374151",
|
|
790
790
|
textAlign: "left"
|
|
791
791
|
},
|
|
792
|
-
onMouseEnter: (
|
|
793
|
-
|
|
792
|
+
onMouseEnter: (i) => {
|
|
793
|
+
i.currentTarget.style.backgroundColor = "#f3f4f6";
|
|
794
794
|
},
|
|
795
|
-
onMouseLeave: (
|
|
796
|
-
|
|
795
|
+
onMouseLeave: (i) => {
|
|
796
|
+
i.currentTarget.style.backgroundColor = "transparent";
|
|
797
797
|
},
|
|
798
798
|
children: [
|
|
799
799
|
/* @__PURE__ */ e("span", { style: { flex: 1 }, children: "New sidebar navigation" }),
|
|
@@ -805,7 +805,7 @@ function Oe({
|
|
|
805
805
|
"button",
|
|
806
806
|
{
|
|
807
807
|
onClick: () => {
|
|
808
|
-
|
|
808
|
+
u("horizontal"), d(!1);
|
|
809
809
|
},
|
|
810
810
|
style: {
|
|
811
811
|
display: "flex",
|
|
@@ -819,11 +819,11 @@ function Oe({
|
|
|
819
819
|
color: "#374151",
|
|
820
820
|
textAlign: "left"
|
|
821
821
|
},
|
|
822
|
-
onMouseEnter: (
|
|
823
|
-
|
|
822
|
+
onMouseEnter: (i) => {
|
|
823
|
+
i.currentTarget.style.backgroundColor = "#f3f4f6";
|
|
824
824
|
},
|
|
825
|
-
onMouseLeave: (
|
|
826
|
-
|
|
825
|
+
onMouseLeave: (i) => {
|
|
826
|
+
i.currentTarget.style.backgroundColor = "transparent";
|
|
827
827
|
},
|
|
828
828
|
children: [
|
|
829
829
|
/* @__PURE__ */ e("span", { style: { flex: 1 }, children: "Old horizontal menu" }),
|
|
@@ -836,7 +836,7 @@ function Oe({
|
|
|
836
836
|
"button",
|
|
837
837
|
{
|
|
838
838
|
onClick: () => {
|
|
839
|
-
|
|
839
|
+
n?.("/auth/sign-out"), d(!1);
|
|
840
840
|
},
|
|
841
841
|
style: {
|
|
842
842
|
display: "flex",
|
|
@@ -850,11 +850,11 @@ function Oe({
|
|
|
850
850
|
color: "#dc2626",
|
|
851
851
|
textAlign: "left"
|
|
852
852
|
},
|
|
853
|
-
onMouseEnter: (
|
|
854
|
-
|
|
853
|
+
onMouseEnter: (i) => {
|
|
854
|
+
i.currentTarget.style.backgroundColor = "#fef2f2";
|
|
855
855
|
},
|
|
856
|
-
onMouseLeave: (
|
|
857
|
-
|
|
856
|
+
onMouseLeave: (i) => {
|
|
857
|
+
i.currentTarget.style.backgroundColor = "transparent";
|
|
858
858
|
},
|
|
859
859
|
children: "Sign out"
|
|
860
860
|
}
|
|
@@ -879,13 +879,13 @@ function Oe({
|
|
|
879
879
|
gap: 2,
|
|
880
880
|
overflowX: "auto"
|
|
881
881
|
},
|
|
882
|
-
children:
|
|
883
|
-
const
|
|
882
|
+
children: g.map((i) => {
|
|
883
|
+
const c = i.isActive || (i.items?.some((r) => r.isActive) ?? !1);
|
|
884
884
|
return /* @__PURE__ */ e(
|
|
885
885
|
"button",
|
|
886
886
|
{
|
|
887
|
-
onClick: (
|
|
888
|
-
|
|
887
|
+
onClick: (r) => {
|
|
888
|
+
r.preventDefault(), m(i.title), n?.(i.url);
|
|
889
889
|
},
|
|
890
890
|
style: {
|
|
891
891
|
padding: "6px 14px",
|
|
@@ -893,94 +893,137 @@ function Oe({
|
|
|
893
893
|
border: "none",
|
|
894
894
|
cursor: "pointer",
|
|
895
895
|
fontSize: 13,
|
|
896
|
-
fontWeight:
|
|
896
|
+
fontWeight: c ? 600 : 400,
|
|
897
897
|
color: "white",
|
|
898
|
-
backgroundColor:
|
|
898
|
+
backgroundColor: c ? "#005F85" : "transparent",
|
|
899
899
|
whiteSpace: "nowrap",
|
|
900
900
|
transition: "background-color 0.15s"
|
|
901
901
|
},
|
|
902
|
-
onMouseEnter: (
|
|
903
|
-
|
|
902
|
+
onMouseEnter: (r) => {
|
|
903
|
+
c || (r.currentTarget.style.backgroundColor = "rgba(255,255,255,0.1)");
|
|
904
904
|
},
|
|
905
|
-
onMouseLeave: (
|
|
906
|
-
|
|
905
|
+
onMouseLeave: (r) => {
|
|
906
|
+
c || (r.currentTarget.style.backgroundColor = "transparent");
|
|
907
907
|
},
|
|
908
|
-
children:
|
|
908
|
+
children: i.title
|
|
909
909
|
},
|
|
910
|
-
|
|
910
|
+
i.title
|
|
911
911
|
);
|
|
912
912
|
})
|
|
913
913
|
}
|
|
914
|
+
),
|
|
915
|
+
R.length > 0 && /* @__PURE__ */ e(
|
|
916
|
+
"div",
|
|
917
|
+
{
|
|
918
|
+
style: {
|
|
919
|
+
display: "flex",
|
|
920
|
+
alignItems: "center",
|
|
921
|
+
height: 36,
|
|
922
|
+
backgroundColor: "#f0f5f8",
|
|
923
|
+
padding: "0 16px",
|
|
924
|
+
gap: 2,
|
|
925
|
+
borderBottom: "1px solid #d1dde6",
|
|
926
|
+
overflowX: "auto"
|
|
927
|
+
},
|
|
928
|
+
children: R.map((i) => /* @__PURE__ */ e(
|
|
929
|
+
"button",
|
|
930
|
+
{
|
|
931
|
+
onClick: (c) => {
|
|
932
|
+
c.preventDefault(), n?.(i.url);
|
|
933
|
+
},
|
|
934
|
+
style: {
|
|
935
|
+
padding: "4px 12px",
|
|
936
|
+
borderRadius: 4,
|
|
937
|
+
border: "none",
|
|
938
|
+
cursor: "pointer",
|
|
939
|
+
fontSize: 13,
|
|
940
|
+
fontWeight: i.isActive ? 600 : 400,
|
|
941
|
+
color: i.isActive ? "#005F85" : "#374151",
|
|
942
|
+
backgroundColor: i.isActive ? "#dbeeff" : "transparent",
|
|
943
|
+
whiteSpace: "nowrap",
|
|
944
|
+
transition: "background-color 0.15s"
|
|
945
|
+
},
|
|
946
|
+
onMouseEnter: (c) => {
|
|
947
|
+
i.isActive || (c.currentTarget.style.backgroundColor = "#e5eef4");
|
|
948
|
+
},
|
|
949
|
+
onMouseLeave: (c) => {
|
|
950
|
+
i.isActive || (c.currentTarget.style.backgroundColor = "transparent");
|
|
951
|
+
},
|
|
952
|
+
children: i.title
|
|
953
|
+
},
|
|
954
|
+
i.title
|
|
955
|
+
))
|
|
956
|
+
}
|
|
914
957
|
)
|
|
915
958
|
] });
|
|
916
959
|
}
|
|
917
|
-
function
|
|
918
|
-
const { state: o, toggleSidebar:
|
|
919
|
-
return
|
|
920
|
-
const
|
|
921
|
-
p.key === "[" && (p.preventDefault(),
|
|
960
|
+
function Ie() {
|
|
961
|
+
const { state: o, toggleSidebar: a } = ce(), f = o === "collapsed";
|
|
962
|
+
return h.useEffect(() => {
|
|
963
|
+
const n = (p) => {
|
|
964
|
+
p.key === "[" && (p.preventDefault(), a());
|
|
922
965
|
};
|
|
923
|
-
return document.addEventListener("keydown",
|
|
924
|
-
}, [
|
|
925
|
-
/* @__PURE__ */ e(
|
|
926
|
-
/* @__PURE__ */ e(
|
|
927
|
-
/* @__PURE__ */ e("span", { children:
|
|
966
|
+
return document.addEventListener("keydown", n), () => document.removeEventListener("keydown", n);
|
|
967
|
+
}, [a]), /* @__PURE__ */ l(w, { delayDuration: 500, children: [
|
|
968
|
+
/* @__PURE__ */ e(k, { asChild: !0, children: /* @__PURE__ */ e(de, { className: "-ml-1" }) }),
|
|
969
|
+
/* @__PURE__ */ e(S, { side: "bottom", children: /* @__PURE__ */ l("div", { className: "flex items-center gap-2", children: [
|
|
970
|
+
/* @__PURE__ */ e("span", { children: f ? "Expand sidebar" : "Collapse sidebar" }),
|
|
928
971
|
/* @__PURE__ */ e(E, { size: "s", variant: "dark", children: "[" })
|
|
929
972
|
] }) })
|
|
930
973
|
] });
|
|
931
974
|
}
|
|
932
|
-
function
|
|
975
|
+
function Qe({
|
|
933
976
|
navigationData: o = Ue,
|
|
934
|
-
user:
|
|
935
|
-
teams:
|
|
936
|
-
defaultSidebarOpen:
|
|
977
|
+
user: a = Ee,
|
|
978
|
+
teams: f = Re,
|
|
979
|
+
defaultSidebarOpen: n = !0,
|
|
937
980
|
headerContent: p,
|
|
938
|
-
headerTabs:
|
|
939
|
-
headerActions:
|
|
940
|
-
children:
|
|
941
|
-
onNavigate:
|
|
981
|
+
headerTabs: u,
|
|
982
|
+
headerActions: b,
|
|
983
|
+
children: d,
|
|
984
|
+
onNavigate: x
|
|
942
985
|
}) {
|
|
943
|
-
const [
|
|
944
|
-
return
|
|
986
|
+
const [g, v] = h.useState("sidebar"), [L] = h.useState(f[0]);
|
|
987
|
+
return g === "horizontal" ? /* @__PURE__ */ l("div", { className: "h-screen overflow-hidden", style: { display: "flex", flexDirection: "column" }, children: [
|
|
945
988
|
/* @__PURE__ */ e(
|
|
946
|
-
|
|
989
|
+
De,
|
|
947
990
|
{
|
|
948
991
|
navigationData: o,
|
|
949
|
-
user:
|
|
950
|
-
activeTeam:
|
|
951
|
-
onNavigate:
|
|
952
|
-
navigationMode:
|
|
953
|
-
onNavigationModeChange:
|
|
992
|
+
user: a,
|
|
993
|
+
activeTeam: L,
|
|
994
|
+
onNavigate: x,
|
|
995
|
+
navigationMode: g,
|
|
996
|
+
onNavigationModeChange: v
|
|
954
997
|
}
|
|
955
998
|
),
|
|
956
|
-
/* @__PURE__ */ e("div", { style: { flex: 1, overflow: "auto", minHeight: 0, backgroundColor: "var(--color-surface-base)" }, children:
|
|
957
|
-
] }) : /* @__PURE__ */ e("div", { className: "h-screen overflow-hidden", children: /* @__PURE__ */ l(ie, { defaultOpen:
|
|
999
|
+
/* @__PURE__ */ e("div", { style: { flex: 1, overflow: "auto", minHeight: 0, backgroundColor: "var(--color-surface-base)" }, children: d })
|
|
1000
|
+
] }) : /* @__PURE__ */ e("div", { className: "h-screen overflow-hidden", children: /* @__PURE__ */ l(ie, { defaultOpen: n, children: [
|
|
958
1001
|
/* @__PURE__ */ e(
|
|
959
1002
|
je,
|
|
960
1003
|
{
|
|
961
1004
|
navigationData: o,
|
|
962
|
-
user:
|
|
963
|
-
teams:
|
|
964
|
-
onNavigate:
|
|
965
|
-
navigationMode:
|
|
966
|
-
onNavigationModeChange:
|
|
1005
|
+
user: a,
|
|
1006
|
+
teams: f,
|
|
1007
|
+
onNavigate: x,
|
|
1008
|
+
navigationMode: g,
|
|
1009
|
+
onNavigationModeChange: v
|
|
967
1010
|
}
|
|
968
1011
|
),
|
|
969
1012
|
/* @__PURE__ */ l(te, { children: [
|
|
970
|
-
(p ||
|
|
971
|
-
/* @__PURE__ */ e(
|
|
972
|
-
/* @__PURE__ */ e(
|
|
1013
|
+
(p || b || u) && /* @__PURE__ */ l("header", { className: "flex h-12 shrink-0 items-center gap-2 border-b border-[var(--color-border-primary-subtle)] transition-[width,height] ease-linear group-has-[[data-collapsible=icon]]/sidebar-wrapper:h-12 box-border px-[var(--space-m)]", children: [
|
|
1014
|
+
/* @__PURE__ */ e(Ie, {}),
|
|
1015
|
+
/* @__PURE__ */ e(J, { layout: "horizontal", className: "mr-2 h-4" }),
|
|
973
1016
|
/* @__PURE__ */ e("div", { className: "flex-1 min-w-0", children: p }),
|
|
974
1017
|
/* @__PURE__ */ l("div", { className: "flex items-center gap-2 ml-auto shrink-0", children: [
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
1018
|
+
u && /* @__PURE__ */ e("div", { className: "flex items-center gap-2", children: u }),
|
|
1019
|
+
u && b && /* @__PURE__ */ e("span", { className: "text-[var(--color-text-tertiary)] select-none", "aria-hidden": !0, children: "•" }),
|
|
1020
|
+
b && /* @__PURE__ */ e("div", { className: "flex items-center gap-2", children: b })
|
|
978
1021
|
] })
|
|
979
1022
|
] }),
|
|
980
|
-
/* @__PURE__ */ e("div", { className: "flex flex-1 flex-col overflow-auto min-h-0 min-w-0", children:
|
|
1023
|
+
/* @__PURE__ */ e("div", { className: "flex flex-1 flex-col overflow-auto min-h-0 min-w-0", children: d })
|
|
981
1024
|
] })
|
|
982
1025
|
] }) });
|
|
983
1026
|
}
|
|
984
1027
|
export {
|
|
985
|
-
|
|
1028
|
+
Qe as AppFrame
|
|
986
1029
|
};
|