@omnifyjp/ui 0.1.1

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 (354) hide show
  1. package/README.md +230 -0
  2. package/dist/chunk-23SALQ3G.js +219 -0
  3. package/dist/chunk-23SALQ3G.js.map +1 -0
  4. package/dist/chunk-3TGN2DFB.js +41 -0
  5. package/dist/chunk-3TGN2DFB.js.map +1 -0
  6. package/dist/chunk-3TV2IR7L.js +65 -0
  7. package/dist/chunk-3TV2IR7L.js.map +1 -0
  8. package/dist/chunk-4CT5SCAH.js +54 -0
  9. package/dist/chunk-4CT5SCAH.js.map +1 -0
  10. package/dist/chunk-4D6FDXCG.js +41 -0
  11. package/dist/chunk-4D6FDXCG.js.map +1 -0
  12. package/dist/chunk-4HCORCR2.js +114 -0
  13. package/dist/chunk-4HCORCR2.js.map +1 -0
  14. package/dist/chunk-4N357E44.js +119 -0
  15. package/dist/chunk-4N357E44.js.map +1 -0
  16. package/dist/chunk-4Q2FLTAW.js +23 -0
  17. package/dist/chunk-4Q2FLTAW.js.map +1 -0
  18. package/dist/chunk-5M67ZEPM.js +33 -0
  19. package/dist/chunk-5M67ZEPM.js.map +1 -0
  20. package/dist/chunk-5WCL47ZW.js +30 -0
  21. package/dist/chunk-5WCL47ZW.js.map +1 -0
  22. package/dist/chunk-5Y3SQ3EA.js +52 -0
  23. package/dist/chunk-5Y3SQ3EA.js.map +1 -0
  24. package/dist/chunk-6GCAG5FH.js +46 -0
  25. package/dist/chunk-6GCAG5FH.js.map +1 -0
  26. package/dist/chunk-6MVBERQJ.js +44 -0
  27. package/dist/chunk-6MVBERQJ.js.map +1 -0
  28. package/dist/chunk-725ICC47.js +44 -0
  29. package/dist/chunk-725ICC47.js.map +1 -0
  30. package/dist/chunk-7ALADSN3.js +56 -0
  31. package/dist/chunk-7ALADSN3.js.map +1 -0
  32. package/dist/chunk-7NMWBCF4.js +171 -0
  33. package/dist/chunk-7NMWBCF4.js.map +1 -0
  34. package/dist/chunk-7ZFYPC74.js +155 -0
  35. package/dist/chunk-7ZFYPC74.js.map +1 -0
  36. package/dist/chunk-ANTYNEUU.js +35 -0
  37. package/dist/chunk-ANTYNEUU.js.map +1 -0
  38. package/dist/chunk-AZARDPXB.js +43 -0
  39. package/dist/chunk-AZARDPXB.js.map +1 -0
  40. package/dist/chunk-BJO5JCFB.js +111 -0
  41. package/dist/chunk-BJO5JCFB.js.map +1 -0
  42. package/dist/chunk-BOYSXIM3.js +160 -0
  43. package/dist/chunk-BOYSXIM3.js.map +1 -0
  44. package/dist/chunk-CDARHMTL.js +25 -0
  45. package/dist/chunk-CDARHMTL.js.map +1 -0
  46. package/dist/chunk-CESZTYQQ.js +93 -0
  47. package/dist/chunk-CESZTYQQ.js.map +1 -0
  48. package/dist/chunk-D3GCOO74.js +90 -0
  49. package/dist/chunk-D3GCOO74.js.map +1 -0
  50. package/dist/chunk-DGPY4WP3.js +11 -0
  51. package/dist/chunk-DGPY4WP3.js.map +1 -0
  52. package/dist/chunk-DIS42JLG.js +13 -0
  53. package/dist/chunk-DIS42JLG.js.map +1 -0
  54. package/dist/chunk-DQGDQEXD.js +617 -0
  55. package/dist/chunk-DQGDQEXD.js.map +1 -0
  56. package/dist/chunk-DZENMCRL.js +63 -0
  57. package/dist/chunk-DZENMCRL.js.map +1 -0
  58. package/dist/chunk-EIF6WZAZ.js +38 -0
  59. package/dist/chunk-EIF6WZAZ.js.map +1 -0
  60. package/dist/chunk-F6VQCMYH.js +81 -0
  61. package/dist/chunk-F6VQCMYH.js.map +1 -0
  62. package/dist/chunk-FBNG2KGO.js +66 -0
  63. package/dist/chunk-FBNG2KGO.js.map +1 -0
  64. package/dist/chunk-FO7J3PYY.js +131 -0
  65. package/dist/chunk-FO7J3PYY.js.map +1 -0
  66. package/dist/chunk-FSFXDD6P.js +196 -0
  67. package/dist/chunk-FSFXDD6P.js.map +1 -0
  68. package/dist/chunk-IDRQ6BNQ.js +63 -0
  69. package/dist/chunk-IDRQ6BNQ.js.map +1 -0
  70. package/dist/chunk-IJIGJGL5.js +48 -0
  71. package/dist/chunk-IJIGJGL5.js.map +1 -0
  72. package/dist/chunk-JPTN62BV.js +128 -0
  73. package/dist/chunk-JPTN62BV.js.map +1 -0
  74. package/dist/chunk-KABLXGWK.js +66 -0
  75. package/dist/chunk-KABLXGWK.js.map +1 -0
  76. package/dist/chunk-KOGOYUEE.js +121 -0
  77. package/dist/chunk-KOGOYUEE.js.map +1 -0
  78. package/dist/chunk-KULHYNE2.js +138 -0
  79. package/dist/chunk-KULHYNE2.js.map +1 -0
  80. package/dist/chunk-KXT75MXF.js +164 -0
  81. package/dist/chunk-KXT75MXF.js.map +1 -0
  82. package/dist/chunk-KXZ7IND6.js +24 -0
  83. package/dist/chunk-KXZ7IND6.js.map +1 -0
  84. package/dist/chunk-L46XUK4O.js +33 -0
  85. package/dist/chunk-L46XUK4O.js.map +1 -0
  86. package/dist/chunk-LI7CKURD.js +65 -0
  87. package/dist/chunk-LI7CKURD.js.map +1 -0
  88. package/dist/chunk-LW5PTU7D.js +211 -0
  89. package/dist/chunk-LW5PTU7D.js.map +1 -0
  90. package/dist/chunk-MNAT3ZF6.js +106 -0
  91. package/dist/chunk-MNAT3ZF6.js.map +1 -0
  92. package/dist/chunk-NFAXCC73.js +239 -0
  93. package/dist/chunk-NFAXCC73.js.map +1 -0
  94. package/dist/chunk-OHBCYKNT.js +63 -0
  95. package/dist/chunk-OHBCYKNT.js.map +1 -0
  96. package/dist/chunk-ONAUEREV.js +28 -0
  97. package/dist/chunk-ONAUEREV.js.map +1 -0
  98. package/dist/chunk-OXQNDQJW.js +86 -0
  99. package/dist/chunk-OXQNDQJW.js.map +1 -0
  100. package/dist/chunk-PCQSHXOQ.js +104 -0
  101. package/dist/chunk-PCQSHXOQ.js.map +1 -0
  102. package/dist/chunk-PH6P53QX.js +48 -0
  103. package/dist/chunk-PH6P53QX.js.map +1 -0
  104. package/dist/chunk-PPZSGU2L.js +33 -0
  105. package/dist/chunk-PPZSGU2L.js.map +1 -0
  106. package/dist/chunk-QCGYYBDZ.js +25 -0
  107. package/dist/chunk-QCGYYBDZ.js.map +1 -0
  108. package/dist/chunk-QMAMDYRD.js +65 -0
  109. package/dist/chunk-QMAMDYRD.js.map +1 -0
  110. package/dist/chunk-RVJDDGQW.js +112 -0
  111. package/dist/chunk-RVJDDGQW.js.map +1 -0
  112. package/dist/chunk-SABAKV4J.js +238 -0
  113. package/dist/chunk-SABAKV4J.js.map +1 -0
  114. package/dist/chunk-TEYOLOZY.js +18 -0
  115. package/dist/chunk-TEYOLOZY.js.map +1 -0
  116. package/dist/chunk-TMFQJ7E3.js +61 -0
  117. package/dist/chunk-TMFQJ7E3.js.map +1 -0
  118. package/dist/chunk-UCEUTKTQ.js +116 -0
  119. package/dist/chunk-UCEUTKTQ.js.map +1 -0
  120. package/dist/chunk-UV6UVSCF.js +187 -0
  121. package/dist/chunk-UV6UVSCF.js.map +1 -0
  122. package/dist/chunk-VGQC333M.js +17 -0
  123. package/dist/chunk-VGQC333M.js.map +1 -0
  124. package/dist/chunk-WAPGZIAL.js +99 -0
  125. package/dist/chunk-WAPGZIAL.js.map +1 -0
  126. package/dist/chunk-WRCHR4AK.js +23 -0
  127. package/dist/chunk-WRCHR4AK.js.map +1 -0
  128. package/dist/chunk-XKVHX75G.js +51 -0
  129. package/dist/chunk-XKVHX75G.js.map +1 -0
  130. package/dist/chunk-YF6WRCTG.js +41 -0
  131. package/dist/chunk-YF6WRCTG.js.map +1 -0
  132. package/dist/chunk-YGBYH4EO.js +28 -0
  133. package/dist/chunk-YGBYH4EO.js.map +1 -0
  134. package/dist/chunk-YKJZV2JK.js +109 -0
  135. package/dist/chunk-YKJZV2JK.js.map +1 -0
  136. package/dist/chunk-YUYC6Y6E.js +143 -0
  137. package/dist/chunk-YUYC6Y6E.js.map +1 -0
  138. package/dist/chunk-Z47W426M.js +53 -0
  139. package/dist/chunk-Z47W426M.js.map +1 -0
  140. package/dist/components/accordion.d.ts +10 -0
  141. package/dist/components/accordion.js +4 -0
  142. package/dist/components/accordion.js.map +1 -0
  143. package/dist/components/alert-dialog.d.ts +17 -0
  144. package/dist/components/alert-dialog.js +5 -0
  145. package/dist/components/alert-dialog.js.map +1 -0
  146. package/dist/components/alert.d.ts +13 -0
  147. package/dist/components/alert.js +4 -0
  148. package/dist/components/alert.js.map +1 -0
  149. package/dist/components/aspect-ratio.d.ts +6 -0
  150. package/dist/components/aspect-ratio.js +3 -0
  151. package/dist/components/aspect-ratio.js.map +1 -0
  152. package/dist/components/avatar.d.ts +9 -0
  153. package/dist/components/avatar.js +4 -0
  154. package/dist/components/avatar.js.map +1 -0
  155. package/dist/components/badge.d.ts +13 -0
  156. package/dist/components/badge.js +4 -0
  157. package/dist/components/badge.js.map +1 -0
  158. package/dist/components/breadcrumb.d.ts +14 -0
  159. package/dist/components/breadcrumb.js +4 -0
  160. package/dist/components/breadcrumb.js.map +1 -0
  161. package/dist/components/button.d.ts +16 -0
  162. package/dist/components/button.js +4 -0
  163. package/dist/components/button.js.map +1 -0
  164. package/dist/components/calendar-category-badge.d.ts +10 -0
  165. package/dist/components/calendar-category-badge.js +5 -0
  166. package/dist/components/calendar-category-badge.js.map +1 -0
  167. package/dist/components/calendar-event-chip.d.ts +18 -0
  168. package/dist/components/calendar-event-chip.js +4 -0
  169. package/dist/components/calendar-event-chip.js.map +1 -0
  170. package/dist/components/calendar-event-sheet.d.ts +31 -0
  171. package/dist/components/calendar-event-sheet.js +9 -0
  172. package/dist/components/calendar-event-sheet.js.map +1 -0
  173. package/dist/components/calendar-mini.d.ts +29 -0
  174. package/dist/components/calendar-mini.js +6 -0
  175. package/dist/components/calendar-mini.js.map +1 -0
  176. package/dist/components/calendar-toolbar.d.ts +25 -0
  177. package/dist/components/calendar-toolbar.js +7 -0
  178. package/dist/components/calendar-toolbar.js.map +1 -0
  179. package/dist/components/calendar.d.ts +7 -0
  180. package/dist/components/calendar.js +5 -0
  181. package/dist/components/calendar.js.map +1 -0
  182. package/dist/components/card.d.ts +12 -0
  183. package/dist/components/card.js +4 -0
  184. package/dist/components/card.js.map +1 -0
  185. package/dist/components/carousel.d.ts +24 -0
  186. package/dist/components/carousel.js +5 -0
  187. package/dist/components/carousel.js.map +1 -0
  188. package/dist/components/chart.d.ts +43 -0
  189. package/dist/components/chart.js +4 -0
  190. package/dist/components/chart.js.map +1 -0
  191. package/dist/components/checkbox.d.ts +6 -0
  192. package/dist/components/checkbox.js +4 -0
  193. package/dist/components/checkbox.js.map +1 -0
  194. package/dist/components/collapsible.d.ts +8 -0
  195. package/dist/components/collapsible.js +3 -0
  196. package/dist/components/collapsible.js.map +1 -0
  197. package/dist/components/color-picker.d.ts +13 -0
  198. package/dist/components/color-picker.js +7 -0
  199. package/dist/components/color-picker.js.map +1 -0
  200. package/dist/components/combobox.d.ts +33 -0
  201. package/dist/components/combobox.js +8 -0
  202. package/dist/components/combobox.js.map +1 -0
  203. package/dist/components/command.d.ts +20 -0
  204. package/dist/components/command.js +5 -0
  205. package/dist/components/command.js.map +1 -0
  206. package/dist/components/context-menu.d.ts +28 -0
  207. package/dist/components/context-menu.js +4 -0
  208. package/dist/components/context-menu.js.map +1 -0
  209. package/dist/components/date-picker.d.ts +31 -0
  210. package/dist/components/date-picker.js +7 -0
  211. package/dist/components/date-picker.js.map +1 -0
  212. package/dist/components/dialog.d.ts +16 -0
  213. package/dist/components/dialog.js +4 -0
  214. package/dist/components/dialog.js.map +1 -0
  215. package/dist/components/drawer.d.ts +17 -0
  216. package/dist/components/drawer.js +4 -0
  217. package/dist/components/drawer.js.map +1 -0
  218. package/dist/components/dropdown-menu.d.ts +28 -0
  219. package/dist/components/dropdown-menu.js +4 -0
  220. package/dist/components/dropdown-menu.js.map +1 -0
  221. package/dist/components/file-upload.d.ts +17 -0
  222. package/dist/components/file-upload.js +5 -0
  223. package/dist/components/file-upload.js.map +1 -0
  224. package/dist/components/form.d.ts +28 -0
  225. package/dist/components/form.js +5 -0
  226. package/dist/components/form.js.map +1 -0
  227. package/dist/components/hover-card.d.ts +9 -0
  228. package/dist/components/hover-card.js +4 -0
  229. package/dist/components/hover-card.js.map +1 -0
  230. package/dist/components/input-otp.d.ts +14 -0
  231. package/dist/components/input-otp.js +4 -0
  232. package/dist/components/input-otp.js.map +1 -0
  233. package/dist/components/input.d.ts +5 -0
  234. package/dist/components/input.js +4 -0
  235. package/dist/components/input.js.map +1 -0
  236. package/dist/components/label.d.ts +6 -0
  237. package/dist/components/label.js +4 -0
  238. package/dist/components/label.js.map +1 -0
  239. package/dist/components/menubar.d.ts +29 -0
  240. package/dist/components/menubar.js +4 -0
  241. package/dist/components/menubar.js.map +1 -0
  242. package/dist/components/navigation-menu.d.ts +18 -0
  243. package/dist/components/navigation-menu.js +4 -0
  244. package/dist/components/navigation-menu.js.map +1 -0
  245. package/dist/components/pagination.d.ts +18 -0
  246. package/dist/components/pagination.js +5 -0
  247. package/dist/components/pagination.js.map +1 -0
  248. package/dist/components/permission-grid.d.ts +30 -0
  249. package/dist/components/permission-grid.js +5 -0
  250. package/dist/components/permission-grid.js.map +1 -0
  251. package/dist/components/popover.d.ts +10 -0
  252. package/dist/components/popover.js +4 -0
  253. package/dist/components/popover.js.map +1 -0
  254. package/dist/components/progress.d.ts +7 -0
  255. package/dist/components/progress.js +4 -0
  256. package/dist/components/progress.js.map +1 -0
  257. package/dist/components/radio-group.d.ts +8 -0
  258. package/dist/components/radio-group.js +4 -0
  259. package/dist/components/radio-group.js.map +1 -0
  260. package/dist/components/rating.d.ts +14 -0
  261. package/dist/components/rating.js +4 -0
  262. package/dist/components/rating.js.map +1 -0
  263. package/dist/components/resizable.d.ts +11 -0
  264. package/dist/components/resizable.js +4 -0
  265. package/dist/components/resizable.js.map +1 -0
  266. package/dist/components/scope-tree.d.ts +35 -0
  267. package/dist/components/scope-tree.js +5 -0
  268. package/dist/components/scope-tree.js.map +1 -0
  269. package/dist/components/scope-type-badge.d.ts +20 -0
  270. package/dist/components/scope-type-badge.js +5 -0
  271. package/dist/components/scope-type-badge.js.map +1 -0
  272. package/dist/components/scroll-area.d.ts +8 -0
  273. package/dist/components/scroll-area.js +4 -0
  274. package/dist/components/scroll-area.js.map +1 -0
  275. package/dist/components/select.d.ts +18 -0
  276. package/dist/components/select.js +4 -0
  277. package/dist/components/select.js.map +1 -0
  278. package/dist/components/separator.d.ts +7 -0
  279. package/dist/components/separator.js +4 -0
  280. package/dist/components/separator.js.map +1 -0
  281. package/dist/components/sheet.d.ts +16 -0
  282. package/dist/components/sheet.js +4 -0
  283. package/dist/components/sheet.js.map +1 -0
  284. package/dist/components/sidebar.d.ts +75 -0
  285. package/dist/components/sidebar.js +11 -0
  286. package/dist/components/sidebar.js.map +1 -0
  287. package/dist/components/skeleton.d.ts +5 -0
  288. package/dist/components/skeleton.js +4 -0
  289. package/dist/components/skeleton.js.map +1 -0
  290. package/dist/components/slider.d.ts +7 -0
  291. package/dist/components/slider.js +4 -0
  292. package/dist/components/slider.js.map +1 -0
  293. package/dist/components/slug-input.d.ts +22 -0
  294. package/dist/components/slug-input.js +6 -0
  295. package/dist/components/slug-input.js.map +1 -0
  296. package/dist/components/sonner.d.ts +6 -0
  297. package/dist/components/sonner.js +3 -0
  298. package/dist/components/sonner.js.map +1 -0
  299. package/dist/components/stage-type-badge.d.ts +24 -0
  300. package/dist/components/stage-type-badge.js +5 -0
  301. package/dist/components/stage-type-badge.js.map +1 -0
  302. package/dist/components/switch.d.ts +7 -0
  303. package/dist/components/switch.js +4 -0
  304. package/dist/components/switch.js.map +1 -0
  305. package/dist/components/table.d.ts +13 -0
  306. package/dist/components/table.js +4 -0
  307. package/dist/components/table.js.map +1 -0
  308. package/dist/components/tabs.d.ts +10 -0
  309. package/dist/components/tabs.js +4 -0
  310. package/dist/components/tabs.js.map +1 -0
  311. package/dist/components/tag-input.d.ts +15 -0
  312. package/dist/components/tag-input.js +5 -0
  313. package/dist/components/tag-input.js.map +1 -0
  314. package/dist/components/textarea.d.ts +5 -0
  315. package/dist/components/textarea.js +4 -0
  316. package/dist/components/textarea.js.map +1 -0
  317. package/dist/components/time-picker.d.ts +20 -0
  318. package/dist/components/time-picker.js +8 -0
  319. package/dist/components/time-picker.js.map +1 -0
  320. package/dist/components/toggle-group.d.ts +12 -0
  321. package/dist/components/toggle-group.js +5 -0
  322. package/dist/components/toggle-group.js.map +1 -0
  323. package/dist/components/toggle.d.ts +13 -0
  324. package/dist/components/toggle.js +4 -0
  325. package/dist/components/toggle.js.map +1 -0
  326. package/dist/components/tooltip.d.ts +10 -0
  327. package/dist/components/tooltip.js +4 -0
  328. package/dist/components/tooltip.js.map +1 -0
  329. package/dist/components/workflow-category-badge.d.ts +26 -0
  330. package/dist/components/workflow-category-badge.js +5 -0
  331. package/dist/components/workflow-category-badge.js.map +1 -0
  332. package/dist/components/workflow-diagram.d.ts +43 -0
  333. package/dist/components/workflow-diagram.js +5 -0
  334. package/dist/components/workflow-diagram.js.map +1 -0
  335. package/dist/components/workflow-status-badge.d.ts +24 -0
  336. package/dist/components/workflow-status-badge.js +5 -0
  337. package/dist/components/workflow-status-badge.js.map +1 -0
  338. package/dist/components/workflow-stepper.d.ts +34 -0
  339. package/dist/components/workflow-stepper.js +4 -0
  340. package/dist/components/workflow-stepper.js.map +1 -0
  341. package/dist/hooks/use-mobile.d.ts +3 -0
  342. package/dist/hooks/use-mobile.js +3 -0
  343. package/dist/hooks/use-mobile.js.map +1 -0
  344. package/dist/index.d.ts +111 -0
  345. package/dist/index.js +71 -0
  346. package/dist/index.js.map +1 -0
  347. package/dist/lib/utils.d.ts +5 -0
  348. package/dist/lib/utils.js +3 -0
  349. package/dist/lib/utils.js.map +1 -0
  350. package/package.json +101 -0
  351. package/src/styles/fonts.css +0 -0
  352. package/src/styles/index.css +3 -0
  353. package/src/styles/tailwind.css +4 -0
  354. package/src/styles/theme.css +447 -0
@@ -0,0 +1,617 @@
1
+ import { useIsMobile } from './chunk-WRCHR4AK.js';
2
+ import { TooltipProvider, Tooltip, TooltipTrigger, TooltipContent } from './chunk-4CT5SCAH.js';
3
+ import { Skeleton } from './chunk-VGQC333M.js';
4
+ import { Input } from './chunk-YGBYH4EO.js';
5
+ import { Sheet, SheetContent, SheetHeader, SheetTitle, SheetDescription } from './chunk-KOGOYUEE.js';
6
+ import { Separator } from './chunk-ONAUEREV.js';
7
+ import { Button } from './chunk-PH6P53QX.js';
8
+ import { cn } from './chunk-DGPY4WP3.js';
9
+ import * as React from 'react';
10
+ import { PanelLeftIcon } from 'lucide-react';
11
+ import { Slot } from '@radix-ui/react-slot';
12
+ import { cva } from 'class-variance-authority';
13
+ import { jsx, jsxs } from 'react/jsx-runtime';
14
+
15
+ var SIDEBAR_COOKIE_NAME = "sidebar_state";
16
+ var SIDEBAR_COOKIE_MAX_AGE = 60 * 60 * 24 * 7;
17
+ var SIDEBAR_WIDTH = "16rem";
18
+ var SIDEBAR_WIDTH_MOBILE = "18rem";
19
+ var SIDEBAR_WIDTH_ICON = "3rem";
20
+ var SIDEBAR_KEYBOARD_SHORTCUT = "b";
21
+ var SidebarContext = React.createContext(null);
22
+ function useSidebar() {
23
+ const context = React.useContext(SidebarContext);
24
+ if (!context) {
25
+ throw new Error("useSidebar must be used within a SidebarProvider.");
26
+ }
27
+ return context;
28
+ }
29
+ function SidebarProvider({
30
+ defaultOpen = true,
31
+ open: openProp,
32
+ onOpenChange: setOpenProp,
33
+ className,
34
+ style,
35
+ children,
36
+ ...props
37
+ }) {
38
+ const isMobile = useIsMobile();
39
+ const [openMobile, setOpenMobile] = React.useState(false);
40
+ const [_open, _setOpen] = React.useState(defaultOpen);
41
+ const open = openProp ?? _open;
42
+ const setOpen = React.useCallback(
43
+ (value) => {
44
+ const openState = typeof value === "function" ? value(open) : value;
45
+ if (setOpenProp) {
46
+ setOpenProp(openState);
47
+ } else {
48
+ _setOpen(openState);
49
+ }
50
+ document.cookie = `${SIDEBAR_COOKIE_NAME}=${openState}; path=/; max-age=${SIDEBAR_COOKIE_MAX_AGE}`;
51
+ },
52
+ [setOpenProp, open]
53
+ );
54
+ const toggleSidebar = React.useCallback(() => {
55
+ return isMobile ? setOpenMobile((open2) => !open2) : setOpen((open2) => !open2);
56
+ }, [isMobile, setOpen, setOpenMobile]);
57
+ React.useEffect(() => {
58
+ const handleKeyDown = (event) => {
59
+ if (event.key === SIDEBAR_KEYBOARD_SHORTCUT && (event.metaKey || event.ctrlKey)) {
60
+ event.preventDefault();
61
+ toggleSidebar();
62
+ }
63
+ };
64
+ window.addEventListener("keydown", handleKeyDown);
65
+ return () => window.removeEventListener("keydown", handleKeyDown);
66
+ }, [toggleSidebar]);
67
+ const state = open ? "expanded" : "collapsed";
68
+ const contextValue = React.useMemo(
69
+ () => ({
70
+ state,
71
+ open,
72
+ setOpen,
73
+ isMobile,
74
+ openMobile,
75
+ setOpenMobile,
76
+ toggleSidebar
77
+ }),
78
+ [state, open, setOpen, isMobile, openMobile, setOpenMobile, toggleSidebar]
79
+ );
80
+ return /* @__PURE__ */ jsx(SidebarContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsx(TooltipProvider, { delayDuration: 0, children: /* @__PURE__ */ jsx(
81
+ "div",
82
+ {
83
+ "data-slot": "sidebar-wrapper",
84
+ style: {
85
+ "--sidebar-width": SIDEBAR_WIDTH,
86
+ "--sidebar-width-icon": SIDEBAR_WIDTH_ICON,
87
+ ...style
88
+ },
89
+ className: cn(
90
+ "group/sidebar-wrapper has-data-[variant=inset]:bg-sidebar flex min-h-svh w-full",
91
+ className
92
+ ),
93
+ ...props,
94
+ children
95
+ }
96
+ ) }) });
97
+ }
98
+ function Sidebar({
99
+ side = "left",
100
+ variant = "sidebar",
101
+ collapsible = "offcanvas",
102
+ className,
103
+ children,
104
+ ...props
105
+ }) {
106
+ const { isMobile, state, openMobile, setOpenMobile } = useSidebar();
107
+ if (collapsible === "none") {
108
+ return /* @__PURE__ */ jsx(
109
+ "div",
110
+ {
111
+ "data-slot": "sidebar",
112
+ className: cn(
113
+ "bg-sidebar text-sidebar-foreground flex h-full w-(--sidebar-width) flex-col",
114
+ className
115
+ ),
116
+ ...props,
117
+ children
118
+ }
119
+ );
120
+ }
121
+ if (isMobile) {
122
+ return /* @__PURE__ */ jsx(Sheet, { open: openMobile, onOpenChange: setOpenMobile, ...props, children: /* @__PURE__ */ jsxs(
123
+ SheetContent,
124
+ {
125
+ "data-sidebar": "sidebar",
126
+ "data-slot": "sidebar",
127
+ "data-mobile": "true",
128
+ className: "bg-sidebar text-sidebar-foreground w-(--sidebar-width) p-0 [&>button]:hidden",
129
+ style: {
130
+ "--sidebar-width": SIDEBAR_WIDTH_MOBILE
131
+ },
132
+ side,
133
+ children: [
134
+ /* @__PURE__ */ jsxs(SheetHeader, { className: "sr-only", children: [
135
+ /* @__PURE__ */ jsx(SheetTitle, { children: "Sidebar" }),
136
+ /* @__PURE__ */ jsx(SheetDescription, { children: "Displays the mobile sidebar." })
137
+ ] }),
138
+ /* @__PURE__ */ jsx("div", { className: "flex h-full w-full flex-col", children })
139
+ ]
140
+ }
141
+ ) });
142
+ }
143
+ return /* @__PURE__ */ jsxs(
144
+ "div",
145
+ {
146
+ className: "group peer text-sidebar-foreground hidden md:block",
147
+ "data-state": state,
148
+ "data-collapsible": state === "collapsed" ? collapsible : "",
149
+ "data-variant": variant,
150
+ "data-side": side,
151
+ "data-slot": "sidebar",
152
+ children: [
153
+ /* @__PURE__ */ jsx(
154
+ "div",
155
+ {
156
+ "data-slot": "sidebar-gap",
157
+ className: cn(
158
+ "relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear",
159
+ "group-data-[collapsible=offcanvas]:w-0",
160
+ "group-data-[side=right]:rotate-180",
161
+ variant === "floating" || variant === "inset" ? "group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]" : "group-data-[collapsible=icon]:w-(--sidebar-width-icon)"
162
+ )
163
+ }
164
+ ),
165
+ /* @__PURE__ */ jsx(
166
+ "div",
167
+ {
168
+ "data-slot": "sidebar-container",
169
+ className: cn(
170
+ "fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear md:flex",
171
+ 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)]",
172
+ // Adjust the padding for floating and inset variants.
173
+ 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",
174
+ className
175
+ ),
176
+ ...props,
177
+ children: /* @__PURE__ */ jsx(
178
+ "div",
179
+ {
180
+ "data-sidebar": "sidebar",
181
+ "data-slot": "sidebar-inner",
182
+ className: "bg-sidebar group-data-[variant=floating]:border-sidebar-border flex h-full w-full flex-col group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:shadow-sm",
183
+ children
184
+ }
185
+ )
186
+ }
187
+ )
188
+ ]
189
+ }
190
+ );
191
+ }
192
+ function SidebarTrigger({
193
+ className,
194
+ onClick,
195
+ ...props
196
+ }) {
197
+ const { toggleSidebar } = useSidebar();
198
+ return /* @__PURE__ */ jsxs(
199
+ Button,
200
+ {
201
+ "data-sidebar": "trigger",
202
+ "data-slot": "sidebar-trigger",
203
+ variant: "ghost",
204
+ size: "icon",
205
+ className: cn("size-7", className),
206
+ onClick: (event) => {
207
+ onClick?.(event);
208
+ toggleSidebar();
209
+ },
210
+ ...props,
211
+ children: [
212
+ /* @__PURE__ */ jsx(PanelLeftIcon, {}),
213
+ /* @__PURE__ */ jsx("span", { className: "sr-only", children: "Toggle Sidebar" })
214
+ ]
215
+ }
216
+ );
217
+ }
218
+ function SidebarRail({ className, ...props }) {
219
+ const { toggleSidebar } = useSidebar();
220
+ return /* @__PURE__ */ jsx(
221
+ "button",
222
+ {
223
+ "data-sidebar": "rail",
224
+ "data-slot": "sidebar-rail",
225
+ "aria-label": "Toggle Sidebar",
226
+ tabIndex: -1,
227
+ onClick: toggleSidebar,
228
+ title: "Toggle Sidebar",
229
+ className: cn(
230
+ "hover:after:bg-sidebar-border absolute inset-y-0 z-20 hidden w-4 -translate-x-1/2 transition-all ease-linear group-data-[side=left]:-right-4 group-data-[side=right]:left-0 after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] sm:flex",
231
+ "in-data-[side=left]:cursor-w-resize in-data-[side=right]:cursor-e-resize",
232
+ "[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize",
233
+ "hover:group-data-[collapsible=offcanvas]:bg-sidebar group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full",
234
+ "[[data-side=left][data-collapsible=offcanvas]_&]:-right-2",
235
+ "[[data-side=right][data-collapsible=offcanvas]_&]:-left-2",
236
+ className
237
+ ),
238
+ ...props
239
+ }
240
+ );
241
+ }
242
+ function SidebarInset({ className, ...props }) {
243
+ return /* @__PURE__ */ jsx(
244
+ "main",
245
+ {
246
+ "data-slot": "sidebar-inset",
247
+ className: cn(
248
+ "bg-background relative flex w-full flex-1 flex-col",
249
+ "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",
250
+ className
251
+ ),
252
+ ...props
253
+ }
254
+ );
255
+ }
256
+ function SidebarInput({
257
+ className,
258
+ ...props
259
+ }) {
260
+ return /* @__PURE__ */ jsx(
261
+ Input,
262
+ {
263
+ "data-slot": "sidebar-input",
264
+ "data-sidebar": "input",
265
+ className: cn("bg-background h-8 w-full shadow-none", className),
266
+ ...props
267
+ }
268
+ );
269
+ }
270
+ function SidebarHeader({ className, ...props }) {
271
+ return /* @__PURE__ */ jsx(
272
+ "div",
273
+ {
274
+ "data-slot": "sidebar-header",
275
+ "data-sidebar": "header",
276
+ className: cn("flex flex-col gap-2 p-2", className),
277
+ ...props
278
+ }
279
+ );
280
+ }
281
+ function SidebarFooter({ className, ...props }) {
282
+ return /* @__PURE__ */ jsx(
283
+ "div",
284
+ {
285
+ "data-slot": "sidebar-footer",
286
+ "data-sidebar": "footer",
287
+ className: cn("flex flex-col gap-2 p-2", className),
288
+ ...props
289
+ }
290
+ );
291
+ }
292
+ function SidebarSeparator({
293
+ className,
294
+ ...props
295
+ }) {
296
+ return /* @__PURE__ */ jsx(
297
+ Separator,
298
+ {
299
+ "data-slot": "sidebar-separator",
300
+ "data-sidebar": "separator",
301
+ className: cn("bg-sidebar-border mx-2 w-auto", className),
302
+ ...props
303
+ }
304
+ );
305
+ }
306
+ function SidebarContent({ className, ...props }) {
307
+ return /* @__PURE__ */ jsx(
308
+ "div",
309
+ {
310
+ "data-slot": "sidebar-content",
311
+ "data-sidebar": "content",
312
+ className: cn(
313
+ "flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden",
314
+ className
315
+ ),
316
+ ...props
317
+ }
318
+ );
319
+ }
320
+ function SidebarGroup({ className, ...props }) {
321
+ return /* @__PURE__ */ jsx(
322
+ "div",
323
+ {
324
+ "data-slot": "sidebar-group",
325
+ "data-sidebar": "group",
326
+ className: cn("relative flex w-full min-w-0 flex-col p-2", className),
327
+ ...props
328
+ }
329
+ );
330
+ }
331
+ function SidebarGroupLabel({
332
+ className,
333
+ asChild = false,
334
+ ...props
335
+ }) {
336
+ const Comp = asChild ? Slot : "div";
337
+ return /* @__PURE__ */ jsx(
338
+ Comp,
339
+ {
340
+ "data-slot": "sidebar-group-label",
341
+ "data-sidebar": "group-label",
342
+ className: cn(
343
+ "text-sidebar-foreground/70 ring-sidebar-ring flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium outline-hidden transition-[margin,opacity] duration-200 ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0",
344
+ "group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0",
345
+ className
346
+ ),
347
+ ...props
348
+ }
349
+ );
350
+ }
351
+ function SidebarGroupAction({
352
+ className,
353
+ asChild = false,
354
+ ...props
355
+ }) {
356
+ const Comp = asChild ? Slot : "button";
357
+ return /* @__PURE__ */ jsx(
358
+ Comp,
359
+ {
360
+ "data-slot": "sidebar-group-action",
361
+ "data-sidebar": "group-action",
362
+ className: cn(
363
+ "text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground absolute top-3.5 right-3 flex aspect-square w-5 items-center justify-center rounded-md p-0 outline-hidden transition-transform focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0",
364
+ // Increases the hit area of the button on mobile.
365
+ "after:absolute after:-inset-2 md:after:hidden",
366
+ "group-data-[collapsible=icon]:hidden",
367
+ className
368
+ ),
369
+ ...props
370
+ }
371
+ );
372
+ }
373
+ function SidebarGroupContent({
374
+ className,
375
+ ...props
376
+ }) {
377
+ return /* @__PURE__ */ jsx(
378
+ "div",
379
+ {
380
+ "data-slot": "sidebar-group-content",
381
+ "data-sidebar": "group-content",
382
+ className: cn("w-full text-sm", className),
383
+ ...props
384
+ }
385
+ );
386
+ }
387
+ function SidebarMenu({ className, ...props }) {
388
+ return /* @__PURE__ */ jsx(
389
+ "ul",
390
+ {
391
+ "data-slot": "sidebar-menu",
392
+ "data-sidebar": "menu",
393
+ className: cn("flex w-full min-w-0 flex-col gap-1", className),
394
+ ...props
395
+ }
396
+ );
397
+ }
398
+ function SidebarMenuItem({ className, ...props }) {
399
+ return /* @__PURE__ */ jsx(
400
+ "li",
401
+ {
402
+ "data-slot": "sidebar-menu-item",
403
+ "data-sidebar": "menu-item",
404
+ className: cn("group/menu-item relative", className),
405
+ ...props
406
+ }
407
+ );
408
+ }
409
+ var sidebarMenuButtonVariants = cva(
410
+ "peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-hidden ring-sidebar-ring transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-data-[sidebar=menu-action]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:font-medium data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0",
411
+ {
412
+ variants: {
413
+ variant: {
414
+ default: "hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",
415
+ outline: "bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]"
416
+ },
417
+ size: {
418
+ default: "h-8 text-sm",
419
+ sm: "h-7 text-xs",
420
+ lg: "h-12 text-sm group-data-[collapsible=icon]:p-0!"
421
+ }
422
+ },
423
+ defaultVariants: {
424
+ variant: "default",
425
+ size: "default"
426
+ }
427
+ }
428
+ );
429
+ function SidebarMenuButton({
430
+ asChild = false,
431
+ isActive = false,
432
+ variant = "default",
433
+ size = "default",
434
+ tooltip,
435
+ className,
436
+ ...props
437
+ }) {
438
+ const Comp = asChild ? Slot : "button";
439
+ const { isMobile, state } = useSidebar();
440
+ const button = /* @__PURE__ */ jsx(
441
+ Comp,
442
+ {
443
+ "data-slot": "sidebar-menu-button",
444
+ "data-sidebar": "menu-button",
445
+ "data-size": size,
446
+ "data-active": isActive,
447
+ className: cn(sidebarMenuButtonVariants({ variant, size }), className),
448
+ ...props
449
+ }
450
+ );
451
+ if (!tooltip) {
452
+ return button;
453
+ }
454
+ if (typeof tooltip === "string") {
455
+ tooltip = {
456
+ children: tooltip
457
+ };
458
+ }
459
+ return /* @__PURE__ */ jsxs(Tooltip, { children: [
460
+ /* @__PURE__ */ jsx(TooltipTrigger, { asChild: true, children: button }),
461
+ /* @__PURE__ */ jsx(
462
+ TooltipContent,
463
+ {
464
+ side: "right",
465
+ align: "center",
466
+ hidden: state !== "collapsed" || isMobile,
467
+ ...tooltip
468
+ }
469
+ )
470
+ ] });
471
+ }
472
+ function SidebarMenuAction({
473
+ className,
474
+ asChild = false,
475
+ showOnHover = false,
476
+ ...props
477
+ }) {
478
+ const Comp = asChild ? Slot : "button";
479
+ return /* @__PURE__ */ jsx(
480
+ Comp,
481
+ {
482
+ "data-slot": "sidebar-menu-action",
483
+ "data-sidebar": "menu-action",
484
+ className: cn(
485
+ "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 flex aspect-square w-5 items-center justify-center rounded-md p-0 outline-hidden transition-transform focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0",
486
+ // Increases the hit area of the button on mobile.
487
+ "after:absolute after:-inset-2 md:after:hidden",
488
+ "peer-data-[size=sm]/menu-button:top-1",
489
+ "peer-data-[size=default]/menu-button:top-1.5",
490
+ "peer-data-[size=lg]/menu-button:top-2.5",
491
+ "group-data-[collapsible=icon]:hidden",
492
+ showOnHover && "peer-data-[active=true]/menu-button:text-sidebar-accent-foreground group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-[state=open]:opacity-100 md:opacity-0",
493
+ className
494
+ ),
495
+ ...props
496
+ }
497
+ );
498
+ }
499
+ function SidebarMenuBadge({
500
+ className,
501
+ ...props
502
+ }) {
503
+ return /* @__PURE__ */ jsx(
504
+ "div",
505
+ {
506
+ "data-slot": "sidebar-menu-badge",
507
+ "data-sidebar": "menu-badge",
508
+ className: cn(
509
+ "text-sidebar-foreground pointer-events-none absolute right-1 flex h-5 min-w-5 items-center justify-center rounded-md px-1 text-xs font-medium tabular-nums select-none",
510
+ "peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[active=true]/menu-button:text-sidebar-accent-foreground",
511
+ "peer-data-[size=sm]/menu-button:top-1",
512
+ "peer-data-[size=default]/menu-button:top-1.5",
513
+ "peer-data-[size=lg]/menu-button:top-2.5",
514
+ "group-data-[collapsible=icon]:hidden",
515
+ className
516
+ ),
517
+ ...props
518
+ }
519
+ );
520
+ }
521
+ function SidebarMenuSkeleton({
522
+ className,
523
+ showIcon = false,
524
+ ...props
525
+ }) {
526
+ const width = React.useMemo(() => {
527
+ return `${Math.floor(Math.random() * 40) + 50}%`;
528
+ }, []);
529
+ return /* @__PURE__ */ jsxs(
530
+ "div",
531
+ {
532
+ "data-slot": "sidebar-menu-skeleton",
533
+ "data-sidebar": "menu-skeleton",
534
+ className: cn("flex h-8 items-center gap-2 rounded-md px-2", className),
535
+ ...props,
536
+ children: [
537
+ showIcon && /* @__PURE__ */ jsx(
538
+ Skeleton,
539
+ {
540
+ className: "size-4 rounded-md",
541
+ "data-sidebar": "menu-skeleton-icon"
542
+ }
543
+ ),
544
+ /* @__PURE__ */ jsx(
545
+ Skeleton,
546
+ {
547
+ className: "h-4 max-w-(--skeleton-width) flex-1",
548
+ "data-sidebar": "menu-skeleton-text",
549
+ style: {
550
+ "--skeleton-width": width
551
+ }
552
+ }
553
+ )
554
+ ]
555
+ }
556
+ );
557
+ }
558
+ function SidebarMenuSub({ className, ...props }) {
559
+ return /* @__PURE__ */ jsx(
560
+ "ul",
561
+ {
562
+ "data-slot": "sidebar-menu-sub",
563
+ "data-sidebar": "menu-sub",
564
+ className: cn(
565
+ "border-sidebar-border mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l px-2.5 py-0.5",
566
+ "group-data-[collapsible=icon]:hidden",
567
+ className
568
+ ),
569
+ ...props
570
+ }
571
+ );
572
+ }
573
+ function SidebarMenuSubItem({
574
+ className,
575
+ ...props
576
+ }) {
577
+ return /* @__PURE__ */ jsx(
578
+ "li",
579
+ {
580
+ "data-slot": "sidebar-menu-sub-item",
581
+ "data-sidebar": "menu-sub-item",
582
+ className: cn("group/menu-sub-item relative", className),
583
+ ...props
584
+ }
585
+ );
586
+ }
587
+ function SidebarMenuSubButton({
588
+ asChild = false,
589
+ size = "md",
590
+ isActive = false,
591
+ className,
592
+ ...props
593
+ }) {
594
+ const Comp = asChild ? Slot : "a";
595
+ return /* @__PURE__ */ jsx(
596
+ Comp,
597
+ {
598
+ "data-slot": "sidebar-menu-sub-button",
599
+ "data-sidebar": "menu-sub-button",
600
+ "data-size": size,
601
+ "data-active": isActive,
602
+ className: cn(
603
+ "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 flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 outline-hidden focus-visible:ring-2 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",
604
+ "data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground",
605
+ size === "sm" && "text-xs",
606
+ size === "md" && "text-sm",
607
+ "group-data-[collapsible=icon]:hidden",
608
+ className
609
+ ),
610
+ ...props
611
+ }
612
+ );
613
+ }
614
+
615
+ 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 };
616
+ //# sourceMappingURL=chunk-DQGDQEXD.js.map
617
+ //# sourceMappingURL=chunk-DQGDQEXD.js.map