@prediktif/ui 0.1.6 → 0.1.7
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.d.mts +60 -1
- package/dist/index.d.ts +60 -1
- package/dist/index.js +771 -2
- package/dist/index.mjs +746 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -61,7 +61,31 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
61
61
|
var index_exports = {};
|
|
62
62
|
__export(index_exports, {
|
|
63
63
|
HeaderTitle: () => HeaderTitle,
|
|
64
|
-
NavUser: () => NavUser
|
|
64
|
+
NavUser: () => NavUser,
|
|
65
|
+
Sidebar: () => Sidebar,
|
|
66
|
+
SidebarContent: () => SidebarContent,
|
|
67
|
+
SidebarFooter: () => SidebarFooter,
|
|
68
|
+
SidebarGroup: () => SidebarGroup,
|
|
69
|
+
SidebarGroupAction: () => SidebarGroupAction,
|
|
70
|
+
SidebarGroupContent: () => SidebarGroupContent,
|
|
71
|
+
SidebarGroupLabel: () => SidebarGroupLabel,
|
|
72
|
+
SidebarHeader: () => SidebarHeader,
|
|
73
|
+
SidebarInput: () => SidebarInput,
|
|
74
|
+
SidebarInset: () => SidebarInset,
|
|
75
|
+
SidebarMenu: () => SidebarMenu,
|
|
76
|
+
SidebarMenuAction: () => SidebarMenuAction,
|
|
77
|
+
SidebarMenuBadge: () => SidebarMenuBadge,
|
|
78
|
+
SidebarMenuButton: () => SidebarMenuButton,
|
|
79
|
+
SidebarMenuItem: () => SidebarMenuItem,
|
|
80
|
+
SidebarMenuSkeleton: () => SidebarMenuSkeleton,
|
|
81
|
+
SidebarMenuSub: () => SidebarMenuSub,
|
|
82
|
+
SidebarMenuSubButton: () => SidebarMenuSubButton,
|
|
83
|
+
SidebarMenuSubItem: () => SidebarMenuSubItem,
|
|
84
|
+
SidebarProvider: () => SidebarProvider,
|
|
85
|
+
SidebarRail: () => SidebarRail,
|
|
86
|
+
SidebarSeparator: () => SidebarSeparator,
|
|
87
|
+
SidebarTrigger: () => SidebarTrigger,
|
|
88
|
+
useSidebar: () => useSidebar
|
|
65
89
|
});
|
|
66
90
|
module.exports = __toCommonJS(index_exports);
|
|
67
91
|
|
|
@@ -182,26 +206,195 @@ var buttonVariants = (0, import_class_variance_authority.cva)(
|
|
|
182
206
|
}
|
|
183
207
|
}
|
|
184
208
|
);
|
|
209
|
+
function Button(_a) {
|
|
210
|
+
var _b = _a, {
|
|
211
|
+
className,
|
|
212
|
+
variant = "default",
|
|
213
|
+
size = "default"
|
|
214
|
+
} = _b, props = __objRest(_b, [
|
|
215
|
+
"className",
|
|
216
|
+
"variant",
|
|
217
|
+
"size"
|
|
218
|
+
]);
|
|
219
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
220
|
+
import_button.Button,
|
|
221
|
+
__spreadValues({
|
|
222
|
+
"data-slot": "button",
|
|
223
|
+
className: (0, import_cn2.cn)(buttonVariants({ variant, size, className }))
|
|
224
|
+
}, props)
|
|
225
|
+
);
|
|
226
|
+
}
|
|
185
227
|
|
|
186
228
|
// src/components/ui/input.tsx
|
|
187
229
|
var import_input = require("@base-ui/react/input");
|
|
188
230
|
var import_cn3 = require("cn");
|
|
189
231
|
var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
232
|
+
function Input(_a) {
|
|
233
|
+
var _b = _a, { className, type } = _b, props = __objRest(_b, ["className", "type"]);
|
|
234
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
235
|
+
import_input.Input,
|
|
236
|
+
__spreadValues({
|
|
237
|
+
type,
|
|
238
|
+
"data-slot": "input",
|
|
239
|
+
className: (0, import_cn3.cn)(
|
|
240
|
+
"h-7 w-full min-w-0 rounded-md border border-input bg-input/20 px-2 py-0.5 text-sm transition-colors outline-none file:inline-flex file:h-6 file:border-0 file:bg-transparent file:text-xs/relaxed file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-2 focus-visible:ring-ring/30 disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-2 aria-invalid:ring-destructive/20 md:text-xs/relaxed dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40",
|
|
241
|
+
className
|
|
242
|
+
)
|
|
243
|
+
}, props)
|
|
244
|
+
);
|
|
245
|
+
}
|
|
190
246
|
|
|
191
247
|
// src/components/ui/separator.tsx
|
|
192
248
|
var import_separator = require("@base-ui/react/separator");
|
|
193
249
|
var import_cn4 = require("cn");
|
|
194
250
|
var import_jsx_runtime5 = require("react/jsx-runtime");
|
|
251
|
+
function Separator(_a) {
|
|
252
|
+
var _b = _a, {
|
|
253
|
+
className,
|
|
254
|
+
orientation = "horizontal"
|
|
255
|
+
} = _b, props = __objRest(_b, [
|
|
256
|
+
"className",
|
|
257
|
+
"orientation"
|
|
258
|
+
]);
|
|
259
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
260
|
+
import_separator.Separator,
|
|
261
|
+
__spreadValues({
|
|
262
|
+
"data-slot": "separator",
|
|
263
|
+
orientation,
|
|
264
|
+
className: (0, import_cn4.cn)(
|
|
265
|
+
"shrink-0 bg-border data-horizontal:h-px data-horizontal:w-full data-vertical:w-px data-vertical:self-stretch",
|
|
266
|
+
className
|
|
267
|
+
)
|
|
268
|
+
}, props)
|
|
269
|
+
);
|
|
270
|
+
}
|
|
195
271
|
|
|
196
272
|
// src/components/ui/sheet.tsx
|
|
197
273
|
var import_dialog = require("@base-ui/react/dialog");
|
|
198
274
|
var import_cn5 = require("cn");
|
|
199
275
|
var import_lucide_react = require("lucide-react");
|
|
200
276
|
var import_jsx_runtime6 = require("react/jsx-runtime");
|
|
277
|
+
function Sheet(_a) {
|
|
278
|
+
var props = __objRest(_a, []);
|
|
279
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_dialog.Dialog.Root, __spreadValues({ "data-slot": "sheet" }, props));
|
|
280
|
+
}
|
|
281
|
+
function SheetPortal(_a) {
|
|
282
|
+
var props = __objRest(_a, []);
|
|
283
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_dialog.Dialog.Portal, __spreadValues({ "data-slot": "sheet-portal" }, props));
|
|
284
|
+
}
|
|
285
|
+
function SheetOverlay(_a) {
|
|
286
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
287
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
288
|
+
import_dialog.Dialog.Backdrop,
|
|
289
|
+
__spreadValues({
|
|
290
|
+
"data-slot": "sheet-overlay",
|
|
291
|
+
className: (0, import_cn5.cn)(
|
|
292
|
+
"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",
|
|
293
|
+
className
|
|
294
|
+
)
|
|
295
|
+
}, props)
|
|
296
|
+
);
|
|
297
|
+
}
|
|
298
|
+
function SheetContent(_a) {
|
|
299
|
+
var _b = _a, {
|
|
300
|
+
className,
|
|
301
|
+
children,
|
|
302
|
+
side = "right",
|
|
303
|
+
showCloseButton = true
|
|
304
|
+
} = _b, props = __objRest(_b, [
|
|
305
|
+
"className",
|
|
306
|
+
"children",
|
|
307
|
+
"side",
|
|
308
|
+
"showCloseButton"
|
|
309
|
+
]);
|
|
310
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(SheetPortal, { children: [
|
|
311
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(SheetOverlay, {}),
|
|
312
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
|
|
313
|
+
import_dialog.Dialog.Popup,
|
|
314
|
+
__spreadProps(__spreadValues({
|
|
315
|
+
"data-slot": "sheet-content",
|
|
316
|
+
"data-side": side,
|
|
317
|
+
className: (0, import_cn5.cn)(
|
|
318
|
+
"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",
|
|
319
|
+
className
|
|
320
|
+
)
|
|
321
|
+
}, props), {
|
|
322
|
+
children: [
|
|
323
|
+
children,
|
|
324
|
+
showCloseButton && /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
|
|
325
|
+
import_dialog.Dialog.Close,
|
|
326
|
+
{
|
|
327
|
+
"data-slot": "sheet-close",
|
|
328
|
+
render: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
329
|
+
Button,
|
|
330
|
+
{
|
|
331
|
+
variant: "ghost",
|
|
332
|
+
className: "absolute top-4 right-4",
|
|
333
|
+
size: "icon-sm"
|
|
334
|
+
}
|
|
335
|
+
),
|
|
336
|
+
children: [
|
|
337
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_lucide_react.XIcon, {}),
|
|
338
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "sr-only", children: "Close" })
|
|
339
|
+
]
|
|
340
|
+
}
|
|
341
|
+
)
|
|
342
|
+
]
|
|
343
|
+
})
|
|
344
|
+
)
|
|
345
|
+
] });
|
|
346
|
+
}
|
|
347
|
+
function SheetHeader(_a) {
|
|
348
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
349
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
350
|
+
"div",
|
|
351
|
+
__spreadValues({
|
|
352
|
+
"data-slot": "sheet-header",
|
|
353
|
+
className: (0, import_cn5.cn)("flex flex-col gap-1.5 p-6", className)
|
|
354
|
+
}, props)
|
|
355
|
+
);
|
|
356
|
+
}
|
|
357
|
+
function SheetTitle(_a) {
|
|
358
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
359
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
360
|
+
import_dialog.Dialog.Title,
|
|
361
|
+
__spreadValues({
|
|
362
|
+
"data-slot": "sheet-title",
|
|
363
|
+
className: (0, import_cn5.cn)(
|
|
364
|
+
"font-heading text-sm font-medium text-foreground",
|
|
365
|
+
className
|
|
366
|
+
)
|
|
367
|
+
}, props)
|
|
368
|
+
);
|
|
369
|
+
}
|
|
370
|
+
function SheetDescription(_a) {
|
|
371
|
+
var _b = _a, {
|
|
372
|
+
className
|
|
373
|
+
} = _b, props = __objRest(_b, [
|
|
374
|
+
"className"
|
|
375
|
+
]);
|
|
376
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
377
|
+
import_dialog.Dialog.Description,
|
|
378
|
+
__spreadValues({
|
|
379
|
+
"data-slot": "sheet-description",
|
|
380
|
+
className: (0, import_cn5.cn)("text-xs/relaxed text-muted-foreground", className)
|
|
381
|
+
}, props)
|
|
382
|
+
);
|
|
383
|
+
}
|
|
201
384
|
|
|
202
385
|
// src/components/ui/skeleton.tsx
|
|
203
386
|
var import_cn6 = require("cn");
|
|
204
387
|
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
388
|
+
function Skeleton(_a) {
|
|
389
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
390
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
391
|
+
"div",
|
|
392
|
+
__spreadValues({
|
|
393
|
+
"data-slot": "skeleton",
|
|
394
|
+
className: (0, import_cn6.cn)("animate-pulse rounded-md bg-muted", className)
|
|
395
|
+
}, props)
|
|
396
|
+
);
|
|
397
|
+
}
|
|
205
398
|
|
|
206
399
|
// src/components/ui/tooltip.tsx
|
|
207
400
|
var import_tooltip = require("@base-ui/react/tooltip");
|
|
@@ -260,10 +453,31 @@ function TooltipContent(_a) {
|
|
|
260
453
|
|
|
261
454
|
// src/hooks/use-mobile.ts
|
|
262
455
|
var React = __toESM(require("react"));
|
|
456
|
+
var MOBILE_BREAKPOINT = 768;
|
|
457
|
+
function useIsMobile() {
|
|
458
|
+
const [isMobile, setIsMobile] = React.useState(
|
|
459
|
+
void 0
|
|
460
|
+
);
|
|
461
|
+
React.useEffect(() => {
|
|
462
|
+
const mql = window.matchMedia(`(max-width: ${MOBILE_BREAKPOINT - 1}px)`);
|
|
463
|
+
const onChange = () => {
|
|
464
|
+
setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);
|
|
465
|
+
};
|
|
466
|
+
mql.addEventListener("change", onChange);
|
|
467
|
+
setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);
|
|
468
|
+
return () => mql.removeEventListener("change", onChange);
|
|
469
|
+
}, []);
|
|
470
|
+
return !!isMobile;
|
|
471
|
+
}
|
|
263
472
|
|
|
264
473
|
// src/components/ui/sidebar.tsx
|
|
265
474
|
var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
475
|
+
var SIDEBAR_COOKIE_NAME = "sidebar_state";
|
|
266
476
|
var SIDEBAR_COOKIE_MAX_AGE = 60 * 60 * 24 * 7;
|
|
477
|
+
var SIDEBAR_WIDTH = "16rem";
|
|
478
|
+
var SIDEBAR_WIDTH_MOBILE = "18rem";
|
|
479
|
+
var SIDEBAR_WIDTH_ICON = "3rem";
|
|
480
|
+
var SIDEBAR_KEYBOARD_SHORTCUT = "b";
|
|
267
481
|
var SidebarContext = React2.createContext(null);
|
|
268
482
|
function useSidebar() {
|
|
269
483
|
const context = React2.useContext(SidebarContext);
|
|
@@ -272,6 +486,279 @@ function useSidebar() {
|
|
|
272
486
|
}
|
|
273
487
|
return context;
|
|
274
488
|
}
|
|
489
|
+
function SidebarProvider(_a) {
|
|
490
|
+
var _b = _a, {
|
|
491
|
+
defaultOpen = true,
|
|
492
|
+
open: openProp,
|
|
493
|
+
onOpenChange: setOpenProp,
|
|
494
|
+
className,
|
|
495
|
+
style,
|
|
496
|
+
children
|
|
497
|
+
} = _b, props = __objRest(_b, [
|
|
498
|
+
"defaultOpen",
|
|
499
|
+
"open",
|
|
500
|
+
"onOpenChange",
|
|
501
|
+
"className",
|
|
502
|
+
"style",
|
|
503
|
+
"children"
|
|
504
|
+
]);
|
|
505
|
+
const isMobile = useIsMobile();
|
|
506
|
+
const [openMobile, setOpenMobile] = React2.useState(false);
|
|
507
|
+
const [_open, _setOpen] = React2.useState(defaultOpen);
|
|
508
|
+
const open = openProp != null ? openProp : _open;
|
|
509
|
+
const setOpen = React2.useCallback(
|
|
510
|
+
(value) => {
|
|
511
|
+
const openState = typeof value === "function" ? value(open) : value;
|
|
512
|
+
if (setOpenProp) {
|
|
513
|
+
setOpenProp(openState);
|
|
514
|
+
} else {
|
|
515
|
+
_setOpen(openState);
|
|
516
|
+
}
|
|
517
|
+
document.cookie = `${SIDEBAR_COOKIE_NAME}=${openState}; path=/; max-age=${SIDEBAR_COOKIE_MAX_AGE}`;
|
|
518
|
+
},
|
|
519
|
+
[setOpenProp, open]
|
|
520
|
+
);
|
|
521
|
+
const toggleSidebar = React2.useCallback(() => {
|
|
522
|
+
return isMobile ? setOpenMobile((open2) => !open2) : setOpen((open2) => !open2);
|
|
523
|
+
}, [isMobile, setOpen]);
|
|
524
|
+
React2.useEffect(() => {
|
|
525
|
+
const handleKeyDown = (event) => {
|
|
526
|
+
if (event.key === SIDEBAR_KEYBOARD_SHORTCUT && (event.metaKey || event.ctrlKey)) {
|
|
527
|
+
event.preventDefault();
|
|
528
|
+
toggleSidebar();
|
|
529
|
+
}
|
|
530
|
+
};
|
|
531
|
+
window.addEventListener("keydown", handleKeyDown);
|
|
532
|
+
return () => window.removeEventListener("keydown", handleKeyDown);
|
|
533
|
+
}, [toggleSidebar]);
|
|
534
|
+
const state = open ? "expanded" : "collapsed";
|
|
535
|
+
const contextValue = React2.useMemo(
|
|
536
|
+
() => ({
|
|
537
|
+
state,
|
|
538
|
+
open,
|
|
539
|
+
setOpen,
|
|
540
|
+
isMobile,
|
|
541
|
+
openMobile,
|
|
542
|
+
setOpenMobile,
|
|
543
|
+
toggleSidebar
|
|
544
|
+
}),
|
|
545
|
+
[state, open, setOpen, isMobile, openMobile, toggleSidebar]
|
|
546
|
+
);
|
|
547
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(SidebarContext.Provider, { value: contextValue, children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
548
|
+
"div",
|
|
549
|
+
__spreadProps(__spreadValues({
|
|
550
|
+
"data-slot": "sidebar-wrapper",
|
|
551
|
+
style: __spreadValues({
|
|
552
|
+
"--sidebar-width": SIDEBAR_WIDTH,
|
|
553
|
+
"--sidebar-width-icon": SIDEBAR_WIDTH_ICON
|
|
554
|
+
}, style),
|
|
555
|
+
className: (0, import_cn8.cn)(
|
|
556
|
+
"group/sidebar-wrapper flex min-h-svh w-full has-data-[variant=inset]:bg-sidebar",
|
|
557
|
+
className
|
|
558
|
+
)
|
|
559
|
+
}, props), {
|
|
560
|
+
children
|
|
561
|
+
})
|
|
562
|
+
) });
|
|
563
|
+
}
|
|
564
|
+
function Sidebar(_a) {
|
|
565
|
+
var _b = _a, {
|
|
566
|
+
side = "left",
|
|
567
|
+
variant = "sidebar",
|
|
568
|
+
collapsible = "offcanvas",
|
|
569
|
+
className,
|
|
570
|
+
children,
|
|
571
|
+
dir
|
|
572
|
+
} = _b, props = __objRest(_b, [
|
|
573
|
+
"side",
|
|
574
|
+
"variant",
|
|
575
|
+
"collapsible",
|
|
576
|
+
"className",
|
|
577
|
+
"children",
|
|
578
|
+
"dir"
|
|
579
|
+
]);
|
|
580
|
+
const { isMobile, state, openMobile, setOpenMobile } = useSidebar();
|
|
581
|
+
if (collapsible === "none") {
|
|
582
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
583
|
+
"div",
|
|
584
|
+
__spreadProps(__spreadValues({
|
|
585
|
+
"data-slot": "sidebar",
|
|
586
|
+
className: (0, import_cn8.cn)(
|
|
587
|
+
"flex h-full w-(--sidebar-width) flex-col bg-sidebar text-sidebar-foreground",
|
|
588
|
+
className
|
|
589
|
+
)
|
|
590
|
+
}, props), {
|
|
591
|
+
children
|
|
592
|
+
})
|
|
593
|
+
);
|
|
594
|
+
}
|
|
595
|
+
if (isMobile) {
|
|
596
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Sheet, __spreadProps(__spreadValues({ open: openMobile, onOpenChange: setOpenMobile }, props), { children: /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
|
|
597
|
+
SheetContent,
|
|
598
|
+
{
|
|
599
|
+
dir,
|
|
600
|
+
"data-sidebar": "sidebar",
|
|
601
|
+
"data-slot": "sidebar",
|
|
602
|
+
"data-mobile": "true",
|
|
603
|
+
className: "w-(--sidebar-width) bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden",
|
|
604
|
+
style: {
|
|
605
|
+
"--sidebar-width": SIDEBAR_WIDTH_MOBILE
|
|
606
|
+
},
|
|
607
|
+
side,
|
|
608
|
+
children: [
|
|
609
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(SheetHeader, { className: "sr-only", children: [
|
|
610
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(SheetTitle, { children: "Sidebar" }),
|
|
611
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(SheetDescription, { children: "Displays the mobile sidebar." })
|
|
612
|
+
] }),
|
|
613
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "flex h-full w-full flex-col", children })
|
|
614
|
+
]
|
|
615
|
+
}
|
|
616
|
+
) }));
|
|
617
|
+
}
|
|
618
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
|
|
619
|
+
"div",
|
|
620
|
+
{
|
|
621
|
+
className: "group peer hidden text-sidebar-foreground md:block",
|
|
622
|
+
"data-state": state,
|
|
623
|
+
"data-collapsible": state === "collapsed" ? collapsible : "",
|
|
624
|
+
"data-variant": variant,
|
|
625
|
+
"data-side": side,
|
|
626
|
+
"data-slot": "sidebar",
|
|
627
|
+
children: [
|
|
628
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
629
|
+
"div",
|
|
630
|
+
{
|
|
631
|
+
"data-slot": "sidebar-gap",
|
|
632
|
+
className: (0, import_cn8.cn)(
|
|
633
|
+
"relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear",
|
|
634
|
+
"group-data-[collapsible=offcanvas]:w-0",
|
|
635
|
+
"group-data-[side=right]:rotate-180",
|
|
636
|
+
variant === "floating" || variant === "inset" ? "group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]" : "group-data-[collapsible=icon]:w-(--sidebar-width-icon)"
|
|
637
|
+
)
|
|
638
|
+
}
|
|
639
|
+
),
|
|
640
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
641
|
+
"div",
|
|
642
|
+
__spreadProps(__spreadValues({
|
|
643
|
+
"data-slot": "sidebar-container",
|
|
644
|
+
"data-side": side,
|
|
645
|
+
className: (0, import_cn8.cn)(
|
|
646
|
+
"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",
|
|
647
|
+
// Adjust the padding for floating and inset variants.
|
|
648
|
+
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",
|
|
649
|
+
className
|
|
650
|
+
)
|
|
651
|
+
}, props), {
|
|
652
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
653
|
+
"div",
|
|
654
|
+
{
|
|
655
|
+
"data-sidebar": "sidebar",
|
|
656
|
+
"data-slot": "sidebar-inner",
|
|
657
|
+
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",
|
|
658
|
+
children
|
|
659
|
+
}
|
|
660
|
+
)
|
|
661
|
+
})
|
|
662
|
+
)
|
|
663
|
+
]
|
|
664
|
+
}
|
|
665
|
+
);
|
|
666
|
+
}
|
|
667
|
+
function SidebarTrigger(_a) {
|
|
668
|
+
var _b = _a, {
|
|
669
|
+
className,
|
|
670
|
+
onClick
|
|
671
|
+
} = _b, props = __objRest(_b, [
|
|
672
|
+
"className",
|
|
673
|
+
"onClick"
|
|
674
|
+
]);
|
|
675
|
+
const { toggleSidebar } = useSidebar();
|
|
676
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
|
|
677
|
+
Button,
|
|
678
|
+
__spreadProps(__spreadValues({
|
|
679
|
+
"data-sidebar": "trigger",
|
|
680
|
+
"data-slot": "sidebar-trigger",
|
|
681
|
+
variant: "ghost",
|
|
682
|
+
size: "icon-sm",
|
|
683
|
+
className: (0, import_cn8.cn)(className),
|
|
684
|
+
onClick: (event) => {
|
|
685
|
+
onClick == null ? void 0 : onClick(event);
|
|
686
|
+
toggleSidebar();
|
|
687
|
+
}
|
|
688
|
+
}, props), {
|
|
689
|
+
children: [
|
|
690
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_lucide_react2.PanelLeftIcon, {}),
|
|
691
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { className: "sr-only", children: "Toggle Sidebar" })
|
|
692
|
+
]
|
|
693
|
+
})
|
|
694
|
+
);
|
|
695
|
+
}
|
|
696
|
+
function SidebarRail(_a) {
|
|
697
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
698
|
+
const { toggleSidebar } = useSidebar();
|
|
699
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
700
|
+
"button",
|
|
701
|
+
__spreadValues({
|
|
702
|
+
"data-sidebar": "rail",
|
|
703
|
+
"data-slot": "sidebar-rail",
|
|
704
|
+
"aria-label": "Toggle Sidebar",
|
|
705
|
+
tabIndex: -1,
|
|
706
|
+
onClick: toggleSidebar,
|
|
707
|
+
title: "Toggle Sidebar",
|
|
708
|
+
className: (0, import_cn8.cn)(
|
|
709
|
+
"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",
|
|
710
|
+
"in-data-[side=left]:cursor-w-resize in-data-[side=right]:cursor-e-resize",
|
|
711
|
+
"[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize",
|
|
712
|
+
"group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full hover:group-data-[collapsible=offcanvas]:bg-sidebar",
|
|
713
|
+
"[[data-side=left][data-collapsible=offcanvas]_&]:-right-2",
|
|
714
|
+
"[[data-side=right][data-collapsible=offcanvas]_&]:-left-2",
|
|
715
|
+
className
|
|
716
|
+
)
|
|
717
|
+
}, props)
|
|
718
|
+
);
|
|
719
|
+
}
|
|
720
|
+
function SidebarInset(_a) {
|
|
721
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
722
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
723
|
+
"main",
|
|
724
|
+
__spreadValues({
|
|
725
|
+
"data-slot": "sidebar-inset",
|
|
726
|
+
className: (0, import_cn8.cn)(
|
|
727
|
+
"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",
|
|
728
|
+
className
|
|
729
|
+
)
|
|
730
|
+
}, props)
|
|
731
|
+
);
|
|
732
|
+
}
|
|
733
|
+
function SidebarInput(_a) {
|
|
734
|
+
var _b = _a, {
|
|
735
|
+
className
|
|
736
|
+
} = _b, props = __objRest(_b, [
|
|
737
|
+
"className"
|
|
738
|
+
]);
|
|
739
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
740
|
+
Input,
|
|
741
|
+
__spreadValues({
|
|
742
|
+
"data-slot": "sidebar-input",
|
|
743
|
+
"data-sidebar": "input",
|
|
744
|
+
className: (0, import_cn8.cn)(
|
|
745
|
+
"h-8 w-full border-input bg-muted/20 dark:bg-muted/30",
|
|
746
|
+
className
|
|
747
|
+
)
|
|
748
|
+
}, props)
|
|
749
|
+
);
|
|
750
|
+
}
|
|
751
|
+
function SidebarHeader(_a) {
|
|
752
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
753
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
754
|
+
"div",
|
|
755
|
+
__spreadValues({
|
|
756
|
+
"data-slot": "sidebar-header",
|
|
757
|
+
"data-sidebar": "header",
|
|
758
|
+
className: (0, import_cn8.cn)("flex flex-col gap-2 p-2", className)
|
|
759
|
+
}, props)
|
|
760
|
+
);
|
|
761
|
+
}
|
|
275
762
|
function SidebarFooter(_a) {
|
|
276
763
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
277
764
|
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
@@ -283,6 +770,116 @@ function SidebarFooter(_a) {
|
|
|
283
770
|
}, props)
|
|
284
771
|
);
|
|
285
772
|
}
|
|
773
|
+
function SidebarSeparator(_a) {
|
|
774
|
+
var _b = _a, {
|
|
775
|
+
className
|
|
776
|
+
} = _b, props = __objRest(_b, [
|
|
777
|
+
"className"
|
|
778
|
+
]);
|
|
779
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
780
|
+
Separator,
|
|
781
|
+
__spreadValues({
|
|
782
|
+
"data-slot": "sidebar-separator",
|
|
783
|
+
"data-sidebar": "separator",
|
|
784
|
+
className: (0, import_cn8.cn)("mx-2 w-auto bg-sidebar-border", className)
|
|
785
|
+
}, props)
|
|
786
|
+
);
|
|
787
|
+
}
|
|
788
|
+
function SidebarContent(_a) {
|
|
789
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
790
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
791
|
+
"div",
|
|
792
|
+
__spreadValues({
|
|
793
|
+
"data-slot": "sidebar-content",
|
|
794
|
+
"data-sidebar": "content",
|
|
795
|
+
className: (0, import_cn8.cn)(
|
|
796
|
+
"no-scrollbar flex min-h-0 flex-1 flex-col gap-0 overflow-auto group-data-[collapsible=icon]:overflow-hidden",
|
|
797
|
+
className
|
|
798
|
+
)
|
|
799
|
+
}, props)
|
|
800
|
+
);
|
|
801
|
+
}
|
|
802
|
+
function SidebarGroup(_a) {
|
|
803
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
804
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
805
|
+
"div",
|
|
806
|
+
__spreadValues({
|
|
807
|
+
"data-slot": "sidebar-group",
|
|
808
|
+
"data-sidebar": "group",
|
|
809
|
+
className: (0, import_cn8.cn)(
|
|
810
|
+
"relative flex w-full min-w-0 flex-col px-2 py-1",
|
|
811
|
+
className
|
|
812
|
+
)
|
|
813
|
+
}, props)
|
|
814
|
+
);
|
|
815
|
+
}
|
|
816
|
+
function SidebarGroupLabel(_a) {
|
|
817
|
+
var _b = _a, {
|
|
818
|
+
className,
|
|
819
|
+
render
|
|
820
|
+
} = _b, props = __objRest(_b, [
|
|
821
|
+
"className",
|
|
822
|
+
"render"
|
|
823
|
+
]);
|
|
824
|
+
return (0, import_use_render.useRender)({
|
|
825
|
+
defaultTagName: "div",
|
|
826
|
+
props: (0, import_merge_props.mergeProps)(
|
|
827
|
+
{
|
|
828
|
+
className: (0, import_cn8.cn)(
|
|
829
|
+
"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",
|
|
830
|
+
className
|
|
831
|
+
)
|
|
832
|
+
},
|
|
833
|
+
props
|
|
834
|
+
),
|
|
835
|
+
render,
|
|
836
|
+
state: {
|
|
837
|
+
slot: "sidebar-group-label",
|
|
838
|
+
sidebar: "group-label"
|
|
839
|
+
}
|
|
840
|
+
});
|
|
841
|
+
}
|
|
842
|
+
function SidebarGroupAction(_a) {
|
|
843
|
+
var _b = _a, {
|
|
844
|
+
className,
|
|
845
|
+
render
|
|
846
|
+
} = _b, props = __objRest(_b, [
|
|
847
|
+
"className",
|
|
848
|
+
"render"
|
|
849
|
+
]);
|
|
850
|
+
return (0, import_use_render.useRender)({
|
|
851
|
+
defaultTagName: "button",
|
|
852
|
+
props: (0, import_merge_props.mergeProps)(
|
|
853
|
+
{
|
|
854
|
+
className: (0, import_cn8.cn)(
|
|
855
|
+
"absolute top-3.5 right-3 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground ring-sidebar-ring outline-hidden transition-transform group-data-[collapsible=icon]:hidden after:absolute after:-inset-2 hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 md:after:hidden [&>svg]:size-4 [&>svg]:shrink-0",
|
|
856
|
+
className
|
|
857
|
+
)
|
|
858
|
+
},
|
|
859
|
+
props
|
|
860
|
+
),
|
|
861
|
+
render,
|
|
862
|
+
state: {
|
|
863
|
+
slot: "sidebar-group-action",
|
|
864
|
+
sidebar: "group-action"
|
|
865
|
+
}
|
|
866
|
+
});
|
|
867
|
+
}
|
|
868
|
+
function SidebarGroupContent(_a) {
|
|
869
|
+
var _b = _a, {
|
|
870
|
+
className
|
|
871
|
+
} = _b, props = __objRest(_b, [
|
|
872
|
+
"className"
|
|
873
|
+
]);
|
|
874
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
875
|
+
"div",
|
|
876
|
+
__spreadValues({
|
|
877
|
+
"data-slot": "sidebar-group-content",
|
|
878
|
+
"data-sidebar": "group-content",
|
|
879
|
+
className: (0, import_cn8.cn)("w-full text-xs", className)
|
|
880
|
+
}, props)
|
|
881
|
+
);
|
|
882
|
+
}
|
|
286
883
|
function SidebarMenu(_a) {
|
|
287
884
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
288
885
|
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
@@ -378,6 +975,154 @@ function SidebarMenuButton(_a) {
|
|
|
378
975
|
)
|
|
379
976
|
] });
|
|
380
977
|
}
|
|
978
|
+
function SidebarMenuAction(_a) {
|
|
979
|
+
var _b = _a, {
|
|
980
|
+
className,
|
|
981
|
+
render,
|
|
982
|
+
showOnHover = false
|
|
983
|
+
} = _b, props = __objRest(_b, [
|
|
984
|
+
"className",
|
|
985
|
+
"render",
|
|
986
|
+
"showOnHover"
|
|
987
|
+
]);
|
|
988
|
+
return (0, import_use_render.useRender)({
|
|
989
|
+
defaultTagName: "button",
|
|
990
|
+
props: (0, import_merge_props.mergeProps)(
|
|
991
|
+
{
|
|
992
|
+
className: (0, import_cn8.cn)(
|
|
993
|
+
"absolute top-1.5 right-1 flex aspect-square w-5 items-center justify-center rounded-[calc(var(--radius-sm)-2px)] p-0 text-sidebar-foreground ring-sidebar-ring outline-hidden transition-transform 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 after:absolute after:-inset-2 hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 md:after:hidden [&>svg]:size-4 [&>svg]:shrink-0",
|
|
994
|
+
showOnHover && "group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 peer-data-active/menu-button:text-sidebar-accent-foreground aria-expanded:opacity-100 md:opacity-0",
|
|
995
|
+
className
|
|
996
|
+
)
|
|
997
|
+
},
|
|
998
|
+
props
|
|
999
|
+
),
|
|
1000
|
+
render,
|
|
1001
|
+
state: {
|
|
1002
|
+
slot: "sidebar-menu-action",
|
|
1003
|
+
sidebar: "menu-action"
|
|
1004
|
+
}
|
|
1005
|
+
});
|
|
1006
|
+
}
|
|
1007
|
+
function SidebarMenuBadge(_a) {
|
|
1008
|
+
var _b = _a, {
|
|
1009
|
+
className
|
|
1010
|
+
} = _b, props = __objRest(_b, [
|
|
1011
|
+
"className"
|
|
1012
|
+
]);
|
|
1013
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
1014
|
+
"div",
|
|
1015
|
+
__spreadValues({
|
|
1016
|
+
"data-slot": "sidebar-menu-badge",
|
|
1017
|
+
"data-sidebar": "menu-badge",
|
|
1018
|
+
className: (0, import_cn8.cn)(
|
|
1019
|
+
"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",
|
|
1020
|
+
className
|
|
1021
|
+
)
|
|
1022
|
+
}, props)
|
|
1023
|
+
);
|
|
1024
|
+
}
|
|
1025
|
+
function SidebarMenuSkeleton(_a) {
|
|
1026
|
+
var _b = _a, {
|
|
1027
|
+
className,
|
|
1028
|
+
showIcon = false
|
|
1029
|
+
} = _b, props = __objRest(_b, [
|
|
1030
|
+
"className",
|
|
1031
|
+
"showIcon"
|
|
1032
|
+
]);
|
|
1033
|
+
const [width] = React2.useState(() => {
|
|
1034
|
+
return `${Math.floor(Math.random() * 40) + 50}%`;
|
|
1035
|
+
});
|
|
1036
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
|
|
1037
|
+
"div",
|
|
1038
|
+
__spreadProps(__spreadValues({
|
|
1039
|
+
"data-slot": "sidebar-menu-skeleton",
|
|
1040
|
+
"data-sidebar": "menu-skeleton",
|
|
1041
|
+
className: (0, import_cn8.cn)("flex h-8 items-center gap-2 rounded-md px-2", className)
|
|
1042
|
+
}, props), {
|
|
1043
|
+
children: [
|
|
1044
|
+
showIcon && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
1045
|
+
Skeleton,
|
|
1046
|
+
{
|
|
1047
|
+
className: "size-4 rounded-md",
|
|
1048
|
+
"data-sidebar": "menu-skeleton-icon"
|
|
1049
|
+
}
|
|
1050
|
+
),
|
|
1051
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
1052
|
+
Skeleton,
|
|
1053
|
+
{
|
|
1054
|
+
className: "h-4 max-w-(--skeleton-width) flex-1",
|
|
1055
|
+
"data-sidebar": "menu-skeleton-text",
|
|
1056
|
+
style: {
|
|
1057
|
+
"--skeleton-width": width
|
|
1058
|
+
}
|
|
1059
|
+
}
|
|
1060
|
+
)
|
|
1061
|
+
]
|
|
1062
|
+
})
|
|
1063
|
+
);
|
|
1064
|
+
}
|
|
1065
|
+
function SidebarMenuSub(_a) {
|
|
1066
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
1067
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
1068
|
+
"ul",
|
|
1069
|
+
__spreadValues({
|
|
1070
|
+
"data-slot": "sidebar-menu-sub",
|
|
1071
|
+
"data-sidebar": "menu-sub",
|
|
1072
|
+
className: (0, import_cn8.cn)(
|
|
1073
|
+
"mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l border-sidebar-border px-2.5 py-0.5 group-data-[collapsible=icon]:hidden",
|
|
1074
|
+
className
|
|
1075
|
+
)
|
|
1076
|
+
}, props)
|
|
1077
|
+
);
|
|
1078
|
+
}
|
|
1079
|
+
function SidebarMenuSubItem(_a) {
|
|
1080
|
+
var _b = _a, {
|
|
1081
|
+
className
|
|
1082
|
+
} = _b, props = __objRest(_b, [
|
|
1083
|
+
"className"
|
|
1084
|
+
]);
|
|
1085
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
1086
|
+
"li",
|
|
1087
|
+
__spreadValues({
|
|
1088
|
+
"data-slot": "sidebar-menu-sub-item",
|
|
1089
|
+
"data-sidebar": "menu-sub-item",
|
|
1090
|
+
className: (0, import_cn8.cn)("group/menu-sub-item relative", className)
|
|
1091
|
+
}, props)
|
|
1092
|
+
);
|
|
1093
|
+
}
|
|
1094
|
+
function SidebarMenuSubButton(_a) {
|
|
1095
|
+
var _b = _a, {
|
|
1096
|
+
render,
|
|
1097
|
+
size = "md",
|
|
1098
|
+
isActive = false,
|
|
1099
|
+
className
|
|
1100
|
+
} = _b, props = __objRest(_b, [
|
|
1101
|
+
"render",
|
|
1102
|
+
"size",
|
|
1103
|
+
"isActive",
|
|
1104
|
+
"className"
|
|
1105
|
+
]);
|
|
1106
|
+
return (0, import_use_render.useRender)({
|
|
1107
|
+
defaultTagName: "a",
|
|
1108
|
+
props: (0, import_merge_props.mergeProps)(
|
|
1109
|
+
{
|
|
1110
|
+
className: (0, import_cn8.cn)(
|
|
1111
|
+
"flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 text-sidebar-foreground ring-sidebar-ring outline-hidden group-data-[collapsible=icon]:hidden hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[size=md]:text-xs data-[size=sm]:text-xs data-active:bg-sidebar-accent data-active:text-sidebar-accent-foreground [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0 [&>svg]:text-sidebar-accent-foreground",
|
|
1112
|
+
className
|
|
1113
|
+
)
|
|
1114
|
+
},
|
|
1115
|
+
props
|
|
1116
|
+
),
|
|
1117
|
+
render,
|
|
1118
|
+
state: {
|
|
1119
|
+
slot: "sidebar-menu-sub-button",
|
|
1120
|
+
sidebar: "menu-sub-button",
|
|
1121
|
+
size,
|
|
1122
|
+
active: isActive
|
|
1123
|
+
}
|
|
1124
|
+
});
|
|
1125
|
+
}
|
|
381
1126
|
|
|
382
1127
|
// src/components/composed/nav-user.tsx
|
|
383
1128
|
var import_jsx_runtime10 = require("react/jsx-runtime");
|
|
@@ -402,5 +1147,29 @@ var NavUser = (0, import_react2.memo)(function NavUser2({
|
|
|
402
1147
|
// Annotate the CommonJS export names for ESM import in node:
|
|
403
1148
|
0 && (module.exports = {
|
|
404
1149
|
HeaderTitle,
|
|
405
|
-
NavUser
|
|
1150
|
+
NavUser,
|
|
1151
|
+
Sidebar,
|
|
1152
|
+
SidebarContent,
|
|
1153
|
+
SidebarFooter,
|
|
1154
|
+
SidebarGroup,
|
|
1155
|
+
SidebarGroupAction,
|
|
1156
|
+
SidebarGroupContent,
|
|
1157
|
+
SidebarGroupLabel,
|
|
1158
|
+
SidebarHeader,
|
|
1159
|
+
SidebarInput,
|
|
1160
|
+
SidebarInset,
|
|
1161
|
+
SidebarMenu,
|
|
1162
|
+
SidebarMenuAction,
|
|
1163
|
+
SidebarMenuBadge,
|
|
1164
|
+
SidebarMenuButton,
|
|
1165
|
+
SidebarMenuItem,
|
|
1166
|
+
SidebarMenuSkeleton,
|
|
1167
|
+
SidebarMenuSub,
|
|
1168
|
+
SidebarMenuSubButton,
|
|
1169
|
+
SidebarMenuSubItem,
|
|
1170
|
+
SidebarProvider,
|
|
1171
|
+
SidebarRail,
|
|
1172
|
+
SidebarSeparator,
|
|
1173
|
+
SidebarTrigger,
|
|
1174
|
+
useSidebar
|
|
406
1175
|
});
|