@forjio/portal-ui 0.1.0

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.
@@ -0,0 +1,679 @@
1
+ "use strict";
2
+ "use client";
3
+ var __create = Object.create;
4
+ var __defProp = Object.defineProperty;
5
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
+ var __getOwnPropNames = Object.getOwnPropertyNames;
7
+ var __getProtoOf = Object.getPrototypeOf;
8
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
9
+ var __export = (target, all) => {
10
+ for (var name in all)
11
+ __defProp(target, name, { get: all[name], enumerable: true });
12
+ };
13
+ var __copyProps = (to, from, except, desc) => {
14
+ if (from && typeof from === "object" || typeof from === "function") {
15
+ for (let key of __getOwnPropNames(from))
16
+ if (!__hasOwnProp.call(to, key) && key !== except)
17
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
18
+ }
19
+ return to;
20
+ };
21
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
22
+ // If the importer is in node compatibility mode or this is not an ESM
23
+ // file that has been converted to a CommonJS file using a Babel-
24
+ // compatible transform (i.e. "__esModule" has not been set), then set
25
+ // "default" to the CommonJS "module.exports" for node compatibility.
26
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
27
+ mod
28
+ ));
29
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
30
+ var Sidebar_exports = {};
31
+ __export(Sidebar_exports, {
32
+ Sidebar: () => Sidebar
33
+ });
34
+ module.exports = __toCommonJS(Sidebar_exports);
35
+ var import_jsx_runtime = require("react/jsx-runtime");
36
+ var import_link = __toESM(require("next/link"), 1);
37
+ var import_navigation = require("next/navigation");
38
+ var import_lucide_react = require("lucide-react");
39
+ var import_react = require("react");
40
+ var import_utils = require("./utils");
41
+ const DEFAULT_DROPDOWN_LINKS = [
42
+ { href: "/docs", label: "Documentation", icon: import_lucide_react.BookOpen },
43
+ { href: "/terms", label: "Terms of Service", icon: import_lucide_react.FileText },
44
+ { href: "/privacy", label: "Privacy Policy", icon: import_lucide_react.Shield }
45
+ ];
46
+ function Sidebar({
47
+ brandSlug,
48
+ brandName,
49
+ brandColor,
50
+ brandIcon,
51
+ workspacePersist,
52
+ apiSwitchPath,
53
+ workspaces,
54
+ activeWorkspaceId,
55
+ sections,
56
+ user,
57
+ onWorkspaceSwitch,
58
+ onLogout,
59
+ open,
60
+ onClose,
61
+ dropdownLinks = DEFAULT_DROPDOWN_LINKS
62
+ }) {
63
+ const pathname = (0, import_navigation.usePathname)() ?? "";
64
+ const active = workspaces.find((w) => w.id === activeWorkspaceId) ?? null;
65
+ const others = workspaces.filter((w) => w.id !== activeWorkspaceId);
66
+ const themeVars = {
67
+ ["--brand-color"]: brandColor,
68
+ ["--brand-soft"]: `${brandColor}26`
69
+ // 15% alpha
70
+ };
71
+ async function switchWorkspace(id) {
72
+ await (0, import_utils.writeActiveWorkspace)(workspacePersist, brandSlug, id, apiSwitchPath);
73
+ if (onWorkspaceSwitch) {
74
+ await onWorkspaceSwitch(id);
75
+ } else if (typeof window !== "undefined") {
76
+ window.location.reload();
77
+ }
78
+ }
79
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
80
+ open && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
81
+ "div",
82
+ {
83
+ onClick: onClose,
84
+ "aria-hidden": "true",
85
+ style: {
86
+ position: "fixed",
87
+ inset: 0,
88
+ background: "rgba(0,0,0,0.5)",
89
+ zIndex: 40
90
+ },
91
+ className: "lg:hidden"
92
+ }
93
+ ),
94
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
95
+ "aside",
96
+ {
97
+ style: {
98
+ ...themeVars,
99
+ borderRight: "1px solid hsl(var(--border, 220 14% 90%))",
100
+ background: "hsl(var(--card, 0 0% 100%))",
101
+ color: "hsl(var(--foreground, 222 47% 11%))",
102
+ width: 248,
103
+ display: "flex",
104
+ flexDirection: "column"
105
+ },
106
+ className: `fixed inset-y-0 left-0 z-50 h-screen transition-transform lg:sticky lg:top-0 lg:translate-x-0 ${open ? "translate-x-0" : "-translate-x-full"}`,
107
+ children: [
108
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
109
+ "div",
110
+ {
111
+ style: {
112
+ padding: "20px 20px 18px",
113
+ borderBottom: "1px solid hsl(var(--border, 220 14% 90%))",
114
+ display: "flex",
115
+ alignItems: "center",
116
+ justifyContent: "space-between"
117
+ },
118
+ children: [
119
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
120
+ import_link.default,
121
+ {
122
+ href: "/dashboard",
123
+ onClick: onClose,
124
+ "aria-label": `${brandName} dashboard`,
125
+ style: {
126
+ display: "flex",
127
+ alignItems: "center",
128
+ gap: 8,
129
+ fontSize: 18,
130
+ fontWeight: 700,
131
+ letterSpacing: "-0.02em",
132
+ textDecoration: "none",
133
+ color: "inherit"
134
+ },
135
+ children: [
136
+ brandIcon,
137
+ brandName
138
+ ]
139
+ }
140
+ ),
141
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
142
+ "button",
143
+ {
144
+ onClick: onClose,
145
+ className: "lg:hidden",
146
+ style: {
147
+ border: "none",
148
+ background: "transparent",
149
+ cursor: "pointer",
150
+ color: "hsl(var(--muted-foreground, 220 9% 46%))",
151
+ padding: 4
152
+ },
153
+ "aria-label": "Close navigation",
154
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.X, { size: 18 })
155
+ }
156
+ )
157
+ ]
158
+ }
159
+ ),
160
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
161
+ WorkspaceSwitcher,
162
+ {
163
+ active,
164
+ others,
165
+ hasAny: workspaces.length > 0,
166
+ onSwitch: switchWorkspace,
167
+ onNavigate: onClose
168
+ }
169
+ ),
170
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { style: { flex: 1, padding: "16px 10px", overflowY: "auto" }, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(NavList, { pathname, sections, onNavigate: onClose }) }),
171
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ProfileDropdown, { user, onLogout, onNavigate: onClose, dropdownLinks })
172
+ ]
173
+ }
174
+ )
175
+ ] });
176
+ }
177
+ function NavList({
178
+ pathname,
179
+ sections,
180
+ onNavigate
181
+ }) {
182
+ const activeHref = (0, import_utils.activeHrefFor)(pathname, sections);
183
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("nav", { "aria-label": "Dashboard", style: { display: "grid", gap: 16 }, children: sections.map((section) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { children: [
184
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
185
+ "div",
186
+ {
187
+ style: {
188
+ fontSize: 10.5,
189
+ letterSpacing: "0.12em",
190
+ textTransform: "uppercase",
191
+ color: "hsl(var(--muted-foreground, 220 9% 46%) / 0.6)",
192
+ padding: "0 10px 6px",
193
+ fontWeight: 600
194
+ },
195
+ children: section.label
196
+ }
197
+ ),
198
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("ul", { style: { listStyle: "none", padding: 0, margin: 0, display: "grid", gap: 1 }, children: section.items.map((item) => {
199
+ const isActive = item.href === activeHref;
200
+ const Icon = item.icon;
201
+ const linkStyle = {
202
+ display: "flex",
203
+ alignItems: "center",
204
+ gap: 10,
205
+ fontSize: 13.5,
206
+ fontWeight: isActive ? 600 : 500,
207
+ color: isActive ? "hsl(var(--foreground, 222 47% 11%))" : "hsl(var(--muted-foreground, 220 9% 46%))",
208
+ padding: "7px 10px",
209
+ borderRadius: 8,
210
+ background: isActive ? "var(--brand-soft)" : "transparent",
211
+ cursor: "pointer",
212
+ textDecoration: "none"
213
+ };
214
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_link.default, { href: item.href, onClick: onNavigate, style: linkStyle, children: [
215
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Icon, { size: 15, strokeWidth: 2 }),
216
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { style: { flex: 1 }, children: item.label })
217
+ ] }) }, item.href);
218
+ }) })
219
+ ] }, section.label)) });
220
+ }
221
+ function WorkspaceChiclet({ name }) {
222
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
223
+ "span",
224
+ {
225
+ "aria-hidden": true,
226
+ style: {
227
+ width: 28,
228
+ height: 28,
229
+ flex: "0 0 28px",
230
+ borderRadius: 8,
231
+ background: "var(--brand-soft)",
232
+ color: "var(--brand-color)",
233
+ display: "inline-flex",
234
+ alignItems: "center",
235
+ justifyContent: "center",
236
+ fontSize: 13,
237
+ fontWeight: 700,
238
+ textTransform: "uppercase",
239
+ border: "1px solid var(--brand-soft)"
240
+ },
241
+ children: name.slice(0, 1)
242
+ }
243
+ );
244
+ }
245
+ function ForjioBadge() {
246
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
247
+ "span",
248
+ {
249
+ title: "Forjio-operated workspace",
250
+ style: {
251
+ fontSize: 10,
252
+ textTransform: "uppercase",
253
+ letterSpacing: "0.06em",
254
+ color: "var(--brand-color)",
255
+ background: "var(--brand-soft)",
256
+ border: "1px solid var(--brand-soft)",
257
+ padding: "1px 6px",
258
+ borderRadius: 4,
259
+ flex: "0 0 auto"
260
+ },
261
+ children: "forjio"
262
+ }
263
+ );
264
+ }
265
+ function WorkspaceSwitcher({
266
+ active,
267
+ others,
268
+ hasAny,
269
+ onSwitch,
270
+ onNavigate
271
+ }) {
272
+ const [open, setOpen] = (0, import_react.useState)(false);
273
+ const ref = (0, import_react.useRef)(null);
274
+ (0, import_react.useEffect)(() => {
275
+ function onClick(e) {
276
+ if (ref.current && !ref.current.contains(e.target)) setOpen(false);
277
+ }
278
+ document.addEventListener("mousedown", onClick);
279
+ return () => document.removeEventListener("mousedown", onClick);
280
+ }, []);
281
+ if (!hasAny) return null;
282
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
283
+ "div",
284
+ {
285
+ ref,
286
+ style: {
287
+ position: "relative",
288
+ padding: "12px 10px",
289
+ borderBottom: "1px solid hsl(var(--border, 220 14% 90%))"
290
+ },
291
+ children: [
292
+ open && others.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
293
+ "div",
294
+ {
295
+ style: {
296
+ position: "absolute",
297
+ top: "100%",
298
+ left: 10,
299
+ right: 10,
300
+ marginTop: 6,
301
+ borderRadius: 10,
302
+ border: "1px solid hsl(var(--border, 220 14% 90%))",
303
+ background: "hsl(var(--card, 0 0% 100%))",
304
+ boxShadow: "0 10px 30px -12px rgba(0, 0, 0, 0.5)",
305
+ padding: 4,
306
+ zIndex: 20
307
+ },
308
+ children: [
309
+ others.map((w) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
310
+ "button",
311
+ {
312
+ type: "button",
313
+ onClick: () => {
314
+ setOpen(false);
315
+ onSwitch(w.id);
316
+ },
317
+ style: {
318
+ display: "flex",
319
+ alignItems: "center",
320
+ gap: 10,
321
+ width: "100%",
322
+ padding: "8px 10px",
323
+ border: "none",
324
+ background: "transparent",
325
+ textAlign: "left",
326
+ cursor: "pointer",
327
+ borderRadius: 6,
328
+ color: "inherit"
329
+ },
330
+ children: [
331
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(WorkspaceChiclet, { name: w.name }),
332
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", { style: { flex: 1, minWidth: 0 }, children: [
333
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", { style: { display: "flex", alignItems: "center", gap: 6 }, children: [
334
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
335
+ "span",
336
+ {
337
+ style: {
338
+ fontSize: 13,
339
+ fontWeight: 600,
340
+ whiteSpace: "nowrap",
341
+ overflow: "hidden",
342
+ textOverflow: "ellipsis"
343
+ },
344
+ children: w.name
345
+ }
346
+ ),
347
+ w.isForjioInternal && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ForjioBadge, {})
348
+ ] }),
349
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
350
+ "span",
351
+ {
352
+ style: {
353
+ display: "block",
354
+ fontSize: 11.5,
355
+ color: "hsl(var(--muted-foreground, 220 9% 46%))"
356
+ },
357
+ children: (0, import_utils.titleCase)(w.role)
358
+ }
359
+ )
360
+ ] })
361
+ ]
362
+ },
363
+ w.id
364
+ )),
365
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { style: { borderTop: "1px solid hsl(var(--border, 220 14% 90%))", margin: "4px 0" } }),
366
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
367
+ import_link.default,
368
+ {
369
+ href: "/dashboard/workspaces",
370
+ onClick: () => {
371
+ setOpen(false);
372
+ onNavigate?.();
373
+ },
374
+ style: {
375
+ display: "flex",
376
+ alignItems: "center",
377
+ gap: 10,
378
+ padding: "8px 10px",
379
+ fontSize: 13,
380
+ color: "hsl(var(--muted-foreground, 220 9% 46%))",
381
+ textDecoration: "none",
382
+ borderRadius: 6
383
+ },
384
+ children: "+ Manage workspaces"
385
+ }
386
+ )
387
+ ]
388
+ }
389
+ ),
390
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
391
+ "button",
392
+ {
393
+ type: "button",
394
+ onClick: () => setOpen((v) => !v),
395
+ disabled: !active,
396
+ style: {
397
+ display: "flex",
398
+ alignItems: "center",
399
+ gap: 10,
400
+ width: "100%",
401
+ padding: "6px 6px",
402
+ border: "none",
403
+ borderRadius: 8,
404
+ background: "transparent",
405
+ cursor: active ? "pointer" : "default",
406
+ textAlign: "left",
407
+ color: "inherit"
408
+ },
409
+ "aria-haspopup": "menu",
410
+ "aria-expanded": open,
411
+ children: [
412
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(WorkspaceChiclet, { name: active?.name ?? "?" }),
413
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", { style: { minWidth: 0, flex: 1 }, children: [
414
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", { style: { display: "flex", alignItems: "center", gap: 6 }, children: [
415
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
416
+ "span",
417
+ {
418
+ style: {
419
+ fontSize: 13,
420
+ fontWeight: 600,
421
+ whiteSpace: "nowrap",
422
+ overflow: "hidden",
423
+ textOverflow: "ellipsis"
424
+ },
425
+ children: active?.name ?? "Loading\u2026"
426
+ }
427
+ ),
428
+ active?.isForjioInternal && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ForjioBadge, {})
429
+ ] }),
430
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
431
+ "span",
432
+ {
433
+ style: {
434
+ display: "block",
435
+ fontSize: 11.5,
436
+ color: "hsl(var(--muted-foreground, 220 9% 46%))"
437
+ },
438
+ children: active ? (0, import_utils.titleCase)(active.role) : ""
439
+ }
440
+ )
441
+ ] }),
442
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
443
+ import_lucide_react.ChevronUp,
444
+ {
445
+ size: 14,
446
+ strokeWidth: 2,
447
+ style: {
448
+ color: "hsl(var(--muted-foreground, 220 9% 46%))",
449
+ transform: open ? "rotate(180deg)" : "",
450
+ transition: "transform 120ms ease"
451
+ }
452
+ }
453
+ )
454
+ ]
455
+ }
456
+ )
457
+ ]
458
+ }
459
+ );
460
+ }
461
+ function ProfileDropdown({
462
+ user,
463
+ onLogout,
464
+ onNavigate,
465
+ dropdownLinks
466
+ }) {
467
+ const [open, setOpen] = (0, import_react.useState)(false);
468
+ const ref = (0, import_react.useRef)(null);
469
+ (0, import_react.useEffect)(() => {
470
+ function onClick(e) {
471
+ if (ref.current && !ref.current.contains(e.target)) setOpen(false);
472
+ }
473
+ document.addEventListener("mousedown", onClick);
474
+ return () => document.removeEventListener("mousedown", onClick);
475
+ }, []);
476
+ const name = user?.name || "You";
477
+ const email = user?.email || "";
478
+ const initial = (user?.name || user?.email || "?").slice(0, 1).toUpperCase();
479
+ const itemStyle = {
480
+ display: "flex",
481
+ alignItems: "center",
482
+ gap: 10,
483
+ padding: "8px 12px",
484
+ fontSize: 13,
485
+ color: "inherit",
486
+ borderRadius: 6,
487
+ textDecoration: "none"
488
+ };
489
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
490
+ "div",
491
+ {
492
+ ref,
493
+ style: {
494
+ position: "relative",
495
+ borderTop: "1px solid hsl(var(--border, 220 14% 90%))",
496
+ padding: "12px 10px"
497
+ },
498
+ children: [
499
+ open && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
500
+ "div",
501
+ {
502
+ style: {
503
+ position: "absolute",
504
+ bottom: "100%",
505
+ left: 10,
506
+ right: 10,
507
+ marginBottom: 6,
508
+ borderRadius: 10,
509
+ border: "1px solid hsl(var(--border, 220 14% 90%))",
510
+ background: "hsl(var(--card, 0 0% 100%))",
511
+ boxShadow: "0 10px 30px -12px rgba(0, 0, 0, 0.5)",
512
+ padding: 4,
513
+ zIndex: 20
514
+ },
515
+ children: [
516
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
517
+ "div",
518
+ {
519
+ style: {
520
+ padding: "10px 12px",
521
+ borderBottom: "1px solid hsl(var(--border, 220 14% 90%))"
522
+ },
523
+ children: [
524
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { style: { fontSize: 13, fontWeight: 600 }, children: name }),
525
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
526
+ "div",
527
+ {
528
+ style: {
529
+ fontSize: 12,
530
+ color: "hsl(var(--muted-foreground, 220 9% 46%))",
531
+ wordBreak: "break-all"
532
+ },
533
+ children: email
534
+ }
535
+ )
536
+ ]
537
+ }
538
+ ),
539
+ dropdownLinks.map((link) => {
540
+ const Icon = link.icon;
541
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
542
+ import_link.default,
543
+ {
544
+ href: link.href,
545
+ onClick: () => {
546
+ setOpen(false);
547
+ onNavigate?.();
548
+ },
549
+ style: itemStyle,
550
+ children: [
551
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Icon, { size: 14 }),
552
+ " ",
553
+ link.label
554
+ ]
555
+ },
556
+ link.href
557
+ );
558
+ }),
559
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { style: { borderTop: "1px solid hsl(var(--border, 220 14% 90%))", margin: "4px 0" } }),
560
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
561
+ "button",
562
+ {
563
+ type: "button",
564
+ onClick: () => {
565
+ setOpen(false);
566
+ onLogout();
567
+ },
568
+ style: {
569
+ ...itemStyle,
570
+ color: "hsl(var(--destructive, 0 84% 60%))",
571
+ width: "100%",
572
+ border: "none",
573
+ background: "transparent",
574
+ cursor: "pointer",
575
+ textAlign: "left"
576
+ },
577
+ children: [
578
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.LogOut, { size: 14 }),
579
+ " Sign out"
580
+ ]
581
+ }
582
+ )
583
+ ]
584
+ }
585
+ ),
586
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
587
+ "button",
588
+ {
589
+ type: "button",
590
+ onClick: () => setOpen((v) => !v),
591
+ style: {
592
+ display: "flex",
593
+ alignItems: "center",
594
+ gap: 10,
595
+ width: "100%",
596
+ padding: "8px 8px",
597
+ border: "none",
598
+ borderRadius: 8,
599
+ background: "transparent",
600
+ cursor: "pointer",
601
+ textAlign: "left",
602
+ color: "inherit"
603
+ },
604
+ "aria-haspopup": "menu",
605
+ "aria-expanded": open,
606
+ children: [
607
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
608
+ "span",
609
+ {
610
+ style: {
611
+ width: 32,
612
+ height: 32,
613
+ flex: "0 0 32px",
614
+ borderRadius: "50%",
615
+ background: "var(--brand-color)",
616
+ color: "#0b0b10",
617
+ display: "inline-flex",
618
+ alignItems: "center",
619
+ justifyContent: "center",
620
+ fontSize: 13,
621
+ fontWeight: 700
622
+ },
623
+ children: initial
624
+ }
625
+ ),
626
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", { style: { minWidth: 0, flex: 1 }, children: [
627
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
628
+ "span",
629
+ {
630
+ style: {
631
+ display: "block",
632
+ fontSize: 13,
633
+ fontWeight: 600,
634
+ whiteSpace: "nowrap",
635
+ overflow: "hidden",
636
+ textOverflow: "ellipsis"
637
+ },
638
+ children: name
639
+ }
640
+ ),
641
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
642
+ "span",
643
+ {
644
+ style: {
645
+ display: "block",
646
+ fontSize: 11.5,
647
+ color: "hsl(var(--muted-foreground, 220 9% 46%))",
648
+ whiteSpace: "nowrap",
649
+ overflow: "hidden",
650
+ textOverflow: "ellipsis"
651
+ },
652
+ children: email
653
+ }
654
+ )
655
+ ] }),
656
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
657
+ import_lucide_react.ChevronUp,
658
+ {
659
+ size: 14,
660
+ strokeWidth: 2,
661
+ style: {
662
+ color: "hsl(var(--muted-foreground, 220 9% 46%))",
663
+ transform: open ? "" : "rotate(180deg)",
664
+ transition: "transform 120ms ease"
665
+ }
666
+ }
667
+ )
668
+ ]
669
+ }
670
+ )
671
+ ]
672
+ }
673
+ );
674
+ }
675
+ // Annotate the CommonJS export names for ESM import in node:
676
+ 0 && (module.exports = {
677
+ Sidebar
678
+ });
679
+ //# sourceMappingURL=Sidebar.cjs.map