@commercetools/nimbus 0.0.9-rc6 → 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/accordion.d.ts +157 -0
- package/dist/alert.d.ts +173 -0
- package/dist/avatar.d.ts +70 -0
- package/dist/badge.d.ts +102 -0
- package/dist/box.d.ts +14 -0
- package/dist/button.d.ts +38 -0
- package/dist/calendar.d.ts +26 -0
- package/dist/card.d.ts +134 -0
- package/dist/checkbox.d.ts +73 -0
- package/dist/chunks/Button-BxcMDv2N.js +79 -0
- package/dist/chunks/Button-BxcMDv2N.js.map +1 -0
- package/dist/chunks/Button-tPOlfQRd.js +2 -0
- package/dist/chunks/Button-tPOlfQRd.js.map +1 -0
- package/dist/chunks/DateField-CaR3Qeda.js +2564 -0
- package/dist/chunks/DateField-CaR3Qeda.js.map +1 -0
- package/dist/chunks/DateField-D3h6vCMK.js +2 -0
- package/dist/chunks/DateField-D3h6vCMK.js.map +1 -0
- package/dist/chunks/Dialog-5VrXdl86.js +2 -0
- package/dist/chunks/Dialog-5VrXdl86.js.map +1 -0
- package/dist/chunks/Dialog-DJv-Zg_L.js +870 -0
- package/dist/chunks/Dialog-DJv-Zg_L.js.map +1 -0
- package/dist/chunks/FocusScope-CsXy0kJw.js +627 -0
- package/dist/chunks/FocusScope-CsXy0kJw.js.map +1 -0
- package/dist/chunks/FocusScope-Cysx7oI0.js +2 -0
- package/dist/chunks/FocusScope-Cysx7oI0.js.map +1 -0
- package/dist/chunks/Form-DdaqVtM4.js +8 -0
- package/dist/chunks/Form-DdaqVtM4.js.map +1 -0
- package/dist/chunks/Form-DqkTf3LZ.js +2 -0
- package/dist/chunks/Form-DqkTf3LZ.js.map +1 -0
- package/dist/chunks/Group-CTpcJZmt.js +2 -0
- package/dist/chunks/Group-CTpcJZmt.js.map +1 -0
- package/dist/chunks/Group-D3CaEDfr.js +78 -0
- package/dist/chunks/Group-D3CaEDfr.js.map +1 -0
- package/dist/chunks/Hidden-CNJIJ63M.js +2 -0
- package/dist/chunks/Hidden-CNJIJ63M.js.map +1 -0
- package/dist/chunks/Hidden-CeBYiBUb.js +28 -0
- package/dist/chunks/Hidden-CeBYiBUb.js.map +1 -0
- package/dist/chunks/Input-0vJb_5Js.js +43 -0
- package/dist/chunks/Input-0vJb_5Js.js.map +1 -0
- package/dist/chunks/Input-rMOtwpe-.js +2 -0
- package/dist/chunks/Input-rMOtwpe-.js.map +1 -0
- package/dist/chunks/ListBox-Dmkou3Hm.js +18 -0
- package/dist/chunks/ListBox-Dmkou3Hm.js.map +1 -0
- package/dist/chunks/ListBox-Dss9OMcn.js +3004 -0
- package/dist/chunks/ListBox-Dss9OMcn.js.map +1 -0
- package/dist/chunks/LiveAnnouncer-B6177m92.js +52 -0
- package/dist/chunks/LiveAnnouncer-B6177m92.js.map +1 -0
- package/dist/chunks/LiveAnnouncer-CwEWPU8b.js +2 -0
- package/dist/chunks/LiveAnnouncer-CwEWPU8b.js.map +1 -0
- package/dist/chunks/NumberFormatter-DewVDY5w.js +2 -0
- package/dist/chunks/NumberFormatter-DewVDY5w.js.map +1 -0
- package/dist/chunks/NumberFormatter-DgOUVrge.js +120 -0
- package/dist/chunks/NumberFormatter-DgOUVrge.js.map +1 -0
- package/dist/chunks/OverlayArrow-Bs2caVoG.js +2 -0
- package/dist/chunks/OverlayArrow-Bs2caVoG.js.map +1 -0
- package/dist/chunks/OverlayArrow-qjQZbu8u.js +479 -0
- package/dist/chunks/OverlayArrow-qjQZbu8u.js.map +1 -0
- package/dist/chunks/RSPContexts-AkhSBHGO.js +6 -0
- package/dist/chunks/RSPContexts-AkhSBHGO.js.map +1 -0
- package/dist/chunks/RSPContexts-CIAIlAKH.js +2 -0
- package/dist/chunks/RSPContexts-CIAIlAKH.js.map +1 -0
- package/dist/chunks/SSRProvider-DZRLwxPS.js +2 -0
- package/dist/chunks/SSRProvider-DZRLwxPS.js.map +1 -0
- package/dist/chunks/SSRProvider-eIEwc-2s.js +51 -0
- package/dist/chunks/SSRProvider-eIEwc-2s.js.map +1 -0
- package/dist/chunks/Text-BWSfeB9p.js +2 -0
- package/dist/chunks/Text-BWSfeB9p.js.map +1 -0
- package/dist/chunks/Text-DOcU1ycg.js +6 -0
- package/dist/chunks/Text-DOcU1ycg.js.map +1 -0
- package/dist/chunks/TextArea-BfVV0_3h.js +2 -0
- package/dist/chunks/TextArea-BfVV0_3h.js.map +1 -0
- package/dist/chunks/TextArea-Q-NI2yW5.js +42 -0
- package/dist/chunks/TextArea-Q-NI2yW5.js.map +1 -0
- package/dist/chunks/VisuallyHidden-2REhp9RT.js +41 -0
- package/dist/chunks/VisuallyHidden-2REhp9RT.js.map +1 -0
- package/dist/chunks/VisuallyHidden-Cg0LJ1Dh.js +2 -0
- package/dist/chunks/VisuallyHidden-Cg0LJ1Dh.js.map +1 -0
- package/dist/chunks/accordion-D4Qqg89m.js +221 -0
- package/dist/chunks/accordion-D4Qqg89m.js.map +1 -0
- package/dist/chunks/accordion-vrKLW-re.js +2 -0
- package/dist/chunks/accordion-vrKLW-re.js.map +1 -0
- package/dist/chunks/alert-B738R1TJ.js +2 -0
- package/dist/chunks/alert-B738R1TJ.js.map +1 -0
- package/dist/chunks/alert-BX5IPnc_.js +186 -0
- package/dist/chunks/alert-BX5IPnc_.js.map +1 -0
- package/dist/chunks/avatar-85FE_L0r.js +37 -0
- package/dist/chunks/avatar-85FE_L0r.js.map +1 -0
- package/dist/chunks/avatar-Aa0LrRpo.js +2 -0
- package/dist/chunks/avatar-Aa0LrRpo.js.map +1 -0
- package/dist/chunks/avatar.recipe-BSmmqvwQ.js +39 -0
- package/dist/chunks/avatar.recipe-BSmmqvwQ.js.map +1 -0
- package/dist/chunks/avatar.recipe-aGNBZhVF.js +2 -0
- package/dist/chunks/avatar.recipe-aGNBZhVF.js.map +1 -0
- package/dist/chunks/badge-BFbBB0US.js +2 -0
- package/dist/chunks/badge-BFbBB0US.js.map +1 -0
- package/dist/chunks/badge-C1bFH3CB.js +76 -0
- package/dist/chunks/badge-C1bFH3CB.js.map +1 -0
- package/dist/chunks/box-DD4jYgS7.js +11 -0
- package/dist/chunks/box-DD4jYgS7.js.map +1 -0
- package/dist/chunks/box-FU6tRPFs.js +2 -0
- package/dist/chunks/box-FU6tRPFs.js.map +1 -0
- package/dist/chunks/button-BLZONb0_.js +2 -0
- package/dist/chunks/button-BLZONb0_.js.map +1 -0
- package/dist/chunks/button-zSDA7FRw.js +66 -0
- package/dist/chunks/button-zSDA7FRw.js.map +1 -0
- package/dist/chunks/button.recipe-DHk13lGU.js +2 -0
- package/dist/chunks/button.recipe-DHk13lGU.js.map +1 -0
- package/dist/chunks/button.recipe-DzOS_Bqm.js +191 -0
- package/dist/chunks/button.recipe-DzOS_Bqm.js.map +1 -0
- package/dist/chunks/calendar-BIB7Bqqn.js +1577 -0
- package/dist/chunks/calendar-BIB7Bqqn.js.map +1 -0
- package/dist/chunks/calendar-DRE_oZOp.js +2 -0
- package/dist/chunks/calendar-DRE_oZOp.js.map +1 -0
- package/dist/chunks/calendar.recipe-B2sMokBn.js +101 -0
- package/dist/chunks/calendar.recipe-B2sMokBn.js.map +1 -0
- package/dist/chunks/calendar.recipe-gUaUNltl.js +2 -0
- package/dist/chunks/calendar.recipe-gUaUNltl.js.map +1 -0
- package/dist/chunks/card-DAC7L3R0.js +2 -0
- package/dist/chunks/card-DAC7L3R0.js.map +1 -0
- package/dist/chunks/card-DSC-PYAU.js +138 -0
- package/dist/chunks/card-DSC-PYAU.js.map +1 -0
- package/dist/chunks/checkbox-B1w8RLi0.js +2 -0
- package/dist/chunks/checkbox-B1w8RLi0.js.map +1 -0
- package/dist/chunks/checkbox-CJQ1O9W5.js +89 -0
- package/dist/chunks/checkbox-CJQ1O9W5.js.map +1 -0
- package/dist/chunks/code-CI8aUhmu.js +6 -0
- package/dist/chunks/code-CI8aUhmu.js.map +1 -0
- package/dist/chunks/code-Dg4Larbo.js +2 -0
- package/dist/chunks/code-Dg4Larbo.js.map +1 -0
- package/dist/chunks/combobox-DLABf790.js +2 -0
- package/dist/chunks/combobox-DLABf790.js.map +1 -0
- package/dist/chunks/combobox-ZcHPms3T.js +1896 -0
- package/dist/chunks/combobox-ZcHPms3T.js.map +1 -0
- package/dist/chunks/combobox.recipe-BIn4O0NT.js +407 -0
- package/dist/chunks/combobox.recipe-BIn4O0NT.js.map +1 -0
- package/dist/chunks/combobox.recipe-Da71Y6ye.js +2 -0
- package/dist/chunks/combobox.recipe-Da71Y6ye.js.map +1 -0
- package/dist/chunks/context-BmQ51HC8.js +2 -0
- package/dist/chunks/context-BmQ51HC8.js.map +1 -0
- package/dist/chunks/context-CI0Y3O6x.js +94 -0
- package/dist/chunks/context-CI0Y3O6x.js.map +1 -0
- package/dist/chunks/date-input-DnjW061n.js +2 -0
- package/dist/chunks/date-input-DnjW061n.js.map +1 -0
- package/dist/chunks/date-input-tzOJ2b9K.js +16 -0
- package/dist/chunks/date-input-tzOJ2b9K.js.map +1 -0
- package/dist/chunks/date-input.recipe-BtWEmJGK.js +119 -0
- package/dist/chunks/date-input.recipe-BtWEmJGK.js.map +1 -0
- package/dist/chunks/date-input.recipe-Cf9e8VAr.js +2 -0
- package/dist/chunks/date-input.recipe-Cf9e8VAr.js.map +1 -0
- package/dist/chunks/date-picker-BOJn_b_Y.js +2 -0
- package/dist/chunks/date-picker-BOJn_b_Y.js.map +1 -0
- package/dist/chunks/date-picker-npElUeVw.js +483 -0
- package/dist/chunks/date-picker-npElUeVw.js.map +1 -0
- package/dist/chunks/date-picker.recipe-5Avb06qp.js +2 -0
- package/dist/chunks/date-picker.recipe-5Avb06qp.js.map +1 -0
- package/dist/chunks/date-picker.recipe-Dy6NmKHA.js +82 -0
- package/dist/chunks/date-picker.recipe-Dy6NmKHA.js.map +1 -0
- package/dist/chunks/dialog-C1HRMUcF.js +33 -0
- package/dist/chunks/dialog-C1HRMUcF.js.map +1 -0
- package/dist/chunks/dialog-amEwvIoM.js +2 -0
- package/dist/chunks/dialog-amEwvIoM.js.map +1 -0
- package/dist/chunks/extractStyleProps-CxgBrz3O.js +11 -0
- package/dist/chunks/extractStyleProps-CxgBrz3O.js.map +1 -0
- package/dist/chunks/extractStyleProps-lyk7D-zN.js +2 -0
- package/dist/chunks/extractStyleProps-lyk7D-zN.js.map +1 -0
- package/dist/chunks/filterDOMProps-BS2lrgFA.js +2 -0
- package/dist/chunks/filterDOMProps-BS2lrgFA.js.map +1 -0
- package/dist/chunks/filterDOMProps-D6KHYVBX.js +25 -0
- package/dist/chunks/filterDOMProps-D6KHYVBX.js.map +1 -0
- package/dist/chunks/focusSafely-DKDcdc1Z.js +36 -0
- package/dist/chunks/focusSafely-DKDcdc1Z.js.map +1 -0
- package/dist/chunks/focusSafely-DTxIMq-P.js +2 -0
- package/dist/chunks/focusSafely-DTxIMq-P.js.map +1 -0
- package/dist/chunks/form-field-CblzjGEw.js +11 -0
- package/dist/chunks/form-field-CblzjGEw.js.map +1 -0
- package/dist/chunks/form-field-D_qT2LNU.js +309 -0
- package/dist/chunks/form-field-D_qT2LNU.js.map +1 -0
- package/dist/chunks/getScrollParent-DE66eQI-.js +15 -0
- package/dist/chunks/getScrollParent-DE66eQI-.js.map +1 -0
- package/dist/chunks/getScrollParent-Dc1cnLDE.js +2 -0
- package/dist/chunks/getScrollParent-Dc1cnLDE.js.map +1 -0
- package/dist/chunks/grid-CugcJxRP.js +14 -0
- package/dist/chunks/grid-CugcJxRP.js.map +1 -0
- package/dist/chunks/grid-xr2A-OqD.js +2 -0
- package/dist/chunks/grid-xr2A-OqD.js.map +1 -0
- package/dist/chunks/icon-BFNYuilh.js +31 -0
- package/dist/chunks/icon-BFNYuilh.js.map +1 -0
- package/dist/chunks/icon-D50i-dqv.js +2 -0
- package/dist/chunks/icon-D50i-dqv.js.map +1 -0
- package/dist/chunks/icon-button-DVBfoOHT.js +14 -0
- package/dist/chunks/icon-button-DVBfoOHT.js.map +1 -0
- package/dist/chunks/icon-button-Ds1Wzyc1.js +2 -0
- package/dist/chunks/icon-button-Ds1Wzyc1.js.map +1 -0
- package/dist/chunks/image-DCirAAnr.js +2 -0
- package/dist/chunks/image-DCirAAnr.js.map +1 -0
- package/dist/chunks/image-rXPA3shk.js +8 -0
- package/dist/chunks/image-rXPA3shk.js.map +1 -0
- package/dist/chunks/kbd-BKH_SGCC.js +6 -0
- package/dist/chunks/kbd-BKH_SGCC.js.map +1 -0
- package/dist/chunks/kbd-Bhv8ae1I.js +2 -0
- package/dist/chunks/kbd-Bhv8ae1I.js.map +1 -0
- package/dist/chunks/link-BfHXJGo9.js +2 -0
- package/dist/chunks/link-BfHXJGo9.js.map +1 -0
- package/dist/chunks/link-CE73eHS0.js +49 -0
- package/dist/chunks/link-CE73eHS0.js.map +1 -0
- package/dist/chunks/link.recipe-Ba2by0OG.js +51 -0
- package/dist/chunks/link.recipe-Ba2by0OG.js.map +1 -0
- package/dist/chunks/link.recipe-CG3leGAx.js +2 -0
- package/dist/chunks/link.recipe-CG3leGAx.js.map +1 -0
- package/dist/chunks/list-8yfreyzi.js +2 -0
- package/dist/chunks/list-8yfreyzi.js.map +1 -0
- package/dist/chunks/list-B21joBrq.js +13 -0
- package/dist/chunks/list-B21joBrq.js.map +1 -0
- package/dist/chunks/loading-spinner-AhRrVHKd.js +137 -0
- package/dist/chunks/loading-spinner-AhRrVHKd.js.map +1 -0
- package/dist/chunks/loading-spinner-B2I1CsuC.js +2 -0
- package/dist/chunks/loading-spinner-B2I1CsuC.js.map +1 -0
- package/dist/chunks/make-element-focusable-_kgqlXGc.js +22 -0
- package/dist/chunks/make-element-focusable-_kgqlXGc.js.map +1 -0
- package/dist/chunks/make-element-focusable-ijZC9F3C.js +2 -0
- package/dist/chunks/make-element-focusable-ijZC9F3C.js.map +1 -0
- package/dist/chunks/mergeProps-BeIu4MsM.js +2 -0
- package/dist/chunks/mergeProps-BeIu4MsM.js.map +1 -0
- package/dist/chunks/mergeProps-tCFA9wZ1.js +128 -0
- package/dist/chunks/mergeProps-tCFA9wZ1.js.map +1 -0
- package/dist/chunks/multiline-text-input-C8yclL-x.js +12 -0
- package/dist/chunks/multiline-text-input-C8yclL-x.js.map +1 -0
- package/dist/chunks/multiline-text-input-D6P_NVi6.js +116 -0
- package/dist/chunks/multiline-text-input-D6P_NVi6.js.map +1 -0
- package/dist/chunks/nimbus-provider-CTg-F7UD.js +2 -0
- package/dist/chunks/nimbus-provider-CTg-F7UD.js.map +1 -0
- package/dist/chunks/nimbus-provider-h_Fu03Zk.js +1530 -0
- package/dist/chunks/nimbus-provider-h_Fu03Zk.js.map +1 -0
- package/dist/chunks/number-5qMXmHyn.js +21 -0
- package/dist/chunks/number-5qMXmHyn.js.map +1 -0
- package/dist/chunks/number-CnrRPi4_.js +2 -0
- package/dist/chunks/number-CnrRPi4_.js.map +1 -0
- package/dist/chunks/number-input-BTbzj3aN.js +652 -0
- package/dist/chunks/number-input-BTbzj3aN.js.map +1 -0
- package/dist/chunks/number-input-D7D2ahNb.js +2 -0
- package/dist/chunks/number-input-D7D2ahNb.js.map +1 -0
- package/dist/chunks/number-input.recipe-2n6A2w0m.js +2 -0
- package/dist/chunks/number-input.recipe-2n6A2w0m.js.map +1 -0
- package/dist/chunks/number-input.recipe-8gbsGnLJ.js +209 -0
- package/dist/chunks/number-input.recipe-8gbsGnLJ.js.map +1 -0
- package/dist/chunks/password-input-BD5GZKX7.js +2 -0
- package/dist/chunks/password-input-BD5GZKX7.js.map +1 -0
- package/dist/chunks/password-input-fiypX-6w.js +50 -0
- package/dist/chunks/password-input-fiypX-6w.js.map +1 -0
- package/dist/chunks/radio-input-4v_6tT94.js +319 -0
- package/dist/chunks/radio-input-4v_6tT94.js.map +1 -0
- package/dist/chunks/radio-input-B2IVmel0.js +2 -0
- package/dist/chunks/radio-input-B2IVmel0.js.map +1 -0
- package/dist/chunks/radio-input.recipe-CM9R2ilP.js +75 -0
- package/dist/chunks/radio-input.recipe-CM9R2ilP.js.map +1 -0
- package/dist/chunks/radio-input.recipe-DdXB4lqs.js +2 -0
- package/dist/chunks/radio-input.recipe-DdXB4lqs.js.map +1 -0
- package/dist/chunks/scrollIntoView-B01y55fg.js +2 -0
- package/dist/chunks/scrollIntoView-B01y55fg.js.map +1 -0
- package/dist/chunks/scrollIntoView-CXOsfZIS.js +83 -0
- package/dist/chunks/scrollIntoView-CXOsfZIS.js.map +1 -0
- package/dist/chunks/select-7cuL-dmI.js +2 -0
- package/dist/chunks/select-7cuL-dmI.js.map +1 -0
- package/dist/chunks/select-DH4OUn_y.js +791 -0
- package/dist/chunks/select-DH4OUn_y.js.map +1 -0
- package/dist/chunks/select.recipe-CXWsUldF.js +203 -0
- package/dist/chunks/select.recipe-CXWsUldF.js.map +1 -0
- package/dist/chunks/select.recipe-DUHFWlQt.js +2 -0
- package/dist/chunks/select.recipe-DUHFWlQt.js.map +1 -0
- package/dist/chunks/simple-grid-CFOP9g2P.js +14 -0
- package/dist/chunks/simple-grid-CFOP9g2P.js.map +1 -0
- package/dist/chunks/simple-grid-CHgTayx6.js +2 -0
- package/dist/chunks/simple-grid-CHgTayx6.js.map +1 -0
- package/dist/chunks/stack-__ugxVHD.js +11 -0
- package/dist/chunks/stack-__ugxVHD.js.map +1 -0
- package/dist/chunks/stack-wFUhYQQb.js +2 -0
- package/dist/chunks/stack-wFUhYQQb.js.map +1 -0
- package/dist/chunks/switch-CnbvTSF9.js +2 -0
- package/dist/chunks/switch-CnbvTSF9.js.map +1 -0
- package/dist/chunks/switch-DdmbHa5R.js +78 -0
- package/dist/chunks/switch-DdmbHa5R.js.map +1 -0
- package/dist/chunks/switch.recipe-CWOjEnIy.js +100 -0
- package/dist/chunks/switch.recipe-CWOjEnIy.js.map +1 -0
- package/dist/chunks/switch.recipe-DHopLj_g.js +2 -0
- package/dist/chunks/switch.recipe-DHopLj_g.js.map +1 -0
- package/dist/chunks/tag-group-B6w2MEyf.js +2 -0
- package/dist/chunks/tag-group-B6w2MEyf.js.map +1 -0
- package/dist/chunks/tag-group-CdLfw2gL.js +1347 -0
- package/dist/chunks/tag-group-CdLfw2gL.js.map +1 -0
- package/dist/chunks/text-BjzNgHxv.js +2 -0
- package/dist/chunks/text-BjzNgHxv.js.map +1 -0
- package/dist/chunks/text-MzQiG_1j.js +24 -0
- package/dist/chunks/text-MzQiG_1j.js.map +1 -0
- package/dist/chunks/text-input-CtJ2FHJ3.js +2 -0
- package/dist/chunks/text-input-CtJ2FHJ3.js.map +1 -0
- package/dist/chunks/text-input-SYXEV4sT.js +17 -0
- package/dist/chunks/text-input-SYXEV4sT.js.map +1 -0
- package/dist/chunks/text-input.recipe-DxzvFMOB.js +2 -0
- package/dist/chunks/text-input.recipe-DxzvFMOB.js.map +1 -0
- package/dist/chunks/text-input.recipe-KNoUuq-g.js +64 -0
- package/dist/chunks/text-input.recipe-KNoUuq-g.js.map +1 -0
- package/dist/chunks/time-input-DCJYjKRY.js +129 -0
- package/dist/chunks/time-input-DCJYjKRY.js.map +1 -0
- package/dist/chunks/time-input-sjvN5iZ-.js +2 -0
- package/dist/chunks/time-input-sjvN5iZ-.js.map +1 -0
- package/dist/chunks/toggle-button-group-D-3UQLdL.js +2 -0
- package/dist/chunks/toggle-button-group-D-3UQLdL.js.map +1 -0
- package/dist/chunks/toggle-button-group-bjkXTCxu.js +275 -0
- package/dist/chunks/toggle-button-group-bjkXTCxu.js.map +1 -0
- package/dist/chunks/tooltip-C-K5iatf.js +2 -0
- package/dist/chunks/tooltip-C-K5iatf.js.map +1 -0
- package/dist/chunks/tooltip-DvoZxHgo.js +273 -0
- package/dist/chunks/tooltip-DvoZxHgo.js.map +1 -0
- package/dist/chunks/tooltip.recipe-B9-7OFCi.js +24 -0
- package/dist/chunks/tooltip.recipe-B9-7OFCi.js.map +1 -0
- package/dist/chunks/tooltip.recipe-CkNOA8Sg.js +2 -0
- package/dist/chunks/tooltip.recipe-CkNOA8Sg.js.map +1 -0
- package/dist/chunks/useButton-BZrUUsJ0.js +2 -0
- package/dist/chunks/useButton-BZrUUsJ0.js.map +1 -0
- package/dist/chunks/useButton-C5ATfvOf.js +48 -0
- package/dist/chunks/useButton-C5ATfvOf.js.map +1 -0
- package/dist/chunks/useCollator-BbJYfLGN.js +12 -0
- package/dist/chunks/useCollator-BbJYfLGN.js.map +1 -0
- package/dist/chunks/useCollator-ajK3YU47.js +2 -0
- package/dist/chunks/useCollator-ajK3YU47.js.map +1 -0
- package/dist/chunks/useControlledState-D0L6S_5r.js +2 -0
- package/dist/chunks/useControlledState-D0L6S_5r.js.map +1 -0
- package/dist/chunks/useControlledState-u436Wbp1.js +31 -0
- package/dist/chunks/useControlledState-u436Wbp1.js.map +1 -0
- package/dist/chunks/useDateFormatter-5Oe96jpR.js +1581 -0
- package/dist/chunks/useDateFormatter-5Oe96jpR.js.map +1 -0
- package/dist/chunks/useDateFormatter-6FAMsnNT.js +2 -0
- package/dist/chunks/useDateFormatter-6FAMsnNT.js.map +1 -0
- package/dist/chunks/useEvent-COOhq9E7.js +22 -0
- package/dist/chunks/useEvent-COOhq9E7.js.map +1 -0
- package/dist/chunks/useEvent-DCXRKhH2.js +2 -0
- package/dist/chunks/useEvent-DCXRKhH2.js.map +1 -0
- package/dist/chunks/useField-BY58-2Ft.js +36 -0
- package/dist/chunks/useField-BY58-2Ft.js.map +1 -0
- package/dist/chunks/useField-BeaT9Ud9.js +2 -0
- package/dist/chunks/useField-BeaT9Ud9.js.map +1 -0
- package/dist/chunks/useFocus-C1BtlMbo.js +2 -0
- package/dist/chunks/useFocus-C1BtlMbo.js.map +1 -0
- package/dist/chunks/useFocus-CuXxpIRa.js +176 -0
- package/dist/chunks/useFocus-CuXxpIRa.js.map +1 -0
- package/dist/chunks/useFocusRing-CYHdvund.js +2 -0
- package/dist/chunks/useFocusRing-CYHdvund.js.map +1 -0
- package/dist/chunks/useFocusRing-DNviWqC5.js +34 -0
- package/dist/chunks/useFocusRing-DNviWqC5.js.map +1 -0
- package/dist/chunks/useFocusWithin-AKRo9mz0.js +55 -0
- package/dist/chunks/useFocusWithin-AKRo9mz0.js.map +1 -0
- package/dist/chunks/useFocusWithin-hB6WzPnG.js +2 -0
- package/dist/chunks/useFocusWithin-hB6WzPnG.js.map +1 -0
- package/dist/chunks/useFocusable-DBEQCS1T.js +75 -0
- package/dist/chunks/useFocusable-DBEQCS1T.js.map +1 -0
- package/dist/chunks/useFocusable-DbCayKl8.js +2 -0
- package/dist/chunks/useFocusable-DbCayKl8.js.map +1 -0
- package/dist/chunks/useFormReset-BgCb2h6r.js +21 -0
- package/dist/chunks/useFormReset-BgCb2h6r.js.map +1 -0
- package/dist/chunks/useFormReset-Bt5-6Arg.js +2 -0
- package/dist/chunks/useFormReset-Bt5-6Arg.js.map +1 -0
- package/dist/chunks/useFormValidation-CbunG7dK.js +2 -0
- package/dist/chunks/useFormValidation-CbunG7dK.js.map +1 -0
- package/dist/chunks/useFormValidation-DoG8pVu2.js +179 -0
- package/dist/chunks/useFormValidation-DoG8pVu2.js.map +1 -0
- package/dist/chunks/useHover-3Zee5Ds5.js +85 -0
- package/dist/chunks/useHover-3Zee5Ds5.js.map +1 -0
- package/dist/chunks/useHover-BxTJz4Qm.js +2 -0
- package/dist/chunks/useHover-BxTJz4Qm.js.map +1 -0
- package/dist/chunks/useLabel-As7K6zBZ.js +2 -0
- package/dist/chunks/useLabel-As7K6zBZ.js.map +1 -0
- package/dist/chunks/useLabel-lLz9KH79.js +24 -0
- package/dist/chunks/useLabel-lLz9KH79.js.map +1 -0
- package/dist/chunks/useLabels-B-BeKbzR.js +2 -0
- package/dist/chunks/useLabels-B-BeKbzR.js.map +1 -0
- package/dist/chunks/useLabels-CrNu-inr.js +18 -0
- package/dist/chunks/useLabels-CrNu-inr.js.map +1 -0
- package/dist/chunks/useLocalizedStringFormatter-CDXOVKSV.js +2 -0
- package/dist/chunks/useLocalizedStringFormatter-CDXOVKSV.js.map +1 -0
- package/dist/chunks/useLocalizedStringFormatter-D1iIJE39.js +97 -0
- package/dist/chunks/useLocalizedStringFormatter-D1iIJE39.js.map +1 -0
- package/dist/chunks/useNumberFormatter-C8xwHQXb.js +14 -0
- package/dist/chunks/useNumberFormatter-C8xwHQXb.js.map +1 -0
- package/dist/chunks/useNumberFormatter-DS6s5teN.js +2 -0
- package/dist/chunks/useNumberFormatter-DS6s5teN.js.map +1 -0
- package/dist/chunks/useObjectRef-4v2MxSjQ.js +2 -0
- package/dist/chunks/useObjectRef-4v2MxSjQ.js.map +1 -0
- package/dist/chunks/useObjectRef-CaJ5pgjX.js +30 -0
- package/dist/chunks/useObjectRef-CaJ5pgjX.js.map +1 -0
- package/dist/chunks/usePress-CGAMyl6q.js +8 -0
- package/dist/chunks/usePress-CGAMyl6q.js.map +1 -0
- package/dist/chunks/usePress-Dk0M2Js8.js +526 -0
- package/dist/chunks/usePress-Dk0M2Js8.js.map +1 -0
- package/dist/chunks/useSingleSelectListState--jan8NiD.js +269 -0
- package/dist/chunks/useSingleSelectListState--jan8NiD.js.map +1 -0
- package/dist/chunks/useSingleSelectListState-DqtAmt8K.js +2 -0
- package/dist/chunks/useSingleSelectListState-DqtAmt8K.js.map +1 -0
- package/dist/chunks/useSpinButton-CQ8U5KZS.js +2 -0
- package/dist/chunks/useSpinButton-CQ8U5KZS.js.map +1 -0
- package/dist/chunks/useSpinButton-DQzgsW5H.js +432 -0
- package/dist/chunks/useSpinButton-DQzgsW5H.js.map +1 -0
- package/dist/chunks/useTextField-CNy4kFwI.js +88 -0
- package/dist/chunks/useTextField-CNy4kFwI.js.map +1 -0
- package/dist/chunks/useTextField-Dkkh1L-K.js +2 -0
- package/dist/chunks/useTextField-Dkkh1L-K.js.map +1 -0
- package/dist/chunks/useToggle-BEYjmALQ.js +2 -0
- package/dist/chunks/useToggle-BEYjmALQ.js.map +1 -0
- package/dist/chunks/useToggle-Cf0OB-T-.js +50 -0
- package/dist/chunks/useToggle-Cf0OB-T-.js.map +1 -0
- package/dist/chunks/useToggleState-B5pE_WmM.js +2 -0
- package/dist/chunks/useToggleState-B5pE_WmM.js.map +1 -0
- package/dist/chunks/useToggleState-Bz5rAf4C.js +19 -0
- package/dist/chunks/useToggleState-Bz5rAf4C.js.map +1 -0
- package/dist/chunks/useUpdateEffect-CCDx8D4X.js +14 -0
- package/dist/chunks/useUpdateEffect-CCDx8D4X.js.map +1 -0
- package/dist/chunks/useUpdateEffect-sk3kiVGz.js +2 -0
- package/dist/chunks/useUpdateEffect-sk3kiVGz.js.map +1 -0
- package/dist/chunks/utils-7n9JR4ke.js +128 -0
- package/dist/chunks/utils-7n9JR4ke.js.map +1 -0
- package/dist/chunks/utils-D6ZV0jyp.js +2 -0
- package/dist/chunks/utils-D6ZV0jyp.js.map +1 -0
- package/dist/chunks/utils-DSssdw4e.js +229 -0
- package/dist/chunks/utils-DSssdw4e.js.map +1 -0
- package/dist/chunks/utils-XbOVivul.js +2 -0
- package/dist/chunks/utils-XbOVivul.js.map +1 -0
- package/dist/chunks/visually-hidden-7U4LGJiI.js +11 -0
- package/dist/chunks/visually-hidden-7U4LGJiI.js.map +1 -0
- package/dist/chunks/visually-hidden-CRnniCks.js +2 -0
- package/dist/chunks/visually-hidden-CRnniCks.js.map +1 -0
- package/dist/code.d.ts +10 -0
- package/dist/combobox.d.ts +275 -0
- package/dist/components/accordion.cjs +2 -0
- package/dist/components/accordion.cjs.map +1 -0
- package/dist/components/accordion.es.js +10 -0
- package/dist/components/accordion.es.js.map +1 -0
- package/dist/components/alert.cjs +2 -0
- package/dist/components/alert.cjs.map +1 -0
- package/dist/components/alert.es.js +10 -0
- package/dist/components/alert.es.js.map +1 -0
- package/dist/components/avatar.cjs +2 -0
- package/dist/components/avatar.cjs.map +1 -0
- package/dist/components/avatar.es.js +5 -0
- package/dist/components/avatar.es.js.map +1 -0
- package/dist/components/badge.cjs +2 -0
- package/dist/components/badge.cjs.map +1 -0
- package/dist/components/badge.es.js +5 -0
- package/dist/components/badge.es.js.map +1 -0
- package/dist/components/box.cjs +2 -0
- package/dist/components/box.cjs.map +1 -0
- package/dist/components/box.es.js +5 -0
- package/dist/components/box.es.js.map +1 -0
- package/dist/components/button.cjs +2 -0
- package/dist/components/button.cjs.map +1 -0
- package/dist/components/button.es.js +5 -0
- package/dist/components/button.es.js.map +1 -0
- package/dist/components/calendar.cjs +2 -0
- package/dist/components/calendar.cjs.map +1 -0
- package/dist/components/calendar.es.js +5 -0
- package/dist/components/calendar.es.js.map +1 -0
- package/dist/components/card.cjs +2 -0
- package/dist/components/card.cjs.map +1 -0
- package/dist/components/card.es.js +8 -0
- package/dist/components/card.es.js.map +1 -0
- package/dist/components/checkbox.cjs +2 -0
- package/dist/components/checkbox.cjs.map +1 -0
- package/dist/components/checkbox.es.js +5 -0
- package/dist/components/checkbox.es.js.map +1 -0
- package/dist/components/code.cjs +2 -0
- package/dist/components/code.cjs.map +1 -0
- package/dist/components/code.es.js +5 -0
- package/dist/components/code.es.js.map +1 -0
- package/dist/components/combobox.cjs +2 -0
- package/dist/components/combobox.cjs.map +1 -0
- package/dist/components/combobox.es.js +8 -0
- package/dist/components/combobox.es.js.map +1 -0
- package/dist/components/components.cjs +2 -0
- package/dist/components/components.cjs.map +1 -0
- package/dist/components/components.es.js +125 -0
- package/dist/components/components.es.js.map +1 -0
- package/dist/components/date-input.cjs +2 -0
- package/dist/components/date-input.cjs.map +1 -0
- package/dist/components/date-input.es.js +5 -0
- package/dist/components/date-input.es.js.map +1 -0
- package/dist/components/date-picker.cjs +2 -0
- package/dist/components/date-picker.cjs.map +1 -0
- package/dist/components/date-picker.es.js +5 -0
- package/dist/components/date-picker.es.js.map +1 -0
- package/dist/components/dialog.cjs +2 -0
- package/dist/components/dialog.cjs.map +1 -0
- package/dist/components/dialog.es.js +5 -0
- package/dist/components/dialog.es.js.map +1 -0
- package/dist/components/flex.cjs +2 -0
- package/dist/components/flex.cjs.map +1 -0
- package/dist/components/flex.es.js +5 -0
- package/dist/components/flex.es.js.map +1 -0
- package/dist/components/form-field.cjs +2 -0
- package/dist/components/form-field.cjs.map +1 -0
- package/dist/components/form-field.es.js +11 -0
- package/dist/components/form-field.es.js.map +1 -0
- package/dist/components/grid.cjs +2 -0
- package/dist/components/grid.cjs.map +1 -0
- package/dist/components/grid.es.js +5 -0
- package/dist/components/grid.es.js.map +1 -0
- package/dist/components/heading.cjs +2 -0
- package/dist/components/heading.cjs.map +1 -0
- package/dist/components/heading.es.js +5 -0
- package/dist/components/heading.es.js.map +1 -0
- package/dist/components/icon-button.cjs +2 -0
- package/dist/components/icon-button.cjs.map +1 -0
- package/dist/components/icon-button.es.js +5 -0
- package/dist/components/icon-button.es.js.map +1 -0
- package/dist/components/icon.cjs +2 -0
- package/dist/components/icon.cjs.map +1 -0
- package/dist/components/icon.es.js +5 -0
- package/dist/components/icon.es.js.map +1 -0
- package/dist/components/image.cjs +2 -0
- package/dist/components/image.cjs.map +1 -0
- package/dist/components/image.es.js +5 -0
- package/dist/components/image.es.js.map +1 -0
- package/dist/components/kbd.cjs +2 -0
- package/dist/components/kbd.cjs.map +1 -0
- package/dist/components/kbd.es.js +5 -0
- package/dist/components/kbd.es.js.map +1 -0
- package/dist/components/link.cjs +2 -0
- package/dist/components/link.cjs.map +1 -0
- package/dist/components/link.es.js +5 -0
- package/dist/components/link.es.js.map +1 -0
- package/dist/components/list.cjs +2 -0
- package/dist/components/list.cjs.map +1 -0
- package/dist/components/list.es.js +8 -0
- package/dist/components/list.es.js.map +1 -0
- package/dist/components/loading-spinner.cjs +2 -0
- package/dist/components/loading-spinner.cjs.map +1 -0
- package/dist/components/loading-spinner.es.js +5 -0
- package/dist/components/loading-spinner.es.js.map +1 -0
- package/dist/components/multiline-text-input.cjs +2 -0
- package/dist/components/multiline-text-input.cjs.map +1 -0
- package/dist/components/multiline-text-input.es.js +5 -0
- package/dist/components/multiline-text-input.es.js.map +1 -0
- package/dist/components/nimbus-provider.cjs +2 -0
- package/dist/components/nimbus-provider.cjs.map +1 -0
- package/dist/components/nimbus-provider.es.js +8 -0
- package/dist/components/nimbus-provider.es.js.map +1 -0
- package/dist/components/number-input.cjs +2 -0
- package/dist/components/number-input.cjs.map +1 -0
- package/dist/components/number-input.es.js +5 -0
- package/dist/components/number-input.es.js.map +1 -0
- package/dist/components/password-input.cjs +2 -0
- package/dist/components/password-input.cjs.map +1 -0
- package/dist/components/password-input.es.js +5 -0
- package/dist/components/password-input.es.js.map +1 -0
- package/dist/components/radio-input.cjs +2 -0
- package/dist/components/radio-input.cjs.map +1 -0
- package/dist/components/radio-input.es.js +7 -0
- package/dist/components/radio-input.es.js.map +1 -0
- package/dist/components/select.cjs +2 -0
- package/dist/components/select.cjs.map +1 -0
- package/dist/components/select.es.js +9 -0
- package/dist/components/select.es.js.map +1 -0
- package/dist/components/simple-grid.cjs +2 -0
- package/dist/components/simple-grid.cjs.map +1 -0
- package/dist/components/simple-grid.es.js +5 -0
- package/dist/components/simple-grid.es.js.map +1 -0
- package/dist/components/stack.cjs +2 -0
- package/dist/components/stack.cjs.map +1 -0
- package/dist/components/stack.es.js +5 -0
- package/dist/components/stack.es.js.map +1 -0
- package/dist/components/switch.cjs +2 -0
- package/dist/components/switch.cjs.map +1 -0
- package/dist/components/switch.es.js +5 -0
- package/dist/components/switch.es.js.map +1 -0
- package/dist/components/table.cjs +2 -0
- package/dist/components/table.cjs.map +1 -0
- package/dist/components/table.es.js +5 -0
- package/dist/components/table.es.js.map +1 -0
- package/dist/components/tag-group.cjs +2 -0
- package/dist/components/tag-group.cjs.map +1 -0
- package/dist/components/tag-group.es.js +5 -0
- package/dist/components/tag-group.es.js.map +1 -0
- package/dist/components/text-input.cjs +2 -0
- package/dist/components/text-input.cjs.map +1 -0
- package/dist/components/text-input.es.js +5 -0
- package/dist/components/text-input.es.js.map +1 -0
- package/dist/components/text.cjs +2 -0
- package/dist/components/text.cjs.map +1 -0
- package/dist/components/text.es.js +5 -0
- package/dist/components/text.es.js.map +1 -0
- package/dist/components/time-input.cjs +2 -0
- package/dist/components/time-input.cjs.map +1 -0
- package/dist/components/time-input.es.js +5 -0
- package/dist/components/time-input.es.js.map +1 -0
- package/dist/components/toggle-button-group.cjs +2 -0
- package/dist/components/toggle-button-group.cjs.map +1 -0
- package/dist/components/toggle-button-group.es.js +7 -0
- package/dist/components/toggle-button-group.es.js.map +1 -0
- package/dist/components/tooltip.cjs +2 -0
- package/dist/components/tooltip.cjs.map +1 -0
- package/dist/components/tooltip.es.js +9 -0
- package/dist/components/tooltip.es.js.map +1 -0
- package/dist/components/visually-hidden.cjs +2 -0
- package/dist/components/visually-hidden.cjs.map +1 -0
- package/dist/components/visually-hidden.es.js +5 -0
- package/dist/components/visually-hidden.es.js.map +1 -0
- package/dist/components.d.ts +2668 -0
- package/dist/date-input.d.ts +94 -0
- package/dist/date-picker.d.ts +164 -0
- package/dist/dialog.d.ts +33 -0
- package/dist/flex.d.ts +5 -0
- package/dist/form-field.d.ts +131 -0
- package/dist/grid.d.ts +28 -0
- package/dist/heading.d.ts +5 -0
- package/dist/icon-button.d.ts +53 -0
- package/dist/icon.d.ts +99 -0
- package/dist/image.d.ts +18 -0
- package/dist/index.cjs +1 -42
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +934 -748
- package/dist/index.es.js +305 -22047
- package/dist/index.es.js.map +1 -1
- package/dist/kbd.d.ts +10 -0
- package/dist/link.d.ts +92 -0
- package/dist/list.d.ts +21 -0
- package/dist/loading-spinner.d.ts +88 -0
- package/dist/multiline-text-input.d.ts +76 -0
- package/dist/nimbus-provider.d.ts +23 -0
- package/dist/number-input.d.ts +143 -0
- package/dist/password-input.d.ts +74 -0
- package/dist/radio-input.d.ts +70 -0
- package/dist/select.d.ts +143 -0
- 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/dist/simple-grid.d.ts +28 -0
- package/dist/stack.d.ts +14 -0
- package/dist/switch.d.ts +75 -0
- package/dist/table.d.ts +5 -0
- package/dist/tag-group.d.ts +99 -0
- package/dist/text-input.d.ts +68 -0
- package/dist/text.d.ts +20 -0
- package/dist/time-input.d.ts +102 -0
- package/dist/toggle-button-group.d.ts +107 -0
- package/dist/tooltip.d.ts +134 -0
- package/dist/visually-hidden.d.ts +15 -0
- package/package.json +6 -4
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { jsxs as h, jsx as I } from "react/jsx-runtime";
|
|
2
|
+
import { useState as m } from "react";
|
|
3
|
+
import { createRecipeContext as v, Image as x } from "@chakra-ui/react";
|
|
4
|
+
import { a as A } from "./avatar.recipe-BSmmqvwQ.js";
|
|
5
|
+
const { withContext: C } = /* @__PURE__ */ v({ recipe: A }), N = /* @__PURE__ */ C("figure");
|
|
6
|
+
function w(t, a) {
|
|
7
|
+
return t.split("")[0].toUpperCase() + a.split("")[0].toUpperCase();
|
|
8
|
+
}
|
|
9
|
+
const E = (t) => {
|
|
10
|
+
const { ref: a, firstName: o, lastName: r, src: e, alt: p, ...f } = t, [s, n] = m(!1), [i, l] = m(!1), c = `${o} ${r}`, d = {
|
|
11
|
+
"aria-label": `${c} avatar`,
|
|
12
|
+
ref: a,
|
|
13
|
+
...f
|
|
14
|
+
}, u = () => {
|
|
15
|
+
n(!0), l(!1);
|
|
16
|
+
}, g = () => {
|
|
17
|
+
n(!1), l(!0);
|
|
18
|
+
};
|
|
19
|
+
return /* @__PURE__ */ h(N, { ...d, children: [
|
|
20
|
+
!e || !s || i ? w(o, r) : null,
|
|
21
|
+
e && /* @__PURE__ */ I(
|
|
22
|
+
x,
|
|
23
|
+
{
|
|
24
|
+
src: e,
|
|
25
|
+
alt: p || c,
|
|
26
|
+
onLoad: u,
|
|
27
|
+
onError: g,
|
|
28
|
+
display: s && !i ? "block" : "none"
|
|
29
|
+
}
|
|
30
|
+
)
|
|
31
|
+
] });
|
|
32
|
+
};
|
|
33
|
+
E.displayName = "Avatar";
|
|
34
|
+
export {
|
|
35
|
+
E as A
|
|
36
|
+
};
|
|
37
|
+
//# sourceMappingURL=avatar-85FE_L0r.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"avatar-85FE_L0r.js","sources":["../../src/components/avatar/avatar.slots.tsx","../../src/components/avatar/avatar.tsx"],"sourcesContent":["import {\n type HTMLChakraProps,\n type RecipeProps,\n type UnstyledProp,\n createRecipeContext,\n} from \"@chakra-ui/react\";\nimport { avatarRecipe } from \"./avatar.recipe\";\n\ninterface AvatarRecipeProps extends RecipeProps<\"div\">, UnstyledProp {}\n\n// eslint-disable-next-line @typescript-eslint/no-empty-object-type\nexport interface AvatarRootProps\n extends HTMLChakraProps<\"div\", AvatarRecipeProps> {}\nconst { withContext } = createRecipeContext({ recipe: avatarRecipe });\n\nexport const AvatarRoot = withContext<HTMLElement, AvatarRootProps>(\"figure\");\n","import { useState } from \"react\";\nimport { Image } from \"@chakra-ui/react\";\nimport { type AvatarProps } from \"./avatar.types\";\nimport { AvatarRoot } from \"./avatar.slots.tsx\";\n\nfunction getInitials(firstName: string, lastName: string) {\n return (\n firstName.split(\"\")[0].toUpperCase() + lastName.split(\"\")[0].toUpperCase()\n );\n}\n\nexport const Avatar = (props: AvatarProps) => {\n const { ref, firstName, lastName, src, alt, ...rest } = props;\n const [imageLoaded, setImageLoaded] = useState(false);\n const [imageError, setImageError] = useState(false);\n\n const fullName = `${firstName} ${lastName}`;\n\n const sharedProps = {\n \"aria-label\": `${fullName} avatar`,\n ref,\n ...rest,\n };\n\n const onLoad = () => {\n setImageLoaded(true);\n setImageError(false);\n };\n\n const onError = () => {\n setImageLoaded(false);\n setImageError(true);\n };\n\n // Show initials if no src provided, image hasn't loaded yet, or image failed\n const shouldShowInitials = !src || !imageLoaded || imageError;\n\n return (\n <AvatarRoot {...sharedProps}>\n {shouldShowInitials ? getInitials(firstName, lastName) : null}\n\n {src && (\n <Image\n src={src}\n alt={alt || fullName}\n onLoad={onLoad}\n onError={onError}\n display={imageLoaded && !imageError ? \"block\" : \"none\"}\n />\n )}\n </AvatarRoot>\n );\n};\n\nAvatar.displayName = \"Avatar\";\n"],"names":["withContext","createRecipeContext","avatarRecipe","AvatarRoot","getInitials","firstName","lastName","Avatar","props","ref","src","alt","rest","imageLoaded","setImageLoaded","useState","imageError","setImageError","fullName","sharedProps","onLoad","onError","jsxs","jsx","Image"],"mappings":";;;;AAaA,MAAM,EAAE,aAAAA,EAAY,IAAI,gBAAAC,EAAoB,EAAE,QAAQC,GAAc,GAEvDC,IAAa,gBAAAH,EAA0C,QAAQ;ACV5E,SAASI,EAAYC,GAAmBC,GAAkB;AACxD,SACED,EAAU,MAAM,EAAE,EAAE,CAAC,EAAE,gBAAgBC,EAAS,MAAM,EAAE,EAAE,CAAC,EAAE,YAAY;AAE7E;AAEa,MAAAC,IAAS,CAACC,MAAuB;AACtC,QAAA,EAAE,KAAAC,GAAK,WAAAJ,GAAW,UAAAC,GAAU,KAAAI,GAAK,KAAAC,GAAK,GAAGC,MAASJ,GAClD,CAACK,GAAaC,CAAc,IAAIC,EAAS,EAAK,GAC9C,CAACC,GAAYC,CAAa,IAAIF,EAAS,EAAK,GAE5CG,IAAW,GAAGb,CAAS,IAAIC,CAAQ,IAEnCa,IAAc;AAAA,IAClB,cAAc,GAAGD,CAAQ;AAAA,IACzB,KAAAT;AAAA,IACA,GAAGG;AAAA,EACL,GAEMQ,IAAS,MAAM;AACnB,IAAAN,EAAe,EAAI,GACnBG,EAAc,EAAK;AAAA,EACrB,GAEMI,IAAU,MAAM;AACpB,IAAAP,EAAe,EAAK,GACpBG,EAAc,EAAI;AAAA,EACpB;AAME,SAAA,gBAAAK,EAACnB,GAAY,EAAA,GAAGgB,GACb,UAAA;AAAA,IAJsB,CAACT,KAAO,CAACG,KAAeG,IAIzBZ,EAAYC,GAAWC,CAAQ,IAAI;AAAA,IAExDI,KACC,gBAAAa;AAAA,MAACC;AAAA,MAAA;AAAA,QACC,KAAAd;AAAA,QACA,KAAKC,KAAOO;AAAA,QACZ,QAAAE;AAAA,QACA,SAAAC;AAAA,QACA,SAASR,KAAe,CAACG,IAAa,UAAU;AAAA,MAAA;AAAA,IAAA;AAAA,EAClD,GAEJ;AAEJ;AAEAT,EAAO,cAAc;"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";const u=require("react/jsx-runtime"),p=require("react"),d=require("@chakra-ui/react"),R=require("./avatar.recipe-aGNBZhVF.js"),{withContext:$}=d.createRecipeContext({recipe:R.avatarRecipe}),q=$("figure");function A(e,t){return e.split("")[0].toUpperCase()+t.split("")[0].toUpperCase()}const m=e=>{const{ref:t,firstName:r,lastName:s,src:a,alt:f,...g}=e,[o,n]=p.useState(!1),[c,i]=p.useState(!1),l=`${r} ${s}`,v={"aria-label":`${l} avatar`,ref:t,...g},h=()=>{n(!0),i(!1)},x=()=>{n(!1),i(!0)},I=!a||!o||c;return u.jsxs(q,{...v,children:[I?A(r,s):null,a&&u.jsx(d.Image,{src:a,alt:f||l,onLoad:h,onError:x,display:o&&!c?"block":"none"})]})};m.displayName="Avatar";exports.Avatar=m;
|
|
2
|
+
//# sourceMappingURL=avatar-Aa0LrRpo.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"avatar-Aa0LrRpo.js","sources":["../../src/components/avatar/avatar.slots.tsx","../../src/components/avatar/avatar.tsx"],"sourcesContent":["import {\n type HTMLChakraProps,\n type RecipeProps,\n type UnstyledProp,\n createRecipeContext,\n} from \"@chakra-ui/react\";\nimport { avatarRecipe } from \"./avatar.recipe\";\n\ninterface AvatarRecipeProps extends RecipeProps<\"div\">, UnstyledProp {}\n\n// eslint-disable-next-line @typescript-eslint/no-empty-object-type\nexport interface AvatarRootProps\n extends HTMLChakraProps<\"div\", AvatarRecipeProps> {}\nconst { withContext } = createRecipeContext({ recipe: avatarRecipe });\n\nexport const AvatarRoot = withContext<HTMLElement, AvatarRootProps>(\"figure\");\n","import { useState } from \"react\";\nimport { Image } from \"@chakra-ui/react\";\nimport { type AvatarProps } from \"./avatar.types\";\nimport { AvatarRoot } from \"./avatar.slots.tsx\";\n\nfunction getInitials(firstName: string, lastName: string) {\n return (\n firstName.split(\"\")[0].toUpperCase() + lastName.split(\"\")[0].toUpperCase()\n );\n}\n\nexport const Avatar = (props: AvatarProps) => {\n const { ref, firstName, lastName, src, alt, ...rest } = props;\n const [imageLoaded, setImageLoaded] = useState(false);\n const [imageError, setImageError] = useState(false);\n\n const fullName = `${firstName} ${lastName}`;\n\n const sharedProps = {\n \"aria-label\": `${fullName} avatar`,\n ref,\n ...rest,\n };\n\n const onLoad = () => {\n setImageLoaded(true);\n setImageError(false);\n };\n\n const onError = () => {\n setImageLoaded(false);\n setImageError(true);\n };\n\n // Show initials if no src provided, image hasn't loaded yet, or image failed\n const shouldShowInitials = !src || !imageLoaded || imageError;\n\n return (\n <AvatarRoot {...sharedProps}>\n {shouldShowInitials ? getInitials(firstName, lastName) : null}\n\n {src && (\n <Image\n src={src}\n alt={alt || fullName}\n onLoad={onLoad}\n onError={onError}\n display={imageLoaded && !imageError ? \"block\" : \"none\"}\n />\n )}\n </AvatarRoot>\n );\n};\n\nAvatar.displayName = \"Avatar\";\n"],"names":["withContext","createRecipeContext","avatarRecipe","AvatarRoot","getInitials","firstName","lastName","Avatar","props","ref","src","alt","rest","imageLoaded","setImageLoaded","useState","imageError","setImageError","fullName","sharedProps","onLoad","onError","shouldShowInitials","jsxs","jsx","Image"],"mappings":"4IAaM,CAAE,YAAAA,CAAY,EAAIC,EAAAA,oBAAoB,CAAE,OAAQC,eAAc,EAEvDC,EAAaH,EAA0C,QAAQ,ECV5E,SAASI,EAAYC,EAAmBC,EAAkB,CACxD,OACED,EAAU,MAAM,EAAE,EAAE,CAAC,EAAE,cAAgBC,EAAS,MAAM,EAAE,EAAE,CAAC,EAAE,YAAY,CAE7E,CAEa,MAAAC,EAAUC,GAAuB,CACtC,KAAA,CAAE,IAAAC,EAAK,UAAAJ,EAAW,SAAAC,EAAU,IAAAI,EAAK,IAAAC,EAAK,GAAGC,GAASJ,EAClD,CAACK,EAAaC,CAAc,EAAIC,EAAAA,SAAS,EAAK,EAC9C,CAACC,EAAYC,CAAa,EAAIF,EAAAA,SAAS,EAAK,EAE5CG,EAAW,GAAGb,CAAS,IAAIC,CAAQ,GAEnCa,EAAc,CAClB,aAAc,GAAGD,CAAQ,UACzB,IAAAT,EACA,GAAGG,CACL,EAEMQ,EAAS,IAAM,CACnBN,EAAe,EAAI,EACnBG,EAAc,EAAK,CACrB,EAEMI,EAAU,IAAM,CACpBP,EAAe,EAAK,EACpBG,EAAc,EAAI,CACpB,EAGMK,EAAqB,CAACZ,GAAO,CAACG,GAAeG,EAGjD,OAAAO,EAAA,KAACpB,EAAY,CAAA,GAAGgB,EACb,SAAA,CAAqBG,EAAAlB,EAAYC,EAAWC,CAAQ,EAAI,KAExDI,GACCc,EAAA,IAACC,EAAA,MAAA,CACC,IAAAf,EACA,IAAKC,GAAOO,EACZ,OAAAE,EACA,QAAAC,EACA,QAASR,GAAe,CAACG,EAAa,QAAU,MAAA,CAAA,CAClD,EAEJ,CAEJ,EAEAT,EAAO,YAAc"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { defineRecipe as e } from "@chakra-ui/react";
|
|
2
|
+
const i = /* @__PURE__ */ e({
|
|
3
|
+
className: "avatar",
|
|
4
|
+
base: {
|
|
5
|
+
display: "inline-flex",
|
|
6
|
+
alignItems: "center",
|
|
7
|
+
justifyContent: "center",
|
|
8
|
+
verticalAlign: "middle",
|
|
9
|
+
overflow: "hidden",
|
|
10
|
+
userSelect: "none",
|
|
11
|
+
borderRadius: "full",
|
|
12
|
+
flexShrink: 0,
|
|
13
|
+
fontWeight: "600",
|
|
14
|
+
backgroundColor: "colorPalette.3",
|
|
15
|
+
colorPalette: "primary",
|
|
16
|
+
color: "colorPalette.11",
|
|
17
|
+
focusVisibleRing: "outside",
|
|
18
|
+
"button&": {
|
|
19
|
+
cursor: "button"
|
|
20
|
+
},
|
|
21
|
+
_disabled: {
|
|
22
|
+
layerStyle: "disabled"
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
variants: {
|
|
26
|
+
size: {
|
|
27
|
+
md: { width: 1e3, height: 1e3, textStyle: "sm" },
|
|
28
|
+
xs: { width: 800, height: 800, textStyle: "xs" },
|
|
29
|
+
"2xs": { width: 600, height: 600, textStyle: "xs" }
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
defaultVariants: {
|
|
33
|
+
size: "md"
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
export {
|
|
37
|
+
i as a
|
|
38
|
+
};
|
|
39
|
+
//# sourceMappingURL=avatar.recipe-BSmmqvwQ.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"avatar.recipe-BSmmqvwQ.js","sources":["../../src/components/avatar/avatar.recipe.tsx"],"sourcesContent":["import { defineRecipe } from \"@chakra-ui/react\";\n\nexport const avatarRecipe = defineRecipe({\n className: \"avatar\",\n base: {\n display: \"inline-flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n verticalAlign: \"middle\",\n overflow: \"hidden\",\n userSelect: \"none\",\n borderRadius: \"full\",\n flexShrink: 0,\n fontWeight: \"600\",\n backgroundColor: \"colorPalette.3\",\n colorPalette: \"primary\",\n color: \"colorPalette.11\",\n focusVisibleRing: \"outside\",\n \"button&\": {\n cursor: \"button\",\n },\n _disabled: {\n layerStyle: \"disabled\",\n },\n },\n variants: {\n size: {\n md: { width: 1000, height: 1000, textStyle: \"sm\" },\n xs: { width: 800, height: 800, textStyle: \"xs\" },\n \"2xs\": { width: 600, height: 600, textStyle: \"xs\" },\n },\n },\n defaultVariants: {\n size: \"md\",\n },\n});\n"],"names":["avatarRecipe","defineRecipe"],"mappings":";AAEO,MAAMA,IAAe,gBAAAC,EAAa;AAAA,EACvC,WAAW;AAAA,EACX,MAAM;AAAA,IACJ,SAAS;AAAA,IACT,YAAY;AAAA,IACZ,gBAAgB;AAAA,IAChB,eAAe;AAAA,IACf,UAAU;AAAA,IACV,YAAY;AAAA,IACZ,cAAc;AAAA,IACd,YAAY;AAAA,IACZ,YAAY;AAAA,IACZ,iBAAiB;AAAA,IACjB,cAAc;AAAA,IACd,OAAO;AAAA,IACP,kBAAkB;AAAA,IAClB,WAAW;AAAA,MACT,QAAQ;AAAA,IACV;AAAA,IACA,WAAW;AAAA,MACT,YAAY;AAAA,IAAA;AAAA,EAEhB;AAAA,EACA,UAAU;AAAA,IACR,MAAM;AAAA,MACJ,IAAI,EAAE,OAAO,KAAM,QAAQ,KAAM,WAAW,KAAK;AAAA,MACjD,IAAI,EAAE,OAAO,KAAK,QAAQ,KAAK,WAAW,KAAK;AAAA,MAC/C,OAAO,EAAE,OAAO,KAAK,QAAQ,KAAK,WAAW,KAAK;AAAA,IAAA;AAAA,EAEtD;AAAA,EACA,iBAAiB;AAAA,IACf,MAAM;AAAA,EAAA;AAEV,CAAC;"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";const e=require("@chakra-ui/react"),t=e.defineRecipe({className:"avatar",base:{display:"inline-flex",alignItems:"center",justifyContent:"center",verticalAlign:"middle",overflow:"hidden",userSelect:"none",borderRadius:"full",flexShrink:0,fontWeight:"600",backgroundColor:"colorPalette.3",colorPalette:"primary",color:"colorPalette.11",focusVisibleRing:"outside","button&":{cursor:"button"},_disabled:{layerStyle:"disabled"}},variants:{size:{md:{width:1e3,height:1e3,textStyle:"sm"},xs:{width:800,height:800,textStyle:"xs"},"2xs":{width:600,height:600,textStyle:"xs"}}},defaultVariants:{size:"md"}});exports.avatarRecipe=t;
|
|
2
|
+
//# sourceMappingURL=avatar.recipe-aGNBZhVF.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"avatar.recipe-aGNBZhVF.js","sources":["../../src/components/avatar/avatar.recipe.tsx"],"sourcesContent":["import { defineRecipe } from \"@chakra-ui/react\";\n\nexport const avatarRecipe = defineRecipe({\n className: \"avatar\",\n base: {\n display: \"inline-flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n verticalAlign: \"middle\",\n overflow: \"hidden\",\n userSelect: \"none\",\n borderRadius: \"full\",\n flexShrink: 0,\n fontWeight: \"600\",\n backgroundColor: \"colorPalette.3\",\n colorPalette: \"primary\",\n color: \"colorPalette.11\",\n focusVisibleRing: \"outside\",\n \"button&\": {\n cursor: \"button\",\n },\n _disabled: {\n layerStyle: \"disabled\",\n },\n },\n variants: {\n size: {\n md: { width: 1000, height: 1000, textStyle: \"sm\" },\n xs: { width: 800, height: 800, textStyle: \"xs\" },\n \"2xs\": { width: 600, height: 600, textStyle: \"xs\" },\n },\n },\n defaultVariants: {\n size: \"md\",\n },\n});\n"],"names":["avatarRecipe","defineRecipe"],"mappings":"iDAEaA,EAAeC,EAAAA,aAAa,CACvC,UAAW,SACX,KAAM,CACJ,QAAS,cACT,WAAY,SACZ,eAAgB,SAChB,cAAe,SACf,SAAU,SACV,WAAY,OACZ,aAAc,OACd,WAAY,EACZ,WAAY,MACZ,gBAAiB,iBACjB,aAAc,UACd,MAAO,kBACP,iBAAkB,UAClB,UAAW,CACT,OAAQ,QACV,EACA,UAAW,CACT,WAAY,UAAA,CAEhB,EACA,SAAU,CACR,KAAM,CACJ,GAAI,CAAE,MAAO,IAAM,OAAQ,IAAM,UAAW,IAAK,EACjD,GAAI,CAAE,MAAO,IAAK,OAAQ,IAAK,UAAW,IAAK,EAC/C,MAAO,CAAE,MAAO,IAAK,OAAQ,IAAK,UAAW,IAAK,CAAA,CAEtD,EACA,gBAAiB,CACf,KAAM,IAAA,CAEV,CAAC"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";const l=require("react/jsx-runtime"),f=require("react"),e=require("@chakra-ui/react"),g=require("./useObjectRef-4v2MxSjQ.js"),p=require("./mergeProps-BeIu4MsM.js"),h=e.defineRecipe({className:"nimbus-badge",base:{display:"inline-flex",alignItems:"center",borderRadius:"200",justifyContent:"center",whiteSpace:"nowrap",verticalAlign:"middle",py:"25",fontWeight:"500",backgroundColor:"colorPalette.3",color:"colorPalette.11",w:"auto",userSelect:"none",_icon:{flexShrink:"0"}},variants:{size:{"2xs":{fontSize:"300",gap:"100",h:"600",lineHeight:"350",px:"200",_icon:{width:"400",height:"400"}},xs:{fontSize:"350",gap:"100",h:"800",lineHeight:"400",px:"300",_icon:{width:"500",height:"500"}},md:{fontSize:"400",gap:"200",h:"1000",lineHeight:"500",px:"400",_icon:{width:"600",height:"600"}}}},defaultVariants:{size:"md"}}),{withContext:u}=e.createRecipeContext({recipe:h}),x=u("span"),t=i=>{const{ref:n,as:o,children:r,...s}=i,a=f.useRef(null),c=g.$df56164dff5785e2$export$4338b53315abf666(e.mergeRefs(a,n)),d=o||"span";return l.jsx(x,{as:d,...p.$3ef42575df84b30b$export$9d1611c77c2fe928(s,{ref:c}),children:r})};t.displayName="Badge";exports.Badge=t;
|
|
2
|
+
//# sourceMappingURL=badge-BFbBB0US.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"badge-BFbBB0US.js","sources":["../../src/components/badge/badge.recipe.tsx","../../src/components/badge/badge.slots.tsx","../../src/components/badge/badge.tsx"],"sourcesContent":["import { defineRecipe } from \"@chakra-ui/react\";\n\n/**\n * Recipe configuration for the Badge component.\n * Defines the styling variants and base styles using Chakra UI's recipe system.\n */\nexport const badgeRecipe = defineRecipe({\n className: \"nimbus-badge\",\n\n // Base styles applied to all instances of the component\n base: {\n display: \"inline-flex\",\n alignItems: \"center\",\n borderRadius: \"200\",\n justifyContent: \"center\",\n whiteSpace: \"nowrap\",\n verticalAlign: \"middle\",\n py: \"25\",\n fontWeight: \"500\",\n backgroundColor: \"colorPalette.3\",\n color: \"colorPalette.11\",\n w: \"auto\",\n userSelect: \"none\",\n _icon: {\n flexShrink: \"0\",\n },\n },\n\n // Available variants for customizing the component's appearance\n variants: {\n size: {\n \"2xs\": {\n fontSize: \"300\",\n gap: \"100\",\n h: \"600\",\n lineHeight: \"350\",\n px: \"200\",\n _icon: {\n width: \"400\",\n height: \"400\",\n },\n },\n xs: {\n fontSize: \"350\",\n gap: \"100\",\n h: \"800\",\n lineHeight: \"400\",\n px: \"300\",\n _icon: {\n width: \"500\",\n height: \"500\",\n },\n },\n md: {\n fontSize: \"400\",\n gap: \"200\",\n h: \"1000\",\n lineHeight: \"500\",\n px: \"400\",\n _icon: {\n width: \"600\",\n height: \"600\",\n },\n },\n },\n },\n\n // Default variant values when not explicitly specified\n defaultVariants: {\n size: \"md\",\n },\n});\n","import { createRecipeContext } from \"@chakra-ui/react\";\n\nimport { badgeRecipe } from \"./badge.recipe\";\nimport type { BadgeRootProps } from \"./badge.types\";\n\nconst { withContext } = createRecipeContext({ recipe: badgeRecipe });\n\nexport const BadgeRoot = withContext<HTMLSpanElement, BadgeRootProps>(\"span\");\n","import { useRef } from \"react\";\nimport { BadgeRoot } from \"./badge.slots\";\nimport type { BadgeProps } from \"./badge.types\";\nimport { mergeRefs } from \"@chakra-ui/react\";\nimport { useObjectRef, mergeProps } from \"react-aria\";\n/**\n * Badge\n * ============================================================\n * badge\n *\n * Features:\n *\n * - allows forwarding refs to the underlying DOM element\n * - accepts all native html 'HTMLSpanElement' 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 */\n\nexport const Badge = (props: BadgeProps) => {\n const { ref: forwardedRef, as, children, ...rest } = props;\n\n const localRef = useRef<HTMLSpanElement>(null);\n const ref = useObjectRef(mergeRefs(localRef, forwardedRef));\n\n const elementType = as || \"span\";\n\n return (\n <BadgeRoot as={elementType} {...mergeProps(rest, { ref })}>\n {children}\n </BadgeRoot>\n );\n};\n\nBadge.displayName = \"Badge\";\n"],"names":["badgeRecipe","defineRecipe","withContext","createRecipeContext","BadgeRoot","Badge","props","forwardedRef","as","children","rest","localRef","useRef","ref","useObjectRef","mergeRefs","elementType","jsx","mergeProps"],"mappings":"iLAMaA,EAAcC,EAAAA,aAAa,CACtC,UAAW,eAGX,KAAM,CACJ,QAAS,cACT,WAAY,SACZ,aAAc,MACd,eAAgB,SAChB,WAAY,SACZ,cAAe,SACf,GAAI,KACJ,WAAY,MACZ,gBAAiB,iBACjB,MAAO,kBACP,EAAG,OACH,WAAY,OACZ,MAAO,CACL,WAAY,GAAA,CAEhB,EAGA,SAAU,CACR,KAAM,CACJ,MAAO,CACL,SAAU,MACV,IAAK,MACL,EAAG,MACH,WAAY,MACZ,GAAI,MACJ,MAAO,CACL,MAAO,MACP,OAAQ,KAAA,CAEZ,EACA,GAAI,CACF,SAAU,MACV,IAAK,MACL,EAAG,MACH,WAAY,MACZ,GAAI,MACJ,MAAO,CACL,MAAO,MACP,OAAQ,KAAA,CAEZ,EACA,GAAI,CACF,SAAU,MACV,IAAK,MACL,EAAG,OACH,WAAY,MACZ,GAAI,MACJ,MAAO,CACL,MAAO,MACP,OAAQ,KAAA,CACV,CACF,CAEJ,EAGA,gBAAiB,CACf,KAAM,IAAA,CAEV,CAAC,EClEK,CAAE,YAAAC,CAAY,EAAIC,EAAAA,oBAAoB,CAAE,OAAQH,EAAa,EAEtDI,EAAYF,EAA6C,MAAM,ECY/DG,EAASC,GAAsB,CAC1C,KAAM,CAAE,IAAKC,EAAc,GAAAC,EAAI,SAAAC,EAAU,GAAGC,GAASJ,EAE/CK,EAAWC,SAAwB,IAAI,EACvCC,EAAMC,EAAA,0CAAaC,EAAU,UAAAJ,EAAUJ,CAAY,CAAC,EAEpDS,EAAcR,GAAM,OAGxB,OAAAS,MAACb,EAAU,CAAA,GAAIY,EAAc,GAAGE,4CAAWR,EAAM,CAAE,IAAAG,EAAK,EACrD,SAAAJ,CACH,CAAA,CAEJ,EAEAJ,EAAM,YAAc"}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { jsx as s } from "react/jsx-runtime";
|
|
2
|
+
import { useRef as c } from "react";
|
|
3
|
+
import { defineRecipe as f, createRecipeContext as l, mergeRefs as p } from "@chakra-ui/react";
|
|
4
|
+
import { $ as d } from "./useObjectRef-CaJ5pgjX.js";
|
|
5
|
+
import { $ as h } from "./mergeProps-tCFA9wZ1.js";
|
|
6
|
+
const m = /* @__PURE__ */ f({
|
|
7
|
+
className: "nimbus-badge",
|
|
8
|
+
// Base styles applied to all instances of the component
|
|
9
|
+
base: {
|
|
10
|
+
display: "inline-flex",
|
|
11
|
+
alignItems: "center",
|
|
12
|
+
borderRadius: "200",
|
|
13
|
+
justifyContent: "center",
|
|
14
|
+
whiteSpace: "nowrap",
|
|
15
|
+
verticalAlign: "middle",
|
|
16
|
+
py: "25",
|
|
17
|
+
fontWeight: "500",
|
|
18
|
+
backgroundColor: "colorPalette.3",
|
|
19
|
+
color: "colorPalette.11",
|
|
20
|
+
w: "auto",
|
|
21
|
+
userSelect: "none",
|
|
22
|
+
_icon: {
|
|
23
|
+
flexShrink: "0"
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
// Available variants for customizing the component's appearance
|
|
27
|
+
variants: {
|
|
28
|
+
size: {
|
|
29
|
+
"2xs": {
|
|
30
|
+
fontSize: "300",
|
|
31
|
+
gap: "100",
|
|
32
|
+
h: "600",
|
|
33
|
+
lineHeight: "350",
|
|
34
|
+
px: "200",
|
|
35
|
+
_icon: {
|
|
36
|
+
width: "400",
|
|
37
|
+
height: "400"
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
xs: {
|
|
41
|
+
fontSize: "350",
|
|
42
|
+
gap: "100",
|
|
43
|
+
h: "800",
|
|
44
|
+
lineHeight: "400",
|
|
45
|
+
px: "300",
|
|
46
|
+
_icon: {
|
|
47
|
+
width: "500",
|
|
48
|
+
height: "500"
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
md: {
|
|
52
|
+
fontSize: "400",
|
|
53
|
+
gap: "200",
|
|
54
|
+
h: "1000",
|
|
55
|
+
lineHeight: "500",
|
|
56
|
+
px: "400",
|
|
57
|
+
_icon: {
|
|
58
|
+
width: "600",
|
|
59
|
+
height: "600"
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
// Default variant values when not explicitly specified
|
|
65
|
+
defaultVariants: {
|
|
66
|
+
size: "md"
|
|
67
|
+
}
|
|
68
|
+
}), { withContext: g } = /* @__PURE__ */ l({ recipe: m }), x = /* @__PURE__ */ g("span"), b = (e) => {
|
|
69
|
+
const { ref: t, as: i, children: o, ...n } = e, a = c(null), r = d(p(a, t));
|
|
70
|
+
return /* @__PURE__ */ s(x, { as: i || "span", ...h(n, { ref: r }), children: o });
|
|
71
|
+
};
|
|
72
|
+
b.displayName = "Badge";
|
|
73
|
+
export {
|
|
74
|
+
b as B
|
|
75
|
+
};
|
|
76
|
+
//# sourceMappingURL=badge-C1bFH3CB.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"badge-C1bFH3CB.js","sources":["../../src/components/badge/badge.recipe.tsx","../../src/components/badge/badge.slots.tsx","../../src/components/badge/badge.tsx"],"sourcesContent":["import { defineRecipe } from \"@chakra-ui/react\";\n\n/**\n * Recipe configuration for the Badge component.\n * Defines the styling variants and base styles using Chakra UI's recipe system.\n */\nexport const badgeRecipe = defineRecipe({\n className: \"nimbus-badge\",\n\n // Base styles applied to all instances of the component\n base: {\n display: \"inline-flex\",\n alignItems: \"center\",\n borderRadius: \"200\",\n justifyContent: \"center\",\n whiteSpace: \"nowrap\",\n verticalAlign: \"middle\",\n py: \"25\",\n fontWeight: \"500\",\n backgroundColor: \"colorPalette.3\",\n color: \"colorPalette.11\",\n w: \"auto\",\n userSelect: \"none\",\n _icon: {\n flexShrink: \"0\",\n },\n },\n\n // Available variants for customizing the component's appearance\n variants: {\n size: {\n \"2xs\": {\n fontSize: \"300\",\n gap: \"100\",\n h: \"600\",\n lineHeight: \"350\",\n px: \"200\",\n _icon: {\n width: \"400\",\n height: \"400\",\n },\n },\n xs: {\n fontSize: \"350\",\n gap: \"100\",\n h: \"800\",\n lineHeight: \"400\",\n px: \"300\",\n _icon: {\n width: \"500\",\n height: \"500\",\n },\n },\n md: {\n fontSize: \"400\",\n gap: \"200\",\n h: \"1000\",\n lineHeight: \"500\",\n px: \"400\",\n _icon: {\n width: \"600\",\n height: \"600\",\n },\n },\n },\n },\n\n // Default variant values when not explicitly specified\n defaultVariants: {\n size: \"md\",\n },\n});\n","import { createRecipeContext } from \"@chakra-ui/react\";\n\nimport { badgeRecipe } from \"./badge.recipe\";\nimport type { BadgeRootProps } from \"./badge.types\";\n\nconst { withContext } = createRecipeContext({ recipe: badgeRecipe });\n\nexport const BadgeRoot = withContext<HTMLSpanElement, BadgeRootProps>(\"span\");\n","import { useRef } from \"react\";\nimport { BadgeRoot } from \"./badge.slots\";\nimport type { BadgeProps } from \"./badge.types\";\nimport { mergeRefs } from \"@chakra-ui/react\";\nimport { useObjectRef, mergeProps } from \"react-aria\";\n/**\n * Badge\n * ============================================================\n * badge\n *\n * Features:\n *\n * - allows forwarding refs to the underlying DOM element\n * - accepts all native html 'HTMLSpanElement' 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 */\n\nexport const Badge = (props: BadgeProps) => {\n const { ref: forwardedRef, as, children, ...rest } = props;\n\n const localRef = useRef<HTMLSpanElement>(null);\n const ref = useObjectRef(mergeRefs(localRef, forwardedRef));\n\n const elementType = as || \"span\";\n\n return (\n <BadgeRoot as={elementType} {...mergeProps(rest, { ref })}>\n {children}\n </BadgeRoot>\n );\n};\n\nBadge.displayName = \"Badge\";\n"],"names":["badgeRecipe","defineRecipe","withContext","createRecipeContext","BadgeRoot","Badge","props","forwardedRef","as","children","rest","localRef","useRef","ref","useObjectRef","mergeRefs","jsx","mergeProps"],"mappings":";;;;;AAMO,MAAMA,IAAc,gBAAAC,EAAa;AAAA,EACtC,WAAW;AAAA;AAAA,EAGX,MAAM;AAAA,IACJ,SAAS;AAAA,IACT,YAAY;AAAA,IACZ,cAAc;AAAA,IACd,gBAAgB;AAAA,IAChB,YAAY;AAAA,IACZ,eAAe;AAAA,IACf,IAAI;AAAA,IACJ,YAAY;AAAA,IACZ,iBAAiB;AAAA,IACjB,OAAO;AAAA,IACP,GAAG;AAAA,IACH,YAAY;AAAA,IACZ,OAAO;AAAA,MACL,YAAY;AAAA,IAAA;AAAA,EAEhB;AAAA;AAAA,EAGA,UAAU;AAAA,IACR,MAAM;AAAA,MACJ,OAAO;AAAA,QACL,UAAU;AAAA,QACV,KAAK;AAAA,QACL,GAAG;AAAA,QACH,YAAY;AAAA,QACZ,IAAI;AAAA,QACJ,OAAO;AAAA,UACL,OAAO;AAAA,UACP,QAAQ;AAAA,QAAA;AAAA,MAEZ;AAAA,MACA,IAAI;AAAA,QACF,UAAU;AAAA,QACV,KAAK;AAAA,QACL,GAAG;AAAA,QACH,YAAY;AAAA,QACZ,IAAI;AAAA,QACJ,OAAO;AAAA,UACL,OAAO;AAAA,UACP,QAAQ;AAAA,QAAA;AAAA,MAEZ;AAAA,MACA,IAAI;AAAA,QACF,UAAU;AAAA,QACV,KAAK;AAAA,QACL,GAAG;AAAA,QACH,YAAY;AAAA,QACZ,IAAI;AAAA,QACJ,OAAO;AAAA,UACL,OAAO;AAAA,UACP,QAAQ;AAAA,QAAA;AAAA,MACV;AAAA,IACF;AAAA,EAEJ;AAAA;AAAA,EAGA,iBAAiB;AAAA,IACf,MAAM;AAAA,EAAA;AAEV,CAAC,GClEK,EAAE,aAAAC,EAAY,IAAI,gBAAAC,EAAoB,EAAE,QAAQH,GAAa,GAEtDI,IAAY,gBAAAF,EAA6C,MAAM,GCY/DG,IAAQ,CAACC,MAAsB;AAC1C,QAAM,EAAE,KAAKC,GAAc,IAAAC,GAAI,UAAAC,GAAU,GAAGC,MAASJ,GAE/CK,IAAWC,EAAwB,IAAI,GACvCC,IAAMC,EAAaC,EAAUJ,GAAUJ,CAAY,CAAC;AAKxD,SAAA,gBAAAS,EAACZ,GAAU,EAAA,IAHOI,KAAM,QAGK,GAAGS,EAAWP,GAAM,EAAE,KAAAG,GAAK,GACrD,UAAAJ,EACH,CAAA;AAEJ;AAEAJ,EAAM,cAAc;"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import { Box as x } from "@chakra-ui/react";
|
|
3
|
+
const e = (o) => {
|
|
4
|
+
const { ref: r, ...s } = o;
|
|
5
|
+
return /* @__PURE__ */ t(x, { ref: r, ...s });
|
|
6
|
+
};
|
|
7
|
+
e.displayName = "Box";
|
|
8
|
+
export {
|
|
9
|
+
e as B
|
|
10
|
+
};
|
|
11
|
+
//# sourceMappingURL=box-DD4jYgS7.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"box-DD4jYgS7.js","sources":["../../src/components/box/box.tsx"],"sourcesContent":["import { Box as ChakraBox, type HTMLChakraProps } from \"@chakra-ui/react\";\n\nexport interface BoxProps extends HTMLChakraProps<\"div\"> {\n children?: React.ReactNode;\n ref?: React.Ref<HTMLDivElement>;\n}\n\nexport const Box = (props: BoxProps) => {\n const { ref, ...restProps } = props;\n return <ChakraBox ref={ref} {...restProps} />;\n};\n\nBox.displayName = \"Box\";\n"],"names":["Box","props","ref","restProps","jsx","ChakraBox"],"mappings":";;AAOa,MAAAA,IAAM,CAACC,MAAoB;AACtC,QAAM,EAAE,KAAAC,GAAK,GAAGC,EAAA,IAAcF;AAC9B,SAAQ,gBAAAG,EAAAC,GAAA,EAAU,KAAAH,GAAW,GAAGC,EAAW,CAAA;AAC7C;AAEAH,EAAI,cAAc;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"box-FU6tRPFs.js","sources":["../../src/components/box/box.tsx"],"sourcesContent":["import { Box as ChakraBox, type HTMLChakraProps } from \"@chakra-ui/react\";\n\nexport interface BoxProps extends HTMLChakraProps<\"div\"> {\n children?: React.ReactNode;\n ref?: React.Ref<HTMLDivElement>;\n}\n\nexport const Box = (props: BoxProps) => {\n const { ref, ...restProps } = props;\n return <ChakraBox ref={ref} {...restProps} />;\n};\n\nBox.displayName = \"Box\";\n"],"names":["Box","props","ref","restProps","jsx","ChakraBox"],"mappings":"gFAOaA,EAAOC,GAAoB,CACtC,KAAM,CAAE,IAAAC,EAAK,GAAGC,CAAA,EAAcF,EAC9B,OAAQG,EAAA,IAAAC,EAAA,IAAA,CAAU,IAAAH,EAAW,GAAGC,CAAW,CAAA,CAC7C,EAEAH,EAAI,YAAc"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";const f=require("react/jsx-runtime"),m=require("react"),h=require("./Button-tPOlfQRd.js"),g=require("./utils-XbOVivul.js"),o=require("@chakra-ui/react"),y=require("./button.recipe-DHk13lGU.js"),k=require("./useObjectRef-4v2MxSjQ.js"),b=require("./mergeProps-BeIu4MsM.js"),x=require("./useButton-BZrUUsJ0.js");function v(e){var t=Object.create(null);return function(r){return t[r]===void 0&&(t[r]=e(r)),t[r]}}var R=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|fetchpriority|fetchPriority|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,P=v(function(e){return R.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91});const{withContext:S}=o.createRecipeContext({recipe:y.buttonRecipe}),C=S("button",{defaultProps:{type:"button"},shouldForwardProp(e,t){const r=!(t!=null&&t.includes(e))&&!o.defaultSystem.isValidProperty(e);return P(e)&&r&&!e.includes("onPress")}}),s=e=>{const{ref:t,as:r,asChild:a,children:l,...c}=e,d=m.useRef(null),n=k.$df56164dff5785e2$export$4338b53315abf666(o.mergeRefs(d,t)),[i]=g.$64fa3d84918910a7$export$29f1550f4b0d4415(c,n,h.$d2b4bc8c273e7be6$export$24d547caef80ccd1),u=r||(a?"a":"button")||"button",{buttonProps:p}=x.$701a24aa0da5b062$export$ea18c227d4417cc3({...i,elementType:u},n);return f.jsx(C,{...b.$3ef42575df84b30b$export$9d1611c77c2fe928(i,p,{as:r,asChild:a,slot:i.slot||void 0}),ref:n,children:l})};s.displayName="Button";exports.Button=s;
|
|
2
|
+
//# sourceMappingURL=button-BLZONb0_.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"button-BLZONb0_.js","sources":["../../../../node_modules/.pnpm/@emotion+memoize@0.9.0/node_modules/@emotion/memoize/dist/emotion-memoize.esm.js","../../../../node_modules/.pnpm/@emotion+is-prop-valid@1.3.1/node_modules/@emotion/is-prop-valid/dist/emotion-is-prop-valid.esm.js","../../src/components/button/button.slots.tsx","../../src/components/button/button.tsx"],"sourcesContent":["function memoize(fn) {\n var cache = Object.create(null);\n return function (arg) {\n if (cache[arg] === undefined) cache[arg] = fn(arg);\n return cache[arg];\n };\n}\n\nexport { memoize as default };\n","import memoize from '@emotion/memoize';\n\n// eslint-disable-next-line no-undef\nvar reactPropsRegex = /^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|fetchpriority|fetchPriority|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/; // https://esbench.com/bench/5bfee68a4cd7e6009ef61d23\n\nvar isPropValid = /* #__PURE__ */memoize(function (prop) {\n return reactPropsRegex.test(prop) || prop.charCodeAt(0) === 111\n /* o */\n && prop.charCodeAt(1) === 110\n /* n */\n && prop.charCodeAt(2) < 91;\n}\n/* Z+1 */\n);\n\nexport { isPropValid as default };\n","/* eslint-disable @typescript-eslint/no-empty-object-type */\nimport {\n type HTMLChakraProps,\n type RecipeProps,\n type UnstyledProp,\n createRecipeContext,\n defaultSystem,\n} from \"@chakra-ui/react\";\nimport { buttonRecipe } from \"./button.recipe\";\nimport shouldForwardProp from \"@emotion/is-prop-valid\";\n\n/**\n * Base recipe props interface that combines Chakra UI's recipe props\n * with the unstyled prop option for the button element.\n */\ninterface ButtonRecipeProps extends RecipeProps<\"button\">, 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 ButtonRootProps\n extends Omit<HTMLChakraProps<\"button\", ButtonRecipeProps>, \"slot\"> {\n // insure that the `ButtonRoot` component doesn't give a type error\n slot?: string | null | undefined;\n}\n\nconst { withContext } = createRecipeContext({\n recipe: buttonRecipe,\n});\n\n/**\n * Root component that provides the styling context for the Button component.\n * Uses Chakra UI's recipe context system for consistent styling across instances.\n */\nexport const ButtonRoot = withContext<HTMLButtonElement, ButtonRootProps>(\n \"button\",\n {\n defaultProps: {\n type: \"button\",\n },\n /** make sure the `onPress` properties won't end up as attribute on the rendered DOM element */\n shouldForwardProp(prop, variantKeys) {\n const chakraSfp =\n !variantKeys?.includes(prop) && !defaultSystem.isValidProperty(prop);\n return shouldForwardProp(prop) && chakraSfp && !prop.includes(\"onPress\");\n },\n }\n);\n","import { useRef } from \"react\";\nimport { useButton, useObjectRef, mergeProps } from \"react-aria\";\nimport { ButtonContext, useContextProps } from \"react-aria-components\";\nimport { mergeRefs } from \"@chakra-ui/react\";\nimport { ButtonRoot } from \"./button.slots.tsx\";\nimport type { ButtonProps } from \"./button.types.ts\";\n\nexport const Button = (props: ButtonProps) => {\n const { ref: forwardedRef, as, asChild, children, ...rest } = props;\n\n // create a local ref (because the consumer may not provide a forwardedRef)\n const localRef = useRef<HTMLButtonElement>(null);\n // merge the local ref with a potentially forwarded ref\n const ref = useObjectRef(mergeRefs(localRef, forwardedRef));\n\n // Consume context props based on slot (this enables slot-aware behavior)\n const [contextProps] = useContextProps(rest, ref, ButtonContext);\n\n // if asChild is set, for react-aria to add the button-role, the elementType\n // has to be manually set to something else than button\n\n const elementType = as || (asChild ? \"a\" : \"button\") || \"button\";\n\n const { buttonProps } = useButton(\n {\n ...contextProps,\n elementType,\n },\n ref\n );\n\n return (\n <ButtonRoot\n {...mergeProps(contextProps, buttonProps, {\n as,\n asChild,\n /**\n * In case `slot` was null, the `useContextProps` hook already\n * processed it at this point, so it's safe to not attach it\n * to the DOM element\n */\n slot: contextProps.slot || undefined,\n })}\n ref={ref}\n >\n {children}\n </ButtonRoot>\n );\n};\n\n// Manually assign a displayName for debugging purposes\nButton.displayName = \"Button\";\n"],"names":["memoize","fn","cache","arg","reactPropsRegex","isPropValid","prop","withContext","createRecipeContext","buttonRecipe","ButtonRoot","variantKeys","chakraSfp","defaultSystem","shouldForwardProp","Button","props","forwardedRef","as","asChild","children","rest","localRef","useRef","ref","useObjectRef","mergeRefs","contextProps","useContextProps","ButtonContext","elementType","buttonProps","useButton","jsx","mergeProps"],"mappings":"kUAAA,SAASA,EAAQC,EAAI,CACnB,IAAIC,EAAQ,OAAO,OAAO,IAAI,EAC9B,OAAO,SAAUC,EAAK,CACpB,OAAID,EAAMC,CAAG,IAAM,SAAWD,EAAMC,CAAG,EAAIF,EAAGE,CAAG,GAC1CD,EAAMC,CAAG,CACjB,CACH,CCHA,IAAIC,EAAkB,sgIAElBC,EAA6BL,EAAQ,SAAUM,EAAM,CACvD,OAAOF,EAAgB,KAAKE,CAAI,GAAKA,EAAK,WAAW,CAAC,IAAM,KAEzDA,EAAK,WAAW,CAAC,IAAM,KAEvBA,EAAK,WAAW,CAAC,EAAI,EAC1B,CAEA,ECeA,KAAM,CAAE,YAAAC,CAAY,EAAIC,sBAAoB,CAC1C,OAAQC,EAAAA,YACV,CAAC,EAMYC,EAAaH,EACxB,SACA,CACE,aAAc,CACZ,KAAM,QACR,EAEA,kBAAkBD,EAAMK,EAAa,CAC7B,MAAAC,EACJ,EAACD,GAAA,MAAAA,EAAa,SAASL,KAAS,CAACO,EAAAA,cAAc,gBAAgBP,CAAI,EACrE,OAAOQ,EAAkBR,CAAI,GAAKM,GAAa,CAACN,EAAK,SAAS,SAAS,CAAA,CACzE,CAEJ,EC1CaS,EAAUC,GAAuB,CACtC,KAAA,CAAE,IAAKC,EAAc,GAAAC,EAAI,QAAAC,EAAS,SAAAC,EAAU,GAAGC,GAASL,EAGxDM,EAAWC,SAA0B,IAAI,EAEzCC,EAAMC,EAAA,0CAAaC,EAAU,UAAAJ,EAAUL,CAAY,CAAC,EAGpD,CAACU,CAAY,EAAIC,EAAAA,0CAAgBP,EAAMG,EAAKK,EAAAA,yCAAa,EAKzDC,EAAcZ,IAAOC,EAAU,IAAM,WAAa,SAElD,CAAE,YAAAY,GAAgBC,EAAA,0CACtB,CACE,GAAGL,EACH,YAAAG,CACF,EACAN,CACF,EAGE,OAAAS,EAAA,IAACvB,EAAA,CACE,GAAGwB,EAAW,0CAAAP,EAAcI,EAAa,CACxC,GAAAb,EACA,QAAAC,EAMA,KAAMQ,EAAa,MAAQ,MAAA,CAC5B,EACD,IAAAH,EAEC,SAAAJ,CAAA,CACH,CAEJ,EAGAL,EAAO,YAAc","x_google_ignoreList":[0,1]}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { jsx as p } from "react/jsx-runtime";
|
|
2
|
+
import { useRef as u } from "react";
|
|
3
|
+
import { $ as m } from "./Button-BxcMDv2N.js";
|
|
4
|
+
import { $ as f } from "./utils-7n9JR4ke.js";
|
|
5
|
+
import { createRecipeContext as h, defaultSystem as g, mergeRefs as y } from "@chakra-ui/react";
|
|
6
|
+
import { b as k } from "./button.recipe-DzOS_Bqm.js";
|
|
7
|
+
import { $ as b } from "./useObjectRef-CaJ5pgjX.js";
|
|
8
|
+
import { $ as x } from "./mergeProps-tCFA9wZ1.js";
|
|
9
|
+
import { $ as v } from "./useButton-C5ATfvOf.js";
|
|
10
|
+
function P(e) {
|
|
11
|
+
var t = /* @__PURE__ */ Object.create(null);
|
|
12
|
+
return function(r) {
|
|
13
|
+
return t[r] === void 0 && (t[r] = e(r)), t[r];
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
var R = /^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|fetchpriority|fetchPriority|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/, S = /* @__PURE__ */ P(
|
|
17
|
+
function(e) {
|
|
18
|
+
return R.test(e) || e.charCodeAt(0) === 111 && e.charCodeAt(1) === 110 && e.charCodeAt(2) < 91;
|
|
19
|
+
}
|
|
20
|
+
/* Z+1 */
|
|
21
|
+
);
|
|
22
|
+
const { withContext: C } = /* @__PURE__ */ h({
|
|
23
|
+
recipe: k
|
|
24
|
+
}), T = /* @__PURE__ */ C(
|
|
25
|
+
"button",
|
|
26
|
+
{
|
|
27
|
+
defaultProps: {
|
|
28
|
+
type: "button"
|
|
29
|
+
},
|
|
30
|
+
/** make sure the `onPress` properties won't end up as attribute on the rendered DOM element */
|
|
31
|
+
shouldForwardProp(e, t) {
|
|
32
|
+
const r = !(t != null && t.includes(e)) && !g.isValidProperty(e);
|
|
33
|
+
return S(e) && r && !e.includes("onPress");
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
), w = (e) => {
|
|
37
|
+
const { ref: t, as: r, asChild: n, children: a, ...s } = e, l = u(null), o = b(y(l, t)), [i] = f(s, o, m), c = r || (n ? "a" : "button") || "button", { buttonProps: d } = v(
|
|
38
|
+
{
|
|
39
|
+
...i,
|
|
40
|
+
elementType: c
|
|
41
|
+
},
|
|
42
|
+
o
|
|
43
|
+
);
|
|
44
|
+
return /* @__PURE__ */ p(
|
|
45
|
+
T,
|
|
46
|
+
{
|
|
47
|
+
...x(i, d, {
|
|
48
|
+
as: r,
|
|
49
|
+
asChild: n,
|
|
50
|
+
/**
|
|
51
|
+
* In case `slot` was null, the `useContextProps` hook already
|
|
52
|
+
* processed it at this point, so it's safe to not attach it
|
|
53
|
+
* to the DOM element
|
|
54
|
+
*/
|
|
55
|
+
slot: i.slot || void 0
|
|
56
|
+
}),
|
|
57
|
+
ref: o,
|
|
58
|
+
children: a
|
|
59
|
+
}
|
|
60
|
+
);
|
|
61
|
+
};
|
|
62
|
+
w.displayName = "Button";
|
|
63
|
+
export {
|
|
64
|
+
w as B
|
|
65
|
+
};
|
|
66
|
+
//# sourceMappingURL=button-zSDA7FRw.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"button-zSDA7FRw.js","sources":["../../../../node_modules/.pnpm/@emotion+memoize@0.9.0/node_modules/@emotion/memoize/dist/emotion-memoize.esm.js","../../../../node_modules/.pnpm/@emotion+is-prop-valid@1.3.1/node_modules/@emotion/is-prop-valid/dist/emotion-is-prop-valid.esm.js","../../src/components/button/button.slots.tsx","../../src/components/button/button.tsx"],"sourcesContent":["function memoize(fn) {\n var cache = Object.create(null);\n return function (arg) {\n if (cache[arg] === undefined) cache[arg] = fn(arg);\n return cache[arg];\n };\n}\n\nexport { memoize as default };\n","import memoize from '@emotion/memoize';\n\n// eslint-disable-next-line no-undef\nvar reactPropsRegex = /^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|fetchpriority|fetchPriority|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/; // https://esbench.com/bench/5bfee68a4cd7e6009ef61d23\n\nvar isPropValid = /* #__PURE__ */memoize(function (prop) {\n return reactPropsRegex.test(prop) || prop.charCodeAt(0) === 111\n /* o */\n && prop.charCodeAt(1) === 110\n /* n */\n && prop.charCodeAt(2) < 91;\n}\n/* Z+1 */\n);\n\nexport { isPropValid as default };\n","/* eslint-disable @typescript-eslint/no-empty-object-type */\nimport {\n type HTMLChakraProps,\n type RecipeProps,\n type UnstyledProp,\n createRecipeContext,\n defaultSystem,\n} from \"@chakra-ui/react\";\nimport { buttonRecipe } from \"./button.recipe\";\nimport shouldForwardProp from \"@emotion/is-prop-valid\";\n\n/**\n * Base recipe props interface that combines Chakra UI's recipe props\n * with the unstyled prop option for the button element.\n */\ninterface ButtonRecipeProps extends RecipeProps<\"button\">, 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 ButtonRootProps\n extends Omit<HTMLChakraProps<\"button\", ButtonRecipeProps>, \"slot\"> {\n // insure that the `ButtonRoot` component doesn't give a type error\n slot?: string | null | undefined;\n}\n\nconst { withContext } = createRecipeContext({\n recipe: buttonRecipe,\n});\n\n/**\n * Root component that provides the styling context for the Button component.\n * Uses Chakra UI's recipe context system for consistent styling across instances.\n */\nexport const ButtonRoot = withContext<HTMLButtonElement, ButtonRootProps>(\n \"button\",\n {\n defaultProps: {\n type: \"button\",\n },\n /** make sure the `onPress` properties won't end up as attribute on the rendered DOM element */\n shouldForwardProp(prop, variantKeys) {\n const chakraSfp =\n !variantKeys?.includes(prop) && !defaultSystem.isValidProperty(prop);\n return shouldForwardProp(prop) && chakraSfp && !prop.includes(\"onPress\");\n },\n }\n);\n","import { useRef } from \"react\";\nimport { useButton, useObjectRef, mergeProps } from \"react-aria\";\nimport { ButtonContext, useContextProps } from \"react-aria-components\";\nimport { mergeRefs } from \"@chakra-ui/react\";\nimport { ButtonRoot } from \"./button.slots.tsx\";\nimport type { ButtonProps } from \"./button.types.ts\";\n\nexport const Button = (props: ButtonProps) => {\n const { ref: forwardedRef, as, asChild, children, ...rest } = props;\n\n // create a local ref (because the consumer may not provide a forwardedRef)\n const localRef = useRef<HTMLButtonElement>(null);\n // merge the local ref with a potentially forwarded ref\n const ref = useObjectRef(mergeRefs(localRef, forwardedRef));\n\n // Consume context props based on slot (this enables slot-aware behavior)\n const [contextProps] = useContextProps(rest, ref, ButtonContext);\n\n // if asChild is set, for react-aria to add the button-role, the elementType\n // has to be manually set to something else than button\n\n const elementType = as || (asChild ? \"a\" : \"button\") || \"button\";\n\n const { buttonProps } = useButton(\n {\n ...contextProps,\n elementType,\n },\n ref\n );\n\n return (\n <ButtonRoot\n {...mergeProps(contextProps, buttonProps, {\n as,\n asChild,\n /**\n * In case `slot` was null, the `useContextProps` hook already\n * processed it at this point, so it's safe to not attach it\n * to the DOM element\n */\n slot: contextProps.slot || undefined,\n })}\n ref={ref}\n >\n {children}\n </ButtonRoot>\n );\n};\n\n// Manually assign a displayName for debugging purposes\nButton.displayName = \"Button\";\n"],"names":["memoize","fn","cache","arg","reactPropsRegex","isPropValid","prop","withContext","createRecipeContext","buttonRecipe","ButtonRoot","variantKeys","chakraSfp","defaultSystem","shouldForwardProp","Button","props","forwardedRef","as","asChild","children","rest","localRef","useRef","ref","useObjectRef","mergeRefs","contextProps","useContextProps","ButtonContext","elementType","buttonProps","useButton","jsx","mergeProps"],"mappings":";;;;;;;;;AAAA,SAASA,EAAQC,GAAI;AACnB,MAAIC,IAAQ,uBAAO,OAAO,IAAI;AAC9B,SAAO,SAAUC,GAAK;AACpB,WAAID,EAAMC,CAAG,MAAM,WAAWD,EAAMC,CAAG,IAAIF,EAAGE,CAAG,IAC1CD,EAAMC,CAAG;AAAA,EACjB;AACH;ACHA,IAAIC,IAAkB,ugIAElBC,IAA6B,gBAAAL;AAAA,EAAQ,SAAUM,GAAM;AACvD,WAAOF,EAAgB,KAAKE,CAAI,KAAKA,EAAK,WAAW,CAAC,MAAM,OAEzDA,EAAK,WAAW,CAAC,MAAM,OAEvBA,EAAK,WAAW,CAAC,IAAI;AAAA,EAC1B;AAAA;AAEA;ACeA,MAAM,EAAE,aAAAC,EAAY,IAAI,gBAAAC,EAAoB;AAAA,EAC1C,QAAQC;AACV,CAAC,GAMYC,IAAa,gBAAAH;AAAA,EACxB;AAAA,EACA;AAAA,IACE,cAAc;AAAA,MACZ,MAAM;AAAA,IACR;AAAA;AAAA,IAEA,kBAAkBD,GAAMK,GAAa;AAC7B,YAAAC,IACJ,EAACD,KAAA,QAAAA,EAAa,SAASL,OAAS,CAACO,EAAc,gBAAgBP,CAAI;AACrE,aAAOQ,EAAkBR,CAAI,KAAKM,KAAa,CAACN,EAAK,SAAS,SAAS;AAAA,IAAA;AAAA,EACzE;AAEJ,GC1CaS,IAAS,CAACC,MAAuB;AACtC,QAAA,EAAE,KAAKC,GAAc,IAAAC,GAAI,SAAAC,GAAS,UAAAC,GAAU,GAAGC,MAASL,GAGxDM,IAAWC,EAA0B,IAAI,GAEzCC,IAAMC,EAAaC,EAAUJ,GAAUL,CAAY,CAAC,GAGpD,CAACU,CAAY,IAAIC,EAAgBP,GAAMG,GAAKK,CAAa,GAKzDC,IAAcZ,MAAOC,IAAU,MAAM,aAAa,UAElD,EAAE,aAAAY,MAAgBC;AAAAA,IACtB;AAAA,MACE,GAAGL;AAAA,MACH,aAAAG;AAAA,IACF;AAAA,IACAN;AAAA,EACF;AAGE,SAAA,gBAAAS;AAAA,IAACvB;AAAA,IAAA;AAAA,MACE,GAAGwB,EAAWP,GAAcI,GAAa;AAAA,QACxC,IAAAb;AAAA,QACA,SAAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,QAMA,MAAMQ,EAAa,QAAQ;AAAA,MAAA,CAC5B;AAAA,MACD,KAAAH;AAAA,MAEC,UAAAJ;AAAA,IAAA;AAAA,EACH;AAEJ;AAGAL,EAAO,cAAc;","x_google_ignoreList":[0,1]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";const e=require("@chakra-ui/react"),t=e.defineRecipe({className:"nimbus-button",base:{borderRadius:"200",display:"inline-flex",appearance:"none",alignItems:"center",justifyContent:"center",userSelect:"none",position:"relative",whiteSpace:"nowrap",verticalAlign:"middle",borderWidth:"1px",borderColor:"transparent",cursor:"button",flexShrink:"0",outline:"0",lineHeight:"1.2",isolation:"isolate",fontWeight:"500",transitionProperty:"common",transitionDuration:"moderate",focusVisibleRing:"outside",_disabled:{layerStyle:"disabled"},_icon:{flexShrink:"0"}},variants:{size:{"2xs":{h:"600",minW:"600",fontSize:"300",fontWeight:"500",lineHeight:"400",px:"200",gap:"100",_icon:{width:"400",height:"400"}},xs:{h:"800",minW:"800",fontSize:"350",fontWeight:"500",lineHeight:"400",px:"300",gap:"100",_icon:{width:"500",height:"500"}},md:{h:"1000",minW:"1000",fontSize:"400",lineHeight:"500",px:"400",gap:"200",_icon:{width:"600",height:"600"}}},variant:{solid:{bg:"colorPalette.9",color:"colorPalette.contrast",_hover:{bg:"colorPalette.10"},_expanded:{bg:"colorPalette.10"}},subtle:{bg:"colorPalette.3",color:"colorPalette.11",_hover:{bg:"colorPalette.4"},_expanded:{bg:"colorPalette.4"}},outline:{borderWidth:"1px",borderColor:"colorPalette.7",color:"colorPalette.11",transitionProperty:"background-color, border-color, color",transitionDuration:"moderate",_hover:{bg:"colorPalette.3",borderColor:"colorPalette.8"},_expanded:{bg:"colorPalette.subtle"}},ghost:{color:"colorPalette.11",_hover:{bg:"colorPalette.4"},_expanded:{bg:"colorPalette.4"}},link:{color:"colorPalette.11",_hover:{textDecoration:"underline"}}},tone:{primary:{colorPalette:"primary"},critical:{colorPalette:"critical"},neutral:{colorPalette:"neutral"},info:{colorPalette:"info"}}},defaultVariants:{size:"md",variant:"subtle"}});exports.buttonRecipe=t;
|
|
2
|
+
//# sourceMappingURL=button.recipe-DHk13lGU.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"button.recipe-DHk13lGU.js","sources":["../../src/components/button/button.recipe.ts"],"sourcesContent":["import { defineRecipe } from \"@chakra-ui/react\";\n\nexport const buttonRecipe = defineRecipe({\n className: \"nimbus-button\",\n base: {\n borderRadius: \"200\",\n display: \"inline-flex\",\n appearance: \"none\",\n alignItems: \"center\",\n justifyContent: \"center\",\n userSelect: \"none\",\n position: \"relative\",\n whiteSpace: \"nowrap\",\n verticalAlign: \"middle\",\n borderWidth: \"1px\",\n borderColor: \"transparent\",\n cursor: \"button\",\n flexShrink: \"0\",\n outline: \"0\",\n lineHeight: \"1.2\",\n isolation: \"isolate\",\n fontWeight: \"500\",\n transitionProperty: \"common\",\n transitionDuration: \"moderate\",\n focusVisibleRing: \"outside\",\n _disabled: {\n layerStyle: \"disabled\",\n },\n _icon: {\n flexShrink: \"0\",\n },\n },\n variants: {\n size: {\n \"2xs\": {\n h: \"600\",\n minW: \"600\",\n fontSize: \"300\",\n fontWeight: \"500\",\n lineHeight: \"400\",\n px: \"200\",\n gap: \"100\",\n _icon: {\n width: \"400\",\n height: \"400\",\n },\n },\n xs: {\n h: \"800\",\n minW: \"800\",\n fontSize: \"350\",\n fontWeight: \"500\",\n lineHeight: \"400\",\n px: \"300\",\n gap: \"100\",\n _icon: {\n width: \"500\",\n height: \"500\",\n },\n },\n /* sm: {\n h: \"900\",\n minW: \"900\",\n px: \"350\",\n textStyle: \"sm\",\n gap: \"200\",\n _icon: {\n width: \"400\",\n height: \"400\",\n },\n }, */\n md: {\n h: \"1000\",\n minW: \"1000\",\n fontSize: \"400\",\n lineHeight: \"500\",\n px: \"400\",\n gap: \"200\",\n _icon: {\n width: \"600\",\n height: \"600\",\n },\n },\n /* lg: {\n h: \"1100\",\n minW: \"1100\",\n textStyle: \"md\",\n px: \"500\",\n gap: \"300\",\n _icon: {\n width: \"500\",\n height: \"500\",\n },\n }, */\n /* xl: {\n h: \"1200\",\n minW: \"1200\",\n textStyle: \"md\",\n px: \"500\",\n gap: \"250\",\n _icon: {\n width: \"500\",\n height: \"500\",\n },\n }, */\n /* \"2xl\": {\n h: \"1600\",\n minW: \"1600\",\n textStyle: \"lg\",\n px: \"700\",\n gap: \"300\",\n _icon: {\n width: \"600\",\n height: \"600\",\n },\n }, */\n },\n variant: {\n solid: {\n bg: \"colorPalette.9\",\n color: \"colorPalette.contrast\",\n _hover: {\n bg: \"colorPalette.10\",\n },\n _expanded: {\n bg: \"colorPalette.10\",\n },\n },\n subtle: {\n bg: \"colorPalette.3\",\n color: \"colorPalette.11\",\n _hover: {\n bg: \"colorPalette.4\",\n },\n _expanded: {\n bg: \"colorPalette.4\",\n },\n },\n outline: {\n borderWidth: \"1px\",\n borderColor: \"colorPalette.7\",\n color: \"colorPalette.11\",\n transitionProperty: \"background-color, border-color, color\",\n transitionDuration: \"moderate\",\n _hover: {\n bg: \"colorPalette.3\",\n borderColor: \"colorPalette.8\",\n },\n _expanded: {\n bg: \"colorPalette.subtle\",\n },\n },\n ghost: {\n color: \"colorPalette.11\",\n _hover: {\n bg: \"colorPalette.4\",\n },\n _expanded: {\n bg: \"colorPalette.4\",\n },\n },\n link: {\n color: \"colorPalette.11\",\n _hover: {\n textDecoration: \"underline\",\n },\n },\n },\n tone: {\n primary: {\n colorPalette: \"primary\",\n },\n critical: {\n colorPalette: \"critical\",\n },\n neutral: {\n colorPalette: \"neutral\",\n },\n info: {\n colorPalette: \"info\",\n },\n },\n },\n defaultVariants: {\n size: \"md\",\n variant: \"subtle\",\n },\n});\n"],"names":["buttonRecipe","defineRecipe"],"mappings":"iDAEaA,EAAeC,EAAAA,aAAa,CACvC,UAAW,gBACX,KAAM,CACJ,aAAc,MACd,QAAS,cACT,WAAY,OACZ,WAAY,SACZ,eAAgB,SAChB,WAAY,OACZ,SAAU,WACV,WAAY,SACZ,cAAe,SACf,YAAa,MACb,YAAa,cACb,OAAQ,SACR,WAAY,IACZ,QAAS,IACT,WAAY,MACZ,UAAW,UACX,WAAY,MACZ,mBAAoB,SACpB,mBAAoB,WACpB,iBAAkB,UAClB,UAAW,CACT,WAAY,UACd,EACA,MAAO,CACL,WAAY,GAAA,CAEhB,EACA,SAAU,CACR,KAAM,CACJ,MAAO,CACL,EAAG,MACH,KAAM,MACN,SAAU,MACV,WAAY,MACZ,WAAY,MACZ,GAAI,MACJ,IAAK,MACL,MAAO,CACL,MAAO,MACP,OAAQ,KAAA,CAEZ,EACA,GAAI,CACF,EAAG,MACH,KAAM,MACN,SAAU,MACV,WAAY,MACZ,WAAY,MACZ,GAAI,MACJ,IAAK,MACL,MAAO,CACL,MAAO,MACP,OAAQ,KAAA,CAEZ,EAYA,GAAI,CACF,EAAG,OACH,KAAM,OACN,SAAU,MACV,WAAY,MACZ,GAAI,MACJ,IAAK,MACL,MAAO,CACL,MAAO,MACP,OAAQ,KAAA,CACV,CAmCJ,EACA,QAAS,CACP,MAAO,CACL,GAAI,iBACJ,MAAO,wBACP,OAAQ,CACN,GAAI,iBACN,EACA,UAAW,CACT,GAAI,iBAAA,CAER,EACA,OAAQ,CACN,GAAI,iBACJ,MAAO,kBACP,OAAQ,CACN,GAAI,gBACN,EACA,UAAW,CACT,GAAI,gBAAA,CAER,EACA,QAAS,CACP,YAAa,MACb,YAAa,iBACb,MAAO,kBACP,mBAAoB,wCACpB,mBAAoB,WACpB,OAAQ,CACN,GAAI,iBACJ,YAAa,gBACf,EACA,UAAW,CACT,GAAI,qBAAA,CAER,EACA,MAAO,CACL,MAAO,kBACP,OAAQ,CACN,GAAI,gBACN,EACA,UAAW,CACT,GAAI,gBAAA,CAER,EACA,KAAM,CACJ,MAAO,kBACP,OAAQ,CACN,eAAgB,WAAA,CAClB,CAEJ,EACA,KAAM,CACJ,QAAS,CACP,aAAc,SAChB,EACA,SAAU,CACR,aAAc,UAChB,EACA,QAAS,CACP,aAAc,SAChB,EACA,KAAM,CACJ,aAAc,MAAA,CAChB,CAEJ,EACA,gBAAiB,CACf,KAAM,KACN,QAAS,QAAA,CAEb,CAAC"}
|
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
import { defineRecipe as e } from "@chakra-ui/react";
|
|
2
|
+
const t = /* @__PURE__ */ e({
|
|
3
|
+
className: "nimbus-button",
|
|
4
|
+
base: {
|
|
5
|
+
borderRadius: "200",
|
|
6
|
+
display: "inline-flex",
|
|
7
|
+
appearance: "none",
|
|
8
|
+
alignItems: "center",
|
|
9
|
+
justifyContent: "center",
|
|
10
|
+
userSelect: "none",
|
|
11
|
+
position: "relative",
|
|
12
|
+
whiteSpace: "nowrap",
|
|
13
|
+
verticalAlign: "middle",
|
|
14
|
+
borderWidth: "1px",
|
|
15
|
+
borderColor: "transparent",
|
|
16
|
+
cursor: "button",
|
|
17
|
+
flexShrink: "0",
|
|
18
|
+
outline: "0",
|
|
19
|
+
lineHeight: "1.2",
|
|
20
|
+
isolation: "isolate",
|
|
21
|
+
fontWeight: "500",
|
|
22
|
+
transitionProperty: "common",
|
|
23
|
+
transitionDuration: "moderate",
|
|
24
|
+
focusVisibleRing: "outside",
|
|
25
|
+
_disabled: {
|
|
26
|
+
layerStyle: "disabled"
|
|
27
|
+
},
|
|
28
|
+
_icon: {
|
|
29
|
+
flexShrink: "0"
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
variants: {
|
|
33
|
+
size: {
|
|
34
|
+
"2xs": {
|
|
35
|
+
h: "600",
|
|
36
|
+
minW: "600",
|
|
37
|
+
fontSize: "300",
|
|
38
|
+
fontWeight: "500",
|
|
39
|
+
lineHeight: "400",
|
|
40
|
+
px: "200",
|
|
41
|
+
gap: "100",
|
|
42
|
+
_icon: {
|
|
43
|
+
width: "400",
|
|
44
|
+
height: "400"
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
xs: {
|
|
48
|
+
h: "800",
|
|
49
|
+
minW: "800",
|
|
50
|
+
fontSize: "350",
|
|
51
|
+
fontWeight: "500",
|
|
52
|
+
lineHeight: "400",
|
|
53
|
+
px: "300",
|
|
54
|
+
gap: "100",
|
|
55
|
+
_icon: {
|
|
56
|
+
width: "500",
|
|
57
|
+
height: "500"
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
/* sm: {
|
|
61
|
+
h: "900",
|
|
62
|
+
minW: "900",
|
|
63
|
+
px: "350",
|
|
64
|
+
textStyle: "sm",
|
|
65
|
+
gap: "200",
|
|
66
|
+
_icon: {
|
|
67
|
+
width: "400",
|
|
68
|
+
height: "400",
|
|
69
|
+
},
|
|
70
|
+
}, */
|
|
71
|
+
md: {
|
|
72
|
+
h: "1000",
|
|
73
|
+
minW: "1000",
|
|
74
|
+
fontSize: "400",
|
|
75
|
+
lineHeight: "500",
|
|
76
|
+
px: "400",
|
|
77
|
+
gap: "200",
|
|
78
|
+
_icon: {
|
|
79
|
+
width: "600",
|
|
80
|
+
height: "600"
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
/* lg: {
|
|
84
|
+
h: "1100",
|
|
85
|
+
minW: "1100",
|
|
86
|
+
textStyle: "md",
|
|
87
|
+
px: "500",
|
|
88
|
+
gap: "300",
|
|
89
|
+
_icon: {
|
|
90
|
+
width: "500",
|
|
91
|
+
height: "500",
|
|
92
|
+
},
|
|
93
|
+
}, */
|
|
94
|
+
/* xl: {
|
|
95
|
+
h: "1200",
|
|
96
|
+
minW: "1200",
|
|
97
|
+
textStyle: "md",
|
|
98
|
+
px: "500",
|
|
99
|
+
gap: "250",
|
|
100
|
+
_icon: {
|
|
101
|
+
width: "500",
|
|
102
|
+
height: "500",
|
|
103
|
+
},
|
|
104
|
+
}, */
|
|
105
|
+
/* "2xl": {
|
|
106
|
+
h: "1600",
|
|
107
|
+
minW: "1600",
|
|
108
|
+
textStyle: "lg",
|
|
109
|
+
px: "700",
|
|
110
|
+
gap: "300",
|
|
111
|
+
_icon: {
|
|
112
|
+
width: "600",
|
|
113
|
+
height: "600",
|
|
114
|
+
},
|
|
115
|
+
}, */
|
|
116
|
+
},
|
|
117
|
+
variant: {
|
|
118
|
+
solid: {
|
|
119
|
+
bg: "colorPalette.9",
|
|
120
|
+
color: "colorPalette.contrast",
|
|
121
|
+
_hover: {
|
|
122
|
+
bg: "colorPalette.10"
|
|
123
|
+
},
|
|
124
|
+
_expanded: {
|
|
125
|
+
bg: "colorPalette.10"
|
|
126
|
+
}
|
|
127
|
+
},
|
|
128
|
+
subtle: {
|
|
129
|
+
bg: "colorPalette.3",
|
|
130
|
+
color: "colorPalette.11",
|
|
131
|
+
_hover: {
|
|
132
|
+
bg: "colorPalette.4"
|
|
133
|
+
},
|
|
134
|
+
_expanded: {
|
|
135
|
+
bg: "colorPalette.4"
|
|
136
|
+
}
|
|
137
|
+
},
|
|
138
|
+
outline: {
|
|
139
|
+
borderWidth: "1px",
|
|
140
|
+
borderColor: "colorPalette.7",
|
|
141
|
+
color: "colorPalette.11",
|
|
142
|
+
transitionProperty: "background-color, border-color, color",
|
|
143
|
+
transitionDuration: "moderate",
|
|
144
|
+
_hover: {
|
|
145
|
+
bg: "colorPalette.3",
|
|
146
|
+
borderColor: "colorPalette.8"
|
|
147
|
+
},
|
|
148
|
+
_expanded: {
|
|
149
|
+
bg: "colorPalette.subtle"
|
|
150
|
+
}
|
|
151
|
+
},
|
|
152
|
+
ghost: {
|
|
153
|
+
color: "colorPalette.11",
|
|
154
|
+
_hover: {
|
|
155
|
+
bg: "colorPalette.4"
|
|
156
|
+
},
|
|
157
|
+
_expanded: {
|
|
158
|
+
bg: "colorPalette.4"
|
|
159
|
+
}
|
|
160
|
+
},
|
|
161
|
+
link: {
|
|
162
|
+
color: "colorPalette.11",
|
|
163
|
+
_hover: {
|
|
164
|
+
textDecoration: "underline"
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
},
|
|
168
|
+
tone: {
|
|
169
|
+
primary: {
|
|
170
|
+
colorPalette: "primary"
|
|
171
|
+
},
|
|
172
|
+
critical: {
|
|
173
|
+
colorPalette: "critical"
|
|
174
|
+
},
|
|
175
|
+
neutral: {
|
|
176
|
+
colorPalette: "neutral"
|
|
177
|
+
},
|
|
178
|
+
info: {
|
|
179
|
+
colorPalette: "info"
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
},
|
|
183
|
+
defaultVariants: {
|
|
184
|
+
size: "md",
|
|
185
|
+
variant: "subtle"
|
|
186
|
+
}
|
|
187
|
+
});
|
|
188
|
+
export {
|
|
189
|
+
t as b
|
|
190
|
+
};
|
|
191
|
+
//# sourceMappingURL=button.recipe-DzOS_Bqm.js.map
|