@customafk/lunas-ui 0.2.3 → 0.2.5

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 (345) hide show
  1. package/dist/{button-C6s_h0K3.d.mts → button-B5a1UlC_.d.mts} +10 -8
  2. package/dist/button-Cd7YtPlT.cjs +2 -0
  3. package/dist/button-Cd7YtPlT.cjs.map +1 -0
  4. package/dist/button-D8BUqpI2.mjs +2 -0
  5. package/dist/button-D8BUqpI2.mjs.map +1 -0
  6. package/dist/{button-CcOrQc7g.d.cts → button-DYZCqN6A.d.cts} +8 -6
  7. package/dist/button.variants-B_dFX3i2.mjs +2 -0
  8. package/dist/button.variants-B_dFX3i2.mjs.map +1 -0
  9. package/dist/button.variants-aqkTmzFu.cjs +2 -0
  10. package/dist/button.variants-aqkTmzFu.cjs.map +1 -0
  11. package/dist/{calendar-qHQsMOj9.mjs → calendar-B-PDpHK5.mjs} +2 -2
  12. package/dist/{calendar-qHQsMOj9.mjs.map → calendar-B-PDpHK5.mjs.map} +1 -1
  13. package/dist/{calendar-dhPqb3aZ.cjs → calendar-Cq3_5u0k.cjs} +2 -2
  14. package/dist/{calendar-dhPqb3aZ.cjs.map → calendar-Cq3_5u0k.cjs.map} +1 -1
  15. package/dist/cards/grid-product-card.cjs +1 -1
  16. package/dist/cards/grid-product-card.mjs +1 -1
  17. package/dist/cards/product-card.cjs +1 -1
  18. package/dist/cards/product-card.mjs +1 -1
  19. package/dist/cards/simple-card.cjs +1 -1
  20. package/dist/cards/simple-card.d.mts +2 -2
  21. package/dist/cards/simple-card.mjs +1 -1
  22. package/dist/{command-DhBTNTqz.mjs → command-Bma4ivZz.mjs} +2 -2
  23. package/dist/{command-DhBTNTqz.mjs.map → command-Bma4ivZz.mjs.map} +1 -1
  24. package/dist/{command-_zpTaaIk.cjs → command-IfPmQiyJ.cjs} +2 -2
  25. package/dist/{command-_zpTaaIk.cjs.map → command-IfPmQiyJ.cjs.map} +1 -1
  26. package/dist/data-display/country.cjs +1 -1
  27. package/dist/data-display/country.mjs +1 -1
  28. package/dist/data-display/data-list.cjs +1 -1
  29. package/dist/data-display/data-list.mjs +1 -1
  30. package/dist/data-display/date-tooltip.cjs +1 -1
  31. package/dist/data-display/date-tooltip.mjs +1 -1
  32. package/dist/data-display/date.cjs +1 -1
  33. package/dist/data-display/date.mjs +1 -1
  34. package/dist/data-display/empty.cjs +1 -1
  35. package/dist/data-display/empty.d.mts +2 -2
  36. package/dist/data-display/empty.mjs +1 -1
  37. package/dist/data-display/name.cjs +1 -1
  38. package/dist/data-display/name.mjs +1 -1
  39. package/dist/data-display/role-badge.cjs +1 -1
  40. package/dist/data-display/role-badge.mjs +1 -1
  41. package/dist/data-display/statistic.cjs +1 -1
  42. package/dist/data-display/statistic.d.cts +2 -2
  43. package/dist/data-display/statistic.d.mts +4 -4
  44. package/dist/data-display/statistic.mjs +1 -1
  45. package/dist/data-display/user.cjs +1 -1
  46. package/dist/data-display/user.mjs +1 -1
  47. package/dist/{date-em5f7hCx.cjs → date-WraHGsbb.cjs} +2 -2
  48. package/dist/{date-em5f7hCx.cjs.map → date-WraHGsbb.cjs.map} +1 -1
  49. package/dist/{date-By93kONr.mjs → date-uVTm7J09.mjs} +2 -2
  50. package/dist/{date-By93kONr.mjs.map → date-uVTm7J09.mjs.map} +1 -1
  51. package/dist/{dialog-CxELDK98.mjs → dialog-B50k7HnL.mjs} +2 -2
  52. package/dist/{dialog-CxELDK98.mjs.map → dialog-B50k7HnL.mjs.map} +1 -1
  53. package/dist/{dialog-DjRiV5vR.cjs → dialog-BoNhIQYJ.cjs} +2 -2
  54. package/dist/{dialog-DjRiV5vR.cjs.map → dialog-BoNhIQYJ.cjs.map} +1 -1
  55. package/dist/{dialog-CsM9bEo6.d.cts → dialog-CuZxUWfc.d.cts} +12 -12
  56. package/dist/{dialog-NsKYcQwE.d.mts → dialog-D4LnpcNL.d.mts} +12 -12
  57. package/dist/dialogs/confirm-dialog.cjs +1 -1
  58. package/dist/dialogs/confirm-dialog.mjs +1 -1
  59. package/dist/dialogs/detail-dialog/components/sidebar.cjs +1 -1
  60. package/dist/dialogs/detail-dialog/components/sidebar.d.cts +27 -27
  61. package/dist/dialogs/detail-dialog/components/sidebar.d.mts +27 -27
  62. package/dist/dialogs/detail-dialog/components/sidebar.mjs +1 -1
  63. package/dist/dialogs/detail-dialog/index.cjs +1 -1
  64. package/dist/dialogs/detail-dialog/index.mjs +1 -1
  65. package/dist/dialogs/error-dialog.cjs +1 -1
  66. package/dist/dialogs/error-dialog.mjs +1 -1
  67. package/dist/dialogs/loading-dialog.cjs +1 -1
  68. package/dist/dialogs/loading-dialog.mjs +1 -1
  69. package/dist/dist-DP1ehOL8.mjs +2 -0
  70. package/dist/{dist-CvmzZ_6C.mjs.map → dist-DP1ehOL8.mjs.map} +1 -1
  71. package/dist/dist-Q1UyT_bc.cjs +2 -0
  72. package/dist/{dist-BudM04oj.cjs.map → dist-Q1UyT_bc.cjs.map} +1 -1
  73. package/dist/features/descriptions/index.cjs +1 -1
  74. package/dist/features/descriptions/index.d.cts +4 -4
  75. package/dist/features/descriptions/index.d.mts +1 -1
  76. package/dist/features/descriptions/index.mjs +1 -1
  77. package/dist/features/search-modal/index.cjs +1 -1
  78. package/dist/features/search-modal/index.d.cts +2 -2
  79. package/dist/features/search-modal/index.d.mts +2 -2
  80. package/dist/features/search-modal/index.mjs +1 -1
  81. package/dist/features/tables/index.cjs +1 -1
  82. package/dist/features/tables/index.d.cts +1 -1
  83. package/dist/features/tables/index.d.mts +23 -23
  84. package/dist/features/tables/index.mjs +1 -1
  85. package/dist/features/tables/index.mjs.map +1 -1
  86. package/dist/features/tanstack-form/index.cjs +1 -1
  87. package/dist/features/tanstack-form/index.d.cts +278 -278
  88. package/dist/features/tanstack-form/index.d.mts +278 -278
  89. package/dist/features/tanstack-form/index.mjs +1 -1
  90. package/dist/features/tanstack-form/index.mjs.map +1 -1
  91. package/dist/{flex-twCgWyx1.cjs → flex-BsoSgWFN.cjs} +2 -2
  92. package/dist/{flex-twCgWyx1.cjs.map → flex-BsoSgWFN.cjs.map} +1 -1
  93. package/dist/{flex-BP8sTi70.mjs → flex-CeizYtXs.mjs} +2 -2
  94. package/dist/{flex-BP8sTi70.mjs.map → flex-CeizYtXs.mjs.map} +1 -1
  95. package/dist/heading-BEbpIiLg.cjs +2 -0
  96. package/dist/heading-BEbpIiLg.cjs.map +1 -0
  97. package/dist/heading-CrF1CFWS.mjs +2 -0
  98. package/dist/heading-CrF1CFWS.mjs.map +1 -0
  99. package/dist/{image-DuFv8sPr.cjs → image-BBZUipoU.cjs} +2 -2
  100. package/dist/{image-DuFv8sPr.cjs.map → image-BBZUipoU.cjs.map} +1 -1
  101. package/dist/image-CZji4Q26.mjs +2 -0
  102. package/dist/{image-CS_Q0WA7.mjs.map → image-CZji4Q26.mjs.map} +1 -1
  103. package/dist/{input-BFWWaN-v.cjs → input-BoMJaF_N.cjs} +2 -2
  104. package/dist/{input-BFWWaN-v.cjs.map → input-BoMJaF_N.cjs.map} +1 -1
  105. package/dist/{input-DBtIgQB6.mjs → input-DMjPBcJO.mjs} +2 -2
  106. package/dist/{input-DBtIgQB6.mjs.map → input-DMjPBcJO.mjs.map} +1 -1
  107. package/dist/{input-B65h-l45.d.cts → input-DszdZdbJ.d.cts} +7 -7
  108. package/dist/{input-C6Q4vGNC.d.mts → input-Dv7UKl6Z.d.mts} +7 -7
  109. package/dist/layouts/cms-layout/index.cjs +1 -1
  110. package/dist/layouts/cms-layout/index.mjs +1 -1
  111. package/dist/layouts/flex.cjs +1 -1
  112. package/dist/layouts/flex.d.cts +8 -8
  113. package/dist/layouts/flex.d.mts +12 -12
  114. package/dist/layouts/flex.mjs +1 -1
  115. package/dist/layouts/payment-layout/index.cjs +1 -1
  116. package/dist/layouts/payment-layout/index.mjs +1 -1
  117. package/dist/pages/FeatureDeveloping.cjs +1 -1
  118. package/dist/pages/FeatureDeveloping.d.cts +2 -2
  119. package/dist/pages/FeatureDeveloping.d.mts +2 -2
  120. package/dist/pages/FeatureDeveloping.mjs +1 -1
  121. package/dist/pages/FeatureFixing.cjs +1 -1
  122. package/dist/pages/FeatureFixing.d.cts +2 -2
  123. package/dist/pages/FeatureFixing.d.mts +2 -2
  124. package/dist/pages/FeatureFixing.mjs +1 -1
  125. package/dist/pages/NotAuthorized.cjs +1 -1
  126. package/dist/pages/NotAuthorized.d.cts +2 -2
  127. package/dist/pages/NotAuthorized.d.mts +2 -2
  128. package/dist/pages/NotAuthorized.mjs +1 -1
  129. package/dist/pages/NotFound.cjs +1 -1
  130. package/dist/pages/NotFound.d.cts +2 -2
  131. package/dist/pages/NotFound.d.mts +2 -2
  132. package/dist/pages/NotFound.mjs +1 -1
  133. package/dist/paragraph-Co2e-y5c.cjs +2 -0
  134. package/dist/paragraph-Co2e-y5c.cjs.map +1 -0
  135. package/dist/paragraph-DmiXlAnE.mjs +2 -0
  136. package/dist/paragraph-DmiXlAnE.mjs.map +1 -0
  137. package/dist/{resizable-mlGS6Zto.cjs → resizable-B8tRShQI.cjs} +2 -2
  138. package/dist/{resizable-mlGS6Zto.cjs.map → resizable-B8tRShQI.cjs.map} +1 -1
  139. package/dist/{resizable-DXHfkbaz.mjs → resizable-RPObV6jc.mjs} +2 -2
  140. package/dist/{resizable-DXHfkbaz.mjs.map → resizable-RPObV6jc.mjs.map} +1 -1
  141. package/dist/systems/google.cjs +1 -1
  142. package/dist/systems/google.mjs +1 -1
  143. package/dist/{textarea-COQoSVSc.cjs → textarea-Dlwbg6TY.cjs} +2 -2
  144. package/dist/{textarea-COQoSVSc.cjs.map → textarea-Dlwbg6TY.cjs.map} +1 -1
  145. package/dist/{textarea-bLtmb71c.mjs → textarea-RjL2DtNf.mjs} +2 -2
  146. package/dist/{textarea-bLtmb71c.mjs.map → textarea-RjL2DtNf.mjs.map} +1 -1
  147. package/dist/typography/paragraph.cjs +1 -1
  148. package/dist/typography/paragraph.d.cts +10 -20
  149. package/dist/typography/paragraph.d.mts +10 -20
  150. package/dist/typography/paragraph.mjs +1 -1
  151. package/dist/typography/title.cjs +1 -1
  152. package/dist/typography/title.cjs.map +1 -1
  153. package/dist/typography/title.d.cts +4 -3
  154. package/dist/typography/title.d.mts +4 -3
  155. package/dist/typography/title.mjs +1 -1
  156. package/dist/typography/title.mjs.map +1 -1
  157. package/dist/ui/alert-dialog.cjs +1 -1
  158. package/dist/ui/alert-dialog.d.cts +12 -12
  159. package/dist/ui/alert-dialog.d.mts +12 -12
  160. package/dist/ui/alert-dialog.mjs +1 -1
  161. package/dist/ui/alert.cjs +1 -1
  162. package/dist/ui/alert.d.cts +5 -5
  163. package/dist/ui/alert.d.mts +7 -7
  164. package/dist/ui/alert.mjs +1 -1
  165. package/dist/ui/aspect-ratio.d.cts +2 -2
  166. package/dist/ui/aspect-ratio.d.mts +2 -2
  167. package/dist/ui/avatar.d.cts +4 -4
  168. package/dist/ui/avatar.d.mts +4 -4
  169. package/dist/ui/badge.d.cts +5 -5
  170. package/dist/ui/badge.d.mts +5 -5
  171. package/dist/ui/breadcrumb.cjs +1 -1
  172. package/dist/ui/breadcrumb.d.cts +8 -8
  173. package/dist/ui/breadcrumb.d.mts +8 -8
  174. package/dist/ui/breadcrumb.mjs +1 -1
  175. package/dist/ui/button-group.cjs +1 -1
  176. package/dist/ui/button-group.d.cts +6 -6
  177. package/dist/ui/button-group.d.mts +6 -6
  178. package/dist/ui/button-group.mjs +1 -1
  179. package/dist/ui/button.cjs +1 -1
  180. package/dist/ui/button.d.cts +1 -1
  181. package/dist/ui/button.d.mts +1 -1
  182. package/dist/ui/button.mjs +1 -1
  183. package/dist/ui/buttons/add-new.cjs +1 -1
  184. package/dist/ui/buttons/add-new.mjs +1 -1
  185. package/dist/ui/buttons/edit.cjs +1 -1
  186. package/dist/ui/buttons/edit.mjs +1 -1
  187. package/dist/ui/buttons/refresh.cjs +1 -1
  188. package/dist/ui/buttons/refresh.mjs +1 -1
  189. package/dist/ui/buttons/trash.cjs +1 -1
  190. package/dist/ui/buttons/trash.mjs +1 -1
  191. package/dist/ui/buttons/upload-image.cjs +1 -1
  192. package/dist/ui/buttons/upload-image.mjs +1 -1
  193. package/dist/ui/calendar.cjs +1 -1
  194. package/dist/ui/calendar.d.cts +4 -4
  195. package/dist/ui/calendar.d.mts +4 -4
  196. package/dist/ui/calendar.mjs +1 -1
  197. package/dist/ui/card.cjs +1 -1
  198. package/dist/ui/card.d.cts +8 -8
  199. package/dist/ui/card.d.mts +8 -8
  200. package/dist/ui/card.mjs +1 -1
  201. package/dist/ui/carousel.cjs +1 -1
  202. package/dist/ui/carousel.d.cts +7 -7
  203. package/dist/ui/carousel.d.mts +7 -7
  204. package/dist/ui/carousel.mjs +1 -1
  205. package/dist/ui/checkbox.d.cts +2 -2
  206. package/dist/ui/checkbox.d.mts +2 -2
  207. package/dist/ui/collapsible.d.cts +4 -4
  208. package/dist/ui/collapsible.d.mts +4 -4
  209. package/dist/ui/command.cjs +1 -1
  210. package/dist/ui/command.d.cts +11 -11
  211. package/dist/ui/command.d.mts +11 -11
  212. package/dist/ui/command.mjs +1 -1
  213. package/dist/ui/context-menu.d.cts +16 -16
  214. package/dist/ui/context-menu.d.mts +16 -16
  215. package/dist/ui/dialog.cjs +1 -1
  216. package/dist/ui/dialog.d.cts +1 -1
  217. package/dist/ui/dialog.d.mts +1 -1
  218. package/dist/ui/dialog.mjs +1 -1
  219. package/dist/ui/drawer.d.cts +11 -11
  220. package/dist/ui/drawer.d.mts +11 -11
  221. package/dist/ui/dropdown-menu.d.cts +16 -16
  222. package/dist/ui/dropdown-menu.d.mts +16 -16
  223. package/dist/ui/empty.d.cts +9 -9
  224. package/dist/ui/empty.d.mts +9 -9
  225. package/dist/ui/field.cjs +1 -1
  226. package/dist/ui/field.d.cts +13 -13
  227. package/dist/ui/field.d.mts +24 -24
  228. package/dist/ui/field.mjs +1 -1
  229. package/dist/ui/file-uploader.cjs +2 -2
  230. package/dist/ui/file-uploader.d.cts +2 -2
  231. package/dist/ui/file-uploader.d.mts +2 -2
  232. package/dist/ui/file-uploader.mjs +2 -2
  233. package/dist/ui/form.cjs +1 -1
  234. package/dist/ui/form.d.cts +11 -11
  235. package/dist/ui/form.d.mts +11 -11
  236. package/dist/ui/form.mjs +1 -1
  237. package/dist/ui/hover-card.d.cts +4 -4
  238. package/dist/ui/hover-card.d.mts +4 -4
  239. package/dist/ui/image.cjs +1 -1
  240. package/dist/ui/image.mjs +1 -1
  241. package/dist/ui/input-otp.cjs +1 -1
  242. package/dist/ui/input-otp.d.cts +5 -5
  243. package/dist/ui/input-otp.d.mts +5 -5
  244. package/dist/ui/input-otp.mjs +1 -1
  245. package/dist/ui/input.cjs +1 -1
  246. package/dist/ui/input.d.cts +1 -1
  247. package/dist/ui/input.d.mts +1 -1
  248. package/dist/ui/input.mjs +1 -1
  249. package/dist/ui/inputs/search-input.cjs +1 -1
  250. package/dist/ui/inputs/search-input.d.cts +3 -3
  251. package/dist/ui/inputs/search-input.d.mts +3 -3
  252. package/dist/ui/inputs/search-input.mjs +1 -1
  253. package/dist/ui/item.cjs +1 -1
  254. package/dist/ui/item.d.cts +16 -16
  255. package/dist/ui/item.d.mts +16 -16
  256. package/dist/ui/item.mjs +1 -1
  257. package/dist/ui/label.d.cts +2 -2
  258. package/dist/ui/label.d.mts +2 -2
  259. package/dist/ui/menubar.d.cts +17 -17
  260. package/dist/ui/menubar.d.mts +17 -17
  261. package/dist/ui/multi-select.cjs +1 -1
  262. package/dist/ui/multi-select.d.cts +2 -2
  263. package/dist/ui/multi-select.d.mts +3 -3
  264. package/dist/ui/multi-select.mjs +1 -1
  265. package/dist/ui/multi-select.mjs.map +1 -1
  266. package/dist/ui/navigation-menu.d.cts +11 -11
  267. package/dist/ui/navigation-menu.d.mts +11 -11
  268. package/dist/ui/pagination.cjs +1 -1
  269. package/dist/ui/pagination.d.cts +9 -9
  270. package/dist/ui/pagination.d.mts +9 -9
  271. package/dist/ui/pagination.mjs +1 -1
  272. package/dist/ui/popover.d.cts +6 -6
  273. package/dist/ui/popover.d.mts +6 -6
  274. package/dist/ui/progress.d.cts +2 -2
  275. package/dist/ui/progress.d.mts +2 -2
  276. package/dist/ui/radio-group.d.cts +3 -3
  277. package/dist/ui/radio-group.d.mts +3 -3
  278. package/dist/ui/resizable.cjs +1 -1
  279. package/dist/ui/resizable.d.cts +9 -9
  280. package/dist/ui/resizable.d.mts +9 -9
  281. package/dist/ui/resizable.mjs +1 -1
  282. package/dist/ui/scroll-area.cjs +1 -1
  283. package/dist/ui/scroll-area.d.cts +6 -6
  284. package/dist/ui/scroll-area.d.mts +6 -6
  285. package/dist/ui/scroll-area.mjs +1 -1
  286. package/dist/ui/select.d.cts +9 -9
  287. package/dist/ui/select.d.mts +9 -9
  288. package/dist/ui/separator.d.cts +2 -2
  289. package/dist/ui/separator.d.mts +2 -2
  290. package/dist/ui/sheet.d.cts +9 -9
  291. package/dist/ui/sheet.d.mts +9 -9
  292. package/dist/ui/sidebar.cjs +1 -1
  293. package/dist/ui/sidebar.d.cts +29 -29
  294. package/dist/ui/sidebar.d.mts +29 -29
  295. package/dist/ui/sidebar.mjs +1 -1
  296. package/dist/ui/skeleton.d.cts +2 -2
  297. package/dist/ui/skeleton.d.mts +2 -2
  298. package/dist/ui/slider.cjs +1 -1
  299. package/dist/ui/slider.d.cts +2 -2
  300. package/dist/ui/slider.d.mts +2 -2
  301. package/dist/ui/slider.mjs +1 -1
  302. package/dist/ui/sonner.d.cts +2 -2
  303. package/dist/ui/spinner.d.cts +2 -2
  304. package/dist/ui/spinner.d.mts +2 -2
  305. package/dist/ui/switch.d.cts +2 -2
  306. package/dist/ui/switch.d.mts +2 -2
  307. package/dist/ui/table.cjs +1 -1
  308. package/dist/ui/table.d.cts +18 -18
  309. package/dist/ui/table.d.mts +18 -18
  310. package/dist/ui/table.mjs +1 -1
  311. package/dist/ui/tabs.d.cts +5 -5
  312. package/dist/ui/tabs.d.mts +5 -5
  313. package/dist/ui/textarea.cjs +1 -1
  314. package/dist/ui/textarea.d.cts +2 -2
  315. package/dist/ui/textarea.d.mts +2 -2
  316. package/dist/ui/textarea.mjs +1 -1
  317. package/dist/ui/toggle-group.cjs +1 -1
  318. package/dist/ui/toggle-group.d.cts +3 -3
  319. package/dist/ui/toggle-group.d.mts +3 -3
  320. package/dist/ui/toggle-group.mjs +1 -1
  321. package/dist/ui/toggle.d.cts +3 -3
  322. package/dist/ui/toggle.d.mts +5 -5
  323. package/dist/ui/tooltip.d.cts +5 -5
  324. package/dist/ui/tooltip.d.mts +5 -5
  325. package/package.json +4 -3
  326. package/styles/theme.css +17 -17
  327. package/dist/button-CpEejahy.cjs +0 -2
  328. package/dist/button-CpEejahy.cjs.map +0 -1
  329. package/dist/button-D54KOmb7.mjs +0 -2
  330. package/dist/button-D54KOmb7.mjs.map +0 -1
  331. package/dist/button.variants-CS-Cmarr.cjs +0 -2
  332. package/dist/button.variants-CS-Cmarr.cjs.map +0 -1
  333. package/dist/button.variants-DRWf66hR.mjs +0 -2
  334. package/dist/button.variants-DRWf66hR.mjs.map +0 -1
  335. package/dist/dist-BudM04oj.cjs +0 -2
  336. package/dist/dist-CvmzZ_6C.mjs +0 -2
  337. package/dist/heading--VmdIi7C.mjs +0 -2
  338. package/dist/heading--VmdIi7C.mjs.map +0 -1
  339. package/dist/heading-BEm5CCSE.cjs +0 -2
  340. package/dist/heading-BEm5CCSE.cjs.map +0 -1
  341. package/dist/image-CS_Q0WA7.mjs +0 -2
  342. package/dist/paragraph-B72bHMf7.cjs +0 -2
  343. package/dist/paragraph-B72bHMf7.cjs.map +0 -1
  344. package/dist/paragraph-moBSTPmT.mjs +0 -2
  345. package/dist/paragraph-moBSTPmT.mjs.map +0 -1
@@ -1,36 +1,36 @@
1
1
  import { VariantProps } from "class-variance-authority";
2
- import * as react_jsx_runtime91 from "react/jsx-runtime";
3
- import * as class_variance_authority_types1 from "class-variance-authority/types";
2
+ import * as react_jsx_runtime176 from "react/jsx-runtime";
3
+ import * as class_variance_authority_types5 from "class-variance-authority/types";
4
4
 
5
5
  //#region packages/components/ui/empty.d.ts
6
6
  declare function Empty({
7
7
  className,
8
8
  ...props
9
- }: React.ComponentProps<'div'>): react_jsx_runtime91.JSX.Element;
9
+ }: React.ComponentProps<'div'>): react_jsx_runtime176.JSX.Element;
10
10
  declare function EmptyHeader({
11
11
  className,
12
12
  ...props
13
- }: React.ComponentProps<'div'>): react_jsx_runtime91.JSX.Element;
13
+ }: React.ComponentProps<'div'>): react_jsx_runtime176.JSX.Element;
14
14
  declare const emptyMediaVariants: (props?: ({
15
15
  variant?: "default" | "icon" | null | undefined;
16
- } & class_variance_authority_types1.ClassProp) | undefined) => string;
16
+ } & class_variance_authority_types5.ClassProp) | undefined) => string;
17
17
  declare function EmptyMedia({
18
18
  className,
19
19
  variant,
20
20
  ...props
21
- }: React.ComponentProps<'div'> & VariantProps<typeof emptyMediaVariants>): react_jsx_runtime91.JSX.Element;
21
+ }: React.ComponentProps<'div'> & VariantProps<typeof emptyMediaVariants>): react_jsx_runtime176.JSX.Element;
22
22
  declare function EmptyTitle({
23
23
  className,
24
24
  ...props
25
- }: React.ComponentProps<'div'>): react_jsx_runtime91.JSX.Element;
25
+ }: React.ComponentProps<'div'>): react_jsx_runtime176.JSX.Element;
26
26
  declare function EmptyDescription({
27
27
  className,
28
28
  ...props
29
- }: React.ComponentProps<'p'>): react_jsx_runtime91.JSX.Element;
29
+ }: React.ComponentProps<'p'>): react_jsx_runtime176.JSX.Element;
30
30
  declare function EmptyContent({
31
31
  className,
32
32
  ...props
33
- }: React.ComponentProps<'div'>): react_jsx_runtime91.JSX.Element;
33
+ }: React.ComponentProps<'div'>): react_jsx_runtime176.JSX.Element;
34
34
  //#endregion
35
35
  export { Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyTitle };
36
36
  //# sourceMappingURL=empty.d.mts.map
package/dist/ui/field.cjs CHANGED
@@ -1,2 +1,2 @@
1
- "use client";const e=require(`../chunk-Bmb41Sf3.cjs`),t=require(`../separator-C3ip6sbh.cjs`),n=require(`../label-BzfsTrVt.cjs`);let r=require(`@customafk/react-toolkit/utils`),i=require(`class-variance-authority`),a=require(`react`),o=require(`react/jsx-runtime`),s=require(`lucide-react`);const c=(0,a.memo)(({className:e,...t})=>(0,o.jsx)(`fieldset`,{"data-slot":`field-set`,className:(0,r.cn)(`flex flex-col gap-6`,`has-[>[data-slot=checkbox-group]]:gap-3 has-[>[data-slot=radio-group]]:gap-3`,e),...t}));c.displayName=`FieldSet`;const l=(0,a.memo)(({className:e,variant:t=`legend`,...n})=>(0,o.jsx)(`legend`,{"data-slot":`field-legend`,"data-variant":t,className:(0,r.cn)(`mb-3 font-medium`,`data-[variant=legend]:text-base`,`data-[variant=label]:text-sm`,e),...n}));l.displayName=`FieldLegend`;const u=(0,a.memo)(({className:e,...t})=>(0,o.jsx)(`div`,{"data-slot":`field-group`,className:(0,r.cn)(`group/field-group @container/field-group flex w-full flex-col gap-7 data-[slot=checkbox-group]:gap-3 *:data-[slot=field-group]:gap-4`,e),...t}));u.displayName=`FieldGroup`;const d=(0,i.cva)(`group/field flex w-full gap-3 data-[invalid=true]:text-destructive`,{variants:{orientation:{vertical:[`flex-col *:w-full [&>.sr-only]:w-auto`],horizontal:[`flex-row items-center`,`*:data-[slot=field-label]:flex-auto`,`has-[>[data-slot=field-content]]:items-start`,`has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px`],responsive:[`flex-col *:w-full [&>.sr-only]:w-auto`,`@md/field-group:flex-row`,`@md/field-group:items-center`,`@md/field-group:*:w-auto`,`@md/field-group:*:data-[slot=field-label]:flex-auto`,`@md/field-group:has-[>[data-slot=field-content]]:items-start`,`@md/field-group:has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px`]}},defaultVariants:{orientation:`vertical`}}),f=(0,a.memo)(({className:e,orientation:t=`vertical`,...n})=>(0,o.jsx)(`div`,{"data-slot":`field`,"data-orientation":t,className:(0,r.cn)(d({orientation:t}),e),...n}));f.displayName=`Field`;const p=(0,a.memo)(({className:e,...t})=>(0,o.jsx)(`div`,{"data-slot":`field-content`,className:(0,r.cn)(`group/field-content flex basis-2/5 flex-col gap-1.5 leading-snug`,e),...t}));p.displayName=`FieldContent`;const m=(0,a.memo)(({className:e,...t})=>(0,o.jsx)(n.t,{"data-slot":`field-label`,className:(0,r.cn)(`group/field-label peer/field-label flex w-fit gap-2 leading-snug`,`group-data-[disabled=true]/field:opacity-50`,`has-[>[data-slot=field]]:w-full`,`has-[>[data-slot=field]]:flex-col`,`has-[>[data-slot=field]]:rounded-md`,`has-[>[data-slot=field]]:border`,`*:data-[slot=field]:p-4`,`has-data-[state=checked]:bg-primary/5`,`has-data-[state=checked]:border-primary`,e),...t}));m.displayName=`FieldLabel`;const h=(0,a.memo)(({className:e,...t})=>(0,o.jsx)(`div`,{"data-slot":`field-label`,className:(0,r.cn)(`flex w-fit items-center gap-2 font-medium text-sm leading-snug group-data-[disabled=true]/field:opacity-50`,e),...t}));h.displayName=`FieldTitle`;const g=(0,a.memo)(({className:e,...t})=>(0,o.jsx)(`p`,{"data-slot":`field-description`,className:(0,r.cn)(`text-text-positive-weak text-sm leading-normal font-normal group-has-data-[orientation=horizontal]/field:text-balance`,`last:mt-0 nth-last-2:-mt-1 [[data-variant=legend]+&]:-mt-1.5`,`[&>a:hover]:text-primary [&>a]:underline [&>a]:underline-offset-4`,e),...t}));g.displayName=`FieldDescription`;const _=(0,a.memo)(({children:e,className:n,...i})=>(0,o.jsxs)(`div`,{"data-slot":`field-separator`,"data-content":!!e,className:(0,r.cn)(`relative -my-2 h-5 text-sm group-data-[variant=outline]/field-group:-mb-2`,n),...i,children:[(0,o.jsx)(t.t,{className:`absolute inset-0 top-1/2`}),e&&(0,o.jsx)(`span`,{className:`relative mx-auto block w-fit bg-background px-2 text-text-positive-weak`,"data-slot":`field-separator-content`,children:e})]}));_.displayName=`FieldSeparator`;const v=(0,a.memo)(({className:e,children:t,errors:n,...i})=>{let c=(0,a.useMemo)(()=>t||(n?n?.length===1&&n[0]?.message?(0,o.jsxs)(`div`,{className:`flex flex-row items-center justify-start gap-x-0.5`,children:[(0,o.jsx)(s.BanIcon,{size:14}),(0,o.jsx)(`p`,{children:n[0].message})]}):(0,o.jsx)(`ul`,{className:`ml-4 flex list-disc flex-col gap-1`,children:n.map(e=>typeof e==`string`?(0,o.jsx)(`li`,{children:e},e):e?.message?(0,o.jsx)(`li`,{children:e.message},e.message):null)}):null),[t,n]);return c?(0,o.jsx)(`div`,{role:`alert`,"data-slot":`field-error`,className:(0,r.cn)(`w-full font-normal text-danger text-xs`,e),...i,children:c}):null});v.displayName=`FieldError`,exports.Field=f,exports.FieldContent=p,exports.FieldDescription=g,exports.FieldError=v,exports.FieldGroup=u,exports.FieldLabel=m,exports.FieldLegend=l,exports.FieldSeparator=_,exports.FieldSet=c,exports.FieldTitle=h;
1
+ "use client";const e=require(`../chunk-Bmb41Sf3.cjs`),t=require(`../separator-C3ip6sbh.cjs`),n=require(`../label-BzfsTrVt.cjs`);let r=require(`@customafk/react-toolkit/utils`),i=require(`class-variance-authority`),a=require(`react/jsx-runtime`),o=require(`lucide-react`),s=require(`react`);const c=(0,s.memo)(({className:e,...t})=>(0,a.jsx)(`fieldset`,{"data-slot":`field-set`,className:(0,r.cn)(`flex flex-col gap-6`,`has-[>[data-slot=checkbox-group]]:gap-3 has-[>[data-slot=radio-group]]:gap-3`,e),...t}));c.displayName=`FieldSet`;const l=(0,s.memo)(({className:e,variant:t=`legend`,...n})=>(0,a.jsx)(`legend`,{"data-slot":`field-legend`,"data-variant":t,className:(0,r.cn)(`mb-3 font-medium`,`data-[variant=legend]:text-base`,`data-[variant=label]:text-sm`,e),...n}));l.displayName=`FieldLegend`;const u=(0,s.memo)(({className:e,...t})=>(0,a.jsx)(`div`,{"data-slot":`field-group`,className:(0,r.cn)(`group/field-group @container/field-group flex w-full flex-col gap-7 data-[slot=checkbox-group]:gap-3 *:data-[slot=field-group]:gap-4`,e),...t}));u.displayName=`FieldGroup`;const d=(0,i.cva)(`group/field flex w-full gap-3 data-[invalid=true]:text-destructive`,{variants:{orientation:{vertical:[`flex-col *:w-full [&>.sr-only]:w-auto`],horizontal:[`flex-row items-center`,`*:data-[slot=field-label]:flex-auto`,`has-[>[data-slot=field-content]]:items-start`,`has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px`],responsive:[`flex-col *:w-full [&>.sr-only]:w-auto`,`@md/field-group:flex-row`,`@md/field-group:items-center`,`@md/field-group:*:w-auto`,`@md/field-group:*:data-[slot=field-label]:flex-auto`,`@md/field-group:has-[>[data-slot=field-content]]:items-start`,`@md/field-group:has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px`]}},defaultVariants:{orientation:`vertical`}}),f=(0,s.memo)(({className:e,orientation:t=`vertical`,...n})=>(0,a.jsx)(`div`,{"data-slot":`field`,"data-orientation":t,className:(0,r.cn)(d({orientation:t}),e),...n}));f.displayName=`Field`;const p=(0,s.memo)(({className:e,...t})=>(0,a.jsx)(`div`,{"data-slot":`field-content`,className:(0,r.cn)(`group/field-content flex basis-2/5 flex-col gap-1.5 leading-snug`,e),...t}));p.displayName=`FieldContent`;const m=(0,s.memo)(({className:e,...t})=>(0,a.jsx)(n.t,{"data-slot":`field-label`,className:(0,r.cn)(`group/field-label peer/field-label flex w-fit gap-2 leading-snug`,`group-data-[disabled=true]/field:opacity-50`,`has-[>[data-slot=field]]:w-full`,`has-[>[data-slot=field]]:flex-col`,`has-[>[data-slot=field]]:rounded-md`,`has-[>[data-slot=field]]:border`,`*:data-[slot=field]:p-4`,`has-data-[state=checked]:bg-primary/5`,`has-data-[state=checked]:border-primary`,e),...t}));m.displayName=`FieldLabel`;const h=(0,s.memo)(({className:e,...t})=>(0,a.jsx)(`div`,{"data-slot":`field-label`,className:(0,r.cn)(`flex w-fit items-center gap-2 font-medium text-sm leading-snug group-data-[disabled=true]/field:opacity-50`,e),...t}));h.displayName=`FieldTitle`;const g=(0,s.memo)(({className:e,...t})=>(0,a.jsx)(`p`,{"data-slot":`field-description`,className:(0,r.cn)(`text-text-positive-weak text-sm leading-normal font-normal group-has-data-[orientation=horizontal]/field:text-balance`,`last:mt-0 nth-last-2:-mt-1 [[data-variant=legend]+&]:-mt-1.5`,`[&>a:hover]:text-primary [&>a]:underline [&>a]:underline-offset-4`,e),...t}));g.displayName=`FieldDescription`;const _=(0,s.memo)(({children:e,className:n,...i})=>(0,a.jsxs)(`div`,{"data-slot":`field-separator`,"data-content":!!e,className:(0,r.cn)(`relative -my-2 h-5 text-sm group-data-[variant=outline]/field-group:-mb-2`,n),...i,children:[(0,a.jsx)(t.t,{className:`absolute inset-0 top-1/2`}),e&&(0,a.jsx)(`span`,{className:`relative mx-auto block w-fit bg-background px-2 text-text-positive-weak`,"data-slot":`field-separator-content`,children:e})]}));_.displayName=`FieldSeparator`;const v=(0,s.memo)(({className:e,children:t,errors:n,...i})=>{let c=(0,s.useMemo)(()=>t||(n?n?.length===1&&n[0]?.message?(0,a.jsxs)(`div`,{className:`flex flex-row items-center justify-start gap-x-0.5`,children:[(0,a.jsx)(o.BanIcon,{size:14}),(0,a.jsx)(`p`,{children:n[0].message})]}):(0,a.jsx)(`ul`,{className:`ml-4 flex list-disc flex-col gap-1`,children:n.map(e=>typeof e==`string`?(0,a.jsx)(`li`,{children:e},e):e?.message?(0,a.jsx)(`li`,{children:e.message},e.message):null)}):null),[t,n]);return c?(0,a.jsx)(`div`,{role:`alert`,"data-slot":`field-error`,className:(0,r.cn)(`w-full font-normal text-danger text-xs`,e),...i,children:c}):null});v.displayName=`FieldError`,exports.Field=f,exports.FieldContent=p,exports.FieldDescription=g,exports.FieldError=v,exports.FieldGroup=u,exports.FieldLabel=m,exports.FieldLegend=l,exports.FieldSeparator=_,exports.FieldSet=c,exports.FieldTitle=h;
2
2
  //# sourceMappingURL=field.cjs.map
@@ -1,56 +1,56 @@
1
1
  import { Label } from "./label.cjs";
2
- import * as react_jsx_runtime73 from "react/jsx-runtime";
2
+ import * as react_jsx_runtime115 from "react/jsx-runtime";
3
3
  import * as react1 from "react";
4
- import * as class_variance_authority_types3 from "class-variance-authority/types";
4
+ import * as class_variance_authority_types4 from "class-variance-authority/types";
5
5
  import { VariantProps } from "class-variance-authority";
6
6
 
7
7
  //#region packages/components/ui/field.d.ts
8
8
  declare const FieldSet: react1.MemoExoticComponent<({
9
9
  className,
10
10
  ...props
11
- }: React.ComponentProps<"fieldset">) => react_jsx_runtime73.JSX.Element>;
11
+ }: React.ComponentProps<"fieldset">) => react_jsx_runtime115.JSX.Element>;
12
12
  declare const FieldLegend: react1.MemoExoticComponent<({
13
13
  className,
14
14
  variant,
15
15
  ...props
16
16
  }: React.ComponentProps<"legend"> & {
17
17
  variant?: "legend" | "label";
18
- }) => react_jsx_runtime73.JSX.Element>;
18
+ }) => react_jsx_runtime115.JSX.Element>;
19
19
  declare const FieldGroup: react1.MemoExoticComponent<({
20
20
  className,
21
21
  ...props
22
- }: React.ComponentProps<"div">) => react_jsx_runtime73.JSX.Element>;
22
+ }: React.ComponentProps<"div">) => react_jsx_runtime115.JSX.Element>;
23
23
  declare const fieldVariants: (props?: ({
24
24
  orientation?: "vertical" | "horizontal" | "responsive" | null | undefined;
25
- } & class_variance_authority_types3.ClassProp) | undefined) => string;
25
+ } & class_variance_authority_types4.ClassProp) | undefined) => string;
26
26
  declare const Field: react1.MemoExoticComponent<({
27
27
  className,
28
28
  orientation,
29
29
  ...props
30
- }: React.ComponentProps<"div"> & VariantProps<typeof fieldVariants>) => react_jsx_runtime73.JSX.Element>;
30
+ }: React.ComponentProps<"div"> & VariantProps<typeof fieldVariants>) => react_jsx_runtime115.JSX.Element>;
31
31
  declare const FieldContent: react1.MemoExoticComponent<({
32
32
  className,
33
33
  ...props
34
- }: React.ComponentProps<"div">) => react_jsx_runtime73.JSX.Element>;
34
+ }: React.ComponentProps<"div">) => react_jsx_runtime115.JSX.Element>;
35
35
  declare const FieldLabel: react1.MemoExoticComponent<({
36
36
  className,
37
37
  ...props
38
- }: React.ComponentProps<typeof Label>) => react_jsx_runtime73.JSX.Element>;
38
+ }: React.ComponentProps<typeof Label>) => react_jsx_runtime115.JSX.Element>;
39
39
  declare const FieldTitle: react1.MemoExoticComponent<({
40
40
  className,
41
41
  ...props
42
- }: React.ComponentProps<"div">) => react_jsx_runtime73.JSX.Element>;
42
+ }: React.ComponentProps<"div">) => react_jsx_runtime115.JSX.Element>;
43
43
  declare const FieldDescription: react1.MemoExoticComponent<({
44
44
  className,
45
45
  ...props
46
- }: React.ComponentProps<"p">) => react_jsx_runtime73.JSX.Element>;
46
+ }: React.ComponentProps<"p">) => react_jsx_runtime115.JSX.Element>;
47
47
  declare const FieldSeparator: react1.MemoExoticComponent<({
48
48
  children,
49
49
  className,
50
50
  ...props
51
51
  }: React.ComponentProps<"div"> & {
52
52
  children?: React.ReactNode;
53
- }) => react_jsx_runtime73.JSX.Element>;
53
+ }) => react_jsx_runtime115.JSX.Element>;
54
54
  declare const FieldError: react1.MemoExoticComponent<({
55
55
  className,
56
56
  children,
@@ -60,7 +60,7 @@ declare const FieldError: react1.MemoExoticComponent<({
60
60
  errors?: Array<{
61
61
  message?: string;
62
62
  } | undefined>;
63
- }) => react_jsx_runtime73.JSX.Element | null>;
63
+ }) => react_jsx_runtime115.JSX.Element | null>;
64
64
  //#endregion
65
65
  export { Field, FieldContent, FieldDescription, FieldError, FieldGroup, FieldLabel, FieldLegend, FieldSeparator, FieldSet, FieldTitle };
66
66
  //# sourceMappingURL=field.d.cts.map
@@ -1,57 +1,57 @@
1
1
  import { Label } from "./label.mjs";
2
2
  import { VariantProps } from "class-variance-authority";
3
- import * as react3 from "react";
4
- import * as react_jsx_runtime111 from "react/jsx-runtime";
5
- import * as class_variance_authority_types2 from "class-variance-authority/types";
3
+ import * as react_jsx_runtime183 from "react/jsx-runtime";
4
+ import * as react10 from "react";
5
+ import * as class_variance_authority_types6 from "class-variance-authority/types";
6
6
 
7
7
  //#region packages/components/ui/field.d.ts
8
- declare const FieldSet: react3.MemoExoticComponent<({
8
+ declare const FieldSet: react10.MemoExoticComponent<({
9
9
  className,
10
10
  ...props
11
- }: React.ComponentProps<"fieldset">) => react_jsx_runtime111.JSX.Element>;
12
- declare const FieldLegend: react3.MemoExoticComponent<({
11
+ }: React.ComponentProps<"fieldset">) => react_jsx_runtime183.JSX.Element>;
12
+ declare const FieldLegend: react10.MemoExoticComponent<({
13
13
  className,
14
14
  variant,
15
15
  ...props
16
16
  }: React.ComponentProps<"legend"> & {
17
17
  variant?: "legend" | "label";
18
- }) => react_jsx_runtime111.JSX.Element>;
19
- declare const FieldGroup: react3.MemoExoticComponent<({
18
+ }) => react_jsx_runtime183.JSX.Element>;
19
+ declare const FieldGroup: react10.MemoExoticComponent<({
20
20
  className,
21
21
  ...props
22
- }: React.ComponentProps<"div">) => react_jsx_runtime111.JSX.Element>;
22
+ }: React.ComponentProps<"div">) => react_jsx_runtime183.JSX.Element>;
23
23
  declare const fieldVariants: (props?: ({
24
24
  orientation?: "vertical" | "horizontal" | "responsive" | null | undefined;
25
- } & class_variance_authority_types2.ClassProp) | undefined) => string;
26
- declare const Field: react3.MemoExoticComponent<({
25
+ } & class_variance_authority_types6.ClassProp) | undefined) => string;
26
+ declare const Field: react10.MemoExoticComponent<({
27
27
  className,
28
28
  orientation,
29
29
  ...props
30
- }: React.ComponentProps<"div"> & VariantProps<typeof fieldVariants>) => react_jsx_runtime111.JSX.Element>;
31
- declare const FieldContent: react3.MemoExoticComponent<({
30
+ }: React.ComponentProps<"div"> & VariantProps<typeof fieldVariants>) => react_jsx_runtime183.JSX.Element>;
31
+ declare const FieldContent: react10.MemoExoticComponent<({
32
32
  className,
33
33
  ...props
34
- }: React.ComponentProps<"div">) => react_jsx_runtime111.JSX.Element>;
35
- declare const FieldLabel: react3.MemoExoticComponent<({
34
+ }: React.ComponentProps<"div">) => react_jsx_runtime183.JSX.Element>;
35
+ declare const FieldLabel: react10.MemoExoticComponent<({
36
36
  className,
37
37
  ...props
38
- }: React.ComponentProps<typeof Label>) => react_jsx_runtime111.JSX.Element>;
39
- declare const FieldTitle: react3.MemoExoticComponent<({
38
+ }: React.ComponentProps<typeof Label>) => react_jsx_runtime183.JSX.Element>;
39
+ declare const FieldTitle: react10.MemoExoticComponent<({
40
40
  className,
41
41
  ...props
42
- }: React.ComponentProps<"div">) => react_jsx_runtime111.JSX.Element>;
43
- declare const FieldDescription: react3.MemoExoticComponent<({
42
+ }: React.ComponentProps<"div">) => react_jsx_runtime183.JSX.Element>;
43
+ declare const FieldDescription: react10.MemoExoticComponent<({
44
44
  className,
45
45
  ...props
46
- }: React.ComponentProps<"p">) => react_jsx_runtime111.JSX.Element>;
47
- declare const FieldSeparator: react3.MemoExoticComponent<({
46
+ }: React.ComponentProps<"p">) => react_jsx_runtime183.JSX.Element>;
47
+ declare const FieldSeparator: react10.MemoExoticComponent<({
48
48
  children,
49
49
  className,
50
50
  ...props
51
51
  }: React.ComponentProps<"div"> & {
52
52
  children?: React.ReactNode;
53
- }) => react_jsx_runtime111.JSX.Element>;
54
- declare const FieldError: react3.MemoExoticComponent<({
53
+ }) => react_jsx_runtime183.JSX.Element>;
54
+ declare const FieldError: react10.MemoExoticComponent<({
55
55
  className,
56
56
  children,
57
57
  errors,
@@ -60,7 +60,7 @@ declare const FieldError: react3.MemoExoticComponent<({
60
60
  errors?: Array<{
61
61
  message?: string;
62
62
  } | undefined>;
63
- }) => react_jsx_runtime111.JSX.Element | null>;
63
+ }) => react_jsx_runtime183.JSX.Element | null>;
64
64
  //#endregion
65
65
  export { Field, FieldContent, FieldDescription, FieldError, FieldGroup, FieldLabel, FieldLegend, FieldSeparator, FieldSet, FieldTitle };
66
66
  //# sourceMappingURL=field.d.mts.map
package/dist/ui/field.mjs CHANGED
@@ -1,2 +1,2 @@
1
- "use client";import{t as e}from"../separator-Bf0gymN4.mjs";import{t}from"../label-Dqr8nxWi.mjs";import{cn as n}from"@customafk/react-toolkit/utils";import{cva as r}from"class-variance-authority";import{memo as i,useMemo as a}from"react";import{jsx as o,jsxs as s}from"react/jsx-runtime";import{BanIcon as c}from"lucide-react";const l=i(({className:e,...t})=>o(`fieldset`,{"data-slot":`field-set`,className:n(`flex flex-col gap-6`,`has-[>[data-slot=checkbox-group]]:gap-3 has-[>[data-slot=radio-group]]:gap-3`,e),...t}));l.displayName=`FieldSet`;const u=i(({className:e,variant:t=`legend`,...r})=>o(`legend`,{"data-slot":`field-legend`,"data-variant":t,className:n(`mb-3 font-medium`,`data-[variant=legend]:text-base`,`data-[variant=label]:text-sm`,e),...r}));u.displayName=`FieldLegend`;const d=i(({className:e,...t})=>o(`div`,{"data-slot":`field-group`,className:n(`group/field-group @container/field-group flex w-full flex-col gap-7 data-[slot=checkbox-group]:gap-3 *:data-[slot=field-group]:gap-4`,e),...t}));d.displayName=`FieldGroup`;const f=r(`group/field flex w-full gap-3 data-[invalid=true]:text-destructive`,{variants:{orientation:{vertical:[`flex-col *:w-full [&>.sr-only]:w-auto`],horizontal:[`flex-row items-center`,`*:data-[slot=field-label]:flex-auto`,`has-[>[data-slot=field-content]]:items-start`,`has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px`],responsive:[`flex-col *:w-full [&>.sr-only]:w-auto`,`@md/field-group:flex-row`,`@md/field-group:items-center`,`@md/field-group:*:w-auto`,`@md/field-group:*:data-[slot=field-label]:flex-auto`,`@md/field-group:has-[>[data-slot=field-content]]:items-start`,`@md/field-group:has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px`]}},defaultVariants:{orientation:`vertical`}}),p=i(({className:e,orientation:t=`vertical`,...r})=>o(`div`,{"data-slot":`field`,"data-orientation":t,className:n(f({orientation:t}),e),...r}));p.displayName=`Field`;const m=i(({className:e,...t})=>o(`div`,{"data-slot":`field-content`,className:n(`group/field-content flex basis-2/5 flex-col gap-1.5 leading-snug`,e),...t}));m.displayName=`FieldContent`;const h=i(({className:e,...r})=>o(t,{"data-slot":`field-label`,className:n(`group/field-label peer/field-label flex w-fit gap-2 leading-snug`,`group-data-[disabled=true]/field:opacity-50`,`has-[>[data-slot=field]]:w-full`,`has-[>[data-slot=field]]:flex-col`,`has-[>[data-slot=field]]:rounded-md`,`has-[>[data-slot=field]]:border`,`*:data-[slot=field]:p-4`,`has-data-[state=checked]:bg-primary/5`,`has-data-[state=checked]:border-primary`,e),...r}));h.displayName=`FieldLabel`;const g=i(({className:e,...t})=>o(`div`,{"data-slot":`field-label`,className:n(`flex w-fit items-center gap-2 font-medium text-sm leading-snug group-data-[disabled=true]/field:opacity-50`,e),...t}));g.displayName=`FieldTitle`;const _=i(({className:e,...t})=>o(`p`,{"data-slot":`field-description`,className:n(`text-text-positive-weak text-sm leading-normal font-normal group-has-data-[orientation=horizontal]/field:text-balance`,`last:mt-0 nth-last-2:-mt-1 [[data-variant=legend]+&]:-mt-1.5`,`[&>a:hover]:text-primary [&>a]:underline [&>a]:underline-offset-4`,e),...t}));_.displayName=`FieldDescription`;const v=i(({children:t,className:r,...i})=>s(`div`,{"data-slot":`field-separator`,"data-content":!!t,className:n(`relative -my-2 h-5 text-sm group-data-[variant=outline]/field-group:-mb-2`,r),...i,children:[o(e,{className:`absolute inset-0 top-1/2`}),t&&o(`span`,{className:`relative mx-auto block w-fit bg-background px-2 text-text-positive-weak`,"data-slot":`field-separator-content`,children:t})]}));v.displayName=`FieldSeparator`;const y=i(({className:e,children:t,errors:r,...i})=>{let l=a(()=>t||(r?r?.length===1&&r[0]?.message?s(`div`,{className:`flex flex-row items-center justify-start gap-x-0.5`,children:[o(c,{size:14}),o(`p`,{children:r[0].message})]}):o(`ul`,{className:`ml-4 flex list-disc flex-col gap-1`,children:r.map(e=>typeof e==`string`?o(`li`,{children:e},e):e?.message?o(`li`,{children:e.message},e.message):null)}):null),[t,r]);return l?o(`div`,{role:`alert`,"data-slot":`field-error`,className:n(`w-full font-normal text-danger text-xs`,e),...i,children:l}):null});y.displayName=`FieldError`;export{p as Field,m as FieldContent,_ as FieldDescription,y as FieldError,d as FieldGroup,h as FieldLabel,u as FieldLegend,v as FieldSeparator,l as FieldSet,g as FieldTitle};
1
+ "use client";import{t as e}from"../separator-Bf0gymN4.mjs";import{t}from"../label-Dqr8nxWi.mjs";import{cn as n}from"@customafk/react-toolkit/utils";import{cva as r}from"class-variance-authority";import{jsx as i,jsxs as a}from"react/jsx-runtime";import{BanIcon as o}from"lucide-react";import{memo as s,useMemo as c}from"react";const l=s(({className:e,...t})=>i(`fieldset`,{"data-slot":`field-set`,className:n(`flex flex-col gap-6`,`has-[>[data-slot=checkbox-group]]:gap-3 has-[>[data-slot=radio-group]]:gap-3`,e),...t}));l.displayName=`FieldSet`;const u=s(({className:e,variant:t=`legend`,...r})=>i(`legend`,{"data-slot":`field-legend`,"data-variant":t,className:n(`mb-3 font-medium`,`data-[variant=legend]:text-base`,`data-[variant=label]:text-sm`,e),...r}));u.displayName=`FieldLegend`;const d=s(({className:e,...t})=>i(`div`,{"data-slot":`field-group`,className:n(`group/field-group @container/field-group flex w-full flex-col gap-7 data-[slot=checkbox-group]:gap-3 *:data-[slot=field-group]:gap-4`,e),...t}));d.displayName=`FieldGroup`;const f=r(`group/field flex w-full gap-3 data-[invalid=true]:text-destructive`,{variants:{orientation:{vertical:[`flex-col *:w-full [&>.sr-only]:w-auto`],horizontal:[`flex-row items-center`,`*:data-[slot=field-label]:flex-auto`,`has-[>[data-slot=field-content]]:items-start`,`has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px`],responsive:[`flex-col *:w-full [&>.sr-only]:w-auto`,`@md/field-group:flex-row`,`@md/field-group:items-center`,`@md/field-group:*:w-auto`,`@md/field-group:*:data-[slot=field-label]:flex-auto`,`@md/field-group:has-[>[data-slot=field-content]]:items-start`,`@md/field-group:has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px`]}},defaultVariants:{orientation:`vertical`}}),p=s(({className:e,orientation:t=`vertical`,...r})=>i(`div`,{"data-slot":`field`,"data-orientation":t,className:n(f({orientation:t}),e),...r}));p.displayName=`Field`;const m=s(({className:e,...t})=>i(`div`,{"data-slot":`field-content`,className:n(`group/field-content flex basis-2/5 flex-col gap-1.5 leading-snug`,e),...t}));m.displayName=`FieldContent`;const h=s(({className:e,...r})=>i(t,{"data-slot":`field-label`,className:n(`group/field-label peer/field-label flex w-fit gap-2 leading-snug`,`group-data-[disabled=true]/field:opacity-50`,`has-[>[data-slot=field]]:w-full`,`has-[>[data-slot=field]]:flex-col`,`has-[>[data-slot=field]]:rounded-md`,`has-[>[data-slot=field]]:border`,`*:data-[slot=field]:p-4`,`has-data-[state=checked]:bg-primary/5`,`has-data-[state=checked]:border-primary`,e),...r}));h.displayName=`FieldLabel`;const g=s(({className:e,...t})=>i(`div`,{"data-slot":`field-label`,className:n(`flex w-fit items-center gap-2 font-medium text-sm leading-snug group-data-[disabled=true]/field:opacity-50`,e),...t}));g.displayName=`FieldTitle`;const _=s(({className:e,...t})=>i(`p`,{"data-slot":`field-description`,className:n(`text-text-positive-weak text-sm leading-normal font-normal group-has-data-[orientation=horizontal]/field:text-balance`,`last:mt-0 nth-last-2:-mt-1 [[data-variant=legend]+&]:-mt-1.5`,`[&>a:hover]:text-primary [&>a]:underline [&>a]:underline-offset-4`,e),...t}));_.displayName=`FieldDescription`;const v=s(({children:t,className:r,...o})=>a(`div`,{"data-slot":`field-separator`,"data-content":!!t,className:n(`relative -my-2 h-5 text-sm group-data-[variant=outline]/field-group:-mb-2`,r),...o,children:[i(e,{className:`absolute inset-0 top-1/2`}),t&&i(`span`,{className:`relative mx-auto block w-fit bg-background px-2 text-text-positive-weak`,"data-slot":`field-separator-content`,children:t})]}));v.displayName=`FieldSeparator`;const y=s(({className:e,children:t,errors:r,...s})=>{let l=c(()=>t||(r?r?.length===1&&r[0]?.message?a(`div`,{className:`flex flex-row items-center justify-start gap-x-0.5`,children:[i(o,{size:14}),i(`p`,{children:r[0].message})]}):i(`ul`,{className:`ml-4 flex list-disc flex-col gap-1`,children:r.map(e=>typeof e==`string`?i(`li`,{children:e},e):e?.message?i(`li`,{children:e.message},e.message):null)}):null),[t,r]);return l?i(`div`,{role:`alert`,"data-slot":`field-error`,className:n(`w-full font-normal text-danger text-xs`,e),...s,children:l}):null});y.displayName=`FieldError`;export{p as Field,m as FieldContent,_ as FieldDescription,y as FieldError,d as FieldGroup,h as FieldLabel,u as FieldLegend,v as FieldSeparator,l as FieldSet,g as FieldTitle};
2
2
  //# sourceMappingURL=field.mjs.map
@@ -1,3 +1,3 @@
1
- "use client";const e=require(`../chunk-Bmb41Sf3.cjs`);require(`../button.variants-CS-Cmarr.cjs`);const t=require(`../button-CpEejahy.cjs`),n=require(`./progress.cjs`);let r=require(`@customafk/react-toolkit/utils`),i=require(`react`),a=require(`react/jsx-runtime`),o=require(`lucide-react`),s=require(`react-dropzone`);s=e.t(s);let c=require(`@customafk/react-toolkit/hooks/useControllableState`),l=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,i.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,i.useEffect)(()=>()=>{C&&C.forEach(e=>{f(e)&&URL.revokeObjectURL(e.preview)})},[]);let D=v||(C?.length??0)>=g;return(0,a.jsxs)(`div`,{className:`relative flex w-full flex-col gap-6`,children:[(0,a.jsx)(s.default,{onDrop:T,accept:m,maxSize:h,maxFiles:g,multiple:g>1||_,disabled:D,children:({getRootProps:e,getInputProps:t,isDragActive:n})=>(0,a.jsxs)(`div`,{...e(),className:(0,r.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,a.jsx)(`input`,{...t()}),n?(0,a.jsxs)(`div`,{className:`flex flex-col items-center justify-center gap-4 sm:px-5`,children:[(0,a.jsx)(`div`,{className:`rounded-full border border-dashed p-3`,children:(0,a.jsx)(o.Upload,{className:`text-text-positive-muted size-7`,"aria-hidden":`true`})}),(0,a.jsx)(`p`,{className:`text-text-positive-muted font-medium`,children:`Drop the files here`})]}):(0,a.jsxs)(`div`,{className:`flex flex-col items-center justify-center gap-4 sm:px-5`,children:[(0,a.jsx)(`div`,{className:`rounded-full border border-dashed p-3`,children:(0,a.jsx)(o.Upload,{size:b||24,className:`text-muted-foreground`,"aria-hidden":`true`})}),y&&(0,a.jsxs)(`div`,{className:`flex flex-col gap-px`,children:[(0,a.jsxs)(`p`,{className:`text-text-positive-weak text-xs font-medium`,children:[`Drag `,`'n'`,` drop files here, or click to select files`]}),(0,a.jsxs)(`p`,{className:`text-text-positive-muted text-xs`,children:[`You can upload`,g>1?` ${g===1/0?`multiple`:g}
2
- files (up to ${(0,r.formatBytes)(h)} each)`:` a file with ${(0,r.formatBytes)(h)}`]})]})]})]})}),C?.length?(0,a.jsxs)(`div`,{className:`h-fit w-full overflow-y-auto`,children:[(0,a.jsxs)(`div`,{className:`flex items-center justify-between px-3 py-2.5`,children:[(0,a.jsxs)(`div`,{className:`text-text-positive-weak flex items-center gap-1`,children:[(0,a.jsx)(o.Image,{size:16,"aria-hidden":`true`}),(0,a.jsxs)(`p`,{className:`text-sm`,children:[`Ảnh đã tải lên (`,C.length,`)`]})]}),(0,a.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,a.jsx)(o.Trash2,{size:16,"aria-hidden":`true`}),(0,a.jsx)(`p`,{className:`text-sm`,children:`Xóa tất cả`})]})]}),(0,a.jsx)(`div`,{className:`flex flex-col gap-2.5`,children:C?.map((e,t)=>(0,a.jsx)(d,{file:e,onRemove:()=>E(t),progress:p?.[e.name]},t))})]}):null]})}function d({file:e,progress:i,onRemove:s}){return(0,a.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,a.jsxs)(`div`,{className:`flex flex-1 gap-2.5`,children:[f(e)?(0,a.jsx)(p,{file:e}):null,(0,a.jsxs)(`div`,{className:`flex w-full flex-col gap-2`,children:[(0,a.jsxs)(`div`,{className:`flex flex-col gap-y-0.5`,children:[(0,a.jsx)(`p`,{className:`text-text-positive line-clamp-1 text-sm`,children:e.name}),(0,a.jsx)(`p`,{className:`text-text-positive-muted text-xs`,children:(0,r.formatBytes)(e.size)})]}),i?(0,a.jsx)(n.Progress,{value:i}):null]})]}),(0,a.jsx)(`div`,{className:`flex items-center gap-2`,children:(0,a.jsxs)(t.t,{type:`button`,variant:`ghost`,color:`secondary`,size:`icon`,className:`size-7`,onClick:s,children:[(0,a.jsx)(o.Trash2,{size:16,className:`text-text-positive-muted`,"aria-hidden":`true`}),(0,a.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,a.jsx)(`img`,{src:e.preview,className:`border-border aspect-square size-10 shrink-0 rounded border object-cover object-top shadow-sm`}):(0,a.jsx)(o.FileText,{className:`text-text-positive-muted size-10 border`,"aria-hidden":`true`})}exports.FileUploader=u;
1
+ "use client";const e=require(`../chunk-Bmb41Sf3.cjs`);require(`../button.variants-aqkTmzFu.cjs`);const t=require(`../button-Cd7YtPlT.cjs`),n=require(`./progress.cjs`);let r=require(`@customafk/react-toolkit/utils`),i=require(`react/jsx-runtime`),a=require(`lucide-react`),o=require(`react`),s=require(`react-dropzone`);s=e.t(s);let c=require(`@customafk/react-toolkit/hooks/useControllableState`),l=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,o.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,o.useEffect)(()=>()=>{C&&C.forEach(e=>{f(e)&&URL.revokeObjectURL(e.preview)})},[]);let D=v||(C?.length??0)>=g;return(0,i.jsxs)(`div`,{className:`relative flex w-full flex-col gap-6`,children:[(0,i.jsx)(s.default,{onDrop:T,accept:m,maxSize:h,maxFiles:g,multiple:g>1||_,disabled:D,children:({getRootProps:e,getInputProps:t,isDragActive:n})=>(0,i.jsxs)(`div`,{...e(),className:(0,r.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,i.jsx)(`input`,{...t()}),n?(0,i.jsxs)(`div`,{className:`flex flex-col items-center justify-center gap-4 sm:px-5`,children:[(0,i.jsx)(`div`,{className:`rounded-full border border-dashed p-3`,children:(0,i.jsx)(a.Upload,{className:`text-text-positive-muted size-7`,"aria-hidden":`true`})}),(0,i.jsx)(`p`,{className:`text-text-positive-muted font-medium`,children:`Drop the files here`})]}):(0,i.jsxs)(`div`,{className:`flex flex-col items-center justify-center gap-4 sm:px-5`,children:[(0,i.jsx)(`div`,{className:`rounded-full border border-dashed p-3`,children:(0,i.jsx)(a.Upload,{size:b||24,className:`text-muted-foreground`,"aria-hidden":`true`})}),y&&(0,i.jsxs)(`div`,{className:`flex flex-col gap-px`,children:[(0,i.jsxs)(`p`,{className:`text-text-positive-weak text-xs font-medium`,children:[`Drag `,`'n'`,` drop files here, or click to select files`]}),(0,i.jsxs)(`p`,{className:`text-text-positive-muted text-xs`,children:[`You can upload`,g>1?` ${g===1/0?`multiple`:g}
2
+ files (up to ${(0,r.formatBytes)(h)} each)`:` a file with ${(0,r.formatBytes)(h)}`]})]})]})]})}),C?.length?(0,i.jsxs)(`div`,{className:`h-fit w-full overflow-y-auto`,children:[(0,i.jsxs)(`div`,{className:`flex items-center justify-between px-3 py-2.5`,children:[(0,i.jsxs)(`div`,{className:`text-text-positive-weak flex items-center gap-1`,children:[(0,i.jsx)(a.Image,{size:16,"aria-hidden":`true`}),(0,i.jsxs)(`p`,{className:`text-sm`,children:[`Ảnh đã tải lên (`,C.length,`)`]})]}),(0,i.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,i.jsx)(a.Trash2,{size:16,"aria-hidden":`true`}),(0,i.jsx)(`p`,{className:`text-sm`,children:`Xóa tất cả`})]})]}),(0,i.jsx)(`div`,{className:`flex flex-col gap-2.5`,children:C?.map((e,t)=>(0,i.jsx)(d,{file:e,onRemove:()=>E(t),progress:p?.[e.name]},t))})]}):null]})}function d({file:e,progress:o,onRemove:s}){return(0,i.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,i.jsxs)(`div`,{className:`flex flex-1 gap-2.5`,children:[f(e)?(0,i.jsx)(p,{file:e}):null,(0,i.jsxs)(`div`,{className:`flex w-full flex-col gap-2`,children:[(0,i.jsxs)(`div`,{className:`flex flex-col gap-y-0.5`,children:[(0,i.jsx)(`p`,{className:`text-text-positive line-clamp-1 text-sm`,children:e.name}),(0,i.jsx)(`p`,{className:`text-text-positive-muted text-xs`,children:(0,r.formatBytes)(e.size)})]}),o?(0,i.jsx)(n.Progress,{value:o}):null]})]}),(0,i.jsx)(`div`,{className:`flex items-center gap-2`,children:(0,i.jsxs)(t.t,{type:`button`,variant:`ghost`,color:`secondary`,size:`icon`,className:`size-7`,onClick:s,children:[(0,i.jsx)(a.Trash2,{size:16,className:`text-text-positive-muted`,"aria-hidden":`true`}),(0,i.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,i.jsx)(`img`,{src:e.preview,className:`border-border aspect-square size-10 shrink-0 rounded border object-cover object-top shadow-sm`}):(0,i.jsx)(a.FileText,{className:`text-text-positive-muted size-10 border`,"aria-hidden":`true`})}exports.FileUploader=u;
3
3
  //# sourceMappingURL=file-uploader.cjs.map
@@ -1,4 +1,4 @@
1
- import * as react_jsx_runtime72 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime140 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_runtime72.JSX.Element;
75
+ declare function FileUploader(props: FileUploaderProps): react_jsx_runtime140.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_runtime146 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime182 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_runtime146.JSX.Element;
75
+ declare function FileUploader(props: FileUploaderProps): react_jsx_runtime182.JSX.Element;
76
76
  //#endregion
77
77
  export { FileUploader };
78
78
  //# sourceMappingURL=file-uploader.d.mts.map
@@ -1,3 +1,3 @@
1
- "use client";import"../button.variants-DRWf66hR.mjs";import{t as e}from"../button-D54KOmb7.mjs";import{Progress as t}from"./progress.mjs";import{cn as n,formatBytes as r}from"@customafk/react-toolkit/utils";import{useCallback as i,useEffect as a}from"react";import{jsx as o,jsxs as s}from"react/jsx-runtime";import{FileText as c,Image as l,Trash2 as u,Upload as d}from"lucide-react";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:c,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:c}),A=i((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),c?.(t)}a(()=>()=>{O&&O.forEach(e=>{_(e)&&URL.revokeObjectURL(e.preview)})},[]);let M=C||(O?.length??0)>=x;return s(`div`,{className:`relative flex w-full flex-col gap-6`,children:[o(f,{onDrop:A,accept:y,maxSize:b,maxFiles:x,multiple:x>1||S,disabled:M,children:({getRootProps:e,getInputProps:t,isDragActive:i})=>s(`div`,{...e(),className:n(`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`,i&&`border-border-primary-strong bg-border-weak/40`,M&&`pointer-events-none opacity-60`,E),...D,children:[o(`input`,{...t()}),i?s(`div`,{className:`flex flex-col items-center justify-center gap-4 sm:px-5`,children:[o(`div`,{className:`rounded-full border border-dashed p-3`,children:o(d,{className:`text-text-positive-muted size-7`,"aria-hidden":`true`})}),o(`p`,{className:`text-text-positive-muted font-medium`,children:`Drop the files here`})]}):s(`div`,{className:`flex flex-col items-center justify-center gap-4 sm:px-5`,children:[o(`div`,{className:`rounded-full border border-dashed p-3`,children:o(d,{size:T||24,className:`text-muted-foreground`,"aria-hidden":`true`})}),w&&s(`div`,{className:`flex flex-col gap-px`,children:[s(`p`,{className:`text-text-positive-weak text-xs font-medium`,children:[`Drag `,`'n'`,` drop files here, or click to select files`]}),s(`p`,{className:`text-text-positive-muted text-xs`,children:[`You can upload`,x>1?` ${x===1/0?`multiple`:x}
2
- files (up to ${r(b)} each)`:` a file with ${r(b)}`]})]})]})]})}),O?.length?s(`div`,{className:`h-fit w-full overflow-y-auto`,children:[s(`div`,{className:`flex items-center justify-between px-3 py-2.5`,children:[s(`div`,{className:`text-text-positive-weak flex items-center gap-1`,children:[o(l,{size:16,"aria-hidden":`true`}),s(`p`,{className:`text-sm`,children:[`Ảnh đã tải lên (`,O.length,`)`]})]}),s(`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([]),c?.([]))},children:[o(u,{size:16,"aria-hidden":`true`}),o(`p`,{className:`text-sm`,children:`Xóa tất cả`})]})]}),o(`div`,{className:`flex flex-col gap-2.5`,children:O?.map((e,t)=>o(g,{file:e,onRemove:()=>j(t),progress:v?.[e.name]},t))})]}):null]})}function g({file:n,progress:i,onRemove:a}){return s(`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:[s(`div`,{className:`flex flex-1 gap-2.5`,children:[_(n)?o(v,{file:n}):null,s(`div`,{className:`flex w-full flex-col gap-2`,children:[s(`div`,{className:`flex flex-col gap-y-0.5`,children:[o(`p`,{className:`text-text-positive line-clamp-1 text-sm`,children:n.name}),o(`p`,{className:`text-text-positive-muted text-xs`,children:r(n.size)})]}),i?o(t,{value:i}):null]})]}),o(`div`,{className:`flex items-center gap-2`,children:s(e,{type:`button`,variant:`ghost`,color:`secondary`,size:`icon`,className:`size-7`,onClick:a,children:[o(u,{size:16,className:`text-text-positive-muted`,"aria-hidden":`true`}),o(`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/`)?o(`img`,{src:e.preview,className:`border-border aspect-square size-10 shrink-0 rounded border object-cover object-top shadow-sm`}):o(c,{className:`text-text-positive-muted size-10 border`,"aria-hidden":`true`})}export{h as FileUploader};
1
+ "use client";import"../button.variants-B_dFX3i2.mjs";import{t as e}from"../button-D8BUqpI2.mjs";import{Progress as t}from"./progress.mjs";import{cn as n,formatBytes as r}from"@customafk/react-toolkit/utils";import{jsx as i,jsxs as a}from"react/jsx-runtime";import{FileText as o,Image as s,Trash2 as c,Upload as l}from"lucide-react";import{useCallback as u,useEffect as d}from"react";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:o,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:o}),A=u((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),o?.(t)}d(()=>()=>{O&&O.forEach(e=>{_(e)&&URL.revokeObjectURL(e.preview)})},[]);let M=C||(O?.length??0)>=x;return a(`div`,{className:`relative flex w-full flex-col gap-6`,children:[i(f,{onDrop:A,accept:y,maxSize:b,maxFiles:x,multiple:x>1||S,disabled:M,children:({getRootProps:e,getInputProps:t,isDragActive:o})=>a(`div`,{...e(),className:n(`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`,o&&`border-border-primary-strong bg-border-weak/40`,M&&`pointer-events-none opacity-60`,E),...D,children:[i(`input`,{...t()}),o?a(`div`,{className:`flex flex-col items-center justify-center gap-4 sm:px-5`,children:[i(`div`,{className:`rounded-full border border-dashed p-3`,children:i(l,{className:`text-text-positive-muted size-7`,"aria-hidden":`true`})}),i(`p`,{className:`text-text-positive-muted font-medium`,children:`Drop the files here`})]}):a(`div`,{className:`flex flex-col items-center justify-center gap-4 sm:px-5`,children:[i(`div`,{className:`rounded-full border border-dashed p-3`,children:i(l,{size:T||24,className:`text-muted-foreground`,"aria-hidden":`true`})}),w&&a(`div`,{className:`flex flex-col gap-px`,children:[a(`p`,{className:`text-text-positive-weak text-xs font-medium`,children:[`Drag `,`'n'`,` drop files here, or click to select files`]}),a(`p`,{className:`text-text-positive-muted text-xs`,children:[`You can upload`,x>1?` ${x===1/0?`multiple`:x}
2
+ files (up to ${r(b)} each)`:` a file with ${r(b)}`]})]})]})]})}),O?.length?a(`div`,{className:`h-fit w-full overflow-y-auto`,children:[a(`div`,{className:`flex items-center justify-between px-3 py-2.5`,children:[a(`div`,{className:`text-text-positive-weak flex items-center gap-1`,children:[i(s,{size:16,"aria-hidden":`true`}),a(`p`,{className:`text-sm`,children:[`Ảnh đã tải lên (`,O.length,`)`]})]}),a(`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([]),o?.([]))},children:[i(c,{size:16,"aria-hidden":`true`}),i(`p`,{className:`text-sm`,children:`Xóa tất cả`})]})]}),i(`div`,{className:`flex flex-col gap-2.5`,children:O?.map((e,t)=>i(g,{file:e,onRemove:()=>j(t),progress:v?.[e.name]},t))})]}):null]})}function g({file:n,progress:o,onRemove:s}){return a(`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:[a(`div`,{className:`flex flex-1 gap-2.5`,children:[_(n)?i(v,{file:n}):null,a(`div`,{className:`flex w-full flex-col gap-2`,children:[a(`div`,{className:`flex flex-col gap-y-0.5`,children:[i(`p`,{className:`text-text-positive line-clamp-1 text-sm`,children:n.name}),i(`p`,{className:`text-text-positive-muted text-xs`,children:r(n.size)})]}),o?i(t,{value:o}):null]})]}),i(`div`,{className:`flex items-center gap-2`,children:a(e,{type:`button`,variant:`ghost`,color:`secondary`,size:`icon`,className:`size-7`,onClick:s,children:[i(c,{size:16,className:`text-text-positive-muted`,"aria-hidden":`true`}),i(`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/`)?i(`img`,{src:e.preview,className:`border-border aspect-square size-10 shrink-0 rounded border object-cover object-top shadow-sm`}):i(o,{className:`text-text-positive-muted size-10 border`,"aria-hidden":`true`})}export{h as FileUploader};
3
3
  //# sourceMappingURL=file-uploader.mjs.map
package/dist/ui/form.cjs CHANGED
@@ -1,2 +1,2 @@
1
- "use client";const e=require(`../chunk-Bmb41Sf3.cjs`);require(`../separator-C3ip6sbh.cjs`),require(`../label-BzfsTrVt.cjs`);const t=require(`./field.cjs`);let n=require(`@customafk/react-toolkit/utils`),r=require(`react`),i=require(`react/jsx-runtime`),a=require(`radix-ui`),o=require(`react-hook-form`);const s=o.FormProvider,c=(0,r.createContext)({}),l=({...e})=>(0,i.jsx)(c.Provider,{value:{name:e.name},children:(0,i.jsx)(o.Controller,{...e})}),u=()=>{let e=(0,r.use)(c),t=(0,r.use)(d),{getFieldState:n,control:i,resetField:a}=(0,o.useFormContext)(),s=(0,o.useFormState)({name:e.name}),l=n(e.name,s);if(!e)throw Error(`useFormField should be used within <FormField>`);let{id:u}=t;return{id:u,control:i,resetField:a,name:e.name,formItemId:`${u}-form-item`,formDescriptionId:`${u}-form-item-description`,formMessageId:`${u}-form-item-message`,...l}},d=(0,r.createContext)({}),f=(0,r.memo)(({className:e,orientation:n=`responsive`,...a})=>{let o=(0,r.useId)();return(0,i.jsx)(d.Provider,{value:{id:o},children:(0,i.jsx)(t.Field,{orientation:n,...a,className:e})})});f.displayName=`FormItem`;const p=(0,r.memo)(({...e})=>{let{formItemId:n}=u();return(0,i.jsx)(t.FieldLabel,{htmlFor:n,...e})});p.displayName=`FormLabel`;const m=(0,r.memo)(({...e})=>{let{error:t,formItemId:n,formDescriptionId:r,formMessageId:o}=u();return(0,i.jsx)(a.Slot.Slot,{"data-slot":`form-control`,id:n,"aria-describedby":t?`${r} ${o}`:`${r}`,"aria-invalid":!!t,...e})});m.displayName=`FormControl`;function h({className:e,...r}){let{formDescriptionId:a}=u();return(0,i.jsx)(t.FieldDescription,{id:a,className:(0,n.cn)(`text-text-positive-weak text-sm/6 leading-normal font-normal`,`group-has-data-[orientation=horizontal]/field:text-balance`,`last:mt-0 nth-last-2:-mt-1 [[data-variant=legend]+&]:-mt-1.5`,`[&>a:hover]:text-primary [&>a]:underline [&>a]:underline-offset-4`,e),...r})}function g({className:e,children:t,...r}){let{error:a,formMessageId:o}=u();return(0,i.jsx)(`span`,{"data-slot":`form-message`,id:o,className:(0,n.cn)(`text-danger text-xs`,e),...r,children:a?String(a?.message??``):t})}exports.Form=s,exports.FormControl=m,exports.FormDescription=h,exports.FormField=l,exports.FormItem=f,exports.FormLabel=p,exports.FormMessage=g,exports.useFormField=u;
1
+ "use client";const e=require(`../chunk-Bmb41Sf3.cjs`);require(`../separator-C3ip6sbh.cjs`),require(`../label-BzfsTrVt.cjs`);const t=require(`./field.cjs`);let n=require(`@customafk/react-toolkit/utils`),r=require(`react/jsx-runtime`),i=require(`react`),a=require(`radix-ui`),o=require(`react-hook-form`);const s=o.FormProvider,c=(0,i.createContext)({}),l=({...e})=>(0,r.jsx)(c.Provider,{value:{name:e.name},children:(0,r.jsx)(o.Controller,{...e})}),u=()=>{let e=(0,i.use)(c),t=(0,i.use)(d),{getFieldState:n,control:r,resetField:a}=(0,o.useFormContext)(),s=(0,o.useFormState)({name:e.name}),l=n(e.name,s);if(!e)throw Error(`useFormField should be used within <FormField>`);let{id:u}=t;return{id:u,control:r,resetField:a,name:e.name,formItemId:`${u}-form-item`,formDescriptionId:`${u}-form-item-description`,formMessageId:`${u}-form-item-message`,...l}},d=(0,i.createContext)({}),f=(0,i.memo)(({className:e,orientation:n=`responsive`,...a})=>{let o=(0,i.useId)();return(0,r.jsx)(d.Provider,{value:{id:o},children:(0,r.jsx)(t.Field,{orientation:n,...a,className:e})})});f.displayName=`FormItem`;const p=(0,i.memo)(({...e})=>{let{formItemId:n}=u();return(0,r.jsx)(t.FieldLabel,{htmlFor:n,...e})});p.displayName=`FormLabel`;const m=(0,i.memo)(({...e})=>{let{error:t,formItemId:n,formDescriptionId:i,formMessageId:o}=u();return(0,r.jsx)(a.Slot.Slot,{"data-slot":`form-control`,id:n,"aria-describedby":t?`${i} ${o}`:`${i}`,"aria-invalid":!!t,...e})});m.displayName=`FormControl`;function h({className:e,...i}){let{formDescriptionId:a}=u();return(0,r.jsx)(t.FieldDescription,{id:a,className:(0,n.cn)(`text-text-positive-weak text-sm/6 leading-normal font-normal`,`group-has-data-[orientation=horizontal]/field:text-balance`,`last:mt-0 nth-last-2:-mt-1 [[data-variant=legend]+&]:-mt-1.5`,`[&>a:hover]:text-primary [&>a]:underline [&>a]:underline-offset-4`,e),...i})}function g({className:e,children:t,...i}){let{error:a,formMessageId:o}=u();return(0,r.jsx)(`span`,{"data-slot":`form-message`,id:o,className:(0,n.cn)(`text-danger text-xs`,e),...i,children:a?String(a?.message??``):t})}exports.Form=s,exports.FormControl=m,exports.FormDescription=h,exports.FormField=l,exports.FormItem=f,exports.FormLabel=p,exports.FormMessage=g,exports.useFormField=u;
2
2
  //# sourceMappingURL=form.cjs.map
@@ -1,5 +1,5 @@
1
- import * as react_jsx_runtime222 from "react/jsx-runtime";
2
- import * as react31 from "react";
1
+ import * as react_jsx_runtime134 from "react/jsx-runtime";
2
+ import * as react11 from "react";
3
3
  import { Label, Slot } from "radix-ui";
4
4
  import * as react_hook_form0 from "react-hook-form";
5
5
  import { ControllerProps, FieldPath, FieldValues } from "react-hook-form";
@@ -8,7 +8,7 @@ import { ControllerProps, FieldPath, FieldValues } from "react-hook-form";
8
8
  declare const Form: <TFieldValues extends FieldValues, TContext = any, TTransformedValues = TFieldValues>(props: react_hook_form0.FormProviderProps<TFieldValues, TContext, TTransformedValues>) => React.JSX.Element;
9
9
  declare const FormField: <TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>>({
10
10
  ...props
11
- }: ControllerProps<TFieldValues, TName>) => react_jsx_runtime222.JSX.Element;
11
+ }: ControllerProps<TFieldValues, TName>) => react_jsx_runtime134.JSX.Element;
12
12
  declare const useFormField: () => {
13
13
  invalid: boolean;
14
14
  isDirty: boolean;
@@ -23,28 +23,28 @@ declare const useFormField: () => {
23
23
  formDescriptionId: string;
24
24
  formMessageId: string;
25
25
  };
26
- declare const FormItem: react31.MemoExoticComponent<({
26
+ declare const FormItem: react11.MemoExoticComponent<({
27
27
  className,
28
28
  orientation,
29
29
  ...props
30
30
  }: React.ComponentProps<"div"> & {
31
31
  orientation?: "vertical" | "horizontal" | "responsive";
32
- }) => react_jsx_runtime222.JSX.Element>;
33
- declare const FormLabel: react31.MemoExoticComponent<({
32
+ }) => react_jsx_runtime134.JSX.Element>;
33
+ declare const FormLabel: react11.MemoExoticComponent<({
34
34
  ...props
35
- }: React.ComponentProps<typeof Label.Root>) => react_jsx_runtime222.JSX.Element>;
36
- declare const FormControl: react31.MemoExoticComponent<({
35
+ }: React.ComponentProps<typeof Label.Root>) => react_jsx_runtime134.JSX.Element>;
36
+ declare const FormControl: react11.MemoExoticComponent<({
37
37
  ...props
38
- }: React.ComponentProps<typeof Slot.Slot>) => react_jsx_runtime222.JSX.Element>;
38
+ }: React.ComponentProps<typeof Slot.Slot>) => react_jsx_runtime134.JSX.Element>;
39
39
  declare function FormDescription({
40
40
  className,
41
41
  ...props
42
- }: React.ComponentProps<'p'>): react_jsx_runtime222.JSX.Element;
42
+ }: React.ComponentProps<'p'>): react_jsx_runtime134.JSX.Element;
43
43
  declare function FormMessage({
44
44
  className,
45
45
  children,
46
46
  ...props
47
- }: React.ComponentProps<'p'>): react_jsx_runtime222.JSX.Element;
47
+ }: React.ComponentProps<'p'>): react_jsx_runtime134.JSX.Element;
48
48
  //#endregion
49
49
  export { Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, useFormField };
50
50
  //# sourceMappingURL=form.d.cts.map
@@ -1,5 +1,5 @@
1
- import * as react0 from "react";
2
- import * as react_jsx_runtime104 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime236 from "react/jsx-runtime";
2
+ import * as react30 from "react";
3
3
  import { Label, Slot } from "radix-ui";
4
4
  import * as react_hook_form0 from "react-hook-form";
5
5
  import { ControllerProps, FieldPath, FieldValues } from "react-hook-form";
@@ -8,7 +8,7 @@ import { ControllerProps, FieldPath, FieldValues } from "react-hook-form";
8
8
  declare const Form: <TFieldValues extends FieldValues, TContext = any, TTransformedValues = TFieldValues>(props: react_hook_form0.FormProviderProps<TFieldValues, TContext, TTransformedValues>) => React.JSX.Element;
9
9
  declare const FormField: <TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>>({
10
10
  ...props
11
- }: ControllerProps<TFieldValues, TName>) => react_jsx_runtime104.JSX.Element;
11
+ }: ControllerProps<TFieldValues, TName>) => react_jsx_runtime236.JSX.Element;
12
12
  declare const useFormField: () => {
13
13
  invalid: boolean;
14
14
  isDirty: boolean;
@@ -23,28 +23,28 @@ declare const useFormField: () => {
23
23
  formDescriptionId: string;
24
24
  formMessageId: string;
25
25
  };
26
- declare const FormItem: react0.MemoExoticComponent<({
26
+ declare const FormItem: react30.MemoExoticComponent<({
27
27
  className,
28
28
  orientation,
29
29
  ...props
30
30
  }: React.ComponentProps<"div"> & {
31
31
  orientation?: "vertical" | "horizontal" | "responsive";
32
- }) => react_jsx_runtime104.JSX.Element>;
33
- declare const FormLabel: react0.MemoExoticComponent<({
32
+ }) => react_jsx_runtime236.JSX.Element>;
33
+ declare const FormLabel: react30.MemoExoticComponent<({
34
34
  ...props
35
- }: React.ComponentProps<typeof Label.Root>) => react_jsx_runtime104.JSX.Element>;
36
- declare const FormControl: react0.MemoExoticComponent<({
35
+ }: React.ComponentProps<typeof Label.Root>) => react_jsx_runtime236.JSX.Element>;
36
+ declare const FormControl: react30.MemoExoticComponent<({
37
37
  ...props
38
- }: React.ComponentProps<typeof Slot.Slot>) => react_jsx_runtime104.JSX.Element>;
38
+ }: React.ComponentProps<typeof Slot.Slot>) => react_jsx_runtime236.JSX.Element>;
39
39
  declare function FormDescription({
40
40
  className,
41
41
  ...props
42
- }: React.ComponentProps<'p'>): react_jsx_runtime104.JSX.Element;
42
+ }: React.ComponentProps<'p'>): react_jsx_runtime236.JSX.Element;
43
43
  declare function FormMessage({
44
44
  className,
45
45
  children,
46
46
  ...props
47
- }: React.ComponentProps<'p'>): react_jsx_runtime104.JSX.Element;
47
+ }: React.ComponentProps<'p'>): react_jsx_runtime236.JSX.Element;
48
48
  //#endregion
49
49
  export { Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, useFormField };
50
50
  //# sourceMappingURL=form.d.mts.map
package/dist/ui/form.mjs CHANGED
@@ -1,2 +1,2 @@
1
- "use client";import"../separator-Bf0gymN4.mjs";import"../label-Dqr8nxWi.mjs";import{Field as e,FieldDescription as t,FieldLabel as n}from"./field.mjs";import{cn as r}from"@customafk/react-toolkit/utils";import{createContext as i,memo as a,use as o,useId as s}from"react";import{jsx as c}from"react/jsx-runtime";import{Slot as l}from"radix-ui";import{Controller as u,FormProvider as d,useFormContext as f,useFormState as p}from"react-hook-form";const m=d,h=i({}),g=({...e})=>c(h.Provider,{value:{name:e.name},children:c(u,{...e})}),_=()=>{let e=o(h),t=o(v),{getFieldState:n,control:r,resetField:i}=f(),a=p({name:e.name}),s=n(e.name,a);if(!e)throw Error(`useFormField should be used within <FormField>`);let{id:c}=t;return{id:c,control:r,resetField:i,name:e.name,formItemId:`${c}-form-item`,formDescriptionId:`${c}-form-item-description`,formMessageId:`${c}-form-item-message`,...s}},v=i({}),y=a(({className:t,orientation:n=`responsive`,...r})=>{let i=s();return c(v.Provider,{value:{id:i},children:c(e,{orientation:n,...r,className:t})})});y.displayName=`FormItem`;const b=a(({...e})=>{let{formItemId:t}=_();return c(n,{htmlFor:t,...e})});b.displayName=`FormLabel`;const x=a(({...e})=>{let{error:t,formItemId:n,formDescriptionId:r,formMessageId:i}=_();return c(l.Slot,{"data-slot":`form-control`,id:n,"aria-describedby":t?`${r} ${i}`:`${r}`,"aria-invalid":!!t,...e})});x.displayName=`FormControl`;function S({className:e,...n}){let{formDescriptionId:i}=_();return c(t,{id:i,className:r(`text-text-positive-weak text-sm/6 leading-normal font-normal`,`group-has-data-[orientation=horizontal]/field:text-balance`,`last:mt-0 nth-last-2:-mt-1 [[data-variant=legend]+&]:-mt-1.5`,`[&>a:hover]:text-primary [&>a]:underline [&>a]:underline-offset-4`,e),...n})}function C({className:e,children:t,...n}){let{error:i,formMessageId:a}=_();return c(`span`,{"data-slot":`form-message`,id:a,className:r(`text-danger text-xs`,e),...n,children:i?String(i?.message??``):t})}export{m as Form,x as FormControl,S as FormDescription,g as FormField,y as FormItem,b as FormLabel,C as FormMessage,_ as useFormField};
1
+ "use client";import"../separator-Bf0gymN4.mjs";import"../label-Dqr8nxWi.mjs";import{Field as e,FieldDescription as t,FieldLabel as n}from"./field.mjs";import{cn as r}from"@customafk/react-toolkit/utils";import{jsx as i}from"react/jsx-runtime";import{createContext as a,memo as o,use as s,useId as c}from"react";import{Slot as l}from"radix-ui";import{Controller as u,FormProvider as d,useFormContext as f,useFormState as p}from"react-hook-form";const m=d,h=a({}),g=({...e})=>i(h.Provider,{value:{name:e.name},children:i(u,{...e})}),_=()=>{let e=s(h),t=s(v),{getFieldState:n,control:r,resetField:i}=f(),a=p({name:e.name}),o=n(e.name,a);if(!e)throw Error(`useFormField should be used within <FormField>`);let{id:c}=t;return{id:c,control:r,resetField:i,name:e.name,formItemId:`${c}-form-item`,formDescriptionId:`${c}-form-item-description`,formMessageId:`${c}-form-item-message`,...o}},v=a({}),y=o(({className:t,orientation:n=`responsive`,...r})=>{let a=c();return i(v.Provider,{value:{id:a},children:i(e,{orientation:n,...r,className:t})})});y.displayName=`FormItem`;const b=o(({...e})=>{let{formItemId:t}=_();return i(n,{htmlFor:t,...e})});b.displayName=`FormLabel`;const x=o(({...e})=>{let{error:t,formItemId:n,formDescriptionId:r,formMessageId:a}=_();return i(l.Slot,{"data-slot":`form-control`,id:n,"aria-describedby":t?`${r} ${a}`:`${r}`,"aria-invalid":!!t,...e})});x.displayName=`FormControl`;function S({className:e,...n}){let{formDescriptionId:a}=_();return i(t,{id:a,className:r(`text-text-positive-weak text-sm/6 leading-normal font-normal`,`group-has-data-[orientation=horizontal]/field:text-balance`,`last:mt-0 nth-last-2:-mt-1 [[data-variant=legend]+&]:-mt-1.5`,`[&>a:hover]:text-primary [&>a]:underline [&>a]:underline-offset-4`,e),...n})}function C({className:e,children:t,...n}){let{error:a,formMessageId:o}=_();return i(`span`,{"data-slot":`form-message`,id:o,className:r(`text-danger text-xs`,e),...n,children:a?String(a?.message??``):t})}export{m as Form,x as FormControl,S as FormDescription,g as FormField,y as FormItem,b as FormLabel,C as FormMessage,_ as useFormField};
2
2
  //# sourceMappingURL=form.mjs.map
@@ -1,19 +1,19 @@
1
- import * as react_jsx_runtime102 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime152 from "react/jsx-runtime";
2
2
  import { HoverCard as HoverCard$1 } from "radix-ui";
3
3
 
4
4
  //#region packages/components/ui/hover-card.d.ts
5
5
  declare function HoverCard({
6
6
  ...props
7
- }: React.ComponentProps<typeof HoverCard$1.Root>): react_jsx_runtime102.JSX.Element;
7
+ }: React.ComponentProps<typeof HoverCard$1.Root>): react_jsx_runtime152.JSX.Element;
8
8
  declare function HoverCardTrigger({
9
9
  ...props
10
- }: React.ComponentProps<typeof HoverCard$1.Trigger>): react_jsx_runtime102.JSX.Element;
10
+ }: React.ComponentProps<typeof HoverCard$1.Trigger>): react_jsx_runtime152.JSX.Element;
11
11
  declare function HoverCardContent({
12
12
  className,
13
13
  align,
14
14
  sideOffset,
15
15
  ...props
16
- }: React.ComponentProps<typeof HoverCard$1.Content>): react_jsx_runtime102.JSX.Element;
16
+ }: React.ComponentProps<typeof HoverCard$1.Content>): react_jsx_runtime152.JSX.Element;
17
17
  //#endregion
18
18
  export { HoverCard, HoverCardContent, HoverCardTrigger };
19
19
  //# sourceMappingURL=hover-card.d.cts.map
@@ -1,19 +1,19 @@
1
- import * as react_jsx_runtime101 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime231 from "react/jsx-runtime";
2
2
  import { HoverCard as HoverCard$1 } from "radix-ui";
3
3
 
4
4
  //#region packages/components/ui/hover-card.d.ts
5
5
  declare function HoverCard({
6
6
  ...props
7
- }: React.ComponentProps<typeof HoverCard$1.Root>): react_jsx_runtime101.JSX.Element;
7
+ }: React.ComponentProps<typeof HoverCard$1.Root>): react_jsx_runtime231.JSX.Element;
8
8
  declare function HoverCardTrigger({
9
9
  ...props
10
- }: React.ComponentProps<typeof HoverCard$1.Trigger>): react_jsx_runtime101.JSX.Element;
10
+ }: React.ComponentProps<typeof HoverCard$1.Trigger>): react_jsx_runtime231.JSX.Element;
11
11
  declare function HoverCardContent({
12
12
  className,
13
13
  align,
14
14
  sideOffset,
15
15
  ...props
16
- }: React.ComponentProps<typeof HoverCard$1.Content>): react_jsx_runtime101.JSX.Element;
16
+ }: React.ComponentProps<typeof HoverCard$1.Content>): react_jsx_runtime231.JSX.Element;
17
17
  //#endregion
18
18
  export { HoverCard, HoverCardContent, HoverCardTrigger };
19
19
  //# sourceMappingURL=hover-card.d.mts.map
package/dist/ui/image.cjs CHANGED
@@ -1 +1 @@
1
- require(`../skeleton-CHympz8k.cjs`);const e=require(`../image-DuFv8sPr.cjs`);exports.Image=e.t;
1
+ require(`../skeleton-CHympz8k.cjs`);const e=require(`../image-BBZUipoU.cjs`);exports.Image=e.t;
package/dist/ui/image.mjs CHANGED
@@ -1 +1 @@
1
- import"../skeleton-Ba6koCVf.mjs";import{t as e}from"../image-CS_Q0WA7.mjs";export{e as Image};
1
+ import"../skeleton-Ba6koCVf.mjs";import{t as e}from"../image-CZji4Q26.mjs";export{e as Image};
@@ -1,2 +1,2 @@
1
- "use client";const e=require(`../chunk-Bmb41Sf3.cjs`);let t=require(`@customafk/react-toolkit/utils`),n=require(`react`),r=require(`react/jsx-runtime`),i=require(`lucide-react`),a=require(`input-otp`);function o({className:e,containerClassName:n,...i}){return(0,r.jsx)(a.OTPInput,{"data-slot":`input-otp`,containerClassName:(0,t.cn)(`flex items-center gap-2 has-disabled:opacity-50`,n),className:(0,t.cn)(`disabled:cursor-not-allowed`,e),...i})}function s({className:e,...n}){return(0,r.jsx)(`div`,{"data-slot":`input-otp-group`,className:(0,t.cn)(`flex items-center`,e),...n})}function c({index:e,className:i,...o}){let{char:s,hasFakeCaret:c,isActive:l}=(0,n.use)(a.OTPInputContext)?.slots[e]??{};return(0,r.jsxs)(`div`,{"data-slot":`input-otp-slot`,"data-active":l,className:(0,t.cn)(`data-[active=true]:border-ring data-[active=true]:ring-ring/50 data-[active=true]:aria-invalid:ring-destructive/20 dark:data-[active=true]:aria-invalid:ring-destructive/40 aria-invalid:border-destructive data-[active=true]:aria-invalid:border-destructive dark:bg-input/30 border-input relative flex h-9 w-9 items-center justify-center border-y border-r text-sm shadow-xs transition-all outline-none first:rounded-l-md first:border-l last:rounded-r-md data-[active=true]:z-10 data-[active=true]:ring-[3px]`,i),...o,children:[s,c&&(0,r.jsx)(`div`,{className:`pointer-events-none absolute inset-0 flex items-center justify-center`,children:(0,r.jsx)(`div`,{className:`animate-caret-blink bg-foreground h-4 w-px duration-1000`})})]})}function l({...e}){return(0,r.jsx)(`div`,{"data-slot":`input-otp-separator`,role:`separator`,...e,children:(0,r.jsx)(i.MinusIcon,{})})}exports.InputOTP=o,exports.InputOTPGroup=s,exports.InputOTPSeparator=l,exports.InputOTPSlot=c;
1
+ "use client";const e=require(`../chunk-Bmb41Sf3.cjs`);let t=require(`@customafk/react-toolkit/utils`),n=require(`react/jsx-runtime`),r=require(`lucide-react`),i=require(`react`),a=require(`input-otp`);function o({className:e,containerClassName:r,...i}){return(0,n.jsx)(a.OTPInput,{"data-slot":`input-otp`,containerClassName:(0,t.cn)(`flex items-center gap-2 has-disabled:opacity-50`,r),className:(0,t.cn)(`disabled:cursor-not-allowed`,e),...i})}function s({className:e,...r}){return(0,n.jsx)(`div`,{"data-slot":`input-otp-group`,className:(0,t.cn)(`flex items-center`,e),...r})}function c({index:e,className:r,...o}){let{char:s,hasFakeCaret:c,isActive:l}=(0,i.use)(a.OTPInputContext)?.slots[e]??{};return(0,n.jsxs)(`div`,{"data-slot":`input-otp-slot`,"data-active":l,className:(0,t.cn)(`data-[active=true]:border-ring data-[active=true]:ring-ring/50 data-[active=true]:aria-invalid:ring-destructive/20 dark:data-[active=true]:aria-invalid:ring-destructive/40 aria-invalid:border-destructive data-[active=true]:aria-invalid:border-destructive dark:bg-input/30 border-input relative flex h-9 w-9 items-center justify-center border-y border-r text-sm shadow-xs transition-all outline-none first:rounded-l-md first:border-l last:rounded-r-md data-[active=true]:z-10 data-[active=true]:ring-[3px]`,r),...o,children:[s,c&&(0,n.jsx)(`div`,{className:`pointer-events-none absolute inset-0 flex items-center justify-center`,children:(0,n.jsx)(`div`,{className:`animate-caret-blink bg-foreground h-4 w-px duration-1000`})})]})}function l({...e}){return(0,n.jsx)(`div`,{"data-slot":`input-otp-separator`,role:`separator`,...e,children:(0,n.jsx)(r.MinusIcon,{})})}exports.InputOTP=o,exports.InputOTPGroup=s,exports.InputOTPSeparator=l,exports.InputOTPSlot=c;
2
2
  //# sourceMappingURL=input-otp.cjs.map
@@ -1,4 +1,4 @@
1
- import * as react_jsx_runtime125 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime172 from "react/jsx-runtime";
2
2
  import { OTPInput } from "input-otp";
3
3
 
4
4
  //#region packages/components/ui/input-otp.d.ts
@@ -8,21 +8,21 @@ declare function InputOTP({
8
8
  ...props
9
9
  }: React.ComponentProps<typeof OTPInput> & {
10
10
  containerClassName?: string;
11
- }): react_jsx_runtime125.JSX.Element;
11
+ }): react_jsx_runtime172.JSX.Element;
12
12
  declare function InputOTPGroup({
13
13
  className,
14
14
  ...props
15
- }: React.ComponentProps<'div'>): react_jsx_runtime125.JSX.Element;
15
+ }: React.ComponentProps<'div'>): react_jsx_runtime172.JSX.Element;
16
16
  declare function InputOTPSlot({
17
17
  index,
18
18
  className,
19
19
  ...props
20
20
  }: React.ComponentProps<'div'> & {
21
21
  index: number;
22
- }): react_jsx_runtime125.JSX.Element;
22
+ }): react_jsx_runtime172.JSX.Element;
23
23
  declare function InputOTPSeparator({
24
24
  ...props
25
- }: React.ComponentProps<'div'>): react_jsx_runtime125.JSX.Element;
25
+ }: React.ComponentProps<'div'>): react_jsx_runtime172.JSX.Element;
26
26
  //#endregion
27
27
  export { InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot };
28
28
  //# sourceMappingURL=input-otp.d.cts.map