@televet/kibble-ui 4.0.0-beta.85 → 4.0.0-beta.87
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-BoVquQLV.js → alert.types-DTNR8_C-.js} +2 -2
- package/dist/chunks/{alert.types-BoVquQLV.js.map → alert.types-DTNR8_C-.js.map} +1 -1
- package/dist/chunks/{alert.types-DPhgsCv5.js → alert.types-QEeDYCAD.js} +3 -3
- package/dist/chunks/{alert.types-DPhgsCv5.js.map → alert.types-QEeDYCAD.js.map} +1 -1
- package/dist/chunks/{avatar.component-C5SZVG16.js → avatar.component-qXhLVNzG.js} +2 -2
- package/dist/chunks/{avatar.component-C5SZVG16.js.map → avatar.component-qXhLVNzG.js.map} +1 -1
- package/dist/chunks/{avatar.component-1VnTGefU.js → avatar.component-yAhlBo_d.js} +2 -2
- package/dist/chunks/{avatar.component-1VnTGefU.js.map → avatar.component-yAhlBo_d.js.map} +1 -1
- package/dist/chunks/{avatarGroup.component-3tZR7cET.js → avatarGroup.component-T3cUc5XX.js} +2 -2
- package/dist/chunks/{avatarGroup.component-3tZR7cET.js.map → avatarGroup.component-T3cUc5XX.js.map} +1 -1
- package/dist/chunks/{avatarGroup.component-pSM7Kbli.js → avatarGroup.component-bImv23vg.js} +2 -2
- package/dist/chunks/{avatarGroup.component-pSM7Kbli.js.map → avatarGroup.component-bImv23vg.js.map} +1 -1
- package/dist/chunks/{buttonGroup.component-YRADr8Ih.js → buttonGroup.component-0iZj3N28.js} +2 -2
- package/dist/chunks/{buttonGroup.component-YRADr8Ih.js.map → buttonGroup.component-0iZj3N28.js.map} +1 -1
- package/dist/chunks/{buttonGroup.component-C0yhMC9f.js → buttonGroup.component-BuF41rNB.js} +2 -2
- package/dist/chunks/{buttonGroup.component-C0yhMC9f.js.map → buttonGroup.component-BuF41rNB.js.map} +1 -1
- package/dist/chunks/{characterCounter.component-CleCgrM2.js → characterCounter.component-Cvw7D33c.js} +2 -2
- package/dist/chunks/{characterCounter.component-CleCgrM2.js.map → characterCounter.component-Cvw7D33c.js.map} +1 -1
- package/dist/chunks/{characterCounter.component-DPDfdrN8.js → characterCounter.component-DCSJKVZn.js} +2 -2
- package/dist/chunks/{characterCounter.component-DPDfdrN8.js.map → characterCounter.component-DCSJKVZn.js.map} +1 -1
- package/dist/chunks/{checkbox.component-lMOGjCYC.js → checkbox.component-BoaV-gQi.js} +2 -2
- package/dist/chunks/{checkbox.component-lMOGjCYC.js.map → checkbox.component-BoaV-gQi.js.map} +1 -1
- package/dist/chunks/{checkbox.component-BlsLcspc.js → checkbox.component-CT344a1o.js} +3 -3
- package/dist/chunks/{checkbox.component-BlsLcspc.js.map → checkbox.component-CT344a1o.js.map} +1 -1
- package/dist/chunks/{checkboxGroup.component-DLYU9ENF.js → checkboxGroup.component-CVRj2S5m.js} +3 -3
- package/dist/chunks/{checkboxGroup.component-DLYU9ENF.js.map → checkboxGroup.component-CVRj2S5m.js.map} +1 -1
- package/dist/chunks/{checkboxGroup.component-_0rAYGE9.js → checkboxGroup.component-X2cU2KU-.js} +2 -2
- package/dist/chunks/{checkboxGroup.component-_0rAYGE9.js.map → checkboxGroup.component-X2cU2KU-.js.map} +1 -1
- package/dist/chunks/{conversationCard.component-C8IIc07P.js → conversationCard.component-CkmCkM8o.js} +2 -2
- package/dist/chunks/{conversationCard.component-C8IIc07P.js.map → conversationCard.component-CkmCkM8o.js.map} +1 -1
- package/dist/chunks/{conversationCard.component-BDy_K3a2.js → conversationCard.component-u6I8Phyu.js} +7 -7
- package/dist/chunks/{conversationCard.component-BDy_K3a2.js.map → conversationCard.component-u6I8Phyu.js.map} +1 -1
- package/dist/chunks/datePicker.component-B_wuoiPP.js +15 -0
- package/dist/chunks/{datePicker.component-C6lCcMe6.js.map → datePicker.component-B_wuoiPP.js.map} +1 -1
- package/dist/chunks/{datePicker.component-_6xDNedH.js → datePicker.component-Cger9TA5.js} +177 -176
- package/dist/chunks/{datePicker.component-_6xDNedH.js.map → datePicker.component-Cger9TA5.js.map} +1 -1
- package/dist/chunks/{heading.component-BX2ec0zU.js → heading.component-Cf58bZa1.js} +2 -2
- package/dist/chunks/{heading.component-BX2ec0zU.js.map → heading.component-Cf58bZa1.js.map} +1 -1
- package/dist/chunks/{heading.component-B5WajDE0.js → heading.component-DNsKd4Gh.js} +2 -2
- package/dist/chunks/{heading.component-B5WajDE0.js.map → heading.component-DNsKd4Gh.js.map} +1 -1
- package/dist/chunks/{menu.component-C90cnsKe.js → menu.component-4gKH4f5l.js} +5 -5
- package/dist/chunks/{menu.component-C90cnsKe.js.map → menu.component-4gKH4f5l.js.map} +1 -1
- package/dist/chunks/{menu.component-a9CU6Xdc.js → menu.component-C5NwkXGO.js} +2 -2
- package/dist/chunks/{menu.component-a9CU6Xdc.js.map → menu.component-C5NwkXGO.js.map} +1 -1
- package/dist/chunks/{modal.types-COCCoM45.js → modal.types-DDwG7coD.js} +2 -2
- package/dist/chunks/{modal.types-COCCoM45.js.map → modal.types-DDwG7coD.js.map} +1 -1
- package/dist/chunks/{modal.types-Bz9iDbzg.js → modal.types-DIDn6Pz1.js} +2 -2
- package/dist/chunks/{modal.types-Bz9iDbzg.js.map → modal.types-DIDn6Pz1.js.map} +1 -1
- package/dist/chunks/{pinInput.types-DFAg0pcH.js → pinInput.types-Bv67lyfg.js} +2 -2
- package/dist/chunks/{pinInput.types-DFAg0pcH.js.map → pinInput.types-Bv67lyfg.js.map} +1 -1
- package/dist/chunks/{pinInput.types-6wtKOTSv.js → pinInput.types-DbKKHEtF.js} +2 -2
- package/dist/chunks/{pinInput.types-6wtKOTSv.js.map → pinInput.types-DbKKHEtF.js.map} +1 -1
- package/dist/chunks/{popover.component-CEgqymGx.js → popover.component-CS8UY9_W.js} +2 -2
- package/dist/chunks/{popover.component-CEgqymGx.js.map → popover.component-CS8UY9_W.js.map} +1 -1
- package/dist/chunks/{popover.component-mpL0KcDz.js → popover.component-D2-w2fSE.js} +4 -4
- package/dist/chunks/{popover.component-mpL0KcDz.js.map → popover.component-D2-w2fSE.js.map} +1 -1
- package/dist/chunks/{radioGroup.component-L6mmgjJV.js → radioGroup.component-DlLvSRNH.js} +4 -4
- package/dist/chunks/{radioGroup.component-L6mmgjJV.js.map → radioGroup.component-DlLvSRNH.js.map} +1 -1
- package/dist/chunks/{radioGroup.component-CwPoKOrk.js → radioGroup.component-e6LsfYzG.js} +2 -2
- package/dist/chunks/{radioGroup.component-CwPoKOrk.js.map → radioGroup.component-e6LsfYzG.js.map} +1 -1
- package/dist/chunks/{ratingDots.component-D7WpH-ln.js → ratingDots.component-B_a_qO9L.js} +2 -2
- package/dist/chunks/{ratingDots.component-D7WpH-ln.js.map → ratingDots.component-B_a_qO9L.js.map} +1 -1
- package/dist/chunks/{ratingDots.component-BuxEbJLF.js → ratingDots.component-BzxT-9pH.js} +3 -3
- package/dist/chunks/{ratingDots.component-BuxEbJLF.js.map → ratingDots.component-BzxT-9pH.js.map} +1 -1
- package/dist/chunks/{select.component-DYLk5hRh.js → select.component-CPMIVkRk.js} +2 -2
- package/dist/chunks/{select.component-DYLk5hRh.js.map → select.component-CPMIVkRk.js.map} +1 -1
- package/dist/chunks/{select.component-CmG-5MFZ.js → select.component-DrZOaMq1.js} +5 -5
- package/dist/chunks/{select.component-CmG-5MFZ.js.map → select.component-DrZOaMq1.js.map} +1 -1
- package/dist/chunks/{sortableList.component-SD4XVxo_.js → sortableList.component-DEMqxtiq.js} +2 -2
- package/dist/chunks/{sortableList.component-SD4XVxo_.js.map → sortableList.component-DEMqxtiq.js.map} +1 -1
- package/dist/chunks/{sortableList.component-B4m7mF30.js → sortableList.component-iVWhEIAT.js} +2 -2
- package/dist/chunks/{sortableList.component-B4m7mF30.js.map → sortableList.component-iVWhEIAT.js.map} +1 -1
- package/dist/chunks/{spinner.component-DLmqMH1X.js → spinner.component-BM2OwxA7.js} +2 -2
- package/dist/chunks/{spinner.component-DLmqMH1X.js.map → spinner.component-BM2OwxA7.js.map} +1 -1
- package/dist/chunks/{spinner.component-ByAZ85b0.js → spinner.component-lZds47YM.js} +2 -2
- package/dist/chunks/{spinner.component-ByAZ85b0.js.map → spinner.component-lZds47YM.js.map} +1 -1
- package/dist/chunks/{styledAvatar.types-DN31UUxr.js → styledAvatar.types-DaESk8Cq.js} +2 -2
- package/dist/chunks/{styledAvatar.types-DN31UUxr.js.map → styledAvatar.types-DaESk8Cq.js.map} +1 -1
- package/dist/chunks/{styledAvatar.types-ITDQ7mOq.js → styledAvatar.types-zeF6AQ1t.js} +2 -2
- package/dist/chunks/{styledAvatar.types-ITDQ7mOq.js.map → styledAvatar.types-zeF6AQ1t.js.map} +1 -1
- package/dist/chunks/{switch.component-BtiTaRED.js → switch.component-C4tJUYg9.js} +2 -2
- package/dist/chunks/{switch.component-BtiTaRED.js.map → switch.component-C4tJUYg9.js.map} +1 -1
- package/dist/chunks/{switch.component-BXDOMTzk.js → switch.component-D93JI_c1.js} +2 -2
- package/dist/chunks/{switch.component-BXDOMTzk.js.map → switch.component-D93JI_c1.js.map} +1 -1
- package/dist/chunks/{tabs.component-BdGlS5MX.js → tabs.component-DUUXdx2e.js} +2 -2
- package/dist/chunks/{tabs.component-BdGlS5MX.js.map → tabs.component-DUUXdx2e.js.map} +1 -1
- package/dist/chunks/{tabs.component-nYhuZwIl.js → tabs.component-caMRtfBi.js} +2 -2
- package/dist/chunks/{tabs.component-nYhuZwIl.js.map → tabs.component-caMRtfBi.js.map} +1 -1
- package/dist/chunks/{tagBlock.component-BRHnXvSa.js → tagBlock.component-CC4azYDm.js} +2 -2
- package/dist/chunks/{tagBlock.component-BRHnXvSa.js.map → tagBlock.component-CC4azYDm.js.map} +1 -1
- package/dist/chunks/{tagBlock.component-C4v3cZHR.js → tagBlock.component-DmNtxTyX.js} +5 -5
- package/dist/chunks/{tagBlock.component-C4v3cZHR.js.map → tagBlock.component-DmNtxTyX.js.map} +1 -1
- package/dist/chunks/{text.component-CcMdvaZu.js → text.component-C501PJrN.js} +2 -2
- package/dist/chunks/{text.component-CcMdvaZu.js.map → text.component-C501PJrN.js.map} +1 -1
- package/dist/chunks/{text.component-C9eIXYn5.js → text.component-z4cNuAAI.js} +2 -2
- package/dist/chunks/{text.component-C9eIXYn5.js.map → text.component-z4cNuAAI.js.map} +1 -1
- package/dist/chunks/{textInput.component-DVGEbAZW.js → textInput.component-BK5TEpr3.js} +3 -3
- package/dist/chunks/{textInput.component-DVGEbAZW.js.map → textInput.component-BK5TEpr3.js.map} +1 -1
- package/dist/chunks/{textInput.component-B3fTdDHM.js → textInput.component-o3OfBL3Y.js} +2 -2
- package/dist/chunks/{textInput.component-B3fTdDHM.js.map → textInput.component-o3OfBL3Y.js.map} +1 -1
- package/dist/chunks/{textarea.component-Bfu6gH08.js → textarea.component-A8ebDcnw.js} +3 -3
- package/dist/chunks/{textarea.component-Bfu6gH08.js.map → textarea.component-A8ebDcnw.js.map} +1 -1
- package/dist/chunks/{textarea.component-Dwb7sCt5.js → textarea.component-DDz3lXs_.js} +2 -2
- package/dist/chunks/{textarea.component-Dwb7sCt5.js.map → textarea.component-DDz3lXs_.js.map} +1 -1
- package/dist/chunks/{theme.provider-I45hIZ38.js → theme.provider-CbB3DTaK.js} +3 -3
- package/dist/chunks/{theme.provider-I45hIZ38.js.map → theme.provider-CbB3DTaK.js.map} +1 -1
- package/dist/chunks/{theme.provider-CRQB6gnt.js → theme.provider-DHy8ThEw.js} +2 -2
- package/dist/chunks/{theme.provider-CRQB6gnt.js.map → theme.provider-DHy8ThEw.js.map} +1 -1
- package/dist/chunks/{timePicker.component-CPAwAqZz.js → timePicker.component-BVCoTSf0.js} +2 -2
- package/dist/chunks/{timePicker.component-CPAwAqZz.js.map → timePicker.component-BVCoTSf0.js.map} +1 -1
- package/dist/chunks/{timePicker.component-BdjeeKLB.js → timePicker.component-ZFIT5aB6.js} +3 -3
- package/dist/chunks/{timePicker.component-BdjeeKLB.js.map → timePicker.component-ZFIT5aB6.js.map} +1 -1
- package/dist/chunks/{timeRange.component--KYrOpO6.js → timeRange.component-BSPEZDvW.js} +2 -2
- package/dist/chunks/{timeRange.component--KYrOpO6.js.map → timeRange.component-BSPEZDvW.js.map} +1 -1
- package/dist/chunks/{timeRange.component-A6MsbQya.js → timeRange.component-JhMCHzyM.js} +2 -2
- package/dist/chunks/{timeRange.component-A6MsbQya.js.map → timeRange.component-JhMCHzyM.js.map} +1 -1
- package/dist/chunks/{timestamp.component-jMwqadDM.js → timestamp.component-DAakI_Tt.js} +3 -3
- package/dist/chunks/{timestamp.component-jMwqadDM.js.map → timestamp.component-DAakI_Tt.js.map} +1 -1
- package/dist/chunks/{timestamp.component-DyVh49xt.js → timestamp.component-DNYI2gVi.js} +2 -2
- package/dist/chunks/{timestamp.component-DyVh49xt.js.map → timestamp.component-DNYI2gVi.js.map} +1 -1
- package/dist/chunks/{tooltip.component-9qe1CRgu.js → tooltip.component-BSomeipc.js} +4 -7
- package/dist/chunks/{tooltip.component-9qe1CRgu.js.map → tooltip.component-BSomeipc.js.map} +1 -1
- package/dist/chunks/{tooltip.component-DlxNjrpO.js → tooltip.component-CIUcGhxw.js} +2 -2
- package/dist/chunks/{tooltip.component-DlxNjrpO.js.map → tooltip.component-CIUcGhxw.js.map} +1 -1
- package/dist/chunks/withDarkMode-B9LErG-p.js +2 -0
- package/dist/chunks/withDarkMode-B9LErG-p.js.map +1 -0
- package/dist/chunks/withDarkMode-DBAFsemJ.js +23 -0
- package/dist/chunks/withDarkMode-DBAFsemJ.js.map +1 -0
- package/dist/chunks/{withFormControl-D7WX39-P.js → withFormControl-DBaRp5Zy.js} +2 -2
- package/dist/chunks/{withFormControl-D7WX39-P.js.map → withFormControl-DBaRp5Zy.js.map} +1 -1
- package/dist/chunks/{withFormControl-C4OizqXz.js → withFormControl-syyL9lWW.js} +2 -2
- package/dist/chunks/{withFormControl-C4OizqXz.js.map → withFormControl-syyL9lWW.js.map} +1 -1
- package/dist/chunks/withLightMode-C4WljRNZ.js +22 -0
- package/dist/chunks/withLightMode-C4WljRNZ.js.map +1 -0
- package/dist/chunks/withLightMode-fys9Cbqw.js +2 -0
- package/dist/chunks/withLightMode-fys9Cbqw.js.map +1 -0
- package/dist/chunks/{withTruncation-kHq-K8i9.js → withTruncation-B6vA2g0w.js} +2 -2
- package/dist/chunks/{withTruncation-kHq-K8i9.js.map → withTruncation-B6vA2g0w.js.map} +1 -1
- package/dist/chunks/{withTruncation-D28HXn8p.js → withTruncation-C7AAl87b.js} +2 -2
- package/dist/chunks/{withTruncation-D28HXn8p.js.map → withTruncation-C7AAl87b.js.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/Tooltip/index.cjs +1 -1
- package/dist/cjs/components/index.cjs +1 -1
- package/dist/cjs/hocs/index.cjs +1 -1
- package/dist/cjs/hocs/withDarkMode/index.cjs +2 -0
- package/dist/cjs/hocs/withDarkMode/index.cjs.map +1 -0
- package/dist/cjs/hocs/withLightMode/index.cjs +2 -0
- package/dist/cjs/hocs/withLightMode/index.cjs.map +1 -0
- package/dist/cjs/hooks/index.cjs +1 -1
- package/dist/cjs/hooks/useColorMode/index.cjs +2 -0
- package/dist/cjs/hooks/useColorMode/index.cjs.map +1 -0
- package/dist/cjs/hooks/useColorModeValue/index.cjs +2 -0
- package/dist/cjs/hooks/useColorModeValue/index.cjs.map +1 -0
- package/dist/cjs/index.cjs +1 -1
- package/dist/cjs/theme/index.cjs +1 -1
- package/dist/esm/components/Alert/index.js +1 -1
- package/dist/esm/components/Avatar/index.js +1 -1
- package/dist/esm/components/AvatarGroup/index.js +1 -1
- package/dist/esm/components/ButtonGroup/index.js +1 -1
- package/dist/esm/components/CharacterCounter/index.js +1 -1
- package/dist/esm/components/Checkbox/index.js +1 -1
- package/dist/esm/components/CheckboxGroup/index.js +1 -1
- package/dist/esm/components/ConversationCard/index.js +1 -1
- package/dist/esm/components/DatePicker/index.js +1 -1
- package/dist/esm/components/Heading/index.js +1 -1
- package/dist/esm/components/Menu/index.js +1 -1
- package/dist/esm/components/Modal/index.js +1 -1
- package/dist/esm/components/PinInput/index.js +1 -1
- package/dist/esm/components/Popover/index.js +1 -1
- package/dist/esm/components/RadioGroup/index.js +1 -1
- package/dist/esm/components/RatingDots/index.js +1 -1
- package/dist/esm/components/Select/index.js +1 -1
- package/dist/esm/components/SortableList/index.js +1 -1
- package/dist/esm/components/Spinner/index.js +1 -1
- package/dist/esm/components/StyledAvatar/index.js +1 -1
- package/dist/esm/components/Switch/index.js +1 -1
- package/dist/esm/components/Tabs/index.js +1 -1
- package/dist/esm/components/TagBlock/index.js +1 -1
- package/dist/esm/components/Text/index.js +1 -1
- package/dist/esm/components/TextInput/index.js +1 -1
- package/dist/esm/components/Textarea/index.js +1 -1
- package/dist/esm/components/TimePicker/index.js +1 -1
- package/dist/esm/components/TimeRange/index.js +1 -1
- package/dist/esm/components/Timestamp/index.js +1 -1
- package/dist/esm/components/Tooltip/index.js +1 -1
- package/dist/esm/components/index.js +30 -30
- package/dist/esm/hocs/index.js +3 -2
- package/dist/esm/hocs/index.js.map +1 -1
- package/dist/esm/hocs/withDarkMode/index.js +5 -0
- package/dist/esm/hocs/withDarkMode/index.js.map +1 -0
- package/dist/esm/hocs/withLightMode/index.js +5 -0
- package/dist/esm/hocs/withLightMode/index.js.map +1 -0
- package/dist/esm/hooks/index.js +6 -5
- package/dist/esm/hooks/index.js.map +1 -1
- package/dist/{chunks/index-CgivotaP.js → esm/hooks/useColorMode/index.js} +4 -8
- package/dist/esm/hooks/useColorMode/index.js.map +1 -0
- package/dist/esm/hooks/useColorModeValue/index.js +9 -0
- package/dist/esm/hooks/useColorModeValue/index.js.map +1 -0
- package/dist/esm/index.js +61 -59
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/theme/index.js +1 -1
- package/dist/types/hocs/withDarkMode/index.d.ts +1 -2
- package/dist/types/hocs/withDarkMode/withDarkMode.d.ts +2 -0
- package/dist/types/hocs/withLightMode/index.d.ts +1 -2
- package/dist/types/hocs/withLightMode/withLightMode.d.ts +2 -0
- package/package.json +1 -1
- package/dist/chunks/datePicker.component-C6lCcMe6.js +0 -15
- package/dist/chunks/index-BknUKotT.js +0 -38
- package/dist/chunks/index-BknUKotT.js.map +0 -1
- package/dist/chunks/index-CgivotaP.js.map +0 -1
- package/dist/chunks/index-CkYZf9Pm.js +0 -2
- package/dist/chunks/index-CkYZf9Pm.js.map +0 -1
- package/dist/chunks/index-iyefwwxw.js +0 -2
- package/dist/chunks/index-iyefwwxw.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"withFormControl-D7WX39-P.js","sources":["../../node_modules/@ark-ui/react/dist/components/field/field-error-text.js","../../node_modules/@ark-ui/react/dist/components/field/field-helper-text.js","../../node_modules/@ark-ui/react/dist/components/field/field-label.js","../../node_modules/@ark-ui/react/dist/utils/use-safe-layout-effect.js","../../node_modules/@ark-ui/react/dist/components/fieldset/use-fieldset-context.js","../../node_modules/@ark-ui/react/dist/components/field/use-field.js","../../node_modules/@ark-ui/react/dist/components/field/field-root.js","../../node_modules/@chakra-ui/react/dist/esm/components/icon/icon.js","../../node_modules/@chakra-ui/react/dist/esm/components/icon/create-icon.js","../../node_modules/@chakra-ui/react/dist/esm/components/field/field.js","../../src/hocs/withFormControl/withFormControl.records.ts","../../src/hocs/withFormControl/withFormControl.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 FieldErrorText = forwardRef((props, ref) => {\n const field = useFieldContext();\n const mergedProps = mergeProps(field.getErrorTextProps(), props);\n if (field?.invalid) {\n return /* @__PURE__ */ jsx(ark.span, { ...mergedProps, ref });\n }\n return null;\n});\nFieldErrorText.displayName = \"FieldErrorText\";\n\nexport { FieldErrorText };\n","'use client';\nimport { jsx } from 'react/jsx-runtime';\nimport { mergeProps } from '@zag-js/react';\nimport { forwardRef } from 'react';\nimport { ark } from '../factory.js';\nimport { useFieldContext } from './use-field-context.js';\n\nconst FieldHelperText = forwardRef((props, ref) => {\n const field = useFieldContext();\n const mergedProps = mergeProps(field?.getHelperTextProps(), props);\n return /* @__PURE__ */ jsx(ark.span, { ...mergedProps, ref });\n});\nFieldHelperText.displayName = \"FieldHelperText\";\n\nexport { FieldHelperText };\n","'use client';\nimport { jsx } from 'react/jsx-runtime';\nimport { mergeProps } from '@zag-js/react';\nimport { forwardRef } from 'react';\nimport { ark } from '../factory.js';\nimport { useFieldContext } from './use-field-context.js';\n\nconst FieldLabel = forwardRef((props, ref) => {\n const field = useFieldContext();\n const mergedProps = mergeProps(field?.getLabelProps(), props);\n return /* @__PURE__ */ jsx(ark.label, { ...mergedProps, ref });\n});\nFieldLabel.displayName = \"FieldLabel\";\n\nexport { FieldLabel };\n","'use client';\nimport { useLayoutEffect, useEffect } from 'react';\n\nconst useSafeLayoutEffect = typeof window !== \"undefined\" ? useLayoutEffect : useEffect;\n\nexport { useSafeLayoutEffect };\n","'use client';\nimport { createContext } from '../../utils/create-context.js';\n\nconst [FieldsetProvider, useFieldsetContext] = createContext({\n name: \"FieldsetContext\",\n hookName: \"useFieldsetContext\",\n providerName: \"<FieldsetProvider />\",\n strict: false\n});\n\nexport { FieldsetProvider, useFieldsetContext };\n","'use client';\nimport { getWindow, dataAttr, ariaAttr } from '@zag-js/dom-query';\nimport { useState, useId, useRef, useMemo } from 'react';\nimport { useSafeLayoutEffect } from '../../utils/use-safe-layout-effect.js';\nimport { useFieldsetContext } from '../fieldset/use-fieldset-context.js';\nimport { parts } from './field.anatomy.js';\n\nconst useField = (props = {}) => {\n const fieldset = useFieldsetContext();\n const { ids, disabled = Boolean(fieldset?.disabled), invalid = false, readOnly = false, required = false } = props;\n const [hasErrorText, setHasErrorText] = useState(false);\n const [hasHelperText, setHasHelperText] = useState(false);\n const id = props.id ?? useId();\n const rootRef = useRef(null);\n const rootId = ids?.control ?? `field::${id}`;\n const errorTextId = ids?.errorText ?? `field::${id}::error-text`;\n const helperTextId = ids?.helperText ?? `field::${id}::helper-text`;\n const labelId = ids?.label ?? `field::${id}::label`;\n useSafeLayoutEffect(() => {\n const rootNode = rootRef.current;\n if (!rootNode) return;\n const win = getWindow(rootNode);\n const doc = win.document;\n const checkTextElements = () => {\n setHasErrorText(!!doc.getElementById(errorTextId));\n setHasHelperText(!!doc.getElementById(helperTextId));\n };\n checkTextElements();\n const observer = new win.MutationObserver(checkTextElements);\n observer.observe(rootNode, { childList: true, subtree: true });\n return () => observer.disconnect();\n }, [errorTextId, helperTextId]);\n const labelIds = useMemo(() => {\n const ids2 = [];\n if (hasErrorText && invalid) ids2.push(errorTextId);\n if (hasHelperText) ids2.push(helperTextId);\n return ids2.join(\" \") || void 0;\n }, [invalid, errorTextId, helperTextId, hasErrorText, hasHelperText]);\n const getRootProps = useMemo(\n () => () => ({\n ...parts.root.attrs,\n id: rootId,\n ref: rootRef,\n role: \"group\",\n \"data-disabled\": dataAttr(disabled),\n \"data-invalid\": dataAttr(invalid),\n \"data-readonly\": dataAttr(readOnly)\n }),\n [disabled, invalid, readOnly, rootId]\n );\n const getLabelProps = useMemo(\n () => () => ({\n ...parts.label.attrs,\n id: labelId,\n \"data-disabled\": dataAttr(disabled),\n \"data-invalid\": dataAttr(invalid),\n \"data-readonly\": dataAttr(readOnly),\n htmlFor: id\n }),\n [disabled, invalid, readOnly, id, labelId]\n );\n const getControlProps = useMemo(\n () => () => ({\n \"aria-describedby\": labelIds,\n \"aria-invalid\": ariaAttr(invalid),\n \"data-invalid\": dataAttr(invalid),\n \"data-required\": dataAttr(required),\n \"data-readonly\": dataAttr(readOnly),\n id,\n required,\n disabled,\n readOnly\n }),\n [labelIds, invalid, required, readOnly, id, disabled]\n );\n const getInputProps = useMemo(\n () => () => ({\n ...getControlProps(),\n ...parts.input.attrs\n }),\n [getControlProps]\n );\n const getTextareaProps = useMemo(\n () => () => ({\n ...getControlProps(),\n ...parts.textarea.attrs\n }),\n [getControlProps]\n );\n const getSelectProps = useMemo(\n () => () => ({\n ...getControlProps(),\n ...parts.select.attrs\n }),\n [getControlProps]\n );\n const getHelperTextProps = useMemo(\n () => () => ({\n id: helperTextId,\n ...parts.helperText.attrs,\n \"data-disabled\": dataAttr(disabled)\n }),\n [disabled, helperTextId]\n );\n const getErrorTextProps = useMemo(\n () => () => ({\n id: errorTextId,\n ...parts.errorText.attrs,\n \"aria-live\": \"polite\"\n }),\n [errorTextId]\n );\n const getRequiredIndicatorProps = useMemo(\n () => () => ({\n \"aria-hidden\": true,\n ...parts.requiredIndicator.attrs\n }),\n []\n );\n return {\n ariaDescribedby: labelIds,\n ids: {\n root: rootId,\n control: id,\n label: labelId,\n errorText: errorTextId,\n helperText: helperTextId\n },\n refs: {\n rootRef\n },\n disabled,\n invalid,\n readOnly,\n required,\n getLabelProps,\n getRootProps,\n getInputProps,\n getTextareaProps,\n getSelectProps,\n getHelperTextProps,\n getErrorTextProps,\n getRequiredIndicatorProps\n };\n};\n\nexport { useField };\n","'use client';\nimport { jsx } from 'react/jsx-runtime';\nimport { mergeProps } from '@zag-js/react';\nimport { forwardRef } from 'react';\nimport { composeRefs } from '../../utils/compose-refs.js';\nimport { createSplitProps } from '../../utils/create-split-props.js';\nimport { ark } from '../factory.js';\nimport { useField } from './use-field.js';\nimport { FieldProvider } from './use-field-context.js';\n\nconst FieldRoot = forwardRef((props, ref) => {\n const [useFieldProps, localProps] = createSplitProps()(props, [\n \"id\",\n \"ids\",\n \"disabled\",\n \"invalid\",\n \"readOnly\",\n \"required\"\n ]);\n const field = useField(useFieldProps);\n const mergedProps = mergeProps(field.getRootProps(), localProps);\n return /* @__PURE__ */ jsx(FieldProvider, { value: field, children: /* @__PURE__ */ jsx(ark.div, { ...mergedProps, ref: composeRefs(ref, field.refs.rootRef) }) });\n});\nFieldRoot.displayName = \"FieldRoot\";\n\nexport { FieldRoot };\n","\"use strict\";\n\"use client\";\nimport { jsx } from 'react/jsx-runtime';\nimport * as React from 'react';\nimport { cx } from '../../utils/cx.js';\nimport { createRecipeContext } from '../../styled-system/create-recipe-context.js';\nimport { chakra } from '../../styled-system/factory.js';\n\nconst { useRecipeResult, PropsProvider } = createRecipeContext({ key: \"icon\" });\nconst Icon = React.forwardRef(\n function Icon2(props, ref) {\n const {\n styles,\n className,\n props: otherProps\n } = useRecipeResult({ asChild: !props.as, ...props });\n return /* @__PURE__ */ jsx(\n chakra.svg,\n {\n ref,\n focusable: false,\n \"aria-hidden\": \"true\",\n ...otherProps,\n css: [styles, props.css],\n className: cx(className, props.className)\n }\n );\n }\n);\nconst IconPropsProvider = PropsProvider;\n\nexport { Icon, IconPropsProvider };\n","\"use strict\";\n\"use client\";\nimport { jsx } from 'react/jsx-runtime';\nimport { Children, forwardRef } from 'react';\nimport { Icon } from './icon.js';\n\nfunction createIcon(options) {\n const {\n viewBox = \"0 0 24 24\",\n d: pathDefinition,\n displayName,\n defaultProps = {}\n } = options;\n const path = Children.toArray(options.path);\n const Comp = forwardRef((props, ref) => /* @__PURE__ */ jsx(\n Icon,\n {\n ref,\n asChild: false,\n viewBox,\n ...defaultProps,\n ...props,\n children: path.length ? path : /* @__PURE__ */ jsx(\"path\", { fill: \"currentColor\", d: pathDefinition })\n }\n ));\n Comp.displayName = displayName;\n return Comp;\n}\n\nexport { createIcon };\n","\"use strict\";\n\"use client\";\nimport { jsx } from 'react/jsx-runtime';\nimport { Field, useFieldContext } from '@ark-ui/react/field';\nimport { forwardRef } from 'react';\nimport { cx } from '../../utils/cx.js';\nimport { createSlotRecipeContext } from '../../styled-system/create-slot-recipe-context.js';\nimport { chakra } from '../../styled-system/factory.js';\nimport { createIcon } from '../icon/create-icon.js';\n\nconst {\n withProvider,\n withContext,\n useStyles: useFieldStyles,\n useClassNames,\n PropsProvider\n} = createSlotRecipeContext({ key: \"field\" });\nconst FieldRoot = withProvider(\n Field.Root,\n \"root\",\n { forwardAsChild: true }\n);\nconst FieldPropsProvider = PropsProvider;\nconst FieldLabel = withContext(\n Field.Label,\n \"label\",\n { forwardAsChild: true }\n);\nconst FieldHelperText = withContext(Field.HelperText, \"helperText\", { forwardAsChild: true });\nconst FieldErrorText = withContext(\n Field.ErrorText,\n \"errorText\",\n { forwardAsChild: true }\n);\nconst FieldErrorIcon = createIcon({\n d: \"M11.983,0a12.206,12.206,0,0,0-8.51,3.653A11.8,11.8,0,0,0,0,12.207,11.779,11.779,0,0,0,11.8,24h.214A12.111,12.111,0,0,0,24,11.791h0A11.766,11.766,0,0,0,11.983,0ZM10.5,16.542a1.476,1.476,0,0,1,1.449-1.53h.027a1.527,1.527,0,0,1,1.523,1.47,1.475,1.475,0,0,1-1.449,1.53h-.027A1.529,1.529,0,0,1,10.5,16.542ZM11,12.5v-6a1,1,0,0,1,2,0v6a1,1,0,1,1-2,0Z\"\n});\nconst FieldRequiredIndicator = forwardRef(function RequiredIndicator(props, ref) {\n const { fallback, children = \"*\", ...restProps } = props;\n const field = useFieldContext();\n const classNames = useClassNames();\n const styles = useFieldStyles();\n if (!field?.required) {\n return fallback;\n }\n return /* @__PURE__ */ jsx(\n chakra.span,\n {\n ref,\n \"aria-hidden\": \"true\",\n ...restProps,\n className: cx(classNames.requiredIndicator, props.className),\n css: [styles.requiredIndicator, props.css],\n children\n }\n );\n});\n\nexport { FieldErrorIcon, FieldErrorText, FieldHelperText, FieldLabel, FieldPropsProvider, FieldRequiredIndicator, FieldRoot, useFieldStyles };\n","import { FormControlSize } from \"./withFormControl.types\";\n\nexport const optionalTextSizeMap: Record<FormControlSize, number> = {\n sm: 10,\n md: 12,\n lg: 14,\n};\n","import React from \"react\";\nimport { Field } from \"@chakra-ui/react/field\";\nimport {\n FormControlLabelPosition,\n FormControlSize,\n} from \"./withFormControl.types\";\nimport { SystemStyleObject } from \"@chakra-ui/react/styled-system\";\nimport { TypographyVariant } from \"shared/types/typography\";\nimport { Text } from \"components/Text/text.component\";\nimport { optionalTextSizeMap } from \"./withFormControl.records\";\nimport { fontSizes } from \"theme/tokens/typography/typography.records\";\nimport { Flex } from \"@chakra-ui/react/flex\";\nimport { Icon } from \"components/Icon/icon.component\";\n\nexport interface WithFormControlProps {\n disabled?: boolean;\n errorText?: string;\n formControlStyle?: SystemStyleObject;\n fullWidth?: boolean;\n helperText?: string;\n inlineField?: boolean;\n invalid?: boolean;\n invalidIconColor?: TypographyVariant;\n label?: string | React.ReactNode;\n labelPosition?: FormControlLabelPosition;\n labelStyle?: SystemStyleObject;\n onContrast?: boolean;\n readOnly?: boolean;\n required?: boolean;\n showOptionalElement?: boolean;\n size?: FormControlSize;\n useInvalidIcon?: boolean;\n useInvalidText?: boolean;\n}\n\nexport const withFormControl = <P extends WithFormControlProps>(\n Component: React.ComponentType<P>,\n): React.FC<P> => {\n const WithFormControl = ({\n disabled = false,\n errorText = \"Field is invalid\",\n formControlStyle,\n fullWidth = true,\n helperText,\n inlineField = false,\n invalid = false,\n invalidIconColor = \"danger\",\n label,\n labelPosition = \"start\",\n labelStyle,\n onContrast = false,\n readOnly = false,\n required = false,\n showOptionalElement = false,\n size = \"md\",\n useInvalidIcon = false,\n useInvalidText = true,\n ...props\n }: WithFormControlProps): React.JSX.Element => {\n const labelComponent = (\n <Field.Label\n className=\"FormControl__Label\"\n color={onContrast ? \"text.contrast\" : \"text\"}\n fontSize={fontSizes[size]}\n {...labelStyle}\n onClick={(e) => {\n e.stopPropagation();\n }}\n >\n {label}\n <Field.RequiredIndicator\n className=\"FormControl__RequiredIndicator\"\n color={onContrast ? \"text.danger.contrast\" : \"text.danger\"}\n {...(!required && {\n fallback: showOptionalElement ? (\n <Text\n variant={onContrast ? \"subtleOnContrast\" : \"subtle\"}\n fontSize={optionalTextSizeMap[size]}\n >\n {\" \"}\n (Optional)\n </Text>\n ) : (\n <></>\n ),\n })}\n />\n </Field.Label>\n );\n\n return (\n <Field.Root\n className=\"FormControl group\"\n disabled={disabled}\n invalid={invalid}\n readOnly={readOnly}\n required={required}\n width={fullWidth ? \"100%\" : \"auto\"}\n {...formControlStyle}\n >\n <Flex\n className=\"FormControl__Container\"\n flexDirection={inlineField ? \"row\" : \"column\"}\n w={inlineField ? \"max-content\" : \"100%\"}\n gap={2}\n >\n {label && labelPosition === \"start\" && labelComponent}\n <Flex\n className=\"FormControl__Content\"\n alignItems=\"center\"\n gap={2}\n w={inlineField ? \"max-content\" : \"100%\"}\n >\n <Component\n disabled={disabled}\n invalid={invalid}\n onContrast={onContrast}\n readOnly={readOnly}\n required={required}\n size={size}\n {...(props as P)}\n />\n {useInvalidIcon && invalid && (\n <Icon\n className=\"FormControl__InvalidIcon\"\n name=\"warningSign\"\n variant={invalidIconColor}\n size={size}\n />\n )}\n </Flex>\n {label && labelPosition === \"end\" && labelComponent}\n </Flex>\n {useInvalidText && invalid && (\n <Field.ErrorText\n className=\"FormControl__ErrorText\"\n fontSize=\"xs\"\n color={onContrast ? \"text.danger.contrast\" : \"text.danger\"}\n >\n {errorText}\n </Field.ErrorText>\n )}\n {helperText && (\n <Field.HelperText\n className=\"FormControl__HelperText\"\n fontSize=\"xs\"\n color={onContrast ? \"text.subtle.contrast\" : \"text.subtle\"}\n >\n {helperText}\n </Field.HelperText>\n )}\n </Field.Root>\n );\n };\n\n WithFormControl.displayName = `withFormControl(${Component.displayName || Component.name}`;\n return WithFormControl;\n};\n"],"names":["FieldErrorText","forwardRef","props","ref","field","useFieldContext","mergedProps","mergeProps","jsx","ark","FieldHelperText","FieldLabel","useSafeLayoutEffect","useLayoutEffect","useEffect","FieldsetProvider","useFieldsetContext","createContext","useField","fieldset","ids","disabled","invalid","readOnly","required","hasErrorText","setHasErrorText","useState","hasHelperText","setHasHelperText","id","useId","rootRef","useRef","rootId","errorTextId","helperTextId","labelId","rootNode","win","getWindow","doc","checkTextElements","observer","labelIds","useMemo","ids2","getRootProps","parts","dataAttr","getLabelProps","getControlProps","ariaAttr","getInputProps","getTextareaProps","getSelectProps","getHelperTextProps","getErrorTextProps","getRequiredIndicatorProps","FieldRoot","useFieldProps","localProps","createSplitProps","FieldProvider","composeRefs","useRecipeResult","createRecipeContext","Icon","React","styles","className","otherProps","chakra","cx","createIcon","options","viewBox","pathDefinition","displayName","defaultProps","path","Children","Comp","withProvider","withContext","useFieldStyles","useClassNames","createSlotRecipeContext","Field.Root","Field.Label","Field.HelperText","Field.ErrorText","FieldRequiredIndicator","fallback","children","restProps","classNames","optionalTextSizeMap","withFormControl","Component","WithFormControl","errorText","formControlStyle","fullWidth","helperText","inlineField","invalidIconColor","label","labelPosition","labelStyle","onContrast","showOptionalElement","size","useInvalidIcon","useInvalidText","labelComponent","jsxs","fontSizes","e","Field.RequiredIndicator","Text","Fragment","Flex"],"mappings":"2yBAOMA,EAAiBC,EAAU,WAAC,CAACC,EAAOC,IAAQ,CAChD,MAAMC,EAAQC,EAAAA,gBAAiB,EACzBC,EAAcC,EAAU,WAACH,EAAM,kBAAiB,EAAIF,CAAK,EAC/D,OAAIE,GAAO,QACcI,EAAAA,kBAAAA,IAAIC,EAAAA,IAAI,KAAM,CAAE,GAAGH,EAAa,IAAAH,EAAK,EAEvD,IACT,CAAC,EACDH,EAAe,YAAc,iBCR7B,MAAMU,EAAkBT,EAAU,WAAC,CAACC,EAAOC,IAAQ,CACjD,MAAMC,EAAQC,EAAAA,gBAAiB,EACzBC,EAAcC,EAAU,WAACH,GAAO,mBAAkB,EAAIF,CAAK,EACjE,OAAuBM,EAAAA,kBAAAA,IAAIC,EAAAA,IAAI,KAAM,CAAE,GAAGH,EAAa,IAAAH,EAAK,CAC9D,CAAC,EACDO,EAAgB,YAAc,kBCL9B,MAAMC,EAAaV,EAAU,WAAC,CAACC,EAAOC,IAAQ,CAC5C,MAAMC,EAAQC,EAAAA,gBAAiB,EACzBC,EAAcC,EAAU,WAACH,GAAO,cAAa,EAAIF,CAAK,EAC5D,OAAuBM,EAAAA,kBAAAA,IAAIC,EAAAA,IAAI,MAAO,CAAE,GAAGH,EAAa,IAAAH,EAAK,CAC/D,CAAC,EACDQ,EAAW,YAAc,aCTzB,MAAMC,EAAsB,OAAO,OAAW,IAAcC,EAAe,gBAAGC,EAAS,UCAjF,CAACC,GAAkBC,CAAkB,EAAIC,gBAAc,CAC3D,KAAM,kBACN,SAAU,qBACV,aAAc,uBACd,OAAQ,EACV,CAAC,ECDKC,EAAW,CAAChB,EAAQ,KAAO,CAC/B,MAAMiB,EAAWH,EAAoB,EAC/B,CAAE,IAAAI,EAAK,SAAAC,EAAW,EAAQF,GAAU,SAAW,QAAAG,EAAU,GAAO,SAAAC,EAAW,GAAO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":["../../node_modules/@ark-ui/react/dist/components/field/field-error-text.js","../../node_modules/@ark-ui/react/dist/components/field/field-helper-text.js","../../node_modules/@ark-ui/react/dist/components/field/field-label.js","../../node_modules/@ark-ui/react/dist/utils/use-safe-layout-effect.js","../../node_modules/@ark-ui/react/dist/components/fieldset/use-fieldset-context.js","../../node_modules/@ark-ui/react/dist/components/field/use-field.js","../../node_modules/@ark-ui/react/dist/components/field/field-root.js","../../node_modules/@chakra-ui/react/dist/esm/components/icon/icon.js","../../node_modules/@chakra-ui/react/dist/esm/components/icon/create-icon.js","../../node_modules/@chakra-ui/react/dist/esm/components/field/field.js","../../src/hocs/withFormControl/withFormControl.records.ts","../../src/hocs/withFormControl/withFormControl.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 FieldErrorText = forwardRef((props, ref) => {\n const field = useFieldContext();\n const mergedProps = mergeProps(field.getErrorTextProps(), props);\n if (field?.invalid) {\n return /* @__PURE__ */ jsx(ark.span, { ...mergedProps, ref });\n }\n return null;\n});\nFieldErrorText.displayName = \"FieldErrorText\";\n\nexport { FieldErrorText };\n","'use client';\nimport { jsx } from 'react/jsx-runtime';\nimport { mergeProps } from '@zag-js/react';\nimport { forwardRef } from 'react';\nimport { ark } from '../factory.js';\nimport { useFieldContext } from './use-field-context.js';\n\nconst FieldHelperText = forwardRef((props, ref) => {\n const field = useFieldContext();\n const mergedProps = mergeProps(field?.getHelperTextProps(), props);\n return /* @__PURE__ */ jsx(ark.span, { ...mergedProps, ref });\n});\nFieldHelperText.displayName = \"FieldHelperText\";\n\nexport { FieldHelperText };\n","'use client';\nimport { jsx } from 'react/jsx-runtime';\nimport { mergeProps } from '@zag-js/react';\nimport { forwardRef } from 'react';\nimport { ark } from '../factory.js';\nimport { useFieldContext } from './use-field-context.js';\n\nconst FieldLabel = forwardRef((props, ref) => {\n const field = useFieldContext();\n const mergedProps = mergeProps(field?.getLabelProps(), props);\n return /* @__PURE__ */ jsx(ark.label, { ...mergedProps, ref });\n});\nFieldLabel.displayName = \"FieldLabel\";\n\nexport { FieldLabel };\n","'use client';\nimport { useLayoutEffect, useEffect } from 'react';\n\nconst useSafeLayoutEffect = typeof window !== \"undefined\" ? useLayoutEffect : useEffect;\n\nexport { useSafeLayoutEffect };\n","'use client';\nimport { createContext } from '../../utils/create-context.js';\n\nconst [FieldsetProvider, useFieldsetContext] = createContext({\n name: \"FieldsetContext\",\n hookName: \"useFieldsetContext\",\n providerName: \"<FieldsetProvider />\",\n strict: false\n});\n\nexport { FieldsetProvider, useFieldsetContext };\n","'use client';\nimport { getWindow, dataAttr, ariaAttr } from '@zag-js/dom-query';\nimport { useState, useId, useRef, useMemo } from 'react';\nimport { useSafeLayoutEffect } from '../../utils/use-safe-layout-effect.js';\nimport { useFieldsetContext } from '../fieldset/use-fieldset-context.js';\nimport { parts } from './field.anatomy.js';\n\nconst useField = (props = {}) => {\n const fieldset = useFieldsetContext();\n const { ids, disabled = Boolean(fieldset?.disabled), invalid = false, readOnly = false, required = false } = props;\n const [hasErrorText, setHasErrorText] = useState(false);\n const [hasHelperText, setHasHelperText] = useState(false);\n const id = props.id ?? useId();\n const rootRef = useRef(null);\n const rootId = ids?.control ?? `field::${id}`;\n const errorTextId = ids?.errorText ?? `field::${id}::error-text`;\n const helperTextId = ids?.helperText ?? `field::${id}::helper-text`;\n const labelId = ids?.label ?? `field::${id}::label`;\n useSafeLayoutEffect(() => {\n const rootNode = rootRef.current;\n if (!rootNode) return;\n const win = getWindow(rootNode);\n const doc = win.document;\n const checkTextElements = () => {\n setHasErrorText(!!doc.getElementById(errorTextId));\n setHasHelperText(!!doc.getElementById(helperTextId));\n };\n checkTextElements();\n const observer = new win.MutationObserver(checkTextElements);\n observer.observe(rootNode, { childList: true, subtree: true });\n return () => observer.disconnect();\n }, [errorTextId, helperTextId]);\n const labelIds = useMemo(() => {\n const ids2 = [];\n if (hasErrorText && invalid) ids2.push(errorTextId);\n if (hasHelperText) ids2.push(helperTextId);\n return ids2.join(\" \") || void 0;\n }, [invalid, errorTextId, helperTextId, hasErrorText, hasHelperText]);\n const getRootProps = useMemo(\n () => () => ({\n ...parts.root.attrs,\n id: rootId,\n ref: rootRef,\n role: \"group\",\n \"data-disabled\": dataAttr(disabled),\n \"data-invalid\": dataAttr(invalid),\n \"data-readonly\": dataAttr(readOnly)\n }),\n [disabled, invalid, readOnly, rootId]\n );\n const getLabelProps = useMemo(\n () => () => ({\n ...parts.label.attrs,\n id: labelId,\n \"data-disabled\": dataAttr(disabled),\n \"data-invalid\": dataAttr(invalid),\n \"data-readonly\": dataAttr(readOnly),\n htmlFor: id\n }),\n [disabled, invalid, readOnly, id, labelId]\n );\n const getControlProps = useMemo(\n () => () => ({\n \"aria-describedby\": labelIds,\n \"aria-invalid\": ariaAttr(invalid),\n \"data-invalid\": dataAttr(invalid),\n \"data-required\": dataAttr(required),\n \"data-readonly\": dataAttr(readOnly),\n id,\n required,\n disabled,\n readOnly\n }),\n [labelIds, invalid, required, readOnly, id, disabled]\n );\n const getInputProps = useMemo(\n () => () => ({\n ...getControlProps(),\n ...parts.input.attrs\n }),\n [getControlProps]\n );\n const getTextareaProps = useMemo(\n () => () => ({\n ...getControlProps(),\n ...parts.textarea.attrs\n }),\n [getControlProps]\n );\n const getSelectProps = useMemo(\n () => () => ({\n ...getControlProps(),\n ...parts.select.attrs\n }),\n [getControlProps]\n );\n const getHelperTextProps = useMemo(\n () => () => ({\n id: helperTextId,\n ...parts.helperText.attrs,\n \"data-disabled\": dataAttr(disabled)\n }),\n [disabled, helperTextId]\n );\n const getErrorTextProps = useMemo(\n () => () => ({\n id: errorTextId,\n ...parts.errorText.attrs,\n \"aria-live\": \"polite\"\n }),\n [errorTextId]\n );\n const getRequiredIndicatorProps = useMemo(\n () => () => ({\n \"aria-hidden\": true,\n ...parts.requiredIndicator.attrs\n }),\n []\n );\n return {\n ariaDescribedby: labelIds,\n ids: {\n root: rootId,\n control: id,\n label: labelId,\n errorText: errorTextId,\n helperText: helperTextId\n },\n refs: {\n rootRef\n },\n disabled,\n invalid,\n readOnly,\n required,\n getLabelProps,\n getRootProps,\n getInputProps,\n getTextareaProps,\n getSelectProps,\n getHelperTextProps,\n getErrorTextProps,\n getRequiredIndicatorProps\n };\n};\n\nexport { useField };\n","'use client';\nimport { jsx } from 'react/jsx-runtime';\nimport { mergeProps } from '@zag-js/react';\nimport { forwardRef } from 'react';\nimport { composeRefs } from '../../utils/compose-refs.js';\nimport { createSplitProps } from '../../utils/create-split-props.js';\nimport { ark } from '../factory.js';\nimport { useField } from './use-field.js';\nimport { FieldProvider } from './use-field-context.js';\n\nconst FieldRoot = forwardRef((props, ref) => {\n const [useFieldProps, localProps] = createSplitProps()(props, [\n \"id\",\n \"ids\",\n \"disabled\",\n \"invalid\",\n \"readOnly\",\n \"required\"\n ]);\n const field = useField(useFieldProps);\n const mergedProps = mergeProps(field.getRootProps(), localProps);\n return /* @__PURE__ */ jsx(FieldProvider, { value: field, children: /* @__PURE__ */ jsx(ark.div, { ...mergedProps, ref: composeRefs(ref, field.refs.rootRef) }) });\n});\nFieldRoot.displayName = \"FieldRoot\";\n\nexport { FieldRoot };\n","\"use strict\";\n\"use client\";\nimport { jsx } from 'react/jsx-runtime';\nimport * as React from 'react';\nimport { cx } from '../../utils/cx.js';\nimport { createRecipeContext } from '../../styled-system/create-recipe-context.js';\nimport { chakra } from '../../styled-system/factory.js';\n\nconst { useRecipeResult, PropsProvider } = createRecipeContext({ key: \"icon\" });\nconst Icon = React.forwardRef(\n function Icon2(props, ref) {\n const {\n styles,\n className,\n props: otherProps\n } = useRecipeResult({ asChild: !props.as, ...props });\n return /* @__PURE__ */ jsx(\n chakra.svg,\n {\n ref,\n focusable: false,\n \"aria-hidden\": \"true\",\n ...otherProps,\n css: [styles, props.css],\n className: cx(className, props.className)\n }\n );\n }\n);\nconst IconPropsProvider = PropsProvider;\n\nexport { Icon, IconPropsProvider };\n","\"use strict\";\n\"use client\";\nimport { jsx } from 'react/jsx-runtime';\nimport { Children, forwardRef } from 'react';\nimport { Icon } from './icon.js';\n\nfunction createIcon(options) {\n const {\n viewBox = \"0 0 24 24\",\n d: pathDefinition,\n displayName,\n defaultProps = {}\n } = options;\n const path = Children.toArray(options.path);\n const Comp = forwardRef((props, ref) => /* @__PURE__ */ jsx(\n Icon,\n {\n ref,\n asChild: false,\n viewBox,\n ...defaultProps,\n ...props,\n children: path.length ? path : /* @__PURE__ */ jsx(\"path\", { fill: \"currentColor\", d: pathDefinition })\n }\n ));\n Comp.displayName = displayName;\n return Comp;\n}\n\nexport { createIcon };\n","\"use strict\";\n\"use client\";\nimport { jsx } from 'react/jsx-runtime';\nimport { Field, useFieldContext } from '@ark-ui/react/field';\nimport { forwardRef } from 'react';\nimport { cx } from '../../utils/cx.js';\nimport { createSlotRecipeContext } from '../../styled-system/create-slot-recipe-context.js';\nimport { chakra } from '../../styled-system/factory.js';\nimport { createIcon } from '../icon/create-icon.js';\n\nconst {\n withProvider,\n withContext,\n useStyles: useFieldStyles,\n useClassNames,\n PropsProvider\n} = createSlotRecipeContext({ key: \"field\" });\nconst FieldRoot = withProvider(\n Field.Root,\n \"root\",\n { forwardAsChild: true }\n);\nconst FieldPropsProvider = PropsProvider;\nconst FieldLabel = withContext(\n Field.Label,\n \"label\",\n { forwardAsChild: true }\n);\nconst FieldHelperText = withContext(Field.HelperText, \"helperText\", { forwardAsChild: true });\nconst FieldErrorText = withContext(\n Field.ErrorText,\n \"errorText\",\n { forwardAsChild: true }\n);\nconst FieldErrorIcon = createIcon({\n d: \"M11.983,0a12.206,12.206,0,0,0-8.51,3.653A11.8,11.8,0,0,0,0,12.207,11.779,11.779,0,0,0,11.8,24h.214A12.111,12.111,0,0,0,24,11.791h0A11.766,11.766,0,0,0,11.983,0ZM10.5,16.542a1.476,1.476,0,0,1,1.449-1.53h.027a1.527,1.527,0,0,1,1.523,1.47,1.475,1.475,0,0,1-1.449,1.53h-.027A1.529,1.529,0,0,1,10.5,16.542ZM11,12.5v-6a1,1,0,0,1,2,0v6a1,1,0,1,1-2,0Z\"\n});\nconst FieldRequiredIndicator = forwardRef(function RequiredIndicator(props, ref) {\n const { fallback, children = \"*\", ...restProps } = props;\n const field = useFieldContext();\n const classNames = useClassNames();\n const styles = useFieldStyles();\n if (!field?.required) {\n return fallback;\n }\n return /* @__PURE__ */ jsx(\n chakra.span,\n {\n ref,\n \"aria-hidden\": \"true\",\n ...restProps,\n className: cx(classNames.requiredIndicator, props.className),\n css: [styles.requiredIndicator, props.css],\n children\n }\n );\n});\n\nexport { FieldErrorIcon, FieldErrorText, FieldHelperText, FieldLabel, FieldPropsProvider, FieldRequiredIndicator, FieldRoot, useFieldStyles };\n","import { FormControlSize } from \"./withFormControl.types\";\n\nexport const optionalTextSizeMap: Record<FormControlSize, number> = {\n sm: 10,\n md: 12,\n lg: 14,\n};\n","import React from \"react\";\nimport { Field } from \"@chakra-ui/react/field\";\nimport {\n FormControlLabelPosition,\n FormControlSize,\n} from \"./withFormControl.types\";\nimport { SystemStyleObject } from \"@chakra-ui/react/styled-system\";\nimport { TypographyVariant } from \"shared/types/typography\";\nimport { Text } from \"components/Text/text.component\";\nimport { optionalTextSizeMap } from \"./withFormControl.records\";\nimport { fontSizes } from \"theme/tokens/typography/typography.records\";\nimport { Flex } from \"@chakra-ui/react/flex\";\nimport { Icon } from \"components/Icon/icon.component\";\n\nexport interface WithFormControlProps {\n disabled?: boolean;\n errorText?: string;\n formControlStyle?: SystemStyleObject;\n fullWidth?: boolean;\n helperText?: string;\n inlineField?: boolean;\n invalid?: boolean;\n invalidIconColor?: TypographyVariant;\n label?: string | React.ReactNode;\n labelPosition?: FormControlLabelPosition;\n labelStyle?: SystemStyleObject;\n onContrast?: boolean;\n readOnly?: boolean;\n required?: boolean;\n showOptionalElement?: boolean;\n size?: FormControlSize;\n useInvalidIcon?: boolean;\n useInvalidText?: boolean;\n}\n\nexport const withFormControl = <P extends WithFormControlProps>(\n Component: React.ComponentType<P>,\n): React.FC<P> => {\n const WithFormControl = ({\n disabled = false,\n errorText = \"Field is invalid\",\n formControlStyle,\n fullWidth = true,\n helperText,\n inlineField = false,\n invalid = false,\n invalidIconColor = \"danger\",\n label,\n labelPosition = \"start\",\n labelStyle,\n onContrast = false,\n readOnly = false,\n required = false,\n showOptionalElement = false,\n size = \"md\",\n useInvalidIcon = false,\n useInvalidText = true,\n ...props\n }: WithFormControlProps): React.JSX.Element => {\n const labelComponent = (\n <Field.Label\n className=\"FormControl__Label\"\n color={onContrast ? \"text.contrast\" : \"text\"}\n fontSize={fontSizes[size]}\n {...labelStyle}\n onClick={(e) => {\n e.stopPropagation();\n }}\n >\n {label}\n <Field.RequiredIndicator\n className=\"FormControl__RequiredIndicator\"\n color={onContrast ? \"text.danger.contrast\" : \"text.danger\"}\n {...(!required && {\n fallback: showOptionalElement ? (\n <Text\n variant={onContrast ? \"subtleOnContrast\" : \"subtle\"}\n fontSize={optionalTextSizeMap[size]}\n >\n {\" \"}\n (Optional)\n </Text>\n ) : (\n <></>\n ),\n })}\n />\n </Field.Label>\n );\n\n return (\n <Field.Root\n className=\"FormControl group\"\n disabled={disabled}\n invalid={invalid}\n readOnly={readOnly}\n required={required}\n width={fullWidth ? \"100%\" : \"auto\"}\n {...formControlStyle}\n >\n <Flex\n className=\"FormControl__Container\"\n flexDirection={inlineField ? \"row\" : \"column\"}\n w={inlineField ? \"max-content\" : \"100%\"}\n gap={2}\n >\n {label && labelPosition === \"start\" && labelComponent}\n <Flex\n className=\"FormControl__Content\"\n alignItems=\"center\"\n gap={2}\n w={inlineField ? \"max-content\" : \"100%\"}\n >\n <Component\n disabled={disabled}\n invalid={invalid}\n onContrast={onContrast}\n readOnly={readOnly}\n required={required}\n size={size}\n {...(props as P)}\n />\n {useInvalidIcon && invalid && (\n <Icon\n className=\"FormControl__InvalidIcon\"\n name=\"warningSign\"\n variant={invalidIconColor}\n size={size}\n />\n )}\n </Flex>\n {label && labelPosition === \"end\" && labelComponent}\n </Flex>\n {useInvalidText && invalid && (\n <Field.ErrorText\n className=\"FormControl__ErrorText\"\n fontSize=\"xs\"\n color={onContrast ? \"text.danger.contrast\" : \"text.danger\"}\n >\n {errorText}\n </Field.ErrorText>\n )}\n {helperText && (\n <Field.HelperText\n className=\"FormControl__HelperText\"\n fontSize=\"xs\"\n color={onContrast ? \"text.subtle.contrast\" : \"text.subtle\"}\n >\n {helperText}\n </Field.HelperText>\n )}\n </Field.Root>\n );\n };\n\n WithFormControl.displayName = `withFormControl(${Component.displayName || Component.name}`;\n return WithFormControl;\n};\n"],"names":["FieldErrorText","forwardRef","props","ref","field","useFieldContext","mergedProps","mergeProps","jsx","ark","FieldHelperText","FieldLabel","useSafeLayoutEffect","useLayoutEffect","useEffect","FieldsetProvider","useFieldsetContext","createContext","useField","fieldset","ids","disabled","invalid","readOnly","required","hasErrorText","setHasErrorText","useState","hasHelperText","setHasHelperText","id","useId","rootRef","useRef","rootId","errorTextId","helperTextId","labelId","rootNode","win","getWindow","doc","checkTextElements","observer","labelIds","useMemo","ids2","getRootProps","parts","dataAttr","getLabelProps","getControlProps","ariaAttr","getInputProps","getTextareaProps","getSelectProps","getHelperTextProps","getErrorTextProps","getRequiredIndicatorProps","FieldRoot","useFieldProps","localProps","createSplitProps","FieldProvider","composeRefs","useRecipeResult","createRecipeContext","Icon","React","styles","className","otherProps","chakra","cx","createIcon","options","viewBox","pathDefinition","displayName","defaultProps","path","Children","Comp","withProvider","withContext","useFieldStyles","useClassNames","createSlotRecipeContext","Field.Root","Field.Label","Field.HelperText","Field.ErrorText","FieldRequiredIndicator","fallback","children","restProps","classNames","optionalTextSizeMap","withFormControl","Component","WithFormControl","errorText","formControlStyle","fullWidth","helperText","inlineField","invalidIconColor","label","labelPosition","labelStyle","onContrast","showOptionalElement","size","useInvalidIcon","useInvalidText","labelComponent","jsxs","fontSizes","e","Field.RequiredIndicator","Text","Fragment","Flex"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kBAAA,KAAC5B,GAAA,CACC,UAAU,oBACV,SAAAnE,EACA,QAAAC,EACA,SAAAC,EACA,SAAAC,EACA,MAAO+E,EAAY,OAAS,OAC3B,GAAGD,EAEJ,SAAA,CAAAc,EAAA,kBAAA,KAACM,EAAA,KAAA,CACC,UAAU,yBACV,cAAejB,EAAc,MAAQ,SACrC,EAAGA,EAAc,cAAgB,OACjC,IAAK,EAEJ,SAAA,CAAAE,GAASC,IAAkB,SAAWO,EACvCC,EAAA,kBAAA,KAACM,EAAA,KAAA,CACC,UAAU,uBACV,WAAW,SACX,IAAK,EACL,EAAGjB,EAAc,cAAgB,OAEjC,SAAA,CAAAjG,EAAA,kBAAA,IAAC2F,EAAA,CACC,SAAA9E,EACA,QAAAC,EACA,WAAAwF,EACA,SAAAvF,EACA,SAAAC,EACA,KAAAwF,EACC,GAAI9G,CAAA,CACP,EACC+G,GAAkB3F,GACjBd,EAAA,kBAAA,IAAC2D,EAAA,KAAA,CACC,UAAU,2BACV,KAAK,cACL,QAASuC,EACT,KAAAM,CAAA,CAAA,CACF,CAAA,CAEJ,EACCL,GAASC,IAAkB,OAASO,CAAA,CAAA,CACvC,EACCD,GAAkB5F,GACjBd,EAAA,kBAAA,IAACmF,GAAA,CACC,UAAU,yBACV,SAAS,KACT,MAAOmB,EAAa,uBAAyB,cAE5C,SAAAT,CAAA,CACH,EAEDG,GACChG,EAAA,kBAAA,IAACkF,GAAA,CACC,UAAU,0BACV,SAAS,KACT,MAAOoB,EAAa,uBAAyB,cAE5C,SAAAN,CAAA,CAAA,CACH,CAAA,CAEJ,CAEJ,EAEA,OAAAJ,EAAgB,YAAc,mBAAmBD,EAAU,aAAeA,EAAU,IAAI,GACjFC,CACT","x_google_ignoreList":[0,1,2,3,4,5,6,7,8,9]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { j as o } from "./jsx-runtime-C5mzlN2N.js";
|
|
2
|
-
import { W as Q } from "./text.component-
|
|
2
|
+
import { W as Q } from "./text.component-z4cNuAAI.js";
|
|
3
3
|
import { p as g, f as U } from "./typography.records-H4aA5AOA.js";
|
|
4
4
|
import { I as V } from "./icon.component-DGNCL1Yc.js";
|
|
5
5
|
import { F as q } from "./flex-smlF8uQG.js";
|
|
@@ -373,4 +373,4 @@ const ve = T(function(t, r) {
|
|
|
373
373
|
export {
|
|
374
374
|
Be as w
|
|
375
375
|
};
|
|
376
|
-
//# sourceMappingURL=withFormControl-
|
|
376
|
+
//# sourceMappingURL=withFormControl-syyL9lWW.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"withFormControl-C4OizqXz.js","sources":["../../node_modules/@ark-ui/react/dist/components/field/field-error-text.js","../../node_modules/@ark-ui/react/dist/components/field/field-helper-text.js","../../node_modules/@ark-ui/react/dist/components/field/field-label.js","../../node_modules/@ark-ui/react/dist/utils/use-safe-layout-effect.js","../../node_modules/@ark-ui/react/dist/components/fieldset/use-fieldset-context.js","../../node_modules/@ark-ui/react/dist/components/field/use-field.js","../../node_modules/@ark-ui/react/dist/components/field/field-root.js","../../node_modules/@chakra-ui/react/dist/esm/components/icon/icon.js","../../node_modules/@chakra-ui/react/dist/esm/components/icon/create-icon.js","../../node_modules/@chakra-ui/react/dist/esm/components/field/field.js","../../src/hocs/withFormControl/withFormControl.records.ts","../../src/hocs/withFormControl/withFormControl.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 FieldErrorText = forwardRef((props, ref) => {\n const field = useFieldContext();\n const mergedProps = mergeProps(field.getErrorTextProps(), props);\n if (field?.invalid) {\n return /* @__PURE__ */ jsx(ark.span, { ...mergedProps, ref });\n }\n return null;\n});\nFieldErrorText.displayName = \"FieldErrorText\";\n\nexport { FieldErrorText };\n","'use client';\nimport { jsx } from 'react/jsx-runtime';\nimport { mergeProps } from '@zag-js/react';\nimport { forwardRef } from 'react';\nimport { ark } from '../factory.js';\nimport { useFieldContext } from './use-field-context.js';\n\nconst FieldHelperText = forwardRef((props, ref) => {\n const field = useFieldContext();\n const mergedProps = mergeProps(field?.getHelperTextProps(), props);\n return /* @__PURE__ */ jsx(ark.span, { ...mergedProps, ref });\n});\nFieldHelperText.displayName = \"FieldHelperText\";\n\nexport { FieldHelperText };\n","'use client';\nimport { jsx } from 'react/jsx-runtime';\nimport { mergeProps } from '@zag-js/react';\nimport { forwardRef } from 'react';\nimport { ark } from '../factory.js';\nimport { useFieldContext } from './use-field-context.js';\n\nconst FieldLabel = forwardRef((props, ref) => {\n const field = useFieldContext();\n const mergedProps = mergeProps(field?.getLabelProps(), props);\n return /* @__PURE__ */ jsx(ark.label, { ...mergedProps, ref });\n});\nFieldLabel.displayName = \"FieldLabel\";\n\nexport { FieldLabel };\n","'use client';\nimport { useLayoutEffect, useEffect } from 'react';\n\nconst useSafeLayoutEffect = typeof window !== \"undefined\" ? useLayoutEffect : useEffect;\n\nexport { useSafeLayoutEffect };\n","'use client';\nimport { createContext } from '../../utils/create-context.js';\n\nconst [FieldsetProvider, useFieldsetContext] = createContext({\n name: \"FieldsetContext\",\n hookName: \"useFieldsetContext\",\n providerName: \"<FieldsetProvider />\",\n strict: false\n});\n\nexport { FieldsetProvider, useFieldsetContext };\n","'use client';\nimport { getWindow, dataAttr, ariaAttr } from '@zag-js/dom-query';\nimport { useState, useId, useRef, useMemo } from 'react';\nimport { useSafeLayoutEffect } from '../../utils/use-safe-layout-effect.js';\nimport { useFieldsetContext } from '../fieldset/use-fieldset-context.js';\nimport { parts } from './field.anatomy.js';\n\nconst useField = (props = {}) => {\n const fieldset = useFieldsetContext();\n const { ids, disabled = Boolean(fieldset?.disabled), invalid = false, readOnly = false, required = false } = props;\n const [hasErrorText, setHasErrorText] = useState(false);\n const [hasHelperText, setHasHelperText] = useState(false);\n const id = props.id ?? useId();\n const rootRef = useRef(null);\n const rootId = ids?.control ?? `field::${id}`;\n const errorTextId = ids?.errorText ?? `field::${id}::error-text`;\n const helperTextId = ids?.helperText ?? `field::${id}::helper-text`;\n const labelId = ids?.label ?? `field::${id}::label`;\n useSafeLayoutEffect(() => {\n const rootNode = rootRef.current;\n if (!rootNode) return;\n const win = getWindow(rootNode);\n const doc = win.document;\n const checkTextElements = () => {\n setHasErrorText(!!doc.getElementById(errorTextId));\n setHasHelperText(!!doc.getElementById(helperTextId));\n };\n checkTextElements();\n const observer = new win.MutationObserver(checkTextElements);\n observer.observe(rootNode, { childList: true, subtree: true });\n return () => observer.disconnect();\n }, [errorTextId, helperTextId]);\n const labelIds = useMemo(() => {\n const ids2 = [];\n if (hasErrorText && invalid) ids2.push(errorTextId);\n if (hasHelperText) ids2.push(helperTextId);\n return ids2.join(\" \") || void 0;\n }, [invalid, errorTextId, helperTextId, hasErrorText, hasHelperText]);\n const getRootProps = useMemo(\n () => () => ({\n ...parts.root.attrs,\n id: rootId,\n ref: rootRef,\n role: \"group\",\n \"data-disabled\": dataAttr(disabled),\n \"data-invalid\": dataAttr(invalid),\n \"data-readonly\": dataAttr(readOnly)\n }),\n [disabled, invalid, readOnly, rootId]\n );\n const getLabelProps = useMemo(\n () => () => ({\n ...parts.label.attrs,\n id: labelId,\n \"data-disabled\": dataAttr(disabled),\n \"data-invalid\": dataAttr(invalid),\n \"data-readonly\": dataAttr(readOnly),\n htmlFor: id\n }),\n [disabled, invalid, readOnly, id, labelId]\n );\n const getControlProps = useMemo(\n () => () => ({\n \"aria-describedby\": labelIds,\n \"aria-invalid\": ariaAttr(invalid),\n \"data-invalid\": dataAttr(invalid),\n \"data-required\": dataAttr(required),\n \"data-readonly\": dataAttr(readOnly),\n id,\n required,\n disabled,\n readOnly\n }),\n [labelIds, invalid, required, readOnly, id, disabled]\n );\n const getInputProps = useMemo(\n () => () => ({\n ...getControlProps(),\n ...parts.input.attrs\n }),\n [getControlProps]\n );\n const getTextareaProps = useMemo(\n () => () => ({\n ...getControlProps(),\n ...parts.textarea.attrs\n }),\n [getControlProps]\n );\n const getSelectProps = useMemo(\n () => () => ({\n ...getControlProps(),\n ...parts.select.attrs\n }),\n [getControlProps]\n );\n const getHelperTextProps = useMemo(\n () => () => ({\n id: helperTextId,\n ...parts.helperText.attrs,\n \"data-disabled\": dataAttr(disabled)\n }),\n [disabled, helperTextId]\n );\n const getErrorTextProps = useMemo(\n () => () => ({\n id: errorTextId,\n ...parts.errorText.attrs,\n \"aria-live\": \"polite\"\n }),\n [errorTextId]\n );\n const getRequiredIndicatorProps = useMemo(\n () => () => ({\n \"aria-hidden\": true,\n ...parts.requiredIndicator.attrs\n }),\n []\n );\n return {\n ariaDescribedby: labelIds,\n ids: {\n root: rootId,\n control: id,\n label: labelId,\n errorText: errorTextId,\n helperText: helperTextId\n },\n refs: {\n rootRef\n },\n disabled,\n invalid,\n readOnly,\n required,\n getLabelProps,\n getRootProps,\n getInputProps,\n getTextareaProps,\n getSelectProps,\n getHelperTextProps,\n getErrorTextProps,\n getRequiredIndicatorProps\n };\n};\n\nexport { useField };\n","'use client';\nimport { jsx } from 'react/jsx-runtime';\nimport { mergeProps } from '@zag-js/react';\nimport { forwardRef } from 'react';\nimport { composeRefs } from '../../utils/compose-refs.js';\nimport { createSplitProps } from '../../utils/create-split-props.js';\nimport { ark } from '../factory.js';\nimport { useField } from './use-field.js';\nimport { FieldProvider } from './use-field-context.js';\n\nconst FieldRoot = forwardRef((props, ref) => {\n const [useFieldProps, localProps] = createSplitProps()(props, [\n \"id\",\n \"ids\",\n \"disabled\",\n \"invalid\",\n \"readOnly\",\n \"required\"\n ]);\n const field = useField(useFieldProps);\n const mergedProps = mergeProps(field.getRootProps(), localProps);\n return /* @__PURE__ */ jsx(FieldProvider, { value: field, children: /* @__PURE__ */ jsx(ark.div, { ...mergedProps, ref: composeRefs(ref, field.refs.rootRef) }) });\n});\nFieldRoot.displayName = \"FieldRoot\";\n\nexport { FieldRoot };\n","\"use strict\";\n\"use client\";\nimport { jsx } from 'react/jsx-runtime';\nimport * as React from 'react';\nimport { cx } from '../../utils/cx.js';\nimport { createRecipeContext } from '../../styled-system/create-recipe-context.js';\nimport { chakra } from '../../styled-system/factory.js';\n\nconst { useRecipeResult, PropsProvider } = createRecipeContext({ key: \"icon\" });\nconst Icon = React.forwardRef(\n function Icon2(props, ref) {\n const {\n styles,\n className,\n props: otherProps\n } = useRecipeResult({ asChild: !props.as, ...props });\n return /* @__PURE__ */ jsx(\n chakra.svg,\n {\n ref,\n focusable: false,\n \"aria-hidden\": \"true\",\n ...otherProps,\n css: [styles, props.css],\n className: cx(className, props.className)\n }\n );\n }\n);\nconst IconPropsProvider = PropsProvider;\n\nexport { Icon, IconPropsProvider };\n","\"use strict\";\n\"use client\";\nimport { jsx } from 'react/jsx-runtime';\nimport { Children, forwardRef } from 'react';\nimport { Icon } from './icon.js';\n\nfunction createIcon(options) {\n const {\n viewBox = \"0 0 24 24\",\n d: pathDefinition,\n displayName,\n defaultProps = {}\n } = options;\n const path = Children.toArray(options.path);\n const Comp = forwardRef((props, ref) => /* @__PURE__ */ jsx(\n Icon,\n {\n ref,\n asChild: false,\n viewBox,\n ...defaultProps,\n ...props,\n children: path.length ? path : /* @__PURE__ */ jsx(\"path\", { fill: \"currentColor\", d: pathDefinition })\n }\n ));\n Comp.displayName = displayName;\n return Comp;\n}\n\nexport { createIcon };\n","\"use strict\";\n\"use client\";\nimport { jsx } from 'react/jsx-runtime';\nimport { Field, useFieldContext } from '@ark-ui/react/field';\nimport { forwardRef } from 'react';\nimport { cx } from '../../utils/cx.js';\nimport { createSlotRecipeContext } from '../../styled-system/create-slot-recipe-context.js';\nimport { chakra } from '../../styled-system/factory.js';\nimport { createIcon } from '../icon/create-icon.js';\n\nconst {\n withProvider,\n withContext,\n useStyles: useFieldStyles,\n useClassNames,\n PropsProvider\n} = createSlotRecipeContext({ key: \"field\" });\nconst FieldRoot = withProvider(\n Field.Root,\n \"root\",\n { forwardAsChild: true }\n);\nconst FieldPropsProvider = PropsProvider;\nconst FieldLabel = withContext(\n Field.Label,\n \"label\",\n { forwardAsChild: true }\n);\nconst FieldHelperText = withContext(Field.HelperText, \"helperText\", { forwardAsChild: true });\nconst FieldErrorText = withContext(\n Field.ErrorText,\n \"errorText\",\n { forwardAsChild: true }\n);\nconst FieldErrorIcon = createIcon({\n d: \"M11.983,0a12.206,12.206,0,0,0-8.51,3.653A11.8,11.8,0,0,0,0,12.207,11.779,11.779,0,0,0,11.8,24h.214A12.111,12.111,0,0,0,24,11.791h0A11.766,11.766,0,0,0,11.983,0ZM10.5,16.542a1.476,1.476,0,0,1,1.449-1.53h.027a1.527,1.527,0,0,1,1.523,1.47,1.475,1.475,0,0,1-1.449,1.53h-.027A1.529,1.529,0,0,1,10.5,16.542ZM11,12.5v-6a1,1,0,0,1,2,0v6a1,1,0,1,1-2,0Z\"\n});\nconst FieldRequiredIndicator = forwardRef(function RequiredIndicator(props, ref) {\n const { fallback, children = \"*\", ...restProps } = props;\n const field = useFieldContext();\n const classNames = useClassNames();\n const styles = useFieldStyles();\n if (!field?.required) {\n return fallback;\n }\n return /* @__PURE__ */ jsx(\n chakra.span,\n {\n ref,\n \"aria-hidden\": \"true\",\n ...restProps,\n className: cx(classNames.requiredIndicator, props.className),\n css: [styles.requiredIndicator, props.css],\n children\n }\n );\n});\n\nexport { FieldErrorIcon, FieldErrorText, FieldHelperText, FieldLabel, FieldPropsProvider, FieldRequiredIndicator, FieldRoot, useFieldStyles };\n","import { FormControlSize } from \"./withFormControl.types\";\n\nexport const optionalTextSizeMap: Record<FormControlSize, number> = {\n sm: 10,\n md: 12,\n lg: 14,\n};\n","import React from \"react\";\nimport { Field } from \"@chakra-ui/react/field\";\nimport {\n FormControlLabelPosition,\n FormControlSize,\n} from \"./withFormControl.types\";\nimport { SystemStyleObject } from \"@chakra-ui/react/styled-system\";\nimport { TypographyVariant } from \"shared/types/typography\";\nimport { Text } from \"components/Text/text.component\";\nimport { optionalTextSizeMap } from \"./withFormControl.records\";\nimport { fontSizes } from \"theme/tokens/typography/typography.records\";\nimport { Flex } from \"@chakra-ui/react/flex\";\nimport { Icon } from \"components/Icon/icon.component\";\n\nexport interface WithFormControlProps {\n disabled?: boolean;\n errorText?: string;\n formControlStyle?: SystemStyleObject;\n fullWidth?: boolean;\n helperText?: string;\n inlineField?: boolean;\n invalid?: boolean;\n invalidIconColor?: TypographyVariant;\n label?: string | React.ReactNode;\n labelPosition?: FormControlLabelPosition;\n labelStyle?: SystemStyleObject;\n onContrast?: boolean;\n readOnly?: boolean;\n required?: boolean;\n showOptionalElement?: boolean;\n size?: FormControlSize;\n useInvalidIcon?: boolean;\n useInvalidText?: boolean;\n}\n\nexport const withFormControl = <P extends WithFormControlProps>(\n Component: React.ComponentType<P>,\n): React.FC<P> => {\n const WithFormControl = ({\n disabled = false,\n errorText = \"Field is invalid\",\n formControlStyle,\n fullWidth = true,\n helperText,\n inlineField = false,\n invalid = false,\n invalidIconColor = \"danger\",\n label,\n labelPosition = \"start\",\n labelStyle,\n onContrast = false,\n readOnly = false,\n required = false,\n showOptionalElement = false,\n size = \"md\",\n useInvalidIcon = false,\n useInvalidText = true,\n ...props\n }: WithFormControlProps): React.JSX.Element => {\n const labelComponent = (\n <Field.Label\n className=\"FormControl__Label\"\n color={onContrast ? \"text.contrast\" : \"text\"}\n fontSize={fontSizes[size]}\n {...labelStyle}\n onClick={(e) => {\n e.stopPropagation();\n }}\n >\n {label}\n <Field.RequiredIndicator\n className=\"FormControl__RequiredIndicator\"\n color={onContrast ? \"text.danger.contrast\" : \"text.danger\"}\n {...(!required && {\n fallback: showOptionalElement ? (\n <Text\n variant={onContrast ? \"subtleOnContrast\" : \"subtle\"}\n fontSize={optionalTextSizeMap[size]}\n >\n {\" \"}\n (Optional)\n </Text>\n ) : (\n <></>\n ),\n })}\n />\n </Field.Label>\n );\n\n return (\n <Field.Root\n className=\"FormControl group\"\n disabled={disabled}\n invalid={invalid}\n readOnly={readOnly}\n required={required}\n width={fullWidth ? \"100%\" : \"auto\"}\n {...formControlStyle}\n >\n <Flex\n className=\"FormControl__Container\"\n flexDirection={inlineField ? \"row\" : \"column\"}\n w={inlineField ? \"max-content\" : \"100%\"}\n gap={2}\n >\n {label && labelPosition === \"start\" && labelComponent}\n <Flex\n className=\"FormControl__Content\"\n alignItems=\"center\"\n gap={2}\n w={inlineField ? \"max-content\" : \"100%\"}\n >\n <Component\n disabled={disabled}\n invalid={invalid}\n onContrast={onContrast}\n readOnly={readOnly}\n required={required}\n size={size}\n {...(props as P)}\n />\n {useInvalidIcon && invalid && (\n <Icon\n className=\"FormControl__InvalidIcon\"\n name=\"warningSign\"\n variant={invalidIconColor}\n size={size}\n />\n )}\n </Flex>\n {label && labelPosition === \"end\" && labelComponent}\n </Flex>\n {useInvalidText && invalid && (\n <Field.ErrorText\n className=\"FormControl__ErrorText\"\n fontSize=\"xs\"\n color={onContrast ? \"text.danger.contrast\" : \"text.danger\"}\n >\n {errorText}\n </Field.ErrorText>\n )}\n {helperText && (\n <Field.HelperText\n className=\"FormControl__HelperText\"\n fontSize=\"xs\"\n color={onContrast ? \"text.subtle.contrast\" : \"text.subtle\"}\n >\n {helperText}\n </Field.HelperText>\n )}\n </Field.Root>\n );\n };\n\n WithFormControl.displayName = `withFormControl(${Component.displayName || Component.name}`;\n return WithFormControl;\n};\n"],"names":["FieldErrorText","forwardRef","props","ref","field","useFieldContext","mergedProps","mergeProps","jsx","ark","FieldHelperText","FieldLabel","useSafeLayoutEffect","useLayoutEffect","useEffect","FieldsetProvider","useFieldsetContext","createContext","useField","fieldset","ids","disabled","invalid","readOnly","required","hasErrorText","setHasErrorText","useState","hasHelperText","setHasHelperText","id","useId","rootRef","useRef","rootId","errorTextId","helperTextId","labelId","rootNode","win","getWindow","doc","checkTextElements","observer","labelIds","useMemo","ids2","getRootProps","parts","dataAttr","getLabelProps","getControlProps","ariaAttr","getInputProps","getTextareaProps","getSelectProps","getHelperTextProps","getErrorTextProps","getRequiredIndicatorProps","FieldRoot","useFieldProps","localProps","createSplitProps","FieldProvider","composeRefs","useRecipeResult","createRecipeContext","Icon","React","styles","className","otherProps","chakra","cx","createIcon","options","viewBox","pathDefinition","displayName","defaultProps","path","Children","Comp","withProvider","withContext","useFieldStyles","useClassNames","createSlotRecipeContext","Field.Root","Field.Label","Field.HelperText","Field.ErrorText","FieldRequiredIndicator","fallback","children","restProps","classNames","optionalTextSizeMap","withFormControl","Component","WithFormControl","errorText","formControlStyle","fullWidth","helperText","inlineField","invalidIconColor","label","labelPosition","labelStyle","onContrast","showOptionalElement","size","useInvalidIcon","useInvalidText","labelComponent","jsxs","fontSizes","e","Field.RequiredIndicator","Text","Fragment","Flex"],"mappings":";;;;;;;;;;;;;AAOA,MAAMA,IAAiBC,EAAW,CAACC,GAAOC,MAAQ;AAChD,QAAMC,IAAQC,EAAiB,GACzBC,IAAcC,EAAWH,EAAM,kBAAiB,GAAIF,CAAK;AAC/D,SAAIE,GAAO,UACcI,gBAAAA,EAAAA,IAAIC,EAAI,MAAM,EAAE,GAAGH,GAAa,KAAAH,GAAK,IAEvD;AACT,CAAC;AACDH,EAAe,cAAc;ACR7B,MAAMU,IAAkBT,EAAW,CAACC,GAAOC,MAAQ;AACjD,QAAMC,IAAQC,EAAiB,GACzBC,IAAcC,EAAWH,GAAO,mBAAkB,GAAIF,CAAK;AACjE,SAAuBM,gBAAAA,EAAAA,IAAIC,EAAI,MAAM,EAAE,GAAGH,GAAa,KAAAH,GAAK;AAC9D,CAAC;AACDO,EAAgB,cAAc;ACL9B,MAAMC,IAAaV,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;AACDQ,EAAW,cAAc;ACTzB,MAAMC,KAAsB,OAAO,SAAW,MAAcC,IAAkBC,ICAxE,CAACC,IAAkBC,EAAkB,IAAIC,GA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,gBAAAA,EAAA;AAAA,YAACmF;AAAAA,YAAA;AAAA,cACC,WAAU;AAAA,cACV,UAAS;AAAA,cACT,OAAOmB,IAAa,yBAAyB;AAAA,cAE5C,UAAAT;AAAA,YAAA;AAAA,UACH;AAAA,UAEDG,KACChG,gBAAAA,EAAA;AAAA,YAACkF;AAAAA,YAAA;AAAA,cACC,WAAU;AAAA,cACV,UAAS;AAAA,cACT,OAAOoB,IAAa,yBAAyB;AAAA,cAE5C,UAAAN;AAAA,YAAA;AAAA,UAAA;AAAA,QACH;AAAA,MAAA;AAAA,IAEJ;AAAA,EAEJ;AAEA,SAAAJ,EAAgB,cAAc,mBAAmBD,EAAU,eAAeA,EAAU,IAAI,IACjFC;AACT;","x_google_ignoreList":[0,1,2,3,4,5,6,7,8,9]}
|
|
1
|
+
{"version":3,"file":"withFormControl-syyL9lWW.js","sources":["../../node_modules/@ark-ui/react/dist/components/field/field-error-text.js","../../node_modules/@ark-ui/react/dist/components/field/field-helper-text.js","../../node_modules/@ark-ui/react/dist/components/field/field-label.js","../../node_modules/@ark-ui/react/dist/utils/use-safe-layout-effect.js","../../node_modules/@ark-ui/react/dist/components/fieldset/use-fieldset-context.js","../../node_modules/@ark-ui/react/dist/components/field/use-field.js","../../node_modules/@ark-ui/react/dist/components/field/field-root.js","../../node_modules/@chakra-ui/react/dist/esm/components/icon/icon.js","../../node_modules/@chakra-ui/react/dist/esm/components/icon/create-icon.js","../../node_modules/@chakra-ui/react/dist/esm/components/field/field.js","../../src/hocs/withFormControl/withFormControl.records.ts","../../src/hocs/withFormControl/withFormControl.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 FieldErrorText = forwardRef((props, ref) => {\n const field = useFieldContext();\n const mergedProps = mergeProps(field.getErrorTextProps(), props);\n if (field?.invalid) {\n return /* @__PURE__ */ jsx(ark.span, { ...mergedProps, ref });\n }\n return null;\n});\nFieldErrorText.displayName = \"FieldErrorText\";\n\nexport { FieldErrorText };\n","'use client';\nimport { jsx } from 'react/jsx-runtime';\nimport { mergeProps } from '@zag-js/react';\nimport { forwardRef } from 'react';\nimport { ark } from '../factory.js';\nimport { useFieldContext } from './use-field-context.js';\n\nconst FieldHelperText = forwardRef((props, ref) => {\n const field = useFieldContext();\n const mergedProps = mergeProps(field?.getHelperTextProps(), props);\n return /* @__PURE__ */ jsx(ark.span, { ...mergedProps, ref });\n});\nFieldHelperText.displayName = \"FieldHelperText\";\n\nexport { FieldHelperText };\n","'use client';\nimport { jsx } from 'react/jsx-runtime';\nimport { mergeProps } from '@zag-js/react';\nimport { forwardRef } from 'react';\nimport { ark } from '../factory.js';\nimport { useFieldContext } from './use-field-context.js';\n\nconst FieldLabel = forwardRef((props, ref) => {\n const field = useFieldContext();\n const mergedProps = mergeProps(field?.getLabelProps(), props);\n return /* @__PURE__ */ jsx(ark.label, { ...mergedProps, ref });\n});\nFieldLabel.displayName = \"FieldLabel\";\n\nexport { FieldLabel };\n","'use client';\nimport { useLayoutEffect, useEffect } from 'react';\n\nconst useSafeLayoutEffect = typeof window !== \"undefined\" ? useLayoutEffect : useEffect;\n\nexport { useSafeLayoutEffect };\n","'use client';\nimport { createContext } from '../../utils/create-context.js';\n\nconst [FieldsetProvider, useFieldsetContext] = createContext({\n name: \"FieldsetContext\",\n hookName: \"useFieldsetContext\",\n providerName: \"<FieldsetProvider />\",\n strict: false\n});\n\nexport { FieldsetProvider, useFieldsetContext };\n","'use client';\nimport { getWindow, dataAttr, ariaAttr } from '@zag-js/dom-query';\nimport { useState, useId, useRef, useMemo } from 'react';\nimport { useSafeLayoutEffect } from '../../utils/use-safe-layout-effect.js';\nimport { useFieldsetContext } from '../fieldset/use-fieldset-context.js';\nimport { parts } from './field.anatomy.js';\n\nconst useField = (props = {}) => {\n const fieldset = useFieldsetContext();\n const { ids, disabled = Boolean(fieldset?.disabled), invalid = false, readOnly = false, required = false } = props;\n const [hasErrorText, setHasErrorText] = useState(false);\n const [hasHelperText, setHasHelperText] = useState(false);\n const id = props.id ?? useId();\n const rootRef = useRef(null);\n const rootId = ids?.control ?? `field::${id}`;\n const errorTextId = ids?.errorText ?? `field::${id}::error-text`;\n const helperTextId = ids?.helperText ?? `field::${id}::helper-text`;\n const labelId = ids?.label ?? `field::${id}::label`;\n useSafeLayoutEffect(() => {\n const rootNode = rootRef.current;\n if (!rootNode) return;\n const win = getWindow(rootNode);\n const doc = win.document;\n const checkTextElements = () => {\n setHasErrorText(!!doc.getElementById(errorTextId));\n setHasHelperText(!!doc.getElementById(helperTextId));\n };\n checkTextElements();\n const observer = new win.MutationObserver(checkTextElements);\n observer.observe(rootNode, { childList: true, subtree: true });\n return () => observer.disconnect();\n }, [errorTextId, helperTextId]);\n const labelIds = useMemo(() => {\n const ids2 = [];\n if (hasErrorText && invalid) ids2.push(errorTextId);\n if (hasHelperText) ids2.push(helperTextId);\n return ids2.join(\" \") || void 0;\n }, [invalid, errorTextId, helperTextId, hasErrorText, hasHelperText]);\n const getRootProps = useMemo(\n () => () => ({\n ...parts.root.attrs,\n id: rootId,\n ref: rootRef,\n role: \"group\",\n \"data-disabled\": dataAttr(disabled),\n \"data-invalid\": dataAttr(invalid),\n \"data-readonly\": dataAttr(readOnly)\n }),\n [disabled, invalid, readOnly, rootId]\n );\n const getLabelProps = useMemo(\n () => () => ({\n ...parts.label.attrs,\n id: labelId,\n \"data-disabled\": dataAttr(disabled),\n \"data-invalid\": dataAttr(invalid),\n \"data-readonly\": dataAttr(readOnly),\n htmlFor: id\n }),\n [disabled, invalid, readOnly, id, labelId]\n );\n const getControlProps = useMemo(\n () => () => ({\n \"aria-describedby\": labelIds,\n \"aria-invalid\": ariaAttr(invalid),\n \"data-invalid\": dataAttr(invalid),\n \"data-required\": dataAttr(required),\n \"data-readonly\": dataAttr(readOnly),\n id,\n required,\n disabled,\n readOnly\n }),\n [labelIds, invalid, required, readOnly, id, disabled]\n );\n const getInputProps = useMemo(\n () => () => ({\n ...getControlProps(),\n ...parts.input.attrs\n }),\n [getControlProps]\n );\n const getTextareaProps = useMemo(\n () => () => ({\n ...getControlProps(),\n ...parts.textarea.attrs\n }),\n [getControlProps]\n );\n const getSelectProps = useMemo(\n () => () => ({\n ...getControlProps(),\n ...parts.select.attrs\n }),\n [getControlProps]\n );\n const getHelperTextProps = useMemo(\n () => () => ({\n id: helperTextId,\n ...parts.helperText.attrs,\n \"data-disabled\": dataAttr(disabled)\n }),\n [disabled, helperTextId]\n );\n const getErrorTextProps = useMemo(\n () => () => ({\n id: errorTextId,\n ...parts.errorText.attrs,\n \"aria-live\": \"polite\"\n }),\n [errorTextId]\n );\n const getRequiredIndicatorProps = useMemo(\n () => () => ({\n \"aria-hidden\": true,\n ...parts.requiredIndicator.attrs\n }),\n []\n );\n return {\n ariaDescribedby: labelIds,\n ids: {\n root: rootId,\n control: id,\n label: labelId,\n errorText: errorTextId,\n helperText: helperTextId\n },\n refs: {\n rootRef\n },\n disabled,\n invalid,\n readOnly,\n required,\n getLabelProps,\n getRootProps,\n getInputProps,\n getTextareaProps,\n getSelectProps,\n getHelperTextProps,\n getErrorTextProps,\n getRequiredIndicatorProps\n };\n};\n\nexport { useField };\n","'use client';\nimport { jsx } from 'react/jsx-runtime';\nimport { mergeProps } from '@zag-js/react';\nimport { forwardRef } from 'react';\nimport { composeRefs } from '../../utils/compose-refs.js';\nimport { createSplitProps } from '../../utils/create-split-props.js';\nimport { ark } from '../factory.js';\nimport { useField } from './use-field.js';\nimport { FieldProvider } from './use-field-context.js';\n\nconst FieldRoot = forwardRef((props, ref) => {\n const [useFieldProps, localProps] = createSplitProps()(props, [\n \"id\",\n \"ids\",\n \"disabled\",\n \"invalid\",\n \"readOnly\",\n \"required\"\n ]);\n const field = useField(useFieldProps);\n const mergedProps = mergeProps(field.getRootProps(), localProps);\n return /* @__PURE__ */ jsx(FieldProvider, { value: field, children: /* @__PURE__ */ jsx(ark.div, { ...mergedProps, ref: composeRefs(ref, field.refs.rootRef) }) });\n});\nFieldRoot.displayName = \"FieldRoot\";\n\nexport { FieldRoot };\n","\"use strict\";\n\"use client\";\nimport { jsx } from 'react/jsx-runtime';\nimport * as React from 'react';\nimport { cx } from '../../utils/cx.js';\nimport { createRecipeContext } from '../../styled-system/create-recipe-context.js';\nimport { chakra } from '../../styled-system/factory.js';\n\nconst { useRecipeResult, PropsProvider } = createRecipeContext({ key: \"icon\" });\nconst Icon = React.forwardRef(\n function Icon2(props, ref) {\n const {\n styles,\n className,\n props: otherProps\n } = useRecipeResult({ asChild: !props.as, ...props });\n return /* @__PURE__ */ jsx(\n chakra.svg,\n {\n ref,\n focusable: false,\n \"aria-hidden\": \"true\",\n ...otherProps,\n css: [styles, props.css],\n className: cx(className, props.className)\n }\n );\n }\n);\nconst IconPropsProvider = PropsProvider;\n\nexport { Icon, IconPropsProvider };\n","\"use strict\";\n\"use client\";\nimport { jsx } from 'react/jsx-runtime';\nimport { Children, forwardRef } from 'react';\nimport { Icon } from './icon.js';\n\nfunction createIcon(options) {\n const {\n viewBox = \"0 0 24 24\",\n d: pathDefinition,\n displayName,\n defaultProps = {}\n } = options;\n const path = Children.toArray(options.path);\n const Comp = forwardRef((props, ref) => /* @__PURE__ */ jsx(\n Icon,\n {\n ref,\n asChild: false,\n viewBox,\n ...defaultProps,\n ...props,\n children: path.length ? path : /* @__PURE__ */ jsx(\"path\", { fill: \"currentColor\", d: pathDefinition })\n }\n ));\n Comp.displayName = displayName;\n return Comp;\n}\n\nexport { createIcon };\n","\"use strict\";\n\"use client\";\nimport { jsx } from 'react/jsx-runtime';\nimport { Field, useFieldContext } from '@ark-ui/react/field';\nimport { forwardRef } from 'react';\nimport { cx } from '../../utils/cx.js';\nimport { createSlotRecipeContext } from '../../styled-system/create-slot-recipe-context.js';\nimport { chakra } from '../../styled-system/factory.js';\nimport { createIcon } from '../icon/create-icon.js';\n\nconst {\n withProvider,\n withContext,\n useStyles: useFieldStyles,\n useClassNames,\n PropsProvider\n} = createSlotRecipeContext({ key: \"field\" });\nconst FieldRoot = withProvider(\n Field.Root,\n \"root\",\n { forwardAsChild: true }\n);\nconst FieldPropsProvider = PropsProvider;\nconst FieldLabel = withContext(\n Field.Label,\n \"label\",\n { forwardAsChild: true }\n);\nconst FieldHelperText = withContext(Field.HelperText, \"helperText\", { forwardAsChild: true });\nconst FieldErrorText = withContext(\n Field.ErrorText,\n \"errorText\",\n { forwardAsChild: true }\n);\nconst FieldErrorIcon = createIcon({\n d: \"M11.983,0a12.206,12.206,0,0,0-8.51,3.653A11.8,11.8,0,0,0,0,12.207,11.779,11.779,0,0,0,11.8,24h.214A12.111,12.111,0,0,0,24,11.791h0A11.766,11.766,0,0,0,11.983,0ZM10.5,16.542a1.476,1.476,0,0,1,1.449-1.53h.027a1.527,1.527,0,0,1,1.523,1.47,1.475,1.475,0,0,1-1.449,1.53h-.027A1.529,1.529,0,0,1,10.5,16.542ZM11,12.5v-6a1,1,0,0,1,2,0v6a1,1,0,1,1-2,0Z\"\n});\nconst FieldRequiredIndicator = forwardRef(function RequiredIndicator(props, ref) {\n const { fallback, children = \"*\", ...restProps } = props;\n const field = useFieldContext();\n const classNames = useClassNames();\n const styles = useFieldStyles();\n if (!field?.required) {\n return fallback;\n }\n return /* @__PURE__ */ jsx(\n chakra.span,\n {\n ref,\n \"aria-hidden\": \"true\",\n ...restProps,\n className: cx(classNames.requiredIndicator, props.className),\n css: [styles.requiredIndicator, props.css],\n children\n }\n );\n});\n\nexport { FieldErrorIcon, FieldErrorText, FieldHelperText, FieldLabel, FieldPropsProvider, FieldRequiredIndicator, FieldRoot, useFieldStyles };\n","import { FormControlSize } from \"./withFormControl.types\";\n\nexport const optionalTextSizeMap: Record<FormControlSize, number> = {\n sm: 10,\n md: 12,\n lg: 14,\n};\n","import React from \"react\";\nimport { Field } from \"@chakra-ui/react/field\";\nimport {\n FormControlLabelPosition,\n FormControlSize,\n} from \"./withFormControl.types\";\nimport { SystemStyleObject } from \"@chakra-ui/react/styled-system\";\nimport { TypographyVariant } from \"shared/types/typography\";\nimport { Text } from \"components/Text/text.component\";\nimport { optionalTextSizeMap } from \"./withFormControl.records\";\nimport { fontSizes } from \"theme/tokens/typography/typography.records\";\nimport { Flex } from \"@chakra-ui/react/flex\";\nimport { Icon } from \"components/Icon/icon.component\";\n\nexport interface WithFormControlProps {\n disabled?: boolean;\n errorText?: string;\n formControlStyle?: SystemStyleObject;\n fullWidth?: boolean;\n helperText?: string;\n inlineField?: boolean;\n invalid?: boolean;\n invalidIconColor?: TypographyVariant;\n label?: string | React.ReactNode;\n labelPosition?: FormControlLabelPosition;\n labelStyle?: SystemStyleObject;\n onContrast?: boolean;\n readOnly?: boolean;\n required?: boolean;\n showOptionalElement?: boolean;\n size?: FormControlSize;\n useInvalidIcon?: boolean;\n useInvalidText?: boolean;\n}\n\nexport const withFormControl = <P extends WithFormControlProps>(\n Component: React.ComponentType<P>,\n): React.FC<P> => {\n const WithFormControl = ({\n disabled = false,\n errorText = \"Field is invalid\",\n formControlStyle,\n fullWidth = true,\n helperText,\n inlineField = false,\n invalid = false,\n invalidIconColor = \"danger\",\n label,\n labelPosition = \"start\",\n labelStyle,\n onContrast = false,\n readOnly = false,\n required = false,\n showOptionalElement = false,\n size = \"md\",\n useInvalidIcon = false,\n useInvalidText = true,\n ...props\n }: WithFormControlProps): React.JSX.Element => {\n const labelComponent = (\n <Field.Label\n className=\"FormControl__Label\"\n color={onContrast ? \"text.contrast\" : \"text\"}\n fontSize={fontSizes[size]}\n {...labelStyle}\n onClick={(e) => {\n e.stopPropagation();\n }}\n >\n {label}\n <Field.RequiredIndicator\n className=\"FormControl__RequiredIndicator\"\n color={onContrast ? \"text.danger.contrast\" : \"text.danger\"}\n {...(!required && {\n fallback: showOptionalElement ? (\n <Text\n variant={onContrast ? \"subtleOnContrast\" : \"subtle\"}\n fontSize={optionalTextSizeMap[size]}\n >\n {\" \"}\n (Optional)\n </Text>\n ) : (\n <></>\n ),\n })}\n />\n </Field.Label>\n );\n\n return (\n <Field.Root\n className=\"FormControl group\"\n disabled={disabled}\n invalid={invalid}\n readOnly={readOnly}\n required={required}\n width={fullWidth ? \"100%\" : \"auto\"}\n {...formControlStyle}\n >\n <Flex\n className=\"FormControl__Container\"\n flexDirection={inlineField ? \"row\" : \"column\"}\n w={inlineField ? \"max-content\" : \"100%\"}\n gap={2}\n >\n {label && labelPosition === \"start\" && labelComponent}\n <Flex\n className=\"FormControl__Content\"\n alignItems=\"center\"\n gap={2}\n w={inlineField ? \"max-content\" : \"100%\"}\n >\n <Component\n disabled={disabled}\n invalid={invalid}\n onContrast={onContrast}\n readOnly={readOnly}\n required={required}\n size={size}\n {...(props as P)}\n />\n {useInvalidIcon && invalid && (\n <Icon\n className=\"FormControl__InvalidIcon\"\n name=\"warningSign\"\n variant={invalidIconColor}\n size={size}\n />\n )}\n </Flex>\n {label && labelPosition === \"end\" && labelComponent}\n </Flex>\n {useInvalidText && invalid && (\n <Field.ErrorText\n className=\"FormControl__ErrorText\"\n fontSize=\"xs\"\n color={onContrast ? \"text.danger.contrast\" : \"text.danger\"}\n >\n {errorText}\n </Field.ErrorText>\n )}\n {helperText && (\n <Field.HelperText\n className=\"FormControl__HelperText\"\n fontSize=\"xs\"\n color={onContrast ? \"text.subtle.contrast\" : \"text.subtle\"}\n >\n {helperText}\n </Field.HelperText>\n )}\n </Field.Root>\n );\n };\n\n WithFormControl.displayName = `withFormControl(${Component.displayName || Component.name}`;\n return WithFormControl;\n};\n"],"names":["FieldErrorText","forwardRef","props","ref","field","useFieldContext","mergedProps","mergeProps","jsx","ark","FieldHelperText","FieldLabel","useSafeLayoutEffect","useLayoutEffect","useEffect","FieldsetProvider","useFieldsetContext","createContext","useField","fieldset","ids","disabled","invalid","readOnly","required","hasErrorText","setHasErrorText","useState","hasHelperText","setHasHelperText","id","useId","rootRef","useRef","rootId","errorTextId","helperTextId","labelId","rootNode","win","getWindow","doc","checkTextElements","observer","labelIds","useMemo","ids2","getRootProps","parts","dataAttr","getLabelProps","getControlProps","ariaAttr","getInputProps","getTextareaProps","getSelectProps","getHelperTextProps","getErrorTextProps","getRequiredIndicatorProps","FieldRoot","useFieldProps","localProps","createSplitProps","FieldProvider","composeRefs","useRecipeResult","createRecipeContext","Icon","React","styles","className","otherProps","chakra","cx","createIcon","options","viewBox","pathDefinition","displayName","defaultProps","path","Children","Comp","withProvider","withContext","useFieldStyles","useClassNames","createSlotRecipeContext","Field.Root","Field.Label","Field.HelperText","Field.ErrorText","FieldRequiredIndicator","fallback","children","restProps","classNames","optionalTextSizeMap","withFormControl","Component","WithFormControl","errorText","formControlStyle","fullWidth","helperText","inlineField","invalidIconColor","label","labelPosition","labelStyle","onContrast","showOptionalElement","size","useInvalidIcon","useInvalidText","labelComponent","jsxs","fontSizes","e","Field.RequiredIndicator","Text","Fragment","Flex"],"mappings":";;;;;;;;;;;;;AAOA,MAAMA,IAAiBC,EAAW,CAACC,GAAOC,MAAQ;AAChD,QAAMC,IAAQC,EAAiB,GACzBC,IAAcC,EAAWH,EAAM,kBAAiB,GAAIF,CAAK;AAC/D,SAAIE,GAAO,UACcI,gBAAAA,EAAAA,IAAIC,EAAI,MAAM,EAAE,GAAGH,GAAa,KAAAH,GAAK,IAEvD;AACT,CAAC;AACDH,EAAe,cAAc;ACR7B,MAAMU,IAAkBT,EAAW,CAACC,GAAOC,MAAQ;AACjD,QAAMC,IAAQC,EAAiB,GACzBC,IAAcC,EAAWH,GAAO,mBAAkB,GAAIF,CAAK;AACjE,SAAuBM,gBAAAA,EAAAA,IAAIC,EAAI,MAAM,EAAE,GAAGH,GAAa,KAAAH,GAAK;AAC9D,CAAC;AACDO,EAAgB,cAAc;ACL9B,MAAMC,IAAaV,EAAW,CAACC,GAAOC,MAAQ;AAC5C,QAAMC,IAAQC,EAAiB,GACzBC,IAAcC,EAAWH,GAAO,cAAa,GAAIF,CAAK;AAC5D,SAAuBM,gBAAAA,EAAAA,IAAIC,EAAI,OAAO,EAA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AAAA,sBAAA;AAAA,oBACF;AAAA,kBAAA;AAAA,gBAEJ;AAAA,gBACCL,KAASC,MAAkB,SAASO;AAAA,cAAA;AAAA,YAAA;AAAA,UACvC;AAAA,UACCD,KAAkB5F,KACjBd,gBAAAA,EAAA;AAAA,YAACmF;AAAAA,YAAA;AAAA,cACC,WAAU;AAAA,cACV,UAAS;AAAA,cACT,OAAOmB,IAAa,yBAAyB;AAAA,cAE5C,UAAAT;AAAA,YAAA;AAAA,UACH;AAAA,UAEDG,KACChG,gBAAAA,EAAA;AAAA,YAACkF;AAAAA,YAAA;AAAA,cACC,WAAU;AAAA,cACV,UAAS;AAAA,cACT,OAAOoB,IAAa,yBAAyB;AAAA,cAE5C,UAAAN;AAAA,YAAA;AAAA,UAAA;AAAA,QACH;AAAA,MAAA;AAAA,IAEJ;AAAA,EAEJ;AAEA,SAAAJ,EAAgB,cAAc,mBAAmBD,EAAU,eAAeA,EAAU,IAAI,IACjFC;AACT;","x_google_ignoreList":[0,1,2,3,4,5,6,7,8,9]}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { j as o } from "./jsx-runtime-C5mzlN2N.js";
|
|
2
|
+
import i from "react";
|
|
3
|
+
import { B as s } from "./box-Ck9I7FYv.js";
|
|
4
|
+
const a = i.forwardRef(
|
|
5
|
+
function(e, r) {
|
|
6
|
+
return /* @__PURE__ */ o.jsx(
|
|
7
|
+
s,
|
|
8
|
+
{
|
|
9
|
+
display: "contents",
|
|
10
|
+
className: "chakra-theme light",
|
|
11
|
+
"data-testid": "kibble-light-mode",
|
|
12
|
+
colorScheme: "light",
|
|
13
|
+
ref: r,
|
|
14
|
+
...e
|
|
15
|
+
}
|
|
16
|
+
);
|
|
17
|
+
}
|
|
18
|
+
), d = (t) => /* @__PURE__ */ o.jsx(a, { children: t });
|
|
19
|
+
export {
|
|
20
|
+
d as w
|
|
21
|
+
};
|
|
22
|
+
//# sourceMappingURL=withLightMode-C4WljRNZ.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"withLightMode-C4WljRNZ.js","sources":["../../src/hocs/withLightMode/withLightMode.tsx"],"sourcesContent":["import React from \"react\";\nimport { Box, BoxProps } from \"@chakra-ui/react/box\";\n\nconst LightMode = React.forwardRef<HTMLDivElement, BoxProps>(\n function LightMode(props, ref) {\n return (\n <Box\n display=\"contents\"\n className=\"chakra-theme light\"\n data-testid=\"kibble-light-mode\"\n colorScheme=\"light\"\n ref={ref}\n {...props}\n />\n );\n },\n);\n\nexport const withLightMode = (children: React.ReactNode): React.JSX.Element => {\n return <LightMode>{children}</LightMode>;\n};\n"],"names":["LightMode","React","props","ref","jsx","Box","withLightMode","children"],"mappings":";;;AAGA,MAAMA,IAAYC,EAAM;AAAA,EACtB,SAAmBC,GAAOC,GAAK;AAE3B,WAAAC,gBAAAA,EAAA;AAAA,MAACC;AAAA,MAAA;AAAA,QACC,SAAQ;AAAA,QACR,WAAU;AAAA,QACV,eAAY;AAAA,QACZ,aAAY;AAAA,QACZ,KAAAF;AAAA,QACC,GAAGD;AAAA,MAAA;AAAA,IACN;AAAA,EAAA;AAGN,GAEaI,IAAgB,CAACC,MACrBH,gBAAAA,MAACJ,KAAW,UAAAO,GAAS;"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";const e=require("./jsx-runtime-BjDatQAs.js"),i=require("react"),r=require("./box-Baq7UBls.js"),n=t=>t&&t.__esModule?t:{default:t},c=n(i),u=c.default.forwardRef(function(o,s){return e.jsxRuntimeExports.jsx(r.Box,{display:"contents",className:"chakra-theme light","data-testid":"kibble-light-mode",colorScheme:"light",ref:s,...o})}),a=t=>e.jsxRuntimeExports.jsx(u,{children:t});exports.withLightMode=a;
|
|
2
|
+
//# sourceMappingURL=withLightMode-fys9Cbqw.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"withLightMode-fys9Cbqw.js","sources":["../../src/hocs/withLightMode/withLightMode.tsx"],"sourcesContent":["import React from \"react\";\nimport { Box, BoxProps } from \"@chakra-ui/react/box\";\n\nconst LightMode = React.forwardRef<HTMLDivElement, BoxProps>(\n function LightMode(props, ref) {\n return (\n <Box\n display=\"contents\"\n className=\"chakra-theme light\"\n data-testid=\"kibble-light-mode\"\n colorScheme=\"light\"\n ref={ref}\n {...props}\n />\n );\n },\n);\n\nexport const withLightMode = (children: React.ReactNode): React.JSX.Element => {\n return <LightMode>{children}</LightMode>;\n};\n"],"names":["LightMode","React","props","ref","jsx","Box","withLightMode","children"],"mappings":"sJAGMA,EAAYC,EAAM,QAAA,WACtB,SAAmBC,EAAOC,EAAK,CAE3B,OAAAC,EAAA,kBAAA,IAACC,EAAA,IAAA,CACC,QAAQ,WACR,UAAU,qBACV,cAAY,oBACZ,YAAY,QACZ,IAAAF,EACC,GAAGD,CAAA,CACN,CAAA,CAGN,EAEaI,EAAiBC,GACrBH,wBAACJ,GAAW,SAAAO,EAAS"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";const i=require("./jsx-runtime-BjDatQAs.js"),e=require("react"),p=require("./tooltip.component-
|
|
2
|
-
//# sourceMappingURL=withTruncation-
|
|
1
|
+
"use strict";const i=require("./jsx-runtime-BjDatQAs.js"),e=require("react"),p=require("./tooltip.component-CIUcGhxw.js"),w=require("./box-Baq7UBls.js"),h=s=>{const l=e.memo(s);function x({truncated:o=!1,noOfLines:f=1,children:c,tooltipProps:d,...m}){const[b,T]=e.useState(!1),t=e.useRef(null),r=e.useRef(null),u=e.useCallback(()=>{if(t.current){const n=t.current?.children[0].scrollHeight||0,a=t.current?.offsetHeight||0;T(n>a)}},[]);return e.useEffect(()=>{if(o&&t.current){let n;const a=()=>{window.clearTimeout(n),n=window.setTimeout(u,100)};return r.current=new ResizeObserver(()=>{a()}),r.current.observe(t.current),u(),()=>{window.clearTimeout(n),r.current&&r.current.disconnect()}}},[o,u]),o?i.jsxRuntimeExports.jsx(p.Tooltip,{...d,label:d?.label||c?.toLocaleString()||"",disabled:!b,"data-testid":"kibble-truncated-text-tooltip",children:i.jsxRuntimeExports.jsx(w.Box,{ref:t,display:"inline-block",position:"relative",className:"TruncatedText__Wrapper","data-testid":"kibble-truncated-text-wrapper",children:i.jsxRuntimeExports.jsx(l,{className:"TruncatedText__TextContent","data-testid":"kibble-truncated-text-content",lineClamp:f,...m,children:c})})}):i.jsxRuntimeExports.jsx(l,{...m,children:c})}return x.displayName=`withTruncation(${s.displayName||s.name}`,e.memo(x)};exports.withTruncation=h;
|
|
2
|
+
//# sourceMappingURL=withTruncation-B6vA2g0w.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"withTruncation-
|
|
1
|
+
{"version":3,"file":"withTruncation-B6vA2g0w.js","sources":["../../src/hocs/withTruncation.tsx"],"sourcesContent":["import React, {\n ReactNode,\n useCallback,\n useEffect,\n useRef,\n useState,\n memo,\n} from \"react\";\nimport { Box } from \"@chakra-ui/react/box\";\nimport { Tooltip, TooltipProps } from \"components/Tooltip\";\n\nexport interface WithTruncationProps {\n truncated?: boolean;\n noOfLines?: number;\n tooltipProps?: Omit<TooltipProps, \"disabled\">;\n children?: ReactNode | string;\n}\n\nexport const withTruncation = <P extends WithTruncationProps>(\n Component: React.ComponentType<P>,\n): React.FC<P> => {\n const MemoizedComponent = memo(Component);\n\n function WithTruncation({\n truncated = false,\n noOfLines = 1,\n children,\n tooltipProps,\n ...rest\n }: WithTruncationProps): React.JSX.Element {\n const [isTextOverFlowing, setIsTextOverFlowing] = useState<boolean>(false);\n const containerRef = useRef<HTMLDivElement>(null);\n const resizeObserverRef = useRef<ResizeObserver | null>(null);\n\n const checkOverflow = useCallback(() => {\n if (containerRef.current) {\n const textScrollHeight =\n containerRef.current?.children[0].scrollHeight || 0;\n const containerOffsetHeight = containerRef.current?.offsetHeight || 0;\n setIsTextOverFlowing(textScrollHeight > containerOffsetHeight);\n }\n }, []);\n\n useEffect(() => {\n if (truncated && containerRef.current) {\n let timeoutId: number;\n\n const debouncedCheck = (): void => {\n window.clearTimeout(timeoutId);\n timeoutId = window.setTimeout(checkOverflow, 100);\n };\n\n resizeObserverRef.current = new ResizeObserver(() => {\n debouncedCheck();\n });\n\n resizeObserverRef.current.observe(containerRef.current);\n checkOverflow(); // Initial check\n\n return (): void => {\n window.clearTimeout(timeoutId);\n if (resizeObserverRef.current) {\n resizeObserverRef.current.disconnect();\n }\n };\n }\n }, [truncated, checkOverflow]);\n\n if (!truncated) {\n return <MemoizedComponent {...(rest as P)}>{children}</MemoizedComponent>;\n }\n\n return (\n <Tooltip\n {...tooltipProps}\n label={tooltipProps?.label || children?.toLocaleString() || \"\"}\n disabled={!isTextOverFlowing}\n data-testid=\"kibble-truncated-text-tooltip\"\n >\n <Box\n ref={containerRef}\n display=\"inline-block\"\n position=\"relative\"\n className=\"TruncatedText__Wrapper\"\n data-testid=\"kibble-truncated-text-wrapper\"\n >\n <MemoizedComponent\n className=\"TruncatedText__TextContent\"\n data-testid=\"kibble-truncated-text-content\"\n lineClamp={noOfLines}\n {...(rest as P)}\n >\n {children}\n </MemoizedComponent>\n </Box>\n </Tooltip>\n );\n }\n\n WithTruncation.displayName = `withTruncation(${Component.displayName || Component.name}`;\n return memo(WithTruncation);\n};\n"],"names":["withTruncation","Component","MemoizedComponent","memo","WithTruncation","truncated","noOfLines","children","tooltipProps","rest","isTextOverFlowing","setIsTextOverFlowing","useState","containerRef","useRef","resizeObserverRef","checkOverflow","useCallback","textScrollHeight","containerOffsetHeight","useEffect","timeoutId","debouncedCheck","jsx","Tooltip","Box"],"mappings":"yJAkBaA,EACXC,GACgB,CACV,MAAAC,EAAoBC,OAAKF,CAAS,EAExC,SAASG,EAAe,CACtB,UAAAC,EAAY,GACZ,UAAAC,EAAY,EACZ,SAAAC,EACA,aAAAC,EACA,GAAGC,CAAA,EACsC,CACzC,KAAM,CAACC,EAAmBC,CAAoB,EAAIC,EAAAA,SAAkB,EAAK,EACnEC,EAAeC,SAAuB,IAAI,EAC1CC,EAAoBD,SAA8B,IAAI,EAE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
1
1
|
import { j as n } from "./jsx-runtime-C5mzlN2N.js";
|
|
2
2
|
import { memo as m, useState as w, useRef as x, useCallback as h, useEffect as g } from "react";
|
|
3
|
-
import { T as k } from "./tooltip.component-
|
|
3
|
+
import { T as k } from "./tooltip.component-BSomeipc.js";
|
|
4
4
|
import { B as v } from "./box-Ck9I7FYv.js";
|
|
5
5
|
const N = (i) => {
|
|
6
6
|
const l = m(i);
|
|
@@ -64,4 +64,4 @@ const N = (i) => {
|
|
|
64
64
|
export {
|
|
65
65
|
N as w
|
|
66
66
|
};
|
|
67
|
-
//# sourceMappingURL=withTruncation-
|
|
67
|
+
//# sourceMappingURL=withTruncation-C7AAl87b.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"withTruncation-
|
|
1
|
+
{"version":3,"file":"withTruncation-C7AAl87b.js","sources":["../../src/hocs/withTruncation.tsx"],"sourcesContent":["import React, {\n ReactNode,\n useCallback,\n useEffect,\n useRef,\n useState,\n memo,\n} from \"react\";\nimport { Box } from \"@chakra-ui/react/box\";\nimport { Tooltip, TooltipProps } from \"components/Tooltip\";\n\nexport interface WithTruncationProps {\n truncated?: boolean;\n noOfLines?: number;\n tooltipProps?: Omit<TooltipProps, \"disabled\">;\n children?: ReactNode | string;\n}\n\nexport const withTruncation = <P extends WithTruncationProps>(\n Component: React.ComponentType<P>,\n): React.FC<P> => {\n const MemoizedComponent = memo(Component);\n\n function WithTruncation({\n truncated = false,\n noOfLines = 1,\n children,\n tooltipProps,\n ...rest\n }: WithTruncationProps): React.JSX.Element {\n const [isTextOverFlowing, setIsTextOverFlowing] = useState<boolean>(false);\n const containerRef = useRef<HTMLDivElement>(null);\n const resizeObserverRef = useRef<ResizeObserver | null>(null);\n\n const checkOverflow = useCallback(() => {\n if (containerRef.current) {\n const textScrollHeight =\n containerRef.current?.children[0].scrollHeight || 0;\n const containerOffsetHeight = containerRef.current?.offsetHeight || 0;\n setIsTextOverFlowing(textScrollHeight > containerOffsetHeight);\n }\n }, []);\n\n useEffect(() => {\n if (truncated && containerRef.current) {\n let timeoutId: number;\n\n const debouncedCheck = (): void => {\n window.clearTimeout(timeoutId);\n timeoutId = window.setTimeout(checkOverflow, 100);\n };\n\n resizeObserverRef.current = new ResizeObserver(() => {\n debouncedCheck();\n });\n\n resizeObserverRef.current.observe(containerRef.current);\n checkOverflow(); // Initial check\n\n return (): void => {\n window.clearTimeout(timeoutId);\n if (resizeObserverRef.current) {\n resizeObserverRef.current.disconnect();\n }\n };\n }\n }, [truncated, checkOverflow]);\n\n if (!truncated) {\n return <MemoizedComponent {...(rest as P)}>{children}</MemoizedComponent>;\n }\n\n return (\n <Tooltip\n {...tooltipProps}\n label={tooltipProps?.label || children?.toLocaleString() || \"\"}\n disabled={!isTextOverFlowing}\n data-testid=\"kibble-truncated-text-tooltip\"\n >\n <Box\n ref={containerRef}\n display=\"inline-block\"\n position=\"relative\"\n className=\"TruncatedText__Wrapper\"\n data-testid=\"kibble-truncated-text-wrapper\"\n >\n <MemoizedComponent\n className=\"TruncatedText__TextContent\"\n data-testid=\"kibble-truncated-text-content\"\n lineClamp={noOfLines}\n {...(rest as P)}\n >\n {children}\n </MemoizedComponent>\n </Box>\n </Tooltip>\n );\n }\n\n WithTruncation.displayName = `withTruncation(${Component.displayName || Component.name}`;\n return memo(WithTruncation);\n};\n"],"names":["withTruncation","Component","MemoizedComponent","memo","WithTruncation","truncated","noOfLines","children","tooltipProps","rest","isTextOverFlowing","setIsTextOverFlowing","useState","containerRef","useRef","resizeObserverRef","checkOverflow","useCallback","textScrollHeight","containerOffsetHeight","useEffect","timeoutId","debouncedCheck","jsx","Tooltip","Box"],"mappings":";;;;AAkBa,MAAAA,IAAiB,CAC5BC,MACgB;AACV,QAAAC,IAAoBC,EAAKF,CAAS;AAExC,WAASG,EAAe;AAAA,IACtB,WAAAC,IAAY;AAAA,IACZ,WAAAC,IAAY;AAAA,IACZ,UAAAC;AAAA,IACA,cAAAC;AAAA,IACA,GAAGC;AAAA,EA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AAWI;AAAA,gBACV,GAAIG;AAAA,gBAEJ,UAAAF;AAAA,cAAA;AAAA,YAAA;AAAA,UACH;AAAA,QAAA;AAAA,MACF;AAAA,IACF,IA1BQgB,gBAAAA,EAAA,IAAArB,GAAA,EAAmB,GAAIO,GAAa,UAAAF,EAAS,CAAA;AAAA,EA0BrD;AAIJ,SAAAH,EAAe,cAAc,kBAAkBH,EAAU,eAAeA,EAAU,IAAI,IAC/EE,EAAKC,CAAc;AAC5B;"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("../../../chunks/alert.types-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("../../../chunks/alert.types-DTNR8_C-.js");exports.Alert=t.Alert;exports.alertButtonPositions=t.alertButtonPositions;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("../../../chunks/avatar.component-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("../../../chunks/avatar.component-qXhLVNzG.js"),a=require("../../../chunks/avatar.types-Bmt5Uhfb.js");exports.Avatar=t.Avatar;exports.avatarSizes=a.avatarSizes;exports.avatarVariants=a.avatarVariants;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("../../../chunks/avatarGroup.component-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("../../../chunks/avatarGroup.component-bImv23vg.js");exports.AvatarGroup=r.AvatarGroup;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("../../../chunks/buttonGroup.component-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("../../../chunks/buttonGroup.component-0iZj3N28.js");exports.ButtonGroup=t.ButtonGroup;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../../../chunks/characterCounter.component-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../../../chunks/characterCounter.component-Cvw7D33c.js");exports.CharacterCounter=e.CharacterCounter;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../../../chunks/checkbox.component-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../../../chunks/checkbox.component-BoaV-gQi.js");exports.Checkbox=e.WrappedCheckbox;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../../../chunks/checkboxGroup.component-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../../../chunks/checkboxGroup.component-X2cU2KU-.js");exports.CheckboxGroup=e.WrappedCheckboxGroup;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../../../chunks/conversationCard.component-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../../../chunks/conversationCard.component-CkmCkM8o.js");exports.ConversationCard=e.ConversationCard;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../../../chunks/datePicker.component-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../../../chunks/datePicker.component-B_wuoiPP.js");exports.DateFormats=e.DateFormats;exports.DatePicker=e.DatePicker;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../../../chunks/heading.component-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../../../chunks/heading.component-DNsKd4Gh.js");exports.Heading=e.WrappedHeading;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../../../chunks/menu.component-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../../../chunks/menu.component-C5NwkXGO.js");exports.Menu=e.Menu;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("../../../chunks/modal.types-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("../../../chunks/modal.types-DDwG7coD.js");exports.Modal=o.Modal;exports.modalMotionPresets=o.modalMotionPresets;exports.modalPlacements=o.modalPlacements;exports.modalScrollBehaviors=o.modalScrollBehaviors;exports.modalSizes=o.modalSizes;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p=require("../../../chunks/pinInput.types-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p=require("../../../chunks/pinInput.types-DbKKHEtF.js");exports.PinInput=p.WrappedPinInput;exports.pinInputTypes=p.pinInputTypes;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("../../../chunks/popover.component-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("../../../chunks/popover.component-CS8UY9_W.js"),e=require("../../../chunks/popover.types-BF2KRf_I.js");exports.Popover=o.Popover;exports.popoverSizes=e.popoverSizes;exports.popoverTriggerTypes=e.popoverTriggerTypes;exports.popoverVariants=e.popoverVariants;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("../../../chunks/radioGroup.component-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("../../../chunks/radioGroup.component-e6LsfYzG.js");exports.RadioGroup=o.WrappedRadioGroup;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("../../../chunks/ratingDots.component-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("../../../chunks/ratingDots.component-B_a_qO9L.js");exports.RatingDots=t.WrappedRatingDots;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../../../chunks/select.component-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../../../chunks/select.component-CPMIVkRk.js");exports.Select=e.WrappedSelect;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("../../../chunks/sortableList.component-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("../../../chunks/sortableList.component-DEMqxtiq.js");exports.SortableList=t.SortableList;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../../../chunks/spinner.component-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../../../chunks/spinner.component-lZds47YM.js"),n=require("../../../chunks/spinner.types-BCLN5-H2.js");exports.Spinner=e.Spinner;exports.spinnerSizes=n.spinnerSizes;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("../../../chunks/styledAvatar.types-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("../../../chunks/styledAvatar.types-zeF6AQ1t.js");exports.StyledAvatar=t.StyledAvatar;exports.styledAvatarTypes=t.styledAvatarTypes;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../../../chunks/switch.component-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../../../chunks/switch.component-C4tJUYg9.js");exports.Switch=e.WrappedSwitch;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../../../chunks/tabs.component-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../../../chunks/tabs.component-caMRtfBi.js");exports.Tabs=e.Tabs;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../../../chunks/tagBlock.component-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../../../chunks/tagBlock.component-CC4azYDm.js");exports.TagBlock=e.TagBlock;exports.TagDisabledState=e.TagDisabledState;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../../../chunks/text.component-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../../../chunks/text.component-C501PJrN.js");exports.Text=e.WrappedText;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("../../../chunks/textInput.component-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("../../../chunks/textInput.component-o3OfBL3Y.js");exports.TextInput=t.WrappedTextInput;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|