@televet/kibble-ui 4.0.0-beta.77 → 4.0.0-beta.78
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunks/{alert.types-D6TkftlY.js → alert.types-C1hSbPAj.js} +2 -2
- package/dist/chunks/{alert.types-D6TkftlY.js.map → alert.types-C1hSbPAj.js.map} +1 -1
- package/dist/chunks/{alert.types-DFdr6LJp.js → alert.types-pRFStpHD.js} +3 -3
- package/dist/chunks/{alert.types-DFdr6LJp.js.map → alert.types-pRFStpHD.js.map} +1 -1
- package/dist/chunks/{avatar.component-qXjXZmjT.js → avatar.component-BSA7tJUO.js} +2 -2
- package/dist/chunks/{avatar.component-qXjXZmjT.js.map → avatar.component-BSA7tJUO.js.map} +1 -1
- package/dist/chunks/{avatar.component-v66udI-_.js → avatar.component-BwRv7qvB.js} +13 -13
- package/dist/chunks/{avatar.component-v66udI-_.js.map → avatar.component-BwRv7qvB.js.map} +1 -1
- package/dist/chunks/{avatarGroup.component-sVDzWHae.js → avatarGroup.component-CtNUO8FY.js} +2 -2
- package/dist/chunks/{avatarGroup.component-sVDzWHae.js.map → avatarGroup.component-CtNUO8FY.js.map} +1 -1
- package/dist/chunks/{avatarGroup.component-DXtoztak.js → avatarGroup.component-DQ8vHW56.js} +2 -2
- package/dist/chunks/{avatarGroup.component-DXtoztak.js.map → avatarGroup.component-DQ8vHW56.js.map} +1 -1
- package/dist/chunks/{buttonGroup.component-s0zArL6V.js → buttonGroup.component-B7YBMn5C.js} +2 -2
- package/dist/chunks/{buttonGroup.component-s0zArL6V.js.map → buttonGroup.component-B7YBMn5C.js.map} +1 -1
- package/dist/chunks/{buttonGroup.component-Dlz5CnTj.js → buttonGroup.component-Cg_TQped.js} +2 -2
- package/dist/chunks/{buttonGroup.component-Dlz5CnTj.js.map → buttonGroup.component-Cg_TQped.js.map} +1 -1
- package/dist/chunks/{characterCounter.component-DQpZpSAG.js → characterCounter.component-0p9iEi6i.js} +2 -2
- package/dist/chunks/{characterCounter.component-DQpZpSAG.js.map → characterCounter.component-0p9iEi6i.js.map} +1 -1
- package/dist/chunks/{characterCounter.component-BR9CB85Y.js → characterCounter.component-B7PijscW.js} +2 -2
- package/dist/chunks/{characterCounter.component-BR9CB85Y.js.map → characterCounter.component-B7PijscW.js.map} +1 -1
- package/dist/chunks/{checkbox.component-CDWLPHBb.js → checkbox.component-C3SpCA_Q.js} +10 -10
- package/dist/chunks/{checkbox.component-CDWLPHBb.js.map → checkbox.component-C3SpCA_Q.js.map} +1 -1
- package/dist/chunks/{checkbox.component-DWY6uyeH.js → checkbox.component-Dt23wSaV.js} +2 -2
- package/dist/chunks/{checkbox.component-DWY6uyeH.js.map → checkbox.component-Dt23wSaV.js.map} +1 -1
- package/dist/chunks/{checkbox.records-VGvM2lMr.js → checkbox.records-4j704fMI.js} +12 -12
- package/dist/chunks/{checkbox.records-VGvM2lMr.js.map → checkbox.records-4j704fMI.js.map} +1 -1
- package/dist/chunks/checkbox.records-DI3mqSNf.js +2 -0
- package/dist/chunks/{checkbox.records-CXDQlfs4.js.map → checkbox.records-DI3mqSNf.js.map} +1 -1
- package/dist/chunks/{checkboxGroup.component-D_atqiOV.js → checkboxGroup.component-CVpvkfhE.js} +2 -2
- package/dist/chunks/{checkboxGroup.component-D_atqiOV.js.map → checkboxGroup.component-CVpvkfhE.js.map} +1 -1
- package/dist/chunks/{checkboxGroup.component-ZnL-IZ9n.js → checkboxGroup.component-DsfWyRog.js} +3 -3
- package/dist/chunks/{checkboxGroup.component-ZnL-IZ9n.js.map → checkboxGroup.component-DsfWyRog.js.map} +1 -1
- package/dist/chunks/{conversationCard.component-BOcG-o05.js → conversationCard.component-BOVg1QrI.js} +6 -6
- package/dist/chunks/{conversationCard.component-BOcG-o05.js.map → conversationCard.component-BOVg1QrI.js.map} +1 -1
- package/dist/chunks/{conversationCard.component-BsD6fCbc.js → conversationCard.component-DAk3CXE_.js} +2 -2
- package/dist/chunks/{conversationCard.component-BsD6fCbc.js.map → conversationCard.component-DAk3CXE_.js.map} +1 -1
- package/dist/chunks/{datePicker.component-CYeP02vZ.js → datePicker.component-ByOoi8Qd.js} +7 -8
- package/dist/chunks/datePicker.component-ByOoi8Qd.js.map +1 -0
- package/dist/chunks/{datePicker.component-DwGsDzmJ.js → datePicker.component-DP7YTR4q.js} +3 -3
- package/dist/chunks/datePicker.component-DP7YTR4q.js.map +1 -0
- package/dist/chunks/{dialog-trigger-B5NK0lr-.js → dialog-trigger-MkOQUjzu.js} +2 -2
- package/dist/chunks/{dialog-trigger-B5NK0lr-.js.map → dialog-trigger-MkOQUjzu.js.map} +1 -1
- package/dist/chunks/{dialog-trigger-Qc_jF1sR.js → dialog-trigger-eqGXDXGQ.js} +9 -9
- package/dist/chunks/{dialog-trigger-Qc_jF1sR.js.map → dialog-trigger-eqGXDXGQ.js.map} +1 -1
- package/dist/chunks/{heading.component-C0b0I-gL.js → heading.component-B5fvHRUH.js} +2 -2
- package/dist/chunks/{heading.component-C0b0I-gL.js.map → heading.component-B5fvHRUH.js.map} +1 -1
- package/dist/chunks/{heading.component-F2SF26Rv.js → heading.component-tEOV4AD0.js} +2 -2
- package/dist/chunks/{heading.component-F2SF26Rv.js.map → heading.component-tEOV4AD0.js.map} +1 -1
- package/dist/chunks/index-BR7peqZO.js +2 -0
- package/dist/chunks/{index-MlhL0PDC.js.map → index-BR7peqZO.js.map} +1 -1
- package/dist/chunks/{index-C6cNrRSG.js → index-Bff1r_rH.js} +15 -15
- package/dist/chunks/{index-C6cNrRSG.js.map → index-Bff1r_rH.js.map} +1 -1
- package/dist/chunks/index-Bz8HDeWA.js +70 -0
- package/dist/chunks/index-Bz8HDeWA.js.map +1 -0
- package/dist/chunks/index-CHIISuTq.js +3 -0
- package/dist/chunks/index-CHIISuTq.js.map +1 -0
- package/dist/chunks/{index-Im8BYbf9.js → index-CJLttzPM.js} +3 -3
- package/dist/chunks/{index-Im8BYbf9.js.map → index-CJLttzPM.js.map} +1 -1
- package/dist/chunks/index-CS8X6LiC.js +2 -0
- package/dist/chunks/{index-BDnnTdaJ.js.map → index-CS8X6LiC.js.map} +1 -1
- package/dist/chunks/{index-BRCoaB60.js → index-C_AXAeNS.js} +16 -17
- package/dist/chunks/{index-BRCoaB60.js.map → index-C_AXAeNS.js.map} +1 -1
- package/dist/chunks/{index-B2pGzKof.js → index-Cbkb_94C.js} +48 -49
- package/dist/chunks/{index-B2pGzKof.js.map → index-Cbkb_94C.js.map} +1 -1
- package/dist/chunks/{index-BBZxmcrY.js → index-CtXUprYH.js} +2 -2
- package/dist/chunks/{index-BBZxmcrY.js.map → index-CtXUprYH.js.map} +1 -1
- package/dist/chunks/index-DBk0LkcO.js +2 -0
- package/dist/chunks/{index-CfQe7XQk.js.map → index-DBk0LkcO.js.map} +1 -1
- package/dist/chunks/{index-BYf7SZUC.js → index-DOXzraja.js} +2 -2
- package/dist/chunks/{index-BYf7SZUC.js.map → index-DOXzraja.js.map} +1 -1
- package/dist/chunks/index-DSedXH1s.js +2 -0
- package/dist/chunks/{index-ZaGEDS_0.js.map → index-DSedXH1s.js.map} +1 -1
- package/dist/chunks/{index-KOHUWYh0.js → index-DUY19L6M.js} +105 -106
- package/dist/chunks/{index-KOHUWYh0.js.map → index-DUY19L6M.js.map} +1 -1
- package/dist/chunks/{index-BADDrHDf.js → index-DVNjUEDJ.js} +9 -9
- package/dist/chunks/{index-BADDrHDf.js.map → index-DVNjUEDJ.js.map} +1 -1
- package/dist/chunks/index-DbTEJc-K.js +2 -0
- package/dist/chunks/index-DbTEJc-K.js.map +1 -0
- package/dist/chunks/{index-COoMV9Mh.js → index-DowO8Ued.js} +2 -2
- package/dist/chunks/{index-COoMV9Mh.js.map → index-DowO8Ued.js.map} +1 -1
- package/dist/chunks/{index-Ootk-hWL.js → index-L197Dry5.js} +17 -18
- package/dist/chunks/{index-Ootk-hWL.js.map → index-L197Dry5.js.map} +1 -1
- package/dist/chunks/{index-BwIBc5Vr.js → index-OpolRlgD.js} +3 -3
- package/dist/chunks/{index-BwIBc5Vr.js.map → index-OpolRlgD.js.map} +1 -1
- package/dist/chunks/index-QTIBH1Or.js +2 -0
- package/dist/chunks/{index-CZz7hHWb.js.map → index-QTIBH1Or.js.map} +1 -1
- package/dist/chunks/index-YtNA0Ueo.js +1328 -0
- package/dist/chunks/index-YtNA0Ueo.js.map +1 -0
- package/dist/chunks/{index-DwxB1_tE.js → index-cSjUS7Xj.js} +43 -44
- package/dist/chunks/{index-DwxB1_tE.js.map → index-cSjUS7Xj.js.map} +1 -1
- package/dist/chunks/index-iaug4k6v.js +8 -0
- package/dist/chunks/{index-UWtj4ULm.js.map → index-iaug4k6v.js.map} +1 -1
- package/dist/chunks/{menu.component-BvRBlU1u.js → menu.component-C-HbgplJ.js} +2 -2
- package/dist/chunks/{menu.component-BvRBlU1u.js.map → menu.component-C-HbgplJ.js.map} +1 -1
- package/dist/chunks/{menu.component-ti1ki8i1.js → menu.component-DRbCsT5G.js} +26 -26
- package/dist/chunks/{menu.component-ti1ki8i1.js.map → menu.component-DRbCsT5G.js.map} +1 -1
- package/dist/chunks/{modal.types-OT5YDIow.js → modal.types-BShblwxe.js} +4 -4
- package/dist/chunks/{modal.types-OT5YDIow.js.map → modal.types-BShblwxe.js.map} +1 -1
- package/dist/chunks/{modal.types-BnELR1Ol.js → modal.types-Bbjk7iGl.js} +2 -2
- package/dist/chunks/{modal.types-BnELR1Ol.js.map → modal.types-Bbjk7iGl.js.map} +1 -1
- package/dist/chunks/{pinInput.types-1yr3_0OI.js → pinInput.types-DzKllrSu.js} +2 -2
- package/dist/chunks/{pinInput.types-1yr3_0OI.js.map → pinInput.types-DzKllrSu.js.map} +1 -1
- package/dist/chunks/{pinInput.types-DP9RhKqz.js → pinInput.types-vJ-_jicz.js} +8 -8
- package/dist/chunks/{pinInput.types-DP9RhKqz.js.map → pinInput.types-vJ-_jicz.js.map} +1 -1
- package/dist/chunks/{popover-80QH8HEJ.js → popover-BSBYgvs4.js} +2 -2
- package/dist/chunks/{popover-80QH8HEJ.js.map → popover-BSBYgvs4.js.map} +1 -1
- package/dist/chunks/{popover-BpMSsJKD.js → popover-DNKVYG-J.js} +26 -26
- package/dist/chunks/{popover-BpMSsJKD.js.map → popover-DNKVYG-J.js.map} +1 -1
- package/dist/chunks/{popover-root-provider-rmv9U0xr.js → popover-root-provider-BErev2-N.js} +8 -8
- package/dist/chunks/{popover-root-provider-rmv9U0xr.js.map → popover-root-provider-BErev2-N.js.map} +1 -1
- package/dist/chunks/{popover-root-provider-DAMDDAHQ.js → popover-root-provider-C2iwUZJn.js} +2 -2
- package/dist/chunks/{popover-root-provider-DAMDDAHQ.js.map → popover-root-provider-C2iwUZJn.js.map} +1 -1
- package/dist/chunks/popover.component-BxwHgQIv.js +2 -0
- package/dist/chunks/popover.component-BxwHgQIv.js.map +1 -0
- package/dist/chunks/popover.component-CVGKw2zy.js +386 -0
- package/dist/chunks/popover.component-CVGKw2zy.js.map +1 -0
- package/dist/chunks/{radio.records-LkbGZcNW.js → radio.records-4ih1q8nO.js} +16 -16
- package/dist/chunks/{radio.records-LkbGZcNW.js.map → radio.records-4ih1q8nO.js.map} +1 -1
- package/dist/chunks/radio.records-j0JOqaJ4.js +2 -0
- package/dist/chunks/{radio.records-CV3axDFi.js.map → radio.records-j0JOqaJ4.js.map} +1 -1
- package/dist/chunks/{radioGroup.component-DH5SnCI7.js → radioGroup.component-DOCa9IlZ.js} +11 -11
- package/dist/chunks/{radioGroup.component-DH5SnCI7.js.map → radioGroup.component-DOCa9IlZ.js.map} +1 -1
- package/dist/chunks/{radioGroup.component-DjCuFGQG.js → radioGroup.component-HJ7ADLyQ.js} +2 -2
- package/dist/chunks/{radioGroup.component-DjCuFGQG.js.map → radioGroup.component-HJ7ADLyQ.js.map} +1 -1
- package/dist/chunks/{ratingDots.component-b2Pw-1F_.js → ratingDots.component-BuFKV26e.js} +3 -3
- package/dist/chunks/{ratingDots.component-b2Pw-1F_.js.map → ratingDots.component-BuFKV26e.js.map} +1 -1
- package/dist/chunks/{ratingDots.component-Czg5IgiN.js → ratingDots.component-CJuTm2VS.js} +2 -2
- package/dist/chunks/{ratingDots.component-Czg5IgiN.js.map → ratingDots.component-CJuTm2VS.js.map} +1 -1
- package/dist/chunks/{render-strategy-m3gtiO9A.js → render-strategy-CHp7lb6C.js} +2 -2
- package/dist/chunks/{render-strategy-m3gtiO9A.js.map → render-strategy-CHp7lb6C.js.map} +1 -1
- package/dist/chunks/{render-strategy-BmWbSgqh.js → render-strategy-C_zp9LNQ.js} +2 -2
- package/dist/chunks/{render-strategy-BmWbSgqh.js.map → render-strategy-C_zp9LNQ.js.map} +1 -1
- package/dist/chunks/{select.component-CIo-RvH_.js → select.component-CybeNI0i.js} +43 -43
- package/dist/chunks/{select.component-CIo-RvH_.js.map → select.component-CybeNI0i.js.map} +1 -1
- package/dist/chunks/{select.component-D2arS0o0.js → select.component-i_EaT6Zs.js} +2 -2
- package/dist/chunks/{select.component-D2arS0o0.js.map → select.component-i_EaT6Zs.js.map} +1 -1
- package/dist/chunks/{sortableList.component-BprhujW-.js → sortableList.component-C4sdfnNc.js} +3 -3
- package/dist/chunks/{sortableList.component-BprhujW-.js.map → sortableList.component-C4sdfnNc.js.map} +1 -1
- package/dist/chunks/{sortableList.component-DkOOWlZi.js → sortableList.component-Di02P6Xa.js} +2 -2
- package/dist/chunks/{sortableList.component-DkOOWlZi.js.map → sortableList.component-Di02P6Xa.js.map} +1 -1
- package/dist/chunks/{spinner.component--A74YhnV.js → spinner.component-Y6WSYB00.js} +2 -2
- package/dist/chunks/{spinner.component--A74YhnV.js.map → spinner.component-Y6WSYB00.js.map} +1 -1
- package/dist/chunks/{spinner.component-CyCqFb4q.js → spinner.component-mAs2EzXc.js} +2 -2
- package/dist/chunks/{spinner.component-CyCqFb4q.js.map → spinner.component-mAs2EzXc.js.map} +1 -1
- package/dist/chunks/{styledAvatar.types-CCuTmj5u.js → styledAvatar.types-D1U_mKEg.js} +2 -2
- package/dist/chunks/{styledAvatar.types-CCuTmj5u.js.map → styledAvatar.types-D1U_mKEg.js.map} +1 -1
- package/dist/chunks/{styledAvatar.types-DG91ByYD.js → styledAvatar.types-E52xMx_F.js} +2 -2
- package/dist/chunks/{styledAvatar.types-DG91ByYD.js.map → styledAvatar.types-E52xMx_F.js.map} +1 -1
- package/dist/chunks/{switch.component-frqBM_Af.js → switch.component-BC_L3Gzc.js} +2 -2
- package/dist/chunks/{switch.component-frqBM_Af.js.map → switch.component-BC_L3Gzc.js.map} +1 -1
- package/dist/chunks/{switch.component-Duu-vQCU.js → switch.component-F106ejwM.js} +11 -11
- package/dist/chunks/{switch.component-Duu-vQCU.js.map → switch.component-F106ejwM.js.map} +1 -1
- package/dist/chunks/{tabs.component-CqZ-1KM1.js → tabs.component-BSQtGb-N.js} +47 -47
- package/dist/chunks/{tabs.component-CqZ-1KM1.js.map → tabs.component-BSQtGb-N.js.map} +1 -1
- package/dist/chunks/{tabs.component-COJoNw1J.js → tabs.component-YEPvlQka.js} +2 -2
- package/dist/chunks/{tabs.component-COJoNw1J.js.map → tabs.component-YEPvlQka.js.map} +1 -1
- package/dist/chunks/{tagBlock.component-CNRGkGi0.js → tagBlock.component-5R68SSbc.js} +2 -2
- package/dist/chunks/{tagBlock.component-CNRGkGi0.js.map → tagBlock.component-5R68SSbc.js.map} +1 -1
- package/dist/chunks/{tagBlock.component-GOWWkkrD.js → tagBlock.component-C59sawdu.js} +5 -5
- package/dist/chunks/{tagBlock.component-GOWWkkrD.js.map → tagBlock.component-C59sawdu.js.map} +1 -1
- package/dist/chunks/{textInput.component-tH7q7tyB.js → textInput.component-BLxERLt1.js} +2 -2
- package/dist/chunks/{textInput.component-tH7q7tyB.js.map → textInput.component-BLxERLt1.js.map} +1 -1
- package/dist/chunks/{textInput.component-CZ5vEcX2.js → textInput.component-DF5JU8nm.js} +12 -12
- package/dist/chunks/{textInput.component-CZ5vEcX2.js.map → textInput.component-DF5JU8nm.js.map} +1 -1
- package/dist/chunks/{textarea.component-CckCPXIa.js → textarea.component-C3hMq2md.js} +2 -2
- package/dist/chunks/{textarea.component-CckCPXIa.js.map → textarea.component-C3hMq2md.js.map} +1 -1
- package/dist/chunks/{textarea.component-D55xPgy5.js → textarea.component-Cb7cJ3fE.js} +7 -7
- package/dist/chunks/{textarea.component-D55xPgy5.js.map → textarea.component-Cb7cJ3fE.js.map} +1 -1
- package/dist/chunks/theme.provider-BuF0PD7y.js +26 -0
- package/dist/chunks/theme.provider-BuF0PD7y.js.map +1 -0
- package/dist/chunks/{theme.provider-CYOEo6b-.js → theme.provider-DIHPjRt6.js} +1827 -1698
- package/dist/chunks/theme.provider-DIHPjRt6.js.map +1 -0
- package/dist/chunks/{timePicker.component-DevQsVia.js → timePicker.component-DOuFbuYn.js} +2 -2
- package/dist/chunks/timePicker.component-DOuFbuYn.js.map +1 -0
- package/dist/chunks/{timePicker.component-DdXZNjaq.js → timePicker.component-DzmwMnG3.js} +19 -20
- package/dist/chunks/timePicker.component-DzmwMnG3.js.map +1 -0
- package/dist/chunks/{timeRange.component-CRprxuDE.js → timeRange.component-BEJvno5T.js} +2 -2
- package/dist/chunks/{timeRange.component-CRprxuDE.js.map → timeRange.component-BEJvno5T.js.map} +1 -1
- package/dist/chunks/{timeRange.component-BADX9awY.js → timeRange.component-C6zB9wnu.js} +2 -2
- package/dist/chunks/{timeRange.component-BADX9awY.js.map → timeRange.component-C6zB9wnu.js.map} +1 -1
- package/dist/chunks/{timestamp.component-C11dDnCQ.js → timestamp.component-3r-E7s-6.js} +2 -2
- package/dist/chunks/{timestamp.component-C11dDnCQ.js.map → timestamp.component-3r-E7s-6.js.map} +1 -1
- package/dist/chunks/{timestamp.component-D7eN5_Rp.js → timestamp.component-CexMdlZm.js} +2 -2
- package/dist/chunks/{timestamp.component-D7eN5_Rp.js.map → timestamp.component-CexMdlZm.js.map} +1 -1
- package/dist/chunks/{toaster.records-Dp_v1E5T.js → toaster.records-CcwOeMM7.js} +21 -22
- package/dist/chunks/{toaster.records-Dp_v1E5T.js.map → toaster.records-CcwOeMM7.js.map} +1 -1
- package/dist/chunks/toaster.records-zJfplz5w.js +2 -0
- package/dist/chunks/{toaster.records-BJo0j1IZ.js.map → toaster.records-zJfplz5w.js.map} +1 -1
- package/dist/chunks/{typography.records-C6G_65b4.js → typography.records-CSy2LmDd.js} +2 -2
- package/dist/chunks/{typography.records-C6G_65b4.js.map → typography.records-CSy2LmDd.js.map} +1 -1
- package/dist/chunks/{typography.records-BVjSfRuB.js → typography.records-H4aA5AOA.js} +2 -2
- package/dist/chunks/{typography.records-BVjSfRuB.js.map → typography.records-H4aA5AOA.js.map} +1 -1
- package/dist/chunks/{use-field-context--wBJQY1R.js → use-field-context-CArmgHPP.js} +2 -2
- package/dist/chunks/{use-field-context--wBJQY1R.js.map → use-field-context-CArmgHPP.js.map} +1 -1
- package/dist/chunks/{use-field-context-xndZXNT4.js → use-field-context-Cm3grEyV.js} +2 -2
- package/dist/chunks/{use-field-context-xndZXNT4.js.map → use-field-context-Cm3grEyV.js.map} +1 -1
- package/dist/chunks/{use-locale-context-KeBTTMq9.js → use-locale-context-BiiNTYMT.js} +29 -29
- package/dist/chunks/{use-locale-context-KeBTTMq9.js.map → use-locale-context-BiiNTYMT.js.map} +1 -1
- package/dist/chunks/{use-locale-context-BdqHZ8L8.js → use-locale-context-D0LByRu9.js} +2 -2
- package/dist/chunks/{use-locale-context-BdqHZ8L8.js.map → use-locale-context-D0LByRu9.js.map} +1 -1
- package/dist/chunks/{withFormControl-C3CCUu8p.js → withFormControl-DyPM4V_t.js} +2 -2
- package/dist/chunks/{withFormControl-C3CCUu8p.js.map → withFormControl-DyPM4V_t.js.map} +1 -1
- package/dist/chunks/{withFormControl-CSnkTHz3.js → withFormControl-yxJx_BJg.js} +49 -49
- package/dist/chunks/{withFormControl-CSnkTHz3.js.map → withFormControl-yxJx_BJg.js.map} +1 -1
- package/dist/chunks/withTruncation-B-Hma82m.js +2 -0
- package/dist/chunks/withTruncation-B-Hma82m.js.map +1 -0
- package/dist/chunks/withTruncation-BRHPZgp1.js +581 -0
- package/dist/chunks/withTruncation-BRHPZgp1.js.map +1 -0
- package/dist/cjs/chakra/index.cjs +1 -1
- package/dist/cjs/components/Alert/index.cjs +1 -1
- package/dist/cjs/components/Avatar/index.cjs +1 -1
- package/dist/cjs/components/AvatarGroup/index.cjs +1 -1
- package/dist/cjs/components/ButtonGroup/index.cjs +1 -1
- package/dist/cjs/components/CharacterCounter/index.cjs +1 -1
- package/dist/cjs/components/Checkbox/index.cjs +1 -1
- package/dist/cjs/components/CheckboxGroup/index.cjs +1 -1
- package/dist/cjs/components/ConversationCard/index.cjs +1 -1
- package/dist/cjs/components/DatePicker/index.cjs +1 -1
- package/dist/cjs/components/Heading/index.cjs +1 -1
- package/dist/cjs/components/Menu/index.cjs +1 -1
- package/dist/cjs/components/Modal/index.cjs +1 -1
- package/dist/cjs/components/PinInput/index.cjs +1 -1
- package/dist/cjs/components/Popover/index.cjs +1 -1
- package/dist/cjs/components/RadioGroup/index.cjs +1 -1
- package/dist/cjs/components/RatingDots/index.cjs +1 -1
- package/dist/cjs/components/Select/index.cjs +1 -1
- package/dist/cjs/components/SortableList/index.cjs +1 -1
- package/dist/cjs/components/Spinner/index.cjs +1 -1
- package/dist/cjs/components/StyledAvatar/index.cjs +1 -1
- package/dist/cjs/components/Switch/index.cjs +1 -1
- package/dist/cjs/components/Tabs/index.cjs +1 -1
- package/dist/cjs/components/TagBlock/index.cjs +1 -1
- package/dist/cjs/components/Text/index.cjs +1 -1
- package/dist/cjs/components/TextInput/index.cjs +1 -1
- package/dist/cjs/components/Textarea/index.cjs +1 -1
- package/dist/cjs/components/TimePicker/index.cjs +1 -1
- package/dist/cjs/components/TimeRange/index.cjs +1 -1
- package/dist/cjs/components/Timestamp/index.cjs +1 -1
- package/dist/cjs/components/Toast/index.cjs +1 -1
- package/dist/cjs/components/Tooltip/index.cjs +1 -1
- package/dist/cjs/components/index.cjs +1 -1
- package/dist/cjs/index.cjs +1 -1
- package/dist/cjs/theme/index.cjs +1 -1
- package/dist/esm/chakra/index.js +8 -8
- package/dist/esm/components/Alert/index.js +1 -1
- package/dist/esm/components/Avatar/index.js +1 -1
- package/dist/esm/components/AvatarGroup/index.js +1 -1
- package/dist/esm/components/ButtonGroup/index.js +1 -1
- package/dist/esm/components/CharacterCounter/index.js +1 -1
- package/dist/esm/components/Checkbox/index.js +1 -1
- package/dist/esm/components/CheckboxGroup/index.js +1 -1
- package/dist/esm/components/ConversationCard/index.js +1 -1
- package/dist/esm/components/DatePicker/index.js +1 -1
- package/dist/esm/components/Heading/index.js +1 -1
- package/dist/esm/components/Menu/index.js +1 -1
- package/dist/esm/components/Modal/index.js +1 -1
- package/dist/esm/components/PinInput/index.js +1 -1
- package/dist/esm/components/Popover/index.js +1 -1
- package/dist/esm/components/RadioGroup/index.js +1 -1
- package/dist/esm/components/RatingDots/index.js +1 -1
- package/dist/esm/components/Select/index.js +1 -1
- package/dist/esm/components/SortableList/index.js +1 -1
- package/dist/esm/components/Spinner/index.js +1 -1
- package/dist/esm/components/StyledAvatar/index.js +1 -1
- package/dist/esm/components/Switch/index.js +1 -1
- package/dist/esm/components/Tabs/index.js +1 -1
- package/dist/esm/components/TagBlock/index.js +1 -1
- package/dist/esm/components/Text/index.js +1 -1
- package/dist/esm/components/TextInput/index.js +1 -1
- package/dist/esm/components/Textarea/index.js +1 -1
- package/dist/esm/components/TimePicker/index.js +1 -1
- package/dist/esm/components/TimeRange/index.js +1 -1
- package/dist/esm/components/Timestamp/index.js +1 -1
- package/dist/esm/components/Toast/index.js +1 -1
- package/dist/esm/components/Tooltip/index.js +1 -1
- package/dist/esm/components/index.js +29 -29
- package/dist/esm/index.js +30 -30
- package/dist/esm/theme/index.js +1 -1
- package/dist/types/components/Avatar/avatar.recipe.d.ts +1 -1
- package/dist/types/components/Button/button.recipe.d.ts +1 -1
- package/dist/types/components/Logo/logo.recipe.d.ts +1 -1
- package/dist/types/components/Menu/menu.recipe.d.ts +1 -1
- package/dist/types/components/Modal/modal.recipe.d.ts +1 -1
- package/dist/types/components/PinInput/pinInput.recipe.d.ts +1 -1
- package/dist/types/components/Popover/popover.recipe.d.ts +1 -1
- package/dist/types/components/Spinner/spinner.recipe.d.ts +1 -1
- package/dist/types/components/TimePicker/timePicker.recipe.d.ts +1 -1
- package/dist/types/components/Tooltip/tooltip.component.d.ts +4 -2
- package/dist/types/components/Tooltip/tooltip.recipe.d.ts +1 -1
- package/dist/types/theme/tokens/shadows/shadows.config.d.ts +3 -3
- package/dist/types/theme/tokens/sizes/sizes.config.d.ts +3 -3
- package/dist/types/theme/tokens/spacing/spacing.config.d.ts +3 -3
- package/dist/types/theme/tokens/transitions/transitions.config.d.ts +2 -2
- package/dist/types/theme/tokens/zIndices/zIndices.config.d.ts +8 -8
- package/package.json +1 -1
- package/dist/chunks/checkbox.records-CXDQlfs4.js +0 -2
- package/dist/chunks/datePicker.component-CYeP02vZ.js.map +0 -1
- package/dist/chunks/datePicker.component-DwGsDzmJ.js.map +0 -1
- package/dist/chunks/index-BDnnTdaJ.js +0 -2
- package/dist/chunks/index-BGwwyukg.js +0 -2
- package/dist/chunks/index-BGwwyukg.js.map +0 -1
- package/dist/chunks/index-BIz6smcP.js +0 -322
- package/dist/chunks/index-BIz6smcP.js.map +0 -1
- package/dist/chunks/index-CZ42b9rT.js +0 -3
- package/dist/chunks/index-CZ42b9rT.js.map +0 -1
- package/dist/chunks/index-CZz7hHWb.js +0 -2
- package/dist/chunks/index-CfQe7XQk.js +0 -2
- package/dist/chunks/index-Czx27hGN.js +0 -1018
- package/dist/chunks/index-Czx27hGN.js.map +0 -1
- package/dist/chunks/index-MlhL0PDC.js +0 -2
- package/dist/chunks/index-UWtj4ULm.js +0 -8
- package/dist/chunks/index-ZaGEDS_0.js +0 -2
- package/dist/chunks/popover.component-CpS9xV8Q.js +0 -322
- package/dist/chunks/popover.component-CpS9xV8Q.js.map +0 -1
- package/dist/chunks/popover.component-DS0EiGlE.js +0 -2
- package/dist/chunks/popover.component-DS0EiGlE.js.map +0 -1
- package/dist/chunks/popover.recipe-DLeyokHo.js +0 -2
- package/dist/chunks/popover.recipe-DLeyokHo.js.map +0 -1
- package/dist/chunks/popover.recipe-_90TbZhK.js +0 -479
- package/dist/chunks/popover.recipe-_90TbZhK.js.map +0 -1
- package/dist/chunks/radio.records-CV3axDFi.js +0 -2
- package/dist/chunks/theme.provider-B3cH9Mqo.js +0 -26
- package/dist/chunks/theme.provider-B3cH9Mqo.js.map +0 -1
- package/dist/chunks/theme.provider-CYOEo6b-.js.map +0 -1
- package/dist/chunks/timePicker.component-DdXZNjaq.js.map +0 -1
- package/dist/chunks/timePicker.component-DevQsVia.js.map +0 -1
- package/dist/chunks/toaster.records-BJo0j1IZ.js +0 -2
- package/dist/chunks/withTruncation-DcoulzNi.js +0 -828
- package/dist/chunks/withTruncation-DcoulzNi.js.map +0 -1
- package/dist/chunks/withTruncation-DqAm-acL.js +0 -2
- package/dist/chunks/withTruncation-DqAm-acL.js.map +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { j as t } from "./jsx-runtime-C5mzlN2N.js";
|
|
2
|
-
import { W as c } from "./withTruncation-
|
|
2
|
+
import { W as c } from "./withTruncation-BRHPZgp1.js";
|
|
3
3
|
import { t as n } from "./typography-Cqrokog3.js";
|
|
4
4
|
import { a as d } from "./config-DlTdf-Yt.js";
|
|
5
5
|
import { u as b } from "./use-slot-recipe-DhtQ1j_5.js";
|
|
@@ -176,4 +176,4 @@ const S = ["root", "spinner", "label"], u = {
|
|
|
176
176
|
export {
|
|
177
177
|
V as S
|
|
178
178
|
};
|
|
179
|
-
//# sourceMappingURL=spinner.component
|
|
179
|
+
//# sourceMappingURL=spinner.component-Y6WSYB00.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"spinner.component
|
|
1
|
+
{"version":3,"file":"spinner.component-Y6WSYB00.js","sources":["../../src/components/Spinner/spinner.recipe.ts","../../src/components/Spinner/spinner.component.tsx"],"sourcesContent":["import {\n defineSlotRecipe,\n SystemStyleObject,\n} from \"@chakra-ui/react/styled-system\";\nimport { SpinnerSize } from \"./spinner.types\";\nimport { TypographyVariant } from \"shared/types\";\nimport { typographyVariantStyles } from \"../../shared/records/typography\";\n\nconst spinnerSlots = [\"root\", \"spinner\", \"label\"] as const;\ntype SpinnerSlot = (typeof spinnerSlots)[number];\ntype SpinnerSlotStyles = {\n [key in SpinnerSlot]?: SystemStyleObject;\n};\n\nconst spinnerSizeStyles: Record<SpinnerSize, SpinnerSlotStyles> = {\n xs: {\n spinner: {\n h: 3,\n w: 3,\n },\n label: {\n fontSize: \"xs\",\n },\n },\n sm: {\n spinner: {\n h: 4,\n w: 4,\n },\n label: {\n fontSize: \"sm\",\n },\n },\n md: {\n spinner: {\n h: 6,\n w: 6,\n \"--spinner-size\": 6,\n },\n label: {\n fontSize: \"md\",\n },\n },\n lg: {\n spinner: {\n h: 8,\n w: 8,\n },\n label: {\n fontSize: \"lg\",\n },\n },\n xl: {\n spinner: {\n h: 12,\n w: 12,\n },\n label: {\n fontSize: \"xl\",\n },\n },\n};\n\nconst spinnerVariantStyles: Record<TypographyVariant, SpinnerSlotStyles> = {\n accent: {\n spinner: typographyVariantStyles.accent,\n },\n accentSubtle: {\n spinner: typographyVariantStyles.accentSubtle,\n },\n brand: {\n spinner: typographyVariantStyles.brand,\n },\n brandOnContrast: {\n spinner: typographyVariantStyles.brandOnContrast,\n },\n danger: {\n spinner: typographyVariantStyles.danger,\n },\n dangerOnContrast: {\n spinner: typographyVariantStyles.dangerOnContrast,\n },\n default: {\n spinner: typographyVariantStyles.default,\n },\n info: {\n spinner: typographyVariantStyles.info,\n },\n interactive: {\n spinner: typographyVariantStyles.interactive,\n },\n interactiveOnContrast: {\n spinner: typographyVariantStyles.interactiveOnContrast,\n },\n onContrast: {\n spinner: typographyVariantStyles.onContrast,\n },\n placeholder: {\n spinner: typographyVariantStyles.placeholder,\n },\n placeholderOnContrast: {\n spinner: typographyVariantStyles.placeholderOnContrast,\n },\n subtle: {\n spinner: typographyVariantStyles.subtle,\n },\n subtleOnContrast: {\n spinner: typographyVariantStyles.subtleOnContrast,\n },\n success: {\n spinner: typographyVariantStyles.success,\n },\n warning: {\n spinner: typographyVariantStyles.warning,\n },\n};\n\nexport const spinnerRecipe = defineSlotRecipe({\n slots: spinnerSlots,\n base: {\n root: {\n alignItems: \"center\",\n justifyContent: \"center\",\n },\n },\n variants: {\n variant: spinnerVariantStyles,\n size: spinnerSizeStyles,\n fullScreen: {\n true: {\n root: {\n h: \"100%\",\n left: 0,\n top: 0,\n position: \"absolute\",\n w: \"100%\",\n zIndex: \"tooltipExtra\",\n },\n },\n false: {\n root: {\n h: \"max-content\",\n w: \"max-content\",\n },\n },\n },\n },\n defaultVariants: {\n fullScreen: false,\n size: \"md\",\n variant: \"brand\",\n },\n});\n","import React from \"react\";\nimport { Spinner as CSpinner } from \"@chakra-ui/react/spinner\";\nimport { VStack } from \"@chakra-ui/react/stack\";\nimport { SpinnerSize } from \"./spinner.types\";\nimport { Text, TextProps } from \"components/Text/text.component\";\nimport { TypographyVariant } from \"shared/types\";\nimport { useSlotRecipe } from \"@chakra-ui/react\";\nimport { spinnerRecipe } from \"./spinner.recipe\";\nimport { SemanticBackgroundColorToken } from \"theme/semanticTokens\";\n\nexport interface SpinnerProps {\n backdropColor?: SemanticBackgroundColorToken;\n fullScreen?: boolean;\n label?: string;\n labelProps?: Omit<TextProps, \"chilren\">;\n showLabel?: boolean;\n size?: SpinnerSize;\n variant?: TypographyVariant;\n}\n\nexport const Spinner = ({\n backdropColor = \"background.alpha.pressed\",\n fullScreen = false,\n label = \"Loading...\",\n labelProps,\n showLabel = false,\n size = \"md\",\n variant = \"accent\",\n}: SpinnerProps): React.JSX.Element => {\n const recipe = useSlotRecipe({ recipe: spinnerRecipe });\n const styles = recipe({ variant, size, fullScreen });\n\n return (\n <VStack\n className=\"Spinner\"\n data-testid=\"kibble-spinner\"\n css={styles.root}\n {...(fullScreen && { bg: backdropColor })}\n >\n <CSpinner css={styles.spinner} />\n {showLabel && (\n <Text\n className=\"Spinner__Label\"\n data-testid=\"kibble-spinner-label\"\n variant=\"subtle\"\n css={styles.label}\n {...labelProps}\n >\n {label}\n </Text>\n )}\n </VStack>\n );\n};\n"],"names":["spinnerSlots","spinnerSizeStyles","spinnerVariantStyles","typographyVariantStyles","spinnerRecipe","defineSlotRecipe","Spinner","backdropColor","fullScreen","label","labelProps","showLabel","size","variant","styles","useSlotRecipe","jsxs","VStack","jsx","CSpinner","Text"],"mappings":";;;;;;;AAQA,MAAMA,IAAe,CAAC,QAAQ,WAAW,OAAO,GAM1CC,IAA4D;AAAA,EAChE,IAAI;AAAA,IACF,SAAS;AAAA,MACP,GAAG;AAAA,MACH,GAAG;AAAA,IACL;AAAA,IACA,OAAO;AAAA,MACL,UAAU;AAAA,IAAA;AAAA,EAEd;AAAA,EACA,IAAI;AAAA,IACF,SAAS;AAAA,MACP,GAAG;AAAA,MACH,GAAG;AAAA,IACL;AAAA,IACA,OAAO;AAAA,MACL,UAAU;AAAA,IAAA;AAAA,EAEd;AAAA,EACA,IAAI;AAAA,IACF,SAAS;AAAA,MACP,GAAG;AAAA,MACH,GAAG;AAAA,MACH,kBAAkB;AAAA,IACpB;AAAA,IACA,OAAO;AAAA,MACL,UAAU;AAAA,IAAA;AAAA,EAEd;AAAA,EACA,IAAI;AAAA,IACF,SAAS;AAAA,MACP,GAAG;AAAA,MACH,GAAG;AAAA,IACL;AAAA,IACA,OAAO;AAAA,MACL,UAAU;AAAA,IAAA;AAAA,EAEd;AAAA,EACA,IAAI;AAAA,IACF,SAAS;AAAA,MACP,GAAG;AAAA,MACH,GAAG;AAAA,IACL;AAAA,IACA,OAAO;AAAA,MACL,UAAU;AAAA,IAAA;AAAA,EACZ;AAEJ,GAEMC,IAAqE;AAAA,EACzE,QAAQ;AAAA,IACN,SAASC,EAAwB;AAAA,EACnC;AAAA,EACA,cAAc;AAAA,IACZ,SAASA,EAAwB;AAAA,EACnC;AAA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ACJ,GAAG;AAAA,UACH,GAAG;AAAA,QAAA;AAAA,MACL;AAAA,IACF;AAAA,EAEJ;AAAA,EACA,iBAAiB;AAAA,IACf,YAAY;AAAA,IACZ,MAAM;AAAA,IACN,SAAS;AAAA,EAAA;AAEb,CAAC,GCpIYK,IAAU,CAAC;AAAA,EACtB,eAAAC,IAAgB;AAAA,EAChB,YAAAC,IAAa;AAAA,EACb,OAAAC,IAAQ;AAAA,EACR,YAAAC;AAAA,EACA,WAAAC,IAAY;AAAA,EACZ,MAAAC,IAAO;AAAA,EACP,SAAAC,IAAU;AACZ,MAAuC;AAErC,QAAMC,IADSC,EAAc,EAAE,QAAQX,GAAe,EAChC,EAAE,SAAAS,GAAS,MAAAD,GAAM,YAAAJ,GAAY;AAGjD,SAAAQ,gBAAAA,EAAA;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,WAAU;AAAA,MACV,eAAY;AAAA,MACZ,KAAKH,EAAO;AAAA,MACX,GAAIN,KAAc,EAAE,IAAID,EAAc;AAAA,MAEvC,UAAA;AAAA,QAACW,gBAAAA,EAAAA,IAAAC,GAAA,EAAS,KAAKL,EAAO,QAAS,CAAA;AAAA,QAC9BH,KACCO,gBAAAA,EAAA;AAAA,UAACE;AAAAA,UAAA;AAAA,YACC,WAAU;AAAA,YACV,eAAY;AAAA,YACZ,SAAQ;AAAA,YACR,KAAKN,EAAO;AAAA,YACX,GAAGJ;AAAA,YAEH,UAAAD;AAAA,UAAA;AAAA,QAAA;AAAA,MACH;AAAA,IAAA;AAAA,EAEJ;AAEJ;"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";const t=require("./jsx-runtime-BjDatQAs.js"),c=require("./withTruncation-
|
|
2
|
-
//# sourceMappingURL=spinner.component-
|
|
1
|
+
"use strict";const t=require("./jsx-runtime-BjDatQAs.js"),c=require("./withTruncation-B-Hma82m.js"),n=require("./typography-CtiaGoJG.js"),y=require("./config-BFcXpdZo.js"),S=require("./use-slot-recipe-8liupslO.js"),h=require("./v-stack-DxjgpeJ0.js"),u=require("./spinner-BnpL14kK.js"),d=["root","spinner","label"],g={xs:{spinner:{h:3,w:3},label:{fontSize:"xs"}},sm:{spinner:{h:4,w:4},label:{fontSize:"sm"}},md:{spinner:{h:6,w:6,"--spinner-size":6},label:{fontSize:"md"}},lg:{spinner:{h:8,w:8},label:{fontSize:"lg"}},xl:{spinner:{h:12,w:12},label:{fontSize:"xl"}}},b={accent:{spinner:n.typographyVariantStyles.accent},accentSubtle:{spinner:n.typographyVariantStyles.accentSubtle},brand:{spinner:n.typographyVariantStyles.brand},brandOnContrast:{spinner:n.typographyVariantStyles.brandOnContrast},danger:{spinner:n.typographyVariantStyles.danger},dangerOnContrast:{spinner:n.typographyVariantStyles.dangerOnContrast},default:{spinner:n.typographyVariantStyles.default},info:{spinner:n.typographyVariantStyles.info},interactive:{spinner:n.typographyVariantStyles.interactive},interactiveOnContrast:{spinner:n.typographyVariantStyles.interactiveOnContrast},onContrast:{spinner:n.typographyVariantStyles.onContrast},placeholder:{spinner:n.typographyVariantStyles.placeholder},placeholderOnContrast:{spinner:n.typographyVariantStyles.placeholderOnContrast},subtle:{spinner:n.typographyVariantStyles.subtle},subtleOnContrast:{spinner:n.typographyVariantStyles.subtleOnContrast},success:{spinner:n.typographyVariantStyles.success},warning:{spinner:n.typographyVariantStyles.warning}},V=y.defineSlotRecipe({slots:d,base:{root:{alignItems:"center",justifyContent:"center"}},variants:{variant:b,size:g,fullScreen:{true:{root:{h:"100%",left:0,top:0,position:"absolute",w:"100%",zIndex:"tooltipExtra"}},false:{root:{h:"max-content",w:"max-content"}}}},defaultVariants:{fullScreen:!1,size:"md",variant:"brand"}}),f=({backdropColor:s="background.alpha.pressed",fullScreen:r=!1,label:a="Loading...",labelProps:i,showLabel:p=!1,size:o="md",variant:l="accent"})=>{const e=S.useSlotRecipe({recipe:V})({variant:l,size:o,fullScreen:r});return t.jsxRuntimeExports.jsxs(h.VStack,{className:"Spinner","data-testid":"kibble-spinner",css:e.root,...r&&{bg:s},children:[t.jsxRuntimeExports.jsx(u.Spinner,{css:e.spinner}),p&&t.jsxRuntimeExports.jsx(c.WrappedText,{className:"Spinner__Label","data-testid":"kibble-spinner-label",variant:"subtle",css:e.label,...i,children:a})]})};exports.Spinner=f;
|
|
2
|
+
//# sourceMappingURL=spinner.component-mAs2EzXc.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"spinner.component-
|
|
1
|
+
{"version":3,"file":"spinner.component-mAs2EzXc.js","sources":["../../src/components/Spinner/spinner.recipe.ts","../../src/components/Spinner/spinner.component.tsx"],"sourcesContent":["import {\n defineSlotRecipe,\n SystemStyleObject,\n} from \"@chakra-ui/react/styled-system\";\nimport { SpinnerSize } from \"./spinner.types\";\nimport { TypographyVariant } from \"shared/types\";\nimport { typographyVariantStyles } from \"../../shared/records/typography\";\n\nconst spinnerSlots = [\"root\", \"spinner\", \"label\"] as const;\ntype SpinnerSlot = (typeof spinnerSlots)[number];\ntype SpinnerSlotStyles = {\n [key in SpinnerSlot]?: SystemStyleObject;\n};\n\nconst spinnerSizeStyles: Record<SpinnerSize, SpinnerSlotStyles> = {\n xs: {\n spinner: {\n h: 3,\n w: 3,\n },\n label: {\n fontSize: \"xs\",\n },\n },\n sm: {\n spinner: {\n h: 4,\n w: 4,\n },\n label: {\n fontSize: \"sm\",\n },\n },\n md: {\n spinner: {\n h: 6,\n w: 6,\n \"--spinner-size\": 6,\n },\n label: {\n fontSize: \"md\",\n },\n },\n lg: {\n spinner: {\n h: 8,\n w: 8,\n },\n label: {\n fontSize: \"lg\",\n },\n },\n xl: {\n spinner: {\n h: 12,\n w: 12,\n },\n label: {\n fontSize: \"xl\",\n },\n },\n};\n\nconst spinnerVariantStyles: Record<TypographyVariant, SpinnerSlotStyles> = {\n accent: {\n spinner: typographyVariantStyles.accent,\n },\n accentSubtle: {\n spinner: typographyVariantStyles.accentSubtle,\n },\n brand: {\n spinner: typographyVariantStyles.brand,\n },\n brandOnContrast: {\n spinner: typographyVariantStyles.brandOnContrast,\n },\n danger: {\n spinner: typographyVariantStyles.danger,\n },\n dangerOnContrast: {\n spinner: typographyVariantStyles.dangerOnContrast,\n },\n default: {\n spinner: typographyVariantStyles.default,\n },\n info: {\n spinner: typographyVariantStyles.info,\n },\n interactive: {\n spinner: typographyVariantStyles.interactive,\n },\n interactiveOnContrast: {\n spinner: typographyVariantStyles.interactiveOnContrast,\n },\n onContrast: {\n spinner: typographyVariantStyles.onContrast,\n },\n placeholder: {\n spinner: typographyVariantStyles.placeholder,\n },\n placeholderOnContrast: {\n spinner: typographyVariantStyles.placeholderOnContrast,\n },\n subtle: {\n spinner: typographyVariantStyles.subtle,\n },\n subtleOnContrast: {\n spinner: typographyVariantStyles.subtleOnContrast,\n },\n success: {\n spinner: typographyVariantStyles.success,\n },\n warning: {\n spinner: typographyVariantStyles.warning,\n },\n};\n\nexport const spinnerRecipe = defineSlotRecipe({\n slots: spinnerSlots,\n base: {\n root: {\n alignItems: \"center\",\n justifyContent: \"center\",\n },\n },\n variants: {\n variant: spinnerVariantStyles,\n size: spinnerSizeStyles,\n fullScreen: {\n true: {\n root: {\n h: \"100%\",\n left: 0,\n top: 0,\n position: \"absolute\",\n w: \"100%\",\n zIndex: \"tooltipExtra\",\n },\n },\n false: {\n root: {\n h: \"max-content\",\n w: \"max-content\",\n },\n },\n },\n },\n defaultVariants: {\n fullScreen: false,\n size: \"md\",\n variant: \"brand\",\n },\n});\n","import React from \"react\";\nimport { Spinner as CSpinner } from \"@chakra-ui/react/spinner\";\nimport { VStack } from \"@chakra-ui/react/stack\";\nimport { SpinnerSize } from \"./spinner.types\";\nimport { Text, TextProps } from \"components/Text/text.component\";\nimport { TypographyVariant } from \"shared/types\";\nimport { useSlotRecipe } from \"@chakra-ui/react\";\nimport { spinnerRecipe } from \"./spinner.recipe\";\nimport { SemanticBackgroundColorToken } from \"theme/semanticTokens\";\n\nexport interface SpinnerProps {\n backdropColor?: SemanticBackgroundColorToken;\n fullScreen?: boolean;\n label?: string;\n labelProps?: Omit<TextProps, \"chilren\">;\n showLabel?: boolean;\n size?: SpinnerSize;\n variant?: TypographyVariant;\n}\n\nexport const Spinner = ({\n backdropColor = \"background.alpha.pressed\",\n fullScreen = false,\n label = \"Loading...\",\n labelProps,\n showLabel = false,\n size = \"md\",\n variant = \"accent\",\n}: SpinnerProps): React.JSX.Element => {\n const recipe = useSlotRecipe({ recipe: spinnerRecipe });\n const styles = recipe({ variant, size, fullScreen });\n\n return (\n <VStack\n className=\"Spinner\"\n data-testid=\"kibble-spinner\"\n css={styles.root}\n {...(fullScreen && { bg: backdropColor })}\n >\n <CSpinner css={styles.spinner} />\n {showLabel && (\n <Text\n className=\"Spinner__Label\"\n data-testid=\"kibble-spinner-label\"\n variant=\"subtle\"\n css={styles.label}\n {...labelProps}\n >\n {label}\n </Text>\n )}\n </VStack>\n );\n};\n"],"names":["spinnerSlots","spinnerSizeStyles","spinnerVariantStyles","typographyVariantStyles","spinnerRecipe","defineSlotRecipe","Spinner","backdropColor","fullScreen","label","labelProps","showLabel","size","variant","styles","useSlotRecipe","jsxs","VStack","jsx","CSpinner","Text"],"mappings":"6RAQMA,EAAe,CAAC,OAAQ,UAAW,OAAO,EAM1CC,EAA4D,CAChE,GAAI,CACF,QAAS,CACP,EAAG,EACH,EAAG,CACL,EACA,MAAO,CACL,SAAU,IAAA,CAEd,EACA,GAAI,CACF,QAAS,CACP,EAAG,EACH,EAAG,CACL,EACA,MAAO,CACL,SAAU,IAAA,CAEd,EACA,GAAI,CACF,QAAS,CACP,EAAG,EACH,EAAG,EACH,iBAAkB,CACpB,EACA,MAAO,CACL,SAAU,IAAA,CAEd,EACA,GAAI,CACF,QAAS,CACP,EAAG,EACH,EAAG,CACL,EACA,MAAO,CACL,SAAU,IAAA,CAEd,EACA,GAAI,CACF,QAAS,CACP,EAAG,GACH,EAAG,EACL,EACA,MAAO,CACL,SAAU,IAAA,CACZ,CAEJ,EAEMC,EAAqE,CACzE,OAAQ,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AAAC,EACA,UAAAC,EAAY,GACZ,KAAAC,EAAO,KACP,QAAAC,EAAU,QACZ,IAAuC,CAErC,MAAMC,EADSC,EAAA,cAAc,CAAE,OAAQX,EAAe,EAChC,CAAE,QAAAS,EAAS,KAAAD,EAAM,WAAAJ,EAAY,EAGjD,OAAAQ,EAAA,kBAAA,KAACC,EAAA,OAAA,CACC,UAAU,UACV,cAAY,iBACZ,IAAKH,EAAO,KACX,GAAIN,GAAc,CAAE,GAAID,CAAc,EAEvC,SAAA,CAACW,EAAAA,kBAAAA,IAAAC,EAAAA,QAAA,CAAS,IAAKL,EAAO,OAAS,CAAA,EAC9BH,GACCO,EAAA,kBAAA,IAACE,EAAA,YAAA,CACC,UAAU,iBACV,cAAY,uBACZ,QAAQ,SACR,IAAKN,EAAO,MACX,GAAGJ,EAEH,SAAAD,CAAA,CAAA,CACH,CAAA,CAEJ,CAEJ"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { j as c } from "./jsx-runtime-C5mzlN2N.js";
|
|
2
|
-
import { A as p } from "./avatar.component-
|
|
2
|
+
import { A as p } from "./avatar.component-BwRv7qvB.js";
|
|
3
3
|
const y = ({
|
|
4
4
|
type: l = "Client",
|
|
5
5
|
...o
|
|
@@ -61,4 +61,4 @@ export {
|
|
|
61
61
|
y as S,
|
|
62
62
|
C as s
|
|
63
63
|
};
|
|
64
|
-
//# sourceMappingURL=styledAvatar.types-
|
|
64
|
+
//# sourceMappingURL=styledAvatar.types-D1U_mKEg.js.map
|
package/dist/chunks/{styledAvatar.types-CCuTmj5u.js.map → styledAvatar.types-D1U_mKEg.js.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styledAvatar.types-
|
|
1
|
+
{"version":3,"file":"styledAvatar.types-D1U_mKEg.js","sources":["../../src/components/StyledAvatar/styledAvatar.component.tsx","../../src/components/StyledAvatar/styledAvatar.types.ts"],"sourcesContent":["import React from \"react\";\nimport { Avatar, AvatarProps } from \"components/Avatar/avatar.component\";\nimport { StyledAvatarType } from \"./styledAvatar.types\";\n\nexport interface StyledAvatarProps extends AvatarProps {\n type?: StyledAvatarType;\n}\n\nexport const StyledAvatar = ({\n type = \"Client\",\n ...rest\n}: StyledAvatarProps): React.JSX.Element => {\n const {\n name,\n tooltipProps = { placement: \"top\", ...rest.tooltipProps },\n onClick,\n } = rest;\n\n const testClientStyleProps: Partial<AvatarProps> = {\n variant: \"outlineYellow\",\n tooltipProps: {\n ...tooltipProps,\n label: tooltipProps?.label || `${name} (Test Client)`,\n },\n };\n\n const smsStyleProps: Partial<AvatarProps> = {\n iconName: \"cellphone\",\n tooltipProps: {\n ...tooltipProps,\n label:\n tooltipProps?.label ||\n `Text messages sent from ${name || \"unknown number\"}`,\n },\n };\n\n const automatedStyleProps: Partial<AvatarProps> = {\n iconName: \"robot\",\n backgroundColor: \"background.primary\",\n hideBorder: true,\n color: \"text.contrast\",\n size: \"sm\",\n showTooltip: false,\n cursor: \"default\",\n };\n\n const clinicStyleProps: Partial<AvatarProps> = {\n variant: \"outlineAccent\",\n name: name || \"Sys\",\n };\n\n const styleProps: Record<StyledAvatarType, Partial<AvatarProps>> = {\n Automated: automatedStyleProps,\n Client: {},\n Clinic: clinicStyleProps,\n SMS: smsStyleProps,\n TestClient: testClientStyleProps,\n };\n\n return (\n <Avatar\n className=\"StyledAvatar\"\n data-testid={`kibble-styled-avatar-${type}`}\n onClick={(e): void => {\n e.stopPropagation();\n if (onClick) {\n onClick(e);\n }\n }}\n {...rest}\n {...styleProps[type]}\n />\n );\n};\n","export const styledAvatarTypes = [\n \"Client\",\n \"SMS\",\n \"TestClient\",\n \"Automated\",\n \"Clinic\",\n] as const;\nexport type StyledAvatarType = (typeof styledAvatarTypes)[number];\n"],"names":["StyledAvatar","type","rest","name","tooltipProps","onClick","testClientStyleProps","smsStyleProps","styleProps","jsx","Avatar","e","styledAvatarTypes"],"mappings":";;AAQO,MAAMA,IAAe,CAAC;AAAA,EAC3B,MAAAC,IAAO;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=styledAvatar.types-
|
|
1
|
+
"use strict";const c=require("./jsx-runtime-BjDatQAs.js"),p=require("./avatar.component-BSA7tJUO.js"),m=({type:l="Client",...e})=>{const{name:o,tooltipProps:t={placement:"top",...e.tooltipProps},onClick:s}=e,n={variant:"outlineYellow",tooltipProps:{...t,label:t?.label||`${o} (Test Client)`}},r={iconName:"cellphone",tooltipProps:{...t,label:t?.label||`Text messages sent from ${o||"unknown number"}`}},i={Automated:{iconName:"robot",backgroundColor:"background.primary",hideBorder:!0,color:"text.contrast",size:"sm",showTooltip:!1,cursor:"default"},Client:{},Clinic:{variant:"outlineAccent",name:o||"Sys"},SMS:r,TestClient:n};return c.jsxRuntimeExports.jsx(p.Avatar,{className:"StyledAvatar","data-testid":`kibble-styled-avatar-${l}`,onClick:a=>{a.stopPropagation(),s&&s(a)},...e,...i[l]})},u=["Client","SMS","TestClient","Automated","Clinic"];exports.StyledAvatar=m;exports.styledAvatarTypes=u;
|
|
2
|
+
//# sourceMappingURL=styledAvatar.types-E52xMx_F.js.map
|
package/dist/chunks/{styledAvatar.types-DG91ByYD.js.map → styledAvatar.types-E52xMx_F.js.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styledAvatar.types-
|
|
1
|
+
{"version":3,"file":"styledAvatar.types-E52xMx_F.js","sources":["../../src/components/StyledAvatar/styledAvatar.component.tsx","../../src/components/StyledAvatar/styledAvatar.types.ts"],"sourcesContent":["import React from \"react\";\nimport { Avatar, AvatarProps } from \"components/Avatar/avatar.component\";\nimport { StyledAvatarType } from \"./styledAvatar.types\";\n\nexport interface StyledAvatarProps extends AvatarProps {\n type?: StyledAvatarType;\n}\n\nexport const StyledAvatar = ({\n type = \"Client\",\n ...rest\n}: StyledAvatarProps): React.JSX.Element => {\n const {\n name,\n tooltipProps = { placement: \"top\", ...rest.tooltipProps },\n onClick,\n } = rest;\n\n const testClientStyleProps: Partial<AvatarProps> = {\n variant: \"outlineYellow\",\n tooltipProps: {\n ...tooltipProps,\n label: tooltipProps?.label || `${name} (Test Client)`,\n },\n };\n\n const smsStyleProps: Partial<AvatarProps> = {\n iconName: \"cellphone\",\n tooltipProps: {\n ...tooltipProps,\n label:\n tooltipProps?.label ||\n `Text messages sent from ${name || \"unknown number\"}`,\n },\n };\n\n const automatedStyleProps: Partial<AvatarProps> = {\n iconName: \"robot\",\n backgroundColor: \"background.primary\",\n hideBorder: true,\n color: \"text.contrast\",\n size: \"sm\",\n showTooltip: false,\n cursor: \"default\",\n };\n\n const clinicStyleProps: Partial<AvatarProps> = {\n variant: \"outlineAccent\",\n name: name || \"Sys\",\n };\n\n const styleProps: Record<StyledAvatarType, Partial<AvatarProps>> = {\n Automated: automatedStyleProps,\n Client: {},\n Clinic: clinicStyleProps,\n SMS: smsStyleProps,\n TestClient: testClientStyleProps,\n };\n\n return (\n <Avatar\n className=\"StyledAvatar\"\n data-testid={`kibble-styled-avatar-${type}`}\n onClick={(e): void => {\n e.stopPropagation();\n if (onClick) {\n onClick(e);\n }\n }}\n {...rest}\n {...styleProps[type]}\n />\n );\n};\n","export const styledAvatarTypes = [\n \"Client\",\n \"SMS\",\n \"TestClient\",\n \"Automated\",\n \"Clinic\",\n] as const;\nexport type StyledAvatarType = (typeof styledAvatarTypes)[number];\n"],"names":["StyledAvatar","type","rest","name","tooltipProps","onClick","testClientStyleProps","smsStyleProps","styleProps","jsx","Avatar","e","styledAvatarTypes"],"mappings":"sGAQaA,EAAe,CAAC,CAC3B,KAAAC,EAAO,SACP,GAAGC,CACL,IAA4C,CACpC,KAAA,CACJ,KAAAC,EACA,aAAAC,EAAe,CAAE,UAAW,MAAO,GAAGF,EAAK,YAAa,EACxD,QAAAG,CAAA,EACEH,EAEEI,EAA6C,CACjD,QAAS,gBACT,aAAc,CACZ,GAAGF,EACH,MAAOA,GAAc,OAAS,GAAGD,CAAI,gBAAA,CAEzC,EAEMI,EAAsC,CAC1C,SAAU,YACV,aAAc,CACZ,GAAGH,EACH,MACEA,GAAc,OACd,2BAA2BD,GAAQ,gBAAgB,EAAA,CAEzD,EAiBMK,EAA6D,CACjE,UAhBgD,CAChD,SAAU,QACV,gBAAiB,qBACjB,WAAY,GACZ,MAAO,gBACP,KAAM,KACN,YAAa,GACb,OAAQ,SACV,EASE,OAAQ,CAAC,EACT,OAR6C,CAC7C,QAAS,gBACT,KAAML,GAAQ,KAChB,EAME,IAAKI,EACL,WAAYD,CACd,EAGE,OAAAG,EAAA,kBAAA,IAACC,EAAA,OAAA,CACC,UAAU,eACV,cAAa,wBAAwBT,CAAI,GACzC,QAAUU,GAAY,CACpBA,EAAE,gBAAgB,EACdN,GACFA,EAAQM,CAAC,CAEb,EACC,GAAGT,EACH,GAAGM,EAAWP,CAAI,CAAA,CACrB,CAEJ,ECzEaW,EAAoB,CAC/B,SACA,MACA,aACA,YACA,QACF"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";const i=require("./jsx-runtime-BjDatQAs.js"),c=require("react"),y=require("./withFormControl-
|
|
2
|
-
//# sourceMappingURL=switch.component-
|
|
1
|
+
"use strict";const i=require("./jsx-runtime-BjDatQAs.js"),c=require("react"),y=require("./withFormControl-DyPM4V_t.js"),w=require("./attr-BMs6szZx.js"),E=require("./create-slot-recipe-context-IwVIgtBt.js"),m=require("./factory-D6tdBUPG.js"),n=require("./use-locale-context-D0LByRu9.js"),f=require("./use-field-context-CArmgHPP.js"),l=require("./index-CHIISuTq.js"),x=require("./index-DBk0LkcO.js"),q=t=>t&&t.__esModule?t:{default:t},N=q(c),[R,u]=n.createContext({name:"SwitchContext",hookName:"useSwitchContext",providerName:"<SwitchProvider />"}),S=c.forwardRef((t,e)=>{const r=u(),s=l.mergeProps(r.getControlProps(),t);return i.jsxRuntimeExports.jsx(n.ark.span,{...s,ref:e})});S.displayName="SwitchControl";const j=c.forwardRef((t,e)=>{const r=u(),s=l.mergeProps(r.getHiddenInputProps(),t),o=f.useFieldContext();return i.jsxRuntimeExports.jsx(n.ark.input,{"aria-describedby":o?.ariaDescribedby,...s,ref:e})});j.displayName="SwitchHiddenInput";const C=c.forwardRef((t,e)=>{const r=u(),s=l.mergeProps(r.getLabelProps(),t);return i.jsxRuntimeExports.jsx(n.ark.span,{...s,ref:e})});C.displayName="SwitchLabel";const I=t=>{const e=c.useId(),{getRootNode:r}=n.useEnvironmentContext(),{dir:s}=n.useLocaleContext(),o=f.useFieldContext(),a={id:e,ids:{label:o?.ids.label,hiddenInput:o?.ids.control},dir:s,disabled:o?.disabled,readOnly:o?.readOnly,invalid:o?.invalid,required:o?.required,getRootNode:r,...t},d=n.useMachine(x.machine,a);return x.connect(d,n.normalizeProps)},b=c.forwardRef((t,e)=>{const[r,s]=n.createSplitProps()(t,["checked","defaultChecked","disabled","form","id","ids","invalid","label","name","onCheckedChange","readOnly","required","value"]),o=I(r),a=l.mergeProps(o.getRootProps(),s);return i.jsxRuntimeExports.jsx(R,{value:o,children:i.jsxRuntimeExports.jsx(n.ark.label,{...a,ref:e})})});b.displayName="SwitchRoot";const P=c.forwardRef((t,e)=>{const[{value:r},s]=n.createSplitProps()(t,["value"]),o=l.mergeProps(r.getRootProps(),s);return i.jsxRuntimeExports.jsx(R,{value:r,children:i.jsxRuntimeExports.jsx(n.ark.label,{...o,ref:e})})});P.displayName="SwitchRootProvider";const k=c.forwardRef((t,e)=>{const r=u(),s=l.mergeProps(r.getThumbProps(),t);return i.jsxRuntimeExports.jsx(n.ark.span,{...s,ref:e})});k.displayName="SwitchThumb";const{withProvider:g,withContext:p,useStyles:_}=E.createSlotRecipeContext({key:"switch"});g(P,"root",{forwardAsChild:!0});const A=g(b,"root",{forwardAsChild:!0}),L=p(C,"label",{forwardAsChild:!0}),$=p(k,"thumb",{forwardAsChild:!0}),F=p(S,"control",{forwardAsChild:!0,defaultProps:{children:i.jsxRuntimeExports.jsx($,{})}});c.forwardRef(function(e,r){const s=u(),o=_(),{fallback:a,children:d,...h}=e;return i.jsxRuntimeExports.jsx(m.chakra.span,{ref:r,"data-checked":w.dataAttr(s.checked),...h,css:[o.indicator,e.css],children:s.checked?d:a})});c.forwardRef(function(e,r){const s=u(),{fallback:o,children:a,...d}=e;return i.jsxRuntimeExports.jsx(m.chakra.span,{ref:r,"data-checked":w.dataAttr(s.checked),...d,children:s.checked?a:o})});const T=j,H=y.withFormControl(({children:t,indeterminate:e=!1,onContrast:r,label:s,size:o="md",switchRef:a,...d})=>{const h=c.useMemo(()=>e?r?"indeterminateOnContrast":"indeterminate":r?"onContrast":"default",[e,r]);return i.jsxRuntimeExports.jsxs(A,{className:"Switch","data-testid":"kibble-switch",ref:a,size:o,variant:h,...d,children:[i.jsxRuntimeExports.jsx(T,{className:"Switch_Input","data-testid":"kibble-switch-input"}),i.jsxRuntimeExports.jsx(F,{className:"Switch_Control","data-testid":"kibble-switch-control"}),!!t&&i.jsxRuntimeExports.jsx(L,{children:t})]})}),v=N.default.forwardRef((t,e)=>i.jsxRuntimeExports.jsx(H,{switchRef:e,...t}));v.displayName="Switch";exports.WrappedSwitch=v;
|
|
2
|
+
//# sourceMappingURL=switch.component-BC_L3Gzc.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"switch.component-frqBM_Af.js","sources":["../../node_modules/@ark-ui/react/dist/components/switch/use-switch-context.js","../../node_modules/@ark-ui/react/dist/components/switch/switch-control.js","../../node_modules/@ark-ui/react/dist/components/switch/switch-hidden-input.js","../../node_modules/@ark-ui/react/dist/components/switch/switch-label.js","../../node_modules/@ark-ui/react/dist/components/switch/use-switch.js","../../node_modules/@ark-ui/react/dist/components/switch/switch-root.js","../../node_modules/@ark-ui/react/dist/components/switch/switch-root-provider.js","../../node_modules/@ark-ui/react/dist/components/switch/switch-thumb.js","../../node_modules/@chakra-ui/react/dist/esm/components/switch/switch.js","../../src/components/Switch/switch.component.tsx"],"sourcesContent":["'use client';\nimport { createContext } from '../../utils/create-context.js';\n\nconst [SwitchProvider, useSwitchContext] = createContext({\n name: \"SwitchContext\",\n hookName: \"useSwitchContext\",\n providerName: \"<SwitchProvider />\"\n});\n\nexport { SwitchProvider, useSwitchContext };\n","'use client';\nimport { jsx } from 'react/jsx-runtime';\nimport { mergeProps } from '@zag-js/react';\nimport { forwardRef } from 'react';\nimport { ark } from '../factory.js';\nimport { useSwitchContext } from './use-switch-context.js';\n\nconst SwitchControl = forwardRef((props, ref) => {\n const switchContext = useSwitchContext();\n const mergedProps = mergeProps(switchContext.getControlProps(), props);\n return /* @__PURE__ */ jsx(ark.span, { ...mergedProps, ref });\n});\nSwitchControl.displayName = \"SwitchControl\";\n\nexport { SwitchControl };\n","'use client';\nimport { jsx } from 'react/jsx-runtime';\nimport { mergeProps } from '@zag-js/react';\nimport { forwardRef } from 'react';\nimport { ark } from '../factory.js';\nimport { useFieldContext } from '../field/use-field-context.js';\nimport { useSwitchContext } from './use-switch-context.js';\n\nconst SwitchHiddenInput = forwardRef((props, ref) => {\n const switchContext = useSwitchContext();\n const mergedProps = mergeProps(switchContext.getHiddenInputProps(), props);\n const field = useFieldContext();\n return /* @__PURE__ */ jsx(ark.input, { \"aria-describedby\": field?.ariaDescribedby, ...mergedProps, ref });\n});\nSwitchHiddenInput.displayName = \"SwitchHiddenInput\";\n\nexport { SwitchHiddenInput };\n","'use client';\nimport { jsx } from 'react/jsx-runtime';\nimport { mergeProps } from '@zag-js/react';\nimport { forwardRef } from 'react';\nimport { ark } from '../factory.js';\nimport { useSwitchContext } from './use-switch-context.js';\n\nconst SwitchLabel = forwardRef((props, ref) => {\n const switchContext = useSwitchContext();\n const mergedProps = mergeProps(switchContext.getLabelProps(), props);\n return /* @__PURE__ */ jsx(ark.span, { ...mergedProps, ref });\n});\nSwitchLabel.displayName = \"SwitchLabel\";\n\nexport { SwitchLabel };\n","'use client';\nimport { useMachine, normalizeProps } from '@zag-js/react';\nimport * as zagSwitch from '@zag-js/switch';\nimport { useId } from 'react';\nimport { useEnvironmentContext } from '../../providers/environment/use-environment-context.js';\nimport { useLocaleContext } from '../../providers/locale/use-locale-context.js';\nimport { useFieldContext } from '../field/use-field-context.js';\n\nconst useSwitch = (props) => {\n const id = useId();\n const { getRootNode } = useEnvironmentContext();\n const { dir } = useLocaleContext();\n const field = useFieldContext();\n const machineProps = {\n id,\n ids: {\n label: field?.ids.label,\n hiddenInput: field?.ids.control\n },\n dir,\n disabled: field?.disabled,\n readOnly: field?.readOnly,\n invalid: field?.invalid,\n required: field?.required,\n getRootNode,\n ...props\n };\n const service = useMachine(zagSwitch.machine, machineProps);\n return zagSwitch.connect(service, normalizeProps);\n};\n\nexport { useSwitch };\n","'use client';\nimport { jsx } from 'react/jsx-runtime';\nimport { mergeProps } from '@zag-js/react';\nimport { forwardRef } from 'react';\nimport { createSplitProps } from '../../utils/create-split-props.js';\nimport { ark } from '../factory.js';\nimport { useSwitch } from './use-switch.js';\nimport { SwitchProvider } from './use-switch-context.js';\n\nconst SwitchRoot = forwardRef((props, ref) => {\n const [switchProps, localProps] = createSplitProps()(props, [\n \"checked\",\n \"defaultChecked\",\n \"disabled\",\n \"form\",\n \"id\",\n \"ids\",\n \"invalid\",\n \"label\",\n \"name\",\n \"onCheckedChange\",\n \"readOnly\",\n \"required\",\n \"value\"\n ]);\n const switchContext = useSwitch(switchProps);\n const mergedProps = mergeProps(switchContext.getRootProps(), localProps);\n return /* @__PURE__ */ jsx(SwitchProvider, { value: switchContext, children: /* @__PURE__ */ jsx(ark.label, { ...mergedProps, ref }) });\n});\nSwitchRoot.displayName = \"SwitchRoot\";\n\nexport { SwitchRoot };\n","'use client';\nimport { jsx } from 'react/jsx-runtime';\nimport { mergeProps } from '@zag-js/react';\nimport { forwardRef } from 'react';\nimport { createSplitProps } from '../../utils/create-split-props.js';\nimport { ark } from '../factory.js';\nimport { SwitchProvider } from './use-switch-context.js';\n\nconst SwitchRootProvider = forwardRef((props, ref) => {\n const [{ value: api }, localProps] = createSplitProps()(props, [\"value\"]);\n const mergedProps = mergeProps(api.getRootProps(), localProps);\n return /* @__PURE__ */ jsx(SwitchProvider, { value: api, children: /* @__PURE__ */ jsx(ark.label, { ...mergedProps, ref }) });\n});\nSwitchRootProvider.displayName = \"SwitchRootProvider\";\n\nexport { SwitchRootProvider };\n","'use client';\nimport { jsx } from 'react/jsx-runtime';\nimport { mergeProps } from '@zag-js/react';\nimport { forwardRef } from 'react';\nimport { ark } from '../factory.js';\nimport { useSwitchContext } from './use-switch-context.js';\n\nconst SwitchThumb = forwardRef((props, ref) => {\n const switchContext = useSwitchContext();\n const mergedProps = mergeProps(switchContext.getThumbProps(), props);\n return /* @__PURE__ */ jsx(ark.span, { ...mergedProps, ref });\n});\nSwitchThumb.displayName = \"SwitchThumb\";\n\nexport { SwitchThumb };\n","\"use strict\";\n\"use client\";\nimport { jsx } from 'react/jsx-runtime';\nimport { Switch, useSwitchContext } from '@ark-ui/react/switch';\nimport { forwardRef } from 'react';\nimport { dataAttr } from '../../utils/attr.js';\nimport { createSlotRecipeContext } from '../../styled-system/create-slot-recipe-context.js';\nimport { chakra } from '../../styled-system/factory.js';\n\nconst {\n withProvider,\n withContext,\n useStyles: useSwitchStyles,\n PropsProvider\n} = createSlotRecipeContext({ key: \"switch\" });\nconst SwitchRootProvider = withProvider(Switch.RootProvider, \"root\", { forwardAsChild: true });\nconst SwitchRoot = withProvider(\n Switch.Root,\n \"root\",\n { forwardAsChild: true }\n);\nconst SwitchPropsProvider = PropsProvider;\nconst SwitchLabel = withContext(\n Switch.Label,\n \"label\",\n { forwardAsChild: true }\n);\nconst SwitchThumb = withContext(\n Switch.Thumb,\n \"thumb\",\n { forwardAsChild: true }\n);\nconst SwitchControl = withContext(\n Switch.Control,\n \"control\",\n {\n forwardAsChild: true,\n defaultProps: { children: /* @__PURE__ */ jsx(SwitchThumb, {}) }\n }\n);\nconst SwitchIndicator = forwardRef(function SwitchIndicator2(props, ref) {\n const api = useSwitchContext();\n const styles = useSwitchStyles();\n const { fallback, children, ...rest } = props;\n return /* @__PURE__ */ jsx(\n chakra.span,\n {\n ref,\n \"data-checked\": dataAttr(api.checked),\n ...rest,\n css: [styles.indicator, props.css],\n children: api.checked ? children : fallback\n }\n );\n});\nconst SwitchThumbIndicator = forwardRef(function SwitchThumbIndicator2(props, ref) {\n const api = useSwitchContext();\n const { fallback, children, ...rest } = props;\n return /* @__PURE__ */ jsx(chakra.span, { ref, \"data-checked\": dataAttr(api.checked), ...rest, children: api.checked ? children : fallback });\n});\nconst SwitchContext = Switch.Context;\nconst SwitchHiddenInput = Switch.HiddenInput;\n\nexport { SwitchContext, SwitchControl, SwitchHiddenInput, SwitchIndicator, SwitchLabel, SwitchPropsProvider, SwitchRoot, SwitchRootProvider, SwitchThumb, SwitchThumbIndicator, useSwitchStyles };\n","import React, { ForwardedRef, useMemo } from \"react\";\nimport { Switch as CSwitch } from \"@chakra-ui/react/switch\";\nimport {\n withFormControl,\n WithFormControlProps,\n} from \"hocs/withFormControl/withFormControl\";\nimport { FormControlSize } from \"hocs/withFormControl/withFormControl.types\";\n\nexport interface SwitchProps\n extends WithFormControlProps,\n Omit<CSwitch.RootProps, \"label\" | \"onChange\"> {\n indeterminate?: boolean;\n switchRef?: ForwardedRef<HTMLLabelElement>;\n size?: FormControlSize;\n}\n\nconst Switch = withFormControl(\n ({\n children,\n indeterminate = false,\n onContrast,\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n label,\n size = \"md\",\n switchRef,\n ...rest\n }: SwitchProps): React.JSX.Element => {\n const _computedVariant = useMemo(() => {\n if (indeterminate) {\n return onContrast ? \"indeterminateOnContrast\" : \"indeterminate\";\n } else {\n return onContrast ? \"onContrast\" : \"default\";\n }\n }, [indeterminate, onContrast]);\n\n return (\n <CSwitch.Root\n className=\"Switch\"\n data-testid=\"kibble-switch\"\n ref={switchRef}\n size={size}\n variant={_computedVariant}\n {...rest}\n >\n <CSwitch.HiddenInput\n className=\"Switch_Input\"\n data-testid=\"kibble-switch-input\"\n />\n <CSwitch.Control\n className=\"Switch_Control\"\n data-testid=\"kibble-switch-control\"\n />\n {!!children && <CSwitch.Label>{children}</CSwitch.Label>}\n </CSwitch.Root>\n );\n },\n);\n\nconst WrappedSwitch = React.forwardRef(\n (props: SwitchProps, ref: ForwardedRef<HTMLLabelElement>) => (\n <Switch switchRef={ref} {...props} />\n ),\n);\n\nWrappedSwitch.displayName = \"Switch\";\n\nexport { WrappedSwitch as Switch };\n"],"names":["SwitchProvider","useSwitchContext","createContext","SwitchControl","forwardRef","props","ref","switchContext","mergedProps","mergeProps","jsx","ark","SwitchHiddenInput","field","useFieldContext","SwitchLabel","useSwitch","id","useId","getRootNode","useEnvironmentContext","dir","useLocaleContext","machineProps","service","useMachine","zagSwitch.machine","zagSwitch.connect","normalizeProps","SwitchRoot","switchProps","localProps","createSplitProps","SwitchRootProvider","api","SwitchThumb","withProvider","withContext","useSwitchStyles","createSlotRecipeContext","Switch.RootProvider","Switch.Root","Switch.Label","Switch.Thumb","Switch.Control","styles","fallback","children","rest","chakra","dataAttr","Switch.HiddenInput","Switch","withFormControl","indeterminate","onContrast","label","size","switchRef","_computedVariant","useMemo","jsxs","CSwitch.Root","CSwitch.HiddenInput","CSwitch.Control","CSwitch.Label","WrappedSwitch","React"],"mappings":"wbAGM,CAACA,EAAgBC,CAAgB,EAAIC,gBAAc,CACvD,KAAM,gBACN,SAAU,mBACV,aAAc,oBAChB,CAAC,ECAKC,EAAgBC,EAAU,WAAC,CAACC,EAAOC,IAAQ,CAC/C,MAAMC,EAAgBN,EAAkB,EAClCO,EAAcC,EAAU,WAACF,EAAc,gBAAe,EAAIF,CAAK,EACrE,OAAuBK,EAAAA,kBAAAA,IAAIC,EAAAA,IAAI,KAAM,CAAE,GAAGH,EAAa,IAAAF,EAAK,CAC9D,CAAC,EACDH,EAAc,YAAc,gBCJ5B,MAAMS,EAAoBR,EAAU,WAAC,CAACC,EAAOC,IAAQ,CACnD,MAAMC,EAAgBN,EAAkB,EAClCO,EAAcC,EAAU,WAACF,EAAc,oBAAmB,EAAIF,CAAK,EACnEQ,EAAQC,EAAAA,gBAAiB,EAC/B,OAAuBJ,EAAG,kBAAA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,CAACjB,2BAAakB,EAAA,CAAe,SAAAlB,CAAS,CAAA,CAAA,CAAA,CAC1C,CAAA,CAGN,EAEMmB,EAAgBC,EAAM,QAAA,WAC1B,CAAC9D,EAAoBC,IACnBI,wBAAC0C,GAAO,UAAW9C,EAAM,GAAGD,CAAO,CAAA,CAEvC,EAEA6D,EAAc,YAAc","x_google_ignoreList":[0,1,2,3,4,5,6,7,8]}
|
|
1
|
+
{"version":3,"file":"switch.component-BC_L3Gzc.js","sources":["../../node_modules/@ark-ui/react/dist/components/switch/use-switch-context.js","../../node_modules/@ark-ui/react/dist/components/switch/switch-control.js","../../node_modules/@ark-ui/react/dist/components/switch/switch-hidden-input.js","../../node_modules/@ark-ui/react/dist/components/switch/switch-label.js","../../node_modules/@ark-ui/react/dist/components/switch/use-switch.js","../../node_modules/@ark-ui/react/dist/components/switch/switch-root.js","../../node_modules/@ark-ui/react/dist/components/switch/switch-root-provider.js","../../node_modules/@ark-ui/react/dist/components/switch/switch-thumb.js","../../node_modules/@chakra-ui/react/dist/esm/components/switch/switch.js","../../src/components/Switch/switch.component.tsx"],"sourcesContent":["'use client';\nimport { createContext } from '../../utils/create-context.js';\n\nconst [SwitchProvider, useSwitchContext] = createContext({\n name: \"SwitchContext\",\n hookName: \"useSwitchContext\",\n providerName: \"<SwitchProvider />\"\n});\n\nexport { SwitchProvider, useSwitchContext };\n","'use client';\nimport { jsx } from 'react/jsx-runtime';\nimport { mergeProps } from '@zag-js/react';\nimport { forwardRef } from 'react';\nimport { ark } from '../factory.js';\nimport { useSwitchContext } from './use-switch-context.js';\n\nconst SwitchControl = forwardRef((props, ref) => {\n const switchContext = useSwitchContext();\n const mergedProps = mergeProps(switchContext.getControlProps(), props);\n return /* @__PURE__ */ jsx(ark.span, { ...mergedProps, ref });\n});\nSwitchControl.displayName = \"SwitchControl\";\n\nexport { SwitchControl };\n","'use client';\nimport { jsx } from 'react/jsx-runtime';\nimport { mergeProps } from '@zag-js/react';\nimport { forwardRef } from 'react';\nimport { ark } from '../factory.js';\nimport { useFieldContext } from '../field/use-field-context.js';\nimport { useSwitchContext } from './use-switch-context.js';\n\nconst SwitchHiddenInput = forwardRef((props, ref) => {\n const switchContext = useSwitchContext();\n const mergedProps = mergeProps(switchContext.getHiddenInputProps(), props);\n const field = useFieldContext();\n return /* @__PURE__ */ jsx(ark.input, { \"aria-describedby\": field?.ariaDescribedby, ...mergedProps, ref });\n});\nSwitchHiddenInput.displayName = \"SwitchHiddenInput\";\n\nexport { SwitchHiddenInput };\n","'use client';\nimport { jsx } from 'react/jsx-runtime';\nimport { mergeProps } from '@zag-js/react';\nimport { forwardRef } from 'react';\nimport { ark } from '../factory.js';\nimport { useSwitchContext } from './use-switch-context.js';\n\nconst SwitchLabel = forwardRef((props, ref) => {\n const switchContext = useSwitchContext();\n const mergedProps = mergeProps(switchContext.getLabelProps(), props);\n return /* @__PURE__ */ jsx(ark.span, { ...mergedProps, ref });\n});\nSwitchLabel.displayName = \"SwitchLabel\";\n\nexport { SwitchLabel };\n","'use client';\nimport { useMachine, normalizeProps } from '@zag-js/react';\nimport * as zagSwitch from '@zag-js/switch';\nimport { useId } from 'react';\nimport { useEnvironmentContext } from '../../providers/environment/use-environment-context.js';\nimport { useLocaleContext } from '../../providers/locale/use-locale-context.js';\nimport { useFieldContext } from '../field/use-field-context.js';\n\nconst useSwitch = (props) => {\n const id = useId();\n const { getRootNode } = useEnvironmentContext();\n const { dir } = useLocaleContext();\n const field = useFieldContext();\n const machineProps = {\n id,\n ids: {\n label: field?.ids.label,\n hiddenInput: field?.ids.control\n },\n dir,\n disabled: field?.disabled,\n readOnly: field?.readOnly,\n invalid: field?.invalid,\n required: field?.required,\n getRootNode,\n ...props\n };\n const service = useMachine(zagSwitch.machine, machineProps);\n return zagSwitch.connect(service, normalizeProps);\n};\n\nexport { useSwitch };\n","'use client';\nimport { jsx } from 'react/jsx-runtime';\nimport { mergeProps } from '@zag-js/react';\nimport { forwardRef } from 'react';\nimport { createSplitProps } from '../../utils/create-split-props.js';\nimport { ark } from '../factory.js';\nimport { useSwitch } from './use-switch.js';\nimport { SwitchProvider } from './use-switch-context.js';\n\nconst SwitchRoot = forwardRef((props, ref) => {\n const [switchProps, localProps] = createSplitProps()(props, [\n \"checked\",\n \"defaultChecked\",\n \"disabled\",\n \"form\",\n \"id\",\n \"ids\",\n \"invalid\",\n \"label\",\n \"name\",\n \"onCheckedChange\",\n \"readOnly\",\n \"required\",\n \"value\"\n ]);\n const switchContext = useSwitch(switchProps);\n const mergedProps = mergeProps(switchContext.getRootProps(), localProps);\n return /* @__PURE__ */ jsx(SwitchProvider, { value: switchContext, children: /* @__PURE__ */ jsx(ark.label, { ...mergedProps, ref }) });\n});\nSwitchRoot.displayName = \"SwitchRoot\";\n\nexport { SwitchRoot };\n","'use client';\nimport { jsx } from 'react/jsx-runtime';\nimport { mergeProps } from '@zag-js/react';\nimport { forwardRef } from 'react';\nimport { createSplitProps } from '../../utils/create-split-props.js';\nimport { ark } from '../factory.js';\nimport { SwitchProvider } from './use-switch-context.js';\n\nconst SwitchRootProvider = forwardRef((props, ref) => {\n const [{ value: api }, localProps] = createSplitProps()(props, [\"value\"]);\n const mergedProps = mergeProps(api.getRootProps(), localProps);\n return /* @__PURE__ */ jsx(SwitchProvider, { value: api, children: /* @__PURE__ */ jsx(ark.label, { ...mergedProps, ref }) });\n});\nSwitchRootProvider.displayName = \"SwitchRootProvider\";\n\nexport { SwitchRootProvider };\n","'use client';\nimport { jsx } from 'react/jsx-runtime';\nimport { mergeProps } from '@zag-js/react';\nimport { forwardRef } from 'react';\nimport { ark } from '../factory.js';\nimport { useSwitchContext } from './use-switch-context.js';\n\nconst SwitchThumb = forwardRef((props, ref) => {\n const switchContext = useSwitchContext();\n const mergedProps = mergeProps(switchContext.getThumbProps(), props);\n return /* @__PURE__ */ jsx(ark.span, { ...mergedProps, ref });\n});\nSwitchThumb.displayName = \"SwitchThumb\";\n\nexport { SwitchThumb };\n","\"use strict\";\n\"use client\";\nimport { jsx } from 'react/jsx-runtime';\nimport { Switch, useSwitchContext } from '@ark-ui/react/switch';\nimport { forwardRef } from 'react';\nimport { dataAttr } from '../../utils/attr.js';\nimport { createSlotRecipeContext } from '../../styled-system/create-slot-recipe-context.js';\nimport { chakra } from '../../styled-system/factory.js';\n\nconst {\n withProvider,\n withContext,\n useStyles: useSwitchStyles,\n PropsProvider\n} = createSlotRecipeContext({ key: \"switch\" });\nconst SwitchRootProvider = withProvider(Switch.RootProvider, \"root\", { forwardAsChild: true });\nconst SwitchRoot = withProvider(\n Switch.Root,\n \"root\",\n { forwardAsChild: true }\n);\nconst SwitchPropsProvider = PropsProvider;\nconst SwitchLabel = withContext(\n Switch.Label,\n \"label\",\n { forwardAsChild: true }\n);\nconst SwitchThumb = withContext(\n Switch.Thumb,\n \"thumb\",\n { forwardAsChild: true }\n);\nconst SwitchControl = withContext(\n Switch.Control,\n \"control\",\n {\n forwardAsChild: true,\n defaultProps: { children: /* @__PURE__ */ jsx(SwitchThumb, {}) }\n }\n);\nconst SwitchIndicator = forwardRef(function SwitchIndicator2(props, ref) {\n const api = useSwitchContext();\n const styles = useSwitchStyles();\n const { fallback, children, ...rest } = props;\n return /* @__PURE__ */ jsx(\n chakra.span,\n {\n ref,\n \"data-checked\": dataAttr(api.checked),\n ...rest,\n css: [styles.indicator, props.css],\n children: api.checked ? children : fallback\n }\n );\n});\nconst SwitchThumbIndicator = forwardRef(function SwitchThumbIndicator2(props, ref) {\n const api = useSwitchContext();\n const { fallback, children, ...rest } = props;\n return /* @__PURE__ */ jsx(chakra.span, { ref, \"data-checked\": dataAttr(api.checked), ...rest, children: api.checked ? children : fallback });\n});\nconst SwitchContext = Switch.Context;\nconst SwitchHiddenInput = Switch.HiddenInput;\n\nexport { SwitchContext, SwitchControl, SwitchHiddenInput, SwitchIndicator, SwitchLabel, SwitchPropsProvider, SwitchRoot, SwitchRootProvider, SwitchThumb, SwitchThumbIndicator, useSwitchStyles };\n","import React, { ForwardedRef, useMemo } from \"react\";\nimport { Switch as CSwitch } from \"@chakra-ui/react/switch\";\nimport {\n withFormControl,\n WithFormControlProps,\n} from \"hocs/withFormControl/withFormControl\";\nimport { FormControlSize } from \"hocs/withFormControl/withFormControl.types\";\n\nexport interface SwitchProps\n extends WithFormControlProps,\n Omit<CSwitch.RootProps, \"label\" | \"onChange\"> {\n indeterminate?: boolean;\n switchRef?: ForwardedRef<HTMLLabelElement>;\n size?: FormControlSize;\n}\n\nconst Switch = withFormControl(\n ({\n children,\n indeterminate = false,\n onContrast,\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n label,\n size = \"md\",\n switchRef,\n ...rest\n }: SwitchProps): React.JSX.Element => {\n const _computedVariant = useMemo(() => {\n if (indeterminate) {\n return onContrast ? \"indeterminateOnContrast\" : \"indeterminate\";\n } else {\n return onContrast ? \"onContrast\" : \"default\";\n }\n }, [indeterminate, onContrast]);\n\n return (\n <CSwitch.Root\n className=\"Switch\"\n data-testid=\"kibble-switch\"\n ref={switchRef}\n size={size}\n variant={_computedVariant}\n {...rest}\n >\n <CSwitch.HiddenInput\n className=\"Switch_Input\"\n data-testid=\"kibble-switch-input\"\n />\n <CSwitch.Control\n className=\"Switch_Control\"\n data-testid=\"kibble-switch-control\"\n />\n {!!children && <CSwitch.Label>{children}</CSwitch.Label>}\n </CSwitch.Root>\n );\n },\n);\n\nconst WrappedSwitch = React.forwardRef(\n (props: SwitchProps, ref: ForwardedRef<HTMLLabelElement>) => (\n <Switch switchRef={ref} {...props} />\n ),\n);\n\nWrappedSwitch.displayName = \"Switch\";\n\nexport { WrappedSwitch as Switch };\n"],"names":["SwitchProvider","useSwitchContext","createContext","SwitchControl","forwardRef","props","ref","switchContext","mergedProps","mergeProps","jsx","ark","SwitchHiddenInput","field","useFieldContext","SwitchLabel","useSwitch","id","useId","getRootNode","useEnvironmentContext","dir","useLocaleContext","machineProps","service","useMachine","zagSwitch.machine","zagSwitch.connect","normalizeProps","SwitchRoot","switchProps","localProps","createSplitProps","SwitchRootProvider","api","SwitchThumb","withProvider","withContext","useSwitchStyles","createSlotRecipeContext","Switch.RootProvider","Switch.Root","Switch.Label","Switch.Thumb","Switch.Control","styles","fallback","children","rest","chakra","dataAttr","Switch.HiddenInput","Switch","withFormControl","indeterminate","onContrast","label","size","switchRef","_computedVariant","useMemo","jsxs","CSwitch.Root","CSwitch.HiddenInput","CSwitch.Control","CSwitch.Label","WrappedSwitch","React"],"mappings":"wbAGM,CAACA,EAAgBC,CAAgB,EAAIC,gBAAc,CACvD,KAAM,gBACN,SAAU,mBACV,aAAc,oBAChB,CAAC,ECAKC,EAAgBC,EAAU,WAAC,CAACC,EAAOC,IAAQ,CAC/C,MAAMC,EAAgBN,EAAkB,EAClCO,EAAcC,EAAU,WAACF,EAAc,gBAAe,EAAIF,CAAK,EACrE,OAAuBK,EAAAA,kBAAAA,IAAIC,EAAAA,IAAI,KAAM,CAAE,GAAGH,EAAa,IAAAF,EAAK,CAC9D,CAAC,EACDH,EAAc,YAAc,gBCJ5B,MAAMS,EAAoBR,EAAU,WAAC,CAACC,EAAOC,IAAQ,CACnD,MAAMC,EAAgBN,EAAkB,EAClCO,EAAcC,EAAU,WAACF,EAAc,oBAAmB,EAAIF,CAAK,EACnEQ,EAAQC,EAAAA,gBAAiB,EAC/B,OAAuBJ,EAAG,kBAAA,IAACC,MAAI,MAAO,CAAE,mBAAoBE,GAAO,gBAAiB,GAAGL,EAAa,IAAAF,EAAK,CAC3G,CAAC,EACDM,EAAkB,YAAc,oBCPhC,MAAMG,EAAcX,EAAU,WAAC,CAACC,EAAOC,IAAQ,CAC7C,MAAMC,EAAgBN,EAAkB,EAClCO,EAAcC,EAAU,WAACF,EAAc,cAAa,EAAIF,CAAK,EACnE,OAAuBK,EAAAA,kBAAAA,IAAIC,EAAAA,IAAI,KAAM,CAAE,GAAGH,EAAa,IAAAF,EAAK,CAC9D,CAAC,EACDS,EAAY,YAAc,cCJ1B,MAAMC,EAAaX,GAAU,CAC3B,MAAMY,EAAKC,EAAAA,MAAO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B,EACxB,CAAE,SAAA6C,EAAU,SAAAC,EAAU,GAAGC,CAAM,EAAG3C,EACxC,OAAuBK,EAAAA,kBAAAA,IAAIuC,EAAAA,OAAO,KAAM,CAAE,IAAA3C,EAAK,eAAgB4C,EAAAA,SAAShB,EAAI,OAAO,EAAG,GAAGc,EAAM,SAAUd,EAAI,QAAUa,EAAWD,EAAU,CAC9I,CAAC,EAED,MAAMlC,EAAoBuC,EC7CpBC,EAASC,EAAA,gBACb,CAAC,CACC,SAAAN,EACA,cAAAO,EAAgB,GAChB,WAAAC,EAEA,MAAAC,EACA,KAAAC,EAAO,KACP,UAAAC,EACA,GAAGV,CAAA,IACiC,CAC9B,MAAAW,EAAmBC,EAAAA,QAAQ,IAC3BN,EACKC,EAAa,0BAA4B,gBAEzCA,EAAa,aAAe,UAEpC,CAACD,EAAeC,CAAU,CAAC,EAG5B,OAAAM,EAAA,kBAAA,KAACC,EAAA,CACC,UAAU,SACV,cAAY,gBACZ,IAAKJ,EACL,KAAAD,EACA,QAASE,EACR,GAAGX,EAEJ,SAAA,CAAAtC,EAAA,kBAAA,IAACqD,EAAA,CACC,UAAU,eACV,cAAY,qBAAA,CACd,EACArD,EAAA,kBAAA,IAACsD,EAAA,CACC,UAAU,iBACV,cAAY,uBAAA,CACd,EACC,CAAC,CAACjB,2BAAakB,EAAA,CAAe,SAAAlB,CAAS,CAAA,CAAA,CAAA,CAC1C,CAAA,CAGN,EAEMmB,EAAgBC,EAAM,QAAA,WAC1B,CAAC9D,EAAoBC,IACnBI,wBAAC0C,GAAO,UAAW9C,EAAM,GAAGD,CAAO,CAAA,CAEvC,EAEA6D,EAAc,YAAc","x_google_ignoreList":[0,1,2,3,4,5,6,7,8]}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { j as c } from "./jsx-runtime-C5mzlN2N.js";
|
|
2
2
|
import g, { forwardRef as n, useId as R, useMemo as N } from "react";
|
|
3
|
-
import { w as I } from "./withFormControl-
|
|
3
|
+
import { w as I } from "./withFormControl-yxJx_BJg.js";
|
|
4
4
|
import { d as u } from "./attr-sm10PXOd.js";
|
|
5
5
|
import { c as A } from "./create-slot-recipe-context-BJmsuxih.js";
|
|
6
6
|
import { c as w } from "./factory-Ctbv0Ozn.js";
|
|
7
|
-
import { c as L, f as d, i as T, j as _, k as $, n as H, a as S } from "./use-locale-context-
|
|
8
|
-
import { u as f } from "./use-field-context-
|
|
9
|
-
import {
|
|
10
|
-
import { m as O, c as q } from "./index-
|
|
7
|
+
import { c as L, f as d, i as T, j as _, k as $, n as H, a as S } from "./use-locale-context-BiiNTYMT.js";
|
|
8
|
+
import { u as f } from "./use-field-context-Cm3grEyV.js";
|
|
9
|
+
import { a1 as l } from "./index-YtNA0Ueo.js";
|
|
10
|
+
import { m as O, c as q } from "./index-DVNjUEDJ.js";
|
|
11
11
|
const [x, h] = L({
|
|
12
12
|
name: "SwitchContext",
|
|
13
13
|
hookName: "useSwitchContext",
|
|
@@ -115,7 +115,7 @@ n(function(t, e) {
|
|
|
115
115
|
const s = h(), { fallback: r, children: i, ...a } = t;
|
|
116
116
|
return /* @__PURE__ */ c.jsx(w.span, { ref: e, "data-checked": u(s.checked), ...a, children: s.checked ? i : r });
|
|
117
117
|
});
|
|
118
|
-
const V = C,
|
|
118
|
+
const V = C, B = I(
|
|
119
119
|
({
|
|
120
120
|
children: o,
|
|
121
121
|
indeterminate: t = !1,
|
|
@@ -156,11 +156,11 @@ const V = C, Y = I(
|
|
|
156
156
|
}
|
|
157
157
|
);
|
|
158
158
|
}
|
|
159
|
-
),
|
|
160
|
-
(o, t) => /* @__PURE__ */ c.jsx(
|
|
159
|
+
), G = g.forwardRef(
|
|
160
|
+
(o, t) => /* @__PURE__ */ c.jsx(B, { switchRef: t, ...o })
|
|
161
161
|
);
|
|
162
|
-
|
|
162
|
+
G.displayName = "Switch";
|
|
163
163
|
export {
|
|
164
|
-
|
|
164
|
+
G as W
|
|
165
165
|
};
|
|
166
|
-
//# sourceMappingURL=switch.component-
|
|
166
|
+
//# sourceMappingURL=switch.component-F106ejwM.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"switch.component-Duu-vQCU.js","sources":["../../node_modules/@ark-ui/react/dist/components/switch/use-switch-context.js","../../node_modules/@ark-ui/react/dist/components/switch/switch-control.js","../../node_modules/@ark-ui/react/dist/components/switch/switch-hidden-input.js","../../node_modules/@ark-ui/react/dist/components/switch/switch-label.js","../../node_modules/@ark-ui/react/dist/components/switch/use-switch.js","../../node_modules/@ark-ui/react/dist/components/switch/switch-root.js","../../node_modules/@ark-ui/react/dist/components/switch/switch-root-provider.js","../../node_modules/@ark-ui/react/dist/components/switch/switch-thumb.js","../../node_modules/@chakra-ui/react/dist/esm/components/switch/switch.js","../../src/components/Switch/switch.component.tsx"],"sourcesContent":["'use client';\nimport { createContext } from '../../utils/create-context.js';\n\nconst [SwitchProvider, useSwitchContext] = createContext({\n name: \"SwitchContext\",\n hookName: \"useSwitchContext\",\n providerName: \"<SwitchProvider />\"\n});\n\nexport { SwitchProvider, useSwitchContext };\n","'use client';\nimport { jsx } from 'react/jsx-runtime';\nimport { mergeProps } from '@zag-js/react';\nimport { forwardRef } from 'react';\nimport { ark } from '../factory.js';\nimport { useSwitchContext } from './use-switch-context.js';\n\nconst SwitchControl = forwardRef((props, ref) => {\n const switchContext = useSwitchContext();\n const mergedProps = mergeProps(switchContext.getControlProps(), props);\n return /* @__PURE__ */ jsx(ark.span, { ...mergedProps, ref });\n});\nSwitchControl.displayName = \"SwitchControl\";\n\nexport { SwitchControl };\n","'use client';\nimport { jsx } from 'react/jsx-runtime';\nimport { mergeProps } from '@zag-js/react';\nimport { forwardRef } from 'react';\nimport { ark } from '../factory.js';\nimport { useFieldContext } from '../field/use-field-context.js';\nimport { useSwitchContext } from './use-switch-context.js';\n\nconst SwitchHiddenInput = forwardRef((props, ref) => {\n const switchContext = useSwitchContext();\n const mergedProps = mergeProps(switchContext.getHiddenInputProps(), props);\n const field = useFieldContext();\n return /* @__PURE__ */ jsx(ark.input, { \"aria-describedby\": field?.ariaDescribedby, ...mergedProps, ref });\n});\nSwitchHiddenInput.displayName = \"SwitchHiddenInput\";\n\nexport { SwitchHiddenInput };\n","'use client';\nimport { jsx } from 'react/jsx-runtime';\nimport { mergeProps } from '@zag-js/react';\nimport { forwardRef } from 'react';\nimport { ark } from '../factory.js';\nimport { useSwitchContext } from './use-switch-context.js';\n\nconst SwitchLabel = forwardRef((props, ref) => {\n const switchContext = useSwitchContext();\n const mergedProps = mergeProps(switchContext.getLabelProps(), props);\n return /* @__PURE__ */ jsx(ark.span, { ...mergedProps, ref });\n});\nSwitchLabel.displayName = \"SwitchLabel\";\n\nexport { SwitchLabel };\n","'use client';\nimport { useMachine, normalizeProps } from '@zag-js/react';\nimport * as zagSwitch from '@zag-js/switch';\nimport { useId } from 'react';\nimport { useEnvironmentContext } from '../../providers/environment/use-environment-context.js';\nimport { useLocaleContext } from '../../providers/locale/use-locale-context.js';\nimport { useFieldContext } from '../field/use-field-context.js';\n\nconst useSwitch = (props) => {\n const id = useId();\n const { getRootNode } = useEnvironmentContext();\n const { dir } = useLocaleContext();\n const field = useFieldContext();\n const machineProps = {\n id,\n ids: {\n label: field?.ids.label,\n hiddenInput: field?.ids.control\n },\n dir,\n disabled: field?.disabled,\n readOnly: field?.readOnly,\n invalid: field?.invalid,\n required: field?.required,\n getRootNode,\n ...props\n };\n const service = useMachine(zagSwitch.machine, machineProps);\n return zagSwitch.connect(service, normalizeProps);\n};\n\nexport { useSwitch };\n","'use client';\nimport { jsx } from 'react/jsx-runtime';\nimport { mergeProps } from '@zag-js/react';\nimport { forwardRef } from 'react';\nimport { createSplitProps } from '../../utils/create-split-props.js';\nimport { ark } from '../factory.js';\nimport { useSwitch } from './use-switch.js';\nimport { SwitchProvider } from './use-switch-context.js';\n\nconst SwitchRoot = forwardRef((props, ref) => {\n const [switchProps, localProps] = createSplitProps()(props, [\n \"checked\",\n \"defaultChecked\",\n \"disabled\",\n \"form\",\n \"id\",\n \"ids\",\n \"invalid\",\n \"label\",\n \"name\",\n \"onCheckedChange\",\n \"readOnly\",\n \"required\",\n \"value\"\n ]);\n const switchContext = useSwitch(switchProps);\n const mergedProps = mergeProps(switchContext.getRootProps(), localProps);\n return /* @__PURE__ */ jsx(SwitchProvider, { value: switchContext, children: /* @__PURE__ */ jsx(ark.label, { ...mergedProps, ref }) });\n});\nSwitchRoot.displayName = \"SwitchRoot\";\n\nexport { SwitchRoot };\n","'use client';\nimport { jsx } from 'react/jsx-runtime';\nimport { mergeProps } from '@zag-js/react';\nimport { forwardRef } from 'react';\nimport { createSplitProps } from '../../utils/create-split-props.js';\nimport { ark } from '../factory.js';\nimport { SwitchProvider } from './use-switch-context.js';\n\nconst SwitchRootProvider = forwardRef((props, ref) => {\n const [{ value: api }, localProps] = createSplitProps()(props, [\"value\"]);\n const mergedProps = mergeProps(api.getRootProps(), localProps);\n return /* @__PURE__ */ jsx(SwitchProvider, { value: api, children: /* @__PURE__ */ jsx(ark.label, { ...mergedProps, ref }) });\n});\nSwitchRootProvider.displayName = \"SwitchRootProvider\";\n\nexport { SwitchRootProvider };\n","'use client';\nimport { jsx } from 'react/jsx-runtime';\nimport { mergeProps } from '@zag-js/react';\nimport { forwardRef } from 'react';\nimport { ark } from '../factory.js';\nimport { useSwitchContext } from './use-switch-context.js';\n\nconst SwitchThumb = forwardRef((props, ref) => {\n const switchContext = useSwitchContext();\n const mergedProps = mergeProps(switchContext.getThumbProps(), props);\n return /* @__PURE__ */ jsx(ark.span, { ...mergedProps, ref });\n});\nSwitchThumb.displayName = \"SwitchThumb\";\n\nexport { SwitchThumb };\n","\"use strict\";\n\"use client\";\nimport { jsx } from 'react/jsx-runtime';\nimport { Switch, useSwitchContext } from '@ark-ui/react/switch';\nimport { forwardRef } from 'react';\nimport { dataAttr } from '../../utils/attr.js';\nimport { createSlotRecipeContext } from '../../styled-system/create-slot-recipe-context.js';\nimport { chakra } from '../../styled-system/factory.js';\n\nconst {\n withProvider,\n withContext,\n useStyles: useSwitchStyles,\n PropsProvider\n} = createSlotRecipeContext({ key: \"switch\" });\nconst SwitchRootProvider = withProvider(Switch.RootProvider, \"root\", { forwardAsChild: true });\nconst SwitchRoot = withProvider(\n Switch.Root,\n \"root\",\n { forwardAsChild: true }\n);\nconst SwitchPropsProvider = PropsProvider;\nconst SwitchLabel = withContext(\n Switch.Label,\n \"label\",\n { forwardAsChild: true }\n);\nconst SwitchThumb = withContext(\n Switch.Thumb,\n \"thumb\",\n { forwardAsChild: true }\n);\nconst SwitchControl = withContext(\n Switch.Control,\n \"control\",\n {\n forwardAsChild: true,\n defaultProps: { children: /* @__PURE__ */ jsx(SwitchThumb, {}) }\n }\n);\nconst SwitchIndicator = forwardRef(function SwitchIndicator2(props, ref) {\n const api = useSwitchContext();\n const styles = useSwitchStyles();\n const { fallback, children, ...rest } = props;\n return /* @__PURE__ */ jsx(\n chakra.span,\n {\n ref,\n \"data-checked\": dataAttr(api.checked),\n ...rest,\n css: [styles.indicator, props.css],\n children: api.checked ? children : fallback\n }\n );\n});\nconst SwitchThumbIndicator = forwardRef(function SwitchThumbIndicator2(props, ref) {\n const api = useSwitchContext();\n const { fallback, children, ...rest } = props;\n return /* @__PURE__ */ jsx(chakra.span, { ref, \"data-checked\": dataAttr(api.checked), ...rest, children: api.checked ? children : fallback });\n});\nconst SwitchContext = Switch.Context;\nconst SwitchHiddenInput = Switch.HiddenInput;\n\nexport { SwitchContext, SwitchControl, SwitchHiddenInput, SwitchIndicator, SwitchLabel, SwitchPropsProvider, SwitchRoot, SwitchRootProvider, SwitchThumb, SwitchThumbIndicator, useSwitchStyles };\n","import React, { ForwardedRef, useMemo } from \"react\";\nimport { Switch as CSwitch } from \"@chakra-ui/react/switch\";\nimport {\n withFormControl,\n WithFormControlProps,\n} from \"hocs/withFormControl/withFormControl\";\nimport { FormControlSize } from \"hocs/withFormControl/withFormControl.types\";\n\nexport interface SwitchProps\n extends WithFormControlProps,\n Omit<CSwitch.RootProps, \"label\" | \"onChange\"> {\n indeterminate?: boolean;\n switchRef?: ForwardedRef<HTMLLabelElement>;\n size?: FormControlSize;\n}\n\nconst Switch = withFormControl(\n ({\n children,\n indeterminate = false,\n onContrast,\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n label,\n size = \"md\",\n switchRef,\n ...rest\n }: SwitchProps): React.JSX.Element => {\n const _computedVariant = useMemo(() => {\n if (indeterminate) {\n return onContrast ? \"indeterminateOnContrast\" : \"indeterminate\";\n } else {\n return onContrast ? \"onContrast\" : \"default\";\n }\n }, [indeterminate, onContrast]);\n\n return (\n <CSwitch.Root\n className=\"Switch\"\n data-testid=\"kibble-switch\"\n ref={switchRef}\n size={size}\n variant={_computedVariant}\n {...rest}\n >\n <CSwitch.HiddenInput\n className=\"Switch_Input\"\n data-testid=\"kibble-switch-input\"\n />\n <CSwitch.Control\n className=\"Switch_Control\"\n data-testid=\"kibble-switch-control\"\n />\n {!!children && <CSwitch.Label>{children}</CSwitch.Label>}\n </CSwitch.Root>\n );\n },\n);\n\nconst WrappedSwitch = React.forwardRef(\n (props: SwitchProps, ref: ForwardedRef<HTMLLabelElement>) => (\n <Switch switchRef={ref} {...props} />\n ),\n);\n\nWrappedSwitch.displayName = \"Switch\";\n\nexport { WrappedSwitch as Switch };\n"],"names":["SwitchProvider","useSwitchContext","createContext","SwitchControl","forwardRef","props","ref","switchContext","mergedProps","mergeProps","jsx","ark","SwitchHiddenInput","field","useFieldContext","SwitchLabel","useSwitch","id","useId","getRootNode","useEnvironmentContext","dir","useLocaleContext","machineProps","service","useMachine","zagSwitch.machine","zagSwitch.connect","normalizeProps","SwitchRoot","switchProps","localProps","createSplitProps","SwitchRootProvider","api","SwitchThumb","withProvider","withContext","useSwitchStyles","createSlotRecipeContext","Switch.RootProvider","Switch.Root","Switch.Label","Switch.Thumb","Switch.Control","styles","fallback","children","rest","chakra","dataAttr","Switch.HiddenInput","Switch","withFormControl","indeterminate","onContrast","label","size","switchRef","_computedVariant","useMemo","jsxs","CSwitch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,1,2,3,4,5,6,7,8]}
|
|
1
|
+
{"version":3,"file":"switch.component-F106ejwM.js","sources":["../../node_modules/@ark-ui/react/dist/components/switch/use-switch-context.js","../../node_modules/@ark-ui/react/dist/components/switch/switch-control.js","../../node_modules/@ark-ui/react/dist/components/switch/switch-hidden-input.js","../../node_modules/@ark-ui/react/dist/components/switch/switch-label.js","../../node_modules/@ark-ui/react/dist/components/switch/use-switch.js","../../node_modules/@ark-ui/react/dist/components/switch/switch-root.js","../../node_modules/@ark-ui/react/dist/components/switch/switch-root-provider.js","../../node_modules/@ark-ui/react/dist/components/switch/switch-thumb.js","../../node_modules/@chakra-ui/react/dist/esm/components/switch/switch.js","../../src/components/Switch/switch.component.tsx"],"sourcesContent":["'use client';\nimport { createContext } from '../../utils/create-context.js';\n\nconst [SwitchProvider, useSwitchContext] = createContext({\n name: \"SwitchContext\",\n hookName: \"useSwitchContext\",\n providerName: \"<SwitchProvider />\"\n});\n\nexport { SwitchProvider, useSwitchContext };\n","'use client';\nimport { jsx } from 'react/jsx-runtime';\nimport { mergeProps } from '@zag-js/react';\nimport { forwardRef } from 'react';\nimport { ark } from '../factory.js';\nimport { useSwitchContext } from './use-switch-context.js';\n\nconst SwitchControl = forwardRef((props, ref) => {\n const switchContext = useSwitchContext();\n const mergedProps = mergeProps(switchContext.getControlProps(), props);\n return /* @__PURE__ */ jsx(ark.span, { ...mergedProps, ref });\n});\nSwitchControl.displayName = \"SwitchControl\";\n\nexport { SwitchControl };\n","'use client';\nimport { jsx } from 'react/jsx-runtime';\nimport { mergeProps } from '@zag-js/react';\nimport { forwardRef } from 'react';\nimport { ark } from '../factory.js';\nimport { useFieldContext } from '../field/use-field-context.js';\nimport { useSwitchContext } from './use-switch-context.js';\n\nconst SwitchHiddenInput = forwardRef((props, ref) => {\n const switchContext = useSwitchContext();\n const mergedProps = mergeProps(switchContext.getHiddenInputProps(), props);\n const field = useFieldContext();\n return /* @__PURE__ */ jsx(ark.input, { \"aria-describedby\": field?.ariaDescribedby, ...mergedProps, ref });\n});\nSwitchHiddenInput.displayName = \"SwitchHiddenInput\";\n\nexport { SwitchHiddenInput };\n","'use client';\nimport { jsx } from 'react/jsx-runtime';\nimport { mergeProps } from '@zag-js/react';\nimport { forwardRef } from 'react';\nimport { ark } from '../factory.js';\nimport { useSwitchContext } from './use-switch-context.js';\n\nconst SwitchLabel = forwardRef((props, ref) => {\n const switchContext = useSwitchContext();\n const mergedProps = mergeProps(switchContext.getLabelProps(), props);\n return /* @__PURE__ */ jsx(ark.span, { ...mergedProps, ref });\n});\nSwitchLabel.displayName = \"SwitchLabel\";\n\nexport { SwitchLabel };\n","'use client';\nimport { useMachine, normalizeProps } from '@zag-js/react';\nimport * as zagSwitch from '@zag-js/switch';\nimport { useId } from 'react';\nimport { useEnvironmentContext } from '../../providers/environment/use-environment-context.js';\nimport { useLocaleContext } from '../../providers/locale/use-locale-context.js';\nimport { useFieldContext } from '../field/use-field-context.js';\n\nconst useSwitch = (props) => {\n const id = useId();\n const { getRootNode } = useEnvironmentContext();\n const { dir } = useLocaleContext();\n const field = useFieldContext();\n const machineProps = {\n id,\n ids: {\n label: field?.ids.label,\n hiddenInput: field?.ids.control\n },\n dir,\n disabled: field?.disabled,\n readOnly: field?.readOnly,\n invalid: field?.invalid,\n required: field?.required,\n getRootNode,\n ...props\n };\n const service = useMachine(zagSwitch.machine, machineProps);\n return zagSwitch.connect(service, normalizeProps);\n};\n\nexport { useSwitch };\n","'use client';\nimport { jsx } from 'react/jsx-runtime';\nimport { mergeProps } from '@zag-js/react';\nimport { forwardRef } from 'react';\nimport { createSplitProps } from '../../utils/create-split-props.js';\nimport { ark } from '../factory.js';\nimport { useSwitch } from './use-switch.js';\nimport { SwitchProvider } from './use-switch-context.js';\n\nconst SwitchRoot = forwardRef((props, ref) => {\n const [switchProps, localProps] = createSplitProps()(props, [\n \"checked\",\n \"defaultChecked\",\n \"disabled\",\n \"form\",\n \"id\",\n \"ids\",\n \"invalid\",\n \"label\",\n \"name\",\n \"onCheckedChange\",\n \"readOnly\",\n \"required\",\n \"value\"\n ]);\n const switchContext = useSwitch(switchProps);\n const mergedProps = mergeProps(switchContext.getRootProps(), localProps);\n return /* @__PURE__ */ jsx(SwitchProvider, { value: switchContext, children: /* @__PURE__ */ jsx(ark.label, { ...mergedProps, ref }) });\n});\nSwitchRoot.displayName = \"SwitchRoot\";\n\nexport { SwitchRoot };\n","'use client';\nimport { jsx } from 'react/jsx-runtime';\nimport { mergeProps } from '@zag-js/react';\nimport { forwardRef } from 'react';\nimport { createSplitProps } from '../../utils/create-split-props.js';\nimport { ark } from '../factory.js';\nimport { SwitchProvider } from './use-switch-context.js';\n\nconst SwitchRootProvider = forwardRef((props, ref) => {\n const [{ value: api }, localProps] = createSplitProps()(props, [\"value\"]);\n const mergedProps = mergeProps(api.getRootProps(), localProps);\n return /* @__PURE__ */ jsx(SwitchProvider, { value: api, children: /* @__PURE__ */ jsx(ark.label, { ...mergedProps, ref }) });\n});\nSwitchRootProvider.displayName = \"SwitchRootProvider\";\n\nexport { SwitchRootProvider };\n","'use client';\nimport { jsx } from 'react/jsx-runtime';\nimport { mergeProps } from '@zag-js/react';\nimport { forwardRef } from 'react';\nimport { ark } from '../factory.js';\nimport { useSwitchContext } from './use-switch-context.js';\n\nconst SwitchThumb = forwardRef((props, ref) => {\n const switchContext = useSwitchContext();\n const mergedProps = mergeProps(switchContext.getThumbProps(), props);\n return /* @__PURE__ */ jsx(ark.span, { ...mergedProps, ref });\n});\nSwitchThumb.displayName = \"SwitchThumb\";\n\nexport { SwitchThumb };\n","\"use strict\";\n\"use client\";\nimport { jsx } from 'react/jsx-runtime';\nimport { Switch, useSwitchContext } from '@ark-ui/react/switch';\nimport { forwardRef } from 'react';\nimport { dataAttr } from '../../utils/attr.js';\nimport { createSlotRecipeContext } from '../../styled-system/create-slot-recipe-context.js';\nimport { chakra } from '../../styled-system/factory.js';\n\nconst {\n withProvider,\n withContext,\n useStyles: useSwitchStyles,\n PropsProvider\n} = createSlotRecipeContext({ key: \"switch\" });\nconst SwitchRootProvider = withProvider(Switch.RootProvider, \"root\", { forwardAsChild: true });\nconst SwitchRoot = withProvider(\n Switch.Root,\n \"root\",\n { forwardAsChild: true }\n);\nconst SwitchPropsProvider = PropsProvider;\nconst SwitchLabel = withContext(\n Switch.Label,\n \"label\",\n { forwardAsChild: true }\n);\nconst SwitchThumb = withContext(\n Switch.Thumb,\n \"thumb\",\n { forwardAsChild: true }\n);\nconst SwitchControl = withContext(\n Switch.Control,\n \"control\",\n {\n forwardAsChild: true,\n defaultProps: { children: /* @__PURE__ */ jsx(SwitchThumb, {}) }\n }\n);\nconst SwitchIndicator = forwardRef(function SwitchIndicator2(props, ref) {\n const api = useSwitchContext();\n const styles = useSwitchStyles();\n const { fallback, children, ...rest } = props;\n return /* @__PURE__ */ jsx(\n chakra.span,\n {\n ref,\n \"data-checked\": dataAttr(api.checked),\n ...rest,\n css: [styles.indicator, props.css],\n children: api.checked ? children : fallback\n }\n );\n});\nconst SwitchThumbIndicator = forwardRef(function SwitchThumbIndicator2(props, ref) {\n const api = useSwitchContext();\n const { fallback, children, ...rest } = props;\n return /* @__PURE__ */ jsx(chakra.span, { ref, \"data-checked\": dataAttr(api.checked), ...rest, children: api.checked ? children : fallback });\n});\nconst SwitchContext = Switch.Context;\nconst SwitchHiddenInput = Switch.HiddenInput;\n\nexport { SwitchContext, SwitchControl, SwitchHiddenInput, SwitchIndicator, SwitchLabel, SwitchPropsProvider, SwitchRoot, SwitchRootProvider, SwitchThumb, SwitchThumbIndicator, useSwitchStyles };\n","import React, { ForwardedRef, useMemo } from \"react\";\nimport { Switch as CSwitch } from \"@chakra-ui/react/switch\";\nimport {\n withFormControl,\n WithFormControlProps,\n} from \"hocs/withFormControl/withFormControl\";\nimport { FormControlSize } from \"hocs/withFormControl/withFormControl.types\";\n\nexport interface SwitchProps\n extends WithFormControlProps,\n Omit<CSwitch.RootProps, \"label\" | \"onChange\"> {\n indeterminate?: boolean;\n switchRef?: ForwardedRef<HTMLLabelElement>;\n size?: FormControlSize;\n}\n\nconst Switch = withFormControl(\n ({\n children,\n indeterminate = false,\n onContrast,\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n label,\n size = \"md\",\n switchRef,\n ...rest\n }: SwitchProps): React.JSX.Element => {\n const _computedVariant = useMemo(() => {\n if (indeterminate) {\n return onContrast ? \"indeterminateOnContrast\" : \"indeterminate\";\n } else {\n return onContrast ? \"onContrast\" : \"default\";\n }\n }, [indeterminate, onContrast]);\n\n return (\n <CSwitch.Root\n className=\"Switch\"\n data-testid=\"kibble-switch\"\n ref={switchRef}\n size={size}\n variant={_computedVariant}\n {...rest}\n >\n <CSwitch.HiddenInput\n className=\"Switch_Input\"\n data-testid=\"kibble-switch-input\"\n />\n <CSwitch.Control\n className=\"Switch_Control\"\n data-testid=\"kibble-switch-control\"\n />\n {!!children && <CSwitch.Label>{children}</CSwitch.Label>}\n </CSwitch.Root>\n );\n },\n);\n\nconst WrappedSwitch = React.forwardRef(\n (props: SwitchProps, ref: ForwardedRef<HTMLLabelElement>) => (\n <Switch switchRef={ref} {...props} />\n ),\n);\n\nWrappedSwitch.displayName = \"Switch\";\n\nexport { WrappedSwitch as Switch };\n"],"names":["SwitchProvider","useSwitchContext","createContext","SwitchControl","forwardRef","props","ref","switchContext","mergedProps","mergeProps","jsx","ark","SwitchHiddenInput","field","useFieldContext","SwitchLabel","useSwitch","id","useId","getRootNode","useEnvironmentContext","dir","useLocaleContext","machineProps","service","useMachine","zagSwitch.machine","zagSwitch.connect","normalizeProps","SwitchRoot","switchProps","localProps","createSplitProps","SwitchRootProvider","api","SwitchThumb","withProvider","withContext","useSwitchStyles","createSlotRecipeContext","Switch.RootProvider","Switch.Root","Switch.Label","Switch.Thumb","Switch.Control","styles","fallback","children","rest","chakra","dataAttr","Switch.HiddenInput","Switch","withFormControl","indeterminate","onContrast","label","size","switchRef","_computedVariant","useMemo","jsxs","CSwitch.Root","CSwitch.HiddenInput","CSwitch.Control","CSwitch.Label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