@fuf-stack/uniform 1.11.0 → 1.11.2

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 (311) hide show
  1. package/dist/Checkboxes/index.cjs +1 -1
  2. package/dist/Checkboxes/index.d.cts +1 -1
  3. package/dist/Checkboxes/index.d.ts +1 -1
  4. package/dist/Checkboxes/index.js +1 -1
  5. package/dist/{Checkboxes-CGWhnpBp.js → Checkboxes-BY4UK0Xf.js} +6 -6
  6. package/dist/Checkboxes-BY4UK0Xf.js.map +1 -0
  7. package/dist/{Checkboxes-Ds6bzl6p.cjs → Checkboxes-DgCK-Wq-.cjs} +18 -18
  8. package/dist/Checkboxes-DgCK-Wq-.cjs.map +1 -0
  9. package/dist/FieldArray/index.cjs +1 -1
  10. package/dist/FieldArray/index.d.cts +1 -1
  11. package/dist/FieldArray/index.d.ts +1 -1
  12. package/dist/FieldArray/index.js +1 -1
  13. package/dist/{FieldArray-D3iUaRLo.js → FieldArray-CDLaGvNj.js} +8 -8
  14. package/dist/FieldArray-CDLaGvNj.js.map +1 -0
  15. package/dist/{FieldArray-BexXN9bO.cjs → FieldArray-DBsyUQkU.cjs} +49 -49
  16. package/dist/FieldArray-DBsyUQkU.cjs.map +1 -0
  17. package/dist/FieldCard/index.cjs +1 -1
  18. package/dist/FieldCard/index.d.cts +1 -1
  19. package/dist/FieldCard/index.d.ts +1 -1
  20. package/dist/FieldCard/index.js +1 -1
  21. package/dist/{FieldCard-mpmErfDK.js → FieldCard-C1MCSbPW.js} +3 -3
  22. package/dist/{FieldCard-mpmErfDK.js.map → FieldCard-C1MCSbPW.js.map} +1 -1
  23. package/dist/{FieldCard-pP7aniZU.cjs → FieldCard-NKF358fO.cjs} +13 -13
  24. package/dist/{FieldCard-pP7aniZU.cjs.map → FieldCard-NKF358fO.cjs.map} +1 -1
  25. package/dist/{FieldCopyTestIdButton-AaLwu_8y.cjs → FieldCopyTestIdButton-BSYcSo2o.cjs} +10 -10
  26. package/dist/{FieldCopyTestIdButton-AaLwu_8y.cjs.map → FieldCopyTestIdButton-BSYcSo2o.cjs.map} +1 -1
  27. package/dist/{FieldCopyTestIdButton-Cx8AXJhO.js → FieldCopyTestIdButton-DWPCDJ-s.js} +4 -4
  28. package/dist/{FieldCopyTestIdButton-Cx8AXJhO.js.map → FieldCopyTestIdButton-DWPCDJ-s.js.map} +1 -1
  29. package/dist/{FieldValidationError-D86DPSOH.js → FieldValidationError-1hiDEFew.js} +4 -4
  30. package/dist/{FieldValidationError-D86DPSOH.js.map → FieldValidationError-1hiDEFew.js.map} +1 -1
  31. package/dist/{FieldValidationError-Cq6aI0tE.cjs → FieldValidationError-CE8R8qry.cjs} +13 -13
  32. package/dist/{FieldValidationError-Cq6aI0tE.cjs.map → FieldValidationError-CE8R8qry.cjs.map} +1 -1
  33. package/dist/Form/index.cjs +1 -1
  34. package/dist/Form/index.d.ts +1 -1
  35. package/dist/Form/index.js +1 -1
  36. package/dist/{Form-FvN3SXfF.cjs → Form-BsD69fql.cjs} +19 -19
  37. package/dist/{Form-FvN3SXfF.cjs.map → Form-BsD69fql.cjs.map} +1 -1
  38. package/dist/{Form-CFmCTl60.js → Form-DRNEwHsi.js} +4 -4
  39. package/dist/{Form-CFmCTl60.js.map → Form-DRNEwHsi.js.map} +1 -1
  40. package/dist/{FormContext-C3GymQOA.cjs → FormContext-Bb6d8hdG.cjs} +8 -8
  41. package/dist/FormContext-Bb6d8hdG.cjs.map +1 -0
  42. package/dist/FormContext-CN9n_KdE.js.map +1 -1
  43. package/dist/Grid/index.cjs +1 -1
  44. package/dist/Grid/index.d.cts +1 -1
  45. package/dist/Grid/index.d.ts +1 -1
  46. package/dist/Grid/index.js +1 -1
  47. package/dist/{Grid-DG60vYYG.cjs → Grid-D84e76CE.cjs} +8 -8
  48. package/dist/{Grid-DG60vYYG.cjs.map → Grid-D84e76CE.cjs.map} +1 -1
  49. package/dist/{Grid-DEH7Sezi.js → Grid-LRjQlZms.js} +4 -4
  50. package/dist/{Grid-DEH7Sezi.js.map → Grid-LRjQlZms.js.map} +1 -1
  51. package/dist/Input/index.cjs +1 -1
  52. package/dist/Input/index.d.cts +1 -1
  53. package/dist/Input/index.d.ts +1 -1
  54. package/dist/Input/index.js +1 -1
  55. package/dist/{Input--h5t7Sbl.js → Input-DXMWGTBh.js} +5 -5
  56. package/dist/Input-DXMWGTBh.js.map +1 -0
  57. package/dist/{Input-DKfFFOpo.cjs → Input-DeTpxiK_.cjs} +15 -15
  58. package/dist/Input-DeTpxiK_.cjs.map +1 -0
  59. package/dist/RadioBoxes/index.cjs +1 -1
  60. package/dist/RadioBoxes/index.d.cts +1 -1
  61. package/dist/RadioBoxes/index.d.ts +1 -1
  62. package/dist/RadioBoxes/index.js +1 -1
  63. package/dist/{RadioBoxes-7qdHj3ti.js → RadioBoxes-BEln4a-B.js} +5 -5
  64. package/dist/RadioBoxes-BEln4a-B.js.map +1 -0
  65. package/dist/{RadioBoxes-Bd9ahl4i.cjs → RadioBoxes-gsQGqQCd.cjs} +22 -22
  66. package/dist/RadioBoxes-gsQGqQCd.cjs.map +1 -0
  67. package/dist/RadioTabs/index.cjs +1 -1
  68. package/dist/RadioTabs/index.d.cts +1 -1
  69. package/dist/RadioTabs/index.d.ts +1 -1
  70. package/dist/RadioTabs/index.js +1 -1
  71. package/dist/{RadioTabs-DcEUdW7r.cjs → RadioTabs-BYpP0tKA.cjs} +18 -18
  72. package/dist/RadioTabs-BYpP0tKA.cjs.map +1 -0
  73. package/dist/{RadioTabs-DXs98jng.js → RadioTabs-DLr9QiXI.js} +5 -5
  74. package/dist/RadioTabs-DLr9QiXI.js.map +1 -0
  75. package/dist/Radios/index.cjs +1 -1
  76. package/dist/Radios/index.d.cts +1 -1
  77. package/dist/Radios/index.d.ts +1 -1
  78. package/dist/Radios/index.js +1 -1
  79. package/dist/{Radios-CIPNqPzi.cjs → Radios-BCOfnTke.cjs} +14 -14
  80. package/dist/{Radios-CIPNqPzi.cjs.map → Radios-BCOfnTke.cjs.map} +1 -1
  81. package/dist/{Radios-BIx06mzU.js → Radios-DCXI2kMf.js} +5 -5
  82. package/dist/{Radios-BIx06mzU.js.map → Radios-DCXI2kMf.js.map} +1 -1
  83. package/dist/Select/index.cjs +1 -1
  84. package/dist/Select/index.d.cts +1 -1
  85. package/dist/Select/index.d.ts +1 -1
  86. package/dist/Select/index.js +1 -1
  87. package/dist/{Select-CBjqYDcs.js → Select-CyfEmWiD.js} +5 -5
  88. package/dist/Select-CyfEmWiD.js.map +1 -0
  89. package/dist/{Select-BsL7qn2v.cjs → Select-KnPGOO27.cjs} +19 -19
  90. package/dist/Select-KnPGOO27.cjs.map +1 -0
  91. package/dist/Slider/index.cjs +1 -1
  92. package/dist/Slider/index.d.cts +1 -1
  93. package/dist/Slider/index.d.ts +1 -1
  94. package/dist/Slider/index.js +1 -1
  95. package/dist/{Slider-BDLbD7d5.cjs → Slider-C7xxYPgR.cjs} +15 -15
  96. package/dist/{Slider-BDLbD7d5.cjs.map → Slider-C7xxYPgR.cjs.map} +1 -1
  97. package/dist/{Slider-BHjHSoIk.js → Slider-Dlhb-9hC.js} +5 -5
  98. package/dist/{Slider-BHjHSoIk.js.map → Slider-Dlhb-9hC.js.map} +1 -1
  99. package/dist/SubmitButton/index.cjs +1 -1
  100. package/dist/SubmitButton/index.d.cts +1 -1
  101. package/dist/SubmitButton/index.d.ts +1 -1
  102. package/dist/SubmitButton/index.js +1 -1
  103. package/dist/{SubmitButton-7iOaKzhB.js → SubmitButton-C5f6j0N4.js} +4 -4
  104. package/dist/{SubmitButton-7iOaKzhB.js.map → SubmitButton-C5f6j0N4.js.map} +1 -1
  105. package/dist/{SubmitButton-DhtPJuro.cjs → SubmitButton-CUBItcBn.cjs} +12 -12
  106. package/dist/{SubmitButton-DhtPJuro.cjs.map → SubmitButton-CUBItcBn.cjs.map} +1 -1
  107. package/dist/Switch/index.cjs +1 -1
  108. package/dist/Switch/index.d.cts +1 -1
  109. package/dist/Switch/index.d.ts +1 -1
  110. package/dist/Switch/index.js +1 -1
  111. package/dist/{Switch-DCxAgt_L.js → Switch--m02Xcq8.js} +5 -5
  112. package/dist/{Switch-DCxAgt_L.js.map → Switch--m02Xcq8.js.map} +1 -1
  113. package/dist/{Switch-Dczzog3v.cjs → Switch-6LyeZHJh.cjs} +15 -15
  114. package/dist/{Switch-Dczzog3v.cjs.map → Switch-6LyeZHJh.cjs.map} +1 -1
  115. package/dist/SwitchBox/index.cjs +1 -1
  116. package/dist/SwitchBox/index.d.cts +1 -1
  117. package/dist/SwitchBox/index.d.ts +1 -1
  118. package/dist/SwitchBox/index.js +1 -1
  119. package/dist/{SwitchBox-DqVmZYId.cjs → SwitchBox-CtGiQdys.cjs} +19 -19
  120. package/dist/{SwitchBox-DqVmZYId.cjs.map → SwitchBox-CtGiQdys.cjs.map} +1 -1
  121. package/dist/{SwitchBox-DPHryDOM.js → SwitchBox-D0-e-pbM.js} +5 -5
  122. package/dist/{SwitchBox-DPHryDOM.js.map → SwitchBox-D0-e-pbM.js.map} +1 -1
  123. package/dist/TextArea/index.cjs +1 -1
  124. package/dist/TextArea/index.d.cts +1 -1
  125. package/dist/TextArea/index.d.ts +1 -1
  126. package/dist/TextArea/index.js +1 -1
  127. package/dist/{TextArea-BR6e-Fio.js → TextArea-BiSnvJ69.js} +5 -5
  128. package/dist/{TextArea-BR6e-Fio.js.map → TextArea-BiSnvJ69.js.map} +1 -1
  129. package/dist/{TextArea-CH-F6_ax.cjs → TextArea-PtdSABZS.cjs} +13 -13
  130. package/dist/{TextArea-CH-F6_ax.cjs.map → TextArea-PtdSABZS.cjs.map} +1 -1
  131. package/dist/helpers/index.cjs +1 -1
  132. package/dist/helpers-B-CJOBt3.js.map +1 -1
  133. package/dist/{helpers-KTgXi0lA.cjs → helpers-B84E9vHd.cjs} +4 -4
  134. package/dist/helpers-B84E9vHd.cjs.map +1 -0
  135. package/dist/hooks/useClientValidation/index.cjs +1 -1
  136. package/dist/hooks/useClientValidation/index.d.cts +1 -1
  137. package/dist/hooks/useClientValidation/index.d.ts +1 -1
  138. package/dist/hooks/useController/index.cjs +1 -1
  139. package/dist/hooks/useController/index.d.ts +0 -1
  140. package/dist/hooks/useFormContext/index.cjs +1 -1
  141. package/dist/hooks/useFormContext/index.d.cts +1 -1
  142. package/dist/hooks/useFormContext/index.d.ts +2 -2
  143. package/dist/hooks/useInput/index.cjs +3 -3
  144. package/dist/hooks/useInput/index.d.cts +1 -1
  145. package/dist/hooks/useInput/index.d.ts +1 -1
  146. package/dist/hooks/useInputValueDebounce/index.cjs +1 -1
  147. package/dist/hooks/useInputValueDebounce/index.d.cts +1 -1
  148. package/dist/hooks/useInputValueDebounce/index.d.ts +1 -1
  149. package/dist/hooks/useInputValueTransform/index.cjs +1 -1
  150. package/dist/hooks/useUniformField/index.cjs +1 -1
  151. package/dist/hooks/useUniformField/index.d.cts +1 -1
  152. package/dist/hooks/useUniformField/index.d.ts +3 -3
  153. package/dist/hooks/useUniformField/index.js +1 -1
  154. package/dist/hooks/useUniformFieldArray/index.cjs +1 -1
  155. package/dist/hooks/useUniformFieldArray/index.d.cts +1 -1
  156. package/dist/hooks/useUniformFieldArray/index.d.ts +24 -4
  157. package/dist/hooks/useUniformFieldArray/index.js +1 -1
  158. package/dist/hooks/useWatchUserChange/index.cjs +1 -1
  159. package/dist/{index-CzypMcVS.d.cts → index--E2ZsMya.d.ts} +6 -6
  160. package/dist/{index-C_ATGeaX.d.ts.map → index--E2ZsMya.d.ts.map} +1 -1
  161. package/dist/{index-C56I3SOi.d.cts → index-BITJ-CZL.d.cts} +4 -4
  162. package/dist/{index-C56I3SOi.d.cts.map → index-BITJ-CZL.d.cts.map} +1 -1
  163. package/dist/{index-CVY05bZf.d.ts → index-BL0DnIzh.d.ts} +3 -3
  164. package/dist/{index-CVY05bZf.d.ts.map → index-BL0DnIzh.d.ts.map} +1 -1
  165. package/dist/{index-CHmS3ri3.d.ts → index-BQDEnYTq.d.ts} +1 -1
  166. package/dist/{index-CHmS3ri3.d.ts.map → index-BQDEnYTq.d.ts.map} +1 -1
  167. package/dist/{index-DHHBSmJb.d.ts → index-BTTo_ufh.d.ts} +1 -1
  168. package/dist/{index-DHHBSmJb.d.ts.map → index-BTTo_ufh.d.ts.map} +1 -1
  169. package/dist/{index-B74QlCAy.d.cts → index-BWNJdLDV.d.ts} +48 -48
  170. package/dist/{index-B4Wkijem.d.ts.map → index-BWNJdLDV.d.ts.map} +1 -1
  171. package/dist/{index-CraZe1qS.d.ts → index-Bj_lpc5r.d.cts} +21 -21
  172. package/dist/{index-CI9QBUoM.d.cts.map → index-Bj_lpc5r.d.cts.map} +1 -1
  173. package/dist/{index-B4Wkijem.d.ts → index-Bo_n9sse.d.cts} +47 -47
  174. package/dist/{index-B74QlCAy.d.cts.map → index-Bo_n9sse.d.cts.map} +1 -1
  175. package/dist/{index-iuLEYAix.d.cts → index-BxA_pJWn.d.cts} +21 -21
  176. package/dist/{index-iuLEYAix.d.cts.map → index-BxA_pJWn.d.cts.map} +1 -1
  177. package/dist/{index-Drl7euco.d.ts → index-C-2nxT8D.d.ts} +21 -21
  178. package/dist/{index-Drl7euco.d.ts.map → index-C-2nxT8D.d.ts.map} +1 -1
  179. package/dist/{index-C1fYmoY0.d.ts → index-C0L7GvgN.d.cts} +34 -34
  180. package/dist/index-C0L7GvgN.d.cts.map +1 -0
  181. package/dist/{index-DzuP5q-2.d.ts → index-C1PUx1tH.d.ts} +6 -6
  182. package/dist/index-C1PUx1tH.d.ts.map +1 -0
  183. package/dist/index-CADnFWHq.d.ts +264 -0
  184. package/dist/{index-BTEsKen4.d.ts.map → index-CADnFWHq.d.ts.map} +1 -1
  185. package/dist/{index-BM4XWo1K.d.ts → index-CGnr_e53.d.ts} +36 -36
  186. package/dist/{index-BM4XWo1K.d.ts.map → index-CGnr_e53.d.ts.map} +1 -1
  187. package/dist/{index-DhMSgdwM.d.ts → index-CSBE6Et0.d.cts} +6 -6
  188. package/dist/{index-Dklb-p_1.d.cts.map → index-CSBE6Et0.d.cts.map} +1 -1
  189. package/dist/{index-D6RB3b5L.d.ts → index-CVnn6mEI.d.ts} +4 -4
  190. package/dist/{index-D6RB3b5L.d.ts.map → index-CVnn6mEI.d.ts.map} +1 -1
  191. package/dist/{index-BMN2XNyT.d.cts → index-CYdvpGJF.d.cts} +3 -3
  192. package/dist/{index-BMN2XNyT.d.cts.map → index-CYdvpGJF.d.cts.map} +1 -1
  193. package/dist/{index-CbAh0Kfo.d.cts → index-Cb0AgRRa.d.cts} +3 -3
  194. package/dist/{index-CbAh0Kfo.d.cts.map → index-Cb0AgRRa.d.cts.map} +1 -1
  195. package/dist/{index-DA5um0u6.d.cts → index-D38wOL-M.d.ts} +34 -34
  196. package/dist/index-D38wOL-M.d.ts.map +1 -0
  197. package/dist/{index-DpD4MxGD.d.cts → index-DG9C0kHA.d.ts} +35 -34
  198. package/dist/{index-RvYO46Vg.d.ts.map → index-DG9C0kHA.d.ts.map} +1 -1
  199. package/dist/{index-RvYO46Vg.d.ts → index-DNkZrb7P.d.cts} +35 -36
  200. package/dist/{index-DpD4MxGD.d.cts.map → index-DNkZrb7P.d.cts.map} +1 -1
  201. package/dist/{index-C_ATGeaX.d.ts → index-DRij_w43.d.cts} +5 -5
  202. package/dist/{index-CzypMcVS.d.cts.map → index-DRij_w43.d.cts.map} +1 -1
  203. package/dist/{index-Dklb-p_1.d.cts → index-DmMenZfj.d.ts} +5 -5
  204. package/dist/{index-DhMSgdwM.d.ts.map → index-DmMenZfj.d.ts.map} +1 -1
  205. package/dist/{index-CI9QBUoM.d.cts → index-DnzC0GCS.d.ts} +3 -3
  206. package/dist/index-DnzC0GCS.d.ts.map +1 -0
  207. package/dist/{index-BOI0cy-n.d.cts → index-DoS0lVRe.d.cts} +34 -34
  208. package/dist/index-DoS0lVRe.d.cts.map +1 -0
  209. package/dist/{index-aHcGnXHf.d.ts → index-DvB46QAb.d.ts} +3 -3
  210. package/dist/{index-aHcGnXHf.d.ts.map → index-DvB46QAb.d.ts.map} +1 -1
  211. package/dist/{index-BW9EUWZE.d.cts → index-DxdaxM3o.d.cts} +3 -3
  212. package/dist/{index-BW9EUWZE.d.cts.map → index-DxdaxM3o.d.cts.map} +1 -1
  213. package/dist/{index-CQWoxgWk.d.ts → index-Edx7MxXu.d.ts} +3 -3
  214. package/dist/{index-CQWoxgWk.d.ts.map → index-Edx7MxXu.d.ts.map} +1 -1
  215. package/dist/{index-BaBZGCqS.d.cts → index-F11geOHD.d.ts} +6 -6
  216. package/dist/{index-CvA5yKx9.d.ts.map → index-F11geOHD.d.ts.map} +1 -1
  217. package/dist/{index-1gPh6Uoh.d.cts → index-PU5WNOH9.d.cts} +3 -3
  218. package/dist/{index-1gPh6Uoh.d.cts.map → index-PU5WNOH9.d.cts.map} +1 -1
  219. package/dist/{index-CO-l7RmT.d.cts → index-WogV9uVV.d.cts} +6 -6
  220. package/dist/{index-CO-l7RmT.d.cts.map → index-WogV9uVV.d.cts.map} +1 -1
  221. package/dist/{index-CvA5yKx9.d.ts → index-oyX8xu0F.d.cts} +4 -4
  222. package/dist/{index-BaBZGCqS.d.cts.map → index-oyX8xu0F.d.cts.map} +1 -1
  223. package/dist/index-sJZ434Sg.d.cts +264 -0
  224. package/dist/index-sJZ434Sg.d.cts.map +1 -0
  225. package/dist/index.cjs +29 -29
  226. package/dist/index.d.cts +22 -22
  227. package/dist/index.d.ts +24 -25
  228. package/dist/index.js +19 -19
  229. package/dist/partials/FieldCopyTestIdButton/index.cjs +1 -1
  230. package/dist/partials/FieldCopyTestIdButton/index.d.cts +1 -1
  231. package/dist/partials/FieldCopyTestIdButton/index.d.ts +1 -1
  232. package/dist/partials/FieldCopyTestIdButton/index.js +1 -1
  233. package/dist/partials/FieldValidationError/index.cjs +1 -1
  234. package/dist/partials/FieldValidationError/index.d.cts +1 -1
  235. package/dist/partials/FieldValidationError/index.d.ts +1 -1
  236. package/dist/partials/FieldValidationError/index.js +1 -1
  237. package/dist/{useClientValidation-CkBtUSco.d.ts → useClientValidation-BQqwz628.d.cts} +3 -3
  238. package/dist/{useClientValidation-C3Q5UCy9.d.cts.map → useClientValidation-BQqwz628.d.cts.map} +1 -1
  239. package/dist/useClientValidation-BnnscAEe.js.map +1 -1
  240. package/dist/{useClientValidation-oZd4_ocQ.cjs → useClientValidation-CmYVGlLr.cjs} +7 -7
  241. package/dist/useClientValidation-CmYVGlLr.cjs.map +1 -0
  242. package/dist/{useClientValidation-C3Q5UCy9.d.cts → useClientValidation-DJ4JuN_9.d.ts} +3 -3
  243. package/dist/{useClientValidation-CkBtUSco.d.ts.map → useClientValidation-DJ4JuN_9.d.ts.map} +1 -1
  244. package/dist/{useController-BzkCcbSo.cjs → useController-CkmO5CLh.cjs} +3 -3
  245. package/dist/{useController-BzkCcbSo.cjs.map → useController-CkmO5CLh.cjs.map} +1 -1
  246. package/dist/{useFormContext-CZh7pv8f.d.cts → useFormContext-B083Y-kw.d.cts} +17 -17
  247. package/dist/{useFormContext-CZh7pv8f.d.cts.map → useFormContext-B083Y-kw.d.cts.map} +1 -1
  248. package/dist/{useFormContext-3AAPT6eZ.d.ts → useFormContext-B2TS6xq0.d.ts} +1 -1
  249. package/dist/{useFormContext-3AAPT6eZ.d.ts.map → useFormContext-B2TS6xq0.d.ts.map} +1 -1
  250. package/dist/{useFormContext-CWuN-_7P.cjs → useFormContext-Bp0EODoO.cjs} +3 -3
  251. package/dist/useFormContext-Bp0EODoO.cjs.map +1 -0
  252. package/dist/useFormContext-JCm1UR_e.js.map +1 -1
  253. package/dist/{useInputValueDebounce-B2RzCWty.d.cts → useInputValueDebounce-B5b-v8Hc.d.cts} +1 -1
  254. package/dist/{useInputValueDebounce-B2RzCWty.d.cts.map → useInputValueDebounce-B5b-v8Hc.d.cts.map} +1 -1
  255. package/dist/{useInputValueDebounce-tL8maIp8.cjs → useInputValueDebounce-BcUyaS94.cjs} +2 -2
  256. package/dist/{useInputValueDebounce-tL8maIp8.cjs.map → useInputValueDebounce-BcUyaS94.cjs.map} +1 -1
  257. package/dist/{useInputValueDebounce-C7_bvNGH.d.ts → useInputValueDebounce-DoRuSF6R.d.ts} +1 -1
  258. package/dist/{useInputValueDebounce-C7_bvNGH.d.ts.map → useInputValueDebounce-DoRuSF6R.d.ts.map} +1 -1
  259. package/dist/{useInputValueTransform-C-uSW8Y3.cjs → useInputValueTransform-DFPA3KVy.cjs} +2 -2
  260. package/dist/{useInputValueTransform-C-uSW8Y3.cjs.map → useInputValueTransform-DFPA3KVy.cjs.map} +1 -1
  261. package/dist/{useUniformField-Be3kdnhK.d.cts → useUniformField-B2OZ-Z1G.d.cts} +3 -3
  262. package/dist/{useUniformField-Be3kdnhK.d.cts.map → useUniformField-B2OZ-Z1G.d.cts.map} +1 -1
  263. package/dist/{useUniformField-BMvnRC_r.cjs → useUniformField-Bj23Kvbs.cjs} +13 -13
  264. package/dist/useUniformField-Bj23Kvbs.cjs.map +1 -0
  265. package/dist/{useUniformField-DDHQ5B11.d.ts → useUniformField-CwEHonNe.d.ts} +3 -3
  266. package/dist/{useUniformField-DDHQ5B11.d.ts.map → useUniformField-CwEHonNe.d.ts.map} +1 -1
  267. package/dist/{useUniformField-ClprfrES.js → useUniformField-gU4qYUwL.js} +3 -3
  268. package/dist/useUniformField-gU4qYUwL.js.map +1 -0
  269. package/dist/{useUniformFieldArray-C-0OXG3N.js → useUniformFieldArray-B5PyxL1P.js} +2 -2
  270. package/dist/{useUniformFieldArray-C-0OXG3N.js.map → useUniformFieldArray-B5PyxL1P.js.map} +1 -1
  271. package/dist/{useUniformFieldArray-BhPi3gPv.d.ts → useUniformFieldArray-CXoWvu6m.d.ts} +3 -3
  272. package/dist/{useUniformFieldArray-BhPi3gPv.d.ts.map → useUniformFieldArray-CXoWvu6m.d.ts.map} +1 -1
  273. package/dist/{useUniformFieldArray-btjvJdZ6.cjs → useUniformFieldArray-G1lokW7x.cjs} +7 -7
  274. package/dist/{useUniformFieldArray-btjvJdZ6.cjs.map → useUniformFieldArray-G1lokW7x.cjs.map} +1 -1
  275. package/dist/{useUniformFieldArray-BBFw08qL.d.cts → useUniformFieldArray-qtJMEosJ.d.cts} +13 -13
  276. package/dist/{useUniformFieldArray-BBFw08qL.d.cts.map → useUniformFieldArray-qtJMEosJ.d.cts.map} +1 -1
  277. package/dist/{useWatchUserChange-C5dr12By.cjs → useWatchUserChange-BnxYE-0b.cjs} +3 -3
  278. package/dist/{useWatchUserChange-C5dr12By.cjs.map → useWatchUserChange-BnxYE-0b.cjs.map} +1 -1
  279. package/package.json +10 -10
  280. package/dist/Checkboxes-CGWhnpBp.js.map +0 -1
  281. package/dist/Checkboxes-Ds6bzl6p.cjs.map +0 -1
  282. package/dist/FieldArray-BexXN9bO.cjs.map +0 -1
  283. package/dist/FieldArray-D3iUaRLo.js.map +0 -1
  284. package/dist/FormContext-C3GymQOA.cjs.map +0 -1
  285. package/dist/Input--h5t7Sbl.js.map +0 -1
  286. package/dist/Input-DKfFFOpo.cjs.map +0 -1
  287. package/dist/RadioBoxes-7qdHj3ti.js.map +0 -1
  288. package/dist/RadioBoxes-Bd9ahl4i.cjs.map +0 -1
  289. package/dist/RadioTabs-DXs98jng.js.map +0 -1
  290. package/dist/RadioTabs-DcEUdW7r.cjs.map +0 -1
  291. package/dist/Select-BsL7qn2v.cjs.map +0 -1
  292. package/dist/Select-CBjqYDcs.js.map +0 -1
  293. package/dist/helpers-KTgXi0lA.cjs.map +0 -1
  294. package/dist/index-BOI0cy-n.d.cts.map +0 -1
  295. package/dist/index-BTEsKen4.d.ts +0 -264
  296. package/dist/index-C1fYmoY0.d.ts.map +0 -1
  297. package/dist/index-CJNLQVjx.d.ts +0 -1
  298. package/dist/index-CqV2Q3da.d.cts +0 -264
  299. package/dist/index-CqV2Q3da.d.cts.map +0 -1
  300. package/dist/index-CraZe1qS.d.ts.map +0 -1
  301. package/dist/index-CwSIy_W-.d.cts +0 -1
  302. package/dist/index-DA5um0u6.d.cts.map +0 -1
  303. package/dist/index-DzuP5q-2.d.ts.map +0 -1
  304. package/dist/useClientValidation-oZd4_ocQ.cjs.map +0 -1
  305. package/dist/useFormContext-CWuN-_7P.cjs.map +0 -1
  306. package/dist/useUniformField-BMvnRC_r.cjs.map +0 -1
  307. package/dist/useUniformField-ClprfrES.js.map +0 -1
  308. /package/dist/{index-B3Z8gdjC.d.ts → index-BRLjimYW.d.ts} +0 -0
  309. /package/dist/{index-BXpMZvwA.d.cts → index-DpEKQcoR.d.cts} +0 -0
  310. /package/dist/{useInput-IGJqJ2tR.d.ts → useInput--wjwIBc5.d.cts} +0 -0
  311. /package/dist/{useInput-NMHJNZ5A.d.cts → useInput-BCdeYOOg.d.ts} +0 -0
@@ -1,11 +1,11 @@
1
- const require_FormContext = require('./FormContext-C3GymQOA.cjs');
2
- const require_useUniformField = require('./useUniformField-BMvnRC_r.cjs');
3
- let __fuf_stack_pixel_utils = require("@fuf-stack/pixel-utils");
1
+ const require_FormContext = require('./FormContext-Bb6d8hdG.cjs');
2
+ const require_useUniformField = require('./useUniformField-Bj23Kvbs.cjs');
3
+ let _fuf_stack_pixel_utils = require("@fuf-stack/pixel-utils");
4
4
  let react_jsx_runtime = require("react/jsx-runtime");
5
- let __heroui_radio = require("@heroui/radio");
5
+ let _heroui_radio = require("@heroui/radio");
6
6
 
7
7
  //#region src/Radios/Radios.tsx
8
- const radiosVariants = (0, __fuf_stack_pixel_utils.tv)({ slots: {
8
+ const radiosVariants = (0, _fuf_stack_pixel_utils.tv)({ slots: {
9
9
  base: "group gap-0",
10
10
  itemBase: "",
11
11
  itemControl: "bg-focus group-data-[invalid=true]:bg-danger",
@@ -24,7 +24,7 @@ const Radios = ({ className = void 0, inline = false, name, options, ...uniformF
24
24
  name,
25
25
  ...uniformFieldProps
26
26
  });
27
- const classNames = (0, __fuf_stack_pixel_utils.variantsToClassNames)(radiosVariants(), className, "base");
27
+ const classNames = (0, _fuf_stack_pixel_utils.variantsToClassNames)(radiosVariants(), className, "base");
28
28
  const itemClassNames = {
29
29
  base: classNames.itemBase,
30
30
  control: classNames.itemControl,
@@ -33,7 +33,7 @@ const Radios = ({ className = void 0, inline = false, name, options, ...uniformF
33
33
  labelWrapper: classNames.itemLabelWrapper,
34
34
  wrapper: classNames.itemWrapper
35
35
  };
36
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__heroui_radio.RadioGroup, {
36
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_heroui_radio.RadioGroup, {
37
37
  ref,
38
38
  "aria-label": ariaLabel,
39
39
  classNames,
@@ -51,8 +51,8 @@ const Radios = ({ className = void 0, inline = false, name, options, ...uniformF
51
51
  orientation: inline ? "horizontal" : "vertical",
52
52
  children: options.map((option) => {
53
53
  if ("value" in option) {
54
- const optionTestId = (0, __fuf_stack_pixel_utils.slugify)(`${testId}_option_${option.testId ?? option.value}`, { replaceDots: true });
55
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__heroui_radio.Radio, {
54
+ const optionTestId = (0, _fuf_stack_pixel_utils.slugify)(`${testId}_option_${option.testId ?? option.value}`, { replaceDots: true });
55
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_heroui_radio.Radio, {
56
56
  classNames: itemClassNames,
57
57
  "data-testid": optionTestId,
58
58
  isDisabled: !!disabled || option.disabled,
@@ -65,23 +65,23 @@ const Radios = ({ className = void 0, inline = false, name, options, ...uniformF
65
65
  })
66
66
  });
67
67
  };
68
- var Radios_default = Radios;
68
+ var Radios_default$1 = Radios;
69
69
 
70
70
  //#endregion
71
71
  //#region src/Radios/index.ts
72
- var Radios_default$1 = Radios_default;
72
+ var Radios_default = Radios_default$1;
73
73
 
74
74
  //#endregion
75
75
  Object.defineProperty(exports, 'Radios_default', {
76
76
  enumerable: true,
77
77
  get: function () {
78
- return Radios_default$1;
78
+ return Radios_default;
79
79
  }
80
80
  });
81
81
  Object.defineProperty(exports, 'Radios_default$1', {
82
82
  enumerable: true,
83
83
  get: function () {
84
- return Radios_default;
84
+ return Radios_default$1;
85
85
  }
86
86
  });
87
- //# sourceMappingURL=Radios-CIPNqPzi.cjs.map
87
+ //# sourceMappingURL=Radios-BCOfnTke.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"Radios-CIPNqPzi.cjs","names":["useUniformField","HeroRadioGroup","HeroRadio","Radios"],"sources":["../src/Radios/Radios.tsx","../src/Radios/index.ts"],"sourcesContent":["import type { TVClassName, TVProps } from '@fuf-stack/pixel-utils';\nimport type { ReactElement, ReactNode } from 'react';\n\nimport {\n Radio as HeroRadio,\n RadioGroup as HeroRadioGroup,\n} from '@heroui/radio';\n\nimport { slugify, tv, variantsToClassNames } from '@fuf-stack/pixel-utils';\n\nimport { useUniformField } from '../hooks/useUniformField';\n\nexport const radiosVariants = tv({\n slots: {\n // Needs group for group-data condition\n base: 'group gap-0',\n itemBase: '',\n itemControl: 'bg-focus group-data-[invalid=true]:bg-danger',\n itemDescription: '',\n itemLabel: 'text-sm',\n itemLabelWrapper: '',\n itemWrapper:\n 'group-data-[invalid=true]:border-danger! [&:not(group-data-[invalid=\"true\"]):not(group-data-[selected=\"false\"])]:border-focus',\n // e.g.: https://github.com/heroui-inc/heroui/blob/main/packages/core/theme/src/components/select.ts\n label:\n 'mb-2 inline-flex text-sm text-foreground subpixel-antialiased group-data-[invalid=true]:text-danger',\n wrapper: '',\n },\n});\n\ntype VariantProps = TVProps<typeof radiosVariants>;\ntype ClassName = TVClassName<typeof radiosVariants>;\n\nexport interface RadioOption {\n /** disables the option */\n disabled?: boolean;\n /** option label */\n label?: ReactNode;\n /** option icon */\n icon?: ReactNode;\n /** HTML data-testid attribute of the option */\n testId?: string;\n /** option value */\n value: string;\n}\n\nexport interface RadiosProps 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 /** Determines if the Buttons are disabled or not. */\n disabled?: boolean;\n /** determines orientation of the Buttons. */\n inline?: boolean;\n /** Label displayed next to the RadioButton. */\n label?: ReactNode;\n /** Name the RadioButtons are registered at in HTML forms (react-hook-form). */\n name: string;\n /** Radio button configuration. */\n options: RadioOption[];\n /** Id to grab element in internal tests. */\n testId?: string;\n}\n\n/**\n * Radios component based on [HeroUI RadioGroup](https://www.heroui.com//docs/components/radio-group)\n */\nconst Radios = ({\n className = undefined,\n inline = false,\n name,\n options,\n ...uniformFieldProps\n}: RadiosProps): ReactElement => {\n const {\n ariaLabel,\n disabled,\n errorMessage,\n field: { onBlur, onChange, ref },\n invalid,\n label,\n required,\n defaultValue,\n testId,\n } = useUniformField({\n name,\n ...uniformFieldProps,\n });\n\n // classNames from slots\n const variants = radiosVariants();\n const classNames = variantsToClassNames(variants, className, 'base');\n\n const itemClassNames = {\n base: classNames.itemBase,\n control: classNames.itemControl,\n description: classNames.itemDescription,\n label: classNames.itemLabel,\n labelWrapper: classNames.itemLabelWrapper,\n wrapper: classNames.itemWrapper,\n };\n\n return (\n <HeroRadioGroup\n ref={ref}\n aria-label={ariaLabel}\n classNames={classNames}\n // see HeroUI styles for group-data condition (data-invalid),\n // e.g.: https://github.com/heroui-inc/heroui/blob/main/packages/components/select/src/use-select.ts\n data-invalid={invalid}\n data-required={required}\n data-testid={testId}\n defaultValue={defaultValue as string | undefined}\n errorMessage={errorMessage}\n isDisabled={disabled}\n isInvalid={invalid}\n isRequired={required}\n label={label ? <legend>{label}</legend> : null}\n name={name}\n onBlur={onBlur}\n orientation={inline ? 'horizontal' : 'vertical'}\n >\n {options.map((option) => {\n if ('value' in option) {\n const optionTestId = slugify(\n `${testId}_option_${option.testId ?? option.value}`,\n { replaceDots: true },\n );\n return (\n <HeroRadio\n key={option.value}\n classNames={itemClassNames}\n data-testid={optionTestId}\n isDisabled={!!disabled || option.disabled}\n onChange={onChange}\n value={option.value}\n >\n {option.label ?? option.value}\n </HeroRadio>\n );\n }\n return null;\n })}\n </HeroRadioGroup>\n );\n};\n\nexport default Radios;\n","import Radios from './Radios';\n\nexport type { RadiosProps } from './Radios';\n\nexport { Radios };\n\nexport default Radios;\n"],"mappings":";;;;;;;AAYA,MAAa,iDAAoB,EAC/B,OAAO;CAEL,MAAM;CACN,UAAU;CACV,aAAa;CACb,iBAAiB;CACjB,WAAW;CACX,kBAAkB;CAClB,aACE;CAEF,OACE;CACF,SAAS;CACV,EACF,CAAC;;;;AAwCF,MAAM,UAAU,EACd,YAAY,QACZ,SAAS,OACT,MACA,SACA,GAAG,wBAC4B;CAC/B,MAAM,EACJ,WACA,UACA,cACA,OAAO,EAAE,QAAQ,UAAU,OAC3B,SACA,OACA,UACA,cACA,WACEA,wCAAgB;EAClB;EACA,GAAG;EACJ,CAAC;CAIF,MAAM,+DADW,gBAAgB,EACiB,WAAW,OAAO;CAEpE,MAAM,iBAAiB;EACrB,MAAM,WAAW;EACjB,SAAS,WAAW;EACpB,aAAa,WAAW;EACxB,OAAO,WAAW;EAClB,cAAc,WAAW;EACzB,SAAS,WAAW;EACrB;AAED,QACE,2CAACC;EACM;EACL,cAAY;EACA;EAGZ,gBAAc;EACd,iBAAe;EACf,eAAa;EACC;EACA;EACd,YAAY;EACZ,WAAW;EACX,YAAY;EACZ,OAAO,QAAQ,2CAAC,sBAAQ,QAAe,GAAG;EACpC;EACE;EACR,aAAa,SAAS,eAAe;YAEpC,QAAQ,KAAK,WAAW;AACvB,OAAI,WAAW,QAAQ;IACrB,MAAM,oDACJ,GAAG,OAAO,UAAU,OAAO,UAAU,OAAO,SAC5C,EAAE,aAAa,MAAM,CACtB;AACD,WACE,2CAACC;KAEC,YAAY;KACZ,eAAa;KACb,YAAY,CAAC,CAAC,YAAY,OAAO;KACvB;KACV,OAAO,OAAO;eAEb,OAAO,SAAS,OAAO;OAPnB,OAAO,MAQF;;AAGhB,UAAO;IACP;GACa;;AAIrB,qBAAe;;;;AC9If,uBAAeC"}
1
+ {"version":3,"file":"Radios-BCOfnTke.cjs","names":["useUniformField","HeroRadioGroup","HeroRadio","Radios"],"sources":["../src/Radios/Radios.tsx","../src/Radios/index.ts"],"sourcesContent":["import type { TVClassName, TVProps } from '@fuf-stack/pixel-utils';\nimport type { ReactElement, ReactNode } from 'react';\n\nimport {\n Radio as HeroRadio,\n RadioGroup as HeroRadioGroup,\n} from '@heroui/radio';\n\nimport { slugify, tv, variantsToClassNames } from '@fuf-stack/pixel-utils';\n\nimport { useUniformField } from '../hooks/useUniformField';\n\nexport const radiosVariants = tv({\n slots: {\n // Needs group for group-data condition\n base: 'group gap-0',\n itemBase: '',\n itemControl: 'bg-focus group-data-[invalid=true]:bg-danger',\n itemDescription: '',\n itemLabel: 'text-sm',\n itemLabelWrapper: '',\n itemWrapper:\n 'group-data-[invalid=true]:border-danger! [&:not(group-data-[invalid=\"true\"]):not(group-data-[selected=\"false\"])]:border-focus',\n // e.g.: https://github.com/heroui-inc/heroui/blob/main/packages/core/theme/src/components/select.ts\n label:\n 'mb-2 inline-flex text-sm text-foreground subpixel-antialiased group-data-[invalid=true]:text-danger',\n wrapper: '',\n },\n});\n\ntype VariantProps = TVProps<typeof radiosVariants>;\ntype ClassName = TVClassName<typeof radiosVariants>;\n\nexport interface RadioOption {\n /** disables the option */\n disabled?: boolean;\n /** option label */\n label?: ReactNode;\n /** option icon */\n icon?: ReactNode;\n /** HTML data-testid attribute of the option */\n testId?: string;\n /** option value */\n value: string;\n}\n\nexport interface RadiosProps 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 /** Determines if the Buttons are disabled or not. */\n disabled?: boolean;\n /** determines orientation of the Buttons. */\n inline?: boolean;\n /** Label displayed next to the RadioButton. */\n label?: ReactNode;\n /** Name the RadioButtons are registered at in HTML forms (react-hook-form). */\n name: string;\n /** Radio button configuration. */\n options: RadioOption[];\n /** Id to grab element in internal tests. */\n testId?: string;\n}\n\n/**\n * Radios component based on [HeroUI RadioGroup](https://www.heroui.com//docs/components/radio-group)\n */\nconst Radios = ({\n className = undefined,\n inline = false,\n name,\n options,\n ...uniformFieldProps\n}: RadiosProps): ReactElement => {\n const {\n ariaLabel,\n disabled,\n errorMessage,\n field: { onBlur, onChange, ref },\n invalid,\n label,\n required,\n defaultValue,\n testId,\n } = useUniformField({\n name,\n ...uniformFieldProps,\n });\n\n // classNames from slots\n const variants = radiosVariants();\n const classNames = variantsToClassNames(variants, className, 'base');\n\n const itemClassNames = {\n base: classNames.itemBase,\n control: classNames.itemControl,\n description: classNames.itemDescription,\n label: classNames.itemLabel,\n labelWrapper: classNames.itemLabelWrapper,\n wrapper: classNames.itemWrapper,\n };\n\n return (\n <HeroRadioGroup\n ref={ref}\n aria-label={ariaLabel}\n classNames={classNames}\n // see HeroUI styles for group-data condition (data-invalid),\n // e.g.: https://github.com/heroui-inc/heroui/blob/main/packages/components/select/src/use-select.ts\n data-invalid={invalid}\n data-required={required}\n data-testid={testId}\n defaultValue={defaultValue as string | undefined}\n errorMessage={errorMessage}\n isDisabled={disabled}\n isInvalid={invalid}\n isRequired={required}\n label={label ? <legend>{label}</legend> : null}\n name={name}\n onBlur={onBlur}\n orientation={inline ? 'horizontal' : 'vertical'}\n >\n {options.map((option) => {\n if ('value' in option) {\n const optionTestId = slugify(\n `${testId}_option_${option.testId ?? option.value}`,\n { replaceDots: true },\n );\n return (\n <HeroRadio\n key={option.value}\n classNames={itemClassNames}\n data-testid={optionTestId}\n isDisabled={!!disabled || option.disabled}\n onChange={onChange}\n value={option.value}\n >\n {option.label ?? option.value}\n </HeroRadio>\n );\n }\n return null;\n })}\n </HeroRadioGroup>\n );\n};\n\nexport default Radios;\n","import Radios from './Radios';\n\nexport type { RadiosProps } from './Radios';\n\nexport { Radios };\n\nexport default Radios;\n"],"mappings":";;;;;;;AAYA,MAAa,gDAAoB,EAC/B,OAAO;CAEL,MAAM;CACN,UAAU;CACV,aAAa;CACb,iBAAiB;CACjB,WAAW;CACX,kBAAkB;CAClB,aACE;CAEF,OACE;CACF,SAAS;CACV,EACF,CAAC;;;;AAwCF,MAAM,UAAU,EACd,YAAY,QACZ,SAAS,OACT,MACA,SACA,GAAG,wBAC4B;CAC/B,MAAM,EACJ,WACA,UACA,cACA,OAAO,EAAE,QAAQ,UAAU,OAC3B,SACA,OACA,UACA,cACA,WACEA,wCAAgB;EAClB;EACA,GAAG;EACJ,CAAC;CAIF,MAAM,8DADW,gBAAgB,EACiB,WAAW,OAAO;CAEpE,MAAM,iBAAiB;EACrB,MAAM,WAAW;EACjB,SAAS,WAAW;EACpB,aAAa,WAAW;EACxB,OAAO,WAAW;EAClB,cAAc,WAAW;EACzB,SAAS,WAAW;EACrB;AAED,QACE,2CAACC;EACM;EACL,cAAY;EACA;EAGZ,gBAAc;EACd,iBAAe;EACf,eAAa;EACC;EACA;EACd,YAAY;EACZ,WAAW;EACX,YAAY;EACZ,OAAO,QAAQ,2CAAC,sBAAQ,QAAe,GAAG;EACpC;EACE;EACR,aAAa,SAAS,eAAe;YAEpC,QAAQ,KAAK,WAAW;AACvB,OAAI,WAAW,QAAQ;IACrB,MAAM,mDACJ,GAAG,OAAO,UAAU,OAAO,UAAU,OAAO,SAC5C,EAAE,aAAa,MAAM,CACtB;AACD,WACE,2CAACC;KAEC,YAAY;KACZ,eAAa;KACb,YAAY,CAAC,CAAC,YAAY,OAAO;KACvB;KACV,OAAO,OAAO;eAEb,OAAO,SAAS,OAAO;OAPnB,OAAO,MAQF;;AAGhB,UAAO;IACP;GACa;;AAIrB,uBAAe;;;;AC9If,qBAAeC"}
@@ -1,4 +1,4 @@
1
- import { t as useUniformField } from "./useUniformField-ClprfrES.js";
1
+ import { t as useUniformField } from "./useUniformField-gU4qYUwL.js";
2
2
  import { slugify, tv, variantsToClassNames } from "@fuf-stack/pixel-utils";
3
3
  import { jsx } from "react/jsx-runtime";
4
4
  import { Radio, RadioGroup } from "@heroui/radio";
@@ -64,12 +64,12 @@ const Radios = ({ className = void 0, inline = false, name, options, ...uniformF
64
64
  })
65
65
  });
66
66
  };
67
- var Radios_default = Radios;
67
+ var Radios_default$1 = Radios;
68
68
 
69
69
  //#endregion
70
70
  //#region src/Radios/index.ts
71
- var Radios_default$1 = Radios_default;
71
+ var Radios_default = Radios_default$1;
72
72
 
73
73
  //#endregion
74
- export { Radios_default as n, Radios_default$1 as t };
75
- //# sourceMappingURL=Radios-BIx06mzU.js.map
74
+ export { Radios_default$1 as n, Radios_default as t };
75
+ //# sourceMappingURL=Radios-DCXI2kMf.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Radios-BIx06mzU.js","names":["HeroRadioGroup","HeroRadio","Radios"],"sources":["../src/Radios/Radios.tsx","../src/Radios/index.ts"],"sourcesContent":["import type { TVClassName, TVProps } from '@fuf-stack/pixel-utils';\nimport type { ReactElement, ReactNode } from 'react';\n\nimport {\n Radio as HeroRadio,\n RadioGroup as HeroRadioGroup,\n} from '@heroui/radio';\n\nimport { slugify, tv, variantsToClassNames } from '@fuf-stack/pixel-utils';\n\nimport { useUniformField } from '../hooks/useUniformField';\n\nexport const radiosVariants = tv({\n slots: {\n // Needs group for group-data condition\n base: 'group gap-0',\n itemBase: '',\n itemControl: 'bg-focus group-data-[invalid=true]:bg-danger',\n itemDescription: '',\n itemLabel: 'text-sm',\n itemLabelWrapper: '',\n itemWrapper:\n 'group-data-[invalid=true]:border-danger! [&:not(group-data-[invalid=\"true\"]):not(group-data-[selected=\"false\"])]:border-focus',\n // e.g.: https://github.com/heroui-inc/heroui/blob/main/packages/core/theme/src/components/select.ts\n label:\n 'mb-2 inline-flex text-sm text-foreground subpixel-antialiased group-data-[invalid=true]:text-danger',\n wrapper: '',\n },\n});\n\ntype VariantProps = TVProps<typeof radiosVariants>;\ntype ClassName = TVClassName<typeof radiosVariants>;\n\nexport interface RadioOption {\n /** disables the option */\n disabled?: boolean;\n /** option label */\n label?: ReactNode;\n /** option icon */\n icon?: ReactNode;\n /** HTML data-testid attribute of the option */\n testId?: string;\n /** option value */\n value: string;\n}\n\nexport interface RadiosProps 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 /** Determines if the Buttons are disabled or not. */\n disabled?: boolean;\n /** determines orientation of the Buttons. */\n inline?: boolean;\n /** Label displayed next to the RadioButton. */\n label?: ReactNode;\n /** Name the RadioButtons are registered at in HTML forms (react-hook-form). */\n name: string;\n /** Radio button configuration. */\n options: RadioOption[];\n /** Id to grab element in internal tests. */\n testId?: string;\n}\n\n/**\n * Radios component based on [HeroUI RadioGroup](https://www.heroui.com//docs/components/radio-group)\n */\nconst Radios = ({\n className = undefined,\n inline = false,\n name,\n options,\n ...uniformFieldProps\n}: RadiosProps): ReactElement => {\n const {\n ariaLabel,\n disabled,\n errorMessage,\n field: { onBlur, onChange, ref },\n invalid,\n label,\n required,\n defaultValue,\n testId,\n } = useUniformField({\n name,\n ...uniformFieldProps,\n });\n\n // classNames from slots\n const variants = radiosVariants();\n const classNames = variantsToClassNames(variants, className, 'base');\n\n const itemClassNames = {\n base: classNames.itemBase,\n control: classNames.itemControl,\n description: classNames.itemDescription,\n label: classNames.itemLabel,\n labelWrapper: classNames.itemLabelWrapper,\n wrapper: classNames.itemWrapper,\n };\n\n return (\n <HeroRadioGroup\n ref={ref}\n aria-label={ariaLabel}\n classNames={classNames}\n // see HeroUI styles for group-data condition (data-invalid),\n // e.g.: https://github.com/heroui-inc/heroui/blob/main/packages/components/select/src/use-select.ts\n data-invalid={invalid}\n data-required={required}\n data-testid={testId}\n defaultValue={defaultValue as string | undefined}\n errorMessage={errorMessage}\n isDisabled={disabled}\n isInvalid={invalid}\n isRequired={required}\n label={label ? <legend>{label}</legend> : null}\n name={name}\n onBlur={onBlur}\n orientation={inline ? 'horizontal' : 'vertical'}\n >\n {options.map((option) => {\n if ('value' in option) {\n const optionTestId = slugify(\n `${testId}_option_${option.testId ?? option.value}`,\n { replaceDots: true },\n );\n return (\n <HeroRadio\n key={option.value}\n classNames={itemClassNames}\n data-testid={optionTestId}\n isDisabled={!!disabled || option.disabled}\n onChange={onChange}\n value={option.value}\n >\n {option.label ?? option.value}\n </HeroRadio>\n );\n }\n return null;\n })}\n </HeroRadioGroup>\n );\n};\n\nexport default Radios;\n","import Radios from './Radios';\n\nexport type { RadiosProps } from './Radios';\n\nexport { Radios };\n\nexport default Radios;\n"],"mappings":";;;;;;AAYA,MAAa,iBAAiB,GAAG,EAC/B,OAAO;CAEL,MAAM;CACN,UAAU;CACV,aAAa;CACb,iBAAiB;CACjB,WAAW;CACX,kBAAkB;CAClB,aACE;CAEF,OACE;CACF,SAAS;CACV,EACF,CAAC;;;;AAwCF,MAAM,UAAU,EACd,YAAY,QACZ,SAAS,OACT,MACA,SACA,GAAG,wBAC4B;CAC/B,MAAM,EACJ,WACA,UACA,cACA,OAAO,EAAE,QAAQ,UAAU,OAC3B,SACA,OACA,UACA,cACA,WACE,gBAAgB;EAClB;EACA,GAAG;EACJ,CAAC;CAIF,MAAM,aAAa,qBADF,gBAAgB,EACiB,WAAW,OAAO;CAEpE,MAAM,iBAAiB;EACrB,MAAM,WAAW;EACjB,SAAS,WAAW;EACpB,aAAa,WAAW;EACxB,OAAO,WAAW;EAClB,cAAc,WAAW;EACzB,SAAS,WAAW;EACrB;AAED,QACE,oBAACA;EACM;EACL,cAAY;EACA;EAGZ,gBAAc;EACd,iBAAe;EACf,eAAa;EACC;EACA;EACd,YAAY;EACZ,WAAW;EACX,YAAY;EACZ,OAAO,QAAQ,oBAAC,sBAAQ,QAAe,GAAG;EACpC;EACE;EACR,aAAa,SAAS,eAAe;YAEpC,QAAQ,KAAK,WAAW;AACvB,OAAI,WAAW,QAAQ;IACrB,MAAM,eAAe,QACnB,GAAG,OAAO,UAAU,OAAO,UAAU,OAAO,SAC5C,EAAE,aAAa,MAAM,CACtB;AACD,WACE,oBAACC;KAEC,YAAY;KACZ,eAAa;KACb,YAAY,CAAC,CAAC,YAAY,OAAO;KACvB;KACV,OAAO,OAAO;eAEb,OAAO,SAAS,OAAO;OAPnB,OAAO,MAQF;;AAGhB,UAAO;IACP;GACa;;AAIrB,qBAAe;;;;AC9If,uBAAeC"}
1
+ {"version":3,"file":"Radios-DCXI2kMf.js","names":["HeroRadioGroup","HeroRadio","Radios"],"sources":["../src/Radios/Radios.tsx","../src/Radios/index.ts"],"sourcesContent":["import type { TVClassName, TVProps } from '@fuf-stack/pixel-utils';\nimport type { ReactElement, ReactNode } from 'react';\n\nimport {\n Radio as HeroRadio,\n RadioGroup as HeroRadioGroup,\n} from '@heroui/radio';\n\nimport { slugify, tv, variantsToClassNames } from '@fuf-stack/pixel-utils';\n\nimport { useUniformField } from '../hooks/useUniformField';\n\nexport const radiosVariants = tv({\n slots: {\n // Needs group for group-data condition\n base: 'group gap-0',\n itemBase: '',\n itemControl: 'bg-focus group-data-[invalid=true]:bg-danger',\n itemDescription: '',\n itemLabel: 'text-sm',\n itemLabelWrapper: '',\n itemWrapper:\n 'group-data-[invalid=true]:border-danger! [&:not(group-data-[invalid=\"true\"]):not(group-data-[selected=\"false\"])]:border-focus',\n // e.g.: https://github.com/heroui-inc/heroui/blob/main/packages/core/theme/src/components/select.ts\n label:\n 'mb-2 inline-flex text-sm text-foreground subpixel-antialiased group-data-[invalid=true]:text-danger',\n wrapper: '',\n },\n});\n\ntype VariantProps = TVProps<typeof radiosVariants>;\ntype ClassName = TVClassName<typeof radiosVariants>;\n\nexport interface RadioOption {\n /** disables the option */\n disabled?: boolean;\n /** option label */\n label?: ReactNode;\n /** option icon */\n icon?: ReactNode;\n /** HTML data-testid attribute of the option */\n testId?: string;\n /** option value */\n value: string;\n}\n\nexport interface RadiosProps 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 /** Determines if the Buttons are disabled or not. */\n disabled?: boolean;\n /** determines orientation of the Buttons. */\n inline?: boolean;\n /** Label displayed next to the RadioButton. */\n label?: ReactNode;\n /** Name the RadioButtons are registered at in HTML forms (react-hook-form). */\n name: string;\n /** Radio button configuration. */\n options: RadioOption[];\n /** Id to grab element in internal tests. */\n testId?: string;\n}\n\n/**\n * Radios component based on [HeroUI RadioGroup](https://www.heroui.com//docs/components/radio-group)\n */\nconst Radios = ({\n className = undefined,\n inline = false,\n name,\n options,\n ...uniformFieldProps\n}: RadiosProps): ReactElement => {\n const {\n ariaLabel,\n disabled,\n errorMessage,\n field: { onBlur, onChange, ref },\n invalid,\n label,\n required,\n defaultValue,\n testId,\n } = useUniformField({\n name,\n ...uniformFieldProps,\n });\n\n // classNames from slots\n const variants = radiosVariants();\n const classNames = variantsToClassNames(variants, className, 'base');\n\n const itemClassNames = {\n base: classNames.itemBase,\n control: classNames.itemControl,\n description: classNames.itemDescription,\n label: classNames.itemLabel,\n labelWrapper: classNames.itemLabelWrapper,\n wrapper: classNames.itemWrapper,\n };\n\n return (\n <HeroRadioGroup\n ref={ref}\n aria-label={ariaLabel}\n classNames={classNames}\n // see HeroUI styles for group-data condition (data-invalid),\n // e.g.: https://github.com/heroui-inc/heroui/blob/main/packages/components/select/src/use-select.ts\n data-invalid={invalid}\n data-required={required}\n data-testid={testId}\n defaultValue={defaultValue as string | undefined}\n errorMessage={errorMessage}\n isDisabled={disabled}\n isInvalid={invalid}\n isRequired={required}\n label={label ? <legend>{label}</legend> : null}\n name={name}\n onBlur={onBlur}\n orientation={inline ? 'horizontal' : 'vertical'}\n >\n {options.map((option) => {\n if ('value' in option) {\n const optionTestId = slugify(\n `${testId}_option_${option.testId ?? option.value}`,\n { replaceDots: true },\n );\n return (\n <HeroRadio\n key={option.value}\n classNames={itemClassNames}\n data-testid={optionTestId}\n isDisabled={!!disabled || option.disabled}\n onChange={onChange}\n value={option.value}\n >\n {option.label ?? option.value}\n </HeroRadio>\n );\n }\n return null;\n })}\n </HeroRadioGroup>\n );\n};\n\nexport default Radios;\n","import Radios from './Radios';\n\nexport type { RadiosProps } from './Radios';\n\nexport { Radios };\n\nexport default Radios;\n"],"mappings":";;;;;;AAYA,MAAa,iBAAiB,GAAG,EAC/B,OAAO;CAEL,MAAM;CACN,UAAU;CACV,aAAa;CACb,iBAAiB;CACjB,WAAW;CACX,kBAAkB;CAClB,aACE;CAEF,OACE;CACF,SAAS;CACV,EACF,CAAC;;;;AAwCF,MAAM,UAAU,EACd,YAAY,QACZ,SAAS,OACT,MACA,SACA,GAAG,wBAC4B;CAC/B,MAAM,EACJ,WACA,UACA,cACA,OAAO,EAAE,QAAQ,UAAU,OAC3B,SACA,OACA,UACA,cACA,WACE,gBAAgB;EAClB;EACA,GAAG;EACJ,CAAC;CAIF,MAAM,aAAa,qBADF,gBAAgB,EACiB,WAAW,OAAO;CAEpE,MAAM,iBAAiB;EACrB,MAAM,WAAW;EACjB,SAAS,WAAW;EACpB,aAAa,WAAW;EACxB,OAAO,WAAW;EAClB,cAAc,WAAW;EACzB,SAAS,WAAW;EACrB;AAED,QACE,oBAACA;EACM;EACL,cAAY;EACA;EAGZ,gBAAc;EACd,iBAAe;EACf,eAAa;EACC;EACA;EACd,YAAY;EACZ,WAAW;EACX,YAAY;EACZ,OAAO,QAAQ,oBAAC,sBAAQ,QAAe,GAAG;EACpC;EACE;EACR,aAAa,SAAS,eAAe;YAEpC,QAAQ,KAAK,WAAW;AACvB,OAAI,WAAW,QAAQ;IACrB,MAAM,eAAe,QACnB,GAAG,OAAO,UAAU,OAAO,UAAU,OAAO,SAC5C,EAAE,aAAa,MAAM,CACtB;AACD,WACE,oBAACC;KAEC,YAAY;KACZ,eAAa;KACb,YAAY,CAAC,CAAC,YAAY,OAAO;KACvB;KACV,OAAO,OAAO;eAEb,OAAO,SAAS,OAAO;OAPnB,OAAO,MAQF;;AAGhB,UAAO;IACP;GACa;;AAIrB,uBAAe;;;;AC9If,qBAAeC"}
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, '__esModule', { value: true });
2
- const require_Select = require('../Select-BsL7qn2v.cjs');
2
+ const require_Select = require('../Select-KnPGOO27.cjs');
3
3
 
4
4
  exports.Select = require_Select.Select_default$1;
5
5
  exports.default = require_Select.Select_default;
@@ -1,2 +1,2 @@
1
- import { n as SelectProps, t as Select } from "../index-CqV2Q3da.cjs";
1
+ import { n as SelectProps, t as Select } from "../index-sJZ434Sg.cjs";
2
2
  export { Select, Select as default, SelectProps };
@@ -1,2 +1,2 @@
1
- import { n as SelectProps, t as Select } from "../index-BTEsKen4.js";
1
+ import { n as SelectProps, t as Select } from "../index-CADnFWHq.js";
2
2
  export { Select, Select as default, SelectProps };
@@ -1,3 +1,3 @@
1
- import { n as Select_default, t as Select_default$1 } from "../Select-CBjqYDcs.js";
1
+ import { n as Select_default, t as Select_default$1 } from "../Select-CyfEmWiD.js";
2
2
 
3
3
  export { Select_default as Select, Select_default$1 as default };
@@ -1,5 +1,5 @@
1
1
  import { n as useFormContext } from "./useFormContext-JCm1UR_e.js";
2
- import { t as useUniformField } from "./useUniformField-ClprfrES.js";
2
+ import { t as useUniformField } from "./useUniformField-gU4qYUwL.js";
3
3
  import { cn, slugify, tv, variantsToClassNames } from "@fuf-stack/pixel-utils";
4
4
  import { useState } from "react";
5
5
  import { jsx, jsxs } from "react/jsx-runtime";
@@ -222,12 +222,12 @@ const Select = ({ className = void 0, clearable = true, filterOption = void 0, r
222
222
  ]
223
223
  });
224
224
  };
225
- var Select_default = Select;
225
+ var Select_default$1 = Select;
226
226
 
227
227
  //#endregion
228
228
  //#region src/Select/index.ts
229
- var Select_default$1 = Select_default;
229
+ var Select_default = Select_default$1;
230
230
 
231
231
  //#endregion
232
- export { Select_default as n, Select_default$1 as t };
233
- //# sourceMappingURL=Select-CBjqYDcs.js.map
232
+ export { Select_default$1 as n, Select_default as t };
233
+ //# sourceMappingURL=Select-CyfEmWiD.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Select-CyfEmWiD.js","names":["Select"],"sources":["../src/Select/Select.tsx","../src/Select/index.ts"],"sourcesContent":["import type { TVClassName, TVProps } from '@fuf-stack/pixel-utils';\nimport type { ReactNode } from 'react';\nimport type { Props } from 'react-select';\n\nimport { useState } from 'react';\nimport ReactSelect, { components } from 'react-select';\n\nimport { useSelect } from '@heroui/select';\n\nimport { cn, slugify, tv, variantsToClassNames } from '@fuf-stack/pixel-utils';\n\nimport { useFormContext } from '../hooks/useFormContext';\nimport { useUniformField } from '../hooks/useUniformField';\n\nexport const selectVariants = tv({\n slots: {\n base: 'group leading-normal',\n clearIndicator:\n 'rounded-md p-1 text-foreground-500 hover:cursor-pointer hover:bg-default-200 hover:text-foreground-800',\n control:\n 'duration-150! rounded-lg border-2 border-default-200 bg-content1 transition-background hover:border-default-400 group-data-[invalid=true]:border-danger group-data-[invalid=true]:hover:border-danger motion-reduce:transition-none',\n control_focused: 'border-focus',\n crossIcon: '',\n downChevron: '',\n dropdownIndicator:\n 'rounded-md p-1 text-foreground-500 hover:cursor-pointer hover:bg-default-200 hover:text-black',\n group: '',\n groupHeading: 'mb-1 ml-3 mt-2 text-sm text-foreground-500',\n indicatorsContainer: 'gap-1 p-1',\n indicatorSeparator: 'bg-default-300',\n input: 'py-0.5 pl-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 'pointer-events-auto relative bottom-1.5 ml-1 subpixel-antialiased text-small 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 loadingIndicator: '',\n loadingMessage: 'rounded-sm p-2 text-foreground-500',\n menu: 'mt-2 rounded-xl border border-default-200 bg-content1 p-1 shadow-lg',\n menuList: '',\n // ensure menu has same z-index as modal so it is visible when rendered in modal\n // see: https://github.com/heroui-inc/heroui/blob/main/packages/core/theme/src/components/modal.ts (see z-50)\n menuPortal: 'z-50!',\n multiValue: 'items-center gap-1.5 rounded bg-default-100 py-0.5 pl-2 pr-1',\n multiValueContainer: '',\n multiValueLabel: 'py-0.5 leading-6',\n multiValueRemove:\n 'rounded text-default-500 hover:cursor-pointer hover:border-default-300 hover:text-default-800',\n noOptionsMessage: 'rounded-sm p-2 text-foreground-500',\n option_focused: 'bg-default-100 active:bg-default-200',\n option_selected: 'bg-default-300',\n option: 'rounded px-3 py-2 hover:cursor-pointer',\n placeholder: 'ml-1 py-0.5 pl-1 text-sm text-foreground-500',\n selectContainer: '',\n singleValue: 'ml-1! leading-7!',\n valueContainer: 'gap-1 p-1',\n },\n});\n\ninterface SelectOption {\n /** option label */\n label?: ReactNode;\n /** option value */\n value: string;\n}\n\ntype VariantProps = TVProps<typeof selectVariants>;\ntype ClassName = TVClassName<typeof selectVariants>;\n\nexport interface SelectProps 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; // string;\n /** Determine if the */\n clearable?: boolean;\n /** Set the select to disabled state. */\n disabled?: boolean;\n /** Filter Select Options */\n filterOption?:\n | undefined\n | ((option?: SelectOption, inputValue?: string) => boolean);\n /** Format the label of the option */\n renderOptionLabel?: undefined | Props['formatOptionLabel'];\n /** The value of the search input */\n inputValue?: string;\n /** Label that should be associated with the select. */\n label?: ReactNode;\n /** Set the select to a loading state. */\n loading?: boolean;\n /** switch between single and multi select mode. */\n multiSelect?: boolean;\n /** The name for the Select component, used by react-hook-form */\n name: string;\n /** Placeholder that is displayed when nothing is selected */\n placeholder?: string;\n /** The options for the Select component */\n options: SelectOption[];\n /** Handle change events on the input */\n onInputChange?: Props['onInputChange'];\n /** HTML data-testid attribute used in e2e tests */\n testId?: string;\n}\n\nconst InputComponent: typeof components.Input = (props) => {\n // @ts-expect-error data-testid is not a default prop\n // eslint-disable-next-line react/destructuring-assignment\n const testId = `${props.selectProps['data-testid']}`;\n\n return <components.Input data-testid={testId} {...props} />;\n};\n\nconst ControlComponent: typeof components.Control = (props) => {\n // @ts-expect-error data-testid is not a default prop\n // eslint-disable-next-line react/destructuring-assignment\n const testId = `${props.selectProps['data-testid']}_select`;\n return (\n <div data-testid={testId}>\n {}\n <components.Control {...props} />\n </div>\n );\n};\n\nconst OptionComponent: typeof components.Option = (props) => {\n // @ts-expect-error data-testid is not a default prop\n // eslint-disable-next-line react/destructuring-assignment\n const testId = `${props.selectProps['data-testid']}_select_option_${slugify(props?.data?.testId ?? props?.data?.value, { replaceDots: true })}`;\n return (\n <div data-testid={testId}>\n {}\n <components.Option {...props} />\n </div>\n );\n};\n\nconst DropdownIndicatorComponent: typeof components.DropdownIndicator = (\n props,\n) => {\n // @ts-expect-error data-testid is not a default prop\n\n const testId = props?.selectProps['data-testid'] as string;\n return (\n <div data-testid={`${testId}_select_dropdown`}>\n {}\n <components.DropdownIndicator {...props} />\n </div>\n );\n};\n\n/** Select component based on [HeroUI Select](https://www.heroui.com//docs/components/select) and [React-Select](https://react-select.com/home) */\nconst Select = ({\n className = undefined,\n clearable = true,\n filterOption = undefined,\n renderOptionLabel = undefined,\n inputValue = undefined,\n loading = false,\n multiSelect = false,\n name,\n onInputChange = undefined,\n options,\n placeholder = undefined,\n ...uniformFieldProps\n}: SelectProps) => {\n const {\n ariaLabel,\n disabled,\n errorMessage,\n field: { onBlur, onChange, ref, value },\n getErrorMessageProps,\n getHelperWrapperProps,\n getLabelProps,\n invalid,\n label,\n required,\n testId,\n } = useUniformField({\n name,\n ...uniformFieldProps,\n });\n\n // Get getFieldState to check isTouched in onChange callback\n const { getFieldState } = useFormContext();\n\n // Track if the select is focused\n const [isFocused, setIsFocused] = useState(false);\n\n // classNames from slots\n const variants = selectVariants();\n const classNames = variantsToClassNames(variants, className, 'base');\n\n const { getBaseProps, getTriggerProps, getValueProps } = useSelect({\n children: [],\n classNames,\n errorMessage,\n isDisabled: disabled,\n isInvalid: invalid,\n isLoading: loading,\n isRequired: required,\n label,\n labelPlacement: 'outside',\n });\n\n return (\n <div\n {...getBaseProps()}\n className={cn(classNames.base)}\n // see HeroUI styles for group-data condition (data-invalid),\n // e.g.: https://github.com/heroui-inc/heroui/blob/main/packages/components/select/src/use-select.ts\n data-required={required}\n data-testid={`${testId}_wrapper`}\n >\n {label ? (\n <label\n className={classNames.label}\n data-slot=\"label\"\n htmlFor={`react-select-${name}-input`}\n id={getLabelProps().id}\n >\n {label}\n </label>\n ) : null}\n <ReactSelect\n ref={ref}\n menuShouldBlockScroll\n unstyled\n aria-errormessage=\"\"\n aria-invalid={invalid}\n aria-label={ariaLabel}\n // Does not affect the testId of the select, but is needed to pass it to sub-components\n data-testid={testId}\n filterOption={filterOption}\n formatOptionLabel={renderOptionLabel}\n inputValue={inputValue}\n instanceId={name}\n isClearable={clearable}\n isDisabled={disabled}\n isLoading={loading}\n isMulti={multiSelect}\n // set menuPosition to fixed so that menu can be rendered\n // inside Card / Modal components, menuShouldBlockScroll\n // prevents container scroll when menu is open\n menuPosition=\"fixed\"\n name={name}\n onInputChange={onInputChange}\n options={options}\n placeholder={placeholder}\n // set aria-labelledby to the label id so that the select is accessible\n aria-labelledby={\n label\n ? getTriggerProps()['aria-labelledby']?.split(' ')[1]\n : undefined\n }\n classNames={{\n control: () => {\n return cn(classNames.control, {\n [classNames.control_focused]: isFocused && !invalid,\n });\n },\n clearIndicator: () => {\n return classNames.clearIndicator;\n },\n dropdownIndicator: () => {\n return classNames.dropdownIndicator;\n },\n groupHeading: () => {\n return classNames.groupHeading;\n },\n indicatorsContainer: () => {\n return classNames.indicatorsContainer;\n },\n indicatorSeparator: () => {\n return classNames.indicatorSeparator;\n },\n loadingIndicator: () => {\n return classNames.loadingIndicator;\n },\n loadingMessage: () => {\n return classNames.loadingMessage;\n },\n input: () => {\n return classNames.input;\n },\n menu: () => {\n return classNames.menu;\n },\n menuList: () => {\n return classNames.menuList;\n },\n menuPortal: () => {\n return classNames.menuPortal;\n },\n multiValue: () => {\n return classNames.multiValue;\n },\n multiValueLabel: () => {\n return cn(\n classNames.multiValueLabel,\n `${getValueProps().className}`,\n );\n },\n multiValueRemove: () => {\n return classNames.multiValueRemove;\n },\n noOptionsMessage: () => {\n return classNames.noOptionsMessage;\n },\n option: ({\n isFocused: optionIsFocused,\n isSelected: optionIsSelected,\n }) => {\n return cn(classNames.option, {\n [classNames.option_focused]: optionIsFocused,\n [classNames.option_selected]: optionIsSelected,\n });\n },\n placeholder: () => {\n return classNames.placeholder;\n },\n singleValue: () => {\n return cn(classNames.singleValue, `${getValueProps().className}`);\n },\n valueContainer: () => {\n return classNames.valueContainer;\n },\n }}\n components={{\n Input: InputComponent,\n Option: OptionComponent,\n DropdownIndicator: DropdownIndicatorComponent,\n Control: ControlComponent,\n }}\n onBlur={(_e) => {\n setIsFocused(false);\n onBlur();\n }}\n onChange={(option) => {\n if (multiSelect) {\n onChange(\n (option as SelectOption[])?.map((_option) => {\n return _option.value;\n }),\n );\n } else {\n onChange((option as SelectOption)?.value);\n }\n // Mark field as touched immediately when a selection is made if not already touched\n // This ensures validation errors show right away (isTouched becomes true)\n // For Select components, selecting an option is a complete user action\n // (unlike text inputs where typing is ongoing), so we mark as touched immediately\n const { isTouched: currentIsTouched } = getFieldState(name, testId);\n if (!currentIsTouched) {\n onBlur();\n }\n }}\n onFocus={(_e) => {\n setIsFocused(true);\n }}\n // set complete option as value by current field value\n value={options.find((option) => {\n return option.value === value;\n })}\n />\n {invalid ? (\n <div {...getHelperWrapperProps()}>\n <div {...getErrorMessageProps()}>{errorMessage}</div>\n </div>\n ) : null}\n </div>\n );\n};\n\nexport default Select;\n","import Select from './Select';\n\nexport type { SelectProps } from './Select';\n\nexport { Select };\n\nexport default Select;\n"],"mappings":"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"}
@@ -1,15 +1,15 @@
1
- const require_FormContext = require('./FormContext-C3GymQOA.cjs');
2
- const require_useFormContext = require('./useFormContext-CWuN-_7P.cjs');
3
- const require_useUniformField = require('./useUniformField-BMvnRC_r.cjs');
4
- let __fuf_stack_pixel_utils = require("@fuf-stack/pixel-utils");
1
+ const require_FormContext = require('./FormContext-Bb6d8hdG.cjs');
2
+ const require_useFormContext = require('./useFormContext-Bp0EODoO.cjs');
3
+ const require_useUniformField = require('./useUniformField-Bj23Kvbs.cjs');
4
+ let _fuf_stack_pixel_utils = require("@fuf-stack/pixel-utils");
5
5
  let react = require("react");
6
6
  let react_jsx_runtime = require("react/jsx-runtime");
7
7
  let react_select = require("react-select");
8
8
  react_select = require_FormContext.__toESM(react_select);
9
- let __heroui_select = require("@heroui/select");
9
+ let _heroui_select = require("@heroui/select");
10
10
 
11
11
  //#region src/Select/Select.tsx
12
- const selectVariants = (0, __fuf_stack_pixel_utils.tv)({ slots: {
12
+ const selectVariants = (0, _fuf_stack_pixel_utils.tv)({ slots: {
13
13
  base: "group leading-normal",
14
14
  clearIndicator: "rounded-md p-1 text-foreground-500 hover:cursor-pointer hover:bg-default-200 hover:text-foreground-800",
15
15
  control: "duration-150! rounded-lg border-2 border-default-200 bg-content1 transition-background hover:border-default-400 group-data-[invalid=true]:border-danger group-data-[invalid=true]:hover:border-danger motion-reduce:transition-none",
@@ -56,7 +56,7 @@ const ControlComponent = (props) => {
56
56
  });
57
57
  };
58
58
  const OptionComponent = (props) => {
59
- const testId = `${props.selectProps["data-testid"]}_select_option_${(0, __fuf_stack_pixel_utils.slugify)(props?.data?.testId ?? props?.data?.value, { replaceDots: true })}`;
59
+ const testId = `${props.selectProps["data-testid"]}_select_option_${(0, _fuf_stack_pixel_utils.slugify)(props?.data?.testId ?? props?.data?.value, { replaceDots: true })}`;
60
60
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
61
61
  "data-testid": testId,
62
62
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_select.components.Option, { ...props })
@@ -77,8 +77,8 @@ const Select = ({ className = void 0, clearable = true, filterOption = void 0, r
77
77
  });
78
78
  const { getFieldState } = require_useFormContext.useFormContext();
79
79
  const [isFocused, setIsFocused] = (0, react.useState)(false);
80
- const classNames = (0, __fuf_stack_pixel_utils.variantsToClassNames)(selectVariants(), className, "base");
81
- const { getBaseProps, getTriggerProps, getValueProps } = (0, __heroui_select.useSelect)({
80
+ const classNames = (0, _fuf_stack_pixel_utils.variantsToClassNames)(selectVariants(), className, "base");
81
+ const { getBaseProps, getTriggerProps, getValueProps } = (0, _heroui_select.useSelect)({
82
82
  children: [],
83
83
  classNames,
84
84
  errorMessage,
@@ -91,7 +91,7 @@ const Select = ({ className = void 0, clearable = true, filterOption = void 0, r
91
91
  });
92
92
  return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
93
93
  ...getBaseProps(),
94
- className: (0, __fuf_stack_pixel_utils.cn)(classNames.base),
94
+ className: (0, _fuf_stack_pixel_utils.cn)(classNames.base),
95
95
  "data-required": required,
96
96
  "data-testid": `${testId}_wrapper`,
97
97
  children: [
@@ -126,7 +126,7 @@ const Select = ({ className = void 0, clearable = true, filterOption = void 0, r
126
126
  "aria-labelledby": label ? getTriggerProps()["aria-labelledby"]?.split(" ")[1] : void 0,
127
127
  classNames: {
128
128
  control: () => {
129
- return (0, __fuf_stack_pixel_utils.cn)(classNames.control, { [classNames.control_focused]: isFocused && !invalid });
129
+ return (0, _fuf_stack_pixel_utils.cn)(classNames.control, { [classNames.control_focused]: isFocused && !invalid });
130
130
  },
131
131
  clearIndicator: () => {
132
132
  return classNames.clearIndicator;
@@ -165,7 +165,7 @@ const Select = ({ className = void 0, clearable = true, filterOption = void 0, r
165
165
  return classNames.multiValue;
166
166
  },
167
167
  multiValueLabel: () => {
168
- return (0, __fuf_stack_pixel_utils.cn)(classNames.multiValueLabel, `${getValueProps().className}`);
168
+ return (0, _fuf_stack_pixel_utils.cn)(classNames.multiValueLabel, `${getValueProps().className}`);
169
169
  },
170
170
  multiValueRemove: () => {
171
171
  return classNames.multiValueRemove;
@@ -174,7 +174,7 @@ const Select = ({ className = void 0, clearable = true, filterOption = void 0, r
174
174
  return classNames.noOptionsMessage;
175
175
  },
176
176
  option: ({ isFocused: optionIsFocused, isSelected: optionIsSelected }) => {
177
- return (0, __fuf_stack_pixel_utils.cn)(classNames.option, {
177
+ return (0, _fuf_stack_pixel_utils.cn)(classNames.option, {
178
178
  [classNames.option_focused]: optionIsFocused,
179
179
  [classNames.option_selected]: optionIsSelected
180
180
  });
@@ -183,7 +183,7 @@ const Select = ({ className = void 0, clearable = true, filterOption = void 0, r
183
183
  return classNames.placeholder;
184
184
  },
185
185
  singleValue: () => {
186
- return (0, __fuf_stack_pixel_utils.cn)(classNames.singleValue, `${getValueProps().className}`);
186
+ return (0, _fuf_stack_pixel_utils.cn)(classNames.singleValue, `${getValueProps().className}`);
187
187
  },
188
188
  valueContainer: () => {
189
189
  return classNames.valueContainer;
@@ -224,23 +224,23 @@ const Select = ({ className = void 0, clearable = true, filterOption = void 0, r
224
224
  ]
225
225
  });
226
226
  };
227
- var Select_default = Select;
227
+ var Select_default$1 = Select;
228
228
 
229
229
  //#endregion
230
230
  //#region src/Select/index.ts
231
- var Select_default$1 = Select_default;
231
+ var Select_default = Select_default$1;
232
232
 
233
233
  //#endregion
234
234
  Object.defineProperty(exports, 'Select_default', {
235
235
  enumerable: true,
236
236
  get: function () {
237
- return Select_default$1;
237
+ return Select_default;
238
238
  }
239
239
  });
240
240
  Object.defineProperty(exports, 'Select_default$1', {
241
241
  enumerable: true,
242
242
  get: function () {
243
- return Select_default;
243
+ return Select_default$1;
244
244
  }
245
245
  });
246
- //# sourceMappingURL=Select-BsL7qn2v.cjs.map
246
+ //# sourceMappingURL=Select-KnPGOO27.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Select-KnPGOO27.cjs","names":["components","useUniformField","useFormContext","ReactSelect","Select"],"sources":["../src/Select/Select.tsx","../src/Select/index.ts"],"sourcesContent":["import type { TVClassName, TVProps } from '@fuf-stack/pixel-utils';\nimport type { ReactNode } from 'react';\nimport type { Props } from 'react-select';\n\nimport { useState } from 'react';\nimport ReactSelect, { components } from 'react-select';\n\nimport { useSelect } from '@heroui/select';\n\nimport { cn, slugify, tv, variantsToClassNames } from '@fuf-stack/pixel-utils';\n\nimport { useFormContext } from '../hooks/useFormContext';\nimport { useUniformField } from '../hooks/useUniformField';\n\nexport const selectVariants = tv({\n slots: {\n base: 'group leading-normal',\n clearIndicator:\n 'rounded-md p-1 text-foreground-500 hover:cursor-pointer hover:bg-default-200 hover:text-foreground-800',\n control:\n 'duration-150! rounded-lg border-2 border-default-200 bg-content1 transition-background hover:border-default-400 group-data-[invalid=true]:border-danger group-data-[invalid=true]:hover:border-danger motion-reduce:transition-none',\n control_focused: 'border-focus',\n crossIcon: '',\n downChevron: '',\n dropdownIndicator:\n 'rounded-md p-1 text-foreground-500 hover:cursor-pointer hover:bg-default-200 hover:text-black',\n group: '',\n groupHeading: 'mb-1 ml-3 mt-2 text-sm text-foreground-500',\n indicatorsContainer: 'gap-1 p-1',\n indicatorSeparator: 'bg-default-300',\n input: 'py-0.5 pl-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 'pointer-events-auto relative bottom-1.5 ml-1 subpixel-antialiased text-small 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 loadingIndicator: '',\n loadingMessage: 'rounded-sm p-2 text-foreground-500',\n menu: 'mt-2 rounded-xl border border-default-200 bg-content1 p-1 shadow-lg',\n menuList: '',\n // ensure menu has same z-index as modal so it is visible when rendered in modal\n // see: https://github.com/heroui-inc/heroui/blob/main/packages/core/theme/src/components/modal.ts (see z-50)\n menuPortal: 'z-50!',\n multiValue: 'items-center gap-1.5 rounded bg-default-100 py-0.5 pl-2 pr-1',\n multiValueContainer: '',\n multiValueLabel: 'py-0.5 leading-6',\n multiValueRemove:\n 'rounded text-default-500 hover:cursor-pointer hover:border-default-300 hover:text-default-800',\n noOptionsMessage: 'rounded-sm p-2 text-foreground-500',\n option_focused: 'bg-default-100 active:bg-default-200',\n option_selected: 'bg-default-300',\n option: 'rounded px-3 py-2 hover:cursor-pointer',\n placeholder: 'ml-1 py-0.5 pl-1 text-sm text-foreground-500',\n selectContainer: '',\n singleValue: 'ml-1! leading-7!',\n valueContainer: 'gap-1 p-1',\n },\n});\n\ninterface SelectOption {\n /** option label */\n label?: ReactNode;\n /** option value */\n value: string;\n}\n\ntype VariantProps = TVProps<typeof selectVariants>;\ntype ClassName = TVClassName<typeof selectVariants>;\n\nexport interface SelectProps 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; // string;\n /** Determine if the */\n clearable?: boolean;\n /** Set the select to disabled state. */\n disabled?: boolean;\n /** Filter Select Options */\n filterOption?:\n | undefined\n | ((option?: SelectOption, inputValue?: string) => boolean);\n /** Format the label of the option */\n renderOptionLabel?: undefined | Props['formatOptionLabel'];\n /** The value of the search input */\n inputValue?: string;\n /** Label that should be associated with the select. */\n label?: ReactNode;\n /** Set the select to a loading state. */\n loading?: boolean;\n /** switch between single and multi select mode. */\n multiSelect?: boolean;\n /** The name for the Select component, used by react-hook-form */\n name: string;\n /** Placeholder that is displayed when nothing is selected */\n placeholder?: string;\n /** The options for the Select component */\n options: SelectOption[];\n /** Handle change events on the input */\n onInputChange?: Props['onInputChange'];\n /** HTML data-testid attribute used in e2e tests */\n testId?: string;\n}\n\nconst InputComponent: typeof components.Input = (props) => {\n // @ts-expect-error data-testid is not a default prop\n // eslint-disable-next-line react/destructuring-assignment\n const testId = `${props.selectProps['data-testid']}`;\n\n return <components.Input data-testid={testId} {...props} />;\n};\n\nconst ControlComponent: typeof components.Control = (props) => {\n // @ts-expect-error data-testid is not a default prop\n // eslint-disable-next-line react/destructuring-assignment\n const testId = `${props.selectProps['data-testid']}_select`;\n return (\n <div data-testid={testId}>\n {}\n <components.Control {...props} />\n </div>\n );\n};\n\nconst OptionComponent: typeof components.Option = (props) => {\n // @ts-expect-error data-testid is not a default prop\n // eslint-disable-next-line react/destructuring-assignment\n const testId = `${props.selectProps['data-testid']}_select_option_${slugify(props?.data?.testId ?? props?.data?.value, { replaceDots: true })}`;\n return (\n <div data-testid={testId}>\n {}\n <components.Option {...props} />\n </div>\n );\n};\n\nconst DropdownIndicatorComponent: typeof components.DropdownIndicator = (\n props,\n) => {\n // @ts-expect-error data-testid is not a default prop\n\n const testId = props?.selectProps['data-testid'] as string;\n return (\n <div data-testid={`${testId}_select_dropdown`}>\n {}\n <components.DropdownIndicator {...props} />\n </div>\n );\n};\n\n/** Select component based on [HeroUI Select](https://www.heroui.com//docs/components/select) and [React-Select](https://react-select.com/home) */\nconst Select = ({\n className = undefined,\n clearable = true,\n filterOption = undefined,\n renderOptionLabel = undefined,\n inputValue = undefined,\n loading = false,\n multiSelect = false,\n name,\n onInputChange = undefined,\n options,\n placeholder = undefined,\n ...uniformFieldProps\n}: SelectProps) => {\n const {\n ariaLabel,\n disabled,\n errorMessage,\n field: { onBlur, onChange, ref, value },\n getErrorMessageProps,\n getHelperWrapperProps,\n getLabelProps,\n invalid,\n label,\n required,\n testId,\n } = useUniformField({\n name,\n ...uniformFieldProps,\n });\n\n // Get getFieldState to check isTouched in onChange callback\n const { getFieldState } = useFormContext();\n\n // Track if the select is focused\n const [isFocused, setIsFocused] = useState(false);\n\n // classNames from slots\n const variants = selectVariants();\n const classNames = variantsToClassNames(variants, className, 'base');\n\n const { getBaseProps, getTriggerProps, getValueProps } = useSelect({\n children: [],\n classNames,\n errorMessage,\n isDisabled: disabled,\n isInvalid: invalid,\n isLoading: loading,\n isRequired: required,\n label,\n labelPlacement: 'outside',\n });\n\n return (\n <div\n {...getBaseProps()}\n className={cn(classNames.base)}\n // see HeroUI styles for group-data condition (data-invalid),\n // e.g.: https://github.com/heroui-inc/heroui/blob/main/packages/components/select/src/use-select.ts\n data-required={required}\n data-testid={`${testId}_wrapper`}\n >\n {label ? (\n <label\n className={classNames.label}\n data-slot=\"label\"\n htmlFor={`react-select-${name}-input`}\n id={getLabelProps().id}\n >\n {label}\n </label>\n ) : null}\n <ReactSelect\n ref={ref}\n menuShouldBlockScroll\n unstyled\n aria-errormessage=\"\"\n aria-invalid={invalid}\n aria-label={ariaLabel}\n // Does not affect the testId of the select, but is needed to pass it to sub-components\n data-testid={testId}\n filterOption={filterOption}\n formatOptionLabel={renderOptionLabel}\n inputValue={inputValue}\n instanceId={name}\n isClearable={clearable}\n isDisabled={disabled}\n isLoading={loading}\n isMulti={multiSelect}\n // set menuPosition to fixed so that menu can be rendered\n // inside Card / Modal components, menuShouldBlockScroll\n // prevents container scroll when menu is open\n menuPosition=\"fixed\"\n name={name}\n onInputChange={onInputChange}\n options={options}\n placeholder={placeholder}\n // set aria-labelledby to the label id so that the select is accessible\n aria-labelledby={\n label\n ? getTriggerProps()['aria-labelledby']?.split(' ')[1]\n : undefined\n }\n classNames={{\n control: () => {\n return cn(classNames.control, {\n [classNames.control_focused]: isFocused && !invalid,\n });\n },\n clearIndicator: () => {\n return classNames.clearIndicator;\n },\n dropdownIndicator: () => {\n return classNames.dropdownIndicator;\n },\n groupHeading: () => {\n return classNames.groupHeading;\n },\n indicatorsContainer: () => {\n return classNames.indicatorsContainer;\n },\n indicatorSeparator: () => {\n return classNames.indicatorSeparator;\n },\n loadingIndicator: () => {\n return classNames.loadingIndicator;\n },\n loadingMessage: () => {\n return classNames.loadingMessage;\n },\n input: () => {\n return classNames.input;\n },\n menu: () => {\n return classNames.menu;\n },\n menuList: () => {\n return classNames.menuList;\n },\n menuPortal: () => {\n return classNames.menuPortal;\n },\n multiValue: () => {\n return classNames.multiValue;\n },\n multiValueLabel: () => {\n return cn(\n classNames.multiValueLabel,\n `${getValueProps().className}`,\n );\n },\n multiValueRemove: () => {\n return classNames.multiValueRemove;\n },\n noOptionsMessage: () => {\n return classNames.noOptionsMessage;\n },\n option: ({\n isFocused: optionIsFocused,\n isSelected: optionIsSelected,\n }) => {\n return cn(classNames.option, {\n [classNames.option_focused]: optionIsFocused,\n [classNames.option_selected]: optionIsSelected,\n });\n },\n placeholder: () => {\n return classNames.placeholder;\n },\n singleValue: () => {\n return cn(classNames.singleValue, `${getValueProps().className}`);\n },\n valueContainer: () => {\n return classNames.valueContainer;\n },\n }}\n components={{\n Input: InputComponent,\n Option: OptionComponent,\n DropdownIndicator: DropdownIndicatorComponent,\n Control: ControlComponent,\n }}\n onBlur={(_e) => {\n setIsFocused(false);\n onBlur();\n }}\n onChange={(option) => {\n if (multiSelect) {\n onChange(\n (option as SelectOption[])?.map((_option) => {\n return _option.value;\n }),\n );\n } else {\n onChange((option as SelectOption)?.value);\n }\n // Mark field as touched immediately when a selection is made if not already touched\n // This ensures validation errors show right away (isTouched becomes true)\n // For Select components, selecting an option is a complete user action\n // (unlike text inputs where typing is ongoing), so we mark as touched immediately\n const { isTouched: currentIsTouched } = getFieldState(name, testId);\n if (!currentIsTouched) {\n onBlur();\n }\n }}\n onFocus={(_e) => {\n setIsFocused(true);\n }}\n // set complete option as value by current field value\n value={options.find((option) => {\n return option.value === value;\n })}\n />\n {invalid ? (\n <div {...getHelperWrapperProps()}>\n <div {...getErrorMessageProps()}>{errorMessage}</div>\n </div>\n ) : null}\n </div>\n );\n};\n\nexport default Select;\n","import Select from './Select';\n\nexport type { SelectProps } from './Select';\n\nexport { Select };\n\nexport default Select;\n"],"mappings":"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"}
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, '__esModule', { value: true });
2
- const require_Slider = require('../Slider-BDLbD7d5.cjs');
2
+ const require_Slider = require('../Slider-C7xxYPgR.cjs');
3
3
 
4
4
  exports.Slider = require_Slider.Slider_default$1;
5
5
  exports.default = require_Slider.Slider_default;
@@ -1,2 +1,2 @@
1
- import { n as SliderProps, t as Slider } from "../index-B74QlCAy.cjs";
1
+ import { n as SliderProps, t as Slider } from "../index-Bo_n9sse.cjs";
2
2
  export { Slider, Slider as default, SliderProps };
@@ -1,2 +1,2 @@
1
- import { n as SliderProps, t as Slider } from "../index-B4Wkijem.js";
1
+ import { n as SliderProps, t as Slider } from "../index-BWNJdLDV.js";
2
2
  export { Slider, Slider as default, SliderProps };
@@ -1,3 +1,3 @@
1
- import { n as Slider_default, t as Slider_default$1 } from "../Slider-BHjHSoIk.js";
1
+ import { n as Slider_default, t as Slider_default$1 } from "../Slider-Dlhb-9hC.js";
2
2
 
3
3
  export { Slider_default as Slider, Slider_default$1 as default };
@@ -1,13 +1,13 @@
1
- const require_FormContext = require('./FormContext-C3GymQOA.cjs');
2
- const require_useUniformField = require('./useUniformField-BMvnRC_r.cjs');
3
- let __fuf_stack_pixel_utils = require("@fuf-stack/pixel-utils");
1
+ const require_FormContext = require('./FormContext-Bb6d8hdG.cjs');
2
+ const require_useUniformField = require('./useUniformField-Bj23Kvbs.cjs');
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
- let __react_aria_visually_hidden = require("@react-aria/visually-hidden");
7
- let __heroui_slider = require("@heroui/slider");
6
+ let _react_aria_visually_hidden = require("@react-aria/visually-hidden");
7
+ let _heroui_slider = require("@heroui/slider");
8
8
 
9
9
  //#region src/Slider/Slider.tsx
10
- const sliderVariants = (0, __fuf_stack_pixel_utils.tv)({ slots: {
10
+ const sliderVariants = (0, _fuf_stack_pixel_utils.tv)({ slots: {
11
11
  base: "group",
12
12
  endContent: "",
13
13
  errorMessage: "ml-1 mt-1",
@@ -31,7 +31,7 @@ const Slider = ({ className = void 0, endContent = void 0, fillOffset = void 0,
31
31
  ...uniformFieldProps
32
32
  });
33
33
  const visualSliderRef = (0, react.useRef)(null);
34
- const classNames = (0, __fuf_stack_pixel_utils.variantsToClassNames)(sliderVariants(), className, "base");
34
+ const classNames = (0, _fuf_stack_pixel_utils.variantsToClassNames)(sliderVariants(), className, "base");
35
35
  const currentValue = field.value != null ? Number(field.value) : minValue;
36
36
  return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
37
37
  className: classNames.base,
@@ -39,7 +39,7 @@ const Slider = ({ className = void 0, endContent = void 0, fillOffset = void 0,
39
39
  "data-required": required,
40
40
  "data-testid": testId,
41
41
  children: [
42
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__react_aria_visually_hidden.VisuallyHidden, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", {
42
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_react_aria_visually_hidden.VisuallyHidden, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", {
43
43
  ref,
44
44
  "aria-label": ariaLabel,
45
45
  disabled,
@@ -58,7 +58,7 @@ const Slider = ({ className = void 0, endContent = void 0, fillOffset = void 0,
58
58
  visualSliderRef.current?.focus();
59
59
  }
60
60
  }) }),
61
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__heroui_slider.Slider, {
61
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_heroui_slider.Slider, {
62
62
  ref: visualSliderRef,
63
63
  "aria-label": ariaLabel,
64
64
  color: invalid ? "danger" : "primary",
@@ -92,7 +92,7 @@ const Slider = ({ className = void 0, endContent = void 0, fillOffset = void 0,
92
92
  }),
93
93
  invalid ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
94
94
  ...getHelperWrapperProps(),
95
- className: (0, __fuf_stack_pixel_utils.cn)(getHelperWrapperProps()?.className, "ml-0 block"),
95
+ className: (0, _fuf_stack_pixel_utils.cn)(getHelperWrapperProps()?.className, "ml-0 block"),
96
96
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
97
97
  ...getErrorMessageProps(),
98
98
  children: errorMessage
@@ -101,23 +101,23 @@ const Slider = ({ className = void 0, endContent = void 0, fillOffset = void 0,
101
101
  ]
102
102
  });
103
103
  };
104
- var Slider_default = Slider;
104
+ var Slider_default$1 = Slider;
105
105
 
106
106
  //#endregion
107
107
  //#region src/Slider/index.ts
108
- var Slider_default$1 = Slider_default;
108
+ var Slider_default = Slider_default$1;
109
109
 
110
110
  //#endregion
111
111
  Object.defineProperty(exports, 'Slider_default', {
112
112
  enumerable: true,
113
113
  get: function () {
114
- return Slider_default$1;
114
+ return Slider_default;
115
115
  }
116
116
  });
117
117
  Object.defineProperty(exports, 'Slider_default$1', {
118
118
  enumerable: true,
119
119
  get: function () {
120
- return Slider_default;
120
+ return Slider_default$1;
121
121
  }
122
122
  });
123
- //# sourceMappingURL=Slider-BDLbD7d5.cjs.map
123
+ //# sourceMappingURL=Slider-C7xxYPgR.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"Slider-BDLbD7d5.cjs","names":["useUniformField","VisuallyHidden","HeroUISlider","Slider"],"sources":["../src/Slider/Slider.tsx","../src/Slider/index.ts"],"sourcesContent":["import type { TVClassName, TVProps } from '@fuf-stack/pixel-utils';\nimport type { ReactNode } from 'react';\n\nimport { useRef } from 'react';\n\nimport { Slider as HeroUISlider } from '@heroui/slider';\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 sliderVariants = tv({\n slots: {\n base: 'group',\n endContent: '',\n errorMessage: 'ml-1 mt-1',\n filler: '',\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 labelWrapper: '',\n mark: '',\n startContent: '',\n step: '',\n thumb: '',\n track: '',\n trackWrapper: '',\n value: '',\n },\n});\n\ntype VariantProps = TVProps<typeof sliderVariants>;\ntype ClassName = TVClassName<typeof sliderVariants>;\n\nexport interface SliderProps 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 /** input field is disabled */\n disabled?: boolean;\n /** Content to display at the end of the slider */\n endContent?: ReactNode;\n /** The offset from where the fill should start */\n fillOffset?: number;\n /** form field label */\n label?: string;\n /** form field name */\n name: string;\n /**\n * Whether to show step dots on the slider\n * @default false\n */\n showSteps?: boolean;\n /**\n * The size of the slider\n * @default \"md\"\n */\n size?: 'sm' | 'md' | 'lg';\n /** Content to display at the start of the slider */\n startContent?: ReactNode;\n /**\n * The step value of the slider\n * @default 1\n */\n step?: number;\n /** HTML data-testid attribute used in e2e tests */\n testId?: string;\n /**\n * The minimum value of the slider\n * @default 0\n */\n minValue?: number;\n /**\n * The maximum value of the slider\n * @default 100\n */\n maxValue?: number;\n}\n\n/**\n * Slider component based on [HeroUI Slider](https://www.heroui.com//docs/components/slider)\n */\nconst Slider = ({\n className = undefined,\n endContent = undefined,\n fillOffset = undefined,\n name,\n showSteps = false,\n size = 'md',\n startContent = undefined,\n step = 1,\n minValue = 0,\n maxValue = 100,\n ...uniformFieldProps\n}: SliderProps) => {\n const {\n ariaLabel,\n disabled,\n field,\n getErrorMessageProps,\n getHelperWrapperProps,\n invalid,\n label,\n onBlur,\n onChange,\n ref,\n required,\n errorMessage,\n testId,\n } = useUniformField({\n name,\n ...uniformFieldProps,\n });\n\n // Ref for the visual slider to forward focus\n const visualSliderRef = useRef<HTMLDivElement>(null);\n\n // classNames from slots\n const variants = sliderVariants();\n const classNames = variantsToClassNames(variants, className, 'base');\n\n // Get the current value, defaulting to minValue if null/undefined\n const currentValue = field.value != null ? Number(field.value) : minValue;\n\n return (\n <div\n className={classNames.base}\n data-invalid={invalid}\n data-required={required}\n data-testid={testId}\n >\n {/* Visually hidden input for form accessibility and focus management */}\n <VisuallyHidden>\n <input\n ref={ref}\n aria-label={ariaLabel}\n disabled={disabled}\n max={maxValue}\n min={minValue}\n name={name}\n onBlur={onBlur}\n step={step}\n tabIndex={-1}\n type=\"range\"\n value={currentValue}\n onChange={(e) => {\n onChange(Number(e.target.value));\n }}\n onFocus={() => {\n // When RHF focuses this hidden input (e.g., on validation error),\n // forward focus to the visual slider to show focus ring\n visualSliderRef.current?.focus();\n }}\n />\n </VisuallyHidden>\n {/* Visual HeroUISlider component */}\n <HeroUISlider\n ref={visualSliderRef}\n aria-label={ariaLabel}\n color={invalid ? 'danger' : 'primary'}\n endContent={endContent}\n fillOffset={fillOffset}\n isDisabled={disabled}\n label={label}\n maxValue={maxValue}\n minValue={minValue}\n name={`${name}_slider`}\n onBlur={onBlur}\n onChange={onChange}\n showSteps={showSteps}\n size={size}\n startContent={startContent}\n step={step}\n value={currentValue}\n classNames={{\n endContent: classNames.endContent,\n filler: classNames.filler,\n label: classNames.label,\n labelWrapper: classNames.labelWrapper,\n mark: classNames.mark,\n startContent: classNames.startContent,\n step: classNames.step,\n thumb: classNames.thumb,\n track: classNames.track,\n trackWrapper: classNames.trackWrapper,\n value: classNames.value,\n }}\n />\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 Slider;\n","import Slider from './Slider';\n\nexport type { SliderProps } from './Slider';\n\nexport { Slider };\n\nexport default Slider;\n"],"mappings":";;;;;;;;;AAYA,MAAa,iDAAoB,EAC/B,OAAO;CACL,MAAM;CACN,YAAY;CACZ,cAAc;CACd,QAAQ;CAGR,OACE;CACF,cAAc;CACd,MAAM;CACN,cAAc;CACd,MAAM;CACN,OAAO;CACP,OAAO;CACP,cAAc;CACd,OAAO;CACR,EACF,CAAC;;;;AAsDF,MAAM,UAAU,EACd,YAAY,QACZ,aAAa,QACb,aAAa,QACb,MACA,YAAY,OACZ,OAAO,MACP,eAAe,QACf,OAAO,GACP,WAAW,GACX,WAAW,KACX,GAAG,wBACc;CACjB,MAAM,EACJ,WACA,UACA,OACA,sBACA,uBACA,SACA,OACA,QACA,UACA,KACA,UACA,cACA,WACEA,wCAAgB;EAClB;EACA,GAAG;EACJ,CAAC;CAGF,MAAM,oCAAyC,KAAK;CAIpD,MAAM,+DADW,gBAAgB,EACiB,WAAW,OAAO;CAGpE,MAAM,eAAe,MAAM,SAAS,OAAO,OAAO,MAAM,MAAM,GAAG;AAEjE,QACE,4CAAC;EACC,WAAW,WAAW;EACtB,gBAAc;EACd,iBAAe;EACf,eAAa;;GAGb,2CAACC,yDACC,2CAAC;IACM;IACL,cAAY;IACF;IACV,KAAK;IACL,KAAK;IACC;IACE;IACF;IACN,UAAU;IACV,MAAK;IACL,OAAO;IACP,WAAW,MAAM;AACf,cAAS,OAAO,EAAE,OAAO,MAAM,CAAC;;IAElC,eAAe;AAGb,qBAAgB,SAAS,OAAO;;KAElC,GACa;GAEjB,2CAACC;IACC,KAAK;IACL,cAAY;IACZ,OAAO,UAAU,WAAW;IAChB;IACA;IACZ,YAAY;IACL;IACG;IACA;IACV,MAAM,GAAG,KAAK;IACN;IACE;IACC;IACL;IACQ;IACR;IACN,OAAO;IACP,YAAY;KACV,YAAY,WAAW;KACvB,QAAQ,WAAW;KACnB,OAAO,WAAW;KAClB,cAAc,WAAW;KACzB,MAAM,WAAW;KACjB,cAAc,WAAW;KACzB,MAAM,WAAW;KACjB,OAAO,WAAW;KAClB,OAAO,WAAW;KAClB,cAAc,WAAW;KACzB,OAAO,WAAW;KACnB;KACD;GACD,UACC,2CAAC;IACC,GAAI,uBAAuB;IAC3B,2CACE,uBAAuB,EAAE,WAEzB,aACD;cAED,2CAAC;KAAI,GAAI,sBAAsB;eAAG;MAAmB;KACjD,GACJ;;GACA;;AAIV,qBAAe;;;;ACzMf,uBAAeC"}
1
+ {"version":3,"file":"Slider-C7xxYPgR.cjs","names":["useUniformField","VisuallyHidden","HeroUISlider","Slider"],"sources":["../src/Slider/Slider.tsx","../src/Slider/index.ts"],"sourcesContent":["import type { TVClassName, TVProps } from '@fuf-stack/pixel-utils';\nimport type { ReactNode } from 'react';\n\nimport { useRef } from 'react';\n\nimport { Slider as HeroUISlider } from '@heroui/slider';\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 sliderVariants = tv({\n slots: {\n base: 'group',\n endContent: '',\n errorMessage: 'ml-1 mt-1',\n filler: '',\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 labelWrapper: '',\n mark: '',\n startContent: '',\n step: '',\n thumb: '',\n track: '',\n trackWrapper: '',\n value: '',\n },\n});\n\ntype VariantProps = TVProps<typeof sliderVariants>;\ntype ClassName = TVClassName<typeof sliderVariants>;\n\nexport interface SliderProps 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 /** input field is disabled */\n disabled?: boolean;\n /** Content to display at the end of the slider */\n endContent?: ReactNode;\n /** The offset from where the fill should start */\n fillOffset?: number;\n /** form field label */\n label?: string;\n /** form field name */\n name: string;\n /**\n * Whether to show step dots on the slider\n * @default false\n */\n showSteps?: boolean;\n /**\n * The size of the slider\n * @default \"md\"\n */\n size?: 'sm' | 'md' | 'lg';\n /** Content to display at the start of the slider */\n startContent?: ReactNode;\n /**\n * The step value of the slider\n * @default 1\n */\n step?: number;\n /** HTML data-testid attribute used in e2e tests */\n testId?: string;\n /**\n * The minimum value of the slider\n * @default 0\n */\n minValue?: number;\n /**\n * The maximum value of the slider\n * @default 100\n */\n maxValue?: number;\n}\n\n/**\n * Slider component based on [HeroUI Slider](https://www.heroui.com//docs/components/slider)\n */\nconst Slider = ({\n className = undefined,\n endContent = undefined,\n fillOffset = undefined,\n name,\n showSteps = false,\n size = 'md',\n startContent = undefined,\n step = 1,\n minValue = 0,\n maxValue = 100,\n ...uniformFieldProps\n}: SliderProps) => {\n const {\n ariaLabel,\n disabled,\n field,\n getErrorMessageProps,\n getHelperWrapperProps,\n invalid,\n label,\n onBlur,\n onChange,\n ref,\n required,\n errorMessage,\n testId,\n } = useUniformField({\n name,\n ...uniformFieldProps,\n });\n\n // Ref for the visual slider to forward focus\n const visualSliderRef = useRef<HTMLDivElement>(null);\n\n // classNames from slots\n const variants = sliderVariants();\n const classNames = variantsToClassNames(variants, className, 'base');\n\n // Get the current value, defaulting to minValue if null/undefined\n const currentValue = field.value != null ? Number(field.value) : minValue;\n\n return (\n <div\n className={classNames.base}\n data-invalid={invalid}\n data-required={required}\n data-testid={testId}\n >\n {/* Visually hidden input for form accessibility and focus management */}\n <VisuallyHidden>\n <input\n ref={ref}\n aria-label={ariaLabel}\n disabled={disabled}\n max={maxValue}\n min={minValue}\n name={name}\n onBlur={onBlur}\n step={step}\n tabIndex={-1}\n type=\"range\"\n value={currentValue}\n onChange={(e) => {\n onChange(Number(e.target.value));\n }}\n onFocus={() => {\n // When RHF focuses this hidden input (e.g., on validation error),\n // forward focus to the visual slider to show focus ring\n visualSliderRef.current?.focus();\n }}\n />\n </VisuallyHidden>\n {/* Visual HeroUISlider component */}\n <HeroUISlider\n ref={visualSliderRef}\n aria-label={ariaLabel}\n color={invalid ? 'danger' : 'primary'}\n endContent={endContent}\n fillOffset={fillOffset}\n isDisabled={disabled}\n label={label}\n maxValue={maxValue}\n minValue={minValue}\n name={`${name}_slider`}\n onBlur={onBlur}\n onChange={onChange}\n showSteps={showSteps}\n size={size}\n startContent={startContent}\n step={step}\n value={currentValue}\n classNames={{\n endContent: classNames.endContent,\n filler: classNames.filler,\n label: classNames.label,\n labelWrapper: classNames.labelWrapper,\n mark: classNames.mark,\n startContent: classNames.startContent,\n step: classNames.step,\n thumb: classNames.thumb,\n track: classNames.track,\n trackWrapper: classNames.trackWrapper,\n value: classNames.value,\n }}\n />\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 Slider;\n","import Slider from './Slider';\n\nexport type { SliderProps } from './Slider';\n\nexport { Slider };\n\nexport default Slider;\n"],"mappings":";;;;;;;;;AAYA,MAAa,gDAAoB,EAC/B,OAAO;CACL,MAAM;CACN,YAAY;CACZ,cAAc;CACd,QAAQ;CAGR,OACE;CACF,cAAc;CACd,MAAM;CACN,cAAc;CACd,MAAM;CACN,OAAO;CACP,OAAO;CACP,cAAc;CACd,OAAO;CACR,EACF,CAAC;;;;AAsDF,MAAM,UAAU,EACd,YAAY,QACZ,aAAa,QACb,aAAa,QACb,MACA,YAAY,OACZ,OAAO,MACP,eAAe,QACf,OAAO,GACP,WAAW,GACX,WAAW,KACX,GAAG,wBACc;CACjB,MAAM,EACJ,WACA,UACA,OACA,sBACA,uBACA,SACA,OACA,QACA,UACA,KACA,UACA,cACA,WACEA,wCAAgB;EAClB;EACA,GAAG;EACJ,CAAC;CAGF,MAAM,oCAAyC,KAAK;CAIpD,MAAM,8DADW,gBAAgB,EACiB,WAAW,OAAO;CAGpE,MAAM,eAAe,MAAM,SAAS,OAAO,OAAO,MAAM,MAAM,GAAG;AAEjE,QACE,4CAAC;EACC,WAAW,WAAW;EACtB,gBAAc;EACd,iBAAe;EACf,eAAa;;GAGb,2CAACC,wDACC,2CAAC;IACM;IACL,cAAY;IACF;IACV,KAAK;IACL,KAAK;IACC;IACE;IACF;IACN,UAAU;IACV,MAAK;IACL,OAAO;IACP,WAAW,MAAM;AACf,cAAS,OAAO,EAAE,OAAO,MAAM,CAAC;;IAElC,eAAe;AAGb,qBAAgB,SAAS,OAAO;;KAElC,GACa;GAEjB,2CAACC;IACC,KAAK;IACL,cAAY;IACZ,OAAO,UAAU,WAAW;IAChB;IACA;IACZ,YAAY;IACL;IACG;IACA;IACV,MAAM,GAAG,KAAK;IACN;IACE;IACC;IACL;IACQ;IACR;IACN,OAAO;IACP,YAAY;KACV,YAAY,WAAW;KACvB,QAAQ,WAAW;KACnB,OAAO,WAAW;KAClB,cAAc,WAAW;KACzB,MAAM,WAAW;KACjB,cAAc,WAAW;KACzB,MAAM,WAAW;KACjB,OAAO,WAAW;KAClB,OAAO,WAAW;KAClB,cAAc,WAAW;KACzB,OAAO,WAAW;KACnB;KACD;GACD,UACC,2CAAC;IACC,GAAI,uBAAuB;IAC3B,0CACE,uBAAuB,EAAE,WAEzB,aACD;cAED,2CAAC;KAAI,GAAI,sBAAsB;eAAG;MAAmB;KACjD,GACJ;;GACA;;AAIV,uBAAe;;;;ACzMf,qBAAeC"}
@@ -1,4 +1,4 @@
1
- import { t as useUniformField } from "./useUniformField-ClprfrES.js";
1
+ import { t as useUniformField } from "./useUniformField-gU4qYUwL.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";
@@ -100,12 +100,12 @@ const Slider$1 = ({ className = void 0, endContent = void 0, fillOffset = void 0
100
100
  ]
101
101
  });
102
102
  };
103
- var Slider_default = Slider$1;
103
+ var Slider_default$1 = Slider$1;
104
104
 
105
105
  //#endregion
106
106
  //#region src/Slider/index.ts
107
- var Slider_default$1 = Slider_default;
107
+ var Slider_default = Slider_default$1;
108
108
 
109
109
  //#endregion
110
- export { Slider_default as n, Slider_default$1 as t };
111
- //# sourceMappingURL=Slider-BHjHSoIk.js.map
110
+ export { Slider_default$1 as n, Slider_default as t };
111
+ //# sourceMappingURL=Slider-Dlhb-9hC.js.map