@fuf-stack/uniform 1.17.0 → 1.17.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (357) hide show
  1. package/dist/Checkboxes/index.cjs +1 -1
  2. package/dist/Checkboxes/index.d.cts +1 -1
  3. package/dist/Checkboxes/index.d.ts +1 -1
  4. package/dist/Checkboxes/index.js +1 -1
  5. package/dist/{Checkboxes-3Rg0gyfO.cjs → Checkboxes-C_9dL-jU.cjs} +2 -2
  6. package/dist/{Checkboxes-3Rg0gyfO.cjs.map → Checkboxes-C_9dL-jU.cjs.map} +1 -1
  7. package/dist/{Checkboxes-BfUtbKe-.js → Checkboxes-OSGkqKi3.js} +3 -3
  8. package/dist/{Checkboxes-BfUtbKe-.js.map → Checkboxes-OSGkqKi3.js.map} +1 -1
  9. package/dist/FieldArray/index.cjs +1 -1
  10. package/dist/FieldArray/index.d.cts +1 -1
  11. package/dist/FieldArray/index.d.ts +1 -1
  12. package/dist/FieldArray/index.js +1 -1
  13. package/dist/{FieldArray-BgvSTDWi.cjs → FieldArray-BEoSGlMB.cjs} +3 -3
  14. package/dist/{FieldArray-BgvSTDWi.cjs.map → FieldArray-BEoSGlMB.cjs.map} +1 -1
  15. package/dist/{FieldArray-C8Ipn-tM.js → FieldArray-BKwkAfut.js} +6 -6
  16. package/dist/{FieldArray-C8Ipn-tM.js.map → FieldArray-BKwkAfut.js.map} +1 -1
  17. package/dist/FieldCard/index.cjs +1 -1
  18. package/dist/FieldCard/index.d.cts +1 -1
  19. package/dist/FieldCard/index.d.ts +1 -1
  20. package/dist/FieldCard/index.js +1 -1
  21. package/dist/{FieldCard-7XiCb6jZ.js → FieldCard-BcqvCtMy.js} +6 -5
  22. package/dist/FieldCard-BcqvCtMy.js.map +1 -0
  23. package/dist/{FieldCard-38ZBBWyE.cjs → FieldCard-Dtfs_Fjj.cjs} +4 -3
  24. package/dist/FieldCard-Dtfs_Fjj.cjs.map +1 -0
  25. package/dist/{FieldCopyTestIdButton-D9f1B-VS.js → FieldCopyTestIdButton-BoEdlzLs.js} +1 -1
  26. package/dist/{FieldCopyTestIdButton-D9f1B-VS.js.map → FieldCopyTestIdButton-BoEdlzLs.js.map} +1 -1
  27. package/dist/{FieldValidationError-BYwitb_B.js → FieldValidationError-XQaViV52.js} +1 -1
  28. package/dist/{FieldValidationError-BYwitb_B.js.map → FieldValidationError-XQaViV52.js.map} +1 -1
  29. package/dist/Form/index.d.cts +1 -1
  30. package/dist/Form/index.d.ts +2 -2
  31. package/dist/Form/index.js +1 -1
  32. package/dist/{Form-B7bv9fDO.js → Form-BbbWZlQr.js} +3 -3
  33. package/dist/{Form-B7bv9fDO.js.map → Form-BbbWZlQr.js.map} +1 -1
  34. package/dist/{FormContext-DHYlCZ2u.js → FormContext-B_3BaWao.js} +2 -2
  35. package/dist/{FormContext-DHYlCZ2u.js.map → FormContext-B_3BaWao.js.map} +1 -1
  36. package/dist/{FormContext-C2_WMi_v.d.ts → FormContext-CCe8drkp.d.ts} +1 -1
  37. package/dist/FormContext-CCe8drkp.d.ts.map +1 -0
  38. package/dist/{FormContext-Dl7KL_wl.d.cts → FormContext-RSA21aDt.d.cts} +1 -1
  39. package/dist/FormContext-RSA21aDt.d.cts.map +1 -0
  40. package/dist/Grid/index.d.cts +1 -1
  41. package/dist/Grid/index.d.ts +1 -1
  42. package/dist/Grid/index.js +1 -1
  43. package/dist/{Grid-LRjQlZms.js → Grid-CeaybCIF.js} +1 -1
  44. package/dist/{Grid-LRjQlZms.js.map → Grid-CeaybCIF.js.map} +1 -1
  45. package/dist/Input/index.cjs +1 -1
  46. package/dist/Input/index.d.cts +1 -1
  47. package/dist/Input/index.d.ts +1 -1
  48. package/dist/Input/index.js +1 -1
  49. package/dist/{Input-ChXItabV.js → Input-DC52CW1u.js} +3 -3
  50. package/dist/{Input-ChXItabV.js.map → Input-DC52CW1u.js.map} +1 -1
  51. package/dist/{Input-DlyrGFYf.cjs → Input-yRPZxEhX.cjs} +2 -2
  52. package/dist/{Input-DlyrGFYf.cjs.map → Input-yRPZxEhX.cjs.map} +1 -1
  53. package/dist/RadioBoxes/index.cjs +1 -1
  54. package/dist/RadioBoxes/index.d.cts +1 -1
  55. package/dist/RadioBoxes/index.d.ts +1 -1
  56. package/dist/RadioBoxes/index.js +1 -1
  57. package/dist/{RadioBoxes-D6ULFGfd.js → RadioBoxes-CLjpYP_X.js} +3 -3
  58. package/dist/{RadioBoxes-D6ULFGfd.js.map → RadioBoxes-CLjpYP_X.js.map} +1 -1
  59. package/dist/{RadioBoxes-ClDOhQkO.cjs → RadioBoxes-ccNSOcIQ.cjs} +2 -2
  60. package/dist/{RadioBoxes-ClDOhQkO.cjs.map → RadioBoxes-ccNSOcIQ.cjs.map} +1 -1
  61. package/dist/RadioTabs/index.cjs +1 -1
  62. package/dist/RadioTabs/index.d.cts +1 -1
  63. package/dist/RadioTabs/index.d.ts +1 -1
  64. package/dist/RadioTabs/index.js +1 -1
  65. package/dist/{RadioTabs-CgB0MmbK.cjs → RadioTabs-Dmumff0s.cjs} +2 -2
  66. package/dist/{RadioTabs-CgB0MmbK.cjs.map → RadioTabs-Dmumff0s.cjs.map} +1 -1
  67. package/dist/{RadioTabs-eSB6OXD7.js → RadioTabs-lzEZtxZG.js} +3 -3
  68. package/dist/{RadioTabs-eSB6OXD7.js.map → RadioTabs-lzEZtxZG.js.map} +1 -1
  69. package/dist/Radios/index.cjs +1 -1
  70. package/dist/Radios/index.d.cts +1 -1
  71. package/dist/Radios/index.d.ts +1 -1
  72. package/dist/Radios/index.js +1 -1
  73. package/dist/{Radios-DWsCLUVl.cjs → Radios-BmkiGbwa.cjs} +2 -2
  74. package/dist/{Radios-DWsCLUVl.cjs.map → Radios-BmkiGbwa.cjs.map} +1 -1
  75. package/dist/{Radios-BXuyREKO.js → Radios-DTy3T0CS.js} +3 -3
  76. package/dist/{Radios-BXuyREKO.js.map → Radios-DTy3T0CS.js.map} +1 -1
  77. package/dist/Select/index.cjs +1 -1
  78. package/dist/Select/index.d.cts +1 -1
  79. package/dist/Select/index.d.ts +1 -1
  80. package/dist/Select/index.js +1 -1
  81. package/dist/{Select-Dk_K_Q0F.js → Select-CAyABB8R.js} +4 -4
  82. package/dist/{Select-Dk_K_Q0F.js.map → Select-CAyABB8R.js.map} +1 -1
  83. package/dist/{Select-CTbXrAjL.cjs → Select-DC84wZMS.cjs} +2 -2
  84. package/dist/{Select-CTbXrAjL.cjs.map → Select-DC84wZMS.cjs.map} +1 -1
  85. package/dist/Slider/index.cjs +1 -1
  86. package/dist/Slider/index.d.cts +1 -1
  87. package/dist/Slider/index.d.ts +1 -1
  88. package/dist/Slider/index.js +1 -1
  89. package/dist/{Slider-ChGkOSJJ.cjs → Slider-C_xuM49X.cjs} +2 -2
  90. package/dist/{Slider-ChGkOSJJ.cjs.map → Slider-C_xuM49X.cjs.map} +1 -1
  91. package/dist/{Slider-DdF0ZBzn.js → Slider-D1kO4BkJ.js} +2 -2
  92. package/dist/{Slider-DdF0ZBzn.js.map → Slider-D1kO4BkJ.js.map} +1 -1
  93. package/dist/SubmitButton/index.d.cts +1 -1
  94. package/dist/SubmitButton/index.d.ts +1 -1
  95. package/dist/SubmitButton/index.js +1 -1
  96. package/dist/{SubmitButton-BrbHJcb4.js → SubmitButton-DfCRZzAS.js} +2 -2
  97. package/dist/{SubmitButton-BrbHJcb4.js.map → SubmitButton-DfCRZzAS.js.map} +1 -1
  98. package/dist/Switch/index.cjs +1 -1
  99. package/dist/Switch/index.d.cts +1 -1
  100. package/dist/Switch/index.d.ts +1 -1
  101. package/dist/Switch/index.js +1 -1
  102. package/dist/{Switch-DW9SOeIv.js → Switch-BOhTVztK.js} +2 -2
  103. package/dist/{Switch-DW9SOeIv.js.map → Switch-BOhTVztK.js.map} +1 -1
  104. package/dist/{Switch-Lt61rKxf.cjs → Switch-CzvHbEpO.cjs} +2 -2
  105. package/dist/{Switch-Lt61rKxf.cjs.map → Switch-CzvHbEpO.cjs.map} +1 -1
  106. package/dist/SwitchBox/index.cjs +1 -1
  107. package/dist/SwitchBox/index.d.cts +1 -1
  108. package/dist/SwitchBox/index.d.ts +1 -1
  109. package/dist/SwitchBox/index.js +1 -1
  110. package/dist/{SwitchBox-D-EI9Sl-.cjs → SwitchBox-A_sUyrOh.cjs} +2 -2
  111. package/dist/{SwitchBox-D-EI9Sl-.cjs.map → SwitchBox-A_sUyrOh.cjs.map} +1 -1
  112. package/dist/{SwitchBox-9KAu4WWd.js → SwitchBox-CwUlFw3i.js} +2 -2
  113. package/dist/{SwitchBox-9KAu4WWd.js.map → SwitchBox-CwUlFw3i.js.map} +1 -1
  114. package/dist/TextArea/index.cjs +1 -1
  115. package/dist/TextArea/index.d.cts +1 -1
  116. package/dist/TextArea/index.d.ts +1 -1
  117. package/dist/TextArea/index.js +1 -1
  118. package/dist/{TextArea-DRSFdn5v.cjs → TextArea-ByiaX6_0.cjs} +2 -2
  119. package/dist/{TextArea-DRSFdn5v.cjs.map → TextArea-ByiaX6_0.cjs.map} +1 -1
  120. package/dist/{TextArea-B0zYpNy-.js → TextArea-GpElAFYY.js} +3 -3
  121. package/dist/{TextArea-B0zYpNy-.js.map → TextArea-GpElAFYY.js.map} +1 -1
  122. package/dist/helpers/index.d.cts.map +1 -1
  123. package/dist/helpers/index.d.ts.map +1 -1
  124. package/dist/helpers/index.js +1 -1
  125. package/dist/{helpers-D3A5d3M1.js → helpers-B6Iozj-0.js} +1 -1
  126. package/dist/{helpers-D3A5d3M1.js.map → helpers-B6Iozj-0.js.map} +1 -1
  127. package/dist/hooks/useClientValidation/index.d.cts +1 -1
  128. package/dist/hooks/useClientValidation/index.d.ts +1 -1
  129. package/dist/hooks/useClientValidation/index.js +1 -1
  130. package/dist/hooks/useController/index.d.cts +1 -1
  131. package/dist/hooks/useController/index.d.ts +2 -2
  132. package/dist/hooks/useController/index.js +1 -1
  133. package/dist/hooks/useFormContext/index.d.cts +1 -1
  134. package/dist/hooks/useFormContext/index.d.ts +3 -3
  135. package/dist/hooks/useFormContext/index.js +1 -1
  136. package/dist/hooks/useInput/index.d.cts +1 -1
  137. package/dist/hooks/useInput/index.d.ts +1 -1
  138. package/dist/hooks/useInput/index.js +1 -1
  139. package/dist/hooks/useInputValueDebounce/index.d.cts +1 -1
  140. package/dist/hooks/useInputValueDebounce/index.d.ts +1 -1
  141. package/dist/hooks/useInputValueDebounce/index.js +1 -1
  142. package/dist/hooks/useInputValueTransform/index.d.cts +1 -1
  143. package/dist/hooks/useInputValueTransform/index.d.ts +1 -1
  144. package/dist/hooks/useInputValueTransform/index.js +1 -1
  145. package/dist/hooks/useUniformField/index.cjs +1 -1
  146. package/dist/hooks/useUniformField/index.d.cts +1 -1
  147. package/dist/hooks/useUniformField/index.d.ts +5 -5
  148. package/dist/hooks/useUniformField/index.js +1 -1
  149. package/dist/hooks/useUniformFieldArray/index.cjs +1 -1
  150. package/dist/hooks/useUniformFieldArray/index.d.cts +1 -1
  151. package/dist/hooks/useUniformFieldArray/index.d.ts +6 -6
  152. package/dist/hooks/useUniformFieldArray/index.js +1 -1
  153. package/dist/hooks/useWatchUserChange/index.d.cts +1 -1
  154. package/dist/hooks/useWatchUserChange/index.d.ts +1 -1
  155. package/dist/hooks/useWatchUserChange/index.js +1 -1
  156. package/dist/{index-C3CvgmJw.d.ts → index-BRbX95cI.d.ts} +4 -4
  157. package/dist/index-BRbX95cI.d.ts.map +1 -0
  158. package/dist/{index-DAeb_8Q4.d.cts → index-BSlkEyYs.d.ts} +17 -29
  159. package/dist/index-BSlkEyYs.d.ts.map +1 -0
  160. package/dist/{index-BD9y--o2.d.cts → index-BXY7kYLp.d.cts} +6 -6
  161. package/dist/index-BXY7kYLp.d.cts.map +1 -0
  162. package/dist/{index-BgXr1v45.d.cts → index-Bb8SoybO.d.cts} +34 -34
  163. package/dist/index-Bb8SoybO.d.cts.map +1 -0
  164. package/dist/{index-CUy2EDqc.d.cts → index-BhOmmLn7.d.cts} +40 -78
  165. package/dist/index-BhOmmLn7.d.cts.map +1 -0
  166. package/dist/{index-aHcGnXHf.d.ts → index-C0CTs3Qk.d.ts} +4 -4
  167. package/dist/index-C0CTs3Qk.d.ts.map +1 -0
  168. package/dist/{index-B_1td56I.d.ts → index-C0ovsjPe.d.ts} +6 -6
  169. package/dist/index-C0ovsjPe.d.ts.map +1 -0
  170. package/dist/{index-CB00FCyi.d.ts → index-CFDs62p3.d.cts} +31 -43
  171. package/dist/index-CFDs62p3.d.cts.map +1 -0
  172. package/dist/{index-C4-1V8jn.d.ts → index-CMIxDe3l.d.ts} +3 -3
  173. package/dist/index-CMIxDe3l.d.ts.map +1 -0
  174. package/dist/index-CPJWPL1V.d.ts +278 -0
  175. package/dist/index-CPJWPL1V.d.ts.map +1 -0
  176. package/dist/{index-DjDR6FpI.d.ts → index-CSpIVjkS.d.ts} +36 -36
  177. package/dist/index-CSpIVjkS.d.ts.map +1 -0
  178. package/dist/{index-Cj5CLBt2.d.cts → index-CnEcnY6I.d.cts} +4 -4
  179. package/dist/index-CnEcnY6I.d.cts.map +1 -0
  180. package/dist/{index-DxfiwbJb.d.cts → index-Cte7ndgs.d.cts} +18 -34
  181. package/dist/index-Cte7ndgs.d.cts.map +1 -0
  182. package/dist/{index-nVYabHcT.d.cts → index-CuFzW4Oh.d.cts} +35 -35
  183. package/dist/index-CuFzW4Oh.d.cts.map +1 -0
  184. package/dist/{index-CrxSEKKb.d.cts → index-Cw2iSfpt.d.ts} +48 -48
  185. package/dist/index-Cw2iSfpt.d.ts.map +1 -0
  186. package/dist/index-D2VfkbWH.d.cts +85 -0
  187. package/dist/index-D2VfkbWH.d.cts.map +1 -0
  188. package/dist/{index-DTURD6sl.d.cts → index-D8DBXhSt.d.cts} +7 -7
  189. package/dist/index-D8DBXhSt.d.cts.map +1 -0
  190. package/dist/{index-pE9osud2.d.ts → index-DIMnCRyt.d.ts} +3 -3
  191. package/dist/index-DIMnCRyt.d.ts.map +1 -0
  192. package/dist/index-DKZNtov1.d.ts +85 -0
  193. package/dist/index-DKZNtov1.d.ts.map +1 -0
  194. package/dist/{index-DsyY9X04.d.cts → index-DMoH0fuj.d.cts} +3 -3
  195. package/dist/index-DMoH0fuj.d.cts.map +1 -0
  196. package/dist/index-DbJdf7rl.d.cts +278 -0
  197. package/dist/index-DbJdf7rl.d.cts.map +1 -0
  198. package/dist/{index-Cj-PU3Ck.d.ts → index-Dbptn5fZ.d.ts} +35 -35
  199. package/dist/index-Dbptn5fZ.d.ts.map +1 -0
  200. package/dist/{index-Bo79xzb4.d.cts → index-DjFBshmt.d.cts} +4 -4
  201. package/dist/index-DjFBshmt.d.cts.map +1 -0
  202. package/dist/{index-BV_YDI6g.d.ts → index-DmV9SW74.d.ts} +40 -78
  203. package/dist/index-DmV9SW74.d.ts.map +1 -0
  204. package/dist/{index-DJbdReTK.d.ts → index-DmlsX2k6.d.ts} +3 -3
  205. package/dist/index-DmlsX2k6.d.ts.map +1 -0
  206. package/dist/{index-DEJghucW.d.cts → index-DrIoPfZ5.d.cts} +3 -3
  207. package/dist/index-DrIoPfZ5.d.cts.map +1 -0
  208. package/dist/{index-D3RMbKbP.d.cts → index-DyEXTKt7.d.cts} +36 -36
  209. package/dist/index-DyEXTKt7.d.cts.map +1 -0
  210. package/dist/{index-DebErIUS.d.ts → index-JZN6NULG.d.cts} +48 -48
  211. package/dist/index-JZN6NULG.d.cts.map +1 -0
  212. package/dist/{index-BFLKkqA3.d.ts → index-Me4MKtCU.d.cts} +3 -3
  213. package/dist/index-Me4MKtCU.d.cts.map +1 -0
  214. package/dist/{index-Dy0m4FQj.d.ts → index-SH6SweXJ.d.ts} +7 -7
  215. package/dist/index-SH6SweXJ.d.ts.map +1 -0
  216. package/dist/{index-796vjEop.d.ts → index-Uv1u4DLk.d.ts} +34 -34
  217. package/dist/index-Uv1u4DLk.d.ts.map +1 -0
  218. package/dist/{index-CbAh0Kfo.d.cts → index-WWXULpwC.d.cts} +1 -1
  219. package/dist/index-WWXULpwC.d.cts.map +1 -0
  220. package/dist/{index-gWYaaO6O.d.ts → index-bFxTqfn4.d.ts} +18 -34
  221. package/dist/index-bFxTqfn4.d.ts.map +1 -0
  222. package/dist/{index-BW9EUWZE.d.cts → index-ttNINAv3.d.ts} +3 -3
  223. package/dist/index-ttNINAv3.d.ts.map +1 -0
  224. package/dist/index.cjs +14 -14
  225. package/dist/index.d.cts +26 -26
  226. package/dist/index.d.ts +29 -29
  227. package/dist/index.js +27 -27
  228. package/dist/partials/FieldCopyTestIdButton/index.d.cts +1 -1
  229. package/dist/partials/FieldCopyTestIdButton/index.d.ts +1 -1
  230. package/dist/partials/FieldCopyTestIdButton/index.js +1 -1
  231. package/dist/partials/FieldValidationError/index.d.cts +1 -1
  232. package/dist/partials/FieldValidationError/index.d.ts +1 -1
  233. package/dist/partials/FieldValidationError/index.js +1 -1
  234. package/dist/{useClientValidation-C6Daq53C.js → useClientValidation-Dg1CfArx.js} +3 -3
  235. package/dist/{useClientValidation-C6Daq53C.js.map → useClientValidation-Dg1CfArx.js.map} +1 -1
  236. package/dist/{useClientValidation-Bg0q3Axc.d.ts → useClientValidation-Dw-dmynu.d.cts} +1 -2
  237. package/dist/useClientValidation-Dw-dmynu.d.cts.map +1 -0
  238. package/dist/{useClientValidation-BvPDQmf6.d.cts → useClientValidation-DxFgfsEI.d.ts} +1 -2
  239. package/dist/useClientValidation-DxFgfsEI.d.ts.map +1 -0
  240. package/dist/{useController-QcOl0O0v.js → useController-C0eij9zb.js} +3 -3
  241. package/dist/{useController-QcOl0O0v.js.map → useController-C0eij9zb.js.map} +1 -1
  242. package/dist/{useController-C6Pg9T_3.d.cts → useController-CvPWE2Sy.d.cts} +1 -1
  243. package/dist/useController-CvPWE2Sy.d.cts.map +1 -0
  244. package/dist/{useController-BJ2SBdky.d.ts → useController-DfiNbuEz.d.ts} +1 -1
  245. package/dist/useController-DfiNbuEz.d.ts.map +1 -0
  246. package/dist/{useFormContext-B2TS6xq0.d.ts → useFormContext-C6OOtqZ5.d.ts} +18 -18
  247. package/dist/useFormContext-C6OOtqZ5.d.ts.map +1 -0
  248. package/dist/{useFormContext-356X5XAY.js → useFormContext-CLymm_7t.js} +1 -1
  249. package/dist/{useFormContext-356X5XAY.js.map → useFormContext-CLymm_7t.js.map} +1 -1
  250. package/dist/{useFormContext-n3WYgGkW.d.cts → useFormContext-Dh97YG47.d.cts} +18 -18
  251. package/dist/useFormContext-Dh97YG47.d.cts.map +1 -0
  252. package/dist/{useFormContext-UFBqUfOr.js → useFormContext-yC0bzokU.js} +3 -3
  253. package/dist/{useFormContext-UFBqUfOr.js.map → useFormContext-yC0bzokU.js.map} +1 -1
  254. package/dist/{useInputValueDebounce-D9wArTKz.js → useInputValueDebounce-CH_3h67c.js} +2 -2
  255. package/dist/{useInputValueDebounce-D9wArTKz.js.map → useInputValueDebounce-CH_3h67c.js.map} +1 -1
  256. package/dist/{useInputValueDebounce-fhmVn1aO.d.ts → useInputValueDebounce-Dhlv1NUY.d.ts} +1 -1
  257. package/dist/useInputValueDebounce-Dhlv1NUY.d.ts.map +1 -0
  258. package/dist/{useInputValueDebounce-DI1C6oaU.d.cts → useInputValueDebounce-ZLyAmuXV.d.cts} +1 -1
  259. package/dist/useInputValueDebounce-ZLyAmuXV.d.cts.map +1 -0
  260. package/dist/{useInputValueTransform-CMNC21vX.js → useInputValueTransform-C-fmz3ke.js} +1 -1
  261. package/dist/{useInputValueTransform-CMNC21vX.js.map → useInputValueTransform-C-fmz3ke.js.map} +1 -1
  262. package/dist/{useInputValueTransform-BV8o0PMI.d.cts → useInputValueTransform-CNCBU7a9.d.cts} +1 -1
  263. package/dist/useInputValueTransform-CNCBU7a9.d.cts.map +1 -0
  264. package/dist/{useInputValueTransform-Cc0qEsnS.d.ts → useInputValueTransform-tsMNM7g_.d.ts} +1 -1
  265. package/dist/useInputValueTransform-tsMNM7g_.d.ts.map +1 -0
  266. package/dist/{useUniformField-CXSaAVTt.d.ts → useUniformField-CqqIJtqo.d.ts} +5 -5
  267. package/dist/useUniformField-CqqIJtqo.d.ts.map +1 -0
  268. package/dist/{useUniformField-ETnay_UI.d.cts → useUniformField-DIb__gKK.d.cts} +5 -5
  269. package/dist/useUniformField-DIb__gKK.d.cts.map +1 -0
  270. package/dist/{useUniformField-C6oSAFa3.js → useUniformField-DIdjVLj3.js} +9 -29
  271. package/dist/useUniformField-DIdjVLj3.js.map +1 -0
  272. package/dist/{useUniformField-Dd3AnpgE.cjs → useUniformField-hjd0F3HI.cjs} +2 -22
  273. package/dist/useUniformField-hjd0F3HI.cjs.map +1 -0
  274. package/dist/{useUniformFieldArray-COtgcAnp.d.ts → useUniformFieldArray-4MOU0xac.d.ts} +14 -14
  275. package/dist/useUniformFieldArray-4MOU0xac.d.ts.map +1 -0
  276. package/dist/{useUniformFieldArray-4pUdrWYT.d.cts → useUniformFieldArray-BChcZvc5.d.cts} +14 -14
  277. package/dist/useUniformFieldArray-BChcZvc5.d.cts.map +1 -0
  278. package/dist/{useUniformFieldArray-DNrmEXLg.js → useUniformFieldArray-CPBQciJw.js} +4 -4
  279. package/dist/{useUniformFieldArray-DNrmEXLg.js.map → useUniformFieldArray-CPBQciJw.js.map} +1 -1
  280. package/dist/{useUniformFieldArray-D93AUZI4.cjs → useUniformFieldArray-CXdW_Teb.cjs} +2 -2
  281. package/dist/{useUniformFieldArray-D93AUZI4.cjs.map → useUniformFieldArray-CXdW_Teb.cjs.map} +1 -1
  282. package/dist/{useWatchUserChange-DyhUYlrN.js → useWatchUserChange-BtqaujL4.js} +2 -2
  283. package/dist/{useWatchUserChange-DyhUYlrN.js.map → useWatchUserChange-BtqaujL4.js.map} +1 -1
  284. package/dist/{useWatchUserChange-DX6gUHvM.d.ts → useWatchUserChange-CYd_8zeN.d.ts} +1 -1
  285. package/dist/useWatchUserChange-CYd_8zeN.d.ts.map +1 -0
  286. package/dist/{useWatchUserChange-cI5-j6M4.d.cts → useWatchUserChange-DedTNvGV.d.cts} +1 -1
  287. package/dist/useWatchUserChange-DedTNvGV.d.cts.map +1 -0
  288. package/package.json +2 -2
  289. package/dist/FieldCard-38ZBBWyE.cjs.map +0 -1
  290. package/dist/FieldCard-7XiCb6jZ.js.map +0 -1
  291. package/dist/FormContext-C2_WMi_v.d.ts.map +0 -1
  292. package/dist/FormContext-Dl7KL_wl.d.cts.map +0 -1
  293. package/dist/index-796vjEop.d.ts.map +0 -1
  294. package/dist/index-B62CWrcm.d.ts +0 -97
  295. package/dist/index-B62CWrcm.d.ts.map +0 -1
  296. package/dist/index-BD9y--o2.d.cts.map +0 -1
  297. package/dist/index-BFLKkqA3.d.ts.map +0 -1
  298. package/dist/index-BV_YDI6g.d.ts.map +0 -1
  299. package/dist/index-BW9EUWZE.d.cts.map +0 -1
  300. package/dist/index-B_1td56I.d.ts.map +0 -1
  301. package/dist/index-BgXr1v45.d.cts.map +0 -1
  302. package/dist/index-Bo79xzb4.d.cts.map +0 -1
  303. package/dist/index-C3CvgmJw.d.ts.map +0 -1
  304. package/dist/index-C4-1V8jn.d.ts.map +0 -1
  305. package/dist/index-CB00FCyi.d.ts.map +0 -1
  306. package/dist/index-COwP53Gx.d.ts +0 -278
  307. package/dist/index-COwP53Gx.d.ts.map +0 -1
  308. package/dist/index-CUy2EDqc.d.cts.map +0 -1
  309. package/dist/index-CbAh0Kfo.d.cts.map +0 -1
  310. package/dist/index-Cj-PU3Ck.d.ts.map +0 -1
  311. package/dist/index-Cj5CLBt2.d.cts.map +0 -1
  312. package/dist/index-CrxSEKKb.d.cts.map +0 -1
  313. package/dist/index-D3RMbKbP.d.cts.map +0 -1
  314. package/dist/index-DAeb_8Q4.d.cts.map +0 -1
  315. package/dist/index-DEJghucW.d.cts.map +0 -1
  316. package/dist/index-DJbdReTK.d.ts.map +0 -1
  317. package/dist/index-DTURD6sl.d.cts.map +0 -1
  318. package/dist/index-DebErIUS.d.ts.map +0 -1
  319. package/dist/index-DfGCI-K_.d.cts +0 -278
  320. package/dist/index-DfGCI-K_.d.cts.map +0 -1
  321. package/dist/index-DjDR6FpI.d.ts.map +0 -1
  322. package/dist/index-DsyY9X04.d.cts.map +0 -1
  323. package/dist/index-DxfiwbJb.d.cts.map +0 -1
  324. package/dist/index-Dy0m4FQj.d.ts.map +0 -1
  325. package/dist/index-Y8XsRdxS.d.cts +0 -97
  326. package/dist/index-Y8XsRdxS.d.cts.map +0 -1
  327. package/dist/index-aHcGnXHf.d.ts.map +0 -1
  328. package/dist/index-gWYaaO6O.d.ts.map +0 -1
  329. package/dist/index-nVYabHcT.d.cts.map +0 -1
  330. package/dist/index-pE9osud2.d.ts.map +0 -1
  331. package/dist/useClientValidation-Bg0q3Axc.d.ts.map +0 -1
  332. package/dist/useClientValidation-BvPDQmf6.d.cts.map +0 -1
  333. package/dist/useController-BJ2SBdky.d.ts.map +0 -1
  334. package/dist/useController-C6Pg9T_3.d.cts.map +0 -1
  335. package/dist/useFormContext-B2TS6xq0.d.ts.map +0 -1
  336. package/dist/useFormContext-n3WYgGkW.d.cts.map +0 -1
  337. package/dist/useInputValueDebounce-DI1C6oaU.d.cts.map +0 -1
  338. package/dist/useInputValueDebounce-fhmVn1aO.d.ts.map +0 -1
  339. package/dist/useInputValueTransform-BV8o0PMI.d.cts.map +0 -1
  340. package/dist/useInputValueTransform-Cc0qEsnS.d.ts.map +0 -1
  341. package/dist/useUniformField-C6oSAFa3.js.map +0 -1
  342. package/dist/useUniformField-CXSaAVTt.d.ts.map +0 -1
  343. package/dist/useUniformField-Dd3AnpgE.cjs.map +0 -1
  344. package/dist/useUniformField-ETnay_UI.d.cts.map +0 -1
  345. package/dist/useUniformFieldArray-4pUdrWYT.d.cts.map +0 -1
  346. package/dist/useUniformFieldArray-COtgcAnp.d.ts.map +0 -1
  347. package/dist/useWatchUserChange-DX6gUHvM.d.ts.map +0 -1
  348. package/dist/useWatchUserChange-cI5-j6M4.d.cts.map +0 -1
  349. /package/dist/{index-BLREDRDJ.d.cts → index-BMCcWGYS.d.ts} +0 -0
  350. /package/dist/{index-BRLjimYW.d.ts → index-C8k_zgEm.d.cts} +0 -0
  351. /package/dist/{index-BYrmFhKl.d.ts → index-D86jXpHS.d.cts} +0 -0
  352. /package/dist/{index-CFBmva_r.d.ts → index-DDRpa5CJ.d.cts} +0 -0
  353. /package/dist/{index-DpEKQcoR.d.cts → index-GGHuYh77.d.ts} +0 -0
  354. /package/dist/{index-lQ_hGQ08.d.cts → index-hIBrhvnj.d.ts} +0 -0
  355. /package/dist/{useInput--wjwIBc5.d.cts → useInput-BVZvtfNg.d.ts} +0 -0
  356. /package/dist/{useInput-DZ6KGBxw.js → useInput-BWzvIUpW.js} +0 -0
  357. /package/dist/{useInput-BCdeYOOg.d.ts → useInput-CKmKH9Ij.d.cts} +0 -0
@@ -1,11 +1,10 @@
1
1
  import { TVClassName } from "@fuf-stack/pixel-utils";
2
2
  import { ReactNode } from "react";
3
- import * as react_jsx_runtime6 from "react/jsx-runtime";
4
- import * as tailwind_variants64 from "tailwind-variants";
3
+ import * as react_jsx_runtime13 from "react/jsx-runtime";
4
+ import * as tailwind_variants275 from "tailwind-variants";
5
5
 
6
6
  //#region src/FieldCard/FieldCard.d.ts
7
-
8
- declare const fieldCardVariants: tailwind_variants64.TVReturnType<{
7
+ declare const fieldCardVariants: tailwind_variants275.TVReturnType<{
9
8
  invalid: {
10
9
  true: {
11
10
  base: string;
@@ -21,15 +20,10 @@ declare const fieldCardVariants: tailwind_variants64.TVReturnType<{
21
20
  };
22
21
  };
23
22
  }, {
24
- /** base class for the field card wrapper */
25
- base: string[];
26
- /** class for the label/header */
27
- label: string[];
28
- /** class for the content */
29
- content: string[];
30
- /** class for the error footer wrapper */
31
- errorFooter: string[];
32
- /** class for the error text (empty base, color controlled by variant) */
23
+ /** base class for the field card wrapper */base: string[]; /** class for the label/header */
24
+ label: string[]; /** class for the content */
25
+ content: string[]; /** class for the error footer wrapper */
26
+ errorFooter: string[]; /** class for the error text (empty base, color controlled by variant) */
33
27
  errorText: never[];
34
28
  }, undefined, {
35
29
  invalid: {
@@ -47,17 +41,12 @@ declare const fieldCardVariants: tailwind_variants64.TVReturnType<{
47
41
  };
48
42
  };
49
43
  }, {
50
- /** base class for the field card wrapper */
51
- base: string[];
52
- /** class for the label/header */
53
- label: string[];
54
- /** class for the content */
55
- content: string[];
56
- /** class for the error footer wrapper */
57
- errorFooter: string[];
58
- /** class for the error text (empty base, color controlled by variant) */
44
+ /** base class for the field card wrapper */base: string[]; /** class for the label/header */
45
+ label: string[]; /** class for the content */
46
+ content: string[]; /** class for the error footer wrapper */
47
+ errorFooter: string[]; /** class for the error text (empty base, color controlled by variant) */
59
48
  errorText: never[];
60
- }, tailwind_variants64.TVReturnType<{
49
+ }, tailwind_variants275.TVReturnType<{
61
50
  invalid: {
62
51
  true: {
63
52
  base: string;
@@ -73,15 +62,10 @@ declare const fieldCardVariants: tailwind_variants64.TVReturnType<{
73
62
  };
74
63
  };
75
64
  }, {
76
- /** base class for the field card wrapper */
77
- base: string[];
78
- /** class for the label/header */
79
- label: string[];
80
- /** class for the content */
81
- content: string[];
82
- /** class for the error footer wrapper */
83
- errorFooter: string[];
84
- /** class for the error text (empty base, color controlled by variant) */
65
+ /** base class for the field card wrapper */base: string[]; /** class for the label/header */
66
+ label: string[]; /** class for the content */
67
+ content: string[]; /** class for the error footer wrapper */
68
+ errorFooter: string[]; /** class for the error text (empty base, color controlled by variant) */
85
69
  errorText: never[];
86
70
  }, undefined, unknown, unknown, undefined>>;
87
71
  type ClassName = TVClassName<typeof fieldCardVariants>;
@@ -111,7 +95,7 @@ declare const FieldCard: ({
111
95
  className: _className,
112
96
  name,
113
97
  ...uniformFieldProps
114
- }: FieldCardProps) => react_jsx_runtime6.JSX.Element;
98
+ }: FieldCardProps) => react_jsx_runtime13.JSX.Element;
115
99
  //#endregion
116
100
  export { FieldCardProps as n, fieldCardVariants as r, FieldCard as t };
117
- //# sourceMappingURL=index-gWYaaO6O.d.ts.map
101
+ //# sourceMappingURL=index-bFxTqfn4.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index-bFxTqfn4.d.ts","names":[],"sources":["../src/FieldCard/FieldCard.tsx"],"mappings":";;;;;;cAsHa,iBAAA,EAyDX,oBAAA,CAzD4B,YAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mBA2DhB;qBAAG;yBAEA;;GAJf,oBAAA,CAAA,YAAA;;;;;;;;;;;;;;;;EA0BI;mBAAa;qBAKhB;yBA2HF;;;KAxJI,SAAA,GAAY,WAAA,QAAmB,iBAAA;AAAA,UAEnB,cAAA;EAsBE;EApBjB,QAAA,EAAU,SAAA;EAoBO;EAlBjB,SAAA,GAAY,SAAA;EAuBX;EArBD,KAAA,EAAO,SAAA;EAqBQ;EAnBf,IAAA;EA8ID;EA5IC,MAAA;AAAA;;;;;;;;;;cAYI,SAAA;EAAa,QAAA;EAAA,SAAA,EAAA,UAAA;EAAA,IAAA;EAAA,GAAA;AAAA,GAKhB,cAAA,KAAc,mBAAA,CAAA,GAAA,CAAA,OAAA"}
@@ -1,5 +1,5 @@
1
- import * as react_jsx_runtime0 from "react/jsx-runtime";
2
1
  import { ReactNode } from "react";
2
+ import * as react_jsx_runtime10 from "react/jsx-runtime";
3
3
 
4
4
  //#region src/Grid/Grid.d.ts
5
5
  interface GridProps {
@@ -17,7 +17,7 @@ declare const Grid: ({
17
17
  children,
18
18
  className,
19
19
  testId
20
- }: GridProps) => react_jsx_runtime0.JSX.Element;
20
+ }: GridProps) => react_jsx_runtime10.JSX.Element;
21
21
  //#endregion
22
22
  export { GridProps as n, Grid as t };
23
- //# sourceMappingURL=index-BW9EUWZE.d.cts.map
23
+ //# sourceMappingURL=index-ttNINAv3.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index-ttNINAv3.d.ts","names":[],"sources":["../src/Grid/Grid.tsx"],"mappings":";;;;UAIiB,SAAA;;EAEf,QAAA,GAAW,SAAA;EAFI;EAIf,SAAA;;EAEA,MAAA;AAAA;;;;cAMI,IAAA;EAAQ,QAAA;EAAA,SAAA;EAAA;AAAA,GAIX,SAAA,KAAS,mBAAA,CAAA,GAAA,CAAA,OAAA"}
package/dist/index.cjs CHANGED
@@ -5,24 +5,24 @@ const require_FieldValidationError = require('./FieldValidationError-A384-L3Y.cj
5
5
  const require_useController = require('./useController-oCYPeezC.cjs');
6
6
  const require_useFormContext = require('./useFormContext-DJiJlfGJ.cjs');
7
7
  const require_useInputValueTransform = require('./useInputValueTransform-DuhPVE4L.cjs');
8
- const require_useUniformField = require('./useUniformField-Dd3AnpgE.cjs');
9
- const require_Checkboxes = require('./Checkboxes-3Rg0gyfO.cjs');
10
- const require_useUniformFieldArray = require('./useUniformFieldArray-D93AUZI4.cjs');
11
- const require_FieldArray = require('./FieldArray-BgvSTDWi.cjs');
8
+ const require_useUniformField = require('./useUniformField-hjd0F3HI.cjs');
9
+ const require_Checkboxes = require('./Checkboxes-C_9dL-jU.cjs');
10
+ const require_useUniformFieldArray = require('./useUniformFieldArray-CXdW_Teb.cjs');
11
+ const require_FieldArray = require('./FieldArray-BEoSGlMB.cjs');
12
12
  const require_Grid = require('./Grid-CRURvciu.cjs');
13
- const require_FieldCard = require('./FieldCard-38ZBBWyE.cjs');
13
+ const require_FieldCard = require('./FieldCard-Dtfs_Fjj.cjs');
14
14
  const require_Form = require('./Form-Ca3RxssB.cjs');
15
15
  const require_useInputValueDebounce = require('./useInputValueDebounce-KIKsvSLm.cjs');
16
- const require_Input = require('./Input-DlyrGFYf.cjs');
17
- const require_RadioBoxes = require('./RadioBoxes-ClDOhQkO.cjs');
18
- const require_RadioTabs = require('./RadioTabs-CgB0MmbK.cjs');
19
- const require_Radios = require('./Radios-DWsCLUVl.cjs');
20
- const require_Select = require('./Select-CTbXrAjL.cjs');
21
- const require_Slider = require('./Slider-ChGkOSJJ.cjs');
16
+ const require_Input = require('./Input-yRPZxEhX.cjs');
17
+ const require_RadioBoxes = require('./RadioBoxes-ccNSOcIQ.cjs');
18
+ const require_RadioTabs = require('./RadioTabs-Dmumff0s.cjs');
19
+ const require_Radios = require('./Radios-BmkiGbwa.cjs');
20
+ const require_Select = require('./Select-DC84wZMS.cjs');
21
+ const require_Slider = require('./Slider-C_xuM49X.cjs');
22
22
  const require_SubmitButton = require('./SubmitButton-C6sgPR8K.cjs');
23
- const require_Switch = require('./Switch-Lt61rKxf.cjs');
24
- const require_SwitchBox = require('./SwitchBox-D-EI9Sl-.cjs');
25
- const require_TextArea = require('./TextArea-DRSFdn5v.cjs');
23
+ const require_Switch = require('./Switch-CzvHbEpO.cjs');
24
+ const require_SwitchBox = require('./SwitchBox-A_sUyrOh.cjs');
25
+ const require_TextArea = require('./TextArea-ByiaX6_0.cjs');
26
26
  const require_useClientValidation = require('./useClientValidation-DzomULfo.cjs');
27
27
  const require_useWatchUserChange = require('./useWatchUserChange-jivI5KIB.cjs');
28
28
  let _heroui_input = require("@heroui/input");
package/dist/index.d.cts CHANGED
@@ -1,28 +1,28 @@
1
- import { i as useInputValueTransform, n as UseInputValueTransformOptions, r as UseInputValueTransformReturn, t as InputValueTransform } from "./useInputValueTransform-BV8o0PMI.cjs";
2
- import { n as Checkboxes, r as CheckboxesProps, t as CheckboxOption } from "./index-DTURD6sl.cjs";
3
- import { i as FieldArrayProps, n as FieldArrayChildrenRenderFn, r as FieldArrayFeatures, t as FieldArray } from "./index-CUy2EDqc.cjs";
4
- import { n as FieldCardProps, r as fieldCardVariants, t as FieldCard } from "./index-DxfiwbJb.cjs";
5
- import { n as FormProps, t as Form } from "./index-Bo79xzb4.cjs";
6
- import { n as GridProps, t as Grid } from "./index-BW9EUWZE.cjs";
7
- import { n as InputProps, t as Input } from "./index-DAeb_8Q4.cjs";
8
- import { n as RadioBoxes, r as RadioBoxesProps, t as radioBoxVariants } from "./index-nVYabHcT.cjs";
9
- import { n as RadioTabsProps, t as RadioTabs } from "./index-Cj5CLBt2.cjs";
10
- import { n as RadiosProps, t as Radios } from "./index-BgXr1v45.cjs";
11
- import { n as SelectProps, t as Select } from "./index-DfGCI-K_.cjs";
12
- import { n as SliderProps, t as Slider } from "./index-CrxSEKKb.cjs";
13
- import { n as SubmitButtonProps, t as SubmitButton } from "./index-CbAh0Kfo.cjs";
14
- import { n as SwitchProps, t as Switch } from "./index-D3RMbKbP.cjs";
15
- import { n as SwitchBoxProps, r as switchBoxVariants, t as SwitchBox } from "./index-BD9y--o2.cjs";
16
- import { n as TextAreaProps, t as TextArea } from "./index-Y8XsRdxS.cjs";
1
+ import { i as useInputValueTransform, n as UseInputValueTransformOptions, r as UseInputValueTransformReturn, t as InputValueTransform } from "./useInputValueTransform-CNCBU7a9.cjs";
2
+ import { n as Checkboxes, r as CheckboxesProps, t as CheckboxOption } from "./index-D8DBXhSt.cjs";
3
+ import { i as FieldArrayProps, n as FieldArrayChildrenRenderFn, r as FieldArrayFeatures, t as FieldArray } from "./index-BhOmmLn7.cjs";
4
+ import { n as FieldCardProps, r as fieldCardVariants, t as FieldCard } from "./index-Cte7ndgs.cjs";
5
+ import { n as FormProps, t as Form } from "./index-DjFBshmt.cjs";
6
+ import { n as GridProps, t as Grid } from "./index-Me4MKtCU.cjs";
7
+ import { n as InputProps, t as Input } from "./index-CFDs62p3.cjs";
8
+ import { n as RadioBoxes, r as RadioBoxesProps, t as radioBoxVariants } from "./index-CuFzW4Oh.cjs";
9
+ import { n as RadioTabsProps, t as RadioTabs } from "./index-CnEcnY6I.cjs";
10
+ import { n as RadiosProps, t as Radios } from "./index-Bb8SoybO.cjs";
11
+ import { n as SelectProps, t as Select } from "./index-DbJdf7rl.cjs";
12
+ import { n as SliderProps, t as Slider } from "./index-JZN6NULG.cjs";
13
+ import { n as SubmitButtonProps, t as SubmitButton } from "./index-WWXULpwC.cjs";
14
+ import { n as SwitchProps, t as Switch } from "./index-DyEXTKt7.cjs";
15
+ import { n as SwitchBoxProps, r as switchBoxVariants, t as SwitchBox } from "./index-BXY7kYLp.cjs";
16
+ import { n as TextAreaProps, t as TextArea } from "./index-D2VfkbWH.cjs";
17
17
  import { createOptionValueConverter, flatArrayKey, fromNullishString, isValueEmpty, nameToTestId, toFormFormat, toNullishString, toValidationFormat } from "./helpers/index.cjs";
18
- import { n as useClientValidation, t as clientValidationSchemaByName } from "./useClientValidation-BvPDQmf6.cjs";
19
- import { n as UseControllerReturn, r as useController, t as UseControllerProps } from "./useController-C6Pg9T_3.cjs";
20
- import { n as useFormContext, t as checkFieldIsRequired } from "./useFormContext-n3WYgGkW.cjs";
21
- import { t as useInput } from "./useInput--wjwIBc5.cjs";
22
- import { n as UseInputValueDebounceReturn, r as useInputValueDebounce, t as UseInputValueDebounceOptions } from "./useInputValueDebounce-DI1C6oaU.cjs";
23
- import { n as UseUniformFieldReturn, r as useUniformField, t as UseUniformFieldParams } from "./useUniformField-ETnay_UI.cjs";
24
- import { n as useUniformFieldArray, t as UseUniformFieldArrayProps } from "./useUniformFieldArray-4pUdrWYT.cjs";
25
- import { n as useWatchUserChange, t as UseWatchUserChangeOptions } from "./useWatchUserChange-cI5-j6M4.cjs";
26
- import { n as FieldCopyTestIdButtonProps, t as FieldCopyTestIdButton } from "./index-DsyY9X04.cjs";
27
- import { n as FieldValidationErrorProps, t as FieldValidationError } from "./index-DEJghucW.cjs";
18
+ import { n as useClientValidation, t as clientValidationSchemaByName } from "./useClientValidation-Dw-dmynu.cjs";
19
+ import { n as UseControllerReturn, r as useController, t as UseControllerProps } from "./useController-CvPWE2Sy.cjs";
20
+ import { n as useFormContext, t as checkFieldIsRequired } from "./useFormContext-Dh97YG47.cjs";
21
+ import { t as useInput } from "./useInput-CKmKH9Ij.cjs";
22
+ import { n as UseInputValueDebounceReturn, r as useInputValueDebounce, t as UseInputValueDebounceOptions } from "./useInputValueDebounce-ZLyAmuXV.cjs";
23
+ import { n as UseUniformFieldReturn, r as useUniformField, t as UseUniformFieldParams } from "./useUniformField-DIb__gKK.cjs";
24
+ import { n as useUniformFieldArray, t as UseUniformFieldArrayProps } from "./useUniformFieldArray-BChcZvc5.cjs";
25
+ import { n as useWatchUserChange, t as UseWatchUserChangeOptions } from "./useWatchUserChange-DedTNvGV.cjs";
26
+ import { n as FieldCopyTestIdButtonProps, t as FieldCopyTestIdButton } from "./index-DMoH0fuj.cjs";
27
+ import { n as FieldValidationErrorProps, t as FieldValidationError } from "./index-DrIoPfZ5.cjs";
28
28
  export { CheckboxOption, Checkboxes, CheckboxesProps, FieldArray, FieldArrayChildrenRenderFn, FieldArrayFeatures, FieldArrayProps, FieldCard, FieldCardProps, FieldCopyTestIdButton, FieldCopyTestIdButtonProps, FieldValidationError, FieldValidationErrorProps, Form, FormProps, Grid, GridProps, Input, InputProps, InputValueTransform, RadioBoxes, RadioBoxesProps, RadioTabs, RadioTabsProps, Radios, RadiosProps, Select, SelectProps, Slider, SliderProps, SubmitButton, SubmitButtonProps, Switch, SwitchBox, SwitchBoxProps, SwitchProps, TextArea, TextAreaProps, UseControllerProps, UseControllerReturn, UseInputValueDebounceOptions, UseInputValueDebounceReturn, UseInputValueTransformOptions, UseInputValueTransformReturn, UseUniformFieldArrayProps, UseUniformFieldParams, UseUniformFieldReturn, UseWatchUserChangeOptions, checkFieldIsRequired, clientValidationSchemaByName, createOptionValueConverter, fieldCardVariants, flatArrayKey, fromNullishString, isValueEmpty, nameToTestId, radioBoxVariants, switchBoxVariants, toFormFormat, toNullishString, toValidationFormat, useClientValidation, useController, useFormContext, useInput, useInputValueDebounce, useInputValueTransform, useUniformField, useUniformFieldArray, useWatchUserChange };
package/dist/index.d.ts CHANGED
@@ -1,31 +1,31 @@
1
- import { i as useInputValueTransform, n as UseInputValueTransformOptions, r as UseInputValueTransformReturn, t as InputValueTransform } from "./useInputValueTransform-Cc0qEsnS.js";
2
- import { n as Checkboxes, r as CheckboxesProps, t as CheckboxOption } from "./index-Dy0m4FQj.js";
3
- import { i as FieldArrayProps, n as FieldArrayChildrenRenderFn, r as FieldArrayFeatures, t as FieldArray } from "./index-BV_YDI6g.js";
4
- import { n as FieldCardProps, r as fieldCardVariants, t as FieldCard } from "./index-gWYaaO6O.js";
5
- import "./FormContext-C2_WMi_v.js";
6
- import { n as FormProps, t as Form } from "./index-aHcGnXHf.js";
7
- import { n as GridProps, t as Grid } from "./index-BFLKkqA3.js";
8
- import { n as InputProps, t as Input } from "./index-CB00FCyi.js";
9
- import { n as RadioBoxes, r as RadioBoxesProps, t as radioBoxVariants } from "./index-Cj-PU3Ck.js";
10
- import { n as RadioTabsProps, t as RadioTabs } from "./index-C3CvgmJw.js";
11
- import { n as RadiosProps, t as Radios } from "./index-796vjEop.js";
12
- import { n as SelectProps, t as Select } from "./index-COwP53Gx.js";
13
- import { n as SliderProps, t as Slider } from "./index-DebErIUS.js";
14
- import { n as SubmitButtonProps, t as SubmitButton } from "./index-pE9osud2.js";
15
- import { n as SwitchProps, t as Switch } from "./index-DjDR6FpI.js";
16
- import { n as SwitchBoxProps, r as switchBoxVariants, t as SwitchBox } from "./index-B_1td56I.js";
17
- import { n as TextAreaProps, t as TextArea } from "./index-B62CWrcm.js";
1
+ import { i as useInputValueTransform, n as UseInputValueTransformOptions, r as UseInputValueTransformReturn, t as InputValueTransform } from "./useInputValueTransform-tsMNM7g_.js";
2
+ import { n as Checkboxes, r as CheckboxesProps, t as CheckboxOption } from "./index-SH6SweXJ.js";
3
+ import { i as FieldArrayProps, n as FieldArrayChildrenRenderFn, r as FieldArrayFeatures, t as FieldArray } from "./index-DmV9SW74.js";
4
+ import { n as FieldCardProps, r as fieldCardVariants, t as FieldCard } from "./index-bFxTqfn4.js";
5
+ import "./FormContext-CCe8drkp.js";
6
+ import { n as FormProps, t as Form } from "./index-C0CTs3Qk.js";
7
+ import { n as GridProps, t as Grid } from "./index-ttNINAv3.js";
8
+ import { n as InputProps, t as Input } from "./index-BSlkEyYs.js";
9
+ import { n as RadioBoxes, r as RadioBoxesProps, t as radioBoxVariants } from "./index-Dbptn5fZ.js";
10
+ import { n as RadioTabsProps, t as RadioTabs } from "./index-BRbX95cI.js";
11
+ import { n as RadiosProps, t as Radios } from "./index-Uv1u4DLk.js";
12
+ import { n as SelectProps, t as Select } from "./index-CPJWPL1V.js";
13
+ import { n as SliderProps, t as Slider } from "./index-Cw2iSfpt.js";
14
+ import { n as SubmitButtonProps, t as SubmitButton } from "./index-DIMnCRyt.js";
15
+ import { n as SwitchProps, t as Switch } from "./index-CSpIVjkS.js";
16
+ import { n as SwitchBoxProps, r as switchBoxVariants, t as SwitchBox } from "./index-C0ovsjPe.js";
17
+ import { n as TextAreaProps, t as TextArea } from "./index-DKZNtov1.js";
18
18
  import { createOptionValueConverter, flatArrayKey, fromNullishString, isValueEmpty, nameToTestId, toFormFormat, toNullishString, toValidationFormat } from "./helpers/index.js";
19
- import { n as useClientValidation, t as clientValidationSchemaByName } from "./useClientValidation-Bg0q3Axc.js";
20
- import { n as UseControllerReturn, r as useController, t as UseControllerProps } from "./useController-BJ2SBdky.js";
21
- import "./index-CFBmva_r.js";
22
- import { n as useFormContext, t as checkFieldIsRequired } from "./useFormContext-B2TS6xq0.js";
23
- import "./index-BRLjimYW.js";
24
- import { t as useInput } from "./useInput-BCdeYOOg.js";
25
- import { n as UseInputValueDebounceReturn, r as useInputValueDebounce, t as UseInputValueDebounceOptions } from "./useInputValueDebounce-fhmVn1aO.js";
26
- import { n as UseUniformFieldReturn, r as useUniformField, t as UseUniformFieldParams } from "./useUniformField-CXSaAVTt.js";
27
- import { n as useUniformFieldArray, t as UseUniformFieldArrayProps } from "./useUniformFieldArray-COtgcAnp.js";
28
- import { n as useWatchUserChange, t as UseWatchUserChangeOptions } from "./useWatchUserChange-DX6gUHvM.js";
29
- import { n as FieldCopyTestIdButtonProps, t as FieldCopyTestIdButton } from "./index-DJbdReTK.js";
30
- import { n as FieldValidationErrorProps, t as FieldValidationError } from "./index-C4-1V8jn.js";
19
+ import { n as useClientValidation, t as clientValidationSchemaByName } from "./useClientValidation-DxFgfsEI.js";
20
+ import { n as UseControllerReturn, r as useController, t as UseControllerProps } from "./useController-DfiNbuEz.js";
21
+ import "./index-hIBrhvnj.js";
22
+ import { n as useFormContext, t as checkFieldIsRequired } from "./useFormContext-C6OOtqZ5.js";
23
+ import "./index-BMCcWGYS.js";
24
+ import { t as useInput } from "./useInput-BVZvtfNg.js";
25
+ import { n as UseInputValueDebounceReturn, r as useInputValueDebounce, t as UseInputValueDebounceOptions } from "./useInputValueDebounce-Dhlv1NUY.js";
26
+ import { n as UseUniformFieldReturn, r as useUniformField, t as UseUniformFieldParams } from "./useUniformField-CqqIJtqo.js";
27
+ import { n as useUniformFieldArray, t as UseUniformFieldArrayProps } from "./useUniformFieldArray-4MOU0xac.js";
28
+ import { n as useWatchUserChange, t as UseWatchUserChangeOptions } from "./useWatchUserChange-CYd_8zeN.js";
29
+ import { n as FieldCopyTestIdButtonProps, t as FieldCopyTestIdButton } from "./index-DmlsX2k6.js";
30
+ import { n as FieldValidationErrorProps, t as FieldValidationError } from "./index-CMIxDe3l.js";
31
31
  export { CheckboxOption, Checkboxes, CheckboxesProps, FieldArray, FieldArrayChildrenRenderFn, FieldArrayFeatures, FieldArrayProps, FieldCard, FieldCardProps, FieldCopyTestIdButton, FieldCopyTestIdButtonProps, FieldValidationError, FieldValidationErrorProps, Form, FormProps, Grid, GridProps, Input, InputProps, InputValueTransform, RadioBoxes, RadioBoxesProps, RadioTabs, RadioTabsProps, Radios, RadiosProps, Select, SelectProps, Slider, SliderProps, SubmitButton, SubmitButtonProps, Switch, SwitchBox, SwitchBoxProps, SwitchProps, TextArea, TextAreaProps, UseControllerProps, UseControllerReturn, UseInputValueDebounceOptions, UseInputValueDebounceReturn, UseInputValueTransformOptions, UseInputValueTransformReturn, UseUniformFieldArrayProps, UseUniformFieldParams, UseUniformFieldReturn, UseWatchUserChangeOptions, checkFieldIsRequired, clientValidationSchemaByName, createOptionValueConverter, fieldCardVariants, flatArrayKey, fromNullishString, isValueEmpty, nameToTestId, radioBoxVariants, switchBoxVariants, toFormFormat, toNullishString, toValidationFormat, useClientValidation, useController, useFormContext, useInput, useInputValueDebounce, useInputValueTransform, useUniformField, useUniformFieldArray, useWatchUserChange };
package/dist/index.js CHANGED
@@ -1,30 +1,30 @@
1
- import { a as toFormFormat, c as createOptionValueConverter, i as nameToTestId, n as fromNullishString, o as toNullishString, r as isValueEmpty, s as toValidationFormat, t as flatArrayKey } from "./helpers-D3A5d3M1.js";
2
- import { n as FieldCopyTestIdButton_default } from "./FieldCopyTestIdButton-D9f1B-VS.js";
3
- import { n as FieldValidationError_default } from "./FieldValidationError-BYwitb_B.js";
4
- import { t as useController } from "./useController-QcOl0O0v.js";
5
- import { n as useFormContext, t as checkFieldIsRequired } from "./useFormContext-UFBqUfOr.js";
6
- import { t as useInput } from "./useInput-DZ6KGBxw.js";
7
- import { t as useInputValueTransform } from "./useInputValueTransform-CMNC21vX.js";
8
- import { t as useUniformField } from "./useUniformField-C6oSAFa3.js";
9
- import { n as Checkboxes_default } from "./Checkboxes-BfUtbKe-.js";
10
- import { t as useUniformFieldArray } from "./useUniformFieldArray-DNrmEXLg.js";
11
- import { n as FieldArray_default } from "./FieldArray-C8Ipn-tM.js";
12
- import { n as Grid_default } from "./Grid-LRjQlZms.js";
13
- import { n as fieldCardVariants, t as FieldCard_default } from "./FieldCard-7XiCb6jZ.js";
14
- import { n as Form_default } from "./Form-B7bv9fDO.js";
15
- import { t as useInputValueDebounce } from "./useInputValueDebounce-D9wArTKz.js";
16
- import { n as Input_default } from "./Input-ChXItabV.js";
17
- import { n as RadioBoxes_default, r as radioBoxVariants } from "./RadioBoxes-D6ULFGfd.js";
18
- import { n as RadioTabs_default } from "./RadioTabs-eSB6OXD7.js";
19
- import { n as Radios_default } from "./Radios-BXuyREKO.js";
20
- import { n as Select_default } from "./Select-Dk_K_Q0F.js";
21
- import { n as Slider_default } from "./Slider-DdF0ZBzn.js";
22
- import { n as SubmitButton_default } from "./SubmitButton-BrbHJcb4.js";
23
- import { n as Switch_default } from "./Switch-DW9SOeIv.js";
24
- import { n as SwitchBox_default, r as switchBoxVariants } from "./SwitchBox-9KAu4WWd.js";
25
- import { n as TextArea_default } from "./TextArea-B0zYpNy-.js";
26
- import { n as useClientValidation, t as clientValidationSchemaByName } from "./useClientValidation-C6Daq53C.js";
27
- import { t as useWatchUserChange } from "./useWatchUserChange-DyhUYlrN.js";
1
+ import { a as toFormFormat, c as createOptionValueConverter, i as nameToTestId, n as fromNullishString, o as toNullishString, r as isValueEmpty, s as toValidationFormat, t as flatArrayKey } from "./helpers-B6Iozj-0.js";
2
+ import { n as FieldCopyTestIdButton_default } from "./FieldCopyTestIdButton-BoEdlzLs.js";
3
+ import { n as FieldValidationError_default } from "./FieldValidationError-XQaViV52.js";
4
+ import { t as useController } from "./useController-C0eij9zb.js";
5
+ import { n as useFormContext, t as checkFieldIsRequired } from "./useFormContext-yC0bzokU.js";
6
+ import { t as useInput } from "./useInput-BWzvIUpW.js";
7
+ import { t as useInputValueTransform } from "./useInputValueTransform-C-fmz3ke.js";
8
+ import { t as useUniformField } from "./useUniformField-DIdjVLj3.js";
9
+ import { n as Checkboxes_default } from "./Checkboxes-OSGkqKi3.js";
10
+ import { t as useUniformFieldArray } from "./useUniformFieldArray-CPBQciJw.js";
11
+ import { n as FieldArray_default } from "./FieldArray-BKwkAfut.js";
12
+ import { n as Grid_default } from "./Grid-CeaybCIF.js";
13
+ import { n as fieldCardVariants, t as FieldCard_default } from "./FieldCard-BcqvCtMy.js";
14
+ import { n as Form_default } from "./Form-BbbWZlQr.js";
15
+ import { t as useInputValueDebounce } from "./useInputValueDebounce-CH_3h67c.js";
16
+ import { n as Input_default } from "./Input-DC52CW1u.js";
17
+ import { n as RadioBoxes_default, r as radioBoxVariants } from "./RadioBoxes-CLjpYP_X.js";
18
+ import { n as RadioTabs_default } from "./RadioTabs-lzEZtxZG.js";
19
+ import { n as Radios_default } from "./Radios-DTy3T0CS.js";
20
+ import { n as Select_default } from "./Select-CAyABB8R.js";
21
+ import { n as Slider_default } from "./Slider-D1kO4BkJ.js";
22
+ import { n as SubmitButton_default } from "./SubmitButton-DfCRZzAS.js";
23
+ import { n as Switch_default } from "./Switch-BOhTVztK.js";
24
+ import { n as SwitchBox_default, r as switchBoxVariants } from "./SwitchBox-CwUlFw3i.js";
25
+ import { n as TextArea_default } from "./TextArea-GpElAFYY.js";
26
+ import { n as useClientValidation, t as clientValidationSchemaByName } from "./useClientValidation-Dg1CfArx.js";
27
+ import { t as useWatchUserChange } from "./useWatchUserChange-BtqaujL4.js";
28
28
 
29
29
  //#region src/index.ts
30
30
  /* v8 ignore stop */
@@ -1,2 +1,2 @@
1
- import { n as FieldCopyTestIdButtonProps, t as FieldCopyTestIdButton } from "../../index-DsyY9X04.cjs";
1
+ import { n as FieldCopyTestIdButtonProps, t as FieldCopyTestIdButton } from "../../index-DMoH0fuj.cjs";
2
2
  export { FieldCopyTestIdButton, FieldCopyTestIdButton as default, FieldCopyTestIdButtonProps };
@@ -1,2 +1,2 @@
1
- import { n as FieldCopyTestIdButtonProps, t as FieldCopyTestIdButton } from "../../index-DJbdReTK.js";
1
+ import { n as FieldCopyTestIdButtonProps, t as FieldCopyTestIdButton } from "../../index-DmlsX2k6.js";
2
2
  export { FieldCopyTestIdButton, FieldCopyTestIdButton as default, FieldCopyTestIdButtonProps };
@@ -1,3 +1,3 @@
1
- import { n as FieldCopyTestIdButton_default, t as FieldCopyTestIdButton_default$1 } from "../../FieldCopyTestIdButton-D9f1B-VS.js";
1
+ import { n as FieldCopyTestIdButton_default, t as FieldCopyTestIdButton_default$1 } from "../../FieldCopyTestIdButton-BoEdlzLs.js";
2
2
 
3
3
  export { FieldCopyTestIdButton_default as FieldCopyTestIdButton, FieldCopyTestIdButton_default$1 as default };
@@ -1,2 +1,2 @@
1
- import { n as FieldValidationErrorProps, t as FieldValidationError } from "../../index-DEJghucW.cjs";
1
+ import { n as FieldValidationErrorProps, t as FieldValidationError } from "../../index-DrIoPfZ5.cjs";
2
2
  export { FieldValidationError, FieldValidationError as default, FieldValidationErrorProps };
@@ -1,2 +1,2 @@
1
- import { n as FieldValidationErrorProps, t as FieldValidationError } from "../../index-C4-1V8jn.js";
1
+ import { n as FieldValidationErrorProps, t as FieldValidationError } from "../../index-CMIxDe3l.js";
2
2
  export { FieldValidationError, FieldValidationError as default, FieldValidationErrorProps };
@@ -1,3 +1,3 @@
1
- import { n as FieldValidationError_default, t as FieldValidationError_default$1 } from "../../FieldValidationError-BYwitb_B.js";
1
+ import { n as FieldValidationError_default, t as FieldValidationError_default$1 } from "../../FieldValidationError-XQaViV52.js";
2
2
 
3
3
  export { FieldValidationError_default as FieldValidationError, FieldValidationError_default$1 as default };
@@ -1,5 +1,5 @@
1
- import { t as flatArrayKey } from "./helpers-D3A5d3M1.js";
2
- import { n as useFormContext } from "./useFormContext-UFBqUfOr.js";
1
+ import { t as flatArrayKey } from "./helpers-B6Iozj-0.js";
2
+ import { n as useFormContext } from "./useFormContext-yC0bzokU.js";
3
3
  import { useEffect, useId } from "react";
4
4
  import { array, objectLoose } from "@fuf-stack/veto";
5
5
 
@@ -176,4 +176,4 @@ const clientValidationSchemaByName = (name, fieldSchema) => {
176
176
 
177
177
  //#endregion
178
178
  export { useClientValidation as n, clientValidationSchemaByName as t };
179
- //# sourceMappingURL=useClientValidation-C6Daq53C.js.map
179
+ //# sourceMappingURL=useClientValidation-Dg1CfArx.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"useClientValidation-C6Daq53C.js","names":[],"sources":["../src/hooks/useClientValidation/useClientValidation.ts"],"sourcesContent":["import type { VetoTypeAny } from '@fuf-stack/veto';\n\nimport { useEffect, useId } from 'react';\n\nimport { array, objectLoose } from '@fuf-stack/veto';\n\nimport { flatArrayKey } from '../../helpers';\nimport { useFormContext } from '../useFormContext/useFormContext';\n\n/**\n * Hook for adding dynamic client-side validation to forms.\n *\n * Client validation is used for context-dependent validation rules that require external data\n * (e.g., checking if a username already exists). It complements base validation (passed to Form),\n * which handles static rules like \"required\", min/max length, format, etc.\n *\n * **Typical pattern:**\n * - Base validation: Static, always-on rules (required, format, length constraints)\n * - Client validation: Dynamic rules based on external data (uniqueness, business logic)\n * - Client schemas should use `.nullish()` to allow empty values (base validation handles \"required\")\n *\n * Automatically manages validation schema lifecycle: sets schema when data is provided,\n * clears schema when data is null/undefined, and cleans up on unmount. When the client\n * validation schema changes, automatically re-validates all touched fields.\n *\n * @param data - Data to create validation schema from (or null/undefined to clear validation)\n * @param schemaFactory - Function that creates a validation schema from the data. Schemas should typically use `.nullish()`.\n * @param options - Optional configuration object\n * @param options.key - Optional custom key for registration. Useful when multiple instances should share validation (e.g., in field arrays)\n *\n * @example\n * ```tsx\n * // Base validation handles \"required\" and format\n * const baseSchema = veto({ username: vt.string({ min: 3 }) });\n *\n * // Client validation adds dynamic uniqueness check\n * const { data: teamData } = useTeamQuery(teamId);\n * useClientValidation(teamData, (data) =>\n * vt.objectLoose({\n * username: vt.string()\n * .refine(\n * (value) => !data.existingUsers.includes(value),\n * { message: 'Username already exists' }\n * )\n * .nullish() // Allow empty - base validation handles \"required\"\n * })\n * );\n * ```\n *\n * @example\n * ```tsx\n * // Using custom key in a field array to avoid multiple registrations\n * fields.map((field, index) => (\n * useClientValidation(\n * userData,\n * (data) => clientValidationSchemaByName(\n * `items.${index}.name`,\n * vt.string()\n * .refine((val) => !data.forbidden.includes(val), { message: 'Name not allowed' })\n * .nullish()\n * ),\n * { key: 'items-validation' } // All instances share the same key\n * )\n * ));\n * ```\n */\nexport const useClientValidation = <TData = unknown>(\n data: TData | null | undefined,\n schemaFactory: (data: TData) => VetoTypeAny,\n options?: { key?: string },\n): void => {\n const {\n formState: { touchedFields },\n validation: { setClientValidationSchema },\n trigger,\n } = useFormContext();\n\n // Use provided key or auto-generate unique key\n const autoGeneratedKey = useId();\n const key = options?.key ?? autoGeneratedKey;\n\n // Use data hash instead of object reference to avoid unnecessary re-runs\n // when data object reference changes but data remains the same\n const dataHash = JSON.stringify(data);\n\n // Single effect to manage validation schema lifecycle\n useEffect(() => {\n // Set validation schema when data is available\n if (data != null) {\n const validationSchema = schemaFactory(data);\n setClientValidationSchema(key, validationSchema);\n } else {\n // Clear validation schema when no data\n setClientValidationSchema(key, null);\n }\n\n // Re-validate all touched fields when client validation schema changes\n const touchedFieldNames = Object.keys(touchedFields);\n if (touchedFieldNames.length > 0) {\n // Use setTimeout to ensure the client validation schema update has propagated\n // before triggering re-validation (fixes race condition)\n setTimeout(async () => {\n return trigger(touchedFieldNames);\n }, 1);\n }\n\n // Cleanup on unmount or when dependencies change\n return () => {\n setClientValidationSchema(key, null);\n };\n // Only re-run when data (dataHash) or key changes\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [dataHash, key]);\n};\n\n/**\n * Helper function to create a veto looseObject schema for a single field with nested path support.\n *\n * Parses field paths (dot-notation) and creates properly nested loose object schemas with array support.\n * All intermediate objects and arrays are marked as optional to allow partial data structures.\n * Numeric segments in the path are treated as array indices, and the parent field is wrapped in an array schema.\n * Supports flat arrays (arrays of primitives) via the special `__FLAT__` key.\n *\n * **Important:** The fieldSchema should typically use `.nullish()` to allow empty values. This is because:\n * - Base validation (passed to Form) handles \"required\" constraints\n * - Client validation adds dynamic, context-dependent rules (e.g., \"username already exists\")\n * - Form data processing converts empty strings in flat arrays to `null` (not `undefined`)\n * - `.nullish()` accepts both `null` and `undefined`, while `.optional()` only accepts `undefined`\n *\n * This pattern ensures client validation only validates non-empty values, while base validation\n * enforces required fields and basic constraints (min length, format, etc.).\n *\n * @param name - The dot-separated path to the field (e.g., 'username', 'user.profile.email', 'items.0.name', 'tags.0.__FLAT__')\n * @param fieldSchema - The veto validation schema for the field. Should typically use `.nullish()` to allow empty values.\n * @returns A nested loose object schema matching the field path structure with proper type inference\n *\n * @example\n * ```tsx\n * // Typical usage: base validation handles \"required\", client validation adds dynamic rules\n * // Base validation (in Form component)\n * const baseSchema = veto({ username: vt.string({ min: 3 }) }); // Required + min length\n *\n * // Client validation (dynamic check for existing usernames)\n * const { data: userData } = useUserQuery(userId);\n * useClientValidation(userData, (data) =>\n * clientValidationSchemaByName(\n * 'username',\n * vt.string()\n * .refine(\n * (value) => !data.existingUsernames.includes(value),\n * { message: 'Username already taken' }\n * )\n * .nullish() // Allow empty - base validation handles \"required\"\n * )\n * );\n * ```\n *\n * @example\n * ```tsx\n * // Nested field path with dynamic validation\n * clientValidationSchemaByName(\n * 'user.profile.email',\n * vt.string()\n * .refine(\n * (value) => !reservedEmails.includes(value),\n * { message: 'This email is reserved' }\n * )\n * .nullish()\n * )\n * // => objectLoose({ user: objectLoose({ profile: objectLoose({ email: ... }).optional() }).optional() })\n * ```\n *\n * @example\n * ```tsx\n * // Array of objects with dynamic validation\n * clientValidationSchemaByName(\n * 'items.0.tag',\n * vt.string()\n * .refine((value) => !forbiddenTags.includes(value), { message: 'Tag not allowed' })\n * .nullish()\n * )\n * // => objectLoose({ items: array(objectLoose({ tag: ... })).optional() })\n * ```\n *\n * @example\n * ```tsx\n * // Flat array (array of primitives) with dynamic validation\n * clientValidationSchemaByName(\n * 'tags.0.__FLAT__',\n * vt.string()\n * .refine((value) => !forbiddenWords.includes(value), { message: 'Word not allowed' })\n * .nullish()\n * )\n * // => objectLoose({ tags: array(vt.string().refine(...).nullish()).optional() })\n * ```\n */\nexport const clientValidationSchemaByName = <T extends VetoTypeAny>(\n name: string,\n fieldSchema: T,\n) => {\n const segments = name.split('.');\n\n // Build schema from innermost to outermost\n let schema: VetoTypeAny = fieldSchema;\n\n // Process segments in reverse order to build nested structure\n for (let i = segments.length - 1; i >= 0; i -= 1) {\n const segment = segments[i];\n\n const isNumeric = /^\\d+$/.test(segment);\n const isFlatArrayKey = segment === flatArrayKey;\n\n if (isFlatArrayKey) {\n // Skip the __FLAT__ key - it's just a marker for flat arrays\n // The schema is already correct (primitive type), just continue\n // eslint-disable-next-line no-continue\n continue;\n }\n\n if (isNumeric) {\n // Current segment is an array index - wrap current schema in optional array\n schema = array(schema).optional();\n } else {\n // Current segment is a field name - wrap in objectLoose\n // Make it optional if it's an intermediate object (not the root)\n const obj = objectLoose({\n [segment]: schema,\n });\n schema = i > 0 ? obj.optional() : obj;\n }\n }\n\n return schema;\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkEA,MAAa,uBACX,MACA,eACA,YACS;CACT,MAAM,EACJ,WAAW,EAAE,iBACb,YAAY,EAAE,6BACd,YACE,gBAAgB;CAGpB,MAAM,mBAAmB,OAAO;CAChC,MAAM,MAAM,SAAS,OAAO;AAO5B,iBAAgB;AAEd,MAAI,QAAQ,KAEV,2BAA0B,KADD,cAAc,KAAK,CACI;MAGhD,2BAA0B,KAAK,KAAK;EAItC,MAAM,oBAAoB,OAAO,KAAK,cAAc;AACpD,MAAI,kBAAkB,SAAS,EAG7B,YAAW,YAAY;AACrB,UAAO,QAAQ,kBAAkB;KAChC,EAAE;AAIP,eAAa;AACX,6BAA0B,KAAK,KAAK;;IAIrC,CA7Bc,KAAK,UAAU,KAAK,EA6BvB,IAAI,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoFrB,MAAa,gCACX,MACA,gBACG;CACH,MAAM,WAAW,KAAK,MAAM,IAAI;CAGhC,IAAI,SAAsB;AAG1B,MAAK,IAAI,IAAI,SAAS,SAAS,GAAG,KAAK,GAAG,KAAK,GAAG;EAChD,MAAM,UAAU,SAAS;EAEzB,MAAM,YAAY,QAAQ,KAAK,QAAQ;AAGvC,MAFuB,YAAY,aAMjC;AAGF,MAAI,UAEF,UAAS,MAAM,OAAO,CAAC,UAAU;OAC5B;GAGL,MAAM,MAAM,YAAY,GACrB,UAAU,QACZ,CAAC;AACF,YAAS,IAAI,IAAI,IAAI,UAAU,GAAG;;;AAItC,QAAO"}
1
+ {"version":3,"file":"useClientValidation-Dg1CfArx.js","names":[],"sources":["../src/hooks/useClientValidation/useClientValidation.ts"],"sourcesContent":["import type { VetoTypeAny } from '@fuf-stack/veto';\n\nimport { useEffect, useId } from 'react';\n\nimport { array, objectLoose } from '@fuf-stack/veto';\n\nimport { flatArrayKey } from '../../helpers';\nimport { useFormContext } from '../useFormContext/useFormContext';\n\n/**\n * Hook for adding dynamic client-side validation to forms.\n *\n * Client validation is used for context-dependent validation rules that require external data\n * (e.g., checking if a username already exists). It complements base validation (passed to Form),\n * which handles static rules like \"required\", min/max length, format, etc.\n *\n * **Typical pattern:**\n * - Base validation: Static, always-on rules (required, format, length constraints)\n * - Client validation: Dynamic rules based on external data (uniqueness, business logic)\n * - Client schemas should use `.nullish()` to allow empty values (base validation handles \"required\")\n *\n * Automatically manages validation schema lifecycle: sets schema when data is provided,\n * clears schema when data is null/undefined, and cleans up on unmount. When the client\n * validation schema changes, automatically re-validates all touched fields.\n *\n * @param data - Data to create validation schema from (or null/undefined to clear validation)\n * @param schemaFactory - Function that creates a validation schema from the data. Schemas should typically use `.nullish()`.\n * @param options - Optional configuration object\n * @param options.key - Optional custom key for registration. Useful when multiple instances should share validation (e.g., in field arrays)\n *\n * @example\n * ```tsx\n * // Base validation handles \"required\" and format\n * const baseSchema = veto({ username: vt.string({ min: 3 }) });\n *\n * // Client validation adds dynamic uniqueness check\n * const { data: teamData } = useTeamQuery(teamId);\n * useClientValidation(teamData, (data) =>\n * vt.objectLoose({\n * username: vt.string()\n * .refine(\n * (value) => !data.existingUsers.includes(value),\n * { message: 'Username already exists' }\n * )\n * .nullish() // Allow empty - base validation handles \"required\"\n * })\n * );\n * ```\n *\n * @example\n * ```tsx\n * // Using custom key in a field array to avoid multiple registrations\n * fields.map((field, index) => (\n * useClientValidation(\n * userData,\n * (data) => clientValidationSchemaByName(\n * `items.${index}.name`,\n * vt.string()\n * .refine((val) => !data.forbidden.includes(val), { message: 'Name not allowed' })\n * .nullish()\n * ),\n * { key: 'items-validation' } // All instances share the same key\n * )\n * ));\n * ```\n */\nexport const useClientValidation = <TData = unknown>(\n data: TData | null | undefined,\n schemaFactory: (data: TData) => VetoTypeAny,\n options?: { key?: string },\n): void => {\n const {\n formState: { touchedFields },\n validation: { setClientValidationSchema },\n trigger,\n } = useFormContext();\n\n // Use provided key or auto-generate unique key\n const autoGeneratedKey = useId();\n const key = options?.key ?? autoGeneratedKey;\n\n // Use data hash instead of object reference to avoid unnecessary re-runs\n // when data object reference changes but data remains the same\n const dataHash = JSON.stringify(data);\n\n // Single effect to manage validation schema lifecycle\n useEffect(() => {\n // Set validation schema when data is available\n if (data != null) {\n const validationSchema = schemaFactory(data);\n setClientValidationSchema(key, validationSchema);\n } else {\n // Clear validation schema when no data\n setClientValidationSchema(key, null);\n }\n\n // Re-validate all touched fields when client validation schema changes\n const touchedFieldNames = Object.keys(touchedFields);\n if (touchedFieldNames.length > 0) {\n // Use setTimeout to ensure the client validation schema update has propagated\n // before triggering re-validation (fixes race condition)\n setTimeout(async () => {\n return trigger(touchedFieldNames);\n }, 1);\n }\n\n // Cleanup on unmount or when dependencies change\n return () => {\n setClientValidationSchema(key, null);\n };\n // Only re-run when data (dataHash) or key changes\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [dataHash, key]);\n};\n\n/**\n * Helper function to create a veto looseObject schema for a single field with nested path support.\n *\n * Parses field paths (dot-notation) and creates properly nested loose object schemas with array support.\n * All intermediate objects and arrays are marked as optional to allow partial data structures.\n * Numeric segments in the path are treated as array indices, and the parent field is wrapped in an array schema.\n * Supports flat arrays (arrays of primitives) via the special `__FLAT__` key.\n *\n * **Important:** The fieldSchema should typically use `.nullish()` to allow empty values. This is because:\n * - Base validation (passed to Form) handles \"required\" constraints\n * - Client validation adds dynamic, context-dependent rules (e.g., \"username already exists\")\n * - Form data processing converts empty strings in flat arrays to `null` (not `undefined`)\n * - `.nullish()` accepts both `null` and `undefined`, while `.optional()` only accepts `undefined`\n *\n * This pattern ensures client validation only validates non-empty values, while base validation\n * enforces required fields and basic constraints (min length, format, etc.).\n *\n * @param name - The dot-separated path to the field (e.g., 'username', 'user.profile.email', 'items.0.name', 'tags.0.__FLAT__')\n * @param fieldSchema - The veto validation schema for the field. Should typically use `.nullish()` to allow empty values.\n * @returns A nested loose object schema matching the field path structure with proper type inference\n *\n * @example\n * ```tsx\n * // Typical usage: base validation handles \"required\", client validation adds dynamic rules\n * // Base validation (in Form component)\n * const baseSchema = veto({ username: vt.string({ min: 3 }) }); // Required + min length\n *\n * // Client validation (dynamic check for existing usernames)\n * const { data: userData } = useUserQuery(userId);\n * useClientValidation(userData, (data) =>\n * clientValidationSchemaByName(\n * 'username',\n * vt.string()\n * .refine(\n * (value) => !data.existingUsernames.includes(value),\n * { message: 'Username already taken' }\n * )\n * .nullish() // Allow empty - base validation handles \"required\"\n * )\n * );\n * ```\n *\n * @example\n * ```tsx\n * // Nested field path with dynamic validation\n * clientValidationSchemaByName(\n * 'user.profile.email',\n * vt.string()\n * .refine(\n * (value) => !reservedEmails.includes(value),\n * { message: 'This email is reserved' }\n * )\n * .nullish()\n * )\n * // => objectLoose({ user: objectLoose({ profile: objectLoose({ email: ... }).optional() }).optional() })\n * ```\n *\n * @example\n * ```tsx\n * // Array of objects with dynamic validation\n * clientValidationSchemaByName(\n * 'items.0.tag',\n * vt.string()\n * .refine((value) => !forbiddenTags.includes(value), { message: 'Tag not allowed' })\n * .nullish()\n * )\n * // => objectLoose({ items: array(objectLoose({ tag: ... })).optional() })\n * ```\n *\n * @example\n * ```tsx\n * // Flat array (array of primitives) with dynamic validation\n * clientValidationSchemaByName(\n * 'tags.0.__FLAT__',\n * vt.string()\n * .refine((value) => !forbiddenWords.includes(value), { message: 'Word not allowed' })\n * .nullish()\n * )\n * // => objectLoose({ tags: array(vt.string().refine(...).nullish()).optional() })\n * ```\n */\nexport const clientValidationSchemaByName = <T extends VetoTypeAny>(\n name: string,\n fieldSchema: T,\n) => {\n const segments = name.split('.');\n\n // Build schema from innermost to outermost\n let schema: VetoTypeAny = fieldSchema;\n\n // Process segments in reverse order to build nested structure\n for (let i = segments.length - 1; i >= 0; i -= 1) {\n const segment = segments[i];\n\n const isNumeric = /^\\d+$/.test(segment);\n const isFlatArrayKey = segment === flatArrayKey;\n\n if (isFlatArrayKey) {\n // Skip the __FLAT__ key - it's just a marker for flat arrays\n // The schema is already correct (primitive type), just continue\n // eslint-disable-next-line no-continue\n continue;\n }\n\n if (isNumeric) {\n // Current segment is an array index - wrap current schema in optional array\n schema = array(schema).optional();\n } else {\n // Current segment is a field name - wrap in objectLoose\n // Make it optional if it's an intermediate object (not the root)\n const obj = objectLoose({\n [segment]: schema,\n });\n schema = i > 0 ? obj.optional() : obj;\n }\n }\n\n return schema;\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkEA,MAAa,uBACX,MACA,eACA,YACS;CACT,MAAM,EACJ,WAAW,EAAE,iBACb,YAAY,EAAE,6BACd,YACE,gBAAgB;CAGpB,MAAM,mBAAmB,OAAO;CAChC,MAAM,MAAM,SAAS,OAAO;AAO5B,iBAAgB;AAEd,MAAI,QAAQ,KAEV,2BAA0B,KADD,cAAc,KAAK,CACI;MAGhD,2BAA0B,KAAK,KAAK;EAItC,MAAM,oBAAoB,OAAO,KAAK,cAAc;AACpD,MAAI,kBAAkB,SAAS,EAG7B,YAAW,YAAY;AACrB,UAAO,QAAQ,kBAAkB;KAChC,EAAE;AAIP,eAAa;AACX,6BAA0B,KAAK,KAAK;;IAIrC,CA7Bc,KAAK,UAAU,KAAK,EA6BvB,IAAI,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoFrB,MAAa,gCACX,MACA,gBACG;CACH,MAAM,WAAW,KAAK,MAAM,IAAI;CAGhC,IAAI,SAAsB;AAG1B,MAAK,IAAI,IAAI,SAAS,SAAS,GAAG,KAAK,GAAG,KAAK,GAAG;EAChD,MAAM,UAAU,SAAS;EAEzB,MAAM,YAAY,QAAQ,KAAK,QAAQ;AAGvC,MAFuB,YAAY,aAMjC;AAGF,MAAI,UAEF,UAAS,MAAM,OAAO,CAAC,UAAU;OAC5B;GAGL,MAAM,MAAM,YAAY,GACrB,UAAU,QACZ,CAAC;AACF,YAAS,IAAI,IAAI,IAAI,UAAU,GAAG;;;AAItC,QAAO"}
@@ -2,7 +2,6 @@ import { VetoTypeAny } from "@fuf-stack/veto";
2
2
  import * as _fuf_stack_veto_dist_types_d_CNPgNK_V0 from "@fuf-stack/veto/dist/types.d-CNPgNK-V";
3
3
 
4
4
  //#region src/hooks/useClientValidation/useClientValidation.d.ts
5
-
6
5
  /**
7
6
  * Hook for adding dynamic client-side validation to forms.
8
7
  *
@@ -147,4 +146,4 @@ declare const useClientValidation: <TData = unknown>(data: TData | null | undefi
147
146
  declare const clientValidationSchemaByName: <T extends VetoTypeAny>(name: string, fieldSchema: T) => _fuf_stack_veto_dist_types_d_CNPgNK_V0.Z;
148
147
  //#endregion
149
148
  export { useClientValidation as n, clientValidationSchemaByName as t };
150
- //# sourceMappingURL=useClientValidation-Bg0q3Axc.d.ts.map
149
+ //# sourceMappingURL=useClientValidation-Dw-dmynu.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useClientValidation-Dw-dmynu.d.cts","names":[],"sources":["../src/hooks/useClientValidation/useClientValidation.ts"],"mappings":";;;;;;;AAkEA;;;;;;;;;;;;;;;;;;;AAkIA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAlIa,mBAAA,oBACX,IAAA,EAAM,KAAA,qBACN,aAAA,GAAgB,IAAA,EAAM,KAAA,KAAU,WAAA,EAChC,OAAA;EAAY,GAAA;AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cA+HD,4BAAA,aAA0C,WAAA,EACrD,IAAA,UACA,WAAA,EAAa,CAAA,KAAC,sCAAA,CAAA,CAAA"}
@@ -2,7 +2,6 @@ import { VetoTypeAny } from "@fuf-stack/veto";
2
2
  import * as _fuf_stack_veto_dist_types_d_CNPgNK_V0 from "@fuf-stack/veto/dist/types.d-CNPgNK-V";
3
3
 
4
4
  //#region src/hooks/useClientValidation/useClientValidation.d.ts
5
-
6
5
  /**
7
6
  * Hook for adding dynamic client-side validation to forms.
8
7
  *
@@ -147,4 +146,4 @@ declare const useClientValidation: <TData = unknown>(data: TData | null | undefi
147
146
  declare const clientValidationSchemaByName: <T extends VetoTypeAny>(name: string, fieldSchema: T) => _fuf_stack_veto_dist_types_d_CNPgNK_V0.Z;
148
147
  //#endregion
149
148
  export { useClientValidation as n, clientValidationSchemaByName as t };
150
- //# sourceMappingURL=useClientValidation-BvPDQmf6.d.cts.map
149
+ //# sourceMappingURL=useClientValidation-DxFgfsEI.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useClientValidation-DxFgfsEI.d.ts","names":[],"sources":["../src/hooks/useClientValidation/useClientValidation.ts"],"mappings":";;;;;;;AAkEA;;;;;;;;;;;;;;;;;;;AAkIA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAlIa,mBAAA,oBACX,IAAA,EAAM,KAAA,qBACN,aAAA,GAAgB,IAAA,EAAM,KAAA,KAAU,WAAA,EAChC,OAAA;EAAY,GAAA;AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cA+HD,4BAAA,aAA0C,WAAA,EACrD,IAAA,UACA,WAAA,EAAa,CAAA,KAAC,sCAAA,CAAA,CAAA"}
@@ -1,5 +1,5 @@
1
- import { n as fromNullishString, o as toNullishString } from "./helpers-D3A5d3M1.js";
2
- import { n as UniformContext } from "./FormContext-DHYlCZ2u.js";
1
+ import { n as fromNullishString, o as toNullishString } from "./helpers-B6Iozj-0.js";
2
+ import { n as UniformContext } from "./FormContext-B_3BaWao.js";
3
3
  import { useContext } from "react";
4
4
  import { useController } from "react-hook-form";
5
5
 
@@ -43,4 +43,4 @@ const useController$1 = (props) => {
43
43
 
44
44
  //#endregion
45
45
  export { useController$1 as t };
46
- //# sourceMappingURL=useController-QcOl0O0v.js.map
46
+ //# sourceMappingURL=useController-C0eij9zb.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"useController-QcOl0O0v.js","names":["useController","useRHFController"],"sources":["../src/hooks/useController/useController.ts"],"sourcesContent":["import type {\n ControllerFieldState,\n ControllerRenderProps,\n UseControllerProps as RHFUseControllerProps,\n UseFormStateReturn,\n} from 'react-hook-form';\n\nimport { useContext } from 'react';\nimport { useController as useRHFController } from 'react-hook-form';\n\nimport { UniformContext } from '../../Form/subcomponents/FormContext';\nimport { fromNullishString, toNullishString } from '../../helpers';\n\nexport type UseControllerProps<TFieldValues extends object = object> =\n RHFUseControllerProps<TFieldValues>;\n\nexport interface UseControllerReturn<TFieldValues extends object = object> {\n field: Omit<ControllerRenderProps<TFieldValues>, 'onChange' | 'value'> & {\n // Using any[] to support both direct value changes and React synthetic events\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n onChange: (...event: any[]) => void;\n value: string;\n };\n formState: UseFormStateReturn<TFieldValues>;\n fieldState: ControllerFieldState;\n}\n\n/**\n * A wrapper around react-hook-form's useController that transparently handles nullish string conversions.\n *\n * Key features:\n * 1. Empty strings ('') in the UI are stored as null in form state\n * 2. Null/undefined values in form state are displayed as empty strings in the UI\n * 3. Handles both direct value changes and React synthetic events\n * 4. Maintains the same API as react-hook-form's useController\n * 5. Notifies UniformContext's userChange listeners on field changes (enables useWatchUserChange hook)\n * 6. No-op when value unchanged: onChange is ignored if the new value equals the current value\n * (prevents unnecessary re-renders and spurious useWatchUserChange triggers)\n *\n * This enables consistent handling of empty/null values while keeping a clean API\n * for form inputs that expect string values.\n *\n * @see https://react-hook-form.com/docs/usecontroller\n */\nexport const useController = <TFieldValues extends object = object>(\n props: UseControllerProps<TFieldValues>,\n): UseControllerReturn<TFieldValues> => {\n const { field, formState, fieldState } = useRHFController(props);\n const { userChange } = useContext(UniformContext);\n\n return {\n field: {\n ...field,\n // Handles both direct values (onChange(\"value\")) and events (onChange(event))\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n onChange: (...event: any[]) => {\n const value = event[0]?.target?.value ?? event[0];\n const formattedValue = value === '' ? '' : toNullishString(value);\n\n // Skip if value hasn't changed (e.g., user re-selects same option)\n // We compare formattedValue (the new value after nullish conversion) with\n // field.value (the current stored value, also in nullish format)\n if (formattedValue === field.value) {\n return;\n }\n\n // Update form state first\n field.onChange(formattedValue);\n\n // Then notify userChange listeners (for useWatchUserChange hook)\n // This ensures getValues() in listeners returns the updated value\n // Guard against undefined userChange (when used outside FormProvider)\n // NOTE: We notify with the original value (not formattedValue) so that\n // listeners receive the actual value (false, 0, null) instead of marker\n // strings like '__FALSE__', '__ZERO__', '__NULL__'\n userChange?.notify(field.name, value);\n },\n // Convert null/undefined to empty string for UI display\n value: fromNullishString(field.value) as string,\n },\n formState,\n fieldState,\n };\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AA4CA,MAAaA,mBACX,UACsC;CACtC,MAAM,EAAE,OAAO,WAAW,eAAeC,cAAiB,MAAM;CAChE,MAAM,EAAE,eAAe,WAAW,eAAe;AAEjD,QAAO;EACL,OAAO;GACL,GAAG;GAGH,WAAW,GAAG,UAAiB;IAC7B,MAAM,QAAQ,MAAM,IAAI,QAAQ,SAAS,MAAM;IAC/C,MAAM,iBAAiB,UAAU,KAAK,KAAK,gBAAgB,MAAM;AAKjE,QAAI,mBAAmB,MAAM,MAC3B;AAIF,UAAM,SAAS,eAAe;AAQ9B,gBAAY,OAAO,MAAM,MAAM,MAAM;;GAGvC,OAAO,kBAAkB,MAAM,MAAM;GACtC;EACD;EACA;EACD"}
1
+ {"version":3,"file":"useController-C0eij9zb.js","names":["useController","useRHFController"],"sources":["../src/hooks/useController/useController.ts"],"sourcesContent":["import type {\n ControllerFieldState,\n ControllerRenderProps,\n UseControllerProps as RHFUseControllerProps,\n UseFormStateReturn,\n} from 'react-hook-form';\n\nimport { useContext } from 'react';\nimport { useController as useRHFController } from 'react-hook-form';\n\nimport { UniformContext } from '../../Form/subcomponents/FormContext';\nimport { fromNullishString, toNullishString } from '../../helpers';\n\nexport type UseControllerProps<TFieldValues extends object = object> =\n RHFUseControllerProps<TFieldValues>;\n\nexport interface UseControllerReturn<TFieldValues extends object = object> {\n field: Omit<ControllerRenderProps<TFieldValues>, 'onChange' | 'value'> & {\n // Using any[] to support both direct value changes and React synthetic events\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n onChange: (...event: any[]) => void;\n value: string;\n };\n formState: UseFormStateReturn<TFieldValues>;\n fieldState: ControllerFieldState;\n}\n\n/**\n * A wrapper around react-hook-form's useController that transparently handles nullish string conversions.\n *\n * Key features:\n * 1. Empty strings ('') in the UI are stored as null in form state\n * 2. Null/undefined values in form state are displayed as empty strings in the UI\n * 3. Handles both direct value changes and React synthetic events\n * 4. Maintains the same API as react-hook-form's useController\n * 5. Notifies UniformContext's userChange listeners on field changes (enables useWatchUserChange hook)\n * 6. No-op when value unchanged: onChange is ignored if the new value equals the current value\n * (prevents unnecessary re-renders and spurious useWatchUserChange triggers)\n *\n * This enables consistent handling of empty/null values while keeping a clean API\n * for form inputs that expect string values.\n *\n * @see https://react-hook-form.com/docs/usecontroller\n */\nexport const useController = <TFieldValues extends object = object>(\n props: UseControllerProps<TFieldValues>,\n): UseControllerReturn<TFieldValues> => {\n const { field, formState, fieldState } = useRHFController(props);\n const { userChange } = useContext(UniformContext);\n\n return {\n field: {\n ...field,\n // Handles both direct values (onChange(\"value\")) and events (onChange(event))\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n onChange: (...event: any[]) => {\n const value = event[0]?.target?.value ?? event[0];\n const formattedValue = value === '' ? '' : toNullishString(value);\n\n // Skip if value hasn't changed (e.g., user re-selects same option)\n // We compare formattedValue (the new value after nullish conversion) with\n // field.value (the current stored value, also in nullish format)\n if (formattedValue === field.value) {\n return;\n }\n\n // Update form state first\n field.onChange(formattedValue);\n\n // Then notify userChange listeners (for useWatchUserChange hook)\n // This ensures getValues() in listeners returns the updated value\n // Guard against undefined userChange (when used outside FormProvider)\n // NOTE: We notify with the original value (not formattedValue) so that\n // listeners receive the actual value (false, 0, null) instead of marker\n // strings like '__FALSE__', '__ZERO__', '__NULL__'\n userChange?.notify(field.name, value);\n },\n // Convert null/undefined to empty string for UI display\n value: fromNullishString(field.value) as string,\n },\n formState,\n fieldState,\n };\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AA4CA,MAAaA,mBACX,UACsC;CACtC,MAAM,EAAE,OAAO,WAAW,eAAeC,cAAiB,MAAM;CAChE,MAAM,EAAE,eAAe,WAAW,eAAe;AAEjD,QAAO;EACL,OAAO;GACL,GAAG;GAGH,WAAW,GAAG,UAAiB;IAC7B,MAAM,QAAQ,MAAM,IAAI,QAAQ,SAAS,MAAM;IAC/C,MAAM,iBAAiB,UAAU,KAAK,KAAK,gBAAgB,MAAM;AAKjE,QAAI,mBAAmB,MAAM,MAC3B;AAIF,UAAM,SAAS,eAAe;AAQ9B,gBAAY,OAAO,MAAM,MAAM,MAAM;;GAGvC,OAAO,kBAAkB,MAAM,MAAM;GACtC;EACD;EACA;EACD"}
@@ -30,4 +30,4 @@ interface UseControllerReturn<TFieldValues extends object = object> {
30
30
  declare const useController: <TFieldValues extends object = object>(props: UseControllerProps$1<TFieldValues>) => UseControllerReturn<TFieldValues>;
31
31
  //#endregion
32
32
  export { UseControllerReturn as n, useController as r, UseControllerProps$1 as t };
33
- //# sourceMappingURL=useController-C6Pg9T_3.d.cts.map
33
+ //# sourceMappingURL=useController-CvPWE2Sy.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useController-CvPWE2Sy.d.cts","names":[],"sources":["../src/hooks/useController/useController.ts"],"mappings":";;;KAaY,oBAAA,yCACV,kBAAA,CAAsB,YAAA;AAAA,UAEP,mBAAA;EACf,KAAA,EAAO,IAAA,CAAK,qBAAA,CAAsB,YAAA;IAGhC,QAAA,MAAc,KAAA;IACd,KAAA;EAAA;EAEF,SAAA,EAAW,kBAAA,CAAmB,YAAA;EAC9B,UAAA,EAAY,oBAAA;AAAA;;;AARd;;;;;;;;;;;;;;;cA4Ba,aAAA,yCACX,KAAA,EAAO,oBAAA,CAAmB,YAAA,MACzB,mBAAA,CAAoB,YAAA"}
@@ -30,4 +30,4 @@ interface UseControllerReturn<TFieldValues extends object = object> {
30
30
  declare const useController$1: <TFieldValues extends object = object>(props: UseControllerProps$1<TFieldValues>) => UseControllerReturn<TFieldValues>;
31
31
  //#endregion
32
32
  export { UseControllerReturn as n, useController$1 as r, UseControllerProps$1 as t };
33
- //# sourceMappingURL=useController-BJ2SBdky.d.ts.map
33
+ //# sourceMappingURL=useController-DfiNbuEz.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useController-DfiNbuEz.d.ts","names":[],"sources":["../src/hooks/useController/useController.ts"],"mappings":";;;KAaY,oBAAA,yCACV,kBAAA,CAAsB,YAAA;AAAA,UAEP,mBAAA;EACf,KAAA,EAAO,IAAA,CAAK,qBAAA,CAAsB,YAAA;IAGhC,QAAA,MAAc,KAAA;IACd,KAAA;EAAA;EAEF,SAAA,EAAW,kBAAA,CAAmB,YAAA;EAC9B,UAAA,EAAY,oBAAA;AAAA;;;AARd;;;;;;;;;;;;;;;cA4Ba,eAAA,yCACX,KAAA,EAAO,oBAAA,CAAmB,YAAA,MACzB,mBAAA,CAAoB,YAAA"}