@fuf-stack/uniform 1.22.4 → 1.22.6

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 (442) hide show
  1. package/dist/Checkboxes/index.cjs +113 -3
  2. package/dist/Checkboxes/index.cjs.map +1 -0
  3. package/dist/Checkboxes/index.d.cts +534 -2
  4. package/dist/Checkboxes/index.d.cts.map +1 -0
  5. package/dist/Checkboxes/index.d.ts +534 -2
  6. package/dist/Checkboxes/index.d.ts.map +1 -0
  7. package/dist/Checkboxes/index.js +112 -2
  8. package/dist/Checkboxes/index.js.map +1 -0
  9. package/dist/DatePicker/index.cjs +194 -3
  10. package/dist/DatePicker/index.cjs.map +1 -0
  11. package/dist/DatePicker/index.d.cts +1413 -2
  12. package/dist/DatePicker/index.d.cts.map +1 -0
  13. package/dist/DatePicker/index.d.ts +1413 -2
  14. package/dist/DatePicker/index.d.ts.map +1 -0
  15. package/dist/DatePicker/index.js +193 -2
  16. package/dist/DatePicker/index.js.map +1 -0
  17. package/dist/FieldArray/index.cjs +495 -3
  18. package/dist/FieldArray/index.cjs.map +1 -0
  19. package/dist/FieldArray/index.d.cts +539 -2
  20. package/dist/FieldArray/index.d.cts.map +1 -0
  21. package/dist/FieldArray/index.d.ts +539 -2
  22. package/dist/FieldArray/index.d.ts.map +1 -0
  23. package/dist/FieldArray/index.js +494 -2
  24. package/dist/FieldArray/index.js.map +1 -0
  25. package/dist/FieldCard/index.cjs +230 -4
  26. package/dist/FieldCard/index.cjs.map +1 -0
  27. package/dist/FieldCard/index.d.cts +314 -2
  28. package/dist/FieldCard/index.d.cts.map +1 -0
  29. package/dist/FieldCard/index.d.ts +314 -2
  30. package/dist/FieldCard/index.d.ts.map +1 -0
  31. package/dist/FieldCard/index.js +225 -2
  32. package/dist/FieldCard/index.js.map +1 -0
  33. package/dist/{FieldCopyTestIdButton-Dpmo0uBV.js → FieldCopyTestIdButton-CRJBix9D.js} +2 -2
  34. package/dist/{FieldCopyTestIdButton-Dpmo0uBV.js.map → FieldCopyTestIdButton-CRJBix9D.js.map} +1 -1
  35. package/dist/{FieldCopyTestIdButton-ptoB1F75.cjs → FieldCopyTestIdButton-D3D_LmJh.cjs} +1 -8
  36. package/dist/{FieldCopyTestIdButton-ptoB1F75.cjs.map → FieldCopyTestIdButton-D3D_LmJh.cjs.map} +1 -1
  37. package/dist/{FieldValidationError-ktTyyyip.js → FieldValidationError-ByRoIxaM.js} +5 -5
  38. package/dist/{FieldValidationError-ktTyyyip.js.map → FieldValidationError-ByRoIxaM.js.map} +1 -1
  39. package/dist/{FieldValidationError-BQcvvU9i.cjs → FieldValidationError-CfYKzl7P.cjs} +5 -6
  40. package/dist/{FieldValidationError-BQcvvU9i.cjs.map → FieldValidationError-CfYKzl7P.cjs.map} +1 -1
  41. package/dist/Form/index.cjs +118 -3
  42. package/dist/Form/index.cjs.map +1 -0
  43. package/dist/Form/index.d.cts +43 -2
  44. package/dist/Form/index.d.cts.map +1 -0
  45. package/dist/Form/index.d.ts +43 -2
  46. package/dist/Form/index.d.ts.map +1 -0
  47. package/dist/Form/index.js +118 -2
  48. package/dist/Form/index.js.map +1 -0
  49. package/dist/{FormContext-3kamRn2C.d.cts → FormContext-BLWS7bhO.d.cts} +1 -1
  50. package/dist/{FormContext-3kamRn2C.d.cts.map → FormContext-BLWS7bhO.d.cts.map} +1 -1
  51. package/dist/{FormContext-BQeKOV-0.js → FormContext-DjJOJKxj.js} +1 -1
  52. package/dist/{FormContext-BQeKOV-0.js.map → FormContext-DjJOJKxj.js.map} +1 -1
  53. package/dist/{FormContext-DsmS_mkO.cjs → FormContext-EGH0cVnH.cjs} +1 -1
  54. package/dist/{FormContext-DsmS_mkO.cjs.map → FormContext-EGH0cVnH.cjs.map} +1 -1
  55. package/dist/{FormContext-i66vM5f1.d.ts → FormContext-LgzrDWu1.d.ts} +1 -1
  56. package/dist/{FormContext-i66vM5f1.d.ts.map → FormContext-LgzrDWu1.d.ts.map} +1 -1
  57. package/dist/Grid/index.cjs +1 -2
  58. package/dist/Grid/index.d.cts +22 -2
  59. package/dist/Grid/index.d.cts.map +1 -0
  60. package/dist/Grid/index.d.ts +22 -2
  61. package/dist/Grid/index.d.ts.map +1 -0
  62. package/dist/Grid/index.js +2 -2
  63. package/dist/{Grid-D-VcRGi9.cjs → Grid-BbqCRkuY.cjs} +1 -8
  64. package/dist/{Grid-D-VcRGi9.cjs.map → Grid-BbqCRkuY.cjs.map} +1 -1
  65. package/dist/{Grid-BQpLOB0G.js → Grid-CTs-Rb9G.js} +2 -2
  66. package/dist/{Grid-BQpLOB0G.js.map → Grid-CTs-Rb9G.js.map} +1 -1
  67. package/dist/Input/index.cjs +96 -3
  68. package/dist/Input/index.cjs.map +1 -0
  69. package/dist/Input/index.d.cts +677 -2
  70. package/dist/Input/index.d.cts.map +1 -0
  71. package/dist/Input/index.d.ts +677 -2
  72. package/dist/Input/index.d.ts.map +1 -0
  73. package/dist/Input/index.js +96 -2
  74. package/dist/Input/index.js.map +1 -0
  75. package/dist/RadioBoxes/index.cjs +136 -4
  76. package/dist/RadioBoxes/index.cjs.map +1 -0
  77. package/dist/RadioBoxes/index.d.cts +1477 -2
  78. package/dist/RadioBoxes/index.d.cts.map +1 -0
  79. package/dist/RadioBoxes/index.d.ts +1477 -2
  80. package/dist/RadioBoxes/index.d.ts.map +1 -0
  81. package/dist/RadioBoxes/index.js +135 -2
  82. package/dist/RadioBoxes/index.js.map +1 -0
  83. package/dist/RadioTabs/index.cjs +123 -3
  84. package/dist/RadioTabs/index.cjs.map +1 -0
  85. package/dist/RadioTabs/index.d.cts +585 -2
  86. package/dist/RadioTabs/index.d.cts.map +1 -0
  87. package/dist/RadioTabs/index.d.ts +585 -2
  88. package/dist/RadioTabs/index.d.ts.map +1 -0
  89. package/dist/RadioTabs/index.js +120 -2
  90. package/dist/RadioTabs/index.js.map +1 -0
  91. package/dist/Radios/index.cjs +74 -3
  92. package/dist/Radios/index.cjs.map +1 -0
  93. package/dist/Radios/index.d.cts +1263 -2
  94. package/dist/Radios/index.d.cts.map +1 -0
  95. package/dist/Radios/index.d.ts +1263 -2
  96. package/dist/Radios/index.d.ts.map +1 -0
  97. package/dist/Radios/index.js +73 -2
  98. package/dist/Radios/index.js.map +1 -0
  99. package/dist/Select/index.cjs +286 -3
  100. package/dist/Select/index.cjs.map +1 -0
  101. package/dist/Select/index.d.cts +3917 -2
  102. package/dist/Select/index.d.cts.map +1 -0
  103. package/dist/Select/index.d.ts +3917 -2
  104. package/dist/Select/index.d.ts.map +1 -0
  105. package/dist/Select/index.js +283 -2
  106. package/dist/Select/index.js.map +1 -0
  107. package/dist/Slider/index.cjs +109 -3
  108. package/dist/Slider/index.cjs.map +1 -0
  109. package/dist/Slider/index.d.cts +1760 -2
  110. package/dist/Slider/index.d.cts.map +1 -0
  111. package/dist/Slider/index.d.ts +1760 -2
  112. package/dist/Slider/index.d.ts.map +1 -0
  113. package/dist/Slider/index.js +108 -2
  114. package/dist/Slider/index.js.map +1 -0
  115. package/dist/SubmitButton/index.cjs +31 -3
  116. package/dist/SubmitButton/index.cjs.map +1 -0
  117. package/dist/SubmitButton/index.d.cts +38 -2
  118. package/dist/SubmitButton/index.d.cts.map +1 -0
  119. package/dist/SubmitButton/index.d.ts +38 -2
  120. package/dist/SubmitButton/index.d.ts.map +1 -0
  121. package/dist/SubmitButton/index.js +31 -2
  122. package/dist/SubmitButton/index.js.map +1 -0
  123. package/dist/Switch/index.cjs +82 -3
  124. package/dist/Switch/index.cjs.map +1 -0
  125. package/dist/Switch/index.d.cts +1257 -2
  126. package/dist/Switch/index.d.cts.map +1 -0
  127. package/dist/Switch/index.d.ts +1257 -2
  128. package/dist/Switch/index.d.ts.map +1 -0
  129. package/dist/Switch/index.js +81 -2
  130. package/dist/Switch/index.js.map +1 -0
  131. package/dist/SwitchBox/index.cjs +154 -4
  132. package/dist/SwitchBox/index.cjs.map +1 -0
  133. package/dist/SwitchBox/index.d.cts +473 -2
  134. package/dist/SwitchBox/index.d.cts.map +1 -0
  135. package/dist/SwitchBox/index.d.ts +473 -2
  136. package/dist/SwitchBox/index.d.ts.map +1 -0
  137. package/dist/SwitchBox/index.js +153 -2
  138. package/dist/SwitchBox/index.js.map +1 -0
  139. package/dist/TextArea/index.cjs +66 -3
  140. package/dist/TextArea/index.cjs.map +1 -0
  141. package/dist/TextArea/index.d.cts +659 -2
  142. package/dist/TextArea/index.d.cts.map +1 -0
  143. package/dist/TextArea/index.d.ts +659 -2
  144. package/dist/TextArea/index.d.ts.map +1 -0
  145. package/dist/TextArea/index.js +66 -2
  146. package/dist/TextArea/index.js.map +1 -0
  147. package/dist/Time/index.cjs +221 -3
  148. package/dist/Time/index.cjs.map +1 -0
  149. package/dist/Time/index.d.cts +1028 -2
  150. package/dist/Time/index.d.cts.map +1 -0
  151. package/dist/Time/index.d.ts +1028 -2
  152. package/dist/Time/index.d.ts.map +1 -0
  153. package/dist/Time/index.js +216 -2
  154. package/dist/Time/index.js.map +1 -0
  155. package/dist/helpers/index.cjs +0 -1
  156. package/dist/helpers/index.cjs.map +1 -1
  157. package/dist/helpers/index.js.map +1 -1
  158. package/dist/hooks/useClientValidation/index.cjs +177 -3
  159. package/dist/hooks/useClientValidation/index.cjs.map +1 -1
  160. package/dist/hooks/useClientValidation/index.d.cts +148 -2
  161. package/dist/hooks/useClientValidation/index.d.cts.map +1 -0
  162. package/dist/hooks/useClientValidation/index.d.ts +148 -2
  163. package/dist/hooks/useClientValidation/index.d.ts.map +1 -0
  164. package/dist/hooks/useClientValidation/index.js +175 -1
  165. package/dist/hooks/useClientValidation/index.js.map +1 -1
  166. package/dist/hooks/useController/index.cjs +1 -1
  167. package/dist/hooks/useController/index.d.cts +1 -1
  168. package/dist/hooks/useController/index.d.ts +1 -1
  169. package/dist/hooks/useController/index.js +1 -1
  170. package/dist/hooks/useFormContext/index.cjs +1 -1
  171. package/dist/hooks/useFormContext/index.d.cts +1 -1
  172. package/dist/hooks/useFormContext/index.d.ts +1 -1
  173. package/dist/hooks/useFormContext/index.js +1 -1
  174. package/dist/hooks/useInput/index.cjs +0 -1
  175. package/dist/hooks/useInput/index.d.cts +1 -1
  176. package/dist/hooks/useInput/index.d.ts +1 -1
  177. package/dist/hooks/useInput/index.js +1 -1
  178. package/dist/hooks/useInputValueDebounce/index.cjs +1 -2
  179. package/dist/hooks/useInputValueDebounce/index.cjs.map +1 -1
  180. package/dist/hooks/useInputValueDebounce/index.d.cts +66 -2
  181. package/dist/hooks/useInputValueDebounce/index.d.cts.map +1 -0
  182. package/dist/hooks/useInputValueDebounce/index.d.ts +66 -2
  183. package/dist/hooks/useInputValueDebounce/index.d.ts.map +1 -0
  184. package/dist/hooks/useInputValueDebounce/index.js +1 -1
  185. package/dist/hooks/useInputValueTransform/index.cjs +1 -1
  186. package/dist/hooks/useInputValueTransform/index.d.cts +1 -1
  187. package/dist/hooks/useInputValueTransform/index.d.ts +1 -1
  188. package/dist/hooks/useInputValueTransform/index.js +1 -1
  189. package/dist/hooks/useUniformField/index.cjs +8 -8
  190. package/dist/hooks/useUniformField/index.cjs.map +1 -1
  191. package/dist/hooks/useUniformField/index.d.cts +98 -2
  192. package/dist/hooks/useUniformField/index.d.cts.map +1 -0
  193. package/dist/hooks/useUniformField/index.d.ts +98 -2
  194. package/dist/hooks/useUniformField/index.d.ts.map +1 -0
  195. package/dist/hooks/useUniformField/index.js +8 -8
  196. package/dist/hooks/useUniformField/index.js.map +1 -1
  197. package/dist/hooks/useUniformFieldArray/index.cjs +1 -2
  198. package/dist/hooks/useUniformFieldArray/index.cjs.map +1 -1
  199. package/dist/hooks/useUniformFieldArray/index.d.cts +79 -2
  200. package/dist/hooks/useUniformFieldArray/index.d.cts.map +1 -0
  201. package/dist/hooks/useUniformFieldArray/index.d.ts +79 -2
  202. package/dist/hooks/useUniformFieldArray/index.d.ts.map +1 -0
  203. package/dist/hooks/useUniformFieldArray/index.js +1 -1
  204. package/dist/hooks/useWatchFormReset/index.cjs +1 -2
  205. package/dist/hooks/useWatchFormReset/index.cjs.map +1 -1
  206. package/dist/hooks/useWatchFormReset/index.d.cts +38 -2
  207. package/dist/hooks/useWatchFormReset/index.d.cts.map +1 -0
  208. package/dist/hooks/useWatchFormReset/index.d.ts +38 -2
  209. package/dist/hooks/useWatchFormReset/index.d.ts.map +1 -0
  210. package/dist/hooks/useWatchFormReset/index.js +1 -1
  211. package/dist/hooks/useWatchUserChange/index.cjs +82 -2
  212. package/dist/hooks/useWatchUserChange/index.cjs.map +1 -1
  213. package/dist/hooks/useWatchUserChange/index.d.cts +80 -2
  214. package/dist/hooks/useWatchUserChange/index.d.cts.map +1 -0
  215. package/dist/hooks/useWatchUserChange/index.d.ts +80 -2
  216. package/dist/hooks/useWatchUserChange/index.d.ts.map +1 -0
  217. package/dist/hooks/useWatchUserChange/index.js +81 -1
  218. package/dist/hooks/useWatchUserChange/index.js.map +1 -1
  219. package/dist/partials/FieldCopyTestIdButton/index.cjs +1 -2
  220. package/dist/partials/FieldCopyTestIdButton/index.d.cts +14 -2
  221. package/dist/partials/FieldCopyTestIdButton/index.d.cts.map +1 -0
  222. package/dist/partials/FieldCopyTestIdButton/index.d.ts +14 -2
  223. package/dist/partials/FieldCopyTestIdButton/index.d.ts.map +1 -0
  224. package/dist/partials/FieldCopyTestIdButton/index.js +2 -2
  225. package/dist/partials/FieldValidationError/index.cjs +1 -2
  226. package/dist/partials/FieldValidationError/index.d.cts +22 -2
  227. package/dist/partials/FieldValidationError/index.d.cts.map +1 -0
  228. package/dist/partials/FieldValidationError/index.d.ts +22 -2
  229. package/dist/partials/FieldValidationError/index.d.ts.map +1 -0
  230. package/dist/partials/FieldValidationError/index.js +2 -2
  231. package/dist/{useController-CzP0aVFC.d.ts → useController-CvQqCvFJ.d.ts} +1 -1
  232. package/dist/{useController-CzP0aVFC.d.ts.map → useController-CvQqCvFJ.d.ts.map} +1 -1
  233. package/dist/{useController--lRPWBuD.cjs → useController-Dbe7ADG6.cjs} +2 -2
  234. package/dist/{useController--lRPWBuD.cjs.map → useController-Dbe7ADG6.cjs.map} +1 -1
  235. package/dist/{useController-B287flU_.js → useController-DxFS0u7c.js} +2 -2
  236. package/dist/{useController-B287flU_.js.map → useController-DxFS0u7c.js.map} +1 -1
  237. package/dist/{useController-BT3Fd0IO.d.cts → useController-fblEApv_.d.cts} +1 -1
  238. package/dist/{useController-BT3Fd0IO.d.cts.map → useController-fblEApv_.d.cts.map} +1 -1
  239. package/dist/{useFormContext-CpLVpNAf.d.ts → useFormContext-B1-deU4Z.d.ts} +4 -4
  240. package/dist/{useFormContext-CpLVpNAf.d.ts.map → useFormContext-B1-deU4Z.d.ts.map} +1 -1
  241. package/dist/{useFormContext-CT8H8xIe.js → useFormContext-BJqa1FoT.js} +2 -2
  242. package/dist/{useFormContext-CT8H8xIe.js.map → useFormContext-BJqa1FoT.js.map} +1 -1
  243. package/dist/{useFormContext-Ddc1HWKv.d.cts → useFormContext-D5vrT2sg.d.cts} +4 -4
  244. package/dist/{useFormContext-Ddc1HWKv.d.cts.map → useFormContext-D5vrT2sg.d.cts.map} +1 -1
  245. package/dist/{useFormContext-CrXwNYiB.cjs → useFormContext-kUHonwgu.cjs} +2 -2
  246. package/dist/{useFormContext-CrXwNYiB.cjs.map → useFormContext-kUHonwgu.cjs.map} +1 -1
  247. package/dist/{useInputValueTransform-CNCBU7a9.d.cts → useInputValueTransform-DCXXb2Lp.d.cts} +1 -1
  248. package/dist/{useInputValueTransform-CNCBU7a9.d.cts.map → useInputValueTransform-DCXXb2Lp.d.cts.map} +1 -1
  249. package/dist/{useInputValueTransform-dLfFIYW4.d.ts → useInputValueTransform-DCXXb2Lp.d.ts} +1 -1
  250. package/dist/{useInputValueTransform-dLfFIYW4.d.ts.map → useInputValueTransform-DCXXb2Lp.d.ts.map} +1 -1
  251. package/dist/{useInputValueTransform-CXdmtc0Q.js → useInputValueTransform-DJ5zkqSy.js} +1 -1
  252. package/dist/{useInputValueTransform-CXdmtc0Q.js.map → useInputValueTransform-DJ5zkqSy.js.map} +1 -1
  253. package/dist/{useInputValueTransform-Bm65K8LX.cjs → useInputValueTransform-P62UUZBl.cjs} +1 -2
  254. package/dist/{useInputValueTransform-Bm65K8LX.cjs.map → useInputValueTransform-P62UUZBl.cjs.map} +1 -1
  255. package/package.json +6 -13
  256. package/dist/Checkboxes-D1hppxDE.js +0 -112
  257. package/dist/Checkboxes-D1hppxDE.js.map +0 -1
  258. package/dist/Checkboxes-DHk09GmH.cjs +0 -124
  259. package/dist/Checkboxes-DHk09GmH.cjs.map +0 -1
  260. package/dist/DatePicker-BUSi8SWQ.js +0 -193
  261. package/dist/DatePicker-BUSi8SWQ.js.map +0 -1
  262. package/dist/DatePicker-DuBjvS5g.cjs +0 -205
  263. package/dist/DatePicker-DuBjvS5g.cjs.map +0 -1
  264. package/dist/FieldArray-BxmK1NRd.js +0 -494
  265. package/dist/FieldArray-BxmK1NRd.js.map +0 -1
  266. package/dist/FieldArray-DgiQpIdr.cjs +0 -506
  267. package/dist/FieldArray-DgiQpIdr.cjs.map +0 -1
  268. package/dist/FieldCard-BK6SNqFY.js +0 -222
  269. package/dist/FieldCard-BK6SNqFY.js.map +0 -1
  270. package/dist/FieldCard-C-DZ5ARr.cjs +0 -234
  271. package/dist/FieldCard-C-DZ5ARr.cjs.map +0 -1
  272. package/dist/Form-CYlsIABv.cjs +0 -125
  273. package/dist/Form-CYlsIABv.cjs.map +0 -1
  274. package/dist/Form-D3yfDu4L.js +0 -114
  275. package/dist/Form-D3yfDu4L.js.map +0 -1
  276. package/dist/Input-B5RxbkNS.js +0 -96
  277. package/dist/Input-B5RxbkNS.js.map +0 -1
  278. package/dist/Input-DvVViuWH.cjs +0 -108
  279. package/dist/Input-DvVViuWH.cjs.map +0 -1
  280. package/dist/RadioBoxes-BJz-aJp3.js +0 -135
  281. package/dist/RadioBoxes-BJz-aJp3.js.map +0 -1
  282. package/dist/RadioBoxes-CR--FBhQ.cjs +0 -153
  283. package/dist/RadioBoxes-CR--FBhQ.cjs.map +0 -1
  284. package/dist/RadioTabs-Btt582Nl.cjs +0 -133
  285. package/dist/RadioTabs-Btt582Nl.cjs.map +0 -1
  286. package/dist/RadioTabs-CYmzrPBG.js +0 -120
  287. package/dist/RadioTabs-CYmzrPBG.js.map +0 -1
  288. package/dist/Radios-DZxhrX96.js +0 -73
  289. package/dist/Radios-DZxhrX96.js.map +0 -1
  290. package/dist/Radios-Jg9mwE0B.cjs +0 -85
  291. package/dist/Radios-Jg9mwE0B.cjs.map +0 -1
  292. package/dist/Select-CZwuEAB5.cjs +0 -296
  293. package/dist/Select-CZwuEAB5.cjs.map +0 -1
  294. package/dist/Select-CgeqhZIC.js +0 -283
  295. package/dist/Select-CgeqhZIC.js.map +0 -1
  296. package/dist/Slider-Bpxt-Qgj.cjs +0 -120
  297. package/dist/Slider-Bpxt-Qgj.cjs.map +0 -1
  298. package/dist/Slider-DRfSw0uE.js +0 -108
  299. package/dist/Slider-DRfSw0uE.js.map +0 -1
  300. package/dist/SubmitButton-D-wn1PJV.cjs +0 -43
  301. package/dist/SubmitButton-D-wn1PJV.cjs.map +0 -1
  302. package/dist/SubmitButton-D6aU7IgC.js +0 -31
  303. package/dist/SubmitButton-D6aU7IgC.js.map +0 -1
  304. package/dist/Switch-D9DNrqmj.js +0 -81
  305. package/dist/Switch-D9DNrqmj.js.map +0 -1
  306. package/dist/Switch-hjjy34QB.cjs +0 -93
  307. package/dist/Switch-hjjy34QB.cjs.map +0 -1
  308. package/dist/SwitchBox-BU1XieaZ.js +0 -153
  309. package/dist/SwitchBox-BU1XieaZ.js.map +0 -1
  310. package/dist/SwitchBox-Dl-F5y2m.cjs +0 -171
  311. package/dist/SwitchBox-Dl-F5y2m.cjs.map +0 -1
  312. package/dist/TextArea-CMXm-kTK.cjs +0 -78
  313. package/dist/TextArea-CMXm-kTK.cjs.map +0 -1
  314. package/dist/TextArea-DAg_K-QP.js +0 -66
  315. package/dist/TextArea-DAg_K-QP.js.map +0 -1
  316. package/dist/Time-CDptQ3CK.js +0 -213
  317. package/dist/Time-CDptQ3CK.js.map +0 -1
  318. package/dist/Time-WKgbji5k.cjs +0 -219
  319. package/dist/Time-WKgbji5k.cjs.map +0 -1
  320. package/dist/index-54OZEaUU.d.ts +0 -43
  321. package/dist/index-54OZEaUU.d.ts.map +0 -1
  322. package/dist/index-7UT2Ki5e.d.cts +0 -113
  323. package/dist/index-7UT2Ki5e.d.cts.map +0 -1
  324. package/dist/index-9_3XTDJC.d.cts +0 -174
  325. package/dist/index-9_3XTDJC.d.cts.map +0 -1
  326. package/dist/index-B5SfdA5O.d.cts +0 -99
  327. package/dist/index-B5SfdA5O.d.cts.map +0 -1
  328. package/dist/index-B61zRzeS.d.cts +0 -101
  329. package/dist/index-B61zRzeS.d.cts.map +0 -1
  330. package/dist/index-B7gQppgQ.d.ts +0 -116
  331. package/dist/index-B7gQppgQ.d.ts.map +0 -1
  332. package/dist/index-BDFJDKmz.d.ts +0 -166
  333. package/dist/index-BDFJDKmz.d.ts.map +0 -1
  334. package/dist/index-BPaSE_7b.d.ts +0 -179
  335. package/dist/index-BPaSE_7b.d.ts.map +0 -1
  336. package/dist/index-BSjcTo7A.d.ts +0 -147
  337. package/dist/index-BSjcTo7A.d.ts.map +0 -1
  338. package/dist/index-BmMspnsJ.d.cts +0 -137
  339. package/dist/index-BmMspnsJ.d.cts.map +0 -1
  340. package/dist/index-BqxDWhNr.d.cts +0 -22
  341. package/dist/index-BqxDWhNr.d.cts.map +0 -1
  342. package/dist/index-Bzs7_gnk.d.cts +0 -116
  343. package/dist/index-Bzs7_gnk.d.cts.map +0 -1
  344. package/dist/index-C3-TV4Up.d.cts +0 -43
  345. package/dist/index-C3-TV4Up.d.cts.map +0 -1
  346. package/dist/index-C4GJH8Xv.d.ts +0 -290
  347. package/dist/index-C4GJH8Xv.d.ts.map +0 -1
  348. package/dist/index-CE8fnXuQ.d.ts +0 -167
  349. package/dist/index-CE8fnXuQ.d.ts.map +0 -1
  350. package/dist/index-CEJxjf5R.d.ts +0 -22
  351. package/dist/index-CEJxjf5R.d.ts.map +0 -1
  352. package/dist/index-CHQKk_fN2.d.ts +0 -14
  353. package/dist/index-CHQKk_fN2.d.ts.map +0 -1
  354. package/dist/index-CIiOXrrY.d.ts +0 -99
  355. package/dist/index-CIiOXrrY.d.ts.map +0 -1
  356. package/dist/index-CV7wqRev.d.ts +0 -38
  357. package/dist/index-CV7wqRev.d.ts.map +0 -1
  358. package/dist/index-CXvUaeCL.d.cts +0 -14
  359. package/dist/index-CXvUaeCL.d.cts.map +0 -1
  360. package/dist/index-C_zjtsGM.d.ts +0 -113
  361. package/dist/index-C_zjtsGM.d.ts.map +0 -1
  362. package/dist/index-CbPJiRK2.d.ts +0 -83
  363. package/dist/index-CbPJiRK2.d.ts.map +0 -1
  364. package/dist/index-CvP3tbVV.d.ts +0 -137
  365. package/dist/index-CvP3tbVV.d.ts.map +0 -1
  366. package/dist/index-Cwb7sTO0.d.ts +0 -154
  367. package/dist/index-Cwb7sTO0.d.ts.map +0 -1
  368. package/dist/index-CxY9VWv5.d.cts +0 -154
  369. package/dist/index-CxY9VWv5.d.cts.map +0 -1
  370. package/dist/index-D8udSkgA.d.cts +0 -167
  371. package/dist/index-D8udSkgA.d.cts.map +0 -1
  372. package/dist/index-DBsF7xsq.d.cts +0 -147
  373. package/dist/index-DBsF7xsq.d.cts.map +0 -1
  374. package/dist/index-DNADTCoc.d.cts +0 -290
  375. package/dist/index-DNADTCoc.d.cts.map +0 -1
  376. package/dist/index-DRg0anjB.d.cts +0 -179
  377. package/dist/index-DRg0anjB.d.cts.map +0 -1
  378. package/dist/index-DUmNI6cE.d.cts +0 -83
  379. package/dist/index-DUmNI6cE.d.cts.map +0 -1
  380. package/dist/index-Db0WD4d1.d.cts +0 -166
  381. package/dist/index-Db0WD4d1.d.cts.map +0 -1
  382. package/dist/index-DpXSZCZe.d.cts +0 -38
  383. package/dist/index-DpXSZCZe.d.cts.map +0 -1
  384. package/dist/index-GxTY7aAc.d.ts +0 -174
  385. package/dist/index-GxTY7aAc.d.ts.map +0 -1
  386. package/dist/index-P30z4VRT.d.cts +0 -22
  387. package/dist/index-P30z4VRT.d.cts.map +0 -1
  388. package/dist/index-PMCqBX0t.d.ts +0 -101
  389. package/dist/index-PMCqBX0t.d.ts.map +0 -1
  390. package/dist/index-PWRw2bPH.d.ts +0 -22
  391. package/dist/index-PWRw2bPH.d.ts.map +0 -1
  392. package/dist/index-QgVr4iWX.d.cts +0 -122
  393. package/dist/index-QgVr4iWX.d.cts.map +0 -1
  394. package/dist/index-dgho7gpc.d.ts +0 -122
  395. package/dist/index-dgho7gpc.d.ts.map +0 -1
  396. package/dist/index.cjs +0 -85
  397. package/dist/index.cjs.map +0 -1
  398. package/dist/index.d.cts +0 -31
  399. package/dist/index.d.ts +0 -31
  400. package/dist/index.js +0 -36
  401. package/dist/index.js.map +0 -1
  402. package/dist/useClientValidation-BRfhqRom.cjs +0 -190
  403. package/dist/useClientValidation-BRfhqRom.cjs.map +0 -1
  404. package/dist/useClientValidation-C2dLJnDI.d.cts +0 -148
  405. package/dist/useClientValidation-C2dLJnDI.d.cts.map +0 -1
  406. package/dist/useClientValidation-DpLdzIAb.js +0 -178
  407. package/dist/useClientValidation-DpLdzIAb.js.map +0 -1
  408. package/dist/useClientValidation-qRq2_spX.d.ts +0 -148
  409. package/dist/useClientValidation-qRq2_spX.d.ts.map +0 -1
  410. package/dist/useInputValueDebounce-CfQDiomI.d.cts +0 -66
  411. package/dist/useInputValueDebounce-CfQDiomI.d.cts.map +0 -1
  412. package/dist/useInputValueDebounce-DZgzL7GQ.d.ts +0 -66
  413. package/dist/useInputValueDebounce-DZgzL7GQ.d.ts.map +0 -1
  414. package/dist/useUniformField-CmAYcGER.d.cts +0 -98
  415. package/dist/useUniformField-CmAYcGER.d.cts.map +0 -1
  416. package/dist/useUniformField-DJDpQzRo.d.ts +0 -98
  417. package/dist/useUniformField-DJDpQzRo.d.ts.map +0 -1
  418. package/dist/useUniformFieldArray-D3fdzwzD.d.cts +0 -79
  419. package/dist/useUniformFieldArray-D3fdzwzD.d.cts.map +0 -1
  420. package/dist/useUniformFieldArray-zGcIhwhF.d.ts +0 -79
  421. package/dist/useUniformFieldArray-zGcIhwhF.d.ts.map +0 -1
  422. package/dist/useWatchFormReset-BSd6jMxU.d.cts +0 -38
  423. package/dist/useWatchFormReset-BSd6jMxU.d.cts.map +0 -1
  424. package/dist/useWatchFormReset-C7YJ-I3N.d.ts +0 -38
  425. package/dist/useWatchFormReset-C7YJ-I3N.d.ts.map +0 -1
  426. package/dist/useWatchUserChange-C1xWHtFG.cjs +0 -90
  427. package/dist/useWatchUserChange-C1xWHtFG.cjs.map +0 -1
  428. package/dist/useWatchUserChange-CpyZz2i7.d.ts +0 -80
  429. package/dist/useWatchUserChange-CpyZz2i7.d.ts.map +0 -1
  430. package/dist/useWatchUserChange-DSAboNCs.d.cts +0 -80
  431. package/dist/useWatchUserChange-DSAboNCs.d.cts.map +0 -1
  432. package/dist/useWatchUserChange-DSQGsl1R.js +0 -84
  433. package/dist/useWatchUserChange-DSQGsl1R.js.map +0 -1
  434. /package/dist/{index-BLwMeReG.d.ts → index-BKZ67WMa.d.cts} +0 -0
  435. /package/dist/{index-C2gUMYkE.d.cts → index-BKZ67WMa.d.ts} +0 -0
  436. /package/dist/{index-CJgP-E0M.d.cts → index-BVVgDSdq.d.cts} +0 -0
  437. /package/dist/{index-Cg9utiy0.d.ts → index-BVVgDSdq.d.ts} +0 -0
  438. /package/dist/{index-CspKFJM1.d.cts → index-DmtQKWjk.d.cts} +0 -0
  439. /package/dist/{index-h64gcVNJ.d.ts → index-DmtQKWjk.d.ts} +0 -0
  440. /package/dist/{useInput-CVm3tP78.js → useInput-C0aJaAGe.js} +0 -0
  441. /package/dist/{useInput-BdH8oftG.d.ts → useInput-ClpHDPdr.d.cts} +0 -0
  442. /package/dist/{useInput-DZOmMKcp.d.cts → useInput-ClpHDPdr.d.ts} +0 -0
@@ -1,122 +0,0 @@
1
- import { TVClassName, TVProps } from "@fuf-stack/pixel-utils";
2
- import { ReactElement, ReactNode } from "react";
3
-
4
- //#region src/Radios/Radios.d.ts
5
- declare const radiosVariants: import("tailwind-variants").TVReturnType<{
6
- [key: string]: {
7
- [key: string]: import("tailwind-merge").ClassNameValue | {
8
- base?: import("tailwind-merge").ClassNameValue;
9
- label?: import("tailwind-merge").ClassNameValue;
10
- wrapper?: import("tailwind-merge").ClassNameValue;
11
- itemBase?: import("tailwind-merge").ClassNameValue;
12
- itemControl?: import("tailwind-merge").ClassNameValue;
13
- itemDescription?: import("tailwind-merge").ClassNameValue;
14
- itemLabel?: import("tailwind-merge").ClassNameValue;
15
- itemLabelWrapper?: import("tailwind-merge").ClassNameValue;
16
- itemWrapper?: import("tailwind-merge").ClassNameValue;
17
- };
18
- };
19
- } | {
20
- [x: string]: {
21
- [x: string]: import("tailwind-merge").ClassNameValue | {
22
- base?: import("tailwind-merge").ClassNameValue;
23
- label?: import("tailwind-merge").ClassNameValue;
24
- wrapper?: import("tailwind-merge").ClassNameValue;
25
- itemBase?: import("tailwind-merge").ClassNameValue;
26
- itemControl?: import("tailwind-merge").ClassNameValue;
27
- itemDescription?: import("tailwind-merge").ClassNameValue;
28
- itemLabel?: import("tailwind-merge").ClassNameValue;
29
- itemLabelWrapper?: import("tailwind-merge").ClassNameValue;
30
- itemWrapper?: import("tailwind-merge").ClassNameValue;
31
- };
32
- };
33
- } | {}, {
34
- base: string;
35
- itemBase: string;
36
- itemControl: string;
37
- itemDescription: string;
38
- itemLabel: string;
39
- itemLabelWrapper: string;
40
- itemWrapper: string;
41
- label: string;
42
- wrapper: string;
43
- }, undefined, {
44
- [key: string]: {
45
- [key: string]: import("tailwind-merge").ClassNameValue | {
46
- base?: import("tailwind-merge").ClassNameValue;
47
- label?: import("tailwind-merge").ClassNameValue;
48
- wrapper?: import("tailwind-merge").ClassNameValue;
49
- itemBase?: import("tailwind-merge").ClassNameValue;
50
- itemControl?: import("tailwind-merge").ClassNameValue;
51
- itemDescription?: import("tailwind-merge").ClassNameValue;
52
- itemLabel?: import("tailwind-merge").ClassNameValue;
53
- itemLabelWrapper?: import("tailwind-merge").ClassNameValue;
54
- itemWrapper?: import("tailwind-merge").ClassNameValue;
55
- };
56
- };
57
- } | {}, {
58
- base: string;
59
- itemBase: string;
60
- itemControl: string;
61
- itemDescription: string;
62
- itemLabel: string;
63
- itemLabelWrapper: string;
64
- itemWrapper: string;
65
- label: string;
66
- wrapper: string;
67
- }, import("tailwind-variants").TVReturnType<unknown, {
68
- base: string;
69
- itemBase: string;
70
- itemControl: string;
71
- itemDescription: string;
72
- itemLabel: string;
73
- itemLabelWrapper: string;
74
- itemWrapper: string;
75
- label: string;
76
- wrapper: string;
77
- }, undefined, unknown, unknown, undefined>>;
78
- type VariantProps = TVProps<typeof radiosVariants>;
79
- type ClassName = TVClassName<typeof radiosVariants>;
80
- interface RadioOption {
81
- /** disables the option */
82
- disabled?: boolean;
83
- /** option label */
84
- label?: ReactNode;
85
- /** option icon */
86
- icon?: ReactNode;
87
- /** HTML data-testid attribute of the option */
88
- testId?: string;
89
- /** option value */
90
- value: string | number;
91
- }
92
- interface RadiosProps extends VariantProps {
93
- /** Custom aria-label for accessibility. If not provided, falls back to field name when no visible label exists */
94
- ariaLabel?: string;
95
- /** CSS class name */
96
- className?: ClassName;
97
- /** Determines if the Buttons are disabled or not. */
98
- disabled?: boolean;
99
- /** determines orientation of the Buttons. */
100
- inline?: boolean;
101
- /** Label displayed next to the RadioButton. */
102
- label?: ReactNode;
103
- /** Name the RadioButtons are registered at in HTML forms (react-hook-form). */
104
- name: string;
105
- /** Radio button configuration. */
106
- options: RadioOption[];
107
- /** Id to grab element in internal tests. */
108
- testId?: string;
109
- }
110
- /**
111
- * Radios component based on [HeroUI RadioGroup](https://www.heroui.com//docs/components/radio-group)
112
- */
113
- declare const Radios: ({
114
- className,
115
- inline,
116
- name,
117
- options,
118
- ...uniformFieldProps
119
- }: RadiosProps) => ReactElement;
120
- //#endregion
121
- export { RadiosProps as n, Radios as t };
122
- //# sourceMappingURL=index-dgho7gpc.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index-dgho7gpc.d.ts","names":[],"sources":["../src/Radios/Radios.tsx"],"mappings":";;;;cAaa,cAAA,8BAAc,YAAA;EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAkBtB,YAAA,GAAe,OAAO,QAAQ,cAAA;AAAA,KAC9B,SAAA,GAAY,WAAW,QAAQ,cAAA;AAAA,UAEnB,WAAA;;EAEf,QAAA;;EAEA,KAAA,GAAQ,SAAA;;EAER,IAAA,GAAO,SAAS;;EAEhB,MAAA;;EAEA,KAAA;AAAA;AAAA,UAGe,WAAA,SAAoB,YAAA;;EAEnC,SAAA;;EAEA,SAAA,GAAY,SAAA;;EAEZ,QAAA;;EAEA,MAAA;;EAEA,KAAA,GAAQ,SAAA;;EAER,IAAA;EA5BG;EA8BH,OAAA,EAAS,WAAA;;EAET,MAAA;AAAA;AAhC+C;;;AAAA,cAsC3C,MAAA;EAAU,SAAA;EAAA,MAAA;EAAA,IAAA;EAAA,OAAA;EAAA,GAAA;AAAA,GAMb,WAAA,KAAc,YAAA"}
package/dist/index.cjs DELETED
@@ -1,85 +0,0 @@
1
- Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- require("./FormContext-DsmS_mkO.cjs");
3
- const require_helpers_index = require("./helpers/index.cjs");
4
- const require_FieldCopyTestIdButton = require("./FieldCopyTestIdButton-ptoB1F75.cjs");
5
- const require_FieldValidationError = require("./FieldValidationError-BQcvvU9i.cjs");
6
- const require_useController = require("./useController--lRPWBuD.cjs");
7
- const require_useFormContext = require("./useFormContext-CrXwNYiB.cjs");
8
- const require_useInputValueTransform = require("./useInputValueTransform-Bm65K8LX.cjs");
9
- const require_hooks_useUniformField_index = require("./hooks/useUniformField/index.cjs");
10
- const require_Checkboxes = require("./Checkboxes-DHk09GmH.cjs");
11
- const require_DatePicker = require("./DatePicker-DuBjvS5g.cjs");
12
- const require_hooks_useWatchFormReset_index = require("./hooks/useWatchFormReset/index.cjs");
13
- const require_hooks_useUniformFieldArray_index = require("./hooks/useUniformFieldArray/index.cjs");
14
- const require_FieldArray = require("./FieldArray-DgiQpIdr.cjs");
15
- const require_Grid = require("./Grid-D-VcRGi9.cjs");
16
- const require_FieldCard = require("./FieldCard-C-DZ5ARr.cjs");
17
- const require_Form = require("./Form-CYlsIABv.cjs");
18
- const require_hooks_useInputValueDebounce_index = require("./hooks/useInputValueDebounce/index.cjs");
19
- const require_Input = require("./Input-DvVViuWH.cjs");
20
- const require_RadioBoxes = require("./RadioBoxes-CR--FBhQ.cjs");
21
- const require_RadioTabs = require("./RadioTabs-Btt582Nl.cjs");
22
- const require_Radios = require("./Radios-Jg9mwE0B.cjs");
23
- const require_Select = require("./Select-CZwuEAB5.cjs");
24
- const require_Slider = require("./Slider-Bpxt-Qgj.cjs");
25
- const require_SubmitButton = require("./SubmitButton-D-wn1PJV.cjs");
26
- const require_Switch = require("./Switch-hjjy34QB.cjs");
27
- const require_SwitchBox = require("./SwitchBox-Dl-F5y2m.cjs");
28
- const require_TextArea = require("./TextArea-CMXm-kTK.cjs");
29
- const require_Time = require("./Time-WKgbji5k.cjs");
30
- const require_useClientValidation = require("./useClientValidation-BRfhqRom.cjs");
31
- const require_useWatchUserChange = require("./useWatchUserChange-C1xWHtFG.cjs");
32
- let _heroui_input = require("@heroui/input");
33
- //#region src/index.ts
34
- /* v8 ignore stop */
35
- //#endregion
36
- exports.Checkboxes = require_Checkboxes.Checkboxes;
37
- exports.DatePicker = require_DatePicker.DatePicker;
38
- exports.FieldArray = require_FieldArray.FieldArray;
39
- exports.FieldCard = require_FieldCard.FieldCard;
40
- exports.FieldCopyTestIdButton = require_FieldCopyTestIdButton.FieldCopyTestIdButton;
41
- exports.FieldValidationError = require_FieldValidationError.FieldValidationError;
42
- exports.Form = require_Form.Form;
43
- exports.Grid = require_Grid.Grid;
44
- exports.Input = require_Input.Input;
45
- exports.RadioBoxes = require_RadioBoxes.RadioBoxes;
46
- exports.RadioTabs = require_RadioTabs.RadioTabs;
47
- exports.Radios = require_Radios.Radios;
48
- exports.Select = require_Select.Select;
49
- exports.Slider = require_Slider.Slider;
50
- exports.SubmitButton = require_SubmitButton.SubmitButton;
51
- exports.Switch = require_Switch.Switch;
52
- exports.SwitchBox = require_SwitchBox.SwitchBox;
53
- exports.TextArea = require_TextArea.TextArea;
54
- exports.Time = require_Time.Time;
55
- exports.checkFieldIsRequired = require_useFormContext.checkFieldIsRequired;
56
- exports.clientValidationSchemaByName = require_useClientValidation.clientValidationSchemaByName;
57
- exports.createOptionValueConverter = require_helpers_index.createOptionValueConverter;
58
- exports.fieldCardVariants = require_FieldCard.fieldCardVariants;
59
- exports.flatArrayKey = require_helpers_index.flatArrayKey;
60
- exports.fromNullishString = require_helpers_index.fromNullishString;
61
- exports.isValueEmpty = require_helpers_index.isValueEmpty;
62
- exports.nameToTestId = require_helpers_index.nameToTestId;
63
- exports.radioBoxVariants = require_RadioBoxes.radioBoxVariants;
64
- exports.switchBoxVariants = require_SwitchBox.switchBoxVariants;
65
- exports.toFormFormat = require_helpers_index.toFormFormat;
66
- exports.toNullishString = require_helpers_index.toNullishString;
67
- exports.toSubmitFormat = require_helpers_index.toSubmitFormat;
68
- exports.toValidationFormat = require_helpers_index.toValidationFormat;
69
- exports.useClientValidation = require_useClientValidation.useClientValidation;
70
- exports.useController = require_useController.useController;
71
- exports.useFormContext = require_useFormContext.useFormContext;
72
- Object.defineProperty(exports, "useInput", {
73
- enumerable: true,
74
- get: function() {
75
- return _heroui_input.useInput;
76
- }
77
- });
78
- exports.useInputValueDebounce = require_hooks_useInputValueDebounce_index.useInputValueDebounce;
79
- exports.useInputValueTransform = require_useInputValueTransform.useInputValueTransform;
80
- exports.useUniformField = require_hooks_useUniformField_index.useUniformField;
81
- exports.useUniformFieldArray = require_hooks_useUniformFieldArray_index.useUniformFieldArray;
82
- exports.useWatchFormReset = require_hooks_useWatchFormReset_index.useWatchFormReset;
83
- exports.useWatchUserChange = require_useWatchUserChange.useWatchUserChange;
84
-
85
- //# sourceMappingURL=index.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.cjs","names":[],"sources":["../src/index.ts"],"sourcesContent":["/* v8 ignore start */\n\n// components\nexport * from './Checkboxes';\nexport * from './DatePicker';\nexport * from './FieldArray';\nexport * from './FieldCard';\nexport * from './Form';\nexport * from './Grid';\nexport * from './helpers';\nexport * from './Input';\nexport * from './partials/FieldCopyTestIdButton';\nexport * from './partials/FieldValidationError';\nexport * from './RadioBoxes';\nexport * from './Radios';\nexport * from './RadioTabs';\nexport * from './Select';\nexport * from './Slider';\nexport * from './SubmitButton';\nexport * from './Switch';\nexport * from './SwitchBox';\nexport * from './TextArea';\nexport * from './Time';\n\n// hooks\nexport * from './hooks/useClientValidation/useClientValidation';\nexport * from './hooks/useController/useController';\nexport * from './hooks/useFormContext/useFormContext';\nexport * from './hooks/useInput/useInput';\nexport * from './hooks/useInputValueDebounce/useInputValueDebounce';\nexport * from './hooks/useInputValueTransform/useInputValueTransform';\nexport * from './hooks/useUniformField/useUniformField';\nexport * from './hooks/useUniformFieldArray/useUniformFieldArray';\nexport * from './hooks/useWatchFormReset/useWatchFormReset';\nexport * from './hooks/useWatchUserChange/useWatchUserChange';\n\n/* v8 ignore stop */\n"],"mappings":""}
package/dist/index.d.cts DELETED
@@ -1,31 +0,0 @@
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-DRg0anjB.cjs";
3
- import { n as DatePickerProps, t as DatePicker } from "./index-Db0WD4d1.cjs";
4
- import { i as FieldArrayProps, n as FieldArrayChildrenRenderFn, r as FieldArrayFeatures, t as FieldArray } from "./index-BmMspnsJ.cjs";
5
- import { n as FieldCardProps, r as fieldCardVariants, t as FieldCard } from "./index-B5SfdA5O.cjs";
6
- import { n as FormProps, t as Form } from "./index-C3-TV4Up.cjs";
7
- import { n as GridProps, t as Grid } from "./index-BqxDWhNr.cjs";
8
- import { n as InputProps, t as Input } from "./index-B61zRzeS.cjs";
9
- import { n as RadioBoxes, r as RadioBoxesProps, t as radioBoxVariants } from "./index-9_3XTDJC.cjs";
10
- import { n as RadioTabsProps, t as RadioTabs } from "./index-DBsF7xsq.cjs";
11
- import { n as RadiosProps, t as Radios } from "./index-QgVr4iWX.cjs";
12
- import { n as SelectProps, t as Select } from "./index-DNADTCoc.cjs";
13
- import { n as SliderProps, t as Slider } from "./index-D8udSkgA.cjs";
14
- import { n as SubmitButtonProps, t as SubmitButton } from "./index-DpXSZCZe.cjs";
15
- import { n as SwitchProps, t as Switch } from "./index-Bzs7_gnk.cjs";
16
- import { n as SwitchBoxProps, r as switchBoxVariants, t as SwitchBox } from "./index-CxY9VWv5.cjs";
17
- import { n as TextAreaProps, t as TextArea } from "./index-DUmNI6cE.cjs";
18
- import { n as TimeProps, t as Time } from "./index-7UT2Ki5e.cjs";
19
- import { createOptionValueConverter, flatArrayKey, fromNullishString, isValueEmpty, nameToTestId, toFormFormat, toNullishString, toSubmitFormat, toValidationFormat } from "./helpers/index.cjs";
20
- import { n as useClientValidation, t as clientValidationSchemaByName } from "./useClientValidation-C2dLJnDI.cjs";
21
- import { n as UseControllerReturn, r as useController, t as UseControllerProps } from "./useController-BT3Fd0IO.cjs";
22
- import { n as useFormContext, t as checkFieldIsRequired } from "./useFormContext-Ddc1HWKv.cjs";
23
- import { t as useInput } from "./useInput-DZOmMKcp.cjs";
24
- import { n as UseInputValueDebounceReturn, r as useInputValueDebounce, t as UseInputValueDebounceOptions } from "./useInputValueDebounce-CfQDiomI.cjs";
25
- import { n as UseUniformFieldReturn, r as useUniformField, t as UseUniformFieldParams } from "./useUniformField-CmAYcGER.cjs";
26
- import { n as useUniformFieldArray, t as UseUniformFieldArrayProps } from "./useUniformFieldArray-D3fdzwzD.cjs";
27
- import { n as useWatchFormReset, t as UseWatchFormResetOptions } from "./useWatchFormReset-BSd6jMxU.cjs";
28
- import { n as useWatchUserChange, t as UseWatchUserChangeOptions } from "./useWatchUserChange-DSAboNCs.cjs";
29
- import { n as FieldCopyTestIdButtonProps, t as FieldCopyTestIdButton } from "./index-CXvUaeCL.cjs";
30
- import { n as FieldValidationErrorProps, t as FieldValidationError } from "./index-P30z4VRT.cjs";
31
- export { type CheckboxOption, Checkboxes, type CheckboxesProps, DatePicker, type DatePickerProps, FieldArray, type FieldArrayChildrenRenderFn, type FieldArrayFeatures, type FieldArrayProps, FieldCard, type FieldCardProps, FieldCopyTestIdButton, type FieldCopyTestIdButtonProps, FieldValidationError, type FieldValidationErrorProps, Form, type FormProps, Grid, type GridProps, Input, type InputProps, InputValueTransform, RadioBoxes, type RadioBoxesProps, RadioTabs, type RadioTabsProps, Radios, type RadiosProps, Select, type SelectProps, Slider, type SliderProps, SubmitButton, type SubmitButtonProps, Switch, SwitchBox, type SwitchBoxProps, type SwitchProps, TextArea, type TextAreaProps, Time, type TimeProps, UseControllerProps, UseControllerReturn, UseInputValueDebounceOptions, UseInputValueDebounceReturn, UseInputValueTransformOptions, UseInputValueTransformReturn, UseUniformFieldArrayProps, UseUniformFieldParams, UseUniformFieldReturn, UseWatchFormResetOptions, UseWatchUserChangeOptions, checkFieldIsRequired, clientValidationSchemaByName, createOptionValueConverter, fieldCardVariants, flatArrayKey, fromNullishString, isValueEmpty, nameToTestId, radioBoxVariants, switchBoxVariants, toFormFormat, toNullishString, toSubmitFormat, toValidationFormat, useClientValidation, useController, useFormContext, useInput, useInputValueDebounce, useInputValueTransform, useUniformField, useUniformFieldArray, useWatchFormReset, useWatchUserChange };
package/dist/index.d.ts DELETED
@@ -1,31 +0,0 @@
1
- import { i as useInputValueTransform, n as UseInputValueTransformOptions, r as UseInputValueTransformReturn, t as InputValueTransform } from "./useInputValueTransform-dLfFIYW4.js";
2
- import { n as Checkboxes, r as CheckboxesProps, t as CheckboxOption } from "./index-BPaSE_7b.js";
3
- import { n as DatePickerProps, t as DatePicker } from "./index-BDFJDKmz.js";
4
- import { i as FieldArrayProps, n as FieldArrayChildrenRenderFn, r as FieldArrayFeatures, t as FieldArray } from "./index-CvP3tbVV.js";
5
- import { n as FieldCardProps, r as fieldCardVariants, t as FieldCard } from "./index-CIiOXrrY.js";
6
- import { n as FormProps, t as Form } from "./index-54OZEaUU.js";
7
- import { n as GridProps, t as Grid } from "./index-PWRw2bPH.js";
8
- import { n as InputProps, t as Input } from "./index-PMCqBX0t.js";
9
- import { n as RadioBoxes, r as RadioBoxesProps, t as radioBoxVariants } from "./index-GxTY7aAc.js";
10
- import { n as RadioTabsProps, t as RadioTabs } from "./index-BSjcTo7A.js";
11
- import { n as RadiosProps, t as Radios } from "./index-dgho7gpc.js";
12
- import { n as SelectProps, t as Select } from "./index-C4GJH8Xv.js";
13
- import { n as SliderProps, t as Slider } from "./index-CE8fnXuQ.js";
14
- import { n as SubmitButtonProps, t as SubmitButton } from "./index-CV7wqRev.js";
15
- import { n as SwitchProps, t as Switch } from "./index-B7gQppgQ.js";
16
- import { n as SwitchBoxProps, r as switchBoxVariants, t as SwitchBox } from "./index-Cwb7sTO0.js";
17
- import { n as TextAreaProps, t as TextArea } from "./index-CbPJiRK2.js";
18
- import { n as TimeProps, t as Time } from "./index-C_zjtsGM.js";
19
- import { createOptionValueConverter, flatArrayKey, fromNullishString, isValueEmpty, nameToTestId, toFormFormat, toNullishString, toSubmitFormat, toValidationFormat } from "./helpers/index.js";
20
- import { n as useClientValidation, t as clientValidationSchemaByName } from "./useClientValidation-qRq2_spX.js";
21
- import { n as UseControllerReturn, r as useController, t as UseControllerProps } from "./useController-CzP0aVFC.js";
22
- import { n as useFormContext, t as checkFieldIsRequired } from "./useFormContext-CpLVpNAf.js";
23
- import { t as useInput } from "./useInput-BdH8oftG.js";
24
- import { n as UseInputValueDebounceReturn, r as useInputValueDebounce, t as UseInputValueDebounceOptions } from "./useInputValueDebounce-DZgzL7GQ.js";
25
- import { n as UseUniformFieldReturn, r as useUniformField, t as UseUniformFieldParams } from "./useUniformField-DJDpQzRo.js";
26
- import { n as useUniformFieldArray, t as UseUniformFieldArrayProps } from "./useUniformFieldArray-zGcIhwhF.js";
27
- import { n as useWatchFormReset, t as UseWatchFormResetOptions } from "./useWatchFormReset-C7YJ-I3N.js";
28
- import { n as useWatchUserChange, t as UseWatchUserChangeOptions } from "./useWatchUserChange-CpyZz2i7.js";
29
- import { n as FieldCopyTestIdButtonProps, t as FieldCopyTestIdButton } from "./index-CHQKk_fN2.js";
30
- import { n as FieldValidationErrorProps, t as FieldValidationError } from "./index-CEJxjf5R.js";
31
- export { type CheckboxOption, Checkboxes, type CheckboxesProps, DatePicker, type DatePickerProps, FieldArray, type FieldArrayChildrenRenderFn, type FieldArrayFeatures, type FieldArrayProps, FieldCard, type FieldCardProps, FieldCopyTestIdButton, type FieldCopyTestIdButtonProps, FieldValidationError, type FieldValidationErrorProps, Form, type FormProps, Grid, type GridProps, Input, type InputProps, InputValueTransform, RadioBoxes, type RadioBoxesProps, RadioTabs, type RadioTabsProps, Radios, type RadiosProps, Select, type SelectProps, Slider, type SliderProps, SubmitButton, type SubmitButtonProps, Switch, SwitchBox, type SwitchBoxProps, type SwitchProps, TextArea, type TextAreaProps, Time, type TimeProps, UseControllerProps, UseControllerReturn, UseInputValueDebounceOptions, UseInputValueDebounceReturn, UseInputValueTransformOptions, UseInputValueTransformReturn, UseUniformFieldArrayProps, UseUniformFieldParams, UseUniformFieldReturn, UseWatchFormResetOptions, UseWatchUserChangeOptions, checkFieldIsRequired, clientValidationSchemaByName, createOptionValueConverter, fieldCardVariants, flatArrayKey, fromNullishString, isValueEmpty, nameToTestId, radioBoxVariants, switchBoxVariants, toFormFormat, toNullishString, toSubmitFormat, toValidationFormat, useClientValidation, useController, useFormContext, useInput, useInputValueDebounce, useInputValueTransform, useUniformField, useUniformFieldArray, useWatchFormReset, useWatchUserChange };
package/dist/index.js DELETED
@@ -1,36 +0,0 @@
1
- import { createOptionValueConverter, flatArrayKey, fromNullishString, isValueEmpty, nameToTestId, toFormFormat, toNullishString, toSubmitFormat, toValidationFormat } 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-B287flU_.js";
5
- import { n as useFormContext, t as checkFieldIsRequired } from "./useFormContext-CT8H8xIe.js";
6
- import { t as useInput } from "./useInput-CVm3tP78.js";
7
- import { t as useInputValueTransform } from "./useInputValueTransform-CXdmtc0Q.js";
8
- import { useUniformField } from "./hooks/useUniformField/index.js";
9
- import { n as Checkboxes } from "./Checkboxes-D1hppxDE.js";
10
- import { n as DatePicker } from "./DatePicker-BUSi8SWQ.js";
11
- import { useWatchFormReset } from "./hooks/useWatchFormReset/index.js";
12
- import { useUniformFieldArray } from "./hooks/useUniformFieldArray/index.js";
13
- import { n as FieldArray } from "./FieldArray-BxmK1NRd.js";
14
- import { n as Grid } from "./Grid-BQpLOB0G.js";
15
- import { n as fieldCardVariants, t as FieldCard } from "./FieldCard-BK6SNqFY.js";
16
- import { n as Form } from "./Form-D3yfDu4L.js";
17
- import { useInputValueDebounce } from "./hooks/useInputValueDebounce/index.js";
18
- import { n as Input } from "./Input-B5RxbkNS.js";
19
- import { n as RadioBoxes, r as radioBoxVariants } from "./RadioBoxes-BJz-aJp3.js";
20
- import { n as RadioTabs } from "./RadioTabs-CYmzrPBG.js";
21
- import { n as Radios } from "./Radios-DZxhrX96.js";
22
- import { n as Select } from "./Select-CgeqhZIC.js";
23
- import { n as Slider } from "./Slider-DRfSw0uE.js";
24
- import { n as SubmitButton } from "./SubmitButton-D6aU7IgC.js";
25
- import { n as Switch } from "./Switch-D9DNrqmj.js";
26
- import { n as SwitchBox, r as switchBoxVariants } from "./SwitchBox-BU1XieaZ.js";
27
- import { n as TextArea } from "./TextArea-DAg_K-QP.js";
28
- import { t as Time } from "./Time-CDptQ3CK.js";
29
- import { n as useClientValidation, t as clientValidationSchemaByName } from "./useClientValidation-DpLdzIAb.js";
30
- import { t as useWatchUserChange } from "./useWatchUserChange-DSQGsl1R.js";
31
- //#region src/index.ts
32
- /* v8 ignore stop */
33
- //#endregion
34
- export { Checkboxes, DatePicker, FieldArray, FieldCard, FieldCopyTestIdButton, FieldValidationError, Form, Grid, Input, RadioBoxes, RadioTabs, Radios, Select, Slider, SubmitButton, Switch, SwitchBox, TextArea, Time, checkFieldIsRequired, clientValidationSchemaByName, createOptionValueConverter, fieldCardVariants, flatArrayKey, fromNullishString, isValueEmpty, nameToTestId, radioBoxVariants, switchBoxVariants, toFormFormat, toNullishString, toSubmitFormat, toValidationFormat, useClientValidation, useController, useFormContext, useInput, useInputValueDebounce, useInputValueTransform, useUniformField, useUniformFieldArray, useWatchFormReset, useWatchUserChange };
35
-
36
- //# sourceMappingURL=index.js.map
package/dist/index.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","names":[],"sources":["../src/index.ts"],"sourcesContent":["/* v8 ignore start */\n\n// components\nexport * from './Checkboxes';\nexport * from './DatePicker';\nexport * from './FieldArray';\nexport * from './FieldCard';\nexport * from './Form';\nexport * from './Grid';\nexport * from './helpers';\nexport * from './Input';\nexport * from './partials/FieldCopyTestIdButton';\nexport * from './partials/FieldValidationError';\nexport * from './RadioBoxes';\nexport * from './Radios';\nexport * from './RadioTabs';\nexport * from './Select';\nexport * from './Slider';\nexport * from './SubmitButton';\nexport * from './Switch';\nexport * from './SwitchBox';\nexport * from './TextArea';\nexport * from './Time';\n\n// hooks\nexport * from './hooks/useClientValidation/useClientValidation';\nexport * from './hooks/useController/useController';\nexport * from './hooks/useFormContext/useFormContext';\nexport * from './hooks/useInput/useInput';\nexport * from './hooks/useInputValueDebounce/useInputValueDebounce';\nexport * from './hooks/useInputValueTransform/useInputValueTransform';\nexport * from './hooks/useUniformField/useUniformField';\nexport * from './hooks/useUniformFieldArray/useUniformFieldArray';\nexport * from './hooks/useWatchFormReset/useWatchFormReset';\nexport * from './hooks/useWatchUserChange/useWatchUserChange';\n\n/* v8 ignore stop */\n"],"mappings":""}
@@ -1,190 +0,0 @@
1
- require("./FormContext-DsmS_mkO.cjs");
2
- require("./helpers/index.cjs");
3
- const require_useFormContext = require("./useFormContext-CrXwNYiB.cjs");
4
- let react = require("react");
5
- let _fuf_stack_veto = require("@fuf-stack/veto");
6
- //#region src/hooks/useClientValidation/useClientValidation.ts
7
- /**
8
- * Hook for adding dynamic client-side validation to forms.
9
- *
10
- * Client validation is used for context-dependent validation rules that require external data
11
- * (e.g., checking if a username already exists). It complements base validation (passed to Form),
12
- * which handles static rules like "required", min/max length, format, etc.
13
- *
14
- * **Typical pattern:**
15
- * - Base validation: Static, always-on rules (required, format, length constraints)
16
- * - Client validation: Dynamic rules based on external data (uniqueness, business logic)
17
- * - Client schemas should use `.nullish()` to allow empty values (base validation handles "required")
18
- *
19
- * Automatically manages validation schema lifecycle: sets schema when data is provided,
20
- * clears schema when data is null/undefined, and cleans up on unmount. When the client
21
- * validation schema changes, automatically re-validates all touched fields.
22
- *
23
- * @param data - Data to create validation schema from (or null/undefined to clear validation)
24
- * @param schemaFactory - Function that creates a validation schema from the data. Schemas should typically use `.nullish()`.
25
- * @param options - Optional configuration object
26
- * @param options.key - Optional custom key for registration. Useful when multiple instances should share validation (e.g., in field arrays)
27
- *
28
- * @example
29
- * ```tsx
30
- * // Base validation handles "required" and format
31
- * const baseSchema = veto({ username: vt.string({ min: 3 }) });
32
- *
33
- * // Client validation adds dynamic uniqueness check
34
- * const { data: teamData } = useTeamQuery(teamId);
35
- * useClientValidation(teamData, (data) =>
36
- * vt.objectLoose({
37
- * username: vt.string()
38
- * .refine(
39
- * (value) => !data.existingUsers.includes(value),
40
- * { message: 'Username already exists' }
41
- * )
42
- * .nullish() // Allow empty - base validation handles "required"
43
- * })
44
- * );
45
- * ```
46
- *
47
- * @example
48
- * ```tsx
49
- * // Using custom key in a field array to avoid multiple registrations
50
- * fields.map((field, index) => (
51
- * useClientValidation(
52
- * userData,
53
- * (data) => clientValidationSchemaByName(
54
- * `items.${index}.name`,
55
- * vt.string()
56
- * .refine((val) => !data.forbidden.includes(val), { message: 'Name not allowed' })
57
- * .nullish()
58
- * ),
59
- * { key: 'items-validation' } // All instances share the same key
60
- * )
61
- * ));
62
- * ```
63
- */
64
- const useClientValidation = (data, schemaFactory, options) => {
65
- const { formState: { touchedFields }, validation: { setClientValidationSchema }, trigger } = require_useFormContext.useFormContext();
66
- const autoGeneratedKey = (0, react.useId)();
67
- const key = options?.key ?? autoGeneratedKey;
68
- (0, react.useEffect)(() => {
69
- if (data != null) setClientValidationSchema(key, schemaFactory(data));
70
- else setClientValidationSchema(key, null);
71
- const touchedFieldNames = Object.keys(touchedFields);
72
- if (touchedFieldNames.length > 0) setTimeout(async () => {
73
- return trigger(touchedFieldNames);
74
- }, 1);
75
- return () => {
76
- setClientValidationSchema(key, null);
77
- };
78
- }, [JSON.stringify(data), key]);
79
- };
80
- /**
81
- * Helper function to create a veto looseObject schema for a single field with nested path support.
82
- *
83
- * Parses field paths (dot-notation) and creates properly nested loose object schemas with array support.
84
- * All intermediate objects and arrays are marked as optional to allow partial data structures.
85
- * Numeric segments in the path are treated as array indices, and the parent field is wrapped in an array schema.
86
- * Supports flat arrays (arrays of primitives) via the special `__FLAT__` key.
87
- *
88
- * **Important:** The fieldSchema should typically use `.nullish()` to allow empty values. This is because:
89
- * - Base validation (passed to Form) handles "required" constraints
90
- * - Client validation adds dynamic, context-dependent rules (e.g., "username already exists")
91
- * - Form data processing converts empty strings in flat arrays to `null` (not `undefined`)
92
- * - `.nullish()` accepts both `null` and `undefined`, while `.optional()` only accepts `undefined`
93
- *
94
- * This pattern ensures client validation only validates non-empty values, while base validation
95
- * enforces required fields and basic constraints (min length, format, etc.).
96
- *
97
- * @param name - The dot-separated path to the field (e.g., 'username', 'user.profile.email', 'items.0.name', 'tags.0.__FLAT__')
98
- * @param fieldSchema - The veto validation schema for the field. Should typically use `.nullish()` to allow empty values.
99
- * @returns A nested loose object schema matching the field path structure with proper type inference
100
- *
101
- * @example
102
- * ```tsx
103
- * // Typical usage: base validation handles "required", client validation adds dynamic rules
104
- * // Base validation (in Form component)
105
- * const baseSchema = veto({ username: vt.string({ min: 3 }) }); // Required + min length
106
- *
107
- * // Client validation (dynamic check for existing usernames)
108
- * const { data: userData } = useUserQuery(userId);
109
- * useClientValidation(userData, (data) =>
110
- * clientValidationSchemaByName(
111
- * 'username',
112
- * vt.string()
113
- * .refine(
114
- * (value) => !data.existingUsernames.includes(value),
115
- * { message: 'Username already taken' }
116
- * )
117
- * .nullish() // Allow empty - base validation handles "required"
118
- * )
119
- * );
120
- * ```
121
- *
122
- * @example
123
- * ```tsx
124
- * // Nested field path with dynamic validation
125
- * clientValidationSchemaByName(
126
- * 'user.profile.email',
127
- * vt.string()
128
- * .refine(
129
- * (value) => !reservedEmails.includes(value),
130
- * { message: 'This email is reserved' }
131
- * )
132
- * .nullish()
133
- * )
134
- * // => objectLoose({ user: objectLoose({ profile: objectLoose({ email: ... }).optional() }).optional() })
135
- * ```
136
- *
137
- * @example
138
- * ```tsx
139
- * // Array of objects with dynamic validation
140
- * clientValidationSchemaByName(
141
- * 'items.0.tag',
142
- * vt.string()
143
- * .refine((value) => !forbiddenTags.includes(value), { message: 'Tag not allowed' })
144
- * .nullish()
145
- * )
146
- * // => objectLoose({ items: array(objectLoose({ tag: ... })).optional() })
147
- * ```
148
- *
149
- * @example
150
- * ```tsx
151
- * // Flat array (array of primitives) with dynamic validation
152
- * clientValidationSchemaByName(
153
- * 'tags.0.__FLAT__',
154
- * vt.string()
155
- * .refine((value) => !forbiddenWords.includes(value), { message: 'Word not allowed' })
156
- * .nullish()
157
- * )
158
- * // => objectLoose({ tags: array(vt.string().refine(...).nullish()).optional() })
159
- * ```
160
- */
161
- const clientValidationSchemaByName = (name, fieldSchema) => {
162
- const segments = name.split(".");
163
- let schema = fieldSchema;
164
- for (let i = segments.length - 1; i >= 0; i -= 1) {
165
- const segment = segments[i];
166
- const isNumeric = /^\d+$/.test(segment);
167
- if (segment === "__FLAT__") continue;
168
- if (isNumeric) schema = (0, _fuf_stack_veto.array)(schema).optional();
169
- else {
170
- const obj = (0, _fuf_stack_veto.objectLoose)({ [segment]: schema });
171
- schema = i > 0 ? obj.optional() : obj;
172
- }
173
- }
174
- return schema;
175
- };
176
- //#endregion
177
- Object.defineProperty(exports, "clientValidationSchemaByName", {
178
- enumerable: true,
179
- get: function() {
180
- return clientValidationSchemaByName;
181
- }
182
- });
183
- Object.defineProperty(exports, "useClientValidation", {
184
- enumerable: true,
185
- get: function() {
186
- return useClientValidation;
187
- }
188
- });
189
-
190
- //# sourceMappingURL=useClientValidation-BRfhqRom.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useClientValidation-BRfhqRom.cjs","names":["useFormContext"],"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,YACEA,uBAAAA,eAAe;CAGnB,MAAM,oBAAA,GAAA,MAAA,OAAyB;CAC/B,MAAM,MAAM,SAAS,OAAO;CAO5B,CAAA,GAAA,MAAA,iBAAgB;EAEd,IAAI,QAAQ,MAEV,0BAA0B,KADD,cAAc,IACO,CAAC;OAG/C,0BAA0B,KAAK,IAAI;EAIrC,MAAM,oBAAoB,OAAO,KAAK,aAAa;EACnD,IAAI,kBAAkB,SAAS,GAG7B,WAAW,YAAY;GACrB,OAAO,QAAQ,iBAAiB;EAClC,GAAG,CAAC;EAIN,aAAa;GACX,0BAA0B,KAAK,IAAI;EACrC;CAGF,GAAG,CA7Bc,KAAK,UAAU,IA6BrB,GAAG,GAAG,CAAC;AACpB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmFA,MAAa,gCACX,MACA,gBACG;CACH,MAAM,WAAW,KAAK,MAAM,GAAG;CAG/B,IAAI,SAAsB;CAG1B,KAAK,IAAI,IAAI,SAAS,SAAS,GAAG,KAAK,GAAG,KAAK,GAAG;EAChD,MAAM,UAAU,SAAS;EAEzB,MAAM,YAAY,QAAQ,KAAK,OAAO;EAGtC,IAFuB,YAAA,YAMrB;EAGF,IAAI,WAEF,UAAA,GAAA,gBAAA,OAAe,MAAM,EAAE,SAAS;OAC3B;GAGL,MAAM,OAAA,GAAA,gBAAA,aAAkB,GACrB,UAAU,OACb,CAAC;GACD,SAAS,IAAI,IAAI,IAAI,SAAS,IAAI;EACpC;CACF;CAEA,OAAO;AACT"}