@televet/kibble-ui 5.0.28-rb.0 → 5.0.28
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.component-nhRTQ5KK.js → alert.component-B0gDwaKQ.js} +2 -2
- package/dist/chunks/{alert.component-nhRTQ5KK.js.map → alert.component-B0gDwaKQ.js.map} +1 -1
- package/dist/chunks/{alert.component-OcRbeRJa.js → alert.component-B2kzYzhv.js} +3 -3
- package/dist/chunks/{alert.component-OcRbeRJa.js.map → alert.component-B2kzYzhv.js.map} +1 -1
- package/dist/chunks/{avatarGroup.component-CJCQSIyr.js → avatarGroup.component-CUOKTQHZ.js} +2 -2
- package/dist/chunks/{avatarGroup.component-CJCQSIyr.js.map → avatarGroup.component-CUOKTQHZ.js.map} +1 -1
- package/dist/chunks/{avatarGroup.component-BPhQpVYM.js → avatarGroup.component-z6SzTzKR.js} +3 -3
- package/dist/chunks/{avatarGroup.component-BPhQpVYM.js.map → avatarGroup.component-z6SzTzKR.js.map} +1 -1
- package/dist/chunks/{buttonGroup.component-pR0mvmm7.js → buttonGroup.component-CHbRCpMI.js} +2 -2
- package/dist/chunks/{buttonGroup.component-pR0mvmm7.js.map → buttonGroup.component-CHbRCpMI.js.map} +1 -1
- package/dist/chunks/{buttonGroup.component-CO5lC36l.js → buttonGroup.component-CYJxaqK1.js} +2 -2
- package/dist/chunks/{buttonGroup.component-CO5lC36l.js.map → buttonGroup.component-CYJxaqK1.js.map} +1 -1
- package/dist/chunks/calendar.component-BpDNoBAZ.js +62 -0
- package/dist/chunks/calendar.component-BpDNoBAZ.js.map +1 -0
- package/dist/chunks/calendar.component-C2bzItDq.js +2 -0
- package/dist/chunks/calendar.component-C2bzItDq.js.map +1 -0
- package/dist/chunks/{characterCounter.component-BRHLt929.js → characterCounter.component-CczgC612.js} +2 -2
- package/dist/chunks/{characterCounter.component-BRHLt929.js.map → characterCounter.component-CczgC612.js.map} +1 -1
- package/dist/chunks/{characterCounter.component-DI_FQNUR.js → characterCounter.component-Cm9yEHjz.js} +2 -2
- package/dist/chunks/{characterCounter.component-DI_FQNUR.js.map → characterCounter.component-Cm9yEHjz.js.map} +1 -1
- package/dist/chunks/{checkbox.component-DUJCiZr2.js → checkbox.component-Bytw6Mk1.js} +3 -3
- package/dist/chunks/{checkbox.component-DUJCiZr2.js.map → checkbox.component-Bytw6Mk1.js.map} +1 -1
- package/dist/chunks/{checkbox.component-C132vkan.js → checkbox.component-CrTnnQ30.js} +2 -2
- package/dist/chunks/{checkbox.component-C132vkan.js.map → checkbox.component-CrTnnQ30.js.map} +1 -1
- package/dist/chunks/{checkboxGroup.component-DW9qUlSm.js → checkboxGroup.component-Bf_yc-Fl.js} +3 -3
- package/dist/chunks/{checkboxGroup.component-DW9qUlSm.js.map → checkboxGroup.component-Bf_yc-Fl.js.map} +1 -1
- package/dist/chunks/{checkboxGroup.component-2U0ZW1TD.js → checkboxGroup.component-CndHvReL.js} +2 -2
- package/dist/chunks/{checkboxGroup.component-2U0ZW1TD.js.map → checkboxGroup.component-CndHvReL.js.map} +1 -1
- package/dist/chunks/{conversationCard.component-CscMIq51.js → conversationCard.component-BKXSq7NS.js} +2 -2
- package/dist/chunks/{conversationCard.component-CscMIq51.js.map → conversationCard.component-BKXSq7NS.js.map} +1 -1
- package/dist/chunks/{conversationCard.component-DByFo4jj.js → conversationCard.component-Mn3eYMW_.js} +6 -6
- package/dist/chunks/{conversationCard.component-DByFo4jj.js.map → conversationCard.component-Mn3eYMW_.js.map} +1 -1
- package/dist/chunks/{datePicker.component-CLTjEX7i.js → datePicker.component-CHBO_Jrk.js} +5 -5
- package/dist/chunks/{datePicker.component-CLTjEX7i.js.map → datePicker.component-CHBO_Jrk.js.map} +1 -1
- package/dist/chunks/{datePicker.component-BuGpHTzS.js → datePicker.component-DQ0a5vhA.js} +2 -2
- package/dist/chunks/{datePicker.component-BuGpHTzS.js.map → datePicker.component-DQ0a5vhA.js.map} +1 -1
- package/dist/chunks/{datePicker.provider-i35-VNAb.js → datePicker.provider-CDhsnFSD.js} +2 -2
- package/dist/chunks/{datePicker.provider-i35-VNAb.js.map → datePicker.provider-CDhsnFSD.js.map} +1 -1
- package/dist/chunks/{datePicker.provider-CttuPiiS.js → datePicker.provider-o-sEPUJe.js} +7 -7
- package/dist/chunks/{datePicker.provider-CttuPiiS.js.map → datePicker.provider-o-sEPUJe.js.map} +1 -1
- package/dist/chunks/dateTimePicker.component-B1tTKUZU.js +306 -0
- package/dist/chunks/dateTimePicker.component-B1tTKUZU.js.map +1 -0
- package/dist/chunks/dateTimePicker.component-oLZ5KXWa.js +2 -0
- package/dist/chunks/dateTimePicker.component-oLZ5KXWa.js.map +1 -0
- package/dist/chunks/endOfMonth-ClO3w4vF.js +2 -0
- package/dist/chunks/endOfMonth-ClO3w4vF.js.map +1 -0
- package/dist/chunks/endOfMonth-D0kCU08_.js +19 -0
- package/dist/chunks/endOfMonth-D0kCU08_.js.map +1 -0
- package/dist/chunks/{format-CqTHHSak.js → format-dJJ72A--.js} +3 -3
- package/dist/chunks/{format-CqTHHSak.js.map → format-dJJ72A--.js.map} +1 -1
- package/dist/chunks/{heading.component-CpSAN3cv.js → heading.component-BBTU00_w.js} +2 -2
- package/dist/chunks/{heading.component-CpSAN3cv.js.map → heading.component-BBTU00_w.js.map} +1 -1
- package/dist/chunks/{heading.component-DnoZOXdz.js → heading.component-DeM4h5rY.js} +2 -2
- package/dist/chunks/{heading.component-DnoZOXdz.js.map → heading.component-DeM4h5rY.js.map} +1 -1
- package/dist/chunks/isToday-Q8lj3mkM.js +23 -0
- package/dist/chunks/{isToday-iCYsPDMT.js.map → isToday-Q8lj3mkM.js.map} +1 -1
- package/dist/chunks/{maintenanceBanner.types-DerZF_8G.js → maintenanceBanner.types-BiSgtHkP.js} +2 -2
- package/dist/chunks/{maintenanceBanner.types-DerZF_8G.js.map → maintenanceBanner.types-BiSgtHkP.js.map} +1 -1
- package/dist/chunks/{maintenanceBanner.types-BsNjAlXa.js → maintenanceBanner.types-CfHYj6Nu.js} +2 -2
- package/dist/chunks/{maintenanceBanner.types-BsNjAlXa.js.map → maintenanceBanner.types-CfHYj6Nu.js.map} +1 -1
- package/dist/chunks/{menu.component-D2V9Q1Y5.js → menu.component-CNbEm3SL.js} +2 -2
- package/dist/chunks/{menu.component-D2V9Q1Y5.js.map → menu.component-CNbEm3SL.js.map} +1 -1
- package/dist/chunks/{menu.component-WHzMw5ZI.js → menu.component-DwnU1N2a.js} +5 -5
- package/dist/chunks/{menu.component-WHzMw5ZI.js.map → menu.component-DwnU1N2a.js.map} +1 -1
- package/dist/chunks/{modal.types-Bj6PrItn.js → modal.types-CfN8ElV6.js} +2 -2
- package/dist/chunks/{modal.types-Bj6PrItn.js.map → modal.types-CfN8ElV6.js.map} +1 -1
- package/dist/chunks/{modal.types-rx31rD9D.js → modal.types-DlvB1lQC.js} +2 -2
- package/dist/chunks/{modal.types-rx31rD9D.js.map → modal.types-DlvB1lQC.js.map} +1 -1
- package/dist/chunks/{notificationCounter.component-CBwi5vXa.js → notificationCounter.component-BUxWlpKh.js} +2 -2
- package/dist/chunks/{notificationCounter.component-CBwi5vXa.js.map → notificationCounter.component-BUxWlpKh.js.map} +1 -1
- package/dist/chunks/{notificationCounter.component-6Q3q8jWj.js → notificationCounter.component-DhfVkkOQ.js} +2 -2
- package/dist/chunks/{notificationCounter.component-6Q3q8jWj.js.map → notificationCounter.component-DhfVkkOQ.js.map} +1 -1
- package/dist/chunks/{numberInput.component-DGPEz0Fv.js → numberInput.component-B0P7w6Av.js} +2 -2
- package/dist/chunks/{numberInput.component-DGPEz0Fv.js.map → numberInput.component-B0P7w6Av.js.map} +1 -1
- package/dist/chunks/{numberInput.component-CRDRjrTH.js → numberInput.component-Bpl3NGJU.js} +2 -2
- package/dist/chunks/{numberInput.component-CRDRjrTH.js.map → numberInput.component-Bpl3NGJU.js.map} +1 -1
- package/dist/chunks/{pinInput.types-bIGh7aUS.js → pinInput.types-B0WLZ-4e.js} +2 -2
- package/dist/chunks/{pinInput.types-bIGh7aUS.js.map → pinInput.types-B0WLZ-4e.js.map} +1 -1
- package/dist/chunks/{pinInput.types-Can9f1Eu.js → pinInput.types-xxX7jDUo.js} +2 -2
- package/dist/chunks/{pinInput.types-Can9f1Eu.js.map → pinInput.types-xxX7jDUo.js.map} +1 -1
- package/dist/chunks/{popover.component-DIYT1Lc0.js → popover.component-65oNmbmB.js} +3 -3
- package/dist/chunks/{popover.component-DIYT1Lc0.js.map → popover.component-65oNmbmB.js.map} +1 -1
- package/dist/chunks/{popover.component-DTjA1GSd.js → popover.component-Cw6-018C.js} +2 -2
- package/dist/chunks/{popover.component-DTjA1GSd.js.map → popover.component-Cw6-018C.js.map} +1 -1
- package/dist/chunks/{radioGroup.types-U1ep9nrN.js → radioGroup.types-4D0zmi0v.js} +2 -2
- package/dist/chunks/{radioGroup.types-U1ep9nrN.js.map → radioGroup.types-4D0zmi0v.js.map} +1 -1
- package/dist/chunks/{radioGroup.types-DzSpA07h.js → radioGroup.types-Dbfon_Lr.js} +4 -4
- package/dist/chunks/{radioGroup.types-DzSpA07h.js.map → radioGroup.types-Dbfon_Lr.js.map} +1 -1
- package/dist/chunks/{rating.component-DsHkKmA7.js → rating.component-DOUCmD0Y.js} +2 -2
- package/dist/chunks/{rating.component-DsHkKmA7.js.map → rating.component-DOUCmD0Y.js.map} +1 -1
- package/dist/chunks/{rating.component-BWBPSEEk.js → rating.component-DlCpQ5GH.js} +2 -2
- package/dist/chunks/{rating.component-BWBPSEEk.js.map → rating.component-DlCpQ5GH.js.map} +1 -1
- package/dist/chunks/{ratingDots.component-BhWM7kTg.js → ratingDots.component-Qk8qlPmN.js} +3 -3
- package/dist/chunks/{ratingDots.component-BhWM7kTg.js.map → ratingDots.component-Qk8qlPmN.js.map} +1 -1
- package/dist/chunks/{ratingDots.component-CZ370iI3.js → ratingDots.component-pc5p1mua.js} +2 -2
- package/dist/chunks/{ratingDots.component-CZ370iI3.js.map → ratingDots.component-pc5p1mua.js.map} +1 -1
- package/dist/chunks/{select.component-OrsHXCMz.js → select.component-CzyXxbhS.js} +2 -2
- package/dist/chunks/{select.component-OrsHXCMz.js.map → select.component-CzyXxbhS.js.map} +1 -1
- package/dist/chunks/{select.component-DckP-f8y.js → select.component-DIrbeCPd.js} +5 -5
- package/dist/chunks/{select.component-DckP-f8y.js.map → select.component-DIrbeCPd.js.map} +1 -1
- package/dist/chunks/{semanticTokens.records-YFGbKTL1.js → semanticTokens.records-CmeaObFQ.js} +2 -2
- package/dist/chunks/{semanticTokens.records-YFGbKTL1.js.map → semanticTokens.records-CmeaObFQ.js.map} +1 -1
- package/dist/chunks/{semanticTokens.records-C_ewkfqj.js → semanticTokens.records-Di2_gv9n.js} +9 -9
- package/dist/chunks/{semanticTokens.records-C_ewkfqj.js.map → semanticTokens.records-Di2_gv9n.js.map} +1 -1
- package/dist/chunks/{sortableList.component-CbxbBLVQ.js → sortableList.component-05kG3QEM.js} +2 -2
- package/dist/chunks/{sortableList.component-CbxbBLVQ.js.map → sortableList.component-05kG3QEM.js.map} +1 -1
- package/dist/chunks/{sortableList.component-2yX2pXs7.js → sortableList.component-DX9EP39N.js} +2 -2
- package/dist/chunks/{sortableList.component-2yX2pXs7.js.map → sortableList.component-DX9EP39N.js.map} +1 -1
- package/dist/chunks/{spinner.component-Dq6u4vVL.js → spinner.component-0tE7mnxi.js} +2 -2
- package/dist/chunks/{spinner.component-Dq6u4vVL.js.map → spinner.component-0tE7mnxi.js.map} +1 -1
- package/dist/chunks/{spinner.component-CNHQ8UDz.js → spinner.component-CQ-JWUon.js} +2 -2
- package/dist/chunks/{spinner.component-CNHQ8UDz.js.map → spinner.component-CQ-JWUon.js.map} +1 -1
- package/dist/chunks/{switch.component-BYEMhBCA.js → switch.component-BKahX4Bw.js} +2 -2
- package/dist/chunks/{switch.component-BYEMhBCA.js.map → switch.component-BKahX4Bw.js.map} +1 -1
- package/dist/chunks/{switch.component-DjN67nap.js → switch.component-WMd5cinZ.js} +2 -2
- package/dist/chunks/{switch.component-DjN67nap.js.map → switch.component-WMd5cinZ.js.map} +1 -1
- package/dist/chunks/{tab.types-JAJ5Xxff.js → tab.types-CTlxVEvQ.js} +3 -3
- package/dist/chunks/{tab.types-JAJ5Xxff.js.map → tab.types-CTlxVEvQ.js.map} +1 -1
- package/dist/chunks/{tab.types-DSPWRVCF.js → tab.types-xN2lQJLC.js} +2 -2
- package/dist/chunks/{tab.types-DSPWRVCF.js.map → tab.types-xN2lQJLC.js.map} +1 -1
- package/dist/chunks/{tagBlock.component-CT7_RyJ-.js → tagBlock.component-CNwLyYYb.js} +5 -5
- package/dist/chunks/{tagBlock.component-CT7_RyJ-.js.map → tagBlock.component-CNwLyYYb.js.map} +1 -1
- package/dist/chunks/{tagBlock.component-B899iqQP.js → tagBlock.component-fnt27QP6.js} +2 -2
- package/dist/chunks/{tagBlock.component-B899iqQP.js.map → tagBlock.component-fnt27QP6.js.map} +1 -1
- package/dist/chunks/{text.component-DhuUgP3j.js → text.component-C9jh_JMO.js} +2 -2
- package/dist/chunks/{text.component-DhuUgP3j.js.map → text.component-C9jh_JMO.js.map} +1 -1
- package/dist/chunks/{text.component-BDDz5KQP.js → text.component-D5GpbfNx.js} +2 -2
- package/dist/chunks/{text.component-BDDz5KQP.js.map → text.component-D5GpbfNx.js.map} +1 -1
- package/dist/chunks/{textInput.component-CwTc0h_F.js → textInput.component-BDJuvT1c.js} +2 -2
- package/dist/chunks/{textInput.component-CwTc0h_F.js.map → textInput.component-BDJuvT1c.js.map} +1 -1
- package/dist/chunks/{textInput.component-BeiTxTkS.js → textInput.component-DAan7BwF.js} +3 -3
- package/dist/chunks/{textInput.component-BeiTxTkS.js.map → textInput.component-DAan7BwF.js.map} +1 -1
- package/dist/chunks/{textarea.component-BIg_XX_R.js → textarea.component-1Gvjelye.js} +2 -2
- package/dist/chunks/{textarea.component-BIg_XX_R.js.map → textarea.component-1Gvjelye.js.map} +1 -1
- package/dist/chunks/{textarea.component-C6Wt1Pk8.js → textarea.component-B-tQg_4m.js} +3 -3
- package/dist/chunks/{textarea.component-C6Wt1Pk8.js.map → textarea.component-B-tQg_4m.js.map} +1 -1
- package/dist/chunks/theme-BFbOz0Jj.js.map +1 -1
- package/dist/chunks/theme-BOK659O0.js.map +1 -1
- package/dist/chunks/{theme.provider-BeSlhtUQ.js → theme.provider-CD72J0A7.js} +17 -6
- package/dist/chunks/{theme.provider-BeSlhtUQ.js.map → theme.provider-CD72J0A7.js.map} +1 -1
- package/dist/chunks/{theme.provider-DYehMUhm.js → theme.provider-DpFjsbLx.js} +2 -2
- package/dist/chunks/{theme.provider-DYehMUhm.js.map → theme.provider-DpFjsbLx.js.map} +1 -1
- package/dist/chunks/{timePicker.component-BCMX6aqb.js → timePicker.component-CvQ9kF_7.js} +4 -4
- package/dist/chunks/{timePicker.component-BCMX6aqb.js.map → timePicker.component-CvQ9kF_7.js.map} +1 -1
- package/dist/chunks/{timePicker.component-D5hw80VV.js → timePicker.component-D2gDf5fp.js} +2 -2
- package/dist/chunks/{timePicker.component-D5hw80VV.js.map → timePicker.component-D2gDf5fp.js.map} +1 -1
- package/dist/chunks/{timeRange.component-D3Db8lvh.js → timeRange.component-DL2vskjy.js} +2 -2
- package/dist/chunks/{timeRange.component-D3Db8lvh.js.map → timeRange.component-DL2vskjy.js.map} +1 -1
- package/dist/chunks/{timeRange.component-BZHpZeAX.js → timeRange.component-DfOq2mGR.js} +2 -2
- package/dist/chunks/{timeRange.component-BZHpZeAX.js.map → timeRange.component-DfOq2mGR.js.map} +1 -1
- package/dist/chunks/{timestamp.component-BfmZPfy5.js → timestamp.component-CRTYMLmn.js} +2 -2
- package/dist/chunks/{timestamp.component-BfmZPfy5.js.map → timestamp.component-CRTYMLmn.js.map} +1 -1
- package/dist/chunks/{timestamp.component-DkLjxUsy.js → timestamp.component-CRz-1i68.js} +4 -4
- package/dist/chunks/{timestamp.component-DkLjxUsy.js.map → timestamp.component-CRz-1i68.js.map} +1 -1
- package/dist/chunks/{withFormControl-DW9A6BSL.js → withFormControl-DVeqCX53.js} +2 -2
- package/dist/chunks/{withFormControl-DW9A6BSL.js.map → withFormControl-DVeqCX53.js.map} +1 -1
- package/dist/chunks/{withFormControl-QV_Jridv.js → withFormControl-d2CEvsH2.js} +2 -2
- package/dist/chunks/{withFormControl-QV_Jridv.js.map → withFormControl-d2CEvsH2.js.map} +1 -1
- package/dist/chunks/withTruncation-D0mlwwep.js +2 -0
- package/dist/chunks/{withTruncation-B2GhwmHG.js.map → withTruncation-D0mlwwep.js.map} +1 -1
- package/dist/chunks/withTruncation-DW62mTHW.js +103 -0
- package/dist/chunks/withTruncation-DW62mTHW.js.map +1 -0
- package/dist/cjs/components/Alert/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/Calendar/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/DateTimePicker/index.cjs +1 -1
- package/dist/cjs/components/Heading/index.cjs +1 -1
- package/dist/cjs/components/MaintenanceBanner/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/NotificationCounter/index.cjs +1 -1
- package/dist/cjs/components/NumberInput/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/Rating/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/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/index.cjs +1 -1
- package/dist/cjs/index.cjs +1 -1
- package/dist/cjs/theme/index.cjs +1 -1
- package/dist/cjs/theme/semanticTokens/index.cjs +1 -1
- package/dist/cjs/theme/semanticTokens/index.cjs.map +1 -1
- package/dist/esm/components/Alert/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/Calendar/index.js +4 -2
- 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 +2 -2
- package/dist/esm/components/DateTimePicker/index.js +1 -1
- package/dist/esm/components/Heading/index.js +1 -1
- package/dist/esm/components/MaintenanceBanner/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/NumberInput/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/Rating/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/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/index.js +127 -125
- package/dist/esm/index.js +155 -153
- package/dist/esm/theme/index.js +1 -1
- package/dist/esm/theme/semanticTokens/index.js +39 -15
- package/dist/esm/theme/semanticTokens/index.js.map +1 -1
- package/dist/types/components/Calendar/calendar.component.d.ts +19 -1
- package/dist/types/components/Calendar/calendar.utils.d.ts +3 -0
- package/dist/types/components/Calendar/calendarFooterButton.component.d.ts +41 -0
- package/dist/types/components/Calendar/index.d.ts +2 -0
- package/dist/types/components/Heading/heading.recipe.d.ts +1 -1
- package/dist/types/components/Link/link.recipe.d.ts +1 -1
- package/dist/types/components/Modal/modal.recipe.d.ts +1 -1
- package/dist/types/components/Text/text.recipe.d.ts +1 -1
- package/dist/types/shared/types/theme.d.ts +1 -1
- package/dist/types/theme/semanticTokens/semanticTokens.config.d.ts +37 -37
- package/dist/types/theme/tokens/colors/colors.config.d.ts +1 -1
- package/package.json +1 -1
- package/dist/chunks/calendar.component-BFSyxaB6.js +0 -2
- package/dist/chunks/calendar.component-BFSyxaB6.js.map +0 -1
- package/dist/chunks/calendar.component-CegJR9ey.js +0 -18
- package/dist/chunks/calendar.component-CegJR9ey.js.map +0 -1
- package/dist/chunks/dateTimePicker.component-BlWhC5aT.js +0 -2
- package/dist/chunks/dateTimePicker.component-BlWhC5aT.js.map +0 -1
- package/dist/chunks/dateTimePicker.component-CLAI_Q6e.js +0 -317
- package/dist/chunks/dateTimePicker.component-CLAI_Q6e.js.map +0 -1
- package/dist/chunks/isToday-iCYsPDMT.js +0 -23
- package/dist/chunks/withTruncation-B2GhwmHG.js +0 -92
- package/dist/chunks/withTruncation-pzYbtqYw.js +0 -2
- package/dist/chunks/withTruncation-pzYbtqYw.js.map +0 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { j as t } from "./jsx-runtime-C5mzlN2N.js";
|
|
2
2
|
import j, { forwardRef as N, useMemo as w } from "react";
|
|
3
|
-
import { w as F } from "./withFormControl-
|
|
3
|
+
import { w as F } from "./withFormControl-DVeqCX53.js";
|
|
4
4
|
import { B as y } from "./button.component-BO6oee_V.js";
|
|
5
|
-
import { C as P } from "./characterCounter.component-
|
|
5
|
+
import { C as P } from "./characterCounter.component-Cm9yEHjz.js";
|
|
6
6
|
import { F as R } from "./flex-CX-8gE9T.js";
|
|
7
7
|
import { I as b } from "./input-group-CFelIL63.js";
|
|
8
8
|
import { c as k } from "./create-recipe-context-DfQ-MTih.js";
|
|
@@ -105,4 +105,4 @@ const O = F(l);
|
|
|
105
105
|
export {
|
|
106
106
|
O as W
|
|
107
107
|
};
|
|
108
|
-
//# sourceMappingURL=textInput.component-
|
|
108
|
+
//# sourceMappingURL=textInput.component-DAan7BwF.js.map
|
package/dist/chunks/{textInput.component-BeiTxTkS.js.map → textInput.component-DAan7BwF.js.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"textInput.component-
|
|
1
|
+
{"version":3,"file":"textInput.component-DAan7BwF.js","sources":["../../node_modules/@ark-ui/react/dist/components/field/field-input.js","../../node_modules/@chakra-ui/react/dist/esm/components/input/input.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","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, { useMemo } from 'react';\nimport { Flex } from '@chakra-ui/react/flex';\nimport { withFormControl, WithFormControlProps } from 'hocs/withFormControl/withFormControl';\nimport { Input as CInput, InputProps as CInputProps } from '@chakra-ui/react/input';\nimport { InputGroup } from '@chakra-ui/react/input-group';\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 /** The maximum number of characters that can be entered into the input. */\n charLimit?: number;\n /** Ref to the input element. */\n inputRef?: React.Ref<HTMLInputElement | null>;\n /** Left addon element. */\n leftAddon?: React.ReactNode;\n /** Left element inside the input. */\n leftElement?: React.ReactNode;\n /**\n * If true, the input will render a contrasting variant.\n * @default false\n */\n onContrast?: boolean;\n /** Placeholder text for the input field. */\n placeholder?: string;\n /** Right addon element. */\n rightAddon?: React.ReactNode;\n /** Right element inside the input. */\n rightElement?: React.ReactNode;\n /** The size of the input. */\n size?: FormControlSize;\n /**\n * Data test id for the text input.\n * @default kibble-text-input\n */\n 'data-testid'?: string;\n}\n\nexport interface DefaultTextInputProps extends TextInputBaseProps {\n /**\n * If true, the input will have a button to clear out the field.\n * @default false\n */\n clearable?: never;\n /** Callback function when the clear button is clicked. */\n onClear?: never;\n}\n\nexport interface ClearableTextInputProps extends TextInputBaseProps {\n /**\n * If true, the input will have a button to clear out the field.\n * @default false\n */\n clearable?: boolean;\n /** Callback function when the clear button is clicked. */\n onClear?: (val: string | number | readonly string[]) => void;\n}\n\nexport type KTextInputProps = DefaultTextInputProps | ClearableTextInputProps;\n\nexport type TextInputProps = KTextInputProps & CInputProps;\n\nconst TextInput = React.forwardRef<HTMLInputElement, TextInputProps>(\n (\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 ['data-testid']: dataTestId = 'kibble-text-input',\n ...rest\n },\n ref,\n ): 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={`${dataTestId}-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(() => value?.toString()?.length || 0, [value]);\n\n return (\n <Flex className=\"TextInput__Wrapper\" w=\"100%\" flexDirection=\"column\" gap={1} alignItems=\"flex-end\">\n <InputGroup\n className=\"TextInput__InputGroup\"\n data-testid={`${dataTestId}-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={dataTestId}\n className=\"TextInput\"\n ref={inputRef || ref}\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 data-testid={`${dataTestId}-character-counter`}\n withLimit={true}\n limit={charLimit}\n currentCount={currentCharCount}\n />\n )}\n </Flex>\n );\n },\n);\n\nTextInput.displayName = 'TextInput';\nconst WrappedTextInput = withFormControl<TextInputProps>(TextInput);\n\nexport { WrappedTextInput as TextInput };\n"],"names":["FieldInput","forwardRef","props","ref","field","useFieldContext","mergedProps","mergeProps","jsx","ark","withContext","createRecipeContext","Input","Field.Input","closeButtonSizeMap","TextInput","React","charLimit","clearable","disabled","inputRef","invalid","leftAddon","leftElement","onClear","onContrast","rightAddon","rightElement","size","value","dataTestId","rest","handleClear","Button","currentCharCount","useMemo","jsxs","Flex","InputGroup","CInput","CharacterCounter","WrappedTextInput","withFormControl"],"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,GCLxBC,IAA0D;AAAA,EACrE,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AACN,GCwDMC,IAAYC,EAAM;AAAA,EACtB,CACE;AAAA,IACE,WAAAC,IAAY;AAAA,IACZ,WAAAC,IAAY;AAAA,IACZ,UAAAC,IAAW;AAAA,IACX,UAAAC;AAAA,IACA,SAAAC;AAAA,IACA,WAAAC;AAAA,IACA,aAAAC;AAAA,IACA,SAAAC;AAAA,IACA,YAAAC;AAAA,IACA,YAAAC;AAAA,IACA,cAAAC;AAAA,IACA,MAAAC,IAAO;AAAA,IACP,OAAAC;AAAA,IACA,CAAC,gBAAgBC,IAAa;AAAA,IAC9B,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A,MACF;AAAA,MACC,CAAC,CAACd,KACDT,gBAAAA,EAAA;AAAA,QAACgC;AAAA,QAAA;AAAA,UACC,eAAa,GAAGV,CAAU;AAAA,UAC1B,WAAW;AAAA,UACX,OAAOb;AAAA,UACP,cAAciB;AAAA,QAAA;AAAA,MAAA;AAAA,IAChB,GAEJ;AAAA,EAAA;AAGN;AAEAnB,EAAU,cAAc;AAClB,MAAA0B,IAAmBC,EAAgC3B,CAAS;","x_google_ignoreList":[0,1]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";const l=require("./jsx-runtime-BjDatQAs.js"),c=require("react"),h=require("./withFormControl-
|
|
2
|
-
//# sourceMappingURL=textarea.component-
|
|
1
|
+
"use strict";const l=require("./jsx-runtime-BjDatQAs.js"),c=require("react"),h=require("./withFormControl-d2CEvsH2.js"),v=require("./characterCounter.component-CczgC612.js"),w=require("./flex-BOU6tYUd.js"),b=require("./create-recipe-context-CDw-39SC.js"),p=require("./index-CQURjLlA.js"),x=require("./use-locale-context-ym21RUxU.js"),C=require("./use-field-context-Cm29IQ7H.js"),F=e=>e&&e.__esModule?e:{default:e},y=F(c);var R=e=>{if(!e)return;const t=p.getComputedStyle(e),o=p.getWindow(e),i=p.getDocument(e),r=()=>{requestAnimationFrame(()=>{e.style.height="auto";let a;t.boxSizing==="content-box"?a=e.scrollHeight-(parseFloat(t.paddingTop)+parseFloat(t.paddingBottom)):a=e.scrollHeight+parseFloat(t.borderTopWidth)+parseFloat(t.borderBottomWidth),t.maxHeight!=="none"&&a>parseFloat(t.maxHeight)?(t.overflowY==="hidden"&&(e.style.overflowY="scroll"),a=parseFloat(t.maxHeight)):t.overflowY!=="hidden"&&(e.style.overflowY="hidden"),e.style.height=`${a}px`})};e.addEventListener("input",r),e.form?.addEventListener("reset",r);const n=Object.getPrototypeOf(e),s=Object.getOwnPropertyDescriptor(n,"value");Object.defineProperty(e,"value",{...s,set(){s?.set?.apply(this,arguments),r()}});const d=new o.ResizeObserver(()=>{requestAnimationFrame(()=>r())});d.observe(e);const u=new o.MutationObserver(()=>r());return u.observe(e,{attributes:!0,attributeFilter:["rows","placeholder"]}),i.fonts?.addEventListener("loadingdone",r),()=>{e.removeEventListener("input",r),e.form?.removeEventListener("reset",r),i.fonts?.removeEventListener("loadingdone",r),d.disconnect(),u.disconnect()}};const m=c.forwardRef((e,t)=>{const{autoresize:o,...i}=e,r=c.useRef(null),n=C.useFieldContext(),s=p.mergeProps(n?.getTextareaProps(),{style:{resize:o?"none":void 0}},i);return c.useEffect(()=>{if(o)return R(r.current)},[o]),l.jsxRuntimeExports.jsx(x.ark.textarea,{...s,ref:x.composeRefs(t,r)})});m.displayName="FieldTextarea";const{withContext:j}=b.createRecipeContext({key:"textarea"}),T=j(m),f=y.default.forwardRef(({charLimit:e=void 0,invalid:t,onContrast:o,resize:i="none",textareaRef:r,value:n,["data-testid"]:s="kibble-textarea",...d},u)=>{const a=o?"onContrast":"default",g=c.useMemo(()=>n?.toString()?.length||0,[n]);return l.jsxRuntimeExports.jsxs(w.Flex,{className:"Textarea__Wrapper",flexDirection:"column",w:"100%",gap:1,alignItems:"flex-end",children:[l.jsxRuntimeExports.jsx(T,{className:"Textarea","data-testid":s,ref:r||u,resize:i,variant:a,value:n,...t&&{"aria-invalid":!0},minH:"140px",...d}),!!e&&l.jsxRuntimeExports.jsx(v.CharacterCounter,{"data-testid":`${s}-character-counter`,withLimit:!0,limit:e,currentCount:g})]})});f.displayName="Textarea";const q=h.withFormControl(f);exports.WrappedTextarea=q;
|
|
2
|
+
//# sourceMappingURL=textarea.component-1Gvjelye.js.map
|
package/dist/chunks/{textarea.component-BIg_XX_R.js.map → textarea.component-1Gvjelye.js.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"textarea.component-BIg_XX_R.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, { useMemo } from 'react';\nimport { Textarea as CTextarea, TextareaProps as CTextareaProps } from '@chakra-ui/react/textarea';\nimport { FormControlSize } from 'hocs/withFormControl/withFormControl.types';\nimport { withFormControl, WithFormControlProps } 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 /** The maximum number of characters that can be entered into the textarea. */\n charLimit?: number;\n /** Ref to the textarea element. */\n textareaRef?: React.Ref<HTMLTextAreaElement | null>;\n /** Placeholder text for the textarea. */\n placeholder?: string;\n /**\n * The size of the textarea.\n * @default md\n */\n size?: FormControlSize;\n /**\n * Data test id for the textarea.\n * @default kibble-textarea\n */\n 'data-testid'?: string;\n}\n\nconst Textarea = React.forwardRef<HTMLTextAreaElement, TextareaProps>(\n (\n {\n charLimit = undefined,\n invalid,\n onContrast,\n resize = 'none',\n textareaRef,\n value,\n ['data-testid']: dataTestId = 'kibble-textarea',\n ...rest\n },\n ref,\n ): React.JSX.Element => {\n const _computedVariant = onContrast ? 'onContrast' : 'default';\n\n const currentCharCount = useMemo(() => value?.toString()?.length || 0, [value]);\n\n return (\n <Flex className=\"Textarea__Wrapper\" flexDirection=\"column\" w=\"100%\" gap={1} alignItems=\"flex-end\">\n <CTextarea\n className=\"Textarea\"\n data-testid={dataTestId}\n ref={textareaRef || ref}\n resize={resize}\n variant={_computedVariant}\n value={value}\n {...(invalid && { 'aria-invalid': true })}\n minH=\"140px\"\n {...rest}\n />\n {!!charLimit && (\n <CharacterCounter\n data-testid={`${dataTestId}-character-counter`}\n withLimit={true}\n limit={charLimit}\n currentCount={currentCharCount}\n />\n )}\n </Flex>\n );\n },\n);\n\nTextarea.displayName = 'Textarea';\nconst WrappedTextarea = withFormControl<TextareaProps>(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","React","charLimit","invalid","onContrast","value","dataTestId","rest","_computedVariant","currentCharCount","useMemo","jsxs","Flex","CTextarea","CharacterCounter","WrappedTextarea","withFormControl"],"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,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1Gvjelye.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, { useMemo } from 'react';\nimport { Textarea as CTextarea, TextareaProps as CTextareaProps } from '@chakra-ui/react/textarea';\nimport { FormControlSize } from 'hocs/withFormControl/withFormControl.types';\nimport { withFormControl, WithFormControlProps } 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 /** The maximum number of characters that can be entered into the textarea. */\n charLimit?: number;\n /** Ref to the textarea element. */\n textareaRef?: React.Ref<HTMLTextAreaElement | null>;\n /** Placeholder text for the textarea. */\n placeholder?: string;\n /**\n * The size of the textarea.\n * @default md\n */\n size?: FormControlSize;\n /**\n * Data test id for the textarea.\n * @default kibble-textarea\n */\n 'data-testid'?: string;\n}\n\nconst Textarea = React.forwardRef<HTMLTextAreaElement, TextareaProps>(\n (\n {\n charLimit = undefined,\n invalid,\n onContrast,\n resize = 'none',\n textareaRef,\n value,\n ['data-testid']: dataTestId = 'kibble-textarea',\n ...rest\n },\n ref,\n ): React.JSX.Element => {\n const _computedVariant = onContrast ? 'onContrast' : 'default';\n\n const currentCharCount = useMemo(() => value?.toString()?.length || 0, [value]);\n\n return (\n <Flex className=\"Textarea__Wrapper\" flexDirection=\"column\" w=\"100%\" gap={1} alignItems=\"flex-end\">\n <CTextarea\n className=\"Textarea\"\n data-testid={dataTestId}\n ref={textareaRef || ref}\n resize={resize}\n variant={_computedVariant}\n value={value}\n {...(invalid && { 'aria-invalid': true })}\n minH=\"140px\"\n {...rest}\n />\n {!!charLimit && (\n <CharacterCounter\n data-testid={`${dataTestId}-character-counter`}\n withLimit={true}\n limit={charLimit}\n currentCount={currentCharCount}\n />\n )}\n </Flex>\n );\n },\n);\n\nTextarea.displayName = 'Textarea';\nconst WrappedTextarea = withFormControl<TextareaProps>(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","React","charLimit","invalid","onContrast","value","dataTestId","rest","_computedVariant","currentCharCount","useMemo","jsxs","Flex","CTextarea","CharacterCounter","WrappedTextarea","withFormControl"],"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,WA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AAA,CAGN,EAEAV,EAAS,YAAc,WACjB,MAAAgB,EAAkBC,kBAA+BjB,CAAQ","x_google_ignoreList":[0,1,2]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { j as m } from "./jsx-runtime-C5mzlN2N.js";
|
|
2
2
|
import l, { forwardRef as x, useRef as g, useEffect as h, useMemo as v } from "react";
|
|
3
|
-
import { w } from "./withFormControl-
|
|
4
|
-
import { C as b } from "./characterCounter.component-
|
|
3
|
+
import { w } from "./withFormControl-DVeqCX53.js";
|
|
4
|
+
import { C as b } from "./characterCounter.component-Cm9yEHjz.js";
|
|
5
5
|
import { F as y } from "./flex-CX-8gE9T.js";
|
|
6
6
|
import { c as F } from "./create-recipe-context-DfQ-MTih.js";
|
|
7
7
|
import { B as C, V as T, W as j, a6 as O } from "./index-BcafYtXX.js";
|
|
@@ -93,4 +93,4 @@ const q = w(f);
|
|
|
93
93
|
export {
|
|
94
94
|
q as W
|
|
95
95
|
};
|
|
96
|
-
//# sourceMappingURL=textarea.component-
|
|
96
|
+
//# sourceMappingURL=textarea.component-B-tQg_4m.js.map
|
package/dist/chunks/{textarea.component-C6Wt1Pk8.js.map → textarea.component-B-tQg_4m.js.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"textarea.component-C6Wt1Pk8.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, { useMemo } from 'react';\nimport { Textarea as CTextarea, TextareaProps as CTextareaProps } from '@chakra-ui/react/textarea';\nimport { FormControlSize } from 'hocs/withFormControl/withFormControl.types';\nimport { withFormControl, WithFormControlProps } 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 /** The maximum number of characters that can be entered into the textarea. */\n charLimit?: number;\n /** Ref to the textarea element. */\n textareaRef?: React.Ref<HTMLTextAreaElement | null>;\n /** Placeholder text for the textarea. */\n placeholder?: string;\n /**\n * The size of the textarea.\n * @default md\n */\n size?: FormControlSize;\n /**\n * Data test id for the textarea.\n * @default kibble-textarea\n */\n 'data-testid'?: string;\n}\n\nconst Textarea = React.forwardRef<HTMLTextAreaElement, TextareaProps>(\n (\n {\n charLimit = undefined,\n invalid,\n onContrast,\n resize = 'none',\n textareaRef,\n value,\n ['data-testid']: dataTestId = 'kibble-textarea',\n ...rest\n },\n ref,\n ): React.JSX.Element => {\n const _computedVariant = onContrast ? 'onContrast' : 'default';\n\n const currentCharCount = useMemo(() => value?.toString()?.length || 0, [value]);\n\n return (\n <Flex className=\"Textarea__Wrapper\" flexDirection=\"column\" w=\"100%\" gap={1} alignItems=\"flex-end\">\n <CTextarea\n className=\"Textarea\"\n data-testid={dataTestId}\n ref={textareaRef || ref}\n resize={resize}\n variant={_computedVariant}\n value={value}\n {...(invalid && { 'aria-invalid': true })}\n minH=\"140px\"\n {...rest}\n />\n {!!charLimit && (\n <CharacterCounter\n data-testid={`${dataTestId}-character-counter`}\n withLimit={true}\n limit={charLimit}\n currentCount={currentCharCount}\n />\n )}\n </Flex>\n );\n },\n);\n\nTextarea.displayName = 'Textarea';\nconst WrappedTextarea = withFormControl<TextareaProps>(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","React","charLimit","invalid","onContrast","value","dataTestId","rest","_computedVariant","currentCharCount","useMemo","jsxs","Flex","CTextarea","CharacterCounter","WrappedTextarea","withFormControl"],"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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","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, { useMemo } from 'react';\nimport { Textarea as CTextarea, TextareaProps as CTextareaProps } from '@chakra-ui/react/textarea';\nimport { FormControlSize } from 'hocs/withFormControl/withFormControl.types';\nimport { withFormControl, WithFormControlProps } 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 /** The maximum number of characters that can be entered into the textarea. */\n charLimit?: number;\n /** Ref to the textarea element. */\n textareaRef?: React.Ref<HTMLTextAreaElement | null>;\n /** Placeholder text for the textarea. */\n placeholder?: string;\n /**\n * The size of the textarea.\n * @default md\n */\n size?: FormControlSize;\n /**\n * Data test id for the textarea.\n * @default kibble-textarea\n */\n 'data-testid'?: string;\n}\n\nconst Textarea = React.forwardRef<HTMLTextAreaElement, TextareaProps>(\n (\n {\n charLimit = undefined,\n invalid,\n onContrast,\n resize = 'none',\n textareaRef,\n value,\n ['data-testid']: dataTestId = 'kibble-textarea',\n ...rest\n },\n ref,\n ): React.JSX.Element => {\n const _computedVariant = onContrast ? 'onContrast' : 'default';\n\n const currentCharCount = useMemo(() => value?.toString()?.length || 0, [value]);\n\n return (\n <Flex className=\"Textarea__Wrapper\" flexDirection=\"column\" w=\"100%\" gap={1} alignItems=\"flex-end\">\n <CTextarea\n className=\"Textarea\"\n data-testid={dataTestId}\n ref={textareaRef || ref}\n resize={resize}\n variant={_computedVariant}\n value={value}\n {...(invalid && { 'aria-invalid': true })}\n minH=\"140px\"\n {...rest}\n />\n {!!charLimit && (\n <CharacterCounter\n data-testid={`${dataTestId}-character-counter`}\n withLimit={true}\n limit={charLimit}\n currentCount={currentCharCount}\n />\n )}\n </Flex>\n );\n },\n);\n\nTextarea.displayName = 'Textarea';\nconst WrappedTextarea = withFormControl<TextareaProps>(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","React","charLimit","invalid","onContrast","value","dataTestId","rest","_computedVariant","currentCharCount","useMemo","jsxs","Flex","CTextarea","CharacterCounter","WrappedTextarea","withFormControl"],"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,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gB,GAAK;AAAA,UACvC,MAAK;AAAA,UACJ,GAAGI;AAAA,QAAA;AAAA,MACN;AAAA,MACC,CAAC,CAACL,KACDR,gBAAAA,EAAA;AAAA,QAACoB;AAAA,QAAA;AAAA,UACC,eAAa,GAAGR,CAAU;AAAA,UAC1B,WAAW;AAAA,UACX,OAAOJ;AAAA,UACP,cAAcO;AAAA,QAAA;AAAA,MAAA;AAAA,IAChB,GAEJ;AAAA,EAAA;AAGN;AAEAV,EAAS,cAAc;AACjB,MAAAgB,IAAkBC,EAA+BjB,CAAQ;","x_google_ignoreList":[0,1,2]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"theme-BFbOz0Jj.js","sources":["../../src/shared/types/theme.ts"],"sourcesContent":["export type ColorMode
|
|
1
|
+
{"version":3,"file":"theme-BFbOz0Jj.js","sources":["../../src/shared/types/theme.ts"],"sourcesContent":["export type { ColorMode } from '@televet/kibble-primitives';\n\nexport const colorModeThemeKey = 'kibble-theme';\n"],"names":["colorModeThemeKey"],"mappings":"aAEO,MAAMA,EAAoB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"theme-BOK659O0.js","sources":["../../src/shared/types/theme.ts"],"sourcesContent":["export type ColorMode
|
|
1
|
+
{"version":3,"file":"theme-BOK659O0.js","sources":["../../src/shared/types/theme.ts"],"sourcesContent":["export type { ColorMode } from '@televet/kibble-primitives';\n\nexport const colorModeThemeKey = 'kibble-theme';\n"],"names":["colorModeThemeKey"],"mappings":"AAEO,MAAMA,IAAoB;"}
|
|
@@ -21,7 +21,7 @@ import { fonts as Ro, fontSizes as Io, fontWeights as Wo, lineHeights as Po, let
|
|
|
21
21
|
import { spacing as Vo } from "../esm/theme/tokens/spacing/index.js";
|
|
22
22
|
import { transitionDurations as Bo, transitionEasings as Do } from "../esm/theme/tokens/transitions/index.js";
|
|
23
23
|
import { zIndices as No } from "../esm/theme/tokens/zIndices/index.js";
|
|
24
|
-
import { e as jo } from "./semanticTokens.records-
|
|
24
|
+
import { e as jo } from "./semanticTokens.records-Di2_gv9n.js";
|
|
25
25
|
import { f as ve, t as xe } from "./typography-Cqrokog3.js";
|
|
26
26
|
import { b as we, c as _e } from "./button.recipe-CZ-PlRrK.js";
|
|
27
27
|
import { Global as Ao } from "@emotion/react";
|
|
@@ -30,7 +30,7 @@ import { B as bt } from "./button.component-BO6oee_V.js";
|
|
|
30
30
|
import { I as Lo } from "./icon.component-PV_nHBId.js";
|
|
31
31
|
import { B as mt } from "./index-9BerxEcw.js";
|
|
32
32
|
import { StatusIconMap as Oo } from "../esm/shared/records/index.js";
|
|
33
|
-
import { W as Ce } from "./text.component-
|
|
33
|
+
import { W as Ce } from "./text.component-C9jh_JMO.js";
|
|
34
34
|
import { F as Go } from "./flex-CX-8gE9T.js";
|
|
35
35
|
import { c as $o } from "./create-slot-recipe-context-D_FXDJGp.js";
|
|
36
36
|
import { c as Fo } from "./factory-BQshv7_b.js";
|
|
@@ -9563,12 +9563,23 @@ const yi = (e) => /* @__PURE__ */ i.jsx(jt, { attribute: "class", disableTransit
|
|
|
9563
9563
|
fontSize: { base: "3xl", lg: "4xl" }
|
|
9564
9564
|
},
|
|
9565
9565
|
"2xl": {
|
|
9566
|
-
fontSize: { base: "4xl", lg: "5xl" }
|
|
9566
|
+
fontSize: { base: "4xl", lg: "5xl" },
|
|
9567
|
+
lineHeight: "110%"
|
|
9567
9568
|
},
|
|
9568
|
-
"3xl": {
|
|
9569
|
-
|
|
9569
|
+
"3xl": {
|
|
9570
|
+
fontSize: { base: "5xl", lg: "6xl" },
|
|
9571
|
+
lineHeight: "105%"
|
|
9572
|
+
},
|
|
9573
|
+
"4xl": {
|
|
9574
|
+
fontSize: { base: "6xl", lg: "7xl" },
|
|
9575
|
+
lineHeight: "105%"
|
|
9576
|
+
}
|
|
9570
9577
|
}, Oi = b({
|
|
9571
9578
|
base: {
|
|
9579
|
+
// Chakra's built-in Heading recipe maps `size` to a `textStyle`, which expands into its own
|
|
9580
|
+
// fontSize/lineHeight/letterSpacing and wins over the plain values below after theme merge
|
|
9581
|
+
// (see mergeConfigs(defaultConfig, themeConfig) in theme.config.ts). Cancel it explicitly.
|
|
9582
|
+
textStyle: "none",
|
|
9572
9583
|
fontWeight: "semibold",
|
|
9573
9584
|
lineHeight: "120%"
|
|
9574
9585
|
},
|
|
@@ -11649,4 +11660,4 @@ export {
|
|
|
11649
11660
|
js as k,
|
|
11650
11661
|
As as s
|
|
11651
11662
|
};
|
|
11652
|
-
//# sourceMappingURL=theme.provider-
|
|
11663
|
+
//# sourceMappingURL=theme.provider-CD72J0A7.js.map
|