@customafk/lunas-ui 0.0.80 → 0.0.82

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 (691) hide show
  1. package/dist/{add-new-DfniMrHa.js → add-new-BFJvt2an.js} +2 -2
  2. package/dist/add-new-BFJvt2an.js.map +1 -0
  3. package/dist/add-new-Bt5QaeJs.cjs +2 -0
  4. package/dist/add-new-Bt5QaeJs.cjs.map +1 -0
  5. package/dist/alert-dialog-B-m2RVMu.cjs +2 -0
  6. package/dist/alert-dialog-B-m2RVMu.cjs.map +1 -0
  7. package/dist/{alert-dialog-UwGNuTYk.js → alert-dialog-DcQKEgVC.js} +1 -1
  8. package/dist/alert-dialog-DcQKEgVC.js.map +1 -0
  9. package/dist/avatar-DmMCBvb6.cjs +2 -0
  10. package/dist/avatar-DmMCBvb6.cjs.map +1 -0
  11. package/dist/avatar-iX5Jhj8E.js.map +1 -1
  12. package/dist/badge-AM9m3CFI.cjs +2 -0
  13. package/dist/badge-AM9m3CFI.cjs.map +1 -0
  14. package/dist/badge-tjlLdDGl.js.map +1 -1
  15. package/dist/button-BaLuKPtr.cjs +2 -0
  16. package/dist/button-BaLuKPtr.cjs.map +1 -0
  17. package/dist/{button-DhQJ9Ey8.js → button-CYsnwc1-.js} +2 -2
  18. package/dist/button-CYsnwc1-.js.map +1 -0
  19. package/dist/{button-CGIJb6H5.d.cts → button-D6hzitQh.d.cts} +6 -6
  20. package/dist/{button-BdYhnlA1.d.ts → button-DKcU4dim.d.ts} +6 -6
  21. package/dist/button-variants-DdVxfrSx.cjs +2 -0
  22. package/dist/button-variants-DdVxfrSx.cjs.map +1 -0
  23. package/dist/button-variants-Y1GTBayz.js.map +1 -1
  24. package/dist/calendar-C4zLgISS.cjs +2 -0
  25. package/dist/calendar-C4zLgISS.cjs.map +1 -0
  26. package/dist/{calendar-C2yGJ9AV.js → calendar-Dmq8I1ey.js} +2 -2
  27. package/dist/calendar-Dmq8I1ey.js.map +1 -0
  28. package/dist/card-CkKO-0o0.cjs +2 -0
  29. package/dist/card-CkKO-0o0.cjs.map +1 -0
  30. package/dist/card-DOv2mZU8.js.map +1 -1
  31. package/dist/cards/grid-product-card.cjs +1 -1
  32. package/dist/cards/grid-product-card.cjs.map +1 -1
  33. package/dist/cards/grid-product-card.js +1 -1
  34. package/dist/cards/grid-product-card.js.map +1 -1
  35. package/dist/cards/product-card.cjs +1 -1
  36. package/dist/cards/product-card.cjs.map +1 -1
  37. package/dist/cards/product-card.js +1 -1
  38. package/dist/cards/product-card.js.map +1 -1
  39. package/dist/cards/simple-card.cjs +1 -1
  40. package/dist/cards/simple-card.cjs.map +1 -1
  41. package/dist/cards/simple-card.js.map +1 -1
  42. package/dist/{command-BWvqtwPS.d.cts → command-BCHEIInv.d.cts} +12 -12
  43. package/dist/command-C13pL2M3.cjs +2 -0
  44. package/dist/command-C13pL2M3.cjs.map +1 -0
  45. package/dist/{command-B23xCgK_.d.ts → command-KnD1dAzj.d.ts} +12 -12
  46. package/dist/{command-DhSE6UaR.js → command-UXLmHGja.js} +2 -2
  47. package/dist/command-UXLmHGja.js.map +1 -0
  48. package/dist/data-display/country.cjs +1 -1
  49. package/dist/data-display/country.cjs.map +1 -1
  50. package/dist/data-display/country.d.ts +1 -1
  51. package/dist/data-display/country.js.map +1 -1
  52. package/dist/data-display/data-list.cjs +1 -1
  53. package/dist/data-display/data-list.cjs.map +1 -1
  54. package/dist/data-display/data-list.js.map +1 -1
  55. package/dist/data-display/date-tooltip.cjs +1 -1
  56. package/dist/data-display/date-tooltip.cjs.map +1 -1
  57. package/dist/data-display/date-tooltip.js +1 -1
  58. package/dist/data-display/date-tooltip.js.map +1 -1
  59. package/dist/data-display/date.cjs +1 -1
  60. package/dist/data-display/date.js +1 -1
  61. package/dist/data-display/empty.cjs +1 -1
  62. package/dist/data-display/empty.cjs.map +1 -1
  63. package/dist/data-display/empty.d.cts +2 -2
  64. package/dist/data-display/empty.js.map +1 -1
  65. package/dist/data-display/name.cjs +1 -1
  66. package/dist/data-display/name.cjs.map +1 -1
  67. package/dist/data-display/name.js.map +1 -1
  68. package/dist/data-display/phone-number.cjs +1 -1
  69. package/dist/data-display/phone-number.cjs.map +1 -1
  70. package/dist/data-display/phone-number.js.map +1 -1
  71. package/dist/data-display/role-badge.cjs +1 -1
  72. package/dist/data-display/role-badge.cjs.map +1 -1
  73. package/dist/data-display/role-badge.d.ts +1 -1
  74. package/dist/data-display/role-badge.js.map +1 -1
  75. package/dist/data-display/statistic.cjs +1 -1
  76. package/dist/data-display/statistic.cjs.map +1 -1
  77. package/dist/data-display/statistic.d.ts +2 -2
  78. package/dist/data-display/statistic.js +1 -1
  79. package/dist/data-display/statistic.js.map +1 -1
  80. package/dist/data-display/user.cjs +1 -1
  81. package/dist/data-display/user.cjs.map +1 -1
  82. package/dist/data-display/user.js.map +1 -1
  83. package/dist/date-BEyT-xKi.cjs +2 -0
  84. package/dist/date-BEyT-xKi.cjs.map +1 -0
  85. package/dist/{date-BuPl--Fc.js → date-CgzMwDPN.js} +2 -2
  86. package/dist/date-CgzMwDPN.js.map +1 -0
  87. package/dist/{dialog-B2LS2JLb.js → dialog-BAlJ18xi.js} +1 -1
  88. package/dist/dialog-BAlJ18xi.js.map +1 -0
  89. package/dist/dialog-BBODhbxh.cjs +2 -0
  90. package/dist/dialog-BBODhbxh.cjs.map +1 -0
  91. package/dist/{dialog-Dn2Q-QRw.d.ts → dialog-MCM90IpD.d.cts} +12 -12
  92. package/dist/{dialog-BFtz_6mv.d.cts → dialog-lKVaxcfs.d.ts} +12 -12
  93. package/dist/dialogs/confirm-dialog.cjs +1 -1
  94. package/dist/dialogs/confirm-dialog.cjs.map +1 -1
  95. package/dist/dialogs/confirm-dialog.js +1 -1
  96. package/dist/dialogs/confirm-dialog.js.map +1 -1
  97. package/dist/dialogs/detail-dialog/component/sidebar.cjs +1 -1
  98. package/dist/dialogs/detail-dialog/component/sidebar.d.cts +30 -30
  99. package/dist/dialogs/detail-dialog/component/sidebar.d.ts +30 -30
  100. package/dist/dialogs/detail-dialog/component/sidebar.js +1 -1
  101. package/dist/dialogs/detail-dialog/index.cjs +1 -1
  102. package/dist/dialogs/detail-dialog/index.cjs.map +1 -1
  103. package/dist/dialogs/detail-dialog/index.js +1 -1
  104. package/dist/dialogs/detail-dialog/index.js.map +1 -1
  105. package/dist/dialogs/error-dialog.cjs +1 -1
  106. package/dist/dialogs/error-dialog.js +1 -1
  107. package/dist/dialogs/form-dialog.cjs +1 -1
  108. package/dist/dialogs/form-dialog.cjs.map +1 -1
  109. package/dist/dialogs/form-dialog.d.cts +2 -2
  110. package/dist/dialogs/form-dialog.d.ts +2 -2
  111. package/dist/dialogs/form-dialog.js +1 -1
  112. package/dist/dialogs/form-dialog.js.map +1 -1
  113. package/dist/dialogs/loading-dialog.cjs +1 -1
  114. package/dist/dialogs/loading-dialog.cjs.map +1 -1
  115. package/dist/dialogs/loading-dialog.js +1 -1
  116. package/dist/dialogs/loading-dialog.js.map +1 -1
  117. package/dist/{dist-CkzytVha.js → dist-BgkALM7U.js} +2 -2
  118. package/dist/{dist-CkzytVha.js.map → dist-BgkALM7U.js.map} +1 -1
  119. package/dist/dist-CAevLI5t.cjs +2 -0
  120. package/dist/{dist-D0uO1qIz.cjs.map → dist-CAevLI5t.cjs.map} +1 -1
  121. package/dist/drawer-70cz3SPB.cjs +2 -0
  122. package/dist/drawer-70cz3SPB.cjs.map +1 -0
  123. package/dist/{drawer-COD1n5aA.js → drawer-DRC3X2-U.js} +1 -1
  124. package/dist/drawer-DRC3X2-U.js.map +1 -0
  125. package/dist/dropdown-menu-Bb68Wd6J.cjs +2 -0
  126. package/dist/dropdown-menu-Bb68Wd6J.cjs.map +1 -0
  127. package/dist/{dropdown-menu-Brlye320.js → dropdown-menu-DtEPAmMV.js} +1 -1
  128. package/dist/dropdown-menu-DtEPAmMV.js.map +1 -0
  129. package/dist/{error-dialog-BF1VNZXk.js → error-dialog-BeYJOtSH.js} +2 -2
  130. package/dist/error-dialog-BeYJOtSH.js.map +1 -0
  131. package/dist/error-dialog-bra3vccX.cjs +2 -0
  132. package/dist/error-dialog-bra3vccX.cjs.map +1 -0
  133. package/dist/field-A43YZ5Wj.cjs +2 -0
  134. package/dist/field-A43YZ5Wj.cjs.map +1 -0
  135. package/dist/field-CGacT8J3.js +2 -0
  136. package/dist/field-CGacT8J3.js.map +1 -0
  137. package/dist/flex-B4klVEz9.cjs +2 -0
  138. package/dist/flex-B4klVEz9.cjs.map +1 -0
  139. package/dist/flex-D6XrXRQW.js.map +1 -1
  140. package/dist/form-B_tL9lO4.js +2 -0
  141. package/dist/form-B_tL9lO4.js.map +1 -0
  142. package/dist/form-DV9tQbiO.cjs +2 -0
  143. package/dist/form-DV9tQbiO.cjs.map +1 -0
  144. package/dist/form-wrapper-BKTvSrZY.js +2 -0
  145. package/dist/form-wrapper-BKTvSrZY.js.map +1 -0
  146. package/dist/form-wrapper-vue82rfg.cjs +2 -0
  147. package/dist/form-wrapper-vue82rfg.cjs.map +1 -0
  148. package/dist/forms/combobox-field.cjs +1 -1
  149. package/dist/forms/combobox-field.cjs.map +1 -1
  150. package/dist/forms/combobox-field.d.cts +2 -2
  151. package/dist/forms/combobox-field.d.ts +2 -2
  152. package/dist/forms/combobox-field.js +1 -1
  153. package/dist/forms/combobox-field.js.map +1 -1
  154. package/dist/forms/date-field.cjs +1 -1
  155. package/dist/forms/date-field.cjs.map +1 -1
  156. package/dist/forms/date-field.d.cts +2 -2
  157. package/dist/forms/date-field.d.ts +2 -2
  158. package/dist/forms/date-field.js +1 -1
  159. package/dist/forms/date-field.js.map +1 -1
  160. package/dist/forms/form-wrapper.cjs +1 -1
  161. package/dist/forms/form-wrapper.d.cts +6 -2
  162. package/dist/forms/form-wrapper.d.ts +6 -2
  163. package/dist/forms/form-wrapper.js +1 -1
  164. package/dist/forms/multi-select-field.cjs +1 -1
  165. package/dist/forms/multi-select-field.cjs.map +1 -1
  166. package/dist/forms/multi-select-field.d.cts +4 -2
  167. package/dist/forms/multi-select-field.d.ts +4 -2
  168. package/dist/forms/multi-select-field.js +1 -1
  169. package/dist/forms/multi-select-field.js.map +1 -1
  170. package/dist/forms/number-field.cjs +1 -1
  171. package/dist/forms/number-field.cjs.map +1 -1
  172. package/dist/forms/number-field.d.cts +2 -2
  173. package/dist/forms/number-field.d.ts +2 -2
  174. package/dist/forms/number-field.js +1 -1
  175. package/dist/forms/number-field.js.map +1 -1
  176. package/dist/forms/password-field.cjs +1 -1
  177. package/dist/forms/password-field.cjs.map +1 -1
  178. package/dist/forms/password-field.d.cts +2 -2
  179. package/dist/forms/password-field.d.ts +2 -2
  180. package/dist/forms/password-field.js +1 -1
  181. package/dist/forms/password-field.js.map +1 -1
  182. package/dist/forms/select-field.cjs +1 -1
  183. package/dist/forms/select-field.cjs.map +1 -1
  184. package/dist/forms/select-field.d.cts +2 -2
  185. package/dist/forms/select-field.d.ts +2 -2
  186. package/dist/forms/select-field.js +1 -1
  187. package/dist/forms/select-field.js.map +1 -1
  188. package/dist/forms/switch-field.cjs +1 -1
  189. package/dist/forms/switch-field.cjs.map +1 -1
  190. package/dist/forms/switch-field.d.cts +4 -2
  191. package/dist/forms/switch-field.d.ts +4 -2
  192. package/dist/forms/switch-field.js +1 -1
  193. package/dist/forms/switch-field.js.map +1 -1
  194. package/dist/forms/text-field.cjs +1 -1
  195. package/dist/forms/text-field.cjs.map +1 -1
  196. package/dist/forms/text-field.d.cts +2 -2
  197. package/dist/forms/text-field.d.ts +2 -2
  198. package/dist/forms/text-field.js +1 -1
  199. package/dist/forms/text-field.js.map +1 -1
  200. package/dist/forms/textarea-field.cjs +1 -1
  201. package/dist/forms/textarea-field.cjs.map +1 -1
  202. package/dist/forms/textarea-field.d.cts +2 -2
  203. package/dist/forms/textarea-field.d.ts +2 -2
  204. package/dist/forms/textarea-field.js +1 -1
  205. package/dist/forms/textarea-field.js.map +1 -1
  206. package/dist/image-C0mClPAY.cjs +2 -0
  207. package/dist/image-C0mClPAY.cjs.map +1 -0
  208. package/dist/image-CiQhTTyt.js.map +1 -1
  209. package/dist/{input-BtT8HfYE.js → input-BStypTnq.js} +1 -1
  210. package/dist/input-BStypTnq.js.map +1 -0
  211. package/dist/{input-CwuYXUPY.d.ts → input-BbxBfHG5.d.ts} +3 -3
  212. package/dist/input-D_tClptL.cjs +2 -0
  213. package/dist/input-D_tClptL.cjs.map +1 -0
  214. package/dist/{input-Kq2bOgsM.d.cts → input-EieQSty7.d.cts} +3 -3
  215. package/dist/label-Bfd7VFEe.d.cts +11 -0
  216. package/dist/label-CdrxlBJ8.js.map +1 -1
  217. package/dist/label-D6mAvVmw.cjs +2 -0
  218. package/dist/label-D6mAvVmw.cjs.map +1 -0
  219. package/dist/label-DlBHUp00.d.ts +11 -0
  220. package/dist/layouts/app-layout/index.cjs +1 -1
  221. package/dist/layouts/app-layout/index.cjs.map +1 -1
  222. package/dist/layouts/app-layout/index.d.cts +28 -28
  223. package/dist/layouts/app-layout/index.d.ts +28 -28
  224. package/dist/layouts/app-layout/index.js +1 -1
  225. package/dist/layouts/app-layout/index.js.map +1 -1
  226. package/dist/layouts/flex.cjs +1 -1
  227. package/dist/layouts/flex.d.cts +2 -2
  228. package/dist/layouts/grid.cjs +1 -1
  229. package/dist/layouts/grid.cjs.map +1 -1
  230. package/dist/layouts/grid.js.map +1 -1
  231. package/dist/layouts/service-layout/index.cjs +1 -1
  232. package/dist/layouts/service-layout/index.cjs.map +1 -1
  233. package/dist/layouts/service-layout/index.d.cts +15 -15
  234. package/dist/layouts/service-layout/index.d.ts +15 -15
  235. package/dist/layouts/service-layout/index.js +1 -1
  236. package/dist/layouts/service-layout/index.js.map +1 -1
  237. package/dist/multi-select-C66U77ON.js +2 -0
  238. package/dist/multi-select-C66U77ON.js.map +1 -0
  239. package/dist/multi-select-D38JwSYL.cjs +2 -0
  240. package/dist/multi-select-D38JwSYL.cjs.map +1 -0
  241. package/dist/paragraph-B9fp9JaI.js.map +1 -1
  242. package/dist/paragraph-Q7vk3BSp.cjs +2 -0
  243. package/dist/paragraph-Q7vk3BSp.cjs.map +1 -0
  244. package/dist/{popover-BJWOgxQ5.js → popover-BnzoeyDG.js} +1 -1
  245. package/dist/popover-BnzoeyDG.js.map +1 -0
  246. package/dist/popover-D6vyPDKA.cjs +2 -0
  247. package/dist/popover-D6vyPDKA.cjs.map +1 -0
  248. package/dist/progress-BUlcGaLz.cjs +2 -0
  249. package/dist/progress-BUlcGaLz.cjs.map +1 -0
  250. package/dist/{progress-DzBPViJg.js → progress-DwLEMPaO.js} +1 -1
  251. package/dist/progress-DwLEMPaO.js.map +1 -0
  252. package/dist/{refresh-BiOPtbhd.js → refresh-CMQ49ae4.js} +2 -2
  253. package/dist/refresh-CMQ49ae4.js.map +1 -0
  254. package/dist/refresh-CvvD6Ckf.cjs +2 -0
  255. package/dist/refresh-CvvD6Ckf.cjs.map +1 -0
  256. package/dist/scroll-area-C_MkdpKg.cjs +2 -0
  257. package/dist/scroll-area-C_MkdpKg.cjs.map +1 -0
  258. package/dist/{scroll-area-BJYI14s5.js → scroll-area-DFENklE1.js} +1 -1
  259. package/dist/scroll-area-DFENklE1.js.map +1 -0
  260. package/dist/{search-input--FQFzdW3.js → search-input-BI1RjMuQ.js} +2 -2
  261. package/dist/search-input-BI1RjMuQ.js.map +1 -0
  262. package/dist/search-input-ryU0Mvaa.cjs +2 -0
  263. package/dist/search-input-ryU0Mvaa.cjs.map +1 -0
  264. package/dist/{select-Di8fOKVF.js → select-B8sXsuUI.js} +1 -1
  265. package/dist/select-B8sXsuUI.js.map +1 -0
  266. package/dist/select-BD7dul2u.cjs +2 -0
  267. package/dist/select-BD7dul2u.cjs.map +1 -0
  268. package/dist/{separator-mZ8r56s2.d.cts → separator-BBWO-2XW.d.cts} +3 -3
  269. package/dist/{separator-C7HQ2ThL.js → separator-D17HxS2f.js} +1 -1
  270. package/dist/separator-D17HxS2f.js.map +1 -0
  271. package/dist/separator-DMMoR-d2.cjs +2 -0
  272. package/dist/separator-DMMoR-d2.cjs.map +1 -0
  273. package/dist/{separator-C4wU5Rr6.d.ts → separator-LYCmJYd5.d.ts} +3 -3
  274. package/dist/{sheet-E0gvN9Gp.js → sheet-BhyEuJtA.js} +1 -1
  275. package/dist/sheet-BhyEuJtA.js.map +1 -0
  276. package/dist/sheet-Bua5MlcG.cjs +2 -0
  277. package/dist/sheet-Bua5MlcG.cjs.map +1 -0
  278. package/dist/sidebar-BgMpq73J.cjs +2 -0
  279. package/dist/sidebar-BgMpq73J.cjs.map +1 -0
  280. package/dist/{sidebar-CBEPWmnf.js → sidebar-Bs42CUTZ.js} +2 -2
  281. package/dist/sidebar-Bs42CUTZ.js.map +1 -0
  282. package/dist/skeleton-BC2E_ohw.cjs +2 -0
  283. package/dist/skeleton-BC2E_ohw.cjs.map +1 -0
  284. package/dist/skeleton-ByN-MrQO.js.map +1 -1
  285. package/dist/{switch-C7foFKpS.js → switch-DwBg-iL4.js} +1 -1
  286. package/dist/switch-DwBg-iL4.js.map +1 -0
  287. package/dist/switch-o_YbWKw4.cjs +2 -0
  288. package/dist/switch-o_YbWKw4.cjs.map +1 -0
  289. package/dist/systems/google.cjs +1 -1
  290. package/dist/systems/google.cjs.map +1 -1
  291. package/dist/systems/google.js +1 -1
  292. package/dist/systems/google.js.map +1 -1
  293. package/dist/table/index.cjs +1 -1
  294. package/dist/table/index.cjs.map +1 -1
  295. package/dist/table/index.d.cts +2 -2
  296. package/dist/table/index.d.ts +2 -2
  297. package/dist/table/index.js +1 -1
  298. package/dist/table/index.js.map +1 -1
  299. package/dist/{table-CKNAm27W.js → table-Cd75vfQ4.js} +1 -1
  300. package/dist/table-Cd75vfQ4.js.map +1 -0
  301. package/dist/table-fp-VtGFA.cjs +2 -0
  302. package/dist/table-fp-VtGFA.cjs.map +1 -0
  303. package/dist/{tabs-D4uObFGW.js → tabs-BVCzl3vY.js} +1 -1
  304. package/dist/tabs-BVCzl3vY.js.map +1 -0
  305. package/dist/tabs-D7oadnxg.cjs +2 -0
  306. package/dist/tabs-D7oadnxg.cjs.map +1 -0
  307. package/dist/textarea-BHME8i5L.cjs +2 -0
  308. package/dist/textarea-BHME8i5L.cjs.map +1 -0
  309. package/dist/{textarea-n8OO0QsI.js → textarea-TGDtYde1.js} +1 -1
  310. package/dist/textarea-TGDtYde1.js.map +1 -0
  311. package/dist/title-Wrzpw9RM.cjs +2 -0
  312. package/dist/title-Wrzpw9RM.cjs.map +1 -0
  313. package/dist/{title-itXqz0us.js → title-Zqs6skyV.js} +1 -1
  314. package/dist/title-Zqs6skyV.js.map +1 -0
  315. package/dist/{toggle-DuNq0es1.js → toggle-AOoz4VtN.js} +1 -1
  316. package/dist/toggle-AOoz4VtN.js.map +1 -0
  317. package/dist/{toggle-DYeyKWVE.d.cts → toggle-Bhwgx-y_.d.cts} +5 -5
  318. package/dist/toggle-D252Z_vH.cjs +2 -0
  319. package/dist/toggle-D252Z_vH.cjs.map +1 -0
  320. package/dist/{toggle-DPTA8XO2.d.ts → toggle-DaTd0CKm.d.ts} +5 -5
  321. package/dist/{tooltip-DijjzZk1.d.cts → tooltip-B3mrjes6.d.cts} +6 -6
  322. package/dist/tooltip-BTrjCwd8.js.map +1 -1
  323. package/dist/{tooltip-Dt83PTkc.d.ts → tooltip-IMUjBDRr.d.ts} +6 -6
  324. package/dist/tooltip-uaF-pxx8.cjs +2 -0
  325. package/dist/tooltip-uaF-pxx8.cjs.map +1 -0
  326. package/dist/{types-BHVCAwAo.d.ts → types-BcE2RjTJ.d.ts} +1 -1
  327. package/dist/types-BiiGENwa.js.map +1 -1
  328. package/dist/types-D32qXHff.cjs.map +1 -1
  329. package/dist/typography/paragraph.cjs +1 -1
  330. package/dist/typography/paragraph.d.cts +2 -2
  331. package/dist/typography/paragraph.d.ts +2 -2
  332. package/dist/typography/title.cjs +1 -1
  333. package/dist/typography/title.d.cts +2 -2
  334. package/dist/typography/title.d.ts +2 -2
  335. package/dist/typography/title.js +1 -1
  336. package/dist/ui/alert-dialog.cjs +1 -1
  337. package/dist/ui/alert-dialog.d.cts +12 -12
  338. package/dist/ui/alert-dialog.d.ts +12 -12
  339. package/dist/ui/alert-dialog.js +1 -1
  340. package/dist/ui/alert.cjs +1 -1
  341. package/dist/ui/alert.cjs.map +1 -1
  342. package/dist/ui/alert.d.cts +6 -6
  343. package/dist/ui/alert.d.ts +6 -6
  344. package/dist/ui/alert.js.map +1 -1
  345. package/dist/ui/aspect-ratio.cjs +1 -1
  346. package/dist/ui/aspect-ratio.cjs.map +1 -1
  347. package/dist/ui/aspect-ratio.d.cts +2 -2
  348. package/dist/ui/aspect-ratio.d.ts +2 -2
  349. package/dist/ui/aspect-ratio.js.map +1 -1
  350. package/dist/ui/avatar.cjs +1 -1
  351. package/dist/ui/avatar.d.cts +4 -4
  352. package/dist/ui/avatar.d.ts +4 -4
  353. package/dist/ui/badge.cjs +1 -1
  354. package/dist/ui/badge.d.cts +2 -2
  355. package/dist/ui/badge.d.ts +4 -4
  356. package/dist/ui/breadcrumb.cjs +1 -1
  357. package/dist/ui/breadcrumb.cjs.map +1 -1
  358. package/dist/ui/breadcrumb.d.cts +8 -8
  359. package/dist/ui/breadcrumb.d.ts +8 -8
  360. package/dist/ui/breadcrumb.js +1 -1
  361. package/dist/ui/breadcrumb.js.map +1 -1
  362. package/dist/ui/button-group.cjs +2 -0
  363. package/dist/ui/button-group.cjs.map +1 -0
  364. package/dist/ui/button-group.d.cts +29 -0
  365. package/dist/ui/button-group.d.ts +29 -0
  366. package/dist/ui/button-group.js +2 -0
  367. package/dist/ui/button-group.js.map +1 -0
  368. package/dist/ui/button.cjs +1 -1
  369. package/dist/ui/button.d.cts +1 -1
  370. package/dist/ui/button.d.ts +1 -1
  371. package/dist/ui/button.js +1 -1
  372. package/dist/ui/buttons/add-new.cjs +1 -1
  373. package/dist/ui/buttons/add-new.js +1 -1
  374. package/dist/ui/buttons/edit.cjs +1 -1
  375. package/dist/ui/buttons/edit.cjs.map +1 -1
  376. package/dist/ui/buttons/edit.js +1 -1
  377. package/dist/ui/buttons/edit.js.map +1 -1
  378. package/dist/ui/buttons/refresh.cjs +1 -1
  379. package/dist/ui/buttons/refresh.js +1 -1
  380. package/dist/ui/buttons/trash.cjs +1 -1
  381. package/dist/ui/buttons/trash.cjs.map +1 -1
  382. package/dist/ui/buttons/trash.js +1 -1
  383. package/dist/ui/buttons/trash.js.map +1 -1
  384. package/dist/ui/buttons/upload-image.cjs +1 -1
  385. package/dist/ui/buttons/upload-image.cjs.map +1 -1
  386. package/dist/ui/buttons/upload-image.js +1 -1
  387. package/dist/ui/buttons/upload-image.js.map +1 -1
  388. package/dist/ui/calendar.cjs +1 -1
  389. package/dist/ui/calendar.d.cts +4 -4
  390. package/dist/ui/calendar.d.ts +4 -4
  391. package/dist/ui/calendar.js +1 -1
  392. package/dist/ui/card.cjs +1 -1
  393. package/dist/ui/card.d.cts +8 -8
  394. package/dist/ui/card.d.ts +8 -8
  395. package/dist/ui/carousel.cjs +1 -1
  396. package/dist/ui/carousel.cjs.map +1 -1
  397. package/dist/ui/carousel.d.cts +7 -7
  398. package/dist/ui/carousel.d.ts +7 -7
  399. package/dist/ui/carousel.js +1 -1
  400. package/dist/ui/carousel.js.map +1 -1
  401. package/dist/ui/collapsible.cjs +1 -1
  402. package/dist/ui/collapsible.cjs.map +1 -1
  403. package/dist/ui/collapsible.d.cts +4 -4
  404. package/dist/ui/collapsible.d.ts +4 -4
  405. package/dist/ui/collapsible.js.map +1 -1
  406. package/dist/ui/command.cjs +1 -1
  407. package/dist/ui/command.d.cts +2 -2
  408. package/dist/ui/command.d.ts +2 -2
  409. package/dist/ui/command.js +1 -1
  410. package/dist/ui/context-menu.cjs +1 -1
  411. package/dist/ui/context-menu.cjs.map +1 -1
  412. package/dist/ui/context-menu.d.cts +16 -16
  413. package/dist/ui/context-menu.d.ts +16 -16
  414. package/dist/ui/context-menu.js.map +1 -1
  415. package/dist/ui/dialog.cjs +1 -1
  416. package/dist/ui/dialog.d.cts +1 -1
  417. package/dist/ui/dialog.d.ts +1 -1
  418. package/dist/ui/dialog.js +1 -1
  419. package/dist/ui/dropdown-menu.cjs +1 -1
  420. package/dist/ui/dropdown-menu.d.cts +16 -16
  421. package/dist/ui/dropdown-menu.d.ts +16 -16
  422. package/dist/ui/dropdown-menu.js +1 -1
  423. package/dist/ui/empty.cjs +2 -0
  424. package/dist/ui/empty.cjs.map +1 -0
  425. package/dist/ui/empty.d.cts +36 -0
  426. package/dist/ui/empty.d.ts +36 -0
  427. package/dist/ui/empty.js +2 -0
  428. package/dist/ui/empty.js.map +1 -0
  429. package/dist/ui/field.cjs +1 -0
  430. package/dist/ui/field.d.cts +65 -0
  431. package/dist/ui/field.d.ts +65 -0
  432. package/dist/ui/field.js +1 -0
  433. package/dist/ui/file-uploader.cjs +1 -1
  434. package/dist/ui/file-uploader.cjs.map +1 -1
  435. package/dist/ui/file-uploader.d.cts +2 -2
  436. package/dist/ui/file-uploader.d.ts +2 -2
  437. package/dist/ui/file-uploader.js +1 -1
  438. package/dist/ui/file-uploader.js.map +1 -1
  439. package/dist/ui/form.cjs +1 -1
  440. package/dist/ui/form.d.cts +7 -8
  441. package/dist/ui/form.d.ts +7 -8
  442. package/dist/ui/form.js +1 -1
  443. package/dist/ui/hover-card.cjs +1 -1
  444. package/dist/ui/hover-card.cjs.map +1 -1
  445. package/dist/ui/hover-card.d.cts +4 -4
  446. package/dist/ui/hover-card.d.ts +4 -4
  447. package/dist/ui/hover-card.js.map +1 -1
  448. package/dist/ui/image.cjs +1 -1
  449. package/dist/ui/input-otp.cjs +1 -1
  450. package/dist/ui/input-otp.cjs.map +1 -1
  451. package/dist/ui/input-otp.d.cts +5 -5
  452. package/dist/ui/input-otp.d.ts +5 -5
  453. package/dist/ui/input-otp.js +1 -1
  454. package/dist/ui/input-otp.js.map +1 -1
  455. package/dist/ui/input.cjs +1 -1
  456. package/dist/ui/input.d.cts +1 -1
  457. package/dist/ui/input.d.ts +1 -1
  458. package/dist/ui/input.js +1 -1
  459. package/dist/ui/inputs/search-input.cjs +1 -1
  460. package/dist/ui/inputs/search-input.d.cts +3 -3
  461. package/dist/ui/inputs/search-input.d.ts +3 -3
  462. package/dist/ui/inputs/search-input.js +1 -1
  463. package/dist/ui/item.cjs +2 -0
  464. package/dist/ui/item.cjs.map +1 -0
  465. package/dist/ui/item.d.cts +62 -0
  466. package/dist/ui/item.d.ts +62 -0
  467. package/dist/ui/item.js +2 -0
  468. package/dist/ui/item.js.map +1 -0
  469. package/dist/ui/label.cjs +1 -1
  470. package/dist/ui/label.d.cts +2 -11
  471. package/dist/ui/label.d.ts +2 -11
  472. package/dist/ui/menubar.cjs +1 -1
  473. package/dist/ui/menubar.cjs.map +1 -1
  474. package/dist/ui/menubar.d.cts +17 -17
  475. package/dist/ui/menubar.d.ts +17 -17
  476. package/dist/ui/menubar.js.map +1 -1
  477. package/dist/ui/multi-select.cjs +1 -1
  478. package/dist/ui/multi-select.d.cts +2 -2
  479. package/dist/ui/multi-select.d.ts +2 -2
  480. package/dist/ui/multi-select.js +1 -1
  481. package/dist/ui/navigation-menu.cjs +1 -1
  482. package/dist/ui/navigation-menu.cjs.map +1 -1
  483. package/dist/ui/navigation-menu.d.cts +11 -11
  484. package/dist/ui/navigation-menu.d.ts +11 -11
  485. package/dist/ui/navigation-menu.js.map +1 -1
  486. package/dist/ui/pagination.cjs +1 -1
  487. package/dist/ui/pagination.cjs.map +1 -1
  488. package/dist/ui/pagination.d.cts +9 -9
  489. package/dist/ui/pagination.d.ts +9 -9
  490. package/dist/ui/pagination.js +1 -1
  491. package/dist/ui/pagination.js.map +1 -1
  492. package/dist/ui/popover.cjs +1 -1
  493. package/dist/ui/popover.d.cts +5 -5
  494. package/dist/ui/popover.d.ts +5 -5
  495. package/dist/ui/popover.js +1 -1
  496. package/dist/ui/progress.cjs +1 -1
  497. package/dist/ui/progress.d.cts +2 -2
  498. package/dist/ui/progress.d.ts +2 -2
  499. package/dist/ui/progress.js +1 -1
  500. package/dist/ui/radio-group.cjs +1 -1
  501. package/dist/ui/radio-group.cjs.map +1 -1
  502. package/dist/ui/radio-group.d.cts +3 -3
  503. package/dist/ui/radio-group.d.ts +3 -3
  504. package/dist/ui/radio-group.js.map +1 -1
  505. package/dist/ui/resizable.cjs +1 -1
  506. package/dist/ui/resizable.cjs.map +1 -1
  507. package/dist/ui/resizable.d.cts +4 -4
  508. package/dist/ui/resizable.d.ts +4 -4
  509. package/dist/ui/resizable.js.map +1 -1
  510. package/dist/ui/scroll-area.cjs +1 -1
  511. package/dist/ui/scroll-area.d.cts +3 -3
  512. package/dist/ui/scroll-area.d.ts +3 -3
  513. package/dist/ui/scroll-area.js +1 -1
  514. package/dist/ui/select.cjs +1 -1
  515. package/dist/ui/select.d.cts +11 -11
  516. package/dist/ui/select.d.ts +11 -11
  517. package/dist/ui/select.js +1 -1
  518. package/dist/ui/separator.cjs +1 -1
  519. package/dist/ui/separator.d.cts +1 -1
  520. package/dist/ui/separator.d.ts +1 -1
  521. package/dist/ui/separator.js +1 -1
  522. package/dist/ui/sheet.cjs +1 -1
  523. package/dist/ui/sheet.d.cts +9 -9
  524. package/dist/ui/sheet.d.ts +9 -9
  525. package/dist/ui/sheet.js +1 -1
  526. package/dist/ui/sidebar.cjs +1 -1
  527. package/dist/ui/sidebar.cjs.map +1 -1
  528. package/dist/ui/sidebar.d.cts +30 -30
  529. package/dist/ui/sidebar.d.ts +30 -30
  530. package/dist/ui/sidebar.js +1 -1
  531. package/dist/ui/sidebar.js.map +1 -1
  532. package/dist/ui/skeleton.cjs +1 -1
  533. package/dist/ui/skeleton.d.cts +2 -2
  534. package/dist/ui/skeleton.d.ts +2 -2
  535. package/dist/ui/slider.cjs +1 -1
  536. package/dist/ui/slider.cjs.map +1 -1
  537. package/dist/ui/slider.d.cts +2 -2
  538. package/dist/ui/slider.d.ts +2 -2
  539. package/dist/ui/slider.js.map +1 -1
  540. package/dist/ui/sonner.cjs +1 -1
  541. package/dist/ui/sonner.cjs.map +1 -1
  542. package/dist/ui/sonner.d.cts +2 -2
  543. package/dist/ui/sonner.d.ts +2 -2
  544. package/dist/ui/sonner.js.map +1 -1
  545. package/dist/ui/spinner.cjs +2 -0
  546. package/dist/ui/spinner.cjs.map +1 -0
  547. package/dist/ui/spinner.d.cts +10 -0
  548. package/dist/ui/spinner.d.ts +10 -0
  549. package/dist/ui/spinner.js +2 -0
  550. package/dist/ui/spinner.js.map +1 -0
  551. package/dist/ui/switch.cjs +1 -1
  552. package/dist/ui/switch.d.cts +2 -2
  553. package/dist/ui/switch.d.ts +2 -2
  554. package/dist/ui/switch.js +1 -1
  555. package/dist/ui/table.cjs +1 -1
  556. package/dist/ui/table.d.cts +9 -9
  557. package/dist/ui/table.d.ts +9 -9
  558. package/dist/ui/table.js +1 -1
  559. package/dist/ui/tabs.cjs +1 -1
  560. package/dist/ui/tabs.d.cts +5 -5
  561. package/dist/ui/tabs.d.ts +5 -5
  562. package/dist/ui/tabs.js +1 -1
  563. package/dist/ui/textarea.cjs +1 -1
  564. package/dist/ui/textarea.d.cts +2 -2
  565. package/dist/ui/textarea.d.ts +2 -2
  566. package/dist/ui/textarea.js +1 -1
  567. package/dist/ui/toggle-group.cjs +1 -1
  568. package/dist/ui/toggle-group.cjs.map +1 -1
  569. package/dist/ui/toggle-group.d.cts +4 -4
  570. package/dist/ui/toggle-group.d.ts +4 -4
  571. package/dist/ui/toggle-group.js +1 -1
  572. package/dist/ui/toggle-group.js.map +1 -1
  573. package/dist/ui/toggle.cjs +1 -1
  574. package/dist/ui/toggle.d.cts +1 -1
  575. package/dist/ui/toggle.d.ts +1 -1
  576. package/dist/ui/toggle.js +1 -1
  577. package/dist/ui/tooltip.cjs +1 -1
  578. package/dist/ui/tooltip.d.cts +1 -1
  579. package/dist/ui/tooltip.d.ts +1 -1
  580. package/package.json +26 -14
  581. package/dist/add-new-DfniMrHa.js.map +0 -1
  582. package/dist/add-new-dgznne6n.cjs +0 -2
  583. package/dist/add-new-dgznne6n.cjs.map +0 -1
  584. package/dist/alert-dialog-BgEaBYoh.cjs +0 -2
  585. package/dist/alert-dialog-BgEaBYoh.cjs.map +0 -1
  586. package/dist/alert-dialog-UwGNuTYk.js.map +0 -1
  587. package/dist/avatar-B4pklWJt.cjs +0 -2
  588. package/dist/avatar-B4pklWJt.cjs.map +0 -1
  589. package/dist/badge-CsA-JCDX.cjs +0 -2
  590. package/dist/badge-CsA-JCDX.cjs.map +0 -1
  591. package/dist/button-CuV2l4ge.cjs +0 -2
  592. package/dist/button-CuV2l4ge.cjs.map +0 -1
  593. package/dist/button-DhQJ9Ey8.js.map +0 -1
  594. package/dist/button-variants-CCiseNSC.cjs +0 -2
  595. package/dist/button-variants-CCiseNSC.cjs.map +0 -1
  596. package/dist/calendar-C2yGJ9AV.js.map +0 -1
  597. package/dist/calendar-Fjm1d0mU.cjs +0 -2
  598. package/dist/calendar-Fjm1d0mU.cjs.map +0 -1
  599. package/dist/card-Pnxpehsp.cjs +0 -2
  600. package/dist/card-Pnxpehsp.cjs.map +0 -1
  601. package/dist/command-DHGZlBKd.cjs +0 -2
  602. package/dist/command-DHGZlBKd.cjs.map +0 -1
  603. package/dist/command-DhSE6UaR.js.map +0 -1
  604. package/dist/date-2wue8L-1.cjs +0 -2
  605. package/dist/date-2wue8L-1.cjs.map +0 -1
  606. package/dist/date-BuPl--Fc.js.map +0 -1
  607. package/dist/dialog-B2LS2JLb.js.map +0 -1
  608. package/dist/dialog-BSdn3QaW.cjs +0 -2
  609. package/dist/dialog-BSdn3QaW.cjs.map +0 -1
  610. package/dist/dist-D0uO1qIz.cjs +0 -2
  611. package/dist/drawer-COD1n5aA.js.map +0 -1
  612. package/dist/drawer-CsCzBHvx.cjs +0 -2
  613. package/dist/drawer-CsCzBHvx.cjs.map +0 -1
  614. package/dist/dropdown-menu-Brlye320.js.map +0 -1
  615. package/dist/dropdown-menu-DwI8o0uQ.cjs +0 -2
  616. package/dist/dropdown-menu-DwI8o0uQ.cjs.map +0 -1
  617. package/dist/error-dialog-BF1VNZXk.js.map +0 -1
  618. package/dist/error-dialog-C3b4fqAI.cjs +0 -2
  619. package/dist/error-dialog-C3b4fqAI.cjs.map +0 -1
  620. package/dist/flex-DS4mxjtf.cjs +0 -2
  621. package/dist/flex-DS4mxjtf.cjs.map +0 -1
  622. package/dist/form-BT1TbgK6.js +0 -2
  623. package/dist/form-BT1TbgK6.js.map +0 -1
  624. package/dist/form-DyH5iWq7.cjs +0 -2
  625. package/dist/form-DyH5iWq7.cjs.map +0 -1
  626. package/dist/form-wrapper-CI2iMUNJ.cjs +0 -2
  627. package/dist/form-wrapper-CI2iMUNJ.cjs.map +0 -1
  628. package/dist/form-wrapper-DaguHv9W.js +0 -2
  629. package/dist/form-wrapper-DaguHv9W.js.map +0 -1
  630. package/dist/image-j62jo7bK.cjs +0 -2
  631. package/dist/image-j62jo7bK.cjs.map +0 -1
  632. package/dist/input-BtT8HfYE.js.map +0 -1
  633. package/dist/input-DfGojpRF.cjs +0 -2
  634. package/dist/input-DfGojpRF.cjs.map +0 -1
  635. package/dist/label-CHNSlaoz.cjs +0 -2
  636. package/dist/label-CHNSlaoz.cjs.map +0 -1
  637. package/dist/multi-select-C0dFenI-.cjs +0 -2
  638. package/dist/multi-select-C0dFenI-.cjs.map +0 -1
  639. package/dist/multi-select-l0HITJuv.js +0 -2
  640. package/dist/multi-select-l0HITJuv.js.map +0 -1
  641. package/dist/paragraph-BLvW7xdo.cjs +0 -2
  642. package/dist/paragraph-BLvW7xdo.cjs.map +0 -1
  643. package/dist/popover-BJWOgxQ5.js.map +0 -1
  644. package/dist/popover-BrDe5Jb8.cjs +0 -2
  645. package/dist/popover-BrDe5Jb8.cjs.map +0 -1
  646. package/dist/progress-DzBPViJg.js.map +0 -1
  647. package/dist/progress-RnZp4jUA.cjs +0 -2
  648. package/dist/progress-RnZp4jUA.cjs.map +0 -1
  649. package/dist/refresh-BiOPtbhd.js.map +0 -1
  650. package/dist/refresh-DgFpv8mw.cjs +0 -2
  651. package/dist/refresh-DgFpv8mw.cjs.map +0 -1
  652. package/dist/scroll-area-BJYI14s5.js.map +0 -1
  653. package/dist/scroll-area-slD5Jekm.cjs +0 -2
  654. package/dist/scroll-area-slD5Jekm.cjs.map +0 -1
  655. package/dist/search-input--FQFzdW3.js.map +0 -1
  656. package/dist/search-input-DV8zjsMQ.cjs +0 -2
  657. package/dist/search-input-DV8zjsMQ.cjs.map +0 -1
  658. package/dist/select-Ce-YROpe.cjs +0 -2
  659. package/dist/select-Ce-YROpe.cjs.map +0 -1
  660. package/dist/select-Di8fOKVF.js.map +0 -1
  661. package/dist/separator-C7HQ2ThL.js.map +0 -1
  662. package/dist/separator-WF5zTNGS.cjs +0 -2
  663. package/dist/separator-WF5zTNGS.cjs.map +0 -1
  664. package/dist/sheet-E0gvN9Gp.js.map +0 -1
  665. package/dist/sheet-cjXJAfUE.cjs +0 -2
  666. package/dist/sheet-cjXJAfUE.cjs.map +0 -1
  667. package/dist/sidebar-B6s0ZZHA.cjs +0 -2
  668. package/dist/sidebar-B6s0ZZHA.cjs.map +0 -1
  669. package/dist/sidebar-CBEPWmnf.js.map +0 -1
  670. package/dist/skeleton-BA-3d3bn.cjs +0 -2
  671. package/dist/skeleton-BA-3d3bn.cjs.map +0 -1
  672. package/dist/switch-C7foFKpS.js.map +0 -1
  673. package/dist/switch-DOgkZVAD.cjs +0 -2
  674. package/dist/switch-DOgkZVAD.cjs.map +0 -1
  675. package/dist/table-CKNAm27W.js.map +0 -1
  676. package/dist/table-CzMEpN9D.cjs +0 -2
  677. package/dist/table-CzMEpN9D.cjs.map +0 -1
  678. package/dist/tabs-D4uObFGW.js.map +0 -1
  679. package/dist/tabs-MolLf09Q.cjs +0 -2
  680. package/dist/tabs-MolLf09Q.cjs.map +0 -1
  681. package/dist/textarea-Ewj89Eq3.cjs +0 -2
  682. package/dist/textarea-Ewj89Eq3.cjs.map +0 -1
  683. package/dist/textarea-n8OO0QsI.js.map +0 -1
  684. package/dist/title-DONX1fR6.cjs +0 -2
  685. package/dist/title-DONX1fR6.cjs.map +0 -1
  686. package/dist/title-itXqz0us.js.map +0 -1
  687. package/dist/toggle-D0B4Ba4H.cjs +0 -2
  688. package/dist/toggle-D0B4Ba4H.cjs.map +0 -1
  689. package/dist/toggle-DuNq0es1.js.map +0 -1
  690. package/dist/tooltip-DXvcPsvM.cjs +0 -2
  691. package/dist/tooltip-DXvcPsvM.cjs.map +0 -1
@@ -1,25 +1,25 @@
1
- import * as react_jsx_runtime93 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime113 from "react/jsx-runtime";
2
2
  import { DropdownMenu as DropdownMenu$1 } from "radix-ui";
3
3
 
4
4
  //#region packages/components/ui/dropdown-menu.d.ts
5
5
  declare function DropdownMenu({
6
6
  ...props
7
- }: React.ComponentProps<typeof DropdownMenu$1.Root>): react_jsx_runtime93.JSX.Element;
7
+ }: React.ComponentProps<typeof DropdownMenu$1.Root>): react_jsx_runtime113.JSX.Element;
8
8
  declare function DropdownMenuPortal({
9
9
  ...props
10
- }: React.ComponentProps<typeof DropdownMenu$1.Portal>): react_jsx_runtime93.JSX.Element;
10
+ }: React.ComponentProps<typeof DropdownMenu$1.Portal>): react_jsx_runtime113.JSX.Element;
11
11
  declare function DropdownMenuTrigger({
12
12
  ...props
13
- }: React.ComponentProps<typeof DropdownMenu$1.Trigger>): react_jsx_runtime93.JSX.Element;
13
+ }: React.ComponentProps<typeof DropdownMenu$1.Trigger>): react_jsx_runtime113.JSX.Element;
14
14
  declare function DropdownMenuContent({
15
15
  className,
16
16
  sideOffset,
17
17
  align,
18
18
  ...props
19
- }: React.ComponentProps<typeof DropdownMenu$1.Content>): react_jsx_runtime93.JSX.Element;
19
+ }: React.ComponentProps<typeof DropdownMenu$1.Content>): react_jsx_runtime113.JSX.Element;
20
20
  declare function DropdownMenuGroup({
21
21
  ...props
22
- }: React.ComponentProps<typeof DropdownMenu$1.Group>): react_jsx_runtime93.JSX.Element;
22
+ }: React.ComponentProps<typeof DropdownMenu$1.Group>): react_jsx_runtime113.JSX.Element;
23
23
  declare function DropdownMenuItem({
24
24
  className,
25
25
  inset,
@@ -28,39 +28,39 @@ declare function DropdownMenuItem({
28
28
  }: React.ComponentProps<typeof DropdownMenu$1.Item> & {
29
29
  inset?: boolean;
30
30
  variant?: 'default' | 'destructive';
31
- }): react_jsx_runtime93.JSX.Element;
31
+ }): react_jsx_runtime113.JSX.Element;
32
32
  declare function DropdownMenuCheckboxItem({
33
33
  className,
34
34
  children,
35
35
  checked,
36
36
  ...props
37
- }: React.ComponentProps<typeof DropdownMenu$1.CheckboxItem>): react_jsx_runtime93.JSX.Element;
37
+ }: React.ComponentProps<typeof DropdownMenu$1.CheckboxItem>): react_jsx_runtime113.JSX.Element;
38
38
  declare function DropdownMenuRadioGroup({
39
39
  ...props
40
- }: React.ComponentProps<typeof DropdownMenu$1.RadioGroup>): react_jsx_runtime93.JSX.Element;
40
+ }: React.ComponentProps<typeof DropdownMenu$1.RadioGroup>): react_jsx_runtime113.JSX.Element;
41
41
  declare function DropdownMenuRadioItem({
42
42
  className,
43
43
  children,
44
44
  ...props
45
- }: React.ComponentProps<typeof DropdownMenu$1.RadioItem>): react_jsx_runtime93.JSX.Element;
45
+ }: React.ComponentProps<typeof DropdownMenu$1.RadioItem>): react_jsx_runtime113.JSX.Element;
46
46
  declare function DropdownMenuLabel({
47
47
  className,
48
48
  inset,
49
49
  ...props
50
50
  }: React.ComponentProps<typeof DropdownMenu$1.Label> & {
51
51
  inset?: boolean;
52
- }): react_jsx_runtime93.JSX.Element;
52
+ }): react_jsx_runtime113.JSX.Element;
53
53
  declare function DropdownMenuSeparator({
54
54
  className,
55
55
  ...props
56
- }: React.ComponentProps<typeof DropdownMenu$1.Separator>): react_jsx_runtime93.JSX.Element;
56
+ }: React.ComponentProps<typeof DropdownMenu$1.Separator>): react_jsx_runtime113.JSX.Element;
57
57
  declare function DropdownMenuShortcut({
58
58
  className,
59
59
  ...props
60
- }: React.ComponentProps<'span'>): react_jsx_runtime93.JSX.Element;
60
+ }: React.ComponentProps<'span'>): react_jsx_runtime113.JSX.Element;
61
61
  declare function DropdownMenuSub({
62
62
  ...props
63
- }: React.ComponentProps<typeof DropdownMenu$1.Sub>): react_jsx_runtime93.JSX.Element;
63
+ }: React.ComponentProps<typeof DropdownMenu$1.Sub>): react_jsx_runtime113.JSX.Element;
64
64
  declare function DropdownMenuSubTrigger({
65
65
  className,
66
66
  inset,
@@ -68,11 +68,11 @@ declare function DropdownMenuSubTrigger({
68
68
  ...props
69
69
  }: React.ComponentProps<typeof DropdownMenu$1.SubTrigger> & {
70
70
  inset?: boolean;
71
- }): react_jsx_runtime93.JSX.Element;
71
+ }): react_jsx_runtime113.JSX.Element;
72
72
  declare function DropdownMenuSubContent({
73
73
  className,
74
74
  ...props
75
- }: React.ComponentProps<typeof DropdownMenu$1.SubContent>): react_jsx_runtime93.JSX.Element;
75
+ }: React.ComponentProps<typeof DropdownMenu$1.SubContent>): react_jsx_runtime113.JSX.Element;
76
76
  //#endregion
77
77
  export { DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger };
78
78
  //# sourceMappingURL=dropdown-menu.d.cts.map
@@ -1,25 +1,25 @@
1
- import * as react_jsx_runtime95 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime104 from "react/jsx-runtime";
2
2
  import { DropdownMenu as DropdownMenu$1 } from "radix-ui";
3
3
 
4
4
  //#region packages/components/ui/dropdown-menu.d.ts
5
5
  declare function DropdownMenu({
6
6
  ...props
7
- }: React.ComponentProps<typeof DropdownMenu$1.Root>): react_jsx_runtime95.JSX.Element;
7
+ }: React.ComponentProps<typeof DropdownMenu$1.Root>): react_jsx_runtime104.JSX.Element;
8
8
  declare function DropdownMenuPortal({
9
9
  ...props
10
- }: React.ComponentProps<typeof DropdownMenu$1.Portal>): react_jsx_runtime95.JSX.Element;
10
+ }: React.ComponentProps<typeof DropdownMenu$1.Portal>): react_jsx_runtime104.JSX.Element;
11
11
  declare function DropdownMenuTrigger({
12
12
  ...props
13
- }: React.ComponentProps<typeof DropdownMenu$1.Trigger>): react_jsx_runtime95.JSX.Element;
13
+ }: React.ComponentProps<typeof DropdownMenu$1.Trigger>): react_jsx_runtime104.JSX.Element;
14
14
  declare function DropdownMenuContent({
15
15
  className,
16
16
  sideOffset,
17
17
  align,
18
18
  ...props
19
- }: React.ComponentProps<typeof DropdownMenu$1.Content>): react_jsx_runtime95.JSX.Element;
19
+ }: React.ComponentProps<typeof DropdownMenu$1.Content>): react_jsx_runtime104.JSX.Element;
20
20
  declare function DropdownMenuGroup({
21
21
  ...props
22
- }: React.ComponentProps<typeof DropdownMenu$1.Group>): react_jsx_runtime95.JSX.Element;
22
+ }: React.ComponentProps<typeof DropdownMenu$1.Group>): react_jsx_runtime104.JSX.Element;
23
23
  declare function DropdownMenuItem({
24
24
  className,
25
25
  inset,
@@ -28,39 +28,39 @@ declare function DropdownMenuItem({
28
28
  }: React.ComponentProps<typeof DropdownMenu$1.Item> & {
29
29
  inset?: boolean;
30
30
  variant?: 'default' | 'destructive';
31
- }): react_jsx_runtime95.JSX.Element;
31
+ }): react_jsx_runtime104.JSX.Element;
32
32
  declare function DropdownMenuCheckboxItem({
33
33
  className,
34
34
  children,
35
35
  checked,
36
36
  ...props
37
- }: React.ComponentProps<typeof DropdownMenu$1.CheckboxItem>): react_jsx_runtime95.JSX.Element;
37
+ }: React.ComponentProps<typeof DropdownMenu$1.CheckboxItem>): react_jsx_runtime104.JSX.Element;
38
38
  declare function DropdownMenuRadioGroup({
39
39
  ...props
40
- }: React.ComponentProps<typeof DropdownMenu$1.RadioGroup>): react_jsx_runtime95.JSX.Element;
40
+ }: React.ComponentProps<typeof DropdownMenu$1.RadioGroup>): react_jsx_runtime104.JSX.Element;
41
41
  declare function DropdownMenuRadioItem({
42
42
  className,
43
43
  children,
44
44
  ...props
45
- }: React.ComponentProps<typeof DropdownMenu$1.RadioItem>): react_jsx_runtime95.JSX.Element;
45
+ }: React.ComponentProps<typeof DropdownMenu$1.RadioItem>): react_jsx_runtime104.JSX.Element;
46
46
  declare function DropdownMenuLabel({
47
47
  className,
48
48
  inset,
49
49
  ...props
50
50
  }: React.ComponentProps<typeof DropdownMenu$1.Label> & {
51
51
  inset?: boolean;
52
- }): react_jsx_runtime95.JSX.Element;
52
+ }): react_jsx_runtime104.JSX.Element;
53
53
  declare function DropdownMenuSeparator({
54
54
  className,
55
55
  ...props
56
- }: React.ComponentProps<typeof DropdownMenu$1.Separator>): react_jsx_runtime95.JSX.Element;
56
+ }: React.ComponentProps<typeof DropdownMenu$1.Separator>): react_jsx_runtime104.JSX.Element;
57
57
  declare function DropdownMenuShortcut({
58
58
  className,
59
59
  ...props
60
- }: React.ComponentProps<'span'>): react_jsx_runtime95.JSX.Element;
60
+ }: React.ComponentProps<'span'>): react_jsx_runtime104.JSX.Element;
61
61
  declare function DropdownMenuSub({
62
62
  ...props
63
- }: React.ComponentProps<typeof DropdownMenu$1.Sub>): react_jsx_runtime95.JSX.Element;
63
+ }: React.ComponentProps<typeof DropdownMenu$1.Sub>): react_jsx_runtime104.JSX.Element;
64
64
  declare function DropdownMenuSubTrigger({
65
65
  className,
66
66
  inset,
@@ -68,11 +68,11 @@ declare function DropdownMenuSubTrigger({
68
68
  ...props
69
69
  }: React.ComponentProps<typeof DropdownMenu$1.SubTrigger> & {
70
70
  inset?: boolean;
71
- }): react_jsx_runtime95.JSX.Element;
71
+ }): react_jsx_runtime104.JSX.Element;
72
72
  declare function DropdownMenuSubContent({
73
73
  className,
74
74
  ...props
75
- }: React.ComponentProps<typeof DropdownMenu$1.SubContent>): react_jsx_runtime95.JSX.Element;
75
+ }: React.ComponentProps<typeof DropdownMenu$1.SubContent>): react_jsx_runtime104.JSX.Element;
76
76
  //#endregion
77
77
  export { DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger };
78
78
  //# sourceMappingURL=dropdown-menu.d.ts.map
@@ -1 +1 @@
1
- "use client";import{DropdownMenu as e,DropdownMenuCheckboxItem as t,DropdownMenuContent as n,DropdownMenuGroup as r,DropdownMenuItem as i,DropdownMenuLabel as a,DropdownMenuPortal as o,DropdownMenuRadioGroup as s,DropdownMenuRadioItem as c,DropdownMenuSeparator as l,DropdownMenuShortcut as u,DropdownMenuSub as d,DropdownMenuSubContent as f,DropdownMenuSubTrigger as p,DropdownMenuTrigger as m}from"../dropdown-menu-Brlye320.js";export{e as DropdownMenu,t as DropdownMenuCheckboxItem,n as DropdownMenuContent,r as DropdownMenuGroup,i as DropdownMenuItem,a as DropdownMenuLabel,o as DropdownMenuPortal,s as DropdownMenuRadioGroup,c as DropdownMenuRadioItem,l as DropdownMenuSeparator,u as DropdownMenuShortcut,d as DropdownMenuSub,f as DropdownMenuSubContent,p as DropdownMenuSubTrigger,m as DropdownMenuTrigger};
1
+ "use client";import{DropdownMenu as e,DropdownMenuCheckboxItem as t,DropdownMenuContent as n,DropdownMenuGroup as r,DropdownMenuItem as i,DropdownMenuLabel as a,DropdownMenuPortal as o,DropdownMenuRadioGroup as s,DropdownMenuRadioItem as c,DropdownMenuSeparator as l,DropdownMenuShortcut as u,DropdownMenuSub as d,DropdownMenuSubContent as f,DropdownMenuSubTrigger as p,DropdownMenuTrigger as m}from"../dropdown-menu-DtEPAmMV.js";export{e as DropdownMenu,t as DropdownMenuCheckboxItem,n as DropdownMenuContent,r as DropdownMenuGroup,i as DropdownMenuItem,a as DropdownMenuLabel,o as DropdownMenuPortal,s as DropdownMenuRadioGroup,c as DropdownMenuRadioItem,l as DropdownMenuSeparator,u as DropdownMenuShortcut,d as DropdownMenuSub,f as DropdownMenuSubContent,p as DropdownMenuSubTrigger,m as DropdownMenuTrigger};
@@ -0,0 +1,2 @@
1
+ const e=require(`../chunk-CUT6urMc.cjs`);let t=require(`@customafk/react-toolkit/utils`);t=e.__toESM(t);let n=require(`react/jsx-runtime`);n=e.__toESM(n);let r=require(`class-variance-authority`);r=e.__toESM(r);function i({className:e,...r}){return(0,n.jsx)(`div`,{"data-slot":`empty`,className:(0,t.cn)(`flex min-w-0 flex-1 flex-col items-center justify-center gap-6 rounded-lg border-dashed p-6 text-center text-balance md:p-12`,e),...r})}function a({className:e,...r}){return(0,n.jsx)(`div`,{"data-slot":`empty-header`,className:(0,t.cn)(`flex max-w-sm flex-col items-center gap-2 text-center`,e),...r})}const o=(0,r.cva)(`flex shrink-0 items-center justify-center mb-2 [&_svg]:pointer-events-none [&_svg]:shrink-0`,{variants:{variant:{default:`bg-transparent`,icon:`bg-muted-muted text-text-positive-weak flex size-10 shrink-0 items-center justify-center rounded-lg [&_svg:not([class*='size-'])]:size-6`}},defaultVariants:{variant:`default`}});function s({className:e,variant:r=`default`,...i}){return(0,n.jsx)(`div`,{"data-slot":`empty-icon`,"data-variant":r,className:(0,t.cn)(o({variant:r,className:e})),...i})}function c({className:e,...r}){return(0,n.jsx)(`div`,{"data-slot":`empty-title`,className:(0,t.cn)(`text-lg font-medium tracking-tight`,e),...r})}function l({className:e,...r}){return(0,n.jsx)(`div`,{"data-slot":`empty-description`,className:(0,t.cn)(`text-text-positive-weak [&>a:hover]:text-primary text-sm/relaxed [&>a]:underline [&>a]:underline-offset-4`,e),...r})}function u({className:e,...r}){return(0,n.jsx)(`div`,{"data-slot":`empty-content`,className:(0,t.cn)(`flex w-full max-w-sm min-w-0 flex-col items-center gap-4 text-sm text-balance`,e),...r})}exports.Empty=i,exports.EmptyContent=u,exports.EmptyDescription=l,exports.EmptyHeader=a,exports.EmptyMedia=s,exports.EmptyTitle=c;
2
+ //# sourceMappingURL=empty.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"empty.cjs","names":[],"sources":["../../packages/components/ui/empty.tsx"],"sourcesContent":["import { cn } from '@customafk/react-toolkit/utils';\n\nimport type { VariantProps } from 'class-variance-authority';\nimport { cva } from 'class-variance-authority';\n\nfunction Empty({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"empty\"\n className={cn('flex min-w-0 flex-1 flex-col items-center justify-center gap-6 rounded-lg border-dashed p-6 text-center text-balance md:p-12', className)}\n {...props}\n />\n );\n}\n\nfunction EmptyHeader({ className, ...props }: React.ComponentProps<'div'>) {\n return <div data-slot=\"empty-header\" className={cn('flex max-w-sm flex-col items-center gap-2 text-center', className)} {...props} />;\n}\n\nconst emptyMediaVariants = cva('flex shrink-0 items-center justify-center mb-2 [&_svg]:pointer-events-none [&_svg]:shrink-0', {\n variants: {\n variant: {\n default: 'bg-transparent',\n icon: \"bg-muted-muted text-text-positive-weak flex size-10 shrink-0 items-center justify-center rounded-lg [&_svg:not([class*='size-'])]:size-6\",\n },\n },\n defaultVariants: {\n variant: 'default',\n },\n});\n\nfunction EmptyMedia({ className, variant = 'default', ...props }: React.ComponentProps<'div'> & VariantProps<typeof emptyMediaVariants>) {\n return <div data-slot=\"empty-icon\" data-variant={variant} className={cn(emptyMediaVariants({ variant, className }))} {...props} />;\n}\n\nfunction EmptyTitle({ className, ...props }: React.ComponentProps<'div'>) {\n return <div data-slot=\"empty-title\" className={cn('text-lg font-medium tracking-tight', className)} {...props} />;\n}\n\nfunction EmptyDescription({ className, ...props }: React.ComponentProps<'p'>) {\n return (\n <div\n data-slot=\"empty-description\"\n className={cn('text-text-positive-weak [&>a:hover]:text-primary text-sm/relaxed [&>a]:underline [&>a]:underline-offset-4', className)}\n {...props}\n />\n );\n}\n\nfunction EmptyContent({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n <div data-slot=\"empty-content\" className={cn('flex w-full max-w-sm min-w-0 flex-col items-center gap-4 text-sm text-balance', className)} {...props} />\n );\n}\n\nexport { Empty, EmptyH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
+ import * as class_variance_authority_types2 from "class-variance-authority/types";
3
+ import { VariantProps } from "class-variance-authority";
4
+
5
+ //#region packages/components/ui/empty.d.ts
6
+ declare function Empty({
7
+ className,
8
+ ...props
9
+ }: React.ComponentProps<'div'>): react_jsx_runtime98.JSX.Element;
10
+ declare function EmptyHeader({
11
+ className,
12
+ ...props
13
+ }: React.ComponentProps<'div'>): react_jsx_runtime98.JSX.Element;
14
+ declare const emptyMediaVariants: (props?: ({
15
+ variant?: "default" | "icon" | null | undefined;
16
+ } & class_variance_authority_types2.ClassProp) | undefined) => string;
17
+ declare function EmptyMedia({
18
+ className,
19
+ variant,
20
+ ...props
21
+ }: React.ComponentProps<'div'> & VariantProps<typeof emptyMediaVariants>): react_jsx_runtime98.JSX.Element;
22
+ declare function EmptyTitle({
23
+ className,
24
+ ...props
25
+ }: React.ComponentProps<'div'>): react_jsx_runtime98.JSX.Element;
26
+ declare function EmptyDescription({
27
+ className,
28
+ ...props
29
+ }: React.ComponentProps<'p'>): react_jsx_runtime98.JSX.Element;
30
+ declare function EmptyContent({
31
+ className,
32
+ ...props
33
+ }: React.ComponentProps<'div'>): react_jsx_runtime98.JSX.Element;
34
+ //#endregion
35
+ export { Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyTitle };
36
+ //# sourceMappingURL=empty.d.cts.map
@@ -0,0 +1,36 @@
1
+ import * as react_jsx_runtime88 from "react/jsx-runtime";
2
+ import { VariantProps } from "class-variance-authority";
3
+ import * as class_variance_authority_types2 from "class-variance-authority/types";
4
+
5
+ //#region packages/components/ui/empty.d.ts
6
+ declare function Empty({
7
+ className,
8
+ ...props
9
+ }: React.ComponentProps<'div'>): react_jsx_runtime88.JSX.Element;
10
+ declare function EmptyHeader({
11
+ className,
12
+ ...props
13
+ }: React.ComponentProps<'div'>): react_jsx_runtime88.JSX.Element;
14
+ declare const emptyMediaVariants: (props?: ({
15
+ variant?: "default" | "icon" | null | undefined;
16
+ } & class_variance_authority_types2.ClassProp) | undefined) => string;
17
+ declare function EmptyMedia({
18
+ className,
19
+ variant,
20
+ ...props
21
+ }: React.ComponentProps<'div'> & VariantProps<typeof emptyMediaVariants>): react_jsx_runtime88.JSX.Element;
22
+ declare function EmptyTitle({
23
+ className,
24
+ ...props
25
+ }: React.ComponentProps<'div'>): react_jsx_runtime88.JSX.Element;
26
+ declare function EmptyDescription({
27
+ className,
28
+ ...props
29
+ }: React.ComponentProps<'p'>): react_jsx_runtime88.JSX.Element;
30
+ declare function EmptyContent({
31
+ className,
32
+ ...props
33
+ }: React.ComponentProps<'div'>): react_jsx_runtime88.JSX.Element;
34
+ //#endregion
35
+ export { Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyTitle };
36
+ //# sourceMappingURL=empty.d.ts.map
@@ -0,0 +1,2 @@
1
+ import{cn as e}from"@customafk/react-toolkit/utils";import{jsx as t}from"react/jsx-runtime";import{cva as n}from"class-variance-authority";function r({className:n,...r}){return t(`div`,{"data-slot":`empty`,className:e(`flex min-w-0 flex-1 flex-col items-center justify-center gap-6 rounded-lg border-dashed p-6 text-center text-balance md:p-12`,n),...r})}function i({className:n,...r}){return t(`div`,{"data-slot":`empty-header`,className:e(`flex max-w-sm flex-col items-center gap-2 text-center`,n),...r})}const a=n(`flex shrink-0 items-center justify-center mb-2 [&_svg]:pointer-events-none [&_svg]:shrink-0`,{variants:{variant:{default:`bg-transparent`,icon:`bg-muted-muted text-text-positive-weak flex size-10 shrink-0 items-center justify-center rounded-lg [&_svg:not([class*='size-'])]:size-6`}},defaultVariants:{variant:`default`}});function o({className:n,variant:r=`default`,...i}){return t(`div`,{"data-slot":`empty-icon`,"data-variant":r,className:e(a({variant:r,className:n})),...i})}function s({className:n,...r}){return t(`div`,{"data-slot":`empty-title`,className:e(`text-lg font-medium tracking-tight`,n),...r})}function c({className:n,...r}){return t(`div`,{"data-slot":`empty-description`,className:e(`text-text-positive-weak [&>a:hover]:text-primary text-sm/relaxed [&>a]:underline [&>a]:underline-offset-4`,n),...r})}function l({className:n,...r}){return t(`div`,{"data-slot":`empty-content`,className:e(`flex w-full max-w-sm min-w-0 flex-col items-center gap-4 text-sm text-balance`,n),...r})}export{r as Empty,l as EmptyContent,c as EmptyDescription,i as EmptyHeader,o as EmptyMedia,s as EmptyTitle};
2
+ //# sourceMappingURL=empty.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"empty.js","names":[],"sources":["../../packages/components/ui/empty.tsx"],"sourcesContent":["import { cn } from '@customafk/react-toolkit/utils';\n\nimport type { VariantProps } from 'class-variance-authority';\nimport { cva } from 'class-variance-authority';\n\nfunction Empty({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"empty\"\n className={cn('flex min-w-0 flex-1 flex-col items-center justify-center gap-6 rounded-lg border-dashed p-6 text-center text-balance md:p-12', className)}\n {...props}\n />\n );\n}\n\nfunction EmptyHeader({ className, ...props }: React.ComponentProps<'div'>) {\n return <div data-slot=\"empty-header\" className={cn('flex max-w-sm flex-col items-center gap-2 text-center', className)} {...props} />;\n}\n\nconst emptyMediaVariants = cva('flex shrink-0 items-center justify-center mb-2 [&_svg]:pointer-events-none [&_svg]:shrink-0', {\n variants: {\n variant: {\n default: 'bg-transparent',\n icon: \"bg-muted-muted text-text-positive-weak flex size-10 shrink-0 items-center justify-center rounded-lg [&_svg:not([class*='size-'])]:size-6\",\n },\n },\n defaultVariants: {\n variant: 'default',\n },\n});\n\nfunction EmptyMedia({ className, variant = 'default', ...props }: React.ComponentProps<'div'> & VariantProps<typeof emptyMediaVariants>) {\n return <div data-slot=\"empty-icon\" data-variant={variant} className={cn(emptyMediaVariants({ variant, className }))} {...props} />;\n}\n\nfunction EmptyTitle({ className, ...props }: React.ComponentProps<'div'>) {\n return <div data-slot=\"empty-title\" className={cn('text-lg font-medium tracking-tight', className)} {...props} />;\n}\n\nfunction EmptyDescription({ className, ...props }: React.ComponentProps<'p'>) {\n return (\n <div\n data-slot=\"empty-description\"\n className={cn('text-text-positive-weak [&>a:hover]:text-primary text-sm/relaxed [&>a]:underline [&>a]:underline-offset-4', className)}\n {...props}\n />\n );\n}\n\nfunction EmptyContent({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n <div data-slot=\"empty-content\" className={cn('flex w-full max-w-sm min-w-0 flex-col items-center gap-4 text-sm text-balance', className)} {...props} />\n );\n}\n\nexport { Empty, EmptyHeader, EmptyTitle, EmptyDescription, EmptyContent, EmptyMedia };\n"],"mappings":"2IAKA,SAAS,EAAM,CAAE,YAAW,GAAG,GAAsC,CACnE,OACE,EAAC,MAAA,CACC,YAAU,QACV,UAAW,EAAG,+HAAgI,EAAU,CACxJ,GAAI,GACJ,CAIN,SAAS,EAAY,CAAE,YAAW,GAAG,GAAsC,CACzE,OAAO,EAAC,MAAA,CAAI,YAAU,eAAe,UAAW,EAAG,wDAAyD,EAAU,CAAE,GAAI,GAAS,CAGvI,MAAM,EAAqB,EAAI,8FAA+F,CAC5H,SAAU,CACR,QAAS,CACP,QAAS,iBACT,KAAM,2IACP,CACF,CACD,gBAAiB,CACf,QAAS,UACV,CACF,CAAC,CAEF,SAAS,EAAW,CAAE,YAAW,UAAU,UAAW,GAAG,GAAgF,CACvI,OAAO,EAAC,MAAA,CAAI,YAAU,aAAa,eAAc,EAAS,UAAW,EAAG,EAAmB,CAAE,UAAS,YAAW,CAAC,CAAC,CAAE,GAAI,GAAS,CAGpI,SAAS,EAAW,CAAE,YAAW,GAAG,GAAsC,CACxE,OAAO,EAAC,MAAA,CAAI,YAAU,cAAc,UAAW,EAAG,qCAAsC,EAAU,CAAE,GAAI,GAAS,CAGnH,SAAS,EAAiB,CAAE,YAAW,GAAG,GAAoC,CAC5E,OACE,EAAC,MAAA,CACC,YAAU,oBACV,UAAW,EAAG,4GAA6G,EAAU,CACrI,GAAI,GACJ,CAIN,SAAS,EAAa,CAAE,YAAW,GAAG,GAAsC,CAC1E,OACE,EAAC,MAAA,CAAI,YAAU,gBAAgB,UAAW,EAAG,gFAAiF,EAAU,CAAE,GAAI,GAAS"}
@@ -0,0 +1 @@
1
+ "use client";require(`../label-D6mAvVmw.cjs`),require(`../separator-DMMoR-d2.cjs`);const e=require(`../field-A43YZ5Wj.cjs`);exports.Field=e.Field,exports.FieldContent=e.FieldContent,exports.FieldDescription=e.FieldDescription,exports.FieldError=e.FieldError,exports.FieldGroup=e.FieldGroup,exports.FieldLabel=e.FieldLabel,exports.FieldLegend=e.FieldLegend,exports.FieldSeparator=e.FieldSeparator,exports.FieldSet=e.FieldSet,exports.FieldTitle=e.FieldTitle;
@@ -0,0 +1,65 @@
1
+ import { Label } from "../label-Bfd7VFEe.cjs";
2
+ import * as react_jsx_runtime145 from "react/jsx-runtime";
3
+ import * as class_variance_authority_types5 from "class-variance-authority/types";
4
+ import { VariantProps } from "class-variance-authority";
5
+
6
+ //#region packages/components/ui/field.d.ts
7
+ declare function FieldSet({
8
+ className,
9
+ ...props
10
+ }: React.ComponentProps<'fieldset'>): react_jsx_runtime145.JSX.Element;
11
+ declare function FieldLegend({
12
+ className,
13
+ variant,
14
+ ...props
15
+ }: React.ComponentProps<'legend'> & {
16
+ variant?: 'legend' | 'label';
17
+ }): react_jsx_runtime145.JSX.Element;
18
+ declare function FieldGroup({
19
+ className,
20
+ ...props
21
+ }: React.ComponentProps<'div'>): react_jsx_runtime145.JSX.Element;
22
+ declare const fieldVariants: (props?: ({
23
+ orientation?: "vertical" | "horizontal" | "responsive" | null | undefined;
24
+ } & class_variance_authority_types5.ClassProp) | undefined) => string;
25
+ declare function Field({
26
+ className,
27
+ orientation,
28
+ ...props
29
+ }: React.ComponentProps<'div'> & VariantProps<typeof fieldVariants>): react_jsx_runtime145.JSX.Element;
30
+ declare function FieldContent({
31
+ className,
32
+ ...props
33
+ }: React.ComponentProps<'div'>): react_jsx_runtime145.JSX.Element;
34
+ declare function FieldLabel({
35
+ className,
36
+ ...props
37
+ }: React.ComponentProps<typeof Label>): react_jsx_runtime145.JSX.Element;
38
+ declare function FieldTitle({
39
+ className,
40
+ ...props
41
+ }: React.ComponentProps<'div'>): react_jsx_runtime145.JSX.Element;
42
+ declare function FieldDescription({
43
+ className,
44
+ ...props
45
+ }: React.ComponentProps<'p'>): react_jsx_runtime145.JSX.Element;
46
+ declare function FieldSeparator({
47
+ children,
48
+ className,
49
+ ...props
50
+ }: React.ComponentProps<'div'> & {
51
+ children?: React.ReactNode;
52
+ }): react_jsx_runtime145.JSX.Element;
53
+ declare function FieldError({
54
+ className,
55
+ children,
56
+ errors,
57
+ ...props
58
+ }: React.ComponentProps<'div'> & {
59
+ errors?: Array<{
60
+ message?: string;
61
+ } | undefined>;
62
+ }): react_jsx_runtime145.JSX.Element | null;
63
+ //#endregion
64
+ export { Field, FieldContent, FieldDescription, FieldError, FieldGroup, FieldLabel, FieldLegend, FieldSeparator, FieldSet, FieldTitle };
65
+ //# sourceMappingURL=field.d.cts.map
@@ -0,0 +1,65 @@
1
+ import { Label } from "../label-DlBHUp00.js";
2
+ import * as react_jsx_runtime119 from "react/jsx-runtime";
3
+ import { VariantProps } from "class-variance-authority";
4
+ import * as class_variance_authority_types3 from "class-variance-authority/types";
5
+
6
+ //#region packages/components/ui/field.d.ts
7
+ declare function FieldSet({
8
+ className,
9
+ ...props
10
+ }: React.ComponentProps<'fieldset'>): react_jsx_runtime119.JSX.Element;
11
+ declare function FieldLegend({
12
+ className,
13
+ variant,
14
+ ...props
15
+ }: React.ComponentProps<'legend'> & {
16
+ variant?: 'legend' | 'label';
17
+ }): react_jsx_runtime119.JSX.Element;
18
+ declare function FieldGroup({
19
+ className,
20
+ ...props
21
+ }: React.ComponentProps<'div'>): react_jsx_runtime119.JSX.Element;
22
+ declare const fieldVariants: (props?: ({
23
+ orientation?: "vertical" | "horizontal" | "responsive" | null | undefined;
24
+ } & class_variance_authority_types3.ClassProp) | undefined) => string;
25
+ declare function Field({
26
+ className,
27
+ orientation,
28
+ ...props
29
+ }: React.ComponentProps<'div'> & VariantProps<typeof fieldVariants>): react_jsx_runtime119.JSX.Element;
30
+ declare function FieldContent({
31
+ className,
32
+ ...props
33
+ }: React.ComponentProps<'div'>): react_jsx_runtime119.JSX.Element;
34
+ declare function FieldLabel({
35
+ className,
36
+ ...props
37
+ }: React.ComponentProps<typeof Label>): react_jsx_runtime119.JSX.Element;
38
+ declare function FieldTitle({
39
+ className,
40
+ ...props
41
+ }: React.ComponentProps<'div'>): react_jsx_runtime119.JSX.Element;
42
+ declare function FieldDescription({
43
+ className,
44
+ ...props
45
+ }: React.ComponentProps<'p'>): react_jsx_runtime119.JSX.Element;
46
+ declare function FieldSeparator({
47
+ children,
48
+ className,
49
+ ...props
50
+ }: React.ComponentProps<'div'> & {
51
+ children?: React.ReactNode;
52
+ }): react_jsx_runtime119.JSX.Element;
53
+ declare function FieldError({
54
+ className,
55
+ children,
56
+ errors,
57
+ ...props
58
+ }: React.ComponentProps<'div'> & {
59
+ errors?: Array<{
60
+ message?: string;
61
+ } | undefined>;
62
+ }): react_jsx_runtime119.JSX.Element | null;
63
+ //#endregion
64
+ export { Field, FieldContent, FieldDescription, FieldError, FieldGroup, FieldLabel, FieldLegend, FieldSeparator, FieldSet, FieldTitle };
65
+ //# sourceMappingURL=field.d.ts.map
@@ -0,0 +1 @@
1
+ "use client";import"../label-CdrxlBJ8.js";import"../separator-D17HxS2f.js";import{Field as e,FieldContent as t,FieldDescription as n,FieldError as r,FieldGroup as i,FieldLabel as a,FieldLegend as o,FieldSeparator as s,FieldSet as c,FieldTitle as l}from"../field-CGacT8J3.js";export{e as Field,t as FieldContent,n as FieldDescription,r as FieldError,i as FieldGroup,a as FieldLabel,o as FieldLegend,s as FieldSeparator,c as FieldSet,l as FieldTitle};
@@ -1,3 +1,3 @@
1
- "use client";const e=require(`../chunk-CUT6urMc.cjs`);require(`../dist-D0uO1qIz.cjs`),require(`../button-variants-CCiseNSC.cjs`);const t=require(`../button-CuV2l4ge.cjs`),n=require(`../progress-RnZp4jUA.cjs`),r=e.__toESM(require(`lucide-react`)),i=e.__toESM(require(`@customafk/react-toolkit/utils`)),a=e.__toESM(require(`react`)),o=e.__toESM(require(`react/jsx-runtime`)),s=e.__toESM(require(`react-dropzone`)),c=e.__toESM(require(`@customafk/react-toolkit/hooks/useControllableState`)),l=e.__toESM(require(`sonner`));function u(e){let{value:t,onValueChange:n,onUpload:u,progresses:p,accept:m={"image/*":[]},maxSize:h=1024*1024*2,maxFileCount:g=1,multiple:_=!1,disabled:v=!1,showText:y=!0,iconSize:b,className:x,...S}=e,[C,w]=(0,c.useControllableState)({prop:t,onChange:n}),T=(0,a.useCallback)((e,t)=>{if(!_&&g===1&&e.length>1){l.toast.error(`Cannot upload more than 1 file at a time`);return}if((C?.length??0)+e.length>g){l.toast.error(`Cannot upload more than ${g} files`);return}let n=e.map(e=>Object.assign(e,{preview:URL.createObjectURL(e)})),r=C?[...C,...n]:n;if(w(r),t.length>0&&t.forEach(({file:e})=>{l.toast.error(`File ${e.name} was rejected`)}),u&&r.length>0&&r.length<=g){let e=r.length>0?`${r.length} files`:`file`;u(r).then(()=>{w([]),(0,l.toast)(`${e} uploaded`)})}},[C,g,_,u,w]);function E(e){if(!C)return;f(C[e])&&URL.revokeObjectURL(C[e].preview);let t=C.filter((t,n)=>n!==e);w(t),n?.(t)}(0,a.useEffect)(()=>()=>{C&&C.forEach(e=>{f(e)&&URL.revokeObjectURL(e.preview)})},[]);let D=v||(C?.length??0)>=g;return(0,o.jsxs)(`div`,{className:`relative flex w-full flex-col gap-6`,children:[(0,o.jsx)(s.default,{onDrop:T,accept:m,maxSize:h,maxFiles:g,multiple:g>1||_,disabled:D,children:({getRootProps:e,getInputProps:t,isDragActive:n})=>(0,o.jsxs)(`div`,{...e(),className:(0,i.cn)(`group`,`border-border-weak`,`hover:bg-border-weak/20`,`relative grid h-52 w-full cursor-pointer place-items-center rounded-lg border-2 border-dashed px-5 py-2.5 text-center transition`,`ring-offset-background`,`focus-visible:ring-primary-weak`,`focus-visible:ring-2`,`focus-visible:ring-offset-2`,`focus-visible:outline-hidden`,n&&`border-border-primary-strong bg-border-weak/40`,D&&`pointer-events-none opacity-60`,x),...S,children:[(0,o.jsx)(`input`,{...t()}),n?(0,o.jsxs)(`div`,{className:`flex flex-col items-center justify-center gap-4 sm:px-5`,children:[(0,o.jsx)(`div`,{className:`rounded-full border border-dashed p-3`,children:(0,o.jsx)(r.Upload,{className:`text-text-positive-muted size-7`,"aria-hidden":`true`})}),(0,o.jsx)(`p`,{className:`text-text-positive-muted font-medium`,children:`Drop the files here`})]}):(0,o.jsxs)(`div`,{className:`flex flex-col items-center justify-center gap-4 sm:px-5`,children:[(0,o.jsx)(`div`,{className:`rounded-full border border-dashed p-3`,children:(0,o.jsx)(r.Upload,{size:b||24,className:`text-muted-foreground`,"aria-hidden":`true`})}),y&&(0,o.jsxs)(`div`,{className:`flex flex-col gap-px`,children:[(0,o.jsxs)(`p`,{className:`text-text-positive-weak text-xs font-medium`,children:[`Drag `,`'n'`,` drop files here, or click to select files`]}),(0,o.jsxs)(`p`,{className:`text-text-positive-muted text-xs`,children:[`You can upload`,g>1?` ${g===1/0?`multiple`:g}
1
+ "use client";const e=require(`../chunk-CUT6urMc.cjs`);require(`../dist-CAevLI5t.cjs`),require(`../button-variants-DdVxfrSx.cjs`);const t=require(`../button-BaLuKPtr.cjs`),n=require(`../progress-BUlcGaLz.cjs`);let r=require(`lucide-react`);r=e.__toESM(r);let i=require(`@customafk/react-toolkit/utils`);i=e.__toESM(i);let a=require(`react`);a=e.__toESM(a);let o=require(`react/jsx-runtime`);o=e.__toESM(o);let s=require(`react-dropzone`);s=e.__toESM(s);let c=require(`@customafk/react-toolkit/hooks/useControllableState`);c=e.__toESM(c);let l=require(`sonner`);l=e.__toESM(l);function u(e){let{value:t,onValueChange:n,onUpload:u,progresses:p,accept:m={"image/*":[]},maxSize:h=1024*1024*2,maxFileCount:g=1,multiple:_=!1,disabled:v=!1,showText:y=!0,iconSize:b,className:x,...S}=e,[C,w]=(0,c.useControllableState)({prop:t,onChange:n}),T=(0,a.useCallback)((e,t)=>{if(!_&&g===1&&e.length>1){l.toast.error(`Cannot upload more than 1 file at a time`);return}if((C?.length??0)+e.length>g){l.toast.error(`Cannot upload more than ${g} files`);return}let n=e.map(e=>Object.assign(e,{preview:URL.createObjectURL(e)})),r=C?[...C,...n]:n;if(w(r),t.length>0&&t.forEach(({file:e})=>{l.toast.error(`File ${e.name} was rejected`)}),u&&r.length>0&&r.length<=g){let e=r.length>0?`${r.length} files`:`file`;u(r).then(()=>{w([]),(0,l.toast)(`${e} uploaded`)})}},[C,g,_,u,w]);function E(e){if(!C)return;f(C[e])&&URL.revokeObjectURL(C[e].preview);let t=C.filter((t,n)=>n!==e);w(t),n?.(t)}(0,a.useEffect)(()=>()=>{C&&C.forEach(e=>{f(e)&&URL.revokeObjectURL(e.preview)})},[]);let D=v||(C?.length??0)>=g;return(0,o.jsxs)(`div`,{className:`relative flex w-full flex-col gap-6`,children:[(0,o.jsx)(s.default,{onDrop:T,accept:m,maxSize:h,maxFiles:g,multiple:g>1||_,disabled:D,children:({getRootProps:e,getInputProps:t,isDragActive:n})=>(0,o.jsxs)(`div`,{...e(),className:(0,i.cn)(`group`,`border-border-weak`,`hover:bg-border-weak/20`,`relative grid h-52 w-full cursor-pointer place-items-center rounded-lg border-2 border-dashed px-5 py-2.5 text-center transition`,`ring-offset-background`,`focus-visible:ring-primary-weak`,`focus-visible:ring-2`,`focus-visible:ring-offset-2`,`focus-visible:outline-hidden`,n&&`border-border-primary-strong bg-border-weak/40`,D&&`pointer-events-none opacity-60`,x),...S,children:[(0,o.jsx)(`input`,{...t()}),n?(0,o.jsxs)(`div`,{className:`flex flex-col items-center justify-center gap-4 sm:px-5`,children:[(0,o.jsx)(`div`,{className:`rounded-full border border-dashed p-3`,children:(0,o.jsx)(r.Upload,{className:`text-text-positive-muted size-7`,"aria-hidden":`true`})}),(0,o.jsx)(`p`,{className:`text-text-positive-muted font-medium`,children:`Drop the files here`})]}):(0,o.jsxs)(`div`,{className:`flex flex-col items-center justify-center gap-4 sm:px-5`,children:[(0,o.jsx)(`div`,{className:`rounded-full border border-dashed p-3`,children:(0,o.jsx)(r.Upload,{size:b||24,className:`text-muted-foreground`,"aria-hidden":`true`})}),y&&(0,o.jsxs)(`div`,{className:`flex flex-col gap-px`,children:[(0,o.jsxs)(`p`,{className:`text-text-positive-weak text-xs font-medium`,children:[`Drag `,`'n'`,` drop files here, or click to select files`]}),(0,o.jsxs)(`p`,{className:`text-text-positive-muted text-xs`,children:[`You can upload`,g>1?` ${g===1/0?`multiple`:g}
2
2
  files (up to ${(0,i.formatBytes)(h)} each)`:` a file with ${(0,i.formatBytes)(h)}`]})]})]})]})}),C?.length?(0,o.jsxs)(`div`,{className:`h-fit w-full overflow-y-auto`,children:[(0,o.jsxs)(`div`,{className:`flex items-center justify-between px-3 py-2.5`,children:[(0,o.jsxs)(`div`,{className:`text-text-positive-weak flex items-center gap-1`,children:[(0,o.jsx)(r.Image,{size:16,"aria-hidden":`true`}),(0,o.jsxs)(`p`,{className:`text-sm`,children:[`Ảnh đã tải lên (`,C.length,`)`]})]}),(0,o.jsxs)(`button`,{className:`hover:text-text-positive text-text-positive-muted flex cursor-pointer items-center gap-1 transition-colors duration-200`,onClick:()=>{C&&(C.forEach(e=>{f(e)&&URL.revokeObjectURL(e.preview)}),w([]),n?.([]))},children:[(0,o.jsx)(r.Trash2,{size:16,"aria-hidden":`true`}),(0,o.jsx)(`p`,{className:`text-sm`,children:`Xóa tất cả`})]})]}),(0,o.jsx)(`div`,{className:`flex flex-col gap-2.5`,children:C?.map((e,t)=>(0,o.jsx)(d,{file:e,onRemove:()=>E(t),progress:p?.[e.name]},t))})]}):null]})}function d({file:e,progress:a,onRemove:s}){return(0,o.jsxs)(`div`,{className:`border-border-weak hover:border-border relative flex items-center gap-4 rounded-md border py-2 pr-3 pl-2 shadow-xs transition-colors`,children:[(0,o.jsxs)(`div`,{className:`flex flex-1 gap-2.5`,children:[f(e)?(0,o.jsx)(p,{file:e}):null,(0,o.jsxs)(`div`,{className:`flex w-full flex-col gap-2`,children:[(0,o.jsxs)(`div`,{className:`flex flex-col gap-y-0.5`,children:[(0,o.jsx)(`p`,{className:`text-text-positive line-clamp-1 text-sm`,children:e.name}),(0,o.jsx)(`p`,{className:`text-text-positive-muted text-xs`,children:(0,i.formatBytes)(e.size)})]}),a?(0,o.jsx)(n.Progress,{value:a}):null]})]}),(0,o.jsx)(`div`,{className:`flex items-center gap-2`,children:(0,o.jsxs)(t.Button,{type:`button`,variant:`ghost`,color:`secondary`,size:`icon`,className:`size-7`,onClick:s,children:[(0,o.jsx)(r.Trash2,{size:16,className:`text-text-positive-muted`,"aria-hidden":`true`}),(0,o.jsx)(`span`,{className:`sr-only`,children:`Remove file`})]})})]})}function f(e){return`preview`in e&&typeof e.preview==`string`}function p({file:e}){return e.type.startsWith(`image/`)?(0,o.jsx)(`img`,{src:e.preview,className:`border-border aspect-square size-10 shrink-0 rounded border object-cover object-top shadow-sm`}):(0,o.jsx)(r.FileText,{className:`text-text-positive-muted size-10 border`,"aria-hidden":`true`})}exports.FileUploader=u;
3
3
  //# sourceMappingURL=file-uploader.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"file-uploader.cjs","names":["Dropzone","Upload","Image","Trash2","Progress","Button","FileText"],"sources":["../../packages/components/ui/file-uploader.tsx"],"sourcesContent":["'use client'\nimport { useCallback, useEffect } from 'react'\nimport Dropzone, { type DropzoneProps, type FileRejection } from 'react-dropzone'\nimport { useControllableState } from '@customafk/react-toolkit/hooks/useControllableState'\nimport { cn, formatBytes } from '@customafk/react-toolkit/utils'\n\nimport { FileText, Image, Trash2, Upload } from 'lucide-react'\nimport { toast } from 'sonner'\n\nimport { Button } from '@/components/ui/button'\nimport { Progress } from '@/components/ui/progress'\n\ninterface FileUploaderProps extends React.HTMLAttributes<HTMLDivElement> {\n /**\n * Value of the uploader.\n * @type File[]\n * @default undefined\n * @example value={files}\n */\n value?: File[]\n\n /**\n * Function to be called when the value changes.\n * @type (files: File[]) => void\n * @default undefined\n * @example onValueChange={(files) => setFiles(files)}\n */\n onValueChange?: (files: File[]) => void\n\n /**\n * Function to be called when files are uploaded.\n * @type (files: File[]) => Promise<void>\n * @default undefined\n * @example onUpload={(files) => uploadFiles(files)}\n */\n onUpload?: (files: File[]) => Promise<void>\n\n /**\n * Progress of the uploaded files.\n * @type Record<string, number> | undefined\n * @default undefined\n * @example progresses={{ \"file1.png\": 50 }}\n */\n progresses?: Record<string, number>\n\n /**\n * Accepted file types for the uploader.\n * @type { [key: string]: string[]}\n * @default\n * ```ts\n * { \"image/*\": [] }\n * ```\n * @example accept={[\"image/png\", \"image/jpeg\"]}\n */\n accept?: DropzoneProps['accept']\n\n /**\n * Maximum file size for the uploader.\n * @type number | undefined\n * @default 1024 * 1024 * 2 // 2MB\n * @example maxSize={1024 * 1024 * 2} // 2MB\n */\n maxSize?: DropzoneProps['maxSize']\n\n /**\n * Maximum number of files for the uploader.\n * @type number | undefined\n * @default 1\n * @example maxFileCount={4}\n */\n maxFileCount?: DropzoneProps['maxFiles']\n\n /**\n * Whether the uploader should accept multiple files.\n * @type boolean\n * @default false\n * @example multiple\n */\n multiple?: boolean\n\n /**\n * Whether the uploader is disabled.\n * @type boolean\n * @default false\n * @example disabled\n */\n disabled?: boolean\n\n showText?: boolean\n iconSize?: number\n}\n\nexport function FileUploader(props: FileUploaderProps) {\n const {\n value: valueProp,\n onValueChange,\n onUpload,\n progresses,\n accept = {\n 'image/*': [],\n },\n maxSize = 1024 * 1024 * 2,\n maxFileCount = 1,\n multiple = false,\n disabled = false,\n showText = true,\n iconSize,\n className,\n ...dropzoneProps\n } = props\n\n const [files, setFiles] = useControllableState({\n prop: valueProp,\n onChange: onValueChange,\n })\n\n const onDrop = useCallback(\n (acceptedFiles: File[], rejectedFiles: FileRejection[]) => {\n if (!multiple && maxFileCount === 1 && acceptedFiles.length > 1) {\n toast.error('Cannot upload more than 1 file at a time')\n\n return\n }\n\n if ((files?.length ?? 0) + acceptedFiles.length > maxFileCount) {\n toast.error(`Cannot upload more than ${maxFileCount} files`)\n return\n }\n\n const newFiles = acceptedFiles.map((file) =>\n Object.assign(file, {\n preview: URL.createObjectURL(file),\n }),\n )\n\n const updatedFiles = files ? [...files, ...newFiles] : newFiles\n\n setFiles(updatedFiles)\n\n if (rejectedFiles.length > 0) {\n rejectedFiles.forEach(({ file }) => {\n toast.error(`File ${file.name} was rejected`)\n })\n }\n\n if (onUpload && updatedFiles.length > 0 && updatedFiles.length <= maxFileCount) {\n const target = updatedFiles.length > 0 ? `${updatedFiles.length} files` : `file`\n\n onUpload(updatedFiles).then(() => {\n setFiles([])\n toast(`${target} uploaded`)\n })\n }\n },\n\n [files, maxFileCount, multiple, onUpload, setFiles],\n )\n\n function onRemove(index: number) {\n if (!files) return\n\n if (isFileWithPreview(files[index])) {\n URL.revokeObjectURL(files[index].preview)\n }\n\n const newFiles = files.filter((_, i) => i !== index)\n setFiles(newFiles)\n onValueChange?.(newFiles)\n }\n\n // Revoke preview url when component unmounts\n useEffect(() => {\n return () => {\n if (!files) return\n files.forEach((file) => {\n if (isFileWithPreview(file)) {\n URL.revokeObjectURL(file.preview)\n }\n })\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [])\n\n const isDisabled = disabled || (files?.length ?? 0) >= maxFileCount\n\n return (\n <div className=\"relative flex w-full flex-col gap-6\">\n <Dropzone onDrop={onDrop} accept={accept} maxSize={maxSize} maxFiles={maxFileCount} multiple={maxFileCount > 1 || multiple} disabled={isDisabled}>\n {({ getRootProps, getInputProps, isDragActive }) => (\n <div\n {...getRootProps()}\n className={cn(\n 'group',\n 'border-border-weak',\n 'hover:bg-border-weak/20',\n 'relative grid h-52 w-full cursor-pointer place-items-center rounded-lg border-2 border-dashed px-5 py-2.5 text-center transition',\n 'ring-offset-background',\n 'focus-visible:ring-primary-weak',\n 'focus-visible:ring-2',\n 'focus-visible:ring-offset-2',\n 'focus-visible:outline-hidden',\n isDragActive && 'border-border-primary-strong bg-border-weak/40',\n isDisabled && 'pointer-events-none opacity-60',\n className,\n )}\n {...dropzoneProps}\n >\n <input {...getInputProps()} />\n {isDragActive ? (\n <div className=\"flex flex-col items-center justify-center gap-4 sm:px-5\">\n <div className=\"rounded-full border border-dashed p-3\">\n <Upload className=\"text-text-positive-muted size-7\" aria-hidden=\"true\" />\n </div>\n <p className=\"text-text-positive-muted font-medium\">Drop the files here</p>\n </div>\n ) : (\n <div className=\"flex flex-col items-center justify-center gap-4 sm:px-5\">\n <div className=\"rounded-full border border-dashed p-3\">\n <Upload size={iconSize || 24} className=\"text-muted-foreground\" aria-hidden=\"true\" />\n </div>\n {showText && (\n <div className=\"flex flex-col gap-px\">\n <p className=\"text-text-positive-weak text-xs font-medium\">Drag {`'n'`} drop files here, or click to select files</p>\n <p className=\"text-text-positive-muted text-xs\">\n You can upload\n {maxFileCount > 1\n ? ` ${maxFileCount === Infinity ? 'multiple' : maxFileCount}\n files (up to ${formatBytes(maxSize)} each)`\n : ` a file with ${formatBytes(maxSize)}`}\n </p>\n </div>\n )}\n </div>\n )}\n </div>\n )}\n </Dropzone>\n {files?.length ? (\n <div className=\"h-fit w-full overflow-y-auto\">\n <div className=\"flex items-center justify-between px-3 py-2.5\">\n <div className=\"text-text-positive-weak flex items-center gap-1\">\n <Image size={16} aria-hidden=\"true\" />\n <p className=\"text-sm\">Ảnh đã tải lên ({files.length})</p>\n </div>\n <button\n className=\"hover:text-text-positive text-text-positive-muted flex cursor-pointer items-center gap-1 transition-colors duration-200\"\n onClick={() => {\n if (!files) return\n files.forEach((file) => {\n if (!isFileWithPreview(file)) return\n URL.revokeObjectURL(file.preview)\n })\n setFiles([])\n onValueChange?.([])\n }}\n >\n <Trash2 size={16} aria-hidden=\"true\" />\n <p className=\"text-sm\">Xóa tất cả</p>\n </button>\n </div>\n <div className=\"flex flex-col gap-2.5\">\n {files?.map((file, index) => (\n <FileCard key={index} file={file} onRemove={() => onRemove(index)} progress={progresses?.[file.name]} />\n ))}\n </div>\n </div>\n ) : null}\n </div>\n )\n}\n\ninterface FileCardProps {\n file: File\n onRemove: () => void\n progress?: number\n}\n\nfunction FileCard({ file, progress, onRemove }: FileCardProps) {\n return (\n <div className=\"border-border-weak hover:border-border relative flex items-center gap-4 rounded-md border py-2 pr-3 pl-2 shadow-xs transition-colors\">\n <div className=\"flex flex-1 gap-2.5\">\n {isFileWithPreview(file) ? <FilePreview file={file} /> : null}\n <div className=\"flex w-full flex-col gap-2\">\n <div className=\"flex flex-col gap-y-0.5\">\n <p className=\"text-text-positive line-clamp-1 text-sm\">{file.name}</p>\n <p className=\"text-text-positive-muted text-xs\">{formatBytes(file.size)}</p>\n </div>\n {progress ? <Progress value={progress} /> : null}\n </div>\n </div>\n <div className=\"flex items-center gap-2\">\n <Button type=\"button\" variant=\"ghost\" color=\"secondary\" size=\"icon\" className=\"size-7\" onClick={onRemove}>\n <Trash2 size={16} className=\"text-text-positive-muted\" aria-hidden=\"true\" />\n <span className=\"sr-only\">Remove file</span>\n </Button>\n </div>\n </div>\n )\n}\n\nfunction isFileWithPreview(file: File): file is File & { preview: string } {\n return 'preview' in file && typeof file.preview === 'string'\n}\n\ninterface FilePreviewProps {\n file: File & { preview: string }\n}\n\nfunction FilePreview({ file }: FilePreviewProps) {\n if (file.type.startsWith('image/')) {\n return <img src={file.preview} className=\"border-border aspect-square size-10 shrink-0 rounded border object-cover object-top shadow-sm\" />\n }\n\n return <FileText className=\"text-text-positive-muted size-10 border\" aria-hidden=\"true\" />\n}\n"],"mappings":"ugBA4FA,SAAgB,EAAa,EAA0B,CACrD,GAAM,CACJ,MAAO,EACP,gBACA,WACA,aACA,SAAS,CACP,UAAW,IAEb,UAAU,KAAO,KAAO,EACxB,eAAe,EACf,WAAW,GACX,WAAW,GACX,WAAW,GACX,WACA,YACA,GAAG,GACD,EAEE,CAAC,EAAO,IAAA,EAAA,EAAA,sBAAiC,CAC7C,KAAM,EACN,SAAU,IAGN,GAAA,EAAA,EAAA,cACH,EAAuB,IAAmC,CACzD,GAAI,CAAC,GAAY,IAAiB,G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zone","Upload","Image","Trash2","Progress","Button","FileText"],"sources":["../../packages/components/ui/file-uploader.tsx"],"sourcesContent":["'use client';\nimport { useCallback, useEffect } from 'react';\nimport Dropzone, { type DropzoneProps, type FileRejection } from 'react-dropzone';\nimport { useControllableState } from '@customafk/react-toolkit/hooks/useControllableState';\nimport { cn, formatBytes } from '@customafk/react-toolkit/utils';\n\nimport { FileText, Image, Trash2, Upload } from 'lucide-react';\nimport { toast } from 'sonner';\n\nimport { Button } from '@/components/ui/button';\nimport { Progress } from '@/components/ui/progress';\n\ninterface FileUploaderProps extends React.HTMLAttributes<HTMLDivElement> {\n /**\n * Value of the uploader.\n * @type File[]\n * @default undefined\n * @example value={files}\n */\n value?: File[];\n\n /**\n * Function to be called when the value changes.\n * @type (files: File[]) => void\n * @default undefined\n * @example onValueChange={(files) => setFiles(files)}\n */\n onValueChange?: (files: File[]) => void;\n\n /**\n * Function to be called when files are uploaded.\n * @type (files: File[]) => Promise<void>\n * @default undefined\n * @example onUpload={(files) => uploadFiles(files)}\n */\n onUpload?: (files: File[]) => Promise<void>;\n\n /**\n * Progress of the uploaded files.\n * @type Record<string, number> | undefined\n * @default undefined\n * @example progresses={{ \"file1.png\": 50 }}\n */\n progresses?: Record<string, number>;\n\n /**\n * Accepted file types for the uploader.\n * @type { [key: string]: string[]}\n * @default\n * ```ts\n * { \"image/*\": [] }\n * ```\n * @example accept={[\"image/png\", \"image/jpeg\"]}\n */\n accept?: DropzoneProps['accept'];\n\n /**\n * Maximum file size for the uploader.\n * @type number | undefined\n * @default 1024 * 1024 * 2 // 2MB\n * @example maxSize={1024 * 1024 * 2} // 2MB\n */\n maxSize?: DropzoneProps['maxSize'];\n\n /**\n * Maximum number of files for the uploader.\n * @type number | undefined\n * @default 1\n * @example maxFileCount={4}\n */\n maxFileCount?: DropzoneProps['maxFiles'];\n\n /**\n * Whether the uploader should accept multiple files.\n * @type boolean\n * @default false\n * @example multiple\n */\n multiple?: boolean;\n\n /**\n * Whether the uploader is disabled.\n * @type boolean\n * @default false\n * @example disabled\n */\n disabled?: boolean;\n\n showText?: boolean;\n iconSize?: number;\n}\n\nexport function FileUploader(props: FileUploaderProps) {\n const {\n value: valueProp,\n onValueChange,\n onUpload,\n progresses,\n accept = {\n 'image/*': [],\n },\n maxSize = 1024 * 1024 * 2,\n maxFileCount = 1,\n multiple = false,\n disabled = false,\n showText = true,\n iconSize,\n className,\n ...dropzoneProps\n } = props;\n\n const [files, setFiles] = useControllableState({\n prop: valueProp,\n onChange: onValueChange,\n });\n\n const onDrop = useCallback(\n (acceptedFiles: File[], rejectedFiles: FileRejection[]) => {\n if (!multiple && maxFileCount === 1 && acceptedFiles.length > 1) {\n toast.error('Cannot upload more than 1 file at a time');\n\n return;\n }\n\n if ((files?.length ?? 0) + acceptedFiles.length > maxFileCount) {\n toast.error(`Cannot upload more than ${maxFileCount} files`);\n return;\n }\n\n const newFiles = acceptedFiles.map(file =>\n Object.assign(file, {\n preview: URL.createObjectURL(file),\n })\n );\n\n const updatedFiles = files ? [...files, ...newFiles] : newFiles;\n\n setFiles(updatedFiles);\n\n if (rejectedFiles.length > 0) {\n rejectedFiles.forEach(({ file }) => {\n toast.error(`File ${file.name} was rejected`);\n });\n }\n\n if (onUpload && updatedFiles.length > 0 && updatedFiles.length <= maxFileCount) {\n const target = updatedFiles.length > 0 ? `${updatedFiles.length} files` : `file`;\n\n onUpload(updatedFiles).then(() => {\n setFiles([]);\n toast(`${target} uploaded`);\n });\n }\n },\n\n [files, maxFileCount, multiple, onUpload, setFiles]\n );\n\n function onRemove(index: number) {\n if (!files) return;\n\n if (isFileWithPreview(files[index])) {\n URL.revokeObjectURL(files[index].preview);\n }\n\n const newFiles = files.filter((_, i) => i !== index);\n setFiles(newFiles);\n onValueChange?.(newFiles);\n }\n\n // Revoke preview url when component unmounts\n useEffect(() => {\n return () => {\n if (!files) return;\n files.forEach(file => {\n if (isFileWithPreview(file)) {\n URL.revokeObjectURL(file.preview);\n }\n });\n };\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n const isDisabled = disabled || (files?.length ?? 0) >= maxFileCount;\n\n return (\n <div className=\"relative flex w-full flex-col gap-6\">\n <Dropzone onDrop={onDrop} accept={accept} maxSize={maxSize} maxFiles={maxFileCount} multiple={maxFileCount > 1 || multiple} disabled={isDisabled}>\n {({ getRootProps, getInputProps, isDragActive }) => (\n <div\n {...getRootProps()}\n className={cn(\n 'group',\n 'border-border-weak',\n 'hover:bg-border-weak/20',\n 'relative grid h-52 w-full cursor-pointer place-items-center rounded-lg border-2 border-dashed px-5 py-2.5 text-center transition',\n 'ring-offset-background',\n 'focus-visible:ring-primary-weak',\n 'focus-visible:ring-2',\n 'focus-visible:ring-offset-2',\n 'focus-visible:outline-hidden',\n isDragActive && 'border-border-primary-strong bg-border-weak/40',\n isDisabled && 'pointer-events-none opacity-60',\n className\n )}\n {...dropzoneProps}\n >\n <input {...getInputProps()} />\n {isDragActive ? (\n <div className=\"flex flex-col items-center justify-center gap-4 sm:px-5\">\n <div className=\"rounded-full border border-dashed p-3\">\n <Upload className=\"text-text-positive-muted size-7\" aria-hidden=\"true\" />\n </div>\n <p className=\"text-text-positive-muted font-medium\">Drop the files here</p>\n </div>\n ) : (\n <div className=\"flex flex-col items-center justify-center gap-4 sm:px-5\">\n <div className=\"rounded-full border border-dashed p-3\">\n <Upload size={iconSize || 24} className=\"text-muted-foreground\" aria-hidden=\"true\" />\n </div>\n {showText && (\n <div className=\"flex flex-col gap-px\">\n <p className=\"text-text-positive-weak text-xs font-medium\">Drag {`'n'`} drop files here, or click to select files</p>\n <p className=\"text-text-positive-muted text-xs\">\n You can upload\n {maxFileCount > 1\n ? ` ${maxFileCount === Infinity ? 'multiple' : maxFileCount}\n files (up to ${formatBytes(maxSize)} each)`\n : ` a file with ${formatBytes(maxSize)}`}\n </p>\n </div>\n )}\n </div>\n )}\n </div>\n )}\n </Dropzone>\n {files?.length ? (\n <div className=\"h-fit w-full overflow-y-auto\">\n <div className=\"flex items-center justify-between px-3 py-2.5\">\n <div className=\"text-text-positive-weak flex items-center gap-1\">\n <Image size={16} aria-hidden=\"true\" />\n <p className=\"text-sm\">Ảnh đã tải lên ({files.length})</p>\n </div>\n <button\n className=\"hover:text-text-positive text-text-positive-muted flex cursor-pointer items-center gap-1 transition-colors duration-200\"\n onClick={() => {\n if (!files) return;\n files.forEach(file => {\n if (!isFileWithPreview(file)) return;\n URL.revokeObjectURL(file.preview);\n });\n setFiles([]);\n onValueChange?.([]);\n }}\n >\n <Trash2 size={16} aria-hidden=\"true\" />\n <p className=\"text-sm\">Xóa tất cả</p>\n </button>\n </div>\n <div className=\"flex flex-col gap-2.5\">\n {files?.map((file, index) => (\n <FileCard key={index} file={file} onRemove={() => onRemove(index)} progress={progresses?.[file.name]} />\n ))}\n </div>\n </div>\n ) : null}\n </div>\n );\n}\n\ninterface FileCardProps {\n file: File;\n onRemove: () => void;\n progress?: number;\n}\n\nfunction FileCard({ file, progress, onRemove }: FileCardProps) {\n return (\n <div className=\"border-border-weak hover:border-border relative flex items-center gap-4 rounded-md border py-2 pr-3 pl-2 shadow-xs transition-colors\">\n <div className=\"flex flex-1 gap-2.5\">\n {isFileWithPreview(file) ? <FilePreview file={file} /> : null}\n <div className=\"flex w-full flex-col gap-2\">\n <div className=\"flex flex-col gap-y-0.5\">\n <p className=\"text-text-positive line-clamp-1 text-sm\">{file.name}</p>\n <p className=\"text-text-positive-muted text-xs\">{formatBytes(file.size)}</p>\n </div>\n {progress ? <Progress value={progress} /> : null}\n </div>\n </div>\n <div className=\"flex items-center gap-2\">\n <Button type=\"button\" variant=\"ghost\" color=\"secondary\" size=\"icon\" className=\"size-7\" onClick={onRemove}>\n <Trash2 size={16} className=\"text-text-positive-muted\" aria-hidden=\"true\" />\n <span className=\"sr-only\">Remove file</span>\n </Button>\n </div>\n </div>\n );\n}\n\nfunction isFileWithPreview(file: File): file is File & { preview: string } {\n return 'preview' in file && typeof file.preview === 'string';\n}\n\ninterface FilePreviewProps {\n file: File & { preview: string };\n}\n\nfunction FilePreview({ file }: FilePreviewProps) {\n if (file.type.startsWith('image/')) {\n return <img src={file.preview} className=\"border-border aspect-square size-10 shrink-0 rounded border object-cover object-top shadow-sm\" />;\n }\n\n return <FileText className=\"text-text-positive-muted size-10 border\" aria-hidden=\"true\" />;\n}\n"],"mappings":"+jBA4FA,SAAgB,EAAa,EAA0B,CACrD,GAAM,CACJ,MAAO,EACP,gBACA,WACA,aACA,SAAS,CACP,UAAW,EAAE,CACd,CACD,UAAU,KAAO,KAAO,EACxB,eAAe,EACf,WAAW,GACX,WAAW,GACX,WAAW,GACX,WACA,YACA,GAAG,GACD,EAEE,CAAC,EAAO,IAAA,EAAA,EAAA,sBAAiC,CAC7C,KAAM,EACN,SAAU,EACX,CAAC,CAEI,GAAA,EAAA,EAAA,cACH,EAAuB,IAAmC,CACzD,GAAI,CAAC,GAAY,IAAiB,GAAK,EAAc,OAAS,EAAG,CAC/D,EAAA,MAAM,MAAM,2CAA2C,CAEvD,OAGF,IAAK,GAAO,QAAU,GAAK,EAAc,OAAS,EAAc,CAC9D,EAAA,MAAM,MAAM,2BAA2B,EAAa,QAAQ,CAC5D,OAGF,IAAM,EAAW,EAAc,IAAI,GACjC,OAAO,OAAO,EAAM,CAClB,QAAS,IAAI,gBAAgB,EAAK,CACnC,CAAC,CACH,CAEK,EAAe,EAAQ,CAAC,GAAG,EAAO,GAAG,EAAS,CAAG,EAUvD,GARA,EAAS,EAAa,CAElB,EAAc,OAAS,GACzB,EAAc,SAAS,CAAE,UAAW,CAClC,EAAA,MAAM,MAAM,QAAQ,EAAK,KAAK,eAAe,EAC7C,CAGA,GAAY,EAAa,OAAS,GAAK,EAAa,QAAU,EAAc,CAC9E,IAAM,EAAS,EAAa,OAAS,EAAI,GAAG,EAAa,OAAO,QAAU,OAE1E,EAAS,EAAa,CAAC,SAAW,CAChC,EAAS,EAAE,CAAC,EACZ,EAAA,EAAA,OAAM,GAAG,EAAO,WAAW,EAC3B,GAIN,CAAC,EA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C7D,OACE,EAAA,EAAA,MAAC,MAAA,CAAI,UAAU,kJACb,EAAA,EAAA,MAAC,MAAA,CAAI,UAAU,gCACZ,EAAkB,EAAK,EAAG,EAAA,EAAA,KAAC,EAAA,CAAkB,OAAA,CAAQ,CAAG,MACzD,EAAA,EAAA,MAAC,MAAA,CAAI,UAAU,wCACb,EAAA,EAAA,MAAC,MAAA,CAAI,UAAU,qCACb,EAAA,EAAA,KAAC,IAAA,CAAE,UAAU,mDAA2C,EAAK,MAAS,EACtE,EAAA,EAAA,KAAC,IAAA,CAAE,UAAU,8DAAgD,EAAK,KAAK,EAAK,CAAA,EACxE,CACL,GAAW,EAAA,EAAA,KAACC,EAAAA,SAAAA,CAAS,MAAO,EAAA,CAAY,CAAG,KAAA,EACxC,CAAA,EACF,EACN,EAAA,EAAA,KAAC,MAAA,CAAI,UAAU,oCACb,EAAA,EAAA,MAACC,EAAAA,OAAAA,CAAO,KAAK,SAAS,QAAQ,QAAQ,MAAM,YAAY,KAAK,OAAO,UAAU,SAAS,QAAS,aAC9F,EAAA,EAAA,KAACF,EAAAA,OAAAA,CAAO,KAAM,GAAI,UAAU,2BAA2B,cAAY,QAAS,EAC5E,EAAA,EAAA,KAAC,OAAA,CAAK,UAAU,mBAAU,eAAkB,CAAA,EACrC,EACL,CAAA,EACF,CAIV,SAAS,EAAkB,EAAgD,CACzE,MAAO,YAAa,GAAQ,OAAO,EAAK,SAAY,SAOtD,SAAS,EAAY,CAAE,QAA0B,CAK/C,OAJI,EAAK,KAAK,WAAW,SAAS,EACzB,EAAA,EAAA,KAAC,MAAA,CAAI,IAAK,EAAK,QAAS,UAAU,iGAAkG,EAGtI,EAAA,EAAA,KAACG,EAAAA,SAAAA,CAAS,UAAU,0CAA0C,cAAY,QAAS"}
@@ -1,4 +1,4 @@
1
- import * as react_jsx_runtime119 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime128 from "react/jsx-runtime";
2
2
  import { DropzoneProps } from "react-dropzone";
3
3
 
4
4
  //#region packages/components/ui/file-uploader.d.ts
@@ -72,7 +72,7 @@ interface FileUploaderProps extends React.HTMLAttributes<HTMLDivElement> {
72
72
  showText?: boolean;
73
73
  iconSize?: number;
74
74
  }
75
- declare function FileUploader(props: FileUploaderProps): react_jsx_runtime119.JSX.Element;
75
+ declare function FileUploader(props: FileUploaderProps): react_jsx_runtime128.JSX.Element;
76
76
  //#endregion
77
77
  export { FileUploader };
78
78
  //# sourceMappingURL=file-uploader.d.cts.map
@@ -1,4 +1,4 @@
1
- import * as react_jsx_runtime148 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime138 from "react/jsx-runtime";
2
2
  import { DropzoneProps } from "react-dropzone";
3
3
 
4
4
  //#region packages/components/ui/file-uploader.d.ts
@@ -72,7 +72,7 @@ interface FileUploaderProps extends React.HTMLAttributes<HTMLDivElement> {
72
72
  showText?: boolean;
73
73
  iconSize?: number;
74
74
  }
75
- declare function FileUploader(props: FileUploaderProps): react_jsx_runtime148.JSX.Element;
75
+ declare function FileUploader(props: FileUploaderProps): react_jsx_runtime138.JSX.Element;
76
76
  //#endregion
77
77
  export { FileUploader };
78
78
  //# sourceMappingURL=file-uploader.d.ts.map
@@ -1,3 +1,3 @@
1
- "use client";import"../dist-CkzytVha.js";import"../button-variants-Y1GTBayz.js";import{Button as e}from"../button-DhQJ9Ey8.js";import{Progress as t}from"../progress-DzBPViJg.js";import{FileText as n,Image as r,Trash2 as i,Upload as a}from"lucide-react";import{cn as o,formatBytes as s}from"@customafk/react-toolkit/utils";import{useCallback as c,useEffect as l}from"react";import{jsx as u,jsxs as d}from"react/jsx-runtime";import f from"react-dropzone";import{useControllableState as p}from"@customafk/react-toolkit/hooks/useControllableState";import{toast as m}from"sonner";function h(e){let{value:t,onValueChange:n,onUpload:h,progresses:v,accept:y={"image/*":[]},maxSize:b=1024*1024*2,maxFileCount:x=1,multiple:S=!1,disabled:C=!1,showText:w=!0,iconSize:T,className:E,...D}=e,[O,k]=p({prop:t,onChange:n}),A=c((e,t)=>{if(!S&&x===1&&e.length>1){m.error(`Cannot upload more than 1 file at a time`);return}if((O?.length??0)+e.length>x){m.error(`Cannot upload more than ${x} files`);return}let n=e.map(e=>Object.assign(e,{preview:URL.createObjectURL(e)})),r=O?[...O,...n]:n;if(k(r),t.length>0&&t.forEach(({file:e})=>{m.error(`File ${e.name} was rejected`)}),h&&r.length>0&&r.length<=x){let e=r.length>0?`${r.length} files`:`file`;h(r).then(()=>{k([]),m(`${e} uploaded`)})}},[O,x,S,h,k]);function j(e){if(!O)return;_(O[e])&&URL.revokeObjectURL(O[e].preview);let t=O.filter((t,n)=>n!==e);k(t),n?.(t)}l(()=>()=>{O&&O.forEach(e=>{_(e)&&URL.revokeObjectURL(e.preview)})},[]);let M=C||(O?.length??0)>=x;return d(`div`,{className:`relative flex w-full flex-col gap-6`,children:[u(f,{onDrop:A,accept:y,maxSize:b,maxFiles:x,multiple:x>1||S,disabled:M,children:({getRootProps:e,getInputProps:t,isDragActive:n})=>d(`div`,{...e(),className:o(`group`,`border-border-weak`,`hover:bg-border-weak/20`,`relative grid h-52 w-full cursor-pointer place-items-center rounded-lg border-2 border-dashed px-5 py-2.5 text-center transition`,`ring-offset-background`,`focus-visible:ring-primary-weak`,`focus-visible:ring-2`,`focus-visible:ring-offset-2`,`focus-visible:outline-hidden`,n&&`border-border-primary-strong bg-border-weak/40`,M&&`pointer-events-none opacity-60`,E),...D,children:[u(`input`,{...t()}),n?d(`div`,{className:`flex flex-col items-center justify-center gap-4 sm:px-5`,children:[u(`div`,{className:`rounded-full border border-dashed p-3`,children:u(a,{className:`text-text-positive-muted size-7`,"aria-hidden":`true`})}),u(`p`,{className:`text-text-positive-muted font-medium`,children:`Drop the files here`})]}):d(`div`,{className:`flex flex-col items-center justify-center gap-4 sm:px-5`,children:[u(`div`,{className:`rounded-full border border-dashed p-3`,children:u(a,{size:T||24,className:`text-muted-foreground`,"aria-hidden":`true`})}),w&&d(`div`,{className:`flex flex-col gap-px`,children:[d(`p`,{className:`text-text-positive-weak text-xs font-medium`,children:[`Drag `,`'n'`,` drop files here, or click to select files`]}),d(`p`,{className:`text-text-positive-muted text-xs`,children:[`You can upload`,x>1?` ${x===1/0?`multiple`:x}
1
+ "use client";import"../dist-BgkALM7U.js";import"../button-variants-Y1GTBayz.js";import{Button as e}from"../button-CYsnwc1-.js";import{Progress as t}from"../progress-DwLEMPaO.js";import{FileText as n,Image as r,Trash2 as i,Upload as a}from"lucide-react";import{cn as o,formatBytes as s}from"@customafk/react-toolkit/utils";import{useCallback as c,useEffect as l}from"react";import{jsx as u,jsxs as d}from"react/jsx-runtime";import f from"react-dropzone";import{useControllableState as p}from"@customafk/react-toolkit/hooks/useControllableState";import{toast as m}from"sonner";function h(e){let{value:t,onValueChange:n,onUpload:h,progresses:v,accept:y={"image/*":[]},maxSize:b=1024*1024*2,maxFileCount:x=1,multiple:S=!1,disabled:C=!1,showText:w=!0,iconSize:T,className:E,...D}=e,[O,k]=p({prop:t,onChange:n}),A=c((e,t)=>{if(!S&&x===1&&e.length>1){m.error(`Cannot upload more than 1 file at a time`);return}if((O?.length??0)+e.length>x){m.error(`Cannot upload more than ${x} files`);return}let n=e.map(e=>Object.assign(e,{preview:URL.createObjectURL(e)})),r=O?[...O,...n]:n;if(k(r),t.length>0&&t.forEach(({file:e})=>{m.error(`File ${e.name} was rejected`)}),h&&r.length>0&&r.length<=x){let e=r.length>0?`${r.length} files`:`file`;h(r).then(()=>{k([]),m(`${e} uploaded`)})}},[O,x,S,h,k]);function j(e){if(!O)return;_(O[e])&&URL.revokeObjectURL(O[e].preview);let t=O.filter((t,n)=>n!==e);k(t),n?.(t)}l(()=>()=>{O&&O.forEach(e=>{_(e)&&URL.revokeObjectURL(e.preview)})},[]);let M=C||(O?.length??0)>=x;return d(`div`,{className:`relative flex w-full flex-col gap-6`,children:[u(f,{onDrop:A,accept:y,maxSize:b,maxFiles:x,multiple:x>1||S,disabled:M,children:({getRootProps:e,getInputProps:t,isDragActive:n})=>d(`div`,{...e(),className:o(`group`,`border-border-weak`,`hover:bg-border-weak/20`,`relative grid h-52 w-full cursor-pointer place-items-center rounded-lg border-2 border-dashed px-5 py-2.5 text-center transition`,`ring-offset-background`,`focus-visible:ring-primary-weak`,`focus-visible:ring-2`,`focus-visible:ring-offset-2`,`focus-visible:outline-hidden`,n&&`border-border-primary-strong bg-border-weak/40`,M&&`pointer-events-none opacity-60`,E),...D,children:[u(`input`,{...t()}),n?d(`div`,{className:`flex flex-col items-center justify-center gap-4 sm:px-5`,children:[u(`div`,{className:`rounded-full border border-dashed p-3`,children:u(a,{className:`text-text-positive-muted size-7`,"aria-hidden":`true`})}),u(`p`,{className:`text-text-positive-muted font-medium`,children:`Drop the files here`})]}):d(`div`,{className:`flex flex-col items-center justify-center gap-4 sm:px-5`,children:[u(`div`,{className:`rounded-full border border-dashed p-3`,children:u(a,{size:T||24,className:`text-muted-foreground`,"aria-hidden":`true`})}),w&&d(`div`,{className:`flex flex-col gap-px`,children:[d(`p`,{className:`text-text-positive-weak text-xs font-medium`,children:[`Drag `,`'n'`,` drop files here, or click to select files`]}),d(`p`,{className:`text-text-positive-muted text-xs`,children:[`You can upload`,x>1?` ${x===1/0?`multiple`:x}
2
2
  files (up to ${s(b)} each)`:` a file with ${s(b)}`]})]})]})]})}),O?.length?d(`div`,{className:`h-fit w-full overflow-y-auto`,children:[d(`div`,{className:`flex items-center justify-between px-3 py-2.5`,children:[d(`div`,{className:`text-text-positive-weak flex items-center gap-1`,children:[u(r,{size:16,"aria-hidden":`true`}),d(`p`,{className:`text-sm`,children:[`Ảnh đã tải lên (`,O.length,`)`]})]}),d(`button`,{className:`hover:text-text-positive text-text-positive-muted flex cursor-pointer items-center gap-1 transition-colors duration-200`,onClick:()=>{O&&(O.forEach(e=>{_(e)&&URL.revokeObjectURL(e.preview)}),k([]),n?.([]))},children:[u(i,{size:16,"aria-hidden":`true`}),u(`p`,{className:`text-sm`,children:`Xóa tất cả`})]})]}),u(`div`,{className:`flex flex-col gap-2.5`,children:O?.map((e,t)=>u(g,{file:e,onRemove:()=>j(t),progress:v?.[e.name]},t))})]}):null]})}function g({file:n,progress:r,onRemove:a}){return d(`div`,{className:`border-border-weak hover:border-border relative flex items-center gap-4 rounded-md border py-2 pr-3 pl-2 shadow-xs transition-colors`,children:[d(`div`,{className:`flex flex-1 gap-2.5`,children:[_(n)?u(v,{file:n}):null,d(`div`,{className:`flex w-full flex-col gap-2`,children:[d(`div`,{className:`flex flex-col gap-y-0.5`,children:[u(`p`,{className:`text-text-positive line-clamp-1 text-sm`,children:n.name}),u(`p`,{className:`text-text-positive-muted text-xs`,children:s(n.size)})]}),r?u(t,{value:r}):null]})]}),u(`div`,{className:`flex items-center gap-2`,children:d(e,{type:`button`,variant:`ghost`,color:`secondary`,size:`icon`,className:`size-7`,onClick:a,children:[u(i,{size:16,className:`text-text-positive-muted`,"aria-hidden":`true`}),u(`span`,{className:`sr-only`,children:`Remove file`})]})})]})}function _(e){return`preview`in e&&typeof e.preview==`string`}function v({file:e}){return e.type.startsWith(`image/`)?u(`img`,{src:e.preview,className:`border-border aspect-square size-10 shrink-0 rounded border object-cover object-top shadow-sm`}):u(n,{className:`text-text-positive-muted size-10 border`,"aria-hidden":`true`})}export{h as FileUploader};
3
3
  //# sourceMappingURL=file-uploader.js.map