@televet/kibble-ui 4.0.0-beta.63 → 4.0.0-beta.65
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-D-Oi8lzU.js → alert.types-BvnpOwve.js} +2 -2
- package/dist/chunks/{alert.types-D-Oi8lzU.js.map → alert.types-BvnpOwve.js.map} +1 -1
- package/dist/chunks/{alert.types-QjdV89J8.js → alert.types-Dth5h5qO.js} +3 -3
- package/dist/chunks/{alert.types-QjdV89J8.js.map → alert.types-Dth5h5qO.js.map} +1 -1
- package/dist/chunks/{avatar.component-DhnsK_Su.js → avatar.component-BPCJZRyT.js} +14 -14
- package/dist/chunks/{avatar.component-DhnsK_Su.js.map → avatar.component-BPCJZRyT.js.map} +1 -1
- package/dist/chunks/avatar.component-y7gTa1dV.js +2 -0
- package/dist/chunks/{avatar.component-Bx-G6wRN.js.map → avatar.component-y7gTa1dV.js.map} +1 -1
- package/dist/chunks/{avatarGroup.component-BuIOss-r.js → avatarGroup.component-BnRXVOIV.js} +2 -2
- package/dist/chunks/{avatarGroup.component-BuIOss-r.js.map → avatarGroup.component-BnRXVOIV.js.map} +1 -1
- package/dist/chunks/{avatarGroup.component-DQ-llmL4.js → avatarGroup.component-Mfl8jvgp.js} +2 -2
- package/dist/chunks/{avatarGroup.component-DQ-llmL4.js.map → avatarGroup.component-Mfl8jvgp.js.map} +1 -1
- package/dist/chunks/{buttonGroup.component-BniN5aY0.js → buttonGroup.component-6ZBOJbfR.js} +2 -2
- package/dist/chunks/{buttonGroup.component-BniN5aY0.js.map → buttonGroup.component-6ZBOJbfR.js.map} +1 -1
- package/dist/chunks/{buttonGroup.component-CUgf40bo.js → buttonGroup.component-DQfB4Nj3.js} +2 -2
- package/dist/chunks/{buttonGroup.component-CUgf40bo.js.map → buttonGroup.component-DQfB4Nj3.js.map} +1 -1
- package/dist/chunks/{characterCounter.component-C5Ju67wX.js → characterCounter.component-4T8NHb11.js} +2 -2
- package/dist/chunks/{characterCounter.component-C5Ju67wX.js.map → characterCounter.component-4T8NHb11.js.map} +1 -1
- package/dist/chunks/{characterCounter.component-0krhcDgO.js → characterCounter.component-Cs0y0DOj.js} +3 -3
- package/dist/chunks/{characterCounter.component-0krhcDgO.js.map → characterCounter.component-Cs0y0DOj.js.map} +1 -1
- package/dist/chunks/checkbox.component-CFuJaYmY.js +2 -0
- package/dist/chunks/{checkbox.component-CanZsQHo.js.map → checkbox.component-CFuJaYmY.js.map} +1 -1
- package/dist/chunks/{checkbox.component-D1hf8o_B.js → checkbox.component-DqlWmIyY.js} +10 -10
- package/dist/chunks/{checkbox.component-D1hf8o_B.js.map → checkbox.component-DqlWmIyY.js.map} +1 -1
- package/dist/chunks/{checkbox.records-BtLBaHBy.js → checkbox.records-08YIiUZO.js} +12 -12
- package/dist/chunks/{checkbox.records-BtLBaHBy.js.map → checkbox.records-08YIiUZO.js.map} +1 -1
- package/dist/chunks/checkbox.records-B7refmmT.js +2 -0
- package/dist/chunks/{checkbox.records-wbkLltak.js.map → checkbox.records-B7refmmT.js.map} +1 -1
- package/dist/chunks/{checkboxGroup.component-yDUy5BQi.js → checkboxGroup.component-DBqDJvPC.js} +3 -3
- package/dist/chunks/{checkboxGroup.component-yDUy5BQi.js.map → checkboxGroup.component-DBqDJvPC.js.map} +1 -1
- package/dist/chunks/{checkboxGroup.component-CfynWbnU.js → checkboxGroup.component-DaxmsqdZ.js} +2 -2
- package/dist/chunks/{checkboxGroup.component-CfynWbnU.js.map → checkboxGroup.component-DaxmsqdZ.js.map} +1 -1
- package/dist/chunks/{config-B1FINd7s.js → config-DlTdf-Yt.js} +3 -3
- package/dist/chunks/{config-B1FINd7s.js.map → config-DlTdf-Yt.js.map} +1 -1
- package/dist/chunks/{conversationCard.component-E9e_Kl-G.js → conversationCard.component-Bg1Q9FdN.js} +18 -17
- package/dist/chunks/{conversationCard.component-E9e_Kl-G.js.map → conversationCard.component-Bg1Q9FdN.js.map} +1 -1
- package/dist/chunks/conversationCard.component-CBrw3VnT.js +2 -0
- package/dist/chunks/{conversationCard.component-C5lvyhtU.js.map → conversationCard.component-CBrw3VnT.js.map} +1 -1
- package/dist/chunks/{datePicker.component-Cv88ibpq.js → datePicker.component-DfQNebKg.js} +8 -8
- package/dist/chunks/{datePicker.component-Cv88ibpq.js.map → datePicker.component-DfQNebKg.js.map} +1 -1
- package/dist/chunks/datePicker.component-u52NQcza.js +15 -0
- package/dist/chunks/{datePicker.component-DabILO51.js.map → datePicker.component-u52NQcza.js.map} +1 -1
- package/dist/chunks/dialog-trigger-B5NK0lr-.js +2 -0
- package/dist/chunks/{dialog-trigger-BCeZGpGO.js.map → dialog-trigger-B5NK0lr-.js.map} +1 -1
- package/dist/chunks/{dialog-trigger-D2uDgMJr.js → dialog-trigger-BPlPzPU-.js} +9 -9
- package/dist/chunks/{dialog-trigger-D2uDgMJr.js.map → dialog-trigger-BPlPzPU-.js.map} +1 -1
- package/dist/chunks/{heading.component-DZ7kmGcE.js → heading.component-BXcyhAEU.js} +2 -2
- package/dist/chunks/{heading.component-DZ7kmGcE.js.map → heading.component-BXcyhAEU.js.map} +1 -1
- package/dist/chunks/{heading.component-CcrIqjxB.js → heading.component-ZD_UVarx.js} +2 -2
- package/dist/chunks/{heading.component-CcrIqjxB.js.map → heading.component-ZD_UVarx.js.map} +1 -1
- package/dist/chunks/{index-DZGYG5M4.js → index-BBZxmcrY.js} +2 -2
- package/dist/chunks/{index-DZGYG5M4.js.map → index-BBZxmcrY.js.map} +1 -1
- package/dist/chunks/index-BDnnTdaJ.js +2 -0
- package/dist/chunks/{index-CEYJbpt4.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-CBh9RZVL.js → index-BNYygzo-.js} +18 -17
- package/dist/chunks/{index-CBh9RZVL.js.map → index-BNYygzo-.js.map} +1 -1
- package/dist/chunks/index-BYf7SZUC.js +2 -0
- package/dist/chunks/{index-BfD9Ne2e.js.map → index-BYf7SZUC.js.map} +1 -1
- package/dist/chunks/{index-Cuu1x05z.js → index-C2kxTsiE.js} +17 -16
- package/dist/chunks/{index-Cuu1x05z.js.map → index-C2kxTsiE.js.map} +1 -1
- package/dist/chunks/index-COoMV9Mh.js +2 -0
- package/dist/chunks/{index-hGlTuPbK.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-B4fjIWcA.js.map → index-CZz7hHWb.js.map} +1 -1
- package/dist/chunks/{index-Cqwkg1hU.js → index-CjNAJEk5.js} +106 -105
- package/dist/chunks/{index-Cqwkg1hU.js.map → index-CjNAJEk5.js.map} +1 -1
- package/dist/chunks/{index-CZPHIn6T.js → index-Co91SHhW.js} +3 -3
- package/dist/chunks/{index-CZPHIn6T.js.map → index-Co91SHhW.js.map} +1 -1
- package/dist/chunks/{index-D5Dscg8T.js → index-D9DU-5GF.js} +49 -48
- package/dist/chunks/{index-D5Dscg8T.js.map → index-D9DU-5GF.js.map} +1 -1
- package/dist/chunks/{index-f4Ba8Pq7.js → index-DUHFrLMI.js} +15 -15
- package/dist/chunks/{index-f4Ba8Pq7.js.map → index-DUHFrLMI.js.map} +1 -1
- package/dist/chunks/{index-Dx94WMw1.js → index-DcJZ8q0f.js} +44 -43
- package/dist/chunks/{index-Dx94WMw1.js.map → index-DcJZ8q0f.js.map} +1 -1
- package/dist/chunks/index-Dyxhds_1.js +2 -0
- package/dist/chunks/{index-5cRW642o.js.map → index-Dyxhds_1.js.map} +1 -1
- package/dist/chunks/{index-DMSZTX7A.js → index-MDMqrELk.js} +9 -9
- package/dist/chunks/{index-DMSZTX7A.js.map → index-MDMqrELk.js.map} +1 -1
- package/dist/chunks/index-MlhL0PDC.js +2 -0
- package/dist/chunks/{index-CFnNmQf0.js.map → index-MlhL0PDC.js.map} +1 -1
- package/dist/chunks/{index-Dq91nN6-.js → index-S1uNQPZj.js} +3 -3
- package/dist/chunks/{index-Dq91nN6-.js.map → index-S1uNQPZj.js.map} +1 -1
- package/dist/chunks/index-UWtj4ULm.js +8 -0
- package/dist/chunks/{index-CedYIQt5.js.map → index-UWtj4ULm.js.map} +1 -1
- package/dist/chunks/index-ZaGEDS_0.js +2 -0
- package/dist/chunks/{index-BmcSWiFh.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/{logo.types-CXQsathd.js → logo.types-By8TqyNf.js} +2 -2
- package/dist/chunks/{logo.types-CXQsathd.js.map → logo.types-By8TqyNf.js.map} +1 -1
- package/dist/chunks/menu.component-CiZzHc2D.js +2 -0
- package/dist/chunks/{menu.component-BsIFHOah.js.map → menu.component-CiZzHc2D.js.map} +1 -1
- package/dist/chunks/{menu.component-bdDcCEay.js → menu.component-D4gknsq1.js} +26 -26
- package/dist/chunks/{menu.component-bdDcCEay.js.map → menu.component-D4gknsq1.js.map} +1 -1
- package/dist/chunks/modal.types-9-Bz6ybC.js +2 -0
- package/dist/chunks/{modal.types-DYw_hPtT.js.map → modal.types-9-Bz6ybC.js.map} +1 -1
- package/dist/chunks/{modal.types-vrGXh5fF.js → modal.types-BV8Eand2.js} +5 -5
- package/dist/chunks/{modal.types-vrGXh5fF.js.map → modal.types-BV8Eand2.js.map} +1 -1
- package/dist/chunks/{notificationCounter.component-DMr4Mlm9.js → notificationCounter.component-Bei8mHSZ.js} +2 -2
- package/dist/chunks/{notificationCounter.component-DMr4Mlm9.js.map → notificationCounter.component-Bei8mHSZ.js.map} +1 -1
- package/dist/chunks/pinInput.types-B-RchRm_.js +2 -0
- package/dist/chunks/{pinInput.types-DHBICngh.js.map → pinInput.types-B-RchRm_.js.map} +1 -1
- package/dist/chunks/{pinInput.types-jvCDRIOC.js → pinInput.types-U7Tfj5It.js} +8 -8
- package/dist/chunks/{pinInput.types-jvCDRIOC.js.map → pinInput.types-U7Tfj5It.js.map} +1 -1
- package/dist/chunks/popover-80QH8HEJ.js +2 -0
- package/dist/chunks/{popover-DPEovmxh.js.map → popover-80QH8HEJ.js.map} +1 -1
- package/dist/chunks/{popover-D0QoPsrG.js → popover-B9rNOU0g.js} +26 -26
- package/dist/chunks/{popover-D0QoPsrG.js.map → popover-B9rNOU0g.js.map} +1 -1
- package/dist/chunks/{popover-root-provider-Dt02njg5.js → popover-root-provider-CeLLpesI.js} +8 -8
- package/dist/chunks/{popover-root-provider-Dt02njg5.js.map → popover-root-provider-CeLLpesI.js.map} +1 -1
- package/dist/chunks/popover-root-provider-DAMDDAHQ.js +2 -0
- package/dist/chunks/{popover-root-provider-BYJE5I-P.js.map → popover-root-provider-DAMDDAHQ.js.map} +1 -1
- package/dist/chunks/popover.component-A8In7d2B.js +2 -0
- package/dist/chunks/popover.component-A8In7d2B.js.map +1 -0
- package/dist/chunks/popover.component-BR8W3Jb8.js +322 -0
- package/dist/chunks/popover.component-BR8W3Jb8.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-CzNYznSb.js → radio.records-D7VFHW-s.js} +16 -16
- package/dist/chunks/{radio.records-CzNYznSb.js.map → radio.records-D7VFHW-s.js.map} +1 -1
- package/dist/chunks/radio.records-DLffZyeq.js +2 -0
- package/dist/chunks/{radio.records-CEgwvLIL.js.map → radio.records-DLffZyeq.js.map} +1 -1
- package/dist/chunks/radioGroup.component-CZwrCppd.js +2 -0
- package/dist/chunks/{radioGroup.component-BhR1aKj7.js.map → radioGroup.component-CZwrCppd.js.map} +1 -1
- package/dist/chunks/{radioGroup.component-CyJiJHx5.js → radioGroup.component-DVsMiHFI.js} +11 -11
- package/dist/chunks/{radioGroup.component-CyJiJHx5.js.map → radioGroup.component-DVsMiHFI.js.map} +1 -1
- package/dist/chunks/{ratingDots.component-HUIKoSFb.js → ratingDots.component-1U-hoEpC.js} +4 -4
- package/dist/chunks/{ratingDots.component-HUIKoSFb.js.map → ratingDots.component-1U-hoEpC.js.map} +1 -1
- package/dist/chunks/{ratingDots.component-BKUKL6Mz.js → ratingDots.component-qbroWQhZ.js} +2 -2
- package/dist/chunks/{ratingDots.component-BKUKL6Mz.js.map → ratingDots.component-qbroWQhZ.js.map} +1 -1
- package/dist/chunks/render-strategy-BmWbSgqh.js +2 -0
- package/dist/chunks/{render-strategy-CdSSbgPU.js.map → render-strategy-BmWbSgqh.js.map} +1 -1
- package/dist/chunks/{render-strategy-ql9Qx5Cz.js → render-strategy-C8hwN3bm.js} +2 -2
- package/dist/chunks/{render-strategy-ql9Qx5Cz.js.map → render-strategy-C8hwN3bm.js.map} +1 -1
- package/dist/chunks/{select.component-DLt_2xlg.js → select.component-5vAzdrZa.js} +44 -44
- package/dist/chunks/{select.component-DLt_2xlg.js.map → select.component-5vAzdrZa.js.map} +1 -1
- package/dist/chunks/select.component-C_Fs6Xeq.js +2 -0
- package/dist/chunks/{select.component-8ukrnBdk.js.map → select.component-C_Fs6Xeq.js.map} +1 -1
- package/dist/chunks/{sortableList.component-B_7TyrzG.js → sortableList.component-BX3EvpRM.js} +3 -3
- package/dist/chunks/{sortableList.component-B_7TyrzG.js.map → sortableList.component-BX3EvpRM.js.map} +1 -1
- package/dist/chunks/{sortableList.component-CR53llzt.js → sortableList.component-B_O-YB3I.js} +3 -3
- package/dist/chunks/{sortableList.component-CR53llzt.js.map → sortableList.component-B_O-YB3I.js.map} +1 -1
- package/dist/chunks/{spinner.component-DIyDNcWp.js → spinner.component-CzhcJOwX.js} +2 -2
- package/dist/chunks/{spinner.component-DIyDNcWp.js.map → spinner.component-CzhcJOwX.js.map} +1 -1
- package/dist/chunks/{spinner.component-Bir81DbZ.js → spinner.component-lHj69hIF.js} +3 -3
- package/dist/chunks/{spinner.component-Bir81DbZ.js.map → spinner.component-lHj69hIF.js.map} +1 -1
- package/dist/chunks/{styledAvatar.types-CbfoVHIB.js → styledAvatar.types-B9SHiNfg.js} +2 -2
- package/dist/chunks/{styledAvatar.types-CbfoVHIB.js.map → styledAvatar.types-B9SHiNfg.js.map} +1 -1
- package/dist/chunks/{styledAvatar.types-BjuO516j.js → styledAvatar.types-BvHm6hKS.js} +2 -2
- package/dist/chunks/{styledAvatar.types-BjuO516j.js.map → styledAvatar.types-BvHm6hKS.js.map} +1 -1
- package/dist/chunks/{swatch.types-B8OSJZ-a.js → swatch.types-DbgA3RWc.js} +2 -2
- package/dist/chunks/{swatch.types-B8OSJZ-a.js.map → swatch.types-DbgA3RWc.js.map} +1 -1
- package/dist/chunks/switch.component-B3Gfgft9.js +2 -0
- package/dist/chunks/{switch.component-CPhSaMqG.js.map → switch.component-B3Gfgft9.js.map} +1 -1
- package/dist/chunks/{switch.component-Dpu_wRns.js → switch.component-DjOGsCIQ.js} +11 -11
- package/dist/chunks/{switch.component-Dpu_wRns.js.map → switch.component-DjOGsCIQ.js.map} +1 -1
- package/dist/chunks/{tabs.component-BHGBxzEH.js → tabs.component-Ca9jVGv0.js} +48 -48
- package/dist/chunks/{tabs.component-BHGBxzEH.js.map → tabs.component-Ca9jVGv0.js.map} +1 -1
- package/dist/chunks/tabs.component-pl0kO5_M.js +2 -0
- package/dist/chunks/{tabs.component-CY9u7o56.js.map → tabs.component-pl0kO5_M.js.map} +1 -1
- package/dist/chunks/{tagBlock.component-LnQADvWP.js → tagBlock.component-C2DAQrQE.js} +2 -2
- package/dist/chunks/{tagBlock.component-LnQADvWP.js.map → tagBlock.component-C2DAQrQE.js.map} +1 -1
- package/dist/chunks/{tagBlock.component-3imRPwFH.js → tagBlock.component-CnPbyaGH.js} +5 -5
- package/dist/chunks/{tagBlock.component-3imRPwFH.js.map → tagBlock.component-CnPbyaGH.js.map} +1 -1
- package/dist/chunks/text.component-CnnBhB3c.js +2 -0
- package/dist/chunks/text.component-CnnBhB3c.js.map +1 -0
- package/dist/chunks/text.component-Cpruo7MB.js +12 -0
- package/dist/chunks/text.component-Cpruo7MB.js.map +1 -0
- package/dist/chunks/textInput.component-D-galjwy.js +2 -0
- package/dist/chunks/{textInput.component-BJ3ija0b.js.map → textInput.component-D-galjwy.js.map} +1 -1
- package/dist/chunks/{textInput.component-4YWnSJOZ.js → textInput.component-DXtEgbkr.js} +12 -12
- package/dist/chunks/{textInput.component-4YWnSJOZ.js.map → textInput.component-DXtEgbkr.js.map} +1 -1
- package/dist/chunks/textarea.component-DmxMuMCU.js +2 -0
- package/dist/chunks/{textarea.component-zej8Yk62.js.map → textarea.component-DmxMuMCU.js.map} +1 -1
- package/dist/chunks/{textarea.component-GhlEwhHu.js → textarea.component-Do0zHf-1.js} +7 -7
- package/dist/chunks/{textarea.component-GhlEwhHu.js.map → textarea.component-Do0zHf-1.js.map} +1 -1
- package/dist/chunks/theme.provider-CIJGn9Kh.js +26 -0
- package/dist/chunks/theme.provider-CIJGn9Kh.js.map +1 -0
- package/dist/chunks/{theme.provider-D_vTiS-g.js → theme.provider-Dj4pZ815.js} +1699 -1830
- package/dist/chunks/theme.provider-Dj4pZ815.js.map +1 -0
- package/dist/chunks/{timePicker.component-C7StGDmo.js → timePicker.component-CophNE3d.js} +2 -2
- package/dist/chunks/{timePicker.component-C7StGDmo.js.map → timePicker.component-CophNE3d.js.map} +1 -1
- package/dist/chunks/{timePicker.component-DBzIM9G4.js → timePicker.component-DTs3MjOx.js} +4 -4
- package/dist/chunks/{timePicker.component-DBzIM9G4.js.map → timePicker.component-DTs3MjOx.js.map} +1 -1
- package/dist/chunks/{timeRange.component-CNLSxsSZ.js → timeRange.component-C5dt8sZn.js} +2 -2
- package/dist/chunks/{timeRange.component-CNLSxsSZ.js.map → timeRange.component-C5dt8sZn.js.map} +1 -1
- package/dist/chunks/{timeRange.component-BceK2COI.js → timeRange.component-C5wSyUiZ.js} +2 -2
- package/dist/chunks/{timeRange.component-BceK2COI.js.map → timeRange.component-C5wSyUiZ.js.map} +1 -1
- package/dist/chunks/timestamp.component-BPU8bf7p.js +54 -0
- package/dist/chunks/{timestamp.component-CbhzpqAt.js.map → timestamp.component-BPU8bf7p.js.map} +1 -1
- package/dist/chunks/timestamp.component-rTLrzBPA.js +2 -0
- package/dist/chunks/{timestamp.component-DWGPmV_e.js.map → timestamp.component-rTLrzBPA.js.map} +1 -1
- package/dist/chunks/{toaster.records-Cf8bpHo8.js → toaster.records-BGfpUOVt.js} +22 -21
- package/dist/chunks/{toaster.records-Cf8bpHo8.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-CwrXAVEq.js +2 -0
- package/dist/chunks/tooltip.component-CwrXAVEq.js.map +1 -0
- package/dist/chunks/tooltip.component-DgOzrNG3.js +758 -0
- package/dist/chunks/tooltip.component-DgOzrNG3.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-Xg59taw9.js → typography.records-jnjWfTLS.js} +2 -2
- package/dist/chunks/{typography.records-Xg59taw9.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-xBX4EpFz.js.map → use-field-context--wBJQY1R.js.map} +1 -1
- package/dist/chunks/{use-field-context-C4IwmN39.js → use-field-context-B_G7Yziz.js} +2 -2
- package/dist/chunks/{use-field-context-C4IwmN39.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/{portal-D2KZrSzZ.js → use-locale-context-D-agiW5E.js} +242 -242
- package/dist/chunks/use-locale-context-D-agiW5E.js.map +1 -0
- package/dist/chunks/{withFormControl-Cb632r_x.js → withFormControl-BDuV97Vb.js} +49 -49
- package/dist/chunks/{withFormControl-Cb632r_x.js.map → withFormControl-BDuV97Vb.js.map} +1 -1
- package/dist/chunks/withFormControl-DpytztWF.js +2 -0
- package/dist/chunks/{withFormControl-BI8pqhZl.js.map → withFormControl-DpytztWF.js.map} +1 -1
- package/dist/chunks/withTruncation-DPbMF-jg.js +2 -0
- package/dist/chunks/withTruncation-DPbMF-jg.js.map +1 -0
- package/dist/chunks/withTruncation-DoQriKuH.js +67 -0
- package/dist/chunks/withTruncation-DoQriKuH.js.map +1 -0
- package/dist/chunks/{wrap-CYgSj8wY.js → wrap-B8tBNeBY.js} +2 -2
- package/dist/chunks/{wrap-CYgSj8wY.js.map → wrap-B8tBNeBY.js.map} +1 -1
- 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/ButtonGroup/index.cjs +1 -1
- package/dist/cjs/components/CharacterCounter/index.cjs +1 -1
- package/dist/cjs/components/Checkbox/index.cjs +1 -1
- package/dist/cjs/components/CheckboxGroup/index.cjs +1 -1
- package/dist/cjs/components/ConversationCard/index.cjs +1 -1
- package/dist/cjs/components/DatePicker/index.cjs +1 -1
- package/dist/cjs/components/Heading/index.cjs +1 -1
- package/dist/cjs/components/Menu/index.cjs +1 -1
- package/dist/cjs/components/Modal/index.cjs +1 -1
- package/dist/cjs/components/PinInput/index.cjs +1 -1
- package/dist/cjs/components/Popover/index.cjs +1 -1
- package/dist/cjs/components/RadioGroup/index.cjs +1 -1
- package/dist/cjs/components/RatingDots/index.cjs +1 -1
- package/dist/cjs/components/Select/index.cjs +1 -1
- package/dist/cjs/components/SortableList/index.cjs +1 -1
- package/dist/cjs/components/Spinner/index.cjs +1 -1
- package/dist/cjs/components/StyledAvatar/index.cjs +1 -1
- package/dist/cjs/components/Switch/index.cjs +1 -1
- package/dist/cjs/components/Tabs/index.cjs +1 -1
- package/dist/cjs/components/TagBlock/index.cjs +1 -1
- package/dist/cjs/components/Text/index.cjs +1 -1
- package/dist/cjs/components/TextInput/index.cjs +1 -1
- package/dist/cjs/components/Textarea/index.cjs +1 -1
- package/dist/cjs/components/TimePicker/index.cjs +1 -1
- package/dist/cjs/components/TimeRange/index.cjs +1 -1
- package/dist/cjs/components/Timestamp/index.cjs +1 -1
- package/dist/cjs/components/Toast/index.cjs +1 -1
- package/dist/cjs/components/Tooltip/index.cjs +1 -1
- package/dist/cjs/components/index.cjs +1 -1
- package/dist/cjs/index.cjs +1 -1
- package/dist/cjs/theme/index.cjs +1 -1
- package/dist/esm/chakra/index.js +69 -69
- package/dist/esm/components/Alert/index.js +1 -1
- package/dist/esm/components/Avatar/index.js +1 -1
- package/dist/esm/components/AvatarGroup/index.js +1 -1
- package/dist/esm/components/ButtonGroup/index.js +1 -1
- package/dist/esm/components/CharacterCounter/index.js +1 -1
- package/dist/esm/components/Checkbox/index.js +1 -1
- package/dist/esm/components/CheckboxGroup/index.js +1 -1
- package/dist/esm/components/ConversationCard/index.js +1 -1
- package/dist/esm/components/DatePicker/index.js +1 -1
- package/dist/esm/components/Heading/index.js +1 -1
- package/dist/esm/components/Logo/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/NotificationCounter/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/Swatch/index.js +1 -1
- package/dist/esm/components/Switch/index.js +1 -1
- package/dist/esm/components/Tabs/index.js +1 -1
- package/dist/esm/components/TagBlock/index.js +1 -1
- package/dist/esm/components/Text/index.js +1 -1
- package/dist/esm/components/TextInput/index.js +1 -1
- package/dist/esm/components/Textarea/index.js +1 -1
- package/dist/esm/components/TimePicker/index.js +1 -1
- package/dist/esm/components/TimeRange/index.js +1 -1
- package/dist/esm/components/Timestamp/index.js +1 -1
- package/dist/esm/components/Toast/index.js +1 -1
- package/dist/esm/components/Tooltip/index.js +1 -1
- package/dist/esm/components/index.js +42 -41
- package/dist/esm/components/index.js.map +1 -1
- package/dist/esm/index.js +61 -60
- 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/TimePicker/timePicker.recipe.d.ts +1 -1
- package/dist/types/components/Tooltip/tooltip.component.d.ts +6 -5
- package/dist/types/theme/tokens/shadows/shadows.config.d.ts +3 -3
- package/dist/types/theme/tokens/sizes/sizes.config.d.ts +3 -3
- package/dist/types/theme/tokens/zIndices/zIndices.config.d.ts +10 -10
- package/package.json +1 -1
- package/dist/chunks/avatar.component-Bx-G6wRN.js +0 -2
- package/dist/chunks/checkbox.component-CanZsQHo.js +0 -2
- package/dist/chunks/checkbox.records-wbkLltak.js +0 -2
- package/dist/chunks/conversationCard.component-C5lvyhtU.js +0 -2
- package/dist/chunks/datePicker.component-DabILO51.js +0 -15
- package/dist/chunks/dialog-trigger-BCeZGpGO.js +0 -2
- package/dist/chunks/index-5cRW642o.js +0 -2
- package/dist/chunks/index-B4fjIWcA.js +0 -2
- package/dist/chunks/index-BfD9Ne2e.js +0 -2
- package/dist/chunks/index-BlGAWSIX.js +0 -3
- package/dist/chunks/index-BlGAWSIX.js.map +0 -1
- package/dist/chunks/index-BmcSWiFh.js +0 -2
- package/dist/chunks/index-C323eOJV.js +0 -1328
- package/dist/chunks/index-C323eOJV.js.map +0 -1
- package/dist/chunks/index-CEYJbpt4.js +0 -2
- package/dist/chunks/index-CFnNmQf0.js +0 -2
- package/dist/chunks/index-CedYIQt5.js +0 -8
- package/dist/chunks/index-Fztcdoo_.js +0 -2
- package/dist/chunks/index-Fztcdoo_.js.map +0 -1
- package/dist/chunks/index-WyVSig7F.js +0 -70
- package/dist/chunks/index-WyVSig7F.js.map +0 -1
- package/dist/chunks/index-hGlTuPbK.js +0 -2
- package/dist/chunks/menu.component-BsIFHOah.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-DYw_hPtT.js +0 -2
- package/dist/chunks/pinInput.types-DHBICngh.js +0 -2
- package/dist/chunks/popover-DPEovmxh.js +0 -2
- package/dist/chunks/popover-root-provider-BYJE5I-P.js +0 -2
- package/dist/chunks/popover.component-BmB0qwpj.js +0 -264
- package/dist/chunks/popover.component-BmB0qwpj.js.map +0 -1
- package/dist/chunks/popover.component-DUX4fJNk.js +0 -2
- package/dist/chunks/popover.component-DUX4fJNk.js.map +0 -1
- package/dist/chunks/popover.recipe-BLsWPsAa.js +0 -124
- package/dist/chunks/popover.recipe-BLsWPsAa.js.map +0 -1
- package/dist/chunks/popover.recipe-av5Jdn1r.js +0 -2
- package/dist/chunks/popover.recipe-av5Jdn1r.js.map +0 -1
- package/dist/chunks/portal-D2KZrSzZ.js.map +0 -1
- package/dist/chunks/portal-TWtD47zg.js +0 -22
- package/dist/chunks/portal-TWtD47zg.js.map +0 -1
- package/dist/chunks/radio.records-CEgwvLIL.js +0 -2
- package/dist/chunks/radioGroup.component-BhR1aKj7.js +0 -2
- package/dist/chunks/render-strategy-CdSSbgPU.js +0 -2
- package/dist/chunks/select.component-8ukrnBdk.js +0 -2
- package/dist/chunks/switch.component-CPhSaMqG.js +0 -2
- package/dist/chunks/tabs.component-CY9u7o56.js +0 -2
- package/dist/chunks/textInput.component-BJ3ija0b.js +0 -2
- package/dist/chunks/textarea.component-zej8Yk62.js +0 -2
- package/dist/chunks/theme.provider-CkBtkwtf.js +0 -26
- package/dist/chunks/theme.provider-CkBtkwtf.js.map +0 -1
- package/dist/chunks/theme.provider-D_vTiS-g.js.map +0 -1
- package/dist/chunks/timestamp.component-CbhzpqAt.js +0 -53
- package/dist/chunks/timestamp.component-DWGPmV_e.js +0 -2
- package/dist/chunks/toaster.records-CGym-iT-.js +0 -2
- package/dist/chunks/use-field-context-xBX4EpFz.js +0 -2
- package/dist/chunks/withFormControl-BI8pqhZl.js +0 -2
- package/dist/chunks/withTruncation-CDgWfFpO.js +0 -562
- package/dist/chunks/withTruncation-CDgWfFpO.js.map +0 -1
- package/dist/chunks/withTruncation-XdRr8uDJ.js +0 -2
- package/dist/chunks/withTruncation-XdRr8uDJ.js.map +0 -1
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { j as t } from "./jsx-runtime-C5mzlN2N.js";
|
|
2
2
|
import y, { forwardRef as j, Children as b, cloneElement as T, useMemo as k } from "react";
|
|
3
|
-
import { w as A } from "./withFormControl-
|
|
3
|
+
import { w as A } from "./withFormControl-BDuV97Vb.js";
|
|
4
4
|
import { B as v } from "./button.component-BpF3MzbZ.js";
|
|
5
|
-
import { C as w } from "./characterCounter.component-
|
|
5
|
+
import { C as w } from "./characterCounter.component-Cs0y0DOj.js";
|
|
6
6
|
import { B as N } from "./box-Ck9I7FYv.js";
|
|
7
7
|
import { E as B } from "./empty-BU2EAux9.js";
|
|
8
8
|
import { c as C } from "./factory-Ctbv0Ozn.js";
|
|
9
9
|
import { u as R } from "./use-recipe-d63ABaZ3.js";
|
|
10
10
|
import { G as S } from "./group-DPCVolOl.js";
|
|
11
11
|
import { c as G } from "./create-recipe-context-D7FewUR4.js";
|
|
12
|
-
import { f as F } from "./
|
|
13
|
-
import { u as z } from "./use-field-context-
|
|
14
|
-
import {
|
|
12
|
+
import { f as F } from "./use-locale-context-D-agiW5E.js";
|
|
13
|
+
import { u as z } from "./use-field-context-B_G7Yziz.js";
|
|
14
|
+
import { Y as M } from "./index-CYk-7wwG.js";
|
|
15
15
|
const E = j((r, n) => {
|
|
16
16
|
const e = z(), o = M(e?.getInputProps(), r);
|
|
17
17
|
return /* @__PURE__ */ t.jsx(F.input, { ...o, ref: n });
|
|
@@ -46,7 +46,7 @@ const { withContext: O } = G({
|
|
|
46
46
|
}
|
|
47
47
|
}
|
|
48
48
|
}
|
|
49
|
-
}),
|
|
49
|
+
}), Y = j(
|
|
50
50
|
function(n, e) {
|
|
51
51
|
const {
|
|
52
52
|
startElement: o,
|
|
@@ -86,11 +86,11 @@ const { withContext: O } = G({
|
|
|
86
86
|
}
|
|
87
87
|
);
|
|
88
88
|
}
|
|
89
|
-
),
|
|
89
|
+
), D = {
|
|
90
90
|
sm: "xs",
|
|
91
91
|
md: "sm",
|
|
92
92
|
lg: "md"
|
|
93
|
-
},
|
|
93
|
+
}, L = A(
|
|
94
94
|
({
|
|
95
95
|
charLimit: r = void 0,
|
|
96
96
|
clearable: n = !1,
|
|
@@ -115,7 +115,7 @@ const { withContext: O } = G({
|
|
|
115
115
|
{
|
|
116
116
|
className: "TextInput__ClearButton",
|
|
117
117
|
"data-testid": "kibble-text-input-clear-button",
|
|
118
|
-
size:
|
|
118
|
+
size: D[c],
|
|
119
119
|
variant: "ghostNeutral",
|
|
120
120
|
onClick: x,
|
|
121
121
|
iconName: "close"
|
|
@@ -127,7 +127,7 @@ const { withContext: O } = G({
|
|
|
127
127
|
);
|
|
128
128
|
return /* @__PURE__ */ t.jsxs(N, { className: "TextInput__Wrapper", position: "relative", w: "100%", children: [
|
|
129
129
|
/* @__PURE__ */ t.jsx(
|
|
130
|
-
|
|
130
|
+
Y,
|
|
131
131
|
{
|
|
132
132
|
className: "TextInput__InputGroup",
|
|
133
133
|
"data-testid": "kibble-text-input-group",
|
|
@@ -171,10 +171,10 @@ const { withContext: O } = G({
|
|
|
171
171
|
] });
|
|
172
172
|
}
|
|
173
173
|
), $ = y.forwardRef(
|
|
174
|
-
(r, n) => /* @__PURE__ */ t.jsx(
|
|
174
|
+
(r, n) => /* @__PURE__ */ t.jsx(L, { inputRef: n, ...r })
|
|
175
175
|
);
|
|
176
176
|
$.displayName = "TextInput";
|
|
177
177
|
export {
|
|
178
178
|
$ as W
|
|
179
179
|
};
|
|
180
|
-
//# sourceMappingURL=textInput.component-
|
|
180
|
+
//# sourceMappingURL=textInput.component-DXtEgbkr.js.map
|
package/dist/chunks/{textInput.component-4YWnSJOZ.js.map → textInput.component-DXtEgbkr.js.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"textInput.component-4YWnSJOZ.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,EA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AAqB,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]}
|
|
1
|
+
{"version":3,"file":"textInput.component-DXtEgbkr.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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AA;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 c=require("./jsx-runtime-BjDatQAs.js"),u=require("react"),h=require("./withFormControl-DpytztWF.js"),v=require("./characterCounter.component-4T8NHb11.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-DmxMuMCU.js.map
|
package/dist/chunks/{textarea.component-zej8Yk62.js.map → textarea.component-DmxMuMCU.js.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"textarea.component-zej8Yk62.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,EAAmB,OAAO,eAAeT,CAAE,EAC3CU,EAAa,OAAO,yBAAy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MD,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-DmxMuMCU.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,eAAeT,EAAI,QAAS,CACjC,GAAGU,EACH,KAAM,CACJA,GA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7B,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,15 +1,15 @@
|
|
|
1
1
|
import { j as d } from "./jsx-runtime-C5mzlN2N.js";
|
|
2
2
|
import f, { forwardRef as u, useRef as l, useEffect as x, useMemo as v } from "react";
|
|
3
|
-
import { w as g } from "./withFormControl-
|
|
4
|
-
import { C as h } from "./characterCounter.component-
|
|
3
|
+
import { w as g } from "./withFormControl-BDuV97Vb.js";
|
|
4
|
+
import { C as h } from "./characterCounter.component-Cs0y0DOj.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 { e as
|
|
8
|
-
import { f as j, h as R } from "./
|
|
9
|
-
import { u as O } from "./use-field-context-
|
|
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
10
|
var E = (e) => {
|
|
11
11
|
if (!e) return;
|
|
12
|
-
const t =
|
|
12
|
+
const t = y(e), o = F(e), s = C(e), r = () => {
|
|
13
13
|
requestAnimationFrame(() => {
|
|
14
14
|
e.style.height = "auto";
|
|
15
15
|
let i;
|
|
@@ -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-Do0zHf-1.js.map
|
package/dist/chunks/{textarea.component-GhlEwhHu.js.map → textarea.component-Do0zHf-1.js.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"textarea.component-GhlEwhHu.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,UAAIQ;AACJ,MAAIP,EAAM,cAAc,gBACtBO,IAAYR,EAAG,gBAAgB,WAAWC,EAAM,UAAU,IAAI,WAAWA,EAAM,aAAa,KAE5FO,IAAYR,EAAG,eAAe,WAAWC,EAAM,cAAc,IAAI,WAAWA,EAAM,iBAAiB,GAEjGA,EAAM,cAAc,UAAUO,IAAY,WAAWP,EAAM,SAAS,KAClEA,EAAM,cAAc,aACtBD,EAAG,MAAM,YAAY,WAEvBQ,IAAY,WAAWP,EAAM,SAAS,KAC7BA,EAAM,cAAc,aAC7BD,EAAG,MAAM,YAAY,WAEvBA,EAAG,MAAM,SAAS,GAAGQ,CAAS;AAAA,IACpC,CAAK;AAAA,EACF;AACD,EAAAR,EAAG,iBAAiB,SAASO,CAAM,GACnCP,EAAG,MAAM,iBAAiB,SAASO,CAAM;AACzC,QAAME,IAAmB,OAAO,eAAeT,CAAE,GAC3CU,IAAa,OAAO,yBAAyBD,GAAkB,OAAO;AAC5E,SAAO,eAAeT,GAAI,SAAS;AAAA,IACjC,GAAGU;AAAA,IACH,MAAM;AACJ,MAAAA,GAAY,KAAK,MAAM,MAAM,SAAS,GACtCH,EAAQ;AAAA,IACd;AAAA,EACA,CAAG;AACD,QAAMI,IAAiB,IAAIR,EAAI,eAAe,MAAM;AAClD,0BAAsB,MAAMI,GAAQ;AAAA,EACxC,CAAG;AACD,EAAAI,EAAe,QAAQX,CAAE;AACzB,QAAMY,IAAe,IAAIT,EAAI,i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Y,UAAU;AAAA,MACnC,CAACA,CAAK;AAAA,IACR;AAEA,kCACGK,GAAK,EAAA,WAAU,qBAAoB,UAAS,YAAW,GAAE,QACxD,UAAA;AAAA,MAAAhB,gBAAAA,EAAA;AAAA,QAACiB;AAAAA,QAAA;AAAA,UACC,WAAU;AAAA,UACV,eAAY;AAAA,UACZ,QAAApC;AAAA,UACA,SAASgC;AAAA,UACT,OAAAF;AAAA,UACC,GAAIF,KAAW,EAAE,gBAAgB,GAAK;AAAA,UACvC,MAAK;AAAA,UACJ,GAAGG;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-Do0zHf-1.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,UAAIQ;AACJ,MAAIP,EAAM,cAAc,gBACtBO,IAAYR,EAAG,gBAAgB,WAAWC,EAAM,UAAU,IAAI,WAAWA,EAAM,aAAa,KAE5FO,IAAYR,EAAG,eAAe,WAAWC,EAAM,cAAc,IAAI,WAAWA,EAAM,iBAAiB,GAEjGA,EAAM,cAAc,UAAUO,IAAY,WAAWP,EAAM,SAAS,KAClEA,EAAM,cAAc,aACtBD,EAAG,MAAM,YAAY,WAEvBQ,IAAY,WAAWP,EAAM,SAAS,KAC7BA,EAAM,cAAc,aAC7BD,EAAG,MAAM,YAAY,WAEvBA,EAAG,MAAM,SAAS,GAAGQ,CAAS;AAAA,IACpC,CAAK;AAAA,EACF;AACD,EAAAR,EAAG,iBAAiB,SAASO,CAAM,GACnCP,EAAG,MAAM,iBAAiB,SAASO,CAAM;AACzC,QAAME,IAAmB,OAAO,eAAeT,CAAE,GAC3CU,IAAa,OAAO,yBAAyBD,GAAkB,OAAO;AAC5E,SAAO,eAAeT,GAAI,SAAS;AAAA,IACjC,GAAGU;AAAA,IACH,MAAM;AACJ,MAAAA,GAAY,KAAK,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