@mesob/ui 0.2.1 → 0.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) hide show
  1. package/dist/components/alert-dialog.js +14 -14
  2. package/dist/components/alert-dialog.js.map +1 -1
  3. package/dist/components/app-header-actions.js +70 -70
  4. package/dist/components/app-header-actions.js.map +1 -1
  5. package/dist/components/app-sidebar.js +57 -52
  6. package/dist/components/app-sidebar.js.map +1 -1
  7. package/dist/components/button.js +4 -4
  8. package/dist/components/button.js.map +1 -1
  9. package/dist/components/calendar.js +12 -12
  10. package/dist/components/calendar.js.map +1 -1
  11. package/dist/components/carousel.js +14 -14
  12. package/dist/components/carousel.js.map +1 -1
  13. package/dist/components/data-table/index.js +57 -57
  14. package/dist/components/data-table/index.js.map +1 -1
  15. package/dist/components/entity/index.js +177 -177
  16. package/dist/components/entity/index.js.map +1 -1
  17. package/dist/components/input-group.js +15 -15
  18. package/dist/components/input-group.js.map +1 -1
  19. package/dist/components/page/index.js +21 -21
  20. package/dist/components/page/index.js.map +1 -1
  21. package/dist/components/pagination.js +12 -12
  22. package/dist/components/pagination.js.map +1 -1
  23. package/dist/components/section/index.js +15 -15
  24. package/dist/components/section/index.js.map +1 -1
  25. package/dist/components/shell.js +47 -42
  26. package/dist/components/shell.js.map +1 -1
  27. package/dist/components/sidebar-context.d.ts +19 -0
  28. package/dist/components/sidebar-context.js +17 -0
  29. package/dist/components/sidebar-context.js.map +1 -0
  30. package/dist/components/sidebar.d.ts +2 -15
  31. package/dist/components/sidebar.js +82 -77
  32. package/dist/components/sidebar.js.map +1 -1
  33. package/dist/components/spotlight-search.js +38 -38
  34. package/dist/components/spotlight-search.js.map +1 -1
  35. package/dist/components/theme-toggle.js +8 -8
  36. package/dist/components/theme-toggle.js.map +1 -1
  37. package/package.json +1 -1
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/components/sidebar-context.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\n\nexport type SidebarContextProps = {\n state: 'expanded' | 'collapsed';\n open: boolean;\n setOpen: (open: boolean | ((open: boolean) => boolean)) => void;\n openMobile: boolean;\n setOpenMobile: (open: boolean) => void;\n isMobile: boolean;\n toggleSidebar: () => void;\n width: number;\n setWidth: (w: number) => void;\n minWidth: number;\n maxWidth: number;\n};\n\nconst SidebarContext = React.createContext<SidebarContextProps | null>(null);\n\nexport function useSidebar() {\n const context = React.useContext(SidebarContext);\n if (!context) {\n throw new Error('useSidebar must be used within a SidebarProvider.');\n }\n return context;\n}\n\nexport { SidebarContext };\n"],"mappings":";;;AAEA,YAAY,WAAW;AAgBvB,IAAM,iBAAuB,oBAA0C,IAAI;AAEpE,SAAS,aAAa;AAC3B,QAAM,UAAgB,iBAAW,cAAc;AAC/C,MAAI,CAAC,SAAS;AACZ,UAAM,IAAI,MAAM,mDAAmD;AAAA,EACrE;AACA,SAAO;AACT;","names":[]}
@@ -6,23 +6,10 @@ import { Separator } from './separator.js';
6
6
  import { TooltipContent } from './tooltip.js';
7
7
  import { VariantProps } from 'class-variance-authority';
8
8
  import * as React from 'react';
9
+ export { useSidebar } from './sidebar-context.js';
9
10
  import '@radix-ui/react-separator';
10
11
  import '@radix-ui/react-tooltip';
11
12
 
12
- type SidebarContextProps = {
13
- state: 'expanded' | 'collapsed';
14
- open: boolean;
15
- setOpen: (open: boolean | ((open: boolean) => boolean)) => void;
16
- openMobile: boolean;
17
- setOpenMobile: (open: boolean) => void;
18
- isMobile: boolean;
19
- toggleSidebar: () => void;
20
- width: number;
21
- setWidth: (w: number) => void;
22
- minWidth: number;
23
- maxWidth: number;
24
- };
25
- declare function useSidebar(): SidebarContextProps;
26
13
  declare function SidebarProvider({ defaultOpen, open: openProp, onOpenChange: setOpenProp, className, style, children, ...props }: React.ComponentProps<'div'> & {
27
14
  defaultOpen?: boolean;
28
15
  open?: boolean;
@@ -76,4 +63,4 @@ declare function SidebarMenuSubButton({ asChild, size, isActive, className, ...p
76
63
  isActive?: boolean;
77
64
  }): react_jsx_runtime.JSX.Element;
78
65
 
79
- export { Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, useSidebar };
66
+ export { Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger };
@@ -10,7 +10,7 @@ function cn(...inputs) {
10
10
  // src/components/button.tsx
11
11
  import { Slot } from "@radix-ui/react-slot";
12
12
  import { cva } from "class-variance-authority";
13
- import { jsxs } from "react/jsx-runtime";
13
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
14
14
  var buttonVariants = cva(
15
15
  "inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",
16
16
  {
@@ -49,25 +49,25 @@ function Button({
49
49
  ...props
50
50
  }) {
51
51
  const Comp = asChild ? Slot : "button";
52
- return /* @__PURE__ */ jsxs(
52
+ return /* @__PURE__ */ jsx(
53
53
  Comp,
54
54
  {
55
55
  "data-slot": "button",
56
56
  className: cn(buttonVariants({ variant, size, className })),
57
57
  ...props,
58
- children: [
58
+ children: asChild ? children : /* @__PURE__ */ jsxs(Fragment, { children: [
59
59
  leftIcon,
60
60
  children,
61
61
  rightIcon
62
- ]
62
+ ] })
63
63
  }
64
64
  );
65
65
  }
66
66
 
67
67
  // src/components/input.tsx
68
- import { jsx } from "react/jsx-runtime";
68
+ import { jsx as jsx2 } from "react/jsx-runtime";
69
69
  function Input({ className, type, ...props }) {
70
- return /* @__PURE__ */ jsx(
70
+ return /* @__PURE__ */ jsx2(
71
71
  "input",
72
72
  {
73
73
  type,
@@ -85,14 +85,14 @@ function Input({ className, type, ...props }) {
85
85
 
86
86
  // src/components/separator.tsx
87
87
  import * as SeparatorPrimitive from "@radix-ui/react-separator";
88
- import { jsx as jsx2 } from "react/jsx-runtime";
88
+ import { jsx as jsx3 } from "react/jsx-runtime";
89
89
  function Separator({
90
90
  className,
91
91
  orientation = "horizontal",
92
92
  decorative = true,
93
93
  ...props
94
94
  }) {
95
- return /* @__PURE__ */ jsx2(
95
+ return /* @__PURE__ */ jsx3(
96
96
  SeparatorPrimitive.Root,
97
97
  {
98
98
  "data-slot": "separator",
@@ -110,20 +110,20 @@ function Separator({
110
110
  // src/components/sheet.tsx
111
111
  import * as SheetPrimitive from "@radix-ui/react-dialog";
112
112
  import { IconX } from "@tabler/icons-react";
113
- import { jsx as jsx3, jsxs as jsxs2 } from "react/jsx-runtime";
113
+ import { jsx as jsx4, jsxs as jsxs2 } from "react/jsx-runtime";
114
114
  function Sheet({ ...props }) {
115
- return /* @__PURE__ */ jsx3(SheetPrimitive.Root, { "data-slot": "sheet", ...props });
115
+ return /* @__PURE__ */ jsx4(SheetPrimitive.Root, { "data-slot": "sheet", ...props });
116
116
  }
117
117
  function SheetPortal({
118
118
  ...props
119
119
  }) {
120
- return /* @__PURE__ */ jsx3(SheetPrimitive.Portal, { "data-slot": "sheet-portal", ...props });
120
+ return /* @__PURE__ */ jsx4(SheetPrimitive.Portal, { "data-slot": "sheet-portal", ...props });
121
121
  }
122
122
  function SheetOverlay({
123
123
  className,
124
124
  ...props
125
125
  }) {
126
- return /* @__PURE__ */ jsx3(
126
+ return /* @__PURE__ */ jsx4(
127
127
  SheetPrimitive.Overlay,
128
128
  {
129
129
  "data-slot": "sheet-overlay",
@@ -142,7 +142,7 @@ function SheetContent({
142
142
  ...props
143
143
  }) {
144
144
  return /* @__PURE__ */ jsxs2(SheetPortal, { children: [
145
- /* @__PURE__ */ jsx3(SheetOverlay, {}),
145
+ /* @__PURE__ */ jsx4(SheetOverlay, {}),
146
146
  /* @__PURE__ */ jsxs2(
147
147
  SheetPrimitive.Content,
148
148
  {
@@ -159,8 +159,8 @@ function SheetContent({
159
159
  children: [
160
160
  children,
161
161
  /* @__PURE__ */ jsxs2(SheetPrimitive.Close, { className: "ring-offset-background focus:ring-ring data-[state=open]:bg-secondary absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none", children: [
162
- /* @__PURE__ */ jsx3(IconX, { className: "size-4" }),
163
- /* @__PURE__ */ jsx3("span", { className: "sr-only", children: "Close" })
162
+ /* @__PURE__ */ jsx4(IconX, { className: "size-4" }),
163
+ /* @__PURE__ */ jsx4("span", { className: "sr-only", children: "Close" })
164
164
  ] })
165
165
  ]
166
166
  }
@@ -168,7 +168,7 @@ function SheetContent({
168
168
  ] });
169
169
  }
170
170
  function SheetHeader({ className, ...props }) {
171
- return /* @__PURE__ */ jsx3(
171
+ return /* @__PURE__ */ jsx4(
172
172
  "div",
173
173
  {
174
174
  "data-slot": "sheet-header",
@@ -181,7 +181,7 @@ function SheetTitle({
181
181
  className,
182
182
  ...props
183
183
  }) {
184
- return /* @__PURE__ */ jsx3(
184
+ return /* @__PURE__ */ jsx4(
185
185
  SheetPrimitive.Title,
186
186
  {
187
187
  "data-slot": "sheet-title",
@@ -194,7 +194,7 @@ function SheetDescription({
194
194
  className,
195
195
  ...props
196
196
  }) {
197
- return /* @__PURE__ */ jsx3(
197
+ return /* @__PURE__ */ jsx4(
198
198
  SheetPrimitive.Description,
199
199
  {
200
200
  "data-slot": "sheet-description",
@@ -205,9 +205,9 @@ function SheetDescription({
205
205
  }
206
206
 
207
207
  // src/components/skeleton.tsx
208
- import { jsx as jsx4 } from "react/jsx-runtime";
208
+ import { jsx as jsx5 } from "react/jsx-runtime";
209
209
  function Skeleton({ className, ...props }) {
210
- return /* @__PURE__ */ jsx4(
210
+ return /* @__PURE__ */ jsx5(
211
211
  "div",
212
212
  {
213
213
  "data-slot": "skeleton",
@@ -219,12 +219,12 @@ function Skeleton({ className, ...props }) {
219
219
 
220
220
  // src/components/tooltip.tsx
221
221
  import * as TooltipPrimitive from "@radix-ui/react-tooltip";
222
- import { jsx as jsx5, jsxs as jsxs3 } from "react/jsx-runtime";
222
+ import { jsx as jsx6, jsxs as jsxs3 } from "react/jsx-runtime";
223
223
  function TooltipProvider({
224
224
  delayDuration = 0,
225
225
  ...props
226
226
  }) {
227
- return /* @__PURE__ */ jsx5(
227
+ return /* @__PURE__ */ jsx6(
228
228
  TooltipPrimitive.Provider,
229
229
  {
230
230
  "data-slot": "tooltip-provider",
@@ -237,12 +237,12 @@ function Tooltip({
237
237
  children,
238
238
  ...props
239
239
  }) {
240
- return /* @__PURE__ */ jsx5(TooltipPrimitive.Root, { "data-slot": "tooltip", ...props, children });
240
+ return /* @__PURE__ */ jsx6(TooltipPrimitive.Root, { "data-slot": "tooltip", ...props, children });
241
241
  }
242
242
  function TooltipTrigger({
243
243
  ...props
244
244
  }) {
245
- return /* @__PURE__ */ jsx5(TooltipPrimitive.Trigger, { "data-slot": "tooltip-trigger", ...props });
245
+ return /* @__PURE__ */ jsx6(TooltipPrimitive.Trigger, { "data-slot": "tooltip-trigger", ...props });
246
246
  }
247
247
  function TooltipContent({
248
248
  className,
@@ -250,7 +250,7 @@ function TooltipContent({
250
250
  children,
251
251
  ...props
252
252
  }) {
253
- return /* @__PURE__ */ jsx5(TooltipPrimitive.Portal, { children: /* @__PURE__ */ jsxs3(
253
+ return /* @__PURE__ */ jsx6(TooltipPrimitive.Portal, { children: /* @__PURE__ */ jsxs3(
254
254
  TooltipPrimitive.Content,
255
255
  {
256
256
  "data-slot": "tooltip-content",
@@ -262,7 +262,7 @@ function TooltipContent({
262
262
  ...props,
263
263
  children: [
264
264
  children,
265
- /* @__PURE__ */ jsx5(TooltipPrimitive.Arrow, { className: "bg-foreground fill-foreground z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]" })
265
+ /* @__PURE__ */ jsx6(TooltipPrimitive.Arrow, { className: "bg-foreground fill-foreground z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]" })
266
266
  ]
267
267
  }
268
268
  ) });
@@ -291,8 +291,21 @@ function useIsMobile() {
291
291
  import { Slot as Slot2 } from "@radix-ui/react-slot";
292
292
  import { IconMenu2 } from "@tabler/icons-react";
293
293
  import { cva as cva2 } from "class-variance-authority";
294
+ import * as React3 from "react";
295
+
296
+ // src/components/sidebar-context.tsx
294
297
  import * as React2 from "react";
295
- import { jsx as jsx6, jsxs as jsxs4 } from "react/jsx-runtime";
298
+ var SidebarContext = React2.createContext(null);
299
+ function useSidebar() {
300
+ const context = React2.useContext(SidebarContext);
301
+ if (!context) {
302
+ throw new Error("useSidebar must be used within a SidebarProvider.");
303
+ }
304
+ return context;
305
+ }
306
+
307
+ // src/components/sidebar.tsx
308
+ import { jsx as jsx7, jsxs as jsxs4 } from "react/jsx-runtime";
296
309
  var SIDEBAR_COOKIE_NAME = "sidebar_state";
297
310
  var SIDEBAR_WIDTH_COOKIE = "sidebar_width";
298
311
  var SIDEBAR_COOKIE_MAX_AGE = 60 * 60 * 24 * 7;
@@ -316,14 +329,6 @@ function getWidthFromCookie() {
316
329
  function setWidthCookie(width) {
317
330
  document.cookie = `${SIDEBAR_WIDTH_COOKIE}=${width}; path=/; max-age=${SIDEBAR_COOKIE_MAX_AGE}`;
318
331
  }
319
- var SidebarContext = React2.createContext(null);
320
- function useSidebar() {
321
- const context = React2.useContext(SidebarContext);
322
- if (!context) {
323
- throw new Error("useSidebar must be used within a SidebarProvider.");
324
- }
325
- return context;
326
- }
327
332
  function SidebarProvider({
328
333
  defaultOpen = true,
329
334
  open: openProp,
@@ -334,16 +339,16 @@ function SidebarProvider({
334
339
  ...props
335
340
  }) {
336
341
  const isMobile = useIsMobile();
337
- const [openMobile, setOpenMobile] = React2.useState(false);
338
- const [width, setWidthState] = React2.useState(getWidthFromCookie);
339
- const setWidth = React2.useCallback((w) => {
342
+ const [openMobile, setOpenMobile] = React3.useState(false);
343
+ const [width, setWidthState] = React3.useState(getWidthFromCookie);
344
+ const setWidth = React3.useCallback((w) => {
340
345
  const clamped = Math.max(SIDEBAR_WIDTH_MIN, Math.min(SIDEBAR_WIDTH_MAX, w));
341
346
  setWidthState(clamped);
342
347
  setWidthCookie(clamped);
343
348
  }, []);
344
- const [_open, _setOpen] = React2.useState(defaultOpen);
349
+ const [_open, _setOpen] = React3.useState(defaultOpen);
345
350
  const open = openProp ?? _open;
346
- const setOpen = React2.useCallback(
351
+ const setOpen = React3.useCallback(
347
352
  (value) => {
348
353
  const openState = typeof value === "function" ? value(open) : value;
349
354
  if (setOpenProp) {
@@ -355,10 +360,10 @@ function SidebarProvider({
355
360
  },
356
361
  [open, setOpenProp]
357
362
  );
358
- const toggleSidebar = React2.useCallback(() => {
363
+ const toggleSidebar = React3.useCallback(() => {
359
364
  return isMobile ? setOpenMobile((value) => !value) : setOpen((value) => !value);
360
365
  }, [isMobile, setOpen]);
361
- React2.useEffect(() => {
366
+ React3.useEffect(() => {
362
367
  const handleKeyDown = (event) => {
363
368
  if (event.key === SIDEBAR_KEYBOARD_SHORTCUT && (event.metaKey || event.ctrlKey)) {
364
369
  event.preventDefault();
@@ -383,7 +388,7 @@ function SidebarProvider({
383
388
  maxWidth: SIDEBAR_WIDTH_MAX
384
389
  };
385
390
  const sidebarWidthValue = open ? `${width}px` : SIDEBAR_WIDTH;
386
- return /* @__PURE__ */ jsx6(SidebarContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsx6(TooltipProvider, { delayDuration: 0, children: /* @__PURE__ */ jsx6(
391
+ return /* @__PURE__ */ jsx7(SidebarContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsx7(TooltipProvider, { delayDuration: 0, children: /* @__PURE__ */ jsx7(
387
392
  "div",
388
393
  {
389
394
  "data-slot": "sidebar-wrapper",
@@ -411,7 +416,7 @@ function Sidebar({
411
416
  }) {
412
417
  const { isMobile, state, openMobile, setOpenMobile } = useSidebar();
413
418
  if (collapsible === "none") {
414
- return /* @__PURE__ */ jsx6(
419
+ return /* @__PURE__ */ jsx7(
415
420
  "div",
416
421
  {
417
422
  "data-slot": "sidebar",
@@ -425,7 +430,7 @@ function Sidebar({
425
430
  );
426
431
  }
427
432
  if (isMobile) {
428
- return /* @__PURE__ */ jsx6(Sheet, { open: openMobile, onOpenChange: setOpenMobile, ...props, children: /* @__PURE__ */ jsxs4(
433
+ return /* @__PURE__ */ jsx7(Sheet, { open: openMobile, onOpenChange: setOpenMobile, ...props, children: /* @__PURE__ */ jsxs4(
429
434
  SheetContent,
430
435
  {
431
436
  "data-sidebar": "sidebar",
@@ -438,10 +443,10 @@ function Sidebar({
438
443
  side,
439
444
  children: [
440
445
  /* @__PURE__ */ jsxs4(SheetHeader, { className: "sr-only", children: [
441
- /* @__PURE__ */ jsx6(SheetTitle, { children: "Sidebar" }),
442
- /* @__PURE__ */ jsx6(SheetDescription, { children: "Displays the mobile sidebar." })
446
+ /* @__PURE__ */ jsx7(SheetTitle, { children: "Sidebar" }),
447
+ /* @__PURE__ */ jsx7(SheetDescription, { children: "Displays the mobile sidebar." })
443
448
  ] }),
444
- /* @__PURE__ */ jsx6("div", { className: "flex h-full w-full flex-col", children })
449
+ /* @__PURE__ */ jsx7("div", { className: "flex h-full w-full flex-col", children })
445
450
  ]
446
451
  }
447
452
  ) });
@@ -456,7 +461,7 @@ function Sidebar({
456
461
  "data-side": side,
457
462
  "data-slot": "sidebar",
458
463
  children: [
459
- /* @__PURE__ */ jsx6(
464
+ /* @__PURE__ */ jsx7(
460
465
  "div",
461
466
  {
462
467
  "data-slot": "sidebar-gap",
@@ -468,7 +473,7 @@ function Sidebar({
468
473
  )
469
474
  }
470
475
  ),
471
- /* @__PURE__ */ jsx6(
476
+ /* @__PURE__ */ jsx7(
472
477
  "div",
473
478
  {
474
479
  "data-slot": "sidebar-container",
@@ -480,7 +485,7 @@ function Sidebar({
480
485
  className
481
486
  ),
482
487
  ...props,
483
- children: /* @__PURE__ */ jsx6(
488
+ children: /* @__PURE__ */ jsx7(
484
489
  "div",
485
490
  {
486
491
  "data-sidebar": "sidebar",
@@ -515,15 +520,15 @@ function SidebarTrigger({
515
520
  },
516
521
  ...props,
517
522
  children: [
518
- /* @__PURE__ */ jsx6(IconMenu2, {}),
519
- /* @__PURE__ */ jsx6("span", { className: "sr-only", children: "Toggle Sidebar" })
523
+ /* @__PURE__ */ jsx7(IconMenu2, {}),
524
+ /* @__PURE__ */ jsx7("span", { className: "sr-only", children: "Toggle Sidebar" })
520
525
  ]
521
526
  }
522
527
  );
523
528
  }
524
529
  function SidebarRail({ className, ...props }) {
525
530
  const { toggleSidebar } = useSidebar();
526
- return /* @__PURE__ */ jsx6(
531
+ return /* @__PURE__ */ jsx7(
527
532
  "button",
528
533
  {
529
534
  "data-sidebar": "rail",
@@ -546,7 +551,7 @@ function SidebarRail({ className, ...props }) {
546
551
  );
547
552
  }
548
553
  function SidebarInset({ className, ...props }) {
549
- return /* @__PURE__ */ jsx6(
554
+ return /* @__PURE__ */ jsx7(
550
555
  "main",
551
556
  {
552
557
  "data-slot": "sidebar-inset",
@@ -563,7 +568,7 @@ function SidebarInput({
563
568
  className,
564
569
  ...props
565
570
  }) {
566
- return /* @__PURE__ */ jsx6(
571
+ return /* @__PURE__ */ jsx7(
567
572
  Input,
568
573
  {
569
574
  "data-slot": "sidebar-input",
@@ -574,7 +579,7 @@ function SidebarInput({
574
579
  );
575
580
  }
576
581
  function SidebarHeader({ className, ...props }) {
577
- return /* @__PURE__ */ jsx6(
582
+ return /* @__PURE__ */ jsx7(
578
583
  "div",
579
584
  {
580
585
  "data-slot": "sidebar-header",
@@ -585,7 +590,7 @@ function SidebarHeader({ className, ...props }) {
585
590
  );
586
591
  }
587
592
  function SidebarFooter({ className, ...props }) {
588
- return /* @__PURE__ */ jsx6(
593
+ return /* @__PURE__ */ jsx7(
589
594
  "div",
590
595
  {
591
596
  "data-slot": "sidebar-footer",
@@ -599,7 +604,7 @@ function SidebarSeparator({
599
604
  className,
600
605
  ...props
601
606
  }) {
602
- return /* @__PURE__ */ jsx6(
607
+ return /* @__PURE__ */ jsx7(
603
608
  Separator,
604
609
  {
605
610
  "data-slot": "sidebar-separator",
@@ -610,7 +615,7 @@ function SidebarSeparator({
610
615
  );
611
616
  }
612
617
  function SidebarContent({ className, ...props }) {
613
- return /* @__PURE__ */ jsx6(
618
+ return /* @__PURE__ */ jsx7(
614
619
  "div",
615
620
  {
616
621
  "data-slot": "sidebar-content",
@@ -624,7 +629,7 @@ function SidebarContent({ className, ...props }) {
624
629
  );
625
630
  }
626
631
  function SidebarGroup({ className, ...props }) {
627
- return /* @__PURE__ */ jsx6(
632
+ return /* @__PURE__ */ jsx7(
628
633
  "div",
629
634
  {
630
635
  "data-slot": "sidebar-group",
@@ -640,7 +645,7 @@ function SidebarGroupLabel({
640
645
  ...props
641
646
  }) {
642
647
  const Comp = asChild ? Slot2 : "div";
643
- return /* @__PURE__ */ jsx6(
648
+ return /* @__PURE__ */ jsx7(
644
649
  Comp,
645
650
  {
646
651
  "data-slot": "sidebar-group-label",
@@ -660,7 +665,7 @@ function SidebarGroupAction({
660
665
  ...props
661
666
  }) {
662
667
  const Comp = asChild ? Slot2 : "button";
663
- return /* @__PURE__ */ jsx6(
668
+ return /* @__PURE__ */ jsx7(
664
669
  Comp,
665
670
  {
666
671
  "data-slot": "sidebar-group-action",
@@ -680,7 +685,7 @@ function SidebarGroupContent({
680
685
  className,
681
686
  ...props
682
687
  }) {
683
- return /* @__PURE__ */ jsx6(
688
+ return /* @__PURE__ */ jsx7(
684
689
  "div",
685
690
  {
686
691
  "data-slot": "sidebar-group-content",
@@ -691,7 +696,7 @@ function SidebarGroupContent({
691
696
  );
692
697
  }
693
698
  function SidebarMenu({ className, ...props }) {
694
- return /* @__PURE__ */ jsx6(
699
+ return /* @__PURE__ */ jsx7(
695
700
  "ul",
696
701
  {
697
702
  "data-slot": "sidebar-menu",
@@ -702,7 +707,7 @@ function SidebarMenu({ className, ...props }) {
702
707
  );
703
708
  }
704
709
  function SidebarMenuItem({ className, ...props }) {
705
- return /* @__PURE__ */ jsx6(
710
+ return /* @__PURE__ */ jsx7(
706
711
  "li",
707
712
  {
708
713
  "data-slot": "sidebar-menu-item",
@@ -743,7 +748,7 @@ function SidebarMenuButton({
743
748
  }) {
744
749
  const Comp = asChild ? Slot2 : "button";
745
750
  const { isMobile, state } = useSidebar();
746
- const button = /* @__PURE__ */ jsx6(
751
+ const button = /* @__PURE__ */ jsx7(
747
752
  Comp,
748
753
  {
749
754
  "data-slot": "sidebar-menu-button",
@@ -763,8 +768,8 @@ function SidebarMenuButton({
763
768
  };
764
769
  }
765
770
  return /* @__PURE__ */ jsxs4(Tooltip, { children: [
766
- /* @__PURE__ */ jsx6(TooltipTrigger, { asChild: true, children: button }),
767
- /* @__PURE__ */ jsx6(
771
+ /* @__PURE__ */ jsx7(TooltipTrigger, { asChild: true, children: button }),
772
+ /* @__PURE__ */ jsx7(
768
773
  TooltipContent,
769
774
  {
770
775
  side: "right",
@@ -782,7 +787,7 @@ function SidebarMenuAction({
782
787
  ...props
783
788
  }) {
784
789
  const Comp = asChild ? Slot2 : "button";
785
- return /* @__PURE__ */ jsx6(
790
+ return /* @__PURE__ */ jsx7(
786
791
  Comp,
787
792
  {
788
793
  "data-slot": "sidebar-menu-action",
@@ -806,7 +811,7 @@ function SidebarMenuBadge({
806
811
  className,
807
812
  ...props
808
813
  }) {
809
- return /* @__PURE__ */ jsx6(
814
+ return /* @__PURE__ */ jsx7(
810
815
  "div",
811
816
  {
812
817
  "data-slot": "sidebar-menu-badge",
@@ -829,7 +834,7 @@ function SidebarMenuSkeleton({
829
834
  showIcon = false,
830
835
  ...props
831
836
  }) {
832
- const [width] = React2.useState(
837
+ const [width] = React3.useState(
833
838
  () => `${Math.floor(Math.random() * 40) + 50}%`
834
839
  );
835
840
  return /* @__PURE__ */ jsxs4(
@@ -840,14 +845,14 @@ function SidebarMenuSkeleton({
840
845
  className: cn("flex h-8 items-center gap-2 rounded-md px-2", className),
841
846
  ...props,
842
847
  children: [
843
- showIcon && /* @__PURE__ */ jsx6(
848
+ showIcon && /* @__PURE__ */ jsx7(
844
849
  Skeleton,
845
850
  {
846
851
  className: "size-4 rounded-md",
847
852
  "data-sidebar": "menu-skeleton-icon"
848
853
  }
849
854
  ),
850
- /* @__PURE__ */ jsx6(
855
+ /* @__PURE__ */ jsx7(
851
856
  Skeleton,
852
857
  {
853
858
  className: "h-4 max-w-(--skeleton-width) flex-1",
@@ -862,7 +867,7 @@ function SidebarMenuSkeleton({
862
867
  );
863
868
  }
864
869
  function SidebarMenuSub({ className, ...props }) {
865
- return /* @__PURE__ */ jsx6(
870
+ return /* @__PURE__ */ jsx7(
866
871
  "ul",
867
872
  {
868
873
  "data-slot": "sidebar-menu-sub",
@@ -880,7 +885,7 @@ function SidebarMenuSubItem({
880
885
  className,
881
886
  ...props
882
887
  }) {
883
- return /* @__PURE__ */ jsx6(
888
+ return /* @__PURE__ */ jsx7(
884
889
  "li",
885
890
  {
886
891
  "data-slot": "sidebar-menu-sub-item",
@@ -898,7 +903,7 @@ function SidebarMenuSubButton({
898
903
  ...props
899
904
  }) {
900
905
  const Comp = asChild ? Slot2 : "a";
901
- return /* @__PURE__ */ jsx6(
906
+ return /* @__PURE__ */ jsx7(
902
907
  Comp,
903
908
  {
904
909
  "data-slot": "sidebar-menu-sub-button",