@fuf-stack/uniform 1.13.0 → 1.15.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Checkboxes/index.cjs +1 -1
- package/dist/Checkboxes/index.d.cts +1 -1
- package/dist/Checkboxes/index.d.ts +1 -1
- package/dist/Checkboxes/index.js +1 -1
- package/dist/{Checkboxes-mc1ZItR5.cjs → Checkboxes-3Rg0gyfO.cjs} +2 -2
- package/dist/{Checkboxes-mc1ZItR5.cjs.map → Checkboxes-3Rg0gyfO.cjs.map} +1 -1
- package/dist/{Checkboxes-BQI2kTIb.js → Checkboxes-BfUtbKe-.js} +2 -2
- package/dist/{Checkboxes-BQI2kTIb.js.map → Checkboxes-BfUtbKe-.js.map} +1 -1
- package/dist/FieldArray/index.cjs +1 -1
- package/dist/FieldArray/index.d.cts +1 -1
- package/dist/FieldArray/index.d.ts +1 -1
- package/dist/FieldArray/index.js +1 -1
- package/dist/{FieldArray-D4eGdGXA.js → FieldArray-Bnv1_-Rl.js} +3 -3
- package/dist/{FieldArray-D4eGdGXA.js.map → FieldArray-Bnv1_-Rl.js.map} +1 -1
- package/dist/{FieldArray-CsAyIsw9.cjs → FieldArray-DgJgrLOY.cjs} +3 -3
- package/dist/{FieldArray-CsAyIsw9.cjs.map → FieldArray-DgJgrLOY.cjs.map} +1 -1
- package/dist/FieldCard/index.cjs +1 -1
- package/dist/FieldCard/index.d.cts +1 -1
- package/dist/FieldCard/index.d.ts +1 -1
- package/dist/FieldCard/index.js +1 -1
- package/dist/{FieldCard-BPQIqqW5.js → FieldCard-CLd4PaoX.js} +2 -2
- package/dist/{FieldCard-BPQIqqW5.js.map → FieldCard-CLd4PaoX.js.map} +1 -1
- package/dist/{FieldCard-CgWjzrRD.cjs → FieldCard-CeEnVxiB.cjs} +2 -2
- package/dist/{FieldCard-CgWjzrRD.cjs.map → FieldCard-CeEnVxiB.cjs.map} +1 -1
- package/dist/Form/index.d.cts +1 -1
- package/dist/Form/index.d.ts +1 -1
- package/dist/Grid/index.d.cts +1 -1
- package/dist/Grid/index.d.ts +1 -1
- package/dist/Input/index.cjs +1 -1
- package/dist/Input/index.d.cts +1 -1
- package/dist/Input/index.d.ts +1 -1
- package/dist/Input/index.js +1 -1
- package/dist/{Input-BUfOTtDR.js → Input-ChXItabV.js} +2 -2
- package/dist/{Input-BUfOTtDR.js.map → Input-ChXItabV.js.map} +1 -1
- package/dist/{Input-7TmTrrV7.cjs → Input-DlyrGFYf.cjs} +2 -2
- package/dist/{Input-7TmTrrV7.cjs.map → Input-DlyrGFYf.cjs.map} +1 -1
- package/dist/RadioBoxes/index.cjs +1 -1
- package/dist/RadioBoxes/index.d.cts +1 -1
- package/dist/RadioBoxes/index.d.ts +1 -1
- package/dist/RadioBoxes/index.js +1 -1
- package/dist/{RadioBoxes-CjxWldIR.cjs → RadioBoxes-ClDOhQkO.cjs} +6 -6
- package/dist/{RadioBoxes-CjxWldIR.cjs.map → RadioBoxes-ClDOhQkO.cjs.map} +1 -1
- package/dist/{RadioBoxes-Dpd71z1S.js → RadioBoxes-D6ULFGfd.js} +6 -6
- package/dist/{RadioBoxes-Dpd71z1S.js.map → RadioBoxes-D6ULFGfd.js.map} +1 -1
- package/dist/RadioTabs/index.cjs +1 -1
- package/dist/RadioTabs/index.d.cts +1 -1
- package/dist/RadioTabs/index.d.ts +1 -1
- package/dist/RadioTabs/index.js +1 -1
- package/dist/{RadioTabs-BA-EMFRc.cjs → RadioTabs-CgB0MmbK.cjs} +2 -2
- package/dist/{RadioTabs-BA-EMFRc.cjs.map → RadioTabs-CgB0MmbK.cjs.map} +1 -1
- package/dist/{RadioTabs-BZlC19z0.js → RadioTabs-eSB6OXD7.js} +2 -2
- package/dist/{RadioTabs-BZlC19z0.js.map → RadioTabs-eSB6OXD7.js.map} +1 -1
- package/dist/Radios/index.cjs +1 -1
- package/dist/Radios/index.d.cts +1 -1
- package/dist/Radios/index.d.ts +1 -1
- package/dist/Radios/index.js +1 -1
- package/dist/{Radios-ClBrO7QR.js → Radios-BXuyREKO.js} +6 -6
- package/dist/Radios-BXuyREKO.js.map +1 -0
- package/dist/{Radios-Bfxy-Vnf.cjs → Radios-DWsCLUVl.cjs} +6 -6
- package/dist/Radios-DWsCLUVl.cjs.map +1 -0
- package/dist/Select/index.cjs +1 -1
- package/dist/Select/index.d.cts +1 -1
- package/dist/Select/index.d.ts +1 -1
- package/dist/Select/index.js +1 -1
- package/dist/{Select-CdTgOiUU.cjs → Select-CTbXrAjL.cjs} +124 -93
- package/dist/Select-CTbXrAjL.cjs.map +1 -0
- package/dist/{Select-9MyYYGeZ.js → Select-Dk_K_Q0F.js} +125 -94
- package/dist/Select-Dk_K_Q0F.js.map +1 -0
- package/dist/Slider/index.cjs +1 -1
- package/dist/Slider/index.d.cts +1 -1
- package/dist/Slider/index.d.ts +1 -1
- package/dist/Slider/index.js +1 -1
- package/dist/{Slider-CK9n0ryX.cjs → Slider-ChGkOSJJ.cjs} +2 -2
- package/dist/{Slider-CK9n0ryX.cjs.map → Slider-ChGkOSJJ.cjs.map} +1 -1
- package/dist/{Slider-Cy5vz5as.js → Slider-DdF0ZBzn.js} +2 -2
- package/dist/{Slider-Cy5vz5as.js.map → Slider-DdF0ZBzn.js.map} +1 -1
- package/dist/SubmitButton/index.d.cts +1 -1
- package/dist/SubmitButton/index.d.ts +1 -1
- package/dist/Switch/index.cjs +1 -1
- package/dist/Switch/index.d.cts +1 -1
- package/dist/Switch/index.d.ts +1 -1
- package/dist/Switch/index.js +1 -1
- package/dist/{Switch-s64WUP5i.js → Switch-DW9SOeIv.js} +2 -2
- package/dist/{Switch-s64WUP5i.js.map → Switch-DW9SOeIv.js.map} +1 -1
- package/dist/{Switch-BBhxgBHh.cjs → Switch-Lt61rKxf.cjs} +2 -2
- package/dist/{Switch-BBhxgBHh.cjs.map → Switch-Lt61rKxf.cjs.map} +1 -1
- package/dist/SwitchBox/index.cjs +1 -1
- package/dist/SwitchBox/index.d.cts +1 -1
- package/dist/SwitchBox/index.d.ts +1 -1
- package/dist/SwitchBox/index.js +1 -1
- package/dist/{SwitchBox-CMw1MGJ0.js → SwitchBox-9KAu4WWd.js} +2 -2
- package/dist/{SwitchBox-CMw1MGJ0.js.map → SwitchBox-9KAu4WWd.js.map} +1 -1
- package/dist/{SwitchBox-BwdvgHpG.cjs → SwitchBox-D-EI9Sl-.cjs} +2 -2
- package/dist/{SwitchBox-BwdvgHpG.cjs.map → SwitchBox-D-EI9Sl-.cjs.map} +1 -1
- package/dist/TextArea/index.cjs +1 -1
- package/dist/TextArea/index.d.cts +1 -1
- package/dist/TextArea/index.d.ts +1 -1
- package/dist/TextArea/index.js +1 -1
- package/dist/{TextArea-DTkDJr6g.js → TextArea-B0zYpNy-.js} +2 -2
- package/dist/{TextArea-DTkDJr6g.js.map → TextArea-B0zYpNy-.js.map} +1 -1
- package/dist/{TextArea-COe8XP7f.cjs → TextArea-DRSFdn5v.cjs} +2 -2
- package/dist/{TextArea-COe8XP7f.cjs.map → TextArea-DRSFdn5v.cjs.map} +1 -1
- package/dist/helpers/index.d.cts +2 -186
- package/dist/helpers/index.d.ts +2 -186
- package/dist/hooks/useClientValidation/index.d.cts +1 -1
- package/dist/hooks/useClientValidation/index.d.ts +1 -1
- package/dist/hooks/useController/index.cjs +1 -1
- package/dist/hooks/useController/index.d.cts +1 -1
- package/dist/hooks/useController/index.d.ts +1 -2
- package/dist/hooks/useController/index.js +1 -1
- package/dist/hooks/useFormContext/index.d.cts +1 -1
- package/dist/hooks/useFormContext/index.d.ts +1 -1
- package/dist/hooks/useUniformField/index.cjs +1 -1
- package/dist/hooks/useUniformField/index.d.cts +1 -1
- package/dist/hooks/useUniformField/index.d.ts +3 -3
- package/dist/hooks/useUniformField/index.js +1 -1
- package/dist/hooks/useUniformFieldArray/index.cjs +1 -1
- package/dist/hooks/useUniformFieldArray/index.d.cts +1 -1
- package/dist/hooks/useUniformFieldArray/index.d.ts +24 -4
- package/dist/hooks/useUniformFieldArray/index.js +1 -1
- package/dist/hooks/useWatchUserChange/index.cjs +1 -1
- package/dist/hooks/useWatchUserChange/index.d.cts +1 -1
- package/dist/hooks/useWatchUserChange/index.d.ts +1 -1
- package/dist/hooks/useWatchUserChange/index.js +1 -1
- package/dist/{index-OwPGP648.d.ts → index-BGQrBRyF.d.cts} +4 -4
- package/dist/{index-acwVBMcR.d.cts.map → index-BGQrBRyF.d.cts.map} +1 -1
- package/dist/{index-DsyY9X04.d.cts → index-BHMwBAFH.d.cts} +3 -3
- package/dist/{index-DsyY9X04.d.cts.map → index-BHMwBAFH.d.cts.map} +1 -1
- package/dist/{index-DtWIiEFa.d.cts → index-BM5ClMN4.d.ts} +38 -24
- package/dist/index-BM5ClMN4.d.ts.map +1 -0
- package/dist/index-BPjrrFuM.d.ts +186 -0
- package/dist/index-BPjrrFuM.d.ts.map +1 -0
- package/dist/{index-CXkSuHEL.d.ts → index-BQDEnYTq.d.ts} +3 -3
- package/dist/{index-CXkSuHEL.d.ts.map → index-BQDEnYTq.d.ts.map} +1 -1
- package/dist/{index-_njc33cQ.d.cts → index-BSZJQBCK.d.ts} +4 -4
- package/dist/{index-rK5GxEPh.d.ts.map → index-BSZJQBCK.d.ts.map} +1 -1
- package/dist/{index-Z0IxHoXS.d.ts → index-BTTo_ufh.d.ts} +3 -3
- package/dist/{index-Z0IxHoXS.d.ts.map → index-BTTo_ufh.d.ts.map} +1 -1
- package/dist/index-BTr_gid3.d.cts +186 -0
- package/dist/index-BTr_gid3.d.cts.map +1 -0
- package/dist/{index-DMVoX5pj.d.cts → index-BapBrgmV.d.cts} +48 -48
- package/dist/index-BapBrgmV.d.cts.map +1 -0
- package/dist/{index-TbDhDIfv.d.ts → index-BbA9HcNa.d.cts} +2 -2
- package/dist/{index-KgMMIPyM.d.cts.map → index-BbA9HcNa.d.cts.map} +1 -1
- package/dist/{index-DvB46QAb.d.ts → index-Bd-E0JM1.d.ts} +3 -3
- package/dist/{index-DvB46QAb.d.ts.map → index-Bd-E0JM1.d.ts.map} +1 -1
- package/dist/{index-Bd7H1tdb.d.cts → index-Bfk32Dl3.d.cts} +3 -3
- package/dist/{index-Bd7H1tdb.d.cts.map → index-Bfk32Dl3.d.cts.map} +1 -1
- package/dist/{index-BhqOFcsS.d.cts → index-Bs-1Pwc6.d.cts} +4 -4
- package/dist/{index-BhqOFcsS.d.cts.map → index-Bs-1Pwc6.d.cts.map} +1 -1
- package/dist/{index-D9VXD1rv.d.cts → index-BxV89x6q.d.cts} +21 -21
- package/dist/index-BxV89x6q.d.cts.map +1 -0
- package/dist/{index-CASoDHjE.d.cts → index-C3yzuYLc.d.cts} +21 -21
- package/dist/{index-CASoDHjE.d.cts.map → index-C3yzuYLc.d.cts.map} +1 -1
- package/dist/{index-JfAmWj81.d.cts → index-CCUQ-2Ic.d.cts} +34 -34
- package/dist/index-CCUQ-2Ic.d.cts.map +1 -0
- package/dist/{index-D3o2YTBb.d.ts → index-CJse-RZf.d.cts} +38 -38
- package/dist/index-CJse-RZf.d.cts.map +1 -0
- package/dist/{index-BFeKALeM.d.ts → index-CODzh0zX.d.ts} +6 -6
- package/dist/{index-BFeKALeM.d.ts.map → index-CODzh0zX.d.ts.map} +1 -1
- package/dist/{index--J1-cUWg.d.cts → index-CnIrK5L3.d.cts} +35 -35
- package/dist/{index--J1-cUWg.d.cts.map → index-CnIrK5L3.d.cts.map} +1 -1
- package/dist/{index-JdksqsGh.d.ts → index-CuTHt_2o.d.cts} +5 -5
- package/dist/{index-CrpdF1Xw.d.cts.map → index-CuTHt_2o.d.cts.map} +1 -1
- package/dist/{index-CPbrUN5A.d.ts → index-DGryaZXZ.d.ts} +21 -21
- package/dist/{index-CPbrUN5A.d.ts.map → index-DGryaZXZ.d.ts.map} +1 -1
- package/dist/{index-7C539UUH.d.cts → index-DLJiYqVE.d.cts} +6 -6
- package/dist/{index-7C539UUH.d.cts.map → index-DLJiYqVE.d.cts.map} +1 -1
- package/dist/{index-DEtF7ckd.d.ts → index-DMphDWRk.d.ts} +34 -34
- package/dist/index-DMphDWRk.d.ts.map +1 -0
- package/dist/{index-rK5GxEPh.d.ts → index-DN9Ke6Y8.d.cts} +6 -6
- package/dist/{index-_njc33cQ.d.cts.map → index-DN9Ke6Y8.d.cts.map} +1 -1
- package/dist/{index-_zWAtv8G.d.ts → index-DoGBvZ4J.d.ts} +35 -35
- package/dist/{index-_zWAtv8G.d.ts.map → index-DoGBvZ4J.d.ts.map} +1 -1
- package/dist/{index-DsuMjcQk.d.ts → index-DsSuY_wP.d.ts} +6 -6
- package/dist/{index-DsuMjcQk.d.ts.map → index-DsSuY_wP.d.ts.map} +1 -1
- package/dist/{index-acwVBMcR.d.cts → index-DvAmzIEe.d.ts} +4 -4
- package/dist/{index-OwPGP648.d.ts.map → index-DvAmzIEe.d.ts.map} +1 -1
- package/dist/{index-DMojDmML.d.ts → index-RiAo6yCB.d.ts} +48 -48
- package/dist/{index-DMojDmML.d.ts.map → index-RiAo6yCB.d.ts.map} +1 -1
- package/dist/{index-BNu0EV5x.d.cts → index-U0Jx25HO.d.cts} +3 -3
- package/dist/{index-BNu0EV5x.d.cts.map → index-U0Jx25HO.d.cts.map} +1 -1
- package/dist/{index-Cs-7Ptqc.d.cts → index-_mq7cbF5.d.cts} +3 -3
- package/dist/{index-Cs-7Ptqc.d.cts.map → index-_mq7cbF5.d.cts.map} +1 -1
- package/dist/{index-DCZwOjSs.d.cts → index-drMNLgtV.d.ts} +24 -24
- package/dist/index-drMNLgtV.d.ts.map +1 -0
- package/dist/index-eJFvyVyS.d.cts +278 -0
- package/dist/index-eJFvyVyS.d.cts.map +1 -0
- package/dist/{index-CrpdF1Xw.d.cts → index-hK6woeqR.d.ts} +5 -5
- package/dist/{index-JdksqsGh.d.ts.map → index-hK6woeqR.d.ts.map} +1 -1
- package/dist/{index-CVY05bZf.d.ts → index-pE9osud2.d.ts} +3 -3
- package/dist/{index-CVY05bZf.d.ts.map → index-pE9osud2.d.ts.map} +1 -1
- package/dist/{index-BHmMP-ps.d.ts → index-uNWK5Vb5.d.ts} +21 -21
- package/dist/{index-BHmMP-ps.d.ts.map → index-uNWK5Vb5.d.ts.map} +1 -1
- package/dist/{index-KgMMIPyM.d.cts → index-y2jgEqoM.d.ts} +3 -3
- package/dist/{index-TbDhDIfv.d.ts.map → index-y2jgEqoM.d.ts.map} +1 -1
- package/dist/index.cjs +16 -16
- package/dist/index.d.cts +24 -24
- package/dist/index.d.ts +24 -25
- package/dist/index.js +16 -16
- package/dist/partials/FieldCopyTestIdButton/index.d.cts +1 -1
- package/dist/partials/FieldCopyTestIdButton/index.d.ts +1 -1
- package/dist/partials/FieldValidationError/index.d.cts +1 -1
- package/dist/partials/FieldValidationError/index.d.ts +1 -1
- package/dist/{useClientValidation-Bg0q3Axc.d.ts → useClientValidation-Bv0yxTyV.d.ts} +1 -1
- package/dist/{useClientValidation-Bg0q3Axc.d.ts.map → useClientValidation-Bv0yxTyV.d.ts.map} +1 -1
- package/dist/{useClientValidation-BvPDQmf6.d.cts → useClientValidation-DSMw7f-t.d.cts} +1 -1
- package/dist/{useClientValidation-BvPDQmf6.d.cts.map → useClientValidation-DSMw7f-t.d.cts.map} +1 -1
- package/dist/{useController-BArZd2Vp.d.cts → useController-B-DhUPpA.d.cts} +3 -1
- package/dist/{useController-BArZd2Vp.d.cts.map → useController-B-DhUPpA.d.cts.map} +1 -1
- package/dist/{useController-MVHJ7WFp.d.ts → useController-Co8wbo-Y.d.ts} +3 -1
- package/dist/{useController-MVHJ7WFp.d.ts.map → useController-Co8wbo-Y.d.ts.map} +1 -1
- package/dist/{useController-BPDcwfTj.js → useController-QcOl0O0v.js} +5 -2
- package/dist/useController-QcOl0O0v.js.map +1 -0
- package/dist/{useController-DHRkSHem.cjs → useController-oCYPeezC.cjs} +5 -2
- package/dist/useController-oCYPeezC.cjs.map +1 -0
- package/dist/{useFormContext-B2TS6xq0.d.ts → useFormContext-B7ooPCfd.d.ts} +3 -3
- package/dist/useFormContext-B7ooPCfd.d.ts.map +1 -0
- package/dist/{useFormContext-n3WYgGkW.d.cts → useFormContext-DihY1N8O.d.cts} +3 -3
- package/dist/useFormContext-DihY1N8O.d.cts.map +1 -0
- package/dist/{useUniformField-CrEz5lkV.d.cts → useUniformField-8ODkBNpn.d.cts} +3 -3
- package/dist/{useUniformField-CrEz5lkV.d.cts.map → useUniformField-8ODkBNpn.d.cts.map} +1 -1
- package/dist/{useUniformField-D2NgevBI.js → useUniformField-C6oSAFa3.js} +2 -2
- package/dist/{useUniformField-D2NgevBI.js.map → useUniformField-C6oSAFa3.js.map} +1 -1
- package/dist/{useUniformField-Bzv-6MG1.d.ts → useUniformField-CJX0u3Ou.d.ts} +3 -3
- package/dist/{useUniformField-Bzv-6MG1.d.ts.map → useUniformField-CJX0u3Ou.d.ts.map} +1 -1
- package/dist/{useUniformField-CGiibqg4.cjs → useUniformField-Dd3AnpgE.cjs} +2 -2
- package/dist/{useUniformField-CGiibqg4.cjs.map → useUniformField-Dd3AnpgE.cjs.map} +1 -1
- package/dist/{useUniformFieldArray-Ct8jD7JJ.cjs → useUniformFieldArray-D93AUZI4.cjs} +2 -2
- package/dist/{useUniformFieldArray-Ct8jD7JJ.cjs.map → useUniformFieldArray-D93AUZI4.cjs.map} +1 -1
- package/dist/{useUniformFieldArray-B2-Bfl74.d.cts → useUniformFieldArray-DF83iIC1.d.cts} +4 -4
- package/dist/{useUniformFieldArray-B2-Bfl74.d.cts.map → useUniformFieldArray-DF83iIC1.d.cts.map} +1 -1
- package/dist/{useUniformFieldArray-jUCzsveX.d.ts → useUniformFieldArray-DFGgYtxz.d.ts} +4 -4
- package/dist/{useUniformFieldArray-jUCzsveX.d.ts.map → useUniformFieldArray-DFGgYtxz.d.ts.map} +1 -1
- package/dist/{useUniformFieldArray-DcoVYtqx.js → useUniformFieldArray-DNrmEXLg.js} +2 -2
- package/dist/{useUniformFieldArray-DcoVYtqx.js.map → useUniformFieldArray-DNrmEXLg.js.map} +1 -1
- package/dist/{useWatchUserChange-Bf5JKDJJ.d.ts → useWatchUserChange-DahNCPDG.d.cts} +3 -1
- package/dist/{useWatchUserChange-Br4Q7syM.d.cts.map → useWatchUserChange-DahNCPDG.d.cts.map} +1 -1
- package/dist/{useWatchUserChange-1ELFYX_F.js → useWatchUserChange-DyhUYlrN.js} +3 -1
- package/dist/useWatchUserChange-DyhUYlrN.js.map +1 -0
- package/dist/{useWatchUserChange-Br4Q7syM.d.cts → useWatchUserChange-JMU-vN92.d.ts} +3 -1
- package/dist/{useWatchUserChange-Bf5JKDJJ.d.ts.map → useWatchUserChange-JMU-vN92.d.ts.map} +1 -1
- package/dist/{useWatchUserChange-C1zOvSSU.cjs → useWatchUserChange-jivI5KIB.cjs} +3 -1
- package/dist/useWatchUserChange-jivI5KIB.cjs.map +1 -0
- package/package.json +6 -6
- package/dist/Radios-Bfxy-Vnf.cjs.map +0 -1
- package/dist/Radios-ClBrO7QR.js.map +0 -1
- package/dist/Select-9MyYYGeZ.js.map +0 -1
- package/dist/Select-CdTgOiUU.cjs.map +0 -1
- package/dist/helpers/index.d.cts.map +0 -1
- package/dist/helpers/index.d.ts.map +0 -1
- package/dist/index-CFBmva_r.d.ts +0 -1
- package/dist/index-CNFk4ygb.d.ts +0 -264
- package/dist/index-CNFk4ygb.d.ts.map +0 -1
- package/dist/index-D3o2YTBb.d.ts.map +0 -1
- package/dist/index-D9VXD1rv.d.cts.map +0 -1
- package/dist/index-DCZwOjSs.d.cts.map +0 -1
- package/dist/index-DEtF7ckd.d.ts.map +0 -1
- package/dist/index-DMVoX5pj.d.cts.map +0 -1
- package/dist/index-DtWIiEFa.d.cts.map +0 -1
- package/dist/index-JfAmWj81.d.cts.map +0 -1
- package/dist/index-lQ_hGQ08.d.cts +0 -1
- package/dist/useController-BPDcwfTj.js.map +0 -1
- package/dist/useController-DHRkSHem.cjs.map +0 -1
- package/dist/useFormContext-B2TS6xq0.d.ts.map +0 -1
- package/dist/useFormContext-n3WYgGkW.d.cts.map +0 -1
- package/dist/useWatchUserChange-1ELFYX_F.js.map +0 -1
- package/dist/useWatchUserChange-C1zOvSSU.cjs.map +0 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
const require_FormContext = require('./FormContext-CeFKQmVH.cjs');
|
|
2
2
|
const require_helpers = require('./helpers-CncbgvW_.cjs');
|
|
3
3
|
const require_useFormContext = require('./useFormContext-DJiJlfGJ.cjs');
|
|
4
|
-
const require_useUniformField = require('./useUniformField-
|
|
4
|
+
const require_useUniformField = require('./useUniformField-Dd3AnpgE.cjs');
|
|
5
5
|
let _fuf_stack_pixel_utils = require("@fuf-stack/pixel-utils");
|
|
6
6
|
let react = require("react");
|
|
7
7
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
@@ -71,7 +71,7 @@ const DropdownIndicatorComponent = (props) => {
|
|
|
71
71
|
});
|
|
72
72
|
};
|
|
73
73
|
/** Select component based on [HeroUI Select](https://www.heroui.com//docs/components/select) and [React-Select](https://react-select.com/home) */
|
|
74
|
-
const Select = ({ className = void 0, clearable = true, filterOption = void 0, renderOptionLabel = void 0, inputValue = void 0, loading = false, multiSelect = false, name, onInputChange = void 0, options, placeholder = void 0, ...uniformFieldProps }) => {
|
|
74
|
+
const Select = ({ className = void 0, clearable = true, filterOption = void 0, renderOptionLabel = void 0, inputValue = void 0, loading = false, multiSelect = false, name, onInputChange = void 0, options, placeholder = void 0, selectedOptionFallback = void 0, ...uniformFieldProps }) => {
|
|
75
75
|
const { ariaLabel, disabled, errorMessage, field: { onBlur, onChange, ref, value }, getErrorMessageProps, getHelperWrapperProps, getLabelProps, invalid, label, required, testId } = require_useUniformField.useUniformField({
|
|
76
76
|
name,
|
|
77
77
|
...uniformFieldProps
|
|
@@ -80,6 +80,71 @@ const Select = ({ className = void 0, clearable = true, filterOption = void 0, r
|
|
|
80
80
|
const [isFocused, setIsFocused] = (0, react.useState)(false);
|
|
81
81
|
const { convertToOriginalType } = require_helpers.createOptionValueConverter(options);
|
|
82
82
|
const classNames = (0, _fuf_stack_pixel_utils.variantsToClassNames)(selectVariants(), className, "base");
|
|
83
|
+
const reactSelectClassNames = {
|
|
84
|
+
clearIndicator: () => {
|
|
85
|
+
return classNames.clearIndicator;
|
|
86
|
+
},
|
|
87
|
+
control: () => {
|
|
88
|
+
return (0, _fuf_stack_pixel_utils.cn)(classNames.control, { [classNames.control_focused]: isFocused && !invalid });
|
|
89
|
+
},
|
|
90
|
+
dropdownIndicator: () => {
|
|
91
|
+
return classNames.dropdownIndicator;
|
|
92
|
+
},
|
|
93
|
+
groupHeading: () => {
|
|
94
|
+
return classNames.groupHeading;
|
|
95
|
+
},
|
|
96
|
+
indicatorSeparator: () => {
|
|
97
|
+
return classNames.indicatorSeparator;
|
|
98
|
+
},
|
|
99
|
+
indicatorsContainer: () => {
|
|
100
|
+
return classNames.indicatorsContainer;
|
|
101
|
+
},
|
|
102
|
+
input: () => {
|
|
103
|
+
return classNames.input;
|
|
104
|
+
},
|
|
105
|
+
loadingIndicator: () => {
|
|
106
|
+
return classNames.loadingIndicator;
|
|
107
|
+
},
|
|
108
|
+
loadingMessage: () => {
|
|
109
|
+
return classNames.loadingMessage;
|
|
110
|
+
},
|
|
111
|
+
menu: () => {
|
|
112
|
+
return classNames.menu;
|
|
113
|
+
},
|
|
114
|
+
menuList: () => {
|
|
115
|
+
return classNames.menuList;
|
|
116
|
+
},
|
|
117
|
+
menuPortal: () => {
|
|
118
|
+
return classNames.menuPortal;
|
|
119
|
+
},
|
|
120
|
+
multiValue: () => {
|
|
121
|
+
return classNames.multiValue;
|
|
122
|
+
},
|
|
123
|
+
multiValueLabel: () => {
|
|
124
|
+
return (0, _fuf_stack_pixel_utils.cn)(classNames.multiValueLabel, `${getValueProps().className}`);
|
|
125
|
+
},
|
|
126
|
+
multiValueRemove: () => {
|
|
127
|
+
return classNames.multiValueRemove;
|
|
128
|
+
},
|
|
129
|
+
noOptionsMessage: () => {
|
|
130
|
+
return classNames.noOptionsMessage;
|
|
131
|
+
},
|
|
132
|
+
option: ({ isFocused: optionIsFocused, isSelected: optionIsSelected }) => {
|
|
133
|
+
return (0, _fuf_stack_pixel_utils.cn)(classNames.option, {
|
|
134
|
+
[classNames.option_focused]: optionIsFocused,
|
|
135
|
+
[classNames.option_selected]: optionIsSelected
|
|
136
|
+
});
|
|
137
|
+
},
|
|
138
|
+
placeholder: () => {
|
|
139
|
+
return classNames.placeholder;
|
|
140
|
+
},
|
|
141
|
+
singleValue: () => {
|
|
142
|
+
return (0, _fuf_stack_pixel_utils.cn)(classNames.singleValue, `${getValueProps().className}`);
|
|
143
|
+
},
|
|
144
|
+
valueContainer: () => {
|
|
145
|
+
return classNames.valueContainer;
|
|
146
|
+
}
|
|
147
|
+
};
|
|
83
148
|
const { getBaseProps, getTriggerProps, getValueProps } = (0, _heroui_select.useSelect)({
|
|
84
149
|
children: [],
|
|
85
150
|
classNames,
|
|
@@ -91,6 +156,53 @@ const Select = ({ className = void 0, clearable = true, filterOption = void 0, r
|
|
|
91
156
|
label,
|
|
92
157
|
labelPlacement: "outside"
|
|
93
158
|
});
|
|
159
|
+
const reactSelectValue = (() => {
|
|
160
|
+
const findOption = (v) => {
|
|
161
|
+
const inOptions = options.find((option) => {
|
|
162
|
+
return String(option.value) === String(v);
|
|
163
|
+
});
|
|
164
|
+
if (inOptions) return inOptions;
|
|
165
|
+
if (selectedOptionFallback) {
|
|
166
|
+
if (Array.isArray(selectedOptionFallback)) {
|
|
167
|
+
const inSelected = selectedOptionFallback.find((option) => {
|
|
168
|
+
return String(option.value) === String(v);
|
|
169
|
+
});
|
|
170
|
+
if (inSelected) return inSelected;
|
|
171
|
+
} else if (String(selectedOptionFallback.value) === String(v)) return selectedOptionFallback;
|
|
172
|
+
}
|
|
173
|
+
return {
|
|
174
|
+
isFallback: true,
|
|
175
|
+
label: String(v),
|
|
176
|
+
value: v
|
|
177
|
+
};
|
|
178
|
+
};
|
|
179
|
+
if (multiSelect) {
|
|
180
|
+
if (!Array.isArray(value) || require_helpers.isValueEmpty(value)) return [];
|
|
181
|
+
return value.map((v) => {
|
|
182
|
+
return findOption(v);
|
|
183
|
+
});
|
|
184
|
+
}
|
|
185
|
+
if (require_helpers.isValueEmpty(value)) return null;
|
|
186
|
+
return findOption(value);
|
|
187
|
+
})();
|
|
188
|
+
const handleChange = (option) => {
|
|
189
|
+
if (multiSelect) onChange(option?.map((_option) => {
|
|
190
|
+
return convertToOriginalType(_option.value);
|
|
191
|
+
}));
|
|
192
|
+
else {
|
|
193
|
+
const newValue = option?.value;
|
|
194
|
+
onChange(newValue != null ? convertToOriginalType(newValue) : null);
|
|
195
|
+
}
|
|
196
|
+
const { isTouched: currentIsTouched } = getFieldState(name, testId);
|
|
197
|
+
if (!currentIsTouched) onBlur();
|
|
198
|
+
};
|
|
199
|
+
const handleBlur = () => {
|
|
200
|
+
setIsFocused(false);
|
|
201
|
+
onBlur();
|
|
202
|
+
};
|
|
203
|
+
const handleFocus = () => {
|
|
204
|
+
setIsFocused(true);
|
|
205
|
+
};
|
|
94
206
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
95
207
|
...getBaseProps(),
|
|
96
208
|
className: (0, _fuf_stack_pixel_utils.cn)(classNames.base),
|
|
@@ -111,6 +223,7 @@ const Select = ({ className = void 0, clearable = true, filterOption = void 0, r
|
|
|
111
223
|
"aria-errormessage": "",
|
|
112
224
|
"aria-invalid": invalid,
|
|
113
225
|
"aria-label": ariaLabel,
|
|
226
|
+
classNames: reactSelectClassNames,
|
|
114
227
|
"data-testid": testId,
|
|
115
228
|
filterOption,
|
|
116
229
|
formatOptionLabel: renderOptionLabel,
|
|
@@ -122,102 +235,20 @@ const Select = ({ className = void 0, clearable = true, filterOption = void 0, r
|
|
|
122
235
|
isMulti: multiSelect,
|
|
123
236
|
menuPosition: "fixed",
|
|
124
237
|
name,
|
|
238
|
+
onBlur: handleBlur,
|
|
239
|
+
onChange: handleChange,
|
|
240
|
+
onFocus: handleFocus,
|
|
125
241
|
onInputChange,
|
|
126
242
|
options,
|
|
127
243
|
placeholder,
|
|
244
|
+
value: reactSelectValue,
|
|
128
245
|
"aria-labelledby": label ? getTriggerProps()["aria-labelledby"]?.split(" ")[1] : void 0,
|
|
129
|
-
classNames: {
|
|
130
|
-
control: () => {
|
|
131
|
-
return (0, _fuf_stack_pixel_utils.cn)(classNames.control, { [classNames.control_focused]: isFocused && !invalid });
|
|
132
|
-
},
|
|
133
|
-
clearIndicator: () => {
|
|
134
|
-
return classNames.clearIndicator;
|
|
135
|
-
},
|
|
136
|
-
dropdownIndicator: () => {
|
|
137
|
-
return classNames.dropdownIndicator;
|
|
138
|
-
},
|
|
139
|
-
groupHeading: () => {
|
|
140
|
-
return classNames.groupHeading;
|
|
141
|
-
},
|
|
142
|
-
indicatorsContainer: () => {
|
|
143
|
-
return classNames.indicatorsContainer;
|
|
144
|
-
},
|
|
145
|
-
indicatorSeparator: () => {
|
|
146
|
-
return classNames.indicatorSeparator;
|
|
147
|
-
},
|
|
148
|
-
loadingIndicator: () => {
|
|
149
|
-
return classNames.loadingIndicator;
|
|
150
|
-
},
|
|
151
|
-
loadingMessage: () => {
|
|
152
|
-
return classNames.loadingMessage;
|
|
153
|
-
},
|
|
154
|
-
input: () => {
|
|
155
|
-
return classNames.input;
|
|
156
|
-
},
|
|
157
|
-
menu: () => {
|
|
158
|
-
return classNames.menu;
|
|
159
|
-
},
|
|
160
|
-
menuList: () => {
|
|
161
|
-
return classNames.menuList;
|
|
162
|
-
},
|
|
163
|
-
menuPortal: () => {
|
|
164
|
-
return classNames.menuPortal;
|
|
165
|
-
},
|
|
166
|
-
multiValue: () => {
|
|
167
|
-
return classNames.multiValue;
|
|
168
|
-
},
|
|
169
|
-
multiValueLabel: () => {
|
|
170
|
-
return (0, _fuf_stack_pixel_utils.cn)(classNames.multiValueLabel, `${getValueProps().className}`);
|
|
171
|
-
},
|
|
172
|
-
multiValueRemove: () => {
|
|
173
|
-
return classNames.multiValueRemove;
|
|
174
|
-
},
|
|
175
|
-
noOptionsMessage: () => {
|
|
176
|
-
return classNames.noOptionsMessage;
|
|
177
|
-
},
|
|
178
|
-
option: ({ isFocused: optionIsFocused, isSelected: optionIsSelected }) => {
|
|
179
|
-
return (0, _fuf_stack_pixel_utils.cn)(classNames.option, {
|
|
180
|
-
[classNames.option_focused]: optionIsFocused,
|
|
181
|
-
[classNames.option_selected]: optionIsSelected
|
|
182
|
-
});
|
|
183
|
-
},
|
|
184
|
-
placeholder: () => {
|
|
185
|
-
return classNames.placeholder;
|
|
186
|
-
},
|
|
187
|
-
singleValue: () => {
|
|
188
|
-
return (0, _fuf_stack_pixel_utils.cn)(classNames.singleValue, `${getValueProps().className}`);
|
|
189
|
-
},
|
|
190
|
-
valueContainer: () => {
|
|
191
|
-
return classNames.valueContainer;
|
|
192
|
-
}
|
|
193
|
-
},
|
|
194
246
|
components: {
|
|
195
|
-
|
|
196
|
-
Option: OptionComponent,
|
|
247
|
+
Control: ControlComponent,
|
|
197
248
|
DropdownIndicator: DropdownIndicatorComponent,
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
setIsFocused(false);
|
|
202
|
-
onBlur();
|
|
203
|
-
},
|
|
204
|
-
onChange: (option) => {
|
|
205
|
-
if (multiSelect) onChange(option?.map((_option) => {
|
|
206
|
-
return convertToOriginalType(_option.value);
|
|
207
|
-
}));
|
|
208
|
-
else {
|
|
209
|
-
const selectedValue = option?.value;
|
|
210
|
-
onChange(selectedValue != null ? convertToOriginalType(selectedValue) : selectedValue);
|
|
211
|
-
}
|
|
212
|
-
const { isTouched: currentIsTouched } = getFieldState(name, testId);
|
|
213
|
-
if (!currentIsTouched) onBlur();
|
|
214
|
-
},
|
|
215
|
-
onFocus: (_e) => {
|
|
216
|
-
setIsFocused(true);
|
|
217
|
-
},
|
|
218
|
-
value: options.find((option) => {
|
|
219
|
-
return String(option.value) === String(value);
|
|
220
|
-
})
|
|
249
|
+
Input: InputComponent,
|
|
250
|
+
Option: OptionComponent
|
|
251
|
+
}
|
|
221
252
|
}),
|
|
222
253
|
invalid ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
223
254
|
...getHelperWrapperProps(),
|
|
@@ -248,4 +279,4 @@ Object.defineProperty(exports, 'Select_default$1', {
|
|
|
248
279
|
return Select_default$1;
|
|
249
280
|
}
|
|
250
281
|
});
|
|
251
|
-
//# sourceMappingURL=Select-
|
|
282
|
+
//# sourceMappingURL=Select-CTbXrAjL.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Select-CTbXrAjL.cjs","names":["components","useUniformField","useFormContext","createOptionValueConverter","isValueEmpty","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 { MultiValue, Props, SingleValue } 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 { createOptionValueConverter, isValueEmpty } from '../helpers';\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 /**\n * True when option was auto-generated because the value wasn't found in options.\n * Use in renderOptionLabel to render a component that fetches the real label.\n */\n isFallback?: boolean;\n /** option label */\n label?: ReactNode;\n /** option value */\n value: string | number;\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 /**\n * Fallback option(s) for async selects when value isn't in current options.\n * Use when the selected value may not be in the options list (e.g., after\n * search results change). Used only if value not found in options.\n * For single select: pass the option object or undefined\n * For multi-select: pass an array of option objects\n */\n selectedOptionFallback?: SelectOption | SelectOption[];\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(String(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 selectedOptionFallback = 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 // Create converter to preserve number types for option values\n const { convertToOriginalType } = createOptionValueConverter(options);\n\n // classNames from slots\n const variants = selectVariants();\n const classNames = variantsToClassNames(variants, className, 'base');\n\n // React-select classNames configuration\n const reactSelectClassNames = {\n clearIndicator: () => {\n return classNames.clearIndicator;\n },\n control: () => {\n return cn(classNames.control, {\n [classNames.control_focused]: isFocused && !invalid,\n });\n },\n dropdownIndicator: () => {\n return classNames.dropdownIndicator;\n },\n groupHeading: () => {\n return classNames.groupHeading;\n },\n indicatorSeparator: () => {\n return classNames.indicatorSeparator;\n },\n indicatorsContainer: () => {\n return classNames.indicatorsContainer;\n },\n input: () => {\n return classNames.input;\n },\n loadingIndicator: () => {\n return classNames.loadingIndicator;\n },\n loadingMessage: () => {\n return classNames.loadingMessage;\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(classNames.multiValueLabel, `${getValueProps().className}`);\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 isFocused: boolean;\n isSelected: boolean;\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\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 // Compute selected option(s) for react-select\n //\n // Priority for finding options:\n // 1. Look in current options list\n // 2. Use selectedOptionFallback prop (for async selects with pre-fetched data)\n // 3. Create fallback with value as label\n //\n // Handles edge cases:\n // - Compares as strings to support both string and number values\n // - Returns null for empty single-select (required by react-select to clear)\n // - Creates fallback options when value exists but isn't in options list\n // (common with async selects where options change after selection)\n const reactSelectValue = (() => {\n // Helper to find option by value\n const findOption = (v: string | number): SelectOption => {\n // First, look in options list\n const inOptions = options.find((option) => {\n return String(option.value) === String(v);\n });\n if (inOptions) {\n return inOptions;\n }\n\n // Second, look in selectedOptionFallback prop (for async selects)\n if (selectedOptionFallback) {\n if (Array.isArray(selectedOptionFallback)) {\n const inSelected = selectedOptionFallback.find((option) => {\n return String(option.value) === String(v);\n });\n if (inSelected) {\n return inSelected;\n }\n } else if (String(selectedOptionFallback.value) === String(v)) {\n return selectedOptionFallback;\n }\n }\n\n // Fallback: create option with value as label, marked as fallback\n return { isFallback: true, label: String(v), value: v };\n };\n\n if (multiSelect) {\n if (!Array.isArray(value) || isValueEmpty(value)) {\n return [];\n }\n return value.map((v) => {\n return findOption(v);\n });\n }\n\n // Single select - use isValueEmpty to handle marker strings (__NULL__, etc.)\n if (isValueEmpty(value)) {\n return null;\n }\n return findOption(value);\n })();\n\n // Handle selection change\n const handleChange = (\n option: MultiValue<SelectOption> | SingleValue<SelectOption>,\n ) => {\n if (multiSelect) {\n onChange(\n (option as SelectOption[])?.map((_option) => {\n return convertToOriginalType(_option.value);\n }),\n );\n } else {\n const newValue = (option as SelectOption)?.value;\n // Pass null explicitly when clearing (not undefined)\n onChange(newValue != null ? convertToOriginalType(newValue) : null);\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\n // Handle blur event\n const handleBlur = () => {\n setIsFocused(false);\n onBlur();\n };\n\n // Handle focus event\n const handleFocus = () => {\n setIsFocused(true);\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 // set aria-labelledby to the label id so that the select is accessible\n aria-label={ariaLabel}\n classNames={reactSelectClassNames}\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 onBlur={handleBlur}\n onChange={handleChange}\n onFocus={handleFocus}\n onInputChange={onInputChange}\n options={options}\n placeholder={placeholder}\n value={reactSelectValue}\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 components={{\n Control: ControlComponent,\n DropdownIndicator: DropdownIndicatorComponent,\n Input: InputComponent,\n Option: OptionComponent,\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":";;;;;;;;;;;;AAeA,MAAa,gDAAoB,EAC/B,OAAO;CACL,MAAM;CACN,gBACE;CACF,SACE;CACF,iBAAiB;CACjB,WAAW;CACX,aAAa;CACb,mBACE;CACF,OAAO;CACP,cAAc;CACd,qBAAqB;CACrB,oBAAoB;CACpB,OAAO;CAGP,OACE;CACF,kBAAkB;CAClB,gBAAgB;CAChB,MAAM;CACN,UAAU;CAGV,YAAY;CACZ,YAAY;CACZ,qBAAqB;CACrB,iBAAiB;CACjB,kBACE;CACF,kBAAkB;CAClB,gBAAgB;CAChB,iBAAiB;CACjB,QAAQ;CACR,aAAa;CACb,iBAAiB;CACjB,aAAa;CACb,gBAAgB;CACjB,EACF,CAAC;AA4DF,MAAM,kBAA2C,UAAU;CAGzD,MAAM,SAAS,GAAG,MAAM,YAAY;AAEpC,QAAO,2CAACA,wBAAW;EAAM,eAAa;EAAQ,GAAI;GAAS;;AAG7D,MAAM,oBAA+C,UAAU;CAG7D,MAAM,SAAS,GAAG,MAAM,YAAY,eAAe;AACnD,QACE,2CAAC;EAAI,eAAa;YAEhB,2CAACA,wBAAW,WAAQ,GAAI,QAAS;GAC7B;;AAIV,MAAM,mBAA6C,UAAU;CAG3D,MAAM,SAAS,GAAG,MAAM,YAAY,eAAe,qDAAyB,OAAO,OAAO,MAAM,UAAU,OAAO,MAAM,MAAM,EAAE,EAAE,aAAa,MAAM,CAAC;AACrJ,QACE,2CAAC;EAAI,eAAa;YAEhB,2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KAAK,YAAY;AAC3C,UAAO,sBAAsB,QAAQ,MAAM;IAC3C,CACH;OACI;GACL,MAAM,WAAY,QAAyB;AAE3C,YAAS,YAAY,OAAO,sBAAsB,SAAS,GAAG,KAAK;;EAMrE,MAAM,EAAE,WAAW,qBAAqB,cAAc,MAAM,OAAO;AACnE,MAAI,CAAC,iBACH,SAAQ;;CAKZ,MAAM,mBAAmB;AACvB,eAAa,MAAM;AACnB,UAAQ;;CAIV,MAAM,oBAAoB;AACxB,eAAa,KAAK;;AAGpB,QACE,4CAAC;EACC,GAAI,cAAc;EAClB,0CAAc,WAAW,KAAK;EAG9B,iBAAe;EACf,eAAa,GAAG,OAAO;;GAEtB,QACC,2CAAC;IACC,WAAW,WAAW;IACtB,aAAU;IACV,SAAS,gBAAgB,KAAK;IAC9B,IAAI,eAAe,CAAC;cAEnB;KACK,GACN;GACJ,2CAACC;IACM;IACL;IACA;IACA,qBAAkB;IAClB,gBAAc;IAEd,cAAY;IACZ,YAAY;IAEZ,eAAa;IACC;IACd,mBAAmB;IACP;IACZ,YAAY;IACZ,aAAa;IACb,YAAY;IACZ,WAAW;IACX,SAAS;IAIT,cAAa;IACP;IACN,QAAQ;IACR,UAAU;IACV,SAAS;IACM;IACN;IACI;IACb,OAAO;IAEP,mBACE,QACI,iBAAiB,CAAC,oBAAoB,MAAM,IAAI,CAAC,KACjD;IAEN,YAAY;KACV,SAAS;KACT,mBAAmB;KACnB,OAAO;KACP,QAAQ;KACT;KACD;GACD,UACC,2CAAC;IAAI,GAAI,uBAAuB;cAC9B,2CAAC;KAAI,GAAI,sBAAsB;eAAG;MAAmB;KACjD,GACJ;;GACA;;AAIV,uBAAe;;;;ACvcf,qBAAeC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { c as createOptionValueConverter } from "./helpers-D3A5d3M1.js";
|
|
1
|
+
import { c as createOptionValueConverter, r as isValueEmpty } from "./helpers-D3A5d3M1.js";
|
|
2
2
|
import { n as useFormContext } from "./useFormContext-UFBqUfOr.js";
|
|
3
|
-
import { t as useUniformField } from "./useUniformField-
|
|
3
|
+
import { t as useUniformField } from "./useUniformField-C6oSAFa3.js";
|
|
4
4
|
import { cn, slugify, tv, variantsToClassNames } from "@fuf-stack/pixel-utils";
|
|
5
5
|
import { useState } from "react";
|
|
6
6
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -69,7 +69,7 @@ const DropdownIndicatorComponent = (props) => {
|
|
|
69
69
|
});
|
|
70
70
|
};
|
|
71
71
|
/** Select component based on [HeroUI Select](https://www.heroui.com//docs/components/select) and [React-Select](https://react-select.com/home) */
|
|
72
|
-
const Select = ({ className = void 0, clearable = true, filterOption = void 0, renderOptionLabel = void 0, inputValue = void 0, loading = false, multiSelect = false, name, onInputChange = void 0, options, placeholder = void 0, ...uniformFieldProps }) => {
|
|
72
|
+
const Select = ({ className = void 0, clearable = true, filterOption = void 0, renderOptionLabel = void 0, inputValue = void 0, loading = false, multiSelect = false, name, onInputChange = void 0, options, placeholder = void 0, selectedOptionFallback = void 0, ...uniformFieldProps }) => {
|
|
73
73
|
const { ariaLabel, disabled, errorMessage, field: { onBlur, onChange, ref, value }, getErrorMessageProps, getHelperWrapperProps, getLabelProps, invalid, label, required, testId } = useUniformField({
|
|
74
74
|
name,
|
|
75
75
|
...uniformFieldProps
|
|
@@ -78,6 +78,71 @@ const Select = ({ className = void 0, clearable = true, filterOption = void 0, r
|
|
|
78
78
|
const [isFocused, setIsFocused] = useState(false);
|
|
79
79
|
const { convertToOriginalType } = createOptionValueConverter(options);
|
|
80
80
|
const classNames = variantsToClassNames(selectVariants(), className, "base");
|
|
81
|
+
const reactSelectClassNames = {
|
|
82
|
+
clearIndicator: () => {
|
|
83
|
+
return classNames.clearIndicator;
|
|
84
|
+
},
|
|
85
|
+
control: () => {
|
|
86
|
+
return cn(classNames.control, { [classNames.control_focused]: isFocused && !invalid });
|
|
87
|
+
},
|
|
88
|
+
dropdownIndicator: () => {
|
|
89
|
+
return classNames.dropdownIndicator;
|
|
90
|
+
},
|
|
91
|
+
groupHeading: () => {
|
|
92
|
+
return classNames.groupHeading;
|
|
93
|
+
},
|
|
94
|
+
indicatorSeparator: () => {
|
|
95
|
+
return classNames.indicatorSeparator;
|
|
96
|
+
},
|
|
97
|
+
indicatorsContainer: () => {
|
|
98
|
+
return classNames.indicatorsContainer;
|
|
99
|
+
},
|
|
100
|
+
input: () => {
|
|
101
|
+
return classNames.input;
|
|
102
|
+
},
|
|
103
|
+
loadingIndicator: () => {
|
|
104
|
+
return classNames.loadingIndicator;
|
|
105
|
+
},
|
|
106
|
+
loadingMessage: () => {
|
|
107
|
+
return classNames.loadingMessage;
|
|
108
|
+
},
|
|
109
|
+
menu: () => {
|
|
110
|
+
return classNames.menu;
|
|
111
|
+
},
|
|
112
|
+
menuList: () => {
|
|
113
|
+
return classNames.menuList;
|
|
114
|
+
},
|
|
115
|
+
menuPortal: () => {
|
|
116
|
+
return classNames.menuPortal;
|
|
117
|
+
},
|
|
118
|
+
multiValue: () => {
|
|
119
|
+
return classNames.multiValue;
|
|
120
|
+
},
|
|
121
|
+
multiValueLabel: () => {
|
|
122
|
+
return cn(classNames.multiValueLabel, `${getValueProps().className}`);
|
|
123
|
+
},
|
|
124
|
+
multiValueRemove: () => {
|
|
125
|
+
return classNames.multiValueRemove;
|
|
126
|
+
},
|
|
127
|
+
noOptionsMessage: () => {
|
|
128
|
+
return classNames.noOptionsMessage;
|
|
129
|
+
},
|
|
130
|
+
option: ({ isFocused: optionIsFocused, isSelected: optionIsSelected }) => {
|
|
131
|
+
return cn(classNames.option, {
|
|
132
|
+
[classNames.option_focused]: optionIsFocused,
|
|
133
|
+
[classNames.option_selected]: optionIsSelected
|
|
134
|
+
});
|
|
135
|
+
},
|
|
136
|
+
placeholder: () => {
|
|
137
|
+
return classNames.placeholder;
|
|
138
|
+
},
|
|
139
|
+
singleValue: () => {
|
|
140
|
+
return cn(classNames.singleValue, `${getValueProps().className}`);
|
|
141
|
+
},
|
|
142
|
+
valueContainer: () => {
|
|
143
|
+
return classNames.valueContainer;
|
|
144
|
+
}
|
|
145
|
+
};
|
|
81
146
|
const { getBaseProps, getTriggerProps, getValueProps } = useSelect({
|
|
82
147
|
children: [],
|
|
83
148
|
classNames,
|
|
@@ -89,6 +154,53 @@ const Select = ({ className = void 0, clearable = true, filterOption = void 0, r
|
|
|
89
154
|
label,
|
|
90
155
|
labelPlacement: "outside"
|
|
91
156
|
});
|
|
157
|
+
const reactSelectValue = (() => {
|
|
158
|
+
const findOption = (v) => {
|
|
159
|
+
const inOptions = options.find((option) => {
|
|
160
|
+
return String(option.value) === String(v);
|
|
161
|
+
});
|
|
162
|
+
if (inOptions) return inOptions;
|
|
163
|
+
if (selectedOptionFallback) {
|
|
164
|
+
if (Array.isArray(selectedOptionFallback)) {
|
|
165
|
+
const inSelected = selectedOptionFallback.find((option) => {
|
|
166
|
+
return String(option.value) === String(v);
|
|
167
|
+
});
|
|
168
|
+
if (inSelected) return inSelected;
|
|
169
|
+
} else if (String(selectedOptionFallback.value) === String(v)) return selectedOptionFallback;
|
|
170
|
+
}
|
|
171
|
+
return {
|
|
172
|
+
isFallback: true,
|
|
173
|
+
label: String(v),
|
|
174
|
+
value: v
|
|
175
|
+
};
|
|
176
|
+
};
|
|
177
|
+
if (multiSelect) {
|
|
178
|
+
if (!Array.isArray(value) || isValueEmpty(value)) return [];
|
|
179
|
+
return value.map((v) => {
|
|
180
|
+
return findOption(v);
|
|
181
|
+
});
|
|
182
|
+
}
|
|
183
|
+
if (isValueEmpty(value)) return null;
|
|
184
|
+
return findOption(value);
|
|
185
|
+
})();
|
|
186
|
+
const handleChange = (option) => {
|
|
187
|
+
if (multiSelect) onChange(option?.map((_option) => {
|
|
188
|
+
return convertToOriginalType(_option.value);
|
|
189
|
+
}));
|
|
190
|
+
else {
|
|
191
|
+
const newValue = option?.value;
|
|
192
|
+
onChange(newValue != null ? convertToOriginalType(newValue) : null);
|
|
193
|
+
}
|
|
194
|
+
const { isTouched: currentIsTouched } = getFieldState(name, testId);
|
|
195
|
+
if (!currentIsTouched) onBlur();
|
|
196
|
+
};
|
|
197
|
+
const handleBlur = () => {
|
|
198
|
+
setIsFocused(false);
|
|
199
|
+
onBlur();
|
|
200
|
+
};
|
|
201
|
+
const handleFocus = () => {
|
|
202
|
+
setIsFocused(true);
|
|
203
|
+
};
|
|
92
204
|
return /* @__PURE__ */ jsxs("div", {
|
|
93
205
|
...getBaseProps(),
|
|
94
206
|
className: cn(classNames.base),
|
|
@@ -109,6 +221,7 @@ const Select = ({ className = void 0, clearable = true, filterOption = void 0, r
|
|
|
109
221
|
"aria-errormessage": "",
|
|
110
222
|
"aria-invalid": invalid,
|
|
111
223
|
"aria-label": ariaLabel,
|
|
224
|
+
classNames: reactSelectClassNames,
|
|
112
225
|
"data-testid": testId,
|
|
113
226
|
filterOption,
|
|
114
227
|
formatOptionLabel: renderOptionLabel,
|
|
@@ -120,102 +233,20 @@ const Select = ({ className = void 0, clearable = true, filterOption = void 0, r
|
|
|
120
233
|
isMulti: multiSelect,
|
|
121
234
|
menuPosition: "fixed",
|
|
122
235
|
name,
|
|
236
|
+
onBlur: handleBlur,
|
|
237
|
+
onChange: handleChange,
|
|
238
|
+
onFocus: handleFocus,
|
|
123
239
|
onInputChange,
|
|
124
240
|
options,
|
|
125
241
|
placeholder,
|
|
242
|
+
value: reactSelectValue,
|
|
126
243
|
"aria-labelledby": label ? getTriggerProps()["aria-labelledby"]?.split(" ")[1] : void 0,
|
|
127
|
-
classNames: {
|
|
128
|
-
control: () => {
|
|
129
|
-
return cn(classNames.control, { [classNames.control_focused]: isFocused && !invalid });
|
|
130
|
-
},
|
|
131
|
-
clearIndicator: () => {
|
|
132
|
-
return classNames.clearIndicator;
|
|
133
|
-
},
|
|
134
|
-
dropdownIndicator: () => {
|
|
135
|
-
return classNames.dropdownIndicator;
|
|
136
|
-
},
|
|
137
|
-
groupHeading: () => {
|
|
138
|
-
return classNames.groupHeading;
|
|
139
|
-
},
|
|
140
|
-
indicatorsContainer: () => {
|
|
141
|
-
return classNames.indicatorsContainer;
|
|
142
|
-
},
|
|
143
|
-
indicatorSeparator: () => {
|
|
144
|
-
return classNames.indicatorSeparator;
|
|
145
|
-
},
|
|
146
|
-
loadingIndicator: () => {
|
|
147
|
-
return classNames.loadingIndicator;
|
|
148
|
-
},
|
|
149
|
-
loadingMessage: () => {
|
|
150
|
-
return classNames.loadingMessage;
|
|
151
|
-
},
|
|
152
|
-
input: () => {
|
|
153
|
-
return classNames.input;
|
|
154
|
-
},
|
|
155
|
-
menu: () => {
|
|
156
|
-
return classNames.menu;
|
|
157
|
-
},
|
|
158
|
-
menuList: () => {
|
|
159
|
-
return classNames.menuList;
|
|
160
|
-
},
|
|
161
|
-
menuPortal: () => {
|
|
162
|
-
return classNames.menuPortal;
|
|
163
|
-
},
|
|
164
|
-
multiValue: () => {
|
|
165
|
-
return classNames.multiValue;
|
|
166
|
-
},
|
|
167
|
-
multiValueLabel: () => {
|
|
168
|
-
return cn(classNames.multiValueLabel, `${getValueProps().className}`);
|
|
169
|
-
},
|
|
170
|
-
multiValueRemove: () => {
|
|
171
|
-
return classNames.multiValueRemove;
|
|
172
|
-
},
|
|
173
|
-
noOptionsMessage: () => {
|
|
174
|
-
return classNames.noOptionsMessage;
|
|
175
|
-
},
|
|
176
|
-
option: ({ isFocused: optionIsFocused, isSelected: optionIsSelected }) => {
|
|
177
|
-
return cn(classNames.option, {
|
|
178
|
-
[classNames.option_focused]: optionIsFocused,
|
|
179
|
-
[classNames.option_selected]: optionIsSelected
|
|
180
|
-
});
|
|
181
|
-
},
|
|
182
|
-
placeholder: () => {
|
|
183
|
-
return classNames.placeholder;
|
|
184
|
-
},
|
|
185
|
-
singleValue: () => {
|
|
186
|
-
return cn(classNames.singleValue, `${getValueProps().className}`);
|
|
187
|
-
},
|
|
188
|
-
valueContainer: () => {
|
|
189
|
-
return classNames.valueContainer;
|
|
190
|
-
}
|
|
191
|
-
},
|
|
192
244
|
components: {
|
|
193
|
-
|
|
194
|
-
Option: OptionComponent,
|
|
245
|
+
Control: ControlComponent,
|
|
195
246
|
DropdownIndicator: DropdownIndicatorComponent,
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
setIsFocused(false);
|
|
200
|
-
onBlur();
|
|
201
|
-
},
|
|
202
|
-
onChange: (option) => {
|
|
203
|
-
if (multiSelect) onChange(option?.map((_option) => {
|
|
204
|
-
return convertToOriginalType(_option.value);
|
|
205
|
-
}));
|
|
206
|
-
else {
|
|
207
|
-
const selectedValue = option?.value;
|
|
208
|
-
onChange(selectedValue != null ? convertToOriginalType(selectedValue) : selectedValue);
|
|
209
|
-
}
|
|
210
|
-
const { isTouched: currentIsTouched } = getFieldState(name, testId);
|
|
211
|
-
if (!currentIsTouched) onBlur();
|
|
212
|
-
},
|
|
213
|
-
onFocus: (_e) => {
|
|
214
|
-
setIsFocused(true);
|
|
215
|
-
},
|
|
216
|
-
value: options.find((option) => {
|
|
217
|
-
return String(option.value) === String(value);
|
|
218
|
-
})
|
|
247
|
+
Input: InputComponent,
|
|
248
|
+
Option: OptionComponent
|
|
249
|
+
}
|
|
219
250
|
}),
|
|
220
251
|
invalid ? /* @__PURE__ */ jsx("div", {
|
|
221
252
|
...getHelperWrapperProps(),
|
|
@@ -235,4 +266,4 @@ var Select_default = Select_default$1;
|
|
|
235
266
|
|
|
236
267
|
//#endregion
|
|
237
268
|
export { Select_default$1 as n, Select_default as t };
|
|
238
|
-
//# sourceMappingURL=Select-
|
|
269
|
+
//# sourceMappingURL=Select-Dk_K_Q0F.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Select-Dk_K_Q0F.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 { MultiValue, Props, SingleValue } 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 { createOptionValueConverter, isValueEmpty } from '../helpers';\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 /**\n * True when option was auto-generated because the value wasn't found in options.\n * Use in renderOptionLabel to render a component that fetches the real label.\n */\n isFallback?: boolean;\n /** option label */\n label?: ReactNode;\n /** option value */\n value: string | number;\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 /**\n * Fallback option(s) for async selects when value isn't in current options.\n * Use when the selected value may not be in the options list (e.g., after\n * search results change). Used only if value not found in options.\n * For single select: pass the option object or undefined\n * For multi-select: pass an array of option objects\n */\n selectedOptionFallback?: SelectOption | SelectOption[];\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(String(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 selectedOptionFallback = 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 // Create converter to preserve number types for option values\n const { convertToOriginalType } = createOptionValueConverter(options);\n\n // classNames from slots\n const variants = selectVariants();\n const classNames = variantsToClassNames(variants, className, 'base');\n\n // React-select classNames configuration\n const reactSelectClassNames = {\n clearIndicator: () => {\n return classNames.clearIndicator;\n },\n control: () => {\n return cn(classNames.control, {\n [classNames.control_focused]: isFocused && !invalid,\n });\n },\n dropdownIndicator: () => {\n return classNames.dropdownIndicator;\n },\n groupHeading: () => {\n return classNames.groupHeading;\n },\n indicatorSeparator: () => {\n return classNames.indicatorSeparator;\n },\n indicatorsContainer: () => {\n return classNames.indicatorsContainer;\n },\n input: () => {\n return classNames.input;\n },\n loadingIndicator: () => {\n return classNames.loadingIndicator;\n },\n loadingMessage: () => {\n return classNames.loadingMessage;\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(classNames.multiValueLabel, `${getValueProps().className}`);\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 isFocused: boolean;\n isSelected: boolean;\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\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 // Compute selected option(s) for react-select\n //\n // Priority for finding options:\n // 1. Look in current options list\n // 2. Use selectedOptionFallback prop (for async selects with pre-fetched data)\n // 3. Create fallback with value as label\n //\n // Handles edge cases:\n // - Compares as strings to support both string and number values\n // - Returns null for empty single-select (required by react-select to clear)\n // - Creates fallback options when value exists but isn't in options list\n // (common with async selects where options change after selection)\n const reactSelectValue = (() => {\n // Helper to find option by value\n const findOption = (v: string | number): SelectOption => {\n // First, look in options list\n const inOptions = options.find((option) => {\n return String(option.value) === String(v);\n });\n if (inOptions) {\n return inOptions;\n }\n\n // Second, look in selectedOptionFallback prop (for async selects)\n if (selectedOptionFallback) {\n if (Array.isArray(selectedOptionFallback)) {\n const inSelected = selectedOptionFallback.find((option) => {\n return String(option.value) === String(v);\n });\n if (inSelected) {\n return inSelected;\n }\n } else if (String(selectedOptionFallback.value) === String(v)) {\n return selectedOptionFallback;\n }\n }\n\n // Fallback: create option with value as label, marked as fallback\n return { isFallback: true, label: String(v), value: v };\n };\n\n if (multiSelect) {\n if (!Array.isArray(value) || isValueEmpty(value)) {\n return [];\n }\n return value.map((v) => {\n return findOption(v);\n });\n }\n\n // Single select - use isValueEmpty to handle marker strings (__NULL__, etc.)\n if (isValueEmpty(value)) {\n return null;\n }\n return findOption(value);\n })();\n\n // Handle selection change\n const handleChange = (\n option: MultiValue<SelectOption> | SingleValue<SelectOption>,\n ) => {\n if (multiSelect) {\n onChange(\n (option as SelectOption[])?.map((_option) => {\n return convertToOriginalType(_option.value);\n }),\n );\n } else {\n const newValue = (option as SelectOption)?.value;\n // Pass null explicitly when clearing (not undefined)\n onChange(newValue != null ? convertToOriginalType(newValue) : null);\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\n // Handle blur event\n const handleBlur = () => {\n setIsFocused(false);\n onBlur();\n };\n\n // Handle focus event\n const handleFocus = () => {\n setIsFocused(true);\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 // set aria-labelledby to the label id so that the select is accessible\n aria-label={ariaLabel}\n classNames={reactSelectClassNames}\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 onBlur={handleBlur}\n onChange={handleChange}\n onFocus={handleFocus}\n onInputChange={onInputChange}\n options={options}\n placeholder={placeholder}\n value={reactSelectValue}\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 components={{\n Control: ControlComponent,\n DropdownIndicator: DropdownIndicatorComponent,\n Input: InputComponent,\n Option: OptionComponent,\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":";;;;;;;;;;AAeA,MAAa,iBAAiB,GAAG,EAC/B,OAAO;CACL,MAAM;CACN,gBACE;CACF,SACE;CACF,iBAAiB;CACjB,WAAW;CACX,aAAa;CACb,mBACE;CACF,OAAO;CACP,cAAc;CACd,qBAAqB;CACrB,oBAAoB;CACpB,OAAO;CAGP,OACE;CACF,kBAAkB;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AAe,CAAC;cAEnB;KACK,GACN;GACJ,oBAAC;IACM;IACL;IACA;IACA,qBAAkB;IAClB,gBAAc;IAEd,cAAY;IACZ,YAAY;IAEZ,eAAa;IACC;IACd,mBAAmB;IACP;IACZ,YAAY;IACZ,aAAa;IACb,YAAY;IACZ,WAAW;IACX,SAAS;IAIT,cAAa;IACP;IACN,QAAQ;IACR,UAAU;IACV,SAAS;IACM;IACN;IACI;IACb,OAAO;IAEP,mBACE,QACI,iBAAiB,CAAC,oBAAoB,MAAM,IAAI,CAAC,KACjD;IAEN,YAAY;KACV,SAAS;KACT,mBAAmB;KACnB,OAAO;KACP,QAAQ;KACT;KACD;GACD,UACC,oBAAC;IAAI,GAAI,uBAAuB;cAC9B,oBAAC;KAAI,GAAI,sBAAsB;eAAG;MAAmB;KACjD,GACJ;;GACA;;AAIV,uBAAe;;;;ACvcf,qBAAeA"}
|
package/dist/Slider/index.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
2
|
-
const require_Slider = require('../Slider-
|
|
2
|
+
const require_Slider = require('../Slider-ChGkOSJJ.cjs');
|
|
3
3
|
|
|
4
4
|
exports.Slider = require_Slider.Slider_default$1;
|
|
5
5
|
exports.default = require_Slider.Slider_default;
|
package/dist/Slider/index.d.cts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as SliderProps, t as Slider } from "../index-
|
|
1
|
+
import { n as SliderProps, t as Slider } from "../index-BapBrgmV.cjs";
|
|
2
2
|
export { Slider, Slider as default, SliderProps };
|
package/dist/Slider/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as SliderProps, t as Slider } from "../index-
|
|
1
|
+
import { n as SliderProps, t as Slider } from "../index-RiAo6yCB.js";
|
|
2
2
|
export { Slider, Slider as default, SliderProps };
|
package/dist/Slider/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const require_FormContext = require('./FormContext-CeFKQmVH.cjs');
|
|
2
|
-
const require_useUniformField = require('./useUniformField-
|
|
2
|
+
const require_useUniformField = require('./useUniformField-Dd3AnpgE.cjs');
|
|
3
3
|
let _fuf_stack_pixel_utils = require("@fuf-stack/pixel-utils");
|
|
4
4
|
let react = require("react");
|
|
5
5
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
@@ -120,4 +120,4 @@ Object.defineProperty(exports, 'Slider_default$1', {
|
|
|
120
120
|
return Slider_default$1;
|
|
121
121
|
}
|
|
122
122
|
});
|
|
123
|
-
//# sourceMappingURL=Slider-
|
|
123
|
+
//# sourceMappingURL=Slider-ChGkOSJJ.cjs.map
|