@waveso/ui 0.0.3 → 0.0.4

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 (48) hide show
  1. package/README.md +72 -52
  2. package/dist/accordion.js +1 -1
  3. package/dist/breadcrumb.js +1 -1
  4. package/dist/button.d.ts +1 -1
  5. package/dist/checkbox.js +1 -1
  6. package/dist/{chunk-PGXELRT4.js → chunk-45VQAWIM.js} +3 -3
  7. package/dist/{chunk-PGXELRT4.js.map → chunk-45VQAWIM.js.map} +1 -1
  8. package/dist/{chunk-ZOKFCJWM.js → chunk-6Y7LPQMO.js} +3 -3
  9. package/dist/{chunk-ZOKFCJWM.js.map → chunk-6Y7LPQMO.js.map} +1 -1
  10. package/dist/chunk-7F4MPMLJ.js +17 -0
  11. package/dist/chunk-7F4MPMLJ.js.map +1 -0
  12. package/dist/chunk-7OIQ6YBK.js +66 -0
  13. package/dist/chunk-7OIQ6YBK.js.map +1 -0
  14. package/dist/{chunk-WJDWQFO3.js → chunk-DIGOLJIR.js} +9 -3
  15. package/dist/chunk-DIGOLJIR.js.map +1 -0
  16. package/dist/chunk-PVX4VQFJ.js +143 -0
  17. package/dist/chunk-PVX4VQFJ.js.map +1 -0
  18. package/dist/chunk-ZZZH3JGW.js +23 -0
  19. package/dist/chunk-ZZZH3JGW.js.map +1 -0
  20. package/dist/combobox.js +1 -1
  21. package/dist/context-menu.js +1 -1
  22. package/dist/dialog.js +1 -1
  23. package/dist/drawer.js +4 -141
  24. package/dist/drawer.js.map +1 -1
  25. package/dist/hooks/use-mobile.d.ts +6 -1
  26. package/dist/hooks/use-mobile.js +1 -18
  27. package/dist/hooks/use-mobile.js.map +1 -1
  28. package/dist/infinite-scroll.js +2 -2
  29. package/dist/input-group.d.ts +1 -1
  30. package/dist/input-otp.js +1 -1
  31. package/dist/item.d.ts +1 -1
  32. package/dist/masonry.js +1 -1
  33. package/dist/menu.js +2 -2
  34. package/dist/menubar.js +2 -2
  35. package/dist/pagination.js +1 -1
  36. package/dist/select.js +1 -1
  37. package/dist/sidebar.d.ts +112 -0
  38. package/dist/sidebar.js +619 -0
  39. package/dist/sidebar.js.map +1 -0
  40. package/dist/skeleton.js +2 -15
  41. package/dist/skeleton.js.map +1 -1
  42. package/dist/spinner.js +2 -2
  43. package/dist/styles.css +196 -0
  44. package/dist/toast.js +1 -1
  45. package/dist/tooltip.js +2 -64
  46. package/dist/tooltip.js.map +1 -1
  47. package/package.json +6 -3
  48. package/dist/chunk-WJDWQFO3.js.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/drawer.tsx"],"names":["DrawerPrimitive"],"mappings":";;;;;;AAwBA,SAAS,MAAA,CAAO,EAAE,GAAG,KAAA,EAAM,EAAgB;AACzC,EAAA,2BAAQA,aAAA,CAAgB,IAAA,EAAhB,EAAqB,WAAA,EAAU,QAAA,EAAU,GAAG,KAAA,EAAO,CAAA;AAC7D;AAEA,SAAS,aAAA,CAAc,EAAE,GAAG,KAAA,EAAM,EAAuB;AACvD,EAAA,2BAAQA,aAAA,CAAgB,OAAA,EAAhB,EAAwB,WAAA,EAAU,gBAAA,EAAkB,GAAG,KAAA,EAAO,CAAA;AACxE;AAEA,SAAS,YAAA,CAAa,EAAE,GAAG,KAAA,EAAM,EAAsB;AACrD,EAAA,2BAAQA,aAAA,CAAgB,MAAA,EAAhB,EAAuB,WAAA,EAAU,eAAA,EAAiB,GAAG,KAAA,EAAO,CAAA;AACtE;AAEA,SAAS,WAAA,CAAY,EAAE,GAAG,KAAA,EAAM,EAAqB;AACnD,EAAA,2BAAQA,aAAA,CAAgB,KAAA,EAAhB,EAAsB,WAAA,EAAU,cAAA,EAAgB,GAAG,KAAA,EAAO,CAAA;AACpE;AAEA,SAAS,aAAA,CAAc,EAAE,SAAA,EAAW,GAAG,OAAM,EAAuB;AAClE,EAAA,uBACE,GAAA;AAAA,IAACA,aAAA,CAAgB,QAAA;AAAA,IAAhB;AAAA,MACC,WAAA,EAAU,g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from \"react\"\nimport { DrawerPreview as DrawerPrimitive } from \"@base-ui/react/drawer\"\n\nimport { cn } from \"./lib/utils\"\nimport { Button } from \"./button\"\nimport { CloseIcon } from \"./lib/internal-icons\"\n\ntype DrawerProps = React.ComponentProps<typeof DrawerPrimitive.Root>\ntype DrawerTriggerProps = React.ComponentProps<typeof DrawerPrimitive.Trigger>\ntype DrawerPortalProps = React.ComponentProps<typeof DrawerPrimitive.Portal>\ntype DrawerCloseProps = React.ComponentProps<typeof DrawerPrimitive.Close>\ntype DrawerOverlayProps = React.ComponentProps<typeof DrawerPrimitive.Backdrop>\ntype DrawerPopupProps = React.ComponentProps<typeof DrawerPrimitive.Popup>\ntype DrawerTitleProps = React.ComponentProps<typeof DrawerPrimitive.Title>\ntype DrawerDescriptionProps = React.ComponentProps<typeof DrawerPrimitive.Description>\ntype DrawerHeaderProps = React.ComponentProps<\"div\">\ntype DrawerFooterProps = React.ComponentProps<\"div\">\n\ntype DrawerContentProps = DrawerPopupProps & {\n showCloseButton?: boolean\n}\n\nfunction Drawer({ ...props }: DrawerProps) {\n return <DrawerPrimitive.Root data-slot=\"drawer\" {...props} />\n}\n\nfunction DrawerTrigger({ ...props }: DrawerTriggerProps) {\n return <DrawerPrimitive.Trigger data-slot=\"drawer-trigger\" {...props} />\n}\n\nfunction DrawerPortal({ ...props }: DrawerPortalProps) {\n return <DrawerPrimitive.Portal data-slot=\"drawer-portal\" {...props} />\n}\n\nfunction DrawerClose({ ...props }: DrawerCloseProps) {\n return <DrawerPrimitive.Close data-slot=\"drawer-close\" {...props} />\n}\n\nfunction DrawerOverlay({ className, ...props }: DrawerOverlayProps) {\n return (\n <DrawerPrimitive.Backdrop\n data-slot=\"drawer-overlay\"\n className={cn(\n \"fixed inset-0 z-50 bg-black/10 transition-opacity duration-300 data-[starting-style]:opacity-0 data-[ending-style]:opacity-0 supports-backdrop-filter:backdrop-blur-xs\",\n className,\n )}\n {...props}\n />\n )\n}\n\nfunction DrawerContent({\n className,\n children,\n showCloseButton = false,\n ...props\n}: DrawerContentProps) {\n return (\n <DrawerPortal>\n <DrawerOverlay />\n <DrawerPrimitive.Popup\n data-slot=\"drawer-content\"\n className={cn(\n // Base layout & appearance\n \"group/drawer-content bg-background fixed z-50 flex flex-col overflow-y-auto text-sm shadow-lg outline-none\",\n // Transition — animate translate, disable during swipe\n \"transition-[translate] duration-300 ease-out data-[swiping]:duration-0\",\n // Bottom drawer (swipeDirection=\"down\")\n \"data-[swipe-direction=down]:inset-x-0 data-[swipe-direction=down]:bottom-0 data-[swipe-direction=down]:mt-24 data-[swipe-direction=down]:max-h-[80vh] data-[swipe-direction=down]:rounded-t-xl data-[swipe-direction=down]:border-t\",\n // Top drawer (swipeDirection=\"up\")\n \"data-[swipe-direction=up]:inset-x-0 data-[swipe-direction=up]:top-0 data-[swipe-direction=up]:mb-24 data-[swipe-direction=up]:max-h-[80vh] data-[swipe-direction=up]:rounded-b-xl data-[swipe-direction=up]:border-b\",\n // Left drawer (swipeDirection=\"left\")\n \"data-[swipe-direction=left]:inset-y-0 data-[swipe-direction=left]:left-0 data-[swipe-direction=left]:w-3/4 data-[swipe-direction=left]:rounded-r-xl data-[swipe-direction=left]:border-r data-[swipe-direction=left]:sm:max-w-sm\",\n // Right drawer (swipeDirection=\"right\")\n \"data-[swipe-direction=right]:inset-y-0 data-[swipe-direction=right]:right-0 data-[swipe-direction=right]:w-3/4 data-[swipe-direction=right]:rounded-l-xl data-[swipe-direction=right]:border-l data-[swipe-direction=right]:sm:max-w-sm\",\n // Enter/exit slide — bottom\n \"data-[swipe-direction=down]:data-[starting-style]:translate-y-full data-[swipe-direction=down]:data-[ending-style]:translate-y-full\",\n // Enter/exit slide — top\n \"data-[swipe-direction=up]:data-[starting-style]:-translate-y-full data-[swipe-direction=up]:data-[ending-style]:-translate-y-full\",\n // Enter/exit slide — left\n \"data-[swipe-direction=left]:data-[starting-style]:-translate-x-full data-[swipe-direction=left]:data-[ending-style]:-translate-x-full\",\n // Enter/exit slide — right\n \"data-[swipe-direction=right]:data-[starting-style]:translate-x-full data-[swipe-direction=right]:data-[ending-style]:translate-x-full\",\n className,\n )}\n {...props}\n >\n {/* Drag handle — visible only for bottom drawers */}\n <div className=\"bg-muted mx-auto mt-4 hidden h-1 w-[100px] shrink-0 rounded-full group-data-[swipe-direction=down]/drawer-content:block\" />\n {children}\n {showCloseButton && (\n <DrawerPrimitive.Close\n data-slot=\"drawer-close\"\n render={\n <Button\n variant=\"ghost\"\n className=\"absolute top-2 right-2\"\n size=\"icon-sm\"\n />\n }\n >\n <CloseIcon />\n <span className=\"sr-only\">Close</span>\n </DrawerPrimitive.Close>\n )}\n </DrawerPrimitive.Popup>\n </DrawerPortal>\n )\n}\n\nfunction DrawerHeader({ className, ...props }: DrawerHeaderProps) {\n return (\n <div\n data-slot=\"drawer-header\"\n className={cn(\n \"flex flex-col gap-0.5 p-4 group-data-[swipe-direction=down]/drawer-content:text-center group-data-[swipe-direction=up]/drawer-content:text-center md:text-left\",\n className,\n )}\n {...props}\n />\n )\n}\n\nfunction DrawerFooter({ className, ...props }: DrawerFooterProps) {\n return (\n <div\n data-slot=\"drawer-footer\"\n className={cn(\"mt-auto flex flex-col gap-2 p-4\", className)}\n {...props}\n />\n )\n}\n\nfunction DrawerTitle({ className, ...props }: DrawerTitleProps) {\n return (\n <DrawerPrimitive.Title\n data-slot=\"drawer-title\"\n className={cn(\"text-foreground text-base font-medium\", className)}\n {...props}\n />\n )\n}\n\nfunction DrawerDescription({\n className,\n ...props\n}: DrawerDescriptionProps) {\n return (\n <DrawerPrimitive.Description\n data-slot=\"drawer-description\"\n className={cn(\"text-muted-foreground text-sm\", className)}\n {...props}\n />\n )\n}\n\nexport {\n Drawer,\n DrawerPortal,\n DrawerOverlay,\n DrawerTrigger,\n DrawerClose,\n DrawerContent,\n DrawerHeader,\n DrawerFooter,\n DrawerTitle,\n DrawerDescription,\n}\n"]}
@@ -0,0 +1,23 @@
1
+ import * as React from 'react';
2
+
3
+ var DEFAULT_MOBILE_BREAKPOINT = 768;
4
+ function useIsMobile(breakpoint = DEFAULT_MOBILE_BREAKPOINT) {
5
+ const [isMobile, setIsMobile] = React.useState(() => {
6
+ if (typeof window === "undefined") return false;
7
+ return window.innerWidth < breakpoint;
8
+ });
9
+ React.useEffect(() => {
10
+ const mql = window.matchMedia(`(max-width: ${breakpoint - 1}px)`);
11
+ const onChange = () => {
12
+ setIsMobile(window.innerWidth < breakpoint);
13
+ };
14
+ mql.addEventListener("change", onChange);
15
+ setIsMobile(window.innerWidth < breakpoint);
16
+ return () => mql.removeEventListener("change", onChange);
17
+ }, [breakpoint]);
18
+ return isMobile;
19
+ }
20
+
21
+ export { useIsMobile };
22
+ //# sourceMappingURL=chunk-ZZZH3JGW.js.map
23
+ //# sourceMappingURL=chunk-ZZZH3JGW.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/hooks/use-mobile.ts"],"names":[],"mappings":";;AAIA,IAAM,yBAAA,GAA4B,GAAA;AAO3B,SAAS,WAAA,CAAY,aAAqB,yBAAA,EAA2B;AAC1E,EAAA,MAAM,CAAC,QAAA,EAAU,WAAW,CAAA,GAAU,eAAS,MAAM;AACnD,IAAA,IAAI,OAAO,MAAA,KAAW,WAAA,EAAa,OAAO,KAAA;AAC1C,IAAA,OAAO,OAAO,UAAA,GAAa,UAAA;AAAA,EAC7B,CAAC,CAAA;AAED,EAAM,gBAAU,MAAM;AACpB,IAAA,MAAM,MAAM,MAAA,CAAO,UAAA,CAAW,CAAA,YAAA,EAAe,UAAA,GAAa,CAAC,CAAA,GAAA,CAAK,CAAA;AAChE,IAAA,MAAM,WAAW,MAAM;AACrB,MAAA,WAAA,CAAY,MAAA,CAAO,aAAa,UAAU,CAAA;AAAA,IAC5C,CAAA;AACA,IAAA,GAAA,CAAI,gBAAA,CAAiB,UAAU,QAAQ,CAAA;AAEvC,IAAA,WAAA,CAAY,MAAA,CAAO,aAAa,UAAU,CAAA;AAC1C,IAAA,OAAO,MAAM,GAAA,CAAI,mBAAA,CAAoB,QAAA,EAAU,QAAQ,CAAA;AAAA,EACzD,CAAA,EAAG,CAAC,UAAU,CAAC,CAAA;AAEf,EAAA,OAAO,QAAA;AACT","file":"chunk-ZZZH3JGW.js","sourcesContent":["'use client';\n\nimport * as React from \"react\";\n\nconst DEFAULT_MOBILE_BREAKPOINT = 768;\n\n/**\n * Returns `true` when the viewport is below the given breakpoint.\n *\n * @param breakpoint - Width in pixels. Defaults to 768.\n */\nexport function useIsMobile(breakpoint: number = DEFAULT_MOBILE_BREAKPOINT) {\n const [isMobile, setIsMobile] = React.useState(() => {\n if (typeof window === 'undefined') return false;\n return window.innerWidth < breakpoint;\n });\n\n React.useEffect(() => {\n const mql = window.matchMedia(`(max-width: ${breakpoint - 1}px)`);\n const onChange = () => {\n setIsMobile(window.innerWidth < breakpoint);\n };\n mql.addEventListener(\"change\", onChange);\n // Sync in case breakpoint prop changed\n setIsMobile(window.innerWidth < breakpoint);\n return () => mql.removeEventListener(\"change\", onChange);\n }, [breakpoint]);\n\n return isMobile;\n}\n"]}
package/dist/combobox.js CHANGED
@@ -2,7 +2,7 @@ import { InputGroupButton, InputGroup, InputGroupInput, InputGroupAddon } from '
2
2
  import './chunk-QRW37LRP.js';
3
3
  import './chunk-QFSEK4M6.js';
4
4
  import { Button } from './chunk-OUFYQLVN.js';
5
- import { ChevronDownIcon, CloseIcon, CheckIcon } from './chunk-WJDWQFO3.js';
5
+ import { ChevronDownIcon, CloseIcon, CheckIcon } from './chunk-DIGOLJIR.js';
6
6
  import { cn } from './chunk-76UQO56T.js';
7
7
  import * as React from 'react';
8
8
  import { Combobox as Combobox$1 } from '@base-ui/react/combobox';
@@ -1,4 +1,4 @@
1
- import { ChevronRightIcon, CheckIcon } from './chunk-WJDWQFO3.js';
1
+ import { ChevronRightIcon, CheckIcon } from './chunk-DIGOLJIR.js';
2
2
  import { cn } from './chunk-76UQO56T.js';
3
3
  import { ContextMenu as ContextMenu$1 } from '@base-ui/react/context-menu';
4
4
  import { jsx, jsxs } from 'react/jsx-runtime';
package/dist/dialog.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { Button } from './chunk-OUFYQLVN.js';
2
- import { CloseIcon } from './chunk-WJDWQFO3.js';
2
+ import { CloseIcon } from './chunk-DIGOLJIR.js';
3
3
  import { cn } from './chunk-76UQO56T.js';
4
4
  import { Dialog as Dialog$1 } from '@base-ui/react/dialog';
5
5
  import { jsx, jsxs } from 'react/jsx-runtime';
package/dist/drawer.js CHANGED
@@ -1,143 +1,6 @@
1
- import { Button } from './chunk-OUFYQLVN.js';
2
- import { CloseIcon } from './chunk-WJDWQFO3.js';
3
- import { cn } from './chunk-76UQO56T.js';
4
- import { DrawerPreview } from '@base-ui/react/drawer';
5
- import { jsx, jsxs } from 'react/jsx-runtime';
6
-
7
- function Drawer({ ...props }) {
8
- return /* @__PURE__ */ jsx(DrawerPreview.Root, { "data-slot": "drawer", ...props });
9
- }
10
- function DrawerTrigger({ ...props }) {
11
- return /* @__PURE__ */ jsx(DrawerPreview.Trigger, { "data-slot": "drawer-trigger", ...props });
12
- }
13
- function DrawerPortal({ ...props }) {
14
- return /* @__PURE__ */ jsx(DrawerPreview.Portal, { "data-slot": "drawer-portal", ...props });
15
- }
16
- function DrawerClose({ ...props }) {
17
- return /* @__PURE__ */ jsx(DrawerPreview.Close, { "data-slot": "drawer-close", ...props });
18
- }
19
- function DrawerOverlay({ className, ...props }) {
20
- return /* @__PURE__ */ jsx(
21
- DrawerPreview.Backdrop,
22
- {
23
- "data-slot": "drawer-overlay",
24
- className: cn(
25
- "fixed inset-0 z-50 bg-black/10 transition-opacity duration-300 data-[starting-style]:opacity-0 data-[ending-style]:opacity-0 supports-backdrop-filter:backdrop-blur-xs",
26
- className
27
- ),
28
- ...props
29
- }
30
- );
31
- }
32
- function DrawerContent({
33
- className,
34
- children,
35
- showCloseButton = false,
36
- ...props
37
- }) {
38
- return /* @__PURE__ */ jsxs(DrawerPortal, { children: [
39
- /* @__PURE__ */ jsx(DrawerOverlay, {}),
40
- /* @__PURE__ */ jsxs(
41
- DrawerPreview.Popup,
42
- {
43
- "data-slot": "drawer-content",
44
- className: cn(
45
- // Base layout & appearance
46
- "group/drawer-content bg-background fixed z-50 flex flex-col overflow-y-auto text-sm shadow-lg outline-none",
47
- // Transition — animate translate, disable during swipe
48
- "transition-[translate] duration-300 ease-out data-[swiping]:duration-0",
49
- // Bottom drawer (swipeDirection="down")
50
- "data-[swipe-direction=down]:inset-x-0 data-[swipe-direction=down]:bottom-0 data-[swipe-direction=down]:mt-24 data-[swipe-direction=down]:max-h-[80vh] data-[swipe-direction=down]:rounded-t-xl data-[swipe-direction=down]:border-t",
51
- // Top drawer (swipeDirection="up")
52
- "data-[swipe-direction=up]:inset-x-0 data-[swipe-direction=up]:top-0 data-[swipe-direction=up]:mb-24 data-[swipe-direction=up]:max-h-[80vh] data-[swipe-direction=up]:rounded-b-xl data-[swipe-direction=up]:border-b",
53
- // Left drawer (swipeDirection="left")
54
- "data-[swipe-direction=left]:inset-y-0 data-[swipe-direction=left]:left-0 data-[swipe-direction=left]:w-3/4 data-[swipe-direction=left]:rounded-r-xl data-[swipe-direction=left]:border-r data-[swipe-direction=left]:sm:max-w-sm",
55
- // Right drawer (swipeDirection="right")
56
- "data-[swipe-direction=right]:inset-y-0 data-[swipe-direction=right]:right-0 data-[swipe-direction=right]:w-3/4 data-[swipe-direction=right]:rounded-l-xl data-[swipe-direction=right]:border-l data-[swipe-direction=right]:sm:max-w-sm",
57
- // Enter/exit slide — bottom
58
- "data-[swipe-direction=down]:data-[starting-style]:translate-y-full data-[swipe-direction=down]:data-[ending-style]:translate-y-full",
59
- // Enter/exit slide — top
60
- "data-[swipe-direction=up]:data-[starting-style]:-translate-y-full data-[swipe-direction=up]:data-[ending-style]:-translate-y-full",
61
- // Enter/exit slide — left
62
- "data-[swipe-direction=left]:data-[starting-style]:-translate-x-full data-[swipe-direction=left]:data-[ending-style]:-translate-x-full",
63
- // Enter/exit slide — right
64
- "data-[swipe-direction=right]:data-[starting-style]:translate-x-full data-[swipe-direction=right]:data-[ending-style]:translate-x-full",
65
- className
66
- ),
67
- ...props,
68
- children: [
69
- /* @__PURE__ */ jsx("div", { className: "bg-muted mx-auto mt-4 hidden h-1 w-[100px] shrink-0 rounded-full group-data-[swipe-direction=down]/drawer-content:block" }),
70
- children,
71
- showCloseButton && /* @__PURE__ */ jsxs(
72
- DrawerPreview.Close,
73
- {
74
- "data-slot": "drawer-close",
75
- render: /* @__PURE__ */ jsx(
76
- Button,
77
- {
78
- variant: "ghost",
79
- className: "absolute top-2 right-2",
80
- size: "icon-sm"
81
- }
82
- ),
83
- children: [
84
- /* @__PURE__ */ jsx(CloseIcon, {}),
85
- /* @__PURE__ */ jsx("span", { className: "sr-only", children: "Close" })
86
- ]
87
- }
88
- )
89
- ]
90
- }
91
- )
92
- ] });
93
- }
94
- function DrawerHeader({ className, ...props }) {
95
- return /* @__PURE__ */ jsx(
96
- "div",
97
- {
98
- "data-slot": "drawer-header",
99
- className: cn(
100
- "flex flex-col gap-0.5 p-4 group-data-[swipe-direction=down]/drawer-content:text-center group-data-[swipe-direction=up]/drawer-content:text-center md:text-left",
101
- className
102
- ),
103
- ...props
104
- }
105
- );
106
- }
107
- function DrawerFooter({ className, ...props }) {
108
- return /* @__PURE__ */ jsx(
109
- "div",
110
- {
111
- "data-slot": "drawer-footer",
112
- className: cn("mt-auto flex flex-col gap-2 p-4", className),
113
- ...props
114
- }
115
- );
116
- }
117
- function DrawerTitle({ className, ...props }) {
118
- return /* @__PURE__ */ jsx(
119
- DrawerPreview.Title,
120
- {
121
- "data-slot": "drawer-title",
122
- className: cn("text-foreground text-base font-medium", className),
123
- ...props
124
- }
125
- );
126
- }
127
- function DrawerDescription({
128
- className,
129
- ...props
130
- }) {
131
- return /* @__PURE__ */ jsx(
132
- DrawerPreview.Description,
133
- {
134
- "data-slot": "drawer-description",
135
- className: cn("text-muted-foreground text-sm", className),
136
- ...props
137
- }
138
- );
139
- }
140
-
141
- export { Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger };
1
+ export { Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger } from './chunk-PVX4VQFJ.js';
2
+ import './chunk-OUFYQLVN.js';
3
+ import './chunk-DIGOLJIR.js';
4
+ import './chunk-76UQO56T.js';
142
5
  //# sourceMappingURL=drawer.js.map
143
6
  //# sourceMappingURL=drawer.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/drawer.tsx"],"names":["DrawerPrimitive"],"mappings":";;;;;;AAwBA,SAAS,MAAA,CAAO,EAAE,GAAG,KAAA,EAAM,EAAgB;AACzC,EAAA,2BAAQA,aAAA,CAAgB,IAAA,EAAhB,EAAqB,WAAA,EAAU,QAAA,EAAU,GAAG,KAAA,EAAO,CAAA;AAC7D;AAEA,SAAS,aAAA,CAAc,EAAE,GAAG,KAAA,EAAM,EAAuB;AACvD,EAAA,2BAAQA,aAAA,CAAgB,OAAA,EAAhB,EAAwB,WAAA,EAAU,gBAAA,EAAkB,GAAG,KAAA,EAAO,CAAA;AACxE;AAEA,SAAS,YAAA,CAAa,EAAE,GAAG,KAAA,EAAM,EAAsB;AACrD,EAAA,2BAAQA,aAAA,CAAgB,MAAA,EAAhB,EAAuB,WAAA,EAAU,eAAA,EAAiB,GAAG,KAAA,EAAO,CAAA;AACtE;AAEA,SAAS,WAAA,CAAY,EAAE,GAAG,KAAA,EAAM,EAAqB;AACnD,EAAA,2BAAQA,aAAA,CAAgB,KAAA,EAAhB,EAAsB,WAAA,EAAU,cAAA,EAAgB,GAAG,KAAA,EAAO,CAAA;AACpE;AAEA,SAAS,aAAA,CAAc,EAAE,SAAA,EAAW,GAAG,OAAM,EAAuB;AAClE,EAAA,uBACE,GAAA;AAAA,IAACA,aAAA,CAAgB,QAAA;AAAA,IAAhB;AAAA,MACC,W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from \"react\"\nimport { DrawerPreview as DrawerPrimitive } from \"@base-ui/react/drawer\"\n\nimport { cn } from \"./lib/utils\"\nimport { Button } from \"./button\"\nimport { CloseIcon } from \"./lib/internal-icons\"\n\ntype DrawerProps = React.ComponentProps<typeof DrawerPrimitive.Root>\ntype DrawerTriggerProps = React.ComponentProps<typeof DrawerPrimitive.Trigger>\ntype DrawerPortalProps = React.ComponentProps<typeof DrawerPrimitive.Portal>\ntype DrawerCloseProps = React.ComponentProps<typeof DrawerPrimitive.Close>\ntype DrawerOverlayProps = React.ComponentProps<typeof DrawerPrimitive.Backdrop>\ntype DrawerPopupProps = React.ComponentProps<typeof DrawerPrimitive.Popup>\ntype DrawerTitleProps = React.ComponentProps<typeof DrawerPrimitive.Title>\ntype DrawerDescriptionProps = React.ComponentProps<typeof DrawerPrimitive.Description>\ntype DrawerHeaderProps = React.ComponentProps<\"div\">\ntype DrawerFooterProps = React.ComponentProps<\"div\">\n\ntype DrawerContentProps = DrawerPopupProps & {\n showCloseButton?: boolean\n}\n\nfunction Drawer({ ...props }: DrawerProps) {\n return <DrawerPrimitive.Root data-slot=\"drawer\" {...props} />\n}\n\nfunction DrawerTrigger({ ...props }: DrawerTriggerProps) {\n return <DrawerPrimitive.Trigger data-slot=\"drawer-trigger\" {...props} />\n}\n\nfunction DrawerPortal({ ...props }: DrawerPortalProps) {\n return <DrawerPrimitive.Portal data-slot=\"drawer-portal\" {...props} />\n}\n\nfunction DrawerClose({ ...props }: DrawerCloseProps) {\n return <DrawerPrimitive.Close data-slot=\"drawer-close\" {...props} />\n}\n\nfunction DrawerOverlay({ className, ...props }: DrawerOverlayProps) {\n return (\n <DrawerPrimitive.Backdrop\n data-slot=\"drawer-overlay\"\n className={cn(\n \"fixed inset-0 z-50 bg-black/10 transition-opacity duration-300 data-[starting-style]:opacity-0 data-[ending-style]:opacity-0 supports-backdrop-filter:backdrop-blur-xs\",\n className,\n )}\n {...props}\n />\n )\n}\n\nfunction DrawerContent({\n className,\n children,\n showCloseButton = false,\n ...props\n}: DrawerContentProps) {\n return (\n <DrawerPortal>\n <DrawerOverlay />\n <DrawerPrimitive.Popup\n data-slot=\"drawer-content\"\n className={cn(\n // Base layout & appearance\n \"group/drawer-content bg-background fixed z-50 flex flex-col overflow-y-auto text-sm shadow-lg outline-none\",\n // Transition — animate translate, disable during swipe\n \"transition-[translate] duration-300 ease-out data-[swiping]:duration-0\",\n // Bottom drawer (swipeDirection=\"down\")\n \"data-[swipe-direction=down]:inset-x-0 data-[swipe-direction=down]:bottom-0 data-[swipe-direction=down]:mt-24 data-[swipe-direction=down]:max-h-[80vh] data-[swipe-direction=down]:rounded-t-xl data-[swipe-direction=down]:border-t\",\n // Top drawer (swipeDirection=\"up\")\n \"data-[swipe-direction=up]:inset-x-0 data-[swipe-direction=up]:top-0 data-[swipe-direction=up]:mb-24 data-[swipe-direction=up]:max-h-[80vh] data-[swipe-direction=up]:rounded-b-xl data-[swipe-direction=up]:border-b\",\n // Left drawer (swipeDirection=\"left\")\n \"data-[swipe-direction=left]:inset-y-0 data-[swipe-direction=left]:left-0 data-[swipe-direction=left]:w-3/4 data-[swipe-direction=left]:rounded-r-xl data-[swipe-direction=left]:border-r data-[swipe-direction=left]:sm:max-w-sm\",\n // Right drawer (swipeDirection=\"right\")\n \"data-[swipe-direction=right]:inset-y-0 data-[swipe-direction=right]:right-0 data-[swipe-direction=right]:w-3/4 data-[swipe-direction=right]:rounded-l-xl data-[swipe-direction=right]:border-l data-[swipe-direction=right]:sm:max-w-sm\",\n // Enter/exit slide — bottom\n \"data-[swipe-direction=down]:data-[starting-style]:translate-y-full data-[swipe-direction=down]:data-[ending-style]:translate-y-full\",\n // Enter/exit slide — top\n \"data-[swipe-direction=up]:data-[starting-style]:-translate-y-full data-[swipe-direction=up]:data-[ending-style]:-translate-y-full\",\n // Enter/exit slide — left\n \"data-[swipe-direction=left]:data-[starting-style]:-translate-x-full data-[swipe-direction=left]:data-[ending-style]:-translate-x-full\",\n // Enter/exit slide — right\n \"data-[swipe-direction=right]:data-[starting-style]:translate-x-full data-[swipe-direction=right]:data-[ending-style]:translate-x-full\",\n className,\n )}\n {...props}\n >\n {/* Drag handle — visible only for bottom drawers */}\n <div className=\"bg-muted mx-auto mt-4 hidden h-1 w-[100px] shrink-0 rounded-full group-data-[swipe-direction=down]/drawer-content:block\" />\n {children}\n {showCloseButton && (\n <DrawerPrimitive.Close\n data-slot=\"drawer-close\"\n render={\n <Button\n variant=\"ghost\"\n className=\"absolute top-2 right-2\"\n size=\"icon-sm\"\n />\n }\n >\n <CloseIcon />\n <span className=\"sr-only\">Close</span>\n </DrawerPrimitive.Close>\n )}\n </DrawerPrimitive.Popup>\n </DrawerPortal>\n )\n}\n\nfunction DrawerHeader({ className, ...props }: DrawerHeaderProps) {\n return (\n <div\n data-slot=\"drawer-header\"\n className={cn(\n \"flex flex-col gap-0.5 p-4 group-data-[swipe-direction=down]/drawer-content:text-center group-data-[swipe-direction=up]/drawer-content:text-center md:text-left\",\n className,\n )}\n {...props}\n />\n )\n}\n\nfunction DrawerFooter({ className, ...props }: DrawerFooterProps) {\n return (\n <div\n data-slot=\"drawer-footer\"\n className={cn(\"mt-auto flex flex-col gap-2 p-4\", className)}\n {...props}\n />\n )\n}\n\nfunction DrawerTitle({ className, ...props }: DrawerTitleProps) {\n return (\n <DrawerPrimitive.Title\n data-slot=\"drawer-title\"\n className={cn(\"text-foreground text-base font-medium\", className)}\n {...props}\n />\n )\n}\n\nfunction DrawerDescription({\n className,\n ...props\n}: DrawerDescriptionProps) {\n return (\n <DrawerPrimitive.Description\n data-slot=\"drawer-description\"\n className={cn(\"text-muted-foreground text-sm\", className)}\n {...props}\n />\n )\n}\n\nexport {\n Drawer,\n DrawerPortal,\n DrawerOverlay,\n DrawerTrigger,\n DrawerClose,\n DrawerContent,\n DrawerHeader,\n DrawerFooter,\n DrawerTitle,\n DrawerDescription,\n}\n"]}
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"drawer.js"}
@@ -1,3 +1,8 @@
1
- declare function useIsMobile(): boolean;
1
+ /**
2
+ * Returns `true` when the viewport is below the given breakpoint.
3
+ *
4
+ * @param breakpoint - Width in pixels. Defaults to 768.
5
+ */
6
+ declare function useIsMobile(breakpoint?: number): boolean;
2
7
 
3
8
  export { useIsMobile };
@@ -1,20 +1,3 @@
1
- import * as React from 'react';
2
-
3
- var MOBILE_BREAKPOINT = 768;
4
- function useIsMobile() {
5
- const [isMobile, setIsMobile] = React.useState(void 0);
6
- React.useEffect(() => {
7
- const mql = window.matchMedia(`(max-width: ${MOBILE_BREAKPOINT - 1}px)`);
8
- const onChange = () => {
9
- setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);
10
- };
11
- mql.addEventListener("change", onChange);
12
- setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);
13
- return () => mql.removeEventListener("change", onChange);
14
- }, []);
15
- return !!isMobile;
16
- }
17
-
18
- export { useIsMobile };
1
+ export { useIsMobile } from '../chunk-ZZZH3JGW.js';
19
2
  //# sourceMappingURL=use-mobile.js.map
20
3
  //# sourceMappingURL=use-mobile.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/hooks/use-mobile.ts"],"names":[],"mappings":";;AAIA,IAAM,iBAAA,GAAoB,GAAA;AAEnB,SAAS,WAAA,GAAc;AAC5B,EAAA,MAAM,CAAC,QAAA,EAAU,WAAW,CAAA,GAAU,eAA8B,MAAS,CAAA;AAE7E,EAAM,gBAAU,MAAM;AACpB,IAAA,MAAM,MAAM,MAAA,CAAO,UAAA,CAAW,CAAA,YAAA,EAAe,iBAAA,GAAoB,CAAC,CAAA,GAAA,CAAK,CAAA;AACvE,IAAA,MAAM,WAAW,MAAM;AACrB,MAAA,WAAA,CAAY,MAAA,CAAO,aAAa,iBAAiB,CAAA;AAAA,IACnD,CAAA;AACA,IAAA,GAAA,CAAI,gBAAA,CAAiB,UAAU,QAAQ,CAAA;AACvC,IAAA,WAAA,CAAY,MAAA,CAAO,aAAa,iBAAiB,CAAA;AACjD,IAAA,OAAO,MAAM,GAAA,CAAI,mBAAA,CAAoB,QAAA,EAAU,QAAQ,CAAA;AAAA,EACzD,CAAA,EAAG,EAAE,CAAA;AAEL,EAAA,OAAO,CAAC,CAAC,QAAA;AACX","file":"use-mobile.js","sourcesContent":["'use client';\n\nimport * as React from \"react\";\n\nconst MOBILE_BREAKPOINT = 768;\n\nexport function useIsMobile() {\n const [isMobile, setIsMobile] = React.useState<boolean | undefined>(undefined);\n\n React.useEffect(() => {\n const mql = window.matchMedia(`(max-width: ${MOBILE_BREAKPOINT - 1}px)`);\n const onChange = () => {\n setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);\n };\n mql.addEventListener(\"change\", onChange);\n setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);\n return () => mql.removeEventListener(\"change\", onChange);\n }, []);\n\n return !!isMobile;\n}\n"]}
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"use-mobile.js"}
@@ -1,5 +1,5 @@
1
- import { Spinner } from './chunk-ZOKFCJWM.js';
2
- import './chunk-WJDWQFO3.js';
1
+ import { Spinner } from './chunk-6Y7LPQMO.js';
2
+ import './chunk-DIGOLJIR.js';
3
3
  import { cn } from './chunk-76UQO56T.js';
4
4
  import * as React from 'react';
5
5
  import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
@@ -19,7 +19,7 @@ declare const inputGroupAddonVariants: (props?: ({
19
19
  } & class_variance_authority_types.ClassProp) | undefined) => string;
20
20
  declare function InputGroupAddon({ className, align, ...props }: InputGroupAddonProps): react_jsx_runtime.JSX.Element;
21
21
  declare const inputGroupButtonVariants: (props?: ({
22
- size?: "xs" | "sm" | "icon-xs" | "icon-sm" | null | undefined;
22
+ size?: "sm" | "xs" | "icon-xs" | "icon-sm" | null | undefined;
23
23
  } & class_variance_authority_types.ClassProp) | undefined) => string;
24
24
  declare function InputGroupButton({ className, type, variant, size, ...props }: InputGroupButtonProps): react_jsx_runtime.JSX.Element;
25
25
  declare function InputGroupText({ className, ...props }: InputGroupTextProps): react_jsx_runtime.JSX.Element;
package/dist/input-otp.js CHANGED
@@ -1,4 +1,4 @@
1
- import { MinusIcon } from './chunk-WJDWQFO3.js';
1
+ import { MinusIcon } from './chunk-DIGOLJIR.js';
2
2
  import { cn } from './chunk-76UQO56T.js';
3
3
  import * as React from 'react';
4
4
  import { OTPInput, OTPInputContext } from 'input-otp';
package/dist/item.d.ts CHANGED
@@ -8,7 +8,7 @@ import '@base-ui/react/separator';
8
8
 
9
9
  declare const itemVariants: (props?: ({
10
10
  variant?: "default" | "outline" | "muted" | null | undefined;
11
- size?: "default" | "xs" | "sm" | null | undefined;
11
+ size?: "default" | "sm" | "xs" | null | undefined;
12
12
  } & class_variance_authority_types.ClassProp) | undefined) => string;
13
13
  declare const itemMediaVariants: (props?: ({
14
14
  variant?: "image" | "default" | "icon" | null | undefined;
package/dist/masonry.js CHANGED
@@ -1,4 +1,4 @@
1
- import { StarIcon } from './chunk-WJDWQFO3.js';
1
+ import { StarIcon } from './chunk-DIGOLJIR.js';
2
2
  import { cn } from './chunk-76UQO56T.js';
3
3
  import * as React from 'react';
4
4
  import { AnimatePresence, motion } from 'motion/react';
package/dist/menu.js CHANGED
@@ -1,5 +1,5 @@
1
- export { Menu, MenuCheckboxItem, MenuContent, MenuGroup, MenuItem, MenuLabel, MenuPortal, MenuRadioGroup, MenuRadioItem, MenuSeparator, MenuShortcut, MenuSub, MenuSubContent, MenuSubTrigger, MenuTrigger } from './chunk-PGXELRT4.js';
2
- import './chunk-WJDWQFO3.js';
1
+ export { Menu, MenuCheckboxItem, MenuContent, MenuGroup, MenuItem, MenuLabel, MenuPortal, MenuRadioGroup, MenuRadioItem, MenuSeparator, MenuShortcut, MenuSub, MenuSubContent, MenuSubTrigger, MenuTrigger } from './chunk-45VQAWIM.js';
2
+ import './chunk-DIGOLJIR.js';
3
3
  import './chunk-76UQO56T.js';
4
4
  //# sourceMappingURL=menu.js.map
5
5
  //# sourceMappingURL=menu.js.map
package/dist/menubar.js CHANGED
@@ -1,5 +1,5 @@
1
- import { Menu, MenuGroup, MenuPortal, MenuTrigger, MenuContent, MenuItem, MenuCheckboxItem, MenuRadioGroup, MenuRadioItem, MenuLabel, MenuSeparator, MenuShortcut, MenuSub, MenuSubTrigger, MenuSubContent } from './chunk-PGXELRT4.js';
2
- import './chunk-WJDWQFO3.js';
1
+ import { Menu, MenuGroup, MenuPortal, MenuTrigger, MenuContent, MenuItem, MenuCheckboxItem, MenuRadioGroup, MenuRadioItem, MenuLabel, MenuSeparator, MenuShortcut, MenuSub, MenuSubTrigger, MenuSubContent } from './chunk-45VQAWIM.js';
2
+ import './chunk-DIGOLJIR.js';
3
3
  import { cn } from './chunk-76UQO56T.js';
4
4
  import { Menubar as Menubar$1 } from '@base-ui/react/menubar';
5
5
  import { jsx } from 'react/jsx-runtime';
@@ -1,5 +1,5 @@
1
1
  import { Button } from './chunk-OUFYQLVN.js';
2
- import { ChevronLeftIcon, ChevronRightIcon, EllipsisIcon } from './chunk-WJDWQFO3.js';
2
+ import { ChevronLeftIcon, ChevronRightIcon, EllipsisIcon } from './chunk-DIGOLJIR.js';
3
3
  import { cn } from './chunk-76UQO56T.js';
4
4
  import { jsx, jsxs } from 'react/jsx-runtime';
5
5
 
package/dist/select.js CHANGED
@@ -1,4 +1,4 @@
1
- import { ChevronsUpDownIcon, CheckIcon, ChevronUpIcon, ChevronDownIcon } from './chunk-WJDWQFO3.js';
1
+ import { ChevronsUpDownIcon, CheckIcon, ChevronUpIcon, ChevronDownIcon } from './chunk-DIGOLJIR.js';
2
2
  import { cn } from './chunk-76UQO56T.js';
3
3
  import { Select as Select$1 } from '@base-ui/react/select';
4
4
  import { jsx, jsxs } from 'react/jsx-runtime';
@@ -0,0 +1,112 @@
1
+ import * as class_variance_authority_types from 'class-variance-authority/types';
2
+ import * as react_jsx_runtime from 'react/jsx-runtime';
3
+ import * as React from 'react';
4
+ import { useRender } from '@base-ui/react/use-render';
5
+ import { VariantProps } from 'class-variance-authority';
6
+ import { Button } from './button.js';
7
+ import { Input } from './input.js';
8
+ import { Separator } from './separator.js';
9
+ import { TooltipContent } from './tooltip.js';
10
+ import '@base-ui/react/button';
11
+ import '@base-ui/react/separator';
12
+ import '@base-ui/react/tooltip';
13
+
14
+ /**
15
+ * Persist sidebar state to a cookie.
16
+ *
17
+ * @param name - Cookie name. Defaults to `"sidebar-state"`.
18
+ * @param maxAge - Cookie max-age in seconds. Defaults to 7 days (604 800).
19
+ *
20
+ * @example
21
+ * ```tsx
22
+ * <SidebarProvider persist={cookiePersist()}>
23
+ * <SidebarProvider persist={cookiePersist("my-sidebar", 86400)}>
24
+ * ```
25
+ */
26
+ declare function cookiePersist(name?: string, maxAge?: number): (open: boolean) => void;
27
+ /**
28
+ * Persist sidebar state to localStorage.
29
+ *
30
+ * @param key - Storage key. Defaults to `"sidebar-state"`.
31
+ *
32
+ * @example
33
+ * ```tsx
34
+ * <SidebarProvider persist={localStoragePersist()}>
35
+ * <SidebarProvider persist={localStoragePersist("my-sidebar")}>
36
+ * ```
37
+ */
38
+ declare function localStoragePersist(key?: string): (open: boolean) => void;
39
+ type SidebarContextProps = {
40
+ state: "expanded" | "collapsed";
41
+ open: boolean;
42
+ setOpen: (open: boolean) => void;
43
+ openMobile: boolean;
44
+ setOpenMobile: (open: boolean) => void;
45
+ isMobile: boolean;
46
+ toggleSidebar: () => void;
47
+ };
48
+ declare function useSidebar(): SidebarContextProps;
49
+ declare function SidebarProvider({ defaultOpen, open: openProp, onOpenChange: setOpenProp, persist, keyboardShortcut, mobileBreakpoint, className, style, children, ...props }: React.ComponentProps<"div"> & {
50
+ defaultOpen?: boolean;
51
+ open?: boolean;
52
+ onOpenChange?: (open: boolean) => void;
53
+ /**
54
+ * Optional callback to persist open state. Called on every toggle.
55
+ * Use the built-in helpers `cookiePersist()` or `localStoragePersist()`,
56
+ * or provide a custom function (e.g. server action).
57
+ *
58
+ * @example
59
+ * ```tsx
60
+ * <SidebarProvider persist={cookiePersist()}>
61
+ * <SidebarProvider persist={localStoragePersist("sidebar")}>
62
+ * <SidebarProvider persist={(open) => saveToServer(open)}>
63
+ * ```
64
+ */
65
+ persist?: (open: boolean) => void;
66
+ /** Key for Cmd/Ctrl+key toggle shortcut. Defaults to "b". Pass `false` to disable. */
67
+ keyboardShortcut?: string | false;
68
+ /** Breakpoint (px) below which the sidebar uses a mobile drawer. Defaults to 768. */
69
+ mobileBreakpoint?: number;
70
+ }): react_jsx_runtime.JSX.Element;
71
+ declare function Sidebar({ side, variant, collapsible, className, children, ...props }: React.ComponentProps<"div"> & {
72
+ side?: "left" | "right";
73
+ variant?: "sidebar" | "floating" | "inset";
74
+ collapsible?: "offcanvas" | "icon" | "none";
75
+ }): react_jsx_runtime.JSX.Element;
76
+ declare function SidebarTrigger({ className, onClick, ...props }: React.ComponentProps<typeof Button>): react_jsx_runtime.JSX.Element;
77
+ declare function SidebarRail({ className, ...props }: React.ComponentProps<"button">): react_jsx_runtime.JSX.Element;
78
+ declare function SidebarInset({ className, ...props }: React.ComponentProps<"main">): react_jsx_runtime.JSX.Element;
79
+ declare function SidebarInput({ className, ...props }: React.ComponentProps<typeof Input>): react_jsx_runtime.JSX.Element;
80
+ declare function SidebarHeader({ className, ...props }: React.ComponentProps<"div">): react_jsx_runtime.JSX.Element;
81
+ declare function SidebarFooter({ className, ...props }: React.ComponentProps<"div">): react_jsx_runtime.JSX.Element;
82
+ declare function SidebarSeparator({ className, ...props }: React.ComponentProps<typeof Separator>): react_jsx_runtime.JSX.Element;
83
+ declare function SidebarContent({ className, ...props }: React.ComponentProps<"div">): react_jsx_runtime.JSX.Element;
84
+ declare function SidebarGroup({ className, ...props }: React.ComponentProps<"div">): react_jsx_runtime.JSX.Element;
85
+ declare function SidebarGroupLabel({ className, render, ...props }: useRender.ComponentProps<"div"> & React.ComponentProps<"div">): React.ReactElement<unknown, string | React.JSXElementConstructor<any>>;
86
+ declare function SidebarGroupAction({ className, render, ...props }: useRender.ComponentProps<"button"> & React.ComponentProps<"button">): React.ReactElement<unknown, string | React.JSXElementConstructor<any>>;
87
+ declare function SidebarGroupContent({ className, ...props }: React.ComponentProps<"div">): react_jsx_runtime.JSX.Element;
88
+ declare function SidebarMenu({ className, ...props }: React.ComponentProps<"ul">): react_jsx_runtime.JSX.Element;
89
+ declare function SidebarMenuItem({ className, ...props }: React.ComponentProps<"li">): react_jsx_runtime.JSX.Element;
90
+ declare const sidebarMenuButtonVariants: (props?: ({
91
+ variant?: "default" | "outline" | null | undefined;
92
+ size?: "default" | "sm" | "lg" | null | undefined;
93
+ } & class_variance_authority_types.ClassProp) | undefined) => string;
94
+ declare function SidebarMenuButton({ render, isActive, variant, size, tooltip, className, ...props }: useRender.ComponentProps<"button"> & React.ComponentProps<"button"> & {
95
+ isActive?: boolean;
96
+ tooltip?: string | React.ComponentProps<typeof TooltipContent>;
97
+ } & VariantProps<typeof sidebarMenuButtonVariants>): react_jsx_runtime.JSX.Element;
98
+ declare function SidebarMenuAction({ className, render, showOnHover, ...props }: useRender.ComponentProps<"button"> & React.ComponentProps<"button"> & {
99
+ showOnHover?: boolean;
100
+ }): React.ReactElement<unknown, string | React.JSXElementConstructor<any>>;
101
+ declare function SidebarMenuBadge({ className, ...props }: React.ComponentProps<"div">): react_jsx_runtime.JSX.Element;
102
+ declare function SidebarMenuSkeleton({ className, showIcon, ...props }: React.ComponentProps<"div"> & {
103
+ showIcon?: boolean;
104
+ }): react_jsx_runtime.JSX.Element;
105
+ declare function SidebarMenuSub({ className, ...props }: React.ComponentProps<"ul">): react_jsx_runtime.JSX.Element;
106
+ declare function SidebarMenuSubItem({ className, ...props }: React.ComponentProps<"li">): react_jsx_runtime.JSX.Element;
107
+ declare function SidebarMenuSubButton({ render, size, isActive, className, ...props }: useRender.ComponentProps<"a"> & React.ComponentProps<"a"> & {
108
+ size?: "sm" | "md";
109
+ isActive?: boolean;
110
+ }): React.ReactElement<unknown, string | React.JSXElementConstructor<any>>;
111
+
112
+ export { Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, cookiePersist, localStoragePersist, useSidebar };