@televet/kibble-ui 4.0.0-beta.67 → 4.0.0-beta.69
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-B7BlPX2-.js → alert.types-BTwB1SOp.js} +11 -10
- package/dist/chunks/{alert.types-B7BlPX2-.js.map → alert.types-BTwB1SOp.js.map} +1 -1
- package/dist/chunks/alert.types-Cjh2MIRP.js +2 -0
- package/dist/chunks/{alert.types-BsvcbTZD.js.map → alert.types-Cjh2MIRP.js.map} +1 -1
- package/dist/chunks/attr-BMs6szZx.js +2 -0
- package/dist/chunks/attr-BMs6szZx.js.map +1 -0
- package/dist/chunks/attr-sm10PXOd.js +5 -0
- package/dist/chunks/attr-sm10PXOd.js.map +1 -0
- package/dist/chunks/{avatar.component-CB5m8zha.js → avatar.component-BnOmYhL2.js} +27 -27
- package/dist/chunks/{avatar.component-CB5m8zha.js.map → avatar.component-BnOmYhL2.js.map} +1 -1
- package/dist/chunks/avatar.component-CbtJE4RJ.js +2 -0
- package/dist/chunks/{avatar.component-RKtP3MZt.js.map → avatar.component-CbtJE4RJ.js.map} +1 -1
- package/dist/chunks/{avatarGroup.component-CKFjjo2R.js → avatarGroup.component-Bcb1Fxwv.js} +2 -2
- package/dist/chunks/{avatarGroup.component-CKFjjo2R.js.map → avatarGroup.component-Bcb1Fxwv.js.map} +1 -1
- package/dist/chunks/{avatarGroup.component-CjBeAxHZ.js → avatarGroup.component-D4lmT752.js} +2 -2
- package/dist/chunks/{avatarGroup.component-CjBeAxHZ.js.map → avatarGroup.component-D4lmT752.js.map} +1 -1
- package/dist/chunks/{button.component-DahLrK9h.js → button.component-BpF3MzbZ.js} +3 -3
- package/dist/chunks/{button.component-DahLrK9h.js.map → button.component-BpF3MzbZ.js.map} +1 -1
- package/dist/chunks/{button.component-BQA_MGYQ.js → button.component-Dd9AfGox.js} +2 -2
- package/dist/chunks/{button.component-BQA_MGYQ.js.map → button.component-Dd9AfGox.js.map} +1 -1
- package/dist/chunks/{buttonGroup.component-UKmJh2zn.js → buttonGroup.component-DzQFhbS7.js} +5 -5
- package/dist/chunks/{buttonGroup.component-UKmJh2zn.js.map → buttonGroup.component-DzQFhbS7.js.map} +1 -1
- package/dist/chunks/{buttonGroup.component-BI44nuxH.js → buttonGroup.component-aes3EERQ.js} +2 -2
- package/dist/chunks/{buttonGroup.component-BI44nuxH.js.map → buttonGroup.component-aes3EERQ.js.map} +1 -1
- package/dist/chunks/{characterCounter.component-xgc8P1mp.js → characterCounter.component-UgnBVIt2.js} +2 -2
- package/dist/chunks/{characterCounter.component-xgc8P1mp.js.map → characterCounter.component-UgnBVIt2.js.map} +1 -1
- package/dist/chunks/characterCounter.component-WGffeYNG.js +2 -0
- package/dist/chunks/{characterCounter.component-B8efVNy4.js.map → characterCounter.component-WGffeYNG.js.map} +1 -1
- package/dist/chunks/checkbox.component-BEP-GPhs.js +2 -0
- package/dist/chunks/{checkbox.component-DO9NDbmM.js.map → checkbox.component-BEP-GPhs.js.map} +1 -1
- package/dist/chunks/{checkbox.component-5GtlYTnJ.js → checkbox.component-C6lXKzXZ.js} +16 -16
- package/dist/chunks/{checkbox.component-5GtlYTnJ.js.map → checkbox.component-C6lXKzXZ.js.map} +1 -1
- package/dist/chunks/checkbox.records-CXszv_gF.js +2 -0
- package/dist/chunks/{checkbox.records-D7NUtCRR.js.map → checkbox.records-CXszv_gF.js.map} +1 -1
- package/dist/chunks/{checkbox.records-69wNHjsY.js → checkbox.records-Gz6DOO_0.js} +8 -8
- package/dist/chunks/{checkbox.records-69wNHjsY.js.map → checkbox.records-Gz6DOO_0.js.map} +1 -1
- package/dist/chunks/{checkboxGroup.component-C1sPgVro.js → checkboxGroup.component-Dc_r6mYN.js} +2 -2
- package/dist/chunks/{checkboxGroup.component-C1sPgVro.js.map → checkboxGroup.component-Dc_r6mYN.js.map} +1 -1
- package/dist/chunks/{checkboxGroup.component-Dq3jCGDU.js → checkboxGroup.component-DhXdSILq.js} +3 -3
- package/dist/chunks/{checkboxGroup.component-Dq3jCGDU.js.map → checkboxGroup.component-DhXdSILq.js.map} +1 -1
- package/dist/chunks/conversationCard.component-1OCCeSNc.js +2 -0
- package/dist/chunks/{conversationCard.component-qWYvoxVn.js.map → conversationCard.component-1OCCeSNc.js.map} +1 -1
- package/dist/chunks/{conversationCard.component-LpR5eSru.js → conversationCard.component-Eb3E-4jY.js} +20 -18
- package/dist/chunks/{conversationCard.component-LpR5eSru.js.map → conversationCard.component-Eb3E-4jY.js.map} +1 -1
- package/dist/chunks/{datePicker.component-DVR8Ech4.js → datePicker.component-CTbeLdvH.js} +87 -85
- package/dist/chunks/{datePicker.component-DVR8Ech4.js.map → datePicker.component-CTbeLdvH.js.map} +1 -1
- package/dist/chunks/datePicker.component-DvAwsX_7.js +15 -0
- package/dist/chunks/{datePicker.component-CLR0tErm.js.map → datePicker.component-DvAwsX_7.js.map} +1 -1
- package/dist/chunks/dialog-trigger-B5NK0lr-.js +2 -0
- package/dist/chunks/{dialog-trigger-JNnMRY13.js.map → dialog-trigger-B5NK0lr-.js.map} +1 -1
- package/dist/chunks/{dialog-trigger-C6rpz6Do.js → dialog-trigger-BPlPzPU-.js} +9 -9
- package/dist/chunks/{dialog-trigger-C6rpz6Do.js.map → dialog-trigger-BPlPzPU-.js.map} +1 -1
- package/dist/chunks/group-Cv7AQw1b.js +2 -0
- package/dist/chunks/{group-Dv1hO5IW.js.map → group-Cv7AQw1b.js.map} +1 -1
- package/dist/chunks/{group-DKypflCt.js → group-DPCVolOl.js} +2 -2
- package/dist/chunks/{group-DKypflCt.js.map → group-DPCVolOl.js.map} +1 -1
- package/dist/chunks/heading.component-DJaIpxi0.js +12 -0
- package/dist/chunks/heading.component-DJaIpxi0.js.map +1 -0
- package/dist/chunks/heading.component-lFK21HJl.js +2 -0
- package/dist/chunks/heading.component-lFK21HJl.js.map +1 -0
- package/dist/chunks/icon-button-DTZOklQ9.js +119 -0
- package/dist/chunks/icon-button-DTZOklQ9.js.map +1 -0
- package/dist/chunks/icon-button-DtjZ-SdQ.js +2 -0
- package/dist/chunks/icon-button-DtjZ-SdQ.js.map +1 -0
- package/dist/chunks/icon.component-C0e0UGBw.js +2 -0
- package/dist/chunks/icon.component-C0e0UGBw.js.map +1 -0
- package/dist/chunks/icon.component-DGNCL1Yc.js +42 -0
- package/dist/chunks/icon.component-DGNCL1Yc.js.map +1 -0
- package/dist/chunks/index-BBZxmcrY.js +2 -0
- package/dist/chunks/index-BBZxmcrY.js.map +1 -0
- package/dist/chunks/index-BDnnTdaJ.js +2 -0
- package/dist/chunks/{index-BiyIeWSg.js.map → index-BDnnTdaJ.js.map} +1 -1
- package/dist/chunks/index-BGwwyukg.js +2 -0
- package/dist/chunks/index-BGwwyukg.js.map +1 -0
- package/dist/chunks/index-BNYygzo-.js +376 -0
- package/dist/chunks/index-BNYygzo-.js.map +1 -0
- package/dist/chunks/index-BYf7SZUC.js +2 -0
- package/dist/chunks/{index-DeprNCOL.js.map → index-BYf7SZUC.js.map} +1 -1
- package/dist/chunks/{index-CxHMu1In.js → index-C2kxTsiE.js} +23 -21
- package/dist/chunks/{index-CxHMu1In.js.map → index-C2kxTsiE.js.map} +1 -1
- package/dist/chunks/index-COoMV9Mh.js +2 -0
- package/dist/chunks/{index-BpKhRg2I.js.map → index-COoMV9Mh.js.map} +1 -1
- package/dist/chunks/index-CYk-7wwG.js +1018 -0
- package/dist/chunks/index-CYk-7wwG.js.map +1 -0
- package/dist/chunks/index-CZ42b9rT.js +3 -0
- package/dist/chunks/index-CZ42b9rT.js.map +1 -0
- package/dist/chunks/index-CZz7hHWb.js +2 -0
- package/dist/chunks/index-CZz7hHWb.js.map +1 -0
- package/dist/chunks/{index-DRABh-Lp.js → index-CjNAJEk5.js} +106 -105
- package/dist/chunks/{index-DRABh-Lp.js.map → index-CjNAJEk5.js.map} +1 -1
- package/dist/chunks/{index-B9cDqm2a.js → index-Co91SHhW.js} +3 -3
- package/dist/chunks/{index-B9cDqm2a.js.map → index-Co91SHhW.js.map} +1 -1
- package/dist/chunks/index-D-rN7ETu.js +2 -0
- package/dist/chunks/{index-CmVbgcH8.js.map → index-D-rN7ETu.js.map} +1 -1
- package/dist/chunks/{index-BL1VW2oK.js → index-D9DU-5GF.js} +55 -54
- package/dist/chunks/{index-BL1VW2oK.js.map → index-D9DU-5GF.js.map} +1 -1
- package/dist/chunks/index-DUHFrLMI.js +389 -0
- package/dist/chunks/index-DUHFrLMI.js.map +1 -0
- package/dist/chunks/{index-Bn03tQNC.js → index-DcJZ8q0f.js} +20 -19
- package/dist/chunks/{index-Bn03tQNC.js.map → index-DcJZ8q0f.js.map} +1 -1
- package/dist/chunks/index-MlhL0PDC.js +2 -0
- package/dist/chunks/{index-CzzrUbmu.js.map → index-MlhL0PDC.js.map} +1 -1
- package/dist/chunks/{index-YfA5zlSf.js → index-S1uNQPZj.js} +5 -5
- package/dist/chunks/{index-YfA5zlSf.js.map → index-S1uNQPZj.js.map} +1 -1
- package/dist/chunks/index-UWtj4ULm.js +8 -0
- package/dist/chunks/{index-DFbSzgk8.js.map → index-UWtj4ULm.js.map} +1 -1
- package/dist/chunks/index-ZaGEDS_0.js +2 -0
- package/dist/chunks/{index-BDCLWoQU.js.map → index-ZaGEDS_0.js.map} +1 -1
- package/dist/chunks/index-j7W9Hyzx.js +322 -0
- package/dist/chunks/index-j7W9Hyzx.js.map +1 -0
- package/dist/chunks/{index-Ciu8P7c-.js → index-ryFIinh4.js} +7 -7
- package/dist/chunks/{index-Ciu8P7c-.js.map → index-ryFIinh4.js.map} +1 -1
- package/dist/chunks/{link.component-BQJI6gPi.js → link.component-CCFg-LIe.js} +2 -2
- package/dist/chunks/{link.component-BQJI6gPi.js.map → link.component-CCFg-LIe.js.map} +1 -1
- package/dist/chunks/{link.component-Cs05IsXP.js → link.component-DprieyUG.js} +2 -2
- package/dist/chunks/{link.component-Cs05IsXP.js.map → link.component-DprieyUG.js.map} +1 -1
- package/dist/chunks/{menu.component-CAr2xdZY.js → menu.component-CrRs7bHi.js} +28 -28
- package/dist/chunks/{menu.component-CAr2xdZY.js.map → menu.component-CrRs7bHi.js.map} +1 -1
- package/dist/chunks/menu.component-Ob_ob-5Z.js +2 -0
- package/dist/chunks/{menu.component-BgAx3SsR.js.map → menu.component-Ob_ob-5Z.js.map} +1 -1
- package/dist/chunks/modal.types-Bq8QqBuR.js +2 -0
- package/dist/chunks/{modal.types-CtHJAyfq.js.map → modal.types-Bq8QqBuR.js.map} +1 -1
- package/dist/chunks/{modal.types-B7PDc2GJ.js → modal.types-DCe2G-mT.js} +6 -6
- package/dist/chunks/{modal.types-B7PDc2GJ.js.map → modal.types-DCe2G-mT.js.map} +1 -1
- package/dist/chunks/{pinInput.types-TfkrphC7.js → pinInput.types-ChHs2RV-.js} +17 -17
- package/dist/chunks/{pinInput.types-TfkrphC7.js.map → pinInput.types-ChHs2RV-.js.map} +1 -1
- package/dist/chunks/pinInput.types-hI4GxH_1.js +2 -0
- package/dist/chunks/{pinInput.types-a0_2OLBO.js.map → pinInput.types-hI4GxH_1.js.map} +1 -1
- package/dist/chunks/popover-80QH8HEJ.js +2 -0
- package/dist/chunks/popover-80QH8HEJ.js.map +1 -0
- package/dist/chunks/popover-B9rNOU0g.js +110 -0
- package/dist/chunks/popover-B9rNOU0g.js.map +1 -0
- package/dist/chunks/popover-root-provider-CeLLpesI.js +43 -0
- package/dist/chunks/popover-root-provider-CeLLpesI.js.map +1 -0
- package/dist/chunks/popover-root-provider-DAMDDAHQ.js +2 -0
- package/dist/chunks/popover-root-provider-DAMDDAHQ.js.map +1 -0
- package/dist/chunks/popover.component-BIpq3zkh.js +322 -0
- package/dist/chunks/popover.component-BIpq3zkh.js.map +1 -0
- package/dist/chunks/popover.component-Dz0_vSF2.js +2 -0
- package/dist/chunks/popover.component-Dz0_vSF2.js.map +1 -0
- package/dist/chunks/popover.recipe--gMRcQTS.js +479 -0
- package/dist/chunks/popover.recipe--gMRcQTS.js.map +1 -0
- package/dist/chunks/popover.recipe-DLeyokHo.js +2 -0
- package/dist/chunks/popover.recipe-DLeyokHo.js.map +1 -0
- package/dist/chunks/radio.records-CAWibIHJ.js +2 -0
- package/dist/chunks/{radio.records-zKzNxtns.js.map → radio.records-CAWibIHJ.js.map} +1 -1
- package/dist/chunks/{radio.records-DBS_lqNe.js → radio.records-gz4RRw4x.js} +9 -9
- package/dist/chunks/{radio.records-DBS_lqNe.js.map → radio.records-gz4RRw4x.js.map} +1 -1
- package/dist/chunks/{radioGroup.component-DBLLIgCZ.js → radioGroup.component-wTDMlFMI.js} +17 -17
- package/dist/chunks/{radioGroup.component-DBLLIgCZ.js.map → radioGroup.component-wTDMlFMI.js.map} +1 -1
- package/dist/chunks/radioGroup.component-xCr6p4DS.js +2 -0
- package/dist/chunks/{radioGroup.component-fpo_KMOY.js.map → radioGroup.component-xCr6p4DS.js.map} +1 -1
- package/dist/chunks/{ratingDots.component-DG2nCpxT.js → ratingDots.component-DNeSgGRt.js} +5 -5
- package/dist/chunks/{ratingDots.component-DG2nCpxT.js.map → ratingDots.component-DNeSgGRt.js.map} +1 -1
- package/dist/chunks/ratingDots.component-DvlGbBPz.js +2 -0
- package/dist/chunks/{ratingDots.component-DJEDUD_9.js.map → ratingDots.component-DvlGbBPz.js.map} +1 -1
- package/dist/chunks/render-strategy-BmWbSgqh.js +2 -0
- package/dist/chunks/{render-strategy-C80bGq2n.js.map → render-strategy-BmWbSgqh.js.map} +1 -1
- package/dist/chunks/{render-strategy-DN75XQJB.js → render-strategy-C8hwN3bm.js} +2 -2
- package/dist/chunks/{render-strategy-DN75XQJB.js.map → render-strategy-C8hwN3bm.js.map} +1 -1
- package/dist/chunks/select.component-1__YvaFF.js +2 -0
- package/dist/chunks/{select.component-Bmop2_tX.js.map → select.component-1__YvaFF.js.map} +1 -1
- package/dist/chunks/{select.component-DyXwbDeO.js → select.component-DN5g4aQG.js} +46 -46
- package/dist/chunks/{select.component-DyXwbDeO.js.map → select.component-DN5g4aQG.js.map} +1 -1
- package/dist/chunks/{sortableList.component-CbZAQrKl.js → sortableList.component-DI2da4B_.js} +4 -4
- package/dist/chunks/{sortableList.component-CbZAQrKl.js.map → sortableList.component-DI2da4B_.js.map} +1 -1
- package/dist/chunks/{sortableList.component-b2t_K7ho.js → sortableList.component-U3Kci1Jk.js} +2 -2
- package/dist/chunks/{sortableList.component-b2t_K7ho.js.map → sortableList.component-U3Kci1Jk.js.map} +1 -1
- package/dist/chunks/spinner-BWqSIW6m.js +8 -0
- package/dist/chunks/spinner-BWqSIW6m.js.map +1 -0
- package/dist/chunks/spinner-BnpL14kK.js +2 -0
- package/dist/chunks/spinner-BnpL14kK.js.map +1 -0
- package/dist/chunks/{spinner.component-B1vU-FCd.js → spinner.component-DER6c5R6.js} +4 -4
- package/dist/chunks/{spinner.component-B1vU-FCd.js.map → spinner.component-DER6c5R6.js.map} +1 -1
- package/dist/chunks/spinner.component-DUIpnXU8.js +2 -0
- package/dist/chunks/{spinner.component-CjQb7JjK.js.map → spinner.component-DUIpnXU8.js.map} +1 -1
- package/dist/chunks/{styledAvatar.types-DstfmllC.js → styledAvatar.types-EGc1-I1N.js} +2 -2
- package/dist/chunks/{styledAvatar.types-DstfmllC.js.map → styledAvatar.types-EGc1-I1N.js.map} +1 -1
- package/dist/chunks/{styledAvatar.types-D8VWyELN.js → styledAvatar.types-HA5wRy7y.js} +2 -2
- package/dist/chunks/{styledAvatar.types-D8VWyELN.js.map → styledAvatar.types-HA5wRy7y.js.map} +1 -1
- package/dist/chunks/{switch.component-DO9fxk_-.js → switch.component-6TiuST9H.js} +22 -22
- package/dist/chunks/{switch.component-DO9fxk_-.js.map → switch.component-6TiuST9H.js.map} +1 -1
- package/dist/chunks/switch.component-BPS2pQZx.js +2 -0
- package/dist/chunks/{switch.component-ARZzuYrq.js.map → switch.component-BPS2pQZx.js.map} +1 -1
- package/dist/chunks/tabs.component-DnbHYXT-.js +2 -0
- package/dist/chunks/{tabs.component-DRpNF8p-.js.map → tabs.component-DnbHYXT-.js.map} +1 -1
- package/dist/chunks/{tabs.component-BWTDtLWN.js → tabs.component-RpmipiEe.js} +55 -55
- package/dist/chunks/{tabs.component-BWTDtLWN.js.map → tabs.component-RpmipiEe.js.map} +1 -1
- package/dist/chunks/{tagBlock.component-C3BrjwNJ.js → tagBlock.component-C-CNF4In.js} +17 -16
- package/dist/chunks/{tagBlock.component-C3BrjwNJ.js.map → tagBlock.component-C-CNF4In.js.map} +1 -1
- package/dist/chunks/tagBlock.component-DgmTLlRz.js +2 -0
- package/dist/chunks/{tagBlock.component-Bahf1v33.js.map → tagBlock.component-DgmTLlRz.js.map} +1 -1
- package/dist/chunks/text.component-BGUHMpKP.js +12 -0
- package/dist/chunks/text.component-BGUHMpKP.js.map +1 -0
- package/dist/chunks/text.component-BJ5u8GVO.js +2 -0
- package/dist/chunks/text.component-BJ5u8GVO.js.map +1 -0
- package/dist/chunks/{textInput.component-LPGbDHwZ.js → textInput.component-B2S0GcHU.js} +14 -14
- package/dist/chunks/{textInput.component-LPGbDHwZ.js.map → textInput.component-B2S0GcHU.js.map} +1 -1
- package/dist/chunks/textInput.component-D1L2qv1M.js +2 -0
- package/dist/chunks/{textInput.component-DDo9eUvp.js.map → textInput.component-D1L2qv1M.js.map} +1 -1
- package/dist/chunks/textarea.component-BEgF2Yny.js +2 -0
- package/dist/chunks/{textarea.component-5Ou5g_MJ.js.map → textarea.component-BEgF2Yny.js.map} +1 -1
- package/dist/chunks/{textarea.component-ClYqhTJX.js → textarea.component-DB51bevU.js} +12 -12
- package/dist/chunks/{textarea.component-ClYqhTJX.js.map → textarea.component-DB51bevU.js.map} +1 -1
- package/dist/chunks/{theme.provider-vZgSb-q5.js → theme.provider-Dez6uepg.js} +1900 -2011
- package/dist/chunks/theme.provider-Dez6uepg.js.map +1 -0
- package/dist/chunks/theme.provider-u0ofgWRM.js +26 -0
- package/dist/chunks/theme.provider-u0ofgWRM.js.map +1 -0
- package/dist/chunks/{timePicker.component-AgnrqtFu.js → timePicker.component-DsQUV8fR.js} +4 -4
- package/dist/chunks/{timePicker.component-AgnrqtFu.js.map → timePicker.component-DsQUV8fR.js.map} +1 -1
- package/dist/chunks/{timePicker.component-Bx0fHgrN.js → timePicker.component-av1t2G-i.js} +2 -2
- package/dist/chunks/{timePicker.component-Bx0fHgrN.js.map → timePicker.component-av1t2G-i.js.map} +1 -1
- package/dist/chunks/{timeRange.component-B3Nv-nLB.js → timeRange.component-B7syLsrU.js} +2 -2
- package/dist/chunks/{timeRange.component-B3Nv-nLB.js.map → timeRange.component-B7syLsrU.js.map} +1 -1
- package/dist/chunks/{timeRange.component-C14RiUcS.js → timeRange.component-bIQZJ4MP.js} +2 -2
- package/dist/chunks/{timeRange.component-C14RiUcS.js.map → timeRange.component-bIQZJ4MP.js.map} +1 -1
- package/dist/chunks/timestamp.component-CNlZ6Jw2.js +2 -0
- package/dist/chunks/{timestamp.component-DEx0cUkA.js.map → timestamp.component-CNlZ6Jw2.js.map} +1 -1
- package/dist/chunks/timestamp.component-ZcL8FlD-.js +54 -0
- package/dist/chunks/{timestamp.component-Kxi_bKp1.js.map → timestamp.component-ZcL8FlD-.js.map} +1 -1
- package/dist/chunks/{toaster.records-CKeu_PyD.js → toaster.records-BGfpUOVt.js} +22 -21
- package/dist/chunks/{toaster.records-CKeu_PyD.js.map → toaster.records-BGfpUOVt.js.map} +1 -1
- package/dist/chunks/toaster.records-BJo0j1IZ.js +2 -0
- package/dist/chunks/{toaster.records-CGym-iT-.js.map → toaster.records-BJo0j1IZ.js.map} +1 -1
- package/dist/chunks/tooltip.component-B4S3qwsH.js +2 -0
- package/dist/chunks/tooltip.component-B4S3qwsH.js.map +1 -0
- package/dist/chunks/tooltip.component-OLohVRIH.js +755 -0
- package/dist/chunks/tooltip.component-OLohVRIH.js.map +1 -0
- package/dist/chunks/{icon.component-D84o075X.js → typography-Cqrokog3.js} +6 -43
- package/dist/chunks/typography-Cqrokog3.js.map +1 -0
- package/dist/chunks/typography-CtiaGoJG.js +2 -0
- package/dist/chunks/typography-CtiaGoJG.js.map +1 -0
- package/dist/chunks/{typography.records-BeoK0Uyj.js → typography.records-C6G_65b4.js} +2 -2
- package/dist/chunks/{typography.records-BeoK0Uyj.js.map → typography.records-C6G_65b4.js.map} +1 -1
- package/dist/chunks/{typography.records-XkUlmiSk.js → typography.records-jnjWfTLS.js} +2 -2
- package/dist/chunks/{typography.records-XkUlmiSk.js.map → typography.records-jnjWfTLS.js.map} +1 -1
- package/dist/chunks/use-field-context--wBJQY1R.js +2 -0
- package/dist/chunks/{use-field-context-DnTe9gdc.js.map → use-field-context--wBJQY1R.js.map} +1 -1
- package/dist/chunks/{use-field-context-1gfMkjvo.js → use-field-context-B_G7Yziz.js} +2 -2
- package/dist/chunks/{use-field-context-1gfMkjvo.js.map → use-field-context-B_G7Yziz.js.map} +1 -1
- package/dist/chunks/use-locale-context-BdqHZ8L8.js +22 -0
- package/dist/chunks/use-locale-context-BdqHZ8L8.js.map +1 -0
- package/dist/chunks/use-locale-context-D-agiW5E.js +2301 -0
- package/dist/chunks/use-locale-context-D-agiW5E.js.map +1 -0
- package/dist/chunks/{withFormControl-DfqMqkSU.js → withFormControl-DIT4DbIl.js} +39 -39
- package/dist/chunks/{withFormControl-DfqMqkSU.js.map → withFormControl-DIT4DbIl.js.map} +1 -1
- package/dist/chunks/withFormControl-DzgoWpP6.js +2 -0
- package/dist/chunks/{withFormControl-kyGjRFza.js.map → withFormControl-DzgoWpP6.js.map} +1 -1
- package/dist/chunks/withTruncation-CVhXtaaF.js +67 -0
- package/dist/chunks/withTruncation-CVhXtaaF.js.map +1 -0
- package/dist/chunks/withTruncation-CYH02HoE.js +2 -0
- package/dist/chunks/withTruncation-CYH02HoE.js.map +1 -0
- package/dist/cjs/chakra/index.cjs +1 -1
- package/dist/cjs/chakra/index.cjs.map +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/Button/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/Icon/index.cjs +1 -1
- package/dist/cjs/components/Link/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 +147 -146
- package/dist/esm/chakra/index.js.map +1 -1
- 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/Button/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/Icon/index.js +1 -1
- package/dist/esm/components/Link/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 +2 -2
- 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 +92 -89
- package/dist/esm/components/index.js.map +1 -1
- package/dist/esm/index.js +114 -111
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/theme/index.js +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/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 +2 -4
- package/dist/types/components/Tooltip/tooltip.recipe.d.ts +1 -0
- package/dist/types/theme/tokens/shadows/shadows.config.d.ts +3 -3
- package/dist/types/theme/tokens/zIndices/zIndices.config.d.ts +8 -8
- package/package.json +1 -1
- package/dist/chunks/alert.types-BsvcbTZD.js +0 -2
- package/dist/chunks/avatar.component-RKtP3MZt.js +0 -2
- package/dist/chunks/characterCounter.component-B8efVNy4.js +0 -2
- package/dist/chunks/checkbox.component-DO9NDbmM.js +0 -2
- package/dist/chunks/checkbox.records-D7NUtCRR.js +0 -2
- package/dist/chunks/conversationCard.component-qWYvoxVn.js +0 -2
- package/dist/chunks/datePicker.component-CLR0tErm.js +0 -15
- package/dist/chunks/dialog-trigger-JNnMRY13.js +0 -2
- package/dist/chunks/group-Dv1hO5IW.js +0 -2
- package/dist/chunks/heading.component-DkT5GYvU.js +0 -2
- package/dist/chunks/heading.component-DkT5GYvU.js.map +0 -1
- package/dist/chunks/heading.component-d5jKnwm5.js +0 -976
- package/dist/chunks/heading.component-d5jKnwm5.js.map +0 -1
- package/dist/chunks/icon-button-BTDZq0Tr.js +0 -121
- package/dist/chunks/icon-button-BTDZq0Tr.js.map +0 -1
- package/dist/chunks/icon-button-khcu437F.js +0 -2
- package/dist/chunks/icon-button-khcu437F.js.map +0 -1
- package/dist/chunks/icon.component-D84o075X.js.map +0 -1
- package/dist/chunks/icon.component-DjiNNeqF.js +0 -2
- package/dist/chunks/icon.component-DjiNNeqF.js.map +0 -1
- package/dist/chunks/index-BDCLWoQU.js +0 -2
- package/dist/chunks/index-BIjZoyJk.js +0 -70
- package/dist/chunks/index-BIjZoyJk.js.map +0 -1
- package/dist/chunks/index-BiyIeWSg.js +0 -2
- package/dist/chunks/index-BlGAWSIX.js +0 -3
- package/dist/chunks/index-BlGAWSIX.js.map +0 -1
- package/dist/chunks/index-BpKhRg2I.js +0 -2
- package/dist/chunks/index-Cb49D-ky.js +0 -1328
- package/dist/chunks/index-Cb49D-ky.js.map +0 -1
- package/dist/chunks/index-CmVbgcH8.js +0 -2
- package/dist/chunks/index-CzzrUbmu.js +0 -2
- package/dist/chunks/index-DFbSzgk8.js +0 -8
- package/dist/chunks/index-DeprNCOL.js +0 -2
- package/dist/chunks/index-Fztcdoo_.js +0 -2
- package/dist/chunks/index-Fztcdoo_.js.map +0 -1
- package/dist/chunks/menu.component-BgAx3SsR.js +0 -2
- package/dist/chunks/modal.context-DSKLfsJK.js +0 -12
- package/dist/chunks/modal.context-DSKLfsJK.js.map +0 -1
- package/dist/chunks/modal.context-EJ67QNzq.js +0 -2
- package/dist/chunks/modal.context-EJ67QNzq.js.map +0 -1
- package/dist/chunks/modal.types-CtHJAyfq.js +0 -2
- package/dist/chunks/pinInput.types-a0_2OLBO.js +0 -2
- package/dist/chunks/portal-CtkZ5xTm.js +0 -3087
- package/dist/chunks/portal-CtkZ5xTm.js.map +0 -1
- package/dist/chunks/portal-kmAjRmaV.js +0 -22
- package/dist/chunks/portal-kmAjRmaV.js.map +0 -1
- package/dist/chunks/radio.records-zKzNxtns.js +0 -2
- package/dist/chunks/radioGroup.component-fpo_KMOY.js +0 -2
- package/dist/chunks/ratingDots.component-DJEDUD_9.js +0 -2
- package/dist/chunks/render-strategy-C80bGq2n.js +0 -2
- package/dist/chunks/select.component-Bmop2_tX.js +0 -2
- package/dist/chunks/spinner.component-CjQb7JjK.js +0 -2
- package/dist/chunks/switch.component-ARZzuYrq.js +0 -2
- package/dist/chunks/tabs.component-DRpNF8p-.js +0 -2
- package/dist/chunks/tagBlock.component-Bahf1v33.js +0 -2
- package/dist/chunks/textInput.component-DDo9eUvp.js +0 -2
- package/dist/chunks/textarea.component-5Ou5g_MJ.js +0 -2
- package/dist/chunks/theme.provider-DWJTtjw5.js +0 -26
- package/dist/chunks/theme.provider-DWJTtjw5.js.map +0 -1
- package/dist/chunks/theme.provider-vZgSb-q5.js.map +0 -1
- package/dist/chunks/timestamp.component-DEx0cUkA.js +0 -2
- package/dist/chunks/timestamp.component-Kxi_bKp1.js +0 -53
- package/dist/chunks/toaster.records-CGym-iT-.js +0 -2
- package/dist/chunks/use-field-context-DnTe9gdc.js +0 -2
- package/dist/chunks/withFormControl-kyGjRFza.js +0 -2
package/dist/chunks/{textInput.component-LPGbDHwZ.js.map → textInput.component-B2S0GcHU.js.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"textInput.component-LPGbDHwZ.js","sources":["../../node_modules/@ark-ui/react/dist/components/field/field-input.js","../../node_modules/@chakra-ui/react/dist/esm/components/input/input.js","../../node_modules/@chakra-ui/react/dist/esm/components/input/input-addon.js","../../node_modules/@chakra-ui/react/dist/esm/components/input/input-element.js","../../node_modules/@chakra-ui/react/dist/esm/components/input/input-group.js","../../src/components/TextInput/textInput.records.ts","../../src/components/TextInput/textInput.component.tsx"],"sourcesContent":["'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 './use-field-context.js';\n\nconst FieldInput = forwardRef((props, ref) => {\n const field = useFieldContext();\n const mergedProps = mergeProps(field?.getInputProps(), props);\n return /* @__PURE__ */ jsx(ark.input, { ...mergedProps, ref });\n});\nFieldInput.displayName = \"FieldInput\";\n\nexport { FieldInput };\n","\"use strict\";\n\"use client\";\nimport { Field } from '@ark-ui/react/field';\nimport { createRecipeContext } from '../../styled-system/create-recipe-context.js';\n\nconst { withContext, PropsProvider } = createRecipeContext({\n key: \"input\"\n});\nconst Input = withContext(Field.Input);\nconst InputPropsProvider = PropsProvider;\n\nexport { Input, InputPropsProvider };\n","\"use strict\";\n\"use client\";\nimport { jsx } from 'react/jsx-runtime';\nimport { forwardRef } from 'react';\nimport { EMPTY_SLOT_STYLES } from '../../styled-system/empty.js';\nimport { chakra } from '../../styled-system/factory.js';\nimport { useRecipe } from '../../styled-system/use-recipe.js';\n\nconst InputAddon = forwardRef(\n function InputAddon2({ unstyled, ...props }, ref) {\n const recipe = useRecipe({ key: \"inputAddon\", recipe: props.recipe });\n const [variantProps, localProps] = recipe.splitVariantProps(props);\n const styles = unstyled ? EMPTY_SLOT_STYLES : recipe(variantProps);\n return /* @__PURE__ */ jsx(chakra.div, { ref, ...localProps, css: [styles, props.css] });\n }\n);\n\nexport { InputAddon };\n","\"use strict\";\n\"use client\";\nimport { chakra } from '../../styled-system/factory.js';\n\nconst InputElement = chakra(\"div\", {\n base: {\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n position: \"absolute\",\n zIndex: 2,\n color: \"fg.muted\",\n height: \"full\",\n fontSize: \"sm\",\n px: \"3\"\n },\n variants: {\n placement: {\n start: {\n insetInlineStart: \"0\"\n },\n end: {\n insetInlineEnd: \"0\"\n }\n }\n }\n});\n\nexport { InputElement };\n","\"use strict\";\n\"use client\";\nimport { jsxs, jsx } from 'react/jsx-runtime';\nimport { forwardRef, Children, cloneElement } from 'react';\nimport { InputAddon } from './input-addon.js';\nimport { InputElement } from './input-element.js';\nimport { Group } from '../group/group.js';\n\nconst InputGroup = forwardRef(\n function InputGroup2(props, ref) {\n const {\n startElement,\n startElementProps,\n endElement,\n endElementProps,\n startAddon,\n startAddonProps,\n endAddon,\n endAddonProps,\n children,\n startOffset = \"0px\",\n endOffset = \"0px\",\n ...rest\n } = props;\n const child = Children.only(children);\n const attached = Boolean(startAddon || endAddon);\n return /* @__PURE__ */ jsxs(\n Group,\n {\n width: \"full\",\n ref,\n attached,\n skip: (el) => el.type === InputElement,\n ...rest,\n children: [\n startAddon && /* @__PURE__ */ jsx(InputAddon, { ...startAddonProps, children: startAddon }),\n startElement && /* @__PURE__ */ jsx(InputElement, { pointerEvents: \"none\", ...startElementProps, children: startElement }),\n cloneElement(child, {\n ...startElement && {\n ps: `calc(var(--input-height) - ${startOffset})`\n },\n ...endElement && { pe: `calc(var(--input-height) - ${endOffset})` },\n ...children.props\n }),\n endElement && /* @__PURE__ */ jsx(InputElement, { placement: \"end\", ...endElementProps, children: endElement }),\n endAddon && /* @__PURE__ */ jsx(InputAddon, { ...endAddonProps, children: endAddon })\n ]\n }\n );\n }\n);\n\nexport { InputGroup };\n","import { ButtonSize } from \"components/Button/button.types\";\nimport { FormControlSize } from \"hocs/withFormControl/withFormControl.types\";\n\nexport const closeButtonSizeMap: Record<FormControlSize, ButtonSize> = {\n sm: \"xs\",\n md: \"sm\",\n lg: \"md\",\n};\n","import React, { ForwardedRef, useMemo } from \"react\";\nimport { Box } from \"@chakra-ui/react/box\";\nimport {\n withFormControl,\n WithFormControlProps,\n} from \"hocs/withFormControl/withFormControl\";\nimport {\n Input as CInput,\n InputProps as CInputProps,\n InputGroup,\n} from \"@chakra-ui/react/input\";\nimport { FormControlSize } from \"hocs/withFormControl/withFormControl.types\";\nimport { Button } from \"components/Button/button.component\";\nimport { CharacterCounter } from \"components/CharacterCounter/characterCounter.component\";\nimport { closeButtonSizeMap } from \"./textInput.records\";\n\nexport interface TextInputBaseProps extends WithFormControlProps {\n charLimit?: number;\n inputRef?: ForwardedRef<HTMLInputElement>;\n onContrast?: boolean;\n leftAddon?: React.ReactNode;\n leftElement?: React.ReactNode;\n rightAddon?: React.ReactNode;\n rightElement?: React.ReactNode;\n size?: FormControlSize;\n}\n\nexport interface DefaultTextInputProps extends TextInputBaseProps {\n clearable?: never;\n onClear?: never;\n}\n\nexport interface ClearableTextInputProps extends TextInputBaseProps {\n clearable?: boolean;\n onClear?: (val: string | number | readonly string[]) => void;\n}\n\nexport type KTextInputProps = DefaultTextInputProps | ClearableTextInputProps;\n\nexport type TextInputProps = KTextInputProps & CInputProps;\n\nconst TextInput = withFormControl(\n ({\n charLimit = undefined,\n clearable = false,\n disabled = false,\n inputRef,\n invalid,\n leftAddon,\n leftElement,\n onClear,\n onContrast,\n rightAddon,\n rightElement,\n size = \"md\",\n value,\n ...rest\n }: TextInputProps): React.JSX.Element => {\n const handleClear = (): void => {\n if (onClear) {\n onClear(value || \"\");\n }\n };\n\n if (clearable && !!value && !disabled) {\n rightElement = (\n <Button\n className=\"TextInput__ClearButton\"\n data-testid=\"kibble-text-input-clear-button\"\n size={closeButtonSizeMap[size as FormControlSize]}\n variant=\"ghostNeutral\"\n onClick={handleClear}\n iconName=\"close\"\n />\n );\n }\n\n const currentCharCount = useMemo(\n () => value?.toString()?.length || 0,\n [value],\n );\n\n return (\n <Box className=\"TextInput__Wrapper\" position=\"relative\" w=\"100%\">\n <InputGroup\n className=\"TextInput__InputGroup\"\n data-testid=\"kibble-text-input-group\"\n startElement={leftElement}\n startElementProps={{\n color: \"inherit\",\n _groupDisabled: { opacity: 0.6 },\n }}\n endElement={rightElement}\n endElementProps={{\n color: \"inherit\",\n paddingInline: 1.5,\n _groupDisabled: { opacity: 0.6 },\n }}\n startAddon={leftAddon}\n endAddon={rightAddon}\n >\n <CInput\n data-testid=\"kibble-text-input\"\n className=\"TextInput\"\n ref={inputRef}\n value={value}\n size={size}\n disabled={disabled}\n {...(invalid && { \"aria-invalid\": true })}\n variant={onContrast ? \"onContrast\" : \"default\"}\n {...rest}\n />\n </InputGroup>\n {!!charLimit && (\n <CharacterCounter\n withLimit={true}\n limit={charLimit}\n currentCount={currentCharCount}\n />\n )}\n </Box>\n );\n },\n);\n\nconst WrappedTextInput = React.forwardRef(\n (props: TextInputProps, ref: ForwardedRef<HTMLInputElement>) => (\n <TextInput inputRef={ref} {...props} />\n ),\n);\n\nWrappedTextInput.displayName = \"TextInput\";\n\nexport { WrappedTextInput as TextInput };\n"],"names":["FieldInput","forwardRef","props","ref","field","useFieldContext","mergedProps","mergeProps","jsx","ark","withContext","createRecipeContext","Input","Field.Input","InputAddon","unstyled","recipe","useRecipe","variantProps","localProps","styles","EMPTY_SLOT_STYLES","chakra","InputElement","InputGroup","startElement","startElementProps","endElement","endElementProps","startAddon","startAddonProps","endAddon","endAddonProps","children","startOffset","endOffset","rest","child","Children","attached","jsxs","Group","el","cloneElement","closeButtonSizeMap","TextInput","withFormControl","charLimit","clearable","disabled","inputRef","invalid","leftAddon","leftElement","onClear","onContrast","rightAddon","rightElement","size","value","handleClear","Button","currentCharCount","useMemo","Box","CInput","CharacterCounter","WrappedTextInput","React"],"mappings":";;;;;;;;;;;;;;AAOA,MAAMA,IAAaC,EAAW,CAACC,GAAOC,MAAQ;AAC5C,QAAMC,IAAQC,EAAiB,GACzBC,IAAcC,EAAWH,GAAO,cAAa,GAAIF,CAAK;AAC5D,SAAuBM,gBAAAA,EAAAA,IAAIC,EAAI,OAAO,EAAE,GAAGH,GAAa,KAAAH,GAAK;AAC/D,CAAC;AACDH,EAAW,cAAc;ACPzB,MAAM,EAAE,aAAAU,EAA2B,IAAIC,EAAoB;AAAA,EACzD,KAAK;AACP,CAAC,GACKC,IAAQF,EAAYG,CAAW,GCA/BC,IAAab;AAAA,EACjB,SAAqB,EAAE,UAAAc,GAAU,GAAGb,EAAK,GAAIC,GAAK;AAChD,UAAMa,IAASC,EAAU,EAAE,KAAK,cAAc,QAAQf,EAAM,QAAQ,GAC9D,CAACgB,GAAcC,CAAU,IAAIH,EAAO,kBAAkBd,CAAK,GAC3DkB,IAASL,IAAWM,IAAoBL,EAAOE,CAAY;AACjE,WAAuBV,gBAAAA,MAAIc,EAAO,KAAK,EAAE,KAAAnB,GAAK,GAAGgB,GAAY,KAAK,CAACC,GAAQlB,EAAM,GAAG,EAAC,CAAE;AAAA,EAC3F;AACA,GCXMqB,IAAeD,EAAO,OAAO;AAAA,EACjC,MAAM;AAAA,IACJ,SAAS;AAAA,IACT,YAAY;AAAA,IACZ,gBAAgB;AAAA,IAChB,UAAU;AAAA,IACV,QAAQ;AAAA,IACR,OAAO;AAAA,IACP,QAAQ;AAAA,IACR,UAAU;AAAA,IACV,IAAI;AAAA,EACL;AAAA,EACD,UAAU;AAAA,IACR,WAAW;AAAA,MACT,OAAO;AAAA,QACL,kBAAkB;AAAA,MACnB;AAAA,MACD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ACjC;AAAA,UACA,YAAYL;AAAA,UACZ,UAAUI;AAAA,UAEV,UAAAhD,gBAAAA,EAAA;AAAA,YAACyD;AAAAA,YAAA;AAAA,cACC,eAAY;AAAA,cACZ,WAAU;AAAA,cACV,KAAKf;AAAA,cACL,OAAAS;AAAA,cACA,MAAAD;AAAA,cACA,UAAAT;AAAA,cACC,GAAIE,KAAW,EAAE,gBAAgB,GAAK;AAAA,cACvC,SAASI,IAAa,eAAe;AAAA,cACpC,GAAGnB;AAAA,YAAA;AAAA,UAAA;AAAA,QACN;AAAA,MACF;AAAA,MACC,CAAC,CAACW,KACDvC,gBAAAA,EAAA;AAAA,QAAC0D;AAAA,QAAA;AAAA,UACC,WAAW;AAAA,UACX,OAAOnB;AAAA,UACP,cAAce;AAAA,QAAA;AAAA,MAAA;AAAA,IAChB,GAEJ;AAAA,EAAA;AAGN,GAEMK,IAAmBC,EAAM;AAAA,EAC7B,CAAClE,GAAuBC,MACtBK,gBAAAA,MAACqC,KAAU,UAAU1C,GAAM,GAAGD,EAAO,CAAA;AAEzC;AAEAiE,EAAiB,cAAc;","x_google_ignoreList":[0,1,2,3,4]}
|
|
1
|
+
{"version":3,"file":"textInput.component-B2S0GcHU.js","sources":["../../node_modules/@ark-ui/react/dist/components/field/field-input.js","../../node_modules/@chakra-ui/react/dist/esm/components/input/input.js","../../node_modules/@chakra-ui/react/dist/esm/components/input/input-addon.js","../../node_modules/@chakra-ui/react/dist/esm/components/input/input-element.js","../../node_modules/@chakra-ui/react/dist/esm/components/input/input-group.js","../../src/components/TextInput/textInput.records.ts","../../src/components/TextInput/textInput.component.tsx"],"sourcesContent":["'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 './use-field-context.js';\n\nconst FieldInput = forwardRef((props, ref) => {\n const field = useFieldContext();\n const mergedProps = mergeProps(field?.getInputProps(), props);\n return /* @__PURE__ */ jsx(ark.input, { ...mergedProps, ref });\n});\nFieldInput.displayName = \"FieldInput\";\n\nexport { FieldInput };\n","\"use strict\";\n\"use client\";\nimport { Field } from '@ark-ui/react/field';\nimport { createRecipeContext } from '../../styled-system/create-recipe-context.js';\n\nconst { withContext, PropsProvider } = createRecipeContext({\n key: \"input\"\n});\nconst Input = withContext(Field.Input);\nconst InputPropsProvider = PropsProvider;\n\nexport { Input, InputPropsProvider };\n","\"use strict\";\n\"use client\";\nimport { jsx } from 'react/jsx-runtime';\nimport { forwardRef } from 'react';\nimport { EMPTY_SLOT_STYLES } from '../../styled-system/empty.js';\nimport { chakra } from '../../styled-system/factory.js';\nimport { useRecipe } from '../../styled-system/use-recipe.js';\n\nconst InputAddon = forwardRef(\n function InputAddon2({ unstyled, ...props }, ref) {\n const recipe = useRecipe({ key: \"inputAddon\", recipe: props.recipe });\n const [variantProps, localProps] = recipe.splitVariantProps(props);\n const styles = unstyled ? EMPTY_SLOT_STYLES : recipe(variantProps);\n return /* @__PURE__ */ jsx(chakra.div, { ref, ...localProps, css: [styles, props.css] });\n }\n);\n\nexport { InputAddon };\n","\"use strict\";\n\"use client\";\nimport { chakra } from '../../styled-system/factory.js';\n\nconst InputElement = chakra(\"div\", {\n base: {\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n position: \"absolute\",\n zIndex: 2,\n color: \"fg.muted\",\n height: \"full\",\n fontSize: \"sm\",\n px: \"3\"\n },\n variants: {\n placement: {\n start: {\n insetInlineStart: \"0\"\n },\n end: {\n insetInlineEnd: \"0\"\n }\n }\n }\n});\n\nexport { InputElement };\n","\"use strict\";\n\"use client\";\nimport { jsxs, jsx } from 'react/jsx-runtime';\nimport { forwardRef, Children, cloneElement } from 'react';\nimport { InputAddon } from './input-addon.js';\nimport { InputElement } from './input-element.js';\nimport { Group } from '../group/group.js';\n\nconst InputGroup = forwardRef(\n function InputGroup2(props, ref) {\n const {\n startElement,\n startElementProps,\n endElement,\n endElementProps,\n startAddon,\n startAddonProps,\n endAddon,\n endAddonProps,\n children,\n startOffset = \"0px\",\n endOffset = \"0px\",\n ...rest\n } = props;\n const child = Children.only(children);\n const attached = Boolean(startAddon || endAddon);\n return /* @__PURE__ */ jsxs(\n Group,\n {\n width: \"full\",\n ref,\n attached,\n skip: (el) => el.type === InputElement,\n ...rest,\n children: [\n startAddon && /* @__PURE__ */ jsx(InputAddon, { ...startAddonProps, children: startAddon }),\n startElement && /* @__PURE__ */ jsx(InputElement, { pointerEvents: \"none\", ...startElementProps, children: startElement }),\n cloneElement(child, {\n ...startElement && {\n ps: `calc(var(--input-height) - ${startOffset})`\n },\n ...endElement && { pe: `calc(var(--input-height) - ${endOffset})` },\n ...children.props\n }),\n endElement && /* @__PURE__ */ jsx(InputElement, { placement: \"end\", ...endElementProps, children: endElement }),\n endAddon && /* @__PURE__ */ jsx(InputAddon, { ...endAddonProps, children: endAddon })\n ]\n }\n );\n }\n);\n\nexport { InputGroup };\n","import { ButtonSize } from \"components/Button/button.types\";\nimport { FormControlSize } from \"hocs/withFormControl/withFormControl.types\";\n\nexport const closeButtonSizeMap: Record<FormControlSize, ButtonSize> = {\n sm: \"xs\",\n md: \"sm\",\n lg: \"md\",\n};\n","import React, { ForwardedRef, useMemo } from \"react\";\nimport { Box } from \"@chakra-ui/react/box\";\nimport {\n withFormControl,\n WithFormControlProps,\n} from \"hocs/withFormControl/withFormControl\";\nimport {\n Input as CInput,\n InputProps as CInputProps,\n InputGroup,\n} from \"@chakra-ui/react/input\";\nimport { FormControlSize } from \"hocs/withFormControl/withFormControl.types\";\nimport { Button } from \"components/Button/button.component\";\nimport { CharacterCounter } from \"components/CharacterCounter/characterCounter.component\";\nimport { closeButtonSizeMap } from \"./textInput.records\";\n\nexport interface TextInputBaseProps extends WithFormControlProps {\n charLimit?: number;\n inputRef?: ForwardedRef<HTMLInputElement>;\n onContrast?: boolean;\n leftAddon?: React.ReactNode;\n leftElement?: React.ReactNode;\n rightAddon?: React.ReactNode;\n rightElement?: React.ReactNode;\n size?: FormControlSize;\n}\n\nexport interface DefaultTextInputProps extends TextInputBaseProps {\n clearable?: never;\n onClear?: never;\n}\n\nexport interface ClearableTextInputProps extends TextInputBaseProps {\n clearable?: boolean;\n onClear?: (val: string | number | readonly string[]) => void;\n}\n\nexport type KTextInputProps = DefaultTextInputProps | ClearableTextInputProps;\n\nexport type TextInputProps = KTextInputProps & CInputProps;\n\nconst TextInput = withFormControl(\n ({\n charLimit = undefined,\n clearable = false,\n disabled = false,\n inputRef,\n invalid,\n leftAddon,\n leftElement,\n onClear,\n onContrast,\n rightAddon,\n rightElement,\n size = \"md\",\n value,\n ...rest\n }: TextInputProps): React.JSX.Element => {\n const handleClear = (): void => {\n if (onClear) {\n onClear(value || \"\");\n }\n };\n\n if (clearable && !!value && !disabled) {\n rightElement = (\n <Button\n className=\"TextInput__ClearButton\"\n data-testid=\"kibble-text-input-clear-button\"\n size={closeButtonSizeMap[size as FormControlSize]}\n variant=\"ghostNeutral\"\n onClick={handleClear}\n iconName=\"close\"\n />\n );\n }\n\n const currentCharCount = useMemo(\n () => value?.toString()?.length || 0,\n [value],\n );\n\n return (\n <Box className=\"TextInput__Wrapper\" position=\"relative\" w=\"100%\">\n <InputGroup\n className=\"TextInput__InputGroup\"\n data-testid=\"kibble-text-input-group\"\n startElement={leftElement}\n startElementProps={{\n color: \"inherit\",\n _groupDisabled: { opacity: 0.6 },\n }}\n endElement={rightElement}\n endElementProps={{\n color: \"inherit\",\n paddingInline: 1.5,\n _groupDisabled: { opacity: 0.6 },\n }}\n startAddon={leftAddon}\n endAddon={rightAddon}\n >\n <CInput\n data-testid=\"kibble-text-input\"\n className=\"TextInput\"\n ref={inputRef}\n value={value}\n size={size}\n disabled={disabled}\n {...(invalid && { \"aria-invalid\": true })}\n variant={onContrast ? \"onContrast\" : \"default\"}\n {...rest}\n />\n </InputGroup>\n {!!charLimit && (\n <CharacterCounter\n withLimit={true}\n limit={charLimit}\n currentCount={currentCharCount}\n />\n )}\n </Box>\n );\n },\n);\n\nconst WrappedTextInput = React.forwardRef(\n (props: TextInputProps, ref: ForwardedRef<HTMLInputElement>) => (\n <TextInput inputRef={ref} {...props} />\n ),\n);\n\nWrappedTextInput.displayName = \"TextInput\";\n\nexport { WrappedTextInput as TextInput };\n"],"names":["FieldInput","forwardRef","props","ref","field","useFieldContext","mergedProps","mergeProps","jsx","ark","withContext","createRecipeContext","Input","Field.Input","InputAddon","unstyled","recipe","useRecipe","variantProps","localProps","styles","EMPTY_SLOT_STYLES","chakra","InputElement","InputGroup","startElement","startElementProps","endElement","endElementProps","startAddon","startAddonProps","endAddon","endAddonProps","children","startOffset","endOffset","rest","child","Children","attached","jsxs","Group","el","cloneElement","closeButtonSizeMap","TextInput","withFormControl","charLimit","clearable","disabled","inputRef","invalid","leftAddon","leftElement","onClear","onContrast","rightAddon","rightElement","size","value","handleClear","Button","currentCharCount","useMemo","Box","CInput","CharacterCounter","WrappedTextInput","React"],"mappings":";;;;;;;;;;;;;;AAOA,MAAMA,IAAaC,EAAW,CAACC,GAAOC,MAAQ;AAC5C,QAAMC,IAAQC,EAAiB,GACzBC,IAAcC,EAAWH,GAAO,cAAa,GAAIF,CAAK;AAC5D,SAAuBM,gBAAAA,EAAAA,IAAIC,EAAI,OAAO,EAAE,GAAGH,GAAa,KAAAH,GAAK;AAC/D,CAAC;AACDH,EAAW,cAAc;ACPzB,MAAM,EAAE,aAAAU,EAA2B,IAAIC,EAAoB;AAAA,EACzD,KAAK;AACP,CAAC,GACKC,IAAQF,EAAYG,CAAW,GCA/BC,IAAab;AAAA,EACjB,SAAqB,EAAE,UAAAc,GAAU,GAAGb,EAAK,GAAIC,GAAK;AAChD,UAAMa,IAASC,EAAU,EAAE,KAAK,cAAc,QAAQf,EAAM,QAAQ,GAC9D,CAACgB,GAAcC,CAAU,IAAIH,EAAO,kBAAkBd,CAAK,GAC3DkB,IAASL,IAAWM,IAAoBL,EAAOE,CAAY;AACjE,WAAuBV,gBAAAA,MAAIc,EAAO,KAAK,EAAE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A,CAAK;AAAA,IACR;AAEA,kCACGK,GAAI,EAAA,WAAU,sBAAqB,UAAS,YAAW,GAAE,QACxD,UAAA;AAAA,MAAAxD,gBAAAA,EAAA;AAAA,QAACgB;AAAA,QAAA;AAAA,UACC,WAAU;AAAA,UACV,eAAY;AAAA,UACZ,cAAc6B;AAAA,UACd,mBAAmB;AAAA,YACjB,OAAO;AAAA,YACP,gBAAgB,EAAE,SAAS,IAAI;AAAA,UACjC;AAAA,UACA,YAAYI;AAAA,UACZ,iBAAiB;AAAA,YACf,OAAO;AAAA,YACP,eAAe;AAAA,YACf,gBAAgB,EAAE,SAAS,IAAI;AAAA,UACjC;AAAA,UACA,YAAYL;AAAA,UACZ,UAAUI;AAAA,UAEV,UAAAhD,gBAAAA,EAAA;AAAA,YAACyD;AAAAA,YAAA;AAAA,cACC,eAAY;AAAA,cACZ,WAAU;AAAA,cACV,KAAKf;AAAA,cACL,OAAAS;AAAA,cACA,MAAAD;AAAA,cACA,UAAAT;AAAA,cACC,GAAIE,KAAW,EAAE,gBAAgB,GAAK;AAAA,cACvC,SAASI,IAAa,eAAe;AAAA,cACpC,GAAGnB;AAAA,YAAA;AAAA,UAAA;AAAA,QACN;AAAA,MACF;AAAA,MACC,CAAC,CAACW,KACDvC,gBAAAA,EAAA;AAAA,QAAC0D;AAAA,QAAA;AAAA,UACC,WAAW;AAAA,UACX,OAAOnB;AAAA,UACP,cAAce;AAAA,QAAA;AAAA,MAAA;AAAA,IAChB,GAEJ;AAAA,EAAA;AAGN,GAEMK,IAAmBC,EAAM;AAAA,EAC7B,CAAClE,GAAuBC,MACtBK,gBAAAA,MAACqC,KAAU,UAAU1C,GAAM,GAAGD,EAAO,CAAA;AAEzC;AAEAiE,EAAiB,cAAc;","x_google_ignoreList":[0,1,2,3,4]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";const e=require("./jsx-runtime-BjDatQAs.js"),c=require("react"),y=require("./withFormControl-DzgoWpP6.js"),P=require("./button.component-Dd9AfGox.js"),b=require("./characterCounter.component-WGffeYNG.js"),T=require("./box-Baq7UBls.js"),k=require("./empty-B5_AO6Pg.js"),I=require("./factory-D6tdBUPG.js"),w=require("./use-recipe-DaPWl_pL.js"),A=require("./group-Cv7AQw1b.js"),v=require("./create-recipe-context-sESms8Eo.js"),N=require("./use-locale-context-BdqHZ8L8.js"),S=require("./use-field-context--wBJQY1R.js"),F=require("./index-CZ42b9rT.js"),B=t=>t&&t.__esModule?t:{default:t},G=B(c),C=c.forwardRef((t,s)=>{const n=S.useFieldContext(),r=F.mergeProps(n?.getInputProps(),t);return e.jsxRuntimeExports.jsx(N.ark.input,{...r,ref:s})});C.displayName="FieldInput";const{withContext:M}=v.createRecipeContext({key:"input"}),z=M(C),R=c.forwardRef(function({unstyled:s,...n},r){const p=w.useRecipe({key:"inputAddon",recipe:n.recipe}),[i,a]=p.splitVariantProps(n),o=s?k.EMPTY_SLOT_STYLES:p(i);return e.jsxRuntimeExports.jsx(I.chakra.div,{ref:r,...a,css:[o,n.css]})}),E=I.chakra("div",{base:{display:"flex",alignItems:"center",justifyContent:"center",position:"absolute",zIndex:2,color:"fg.muted",height:"full",fontSize:"sm",px:"3"},variants:{placement:{start:{insetInlineStart:"0"},end:{insetInlineEnd:"0"}}}}),D=c.forwardRef(function(s,n){const{startElement:r,startElementProps:p,endElement:i,endElementProps:a,startAddon:o,startAddonProps:m,endAddon:d,endAddonProps:x,children:l,startOffset:u="0px",endOffset:f="0px",...h}=s,j=c.Children.only(l),g=!!(o||d);return e.jsxRuntimeExports.jsxs(A.Group,{width:"full",ref:n,attached:g,skip:q=>q.type===E,...h,children:[o&&e.jsxRuntimeExports.jsx(R,{...m,children:o}),r&&e.jsxRuntimeExports.jsx(E,{pointerEvents:"none",...p,children:r}),c.cloneElement(j,{...r&&{ps:`calc(var(--input-height) - ${u})`},...i&&{pe:`calc(var(--input-height) - ${f})`},...l.props}),i&&e.jsxRuntimeExports.jsx(E,{placement:"end",...a,children:i}),d&&e.jsxRuntimeExports.jsx(R,{...x,children:d})]})}),L={sm:"xs",md:"sm",lg:"md"},O=y.withFormControl(({charLimit:t=void 0,clearable:s=!1,disabled:n=!1,inputRef:r,invalid:p,leftAddon:i,leftElement:a,onClear:o,onContrast:m,rightAddon:d,rightElement:x,size:l="md",value:u,...f})=>{const h=()=>{o&&o(u||"")};s&&u&&!n&&(x=e.jsxRuntimeExports.jsx(P.Button,{className:"TextInput__ClearButton","data-testid":"kibble-text-input-clear-button",size:L[l],variant:"ghostNeutral",onClick:h,iconName:"close"}));const j=c.useMemo(()=>u?.toString()?.length||0,[u]);return e.jsxRuntimeExports.jsxs(T.Box,{className:"TextInput__Wrapper",position:"relative",w:"100%",children:[e.jsxRuntimeExports.jsx(D,{className:"TextInput__InputGroup","data-testid":"kibble-text-input-group",startElement:a,startElementProps:{color:"inherit",_groupDisabled:{opacity:.6}},endElement:x,endElementProps:{color:"inherit",paddingInline:1.5,_groupDisabled:{opacity:.6}},startAddon:i,endAddon:d,children:e.jsxRuntimeExports.jsx(z,{"data-testid":"kibble-text-input",className:"TextInput",ref:r,value:u,size:l,disabled:n,...p&&{"aria-invalid":!0},variant:m?"onContrast":"default",...f})}),!!t&&e.jsxRuntimeExports.jsx(b.CharacterCounter,{withLimit:!0,limit:t,currentCount:j})]})}),_=G.default.forwardRef((t,s)=>e.jsxRuntimeExports.jsx(O,{inputRef:s,...t}));_.displayName="TextInput";exports.WrappedTextInput=_;
|
|
2
|
+
//# sourceMappingURL=textInput.component-D1L2qv1M.js.map
|
package/dist/chunks/{textInput.component-DDo9eUvp.js.map → textInput.component-D1L2qv1M.js.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"textInput.component-DDo9eUvp.js","sources":["../../node_modules/@ark-ui/react/dist/components/field/field-input.js","../../node_modules/@chakra-ui/react/dist/esm/components/input/input.js","../../node_modules/@chakra-ui/react/dist/esm/components/input/input-addon.js","../../node_modules/@chakra-ui/react/dist/esm/components/input/input-element.js","../../node_modules/@chakra-ui/react/dist/esm/components/input/input-group.js","../../src/components/TextInput/textInput.records.ts","../../src/components/TextInput/textInput.component.tsx"],"sourcesContent":["'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 './use-field-context.js';\n\nconst FieldInput = forwardRef((props, ref) => {\n const field = useFieldContext();\n const mergedProps = mergeProps(field?.getInputProps(), props);\n return /* @__PURE__ */ jsx(ark.input, { ...mergedProps, ref });\n});\nFieldInput.displayName = \"FieldInput\";\n\nexport { FieldInput };\n","\"use strict\";\n\"use client\";\nimport { Field } from '@ark-ui/react/field';\nimport { createRecipeContext } from '../../styled-system/create-recipe-context.js';\n\nconst { withContext, PropsProvider } = createRecipeContext({\n key: \"input\"\n});\nconst Input = withContext(Field.Input);\nconst InputPropsProvider = PropsProvider;\n\nexport { Input, InputPropsProvider };\n","\"use strict\";\n\"use client\";\nimport { jsx } from 'react/jsx-runtime';\nimport { forwardRef } from 'react';\nimport { EMPTY_SLOT_STYLES } from '../../styled-system/empty.js';\nimport { chakra } from '../../styled-system/factory.js';\nimport { useRecipe } from '../../styled-system/use-recipe.js';\n\nconst InputAddon = forwardRef(\n function InputAddon2({ unstyled, ...props }, ref) {\n const recipe = useRecipe({ key: \"inputAddon\", recipe: props.recipe });\n const [variantProps, localProps] = recipe.splitVariantProps(props);\n const styles = unstyled ? EMPTY_SLOT_STYLES : recipe(variantProps);\n return /* @__PURE__ */ jsx(chakra.div, { ref, ...localProps, css: [styles, props.css] });\n }\n);\n\nexport { InputAddon };\n","\"use strict\";\n\"use client\";\nimport { chakra } from '../../styled-system/factory.js';\n\nconst InputElement = chakra(\"div\", {\n base: {\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n position: \"absolute\",\n zIndex: 2,\n color: \"fg.muted\",\n height: \"full\",\n fontSize: \"sm\",\n px: \"3\"\n },\n variants: {\n placement: {\n start: {\n insetInlineStart: \"0\"\n },\n end: {\n insetInlineEnd: \"0\"\n }\n }\n }\n});\n\nexport { InputElement };\n","\"use strict\";\n\"use client\";\nimport { jsxs, jsx } from 'react/jsx-runtime';\nimport { forwardRef, Children, cloneElement } from 'react';\nimport { InputAddon } from './input-addon.js';\nimport { InputElement } from './input-element.js';\nimport { Group } from '../group/group.js';\n\nconst InputGroup = forwardRef(\n function InputGroup2(props, ref) {\n const {\n startElement,\n startElementProps,\n endElement,\n endElementProps,\n startAddon,\n startAddonProps,\n endAddon,\n endAddonProps,\n children,\n startOffset = \"0px\",\n endOffset = \"0px\",\n ...rest\n } = props;\n const child = Children.only(children);\n const attached = Boolean(startAddon || endAddon);\n return /* @__PURE__ */ jsxs(\n Group,\n {\n width: \"full\",\n ref,\n attached,\n skip: (el) => el.type === InputElement,\n ...rest,\n children: [\n startAddon && /* @__PURE__ */ jsx(InputAddon, { ...startAddonProps, children: startAddon }),\n startElement && /* @__PURE__ */ jsx(InputElement, { pointerEvents: \"none\", ...startElementProps, children: startElement }),\n cloneElement(child, {\n ...startElement && {\n ps: `calc(var(--input-height) - ${startOffset})`\n },\n ...endElement && { pe: `calc(var(--input-height) - ${endOffset})` },\n ...children.props\n }),\n endElement && /* @__PURE__ */ jsx(InputElement, { placement: \"end\", ...endElementProps, children: endElement }),\n endAddon && /* @__PURE__ */ jsx(InputAddon, { ...endAddonProps, children: endAddon })\n ]\n }\n );\n }\n);\n\nexport { InputGroup };\n","import { ButtonSize } from \"components/Button/button.types\";\nimport { FormControlSize } from \"hocs/withFormControl/withFormControl.types\";\n\nexport const closeButtonSizeMap: Record<FormControlSize, ButtonSize> = {\n sm: \"xs\",\n md: \"sm\",\n lg: \"md\",\n};\n","import React, { ForwardedRef, useMemo } from \"react\";\nimport { Box } from \"@chakra-ui/react/box\";\nimport {\n withFormControl,\n WithFormControlProps,\n} from \"hocs/withFormControl/withFormControl\";\nimport {\n Input as CInput,\n InputProps as CInputProps,\n InputGroup,\n} from \"@chakra-ui/react/input\";\nimport { FormControlSize } from \"hocs/withFormControl/withFormControl.types\";\nimport { Button } from \"components/Button/button.component\";\nimport { CharacterCounter } from \"components/CharacterCounter/characterCounter.component\";\nimport { closeButtonSizeMap } from \"./textInput.records\";\n\nexport interface TextInputBaseProps extends WithFormControlProps {\n charLimit?: number;\n inputRef?: ForwardedRef<HTMLInputElement>;\n onContrast?: boolean;\n leftAddon?: React.ReactNode;\n leftElement?: React.ReactNode;\n rightAddon?: React.ReactNode;\n rightElement?: React.ReactNode;\n size?: FormControlSize;\n}\n\nexport interface DefaultTextInputProps extends TextInputBaseProps {\n clearable?: never;\n onClear?: never;\n}\n\nexport interface ClearableTextInputProps extends TextInputBaseProps {\n clearable?: boolean;\n onClear?: (val: string | number | readonly string[]) => void;\n}\n\nexport type KTextInputProps = DefaultTextInputProps | ClearableTextInputProps;\n\nexport type TextInputProps = KTextInputProps & CInputProps;\n\nconst TextInput = withFormControl(\n ({\n charLimit = undefined,\n clearable = false,\n disabled = false,\n inputRef,\n invalid,\n leftAddon,\n leftElement,\n onClear,\n onContrast,\n rightAddon,\n rightElement,\n size = \"md\",\n value,\n ...rest\n }: TextInputProps): React.JSX.Element => {\n const handleClear = (): void => {\n if (onClear) {\n onClear(value || \"\");\n }\n };\n\n if (clearable && !!value && !disabled) {\n rightElement = (\n <Button\n className=\"TextInput__ClearButton\"\n data-testid=\"kibble-text-input-clear-button\"\n size={closeButtonSizeMap[size as FormControlSize]}\n variant=\"ghostNeutral\"\n onClick={handleClear}\n iconName=\"close\"\n />\n );\n }\n\n const currentCharCount = useMemo(\n () => value?.toString()?.length || 0,\n [value],\n );\n\n return (\n <Box className=\"TextInput__Wrapper\" position=\"relative\" w=\"100%\">\n <InputGroup\n className=\"TextInput__InputGroup\"\n data-testid=\"kibble-text-input-group\"\n startElement={leftElement}\n startElementProps={{\n color: \"inherit\",\n _groupDisabled: { opacity: 0.6 },\n }}\n endElement={rightElement}\n endElementProps={{\n color: \"inherit\",\n paddingInline: 1.5,\n _groupDisabled: { opacity: 0.6 },\n }}\n startAddon={leftAddon}\n endAddon={rightAddon}\n >\n <CInput\n data-testid=\"kibble-text-input\"\n className=\"TextInput\"\n ref={inputRef}\n value={value}\n size={size}\n disabled={disabled}\n {...(invalid && { \"aria-invalid\": true })}\n variant={onContrast ? \"onContrast\" : \"default\"}\n {...rest}\n />\n </InputGroup>\n {!!charLimit && (\n <CharacterCounter\n withLimit={true}\n limit={charLimit}\n currentCount={currentCharCount}\n />\n )}\n </Box>\n );\n },\n);\n\nconst WrappedTextInput = React.forwardRef(\n (props: TextInputProps, ref: ForwardedRef<HTMLInputElement>) => (\n <TextInput inputRef={ref} {...props} />\n ),\n);\n\nWrappedTextInput.displayName = \"TextInput\";\n\nexport { WrappedTextInput as TextInput };\n"],"names":["FieldInput","forwardRef","props","ref","field","useFieldContext","mergedProps","mergeProps","jsx","ark","withContext","createRecipeContext","Input","Field.Input","InputAddon","unstyled","recipe","useRecipe","variantProps","localProps","styles","EMPTY_SLOT_STYLES","chakra","InputElement","InputGroup","startElement","startElementProps","endElement","endElementProps","startAddon","startAddonProps","endAddon","endAddonProps","children","startOffset","endOffset","rest","child","Children","attached","jsxs","Group","el","cloneElement","closeButtonSizeMap","TextInput","withFormControl","charLimit","clearable","disabled","inputRef","invalid","leftAddon","leftElement","onClear","onContrast","rightAddon","rightElement","size","value","handleClear","Button","currentCharCount","useMemo","Box","CInput","CharacterCounter","WrappedTextInput","React"],"mappings":"+kBAOMA,EAAaC,EAAU,WAAC,CAACC,EAAOC,IAAQ,CAC5C,MAAMC,EAAQC,EAAAA,gBAAiB,EACzBC,EAAcC,EAAU,WAACH,GAAO,cAAa,EAAIF,CAAK,EAC5D,OAAuBM,EAAAA,kBAAAA,IAAIC,EAAAA,IAAI,MAAO,CAAE,GAAGH,EAAa,IAAAH,EAAK,CAC/D,CAAC,EACDH,EAAW,YAAc,aCPzB,KAAM,CAAE,YAAAU,CAA2B,EAAIC,sBAAoB,CACzD,IAAK,OACP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ACP,eAAgB,CAAE,QAAS,EAAI,CACjC,EACA,WAAYI,EACZ,gBAAiB,CACf,MAAO,UACP,cAAe,IACf,eAAgB,CAAE,QAAS,EAAI,CACjC,EACA,WAAYL,EACZ,SAAUI,EAEV,SAAAhD,EAAA,kBAAA,IAACyD,EAAA,CACC,cAAY,oBACZ,UAAU,YACV,IAAKf,EACL,MAAAS,EACA,KAAAD,EACA,SAAAT,EACC,GAAIE,GAAW,CAAE,eAAgB,EAAK,EACvC,QAASI,EAAa,aAAe,UACpC,GAAGnB,CAAA,CAAA,CACN,CACF,EACC,CAAC,CAACW,GACDvC,EAAA,kBAAA,IAAC0D,EAAA,iBAAA,CACC,UAAW,GACX,MAAOnB,EACP,aAAce,CAAA,CAAA,CAChB,EAEJ,CAAA,CAGN,EAEMK,EAAmBC,EAAM,QAAA,WAC7B,CAAClE,EAAuBC,IACtBK,wBAACqC,GAAU,SAAU1C,EAAM,GAAGD,CAAO,CAAA,CAEzC,EAEAiE,EAAiB,YAAc","x_google_ignoreList":[0,1,2,3,4]}
|
|
1
|
+
{"version":3,"file":"textInput.component-D1L2qv1M.js","sources":["../../node_modules/@ark-ui/react/dist/components/field/field-input.js","../../node_modules/@chakra-ui/react/dist/esm/components/input/input.js","../../node_modules/@chakra-ui/react/dist/esm/components/input/input-addon.js","../../node_modules/@chakra-ui/react/dist/esm/components/input/input-element.js","../../node_modules/@chakra-ui/react/dist/esm/components/input/input-group.js","../../src/components/TextInput/textInput.records.ts","../../src/components/TextInput/textInput.component.tsx"],"sourcesContent":["'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 './use-field-context.js';\n\nconst FieldInput = forwardRef((props, ref) => {\n const field = useFieldContext();\n const mergedProps = mergeProps(field?.getInputProps(), props);\n return /* @__PURE__ */ jsx(ark.input, { ...mergedProps, ref });\n});\nFieldInput.displayName = \"FieldInput\";\n\nexport { FieldInput };\n","\"use strict\";\n\"use client\";\nimport { Field } from '@ark-ui/react/field';\nimport { createRecipeContext } from '../../styled-system/create-recipe-context.js';\n\nconst { withContext, PropsProvider } = createRecipeContext({\n key: \"input\"\n});\nconst Input = withContext(Field.Input);\nconst InputPropsProvider = PropsProvider;\n\nexport { Input, InputPropsProvider };\n","\"use strict\";\n\"use client\";\nimport { jsx } from 'react/jsx-runtime';\nimport { forwardRef } from 'react';\nimport { EMPTY_SLOT_STYLES } from '../../styled-system/empty.js';\nimport { chakra } from '../../styled-system/factory.js';\nimport { useRecipe } from '../../styled-system/use-recipe.js';\n\nconst InputAddon = forwardRef(\n function InputAddon2({ unstyled, ...props }, ref) {\n const recipe = useRecipe({ key: \"inputAddon\", recipe: props.recipe });\n const [variantProps, localProps] = recipe.splitVariantProps(props);\n const styles = unstyled ? EMPTY_SLOT_STYLES : recipe(variantProps);\n return /* @__PURE__ */ jsx(chakra.div, { ref, ...localProps, css: [styles, props.css] });\n }\n);\n\nexport { InputAddon };\n","\"use strict\";\n\"use client\";\nimport { chakra } from '../../styled-system/factory.js';\n\nconst InputElement = chakra(\"div\", {\n base: {\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n position: \"absolute\",\n zIndex: 2,\n color: \"fg.muted\",\n height: \"full\",\n fontSize: \"sm\",\n px: \"3\"\n },\n variants: {\n placement: {\n start: {\n insetInlineStart: \"0\"\n },\n end: {\n insetInlineEnd: \"0\"\n }\n }\n }\n});\n\nexport { InputElement };\n","\"use strict\";\n\"use client\";\nimport { jsxs, jsx } from 'react/jsx-runtime';\nimport { forwardRef, Children, cloneElement } from 'react';\nimport { InputAddon } from './input-addon.js';\nimport { InputElement } from './input-element.js';\nimport { Group } from '../group/group.js';\n\nconst InputGroup = forwardRef(\n function InputGroup2(props, ref) {\n const {\n startElement,\n startElementProps,\n endElement,\n endElementProps,\n startAddon,\n startAddonProps,\n endAddon,\n endAddonProps,\n children,\n startOffset = \"0px\",\n endOffset = \"0px\",\n ...rest\n } = props;\n const child = Children.only(children);\n const attached = Boolean(startAddon || endAddon);\n return /* @__PURE__ */ jsxs(\n Group,\n {\n width: \"full\",\n ref,\n attached,\n skip: (el) => el.type === InputElement,\n ...rest,\n children: [\n startAddon && /* @__PURE__ */ jsx(InputAddon, { ...startAddonProps, children: startAddon }),\n startElement && /* @__PURE__ */ jsx(InputElement, { pointerEvents: \"none\", ...startElementProps, children: startElement }),\n cloneElement(child, {\n ...startElement && {\n ps: `calc(var(--input-height) - ${startOffset})`\n },\n ...endElement && { pe: `calc(var(--input-height) - ${endOffset})` },\n ...children.props\n }),\n endElement && /* @__PURE__ */ jsx(InputElement, { placement: \"end\", ...endElementProps, children: endElement }),\n endAddon && /* @__PURE__ */ jsx(InputAddon, { ...endAddonProps, children: endAddon })\n ]\n }\n );\n }\n);\n\nexport { InputGroup };\n","import { ButtonSize } from \"components/Button/button.types\";\nimport { FormControlSize } from \"hocs/withFormControl/withFormControl.types\";\n\nexport const closeButtonSizeMap: Record<FormControlSize, ButtonSize> = {\n sm: \"xs\",\n md: \"sm\",\n lg: \"md\",\n};\n","import React, { ForwardedRef, useMemo } from \"react\";\nimport { Box } from \"@chakra-ui/react/box\";\nimport {\n withFormControl,\n WithFormControlProps,\n} from \"hocs/withFormControl/withFormControl\";\nimport {\n Input as CInput,\n InputProps as CInputProps,\n InputGroup,\n} from \"@chakra-ui/react/input\";\nimport { FormControlSize } from \"hocs/withFormControl/withFormControl.types\";\nimport { Button } from \"components/Button/button.component\";\nimport { CharacterCounter } from \"components/CharacterCounter/characterCounter.component\";\nimport { closeButtonSizeMap } from \"./textInput.records\";\n\nexport interface TextInputBaseProps extends WithFormControlProps {\n charLimit?: number;\n inputRef?: ForwardedRef<HTMLInputElement>;\n onContrast?: boolean;\n leftAddon?: React.ReactNode;\n leftElement?: React.ReactNode;\n rightAddon?: React.ReactNode;\n rightElement?: React.ReactNode;\n size?: FormControlSize;\n}\n\nexport interface DefaultTextInputProps extends TextInputBaseProps {\n clearable?: never;\n onClear?: never;\n}\n\nexport interface ClearableTextInputProps extends TextInputBaseProps {\n clearable?: boolean;\n onClear?: (val: string | number | readonly string[]) => void;\n}\n\nexport type KTextInputProps = DefaultTextInputProps | ClearableTextInputProps;\n\nexport type TextInputProps = KTextInputProps & CInputProps;\n\nconst TextInput = withFormControl(\n ({\n charLimit = undefined,\n clearable = false,\n disabled = false,\n inputRef,\n invalid,\n leftAddon,\n leftElement,\n onClear,\n onContrast,\n rightAddon,\n rightElement,\n size = \"md\",\n value,\n ...rest\n }: TextInputProps): React.JSX.Element => {\n const handleClear = (): void => {\n if (onClear) {\n onClear(value || \"\");\n }\n };\n\n if (clearable && !!value && !disabled) {\n rightElement = (\n <Button\n className=\"TextInput__ClearButton\"\n data-testid=\"kibble-text-input-clear-button\"\n size={closeButtonSizeMap[size as FormControlSize]}\n variant=\"ghostNeutral\"\n onClick={handleClear}\n iconName=\"close\"\n />\n );\n }\n\n const currentCharCount = useMemo(\n () => value?.toString()?.length || 0,\n [value],\n );\n\n return (\n <Box className=\"TextInput__Wrapper\" position=\"relative\" w=\"100%\">\n <InputGroup\n className=\"TextInput__InputGroup\"\n data-testid=\"kibble-text-input-group\"\n startElement={leftElement}\n startElementProps={{\n color: \"inherit\",\n _groupDisabled: { opacity: 0.6 },\n }}\n endElement={rightElement}\n endElementProps={{\n color: \"inherit\",\n paddingInline: 1.5,\n _groupDisabled: { opacity: 0.6 },\n }}\n startAddon={leftAddon}\n endAddon={rightAddon}\n >\n <CInput\n data-testid=\"kibble-text-input\"\n className=\"TextInput\"\n ref={inputRef}\n value={value}\n size={size}\n disabled={disabled}\n {...(invalid && { \"aria-invalid\": true })}\n variant={onContrast ? \"onContrast\" : \"default\"}\n {...rest}\n />\n </InputGroup>\n {!!charLimit && (\n <CharacterCounter\n withLimit={true}\n limit={charLimit}\n currentCount={currentCharCount}\n />\n )}\n </Box>\n );\n },\n);\n\nconst WrappedTextInput = React.forwardRef(\n (props: TextInputProps, ref: ForwardedRef<HTMLInputElement>) => (\n <TextInput inputRef={ref} {...props} />\n ),\n);\n\nWrappedTextInput.displayName = \"TextInput\";\n\nexport { WrappedTextInput as TextInput };\n"],"names":["FieldInput","forwardRef","props","ref","field","useFieldContext","mergedProps","mergeProps","jsx","ark","withContext","createRecipeContext","Input","Field.Input","InputAddon","unstyled","recipe","useRecipe","variantProps","localProps","styles","EMPTY_SLOT_STYLES","chakra","InputElement","InputGroup","startElement","startElementProps","endElement","endElementProps","startAddon","startAddonProps","endAddon","endAddonProps","children","startOffset","endOffset","rest","child","Children","attached","jsxs","Group","el","cloneElement","closeButtonSizeMap","TextInput","withFormControl","charLimit","clearable","disabled","inputRef","invalid","leftAddon","leftElement","onClear","onContrast","rightAddon","rightElement","size","value","handleClear","Button","currentCharCount","useMemo","Box","CInput","CharacterCounter","WrappedTextInput","React"],"mappings":"2lBAOMA,EAAaC,EAAU,WAAC,CAACC,EAAOC,IAAQ,CAC5C,MAAMC,EAAQC,EAAAA,gBAAiB,EACzBC,EAAcC,EAAU,WAACH,GAAO,cAAa,EAAIF,CAAK,EAC5D,OAAuBM,EAAAA,kBAAAA,IAAIC,EAAAA,IAAI,MAAO,CAAE,GAAGH,EAAa,IAAAH,EAAK,CAC/D,CAAC,EACDH,EAAW,YAAc,aCPzB,KAAM,CAAE,YAAAU,CAA2B,EAAIC,sBAAoB,CACzD,IAAK,OACP,CAAC,EACKC,EAAQF,EAAYG,CAAW,ECA/BC,EAAab,EAAU,WAC3B,SAAqB,CAAE,SAAAc,EAAU,GAAGb,CAAK,EAAIC,EAAK,CAChD,MAAMa,EAASC,EAAS,UAAC,CAAE,IAAK,aAAc,OAAQf,EAAM,OAAQ,EAC9D,CAACgB,EAAcC,CAAU,EAAIH,EAAO,kBAAkBd,CAAK,EAC3DkB,EAASL,EAAWM,oBAAoBL,EAAOE,CAAY,EACjE,OAAuBV,wBAAIc,EAAAA,OAAO,IAAK,CAAE,IAAAnB,EAAK,GAAGgB,EAAY,IAAK,CAACC,EAAQl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AA,kBAAA,IAAC0D,EAAA,iBAAA,CACC,UAAW,GACX,MAAOnB,EACP,aAAce,CAAA,CAAA,CAChB,EAEJ,CAAA,CAGN,EAEMK,EAAmBC,EAAM,QAAA,WAC7B,CAAClE,EAAuBC,IACtBK,wBAACqC,GAAU,SAAU1C,EAAM,GAAGD,CAAO,CAAA,CAEzC,EAEAiE,EAAiB,YAAc","x_google_ignoreList":[0,1,2,3,4]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";const c=require("./jsx-runtime-BjDatQAs.js"),u=require("react"),h=require("./withFormControl-DzgoWpP6.js"),v=require("./characterCounter.component-WGffeYNG.js"),g=require("./flex-D14H6HbP.js"),w=require("./create-recipe-context-sESms8Eo.js"),p=require("./index-CZ42b9rT.js"),l=require("./use-locale-context-BdqHZ8L8.js"),b=require("./use-field-context--wBJQY1R.js"),R=e=>e&&e.__esModule?e:{default:e},C=R(u);var F=e=>{if(!e)return;const t=p.getComputedStyle(e),o=p.getWindow(e),s=p.getDocument(e),r=()=>{requestAnimationFrame(()=>{e.style.height="auto";let i;t.boxSizing==="content-box"?i=e.scrollHeight-(parseFloat(t.paddingTop)+parseFloat(t.paddingBottom)):i=e.scrollHeight+parseFloat(t.borderTopWidth)+parseFloat(t.borderBottomWidth),t.maxHeight!=="none"&&i>parseFloat(t.maxHeight)?(t.overflowY==="hidden"&&(e.style.overflowY="scroll"),i=parseFloat(t.maxHeight)):t.overflowY!=="hidden"&&(e.style.overflowY="hidden"),e.style.height=`${i}px`})};e.addEventListener("input",r),e.form?.addEventListener("reset",r);const n=Object.getPrototypeOf(e),a=Object.getOwnPropertyDescriptor(n,"value");Object.defineProperty(e,"value",{...a,set(){a?.set?.apply(this,arguments),r()}});const d=new o.ResizeObserver(()=>{requestAnimationFrame(()=>r())});d.observe(e);const x=new o.MutationObserver(()=>r());return x.observe(e,{attributes:!0,attributeFilter:["rows","placeholder"]}),s.fonts?.addEventListener("loadingdone",r),()=>{e.removeEventListener("input",r),e.form?.removeEventListener("reset",r),s.fonts?.removeEventListener("loadingdone",r),d.disconnect(),x.disconnect()}};const m=u.forwardRef((e,t)=>{const{autoresize:o,...s}=e,r=u.useRef(null),n=b.useFieldContext(),a=p.mergeProps(n?.getTextareaProps(),{style:{resize:o?"none":void 0}},s);return u.useEffect(()=>{if(o)return F(r.current)},[o]),c.jsxRuntimeExports.jsx(l.ark.textarea,{...a,ref:l.composeRefs(t,r)})});m.displayName="FieldTextarea";const{withContext:y}=w.createRecipeContext({key:"textarea"}),j=y(m),T=h.withFormControl(({charLimit:e=void 0,invalid:t,onContrast:o,resize:s="none",textareaRef:r,value:n,...a})=>{const d=o?"onContrast":"default",x=u.useMemo(()=>n?.toString()?.length||0,[n]);return c.jsxRuntimeExports.jsxs(g.Flex,{className:"Textarea__Wrapper",position:"relative",w:"100%",children:[c.jsxRuntimeExports.jsx(j,{className:"Textarea","data-testid":"kibble-textarea",resize:s,variant:d,value:n,...t&&{"aria-invalid":!0},minH:"140px",...a,ref:r}),!!e&&c.jsxRuntimeExports.jsx(v.CharacterCounter,{withLimit:!0,limit:e,currentCount:x})]})}),f=C.default.forwardRef((e,t)=>c.jsxRuntimeExports.jsx(T,{textareaRef:t,...e}));f.displayName="Textarea";exports.WrappedTextArea=f;
|
|
2
|
+
//# sourceMappingURL=textarea.component-BEgF2Yny.js.map
|
package/dist/chunks/{textarea.component-5Ou5g_MJ.js.map → textarea.component-BEgF2Yny.js.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"textarea.component-5Ou5g_MJ.js","sources":["../../node_modules/@zag-js/auto-resize/dist/index.mjs","../../node_modules/@ark-ui/react/dist/components/field/field-textarea.js","../../node_modules/@chakra-ui/react/dist/esm/components/textarea/textarea.js","../../src/components/Textarea/textarea.component.tsx"],"sourcesContent":["import { getDocument, getWindow, getComputedStyle } from '@zag-js/dom-query';\n\n// src/autoresize-input.ts\nfunction getVisualStyles(node) {\n if (!node) return;\n const style = getComputedStyle(node);\n return \"box-sizing:\" + style.boxSizing + \";border-left:\" + style.borderLeftWidth + \" solid red;border-right:\" + style.borderRightWidth + \" solid red;font-family:\" + style.fontFamily + \";font-feature-settings:\" + style.fontFeatureSettings + \";font-kerning:\" + style.fontKerning + \";font-size:\" + style.fontSize + \";font-stretch:\" + style.fontStretch + \";font-style:\" + style.fontStyle + \";font-variant:\" + style.fontVariant + \";font-variant-caps:\" + style.fontVariantCaps + \";font-variant-ligatures:\" + style.fontVariantLigatures + \";font-variant-numeric:\" + style.fontVariantNumeric + \";font-weight:\" + style.fontWeight + \";letter-spacing:\" + style.letterSpacing + \";margin-left:\" + style.marginLeft + \";margin-right:\" + style.marginRight + \";padding-left:\" + style.paddingLeft + \";padding-right:\" + style.paddingRight + \";text-indent:\" + style.textIndent + \";text-transform:\" + style.textTransform;\n}\n\n// src/autoresize-input.ts\nfunction createGhostElement(doc) {\n var el = doc.createElement(\"div\");\n el.id = \"ghost\";\n el.style.cssText = \"display:inline-block;height:0;overflow:hidden;position:absolute;top:0;visibility:hidden;white-space:nowrap;\";\n doc.body.appendChild(el);\n return el;\n}\nfunction autoResizeInput(input) {\n if (!input) return;\n const doc = getDocument(input);\n const win = getWindow(input);\n const ghost = createGhostElement(doc);\n const cssText = getVisualStyles(input);\n if (cssText) ghost.style.cssText += cssText;\n function resize() {\n win.requestAnimationFrame(() => {\n ghost.innerHTML = input.value;\n const rect = win.getComputedStyle(ghost);\n input?.style.setProperty(\"width\", rect.width);\n });\n }\n resize();\n input?.addEventListener(\"input\", resize);\n input?.addEventListener(\"change\", resize);\n return () => {\n doc.body.removeChild(ghost);\n input?.removeEventListener(\"input\", resize);\n input?.removeEventListener(\"change\", resize);\n };\n}\nvar autoresizeTextarea = (el) => {\n if (!el) return;\n const style = getComputedStyle(el);\n const win = getWindow(el);\n const doc = getDocument(el);\n const resize = () => {\n requestAnimationFrame(() => {\n el.style.height = \"auto\";\n let newHeight;\n if (style.boxSizing === \"content-box\") {\n newHeight = el.scrollHeight - (parseFloat(style.paddingTop) + parseFloat(style.paddingBottom));\n } else {\n newHeight = el.scrollHeight + parseFloat(style.borderTopWidth) + parseFloat(style.borderBottomWidth);\n }\n if (style.maxHeight !== \"none\" && newHeight > parseFloat(style.maxHeight)) {\n if (style.overflowY === \"hidden\") {\n el.style.overflowY = \"scroll\";\n }\n newHeight = parseFloat(style.maxHeight);\n } else if (style.overflowY !== \"hidden\") {\n el.style.overflowY = \"hidden\";\n }\n el.style.height = `${newHeight}px`;\n });\n };\n el.addEventListener(\"input\", resize);\n el.form?.addEventListener(\"reset\", resize);\n const elementPrototype = Object.getPrototypeOf(el);\n const descriptor = Object.getOwnPropertyDescriptor(elementPrototype, \"value\");\n Object.defineProperty(el, \"value\", {\n ...descriptor,\n set() {\n descriptor?.set?.apply(this, arguments);\n resize();\n }\n });\n const resizeObserver = new win.ResizeObserver(() => {\n requestAnimationFrame(() => resize());\n });\n resizeObserver.observe(el);\n const attrObserver = new win.MutationObserver(() => resize());\n attrObserver.observe(el, { attributes: true, attributeFilter: [\"rows\", \"placeholder\"] });\n doc.fonts?.addEventListener(\"loadingdone\", resize);\n return () => {\n el.removeEventListener(\"input\", resize);\n el.form?.removeEventListener(\"reset\", resize);\n doc.fonts?.removeEventListener(\"loadingdone\", resize);\n resizeObserver.disconnect();\n attrObserver.disconnect();\n };\n};\n\nexport { autoResizeInput, autoresizeTextarea };\n","'use client';\nimport { jsx } from 'react/jsx-runtime';\nimport { autoresizeTextarea } from '@zag-js/auto-resize';\nimport { mergeProps } from '@zag-js/react';\nimport { forwardRef, useRef, useEffect } from 'react';\nimport { composeRefs } from '../../utils/compose-refs.js';\nimport { ark } from '../factory.js';\nimport { useFieldContext } from './use-field-context.js';\n\nconst FieldTextarea = forwardRef((props, ref) => {\n const { autoresize, ...textareaProps } = props;\n const textareaRef = useRef(null);\n const field = useFieldContext();\n const mergedProps = mergeProps(\n field?.getTextareaProps(),\n { style: { resize: autoresize ? \"none\" : void 0 } },\n textareaProps\n );\n useEffect(() => {\n if (!autoresize) return;\n return autoresizeTextarea(textareaRef.current);\n }, [autoresize]);\n return /* @__PURE__ */ jsx(ark.textarea, { ...mergedProps, ref: composeRefs(ref, textareaRef) });\n});\nFieldTextarea.displayName = \"FieldTextarea\";\n\nexport { FieldTextarea };\n","\"use strict\";\n\"use client\";\nimport { Field } from '@ark-ui/react/field';\nimport { createRecipeContext } from '../../styled-system/create-recipe-context.js';\n\nconst { withContext, PropsProvider } = createRecipeContext({\n key: \"textarea\"\n});\nconst Textarea = withContext(\n Field.Textarea\n);\nconst TextareaPropsProvider = PropsProvider;\n\nexport { Textarea, TextareaPropsProvider };\n","import React, { ForwardedRef, useMemo } from \"react\";\nimport {\n Textarea as CTextarea,\n TextareaProps as CTextareaProps,\n} from \"@chakra-ui/react/textarea\";\nimport { FormControlSize } from \"hocs/withFormControl/withFormControl.types\";\nimport {\n withFormControl,\n WithFormControlProps,\n} from \"hocs/withFormControl/withFormControl\";\nimport { Flex } from \"@chakra-ui/react/flex\";\nimport { CharacterCounter } from \"components/CharacterCounter/characterCounter.component\";\n\nexport interface TextareaProps extends WithFormControlProps, CTextareaProps {\n charLimit?: number;\n textareaRef?: ForwardedRef<HTMLTextAreaElement>;\n size?: FormControlSize;\n}\n\nconst Textarea = withFormControl(\n ({\n charLimit = undefined,\n invalid,\n onContrast,\n resize = \"none\",\n textareaRef,\n value,\n ...rest\n }: TextareaProps): React.JSX.Element => {\n const _computedVariant = onContrast ? \"onContrast\" : \"default\";\n\n const currentCharCount = useMemo(\n () => value?.toString()?.length || 0,\n [value],\n );\n\n return (\n <Flex className=\"Textarea__Wrapper\" position=\"relative\" w=\"100%\">\n <CTextarea\n className=\"Textarea\"\n data-testid=\"kibble-textarea\"\n resize={resize}\n variant={_computedVariant}\n value={value}\n {...(invalid && { \"aria-invalid\": true })}\n minH=\"140px\"\n {...rest}\n ref={textareaRef}\n />\n {!!charLimit && (\n <CharacterCounter\n withLimit={true}\n limit={charLimit}\n currentCount={currentCharCount}\n />\n )}\n </Flex>\n );\n },\n);\n\nconst WrappedTextArea = React.forwardRef(\n (props: TextareaProps, ref: ForwardedRef<HTMLTextAreaElement>) => (\n <Textarea textareaRef={ref} {...props} />\n ),\n);\n\nWrappedTextArea.displayName = \"Textarea\";\n\nexport { WrappedTextArea as Textarea };\n"],"names":["autoresizeTextarea","el","style","getComputedStyle","win","getWindow","doc","getDocument","resize","newHeight","elementPrototype","descriptor","resizeObserver","attrObserver","FieldTextarea","forwardRef","props","ref","autoresize","textareaProps","textareaRef","useRef","field","useFieldContext","mergedProps","mergeProps","useEffect","jsx","ark","composeRefs","withContext","createRecipeContext","Textarea","Field.Textarea","withFormControl","charLimit","invalid","onContrast","value","rest","_computedVariant","currentCharCount","useMemo","Flex","CTextarea","CharacterCounter","WrappedTextArea","React"],"mappings":"yZAwCA,IAAIA,EAAsBC,GAAO,CAC/B,GAAI,CAACA,EAAI,OACT,MAAMC,EAAQC,EAAgB,iBAACF,CAAE,EAC3BG,EAAMC,EAAS,UAACJ,CAAE,EAClBK,EAAMC,EAAW,YAACN,CAAE,EACpBO,EAAS,IAAM,CACnB,sBAAsB,IAAM,CAC1BP,EAAG,MAAM,OAAS,OAClB,IAAIQ,EACAP,EAAM,YAAc,cACtBO,EAAYR,EAAG,cAAgB,WAAWC,EAAM,UAAU,EAAI,WAAWA,EAAM,aAAa,GAE5FO,EAAYR,EAAG,aAAe,WAAWC,EAAM,cAAc,EAAI,WAAWA,EAAM,iBAAiB,EAEjGA,EAAM,YAAc,QAAUO,EAAY,WAAWP,EAAM,SAAS,GAClEA,EAAM,YAAc,WACtBD,EAAG,MAAM,UAAY,UAEvBQ,EAAY,WAAWP,EAAM,SAAS,GAC7BA,EAAM,YAAc,WAC7BD,EAAG,MAAM,UAAY,UAEvBA,EAAG,MAAM,OAAS,GAAGQ,CAAS,IACpC,CAAK,CACF,EACDR,EAAG,iBAAiB,QAASO,CAAM,EACnCP,EAAG,MAAM,iBAAiB,QAASO,CAAM,EACzC,MAAME,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B,CACzD,IAAK,UACP,CAAC,EACKC,EAAWF,EACfG,CACF,ECSMD,EAAWE,EAAA,gBACf,CAAC,CACC,UAAAC,EAAY,OACZ,QAAAC,EACA,WAAAC,EACA,OAAA7B,EAAS,OACT,YAAAY,EACA,MAAAkB,EACA,GAAGC,CAAA,IACmC,CAChC,MAAAC,EAAmBH,EAAa,aAAe,UAE/CI,EAAmBC,EAAA,QACvB,IAAMJ,GAAO,YAAY,QAAU,EACnC,CAACA,CAAK,CACR,EAEA,gCACGK,OAAK,CAAA,UAAU,oBAAoB,SAAS,WAAW,EAAE,OACxD,SAAA,CAAAhB,EAAA,kBAAA,IAACiB,EAAA,CACC,UAAU,WACV,cAAY,kBACZ,OAAApC,EACA,QAASgC,EACT,MAAAF,EACC,GAAIF,GAAW,CAAE,eAAgB,EAAK,EACvC,KAAK,QACJ,GAAGG,EACJ,IAAKnB,CAAA,CACP,EACC,CAAC,CAACe,GACDR,EAAA,kBAAA,IAACkB,EAAA,iBAAA,CACC,UAAW,GACX,MAAOV,EACP,aAAcM,CAAA,CAAA,CAChB,EAEJ,CAAA,CAGN,EAEMK,EAAkBC,EAAM,QAAA,WAC5B,CAAC/B,EAAsBC,IACrBU,wBAACK,GAAS,YAAaf,EAAM,GAAGD,CAAO,CAAA,CAE3C,EAEA8B,EAAgB,YAAc","x_google_ignoreList":[0,1,2]}
|
|
1
|
+
{"version":3,"file":"textarea.component-BEgF2Yny.js","sources":["../../node_modules/@zag-js/auto-resize/dist/index.mjs","../../node_modules/@ark-ui/react/dist/components/field/field-textarea.js","../../node_modules/@chakra-ui/react/dist/esm/components/textarea/textarea.js","../../src/components/Textarea/textarea.component.tsx"],"sourcesContent":["import { getDocument, getWindow, getComputedStyle } from '@zag-js/dom-query';\n\n// src/autoresize-input.ts\nfunction getVisualStyles(node) {\n if (!node) return;\n const style = getComputedStyle(node);\n return \"box-sizing:\" + style.boxSizing + \";border-left:\" + style.borderLeftWidth + \" solid red;border-right:\" + style.borderRightWidth + \" solid red;font-family:\" + style.fontFamily + \";font-feature-settings:\" + style.fontFeatureSettings + \";font-kerning:\" + style.fontKerning + \";font-size:\" + style.fontSize + \";font-stretch:\" + style.fontStretch + \";font-style:\" + style.fontStyle + \";font-variant:\" + style.fontVariant + \";font-variant-caps:\" + style.fontVariantCaps + \";font-variant-ligatures:\" + style.fontVariantLigatures + \";font-variant-numeric:\" + style.fontVariantNumeric + \";font-weight:\" + style.fontWeight + \";letter-spacing:\" + style.letterSpacing + \";margin-left:\" + style.marginLeft + \";margin-right:\" + style.marginRight + \";padding-left:\" + style.paddingLeft + \";padding-right:\" + style.paddingRight + \";text-indent:\" + style.textIndent + \";text-transform:\" + style.textTransform;\n}\n\n// src/autoresize-input.ts\nfunction createGhostElement(doc) {\n var el = doc.createElement(\"div\");\n el.id = \"ghost\";\n el.style.cssText = \"display:inline-block;height:0;overflow:hidden;position:absolute;top:0;visibility:hidden;white-space:nowrap;\";\n doc.body.appendChild(el);\n return el;\n}\nfunction autoResizeInput(input) {\n if (!input) return;\n const doc = getDocument(input);\n const win = getWindow(input);\n const ghost = createGhostElement(doc);\n const cssText = getVisualStyles(input);\n if (cssText) ghost.style.cssText += cssText;\n function resize() {\n win.requestAnimationFrame(() => {\n ghost.innerHTML = input.value;\n const rect = win.getComputedStyle(ghost);\n input?.style.setProperty(\"width\", rect.width);\n });\n }\n resize();\n input?.addEventListener(\"input\", resize);\n input?.addEventListener(\"change\", resize);\n return () => {\n doc.body.removeChild(ghost);\n input?.removeEventListener(\"input\", resize);\n input?.removeEventListener(\"change\", resize);\n };\n}\nvar autoresizeTextarea = (el) => {\n if (!el) return;\n const style = getComputedStyle(el);\n const win = getWindow(el);\n const doc = getDocument(el);\n const resize = () => {\n requestAnimationFrame(() => {\n el.style.height = \"auto\";\n let newHeight;\n if (style.boxSizing === \"content-box\") {\n newHeight = el.scrollHeight - (parseFloat(style.paddingTop) + parseFloat(style.paddingBottom));\n } else {\n newHeight = el.scrollHeight + parseFloat(style.borderTopWidth) + parseFloat(style.borderBottomWidth);\n }\n if (style.maxHeight !== \"none\" && newHeight > parseFloat(style.maxHeight)) {\n if (style.overflowY === \"hidden\") {\n el.style.overflowY = \"scroll\";\n }\n newHeight = parseFloat(style.maxHeight);\n } else if (style.overflowY !== \"hidden\") {\n el.style.overflowY = \"hidden\";\n }\n el.style.height = `${newHeight}px`;\n });\n };\n el.addEventListener(\"input\", resize);\n el.form?.addEventListener(\"reset\", resize);\n const elementPrototype = Object.getPrototypeOf(el);\n const descriptor = Object.getOwnPropertyDescriptor(elementPrototype, \"value\");\n Object.defineProperty(el, \"value\", {\n ...descriptor,\n set() {\n descriptor?.set?.apply(this, arguments);\n resize();\n }\n });\n const resizeObserver = new win.ResizeObserver(() => {\n requestAnimationFrame(() => resize());\n });\n resizeObserver.observe(el);\n const attrObserver = new win.MutationObserver(() => resize());\n attrObserver.observe(el, { attributes: true, attributeFilter: [\"rows\", \"placeholder\"] });\n doc.fonts?.addEventListener(\"loadingdone\", resize);\n return () => {\n el.removeEventListener(\"input\", resize);\n el.form?.removeEventListener(\"reset\", resize);\n doc.fonts?.removeEventListener(\"loadingdone\", resize);\n resizeObserver.disconnect();\n attrObserver.disconnect();\n };\n};\n\nexport { autoResizeInput, autoresizeTextarea };\n","'use client';\nimport { jsx } from 'react/jsx-runtime';\nimport { autoresizeTextarea } from '@zag-js/auto-resize';\nimport { mergeProps } from '@zag-js/react';\nimport { forwardRef, useRef, useEffect } from 'react';\nimport { composeRefs } from '../../utils/compose-refs.js';\nimport { ark } from '../factory.js';\nimport { useFieldContext } from './use-field-context.js';\n\nconst FieldTextarea = forwardRef((props, ref) => {\n const { autoresize, ...textareaProps } = props;\n const textareaRef = useRef(null);\n const field = useFieldContext();\n const mergedProps = mergeProps(\n field?.getTextareaProps(),\n { style: { resize: autoresize ? \"none\" : void 0 } },\n textareaProps\n );\n useEffect(() => {\n if (!autoresize) return;\n return autoresizeTextarea(textareaRef.current);\n }, [autoresize]);\n return /* @__PURE__ */ jsx(ark.textarea, { ...mergedProps, ref: composeRefs(ref, textareaRef) });\n});\nFieldTextarea.displayName = \"FieldTextarea\";\n\nexport { FieldTextarea };\n","\"use strict\";\n\"use client\";\nimport { Field } from '@ark-ui/react/field';\nimport { createRecipeContext } from '../../styled-system/create-recipe-context.js';\n\nconst { withContext, PropsProvider } = createRecipeContext({\n key: \"textarea\"\n});\nconst Textarea = withContext(\n Field.Textarea\n);\nconst TextareaPropsProvider = PropsProvider;\n\nexport { Textarea, TextareaPropsProvider };\n","import React, { ForwardedRef, useMemo } from \"react\";\nimport {\n Textarea as CTextarea,\n TextareaProps as CTextareaProps,\n} from \"@chakra-ui/react/textarea\";\nimport { FormControlSize } from \"hocs/withFormControl/withFormControl.types\";\nimport {\n withFormControl,\n WithFormControlProps,\n} from \"hocs/withFormControl/withFormControl\";\nimport { Flex } from \"@chakra-ui/react/flex\";\nimport { CharacterCounter } from \"components/CharacterCounter/characterCounter.component\";\n\nexport interface TextareaProps extends WithFormControlProps, CTextareaProps {\n charLimit?: number;\n textareaRef?: ForwardedRef<HTMLTextAreaElement>;\n size?: FormControlSize;\n}\n\nconst Textarea = withFormControl(\n ({\n charLimit = undefined,\n invalid,\n onContrast,\n resize = \"none\",\n textareaRef,\n value,\n ...rest\n }: TextareaProps): React.JSX.Element => {\n const _computedVariant = onContrast ? \"onContrast\" : \"default\";\n\n const currentCharCount = useMemo(\n () => value?.toString()?.length || 0,\n [value],\n );\n\n return (\n <Flex className=\"Textarea__Wrapper\" position=\"relative\" w=\"100%\">\n <CTextarea\n className=\"Textarea\"\n data-testid=\"kibble-textarea\"\n resize={resize}\n variant={_computedVariant}\n value={value}\n {...(invalid && { \"aria-invalid\": true })}\n minH=\"140px\"\n {...rest}\n ref={textareaRef}\n />\n {!!charLimit && (\n <CharacterCounter\n withLimit={true}\n limit={charLimit}\n currentCount={currentCharCount}\n />\n )}\n </Flex>\n );\n },\n);\n\nconst WrappedTextArea = React.forwardRef(\n (props: TextareaProps, ref: ForwardedRef<HTMLTextAreaElement>) => (\n <Textarea textareaRef={ref} {...props} />\n ),\n);\n\nWrappedTextArea.displayName = \"Textarea\";\n\nexport { WrappedTextArea as Textarea };\n"],"names":["autoresizeTextarea","el","style","getComputedStyle","win","getWindow","doc","getDocument","resize","newHeight","elementPrototype","descriptor","resizeObserver","attrObserver","FieldTextarea","forwardRef","props","ref","autoresize","textareaProps","textareaRef","useRef","field","useFieldContext","mergedProps","mergeProps","useEffect","jsx","ark","composeRefs","withContext","createRecipeContext","Textarea","Field.Textarea","withFormControl","charLimit","invalid","onContrast","value","rest","_computedVariant","currentCharCount","useMemo","Flex","CTextarea","CharacterCounter","WrappedTextArea","React"],"mappings":"qaAwCA,IAAIA,EAAsBC,GAAO,CAC/B,GAAI,CAACA,EAAI,OACT,MAAMC,EAAQC,EAAgB,iBAACF,CAAE,EAC3BG,EAAMC,EAAS,UAACJ,CAAE,EAClBK,EAAMC,EAAW,YAACN,CAAE,EACpBO,EAAS,IAAM,CACnB,sBAAsB,IAAM,CAC1BP,EAAG,MAAM,OAAS,OAClB,IAAIQ,EACAP,EAAM,YAAc,cACtBO,EAAYR,EAAG,cAAgB,WAAWC,EAAM,UAAU,EAAI,WAAWA,EAAM,aAAa,GAE5FO,EAAYR,EAAG,aAAe,WAAWC,EAAM,cAAc,EAAI,WAAWA,EAAM,iBAAiB,EAEjGA,EAAM,YAAc,QAAUO,EAAY,WAAWP,EAAM,SAAS,GAClEA,EAAM,YAAc,WACtBD,EAAG,MAAM,UAAY,UAEvBQ,EAAY,WAAWP,EAAM,SAAS,GAC7BA,EAAM,YAAc,WAC7BD,EAAG,MAAM,UAAY,UAEvBA,EAAG,MAAM,OAAS,GAAGQ,CAAS,IACpC,CAAK,CACF,EACDR,EAAG,iBAAiB,QAASO,CAAM,EACnCP,EAAG,MAAM,iBAAiB,QAASO,CAAM,EACzC,MAAME,EAAmB,OAAO,eAAeT,CAAE,EAC3CU,EAAa,OAAO,yBAAyBD,EAAkB,OAAO,EAC5E,OAAO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CACC,UAAAC,EAAY,OACZ,QAAAC,EACA,WAAAC,EACA,OAAA7B,EAAS,OACT,YAAAY,EACA,MAAAkB,EACA,GAAGC,CAAA,IACmC,CAChC,MAAAC,EAAmBH,EAAa,aAAe,UAE/CI,EAAmBC,EAAA,QACvB,IAAMJ,GAAO,YAAY,QAAU,EACnC,CAACA,CAAK,CACR,EAEA,gCACGK,OAAK,CAAA,UAAU,oBAAoB,SAAS,WAAW,EAAE,OACxD,SAAA,CAAAhB,EAAA,kBAAA,IAACiB,EAAA,CACC,UAAU,WACV,cAAY,kBACZ,OAAApC,EACA,QAASgC,EACT,MAAAF,EACC,GAAIF,GAAW,CAAE,eAAgB,EAAK,EACvC,KAAK,QACJ,GAAGG,EACJ,IAAKnB,CAAA,CACP,EACC,CAAC,CAACe,GACDR,EAAA,kBAAA,IAACkB,EAAA,iBAAA,CACC,UAAW,GACX,MAAOV,EACP,aAAcM,CAAA,CAAA,CAChB,EAEJ,CAAA,CAGN,EAEMK,EAAkBC,EAAM,QAAA,WAC5B,CAAC/B,EAAsBC,IACrBU,wBAACK,GAAS,YAAaf,EAAM,GAAGD,CAAO,CAAA,CAE3C,EAEA8B,EAAgB,YAAc","x_google_ignoreList":[0,1,2]}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { j as d } from "./jsx-runtime-C5mzlN2N.js";
|
|
2
|
-
import f, { forwardRef as u, useRef as l, useEffect as x, useMemo as
|
|
3
|
-
import { w as
|
|
4
|
-
import { C as h } from "./characterCounter.component-
|
|
2
|
+
import f, { forwardRef as u, useRef as l, useEffect as x, useMemo as v } from "react";
|
|
3
|
+
import { w as g } from "./withFormControl-DIT4DbIl.js";
|
|
4
|
+
import { C as h } from "./characterCounter.component-UgnBVIt2.js";
|
|
5
5
|
import { F as w } from "./flex-smlF8uQG.js";
|
|
6
6
|
import { c as b } from "./create-recipe-context-D7FewUR4.js";
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import { u as
|
|
10
|
-
var
|
|
7
|
+
import { e as y, Z as F, a2 as C, Y as T } from "./index-CYk-7wwG.js";
|
|
8
|
+
import { f as j, h as R } from "./use-locale-context-D-agiW5E.js";
|
|
9
|
+
import { u as O } from "./use-field-context-B_G7Yziz.js";
|
|
10
|
+
var E = (e) => {
|
|
11
11
|
if (!e) return;
|
|
12
12
|
const t = y(e), o = F(e), s = C(e), r = () => {
|
|
13
13
|
requestAnimationFrame(() => {
|
|
@@ -34,14 +34,14 @@ var O = (e) => {
|
|
|
34
34
|
};
|
|
35
35
|
};
|
|
36
36
|
const c = u((e, t) => {
|
|
37
|
-
const { autoresize: o, ...s } = e, r = l(null), a =
|
|
37
|
+
const { autoresize: o, ...s } = e, r = l(null), a = O(), n = T(
|
|
38
38
|
a?.getTextareaProps(),
|
|
39
39
|
{ style: { resize: o ? "none" : void 0 } },
|
|
40
40
|
s
|
|
41
41
|
);
|
|
42
42
|
return x(() => {
|
|
43
43
|
if (o)
|
|
44
|
-
return
|
|
44
|
+
return E(r.current);
|
|
45
45
|
}, [o]), /* @__PURE__ */ d.jsx(j.textarea, { ...n, ref: R(t, r) });
|
|
46
46
|
});
|
|
47
47
|
c.displayName = "FieldTextarea";
|
|
@@ -49,7 +49,7 @@ const { withContext: P } = b({
|
|
|
49
49
|
key: "textarea"
|
|
50
50
|
}), z = P(
|
|
51
51
|
c
|
|
52
|
-
), H =
|
|
52
|
+
), H = g(
|
|
53
53
|
({
|
|
54
54
|
charLimit: e = void 0,
|
|
55
55
|
invalid: t,
|
|
@@ -59,7 +59,7 @@ const { withContext: P } = b({
|
|
|
59
59
|
value: a,
|
|
60
60
|
...n
|
|
61
61
|
}) => {
|
|
62
|
-
const m = o ? "onContrast" : "default", p =
|
|
62
|
+
const m = o ? "onContrast" : "default", p = v(
|
|
63
63
|
() => a?.toString()?.length || 0,
|
|
64
64
|
[a]
|
|
65
65
|
);
|
|
@@ -95,4 +95,4 @@ L.displayName = "Textarea";
|
|
|
95
95
|
export {
|
|
96
96
|
L as W
|
|
97
97
|
};
|
|
98
|
-
//# sourceMappingURL=textarea.component-
|
|
98
|
+
//# sourceMappingURL=textarea.component-DB51bevU.js.map
|
package/dist/chunks/{textarea.component-ClYqhTJX.js.map → textarea.component-DB51bevU.js.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"textarea.component-ClYqhTJX.js","sources":["../../node_modules/@zag-js/auto-resize/dist/index.mjs","../../node_modules/@ark-ui/react/dist/components/field/field-textarea.js","../../node_modules/@chakra-ui/react/dist/esm/components/textarea/textarea.js","../../src/components/Textarea/textarea.component.tsx"],"sourcesContent":["import { getDocument, getWindow, getComputedStyle } from '@zag-js/dom-query';\n\n// src/autoresize-input.ts\nfunction getVisualStyles(node) {\n if (!node) return;\n const style = getComputedStyle(node);\n return \"box-sizing:\" + style.boxSizing + \";border-left:\" + style.borderLeftWidth + \" solid red;border-right:\" + style.borderRightWidth + \" solid red;font-family:\" + style.fontFamily + \";font-feature-settings:\" + style.fontFeatureSettings + \";font-kerning:\" + style.fontKerning + \";font-size:\" + style.fontSize + \";font-stretch:\" + style.fontStretch + \";font-style:\" + style.fontStyle + \";font-variant:\" + style.fontVariant + \";font-variant-caps:\" + style.fontVariantCaps + \";font-variant-ligatures:\" + style.fontVariantLigatures + \";font-variant-numeric:\" + style.fontVariantNumeric + \";font-weight:\" + style.fontWeight + \";letter-spacing:\" + style.letterSpacing + \";margin-left:\" + style.marginLeft + \";margin-right:\" + style.marginRight + \";padding-left:\" + style.paddingLeft + \";padding-right:\" + style.paddingRight + \";text-indent:\" + style.textIndent + \";text-transform:\" + style.textTransform;\n}\n\n// src/autoresize-input.ts\nfunction createGhostElement(doc) {\n var el = doc.createElement(\"div\");\n el.id = \"ghost\";\n el.style.cssText = \"display:inline-block;height:0;overflow:hidden;position:absolute;top:0;visibility:hidden;white-space:nowrap;\";\n doc.body.appendChild(el);\n return el;\n}\nfunction autoResizeInput(input) {\n if (!input) return;\n const doc = getDocument(input);\n const win = getWindow(input);\n const ghost = createGhostElement(doc);\n const cssText = getVisualStyles(input);\n if (cssText) ghost.style.cssText += cssText;\n function resize() {\n win.requestAnimationFrame(() => {\n ghost.innerHTML = input.value;\n const rect = win.getComputedStyle(ghost);\n input?.style.setProperty(\"width\", rect.width);\n });\n }\n resize();\n input?.addEventListener(\"input\", resize);\n input?.addEventListener(\"change\", resize);\n return () => {\n doc.body.removeChild(ghost);\n input?.removeEventListener(\"input\", resize);\n input?.removeEventListener(\"change\", resize);\n };\n}\nvar autoresizeTextarea = (el) => {\n if (!el) return;\n const style = getComputedStyle(el);\n const win = getWindow(el);\n const doc = getDocument(el);\n const resize = () => {\n requestAnimationFrame(() => {\n el.style.height = \"auto\";\n let newHeight;\n if (style.boxSizing === \"content-box\") {\n newHeight = el.scrollHeight - (parseFloat(style.paddingTop) + parseFloat(style.paddingBottom));\n } else {\n newHeight = el.scrollHeight + parseFloat(style.borderTopWidth) + parseFloat(style.borderBottomWidth);\n }\n if (style.maxHeight !== \"none\" && newHeight > parseFloat(style.maxHeight)) {\n if (style.overflowY === \"hidden\") {\n el.style.overflowY = \"scroll\";\n }\n newHeight = parseFloat(style.maxHeight);\n } else if (style.overflowY !== \"hidden\") {\n el.style.overflowY = \"hidden\";\n }\n el.style.height = `${newHeight}px`;\n });\n };\n el.addEventListener(\"input\", resize);\n el.form?.addEventListener(\"reset\", resize);\n const elementPrototype = Object.getPrototypeOf(el);\n const descriptor = Object.getOwnPropertyDescriptor(elementPrototype, \"value\");\n Object.defineProperty(el, \"value\", {\n ...descriptor,\n set() {\n descriptor?.set?.apply(this, arguments);\n resize();\n }\n });\n const resizeObserver = new win.ResizeObserver(() => {\n requestAnimationFrame(() => resize());\n });\n resizeObserver.observe(el);\n const attrObserver = new win.MutationObserver(() => resize());\n attrObserver.observe(el, { attributes: true, attributeFilter: [\"rows\", \"placeholder\"] });\n doc.fonts?.addEventListener(\"loadingdone\", resize);\n return () => {\n el.removeEventListener(\"input\", resize);\n el.form?.removeEventListener(\"reset\", resize);\n doc.fonts?.removeEventListener(\"loadingdone\", resize);\n resizeObserver.disconnect();\n attrObserver.disconnect();\n };\n};\n\nexport { autoResizeInput, autoresizeTextarea };\n","'use client';\nimport { jsx } from 'react/jsx-runtime';\nimport { autoresizeTextarea } from '@zag-js/auto-resize';\nimport { mergeProps } from '@zag-js/react';\nimport { forwardRef, useRef, useEffect } from 'react';\nimport { composeRefs } from '../../utils/compose-refs.js';\nimport { ark } from '../factory.js';\nimport { useFieldContext } from './use-field-context.js';\n\nconst FieldTextarea = forwardRef((props, ref) => {\n const { autoresize, ...textareaProps } = props;\n const textareaRef = useRef(null);\n const field = useFieldContext();\n const mergedProps = mergeProps(\n field?.getTextareaProps(),\n { style: { resize: autoresize ? \"none\" : void 0 } },\n textareaProps\n );\n useEffect(() => {\n if (!autoresize) return;\n return autoresizeTextarea(textareaRef.current);\n }, [autoresize]);\n return /* @__PURE__ */ jsx(ark.textarea, { ...mergedProps, ref: composeRefs(ref, textareaRef) });\n});\nFieldTextarea.displayName = \"FieldTextarea\";\n\nexport { FieldTextarea };\n","\"use strict\";\n\"use client\";\nimport { Field } from '@ark-ui/react/field';\nimport { createRecipeContext } from '../../styled-system/create-recipe-context.js';\n\nconst { withContext, PropsProvider } = createRecipeContext({\n key: \"textarea\"\n});\nconst Textarea = withContext(\n Field.Textarea\n);\nconst TextareaPropsProvider = PropsProvider;\n\nexport { Textarea, TextareaPropsProvider };\n","import React, { ForwardedRef, useMemo } from \"react\";\nimport {\n Textarea as CTextarea,\n TextareaProps as CTextareaProps,\n} from \"@chakra-ui/react/textarea\";\nimport { FormControlSize } from \"hocs/withFormControl/withFormControl.types\";\nimport {\n withFormControl,\n WithFormControlProps,\n} from \"hocs/withFormControl/withFormControl\";\nimport { Flex } from \"@chakra-ui/react/flex\";\nimport { CharacterCounter } from \"components/CharacterCounter/characterCounter.component\";\n\nexport interface TextareaProps extends WithFormControlProps, CTextareaProps {\n charLimit?: number;\n textareaRef?: ForwardedRef<HTMLTextAreaElement>;\n size?: FormControlSize;\n}\n\nconst Textarea = withFormControl(\n ({\n charLimit = undefined,\n invalid,\n onContrast,\n resize = \"none\",\n textareaRef,\n value,\n ...rest\n }: TextareaProps): React.JSX.Element => {\n const _computedVariant = onContrast ? \"onContrast\" : \"default\";\n\n const currentCharCount = useMemo(\n () => value?.toString()?.length || 0,\n [value],\n );\n\n return (\n <Flex className=\"Textarea__Wrapper\" position=\"relative\" w=\"100%\">\n <CTextarea\n className=\"Textarea\"\n data-testid=\"kibble-textarea\"\n resize={resize}\n variant={_computedVariant}\n value={value}\n {...(invalid && { \"aria-invalid\": true })}\n minH=\"140px\"\n {...rest}\n ref={textareaRef}\n />\n {!!charLimit && (\n <CharacterCounter\n withLimit={true}\n limit={charLimit}\n currentCount={currentCharCount}\n />\n )}\n </Flex>\n );\n },\n);\n\nconst WrappedTextArea = React.forwardRef(\n (props: TextareaProps, ref: ForwardedRef<HTMLTextAreaElement>) => (\n <Textarea textareaRef={ref} {...props} />\n ),\n);\n\nWrappedTextArea.displayName = \"Textarea\";\n\nexport { WrappedTextArea as Textarea };\n"],"names":["autoresizeTextarea","el","style","getComputedStyle","win","getWindow","doc","getDocument","resize","newHeight","elementPrototype","descriptor","resizeObserver","attrObserver","FieldTextarea","forwardRef","props","ref","autoresize","textareaProps","textareaRef","useRef","field","useFieldContext","mergedProps","mergeProps","useEffect","jsx","ark","composeRefs","withContext","createRecipeContext","Textarea","Field.Textarea","withFormControl","charLimit","invalid","onContrast","value","rest","_computedVariant","currentCharCount","useMemo","Flex","CTextarea","CharacterCounter","WrappedTextArea","React"],"mappings":";;;;;;;;;AAwCA,IAAIA,IAAqB,CAACC,MAAO;AAC/B,MAAI,CAACA,EAAI;AACT,QAAMC,IAAQC,EAAiBF,CAAE,GAC3BG,IAAMC,EAAUJ,CAAE,GAClBK,IAAMC,EAAYN,CAAE,GACpBO,IAAS,MAAM;AACnB,0BAAsB,MAAM;AAC1B,MAAAP,EAAG,MAAM,SAAS;AAClB,UAA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AAGG;AAAA,UACJ,KAAKnB;AAAA,QAAA;AAAA,MACP;AAAA,MACC,CAAC,CAACe,KACDR,gBAAAA,EAAA;AAAA,QAACkB;AAAA,QAAA;AAAA,UACC,WAAW;AAAA,UACX,OAAOV;AAAA,UACP,cAAcM;AAAA,QAAA;AAAA,MAAA;AAAA,IAChB,GAEJ;AAAA,EAAA;AAGN,GAEMK,IAAkBC,EAAM;AAAA,EAC5B,CAAC/B,GAAsBC,MACrBU,gBAAAA,MAACK,KAAS,aAAaf,GAAM,GAAGD,EAAO,CAAA;AAE3C;AAEA8B,EAAgB,cAAc;","x_google_ignoreList":[0,1,2]}
|
|
1
|
+
{"version":3,"file":"textarea.component-DB51bevU.js","sources":["../../node_modules/@zag-js/auto-resize/dist/index.mjs","../../node_modules/@ark-ui/react/dist/components/field/field-textarea.js","../../node_modules/@chakra-ui/react/dist/esm/components/textarea/textarea.js","../../src/components/Textarea/textarea.component.tsx"],"sourcesContent":["import { getDocument, getWindow, getComputedStyle } from '@zag-js/dom-query';\n\n// src/autoresize-input.ts\nfunction getVisualStyles(node) {\n if (!node) return;\n const style = getComputedStyle(node);\n return \"box-sizing:\" + style.boxSizing + \";border-left:\" + style.borderLeftWidth + \" solid red;border-right:\" + style.borderRightWidth + \" solid red;font-family:\" + style.fontFamily + \";font-feature-settings:\" + style.fontFeatureSettings + \";font-kerning:\" + style.fontKerning + \";font-size:\" + style.fontSize + \";font-stretch:\" + style.fontStretch + \";font-style:\" + style.fontStyle + \";font-variant:\" + style.fontVariant + \";font-variant-caps:\" + style.fontVariantCaps + \";font-variant-ligatures:\" + style.fontVariantLigatures + \";font-variant-numeric:\" + style.fontVariantNumeric + \";font-weight:\" + style.fontWeight + \";letter-spacing:\" + style.letterSpacing + \";margin-left:\" + style.marginLeft + \";margin-right:\" + style.marginRight + \";padding-left:\" + style.paddingLeft + \";padding-right:\" + style.paddingRight + \";text-indent:\" + style.textIndent + \";text-transform:\" + style.textTransform;\n}\n\n// src/autoresize-input.ts\nfunction createGhostElement(doc) {\n var el = doc.createElement(\"div\");\n el.id = \"ghost\";\n el.style.cssText = \"display:inline-block;height:0;overflow:hidden;position:absolute;top:0;visibility:hidden;white-space:nowrap;\";\n doc.body.appendChild(el);\n return el;\n}\nfunction autoResizeInput(input) {\n if (!input) return;\n const doc = getDocument(input);\n const win = getWindow(input);\n const ghost = createGhostElement(doc);\n const cssText = getVisualStyles(input);\n if (cssText) ghost.style.cssText += cssText;\n function resize() {\n win.requestAnimationFrame(() => {\n ghost.innerHTML = input.value;\n const rect = win.getComputedStyle(ghost);\n input?.style.setProperty(\"width\", rect.width);\n });\n }\n resize();\n input?.addEventListener(\"input\", resize);\n input?.addEventListener(\"change\", resize);\n return () => {\n doc.body.removeChild(ghost);\n input?.removeEventListener(\"input\", resize);\n input?.removeEventListener(\"change\", resize);\n };\n}\nvar autoresizeTextarea = (el) => {\n if (!el) return;\n const style = getComputedStyle(el);\n const win = getWindow(el);\n const doc = getDocument(el);\n const resize = () => {\n requestAnimationFrame(() => {\n el.style.height = \"auto\";\n let newHeight;\n if (style.boxSizing === \"content-box\") {\n newHeight = el.scrollHeight - (parseFloat(style.paddingTop) + parseFloat(style.paddingBottom));\n } else {\n newHeight = el.scrollHeight + parseFloat(style.borderTopWidth) + parseFloat(style.borderBottomWidth);\n }\n if (style.maxHeight !== \"none\" && newHeight > parseFloat(style.maxHeight)) {\n if (style.overflowY === \"hidden\") {\n el.style.overflowY = \"scroll\";\n }\n newHeight = parseFloat(style.maxHeight);\n } else if (style.overflowY !== \"hidden\") {\n el.style.overflowY = \"hidden\";\n }\n el.style.height = `${newHeight}px`;\n });\n };\n el.addEventListener(\"input\", resize);\n el.form?.addEventListener(\"reset\", resize);\n const elementPrototype = Object.getPrototypeOf(el);\n const descriptor = Object.getOwnPropertyDescriptor(elementPrototype, \"value\");\n Object.defineProperty(el, \"value\", {\n ...descriptor,\n set() {\n descriptor?.set?.apply(this, arguments);\n resize();\n }\n });\n const resizeObserver = new win.ResizeObserver(() => {\n requestAnimationFrame(() => resize());\n });\n resizeObserver.observe(el);\n const attrObserver = new win.MutationObserver(() => resize());\n attrObserver.observe(el, { attributes: true, attributeFilter: [\"rows\", \"placeholder\"] });\n doc.fonts?.addEventListener(\"loadingdone\", resize);\n return () => {\n el.removeEventListener(\"input\", resize);\n el.form?.removeEventListener(\"reset\", resize);\n doc.fonts?.removeEventListener(\"loadingdone\", resize);\n resizeObserver.disconnect();\n attrObserver.disconnect();\n };\n};\n\nexport { autoResizeInput, autoresizeTextarea };\n","'use client';\nimport { jsx } from 'react/jsx-runtime';\nimport { autoresizeTextarea } from '@zag-js/auto-resize';\nimport { mergeProps } from '@zag-js/react';\nimport { forwardRef, useRef, useEffect } from 'react';\nimport { composeRefs } from '../../utils/compose-refs.js';\nimport { ark } from '../factory.js';\nimport { useFieldContext } from './use-field-context.js';\n\nconst FieldTextarea = forwardRef((props, ref) => {\n const { autoresize, ...textareaProps } = props;\n const textareaRef = useRef(null);\n const field = useFieldContext();\n const mergedProps = mergeProps(\n field?.getTextareaProps(),\n { style: { resize: autoresize ? \"none\" : void 0 } },\n textareaProps\n );\n useEffect(() => {\n if (!autoresize) return;\n return autoresizeTextarea(textareaRef.current);\n }, [autoresize]);\n return /* @__PURE__ */ jsx(ark.textarea, { ...mergedProps, ref: composeRefs(ref, textareaRef) });\n});\nFieldTextarea.displayName = \"FieldTextarea\";\n\nexport { FieldTextarea };\n","\"use strict\";\n\"use client\";\nimport { Field } from '@ark-ui/react/field';\nimport { createRecipeContext } from '../../styled-system/create-recipe-context.js';\n\nconst { withContext, PropsProvider } = createRecipeContext({\n key: \"textarea\"\n});\nconst Textarea = withContext(\n Field.Textarea\n);\nconst TextareaPropsProvider = PropsProvider;\n\nexport { Textarea, TextareaPropsProvider };\n","import React, { ForwardedRef, useMemo } from \"react\";\nimport {\n Textarea as CTextarea,\n TextareaProps as CTextareaProps,\n} from \"@chakra-ui/react/textarea\";\nimport { FormControlSize } from \"hocs/withFormControl/withFormControl.types\";\nimport {\n withFormControl,\n WithFormControlProps,\n} from \"hocs/withFormControl/withFormControl\";\nimport { Flex } from \"@chakra-ui/react/flex\";\nimport { CharacterCounter } from \"components/CharacterCounter/characterCounter.component\";\n\nexport interface TextareaProps extends WithFormControlProps, CTextareaProps {\n charLimit?: number;\n textareaRef?: ForwardedRef<HTMLTextAreaElement>;\n size?: FormControlSize;\n}\n\nconst Textarea = withFormControl(\n ({\n charLimit = undefined,\n invalid,\n onContrast,\n resize = \"none\",\n textareaRef,\n value,\n ...rest\n }: TextareaProps): React.JSX.Element => {\n const _computedVariant = onContrast ? \"onContrast\" : \"default\";\n\n const currentCharCount = useMemo(\n () => value?.toString()?.length || 0,\n [value],\n );\n\n return (\n <Flex className=\"Textarea__Wrapper\" position=\"relative\" w=\"100%\">\n <CTextarea\n className=\"Textarea\"\n data-testid=\"kibble-textarea\"\n resize={resize}\n variant={_computedVariant}\n value={value}\n {...(invalid && { \"aria-invalid\": true })}\n minH=\"140px\"\n {...rest}\n ref={textareaRef}\n />\n {!!charLimit && (\n <CharacterCounter\n withLimit={true}\n limit={charLimit}\n currentCount={currentCharCount}\n />\n )}\n </Flex>\n );\n },\n);\n\nconst WrappedTextArea = React.forwardRef(\n (props: TextareaProps, ref: ForwardedRef<HTMLTextAreaElement>) => (\n <Textarea textareaRef={ref} {...props} />\n ),\n);\n\nWrappedTextArea.displayName = \"Textarea\";\n\nexport { WrappedTextArea as Textarea };\n"],"names":["autoresizeTextarea","el","style","getComputedStyle","win","getWindow","doc","getDocument","resize","newHeight","elementPrototype","descriptor","resizeObserver","attrObserver","FieldTextarea","forwardRef","props","ref","autoresize","textareaProps","textareaRef","useRef","field","useFieldContext","mergedProps","mergeProps","useEffect","jsx","ark","composeRefs","withContext","createRecipeContext","Textarea","Field.Textarea","withFormControl","charLimit","invalid","onContrast","value","rest","_computedVariant","currentCharCount","useMemo","Flex","CTextarea","CharacterCounter","WrappedTextArea","React"],"mappings":";;;;;;;;;AAwCA,IAAIA,IAA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