@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,1062 @@
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
+
541
+ // src/dashboard/layouts/app.tsx
542
+ import { jsx as jsx6 } from "react/jsx-runtime";
543
+ function DashboardApp({ name, children }) {
544
+ return /* @__PURE__ */ jsx6(
545
+ "div",
546
+ {
547
+ "data-app-name": name,
548
+ className: "min-h-screen bg-white dark:bg-gray-950",
549
+ children
550
+ }
551
+ );
552
+ }
553
+
554
+ // src/dashboard/layouts/dashboard.tsx
555
+ import { twMerge as twMerge5 } from "tailwind-merge";
556
+ import { Fragment as Fragment2, jsx as jsx7, jsxs as jsxs6 } from "react/jsx-runtime";
557
+ function DashboardView({
558
+ title,
559
+ description,
560
+ metrics,
561
+ actions,
562
+ children,
563
+ className
564
+ }) {
565
+ return /* @__PURE__ */ jsxs6("main", { role: "main", className: twMerge5("", className), children: [
566
+ (title || description || actions) && /* @__PURE__ */ jsxs6(Fragment2, { children: [
567
+ /* @__PURE__ */ jsxs6("div", { className: "flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between", children: [
568
+ /* @__PURE__ */ jsxs6("div", { children: [
569
+ title && /* @__PURE__ */ jsx7("h1", { className: "text-2xl font-semibold text-gray-900 dark:text-gray-50", children: title }),
570
+ description && /* @__PURE__ */ jsx7("p", { className: "text-gray-500 sm:text-sm/6 dark:text-gray-500", children: description })
571
+ ] }),
572
+ actions && /* @__PURE__ */ jsx7("div", { className: "flex items-center gap-2", children: actions })
573
+ ] }),
574
+ /* @__PURE__ */ jsx7("div", { className: "my-6 border-t border-gray-200 dark:border-gray-800" })
575
+ ] }),
576
+ metrics && metrics.length > 0 && /* @__PURE__ */ jsxs6(Fragment2, { children: [
577
+ /* @__PURE__ */ jsx7("div", { className: "grid gap-4 sm:grid-cols-2 lg:grid-cols-4", children: metrics.map((metric, index) => /* @__PURE__ */ jsxs6(
578
+ "div",
579
+ {
580
+ className: "rounded-lg border border-gray-200 bg-white p-4 dark:border-gray-800 dark:bg-gray-900",
581
+ children: [
582
+ /* @__PURE__ */ jsx7("p", { className: "text-sm font-medium text-gray-500 dark:text-gray-400", children: metric.label }),
583
+ /* @__PURE__ */ jsxs6("div", { className: "mt-1 flex items-baseline gap-2", children: [
584
+ /* @__PURE__ */ jsx7("p", { className: "text-2xl font-semibold text-gray-900 dark:text-gray-50", children: metric.value }),
585
+ metric.change !== void 0 && /* @__PURE__ */ jsxs6(
586
+ "span",
587
+ {
588
+ className: twMerge5(
589
+ "text-sm font-medium",
590
+ metric.trend === "up" && "text-green-600 dark:text-green-400",
591
+ metric.trend === "down" && "text-red-600 dark:text-red-400",
592
+ metric.trend === "neutral" && "text-gray-500 dark:text-gray-400"
593
+ ),
594
+ children: [
595
+ metric.change > 0 ? "+" : "",
596
+ metric.change,
597
+ "%"
598
+ ]
599
+ }
600
+ )
601
+ ] })
602
+ ]
603
+ },
604
+ index
605
+ )) }),
606
+ /* @__PURE__ */ jsx7("div", { className: "my-6 border-t border-gray-200 dark:border-gray-800" })
607
+ ] }),
608
+ children
609
+ ] });
610
+ }
611
+
612
+ // src/dashboard/layouts/header.tsx
613
+ import { twMerge as twMerge6 } from "tailwind-merge";
614
+ import { jsx as jsx8, jsxs as jsxs7 } from "react/jsx-runtime";
615
+ function DashboardHeader({
616
+ user,
617
+ showSearch = true,
618
+ showNotifications = true,
619
+ breadcrumbs,
620
+ logo,
621
+ notifications,
622
+ userProfile,
623
+ className
624
+ }) {
625
+ return /* @__PURE__ */ jsxs7(
626
+ "header",
627
+ {
628
+ className: twMerge6(
629
+ "flex h-16 items-center justify-between border-b border-gray-200 bg-white px-4 dark:border-gray-800 dark:bg-gray-950 sm:px-6",
630
+ className
631
+ ),
632
+ children: [
633
+ /* @__PURE__ */ jsxs7("div", { className: "flex items-center gap-4", children: [
634
+ logo ?? /* @__PURE__ */ jsx8("div", { className: "h-6 w-20 rounded bg-gray-200 dark:bg-gray-800" }),
635
+ breadcrumbs && breadcrumbs.length > 0 && /* @__PURE__ */ jsx8("nav", { "aria-label": "Breadcrumb", className: "hidden sm:block", children: /* @__PURE__ */ jsx8("ol", { className: "flex items-center gap-2", children: breadcrumbs.map((crumb, index) => /* @__PURE__ */ jsxs7("li", { className: "flex items-center gap-2", children: [
636
+ index > 0 && /* @__PURE__ */ jsx8("span", { className: "text-gray-400 dark:text-gray-600", children: "/" }),
637
+ crumb.href ? /* @__PURE__ */ jsx8(
638
+ "a",
639
+ {
640
+ href: crumb.href,
641
+ className: "text-sm text-gray-500 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-300",
642
+ children: crumb.label
643
+ }
644
+ ) : /* @__PURE__ */ jsx8("span", { className: "text-sm font-medium text-gray-900 dark:text-gray-100", children: crumb.label })
645
+ ] }, index)) }) })
646
+ ] }),
647
+ /* @__PURE__ */ jsxs7("div", { className: "flex items-center gap-3", children: [
648
+ showSearch && /* @__PURE__ */ jsx8(
649
+ "button",
650
+ {
651
+ type: "button",
652
+ className: "rounded-lg p-2 text-gray-500 hover:bg-gray-100 hover:text-gray-700 dark:text-gray-400 dark:hover:bg-gray-800 dark:hover:text-gray-300",
653
+ "aria-label": "Search",
654
+ children: /* @__PURE__ */ jsx8(
655
+ "svg",
656
+ {
657
+ className: "h-5 w-5",
658
+ fill: "none",
659
+ viewBox: "0 0 24 24",
660
+ stroke: "currentColor",
661
+ children: /* @__PURE__ */ jsx8(
662
+ "path",
663
+ {
664
+ strokeLinecap: "round",
665
+ strokeLinejoin: "round",
666
+ strokeWidth: 2,
667
+ d: "M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"
668
+ }
669
+ )
670
+ }
671
+ )
672
+ }
673
+ ),
674
+ showNotifications && (notifications ?? /* @__PURE__ */ jsx8(
675
+ "button",
676
+ {
677
+ type: "button",
678
+ className: "rounded-lg p-2 text-gray-500 hover:bg-gray-100 hover:text-gray-700 dark:text-gray-400 dark:hover:bg-gray-800 dark:hover:text-gray-300",
679
+ "aria-label": "Notifications",
680
+ children: /* @__PURE__ */ jsx8(
681
+ "svg",
682
+ {
683
+ className: "h-5 w-5",
684
+ fill: "none",
685
+ viewBox: "0 0 24 24",
686
+ stroke: "currentColor",
687
+ children: /* @__PURE__ */ jsx8(
688
+ "path",
689
+ {
690
+ strokeLinecap: "round",
691
+ strokeLinejoin: "round",
692
+ strokeWidth: 2,
693
+ d: "M15 17h5l-1.405-1.405A2.032 2.032 0 0118 14.158V11a6.002 6.002 0 00-4-5.659V5a2 2 0 10-4 0v.341C7.67 6.165 6 8.388 6 11v3.159c0 .538-.214 1.055-.595 1.436L4 17h5m6 0v1a3 3 0 11-6 0v-1m6 0H9"
694
+ }
695
+ )
696
+ }
697
+ )
698
+ }
699
+ )),
700
+ userProfile ?? (user && /* @__PURE__ */ jsx8("div", { className: "flex items-center gap-2", children: user.avatar ? /* @__PURE__ */ jsx8(
701
+ "img",
702
+ {
703
+ src: user.avatar,
704
+ alt: user.name,
705
+ className: "h-8 w-8 rounded-full"
706
+ }
707
+ ) : /* @__PURE__ */ jsx8("div", { className: "flex h-8 w-8 items-center justify-center rounded-full bg-gray-200 text-sm font-medium text-gray-600 dark:bg-gray-700 dark:text-gray-300", children: user.name.charAt(0) }) }))
708
+ ] })
709
+ ]
710
+ }
711
+ );
712
+ }
713
+
714
+ // src/dashboard/pages/settings.tsx
715
+ import { Fragment as Fragment3, jsx as jsx9, jsxs as jsxs8 } from "react/jsx-runtime";
716
+ var DEFAULT_SECTIONS = [
717
+ "profile",
718
+ "notifications",
719
+ "security",
720
+ "billing",
721
+ "team",
722
+ "api",
723
+ "integrations"
724
+ ];
725
+ function ProfileSection({ user }) {
726
+ return /* @__PURE__ */ jsx9(
727
+ "section",
728
+ {
729
+ "aria-labelledby": "profile-heading",
730
+ role: "region",
731
+ "aria-label": "Profile",
732
+ children: /* @__PURE__ */ jsxs8("div", { className: "grid grid-cols-1 gap-x-14 gap-y-8 md:grid-cols-3", children: [
733
+ /* @__PURE__ */ jsxs8("div", { children: [
734
+ /* @__PURE__ */ jsx9(
735
+ "h2",
736
+ {
737
+ id: "profile-heading",
738
+ className: "scroll-mt-10 font-semibold text-gray-900 dark:text-gray-50",
739
+ children: "Profile"
740
+ }
741
+ ),
742
+ /* @__PURE__ */ jsx9("p", { className: "mt-2 text-sm leading-6 text-gray-500", children: "Manage your personal information and preferences." })
743
+ ] }),
744
+ /* @__PURE__ */ jsx9("div", { className: "md:col-span-2", children: /* @__PURE__ */ jsxs8("form", { className: "space-y-4", children: [
745
+ /* @__PURE__ */ jsxs8("div", { children: [
746
+ /* @__PURE__ */ jsx9(
747
+ "label",
748
+ {
749
+ htmlFor: "name",
750
+ className: "block text-sm font-medium text-gray-900 dark:text-gray-50",
751
+ children: "Name"
752
+ }
753
+ ),
754
+ /* @__PURE__ */ jsx9(
755
+ "input",
756
+ {
757
+ type: "text",
758
+ id: "name",
759
+ name: "name",
760
+ defaultValue: user?.name || "",
761
+ placeholder: "Your name",
762
+ className: "mt-2 block w-full rounded-md border border-gray-300 px-3 py-2 text-sm shadow-sm focus:border-blue-500 focus:ring-blue-500 dark:border-gray-700 dark:bg-gray-900 dark:text-gray-50"
763
+ }
764
+ )
765
+ ] }),
766
+ /* @__PURE__ */ jsxs8("div", { children: [
767
+ /* @__PURE__ */ jsx9(
768
+ "label",
769
+ {
770
+ htmlFor: "email",
771
+ className: "block text-sm font-medium text-gray-900 dark:text-gray-50",
772
+ children: "Email"
773
+ }
774
+ ),
775
+ /* @__PURE__ */ jsx9(
776
+ "input",
777
+ {
778
+ type: "email",
779
+ id: "email",
780
+ name: "email",
781
+ defaultValue: user?.email || "",
782
+ placeholder: "your@email.com",
783
+ className: "mt-2 block w-full rounded-md border border-gray-300 px-3 py-2 text-sm shadow-sm focus:border-blue-500 focus:ring-blue-500 dark:border-gray-700 dark:bg-gray-900 dark:text-gray-50"
784
+ }
785
+ )
786
+ ] }),
787
+ /* @__PURE__ */ jsx9("div", { className: "flex justify-end", children: /* @__PURE__ */ jsx9(
788
+ "button",
789
+ {
790
+ type: "submit",
791
+ className: "rounded-md bg-blue-600 px-4 py-2 text-sm font-medium text-white shadow-sm hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2",
792
+ children: "Save changes"
793
+ }
794
+ ) })
795
+ ] }) })
796
+ ] })
797
+ }
798
+ );
799
+ }
800
+ function NotificationsSection() {
801
+ return /* @__PURE__ */ jsx9(
802
+ "section",
803
+ {
804
+ "aria-labelledby": "notifications-heading",
805
+ role: "region",
806
+ "aria-label": "Notifications",
807
+ children: /* @__PURE__ */ jsxs8("div", { className: "grid grid-cols-1 gap-x-14 gap-y-8 md:grid-cols-3", children: [
808
+ /* @__PURE__ */ jsxs8("div", { children: [
809
+ /* @__PURE__ */ jsx9(
810
+ "h2",
811
+ {
812
+ id: "notifications-heading",
813
+ className: "scroll-mt-10 font-semibold text-gray-900 dark:text-gray-50",
814
+ children: "Notifications"
815
+ }
816
+ ),
817
+ /* @__PURE__ */ jsx9("p", { className: "mt-2 text-sm leading-6 text-gray-500", children: "Configure how and when you receive notifications." })
818
+ ] }),
819
+ /* @__PURE__ */ jsx9("div", { className: "md:col-span-2", children: /* @__PURE__ */ jsxs8("form", { className: "space-y-4", children: [
820
+ /* @__PURE__ */ jsxs8("div", { className: "flex items-center justify-between", children: [
821
+ /* @__PURE__ */ jsxs8("div", { children: [
822
+ /* @__PURE__ */ jsx9("h3", { className: "text-sm font-medium text-gray-900 dark:text-gray-50", children: "Email notifications" }),
823
+ /* @__PURE__ */ jsx9("p", { className: "text-sm text-gray-500", children: "Receive email updates about your account." })
824
+ ] }),
825
+ /* @__PURE__ */ jsx9(
826
+ "button",
827
+ {
828
+ type: "button",
829
+ role: "switch",
830
+ "aria-checked": "true",
831
+ className: "relative inline-flex h-6 w-11 flex-shrink-0 cursor-pointer rounded-full border-2 border-transparent bg-blue-600 transition-colors duration-200 ease-in-out focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2",
832
+ children: /* @__PURE__ */ jsx9("span", { className: "translate-x-5 pointer-events-none inline-block h-5 w-5 transform rounded-full bg-white shadow ring-0 transition duration-200 ease-in-out" })
833
+ }
834
+ )
835
+ ] }),
836
+ /* @__PURE__ */ jsxs8("div", { className: "flex items-center justify-between", children: [
837
+ /* @__PURE__ */ jsxs8("div", { children: [
838
+ /* @__PURE__ */ jsx9("h3", { className: "text-sm font-medium text-gray-900 dark:text-gray-50", children: "Push notifications" }),
839
+ /* @__PURE__ */ jsx9("p", { className: "text-sm text-gray-500", children: "Receive push notifications on your devices." })
840
+ ] }),
841
+ /* @__PURE__ */ jsx9(
842
+ "button",
843
+ {
844
+ type: "button",
845
+ role: "switch",
846
+ "aria-checked": "false",
847
+ className: "relative inline-flex h-6 w-11 flex-shrink-0 cursor-pointer rounded-full border-2 border-transparent bg-gray-200 transition-colors duration-200 ease-in-out focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2 dark:bg-gray-700",
848
+ children: /* @__PURE__ */ jsx9("span", { className: "translate-x-0 pointer-events-none inline-block h-5 w-5 transform rounded-full bg-white shadow ring-0 transition duration-200 ease-in-out" })
849
+ }
850
+ )
851
+ ] })
852
+ ] }) })
853
+ ] })
854
+ }
855
+ );
856
+ }
857
+ function SecuritySection() {
858
+ return /* @__PURE__ */ jsx9(
859
+ "section",
860
+ {
861
+ "aria-labelledby": "security-heading",
862
+ role: "region",
863
+ "aria-label": "Security",
864
+ children: /* @__PURE__ */ jsxs8("div", { className: "grid grid-cols-1 gap-x-14 gap-y-8 md:grid-cols-3", children: [
865
+ /* @__PURE__ */ jsxs8("div", { children: [
866
+ /* @__PURE__ */ jsx9(
867
+ "h2",
868
+ {
869
+ id: "security-heading",
870
+ className: "scroll-mt-10 font-semibold text-gray-900 dark:text-gray-50",
871
+ children: "Security"
872
+ }
873
+ ),
874
+ /* @__PURE__ */ jsx9("p", { className: "mt-2 text-sm leading-6 text-gray-500", children: "Manage your password and security preferences." })
875
+ ] }),
876
+ /* @__PURE__ */ jsx9("div", { className: "md:col-span-2", children: /* @__PURE__ */ jsxs8("form", { className: "space-y-4", children: [
877
+ /* @__PURE__ */ jsxs8("div", { children: [
878
+ /* @__PURE__ */ jsx9(
879
+ "label",
880
+ {
881
+ htmlFor: "current-password",
882
+ className: "block text-sm font-medium text-gray-900 dark:text-gray-50",
883
+ children: "Current password"
884
+ }
885
+ ),
886
+ /* @__PURE__ */ jsx9(
887
+ "input",
888
+ {
889
+ type: "password",
890
+ id: "current-password",
891
+ name: "current-password",
892
+ placeholder: "Enter current password",
893
+ className: "mt-2 block w-full rounded-md border border-gray-300 px-3 py-2 text-sm shadow-sm focus:border-blue-500 focus:ring-blue-500 dark:border-gray-700 dark:bg-gray-900 dark:text-gray-50"
894
+ }
895
+ )
896
+ ] }),
897
+ /* @__PURE__ */ jsxs8("div", { children: [
898
+ /* @__PURE__ */ jsx9(
899
+ "label",
900
+ {
901
+ htmlFor: "new-password",
902
+ className: "block text-sm font-medium text-gray-900 dark:text-gray-50",
903
+ children: "New password"
904
+ }
905
+ ),
906
+ /* @__PURE__ */ jsx9(
907
+ "input",
908
+ {
909
+ type: "password",
910
+ id: "new-password",
911
+ name: "new-password",
912
+ placeholder: "Enter new password",
913
+ className: "mt-2 block w-full rounded-md border border-gray-300 px-3 py-2 text-sm shadow-sm focus:border-blue-500 focus:ring-blue-500 dark:border-gray-700 dark:bg-gray-900 dark:text-gray-50"
914
+ }
915
+ )
916
+ ] }),
917
+ /* @__PURE__ */ jsx9("div", { className: "flex justify-end", children: /* @__PURE__ */ jsx9(
918
+ "button",
919
+ {
920
+ type: "submit",
921
+ className: "rounded-md bg-blue-600 px-4 py-2 text-sm font-medium text-white shadow-sm hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2",
922
+ children: "Update password"
923
+ }
924
+ ) })
925
+ ] }) })
926
+ ] })
927
+ }
928
+ );
929
+ }
930
+ function AccountSection() {
931
+ return /* @__PURE__ */ jsx9(
932
+ "section",
933
+ {
934
+ "aria-labelledby": "account-heading",
935
+ role: "region",
936
+ "aria-label": "Account",
937
+ children: /* @__PURE__ */ jsxs8("div", { className: "grid grid-cols-1 gap-x-14 gap-y-8 md:grid-cols-3", children: [
938
+ /* @__PURE__ */ jsxs8("div", { children: [
939
+ /* @__PURE__ */ jsx9(
940
+ "h2",
941
+ {
942
+ id: "account-heading",
943
+ className: "scroll-mt-10 font-semibold text-gray-900 dark:text-gray-50",
944
+ children: "Account"
945
+ }
946
+ ),
947
+ /* @__PURE__ */ jsx9("p", { className: "mt-2 text-sm leading-6 text-gray-500", children: "Manage your account settings and preferences." })
948
+ ] }),
949
+ /* @__PURE__ */ jsx9("div", { className: "md:col-span-2", children: /* @__PURE__ */ jsxs8("div", { className: "space-y-6", children: [
950
+ /* @__PURE__ */ jsxs8("div", { className: "rounded-md border border-gray-200 p-4 dark:border-gray-700", children: [
951
+ /* @__PURE__ */ jsx9("h3", { className: "text-sm font-medium text-gray-900 dark:text-gray-50", children: "Export data" }),
952
+ /* @__PURE__ */ jsx9("p", { className: "mt-1 text-sm text-gray-500", children: "Download a copy of all your data." }),
953
+ /* @__PURE__ */ jsx9(
954
+ "button",
955
+ {
956
+ type: "button",
957
+ className: "mt-3 rounded-md border border-gray-300 bg-white px-4 py-2 text-sm font-medium text-gray-700 shadow-sm hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2 dark:border-gray-600 dark:bg-gray-800 dark:text-gray-200 dark:hover:bg-gray-700",
958
+ children: "Export data"
959
+ }
960
+ )
961
+ ] }),
962
+ /* @__PURE__ */ jsxs8("div", { className: "rounded-md border border-red-200 p-4 dark:border-red-900", children: [
963
+ /* @__PURE__ */ jsx9("h3", { className: "text-sm font-medium text-red-700 dark:text-red-400", children: "Delete account" }),
964
+ /* @__PURE__ */ jsx9("p", { className: "mt-1 text-sm text-gray-500", children: "Permanently delete your account and all associated data." }),
965
+ /* @__PURE__ */ jsx9(
966
+ "button",
967
+ {
968
+ type: "button",
969
+ className: "mt-3 rounded-md bg-red-600 px-4 py-2 text-sm font-medium text-white shadow-sm hover:bg-red-700 focus:outline-none focus:ring-2 focus:ring-red-500 focus:ring-offset-2",
970
+ children: "Delete account"
971
+ }
972
+ )
973
+ ] })
974
+ ] }) })
975
+ ] })
976
+ }
977
+ );
978
+ }
979
+ function Divider() {
980
+ return /* @__PURE__ */ jsx9("hr", { className: "my-10 border-gray-200 dark:border-gray-800" });
981
+ }
982
+ function Settings({
983
+ sections = DEFAULT_SECTIONS,
984
+ user,
985
+ children
986
+ }) {
987
+ const sectionComponents = {
988
+ profile: /* @__PURE__ */ jsx9(ProfileSection, { user }, "profile"),
989
+ notifications: /* @__PURE__ */ jsx9(NotificationsSection, {}, "notifications"),
990
+ security: /* @__PURE__ */ jsx9(SecuritySection, {}, "security"),
991
+ billing: null,
992
+ // Placeholder for future implementation
993
+ team: null,
994
+ // Placeholder for future implementation
995
+ api: null,
996
+ // Placeholder for future implementation
997
+ integrations: null
998
+ // Placeholder for future implementation
999
+ };
1000
+ const showAccount = sections?.length === void 0 || sections.length === DEFAULT_SECTIONS?.length;
1001
+ const activeSections = (sections || DEFAULT_SECTIONS || []).map((section) => sectionComponents[section]).filter((component) => component !== null);
1002
+ return /* @__PURE__ */ jsxs8("div", { className: "min-h-dvh bg-white p-4 sm:p-6 lg:rounded-lg lg:border lg:border-gray-200 dark:bg-gray-925 lg:dark:border-gray-900", children: [
1003
+ /* @__PURE__ */ jsx9("h1", { className: "text-lg font-semibold text-gray-900 dark:text-gray-50", children: "Settings" }),
1004
+ /* @__PURE__ */ jsxs8("div", { "data-testid": "settings-content", className: "mt-8 space-y-0", children: [
1005
+ activeSections.map((component, index) => /* @__PURE__ */ jsxs8("div", { children: [
1006
+ index > 0 && /* @__PURE__ */ jsx9(Divider, {}),
1007
+ component
1008
+ ] }, index)),
1009
+ showAccount && /* @__PURE__ */ jsxs8(Fragment3, { children: [
1010
+ activeSections.length > 0 && /* @__PURE__ */ jsx9(Divider, {}),
1011
+ /* @__PURE__ */ jsx9(AccountSection, {})
1012
+ ] })
1013
+ ] }),
1014
+ children
1015
+ ] });
1016
+ }
1017
+
1018
+ // src/dashboard/index.ts
1019
+ var components = {
1020
+ Shell,
1021
+ ShellSidebarLeft,
1022
+ ShellTopNav,
1023
+ Sidebar,
1024
+ Settings
1025
+ };
1026
+ var AppComponents = {
1027
+ /** Root application wrapper */
1028
+ App: DashboardApp,
1029
+ /** Flexible shell layout */
1030
+ Shell,
1031
+ /** Navigation sidebar */
1032
+ Sidebar,
1033
+ /** Header bar component */
1034
+ Header: DashboardHeader,
1035
+ /** Dashboard page layout */
1036
+ Dashboard: DashboardView,
1037
+ /** Settings page layout */
1038
+ Settings,
1039
+ /** Sidebar-left shell variant */
1040
+ ShellSidebarLeft,
1041
+ /** Top-nav shell variant */
1042
+ ShellTopNav
1043
+ };
1044
+ export {
1045
+ AppComponents,
1046
+ DashboardApp,
1047
+ DashboardHeader,
1048
+ DashboardView,
1049
+ MobileSidebar,
1050
+ Settings,
1051
+ Shell,
1052
+ ShellSidebarLeft,
1053
+ ShellTopNav,
1054
+ Sidebar,
1055
+ UserProfile,
1056
+ WorkspaceSwitcher,
1057
+ components,
1058
+ cx,
1059
+ focusInput,
1060
+ focusRing
1061
+ };
1062
+ //# sourceMappingURL=index.js.map