@televet/kibble-ui 4.0.0-beta.36 → 4.0.0-beta.37
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/{IconLogo-DedIxFq7.js → IconLogo-C4aZqkn1.js} +2 -2
- package/dist/chunks/{IconLogo-DedIxFq7.js.map → IconLogo-C4aZqkn1.js.map} +1 -1
- package/dist/chunks/alert.component-BPTwogSX.js +2 -0
- package/dist/chunks/{alert.component-CcCt-bb5.js.map → alert.component-BPTwogSX.js.map} +1 -1
- package/dist/chunks/{alert.component-Dk33kIVc.js → alert.component-BT9Gn6Iw.js} +10 -10
- package/dist/chunks/{alert.component-Dk33kIVc.js.map → alert.component-BT9Gn6Iw.js.map} +1 -1
- package/dist/chunks/{avatar.component-Bj-v-tJK.js → avatar.component-B0LsaXtv.js} +12 -12
- package/dist/chunks/{avatar.component-Bj-v-tJK.js.map → avatar.component-B0LsaXtv.js.map} +1 -1
- package/dist/chunks/avatar.component-DLmlAmdJ.js +2 -0
- package/dist/chunks/{avatar.component-LWnRY2X6.js.map → avatar.component-DLmlAmdJ.js.map} +1 -1
- package/dist/chunks/{avatarGroup.component-Onosz6A9.js → avatarGroup.component-DHbejH6-.js} +2 -2
- package/dist/chunks/{avatarGroup.component-Onosz6A9.js.map → avatarGroup.component-DHbejH6-.js.map} +1 -1
- package/dist/chunks/{avatarGroup.component-DEDlMSqD.js → avatarGroup.component-DYQjXpw6.js} +2 -2
- package/dist/chunks/{avatarGroup.component-DEDlMSqD.js.map → avatarGroup.component-DYQjXpw6.js.map} +1 -1
- package/dist/chunks/box-CRddum0T.js +7 -0
- package/dist/chunks/{box-DQTWVrl0.js.map → box-CRddum0T.js.map} +1 -1
- package/dist/chunks/box-CqeORXNj.js +2 -0
- package/dist/chunks/{box-DiiiZkF4.js.map → box-CqeORXNj.js.map} +1 -1
- package/dist/chunks/{button.component-BZHMvNis.js → button.component-CXYCe9wy.js} +3 -3
- package/dist/chunks/{button.component-BZHMvNis.js.map → button.component-CXYCe9wy.js.map} +1 -1
- package/dist/chunks/{button.component-DrvTYE-F.js → button.component-Dkq2R93W.js} +2 -2
- package/dist/chunks/{button.component-DrvTYE-F.js.map → button.component-Dkq2R93W.js.map} +1 -1
- package/dist/chunks/{buttonGroup.component-DoNMqghO.js → buttonGroup.component-BLdNoPbq.js} +6 -6
- package/dist/chunks/{buttonGroup.component-DoNMqghO.js.map → buttonGroup.component-BLdNoPbq.js.map} +1 -1
- package/dist/chunks/{buttonGroup.component-CmMPEPEN.js → buttonGroup.component-CEL4pdRB.js} +2 -2
- package/dist/chunks/{buttonGroup.component-CmMPEPEN.js.map → buttonGroup.component-CEL4pdRB.js.map} +1 -1
- package/dist/chunks/{card.component-BdHsWz_5.js → card.component-BmmzlLYn.js} +2 -2
- package/dist/chunks/{card.component-BdHsWz_5.js.map → card.component-BmmzlLYn.js.map} +1 -1
- package/dist/chunks/{card.component-Ds2Q5-dv.js → card.component-uqvWzK_0.js} +2 -2
- package/dist/chunks/{card.component-Ds2Q5-dv.js.map → card.component-uqvWzK_0.js.map} +1 -1
- package/dist/chunks/{characterCounter.component-OMu4axLo.js → characterCounter.component-CZASTylb.js} +2 -2
- package/dist/chunks/{characterCounter.component-OMu4axLo.js.map → characterCounter.component-CZASTylb.js.map} +1 -1
- package/dist/chunks/{characterCounter.component-2pxq0nJ_.js → characterCounter.component-Dvz2OZQP.js} +5 -5
- package/dist/chunks/{characterCounter.component-2pxq0nJ_.js.map → characterCounter.component-Dvz2OZQP.js.map} +1 -1
- package/dist/chunks/{checkbox.component-6unW8bGD.js → checkbox.component-E4vMCQbq.js} +7 -7
- package/dist/chunks/{checkbox.component-6unW8bGD.js.map → checkbox.component-E4vMCQbq.js.map} +1 -1
- package/dist/chunks/checkbox.component-VWcYJiRf.js +2 -0
- package/dist/chunks/{checkbox.component-CN7VT6Kl.js.map → checkbox.component-VWcYJiRf.js.map} +1 -1
- package/dist/chunks/{checkbox.records-1df_6uAA.js → checkbox.records-B8iY0zdQ.js} +2 -2
- package/dist/chunks/{checkbox.records-1df_6uAA.js.map → checkbox.records-B8iY0zdQ.js.map} +1 -1
- package/dist/chunks/{checkbox.records-BEJe1isy.js → checkbox.records-C-c1IoWp.js} +2 -2
- package/dist/chunks/{checkbox.records-BEJe1isy.js.map → checkbox.records-C-c1IoWp.js.map} +1 -1
- package/dist/chunks/{checkboxGroup.component-BJ12z-XW.js → checkboxGroup.component-DAtqZ54e.js} +2 -2
- package/dist/chunks/{checkboxGroup.component-BJ12z-XW.js.map → checkboxGroup.component-DAtqZ54e.js.map} +1 -1
- package/dist/chunks/{checkboxGroup.component-Dbc4R5pg.js → checkboxGroup.component-SABwFfW_.js} +4 -4
- package/dist/chunks/{checkboxGroup.component-Dbc4R5pg.js.map → checkboxGroup.component-SABwFfW_.js.map} +1 -1
- package/dist/chunks/{config-CWIRw37z.js → config-CrnIcxSC.js} +2 -2
- package/dist/chunks/{config-CWIRw37z.js.map → config-CrnIcxSC.js.map} +1 -1
- package/dist/chunks/{config-Bka1LOUG.js → config-fNC832hN.js} +2 -2
- package/dist/chunks/{config-Bka1LOUG.js.map → config-fNC832hN.js.map} +1 -1
- package/dist/chunks/{conversationCard.component-D0iB6mGd.js → conversationCard.component-BtiP2oUj.js} +17 -17
- package/dist/chunks/{conversationCard.component-D0iB6mGd.js.map → conversationCard.component-BtiP2oUj.js.map} +1 -1
- package/dist/chunks/{conversationCard.component--lfMn8rH.js → conversationCard.component-D16i-VxT.js} +2 -2
- package/dist/chunks/{conversationCard.component--lfMn8rH.js.map → conversationCard.component-D16i-VxT.js.map} +1 -1
- package/dist/chunks/{create-recipe-context-yj-_0pxV.js → create-recipe-context-Bim5jFE2.js} +2 -2
- package/dist/chunks/{create-recipe-context-yj-_0pxV.js.map → create-recipe-context-Bim5jFE2.js.map} +1 -1
- package/dist/chunks/{create-recipe-context-ei7-Fhjc.js → create-recipe-context-CA3qYjga.js} +3 -3
- package/dist/chunks/{create-recipe-context-ei7-Fhjc.js.map → create-recipe-context-CA3qYjga.js.map} +1 -1
- package/dist/chunks/{create-slot-recipe-context-B6kmgvsX.js → create-slot-recipe-context-CGmjOuOh.js} +3 -3
- package/dist/chunks/{create-slot-recipe-context-B6kmgvsX.js.map → create-slot-recipe-context-CGmjOuOh.js.map} +1 -1
- package/dist/chunks/{create-slot-recipe-context-CNbTdeS5.js → create-slot-recipe-context-CgQA10Yw.js} +2 -2
- package/dist/chunks/{create-slot-recipe-context-CNbTdeS5.js.map → create-slot-recipe-context-CgQA10Yw.js.map} +1 -1
- package/dist/chunks/{datePicker.component-DOq_pEln.js → datePicker.component-CFK8KuwT.js} +2 -2
- package/dist/chunks/{datePicker.component-DOq_pEln.js.map → datePicker.component-CFK8KuwT.js.map} +1 -1
- package/dist/chunks/{datePicker.component-BjPLm6FH.js → datePicker.component-CgXA_g6P.js} +13 -13
- package/dist/chunks/{datePicker.component-BjPLm6FH.js.map → datePicker.component-CgXA_g6P.js.map} +1 -1
- package/dist/chunks/{dialog-trigger-tzkv77T4.js → dialog-trigger-B6YOjSvA.js} +2 -2
- package/dist/chunks/{dialog-trigger-tzkv77T4.js.map → dialog-trigger-B6YOjSvA.js.map} +1 -1
- package/dist/chunks/{dialog-trigger-CUC9-uYl.js → dialog-trigger-be7-Tznq.js} +2 -2
- package/dist/chunks/{dialog-trigger-CUC9-uYl.js.map → dialog-trigger-be7-Tznq.js.map} +1 -1
- package/dist/chunks/{divider.types-Cum_pC7q.js → divider.types-040bKgyZ.js} +2 -2
- package/dist/chunks/{divider.types-Cum_pC7q.js.map → divider.types-040bKgyZ.js.map} +1 -1
- package/dist/chunks/{divider.types-CVrYEuME.js → divider.types-DwqIRd94.js} +3 -3
- package/dist/chunks/{divider.types-CVrYEuME.js.map → divider.types-DwqIRd94.js.map} +1 -1
- package/dist/chunks/{factory-D5ooFDGK.js → factory-D_LOlWjz.js} +181 -181
- package/dist/chunks/{factory-D5ooFDGK.js.map → factory-D_LOlWjz.js.map} +1 -1
- package/dist/chunks/factory-DiRBd_Ei.js +17 -0
- package/dist/chunks/{factory-Djhmhla9.js.map → factory-DiRBd_Ei.js.map} +1 -1
- package/dist/chunks/{flex-D2YmHSRL.js → flex-9MBe_Izs.js} +2 -2
- package/dist/chunks/{flex-D2YmHSRL.js.map → flex-9MBe_Izs.js.map} +1 -1
- package/dist/chunks/{flex-CoWH4MWg.js → flex-BpxJvA4z.js} +2 -2
- package/dist/chunks/{flex-CoWH4MWg.js.map → flex-BpxJvA4z.js.map} +1 -1
- package/dist/chunks/{float-D0XppGHj.js → float-D5FLe8D9.js} +2 -2
- package/dist/chunks/{float-D0XppGHj.js.map → float-D5FLe8D9.js.map} +1 -1
- package/dist/chunks/{float-3sTEdNja.js → float-DltoW_Zq.js} +3 -3
- package/dist/chunks/{float-3sTEdNja.js.map → float-DltoW_Zq.js.map} +1 -1
- package/dist/chunks/{grid-item-CUvFlFUM.js → grid-item-Bh8eyURv.js} +2 -2
- package/dist/chunks/{grid-item-CUvFlFUM.js.map → grid-item-Bh8eyURv.js.map} +1 -1
- package/dist/chunks/{grid-item-Demhr3R8.js → grid-item-CtE_AYi_.js} +3 -3
- package/dist/chunks/{grid-item-Demhr3R8.js.map → grid-item-CtE_AYi_.js.map} +1 -1
- package/dist/chunks/{group-CyV6CH8n.js → group-B-T5mM5H.js} +2 -2
- package/dist/chunks/{group-CyV6CH8n.js.map → group-B-T5mM5H.js.map} +1 -1
- package/dist/chunks/{group-gT4uiUTj.js → group-C1RHA5D4.js} +2 -2
- package/dist/chunks/{group-gT4uiUTj.js.map → group-C1RHA5D4.js.map} +1 -1
- package/dist/chunks/{h-stack-DWIPFE4q.js → h-stack-BNJKAmfP.js} +2 -2
- package/dist/chunks/{h-stack-DWIPFE4q.js.map → h-stack-BNJKAmfP.js.map} +1 -1
- package/dist/chunks/h-stack-CS7rfLzY.js +2 -0
- package/dist/chunks/{h-stack-DS6_Nmps.js.map → h-stack-CS7rfLzY.js.map} +1 -1
- package/dist/chunks/{heading.component-WidNm4DU.js → heading.component-C0os9XQl.js} +3 -3
- package/dist/chunks/{heading.component-WidNm4DU.js.map → heading.component-C0os9XQl.js.map} +1 -1
- package/dist/chunks/heading.component-DPQ3Ldev.js +2 -0
- package/dist/chunks/{heading.component-CVtGEEgj.js.map → heading.component-DPQ3Ldev.js.map} +1 -1
- package/dist/chunks/{icon-button-BhUHtq9f.js → icon-button-C2UFU-Ne.js} +4 -4
- package/dist/chunks/{icon-button-BhUHtq9f.js.map → icon-button-C2UFU-Ne.js.map} +1 -1
- package/dist/chunks/icon-button-DTNVQ6ie.js +2 -0
- package/dist/chunks/{icon-button-BoeNBxVE.js.map → icon-button-DTNVQ6ie.js.map} +1 -1
- package/dist/chunks/{icon.component-CqMlCLYe.js → icon.component-2UIkFQec.js} +2 -2
- package/dist/chunks/{icon.component-CqMlCLYe.js.map → icon.component-2UIkFQec.js.map} +1 -1
- package/dist/chunks/{icon.component-RnXzLy9Z.js → icon.component-Bak20DHK.js} +2 -2
- package/dist/chunks/{icon.component-RnXzLy9Z.js.map → icon.component-Bak20DHK.js.map} +1 -1
- package/dist/chunks/{icons-6idzI9fr.js → icons-DV9YYLlJ.js} +2 -2
- package/dist/chunks/{icons-6idzI9fr.js.map → icons-DV9YYLlJ.js.map} +1 -1
- package/dist/chunks/{icons-DsfswYKK.js → icons-mKvEgUrt.js} +2 -2
- package/dist/chunks/{icons-DsfswYKK.js.map → icons-mKvEgUrt.js.map} +1 -1
- package/dist/chunks/{index-CItwlE2r.js → index-7Wm53w71.js} +2 -2
- package/dist/chunks/{index-CItwlE2r.js.map → index-7Wm53w71.js.map} +1 -1
- package/dist/chunks/{index-Cl4DH-b8.js → index-BDnnTdaJ.js} +2 -2
- package/dist/chunks/{index-Cl4DH-b8.js.map → index-BDnnTdaJ.js.map} +1 -1
- package/dist/chunks/{index-D1m6YWQg.js → index-BYf7SZUC.js} +2 -2
- package/dist/chunks/{index-D1m6YWQg.js.map → index-BYf7SZUC.js.map} +1 -1
- package/dist/chunks/{index-JaYE81Ru.js → index-COoMV9Mh.js} +2 -2
- package/dist/chunks/{index-JaYE81Ru.js.map → index-COoMV9Mh.js.map} +1 -1
- package/dist/chunks/{index-bAktJOSP.js → index-CZz7hHWb.js} +2 -2
- package/dist/chunks/{index-bAktJOSP.js.map → index-CZz7hHWb.js.map} +1 -1
- package/dist/chunks/{index-Dg2ABT8y.js → index-CkYZf9Pm.js} +2 -2
- package/dist/chunks/{index-Dg2ABT8y.js.map → index-CkYZf9Pm.js.map} +1 -1
- package/dist/chunks/{index-DQxjSq1v.js → index-Cn3XQQvx.js} +2 -2
- package/dist/chunks/{index-DQxjSq1v.js.map → index-Cn3XQQvx.js.map} +1 -1
- package/dist/chunks/index-DD49WSSW.js +2 -0
- package/dist/chunks/index-DD49WSSW.js.map +1 -0
- package/dist/chunks/index-DZ4rwOqN.js +2 -0
- package/dist/chunks/{index-naFRmuBR.js.map → index-DZ4rwOqN.js.map} +1 -1
- package/dist/chunks/{index-BStpE8Il.js → index-DyfLgoV3.js} +2 -2
- package/dist/chunks/{index-BStpE8Il.js.map → index-DyfLgoV3.js.map} +1 -1
- package/dist/chunks/{index-DgM7zI46.js → index-MlhL0PDC.js} +2 -2
- package/dist/chunks/{index-DgM7zI46.js.map → index-MlhL0PDC.js.map} +1 -1
- package/dist/chunks/{index-Cv1W043o.js → index-UWtj4ULm.js} +2 -2
- package/dist/chunks/{index-Cv1W043o.js.map → index-UWtj4ULm.js.map} +1 -1
- package/dist/chunks/{index-CNSw8O4Z.js → index-ZaGEDS_0.js} +2 -2
- package/dist/chunks/{index-CNSw8O4Z.js.map → index-ZaGEDS_0.js.map} +1 -1
- package/dist/chunks/{jsx-runtime-CITbqOLs.js → jsx-runtime-BjDatQAs.js} +5 -5
- package/dist/chunks/{jsx-runtime-CITbqOLs.js.map → jsx-runtime-BjDatQAs.js.map} +1 -1
- package/dist/chunks/{link.component-DfPzeeWK.js → link.component-Bc4wkkNV.js} +2 -2
- package/dist/chunks/{link.component-DfPzeeWK.js.map → link.component-Bc4wkkNV.js.map} +1 -1
- package/dist/chunks/{link.component-B0NnnoNo.js → link.component-DpZFgqBD.js} +5 -5
- package/dist/chunks/{link.component-B0NnnoNo.js.map → link.component-DpZFgqBD.js.map} +1 -1
- package/dist/chunks/{list-CBFKkZsk.js → list-6xuavQ8j.js} +2 -2
- package/dist/chunks/{list-CBFKkZsk.js.map → list-6xuavQ8j.js.map} +1 -1
- package/dist/chunks/{list-AkEh0-z3.js → list-btYImTmv.js} +2 -2
- package/dist/chunks/{list-AkEh0-z3.js.map → list-btYImTmv.js.map} +1 -1
- package/dist/chunks/{logo.types-DWfVoh84.js → logo.types-CNiIncF7.js} +2 -2
- package/dist/chunks/{logo.types-DWfVoh84.js.map → logo.types-CNiIncF7.js.map} +1 -1
- package/dist/chunks/{logo.types-Di-vcqft.js → logo.types-_82dfqCq.js} +4 -4
- package/dist/chunks/{logo.types-Di-vcqft.js.map → logo.types-_82dfqCq.js.map} +1 -1
- package/dist/chunks/{menu.component-D7YIaf-Z.js → menu.component-6ReZTkw3.js} +11 -11
- package/dist/chunks/{menu.component-D7YIaf-Z.js.map → menu.component-6ReZTkw3.js.map} +1 -1
- package/dist/chunks/menu.component-M23lpQYR.js +2 -0
- package/dist/chunks/{menu.component-CVq3JuDQ.js.map → menu.component-M23lpQYR.js.map} +1 -1
- package/dist/chunks/{modal.types-BqYvHMJ1.js → modal.types-C-ULroqw.js} +2 -2
- package/dist/chunks/{modal.types-BqYvHMJ1.js.map → modal.types-C-ULroqw.js.map} +1 -1
- package/dist/chunks/{modal.types-hd4zRySC.js → modal.types-Cz1sgSf1.js} +7 -7
- package/dist/chunks/{modal.types-hd4zRySC.js.map → modal.types-Cz1sgSf1.js.map} +1 -1
- package/dist/chunks/{notificationCounter.component-C1kj4Fks.js → notificationCounter.component-lX_ARuii.js} +2 -2
- package/dist/chunks/{notificationCounter.component-C1kj4Fks.js.map → notificationCounter.component-lX_ARuii.js.map} +1 -1
- package/dist/chunks/{notificationCounter.component-DucbUl3J.js → notificationCounter.component-nPsm5edj.js} +5 -5
- package/dist/chunks/{notificationCounter.component-DucbUl3J.js.map → notificationCounter.component-nPsm5edj.js.map} +1 -1
- package/dist/chunks/{picture.component-CcTQIBLG.js → picture.component-CRe72g3B.js} +2 -2
- package/dist/chunks/{picture.component-CcTQIBLG.js.map → picture.component-CRe72g3B.js.map} +1 -1
- package/dist/chunks/{picture.component-CFur6bma.js → picture.component-DietrSe9.js} +2 -2
- package/dist/chunks/{picture.component-CFur6bma.js.map → picture.component-DietrSe9.js.map} +1 -1
- package/dist/chunks/{pinInput.types-htAlsWUJ.js → pinInput.types-BEUtBvMe.js} +3 -3
- package/dist/chunks/{pinInput.types-htAlsWUJ.js.map → pinInput.types-BEUtBvMe.js.map} +1 -1
- package/dist/chunks/pinInput.types-DyQpSyoi.js +2 -0
- package/dist/chunks/{pinInput.types-BkZoddhj.js.map → pinInput.types-DyQpSyoi.js.map} +1 -1
- package/dist/chunks/{popover-NyXIgDrR.js → popover-B0kRlAi2.js} +2 -2
- package/dist/chunks/{popover-NyXIgDrR.js.map → popover-B0kRlAi2.js.map} +1 -1
- package/dist/chunks/{popover-DK1Q0GmC.js → popover-B8hI3TjN.js} +2 -2
- package/dist/chunks/{popover-DK1Q0GmC.js.map → popover-B8hI3TjN.js.map} +1 -1
- package/dist/chunks/{popover-root-provider-DL0Y6XoH.js → popover-root-provider-DAMDDAHQ.js} +2 -2
- package/dist/chunks/{popover-root-provider-DL0Y6XoH.js.map → popover-root-provider-DAMDDAHQ.js.map} +1 -1
- package/dist/chunks/{popover.component-Di7A2mlT.js → popover.component-CrVJG5hl.js} +11 -11
- package/dist/chunks/{popover.component-Di7A2mlT.js.map → popover.component-CrVJG5hl.js.map} +1 -1
- package/dist/chunks/popover.component-IX7vhT9Q.js +2 -0
- package/dist/chunks/{popover.component-BU4ZYtgB.js.map → popover.component-IX7vhT9Q.js.map} +1 -1
- package/dist/chunks/{popover.recipe-C7mfFIuD.js → popover.recipe-CXB-bizi.js} +2 -2
- package/dist/chunks/{popover.recipe-C7mfFIuD.js.map → popover.recipe-CXB-bizi.js.map} +1 -1
- package/dist/chunks/{popover.recipe-CFioNlNO.js → popover.recipe-DhCa6zgx.js} +2 -2
- package/dist/chunks/{popover.recipe-CFioNlNO.js.map → popover.recipe-DhCa6zgx.js.map} +1 -1
- package/dist/chunks/{radio.records-HAh4TB8-.js → radio.records-CgQh4PvA.js} +2 -2
- package/dist/chunks/{radio.records-HAh4TB8-.js.map → radio.records-CgQh4PvA.js.map} +1 -1
- package/dist/chunks/{radio.records-BvaGc_dX.js → radio.records-Ds_h4yC0.js} +2 -2
- package/dist/chunks/{radio.records-BvaGc_dX.js.map → radio.records-Ds_h4yC0.js.map} +1 -1
- package/dist/chunks/{radioGroup.component-Cdtgrekb.js → radioGroup.component-B3IbjBoh.js} +10 -10
- package/dist/chunks/{radioGroup.component-Cdtgrekb.js.map → radioGroup.component-B3IbjBoh.js.map} +1 -1
- package/dist/chunks/radioGroup.component-baegzOcU.js +2 -0
- package/dist/chunks/{radioGroup.component-AnXOfN3A.js.map → radioGroup.component-baegzOcU.js.map} +1 -1
- package/dist/chunks/{ratingDots.component-wYh_RTGd.js → ratingDots.component-BOP9ddLk.js} +2 -2
- package/dist/chunks/{ratingDots.component-wYh_RTGd.js.map → ratingDots.component-BOP9ddLk.js.map} +1 -1
- package/dist/chunks/{ratingDots.component-B-VtkikB.js → ratingDots.component-CDJNTlyt.js} +7 -7
- package/dist/chunks/{ratingDots.component-B-VtkikB.js.map → ratingDots.component-CDJNTlyt.js.map} +1 -1
- package/dist/chunks/{render-strategy-8uyKZcWI.js → render-strategy-BmWbSgqh.js} +2 -2
- package/dist/chunks/{render-strategy-8uyKZcWI.js.map → render-strategy-BmWbSgqh.js.map} +1 -1
- package/dist/chunks/select.component-D5Kx0C6H.js +2 -0
- package/dist/chunks/{select.component-CtCEglbM.js.map → select.component-D5Kx0C6H.js.map} +1 -1
- package/dist/chunks/{select.component-C9FC4hZN.js → select.component-kIMBGVX-.js} +9 -9
- package/dist/chunks/{select.component-C9FC4hZN.js.map → select.component-kIMBGVX-.js.map} +1 -1
- package/dist/chunks/sortableList.component-CMdzXRvM.js +6 -0
- package/dist/chunks/{sortableList.component-Dft-FiMn.js.map → sortableList.component-CMdzXRvM.js.map} +1 -1
- package/dist/chunks/{sortableList.component-BpkFj8Wt.js → sortableList.component-DWCeI27G.js} +5 -5
- package/dist/chunks/{sortableList.component-BpkFj8Wt.js.map → sortableList.component-DWCeI27G.js.map} +1 -1
- package/dist/chunks/spinner-BVmsGoNz.js +2 -0
- package/dist/chunks/{spinner-B981BEf0.js.map → spinner-BVmsGoNz.js.map} +1 -1
- package/dist/chunks/spinner-CIj_D6mc.js +8 -0
- package/dist/chunks/{spinner-DUSVCecp.js.map → spinner-CIj_D6mc.js.map} +1 -1
- package/dist/chunks/{spinner.component-BmT7fUg9.js → spinner.component-B0EkS0nN.js} +6 -6
- package/dist/chunks/{spinner.component-BmT7fUg9.js.map → spinner.component-B0EkS0nN.js.map} +1 -1
- package/dist/chunks/{spinner.component-DPS-cIcA.js → spinner.component-DbjX00Oz.js} +2 -2
- package/dist/chunks/{spinner.component-DPS-cIcA.js.map → spinner.component-DbjX00Oz.js.map} +1 -1
- package/dist/chunks/{stack-DXGLsM8c.js → stack-CJxtLLO5.js} +2 -2
- package/dist/chunks/{stack-DXGLsM8c.js.map → stack-CJxtLLO5.js.map} +1 -1
- package/dist/chunks/{stack-BNCEW5sJ.js → stack-DCiVNls4.js} +3 -3
- package/dist/chunks/{stack-BNCEW5sJ.js.map → stack-DCiVNls4.js.map} +1 -1
- package/dist/chunks/{styledAvatar.types-CI0j01cH.js → styledAvatar.types-D-EtAZDF.js} +2 -2
- package/dist/chunks/{styledAvatar.types-CI0j01cH.js.map → styledAvatar.types-D-EtAZDF.js.map} +1 -1
- package/dist/chunks/{styledAvatar.types-CRb1HJCU.js → styledAvatar.types-Dq0B2lvO.js} +2 -2
- package/dist/chunks/{styledAvatar.types-CRb1HJCU.js.map → styledAvatar.types-Dq0B2lvO.js.map} +1 -1
- package/dist/chunks/{swatch.types-BtgRLAO2.js → swatch.types-BaLvcOgk.js} +2 -2
- package/dist/chunks/{swatch.types-BtgRLAO2.js.map → swatch.types-BaLvcOgk.js.map} +1 -1
- package/dist/chunks/{swatch.types-DMM5zh_t.js → swatch.types-yT5psqUR.js} +4 -4
- package/dist/chunks/{swatch.types-DMM5zh_t.js.map → swatch.types-yT5psqUR.js.map} +1 -1
- package/dist/chunks/switch.component-Ok2ZZQth.js +2 -0
- package/dist/chunks/{switch.component-Do0X7LJD.js.map → switch.component-Ok2ZZQth.js.map} +1 -1
- package/dist/chunks/{switch.component-Dl4g9R68.js → switch.component-w_hI7PDT.js} +5 -5
- package/dist/chunks/{switch.component-Dl4g9R68.js.map → switch.component-w_hI7PDT.js.map} +1 -1
- package/dist/chunks/{tabs.component-D1aPBr6M.js → tabs.component-BWVporfj.js} +5 -5
- package/dist/chunks/{tabs.component-D1aPBr6M.js.map → tabs.component-BWVporfj.js.map} +1 -1
- package/dist/chunks/{tabs.component-ISxMfB67.js → tabs.component-CD-aAuwS.js} +2 -2
- package/dist/chunks/{tabs.component-ISxMfB67.js.map → tabs.component-CD-aAuwS.js.map} +1 -1
- package/dist/chunks/{tag.component-BdVdchYv.js → tag.component-B3HqTQv9.js} +3 -3
- package/dist/chunks/{tag.component-BdVdchYv.js.map → tag.component-B3HqTQv9.js.map} +1 -1
- package/dist/chunks/{tag.component-Mi7eMQDk.js → tag.component-CG0GhLTW.js} +2 -2
- package/dist/chunks/{tag.component-Mi7eMQDk.js.map → tag.component-CG0GhLTW.js.map} +1 -1
- package/dist/chunks/{tagBlock.component-BQRdsHPH.js → tagBlock.component-C4Jhgu0X.js} +10 -10
- package/dist/chunks/{tagBlock.component-BQRdsHPH.js.map → tagBlock.component-C4Jhgu0X.js.map} +1 -1
- package/dist/chunks/tagBlock.component-DVZRmYDw.js +2 -0
- package/dist/chunks/{tagBlock.component-Dj3iPVJy.js.map → tagBlock.component-DVZRmYDw.js.map} +1 -1
- package/dist/chunks/text.component-CjHMwskV.js +2 -0
- package/dist/chunks/{text.component-uDfPjmx6.js.map → text.component-CjHMwskV.js.map} +1 -1
- package/dist/chunks/{text.component-ymbS_dRE.js → text.component-DCAWfY65.js} +3 -3
- package/dist/chunks/{text.component-ymbS_dRE.js.map → text.component-DCAWfY65.js.map} +1 -1
- package/dist/chunks/{textInput.component-DfqkWsJX.js → textInput.component-B5-xa_yC.js} +9 -9
- package/dist/chunks/{textInput.component-DfqkWsJX.js.map → textInput.component-B5-xa_yC.js.map} +1 -1
- package/dist/chunks/textInput.component-BMSwF3Ae.js +2 -0
- package/dist/chunks/{textInput.component-CEF55yJj.js.map → textInput.component-BMSwF3Ae.js.map} +1 -1
- package/dist/chunks/{textarea.component-1B3U7E2O.js → textarea.component-1qoZ-mMp.js} +5 -5
- package/dist/chunks/{textarea.component-1B3U7E2O.js.map → textarea.component-1qoZ-mMp.js.map} +1 -1
- package/dist/chunks/textarea.component-L3bZoiXW.js +2 -0
- package/dist/chunks/{textarea.component-BVGFuIZC.js.map → textarea.component-L3bZoiXW.js.map} +1 -1
- package/dist/chunks/{theme.provider-BM3qjfO8.js → theme.provider-Cjzvgcq8.js} +4 -4
- package/dist/chunks/{theme.provider-BM3qjfO8.js.map → theme.provider-Cjzvgcq8.js.map} +1 -1
- package/dist/chunks/{theme.provider-B2ycPYcf.js → theme.provider-Ds0i6KF4.js} +586 -586
- package/dist/chunks/{theme.provider-B2ycPYcf.js.map → theme.provider-Ds0i6KF4.js.map} +1 -1
- package/dist/chunks/{timePicker.component-oN8iujB5.js → timePicker.component-CAAoFSZg.js} +2 -2
- package/dist/chunks/{timePicker.component-oN8iujB5.js.map → timePicker.component-CAAoFSZg.js.map} +1 -1
- package/dist/chunks/{timePicker.component-C7i3U49Y.js → timePicker.component-CImRXa-g.js} +8 -8
- package/dist/chunks/{timePicker.component-C7i3U49Y.js.map → timePicker.component-CImRXa-g.js.map} +1 -1
- package/dist/chunks/{timeRange.component-BApcir-7.js → timeRange.component-DNwdaf7m.js} +4 -4
- package/dist/chunks/{timeRange.component-BApcir-7.js.map → timeRange.component-DNwdaf7m.js.map} +1 -1
- package/dist/chunks/{timeRange.component-XZD-d3X-.js → timeRange.component-DXrBO0Id.js} +2 -2
- package/dist/chunks/{timeRange.component-XZD-d3X-.js.map → timeRange.component-DXrBO0Id.js.map} +1 -1
- package/dist/chunks/{timestamp.component-DJZzpqBC.js → timestamp.component-BACJfaKw.js} +2 -2
- package/dist/chunks/{timestamp.component-DJZzpqBC.js.map → timestamp.component-BACJfaKw.js.map} +1 -1
- package/dist/chunks/{timestamp.component-25Br-GCm.js → timestamp.component-Db-MbDMR.js} +3 -3
- package/dist/chunks/{timestamp.component-25Br-GCm.js.map → timestamp.component-Db-MbDMR.js.map} +1 -1
- package/dist/chunks/{tooltip.component-Cf_csr_d.js → tooltip.component-BPbl810g.js} +2 -2
- package/dist/chunks/{tooltip.component-Cf_csr_d.js.map → tooltip.component-BPbl810g.js.map} +1 -1
- package/dist/chunks/{tooltip.component-CVPBpD3Z.js → tooltip.component-JCzaFEUu.js} +2 -2
- package/dist/chunks/{tooltip.component-CVPBpD3Z.js.map → tooltip.component-JCzaFEUu.js.map} +1 -1
- package/dist/chunks/{use-field-context-BPsEZCN4.js → use-field-context--wBJQY1R.js} +2 -2
- package/dist/chunks/{use-field-context-BPsEZCN4.js.map → use-field-context--wBJQY1R.js.map} +1 -1
- package/dist/chunks/use-locale-context-BdqHZ8L8.js +22 -0
- package/dist/chunks/{use-locale-context-Cc4BhWV1.js.map → use-locale-context-BdqHZ8L8.js.map} +1 -1
- package/dist/chunks/{use-recipe-D7cwXEim.js → use-recipe-CJD8nmAh.js} +2 -2
- package/dist/chunks/{use-recipe-D7cwXEim.js.map → use-recipe-CJD8nmAh.js.map} +1 -1
- package/dist/chunks/use-recipe-e5vdQ3Ca.js +2 -0
- package/dist/chunks/{use-recipe-CkP1U6f2.js.map → use-recipe-e5vdQ3Ca.js.map} +1 -1
- package/dist/chunks/use-slot-recipe-BEyHP-Lh.js +2 -0
- package/dist/chunks/{use-slot-recipe-ClRnqDPf.js.map → use-slot-recipe-BEyHP-Lh.js.map} +1 -1
- package/dist/chunks/{use-slot-recipe-Bz5VPIbz.js → use-slot-recipe-CB5G_UZD.js} +2 -2
- package/dist/chunks/{use-slot-recipe-Bz5VPIbz.js.map → use-slot-recipe-CB5G_UZD.js.map} +1 -1
- package/dist/chunks/{v-stack-C_EMZ8cL.js → v-stack-DOm7QQkt.js} +2 -2
- package/dist/chunks/{v-stack-C_EMZ8cL.js.map → v-stack-DOm7QQkt.js.map} +1 -1
- package/dist/chunks/v-stack-wxICnH9w.js +2 -0
- package/dist/chunks/{v-stack-By2b5ZVX.js.map → v-stack-wxICnH9w.js.map} +1 -1
- package/dist/chunks/{walk-object-CwdvmBuz.js → walk-object-EkQnf0pF.js} +2 -2
- package/dist/chunks/{walk-object-CwdvmBuz.js.map → walk-object-EkQnf0pF.js.map} +1 -1
- package/dist/chunks/{walk-object-BQcbPtPs.js → walk-object-FYEyC1q9.js} +2 -2
- package/dist/chunks/{walk-object-BQcbPtPs.js.map → walk-object-FYEyC1q9.js.map} +1 -1
- package/dist/chunks/withFormControl-BHuqR52U.js +2 -0
- package/dist/chunks/{withFormControl-CUnCiP8H.js.map → withFormControl-BHuqR52U.js.map} +1 -1
- package/dist/chunks/{withFormControl-DoBnTeb9.js → withFormControl-D7wJfVjb.js} +7 -7
- package/dist/chunks/{withFormControl-DoBnTeb9.js.map → withFormControl-D7wJfVjb.js.map} +1 -1
- package/dist/chunks/{withTruncation-iFpoL9YV.js → withTruncation-B9ffIwF7.js} +3 -3
- package/dist/chunks/{withTruncation-iFpoL9YV.js.map → withTruncation-B9ffIwF7.js.map} +1 -1
- package/dist/chunks/{withTruncation-CzqmBekU.js → withTruncation-D04zq8uV.js} +2 -2
- package/dist/chunks/{withTruncation-CzqmBekU.js.map → withTruncation-D04zq8uV.js.map} +1 -1
- package/dist/chunks/{wrap-CdWJy79S.js → wrap-B06zjN2U.js} +2 -2
- package/dist/chunks/{wrap-CdWJy79S.js.map → wrap-B06zjN2U.js.map} +1 -1
- package/dist/chunks/{wrap-DwAuTaha.js → wrap-DQfXAuZ8.js} +3 -3
- package/dist/chunks/{wrap-DwAuTaha.js.map → wrap-DQfXAuZ8.js.map} +1 -1
- package/dist/cjs/chakra/index.cjs +1 -1
- package/dist/cjs/chakra/index.cjs.map +1 -1
- package/dist/cjs/components/Alert/index.cjs +1 -1
- package/dist/cjs/components/Avatar/index.cjs +1 -1
- package/dist/cjs/components/AvatarGroup/index.cjs +1 -1
- package/dist/cjs/components/Button/index.cjs +1 -1
- package/dist/cjs/components/ButtonGroup/index.cjs +1 -1
- package/dist/cjs/components/Card/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/Divider/index.cjs +1 -1
- package/dist/cjs/components/Heading/index.cjs +1 -1
- package/dist/cjs/components/Icon/generated/index.cjs +1 -1
- package/dist/cjs/components/Icon/index.cjs +1 -1
- package/dist/cjs/components/Link/index.cjs +1 -1
- package/dist/cjs/components/Logo/generated/index.cjs +1 -1
- package/dist/cjs/components/Logo/index.cjs +1 -1
- package/dist/cjs/components/Menu/index.cjs +1 -1
- package/dist/cjs/components/Modal/index.cjs +1 -1
- package/dist/cjs/components/NotificationCounter/index.cjs +1 -1
- package/dist/cjs/components/Picture/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/Swatch/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/Tag/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/hooks/index.cjs +1 -1
- package/dist/cjs/index.cjs +1 -1
- package/dist/cjs/theme/index.cjs +1 -1
- package/dist/esm/chakra/index.js +21 -21
- package/dist/esm/components/Alert/index.js +1 -1
- package/dist/esm/components/Avatar/index.js +1 -1
- package/dist/esm/components/AvatarGroup/index.js +1 -1
- package/dist/esm/components/Button/index.js +1 -1
- package/dist/esm/components/ButtonGroup/index.js +1 -1
- package/dist/esm/components/Card/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/Divider/index.js +1 -1
- package/dist/esm/components/Heading/index.js +1 -1
- package/dist/esm/components/Icon/index.js +1 -1
- package/dist/esm/components/Link/index.js +1 -1
- package/dist/esm/components/Logo/index.js +1 -1
- package/dist/esm/components/Menu/index.js +1 -1
- package/dist/esm/components/Modal/index.js +1 -1
- package/dist/esm/components/NotificationCounter/index.js +1 -1
- package/dist/esm/components/Picture/index.js +1 -1
- package/dist/esm/components/PinInput/index.js +1 -1
- package/dist/esm/components/Popover/index.js +1 -1
- package/dist/esm/components/RadioGroup/index.js +1 -1
- package/dist/esm/components/RatingDots/index.js +1 -1
- package/dist/esm/components/Select/index.js +1 -1
- package/dist/esm/components/SortableList/index.js +1 -1
- package/dist/esm/components/Spinner/index.js +1 -1
- package/dist/esm/components/StyledAvatar/index.js +1 -1
- package/dist/esm/components/Swatch/index.js +1 -1
- package/dist/esm/components/Switch/index.js +1 -1
- package/dist/esm/components/Tabs/index.js +1 -1
- package/dist/esm/components/Tag/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 +40 -40
- package/dist/esm/hocs/index.js +1 -1
- package/dist/esm/index.js +42 -42
- package/dist/esm/theme/index.js +1 -1
- package/package.json +2 -1
- package/dist/chunks/alert.component-CcCt-bb5.js +0 -2
- package/dist/chunks/avatar.component-LWnRY2X6.js +0 -2
- package/dist/chunks/box-DQTWVrl0.js +0 -7
- package/dist/chunks/box-DiiiZkF4.js +0 -2
- package/dist/chunks/checkbox.component-CN7VT6Kl.js +0 -2
- package/dist/chunks/factory-Djhmhla9.js +0 -17
- package/dist/chunks/h-stack-DS6_Nmps.js +0 -2
- package/dist/chunks/heading.component-CVtGEEgj.js +0 -2
- package/dist/chunks/icon-button-BoeNBxVE.js +0 -2
- package/dist/chunks/index-CsjrqSSN.js +0 -2
- package/dist/chunks/index-CsjrqSSN.js.map +0 -1
- package/dist/chunks/index-naFRmuBR.js +0 -2
- package/dist/chunks/menu.component-CVq3JuDQ.js +0 -2
- package/dist/chunks/pinInput.types-BkZoddhj.js +0 -2
- package/dist/chunks/popover.component-BU4ZYtgB.js +0 -2
- package/dist/chunks/radioGroup.component-AnXOfN3A.js +0 -2
- package/dist/chunks/select.component-CtCEglbM.js +0 -2
- package/dist/chunks/sortableList.component-Dft-FiMn.js +0 -6
- package/dist/chunks/spinner-B981BEf0.js +0 -2
- package/dist/chunks/spinner-DUSVCecp.js +0 -8
- package/dist/chunks/switch.component-Do0X7LJD.js +0 -2
- package/dist/chunks/tagBlock.component-Dj3iPVJy.js +0 -2
- package/dist/chunks/text.component-uDfPjmx6.js +0 -2
- package/dist/chunks/textInput.component-CEF55yJj.js +0 -2
- package/dist/chunks/textarea.component-BVGFuIZC.js +0 -2
- package/dist/chunks/use-locale-context-Cc4BhWV1.js +0 -22
- package/dist/chunks/use-recipe-CkP1U6f2.js +0 -2
- package/dist/chunks/use-slot-recipe-ClRnqDPf.js +0 -2
- package/dist/chunks/v-stack-By2b5ZVX.js +0 -2
- package/dist/chunks/withFormControl-CUnCiP8H.js +0 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useMemo as s } from "react";
|
|
2
|
-
import { u } from "./factory-
|
|
2
|
+
import { u } from "./factory-D_LOlWjz.js";
|
|
3
3
|
function i(o) {
|
|
4
4
|
const { key: e, recipe: t } = o, r = u();
|
|
5
5
|
return s(() => {
|
|
@@ -10,4 +10,4 @@ function i(o) {
|
|
|
10
10
|
export {
|
|
11
11
|
i as u
|
|
12
12
|
};
|
|
13
|
-
//# sourceMappingURL=use-recipe-
|
|
13
|
+
//# sourceMappingURL=use-recipe-CJD8nmAh.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-recipe-
|
|
1
|
+
{"version":3,"file":"use-recipe-CJD8nmAh.js","sources":["../../node_modules/@chakra-ui/react/dist/esm/styled-system/use-recipe.js"],"sourcesContent":["\"use strict\";\n\"use client\";\nimport { useMemo } from 'react';\nimport { useChakraContext } from './provider.js';\n\nfunction useRecipe(options) {\n const { key, recipe: recipeProp } = options;\n const sys = useChakraContext();\n return useMemo(() => {\n const recipe = recipeProp || (key != null ? sys.getRecipe(key) : {});\n return sys.cva(structuredClone(recipe));\n }, [key, recipeProp, sys]);\n}\n\nexport { useRecipe };\n"],"names":["useRecipe","options","key","recipeProp","sys","useChakraContext","useMemo","recipe"],"mappings":";;AAKA,SAASA,EAAUC,GAAS;AAC1B,QAAM,EAAE,KAAAC,GAAK,QAAQC,EAAY,IAAGF,GAC9BG,IAAMC,EAAkB;AAC9B,SAAOC,EAAQ,MAAM;AACnB,UAAMC,IAASJ,MAAeD,KAAO,OAAOE,EAAI,UAAUF,CAAG,IAAI;AACjE,WAAOE,EAAI,IAAI,gBAAgBG,CAAM,CAAC;AAAA,EACvC,GAAE,CAACL,GAAKC,GAAYC,CAAG,CAAC;AAC3B;","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";const u=require("react"),n=require("./factory-DiRBd_Ei.js");function o(t){const{key:e,recipe:r}=t,c=n.useChakraContext();return u.useMemo(()=>{const s=r||(e!=null?c.getRecipe(e):{});return c.cva(structuredClone(s))},[e,r,c])}exports.useRecipe=o;
|
|
2
|
+
//# sourceMappingURL=use-recipe-e5vdQ3Ca.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-recipe-
|
|
1
|
+
{"version":3,"file":"use-recipe-e5vdQ3Ca.js","sources":["../../node_modules/@chakra-ui/react/dist/esm/styled-system/use-recipe.js"],"sourcesContent":["\"use strict\";\n\"use client\";\nimport { useMemo } from 'react';\nimport { useChakraContext } from './provider.js';\n\nfunction useRecipe(options) {\n const { key, recipe: recipeProp } = options;\n const sys = useChakraContext();\n return useMemo(() => {\n const recipe = recipeProp || (key != null ? sys.getRecipe(key) : {});\n return sys.cva(structuredClone(recipe));\n }, [key, recipeProp, sys]);\n}\n\nexport { useRecipe };\n"],"names":["useRecipe","options","key","recipeProp","sys","useChakraContext","useMemo","recipe"],"mappings":"yEAKA,SAASA,EAAUC,EAAS,CAC1B,KAAM,CAAE,IAAAC,EAAK,OAAQC,CAAY,EAAGF,EAC9BG,EAAMC,EAAAA,iBAAkB,EAC9B,OAAOC,EAAO,QAAC,IAAM,CACnB,MAAMC,EAASJ,IAAeD,GAAO,KAAOE,EAAI,UAAUF,CAAG,EAAI,IACjE,OAAOE,EAAI,IAAI,gBAAgBG,CAAM,CAAC,CACvC,EAAE,CAACL,EAAKC,EAAYC,CAAG,CAAC,CAC3B","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";const o=require("react"),u=require("./factory-DiRBd_Ei.js");function n(c){const{key:e,recipe:r}=c,t=u.useChakraContext();return o.useMemo(()=>{const s=r||(e!=null?t.getSlotRecipe(e):{});return t.sva(structuredClone(s))},[e,r,t])}exports.useSlotRecipe=n;
|
|
2
|
+
//# sourceMappingURL=use-slot-recipe-BEyHP-Lh.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-slot-recipe-
|
|
1
|
+
{"version":3,"file":"use-slot-recipe-BEyHP-Lh.js","sources":["../../node_modules/@chakra-ui/react/dist/esm/styled-system/use-slot-recipe.js"],"sourcesContent":["\"use strict\";\n\"use client\";\nimport { useMemo } from 'react';\nimport { useChakraContext } from './provider.js';\n\nfunction useSlotRecipe(options) {\n const { key, recipe: recipeProp } = options;\n const sys = useChakraContext();\n return useMemo(() => {\n const recipe = recipeProp || (key != null ? sys.getSlotRecipe(key) : {});\n return sys.sva(structuredClone(recipe));\n }, [key, recipeProp, sys]);\n}\n\nexport { useSlotRecipe };\n"],"names":["useSlotRecipe","options","key","recipeProp","sys","useChakraContext","useMemo","recipe"],"mappings":"yEAKA,SAASA,EAAcC,EAAS,CAC9B,KAAM,CAAE,IAAAC,EAAK,OAAQC,CAAY,EAAGF,EAC9BG,EAAMC,EAAAA,iBAAkB,EAC9B,OAAOC,EAAO,QAAC,IAAM,CACnB,MAAMC,EAASJ,IAAeD,GAAO,KAAOE,EAAI,cAAcF,CAAG,EAAI,IACrE,OAAOE,EAAI,IAAI,gBAAgBG,CAAM,CAAC,CACvC,EAAE,CAACL,EAAKC,EAAYC,CAAG,CAAC,CAC3B","x_google_ignoreList":[0]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useMemo as u } from "react";
|
|
2
|
-
import { u as c } from "./factory-
|
|
2
|
+
import { u as c } from "./factory-D_LOlWjz.js";
|
|
3
3
|
function i(o) {
|
|
4
4
|
const { key: e, recipe: t } = o, r = c();
|
|
5
5
|
return u(() => {
|
|
@@ -10,4 +10,4 @@ function i(o) {
|
|
|
10
10
|
export {
|
|
11
11
|
i as u
|
|
12
12
|
};
|
|
13
|
-
//# sourceMappingURL=use-slot-recipe-
|
|
13
|
+
//# sourceMappingURL=use-slot-recipe-CB5G_UZD.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-slot-recipe-
|
|
1
|
+
{"version":3,"file":"use-slot-recipe-CB5G_UZD.js","sources":["../../node_modules/@chakra-ui/react/dist/esm/styled-system/use-slot-recipe.js"],"sourcesContent":["\"use strict\";\n\"use client\";\nimport { useMemo } from 'react';\nimport { useChakraContext } from './provider.js';\n\nfunction useSlotRecipe(options) {\n const { key, recipe: recipeProp } = options;\n const sys = useChakraContext();\n return useMemo(() => {\n const recipe = recipeProp || (key != null ? sys.getSlotRecipe(key) : {});\n return sys.sva(structuredClone(recipe));\n }, [key, recipeProp, sys]);\n}\n\nexport { useSlotRecipe };\n"],"names":["useSlotRecipe","options","key","recipeProp","sys","useChakraContext","useMemo","recipe"],"mappings":";;AAKA,SAASA,EAAcC,GAAS;AAC9B,QAAM,EAAE,KAAAC,GAAK,QAAQC,EAAY,IAAGF,GAC9BG,IAAMC,EAAkB;AAC9B,SAAOC,EAAQ,MAAM;AACnB,UAAMC,IAASJ,MAAeD,KAAO,OAAOE,EAAI,cAAcF,CAAG,IAAI;AACrE,WAAOE,EAAI,IAAI,gBAAgBG,CAAM,CAAC;AAAA,EACvC,GAAE,CAACL,GAAKC,GAAYC,CAAG,CAAC;AAC3B;","x_google_ignoreList":[0]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { j as o } from "./jsx-runtime-C5mzlN2N.js";
|
|
2
2
|
import { forwardRef as n } from "react";
|
|
3
|
-
import { S as a } from "./stack-
|
|
3
|
+
import { S as a } from "./stack-DCiVNls4.js";
|
|
4
4
|
const s = n(
|
|
5
5
|
function(r, t) {
|
|
6
6
|
return /* @__PURE__ */ o.jsx(a, { align: "center", ...r, direction: "column", ref: t });
|
|
@@ -9,4 +9,4 @@ const s = n(
|
|
|
9
9
|
export {
|
|
10
10
|
s as V
|
|
11
11
|
};
|
|
12
|
-
//# sourceMappingURL=v-stack-
|
|
12
|
+
//# sourceMappingURL=v-stack-DOm7QQkt.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"v-stack-
|
|
1
|
+
{"version":3,"file":"v-stack-DOm7QQkt.js","sources":["../../node_modules/@chakra-ui/react/dist/esm/components/stack/v-stack.js"],"sourcesContent":["\"use strict\";\n\"use client\";\nimport { jsx } from 'react/jsx-runtime';\nimport { forwardRef } from 'react';\nimport { Stack } from './stack.js';\n\nconst VStack = forwardRef(\n function VStack2(props, ref) {\n return /* @__PURE__ */ jsx(Stack, { align: \"center\", ...props, direction: \"column\", ref });\n }\n);\n\nexport { VStack };\n"],"names":["VStack","forwardRef","props","ref","jsx","Stack"],"mappings":";;;AAMK,MAACA,IAASC;AAAA,EACb,SAAiBC,GAAOC,GAAK;AAC3B,WAAuBC,gBAAAA,EAAG,IAACC,GAAO,EAAE,OAAO,UAAU,GAAGH,GAAO,WAAW,UAAU,KAAAC,GAAK;AAAA,EAC7F;AACA;","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";const e=require("./jsx-runtime-BjDatQAs.js"),r=require("react"),n=require("./stack-CJxtLLO5.js"),s=r.forwardRef(function(t,c){return e.jsxRuntimeExports.jsx(n.Stack,{align:"center",...t,direction:"column",ref:c})});exports.VStack=s;
|
|
2
|
+
//# sourceMappingURL=v-stack-wxICnH9w.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"v-stack-
|
|
1
|
+
{"version":3,"file":"v-stack-wxICnH9w.js","sources":["../../node_modules/@chakra-ui/react/dist/esm/components/stack/v-stack.js"],"sourcesContent":["\"use strict\";\n\"use client\";\nimport { jsx } from 'react/jsx-runtime';\nimport { forwardRef } from 'react';\nimport { Stack } from './stack.js';\n\nconst VStack = forwardRef(\n function VStack2(props, ref) {\n return /* @__PURE__ */ jsx(Stack, { align: \"center\", ...props, direction: \"column\", ref });\n }\n);\n\nexport { VStack };\n"],"names":["VStack","forwardRef","props","ref","jsx","Stack"],"mappings":"8GAMMA,EAASC,EAAU,WACvB,SAAiBC,EAAOC,EAAK,CAC3B,OAAuBC,EAAG,kBAAA,IAACC,QAAO,CAAE,MAAO,SAAU,GAAGH,EAAO,UAAW,SAAU,IAAAC,EAAK,CAC7F,CACA","x_google_ignoreList":[0]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";const O=require("./factory-
|
|
2
|
-
//# sourceMappingURL=walk-object-
|
|
1
|
+
"use strict";const O=require("./factory-DiRBd_Ei.js"),m=t=>t!=null;function A(t,r,c={}){const{stop:a,getKey:k}=c;function i(n,e=[]){if(O.isObject(n)||Array.isArray(n)){const s={};for(const[u,o]of Object.entries(n)){const f=k?.(u,o)??u,l=[...e,f];if(a?.(n,l))return r(n,e);const y=i(o,l);m(y)&&(s[f]=y)}return s}return r(n,e)}return i(t)}function p(t,r){return Array.isArray(t)?t.map(c=>r(c)):O.isObject(t)?A(t,c=>r(c)):t!=null?r(t):t}exports.mapObject=p;exports.walkObject=A;
|
|
2
|
+
//# sourceMappingURL=walk-object-EkQnf0pF.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"walk-object-
|
|
1
|
+
{"version":3,"file":"walk-object-EkQnf0pF.js","sources":["../../node_modules/@chakra-ui/react/dist/esm/utils/walk-object.js"],"sourcesContent":["\"use strict\";\nimport { isObject } from './is.js';\n\nconst isNotNullish = (element) => element != null;\nfunction walkObject(target, predicate, options = {}) {\n const { stop, getKey } = options;\n function inner(value, path = []) {\n if (isObject(value) || Array.isArray(value)) {\n const result = {};\n for (const [prop, child] of Object.entries(value)) {\n const key = getKey?.(prop, child) ?? prop;\n const childPath = [...path, key];\n if (stop?.(value, childPath)) {\n return predicate(value, path);\n }\n const next = inner(child, childPath);\n if (isNotNullish(next)) {\n result[key] = next;\n }\n }\n return result;\n }\n return predicate(value, path);\n }\n return inner(target);\n}\nfunction mapObject(obj, fn) {\n if (Array.isArray(obj)) return obj.map((value) => fn(value));\n if (!isObject(obj)) {\n if (obj !== null && obj !== void 0) return fn(obj);\n else return obj;\n }\n return walkObject(obj, (value) => fn(value));\n}\n\nexport { mapObject, walkObject };\n"],"names":["isNotNullish","element","walkObject","target","predicate","options","stop","getKey","inner","value","path","isObject","result","prop","child","key","childPath","next","mapObject","obj","fn"],"mappings":"sDAGMA,EAAgBC,GAAYA,GAAW,KAC7C,SAASC,EAAWC,EAAQC,EAAWC,EAAU,CAAA,EAAI,CACnD,KAAM,CAAE,KAAAC,EAAM,OAAAC,CAAM,EAAKF,EACzB,SAASG,EAAMC,EAAOC,EAAO,GAAI,CAC/B,GAAIC,EAAAA,SAASF,CAAK,GAAK,MAAM,QAAQA,CAAK,EAAG,CAC3C,MAAMG,EAAS,CAAE,EACjB,SAAW,CAACC,EAAMC,CAAK,IAAK,OAAO,QAAQL,CAAK,EAAG,CACjD,MAAMM,EAAMR,IAASM,EAAMC,CAAK,GAAKD,EAC/BG,EAAY,CAAC,GAAGN,EAAMK,CAAG,EAC/B,GAAIT,IAAOG,EAAOO,CAAS,EACzB,OAAOZ,EAAUK,EAAOC,CAAI,EAE9B,MAAMO,EAAOT,EAAMM,EAAOE,CAAS,EAC/BhB,EAAaiB,CAAI,IACnBL,EAAOG,CAAG,EAAIE,EAExB,CACM,OAAOL,CACb,CACI,OAAOR,EAAUK,EAAOC,CAAI,CAChC,CACE,OAAOF,EAAML,CAAM,CACrB,CACA,SAASe,EAAUC,EAAKC,EAAI,CAC1B,OAAI,MAAM,QAAQD,CAAG,EAAUA,EAAI,IAAKV,GAAUW,EAAGX,CAAK,CAAC,EACtDE,EAAAA,SAASQ,CAAG,EAIVjB,EAAWiB,EAAMV,GAAUW,EAAGX,CAAK,CAAC,EAHrCU,GAAQ,KAA+BC,EAAGD,CAAG,EACrCA,CAGhB","x_google_ignoreList":[0]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as m } from "./factory-
|
|
1
|
+
import { i as m } from "./factory-D_LOlWjz.js";
|
|
2
2
|
const O = (r) => r != null;
|
|
3
3
|
function a(r, t, i = {}) {
|
|
4
4
|
const { stop: p, getKey: A } = i;
|
|
@@ -25,4 +25,4 @@ export {
|
|
|
25
25
|
h as m,
|
|
26
26
|
a as w
|
|
27
27
|
};
|
|
28
|
-
//# sourceMappingURL=walk-object-
|
|
28
|
+
//# sourceMappingURL=walk-object-FYEyC1q9.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"walk-object-
|
|
1
|
+
{"version":3,"file":"walk-object-FYEyC1q9.js","sources":["../../node_modules/@chakra-ui/react/dist/esm/utils/walk-object.js"],"sourcesContent":["\"use strict\";\nimport { isObject } from './is.js';\n\nconst isNotNullish = (element) => element != null;\nfunction walkObject(target, predicate, options = {}) {\n const { stop, getKey } = options;\n function inner(value, path = []) {\n if (isObject(value) || Array.isArray(value)) {\n const result = {};\n for (const [prop, child] of Object.entries(value)) {\n const key = getKey?.(prop, child) ?? prop;\n const childPath = [...path, key];\n if (stop?.(value, childPath)) {\n return predicate(value, path);\n }\n const next = inner(child, childPath);\n if (isNotNullish(next)) {\n result[key] = next;\n }\n }\n return result;\n }\n return predicate(value, path);\n }\n return inner(target);\n}\nfunction mapObject(obj, fn) {\n if (Array.isArray(obj)) return obj.map((value) => fn(value));\n if (!isObject(obj)) {\n if (obj !== null && obj !== void 0) return fn(obj);\n else return obj;\n }\n return walkObject(obj, (value) => fn(value));\n}\n\nexport { mapObject, walkObject };\n"],"names":["isNotNullish","element","walkObject","target","predicate","options","stop","getKey","inner","value","path","isObject","result","prop","child","key","childPath","next","mapObject","obj","fn"],"mappings":";AAGA,MAAMA,IAAe,CAACC,MAAYA,KAAW;AAC7C,SAASC,EAAWC,GAAQC,GAAWC,IAAU,CAAA,GAAI;AACnD,QAAM,EAAE,MAAAC,GAAM,QAAAC,EAAM,IAAKF;AACzB,WAASG,EAAMC,GAAOC,IAAO,IAAI;AAC/B,QAAIC,EAASF,CAAK,KAAK,MAAM,QAAQA,CAAK,GAAG;AAC3C,YAAMG,IAAS,CAAE;AACjB,iBAAW,CAACC,GAAMC,CAAK,KAAK,OAAO,QAAQL,CAAK,GAAG;AACjD,cAAMM,IAAMR,IAASM,GAAMC,CAAK,KAAKD,GAC/BG,IAAY,CAAC,GAAGN,GAAMK,CAAG;AAC/B,YAAIT,IAAOG,GAAOO,CAAS;AACzB,iBAAOZ,EAAUK,GAAOC,CAAI;AAE9B,cAAMO,IAAOT,EAAMM,GAAOE,CAAS;AACnC,QAAIhB,EAAaiB,CAAI,MACnBL,EAAOG,CAAG,IAAIE;AAAA,MAExB;AACM,aAAOL;AAAA,IACb;AACI,WAAOR,EAAUK,GAAOC,CAAI;AAAA,EAChC;AACE,SAAOF,EAAML,CAAM;AACrB;AACA,SAASe,EAAUC,GAAKC,GAAI;AAC1B,SAAI,MAAM,QAAQD,CAAG,IAAUA,EAAI,IAAI,CAACV,MAAUW,EAAGX,CAAK,CAAC,IACtDE,EAASQ,CAAG,IAIVjB,EAAWiB,GAAK,CAACV,MAAUW,EAAGX,CAAK,CAAC,IAHrCU,KAAQ,OAA+BC,EAAGD,CAAG,IACrCA;AAGhB;","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";const i=require("./jsx-runtime-BjDatQAs.js"),Z=require("./text.component-CjHMwskV.js"),h=require("./typography.records-DZdHSCkY.js"),G=require("./icon.component-Bak20DHK.js"),M=require("./flex-BpxJvA4z.js"),o=require("react"),T=require("./factory-DiRBd_Ei.js"),J=require("./create-slot-recipe-context-CgQA10Yw.js"),K=require("./create-recipe-context-Bim5jFE2.js"),P=require("./use-field-context--wBJQY1R.js"),F=require("./use-locale-context-BdqHZ8L8.js"),l=require("./index-CZ42b9rT.js");function Q(e){if(e&&e.__esModule)return e;const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const s in e)if(s!=="default"){const t=Object.getOwnPropertyDescriptor(e,s);Object.defineProperty(r,s,t.get?t:{enumerable:!0,get:()=>e[s]})}}return r.default=e,Object.freeze(r)}const U=Q(o),k=o.forwardRef((e,r)=>{const s=P.useFieldContext(),t=l.mergeProps(s.getErrorTextProps(),e);return s?.invalid?i.jsxRuntimeExports.jsx(F.ark.span,{...t,ref:r}):null});k.displayName="FieldErrorText";const H=o.forwardRef((e,r)=>{const s=P.useFieldContext(),t=l.mergeProps(s?.getHelperTextProps(),e);return i.jsxRuntimeExports.jsx(F.ark.span,{...t,ref:r})});H.displayName="FieldHelperText";const L=o.forwardRef((e,r)=>{const s=P.useFieldContext(),t=l.mergeProps(s?.getLabelProps(),e);return i.jsxRuntimeExports.jsx(F.ark.label,{...t,ref:r})});L.displayName="FieldLabel";const V=typeof window<"u"?o.useLayoutEffect:o.useEffect,[pe,X]=F.createContext({name:"FieldsetContext",hookName:"useFieldsetContext",providerName:"<FieldsetProvider />",strict:!1}),Y=(e={})=>{const r=X(),{ids:s,disabled:t=!!r?.disabled,invalid:a=!1,readOnly:n=!1,required:d=!1}=e,[c,g]=o.useState(!1),[b,y]=o.useState(!1),u=e.id??o.useId(),p=o.useRef(null),C=s?.control??`field::${u}`,x=s?.errorText??`field::${u}::error-text`,m=s?.helperText??`field::${u}::helper-text`,R=s?.label??`field::${u}::label`;V(()=>{const j=p.current;if(!j)return;const _=l.getWindow(j),q=_.document,A=()=>{g(!!q.getElementById(x)),y(!!q.getElementById(m))};A();const S=new _.MutationObserver(A);return S.observe(j,{childList:!0,subtree:!0}),()=>S.disconnect()},[x,m]);const E=o.useMemo(()=>{const j=[];return c&&a&&j.push(x),b&&j.push(m),j.join(" ")||void 0},[a,x,m,c,b]),w=o.useMemo(()=>()=>({...h.parts.root.attrs,id:C,ref:p,role:"group","data-disabled":l.dataAttr(t),"data-invalid":l.dataAttr(a),"data-readonly":l.dataAttr(n)}),[t,a,n,C]),N=o.useMemo(()=>()=>({...h.parts.label.attrs,id:R,"data-disabled":l.dataAttr(t),"data-invalid":l.dataAttr(a),"data-readonly":l.dataAttr(n),htmlFor:u}),[t,a,n,u,R]),f=o.useMemo(()=>()=>({"aria-describedby":E,"aria-invalid":l.ariaAttr(a),"data-invalid":l.dataAttr(a),"data-required":l.dataAttr(d),"data-readonly":l.dataAttr(n),id:u,required:d,disabled:t,readOnly:n}),[E,a,d,n,u,t]),v=o.useMemo(()=>()=>({...f(),...h.parts.input.attrs}),[f]),$=o.useMemo(()=>()=>({...f(),...h.parts.textarea.attrs}),[f]),z=o.useMemo(()=>()=>({...f(),...h.parts.select.attrs}),[f]),B=o.useMemo(()=>()=>({id:m,...h.parts.helperText.attrs,"data-disabled":l.dataAttr(t)}),[t,m]),D=o.useMemo(()=>()=>({id:x,...h.parts.errorText.attrs,"aria-live":"polite"}),[x]),W=o.useMemo(()=>()=>({"aria-hidden":!0,...h.parts.requiredIndicator.attrs}),[]);return{ariaDescribedby:E,ids:{root:C,control:u,label:R,errorText:x,helperText:m},refs:{rootRef:p},disabled:t,invalid:a,readOnly:n,required:d,getLabelProps:N,getRootProps:w,getInputProps:v,getTextareaProps:$,getSelectProps:z,getHelperTextProps:B,getErrorTextProps:D,getRequiredIndicatorProps:W}},O=o.forwardRef((e,r)=>{const[s,t]=F.createSplitProps()(e,["id","ids","disabled","invalid","readOnly","required"]),a=Y(s),n=l.mergeProps(a.getRootProps(),t);return i.jsxRuntimeExports.jsx(P.FieldProvider,{value:a,children:i.jsxRuntimeExports.jsx(F.ark.div,{...n,ref:F.composeRefs(r,a.refs.rootRef)})})});O.displayName="FieldRoot";const{useRecipeResult:ee}=K.createRecipeContext({key:"icon"}),te=U.forwardRef(function(r,s){const{styles:t,className:a,props:n}=ee({asChild:!r.as,...r});return i.jsxRuntimeExports.jsx(T.chakra.svg,{ref:s,focusable:!1,"aria-hidden":"true",...n,css:[t,r.css],className:T.cx(a,r.className)})});function re(e){const{viewBox:r="0 0 24 24",d:s,displayName:t,defaultProps:a={}}=e,n=o.Children.toArray(e.path),d=o.forwardRef((c,g)=>i.jsxRuntimeExports.jsx(te,{ref:g,asChild:!1,viewBox:r,...a,...c,children:n.length?n:i.jsxRuntimeExports.jsx("path",{fill:"currentColor",d:s})}));return d.displayName=t,d}const{withProvider:se,withContext:I,useStyles:oe,useClassNames:ae}=J.createSlotRecipeContext({key:"field"}),ne=se(O,"root",{forwardAsChild:!0}),ie=I(L,"label",{forwardAsChild:!0}),le=I(H,"helperText",{forwardAsChild:!0}),de=I(k,"errorText",{forwardAsChild:!0});re({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"});const ce=o.forwardRef(function(r,s){const{fallback:t,children:a="*",...n}=r,d=P.useFieldContext(),c=ae(),g=oe();return d?.required?i.jsxRuntimeExports.jsx(T.chakra.span,{ref:s,"aria-hidden":"true",...n,className:T.cx(c.requiredIndicator,r.className),css:[g.requiredIndicator,r.css],children:a}):t}),ue={sm:10,md:12,lg:14},xe=e=>{const r=({disabled:s=!1,errorText:t="Field is invalid",formControlStyle:a,helperText:n,inlineField:d=!1,invalid:c=!1,invalidIconColor:g="warning",label:b,labelPosition:y="start",labelStyle:u,onContrast:p=!1,readOnly:C=!1,required:x=!1,showRequiredElement:m=!1,size:R="md",useInvalidIcon:E=!1,useInvalidText:w=!0,...N})=>{const f=i.jsxRuntimeExports.jsxs(ie,{className:"FormControl__Label",color:p?"text.contrast":"text",fontSize:h.fontSizes[R],...u,onClick:v=>{v.stopPropagation()},children:[b,m&&i.jsxRuntimeExports.jsx(ce,{className:"FormControl__RequiredIndicator",color:p?"text.danger.contrast":"text.danger",...!x&&{fallback:i.jsxRuntimeExports.jsxs(Z.WrappedText,{variant:p?"subtleOnContrast":"subtle",fontSize:ue[R],children:[" ","(Optional)"]})}})]});return i.jsxRuntimeExports.jsxs(ne,{className:"FormControl group",disabled:s,invalid:c,readOnly:C,required:x,width:"auto",...a,children:[i.jsxRuntimeExports.jsxs(M.Flex,{className:"FormControl__Container",flexDirection:d?"row":"column",w:d?"max-content":"100%",gap:2,children:[b&&y==="start"&&f,i.jsxRuntimeExports.jsxs(M.Flex,{className:"FormControl__Content",alignItems:"center",gap:2,w:d?"max-content":"100%",children:[i.jsxRuntimeExports.jsx(e,{disabled:s,invalid:c,onContrast:p,readOnly:C,required:x,size:R,...N}),E&&c&&i.jsxRuntimeExports.jsx(G.Icon,{className:"FormControl__InvalidIcon",name:"warningSign",variant:g,size:R})]}),b&&y==="end"&&f]}),w&&c&&i.jsxRuntimeExports.jsx(de,{className:"FormControl__ErrorText",fontSize:"xs",color:p?"text.danger.contrast":"text.danger",children:t}),n&&i.jsxRuntimeExports.jsx(le,{className:"FormControl__HelperText",fontSize:"xs",color:p?"text.subtle.contrast":"text.subtle",children:n})]})};return r.displayName=`withFormControl(${e.displayName||e.name}`,r};exports.withFormControl=xe;
|
|
2
|
+
//# sourceMappingURL=withFormControl-BHuqR52U.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"withFormControl-CUnCiP8H.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 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 showRequiredElement?: 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 helperText,\n inlineField = false,\n invalid = false,\n invalidIconColor = \"warning\",\n label,\n labelPosition = \"start\",\n labelStyle,\n onContrast = false,\n readOnly = false,\n required = false,\n showRequiredElement = 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 {showRequiredElement && (\n <Field.RequiredIndicator\n className=\"FormControl__RequiredIndicator\"\n color={onContrast ? \"text.danger.contrast\" : \"text.danger\"}\n {...(!required && {\n fallback: (\n <Text\n variant={onContrast ? \"subtleOnContrast\" : \"subtle\"}\n fontSize={optionalTextSizeMap[size]}\n >\n {\" \"}\n (Optional)\n </Text>\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=\"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 WithFormControl.displayName = `withFormControl(${Component.displayName || Component.name}`;\n\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","helperText","inlineField","invalidIconColor","label","labelPosition","labelStyle","onContrast","showRequiredElement","size","useIn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AA,CACC,UAAU,oBACV,SAAAnE,EACA,QAAAC,EACA,SAAAC,EACA,SAAAC,EACA,MAAM,OACL,GAAG8E,EAEJ,SAAA,CAAAa,EAAA,kBAAA,KAACK,EAAA,KAAA,CACC,UAAU,yBACV,cAAehB,EAAc,MAAQ,SACrC,EAAGA,EAAc,cAAgB,OACjC,IAAK,EAEJ,SAAA,CAAAE,GAASC,IAAkB,SAAWO,EACvCC,EAAA,kBAAA,KAACK,EAAA,KAAA,CACC,UAAU,uBACV,WAAW,SACX,IAAK,EACL,EAAGhB,EAAc,cAAgB,OAEjC,SAAA,CAAAhG,EAAA,kBAAA,IAAC2F,EAAA,CACC,SAAA9E,EACA,QAAAC,EACA,WAAAuF,EACA,SAAAtF,EACA,SAAAC,EACA,KAAAuF,EACC,GAAI7G,CAAA,CACP,EACC8G,GAAkB1F,GACjBd,EAAA,kBAAA,IAAC2D,EAAA,KAAA,CACC,UAAU,2BACV,KAAK,cACL,QAASsC,EACT,KAAAM,CAAA,CAAA,CACF,CAAA,CAEJ,EACCL,GAASC,IAAkB,OAASO,CAAA,CAAA,CACvC,EACCD,GAAkB3F,GACjBd,EAAA,kBAAA,IAACmF,GAAA,CACC,UAAU,yBACV,SAAS,KACT,MAAOkB,EAAa,uBAAyB,cAE5C,SAAAR,CAAA,CACH,EAEDE,GACC/F,EAAA,kBAAA,IAACkF,GAAA,CACC,UAAU,0BACV,SAAS,KACT,MAAOmB,EAAa,uBAAyB,cAE5C,SAAAN,CAAA,CAAA,CACH,CAAA,CAEJ,CAEJ,EACA,OAAAH,EAAgB,YAAc,mBAAmBD,EAAU,aAAeA,EAAU,IAAI,GAEjFC,CACT","x_google_ignoreList":[0,1,2,3,4,5,6,7,8,9]}
|
|
1
|
+
{"version":3,"file":"withFormControl-BHuqR52U.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 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 showRequiredElement?: 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 helperText,\n inlineField = false,\n invalid = false,\n invalidIconColor = \"warning\",\n label,\n labelPosition = \"start\",\n labelStyle,\n onContrast = false,\n readOnly = false,\n required = false,\n showRequiredElement = 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 {showRequiredElement && (\n <Field.RequiredIndicator\n className=\"FormControl__RequiredIndicator\"\n color={onContrast ? \"text.danger.contrast\" : \"text.danger\"}\n {...(!required && {\n fallback: (\n <Text\n variant={onContrast ? \"subtleOnContrast\" : \"subtle\"}\n fontSize={optionalTextSizeMap[size]}\n >\n {\" \"}\n (Optional)\n </Text>\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=\"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 WithFormControl.displayName = `withFormControl(${Component.displayName || Component.name}`;\n\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","helperText","inlineField","invalidIconColor","label","labelPosition","labelStyle","onContrast","showRequiredElement","size","useInvalidIcon","useInvalidText","labelComponent","jsxs","fontSizes","e","Field.RequiredIndicator","Text","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,k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kB,SAAWO,EACvCC,EAAA,kBAAA,KAACK,EAAA,KAAA,CACC,UAAU,uBACV,WAAW,SACX,IAAK,EACL,EAAGhB,EAAc,cAAgB,OAEjC,SAAA,CAAAhG,EAAA,kBAAA,IAAC2F,EAAA,CACC,SAAA9E,EACA,QAAAC,EACA,WAAAuF,EACA,SAAAtF,EACA,SAAAC,EACA,KAAAuF,EACC,GAAI7G,CAAA,CACP,EACC8G,GAAkB1F,GACjBd,EAAA,kBAAA,IAAC2D,EAAA,KAAA,CACC,UAAU,2BACV,KAAK,cACL,QAASsC,EACT,KAAAM,CAAA,CAAA,CACF,CAAA,CAEJ,EACCL,GAASC,IAAkB,OAASO,CAAA,CAAA,CACvC,EACCD,GAAkB3F,GACjBd,EAAA,kBAAA,IAACmF,GAAA,CACC,UAAU,yBACV,SAAS,KACT,MAAOkB,EAAa,uBAAyB,cAE5C,SAAAR,CAAA,CACH,EAEDE,GACC/F,EAAA,kBAAA,IAACkF,GAAA,CACC,UAAU,0BACV,SAAS,KACT,MAAOmB,EAAa,uBAAyB,cAE5C,SAAAN,CAAA,CAAA,CACH,CAAA,CAEJ,CAEJ,EACA,OAAAH,EAAgB,YAAc,mBAAmBD,EAAU,aAAeA,EAAU,IAAI,GAEjFC,CACT","x_google_ignoreList":[0,1,2,3,4,5,6,7,8,9]}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { j as l } from "./jsx-runtime-C5mzlN2N.js";
|
|
2
|
-
import { W as K } from "./text.component-
|
|
2
|
+
import { W as K } from "./text.component-DCAWfY65.js";
|
|
3
3
|
import { p as g, f as Q } from "./typography.records-DA6XZIsX.js";
|
|
4
|
-
import { I as V } from "./icon.component-
|
|
5
|
-
import { F as k } from "./flex-
|
|
4
|
+
import { I as V } from "./icon.component-2UIkFQec.js";
|
|
5
|
+
import { F as k } from "./flex-9MBe_Izs.js";
|
|
6
6
|
import * as X from "react";
|
|
7
7
|
import { forwardRef as P, useLayoutEffect as Y, useEffect as ee, useState as q, useId as te, useRef as re, useMemo as m, Children as se } from "react";
|
|
8
|
-
import { c as L, b as M } from "./factory-
|
|
9
|
-
import { c as oe } from "./create-slot-recipe-context-
|
|
10
|
-
import { c as ae } from "./create-recipe-context-
|
|
8
|
+
import { c as L, b as M } from "./factory-D_LOlWjz.js";
|
|
9
|
+
import { c as oe } from "./create-slot-recipe-context-CGmjOuOh.js";
|
|
10
|
+
import { c as ae } from "./create-recipe-context-CA3qYjga.js";
|
|
11
11
|
import { u as v, F as le } from "./use-field-context-B8ygn96q.js";
|
|
12
12
|
import { f as I, a as ne, b as ie, h as de } from "./use-locale-context-zakBNK5b.js";
|
|
13
13
|
import { U as w, _ as ce, e as u, u as fe } from "./index-DLvqBeH6.js";
|
|
@@ -372,4 +372,4 @@ const ve = P(function(t, r) {
|
|
|
372
372
|
export {
|
|
373
373
|
Be as w
|
|
374
374
|
};
|
|
375
|
-
//# sourceMappingURL=withFormControl-
|
|
375
|
+
//# sourceMappingURL=withFormControl-D7wJfVjb.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"withFormControl-DoBnTeb9.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 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 showRequiredElement?: 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 helperText,\n inlineField = false,\n invalid = false,\n invalidIconColor = \"warning\",\n label,\n labelPosition = \"start\",\n labelStyle,\n onContrast = false,\n readOnly = false,\n required = false,\n showRequiredElement = 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 {showRequiredElement && (\n <Field.RequiredIndicator\n className=\"FormControl__RequiredIndicator\"\n color={onContrast ? \"text.danger.contrast\" : \"text.danger\"}\n {...(!required && {\n fallback: (\n <Text\n variant={onContrast ? \"subtleOnContrast\" : \"subtle\"}\n fontSize={optionalTextSizeMap[size]}\n >\n {\" \"}\n (Optional)\n </Text>\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=\"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 WithFormControl.displayName = `withFormControl(${Component.displayName || Component.name}`;\n\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","helperText","inlineField","invalidIconColor","label","labelPosition","labelStyle","onContrast","showRequiredElement","size","useInvalidIcon","useInvalidText","labelComponent","jsxs","fontSizes","e","Field.RequiredIndicator","Text","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,IA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AA,sBAAA;AAAA,oBACF;AAAA,kBAAA;AAAA,gBAEJ;AAAA,gBACCL,KAASC,MAAkB,SAASO;AAAA,cAAA;AAAA,YAAA;AAAA,UACvC;AAAA,UACCD,KAAkB3F,KACjBd,gBAAAA,EAAA;AAAA,YAACmF;AAAAA,YAAA;AAAA,cACC,WAAU;AAAA,cACV,UAAS;AAAA,cACT,OAAOkB,IAAa,yBAAyB;AAAA,cAE5C,UAAAR;AAAA,YAAA;AAAA,UACH;AAAA,UAEDE,KACC/F,gBAAAA,EAAA;AAAA,YAACkF;AAAAA,YAAA;AAAA,cACC,WAAU;AAAA,cACV,UAAS;AAAA,cACT,OAAOmB,IAAa,yBAAyB;AAAA,cAE5C,UAAAN;AAAA,YAAA;AAAA,UAAA;AAAA,QACH;AAAA,MAAA;AAAA,IAEJ;AAAA,EAEJ;AACA,SAAAH,EAAgB,cAAc,mBAAmBD,EAAU,eAAeA,EAAU,IAAI,IAEjFC;AACT;","x_google_ignoreList":[0,1,2,3,4,5,6,7,8,9]}
|
|
1
|
+
{"version":3,"file":"withFormControl-D7wJfVjb.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 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 showRequiredElement?: 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 helperText,\n inlineField = false,\n invalid = false,\n invalidIconColor = \"warning\",\n label,\n labelPosition = \"start\",\n labelStyle,\n onContrast = false,\n readOnly = false,\n required = false,\n showRequiredElement = 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 {showRequiredElement && (\n <Field.RequiredIndicator\n className=\"FormControl__RequiredIndicator\"\n color={onContrast ? \"text.danger.contrast\" : \"text.danger\"}\n {...(!required && {\n fallback: (\n <Text\n variant={onContrast ? \"subtleOnContrast\" : \"subtle\"}\n fontSize={optionalTextSizeMap[size]}\n >\n {\" \"}\n (Optional)\n </Text>\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=\"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 WithFormControl.displayName = `withFormControl(${Component.displayName || Component.name}`;\n\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","helperText","inlineField","invalidIconColor","label","labelPosition","labelStyle","onContrast","showRequiredElement","size","useInvalidIcon","useInvalidText","labelComponent","jsxs","fontSizes","e","Field.RequiredIndicator","Text","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,EA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AA;AAAA,oBACF;AAAA,kBAAA;AAAA,gBAEJ;AAAA,gBACCL,KAASC,MAAkB,SAASO;AAAA,cAAA;AAAA,YAAA;AAAA,UACvC;AAAA,UACCD,KAAkB3F,KACjBd,gBAAAA,EAAA;AAAA,YAACmF;AAAAA,YAAA;AAAA,cACC,WAAU;AAAA,cACV,UAAS;AAAA,cACT,OAAOkB,IAAa,yBAAyB;AAAA,cAE5C,UAAAR;AAAA,YAAA;AAAA,UACH;AAAA,UAEDE,KACC/F,gBAAAA,EAAA;AAAA,YAACkF;AAAAA,YAAA;AAAA,cACC,WAAU;AAAA,cACV,UAAS;AAAA,cACT,OAAOmB,IAAa,yBAAyB;AAAA,cAE5C,UAAAN;AAAA,YAAA;AAAA,UAAA;AAAA,QACH;AAAA,MAAA;AAAA,IAEJ;AAAA,EAEJ;AACA,SAAAH,EAAgB,cAAc,mBAAmBD,EAAU,eAAeA,EAAU,IAAI,IAEjFC;AACT;","x_google_ignoreList":[0,1,2,3,4,5,6,7,8,9]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { j as n } from "./jsx-runtime-C5mzlN2N.js";
|
|
2
2
|
import { memo as w, useState as T, useRef as x, useCallback as h, useEffect as k } from "react";
|
|
3
|
-
import { T as v } from "./tooltip.component-
|
|
4
|
-
import { B as g } from "./box-
|
|
3
|
+
import { T as v } from "./tooltip.component-BPbl810g.js";
|
|
4
|
+
import { B as g } from "./box-CRddum0T.js";
|
|
5
5
|
const H = (i) => {
|
|
6
6
|
const l = w(i);
|
|
7
7
|
function u({
|
|
@@ -71,4 +71,4 @@ const H = (i) => {
|
|
|
71
71
|
export {
|
|
72
72
|
H as w
|
|
73
73
|
};
|
|
74
|
-
//# sourceMappingURL=withTruncation-
|
|
74
|
+
//# sourceMappingURL=withTruncation-B9ffIwF7.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"withTruncation-
|
|
1
|
+
{"version":3,"file":"withTruncation-B9ffIwF7.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 {...(isTextOverFlowing && { cursor: \"pointer\" })}\n lineClamp={noOfLines}\n style={{\n textOverflow: \"ellipsis\",\n overflow: \"hidden\",\n wordWrap: \"break-word\",\n wordBreak: \"break-word\",\n }}\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\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,EAAA,GACsC;AACzC,UAAM,CAACC,GAAmBC,CAAoB,IAAIC,EAAkB,EAAK,GACnEC,IAAeC,EAAuB,IAAI,GAC1CC,IAAoBD,EAA8B,IAAI,GAEtDE,IAAgBC,EAAY,MAAM;AACtC,UAAIJ,EAAa,SAAS;AACxB,cAAMK,IACJL,EAAa,SAAS,SAAS,CAAC,EAAE,gBAAgB,GAC9CM,IAAwBN,EAAa,SAAS,gBAAgB;AACpE,QAAAF,EAAqBO,IAAmBC,CAAqB;AAAA,MAAA;AAAA,IAEjE,GAAG,EAAE;AA2BL,WAzBAC,EAAU,MAAM;AACV,UAAAf,KAAaQ,EAAa,SAAS;AACj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AU,IAAI,IAE/EE,EAAKC,CAAc;AAC5B;"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";const i=require("./jsx-runtime-
|
|
2
|
-
//# sourceMappingURL=withTruncation-
|
|
1
|
+
"use strict";const i=require("./jsx-runtime-BjDatQAs.js"),e=require("react"),p=require("./tooltip.component-JCzaFEUu.js"),T=require("./box-CqeORXNj.js"),h=o=>{const u=e.memo(o);function d({truncated:s=!1,noOfLines:w=1,children:c,tooltipProps:x,...f}){const[m,b]=e.useState(!1),t=e.useRef(null),n=e.useRef(null),a=e.useCallback(()=>{if(t.current){const r=t.current?.children[0].scrollHeight||0,l=t.current?.offsetHeight||0;b(r>l)}},[]);return e.useEffect(()=>{if(s&&t.current){let r;const l=()=>{window.clearTimeout(r),r=window.setTimeout(a,100)};return n.current=new ResizeObserver(()=>{l()}),n.current.observe(t.current),a(),()=>{window.clearTimeout(r),n.current&&n.current.disconnect()}}},[s,a]),s?i.jsxRuntimeExports.jsx(p.Tooltip,{...x,label:x?.label||c?.toLocaleString()||"",disabled:!m,"data-testid":"kibble-truncated-text-tooltip",children:i.jsxRuntimeExports.jsx(T.Box,{ref:t,display:"inline-block",position:"relative",className:"TruncatedText__Wrapper","data-testid":"kibble-truncated-text-wrapper",children:i.jsxRuntimeExports.jsx(u,{className:"TruncatedText__TextContent","data-testid":"kibble-truncated-text-content",...m&&{cursor:"pointer"},lineClamp:w,style:{textOverflow:"ellipsis",overflow:"hidden",wordWrap:"break-word",wordBreak:"break-word"},...f,children:c})})}):i.jsxRuntimeExports.jsx(u,{...f,children:c})}return d.displayName=`withTruncation(${o.displayName||o.name}`,e.memo(d)};exports.withTruncation=h;
|
|
2
|
+
//# sourceMappingURL=withTruncation-D04zq8uV.js.map
|