@resq-sw/ui 0.2.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 (344) hide show
  1. package/LICENSE.md +20 -0
  2. package/README.md +61 -0
  3. package/lib/components/accordion/accordion.d.ts +27 -0
  4. package/lib/components/accordion/accordion.d.ts.map +1 -0
  5. package/lib/components/accordion/accordion.js +71 -0
  6. package/lib/components/accordion/accordion.js.map +1 -0
  7. package/lib/components/accordion/index.d.ts +2 -0
  8. package/lib/components/accordion/index.js +2 -0
  9. package/lib/components/alert/alert.d.ts +30 -0
  10. package/lib/components/alert/alert.d.ts.map +1 -0
  11. package/lib/components/alert/alert.js +59 -0
  12. package/lib/components/alert/alert.js.map +1 -0
  13. package/lib/components/alert/index.d.ts +2 -0
  14. package/lib/components/alert/index.js +2 -0
  15. package/lib/components/alert-dialog/alert-dialog.d.ts +61 -0
  16. package/lib/components/alert-dialog/alert-dialog.d.ts.map +1 -0
  17. package/lib/components/alert-dialog/alert-dialog.js +102 -0
  18. package/lib/components/alert-dialog/alert-dialog.js.map +1 -0
  19. package/lib/components/alert-dialog/index.d.ts +2 -0
  20. package/lib/components/alert-dialog/index.js +2 -0
  21. package/lib/components/aspect-ratio/aspect-ratio.d.ts +11 -0
  22. package/lib/components/aspect-ratio/aspect-ratio.d.ts.map +1 -0
  23. package/lib/components/aspect-ratio/aspect-ratio.js +29 -0
  24. package/lib/components/aspect-ratio/aspect-ratio.js.map +1 -0
  25. package/lib/components/aspect-ratio/index.d.ts +2 -0
  26. package/lib/components/aspect-ratio/index.js +2 -0
  27. package/lib/components/avatar/avatar.d.ts +36 -0
  28. package/lib/components/avatar/avatar.d.ts.map +1 -0
  29. package/lib/components/avatar/avatar.js +67 -0
  30. package/lib/components/avatar/avatar.js.map +1 -0
  31. package/lib/components/avatar/index.d.ts +2 -0
  32. package/lib/components/avatar/index.js +2 -0
  33. package/lib/components/badge/badge.d.ts +21 -0
  34. package/lib/components/badge/badge.d.ts.map +1 -0
  35. package/lib/components/badge/badge.js +43 -0
  36. package/lib/components/badge/badge.js.map +1 -0
  37. package/lib/components/badge/index.d.ts +2 -0
  38. package/lib/components/badge/index.js +2 -0
  39. package/lib/components/breadcrumb/breadcrumb.d.ts +40 -0
  40. package/lib/components/breadcrumb/breadcrumb.d.ts.map +1 -0
  41. package/lib/components/breadcrumb/breadcrumb.js +86 -0
  42. package/lib/components/breadcrumb/breadcrumb.js.map +1 -0
  43. package/lib/components/breadcrumb/index.d.ts +2 -0
  44. package/lib/components/breadcrumb/index.js +2 -0
  45. package/lib/components/button/button.d.ts +23 -0
  46. package/lib/components/button/button.d.ts.map +1 -0
  47. package/lib/components/button/button.js +63 -0
  48. package/lib/components/button/button.js.map +1 -0
  49. package/lib/components/button/index.d.ts +2 -0
  50. package/lib/components/button/index.js +2 -0
  51. package/lib/components/button-group/button-group.d.ts +30 -0
  52. package/lib/components/button-group/button-group.d.ts.map +1 -0
  53. package/lib/components/button-group/button-group.js +55 -0
  54. package/lib/components/button-group/button-group.js.map +1 -0
  55. package/lib/components/button-group/index.d.ts +2 -0
  56. package/lib/components/button-group/index.js +2 -0
  57. package/lib/components/calendar/calendar.d.ts +32 -0
  58. package/lib/components/calendar/calendar.d.ts.map +1 -0
  59. package/lib/components/calendar/calendar.js +126 -0
  60. package/lib/components/calendar/calendar.js.map +1 -0
  61. package/lib/components/calendar/index.d.ts +2 -0
  62. package/lib/components/calendar/index.js +2 -0
  63. package/lib/components/card/card.d.ts +39 -0
  64. package/lib/components/card/card.d.ts.map +1 -0
  65. package/lib/components/card/card.js +57 -0
  66. package/lib/components/card/card.js.map +1 -0
  67. package/lib/components/card/index.d.ts +2 -0
  68. package/lib/components/card/index.js +2 -0
  69. package/lib/components/carousel/carousel.d.ts +58 -0
  70. package/lib/components/carousel/carousel.d.ts.map +1 -0
  71. package/lib/components/carousel/carousel.js +150 -0
  72. package/lib/components/carousel/carousel.js.map +1 -0
  73. package/lib/components/carousel/index.d.ts +2 -0
  74. package/lib/components/carousel/index.js +2 -0
  75. package/lib/components/chart/chart.d.ts +70 -0
  76. package/lib/components/chart/chart.d.ts.map +1 -0
  77. package/lib/components/chart/chart.js +164 -0
  78. package/lib/components/chart/chart.js.map +1 -0
  79. package/lib/components/chart/index.d.ts +2 -0
  80. package/lib/components/chart/index.js +2 -0
  81. package/lib/components/checkbox/checkbox.d.ts +13 -0
  82. package/lib/components/checkbox/checkbox.d.ts.map +1 -0
  83. package/lib/components/checkbox/checkbox.js +37 -0
  84. package/lib/components/checkbox/checkbox.js.map +1 -0
  85. package/lib/components/checkbox/index.d.ts +2 -0
  86. package/lib/components/checkbox/index.js +2 -0
  87. package/lib/components/collapsible/collapsible.d.ts +17 -0
  88. package/lib/components/collapsible/collapsible.d.ts.map +1 -0
  89. package/lib/components/collapsible/collapsible.js +41 -0
  90. package/lib/components/collapsible/collapsible.js.map +1 -0
  91. package/lib/components/collapsible/index.d.ts +2 -0
  92. package/lib/components/collapsible/index.js +2 -0
  93. package/lib/components/combobox/combobox.d.ts +83 -0
  94. package/lib/components/combobox/combobox.d.ts.map +1 -0
  95. package/lib/components/combobox/combobox.js +180 -0
  96. package/lib/components/combobox/combobox.js.map +1 -0
  97. package/lib/components/combobox/index.d.ts +2 -0
  98. package/lib/components/combobox/index.js +2 -0
  99. package/lib/components/command/command.d.ts +56 -0
  100. package/lib/components/command/command.d.ts.map +1 -0
  101. package/lib/components/command/command.js +104 -0
  102. package/lib/components/command/command.js.map +1 -0
  103. package/lib/components/command/index.d.ts +2 -0
  104. package/lib/components/command/index.js +2 -0
  105. package/lib/components/context-menu/context-menu.d.ts +81 -0
  106. package/lib/components/context-menu/context-menu.d.ts.map +1 -0
  107. package/lib/components/context-menu/context-menu.js +139 -0
  108. package/lib/components/context-menu/context-menu.js.map +1 -0
  109. package/lib/components/context-menu/index.d.ts +2 -0
  110. package/lib/components/context-menu/index.js +2 -0
  111. package/lib/components/dialog/dialog.d.ts +52 -0
  112. package/lib/components/dialog/dialog.d.ts.map +1 -0
  113. package/lib/components/dialog/dialog.js +97 -0
  114. package/lib/components/dialog/dialog.js.map +1 -0
  115. package/lib/components/dialog/index.d.ts +2 -0
  116. package/lib/components/dialog/index.js +2 -0
  117. package/lib/components/direction/direction.d.ts +17 -0
  118. package/lib/components/direction/direction.d.ts.map +1 -0
  119. package/lib/components/direction/direction.js +30 -0
  120. package/lib/components/direction/direction.js.map +1 -0
  121. package/lib/components/direction/index.d.ts +2 -0
  122. package/lib/components/direction/index.js +2 -0
  123. package/lib/components/drawer/drawer.d.ts +46 -0
  124. package/lib/components/drawer/drawer.d.ts.map +1 -0
  125. package/lib/components/drawer/drawer.js +94 -0
  126. package/lib/components/drawer/drawer.js.map +1 -0
  127. package/lib/components/drawer/index.d.ts +2 -0
  128. package/lib/components/drawer/index.js +2 -0
  129. package/lib/components/dropdown-menu/dropdown-menu.d.ts +80 -0
  130. package/lib/components/dropdown-menu/dropdown-menu.d.ts.map +1 -0
  131. package/lib/components/dropdown-menu/dropdown-menu.js +142 -0
  132. package/lib/components/dropdown-menu/dropdown-menu.js.map +1 -0
  133. package/lib/components/dropdown-menu/index.d.ts +2 -0
  134. package/lib/components/dropdown-menu/index.js +2 -0
  135. package/lib/components/empty/empty.d.ts +37 -0
  136. package/lib/components/empty/empty.d.ts.map +1 -0
  137. package/lib/components/empty/empty.js +76 -0
  138. package/lib/components/empty/empty.js.map +1 -0
  139. package/lib/components/empty/index.d.ts +2 -0
  140. package/lib/components/empty/index.js +2 -0
  141. package/lib/components/field/field.d.ts +66 -0
  142. package/lib/components/field/field.d.ts.map +1 -0
  143. package/lib/components/field/field.js +127 -0
  144. package/lib/components/field/field.js.map +1 -0
  145. package/lib/components/field/index.d.ts +2 -0
  146. package/lib/components/field/index.js +2 -0
  147. package/lib/components/hover-card/hover-card.d.ts +21 -0
  148. package/lib/components/hover-card/hover-card.d.ts.map +1 -0
  149. package/lib/components/hover-card/hover-card.js +48 -0
  150. package/lib/components/hover-card/hover-card.js.map +1 -0
  151. package/lib/components/hover-card/index.d.ts +2 -0
  152. package/lib/components/hover-card/index.js +2 -0
  153. package/lib/components/input/index.d.ts +2 -0
  154. package/lib/components/input/index.js +2 -0
  155. package/lib/components/input/input.d.ts +13 -0
  156. package/lib/components/input/input.d.ts.map +1 -0
  157. package/lib/components/input/input.js +15 -0
  158. package/lib/components/input/input.js.map +1 -0
  159. package/lib/components/input-group/index.d.ts +2 -0
  160. package/lib/components/input-group/index.js +2 -0
  161. package/lib/components/input-group/input-group.d.ts +45 -0
  162. package/lib/components/input-group/input-group.d.ts.map +1 -0
  163. package/lib/components/input-group/input-group.js +95 -0
  164. package/lib/components/input-group/input-group.js.map +1 -0
  165. package/lib/components/input-otp/index.d.ts +2 -0
  166. package/lib/components/input-otp/index.js +2 -0
  167. package/lib/components/input-otp/input-otp.d.ts +30 -0
  168. package/lib/components/input-otp/input-otp.d.ts.map +1 -0
  169. package/lib/components/input-otp/input-otp.js +64 -0
  170. package/lib/components/input-otp/input-otp.js.map +1 -0
  171. package/lib/components/item/index.d.ts +2 -0
  172. package/lib/components/item/index.js +2 -0
  173. package/lib/components/item/item.d.ts +64 -0
  174. package/lib/components/item/item.d.ts.map +1 -0
  175. package/lib/components/item/item.js +133 -0
  176. package/lib/components/item/item.js.map +1 -0
  177. package/lib/components/kbd/index.d.ts +2 -0
  178. package/lib/components/kbd/index.js +2 -0
  179. package/lib/components/kbd/kbd.d.ts +30 -0
  180. package/lib/components/kbd/kbd.d.ts.map +1 -0
  181. package/lib/components/kbd/kbd.js +36 -0
  182. package/lib/components/kbd/kbd.js.map +1 -0
  183. package/lib/components/label/index.d.ts +2 -0
  184. package/lib/components/label/index.js +2 -0
  185. package/lib/components/label/label.d.ts +13 -0
  186. package/lib/components/label/label.d.ts.map +1 -0
  187. package/lib/components/label/label.js +31 -0
  188. package/lib/components/label/label.js.map +1 -0
  189. package/lib/components/menubar/index.d.ts +2 -0
  190. package/lib/components/menubar/index.js +2 -0
  191. package/lib/components/menubar/menubar.d.ts +86 -0
  192. package/lib/components/menubar/menubar.d.ts.map +1 -0
  193. package/lib/components/menubar/menubar.js +149 -0
  194. package/lib/components/menubar/menubar.js.map +1 -0
  195. package/lib/components/native-select/index.d.ts +2 -0
  196. package/lib/components/native-select/index.js +2 -0
  197. package/lib/components/native-select/native-select.d.ts +23 -0
  198. package/lib/components/native-select/native-select.d.ts.map +1 -0
  199. package/lib/components/native-select/native-select.js +53 -0
  200. package/lib/components/native-select/native-select.js.map +1 -0
  201. package/lib/components/navigation-menu/index.d.ts +2 -0
  202. package/lib/components/navigation-menu/index.js +2 -0
  203. package/lib/components/navigation-menu/navigation-menu.d.ts +48 -0
  204. package/lib/components/navigation-menu/navigation-menu.d.ts.map +1 -0
  205. package/lib/components/navigation-menu/navigation-menu.js +96 -0
  206. package/lib/components/navigation-menu/navigation-menu.js.map +1 -0
  207. package/lib/components/pagination/index.d.ts +2 -0
  208. package/lib/components/pagination/index.js +2 -0
  209. package/lib/components/pagination/pagination.d.ts +47 -0
  210. package/lib/components/pagination/pagination.d.ts.map +1 -0
  211. package/lib/components/pagination/pagination.js +95 -0
  212. package/lib/components/pagination/pagination.js.map +1 -0
  213. package/lib/components/popover/index.d.ts +2 -0
  214. package/lib/components/popover/index.js +2 -0
  215. package/lib/components/popover/popover.d.ts +36 -0
  216. package/lib/components/popover/popover.d.ts.map +1 -0
  217. package/lib/components/popover/popover.js +72 -0
  218. package/lib/components/popover/popover.js.map +1 -0
  219. package/lib/components/progress/index.d.ts +2 -0
  220. package/lib/components/progress/index.js +2 -0
  221. package/lib/components/progress/progress.d.ts +14 -0
  222. package/lib/components/progress/progress.d.ts.map +1 -0
  223. package/lib/components/progress/progress.js +36 -0
  224. package/lib/components/progress/progress.js.map +1 -0
  225. package/lib/components/radio-group/index.d.ts +2 -0
  226. package/lib/components/radio-group/index.js +2 -0
  227. package/lib/components/radio-group/radio-group.d.ts +17 -0
  228. package/lib/components/radio-group/radio-group.d.ts.map +1 -0
  229. package/lib/components/radio-group/radio-group.js +44 -0
  230. package/lib/components/radio-group/radio-group.js.map +1 -0
  231. package/lib/components/resizable/index.d.ts +2 -0
  232. package/lib/components/resizable/index.js +2 -0
  233. package/lib/components/resizable/resizable.d.ts +23 -0
  234. package/lib/components/resizable/resizable.d.ts.map +1 -0
  235. package/lib/components/resizable/resizable.js +45 -0
  236. package/lib/components/resizable/resizable.js.map +1 -0
  237. package/lib/components/scroll-area/index.d.ts +2 -0
  238. package/lib/components/scroll-area/index.js +2 -0
  239. package/lib/components/scroll-area/scroll-area.d.ts +19 -0
  240. package/lib/components/scroll-area/scroll-area.d.ts.map +1 -0
  241. package/lib/components/scroll-area/scroll-area.js +53 -0
  242. package/lib/components/scroll-area/scroll-area.js.map +1 -0
  243. package/lib/components/select/index.d.ts +2 -0
  244. package/lib/components/select/index.js +2 -0
  245. package/lib/components/select/select.d.ts +55 -0
  246. package/lib/components/select/select.d.ts.map +1 -0
  247. package/lib/components/select/select.js +116 -0
  248. package/lib/components/select/select.js.map +1 -0
  249. package/lib/components/separator/index.d.ts +2 -0
  250. package/lib/components/separator/index.js +2 -0
  251. package/lib/components/separator/separator.d.ts +15 -0
  252. package/lib/components/separator/separator.d.ts.map +1 -0
  253. package/lib/components/separator/separator.js +33 -0
  254. package/lib/components/separator/separator.js.map +1 -0
  255. package/lib/components/sheet/index.d.ts +2 -0
  256. package/lib/components/sheet/index.js +2 -0
  257. package/lib/components/sheet/sheet.d.ts +44 -0
  258. package/lib/components/sheet/sheet.d.ts.map +1 -0
  259. package/lib/components/sheet/sheet.js +106 -0
  260. package/lib/components/sheet/sheet.js.map +1 -0
  261. package/lib/components/sidebar/index.d.ts +2 -0
  262. package/lib/components/sidebar/index.js +2 -0
  263. package/lib/components/sidebar/sidebar.d.ts +169 -0
  264. package/lib/components/sidebar/sidebar.d.ts.map +1 -0
  265. package/lib/components/sidebar/sidebar.js +388 -0
  266. package/lib/components/sidebar/sidebar.js.map +1 -0
  267. package/lib/components/skeleton/index.d.ts +2 -0
  268. package/lib/components/skeleton/index.js +2 -0
  269. package/lib/components/skeleton/skeleton.d.ts +26 -0
  270. package/lib/components/skeleton/skeleton.d.ts.map +1 -0
  271. package/lib/components/skeleton/skeleton.js +29 -0
  272. package/lib/components/skeleton/skeleton.js.map +1 -0
  273. package/lib/components/slider/index.d.ts +2 -0
  274. package/lib/components/slider/index.js +2 -0
  275. package/lib/components/slider/slider.d.ts +17 -0
  276. package/lib/components/slider/slider.d.ts.map +1 -0
  277. package/lib/components/slider/slider.js +53 -0
  278. package/lib/components/slider/slider.js.map +1 -0
  279. package/lib/components/sonner/index.d.ts +2 -0
  280. package/lib/components/sonner/index.js +2 -0
  281. package/lib/components/sonner/sonner.d.ts +11 -0
  282. package/lib/components/sonner/sonner.d.ts.map +1 -0
  283. package/lib/components/sonner/sonner.js +47 -0
  284. package/lib/components/sonner/sonner.js.map +1 -0
  285. package/lib/components/spinner/index.d.ts +2 -0
  286. package/lib/components/spinner/index.js +2 -0
  287. package/lib/components/spinner/spinner.d.ts +26 -0
  288. package/lib/components/spinner/spinner.d.ts.map +1 -0
  289. package/lib/components/spinner/spinner.js +31 -0
  290. package/lib/components/spinner/spinner.js.map +1 -0
  291. package/lib/components/switch/index.d.ts +2 -0
  292. package/lib/components/switch/index.js +2 -0
  293. package/lib/components/switch/switch.d.ts +16 -0
  294. package/lib/components/switch/switch.d.ts.map +1 -0
  295. package/lib/components/switch/switch.js +36 -0
  296. package/lib/components/switch/switch.js.map +1 -0
  297. package/lib/components/table/index.d.ts +2 -0
  298. package/lib/components/table/index.js +2 -0
  299. package/lib/components/table/table.d.ts +40 -0
  300. package/lib/components/table/table.d.ts.map +1 -0
  301. package/lib/components/table/table.js +83 -0
  302. package/lib/components/table/table.js.map +1 -0
  303. package/lib/components/tabs/index.d.ts +2 -0
  304. package/lib/components/tabs/index.js +2 -0
  305. package/lib/components/tabs/tabs.d.ts +32 -0
  306. package/lib/components/tabs/tabs.d.ts.map +1 -0
  307. package/lib/components/tabs/tabs.js +62 -0
  308. package/lib/components/tabs/tabs.js.map +1 -0
  309. package/lib/components/textarea/index.d.ts +2 -0
  310. package/lib/components/textarea/index.js +2 -0
  311. package/lib/components/textarea/textarea.d.ts +12 -0
  312. package/lib/components/textarea/textarea.d.ts.map +1 -0
  313. package/lib/components/textarea/textarea.js +14 -0
  314. package/lib/components/textarea/textarea.js.map +1 -0
  315. package/lib/components/toggle/index.d.ts +2 -0
  316. package/lib/components/toggle/index.js +2 -0
  317. package/lib/components/toggle/toggle.d.ts +21 -0
  318. package/lib/components/toggle/toggle.d.ts.map +1 -0
  319. package/lib/components/toggle/toggle.js +53 -0
  320. package/lib/components/toggle/toggle.js.map +1 -0
  321. package/lib/components/toggle-group/index.d.ts +2 -0
  322. package/lib/components/toggle-group/index.js +2 -0
  323. package/lib/components/toggle-group/toggle-group.d.ts +30 -0
  324. package/lib/components/toggle-group/toggle-group.d.ts.map +1 -0
  325. package/lib/components/toggle-group/toggle-group.js +68 -0
  326. package/lib/components/toggle-group/toggle-group.js.map +1 -0
  327. package/lib/components/tooltip/index.d.ts +2 -0
  328. package/lib/components/tooltip/index.js +2 -0
  329. package/lib/components/tooltip/tooltip.d.ts +25 -0
  330. package/lib/components/tooltip/tooltip.d.ts.map +1 -0
  331. package/lib/components/tooltip/tooltip.js +52 -0
  332. package/lib/components/tooltip/tooltip.js.map +1 -0
  333. package/lib/hooks/use-mobile.d.ts +20 -0
  334. package/lib/hooks/use-mobile.d.ts.map +1 -0
  335. package/lib/hooks/use-mobile.js +37 -0
  336. package/lib/hooks/use-mobile.js.map +1 -0
  337. package/lib/index.d.ts +58 -0
  338. package/lib/index.js +113 -0
  339. package/lib/lib/utils.d.ts +7 -0
  340. package/lib/lib/utils.d.ts.map +1 -0
  341. package/lib/lib/utils.js +10 -0
  342. package/lib/lib/utils.js.map +1 -0
  343. package/package.json +395 -0
  344. package/src/styles/globals.css +140 -0
@@ -0,0 +1,388 @@
1
+ "use client";
2
+ import { cn } from "../../lib/utils.js";
3
+ import { Button } from "../button/button.js";
4
+ import { Separator as Separator$1 } from "../separator/separator.js";
5
+ import { Input } from "../input/input.js";
6
+ import { Sheet, SheetContent, SheetDescription, SheetHeader, SheetTitle } from "../sheet/sheet.js";
7
+ import { useIsMobile } from "../../hooks/use-mobile.js";
8
+ import { Skeleton } from "../skeleton/skeleton.js";
9
+ import { Tooltip as Tooltip$1, TooltipContent, TooltipTrigger } from "../tooltip/tooltip.js";
10
+ import { PanelLeftIcon } from "lucide-react";
11
+ import { Slot } from "radix-ui";
12
+ import { jsx, jsxs } from "react/jsx-runtime";
13
+ import { cva } from "class-variance-authority";
14
+ import * as React from "react";
15
+ //#region src/components/sidebar/sidebar.tsx
16
+ /**
17
+ * Copyright 2026 ResQ
18
+ *
19
+ * Licensed under the Apache License, Version 2.0 (the "License");
20
+ * you may not use this file except in compliance with the License.
21
+ * You may obtain a copy of the License at
22
+ *
23
+ * http://www.apache.org/licenses/LICENSE-2.0
24
+ *
25
+ * Unless required by applicable law or agreed to in writing, software
26
+ * distributed under the License is distributed on an "AS IS" BASIS,
27
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
28
+ * See the License for the specific language governing permissions and
29
+ * limitations under the License.
30
+ */
31
+ const SIDEBAR_COOKIE_NAME = "sidebar_state";
32
+ const SIDEBAR_COOKIE_MAX_AGE = 3600 * 24 * 7;
33
+ const SIDEBAR_WIDTH = "16rem";
34
+ const SIDEBAR_WIDTH_MOBILE = "18rem";
35
+ const SIDEBAR_WIDTH_ICON = "3rem";
36
+ const SIDEBAR_KEYBOARD_SHORTCUT = "b";
37
+ const SidebarContext = React.createContext(null);
38
+ function Sidebar({ children, className, collapsible = "offcanvas", dir, side = "left", variant = "sidebar", ...props }) {
39
+ const { isMobile, openMobile, setOpenMobile, state } = useSidebar();
40
+ if (collapsible === "none") return /* @__PURE__ */ jsx("div", {
41
+ className: cn("bg-sidebar text-sidebar-foreground flex h-full w-(--sidebar-width) flex-col", className),
42
+ "data-slot": "sidebar",
43
+ ...props,
44
+ children
45
+ });
46
+ if (isMobile) return /* @__PURE__ */ jsx(Sheet, {
47
+ onOpenChange: setOpenMobile,
48
+ open: openMobile,
49
+ ...props,
50
+ children: /* @__PURE__ */ jsxs(SheetContent, {
51
+ className: "bg-sidebar text-sidebar-foreground w-(--sidebar-width) p-0 [&>button]:hidden",
52
+ "data-mobile": "true",
53
+ "data-sidebar": "sidebar",
54
+ "data-slot": "sidebar",
55
+ dir,
56
+ side,
57
+ style: { "--sidebar-width": SIDEBAR_WIDTH_MOBILE },
58
+ children: [/* @__PURE__ */ jsxs(SheetHeader, {
59
+ className: "sr-only",
60
+ children: [/* @__PURE__ */ jsx(SheetTitle, { children: "Sidebar" }), /* @__PURE__ */ jsx(SheetDescription, { children: "Displays the mobile sidebar." })]
61
+ }), /* @__PURE__ */ jsx("div", {
62
+ className: "flex h-full w-full flex-col",
63
+ children
64
+ })]
65
+ })
66
+ });
67
+ return /* @__PURE__ */ jsxs("div", {
68
+ className: "group peer text-sidebar-foreground hidden md:block",
69
+ "data-collapsible": state === "collapsed" ? collapsible : "",
70
+ "data-side": side,
71
+ "data-slot": "sidebar",
72
+ "data-state": state,
73
+ "data-variant": variant,
74
+ children: [/* @__PURE__ */ jsx("div", {
75
+ className: cn("transition-[width] duration-200 ease-linear relative w-(--sidebar-width) bg-transparent", "group-data-[collapsible=offcanvas]:w-0", "group-data-[side=right]:rotate-180", variant === "floating" || variant === "inset" ? "group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]" : "group-data-[collapsible=icon]:w-(--sidebar-width-icon)"),
76
+ "data-slot": "sidebar-gap"
77
+ }), /* @__PURE__ */ jsx("div", {
78
+ className: cn("fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear data-[side=left]:left-0 data-[side=left]:group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)] data-[side=right]:right-0 data-[side=right]:group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)] md:flex", variant === "floating" || variant === "inset" ? "p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]" : "group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l", className),
79
+ "data-side": side,
80
+ "data-slot": "sidebar-container",
81
+ ...props,
82
+ children: /* @__PURE__ */ jsx("div", {
83
+ className: "bg-sidebar group-data-[variant=floating]:ring-sidebar-border group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:shadow-sm group-data-[variant=floating]:ring-1 flex size-full flex-col",
84
+ "data-sidebar": "sidebar",
85
+ "data-slot": "sidebar-inner",
86
+ children
87
+ })
88
+ })]
89
+ });
90
+ }
91
+ function SidebarContent({ className, ...props }) {
92
+ return /* @__PURE__ */ jsx("div", {
93
+ className: cn("no-scrollbar gap-0 flex min-h-0 flex-1 flex-col overflow-auto group-data-[collapsible=icon]:overflow-hidden", className),
94
+ "data-sidebar": "content",
95
+ "data-slot": "sidebar-content",
96
+ ...props
97
+ });
98
+ }
99
+ function SidebarFooter({ className, ...props }) {
100
+ return /* @__PURE__ */ jsx("div", {
101
+ className: cn("gap-2 p-2 flex flex-col", className),
102
+ "data-sidebar": "footer",
103
+ "data-slot": "sidebar-footer",
104
+ ...props
105
+ });
106
+ }
107
+ function SidebarGroup({ className, ...props }) {
108
+ return /* @__PURE__ */ jsx("div", {
109
+ className: cn("p-2 relative flex w-full min-w-0 flex-col", className),
110
+ "data-sidebar": "group",
111
+ "data-slot": "sidebar-group",
112
+ ...props
113
+ });
114
+ }
115
+ function SidebarGroupAction({ asChild = false, className, ...props }) {
116
+ return /* @__PURE__ */ jsx(asChild ? Slot.Root : "button", {
117
+ className: cn("text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground absolute top-3.5 right-3 w-5 rounded-md p-0 focus-visible:ring-2 [&>svg]:size-4 flex aspect-square items-center justify-center outline-hidden transition-transform group-data-[collapsible=icon]:hidden after:absolute after:-inset-2 md:after:hidden [&>svg]:shrink-0", className),
118
+ "data-sidebar": "group-action",
119
+ "data-slot": "sidebar-group-action",
120
+ ...props
121
+ });
122
+ }
123
+ function SidebarGroupContent({ className, ...props }) {
124
+ return /* @__PURE__ */ jsx("div", {
125
+ className: cn("text-sm w-full", className),
126
+ "data-sidebar": "group-content",
127
+ "data-slot": "sidebar-group-content",
128
+ ...props
129
+ });
130
+ }
131
+ function SidebarGroupLabel({ asChild = false, className, ...props }) {
132
+ return /* @__PURE__ */ jsx(asChild ? Slot.Root : "div", {
133
+ className: cn("text-sidebar-foreground/70 ring-sidebar-ring h-8 rounded-md px-2 text-xs font-medium transition-[margin,opacity] duration-200 ease-linear group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0 focus-visible:ring-2 [&>svg]:size-4 flex shrink-0 items-center outline-hidden [&>svg]:shrink-0", className),
134
+ "data-sidebar": "group-label",
135
+ "data-slot": "sidebar-group-label",
136
+ ...props
137
+ });
138
+ }
139
+ function SidebarHeader({ className, ...props }) {
140
+ return /* @__PURE__ */ jsx("div", {
141
+ className: cn("gap-2 p-2 flex flex-col", className),
142
+ "data-sidebar": "header",
143
+ "data-slot": "sidebar-header",
144
+ ...props
145
+ });
146
+ }
147
+ function SidebarInput({ className, ...props }) {
148
+ return /* @__PURE__ */ jsx(Input, {
149
+ className: cn("bg-background h-8 w-full shadow-none", className),
150
+ "data-sidebar": "input",
151
+ "data-slot": "sidebar-input",
152
+ ...props
153
+ });
154
+ }
155
+ function SidebarInset({ className, ...props }) {
156
+ return /* @__PURE__ */ jsx("main", {
157
+ className: cn("bg-background md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2 relative flex w-full flex-1 flex-col", className),
158
+ "data-slot": "sidebar-inset",
159
+ ...props
160
+ });
161
+ }
162
+ function SidebarMenu({ className, ...props }) {
163
+ return /* @__PURE__ */ jsx("ul", {
164
+ className: cn("gap-0 flex w-full min-w-0 flex-col", className),
165
+ "data-sidebar": "menu",
166
+ "data-slot": "sidebar-menu",
167
+ ...props
168
+ });
169
+ }
170
+ function SidebarMenuItem({ className, ...props }) {
171
+ return /* @__PURE__ */ jsx("li", {
172
+ className: cn("group/menu-item relative", className),
173
+ "data-sidebar": "menu-item",
174
+ "data-slot": "sidebar-menu-item",
175
+ ...props
176
+ });
177
+ }
178
+ function SidebarProvider({ children, className, defaultOpen = true, onOpenChange: setOpenProp, open: openProp, style, ...props }) {
179
+ const isMobile = useIsMobile();
180
+ const [openMobile, setOpenMobile] = React.useState(false);
181
+ const [_open, _setOpen] = React.useState(defaultOpen);
182
+ const open = openProp ?? _open;
183
+ const setOpen = React.useCallback((value) => {
184
+ const openState = typeof value === "function" ? value(open) : value;
185
+ if (setOpenProp) setOpenProp(openState);
186
+ else _setOpen(openState);
187
+ document.cookie = `${SIDEBAR_COOKIE_NAME}=${openState}; path=/; max-age=${SIDEBAR_COOKIE_MAX_AGE}`;
188
+ }, [setOpenProp, open]);
189
+ const toggleSidebar = React.useCallback(() => {
190
+ isMobile ? setOpenMobile((open) => !open) : setOpen((open) => !open);
191
+ }, [isMobile, setOpen]);
192
+ React.useEffect(() => {
193
+ const handleKeyDown = (event) => {
194
+ if (event.key === SIDEBAR_KEYBOARD_SHORTCUT && (event.metaKey || event.ctrlKey)) {
195
+ event.preventDefault();
196
+ toggleSidebar();
197
+ }
198
+ };
199
+ window.addEventListener("keydown", handleKeyDown);
200
+ return () => {
201
+ window.removeEventListener("keydown", handleKeyDown);
202
+ };
203
+ }, [toggleSidebar]);
204
+ const state = open ? "expanded" : "collapsed";
205
+ const contextValue = React.useMemo(() => ({
206
+ isMobile,
207
+ open,
208
+ openMobile,
209
+ setOpen,
210
+ setOpenMobile,
211
+ state,
212
+ toggleSidebar
213
+ }), [
214
+ state,
215
+ open,
216
+ setOpen,
217
+ isMobile,
218
+ openMobile,
219
+ toggleSidebar
220
+ ]);
221
+ return /* @__PURE__ */ jsx(SidebarContext.Provider, {
222
+ value: contextValue,
223
+ children: /* @__PURE__ */ jsx("div", {
224
+ className: cn("group/sidebar-wrapper has-data-[variant=inset]:bg-sidebar flex min-h-svh w-full", className),
225
+ "data-slot": "sidebar-wrapper",
226
+ style: {
227
+ "--sidebar-width": SIDEBAR_WIDTH,
228
+ "--sidebar-width-icon": SIDEBAR_WIDTH_ICON,
229
+ ...style
230
+ },
231
+ ...props,
232
+ children
233
+ })
234
+ });
235
+ }
236
+ function SidebarRail({ className, ...props }) {
237
+ const { toggleSidebar } = useSidebar();
238
+ return /* @__PURE__ */ jsx("button", {
239
+ "aria-label": "Toggle Sidebar",
240
+ className: cn("hover:after:bg-sidebar-border absolute inset-y-0 z-20 hidden w-4 transition-all ease-linear group-data-[side=left]:-right-4 group-data-[side=right]:left-0 after:absolute after:inset-y-0 after:start-1/2 after:w-[2px] sm:flex ltr:-translate-x-1/2 rtl:-translate-x-1/2", "in-data-[side=left]:cursor-w-resize in-data-[side=right]:cursor-e-resize", "[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize", "hover:group-data-[collapsible=offcanvas]:bg-sidebar group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full", "[[data-side=left][data-collapsible=offcanvas]_&]:-right-2", "[[data-side=right][data-collapsible=offcanvas]_&]:-left-2", className),
241
+ "data-sidebar": "rail",
242
+ "data-slot": "sidebar-rail",
243
+ onClick: toggleSidebar,
244
+ tabIndex: -1,
245
+ title: "Toggle Sidebar",
246
+ ...props
247
+ });
248
+ }
249
+ function SidebarSeparator({ className, ...props }) {
250
+ return /* @__PURE__ */ jsx(Separator$1, {
251
+ className: cn("bg-sidebar-border mx-2 w-auto", className),
252
+ "data-sidebar": "separator",
253
+ "data-slot": "sidebar-separator",
254
+ ...props
255
+ });
256
+ }
257
+ function SidebarTrigger({ className, onClick, ...props }) {
258
+ const { toggleSidebar } = useSidebar();
259
+ return /* @__PURE__ */ jsxs(Button, {
260
+ className,
261
+ "data-sidebar": "trigger",
262
+ "data-slot": "sidebar-trigger",
263
+ onClick: (event) => {
264
+ onClick?.(event);
265
+ toggleSidebar();
266
+ },
267
+ size: "icon-sm",
268
+ variant: "ghost",
269
+ ...props,
270
+ children: [/* @__PURE__ */ jsx(PanelLeftIcon, {}), /* @__PURE__ */ jsx("span", {
271
+ className: "sr-only",
272
+ children: "Toggle Sidebar"
273
+ })]
274
+ });
275
+ }
276
+ function useSidebar() {
277
+ const context = React.useContext(SidebarContext);
278
+ if (!context) throw new Error("useSidebar must be used within a SidebarProvider.");
279
+ return context;
280
+ }
281
+ const sidebarMenuButtonVariants = cva("ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground active:bg-sidebar-accent active:text-sidebar-accent-foreground data-active:bg-sidebar-accent data-active:text-sidebar-accent-foreground data-open:hover:bg-sidebar-accent data-open:hover:text-sidebar-accent-foreground gap-2 rounded-md p-2 text-left text-sm transition-[width,height,padding] group-has-data-[sidebar=menu-action]/menu-item:pr-8 group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! focus-visible:ring-2 data-active:font-medium peer/menu-button flex w-full items-center overflow-hidden outline-hidden group/menu-button 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", {
282
+ defaultVariants: {
283
+ size: "default",
284
+ variant: "default"
285
+ },
286
+ variants: {
287
+ size: {
288
+ default: "h-8 text-sm",
289
+ lg: "h-12 text-sm group-data-[collapsible=icon]:p-0!",
290
+ sm: "h-7 text-xs"
291
+ },
292
+ variant: {
293
+ default: "hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",
294
+ outline: "bg-background hover:bg-sidebar-accent hover:text-sidebar-accent-foreground shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]"
295
+ }
296
+ }
297
+ });
298
+ function SidebarMenuAction({ asChild = false, className, showOnHover = false, ...props }) {
299
+ return /* @__PURE__ */ jsx(asChild ? Slot.Root : "button", {
300
+ className: cn("text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground peer-hover/menu-button:text-sidebar-accent-foreground absolute top-1.5 right-1 aspect-square w-5 rounded-md p-0 peer-data-[size=default]/menu-button:top-1.5 peer-data-[size=lg]/menu-button:top-2.5 peer-data-[size=sm]/menu-button:top-1 focus-visible:ring-2 [&>svg]:size-4 flex items-center justify-center outline-hidden transition-transform group-data-[collapsible=icon]:hidden after:absolute after:-inset-2 md:after:hidden [&>svg]:shrink-0", showOnHover && "peer-data-active/menu-button:text-sidebar-accent-foreground group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-open:opacity-100 md:opacity-0", className),
301
+ "data-sidebar": "menu-action",
302
+ "data-slot": "sidebar-menu-action",
303
+ ...props
304
+ });
305
+ }
306
+ function SidebarMenuBadge({ className, ...props }) {
307
+ return /* @__PURE__ */ jsx("div", {
308
+ className: cn("text-sidebar-foreground peer-hover/menu-button:text-sidebar-accent-foreground peer-data-active/menu-button:text-sidebar-accent-foreground pointer-events-none absolute right-1 flex h-5 min-w-5 rounded-md px-1 text-xs font-medium peer-data-[size=default]/menu-button:top-1.5 peer-data-[size=lg]/menu-button:top-2.5 peer-data-[size=sm]/menu-button:top-1 items-center justify-center tabular-nums select-none group-data-[collapsible=icon]:hidden", className),
309
+ "data-sidebar": "menu-badge",
310
+ "data-slot": "sidebar-menu-badge",
311
+ ...props
312
+ });
313
+ }
314
+ function SidebarMenuButton({ asChild = false, className, isActive = false, size = "default", tooltip, variant = "default", ...props }) {
315
+ const Comp = asChild ? Slot.Root : "button";
316
+ const { isMobile, state } = useSidebar();
317
+ const button = /* @__PURE__ */ jsx(Comp, {
318
+ className: cn(sidebarMenuButtonVariants({
319
+ size,
320
+ variant
321
+ }), className),
322
+ "data-active": isActive,
323
+ "data-sidebar": "menu-button",
324
+ "data-size": size,
325
+ "data-slot": "sidebar-menu-button",
326
+ ...props
327
+ });
328
+ if (!tooltip) return button;
329
+ if (typeof tooltip === "string") tooltip = { children: tooltip };
330
+ return /* @__PURE__ */ jsxs(Tooltip$1, { children: [/* @__PURE__ */ jsx(TooltipTrigger, {
331
+ asChild: true,
332
+ children: button
333
+ }), /* @__PURE__ */ jsx(TooltipContent, {
334
+ align: "center",
335
+ hidden: state !== "collapsed" || isMobile,
336
+ side: "right",
337
+ ...tooltip
338
+ })] });
339
+ }
340
+ function SidebarMenuSkeleton({ className, showIcon = false, ...props }) {
341
+ const [width] = React.useState(() => {
342
+ return `${Math.floor(Math.random() * 40) + 50}%`;
343
+ });
344
+ return /* @__PURE__ */ jsxs("div", {
345
+ className: cn("h-8 gap-2 rounded-md px-2 flex items-center", className),
346
+ "data-sidebar": "menu-skeleton",
347
+ "data-slot": "sidebar-menu-skeleton",
348
+ ...props,
349
+ children: [showIcon && /* @__PURE__ */ jsx(Skeleton, {
350
+ className: "size-4 rounded-md",
351
+ "data-sidebar": "menu-skeleton-icon"
352
+ }), /* @__PURE__ */ jsx(Skeleton, {
353
+ className: "h-4 max-w-(--skeleton-width) flex-1",
354
+ "data-sidebar": "menu-skeleton-text",
355
+ style: { "--skeleton-width": width }
356
+ })]
357
+ });
358
+ }
359
+ function SidebarMenuSub({ className, ...props }) {
360
+ return /* @__PURE__ */ jsx("ul", {
361
+ className: cn("border-sidebar-border mx-3.5 translate-x-px gap-1 border-l px-2.5 py-0.5 group-data-[collapsible=icon]:hidden flex min-w-0 flex-col", className),
362
+ "data-sidebar": "menu-sub",
363
+ "data-slot": "sidebar-menu-sub",
364
+ ...props
365
+ });
366
+ }
367
+ function SidebarMenuSubButton({ asChild = false, className, isActive = false, size = "md", ...props }) {
368
+ return /* @__PURE__ */ jsx(asChild ? Slot.Root : "a", {
369
+ className: cn("text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground active:bg-sidebar-accent active:text-sidebar-accent-foreground [&>svg]:text-sidebar-accent-foreground data-active:bg-sidebar-accent data-active:text-sidebar-accent-foreground h-7 gap-2 rounded-md px-2 focus-visible:ring-2 data-[size=md]:text-sm data-[size=sm]:text-xs [&>svg]:size-4 flex min-w-0 -translate-x-px items-center overflow-hidden outline-hidden group-data-[collapsible=icon]:hidden disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:shrink-0", className),
370
+ "data-active": isActive,
371
+ "data-sidebar": "menu-sub-button",
372
+ "data-size": size,
373
+ "data-slot": "sidebar-menu-sub-button",
374
+ ...props
375
+ });
376
+ }
377
+ function SidebarMenuSubItem({ className, ...props }) {
378
+ return /* @__PURE__ */ jsx("li", {
379
+ className: cn("group/menu-sub-item relative", className),
380
+ "data-sidebar": "menu-sub-item",
381
+ "data-slot": "sidebar-menu-sub-item",
382
+ ...props
383
+ });
384
+ }
385
+ //#endregion
386
+ 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 };
387
+
388
+ //# sourceMappingURL=sidebar.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sidebar.js","names":["Separator","Tooltip"],"sources":["../../../src/components/sidebar/sidebar.tsx"],"sourcesContent":["/**\n * Copyright 2026 ResQ\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\"use client\";\n\nimport { cva, type VariantProps } from \"class-variance-authority\";\nimport { PanelLeftIcon } from \"lucide-react\";\nimport { Slot } from \"radix-ui\";\nimport * as React from \"react\";\n\nimport { useIsMobile } from \"../../hooks/use-mobile.js\";\nimport { cn } from \"../../lib/utils.js\";\nimport { Button } from \"../button/button.js\";\nimport { Input } from \"../input/input.js\";\nimport { Separator } from \"../separator/separator.js\";\nimport { Sheet, SheetContent, SheetDescription, SheetHeader, SheetTitle } from \"../sheet/sheet.js\";\nimport { Skeleton } from \"../skeleton/skeleton.js\";\nimport { Tooltip, TooltipContent, TooltipTrigger } from \"../tooltip/tooltip.js\";\n\nconst SIDEBAR_COOKIE_NAME = \"sidebar_state\";\nconst SIDEBAR_COOKIE_MAX_AGE = 60 * 60 * 24 * 7;\nconst SIDEBAR_WIDTH = \"16rem\";\nconst SIDEBAR_WIDTH_MOBILE = \"18rem\";\nconst SIDEBAR_WIDTH_ICON = \"3rem\";\nconst SIDEBAR_KEYBOARD_SHORTCUT = \"b\";\n\ninterface SidebarContextProps {\n\tisMobile: boolean;\n\topen: boolean;\n\topenMobile: boolean;\n\tsetOpen: (open: boolean) => void;\n\tsetOpenMobile: (open: boolean) => void;\n\tstate: \"collapsed\" | \"expanded\";\n\ttoggleSidebar: () => void;\n}\n\nconst SidebarContext = React.createContext<null | SidebarContextProps>(null);\n\nfunction Sidebar({\n\tchildren,\n\tclassName,\n\tcollapsible = \"offcanvas\",\n\tdir,\n\tside = \"left\",\n\tvariant = \"sidebar\",\n\t...props\n}: React.ComponentProps<\"div\"> & {\n\tcollapsible?: \"icon\" | \"none\" | \"offcanvas\";\n\tside?: \"left\" | \"right\";\n\tvariant?: \"floating\" | \"inset\" | \"sidebar\";\n}) {\n\tconst { isMobile, openMobile, setOpenMobile, state } = useSidebar();\n\n\tif (collapsible === \"none\") {\n\t\treturn (\n\t\t\t<div\n\t\t\t\tclassName={cn(\n\t\t\t\t\t\"bg-sidebar text-sidebar-foreground flex h-full w-(--sidebar-width) flex-col\",\n\t\t\t\t\tclassName,\n\t\t\t\t)}\n\t\t\t\tdata-slot=\"sidebar\"\n\t\t\t\t{...props}\n\t\t\t>\n\t\t\t\t{children}\n\t\t\t</div>\n\t\t);\n\t}\n\n\tif (isMobile) {\n\t\treturn (\n\t\t\t<Sheet onOpenChange={setOpenMobile} open={openMobile} {...props}>\n\t\t\t\t<SheetContent\n\t\t\t\t\tclassName=\"bg-sidebar text-sidebar-foreground w-(--sidebar-width) p-0 [&>button]:hidden\"\n\t\t\t\t\tdata-mobile=\"true\"\n\t\t\t\t\tdata-sidebar=\"sidebar\"\n\t\t\t\t\tdata-slot=\"sidebar\"\n\t\t\t\t\tdir={dir}\n\t\t\t\t\tside={side}\n\t\t\t\t\tstyle={\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\"--sidebar-width\": SIDEBAR_WIDTH_MOBILE,\n\t\t\t\t\t\t} as React.CSSProperties\n\t\t\t\t\t}\n\t\t\t\t>\n\t\t\t\t\t<SheetHeader className=\"sr-only\">\n\t\t\t\t\t\t<SheetTitle>Sidebar</SheetTitle>\n\t\t\t\t\t\t<SheetDescription>Displays the mobile sidebar.</SheetDescription>\n\t\t\t\t\t</SheetHeader>\n\t\t\t\t\t<div className=\"flex h-full w-full flex-col\">{children}</div>\n\t\t\t\t</SheetContent>\n\t\t\t</Sheet>\n\t\t);\n\t}\n\n\treturn (\n\t\t<div\n\t\t\tclassName=\"group peer text-sidebar-foreground hidden md:block\"\n\t\t\tdata-collapsible={state === \"collapsed\" ? collapsible : \"\"}\n\t\t\tdata-side={side}\n\t\t\tdata-slot=\"sidebar\"\n\t\t\tdata-state={state}\n\t\t\tdata-variant={variant}\n\t\t>\n\t\t\t{/* This is what handles the sidebar gap on desktop */}\n\t\t\t<div\n\t\t\t\tclassName={cn(\n\t\t\t\t\t\"transition-[width] duration-200 ease-linear relative w-(--sidebar-width) bg-transparent\",\n\t\t\t\t\t\"group-data-[collapsible=offcanvas]:w-0\",\n\t\t\t\t\t\"group-data-[side=right]:rotate-180\",\n\t\t\t\t\tvariant === \"floating\" || variant === \"inset\"\n\t\t\t\t\t\t? \"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]\"\n\t\t\t\t\t\t: \"group-data-[collapsible=icon]:w-(--sidebar-width-icon)\",\n\t\t\t\t)}\n\t\t\t\tdata-slot=\"sidebar-gap\"\n\t\t\t/>\n\t\t\t<div\n\t\t\t\tclassName={cn(\n\t\t\t\t\t\"fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear data-[side=left]:left-0 data-[side=left]:group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)] data-[side=right]:right-0 data-[side=right]:group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)] md:flex\",\n\t\t\t\t\t// Adjust the padding for floating and inset variants.\n\t\t\t\t\tvariant === \"floating\" || variant === \"inset\"\n\t\t\t\t\t\t? \"p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]\"\n\t\t\t\t\t\t: \"group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l\",\n\t\t\t\t\tclassName,\n\t\t\t\t)}\n\t\t\t\tdata-side={side}\n\t\t\t\tdata-slot=\"sidebar-container\"\n\t\t\t\t{...props}\n\t\t\t>\n\t\t\t\t<div\n\t\t\t\t\tclassName=\"bg-sidebar group-data-[variant=floating]:ring-sidebar-border group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:shadow-sm group-data-[variant=floating]:ring-1 flex size-full flex-col\"\n\t\t\t\t\tdata-sidebar=\"sidebar\"\n\t\t\t\t\tdata-slot=\"sidebar-inner\"\n\t\t\t\t>\n\t\t\t\t\t{children}\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t);\n}\n\nfunction SidebarContent({ className, ...props }: React.ComponentProps<\"div\">) {\n\treturn (\n\t\t<div\n\t\t\tclassName={cn(\n\t\t\t\t\"no-scrollbar gap-0 flex min-h-0 flex-1 flex-col overflow-auto group-data-[collapsible=icon]:overflow-hidden\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\tdata-sidebar=\"content\"\n\t\t\tdata-slot=\"sidebar-content\"\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction SidebarFooter({ className, ...props }: React.ComponentProps<\"div\">) {\n\treturn (\n\t\t<div\n\t\t\tclassName={cn(\"gap-2 p-2 flex flex-col\", className)}\n\t\t\tdata-sidebar=\"footer\"\n\t\t\tdata-slot=\"sidebar-footer\"\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction SidebarGroup({ className, ...props }: React.ComponentProps<\"div\">) {\n\treturn (\n\t\t<div\n\t\t\tclassName={cn(\"p-2 relative flex w-full min-w-0 flex-col\", className)}\n\t\t\tdata-sidebar=\"group\"\n\t\t\tdata-slot=\"sidebar-group\"\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction SidebarGroupAction({\n\tasChild = false,\n\tclassName,\n\t...props\n}: React.ComponentProps<\"button\"> & { asChild?: boolean }) {\n\tconst Comp = asChild ? Slot.Root : \"button\";\n\n\treturn (\n\t\t<Comp\n\t\t\tclassName={cn(\n\t\t\t\t\"text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground absolute top-3.5 right-3 w-5 rounded-md p-0 focus-visible:ring-2 [&>svg]:size-4 flex aspect-square items-center justify-center outline-hidden transition-transform group-data-[collapsible=icon]:hidden after:absolute after:-inset-2 md:after:hidden [&>svg]:shrink-0\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\tdata-sidebar=\"group-action\"\n\t\t\tdata-slot=\"sidebar-group-action\"\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction SidebarGroupContent({ className, ...props }: React.ComponentProps<\"div\">) {\n\treturn (\n\t\t<div\n\t\t\tclassName={cn(\"text-sm w-full\", className)}\n\t\t\tdata-sidebar=\"group-content\"\n\t\t\tdata-slot=\"sidebar-group-content\"\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction SidebarGroupLabel({\n\tasChild = false,\n\tclassName,\n\t...props\n}: React.ComponentProps<\"div\"> & { asChild?: boolean }) {\n\tconst Comp = asChild ? Slot.Root : \"div\";\n\n\treturn (\n\t\t<Comp\n\t\t\tclassName={cn(\n\t\t\t\t\"text-sidebar-foreground/70 ring-sidebar-ring h-8 rounded-md px-2 text-xs font-medium transition-[margin,opacity] duration-200 ease-linear group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0 focus-visible:ring-2 [&>svg]:size-4 flex shrink-0 items-center outline-hidden [&>svg]:shrink-0\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\tdata-sidebar=\"group-label\"\n\t\t\tdata-slot=\"sidebar-group-label\"\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction SidebarHeader({ className, ...props }: React.ComponentProps<\"div\">) {\n\treturn (\n\t\t<div\n\t\t\tclassName={cn(\"gap-2 p-2 flex flex-col\", className)}\n\t\t\tdata-sidebar=\"header\"\n\t\t\tdata-slot=\"sidebar-header\"\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction SidebarInput({ className, ...props }: React.ComponentProps<typeof Input>) {\n\treturn (\n\t\t<Input\n\t\t\tclassName={cn(\"bg-background h-8 w-full shadow-none\", className)}\n\t\t\tdata-sidebar=\"input\"\n\t\t\tdata-slot=\"sidebar-input\"\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction SidebarInset({ className, ...props }: React.ComponentProps<\"main\">) {\n\treturn (\n\t\t<main\n\t\t\tclassName={cn(\n\t\t\t\t\"bg-background md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2 relative flex w-full flex-1 flex-col\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\tdata-slot=\"sidebar-inset\"\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction SidebarMenu({ className, ...props }: React.ComponentProps<\"ul\">) {\n\treturn (\n\t\t<ul\n\t\t\tclassName={cn(\"gap-0 flex w-full min-w-0 flex-col\", className)}\n\t\t\tdata-sidebar=\"menu\"\n\t\t\tdata-slot=\"sidebar-menu\"\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction SidebarMenuItem({ className, ...props }: React.ComponentProps<\"li\">) {\n\treturn (\n\t\t<li\n\t\t\tclassName={cn(\"group/menu-item relative\", className)}\n\t\t\tdata-sidebar=\"menu-item\"\n\t\t\tdata-slot=\"sidebar-menu-item\"\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction SidebarProvider({\n\tchildren,\n\tclassName,\n\tdefaultOpen = true,\n\tonOpenChange: setOpenProp,\n\topen: openProp,\n\tstyle,\n\t...props\n}: React.ComponentProps<\"div\"> & {\n\tdefaultOpen?: boolean;\n\tonOpenChange?: (open: boolean) => void;\n\topen?: boolean;\n}) {\n\tconst isMobile = useIsMobile();\n\tconst [openMobile, setOpenMobile] = React.useState(false);\n\n\t// This is the internal state of the sidebar.\n\t// We use openProp and setOpenProp for control from outside the component.\n\tconst [_open, _setOpen] = React.useState(defaultOpen);\n\tconst open = openProp ?? _open;\n\tconst setOpen = React.useCallback(\n\t\t(value: ((value: boolean) => boolean) | boolean) => {\n\t\t\tconst openState = typeof value === \"function\" ? value(open) : value;\n\t\t\tif (setOpenProp) {\n\t\t\t\tsetOpenProp(openState);\n\t\t\t} else {\n\t\t\t\t_setOpen(openState);\n\t\t\t}\n\n\t\t\t// This sets the cookie to keep the sidebar state.\n\t\t\tdocument.cookie = `${SIDEBAR_COOKIE_NAME}=${openState}; path=/; max-age=${SIDEBAR_COOKIE_MAX_AGE}`;\n\t\t},\n\t\t[setOpenProp, open],\n\t);\n\n\t// Helper to toggle the sidebar.\n\tconst toggleSidebar = React.useCallback(() => {\n\t\tisMobile ? setOpenMobile((open) => !open) : setOpen((open) => !open);\n\t}, [isMobile, setOpen]);\n\n\t// Adds a keyboard shortcut to toggle the sidebar.\n\tReact.useEffect(() => {\n\t\tconst handleKeyDown = (event: KeyboardEvent) => {\n\t\t\tif (event.key === SIDEBAR_KEYBOARD_SHORTCUT && (event.metaKey || event.ctrlKey)) {\n\t\t\t\tevent.preventDefault();\n\t\t\t\ttoggleSidebar();\n\t\t\t}\n\t\t};\n\n\t\twindow.addEventListener(\"keydown\", handleKeyDown);\n\t\treturn () => {\n\t\t\twindow.removeEventListener(\"keydown\", handleKeyDown);\n\t\t};\n\t}, [toggleSidebar]);\n\n\t// We add a state so that we can do data-state=\"expanded\" or \"collapsed\".\n\t// This makes it easier to style the sidebar with Tailwind classes.\n\tconst state = open ? \"expanded\" : \"collapsed\";\n\n\tconst contextValue = React.useMemo<SidebarContextProps>(\n\t\t() => ({\n\t\t\tisMobile,\n\t\t\topen,\n\t\t\topenMobile,\n\t\t\tsetOpen,\n\t\t\tsetOpenMobile,\n\t\t\tstate,\n\t\t\ttoggleSidebar,\n\t\t}),\n\t\t[state, open, setOpen, isMobile, openMobile, toggleSidebar],\n\t);\n\n\treturn (\n\t\t<SidebarContext.Provider value={contextValue}>\n\t\t\t<div\n\t\t\t\tclassName={cn(\n\t\t\t\t\t\"group/sidebar-wrapper has-data-[variant=inset]:bg-sidebar flex min-h-svh w-full\",\n\t\t\t\t\tclassName,\n\t\t\t\t)}\n\t\t\t\tdata-slot=\"sidebar-wrapper\"\n\t\t\t\tstyle={\n\t\t\t\t\t{\n\t\t\t\t\t\t\"--sidebar-width\": SIDEBAR_WIDTH,\n\t\t\t\t\t\t\"--sidebar-width-icon\": SIDEBAR_WIDTH_ICON,\n\t\t\t\t\t\t...style,\n\t\t\t\t\t} as React.CSSProperties\n\t\t\t\t}\n\t\t\t\t{...props}\n\t\t\t>\n\t\t\t\t{children}\n\t\t\t</div>\n\t\t</SidebarContext.Provider>\n\t);\n}\n\nfunction SidebarRail({ className, ...props }: React.ComponentProps<\"button\">) {\n\tconst { toggleSidebar } = useSidebar();\n\n\treturn (\n\t\t<button\n\t\t\taria-label=\"Toggle Sidebar\"\n\t\t\tclassName={cn(\n\t\t\t\t\"hover:after:bg-sidebar-border absolute inset-y-0 z-20 hidden w-4 transition-all ease-linear group-data-[side=left]:-right-4 group-data-[side=right]:left-0 after:absolute after:inset-y-0 after:start-1/2 after:w-[2px] sm:flex ltr:-translate-x-1/2 rtl:-translate-x-1/2\",\n\t\t\t\t\"in-data-[side=left]:cursor-w-resize in-data-[side=right]:cursor-e-resize\",\n\t\t\t\t\"[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize\",\n\t\t\t\t\"hover:group-data-[collapsible=offcanvas]:bg-sidebar group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full\",\n\t\t\t\t\"[[data-side=left][data-collapsible=offcanvas]_&]:-right-2\",\n\t\t\t\t\"[[data-side=right][data-collapsible=offcanvas]_&]:-left-2\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\tdata-sidebar=\"rail\"\n\t\t\tdata-slot=\"sidebar-rail\"\n\t\t\tonClick={toggleSidebar}\n\t\t\ttabIndex={-1}\n\t\t\ttitle=\"Toggle Sidebar\"\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction SidebarSeparator({ className, ...props }: React.ComponentProps<typeof Separator>) {\n\treturn (\n\t\t<Separator\n\t\t\tclassName={cn(\"bg-sidebar-border mx-2 w-auto\", className)}\n\t\t\tdata-sidebar=\"separator\"\n\t\t\tdata-slot=\"sidebar-separator\"\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction SidebarTrigger({ className, onClick, ...props }: React.ComponentProps<typeof Button>) {\n\tconst { toggleSidebar } = useSidebar();\n\n\treturn (\n\t\t<Button\n\t\t\tclassName={className}\n\t\t\tdata-sidebar=\"trigger\"\n\t\t\tdata-slot=\"sidebar-trigger\"\n\t\t\tonClick={(event) => {\n\t\t\t\tonClick?.(event);\n\t\t\t\ttoggleSidebar();\n\t\t\t}}\n\t\t\tsize=\"icon-sm\"\n\t\t\tvariant=\"ghost\"\n\t\t\t{...props}\n\t\t>\n\t\t\t<PanelLeftIcon />\n\t\t\t<span className=\"sr-only\">Toggle Sidebar</span>\n\t\t</Button>\n\t);\n}\n\nfunction useSidebar() {\n\tconst context = React.useContext(SidebarContext);\n\tif (!context) {\n\t\tthrow new Error(\"useSidebar must be used within a SidebarProvider.\");\n\t}\n\n\treturn context;\n}\n\nconst sidebarMenuButtonVariants = cva(\n\t\"ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground active:bg-sidebar-accent active:text-sidebar-accent-foreground data-active:bg-sidebar-accent data-active:text-sidebar-accent-foreground data-open:hover:bg-sidebar-accent data-open:hover:text-sidebar-accent-foreground gap-2 rounded-md p-2 text-left text-sm transition-[width,height,padding] group-has-data-[sidebar=menu-action]/menu-item:pr-8 group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! focus-visible:ring-2 data-active:font-medium peer/menu-button flex w-full items-center overflow-hidden outline-hidden group/menu-button 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\",\n\t{\n\t\tdefaultVariants: {\n\t\t\tsize: \"default\",\n\t\t\tvariant: \"default\",\n\t\t},\n\t\tvariants: {\n\t\t\tsize: {\n\t\t\t\tdefault: \"h-8 text-sm\",\n\t\t\t\tlg: \"h-12 text-sm group-data-[collapsible=icon]:p-0!\",\n\t\t\t\tsm: \"h-7 text-xs\",\n\t\t\t},\n\t\t\tvariant: {\n\t\t\t\tdefault: \"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground\",\n\t\t\t\toutline:\n\t\t\t\t\t\"bg-background hover:bg-sidebar-accent hover:text-sidebar-accent-foreground shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]\",\n\t\t\t},\n\t\t},\n\t},\n);\n\nfunction SidebarMenuAction({\n\tasChild = false,\n\tclassName,\n\tshowOnHover = false,\n\t...props\n}: React.ComponentProps<\"button\"> & {\n\tasChild?: boolean;\n\tshowOnHover?: boolean;\n}) {\n\tconst Comp = asChild ? Slot.Root : \"button\";\n\n\treturn (\n\t\t<Comp\n\t\t\tclassName={cn(\n\t\t\t\t\"text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground peer-hover/menu-button:text-sidebar-accent-foreground absolute top-1.5 right-1 aspect-square w-5 rounded-md p-0 peer-data-[size=default]/menu-button:top-1.5 peer-data-[size=lg]/menu-button:top-2.5 peer-data-[size=sm]/menu-button:top-1 focus-visible:ring-2 [&>svg]:size-4 flex items-center justify-center outline-hidden transition-transform group-data-[collapsible=icon]:hidden after:absolute after:-inset-2 md:after:hidden [&>svg]:shrink-0\",\n\t\t\t\tshowOnHover &&\n\t\t\t\t\t\"peer-data-active/menu-button:text-sidebar-accent-foreground group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-open:opacity-100 md:opacity-0\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\tdata-sidebar=\"menu-action\"\n\t\t\tdata-slot=\"sidebar-menu-action\"\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction SidebarMenuBadge({ className, ...props }: React.ComponentProps<\"div\">) {\n\treturn (\n\t\t<div\n\t\t\tclassName={cn(\n\t\t\t\t\"text-sidebar-foreground peer-hover/menu-button:text-sidebar-accent-foreground peer-data-active/menu-button:text-sidebar-accent-foreground pointer-events-none absolute right-1 flex h-5 min-w-5 rounded-md px-1 text-xs font-medium peer-data-[size=default]/menu-button:top-1.5 peer-data-[size=lg]/menu-button:top-2.5 peer-data-[size=sm]/menu-button:top-1 items-center justify-center tabular-nums select-none group-data-[collapsible=icon]:hidden\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\tdata-sidebar=\"menu-badge\"\n\t\t\tdata-slot=\"sidebar-menu-badge\"\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction SidebarMenuButton({\n\tasChild = false,\n\tclassName,\n\tisActive = false,\n\tsize = \"default\",\n\ttooltip,\n\tvariant = \"default\",\n\t...props\n}: React.ComponentProps<\"button\"> &\n\tVariantProps<typeof sidebarMenuButtonVariants> & {\n\t\tasChild?: boolean;\n\t\tisActive?: boolean;\n\t\ttooltip?: React.ComponentProps<typeof TooltipContent> | string;\n\t}) {\n\tconst Comp = asChild ? Slot.Root : \"button\";\n\tconst { isMobile, state } = useSidebar();\n\n\tconst button = (\n\t\t<Comp\n\t\t\tclassName={cn(sidebarMenuButtonVariants({ size, variant }), className)}\n\t\t\tdata-active={isActive}\n\t\t\tdata-sidebar=\"menu-button\"\n\t\t\tdata-size={size}\n\t\t\tdata-slot=\"sidebar-menu-button\"\n\t\t\t{...props}\n\t\t/>\n\t);\n\n\tif (!tooltip) {\n\t\treturn button;\n\t}\n\n\tif (typeof tooltip === \"string\") {\n\t\ttooltip = {\n\t\t\tchildren: tooltip,\n\t\t};\n\t}\n\n\treturn (\n\t\t<Tooltip>\n\t\t\t<TooltipTrigger asChild>{button}</TooltipTrigger>\n\t\t\t<TooltipContent\n\t\t\t\talign=\"center\"\n\t\t\t\thidden={state !== \"collapsed\" || isMobile}\n\t\t\t\tside=\"right\"\n\t\t\t\t{...tooltip}\n\t\t\t/>\n\t\t</Tooltip>\n\t);\n}\n\nfunction SidebarMenuSkeleton({\n\tclassName,\n\tshowIcon = false,\n\t...props\n}: React.ComponentProps<\"div\"> & {\n\tshowIcon?: boolean;\n}) {\n\t// Random width between 50 to 90%.\n\tconst [width] = React.useState(() => {\n\t\treturn `${Math.floor(Math.random() * 40) + 50}%`;\n\t});\n\n\treturn (\n\t\t<div\n\t\t\tclassName={cn(\"h-8 gap-2 rounded-md px-2 flex items-center\", className)}\n\t\t\tdata-sidebar=\"menu-skeleton\"\n\t\t\tdata-slot=\"sidebar-menu-skeleton\"\n\t\t\t{...props}\n\t\t>\n\t\t\t{showIcon && <Skeleton className=\"size-4 rounded-md\" data-sidebar=\"menu-skeleton-icon\" />}\n\t\t\t<Skeleton\n\t\t\t\tclassName=\"h-4 max-w-(--skeleton-width) flex-1\"\n\t\t\t\tdata-sidebar=\"menu-skeleton-text\"\n\t\t\t\tstyle={\n\t\t\t\t\t{\n\t\t\t\t\t\t\"--skeleton-width\": width,\n\t\t\t\t\t} as React.CSSProperties\n\t\t\t\t}\n\t\t\t/>\n\t\t</div>\n\t);\n}\n\nfunction SidebarMenuSub({ className, ...props }: React.ComponentProps<\"ul\">) {\n\treturn (\n\t\t<ul\n\t\t\tclassName={cn(\n\t\t\t\t\"border-sidebar-border mx-3.5 translate-x-px gap-1 border-l px-2.5 py-0.5 group-data-[collapsible=icon]:hidden flex min-w-0 flex-col\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\tdata-sidebar=\"menu-sub\"\n\t\t\tdata-slot=\"sidebar-menu-sub\"\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction SidebarMenuSubButton({\n\tasChild = false,\n\tclassName,\n\tisActive = false,\n\tsize = \"md\",\n\t...props\n}: React.ComponentProps<\"a\"> & {\n\tasChild?: boolean;\n\tisActive?: boolean;\n\tsize?: \"md\" | \"sm\";\n}) {\n\tconst Comp = asChild ? Slot.Root : \"a\";\n\n\treturn (\n\t\t<Comp\n\t\t\tclassName={cn(\n\t\t\t\t\"text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground active:bg-sidebar-accent active:text-sidebar-accent-foreground [&>svg]:text-sidebar-accent-foreground data-active:bg-sidebar-accent data-active:text-sidebar-accent-foreground h-7 gap-2 rounded-md px-2 focus-visible:ring-2 data-[size=md]:text-sm data-[size=sm]:text-xs [&>svg]:size-4 flex min-w-0 -translate-x-px items-center overflow-hidden outline-hidden group-data-[collapsible=icon]:hidden disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:shrink-0\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\tdata-active={isActive}\n\t\t\tdata-sidebar=\"menu-sub-button\"\n\t\t\tdata-size={size}\n\t\t\tdata-slot=\"sidebar-menu-sub-button\"\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction SidebarMenuSubItem({ className, ...props }: React.ComponentProps<\"li\">) {\n\treturn (\n\t\t<li\n\t\t\tclassName={cn(\"group/menu-sub-item relative\", className)}\n\t\t\tdata-sidebar=\"menu-sub-item\"\n\t\t\tdata-slot=\"sidebar-menu-sub-item\"\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nexport {\n\tSidebar,\n\tSidebarContent,\n\tSidebarFooter,\n\tSidebarGroup,\n\tSidebarGroupAction,\n\tSidebarGroupContent,\n\tSidebarGroupLabel,\n\tSidebarHeader,\n\tSidebarInput,\n\tSidebarInset,\n\tSidebarMenu,\n\tSidebarMenuAction,\n\tSidebarMenuBadge,\n\tSidebarMenuButton,\n\tSidebarMenuItem,\n\tSidebarMenuSkeleton,\n\tSidebarMenuSub,\n\tSidebarMenuSubButton,\n\tSidebarMenuSubItem,\n\tSidebarProvider,\n\tSidebarRail,\n\tSidebarSeparator,\n\tSidebarTrigger,\n\tuseSidebar,\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgCA,MAAM,sBAAsB;AAC5B,MAAM,yBAAyB,OAAU,KAAK;AAC9C,MAAM,gBAAgB;AACtB,MAAM,uBAAuB;AAC7B,MAAM,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AAU;EACvE,gBAAa;EACb,aAAU;EACV,GAAI;YAJL,CAME,YAAY,oBAAC,UAAD;GAAU,WAAU;GAAoB,gBAAa;GAAuB,CAAA,EACzF,oBAAC,UAAD;GACC,WAAU;GACV,gBAAa;GACb,OACC,EACC,oBAAoB,OACpB;GAED,CAAA,CACG;;;AAIR,SAAS,eAAe,EAAE,WAAW,GAAG,SAAqC;AAC5E,QACC,oBAAC,MAAD;EACC,WAAW,GACV,uIACA,UACA;EACD,gBAAa;EACb,aAAU;EACV,GAAI;EACH,CAAA;;AAIJ,SAAS,qBAAqB,EAC7B,UAAU,OACV,WACA,WAAW,OACX,OAAO,MACP,GAAG,SAKD;AAGF,QACC,oBAHY,UAAU,KAAK,OAAO,KAGlC;EACC,WAAW,GACV,6oBACA,UACA;EACD,eAAa;EACb,gBAAa;EACb,aAAW;EACX,aAAU;EACV,GAAI;EACH,CAAA;;AAIJ,SAAS,mBAAmB,EAAE,WAAW,GAAG,SAAqC;AAChF,QACC,oBAAC,MAAD;EACC,WAAW,GAAG,gCAAgC,UAAU;EACxD,gBAAa;EACb,aAAU;EACV,GAAI;EACH,CAAA"}
@@ -0,0 +1,2 @@
1
+ import { Skeleton } from "./skeleton.js";
2
+ export { Skeleton };
@@ -0,0 +1,2 @@
1
+ import { Skeleton } from "./skeleton.js";
2
+ export { Skeleton };
@@ -0,0 +1,26 @@
1
+ import * as react_jsx_runtime290 from "react/jsx-runtime";
2
+
3
+ //#region src/components/skeleton/skeleton.d.ts
4
+
5
+ /**
6
+ * Copyright 2026 ResQ
7
+ *
8
+ * Licensed under the Apache License, Version 2.0 (the "License");
9
+ * you may not use this file except in compliance with the License.
10
+ * You may obtain a copy of the License at
11
+ *
12
+ * http://www.apache.org/licenses/LICENSE-2.0
13
+ *
14
+ * Unless required by applicable law or agreed to in writing, software
15
+ * distributed under the License is distributed on an "AS IS" BASIS,
16
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17
+ * See the License for the specific language governing permissions and
18
+ * limitations under the License.
19
+ */
20
+ declare function Skeleton({
21
+ className,
22
+ ...props
23
+ }: React.ComponentProps<"div">): react_jsx_runtime290.JSX.Element;
24
+ //#endregion
25
+ export { Skeleton };
26
+ //# sourceMappingURL=skeleton.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"skeleton.d.ts","names":[],"sources":["../../../src/components/skeleton/skeleton.tsx"],"sourcesContent":[],"mappings":";;;;;;;AAkBsE;;;;;;;;;;;;iBAA7D,QAAA;;;GAAkC,KAAA,CAAM,wBAAqB,oBAAA,CAAA,GAAA,CAAA"}
@@ -0,0 +1,29 @@
1
+ import { cn } from "../../lib/utils.js";
2
+ import { jsx } from "react/jsx-runtime";
3
+ //#region src/components/skeleton/skeleton.tsx
4
+ /**
5
+ * Copyright 2026 ResQ
6
+ *
7
+ * Licensed under the Apache License, Version 2.0 (the "License");
8
+ * you may not use this file except in compliance with the License.
9
+ * You may obtain a copy of the License at
10
+ *
11
+ * http://www.apache.org/licenses/LICENSE-2.0
12
+ *
13
+ * Unless required by applicable law or agreed to in writing, software
14
+ * distributed under the License is distributed on an "AS IS" BASIS,
15
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
+ * See the License for the specific language governing permissions and
17
+ * limitations under the License.
18
+ */
19
+ function Skeleton({ className, ...props }) {
20
+ return /* @__PURE__ */ jsx("div", {
21
+ className: cn("bg-muted rounded-md animate-pulse", className),
22
+ "data-slot": "skeleton",
23
+ ...props
24
+ });
25
+ }
26
+ //#endregion
27
+ export { Skeleton };
28
+
29
+ //# sourceMappingURL=skeleton.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"skeleton.js","names":[],"sources":["../../../src/components/skeleton/skeleton.tsx"],"sourcesContent":["/**\n * Copyright 2026 ResQ\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { cn } from \"../../lib/utils.js\";\n\nfunction Skeleton({ className, ...props }: React.ComponentProps<\"div\">) {\n\treturn (\n\t\t<div\n\t\t\tclassName={cn(\"bg-muted rounded-md animate-pulse\", className)}\n\t\t\tdata-slot=\"skeleton\"\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nexport { Skeleton };\n"],"mappings":";;;;;;;;;;;;;;;;;;AAkBA,SAAS,SAAS,EAAE,WAAW,GAAG,SAAsC;AACvE,QACC,oBAAC,OAAD;EACC,WAAW,GAAG,qCAAqC,UAAU;EAC7D,aAAU;EACV,GAAI;EACH,CAAA"}
@@ -0,0 +1,2 @@
1
+ import { Slider } from "./slider.js";
2
+ export { Slider };
@@ -0,0 +1,2 @@
1
+ import { Slider } from "./slider.js";
2
+ export { Slider };
@@ -0,0 +1,17 @@
1
+ import { Slider as Slider$1 } from "radix-ui";
2
+ import * as react_jsx_runtime291 from "react/jsx-runtime";
3
+ import * as React from "react";
4
+
5
+ //#region src/components/slider/slider.d.ts
6
+
7
+ declare function Slider({
8
+ className,
9
+ defaultValue,
10
+ max,
11
+ min,
12
+ value,
13
+ ...props
14
+ }: React.ComponentProps<typeof Slider$1.Root>): react_jsx_runtime291.JSX.Element;
15
+ //#endregion
16
+ export { Slider };
17
+ //# sourceMappingURL=slider.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"slider.d.ts","names":[],"sources":["../../../src/components/slider/slider.tsx"],"sourcesContent":[],"mappings":";;;;;;iBAuBS,MAAA;;;;;;;GAON,KAAA,CAAM,sBAAsB,QAAA,CAAgB,QAAK,oBAAA,CAAA,GAAA,CAAA"}
@@ -0,0 +1,53 @@
1
+ "use client";
2
+ import { cn } from "../../lib/utils.js";
3
+ import { Slider as Slider$1 } from "radix-ui";
4
+ import { jsx, jsxs } from "react/jsx-runtime";
5
+ import * as React from "react";
6
+ //#region src/components/slider/slider.tsx
7
+ /**
8
+ * Copyright 2026 ResQ
9
+ *
10
+ * Licensed under the Apache License, Version 2.0 (the "License");
11
+ * you may not use this file except in compliance with the License.
12
+ * You may obtain a copy of the License at
13
+ *
14
+ * http://www.apache.org/licenses/LICENSE-2.0
15
+ *
16
+ * Unless required by applicable law or agreed to in writing, software
17
+ * distributed under the License is distributed on an "AS IS" BASIS,
18
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19
+ * See the License for the specific language governing permissions and
20
+ * limitations under the License.
21
+ */
22
+ function Slider({ className, defaultValue, max = 100, min = 0, value, ...props }) {
23
+ const _values = React.useMemo(() => Array.isArray(value) ? value : Array.isArray(defaultValue) ? defaultValue : [min, max], [
24
+ value,
25
+ defaultValue,
26
+ min,
27
+ max
28
+ ]);
29
+ return /* @__PURE__ */ jsxs(Slider$1.Root, {
30
+ className: cn("data-vertical:min-h-40 relative flex w-full touch-none items-center select-none data-disabled:opacity-50 data-vertical:h-full data-vertical:w-auto data-vertical:flex-col", className),
31
+ "data-slot": "slider",
32
+ defaultValue,
33
+ max,
34
+ min,
35
+ value,
36
+ ...props,
37
+ children: [/* @__PURE__ */ jsx(Slider$1.Track, {
38
+ className: "bg-muted rounded-full data-horizontal:h-1 data-horizontal:w-full data-vertical:h-full data-vertical:w-1 relative grow overflow-hidden",
39
+ "data-slot": "slider-track",
40
+ children: /* @__PURE__ */ jsx(Slider$1.Range, {
41
+ className: "bg-primary absolute select-none data-horizontal:h-full data-vertical:w-full",
42
+ "data-slot": "slider-range"
43
+ })
44
+ }), Array.from({ length: _values.length }, (_, index) => /* @__PURE__ */ jsx(Slider$1.Thumb, {
45
+ className: "border-ring ring-ring/50 relative size-3 rounded-full border bg-white transition-[color,box-shadow] after:absolute after:-inset-2 hover:ring-[3px] focus-visible:ring-[3px] focus-visible:outline-hidden active:ring-[3px] block shrink-0 select-none disabled:pointer-events-none disabled:opacity-50",
46
+ "data-slot": "slider-thumb"
47
+ }, index))]
48
+ });
49
+ }
50
+ //#endregion
51
+ export { Slider };
52
+
53
+ //# sourceMappingURL=slider.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"slider.js","names":["SliderPrimitive"],"sources":["../../../src/components/slider/slider.tsx"],"sourcesContent":["/**\n * Copyright 2026 ResQ\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\"use client\";\n\nimport { Slider as SliderPrimitive } from \"radix-ui\";\nimport * as React from \"react\";\n\nimport { cn } from \"../../lib/utils.js\";\n\nfunction Slider({\n\tclassName,\n\tdefaultValue,\n\tmax = 100,\n\tmin = 0,\n\tvalue,\n\t...props\n}: React.ComponentProps<typeof SliderPrimitive.Root>) {\n\tconst _values = React.useMemo(\n\t\t() => (Array.isArray(value) ? value : Array.isArray(defaultValue) ? defaultValue : [min, max]),\n\t\t[value, defaultValue, min, max],\n\t);\n\n\treturn (\n\t\t<SliderPrimitive.Root\n\t\t\tclassName={cn(\n\t\t\t\t\"data-vertical:min-h-40 relative flex w-full touch-none items-center select-none data-disabled:opacity-50 data-vertical:h-full data-vertical:w-auto data-vertical:flex-col\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\tdata-slot=\"slider\"\n\t\t\tdefaultValue={defaultValue}\n\t\t\tmax={max}\n\t\t\tmin={min}\n\t\t\tvalue={value}\n\t\t\t{...props}\n\t\t>\n\t\t\t<SliderPrimitive.Track\n\t\t\t\tclassName=\"bg-muted rounded-full data-horizontal:h-1 data-horizontal:w-full data-vertical:h-full data-vertical:w-1 relative grow overflow-hidden\"\n\t\t\t\tdata-slot=\"slider-track\"\n\t\t\t>\n\t\t\t\t<SliderPrimitive.Range\n\t\t\t\t\tclassName=\"bg-primary absolute select-none data-horizontal:h-full data-vertical:w-full\"\n\t\t\t\t\tdata-slot=\"slider-range\"\n\t\t\t\t/>\n\t\t\t</SliderPrimitive.Track>\n\t\t\t{Array.from({ length: _values.length }, (_, index) => (\n\t\t\t\t<SliderPrimitive.Thumb\n\t\t\t\t\tclassName=\"border-ring ring-ring/50 relative size-3 rounded-full border bg-white transition-[color,box-shadow] after:absolute after:-inset-2 hover:ring-[3px] focus-visible:ring-[3px] focus-visible:outline-hidden active:ring-[3px] block shrink-0 select-none disabled:pointer-events-none disabled:opacity-50\"\n\t\t\t\t\tdata-slot=\"slider-thumb\"\n\t\t\t\t\tkey={index}\n\t\t\t\t/>\n\t\t\t))}\n\t\t</SliderPrimitive.Root>\n\t);\n}\n\nexport { Slider };\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAuBA,SAAS,OAAO,EACf,WACA,cACA,MAAM,KACN,MAAM,GACN,OACA,GAAG,SACkD;CACrD,MAAM,UAAU,MAAM,cACd,MAAM,QAAQ,MAAM,GAAG,QAAQ,MAAM,QAAQ,aAAa,GAAG,eAAe,CAAC,KAAK,IAAI,EAC7F;EAAC;EAAO;EAAc;EAAK;EAAI,CAC/B;AAED,QACC,qBAACA,SAAgB,MAAjB;EACC,WAAW,GACV,6KACA,UACA;EACD,aAAU;EACI;EACT;EACA;EACE;EACP,GAAI;YAVL,CAYC,oBAACA,SAAgB,OAAjB;GACC,WAAU;GACV,aAAU;aAEV,oBAACA,SAAgB,OAAjB;IACC,WAAU;IACV,aAAU;IACT,CAAA;GACqB,CAAA,EACvB,MAAM,KAAK,EAAE,QAAQ,QAAQ,QAAQ,GAAG,GAAG,UAC3C,oBAACA,SAAgB,OAAjB;GACC,WAAU;GACV,aAAU;GAET,EADI,MACJ,CACD,CACoB"}
@@ -0,0 +1,2 @@
1
+ import { Toaster } from "./sonner.js";
2
+ export { Toaster };
@@ -0,0 +1,2 @@
1
+ import { Toaster } from "./sonner.js";
2
+ export { Toaster };