@mdxui/tremor 6.0.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.
Files changed (35) hide show
  1. package/README.md +255 -0
  2. package/dist/dashboard/components/index.d.ts +355 -0
  3. package/dist/dashboard/components/index.js +549 -0
  4. package/dist/dashboard/components/index.js.map +1 -0
  5. package/dist/dashboard/index.d.ts +275 -0
  6. package/dist/dashboard/index.js +1062 -0
  7. package/dist/dashboard/index.js.map +1 -0
  8. package/dist/database/index.d.ts +334 -0
  9. package/dist/database/index.js +474 -0
  10. package/dist/database/index.js.map +1 -0
  11. package/dist/index.d.ts +9 -0
  12. package/dist/index.js +1089 -0
  13. package/dist/index.js.map +1 -0
  14. package/dist/insights/components/index.d.ts +362 -0
  15. package/dist/insights/components/index.js +1397 -0
  16. package/dist/insights/components/index.js.map +1 -0
  17. package/dist/insights/index.d.ts +360 -0
  18. package/dist/insights/index.js +1815 -0
  19. package/dist/insights/index.js.map +1 -0
  20. package/dist/overview/components/index.d.ts +86 -0
  21. package/dist/overview/components/index.js +775 -0
  22. package/dist/overview/components/index.js.map +1 -0
  23. package/dist/overview/index.d.ts +301 -0
  24. package/dist/overview/index.js +1077 -0
  25. package/dist/overview/index.js.map +1 -0
  26. package/dist/shared/index.d.ts +296 -0
  27. package/dist/shared/index.js +395 -0
  28. package/dist/shared/index.js.map +1 -0
  29. package/dist/solar/components/index.d.ts +341 -0
  30. package/dist/solar/components/index.js +831 -0
  31. package/dist/solar/components/index.js.map +1 -0
  32. package/dist/solar/index.d.ts +301 -0
  33. package/dist/solar/index.js +1130 -0
  34. package/dist/solar/index.js.map +1 -0
  35. package/package.json +135 -0
@@ -0,0 +1,549 @@
1
+ // src/dashboard/components/shell/shell.tsx
2
+ import { twMerge } from "tailwind-merge";
3
+ import { jsx, jsxs } from "react/jsx-runtime";
4
+ function Shell({
5
+ variant = "sidebar-left",
6
+ children,
7
+ navigation: _navigation = [],
8
+ shortcuts: _shortcuts = [],
9
+ workspace: _workspace,
10
+ workspaces: _workspaces = [],
11
+ user: _user,
12
+ sidebarCollapsed = false,
13
+ onSidebarCollapse: _onSidebarCollapse,
14
+ pathname: _pathname,
15
+ LinkComponent: _LinkComponent,
16
+ sidebar,
17
+ header,
18
+ theme: _theme = "system",
19
+ loading = false,
20
+ className,
21
+ containerClassName
22
+ }) {
23
+ const showSidebar = variant === "sidebar-left" || variant === "sidebar-right";
24
+ const sidebarWidth = sidebarCollapsed ? "lg:pl-16" : "lg:pl-72";
25
+ if (loading) {
26
+ return /* @__PURE__ */ jsx("div", { className: "flex h-screen items-center justify-center", children: /* @__PURE__ */ jsx("div", { className: "h-8 w-8 animate-spin rounded-full border-4 border-gray-300 border-t-indigo-600" }) });
27
+ }
28
+ if (variant === "top-nav") {
29
+ return /* @__PURE__ */ jsxs("div", { className: twMerge("mx-auto max-w-screen-2xl", containerClassName), children: [
30
+ header,
31
+ /* @__PURE__ */ jsx("main", { role: "main", className: twMerge("flex-1", className), children })
32
+ ] });
33
+ }
34
+ if (variant === "minimal") {
35
+ return /* @__PURE__ */ jsx("div", { className: twMerge("mx-auto max-w-screen-2xl", containerClassName), children: /* @__PURE__ */ jsx("main", { role: "main", className: twMerge("flex-1", className), children }) });
36
+ }
37
+ return /* @__PURE__ */ jsxs("div", { className: twMerge("mx-auto max-w-screen-2xl", containerClassName), children: [
38
+ sidebar,
39
+ /* @__PURE__ */ jsx(
40
+ "main",
41
+ {
42
+ role: "main",
43
+ className: twMerge(showSidebar && sidebarWidth, className),
44
+ children
45
+ }
46
+ )
47
+ ] });
48
+ }
49
+
50
+ // src/dashboard/components/shell/shell-sidebar-left.tsx
51
+ import { twMerge as twMerge2 } from "tailwind-merge";
52
+ import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
53
+ function ShellSidebarLeft({
54
+ sidebar,
55
+ mobileHeader,
56
+ children,
57
+ navigation: _navigation = [],
58
+ shortcuts: _shortcuts = [],
59
+ workspace: _workspace,
60
+ workspaces: _workspaces = [],
61
+ user: _user,
62
+ collapsed = false,
63
+ onCollapse: _onCollapse,
64
+ pathname: _pathname,
65
+ LinkComponent: _LinkComponent,
66
+ className,
67
+ containerClassName
68
+ }) {
69
+ const sidebarWidth = collapsed ? "lg:pl-16" : "lg:pl-72";
70
+ return /* @__PURE__ */ jsxs2("div", { className: twMerge2("mx-auto max-w-screen-2xl", containerClassName), children: [
71
+ sidebar && /* @__PURE__ */ jsx2(
72
+ "nav",
73
+ {
74
+ className: twMerge2(
75
+ "hidden lg:fixed lg:inset-y-0 lg:z-50 lg:flex lg:flex-col",
76
+ collapsed ? "lg:w-16" : "lg:w-72"
77
+ ),
78
+ children: sidebar
79
+ }
80
+ ),
81
+ mobileHeader && /* @__PURE__ */ jsx2(
82
+ "div",
83
+ {
84
+ "data-testid": "mobile-header",
85
+ className: "sticky top-0 z-40 flex h-16 shrink-0 items-center justify-between border-b border-gray-200 bg-white px-2 shadow-sm sm:gap-x-6 sm:px-4 lg:hidden dark:border-gray-800 dark:bg-gray-950",
86
+ children: mobileHeader
87
+ }
88
+ ),
89
+ /* @__PURE__ */ jsx2("main", { role: "main", className: twMerge2(sidebarWidth, className), children })
90
+ ] });
91
+ }
92
+
93
+ // src/dashboard/components/shell/shell-top-nav.tsx
94
+ import { twMerge as twMerge3 } from "tailwind-merge";
95
+ import { jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
96
+ function ShellTopNav({
97
+ header,
98
+ sidebar,
99
+ children,
100
+ className
101
+ }) {
102
+ return /* @__PURE__ */ jsxs3("div", { className: "flex min-h-screen flex-col", children: [
103
+ header,
104
+ /* @__PURE__ */ jsxs3("div", { className: "flex flex-1", children: [
105
+ sidebar && /* @__PURE__ */ jsx3("aside", { className: "flex-shrink-0", children: sidebar }),
106
+ /* @__PURE__ */ jsx3("main", { role: "main", className: twMerge3("flex-1", className), children })
107
+ ] })
108
+ ] });
109
+ }
110
+
111
+ // src/dashboard/components/sidebar/mobile-sidebar.tsx
112
+ import { useState } from "react";
113
+
114
+ // src/dashboard/utils.ts
115
+ import { twMerge as twMerge4 } from "tailwind-merge";
116
+ function cx(...args) {
117
+ return twMerge4(...args);
118
+ }
119
+ var focusInput = [
120
+ // base
121
+ "focus:ring-2",
122
+ // ring color
123
+ "focus:ring-indigo-200 focus:dark:ring-indigo-700/30",
124
+ // border color
125
+ "focus:border-indigo-500 focus:dark:border-indigo-700"
126
+ ].join(" ");
127
+ var focusRing = [
128
+ // base
129
+ "outline outline-offset-2 outline-0 focus-visible:outline-2",
130
+ // outline color
131
+ "outline-indigo-500 dark:outline-indigo-500"
132
+ ].join(" ");
133
+ var hasErrorInput = [
134
+ // base
135
+ "ring-2",
136
+ // border color
137
+ "border-red-500 dark:border-red-700",
138
+ // ring color
139
+ "ring-red-200 dark:ring-red-700/30"
140
+ ].join(" ");
141
+
142
+ // src/dashboard/components/sidebar/mobile-sidebar.tsx
143
+ import { Fragment, jsx as jsx4, jsxs as jsxs4 } from "react/jsx-runtime";
144
+ function DefaultLink({ href, className, children, onClick }) {
145
+ return /* @__PURE__ */ jsx4("a", { href, className, onClick, children });
146
+ }
147
+ function isItemActive(itemHref, pathname, settingsPath = "/settings") {
148
+ if (!itemHref || !pathname) return false;
149
+ if (itemHref === settingsPath) {
150
+ return pathname.startsWith("/settings");
151
+ }
152
+ return pathname === itemHref || pathname.startsWith(itemHref);
153
+ }
154
+ function MobileSidebar({
155
+ items = [],
156
+ shortcuts = [],
157
+ title = "Navigation",
158
+ pathname,
159
+ LinkComponent = DefaultLink,
160
+ className
161
+ }) {
162
+ const [isOpen, setIsOpen] = useState(false);
163
+ const toggleDrawer = () => setIsOpen(!isOpen);
164
+ const closeDrawer = () => setIsOpen(false);
165
+ return /* @__PURE__ */ jsxs4(Fragment, { children: [
166
+ /* @__PURE__ */ jsx4(
167
+ "button",
168
+ {
169
+ onClick: toggleDrawer,
170
+ "aria-label": "open sidebar",
171
+ className: cx(
172
+ "group flex items-center rounded-md p-2 text-sm font-medium hover:bg-gray-100 data-[state=open]:bg-gray-100 data-[state=open]:bg-gray-400/10 hover:dark:bg-gray-400/10",
173
+ className
174
+ ),
175
+ "data-state": isOpen ? "open" : "closed",
176
+ children: /* @__PURE__ */ jsxs4(
177
+ "svg",
178
+ {
179
+ className: "size-6 shrink-0 sm:size-5",
180
+ xmlns: "http://www.w3.org/2000/svg",
181
+ viewBox: "0 0 24 24",
182
+ fill: "none",
183
+ stroke: "currentColor",
184
+ strokeWidth: "2",
185
+ strokeLinecap: "round",
186
+ strokeLinejoin: "round",
187
+ children: [
188
+ /* @__PURE__ */ jsx4("line", { x1: "4", x2: "20", y1: "12", y2: "12" }),
189
+ /* @__PURE__ */ jsx4("line", { x1: "4", x2: "20", y1: "6", y2: "6" }),
190
+ /* @__PURE__ */ jsx4("line", { x1: "4", x2: "20", y1: "18", y2: "18" })
191
+ ]
192
+ }
193
+ )
194
+ }
195
+ ),
196
+ isOpen && /* @__PURE__ */ jsx4(
197
+ "div",
198
+ {
199
+ className: "fixed inset-0 z-50 bg-black/50",
200
+ onClick: closeDrawer,
201
+ "aria-hidden": "true"
202
+ }
203
+ ),
204
+ /* @__PURE__ */ jsxs4(
205
+ "div",
206
+ {
207
+ className: cx(
208
+ "fixed inset-y-0 right-0 z-50 w-full max-w-sm transform bg-white transition-transform duration-300 ease-in-out dark:bg-gray-950",
209
+ isOpen ? "translate-x-0" : "translate-x-full"
210
+ ),
211
+ children: [
212
+ /* @__PURE__ */ jsxs4("div", { className: "flex items-center justify-between border-b border-gray-200 p-4 dark:border-gray-800", children: [
213
+ /* @__PURE__ */ jsx4("h2", { className: "text-lg font-semibold text-gray-900 dark:text-gray-50", children: title }),
214
+ /* @__PURE__ */ jsx4(
215
+ "button",
216
+ {
217
+ onClick: closeDrawer,
218
+ "aria-label": "close sidebar",
219
+ className: "rounded-md p-2 hover:bg-gray-100 hover:dark:bg-gray-800",
220
+ children: /* @__PURE__ */ jsxs4(
221
+ "svg",
222
+ {
223
+ className: "size-5",
224
+ xmlns: "http://www.w3.org/2000/svg",
225
+ viewBox: "0 0 24 24",
226
+ fill: "none",
227
+ stroke: "currentColor",
228
+ strokeWidth: "2",
229
+ strokeLinecap: "round",
230
+ strokeLinejoin: "round",
231
+ children: [
232
+ /* @__PURE__ */ jsx4("path", { d: "M18 6 6 18" }),
233
+ /* @__PURE__ */ jsx4("path", { d: "m6 6 12 12" })
234
+ ]
235
+ }
236
+ )
237
+ }
238
+ )
239
+ ] }),
240
+ /* @__PURE__ */ jsx4("div", { className: "p-4", children: /* @__PURE__ */ jsxs4(
241
+ "nav",
242
+ {
243
+ "aria-label": "core mobile navigation links",
244
+ className: "flex flex-1 flex-col space-y-10",
245
+ children: [
246
+ /* @__PURE__ */ jsx4("ul", { role: "list", className: "space-y-1.5", children: items.map((item) => {
247
+ const isActive = item.active ?? isItemActive(item.href, pathname);
248
+ const Icon = item.icon;
249
+ return /* @__PURE__ */ jsx4("li", { children: /* @__PURE__ */ jsxs4(
250
+ LinkComponent,
251
+ {
252
+ href: item.href || "#",
253
+ className: cx(
254
+ isActive ? "text-indigo-600 dark:text-indigo-400" : "text-gray-600 hover:text-gray-900 dark:text-gray-400 hover:dark:text-gray-50",
255
+ "flex items-center gap-x-2.5 rounded-md px-2 py-1.5 text-base font-medium transition hover:bg-gray-100 sm:text-sm hover:dark:bg-gray-900",
256
+ focusRing
257
+ ),
258
+ onClick: closeDrawer,
259
+ children: [
260
+ Icon && /* @__PURE__ */ jsx4(Icon, { className: "size-5 shrink-0", "aria-hidden": "true" }),
261
+ item.label
262
+ ]
263
+ }
264
+ ) }, item.id);
265
+ }) }),
266
+ shortcuts.length > 0 && /* @__PURE__ */ jsxs4("div", { children: [
267
+ /* @__PURE__ */ jsx4("span", { className: "text-sm font-medium leading-6 text-gray-500 sm:text-xs", children: "Shortcuts" }),
268
+ /* @__PURE__ */ jsx4("ul", { "aria-label": "shortcuts", role: "list", className: "space-y-0.5", children: shortcuts.map((shortcut) => {
269
+ const isActive = isItemActive(shortcut.href, pathname);
270
+ const Icon = shortcut.icon;
271
+ return /* @__PURE__ */ jsx4("li", { children: /* @__PURE__ */ jsxs4(
272
+ LinkComponent,
273
+ {
274
+ href: shortcut.href,
275
+ className: cx(
276
+ isActive ? "text-indigo-600 dark:text-indigo-400" : "text-gray-700 hover:text-gray-900 dark:text-gray-400 hover:dark:text-gray-50",
277
+ "flex items-center gap-x-2.5 rounded-md px-2 py-1.5 font-medium transition hover:bg-gray-100 sm:text-sm hover:dark:bg-gray-900",
278
+ focusRing
279
+ ),
280
+ onClick: closeDrawer,
281
+ children: [
282
+ Icon && /* @__PURE__ */ jsx4(
283
+ Icon,
284
+ {
285
+ className: "size-4 shrink-0",
286
+ "aria-hidden": "true"
287
+ }
288
+ ),
289
+ shortcut.name
290
+ ]
291
+ }
292
+ ) }, shortcut.name);
293
+ }) })
294
+ ] })
295
+ ]
296
+ }
297
+ ) })
298
+ ]
299
+ }
300
+ )
301
+ ] });
302
+ }
303
+
304
+ // src/dashboard/components/sidebar/sidebar.tsx
305
+ import { jsx as jsx5, jsxs as jsxs5 } from "react/jsx-runtime";
306
+ function DefaultLink2({
307
+ href,
308
+ className,
309
+ children
310
+ }) {
311
+ return /* @__PURE__ */ jsx5("a", { href, className, children });
312
+ }
313
+ function isItemActive2(itemHref, pathname, settingsPath = "/settings") {
314
+ if (!itemHref || !pathname) return false;
315
+ if (itemHref === settingsPath) {
316
+ return pathname.startsWith("/settings");
317
+ }
318
+ return pathname === itemHref || pathname.startsWith(itemHref);
319
+ }
320
+ function Sidebar({
321
+ items = [],
322
+ shortcuts = [],
323
+ workspace,
324
+ workspaces = [],
325
+ user,
326
+ collapsed = false,
327
+ onCollapse: _onCollapse,
328
+ header,
329
+ footer,
330
+ className,
331
+ pathname,
332
+ LinkComponent = DefaultLink2
333
+ }) {
334
+ return /* @__PURE__ */ jsx5(
335
+ "nav",
336
+ {
337
+ "data-testid": "sidebar",
338
+ className: cx(
339
+ "hidden lg:fixed lg:inset-y-0 lg:z-50 lg:flex lg:flex-col",
340
+ collapsed ? "lg:w-16" : "lg:w-72",
341
+ className
342
+ ),
343
+ children: /* @__PURE__ */ jsxs5("aside", { className: "flex grow flex-col gap-y-6 overflow-y-auto border-r border-gray-200 bg-white p-4 dark:border-gray-800 dark:bg-gray-950", children: [
344
+ workspace && /* @__PURE__ */ jsx5(
345
+ WorkspaceSwitcher,
346
+ {
347
+ workspace,
348
+ workspaces,
349
+ collapsed
350
+ }
351
+ ),
352
+ header,
353
+ /* @__PURE__ */ jsxs5(
354
+ "nav",
355
+ {
356
+ "aria-label": "core navigation links",
357
+ className: "flex flex-1 flex-col space-y-10",
358
+ children: [
359
+ /* @__PURE__ */ jsx5("ul", { role: "list", className: "space-y-0.5", children: items.map((item) => {
360
+ const isActive = item.active ?? isItemActive2(item.href, pathname);
361
+ const Icon = item.icon;
362
+ return /* @__PURE__ */ jsx5("li", { children: /* @__PURE__ */ jsxs5(
363
+ LinkComponent,
364
+ {
365
+ href: item.href || "#",
366
+ className: cx(
367
+ isActive ? "text-indigo-600 dark:text-indigo-400" : "text-gray-700 hover:text-gray-900 dark:text-gray-400 hover:dark:text-gray-50",
368
+ "flex items-center gap-x-2.5 rounded-md px-2 py-1.5 text-sm font-medium transition hover:bg-gray-100 hover:dark:bg-gray-900",
369
+ focusRing
370
+ ),
371
+ "data-testid": "nav-item",
372
+ "data-active": isActive,
373
+ children: [
374
+ Icon && /* @__PURE__ */ jsx5(Icon, { className: "size-4 shrink-0", "aria-hidden": "true" }),
375
+ !collapsed && item.label
376
+ ]
377
+ }
378
+ ) }, item.id);
379
+ }) }),
380
+ shortcuts.length > 0 && !collapsed && /* @__PURE__ */ jsxs5("div", { children: [
381
+ /* @__PURE__ */ jsx5("span", { className: "text-xs font-medium leading-6 text-gray-500", children: "Shortcuts" }),
382
+ /* @__PURE__ */ jsx5("ul", { "aria-label": "shortcuts", role: "list", className: "space-y-0.5", children: shortcuts.map((shortcut) => {
383
+ const isActive = isItemActive2(shortcut.href, pathname);
384
+ const Icon = shortcut.icon;
385
+ return /* @__PURE__ */ jsx5("li", { children: /* @__PURE__ */ jsxs5(
386
+ LinkComponent,
387
+ {
388
+ href: shortcut.href,
389
+ className: cx(
390
+ isActive ? "text-indigo-600 dark:text-indigo-400" : "text-gray-700 hover:text-gray-900 dark:text-gray-400 hover:dark:text-gray-50",
391
+ "flex items-center gap-x-2.5 rounded-md px-2 py-1.5 text-sm font-medium transition hover:bg-gray-100 hover:dark:bg-gray-900",
392
+ focusRing
393
+ ),
394
+ children: [
395
+ Icon && /* @__PURE__ */ jsx5(
396
+ Icon,
397
+ {
398
+ className: "size-4 shrink-0",
399
+ "aria-hidden": "true"
400
+ }
401
+ ),
402
+ shortcut.name
403
+ ]
404
+ }
405
+ ) }, shortcut.name);
406
+ }) })
407
+ ] })
408
+ ]
409
+ }
410
+ ),
411
+ user && !footer && /* @__PURE__ */ jsx5("div", { className: "mt-auto", children: /* @__PURE__ */ jsx5(UserProfile, { user, collapsed }) }),
412
+ footer && /* @__PURE__ */ jsx5("div", { className: "mt-auto", children: footer })
413
+ ] })
414
+ }
415
+ );
416
+ }
417
+ function WorkspaceSwitcher({
418
+ workspace,
419
+ workspaces: _workspaces = [],
420
+ collapsed
421
+ }) {
422
+ if (collapsed) {
423
+ return /* @__PURE__ */ jsx5("div", { className: "flex justify-center", children: /* @__PURE__ */ jsx5(
424
+ "span",
425
+ {
426
+ className: cx(
427
+ workspace.color || "bg-indigo-600 dark:bg-indigo-500",
428
+ "flex aspect-square size-8 items-center justify-center rounded p-2 text-xs font-medium text-white"
429
+ ),
430
+ "aria-hidden": "true",
431
+ children: workspace.initials
432
+ }
433
+ ) });
434
+ }
435
+ return /* @__PURE__ */ jsxs5(
436
+ "button",
437
+ {
438
+ className: cx(
439
+ "flex w-full items-center gap-x-2.5 rounded-md border border-gray-300 bg-white p-2 text-sm shadow-sm transition-all hover:bg-gray-50 dark:border-gray-800 dark:bg-gray-950 hover:dark:bg-gray-900",
440
+ "focus:ring-2 focus:ring-indigo-200 focus:border-indigo-500 focus:dark:ring-indigo-700/30 focus:dark:border-indigo-700"
441
+ ),
442
+ children: [
443
+ /* @__PURE__ */ jsx5(
444
+ "span",
445
+ {
446
+ className: cx(
447
+ workspace.color || "bg-indigo-600 dark:bg-indigo-500",
448
+ "flex aspect-square size-8 items-center justify-center rounded p-2 text-xs font-medium text-white"
449
+ ),
450
+ "aria-hidden": "true",
451
+ children: workspace.initials
452
+ }
453
+ ),
454
+ /* @__PURE__ */ jsxs5("div", { className: "flex w-full items-center justify-between gap-x-4 truncate", children: [
455
+ /* @__PURE__ */ jsxs5("div", { className: "truncate", children: [
456
+ /* @__PURE__ */ jsx5("p", { className: "truncate whitespace-nowrap text-sm font-medium text-gray-900 dark:text-gray-50", children: workspace.name }),
457
+ /* @__PURE__ */ jsx5("p", { className: "whitespace-nowrap text-left text-xs text-gray-700 dark:text-gray-300", children: workspace.role })
458
+ ] }),
459
+ /* @__PURE__ */ jsxs5(
460
+ "svg",
461
+ {
462
+ className: "size-5 shrink-0 text-gray-500",
463
+ xmlns: "http://www.w3.org/2000/svg",
464
+ viewBox: "0 0 24 24",
465
+ fill: "none",
466
+ stroke: "currentColor",
467
+ strokeWidth: "2",
468
+ strokeLinecap: "round",
469
+ strokeLinejoin: "round",
470
+ children: [
471
+ /* @__PURE__ */ jsx5("path", { d: "m7 15 5 5 5-5" }),
472
+ /* @__PURE__ */ jsx5("path", { d: "m7 9 5-5 5 5" })
473
+ ]
474
+ }
475
+ )
476
+ ] })
477
+ ]
478
+ }
479
+ );
480
+ }
481
+ function UserProfile({ user, collapsed }) {
482
+ if (collapsed) {
483
+ return /* @__PURE__ */ jsx5(
484
+ "button",
485
+ {
486
+ "aria-label": "User settings",
487
+ className: cx(
488
+ focusRing,
489
+ "flex w-full justify-center rounded-md p-2 text-sm font-medium text-gray-900 hover:bg-gray-100 dark:text-gray-50 hover:dark:bg-gray-400/10"
490
+ ),
491
+ children: /* @__PURE__ */ jsx5(
492
+ "span",
493
+ {
494
+ className: "flex size-8 shrink-0 items-center justify-center rounded-full border border-gray-300 bg-white text-xs text-gray-700 dark:border-gray-800 dark:bg-gray-950 dark:text-gray-300",
495
+ "aria-hidden": "true",
496
+ children: user.initials
497
+ }
498
+ )
499
+ }
500
+ );
501
+ }
502
+ return /* @__PURE__ */ jsxs5(
503
+ "button",
504
+ {
505
+ "aria-label": "User settings",
506
+ className: cx(
507
+ focusRing,
508
+ "group flex w-full items-center justify-between rounded-md p-2 text-sm font-medium text-gray-900 hover:bg-gray-100 data-[state=open]:bg-gray-100 data-[state=open]:bg-gray-400/10 hover:dark:bg-gray-400/10"
509
+ ),
510
+ children: [
511
+ /* @__PURE__ */ jsxs5("span", { className: "flex items-center gap-3", children: [
512
+ /* @__PURE__ */ jsx5(
513
+ "span",
514
+ {
515
+ className: "flex size-8 shrink-0 items-center justify-center rounded-full border border-gray-300 bg-white text-xs text-gray-700 dark:border-gray-800 dark:bg-gray-950 dark:text-gray-300",
516
+ "aria-hidden": "true",
517
+ children: user.initials
518
+ }
519
+ ),
520
+ /* @__PURE__ */ jsx5("span", { className: "dark:text-gray-50", children: user.name })
521
+ ] }),
522
+ /* @__PURE__ */ jsxs5(
523
+ "svg",
524
+ {
525
+ className: "size-4 shrink-0 text-gray-500 group-hover:text-gray-700 group-hover:dark:text-gray-400",
526
+ xmlns: "http://www.w3.org/2000/svg",
527
+ viewBox: "0 0 24 24",
528
+ fill: "currentColor",
529
+ children: [
530
+ /* @__PURE__ */ jsx5("circle", { cx: "12", cy: "6", r: "2" }),
531
+ /* @__PURE__ */ jsx5("circle", { cx: "12", cy: "12", r: "2" }),
532
+ /* @__PURE__ */ jsx5("circle", { cx: "12", cy: "18", r: "2" })
533
+ ]
534
+ }
535
+ )
536
+ ]
537
+ }
538
+ );
539
+ }
540
+ export {
541
+ MobileSidebar,
542
+ Shell,
543
+ ShellSidebarLeft,
544
+ ShellTopNav,
545
+ Sidebar,
546
+ UserProfile,
547
+ WorkspaceSwitcher
548
+ };
549
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/dashboard/components/shell/shell.tsx","../../../src/dashboard/components/shell/shell-sidebar-left.tsx","../../../src/dashboard/components/shell/shell-top-nav.tsx","../../../src/dashboard/components/sidebar/mobile-sidebar.tsx","../../../src/dashboard/utils.ts","../../../src/dashboard/components/sidebar/sidebar.tsx"],"sourcesContent":["\"use client\";\n\nimport type { ComponentType, ReactNode, SVGProps } from \"react\";\nimport { twMerge } from \"tailwind-merge\";\n\nexport type ShellVariant =\n\t| \"sidebar-left\"\n\t| \"sidebar-right\"\n\t| \"top-nav\"\n\t| \"minimal\";\n\n/**\n * Navigation item configuration for the shell\n */\nexport interface ShellNavItem {\n\t/** Unique identifier */\n\tid: string;\n\t/** Display label */\n\tlabel: string;\n\t/** Link href */\n\thref?: string;\n\t/** Icon component */\n\ticon?: ComponentType<SVGProps<SVGSVGElement>>;\n\t/** Is currently active */\n\tactive?: boolean;\n\t/** Is disabled */\n\tdisabled?: boolean;\n\t/** Click handler */\n\tonClick?: () => void;\n}\n\n/**\n * Workspace configuration for workspace switcher\n */\nexport interface ShellWorkspace {\n\t/** Workspace identifier */\n\tid: string;\n\t/** Workspace name */\n\tname: string;\n\t/** Initials for avatar */\n\tinitials: string;\n\t/** User role in workspace */\n\trole: string;\n\t/** Background color class */\n\tcolor?: string;\n}\n\n/**\n * User profile configuration\n */\nexport interface ShellUser {\n\t/** User display name */\n\tname: string;\n\t/** User email */\n\temail?: string;\n\t/** User initials for avatar */\n\tinitials: string;\n}\n\nexport interface ShellProps {\n\t/** Shell variant determines layout structure */\n\tvariant?: ShellVariant;\n\t/** Main content area */\n\tchildren?: any;\n\t/** Navigation items for sidebar */\n\tnavigation?: ShellNavItem[];\n\t/** Shortcut items for sidebar */\n\tshortcuts?: ShellNavItem[];\n\t/** Current workspace */\n\tworkspace?: ShellWorkspace;\n\t/** Available workspaces */\n\tworkspaces?: ShellWorkspace[];\n\t/** Current user */\n\tuser?: ShellUser;\n\t/** Is sidebar collapsed */\n\tsidebarCollapsed?: boolean;\n\t/** Sidebar collapse handler */\n\tonSidebarCollapse?: (collapsed: boolean) => void;\n\t/** Current pathname for active navigation state */\n\tpathname?: string;\n\t/** Link component for routing (e.g., Next.js Link) */\n\tLinkComponent?: ComponentType<{\n\t\thref: string;\n\t\tclassName?: string;\n\t\tchildren: ReactNode;\n\t}>;\n\t/** Custom sidebar content or boolean to show/hide default sidebar */\n\tsidebar?: ReactNode | boolean;\n\t/** Custom header content or boolean to show/hide default header */\n\theader?: ReactNode | boolean;\n\t/** Theme mode */\n\ttheme?: \"light\" | \"dark\" | \"system\";\n\t/** Loading state */\n\tloading?: boolean;\n\t/** Additional className for the main content area */\n\tclassName?: string;\n\t/** Additional className for the shell container */\n\tcontainerClassName?: string;\n}\n\n/**\n * Shell - Flexible dashboard shell component with variant support\n *\n * A polymorphic shell component that renders different layouts based on the variant prop.\n * Use the named exports (ShellSidebarLeft, ShellTopNav) for full control over layout props.\n *\n * Based on Tremor dashboard template layout patterns:\n * - Fixed sidebar with workspace switcher and user profile\n * - Mobile-responsive with drawer navigation\n * - Support for collapsed sidebar state\n *\n * @example\n * ```tsx\n * // Basic usage with default variant (sidebar-left)\n * <Shell navigation={navItems} user={currentUser}>\n * <Dashboard />\n * </Shell>\n *\n * // With top-nav variant\n * <Shell variant=\"top-nav\" header={<TopNav />}>\n * <Dashboard />\n * </Shell>\n *\n * // With collapsed sidebar\n * <Shell sidebarCollapsed={true}>\n * <Dashboard />\n * </Shell>\n * ```\n */\nexport function Shell({\n\tvariant = \"sidebar-left\",\n\tchildren,\n\tnavigation: _navigation = [],\n\tshortcuts: _shortcuts = [],\n\tworkspace: _workspace,\n\tworkspaces: _workspaces = [],\n\tuser: _user,\n\tsidebarCollapsed = false,\n\tonSidebarCollapse: _onSidebarCollapse,\n\tpathname: _pathname,\n\tLinkComponent: _LinkComponent,\n\tsidebar,\n\theader,\n\ttheme: _theme = \"system\",\n\tloading = false,\n\tclassName,\n\tcontainerClassName,\n}: ShellProps) {\n\tconst showSidebar = variant === \"sidebar-left\" || variant === \"sidebar-right\";\n\tconst sidebarWidth = sidebarCollapsed ? \"lg:pl-16\" : \"lg:pl-72\";\n\n\t// Loading state\n\tif (loading) {\n\t\treturn (\n\t\t\t<div className=\"flex h-screen items-center justify-center\">\n\t\t\t\t<div className=\"h-8 w-8 animate-spin rounded-full border-4 border-gray-300 border-t-indigo-600\" />\n\t\t\t</div>\n\t\t);\n\t}\n\n\t// Top-nav variant\n\tif (variant === \"top-nav\") {\n\t\treturn (\n\t\t\t<div className={twMerge(\"mx-auto max-w-screen-2xl\", containerClassName)}>\n\t\t\t\t{header}\n\t\t\t\t<main role=\"main\" className={twMerge(\"flex-1\", className)}>\n\t\t\t\t\t{children}\n\t\t\t\t</main>\n\t\t\t</div>\n\t\t);\n\t}\n\n\t// Minimal variant\n\tif (variant === \"minimal\") {\n\t\treturn (\n\t\t\t<div className={twMerge(\"mx-auto max-w-screen-2xl\", containerClassName)}>\n\t\t\t\t<main role=\"main\" className={twMerge(\"flex-1\", className)}>\n\t\t\t\t\t{children}\n\t\t\t\t</main>\n\t\t\t</div>\n\t\t);\n\t}\n\n\t// Sidebar variants (sidebar-left, sidebar-right)\n\treturn (\n\t\t<div className={twMerge(\"mx-auto max-w-screen-2xl\", containerClassName)}>\n\t\t\t{/* Custom sidebar or render default */}\n\t\t\t{sidebar}\n\n\t\t\t{/* Main Content */}\n\t\t\t<main\n\t\t\t\trole=\"main\"\n\t\t\t\tclassName={twMerge(showSidebar && sidebarWidth, className)}\n\t\t\t>\n\t\t\t\t{children}\n\t\t\t</main>\n\t\t</div>\n\t);\n}\n","\"use client\";\n\nimport type { ComponentType, ReactNode } from \"react\";\nimport { twMerge } from \"tailwind-merge\";\nimport type { ShellNavItem, ShellUser, ShellWorkspace } from \"./shell\";\n\nexport interface ShellSidebarLeftProps {\n\t/** Content to render in the sidebar (left side) - if not provided, uses built-in sidebar */\n\tsidebar?: ReactNode;\n\t/** Content to render in the mobile header (optional) */\n\tmobileHeader?: ReactNode;\n\t/** Main content area */\n\tchildren: ReactNode;\n\t/** Navigation items for built-in sidebar */\n\tnavigation?: ShellNavItem[];\n\t/** Shortcut items for built-in sidebar */\n\tshortcuts?: ShellNavItem[];\n\t/** Current workspace */\n\tworkspace?: ShellWorkspace;\n\t/** Available workspaces */\n\tworkspaces?: ShellWorkspace[];\n\t/** Current user */\n\tuser?: ShellUser;\n\t/** Is sidebar collapsed */\n\tcollapsed?: boolean;\n\t/** Sidebar collapse handler */\n\tonCollapse?: (collapsed: boolean) => void;\n\t/** Current pathname for active navigation state */\n\tpathname?: string;\n\t/** Link component for routing (e.g., Next.js Link) */\n\tLinkComponent?: ComponentType<{\n\t\thref: string;\n\t\tclassName?: string;\n\t\tchildren: ReactNode;\n\t}>;\n\t/** Additional className for the main content area */\n\tclassName?: string;\n\t/** Additional className for the container */\n\tcontainerClassName?: string;\n}\n\n/**\n * ShellSidebarLeft - Dashboard shell with sidebar on the left\n *\n * A layout component that provides a sidebar-left dashboard shell structure\n * based on the Tremor dashboard template:\n * - Fixed sidebar (72px wide, or 16px when collapsed) on the left\n * - Sticky mobile header with workspace switcher and user profile\n * - Responsive layout with drawer navigation on mobile\n * - Main content area with proper padding for sidebar\n *\n * @example\n * ```tsx\n * <ShellSidebarLeft\n * navigation={[\n * { id: 'overview', label: 'Overview', href: '/overview', icon: HomeIcon },\n * { id: 'details', label: 'Details', href: '/details', icon: ListIcon },\n * ]}\n * workspace={{ id: '1', name: 'Retail Analytics', initials: 'RA', role: 'Member' }}\n * user={{ name: 'Emma Stone', initials: 'ES' }}\n * pathname=\"/overview\"\n * >\n * <DashboardContent />\n * </ShellSidebarLeft>\n * ```\n */\nexport function ShellSidebarLeft({\n\tsidebar,\n\tmobileHeader,\n\tchildren,\n\tnavigation: _navigation = [],\n\tshortcuts: _shortcuts = [],\n\tworkspace: _workspace,\n\tworkspaces: _workspaces = [],\n\tuser: _user,\n\tcollapsed = false,\n\tonCollapse: _onCollapse,\n\tpathname: _pathname,\n\tLinkComponent: _LinkComponent,\n\tclassName,\n\tcontainerClassName,\n}: ShellSidebarLeftProps) {\n\tconst sidebarWidth = collapsed ? \"lg:pl-16\" : \"lg:pl-72\";\n\n\treturn (\n\t\t<div className={twMerge(\"mx-auto max-w-screen-2xl\", containerClassName)}>\n\t\t\t{/* Sidebar - fixed position on large screens */}\n\t\t\t{sidebar && (\n\t\t\t\t<nav\n\t\t\t\t\tclassName={twMerge(\n\t\t\t\t\t\t\"hidden lg:fixed lg:inset-y-0 lg:z-50 lg:flex lg:flex-col\",\n\t\t\t\t\t\tcollapsed ? \"lg:w-16\" : \"lg:w-72\",\n\t\t\t\t\t)}\n\t\t\t\t>\n\t\t\t\t\t{sidebar}\n\t\t\t\t</nav>\n\t\t\t)}\n\n\t\t\t{/* Mobile Header - sticky on small screens */}\n\t\t\t{mobileHeader && (\n\t\t\t\t<div\n\t\t\t\t\tdata-testid=\"mobile-header\"\n\t\t\t\t\tclassName=\"sticky top-0 z-40 flex h-16 shrink-0 items-center justify-between border-b border-gray-200 bg-white px-2 shadow-sm sm:gap-x-6 sm:px-4 lg:hidden dark:border-gray-800 dark:bg-gray-950\"\n\t\t\t\t>\n\t\t\t\t\t{mobileHeader}\n\t\t\t\t</div>\n\t\t\t)}\n\n\t\t\t{/* Main Content */}\n\t\t\t<main role=\"main\" className={twMerge(sidebarWidth, className)}>\n\t\t\t\t{children}\n\t\t\t</main>\n\t\t</div>\n\t);\n}\n","import type { ReactNode } from \"react\";\nimport { twMerge } from \"tailwind-merge\";\n\nexport interface ShellTopNavProps {\n\t/** Content to render in the header/top nav */\n\theader: ReactNode;\n\t/** Content to render in the sidebar (optional) */\n\tsidebar?: ReactNode;\n\t/** Main content area */\n\tchildren: ReactNode;\n\t/** Additional className for the main content area */\n\tclassName?: string;\n}\n\n/**\n * ShellTopNav - Dashboard shell with top navigation\n *\n * A layout component that provides a top-nav dashboard shell structure:\n * - Header/navigation at the top\n * - Optional sidebar below header\n * - Main content area\n */\nexport function ShellTopNav({\n\theader,\n\tsidebar,\n\tchildren,\n\tclassName,\n}: ShellTopNavProps) {\n\treturn (\n\t\t<div className=\"flex min-h-screen flex-col\">\n\t\t\t{/* Top Navigation */}\n\t\t\t{header}\n\n\t\t\t{/* Content area with optional sidebar */}\n\t\t\t<div className=\"flex flex-1\">\n\t\t\t\t{/* Optional Sidebar */}\n\t\t\t\t{sidebar && <aside className=\"flex-shrink-0\">{sidebar}</aside>}\n\n\t\t\t\t{/* Main content */}\n\t\t\t\t<main role=\"main\" className={twMerge(\"flex-1\", className)}>\n\t\t\t\t\t{children}\n\t\t\t\t</main>\n\t\t\t</div>\n\t\t</div>\n\t);\n}\n","\"use client\";\n\nimport type { ComponentType, ReactNode } from \"react\";\nimport { useState } from \"react\";\nimport { cx, focusRing } from \"../../utils\";\nimport type { SidebarNavItem, SidebarShortcutItem } from \"./sidebar\";\n\n/**\n * Link component props\n */\ninterface LinkProps {\n\thref: string;\n\tclassName?: string;\n\tchildren: ReactNode;\n\tonClick?: () => void;\n}\n\n/**\n * Props for the MobileSidebar component\n */\nexport interface MobileSidebarProps {\n\t/** Navigation items */\n\titems?: SidebarNavItem[];\n\t/** Shortcut items */\n\tshortcuts?: SidebarShortcutItem[];\n\t/** Title for the mobile drawer */\n\ttitle?: string;\n\t/** Current pathname for active state detection */\n\tpathname?: string;\n\t/** Link component for routing (e.g., Next.js Link) */\n\tLinkComponent?: ComponentType<LinkProps>;\n\t/** Additional className */\n\tclassName?: string;\n}\n\n/**\n * Default link component (plain anchor)\n */\nfunction DefaultLink({ href, className, children, onClick }: LinkProps) {\n\treturn (\n\t\t<a href={href} className={className} onClick={onClick}>\n\t\t\t{children}\n\t\t</a>\n\t);\n}\n\n/**\n * Helper to determine if a nav item is active\n */\nfunction isItemActive(\n\titemHref: string | undefined,\n\tpathname: string | undefined,\n\tsettingsPath = \"/settings\",\n): boolean {\n\tif (!itemHref || !pathname) return false;\n\tif (itemHref === settingsPath) {\n\t\treturn pathname.startsWith(\"/settings\");\n\t}\n\treturn pathname === itemHref || pathname.startsWith(itemHref);\n}\n\n/**\n * Mobile Sidebar - Drawer-based navigation for smaller screens\n *\n * A slide-out drawer that displays navigation on mobile devices.\n * Features a hamburger menu button and animated drawer transition.\n */\nexport function MobileSidebar({\n\titems = [],\n\tshortcuts = [],\n\ttitle = \"Navigation\",\n\tpathname,\n\tLinkComponent = DefaultLink,\n\tclassName,\n}: MobileSidebarProps) {\n\tconst [isOpen, setIsOpen] = useState(false);\n\n\tconst toggleDrawer = () => setIsOpen(!isOpen);\n\tconst closeDrawer = () => setIsOpen(false);\n\n\treturn (\n\t\t<>\n\t\t\t{/* Menu Button */}\n\t\t\t<button\n\t\t\t\tonClick={toggleDrawer}\n\t\t\t\taria-label=\"open sidebar\"\n\t\t\t\tclassName={cx(\n\t\t\t\t\t\"group flex items-center rounded-md p-2 text-sm font-medium hover:bg-gray-100 data-[state=open]:bg-gray-100 data-[state=open]:bg-gray-400/10 hover:dark:bg-gray-400/10\",\n\t\t\t\t\tclassName,\n\t\t\t\t)}\n\t\t\t\tdata-state={isOpen ? \"open\" : \"closed\"}\n\t\t\t>\n\t\t\t\t<svg\n\t\t\t\t\tclassName=\"size-6 shrink-0 sm:size-5\"\n\t\t\t\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\t\t\t\tviewBox=\"0 0 24 24\"\n\t\t\t\t\tfill=\"none\"\n\t\t\t\t\tstroke=\"currentColor\"\n\t\t\t\t\tstrokeWidth=\"2\"\n\t\t\t\t\tstrokeLinecap=\"round\"\n\t\t\t\t\tstrokeLinejoin=\"round\"\n\t\t\t\t>\n\t\t\t\t\t<line x1=\"4\" x2=\"20\" y1=\"12\" y2=\"12\" />\n\t\t\t\t\t<line x1=\"4\" x2=\"20\" y1=\"6\" y2=\"6\" />\n\t\t\t\t\t<line x1=\"4\" x2=\"20\" y1=\"18\" y2=\"18\" />\n\t\t\t\t</svg>\n\t\t\t</button>\n\n\t\t\t{/* Backdrop */}\n\t\t\t{isOpen && (\n\t\t\t\t<div\n\t\t\t\t\tclassName=\"fixed inset-0 z-50 bg-black/50\"\n\t\t\t\t\tonClick={closeDrawer}\n\t\t\t\t\taria-hidden=\"true\"\n\t\t\t\t/>\n\t\t\t)}\n\n\t\t\t{/* Drawer */}\n\t\t\t<div\n\t\t\t\tclassName={cx(\n\t\t\t\t\t\"fixed inset-y-0 right-0 z-50 w-full max-w-sm transform bg-white transition-transform duration-300 ease-in-out dark:bg-gray-950\",\n\t\t\t\t\tisOpen ? \"translate-x-0\" : \"translate-x-full\",\n\t\t\t\t)}\n\t\t\t>\n\t\t\t\t{/* Header */}\n\t\t\t\t<div className=\"flex items-center justify-between border-b border-gray-200 p-4 dark:border-gray-800\">\n\t\t\t\t\t<h2 className=\"text-lg font-semibold text-gray-900 dark:text-gray-50\">\n\t\t\t\t\t\t{title}\n\t\t\t\t\t</h2>\n\t\t\t\t\t<button\n\t\t\t\t\t\tonClick={closeDrawer}\n\t\t\t\t\t\taria-label=\"close sidebar\"\n\t\t\t\t\t\tclassName=\"rounded-md p-2 hover:bg-gray-100 hover:dark:bg-gray-800\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<svg\n\t\t\t\t\t\t\tclassName=\"size-5\"\n\t\t\t\t\t\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\t\t\t\t\t\tviewBox=\"0 0 24 24\"\n\t\t\t\t\t\t\tfill=\"none\"\n\t\t\t\t\t\t\tstroke=\"currentColor\"\n\t\t\t\t\t\t\tstrokeWidth=\"2\"\n\t\t\t\t\t\t\tstrokeLinecap=\"round\"\n\t\t\t\t\t\t\tstrokeLinejoin=\"round\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<path d=\"M18 6 6 18\" />\n\t\t\t\t\t\t\t<path d=\"m6 6 12 12\" />\n\t\t\t\t\t\t</svg>\n\t\t\t\t\t</button>\n\t\t\t\t</div>\n\n\t\t\t\t{/* Content */}\n\t\t\t\t<div className=\"p-4\">\n\t\t\t\t\t<nav\n\t\t\t\t\t\taria-label=\"core mobile navigation links\"\n\t\t\t\t\t\tclassName=\"flex flex-1 flex-col space-y-10\"\n\t\t\t\t\t>\n\t\t\t\t\t\t{/* Primary Navigation */}\n\t\t\t\t\t\t<ul role=\"list\" className=\"space-y-1.5\">\n\t\t\t\t\t\t\t{items.map((item) => {\n\t\t\t\t\t\t\t\tconst isActive =\n\t\t\t\t\t\t\t\t\titem.active ?? isItemActive(item.href, pathname);\n\t\t\t\t\t\t\t\tconst Icon = item.icon;\n\n\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t<li key={item.id}>\n\t\t\t\t\t\t\t\t\t\t<LinkComponent\n\t\t\t\t\t\t\t\t\t\t\thref={item.href || \"#\"}\n\t\t\t\t\t\t\t\t\t\t\tclassName={cx(\n\t\t\t\t\t\t\t\t\t\t\t\tisActive\n\t\t\t\t\t\t\t\t\t\t\t\t\t? \"text-indigo-600 dark:text-indigo-400\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t: \"text-gray-600 hover:text-gray-900 dark:text-gray-400 hover:dark:text-gray-50\",\n\t\t\t\t\t\t\t\t\t\t\t\t\"flex items-center gap-x-2.5 rounded-md px-2 py-1.5 text-base font-medium transition hover:bg-gray-100 sm:text-sm hover:dark:bg-gray-900\",\n\t\t\t\t\t\t\t\t\t\t\t\tfocusRing,\n\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\tonClick={closeDrawer}\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t{Icon && (\n\t\t\t\t\t\t\t\t\t\t\t\t<Icon className=\"size-5 shrink-0\" aria-hidden=\"true\" />\n\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t{item.label}\n\t\t\t\t\t\t\t\t\t\t</LinkComponent>\n\t\t\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t})}\n\t\t\t\t\t\t</ul>\n\n\t\t\t\t\t\t{/* Shortcuts Section */}\n\t\t\t\t\t\t{shortcuts.length > 0 && (\n\t\t\t\t\t\t\t<div>\n\t\t\t\t\t\t\t\t<span className=\"text-sm font-medium leading-6 text-gray-500 sm:text-xs\">\n\t\t\t\t\t\t\t\t\tShortcuts\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t<ul aria-label=\"shortcuts\" role=\"list\" className=\"space-y-0.5\">\n\t\t\t\t\t\t\t\t\t{shortcuts.map((shortcut) => {\n\t\t\t\t\t\t\t\t\t\tconst isActive = isItemActive(shortcut.href, pathname);\n\t\t\t\t\t\t\t\t\t\tconst Icon = shortcut.icon;\n\n\t\t\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t\t\t<li key={shortcut.name}>\n\t\t\t\t\t\t\t\t\t\t\t\t<LinkComponent\n\t\t\t\t\t\t\t\t\t\t\t\t\thref={shortcut.href}\n\t\t\t\t\t\t\t\t\t\t\t\t\tclassName={cx(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tisActive\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t? \"text-indigo-600 dark:text-indigo-400\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t: \"text-gray-700 hover:text-gray-900 dark:text-gray-400 hover:dark:text-gray-50\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"flex items-center gap-x-2.5 rounded-md px-2 py-1.5 font-medium transition hover:bg-gray-100 sm:text-sm hover:dark:bg-gray-900\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tfocusRing,\n\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t\tonClick={closeDrawer}\n\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t{Icon && (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Icon\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"size-4 shrink-0\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\taria-hidden=\"true\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t{shortcut.name}\n\t\t\t\t\t\t\t\t\t\t\t\t</LinkComponent>\n\t\t\t\t\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t})}\n\t\t\t\t\t\t\t\t</ul>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t)}\n\t\t\t\t\t</nav>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</>\n\t);\n}\n","/**\n * Dashboard Template Utilities\n *\n * Shared utility functions and style constants for the dashboard template.\n */\n\nimport { type ClassNameValue, twMerge } from \"tailwind-merge\";\n\n/**\n * Merge class names with Tailwind CSS class conflict resolution\n */\nexport function cx(...args: ClassNameValue[]) {\n\treturn twMerge(...args);\n}\n\n/**\n * Focus input ring styles (for form inputs)\n */\nexport const focusInput = [\n\t// base\n\t\"focus:ring-2\",\n\t// ring color\n\t\"focus:ring-indigo-200 focus:dark:ring-indigo-700/30\",\n\t// border color\n\t\"focus:border-indigo-500 focus:dark:border-indigo-700\",\n].join(\" \");\n\n/**\n * Focus ring styles (for buttons and interactive elements)\n */\nexport const focusRing = [\n\t// base\n\t\"outline outline-offset-2 outline-0 focus-visible:outline-2\",\n\t// outline color\n\t\"outline-indigo-500 dark:outline-indigo-500\",\n].join(\" \");\n\n/**\n * Error input ring styles\n */\nexport const hasErrorInput = [\n\t// base\n\t\"ring-2\",\n\t// border color\n\t\"border-red-500 dark:border-red-700\",\n\t// ring color\n\t\"ring-red-200 dark:ring-red-700/30\",\n].join(\" \");\n","\"use client\";\n\nimport type { ComponentType, ReactNode, SVGProps } from \"react\";\nimport { cx, focusRing } from \"../../utils\";\n\n/**\n * Navigation item configuration for the sidebar\n */\nexport interface SidebarNavItem {\n\t/** Unique identifier */\n\tid: string;\n\t/** Display label */\n\tlabel: string;\n\t/** Link href */\n\thref?: string;\n\t/** Icon component */\n\ticon?: ComponentType<SVGProps<SVGSVGElement>>;\n\t/** Is currently active */\n\tactive?: boolean;\n\t/** Is disabled */\n\tdisabled?: boolean;\n\t/** Click handler */\n\tonClick?: () => void;\n}\n\n/**\n * Shortcut item configuration\n */\nexport interface SidebarShortcutItem {\n\t/** Display name */\n\tname: string;\n\t/** Link href */\n\thref: string;\n\t/** Icon component */\n\ticon?: ComponentType<SVGProps<SVGSVGElement>>;\n}\n\n/**\n * Workspace configuration for the workspace switcher\n */\nexport interface SidebarWorkspace {\n\t/** Workspace identifier */\n\tid: string;\n\t/** Workspace name */\n\tname: string;\n\t/** Initials for avatar */\n\tinitials: string;\n\t/** User role in workspace */\n\trole: string;\n\t/** Background color class */\n\tcolor?: string;\n}\n\n/**\n * User profile configuration for the sidebar footer\n */\nexport interface SidebarUser {\n\t/** User display name */\n\tname: string;\n\t/** User email */\n\temail?: string;\n\t/** User initials for avatar */\n\tinitials: string;\n}\n\n/**\n * Props for the Sidebar adapter component\n */\nexport interface SidebarProps {\n\t/** Navigation items */\n\titems?: SidebarNavItem[];\n\t/** Shortcut items */\n\tshortcuts?: SidebarShortcutItem[];\n\t/** Current workspace */\n\tworkspace?: SidebarWorkspace;\n\t/** Available workspaces for switching */\n\tworkspaces?: SidebarWorkspace[];\n\t/** Current user */\n\tuser?: SidebarUser;\n\t/** Is sidebar collapsed */\n\tcollapsed?: boolean;\n\t/** Collapse toggle handler */\n\tonCollapse?: (collapsed: boolean) => void;\n\t/** Custom header content */\n\theader?: ReactNode;\n\t/** Custom footer content */\n\tfooter?: ReactNode;\n\t/** Additional className */\n\tclassName?: string;\n\t/** Current pathname for active state detection */\n\tpathname?: string;\n\t/** Link component for routing (e.g., Next.js Link) */\n\tLinkComponent?: ComponentType<{\n\t\thref: string;\n\t\tclassName?: string;\n\t\tchildren: ReactNode;\n\t}>;\n}\n\n/**\n * Default link component (plain anchor)\n */\nfunction DefaultLink({\n\thref,\n\tclassName,\n\tchildren,\n}: {\n\thref: string;\n\tclassName?: string;\n\tchildren: ReactNode;\n}) {\n\treturn (\n\t\t<a href={href} className={className}>\n\t\t\t{children}\n\t\t</a>\n\t);\n}\n\n/**\n * Helper to determine if a nav item is active\n */\nfunction isItemActive(\n\titemHref: string | undefined,\n\tpathname: string | undefined,\n\tsettingsPath = \"/settings\",\n): boolean {\n\tif (!itemHref || !pathname) return false;\n\tif (itemHref === settingsPath) {\n\t\treturn pathname.startsWith(\"/settings\");\n\t}\n\treturn pathname === itemHref || pathname.startsWith(itemHref);\n}\n\n/**\n * Sidebar - Navigation sidebar with workspace switcher and user profile\n *\n * A vertical navigation bar featuring:\n * - Workspace dropdown at the top\n * - Primary navigation links\n * - Shortcuts section\n * - User profile at the bottom\n *\n * Based on Tremor dashboard template sidebar design.\n */\nexport function Sidebar({\n\titems = [],\n\tshortcuts = [],\n\tworkspace,\n\tworkspaces = [],\n\tuser,\n\tcollapsed = false,\n\tonCollapse: _onCollapse,\n\theader,\n\tfooter,\n\tclassName,\n\tpathname,\n\tLinkComponent = DefaultLink,\n}: SidebarProps) {\n\treturn (\n\t\t<nav\n\t\t\tdata-testid=\"sidebar\"\n\t\t\tclassName={cx(\n\t\t\t\t\"hidden lg:fixed lg:inset-y-0 lg:z-50 lg:flex lg:flex-col\",\n\t\t\t\tcollapsed ? \"lg:w-16\" : \"lg:w-72\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t>\n\t\t\t<aside className=\"flex grow flex-col gap-y-6 overflow-y-auto border-r border-gray-200 bg-white p-4 dark:border-gray-800 dark:bg-gray-950\">\n\t\t\t\t{/* Workspace Switcher */}\n\t\t\t\t{workspace && (\n\t\t\t\t\t<WorkspaceSwitcher\n\t\t\t\t\t\tworkspace={workspace}\n\t\t\t\t\t\tworkspaces={workspaces}\n\t\t\t\t\t\tcollapsed={collapsed}\n\t\t\t\t\t/>\n\t\t\t\t)}\n\n\t\t\t\t{/* Custom Header */}\n\t\t\t\t{header}\n\n\t\t\t\t{/* Main Navigation */}\n\t\t\t\t<nav\n\t\t\t\t\taria-label=\"core navigation links\"\n\t\t\t\t\tclassName=\"flex flex-1 flex-col space-y-10\"\n\t\t\t\t>\n\t\t\t\t\t{/* Primary Navigation Items */}\n\t\t\t\t\t<ul role=\"list\" className=\"space-y-0.5\">\n\t\t\t\t\t\t{items.map((item) => {\n\t\t\t\t\t\t\tconst isActive = item.active ?? isItemActive(item.href, pathname);\n\t\t\t\t\t\t\tconst Icon = item.icon;\n\n\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t<li key={item.id}>\n\t\t\t\t\t\t\t\t\t<LinkComponent\n\t\t\t\t\t\t\t\t\t\thref={item.href || \"#\"}\n\t\t\t\t\t\t\t\t\t\tclassName={cx(\n\t\t\t\t\t\t\t\t\t\t\tisActive\n\t\t\t\t\t\t\t\t\t\t\t\t? \"text-indigo-600 dark:text-indigo-400\"\n\t\t\t\t\t\t\t\t\t\t\t\t: \"text-gray-700 hover:text-gray-900 dark:text-gray-400 hover:dark:text-gray-50\",\n\t\t\t\t\t\t\t\t\t\t\t\"flex items-center gap-x-2.5 rounded-md px-2 py-1.5 text-sm font-medium transition hover:bg-gray-100 hover:dark:bg-gray-900\",\n\t\t\t\t\t\t\t\t\t\t\tfocusRing,\n\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\tdata-testid=\"nav-item\"\n\t\t\t\t\t\t\t\t\t\tdata-active={isActive}\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t{Icon && (\n\t\t\t\t\t\t\t\t\t\t\t<Icon className=\"size-4 shrink-0\" aria-hidden=\"true\" />\n\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t{!collapsed && item.label}\n\t\t\t\t\t\t\t\t\t</LinkComponent>\n\t\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t})}\n\t\t\t\t\t</ul>\n\n\t\t\t\t\t{/* Shortcuts Section */}\n\t\t\t\t\t{shortcuts.length > 0 && !collapsed && (\n\t\t\t\t\t\t<div>\n\t\t\t\t\t\t\t<span className=\"text-xs font-medium leading-6 text-gray-500\">\n\t\t\t\t\t\t\t\tShortcuts\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t<ul aria-label=\"shortcuts\" role=\"list\" className=\"space-y-0.5\">\n\t\t\t\t\t\t\t\t{shortcuts.map((shortcut) => {\n\t\t\t\t\t\t\t\t\tconst isActive = isItemActive(shortcut.href, pathname);\n\t\t\t\t\t\t\t\t\tconst Icon = shortcut.icon;\n\n\t\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t\t<li key={shortcut.name}>\n\t\t\t\t\t\t\t\t\t\t\t<LinkComponent\n\t\t\t\t\t\t\t\t\t\t\t\thref={shortcut.href}\n\t\t\t\t\t\t\t\t\t\t\t\tclassName={cx(\n\t\t\t\t\t\t\t\t\t\t\t\t\tisActive\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t? \"text-indigo-600 dark:text-indigo-400\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t: \"text-gray-700 hover:text-gray-900 dark:text-gray-400 hover:dark:text-gray-50\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"flex items-center gap-x-2.5 rounded-md px-2 py-1.5 text-sm font-medium transition hover:bg-gray-100 hover:dark:bg-gray-900\",\n\t\t\t\t\t\t\t\t\t\t\t\t\tfocusRing,\n\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t{Icon && (\n\t\t\t\t\t\t\t\t\t\t\t\t\t<Icon\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"size-4 shrink-0\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\taria-hidden=\"true\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t{shortcut.name}\n\t\t\t\t\t\t\t\t\t\t\t</LinkComponent>\n\t\t\t\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t})}\n\t\t\t\t\t\t\t</ul>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t)}\n\t\t\t\t</nav>\n\n\t\t\t\t{/* User Profile Footer */}\n\t\t\t\t{user && !footer && (\n\t\t\t\t\t<div className=\"mt-auto\">\n\t\t\t\t\t\t<UserProfile user={user} collapsed={collapsed} />\n\t\t\t\t\t</div>\n\t\t\t\t)}\n\n\t\t\t\t{/* Custom Footer */}\n\t\t\t\t{footer && <div className=\"mt-auto\">{footer}</div>}\n\t\t\t</aside>\n\t\t</nav>\n\t);\n}\n\n/**\n * Workspace Switcher component\n */\ninterface WorkspaceSwitcherProps {\n\tworkspace: SidebarWorkspace;\n\tworkspaces?: SidebarWorkspace[];\n\tcollapsed?: boolean;\n}\n\nfunction WorkspaceSwitcher({\n\tworkspace,\n\tworkspaces: _workspaces = [],\n\tcollapsed,\n}: WorkspaceSwitcherProps) {\n\tif (collapsed) {\n\t\treturn (\n\t\t\t<div className=\"flex justify-center\">\n\t\t\t\t<span\n\t\t\t\t\tclassName={cx(\n\t\t\t\t\t\tworkspace.color || \"bg-indigo-600 dark:bg-indigo-500\",\n\t\t\t\t\t\t\"flex aspect-square size-8 items-center justify-center rounded p-2 text-xs font-medium text-white\",\n\t\t\t\t\t)}\n\t\t\t\t\taria-hidden=\"true\"\n\t\t\t\t>\n\t\t\t\t\t{workspace.initials}\n\t\t\t\t</span>\n\t\t\t</div>\n\t\t);\n\t}\n\n\treturn (\n\t\t<button\n\t\t\tclassName={cx(\n\t\t\t\t\"flex w-full items-center gap-x-2.5 rounded-md border border-gray-300 bg-white p-2 text-sm shadow-sm transition-all hover:bg-gray-50 dark:border-gray-800 dark:bg-gray-950 hover:dark:bg-gray-900\",\n\t\t\t\t\"focus:ring-2 focus:ring-indigo-200 focus:border-indigo-500 focus:dark:ring-indigo-700/30 focus:dark:border-indigo-700\",\n\t\t\t)}\n\t\t>\n\t\t\t<span\n\t\t\t\tclassName={cx(\n\t\t\t\t\tworkspace.color || \"bg-indigo-600 dark:bg-indigo-500\",\n\t\t\t\t\t\"flex aspect-square size-8 items-center justify-center rounded p-2 text-xs font-medium text-white\",\n\t\t\t\t)}\n\t\t\t\taria-hidden=\"true\"\n\t\t\t>\n\t\t\t\t{workspace.initials}\n\t\t\t</span>\n\t\t\t<div className=\"flex w-full items-center justify-between gap-x-4 truncate\">\n\t\t\t\t<div className=\"truncate\">\n\t\t\t\t\t<p className=\"truncate whitespace-nowrap text-sm font-medium text-gray-900 dark:text-gray-50\">\n\t\t\t\t\t\t{workspace.name}\n\t\t\t\t\t</p>\n\t\t\t\t\t<p className=\"whitespace-nowrap text-left text-xs text-gray-700 dark:text-gray-300\">\n\t\t\t\t\t\t{workspace.role}\n\t\t\t\t\t</p>\n\t\t\t\t</div>\n\t\t\t\t<svg\n\t\t\t\t\tclassName=\"size-5 shrink-0 text-gray-500\"\n\t\t\t\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\t\t\t\tviewBox=\"0 0 24 24\"\n\t\t\t\t\tfill=\"none\"\n\t\t\t\t\tstroke=\"currentColor\"\n\t\t\t\t\tstrokeWidth=\"2\"\n\t\t\t\t\tstrokeLinecap=\"round\"\n\t\t\t\t\tstrokeLinejoin=\"round\"\n\t\t\t\t>\n\t\t\t\t\t<path d=\"m7 15 5 5 5-5\" />\n\t\t\t\t\t<path d=\"m7 9 5-5 5 5\" />\n\t\t\t\t</svg>\n\t\t\t</div>\n\t\t</button>\n\t);\n}\n\n/**\n * User Profile component for sidebar footer\n */\ninterface UserProfileProps {\n\tuser: SidebarUser;\n\tcollapsed?: boolean;\n}\n\nfunction UserProfile({ user, collapsed }: UserProfileProps) {\n\tif (collapsed) {\n\t\treturn (\n\t\t\t<button\n\t\t\t\taria-label=\"User settings\"\n\t\t\t\tclassName={cx(\n\t\t\t\t\tfocusRing,\n\t\t\t\t\t\"flex w-full justify-center rounded-md p-2 text-sm font-medium text-gray-900 hover:bg-gray-100 dark:text-gray-50 hover:dark:bg-gray-400/10\",\n\t\t\t\t)}\n\t\t\t>\n\t\t\t\t<span\n\t\t\t\t\tclassName=\"flex size-8 shrink-0 items-center justify-center rounded-full border border-gray-300 bg-white text-xs text-gray-700 dark:border-gray-800 dark:bg-gray-950 dark:text-gray-300\"\n\t\t\t\t\taria-hidden=\"true\"\n\t\t\t\t>\n\t\t\t\t\t{user.initials}\n\t\t\t\t</span>\n\t\t\t</button>\n\t\t);\n\t}\n\n\treturn (\n\t\t<button\n\t\t\taria-label=\"User settings\"\n\t\t\tclassName={cx(\n\t\t\t\tfocusRing,\n\t\t\t\t\"group flex w-full items-center justify-between rounded-md p-2 text-sm font-medium text-gray-900 hover:bg-gray-100 data-[state=open]:bg-gray-100 data-[state=open]:bg-gray-400/10 hover:dark:bg-gray-400/10\",\n\t\t\t)}\n\t\t>\n\t\t\t<span className=\"flex items-center gap-3\">\n\t\t\t\t<span\n\t\t\t\t\tclassName=\"flex size-8 shrink-0 items-center justify-center rounded-full border border-gray-300 bg-white text-xs text-gray-700 dark:border-gray-800 dark:bg-gray-950 dark:text-gray-300\"\n\t\t\t\t\taria-hidden=\"true\"\n\t\t\t\t>\n\t\t\t\t\t{user.initials}\n\t\t\t\t</span>\n\t\t\t\t<span className=\"dark:text-gray-50\">{user.name}</span>\n\t\t\t</span>\n\t\t\t<svg\n\t\t\t\tclassName=\"size-4 shrink-0 text-gray-500 group-hover:text-gray-700 group-hover:dark:text-gray-400\"\n\t\t\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\t\t\tviewBox=\"0 0 24 24\"\n\t\t\t\tfill=\"currentColor\"\n\t\t\t>\n\t\t\t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