@alkimi.org/ui-kit 0.9.10 → 0.10.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 (346) hide show
  1. package/README.github.md +589 -589
  2. package/README.md +589 -589
  3. package/README.npm.md +589 -589
  4. package/dist/{chunk-INXG2ITG.js → chunk-372VUZFE.js} +3 -3
  5. package/dist/chunk-372VUZFE.js.map +1 -0
  6. package/dist/{chunk-XNLDCAFS.js → chunk-3BVMHDYA.js} +1 -1
  7. package/dist/chunk-3BVMHDYA.js.map +1 -0
  8. package/dist/{chunk-IFNCRMNZ.js → chunk-3PEPOFYU.js} +1 -1
  9. package/dist/chunk-3PEPOFYU.js.map +1 -0
  10. package/dist/{chunk-7ENKXOF3.js → chunk-3TLCOZ5R.js} +2 -2
  11. package/dist/chunk-3TLCOZ5R.js.map +1 -0
  12. package/dist/{chunk-KYBTGVFM.mjs → chunk-4LR7SOCY.mjs} +1 -1
  13. package/dist/chunk-4LR7SOCY.mjs.map +1 -0
  14. package/dist/{chunk-HV2SGTFQ.mjs → chunk-4LUOGI24.mjs} +2 -2
  15. package/dist/chunk-4LUOGI24.mjs.map +1 -0
  16. package/dist/{chunk-B4YKLEVL.mjs → chunk-4PTRLHCB.mjs} +2 -2
  17. package/dist/chunk-4PTRLHCB.mjs.map +1 -0
  18. package/dist/{chunk-ZWYGJJTH.mjs → chunk-574USYNO.mjs} +2 -2
  19. package/dist/chunk-574USYNO.mjs.map +1 -0
  20. package/dist/chunk-5L5DM2X5.js +3 -0
  21. package/dist/chunk-5L5DM2X5.js.map +1 -0
  22. package/dist/{chunk-YK3UJT7O.mjs → chunk-5TVDBV74.mjs} +2 -2
  23. package/dist/chunk-5TVDBV74.mjs.map +1 -0
  24. package/dist/{chunk-TLGEA7LM.js → chunk-5X26XR44.js} +2 -2
  25. package/dist/chunk-5X26XR44.js.map +1 -0
  26. package/dist/{chunk-EA66F2ZN.mjs → chunk-7FUNOEYE.mjs} +2 -2
  27. package/dist/chunk-7FUNOEYE.mjs.map +1 -0
  28. package/dist/{chunk-SOZAPZ65.js → chunk-7J2ETVGK.js} +2 -2
  29. package/dist/chunk-7J2ETVGK.js.map +1 -0
  30. package/dist/{chunk-DRPEVJT7.mjs → chunk-7ONK6HHN.mjs} +1 -1
  31. package/dist/chunk-7ONK6HHN.mjs.map +1 -0
  32. package/dist/{chunk-NFHHEYXW.js → chunk-7SOZ6MOV.js} +2 -2
  33. package/dist/chunk-7SOZ6MOV.js.map +1 -0
  34. package/dist/{chunk-VNPIYQD6.mjs → chunk-7Y3KH5OM.mjs} +1 -1
  35. package/dist/chunk-7Y3KH5OM.mjs.map +1 -0
  36. package/dist/{chunk-7J43VVOI.mjs → chunk-AEZ5XKKG.mjs} +2 -2
  37. package/dist/chunk-AEZ5XKKG.mjs.map +1 -0
  38. package/dist/{chunk-KBEHHIN6.mjs → chunk-BLHKJHNV.mjs} +2 -2
  39. package/dist/chunk-BLHKJHNV.mjs.map +1 -0
  40. package/dist/{chunk-DEGPIR53.js → chunk-BV7RXRSL.js} +2 -2
  41. package/dist/chunk-BV7RXRSL.js.map +1 -0
  42. package/dist/{chunk-DVS5O7CS.mjs → chunk-C7GTPYMH.mjs} +2 -2
  43. package/dist/chunk-C7GTPYMH.mjs.map +1 -0
  44. package/dist/{chunk-EBSYGLCA.mjs → chunk-CMV76O4U.mjs} +2 -2
  45. package/dist/chunk-CMV76O4U.mjs.map +1 -0
  46. package/dist/{chunk-W4PJBJNX.mjs → chunk-CNRZOMR4.mjs} +2 -2
  47. package/dist/chunk-CNRZOMR4.mjs.map +1 -0
  48. package/dist/{chunk-5RIDFCU4.js → chunk-CT2CRYC2.js} +2 -2
  49. package/dist/chunk-CT2CRYC2.js.map +1 -0
  50. package/dist/{chunk-IUCIWRTI.mjs → chunk-DATWXRPT.mjs} +2 -2
  51. package/dist/chunk-DATWXRPT.mjs.map +1 -0
  52. package/dist/{chunk-CVGE3ROD.js → chunk-DHHZMQ72.js} +2 -2
  53. package/dist/chunk-DHHZMQ72.js.map +1 -0
  54. package/dist/{chunk-QJ7457IP.js → chunk-DIKQRVZO.js} +1 -1
  55. package/dist/chunk-DIKQRVZO.js.map +1 -0
  56. package/dist/{chunk-36L2E4K7.mjs → chunk-DKMCJGI4.mjs} +2 -2
  57. package/dist/chunk-DKMCJGI4.mjs.map +1 -0
  58. package/dist/{chunk-TOTBP4CJ.js → chunk-EIM5R7AJ.js} +2 -2
  59. package/dist/chunk-EIM5R7AJ.js.map +1 -0
  60. package/dist/{chunk-KCEGGK36.js → chunk-EJTY2ABY.js} +2 -2
  61. package/dist/chunk-EJTY2ABY.js.map +1 -0
  62. package/dist/{chunk-6N5E7FKO.js → chunk-EWRKHBIV.js} +2 -2
  63. package/dist/chunk-EWRKHBIV.js.map +1 -0
  64. package/dist/{chunk-VBARF35N.js → chunk-FUYXCJOQ.js} +1 -1
  65. package/dist/chunk-FUYXCJOQ.js.map +1 -0
  66. package/dist/{chunk-6HUPRCXQ.mjs → chunk-FZ3NXOFK.mjs} +2 -2
  67. package/dist/chunk-FZ3NXOFK.mjs.map +1 -0
  68. package/dist/{chunk-7HVZPUTO.js → chunk-G76GSW2A.js} +2 -2
  69. package/dist/chunk-G76GSW2A.js.map +1 -0
  70. package/dist/{chunk-4X3MFRSQ.js → chunk-GRXC46JC.js} +2 -2
  71. package/dist/chunk-GRXC46JC.js.map +1 -0
  72. package/dist/{chunk-OCAU343S.js → chunk-I5INE4KG.js} +2 -2
  73. package/dist/chunk-I5INE4KG.js.map +1 -0
  74. package/dist/{chunk-SKA5YFCS.mjs → chunk-IKJ4QRNB.mjs} +2 -2
  75. package/dist/chunk-IKJ4QRNB.mjs.map +1 -0
  76. package/dist/{chunk-UAJUT7B7.js → chunk-K4GMCVHO.js} +2 -2
  77. package/dist/chunk-K4GMCVHO.js.map +1 -0
  78. package/dist/{chunk-VUHWNO54.mjs → chunk-KLU33CJI.mjs} +2 -2
  79. package/dist/chunk-KLU33CJI.mjs.map +1 -0
  80. package/dist/{chunk-XQS62AJH.mjs → chunk-L36V45FD.mjs} +2 -2
  81. package/dist/chunk-L36V45FD.mjs.map +1 -0
  82. package/dist/{chunk-IOHKGN45.js → chunk-LQMOWEA7.js} +2 -2
  83. package/dist/chunk-LQMOWEA7.js.map +1 -0
  84. package/dist/{chunk-2R3FRGV4.mjs → chunk-MQMO7DMT.mjs} +2 -2
  85. package/dist/chunk-MQMO7DMT.mjs.map +1 -0
  86. package/dist/{chunk-VSRWPJJB.mjs → chunk-NEOUFWZN.mjs} +2 -2
  87. package/dist/chunk-NEOUFWZN.mjs.map +1 -0
  88. package/dist/{chunk-N4LDE7DZ.mjs → chunk-NKELJSLY.mjs} +2 -2
  89. package/dist/chunk-NKELJSLY.mjs.map +1 -0
  90. package/dist/{chunk-DP2FXFMQ.mjs → chunk-NKLBPY3T.mjs} +2 -2
  91. package/dist/chunk-NKLBPY3T.mjs.map +1 -0
  92. package/dist/{chunk-JNK2KBEK.mjs → chunk-PD43W3YN.mjs} +2 -2
  93. package/dist/chunk-PD43W3YN.mjs.map +1 -0
  94. package/dist/{chunk-57XZUJL4.mjs → chunk-QC5MA4WL.mjs} +2 -2
  95. package/dist/chunk-QC5MA4WL.mjs.map +1 -0
  96. package/dist/{chunk-N3ZLPC5C.mjs → chunk-QMJVRGPB.mjs} +2 -2
  97. package/dist/chunk-QMJVRGPB.mjs.map +1 -0
  98. package/dist/{chunk-PBOK6TUC.mjs → chunk-QVMQ55JW.mjs} +2 -2
  99. package/dist/chunk-QVMQ55JW.mjs.map +1 -0
  100. package/dist/{chunk-NIHULISF.js → chunk-RJMIOBXZ.js} +2 -2
  101. package/dist/chunk-RJMIOBXZ.js.map +1 -0
  102. package/dist/{chunk-4PODZIEU.js → chunk-RKRTEMMZ.js} +2 -2
  103. package/dist/chunk-RKRTEMMZ.js.map +1 -0
  104. package/dist/{chunk-SN3YJA4C.js → chunk-RRAIGAHU.js} +2 -2
  105. package/dist/chunk-RRAIGAHU.js.map +1 -0
  106. package/dist/{chunk-AJM7GGVC.mjs → chunk-S5TKCF6T.mjs} +1 -1
  107. package/dist/chunk-S5TKCF6T.mjs.map +1 -0
  108. package/dist/{chunk-BUS3E5OY.js → chunk-TDMRUCR6.js} +2 -2
  109. package/dist/chunk-TDMRUCR6.js.map +1 -0
  110. package/dist/{chunk-LNIGQUON.mjs → chunk-UAUSYTY4.mjs} +2 -2
  111. package/dist/chunk-UAUSYTY4.mjs.map +1 -0
  112. package/dist/{chunk-JVQJZ5HP.js → chunk-UJZP6L4S.js} +2 -2
  113. package/dist/chunk-UJZP6L4S.js.map +1 -0
  114. package/dist/{chunk-5ESMRNR3.js → chunk-ULIOO55I.js} +2 -2
  115. package/dist/chunk-ULIOO55I.js.map +1 -0
  116. package/dist/{chunk-S7CZVGW7.js → chunk-UNR6ATUH.js} +2 -2
  117. package/dist/chunk-UNR6ATUH.js.map +1 -0
  118. package/dist/{chunk-MKLABTST.js → chunk-USPGZYMV.js} +2 -2
  119. package/dist/chunk-USPGZYMV.js.map +1 -0
  120. package/dist/{chunk-K5ARCQIP.js → chunk-VBPIXXIA.js} +2 -2
  121. package/dist/chunk-VBPIXXIA.js.map +1 -0
  122. package/dist/{chunk-CA75YECJ.mjs → chunk-WAX33IZF.mjs} +2 -2
  123. package/dist/chunk-WAX33IZF.mjs.map +1 -0
  124. package/dist/{chunk-AHQNHOS2.js → chunk-WFD523CV.js} +1 -1
  125. package/dist/chunk-WFD523CV.js.map +1 -0
  126. package/dist/{chunk-NMU4NNZ2.mjs → chunk-WY4HCUAP.mjs} +2 -2
  127. package/dist/chunk-WY4HCUAP.mjs.map +1 -0
  128. package/dist/{chunk-SUZ2FZQ2.js → chunk-WYRD4UAK.js} +2 -2
  129. package/dist/chunk-WYRD4UAK.js.map +1 -0
  130. package/dist/{chunk-ZX7652AR.mjs → chunk-WZ5F5VT3.mjs} +2 -2
  131. package/dist/chunk-WZ5F5VT3.mjs.map +1 -0
  132. package/dist/{chunk-QP7CDVWG.js → chunk-XQILGD5B.js} +2 -2
  133. package/dist/chunk-XQILGD5B.js.map +1 -0
  134. package/dist/chunk-XSJKREFJ.mjs +3 -0
  135. package/dist/chunk-XSJKREFJ.mjs.map +1 -0
  136. package/dist/chunk-XYO4VLMF.js.map +1 -1
  137. package/dist/{chunk-O2FPBOOV.mjs → chunk-YBV4CPVD.mjs} +2 -2
  138. package/dist/chunk-YBV4CPVD.mjs.map +1 -0
  139. package/dist/chunk-YKXP3INY.js +3 -0
  140. package/dist/chunk-YKXP3INY.js.map +1 -0
  141. package/dist/{chunk-IFS4OO3L.js → chunk-Z5V4P3EC.js} +2 -2
  142. package/dist/chunk-Z5V4P3EC.js.map +1 -0
  143. package/dist/{chunk-NMI6DEUG.mjs → chunk-Z6RAFZ3C.mjs} +1 -1
  144. package/dist/chunk-Z6RAFZ3C.mjs.map +1 -0
  145. package/dist/components/GeometricFluidGrid.js +1 -1
  146. package/dist/components/GeometricFluidGrid.js.map +1 -1
  147. package/dist/components/GeometricFluidGrid.mjs +1 -1
  148. package/dist/components/GlitchLink.js +1 -1
  149. package/dist/components/GlitchLink.js.map +1 -1
  150. package/dist/components/GlitchLink.mjs +1 -1
  151. package/dist/components/PixelLoad.js +1 -1
  152. package/dist/components/PixelLoad.js.map +1 -1
  153. package/dist/components/PixelLoad.mjs +1 -1
  154. package/dist/components/TextDecoder.js +1 -1
  155. package/dist/components/TextDecoder.js.map +1 -1
  156. package/dist/components/TextDecoder.mjs +1 -1
  157. package/dist/components/accordion.js +1 -1
  158. package/dist/components/accordion.js.map +1 -1
  159. package/dist/components/accordion.mjs +1 -1
  160. package/dist/components/avatar.js +1 -1
  161. package/dist/components/avatar.js.map +1 -1
  162. package/dist/components/avatar.mjs +1 -1
  163. package/dist/components/breadcrumb.js +1 -1
  164. package/dist/components/breadcrumb.js.map +1 -1
  165. package/dist/components/breadcrumb.mjs +1 -1
  166. package/dist/components/breadcrumb.mjs.map +1 -1
  167. package/dist/components/button.js +1 -1
  168. package/dist/components/button.js.map +1 -1
  169. package/dist/components/button.mjs +1 -1
  170. package/dist/components/calendar.js +1 -1
  171. package/dist/components/calendar.js.map +1 -1
  172. package/dist/components/calendar.mjs +1 -1
  173. package/dist/components/card.js +1 -1
  174. package/dist/components/card.js.map +1 -1
  175. package/dist/components/card.mjs +1 -1
  176. package/dist/components/card.mjs.map +1 -1
  177. package/dist/components/checkbox.js +1 -1
  178. package/dist/components/checkbox.js.map +1 -1
  179. package/dist/components/checkbox.mjs +1 -1
  180. package/dist/components/combobox.d.mts +4 -1
  181. package/dist/components/combobox.d.ts +4 -1
  182. package/dist/components/combobox.js +1 -1
  183. package/dist/components/combobox.js.map +1 -1
  184. package/dist/components/combobox.mjs +1 -1
  185. package/dist/components/command.js +1 -1
  186. package/dist/components/command.js.map +1 -1
  187. package/dist/components/command.mjs +1 -1
  188. package/dist/components/date-picker.js +1 -1
  189. package/dist/components/date-picker.js.map +1 -1
  190. package/dist/components/date-picker.mjs +1 -1
  191. package/dist/components/date-range-picker.js +1 -1
  192. package/dist/components/date-range-picker.js.map +1 -1
  193. package/dist/components/date-range-picker.mjs +1 -1
  194. package/dist/components/dialog.js +1 -1
  195. package/dist/components/dialog.js.map +1 -1
  196. package/dist/components/dialog.mjs +1 -1
  197. package/dist/components/drawer.js +1 -1
  198. package/dist/components/drawer.js.map +1 -1
  199. package/dist/components/drawer.mjs +1 -1
  200. package/dist/components/dropdown-menu.js +1 -1
  201. package/dist/components/dropdown-menu.js.map +1 -1
  202. package/dist/components/dropdown-menu.mjs +1 -1
  203. package/dist/components/field.js +1 -1
  204. package/dist/components/field.js.map +1 -1
  205. package/dist/components/field.mjs +1 -1
  206. package/dist/components/file-upload.js +1 -1
  207. package/dist/components/file-upload.js.map +1 -1
  208. package/dist/components/file-upload.mjs +1 -1
  209. package/dist/components/input.js +1 -1
  210. package/dist/components/input.js.map +1 -1
  211. package/dist/components/input.mjs +1 -1
  212. package/dist/components/label.js +1 -1
  213. package/dist/components/label.js.map +1 -1
  214. package/dist/components/label.mjs +1 -1
  215. package/dist/components/popover.js +1 -1
  216. package/dist/components/popover.js.map +1 -1
  217. package/dist/components/popover.mjs +1 -1
  218. package/dist/components/progress.js +1 -1
  219. package/dist/components/progress.js.map +1 -1
  220. package/dist/components/progress.mjs +1 -1
  221. package/dist/components/progress.mjs.map +1 -1
  222. package/dist/components/radio-group.js +1 -1
  223. package/dist/components/radio-group.js.map +1 -1
  224. package/dist/components/radio-group.mjs +1 -1
  225. package/dist/components/scroll-area.js +1 -1
  226. package/dist/components/scroll-area.js.map +1 -1
  227. package/dist/components/scroll-area.mjs +1 -1
  228. package/dist/components/separator.js +1 -1
  229. package/dist/components/separator.js.map +1 -1
  230. package/dist/components/separator.mjs +1 -1
  231. package/dist/components/sheet.js +1 -1
  232. package/dist/components/sheet.js.map +1 -1
  233. package/dist/components/sheet.mjs +1 -1
  234. package/dist/components/sidebar.js +1 -1
  235. package/dist/components/sidebar.js.map +1 -1
  236. package/dist/components/sidebar.mjs +1 -1
  237. package/dist/components/skeleton.js +1 -1
  238. package/dist/components/skeleton.js.map +1 -1
  239. package/dist/components/skeleton.mjs +1 -1
  240. package/dist/components/slider.js +1 -1
  241. package/dist/components/slider.js.map +1 -1
  242. package/dist/components/slider.mjs +1 -1
  243. package/dist/components/slider.mjs.map +1 -1
  244. package/dist/components/switch.js +1 -1
  245. package/dist/components/switch.js.map +1 -1
  246. package/dist/components/switch.mjs +1 -1
  247. package/dist/components/switch.mjs.map +1 -1
  248. package/dist/components/table.js +1 -1
  249. package/dist/components/table.js.map +1 -1
  250. package/dist/components/table.mjs +1 -1
  251. package/dist/components/tabs.js +1 -1
  252. package/dist/components/tabs.js.map +1 -1
  253. package/dist/components/tabs.mjs +1 -1
  254. package/dist/components/textarea.js +1 -1
  255. package/dist/components/textarea.js.map +1 -1
  256. package/dist/components/textarea.mjs +1 -1
  257. package/dist/components/toast.js +1 -1
  258. package/dist/components/toast.js.map +1 -1
  259. package/dist/components/toast.mjs +1 -1
  260. package/dist/components/tooltip.js +1 -1
  261. package/dist/components/tooltip.js.map +1 -1
  262. package/dist/components/tooltip.mjs +1 -1
  263. package/dist/components/tree-select.js +1 -1
  264. package/dist/components/tree-select.js.map +1 -1
  265. package/dist/components/tree-select.mjs +1 -1
  266. package/dist/index.css +1 -1
  267. package/dist/index.css.map +1 -1
  268. package/dist/index.js +1 -1
  269. package/dist/index.js.map +1 -1
  270. package/dist/index.mjs +1 -1
  271. package/dist/styles.css +1 -1
  272. package/dist/styles.css.map +1 -1
  273. package/package.json +109 -109
  274. package/dist/chunk-2R3FRGV4.mjs.map +0 -1
  275. package/dist/chunk-2RQVAC3C.mjs +0 -3
  276. package/dist/chunk-2RQVAC3C.mjs.map +0 -1
  277. package/dist/chunk-36L2E4K7.mjs.map +0 -1
  278. package/dist/chunk-4PODZIEU.js.map +0 -1
  279. package/dist/chunk-4X3MFRSQ.js.map +0 -1
  280. package/dist/chunk-57XZUJL4.mjs.map +0 -1
  281. package/dist/chunk-5ESMRNR3.js.map +0 -1
  282. package/dist/chunk-5RIDFCU4.js.map +0 -1
  283. package/dist/chunk-6HUPRCXQ.mjs.map +0 -1
  284. package/dist/chunk-6N5E7FKO.js.map +0 -1
  285. package/dist/chunk-7ENKXOF3.js.map +0 -1
  286. package/dist/chunk-7HVZPUTO.js.map +0 -1
  287. package/dist/chunk-7J43VVOI.mjs.map +0 -1
  288. package/dist/chunk-AHQNHOS2.js.map +0 -1
  289. package/dist/chunk-AJM7GGVC.mjs.map +0 -1
  290. package/dist/chunk-B4YKLEVL.mjs.map +0 -1
  291. package/dist/chunk-BUS3E5OY.js.map +0 -1
  292. package/dist/chunk-CA75YECJ.mjs.map +0 -1
  293. package/dist/chunk-CVGE3ROD.js.map +0 -1
  294. package/dist/chunk-DEGPIR53.js.map +0 -1
  295. package/dist/chunk-DP2FXFMQ.mjs.map +0 -1
  296. package/dist/chunk-DRPEVJT7.mjs.map +0 -1
  297. package/dist/chunk-DVS5O7CS.mjs.map +0 -1
  298. package/dist/chunk-EA66F2ZN.mjs.map +0 -1
  299. package/dist/chunk-EBSYGLCA.mjs.map +0 -1
  300. package/dist/chunk-HV2SGTFQ.mjs.map +0 -1
  301. package/dist/chunk-IFNCRMNZ.js.map +0 -1
  302. package/dist/chunk-IFS4OO3L.js.map +0 -1
  303. package/dist/chunk-INXG2ITG.js.map +0 -1
  304. package/dist/chunk-IOHKGN45.js.map +0 -1
  305. package/dist/chunk-IUCIWRTI.mjs.map +0 -1
  306. package/dist/chunk-JNK2KBEK.mjs.map +0 -1
  307. package/dist/chunk-JVQJZ5HP.js.map +0 -1
  308. package/dist/chunk-K5ARCQIP.js.map +0 -1
  309. package/dist/chunk-KBEHHIN6.mjs.map +0 -1
  310. package/dist/chunk-KCEGGK36.js.map +0 -1
  311. package/dist/chunk-KYBTGVFM.mjs.map +0 -1
  312. package/dist/chunk-LNIGQUON.mjs.map +0 -1
  313. package/dist/chunk-M2PMK5S2.js +0 -3
  314. package/dist/chunk-M2PMK5S2.js.map +0 -1
  315. package/dist/chunk-MKLABTST.js.map +0 -1
  316. package/dist/chunk-N3ZLPC5C.mjs.map +0 -1
  317. package/dist/chunk-N4LDE7DZ.mjs.map +0 -1
  318. package/dist/chunk-NFHHEYXW.js.map +0 -1
  319. package/dist/chunk-NIHULISF.js.map +0 -1
  320. package/dist/chunk-NMI6DEUG.mjs.map +0 -1
  321. package/dist/chunk-NMU4NNZ2.mjs.map +0 -1
  322. package/dist/chunk-O2FPBOOV.mjs.map +0 -1
  323. package/dist/chunk-OCAU343S.js.map +0 -1
  324. package/dist/chunk-PBOK6TUC.mjs.map +0 -1
  325. package/dist/chunk-QJ7457IP.js.map +0 -1
  326. package/dist/chunk-QP7CDVWG.js.map +0 -1
  327. package/dist/chunk-S7CZVGW7.js.map +0 -1
  328. package/dist/chunk-SKA5YFCS.mjs.map +0 -1
  329. package/dist/chunk-SN3YJA4C.js.map +0 -1
  330. package/dist/chunk-SOZAPZ65.js.map +0 -1
  331. package/dist/chunk-SUZ2FZQ2.js.map +0 -1
  332. package/dist/chunk-TLGEA7LM.js.map +0 -1
  333. package/dist/chunk-TOTBP4CJ.js.map +0 -1
  334. package/dist/chunk-UAJUT7B7.js.map +0 -1
  335. package/dist/chunk-VBARF35N.js.map +0 -1
  336. package/dist/chunk-VNPIYQD6.mjs.map +0 -1
  337. package/dist/chunk-VSRWPJJB.mjs.map +0 -1
  338. package/dist/chunk-VUHWNO54.mjs.map +0 -1
  339. package/dist/chunk-W4PJBJNX.mjs.map +0 -1
  340. package/dist/chunk-WMHK5YWO.js +0 -3
  341. package/dist/chunk-WMHK5YWO.js.map +0 -1
  342. package/dist/chunk-XNLDCAFS.js.map +0 -1
  343. package/dist/chunk-XQS62AJH.mjs.map +0 -1
  344. package/dist/chunk-YK3UJT7O.mjs.map +0 -1
  345. package/dist/chunk-ZWYGJJTH.mjs.map +0 -1
  346. package/dist/chunk-ZX7652AR.mjs.map +0 -1
@@ -1,3 +1,3 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }"use client";
2
- var _chunkSUZ2FZQ2js = require('./chunk-SUZ2FZQ2.js');var _chunk5ESMRNR3js = require('./chunk-5ESMRNR3.js');var _chunkVBARF35Njs = require('./chunk-VBARF35N.js');var _react = require('react'); var i = _interopRequireWildcard(_react);var _lucidereact = require('lucide-react');var _jsxruntime = require('react/jsx-runtime');function M(e){let n=[e.value];if(e.children)for(let a of e.children)n.push(...M(a));return n}function $(e,n){if(!e.children||e.children.length===0)return n.has(e.value)?"checked":"unchecked";let a=M(e),r=a.filter(l=>n.has(l)).length;return r===0?"unchecked":r===a.length?"checked":"indeterminate"}function J(e,n){let a=n.toLowerCase().trim();if(!a)return e;let r=[];for(let l of e){let f=l.label.toLowerCase().includes(a);if(l.children&&l.children.length>0){let h=J(l.children,n);f?r.push(l):h&&h.length>0&&r.push({...l,children:h})}else f&&r.push(l)}return r.length>0?r:null}function le(e,n){let a=n.toLowerCase().trim(),r=new Set;function l(f){let h=!1;for(let g of f){let w=g.label.toLowerCase().includes(a),S=!1;g.children&&(S=l(g.children)),(w||S)&&(r.add(g.value),h=!0)}return h}return l(e),r}function N(e,n){for(let a of e){if(a.value===n)return a;if(a.children){let r=N(a.children,n);if(r)return r}}}function Q(e){let n=new Set;for(let a of e)if(a.children&&a.children.length>0){n.add(a.value);for(let r of Q(a.children))n.add(r)}return n}function oe(e,n){if(!n)return e;let a=n.toLowerCase().trim();if(!a)return e;let r=e.toLowerCase().indexOf(a);return r===-1?e:_jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment,{children:[e.slice(0,r),_jsxruntime.jsx.call(void 0, "span",{className:"font-semibold underline",children:e.slice(r,r+a.length)}),e.slice(r+a.length)]})}function W({node:e,depth:n,multiple:a,selectedSet:r,expandedValues:l,focusedValue:f,onToggleExpand:h,onSelect:g,onFocus:w,searchTerm:S}){let V=e.children&&e.children.length>0,y=l.has(e.value),v=a?$(e,r):r.has(e.value)?"checked":"unchecked",A=n*20;return _jsxruntime.jsxs.call(void 0, "div",{role:"treeitem","aria-expanded":V?y:void 0,"aria-selected":v==="checked",children:[_jsxruntime.jsxs.call(void 0, "div",{className:_chunkVBARF35Njs.a.call(void 0, "relative flex items-center gap-2 rounded-sm px-2 py-1.5 my-0.5 text-sm cursor-pointer select-none outline-none active:opacity-50","hover:bg-muted",v==="checked"&&!a&&"bg-muted"),style:{paddingLeft:`${8+A}px`},onClick:()=>g(e),onFocus:()=>w(e.value),"data-tree-value":e.value,tabIndex:f===e.value?0:-1,children:[V?_jsxruntime.jsx.call(void 0, "button",{type:"button",className:"h-4 w-4 shrink-0 flex items-center justify-center rounded-sm hover:bg-secondary active:opacity-50",onClick:m=>{m.stopPropagation(),h(e.value)},"aria-label":y?`Collapse ${e.label}`:`Expand ${e.label}`,tabIndex:-1,children:y?_jsxruntime.jsx.call(void 0, _lucidereact.ChevronDown,{className:"h-3.5 w-3.5"}):_jsxruntime.jsx.call(void 0, _lucidereact.ChevronRight,{className:"h-3.5 w-3.5"})}):_jsxruntime.jsx.call(void 0, "span",{className:"h-4 w-4 shrink-0"}),a?_jsxruntime.jsx.call(void 0, _chunkSUZ2FZQ2js.a,{checked:v==="checked"?!0:v==="indeterminate"?"indeterminate":!1,onCheckedChange:()=>g(e),onClick:m=>m.stopPropagation(),className:"shrink-0","aria-label":e.label}):_jsxruntime.jsx.call(void 0, _lucidereact.Check,{className:_chunkVBARF35Njs.a.call(void 0, "h-4 w-4 shrink-0",v==="checked"?"opacity-100":"opacity-0")}),_jsxruntime.jsx.call(void 0, "span",{className:"truncate",children:oe(e.label,S)})]}),V&&y&&_jsxruntime.jsx.call(void 0, "div",{role:"group",children:e.children.map(m=>_jsxruntime.jsx.call(void 0, W,{node:m,depth:n+1,multiple:a,selectedSet:r,expandedValues:l,focusedValue:f,onToggleExpand:h,onSelect:g,onFocus:w,searchTerm:S},m.value))})]})}function ge({nodes:e,value:n,onValueChange:a,multiple:r=!1,values:l=[],onValuesChange:f,placeholder:h="Select...",searchPlaceholder:g="Search...",emptyMessage:w="No results found.",disabled:S=!1,className:V,error:y=!1,defaultExpandedValues:v,expandAll:A=!1}){let[m,B]=i.useState(!1),[b,K]=i.useState(""),[p,k]=i.useState(null),[D,L]=i.useState(()=>A?Q(e):v?new Set(v):new Set),P=i.useRef(null),I=i.useRef(null),C=i.useMemo(()=>new Set(r?l:n?[n]:[]),[r,l,n]),F=i.useMemo(()=>b?J(e,b):e,[e,b]);i.useEffect(()=>{if(b){P.current||(P.current=new Set(D));let t=le(e,b);L(t)}else P.current&&(L(P.current),P.current=null)},[b,e]);let Y=i.useCallback(t=>{B(t),t||(K(""),k(null))},[]),T=i.useCallback(t=>{L(s=>{let d=new Set(s);return d.has(t)?d.delete(t):d.add(t),d})},[]),H=i.useCallback(t=>{if(r){let s=M(t),d=$(t,C),c;if(d==="checked"){let u=new Set(s);c=l.filter(R=>!u.has(R))}else{let u=s.filter(R=>!C.has(R));c=[...l,...u]}_optionalChain([f, 'optionalCall', _2 => _2(c)])}else{if(t.children&&t.children.length>0){T(t.value);return}let d=t.value===n?"":t.value;_optionalChain([a, 'optionalCall', _3 => _3(d)]),B(!1)}},[r,l,n,C,f,a,T]),Z=i.useCallback((t,s)=>{s.preventDefault(),s.stopPropagation();let d=N(e,t);if(d){let c=new Set(M(d)),u=l.filter(R=>!c.has(R));_optionalChain([f, 'optionalCall', _4 => _4(u)])}},[e,l,f]),q=i.useMemo(()=>{if(!r)return[];let t=[];function s(d){for(let c of d){let u=$(c,C);u==="checked"?t.push(c.value):u==="indeterminate"&&c.children&&s(c.children)}}return s(e),t},[e,C,r]),O=i.useCallback(()=>I.current?Array.from(I.current.querySelectorAll("[data-tree-value]")):[],[]),_=i.useCallback(t=>{let s=O(),d=s.findIndex(c=>c.dataset.treeValue===p);switch(t.key){case"ArrowDown":{t.preventDefault();let c=Math.min(d+1,s.length-1),u=_optionalChain([s, 'access', _5 => _5[c], 'optionalAccess', _6 => _6.dataset, 'access', _7 => _7.treeValue]);u&&(k(u),_optionalChain([s, 'access', _8 => _8[c], 'optionalAccess', _9 => _9.focus, 'call', _10 => _10()]));break}case"ArrowUp":{t.preventDefault();let c=Math.max(d-1,0),u=_optionalChain([s, 'access', _11 => _11[c], 'optionalAccess', _12 => _12.dataset, 'access', _13 => _13.treeValue]);u&&(k(u),_optionalChain([s, 'access', _14 => _14[c], 'optionalAccess', _15 => _15.focus, 'call', _16 => _16()]));break}case"ArrowRight":{if(t.preventDefault(),p){let c=N(e,p);if(_optionalChain([c, 'optionalAccess', _17 => _17.children, 'optionalAccess', _18 => _18.length]))if(!D.has(p))T(p);else{let u=c.children[0].value;k(u),requestAnimationFrame(()=>{_optionalChain([O, 'call', _19 => _19(), 'access', _20 => _20.find, 'call', _21 => _21(re=>re.dataset.treeValue===u), 'optionalAccess', _22 => _22.focus, 'call', _23 => _23()])})}}break}case"ArrowLeft":{t.preventDefault(),p&&D.has(p)&&T(p);break}case"Enter":case" ":{if(t.preventDefault(),p){let c=N(e,p);c&&H(c)}break}case"Home":{t.preventDefault();let c=_optionalChain([s, 'access', _24 => _24[0], 'optionalAccess', _25 => _25.dataset, 'access', _26 => _26.treeValue]);c&&(k(c),_optionalChain([s, 'access', _27 => _27[0], 'optionalAccess', _28 => _28.focus, 'call', _29 => _29()]));break}case"End":{t.preventDefault();let c=_optionalChain([s, 'access', _30 => _30[s.length-1], 'optionalAccess', _31 => _31.dataset, 'access', _32 => _32.treeValue]);c&&(k(c),_optionalChain([s, 'access', _33 => _33[s.length-1], 'optionalAccess', _34 => _34.focus, 'call', _35 => _35()]));break}}},[p,e,D,O,T,H]),ee=()=>r?l.length===0?h:l.length===1?_nullishCoalesce(_optionalChain([N, 'call', _36 => _36(e,l[0]), 'optionalAccess', _37 => _37.label]), () => (l[0])):`${l.length} selected`:n?_nullishCoalesce(_optionalChain([N, 'call', _38 => _38(e,n), 'optionalAccess', _39 => _39.label]), () => (n)):h,te=()=>{if(!r||q.length===0)return null;let t=q.map(s=>N(e,s)).filter(Boolean);return _jsxruntime.jsx.call(void 0, "div",{className:"max-h-[100px] overflow-y-auto px-2 py-1.5 border-b border-border",children:_jsxruntime.jsx.call(void 0, "div",{className:"flex flex-wrap gap-1",children:t.map(s=>_jsxruntime.jsxs.call(void 0, "div",{className:"inline-flex items-center gap-1 rounded-md bg-secondary px-2 py-0.5 text-xs",children:[_jsxruntime.jsx.call(void 0, "span",{className:"truncate max-w-[120px]",children:s.label}),_jsxruntime.jsx.call(void 0, _lucidereact.X,{className:"h-3 w-3 cursor-pointer shrink-0",onClick:d=>Z(s.value,d),"aria-label":`Remove ${s.label}`})]},s.value))})})};return _jsxruntime.jsxs.call(void 0, _chunk5ESMRNR3js.a,{open:m,onOpenChange:Y,children:[_jsxruntime.jsx.call(void 0, _chunk5ESMRNR3js.b,{asChild:!0,children:_jsxruntime.jsxs.call(void 0, "button",{type:"button",role:"combobox","aria-expanded":m,"aria-haspopup":"tree",disabled:S,className:_chunkVBARF35Njs.a.call(void 0, "cursor-pointer flex my-2 h-9 w-full items-center justify-between rounded-3xl border border-border bg-background hover:bg-secondary px-4 py-2 text-sm text-primary-accent ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 active:opacity-50 disabled:cursor-not-allowed disabled:opacity-50",!n&&!l.length&&"text-secondary-text",y&&"border-destructive-foreground focus-visible:ring-destructive-foreground",V),children:[_jsxruntime.jsx.call(void 0, "span",{className:"truncate",children:ee()}),_jsxruntime.jsx.call(void 0, _lucidereact.ChevronDown,{className:"ml-2 h-4 w-4 shrink-0 opacity-50"})]})}),_jsxruntime.jsxs.call(void 0, _chunk5ESMRNR3js.c,{className:"p-0",align:"start",style:{width:"var(--radix-popover-trigger-width)"},children:[_jsxruntime.jsxs.call(void 0, "div",{className:"flex items-center border-b px-3",children:[_jsxruntime.jsx.call(void 0, _lucidereact.Search,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),_jsxruntime.jsx.call(void 0, "input",{value:b,onChange:t=>K(t.target.value),placeholder:g,className:"flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50","aria-label":"Search tree"})]}),te(),_jsxruntime.jsx.call(void 0, "div",{className:"max-h-[300px] overflow-y-auto",children:F&&F.length>0?_jsxruntime.jsx.call(void 0, "div",{ref:I,role:"tree","aria-label":"Options",className:"p-1",onKeyDown:_,children:F.map(t=>_jsxruntime.jsx.call(void 0, W,{node:t,depth:0,multiple:r,selectedSet:C,expandedValues:D,focusedValue:p,onToggleExpand:T,onSelect:H,onFocus:k,searchTerm:b},t.value))}):_jsxruntime.jsx.call(void 0, "div",{className:"py-6 text-center text-sm text-muted-foreground",children:w})})]})]})}exports.a = ge;
3
- //# sourceMappingURL=chunk-IOHKGN45.js.map
2
+ var _chunkWYRD4UAKjs = require('./chunk-WYRD4UAK.js');var _chunkULIOO55Ijs = require('./chunk-ULIOO55I.js');var _chunkFUYXCJOQjs = require('./chunk-FUYXCJOQ.js');var _react = require('react'); var i = _interopRequireWildcard(_react);var _lucidereact = require('lucide-react');var _jsxruntime = require('react/jsx-runtime');function M(e){let n=[e.value];if(e.children)for(let a of e.children)n.push(...M(a));return n}function $(e,n){if(!e.children||e.children.length===0)return n.has(e.value)?"checked":"unchecked";let a=M(e),r=a.filter(l=>n.has(l)).length;return r===0?"unchecked":r===a.length?"checked":"indeterminate"}function J(e,n){let a=n.toLowerCase().trim();if(!a)return e;let r=[];for(let l of e){let f=l.label.toLowerCase().includes(a);if(l.children&&l.children.length>0){let h=J(l.children,n);f?r.push(l):h&&h.length>0&&r.push({...l,children:h})}else f&&r.push(l)}return r.length>0?r:null}function le(e,n){let a=n.toLowerCase().trim(),r=new Set;function l(f){let h=!1;for(let g of f){let w=g.label.toLowerCase().includes(a),S=!1;g.children&&(S=l(g.children)),(w||S)&&(r.add(g.value),h=!0)}return h}return l(e),r}function N(e,n){for(let a of e){if(a.value===n)return a;if(a.children){let r=N(a.children,n);if(r)return r}}}function Q(e){let n=new Set;for(let a of e)if(a.children&&a.children.length>0){n.add(a.value);for(let r of Q(a.children))n.add(r)}return n}function oe(e,n){if(!n)return e;let a=n.toLowerCase().trim();if(!a)return e;let r=e.toLowerCase().indexOf(a);return r===-1?e:_jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment,{children:[e.slice(0,r),_jsxruntime.jsx.call(void 0, "span",{className:"font-semibold underline",children:e.slice(r,r+a.length)}),e.slice(r+a.length)]})}function W({node:e,depth:n,multiple:a,selectedSet:r,expandedValues:l,focusedValue:f,onToggleExpand:h,onSelect:g,onFocus:w,searchTerm:S}){let V=e.children&&e.children.length>0,y=l.has(e.value),v=a?$(e,r):r.has(e.value)?"checked":"unchecked",A=n*20;return _jsxruntime.jsxs.call(void 0, "div",{role:"treeitem","aria-expanded":V?y:void 0,"aria-selected":v==="checked",children:[_jsxruntime.jsxs.call(void 0, "div",{className:_chunkFUYXCJOQjs.a.call(void 0, "relative flex items-center gap-2 rounded-sm px-2 py-1.5 my-0.5 text-sm cursor-pointer select-none outline-none active:opacity-50","hover:bg-muted",v==="checked"&&!a&&"bg-muted"),style:{paddingLeft:`${8+A}px`},onClick:()=>g(e),onFocus:()=>w(e.value),"data-tree-value":e.value,tabIndex:f===e.value?0:-1,children:[V?_jsxruntime.jsx.call(void 0, "button",{type:"button",className:"h-4 w-4 shrink-0 flex items-center justify-center rounded-sm hover:bg-secondary active:opacity-50",onClick:m=>{m.stopPropagation(),h(e.value)},"aria-label":y?`Collapse ${e.label}`:`Expand ${e.label}`,tabIndex:-1,children:y?_jsxruntime.jsx.call(void 0, _lucidereact.ChevronDown,{className:"h-3.5 w-3.5"}):_jsxruntime.jsx.call(void 0, _lucidereact.ChevronRight,{className:"h-3.5 w-3.5"})}):_jsxruntime.jsx.call(void 0, "span",{className:"h-4 w-4 shrink-0"}),a?_jsxruntime.jsx.call(void 0, _chunkWYRD4UAKjs.a,{checked:v==="checked"?!0:v==="indeterminate"?"indeterminate":!1,onCheckedChange:()=>g(e),onClick:m=>m.stopPropagation(),className:"shrink-0","aria-label":e.label}):_jsxruntime.jsx.call(void 0, _lucidereact.Check,{className:_chunkFUYXCJOQjs.a.call(void 0, "h-4 w-4 shrink-0",v==="checked"?"opacity-100":"opacity-0")}),_jsxruntime.jsx.call(void 0, "span",{className:"truncate",children:oe(e.label,S)})]}),V&&y&&_jsxruntime.jsx.call(void 0, "div",{role:"group",children:e.children.map(m=>_jsxruntime.jsx.call(void 0, W,{node:m,depth:n+1,multiple:a,selectedSet:r,expandedValues:l,focusedValue:f,onToggleExpand:h,onSelect:g,onFocus:w,searchTerm:S},m.value))})]})}function ge({nodes:e,value:n,onValueChange:a,multiple:r=!1,values:l=[],onValuesChange:f,placeholder:h="Select...",searchPlaceholder:g="Search...",emptyMessage:w="No results found.",disabled:S=!1,className:V,error:y=!1,defaultExpandedValues:v,expandAll:A=!1}){let[m,B]=i.useState(!1),[b,K]=i.useState(""),[p,k]=i.useState(null),[D,L]=i.useState(()=>A?Q(e):v?new Set(v):new Set),P=i.useRef(null),I=i.useRef(null),C=i.useMemo(()=>new Set(r?l:n?[n]:[]),[r,l,n]),F=i.useMemo(()=>b?J(e,b):e,[e,b]);i.useEffect(()=>{if(b){P.current||(P.current=new Set(D));let t=le(e,b);L(t)}else P.current&&(L(P.current),P.current=null)},[b,e]);let Y=i.useCallback(t=>{B(t),t||(K(""),k(null))},[]),T=i.useCallback(t=>{L(s=>{let d=new Set(s);return d.has(t)?d.delete(t):d.add(t),d})},[]),H=i.useCallback(t=>{if(r){let s=M(t),d=$(t,C),c;if(d==="checked"){let u=new Set(s);c=l.filter(R=>!u.has(R))}else{let u=s.filter(R=>!C.has(R));c=[...l,...u]}_optionalChain([f, 'optionalCall', _2 => _2(c)])}else{if(t.children&&t.children.length>0){T(t.value);return}let d=t.value===n?"":t.value;_optionalChain([a, 'optionalCall', _3 => _3(d)]),B(!1)}},[r,l,n,C,f,a,T]),Z=i.useCallback((t,s)=>{s.preventDefault(),s.stopPropagation();let d=N(e,t);if(d){let c=new Set(M(d)),u=l.filter(R=>!c.has(R));_optionalChain([f, 'optionalCall', _4 => _4(u)])}},[e,l,f]),q=i.useMemo(()=>{if(!r)return[];let t=[];function s(d){for(let c of d){let u=$(c,C);u==="checked"?t.push(c.value):u==="indeterminate"&&c.children&&s(c.children)}}return s(e),t},[e,C,r]),O=i.useCallback(()=>I.current?Array.from(I.current.querySelectorAll("[data-tree-value]")):[],[]),_=i.useCallback(t=>{let s=O(),d=s.findIndex(c=>c.dataset.treeValue===p);switch(t.key){case"ArrowDown":{t.preventDefault();let c=Math.min(d+1,s.length-1),u=_optionalChain([s, 'access', _5 => _5[c], 'optionalAccess', _6 => _6.dataset, 'access', _7 => _7.treeValue]);u&&(k(u),_optionalChain([s, 'access', _8 => _8[c], 'optionalAccess', _9 => _9.focus, 'call', _10 => _10()]));break}case"ArrowUp":{t.preventDefault();let c=Math.max(d-1,0),u=_optionalChain([s, 'access', _11 => _11[c], 'optionalAccess', _12 => _12.dataset, 'access', _13 => _13.treeValue]);u&&(k(u),_optionalChain([s, 'access', _14 => _14[c], 'optionalAccess', _15 => _15.focus, 'call', _16 => _16()]));break}case"ArrowRight":{if(t.preventDefault(),p){let c=N(e,p);if(_optionalChain([c, 'optionalAccess', _17 => _17.children, 'optionalAccess', _18 => _18.length]))if(!D.has(p))T(p);else{let u=c.children[0].value;k(u),requestAnimationFrame(()=>{_optionalChain([O, 'call', _19 => _19(), 'access', _20 => _20.find, 'call', _21 => _21(re=>re.dataset.treeValue===u), 'optionalAccess', _22 => _22.focus, 'call', _23 => _23()])})}}break}case"ArrowLeft":{t.preventDefault(),p&&D.has(p)&&T(p);break}case"Enter":case" ":{if(t.preventDefault(),p){let c=N(e,p);c&&H(c)}break}case"Home":{t.preventDefault();let c=_optionalChain([s, 'access', _24 => _24[0], 'optionalAccess', _25 => _25.dataset, 'access', _26 => _26.treeValue]);c&&(k(c),_optionalChain([s, 'access', _27 => _27[0], 'optionalAccess', _28 => _28.focus, 'call', _29 => _29()]));break}case"End":{t.preventDefault();let c=_optionalChain([s, 'access', _30 => _30[s.length-1], 'optionalAccess', _31 => _31.dataset, 'access', _32 => _32.treeValue]);c&&(k(c),_optionalChain([s, 'access', _33 => _33[s.length-1], 'optionalAccess', _34 => _34.focus, 'call', _35 => _35()]));break}}},[p,e,D,O,T,H]),ee=()=>r?l.length===0?h:l.length===1?_nullishCoalesce(_optionalChain([N, 'call', _36 => _36(e,l[0]), 'optionalAccess', _37 => _37.label]), () => (l[0])):`${l.length} selected`:n?_nullishCoalesce(_optionalChain([N, 'call', _38 => _38(e,n), 'optionalAccess', _39 => _39.label]), () => (n)):h,te=()=>{if(!r||q.length===0)return null;let t=q.map(s=>N(e,s)).filter(Boolean);return _jsxruntime.jsx.call(void 0, "div",{className:"max-h-[100px] overflow-y-auto px-2 py-1.5 border-b border-border",children:_jsxruntime.jsx.call(void 0, "div",{className:"flex flex-wrap gap-1",children:t.map(s=>_jsxruntime.jsxs.call(void 0, "div",{className:"inline-flex items-center gap-1 rounded-md bg-secondary px-2 py-0.5 text-xs",children:[_jsxruntime.jsx.call(void 0, "span",{className:"truncate max-w-[120px]",children:s.label}),_jsxruntime.jsx.call(void 0, _lucidereact.X,{className:"h-3 w-3 cursor-pointer shrink-0",onClick:d=>Z(s.value,d),"aria-label":`Remove ${s.label}`})]},s.value))})})};return _jsxruntime.jsxs.call(void 0, _chunkULIOO55Ijs.a,{open:m,onOpenChange:Y,children:[_jsxruntime.jsx.call(void 0, _chunkULIOO55Ijs.b,{asChild:!0,children:_jsxruntime.jsxs.call(void 0, "button",{type:"button",role:"combobox","aria-expanded":m,"aria-haspopup":"tree",disabled:S,className:_chunkFUYXCJOQjs.a.call(void 0, "cursor-pointer flex my-2 h-9 w-full items-center justify-between rounded-3xl border border-border bg-background hover:bg-secondary px-4 py-2 text-sm text-primary-accent ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 active:opacity-50 disabled:cursor-not-allowed disabled:opacity-50",!n&&!l.length&&"text-secondary-text",y&&"border-destructive-foreground focus-visible:ring-destructive-foreground",V),children:[_jsxruntime.jsx.call(void 0, "span",{className:"truncate",children:ee()}),_jsxruntime.jsx.call(void 0, _lucidereact.ChevronDown,{className:"ml-2 h-4 w-4 shrink-0 opacity-50"})]})}),_jsxruntime.jsxs.call(void 0, _chunkULIOO55Ijs.c,{className:"p-0",align:"start",style:{width:"var(--radix-popover-trigger-width)"},children:[_jsxruntime.jsxs.call(void 0, "div",{className:"flex items-center border-b px-3",children:[_jsxruntime.jsx.call(void 0, _lucidereact.Search,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),_jsxruntime.jsx.call(void 0, "input",{value:b,onChange:t=>K(t.target.value),placeholder:g,className:"flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50","aria-label":"Search tree"})]}),te(),_jsxruntime.jsx.call(void 0, "div",{className:"max-h-[300px] overflow-y-auto",children:F&&F.length>0?_jsxruntime.jsx.call(void 0, "div",{ref:I,role:"tree","aria-label":"Options",className:"p-1",onKeyDown:_,children:F.map(t=>_jsxruntime.jsx.call(void 0, W,{node:t,depth:0,multiple:r,selectedSet:C,expandedValues:D,focusedValue:p,onToggleExpand:T,onSelect:H,onFocus:k,searchTerm:b},t.value))}):_jsxruntime.jsx.call(void 0, "div",{className:"py-6 text-center text-sm text-muted-foreground",children:w})})]})]})}exports.a = ge;
3
+ //# sourceMappingURL=chunk-LQMOWEA7.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["/Users/aktoriukas/Documents/Projects/alkimi/alkimi-ui-kit/dist/chunk-LQMOWEA7.js","../src/components/tree-select.tsx"],"names":["getAllDescendantValues","node","values","child","getCheckState","selectedSet","descendants","selectedCount","v","filterTree","nodes","searchTerm","term","result","labelMatches","filteredChildren","getValuesOfMatchingNodes","walk","nodeList","hasMatch","childHasMatch","findNodeByValue","value","found","collectAllBranchValues","renderHighlightedLabel","label","index","jsxs","Fragment","jsx","TreeNodeItem","depth","multiple","expandedValues","focusedValue","onToggleExpand","onSelect","onFocus","hasChildren","isExpanded","checkState","indentPx","cn"],"mappings":"AAAA,+8BAAY;AACZ,sDAAuC,sDAAsD,s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,8BAAAA,KAAC,CAAA,CACC,SAAA,CAAWe,gCAAAA,kIACT,CACA,gBAAA,CACAF,CAAAA,GAAe,SAAA,EAAa,CAACR,CAAAA,EAAY,UAG3C,CAAA,CACA,KAAA,CAAO,CAAE,WAAA,CAAa,CAAA,EAAA","file":"/Users/aktoriukas/Documents/Projects/alkimi/alkimi-ui-kit/dist/chunk-LQMOWEA7.js","sourcesContent":[null,"\"use client\"\n\nimport * as React from \"react\"\nimport { Check, ChevronDown, ChevronRight, Search, X } from \"lucide-react\"\n\nimport { cn } from \"@/lib/utils\"\nimport { Checkbox } from \"@/components/checkbox\"\nimport { Popover, PopoverContent, PopoverTrigger } from \"@/components/popover\"\n\n// --- Public types ---\n\nexport interface TreeSelectNode {\n value: string\n label: string\n children?: TreeSelectNode[]\n}\n\nexport interface TreeSelectProps {\n nodes: TreeSelectNode[]\n value?: string\n onValueChange?: (value: string) => void\n multiple?: boolean\n values?: string[]\n onValuesChange?: (values: string[]) => void\n placeholder?: string\n searchPlaceholder?: string\n emptyMessage?: string\n disabled?: boolean\n className?: string\n error?: boolean\n defaultExpandedValues?: string[]\n expandAll?: boolean\n}\n\n// --- Internal types ---\n\ntype CheckState = \"checked\" | \"indeterminate\" | \"unchecked\"\n\n// --- Utility functions ---\n\nfunction getAllDescendantValues(node: TreeSelectNode): string[] {\n const values: string[] = [node.value]\n if (node.children) {\n for (const child of node.children) {\n values.push(...getAllDescendantValues(child))\n }\n }\n return values\n}\n\nfunction getCheckState(\n node: TreeSelectNode,\n selectedSet: Set<string>\n): CheckState {\n if (!node.children || node.children.length === 0) {\n return selectedSet.has(node.value) ? \"checked\" : \"unchecked\"\n }\n\n const descendants = getAllDescendantValues(node)\n const selectedCount = descendants.filter((v) => selectedSet.has(v)).length\n\n if (selectedCount === 0) return \"unchecked\"\n if (selectedCount === descendants.length) return \"checked\"\n return \"indeterminate\"\n}\n\nfunction filterTree(\n nodes: TreeSelectNode[],\n searchTerm: string\n): TreeSelectNode[] | null {\n const term = searchTerm.toLowerCase().trim()\n if (!term) return nodes\n\n const result: TreeSelectNode[] = []\n\n for (const node of nodes) {\n const labelMatches = node.label.toLowerCase().includes(term)\n\n if (node.children && node.children.length > 0) {\n const filteredChildren = filterTree(node.children, searchTerm)\n\n if (labelMatches) {\n result.push(node)\n } else if (filteredChildren && filteredChildren.length > 0) {\n result.push({ ...node, children: filteredChildren })\n }\n } else if (labelMatches) {\n result.push(node)\n }\n }\n\n return result.length > 0 ? result : null\n}\n\nfunction getValuesOfMatchingNodes(\n nodes: TreeSelectNode[],\n searchTerm: string\n): Set<string> {\n const term = searchTerm.toLowerCase().trim()\n const result = new Set<string>()\n\n function walk(nodeList: TreeSelectNode[]): boolean {\n let hasMatch = false\n for (const node of nodeList) {\n const labelMatches = node.label.toLowerCase().includes(term)\n let childHasMatch = false\n\n if (node.children) {\n childHasMatch = walk(node.children)\n }\n\n if (labelMatches || childHasMatch) {\n result.add(node.value)\n hasMatch = true\n }\n }\n return hasMatch\n }\n\n walk(nodes)\n return result\n}\n\nfunction findNodeByValue(\n nodes: TreeSelectNode[],\n value: string\n): TreeSelectNode | undefined {\n for (const node of nodes) {\n if (node.value === value) return node\n if (node.children) {\n const found = findNodeByValue(node.children, value)\n if (found) return found\n }\n }\n return undefined\n}\n\nfunction collectAllBranchValues(nodes: TreeSelectNode[]): Set<string> {\n const result = new Set<string>()\n for (const node of nodes) {\n if (node.children && node.children.length > 0) {\n result.add(node.value)\n for (const v of collectAllBranchValues(node.children)) {\n result.add(v)\n }\n }\n }\n return result\n}\n\nfunction renderHighlightedLabel(\n label: string,\n searchTerm: string\n): React.ReactNode {\n if (!searchTerm) return label\n\n const term = searchTerm.toLowerCase().trim()\n if (!term) return label\n\n const index = label.toLowerCase().indexOf(term)\n if (index === -1) return label\n\n return (\n <>\n {label.slice(0, index)}\n <span className=\"font-semibold underline\">\n {label.slice(index, index + term.length)}\n </span>\n {label.slice(index + term.length)}\n </>\n )\n}\n\n// --- TreeNodeItem (internal) ---\n\ninterface TreeNodeItemProps {\n node: TreeSelectNode\n depth: number\n multiple: boolean\n selectedSet: Set<string>\n expandedValues: Set<string>\n focusedValue: string | null\n onToggleExpand: (value: string) => void\n onSelect: (node: TreeSelectNode) => void\n onFocus: (value: string) => void\n searchTerm: string\n}\n\nfunction TreeNodeItem({\n node,\n depth,\n multiple,\n selectedSet,\n expandedValues,\n focusedValue,\n onToggleExpand,\n onSelect,\n onFocus,\n searchTerm,\n}: TreeNodeItemProps) {\n const hasChildren = node.children && node.children.length > 0\n const isExpanded = expandedValues.has(node.value)\n const checkState = multiple\n ? getCheckState(node, selectedSet)\n : selectedSet.has(node.value)\n ? \"checked\"\n : \"unchecked\"\n\n const indentPx = depth * 20\n\n return (\n <div\n role=\"treeitem\"\n aria-expanded={hasChildren ? isExpanded : undefined}\n aria-selected={checkState === \"checked\"}\n >\n <div\n className={cn(\n \"relative flex items-center gap-2 rounded-sm px-2 py-1.5 my-0.5 text-sm cursor-pointer select-none outline-none active:opacity-50\",\n \"hover:bg-muted\",\n checkState === \"checked\" && !multiple && \"bg-muted\"\n // This adds a focus ring when the node is focused, but it's not needed for the tree-select component.\n // focusedValue === node.value && \"z-10 ring-2 ring-ring\"\n )}\n style={{ paddingLeft: `${8 + indentPx}px` }}\n onClick={() => onSelect(node)}\n onFocus={() => onFocus(node.value)}\n data-tree-value={node.value}\n tabIndex={focusedValue === node.value ? 0 : -1}\n >\n {hasChildren ? (\n <button\n type=\"button\"\n className=\"h-4 w-4 shrink-0 flex items-center justify-center rounded-sm hover:bg-secondary active:opacity-50\"\n onClick={(e) => {\n e.stopPropagation()\n onToggleExpand(node.value)\n }}\n aria-label={\n isExpanded ? `Collapse ${node.label}` : `Expand ${node.label}`\n }\n tabIndex={-1}\n >\n {isExpanded ? (\n <ChevronDown className=\"h-3.5 w-3.5\" />\n ) : (\n <ChevronRight className=\"h-3.5 w-3.5\" />\n )}\n </button>\n ) : (\n <span className=\"h-4 w-4 shrink-0\" />\n )}\n\n {multiple ? (\n <Checkbox\n checked={\n checkState === \"checked\"\n ? true\n : checkState === \"indeterminate\"\n ? \"indeterminate\"\n : false\n }\n onCheckedChange={() => onSelect(node)}\n onClick={(e) => e.stopPropagation()}\n className=\"shrink-0\"\n aria-label={node.label}\n />\n ) : (\n <Check\n className={cn(\n \"h-4 w-4 shrink-0\",\n checkState === \"checked\" ? \"opacity-100\" : \"opacity-0\"\n )}\n />\n )}\n\n <span className=\"truncate\">\n {renderHighlightedLabel(node.label, searchTerm)}\n </span>\n </div>\n\n {hasChildren && isExpanded && (\n <div role=\"group\">\n {node.children!.map((child) => (\n <TreeNodeItem\n key={child.value}\n node={child}\n depth={depth + 1}\n multiple={multiple}\n selectedSet={selectedSet}\n expandedValues={expandedValues}\n focusedValue={focusedValue}\n onToggleExpand={onToggleExpand}\n onSelect={onSelect}\n onFocus={onFocus}\n searchTerm={searchTerm}\n />\n ))}\n </div>\n )}\n </div>\n )\n}\n\n// --- TreeSelect (main component) ---\n\nexport function TreeSelect({\n nodes,\n value,\n onValueChange,\n multiple = false,\n values = [],\n onValuesChange,\n placeholder = \"Select...\",\n searchPlaceholder = \"Search...\",\n emptyMessage = \"No results found.\",\n disabled = false,\n className,\n error = false,\n defaultExpandedValues,\n expandAll = false,\n}: TreeSelectProps) {\n const [open, setOpen] = React.useState(false)\n const [searchTerm, setSearchTerm] = React.useState(\"\")\n const [focusedValue, setFocusedValue] = React.useState<string | null>(null)\n const [expandedValues, setExpandedValues] = React.useState<Set<string>>(\n () => {\n if (expandAll) return collectAllBranchValues(nodes)\n if (defaultExpandedValues) return new Set(defaultExpandedValues)\n return new Set<string>()\n }\n )\n\n const preSearchExpandedRef = React.useRef<Set<string> | null>(null)\n const treeRef = React.useRef<HTMLDivElement>(null)\n\n const selectedSet = React.useMemo(\n () => new Set(multiple ? values : value ? [value] : []),\n [multiple, values, value]\n )\n\n const filteredNodes = React.useMemo(\n () => (searchTerm ? filterTree(nodes, searchTerm) : nodes),\n [nodes, searchTerm]\n )\n\n // Auto-expand matching ancestors during search\n React.useEffect(() => {\n if (searchTerm) {\n if (!preSearchExpandedRef.current) {\n preSearchExpandedRef.current = new Set(expandedValues)\n }\n const matchingAncestors = getValuesOfMatchingNodes(nodes, searchTerm)\n setExpandedValues(matchingAncestors)\n } else if (preSearchExpandedRef.current) {\n setExpandedValues(preSearchExpandedRef.current)\n preSearchExpandedRef.current = null\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [searchTerm, nodes])\n\n const handleOpenChange = React.useCallback((isOpen: boolean) => {\n setOpen(isOpen)\n if (!isOpen) {\n setSearchTerm(\"\")\n setFocusedValue(null)\n }\n }, [])\n\n const handleToggleExpand = React.useCallback((nodeValue: string) => {\n setExpandedValues((prev) => {\n const next = new Set(prev)\n if (next.has(nodeValue)) {\n next.delete(nodeValue)\n } else {\n next.add(nodeValue)\n }\n return next\n })\n }, [])\n\n const handleSelect = React.useCallback(\n (node: TreeSelectNode) => {\n if (multiple) {\n const allDescendants = getAllDescendantValues(node)\n const currentState = getCheckState(node, selectedSet)\n\n let newValues: string[]\n if (currentState === \"checked\") {\n const toRemove = new Set(allDescendants)\n newValues = values.filter((v) => !toRemove.has(v))\n } else {\n const toAdd = allDescendants.filter((v) => !selectedSet.has(v))\n newValues = [...values, ...toAdd]\n }\n onValuesChange?.(newValues)\n } else {\n // Single-select: clicking a parent toggles expand instead of selecting\n const hasChildren = node.children && node.children.length > 0\n if (hasChildren) {\n handleToggleExpand(node.value)\n return\n }\n const newValue = node.value === value ? \"\" : node.value\n onValueChange?.(newValue)\n setOpen(false)\n }\n },\n [\n multiple,\n values,\n value,\n selectedSet,\n onValuesChange,\n onValueChange,\n handleToggleExpand,\n ]\n )\n\n const handleRemoveChip = React.useCallback(\n (chipValue: string, e: React.MouseEvent) => {\n e.preventDefault()\n e.stopPropagation()\n const node = findNodeByValue(nodes, chipValue)\n if (node) {\n const toRemove = new Set(getAllDescendantValues(node))\n const newValues = values.filter((v) => !toRemove.has(v))\n onValuesChange?.(newValues)\n }\n },\n [nodes, values, onValuesChange]\n )\n\n // Smart chips: minimal set representing the selection\n const chipValues = React.useMemo(() => {\n if (!multiple) return []\n\n const chips: string[] = []\n\n function walk(nodeList: TreeSelectNode[]) {\n for (const node of nodeList) {\n const state = getCheckState(node, selectedSet)\n if (state === \"checked\") {\n chips.push(node.value)\n } else if (state === \"indeterminate\" && node.children) {\n walk(node.children)\n }\n }\n }\n\n walk(nodes)\n return chips\n }, [nodes, selectedSet, multiple])\n\n // Keyboard navigation\n const getVisibleNodes = React.useCallback((): HTMLElement[] => {\n if (!treeRef.current) return []\n return Array.from(treeRef.current.querySelectorAll(\"[data-tree-value]\"))\n }, [])\n\n const handleTreeKeyDown = React.useCallback(\n (e: React.KeyboardEvent) => {\n const visibleNodes = getVisibleNodes()\n const currentIndex = visibleNodes.findIndex(\n (el) => el.dataset.treeValue === focusedValue\n )\n\n switch (e.key) {\n case \"ArrowDown\": {\n e.preventDefault()\n const nextIndex = Math.min(currentIndex + 1, visibleNodes.length - 1)\n const nextValue = visibleNodes[nextIndex]?.dataset.treeValue\n if (nextValue) {\n setFocusedValue(nextValue)\n visibleNodes[nextIndex]?.focus()\n }\n break\n }\n case \"ArrowUp\": {\n e.preventDefault()\n const prevIndex = Math.max(currentIndex - 1, 0)\n const prevValue = visibleNodes[prevIndex]?.dataset.treeValue\n if (prevValue) {\n setFocusedValue(prevValue)\n visibleNodes[prevIndex]?.focus()\n }\n break\n }\n case \"ArrowRight\": {\n e.preventDefault()\n if (focusedValue) {\n const node = findNodeByValue(nodes, focusedValue)\n if (node?.children?.length) {\n if (!expandedValues.has(focusedValue)) {\n handleToggleExpand(focusedValue)\n } else {\n const firstChildValue = node.children[0].value\n setFocusedValue(firstChildValue)\n requestAnimationFrame(() => {\n const els = getVisibleNodes()\n const el = els.find(\n (n) => n.dataset.treeValue === firstChildValue\n )\n el?.focus()\n })\n }\n }\n }\n break\n }\n case \"ArrowLeft\": {\n e.preventDefault()\n if (focusedValue && expandedValues.has(focusedValue)) {\n handleToggleExpand(focusedValue)\n }\n break\n }\n case \"Enter\":\n case \" \": {\n e.preventDefault()\n if (focusedValue) {\n const node = findNodeByValue(nodes, focusedValue)\n if (node) handleSelect(node)\n }\n break\n }\n case \"Home\": {\n e.preventDefault()\n const firstValue = visibleNodes[0]?.dataset.treeValue\n if (firstValue) {\n setFocusedValue(firstValue)\n visibleNodes[0]?.focus()\n }\n break\n }\n case \"End\": {\n e.preventDefault()\n const lastValue =\n visibleNodes[visibleNodes.length - 1]?.dataset.treeValue\n if (lastValue) {\n setFocusedValue(lastValue)\n visibleNodes[visibleNodes.length - 1]?.focus()\n }\n break\n }\n }\n },\n [\n focusedValue,\n nodes,\n expandedValues,\n getVisibleNodes,\n handleToggleExpand,\n handleSelect,\n ]\n )\n\n const getDisplayText = () => {\n if (multiple) {\n if (values.length === 0) return placeholder\n if (values.length === 1) {\n const node = findNodeByValue(nodes, values[0])\n return node?.label ?? values[0]\n }\n return `${values.length} selected`\n }\n if (value) {\n const node = findNodeByValue(nodes, value)\n return node?.label ?? value\n }\n return placeholder\n }\n\n const renderSelectedChips = () => {\n if (!multiple || chipValues.length === 0) return null\n\n const chipNodes = chipValues\n .map((v) => findNodeByValue(nodes, v))\n .filter(Boolean) as TreeSelectNode[]\n\n return (\n <div className=\"max-h-[100px] overflow-y-auto px-2 py-1.5 border-b border-border\">\n <div className=\"flex flex-wrap gap-1\">\n {chipNodes.map((node) => (\n <div\n key={node.value}\n className=\"inline-flex items-center gap-1 rounded-md bg-secondary px-2 py-0.5 text-xs\"\n >\n <span className=\"truncate max-w-[120px]\">{node.label}</span>\n <X\n className=\"h-3 w-3 cursor-pointer shrink-0\"\n onClick={(e) => handleRemoveChip(node.value, e)}\n aria-label={`Remove ${node.label}`}\n />\n </div>\n ))}\n </div>\n </div>\n )\n }\n\n return (\n <Popover open={open} onOpenChange={handleOpenChange}>\n <PopoverTrigger asChild>\n <button\n type=\"button\"\n role=\"combobox\"\n aria-expanded={open}\n aria-haspopup=\"tree\"\n disabled={disabled}\n className={cn(\n \"cursor-pointer flex my-2 h-9 w-full items-center justify-between rounded-3xl border border-border bg-background hover:bg-secondary px-4 py-2 text-sm text-primary-accent ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 active:opacity-50 disabled:cursor-not-allowed disabled:opacity-50\",\n !value && !values.length && \"text-secondary-text\",\n error &&\n \"border-destructive-foreground focus-visible:ring-destructive-foreground\",\n className\n )}\n >\n <span className=\"truncate\">{getDisplayText()}</span>\n <ChevronDown className=\"ml-2 h-4 w-4 shrink-0 opacity-50\" />\n </button>\n </PopoverTrigger>\n <PopoverContent\n className=\"p-0\"\n align=\"start\"\n style={{ width: \"var(--radix-popover-trigger-width)\" }}\n >\n <div className=\"flex items-center border-b px-3\">\n <Search className=\"mr-2 h-4 w-4 shrink-0 opacity-50\" />\n <input\n value={searchTerm}\n onChange={(e) => setSearchTerm(e.target.value)}\n placeholder={searchPlaceholder}\n className=\"flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50\"\n aria-label=\"Search tree\"\n />\n </div>\n\n {renderSelectedChips()}\n\n <div className=\"max-h-[300px] overflow-y-auto\">\n {filteredNodes && filteredNodes.length > 0 ? (\n <div\n ref={treeRef}\n role=\"tree\"\n aria-label=\"Options\"\n className=\"p-1\"\n onKeyDown={handleTreeKeyDown}\n >\n {filteredNodes.map((node) => (\n <TreeNodeItem\n key={node.value}\n node={node}\n depth={0}\n multiple={multiple}\n selectedSet={selectedSet}\n expandedValues={expandedValues}\n focusedValue={focusedValue}\n onToggleExpand={handleToggleExpand}\n onSelect={handleSelect}\n onFocus={setFocusedValue}\n searchTerm={searchTerm}\n />\n ))}\n </div>\n ) : (\n <div className=\"py-6 text-center text-sm text-muted-foreground\">\n {emptyMessage}\n </div>\n )}\n </div>\n </PopoverContent>\n </Popover>\n )\n}\n"]}
@@ -1,3 +1,3 @@
1
1
  "use client";
2
- import{a as e}from"./chunk-AJM7GGVC.mjs";import*as r from"react";import{jsx as n}from"react/jsx-runtime";var s=r.forwardRef(({className:o,error:t,...a},i)=>n("textarea",{className:e("flex my-2 min-h-[74px] w-full rounded-3xl border bg-background hover:bg-secondary px-4 py-2 text-sm text-primary-accent ring-offset-background placeholder:text-secondary-text focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",t?"border-destructive-foreground focus-visible:ring-destructive-foreground":"border-border",o),ref:i,...a}));s.displayName="Textarea";export{s as a};
3
- //# sourceMappingURL=chunk-2R3FRGV4.mjs.map
2
+ import{a as e}from"./chunk-S5TKCF6T.mjs";import*as r from"react";import{jsx as n}from"react/jsx-runtime";var s=r.forwardRef(({className:o,error:t,...a},i)=>n("textarea",{className:e("flex my-2 min-h-[74px] w-full rounded-3xl border bg-background hover:bg-secondary px-4 py-2 text-sm text-primary-accent ring-offset-background placeholder:text-secondary-text focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",t?"border-destructive-foreground focus-visible:ring-destructive-foreground":"border-border",o),ref:i,...a}));s.displayName="Textarea";export{s as a};
3
+ //# sourceMappingURL=chunk-MQMO7DMT.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/components/textarea.tsx"],"sourcesContent":["import * as React from \"react\"\n\nimport { cn } from \"@/lib/utils\"\n\nexport interface TextareaProps extends React.TextareaHTMLAttributes<HTMLTextAreaElement> {\n error?: boolean\n}\n\nconst Textarea = React.forwardRef<HTMLTextAreaElement, TextareaProps>(\n ({ className, error, ...props }, ref) => {\n return (\n <textarea\n className={cn(\n \"flex my-2 min-h-[74px] w-full rounded-3xl border bg-background hover:bg-secondary px-4 py-2 text-sm text-primary-accent ring-offset-background placeholder:text-secondary-text focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50\",\n error\n ? \"border-destructive-foreground focus-visible:ring-destructive-foreground\"\n : \"border-border\",\n className\n )}\n ref={ref}\n {...props}\n />\n )\n }\n)\nTextarea.displayName = \"Textarea\"\n\nexport { Textarea }\n"],"mappings":";yCAAA,UAAYA,MAAW,QAWjB,cAAAC,MAAA,oBAHN,IAAMC,EAAiB,aACrB,CAAC,CAAE,UAAAC,EAAW,MAAAC,EAAO,GAAGC,CAAM,EAAGC,IAE7BL,EAAC,YACC,UAAWM,EACT,qUACAH,EACI,0EACA,gBACJD,CACF,EACA,IAAKG,EACJ,GAAGD,EACN,CAGN,EACAH,EAAS,YAAc","names":["React","jsx","Textarea","className","error","props","ref","cn"]}
@@ -1,3 +1,3 @@
1
1
  "use client";
2
- import{a as e}from"./chunk-AJM7GGVC.mjs";import*as r from"react";import{jsx as l}from"react/jsx-runtime";var d=r.forwardRef(({className:t,type:o,error:n,...i},s)=>l("input",{type:o,className:e("flex my-2 h-9 w-full rounded-3xl border bg-background hover:bg-secondary px-4 py-2 text-sm text-primary-accent ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-secondary-text focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",n?"border-destructive-foreground focus-visible:ring-destructive-foreground":"border-border",t),ref:s,...i}));d.displayName="Input";export{d as a};
3
- //# sourceMappingURL=chunk-VSRWPJJB.mjs.map
2
+ import{a as e}from"./chunk-S5TKCF6T.mjs";import*as r from"react";import{jsx as l}from"react/jsx-runtime";var d=r.forwardRef(({className:t,type:o,error:n,...i},s)=>l("input",{type:o,className:e("flex my-2 h-9 w-full rounded-3xl border bg-background hover:bg-secondary px-4 py-2 text-sm text-primary-accent ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-secondary-text focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",n?"border-destructive-foreground focus-visible:ring-destructive-foreground":"border-border",t),ref:s,...i}));d.displayName="Input";export{d as a};
3
+ //# sourceMappingURL=chunk-NEOUFWZN.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/components/input.tsx"],"sourcesContent":["import * as React from \"react\"\n\nimport { cn } from \"@/lib/utils\"\n\nexport interface InputProps extends React.InputHTMLAttributes<HTMLInputElement> {\n error?: boolean\n}\n\nconst Input = React.forwardRef<HTMLInputElement, InputProps>(\n ({ className, type, error, ...props }, ref) => {\n return (\n <input\n type={type}\n className={cn(\n \"flex my-2 h-9 w-full rounded-3xl border bg-background hover:bg-secondary px-4 py-2 text-sm text-primary-accent ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-secondary-text focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50\",\n error\n ? \"border-destructive-foreground focus-visible:ring-destructive-foreground\"\n : \"border-border\",\n className\n )}\n ref={ref}\n {...props}\n />\n )\n }\n)\nInput.displayName = \"Input\"\n\nexport { Input }\n"],"mappings":";yCAAA,UAAYA,MAAW,QAWjB,cAAAC,MAAA,oBAHN,IAAMC,EAAc,aAClB,CAAC,CAAE,UAAAC,EAAW,KAAAC,EAAM,MAAAC,EAAO,GAAGC,CAAM,EAAGC,IAEnCN,EAAC,SACC,KAAMG,EACN,UAAWI,EACT,4XACAH,EACI,0EACA,gBACJF,CACF,EACA,IAAKI,EACJ,GAAGD,EACN,CAGN,EACAJ,EAAM,YAAc","names":["React","jsx","Input","className","type","error","props","ref","cn"]}
@@ -1,3 +1,3 @@
1
1
  "use client";
2
- import{a as t}from"./chunk-AJM7GGVC.mjs";import*as o from"react";import*as e from"@radix-ui/react-checkbox";import{Check as n,Minus as d}from"lucide-react";import{jsx as i,jsxs as m}from"react/jsx-runtime";var s=o.forwardRef(({className:a,...r},c)=>i(e.Root,{ref:c,className:t("group peer h-4 w-4 bg-background shrink-0 rounded-xs border border-accent-muted ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 active:opacity-50 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-accent data-[state=checked]:border-accent data-[state=checked]:text-primary-foreground data-[state=indeterminate]:bg-accent data-[state=indeterminate]:border-accent data-[state=indeterminate]:text-primary-foreground",a),...r,children:m(e.Indicator,{className:t("flex items-center justify-center text-current"),children:[i(n,{className:"h-4 w-4 group-data-[state=indeterminate]:hidden"}),i(d,{className:"h-4 w-4 hidden group-data-[state=indeterminate]:block"})]})}));s.displayName=e.Root.displayName;export{s as a};
3
- //# sourceMappingURL=chunk-N4LDE7DZ.mjs.map
2
+ import{a as t}from"./chunk-S5TKCF6T.mjs";import*as o from"react";import*as e from"@radix-ui/react-checkbox";import{Check as n,Minus as d}from"lucide-react";import{jsx as i,jsxs as m}from"react/jsx-runtime";var s=o.forwardRef(({className:a,...r},c)=>i(e.Root,{ref:c,className:t("group peer h-4 w-4 bg-background shrink-0 rounded-xs border border-accent-muted ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 active:opacity-50 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-accent data-[state=checked]:border-accent data-[state=checked]:text-primary-foreground data-[state=indeterminate]:bg-accent data-[state=indeterminate]:border-accent data-[state=indeterminate]:text-primary-foreground",a),...r,children:m(e.Indicator,{className:t("flex items-center justify-center text-current"),children:[i(n,{className:"h-4 w-4 group-data-[state=indeterminate]:hidden"}),i(d,{className:"h-4 w-4 hidden group-data-[state=indeterminate]:block"})]})}));s.displayName=e.Root.displayName;export{s as a};
3
+ //# sourceMappingURL=chunk-NKELJSLY.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/components/checkbox.tsx"],"sourcesContent":["\"use client\"\n\nimport * as React from \"react\"\nimport * as CheckboxPrimitive from \"@radix-ui/react-checkbox\"\nimport { Check, Minus } from \"lucide-react\"\n\nimport { cn } from \"@/lib/utils\"\n\nconst Checkbox = React.forwardRef<\n React.ElementRef<typeof CheckboxPrimitive.Root>,\n React.ComponentPropsWithoutRef<typeof CheckboxPrimitive.Root>\n>(({ className, ...props }, ref) => (\n <CheckboxPrimitive.Root\n ref={ref}\n className={cn(\n \"group peer h-4 w-4 bg-background shrink-0 rounded-xs border border-accent-muted ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 active:opacity-50 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-accent data-[state=checked]:border-accent data-[state=checked]:text-primary-foreground data-[state=indeterminate]:bg-accent data-[state=indeterminate]:border-accent data-[state=indeterminate]:text-primary-foreground\",\n className\n )}\n {...props}\n >\n <CheckboxPrimitive.Indicator\n className={cn(\"flex items-center justify-center text-current\")}\n >\n <Check className=\"h-4 w-4 group-data-[state=indeterminate]:hidden\" />\n <Minus className=\"h-4 w-4 hidden group-data-[state=indeterminate]:block\" />\n </CheckboxPrimitive.Indicator>\n </CheckboxPrimitive.Root>\n))\nCheckbox.displayName = CheckboxPrimitive.Root.displayName\n\nexport { Checkbox }\n"],"mappings":";yCAEA,UAAYA,MAAW,QACvB,UAAYC,MAAuB,2BACnC,OAAS,SAAAC,EAAO,SAAAC,MAAa,eAgBzB,OAGE,OAAAC,EAHF,QAAAC,MAAA,oBAZJ,IAAMC,EAAiB,aAGrB,CAAC,CAAE,UAAAC,EAAW,GAAGC,CAAM,EAAGC,IAC1BL,EAAmB,OAAlB,CACC,IAAKK,EACL,UAAWC,EACT,+fACAH,CACF,EACC,GAAGC,EAEJ,SAAAH,EAAmB,YAAlB,CACC,UAAWK,EAAG,+CAA+C,EAE7D,UAAAN,EAACO,EAAA,CAAM,UAAU,kDAAkD,EACnEP,EAACQ,EAAA,CAAM,UAAU,wDAAwD,GAC3E,EACF,CACD,EACDN,EAAS,YAAgC,OAAK","names":["React","CheckboxPrimitive","Check","Minus","jsx","jsxs","Checkbox","className","props","ref","cn","Check","Minus"]}
@@ -1,3 +1,3 @@
1
1
  "use client";
2
- import{a}from"./chunk-AJM7GGVC.mjs";import*as d from"react";import*as e from"@radix-ui/react-dropdown-menu";import{Check as m,ChevronRight as u,Circle as c}from"lucide-react";import{jsx as i,jsxs as s}from"react/jsx-runtime";var g=e.Root,N=e.Trigger,x=e.Group,C=e.Portal,I=e.Sub,S=e.RadioGroup,l=d.forwardRef(({className:o,inset:t,children:n,...r},p)=>s(e.SubTrigger,{ref:p,className:a("flex cursor-default select-none items-center rounded-[12px] px-2 py-1.5 text-sm outline-none transition-colors hover:bg-secondary focus:bg-secondary active:opacity-50 data-[state=open]:bg-secondary",t&&"pl-8",o),...r,children:[n,i(u,{className:"ml-auto h-4 w-4"})]}));l.displayName=e.SubTrigger.displayName;var f=d.forwardRef(({className:o,...t},n)=>i(e.SubContent,{ref:n,className:a("z-50 min-w-32 overflow-hidden rounded-md border bg-dropdown-menu p-1 text-dropdown-menu-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",o),...t}));f.displayName=e.SubContent.displayName;var w=d.forwardRef(({className:o,sideOffset:t=4,...n},r)=>i(e.Portal,{children:i(e.Content,{ref:r,sideOffset:t,className:a("z-50 min-w-32 overflow-hidden rounded-xl border border-border bg-dropdown-menu p-1 text-dropdown-menu-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",o),...n})}));w.displayName=e.Content.displayName;var M=d.forwardRef(({className:o,inset:t,...n},r)=>i(e.Item,{ref:r,className:a("relative flex cursor-pointer select-none items-center rounded-[12px] p-2 text-sm outline-none transition-colors hover:bg-secondary focus:bg-secondary active:opacity-50 data-disabled:pointer-events-none data-disabled:opacity-50",t&&"pl-8",o),...n}));M.displayName=e.Item.displayName;var v=d.forwardRef(({className:o,children:t,checked:n,...r},p)=>s(e.CheckboxItem,{ref:p,className:a("relative flex cursor-default select-none items-center rounded-[12px] py-1.5 pl-8 pr-2 text-sm outline-none transition-colors hover:bg-secondary focus:bg-secondary active:opacity-50 data-disabled:pointer-events-none data-disabled:opacity-50",o),checked:n,...r,children:[i("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:i(e.ItemIndicator,{children:i(m,{className:"h-4 w-4"})})}),t]}));v.displayName=e.CheckboxItem.displayName;var D=d.forwardRef(({className:o,children:t,...n},r)=>s(e.RadioItem,{ref:r,className:a("relative flex cursor-default select-none items-center rounded-[12px] py-1.5 pl-8 pr-2 text-sm outline-none transition-colors hover:bg-secondary focus:bg-secondary active:opacity-50 data-disabled:pointer-events-none data-disabled:opacity-50",o),...n,children:[i("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:i(e.ItemIndicator,{children:i(c,{className:"h-2 w-2 fill-current"})})}),t]}));D.displayName=e.RadioItem.displayName;var P=d.forwardRef(({className:o,inset:t,...n},r)=>i(e.Label,{ref:r,className:a("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",o),...n}));P.displayName=e.Label.displayName;var R=d.forwardRef(({className:o,...t},n)=>i(e.Separator,{ref:n,className:a("-mx-1 my-1 h-px bg-muted",o),...t}));R.displayName=e.Separator.displayName;var b=({className:o,...t})=>i("span",{className:a("ml-auto text-xs tracking-widest opacity-60",o),...t});b.displayName="DropdownMenuShortcut";export{g as a,N as b,x as c,C as d,I as e,S as f,l as g,f as h,w as i,M as j,v as k,D as l,P as m,R as n,b as o};
3
- //# sourceMappingURL=chunk-DP2FXFMQ.mjs.map
2
+ import{a}from"./chunk-S5TKCF6T.mjs";import*as d from"react";import*as e from"@radix-ui/react-dropdown-menu";import{Check as m,ChevronRight as u,Circle as c}from"lucide-react";import{jsx as i,jsxs as s}from"react/jsx-runtime";var g=e.Root,N=e.Trigger,x=e.Group,C=e.Portal,I=e.Sub,S=e.RadioGroup,l=d.forwardRef(({className:o,inset:t,children:n,...r},p)=>s(e.SubTrigger,{ref:p,className:a("flex cursor-default select-none items-center rounded-[12px] px-2 py-1.5 text-sm outline-none transition-colors hover:bg-secondary focus:bg-secondary active:opacity-50 data-[state=open]:bg-secondary",t&&"pl-8",o),...r,children:[n,i(u,{className:"ml-auto h-4 w-4"})]}));l.displayName=e.SubTrigger.displayName;var f=d.forwardRef(({className:o,...t},n)=>i(e.SubContent,{ref:n,className:a("z-50 min-w-32 overflow-hidden rounded-md border bg-dropdown-menu p-1 text-dropdown-menu-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",o),...t}));f.displayName=e.SubContent.displayName;var w=d.forwardRef(({className:o,sideOffset:t=4,...n},r)=>i(e.Portal,{children:i(e.Content,{ref:r,sideOffset:t,className:a("z-50 min-w-32 overflow-hidden rounded-xl border border-border bg-dropdown-menu p-1 text-dropdown-menu-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",o),...n})}));w.displayName=e.Content.displayName;var M=d.forwardRef(({className:o,inset:t,...n},r)=>i(e.Item,{ref:r,className:a("relative flex cursor-pointer select-none items-center rounded-[12px] p-2 text-sm outline-none transition-colors hover:bg-secondary focus:bg-secondary active:opacity-50 data-disabled:pointer-events-none data-disabled:opacity-50",t&&"pl-8",o),...n}));M.displayName=e.Item.displayName;var v=d.forwardRef(({className:o,children:t,checked:n,...r},p)=>s(e.CheckboxItem,{ref:p,className:a("relative flex cursor-default select-none items-center rounded-[12px] py-1.5 pl-8 pr-2 text-sm outline-none transition-colors hover:bg-secondary focus:bg-secondary active:opacity-50 data-disabled:pointer-events-none data-disabled:opacity-50",o),checked:n,...r,children:[i("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:i(e.ItemIndicator,{children:i(m,{className:"h-4 w-4"})})}),t]}));v.displayName=e.CheckboxItem.displayName;var D=d.forwardRef(({className:o,children:t,...n},r)=>s(e.RadioItem,{ref:r,className:a("relative flex cursor-default select-none items-center rounded-[12px] py-1.5 pl-8 pr-2 text-sm outline-none transition-colors hover:bg-secondary focus:bg-secondary active:opacity-50 data-disabled:pointer-events-none data-disabled:opacity-50",o),...n,children:[i("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:i(e.ItemIndicator,{children:i(c,{className:"h-2 w-2 fill-current"})})}),t]}));D.displayName=e.RadioItem.displayName;var P=d.forwardRef(({className:o,inset:t,...n},r)=>i(e.Label,{ref:r,className:a("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",o),...n}));P.displayName=e.Label.displayName;var R=d.forwardRef(({className:o,...t},n)=>i(e.Separator,{ref:n,className:a("-mx-1 my-1 h-px bg-muted",o),...t}));R.displayName=e.Separator.displayName;var b=({className:o,...t})=>i("span",{className:a("ml-auto text-xs tracking-widest opacity-60",o),...t});b.displayName="DropdownMenuShortcut";export{g as a,N as b,x as c,C as d,I as e,S as f,l as g,f as h,w as i,M as j,v as k,D as l,P as m,R as n,b as o};
3
+ //# sourceMappingURL=chunk-NKLBPY3T.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/components/dropdown-menu.tsx"],"sourcesContent":["\"use client\"\n\nimport * as React from \"react\"\nimport * as DropdownMenuPrimitive from \"@radix-ui/react-dropdown-menu\"\nimport { Check, ChevronRight, Circle } from \"lucide-react\"\n\nimport { cn } from \"@/lib/utils\"\n\nconst DropdownMenu = DropdownMenuPrimitive.Root\n\nconst DropdownMenuTrigger = DropdownMenuPrimitive.Trigger\n\nconst DropdownMenuGroup = DropdownMenuPrimitive.Group\n\nconst DropdownMenuPortal = DropdownMenuPrimitive.Portal\n\nconst DropdownMenuSub = DropdownMenuPrimitive.Sub\n\nconst DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup\n\nconst DropdownMenuSubTrigger = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.SubTrigger>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.SubTrigger> & {\n inset?: boolean\n }\n>(({ className, inset, children, ...props }, ref) => (\n <DropdownMenuPrimitive.SubTrigger\n ref={ref}\n className={cn(\n \"flex cursor-default select-none items-center rounded-[12px] px-2 py-1.5 text-sm outline-none transition-colors hover:bg-secondary focus:bg-secondary active:opacity-50 data-[state=open]:bg-secondary\",\n inset && \"pl-8\",\n className\n )}\n {...props}\n >\n {children}\n <ChevronRight className=\"ml-auto h-4 w-4\" />\n </DropdownMenuPrimitive.SubTrigger>\n))\nDropdownMenuSubTrigger.displayName =\n DropdownMenuPrimitive.SubTrigger.displayName\n\nconst DropdownMenuSubContent = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.SubContent>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.SubContent>\n>(({ className, ...props }, ref) => (\n <DropdownMenuPrimitive.SubContent\n ref={ref}\n className={cn(\n \"z-50 min-w-32 overflow-hidden rounded-md border bg-dropdown-menu p-1 text-dropdown-menu-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2\",\n className\n )}\n {...props}\n />\n))\nDropdownMenuSubContent.displayName =\n DropdownMenuPrimitive.SubContent.displayName\n\nconst DropdownMenuContent = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Content>\n>(({ className, sideOffset = 4, ...props }, ref) => (\n <DropdownMenuPrimitive.Portal>\n <DropdownMenuPrimitive.Content\n ref={ref}\n sideOffset={sideOffset}\n className={cn(\n \"z-50 min-w-32 overflow-hidden rounded-xl border border-border bg-dropdown-menu p-1 text-dropdown-menu-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2\",\n className\n )}\n {...props}\n />\n </DropdownMenuPrimitive.Portal>\n))\nDropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName\n\nconst DropdownMenuItem = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.Item>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Item> & {\n inset?: boolean\n }\n>(({ className, inset, ...props }, ref) => (\n <DropdownMenuPrimitive.Item\n ref={ref}\n className={cn(\n \"relative flex cursor-pointer select-none items-center rounded-[12px] p-2 text-sm outline-none transition-colors hover:bg-secondary focus:bg-secondary active:opacity-50 data-disabled:pointer-events-none data-disabled:opacity-50\",\n inset && \"pl-8\",\n className\n )}\n {...props}\n />\n))\nDropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName\n\nconst DropdownMenuCheckboxItem = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.CheckboxItem>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.CheckboxItem>\n>(({ className, children, checked, ...props }, ref) => (\n <DropdownMenuPrimitive.CheckboxItem\n ref={ref}\n className={cn(\n \"relative flex cursor-default select-none items-center rounded-[12px] py-1.5 pl-8 pr-2 text-sm outline-none transition-colors hover:bg-secondary focus:bg-secondary active:opacity-50 data-disabled:pointer-events-none data-disabled:opacity-50\",\n className\n )}\n checked={checked}\n {...props}\n >\n <span className=\"absolute left-2 flex h-3.5 w-3.5 items-center justify-center\">\n <DropdownMenuPrimitive.ItemIndicator>\n <Check className=\"h-4 w-4\" />\n </DropdownMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </DropdownMenuPrimitive.CheckboxItem>\n))\nDropdownMenuCheckboxItem.displayName =\n DropdownMenuPrimitive.CheckboxItem.displayName\n\nconst DropdownMenuRadioItem = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.RadioItem>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.RadioItem>\n>(({ className, children, ...props }, ref) => (\n <DropdownMenuPrimitive.RadioItem\n ref={ref}\n className={cn(\n \"relative flex cursor-default select-none items-center rounded-[12px] py-1.5 pl-8 pr-2 text-sm outline-none transition-colors hover:bg-secondary focus:bg-secondary active:opacity-50 data-disabled:pointer-events-none data-disabled:opacity-50\",\n className\n )}\n {...props}\n >\n <span className=\"absolute left-2 flex h-3.5 w-3.5 items-center justify-center\">\n <DropdownMenuPrimitive.ItemIndicator>\n <Circle className=\"h-2 w-2 fill-current\" />\n </DropdownMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </DropdownMenuPrimitive.RadioItem>\n))\nDropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName\n\nconst DropdownMenuLabel = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.Label>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Label> & {\n inset?: boolean\n }\n>(({ className, inset, ...props }, ref) => (\n <DropdownMenuPrimitive.Label\n ref={ref}\n className={cn(\n \"px-2 py-1.5 text-sm font-semibold\",\n inset && \"pl-8\",\n className\n )}\n {...props}\n />\n))\nDropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName\n\nconst DropdownMenuSeparator = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.Separator>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Separator>\n>(({ className, ...props }, ref) => (\n <DropdownMenuPrimitive.Separator\n ref={ref}\n className={cn(\"-mx-1 my-1 h-px bg-muted\", className)}\n {...props}\n />\n))\nDropdownMenuSeparator.displayName = DropdownMenuPrimitive.Separator.displayName\n\nconst DropdownMenuShortcut = ({\n className,\n ...props\n}: React.HTMLAttributes<HTMLSpanElement>) => {\n return (\n <span\n className={cn(\"ml-auto text-xs tracking-widest opacity-60\", className)}\n {...props}\n />\n )\n}\nDropdownMenuShortcut.displayName = \"DropdownMenuShortcut\"\n\nexport {\n DropdownMenu,\n DropdownMenuTrigger,\n DropdownMenuContent,\n DropdownMenuItem,\n DropdownMenuCheckboxItem,\n DropdownMenuRadioItem,\n DropdownMenuLabel,\n DropdownMenuSeparator,\n DropdownMenuShortcut,\n DropdownMenuGroup,\n DropdownMenuPortal,\n DropdownMenuSub,\n DropdownMenuSubContent,\n DropdownMenuSubTrigger,\n DropdownMenuRadioGroup,\n}\n"],"mappings":";oCAEA,UAAYA,MAAW,QACvB,UAAYC,MAA2B,gCACvC,OAAS,SAAAC,EAAO,gBAAAC,EAAc,UAAAC,MAAc,eAsB1C,OAUE,OAAAC,EAVF,QAAAC,MAAA,oBAlBF,IAAMC,EAAqC,OAErCC,EAA4C,UAE5CC,EAA0C,QAE1CC,EAA2C,SAE3CC,EAAwC,MAExCC,EAA+C,aAE/CC,EAA+B,aAKnC,CAAC,CAAE,UAAAC,EAAW,MAAAC,EAAO,SAAAC,EAAU,GAAGC,CAAM,EAAGC,IAC3CZ,EA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AGC,CAAM,EAAGC,IACpCZ,EAAuB,YAAtB,CACC,IAAKY,EACL,UAAWC,EACT,kPACAL,CACF,EACC,GAAGG,EAEJ,UAAAZ,EAAC,QAAK,UAAU,+DACd,SAAAA,EAAuB,gBAAtB,CACC,SAAAA,EAACwB,EAAA,CAAO,UAAU,uBAAuB,EAC3C,EACF,EACCb,GACH,CACD,EACDY,EAAsB,YAAoC,YAAU,YAEpE,IAAME,EAA0B,aAK9B,CAAC,CAAE,UAAAhB,EAAW,MAAAC,EAAO,GAAGE,CAAM,EAAGC,IACjCb,EAAuB,QAAtB,CACC,IAAKa,EACL,UAAWC,EACT,oCACAJ,GAAS,OACTD,CACF,EACC,GAAGG,EACN,CACD,EACDa,EAAkB,YAAoC,QAAM,YAE5D,IAAMC,EAA8B,aAGlC,CAAC,CAAE,UAAAjB,EAAW,GAAGG,CAAM,EAAGC,IAC1Bb,EAAuB,YAAtB,CACC,IAAKa,EACL,UAAWC,EAAG,2BAA4BL,CAAS,EAClD,GAAGG,EACN,CACD,EACDc,EAAsB,YAAoC,YAAU,YAEpE,IAAMC,EAAuB,CAAC,CAC5B,UAAAlB,EACA,GAAGG,CACL,IAEIZ,EAAC,QACC,UAAWc,EAAG,6CAA8CL,CAAS,EACpE,GAAGG,EACN,EAGJe,EAAqB,YAAc","names":["React","DropdownMenuPrimitive","Check","ChevronRight","Circle","jsx","jsxs","DropdownMenu","DropdownMenuTrigger","DropdownMenuGroup","DropdownMenuPortal","DropdownMenuSub","DropdownMenuRadioGroup","DropdownMenuSubTrigger","className","inset","children","props","ref","cn","ChevronRight","DropdownMenuSubContent","DropdownMenuContent","sideOffset","DropdownMenuItem","DropdownMenuCheckboxItem","checked","Check","DropdownMenuRadioItem","Circle","DropdownMenuLabel","DropdownMenuSeparator","DropdownMenuShortcut"]}
@@ -1,3 +1,3 @@
1
1
  "use client";
2
- import{a as N}from"./chunk-KBEHHIN6.mjs";import{a as p}from"./chunk-AJM7GGVC.mjs";import*as n from"react";import{Upload as T,X as I,File as B}from"lucide-react";import{jsx as a,jsxs as r}from"react/jsx-runtime";var H=n.forwardRef(({accept:o,maxSize:s,multiple:f=!1,onFilesChange:m,error:h,disabled:l,className:D,description:g},y)=>{let[F,d]=n.useState(!1),[i,v]=n.useState([]),c=n.useRef(null),R=e=>{e.preventDefault(),e.stopPropagation(),l||d(!0)},C=e=>{e.preventDefault(),e.stopPropagation(),d(!1)},E=e=>{e.preventDefault(),e.stopPropagation()},U=e=>!(s&&e.size>s),x=e=>{if(!e)return;let t=Array.from(e).filter(U),u=f?[...i,...t]:t.slice(0,1);v(u),m?.(u)},k=e=>{e.preventDefault(),e.stopPropagation(),d(!1),!l&&x(e.dataTransfer.files)},w=()=>{l||c.current?.click()},L=e=>{x(e.target.files),c.current&&(c.current.value="")},M=e=>{let t=i.filter((u,$)=>$!==e);v(t),m?.(t)},b=e=>e<1024?`${e} B`:e<1024*1024?`${Math.round(e/1024)} KB`:`${Math.round(e/(1024*1024))} MB`,P=e=>e.split(",").map(t=>t.trim()).map(t=>t.includes("/*")?t.replace("/*","").toUpperCase():t.startsWith(".")?t.slice(1).toUpperCase():t.includes("/")?t.split("/")[1].toUpperCase():t.toUpperCase());return r("div",{ref:y,className:p("w-full",D),children:[r("div",{onClick:w,onDragEnter:R,onDragLeave:C,onDragOver:E,onDrop:k,className:p("flex my-2 flex-col items-center justify-center gap-3 rounded-lg border border-border bg-background px-6 py-4 text-center transition-all cursor-pointer active:opacity-50",F&&"bg-secondary",h?"border-destructive-foreground":"border-border hover:bg-secondary",l&&"cursor-not-allowed opacity-50"),children:[a("span",{className:N({variant:"outline",size:"icon"}),children:a(T,{size:16,className:p("text-primary-accent")})}),r("div",{className:"flex flex-col gap-1",children:[r("p",{className:"text-sm text-secondary-text",children:[a("span",{className:"text-primary-accent",children:"Click to upload"})," or drag and drop"]}),(o||s)&&r("p",{className:"text-xs text-secondary-text",children:[o&&P(o).join(", "),o&&s&&" ",s&&`up to ${b(s)}`]}),g&&a("p",{className:"text-xs text-secondary-text",children:g})]})]}),a("input",{ref:c,type:"file",accept:o,multiple:f,onChange:L,disabled:l,className:"hidden"}),i.length>0&&a("div",{className:"mt-3 space-y-2",children:i.map((e,t)=>r("div",{className:"flex items-center justify-between rounded-2xl border border-border bg-background px-4 py-2",children:[r("div",{className:"flex items-center gap-3",children:[a(B,{className:"h-5 w-5 text-secondary-text"}),r("div",{className:"flex flex-col",children:[a("span",{className:"text-sm text-primary-accent truncate max-w-[200px]",children:e.name}),a("span",{className:"text-xs text-secondary-text",children:b(e.size)})]})]}),a("button",{type:"button",onClick:()=>M(t),className:"rounded-full p-1 hover:bg-secondary active:opacity-50 transition-colors",children:a(I,{className:"h-4 w-4 text-secondary-text"})})]},`${e.name}-${t}`))})]})});H.displayName="FileUpload";export{H as a};
3
- //# sourceMappingURL=chunk-JNK2KBEK.mjs.map
2
+ import{a as N}from"./chunk-BLHKJHNV.mjs";import{a as p}from"./chunk-S5TKCF6T.mjs";import*as n from"react";import{Upload as T,X as I,File as B}from"lucide-react";import{jsx as a,jsxs as r}from"react/jsx-runtime";var H=n.forwardRef(({accept:o,maxSize:s,multiple:f=!1,onFilesChange:m,error:h,disabled:l,className:D,description:g},y)=>{let[F,d]=n.useState(!1),[i,v]=n.useState([]),c=n.useRef(null),R=e=>{e.preventDefault(),e.stopPropagation(),l||d(!0)},C=e=>{e.preventDefault(),e.stopPropagation(),d(!1)},E=e=>{e.preventDefault(),e.stopPropagation()},U=e=>!(s&&e.size>s),x=e=>{if(!e)return;let t=Array.from(e).filter(U),u=f?[...i,...t]:t.slice(0,1);v(u),m?.(u)},k=e=>{e.preventDefault(),e.stopPropagation(),d(!1),!l&&x(e.dataTransfer.files)},w=()=>{l||c.current?.click()},L=e=>{x(e.target.files),c.current&&(c.current.value="")},M=e=>{let t=i.filter((u,$)=>$!==e);v(t),m?.(t)},b=e=>e<1024?`${e} B`:e<1024*1024?`${Math.round(e/1024)} KB`:`${Math.round(e/(1024*1024))} MB`,P=e=>e.split(",").map(t=>t.trim()).map(t=>t.includes("/*")?t.replace("/*","").toUpperCase():t.startsWith(".")?t.slice(1).toUpperCase():t.includes("/")?t.split("/")[1].toUpperCase():t.toUpperCase());return r("div",{ref:y,className:p("w-full",D),children:[r("div",{onClick:w,onDragEnter:R,onDragLeave:C,onDragOver:E,onDrop:k,className:p("flex my-2 flex-col items-center justify-center gap-3 rounded-lg border border-border bg-background px-6 py-4 text-center transition-all cursor-pointer active:opacity-50",F&&"bg-secondary",h?"border-destructive-foreground":"border-border hover:bg-secondary",l&&"cursor-not-allowed opacity-50"),children:[a("span",{className:N({variant:"outline",size:"icon"}),children:a(T,{size:16,className:p("text-primary-accent")})}),r("div",{className:"flex flex-col gap-1",children:[r("p",{className:"text-sm text-secondary-text",children:[a("span",{className:"text-primary-accent",children:"Click to upload"})," or drag and drop"]}),(o||s)&&r("p",{className:"text-xs text-secondary-text",children:[o&&P(o).join(", "),o&&s&&" ",s&&`up to ${b(s)}`]}),g&&a("p",{className:"text-xs text-secondary-text",children:g})]})]}),a("input",{ref:c,type:"file",accept:o,multiple:f,onChange:L,disabled:l,className:"hidden"}),i.length>0&&a("div",{className:"mt-3 space-y-2",children:i.map((e,t)=>r("div",{className:"flex items-center justify-between rounded-2xl border border-border bg-background px-4 py-2",children:[r("div",{className:"flex items-center gap-3",children:[a(B,{className:"h-5 w-5 text-secondary-text"}),r("div",{className:"flex flex-col",children:[a("span",{className:"text-sm text-primary-accent truncate max-w-[200px]",children:e.name}),a("span",{className:"text-xs text-secondary-text",children:b(e.size)})]})]}),a("button",{type:"button",onClick:()=>M(t),className:"rounded-full p-1 hover:bg-secondary active:opacity-50 transition-colors",children:a(I,{className:"h-4 w-4 text-secondary-text"})})]},`${e.name}-${t}`))})]})});H.displayName="FileUpload";export{H as a};
3
+ //# sourceMappingURL=chunk-PD43W3YN.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/components/file-upload.tsx"],"sourcesContent":["import * as React from \"react\"\nimport { Upload, X, File } from \"lucide-react\"\n\nimport { cn } from \"@/lib/utils\"\nimport { buttonVariants } from \"./button\"\n\nexport interface FileUploadProps {\n /** Accepted file formats (e.g., \".png,.jpg,.pdf\" or \"image/*\") */\n accept?: string\n /** Maximum file size in bytes */\n maxSize?: number\n /** Allow multiple files */\n multiple?: boolean\n /** Callback when files are selected */\n onFilesChange?: (files: File[]) => void\n /** Error state */\n error?: boolean\n /** Disabled state */\n disabled?: boolean\n /** Custom class name */\n className?: string\n /** Placeholder text */\n placeholder?: string\n /** Description text (e.g., \"PNG, JPG up to 10MB\") */\n description?: string\n}\n\nconst FileUpload = React.forwardRef<HTMLDivElement, FileUploadProps>(\n (\n {\n accept,\n maxSize,\n multiple = false,\n onFilesChange,\n error,\n disabled,\n className,\n description,\n },\n ref\n ) => {\n const [isDragging, setIsDragging] = React.useState(false)\n const [files, setFiles] = React.useState<File[]>([])\n const inputRef = React.useRef<HTMLInputElement>(null)\n\n const handleDragEnter = (e: React.DragEvent) => {\n e.preventDefault()\n e.stopPropagation()\n if (!disabled) setIsDragging(true)\n }\n\n const handleDragLeave = (e: React.DragEvent) => {\n e.preventDefault()\n e.stopPropagation()\n setIsDragging(false)\n }\n\n const handleDragOver = (e: React.DragEvent) => {\n e.preventDefault()\n e.stopPropagation()\n }\n\n const validateFile = (file: File): boolean => {\n if (maxSize && file.size > maxSize) {\n return false\n }\n return true\n }\n\n const handleFiles = (newFiles: FileList | null) => {\n if (!newFiles) return\n\n const validFiles = Array.from(newFiles).filter(validateFile)\n const updatedFiles = multiple\n ? [...files, ...validFiles]\n : validFiles.slice(0, 1)\n\n setFiles(updatedFiles)\n onFilesChange?.(updatedFiles)\n }\n\n const handleDrop = (e: React.DragEvent) => {\n e.preventDefault()\n e.stopPropagation()\n setIsDragging(false)\n\n if (disabled) return\n handleFiles(e.dataTransfer.files)\n }\n\n const handleClick = () => {\n if (!disabled) inputRef.current?.click()\n }\n\n const handleInputChange = (e: React.ChangeEvent<HTMLInputElement>) => {\n handleFiles(e.target.files)\n if (inputRef.current) inputRef.current.value = \"\"\n }\n\n const removeFile = (index: number) => {\n const updatedFiles = files.filter((_, i) => i !== index)\n setFiles(updatedFiles)\n onFilesChange?.(updatedFiles)\n }\n\n const formatFileSize = (bytes: number): string => {\n if (bytes < 1024) return `${bytes} B`\n if (bytes < 1024 * 1024) return `${Math.round(bytes / 1024)} KB`\n return `${Math.round(bytes / (1024 * 1024))} MB`\n }\n\n const formatAcceptedTypes = (acceptStr: string): string[] => {\n return acceptStr\n .split(\",\")\n .map((type) => type.trim())\n .map((type) => {\n // Handle wildcards like \"image/*\"\n if (type.includes(\"/*\")) {\n return type.replace(\"/*\", \"\").toUpperCase()\n }\n // Handle extensions like \".png\"\n if (type.startsWith(\".\")) {\n return type.slice(1).toUpperCase()\n }\n // Handle MIME types like \"image/png\"\n if (type.includes(\"/\")) {\n return type.split(\"/\")[1].toUpperCase()\n }\n return type.toUpperCase()\n })\n }\n\n return (\n <div ref={ref} className={cn(\"w-full\", className)}>\n <div\n onClick={handleClick}\n onDragEnter={handleDragEnter}\n onDragLeave={handleDragLeave}\n onDragOver={handleDragOver}\n onDrop={handleDrop}\n className={cn(\n \"flex my-2 flex-col items-center justify-center gap-3 rounded-lg border border-border bg-background px-6 py-4 text-center transition-all cursor-pointer active:opacity-50\",\n isDragging && \"bg-secondary\",\n error\n ? \"border-destructive-foreground\"\n : \"border-border hover:bg-secondary\",\n disabled && \"cursor-not-allowed opacity-50\"\n )}\n >\n <span\n className={buttonVariants({\n variant: \"outline\",\n size: \"icon\",\n })}\n >\n <Upload size={16} className={cn(\"text-primary-accent\")} />\n </span>\n\n <div className=\"flex flex-col gap-1\">\n <p className=\"text-sm text-secondary-text\">\n <span className=\"text-primary-accent\">Click to upload</span> or\n drag and drop\n </p>\n {(accept || maxSize) && (\n <p className=\"text-xs text-secondary-text\">\n {accept && formatAcceptedTypes(accept).join(\", \")}\n {accept && maxSize && \" \"}\n {maxSize && `up to ${formatFileSize(maxSize)}`}\n </p>\n )}\n {description && (\n <p className=\"text-xs text-secondary-text\">{description}</p>\n )}\n </div>\n </div>\n\n <input\n ref={inputRef}\n type=\"file\"\n accept={accept}\n multiple={multiple}\n onChange={handleInputChange}\n disabled={disabled}\n className=\"hidden\"\n />\n\n {files.length > 0 && (\n <div className=\"mt-3 space-y-2\">\n {files.map((file, index) => (\n <div\n key={`${file.name}-${index}`}\n className=\"flex items-center justify-between rounded-2xl border border-border bg-background px-4 py-2\"\n >\n <div className=\"flex items-center gap-3\">\n <File className=\"h-5 w-5 text-secondary-text\" />\n <div className=\"flex flex-col\">\n <span className=\"text-sm text-primary-accent truncate max-w-[200px]\">\n {file.name}\n </span>\n <span className=\"text-xs text-secondary-text\">\n {formatFileSize(file.size)}\n </span>\n </div>\n </div>\n <button\n type=\"button\"\n onClick={() => removeFile(index)}\n className=\"rounded-full p-1 hover:bg-secondary active:opacity-50 transition-colors\"\n >\n <X className=\"h-4 w-4 text-secondary-text\" />\n </button>\n </div>\n ))}\n </div>\n )}\n </div>\n )\n }\n)\nFileUpload.displayName = \"FileUpload\"\n\nexport { FileUpload }\n"],"mappings":";kFAAA,UAAYA,MAAW,QACvB,OAAS,UAAAC,EAAQ,KAAAC,EAAG,QAAAC,MAAY,eA0JpB,cAAAC,EAIA,QAAAC,MAJA,oBAhIZ,IAAMC,EAAmB,aACvB,CACE,CACE,OAAAC,EACA,QAAAC,EACA,SAAAC,EAAW,GACX,cAAAC,EACA,MAAAC,EACA,SAAAC,EACA,UAAAC,EACA,YAAAC,CACF,EACAC,IACG,CACH,GAAM,CAACC,EAAYC,CAAa,EAAU,WAAS,EAAK,EAClD,CAACC,EAAOC,CAAQ,EAAU,WAAiB,CAAC,CAAC,EAC7CC,EAAiB,SAAyB,IAAI,EAE9CC,EAAmB,GAAuB,CAC9C,EAAE,eAAe,EACjB,EAAE,gBAAgB,EACbT,GAAUK,EAAc,EAAI,CACnC,EAEMK,EAAmB,GAAuB,CAC9C,EAAE,eAAe,EACjB,EAAE,gB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3B,GACF,GACF,EACArB,EAAC,UACC,KAAK,SACL,QAAS,IAAM6B,EAAWC,CAAK,EAC/B,UAAU,0EAEV,SAAA9B,EAAC0C,EAAA,CAAE,UAAU,8BAA8B,EAC7C,IApBK,GAAGrB,EAAK,IAAI,IAAIS,CAAK,EAqB5B,CACD,EACH,GAEJ,CAEJ,CACF,EACA5B,EAAW,YAAc","names":["React","Upload","X","File","jsx","jsxs","FileUpload","accept","maxSize","multiple","onFilesChange","error","disabled","className","description","ref","isDragging","setIsDragging","files","setFiles","inputRef","handleDragEnter","handleDragLeave","handleDragOver","validateFile","file","handleFiles","newFiles","validFiles","updatedFiles","handleDrop","handleClick","handleInputChange","removeFile","index","_","i","formatFileSize","bytes","formatAcceptedTypes","acceptStr","type","cn","buttonVariants","Upload","File","X"]}
@@ -1,3 +1,3 @@
1
1
  "use client";
2
- import{a as m}from"./chunk-AJM7GGVC.mjs";import*as d from"react";import*as t from"@radix-ui/react-tooltip";import{jsx as o}from"react/jsx-runtime";var s=t.Provider,f=t.Root,P=t.Trigger,n=d.forwardRef(({className:i,sideOffset:e=4,asChild:r,...a},l)=>r?o(t.Portal,{children:o(t.Content,{ref:l,sideOffset:e,asChild:r,className:i,...a})}):o(t.Portal,{children:o(t.Content,{ref:l,sideOffset:e,className:m("z-50 overflow-hidden rounded-xl border border-border bg-tooltip px-4 py-2 text-sm text-primary-accent shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",i),...a})}));n.displayName=t.Content.displayName;export{s as a,f as b,P as c,n as d};
3
- //# sourceMappingURL=chunk-57XZUJL4.mjs.map
2
+ import{a as m}from"./chunk-S5TKCF6T.mjs";import*as d from"react";import*as t from"@radix-ui/react-tooltip";import{jsx as o}from"react/jsx-runtime";var s=t.Provider,f=t.Root,P=t.Trigger,n=d.forwardRef(({className:i,sideOffset:e=4,asChild:r,...a},l)=>r?o(t.Portal,{children:o(t.Content,{ref:l,sideOffset:e,asChild:r,className:i,...a})}):o(t.Portal,{children:o(t.Content,{ref:l,sideOffset:e,className:m("z-50 overflow-hidden rounded-xl border border-border bg-tooltip px-4 py-2 text-sm text-primary-accent shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",i),...a})}));n.displayName=t.Content.displayName;export{s as a,f as b,P as c,n as d};
3
+ //# sourceMappingURL=chunk-QC5MA4WL.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/components/tooltip.tsx"],"sourcesContent":["\"use client\"\n\nimport * as React from \"react\"\nimport * as TooltipPrimitive from \"@radix-ui/react-tooltip\"\n\nimport { cn } from \"@/lib/utils\"\n\nconst TooltipProvider = TooltipPrimitive.Provider\n\nconst Tooltip = TooltipPrimitive.Root\n\nconst TooltipTrigger = TooltipPrimitive.Trigger\n\nconst TooltipContent = React.forwardRef<\n React.ElementRef<typeof TooltipPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof TooltipPrimitive.Content>\n>(({ className, sideOffset = 4, asChild, ...props }, ref) => {\n // When asChild is used, pass props through without default styling\n // The child component (e.g., Button) will receive the tooltip props directly\n if (asChild) {\n return (\n <TooltipPrimitive.Portal>\n <TooltipPrimitive.Content\n ref={ref}\n sideOffset={sideOffset}\n asChild={asChild}\n className={className}\n {...props}\n />\n </TooltipPrimitive.Portal>\n )\n }\n\n // Default tooltip styling when not using asChild\n return (\n <TooltipPrimitive.Portal>\n <TooltipPrimitive.Content\n ref={ref}\n sideOffset={sideOffset}\n className={cn(\n \"z-50 overflow-hidden rounded-xl border border-border bg-tooltip px-4 py-2 text-sm text-primary-accent shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2\",\n className\n )}\n {...props}\n />\n </TooltipPrimitive.Portal>\n )\n})\nTooltipContent.displayName = TooltipPrimitive.Content.displayName\n\nexport { Tooltip, TooltipTrigger, TooltipContent, TooltipProvider }\n"],"mappings":";yCAEA,UAAYA,MAAW,QACvB,UAAYC,MAAsB,0BAmB1B,cAAAC,MAAA,oBAfR,IAAMC,EAAmC,WAEnCC,EAA2B,OAE3BC,EAAkC,UAElCC,EAAuB,aAG3B,CAAC,CAAE,UAAAC,EAAW,WAAAC,EAAa,EAAG,QAAAC,EAAS,GAAGC,CAAM,EAAGC,IAG/CF,EAEAP,EAAkB,SAAjB,CACC,SAAAA,EAAkB,UAAjB,CACC,IAAKS,EACL,WAAYH,EACZ,QAASC,EACT,UAAWF,EACV,GAAGG,EACN,EACF,EAMFR,EAAkB,SAAjB,CACC,SAAAA,EAAkB,UAAjB,CACC,IAAKS,EACL,WAAYH,EACZ,UAAWI,EACT,6YACAL,CACF,EACC,GAAGG,EACN,EACF,CAEH,EACDJ,EAAe,YAA+B,UAAQ","names":["React","TooltipPrimitive","jsx","TooltipProvider","Tooltip","TooltipTrigger","TooltipContent","className","sideOffset","asChild","props","ref","cn"]}
@@ -1,3 +1,3 @@
1
1
  "use client";
2
- import{a as l,b as f}from"./chunk-KBEHHIN6.mjs";import{a as e}from"./chunk-AJM7GGVC.mjs";import*as i from"react";import{DayPicker as w,getDefaultClassNames as p}from"react-day-picker";import{ChevronLeftIcon as h,ChevronRightIcon as _}from"lucide-react";import{jsx as n}from"react/jsx-runtime";function D({className:c,classNames:m,showOutsideDays:a=!0,captionLayout:d="label",buttonVariant:s="ghost",formatters:u,components:b,...y}){let t=p();return n(w,{showOutsideDays:a,className:e("p-3 text-primary-accent group/calendar rounded-sm",String.raw`rtl:**:[.rdp-button\_next>svg]:rotate-180`,String.raw`rtl:**:[.rdp-button\_previous>svg]:rotate-180`,c),captionLayout:d,formatters:{formatMonthDropdown:r=>r.toLocaleString("default",{month:"short"}),...u},classNames:{root:e("w-fit",t.root),months:e("flex gap-4 flex-col md:flex-row relative",t.months),month:e("flex flex-col w-full gap-4",t.month),nav:e("flex items-center gap-1 w-full absolute top-0 inset-x-0 justify-between",t.nav),button_previous:e(l({variant:s}),"h-7 w-7 aria-disabled:opacity-50 p-0 select-none",t.button_previous),button_next:e(l({variant:s}),"h-7 w-7 aria-disabled:opacity-50 p-0 select-none",t.button_next),month_caption:e("flex items-center justify-center h-7 w-full",t.month_caption),dropdowns:e("w-full flex items-center text-sm font-medium justify-center h-7 gap-1.5",t.dropdowns),dropdown_root:e("relative cn-calendar-dropdown-root rounded-sm",t.dropdown_root),dropdown:e("absolute bg-popover inset-0 opacity-0",t.dropdown),caption_label:e("select-none font-medium",d==="label"?"text-sm":"cn-calendar-caption-label rounded-sm flex items-center gap-1 text-sm [&>svg]:text-muted-foreground [&>svg]:size-3.5",t.caption_label),table:"w-full border-collapse",weekdays:e("flex",t.weekdays),weekday:e("text-muted-foreground rounded-sm flex-1 font-normal text-[0.8rem] select-none",t.weekday),week:e("flex w-full mt-2",t.week),week_number_header:e("select-none w-9",t.week_number_header),week_number:e("text-[0.8rem] select-none text-muted-foreground",t.week_number),day:e("relative w-full rounded-sm h-full p-0 text-center group/day aspect-square select-none [&:first-child_button[data-range-start]]:!rounded-l-sm [&:first-child_button[data-range-middle]]:!rounded-l-sm [&:last-child_button[data-range-end]]:!rounded-r-sm [&:last-child_button[data-range-middle]]:!rounded-r-sm z-20 [&:has(button:not([data-range-start]):not([data-range-end]):hover)]:z-10 data-[focused=true]:z-30",t.day),range_start:e("rounded-l-sm bg-muted relative after:bg-muted after:absolute after:inset-y-0 after:w-4 after:right-0 -z-0 isolate",t.range_start),range_middle:e("rounded-none bg-transparent",t.range_middle),range_end:e("rounded-r-sm bg-muted relative after:bg-muted after:absolute after:inset-y-0 after:w-4 after:left-0 -z-0 isolate",t.range_end),today:e("bg-muted text-foreground rounded-sm data-[selected=true]:rounded-none",t.today),outside:e("text-muted-foreground opacity-20 aria-selected:text-muted-foreground aria-selected:opacity-20",t.outside),disabled:e("text-muted-foreground opacity-50",t.disabled),hidden:e("invisible",t.hidden),...m},components:{Root:({className:r,rootRef:o,...g})=>n("div",{"data-slot":"calendar",ref:o,className:e(r),...g}),Chevron:({className:r,orientation:o,...g})=>{let x=o==="left"?h:_;return n("span",{className:e(l({variant:"outline",size:"icon"}),"shrink-0 pointer-events-none"),children:n(x,{className:e("size-4 shrink-0",r),...g})})},DayButton:v,WeekNumber:({children:r,...o})=>n("td",{...o,children:n("div",{className:"flex h-9 w-9 items-center justify-center text-center",children:r})}),...b},...y})}function v({className:c,day:m,modifiers:a,...d}){let s=p(),u=i.useRef(null);return i.useEffect(()=>{a.focused&&u.current?.focus()},[a.focused]),n(f,{ref:u,variant:"ghost",size:"icon","data-day":m.date.toLocaleDateString(),"data-selected-single":a.selected&&!a.range_start&&!a.range_end&&!a.range_middle,"data-range-start":a.range_start,"data-range-end":a.range_end,"data-range-middle":a.range_middle,className:e("rounded-sm data-[selected-single=true]:bg-primary data-[selected-single=true]:text-primary-foreground data-[range-middle=true]:bg-muted data-[range-middle=true]:text-accent-foreground data-[range-start=true]:bg-primary data-[range-start=true]:text-primary-foreground data-[range-end=true]:bg-primary data-[range-end=true]:text-primary-foreground group-data-[focused=true]/day:border-ring group-data-[focused=true]/day:ring-ring/50 relative isolate z-10 flex aspect-square size-auto w-full min-w-9 flex-col gap-1 border-0 leading-none font-normal group-data-[focused=true]/day:relative group-data-[focused=true]/day:z-30 group-data-[focused=true]/day:ring-[3px] data-[range-end=true]:rounded-sm! data-[range-end=true]:rounded-r-sm! data-[range-middle=true]:rounded-none! data-[range-start=true]:rounded-sm! data-[range-start=true]:rounded-l-sm! [&>span]:text-xs [&>span]:opacity-70",s.day,c),...d})}export{D as a,v as b};
3
- //# sourceMappingURL=chunk-N3ZLPC5C.mjs.map
2
+ import{a as l,b as f}from"./chunk-BLHKJHNV.mjs";import{a as e}from"./chunk-S5TKCF6T.mjs";import*as i from"react";import{DayPicker as w,getDefaultClassNames as p}from"react-day-picker";import{ChevronLeftIcon as h,ChevronRightIcon as _}from"lucide-react";import{jsx as n}from"react/jsx-runtime";function D({className:c,classNames:m,showOutsideDays:a=!0,captionLayout:d="label",buttonVariant:s="ghost",formatters:u,components:b,...y}){let t=p();return n(w,{showOutsideDays:a,className:e("p-3 text-primary-accent group/calendar rounded-sm",String.raw`rtl:**:[.rdp-button\_next>svg]:rotate-180`,String.raw`rtl:**:[.rdp-button\_previous>svg]:rotate-180`,c),captionLayout:d,formatters:{formatMonthDropdown:r=>r.toLocaleString("default",{month:"short"}),...u},classNames:{root:e("w-fit",t.root),months:e("flex gap-4 flex-col md:flex-row relative",t.months),month:e("flex flex-col w-full gap-4",t.month),nav:e("flex items-center gap-1 w-full absolute top-0 inset-x-0 justify-between",t.nav),button_previous:e(l({variant:s}),"h-7 w-7 aria-disabled:opacity-50 p-0 select-none",t.button_previous),button_next:e(l({variant:s}),"h-7 w-7 aria-disabled:opacity-50 p-0 select-none",t.button_next),month_caption:e("flex items-center justify-center h-7 w-full",t.month_caption),dropdowns:e("w-full flex items-center text-sm font-medium justify-center h-7 gap-1.5",t.dropdowns),dropdown_root:e("relative cn-calendar-dropdown-root rounded-sm",t.dropdown_root),dropdown:e("absolute bg-popover inset-0 opacity-0",t.dropdown),caption_label:e("select-none font-medium",d==="label"?"text-sm":"cn-calendar-caption-label rounded-sm flex items-center gap-1 text-sm [&>svg]:text-muted-foreground [&>svg]:size-3.5",t.caption_label),table:"w-full border-collapse",weekdays:e("flex",t.weekdays),weekday:e("text-muted-foreground rounded-sm flex-1 font-normal text-[0.8rem] select-none",t.weekday),week:e("flex w-full mt-2",t.week),week_number_header:e("select-none w-9",t.week_number_header),week_number:e("text-[0.8rem] select-none text-muted-foreground",t.week_number),day:e("relative w-full rounded-sm h-full p-0 text-center group/day aspect-square select-none [&:first-child_button[data-range-start]]:!rounded-l-sm [&:first-child_button[data-range-middle]]:!rounded-l-sm [&:last-child_button[data-range-end]]:!rounded-r-sm [&:last-child_button[data-range-middle]]:!rounded-r-sm z-20 [&:has(button:not([data-range-start]):not([data-range-end]):hover)]:z-10 data-[focused=true]:z-30",t.day),range_start:e("rounded-l-sm bg-muted relative after:bg-muted after:absolute after:inset-y-0 after:w-4 after:right-0 -z-0 isolate",t.range_start),range_middle:e("rounded-none bg-transparent",t.range_middle),range_end:e("rounded-r-sm bg-muted relative after:bg-muted after:absolute after:inset-y-0 after:w-4 after:left-0 -z-0 isolate",t.range_end),today:e("bg-muted text-foreground rounded-sm data-[selected=true]:rounded-none",t.today),outside:e("text-muted-foreground opacity-20 aria-selected:text-muted-foreground aria-selected:opacity-20",t.outside),disabled:e("text-muted-foreground opacity-50",t.disabled),hidden:e("invisible",t.hidden),...m},components:{Root:({className:r,rootRef:o,...g})=>n("div",{"data-slot":"calendar",ref:o,className:e(r),...g}),Chevron:({className:r,orientation:o,...g})=>{let x=o==="left"?h:_;return n("span",{className:e(l({variant:"outline",size:"icon"}),"shrink-0 pointer-events-none"),children:n(x,{className:e("size-4 shrink-0",r),...g})})},DayButton:v,WeekNumber:({children:r,...o})=>n("td",{...o,children:n("div",{className:"flex h-9 w-9 items-center justify-center text-center",children:r})}),...b},...y})}function v({className:c,day:m,modifiers:a,...d}){let s=p(),u=i.useRef(null);return i.useEffect(()=>{a.focused&&u.current?.focus()},[a.focused]),n(f,{ref:u,variant:"ghost",size:"icon","data-day":m.date.toLocaleDateString(),"data-selected-single":a.selected&&!a.range_start&&!a.range_end&&!a.range_middle,"data-range-start":a.range_start,"data-range-end":a.range_end,"data-range-middle":a.range_middle,className:e("rounded-sm data-[selected-single=true]:bg-primary data-[selected-single=true]:text-primary-foreground data-[range-middle=true]:bg-muted data-[range-middle=true]:text-accent-foreground data-[range-start=true]:bg-primary data-[range-start=true]:text-primary-foreground data-[range-end=true]:bg-primary data-[range-end=true]:text-primary-foreground group-data-[focused=true]/day:border-ring group-data-[focused=true]/day:ring-ring/50 relative isolate z-10 flex aspect-square size-auto w-full min-w-9 flex-col gap-1 border-0 leading-none font-normal group-data-[focused=true]/day:relative group-data-[focused=true]/day:z-30 group-data-[focused=true]/day:ring-[3px] data-[range-end=true]:rounded-sm! data-[range-end=true]:rounded-r-sm! data-[range-middle=true]:rounded-none! data-[range-start=true]:rounded-sm! data-[range-start=true]:rounded-l-sm! [&>span]:text-xs [&>span]:opacity-70",s.day,c),...d})}export{D as a,v as b};
3
+ //# sourceMappingURL=chunk-QMJVRGPB.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/components/calendar.tsx"],"sourcesContent":["\"use client\"\n\nimport * as React from \"react\"\nimport {\n DayPicker,\n getDefaultClassNames,\n type DayButton,\n} from \"react-day-picker\"\n\nimport { cn } from \"@/lib/utils\"\nimport { Button, buttonVariants } from \"@/components/button\"\nimport { ChevronLeftIcon, ChevronRightIcon } from \"lucide-react\"\n\nfunction Calendar({\n className,\n classNames,\n showOutsideDays = true,\n captionLayout = \"label\",\n buttonVariant = \"ghost\",\n formatters,\n components,\n ...props\n}: React.ComponentProps<typeof DayPicker> & {\n buttonVariant?: React.ComponentProps<typeof Button>[\"variant\"]\n}) {\n const defaultClassNames = getDefaultClassNames()\n\n return (\n <DayPicker\n showOutsideDays={showOutsideDays}\n className={cn(\n \"p-3 text-primary-accent group/calendar rounded-sm\",\n String.raw`rtl:**:[.rdp-button\\_next>svg]:rotate-180`,\n String.raw`rtl:**:[.rdp-button\\_previous>svg]:rotate-180`,\n className\n )}\n captionLayout={captionLayout}\n formatters={{\n formatMonthDropdown: (date) =>\n date.toLocaleString(\"default\", { month: \"short\" }),\n ...formatters,\n }}\n classNames={{\n root: cn(\"w-fit\", defaultClassNames.root),\n months: cn(\n \"flex gap-4 flex-col md:flex-row relative\",\n defaultClassNames.months\n ),\n month: cn(\"flex flex-col w-full gap-4\", defaultClassNames.month),\n nav: cn(\n \"flex items-center gap-1 w-full absolute top-0 inset-x-0 justify-between\",\n defaultClassNames.nav\n ),\n button_previous: cn(\n buttonVariants({ variant: buttonVariant }),\n \"h-7 w-7 aria-disabled:opacity-50 p-0 select-none\",\n defaultClassNames.button_previous\n ),\n button_next: cn(\n buttonVariants({ variant: buttonVariant }),\n \"h-7 w-7 aria-disabled:opacity-50 p-0 select-none\",\n defaultClassNames.button_next\n ),\n month_caption: cn(\n \"flex items-center justify-center h-7 w-full\",\n defaultClassNames.month_caption\n ),\n dropdowns: cn(\n \"w-full flex items-center text-sm font-medium justify-center h-7 gap-1.5\",\n defaultClassNames.dropdowns\n ),\n dropdown_root: cn(\n \"relative cn-calendar-dropdown-root rounded-sm\",\n defaultClassNames.dropdown_root\n ),\n dropdown: cn(\n \"absolute bg-popover inset-0 opacity-0\",\n defaultClassNames.dropdown\n ),\n caption_label: cn(\n \"select-none font-medium\",\n captionLayout === \"label\"\n ? \"text-sm\"\n : \"cn-calendar-caption-label rounded-sm flex items-center gap-1 text-sm [&>svg]:text-muted-foreground [&>svg]:size-3.5\",\n defaultClassNames.caption_label\n ),\n table: \"w-full border-collapse\",\n weekdays: cn(\"flex\", defaultClassNames.weekdays),\n weekday: cn(\n \"text-muted-foreground rounded-sm flex-1 font-normal text-[0.8rem] select-none\",\n defaultClassNames.weekday\n ),\n week: cn(\"flex w-full mt-2\", defaultClassNames.week),\n week_number_header: cn(\n \"select-none w-9\",\n defaultClassNames.week_number_header\n ),\n week_number: cn(\n \"text-[0.8rem] select-none text-muted-foreground\",\n defaultClassNames.week_number\n ),\n day: cn(\n \"relative w-full rounded-sm h-full p-0 text-center group/day aspect-square select-none [&:first-child_button[data-range-start]]:!rounded-l-sm [&:first-child_button[data-range-middle]]:!rounded-l-sm [&:last-child_button[data-range-end]]:!rounded-r-sm [&:last-child_button[data-range-middle]]:!rounded-r-sm z-20 [&:has(button:not([data-range-start]):not([data-range-end]):hover)]:z-10 data-[focused=true]:z-30\",\n defaultClassNames.day\n ),\n range_start: cn(\n \"rounded-l-sm bg-muted relative after:bg-muted after:absolute after:inset-y-0 after:w-4 after:right-0 -z-0 isolate\",\n defaultClassNames.range_start\n ),\n range_middle: cn(\n \"rounded-none bg-transparent\",\n defaultClassNames.range_middle\n ),\n range_end: cn(\n \"rounded-r-sm bg-muted relative after:bg-muted after:absolute after:inset-y-0 after:w-4 after:left-0 -z-0 isolate\",\n defaultClassNames.range_end\n ),\n today: cn(\n \"bg-muted text-foreground rounded-sm data-[selected=true]:rounded-none\",\n defaultClassNames.today\n ),\n outside: cn(\n \"text-muted-foreground opacity-20 aria-selected:text-muted-foreground aria-selected:opacity-20\",\n defaultClassNames.outside\n ),\n disabled: cn(\n \"text-muted-foreground opacity-50\",\n defaultClassNames.disabled\n ),\n hidden: cn(\"invisible\", defaultClassNames.hidden),\n ...classNames,\n }}\n components={{\n Root: ({ className, rootRef, ...props }) => {\n return (\n <div\n data-slot=\"calendar\"\n ref={rootRef}\n className={cn(className)}\n {...props}\n />\n )\n },\n Chevron: ({ className, orientation, ...props }) => {\n const Icon =\n orientation === \"left\" ? ChevronLeftIcon : ChevronRightIcon\n return (\n <span\n className={cn(\n buttonVariants({ variant: \"outline\", size: \"icon\" }),\n \"shrink-0 pointer-events-none\"\n )}\n >\n <Icon className={cn(\"size-4 shrink-0\", className)} {...props} />\n </span>\n )\n },\n DayButton: CalendarDayButton,\n WeekNumber: ({ children, ...props }) => {\n return (\n <td {...props}>\n <div className=\"flex h-9 w-9 items-center justify-center text-center\">\n {children}\n </div>\n </td>\n )\n },\n ...components,\n }}\n {...props}\n />\n )\n}\n\nfunction CalendarDayButton({\n className,\n day,\n modifiers,\n ...props\n}: React.ComponentProps<typeof DayButton>) {\n const defaultClassNames = getDefaultClassNames()\n\n const ref = React.useRef<HTMLButtonElement>(null)\n React.useEffect(() => {\n if (modifiers.focused) ref.current?.focus()\n }, [modifiers.focused])\n\n return (\n <Button\n ref={ref}\n variant=\"ghost\"\n size=\"icon\"\n data-day={day.date.toLocaleDateString()}\n data-selected-single={\n modifiers.selected &&\n !modifiers.range_start &&\n !modifiers.range_end &&\n !modifiers.range_middle\n }\n data-range-start={modifiers.range_start}\n data-range-end={modifiers.range_end}\n data-range-middle={modifiers.range_middle}\n className={cn(\n \"rounded-sm data-[selected-single=true]:bg-primary data-[selected-single=true]:text-primary-foreground data-[range-middle=true]:bg-muted data-[range-middle=true]:text-accent-foreground data-[range-start=true]:bg-primary data-[range-start=true]:text-primary-foreground data-[range-end=true]:bg-primary data-[range-end=true]:text-primary-foreground group-data-[focused=true]/day:border-ring group-data-[focused=true]/day:ring-ring/50 relative isolate z-10 flex aspect-square size-auto w-full min-w-9 flex-col gap-1 border-0 leading-none font-normal group-data-[focused=true]/day:relative group-data-[focused=true]/day:z-30 group-data-[focused=true]/day:ring-[3px] data-[range-end=true]:rounded-sm! data-[range-end=true]:rounded-r-sm! data-[range-middle=true]:rounded-none! data-[range-start=true]:rounded-sm! data-[range-start=true]:rounded-l-sm! [&>span]:text-xs [&>span]:opacity-70\",\n defaultClassNames.day,\n className\n )}\n {...props}\n />\n )\n}\n\nexport { Calendar, CalendarDayButton }\n"],"mappings":";yFAEA,UAAYA,MAAW,QACvB,OACE,aAAAC,EACA,wBAAAC,MAEK,mBAIP,OAAS,mBAAAC,EAAiB,oBAAAC,MAAwB,eA4HtC,cAAAC,MAAA,oBA1HZ,SAASC,EAAS,CAChB,UAAAC,EACA,WAAAC,EACA,gBAAAC,EAAkB,GAClB,cAAAC,EAAgB,QAChB,cAAAC,EAAgB,QAChB,WAAAC,EACA,WAAAC,EACA,GAAGC,CACL,EAEG,CACD,IAAMC,EAAoBC,EAAqB,EAE/C,OACEX,EAACY,EAAA,CACC,gBAAiBR,EACjB,UAAWS,EACT,oDACA,OAAO,+CACP,OAAO,mDACPX,CACF,EACA,cAAeG,EACf,WAAY,C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YAAU,WACV,IAAKgB,EACL,UAAWH,EAAGX,CAAS,EACtB,GAAGO,EACN,EAGJ,QAAS,CAAC,CAAE,UAAAP,EAAW,YAAAe,EAAa,GAAGR,CAAM,IAAM,CACjD,IAAMS,EACJD,IAAgB,OAASnB,EAAkBC,EAC7C,OACEC,EAAC,QACC,UAAWa,EACTE,EAAe,CAAE,QAAS,UAAW,KAAM,MAAO,CAAC,EACnD,8BACF,EAEA,SAAAf,EAACkB,EAAA,CAAK,UAAWL,EAAG,kBAAmBX,CAAS,EAAI,GAAGO,EAAO,EAChE,CAEJ,EACA,UAAWU,EACX,WAAY,CAAC,CAAE,SAAAC,EAAU,GAAGX,CAAM,IAE9BT,EAAC,MAAI,GAAGS,EACN,SAAAT,EAAC,OAAI,UAAU,uDACZ,SAAAoB,EACH,EACF,EAGJ,GAAGZ,CACL,EACC,GAAGC,EACN,CAEJ,CAEA,SAASU,EAAkB,CACzB,UAAAjB,EACA,IAAAmB,EACA,UAAAC,EACA,GAAGb,CACL,EAA2C,CACzC,IAAMC,EAAoBC,EAAqB,EAEzCY,EAAY,SAA0B,IAAI,EAChD,OAAM,YAAU,IAAM,CAChBD,EAAU,SAASC,EAAI,SAAS,MAAM,CAC5C,EAAG,CAACD,EAAU,OAAO,CAAC,EAGpBtB,EAACwB,EAAA,CACC,IAAKD,EACL,QAAQ,QACR,KAAK,OACL,WAAUF,EAAI,KAAK,mBAAmB,EACtC,uBACEC,EAAU,UACV,CAACA,EAAU,aACX,CAACA,EAAU,WACX,CAACA,EAAU,aAEb,mBAAkBA,EAAU,YAC5B,iBAAgBA,EAAU,UAC1B,oBAAmBA,EAAU,aAC7B,UAAWT,EACT,o3BACAH,EAAkB,IAClBR,CACF,EACC,GAAGO,EACN,CAEJ","names":["React","DayPicker","getDefaultClassNames","ChevronLeftIcon","ChevronRightIcon","jsx","Calendar","className","classNames","showOutsideDays","captionLayout","buttonVariant","formatters","components","props","defaultClassNames","getDefaultClassNames","DayPicker","cn","date","buttonVariants","rootRef","orientation","Icon","CalendarDayButton","children","day","modifiers","ref","Button"]}
@@ -1,3 +1,3 @@
1
1
  "use client";
2
- import{a as s}from"./chunk-AJM7GGVC.mjs";import*as r from"react";import*as e from"@radix-ui/react-dialog";import{cva as c}from"class-variance-authority";import{X as p}from"lucide-react";import{jsx as a,jsxs as n}from"react/jsx-runtime";var x=e.Root,N=e.Trigger,C=e.Close,f=e.Portal,m=r.forwardRef(({className:t,...i},o)=>a(e.Overlay,{className:s("fixed inset-0 z-50 bg-background/80 backdrop-blur-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",t),...i,ref:o}));m.displayName=e.Overlay.displayName;var h=c("fixed z-50 gap-4 bg-sheet p-6 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-200 data-[state=open]:duration-500",{variants:{side:{top:"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",bottom:"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",left:"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",right:"inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"}},defaultVariants:{side:"right"}}),S=r.forwardRef(({side:t="right",className:i,children:o,...l},d)=>n(f,{children:[a(m,{}),n(e.Content,{ref:d,className:s(h({side:t}),i),...l,children:[o,n(e.Close,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary",children:[a(p,{className:"h-4 w-4"}),a("span",{className:"sr-only",children:"Close"})]})]})]}));S.displayName=e.Content.displayName;var v=({className:t,...i})=>a("div",{className:s("flex flex-col space-y-2 text-center sm:text-left",t),...i});v.displayName="SheetHeader";var y=({className:t,...i})=>a("div",{className:s("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",t),...i});y.displayName="SheetFooter";var P=r.forwardRef(({className:t,...i},o)=>a(e.Title,{ref:o,className:s("text-lg font-semibold text-primary-accent",t),...i}));P.displayName=e.Title.displayName;var u=r.forwardRef(({className:t,...i},o)=>a(e.Description,{ref:o,className:s("text-sm text-muted-foreground",t),...i}));u.displayName=e.Description.displayName;export{x as a,N as b,C as c,f as d,m as e,S as f,v as g,y as h,P as i,u as j};
3
- //# sourceMappingURL=chunk-PBOK6TUC.mjs.map
2
+ import{a as s}from"./chunk-S5TKCF6T.mjs";import*as r from"react";import*as e from"@radix-ui/react-dialog";import{cva as c}from"class-variance-authority";import{X as p}from"lucide-react";import{jsx as a,jsxs as n}from"react/jsx-runtime";var x=e.Root,N=e.Trigger,C=e.Close,f=e.Portal,m=r.forwardRef(({className:t,...i},o)=>a(e.Overlay,{className:s("fixed inset-0 z-50 bg-background/80 backdrop-blur-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",t),...i,ref:o}));m.displayName=e.Overlay.displayName;var h=c("fixed z-50 gap-4 bg-sheet p-6 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-200 data-[state=open]:duration-500",{variants:{side:{top:"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",bottom:"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",left:"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",right:"inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"}},defaultVariants:{side:"right"}}),S=r.forwardRef(({side:t="right",className:i,children:o,...l},d)=>n(f,{children:[a(m,{}),n(e.Content,{ref:d,className:s(h({side:t}),i),...l,children:[o,n(e.Close,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary",children:[a(p,{className:"h-4 w-4"}),a("span",{className:"sr-only",children:"Close"})]})]})]}));S.displayName=e.Content.displayName;var v=({className:t,...i})=>a("div",{className:s("flex flex-col space-y-2 text-center sm:text-left",t),...i});v.displayName="SheetHeader";var y=({className:t,...i})=>a("div",{className:s("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",t),...i});y.displayName="SheetFooter";var P=r.forwardRef(({className:t,...i},o)=>a(e.Title,{ref:o,className:s("text-lg font-semibold text-primary-accent",t),...i}));P.displayName=e.Title.displayName;var u=r.forwardRef(({className:t,...i},o)=>a(e.Description,{ref:o,className:s("text-sm text-muted-foreground",t),...i}));u.displayName=e.Description.displayName;export{x as a,N as b,C as c,f as d,m as e,S as f,v as g,y as h,P as i,u as j};
3
+ //# sourceMappingURL=chunk-QVMQ55JW.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/components/sheet.tsx"],"sourcesContent":["\"use client\"\n\nimport * as React from \"react\"\nimport * as SheetPrimitive from \"@radix-ui/react-dialog\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\nimport { X } from \"lucide-react\"\n\nimport { cn } from \"@/lib/utils\"\n\nconst Sheet = SheetPrimitive.Root\n\nconst SheetTrigger = SheetPrimitive.Trigger\n\nconst SheetClose = SheetPrimitive.Close\n\nconst SheetPortal = SheetPrimitive.Portal\n\nconst SheetOverlay = React.forwardRef<\n React.ElementRef<typeof SheetPrimitive.Overlay>,\n React.ComponentPropsWithoutRef<typeof SheetPrimitive.Overlay>\n>(({ className, ...props }, ref) => (\n <SheetPrimitive.Overlay\n className={cn(\n \"fixed inset-0 z-50 bg-background/80 backdrop-blur-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0\",\n className\n )}\n {...props}\n ref={ref}\n />\n))\nSheetOverlay.displayName = SheetPrimitive.Overlay.displayName\n\nconst sheetVariants = cva(\n \"fixed z-50 gap-4 bg-sheet p-6 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-200 data-[state=open]:duration-500\",\n {\n variants: {\n side: {\n top: \"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top\",\n bottom:\n \"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom\",\n left: \"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm\",\n right:\n \"inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm\",\n },\n },\n defaultVariants: {\n side: \"right\",\n },\n }\n)\n\ninterface SheetContentProps\n extends\n React.ComponentPropsWithoutRef<typeof SheetPrimitive.Content>,\n VariantProps<typeof sheetVariants> {}\n\nconst SheetContent = React.forwardRef<\n React.ElementRef<typeof SheetPrimitive.Content>,\n SheetContentProps\n>(({ side = \"right\", className, children, ...props }, ref) => (\n <SheetPortal>\n <SheetOverlay />\n <SheetPrimitive.Content\n ref={ref}\n className={cn(sheetVariants({ side }), className)}\n {...props}\n >\n {children}\n <SheetPrimitive.Close className=\"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary\">\n <X className=\"h-4 w-4\" />\n <span className=\"sr-only\">Close</span>\n </SheetPrimitive.Close>\n </SheetPrimitive.Content>\n </SheetPortal>\n))\nSheetContent.displayName = SheetPrimitive.Content.displayName\n\nconst SheetHeader = ({\n className,\n ...props\n}: React.HTMLAttributes<HTMLDivElement>) => (\n <div\n className={cn(\n \"flex flex-col space-y-2 text-center sm:text-left\",\n className\n )}\n {...props}\n />\n)\nSheetHeader.displayName = \"SheetHeader\"\n\nconst SheetFooter = ({\n className,\n ...props\n}: React.HTMLAttributes<HTMLDivElement>) => (\n <div\n className={cn(\n \"flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2\",\n className\n )}\n {...props}\n />\n)\nSheetFooter.displayName = \"SheetFooter\"\n\nconst SheetTitle = React.forwardRef<\n React.ElementRef<typeof SheetPrimitive.Title>,\n React.ComponentPropsWithoutRef<typeof SheetPrimitive.Title>\n>(({ className, ...props }, ref) => (\n <SheetPrimitive.Title\n ref={ref}\n className={cn(\"text-lg font-semibold text-primary-accent\", className)}\n {...props}\n />\n))\nSheetTitle.displayName = SheetPrimitive.Title.displayName\n\nconst SheetDescription = React.forwardRef<\n React.ElementRef<typeof SheetPrimitive.Description>,\n React.ComponentPropsWithoutRef<typeof SheetPrimitive.Description>\n>(({ className, ...props }, ref) => (\n <SheetPrimitive.Description\n ref={ref}\n className={cn(\"text-sm text-muted-foreground\", className)}\n {...props}\n />\n))\nSheetDescription.displayName = SheetPrimitive.Description.displayName\n\nexport {\n Sheet,\n SheetPortal,\n SheetOverlay,\n SheetTrigger,\n SheetClose,\n SheetContent,\n SheetHeader,\n SheetFooter,\n SheetTitle,\n SheetDescription,\n}\n"],"mappings":";yCAEA,UAAYA,MAAW,QACvB,UAAYC,MAAoB,yBAChC,OAAS,OAAAC,MAA8B,2BACvC,OAAS,KAAAC,MAAS,eAgBhB,cAAAC,EA+CI,QAAAC,MA/CJ,oBAZF,IAAMC,EAAuB,OAEvBC,EAA8B,UAE9BC,EAA4B,QAE5BC,EAA6B,SAE7BC,EAAqB,aAGzB,CAAC,CAAE,UAAAC,EAAW,GAAGC,CAAM,EAAGC,IAC1BT,EAAgB,UAAf,CACC,UAAWU,EACT,+KACAH,CACF,EACC,GAAGC,EACJ,IAAKC,EACP,CACD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N,CACD,EACDY,EAAiB,YAA6B,cAAY","names":["React","SheetPrimitive","cva","X","jsx","jsxs","Sheet","SheetTrigger","SheetClose","SheetPortal","SheetOverlay","className","props","ref","cn","sheetVariants","cva","SheetContent","side","children","X","SheetHeader","SheetFooter","SheetTitle","SheetDescription"]}
@@ -1,3 +1,3 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } }"use client";
2
- var _chunkVBARF35Njs = require('./chunk-VBARF35N.js');var _react = require('react'); var c = _interopRequireWildcard(_react);var _reactscrollarea = require('@radix-ui/react-scroll-area'); var r = _interopRequireWildcard(_reactscrollarea);var _jsxruntime = require('react/jsx-runtime');var S=c.forwardRef(({className:o,children:e,...i},a)=>_jsxruntime.jsxs.call(void 0, r.Root,{ref:a,className:_chunkVBARF35Njs.a.call(void 0, "relative overflow-hidden",o),...i,children:[_jsxruntime.jsx.call(void 0, r.Viewport,{className:"h-full w-full rounded-[inherit]",children:e}),_jsxruntime.jsx.call(void 0, m,{}),_jsxruntime.jsx.call(void 0, r.Corner,{})]}));S.displayName=r.Root.displayName;var m=c.forwardRef(({className:o,orientation:e="vertical",...i},a)=>_jsxruntime.jsx.call(void 0, r.ScrollAreaScrollbar,{ref:a,orientation:e,className:_chunkVBARF35Njs.a.call(void 0, "flex touch-none select-none transition-colors",e==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-[1px]",e==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",o),...i,children:_jsxruntime.jsx.call(void 0, r.ScrollAreaThumb,{className:"relative flex-1 rounded-full bg-muted/40"})}));m.displayName=r.ScrollAreaScrollbar.displayName;exports.a = S; exports.b = m;
3
- //# sourceMappingURL=chunk-NIHULISF.js.map
2
+ var _chunkFUYXCJOQjs = require('./chunk-FUYXCJOQ.js');var _react = require('react'); var c = _interopRequireWildcard(_react);var _reactscrollarea = require('@radix-ui/react-scroll-area'); var r = _interopRequireWildcard(_reactscrollarea);var _jsxruntime = require('react/jsx-runtime');var S=c.forwardRef(({className:o,children:e,...i},a)=>_jsxruntime.jsxs.call(void 0, r.Root,{ref:a,className:_chunkFUYXCJOQjs.a.call(void 0, "relative overflow-hidden",o),...i,children:[_jsxruntime.jsx.call(void 0, r.Viewport,{className:"h-full w-full rounded-[inherit]",children:e}),_jsxruntime.jsx.call(void 0, m,{}),_jsxruntime.jsx.call(void 0, r.Corner,{})]}));S.displayName=r.Root.displayName;var m=c.forwardRef(({className:o,orientation:e="vertical",...i},a)=>_jsxruntime.jsx.call(void 0, r.ScrollAreaScrollbar,{ref:a,orientation:e,className:_chunkFUYXCJOQjs.a.call(void 0, "flex touch-none select-none transition-colors",e==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-[1px]",e==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",o),...i,children:_jsxruntime.jsx.call(void 0, r.ScrollAreaThumb,{className:"relative flex-1 rounded-full bg-muted/40"})}));m.displayName=r.ScrollAreaScrollbar.displayName;exports.a = S; exports.b = m;
3
+ //# sourceMappingURL=chunk-RJMIOBXZ.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["/Users/aktoriukas/Documents/Projects/alkimi/alkimi-ui-kit/dist/chunk-RJMIOBXZ.js","../src/components/scroll-area.tsx"],"names":["ScrollArea","className","children","props","ref","jsxs","cn","jsx","ScrollBar","orientation"],"mappings":"AAAA,uWAAY;AACZ,sDAAuC,uECChB,iHACc,+CAQnC,IAJIA,CAAAA,CAAmB,CAAA,CAAA,UAAA,CAGvB,CAAC,CAAE,SAAA,CAAAC,CAAAA,CAAW,QAAA,CAAAC,CAAAA,CAAU,GAAGC,CAAM,CAAA,CAAGC,CAAAA,CAAAA,EACpCC,8BAAAA,CAAqB,CAAA,IAAA,CAApB,CACC,GAAA,CAAKD,CAAAA,CACL,SAAA,CAAWE,gCAAAA,0BAAG,CAA4BL,CAAS,CAAA,CAClD,GAAGE,CAAAA,CAEJ,QAAA,CAAA,CAAAI,6BAAAA,CAAqB,CAAA,QAAA,CAApB,CAA6B,SAAA,CAAU,iCAAA,CACrC,QAAA,CAAAL,CAAAA,CACH,CAAA,CACAK,6BAAAA,CAACC,CAAA,CAAA,CAAU,CAAA,CACXD,6BAAAA,CAAqB,CAAA,MAAA,CAApB,CAAA,CAA2B,CAAA,CAAA,CAC9B,CACD,CAAA,CACDP,CAAAA,CAAW,WAAA,CAAkC,CAAA,CAAA,IAAA,CAAK,WAAA,CAElD,IAAMQ,CAAAA,CAAkB,CAAA,CAAA,UAAA,CAGtB,CAAC,CAAE,SAAA,CAAAP,CAAAA,CAAW,WAAA,CAAAQ,CAAAA,CAAc,UAAA,CAAY,GAAGN,CAAM,CAAA,CAAGC,CAAAA,CAAAA,EACpDG,6BAAAA,CAAqB,CAAA,mBAAA,CAApB,CACC,GAAA,CAAKH,CAAAA,CACL,WAAA,CAAaK,CAAAA,CACb,SAAA,CAAWH,gCAAAA,+CACT,CACAG,CAAAA,GAAgB,UAAA,EACd,oDAAA,CACFA,CAAAA,GAAgB,YAAA,EACd,sDAAA,CACFR,CACF,CAAA,CACC,GAAGE,CAAAA,CAEJ,QAAA,CAAAI,6BAAAA,CAAqB,CAAA,eAAA,CAApB,CAAoC,SAAA,CAAU,0CAAA,CAA2C,CAAA,CAC5F,CACD,CAAA,CACDC,CAAAA,CAAU,WAAA,CAAkC,CAAA,CAAA,mBAAA,CAAoB,WAAA,CAAA,6BAAA","file":"/Users/aktoriukas/Documents/Projects/alkimi/alkimi-ui-kit/dist/chunk-RJMIOBXZ.js","sourcesContent":[null,"\"use client\"\n\nimport * as React from \"react\"\nimport * as ScrollAreaPrimitive from \"@radix-ui/react-scroll-area\"\n\nimport { cn } from \"@/lib/utils\"\n\nconst ScrollArea = React.forwardRef<\n React.ComponentRef<typeof ScrollAreaPrimitive.Root>,\n React.ComponentPropsWithoutRef<typeof ScrollAreaPrimitive.Root>\n>(({ className, children, ...props }, ref) => (\n <ScrollAreaPrimitive.Root\n ref={ref}\n className={cn(\"relative overflow-hidden\", className)}\n {...props}\n >\n <ScrollAreaPrimitive.Viewport className=\"h-full w-full rounded-[inherit]\">\n {children}\n </ScrollAreaPrimitive.Viewport>\n <ScrollBar />\n <ScrollAreaPrimitive.Corner />\n </ScrollAreaPrimitive.Root>\n))\nScrollArea.displayName = ScrollAreaPrimitive.Root.displayName\n\nconst ScrollBar = React.forwardRef<\n React.ComponentRef<typeof ScrollAreaPrimitive.ScrollAreaScrollbar>,\n React.ComponentPropsWithoutRef<typeof ScrollAreaPrimitive.ScrollAreaScrollbar>\n>(({ className, orientation = \"vertical\", ...props }, ref) => (\n <ScrollAreaPrimitive.ScrollAreaScrollbar\n ref={ref}\n orientation={orientation}\n className={cn(\n \"flex touch-none select-none transition-colors\",\n orientation === \"vertical\" &&\n \"h-full w-2.5 border-l border-l-transparent p-[1px]\",\n orientation === \"horizontal\" &&\n \"h-2.5 flex-col border-t border-t-transparent p-[1px]\",\n className\n )}\n {...props}\n >\n <ScrollAreaPrimitive.ScrollAreaThumb className=\"relative flex-1 rounded-full bg-muted/40\" />\n </ScrollAreaPrimitive.ScrollAreaScrollbar>\n))\nScrollBar.displayName = ScrollAreaPrimitive.ScrollAreaScrollbar.displayName\n\nexport { ScrollArea, ScrollBar }\n"]}
@@ -1,3 +1,3 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } }"use client";
2
- var _chunkNIHULISFjs = require('./chunk-NIHULISF.js');var _chunkXNLDCAFSjs = require('./chunk-XNLDCAFS.js');var _chunkQP7CDVWGjs = require('./chunk-QP7CDVWG.js');var _chunkVBARF35Njs = require('./chunk-VBARF35N.js');var _react = require('react'); var a = _interopRequireWildcard(_react);var _lucidereact = require('lucide-react');var _vaul = require('vaul');var _jsxruntime = require('react/jsx-runtime');var R="24rem",v=a.createContext(null);function h(){let e=a.useContext(v);if(!e)throw new Error("useDrawer must be used within a Drawer component.");return e}var y=a.forwardRef(({isOpen:e,onClose:o,width:t=R,children:s,...n},c)=>{let u=a.useRef(null),m=_chunkXNLDCAFSjs.a.call(void 0, "lg"),b=a.useMemo(()=>({isOpen:e,onClose:o,width:t}),[e,o,t]);return _jsxruntime.jsxs.call(void 0, v.Provider,{value:b,children:[!m&&_jsxruntime.jsx.call(void 0, _vaul.Drawer.Root,{open:e,onOpenChange:D=>{D||o()},direction:"left",children:_jsxruntime.jsxs.call(void 0, _vaul.Drawer.Portal,{children:[_jsxruntime.jsx.call(void 0, _vaul.Drawer.Overlay,{className:"fixed inset-0 z-50 bg-background/80 backdrop-blur-sm"}),_jsxruntime.jsxs.call(void 0, _vaul.Drawer.Content,{className:"fixed inset-y-0 left-0 z-50 flex h-full w-[85vw] max-w-md flex-col bg-sidebar border-r border-sidebar-border text-primary-accent shadow-lg outline-none","aria-describedby":void 0,children:[_jsxruntime.jsx.call(void 0, _vaul.Drawer.Title,{className:"sr-only",children:"Drawer"}),s]})]})}),m&&_jsxruntime.jsxs.call(void 0, "div",{ref:c,className:"group/drawer peer","data-state":e?"open":"closed",...n,children:[_jsxruntime.jsx.call(void 0, "div",{className:_chunkVBARF35Njs.a.call(void 0, "relative bg-sidebar transition-[width] duration-200 ease-linear",e?"":"w-0"),style:{width:e?t:"0"}}),_jsxruntime.jsx.call(void 0, "div",{ref:u,className:_chunkVBARF35Njs.a.call(void 0, "fixed right-0 z-40 transition-[right,width,top,height] duration-200 ease-linear flex","top-(--sidebar-top,0px) h-[calc(100svh-var(--sidebar-top,0px))]",e?"right-0":"right-[calc(var(--drawer-width)*-1)]"),style:{"--drawer-width":t,width:t},children:_jsxruntime.jsx.call(void 0, "div",{"data-drawer":"drawer",className:"flex h-full w-full flex-col",children:_jsxruntime.jsx.call(void 0, "div",{className:"flex flex-col my-2.5 mr-2.5 rounded-2xl border bg-sidebar border-sidebar-border h-[calc(100%-1.25rem)] shadow",children:s})})})]})]})});y.displayName="Drawer";var C=a.forwardRef(({className:e,showCloseButton:o=!0,children:t,...s},n)=>{let{onClose:c}=h();return _jsxruntime.jsxs.call(void 0, "div",{ref:n,"data-drawer":"header",className:_chunkVBARF35Njs.a.call(void 0, "flex w-full items-start justify-between gap-2 p-4 border-b border-sidebar-border",e),...s,children:[_jsxruntime.jsx.call(void 0, "div",{className:"flex-1",children:t}),o&&_jsxruntime.jsxs.call(void 0, _chunkQP7CDVWGjs.b,{variant:"secondary",size:"icon",onClick:c,className:"h-8 w-8 shrink-0 rounded-full",children:[_jsxruntime.jsx.call(void 0, _lucidereact.X,{size:16}),_jsxruntime.jsx.call(void 0, "span",{className:"sr-only",children:"Close drawer"})]})]})});C.displayName="DrawerHeader";var N=a.forwardRef(({className:e,...o},t)=>_jsxruntime.jsx.call(void 0, "h2",{ref:t,className:_chunkVBARF35Njs.a.call(void 0, "text-lg font-semibold text-primary-accent",e),...o}));N.displayName="DrawerTitle";var g=a.forwardRef(({className:e,children:o,...t},s)=>_jsxruntime.jsx.call(void 0, _chunkNIHULISFjs.a,{className:"flex-1",ref:s,children:_jsxruntime.jsx.call(void 0, "div",{"data-drawer":"body",className:_chunkVBARF35Njs.a.call(void 0, "p-4",e),...t,children:o})}));g.displayName="DrawerBody";var P=a.forwardRef(({className:e,...o},t)=>_jsxruntime.jsx.call(void 0, "div",{ref:t,"data-drawer":"footer",className:_chunkVBARF35Njs.a.call(void 0, "flex flex-col gap-2 p-4 border-t border-sidebar-border",e),...o}));P.displayName="DrawerFooter";exports.a = h; exports.b = y; exports.c = C; exports.d = N; exports.e = g; exports.f = P;
3
- //# sourceMappingURL=chunk-4PODZIEU.js.map
2
+ var _chunkRJMIOBXZjs = require('./chunk-RJMIOBXZ.js');var _chunk3BVMHDYAjs = require('./chunk-3BVMHDYA.js');var _chunkXQILGD5Bjs = require('./chunk-XQILGD5B.js');var _chunkFUYXCJOQjs = require('./chunk-FUYXCJOQ.js');var _react = require('react'); var a = _interopRequireWildcard(_react);var _lucidereact = require('lucide-react');var _vaul = require('vaul');var _jsxruntime = require('react/jsx-runtime');var R="24rem",v=a.createContext(null);function h(){let e=a.useContext(v);if(!e)throw new Error("useDrawer must be used within a Drawer component.");return e}var y=a.forwardRef(({isOpen:e,onClose:o,width:t=R,children:s,...n},c)=>{let u=a.useRef(null),m=_chunk3BVMHDYAjs.a.call(void 0, "lg"),b=a.useMemo(()=>({isOpen:e,onClose:o,width:t}),[e,o,t]);return _jsxruntime.jsxs.call(void 0, v.Provider,{value:b,children:[!m&&_jsxruntime.jsx.call(void 0, _vaul.Drawer.Root,{open:e,onOpenChange:D=>{D||o()},direction:"left",children:_jsxruntime.jsxs.call(void 0, _vaul.Drawer.Portal,{children:[_jsxruntime.jsx.call(void 0, _vaul.Drawer.Overlay,{className:"fixed inset-0 z-50 bg-background/80 backdrop-blur-sm"}),_jsxruntime.jsxs.call(void 0, _vaul.Drawer.Content,{className:"fixed inset-y-0 left-0 z-50 flex h-full w-[85vw] max-w-md flex-col bg-sidebar border-r border-sidebar-border text-primary-accent shadow-lg outline-none","aria-describedby":void 0,children:[_jsxruntime.jsx.call(void 0, _vaul.Drawer.Title,{className:"sr-only",children:"Drawer"}),s]})]})}),m&&_jsxruntime.jsxs.call(void 0, "div",{ref:c,className:"group/drawer peer","data-state":e?"open":"closed",...n,children:[_jsxruntime.jsx.call(void 0, "div",{className:_chunkFUYXCJOQjs.a.call(void 0, "relative bg-sidebar transition-[width] duration-200 ease-linear",e?"":"w-0"),style:{width:e?t:"0"}}),_jsxruntime.jsx.call(void 0, "div",{ref:u,className:_chunkFUYXCJOQjs.a.call(void 0, "fixed right-0 z-40 transition-[right,width,top,height] duration-200 ease-linear flex","top-(--sidebar-top,0px) h-[calc(100svh-var(--sidebar-top,0px))]",e?"right-0":"right-[calc(var(--drawer-width)*-1)]"),style:{"--drawer-width":t,width:t},children:_jsxruntime.jsx.call(void 0, "div",{"data-drawer":"drawer",className:"flex h-full w-full flex-col",children:_jsxruntime.jsx.call(void 0, "div",{className:"flex flex-col my-2.5 mr-2.5 rounded-2xl border bg-sidebar border-sidebar-border h-[calc(100%-1.25rem)] shadow",children:s})})})]})]})});y.displayName="Drawer";var C=a.forwardRef(({className:e,showCloseButton:o=!0,children:t,...s},n)=>{let{onClose:c}=h();return _jsxruntime.jsxs.call(void 0, "div",{ref:n,"data-drawer":"header",className:_chunkFUYXCJOQjs.a.call(void 0, "flex w-full items-start justify-between gap-2 p-4 border-b border-sidebar-border",e),...s,children:[_jsxruntime.jsx.call(void 0, "div",{className:"flex-1",children:t}),o&&_jsxruntime.jsxs.call(void 0, _chunkXQILGD5Bjs.b,{variant:"secondary",size:"icon",onClick:c,className:"h-8 w-8 shrink-0 rounded-full",children:[_jsxruntime.jsx.call(void 0, _lucidereact.X,{size:16}),_jsxruntime.jsx.call(void 0, "span",{className:"sr-only",children:"Close drawer"})]})]})});C.displayName="DrawerHeader";var N=a.forwardRef(({className:e,...o},t)=>_jsxruntime.jsx.call(void 0, "h2",{ref:t,className:_chunkFUYXCJOQjs.a.call(void 0, "text-lg font-semibold text-primary-accent",e),...o}));N.displayName="DrawerTitle";var g=a.forwardRef(({className:e,children:o,...t},s)=>_jsxruntime.jsx.call(void 0, _chunkRJMIOBXZjs.a,{className:"flex-1",ref:s,children:_jsxruntime.jsx.call(void 0, "div",{"data-drawer":"body",className:_chunkFUYXCJOQjs.a.call(void 0, "p-4",e),...t,children:o})}));g.displayName="DrawerBody";var P=a.forwardRef(({className:e,...o},t)=>_jsxruntime.jsx.call(void 0, "div",{ref:t,"data-drawer":"footer",className:_chunkFUYXCJOQjs.a.call(void 0, "flex flex-col gap-2 p-4 border-t border-sidebar-border",e),...o}));P.displayName="DrawerFooter";exports.a = h; exports.b = y; exports.c = C; exports.d = N; exports.e = g; exports.f = P;
3
+ //# sourceMappingURL=chunk-RKRTEMMZ.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["/Users/aktoriukas/Documents/Projects/alkimi/alkimi-ui-kit/dist/chunk-RKRTEMMZ.js","../src/components/drawer.tsx"],"names":["DRAWER_WIDTH","DrawerContext","useDrawer","context","Drawer","isOpen","onClose","width","children","props","ref","drawerRef","isDesktop","useMediaQuery","contextValue","jsxs","jsx","DrawerPrimitive","open","cn","DrawerHeader","className","showCloseButton","Button","X","DrawerTitle","DrawerBody","ScrollArea","DrawerFooter"],"mappings":"AAAA,uWAAY;AACZ,sDAAuC,sDAAwC,sDAAwC,sDAAwC,uECCxI,2CACL,4BACwB,+CA2D9B,IApDNA,CAAAA,CAAe,OAAA,CASfC,CAAAA,CAAsB,CAAA,CAAA,aAAA,CAAyC,IAAI,CAAA,CAEzE,SAASC,CAAAA,CAAAA,CAAY,CACnB,IAAMC,CAAAA,CAAgB,CAAA,CAAA,UAAA,CAAWF,CAAa,CAAA,CAC9C,EAAA,CAAI,CAACE,CAAAA,CACH,MAAM,IAAI,KAAA,CAAM,mDAAmD,CAAA,CAErE,OAAOA,CACT,CAGA,IAAMC,CAAAA,CAAe,CAAA,CAAA,UAAA,CAOnB,CAAC,CAAE,MAAA,CAAAC,CAAAA,CAAQ,OAAA,CAAAC,CAAAA,CAAS,KAAA,CAAAC,CAAAA,CAAQP,CAAAA,CAAc,QAAA,CAAAQ,CAAAA,CAAU,GAAGC,CAAM,CAAA,CAAGC,CAAAA,CAAAA,EAAQ,CACxE,IAAMC,CAAAA,CAAkB,CAAA,CAAA,MAAA,CAAuB,IAAI,CAAA,CAC7CC,CAAAA,CAAYC,gCAAAA,IAAkB,CAAA,CAE9BC,CAAAA,CAAqB,CAAA,CAAA,OAAA,CACzB,CAAA,CAAA,EAAA,CAAO,CACL,MAAA,CAAAT,CAAAA,CACA,OAAA,CAAAC,CAAAA,CACA,KAAA,CAAAC,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CACN,CAEH,CAAA,CACDmB,CAAAA,CAAa,WAAA,CAAc,cAAA,CAAA,yFAAA","file":"/Users/aktoriukas/Documents/Projects/alkimi/alkimi-ui-kit/dist/chunk-RKRTEMMZ.js","sourcesContent":[null,"\"use client\"\n\nimport * as React from \"react\"\nimport { X } from \"lucide-react\"\nimport { Drawer as DrawerPrimitive } from \"vaul\"\n\nimport { cn } from \"@/lib/utils\"\nimport { Button } from \"@/components/button\"\nimport { ScrollArea } from \"@/components/scroll-area\"\nimport { useMediaQuery } from \"@/lib/use-media-query\"\n\nconst DRAWER_WIDTH = \"24rem\"\n\n// Drawer Context\ntype DrawerContextProps = {\n isOpen: boolean\n onClose: () => void\n width?: string\n}\n\nconst DrawerContext = React.createContext<DrawerContextProps | null>(null)\n\nfunction useDrawer() {\n const context = React.useContext(DrawerContext)\n if (!context) {\n throw new Error(\"useDrawer must be used within a Drawer component.\")\n }\n return context\n}\n\n// Main Unified Drawer Component (Responsive)\nconst Drawer = React.forwardRef<\n HTMLDivElement,\n React.ComponentProps<\"div\"> & {\n isOpen: boolean\n onClose: () => void\n width?: string\n }\n>(({ isOpen, onClose, width = DRAWER_WIDTH, children, ...props }, ref) => {\n const drawerRef = React.useRef<HTMLDivElement>(null)\n const isDesktop = useMediaQuery(\"lg\")\n\n const contextValue = React.useMemo<DrawerContextProps>(\n () => ({\n isOpen,\n onClose,\n width,\n }),\n [isOpen, onClose, width]\n )\n\n return (\n <DrawerContext.Provider value={contextValue}>\n {/* Mobile Drawer: visible < md breakpoint */}\n {!isDesktop && (\n <DrawerPrimitive.Root\n open={isOpen}\n onOpenChange={(open) => {\n if (!open) onClose()\n }}\n direction=\"left\"\n >\n <DrawerPrimitive.Portal>\n <DrawerPrimitive.Overlay className=\"fixed inset-0 z-50 bg-background/80 backdrop-blur-sm\" />\n <DrawerPrimitive.Content\n className=\"fixed inset-y-0 left-0 z-50 flex h-full w-[85vw] max-w-md flex-col bg-sidebar border-r border-sidebar-border text-primary-accent shadow-lg outline-none\"\n aria-describedby={undefined}\n >\n <DrawerPrimitive.Title className=\"sr-only\">\n Drawer\n </DrawerPrimitive.Title>\n {children}\n </DrawerPrimitive.Content>\n </DrawerPrimitive.Portal>\n </DrawerPrimitive.Root>\n )}\n\n {/* Desktop Drawer: visible >= md breakpoint */}\n {isDesktop && (\n <div\n ref={ref}\n className=\"group/drawer peer\"\n data-state={isOpen ? \"open\" : \"closed\"}\n {...props}\n >\n {/* Spacer to push content */}\n <div\n className={cn(\n \"relative bg-sidebar transition-[width] duration-200 ease-linear\",\n isOpen ? \"\" : \"w-0\"\n )}\n style={\n {\n width: isOpen ? width : \"0\",\n } as React.CSSProperties\n }\n />\n\n {/* Fixed drawer panel */}\n <div\n ref={drawerRef}\n className={cn(\n \"fixed right-0 z-40 transition-[right,width,top,height] duration-200 ease-linear flex\",\n \"top-(--sidebar-top,0px) h-[calc(100svh-var(--sidebar-top,0px))]\",\n isOpen ? \"right-0\" : \"right-[calc(var(--drawer-width)*-1)]\"\n )}\n style={\n {\n \"--drawer-width\": width,\n width: width,\n } as React.CSSProperties\n }\n >\n <div data-drawer=\"drawer\" className=\"flex h-full w-full flex-col\">\n <div className=\"flex flex-col my-2.5 mr-2.5 rounded-2xl border bg-sidebar border-sidebar-border h-[calc(100%-1.25rem)] shadow\">\n {children}\n </div>\n </div>\n </div>\n </div>\n )}\n </DrawerContext.Provider>\n )\n})\nDrawer.displayName = \"Drawer\"\n\n// Drawer Header\nconst DrawerHeader = React.forwardRef<\n HTMLDivElement,\n React.ComponentProps<\"div\"> & {\n showCloseButton?: boolean\n }\n>(({ className, showCloseButton = true, children, ...props }, ref) => {\n const { onClose } = useDrawer()\n\n return (\n <div\n ref={ref}\n data-drawer=\"header\"\n className={cn(\n \"flex w-full items-start justify-between gap-2 p-4 border-b border-sidebar-border\",\n className\n )}\n {...props}\n >\n <div className=\"flex-1\">{children}</div>\n {showCloseButton && (\n <Button\n variant=\"secondary\"\n size=\"icon\"\n onClick={onClose}\n className=\"h-8 w-8 shrink-0 rounded-full\"\n >\n <X size={16} />\n <span className=\"sr-only\">Close drawer</span>\n </Button>\n )}\n </div>\n )\n})\nDrawerHeader.displayName = \"DrawerHeader\"\n\n// Drawer Title\nconst DrawerTitle = React.forwardRef<\n HTMLHeadingElement,\n React.ComponentProps<\"h2\">\n>(({ className, ...props }, ref) => {\n return (\n <h2\n ref={ref}\n className={cn(\"text-lg font-semibold text-primary-accent\", className)}\n {...props}\n />\n )\n})\nDrawerTitle.displayName = \"DrawerTitle\"\n\n// Drawer Body/Content\nconst DrawerBody = React.forwardRef<\n HTMLDivElement,\n React.ComponentProps<\"div\">\n>(({ className, children, ...props }, ref) => {\n return (\n <ScrollArea className=\"flex-1\" ref={ref}>\n <div\n data-drawer=\"body\"\n className={cn(\"p-4\", className)}\n {...props}\n >\n {children}\n </div>\n </ScrollArea>\n )\n})\nDrawerBody.displayName = \"DrawerBody\"\n\n// Drawer Footer\nconst DrawerFooter = React.forwardRef<\n HTMLDivElement,\n React.ComponentProps<\"div\">\n>(({ className, ...props }, ref) => {\n return (\n <div\n ref={ref}\n data-drawer=\"footer\"\n className={cn(\n \"flex flex-col gap-2 p-4 border-t border-sidebar-border\",\n className\n )}\n {...props}\n />\n )\n})\nDrawerFooter.displayName = \"DrawerFooter\"\n\nexport {\n Drawer,\n DrawerHeader,\n DrawerTitle,\n DrawerBody,\n DrawerFooter,\n useDrawer,\n}\n"]}
@@ -1,3 +1,3 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } }"use client";
2
- var _chunkVBARF35Njs = require('./chunk-VBARF35N.js');var _react = require('react'); var d = _interopRequireWildcard(_react);var _reacttooltip = require('@radix-ui/react-tooltip'); var t = _interopRequireWildcard(_reacttooltip);var _jsxruntime = require('react/jsx-runtime');var s=t.Provider,f= exports.b =t.Root,P= exports.c =t.Trigger,n= exports.d =d.forwardRef(({className:i,sideOffset:e=4,asChild:r,...a},l)=>r?_jsxruntime.jsx.call(void 0, t.Portal,{children:_jsxruntime.jsx.call(void 0, t.Content,{ref:l,sideOffset:e,asChild:r,className:i,...a})}):_jsxruntime.jsx.call(void 0, t.Portal,{children:_jsxruntime.jsx.call(void 0, t.Content,{ref:l,sideOffset:e,className:_chunkVBARF35Njs.a.call(void 0, "z-50 overflow-hidden rounded-xl border border-border bg-tooltip px-4 py-2 text-sm text-primary-accent shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",i),...a})}));n.displayName=t.Content.displayName;exports.a = s; exports.b = f; exports.c = P; exports.d = n;
3
- //# sourceMappingURL=chunk-SN3YJA4C.js.map
2
+ var _chunkFUYXCJOQjs = require('./chunk-FUYXCJOQ.js');var _react = require('react'); var d = _interopRequireWildcard(_react);var _reacttooltip = require('@radix-ui/react-tooltip'); var t = _interopRequireWildcard(_reacttooltip);var _jsxruntime = require('react/jsx-runtime');var s=t.Provider,f= exports.b =t.Root,P= exports.c =t.Trigger,n= exports.d =d.forwardRef(({className:i,sideOffset:e=4,asChild:r,...a},l)=>r?_jsxruntime.jsx.call(void 0, t.Portal,{children:_jsxruntime.jsx.call(void 0, t.Content,{ref:l,sideOffset:e,asChild:r,className:i,...a})}):_jsxruntime.jsx.call(void 0, t.Portal,{children:_jsxruntime.jsx.call(void 0, t.Content,{ref:l,sideOffset:e,className:_chunkFUYXCJOQjs.a.call(void 0, "z-50 overflow-hidden rounded-xl border border-border bg-tooltip px-4 py-2 text-sm text-primary-accent shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",i),...a})}));n.displayName=t.Content.displayName;exports.a = s; exports.b = f; exports.c = P; exports.d = n;
3
+ //# sourceMappingURL=chunk-RRAIGAHU.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["/Users/aktoriukas/Documents/Projects/alkimi/alkimi-ui-kit/dist/chunk-RRAIGAHU.js","../src/components/tooltip.tsx"],"names":["TooltipProvider","Tooltip","TooltipTrigger","TooltipContent","className","sideOffset","asChild","props","ref","jsx","cn"],"mappings":"AAAA,uWAAY;AACZ,sDAAuC,uECChB,uGACW,+CAmB1B,IAfFA,CAAAA,CAAmC,CAAA,CAAA,QAAA,CAEnCC,CAAAA,aAA2B,CAAA,CAAA,IAAA,CAE3BC,CAAAA,aAAkC,CAAA,CAAA,OAAA,CAElCC,CAAAA,aAAuB,CAAA,CAAA,UAAA,CAG3B,CAAC,CAAE,SAAA,CAAAC,CAAAA,CAAW,UAAA,CAAAC,CAAAA,CAAa,CAAA,CAAG,OAAA,CAAAC,CAAAA,CAAS,GAAGC,CAAM,CAAA,CAAGC,CAAAA,CAAAA,EAG/CF,CAAAA,CAEAG,6BAAAA,CAAkB,CAAA,MAAA,CAAjB,CACC,QAAA,CAAAA,6BAAAA,CAAkB,CAAA,OAAA,CAAjB,CACC,GAAA,CAAKD,CAAAA,CACL,UAAA,CAAYH,CAAAA,CACZ,OAAA,CAASC,CAAAA,CACT,SAAA,CAAWF,CAAAA,CACV,GAAGG,CAAAA,CACN,CAAA,CACF,CAAA,CAMFE,6BAAAA,CAAkB,CAAA,MAAA,CAAjB,CACC,QAAA,CAAAA,6BAAAA,CAAkB,CAAA,OAAA,CAAjB,CACC,GAAA,CAAKD,CAAAA,CACL,UAAA,CAAYH,CAAAA,CACZ,SAAA,CAAWK,gCAAAA,4YACT,CACAN,CACF,CAAA,CACC,GAAGG,CAAAA,CACN,CAAA,CACF,CAEH,CAAA,CACDJ,CAAAA,CAAe,WAAA,CAA+B,CAAA,CAAA,OAAA,CAAQ,WAAA,CAAA,2DAAA","file":"/Users/aktoriukas/Documents/Projects/alkimi/alkimi-ui-kit/dist/chunk-RRAIGAHU.js","sourcesContent":[null,"\"use client\"\n\nimport * as React from \"react\"\nimport * as TooltipPrimitive from \"@radix-ui/react-tooltip\"\n\nimport { cn } from \"@/lib/utils\"\n\nconst TooltipProvider = TooltipPrimitive.Provider\n\nconst Tooltip = TooltipPrimitive.Root\n\nconst TooltipTrigger = TooltipPrimitive.Trigger\n\nconst TooltipContent = React.forwardRef<\n React.ElementRef<typeof TooltipPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof TooltipPrimitive.Content>\n>(({ className, sideOffset = 4, asChild, ...props }, ref) => {\n // When asChild is used, pass props through without default styling\n // The child component (e.g., Button) will receive the tooltip props directly\n if (asChild) {\n return (\n <TooltipPrimitive.Portal>\n <TooltipPrimitive.Content\n ref={ref}\n sideOffset={sideOffset}\n asChild={asChild}\n className={className}\n {...props}\n />\n </TooltipPrimitive.Portal>\n )\n }\n\n // Default tooltip styling when not using asChild\n return (\n <TooltipPrimitive.Portal>\n <TooltipPrimitive.Content\n ref={ref}\n sideOffset={sideOffset}\n className={cn(\n \"z-50 overflow-hidden rounded-xl border border-border bg-tooltip px-4 py-2 text-sm text-primary-accent shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2\",\n className\n )}\n {...props}\n />\n </TooltipPrimitive.Portal>\n )\n})\nTooltipContent.displayName = TooltipPrimitive.Content.displayName\n\nexport { Tooltip, TooltipTrigger, TooltipContent, TooltipProvider }\n"]}
@@ -1,3 +1,3 @@
1
1
  "use client";
2
2
  import{clsx as e}from"clsx";import{twMerge as t}from"tailwind-merge";function s(...r){return t(e(r))}export{s as a};
3
- //# sourceMappingURL=chunk-AJM7GGVC.mjs.map
3
+ //# sourceMappingURL=chunk-S5TKCF6T.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/lib/utils.ts"],"sourcesContent":["import { type ClassValue, clsx } from \"clsx\";\nimport { twMerge } from \"tailwind-merge\";\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs));\n}\n"],"mappings":";AAAA,OAA0B,QAAAA,MAAY,OACtC,OAAS,WAAAC,MAAe,iBAEjB,SAASC,KAAMC,EAAsB,CAC1C,OAAOF,EAAQD,EAAKG,CAAM,CAAC,CAC7B","names":["clsx","twMerge","cn","inputs"]}
@@ -1,3 +1,3 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } }"use client";
2
- var _chunkVBARF35Njs = require('./chunk-VBARF35N.js');var _react = require('react'); var r = _interopRequireWildcard(_react);var _jsxruntime = require('react/jsx-runtime');var s=r.forwardRef(({className:o,error:t,...a},i)=>_jsxruntime.jsx.call(void 0, "textarea",{className:_chunkVBARF35Njs.a.call(void 0, "flex my-2 min-h-[74px] w-full rounded-3xl border bg-background hover:bg-secondary px-4 py-2 text-sm text-primary-accent ring-offset-background placeholder:text-secondary-text focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",t?"border-destructive-foreground focus-visible:ring-destructive-foreground":"border-border",o),ref:i,...a}));s.displayName="Textarea";exports.a = s;
3
- //# sourceMappingURL=chunk-BUS3E5OY.js.map
2
+ var _chunkFUYXCJOQjs = require('./chunk-FUYXCJOQ.js');var _react = require('react'); var r = _interopRequireWildcard(_react);var _jsxruntime = require('react/jsx-runtime');var s=r.forwardRef(({className:o,error:t,...a},i)=>_jsxruntime.jsx.call(void 0, "textarea",{className:_chunkFUYXCJOQjs.a.call(void 0, "flex my-2 min-h-[74px] w-full rounded-3xl border bg-background hover:bg-secondary px-4 py-2 text-sm text-primary-accent ring-offset-background placeholder:text-secondary-text focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",t?"border-destructive-foreground focus-visible:ring-destructive-foreground":"border-border",o),ref:i,...a}));s.displayName="Textarea";exports.a = s;
3
+ //# sourceMappingURL=chunk-TDMRUCR6.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["/Users/aktoriukas/Documents/Projects/alkimi/alkimi-ui-kit/dist/chunk-TDMRUCR6.js","../src/components/textarea.tsx"],"names":["Textarea","className","error","props","ref","jsx","cn"],"mappings":"AAAA,uWAAY;AACZ,sDAAuC,uECDhB,+CAWjB,IAHAA,CAAAA,CAAiB,CAAA,CAAA,UAAA,CACrB,CAAC,CAAE,SAAA,CAAAC,CAAAA,CAAW,KAAA,CAAAC,CAAAA,CAAO,GAAGC,CAAM,CAAA,CAAGC,CAAAA,CAAAA,EAE7BC,6BAAAA,UAAC,CAAA,CACC,SAAA,CAAWC,gCAAAA,oUACT,CACAJ,CAAAA,CACI,yEAAA,CACA,eAAA,CACJD,CACF,CAAA,CACA,GAAA,CAAKG,CAAAA,CACJ,GAAGD,CAAAA,CACN,CAGN,CAAA,CACAH,CAAAA,CAAS,WAAA,CAAc,UAAA,CAAA,cAAA","file":"/Users/aktoriukas/Documents/Projects/alkimi/alkimi-ui-kit/dist/chunk-TDMRUCR6.js","sourcesContent":[null,"import * as React from \"react\"\n\nimport { cn } from \"@/lib/utils\"\n\nexport interface TextareaProps extends React.TextareaHTMLAttributes<HTMLTextAreaElement> {\n error?: boolean\n}\n\nconst Textarea = React.forwardRef<HTMLTextAreaElement, TextareaProps>(\n ({ className, error, ...props }, ref) => {\n return (\n <textarea\n className={cn(\n \"flex my-2 min-h-[74px] w-full rounded-3xl border bg-background hover:bg-secondary px-4 py-2 text-sm text-primary-accent ring-offset-background placeholder:text-secondary-text focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50\",\n error\n ? \"border-destructive-foreground focus-visible:ring-destructive-foreground\"\n : \"border-border\",\n className\n )}\n ref={ref}\n {...props}\n />\n )\n }\n)\nTextarea.displayName = \"Textarea\"\n\nexport { Textarea }\n"]}
@@ -1,3 +1,3 @@
1
1
  "use client";
2
- import{a as l}from"./chunk-N3ZLPC5C.mjs";import{a as m}from"./chunk-AJM7GGVC.mjs";import*as r from"react";import{CalendarIcon as R}from"lucide-react";import{format as p}from"date-fns";import*as o from"@radix-ui/react-popover";import{jsx as t,jsxs as f}from"react/jsx-runtime";var C=o.Root,x=o.Trigger,c=r.forwardRef(({className:e,align:a="start",sideOffset:n=4,...i},s)=>t(o.Portal,{children:t(o.Content,{ref:s,align:a,sideOffset:n,className:m("z-50 w-auto rounded-3xl border border-border bg-popover p-0 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...i})}));c.displayName=o.Content.displayName;var k=r.forwardRef(({dateRange:e,onDateRangeChange:a,placeholder:n="Pick a date range",disabled:i=!1,className:s,calendarProps:P,formatStr:d="LLL dd, y",numberOfMonths:u=2},v)=>{let[g,b]=r.useState(!1),y=()=>e?.from?e.to?`${p(e.from,d)} - ${p(e.to,d)}`:p(e.from,d):n;return f(C,{open:g,onOpenChange:b,modal:!0,children:[t(x,{asChild:!0,children:f("button",{ref:v,type:"button",className:m("flex my-2 h-9 w-full items-center rounded-3xl border border-border bg-background hover:bg-secondary px-4 py-2 text-sm text-primary-accent ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",!e?.from&&"text-secondary-text",s),disabled:i,children:[t(R,{className:"mr-2 h-4 w-4 shrink-0"}),t("span",{className:"truncate",children:y()})]})}),t(c,{className:"w-auto p-0",align:"start",children:t(l,{mode:"range",selected:e,onSelect:h=>{a?.(h)},defaultMonth:e?.from,numberOfMonths:u,...P})})]})});k.displayName="DateRangePicker";export{k as a};
3
- //# sourceMappingURL=chunk-LNIGQUON.mjs.map
2
+ import{a as l}from"./chunk-QMJVRGPB.mjs";import{a as m}from"./chunk-S5TKCF6T.mjs";import*as r from"react";import{CalendarIcon as R}from"lucide-react";import{format as p}from"date-fns";import*as o from"@radix-ui/react-popover";import{jsx as t,jsxs as f}from"react/jsx-runtime";var C=o.Root,x=o.Trigger,c=r.forwardRef(({className:e,align:a="start",sideOffset:n=4,...i},s)=>t(o.Portal,{children:t(o.Content,{ref:s,align:a,sideOffset:n,className:m("z-50 w-auto rounded-3xl border border-border bg-popover p-0 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...i})}));c.displayName=o.Content.displayName;var k=r.forwardRef(({dateRange:e,onDateRangeChange:a,placeholder:n="Pick a date range",disabled:i=!1,className:s,calendarProps:P,formatStr:d="LLL dd, y",numberOfMonths:u=2},v)=>{let[g,b]=r.useState(!1),y=()=>e?.from?e.to?`${p(e.from,d)} - ${p(e.to,d)}`:p(e.from,d):n;return f(C,{open:g,onOpenChange:b,modal:!0,children:[t(x,{asChild:!0,children:f("button",{ref:v,type:"button",className:m("flex my-2 h-9 w-full items-center rounded-3xl border border-border bg-background hover:bg-secondary px-4 py-2 text-sm text-primary-accent ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",!e?.from&&"text-secondary-text",s),disabled:i,children:[t(R,{className:"mr-2 h-4 w-4 shrink-0"}),t("span",{className:"truncate",children:y()})]})}),t(c,{className:"w-auto p-0",align:"start",children:t(l,{mode:"range",selected:e,onSelect:h=>{a?.(h)},defaultMonth:e?.from,numberOfMonths:u,...P})})]})});k.displayName="DateRangePicker";export{k as a};
3
+ //# sourceMappingURL=chunk-UAUSYTY4.mjs.map