@nuvia/components 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (243) hide show
  1. package/README.md +96 -0
  2. package/dist/hooks/use-mobile.cjs +44 -0
  3. package/dist/hooks/use-mobile.cjs.map +1 -0
  4. package/dist/hooks/use-mobile.js +22 -0
  5. package/dist/hooks/use-mobile.js.map +1 -0
  6. package/dist/hooks/use-toast.cjs +146 -0
  7. package/dist/hooks/use-toast.cjs.map +1 -0
  8. package/dist/hooks/use-toast.js +122 -0
  9. package/dist/hooks/use-toast.js.map +1 -0
  10. package/dist/index.cjs +4117 -0
  11. package/dist/index.cjs.map +1 -0
  12. package/dist/index.js +3800 -0
  13. package/dist/index.js.map +1 -0
  14. package/dist/lib/fonts.cjs +15 -0
  15. package/dist/lib/fonts.cjs.map +1 -0
  16. package/dist/lib/fonts.js +13 -0
  17. package/dist/lib/fonts.js.map +1 -0
  18. package/dist/lib/utils.cjs +18 -0
  19. package/dist/lib/utils.cjs.map +1 -0
  20. package/dist/lib/utils.js +14 -0
  21. package/dist/lib/utils.js.map +1 -0
  22. package/dist/providers/theme.cjs +24 -0
  23. package/dist/providers/theme.cjs.map +1 -0
  24. package/dist/providers/theme.js +22 -0
  25. package/dist/providers/theme.js.map +1 -0
  26. package/dist/ui/accordion.cjs +75 -0
  27. package/dist/ui/accordion.cjs.map +1 -0
  28. package/dist/ui/accordion.js +49 -0
  29. package/dist/ui/accordion.js.map +1 -0
  30. package/dist/ui/alert-dialog.cjs +189 -0
  31. package/dist/ui/alert-dialog.cjs.map +1 -0
  32. package/dist/ui/alert-dialog.js +156 -0
  33. package/dist/ui/alert-dialog.js.map +1 -0
  34. package/dist/ui/alert.cjs +81 -0
  35. package/dist/ui/alert.cjs.map +1 -0
  36. package/dist/ui/alert.js +57 -0
  37. package/dist/ui/alert.js.map +1 -0
  38. package/dist/ui/aspect-ratio.cjs +29 -0
  39. package/dist/ui/aspect-ratio.cjs.map +1 -0
  40. package/dist/ui/aspect-ratio.js +7 -0
  41. package/dist/ui/aspect-ratio.js.map +1 -0
  42. package/dist/ui/auto-complete.cjs +284 -0
  43. package/dist/ui/auto-complete.cjs.map +1 -0
  44. package/dist/ui/auto-complete.js +262 -0
  45. package/dist/ui/auto-complete.js.map +1 -0
  46. package/dist/ui/avatar.cjs +70 -0
  47. package/dist/ui/avatar.cjs.map +1 -0
  48. package/dist/ui/avatar.js +45 -0
  49. package/dist/ui/avatar.js.map +1 -0
  50. package/dist/ui/badge.cjs +34 -0
  51. package/dist/ui/badge.cjs.map +1 -0
  52. package/dist/ui/badge.js +31 -0
  53. package/dist/ui/badge.js.map +1 -0
  54. package/dist/ui/breadcrumb.cjs +120 -0
  55. package/dist/ui/breadcrumb.cjs.map +1 -0
  56. package/dist/ui/breadcrumb.js +92 -0
  57. package/dist/ui/breadcrumb.js.map +1 -0
  58. package/dist/ui/button.cjs +80 -0
  59. package/dist/ui/button.cjs.map +1 -0
  60. package/dist/ui/button.js +57 -0
  61. package/dist/ui/button.js.map +1 -0
  62. package/dist/ui/calendar.cjs +135 -0
  63. package/dist/ui/calendar.cjs.map +1 -0
  64. package/dist/ui/calendar.js +113 -0
  65. package/dist/ui/calendar.js.map +1 -0
  66. package/dist/ui/card.cjs +89 -0
  67. package/dist/ui/card.cjs.map +1 -0
  68. package/dist/ui/card.js +62 -0
  69. package/dist/ui/card.js.map +1 -0
  70. package/dist/ui/carousel.cjs +269 -0
  71. package/dist/ui/carousel.cjs.map +1 -0
  72. package/dist/ui/carousel.js +240 -0
  73. package/dist/ui/carousel.js.map +1 -0
  74. package/dist/ui/chart.cjs +267 -0
  75. package/dist/ui/chart.cjs.map +1 -0
  76. package/dist/ui/chart.js +239 -0
  77. package/dist/ui/chart.js.map +1 -0
  78. package/dist/ui/checkbox.cjs +55 -0
  79. package/dist/ui/checkbox.cjs.map +1 -0
  80. package/dist/ui/checkbox.js +32 -0
  81. package/dist/ui/checkbox.js.map +1 -0
  82. package/dist/ui/chip.cjs +79 -0
  83. package/dist/ui/chip.cjs.map +1 -0
  84. package/dist/ui/chip.js +55 -0
  85. package/dist/ui/chip.js.map +1 -0
  86. package/dist/ui/collapsible.cjs +33 -0
  87. package/dist/ui/collapsible.cjs.map +1 -0
  88. package/dist/ui/collapsible.js +9 -0
  89. package/dist/ui/collapsible.js.map +1 -0
  90. package/dist/ui/combobox.cjs +254 -0
  91. package/dist/ui/combobox.cjs.map +1 -0
  92. package/dist/ui/combobox.js +232 -0
  93. package/dist/ui/combobox.js.map +1 -0
  94. package/dist/ui/command.cjs +199 -0
  95. package/dist/ui/command.cjs.map +1 -0
  96. package/dist/ui/command.js +168 -0
  97. package/dist/ui/command.js.map +1 -0
  98. package/dist/ui/context-menu.cjs +181 -0
  99. package/dist/ui/context-menu.cjs.map +1 -0
  100. package/dist/ui/context-menu.js +144 -0
  101. package/dist/ui/context-menu.js.map +1 -0
  102. package/dist/ui/dialog.cjs +132 -0
  103. package/dist/ui/dialog.cjs.map +1 -0
  104. package/dist/ui/dialog.js +100 -0
  105. package/dist/ui/dialog.js.map +1 -0
  106. package/dist/ui/drawer.cjs +128 -0
  107. package/dist/ui/drawer.cjs.map +1 -0
  108. package/dist/ui/drawer.js +97 -0
  109. package/dist/ui/drawer.js.map +1 -0
  110. package/dist/ui/dropdown-menu.cjs +194 -0
  111. package/dist/ui/dropdown-menu.cjs.map +1 -0
  112. package/dist/ui/dropdown-menu.js +157 -0
  113. package/dist/ui/dropdown-menu.js.map +1 -0
  114. package/dist/ui/form.cjs +179 -0
  115. package/dist/ui/form.cjs.map +1 -0
  116. package/dist/ui/form.js +149 -0
  117. package/dist/ui/form.js.map +1 -0
  118. package/dist/ui/hover-card.cjs +53 -0
  119. package/dist/ui/hover-card.cjs.map +1 -0
  120. package/dist/ui/hover-card.js +28 -0
  121. package/dist/ui/hover-card.js.map +1 -0
  122. package/dist/ui/input-otp.cjs +76 -0
  123. package/dist/ui/input-otp.cjs.map +1 -0
  124. package/dist/ui/input-otp.js +51 -0
  125. package/dist/ui/input-otp.js.map +1 -0
  126. package/dist/ui/input.cjs +51 -0
  127. package/dist/ui/input.cjs.map +1 -0
  128. package/dist/ui/input.js +29 -0
  129. package/dist/ui/input.js.map +1 -0
  130. package/dist/ui/label.cjs +55 -0
  131. package/dist/ui/label.cjs.map +1 -0
  132. package/dist/ui/label.js +32 -0
  133. package/dist/ui/label.js.map +1 -0
  134. package/dist/ui/lottie-animation.cjs +85 -0
  135. package/dist/ui/lottie-animation.cjs.map +1 -0
  136. package/dist/ui/lottie-animation.js +79 -0
  137. package/dist/ui/lottie-animation.js.map +1 -0
  138. package/dist/ui/menubar.cjs +210 -0
  139. package/dist/ui/menubar.cjs.map +1 -0
  140. package/dist/ui/menubar.js +172 -0
  141. package/dist/ui/menubar.js.map +1 -0
  142. package/dist/ui/multi-combobox.cjs +319 -0
  143. package/dist/ui/multi-combobox.cjs.map +1 -0
  144. package/dist/ui/multi-combobox.js +297 -0
  145. package/dist/ui/multi-combobox.js.map +1 -0
  146. package/dist/ui/navigation-menu.cjs +136 -0
  147. package/dist/ui/navigation-menu.cjs.map +1 -0
  148. package/dist/ui/navigation-menu.js +105 -0
  149. package/dist/ui/navigation-menu.js.map +1 -0
  150. package/dist/ui/pagination.cjs +172 -0
  151. package/dist/ui/pagination.cjs.map +1 -0
  152. package/dist/ui/pagination.js +144 -0
  153. package/dist/ui/pagination.js.map +1 -0
  154. package/dist/ui/popover.cjs +55 -0
  155. package/dist/ui/popover.cjs.map +1 -0
  156. package/dist/ui/popover.js +29 -0
  157. package/dist/ui/popover.js.map +1 -0
  158. package/dist/ui/progress.cjs +54 -0
  159. package/dist/ui/progress.cjs.map +1 -0
  160. package/dist/ui/progress.js +31 -0
  161. package/dist/ui/progress.js.map +1 -0
  162. package/dist/ui/radio-group.cjs +62 -0
  163. package/dist/ui/radio-group.cjs.map +1 -0
  164. package/dist/ui/radio-group.js +38 -0
  165. package/dist/ui/radio-group.js.map +1 -0
  166. package/dist/ui/resizable.cjs +65 -0
  167. package/dist/ui/resizable.cjs.map +1 -0
  168. package/dist/ui/resizable.js +41 -0
  169. package/dist/ui/resizable.js.map +1 -0
  170. package/dist/ui/scroll-area.cjs +66 -0
  171. package/dist/ui/scroll-area.cjs.map +1 -0
  172. package/dist/ui/scroll-area.js +42 -0
  173. package/dist/ui/scroll-area.js.map +1 -0
  174. package/dist/ui/select.cjs +152 -0
  175. package/dist/ui/select.cjs.map +1 -0
  176. package/dist/ui/select.js +120 -0
  177. package/dist/ui/select.js.map +1 -0
  178. package/dist/ui/separator.cjs +52 -0
  179. package/dist/ui/separator.cjs.map +1 -0
  180. package/dist/ui/separator.js +29 -0
  181. package/dist/ui/separator.js.map +1 -0
  182. package/dist/ui/sheet.cjs +143 -0
  183. package/dist/ui/sheet.cjs.map +1 -0
  184. package/dist/ui/sheet.js +111 -0
  185. package/dist/ui/sheet.js.map +1 -0
  186. package/dist/ui/sidebar.cjs +816 -0
  187. package/dist/ui/sidebar.cjs.map +1 -0
  188. package/dist/ui/sidebar.js +768 -0
  189. package/dist/ui/sidebar.js.map +1 -0
  190. package/dist/ui/skeleton.cjs +25 -0
  191. package/dist/ui/skeleton.cjs.map +1 -0
  192. package/dist/ui/skeleton.js +23 -0
  193. package/dist/ui/skeleton.js.map +1 -0
  194. package/dist/ui/slider.cjs +51 -0
  195. package/dist/ui/slider.cjs.map +1 -0
  196. package/dist/ui/slider.js +28 -0
  197. package/dist/ui/slider.js.map +1 -0
  198. package/dist/ui/sonner.cjs +46 -0
  199. package/dist/ui/sonner.cjs.map +1 -0
  200. package/dist/ui/sonner.js +41 -0
  201. package/dist/ui/sonner.js.map +1 -0
  202. package/dist/ui/spinner.cjs +83 -0
  203. package/dist/ui/spinner.cjs.map +1 -0
  204. package/dist/ui/spinner.js +81 -0
  205. package/dist/ui/spinner.js.map +1 -0
  206. package/dist/ui/switch.cjs +67 -0
  207. package/dist/ui/switch.cjs.map +1 -0
  208. package/dist/ui/switch.js +44 -0
  209. package/dist/ui/switch.js.map +1 -0
  210. package/dist/ui/table.cjs +118 -0
  211. package/dist/ui/table.cjs.map +1 -0
  212. package/dist/ui/table.js +89 -0
  213. package/dist/ui/table.js.map +1 -0
  214. package/dist/ui/tabs.cjs +79 -0
  215. package/dist/ui/tabs.cjs.map +1 -0
  216. package/dist/ui/tabs.js +53 -0
  217. package/dist/ui/tabs.js.map +1 -0
  218. package/dist/ui/textarea.cjs +48 -0
  219. package/dist/ui/textarea.cjs.map +1 -0
  220. package/dist/ui/textarea.js +26 -0
  221. package/dist/ui/textarea.js.map +1 -0
  222. package/dist/ui/toast.cjs +125 -0
  223. package/dist/ui/toast.cjs.map +1 -0
  224. package/dist/ui/toast.js +96 -0
  225. package/dist/ui/toast.js.map +1 -0
  226. package/dist/ui/toaster.cjs +251 -0
  227. package/dist/ui/toaster.cjs.map +1 -0
  228. package/dist/ui/toaster.js +228 -0
  229. package/dist/ui/toaster.js.map +1 -0
  230. package/dist/ui/toggle-group.cjs +101 -0
  231. package/dist/ui/toggle-group.cjs.map +1 -0
  232. package/dist/ui/toggle-group.js +76 -0
  233. package/dist/ui/toggle-group.js.map +1 -0
  234. package/dist/ui/toggle.cjs +66 -0
  235. package/dist/ui/toggle.cjs.map +1 -0
  236. package/dist/ui/toggle.js +42 -0
  237. package/dist/ui/toggle.js.map +1 -0
  238. package/dist/ui/tooltip.cjs +54 -0
  239. package/dist/ui/tooltip.cjs.map +1 -0
  240. package/dist/ui/tooltip.js +28 -0
  241. package/dist/ui/tooltip.js.map +1 -0
  242. package/package.json +116 -0
  243. package/src/styles/globals.css +529 -0
@@ -0,0 +1,768 @@
1
+ import * as React7 from 'react';
2
+ import { Slot } from '@radix-ui/react-slot';
3
+ import { cva } from 'class-variance-authority';
4
+ import { clsx } from 'clsx';
5
+ import 'sonner';
6
+ import { twMerge } from 'tailwind-merge';
7
+ import { jsx, jsxs } from 'react/jsx-runtime';
8
+ import * as SeparatorPrimitive from '@radix-ui/react-separator';
9
+ import * as SheetPrimitive from '@radix-ui/react-dialog';
10
+ import { Cross2Icon, ViewVerticalIcon } from '@radix-ui/react-icons';
11
+ import * as TooltipPrimitive from '@radix-ui/react-tooltip';
12
+
13
+ var MOBILE_BREAKPOINT = 768;
14
+ function useIsMobile() {
15
+ const [isMobile, setIsMobile] = React7.useState(
16
+ void 0
17
+ );
18
+ React7.useEffect(() => {
19
+ const mql = window.matchMedia(`(max-width: ${MOBILE_BREAKPOINT - 1}px)`);
20
+ const onChange = () => {
21
+ setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);
22
+ };
23
+ mql.addEventListener("change", onChange);
24
+ setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);
25
+ return () => mql.removeEventListener("change", onChange);
26
+ }, []);
27
+ return !!isMobile;
28
+ }
29
+ var cn = (...inputs) => twMerge(clsx(inputs));
30
+ var buttonVariants = cva(
31
+ "inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-xl text-sm font-medium focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-[#5A6FC0] disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
32
+ {
33
+ variants: {
34
+ variant: {
35
+ default: "bg-foreground-primary-medium text-white shadow hover:bg-primary/90",
36
+ destructive: "bg-destructive text-destructive-foreground hover:bg-destructive/90",
37
+ outline: "border border-input bg-background hover:bg-secondary hover:text-accent-foreground text-foreground-secondary-heavy",
38
+ secondary: "bg-background-secondary-light hover:background-secondary-light/40 text-foreground-secondary-heavy",
39
+ ghost: "text-foreground-secondary-heavy hover:bg-background-secondary-light",
40
+ link: "text-text-links hover:bg-background-secondary-light",
41
+ accent: "bg-accent nuvia-gradient-1 text-white"
42
+ },
43
+ size: {
44
+ default: "h-10 px-4 py-2",
45
+ xs: "h-[30px] px-3 rounded-xl text-xs",
46
+ sm: "h-9 rounded-xl px-3 text-xs",
47
+ lg: "h-12 rounded-xl px-8",
48
+ icon: "h-10 w-10 min-w-10",
49
+ "icon-xs": "h-[30px] w-[30px] min-w-[30px]",
50
+ "icon-sm": "h-9 w-9 min-w-9",
51
+ bullet: "h-8 w-8 min-w-8"
52
+ }
53
+ },
54
+ defaultVariants: {
55
+ variant: "default",
56
+ size: "default"
57
+ }
58
+ }
59
+ );
60
+ var Button = React7.forwardRef(
61
+ ({ className, variant, size, asChild = false, ...props }, ref) => {
62
+ const Comp = asChild ? Slot : "button";
63
+ return /* @__PURE__ */ jsx(
64
+ Comp,
65
+ {
66
+ className: cn(buttonVariants({ variant, size, className })),
67
+ ref,
68
+ ...props
69
+ }
70
+ );
71
+ }
72
+ );
73
+ Button.displayName = "Button";
74
+ var Input = React7.forwardRef(
75
+ ({ className, type, ...props }, ref) => {
76
+ return /* @__PURE__ */ jsx(
77
+ "input",
78
+ {
79
+ type,
80
+ className: cn(
81
+ "flex h-10 w-full rounded-xl border border-border bg-transparent px-3 py-1 text-base transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm group-aria-[invalid=true]:border-danger-foreground aria-[invalid=true]:border-danger-foreground",
82
+ className
83
+ ),
84
+ ref,
85
+ ...props
86
+ }
87
+ );
88
+ }
89
+ );
90
+ Input.displayName = "Input";
91
+ var Separator = React7.forwardRef(
92
+ ({ className, orientation = "horizontal", decorative = true, ...props }, ref) => /* @__PURE__ */ jsx(
93
+ SeparatorPrimitive.Root,
94
+ {
95
+ ref,
96
+ decorative,
97
+ orientation,
98
+ className: cn(
99
+ "shrink-0 bg-border",
100
+ orientation === "horizontal" ? "h-[1px] w-full" : "h-full w-[1px]",
101
+ className
102
+ ),
103
+ ...props
104
+ }
105
+ )
106
+ );
107
+ Separator.displayName = SeparatorPrimitive.Root.displayName;
108
+ var Sheet = SheetPrimitive.Root;
109
+ var SheetPortal = SheetPrimitive.Portal;
110
+ var SheetOverlay = React7.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
111
+ SheetPrimitive.Overlay,
112
+ {
113
+ className: cn(
114
+ "fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
115
+ className
116
+ ),
117
+ ...props,
118
+ ref
119
+ }
120
+ ));
121
+ SheetOverlay.displayName = SheetPrimitive.Overlay.displayName;
122
+ var sheetVariants = cva(
123
+ "fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500 data-[state=open]:animate-in data-[state=closed]:animate-out",
124
+ {
125
+ variants: {
126
+ side: {
127
+ top: "inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",
128
+ bottom: "inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",
129
+ left: "inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",
130
+ right: "inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"
131
+ }
132
+ },
133
+ defaultVariants: {
134
+ side: "right"
135
+ }
136
+ }
137
+ );
138
+ var SheetContent = React7.forwardRef(({ side = "right", className, children, ...props }, ref) => /* @__PURE__ */ jsxs(SheetPortal, { children: [
139
+ /* @__PURE__ */ jsx(SheetOverlay, {}),
140
+ /* @__PURE__ */ jsxs(
141
+ SheetPrimitive.Content,
142
+ {
143
+ ref,
144
+ className: cn(sheetVariants({ side }), className),
145
+ ...props,
146
+ children: [
147
+ /* @__PURE__ */ jsxs(SheetPrimitive.Close, { className: "group-[.no-close]:hidden absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary", children: [
148
+ /* @__PURE__ */ jsx(Cross2Icon, { className: "h-4 w-4" }),
149
+ /* @__PURE__ */ jsx("span", { className: "sr-only", children: "Close" })
150
+ ] }),
151
+ children
152
+ ]
153
+ }
154
+ )
155
+ ] }));
156
+ SheetContent.displayName = SheetPrimitive.Content.displayName;
157
+ var SheetTitle = React7.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
158
+ SheetPrimitive.Title,
159
+ {
160
+ ref,
161
+ className: cn("text-lg font-semibold text-text-brand-primary", className),
162
+ ...props
163
+ }
164
+ ));
165
+ SheetTitle.displayName = SheetPrimitive.Title.displayName;
166
+ var SheetDescription = React7.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
167
+ SheetPrimitive.Description,
168
+ {
169
+ ref,
170
+ className: cn("text-sm text-muted-foreground", className),
171
+ ...props
172
+ }
173
+ ));
174
+ SheetDescription.displayName = SheetPrimitive.Description.displayName;
175
+ function Skeleton({
176
+ className,
177
+ ...props
178
+ }) {
179
+ return /* @__PURE__ */ jsx(
180
+ "div",
181
+ {
182
+ className: cn("animate-pulse rounded-md bg-secondary dark:bg-secondary/25", className),
183
+ ...props
184
+ }
185
+ );
186
+ }
187
+ var TooltipProvider = TooltipPrimitive.Provider;
188
+ var Tooltip = TooltipPrimitive.Root;
189
+ var TooltipTrigger = TooltipPrimitive.Trigger;
190
+ var TooltipContent = React7.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsx(TooltipPrimitive.Portal, { children: /* @__PURE__ */ jsx(
191
+ TooltipPrimitive.Content,
192
+ {
193
+ ref,
194
+ sideOffset,
195
+ className: cn(
196
+ "z-50 overflow-hidden rounded-xl shadow-md bg-background border border-border px-3 py-1.5 text-xs text-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
197
+ className
198
+ ),
199
+ ...props
200
+ }
201
+ ) }));
202
+ TooltipContent.displayName = TooltipPrimitive.Content.displayName;
203
+ var SIDEBAR_COOKIE_NAME = "sidebar:state";
204
+ var SIDEBAR_COOKIE_MAX_AGE = 60 * 60 * 24 * 7;
205
+ var SIDEBAR_WIDTH = "240px";
206
+ var SIDEBAR_WIDTH_MOBILE = "18rem";
207
+ var SIDEBAR_WIDTH_ICON = "90px";
208
+ var SIDEBAR_KEYBOARD_SHORTCUT = "b";
209
+ var SidebarContext = React7.createContext(null);
210
+ function useSidebar() {
211
+ const context = React7.useContext(SidebarContext);
212
+ if (!context) {
213
+ throw new Error("useSidebar must be used within a SidebarProvider.");
214
+ }
215
+ return context;
216
+ }
217
+ var SidebarProvider = React7.forwardRef(
218
+ ({
219
+ defaultOpen = false,
220
+ open: openProp,
221
+ onOpenChange: setOpenProp,
222
+ className,
223
+ style,
224
+ children,
225
+ ...props
226
+ }, ref) => {
227
+ const isMobile = useIsMobile();
228
+ const [openMobile, setOpenMobile] = React7.useState(false);
229
+ const [_open, _setOpen] = React7.useState(defaultOpen);
230
+ const open = openProp ?? _open;
231
+ const setOpen = React7.useCallback(
232
+ (value) => {
233
+ const openState = typeof value === "function" ? value(open) : value;
234
+ if (setOpenProp) {
235
+ setOpenProp(openState);
236
+ } else {
237
+ _setOpen(openState);
238
+ }
239
+ document.cookie = `${SIDEBAR_COOKIE_NAME}=${openState}; path=/; max-age=${SIDEBAR_COOKIE_MAX_AGE}`;
240
+ },
241
+ [setOpenProp, open]
242
+ );
243
+ const toggleSidebar = React7.useCallback(() => {
244
+ return isMobile ? setOpenMobile((open2) => !open2) : setOpen((open2) => !open2);
245
+ }, [isMobile, setOpen, setOpenMobile]);
246
+ React7.useEffect(() => {
247
+ const handleKeyDown = (event) => {
248
+ if (event.key === SIDEBAR_KEYBOARD_SHORTCUT && (event.metaKey || event.ctrlKey)) {
249
+ event.preventDefault();
250
+ toggleSidebar();
251
+ }
252
+ };
253
+ window.addEventListener("keydown", handleKeyDown);
254
+ return () => window.removeEventListener("keydown", handleKeyDown);
255
+ }, [toggleSidebar]);
256
+ const state = open ? "expanded" : "collapsed";
257
+ const contextValue = React7.useMemo(
258
+ () => ({
259
+ state,
260
+ open,
261
+ setOpen,
262
+ isMobile,
263
+ openMobile,
264
+ setOpenMobile,
265
+ toggleSidebar
266
+ }),
267
+ [state, open, setOpen, isMobile, openMobile, setOpenMobile, toggleSidebar]
268
+ );
269
+ return /* @__PURE__ */ jsx(SidebarContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsx(TooltipProvider, { delayDuration: 0, children: /* @__PURE__ */ jsx(
270
+ "div",
271
+ {
272
+ style: {
273
+ "--sidebar-width": SIDEBAR_WIDTH,
274
+ "--sidebar-width-icon": SIDEBAR_WIDTH_ICON,
275
+ ...style
276
+ },
277
+ className: cn(
278
+ "group/sidebar-wrapper flex min-h-svh w-full has-[[data-variant=inset]]:bg-sidebar",
279
+ className
280
+ ),
281
+ ref,
282
+ ...props,
283
+ children
284
+ }
285
+ ) }) });
286
+ }
287
+ );
288
+ SidebarProvider.displayName = "SidebarProvider";
289
+ var Sidebar = React7.forwardRef(
290
+ ({
291
+ side = "left",
292
+ variant = "sidebar",
293
+ collapsible = "offcanvas",
294
+ className,
295
+ children,
296
+ ...props
297
+ }, ref) => {
298
+ const { isMobile, state, openMobile, setOpenMobile } = useSidebar();
299
+ if (collapsible === "none") {
300
+ return /* @__PURE__ */ jsx(
301
+ "div",
302
+ {
303
+ className: cn(
304
+ "flex h-full w-[--sidebar-width] flex-col bg-sidebar text-sidebar-foreground",
305
+ className
306
+ ),
307
+ ref,
308
+ ...props,
309
+ children
310
+ }
311
+ );
312
+ }
313
+ if (isMobile) {
314
+ return /* @__PURE__ */ jsx(Sheet, { open: openMobile, onOpenChange: setOpenMobile, ...props, children: /* @__PURE__ */ jsxs(
315
+ SheetContent,
316
+ {
317
+ "data-sidebar": "sidebar",
318
+ "data-mobile": "true",
319
+ className: "w-[--sidebar-width] bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden",
320
+ style: {
321
+ "--sidebar-width": SIDEBAR_WIDTH_MOBILE
322
+ },
323
+ side,
324
+ children: [
325
+ /* @__PURE__ */ jsx(SheetTitle, { className: "sr-only" }),
326
+ /* @__PURE__ */ jsx("div", { className: "flex h-full w-full flex-col", children })
327
+ ]
328
+ }
329
+ ) });
330
+ }
331
+ return /* @__PURE__ */ jsxs(
332
+ "div",
333
+ {
334
+ ref,
335
+ className: "group peer hidden md:block text-sidebar-foreground",
336
+ "data-state": state,
337
+ "data-collapsible": state === "collapsed" ? collapsible : "",
338
+ "data-variant": variant,
339
+ "data-side": side,
340
+ children: [
341
+ /* @__PURE__ */ jsx(
342
+ "div",
343
+ {
344
+ className: cn(
345
+ "duration-100 relative h-svh w-[--sidebar-width] bg-transparent transition-[width] ease-linear",
346
+ "group-data-[collapsible=offcanvas]:w-0",
347
+ "group-data-[side=right]:rotate-180",
348
+ variant === "floating" || variant === "inset" ? "group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4))]" : "group-data-[collapsible=icon]:w-[--sidebar-width-icon]"
349
+ )
350
+ }
351
+ ),
352
+ /* @__PURE__ */ jsx(
353
+ "div",
354
+ {
355
+ className: cn(
356
+ "duration-100 fixed inset-y-0 z-10 hidden h-svh w-[--sidebar-width] transition-[left,right,width] ease-linear md:flex",
357
+ side === "left" ? "left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]" : "right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]",
358
+ // Adjust the padding for floating and inset variants.
359
+ variant === "floating" || variant === "inset" ? "p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4)_+2px)]" : "px-4 py-7 group-data-[collapsible=icon]:w-[--sidebar-width-icon] group-data-[side=left]:border-r group-data-[side=right]:border-l",
360
+ className
361
+ ),
362
+ ...props,
363
+ children: /* @__PURE__ */ jsx(
364
+ "div",
365
+ {
366
+ "data-sidebar": "sidebar",
367
+ className: "flex h-full w-full flex-col bg-background group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:border-sidebar-border group-data-[variant=floating]:shadow",
368
+ children
369
+ }
370
+ )
371
+ }
372
+ )
373
+ ]
374
+ }
375
+ );
376
+ }
377
+ );
378
+ Sidebar.displayName = "Sidebar";
379
+ var SidebarTrigger = React7.forwardRef(({ className, onClick, ...props }, ref) => {
380
+ const { toggleSidebar } = useSidebar();
381
+ return /* @__PURE__ */ jsxs(
382
+ Button,
383
+ {
384
+ ref,
385
+ "data-sidebar": "trigger",
386
+ variant: "ghost",
387
+ size: "icon",
388
+ className: cn("h-7 w-7", className),
389
+ onClick: (event) => {
390
+ onClick?.(event);
391
+ toggleSidebar();
392
+ },
393
+ ...props,
394
+ children: [
395
+ /* @__PURE__ */ jsx(ViewVerticalIcon, {}),
396
+ /* @__PURE__ */ jsx("span", { className: "sr-only", children: "Toggle Sidebar" })
397
+ ]
398
+ }
399
+ );
400
+ });
401
+ SidebarTrigger.displayName = "SidebarTrigger";
402
+ var SidebarRail = React7.forwardRef(({ className, ...props }, ref) => {
403
+ const { toggleSidebar } = useSidebar();
404
+ return /* @__PURE__ */ jsx(
405
+ "button",
406
+ {
407
+ ref,
408
+ "data-sidebar": "rail",
409
+ "aria-label": "Toggle Sidebar",
410
+ tabIndex: -1,
411
+ onClick: toggleSidebar,
412
+ title: "Toggle Sidebar",
413
+ className: cn(
414
+ "absolute inset-y-0 z-20 hidden w-4 -translate-x-1/2 transition-all ease-linear after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] hover:after:bg-sidebar-border group-data-[side=left]:-right-4 group-data-[side=right]:left-0 sm:flex",
415
+ "[[data-side=left]_&]:cursor-w-resize [[data-side=right]_&]:cursor-e-resize",
416
+ "[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize",
417
+ "group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full group-data-[collapsible=offcanvas]:hover:bg-primary-foreground/25",
418
+ "[[data-side=left][data-collapsible=offcanvas]_&]:-right-2",
419
+ "[[data-side=right][data-collapsible=offcanvas]_&]:-left-2",
420
+ className
421
+ ),
422
+ ...props
423
+ }
424
+ );
425
+ });
426
+ SidebarRail.displayName = "SidebarRail";
427
+ var SidebarInset = React7.forwardRef(({ className, ...props }, ref) => {
428
+ return /* @__PURE__ */ jsx(
429
+ "main",
430
+ {
431
+ ref,
432
+ className: cn(
433
+ "relative flex min-h-svh flex-1 flex-col bg-primary-foreground/75 ",
434
+ " peer-data-[variant=inset]:min-h-[calc(100svh-theme(spacing.4))] md:peer-data-[variant=inset]:m-2 md:peer-data-[state=collapsed]:peer-data-[variant=inset]:ml-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow",
435
+ className
436
+ ),
437
+ ...props
438
+ }
439
+ );
440
+ });
441
+ SidebarInset.displayName = "SidebarInset";
442
+ var SidebarInput = React7.forwardRef(({ className, ...props }, ref) => {
443
+ return /* @__PURE__ */ jsx(
444
+ Input,
445
+ {
446
+ ref,
447
+ "data-sidebar": "input",
448
+ className: cn(
449
+ "h-8 w-full bg-background shadow-none focus-visible:ring-2 focus-visible:ring-sidebar-ring",
450
+ className
451
+ ),
452
+ ...props
453
+ }
454
+ );
455
+ });
456
+ SidebarInput.displayName = "SidebarInput";
457
+ var SidebarHeader = React7.forwardRef(({ className, ...props }, ref) => {
458
+ return /* @__PURE__ */ jsx(
459
+ "div",
460
+ {
461
+ ref,
462
+ "data-sidebar": "header",
463
+ className: cn("flex flex-col gap-2", className),
464
+ ...props
465
+ }
466
+ );
467
+ });
468
+ SidebarHeader.displayName = "SidebarHeader";
469
+ var SidebarFooter = React7.forwardRef(({ className, ...props }, ref) => {
470
+ return /* @__PURE__ */ jsx(
471
+ "div",
472
+ {
473
+ ref,
474
+ "data-sidebar": "footer",
475
+ className: cn("flex flex-col gap-2 p-2", className),
476
+ ...props
477
+ }
478
+ );
479
+ });
480
+ SidebarFooter.displayName = "SidebarFooter";
481
+ var SidebarSeparator = React7.forwardRef(({ className, ...props }, ref) => {
482
+ return /* @__PURE__ */ jsx(
483
+ Separator,
484
+ {
485
+ ref,
486
+ "data-sidebar": "separator",
487
+ className: cn("mx-2 w-auto bg-sidebar-border", className),
488
+ ...props
489
+ }
490
+ );
491
+ });
492
+ SidebarSeparator.displayName = "SidebarSeparator";
493
+ var SidebarContent = React7.forwardRef(({ className, ...props }, ref) => {
494
+ return /* @__PURE__ */ jsx(
495
+ "div",
496
+ {
497
+ ref,
498
+ "data-sidebar": "content",
499
+ className: cn(
500
+ "flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden",
501
+ className
502
+ ),
503
+ ...props
504
+ }
505
+ );
506
+ });
507
+ SidebarContent.displayName = "SidebarContent";
508
+ var SidebarGroup = React7.forwardRef(({ className, ...props }, ref) => {
509
+ return /* @__PURE__ */ jsx(
510
+ "div",
511
+ {
512
+ ref,
513
+ "data-sidebar": "group",
514
+ className: cn("relative flex w-full min-w-0 flex-col p-2", className),
515
+ ...props
516
+ }
517
+ );
518
+ });
519
+ SidebarGroup.displayName = "SidebarGroup";
520
+ var SidebarGroupLabel = React7.forwardRef(({ className, asChild = false, ...props }, ref) => {
521
+ const Comp = asChild ? Slot : "div";
522
+ return /* @__PURE__ */ jsx(
523
+ Comp,
524
+ {
525
+ ref,
526
+ "data-sidebar": "group-label",
527
+ className: cn(
528
+ "duration-200 flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium text-sidebar-foreground/70 outline-none ring-sidebar-ring transition-[margin,opa] ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0",
529
+ "group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0",
530
+ className
531
+ ),
532
+ ...props
533
+ }
534
+ );
535
+ });
536
+ SidebarGroupLabel.displayName = "SidebarGroupLabel";
537
+ var SidebarGroupAction = React7.forwardRef(({ className, asChild = false, ...props }, ref) => {
538
+ const Comp = asChild ? Slot : "button";
539
+ return /* @__PURE__ */ jsx(
540
+ Comp,
541
+ {
542
+ ref,
543
+ "data-sidebar": "group-action",
544
+ className: cn(
545
+ "absolute right-3 top-3.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-secondary/50 dark:hover:bg-secondary/25 hover:text-sidebar-accent-foreground focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0",
546
+ // Increases the hit area of the button on mobile.
547
+ "after:absolute after:-inset-2 after:md:hidden",
548
+ "group-data-[collapsible=icon]:hidden",
549
+ className
550
+ ),
551
+ ...props
552
+ }
553
+ );
554
+ });
555
+ SidebarGroupAction.displayName = "SidebarGroupAction";
556
+ var SidebarGroupContent = React7.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
557
+ "div",
558
+ {
559
+ ref,
560
+ "data-sidebar": "group-content",
561
+ className: cn("w-full text-sm", className),
562
+ ...props
563
+ }
564
+ ));
565
+ SidebarGroupContent.displayName = "SidebarGroupContent";
566
+ var SidebarMenu = React7.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
567
+ "ul",
568
+ {
569
+ ref,
570
+ "data-sidebar": "menu",
571
+ className: cn("flex w-full min-w-0 flex-col gap-1", className),
572
+ ...props
573
+ }
574
+ ));
575
+ SidebarMenu.displayName = "SidebarMenu";
576
+ var SidebarMenuItem = React7.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
577
+ "li",
578
+ {
579
+ ref,
580
+ "data-sidebar": "menu-item",
581
+ className: cn("group/menu-item relative", className),
582
+ ...props
583
+ }
584
+ ));
585
+ SidebarMenuItem.displayName = "SidebarMenuItem";
586
+ var sidebarMenuButtonVariants = cva(
587
+ "peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-xl p-2 text-left text-sm outline-none ring-sidebar-ring transition-[width,height,padding] hover:bg-secondary/50 dark:hover:bg-secondary/25 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 group-has-[[data-sidebar=menu-action]]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-background-secondary-light dark:data-[active=true]:bg-background-secondary-light data-[active=true]:font-medium data-[active=true]:text-text-brand-primary data-[state=open]:hover:bg-primary-foreground data-[state=open]:hover:text-sidebar-accent-foreground group-data-[collapsible=icon]:!size-10 group-data-[collapsible=icon]:!p-2 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0",
588
+ {
589
+ variants: {
590
+ variant: {
591
+ default: "hover:bg-secondary/50 dark:hover:bg-secondary/25 hover:text-sidebar-accent-foreground",
592
+ outline: "bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-secondary/50 dark:hover:bg-secondary/25 hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]"
593
+ },
594
+ size: {
595
+ default: "h-8 text-sm",
596
+ sm: "h-7 text-xs",
597
+ lg: "h-12 text-sm group-data-[collapsible=icon]:!p-0"
598
+ }
599
+ },
600
+ defaultVariants: {
601
+ variant: "default",
602
+ size: "default"
603
+ }
604
+ }
605
+ );
606
+ var SidebarMenuButton = React7.forwardRef(
607
+ ({
608
+ asChild = false,
609
+ isActive = false,
610
+ variant = "default",
611
+ size = "default",
612
+ tooltip,
613
+ className,
614
+ ...props
615
+ }, ref) => {
616
+ const Comp = asChild ? Slot : "button";
617
+ const { isMobile, state } = useSidebar();
618
+ const button = /* @__PURE__ */ jsx(
619
+ Comp,
620
+ {
621
+ ref,
622
+ "data-sidebar": "menu-button",
623
+ "data-size": size,
624
+ "data-active": isActive,
625
+ className: cn(sidebarMenuButtonVariants({ variant, size }), className),
626
+ ...props
627
+ }
628
+ );
629
+ if (!tooltip) {
630
+ return button;
631
+ }
632
+ if (typeof tooltip === "string") {
633
+ tooltip = {
634
+ children: tooltip
635
+ };
636
+ }
637
+ return /* @__PURE__ */ jsxs(Tooltip, { children: [
638
+ /* @__PURE__ */ jsx(TooltipTrigger, { asChild: true, children: button }),
639
+ /* @__PURE__ */ jsx(
640
+ TooltipContent,
641
+ {
642
+ side: "right",
643
+ align: "center",
644
+ hidden: state !== "collapsed" || isMobile,
645
+ ...tooltip
646
+ }
647
+ )
648
+ ] });
649
+ }
650
+ );
651
+ SidebarMenuButton.displayName = "SidebarMenuButton";
652
+ var SidebarMenuAction = React7.forwardRef(({ className, asChild = false, showOnHover = false, ...props }, ref) => {
653
+ const Comp = asChild ? Slot : "button";
654
+ return /* @__PURE__ */ jsx(
655
+ Comp,
656
+ {
657
+ ref,
658
+ "data-sidebar": "menu-action",
659
+ className: cn(
660
+ "absolute right-1 top-1.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-secondary/50 dark:hover:bg-secondary/25 hover:text-sidebar-accent-foreground focus-visible:ring-2 peer-hover/menu-button:text-sidebar-accent-foreground [&>svg]:size-4 [&>svg]:shrink-0",
661
+ // Increases the hit area of the button on mobile.
662
+ "after:absolute after:-inset-2 after:md:hidden",
663
+ "peer-data-[size=sm]/menu-button:top-1",
664
+ "peer-data-[size=default]/menu-button:top-1.5",
665
+ "peer-data-[size=lg]/menu-button:top-2.5",
666
+ "group-data-[collapsible=icon]:hidden",
667
+ showOnHover && "group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-[state=open]:opacity-100 peer-data-[active=true]/menu-button:text-sidebar-accent-foreground md:opacity-0",
668
+ className
669
+ ),
670
+ ...props
671
+ }
672
+ );
673
+ });
674
+ SidebarMenuAction.displayName = "SidebarMenuAction";
675
+ var SidebarMenuBadge = React7.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
676
+ "div",
677
+ {
678
+ ref,
679
+ "data-sidebar": "menu-badge",
680
+ className: cn(
681
+ "absolute right-1 flex h-5 min-w-5 items-center justify-center rounded-md px-1 text-xs font-medium tabular-nums text-sidebar-foreground select-none pointer-events-none",
682
+ "peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[active=true]/menu-button:text-sidebar-accent-foreground",
683
+ "peer-data-[size=sm]/menu-button:top-1",
684
+ "peer-data-[size=default]/menu-button:top-1.5",
685
+ "peer-data-[size=lg]/menu-button:top-2.5",
686
+ "group-data-[collapsible=icon]:hidden",
687
+ className
688
+ ),
689
+ ...props
690
+ }
691
+ ));
692
+ SidebarMenuBadge.displayName = "SidebarMenuBadge";
693
+ var SidebarMenuSkeleton = React7.forwardRef(({ className, showIcon = false, ...props }, ref) => {
694
+ const width = React7.useMemo(() => {
695
+ return `${Math.floor(Math.random() * 40) + 50}%`;
696
+ }, []);
697
+ return /* @__PURE__ */ jsxs(
698
+ "div",
699
+ {
700
+ ref,
701
+ "data-sidebar": "menu-skeleton",
702
+ className: cn("rounded-md h-8 flex gap-2 px-2 items-center", className),
703
+ ...props,
704
+ children: [
705
+ showIcon && /* @__PURE__ */ jsx(
706
+ Skeleton,
707
+ {
708
+ className: "size-4 rounded-md",
709
+ "data-sidebar": "menu-skeleton-icon"
710
+ }
711
+ ),
712
+ /* @__PURE__ */ jsx(
713
+ Skeleton,
714
+ {
715
+ className: "h-4 flex-1 max-w-[--skeleton-width]",
716
+ "data-sidebar": "menu-skeleton-text",
717
+ style: {
718
+ "--skeleton-width": width
719
+ }
720
+ }
721
+ )
722
+ ]
723
+ }
724
+ );
725
+ });
726
+ SidebarMenuSkeleton.displayName = "SidebarMenuSkeleton";
727
+ var SidebarMenuSub = React7.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
728
+ "ul",
729
+ {
730
+ ref,
731
+ "data-sidebar": "menu-sub",
732
+ className: cn(
733
+ "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",
734
+ "group-data-[collapsible=icon]:hidden",
735
+ className
736
+ ),
737
+ ...props
738
+ }
739
+ ));
740
+ SidebarMenuSub.displayName = "SidebarMenuSub";
741
+ var SidebarMenuSubItem = React7.forwardRef(({ ...props }, ref) => /* @__PURE__ */ jsx("li", { ref, ...props }));
742
+ SidebarMenuSubItem.displayName = "SidebarMenuSubItem";
743
+ var SidebarMenuSubButton = React7.forwardRef(({ asChild = false, size = "md", isActive, className, ...props }, ref) => {
744
+ const Comp = asChild ? Slot : "a";
745
+ return /* @__PURE__ */ jsx(
746
+ Comp,
747
+ {
748
+ ref,
749
+ "data-sidebar": "menu-sub-button",
750
+ "data-size": size,
751
+ "data-active": isActive,
752
+ className: cn(
753
+ "flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 text-sidebar-foreground outline-none ring-sidebar-ring hover:bg-secondary/50 dark:hover:bg-secondary/25 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 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0 [&>svg]:text-sidebar-accent-foreground",
754
+ "data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground",
755
+ size === "sm" && "text-xs",
756
+ size === "md" && "text-sm",
757
+ "group-data-[collapsible=icon]:hidden",
758
+ className
759
+ ),
760
+ ...props
761
+ }
762
+ );
763
+ });
764
+ SidebarMenuSubButton.displayName = "SidebarMenuSubButton";
765
+
766
+ 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 };
767
+ //# sourceMappingURL=sidebar.js.map
768
+ //# sourceMappingURL=sidebar.js.map