@prediktif/ui 0.1.8 → 0.1.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -60,160 +60,643 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
60
60
  // src/index.ts
61
61
  var index_exports = {};
62
62
  __export(index_exports, {
63
- HeaderTitle: () => HeaderTitle,
64
- NavUser: () => NavUser
63
+ AppSidebar: () => AppSidebar,
64
+ HeaderTitle: () => HeaderTitle
65
65
  });
66
66
  module.exports = __toCommonJS(index_exports);
67
67
 
68
- // src/components/composed/header-title.tsx
68
+ // src/components/composed/app-sidebar.tsx
69
+ var import_lucide_react5 = require("lucide-react");
70
+ var import_link = __toESM(require("next/link"));
71
+ var import_navigation = require("next/navigation");
69
72
  var import_react = require("react");
73
+
74
+ // src/components/ui/alert-dialog.tsx
75
+ var import_alert_dialog = require("@base-ui/react/alert-dialog");
76
+ var import_cn2 = require("cn");
77
+
78
+ // src/components/ui/button.tsx
79
+ var import_button = require("@base-ui/react/button");
80
+ var import_class_variance_authority = require("class-variance-authority");
81
+ var import_cn = require("cn");
70
82
  var import_jsx_runtime = require("react/jsx-runtime");
71
- var HeaderTitle = (0, import_react.memo)(function HeaderTitle2({
72
- title,
73
- subtitle,
74
- children
75
- }) {
76
- return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "w-full space-y-4", children: [
77
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { children: [
78
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("h1", { className: "font-semibold", children: title }),
79
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "text-xs text-muted-foreground", children: subtitle })
80
- ] }),
81
- children
83
+ var buttonVariants = (0, import_class_variance_authority.cva)(
84
+ "group/button inline-flex shrink-0 items-center justify-center rounded-md border border-transparent bg-clip-padding text-xs/relaxed font-medium whitespace-nowrap transition-all outline-none select-none focus-visible:border-ring focus-visible:ring-2 focus-visible:ring-ring/30 active:not-aria-[haspopup]:translate-y-px disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-2 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
85
+ {
86
+ variants: {
87
+ variant: {
88
+ default: "bg-primary text-primary-foreground hover:bg-primary/80",
89
+ outline: "border-border hover:bg-input/50 hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:bg-input/30",
90
+ secondary: "bg-secondary text-secondary-foreground hover:bg-[color-mix(in_oklch,var(--secondary),var(--foreground)_5%)] aria-expanded:bg-secondary aria-expanded:text-secondary-foreground",
91
+ ghost: "hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:hover:bg-muted/50",
92
+ destructive: "bg-destructive/10 text-destructive hover:bg-destructive/20 focus-visible:border-destructive/40 focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:hover:bg-destructive/30 dark:focus-visible:ring-destructive/40",
93
+ link: "text-primary underline-offset-4 hover:underline"
94
+ },
95
+ size: {
96
+ default: "h-7 gap-1 px-2 text-xs/relaxed has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3.5",
97
+ xs: "h-5 gap-1 rounded-sm px-2 text-[0.625rem] has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-2.5",
98
+ sm: "h-6 gap-1 px-2 text-xs/relaxed has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3",
99
+ lg: "h-8 gap-1 px-2.5 text-xs/relaxed has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2 [&_svg:not([class*='size-'])]:size-4",
100
+ icon: "size-7 [&_svg:not([class*='size-'])]:size-3.5",
101
+ "icon-xs": "size-5 rounded-sm [&_svg:not([class*='size-'])]:size-2.5",
102
+ "icon-sm": "size-6 [&_svg:not([class*='size-'])]:size-3",
103
+ "icon-lg": "size-8 [&_svg:not([class*='size-'])]:size-4"
104
+ }
105
+ },
106
+ defaultVariants: {
107
+ variant: "default",
108
+ size: "default"
109
+ }
110
+ }
111
+ );
112
+ function Button(_a) {
113
+ var _b = _a, {
114
+ className,
115
+ variant = "default",
116
+ size = "default"
117
+ } = _b, props = __objRest(_b, [
118
+ "className",
119
+ "variant",
120
+ "size"
121
+ ]);
122
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
123
+ import_button.Button,
124
+ __spreadValues({
125
+ "data-slot": "button",
126
+ className: (0, import_cn.cn)(buttonVariants({ variant, size, className }))
127
+ }, props)
128
+ );
129
+ }
130
+
131
+ // src/components/ui/alert-dialog.tsx
132
+ var import_jsx_runtime2 = require("react/jsx-runtime");
133
+ function AlertDialog(_a) {
134
+ var props = __objRest(_a, []);
135
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_alert_dialog.AlertDialog.Root, __spreadValues({ "data-slot": "alert-dialog" }, props));
136
+ }
137
+ function AlertDialogTrigger(_a) {
138
+ var props = __objRest(_a, []);
139
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_alert_dialog.AlertDialog.Trigger, __spreadValues({ "data-slot": "alert-dialog-trigger" }, props));
140
+ }
141
+ function AlertDialogPortal(_a) {
142
+ var props = __objRest(_a, []);
143
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_alert_dialog.AlertDialog.Portal, __spreadValues({ "data-slot": "alert-dialog-portal" }, props));
144
+ }
145
+ function AlertDialogOverlay(_a) {
146
+ var _b = _a, {
147
+ className
148
+ } = _b, props = __objRest(_b, [
149
+ "className"
150
+ ]);
151
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
152
+ import_alert_dialog.AlertDialog.Backdrop,
153
+ __spreadValues({
154
+ "data-slot": "alert-dialog-overlay",
155
+ className: (0, import_cn2.cn)(
156
+ "fixed inset-0 isolate z-50 bg-black/80 duration-100 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0",
157
+ className
158
+ )
159
+ }, props)
160
+ );
161
+ }
162
+ function AlertDialogContent(_a) {
163
+ var _b = _a, {
164
+ className,
165
+ size = "default"
166
+ } = _b, props = __objRest(_b, [
167
+ "className",
168
+ "size"
169
+ ]);
170
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(AlertDialogPortal, { children: [
171
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(AlertDialogOverlay, {}),
172
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
173
+ import_alert_dialog.AlertDialog.Popup,
174
+ __spreadValues({
175
+ "data-slot": "alert-dialog-content",
176
+ "data-size": size,
177
+ className: (0, import_cn2.cn)(
178
+ "group/alert-dialog-content fixed top-1/2 left-1/2 z-50 grid w-full -translate-x-1/2 -translate-y-1/2 gap-3 rounded-xl bg-popover p-4 text-popover-foreground ring-1 ring-foreground/10 duration-100 outline-none data-[size=default]:max-w-xs data-[size=sm]:max-w-64 data-[size=default]:sm:max-w-sm data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",
179
+ className
180
+ )
181
+ }, props)
182
+ )
82
183
  ] });
83
- });
184
+ }
185
+ function AlertDialogHeader(_a) {
186
+ var _b = _a, {
187
+ className
188
+ } = _b, props = __objRest(_b, [
189
+ "className"
190
+ ]);
191
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
192
+ "div",
193
+ __spreadValues({
194
+ "data-slot": "alert-dialog-header",
195
+ className: (0, import_cn2.cn)(
196
+ "grid grid-rows-[auto_1fr] place-items-center gap-1 text-center has-data-[slot=alert-dialog-media]:grid-rows-[auto_auto_1fr] has-data-[slot=alert-dialog-media]:gap-x-4 sm:group-data-[size=default]/alert-dialog-content:place-items-start sm:group-data-[size=default]/alert-dialog-content:text-left sm:group-data-[size=default]/alert-dialog-content:has-data-[slot=alert-dialog-media]:grid-rows-[auto_1fr]",
197
+ className
198
+ )
199
+ }, props)
200
+ );
201
+ }
202
+ function AlertDialogFooter(_a) {
203
+ var _b = _a, {
204
+ className
205
+ } = _b, props = __objRest(_b, [
206
+ "className"
207
+ ]);
208
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
209
+ "div",
210
+ __spreadValues({
211
+ "data-slot": "alert-dialog-footer",
212
+ className: (0, import_cn2.cn)(
213
+ "flex flex-col-reverse gap-2 group-data-[size=sm]/alert-dialog-content:grid group-data-[size=sm]/alert-dialog-content:grid-cols-2 sm:flex-row sm:justify-end",
214
+ className
215
+ )
216
+ }, props)
217
+ );
218
+ }
219
+ function AlertDialogTitle(_a) {
220
+ var _b = _a, {
221
+ className
222
+ } = _b, props = __objRest(_b, [
223
+ "className"
224
+ ]);
225
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
226
+ import_alert_dialog.AlertDialog.Title,
227
+ __spreadValues({
228
+ "data-slot": "alert-dialog-title",
229
+ className: (0, import_cn2.cn)(
230
+ "font-heading text-sm font-medium sm:group-data-[size=default]/alert-dialog-content:group-has-data-[slot=alert-dialog-media]/alert-dialog-content:col-start-2",
231
+ className
232
+ )
233
+ }, props)
234
+ );
235
+ }
236
+ function AlertDialogDescription(_a) {
237
+ var _b = _a, {
238
+ className
239
+ } = _b, props = __objRest(_b, [
240
+ "className"
241
+ ]);
242
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
243
+ import_alert_dialog.AlertDialog.Description,
244
+ __spreadValues({
245
+ "data-slot": "alert-dialog-description",
246
+ className: (0, import_cn2.cn)(
247
+ "text-xs/relaxed text-balance text-muted-foreground md:text-pretty *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground",
248
+ className
249
+ )
250
+ }, props)
251
+ );
252
+ }
253
+ function AlertDialogAction(_a) {
254
+ var _b = _a, {
255
+ className
256
+ } = _b, props = __objRest(_b, [
257
+ "className"
258
+ ]);
259
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
260
+ Button,
261
+ __spreadValues({
262
+ "data-slot": "alert-dialog-action",
263
+ className: (0, import_cn2.cn)(className)
264
+ }, props)
265
+ );
266
+ }
267
+ function AlertDialogCancel(_a) {
268
+ var _b = _a, {
269
+ className,
270
+ variant = "outline",
271
+ size = "default"
272
+ } = _b, props = __objRest(_b, [
273
+ "className",
274
+ "variant",
275
+ "size"
276
+ ]);
277
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
278
+ import_alert_dialog.AlertDialog.Close,
279
+ __spreadValues({
280
+ "data-slot": "alert-dialog-cancel",
281
+ className: (0, import_cn2.cn)(className),
282
+ render: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Button, { variant, size })
283
+ }, props)
284
+ );
285
+ }
286
+
287
+ // src/components/ui/avatar.tsx
288
+ var import_avatar = require("@base-ui/react/avatar");
289
+ var import_cn3 = require("cn");
290
+ var import_jsx_runtime3 = require("react/jsx-runtime");
291
+ function Avatar(_a) {
292
+ var _b = _a, {
293
+ className,
294
+ size = "default"
295
+ } = _b, props = __objRest(_b, [
296
+ "className",
297
+ "size"
298
+ ]);
299
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
300
+ import_avatar.Avatar.Root,
301
+ __spreadValues({
302
+ "data-slot": "avatar",
303
+ "data-size": size,
304
+ className: (0, import_cn3.cn)(
305
+ "group/avatar relative flex size-8 shrink-0 rounded-full select-none after:absolute after:inset-0 after:rounded-full after:border after:border-border after:mix-blend-darken data-[size=lg]:size-10 data-[size=sm]:size-6 dark:after:mix-blend-lighten",
306
+ className
307
+ )
308
+ }, props)
309
+ );
310
+ }
311
+ function AvatarImage(_a) {
312
+ var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
313
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
314
+ import_avatar.Avatar.Image,
315
+ __spreadValues({
316
+ "data-slot": "avatar-image",
317
+ className: (0, import_cn3.cn)(
318
+ "aspect-square size-full rounded-full object-cover",
319
+ className
320
+ )
321
+ }, props)
322
+ );
323
+ }
324
+ function AvatarFallback(_a) {
325
+ var _b = _a, {
326
+ className
327
+ } = _b, props = __objRest(_b, [
328
+ "className"
329
+ ]);
330
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
331
+ import_avatar.Avatar.Fallback,
332
+ __spreadValues({
333
+ "data-slot": "avatar-fallback",
334
+ className: (0, import_cn3.cn)(
335
+ "flex size-full items-center justify-center rounded-full bg-muted text-sm text-muted-foreground group-data-[size=sm]/avatar:text-xs",
336
+ className
337
+ )
338
+ }, props)
339
+ );
340
+ }
341
+
342
+ // src/components/ui/breadcrumb.tsx
343
+ var import_merge_props = require("@base-ui/react/merge-props");
344
+ var import_use_render = require("@base-ui/react/use-render");
345
+ var import_cn4 = require("cn");
346
+ var import_lucide_react = require("lucide-react");
347
+ var import_jsx_runtime4 = require("react/jsx-runtime");
348
+ function Breadcrumb(_a) {
349
+ var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
350
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
351
+ "nav",
352
+ __spreadValues({
353
+ "aria-label": "breadcrumb",
354
+ "data-slot": "breadcrumb",
355
+ className: (0, import_cn4.cn)(className)
356
+ }, props)
357
+ );
358
+ }
359
+ function BreadcrumbList(_a) {
360
+ var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
361
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
362
+ "ol",
363
+ __spreadValues({
364
+ "data-slot": "breadcrumb-list",
365
+ className: (0, import_cn4.cn)(
366
+ "flex flex-wrap items-center gap-1.5 text-xs/relaxed wrap-break-word text-muted-foreground",
367
+ className
368
+ )
369
+ }, props)
370
+ );
371
+ }
372
+ function BreadcrumbItem(_a) {
373
+ var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
374
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
375
+ "li",
376
+ __spreadValues({
377
+ "data-slot": "breadcrumb-item",
378
+ className: (0, import_cn4.cn)("inline-flex items-center gap-1", className)
379
+ }, props)
380
+ );
381
+ }
382
+ function BreadcrumbLink(_a) {
383
+ var _b = _a, {
384
+ className,
385
+ render
386
+ } = _b, props = __objRest(_b, [
387
+ "className",
388
+ "render"
389
+ ]);
390
+ return (0, import_use_render.useRender)({
391
+ defaultTagName: "a",
392
+ props: (0, import_merge_props.mergeProps)(
393
+ {
394
+ className: (0, import_cn4.cn)("transition-colors hover:text-foreground", className)
395
+ },
396
+ props
397
+ ),
398
+ render,
399
+ state: {
400
+ slot: "breadcrumb-link"
401
+ }
402
+ });
403
+ }
404
+ function BreadcrumbPage(_a) {
405
+ var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
406
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
407
+ "span",
408
+ __spreadValues({
409
+ "data-slot": "breadcrumb-page",
410
+ role: "link",
411
+ "aria-disabled": "true",
412
+ "aria-current": "page",
413
+ className: (0, import_cn4.cn)("font-normal text-foreground", className)
414
+ }, props)
415
+ );
416
+ }
417
+ function BreadcrumbSeparator(_a) {
418
+ var _b = _a, {
419
+ children,
420
+ className
421
+ } = _b, props = __objRest(_b, [
422
+ "children",
423
+ "className"
424
+ ]);
425
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
426
+ "li",
427
+ __spreadProps(__spreadValues({
428
+ "data-slot": "breadcrumb-separator",
429
+ role: "presentation",
430
+ "aria-hidden": "true",
431
+ className: (0, import_cn4.cn)("[&>svg]:size-3.5", className)
432
+ }, props), {
433
+ children: children != null ? children : /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_lucide_react.ChevronRightIcon, {})
434
+ })
435
+ );
436
+ }
437
+
438
+ // src/components/ui/dropdown-menu.tsx
439
+ var import_menu = require("@base-ui/react/menu");
440
+ var import_cn5 = require("cn");
441
+ var import_lucide_react2 = require("lucide-react");
442
+ var import_jsx_runtime5 = require("react/jsx-runtime");
443
+ function DropdownMenu(_a) {
444
+ var props = __objRest(_a, []);
445
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_menu.Menu.Root, __spreadValues({ "data-slot": "dropdown-menu" }, props));
446
+ }
447
+ function DropdownMenuTrigger(_a) {
448
+ var props = __objRest(_a, []);
449
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_menu.Menu.Trigger, __spreadValues({ "data-slot": "dropdown-menu-trigger" }, props));
450
+ }
451
+ function DropdownMenuContent(_a) {
452
+ var _b = _a, {
453
+ align = "start",
454
+ alignOffset = 0,
455
+ side = "bottom",
456
+ sideOffset = 4,
457
+ className
458
+ } = _b, props = __objRest(_b, [
459
+ "align",
460
+ "alignOffset",
461
+ "side",
462
+ "sideOffset",
463
+ "className"
464
+ ]);
465
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_menu.Menu.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
466
+ import_menu.Menu.Positioner,
467
+ {
468
+ className: "isolate z-50 outline-none",
469
+ align,
470
+ alignOffset,
471
+ side,
472
+ sideOffset,
473
+ children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
474
+ import_menu.Menu.Popup,
475
+ __spreadValues({
476
+ "data-slot": "dropdown-menu-content",
477
+ className: (0, import_cn5.cn)(
478
+ "z-50 max-h-(--available-height) w-(--anchor-width) min-w-32 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-popover p-1 text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 outline-none data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:overflow-hidden data-closed:fade-out-0 data-closed:zoom-out-95",
479
+ className
480
+ )
481
+ }, props)
482
+ )
483
+ }
484
+ ) });
485
+ }
486
+ function DropdownMenuGroup(_a) {
487
+ var props = __objRest(_a, []);
488
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_menu.Menu.Group, __spreadValues({ "data-slot": "dropdown-menu-group" }, props));
489
+ }
490
+ function DropdownMenuLabel(_a) {
491
+ var _b = _a, {
492
+ className,
493
+ inset
494
+ } = _b, props = __objRest(_b, [
495
+ "className",
496
+ "inset"
497
+ ]);
498
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
499
+ import_menu.Menu.GroupLabel,
500
+ __spreadValues({
501
+ "data-slot": "dropdown-menu-label",
502
+ "data-inset": inset,
503
+ className: (0, import_cn5.cn)(
504
+ "px-2 py-1.5 text-xs text-muted-foreground data-inset:pl-7.5",
505
+ className
506
+ )
507
+ }, props)
508
+ );
509
+ }
510
+ function DropdownMenuItem(_a) {
511
+ var _b = _a, {
512
+ className,
513
+ inset,
514
+ variant = "default"
515
+ } = _b, props = __objRest(_b, [
516
+ "className",
517
+ "inset",
518
+ "variant"
519
+ ]);
520
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
521
+ import_menu.Menu.Item,
522
+ __spreadValues({
523
+ "data-slot": "dropdown-menu-item",
524
+ "data-inset": inset,
525
+ "data-variant": variant,
526
+ className: (0, import_cn5.cn)(
527
+ "group/dropdown-menu-item relative flex min-h-7 cursor-default items-center gap-2 rounded-md px-2 py-1 text-xs/relaxed outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-inset:pl-7.5 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-3.5 data-[variant=destructive]:*:[svg]:text-destructive",
528
+ className
529
+ )
530
+ }, props)
531
+ );
532
+ }
533
+
534
+ // src/components/ui/separator.tsx
535
+ var import_separator = require("@base-ui/react/separator");
536
+ var import_cn6 = require("cn");
537
+ var import_jsx_runtime6 = require("react/jsx-runtime");
538
+ function Separator(_a) {
539
+ var _b = _a, {
540
+ className,
541
+ orientation = "horizontal"
542
+ } = _b, props = __objRest(_b, [
543
+ "className",
544
+ "orientation"
545
+ ]);
546
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
547
+ import_separator.Separator,
548
+ __spreadValues({
549
+ "data-slot": "separator",
550
+ orientation,
551
+ className: (0, import_cn6.cn)(
552
+ "shrink-0 bg-border data-horizontal:h-px data-horizontal:w-full data-vertical:w-px data-vertical:self-stretch",
553
+ className
554
+ )
555
+ }, props)
556
+ );
557
+ }
558
+
559
+ // src/components/ui/sidebar.tsx
560
+ var import_merge_props2 = require("@base-ui/react/merge-props");
561
+ var import_use_render2 = require("@base-ui/react/use-render");
562
+ var import_class_variance_authority2 = require("class-variance-authority");
563
+ var import_cn11 = require("cn");
564
+ var import_lucide_react4 = require("lucide-react");
565
+ var React2 = __toESM(require("react"));
84
566
 
85
- // src/components/composed/nav-user.tsx
86
- var import_react2 = require("react");
567
+ // src/components/ui/input.tsx
568
+ var import_input = require("@base-ui/react/input");
569
+ var import_cn7 = require("cn");
570
+ var import_jsx_runtime7 = require("react/jsx-runtime");
87
571
 
88
- // src/components/ui/avatar.tsx
89
- var import_avatar = require("@base-ui/react/avatar");
90
- var import_cn = require("cn");
91
- var import_jsx_runtime2 = require("react/jsx-runtime");
92
- function Avatar(_a) {
572
+ // src/components/ui/sheet.tsx
573
+ var import_dialog = require("@base-ui/react/dialog");
574
+ var import_cn8 = require("cn");
575
+ var import_lucide_react3 = require("lucide-react");
576
+ var import_jsx_runtime8 = require("react/jsx-runtime");
577
+ function Sheet(_a) {
578
+ var props = __objRest(_a, []);
579
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_dialog.Dialog.Root, __spreadValues({ "data-slot": "sheet" }, props));
580
+ }
581
+ function SheetPortal(_a) {
582
+ var props = __objRest(_a, []);
583
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_dialog.Dialog.Portal, __spreadValues({ "data-slot": "sheet-portal" }, props));
584
+ }
585
+ function SheetOverlay(_a) {
586
+ var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
587
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
588
+ import_dialog.Dialog.Backdrop,
589
+ __spreadValues({
590
+ "data-slot": "sheet-overlay",
591
+ className: (0, import_cn8.cn)(
592
+ "fixed inset-0 z-50 bg-black/80 transition-opacity duration-150 data-ending-style:opacity-0 data-starting-style:opacity-0 supports-backdrop-filter:backdrop-blur-xs",
593
+ className
594
+ )
595
+ }, props)
596
+ );
597
+ }
598
+ function SheetContent(_a) {
93
599
  var _b = _a, {
94
600
  className,
95
- size = "default"
601
+ children,
602
+ side = "right",
603
+ showCloseButton = true
96
604
  } = _b, props = __objRest(_b, [
97
605
  "className",
98
- "size"
606
+ "children",
607
+ "side",
608
+ "showCloseButton"
99
609
  ]);
100
- return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
101
- import_avatar.Avatar.Root,
610
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(SheetPortal, { children: [
611
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(SheetOverlay, {}),
612
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
613
+ import_dialog.Dialog.Popup,
614
+ __spreadProps(__spreadValues({
615
+ "data-slot": "sheet-content",
616
+ "data-side": side,
617
+ className: (0, import_cn8.cn)(
618
+ "fixed z-50 flex flex-col bg-popover bg-clip-padding text-xs/relaxed text-popover-foreground shadow-lg transition duration-200 ease-in-out data-ending-style:opacity-0 data-starting-style:opacity-0 data-[side=bottom]:inset-x-0 data-[side=bottom]:bottom-0 data-[side=bottom]:h-auto data-[side=bottom]:border-t data-[side=bottom]:data-ending-style:translate-y-[2.5rem] data-[side=bottom]:data-starting-style:translate-y-[2.5rem] data-[side=left]:inset-y-0 data-[side=left]:left-0 data-[side=left]:h-full data-[side=left]:w-3/4 data-[side=left]:border-r data-[side=left]:data-ending-style:translate-x-[-2.5rem] data-[side=left]:data-starting-style:translate-x-[-2.5rem] data-[side=right]:inset-y-0 data-[side=right]:right-0 data-[side=right]:h-full data-[side=right]:w-3/4 data-[side=right]:border-l data-[side=right]:data-ending-style:translate-x-[2.5rem] data-[side=right]:data-starting-style:translate-x-[2.5rem] data-[side=top]:inset-x-0 data-[side=top]:top-0 data-[side=top]:h-auto data-[side=top]:border-b data-[side=top]:data-ending-style:translate-y-[-2.5rem] data-[side=top]:data-starting-style:translate-y-[-2.5rem] data-[side=left]:sm:max-w-sm data-[side=right]:sm:max-w-sm",
619
+ className
620
+ )
621
+ }, props), {
622
+ children: [
623
+ children,
624
+ showCloseButton && /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
625
+ import_dialog.Dialog.Close,
626
+ {
627
+ "data-slot": "sheet-close",
628
+ render: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
629
+ Button,
630
+ {
631
+ variant: "ghost",
632
+ className: "absolute top-4 right-4",
633
+ size: "icon-sm"
634
+ }
635
+ ),
636
+ children: [
637
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_lucide_react3.XIcon, {}),
638
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: "sr-only", children: "Close" })
639
+ ]
640
+ }
641
+ )
642
+ ]
643
+ })
644
+ )
645
+ ] });
646
+ }
647
+ function SheetHeader(_a) {
648
+ var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
649
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
650
+ "div",
102
651
  __spreadValues({
103
- "data-slot": "avatar",
104
- "data-size": size,
105
- className: (0, import_cn.cn)(
106
- "group/avatar relative flex size-8 shrink-0 rounded-full select-none after:absolute after:inset-0 after:rounded-full after:border after:border-border after:mix-blend-darken data-[size=lg]:size-10 data-[size=sm]:size-6 dark:after:mix-blend-lighten",
107
- className
108
- )
652
+ "data-slot": "sheet-header",
653
+ className: (0, import_cn8.cn)("flex flex-col gap-1.5 p-6", className)
109
654
  }, props)
110
655
  );
111
656
  }
112
- function AvatarImage(_a) {
657
+ function SheetTitle(_a) {
113
658
  var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
114
- return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
115
- import_avatar.Avatar.Image,
659
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
660
+ import_dialog.Dialog.Title,
116
661
  __spreadValues({
117
- "data-slot": "avatar-image",
118
- className: (0, import_cn.cn)(
119
- "aspect-square size-full rounded-full object-cover",
662
+ "data-slot": "sheet-title",
663
+ className: (0, import_cn8.cn)(
664
+ "font-heading text-sm font-medium text-foreground",
120
665
  className
121
666
  )
122
667
  }, props)
123
668
  );
124
669
  }
125
- function AvatarFallback(_a) {
670
+ function SheetDescription(_a) {
126
671
  var _b = _a, {
127
672
  className
128
673
  } = _b, props = __objRest(_b, [
129
674
  "className"
130
675
  ]);
131
- return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
132
- import_avatar.Avatar.Fallback,
676
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
677
+ import_dialog.Dialog.Description,
133
678
  __spreadValues({
134
- "data-slot": "avatar-fallback",
135
- className: (0, import_cn.cn)(
136
- "flex size-full items-center justify-center rounded-full bg-muted text-sm text-muted-foreground group-data-[size=sm]/avatar:text-xs",
137
- className
138
- )
679
+ "data-slot": "sheet-description",
680
+ className: (0, import_cn8.cn)("text-xs/relaxed text-muted-foreground", className)
139
681
  }, props)
140
682
  );
141
683
  }
142
684
 
143
- // src/components/ui/sidebar.tsx
144
- var import_merge_props = require("@base-ui/react/merge-props");
145
- var import_use_render = require("@base-ui/react/use-render");
146
- var import_class_variance_authority2 = require("class-variance-authority");
147
- var import_cn8 = require("cn");
148
- var import_lucide_react2 = require("lucide-react");
149
- var React2 = __toESM(require("react"));
150
-
151
- // src/components/ui/button.tsx
152
- var import_button = require("@base-ui/react/button");
153
- var import_class_variance_authority = require("class-variance-authority");
154
- var import_cn2 = require("cn");
155
- var import_jsx_runtime3 = require("react/jsx-runtime");
156
- var buttonVariants = (0, import_class_variance_authority.cva)(
157
- "group/button inline-flex shrink-0 items-center justify-center rounded-md border border-transparent bg-clip-padding text-xs/relaxed font-medium whitespace-nowrap transition-all outline-none select-none focus-visible:border-ring focus-visible:ring-2 focus-visible:ring-ring/30 active:not-aria-[haspopup]:translate-y-px disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-2 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
158
- {
159
- variants: {
160
- variant: {
161
- default: "bg-primary text-primary-foreground hover:bg-primary/80",
162
- outline: "border-border hover:bg-input/50 hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:bg-input/30",
163
- secondary: "bg-secondary text-secondary-foreground hover:bg-[color-mix(in_oklch,var(--secondary),var(--foreground)_5%)] aria-expanded:bg-secondary aria-expanded:text-secondary-foreground",
164
- ghost: "hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:hover:bg-muted/50",
165
- destructive: "bg-destructive/10 text-destructive hover:bg-destructive/20 focus-visible:border-destructive/40 focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:hover:bg-destructive/30 dark:focus-visible:ring-destructive/40",
166
- link: "text-primary underline-offset-4 hover:underline"
167
- },
168
- size: {
169
- default: "h-7 gap-1 px-2 text-xs/relaxed has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3.5",
170
- xs: "h-5 gap-1 rounded-sm px-2 text-[0.625rem] has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-2.5",
171
- sm: "h-6 gap-1 px-2 text-xs/relaxed has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3",
172
- lg: "h-8 gap-1 px-2.5 text-xs/relaxed has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2 [&_svg:not([class*='size-'])]:size-4",
173
- icon: "size-7 [&_svg:not([class*='size-'])]:size-3.5",
174
- "icon-xs": "size-5 rounded-sm [&_svg:not([class*='size-'])]:size-2.5",
175
- "icon-sm": "size-6 [&_svg:not([class*='size-'])]:size-3",
176
- "icon-lg": "size-8 [&_svg:not([class*='size-'])]:size-4"
177
- }
178
- },
179
- defaultVariants: {
180
- variant: "default",
181
- size: "default"
182
- }
183
- }
184
- );
185
-
186
- // src/components/ui/input.tsx
187
- var import_input = require("@base-ui/react/input");
188
- var import_cn3 = require("cn");
189
- var import_jsx_runtime4 = require("react/jsx-runtime");
190
-
191
- // src/components/ui/separator.tsx
192
- var import_separator = require("@base-ui/react/separator");
193
- var import_cn4 = require("cn");
194
- var import_jsx_runtime5 = require("react/jsx-runtime");
195
-
196
- // src/components/ui/sheet.tsx
197
- var import_dialog = require("@base-ui/react/dialog");
198
- var import_cn5 = require("cn");
199
- var import_lucide_react = require("lucide-react");
200
- var import_jsx_runtime6 = require("react/jsx-runtime");
201
-
202
685
  // src/components/ui/skeleton.tsx
203
- var import_cn6 = require("cn");
204
- var import_jsx_runtime7 = require("react/jsx-runtime");
686
+ var import_cn9 = require("cn");
687
+ var import_jsx_runtime9 = require("react/jsx-runtime");
205
688
 
206
689
  // src/components/ui/tooltip.tsx
207
690
  var import_tooltip = require("@base-ui/react/tooltip");
208
- var import_cn7 = require("cn");
209
- var import_jsx_runtime8 = require("react/jsx-runtime");
691
+ var import_cn10 = require("cn");
692
+ var import_jsx_runtime10 = require("react/jsx-runtime");
210
693
  function Tooltip(_a) {
211
694
  var props = __objRest(_a, []);
212
- return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_tooltip.Tooltip.Root, __spreadValues({ "data-slot": "tooltip" }, props));
695
+ return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_tooltip.Tooltip.Root, __spreadValues({ "data-slot": "tooltip" }, props));
213
696
  }
214
697
  function TooltipTrigger(_a) {
215
698
  var props = __objRest(_a, []);
216
- return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_tooltip.Tooltip.Trigger, __spreadValues({ "data-slot": "tooltip-trigger" }, props));
699
+ return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_tooltip.Tooltip.Trigger, __spreadValues({ "data-slot": "tooltip-trigger" }, props));
217
700
  }
218
701
  function TooltipContent(_a) {
219
702
  var _b = _a, {
@@ -231,7 +714,7 @@ function TooltipContent(_a) {
231
714
  "alignOffset",
232
715
  "children"
233
716
  ]);
234
- return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_tooltip.Tooltip.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
717
+ return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_tooltip.Tooltip.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
235
718
  import_tooltip.Tooltip.Positioner,
236
719
  {
237
720
  align,
@@ -239,18 +722,18 @@ function TooltipContent(_a) {
239
722
  side,
240
723
  sideOffset,
241
724
  className: "isolate z-50",
242
- children: /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
725
+ children: /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
243
726
  import_tooltip.Tooltip.Popup,
244
727
  __spreadProps(__spreadValues({
245
728
  "data-slot": "tooltip-content",
246
- className: (0, import_cn7.cn)(
729
+ className: (0, import_cn10.cn)(
247
730
  "z-50 inline-flex w-fit max-w-xs origin-(--transform-origin) items-center gap-1.5 rounded-md bg-foreground px-3 py-1.5 text-xs text-background has-data-[slot=kbd]:pr-1.5 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 **:data-[slot=kbd]:relative **:data-[slot=kbd]:isolate **:data-[slot=kbd]:z-50 **:data-[slot=kbd]:rounded-sm data-[state=delayed-open]:animate-in data-[state=delayed-open]:fade-in-0 data-[state=delayed-open]:zoom-in-95 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",
248
731
  className
249
732
  )
250
733
  }, props), {
251
734
  children: [
252
735
  children,
253
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_tooltip.Tooltip.Arrow, { className: "z-50 size-2.5 translate-y-[calc(-50%-2px)] rotate-45 rounded-[2px] bg-foreground fill-foreground data-[side=bottom]:top-1 data-[side=inline-end]:top-1/2! data-[side=inline-end]:-left-1 data-[side=inline-end]:-translate-y-1/2 data-[side=inline-start]:top-1/2! data-[side=inline-start]:-right-1 data-[side=inline-start]:-translate-y-1/2 data-[side=left]:top-1/2! data-[side=left]:-right-1 data-[side=left]:-translate-y-1/2 data-[side=right]:top-1/2! data-[side=right]:-left-1 data-[side=right]:-translate-y-1/2 data-[side=top]:-bottom-2.5" })
736
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_tooltip.Tooltip.Arrow, { className: "z-50 size-2.5 translate-y-[calc(-50%-2px)] rotate-45 rounded-[2px] bg-foreground fill-foreground data-[side=bottom]:top-1 data-[side=inline-end]:top-1/2! data-[side=inline-end]:-left-1 data-[side=inline-end]:-translate-y-1/2 data-[side=inline-start]:top-1/2! data-[side=inline-start]:-right-1 data-[side=inline-start]:-translate-y-1/2 data-[side=left]:top-1/2! data-[side=left]:-right-1 data-[side=left]:-translate-y-1/2 data-[side=right]:top-1/2! data-[side=right]:-left-1 data-[side=right]:-translate-y-1/2 data-[side=top]:-bottom-2.5" })
254
737
  ]
255
738
  })
256
739
  )
@@ -260,10 +743,31 @@ function TooltipContent(_a) {
260
743
 
261
744
  // src/hooks/use-mobile.ts
262
745
  var React = __toESM(require("react"));
746
+ var MOBILE_BREAKPOINT = 768;
747
+ function useIsMobile() {
748
+ const [isMobile, setIsMobile] = React.useState(
749
+ void 0
750
+ );
751
+ React.useEffect(() => {
752
+ const mql = window.matchMedia(`(max-width: ${MOBILE_BREAKPOINT - 1}px)`);
753
+ const onChange = () => {
754
+ setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);
755
+ };
756
+ mql.addEventListener("change", onChange);
757
+ setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);
758
+ return () => mql.removeEventListener("change", onChange);
759
+ }, []);
760
+ return !!isMobile;
761
+ }
263
762
 
264
763
  // src/components/ui/sidebar.tsx
265
- var import_jsx_runtime9 = require("react/jsx-runtime");
764
+ var import_jsx_runtime11 = require("react/jsx-runtime");
765
+ var SIDEBAR_COOKIE_NAME = "sidebar_state";
266
766
  var SIDEBAR_COOKIE_MAX_AGE = 60 * 60 * 24 * 7;
767
+ var SIDEBAR_WIDTH = "16rem";
768
+ var SIDEBAR_WIDTH_MOBILE = "18rem";
769
+ var SIDEBAR_WIDTH_ICON = "3rem";
770
+ var SIDEBAR_KEYBOARD_SHORTCUT = "b";
267
771
  var SidebarContext = React2.createContext(null);
268
772
  function useSidebar() {
269
773
  const context = React2.useContext(SidebarContext);
@@ -272,36 +776,360 @@ function useSidebar() {
272
776
  }
273
777
  return context;
274
778
  }
779
+ function SidebarProvider(_a) {
780
+ var _b = _a, {
781
+ defaultOpen = true,
782
+ open: openProp,
783
+ onOpenChange: setOpenProp,
784
+ className,
785
+ style,
786
+ children
787
+ } = _b, props = __objRest(_b, [
788
+ "defaultOpen",
789
+ "open",
790
+ "onOpenChange",
791
+ "className",
792
+ "style",
793
+ "children"
794
+ ]);
795
+ const isMobile = useIsMobile();
796
+ const [openMobile, setOpenMobile] = React2.useState(false);
797
+ const [_open, _setOpen] = React2.useState(defaultOpen);
798
+ const open = openProp != null ? openProp : _open;
799
+ const setOpen = React2.useCallback(
800
+ (value) => {
801
+ const openState = typeof value === "function" ? value(open) : value;
802
+ if (setOpenProp) {
803
+ setOpenProp(openState);
804
+ } else {
805
+ _setOpen(openState);
806
+ }
807
+ document.cookie = `${SIDEBAR_COOKIE_NAME}=${openState}; path=/; max-age=${SIDEBAR_COOKIE_MAX_AGE}`;
808
+ },
809
+ [setOpenProp, open]
810
+ );
811
+ const toggleSidebar = React2.useCallback(() => {
812
+ return isMobile ? setOpenMobile((open2) => !open2) : setOpen((open2) => !open2);
813
+ }, [isMobile, setOpen]);
814
+ React2.useEffect(() => {
815
+ const handleKeyDown = (event) => {
816
+ if (event.key === SIDEBAR_KEYBOARD_SHORTCUT && (event.metaKey || event.ctrlKey)) {
817
+ event.preventDefault();
818
+ toggleSidebar();
819
+ }
820
+ };
821
+ window.addEventListener("keydown", handleKeyDown);
822
+ return () => window.removeEventListener("keydown", handleKeyDown);
823
+ }, [toggleSidebar]);
824
+ const state = open ? "expanded" : "collapsed";
825
+ const contextValue = React2.useMemo(
826
+ () => ({
827
+ state,
828
+ open,
829
+ setOpen,
830
+ isMobile,
831
+ openMobile,
832
+ setOpenMobile,
833
+ toggleSidebar
834
+ }),
835
+ [state, open, setOpen, isMobile, openMobile, toggleSidebar]
836
+ );
837
+ return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(SidebarContext.Provider, { value: contextValue, children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
838
+ "div",
839
+ __spreadProps(__spreadValues({
840
+ "data-slot": "sidebar-wrapper",
841
+ style: __spreadValues({
842
+ "--sidebar-width": SIDEBAR_WIDTH,
843
+ "--sidebar-width-icon": SIDEBAR_WIDTH_ICON
844
+ }, style),
845
+ className: (0, import_cn11.cn)(
846
+ "group/sidebar-wrapper flex min-h-svh w-full has-data-[variant=inset]:bg-sidebar",
847
+ className
848
+ )
849
+ }, props), {
850
+ children
851
+ })
852
+ ) });
853
+ }
854
+ function Sidebar(_a) {
855
+ var _b = _a, {
856
+ side = "left",
857
+ variant = "sidebar",
858
+ collapsible = "offcanvas",
859
+ className,
860
+ children,
861
+ dir
862
+ } = _b, props = __objRest(_b, [
863
+ "side",
864
+ "variant",
865
+ "collapsible",
866
+ "className",
867
+ "children",
868
+ "dir"
869
+ ]);
870
+ const { isMobile, state, openMobile, setOpenMobile } = useSidebar();
871
+ if (collapsible === "none") {
872
+ return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
873
+ "div",
874
+ __spreadProps(__spreadValues({
875
+ "data-slot": "sidebar",
876
+ className: (0, import_cn11.cn)(
877
+ "flex h-full w-(--sidebar-width) flex-col bg-sidebar text-sidebar-foreground",
878
+ className
879
+ )
880
+ }, props), {
881
+ children
882
+ })
883
+ );
884
+ }
885
+ if (isMobile) {
886
+ return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Sheet, __spreadProps(__spreadValues({ open: openMobile, onOpenChange: setOpenMobile }, props), { children: /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
887
+ SheetContent,
888
+ {
889
+ dir,
890
+ "data-sidebar": "sidebar",
891
+ "data-slot": "sidebar",
892
+ "data-mobile": "true",
893
+ className: "w-(--sidebar-width) bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden",
894
+ style: {
895
+ "--sidebar-width": SIDEBAR_WIDTH_MOBILE
896
+ },
897
+ side,
898
+ children: [
899
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(SheetHeader, { className: "sr-only", children: [
900
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(SheetTitle, { children: "Sidebar" }),
901
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(SheetDescription, { children: "Displays the mobile sidebar." })
902
+ ] }),
903
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "flex h-full w-full flex-col", children })
904
+ ]
905
+ }
906
+ ) }));
907
+ }
908
+ return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
909
+ "div",
910
+ {
911
+ className: "group peer hidden text-sidebar-foreground md:block",
912
+ "data-state": state,
913
+ "data-collapsible": state === "collapsed" ? collapsible : "",
914
+ "data-variant": variant,
915
+ "data-side": side,
916
+ "data-slot": "sidebar",
917
+ children: [
918
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
919
+ "div",
920
+ {
921
+ "data-slot": "sidebar-gap",
922
+ className: (0, import_cn11.cn)(
923
+ "relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear",
924
+ "group-data-[collapsible=offcanvas]:w-0",
925
+ "group-data-[side=right]:rotate-180",
926
+ variant === "floating" || variant === "inset" ? "group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]" : "group-data-[collapsible=icon]:w-(--sidebar-width-icon)"
927
+ )
928
+ }
929
+ ),
930
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
931
+ "div",
932
+ __spreadProps(__spreadValues({
933
+ "data-slot": "sidebar-container",
934
+ "data-side": side,
935
+ className: (0, import_cn11.cn)(
936
+ "fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear data-[side=left]:left-0 data-[side=left]:group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)] data-[side=right]:right-0 data-[side=right]:group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)] md:flex",
937
+ // Adjust the padding for floating and inset variants.
938
+ variant === "floating" || variant === "inset" ? "p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]" : "group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l",
939
+ className
940
+ )
941
+ }, props), {
942
+ children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
943
+ "div",
944
+ {
945
+ "data-sidebar": "sidebar",
946
+ "data-slot": "sidebar-inner",
947
+ className: "flex size-full flex-col bg-sidebar group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:shadow-sm group-data-[variant=floating]:ring-1 group-data-[variant=floating]:ring-sidebar-border",
948
+ children
949
+ }
950
+ )
951
+ })
952
+ )
953
+ ]
954
+ }
955
+ );
956
+ }
957
+ function SidebarTrigger(_a) {
958
+ var _b = _a, {
959
+ className,
960
+ onClick
961
+ } = _b, props = __objRest(_b, [
962
+ "className",
963
+ "onClick"
964
+ ]);
965
+ const { toggleSidebar } = useSidebar();
966
+ return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
967
+ Button,
968
+ __spreadProps(__spreadValues({
969
+ "data-sidebar": "trigger",
970
+ "data-slot": "sidebar-trigger",
971
+ variant: "ghost",
972
+ size: "icon-sm",
973
+ className: (0, import_cn11.cn)(className),
974
+ onClick: (event) => {
975
+ onClick == null ? void 0 : onClick(event);
976
+ toggleSidebar();
977
+ }
978
+ }, props), {
979
+ children: [
980
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_lucide_react4.PanelLeftIcon, {}),
981
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: "sr-only", children: "Toggle Sidebar" })
982
+ ]
983
+ })
984
+ );
985
+ }
986
+ function SidebarRail(_a) {
987
+ var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
988
+ const { toggleSidebar } = useSidebar();
989
+ return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
990
+ "button",
991
+ __spreadValues({
992
+ "data-sidebar": "rail",
993
+ "data-slot": "sidebar-rail",
994
+ "aria-label": "Toggle Sidebar",
995
+ tabIndex: -1,
996
+ onClick: toggleSidebar,
997
+ title: "Toggle Sidebar",
998
+ className: (0, import_cn11.cn)(
999
+ "absolute inset-y-0 z-20 hidden w-4 transition-all ease-linear group-data-[side=left]:-right-4 group-data-[side=right]:left-0 after:absolute after:inset-y-0 after:start-1/2 after:w-[2px] hover:after:bg-sidebar-border sm:flex ltr:-translate-x-1/2 rtl:-translate-x-1/2",
1000
+ "in-data-[side=left]:cursor-w-resize in-data-[side=right]:cursor-e-resize",
1001
+ "[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize",
1002
+ "group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full hover:group-data-[collapsible=offcanvas]:bg-sidebar",
1003
+ "[[data-side=left][data-collapsible=offcanvas]_&]:-right-2",
1004
+ "[[data-side=right][data-collapsible=offcanvas]_&]:-left-2",
1005
+ className
1006
+ )
1007
+ }, props)
1008
+ );
1009
+ }
1010
+ function SidebarInset(_a) {
1011
+ var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
1012
+ return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
1013
+ "main",
1014
+ __spreadValues({
1015
+ "data-slot": "sidebar-inset",
1016
+ className: (0, import_cn11.cn)(
1017
+ "relative flex w-full flex-1 flex-col bg-background md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2",
1018
+ className
1019
+ )
1020
+ }, props)
1021
+ );
1022
+ }
1023
+ function SidebarHeader(_a) {
1024
+ var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
1025
+ return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
1026
+ "div",
1027
+ __spreadValues({
1028
+ "data-slot": "sidebar-header",
1029
+ "data-sidebar": "header",
1030
+ className: (0, import_cn11.cn)("flex flex-col gap-2 p-2", className)
1031
+ }, props)
1032
+ );
1033
+ }
275
1034
  function SidebarFooter(_a) {
276
1035
  var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
277
- return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
1036
+ return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
278
1037
  "div",
279
1038
  __spreadValues({
280
1039
  "data-slot": "sidebar-footer",
281
1040
  "data-sidebar": "footer",
282
- className: (0, import_cn8.cn)("flex flex-col gap-2 p-2", className)
1041
+ className: (0, import_cn11.cn)("flex flex-col gap-2 p-2", className)
1042
+ }, props)
1043
+ );
1044
+ }
1045
+ function SidebarContent(_a) {
1046
+ var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
1047
+ return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
1048
+ "div",
1049
+ __spreadValues({
1050
+ "data-slot": "sidebar-content",
1051
+ "data-sidebar": "content",
1052
+ className: (0, import_cn11.cn)(
1053
+ "no-scrollbar flex min-h-0 flex-1 flex-col gap-0 overflow-auto group-data-[collapsible=icon]:overflow-hidden",
1054
+ className
1055
+ )
1056
+ }, props)
1057
+ );
1058
+ }
1059
+ function SidebarGroup(_a) {
1060
+ var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
1061
+ return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
1062
+ "div",
1063
+ __spreadValues({
1064
+ "data-slot": "sidebar-group",
1065
+ "data-sidebar": "group",
1066
+ className: (0, import_cn11.cn)(
1067
+ "relative flex w-full min-w-0 flex-col px-2 py-1",
1068
+ className
1069
+ )
1070
+ }, props)
1071
+ );
1072
+ }
1073
+ function SidebarGroupLabel(_a) {
1074
+ var _b = _a, {
1075
+ className,
1076
+ render
1077
+ } = _b, props = __objRest(_b, [
1078
+ "className",
1079
+ "render"
1080
+ ]);
1081
+ return (0, import_use_render2.useRender)({
1082
+ defaultTagName: "div",
1083
+ props: (0, import_merge_props2.mergeProps)(
1084
+ {
1085
+ className: (0, import_cn11.cn)(
1086
+ "flex h-8 shrink-0 items-center rounded-md px-2 text-xs text-sidebar-foreground/70 ring-sidebar-ring outline-hidden transition-[margin,opacity] duration-200 ease-linear group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0 focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0",
1087
+ className
1088
+ )
1089
+ },
1090
+ props
1091
+ ),
1092
+ render,
1093
+ state: {
1094
+ slot: "sidebar-group-label",
1095
+ sidebar: "group-label"
1096
+ }
1097
+ });
1098
+ }
1099
+ function SidebarGroupContent(_a) {
1100
+ var _b = _a, {
1101
+ className
1102
+ } = _b, props = __objRest(_b, [
1103
+ "className"
1104
+ ]);
1105
+ return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
1106
+ "div",
1107
+ __spreadValues({
1108
+ "data-slot": "sidebar-group-content",
1109
+ "data-sidebar": "group-content",
1110
+ className: (0, import_cn11.cn)("w-full text-xs", className)
283
1111
  }, props)
284
1112
  );
285
1113
  }
286
1114
  function SidebarMenu(_a) {
287
1115
  var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
288
- return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
1116
+ return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
289
1117
  "ul",
290
1118
  __spreadValues({
291
1119
  "data-slot": "sidebar-menu",
292
1120
  "data-sidebar": "menu",
293
- className: (0, import_cn8.cn)("flex w-full min-w-0 flex-col gap-px", className)
1121
+ className: (0, import_cn11.cn)("flex w-full min-w-0 flex-col gap-px", className)
294
1122
  }, props)
295
1123
  );
296
1124
  }
297
1125
  function SidebarMenuItem(_a) {
298
1126
  var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
299
- return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
1127
+ return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
300
1128
  "li",
301
1129
  __spreadValues({
302
1130
  "data-slot": "sidebar-menu-item",
303
1131
  "data-sidebar": "menu-item",
304
- className: (0, import_cn8.cn)("group/menu-item relative", className)
1132
+ className: (0, import_cn11.cn)("group/menu-item relative", className)
305
1133
  }, props)
306
1134
  );
307
1135
  }
@@ -342,15 +1170,15 @@ function SidebarMenuButton(_a) {
342
1170
  "className"
343
1171
  ]);
344
1172
  const { isMobile, state } = useSidebar();
345
- const comp = (0, import_use_render.useRender)({
1173
+ const comp = (0, import_use_render2.useRender)({
346
1174
  defaultTagName: "button",
347
- props: (0, import_merge_props.mergeProps)(
1175
+ props: (0, import_merge_props2.mergeProps)(
348
1176
  {
349
- className: (0, import_cn8.cn)(sidebarMenuButtonVariants({ variant, size }), className)
1177
+ className: (0, import_cn11.cn)(sidebarMenuButtonVariants({ variant, size }), className)
350
1178
  },
351
1179
  props
352
1180
  ),
353
- render: !tooltip ? render : /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(TooltipTrigger, { render }),
1181
+ render: !tooltip ? render : /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(TooltipTrigger, { render }),
354
1182
  state: {
355
1183
  slot: "sidebar-menu-button",
356
1184
  sidebar: "menu-button",
@@ -366,9 +1194,9 @@ function SidebarMenuButton(_a) {
366
1194
  children: tooltip
367
1195
  };
368
1196
  }
369
- return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(Tooltip, { children: [
1197
+ return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(Tooltip, { children: [
370
1198
  comp,
371
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
1199
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
372
1200
  TooltipContent,
373
1201
  __spreadValues({
374
1202
  side: "right",
@@ -378,29 +1206,250 @@ function SidebarMenuButton(_a) {
378
1206
  )
379
1207
  ] });
380
1208
  }
1209
+ function SidebarMenuBadge(_a) {
1210
+ var _b = _a, {
1211
+ className
1212
+ } = _b, props = __objRest(_b, [
1213
+ "className"
1214
+ ]);
1215
+ return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
1216
+ "div",
1217
+ __spreadValues({
1218
+ "data-slot": "sidebar-menu-badge",
1219
+ "data-sidebar": "menu-badge",
1220
+ className: (0, import_cn11.cn)(
1221
+ "pointer-events-none absolute right-1 flex h-5 min-w-5 items-center justify-center rounded-[calc(var(--radius-sm)-2px)] px-1 text-xs font-medium text-sidebar-foreground tabular-nums select-none group-data-[collapsible=icon]:hidden peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[size=default]/menu-button:top-1.5 peer-data-[size=lg]/menu-button:top-2.5 peer-data-[size=sm]/menu-button:top-1 peer-data-active/menu-button:text-sidebar-accent-foreground",
1222
+ className
1223
+ )
1224
+ }, props)
1225
+ );
1226
+ }
381
1227
 
382
- // src/components/composed/nav-user.tsx
383
- var import_jsx_runtime10 = require("react/jsx-runtime");
384
- var NavUser = (0, import_react2.memo)(function NavUser2({
1228
+ // src/components/composed/app-sidebar.tsx
1229
+ var import_jsx_runtime12 = require("react/jsx-runtime");
1230
+ function formatSegment(segment, subHref, navMainItems = [], navSecondaryItems = []) {
1231
+ if (subHref) {
1232
+ const matched = [...navMainItems, ...navSecondaryItems].find(
1233
+ (item) => item.url === subHref
1234
+ );
1235
+ if (matched) return matched.title;
1236
+ }
1237
+ return segment.split("-").map((word) => word.charAt(0).toUpperCase() + word.slice(1)).join(" ");
1238
+ }
1239
+ function isRouteActive(url, pathname) {
1240
+ if (!pathname) return false;
1241
+ if (url === "/") return pathname === "/";
1242
+ const rootPrefix = `/${url.split("/")[1]}`;
1243
+ return pathname === url || pathname.startsWith(rootPrefix);
1244
+ }
1245
+ var AppSidebar = (0, import_react.memo)(function AppSidebar2({
385
1246
  name,
386
1247
  email,
1248
+ orgRole,
1249
+ brand = "Prediktif",
1250
+ href,
1251
+ confirmDialog = false,
1252
+ headerDropdown = false,
387
1253
  image,
388
- render
1254
+ defaultOpen = true,
1255
+ navMainItems,
1256
+ navSecondaryItems = [],
1257
+ organizations,
1258
+ activeOrg,
1259
+ setActiveOrg,
1260
+ children
389
1261
  }) {
1262
+ const _isMobile = useIsMobile();
1263
+ const pathname = (0, import_navigation.usePathname)();
1264
+ const segments = pathname ? pathname.split("/").filter(Boolean) : [];
390
1265
  const initials = name ? name.trim().split(" ").map((n) => n[0]).join("").substring(0, 2).toUpperCase() : "U";
391
- return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(SidebarFooter, { children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(SidebarMenu, { children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(SidebarMenuItem, { children: /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(SidebarMenuButton, { size: "lg", render, children: [
392
- /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(Avatar, { children: [
393
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(AvatarImage, { src: image || "", alt: name || "" }),
394
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(AvatarFallback, { children: initials })
1266
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(SidebarProvider, { defaultOpen, children: [
1267
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(Sidebar, { collapsible: "icon", children: [
1268
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(SidebarHeader, { children: headerDropdown ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(SidebarMenu, { children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(SidebarMenuItem, { children: /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(DropdownMenu, { children: [
1269
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
1270
+ DropdownMenuTrigger,
1271
+ {
1272
+ render: /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
1273
+ SidebarMenuButton,
1274
+ {
1275
+ size: "lg",
1276
+ className: "data-[state=open]:bg-sidebar-accent data-[state=open]:text-sidebar-accent-foreground",
1277
+ children: [
1278
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "flex aspect-square size-8 items-center justify-center rounded-lg bg-sidebar-primary text-sidebar-primary-foreground", children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_lucide_react5.Command, { className: "size-4" }) }),
1279
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "grid flex-1 text-left text-sm leading-tight", children: [
1280
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { className: "truncate font-medium", children: (activeOrg == null ? void 0 : activeOrg.name) || brand }),
1281
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { className: "truncate text-xs", children: (activeOrg == null ? void 0 : activeOrg.plan) || orgRole })
1282
+ ] }),
1283
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_lucide_react5.ChevronsUpDown, { className: "ml-auto" })
1284
+ ]
1285
+ }
1286
+ )
1287
+ }
1288
+ ),
1289
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
1290
+ DropdownMenuContent,
1291
+ {
1292
+ className: "w-(--radix-dropdown-menu-trigger-width) min-w-60 rounded-lg",
1293
+ align: "start",
1294
+ side: "bottom",
1295
+ sideOffset: 4,
1296
+ children: /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(DropdownMenuGroup, { children: [
1297
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(DropdownMenuLabel, { className: "text-xs text-muted-foreground", children: "Organizations" }),
1298
+ (organizations || []).map((org) => {
1299
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
1300
+ DropdownMenuItem,
1301
+ {
1302
+ onClick: () => setActiveOrg == null ? void 0 : setActiveOrg(org),
1303
+ className: "gap-2 p-2",
1304
+ children: [
1305
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "flex size-6 items-center justify-center rounded-md border", children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_lucide_react5.Command, { className: "size-3.5 shrink-0" }) }),
1306
+ org.name
1307
+ ]
1308
+ },
1309
+ org.name
1310
+ );
1311
+ })
1312
+ ] })
1313
+ }
1314
+ )
1315
+ ] }) }) }) : /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(SidebarMenu, { children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(SidebarMenuItem, { children: /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(SidebarMenuButton, { size: "lg", render: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_link.default, { href: "/" }), children: [
1316
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "flex aspect-square size-8 items-center justify-center rounded-lg bg-sidebar-primary text-sidebar-primary-foreground", children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_lucide_react5.Command, { className: "size-4" }) }),
1317
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "grid flex-1 text-left text-sm leading-tight", children: [
1318
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { className: "truncate font-medium", children: brand }),
1319
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { className: "truncate text-xs", children: orgRole })
1320
+ ] })
1321
+ ] }) }) }) }),
1322
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(SidebarContent, { children: [
1323
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(SidebarGroup, { children: [
1324
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(SidebarGroupLabel, { children: "Platform" }),
1325
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(SidebarMenu, { children: navMainItems.map(({ title, url, icon: Icon, locked }) => {
1326
+ const isActive = isRouteActive(url, pathname);
1327
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(SidebarMenuItem, { children: [
1328
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
1329
+ SidebarMenuButton,
1330
+ {
1331
+ isActive,
1332
+ tooltip: title,
1333
+ render: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_link.default, { href: url }),
1334
+ children: [
1335
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(Icon, {}),
1336
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { children: title })
1337
+ ]
1338
+ }
1339
+ ),
1340
+ locked && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(SidebarMenuBadge, { children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_lucide_react5.LockIcon, { size: 12 }) })
1341
+ ] }, title);
1342
+ }) })
1343
+ ] }),
1344
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(SidebarGroup, { className: "mt-auto", children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(SidebarGroupContent, { children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(SidebarMenu, { children: navSecondaryItems.map(({ title, url, icon: Icon, locked }) => {
1345
+ const isActive = isRouteActive(url, pathname);
1346
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(SidebarMenuItem, { children: [
1347
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
1348
+ SidebarMenuButton,
1349
+ {
1350
+ size: "sm",
1351
+ isActive,
1352
+ tooltip: title,
1353
+ render: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_link.default, { href: url }),
1354
+ children: [
1355
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(Icon, {}),
1356
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { children: title })
1357
+ ]
1358
+ }
1359
+ ),
1360
+ locked && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(SidebarMenuBadge, { children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_lucide_react5.LockIcon, { size: 12 }) })
1361
+ ] }, title);
1362
+ }) }) }) })
1363
+ ] }),
1364
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(SidebarFooter, { children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(SidebarMenu, { children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(SidebarMenuItem, { children: confirmDialog ? /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(AlertDialog, { children: [
1365
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
1366
+ AlertDialogTrigger,
1367
+ {
1368
+ render: /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(SidebarMenuButton, { size: "lg", children: [
1369
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(Avatar, { children: [
1370
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(AvatarImage, { src: image || "", alt: name || "" }),
1371
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(AvatarFallback, { children: initials })
1372
+ ] }),
1373
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "grid flex-1 text-left text-sm leading-tight", children: [
1374
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { className: "truncate font-medium", children: name }),
1375
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { className: "truncate text-xs text-muted-foreground", children: email })
1376
+ ] })
1377
+ ] })
1378
+ }
1379
+ ),
1380
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(AlertDialogContent, { children: [
1381
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(AlertDialogHeader, { children: [
1382
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(AlertDialogTitle, { children: "Manage Account in Identity" }),
1383
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(AlertDialogDescription, { children: "You will be redirected to the Identity website to manage your profile, account, and settings." })
1384
+ ] }),
1385
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(AlertDialogFooter, { children: [
1386
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(AlertDialogCancel, { children: "Cancel" }),
1387
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
1388
+ AlertDialogAction,
1389
+ {
1390
+ nativeButton: false,
1391
+ render: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_link.default, { href, target: "_blank" }),
1392
+ children: "Continue"
1393
+ }
1394
+ )
1395
+ ] })
1396
+ ] })
1397
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(SidebarMenuButton, { size: "lg", render: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_link.default, { href }), children: [
1398
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(Avatar, { children: [
1399
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(AvatarImage, { src: image || "", alt: name || "" }),
1400
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(AvatarFallback, { children: initials })
1401
+ ] }),
1402
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "grid flex-1 text-left text-sm leading-tight", children: [
1403
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { className: "truncate font-medium", children: name }),
1404
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { className: "truncate text-xs text-muted-foreground", children: email })
1405
+ ] })
1406
+ ] }) }) }) }),
1407
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(SidebarRail, {})
395
1408
  ] }),
396
- /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "grid flex-1 text-left text-sm leading-tight", children: [
397
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { className: "truncate font-medium", children: name }),
398
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { className: "truncate text-xs text-muted-foreground", children: email })
1409
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(SidebarInset, { children: [
1410
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("header", { className: "flex h-16 shrink-0 items-center gap-2 transition-[width,height] ease-linear group-has-data-[collapsible=icon]/sidebar-wrapper:h-12", children: /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "flex items-center gap-2 px-4", children: [
1411
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(SidebarTrigger, { className: "-ml-1" }),
1412
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
1413
+ Separator,
1414
+ {
1415
+ orientation: "vertical",
1416
+ className: "mr-2 data-vertical:h-4 data-vertical:self-auto"
1417
+ }
1418
+ ),
1419
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(Breadcrumb, { children: /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(BreadcrumbList, { children: [
1420
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(BreadcrumbItem, { children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(BreadcrumbLink, { render: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_link.default, { href: "/" }), children: "Platform" }) }),
1421
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(BreadcrumbSeparator, {}),
1422
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(BreadcrumbItem, { children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(BreadcrumbPage, { children: segments.length === 0 ? "Overview" : formatSegment(
1423
+ segments[segments.length - 1],
1424
+ `/${segments.join("/")}`,
1425
+ navMainItems,
1426
+ navSecondaryItems
1427
+ ) }) })
1428
+ ] }) })
1429
+ ] }) }),
1430
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "p-4 pt-0", children })
399
1431
  ] })
400
- ] }) }) }) });
1432
+ ] });
1433
+ });
1434
+
1435
+ // src/components/composed/header-title.tsx
1436
+ var import_react2 = require("react");
1437
+ var import_jsx_runtime13 = require("react/jsx-runtime");
1438
+ var HeaderTitle = (0, import_react2.memo)(function HeaderTitle2({
1439
+ title,
1440
+ subtitle,
1441
+ children
1442
+ }) {
1443
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "w-full space-y-4", children: [
1444
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { children: [
1445
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("h1", { className: "font-semibold", children: title }),
1446
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("p", { className: "text-xs text-muted-foreground", children: subtitle })
1447
+ ] }),
1448
+ children
1449
+ ] });
401
1450
  });
402
1451
  // Annotate the CommonJS export names for ESM import in node:
403
1452
  0 && (module.exports = {
404
- HeaderTitle,
405
- NavUser
1453
+ AppSidebar,
1454
+ HeaderTitle
406
1455
  });