@commercetools/nimbus 0.0.9-rc7 → 0.0.9-rc8
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/chunks/{Button-Dtn-lV5G.js → Button-BxcMDv2N.js} +7 -7
- package/dist/chunks/{Button-Dtn-lV5G.js.map → Button-BxcMDv2N.js.map} +1 -1
- package/dist/chunks/{Button-DOBmPkg6.js → Button-tPOlfQRd.js} +2 -2
- package/dist/chunks/{Button-DOBmPkg6.js.map → Button-tPOlfQRd.js.map} +1 -1
- package/dist/chunks/{DateField-C2G53tNO.js → DateField-CaR3Qeda.js} +24 -24
- package/dist/chunks/{DateField-C2G53tNO.js.map → DateField-CaR3Qeda.js.map} +1 -1
- package/dist/chunks/{DateField-D0hZjHMU.js → DateField-D3h6vCMK.js} +2 -2
- package/dist/chunks/{DateField-D0hZjHMU.js.map → DateField-D3h6vCMK.js.map} +1 -1
- package/dist/chunks/{Dialog-CFCn7n-k.js → Dialog-5VrXdl86.js} +2 -2
- package/dist/chunks/{Dialog-CFCn7n-k.js.map → Dialog-5VrXdl86.js.map} +1 -1
- package/dist/chunks/{Dialog-DsJ3jo2g.js → Dialog-DJv-Zg_L.js} +18 -18
- package/dist/chunks/{Dialog-DsJ3jo2g.js.map → Dialog-DJv-Zg_L.js.map} +1 -1
- package/dist/chunks/{FocusScope-B6O_mZ9T.js → FocusScope-CsXy0kJw.js} +6 -6
- package/dist/chunks/{FocusScope-B6O_mZ9T.js.map → FocusScope-CsXy0kJw.js.map} +1 -1
- package/dist/chunks/{FocusScope-Dz6kDOQY.js → FocusScope-Cysx7oI0.js} +2 -2
- package/dist/chunks/{FocusScope-Dz6kDOQY.js.map → FocusScope-Cysx7oI0.js.map} +1 -1
- package/dist/chunks/{Group-DR52Cv_h.js → Group-CTpcJZmt.js} +2 -2
- package/dist/chunks/{Group-DR52Cv_h.js.map → Group-CTpcJZmt.js.map} +1 -1
- package/dist/chunks/{Group-BMf2x0bV.js → Group-D3CaEDfr.js} +6 -6
- package/dist/chunks/{Group-BMf2x0bV.js.map → Group-D3CaEDfr.js.map} +1 -1
- package/dist/chunks/Hidden-CNJIJ63M.js +2 -0
- package/dist/chunks/{Hidden-BxRZGdEW.js.map → Hidden-CNJIJ63M.js.map} +1 -1
- package/dist/chunks/{Hidden-D6Lfpu1U.js → Hidden-CeBYiBUb.js} +1 -8
- package/dist/chunks/{Hidden-D6Lfpu1U.js.map → Hidden-CeBYiBUb.js.map} +1 -1
- package/dist/chunks/{Input-C6fX3A5E.js → Input-0vJb_5Js.js} +6 -6
- package/dist/chunks/{Input-C6fX3A5E.js.map → Input-0vJb_5Js.js.map} +1 -1
- package/dist/chunks/{Input-CRt1BJ4n.js → Input-rMOtwpe-.js} +2 -2
- package/dist/chunks/{Input-CRt1BJ4n.js.map → Input-rMOtwpe-.js.map} +1 -1
- package/dist/chunks/ListBox-Dmkou3Hm.js +18 -0
- package/dist/chunks/ListBox-Dmkou3Hm.js.map +1 -0
- package/dist/chunks/{ListBox-DH3lufv2.js → ListBox-Dss9OMcn.js} +676 -743
- package/dist/chunks/ListBox-Dss9OMcn.js.map +1 -0
- package/dist/chunks/{OverlayArrow-DsxKFiKE.js → OverlayArrow-Bs2caVoG.js} +2 -2
- package/dist/chunks/{OverlayArrow-DsxKFiKE.js.map → OverlayArrow-Bs2caVoG.js.map} +1 -1
- package/dist/chunks/{OverlayArrow-B1kv2W8j.js → OverlayArrow-qjQZbu8u.js} +4 -4
- package/dist/chunks/{OverlayArrow-B1kv2W8j.js.map → OverlayArrow-qjQZbu8u.js.map} +1 -1
- package/dist/chunks/RSPContexts-AkhSBHGO.js +6 -0
- package/dist/chunks/{RSPContexts-CxXY5Uko.js.map → RSPContexts-AkhSBHGO.js.map} +1 -1
- package/dist/chunks/RSPContexts-CIAIlAKH.js +2 -0
- package/dist/chunks/{RSPContexts-qzadeFSO.js.map → RSPContexts-CIAIlAKH.js.map} +1 -1
- package/dist/chunks/{SSRProvider-D8lZ0o6A.js → SSRProvider-eIEwc-2s.js} +2 -2
- package/dist/chunks/{SSRProvider-D8lZ0o6A.js.map → SSRProvider-eIEwc-2s.js.map} +1 -1
- package/dist/chunks/{TextArea-Ud71sffr.js → TextArea-BfVV0_3h.js} +2 -2
- package/dist/chunks/{TextArea-Ud71sffr.js.map → TextArea-BfVV0_3h.js.map} +1 -1
- package/dist/chunks/{TextArea-D-S_3q08.js → TextArea-Q-NI2yW5.js} +5 -5
- package/dist/chunks/{TextArea-D-S_3q08.js.map → TextArea-Q-NI2yW5.js.map} +1 -1
- package/dist/chunks/{VisuallyHidden-BpUTcba_.js → VisuallyHidden-2REhp9RT.js} +3 -3
- package/dist/chunks/{VisuallyHidden-BpUTcba_.js.map → VisuallyHidden-2REhp9RT.js.map} +1 -1
- package/dist/chunks/{VisuallyHidden-BxenYie4.js → VisuallyHidden-Cg0LJ1Dh.js} +2 -2
- package/dist/chunks/{VisuallyHidden-BxenYie4.js.map → VisuallyHidden-Cg0LJ1Dh.js.map} +1 -1
- package/dist/chunks/{accordion-Dc3IqP_d.js → accordion-D4Qqg89m.js} +12 -12
- package/dist/chunks/{accordion-Dc3IqP_d.js.map → accordion-D4Qqg89m.js.map} +1 -1
- package/dist/chunks/{accordion-8pelAIyn.js → accordion-vrKLW-re.js} +2 -2
- package/dist/chunks/{accordion-8pelAIyn.js.map → accordion-vrKLW-re.js.map} +1 -1
- package/dist/chunks/{alert-DxoCjJDr.js → alert-B738R1TJ.js} +2 -2
- package/dist/chunks/{alert-DxoCjJDr.js.map → alert-B738R1TJ.js.map} +1 -1
- package/dist/chunks/{alert-DSpVYhCa.js → alert-BX5IPnc_.js} +10 -10
- package/dist/chunks/{alert-DSpVYhCa.js.map → alert-BX5IPnc_.js.map} +1 -1
- package/dist/chunks/{avatar-p4QfPsxN.js → avatar-85FE_L0r.js} +3 -3
- package/dist/chunks/{avatar-p4QfPsxN.js.map → avatar-85FE_L0r.js.map} +1 -1
- package/dist/chunks/{avatar.recipe-BV5OkaPx.js → avatar.recipe-BSmmqvwQ.js} +2 -2
- package/dist/chunks/{avatar.recipe-BV5OkaPx.js.map → avatar.recipe-BSmmqvwQ.js.map} +1 -1
- package/dist/chunks/{badge-CbqLqIo9.js → badge-C1bFH3CB.js} +4 -4
- package/dist/chunks/{badge-CbqLqIo9.js.map → badge-C1bFH3CB.js.map} +1 -1
- package/dist/chunks/{button-vfAeHh1t.js → button-BLZONb0_.js} +2 -2
- package/dist/chunks/{button-vfAeHh1t.js.map → button-BLZONb0_.js.map} +1 -1
- package/dist/chunks/{button-Ckftvc2h.js → button-zSDA7FRw.js} +8 -8
- package/dist/chunks/{button-Ckftvc2h.js.map → button-zSDA7FRw.js.map} +1 -1
- package/dist/chunks/{button.recipe-DbFAOebT.js → button.recipe-DzOS_Bqm.js} +2 -2
- package/dist/chunks/{button.recipe-DbFAOebT.js.map → button.recipe-DzOS_Bqm.js.map} +1 -1
- package/dist/chunks/{calendar-Bz_gsrGo.js → calendar-BIB7Bqqn.js} +22 -22
- package/dist/chunks/{calendar-Bz_gsrGo.js.map → calendar-BIB7Bqqn.js.map} +1 -1
- package/dist/chunks/{calendar-Cs2rHplP.js → calendar-DRE_oZOp.js} +2 -2
- package/dist/chunks/{calendar-Cs2rHplP.js.map → calendar-DRE_oZOp.js.map} +1 -1
- package/dist/chunks/{calendar.recipe-RdPylgdo.js → calendar.recipe-B2sMokBn.js} +2 -2
- package/dist/chunks/{calendar.recipe-RdPylgdo.js.map → calendar.recipe-B2sMokBn.js.map} +1 -1
- package/dist/chunks/{card-B0BsL4ol.js → card-DAC7L3R0.js} +2 -2
- package/dist/chunks/{card-B0BsL4ol.js.map → card-DAC7L3R0.js.map} +1 -1
- package/dist/chunks/{card-CQwHrkIF.js → card-DSC-PYAU.js} +9 -9
- package/dist/chunks/{card-CQwHrkIF.js.map → card-DSC-PYAU.js.map} +1 -1
- package/dist/chunks/{checkbox-Cwb_QZjZ.js → checkbox-B1w8RLi0.js} +2 -2
- package/dist/chunks/{checkbox-Cwb_QZjZ.js.map → checkbox-B1w8RLi0.js.map} +1 -1
- package/dist/chunks/{checkbox-C5jtHkVZ.js → checkbox-CJQ1O9W5.js} +11 -11
- package/dist/chunks/{checkbox-C5jtHkVZ.js.map → checkbox-CJQ1O9W5.js.map} +1 -1
- package/dist/chunks/{combobox-BACFWgP3.js → combobox-DLABf790.js} +2 -2
- package/dist/chunks/{combobox-BACFWgP3.js.map → combobox-DLABf790.js.map} +1 -1
- package/dist/chunks/{combobox--lHdni2Z.js → combobox-ZcHPms3T.js} +23 -23
- package/dist/chunks/{combobox--lHdni2Z.js.map → combobox-ZcHPms3T.js.map} +1 -1
- package/dist/chunks/{combobox.recipe-KVsma6zb.js → combobox.recipe-BIn4O0NT.js} +43 -18
- package/dist/chunks/{combobox.recipe-KVsma6zb.js.map → combobox.recipe-BIn4O0NT.js.map} +1 -1
- package/dist/chunks/combobox.recipe-Da71Y6ye.js +2 -0
- package/dist/chunks/{combobox.recipe-BzaPWi66.js.map → combobox.recipe-Da71Y6ye.js.map} +1 -1
- package/dist/chunks/{context-CgP0qpkX.js → context-CI0Y3O6x.js} +4 -4
- package/dist/chunks/{context-CgP0qpkX.js.map → context-CI0Y3O6x.js.map} +1 -1
- package/dist/chunks/{date-input-9oZMESC7.js → date-input-DnjW061n.js} +2 -2
- package/dist/chunks/{date-input-9oZMESC7.js.map → date-input-DnjW061n.js.map} +1 -1
- package/dist/chunks/{date-input-DK9U-Nh8.js → date-input-tzOJ2b9K.js} +5 -5
- package/dist/chunks/{date-input-DK9U-Nh8.js.map → date-input-tzOJ2b9K.js.map} +1 -1
- package/dist/chunks/{date-input.recipe-BcsevQtW.js → date-input.recipe-BtWEmJGK.js} +2 -2
- package/dist/chunks/{date-input.recipe-BcsevQtW.js.map → date-input.recipe-BtWEmJGK.js.map} +1 -1
- package/dist/chunks/date-picker-BOJn_b_Y.js +2 -0
- package/dist/chunks/{date-picker-CwXGnIiO.js.map → date-picker-BOJn_b_Y.js.map} +1 -1
- package/dist/chunks/{date-picker-ShPOqwXi.js → date-picker-npElUeVw.js} +54 -58
- package/dist/chunks/{date-picker-ShPOqwXi.js.map → date-picker-npElUeVw.js.map} +1 -1
- package/dist/chunks/{date-picker.recipe-BJ79OJaw.js → date-picker.recipe-Dy6NmKHA.js} +2 -2
- package/dist/chunks/{date-picker.recipe-BJ79OJaw.js.map → date-picker.recipe-Dy6NmKHA.js.map} +1 -1
- package/dist/chunks/focusSafely-DKDcdc1Z.js +36 -0
- package/dist/chunks/{focusSafely-DuMeO0J4.js.map → focusSafely-DKDcdc1Z.js.map} +1 -1
- package/dist/chunks/focusSafely-DTxIMq-P.js +2 -0
- package/dist/chunks/{focusSafely-D_uW2Kp-.js.map → focusSafely-DTxIMq-P.js.map} +1 -1
- package/dist/chunks/{form-field-BUoO6HEy.js → form-field-CblzjGEw.js} +2 -2
- package/dist/chunks/{form-field-BUoO6HEy.js.map → form-field-CblzjGEw.js.map} +1 -1
- package/dist/chunks/{form-field-Dr8lL5SU.js → form-field-D_qT2LNU.js} +8 -8
- package/dist/chunks/{form-field-Dr8lL5SU.js.map → form-field-D_qT2LNU.js.map} +1 -1
- package/dist/chunks/{grid-CLVDMJAz.js → grid-CugcJxRP.js} +2 -2
- package/dist/chunks/{grid-CLVDMJAz.js.map → grid-CugcJxRP.js.map} +1 -1
- package/dist/chunks/{icon-CjRXcxB9.js → icon-BFNYuilh.js} +3 -3
- package/dist/chunks/{icon-CjRXcxB9.js.map → icon-BFNYuilh.js.map} +1 -1
- package/dist/chunks/{icon-button-1V59UrF-.js → icon-button-DVBfoOHT.js} +2 -2
- package/dist/chunks/{icon-button-1V59UrF-.js.map → icon-button-DVBfoOHT.js.map} +1 -1
- package/dist/chunks/{icon-button-CE-LnFNq.js → icon-button-Ds1Wzyc1.js} +2 -2
- package/dist/chunks/{icon-button-CE-LnFNq.js.map → icon-button-Ds1Wzyc1.js.map} +1 -1
- package/dist/chunks/{link-CCDnA-Z-.js → link-BfHXJGo9.js} +2 -2
- package/dist/chunks/{link-CCDnA-Z-.js.map → link-BfHXJGo9.js.map} +1 -1
- package/dist/chunks/{link-1lfvUDKX.js → link-CE73eHS0.js} +6 -6
- package/dist/chunks/{link-1lfvUDKX.js.map → link-CE73eHS0.js.map} +1 -1
- package/dist/chunks/{link.recipe-CbFF3IUG.js → link.recipe-Ba2by0OG.js} +2 -2
- package/dist/chunks/{link.recipe-CbFF3IUG.js.map → link.recipe-Ba2by0OG.js.map} +1 -1
- package/dist/chunks/{loading-spinner-CJh2luQX.js → loading-spinner-AhRrVHKd.js} +6 -6
- package/dist/chunks/{loading-spinner-CJh2luQX.js.map → loading-spinner-AhRrVHKd.js.map} +1 -1
- package/dist/chunks/{make-element-focusable-urU2Yczu.js → make-element-focusable-_kgqlXGc.js} +4 -4
- package/dist/chunks/{make-element-focusable-urU2Yczu.js.map → make-element-focusable-_kgqlXGc.js.map} +1 -1
- package/dist/chunks/{make-element-focusable-ByC0LOwU.js → make-element-focusable-ijZC9F3C.js} +2 -2
- package/dist/chunks/{make-element-focusable-ByC0LOwU.js.map → make-element-focusable-ijZC9F3C.js.map} +1 -1
- package/dist/chunks/{mergeProps-DAjoWNOq.js → mergeProps-tCFA9wZ1.js} +3 -3
- package/dist/chunks/{mergeProps-DAjoWNOq.js.map → mergeProps-tCFA9wZ1.js.map} +1 -1
- package/dist/chunks/{multiline-text-input-B8v-mx89.js → multiline-text-input-C8yclL-x.js} +2 -2
- package/dist/chunks/{multiline-text-input-B8v-mx89.js.map → multiline-text-input-C8yclL-x.js.map} +1 -1
- package/dist/chunks/{multiline-text-input-BS9tsQnR.js → multiline-text-input-D6P_NVi6.js} +7 -7
- package/dist/chunks/{multiline-text-input-BS9tsQnR.js.map → multiline-text-input-D6P_NVi6.js.map} +1 -1
- package/dist/chunks/{nimbus-provider-jZPLt7_j.js → nimbus-provider-CTg-F7UD.js} +2 -2
- package/dist/chunks/{nimbus-provider-jZPLt7_j.js.map → nimbus-provider-CTg-F7UD.js.map} +1 -1
- package/dist/chunks/{nimbus-provider-CFSRgGKt.js → nimbus-provider-h_Fu03Zk.js} +39 -39
- package/dist/chunks/{nimbus-provider-CFSRgGKt.js.map → nimbus-provider-h_Fu03Zk.js.map} +1 -1
- package/dist/chunks/{number-input-BFA-uYaI.js → number-input-BTbzj3aN.js} +16 -16
- package/dist/chunks/{number-input-BFA-uYaI.js.map → number-input-BTbzj3aN.js.map} +1 -1
- package/dist/chunks/{number-input-CDaEIN66.js → number-input-D7D2ahNb.js} +2 -2
- package/dist/chunks/{number-input-CDaEIN66.js.map → number-input-D7D2ahNb.js.map} +1 -1
- package/dist/chunks/{number-input.recipe-CbLyhXgE.js → number-input.recipe-8gbsGnLJ.js} +2 -2
- package/dist/chunks/{number-input.recipe-CbLyhXgE.js.map → number-input.recipe-8gbsGnLJ.js.map} +1 -1
- package/dist/chunks/{password-input-CYZ0QR0V.js → password-input-BD5GZKX7.js} +2 -2
- package/dist/chunks/{password-input-CYZ0QR0V.js.map → password-input-BD5GZKX7.js.map} +1 -1
- package/dist/chunks/{password-input-CEUQjqeT.js → password-input-fiypX-6w.js} +5 -5
- package/dist/chunks/{password-input-CEUQjqeT.js.map → password-input-fiypX-6w.js.map} +1 -1
- package/dist/chunks/{radio-input-cone4teU.js → radio-input-4v_6tT94.js} +18 -18
- package/dist/chunks/{radio-input-cone4teU.js.map → radio-input-4v_6tT94.js.map} +1 -1
- package/dist/chunks/{radio-input-5mFGE9qS.js → radio-input-B2IVmel0.js} +2 -2
- package/dist/chunks/{radio-input-5mFGE9qS.js.map → radio-input-B2IVmel0.js.map} +1 -1
- package/dist/chunks/{radio-input.recipe-QYiFg_Kf.js → radio-input.recipe-CM9R2ilP.js} +2 -2
- package/dist/chunks/{radio-input.recipe-QYiFg_Kf.js.map → radio-input.recipe-CM9R2ilP.js.map} +1 -1
- package/dist/chunks/{scrollIntoView-Dtwi5Vrc.js → scrollIntoView-CXOsfZIS.js} +2 -2
- package/dist/chunks/{scrollIntoView-Dtwi5Vrc.js.map → scrollIntoView-CXOsfZIS.js.map} +1 -1
- package/dist/chunks/{select-CSp1HFJF.js → select-7cuL-dmI.js} +2 -2
- package/dist/chunks/{select-CSp1HFJF.js.map → select-7cuL-dmI.js.map} +1 -1
- package/dist/chunks/{select-BZ2LnuaW.js → select-DH4OUn_y.js} +22 -22
- package/dist/chunks/{select-BZ2LnuaW.js.map → select-DH4OUn_y.js.map} +1 -1
- package/dist/chunks/{select.recipe-DS5ZRkug.js → select.recipe-CXWsUldF.js} +2 -2
- package/dist/chunks/{select.recipe-DS5ZRkug.js.map → select.recipe-CXWsUldF.js.map} +1 -1
- package/dist/chunks/{simple-grid-D6PoDK0-.js → simple-grid-CFOP9g2P.js} +2 -2
- package/dist/chunks/{simple-grid-D6PoDK0-.js.map → simple-grid-CFOP9g2P.js.map} +1 -1
- package/dist/chunks/{switch-CZji_hBH.js → switch-CnbvTSF9.js} +2 -2
- package/dist/chunks/{switch-CZji_hBH.js.map → switch-CnbvTSF9.js.map} +1 -1
- package/dist/chunks/{switch-QvuLHJL-.js → switch-DdmbHa5R.js} +11 -11
- package/dist/chunks/{switch-QvuLHJL-.js.map → switch-DdmbHa5R.js.map} +1 -1
- package/dist/chunks/{switch.recipe-D3gb3Xj_.js → switch.recipe-CWOjEnIy.js} +2 -2
- package/dist/chunks/{switch.recipe-D3gb3Xj_.js.map → switch.recipe-CWOjEnIy.js.map} +1 -1
- package/dist/chunks/{tag-group-v87SYIPj.js → tag-group-B6w2MEyf.js} +2 -2
- package/dist/chunks/{tag-group-v87SYIPj.js.map → tag-group-B6w2MEyf.js.map} +1 -1
- package/dist/chunks/{tag-group-JxvggHdo.js → tag-group-CdLfw2gL.js} +21 -21
- package/dist/chunks/{tag-group-JxvggHdo.js.map → tag-group-CdLfw2gL.js.map} +1 -1
- package/dist/chunks/{text-BTD3oGaQ.js → text-MzQiG_1j.js} +2 -2
- package/dist/chunks/{text-BTD3oGaQ.js.map → text-MzQiG_1j.js.map} +1 -1
- package/dist/chunks/{text-input-Ov6DSJhs.js → text-input-CtJ2FHJ3.js} +2 -2
- package/dist/chunks/{text-input-Ov6DSJhs.js.map → text-input-CtJ2FHJ3.js.map} +1 -1
- package/dist/chunks/{text-input-CpABYE1g.js → text-input-SYXEV4sT.js} +5 -5
- package/dist/chunks/{text-input-CpABYE1g.js.map → text-input-SYXEV4sT.js.map} +1 -1
- package/dist/chunks/{text-input.recipe-CGpq33Pp.js → text-input.recipe-KNoUuq-g.js} +2 -2
- package/dist/chunks/{text-input.recipe-CGpq33Pp.js.map → text-input.recipe-KNoUuq-g.js.map} +1 -1
- package/dist/chunks/{time-input-DS6RgF12.js → time-input-DCJYjKRY.js} +5 -5
- package/dist/chunks/{time-input-DS6RgF12.js.map → time-input-DCJYjKRY.js.map} +1 -1
- package/dist/chunks/{time-input-BIUdp4gX.js → time-input-sjvN5iZ-.js} +2 -2
- package/dist/chunks/{time-input-BIUdp4gX.js.map → time-input-sjvN5iZ-.js.map} +1 -1
- package/dist/chunks/toggle-button-group-D-3UQLdL.js +2 -0
- package/dist/chunks/{toggle-button-group-BdLaFCWe.js.map → toggle-button-group-D-3UQLdL.js.map} +1 -1
- package/dist/chunks/{toggle-button-group-0a-aeCiH.js → toggle-button-group-bjkXTCxu.js} +76 -66
- package/dist/chunks/{toggle-button-group-0a-aeCiH.js.map → toggle-button-group-bjkXTCxu.js.map} +1 -1
- package/dist/chunks/{tooltip-_9ZfCa2D.js → tooltip-C-K5iatf.js} +2 -2
- package/dist/chunks/{tooltip-_9ZfCa2D.js.map → tooltip-C-K5iatf.js.map} +1 -1
- package/dist/chunks/{tooltip-BdwdWMCL.js → tooltip-DvoZxHgo.js} +10 -10
- package/dist/chunks/{tooltip-BdwdWMCL.js.map → tooltip-DvoZxHgo.js.map} +1 -1
- package/dist/chunks/{tooltip.recipe-D9fYIQZz.js → tooltip.recipe-B9-7OFCi.js} +2 -2
- package/dist/chunks/{tooltip.recipe-D9fYIQZz.js.map → tooltip.recipe-B9-7OFCi.js.map} +1 -1
- package/dist/chunks/{useButton-BRqxk71F.js → useButton-BZrUUsJ0.js} +2 -2
- package/dist/chunks/{useButton-BRqxk71F.js.map → useButton-BZrUUsJ0.js.map} +1 -1
- package/dist/chunks/{useButton-CGSIlDH9.js → useButton-C5ATfvOf.js} +4 -4
- package/dist/chunks/{useButton-CGSIlDH9.js.map → useButton-C5ATfvOf.js.map} +1 -1
- package/dist/chunks/{useCollator-PO0ZNDFD.js → useCollator-BbJYfLGN.js} +2 -2
- package/dist/chunks/{useCollator-PO0ZNDFD.js.map → useCollator-BbJYfLGN.js.map} +1 -1
- package/dist/chunks/{useDateFormatter-CZ3YJIiV.js → useDateFormatter-5Oe96jpR.js} +3 -3
- package/dist/chunks/{useDateFormatter-CZ3YJIiV.js.map → useDateFormatter-5Oe96jpR.js.map} +1 -1
- package/dist/chunks/{useDateFormatter-BYTqyfPM.js → useDateFormatter-6FAMsnNT.js} +2 -2
- package/dist/chunks/{useDateFormatter-BYTqyfPM.js.map → useDateFormatter-6FAMsnNT.js.map} +1 -1
- package/dist/chunks/{useEvent-9hDa8zoA.js → useEvent-COOhq9E7.js} +2 -2
- package/dist/chunks/{useEvent-9hDa8zoA.js.map → useEvent-COOhq9E7.js.map} +1 -1
- package/dist/chunks/{useField-3jug3XBb.js → useField-BY58-2Ft.js} +3 -3
- package/dist/chunks/{useField-3jug3XBb.js.map → useField-BY58-2Ft.js.map} +1 -1
- package/dist/chunks/useFocus-C1BtlMbo.js +2 -0
- package/dist/chunks/{useFocus-CP2rlXSg.js.map → useFocus-C1BtlMbo.js.map} +1 -1
- package/dist/chunks/useFocus-CuXxpIRa.js +176 -0
- package/dist/chunks/{useFocus-mfjoACQ_.js.map → useFocus-CuXxpIRa.js.map} +1 -1
- package/dist/chunks/{useFocusRing-C4z9NtLP.js → useFocusRing-CYHdvund.js} +2 -2
- package/dist/chunks/{useFocusRing-C4z9NtLP.js.map → useFocusRing-CYHdvund.js.map} +1 -1
- package/dist/chunks/{useFocusRing-C8yOnkHj.js → useFocusRing-DNviWqC5.js} +3 -3
- package/dist/chunks/{useFocusRing-C8yOnkHj.js.map → useFocusRing-DNviWqC5.js.map} +1 -1
- package/dist/chunks/{useFocusWithin-CLd9itwe.js → useFocusWithin-AKRo9mz0.js} +2 -2
- package/dist/chunks/{useFocusWithin-CLd9itwe.js.map → useFocusWithin-AKRo9mz0.js.map} +1 -1
- package/dist/chunks/{useFocusWithin-BENrOz43.js → useFocusWithin-hB6WzPnG.js} +2 -2
- package/dist/chunks/{useFocusWithin-BENrOz43.js.map → useFocusWithin-hB6WzPnG.js.map} +1 -1
- package/dist/chunks/{useFocusable-IwGfkXQG.js → useFocusable-DBEQCS1T.js} +4 -4
- package/dist/chunks/{useFocusable-IwGfkXQG.js.map → useFocusable-DBEQCS1T.js.map} +1 -1
- package/dist/chunks/{useFocusable-C7jAQfqU.js → useFocusable-DbCayKl8.js} +2 -2
- package/dist/chunks/{useFocusable-C7jAQfqU.js.map → useFocusable-DbCayKl8.js.map} +1 -1
- package/dist/chunks/{useFormReset-CzGCrdxu.js → useFormReset-BgCb2h6r.js} +2 -2
- package/dist/chunks/{useFormReset-CzGCrdxu.js.map → useFormReset-BgCb2h6r.js.map} +1 -1
- package/dist/chunks/{useFormValidation-BSXga2hX.js → useFormValidation-CbunG7dK.js} +2 -2
- package/dist/chunks/{useFormValidation-BSXga2hX.js.map → useFormValidation-CbunG7dK.js.map} +1 -1
- package/dist/chunks/{useFormValidation-BcDTI6Mp.js → useFormValidation-DoG8pVu2.js} +4 -4
- package/dist/chunks/{useFormValidation-BcDTI6Mp.js.map → useFormValidation-DoG8pVu2.js.map} +1 -1
- package/dist/chunks/{useHover-CbdI4C89.js → useHover-3Zee5Ds5.js} +2 -2
- package/dist/chunks/{useHover-CbdI4C89.js.map → useHover-3Zee5Ds5.js.map} +1 -1
- package/dist/chunks/{useHover-ByIffPdS.js → useHover-BxTJz4Qm.js} +2 -2
- package/dist/chunks/{useHover-ByIffPdS.js.map → useHover-BxTJz4Qm.js.map} +1 -1
- package/dist/chunks/{useLabel-Dd6M1Y4b.js → useLabel-lLz9KH79.js} +3 -3
- package/dist/chunks/{useLabel-Dd6M1Y4b.js.map → useLabel-lLz9KH79.js.map} +1 -1
- package/dist/chunks/{useLabels-B1BLA0b7.js → useLabels-CrNu-inr.js} +2 -2
- package/dist/chunks/{useLabels-B1BLA0b7.js.map → useLabels-CrNu-inr.js.map} +1 -1
- package/dist/chunks/{useLocalizedStringFormatter-JGrQYmnh.js → useLocalizedStringFormatter-D1iIJE39.js} +3 -3
- package/dist/chunks/{useLocalizedStringFormatter-JGrQYmnh.js.map → useLocalizedStringFormatter-D1iIJE39.js.map} +1 -1
- package/dist/chunks/{useNumberFormatter-Dx-esBDc.js → useNumberFormatter-C8xwHQXb.js} +2 -2
- package/dist/chunks/{useNumberFormatter-Dx-esBDc.js.map → useNumberFormatter-C8xwHQXb.js.map} +1 -1
- package/dist/chunks/{usePress-C9YKhG_e.js → usePress-CGAMyl6q.js} +2 -2
- package/dist/chunks/{usePress-C9YKhG_e.js.map → usePress-CGAMyl6q.js.map} +1 -1
- package/dist/chunks/{usePress-dJvNd3G7.js → usePress-Dk0M2Js8.js} +7 -7
- package/dist/chunks/{usePress-dJvNd3G7.js.map → usePress-Dk0M2Js8.js.map} +1 -1
- package/dist/chunks/{useSingleSelectListState-DovbyYzZ.js → useSingleSelectListState--jan8NiD.js} +6 -6
- package/dist/chunks/{useSingleSelectListState-DovbyYzZ.js.map → useSingleSelectListState--jan8NiD.js.map} +1 -1
- package/dist/chunks/{useSingleSelectListState-CwUhrKQb.js → useSingleSelectListState-DqtAmt8K.js} +2 -2
- package/dist/chunks/{useSingleSelectListState-CwUhrKQb.js.map → useSingleSelectListState-DqtAmt8K.js.map} +1 -1
- package/dist/chunks/{useSpinButton-UFcBxg8e.js → useSpinButton-CQ8U5KZS.js} +2 -2
- package/dist/chunks/{useSpinButton-UFcBxg8e.js.map → useSpinButton-CQ8U5KZS.js.map} +1 -1
- package/dist/chunks/{useSpinButton-D16epD7I.js → useSpinButton-DQzgsW5H.js} +5 -5
- package/dist/chunks/{useSpinButton-D16epD7I.js.map → useSpinButton-DQzgsW5H.js.map} +1 -1
- package/dist/chunks/{useTextField-DFfK-BZg.js → useTextField-CNy4kFwI.js} +7 -7
- package/dist/chunks/{useTextField-DFfK-BZg.js.map → useTextField-CNy4kFwI.js.map} +1 -1
- package/dist/chunks/{useTextField-lejiPfpS.js → useTextField-Dkkh1L-K.js} +2 -2
- package/dist/chunks/{useTextField-lejiPfpS.js.map → useTextField-Dkkh1L-K.js.map} +1 -1
- package/dist/chunks/{useToggle-BUU7amte.js → useToggle-BEYjmALQ.js} +2 -2
- package/dist/chunks/{useToggle-BUU7amte.js.map → useToggle-BEYjmALQ.js.map} +1 -1
- package/dist/chunks/{useToggle-Cp-w42gr.js → useToggle-Cf0OB-T-.js} +5 -5
- package/dist/chunks/{useToggle-Cp-w42gr.js.map → useToggle-Cf0OB-T-.js.map} +1 -1
- package/dist/chunks/{utils-DTmE9QvG.js → utils-7n9JR4ke.js} +3 -3
- package/dist/chunks/{utils-DTmE9QvG.js.map → utils-7n9JR4ke.js.map} +1 -1
- package/dist/chunks/{utils-BzPwFwlw.js → utils-D6ZV0jyp.js} +2 -2
- package/dist/chunks/{utils-BzPwFwlw.js.map → utils-D6ZV0jyp.js.map} +1 -1
- package/dist/chunks/{utils-wW2ZswvI.js → utils-DSssdw4e.js} +15 -17
- package/dist/chunks/{utils-wW2ZswvI.js.map → utils-DSssdw4e.js.map} +1 -1
- package/dist/chunks/{visually-hidden-T2B120j4.js → visually-hidden-7U4LGJiI.js} +2 -2
- package/dist/chunks/{visually-hidden-T2B120j4.js.map → visually-hidden-7U4LGJiI.js.map} +1 -1
- package/dist/chunks/{visually-hidden-Qd_t4hAG.js → visually-hidden-CRnniCks.js} +2 -2
- package/dist/chunks/{visually-hidden-Qd_t4hAG.js.map → visually-hidden-CRnniCks.js.map} +1 -1
- package/dist/components/accordion.cjs +1 -1
- package/dist/components/accordion.es.js +1 -1
- package/dist/components/alert.cjs +1 -1
- package/dist/components/alert.es.js +1 -1
- package/dist/components/avatar.cjs +1 -1
- package/dist/components/avatar.es.js +1 -1
- package/dist/components/badge.cjs +1 -1
- package/dist/components/badge.es.js +1 -1
- package/dist/components/box.cjs +1 -1
- package/dist/components/button.cjs +1 -1
- package/dist/components/button.es.js +1 -1
- package/dist/components/calendar.cjs +1 -1
- package/dist/components/calendar.es.js +1 -1
- package/dist/components/card.cjs +1 -1
- package/dist/components/card.es.js +1 -1
- package/dist/components/checkbox.cjs +1 -1
- package/dist/components/checkbox.es.js +1 -1
- package/dist/components/code.cjs +1 -1
- package/dist/components/combobox.cjs +1 -1
- package/dist/components/combobox.es.js +1 -1
- package/dist/components/components.cjs +1 -1
- package/dist/components/components.es.js +33 -33
- package/dist/components/date-input.cjs +1 -1
- package/dist/components/date-input.es.js +1 -1
- package/dist/components/date-picker.cjs +1 -1
- package/dist/components/date-picker.es.js +1 -1
- package/dist/components/dialog.cjs +1 -1
- package/dist/components/flex.cjs +1 -1
- package/dist/components/form-field.cjs +1 -1
- package/dist/components/form-field.es.js +1 -1
- package/dist/components/grid.cjs +1 -1
- package/dist/components/grid.es.js +1 -1
- package/dist/components/heading.cjs +1 -1
- package/dist/components/icon-button.cjs +1 -1
- package/dist/components/icon-button.es.js +1 -1
- package/dist/components/icon.cjs +1 -1
- package/dist/components/icon.es.js +1 -1
- package/dist/components/image.cjs +1 -1
- package/dist/components/kbd.cjs +1 -1
- package/dist/components/link.cjs +1 -1
- package/dist/components/link.es.js +1 -1
- package/dist/components/list.cjs +1 -1
- package/dist/components/loading-spinner.cjs +1 -1
- package/dist/components/loading-spinner.es.js +1 -1
- package/dist/components/multiline-text-input.cjs +1 -1
- package/dist/components/multiline-text-input.es.js +1 -1
- package/dist/components/nimbus-provider.cjs +1 -1
- package/dist/components/nimbus-provider.es.js +1 -1
- package/dist/components/number-input.cjs +1 -1
- package/dist/components/number-input.es.js +1 -1
- package/dist/components/password-input.cjs +1 -1
- package/dist/components/password-input.es.js +1 -1
- package/dist/components/radio-input.cjs +1 -1
- package/dist/components/radio-input.es.js +1 -1
- package/dist/components/select.cjs +1 -1
- package/dist/components/select.es.js +1 -1
- package/dist/components/simple-grid.cjs +1 -1
- package/dist/components/simple-grid.es.js +1 -1
- package/dist/components/stack.cjs +1 -1
- package/dist/components/switch.cjs +1 -1
- package/dist/components/switch.es.js +1 -1
- package/dist/components/table.cjs +1 -1
- package/dist/components/tag-group.cjs +1 -1
- package/dist/components/tag-group.es.js +1 -1
- package/dist/components/text-input.cjs +1 -1
- package/dist/components/text-input.es.js +1 -1
- package/dist/components/text.cjs +1 -1
- package/dist/components/text.es.js +1 -1
- package/dist/components/time-input.cjs +1 -1
- package/dist/components/time-input.es.js +1 -1
- package/dist/components/toggle-button-group.cjs +1 -1
- package/dist/components/toggle-button-group.es.js +1 -1
- package/dist/components/tooltip.cjs +1 -1
- package/dist/components/tooltip.es.js +2 -2
- package/dist/components/visually-hidden.cjs +1 -1
- package/dist/components/visually-hidden.es.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.es.js +84 -93
- package/dist/index.es.js.map +1 -1
- package/dist/setup-jsdom-polyfills.cjs +1 -1
- package/dist/setup-jsdom-polyfills.cjs.map +1 -1
- package/dist/setup-jsdom-polyfills.es.js +2 -22
- package/dist/setup-jsdom-polyfills.es.js.map +1 -1
- package/package.json +4 -3
- package/dist/chunks/Hidden-BxRZGdEW.js +0 -2
- package/dist/chunks/ListBox-CHhUqc7T.js +0 -18
- package/dist/chunks/ListBox-CHhUqc7T.js.map +0 -1
- package/dist/chunks/ListBox-DH3lufv2.js.map +0 -1
- package/dist/chunks/RSPContexts-CxXY5Uko.js +0 -11
- package/dist/chunks/RSPContexts-qzadeFSO.js +0 -2
- package/dist/chunks/combobox.recipe-BzaPWi66.js +0 -2
- package/dist/chunks/date-picker-CwXGnIiO.js +0 -2
- package/dist/chunks/focusSafely-D_uW2Kp-.js +0 -58
- package/dist/chunks/focusSafely-DuMeO0J4.js +0 -2
- package/dist/chunks/toggle-button-group-BdLaFCWe.js +0 -2
- package/dist/chunks/useFocus-CP2rlXSg.js +0 -2
- package/dist/chunks/useFocus-mfjoACQ_.js +0 -184
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"form-field-BUoO6HEy.js","sources":["../../src/components/form-field/components/form-field.context.tsx","../../src/components/form-field/form-field.recipe.tsx","../../src/components/form-field/form-field.slots.tsx","../../src/components/form-field/components/form-field.root.tsx","../../src/components/form-field/components/form-field.label.tsx","../../src/components/form-field/components/form-field.input.tsx","../../src/components/form-field/components/form-field.description.tsx","../../src/components/form-field/components/form-field.error.tsx","../../src/components/form-field/components/form-field.info-box.tsx","../../src/components/form-field/form-field.tsx"],"sourcesContent":["import { createContext, type ReactNode } from \"react\";\nimport type {\n FormFieldDescriptionSlotProps,\n FormFieldErrorSlotProps,\n FormFieldInputSlotProps,\n FormFieldLabelSlotProps,\n} from \"../form-field.slots\";\n\nexport type FormFieldContextPayloadType = {\n label: ReactNode;\n labelSlotProps?: FormFieldLabelSlotProps;\n input: ReactNode;\n inputSlotProps?: FormFieldInputSlotProps;\n description: ReactNode;\n descriptionSlotProps?: FormFieldDescriptionSlotProps;\n error: ReactNode;\n errorSlotProps?: FormFieldErrorSlotProps;\n info: ReactNode;\n isInvalid?: boolean;\n isRequired?: boolean;\n isDisabled?: boolean;\n isReadOnly?: boolean;\n};\n\nexport type FormFieldContextType = {\n context: FormFieldContextPayloadType;\n setContext: React.Dispatch<React.SetStateAction<FormFieldContextPayloadType>>;\n};\n\nexport const FormFieldContext = createContext<FormFieldContextType>({\n context: {\n label: null,\n description: null,\n error: null,\n info: null,\n input: null,\n },\n setContext: () => {},\n});\n","import { defineSlotRecipe } from \"@chakra-ui/react\";\n\nconst columnLayout = `\n\"label\"\n\"input\"\n\"description\"\n\"error\"\n`;\nconst rowLayout = `\n\"label input\"\n\"label description\"\n\"label error\"\n`;\n\n/**\n * Recipe configuration for the FormField component.\n * Defines the styling variants and base styles using Chakra UI's recipe system.\n */\nexport const formFieldRecipe = defineSlotRecipe({\n slots: [\"root\", \"label\", \"input\", \"description\", \"error\", \"popover\"],\n // Unique class name prefix for the component\n className: \"nimbus-ui-form-field\",\n\n base: {\n root: {\n \"--grid-gap\": \"spacing.100\",\n\n display: \"grid\",\n width: \"auto\",\n },\n label: {\n gridArea: \"label\",\n fontWeight: \"500\",\n color: \"neutral.11\",\n fontSize: \"var(--form-field-font-size)\",\n lineHeight: \"var(--form-field-line-height)\",\n },\n input: {\n gridArea: \"input\",\n },\n description: {\n gridArea: \"description\",\n color: \"neutral.11\",\n fontSize: \"var(--form-field-font-size)\",\n lineHeight: \"var(--form-field-line-height)\",\n },\n error: {\n gridArea: \"error\",\n color: \"critical.11\",\n fontSize: \"var(--form-field-font-size)\",\n lineHeight: \"var(--form-field-line-height)\",\n },\n popover: {\n \"--scrollbar-color\": \"colors.neutral.8\",\n \"--scrollbar-bg\": \"colors.neutral.3\",\n bg: \"neutral.1\",\n maxWidth: \"xl\",\n borderRadius: \"200\",\n boxShadow: \"6\",\n border: \"solid-25\",\n borderColor: \"neutral.8\",\n maxHeight: \"40svh\",\n overflow: \"auto\",\n scrollbarWidth: \"thin\",\n scrollbarColor: \"var(--scrollbar-color) var(--scrollbar-bg)\",\n focusRing: \"outside\",\n },\n },\n\n variants: {\n size: {\n md: {\n root: {\n \"--form-field-font-size\": \"fontSizes.350\",\n \"--form-field-line-height\": \"lineHeights.500\",\n },\n },\n sm: {\n root: {\n \"--form-field-font-size\": \"fontSizes.300\",\n \"--form-field-line-height\": \"lineHeights.450\",\n },\n },\n },\n direction: {\n column: {\n root: {\n gridTemplateAreas: columnLayout,\n },\n input: {\n mt: \"var(--grid-gap)\",\n },\n description: {\n mt: \"var(--grid-gap)\",\n },\n error: {\n mt: \"var(--grid-gap)\",\n },\n },\n row: {\n root: {\n gridTemplateAreas: rowLayout,\n gridTemplateColumns: \"auto 1fr\",\n gridColumnGap: \"200\",\n },\n description: {\n mt: \"var(--grid-gap)\",\n },\n error: {\n mt: \"var(--grid-gap)\",\n },\n },\n },\n },\n\n // Default variant values when not explicitly specified\n defaultVariants: {\n direction: \"column\",\n size: \"md\",\n },\n});\n","/* eslint-disable @typescript-eslint/no-empty-object-type */\nimport {\n type HTMLChakraProps,\n type RecipeVariantProps,\n type UnstyledProp,\n createSlotRecipeContext,\n} from \"@chakra-ui/react\";\n\nimport { formFieldRecipe } from \"./form-field.recipe\";\n\nconst { withProvider, withContext } = createSlotRecipeContext({\n recipe: formFieldRecipe,\n});\n\n// Root slot\nexport interface FormFieldRootSlotProps\n extends HTMLChakraProps<\n \"div\",\n RecipeVariantProps<typeof formFieldRecipe> & UnstyledProp\n > {}\n\nexport const FormFieldRootSlot = withProvider<\n HTMLDivElement,\n FormFieldRootSlotProps\n>(\"div\", \"root\");\n\n// Label Slot\nexport interface FormFieldLabelSlotProps extends HTMLChakraProps<\"div\"> {}\nexport const FormFieldLabelSlot = withContext<\n HTMLDivElement,\n FormFieldLabelSlotProps\n>(\"div\", \"label\");\n\n// Input Slot\nexport interface FormFieldInputSlotProps extends HTMLChakraProps<\"div\"> {}\nexport const FormFieldInputSlot = withContext<\n HTMLDivElement,\n FormFieldInputSlotProps\n>(\"div\", \"input\");\n\n// Description Slot\nexport interface FormFieldDescriptionSlotProps extends HTMLChakraProps<\"div\"> {}\nexport const FormFieldDescriptionSlot = withContext<\n HTMLDivElement,\n FormFieldDescriptionSlotProps\n>(\"div\", \"description\");\n\n// Error Slot\nexport interface FormFieldErrorSlotProps extends HTMLChakraProps<\"div\"> {}\nexport const FormFieldErrorSlot = withContext<\n HTMLDivElement,\n FormFieldErrorSlotProps\n>(\"div\", \"error\");\n\n// Error Slot\nexport interface FormFieldPopoverSlotProps extends HTMLChakraProps<\"div\"> {}\nexport const FormFieldPopoverSlot = withContext<\n HTMLDivElement,\n FormFieldPopoverSlotProps\n>(\"div\", \"popover\");\n","import {\n Children,\n cloneElement,\n forwardRef,\n isValidElement,\n useEffect,\n useState,\n} from \"react\";\nimport type { FormFieldProps } from \"../form-field.types\";\nimport { useField } from \"react-aria\";\nimport {\n FormFieldContext,\n type FormFieldContextPayloadType,\n} from \"./form-field.context\";\nimport {\n FormFieldDescriptionSlot,\n FormFieldErrorSlot,\n FormFieldInputSlot,\n FormFieldLabelSlot,\n FormFieldPopoverSlot,\n FormFieldRootSlot,\n} from \"../form-field.slots\";\nimport { Dialog, DialogTrigger, Popover } from \"react-aria-components\";\nimport { Box, IconButton } from \"@/components\";\nimport { ErrorOutline, HelpOutline } from \"@commercetools/nimbus-icons\";\n\n/**\n * FormField\n * ============================================================\n * displays inputs in a FormField context\n */\nexport const FormFieldRoot = forwardRef<HTMLDivElement, FormFieldProps>(\n (\n { isInvalid, isRequired, isDisabled, isReadOnly, children, ...props },\n ref\n ) => {\n const [context, setContext] = useState<FormFieldContextPayloadType>({\n label: null,\n description: null,\n error: null,\n info: null,\n input: null,\n isInvalid,\n isRequired,\n isDisabled,\n isReadOnly,\n });\n\n const useFieldArgs: Parameters<typeof useField>[0] = {\n description: context.description,\n errorMessage: context.error,\n };\n\n if (context.label) {\n useFieldArgs.label = context.label;\n } else {\n // Context will always start out null, so we need to stub out some aria attributes\n // FIXME: This is a hack to get the form field to work, but it's not the best solution\n // FIXME: We should find a better way to handle this by redesigning the FormField component's structure\n useFieldArgs[\"aria-label\"] = \"empty-label\";\n useFieldArgs[\"aria-labelledby\"] = \"empty-label\";\n }\n\n const { labelProps, fieldProps, descriptionProps, errorMessageProps } =\n useField(useFieldArgs);\n\n useEffect(() => {\n setContext((prevContext) => ({\n ...prevContext,\n isInvalid,\n isRequired,\n isDisabled,\n isReadOnly,\n }));\n }, [isInvalid, isRequired, isDisabled, isReadOnly]);\n\n const inputProps = {\n ...fieldProps,\n isInvalid,\n isRequired,\n isDisabled,\n isReadOnly,\n };\n\n return (\n <FormFieldContext.Provider value={{ context, setContext }}>\n <FormFieldRootSlot ref={ref} {...props}>\n {context.label && (\n <FormFieldLabelSlot {...context.labelSlotProps}>\n <label {...labelProps}>\n {context.label}\n {isRequired && <sup aria-hidden=\"true\">*</sup>}\n </label>\n {context.info && (\n <DialogTrigger>\n <Box\n as=\"span\"\n display=\"inline-block\"\n position=\"relative\"\n width=\"1ch\"\n height=\"1ch\"\n ml=\"200\"\n >\n <Box\n as=\"span\"\n display=\"inline-flex\"\n position=\"absolute\"\n top=\"50%\"\n right=\"50%\"\n transform=\"translate(50%, -50%)\"\n >\n <IconButton\n aria-label=\"__MORE INFO\"\n size=\"2xs\"\n tone=\"info\"\n variant=\"link\"\n >\n <HelpOutline />\n </IconButton>\n </Box>\n </Box>\n <Popover>\n <FormFieldPopoverSlot asChild>\n <Dialog>\n <Box p=\"300\">{context.info}</Box>\n </Dialog>\n </FormFieldPopoverSlot>\n </Popover>\n </DialogTrigger>\n )}\n </FormFieldLabelSlot>\n )}\n {context.input && (\n <FormFieldInputSlot {...context.inputSlotProps}>\n {Children.map(context.input, (child) => {\n // Important: Check if the child is a valid React element before cloning.\n if (isValidElement(child)) {\n return cloneElement(child, inputProps);\n }\n // If it's not a valid element (e.g., text node, null, undefined), return it as is.\n return child;\n })}\n </FormFieldInputSlot>\n )}\n {context.description && (\n <FormFieldDescriptionSlot\n {...descriptionProps}\n {...context.descriptionSlotProps}\n >\n {context.description}\n </FormFieldDescriptionSlot>\n )}\n {isInvalid && context.error && (\n <FormFieldErrorSlot\n {...errorMessageProps}\n {...context.errorSlotProps}\n >\n <Box\n as={ErrorOutline}\n display=\"inline-flex\"\n boxSize=\"400\"\n verticalAlign=\"text-bottom\"\n mr=\"100\"\n />\n {context.error}\n </FormFieldErrorSlot>\n )}\n {children}\n </FormFieldRootSlot>\n </FormFieldContext.Provider>\n );\n }\n);\n","import { useContext, useEffect } from \"react\";\nimport { FormFieldContext } from \"./form-field.context\";\nimport type { FormFieldLabelSlotProps } from \"../form-field.slots\";\n\nexport const FormFieldLabel = ({\n children,\n ...labelSlotProps\n}: FormFieldLabelSlotProps) => {\n const { setContext } = useContext(FormFieldContext);\n\n useEffect(() => {\n setContext((prevContext) => ({\n ...prevContext,\n label: children,\n labelSlotProps,\n }));\n }, [children, setContext]);\n\n return null;\n};\n","import { useContext, useEffect } from \"react\";\nimport { FormFieldContext } from \"./form-field.context\";\nimport type { FormFieldInputSlotProps } from \"../form-field.slots\";\n\nexport const FormFieldInput = ({\n children,\n ...inputSlotProps\n}: FormFieldInputSlotProps) => {\n const { setContext } = useContext(FormFieldContext);\n\n useEffect(() => {\n setContext((prevContext) => ({\n ...prevContext,\n input: children,\n inputSlotProps,\n }));\n }, [children, setContext]);\n\n return null;\n};\n","import { useContext, useEffect } from \"react\";\nimport { FormFieldContext } from \"./form-field.context\";\nimport type { FormFieldDescriptionSlotProps } from \"../form-field.slots\";\n\nexport const FormFieldDescription = ({\n children,\n ...descriptionSlotProps\n}: FormFieldDescriptionSlotProps) => {\n const { setContext } = useContext(FormFieldContext);\n\n useEffect(() => {\n setContext((prevContext) => ({\n ...prevContext,\n description: children,\n descriptionSlotProps,\n }));\n }, [children, setContext]);\n\n return null;\n};\n","import { useContext, useEffect } from \"react\";\nimport { FormFieldContext } from \"./form-field.context\";\nimport type { FormFieldErrorSlotProps } from \"../form-field.slots\";\n\nexport const FormFieldError = ({\n children,\n ...errorSlotProps\n}: FormFieldErrorSlotProps) => {\n const { setContext } = useContext(FormFieldContext);\n\n useEffect(() => {\n setContext((prevContext) => ({\n ...prevContext,\n error: children,\n errorSlotProps,\n }));\n }, [children, setContext]);\n\n return null;\n};\n","import { useContext, useEffect, type ReactNode } from \"react\";\nimport { FormFieldContext } from \"./form-field.context\";\n\ntype FormFieldInfoBoxProps = {\n /**\n * The content to display in the InfoBox\n */\n children: ReactNode;\n};\n\nexport const FormFieldInfoBox = ({ children }: FormFieldInfoBoxProps) => {\n const { setContext } = useContext(FormFieldContext);\n\n useEffect(() => {\n setContext((prevContext) => ({\n ...prevContext,\n info: children,\n }));\n }, [children, setContext]);\n\n return null;\n};\n","import { FormFieldRoot } from \"./components/form-field.root\";\nimport { FormFieldLabel } from \"./components/form-field.label\";\nimport { FormFieldInput } from \"./components/form-field.input\";\nimport { FormFieldDescription } from \"./components/form-field.description\";\nimport { FormFieldError } from \"./components/form-field.error\";\nimport { FormFieldInfoBox } from \"./components/form-field.info-box\";\n\nexport const FormField = {\n Root: FormFieldRoot,\n Label: FormFieldLabel,\n Input: FormFieldInput,\n Description: FormFieldDescription,\n Error: FormFieldError,\n InfoBox: FormFieldInfoBox,\n};\n\nexport {\n FormFieldRoot as _FormFieldRoot,\n FormFieldLabel as _FormFieldLabel,\n FormFieldInput as _FormFieldInput,\n FormFieldDescription as _FormFieldDescription,\n FormFieldError as _FormFieldError,\n FormFieldInfoBox as _FormFieldInfoBox,\n};\n"],"names":["FormFieldContext","createContext","columnLayout","rowLayout","formFieldRecipe","defineSlotRecipe","withProvider","withContext","createSlotRecipeContext","FormFieldRootSlot","FormFieldLabelSlot","FormFieldInputSlot","FormFieldDescriptionSlot","FormFieldErrorSlot","FormFieldPopoverSlot","FormFieldRoot","forwardRef","isInvalid","isRequired","isDisabled","isReadOnly","children","props","ref","context","setContext","useState","useFieldArgs","labelProps","fieldProps","descriptionProps","errorMessageProps","useField","useEffect","prevContext","inputProps","jsx","jsxs","DialogTrigger","Box","IconButton","HelpOutline","Popover","Dialog","Children","child","isValidElement","cloneElement","ErrorOutline","FormFieldLabel","labelSlotProps","useContext","FormFieldInput","inputSlotProps","FormFieldDescription","descriptionSlotProps","FormFieldError","errorSlotProps","FormFieldInfoBox","FormField"],"mappings":"wRA6BaA,EAAmBC,EAAAA,cAAoC,CAClE,QAAS,CACP,MAAO,KACP,YAAa,KACb,MAAO,KACP,KAAM,KACN,MAAO,IACT,EACA,WAAY,IAAM,CAAA,CACpB,CAAC,ECpCKC,EAAe;AAAA;AAAA;AAAA;AAAA;AAAA,EAMfC,EAAY;AAAA;AAAA;AAAA;AAAA,EAULC,E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AsC,CACvE,KAAM,CAAE,WAAAI,CAAA,EAAe0B,EAAA,WAAWnD,CAAgB,EAElDiC,OAAAA,EAAAA,UAAU,IAAM,CACdR,EAAYS,IAAiB,CAC3B,GAAGA,EACH,KAAMb,CAAA,EACN,CAAA,EACD,CAACA,EAAUI,CAAU,CAAC,EAElB,IACT,ECdakC,EAAY,CACvB,KAAM5C,EACN,MAAOkC,EACP,MAAOG,EACP,YAAaE,EACb,MAAOE,EACP,QAASE,CACX"}
|
|
1
|
+
{"version":3,"file":"form-field-CblzjGEw.js","sources":["../../src/components/form-field/components/form-field.context.tsx","../../src/components/form-field/form-field.recipe.tsx","../../src/components/form-field/form-field.slots.tsx","../../src/components/form-field/components/form-field.root.tsx","../../src/components/form-field/components/form-field.label.tsx","../../src/components/form-field/components/form-field.input.tsx","../../src/components/form-field/components/form-field.description.tsx","../../src/components/form-field/components/form-field.error.tsx","../../src/components/form-field/components/form-field.info-box.tsx","../../src/components/form-field/form-field.tsx"],"sourcesContent":["import { createContext, type ReactNode } from \"react\";\nimport type {\n FormFieldDescriptionSlotProps,\n FormFieldErrorSlotProps,\n FormFieldInputSlotProps,\n FormFieldLabelSlotProps,\n} from \"../form-field.slots\";\n\nexport type FormFieldContextPayloadType = {\n label: ReactNode;\n labelSlotProps?: FormFieldLabelSlotProps;\n input: ReactNode;\n inputSlotProps?: FormFieldInputSlotProps;\n description: ReactNode;\n descriptionSlotProps?: FormFieldDescriptionSlotProps;\n error: ReactNode;\n errorSlotProps?: FormFieldErrorSlotProps;\n info: ReactNode;\n isInvalid?: boolean;\n isRequired?: boolean;\n isDisabled?: boolean;\n isReadOnly?: boolean;\n};\n\nexport type FormFieldContextType = {\n context: FormFieldContextPayloadType;\n setContext: React.Dispatch<React.SetStateAction<FormFieldContextPayloadType>>;\n};\n\nexport const FormFieldContext = createContext<FormFieldContextType>({\n context: {\n label: null,\n description: null,\n error: null,\n info: null,\n input: null,\n },\n setContext: () => {},\n});\n","import { defineSlotRecipe } from \"@chakra-ui/react\";\n\nconst columnLayout = `\n\"label\"\n\"input\"\n\"description\"\n\"error\"\n`;\nconst rowLayout = `\n\"label input\"\n\"label description\"\n\"label error\"\n`;\n\n/**\n * Recipe configuration for the FormField component.\n * Defines the styling variants and base styles using Chakra UI's recipe system.\n */\nexport const formFieldRecipe = defineSlotRecipe({\n slots: [\"root\", \"label\", \"input\", \"description\", \"error\", \"popover\"],\n // Unique class name prefix for the component\n className: \"nimbus-ui-form-field\",\n\n base: {\n root: {\n \"--grid-gap\": \"spacing.100\",\n\n display: \"grid\",\n width: \"auto\",\n },\n label: {\n gridArea: \"label\",\n fontWeight: \"500\",\n color: \"neutral.11\",\n fontSize: \"var(--form-field-font-size)\",\n lineHeight: \"var(--form-field-line-height)\",\n },\n input: {\n gridArea: \"input\",\n },\n description: {\n gridArea: \"description\",\n color: \"neutral.11\",\n fontSize: \"var(--form-field-font-size)\",\n lineHeight: \"var(--form-field-line-height)\",\n },\n error: {\n gridArea: \"error\",\n color: \"critical.11\",\n fontSize: \"var(--form-field-font-size)\",\n lineHeight: \"var(--form-field-line-height)\",\n },\n popover: {\n \"--scrollbar-color\": \"colors.neutral.8\",\n \"--scrollbar-bg\": \"colors.neutral.3\",\n bg: \"neutral.1\",\n maxWidth: \"xl\",\n borderRadius: \"200\",\n boxShadow: \"6\",\n border: \"solid-25\",\n borderColor: \"neutral.8\",\n maxHeight: \"40svh\",\n overflow: \"auto\",\n scrollbarWidth: \"thin\",\n scrollbarColor: \"var(--scrollbar-color) var(--scrollbar-bg)\",\n focusRing: \"outside\",\n },\n },\n\n variants: {\n size: {\n md: {\n root: {\n \"--form-field-font-size\": \"fontSizes.350\",\n \"--form-field-line-height\": \"lineHeights.500\",\n },\n },\n sm: {\n root: {\n \"--form-field-font-size\": \"fontSizes.300\",\n \"--form-field-line-height\": \"lineHeights.450\",\n },\n },\n },\n direction: {\n column: {\n root: {\n gridTemplateAreas: columnLayout,\n },\n input: {\n mt: \"var(--grid-gap)\",\n },\n description: {\n mt: \"var(--grid-gap)\",\n },\n error: {\n mt: \"var(--grid-gap)\",\n },\n },\n row: {\n root: {\n gridTemplateAreas: rowLayout,\n gridTemplateColumns: \"auto 1fr\",\n gridColumnGap: \"200\",\n },\n description: {\n mt: \"var(--grid-gap)\",\n },\n error: {\n mt: \"var(--grid-gap)\",\n },\n },\n },\n },\n\n // Default variant values when not explicitly specified\n defaultVariants: {\n direction: \"column\",\n size: \"md\",\n },\n});\n","/* eslint-disable @typescript-eslint/no-empty-object-type */\nimport {\n type HTMLChakraProps,\n type RecipeVariantProps,\n type UnstyledProp,\n createSlotRecipeContext,\n} from \"@chakra-ui/react\";\n\nimport { formFieldRecipe } from \"./form-field.recipe\";\n\nconst { withProvider, withContext } = createSlotRecipeContext({\n recipe: formFieldRecipe,\n});\n\n// Root slot\nexport interface FormFieldRootSlotProps\n extends HTMLChakraProps<\n \"div\",\n RecipeVariantProps<typeof formFieldRecipe> & UnstyledProp\n > {}\n\nexport const FormFieldRootSlot = withProvider<\n HTMLDivElement,\n FormFieldRootSlotProps\n>(\"div\", \"root\");\n\n// Label Slot\nexport interface FormFieldLabelSlotProps extends HTMLChakraProps<\"div\"> {}\nexport const FormFieldLabelSlot = withContext<\n HTMLDivElement,\n FormFieldLabelSlotProps\n>(\"div\", \"label\");\n\n// Input Slot\nexport interface FormFieldInputSlotProps extends HTMLChakraProps<\"div\"> {}\nexport const FormFieldInputSlot = withContext<\n HTMLDivElement,\n FormFieldInputSlotProps\n>(\"div\", \"input\");\n\n// Description Slot\nexport interface FormFieldDescriptionSlotProps extends HTMLChakraProps<\"div\"> {}\nexport const FormFieldDescriptionSlot = withContext<\n HTMLDivElement,\n FormFieldDescriptionSlotProps\n>(\"div\", \"description\");\n\n// Error Slot\nexport interface FormFieldErrorSlotProps extends HTMLChakraProps<\"div\"> {}\nexport const FormFieldErrorSlot = withContext<\n HTMLDivElement,\n FormFieldErrorSlotProps\n>(\"div\", \"error\");\n\n// Error Slot\nexport interface FormFieldPopoverSlotProps extends HTMLChakraProps<\"div\"> {}\nexport const FormFieldPopoverSlot = withContext<\n HTMLDivElement,\n FormFieldPopoverSlotProps\n>(\"div\", \"popover\");\n","import {\n Children,\n cloneElement,\n forwardRef,\n isValidElement,\n useEffect,\n useState,\n} from \"react\";\nimport type { FormFieldProps } from \"../form-field.types\";\nimport { useField } from \"react-aria\";\nimport {\n FormFieldContext,\n type FormFieldContextPayloadType,\n} from \"./form-field.context\";\nimport {\n FormFieldDescriptionSlot,\n FormFieldErrorSlot,\n FormFieldInputSlot,\n FormFieldLabelSlot,\n FormFieldPopoverSlot,\n FormFieldRootSlot,\n} from \"../form-field.slots\";\nimport { Dialog, DialogTrigger, Popover } from \"react-aria-components\";\nimport { Box, IconButton } from \"@/components\";\nimport { ErrorOutline, HelpOutline } from \"@commercetools/nimbus-icons\";\n\n/**\n * FormField\n * ============================================================\n * displays inputs in a FormField context\n */\nexport const FormFieldRoot = forwardRef<HTMLDivElement, FormFieldProps>(\n (\n { isInvalid, isRequired, isDisabled, isReadOnly, children, ...props },\n ref\n ) => {\n const [context, setContext] = useState<FormFieldContextPayloadType>({\n label: null,\n description: null,\n error: null,\n info: null,\n input: null,\n isInvalid,\n isRequired,\n isDisabled,\n isReadOnly,\n });\n\n const useFieldArgs: Parameters<typeof useField>[0] = {\n description: context.description,\n errorMessage: context.error,\n };\n\n if (context.label) {\n useFieldArgs.label = context.label;\n } else {\n // Context will always start out null, so we need to stub out some aria attributes\n // FIXME: This is a hack to get the form field to work, but it's not the best solution\n // FIXME: We should find a better way to handle this by redesigning the FormField component's structure\n useFieldArgs[\"aria-label\"] = \"empty-label\";\n useFieldArgs[\"aria-labelledby\"] = \"empty-label\";\n }\n\n const { labelProps, fieldProps, descriptionProps, errorMessageProps } =\n useField(useFieldArgs);\n\n useEffect(() => {\n setContext((prevContext) => ({\n ...prevContext,\n isInvalid,\n isRequired,\n isDisabled,\n isReadOnly,\n }));\n }, [isInvalid, isRequired, isDisabled, isReadOnly]);\n\n const inputProps = {\n ...fieldProps,\n isInvalid,\n isRequired,\n isDisabled,\n isReadOnly,\n };\n\n return (\n <FormFieldContext.Provider value={{ context, setContext }}>\n <FormFieldRootSlot ref={ref} {...props}>\n {context.label && (\n <FormFieldLabelSlot {...context.labelSlotProps}>\n <label {...labelProps}>\n {context.label}\n {isRequired && <sup aria-hidden=\"true\">*</sup>}\n </label>\n {context.info && (\n <DialogTrigger>\n <Box\n as=\"span\"\n display=\"inline-block\"\n position=\"relative\"\n width=\"1ch\"\n height=\"1ch\"\n ml=\"200\"\n >\n <Box\n as=\"span\"\n display=\"inline-flex\"\n position=\"absolute\"\n top=\"50%\"\n right=\"50%\"\n transform=\"translate(50%, -50%)\"\n >\n <IconButton\n aria-label=\"__MORE INFO\"\n size=\"2xs\"\n tone=\"info\"\n variant=\"link\"\n >\n <HelpOutline />\n </IconButton>\n </Box>\n </Box>\n <Popover>\n <FormFieldPopoverSlot asChild>\n <Dialog>\n <Box p=\"300\">{context.info}</Box>\n </Dialog>\n </FormFieldPopoverSlot>\n </Popover>\n </DialogTrigger>\n )}\n </FormFieldLabelSlot>\n )}\n {context.input && (\n <FormFieldInputSlot {...context.inputSlotProps}>\n {Children.map(context.input, (child) => {\n // Important: Check if the child is a valid React element before cloning.\n if (isValidElement(child)) {\n return cloneElement(child, inputProps);\n }\n // If it's not a valid element (e.g., text node, null, undefined), return it as is.\n return child;\n })}\n </FormFieldInputSlot>\n )}\n {context.description && (\n <FormFieldDescriptionSlot\n {...descriptionProps}\n {...context.descriptionSlotProps}\n >\n {context.description}\n </FormFieldDescriptionSlot>\n )}\n {isInvalid && context.error && (\n <FormFieldErrorSlot\n {...errorMessageProps}\n {...context.errorSlotProps}\n >\n <Box\n as={ErrorOutline}\n display=\"inline-flex\"\n boxSize=\"400\"\n verticalAlign=\"text-bottom\"\n mr=\"100\"\n />\n {context.error}\n </FormFieldErrorSlot>\n )}\n {children}\n </FormFieldRootSlot>\n </FormFieldContext.Provider>\n );\n }\n);\n","import { useContext, useEffect } from \"react\";\nimport { FormFieldContext } from \"./form-field.context\";\nimport type { FormFieldLabelSlotProps } from \"../form-field.slots\";\n\nexport const FormFieldLabel = ({\n children,\n ...labelSlotProps\n}: FormFieldLabelSlotProps) => {\n const { setContext } = useContext(FormFieldContext);\n\n useEffect(() => {\n setContext((prevContext) => ({\n ...prevContext,\n label: children,\n labelSlotProps,\n }));\n }, [children, setContext]);\n\n return null;\n};\n","import { useContext, useEffect } from \"react\";\nimport { FormFieldContext } from \"./form-field.context\";\nimport type { FormFieldInputSlotProps } from \"../form-field.slots\";\n\nexport const FormFieldInput = ({\n children,\n ...inputSlotProps\n}: FormFieldInputSlotProps) => {\n const { setContext } = useContext(FormFieldContext);\n\n useEffect(() => {\n setContext((prevContext) => ({\n ...prevContext,\n input: children,\n inputSlotProps,\n }));\n }, [children, setContext]);\n\n return null;\n};\n","import { useContext, useEffect } from \"react\";\nimport { FormFieldContext } from \"./form-field.context\";\nimport type { FormFieldDescriptionSlotProps } from \"../form-field.slots\";\n\nexport const FormFieldDescription = ({\n children,\n ...descriptionSlotProps\n}: FormFieldDescriptionSlotProps) => {\n const { setContext } = useContext(FormFieldContext);\n\n useEffect(() => {\n setContext((prevContext) => ({\n ...prevContext,\n description: children,\n descriptionSlotProps,\n }));\n }, [children, setContext]);\n\n return null;\n};\n","import { useContext, useEffect } from \"react\";\nimport { FormFieldContext } from \"./form-field.context\";\nimport type { FormFieldErrorSlotProps } from \"../form-field.slots\";\n\nexport const FormFieldError = ({\n children,\n ...errorSlotProps\n}: FormFieldErrorSlotProps) => {\n const { setContext } = useContext(FormFieldContext);\n\n useEffect(() => {\n setContext((prevContext) => ({\n ...prevContext,\n error: children,\n errorSlotProps,\n }));\n }, [children, setContext]);\n\n return null;\n};\n","import { useContext, useEffect, type ReactNode } from \"react\";\nimport { FormFieldContext } from \"./form-field.context\";\n\ntype FormFieldInfoBoxProps = {\n /**\n * The content to display in the InfoBox\n */\n children: ReactNode;\n};\n\nexport const FormFieldInfoBox = ({ children }: FormFieldInfoBoxProps) => {\n const { setContext } = useContext(FormFieldContext);\n\n useEffect(() => {\n setContext((prevContext) => ({\n ...prevContext,\n info: children,\n }));\n }, [children, setContext]);\n\n return null;\n};\n","import { FormFieldRoot } from \"./components/form-field.root\";\nimport { FormFieldLabel } from \"./components/form-field.label\";\nimport { FormFieldInput } from \"./components/form-field.input\";\nimport { FormFieldDescription } from \"./components/form-field.description\";\nimport { FormFieldError } from \"./components/form-field.error\";\nimport { FormFieldInfoBox } from \"./components/form-field.info-box\";\n\nexport const FormField = {\n Root: FormFieldRoot,\n Label: FormFieldLabel,\n Input: FormFieldInput,\n Description: FormFieldDescription,\n Error: FormFieldError,\n InfoBox: FormFieldInfoBox,\n};\n\nexport {\n FormFieldRoot as _FormFieldRoot,\n FormFieldLabel as _FormFieldLabel,\n FormFieldInput as _FormFieldInput,\n FormFieldDescription as _FormFieldDescription,\n FormFieldError as _FormFieldError,\n FormFieldInfoBox as _FormFieldInfoBox,\n};\n"],"names":["FormFieldContext","createContext","columnLayout","rowLayout","formFieldRecipe","defineSlotRecipe","withProvider","withContext","createSlotRecipeContext","FormFieldRootSlot","FormFieldLabelSlot","FormFieldInputSlot","FormFieldDescriptionSlot","FormFieldErrorSlot","FormFieldPopoverSlot","FormFieldRoot","forwardRef","isInvalid","isRequired","isDisabled","isReadOnly","children","props","ref","context","setContext","useState","useFieldArgs","labelProps","fieldProps","descriptionProps","errorMessageProps","useField","useEffect","prevContext","inputProps","jsx","jsxs","DialogTrigger","Box","IconButton","HelpOutline","Popover","Dialog","Children","child","isValidElement","cloneElement","ErrorOutline","FormFieldLabel","labelSlotProps","useContext","FormFieldInput","inputSlotProps","FormFieldDescription","descriptionSlotProps","FormFieldError","errorSlotProps","FormFieldInfoBox","FormField"],"mappings":"wRA6BaA,EAAmBC,EAAAA,cAAoC,CAClE,QAAS,CACP,MAAO,KACP,YAAa,KACb,MAAO,KACP,KAAM,KACN,MAAO,IACT,EACA,WAAY,IAAM,CA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eAAAoC,CAAA,EACA,CAAA,EACD,CAACpC,EAAUI,CAAU,CAAC,EAElB,IACT,ECTaiC,EAAmB,CAAC,CAAE,SAAArC,KAAsC,CACvE,KAAM,CAAE,WAAAI,CAAA,EAAe0B,EAAA,WAAWnD,CAAgB,EAElDiC,OAAAA,EAAAA,UAAU,IAAM,CACdR,EAAYS,IAAiB,CAC3B,GAAGA,EACH,KAAMb,CAAA,EACN,CAAA,EACD,CAACA,EAAUI,CAAU,CAAC,EAElB,IACT,ECdakC,EAAY,CACvB,KAAM5C,EACN,MAAOkC,EACP,MAAOG,EACP,YAAaE,EACb,MAAOE,EACP,QAASE,CACX"}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { jsx as l, jsxs as c } from "react/jsx-runtime";
|
|
2
2
|
import { createContext as z, forwardRef as $, useState as P, useEffect as n, Children as w, isValidElement as A, cloneElement as E, useContext as d } from "react";
|
|
3
3
|
import { defineSlotRecipe as H, createSlotRecipeContext as y } from "@chakra-ui/react";
|
|
4
|
-
import { e as B, c as L, d as I } from "./Dialog-
|
|
4
|
+
import { e as B, c as L, d as I } from "./Dialog-DJv-Zg_L.js";
|
|
5
5
|
import { B as m } from "./box-DD4jYgS7.js";
|
|
6
|
-
import { I as M } from "./icon-button-
|
|
6
|
+
import { I as M } from "./icon-button-DVBfoOHT.js";
|
|
7
7
|
import { HelpOutline as R, ErrorOutline as T } from "@commercetools/nimbus-icons";
|
|
8
|
-
import { $ as W } from "./useField-
|
|
9
|
-
const a = z({
|
|
8
|
+
import { $ as W } from "./useField-BY58-2Ft.js";
|
|
9
|
+
const a = /* @__PURE__ */ z({
|
|
10
10
|
context: {
|
|
11
11
|
label: null,
|
|
12
12
|
description: null,
|
|
@@ -25,7 +25,7 @@ const a = z({
|
|
|
25
25
|
"label input"
|
|
26
26
|
"label description"
|
|
27
27
|
"label error"
|
|
28
|
-
`, N = H({
|
|
28
|
+
`, N = /* @__PURE__ */ H({
|
|
29
29
|
slots: ["root", "label", "input", "description", "error", "popover"],
|
|
30
30
|
// Unique class name prefix for the component
|
|
31
31
|
className: "nimbus-ui-form-field",
|
|
@@ -123,9 +123,9 @@ const a = z({
|
|
|
123
123
|
direction: "column",
|
|
124
124
|
size: "md"
|
|
125
125
|
}
|
|
126
|
-
}), { withProvider: V, withContext: p } = y({
|
|
126
|
+
}), { withProvider: V, withContext: p } = /* @__PURE__ */ y({
|
|
127
127
|
recipe: N
|
|
128
|
-
}), _ = V("div", "root"), G = p("div", "label"), O = p("div", "input"), D = p("div", "description"), J = p("div", "error"), K = p("div", "popover"), Q = $(
|
|
128
|
+
}), _ = /* @__PURE__ */ V("div", "root"), G = /* @__PURE__ */ p("div", "label"), O = /* @__PURE__ */ p("div", "input"), D = /* @__PURE__ */ p("div", "description"), J = /* @__PURE__ */ p("div", "error"), K = /* @__PURE__ */ p("div", "popover"), Q = /* @__PURE__ */ $(
|
|
129
129
|
({ isInvalid: r, isRequired: t, isDisabled: e, isReadOnly: i, children: b, ...g }, h) => {
|
|
130
130
|
const [o, u] = P({
|
|
131
131
|
label: null,
|
|
@@ -306,4 +306,4 @@ export {
|
|
|
306
306
|
Z as e,
|
|
307
307
|
q as f
|
|
308
308
|
};
|
|
309
|
-
//# sourceMappingURL=form-field-
|
|
309
|
+
//# sourceMappingURL=form-field-D_qT2LNU.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"form-field-Dr8lL5SU.js","sources":["../../src/components/form-field/components/form-field.context.tsx","../../src/components/form-field/form-field.recipe.tsx","../../src/components/form-field/form-field.slots.tsx","../../src/components/form-field/components/form-field.root.tsx","../../src/components/form-field/components/form-field.label.tsx","../../src/components/form-field/components/form-field.input.tsx","../../src/components/form-field/components/form-field.description.tsx","../../src/components/form-field/components/form-field.error.tsx","../../src/components/form-field/components/form-field.info-box.tsx","../../src/components/form-field/form-field.tsx"],"sourcesContent":["import { createContext, type ReactNode } from \"react\";\nimport type {\n FormFieldDescriptionSlotProps,\n FormFieldErrorSlotProps,\n FormFieldInputSlotProps,\n FormFieldLabelSlotProps,\n} from \"../form-field.slots\";\n\nexport type FormFieldContextPayloadType = {\n label: ReactNode;\n labelSlotProps?: FormFieldLabelSlotProps;\n input: ReactNode;\n inputSlotProps?: FormFieldInputSlotProps;\n description: ReactNode;\n descriptionSlotProps?: FormFieldDescriptionSlotProps;\n error: ReactNode;\n errorSlotProps?: FormFieldErrorSlotProps;\n info: ReactNode;\n isInvalid?: boolean;\n isRequired?: boolean;\n isDisabled?: boolean;\n isReadOnly?: boolean;\n};\n\nexport type FormFieldContextType = {\n context: FormFieldContextPayloadType;\n setContext: React.Dispatch<React.SetStateAction<FormFieldContextPayloadType>>;\n};\n\nexport const FormFieldContext = createContext<FormFieldContextType>({\n context: {\n label: null,\n description: null,\n error: null,\n info: null,\n input: null,\n },\n setContext: () => {},\n});\n","import { defineSlotRecipe } from \"@chakra-ui/react\";\n\nconst columnLayout = `\n\"label\"\n\"input\"\n\"description\"\n\"error\"\n`;\nconst rowLayout = `\n\"label input\"\n\"label description\"\n\"label error\"\n`;\n\n/**\n * Recipe configuration for the FormField component.\n * Defines the styling variants and base styles using Chakra UI's recipe system.\n */\nexport const formFieldRecipe = defineSlotRecipe({\n slots: [\"root\", \"label\", \"input\", \"description\", \"error\", \"popover\"],\n // Unique class name prefix for the component\n className: \"nimbus-ui-form-field\",\n\n base: {\n root: {\n \"--grid-gap\": \"spacing.100\",\n\n display: \"grid\",\n width: \"auto\",\n },\n label: {\n gridArea: \"label\",\n fontWeight: \"500\",\n color: \"neutral.11\",\n fontSize: \"var(--form-field-font-size)\",\n lineHeight: \"var(--form-field-line-height)\",\n },\n input: {\n gridArea: \"input\",\n },\n description: {\n gridArea: \"description\",\n color: \"neutral.11\",\n fontSize: \"var(--form-field-font-size)\",\n lineHeight: \"var(--form-field-line-height)\",\n },\n error: {\n gridArea: \"error\",\n color: \"critical.11\",\n fontSize: \"var(--form-field-font-size)\",\n lineHeight: \"var(--form-field-line-height)\",\n },\n popover: {\n \"--scrollbar-color\": \"colors.neutral.8\",\n \"--scrollbar-bg\": \"colors.neutral.3\",\n bg: \"neutral.1\",\n maxWidth: \"xl\",\n borderRadius: \"200\",\n boxShadow: \"6\",\n border: \"solid-25\",\n borderColor: \"neutral.8\",\n maxHeight: \"40svh\",\n overflow: \"auto\",\n scrollbarWidth: \"thin\",\n scrollbarColor: \"var(--scrollbar-color) var(--scrollbar-bg)\",\n focusRing: \"outside\",\n },\n },\n\n variants: {\n size: {\n md: {\n root: {\n \"--form-field-font-size\": \"fontSizes.350\",\n \"--form-field-line-height\": \"lineHeights.500\",\n },\n },\n sm: {\n root: {\n \"--form-field-font-size\": \"fontSizes.300\",\n \"--form-field-line-height\": \"lineHeights.450\",\n },\n },\n },\n direction: {\n column: {\n root: {\n gridTemplateAreas: columnLayout,\n },\n input: {\n mt: \"var(--grid-gap)\",\n },\n description: {\n mt: \"var(--grid-gap)\",\n },\n error: {\n mt: \"var(--grid-gap)\",\n },\n },\n row: {\n root: {\n gridTemplateAreas: rowLayout,\n gridTemplateColumns: \"auto 1fr\",\n gridColumnGap: \"200\",\n },\n description: {\n mt: \"var(--grid-gap)\",\n },\n error: {\n mt: \"var(--grid-gap)\",\n },\n },\n },\n },\n\n // Default variant values when not explicitly specified\n defaultVariants: {\n direction: \"column\",\n size: \"md\",\n },\n});\n","/* eslint-disable @typescript-eslint/no-empty-object-type */\nimport {\n type HTMLChakraProps,\n type RecipeVariantProps,\n type UnstyledProp,\n createSlotRecipeContext,\n} from \"@chakra-ui/react\";\n\nimport { formFieldRecipe } from \"./form-field.recipe\";\n\nconst { withProvider, withContext } = createSlotRecipeContext({\n recipe: formFieldRecipe,\n});\n\n// Root slot\nexport interface FormFieldRootSlotProps\n extends HTMLChakraProps<\n \"div\",\n RecipeVariantProps<typeof formFieldRecipe> & UnstyledProp\n > {}\n\nexport const FormFieldRootSlot = withProvider<\n HTMLDivElement,\n FormFieldRootSlotProps\n>(\"div\", \"root\");\n\n// Label Slot\nexport interface FormFieldLabelSlotProps extends HTMLChakraProps<\"div\"> {}\nexport const FormFieldLabelSlot = withContext<\n HTMLDivElement,\n FormFieldLabelSlotProps\n>(\"div\", \"label\");\n\n// Input Slot\nexport interface FormFieldInputSlotProps extends HTMLChakraProps<\"div\"> {}\nexport const FormFieldInputSlot = withContext<\n HTMLDivElement,\n FormFieldInputSlotProps\n>(\"div\", \"input\");\n\n// Description Slot\nexport interface FormFieldDescriptionSlotProps extends HTMLChakraProps<\"div\"> {}\nexport const FormFieldDescriptionSlot = withContext<\n HTMLDivElement,\n FormFieldDescriptionSlotProps\n>(\"div\", \"description\");\n\n// Error Slot\nexport interface FormFieldErrorSlotProps extends HTMLChakraProps<\"div\"> {}\nexport const FormFieldErrorSlot = withContext<\n HTMLDivElement,\n FormFieldErrorSlotProps\n>(\"div\", \"error\");\n\n// Error Slot\nexport interface FormFieldPopoverSlotProps extends HTMLChakraProps<\"div\"> {}\nexport const FormFieldPopoverSlot = withContext<\n HTMLDivElement,\n FormFieldPopoverSlotProps\n>(\"div\", \"popover\");\n","import {\n Children,\n cloneElement,\n forwardRef,\n isValidElement,\n useEffect,\n useState,\n} from \"react\";\nimport type { FormFieldProps } from \"../form-field.types\";\nimport { useField } from \"react-aria\";\nimport {\n FormFieldContext,\n type FormFieldContextPayloadType,\n} from \"./form-field.context\";\nimport {\n FormFieldDescriptionSlot,\n FormFieldErrorSlot,\n FormFieldInputSlot,\n FormFieldLabelSlot,\n FormFieldPopoverSlot,\n FormFieldRootSlot,\n} from \"../form-field.slots\";\nimport { Dialog, DialogTrigger, Popover } from \"react-aria-components\";\nimport { Box, IconButton } from \"@/components\";\nimport { ErrorOutline, HelpOutline } from \"@commercetools/nimbus-icons\";\n\n/**\n * FormField\n * ============================================================\n * displays inputs in a FormField context\n */\nexport const FormFieldRoot = forwardRef<HTMLDivElement, FormFieldProps>(\n (\n { isInvalid, isRequired, isDisabled, isReadOnly, children, ...props },\n ref\n ) => {\n const [context, setContext] = useState<FormFieldContextPayloadType>({\n label: null,\n description: null,\n error: null,\n info: null,\n input: null,\n isInvalid,\n isRequired,\n isDisabled,\n isReadOnly,\n });\n\n const useFieldArgs: Parameters<typeof useField>[0] = {\n description: context.description,\n errorMessage: context.error,\n };\n\n if (context.label) {\n useFieldArgs.label = context.label;\n } else {\n // Context will always start out null, so we need to stub out some aria attributes\n // FIXME: This is a hack to get the form field to work, but it's not the best solution\n // FIXME: We should find a better way to handle this by redesigning the FormField component's structure\n useFieldArgs[\"aria-label\"] = \"empty-label\";\n useFieldArgs[\"aria-labelledby\"] = \"empty-label\";\n }\n\n const { labelProps, fieldProps, descriptionProps, errorMessageProps } =\n useField(useFieldArgs);\n\n useEffect(() => {\n setContext((prevContext) => ({\n ...prevContext,\n isInvalid,\n isRequired,\n isDisabled,\n isReadOnly,\n }));\n }, [isInvalid, isRequired, isDisabled, isReadOnly]);\n\n const inputProps = {\n ...fieldProps,\n isInvalid,\n isRequired,\n isDisabled,\n isReadOnly,\n };\n\n return (\n <FormFieldContext.Provider value={{ context, setContext }}>\n <FormFieldRootSlot ref={ref} {...props}>\n {context.label && (\n <FormFieldLabelSlot {...context.labelSlotProps}>\n <label {...labelProps}>\n {context.label}\n {isRequired && <sup aria-hidden=\"true\">*</sup>}\n </label>\n {context.info && (\n <DialogTrigger>\n <Box\n as=\"span\"\n display=\"inline-block\"\n position=\"relative\"\n width=\"1ch\"\n height=\"1ch\"\n ml=\"200\"\n >\n <Box\n as=\"span\"\n display=\"inline-flex\"\n position=\"absolute\"\n top=\"50%\"\n right=\"50%\"\n transform=\"translate(50%, -50%)\"\n >\n <IconButton\n aria-label=\"__MORE INFO\"\n size=\"2xs\"\n tone=\"info\"\n variant=\"link\"\n >\n <HelpOutline />\n </IconButton>\n </Box>\n </Box>\n <Popover>\n <FormFieldPopoverSlot asChild>\n <Dialog>\n <Box p=\"300\">{context.info}</Box>\n </Dialog>\n </FormFieldPopoverSlot>\n </Popover>\n </DialogTrigger>\n )}\n </FormFieldLabelSlot>\n )}\n {context.input && (\n <FormFieldInputSlot {...context.inputSlotProps}>\n {Children.map(context.input, (child) => {\n // Important: Check if the child is a valid React element before cloning.\n if (isValidElement(child)) {\n return cloneElement(child, inputProps);\n }\n // If it's not a valid element (e.g., text node, null, undefined), return it as is.\n return child;\n })}\n </FormFieldInputSlot>\n )}\n {context.description && (\n <FormFieldDescriptionSlot\n {...descriptionProps}\n {...context.descriptionSlotProps}\n >\n {context.description}\n </FormFieldDescriptionSlot>\n )}\n {isInvalid && context.error && (\n <FormFieldErrorSlot\n {...errorMessageProps}\n {...context.errorSlotProps}\n >\n <Box\n as={ErrorOutline}\n display=\"inline-flex\"\n boxSize=\"400\"\n verticalAlign=\"text-bottom\"\n mr=\"100\"\n />\n {context.error}\n </FormFieldErrorSlot>\n )}\n {children}\n </FormFieldRootSlot>\n </FormFieldContext.Provider>\n );\n }\n);\n","import { useContext, useEffect } from \"react\";\nimport { FormFieldContext } from \"./form-field.context\";\nimport type { FormFieldLabelSlotProps } from \"../form-field.slots\";\n\nexport const FormFieldLabel = ({\n children,\n ...labelSlotProps\n}: FormFieldLabelSlotProps) => {\n const { setContext } = useContext(FormFieldContext);\n\n useEffect(() => {\n setContext((prevContext) => ({\n ...prevContext,\n label: children,\n labelSlotProps,\n }));\n }, [children, setContext]);\n\n return null;\n};\n","import { useContext, useEffect } from \"react\";\nimport { FormFieldContext } from \"./form-field.context\";\nimport type { FormFieldInputSlotProps } from \"../form-field.slots\";\n\nexport const FormFieldInput = ({\n children,\n ...inputSlotProps\n}: FormFieldInputSlotProps) => {\n const { setContext } = useContext(FormFieldContext);\n\n useEffect(() => {\n setContext((prevContext) => ({\n ...prevContext,\n input: children,\n inputSlotProps,\n }));\n }, [children, setContext]);\n\n return null;\n};\n","import { useContext, useEffect } from \"react\";\nimport { FormFieldContext } from \"./form-field.context\";\nimport type { FormFieldDescriptionSlotProps } from \"../form-field.slots\";\n\nexport const FormFieldDescription = ({\n children,\n ...descriptionSlotProps\n}: FormFieldDescriptionSlotProps) => {\n const { setContext } = useContext(FormFieldContext);\n\n useEffect(() => {\n setContext((prevContext) => ({\n ...prevContext,\n description: children,\n descriptionSlotProps,\n }));\n }, [children, setContext]);\n\n return null;\n};\n","import { useContext, useEffect } from \"react\";\nimport { FormFieldContext } from \"./form-field.context\";\nimport type { FormFieldErrorSlotProps } from \"../form-field.slots\";\n\nexport const FormFieldError = ({\n children,\n ...errorSlotProps\n}: FormFieldErrorSlotProps) => {\n const { setContext } = useContext(FormFieldContext);\n\n useEffect(() => {\n setContext((prevContext) => ({\n ...prevContext,\n error: children,\n errorSlotProps,\n }));\n }, [children, setContext]);\n\n return null;\n};\n","import { useContext, useEffect, type ReactNode } from \"react\";\nimport { FormFieldContext } from \"./form-field.context\";\n\ntype FormFieldInfoBoxProps = {\n /**\n * The content to display in the InfoBox\n */\n children: ReactNode;\n};\n\nexport const FormFieldInfoBox = ({ children }: FormFieldInfoBoxProps) => {\n const { setContext } = useContext(FormFieldContext);\n\n useEffect(() => {\n setContext((prevContext) => ({\n ...prevContext,\n info: children,\n }));\n }, [children, setContext]);\n\n return null;\n};\n","import { FormFieldRoot } from \"./components/form-field.root\";\nimport { FormFieldLabel } from \"./components/form-field.label\";\nimport { FormFieldInput } from \"./components/form-field.input\";\nimport { FormFieldDescription } from \"./components/form-field.description\";\nimport { FormFieldError } from \"./components/form-field.error\";\nimport { FormFieldInfoBox } from \"./components/form-field.info-box\";\n\nexport const FormField = {\n Root: FormFieldRoot,\n Label: FormFieldLabel,\n Input: FormFieldInput,\n Description: FormFieldDescription,\n Error: FormFieldError,\n InfoBox: FormFieldInfoBox,\n};\n\nexport {\n FormFieldRoot as _FormFieldRoot,\n FormFieldLabel as _FormFieldLabel,\n FormFieldInput as _FormFieldInput,\n FormFieldDescription as _FormFieldDescription,\n FormFieldError as _FormFieldError,\n FormFieldInfoBox as _FormFieldInfoBox,\n};\n"],"names":["FormFieldContext","createContext","columnLayout","rowLayout","formFieldRecipe","defineSlotRecipe","withProvider","withContext","createSlotRecipeContext","FormFieldRootSlot","FormFieldLabelSlot","FormFieldInputSlot","FormFieldDescriptionSlot","FormFieldErrorSlot","FormFieldPopoverSlot","FormFieldRoot","forwardRef","isInvalid","isRequired","isDisabled","isReadOnly","children","props","ref","context","setContext","useState","useFieldArgs","labelProps","fieldProps","descriptionProps","errorMessageProps","useField","useEffect","prevContext","inputProps","jsx","jsxs","DialogTrigger","Box","IconButton","HelpOutline","Popover","Dialog","Children","child","isValidElement","cloneElement","ErrorOutline","FormFieldLabel","labelSlotProps","useContext","FormFieldInput","inputSlotProps","FormFieldDescription","descriptionSlotProps","FormFieldError","errorSlotProps","FormFieldInfoBox","FormField"],"mappings":";;;;;;;;AA6BO,MAAMA,IAAmBC,EAAoC;AAAA,EAClE,SAAS;AAAA,IACP,OAAO;AAAA,IACP,aAAa;AAAA,IACb,OAAO;AAAA,IACP,MAAM;AAAA,IACN,OAAO;AAAA,EACT;AAAA,EACA,YAAY,MAAM;AAAA,EAAA;AACpB,CAAC,GCpCKC,IAAe;AAAA;AAAA;AAAA;AAAA;AAAA,GAMfC,IAAY;AAAA;AAAA;AAAA;AAAA,GAULC,IAAkBC,EAAiB;AAAA,EAC9C,OAAO,CAAC,QAAQ,SAAS,SAAS,eAAe,SAAS,SAAS;AAAA;AAAA,EAEnE,WAAW;AAAA,EAEX,MAAM;AAAA,IACJ,MAAM;AAAA,MACJ,cAAc;AAAA,MAEd,SAAS;AAAA,MACT,OAAO;AAAA,IACT;AAAA,IACA,OAAO;AAAA,MACL,UAAU;AAAA,MACV,YAAY;AAAA,MACZ,OAAO;AAAA,MACP,UAAU;AAAA,MACV,YAAY;AAAA,IACd;AAAA,IACA,OAAO;AAAA,MACL,UAAU;AAAA,IACZ;AAAA,IACA,aAAa;AAAA,MACX,UAAU;AAAA,MACV,OAAO;AAAA,MACP,UAAU;AAAA,MACV,YAAY;AAAA,IACd;AAAA,IACA,OAAO;AAAA,MACL,UAAU;AAAA,MACV,OAAO;AAAA,MACP,UAAU;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GAAGA;AAAA,MACH,OAAOb;AAAA,MACP,gBAAAgC;AAAA,IAAA,EACA;AAAA,EAAA,GACD,CAAChC,GAAUI,CAAU,CAAC,GAElB;AACT,GCfa6B,IAAuB,CAAC;AAAA,EACnC,UAAAjC;AAAA,EACA,GAAGkC;AACL,MAAqC;AACnC,QAAM,EAAE,YAAA9B,EAAA,IAAe0B,EAAWnD,CAAgB;AAElD,SAAAiC,EAAU,MAAM;AACd,IAAAR,EAAW,CAACS,OAAiB;AAAA,MAC3B,GAAGA;AAAA,MACH,aAAab;AAAA,MACb,sBAAAkC;AAAA,IAAA,EACA;AAAA,EAAA,GACD,CAAClC,GAAUI,CAAU,CAAC,GAElB;AACT,GCfa+B,IAAiB,CAAC;AAAA,EAC7B,UAAAnC;AAAA,EACA,GAAGoC;AACL,MAA+B;AAC7B,QAAM,EAAE,YAAAhC,EAAA,IAAe0B,EAAWnD,CAAgB;AAElD,SAAAiC,EAAU,MAAM;AACd,IAAAR,EAAW,CAACS,OAAiB;AAAA,MAC3B,GAAGA;AAAA,MACH,OAAOb;AAAA,MACP,gBAAAoC;AAAA,IAAA,EACA;AAAA,EAAA,GACD,CAACpC,GAAUI,CAAU,CAAC,GAElB;AACT,GCTaiC,IAAmB,CAAC,EAAE,UAAArC,QAAsC;AACvE,QAAM,EAAE,YAAAI,EAAA,IAAe0B,EAAWnD,CAAgB;AAElD,SAAAiC,EAAU,MAAM;AACd,IAAAR,EAAW,CAACS,OAAiB;AAAA,MAC3B,GAAGA;AAAA,MACH,MAAMb;AAAA,IAAA,EACN;AAAA,EAAA,GACD,CAACA,GAAUI,CAAU,CAAC,GAElB;AACT,GCdakC,KAAY;AAAA,EACvB,MAAM5C;AAAA,EACN,OAAOkC;AAAA,EACP,OAAOG;AAAA,EACP,aAAaE;AAAA,EACb,OAAOE;AAAA,EACP,SAASE;AACX;"}
|
|
1
|
+
{"version":3,"file":"form-field-D_qT2LNU.js","sources":["../../src/components/form-field/components/form-field.context.tsx","../../src/components/form-field/form-field.recipe.tsx","../../src/components/form-field/form-field.slots.tsx","../../src/components/form-field/components/form-field.root.tsx","../../src/components/form-field/components/form-field.label.tsx","../../src/components/form-field/components/form-field.input.tsx","../../src/components/form-field/components/form-field.description.tsx","../../src/components/form-field/components/form-field.error.tsx","../../src/components/form-field/components/form-field.info-box.tsx","../../src/components/form-field/form-field.tsx"],"sourcesContent":["import { createContext, type ReactNode } from \"react\";\nimport type {\n FormFieldDescriptionSlotProps,\n FormFieldErrorSlotProps,\n FormFieldInputSlotProps,\n FormFieldLabelSlotProps,\n} from \"../form-field.slots\";\n\nexport type FormFieldContextPayloadType = {\n label: ReactNode;\n labelSlotProps?: FormFieldLabelSlotProps;\n input: ReactNode;\n inputSlotProps?: FormFieldInputSlotProps;\n description: ReactNode;\n descriptionSlotProps?: FormFieldDescriptionSlotProps;\n error: ReactNode;\n errorSlotProps?: FormFieldErrorSlotProps;\n info: ReactNode;\n isInvalid?: boolean;\n isRequired?: boolean;\n isDisabled?: boolean;\n isReadOnly?: boolean;\n};\n\nexport type FormFieldContextType = {\n context: FormFieldContextPayloadType;\n setContext: React.Dispatch<React.SetStateAction<FormFieldContextPayloadType>>;\n};\n\nexport const FormFieldContext = createContext<FormFieldContextType>({\n context: {\n label: null,\n description: null,\n error: null,\n info: null,\n input: null,\n },\n setContext: () => {},\n});\n","import { defineSlotRecipe } from \"@chakra-ui/react\";\n\nconst columnLayout = `\n\"label\"\n\"input\"\n\"description\"\n\"error\"\n`;\nconst rowLayout = `\n\"label input\"\n\"label description\"\n\"label error\"\n`;\n\n/**\n * Recipe configuration for the FormField component.\n * Defines the styling variants and base styles using Chakra UI's recipe system.\n */\nexport const formFieldRecipe = defineSlotRecipe({\n slots: [\"root\", \"label\", \"input\", \"description\", \"error\", \"popover\"],\n // Unique class name prefix for the component\n className: \"nimbus-ui-form-field\",\n\n base: {\n root: {\n \"--grid-gap\": \"spacing.100\",\n\n display: \"grid\",\n width: \"auto\",\n },\n label: {\n gridArea: \"label\",\n fontWeight: \"500\",\n color: \"neutral.11\",\n fontSize: \"var(--form-field-font-size)\",\n lineHeight: \"var(--form-field-line-height)\",\n },\n input: {\n gridArea: \"input\",\n },\n description: {\n gridArea: \"description\",\n color: \"neutral.11\",\n fontSize: \"var(--form-field-font-size)\",\n lineHeight: \"var(--form-field-line-height)\",\n },\n error: {\n gridArea: \"error\",\n color: \"critical.11\",\n fontSize: \"var(--form-field-font-size)\",\n lineHeight: \"var(--form-field-line-height)\",\n },\n popover: {\n \"--scrollbar-color\": \"colors.neutral.8\",\n \"--scrollbar-bg\": \"colors.neutral.3\",\n bg: \"neutral.1\",\n maxWidth: \"xl\",\n borderRadius: \"200\",\n boxShadow: \"6\",\n border: \"solid-25\",\n borderColor: \"neutral.8\",\n maxHeight: \"40svh\",\n overflow: \"auto\",\n scrollbarWidth: \"thin\",\n scrollbarColor: \"var(--scrollbar-color) var(--scrollbar-bg)\",\n focusRing: \"outside\",\n },\n },\n\n variants: {\n size: {\n md: {\n root: {\n \"--form-field-font-size\": \"fontSizes.350\",\n \"--form-field-line-height\": \"lineHeights.500\",\n },\n },\n sm: {\n root: {\n \"--form-field-font-size\": \"fontSizes.300\",\n \"--form-field-line-height\": \"lineHeights.450\",\n },\n },\n },\n direction: {\n column: {\n root: {\n gridTemplateAreas: columnLayout,\n },\n input: {\n mt: \"var(--grid-gap)\",\n },\n description: {\n mt: \"var(--grid-gap)\",\n },\n error: {\n mt: \"var(--grid-gap)\",\n },\n },\n row: {\n root: {\n gridTemplateAreas: rowLayout,\n gridTemplateColumns: \"auto 1fr\",\n gridColumnGap: \"200\",\n },\n description: {\n mt: \"var(--grid-gap)\",\n },\n error: {\n mt: \"var(--grid-gap)\",\n },\n },\n },\n },\n\n // Default variant values when not explicitly specified\n defaultVariants: {\n direction: \"column\",\n size: \"md\",\n },\n});\n","/* eslint-disable @typescript-eslint/no-empty-object-type */\nimport {\n type HTMLChakraProps,\n type RecipeVariantProps,\n type UnstyledProp,\n createSlotRecipeContext,\n} from \"@chakra-ui/react\";\n\nimport { formFieldRecipe } from \"./form-field.recipe\";\n\nconst { withProvider, withContext } = createSlotRecipeContext({\n recipe: formFieldRecipe,\n});\n\n// Root slot\nexport interface FormFieldRootSlotProps\n extends HTMLChakraProps<\n \"div\",\n RecipeVariantProps<typeof formFieldRecipe> & UnstyledProp\n > {}\n\nexport const FormFieldRootSlot = withProvider<\n HTMLDivElement,\n FormFieldRootSlotProps\n>(\"div\", \"root\");\n\n// Label Slot\nexport interface FormFieldLabelSlotProps extends HTMLChakraProps<\"div\"> {}\nexport const FormFieldLabelSlot = withContext<\n HTMLDivElement,\n FormFieldLabelSlotProps\n>(\"div\", \"label\");\n\n// Input Slot\nexport interface FormFieldInputSlotProps extends HTMLChakraProps<\"div\"> {}\nexport const FormFieldInputSlot = withContext<\n HTMLDivElement,\n FormFieldInputSlotProps\n>(\"div\", \"input\");\n\n// Description Slot\nexport interface FormFieldDescriptionSlotProps extends HTMLChakraProps<\"div\"> {}\nexport const FormFieldDescriptionSlot = withContext<\n HTMLDivElement,\n FormFieldDescriptionSlotProps\n>(\"div\", \"description\");\n\n// Error Slot\nexport interface FormFieldErrorSlotProps extends HTMLChakraProps<\"div\"> {}\nexport const FormFieldErrorSlot = withContext<\n HTMLDivElement,\n FormFieldErrorSlotProps\n>(\"div\", \"error\");\n\n// Error Slot\nexport interface FormFieldPopoverSlotProps extends HTMLChakraProps<\"div\"> {}\nexport const FormFieldPopoverSlot = withContext<\n HTMLDivElement,\n FormFieldPopoverSlotProps\n>(\"div\", \"popover\");\n","import {\n Children,\n cloneElement,\n forwardRef,\n isValidElement,\n useEffect,\n useState,\n} from \"react\";\nimport type { FormFieldProps } from \"../form-field.types\";\nimport { useField } from \"react-aria\";\nimport {\n FormFieldContext,\n type FormFieldContextPayloadType,\n} from \"./form-field.context\";\nimport {\n FormFieldDescriptionSlot,\n FormFieldErrorSlot,\n FormFieldInputSlot,\n FormFieldLabelSlot,\n FormFieldPopoverSlot,\n FormFieldRootSlot,\n} from \"../form-field.slots\";\nimport { Dialog, DialogTrigger, Popover } from \"react-aria-components\";\nimport { Box, IconButton } from \"@/components\";\nimport { ErrorOutline, HelpOutline } from \"@commercetools/nimbus-icons\";\n\n/**\n * FormField\n * ============================================================\n * displays inputs in a FormField context\n */\nexport const FormFieldRoot = forwardRef<HTMLDivElement, FormFieldProps>(\n (\n { isInvalid, isRequired, isDisabled, isReadOnly, children, ...props },\n ref\n ) => {\n const [context, setContext] = useState<FormFieldContextPayloadType>({\n label: null,\n description: null,\n error: null,\n info: null,\n input: null,\n isInvalid,\n isRequired,\n isDisabled,\n isReadOnly,\n });\n\n const useFieldArgs: Parameters<typeof useField>[0] = {\n description: context.description,\n errorMessage: context.error,\n };\n\n if (context.label) {\n useFieldArgs.label = context.label;\n } else {\n // Context will always start out null, so we need to stub out some aria attributes\n // FIXME: This is a hack to get the form field to work, but it's not the best solution\n // FIXME: We should find a better way to handle this by redesigning the FormField component's structure\n useFieldArgs[\"aria-label\"] = \"empty-label\";\n useFieldArgs[\"aria-labelledby\"] = \"empty-label\";\n }\n\n const { labelProps, fieldProps, descriptionProps, errorMessageProps } =\n useField(useFieldArgs);\n\n useEffect(() => {\n setContext((prevContext) => ({\n ...prevContext,\n isInvalid,\n isRequired,\n isDisabled,\n isReadOnly,\n }));\n }, [isInvalid, isRequired, isDisabled, isReadOnly]);\n\n const inputProps = {\n ...fieldProps,\n isInvalid,\n isRequired,\n isDisabled,\n isReadOnly,\n };\n\n return (\n <FormFieldContext.Provider value={{ context, setContext }}>\n <FormFieldRootSlot ref={ref} {...props}>\n {context.label && (\n <FormFieldLabelSlot {...context.labelSlotProps}>\n <label {...labelProps}>\n {context.label}\n {isRequired && <sup aria-hidden=\"true\">*</sup>}\n </label>\n {context.info && (\n <DialogTrigger>\n <Box\n as=\"span\"\n display=\"inline-block\"\n position=\"relative\"\n width=\"1ch\"\n height=\"1ch\"\n ml=\"200\"\n >\n <Box\n as=\"span\"\n display=\"inline-flex\"\n position=\"absolute\"\n top=\"50%\"\n right=\"50%\"\n transform=\"translate(50%, -50%)\"\n >\n <IconButton\n aria-label=\"__MORE INFO\"\n size=\"2xs\"\n tone=\"info\"\n variant=\"link\"\n >\n <HelpOutline />\n </IconButton>\n </Box>\n </Box>\n <Popover>\n <FormFieldPopoverSlot asChild>\n <Dialog>\n <Box p=\"300\">{context.info}</Box>\n </Dialog>\n </FormFieldPopoverSlot>\n </Popover>\n </DialogTrigger>\n )}\n </FormFieldLabelSlot>\n )}\n {context.input && (\n <FormFieldInputSlot {...context.inputSlotProps}>\n {Children.map(context.input, (child) => {\n // Important: Check if the child is a valid React element before cloning.\n if (isValidElement(child)) {\n return cloneElement(child, inputProps);\n }\n // If it's not a valid element (e.g., text node, null, undefined), return it as is.\n return child;\n })}\n </FormFieldInputSlot>\n )}\n {context.description && (\n <FormFieldDescriptionSlot\n {...descriptionProps}\n {...context.descriptionSlotProps}\n >\n {context.description}\n </FormFieldDescriptionSlot>\n )}\n {isInvalid && context.error && (\n <FormFieldErrorSlot\n {...errorMessageProps}\n {...context.errorSlotProps}\n >\n <Box\n as={ErrorOutline}\n display=\"inline-flex\"\n boxSize=\"400\"\n verticalAlign=\"text-bottom\"\n mr=\"100\"\n />\n {context.error}\n </FormFieldErrorSlot>\n )}\n {children}\n </FormFieldRootSlot>\n </FormFieldContext.Provider>\n );\n }\n);\n","import { useContext, useEffect } from \"react\";\nimport { FormFieldContext } from \"./form-field.context\";\nimport type { FormFieldLabelSlotProps } from \"../form-field.slots\";\n\nexport const FormFieldLabel = ({\n children,\n ...labelSlotProps\n}: FormFieldLabelSlotProps) => {\n const { setContext } = useContext(FormFieldContext);\n\n useEffect(() => {\n setContext((prevContext) => ({\n ...prevContext,\n label: children,\n labelSlotProps,\n }));\n }, [children, setContext]);\n\n return null;\n};\n","import { useContext, useEffect } from \"react\";\nimport { FormFieldContext } from \"./form-field.context\";\nimport type { FormFieldInputSlotProps } from \"../form-field.slots\";\n\nexport const FormFieldInput = ({\n children,\n ...inputSlotProps\n}: FormFieldInputSlotProps) => {\n const { setContext } = useContext(FormFieldContext);\n\n useEffect(() => {\n setContext((prevContext) => ({\n ...prevContext,\n input: children,\n inputSlotProps,\n }));\n }, [children, setContext]);\n\n return null;\n};\n","import { useContext, useEffect } from \"react\";\nimport { FormFieldContext } from \"./form-field.context\";\nimport type { FormFieldDescriptionSlotProps } from \"../form-field.slots\";\n\nexport const FormFieldDescription = ({\n children,\n ...descriptionSlotProps\n}: FormFieldDescriptionSlotProps) => {\n const { setContext } = useContext(FormFieldContext);\n\n useEffect(() => {\n setContext((prevContext) => ({\n ...prevContext,\n description: children,\n descriptionSlotProps,\n }));\n }, [children, setContext]);\n\n return null;\n};\n","import { useContext, useEffect } from \"react\";\nimport { FormFieldContext } from \"./form-field.context\";\nimport type { FormFieldErrorSlotProps } from \"../form-field.slots\";\n\nexport const FormFieldError = ({\n children,\n ...errorSlotProps\n}: FormFieldErrorSlotProps) => {\n const { setContext } = useContext(FormFieldContext);\n\n useEffect(() => {\n setContext((prevContext) => ({\n ...prevContext,\n error: children,\n errorSlotProps,\n }));\n }, [children, setContext]);\n\n return null;\n};\n","import { useContext, useEffect, type ReactNode } from \"react\";\nimport { FormFieldContext } from \"./form-field.context\";\n\ntype FormFieldInfoBoxProps = {\n /**\n * The content to display in the InfoBox\n */\n children: ReactNode;\n};\n\nexport const FormFieldInfoBox = ({ children }: FormFieldInfoBoxProps) => {\n const { setContext } = useContext(FormFieldContext);\n\n useEffect(() => {\n setContext((prevContext) => ({\n ...prevContext,\n info: children,\n }));\n }, [children, setContext]);\n\n return null;\n};\n","import { FormFieldRoot } from \"./components/form-field.root\";\nimport { FormFieldLabel } from \"./components/form-field.label\";\nimport { FormFieldInput } from \"./components/form-field.input\";\nimport { FormFieldDescription } from \"./components/form-field.description\";\nimport { FormFieldError } from \"./components/form-field.error\";\nimport { FormFieldInfoBox } from \"./components/form-field.info-box\";\n\nexport const FormField = {\n Root: FormFieldRoot,\n Label: FormFieldLabel,\n Input: FormFieldInput,\n Description: FormFieldDescription,\n Error: FormFieldError,\n InfoBox: FormFieldInfoBox,\n};\n\nexport {\n FormFieldRoot as _FormFieldRoot,\n FormFieldLabel as _FormFieldLabel,\n FormFieldInput as _FormFieldInput,\n FormFieldDescription as _FormFieldDescription,\n FormFieldError as _FormFieldError,\n FormFieldInfoBox as _FormFieldInfoBox,\n};\n"],"names":["FormFieldContext","createContext","columnLayout","rowLayout","formFieldRecipe","defineSlotRecipe","withProvider","withContext","createSlotRecipeContext","FormFieldRootSlot","FormFieldLabelSlot","FormFieldInputSlot","FormFieldDescriptionSlot","FormFieldErrorSlot","FormFieldPopoverSlot","FormFieldRoot","forwardRef","isInvalid","isRequired","isDisabled","isReadOnly","children","props","ref","context","setContext","useState","useFieldArgs","labelProps","fieldProps","descriptionProps","errorMessageProps","useField","useEffect","prevContext","inputProps","jsx","jsxs","DialogTrigger","Box","IconButton","HelpOutline","Popover","Dialog","Children","child","isValidElement","cloneElement","ErrorOutline","FormFieldLabel","labelSlotProps","useContext","FormFieldInput","inputSlotProps","FormFieldDescription","descriptionSlotProps","FormFieldError","errorSlotProps","FormFieldInfoBox","FormField"],"mappings":";;;;;;;;AA6BO,MAAMA,IAAmB,gBAAAC,EAAoC;AAAA,EAClE,SAAS;AAAA,IACP,OAAO;AAAA,IACP,aAAa;AAAA,IACb,OAAO;AAAA,IACP,MAAM;AAAA,IACN,OAAO;AAAA,EACT;AAAA,EACA,YAAY,MAAM;AAAA,EAAA;AACpB,CAAC,GCpCKC,IAAe;AAAA;AAAA;AAAA;AAAA;AAAA,GAMfC,IAAY;AAAA;AAAA;AAAA;AAAA,GAULC,IAAkB,gBAAAC,EAAiB;AAAA,EAC9C,OAAO,CAAC,QAAQ,SAAS,SAAS,eAAe,SAAS,SAAS;AAAA;AAAA,EAEnE,WAAW;AAAA,EAEX,MAAM;AAAA,IACJ,MAAM;AAAA,MACJ,cAAc;AAAA,MAEd,SAAS;AAAA,MACT,OAAO;AAAA,IACT;A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D,SAAAiC,EAAU,MAAM;AACd,IAAAR,EAAW,CAACS,OAAiB;AAAA,MAC3B,GAAGA;AAAA,MACH,MAAMb;AAAA,IAAA,EACN;AAAA,EAAA,GACD,CAACA,GAAUI,CAAU,CAAC,GAElB;AACT,GCdakC,KAAY;AAAA,EACvB,MAAM5C;AAAA,EACN,OAAOkC;AAAA,EACP,OAAOG;AAAA,EACP,aAAaE;AAAA,EACb,OAAOE;AAAA,EACP,SAASE;AACX;"}
|
|
@@ -5,10 +5,10 @@ const r = (t) => {
|
|
|
5
5
|
return /* @__PURE__ */ i(m, { ref: o, ...s });
|
|
6
6
|
};
|
|
7
7
|
r.displayName = "Grid";
|
|
8
|
-
const G = Object.assign(r, {
|
|
8
|
+
const G = /* @__PURE__ */ Object.assign(r, {
|
|
9
9
|
Item: e
|
|
10
10
|
});
|
|
11
11
|
export {
|
|
12
12
|
G
|
|
13
13
|
};
|
|
14
|
-
//# sourceMappingURL=grid-
|
|
14
|
+
//# sourceMappingURL=grid-CugcJxRP.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"grid-
|
|
1
|
+
{"version":3,"file":"grid-CugcJxRP.js","sources":["../../src/components/grid/grid.tsx"],"sourcesContent":["import {\n Grid as ChakraGrid,\n GridItem,\n type GridProps as ChakraGridProps,\n} from \"@chakra-ui/react\";\n\n/**\n * Grid\n * ============================================================\n * The Grid Layout Component provides a flexible and responsive way to structure content using a two-dimensional grid system. It allows elements to be arranged in rows and columns, enabling dynamic and efficient layouts for different screen sizes.\n *\n * Features:\n *\n * - allows forwarding refs to the underlying DOM element\n */\nexport interface GridProps extends ChakraGridProps {\n children?: React.ReactNode;\n ref?: React.Ref<HTMLDivElement>;\n}\n\nconst GridComponent = (props: GridProps) => {\n const { ref, ...restProps } = props;\n return <ChakraGrid ref={ref} {...restProps} />;\n};\n\nGridComponent.displayName = \"Grid\";\n\nexport const Grid = Object.assign(GridComponent, {\n Item: GridItem,\n});\n"],"names":["GridComponent","props","ref","restProps","jsx","ChakraGrid","Grid","GridItem"],"mappings":";;AAoBA,MAAMA,IAAgB,CAACC,MAAqB;AAC1C,QAAM,EAAE,KAAAC,GAAK,GAAGC,EAAA,IAAcF;AAC9B,SAAQ,gBAAAG,EAAAC,GAAA,EAAW,KAAAH,GAAW,GAAGC,EAAW,CAAA;AAC9C;AAEAH,EAAc,cAAc;AAEf,MAAAM,IAAO,uBAAO,OAAON,GAAe;AAAA,EAC/C,MAAMO;AACR,CAAC;"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as s } from "react/jsx-runtime";
|
|
2
2
|
import { defineRecipe as t, createRecipeContext as n } from "@chakra-ui/react";
|
|
3
|
-
const c = t({
|
|
3
|
+
const c = /* @__PURE__ */ t({
|
|
4
4
|
className: "nimbus-icon",
|
|
5
5
|
base: {
|
|
6
6
|
display: "inline-block"
|
|
@@ -18,7 +18,7 @@ const c = t({
|
|
|
18
18
|
xl: { boxSize: "1400" }
|
|
19
19
|
}
|
|
20
20
|
}
|
|
21
|
-
}), { withContext: r } = n({ recipe: c }), x = r(
|
|
21
|
+
}), { withContext: r } = /* @__PURE__ */ n({ recipe: c }), x = /* @__PURE__ */ r(
|
|
22
22
|
"svg"
|
|
23
23
|
), a = (o) => {
|
|
24
24
|
const { ref: i, ...e } = o;
|
|
@@ -28,4 +28,4 @@ a.displayName = "Icon";
|
|
|
28
28
|
export {
|
|
29
29
|
a as I
|
|
30
30
|
};
|
|
31
|
-
//# sourceMappingURL=icon-
|
|
31
|
+
//# sourceMappingURL=icon-BFNYuilh.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"icon-
|
|
1
|
+
{"version":3,"file":"icon-BFNYuilh.js","sources":["../../src/components/icon/icon.recipe.tsx","../../src/components/icon/icon.slots.tsx","../../src/components/icon/icon.tsx"],"sourcesContent":["import { defineRecipe } from \"@chakra-ui/react\";\n\n/**\n * Recipe configuration for the Icon component.\n * Defines the styling variants and base styles using Chakra UI's recipe system.\n */\nexport const iconRecipe = defineRecipe({\n className: \"nimbus-icon\",\n base: {\n display: \"inline-block\",\n },\n\n variants: {\n /**\n * allows applying a predefined size to the icon\n */\n size: {\n \"2xs\": { boxSize: \"600\" },\n xs: { boxSize: \"800\" },\n sm: { boxSize: \"900\" },\n md: { boxSize: \"1000\" },\n lg: { boxSize: \"1200\" },\n xl: { boxSize: \"1400\" },\n },\n },\n});\n","import {\n type HTMLChakraProps,\n type RecipeProps,\n type UnstyledProp,\n createRecipeContext,\n} from \"@chakra-ui/react\";\n\nimport { iconRecipe } from \"./icon.recipe\";\n\n/**\n * Base recipe props interface that combines Chakra UI's recipe props\n * with the unstyled prop option for the svg element.\n */\ninterface IconRecipeProps extends RecipeProps<\"svg\">, UnstyledProp {}\n\n/**\n * Root props interface that extends Chakra's HTML props with our recipe props.\n * This creates a complete set of props for the root element, combining\n * HTML attributes, Chakra's styling system, and our custom recipe props.\n */\nexport interface IconRootSlotProps\n extends HTMLChakraProps<\"svg\", IconRecipeProps> {}\n\nconst { withContext } = createRecipeContext({ recipe: iconRecipe });\n\n/**\n * Root component that provides the styling context for the Icon component.\n * Uses Chakra UI's recipe context system for consistent styling across instances.\n */\nexport const IconRootSlot = withContext<SVGSVGElement, IconRootSlotProps>(\n \"svg\"\n);\n","import { IconRootSlot } from \"./icon.slots\";\nimport type { IconProps } from \"./icon.types\";\n\n/**\n * Icon\n * displays icon components\n */\nexport const Icon = (props: IconProps) => {\n const { ref, ...restProps } = props;\n return <IconRootSlot ref={ref} asChild={!restProps.as} {...restProps} />;\n};\n\nIcon.displayName = \"Icon\";\n"],"names":["iconRecipe","defineRecipe","withContext","createRecipeContext","IconRootSlot","Icon","props","ref","restProps","jsx"],"mappings":";;AAMO,MAAMA,IAAa,gBAAAC,EAAa;AAAA,EACrC,WAAW;AAAA,EACX,MAAM;AAAA,IACJ,SAAS;AAAA,EACX;AAAA,EAEA,UAAU;AAAA;AAAA;AAAA;AAAA,IAIR,MAAM;AAAA,MACJ,OAAO,EAAE,SAAS,MAAM;AAAA,MACxB,IAAI,EAAE,SAAS,MAAM;AAAA,MACrB,IAAI,EAAE,SAAS,MAAM;AAAA,MACrB,IAAI,EAAE,SAAS,OAAO;AAAA,MACtB,IAAI,EAAE,SAAS,OAAO;AAAA,MACtB,IAAI,EAAE,SAAS,OAAO;AAAA,IAAA;AAAA,EACxB;AAEJ,CAAC,GCFK,EAAE,aAAAC,EAAY,IAAI,gBAAAC,EAAoB,EAAE,QAAQH,GAAY,GAMrDI,IAAe,gBAAAF;AAAA,EAC1B;AACF,GCxBaG,IAAO,CAACC,MAAqB;AACxC,QAAM,EAAE,KAAAC,GAAK,GAAGC,EAAA,IAAcF;AACvB,SAAA,gBAAAG,EAACL,KAAa,KAAAG,GAAU,SAAS,CAACC,EAAU,IAAK,GAAGA,GAAW;AACxE;AAEAH,EAAK,cAAc;"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as m } from "react/jsx-runtime";
|
|
2
2
|
import { useRef as n } from "react";
|
|
3
3
|
import { mergeRefs as p } from "@chakra-ui/react";
|
|
4
|
-
import { B as a } from "./button-
|
|
4
|
+
import { B as a } from "./button-zSDA7FRw.js";
|
|
5
5
|
import { $ as c } from "./useObjectRef-CaJ5pgjX.js";
|
|
6
6
|
const i = (o) => {
|
|
7
7
|
const { children: r, ref: t, ...e } = o, f = n(null), s = c(p(f, t));
|
|
@@ -11,4 +11,4 @@ i.displayName = "IconButton";
|
|
|
11
11
|
export {
|
|
12
12
|
i as I
|
|
13
13
|
};
|
|
14
|
-
//# sourceMappingURL=icon-button-
|
|
14
|
+
//# sourceMappingURL=icon-button-DVBfoOHT.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"icon-button-
|
|
1
|
+
{"version":3,"file":"icon-button-DVBfoOHT.js","sources":["../../src/components/icon-button/icon-button.tsx"],"sourcesContent":["import { useRef } from \"react\";\nimport { useObjectRef } from \"react-aria\";\nimport { mergeRefs } from \"@chakra-ui/react\";\nimport type { IconButtonProps } from \"./icon-button.types\";\nimport { Button } from \"@/components\";\n\n/**\n * IconButton\n * ============================================================\n * displays a button with only an icon as child. It is based\n * on the regular `Button` component, but with a few adjustments.\n */\nexport const IconButton = (props: IconButtonProps) => {\n const { children, ref: forwardedRef, ...restProps } = props;\n\n // Create a local ref and merge with forwarded ref\n const localRef = useRef<HTMLButtonElement>(null);\n const ref = useObjectRef(mergeRefs(localRef, forwardedRef));\n\n return (\n <Button px={0} py={0} {...restProps} ref={ref}>\n {children}\n </Button>\n );\n};\n\nIconButton.displayName = \"IconButton\";\n"],"names":["IconButton","props","children","forwardedRef","restProps","localRef","useRef","ref","useObjectRef","mergeRefs","jsx","Button"],"mappings":";;;;;AAYa,MAAAA,IAAa,CAACC,MAA2B;AACpD,QAAM,EAAE,UAAAC,GAAU,KAAKC,GAAc,GAAGC,EAAc,IAAAH,GAGhDI,IAAWC,EAA0B,IAAI,GACzCC,IAAMC,EAAaC,EAAUJ,GAAUF,CAAY,CAAC;AAGxD,SAAA,gBAAAO,EAACC,KAAO,IAAI,GAAG,IAAI,GAAI,GAAGP,GAAW,KAAAG,GAClC,UAAAL,EACH,CAAA;AAEJ;AAEAF,EAAW,cAAc;"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";const u=require("react/jsx-runtime"),f=require("react"),i=require("@chakra-ui/react"),a=require("./button-
|
|
2
|
-
//# sourceMappingURL=icon-button-
|
|
1
|
+
"use strict";const u=require("react/jsx-runtime"),f=require("react"),i=require("@chakra-ui/react"),a=require("./button-BLZONb0_.js"),d=require("./useObjectRef-4v2MxSjQ.js"),e=t=>{const{children:r,ref:n,...o}=t,s=f.useRef(null),c=d.$df56164dff5785e2$export$4338b53315abf666(i.mergeRefs(s,n));return u.jsx(a.Button,{px:0,py:0,...o,ref:c,children:r})};e.displayName="IconButton";exports.IconButton=e;
|
|
2
|
+
//# sourceMappingURL=icon-button-Ds1Wzyc1.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"icon-button-
|
|
1
|
+
{"version":3,"file":"icon-button-Ds1Wzyc1.js","sources":["../../src/components/icon-button/icon-button.tsx"],"sourcesContent":["import { useRef } from \"react\";\nimport { useObjectRef } from \"react-aria\";\nimport { mergeRefs } from \"@chakra-ui/react\";\nimport type { IconButtonProps } from \"./icon-button.types\";\nimport { Button } from \"@/components\";\n\n/**\n * IconButton\n * ============================================================\n * displays a button with only an icon as child. It is based\n * on the regular `Button` component, but with a few adjustments.\n */\nexport const IconButton = (props: IconButtonProps) => {\n const { children, ref: forwardedRef, ...restProps } = props;\n\n // Create a local ref and merge with forwarded ref\n const localRef = useRef<HTMLButtonElement>(null);\n const ref = useObjectRef(mergeRefs(localRef, forwardedRef));\n\n return (\n <Button px={0} py={0} {...restProps} ref={ref}>\n {children}\n </Button>\n );\n};\n\nIconButton.displayName = \"IconButton\";\n"],"names":["IconButton","props","children","forwardedRef","restProps","localRef","useRef","ref","useObjectRef","mergeRefs","jsx","Button"],"mappings":"6KAYaA,EAAcC,GAA2B,CACpD,KAAM,CAAE,SAAAC,EAAU,IAAKC,EAAc,GAAGC,CAAc,EAAAH,EAGhDI,EAAWC,SAA0B,IAAI,EACzCC,EAAMC,EAAA,0CAAaC,EAAU,UAAAJ,EAAUF,CAAY,CAAC,EAGxD,OAAAO,MAACC,EAAAA,QAAO,GAAI,EAAG,GAAI,EAAI,GAAGP,EAAW,IAAAG,EAClC,SAAAL,CACH,CAAA,CAEJ,EAEAF,EAAW,YAAc"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";const h=require("react/jsx-runtime"),T=require("react"),P=require("@chakra-ui/react"),g=require("./link.recipe-CG3leGAx.js"),v=require("./useObjectRef-4v2MxSjQ.js"),$=require("./mergeProps-BeIu4MsM.js"),D=require("./filterDOMProps-BS2lrgFA.js"),i=require("./usePress-
|
|
2
|
-
//# sourceMappingURL=link-
|
|
1
|
+
"use strict";const h=require("react/jsx-runtime"),T=require("react"),P=require("@chakra-ui/react"),g=require("./link.recipe-CG3leGAx.js"),v=require("./useObjectRef-4v2MxSjQ.js"),$=require("./mergeProps-BeIu4MsM.js"),D=require("./filterDOMProps-BS2lrgFA.js"),i=require("./usePress-CGAMyl6q.js"),L=require("./useFocusable-DbCayKl8.js");function y(e,s){let{elementType:n="a",onPress:a,onPressStart:d,onPressEnd:c,onClick:l,isDisabled:t,...f}=e,o={};n!=="a"&&(o={role:"link",tabIndex:t?void 0:0});let{focusableProps:x}=L.$f645667febf57a63$export$4c014de7c8940b4c(e,s),{pressProps:u,isPressed:R}=i.$f6c31cce2adf654f$export$45712eceda6fad21({onPress:a,onPressStart:d,onPressEnd:c,onClick:l,isDisabled:t,ref:s}),m=D.$65484d02dcb7eb3e$export$457c3d6518dd4c6f(f,{labelable:!0}),q=$.$3ef42575df84b30b$export$9d1611c77c2fe928(x,u),p=i.$ea8dcbcb9ea1b556$export$9a302a45f65d0572(),C=i.$ea8dcbcb9ea1b556$export$7e924b3091a3bd18(e);return{isPressed:R,linkProps:$.$3ef42575df84b30b$export$9d1611c77c2fe928(m,C,{...q,...o,"aria-disabled":t||void 0,"aria-current":e["aria-current"],onClick:r=>{var b;(b=u.onClick)===null||b===void 0||b.call(u,r),!p.isNative&&r.currentTarget instanceof HTMLAnchorElement&&r.currentTarget.href&&!r.isDefaultPrevented()&&i.$ea8dcbcb9ea1b556$export$efa8c9099e530235(r.currentTarget,r)&&e.href&&(r.preventDefault(),p.open(r.currentTarget,r,e.href,e.routerOptions))}})}}const{withContext:E}=P.createRecipeContext({recipe:g.linkRecipe}),S=E("a"),k=e=>{const{as:s,asChild:n,children:a,ref:d,...c}=e,l=T.useRef(null),t=v.$df56164dff5785e2$export$4338b53315abf666(P.mergeRefs(l,d)),f=s||(n?"span":"a")||"a",{linkProps:o}=y({...c,elementType:f},t);return h.jsx(S,{...$.$3ef42575df84b30b$export$9d1611c77c2fe928(c,o,{as:s,asChild:n,ref:t}),children:a})};k.displayName="Link";exports.Link=k;
|
|
2
|
+
//# sourceMappingURL=link-BfHXJGo9.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"link-
|
|
1
|
+
{"version":3,"file":"link-BfHXJGo9.js","sources":["../../../../node_modules/.pnpm/@react-aria+link@3.8.3_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/@react-aria/link/dist/useLink.mjs","../../src/components/link/link.slots.tsx","../../src/components/link/link.tsx"],"sourcesContent":["import {filterDOMProps as $5Ot33$filterDOMProps, mergeProps as $5Ot33$mergeProps, useRouter as $5Ot33$useRouter, useLinkProps as $5Ot33$useLinkProps, shouldClientNavigate as $5Ot33$shouldClientNavigate} from \"@react-aria/utils\";\nimport {useFocusable as $5Ot33$useFocusable, usePress as $5Ot33$usePress} from \"@react-aria/interactions\";\n\n/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */ \n\nfunction $298d61e98472621b$export$dcf14c9974fe2767(props, ref) {\n let { elementType: elementType = 'a', onPress: onPress, onPressStart: onPressStart, onPressEnd: onPressEnd, onClick: onClick, isDisabled: isDisabled, ...otherProps } = props;\n let linkProps = {};\n if (elementType !== 'a') linkProps = {\n role: 'link',\n tabIndex: !isDisabled ? 0 : undefined\n };\n let { focusableProps: focusableProps } = (0, $5Ot33$useFocusable)(props, ref);\n let { pressProps: pressProps, isPressed: isPressed } = (0, $5Ot33$usePress)({\n onPress: onPress,\n onPressStart: onPressStart,\n onPressEnd: onPressEnd,\n onClick: onClick,\n isDisabled: isDisabled,\n ref: ref\n });\n let domProps = (0, $5Ot33$filterDOMProps)(otherProps, {\n labelable: true\n });\n let interactionHandlers = (0, $5Ot33$mergeProps)(focusableProps, pressProps);\n let router = (0, $5Ot33$useRouter)();\n let routerLinkProps = (0, $5Ot33$useLinkProps)(props);\n return {\n isPressed: isPressed,\n linkProps: (0, $5Ot33$mergeProps)(domProps, routerLinkProps, {\n ...interactionHandlers,\n ...linkProps,\n 'aria-disabled': isDisabled || undefined,\n 'aria-current': props['aria-current'],\n onClick: (e)=>{\n var _pressProps_onClick;\n (_pressProps_onClick = pressProps.onClick) === null || _pressProps_onClick === void 0 ? void 0 : _pressProps_onClick.call(pressProps, e);\n // If a custom router is provided, prevent default and forward if this link should client navigate.\n if (!router.isNative && e.currentTarget instanceof HTMLAnchorElement && e.currentTarget.href && // If props are applied to a router Link component, it may have already prevented default.\n !e.isDefaultPrevented() && (0, $5Ot33$shouldClientNavigate)(e.currentTarget, e) && props.href) {\n e.preventDefault();\n router.open(e.currentTarget, e, props.href, props.routerOptions);\n }\n }\n })\n };\n}\n\n\nexport {$298d61e98472621b$export$dcf14c9974fe2767 as useLink};\n//# sourceMappingURL=useLink.module.js.map\n","import {\n type HTMLChakraProps,\n type RecipeProps,\n type UnstyledProp,\n createRecipeContext,\n} from \"@chakra-ui/react\";\n\nimport { linkRecipe } from \"./link.recipe\";\n\n/**\n * Base recipe props interface that combines Chakra UI's recipe props\n * with the unstyled prop option for the a element.\n */\ninterface LinkRecipeProps extends RecipeProps<\"a\">, UnstyledProp {}\n\n/**\n * Root props interface that extends Chakra's HTML props with our recipe props.\n * This creates a complete set of props for the root element, combining\n * HTML attributes, Chakra's styling system, and our custom recipe props.\n */\nexport type LinkRootProps = HTMLChakraProps<\"a\", LinkRecipeProps>;\n\nconst { withContext } = createRecipeContext({ recipe: linkRecipe });\n\n/**\n * Root component that provides the styling context for the Link component.\n * Uses Chakra UI's recipe context system for consistent styling across instances.\n */\nexport const LinkRoot = withContext<HTMLAnchorElement, LinkRootProps>(\"a\");\n","import { useRef } from \"react\";\nimport { LinkRoot } from \"./link.slots\";\nimport type { LinkProps } from \"./link.types\";\nimport { useLink, useObjectRef, mergeProps } from \"react-aria\";\nimport { mergeRefs } from \"@chakra-ui/react\";\n\n/**\n * Link\n * ============================================================\n * To allow a user to navigate to a different page or resource\n *\n * Features:\n *\n * - allows forwarding refs to the underlying DOM element\n * - accepts all native html 'HTMLAnchorElement' attributes (including aria- & data-attributes)\n * - supports 'variants', 'sizes', etc. configured in the recipe\n * - allows overriding styles by using style-props\n * - supports 'asChild' and 'as' to modify the underlying html-element (polymorphic)\n */\nexport const Link = (props: LinkProps) => {\n const { as, asChild, children, ref: forwardedRef, ...rest } = props;\n\n const localRef = useRef<HTMLAnchorElement>(null);\n const ref = useObjectRef(mergeRefs(localRef, forwardedRef));\n\n const elementType = (as as string) || (asChild ? \"span\" : \"a\") || \"a\";\n const { linkProps } = useLink({ ...rest, elementType }, ref);\n\n return (\n <LinkRoot {...mergeProps(rest, linkProps, { as, asChild, ref })}>\n {children}\n </LinkRoot>\n );\n};\n\nLink.displayName = \"Link\";\n"],"names":["$298d61e98472621b$export$dcf14c9974fe2767","props","ref","elementType","onPress","onPressStart","onPressEnd","onClick","isDisabled","otherProps","linkProps","focusableProps","$5Ot33$useFocusable","pressProps","isPressed","$5Ot33$usePress","domProps","$5Ot33$filterDOMProps","interactionHandlers","$5Ot33$mergeProps","router","$5Ot33$useRouter","routerLinkProps","$5Ot33$useLinkProps","e","_pressProps_onClick","$5Ot33$shouldClientNavigate","withContext","createRecipeContext","linkRecipe","LinkRoot","Link","as","asChild","children","forwardedRef","rest","localRef","useRef","useObjectRef","mergeRefs","useLink","jsx","mergeProps"],"mappings":"8UAeA,SAASA,EAA0CC,EAAOC,EAAK,CAC3D,GAAI,CAAE,YAAaC,EAAc,IAAK,QAASC,EAAS,aAAcC,EAAc,WAAYC,EAAY,QAASC,EAAS,WAAYC,EAAY,GAAGC,CAAU,EAAKR,EACpKS,EAAY,CAAE,EACdP,IAAgB,MAAKO,EAAY,CACjC,KAAM,OACN,S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B,IAAkBC,EAAU,OAAS,MAAQ,IAC5D,CAAE,UAAAvB,GAAc+B,EAAQ,CAAE,GAAGL,EAAM,YAAAjC,CAAY,EAAGD,CAAG,EAE3D,OACGwC,EAAA,IAAAZ,EAAA,CAAU,GAAGa,EAAAA,0CAAWP,EAAM1B,EAAW,CAAE,GAAAsB,EAAI,QAAAC,EAAS,IAAA/B,EAAK,EAC3D,SAAAgC,CACH,CAAA,CAEJ,EAEAH,EAAK,YAAc","x_google_ignoreList":[0]}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { jsx as C } from "react/jsx-runtime";
|
|
2
2
|
import { useRef as h } from "react";
|
|
3
3
|
import { createRecipeContext as T, mergeRefs as R } from "@chakra-ui/react";
|
|
4
|
-
import { l as v } from "./link.recipe-
|
|
4
|
+
import { l as v } from "./link.recipe-Ba2by0OG.js";
|
|
5
5
|
import { $ as L } from "./useObjectRef-CaJ5pgjX.js";
|
|
6
|
-
import { $ } from "./mergeProps-
|
|
6
|
+
import { $ } from "./mergeProps-tCFA9wZ1.js";
|
|
7
7
|
import { $ as g } from "./filterDOMProps-D6KHYVBX.js";
|
|
8
|
-
import { $ as D, a as y, b as E, c as S } from "./usePress-
|
|
9
|
-
import { $ as w } from "./useFocusable-
|
|
8
|
+
import { $ as D, a as y, b as E, c as S } from "./usePress-Dk0M2Js8.js";
|
|
9
|
+
import { $ as w } from "./useFocusable-DBEQCS1T.js";
|
|
10
10
|
function H(e, o) {
|
|
11
11
|
let { elementType: s = "a", onPress: i, onPressStart: c, onPressEnd: n, onClick: f, isDisabled: t, ...l } = e, a = {};
|
|
12
12
|
s !== "a" && (a = {
|
|
@@ -38,7 +38,7 @@ function H(e, o) {
|
|
|
38
38
|
})
|
|
39
39
|
};
|
|
40
40
|
}
|
|
41
|
-
const { withContext: N } = T({ recipe: v }), _ = N("a"), j = (e) => {
|
|
41
|
+
const { withContext: N } = /* @__PURE__ */ T({ recipe: v }), _ = /* @__PURE__ */ N("a"), j = (e) => {
|
|
42
42
|
const { as: o, asChild: s, children: i, ref: c, ...n } = e, f = h(null), t = L(R(f, c)), l = o || (s ? "span" : "a") || "a", { linkProps: a } = H({ ...n, elementType: l }, t);
|
|
43
43
|
return /* @__PURE__ */ C(_, { ...$(n, a, { as: o, asChild: s, ref: t }), children: i });
|
|
44
44
|
};
|
|
@@ -46,4 +46,4 @@ j.displayName = "Link";
|
|
|
46
46
|
export {
|
|
47
47
|
j as L
|
|
48
48
|
};
|
|
49
|
-
//# sourceMappingURL=link-
|
|
49
|
+
//# sourceMappingURL=link-CE73eHS0.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"link-
|
|
1
|
+
{"version":3,"file":"link-CE73eHS0.js","sources":["../../../../node_modules/.pnpm/@react-aria+link@3.8.3_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/@react-aria/link/dist/useLink.mjs","../../src/components/link/link.slots.tsx","../../src/components/link/link.tsx"],"sourcesContent":["import {filterDOMProps as $5Ot33$filterDOMProps, mergeProps as $5Ot33$mergeProps, useRouter as $5Ot33$useRouter, useLinkProps as $5Ot33$useLinkProps, shouldClientNavigate as $5Ot33$shouldClientNavigate} from \"@react-aria/utils\";\nimport {useFocusable as $5Ot33$useFocusable, usePress as $5Ot33$usePress} from \"@react-aria/interactions\";\n\n/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */ \n\nfunction $298d61e98472621b$export$dcf14c9974fe2767(props, ref) {\n let { elementType: elementType = 'a', onPress: onPress, onPressStart: onPressStart, onPressEnd: onPressEnd, onClick: onClick, isDisabled: isDisabled, ...otherProps } = props;\n let linkProps = {};\n if (elementType !== 'a') linkProps = {\n role: 'link',\n tabIndex: !isDisabled ? 0 : undefined\n };\n let { focusableProps: focusableProps } = (0, $5Ot33$useFocusable)(props, ref);\n let { pressProps: pressProps, isPressed: isPressed } = (0, $5Ot33$usePress)({\n onPress: onPress,\n onPressStart: onPressStart,\n onPressEnd: onPressEnd,\n onClick: onClick,\n isDisabled: isDisabled,\n ref: ref\n });\n let domProps = (0, $5Ot33$filterDOMProps)(otherProps, {\n labelable: true\n });\n let interactionHandlers = (0, $5Ot33$mergeProps)(focusableProps, pressProps);\n let router = (0, $5Ot33$useRouter)();\n let routerLinkProps = (0, $5Ot33$useLinkProps)(props);\n return {\n isPressed: isPressed,\n linkProps: (0, $5Ot33$mergeProps)(domProps, routerLinkProps, {\n ...interactionHandlers,\n ...linkProps,\n 'aria-disabled': isDisabled || undefined,\n 'aria-current': props['aria-current'],\n onClick: (e)=>{\n var _pressProps_onClick;\n (_pressProps_onClick = pressProps.onClick) === null || _pressProps_onClick === void 0 ? void 0 : _pressProps_onClick.call(pressProps, e);\n // If a custom router is provided, prevent default and forward if this link should client navigate.\n if (!router.isNative && e.currentTarget instanceof HTMLAnchorElement && e.currentTarget.href && // If props are applied to a router Link component, it may have already prevented default.\n !e.isDefaultPrevented() && (0, $5Ot33$shouldClientNavigate)(e.currentTarget, e) && props.href) {\n e.preventDefault();\n router.open(e.currentTarget, e, props.href, props.routerOptions);\n }\n }\n })\n };\n}\n\n\nexport {$298d61e98472621b$export$dcf14c9974fe2767 as useLink};\n//# sourceMappingURL=useLink.module.js.map\n","import {\n type HTMLChakraProps,\n type RecipeProps,\n type UnstyledProp,\n createRecipeContext,\n} from \"@chakra-ui/react\";\n\nimport { linkRecipe } from \"./link.recipe\";\n\n/**\n * Base recipe props interface that combines Chakra UI's recipe props\n * with the unstyled prop option for the a element.\n */\ninterface LinkRecipeProps extends RecipeProps<\"a\">, UnstyledProp {}\n\n/**\n * Root props interface that extends Chakra's HTML props with our recipe props.\n * This creates a complete set of props for the root element, combining\n * HTML attributes, Chakra's styling system, and our custom recipe props.\n */\nexport type LinkRootProps = HTMLChakraProps<\"a\", LinkRecipeProps>;\n\nconst { withContext } = createRecipeContext({ recipe: linkRecipe });\n\n/**\n * Root component that provides the styling context for the Link component.\n * Uses Chakra UI's recipe context system for consistent styling across instances.\n */\nexport const LinkRoot = withContext<HTMLAnchorElement, LinkRootProps>(\"a\");\n","import { useRef } from \"react\";\nimport { LinkRoot } from \"./link.slots\";\nimport type { LinkProps } from \"./link.types\";\nimport { useLink, useObjectRef, mergeProps } from \"react-aria\";\nimport { mergeRefs } from \"@chakra-ui/react\";\n\n/**\n * Link\n * ============================================================\n * To allow a user to navigate to a different page or resource\n *\n * Features:\n *\n * - allows forwarding refs to the underlying DOM element\n * - accepts all native html 'HTMLAnchorElement' attributes (including aria- & data-attributes)\n * - supports 'variants', 'sizes', etc. configured in the recipe\n * - allows overriding styles by using style-props\n * - supports 'asChild' and 'as' to modify the underlying html-element (polymorphic)\n */\nexport const Link = (props: LinkProps) => {\n const { as, asChild, children, ref: forwardedRef, ...rest } = props;\n\n const localRef = useRef<HTMLAnchorElement>(null);\n const ref = useObjectRef(mergeRefs(localRef, forwardedRef));\n\n const elementType = (as as string) || (asChild ? \"span\" : \"a\") || \"a\";\n const { linkProps } = useLink({ ...rest, elementType }, ref);\n\n return (\n <LinkRoot {...mergeProps(rest, linkProps, { as, asChild, ref })}>\n {children}\n </LinkRoot>\n );\n};\n\nLink.displayName = \"Link\";\n"],"names":["$298d61e98472621b$export$dcf14c9974fe2767","props","ref","elementType","onPress","onPressStart","onPressEnd","onClick","isDisabled","otherProps","linkProps","focusableProps","$5Ot33$useFocusable","pressProps","isPressed","$5Ot33$usePress","domProps","$5Ot33$filterDOMProps","interactionHandlers","$5Ot33$mergeProps","router","$5Ot33$useRouter","routerLinkProps","$5Ot33$useLinkProps","e","_pressProps_onClick","$5Ot33$shouldClientNavigate","withContext","createRecipeContext","linkRecipe","LinkRoot","Link","as","asChild","children","forwardedRef","rest","localRef","useRef","useObjectRef","mergeRefs","useLink","jsx","mergeProps"],"mappings":";;;;;;;;;AAeA,SAASA,EAA0CC,GAAOC,GAAK;AAC3D,MAAI,EAAE,aAAaC,IAAc,KAAK,SAASC,GAAS,cAAcC,GAAc,YAAYC,GAAY,SAASC,GAAS,YAAYC,GAAY,GAAGC,EAAU,IAAKR,GACpKS,IAAY,CAAE;AAClB,EAAIP,MAAgB,QAAKO,IAAY;AAAA,IACjC,MAAM;AAAA,IACN,UAAWF,IAAiB,SAAJ;AAAA,EAC3B;AACD,MAAI,EAAE,gBAAgBG,EAAc,IAASC,EAAqBX,GAAOC,CAAG,GACxE,EAAE,YAAYW,GAAY,WAAWC,EAAS,IAASC,EAAiB;AAAA,IACxE,SAASX;AAAA,IACT,cAAcC;AAAA,IACd,YAAYC;AAAA,IACZ,SAASC;AAAA,IACT,YAAYC;AAAA,IACZ,KAAKN;AAAA,EACb,CAAK,GACGc,IAAeC,EAAuBR,GAAY;AAAA,IAClD,WAAW;AAAA,EACnB,CAAK,GACGS,IAA0BC,EAAmBR,GAAgBE,CAAU,GACvEO,IAAaC,EAAmB,GAChCC,IAAsBC,EAAqBtB,CAAK;AACpD,SAAO;AAAA,IACH,WAAWa;AAAA,IACX,WAAeK,EAAmBH,GAAUM,GAAiB;AAAA,MACzD,GAAGJ;AAAA,MACH,GAAGR;AAAA,MACH,iBAAiBF,KAAc;AAAA,MAC/B,gBAAgBP,EAAM,cAAc;AAAA,MACpC,SAAS,CAACuB,MAAI;AACV,YAAIC;AACJ,SAACA,IAAsBZ,EAAW,aAAa,QAAQY,MAAwB,UAAkBA,EAAoB,KAAKZ,GAAYW,CAAC,GAEnI,CAACJ,EAAO,YAAYI,EAAE,yBAAyB,qBAAqBA,EAAE,cAAc;AAAA,QACxF,CAACA,EAAE,mBAAoB,KAAQE,EAA6BF,EAAE,eAAeA,CAAC,KAAKvB,EAAM,SACrFuB,EAAE,eAAgB,GAClBJ,EAAO,KAAKI,EAAE,eAAeA,GAAGvB,EAAM,MAAMA,EAAM,aAAa;AAAA,MAEnF;AAAA,IACS,CAAA;AAAA,EACJ;AACL;AClCA,MAAM,EAAE,aAAA0B,EAAY,IAAI,gBAAAC,EAAoB,EAAE,QAAQC,GAAY,GAMrDC,IAAW,gBAAAH,EAA8C,GAAG,GCT5DI,IAAO,CAAC9B,MAAqB;AAClC,QAAA,EAAE,IAAA+B,GAAI,SAAAC,GAAS,UAAAC,GAAU,KAAKC,GAAc,GAAGC,MAASnC,GAExDoC,IAAWC,EAA0B,IAAI,GACzCpC,IAAMqC,EAAaC,EAAUH,GAAUF,CAAY,CAAC,GAEpDhC,IAAe6B,MAAkBC,IAAU,SAAS,QAAQ,KAC5D,EAAE,WAAAvB,MAAc+B,EAAQ,EAAE,GAAGL,GAAM,aAAAjC,EAAY,GAAGD,CAAG;AAE3D,SACG,gBAAAwC,EAAAZ,GAAA,EAAU,GAAGa,EAAWP,GAAM1B,GAAW,EAAE,IAAAsB,GAAI,SAAAC,GAAS,KAAA/B,GAAK,GAC3D,UAAAgC,EACH,CAAA;AAEJ;AAEAH,EAAK,cAAc;","x_google_ignoreList":[0]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineRecipe as e } from "@chakra-ui/react";
|
|
2
|
-
const n = e({
|
|
2
|
+
const n = /* @__PURE__ */ e({
|
|
3
3
|
className: "nimbus-link",
|
|
4
4
|
// Base styles applied to all instances of the component
|
|
5
5
|
base: {
|
|
@@ -48,4 +48,4 @@ const n = e({
|
|
|
48
48
|
export {
|
|
49
49
|
n as l
|
|
50
50
|
};
|
|
51
|
-
//# sourceMappingURL=link.recipe-
|
|
51
|
+
//# sourceMappingURL=link.recipe-Ba2by0OG.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"link.recipe-
|
|
1
|
+
{"version":3,"file":"link.recipe-Ba2by0OG.js","sources":["../../src/components/link/link.recipe.ts"],"sourcesContent":["import { defineRecipe } from \"@chakra-ui/react\";\n\n/**\n * Recipe configuration for the Link component.\n * Defines the styling variants and base styles using Chakra UI's recipe system.\n */\nexport const linkRecipe = defineRecipe({\n className: \"nimbus-link\",\n // Base styles applied to all instances of the component\n base: {\n display: \"inline-flex\",\n alignItems: \"center\",\n color: \"colorPalette.11\",\n borderRadius: \"100\",\n focusVisibleRing: \"outside\",\n bg: \"transparent\",\n outline: \"none\",\n cursor: \"pointer\",\n textDecoration: \"underline\",\n textUnderlineOffset: \"3px\",\n _hover: {\n textDecorationThickness: \"12%\",\n },\n },\n // Available variants for customizing the component's appearance\n variants: {\n // Size variants from smallest to largest\n size: {\n xs: {\n fontSize: \"300\",\n lineHeight: \"450\",\n },\n sm: {\n fontSize: \"350\",\n lineHeight: \"500\",\n },\n md: {\n fontSize: \"400\",\n lineHeight: \"600\",\n },\n },\n // style variants\n fontColor: {\n primary: {\n color: \"primary\",\n },\n inherit: {\n color: \"inherit\",\n },\n },\n },\n});\n"],"names":["linkRecipe","defineRecipe"],"mappings":";AAMO,MAAMA,IAAa,gBAAAC,EAAa;AAAA,EACrC,WAAW;AAAA;AAAA,EAEX,MAAM;AAAA,IACJ,SAAS;AAAA,IACT,YAAY;AAAA,IACZ,OAAO;AAAA,IACP,cAAc;AAAA,IACd,kBAAkB;AAAA,IAClB,IAAI;AAAA,IACJ,SAAS;AAAA,IACT,QAAQ;AAAA,IACR,gBAAgB;AAAA,IAChB,qBAAqB;AAAA,IACrB,QAAQ;AAAA,MACN,yBAAyB;AAAA,IAAA;AAAA,EAE7B;AAAA;AAAA,EAEA,UAAU;AAAA;AAAA,IAER,MAAM;AAAA,MACJ,IAAI;AAAA,QACF,UAAU;AAAA,QACV,YAAY;AAAA,MACd;AAAA,MACA,IAAI;AAAA,QACF,UAAU;AAAA,QACV,YAAY;AAAA,MACd;AAAA,MACA,IAAI;AAAA,QACF,UAAU;AAAA,QACV,YAAY;AAAA,MAAA;AAAA,IAEhB;AAAA;AAAA,IAEA,WAAW;AAAA,MACT,SAAS;AAAA,QACP,OAAO;AAAA,MACT;AAAA,MACA,SAAS;AAAA,QACP,OAAO;AAAA,MAAA;AAAA,IACT;AAAA,EACF;AAEJ,CAAC;"}
|