@fuf-stack/uniform 1.18.3 → 1.19.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (421) hide show
  1. package/dist/Checkboxes/index.cjs +7 -5
  2. package/dist/Checkboxes/index.d.cts +1 -1
  3. package/dist/Checkboxes/index.d.ts +1 -1
  4. package/dist/Checkboxes/index.js +2 -3
  5. package/dist/{Checkboxes-Dk7yyRVR.cjs → Checkboxes-Ca9fTce_.cjs} +18 -21
  6. package/dist/Checkboxes-Ca9fTce_.cjs.map +1 -0
  7. package/dist/{Checkboxes-BGrK_mwQ.js → Checkboxes-D1hppxDE.js} +7 -10
  8. package/dist/Checkboxes-D1hppxDE.js.map +1 -0
  9. package/dist/FieldArray/index.cjs +7 -5
  10. package/dist/FieldArray/index.d.cts +1 -1
  11. package/dist/FieldArray/index.d.ts +1 -1
  12. package/dist/FieldArray/index.js +2 -3
  13. package/dist/{FieldArray-C6RHZcKa.cjs → FieldArray-CnxCQt0o.cjs} +34 -53
  14. package/dist/FieldArray-CnxCQt0o.cjs.map +1 -0
  15. package/dist/{FieldArray-Bs2ViU8m.js → FieldArray-n39Aj9AV.js} +19 -38
  16. package/dist/FieldArray-n39Aj9AV.js.map +1 -0
  17. package/dist/FieldCard/index.cjs +4 -4
  18. package/dist/FieldCard/index.d.cts +1 -1
  19. package/dist/FieldCard/index.d.ts +1 -1
  20. package/dist/FieldCard/index.js +2 -3
  21. package/dist/{FieldCard-BxK_IJOR.cjs → FieldCard-DbuGSb_j.cjs} +20 -24
  22. package/dist/FieldCard-DbuGSb_j.cjs.map +1 -0
  23. package/dist/{FieldCard-16yCF83m.js → FieldCard-SjYNs4sL.js} +8 -12
  24. package/dist/FieldCard-SjYNs4sL.js.map +1 -0
  25. package/dist/{FieldCopyTestIdButton-4uupFq1U.cjs → FieldCopyTestIdButton-BvVBidko.cjs} +14 -17
  26. package/dist/FieldCopyTestIdButton-BvVBidko.cjs.map +1 -0
  27. package/dist/{FieldCopyTestIdButton-BoEdlzLs.js → FieldCopyTestIdButton-Dpmo0uBV.js} +4 -7
  28. package/dist/FieldCopyTestIdButton-Dpmo0uBV.js.map +1 -0
  29. package/dist/{FieldValidationError-Br6iopZj.cjs → FieldValidationError-EecXNx5F.cjs} +14 -17
  30. package/dist/FieldValidationError-EecXNx5F.cjs.map +1 -0
  31. package/dist/{FieldValidationError-XQaViV52.js → FieldValidationError-ktTyyyip.js} +4 -7
  32. package/dist/FieldValidationError-ktTyyyip.js.map +1 -0
  33. package/dist/Form/index.cjs +7 -5
  34. package/dist/Form/index.d.cts +1 -1
  35. package/dist/Form/index.d.ts +1 -2
  36. package/dist/Form/index.js +2 -3
  37. package/dist/{Form--SsSvsxl.cjs → Form-Diivw8pg.cjs} +17 -22
  38. package/dist/Form-Diivw8pg.cjs.map +1 -0
  39. package/dist/{Form-ccsEssie.js → Form-Wzy7pBVt.js} +8 -13
  40. package/dist/Form-Wzy7pBVt.js.map +1 -0
  41. package/dist/{FormContext-BSLO2-sO.cjs → FormContext-3GzWxXSS.cjs} +28 -36
  42. package/dist/{FormContext-BSLO2-sO.cjs.map → FormContext-3GzWxXSS.cjs.map} +1 -1
  43. package/dist/{FormContext-CCe8drkp.d.ts → FormContext-B4KQxdl7.d.ts} +1 -1
  44. package/dist/{FormContext-CCe8drkp.d.ts.map → FormContext-B4KQxdl7.d.ts.map} +1 -1
  45. package/dist/{FormContext-RSA21aDt.d.cts → FormContext-BuG3xZFe.d.cts} +1 -1
  46. package/dist/{FormContext-RSA21aDt.d.cts.map → FormContext-BuG3xZFe.d.cts.map} +1 -1
  47. package/dist/{FormContext-kE3YKhp_.js → FormContext-CLfMWHQM.js} +4 -7
  48. package/dist/{FormContext-kE3YKhp_.js.map → FormContext-CLfMWHQM.js.map} +1 -1
  49. package/dist/Grid/index.cjs +7 -5
  50. package/dist/Grid/index.d.cts +1 -1
  51. package/dist/Grid/index.d.ts +1 -1
  52. package/dist/Grid/index.js +2 -3
  53. package/dist/{Grid-BaqBa1ku.js → Grid-Bzyi97Cx.js} +4 -7
  54. package/dist/Grid-Bzyi97Cx.js.map +1 -0
  55. package/dist/{Grid-D5Yf0nD_.cjs → Grid-V1pCY2LC.cjs} +14 -17
  56. package/dist/Grid-V1pCY2LC.cjs.map +1 -0
  57. package/dist/Input/index.cjs +7 -5
  58. package/dist/Input/index.d.cts +1 -1
  59. package/dist/Input/index.d.ts +1 -1
  60. package/dist/Input/index.js +2 -3
  61. package/dist/{Input-BCs_eyJ9.js → Input-BDWP4hOr.js} +6 -9
  62. package/dist/{Input-BCs_eyJ9.js.map → Input-BDWP4hOr.js.map} +1 -1
  63. package/dist/{Input-B3p_4ntD.cjs → Input-C6kRsqx1.cjs} +18 -21
  64. package/dist/Input-C6kRsqx1.cjs.map +1 -0
  65. package/dist/RadioBoxes/index.cjs +7 -5
  66. package/dist/RadioBoxes/index.d.cts +1 -1
  67. package/dist/RadioBoxes/index.d.ts +1 -1
  68. package/dist/RadioBoxes/index.js +2 -3
  69. package/dist/{RadioBoxes-C3Cwrn2I.js → RadioBoxes-DNQCynvF.js} +6 -10
  70. package/dist/RadioBoxes-DNQCynvF.js.map +1 -0
  71. package/dist/{RadioBoxes-xRvNe5U8.cjs → RadioBoxes-DVxDhpbp.cjs} +23 -27
  72. package/dist/RadioBoxes-DVxDhpbp.cjs.map +1 -0
  73. package/dist/RadioTabs/index.cjs +7 -5
  74. package/dist/RadioTabs/index.d.cts +1 -1
  75. package/dist/RadioTabs/index.d.ts +1 -1
  76. package/dist/RadioTabs/index.js +2 -3
  77. package/dist/{RadioTabs-BaHvYcd-.cjs → RadioTabs-CFraIx6w.cjs} +18 -21
  78. package/dist/RadioTabs-CFraIx6w.cjs.map +1 -0
  79. package/dist/{RadioTabs-DfOGIsEf.js → RadioTabs-CsVqYCE9.js} +6 -9
  80. package/dist/RadioTabs-CsVqYCE9.js.map +1 -0
  81. package/dist/Radios/index.cjs +7 -5
  82. package/dist/Radios/index.d.cts +1 -1
  83. package/dist/Radios/index.d.ts +1 -1
  84. package/dist/Radios/index.js +2 -3
  85. package/dist/{Radios-xM-09vB5.js → Radios-C-Zf3Yij.js} +6 -9
  86. package/dist/Radios-C-Zf3Yij.js.map +1 -0
  87. package/dist/{Radios-BfA3uL35.cjs → Radios-OhSB1oFo.cjs} +18 -21
  88. package/dist/Radios-OhSB1oFo.cjs.map +1 -0
  89. package/dist/Select/index.cjs +7 -5
  90. package/dist/Select/index.d.cts +1 -1
  91. package/dist/Select/index.d.ts +1 -1
  92. package/dist/Select/index.js +2 -3
  93. package/dist/{Select-DlEUzYl6.js → Select-DMpCAYLB.js} +7 -10
  94. package/dist/Select-DMpCAYLB.js.map +1 -0
  95. package/dist/{Select-DH_YaruM.cjs → Select-fEJPVWJa.cjs} +21 -24
  96. package/dist/Select-fEJPVWJa.cjs.map +1 -0
  97. package/dist/Slider/index.cjs +7 -5
  98. package/dist/Slider/index.d.cts +1 -1
  99. package/dist/Slider/index.d.ts +1 -1
  100. package/dist/Slider/index.js +2 -3
  101. package/dist/{Slider-C-dMrJZ6.cjs → Slider-ChBNfwS2.cjs} +16 -19
  102. package/dist/Slider-ChBNfwS2.cjs.map +1 -0
  103. package/dist/{Slider-CTFuVrp2.js → Slider-DxRcLu-j.js} +5 -8
  104. package/dist/{Slider-CTFuVrp2.js.map → Slider-DxRcLu-j.js.map} +1 -1
  105. package/dist/SubmitButton/index.cjs +7 -5
  106. package/dist/SubmitButton/index.d.cts +1 -1
  107. package/dist/SubmitButton/index.d.ts +1 -1
  108. package/dist/SubmitButton/index.js +2 -3
  109. package/dist/{SubmitButton-Bh1RN0F1.js → SubmitButton-Bu3NNFyt.js} +5 -8
  110. package/dist/SubmitButton-Bu3NNFyt.js.map +1 -0
  111. package/dist/{SubmitButton-CJ6s1mZr.cjs → SubmitButton-CfuPpJKk.cjs} +15 -18
  112. package/dist/SubmitButton-CfuPpJKk.cjs.map +1 -0
  113. package/dist/Switch/index.cjs +7 -5
  114. package/dist/Switch/index.d.cts +1 -1
  115. package/dist/Switch/index.d.ts +1 -1
  116. package/dist/Switch/index.js +2 -3
  117. package/dist/{Switch-CXrz-M3V.js → Switch-CMpXZdLc.js} +5 -8
  118. package/dist/{Switch-CXrz-M3V.js.map → Switch-CMpXZdLc.js.map} +1 -1
  119. package/dist/{Switch-CeUMwheZ.cjs → Switch-MDrnacFJ.cjs} +16 -19
  120. package/dist/Switch-MDrnacFJ.cjs.map +1 -0
  121. package/dist/SwitchBox/index.cjs +7 -5
  122. package/dist/SwitchBox/index.d.cts +1 -1
  123. package/dist/SwitchBox/index.d.ts +1 -1
  124. package/dist/SwitchBox/index.js +2 -3
  125. package/dist/{SwitchBox-C-aLl2nX.js → SwitchBox-Cg7NPfp_.js} +5 -8
  126. package/dist/SwitchBox-Cg7NPfp_.js.map +1 -0
  127. package/dist/{SwitchBox-mGUPvJE0.cjs → SwitchBox-kp93uE8e.cjs} +21 -24
  128. package/dist/SwitchBox-kp93uE8e.cjs.map +1 -0
  129. package/dist/TextArea/index.cjs +7 -5
  130. package/dist/TextArea/index.d.cts +1 -1
  131. package/dist/TextArea/index.d.ts +1 -1
  132. package/dist/TextArea/index.js +2 -3
  133. package/dist/{TextArea-BYEuk4Ng.cjs → TextArea-B8XYKqFg.cjs} +18 -21
  134. package/dist/TextArea-B8XYKqFg.cjs.map +1 -0
  135. package/dist/{TextArea-BLkVYmHZ.js → TextArea-Bxi2pXvY.js} +6 -9
  136. package/dist/TextArea-Bxi2pXvY.js.map +1 -0
  137. package/dist/helpers/index.cjs +397 -10
  138. package/dist/helpers/index.cjs.map +1 -0
  139. package/dist/helpers/index.d.cts +224 -2
  140. package/dist/helpers/index.d.cts.map +1 -0
  141. package/dist/helpers/index.d.ts +224 -2
  142. package/dist/helpers/index.d.ts.map +1 -0
  143. package/dist/helpers/index.js +387 -2
  144. package/dist/helpers/index.js.map +1 -0
  145. package/dist/hooks/useClientValidation/index.cjs +3 -3
  146. package/dist/hooks/useClientValidation/index.d.cts +1 -1
  147. package/dist/hooks/useClientValidation/index.d.ts +1 -1
  148. package/dist/hooks/useClientValidation/index.js +2 -3
  149. package/dist/hooks/useController/index.cjs +3 -3
  150. package/dist/hooks/useController/index.d.cts +1 -1
  151. package/dist/hooks/useController/index.d.ts +1 -1
  152. package/dist/hooks/useController/index.js +2 -3
  153. package/dist/hooks/useFormContext/index.cjs +8 -3
  154. package/dist/hooks/useFormContext/index.cjs.map +1 -0
  155. package/dist/hooks/useFormContext/index.d.cts +1 -1
  156. package/dist/hooks/useFormContext/index.d.ts +1 -3
  157. package/dist/hooks/useFormContext/index.js +6 -2
  158. package/dist/hooks/useFormContext/index.js.map +1 -0
  159. package/dist/hooks/useInput/index.cjs +8 -8
  160. package/dist/hooks/useInput/index.d.cts +1 -1
  161. package/dist/hooks/useInput/index.d.ts +1 -1
  162. package/dist/hooks/useInput/index.js +2 -3
  163. package/dist/hooks/useInputValueDebounce/index.cjs +92 -2
  164. package/dist/hooks/useInputValueDebounce/index.cjs.map +1 -0
  165. package/dist/hooks/useInputValueDebounce/index.d.cts +1 -1
  166. package/dist/hooks/useInputValueDebounce/index.d.ts +1 -1
  167. package/dist/hooks/useInputValueDebounce/index.js +90 -2
  168. package/dist/hooks/useInputValueDebounce/index.js.map +1 -0
  169. package/dist/hooks/useInputValueTransform/index.cjs +3 -3
  170. package/dist/hooks/useInputValueTransform/index.d.cts +1 -1
  171. package/dist/hooks/useInputValueTransform/index.d.ts +1 -1
  172. package/dist/hooks/useInputValueTransform/index.js +2 -3
  173. package/dist/hooks/useUniformField/index.cjs +135 -2
  174. package/dist/hooks/useUniformField/index.cjs.map +1 -0
  175. package/dist/hooks/useUniformField/index.d.cts +1 -1
  176. package/dist/hooks/useUniformField/index.d.ts +1 -5
  177. package/dist/hooks/useUniformField/index.js +132 -2
  178. package/dist/hooks/useUniformField/index.js.map +1 -0
  179. package/dist/hooks/useUniformFieldArray/index.cjs +83 -2
  180. package/dist/hooks/useUniformFieldArray/index.cjs.map +1 -0
  181. package/dist/hooks/useUniformFieldArray/index.d.cts +1 -1
  182. package/dist/hooks/useUniformFieldArray/index.d.ts +1 -26
  183. package/dist/hooks/useUniformFieldArray/index.js +81 -2
  184. package/dist/hooks/useUniformFieldArray/index.js.map +1 -0
  185. package/dist/hooks/useWatchUserChange/index.cjs +3 -3
  186. package/dist/hooks/useWatchUserChange/index.d.cts +1 -1
  187. package/dist/hooks/useWatchUserChange/index.d.ts +1 -1
  188. package/dist/hooks/useWatchUserChange/index.js +2 -3
  189. package/dist/{index-B0rp5NJy.d.cts → index-1Gzrph8R.d.cts} +35 -36
  190. package/dist/index-1Gzrph8R.d.cts.map +1 -0
  191. package/dist/index-B0Fw1BAy.d.cts +278 -0
  192. package/dist/index-B0Fw1BAy.d.cts.map +1 -0
  193. package/dist/{index-TmijvCD0.d.ts → index-B2tIMFYh.d.cts} +22 -22
  194. package/dist/index-B2tIMFYh.d.cts.map +1 -0
  195. package/dist/{index-ahxY6Q0X.d.cts → index-B6WwxkLx2.d.ts} +3 -3
  196. package/dist/index-B6WwxkLx2.d.ts.map +1 -0
  197. package/dist/{index-BlX_mF6D.d.cts → index-BExpqT81.d.ts} +22 -22
  198. package/dist/index-BExpqT81.d.ts.map +1 -0
  199. package/dist/{index-CZq5eXSP.d.ts → index-BLctuwc0.d.ts} +36 -36
  200. package/dist/index-BLctuwc0.d.ts.map +1 -0
  201. package/dist/{index-ttNINAv3.d.ts → index-BV1VKQdy.d.cts} +3 -3
  202. package/dist/{index-qo0Ta_R3.d.cts.map → index-BV1VKQdy.d.cts.map} +1 -1
  203. package/dist/{index-C1-F9Ga-.d.cts → index-BdYKQ59a.d.cts} +7 -7
  204. package/dist/index-BdYKQ59a.d.cts.map +1 -0
  205. package/dist/{index-CeiIXmAI.d.cts → index-BqWtWLeP.d.cts} +36 -36
  206. package/dist/index-BqWtWLeP.d.cts.map +1 -0
  207. package/dist/{index-Bl1Adhfx.d.ts → index-BwAI1VFS.d.ts} +6 -6
  208. package/dist/index-BwAI1VFS.d.ts.map +1 -0
  209. package/dist/{index-DFzyOxvt.d.cts → index-C-DiLZRu.d.cts} +6 -6
  210. package/dist/index-C-DiLZRu.d.cts.map +1 -0
  211. package/dist/{index-BlJFGN_o.d.ts → index-C6dMrOEm.d.cts} +48 -48
  212. package/dist/index-C6dMrOEm.d.cts.map +1 -0
  213. package/dist/{index-Dty4h2eA.d.ts → index-CE0aQlFw.d.ts} +7 -7
  214. package/dist/index-CE0aQlFw.d.ts.map +1 -0
  215. package/dist/{index-E6etS7_8.d.ts → index-CKJumX37.d.cts} +34 -34
  216. package/dist/index-CKJumX37.d.cts.map +1 -0
  217. package/dist/{index-BrMk3Wee.d.ts → index-CY2Mpaz3.d.cts} +4 -4
  218. package/dist/index-CY2Mpaz3.d.cts.map +1 -0
  219. package/dist/{index-wwmQClW-.d.cts → index-CZJ_lWQ0.d.ts} +21 -21
  220. package/dist/index-CZJ_lWQ0.d.ts.map +1 -0
  221. package/dist/{index-qo0Ta_R3.d.cts → index-Cv4ERj3i.d.ts} +3 -3
  222. package/dist/{index-ttNINAv3.d.ts.map → index-Cv4ERj3i.d.ts.map} +1 -1
  223. package/dist/{index-ByyEP8UR.d.cts → index-D6XwSwTP.d.cts} +6 -6
  224. package/dist/{index-ByyEP8UR.d.cts.map → index-D6XwSwTP.d.cts.map} +1 -1
  225. package/dist/{index-Dr06SNZN.d.cts → index-DD_RPe91.d.ts} +4 -4
  226. package/dist/index-DD_RPe91.d.ts.map +1 -0
  227. package/dist/{index-DLR8z1lG.d.cts → index-DFWSHdua.d.ts} +3 -3
  228. package/dist/{index-CPkTYivq.d.ts.map → index-DFWSHdua.d.ts.map} +1 -1
  229. package/dist/index-DGHBlmnV.d.ts +278 -0
  230. package/dist/index-DGHBlmnV.d.ts.map +1 -0
  231. package/dist/{index-BaxXDaOZ.d.ts → index-DJe_1ZdK.d.ts} +35 -37
  232. package/dist/index-DJe_1ZdK.d.ts.map +1 -0
  233. package/dist/{index-mmk9VKYu.d.ts → index-DZzfeV4O.d.cts} +21 -21
  234. package/dist/index-DZzfeV4O.d.cts.map +1 -0
  235. package/dist/index-DeEmP3Jc.d.cts +1 -0
  236. package/dist/{index--NM5Ctp6.d.ts → index-Dj3NDj0T.d.ts} +4 -4
  237. package/dist/{index--NM5Ctp6.d.ts.map → index-Dj3NDj0T.d.ts.map} +1 -1
  238. package/dist/{index-CPkTYivq.d.ts → index-DkiQkdCW.d.cts} +3 -3
  239. package/dist/{index-DLR8z1lG.d.cts.map → index-DkiQkdCW.d.cts.map} +1 -1
  240. package/dist/{index-CI0AWMsR.d.ts → index-DkxqHE_P2.d.ts} +3 -3
  241. package/dist/{index-B7Xz_OY2.d.cts.map → index-DkxqHE_P2.d.ts.map} +1 -1
  242. package/dist/{index-B7Xz_OY2.d.cts → index-Dld6NP_K.d.cts} +3 -3
  243. package/dist/index-Dld6NP_K.d.cts.map +1 -0
  244. package/dist/{index-BKQc5PQn.d.cts → index-DpNf55K6.d.ts} +34 -34
  245. package/dist/index-DpNf55K6.d.ts.map +1 -0
  246. package/dist/index-DsC0y6kU.d.cts +70 -0
  247. package/dist/index-DsC0y6kU.d.cts.map +1 -0
  248. package/dist/index-DwqOejxR.d.ts +70 -0
  249. package/dist/index-DwqOejxR.d.ts.map +1 -0
  250. package/dist/{index-BNYtqtXt.d.cts → index-NjKV8LJD.d.cts} +4 -4
  251. package/dist/{index-BNYtqtXt.d.cts.map → index-NjKV8LJD.d.cts.map} +1 -1
  252. package/dist/{index-BsCPUK2g.d.cts → index-Yj6VEhqF.d.ts} +48 -48
  253. package/dist/index-Yj6VEhqF.d.ts.map +1 -0
  254. package/dist/{index-DVZCz730.d.ts → index-fgARdsoB.d.ts} +6 -6
  255. package/dist/{index-DVZCz730.d.ts.map → index-fgARdsoB.d.ts.map} +1 -1
  256. package/dist/{index-CMehV9mc.d.ts → index-jCfJAgDc.d.cts} +3 -3
  257. package/dist/index-jCfJAgDc.d.cts.map +1 -0
  258. package/dist/{index--KhDRPu3.d.cts → index-pwXVq8hR.d.cts} +6 -6
  259. package/dist/index-pwXVq8hR.d.cts.map +1 -0
  260. package/dist/index-sQecLSpR.d.cts +1 -0
  261. package/dist/{index-BgyvEfYZ.d.ts → index-wV1E_PkS.d.ts} +6 -6
  262. package/dist/index-wV1E_PkS.d.ts.map +1 -0
  263. package/dist/index.cjs +63 -63
  264. package/dist/index.d.cts +27 -27
  265. package/dist/index.d.ts +27 -29
  266. package/dist/index.js +29 -30
  267. package/dist/partials/FieldCopyTestIdButton/index.cjs +7 -5
  268. package/dist/partials/FieldCopyTestIdButton/index.d.cts +1 -1
  269. package/dist/partials/FieldCopyTestIdButton/index.d.ts +1 -1
  270. package/dist/partials/FieldCopyTestIdButton/index.js +2 -3
  271. package/dist/partials/FieldValidationError/index.cjs +7 -5
  272. package/dist/partials/FieldValidationError/index.d.cts +1 -1
  273. package/dist/partials/FieldValidationError/index.d.ts +1 -1
  274. package/dist/partials/FieldValidationError/index.js +2 -3
  275. package/dist/{useClientValidation-B4xrGBJZ.d.ts → useClientValidation-Bu3mNZpf.d.cts} +3 -3
  276. package/dist/{useClientValidation-B_dYQB5o.d.cts.map → useClientValidation-Bu3mNZpf.d.cts.map} +1 -1
  277. package/dist/{useClientValidation-DksyV18M.js → useClientValidation-Dn_kJkE5.js} +5 -6
  278. package/dist/{useClientValidation-DksyV18M.js.map → useClientValidation-Dn_kJkE5.js.map} +1 -1
  279. package/dist/{useClientValidation-Dnj_wuwf.cjs → useClientValidation-HqsAYK9K.cjs} +16 -17
  280. package/dist/useClientValidation-HqsAYK9K.cjs.map +1 -0
  281. package/dist/{useClientValidation-B_dYQB5o.d.cts → useClientValidation-_8PTmv8i.d.ts} +3 -3
  282. package/dist/{useClientValidation-B4xrGBJZ.d.ts.map → useClientValidation-_8PTmv8i.d.ts.map} +1 -1
  283. package/dist/{useController-NjuthTyL.js → useController-B-6PzFna.js} +4 -5
  284. package/dist/{useController-NjuthTyL.js.map → useController-B-6PzFna.js.map} +1 -1
  285. package/dist/{useController-D8MEXnmB.d.cts → useController-CNiqy_2D.d.cts} +1 -1
  286. package/dist/{useController-D8MEXnmB.d.cts.map → useController-CNiqy_2D.d.cts.map} +1 -1
  287. package/dist/{useController-CHOpoCoz.d.ts → useController-Cc0UNQMm.d.ts} +1 -1
  288. package/dist/{useController-CHOpoCoz.d.ts.map → useController-Cc0UNQMm.d.ts.map} +1 -1
  289. package/dist/{useController-B_SSp5Z5.cjs → useController-D3a0qufz.cjs} +11 -12
  290. package/dist/{useController-B_SSp5Z5.cjs.map → useController-D3a0qufz.cjs.map} +1 -1
  291. package/dist/{useFormContext-vdeeDsAs.cjs → useFormContext-BQeGmV8j.cjs} +20 -21
  292. package/dist/{useFormContext-vdeeDsAs.cjs.map → useFormContext-BQeGmV8j.cjs.map} +1 -1
  293. package/dist/{useFormContext-Di67HIf7.js → useFormContext-Bzpyonu6.js} +5 -6
  294. package/dist/{useFormContext-Di67HIf7.js.map → useFormContext-Bzpyonu6.js.map} +1 -1
  295. package/dist/{useFormContext-Dh97YG47.d.cts → useFormContext-C06aufHt.d.cts} +24 -24
  296. package/dist/useFormContext-C06aufHt.d.cts.map +1 -0
  297. package/dist/{useFormContext-C6OOtqZ5.d.ts → useFormContext-CHA8GnKp.d.ts} +24 -24
  298. package/dist/useFormContext-CHA8GnKp.d.ts.map +1 -0
  299. package/dist/{useInput-BWzvIUpW.js → useInput-CVm3tP78.js} +1 -2
  300. package/dist/{useInputValueDebounce-ZLyAmuXV.d.cts → useInputValueDebounce-puGRVJ6t.d.cts} +1 -1
  301. package/dist/{useInputValueDebounce-ZLyAmuXV.d.cts.map → useInputValueDebounce-puGRVJ6t.d.cts.map} +1 -1
  302. package/dist/{useInputValueDebounce-Dhlv1NUY.d.ts → useInputValueDebounce-sFOlecIQ.d.ts} +1 -1
  303. package/dist/{useInputValueDebounce-Dhlv1NUY.d.ts.map → useInputValueDebounce-sFOlecIQ.d.ts.map} +1 -1
  304. package/dist/{useInputValueTransform-CNCBU7a9.d.cts → useInputValueTransform-BwAfw8Xb.d.cts} +1 -1
  305. package/dist/{useInputValueTransform-CNCBU7a9.d.cts.map → useInputValueTransform-BwAfw8Xb.d.cts.map} +1 -1
  306. package/dist/{useInputValueTransform-C-fmz3ke.js → useInputValueTransform-CXdmtc0Q.js} +2 -3
  307. package/dist/{useInputValueTransform-C-fmz3ke.js.map → useInputValueTransform-CXdmtc0Q.js.map} +1 -1
  308. package/dist/{useInputValueTransform-tsMNM7g_.d.ts → useInputValueTransform-CdoaxNyD.d.ts} +1 -1
  309. package/dist/{useInputValueTransform-tsMNM7g_.d.ts.map → useInputValueTransform-CdoaxNyD.d.ts.map} +1 -1
  310. package/dist/{useInputValueTransform-BBRvvhDe.cjs → useInputValueTransform-Cl6Xeso7.cjs} +8 -9
  311. package/dist/{useInputValueTransform-BBRvvhDe.cjs.map → useInputValueTransform-Cl6Xeso7.cjs.map} +1 -1
  312. package/dist/{useUniformField-BDKjYBKu.d.ts → useUniformField-BTBS1Kv-.d.ts} +5 -5
  313. package/dist/{useUniformField-BDKjYBKu.d.ts.map → useUniformField-BTBS1Kv-.d.ts.map} +1 -1
  314. package/dist/{useUniformField-Bd_oDkYE.d.cts → useUniformField-j22kM31n.d.cts} +5 -5
  315. package/dist/{useUniformField-Bd_oDkYE.d.cts.map → useUniformField-j22kM31n.d.cts.map} +1 -1
  316. package/dist/{useUniformFieldArray-CWiaXKO6.d.cts → useUniformFieldArray-CDEagafl.d.cts} +18 -18
  317. package/dist/useUniformFieldArray-CDEagafl.d.cts.map +1 -0
  318. package/dist/{useUniformFieldArray-lV3Nbum2.d.ts → useUniformFieldArray-CMHoo4o3.d.ts} +18 -18
  319. package/dist/useUniformFieldArray-CMHoo4o3.d.ts.map +1 -0
  320. package/dist/{useWatchUserChange-BnnrFjyq.d.ts → useWatchUserChange-CH4x16_r.d.ts} +1 -1
  321. package/dist/{useWatchUserChange-BnnrFjyq.d.ts.map → useWatchUserChange-CH4x16_r.d.ts.map} +1 -1
  322. package/dist/{useWatchUserChange-Dj9Imxfi.js → useWatchUserChange-CLgLc5W4.js} +3 -4
  323. package/dist/{useWatchUserChange-Dj9Imxfi.js.map → useWatchUserChange-CLgLc5W4.js.map} +1 -1
  324. package/dist/{useWatchUserChange-DalJOKBC.d.cts → useWatchUserChange-CZu_ZZ38.d.cts} +1 -1
  325. package/dist/{useWatchUserChange-DalJOKBC.d.cts.map → useWatchUserChange-CZu_ZZ38.d.cts.map} +1 -1
  326. package/dist/{useWatchUserChange-C1Kluht2.cjs → useWatchUserChange-DkZ0Vqv3.cjs} +9 -10
  327. package/dist/{useWatchUserChange-C1Kluht2.cjs.map → useWatchUserChange-DkZ0Vqv3.cjs.map} +1 -1
  328. package/package.json +71 -67
  329. package/dist/Checkboxes-BGrK_mwQ.js.map +0 -1
  330. package/dist/Checkboxes-Dk7yyRVR.cjs.map +0 -1
  331. package/dist/FieldArray-Bs2ViU8m.js.map +0 -1
  332. package/dist/FieldArray-C6RHZcKa.cjs.map +0 -1
  333. package/dist/FieldCard-16yCF83m.js.map +0 -1
  334. package/dist/FieldCard-BxK_IJOR.cjs.map +0 -1
  335. package/dist/FieldCopyTestIdButton-4uupFq1U.cjs.map +0 -1
  336. package/dist/FieldCopyTestIdButton-BoEdlzLs.js.map +0 -1
  337. package/dist/FieldValidationError-Br6iopZj.cjs.map +0 -1
  338. package/dist/FieldValidationError-XQaViV52.js.map +0 -1
  339. package/dist/Form--SsSvsxl.cjs.map +0 -1
  340. package/dist/Form-ccsEssie.js.map +0 -1
  341. package/dist/Grid-BaqBa1ku.js.map +0 -1
  342. package/dist/Grid-D5Yf0nD_.cjs.map +0 -1
  343. package/dist/Input-B3p_4ntD.cjs.map +0 -1
  344. package/dist/RadioBoxes-C3Cwrn2I.js.map +0 -1
  345. package/dist/RadioBoxes-xRvNe5U8.cjs.map +0 -1
  346. package/dist/RadioTabs-BaHvYcd-.cjs.map +0 -1
  347. package/dist/RadioTabs-DfOGIsEf.js.map +0 -1
  348. package/dist/Radios-BfA3uL35.cjs.map +0 -1
  349. package/dist/Radios-xM-09vB5.js.map +0 -1
  350. package/dist/Select-DH_YaruM.cjs.map +0 -1
  351. package/dist/Select-DlEUzYl6.js.map +0 -1
  352. package/dist/Slider-C-dMrJZ6.cjs.map +0 -1
  353. package/dist/SubmitButton-Bh1RN0F1.js.map +0 -1
  354. package/dist/SubmitButton-CJ6s1mZr.cjs.map +0 -1
  355. package/dist/Switch-CeUMwheZ.cjs.map +0 -1
  356. package/dist/SwitchBox-C-aLl2nX.js.map +0 -1
  357. package/dist/SwitchBox-mGUPvJE0.cjs.map +0 -1
  358. package/dist/TextArea-BLkVYmHZ.js.map +0 -1
  359. package/dist/TextArea-BYEuk4Ng.cjs.map +0 -1
  360. package/dist/helpers-33jajRcN.js +0 -390
  361. package/dist/helpers-33jajRcN.js.map +0 -1
  362. package/dist/helpers-Bd_QpqXg.cjs +0 -444
  363. package/dist/helpers-Bd_QpqXg.cjs.map +0 -1
  364. package/dist/index--KhDRPu3.d.cts.map +0 -1
  365. package/dist/index-B0rp5NJy.d.cts.map +0 -1
  366. package/dist/index-BBw9RSKy.d.ts +0 -278
  367. package/dist/index-BBw9RSKy.d.ts.map +0 -1
  368. package/dist/index-BKQc5PQn.d.cts.map +0 -1
  369. package/dist/index-BLgXFM85.d.cts +0 -224
  370. package/dist/index-BLgXFM85.d.cts.map +0 -1
  371. package/dist/index-BaxXDaOZ.d.ts.map +0 -1
  372. package/dist/index-BgyvEfYZ.d.ts.map +0 -1
  373. package/dist/index-BjHnNRSC.d.cts +0 -278
  374. package/dist/index-BjHnNRSC.d.cts.map +0 -1
  375. package/dist/index-Bl1Adhfx.d.ts.map +0 -1
  376. package/dist/index-BlJFGN_o.d.ts.map +0 -1
  377. package/dist/index-BlX_mF6D.d.cts.map +0 -1
  378. package/dist/index-BrMk3Wee.d.ts.map +0 -1
  379. package/dist/index-BsCPUK2g.d.cts.map +0 -1
  380. package/dist/index-C1-F9Ga-.d.cts.map +0 -1
  381. package/dist/index-CI0AWMsR.d.ts.map +0 -1
  382. package/dist/index-CMehV9mc.d.ts.map +0 -1
  383. package/dist/index-CZq5eXSP.d.ts.map +0 -1
  384. package/dist/index-CeiIXmAI.d.cts.map +0 -1
  385. package/dist/index-DFzyOxvt.d.cts.map +0 -1
  386. package/dist/index-Dr06SNZN.d.cts.map +0 -1
  387. package/dist/index-Dty4h2eA.d.ts.map +0 -1
  388. package/dist/index-E6etS7_8.d.ts.map +0 -1
  389. package/dist/index-TmijvCD0.d.ts.map +0 -1
  390. package/dist/index-ahxY6Q0X.d.cts.map +0 -1
  391. package/dist/index-mmk9VKYu.d.ts.map +0 -1
  392. package/dist/index-w8E8Koak.d.ts +0 -224
  393. package/dist/index-w8E8Koak.d.ts.map +0 -1
  394. package/dist/index-wwmQClW-.d.cts.map +0 -1
  395. package/dist/useClientValidation-Dnj_wuwf.cjs.map +0 -1
  396. package/dist/useFormContext-C6OOtqZ5.d.ts.map +0 -1
  397. package/dist/useFormContext-CLymm_7t.js +0 -6
  398. package/dist/useFormContext-CLymm_7t.js.map +0 -1
  399. package/dist/useFormContext-CkeSOfWD.cjs +0 -6
  400. package/dist/useFormContext-CkeSOfWD.cjs.map +0 -1
  401. package/dist/useFormContext-Dh97YG47.d.cts.map +0 -1
  402. package/dist/useInputValueDebounce-CRaM7HEM.cjs +0 -99
  403. package/dist/useInputValueDebounce-CRaM7HEM.cjs.map +0 -1
  404. package/dist/useInputValueDebounce-DJO5uzLb.js +0 -93
  405. package/dist/useInputValueDebounce-DJO5uzLb.js.map +0 -1
  406. package/dist/useUniformField-6c4OCAfb.cjs +0 -142
  407. package/dist/useUniformField-6c4OCAfb.cjs.map +0 -1
  408. package/dist/useUniformField-C-Xyu-8v.js +0 -135
  409. package/dist/useUniformField-C-Xyu-8v.js.map +0 -1
  410. package/dist/useUniformFieldArray-BKvA0FQW.js +0 -84
  411. package/dist/useUniformFieldArray-BKvA0FQW.js.map +0 -1
  412. package/dist/useUniformFieldArray-CRCbV1J2.cjs +0 -90
  413. package/dist/useUniformFieldArray-CRCbV1J2.cjs.map +0 -1
  414. package/dist/useUniformFieldArray-CWiaXKO6.d.cts.map +0 -1
  415. package/dist/useUniformFieldArray-lV3Nbum2.d.ts.map +0 -1
  416. /package/dist/{index-BMCcWGYS.d.ts → index--okzibnx.d.ts} +0 -0
  417. /package/dist/{index-C8k_zgEm.d.cts → index-B2TCFhpj.d.ts} +0 -0
  418. /package/dist/{index-DDRpa5CJ.d.cts → index-BtBZHVmz.d.cts} +0 -0
  419. /package/dist/{index-GGHuYh77.d.ts → index-CI4LJief.d.ts} +0 -0
  420. /package/dist/{useInput-BVZvtfNg.d.ts → useInput-93TCCrkB.d.cts} +0 -0
  421. /package/dist/{useInput-CKmKH9Ij.d.cts → useInput-C_fY--wx.d.ts} +0 -0
@@ -1,3 +1,133 @@
1
- import { t as useUniformField } from "../../useUniformField-C-Xyu-8v.js";
1
+ import { isValueEmpty } from "../../helpers/index.js";
2
+ import { n as FieldCopyTestIdButton } from "../../FieldCopyTestIdButton-Dpmo0uBV.js";
3
+ import { n as FieldValidationError } from "../../FieldValidationError-ktTyyyip.js";
4
+ import { t as useController } from "../../useController-B-6PzFna.js";
5
+ import { n as useFormContext } from "../../useFormContext-Bzpyonu6.js";
6
+ import { t as useInput } from "../../useInput-CVm3tP78.js";
7
+ import { t as useInputValueTransform } from "../../useInputValueTransform-CXdmtc0Q.js";
8
+ import "react";
9
+ import { useDebounce } from "@fuf-stack/pixels";
10
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
11
+ //#region src/hooks/useUniformField/useUniformField.tsx
12
+ /**
13
+ * Combines frequently used form field logic into a single hook.
14
+ *
15
+ * Provides:
16
+ * - Enhanced form context (validation-aware state, `testId`, value transforms)
17
+ * - Controller field with nullish conversion handling
18
+ * - Value transformation via `transform` prop:
19
+ * • Allows disentangled display and form values (e.g., string ↔ object, boolean ↔ array)
20
+ * • Automatically applies `toDisplayValue` to field value for components
21
+ * • Automatically applies `toFormValue` to display value when onChange is called
22
+ * • Works with `type` prop for automatic number/string conversion
23
+ * • Examples: storing objects while displaying strings, storing booleans as arrays, enriching values with metadata
24
+ * - Debounced `invalid` state with smart timing:
25
+ * • `true` (field becomes invalid): applies immediately so errors show right away
26
+ * • `false` (field becomes valid): delayed 200ms to allow smooth exit animations
27
+ * • Respects `prefers-reduced-motion` by skipping delays when user prefers reduced motion
28
+ * - Smart `invalid` visibility (via `showInvalid`):
29
+ * • Shows errors when field is dirty OR touched OR form has been submitted
30
+ * • Prevents showing errors on pristine/untouched fields for better UX
31
+ * • Works well for all field types (text inputs, checkboxes, radios, arrays)
32
+ * - Prebuilt `errorMessage` React node using `FieldValidationError`
33
+ * - Computed `label` node which appends a `FieldCopyTestIdButton` in
34
+ * `debug-testids` mode
35
+ * - `defaultValue` for uncontrolled defaults and all usual field handlers
36
+ * - Access to form utilities: `control`, `getValues`, `resetField`
37
+ * - Presentation helpers: `getLabelProps`, `getErrorMessageProps`,
38
+ * `getHelperWrapperProps` for consistent wiring to underlying UI components
39
+ */
40
+ const useUniformField = (params) => {
41
+ const { name, ariaLabel: customAriaLabel, disabled = false, testId: explicitTestId, label, type, transform } = params;
42
+ const { control, debugMode, formState: { submitCount }, getFieldState, getValues, resetField } = useFormContext();
43
+ const { error, invalid: rawInvalid, isTouched, required, testId } = getFieldState(name, explicitTestId);
44
+ const { field } = useController({
45
+ control,
46
+ disabled,
47
+ name
48
+ });
49
+ const { onChange: fieldOnChange, value: fieldValue, disabled: isDisabled, onBlur, ref } = field;
50
+ const { toDisplayValue, toFormValue } = useInputValueTransform({
51
+ type,
52
+ transform
53
+ });
54
+ const transformedValue = toDisplayValue(fieldValue);
55
+ const transformedOnChange = (eventOrValue) => {
56
+ fieldOnChange(toFormValue(eventOrValue?.target?.value ?? eventOrValue));
57
+ };
58
+ const defaultValue = getValues()?.[name];
59
+ /**
60
+ * Determine when to show the invalid state to the user.
61
+ *
62
+ * Show errors when the field is invalid AND any of these conditions are met:
63
+ * - Field has a value (show validation errors like format/length while typing)
64
+ * - Field is touched (focused and blurred) - good for text inputs
65
+ * - Form has been submitted - shows all errors after submit attempt
66
+ *
67
+ * Note: We intentionally don't use isDirty because:
68
+ * - Newly added array elements are marked "dirty" by RHF, causing immediate errors
69
+ * - Field Cards with empty initial values show errors immediately
70
+ * - hasValue + isTouched covers the same use cases more reliably
71
+ *
72
+ * This prevents showing errors on pristine/untouched/empty fields for better UX.
73
+ * Examples:
74
+ * - Text input: User loads form with empty required field → no error shown yet
75
+ * - Text input: User types invalid content → error shows immediately (has value)
76
+ * - Text input: User focuses and blurs without typing → error shows (via isTouched)
77
+ * - Checkbox/radio: User selects option → error shows immediately (has value)
78
+ * - Field array: User adds element → no error yet; after blur → error shows
79
+ * - Any field: User submits form → all errors show (via submitCount)
80
+ *
81
+ * The entire condition is debounced to prevent flickering and allow smooth animations.
82
+ */
83
+ const hasValue = !isValueEmpty(fieldValue);
84
+ const invalid = useDebounce(rawInvalid && (hasValue || isTouched || submitCount > 0), 200);
85
+ const showTestIdCopyButton = debugMode === "debug-testids";
86
+ const labelNode = !!label || showTestIdCopyButton ? /* @__PURE__ */ jsxs(Fragment, { children: [label !== false ? label : null, showTestIdCopyButton ? /* @__PURE__ */ jsx(FieldCopyTestIdButton, { testId }) : null] }) : null;
87
+ const errorMessage = /* @__PURE__ */ jsx(FieldValidationError, {
88
+ error,
89
+ testId
90
+ });
91
+ const { getErrorMessageProps, getLabelProps, getHelperWrapperProps } = useInput({
92
+ ref,
93
+ classNames: { helperWrapper: "p-0" },
94
+ errorMessage: JSON.stringify(error),
95
+ isInvalid: invalid,
96
+ isRequired: required,
97
+ label,
98
+ labelPlacement: "outside"
99
+ });
100
+ return {
101
+ ariaLabel: customAriaLabel ?? (typeof label === "string" ? label : name),
102
+ control,
103
+ debugMode,
104
+ defaultValue,
105
+ disabled: isDisabled,
106
+ error,
107
+ errorMessage,
108
+ field: {
109
+ ...field,
110
+ value: transformedValue,
111
+ onChange: transformedOnChange
112
+ },
113
+ getErrorMessageProps,
114
+ getHelperWrapperProps,
115
+ getLabelProps,
116
+ getValues,
117
+ invalid,
118
+ label: labelNode,
119
+ onBlur,
120
+ onChange: transformedOnChange,
121
+ ref,
122
+ required,
123
+ resetField,
124
+ testId
125
+ };
126
+ };
127
+ //#endregion
128
+ //#region src/hooks/useUniformField/index.ts
129
+ /* v8 ignore stop */
130
+ //#endregion
131
+ export { useUniformField };
2
132
 
3
- export { useUniformField };
133
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../../src/hooks/useUniformField/useUniformField.tsx","../../../src/hooks/useUniformField/index.ts"],"sourcesContent":["import type { ReactNode } from 'react';\nimport type { FieldError, FieldValues, Path } from 'react-hook-form';\nimport type { InputValueTransform } from '../useInputValueTransform/useInputValueTransform';\n\nimport React from 'react';\n\nimport { useDebounce } from '@fuf-stack/pixels';\n\nimport { isValueEmpty } from '../../helpers';\nimport { FieldCopyTestIdButton } from '../../partials/FieldCopyTestIdButton';\nimport { FieldValidationError } from '../../partials/FieldValidationError';\nimport { useController } from '../useController/useController';\nimport { useFormContext } from '../useFormContext/useFormContext';\nimport { useInput } from '../useInput/useInput';\nimport { useInputValueTransform } from '../useInputValueTransform/useInputValueTransform';\n\nexport interface UseUniformFieldParams<\n TFieldValues extends FieldValues = FieldValues,\n TDisplay = unknown,\n> {\n /** Form field name */\n name: Path<TFieldValues> & string;\n /** Custom aria-label for accessibility. If not provided, falls back to field name when no visible label exists */\n ariaLabel?: string;\n /** Disable the field */\n disabled?: boolean;\n /** Optional label content */\n label?: ReactNode;\n /** Optional explicit test id used to build stable test ids */\n testId?: string;\n /** Optional value transformation between form and display values */\n transform?: InputValueTransform<TDisplay>;\n /** Input type for special number handling */\n type?: 'text' | 'number' | 'password';\n}\n\nexport interface UseUniformFieldReturn<\n TFieldValues extends FieldValues = FieldValues,\n> {\n /** Computed aria-label fallback (field name) when no visible label exists. Components can override based on their accessibility needs (e.g., if placeholder provides sufficient context) */\n ariaLabel: string | undefined;\n /** react-hook-form control instance for advanced integrations */\n control: ReturnType<typeof useFormContext<TFieldValues>>['control'];\n /** Debug mode from Uniform provider */\n debugMode: ReturnType<typeof useFormContext<TFieldValues>>['debugMode'];\n /** Current value used to initialize uncontrolled components */\n defaultValue: unknown;\n /** Whether the field is currently disabled (from RHF) */\n disabled: boolean | undefined;\n /** Validation error(s) for the field */\n error: FieldError[] | undefined;\n /** Pre-built errorMessage node to plug into components */\n errorMessage: ReactNode | null;\n /** RHF controller field with transformed value/onChange (use this for simple components) */\n field: ReturnType<typeof useController<TFieldValues>>['field'];\n /** Helper to spread standardized error message props to underlying components */\n getErrorMessageProps: ReturnType<typeof useInput>['getErrorMessageProps'];\n /** Helper to spread standardized helper wrapper props (for spacing/animation) */\n getHelperWrapperProps: ReturnType<typeof useInput>['getHelperWrapperProps'];\n /** Helper to spread standardized label props to underlying components */\n getLabelProps: ReturnType<typeof useInput>['getLabelProps'];\n /** Access current form values (converted to validation-friendly format) */\n getValues: ReturnType<typeof useFormContext<TFieldValues>>['getValues'];\n /** Whether the field should show invalid state (debounced for smooth animations). True when field is invalid AND (dirty OR touched OR submitted) */\n invalid: boolean;\n /** Computed label node including optional test id copy button */\n label: ReactNode | null;\n /** onBlur handler from controller */\n onBlur: ReturnType<typeof useController<TFieldValues>>['field']['onBlur'];\n /** onChange handler from controller (with transform applied) */\n onChange: ReturnType<typeof useController<TFieldValues>>['field']['onChange'];\n /** Ref to forward to underlying control */\n ref: ReturnType<typeof useController<TFieldValues>>['field']['ref'];\n /** Whether the field is required according to validation schema */\n required: boolean;\n /** Reset a specific field in the form */\n resetField: ReturnType<typeof useFormContext<TFieldValues>>['resetField'];\n /** Generated HTML data-testid for the field */\n testId: string;\n}\n\n/**\n * Combines frequently used form field logic into a single hook.\n *\n * Provides:\n * - Enhanced form context (validation-aware state, `testId`, value transforms)\n * - Controller field with nullish conversion handling\n * - Value transformation via `transform` prop:\n * • Allows disentangled display and form values (e.g., string ↔ object, boolean ↔ array)\n * • Automatically applies `toDisplayValue` to field value for components\n * • Automatically applies `toFormValue` to display value when onChange is called\n * • Works with `type` prop for automatic number/string conversion\n * • Examples: storing objects while displaying strings, storing booleans as arrays, enriching values with metadata\n * - Debounced `invalid` state with smart timing:\n * • `true` (field becomes invalid): applies immediately so errors show right away\n * • `false` (field becomes valid): delayed 200ms to allow smooth exit animations\n * • Respects `prefers-reduced-motion` by skipping delays when user prefers reduced motion\n * - Smart `invalid` visibility (via `showInvalid`):\n * • Shows errors when field is dirty OR touched OR form has been submitted\n * • Prevents showing errors on pristine/untouched fields for better UX\n * • Works well for all field types (text inputs, checkboxes, radios, arrays)\n * - Prebuilt `errorMessage` React node using `FieldValidationError`\n * - Computed `label` node which appends a `FieldCopyTestIdButton` in\n * `debug-testids` mode\n * - `defaultValue` for uncontrolled defaults and all usual field handlers\n * - Access to form utilities: `control`, `getValues`, `resetField`\n * - Presentation helpers: `getLabelProps`, `getErrorMessageProps`,\n * `getHelperWrapperProps` for consistent wiring to underlying UI components\n */\nexport const useUniformField = <\n TFieldValues extends FieldValues = FieldValues,\n TDisplay = unknown,\n>(\n params: UseUniformFieldParams<TFieldValues, TDisplay>,\n): UseUniformFieldReturn<TFieldValues> => {\n const {\n name,\n ariaLabel: customAriaLabel,\n disabled = false,\n testId: explicitTestId,\n label,\n type,\n transform,\n } = params;\n\n const {\n control,\n debugMode,\n formState: { submitCount },\n getFieldState,\n getValues,\n resetField,\n } = useFormContext<TFieldValues>();\n\n const {\n error,\n invalid: rawInvalid,\n isTouched,\n required,\n testId,\n } = getFieldState(name, explicitTestId);\n\n const { field } = useController<TFieldValues>({\n control,\n disabled,\n name,\n });\n const {\n onChange: fieldOnChange,\n value: fieldValue,\n disabled: isDisabled,\n onBlur,\n ref,\n } = field;\n\n // Get transform utilities (but don't apply them automatically)\n // Components can choose how to use them (directly or via useInputValueDebounce)\n const { toDisplayValue, toFormValue } = useInputValueTransform<TDisplay>({\n type,\n transform,\n });\n\n // For components without special needs: apply transform to value and onChange\n const transformedValue = toDisplayValue(fieldValue);\n const transformedOnChange = (eventOrValue: TDisplay | React.ChangeEvent) => {\n // Extract value from event or use value directly\n const displayValue =\n (eventOrValue as React.ChangeEvent<HTMLInputElement>)?.target?.value ??\n eventOrValue;\n const formValue = toFormValue(displayValue as TDisplay);\n fieldOnChange(formValue as typeof fieldValue);\n };\n\n const defaultValue = (getValues() as Record<string, unknown>)?.[\n name as string\n ];\n\n /**\n * Determine when to show the invalid state to the user.\n *\n * Show errors when the field is invalid AND any of these conditions are met:\n * - Field has a value (show validation errors like format/length while typing)\n * - Field is touched (focused and blurred) - good for text inputs\n * - Form has been submitted - shows all errors after submit attempt\n *\n * Note: We intentionally don't use isDirty because:\n * - Newly added array elements are marked \"dirty\" by RHF, causing immediate errors\n * - Field Cards with empty initial values show errors immediately\n * - hasValue + isTouched covers the same use cases more reliably\n *\n * This prevents showing errors on pristine/untouched/empty fields for better UX.\n * Examples:\n * - Text input: User loads form with empty required field → no error shown yet\n * - Text input: User types invalid content → error shows immediately (has value)\n * - Text input: User focuses and blurs without typing → error shows (via isTouched)\n * - Checkbox/radio: User selects option → error shows immediately (has value)\n * - Field array: User adds element → no error yet; after blur → error shows\n * - Any field: User submits form → all errors show (via submitCount)\n *\n * The entire condition is debounced to prevent flickering and allow smooth animations.\n */\n\n // isValueEmpty handles marker strings, flat array wrappers, empty arrays, and empty objects\n const hasValue = !isValueEmpty(fieldValue);\n const showInvalid = rawInvalid && (hasValue || isTouched || submitCount > 0);\n // Debounce to prevent flickering during rapid state changes\n const invalid = useDebounce(showInvalid, 200);\n\n // Build a label node that:\n // - shows the provided label (unless explicitly set to false)\n // - appends a copy-to-clipboard button for the test id in `debug-testids` mode\n // Consumers can pass this directly to component `label` props\n const showTestIdCopyButton = debugMode === 'debug-testids';\n const labelNode: ReactNode | null =\n !!label || showTestIdCopyButton ? (\n <>\n {label !== false ? label : null}\n {showTestIdCopyButton ? (\n <FieldCopyTestIdButton testId={testId} />\n ) : null}\n </>\n ) : null;\n\n // Ready-to-render error message; consumers can drop this into their\n // component `errorMessage` prop without repeating mapping/markup\n const errorMessage = <FieldValidationError error={error} testId={testId} />;\n\n // Generate standardized props for label, helper wrapper and error message\n // so consumers can spread them directly into UI components (e.g. HeroUI),\n // keeping animations/spacing consistent across fields\n const { getErrorMessageProps, getLabelProps, getHelperWrapperProps } =\n useInput({\n ref,\n classNames: {\n // set padding to 0 for error message exit animation\n helperWrapper: 'p-0',\n },\n errorMessage: JSON.stringify(error),\n isInvalid: invalid,\n isRequired: required,\n label,\n labelPlacement: 'outside',\n });\n\n // Compute aria-label: prefer custom prop, then use string label if available, otherwise field name\n // Components can further override this based on their specific accessibility needs\n // (e.g., Input/TextArea may skip this if they have a meaningful placeholder)\n const ariaLabel =\n customAriaLabel ?? (typeof label === 'string' ? label : name);\n\n return {\n ariaLabel,\n control,\n debugMode,\n defaultValue,\n disabled: isDisabled,\n error,\n errorMessage,\n field: {\n ...field,\n value: transformedValue as typeof field.value,\n onChange: transformedOnChange as typeof field.onChange,\n },\n getErrorMessageProps,\n getHelperWrapperProps,\n getLabelProps,\n getValues,\n invalid,\n label: labelNode,\n onBlur,\n onChange: transformedOnChange as typeof field.onChange,\n ref,\n required,\n resetField,\n testId,\n };\n};\n","/* v8 ignore start */\n\nexport * from './useUniformField';\n\n/* v8 ignore stop */\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6GA,MAAa,mBAIX,WACwC;CACxC,MAAM,EACJ,MACA,WAAW,iBACX,WAAW,OACX,QAAQ,gBACR,OACA,MACA,cACE;CAEJ,MAAM,EACJ,SACA,WACA,WAAW,EAAE,eACb,eACA,WACA,eACE,gBAA8B;CAElC,MAAM,EACJ,OACA,SAAS,YACT,WACA,UACA,WACE,cAAc,MAAM,eAAe;CAEvC,MAAM,EAAE,UAAU,cAA4B;EAC5C;EACA;EACA;EACD,CAAC;CACF,MAAM,EACJ,UAAU,eACV,OAAO,YACP,UAAU,YACV,QACA,QACE;CAIJ,MAAM,EAAE,gBAAgB,gBAAgB,uBAAiC;EACvE;EACA;EACD,CAAC;CAGF,MAAM,mBAAmB,eAAe,WAAW;CACnD,MAAM,uBAAuB,iBAA+C;AAM1E,gBADkB,YAFf,cAAsD,QAAQ,SAC/D,aACqD,CACV;;CAG/C,MAAM,eAAgB,WAAW,GAC/B;;;;;;;;;;;;;;;;;;;;;;;;;CA6BF,MAAM,WAAW,CAAC,aAAa,WAAW;CAG1C,MAAM,UAAU,YAFI,eAAe,YAAY,aAAa,cAAc,IAEjC,IAAI;CAM7C,MAAM,uBAAuB,cAAc;CAC3C,MAAM,YACJ,CAAC,CAAC,SAAS,uBACT,qBAAA,UAAA,EAAA,UAAA,CACG,UAAU,QAAQ,QAAQ,MAC1B,uBACC,oBAAC,uBAAD,EAA+B,QAAU,CAAA,GACvC,KACH,EAAA,CAAA,GACD;CAIN,MAAM,eAAe,oBAAC,sBAAD;EAA6B;EAAe;EAAU,CAAA;CAK3E,MAAM,EAAE,sBAAsB,eAAe,0BAC3C,SAAS;EACP;EACA,YAAY,EAEV,eAAe,OAChB;EACD,cAAc,KAAK,UAAU,MAAM;EACnC,WAAW;EACX,YAAY;EACZ;EACA,gBAAgB;EACjB,CAAC;AAQJ,QAAO;EACL,WAHA,oBAAoB,OAAO,UAAU,WAAW,QAAQ;EAIxD;EACA;EACA;EACA,UAAU;EACV;EACA;EACA,OAAO;GACL,GAAG;GACH,OAAO;GACP,UAAU;GACX;EACD;EACA;EACA;EACA;EACA;EACA,OAAO;EACP;EACA,UAAU;EACV;EACA;EACA;EACA;EACD"}
@@ -1,3 +1,84 @@
1
- const require_useUniformFieldArray = require('../../useUniformFieldArray-CRCbV1J2.cjs');
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
+ require("../../FormContext-3GzWxXSS.cjs");
3
+ const require_helpers_index = require("../../helpers/index.cjs");
4
+ const require_useFormContext = require("../../useFormContext-BQeGmV8j.cjs");
5
+ const require_hooks_useUniformField_index = require("../useUniformField/index.cjs");
6
+ let react = require("react");
7
+ let _fuf_stack_pixel_motion = require("@fuf-stack/pixel-motion");
8
+ let react_hook_form = require("react-hook-form");
9
+ //#region src/hooks/useUniformFieldArray/useUniformFieldArray.ts
10
+ /**
11
+ * Enhanced useFieldArray hook with initialization and animation logic.
12
+ * Based on React Hook Form's useFieldArray with additional features:
13
+ * - Automatic initialization when lastElementNotRemovable is set
14
+ * - Animation control (disabled during initialization)
15
+ * - Support for flat arrays (arrays of primitives)
16
+ *
17
+ * Note: Automatic validation triggering on length change is disabled to prevent
18
+ * triggering form-wide validation. Array validation still runs on form submission.
19
+ *
20
+ * @see https://react-hook-form.com/docs/usefieldarray
21
+ */
22
+ const useUniformFieldArray = ({ name, flat = false, elementInitialValue: _elementInitialValue = null, lastElementNotRemovable = false, disabled, testId: explicitTestId, label }) => {
23
+ const uniformField = require_hooks_useUniformField_index.useUniformField({
24
+ name,
25
+ disabled,
26
+ testId: explicitTestId,
27
+ label
28
+ });
29
+ const { control } = uniformField;
30
+ const { fields, append, remove, insert, move } = (0, react_hook_form.useFieldArray)({
31
+ control,
32
+ name
33
+ });
34
+ const { trigger, setValue } = require_useFormContext.useFormContext();
35
+ const needsInitialize = (0, react.useMemo)(() => {
36
+ return lastElementNotRemovable && fields.length === 0;
37
+ }, [lastElementNotRemovable, fields.length]);
38
+ const hasInitialized = (0, react.useRef)(!needsInitialize);
39
+ (0, react.useEffect)(() => {
40
+ if (needsInitialize) hasInitialized.current = false;
41
+ }, [needsInitialize]);
42
+ (0, react.useEffect)(() => {
43
+ if (hasInitialized.current) setTimeout(() => {
44
+ trigger(name);
45
+ }, 200);
46
+ }, [fields.length]);
47
+ const [disableAnimation, setDisableAnimation] = (0, react.useState)(true);
48
+ const prefersReducedMotion = (0, _fuf_stack_pixel_motion.useReducedMotion)();
49
+ (0, react.useEffect)(() => {
50
+ if (hasInitialized.current) setDisableAnimation(!!prefersReducedMotion);
51
+ }, [prefersReducedMotion]);
52
+ const elementInitialValue = (0, react.useMemo)(() => {
53
+ return flat ? { [require_helpers_index.flatArrayKey]: _elementInitialValue ?? null } : _elementInitialValue ?? {};
54
+ }, [flat, _elementInitialValue]);
55
+ (0, react.useEffect)(() => {
56
+ if (needsInitialize) {
57
+ setValue(name, [elementInitialValue], {
58
+ shouldDirty: false,
59
+ shouldTouch: false
60
+ });
61
+ hasInitialized.current = true;
62
+ if (!prefersReducedMotion && disableAnimation) setTimeout(() => {
63
+ setDisableAnimation(false);
64
+ }, 1);
65
+ }
66
+ }, [needsInitialize]);
67
+ return {
68
+ fields,
69
+ append,
70
+ remove,
71
+ insert,
72
+ move,
73
+ disableAnimation,
74
+ elementInitialValue,
75
+ ...uniformField
76
+ };
77
+ };
78
+ //#endregion
79
+ //#region src/hooks/useUniformFieldArray/index.ts
80
+ /* v8 ignore stop */
81
+ //#endregion
82
+ exports.useUniformFieldArray = useUniformFieldArray;
2
83
 
3
- exports.useUniformFieldArray = require_useUniformFieldArray.useUniformFieldArray;
84
+ //# sourceMappingURL=index.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.cjs","names":["useUniformField","useFormContext","flatArrayKey"],"sources":["../../../src/hooks/useUniformFieldArray/useUniformFieldArray.ts","../../../src/hooks/useUniformFieldArray/index.ts"],"sourcesContent":["import type { ReactNode } from 'react';\nimport type { ArrayPath, FieldValues, Path } from 'react-hook-form';\n\nimport { useEffect, useMemo, useRef, useState } from 'react';\nimport { useFieldArray as useRHFFieldArray } from 'react-hook-form';\n\nimport { useReducedMotion } from '@fuf-stack/pixel-motion';\n\nimport { flatArrayKey } from '../../helpers';\nimport { useFormContext } from '../useFormContext';\nimport { useUniformField } from '../useUniformField';\n\nexport interface UseUniformFieldArrayProps<\n TFieldValues extends FieldValues = FieldValues,\n> {\n /** Field name for the array */\n name: ArrayPath<TFieldValues>;\n /** Whether this is a flat array (array of primitives) */\n flat?: boolean;\n /** Initial value for new array elements */\n elementInitialValue?: unknown;\n /** Whether the last element cannot be removed (always maintain at least one element) */\n lastElementNotRemovable?: boolean;\n /** Disable the field */\n disabled?: boolean;\n /** Optional explicit test id used to build stable test ids */\n testId?: string;\n /** Optional label content */\n label?: ReactNode;\n}\n\n/**\n * Enhanced useFieldArray hook with initialization and animation logic.\n * Based on React Hook Form's useFieldArray with additional features:\n * - Automatic initialization when lastElementNotRemovable is set\n * - Animation control (disabled during initialization)\n * - Support for flat arrays (arrays of primitives)\n *\n * Note: Automatic validation triggering on length change is disabled to prevent\n * triggering form-wide validation. Array validation still runs on form submission.\n *\n * @see https://react-hook-form.com/docs/usefieldarray\n */\nexport const useUniformFieldArray = <\n TFieldValues extends FieldValues = FieldValues,\n>({\n name,\n flat = false,\n elementInitialValue: _elementInitialValue = null,\n lastElementNotRemovable = false,\n disabled,\n testId: explicitTestId,\n label,\n}: UseUniformFieldArrayProps<TFieldValues>) => {\n // Get uniform field state and utilities\n const uniformField = useUniformField<TFieldValues>({\n name: name as Path<TFieldValues> & string,\n disabled,\n testId: explicitTestId,\n label,\n });\n\n const { control } = uniformField;\n\n const { fields, append, remove, insert, move } = useRHFFieldArray({\n control,\n name,\n });\n\n const { trigger, setValue } = useFormContext<TFieldValues>();\n\n // Determine if initialization is needed (initially or after reset).\n // This flag automatically handles both scenarios:\n // - Initial mount: fields.length starts at 0\n // - Form reset: fields.length becomes 0 again\n // Additional initialization conditions can be added here later (e.g., minElements > 0)\n // Using useMemo ensures this value is properly tracked by React and effects can depend on it\n const needsInitialize = useMemo(() => {\n return lastElementNotRemovable && fields.length === 0;\n }, [lastElementNotRemovable, fields.length]);\n\n // Track whether initialization has completed. Initialized contextually:\n // - If initialization IS needed (needsInitialize = true): starts as false, set to true after init\n // - If initialization is NOT needed (needsInitialize = false): starts as true (already initialized)\n // This ref is used to:\n // 1. Skip validation during initialization/re-initialization\n // 2. Gate animation enabling until after initialization\n // 3. Gate motion preference effect until after initialization\n const hasInitialized = useRef(!needsInitialize);\n\n // Reset initialization flag when needsInitialize changes to true.\n // This handles form reset: when fields become empty (needsInitialize becomes true),\n // hasInitialized is reset to false, triggering re-initialization in the effect below.\n useEffect(() => {\n if (needsInitialize) {\n hasInitialized.current = false;\n }\n }, [needsInitialize]);\n\n // Validate array-level constraints (min/max items) when length changes.\n // This ensures min/max errors appear instantly when user adds/removes items.\n // Note: Child field validation also runs, but new empty fields won't show as invalid\n // because useFormContext only sets invalid=true for touched fields or after form submission.\n // Skip validation during initialization/re-initialization to avoid showing errors prematurely.\n useEffect(() => {\n if (hasInitialized.current) {\n setTimeout(() => {\n trigger(name as Path<TFieldValues>);\n }, 200);\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [fields.length]);\n\n // Animation control: Start with animations disabled to prevent animating in initial elements.\n // Will be enabled after initialization completes (unless user prefers reduced motion).\n const [disableAnimation, setDisableAnimation] = useState(true);\n\n // Respond to user's motion preference changes (after initialization).\n // During initialization, animations stay disabled regardless of preference.\n const prefersReducedMotion = useReducedMotion();\n useEffect(() => {\n if (hasInitialized.current) {\n setDisableAnimation(!!prefersReducedMotion);\n }\n }, [prefersReducedMotion]);\n\n // Prepare initial element value based on mode\n // - flat=true: arrays of primitives → object with flatArrayKey and null value by default\n // - flat=false: arrays of objects → empty object by default\n const elementInitialValue = useMemo(() => {\n return flat\n ? { [flatArrayKey]: _elementInitialValue ?? null }\n : (_elementInitialValue ?? {});\n }, [flat, _elementInitialValue]);\n\n // Initialization/Re-initialization: Add initial element when needed.\n // This handles both initial mount and form reset scenarios by reacting to needsInitialize.\n // CRITICAL: This effect MUST be the LAST hook in this component.\n // It sets hasInitialized.current = true, which acts as a gate for other effects.\n // If this runs before other effects, hasInitialized will be true during their first run,\n // causing them to execute logic meant only for post-initialization (e.g., validation,\n // animation enabling). By placing this last, all other effects run first with\n // hasInitialized = false, allowing them to skip initialization-phase logic.\n useEffect(\n () => {\n if (needsInitialize) {\n // use setValue instead of append to avoid focusing the added element\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n setValue(name as Path<TFieldValues>, [elementInitialValue] as any, {\n shouldDirty: false,\n shouldTouch: false,\n });\n\n // Mark initialization as complete\n hasInitialized.current = true;\n\n // Enable animations after a brief delay (unless user prefers reduced motion or animations are already enabled).\n // This only runs on initial mount when animations start disabled.\n // On reset, disableAnimation is typically false, so this setTimeout won't run and animations stay enabled.\n if (!prefersReducedMotion && disableAnimation) {\n setTimeout(() => {\n setDisableAnimation(false);\n }, 1);\n }\n }\n },\n // Run when needsInitialize changes (initial mount or reset)\n // needsInitialize is memoized based on fields.length and lastElementNotRemovable\n // Other dependencies are intentionally omitted:\n // - append, setValue, trigger, setDisableAnimation are stable refs/functions\n // - elementInitialValue, name, flat, prefersReducedMotion, disableAnimation are props/stable values\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [needsInitialize],\n );\n\n return {\n // Field array methods and state\n fields,\n append,\n remove,\n insert,\n move,\n disableAnimation,\n elementInitialValue,\n // Uniform field state and utilities (spread all)\n ...uniformField,\n };\n};\n","/* v8 ignore start */\n\nexport * from './useUniformFieldArray';\n\n/* v8 ignore stop */\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AA2CA,MAAa,wBAEX,EACA,MACA,OAAO,OACP,qBAAqB,uBAAuB,MAC5C,0BAA0B,OAC1B,UACA,QAAQ,gBACR,YAC6C;CAE7C,MAAM,eAAeA,oCAAAA,gBAA8B;EAC3C;EACN;EACA,QAAQ;EACR;EACD,CAAC;CAEF,MAAM,EAAE,YAAY;CAEpB,MAAM,EAAE,QAAQ,QAAQ,QAAQ,QAAQ,UAAA,GAAA,gBAAA,eAA0B;EAChE;EACA;EACD,CAAC;CAEF,MAAM,EAAE,SAAS,aAAaC,uBAAAA,gBAA8B;CAQ5D,MAAM,mBAAA,GAAA,MAAA,eAAgC;AACpC,SAAO,2BAA2B,OAAO,WAAW;IACnD,CAAC,yBAAyB,OAAO,OAAO,CAAC;CAS5C,MAAM,kBAAA,GAAA,MAAA,QAAwB,CAAC,gBAAgB;AAK/C,EAAA,GAAA,MAAA,iBAAgB;AACd,MAAI,gBACF,gBAAe,UAAU;IAE1B,CAAC,gBAAgB,CAAC;AAOrB,EAAA,GAAA,MAAA,iBAAgB;AACd,MAAI,eAAe,QACjB,kBAAiB;AACf,WAAQ,KAA2B;KAClC,IAAI;IAGR,CAAC,OAAO,OAAO,CAAC;CAInB,MAAM,CAAC,kBAAkB,wBAAA,GAAA,MAAA,UAAgC,KAAK;CAI9D,MAAM,wBAAA,GAAA,wBAAA,mBAAyC;AAC/C,EAAA,GAAA,MAAA,iBAAgB;AACd,MAAI,eAAe,QACjB,qBAAoB,CAAC,CAAC,qBAAqB;IAE5C,CAAC,qBAAqB,CAAC;CAK1B,MAAM,uBAAA,GAAA,MAAA,eAAoC;AACxC,SAAO,OACH,GAAGC,sBAAAA,eAAe,wBAAwB,MAAM,GAC/C,wBAAwB,EAAE;IAC9B,CAAC,MAAM,qBAAqB,CAAC;AAUhC,EAAA,GAAA,MAAA,iBACQ;AACJ,MAAI,iBAAiB;AAGnB,YAAS,MAA4B,CAAC,oBAAoB,EAAS;IACjE,aAAa;IACb,aAAa;IACd,CAAC;AAGF,kBAAe,UAAU;AAKzB,OAAI,CAAC,wBAAwB,iBAC3B,kBAAiB;AACf,wBAAoB,MAAM;MACzB,EAAE;;IAUX,CAAC,gBAAgB,CAClB;AAED,QAAO;EAEL;EACA;EACA;EACA;EACA;EACA;EACA;EAEA,GAAG;EACJ"}
@@ -1,2 +1,2 @@
1
- import { n as useUniformFieldArray, t as UseUniformFieldArrayProps } from "../../useUniformFieldArray-CWiaXKO6.cjs";
1
+ import { n as useUniformFieldArray, t as UseUniformFieldArrayProps } from "../../useUniformFieldArray-CDEagafl.cjs";
2
2
  export { UseUniformFieldArrayProps, useUniformFieldArray };
@@ -1,27 +1,2 @@
1
- import "../../index-Dty4h2eA.js";
2
- import "../../index-DVZCz730.js";
3
- import "../../index-Bl1Adhfx.js";
4
- import "../../FormContext-CCe8drkp.js";
5
- import "../../index--NM5Ctp6.js";
6
- import "../../index-ttNINAv3.js";
7
- import "../../index-TmijvCD0.js";
8
- import "../../index-BaxXDaOZ.js";
9
- import "../../index-BrMk3Wee.js";
10
- import "../../index-E6etS7_8.js";
11
- import "../../index-BBw9RSKy.js";
12
- import "../../index-BlJFGN_o.js";
13
- import "../../index-CPkTYivq.js";
14
- import "../../index-CZq5eXSP.js";
15
- import "../../index-BgyvEfYZ.js";
16
- import "../../index-mmk9VKYu.js";
17
- import "../../useClientValidation-B4xrGBJZ.js";
18
- import "../../useController-CHOpoCoz.js";
19
- import "../../useFormContext-C6OOtqZ5.js";
20
- import "../../index-BMCcWGYS.js";
21
- import "../../useInput-BVZvtfNg.js";
22
- import "../../useUniformField-BDKjYBKu.js";
23
- import "../../index-CMehV9mc.js";
24
- import "../../index-CI0AWMsR.js";
25
- import "../../useWatchUserChange-BnnrFjyq.js";
26
- import { n as useUniformFieldArray, t as UseUniformFieldArrayProps } from "../../useUniformFieldArray-lV3Nbum2.js";
1
+ import { n as useUniformFieldArray, t as UseUniformFieldArrayProps } from "../../useUniformFieldArray-CMHoo4o3.js";
27
2
  export { UseUniformFieldArrayProps, useUniformFieldArray };
@@ -1,3 +1,82 @@
1
- import { t as useUniformFieldArray } from "../../useUniformFieldArray-BKvA0FQW.js";
1
+ import { flatArrayKey } from "../../helpers/index.js";
2
+ import { n as useFormContext$1 } from "../../useFormContext-Bzpyonu6.js";
3
+ import { useUniformField } from "../useUniformField/index.js";
4
+ import { useEffect, useMemo, useRef, useState } from "react";
5
+ import { useReducedMotion } from "@fuf-stack/pixel-motion";
6
+ import { useFieldArray } from "react-hook-form";
7
+ //#region src/hooks/useUniformFieldArray/useUniformFieldArray.ts
8
+ /**
9
+ * Enhanced useFieldArray hook with initialization and animation logic.
10
+ * Based on React Hook Form's useFieldArray with additional features:
11
+ * - Automatic initialization when lastElementNotRemovable is set
12
+ * - Animation control (disabled during initialization)
13
+ * - Support for flat arrays (arrays of primitives)
14
+ *
15
+ * Note: Automatic validation triggering on length change is disabled to prevent
16
+ * triggering form-wide validation. Array validation still runs on form submission.
17
+ *
18
+ * @see https://react-hook-form.com/docs/usefieldarray
19
+ */
20
+ const useUniformFieldArray = ({ name, flat = false, elementInitialValue: _elementInitialValue = null, lastElementNotRemovable = false, disabled, testId: explicitTestId, label }) => {
21
+ const uniformField = useUniformField({
22
+ name,
23
+ disabled,
24
+ testId: explicitTestId,
25
+ label
26
+ });
27
+ const { control } = uniformField;
28
+ const { fields, append, remove, insert, move } = useFieldArray({
29
+ control,
30
+ name
31
+ });
32
+ const { trigger, setValue } = useFormContext$1();
33
+ const needsInitialize = useMemo(() => {
34
+ return lastElementNotRemovable && fields.length === 0;
35
+ }, [lastElementNotRemovable, fields.length]);
36
+ const hasInitialized = useRef(!needsInitialize);
37
+ useEffect(() => {
38
+ if (needsInitialize) hasInitialized.current = false;
39
+ }, [needsInitialize]);
40
+ useEffect(() => {
41
+ if (hasInitialized.current) setTimeout(() => {
42
+ trigger(name);
43
+ }, 200);
44
+ }, [fields.length]);
45
+ const [disableAnimation, setDisableAnimation] = useState(true);
46
+ const prefersReducedMotion = useReducedMotion();
47
+ useEffect(() => {
48
+ if (hasInitialized.current) setDisableAnimation(!!prefersReducedMotion);
49
+ }, [prefersReducedMotion]);
50
+ const elementInitialValue = useMemo(() => {
51
+ return flat ? { [flatArrayKey]: _elementInitialValue ?? null } : _elementInitialValue ?? {};
52
+ }, [flat, _elementInitialValue]);
53
+ useEffect(() => {
54
+ if (needsInitialize) {
55
+ setValue(name, [elementInitialValue], {
56
+ shouldDirty: false,
57
+ shouldTouch: false
58
+ });
59
+ hasInitialized.current = true;
60
+ if (!prefersReducedMotion && disableAnimation) setTimeout(() => {
61
+ setDisableAnimation(false);
62
+ }, 1);
63
+ }
64
+ }, [needsInitialize]);
65
+ return {
66
+ fields,
67
+ append,
68
+ remove,
69
+ insert,
70
+ move,
71
+ disableAnimation,
72
+ elementInitialValue,
73
+ ...uniformField
74
+ };
75
+ };
76
+ //#endregion
77
+ //#region src/hooks/useUniformFieldArray/index.ts
78
+ /* v8 ignore stop */
79
+ //#endregion
80
+ export { useUniformFieldArray };
2
81
 
3
- export { useUniformFieldArray };
82
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","names":["useRHFFieldArray","useFormContext"],"sources":["../../../src/hooks/useUniformFieldArray/useUniformFieldArray.ts","../../../src/hooks/useUniformFieldArray/index.ts"],"sourcesContent":["import type { ReactNode } from 'react';\nimport type { ArrayPath, FieldValues, Path } from 'react-hook-form';\n\nimport { useEffect, useMemo, useRef, useState } from 'react';\nimport { useFieldArray as useRHFFieldArray } from 'react-hook-form';\n\nimport { useReducedMotion } from '@fuf-stack/pixel-motion';\n\nimport { flatArrayKey } from '../../helpers';\nimport { useFormContext } from '../useFormContext';\nimport { useUniformField } from '../useUniformField';\n\nexport interface UseUniformFieldArrayProps<\n TFieldValues extends FieldValues = FieldValues,\n> {\n /** Field name for the array */\n name: ArrayPath<TFieldValues>;\n /** Whether this is a flat array (array of primitives) */\n flat?: boolean;\n /** Initial value for new array elements */\n elementInitialValue?: unknown;\n /** Whether the last element cannot be removed (always maintain at least one element) */\n lastElementNotRemovable?: boolean;\n /** Disable the field */\n disabled?: boolean;\n /** Optional explicit test id used to build stable test ids */\n testId?: string;\n /** Optional label content */\n label?: ReactNode;\n}\n\n/**\n * Enhanced useFieldArray hook with initialization and animation logic.\n * Based on React Hook Form's useFieldArray with additional features:\n * - Automatic initialization when lastElementNotRemovable is set\n * - Animation control (disabled during initialization)\n * - Support for flat arrays (arrays of primitives)\n *\n * Note: Automatic validation triggering on length change is disabled to prevent\n * triggering form-wide validation. Array validation still runs on form submission.\n *\n * @see https://react-hook-form.com/docs/usefieldarray\n */\nexport const useUniformFieldArray = <\n TFieldValues extends FieldValues = FieldValues,\n>({\n name,\n flat = false,\n elementInitialValue: _elementInitialValue = null,\n lastElementNotRemovable = false,\n disabled,\n testId: explicitTestId,\n label,\n}: UseUniformFieldArrayProps<TFieldValues>) => {\n // Get uniform field state and utilities\n const uniformField = useUniformField<TFieldValues>({\n name: name as Path<TFieldValues> & string,\n disabled,\n testId: explicitTestId,\n label,\n });\n\n const { control } = uniformField;\n\n const { fields, append, remove, insert, move } = useRHFFieldArray({\n control,\n name,\n });\n\n const { trigger, setValue } = useFormContext<TFieldValues>();\n\n // Determine if initialization is needed (initially or after reset).\n // This flag automatically handles both scenarios:\n // - Initial mount: fields.length starts at 0\n // - Form reset: fields.length becomes 0 again\n // Additional initialization conditions can be added here later (e.g., minElements > 0)\n // Using useMemo ensures this value is properly tracked by React and effects can depend on it\n const needsInitialize = useMemo(() => {\n return lastElementNotRemovable && fields.length === 0;\n }, [lastElementNotRemovable, fields.length]);\n\n // Track whether initialization has completed. Initialized contextually:\n // - If initialization IS needed (needsInitialize = true): starts as false, set to true after init\n // - If initialization is NOT needed (needsInitialize = false): starts as true (already initialized)\n // This ref is used to:\n // 1. Skip validation during initialization/re-initialization\n // 2. Gate animation enabling until after initialization\n // 3. Gate motion preference effect until after initialization\n const hasInitialized = useRef(!needsInitialize);\n\n // Reset initialization flag when needsInitialize changes to true.\n // This handles form reset: when fields become empty (needsInitialize becomes true),\n // hasInitialized is reset to false, triggering re-initialization in the effect below.\n useEffect(() => {\n if (needsInitialize) {\n hasInitialized.current = false;\n }\n }, [needsInitialize]);\n\n // Validate array-level constraints (min/max items) when length changes.\n // This ensures min/max errors appear instantly when user adds/removes items.\n // Note: Child field validation also runs, but new empty fields won't show as invalid\n // because useFormContext only sets invalid=true for touched fields or after form submission.\n // Skip validation during initialization/re-initialization to avoid showing errors prematurely.\n useEffect(() => {\n if (hasInitialized.current) {\n setTimeout(() => {\n trigger(name as Path<TFieldValues>);\n }, 200);\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [fields.length]);\n\n // Animation control: Start with animations disabled to prevent animating in initial elements.\n // Will be enabled after initialization completes (unless user prefers reduced motion).\n const [disableAnimation, setDisableAnimation] = useState(true);\n\n // Respond to user's motion preference changes (after initialization).\n // During initialization, animations stay disabled regardless of preference.\n const prefersReducedMotion = useReducedMotion();\n useEffect(() => {\n if (hasInitialized.current) {\n setDisableAnimation(!!prefersReducedMotion);\n }\n }, [prefersReducedMotion]);\n\n // Prepare initial element value based on mode\n // - flat=true: arrays of primitives → object with flatArrayKey and null value by default\n // - flat=false: arrays of objects → empty object by default\n const elementInitialValue = useMemo(() => {\n return flat\n ? { [flatArrayKey]: _elementInitialValue ?? null }\n : (_elementInitialValue ?? {});\n }, [flat, _elementInitialValue]);\n\n // Initialization/Re-initialization: Add initial element when needed.\n // This handles both initial mount and form reset scenarios by reacting to needsInitialize.\n // CRITICAL: This effect MUST be the LAST hook in this component.\n // It sets hasInitialized.current = true, which acts as a gate for other effects.\n // If this runs before other effects, hasInitialized will be true during their first run,\n // causing them to execute logic meant only for post-initialization (e.g., validation,\n // animation enabling). By placing this last, all other effects run first with\n // hasInitialized = false, allowing them to skip initialization-phase logic.\n useEffect(\n () => {\n if (needsInitialize) {\n // use setValue instead of append to avoid focusing the added element\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n setValue(name as Path<TFieldValues>, [elementInitialValue] as any, {\n shouldDirty: false,\n shouldTouch: false,\n });\n\n // Mark initialization as complete\n hasInitialized.current = true;\n\n // Enable animations after a brief delay (unless user prefers reduced motion or animations are already enabled).\n // This only runs on initial mount when animations start disabled.\n // On reset, disableAnimation is typically false, so this setTimeout won't run and animations stay enabled.\n if (!prefersReducedMotion && disableAnimation) {\n setTimeout(() => {\n setDisableAnimation(false);\n }, 1);\n }\n }\n },\n // Run when needsInitialize changes (initial mount or reset)\n // needsInitialize is memoized based on fields.length and lastElementNotRemovable\n // Other dependencies are intentionally omitted:\n // - append, setValue, trigger, setDisableAnimation are stable refs/functions\n // - elementInitialValue, name, flat, prefersReducedMotion, disableAnimation are props/stable values\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [needsInitialize],\n );\n\n return {\n // Field array methods and state\n fields,\n append,\n remove,\n insert,\n move,\n disableAnimation,\n elementInitialValue,\n // Uniform field state and utilities (spread all)\n ...uniformField,\n };\n};\n","/* v8 ignore start */\n\nexport * from './useUniformFieldArray';\n\n/* v8 ignore stop */\n"],"mappings":";;;;;;;;;;;;;;;;;;;AA2CA,MAAa,wBAEX,EACA,MACA,OAAO,OACP,qBAAqB,uBAAuB,MAC5C,0BAA0B,OAC1B,UACA,QAAQ,gBACR,YAC6C;CAE7C,MAAM,eAAe,gBAA8B;EAC3C;EACN;EACA,QAAQ;EACR;EACD,CAAC;CAEF,MAAM,EAAE,YAAY;CAEpB,MAAM,EAAE,QAAQ,QAAQ,QAAQ,QAAQ,SAASA,cAAiB;EAChE;EACA;EACD,CAAC;CAEF,MAAM,EAAE,SAAS,aAAaC,kBAA8B;CAQ5D,MAAM,kBAAkB,cAAc;AACpC,SAAO,2BAA2B,OAAO,WAAW;IACnD,CAAC,yBAAyB,OAAO,OAAO,CAAC;CAS5C,MAAM,iBAAiB,OAAO,CAAC,gBAAgB;AAK/C,iBAAgB;AACd,MAAI,gBACF,gBAAe,UAAU;IAE1B,CAAC,gBAAgB,CAAC;AAOrB,iBAAgB;AACd,MAAI,eAAe,QACjB,kBAAiB;AACf,WAAQ,KAA2B;KAClC,IAAI;IAGR,CAAC,OAAO,OAAO,CAAC;CAInB,MAAM,CAAC,kBAAkB,uBAAuB,SAAS,KAAK;CAI9D,MAAM,uBAAuB,kBAAkB;AAC/C,iBAAgB;AACd,MAAI,eAAe,QACjB,qBAAoB,CAAC,CAAC,qBAAqB;IAE5C,CAAC,qBAAqB,CAAC;CAK1B,MAAM,sBAAsB,cAAc;AACxC,SAAO,OACH,GAAG,eAAe,wBAAwB,MAAM,GAC/C,wBAAwB,EAAE;IAC9B,CAAC,MAAM,qBAAqB,CAAC;AAUhC,iBACQ;AACJ,MAAI,iBAAiB;AAGnB,YAAS,MAA4B,CAAC,oBAAoB,EAAS;IACjE,aAAa;IACb,aAAa;IACd,CAAC;AAGF,kBAAe,UAAU;AAKzB,OAAI,CAAC,wBAAwB,iBAC3B,kBAAiB;AACf,wBAAoB,MAAM;MACzB,EAAE;;IAUX,CAAC,gBAAgB,CAClB;AAED,QAAO;EAEL;EACA;EACA;EACA;EACA;EACA;EACA;EAEA,GAAG;EACJ"}
@@ -1,8 +1,8 @@
1
- const require_useWatchUserChange = require('../../useWatchUserChange-C1Kluht2.cjs');
2
-
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
+ const require_useWatchUserChange = require("../../useWatchUserChange-DkZ0Vqv3.cjs");
3
3
  //#region src/hooks/useWatchUserChange/index.ts
4
4
  /* v8 ignore stop */
5
-
6
5
  //#endregion
7
6
  exports.useWatchUserChange = require_useWatchUserChange.useWatchUserChange;
7
+
8
8
  //# sourceMappingURL=index.cjs.map
@@ -1,2 +1,2 @@
1
- import { n as useWatchUserChange, t as UseWatchUserChangeOptions } from "../../useWatchUserChange-DalJOKBC.cjs";
1
+ import { n as useWatchUserChange, t as UseWatchUserChangeOptions } from "../../useWatchUserChange-CZu_ZZ38.cjs";
2
2
  export { UseWatchUserChangeOptions, useWatchUserChange };
@@ -1,2 +1,2 @@
1
- import { n as useWatchUserChange, t as UseWatchUserChangeOptions } from "../../useWatchUserChange-BnnrFjyq.js";
1
+ import { n as useWatchUserChange, t as UseWatchUserChangeOptions } from "../../useWatchUserChange-CH4x16_r.js";
2
2
  export { UseWatchUserChangeOptions, useWatchUserChange };
@@ -1,8 +1,7 @@
1
- import { t as useWatchUserChange } from "../../useWatchUserChange-Dj9Imxfi.js";
2
-
1
+ import { t as useWatchUserChange } from "../../useWatchUserChange-CLgLc5W4.js";
3
2
  //#region src/hooks/useWatchUserChange/index.ts
4
3
  /* v8 ignore stop */
5
-
6
4
  //#endregion
7
5
  export { useWatchUserChange };
6
+
8
7
  //# sourceMappingURL=index.js.map
@@ -1,33 +1,32 @@
1
- import * as tailwind_variants202 from "tailwind-variants";
2
- import * as react_jsx_runtime10 from "react/jsx-runtime";
1
+ import { n as ClassNameValue, t as TVReturnType } from "./index-DsC0y6kU.cjs";
2
+ import * as _$react_jsx_runtime0 from "react/jsx-runtime";
3
3
  import { TVClassName, TVProps } from "@fuf-stack/pixel-utils";
4
4
  import { ReactNode } from "react";
5
-
6
5
  //#region src/RadioBoxes/RadioBoxes.d.ts
7
- declare const radioBoxesVariants: tailwind_variants202.TVReturnType<{
6
+ declare const radioBoxesVariants: TVReturnType<{
8
7
  [key: string]: {
9
- [key: string]: tailwind_variants202.ClassValue | {
10
- base?: tailwind_variants202.ClassValue;
11
- label?: tailwind_variants202.ClassValue;
12
- wrapper?: tailwind_variants202.ClassValue;
13
- boxBase?: tailwind_variants202.ClassValue;
14
- boxControl?: tailwind_variants202.ClassValue;
15
- boxDescription?: tailwind_variants202.ClassValue;
16
- boxLabel?: tailwind_variants202.ClassValue;
17
- boxLabelWrapper?: tailwind_variants202.ClassValue;
8
+ [key: string]: ClassNameValue | {
9
+ base?: ClassNameValue;
10
+ label?: ClassNameValue;
11
+ wrapper?: ClassNameValue;
12
+ boxBase?: ClassNameValue;
13
+ boxControl?: ClassNameValue;
14
+ boxDescription?: ClassNameValue;
15
+ boxLabel?: ClassNameValue;
16
+ boxLabelWrapper?: ClassNameValue;
18
17
  };
19
18
  };
20
19
  } | {
21
20
  [x: string]: {
22
- [x: string]: tailwind_variants202.ClassValue | {
23
- base?: tailwind_variants202.ClassValue;
24
- label?: tailwind_variants202.ClassValue;
25
- wrapper?: tailwind_variants202.ClassValue;
26
- boxBase?: tailwind_variants202.ClassValue;
27
- boxControl?: tailwind_variants202.ClassValue;
28
- boxDescription?: tailwind_variants202.ClassValue;
29
- boxLabel?: tailwind_variants202.ClassValue;
30
- boxLabelWrapper?: tailwind_variants202.ClassValue;
21
+ [x: string]: ClassNameValue | {
22
+ base?: ClassNameValue;
23
+ label?: ClassNameValue;
24
+ wrapper?: ClassNameValue;
25
+ boxBase?: ClassNameValue;
26
+ boxControl?: ClassNameValue;
27
+ boxDescription?: ClassNameValue;
28
+ boxLabel?: ClassNameValue;
29
+ boxLabelWrapper?: ClassNameValue;
31
30
  };
32
31
  };
33
32
  } | {}, {
@@ -41,15 +40,15 @@ declare const radioBoxesVariants: tailwind_variants202.TVReturnType<{
41
40
  wrapper: string;
42
41
  }, undefined, {
43
42
  [key: string]: {
44
- [key: string]: tailwind_variants202.ClassValue | {
45
- base?: tailwind_variants202.ClassValue;
46
- label?: tailwind_variants202.ClassValue;
47
- wrapper?: tailwind_variants202.ClassValue;
48
- boxBase?: tailwind_variants202.ClassValue;
49
- boxControl?: tailwind_variants202.ClassValue;
50
- boxDescription?: tailwind_variants202.ClassValue;
51
- boxLabel?: tailwind_variants202.ClassValue;
52
- boxLabelWrapper?: tailwind_variants202.ClassValue;
43
+ [key: string]: ClassNameValue | {
44
+ base?: ClassNameValue;
45
+ label?: ClassNameValue;
46
+ wrapper?: ClassNameValue;
47
+ boxBase?: ClassNameValue;
48
+ boxControl?: ClassNameValue;
49
+ boxDescription?: ClassNameValue;
50
+ boxLabel?: ClassNameValue;
51
+ boxLabelWrapper?: ClassNameValue;
53
52
  };
54
53
  };
55
54
  } | {}, {
@@ -61,7 +60,7 @@ declare const radioBoxesVariants: tailwind_variants202.TVReturnType<{
61
60
  boxLabelWrapper: string;
62
61
  label: string;
63
62
  wrapper: string;
64
- }, tailwind_variants202.TVReturnType<unknown, {
63
+ }, TVReturnType<unknown, {
65
64
  base: string;
66
65
  boxBase: string;
67
66
  boxControl: string;
@@ -114,10 +113,10 @@ declare const RadioBoxes: ({
114
113
  name,
115
114
  options,
116
115
  ...uniformFieldProps
117
- }: RadioBoxesProps) => react_jsx_runtime10.JSX.Element;
116
+ }: RadioBoxesProps) => _$react_jsx_runtime0.JSX.Element;
118
117
  //#endregion
119
118
  //#region src/RadioBoxes/RadioBox.d.ts
120
- declare const radioBoxVariants: tailwind_variants202.TVReturnType<{
119
+ declare const radioBoxVariants: TVReturnType<{
121
120
  isDisabled: {
122
121
  true: {
123
122
  base: string;
@@ -153,7 +152,7 @@ declare const radioBoxVariants: tailwind_variants202.TVReturnType<{
153
152
  icon: string;
154
153
  label: string;
155
154
  labelWrapper: string;
156
- }, tailwind_variants202.TVReturnType<{
155
+ }, TVReturnType<{
157
156
  isDisabled: {
158
157
  true: {
159
158
  base: string;
@@ -174,4 +173,4 @@ declare const radioBoxVariants: tailwind_variants202.TVReturnType<{
174
173
  }, undefined, unknown, unknown, undefined>>;
175
174
  //#endregion
176
175
  export { RadioBoxes as n, RadioBoxesProps as r, radioBoxVariants as t };
177
- //# sourceMappingURL=index-B0rp5NJy.d.cts.map
176
+ //# sourceMappingURL=index-1Gzrph8R.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index-1Gzrph8R.d.cts","names":[],"sources":["../src/RadioBoxes/RadioBoxes.tsx","../src/RadioBoxes/RadioBox.tsx"],"mappings":";;;;;cAaa,kBAAA;;mBAcX,cAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAEG,YAAA,GAAe,OAAA,QAAe,kBAAA;AAAA,KAC9B,SAAA,GAAY,WAAA,QAAmB,kBAAA;AAAA,UAEnB,gBAAA;;EAEf,WAAA,GAAc,SAAA;;EAEd,QAAA;;EAEA,KAAA,GAAQ,SAAA;;EAER,IAAA,GAAO,SAAA;;EAEP,MAAA;;EAEA,KAAA;AAAA;AAAA,UAGe,eAAA,SAAwB,YAAA;;EAEvC,SAAA;;EAEA,SAAA,GAAY,SAAA;;EAEZ,QAAA;;EAEA,MAAA;;EAEA,KAAA,GAAQ,SAAA;;EAER,IAAA;;EAEA,OAAA,EAAS,gBAAA;;EAET,MAAA;AAAA;;;;cAMI,UAAA;EAAc,SAAA;EAAA,MAAA;EAAA,IAAA;EAAA,OAAA;EAAA,GAAA;AAAA,GAMjB,eAAA,KAAe,oBAAA,CAAA,GAAA,CAAA,OAAA;;;cClEL,gBAAA,EAqBX,YAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAAA,YAAA"}