@fuf-stack/uniform 1.18.3 → 1.19.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 (422) hide show
  1. package/dist/Checkboxes/index.cjs +7 -5
  2. package/dist/Checkboxes/index.d.cts +1 -1
  3. package/dist/Checkboxes/index.d.ts +1 -1
  4. package/dist/Checkboxes/index.js +2 -3
  5. package/dist/{Checkboxes-BGrK_mwQ.js → Checkboxes-D1hppxDE.js} +7 -10
  6. package/dist/Checkboxes-D1hppxDE.js.map +1 -0
  7. package/dist/{Checkboxes-Dk7yyRVR.cjs → Checkboxes-DegQ22uN.cjs} +18 -21
  8. package/dist/Checkboxes-DegQ22uN.cjs.map +1 -0
  9. package/dist/FieldArray/index.cjs +7 -5
  10. package/dist/FieldArray/index.d.cts +1 -1
  11. package/dist/FieldArray/index.d.ts +1 -1
  12. package/dist/FieldArray/index.js +2 -3
  13. package/dist/{FieldArray-Bs2ViU8m.js → FieldArray-BVL5Tz0Q.js} +51 -71
  14. package/dist/FieldArray-BVL5Tz0Q.js.map +1 -0
  15. package/dist/{FieldArray-C6RHZcKa.cjs → FieldArray-CeiNCobX.cjs} +66 -86
  16. package/dist/FieldArray-CeiNCobX.cjs.map +1 -0
  17. package/dist/FieldCard/index.cjs +4 -4
  18. package/dist/FieldCard/index.d.cts +1 -1
  19. package/dist/FieldCard/index.d.ts +1 -1
  20. package/dist/FieldCard/index.js +2 -3
  21. package/dist/{FieldCard-BxK_IJOR.cjs → FieldCard-C0kNSLj7.cjs} +20 -24
  22. package/dist/FieldCard-C0kNSLj7.cjs.map +1 -0
  23. package/dist/{FieldCard-16yCF83m.js → FieldCard-SjYNs4sL.js} +8 -12
  24. package/dist/FieldCard-SjYNs4sL.js.map +1 -0
  25. package/dist/{FieldCopyTestIdButton-BoEdlzLs.js → FieldCopyTestIdButton-Dpmo0uBV.js} +4 -7
  26. package/dist/FieldCopyTestIdButton-Dpmo0uBV.js.map +1 -0
  27. package/dist/{FieldCopyTestIdButton-4uupFq1U.cjs → FieldCopyTestIdButton-DrUzXwTo.cjs} +14 -17
  28. package/dist/FieldCopyTestIdButton-DrUzXwTo.cjs.map +1 -0
  29. package/dist/{FieldValidationError-Br6iopZj.cjs → FieldValidationError-8H8LxDjk.cjs} +14 -17
  30. package/dist/FieldValidationError-8H8LxDjk.cjs.map +1 -0
  31. package/dist/{FieldValidationError-XQaViV52.js → FieldValidationError-ktTyyyip.js} +4 -7
  32. package/dist/FieldValidationError-ktTyyyip.js.map +1 -0
  33. package/dist/Form/index.cjs +7 -5
  34. package/dist/Form/index.d.cts +1 -1
  35. package/dist/Form/index.d.ts +1 -2
  36. package/dist/Form/index.js +2 -3
  37. package/dist/{Form--SsSvsxl.cjs → Form-Dqa1b7Y7.cjs} +17 -22
  38. package/dist/Form-Dqa1b7Y7.cjs.map +1 -0
  39. package/dist/{Form-ccsEssie.js → Form-Wzy7pBVt.js} +8 -13
  40. package/dist/Form-Wzy7pBVt.js.map +1 -0
  41. package/dist/{FormContext-CCe8drkp.d.ts → FormContext-B4KQxdl7.d.ts} +1 -1
  42. package/dist/{FormContext-CCe8drkp.d.ts.map → FormContext-B4KQxdl7.d.ts.map} +1 -1
  43. package/dist/{FormContext-BSLO2-sO.cjs → FormContext-BrY1FQYR.cjs} +29 -37
  44. package/dist/{FormContext-BSLO2-sO.cjs.map → FormContext-BrY1FQYR.cjs.map} +1 -1
  45. package/dist/{FormContext-RSA21aDt.d.cts → FormContext-BuG3xZFe.d.cts} +1 -1
  46. package/dist/{FormContext-RSA21aDt.d.cts.map → FormContext-BuG3xZFe.d.cts.map} +1 -1
  47. package/dist/{FormContext-kE3YKhp_.js → FormContext-CLfMWHQM.js} +4 -7
  48. package/dist/{FormContext-kE3YKhp_.js.map → FormContext-CLfMWHQM.js.map} +1 -1
  49. package/dist/Grid/index.cjs +7 -5
  50. package/dist/Grid/index.d.cts +1 -1
  51. package/dist/Grid/index.d.ts +1 -1
  52. package/dist/Grid/index.js +2 -3
  53. package/dist/{Grid-BaqBa1ku.js → Grid-Bzyi97Cx.js} +4 -7
  54. package/dist/Grid-Bzyi97Cx.js.map +1 -0
  55. package/dist/{Grid-D5Yf0nD_.cjs → Grid-DdYQQ_UM.cjs} +14 -17
  56. package/dist/Grid-DdYQQ_UM.cjs.map +1 -0
  57. package/dist/Input/index.cjs +7 -5
  58. package/dist/Input/index.d.cts +1 -1
  59. package/dist/Input/index.d.ts +1 -1
  60. package/dist/Input/index.js +2 -3
  61. package/dist/{Input-BCs_eyJ9.js → Input-BDWP4hOr.js} +6 -9
  62. package/dist/{Input-BCs_eyJ9.js.map → Input-BDWP4hOr.js.map} +1 -1
  63. package/dist/{Input-B3p_4ntD.cjs → Input-BXJ4DSha.cjs} +18 -21
  64. package/dist/Input-BXJ4DSha.cjs.map +1 -0
  65. package/dist/RadioBoxes/index.cjs +7 -5
  66. package/dist/RadioBoxes/index.d.cts +1 -1
  67. package/dist/RadioBoxes/index.d.ts +1 -1
  68. package/dist/RadioBoxes/index.js +2 -3
  69. package/dist/{RadioBoxes-C3Cwrn2I.js → RadioBoxes-BR3X986V.js} +16 -23
  70. package/dist/RadioBoxes-BR3X986V.js.map +1 -0
  71. package/dist/{RadioBoxes-xRvNe5U8.cjs → RadioBoxes-Cim3InDW.cjs} +33 -40
  72. package/dist/RadioBoxes-Cim3InDW.cjs.map +1 -0
  73. package/dist/RadioTabs/index.cjs +7 -5
  74. package/dist/RadioTabs/index.d.cts +1 -1
  75. package/dist/RadioTabs/index.d.ts +1 -1
  76. package/dist/RadioTabs/index.js +2 -3
  77. package/dist/{RadioTabs-DfOGIsEf.js → RadioTabs-CsVqYCE9.js} +6 -9
  78. package/dist/RadioTabs-CsVqYCE9.js.map +1 -0
  79. package/dist/{RadioTabs-BaHvYcd-.cjs → RadioTabs-t-x2XnuI.cjs} +18 -21
  80. package/dist/RadioTabs-t-x2XnuI.cjs.map +1 -0
  81. package/dist/Radios/index.cjs +7 -5
  82. package/dist/Radios/index.d.cts +1 -1
  83. package/dist/Radios/index.d.ts +1 -1
  84. package/dist/Radios/index.js +2 -3
  85. package/dist/{Radios-xM-09vB5.js → Radios-CYwW3bZa.js} +13 -19
  86. package/dist/Radios-CYwW3bZa.js.map +1 -0
  87. package/dist/{Radios-BfA3uL35.cjs → Radios-CjEFdyD6.cjs} +25 -31
  88. package/dist/Radios-CjEFdyD6.cjs.map +1 -0
  89. package/dist/Select/index.cjs +7 -5
  90. package/dist/Select/index.d.cts +1 -1
  91. package/dist/Select/index.d.ts +1 -1
  92. package/dist/Select/index.js +2 -3
  93. package/dist/{Select-DH_YaruM.cjs → Select-BEed8xan.cjs} +23 -28
  94. package/dist/Select-BEed8xan.cjs.map +1 -0
  95. package/dist/{Select-DlEUzYl6.js → Select-BILyyM7Z.js} +9 -14
  96. package/dist/Select-BILyyM7Z.js.map +1 -0
  97. package/dist/Slider/index.cjs +7 -5
  98. package/dist/Slider/index.d.cts +1 -1
  99. package/dist/Slider/index.d.ts +1 -1
  100. package/dist/Slider/index.js +2 -3
  101. package/dist/{Slider-C-dMrJZ6.cjs → Slider-CFYP86ku.cjs} +16 -19
  102. package/dist/Slider-CFYP86ku.cjs.map +1 -0
  103. package/dist/{Slider-CTFuVrp2.js → Slider-DxRcLu-j.js} +5 -8
  104. package/dist/{Slider-CTFuVrp2.js.map → Slider-DxRcLu-j.js.map} +1 -1
  105. package/dist/SubmitButton/index.cjs +7 -5
  106. package/dist/SubmitButton/index.d.cts +1 -1
  107. package/dist/SubmitButton/index.d.ts +1 -1
  108. package/dist/SubmitButton/index.js +2 -3
  109. package/dist/{SubmitButton-Bh1RN0F1.js → SubmitButton-Bu3NNFyt.js} +5 -8
  110. package/dist/SubmitButton-Bu3NNFyt.js.map +1 -0
  111. package/dist/{SubmitButton-CJ6s1mZr.cjs → SubmitButton-D7xacDyS.cjs} +15 -18
  112. package/dist/SubmitButton-D7xacDyS.cjs.map +1 -0
  113. package/dist/Switch/index.cjs +7 -5
  114. package/dist/Switch/index.d.cts +1 -1
  115. package/dist/Switch/index.d.ts +1 -1
  116. package/dist/Switch/index.js +2 -3
  117. package/dist/{Switch-CXrz-M3V.js → Switch-CMpXZdLc.js} +5 -8
  118. package/dist/{Switch-CXrz-M3V.js.map → Switch-CMpXZdLc.js.map} +1 -1
  119. package/dist/{Switch-CeUMwheZ.cjs → Switch-Dt9TGQ8d.cjs} +16 -19
  120. package/dist/Switch-Dt9TGQ8d.cjs.map +1 -0
  121. package/dist/SwitchBox/index.cjs +7 -5
  122. package/dist/SwitchBox/index.d.cts +1 -1
  123. package/dist/SwitchBox/index.d.ts +1 -1
  124. package/dist/SwitchBox/index.js +2 -3
  125. package/dist/{SwitchBox-C-aLl2nX.js → SwitchBox-Cg7NPfp_.js} +5 -8
  126. package/dist/SwitchBox-Cg7NPfp_.js.map +1 -0
  127. package/dist/{SwitchBox-mGUPvJE0.cjs → SwitchBox-DMPp_Ed-.cjs} +21 -24
  128. package/dist/SwitchBox-DMPp_Ed-.cjs.map +1 -0
  129. package/dist/TextArea/index.cjs +7 -5
  130. package/dist/TextArea/index.d.cts +1 -1
  131. package/dist/TextArea/index.d.ts +1 -1
  132. package/dist/TextArea/index.js +2 -3
  133. package/dist/{TextArea-BLkVYmHZ.js → TextArea-Bxi2pXvY.js} +6 -9
  134. package/dist/TextArea-Bxi2pXvY.js.map +1 -0
  135. package/dist/{TextArea-BYEuk4Ng.cjs → TextArea-DDwzXW-y.cjs} +18 -21
  136. package/dist/TextArea-DDwzXW-y.cjs.map +1 -0
  137. package/dist/helpers/index.cjs +397 -10
  138. package/dist/helpers/index.cjs.map +1 -0
  139. package/dist/helpers/index.d.cts +224 -2
  140. package/dist/helpers/index.d.cts.map +1 -0
  141. package/dist/helpers/index.d.ts +224 -2
  142. package/dist/helpers/index.d.ts.map +1 -0
  143. package/dist/helpers/index.js +387 -2
  144. package/dist/helpers/index.js.map +1 -0
  145. package/dist/hooks/useClientValidation/index.cjs +3 -3
  146. package/dist/hooks/useClientValidation/index.d.cts +1 -1
  147. package/dist/hooks/useClientValidation/index.d.ts +1 -1
  148. package/dist/hooks/useClientValidation/index.js +2 -3
  149. package/dist/hooks/useController/index.cjs +3 -3
  150. package/dist/hooks/useController/index.d.cts +1 -1
  151. package/dist/hooks/useController/index.d.ts +1 -1
  152. package/dist/hooks/useController/index.js +2 -3
  153. package/dist/hooks/useFormContext/index.cjs +8 -3
  154. package/dist/hooks/useFormContext/index.cjs.map +1 -0
  155. package/dist/hooks/useFormContext/index.d.cts +1 -1
  156. package/dist/hooks/useFormContext/index.d.ts +1 -3
  157. package/dist/hooks/useFormContext/index.js +6 -2
  158. package/dist/hooks/useFormContext/index.js.map +1 -0
  159. package/dist/hooks/useInput/index.cjs +8 -8
  160. package/dist/hooks/useInput/index.d.cts +1 -1
  161. package/dist/hooks/useInput/index.d.ts +1 -1
  162. package/dist/hooks/useInput/index.js +2 -3
  163. package/dist/hooks/useInputValueDebounce/index.cjs +92 -2
  164. package/dist/hooks/useInputValueDebounce/index.cjs.map +1 -0
  165. package/dist/hooks/useInputValueDebounce/index.d.cts +1 -1
  166. package/dist/hooks/useInputValueDebounce/index.d.ts +1 -1
  167. package/dist/hooks/useInputValueDebounce/index.js +90 -2
  168. package/dist/hooks/useInputValueDebounce/index.js.map +1 -0
  169. package/dist/hooks/useInputValueTransform/index.cjs +3 -3
  170. package/dist/hooks/useInputValueTransform/index.d.cts +1 -1
  171. package/dist/hooks/useInputValueTransform/index.d.ts +1 -1
  172. package/dist/hooks/useInputValueTransform/index.js +2 -3
  173. package/dist/hooks/useUniformField/index.cjs +135 -2
  174. package/dist/hooks/useUniformField/index.cjs.map +1 -0
  175. package/dist/hooks/useUniformField/index.d.cts +1 -1
  176. package/dist/hooks/useUniformField/index.d.ts +1 -5
  177. package/dist/hooks/useUniformField/index.js +132 -2
  178. package/dist/hooks/useUniformField/index.js.map +1 -0
  179. package/dist/hooks/useUniformFieldArray/index.cjs +83 -2
  180. package/dist/hooks/useUniformFieldArray/index.cjs.map +1 -0
  181. package/dist/hooks/useUniformFieldArray/index.d.cts +1 -1
  182. package/dist/hooks/useUniformFieldArray/index.d.ts +1 -26
  183. package/dist/hooks/useUniformFieldArray/index.js +81 -2
  184. package/dist/hooks/useUniformFieldArray/index.js.map +1 -0
  185. package/dist/hooks/useWatchUserChange/index.cjs +3 -3
  186. package/dist/hooks/useWatchUserChange/index.d.cts +1 -1
  187. package/dist/hooks/useWatchUserChange/index.d.ts +1 -1
  188. package/dist/hooks/useWatchUserChange/index.js +2 -3
  189. package/dist/{index-TmijvCD0.d.ts → index-25CYKzg4.d.cts} +22 -22
  190. package/dist/index-25CYKzg4.d.cts.map +1 -0
  191. package/dist/{index-CeiIXmAI.d.cts → index-3e3711-8.d.cts} +36 -36
  192. package/dist/index-3e3711-8.d.cts.map +1 -0
  193. package/dist/{index-E6etS7_8.d.ts → index-6hu79Fof.d.ts} +34 -34
  194. package/dist/index-6hu79Fof.d.ts.map +1 -0
  195. package/dist/index-AmOFlE3L.d.cts +278 -0
  196. package/dist/index-AmOFlE3L.d.cts.map +1 -0
  197. package/dist/{index-wwmQClW-.d.cts → index-B-6CMF1H.d.ts} +21 -21
  198. package/dist/index-B-6CMF1H.d.ts.map +1 -0
  199. package/dist/{index-ahxY6Q0X.d.cts → index-B6WwxkLx2.d.ts} +3 -3
  200. package/dist/index-B6WwxkLx2.d.ts.map +1 -0
  201. package/dist/{index-BlJFGN_o.d.ts → index-B9lVf5LI.d.ts} +48 -48
  202. package/dist/index-B9lVf5LI.d.ts.map +1 -0
  203. package/dist/{index-ttNINAv3.d.ts → index-BV1VKQdy.d.cts} +3 -3
  204. package/dist/{index-qo0Ta_R3.d.cts.map → index-BV1VKQdy.d.cts.map} +1 -1
  205. package/dist/{index-C1-F9Ga-.d.cts → index-BdYKQ59a.d.cts} +7 -7
  206. package/dist/index-BdYKQ59a.d.cts.map +1 -0
  207. package/dist/{index-Bl1Adhfx.d.ts → index-BwAI1VFS.d.ts} +6 -6
  208. package/dist/index-BwAI1VFS.d.ts.map +1 -0
  209. package/dist/{index-BsCPUK2g.d.cts → index-BzIB-MQg.d.cts} +48 -48
  210. package/dist/index-BzIB-MQg.d.cts.map +1 -0
  211. package/dist/{index-DFzyOxvt.d.cts → index-C-DiLZRu.d.cts} +6 -6
  212. package/dist/index-C-DiLZRu.d.cts.map +1 -0
  213. package/dist/{index-BKQc5PQn.d.cts → index-C9up4f3f.d.cts} +34 -34
  214. package/dist/index-C9up4f3f.d.cts.map +1 -0
  215. package/dist/{index-Dty4h2eA.d.ts → index-CE0aQlFw.d.ts} +7 -7
  216. package/dist/index-CE0aQlFw.d.ts.map +1 -0
  217. package/dist/{index-BrMk3Wee.d.ts → index-CY2Mpaz3.d.cts} +4 -4
  218. package/dist/index-CY2Mpaz3.d.cts.map +1 -0
  219. package/dist/index-CuRn5Thx.d.ts +278 -0
  220. package/dist/index-CuRn5Thx.d.ts.map +1 -0
  221. package/dist/{index-qo0Ta_R3.d.cts → index-Cv4ERj3i.d.ts} +3 -3
  222. package/dist/{index-ttNINAv3.d.ts.map → index-Cv4ERj3i.d.ts.map} +1 -1
  223. package/dist/{index-ByyEP8UR.d.cts → index-D6XwSwTP.d.cts} +6 -6
  224. package/dist/{index-ByyEP8UR.d.cts.map → index-D6XwSwTP.d.cts.map} +1 -1
  225. package/dist/{index-Dr06SNZN.d.cts → index-DD_RPe91.d.ts} +4 -4
  226. package/dist/index-DD_RPe91.d.ts.map +1 -0
  227. package/dist/{index-DLR8z1lG.d.cts → index-DFWSHdua.d.ts} +3 -3
  228. package/dist/{index-CPkTYivq.d.ts.map → index-DFWSHdua.d.ts.map} +1 -1
  229. package/dist/{index-B0rp5NJy.d.cts → index-DMwNV_Br.d.cts} +35 -36
  230. package/dist/index-DMwNV_Br.d.cts.map +1 -0
  231. package/dist/index-DeEmP3Jc.d.cts +1 -0
  232. package/dist/{index-mmk9VKYu.d.ts → index-DiD7s23-.d.cts} +21 -21
  233. package/dist/index-DiD7s23-.d.cts.map +1 -0
  234. package/dist/{index--NM5Ctp6.d.ts → index-Dj3NDj0T.d.ts} +4 -4
  235. package/dist/{index--NM5Ctp6.d.ts.map → index-Dj3NDj0T.d.ts.map} +1 -1
  236. package/dist/{index-CPkTYivq.d.ts → index-DkiQkdCW.d.cts} +3 -3
  237. package/dist/{index-DLR8z1lG.d.cts.map → index-DkiQkdCW.d.cts.map} +1 -1
  238. package/dist/{index-CI0AWMsR.d.ts → index-DkxqHE_P2.d.ts} +3 -3
  239. package/dist/{index-B7Xz_OY2.d.cts.map → index-DkxqHE_P2.d.ts.map} +1 -1
  240. package/dist/{index-B7Xz_OY2.d.cts → index-Dld6NP_K.d.cts} +3 -3
  241. package/dist/index-Dld6NP_K.d.cts.map +1 -0
  242. package/dist/{index-CZq5eXSP.d.ts → index-DlebotZ4.d.ts} +36 -36
  243. package/dist/index-DlebotZ4.d.ts.map +1 -0
  244. package/dist/index-DsC0y6kU.d.cts +70 -0
  245. package/dist/index-DsC0y6kU.d.cts.map +1 -0
  246. package/dist/index-DwqOejxR.d.ts +70 -0
  247. package/dist/index-DwqOejxR.d.ts.map +1 -0
  248. package/dist/{index-BaxXDaOZ.d.ts → index-Gs3zrYoY.d.ts} +35 -37
  249. package/dist/index-Gs3zrYoY.d.ts.map +1 -0
  250. package/dist/{index-BlX_mF6D.d.cts → index-N5wvPOq3.d.ts} +22 -22
  251. package/dist/index-N5wvPOq3.d.ts.map +1 -0
  252. package/dist/{index-BNYtqtXt.d.cts → index-NjKV8LJD.d.cts} +4 -4
  253. package/dist/{index-BNYtqtXt.d.cts.map → index-NjKV8LJD.d.cts.map} +1 -1
  254. package/dist/{index-DVZCz730.d.ts → index-fgARdsoB.d.ts} +6 -6
  255. package/dist/{index-DVZCz730.d.ts.map → index-fgARdsoB.d.ts.map} +1 -1
  256. package/dist/{index-CMehV9mc.d.ts → index-jCfJAgDc.d.cts} +3 -3
  257. package/dist/index-jCfJAgDc.d.cts.map +1 -0
  258. package/dist/{index--KhDRPu3.d.cts → index-pwXVq8hR.d.cts} +6 -6
  259. package/dist/index-pwXVq8hR.d.cts.map +1 -0
  260. package/dist/index-sQecLSpR.d.cts +1 -0
  261. package/dist/{index-BgyvEfYZ.d.ts → index-wV1E_PkS.d.ts} +6 -6
  262. package/dist/index-wV1E_PkS.d.ts.map +1 -0
  263. package/dist/index.cjs +63 -63
  264. package/dist/index.d.cts +27 -27
  265. package/dist/index.d.ts +27 -29
  266. package/dist/index.js +29 -30
  267. package/dist/partials/FieldCopyTestIdButton/index.cjs +7 -5
  268. package/dist/partials/FieldCopyTestIdButton/index.d.cts +1 -1
  269. package/dist/partials/FieldCopyTestIdButton/index.d.ts +1 -1
  270. package/dist/partials/FieldCopyTestIdButton/index.js +2 -3
  271. package/dist/partials/FieldValidationError/index.cjs +7 -5
  272. package/dist/partials/FieldValidationError/index.d.cts +1 -1
  273. package/dist/partials/FieldValidationError/index.d.ts +1 -1
  274. package/dist/partials/FieldValidationError/index.js +2 -3
  275. package/dist/{useClientValidation-B4xrGBJZ.d.ts → useClientValidation-BWElhQ91.d.ts} +2 -3
  276. package/dist/useClientValidation-BWElhQ91.d.ts.map +1 -0
  277. package/dist/{useClientValidation-DksyV18M.js → useClientValidation-Dn_kJkE5.js} +5 -6
  278. package/dist/{useClientValidation-DksyV18M.js.map → useClientValidation-Dn_kJkE5.js.map} +1 -1
  279. package/dist/{useClientValidation-B_dYQB5o.d.cts → useClientValidation-DtnfCE5T.d.cts} +2 -3
  280. package/dist/{useClientValidation-B4xrGBJZ.d.ts.map → useClientValidation-DtnfCE5T.d.cts.map} +1 -1
  281. package/dist/{useClientValidation-Dnj_wuwf.cjs → useClientValidation-NKOuXuHV.cjs} +16 -17
  282. package/dist/useClientValidation-NKOuXuHV.cjs.map +1 -0
  283. package/dist/{useController-NjuthTyL.js → useController-B-6PzFna.js} +4 -5
  284. package/dist/{useController-NjuthTyL.js.map → useController-B-6PzFna.js.map} +1 -1
  285. package/dist/{useController-D8MEXnmB.d.cts → useController-CNiqy_2D.d.cts} +1 -1
  286. package/dist/{useController-D8MEXnmB.d.cts.map → useController-CNiqy_2D.d.cts.map} +1 -1
  287. package/dist/{useController-CHOpoCoz.d.ts → useController-Cc0UNQMm.d.ts} +1 -1
  288. package/dist/{useController-CHOpoCoz.d.ts.map → useController-Cc0UNQMm.d.ts.map} +1 -1
  289. package/dist/{useController-B_SSp5Z5.cjs → useController-DVRh86Zy.cjs} +11 -12
  290. package/dist/{useController-B_SSp5Z5.cjs.map → useController-DVRh86Zy.cjs.map} +1 -1
  291. package/dist/{useFormContext-vdeeDsAs.cjs → useFormContext-Bum4VP1o.cjs} +20 -21
  292. package/dist/{useFormContext-vdeeDsAs.cjs.map → useFormContext-Bum4VP1o.cjs.map} +1 -1
  293. package/dist/{useFormContext-Di67HIf7.js → useFormContext-Bzpyonu6.js} +5 -6
  294. package/dist/{useFormContext-Di67HIf7.js.map → useFormContext-Bzpyonu6.js.map} +1 -1
  295. package/dist/{useFormContext-C6OOtqZ5.d.ts → useFormContext-DEMm-bsc.d.ts} +22 -22
  296. package/dist/useFormContext-DEMm-bsc.d.ts.map +1 -0
  297. package/dist/{useFormContext-Dh97YG47.d.cts → useFormContext-Dey5DbWr.d.cts} +22 -22
  298. package/dist/useFormContext-Dey5DbWr.d.cts.map +1 -0
  299. package/dist/{useInput-BWzvIUpW.js → useInput-CVm3tP78.js} +1 -2
  300. package/dist/{useInputValueDebounce-ZLyAmuXV.d.cts → useInputValueDebounce-puGRVJ6t.d.cts} +1 -1
  301. package/dist/{useInputValueDebounce-ZLyAmuXV.d.cts.map → useInputValueDebounce-puGRVJ6t.d.cts.map} +1 -1
  302. package/dist/{useInputValueDebounce-Dhlv1NUY.d.ts → useInputValueDebounce-sFOlecIQ.d.ts} +1 -1
  303. package/dist/{useInputValueDebounce-Dhlv1NUY.d.ts.map → useInputValueDebounce-sFOlecIQ.d.ts.map} +1 -1
  304. package/dist/{useInputValueTransform-CNCBU7a9.d.cts → useInputValueTransform-BwAfw8Xb.d.cts} +1 -1
  305. package/dist/{useInputValueTransform-CNCBU7a9.d.cts.map → useInputValueTransform-BwAfw8Xb.d.cts.map} +1 -1
  306. package/dist/{useInputValueTransform-C-fmz3ke.js → useInputValueTransform-CXdmtc0Q.js} +2 -3
  307. package/dist/{useInputValueTransform-C-fmz3ke.js.map → useInputValueTransform-CXdmtc0Q.js.map} +1 -1
  308. package/dist/{useInputValueTransform-tsMNM7g_.d.ts → useInputValueTransform-CdoaxNyD.d.ts} +1 -1
  309. package/dist/{useInputValueTransform-tsMNM7g_.d.ts.map → useInputValueTransform-CdoaxNyD.d.ts.map} +1 -1
  310. package/dist/{useInputValueTransform-BBRvvhDe.cjs → useInputValueTransform-DKH-7F9D.cjs} +8 -9
  311. package/dist/{useInputValueTransform-BBRvvhDe.cjs.map → useInputValueTransform-DKH-7F9D.cjs.map} +1 -1
  312. package/dist/{useUniformField-Bd_oDkYE.d.cts → useUniformField-DB8jF52F.d.cts} +5 -5
  313. package/dist/{useUniformField-Bd_oDkYE.d.cts.map → useUniformField-DB8jF52F.d.cts.map} +1 -1
  314. package/dist/{useUniformField-BDKjYBKu.d.ts → useUniformField-iHk8xYXN.d.ts} +5 -5
  315. package/dist/{useUniformField-BDKjYBKu.d.ts.map → useUniformField-iHk8xYXN.d.ts.map} +1 -1
  316. package/dist/{useUniformFieldArray-lV3Nbum2.d.ts → useUniformFieldArray-B0SPtHeT.d.ts} +18 -18
  317. package/dist/useUniformFieldArray-B0SPtHeT.d.ts.map +1 -0
  318. package/dist/{useUniformFieldArray-CWiaXKO6.d.cts → useUniformFieldArray-okvikMJp.d.cts} +18 -18
  319. package/dist/useUniformFieldArray-okvikMJp.d.cts.map +1 -0
  320. package/dist/{useWatchUserChange-C1Kluht2.cjs → useWatchUserChange-CBuIa5kU.cjs} +9 -10
  321. package/dist/{useWatchUserChange-C1Kluht2.cjs.map → useWatchUserChange-CBuIa5kU.cjs.map} +1 -1
  322. package/dist/{useWatchUserChange-BnnrFjyq.d.ts → useWatchUserChange-CH4x16_r.d.ts} +1 -1
  323. package/dist/{useWatchUserChange-BnnrFjyq.d.ts.map → useWatchUserChange-CH4x16_r.d.ts.map} +1 -1
  324. package/dist/{useWatchUserChange-Dj9Imxfi.js → useWatchUserChange-CLgLc5W4.js} +3 -4
  325. package/dist/{useWatchUserChange-Dj9Imxfi.js.map → useWatchUserChange-CLgLc5W4.js.map} +1 -1
  326. package/dist/{useWatchUserChange-DalJOKBC.d.cts → useWatchUserChange-CZu_ZZ38.d.cts} +1 -1
  327. package/dist/{useWatchUserChange-DalJOKBC.d.cts.map → useWatchUserChange-CZu_ZZ38.d.cts.map} +1 -1
  328. package/package.json +74 -70
  329. package/dist/Checkboxes-BGrK_mwQ.js.map +0 -1
  330. package/dist/Checkboxes-Dk7yyRVR.cjs.map +0 -1
  331. package/dist/FieldArray-Bs2ViU8m.js.map +0 -1
  332. package/dist/FieldArray-C6RHZcKa.cjs.map +0 -1
  333. package/dist/FieldCard-16yCF83m.js.map +0 -1
  334. package/dist/FieldCard-BxK_IJOR.cjs.map +0 -1
  335. package/dist/FieldCopyTestIdButton-4uupFq1U.cjs.map +0 -1
  336. package/dist/FieldCopyTestIdButton-BoEdlzLs.js.map +0 -1
  337. package/dist/FieldValidationError-Br6iopZj.cjs.map +0 -1
  338. package/dist/FieldValidationError-XQaViV52.js.map +0 -1
  339. package/dist/Form--SsSvsxl.cjs.map +0 -1
  340. package/dist/Form-ccsEssie.js.map +0 -1
  341. package/dist/Grid-BaqBa1ku.js.map +0 -1
  342. package/dist/Grid-D5Yf0nD_.cjs.map +0 -1
  343. package/dist/Input-B3p_4ntD.cjs.map +0 -1
  344. package/dist/RadioBoxes-C3Cwrn2I.js.map +0 -1
  345. package/dist/RadioBoxes-xRvNe5U8.cjs.map +0 -1
  346. package/dist/RadioTabs-BaHvYcd-.cjs.map +0 -1
  347. package/dist/RadioTabs-DfOGIsEf.js.map +0 -1
  348. package/dist/Radios-BfA3uL35.cjs.map +0 -1
  349. package/dist/Radios-xM-09vB5.js.map +0 -1
  350. package/dist/Select-DH_YaruM.cjs.map +0 -1
  351. package/dist/Select-DlEUzYl6.js.map +0 -1
  352. package/dist/Slider-C-dMrJZ6.cjs.map +0 -1
  353. package/dist/SubmitButton-Bh1RN0F1.js.map +0 -1
  354. package/dist/SubmitButton-CJ6s1mZr.cjs.map +0 -1
  355. package/dist/Switch-CeUMwheZ.cjs.map +0 -1
  356. package/dist/SwitchBox-C-aLl2nX.js.map +0 -1
  357. package/dist/SwitchBox-mGUPvJE0.cjs.map +0 -1
  358. package/dist/TextArea-BLkVYmHZ.js.map +0 -1
  359. package/dist/TextArea-BYEuk4Ng.cjs.map +0 -1
  360. package/dist/helpers-33jajRcN.js +0 -390
  361. package/dist/helpers-33jajRcN.js.map +0 -1
  362. package/dist/helpers-Bd_QpqXg.cjs +0 -444
  363. package/dist/helpers-Bd_QpqXg.cjs.map +0 -1
  364. package/dist/index--KhDRPu3.d.cts.map +0 -1
  365. package/dist/index-B0rp5NJy.d.cts.map +0 -1
  366. package/dist/index-BBw9RSKy.d.ts +0 -278
  367. package/dist/index-BBw9RSKy.d.ts.map +0 -1
  368. package/dist/index-BKQc5PQn.d.cts.map +0 -1
  369. package/dist/index-BLgXFM85.d.cts +0 -224
  370. package/dist/index-BLgXFM85.d.cts.map +0 -1
  371. package/dist/index-BaxXDaOZ.d.ts.map +0 -1
  372. package/dist/index-BgyvEfYZ.d.ts.map +0 -1
  373. package/dist/index-BjHnNRSC.d.cts +0 -278
  374. package/dist/index-BjHnNRSC.d.cts.map +0 -1
  375. package/dist/index-Bl1Adhfx.d.ts.map +0 -1
  376. package/dist/index-BlJFGN_o.d.ts.map +0 -1
  377. package/dist/index-BlX_mF6D.d.cts.map +0 -1
  378. package/dist/index-BrMk3Wee.d.ts.map +0 -1
  379. package/dist/index-BsCPUK2g.d.cts.map +0 -1
  380. package/dist/index-C1-F9Ga-.d.cts.map +0 -1
  381. package/dist/index-CI0AWMsR.d.ts.map +0 -1
  382. package/dist/index-CMehV9mc.d.ts.map +0 -1
  383. package/dist/index-CZq5eXSP.d.ts.map +0 -1
  384. package/dist/index-CeiIXmAI.d.cts.map +0 -1
  385. package/dist/index-DFzyOxvt.d.cts.map +0 -1
  386. package/dist/index-Dr06SNZN.d.cts.map +0 -1
  387. package/dist/index-Dty4h2eA.d.ts.map +0 -1
  388. package/dist/index-E6etS7_8.d.ts.map +0 -1
  389. package/dist/index-TmijvCD0.d.ts.map +0 -1
  390. package/dist/index-ahxY6Q0X.d.cts.map +0 -1
  391. package/dist/index-mmk9VKYu.d.ts.map +0 -1
  392. package/dist/index-w8E8Koak.d.ts +0 -224
  393. package/dist/index-w8E8Koak.d.ts.map +0 -1
  394. package/dist/index-wwmQClW-.d.cts.map +0 -1
  395. package/dist/useClientValidation-B_dYQB5o.d.cts.map +0 -1
  396. package/dist/useClientValidation-Dnj_wuwf.cjs.map +0 -1
  397. package/dist/useFormContext-C6OOtqZ5.d.ts.map +0 -1
  398. package/dist/useFormContext-CLymm_7t.js +0 -6
  399. package/dist/useFormContext-CLymm_7t.js.map +0 -1
  400. package/dist/useFormContext-CkeSOfWD.cjs +0 -6
  401. package/dist/useFormContext-CkeSOfWD.cjs.map +0 -1
  402. package/dist/useFormContext-Dh97YG47.d.cts.map +0 -1
  403. package/dist/useInputValueDebounce-CRaM7HEM.cjs +0 -99
  404. package/dist/useInputValueDebounce-CRaM7HEM.cjs.map +0 -1
  405. package/dist/useInputValueDebounce-DJO5uzLb.js +0 -93
  406. package/dist/useInputValueDebounce-DJO5uzLb.js.map +0 -1
  407. package/dist/useUniformField-6c4OCAfb.cjs +0 -142
  408. package/dist/useUniformField-6c4OCAfb.cjs.map +0 -1
  409. package/dist/useUniformField-C-Xyu-8v.js +0 -135
  410. package/dist/useUniformField-C-Xyu-8v.js.map +0 -1
  411. package/dist/useUniformFieldArray-BKvA0FQW.js +0 -84
  412. package/dist/useUniformFieldArray-BKvA0FQW.js.map +0 -1
  413. package/dist/useUniformFieldArray-CRCbV1J2.cjs +0 -90
  414. package/dist/useUniformFieldArray-CRCbV1J2.cjs.map +0 -1
  415. package/dist/useUniformFieldArray-CWiaXKO6.d.cts.map +0 -1
  416. package/dist/useUniformFieldArray-lV3Nbum2.d.ts.map +0 -1
  417. /package/dist/{index-BMCcWGYS.d.ts → index--okzibnx.d.ts} +0 -0
  418. /package/dist/{index-C8k_zgEm.d.cts → index-B2TCFhpj.d.ts} +0 -0
  419. /package/dist/{index-DDRpa5CJ.d.cts → index-BtBZHVmz.d.cts} +0 -0
  420. /package/dist/{index-GGHuYh77.d.ts → index-CI4LJief.d.ts} +0 -0
  421. /package/dist/{useInput-BVZvtfNg.d.ts → useInput-93TCCrkB.d.cts} +0 -0
  422. /package/dist/{useInput-CKmKH9Ij.d.cts → useInput-C_fY--wx.d.ts} +0 -0
@@ -1,3 +1,2 @@
1
- import { n as SubmitButton_default, t as SubmitButton_default$1 } from "../SubmitButton-Bh1RN0F1.js";
2
-
3
- export { SubmitButton_default as SubmitButton, SubmitButton_default$1 as default };
1
+ import { n as SubmitButton, t as SubmitButton_default } from "../SubmitButton-Bu3NNFyt.js";
2
+ export { SubmitButton, SubmitButton_default as default };
@@ -1,8 +1,7 @@
1
- import { n as useFormContext } from "./useFormContext-Di67HIf7.js";
1
+ import { n as useFormContext } from "./useFormContext-Bzpyonu6.js";
2
2
  import { cn, slugify } from "@fuf-stack/pixel-utils";
3
3
  import { Button } from "@fuf-stack/pixels";
4
4
  import { jsx } from "react/jsx-runtime";
5
-
6
5
  //#region src/SubmitButton/SubmitButton.tsx
7
6
  /**
8
7
  * From SubmitButton
@@ -23,12 +22,10 @@ const SubmitButton = ({ ariaLabel = "Submit form", children = "Submit", classNam
23
22
  children
24
23
  });
25
24
  };
26
- var SubmitButton_default$1 = SubmitButton;
27
-
28
25
  //#endregion
29
26
  //#region src/SubmitButton/index.ts
30
- var SubmitButton_default = SubmitButton_default$1;
31
-
27
+ var SubmitButton_default = SubmitButton;
32
28
  //#endregion
33
- export { SubmitButton_default$1 as n, SubmitButton_default as t };
34
- //# sourceMappingURL=SubmitButton-Bh1RN0F1.js.map
29
+ export { SubmitButton as n, SubmitButton_default as t };
30
+
31
+ //# sourceMappingURL=SubmitButton-Bu3NNFyt.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SubmitButton-Bu3NNFyt.js","names":[],"sources":["../src/SubmitButton/SubmitButton.tsx","../src/SubmitButton/index.ts"],"sourcesContent":["import type { ButtonProps } from '@fuf-stack/pixels';\nimport type { ReactNode } from 'react';\n\nimport { cn, slugify } from '@fuf-stack/pixel-utils';\nimport { Button } from '@fuf-stack/pixels';\n\nimport { useFormContext } from '../hooks/useFormContext';\n\nexport interface SubmitButtonProps {\n /** sets HTML aria-label attribute */\n ariaLabel?: string;\n /** child components */\n children?: ReactNode;\n /** CSS class name */\n className?: string;\n /** color of the submit button */\n color?: ButtonProps['color'];\n /** icon of the submit button */\n icon?: ButtonProps['icon'];\n /** If set loading animation is shown */\n loading?: boolean;\n /** size of the submit button */\n size?: ButtonProps['size'];\n /** HTML data-testid attribute used in e2e tests */\n testId?: string;\n}\n\n/**\n * From SubmitButton\n */\nconst SubmitButton = ({\n ariaLabel = 'Submit form',\n children = 'Submit',\n className = undefined,\n color = 'success',\n icon = undefined,\n loading = false,\n size = 'md',\n testId = 'form_submit_button',\n}: SubmitButtonProps) => {\n const {\n formState: { isSubmitting },\n triggerSubmit,\n } = useFormContext();\n\n return (\n <Button\n ariaLabel={ariaLabel}\n className={cn(className)}\n color={color}\n disabled={isSubmitting}\n icon={icon}\n loading={loading || isSubmitting}\n // @ts-expect-error we use form context triggerSubmit\n // here so that submit button also works in special\n // scenarios (e.g. when used in modal)\n onClick={triggerSubmit}\n size={size}\n testId={slugify(testId, { replaceDots: true })}\n type=\"submit\"\n >\n {children}\n </Button>\n );\n};\n\nexport default SubmitButton;\n","import SubmitButton from './SubmitButton';\n\nexport type { SubmitButtonProps } from './SubmitButton';\n\nexport { SubmitButton };\n\nexport default SubmitButton;\n"],"mappings":";;;;;;;;AA8BA,MAAM,gBAAgB,EACpB,YAAY,eACZ,WAAW,UACX,YAAY,KAAA,GACZ,QAAQ,WACR,OAAO,KAAA,GACP,UAAU,OACV,OAAO,MACP,SAAS,2BACc;CACvB,MAAM,EACJ,WAAW,EAAE,gBACb,kBACE,gBAAgB;AAEpB,QACE,oBAAC,QAAD;EACa;EACX,WAAW,GAAG,UAAU;EACjB;EACP,UAAU;EACJ;EACN,SAAS,WAAW;EAIpB,SAAS;EACH;EACN,QAAQ,QAAQ,QAAQ,EAAE,aAAa,MAAM,CAAC;EAC9C,MAAK;EAEJ;EACM,CAAA;;;;ACxDb,IAAA,uBAAe"}
@@ -1,9 +1,8 @@
1
- const require_FormContext = require('./FormContext-BSLO2-sO.cjs');
2
- const require_useFormContext = require('./useFormContext-vdeeDsAs.cjs');
1
+ require("./FormContext-BrY1FQYR.cjs");
2
+ const require_useFormContext = require("./useFormContext-Bum4VP1o.cjs");
3
3
  let _fuf_stack_pixel_utils = require("@fuf-stack/pixel-utils");
4
4
  let _fuf_stack_pixels = require("@fuf-stack/pixels");
5
5
  let react_jsx_runtime = require("react/jsx-runtime");
6
-
7
6
  //#region src/SubmitButton/SubmitButton.tsx
8
7
  /**
9
8
  * From SubmitButton
@@ -24,23 +23,21 @@ const SubmitButton = ({ ariaLabel = "Submit form", children = "Submit", classNam
24
23
  children
25
24
  });
26
25
  };
27
- var SubmitButton_default$1 = SubmitButton;
28
-
29
26
  //#endregion
30
27
  //#region src/SubmitButton/index.ts
31
- var SubmitButton_default = SubmitButton_default$1;
32
-
28
+ var SubmitButton_default = SubmitButton;
33
29
  //#endregion
34
- Object.defineProperty(exports, 'SubmitButton_default', {
35
- enumerable: true,
36
- get: function () {
37
- return SubmitButton_default;
38
- }
30
+ Object.defineProperty(exports, "SubmitButton", {
31
+ enumerable: true,
32
+ get: function() {
33
+ return SubmitButton;
34
+ }
39
35
  });
40
- Object.defineProperty(exports, 'SubmitButton_default$1', {
41
- enumerable: true,
42
- get: function () {
43
- return SubmitButton_default$1;
44
- }
36
+ Object.defineProperty(exports, "SubmitButton_default", {
37
+ enumerable: true,
38
+ get: function() {
39
+ return SubmitButton_default;
40
+ }
45
41
  });
46
- //# sourceMappingURL=SubmitButton-CJ6s1mZr.cjs.map
42
+
43
+ //# sourceMappingURL=SubmitButton-D7xacDyS.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SubmitButton-D7xacDyS.cjs","names":["useFormContext","Button"],"sources":["../src/SubmitButton/SubmitButton.tsx","../src/SubmitButton/index.ts"],"sourcesContent":["import type { ButtonProps } from '@fuf-stack/pixels';\nimport type { ReactNode } from 'react';\n\nimport { cn, slugify } from '@fuf-stack/pixel-utils';\nimport { Button } from '@fuf-stack/pixels';\n\nimport { useFormContext } from '../hooks/useFormContext';\n\nexport interface SubmitButtonProps {\n /** sets HTML aria-label attribute */\n ariaLabel?: string;\n /** child components */\n children?: ReactNode;\n /** CSS class name */\n className?: string;\n /** color of the submit button */\n color?: ButtonProps['color'];\n /** icon of the submit button */\n icon?: ButtonProps['icon'];\n /** If set loading animation is shown */\n loading?: boolean;\n /** size of the submit button */\n size?: ButtonProps['size'];\n /** HTML data-testid attribute used in e2e tests */\n testId?: string;\n}\n\n/**\n * From SubmitButton\n */\nconst SubmitButton = ({\n ariaLabel = 'Submit form',\n children = 'Submit',\n className = undefined,\n color = 'success',\n icon = undefined,\n loading = false,\n size = 'md',\n testId = 'form_submit_button',\n}: SubmitButtonProps) => {\n const {\n formState: { isSubmitting },\n triggerSubmit,\n } = useFormContext();\n\n return (\n <Button\n ariaLabel={ariaLabel}\n className={cn(className)}\n color={color}\n disabled={isSubmitting}\n icon={icon}\n loading={loading || isSubmitting}\n // @ts-expect-error we use form context triggerSubmit\n // here so that submit button also works in special\n // scenarios (e.g. when used in modal)\n onClick={triggerSubmit}\n size={size}\n testId={slugify(testId, { replaceDots: true })}\n type=\"submit\"\n >\n {children}\n </Button>\n );\n};\n\nexport default SubmitButton;\n","import SubmitButton from './SubmitButton';\n\nexport type { SubmitButtonProps } from './SubmitButton';\n\nexport { SubmitButton };\n\nexport default SubmitButton;\n"],"mappings":";;;;;;;;;AA8BA,MAAM,gBAAgB,EACpB,YAAY,eACZ,WAAW,UACX,YAAY,KAAA,GACZ,QAAQ,WACR,OAAO,KAAA,GACP,UAAU,OACV,OAAO,MACP,SAAS,2BACc;CACvB,MAAM,EACJ,WAAW,EAAE,gBACb,kBACEA,uBAAAA,gBAAgB;AAEpB,QACE,iBAAA,GAAA,kBAAA,KAACC,kBAAAA,QAAD;EACa;EACX,YAAA,GAAA,uBAAA,IAAc,UAAU;EACjB;EACP,UAAU;EACJ;EACN,SAAS,WAAW;EAIpB,SAAS;EACH;EACN,SAAA,GAAA,uBAAA,SAAgB,QAAQ,EAAE,aAAa,MAAM,CAAC;EAC9C,MAAK;EAEJ;EACM,CAAA;;;;ACxDb,IAAA,uBAAe"}
@@ -1,5 +1,7 @@
1
- Object.defineProperty(exports, '__esModule', { value: true });
2
- const require_Switch = require('../Switch-CeUMwheZ.cjs');
3
-
4
- exports.Switch = require_Switch.Switch_default$1;
5
- exports.default = require_Switch.Switch_default;
1
+ Object.defineProperties(exports, {
2
+ __esModule: { value: true },
3
+ [Symbol.toStringTag]: { value: "Module" }
4
+ });
5
+ const require_Switch = require("../Switch-Dt9TGQ8d.cjs");
6
+ exports.Switch = require_Switch.Switch;
7
+ exports.default = require_Switch.Switch_default;
@@ -1,2 +1,2 @@
1
- import { n as SwitchProps, t as Switch } from "../index-CeiIXmAI.cjs";
1
+ import { n as SwitchProps, t as Switch } from "../index-3e3711-8.cjs";
2
2
  export { Switch, Switch as default, SwitchProps };
@@ -1,2 +1,2 @@
1
- import { n as SwitchProps, t as Switch } from "../index-CZq5eXSP.js";
1
+ import { n as SwitchProps, t as Switch } from "../index-DlebotZ4.js";
2
2
  export { Switch, Switch as default, SwitchProps };
@@ -1,3 +1,2 @@
1
- import { n as Switch_default, t as Switch_default$1 } from "../Switch-CXrz-M3V.js";
2
-
3
- export { Switch_default as Switch, Switch_default$1 as default };
1
+ import { n as Switch, t as Switch_default } from "../Switch-CMpXZdLc.js";
2
+ export { Switch, Switch_default as default };
@@ -1,10 +1,9 @@
1
- import { t as useUniformField } from "./useUniformField-C-Xyu-8v.js";
1
+ import { useUniformField } from "./hooks/useUniformField/index.js";
2
2
  import { cn, tv, variantsToClassNames } from "@fuf-stack/pixel-utils";
3
3
  import { useRef } from "react";
4
4
  import { jsx, jsxs } from "react/jsx-runtime";
5
5
  import { VisuallyHidden } from "@react-aria/visually-hidden";
6
6
  import { Switch } from "@heroui/switch";
7
-
8
7
  //#region src/Switch/Switch.tsx
9
8
  const switchVariants = tv({ slots: {
10
9
  base: "",
@@ -73,12 +72,10 @@ const Switch$1 = ({ className = void 0, endContent = void 0, name, size = void 0
73
72
  ]
74
73
  });
75
74
  };
76
- var Switch_default$1 = Switch$1;
77
-
78
75
  //#endregion
79
76
  //#region src/Switch/index.ts
80
- var Switch_default = Switch_default$1;
81
-
77
+ var Switch_default = Switch$1;
82
78
  //#endregion
83
- export { Switch_default$1 as n, Switch_default as t };
84
- //# sourceMappingURL=Switch-CXrz-M3V.js.map
79
+ export { Switch$1 as n, Switch_default as t };
80
+
81
+ //# sourceMappingURL=Switch-CMpXZdLc.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Switch-CXrz-M3V.js","names":["Switch","HeroSwitch","Switch"],"sources":["../src/Switch/Switch.tsx","../src/Switch/index.ts"],"sourcesContent":["import type { TVClassName, TVProps } from '@fuf-stack/pixel-utils';\nimport type { SwitchProps as HeroSwitchProps } from '@heroui/switch';\nimport type { ReactNode } from 'react';\n\nimport { useRef } from 'react';\n\nimport { Switch as HeroSwitch } from '@heroui/switch';\nimport { VisuallyHidden } from '@react-aria/visually-hidden';\n\nimport { cn, tv, variantsToClassNames } from '@fuf-stack/pixel-utils';\n\nimport { useUniformField } from '../hooks/useUniformField';\n\nexport const switchVariants = tv({\n slots: {\n base: '',\n endContent: '',\n errorMessage: 'ml-1 mt-1',\n // see HeroUI styles for group-data condition,\n // e.g.: https://github.com/heroui-inc/heroui/blob/main/packages/core/theme/src/components/select.ts\n label:\n 'text-sm text-foreground subpixel-antialiased group-data-[invalid=true]:!text-danger group-data-[required=true]:after:ml-0.5 group-data-[required=true]:after:text-danger group-data-[required=true]:after:content-[\"*\"]',\n outerWrapper: 'place-content-center',\n startContent: '',\n thumb: '',\n thumbIcon: '',\n wrapper: '',\n },\n});\n\ntype VariantProps = TVProps<typeof switchVariants>;\ntype ClassName = TVClassName<typeof switchVariants>;\n\nexport interface SwitchProps extends VariantProps {\n /** Custom aria-label for accessibility. If not provided, falls back to field name when no visible label exists */\n ariaLabel?: string;\n /** CSS class name */\n className?: ClassName;\n /** whether the select should be disabled */\n disabled?: boolean;\n /** Icon to be displayed at the end of the switch (when enabled) */\n endContent?: ReactNode;\n /** component displayed next to the switch */\n label?: ReactNode;\n /** name the field is registered under */\n name: string;\n /* Size of the switch */\n size?: 'sm' | 'md' | 'lg';\n /** Icon to be displayed at the start of the switch (when disabled) */\n startContent?: ReactNode;\n /** HTML data-testid attribute used in e2e tests */\n testId?: string;\n /** Icon to be displayed inside the thumb */\n thumbIcon?: HeroSwitchProps['thumbIcon'];\n}\n\n/**\n * Switch component based on [HeroUI Switch](https://www.heroui.com//docs/components/switch)\n */\nconst Switch = ({\n className = undefined,\n endContent = undefined,\n name,\n size = undefined,\n startContent = undefined,\n thumbIcon = undefined,\n ...uniformFieldProps\n}: SwitchProps) => {\n const {\n ariaLabel,\n defaultValue,\n disabled,\n errorMessage,\n field,\n getErrorMessageProps,\n getHelperWrapperProps,\n invalid,\n label,\n onBlur,\n onChange,\n ref,\n required,\n testId,\n } = useUniformField({\n name,\n ...uniformFieldProps,\n });\n\n // Ref for the visual switch to forward focus\n const visualSwitchRef = useRef<HTMLInputElement>(null);\n\n // classNames from slots\n const variants = switchVariants();\n const classNames = variantsToClassNames(variants, className, 'outerWrapper');\n\n return (\n <div className={classNames.outerWrapper}>\n {/* Visually hidden input for form accessibility and focus management */}\n <VisuallyHidden>\n <input\n ref={ref}\n aria-label={ariaLabel}\n checked={!!field.value}\n name={name}\n onBlur={onBlur}\n type=\"checkbox\"\n onChange={(e) => {\n onChange(e.target.checked);\n }}\n onFocus={() => {\n // When RHF focuses this hidden input (e.g., on validation error),\n // forward focus to the visual switch to show focus ring\n visualSwitchRef.current?.focus();\n }}\n />\n </VisuallyHidden>\n {/* Visual HeroSwitch component */}\n <HeroSwitch\n ref={visualSwitchRef}\n aria-label={ariaLabel}\n classNames={classNames}\n data-invalid={invalid}\n data-required={required}\n data-testid={testId}\n defaultSelected={!!defaultValue}\n endContent={endContent}\n isDisabled={disabled}\n isSelected={!!field.value}\n name={`${name}_switch`}\n onValueChange={onChange}\n size={size}\n startContent={startContent}\n thumbIcon={thumbIcon}\n >\n {label}\n </HeroSwitch>\n {invalid ? (\n <div\n {...getHelperWrapperProps()}\n className={cn(\n getHelperWrapperProps()?.className,\n // force helper to be visible (for some reason it's hidden by default) and remove margin\n 'ml-0 block',\n )}\n >\n <div {...getErrorMessageProps()}>{errorMessage}</div>\n </div>\n ) : null}\n </div>\n );\n};\n\nexport default Switch;\n","import Switch from './Switch';\n\nexport type { SwitchProps } from './Switch';\n\nexport { Switch };\n\nexport default Switch;\n"],"mappings":";;;;;;;;AAaA,MAAa,iBAAiB,GAAG,EAC/B,OAAO;CACL,MAAM;CACN,YAAY;CACZ,cAAc;CAGd,OACE;CACF,cAAc;CACd,cAAc;CACd,OAAO;CACP,WAAW;CACX,SAAS;CACV,EACF,CAAC;;;;AA+BF,MAAMA,YAAU,EACd,YAAY,QACZ,aAAa,QACb,MACA,OAAO,QACP,eAAe,QACf,YAAY,QACZ,GAAG,wBACc;CACjB,MAAM,EACJ,WACA,cACA,UACA,cACA,OACA,sBACA,uBACA,SACA,OACA,QACA,UACA,KACA,UACA,WACE,gBAAgB;EAClB;EACA,GAAG;EACJ,CAAC;CAGF,MAAM,kBAAkB,OAAyB,KAAK;CAItD,MAAM,aAAa,qBADF,gBAAgB,EACiB,WAAW,eAAe;AAE5E,QACE,qBAAC;EAAI,WAAW,WAAW;;GAEzB,oBAAC,4BACC,oBAAC;IACM;IACL,cAAY;IACZ,SAAS,CAAC,CAAC,MAAM;IACX;IACE;IACR,MAAK;IACL,WAAW,MAAM;AACf,cAAS,EAAE,OAAO,QAAQ;;IAE5B,eAAe;AAGb,qBAAgB,SAAS,OAAO;;KAElC,GACa;GAEjB,oBAACC;IACC,KAAK;IACL,cAAY;IACA;IACZ,gBAAc;IACd,iBAAe;IACf,eAAa;IACb,iBAAiB,CAAC,CAAC;IACP;IACZ,YAAY;IACZ,YAAY,CAAC,CAAC,MAAM;IACpB,MAAM,GAAG,KAAK;IACd,eAAe;IACT;IACQ;IACH;cAEV;KACU;GACZ,UACC,oBAAC;IACC,GAAI,uBAAuB;IAC3B,WAAW,GACT,uBAAuB,EAAE,WAEzB,aACD;cAED,oBAAC;KAAI,GAAI,sBAAsB;eAAG;MAAmB;KACjD,GACJ;;GACA;;AAIV,uBAAeD;;;;AClJf,qBAAeE"}
1
+ {"version":3,"file":"Switch-CMpXZdLc.js","names":["Switch","HeroSwitch","Switch"],"sources":["../src/Switch/Switch.tsx","../src/Switch/index.ts"],"sourcesContent":["import type { TVClassName, TVProps } from '@fuf-stack/pixel-utils';\nimport type { SwitchProps as HeroSwitchProps } from '@heroui/switch';\nimport type { ReactNode } from 'react';\n\nimport { useRef } from 'react';\n\nimport { Switch as HeroSwitch } from '@heroui/switch';\nimport { VisuallyHidden } from '@react-aria/visually-hidden';\n\nimport { cn, tv, variantsToClassNames } from '@fuf-stack/pixel-utils';\n\nimport { useUniformField } from '../hooks/useUniformField';\n\nexport const switchVariants = tv({\n slots: {\n base: '',\n endContent: '',\n errorMessage: 'ml-1 mt-1',\n // see HeroUI styles for group-data condition,\n // e.g.: https://github.com/heroui-inc/heroui/blob/main/packages/core/theme/src/components/select.ts\n label:\n 'text-sm text-foreground subpixel-antialiased group-data-[invalid=true]:!text-danger group-data-[required=true]:after:ml-0.5 group-data-[required=true]:after:text-danger group-data-[required=true]:after:content-[\"*\"]',\n outerWrapper: 'place-content-center',\n startContent: '',\n thumb: '',\n thumbIcon: '',\n wrapper: '',\n },\n});\n\ntype VariantProps = TVProps<typeof switchVariants>;\ntype ClassName = TVClassName<typeof switchVariants>;\n\nexport interface SwitchProps extends VariantProps {\n /** Custom aria-label for accessibility. If not provided, falls back to field name when no visible label exists */\n ariaLabel?: string;\n /** CSS class name */\n className?: ClassName;\n /** whether the select should be disabled */\n disabled?: boolean;\n /** Icon to be displayed at the end of the switch (when enabled) */\n endContent?: ReactNode;\n /** component displayed next to the switch */\n label?: ReactNode;\n /** name the field is registered under */\n name: string;\n /* Size of the switch */\n size?: 'sm' | 'md' | 'lg';\n /** Icon to be displayed at the start of the switch (when disabled) */\n startContent?: ReactNode;\n /** HTML data-testid attribute used in e2e tests */\n testId?: string;\n /** Icon to be displayed inside the thumb */\n thumbIcon?: HeroSwitchProps['thumbIcon'];\n}\n\n/**\n * Switch component based on [HeroUI Switch](https://www.heroui.com//docs/components/switch)\n */\nconst Switch = ({\n className = undefined,\n endContent = undefined,\n name,\n size = undefined,\n startContent = undefined,\n thumbIcon = undefined,\n ...uniformFieldProps\n}: SwitchProps) => {\n const {\n ariaLabel,\n defaultValue,\n disabled,\n errorMessage,\n field,\n getErrorMessageProps,\n getHelperWrapperProps,\n invalid,\n label,\n onBlur,\n onChange,\n ref,\n required,\n testId,\n } = useUniformField({\n name,\n ...uniformFieldProps,\n });\n\n // Ref for the visual switch to forward focus\n const visualSwitchRef = useRef<HTMLInputElement>(null);\n\n // classNames from slots\n const variants = switchVariants();\n const classNames = variantsToClassNames(variants, className, 'outerWrapper');\n\n return (\n <div className={classNames.outerWrapper}>\n {/* Visually hidden input for form accessibility and focus management */}\n <VisuallyHidden>\n <input\n ref={ref}\n aria-label={ariaLabel}\n checked={!!field.value}\n name={name}\n onBlur={onBlur}\n type=\"checkbox\"\n onChange={(e) => {\n onChange(e.target.checked);\n }}\n onFocus={() => {\n // When RHF focuses this hidden input (e.g., on validation error),\n // forward focus to the visual switch to show focus ring\n visualSwitchRef.current?.focus();\n }}\n />\n </VisuallyHidden>\n {/* Visual HeroSwitch component */}\n <HeroSwitch\n ref={visualSwitchRef}\n aria-label={ariaLabel}\n classNames={classNames}\n data-invalid={invalid}\n data-required={required}\n data-testid={testId}\n defaultSelected={!!defaultValue}\n endContent={endContent}\n isDisabled={disabled}\n isSelected={!!field.value}\n name={`${name}_switch`}\n onValueChange={onChange}\n size={size}\n startContent={startContent}\n thumbIcon={thumbIcon}\n >\n {label}\n </HeroSwitch>\n {invalid ? (\n <div\n {...getHelperWrapperProps()}\n className={cn(\n getHelperWrapperProps()?.className,\n // force helper to be visible (for some reason it's hidden by default) and remove margin\n 'ml-0 block',\n )}\n >\n <div {...getErrorMessageProps()}>{errorMessage}</div>\n </div>\n ) : null}\n </div>\n );\n};\n\nexport default Switch;\n","import Switch from './Switch';\n\nexport type { SwitchProps } from './Switch';\n\nexport { Switch };\n\nexport default Switch;\n"],"mappings":";;;;;;;AAaA,MAAa,iBAAiB,GAAG,EAC/B,OAAO;CACL,MAAM;CACN,YAAY;CACZ,cAAc;CAGd,OACE;CACF,cAAc;CACd,cAAc;CACd,OAAO;CACP,WAAW;CACX,SAAS;CACV,EACF,CAAC;;;;AA+BF,MAAMA,YAAU,EACd,YAAY,KAAA,GACZ,aAAa,KAAA,GACb,MACA,OAAO,KAAA,GACP,eAAe,KAAA,GACf,YAAY,KAAA,GACZ,GAAG,wBACc;CACjB,MAAM,EACJ,WACA,cACA,UACA,cACA,OACA,sBACA,uBACA,SACA,OACA,QACA,UACA,KACA,UACA,WACE,gBAAgB;EAClB;EACA,GAAG;EACJ,CAAC;CAGF,MAAM,kBAAkB,OAAyB,KAAK;CAItD,MAAM,aAAa,qBADF,gBAAgB,EACiB,WAAW,eAAe;AAE5E,QACE,qBAAC,OAAD;EAAK,WAAW,WAAW;YAA3B;GAEE,oBAAC,gBAAD,EAAA,UACE,oBAAC,SAAD;IACO;IACL,cAAY;IACZ,SAAS,CAAC,CAAC,MAAM;IACX;IACE;IACR,MAAK;IACL,WAAW,MAAM;AACf,cAAS,EAAE,OAAO,QAAQ;;IAE5B,eAAe;AAGb,qBAAgB,SAAS,OAAO;;IAElC,CAAA,EACa,CAAA;GAEjB,oBAACC,QAAD;IACE,KAAK;IACL,cAAY;IACA;IACZ,gBAAc;IACd,iBAAe;IACf,eAAa;IACb,iBAAiB,CAAC,CAAC;IACP;IACZ,YAAY;IACZ,YAAY,CAAC,CAAC,MAAM;IACpB,MAAM,GAAG,KAAK;IACd,eAAe;IACT;IACQ;IACH;cAEV;IACU,CAAA;GACZ,UACC,oBAAC,OAAD;IACE,GAAI,uBAAuB;IAC3B,WAAW,GACT,uBAAuB,EAAE,WAEzB,aACD;cAED,oBAAC,OAAD;KAAK,GAAI,sBAAsB;eAAG;KAAmB,CAAA;IACjD,CAAA,GACJ;GACA;;;;;AC9IV,IAAA,iBAAeC"}
@@ -1,11 +1,10 @@
1
- const require_FormContext = require('./FormContext-BSLO2-sO.cjs');
2
- const require_useUniformField = require('./useUniformField-6c4OCAfb.cjs');
1
+ require("./FormContext-BrY1FQYR.cjs");
2
+ const require_hooks_useUniformField_index = require("./hooks/useUniformField/index.cjs");
3
3
  let _fuf_stack_pixel_utils = require("@fuf-stack/pixel-utils");
4
4
  let react = require("react");
5
5
  let react_jsx_runtime = require("react/jsx-runtime");
6
6
  let _react_aria_visually_hidden = require("@react-aria/visually-hidden");
7
7
  let _heroui_switch = require("@heroui/switch");
8
-
9
8
  //#region src/Switch/Switch.tsx
10
9
  const switchVariants = (0, _fuf_stack_pixel_utils.tv)({ slots: {
11
10
  base: "",
@@ -22,7 +21,7 @@ const switchVariants = (0, _fuf_stack_pixel_utils.tv)({ slots: {
22
21
  * Switch component based on [HeroUI Switch](https://www.heroui.com//docs/components/switch)
23
22
  */
24
23
  const Switch = ({ className = void 0, endContent = void 0, name, size = void 0, startContent = void 0, thumbIcon = void 0, ...uniformFieldProps }) => {
25
- const { ariaLabel, defaultValue, disabled, errorMessage, field, getErrorMessageProps, getHelperWrapperProps, invalid, label, onBlur, onChange, ref, required, testId } = require_useUniformField.useUniformField({
24
+ const { ariaLabel, defaultValue, disabled, errorMessage, field, getErrorMessageProps, getHelperWrapperProps, invalid, label, onBlur, onChange, ref, required, testId } = require_hooks_useUniformField_index.useUniformField({
26
25
  name,
27
26
  ...uniformFieldProps
28
27
  });
@@ -74,23 +73,21 @@ const Switch = ({ className = void 0, endContent = void 0, name, size = void 0,
74
73
  ]
75
74
  });
76
75
  };
77
- var Switch_default$1 = Switch;
78
-
79
76
  //#endregion
80
77
  //#region src/Switch/index.ts
81
- var Switch_default = Switch_default$1;
82
-
78
+ var Switch_default = Switch;
83
79
  //#endregion
84
- Object.defineProperty(exports, 'Switch_default', {
85
- enumerable: true,
86
- get: function () {
87
- return Switch_default;
88
- }
80
+ Object.defineProperty(exports, "Switch", {
81
+ enumerable: true,
82
+ get: function() {
83
+ return Switch;
84
+ }
89
85
  });
90
- Object.defineProperty(exports, 'Switch_default$1', {
91
- enumerable: true,
92
- get: function () {
93
- return Switch_default$1;
94
- }
86
+ Object.defineProperty(exports, "Switch_default", {
87
+ enumerable: true,
88
+ get: function() {
89
+ return Switch_default;
90
+ }
95
91
  });
96
- //# sourceMappingURL=Switch-CeUMwheZ.cjs.map
92
+
93
+ //# sourceMappingURL=Switch-Dt9TGQ8d.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Switch-Dt9TGQ8d.cjs","names":["useUniformField","VisuallyHidden","HeroSwitch"],"sources":["../src/Switch/Switch.tsx","../src/Switch/index.ts"],"sourcesContent":["import type { TVClassName, TVProps } from '@fuf-stack/pixel-utils';\nimport type { SwitchProps as HeroSwitchProps } from '@heroui/switch';\nimport type { ReactNode } from 'react';\n\nimport { useRef } from 'react';\n\nimport { Switch as HeroSwitch } from '@heroui/switch';\nimport { VisuallyHidden } from '@react-aria/visually-hidden';\n\nimport { cn, tv, variantsToClassNames } from '@fuf-stack/pixel-utils';\n\nimport { useUniformField } from '../hooks/useUniformField';\n\nexport const switchVariants = tv({\n slots: {\n base: '',\n endContent: '',\n errorMessage: 'ml-1 mt-1',\n // see HeroUI styles for group-data condition,\n // e.g.: https://github.com/heroui-inc/heroui/blob/main/packages/core/theme/src/components/select.ts\n label:\n 'text-sm text-foreground subpixel-antialiased group-data-[invalid=true]:!text-danger group-data-[required=true]:after:ml-0.5 group-data-[required=true]:after:text-danger group-data-[required=true]:after:content-[\"*\"]',\n outerWrapper: 'place-content-center',\n startContent: '',\n thumb: '',\n thumbIcon: '',\n wrapper: '',\n },\n});\n\ntype VariantProps = TVProps<typeof switchVariants>;\ntype ClassName = TVClassName<typeof switchVariants>;\n\nexport interface SwitchProps extends VariantProps {\n /** Custom aria-label for accessibility. If not provided, falls back to field name when no visible label exists */\n ariaLabel?: string;\n /** CSS class name */\n className?: ClassName;\n /** whether the select should be disabled */\n disabled?: boolean;\n /** Icon to be displayed at the end of the switch (when enabled) */\n endContent?: ReactNode;\n /** component displayed next to the switch */\n label?: ReactNode;\n /** name the field is registered under */\n name: string;\n /* Size of the switch */\n size?: 'sm' | 'md' | 'lg';\n /** Icon to be displayed at the start of the switch (when disabled) */\n startContent?: ReactNode;\n /** HTML data-testid attribute used in e2e tests */\n testId?: string;\n /** Icon to be displayed inside the thumb */\n thumbIcon?: HeroSwitchProps['thumbIcon'];\n}\n\n/**\n * Switch component based on [HeroUI Switch](https://www.heroui.com//docs/components/switch)\n */\nconst Switch = ({\n className = undefined,\n endContent = undefined,\n name,\n size = undefined,\n startContent = undefined,\n thumbIcon = undefined,\n ...uniformFieldProps\n}: SwitchProps) => {\n const {\n ariaLabel,\n defaultValue,\n disabled,\n errorMessage,\n field,\n getErrorMessageProps,\n getHelperWrapperProps,\n invalid,\n label,\n onBlur,\n onChange,\n ref,\n required,\n testId,\n } = useUniformField({\n name,\n ...uniformFieldProps,\n });\n\n // Ref for the visual switch to forward focus\n const visualSwitchRef = useRef<HTMLInputElement>(null);\n\n // classNames from slots\n const variants = switchVariants();\n const classNames = variantsToClassNames(variants, className, 'outerWrapper');\n\n return (\n <div className={classNames.outerWrapper}>\n {/* Visually hidden input for form accessibility and focus management */}\n <VisuallyHidden>\n <input\n ref={ref}\n aria-label={ariaLabel}\n checked={!!field.value}\n name={name}\n onBlur={onBlur}\n type=\"checkbox\"\n onChange={(e) => {\n onChange(e.target.checked);\n }}\n onFocus={() => {\n // When RHF focuses this hidden input (e.g., on validation error),\n // forward focus to the visual switch to show focus ring\n visualSwitchRef.current?.focus();\n }}\n />\n </VisuallyHidden>\n {/* Visual HeroSwitch component */}\n <HeroSwitch\n ref={visualSwitchRef}\n aria-label={ariaLabel}\n classNames={classNames}\n data-invalid={invalid}\n data-required={required}\n data-testid={testId}\n defaultSelected={!!defaultValue}\n endContent={endContent}\n isDisabled={disabled}\n isSelected={!!field.value}\n name={`${name}_switch`}\n onValueChange={onChange}\n size={size}\n startContent={startContent}\n thumbIcon={thumbIcon}\n >\n {label}\n </HeroSwitch>\n {invalid ? (\n <div\n {...getHelperWrapperProps()}\n className={cn(\n getHelperWrapperProps()?.className,\n // force helper to be visible (for some reason it's hidden by default) and remove margin\n 'ml-0 block',\n )}\n >\n <div {...getErrorMessageProps()}>{errorMessage}</div>\n </div>\n ) : null}\n </div>\n );\n};\n\nexport default Switch;\n","import Switch from './Switch';\n\nexport type { SwitchProps } from './Switch';\n\nexport { Switch };\n\nexport default Switch;\n"],"mappings":";;;;;;;;AAaA,MAAa,kBAAA,GAAA,uBAAA,IAAoB,EAC/B,OAAO;CACL,MAAM;CACN,YAAY;CACZ,cAAc;CAGd,OACE;CACF,cAAc;CACd,cAAc;CACd,OAAO;CACP,WAAW;CACX,SAAS;CACV,EACF,CAAC;;;;AA+BF,MAAM,UAAU,EACd,YAAY,KAAA,GACZ,aAAa,KAAA,GACb,MACA,OAAO,KAAA,GACP,eAAe,KAAA,GACf,YAAY,KAAA,GACZ,GAAG,wBACc;CACjB,MAAM,EACJ,WACA,cACA,UACA,cACA,OACA,sBACA,uBACA,SACA,OACA,QACA,UACA,KACA,UACA,WACEA,oCAAAA,gBAAgB;EAClB;EACA,GAAG;EACJ,CAAC;CAGF,MAAM,mBAAA,GAAA,MAAA,QAA2C,KAAK;CAItD,MAAM,cAAA,GAAA,uBAAA,sBADW,gBAAgB,EACiB,WAAW,eAAe;AAE5E,QACE,iBAAA,GAAA,kBAAA,MAAC,OAAD;EAAK,WAAW,WAAW;YAA3B;GAEE,iBAAA,GAAA,kBAAA,KAACC,4BAAAA,gBAAD,EAAA,UACE,iBAAA,GAAA,kBAAA,KAAC,SAAD;IACO;IACL,cAAY;IACZ,SAAS,CAAC,CAAC,MAAM;IACX;IACE;IACR,MAAK;IACL,WAAW,MAAM;AACf,cAAS,EAAE,OAAO,QAAQ;;IAE5B,eAAe;AAGb,qBAAgB,SAAS,OAAO;;IAElC,CAAA,EACa,CAAA;GAEjB,iBAAA,GAAA,kBAAA,KAACC,eAAAA,QAAD;IACE,KAAK;IACL,cAAY;IACA;IACZ,gBAAc;IACd,iBAAe;IACf,eAAa;IACb,iBAAiB,CAAC,CAAC;IACP;IACZ,YAAY;IACZ,YAAY,CAAC,CAAC,MAAM;IACpB,MAAM,GAAG,KAAK;IACd,eAAe;IACT;IACQ;IACH;cAEV;IACU,CAAA;GACZ,UACC,iBAAA,GAAA,kBAAA,KAAC,OAAD;IACE,GAAI,uBAAuB;IAC3B,YAAA,GAAA,uBAAA,IACE,uBAAuB,EAAE,WAEzB,aACD;cAED,iBAAA,GAAA,kBAAA,KAAC,OAAD;KAAK,GAAI,sBAAsB;eAAG;KAAmB,CAAA;IACjD,CAAA,GACJ;GACA;;;;;AC9IV,IAAA,iBAAe"}
@@ -1,6 +1,8 @@
1
- Object.defineProperty(exports, '__esModule', { value: true });
2
- const require_SwitchBox = require('../SwitchBox-mGUPvJE0.cjs');
3
-
4
- exports.SwitchBox = require_SwitchBox.SwitchBox_default$1;
1
+ Object.defineProperties(exports, {
2
+ __esModule: { value: true },
3
+ [Symbol.toStringTag]: { value: "Module" }
4
+ });
5
+ const require_SwitchBox = require("../SwitchBox-DMPp_Ed-.cjs");
6
+ exports.SwitchBox = require_SwitchBox.SwitchBox;
5
7
  exports.default = require_SwitchBox.SwitchBox_default;
6
- exports.switchBoxVariants = require_SwitchBox.switchBoxVariants;
8
+ exports.switchBoxVariants = require_SwitchBox.switchBoxVariants;
@@ -1,2 +1,2 @@
1
- import { n as SwitchBoxProps, r as switchBoxVariants, t as SwitchBox } from "../index--KhDRPu3.cjs";
1
+ import { n as SwitchBoxProps, r as switchBoxVariants, t as SwitchBox } from "../index-pwXVq8hR.cjs";
2
2
  export { SwitchBox, SwitchBox as default, SwitchBoxProps, switchBoxVariants };
@@ -1,2 +1,2 @@
1
- import { n as SwitchBoxProps, r as switchBoxVariants, t as SwitchBox } from "../index-BgyvEfYZ.js";
1
+ import { n as SwitchBoxProps, r as switchBoxVariants, t as SwitchBox } from "../index-wV1E_PkS.js";
2
2
  export { SwitchBox, SwitchBox as default, SwitchBoxProps, switchBoxVariants };
@@ -1,3 +1,2 @@
1
- import { n as SwitchBox_default, r as switchBoxVariants, t as SwitchBox_default$1 } from "../SwitchBox-C-aLl2nX.js";
2
-
3
- export { SwitchBox_default as SwitchBox, SwitchBox_default$1 as default, switchBoxVariants };
1
+ import { n as SwitchBox, r as switchBoxVariants, t as SwitchBox_default } from "../SwitchBox-Cg7NPfp_.js";
2
+ export { SwitchBox, SwitchBox_default as default, switchBoxVariants };
@@ -1,10 +1,9 @@
1
- import { t as useUniformField } from "./useUniformField-C-Xyu-8v.js";
1
+ import { useUniformField } from "./hooks/useUniformField/index.js";
2
2
  import { cn, tv, variantsToClassNames } from "@fuf-stack/pixel-utils";
3
3
  import { useRef } from "react";
4
4
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
5
5
  import { VisuallyHidden } from "@react-aria/visually-hidden";
6
6
  import { useSwitch } from "@heroui/switch";
7
-
8
7
  //#region src/SwitchBox/SwitchBox.tsx
9
8
  const switchBoxVariants = tv({
10
9
  slots: {
@@ -145,12 +144,10 @@ const SwitchBox = ({ className = void 0, description = void 0, icon = void 0, na
145
144
  })
146
145
  }) : null] });
147
146
  };
148
- var SwitchBox_default$1 = SwitchBox;
149
-
150
147
  //#endregion
151
148
  //#region src/SwitchBox/index.ts
152
- var SwitchBox_default = SwitchBox_default$1;
153
-
149
+ var SwitchBox_default = SwitchBox;
154
150
  //#endregion
155
- export { SwitchBox_default$1 as n, switchBoxVariants as r, SwitchBox_default as t };
156
- //# sourceMappingURL=SwitchBox-C-aLl2nX.js.map
151
+ export { SwitchBox as n, switchBoxVariants as r, SwitchBox_default as t };
152
+
153
+ //# sourceMappingURL=SwitchBox-Cg7NPfp_.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SwitchBox-Cg7NPfp_.js","names":[],"sources":["../src/SwitchBox/SwitchBox.tsx","../src/SwitchBox/index.ts"],"sourcesContent":["import type { TVClassName } from '@fuf-stack/pixel-utils';\nimport type { SwitchProps as HeroSwitchProps } from '@heroui/switch';\nimport type { ReactNode } from 'react';\n\nimport { useRef } from 'react';\n\nimport { useSwitch } from '@heroui/switch';\nimport { VisuallyHidden } from '@react-aria/visually-hidden';\n\nimport { cn, tv, variantsToClassNames } from '@fuf-stack/pixel-utils';\n\nimport { useUniformField } from '../hooks/useUniformField';\n\nexport const switchBoxVariants = tv({\n slots: {\n box: 'group inline-flex w-full cursor-pointer items-center justify-between rounded-lg border-2 border-default hover:bg-content2 data-[selected=true]:border-focus',\n description: 'text-foreground opacity-70',\n icon: '',\n label:\n 'font-medium text-foreground group-data-[required=true]:after:ml-0.5 group-data-[required=true]:after:text-danger group-data-[required=true]:after:content-[\"*\"]',\n wrapper: '',\n thumb: '',\n thumbIcon: '',\n },\n variants: {\n isDisabled: {\n true: {\n box: 'pointer-events-none opacity-disabled',\n },\n },\n isInvalid: {\n true: {\n box: '!border-danger',\n label: '!text-danger',\n },\n },\n size: {\n sm: {\n box: 'gap-2 p-3',\n description: 'text-xs',\n label: 'text-xs',\n },\n md: {\n box: 'gap-4 p-4',\n description: 'text-small',\n label: 'text-sm',\n },\n lg: {\n box: 'gap-4 p-5',\n description: 'text-small',\n label: 'text-base',\n },\n },\n },\n defaultVariants: {\n size: 'md',\n },\n});\n\ntype ClassName = TVClassName<typeof switchBoxVariants>;\n\nexport interface SwitchBoxProps {\n /** CSS class name */\n className?: ClassName;\n /** Description text displayed below the label */\n description?: ReactNode;\n /** whether the switch should be disabled */\n disabled?: boolean;\n /** Icon to be displayed in the box */\n icon?: ReactNode;\n /** component displayed as the label */\n label?: ReactNode;\n /** name the field is registered under */\n name: string;\n /** whether the field is required */\n required?: boolean;\n /* Size of the switch */\n size?: 'sm' | 'md' | 'lg';\n /** HTML data-testid attribute used in e2e tests */\n testId?: string;\n /** Icon to be displayed inside the thumb */\n thumbIcon?: HeroSwitchProps['thumbIcon'];\n}\n\n/**\n * SwitchBox component - A card-like box with a switch control\n */\nconst SwitchBox = ({\n className = undefined,\n description = undefined,\n icon = undefined,\n name,\n size = undefined,\n thumbIcon = undefined,\n ...uniformFieldProps\n}: SwitchBoxProps) => {\n const {\n defaultValue,\n disabled,\n errorMessage,\n field,\n getErrorMessageProps,\n getHelperWrapperProps,\n invalid,\n label,\n onBlur,\n onChange,\n ref,\n required,\n testId,\n } = useUniformField({\n name,\n ...uniformFieldProps,\n });\n\n // Ref for the visual switch to forward focus\n const visualSwitchRef = useRef<HTMLInputElement>(null);\n\n // Use the useSwitch hook to get access to all the necessary props\n const {\n Component,\n slots,\n isSelected,\n getBaseProps,\n getInputProps,\n getWrapperProps,\n } = useSwitch({\n defaultSelected: !!defaultValue,\n isDisabled: disabled,\n isSelected: !!field.value,\n name: `${name}_switch`,\n onValueChange: onChange,\n size,\n thumbIcon,\n });\n\n // classNames from slots\n const variants = switchBoxVariants({\n isDisabled: disabled,\n isInvalid: invalid,\n size,\n });\n const classNames = variantsToClassNames(variants, className, 'box');\n\n return (\n <>\n <Component\n {...getBaseProps()}\n className={classNames.box}\n data-invalid={invalid}\n data-required={required}\n data-testid={testId}\n >\n <VisuallyHidden>\n <input\n ref={ref}\n aria-label={typeof label === 'string' ? label : name}\n checked={!!field.value}\n name={name}\n tabIndex={-1}\n type=\"checkbox\"\n onChange={(e) => {\n onChange(e.target.checked);\n }}\n onFocus={() => {\n // When RHF focuses this hidden input (e.g., on validation error),\n // forward focus to the visual switch to show focus ring\n visualSwitchRef.current?.focus();\n }}\n />\n {/* Visual switch input for focus ring */}\n <input\n ref={visualSwitchRef}\n {...getInputProps()}\n onBlur={(e) => {\n // Call HeroUI's internal onBlur to clear focus state and remove focus ring\n getInputProps().onBlur?.(e);\n // Then call RHF's onBlur to mark field as touched\n onBlur();\n }}\n />\n </VisuallyHidden>\n {!icon ? (\n <span\n {...getWrapperProps()}\n className={cn(getWrapperProps().className, classNames.wrapper)}\n >\n <span className={cn(slots.thumb({ class: classNames.thumb }))}>\n {thumbIcon && typeof thumbIcon === 'function'\n ? thumbIcon({\n isSelected: !!isSelected,\n className: slots.thumbIcon({ class: classNames.thumbIcon }),\n width: '1em',\n height: '1em',\n 'data-checked': isSelected ? 'true' : 'false',\n })\n : thumbIcon}\n </span>\n </span>\n ) : null}\n {icon ? <div className={classNames.icon}>{icon}</div> : null}\n <div className=\"grow\">\n {label ? <div className={classNames.label}>{label}</div> : null}\n {description ? (\n <div className={classNames.description}>{description}</div>\n ) : null}\n </div>\n {icon ? (\n <span\n {...getWrapperProps()}\n className={cn(getWrapperProps().className, classNames.wrapper)}\n >\n <span className={cn(slots.thumb({ class: classNames.thumb }))}>\n {thumbIcon && typeof thumbIcon === 'function'\n ? thumbIcon({\n isSelected: !!isSelected,\n className: slots.thumbIcon({ class: classNames.thumbIcon }),\n width: '1em',\n height: '1em',\n 'data-checked': isSelected ? 'true' : 'false',\n })\n : thumbIcon}\n </span>\n </span>\n ) : null}\n </Component>\n {invalid ? (\n <div\n {...getHelperWrapperProps()}\n className={cn(\n getHelperWrapperProps()?.className,\n // force helper to be visible (for some reason it's hidden by default) and remove margin\n 'ml-0 block',\n )}\n >\n <div {...getErrorMessageProps()}>{errorMessage}</div>\n </div>\n ) : null}\n </>\n );\n};\n\nexport default SwitchBox;\n","import SwitchBox from './SwitchBox';\n\nexport type { SwitchBoxProps } from './SwitchBox';\n\nexport { switchBoxVariants } from './SwitchBox';\nexport { SwitchBox };\n\nexport default SwitchBox;\n"],"mappings":"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"}
@@ -1,11 +1,10 @@
1
- const require_FormContext = require('./FormContext-BSLO2-sO.cjs');
2
- const require_useUniformField = require('./useUniformField-6c4OCAfb.cjs');
1
+ require("./FormContext-BrY1FQYR.cjs");
2
+ const require_hooks_useUniformField_index = require("./hooks/useUniformField/index.cjs");
3
3
  let _fuf_stack_pixel_utils = require("@fuf-stack/pixel-utils");
4
4
  let react = require("react");
5
5
  let react_jsx_runtime = require("react/jsx-runtime");
6
6
  let _react_aria_visually_hidden = require("@react-aria/visually-hidden");
7
7
  let _heroui_switch = require("@heroui/switch");
8
-
9
8
  //#region src/SwitchBox/SwitchBox.tsx
10
9
  const switchBoxVariants = (0, _fuf_stack_pixel_utils.tv)({
11
10
  slots: {
@@ -47,7 +46,7 @@ const switchBoxVariants = (0, _fuf_stack_pixel_utils.tv)({
47
46
  * SwitchBox component - A card-like box with a switch control
48
47
  */
49
48
  const SwitchBox = ({ className = void 0, description = void 0, icon = void 0, name, size = void 0, thumbIcon = void 0, ...uniformFieldProps }) => {
50
- const { defaultValue, disabled, errorMessage, field, getErrorMessageProps, getHelperWrapperProps, invalid, label, onBlur, onChange, ref, required, testId } = require_useUniformField.useUniformField({
49
+ const { defaultValue, disabled, errorMessage, field, getErrorMessageProps, getHelperWrapperProps, invalid, label, onBlur, onChange, ref, required, testId } = require_hooks_useUniformField_index.useUniformField({
51
50
  name,
52
51
  ...uniformFieldProps
53
52
  });
@@ -146,29 +145,27 @@ const SwitchBox = ({ className = void 0, description = void 0, icon = void 0, na
146
145
  })
147
146
  }) : null] });
148
147
  };
149
- var SwitchBox_default$1 = SwitchBox;
150
-
151
148
  //#endregion
152
149
  //#region src/SwitchBox/index.ts
153
- var SwitchBox_default = SwitchBox_default$1;
154
-
150
+ var SwitchBox_default = SwitchBox;
155
151
  //#endregion
156
- Object.defineProperty(exports, 'SwitchBox_default', {
157
- enumerable: true,
158
- get: function () {
159
- return SwitchBox_default;
160
- }
152
+ Object.defineProperty(exports, "SwitchBox", {
153
+ enumerable: true,
154
+ get: function() {
155
+ return SwitchBox;
156
+ }
161
157
  });
162
- Object.defineProperty(exports, 'SwitchBox_default$1', {
163
- enumerable: true,
164
- get: function () {
165
- return SwitchBox_default$1;
166
- }
158
+ Object.defineProperty(exports, "SwitchBox_default", {
159
+ enumerable: true,
160
+ get: function() {
161
+ return SwitchBox_default;
162
+ }
167
163
  });
168
- Object.defineProperty(exports, 'switchBoxVariants', {
169
- enumerable: true,
170
- get: function () {
171
- return switchBoxVariants;
172
- }
164
+ Object.defineProperty(exports, "switchBoxVariants", {
165
+ enumerable: true,
166
+ get: function() {
167
+ return switchBoxVariants;
168
+ }
173
169
  });
174
- //# sourceMappingURL=SwitchBox-mGUPvJE0.cjs.map
170
+
171
+ //# sourceMappingURL=SwitchBox-DMPp_Ed-.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SwitchBox-DMPp_Ed-.cjs","names":["useUniformField","VisuallyHidden"],"sources":["../src/SwitchBox/SwitchBox.tsx","../src/SwitchBox/index.ts"],"sourcesContent":["import type { TVClassName } from '@fuf-stack/pixel-utils';\nimport type { SwitchProps as HeroSwitchProps } from '@heroui/switch';\nimport type { ReactNode } from 'react';\n\nimport { useRef } from 'react';\n\nimport { useSwitch } from '@heroui/switch';\nimport { VisuallyHidden } from '@react-aria/visually-hidden';\n\nimport { cn, tv, variantsToClassNames } from '@fuf-stack/pixel-utils';\n\nimport { useUniformField } from '../hooks/useUniformField';\n\nexport const switchBoxVariants = tv({\n slots: {\n box: 'group inline-flex w-full cursor-pointer items-center justify-between rounded-lg border-2 border-default hover:bg-content2 data-[selected=true]:border-focus',\n description: 'text-foreground opacity-70',\n icon: '',\n label:\n 'font-medium text-foreground group-data-[required=true]:after:ml-0.5 group-data-[required=true]:after:text-danger group-data-[required=true]:after:content-[\"*\"]',\n wrapper: '',\n thumb: '',\n thumbIcon: '',\n },\n variants: {\n isDisabled: {\n true: {\n box: 'pointer-events-none opacity-disabled',\n },\n },\n isInvalid: {\n true: {\n box: '!border-danger',\n label: '!text-danger',\n },\n },\n size: {\n sm: {\n box: 'gap-2 p-3',\n description: 'text-xs',\n label: 'text-xs',\n },\n md: {\n box: 'gap-4 p-4',\n description: 'text-small',\n label: 'text-sm',\n },\n lg: {\n box: 'gap-4 p-5',\n description: 'text-small',\n label: 'text-base',\n },\n },\n },\n defaultVariants: {\n size: 'md',\n },\n});\n\ntype ClassName = TVClassName<typeof switchBoxVariants>;\n\nexport interface SwitchBoxProps {\n /** CSS class name */\n className?: ClassName;\n /** Description text displayed below the label */\n description?: ReactNode;\n /** whether the switch should be disabled */\n disabled?: boolean;\n /** Icon to be displayed in the box */\n icon?: ReactNode;\n /** component displayed as the label */\n label?: ReactNode;\n /** name the field is registered under */\n name: string;\n /** whether the field is required */\n required?: boolean;\n /* Size of the switch */\n size?: 'sm' | 'md' | 'lg';\n /** HTML data-testid attribute used in e2e tests */\n testId?: string;\n /** Icon to be displayed inside the thumb */\n thumbIcon?: HeroSwitchProps['thumbIcon'];\n}\n\n/**\n * SwitchBox component - A card-like box with a switch control\n */\nconst SwitchBox = ({\n className = undefined,\n description = undefined,\n icon = undefined,\n name,\n size = undefined,\n thumbIcon = undefined,\n ...uniformFieldProps\n}: SwitchBoxProps) => {\n const {\n defaultValue,\n disabled,\n errorMessage,\n field,\n getErrorMessageProps,\n getHelperWrapperProps,\n invalid,\n label,\n onBlur,\n onChange,\n ref,\n required,\n testId,\n } = useUniformField({\n name,\n ...uniformFieldProps,\n });\n\n // Ref for the visual switch to forward focus\n const visualSwitchRef = useRef<HTMLInputElement>(null);\n\n // Use the useSwitch hook to get access to all the necessary props\n const {\n Component,\n slots,\n isSelected,\n getBaseProps,\n getInputProps,\n getWrapperProps,\n } = useSwitch({\n defaultSelected: !!defaultValue,\n isDisabled: disabled,\n isSelected: !!field.value,\n name: `${name}_switch`,\n onValueChange: onChange,\n size,\n thumbIcon,\n });\n\n // classNames from slots\n const variants = switchBoxVariants({\n isDisabled: disabled,\n isInvalid: invalid,\n size,\n });\n const classNames = variantsToClassNames(variants, className, 'box');\n\n return (\n <>\n <Component\n {...getBaseProps()}\n className={classNames.box}\n data-invalid={invalid}\n data-required={required}\n data-testid={testId}\n >\n <VisuallyHidden>\n <input\n ref={ref}\n aria-label={typeof label === 'string' ? label : name}\n checked={!!field.value}\n name={name}\n tabIndex={-1}\n type=\"checkbox\"\n onChange={(e) => {\n onChange(e.target.checked);\n }}\n onFocus={() => {\n // When RHF focuses this hidden input (e.g., on validation error),\n // forward focus to the visual switch to show focus ring\n visualSwitchRef.current?.focus();\n }}\n />\n {/* Visual switch input for focus ring */}\n <input\n ref={visualSwitchRef}\n {...getInputProps()}\n onBlur={(e) => {\n // Call HeroUI's internal onBlur to clear focus state and remove focus ring\n getInputProps().onBlur?.(e);\n // Then call RHF's onBlur to mark field as touched\n onBlur();\n }}\n />\n </VisuallyHidden>\n {!icon ? (\n <span\n {...getWrapperProps()}\n className={cn(getWrapperProps().className, classNames.wrapper)}\n >\n <span className={cn(slots.thumb({ class: classNames.thumb }))}>\n {thumbIcon && typeof thumbIcon === 'function'\n ? thumbIcon({\n isSelected: !!isSelected,\n className: slots.thumbIcon({ class: classNames.thumbIcon }),\n width: '1em',\n height: '1em',\n 'data-checked': isSelected ? 'true' : 'false',\n })\n : thumbIcon}\n </span>\n </span>\n ) : null}\n {icon ? <div className={classNames.icon}>{icon}</div> : null}\n <div className=\"grow\">\n {label ? <div className={classNames.label}>{label}</div> : null}\n {description ? (\n <div className={classNames.description}>{description}</div>\n ) : null}\n </div>\n {icon ? (\n <span\n {...getWrapperProps()}\n className={cn(getWrapperProps().className, classNames.wrapper)}\n >\n <span className={cn(slots.thumb({ class: classNames.thumb }))}>\n {thumbIcon && typeof thumbIcon === 'function'\n ? thumbIcon({\n isSelected: !!isSelected,\n className: slots.thumbIcon({ class: classNames.thumbIcon }),\n width: '1em',\n height: '1em',\n 'data-checked': isSelected ? 'true' : 'false',\n })\n : thumbIcon}\n </span>\n </span>\n ) : null}\n </Component>\n {invalid ? (\n <div\n {...getHelperWrapperProps()}\n className={cn(\n getHelperWrapperProps()?.className,\n // force helper to be visible (for some reason it's hidden by default) and remove margin\n 'ml-0 block',\n )}\n >\n <div {...getErrorMessageProps()}>{errorMessage}</div>\n </div>\n ) : null}\n </>\n );\n};\n\nexport default SwitchBox;\n","import SwitchBox from './SwitchBox';\n\nexport type { SwitchBoxProps } from './SwitchBox';\n\nexport { switchBoxVariants } from './SwitchBox';\nexport { SwitchBox };\n\nexport default SwitchBox;\n"],"mappings":"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"}
@@ -1,5 +1,7 @@
1
- Object.defineProperty(exports, '__esModule', { value: true });
2
- const require_TextArea = require('../TextArea-BYEuk4Ng.cjs');
3
-
4
- exports.TextArea = require_TextArea.TextArea_default$1;
5
- exports.default = require_TextArea.TextArea_default;
1
+ Object.defineProperties(exports, {
2
+ __esModule: { value: true },
3
+ [Symbol.toStringTag]: { value: "Module" }
4
+ });
5
+ const require_TextArea = require("../TextArea-DDwzXW-y.cjs");
6
+ exports.TextArea = require_TextArea.TextArea;
7
+ exports.default = require_TextArea.TextArea_default;
@@ -1,2 +1,2 @@
1
- import { n as TextAreaProps, t as TextArea } from "../index-wwmQClW-.cjs";
1
+ import { n as TextAreaProps, t as TextArea } from "../index-DiD7s23-.cjs";
2
2
  export { TextArea, TextArea as default, TextAreaProps };
@@ -1,2 +1,2 @@
1
- import { n as TextAreaProps, t as TextArea } from "../index-mmk9VKYu.js";
1
+ import { n as TextAreaProps, t as TextArea } from "../index-B-6CMF1H.js";
2
2
  export { TextArea, TextArea as default, TextAreaProps };
@@ -1,3 +1,2 @@
1
- import { n as TextArea_default, t as TextArea_default$1 } from "../TextArea-BLkVYmHZ.js";
2
-
3
- export { TextArea_default as TextArea, TextArea_default$1 as default };
1
+ import { n as TextArea, t as TextArea_default } from "../TextArea-Bxi2pXvY.js";
2
+ export { TextArea, TextArea_default as default };
@@ -1,9 +1,8 @@
1
- import { t as useUniformField } from "./useUniformField-C-Xyu-8v.js";
2
- import { t as useInputValueDebounce } from "./useInputValueDebounce-DJO5uzLb.js";
1
+ import { useUniformField } from "./hooks/useUniformField/index.js";
2
+ import { useInputValueDebounce } from "./hooks/useInputValueDebounce/index.js";
3
3
  import { tv, variantsToClassNames } from "@fuf-stack/pixel-utils";
4
4
  import { jsx } from "react/jsx-runtime";
5
5
  import { Textarea } from "@heroui/input";
6
-
7
6
  //#region src/TextArea/TextArea.tsx
8
7
  const textAreaVariants = tv({ slots: {
9
8
  base: "",
@@ -54,12 +53,10 @@ const TextArea = ({ children = null, className: _className = void 0, debounceDel
54
53
  children
55
54
  });
56
55
  };
57
- var TextArea_default$1 = TextArea;
58
-
59
56
  //#endregion
60
57
  //#region src/TextArea/index.ts
61
- var TextArea_default = TextArea_default$1;
62
-
58
+ var TextArea_default = TextArea;
63
59
  //#endregion
64
- export { TextArea_default$1 as n, TextArea_default as t };
65
- //# sourceMappingURL=TextArea-BLkVYmHZ.js.map
60
+ export { TextArea as n, TextArea_default as t };
61
+
62
+ //# sourceMappingURL=TextArea-Bxi2pXvY.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TextArea-Bxi2pXvY.js","names":["HeroTextArea"],"sources":["../src/TextArea/TextArea.tsx","../src/TextArea/index.ts"],"sourcesContent":["import type { TVClassName, TVProps } from '@fuf-stack/pixel-utils';\nimport type { ReactNode } from 'react';\n\nimport { Textarea as HeroTextArea } from '@heroui/input';\n\nimport { tv, variantsToClassNames } from '@fuf-stack/pixel-utils';\n\nimport { useInputValueDebounce } from '../hooks/useInputValueDebounce';\nimport { useUniformField } from '../hooks/useUniformField';\n\n// input variants\nexport const textAreaVariants = tv({\n slots: {\n /** wrapper around the whole input */\n base: '',\n /** clear button */\n clearButton: '',\n /** actual input element */\n input: '',\n /** inner wrapper (HeroUI inputWrapper slot) */\n inputWrapper: 'bg-content1 group-data-[focus=true]:border-focus',\n },\n});\n\ntype VariantProps = TVProps<typeof textAreaVariants>;\ntype ClassName = TVClassName<typeof textAreaVariants>;\n\nexport interface TextAreaProps extends VariantProps {\n /** Custom aria-label for accessibility. If not provided, falls back to field name when no visible label exists */\n ariaLabel?: string;\n /** Child components. The content of the textarea. */\n children?: ReactNode;\n /** CSS class name */\n className?: ClassName;\n /** debounce delay in milliseconds for form state updates (default: 300ms) */\n debounceDelay?: number;\n /** Determines if the TextArea is disabled or not. */\n disabled?: boolean;\n /** Label displayed above the TextArea. */\n label?: ReactNode;\n /** Name the TextArea is registered at in HTML forms (react-hook-form). */\n name: string;\n /** placeholder for the textArea content. */\n placeholder?: string;\n /** Id to grab element in internal tests. */\n testId?: string;\n}\n\n/**\n * TextArea component based on [HeroUI TextArea](https://www.heroui.com//docs/components/textarea)\n */\nconst TextArea = ({\n children = null,\n className: _className = undefined,\n debounceDelay = 300,\n name,\n placeholder = ' ',\n ...uniformFieldProps\n}: TextAreaProps) => {\n const {\n ariaLabel,\n disabled,\n errorMessage,\n field: {\n onChange: fieldOnChange,\n onBlur: fieldOnBlur,\n value: fieldValue,\n ref,\n },\n invalid,\n label,\n required,\n testId,\n } = useUniformField({ name, ...uniformFieldProps });\n\n // Use debounced handlers for form updates\n const { onChange, onBlur, value } = useInputValueDebounce({\n debounceDelay,\n name,\n onBlur: fieldOnBlur,\n onChange: fieldOnChange,\n value: fieldValue,\n });\n\n // classNames from slots\n const variants = textAreaVariants();\n const classNames = variantsToClassNames(variants, _className, 'base');\n\n return (\n <HeroTextArea\n ref={ref}\n data-testid={testId}\n errorMessage={errorMessage}\n id={testId}\n isDisabled={disabled}\n isInvalid={invalid}\n isRequired={required}\n label={label}\n labelPlacement=\"outside\"\n name={name}\n onBlur={onBlur}\n onChange={onChange}\n placeholder={placeholder}\n value={value}\n variant=\"bordered\"\n // Only add aria-label if there's no meaningful placeholder (HeroUI uses placeholder as aria-label)\n aria-label={\n !placeholder || placeholder.trim() === '' ? ariaLabel : undefined\n }\n classNames={{\n base: classNames.base,\n clearButton: classNames.clearButton,\n // set padding to 0 for error message exit animation\n helperWrapper: 'p-0',\n input: classNames.input,\n inputWrapper: classNames.inputWrapper,\n }}\n >\n {children}\n </HeroTextArea>\n );\n};\n\nexport default TextArea;\n","import TextArea from './TextArea';\n\nexport type { TextAreaProps } from './TextArea';\n\nexport { TextArea };\n\nexport default TextArea;\n"],"mappings":";;;;;;AAWA,MAAa,mBAAmB,GAAG,EACjC,OAAO;CAEL,MAAM;CAEN,aAAa;CAEb,OAAO;CAEP,cAAc;CACf,EACF,CAAC;;;;AA6BF,MAAM,YAAY,EAChB,WAAW,MACX,WAAW,aAAa,KAAA,GACxB,gBAAgB,KAChB,MACA,cAAc,KACd,GAAG,wBACgB;CACnB,MAAM,EACJ,WACA,UACA,cACA,OAAO,EACL,UAAU,eACV,QAAQ,aACR,OAAO,YACP,OAEF,SACA,OACA,UACA,WACE,gBAAgB;EAAE;EAAM,GAAG;EAAmB,CAAC;CAGnD,MAAM,EAAE,UAAU,QAAQ,UAAU,sBAAsB;EACxD;EACA;EACA,QAAQ;EACR,UAAU;EACV,OAAO;EACR,CAAC;CAIF,MAAM,aAAa,qBADF,kBAAkB,EACe,YAAY,OAAO;AAErE,QACE,oBAACA,UAAD;EACO;EACL,eAAa;EACC;EACd,IAAI;EACJ,YAAY;EACZ,WAAW;EACX,YAAY;EACL;EACP,gBAAe;EACT;EACE;EACE;EACG;EACN;EACP,SAAQ;EAER,cACE,CAAC,eAAe,YAAY,MAAM,KAAK,KAAK,YAAY,KAAA;EAE1D,YAAY;GACV,MAAM,WAAW;GACjB,aAAa,WAAW;GAExB,eAAe;GACf,OAAO,WAAW;GAClB,cAAc,WAAW;GAC1B;EAEA;EACY,CAAA;;;;ACjHnB,IAAA,mBAAe"}
@@ -1,10 +1,9 @@
1
- const require_FormContext = require('./FormContext-BSLO2-sO.cjs');
2
- const require_useUniformField = require('./useUniformField-6c4OCAfb.cjs');
3
- const require_useInputValueDebounce = require('./useInputValueDebounce-CRaM7HEM.cjs');
1
+ require("./FormContext-BrY1FQYR.cjs");
2
+ const require_hooks_useUniformField_index = require("./hooks/useUniformField/index.cjs");
3
+ const require_hooks_useInputValueDebounce_index = require("./hooks/useInputValueDebounce/index.cjs");
4
4
  let _fuf_stack_pixel_utils = require("@fuf-stack/pixel-utils");
5
5
  let react_jsx_runtime = require("react/jsx-runtime");
6
6
  let _heroui_input = require("@heroui/input");
7
-
8
7
  //#region src/TextArea/TextArea.tsx
9
8
  const textAreaVariants = (0, _fuf_stack_pixel_utils.tv)({ slots: {
10
9
  base: "",
@@ -16,11 +15,11 @@ const textAreaVariants = (0, _fuf_stack_pixel_utils.tv)({ slots: {
16
15
  * TextArea component based on [HeroUI TextArea](https://www.heroui.com//docs/components/textarea)
17
16
  */
18
17
  const TextArea = ({ children = null, className: _className = void 0, debounceDelay = 300, name, placeholder = " ", ...uniformFieldProps }) => {
19
- const { ariaLabel, disabled, errorMessage, field: { onChange: fieldOnChange, onBlur: fieldOnBlur, value: fieldValue, ref }, invalid, label, required, testId } = require_useUniformField.useUniformField({
18
+ const { ariaLabel, disabled, errorMessage, field: { onChange: fieldOnChange, onBlur: fieldOnBlur, value: fieldValue, ref }, invalid, label, required, testId } = require_hooks_useUniformField_index.useUniformField({
20
19
  name,
21
20
  ...uniformFieldProps
22
21
  });
23
- const { onChange, onBlur, value } = require_useInputValueDebounce.useInputValueDebounce({
22
+ const { onChange, onBlur, value } = require_hooks_useInputValueDebounce_index.useInputValueDebounce({
24
23
  debounceDelay,
25
24
  name,
26
25
  onBlur: fieldOnBlur,
@@ -55,23 +54,21 @@ const TextArea = ({ children = null, className: _className = void 0, debounceDel
55
54
  children
56
55
  });
57
56
  };
58
- var TextArea_default$1 = TextArea;
59
-
60
57
  //#endregion
61
58
  //#region src/TextArea/index.ts
62
- var TextArea_default = TextArea_default$1;
63
-
59
+ var TextArea_default = TextArea;
64
60
  //#endregion
65
- Object.defineProperty(exports, 'TextArea_default', {
66
- enumerable: true,
67
- get: function () {
68
- return TextArea_default;
69
- }
61
+ Object.defineProperty(exports, "TextArea", {
62
+ enumerable: true,
63
+ get: function() {
64
+ return TextArea;
65
+ }
70
66
  });
71
- Object.defineProperty(exports, 'TextArea_default$1', {
72
- enumerable: true,
73
- get: function () {
74
- return TextArea_default$1;
75
- }
67
+ Object.defineProperty(exports, "TextArea_default", {
68
+ enumerable: true,
69
+ get: function() {
70
+ return TextArea_default;
71
+ }
76
72
  });
77
- //# sourceMappingURL=TextArea-BYEuk4Ng.cjs.map
73
+
74
+ //# sourceMappingURL=TextArea-DDwzXW-y.cjs.map