@televet/kibble-ui 4.0.0-beta.37 → 4.0.0-beta.39
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunks/{alert.component-BT9Gn6Iw.js → alert.component-BrnaAnby.js} +31 -28
- package/dist/chunks/alert.component-BrnaAnby.js.map +1 -0
- package/dist/chunks/alert.component-D4KMig7W.js +2 -0
- package/dist/chunks/{alert.component-BPTwogSX.js.map → alert.component-D4KMig7W.js.map} +1 -1
- package/dist/chunks/{avatar.component-B0LsaXtv.js → avatar.component-Bh0DFMwE.js} +13 -13
- package/dist/chunks/{avatar.component-B0LsaXtv.js.map → avatar.component-Bh0DFMwE.js.map} +1 -1
- package/dist/chunks/{avatar.component-DLmlAmdJ.js → avatar.component-_Mqnl3-P.js} +2 -2
- package/dist/chunks/{avatar.component-DLmlAmdJ.js.map → avatar.component-_Mqnl3-P.js.map} +1 -1
- package/dist/chunks/{avatarGroup.component-DHbejH6-.js → avatarGroup.component-Bw5gczhh.js} +2 -2
- package/dist/chunks/{avatarGroup.component-DHbejH6-.js.map → avatarGroup.component-Bw5gczhh.js.map} +1 -1
- package/dist/chunks/{avatarGroup.component-DYQjXpw6.js → avatarGroup.component-oRjqOWEB.js} +2 -2
- package/dist/chunks/{avatarGroup.component-DYQjXpw6.js.map → avatarGroup.component-oRjqOWEB.js.map} +1 -1
- package/dist/chunks/box-ca2FvcWF.js +2 -0
- package/dist/chunks/{box-CqeORXNj.js.map → box-ca2FvcWF.js.map} +1 -1
- package/dist/chunks/box-y05hq0PT.js +7 -0
- package/dist/chunks/{box-CRddum0T.js.map → box-y05hq0PT.js.map} +1 -1
- package/dist/chunks/{button.component-CXYCe9wy.js → button.component-BWlRjD5a.js} +3 -3
- package/dist/chunks/{button.component-CXYCe9wy.js.map → button.component-BWlRjD5a.js.map} +1 -1
- package/dist/chunks/{button.component-Dkq2R93W.js → button.component-ytAmAAJg.js} +2 -2
- package/dist/chunks/{button.component-Dkq2R93W.js.map → button.component-ytAmAAJg.js.map} +1 -1
- package/dist/chunks/{buttonGroup.component-BLdNoPbq.js → buttonGroup.component-Bw_Wcpsd.js} +6 -6
- package/dist/chunks/{buttonGroup.component-BLdNoPbq.js.map → buttonGroup.component-Bw_Wcpsd.js.map} +1 -1
- package/dist/chunks/{buttonGroup.component-CEL4pdRB.js → buttonGroup.component-DBpnBBOa.js} +2 -2
- package/dist/chunks/{buttonGroup.component-CEL4pdRB.js.map → buttonGroup.component-DBpnBBOa.js.map} +1 -1
- package/dist/chunks/{card.component-uqvWzK_0.js → card.component-6TV04UQT.js} +2 -2
- package/dist/chunks/{card.component-uqvWzK_0.js.map → card.component-6TV04UQT.js.map} +1 -1
- package/dist/chunks/{card.component-BmmzlLYn.js → card.component-nehAyK91.js} +2 -2
- package/dist/chunks/{card.component-BmmzlLYn.js.map → card.component-nehAyK91.js.map} +1 -1
- package/dist/chunks/{characterCounter.component-CZASTylb.js → characterCounter.component-BcKXSebL.js} +2 -2
- package/dist/chunks/{characterCounter.component-CZASTylb.js.map → characterCounter.component-BcKXSebL.js.map} +1 -1
- package/dist/chunks/{characterCounter.component-Dvz2OZQP.js → characterCounter.component-Ww-ll5pL.js} +5 -5
- package/dist/chunks/{characterCounter.component-Dvz2OZQP.js.map → characterCounter.component-Ww-ll5pL.js.map} +1 -1
- package/dist/chunks/{checkbox.component-E4vMCQbq.js → checkbox.component-BTG2oHN_.js} +7 -7
- package/dist/chunks/{checkbox.component-E4vMCQbq.js.map → checkbox.component-BTG2oHN_.js.map} +1 -1
- package/dist/chunks/{checkbox.component-VWcYJiRf.js → checkbox.component-WA8Y2Cfq.js} +2 -2
- package/dist/chunks/{checkbox.component-VWcYJiRf.js.map → checkbox.component-WA8Y2Cfq.js.map} +1 -1
- package/dist/chunks/{checkbox.records-B8iY0zdQ.js → checkbox.records-ef7wOXPE.js} +2 -2
- package/dist/chunks/{checkbox.records-B8iY0zdQ.js.map → checkbox.records-ef7wOXPE.js.map} +1 -1
- package/dist/chunks/{checkbox.records-C-c1IoWp.js → checkbox.records-jwUqoHaK.js} +2 -2
- package/dist/chunks/{checkbox.records-C-c1IoWp.js.map → checkbox.records-jwUqoHaK.js.map} +1 -1
- package/dist/chunks/{checkboxGroup.component-SABwFfW_.js → checkboxGroup.component-CoUMqdnh.js} +4 -4
- package/dist/chunks/{checkboxGroup.component-SABwFfW_.js.map → checkboxGroup.component-CoUMqdnh.js.map} +1 -1
- package/dist/chunks/{checkboxGroup.component-DAtqZ54e.js → checkboxGroup.component-DMSg9Hzt.js} +2 -2
- package/dist/chunks/{checkboxGroup.component-DAtqZ54e.js.map → checkboxGroup.component-DMSg9Hzt.js.map} +1 -1
- package/dist/chunks/{config-CrnIcxSC.js → config-C4FE-eBu.js} +2 -2
- package/dist/chunks/{config-CrnIcxSC.js.map → config-C4FE-eBu.js.map} +1 -1
- package/dist/chunks/{config-fNC832hN.js → config-SdQux5od.js} +2 -2
- package/dist/chunks/{config-fNC832hN.js.map → config-SdQux5od.js.map} +1 -1
- package/dist/chunks/{conversationCard.component-D16i-VxT.js → conversationCard.component-CMudlOxC.js} +2 -2
- package/dist/chunks/{conversationCard.component-D16i-VxT.js.map → conversationCard.component-CMudlOxC.js.map} +1 -1
- package/dist/chunks/{conversationCard.component-BtiP2oUj.js → conversationCard.component-D2k7g7wc.js} +17 -17
- package/dist/chunks/{conversationCard.component-BtiP2oUj.js.map → conversationCard.component-D2k7g7wc.js.map} +1 -1
- package/dist/chunks/{create-recipe-context-CA3qYjga.js → create-recipe-context-BcvaE0iS.js} +3 -3
- package/dist/chunks/{create-recipe-context-CA3qYjga.js.map → create-recipe-context-BcvaE0iS.js.map} +1 -1
- package/dist/chunks/{create-recipe-context-Bim5jFE2.js → create-recipe-context-DdRyhQQD.js} +2 -2
- package/dist/chunks/{create-recipe-context-Bim5jFE2.js.map → create-recipe-context-DdRyhQQD.js.map} +1 -1
- package/dist/chunks/{create-slot-recipe-context-CgQA10Yw.js → create-slot-recipe-context-D-pJ8fgs.js} +2 -2
- package/dist/chunks/{create-slot-recipe-context-CgQA10Yw.js.map → create-slot-recipe-context-D-pJ8fgs.js.map} +1 -1
- package/dist/chunks/{create-slot-recipe-context-CGmjOuOh.js → create-slot-recipe-context-DJkLYvCT.js} +3 -3
- package/dist/chunks/{create-slot-recipe-context-CGmjOuOh.js.map → create-slot-recipe-context-DJkLYvCT.js.map} +1 -1
- package/dist/chunks/{datePicker.component-CgXA_g6P.js → datePicker.component-D2M6DrNP.js} +13 -13
- package/dist/chunks/{datePicker.component-CgXA_g6P.js.map → datePicker.component-D2M6DrNP.js.map} +1 -1
- package/dist/chunks/{datePicker.component-CFK8KuwT.js → datePicker.component-lUYmAZ2N.js} +2 -2
- package/dist/chunks/{datePicker.component-CFK8KuwT.js.map → datePicker.component-lUYmAZ2N.js.map} +1 -1
- package/dist/chunks/{dialog-trigger-be7-Tznq.js → dialog-trigger-C86J6PDS.js} +2 -2
- package/dist/chunks/{dialog-trigger-be7-Tznq.js.map → dialog-trigger-C86J6PDS.js.map} +1 -1
- package/dist/chunks/{dialog-trigger-B6YOjSvA.js → dialog-trigger-sGBMGLMB.js} +2 -2
- package/dist/chunks/{dialog-trigger-B6YOjSvA.js.map → dialog-trigger-sGBMGLMB.js.map} +1 -1
- package/dist/chunks/{divider.types-DwqIRd94.js → divider.types-BHqfjZmx.js} +3 -3
- package/dist/chunks/{divider.types-DwqIRd94.js.map → divider.types-BHqfjZmx.js.map} +1 -1
- package/dist/chunks/{divider.types-040bKgyZ.js → divider.types-luokl8-p.js} +2 -2
- package/dist/chunks/{divider.types-040bKgyZ.js.map → divider.types-luokl8-p.js.map} +1 -1
- package/dist/chunks/factory-CkTX_WOU.js +3 -0
- package/dist/chunks/factory-CkTX_WOU.js.map +1 -0
- package/dist/chunks/factory-gZxMesut.js +540 -0
- package/dist/chunks/factory-gZxMesut.js.map +1 -0
- package/dist/chunks/{flex-9MBe_Izs.js → flex-C2d2LH-K.js} +2 -2
- package/dist/chunks/{flex-9MBe_Izs.js.map → flex-C2d2LH-K.js.map} +1 -1
- package/dist/chunks/{flex-BpxJvA4z.js → flex-DKWxn8hO.js} +2 -2
- package/dist/chunks/{flex-BpxJvA4z.js.map → flex-DKWxn8hO.js.map} +1 -1
- package/dist/chunks/{float-D5FLe8D9.js → float-0e5piZno.js} +2 -2
- package/dist/chunks/{float-D5FLe8D9.js.map → float-0e5piZno.js.map} +1 -1
- package/dist/chunks/{float-DltoW_Zq.js → float-BHAFWRjM.js} +3 -3
- package/dist/chunks/{float-DltoW_Zq.js.map → float-BHAFWRjM.js.map} +1 -1
- package/dist/chunks/{grid-item-CtE_AYi_.js → grid-item-B2mOwD2y.js} +3 -3
- package/dist/chunks/{grid-item-CtE_AYi_.js.map → grid-item-B2mOwD2y.js.map} +1 -1
- package/dist/chunks/{grid-item-Bh8eyURv.js → grid-item-MqIW494P.js} +2 -2
- package/dist/chunks/{grid-item-Bh8eyURv.js.map → grid-item-MqIW494P.js.map} +1 -1
- package/dist/chunks/{group-B-T5mM5H.js → group-CjQBwfVM.js} +2 -2
- package/dist/chunks/{group-B-T5mM5H.js.map → group-CjQBwfVM.js.map} +1 -1
- package/dist/chunks/{group-C1RHA5D4.js → group-aY0Z9jNw.js} +2 -2
- package/dist/chunks/{group-C1RHA5D4.js.map → group-aY0Z9jNw.js.map} +1 -1
- package/dist/chunks/{h-stack-CS7rfLzY.js → h-stack-DxezNoY3.js} +2 -2
- package/dist/chunks/{h-stack-CS7rfLzY.js.map → h-stack-DxezNoY3.js.map} +1 -1
- package/dist/chunks/{h-stack-BNJKAmfP.js → h-stack-iIc7vTB3.js} +2 -2
- package/dist/chunks/{h-stack-BNJKAmfP.js.map → h-stack-iIc7vTB3.js.map} +1 -1
- package/dist/chunks/{heading.component-DPQ3Ldev.js → heading.component--ic7O4CR.js} +2 -2
- package/dist/chunks/{heading.component-DPQ3Ldev.js.map → heading.component--ic7O4CR.js.map} +1 -1
- package/dist/chunks/{heading.component-C0os9XQl.js → heading.component-E5shs3Uo.js} +3 -3
- package/dist/chunks/{heading.component-C0os9XQl.js.map → heading.component-E5shs3Uo.js.map} +1 -1
- package/dist/chunks/{icon-button-DTNVQ6ie.js → icon-button-B8so0CZl.js} +2 -2
- package/dist/chunks/{icon-button-DTNVQ6ie.js.map → icon-button-B8so0CZl.js.map} +1 -1
- package/dist/chunks/{icon-button-C2UFU-Ne.js → icon-button-g512TBA9.js} +4 -4
- package/dist/chunks/{icon-button-C2UFU-Ne.js.map → icon-button-g512TBA9.js.map} +1 -1
- package/dist/chunks/{icon.component-Bak20DHK.js → icon.component-4aaCABoX.js} +2 -2
- package/dist/chunks/{icon.component-Bak20DHK.js.map → icon.component-4aaCABoX.js.map} +1 -1
- package/dist/chunks/{icon.component-2UIkFQec.js → icon.component-BmcWaysM.js} +2 -2
- package/dist/chunks/{icon.component-2UIkFQec.js.map → icon.component-BmcWaysM.js.map} +1 -1
- package/dist/chunks/{icons-mKvEgUrt.js → icons-BVYVhH49.js} +2 -2
- package/dist/chunks/{icons-mKvEgUrt.js.map → icons-BVYVhH49.js.map} +1 -1
- package/dist/chunks/{icons-DV9YYLlJ.js → icons-grAfs3Oz.js} +2 -2
- package/dist/chunks/{icons-DV9YYLlJ.js.map → icons-grAfs3Oz.js.map} +1 -1
- package/dist/chunks/{index-7Wm53w71.js → index-CX6Jo_Vb.js} +2 -2
- package/dist/chunks/{index-7Wm53w71.js.map → index-CX6Jo_Vb.js.map} +1 -1
- package/dist/chunks/{index-DyfLgoV3.js → index-DMVlKSP7.js} +2 -2
- package/dist/chunks/{index-DyfLgoV3.js.map → index-DMVlKSP7.js.map} +1 -1
- package/dist/chunks/{index-DZ4rwOqN.js → index-lIficens.js} +2 -2
- package/dist/chunks/{index-DZ4rwOqN.js.map → index-lIficens.js.map} +1 -1
- package/dist/chunks/{index-Cn3XQQvx.js → index-sVj7ynbl.js} +2 -2
- package/dist/chunks/{index-Cn3XQQvx.js.map → index-sVj7ynbl.js.map} +1 -1
- package/dist/chunks/{link.component-Bc4wkkNV.js → link.component-CSyWrGG3.js} +2 -2
- package/dist/chunks/{link.component-Bc4wkkNV.js.map → link.component-CSyWrGG3.js.map} +1 -1
- package/dist/chunks/{link.component-DpZFgqBD.js → link.component-ucfag2-g.js} +5 -5
- package/dist/chunks/{link.component-DpZFgqBD.js.map → link.component-ucfag2-g.js.map} +1 -1
- package/dist/chunks/{list-6xuavQ8j.js → list-0-1dh2ih.js} +2 -2
- package/dist/chunks/{list-6xuavQ8j.js.map → list-0-1dh2ih.js.map} +1 -1
- package/dist/chunks/{list-btYImTmv.js → list-AqGKvtMl.js} +2 -2
- package/dist/chunks/{list-btYImTmv.js.map → list-AqGKvtMl.js.map} +1 -1
- package/dist/chunks/{logo.types-_82dfqCq.js → logo.types-B_zly1v-.js} +4 -4
- package/dist/chunks/{logo.types-_82dfqCq.js.map → logo.types-B_zly1v-.js.map} +1 -1
- package/dist/chunks/{logo.types-CNiIncF7.js → logo.types-Ddn7cI2i.js} +2 -2
- package/dist/chunks/{logo.types-CNiIncF7.js.map → logo.types-Ddn7cI2i.js.map} +1 -1
- package/dist/chunks/{menu.component-6ReZTkw3.js → menu.component-B5OYYpa8.js} +11 -11
- package/dist/chunks/{menu.component-6ReZTkw3.js.map → menu.component-B5OYYpa8.js.map} +1 -1
- package/dist/chunks/{menu.component-M23lpQYR.js → menu.component-BsPmuH77.js} +2 -2
- package/dist/chunks/{menu.component-M23lpQYR.js.map → menu.component-BsPmuH77.js.map} +1 -1
- package/dist/chunks/{modal.types-C-ULroqw.js → modal.types-0p23sZIR.js} +2 -2
- package/dist/chunks/{modal.types-C-ULroqw.js.map → modal.types-0p23sZIR.js.map} +1 -1
- package/dist/chunks/{modal.types-Cz1sgSf1.js → modal.types-BGqtuJeQ.js} +7 -7
- package/dist/chunks/{modal.types-Cz1sgSf1.js.map → modal.types-BGqtuJeQ.js.map} +1 -1
- package/dist/chunks/{notificationCounter.component-lX_ARuii.js → notificationCounter.component-Bm528kQ-.js} +2 -2
- package/dist/chunks/{notificationCounter.component-lX_ARuii.js.map → notificationCounter.component-Bm528kQ-.js.map} +1 -1
- package/dist/chunks/{notificationCounter.component-nPsm5edj.js → notificationCounter.component-CG5067PO.js} +5 -5
- package/dist/chunks/{notificationCounter.component-nPsm5edj.js.map → notificationCounter.component-CG5067PO.js.map} +1 -1
- package/dist/chunks/{picture.component-DietrSe9.js → picture.component-C9l8Zjob.js} +2 -2
- package/dist/chunks/{picture.component-DietrSe9.js.map → picture.component-C9l8Zjob.js.map} +1 -1
- package/dist/chunks/{picture.component-CRe72g3B.js → picture.component-a4DWuwBK.js} +2 -2
- package/dist/chunks/{picture.component-CRe72g3B.js.map → picture.component-a4DWuwBK.js.map} +1 -1
- package/dist/chunks/{pinInput.types-DyQpSyoi.js → pinInput.types-DDODRsaX.js} +2 -2
- package/dist/chunks/{pinInput.types-DyQpSyoi.js.map → pinInput.types-DDODRsaX.js.map} +1 -1
- package/dist/chunks/{pinInput.types-BEUtBvMe.js → pinInput.types-PLeb9Wy4.js} +3 -3
- package/dist/chunks/{pinInput.types-BEUtBvMe.js.map → pinInput.types-PLeb9Wy4.js.map} +1 -1
- package/dist/chunks/{popover-B8hI3TjN.js → popover-DPQD-D5F.js} +2 -2
- package/dist/chunks/{popover-B8hI3TjN.js.map → popover-DPQD-D5F.js.map} +1 -1
- package/dist/chunks/{popover-B0kRlAi2.js → popover-Q1b5Ou9h.js} +2 -2
- package/dist/chunks/{popover-B0kRlAi2.js.map → popover-Q1b5Ou9h.js.map} +1 -1
- package/dist/chunks/{popover.component-CrVJG5hl.js → popover.component-8ETQVr48.js} +11 -11
- package/dist/chunks/{popover.component-CrVJG5hl.js.map → popover.component-8ETQVr48.js.map} +1 -1
- package/dist/chunks/{popover.component-IX7vhT9Q.js → popover.component-CewrKFIu.js} +2 -2
- package/dist/chunks/{popover.component-IX7vhT9Q.js.map → popover.component-CewrKFIu.js.map} +1 -1
- package/dist/chunks/{popover.recipe-CXB-bizi.js → popover.recipe-BwEAIvNr.js} +2 -2
- package/dist/chunks/{popover.recipe-CXB-bizi.js.map → popover.recipe-BwEAIvNr.js.map} +1 -1
- package/dist/chunks/{popover.recipe-DhCa6zgx.js → popover.recipe-De-l73ge.js} +2 -2
- package/dist/chunks/{popover.recipe-DhCa6zgx.js.map → popover.recipe-De-l73ge.js.map} +1 -1
- package/dist/chunks/{radio.records-Ds_h4yC0.js → radio.records-CsyF_2pW.js} +2 -2
- package/dist/chunks/{radio.records-Ds_h4yC0.js.map → radio.records-CsyF_2pW.js.map} +1 -1
- package/dist/chunks/{radio.records-CgQh4PvA.js → radio.records-U-7SH4rq.js} +2 -2
- package/dist/chunks/{radio.records-CgQh4PvA.js.map → radio.records-U-7SH4rq.js.map} +1 -1
- package/dist/chunks/{radioGroup.component-B3IbjBoh.js → radioGroup.component-BqJ9MJq_.js} +10 -10
- package/dist/chunks/{radioGroup.component-B3IbjBoh.js.map → radioGroup.component-BqJ9MJq_.js.map} +1 -1
- package/dist/chunks/{radioGroup.component-baegzOcU.js → radioGroup.component-aQ5WaHHz.js} +2 -2
- package/dist/chunks/{radioGroup.component-baegzOcU.js.map → radioGroup.component-aQ5WaHHz.js.map} +1 -1
- package/dist/chunks/{ratingDots.component-BOP9ddLk.js → ratingDots.component-3aUZ-7-n.js} +2 -2
- package/dist/chunks/{ratingDots.component-BOP9ddLk.js.map → ratingDots.component-3aUZ-7-n.js.map} +1 -1
- package/dist/chunks/{ratingDots.component-CDJNTlyt.js → ratingDots.component-Bgh1iv_C.js} +7 -7
- package/dist/chunks/{ratingDots.component-CDJNTlyt.js.map → ratingDots.component-Bgh1iv_C.js.map} +1 -1
- package/dist/chunks/{select.component-D5Kx0C6H.js → select.component-C-D415HK.js} +2 -2
- package/dist/chunks/{select.component-D5Kx0C6H.js.map → select.component-C-D415HK.js.map} +1 -1
- package/dist/chunks/{select.component-kIMBGVX-.js → select.component-CceQLD7L.js} +9 -9
- package/dist/chunks/{select.component-kIMBGVX-.js.map → select.component-CceQLD7L.js.map} +1 -1
- package/dist/chunks/{sortableList.component-CMdzXRvM.js → sortableList.component-B8ch3VZ9.js} +2 -2
- package/dist/chunks/{sortableList.component-CMdzXRvM.js.map → sortableList.component-B8ch3VZ9.js.map} +1 -1
- package/dist/chunks/{sortableList.component-DWCeI27G.js → sortableList.component-COofj0TO.js} +5 -5
- package/dist/chunks/{sortableList.component-DWCeI27G.js.map → sortableList.component-COofj0TO.js.map} +1 -1
- package/dist/chunks/spinner-CQnM6sI5.js +8 -0
- package/dist/chunks/{spinner-CIj_D6mc.js.map → spinner-CQnM6sI5.js.map} +1 -1
- package/dist/chunks/spinner-No4bac8-.js +2 -0
- package/dist/chunks/{spinner-BVmsGoNz.js.map → spinner-No4bac8-.js.map} +1 -1
- package/dist/chunks/{spinner.component-B0EkS0nN.js → spinner.component-DRQDBF8j.js} +6 -6
- package/dist/chunks/{spinner.component-B0EkS0nN.js.map → spinner.component-DRQDBF8j.js.map} +1 -1
- package/dist/chunks/{spinner.component-DbjX00Oz.js → spinner.component-DjiFeql5.js} +2 -2
- package/dist/chunks/{spinner.component-DbjX00Oz.js.map → spinner.component-DjiFeql5.js.map} +1 -1
- package/dist/chunks/{stack-DCiVNls4.js → stack-B6Qs7bq9.js} +3 -3
- package/dist/chunks/{stack-DCiVNls4.js.map → stack-B6Qs7bq9.js.map} +1 -1
- package/dist/chunks/{stack-CJxtLLO5.js → stack-CtSNpuJq.js} +2 -2
- package/dist/chunks/{stack-CJxtLLO5.js.map → stack-CtSNpuJq.js.map} +1 -1
- package/dist/chunks/{styledAvatar.types-Dq0B2lvO.js → styledAvatar.types-Cq3BLvCU.js} +2 -2
- package/dist/chunks/{styledAvatar.types-Dq0B2lvO.js.map → styledAvatar.types-Cq3BLvCU.js.map} +1 -1
- package/dist/chunks/{styledAvatar.types-D-EtAZDF.js → styledAvatar.types-cc6fpkt6.js} +2 -2
- package/dist/chunks/{styledAvatar.types-D-EtAZDF.js.map → styledAvatar.types-cc6fpkt6.js.map} +1 -1
- package/dist/chunks/{swatch.types-BaLvcOgk.js → swatch.types-CeCazVD3.js} +2 -2
- package/dist/chunks/{swatch.types-BaLvcOgk.js.map → swatch.types-CeCazVD3.js.map} +1 -1
- package/dist/chunks/{swatch.types-yT5psqUR.js → swatch.types-DUBu3p9m.js} +4 -4
- package/dist/chunks/{swatch.types-yT5psqUR.js.map → swatch.types-DUBu3p9m.js.map} +1 -1
- package/dist/chunks/{switch.component-w_hI7PDT.js → switch.component-8Ksb8br3.js} +5 -5
- package/dist/chunks/{switch.component-w_hI7PDT.js.map → switch.component-8Ksb8br3.js.map} +1 -1
- package/dist/chunks/{switch.component-Ok2ZZQth.js → switch.component-BkifDkJ0.js} +2 -2
- package/dist/chunks/{switch.component-Ok2ZZQth.js.map → switch.component-BkifDkJ0.js.map} +1 -1
- package/dist/chunks/{tabs.component-CD-aAuwS.js → tabs.component-B365dz_T.js} +2 -2
- package/dist/chunks/{tabs.component-CD-aAuwS.js.map → tabs.component-B365dz_T.js.map} +1 -1
- package/dist/chunks/{tabs.component-BWVporfj.js → tabs.component-D5tE6-_n.js} +5 -5
- package/dist/chunks/{tabs.component-BWVporfj.js.map → tabs.component-D5tE6-_n.js.map} +1 -1
- package/dist/chunks/{tag.component-CG0GhLTW.js → tag.component-C5MszzTM.js} +2 -2
- package/dist/chunks/{tag.component-CG0GhLTW.js.map → tag.component-C5MszzTM.js.map} +1 -1
- package/dist/chunks/{tag.component-B3HqTQv9.js → tag.component-D_8Wr2wv.js} +3 -3
- package/dist/chunks/{tag.component-B3HqTQv9.js.map → tag.component-D_8Wr2wv.js.map} +1 -1
- package/dist/chunks/{tagBlock.component-DVZRmYDw.js → tagBlock.component-D_3b0Ebn.js} +2 -2
- package/dist/chunks/{tagBlock.component-DVZRmYDw.js.map → tagBlock.component-D_3b0Ebn.js.map} +1 -1
- package/dist/chunks/{tagBlock.component-C4Jhgu0X.js → tagBlock.component-DjIgrPCX.js} +10 -10
- package/dist/chunks/{tagBlock.component-C4Jhgu0X.js.map → tagBlock.component-DjIgrPCX.js.map} +1 -1
- package/dist/chunks/text.component-C_Zg4dMh.js +2 -0
- package/dist/chunks/{text.component-DCAWfY65.js.map → text.component-C_Zg4dMh.js.map} +1 -1
- package/dist/chunks/text.component-DZkwd4C0.js +16 -0
- package/dist/chunks/{text.component-CjHMwskV.js.map → text.component-DZkwd4C0.js.map} +1 -1
- package/dist/chunks/{textInput.component-BMSwF3Ae.js → textInput.component-7QTnQmYu.js} +2 -2
- package/dist/chunks/{textInput.component-BMSwF3Ae.js.map → textInput.component-7QTnQmYu.js.map} +1 -1
- package/dist/chunks/{textInput.component-B5-xa_yC.js → textInput.component-c9ySCd-c.js} +9 -9
- package/dist/chunks/{textInput.component-B5-xa_yC.js.map → textInput.component-c9ySCd-c.js.map} +1 -1
- package/dist/chunks/{textarea.component-1qoZ-mMp.js → textarea.component-7yXlR6OD.js} +5 -5
- package/dist/chunks/{textarea.component-1qoZ-mMp.js.map → textarea.component-7yXlR6OD.js.map} +1 -1
- package/dist/chunks/{textarea.component-L3bZoiXW.js → textarea.component-Bbf7OmgY.js} +2 -2
- package/dist/chunks/{textarea.component-L3bZoiXW.js.map → textarea.component-Bbf7OmgY.js.map} +1 -1
- package/dist/chunks/{theme.provider-Cjzvgcq8.js → theme.provider-CGOc_ofu.js} +4 -4
- package/dist/chunks/{theme.provider-Cjzvgcq8.js.map → theme.provider-CGOc_ofu.js.map} +1 -1
- package/dist/chunks/{theme.provider-Ds0i6KF4.js → theme.provider-DHyAAmb8.js} +739 -732
- package/dist/chunks/{theme.provider-Ds0i6KF4.js.map → theme.provider-DHyAAmb8.js.map} +1 -1
- package/dist/chunks/{timePicker.component-CAAoFSZg.js → timePicker.component-CWQsy1FJ.js} +2 -2
- package/dist/chunks/{timePicker.component-CAAoFSZg.js.map → timePicker.component-CWQsy1FJ.js.map} +1 -1
- package/dist/chunks/{timePicker.component-CImRXa-g.js → timePicker.component-DayAeaAE.js} +8 -8
- package/dist/chunks/{timePicker.component-CImRXa-g.js.map → timePicker.component-DayAeaAE.js.map} +1 -1
- package/dist/chunks/{timeRange.component-DNwdaf7m.js → timeRange.component-BMIZhDDZ.js} +4 -4
- package/dist/chunks/{timeRange.component-DNwdaf7m.js.map → timeRange.component-BMIZhDDZ.js.map} +1 -1
- package/dist/chunks/{timeRange.component-DXrBO0Id.js → timeRange.component-kKGWfXnG.js} +2 -2
- package/dist/chunks/{timeRange.component-DXrBO0Id.js.map → timeRange.component-kKGWfXnG.js.map} +1 -1
- package/dist/chunks/{timestamp.component-Db-MbDMR.js → timestamp.component-C51FWMrY.js} +3 -3
- package/dist/chunks/{timestamp.component-Db-MbDMR.js.map → timestamp.component-C51FWMrY.js.map} +1 -1
- package/dist/chunks/{timestamp.component-BACJfaKw.js → timestamp.component-p5tMHeq4.js} +2 -2
- package/dist/chunks/{timestamp.component-BACJfaKw.js.map → timestamp.component-p5tMHeq4.js.map} +1 -1
- package/dist/chunks/{tooltip.component-BPbl810g.js → tooltip.component-DsowDvmZ.js} +2 -2
- package/dist/chunks/{tooltip.component-BPbl810g.js.map → tooltip.component-DsowDvmZ.js.map} +1 -1
- package/dist/chunks/{tooltip.component-JCzaFEUu.js → tooltip.component-HHJpC9zD.js} +2 -2
- package/dist/chunks/{tooltip.component-JCzaFEUu.js.map → tooltip.component-HHJpC9zD.js.map} +1 -1
- package/dist/chunks/{use-recipe-CJD8nmAh.js → use-recipe-B7BYguEn.js} +2 -2
- package/dist/chunks/{use-recipe-CJD8nmAh.js.map → use-recipe-B7BYguEn.js.map} +1 -1
- package/dist/chunks/use-recipe-N0abcau6.js +2 -0
- package/dist/chunks/{use-recipe-e5vdQ3Ca.js.map → use-recipe-N0abcau6.js.map} +1 -1
- package/dist/chunks/{use-slot-recipe-CB5G_UZD.js → use-slot-recipe-BVIotsqX.js} +2 -2
- package/dist/chunks/{use-slot-recipe-CB5G_UZD.js.map → use-slot-recipe-BVIotsqX.js.map} +1 -1
- package/dist/chunks/use-slot-recipe-CVO1rwGV.js +2 -0
- package/dist/chunks/{use-slot-recipe-BEyHP-Lh.js.map → use-slot-recipe-CVO1rwGV.js.map} +1 -1
- package/dist/chunks/{v-stack-wxICnH9w.js → v-stack-Cx_7x3kH.js} +2 -2
- package/dist/chunks/{v-stack-wxICnH9w.js.map → v-stack-Cx_7x3kH.js.map} +1 -1
- package/dist/chunks/{v-stack-DOm7QQkt.js → v-stack-IBysx2n3.js} +2 -2
- package/dist/chunks/{v-stack-DOm7QQkt.js.map → v-stack-IBysx2n3.js.map} +1 -1
- package/dist/chunks/{walk-object-EkQnf0pF.js → walk-object-CzGJH0qy.js} +2 -2
- package/dist/chunks/{walk-object-EkQnf0pF.js.map → walk-object-CzGJH0qy.js.map} +1 -1
- package/dist/chunks/{walk-object-FYEyC1q9.js → walk-object-DY6qf1jj.js} +2 -2
- package/dist/chunks/{walk-object-FYEyC1q9.js.map → walk-object-DY6qf1jj.js.map} +1 -1
- package/dist/chunks/{withFormControl-D7wJfVjb.js → withFormControl-BldbKXiV.js} +7 -7
- package/dist/chunks/{withFormControl-D7wJfVjb.js.map → withFormControl-BldbKXiV.js.map} +1 -1
- package/dist/chunks/{withFormControl-BHuqR52U.js → withFormControl-C35JkDEH.js} +2 -2
- package/dist/chunks/{withFormControl-BHuqR52U.js.map → withFormControl-C35JkDEH.js.map} +1 -1
- package/dist/chunks/{withTruncation-D04zq8uV.js → withTruncation-C7erdGm7.js} +2 -2
- package/dist/chunks/{withTruncation-D04zq8uV.js.map → withTruncation-C7erdGm7.js.map} +1 -1
- package/dist/chunks/{withTruncation-B9ffIwF7.js → withTruncation-Cca8DRk_.js} +3 -3
- package/dist/chunks/{withTruncation-B9ffIwF7.js.map → withTruncation-Cca8DRk_.js.map} +1 -1
- package/dist/chunks/{wrap-B06zjN2U.js → wrap-Bm3JnXyR.js} +2 -2
- package/dist/chunks/{wrap-B06zjN2U.js.map → wrap-Bm3JnXyR.js.map} +1 -1
- package/dist/chunks/{wrap-DQfXAuZ8.js → wrap-DrLrXdlw.js} +3 -3
- package/dist/chunks/{wrap-DQfXAuZ8.js.map → wrap-DrLrXdlw.js.map} +1 -1
- package/dist/cjs/chakra/index.cjs +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/index.cjs +1 -1
- package/dist/cjs/components/Link/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/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/dist/types/components/Avatar/components/AvatarBadge/avatarBadge.types.d.ts +1 -1
- package/package.json +7 -3
- package/dist/chunks/alert.component-BPTwogSX.js +0 -2
- package/dist/chunks/alert.component-BT9Gn6Iw.js.map +0 -1
- package/dist/chunks/box-CRddum0T.js +0 -7
- package/dist/chunks/box-CqeORXNj.js +0 -2
- package/dist/chunks/factory-D_LOlWjz.js +0 -1471
- package/dist/chunks/factory-D_LOlWjz.js.map +0 -1
- package/dist/chunks/factory-DiRBd_Ei.js +0 -17
- package/dist/chunks/factory-DiRBd_Ei.js.map +0 -1
- package/dist/chunks/spinner-BVmsGoNz.js +0 -2
- package/dist/chunks/spinner-CIj_D6mc.js +0 -8
- package/dist/chunks/text.component-CjHMwskV.js +0 -2
- package/dist/chunks/text.component-DCAWfY65.js +0 -12
- package/dist/chunks/use-recipe-e5vdQ3Ca.js +0 -2
- package/dist/chunks/use-slot-recipe-BEyHP-Lh.js +0 -2
|
@@ -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-DZkwd4C0.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-BmcWaysM.js";
|
|
5
|
+
import { F as k } from "./flex-C2d2LH-K.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-gZxMesut.js";
|
|
9
|
+
import { c as oe } from "./create-slot-recipe-context-DJkLYvCT.js";
|
|
10
|
+
import { c as ae } from "./create-recipe-context-BcvaE0iS.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-BldbKXiV.js.map
|
|
@@ -1 +1 @@
|
|
|
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;A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GAAI7G;AAAA,wBAAA;AAAA,sBACP;AAAA,sBACC8G,KAAkB1F,KACjBd,gBAAAA,EAAA;AAAA,wBAAC2D;AAAAA,wBAAA;AAAA,0BACC,WAAU;AAAA,0BACV,MAAK;AAAA,0BACL,SAASsC;AAAA,0BACT,MAAAM;AAAA,wBAAA;AAAA,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-BldbKXiV.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,SAA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AAAA,wBAAA;AAAA,sBACP;AAAA,sBACC8G,KAAkB1F,KACjBd,gBAAAA,EAAA;AAAA,wBAAC2D;AAAAA,wBAAA;AAAA,0BACC,WAAU;AAAA,0BACV,MAAK;AAAA,0BACL,SAASsC;AAAA,0BACT,MAAAM;AAAA,wBAAA;AAAA,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,2 +1,2 @@
|
|
|
1
|
-
"use strict";const i=require("./jsx-runtime-BjDatQAs.js"),Z=require("./text.component-
|
|
2
|
-
//# sourceMappingURL=withFormControl-
|
|
1
|
+
"use strict";const i=require("./jsx-runtime-BjDatQAs.js"),Z=require("./text.component-C_Zg4dMh.js"),h=require("./typography.records-DZdHSCkY.js"),G=require("./icon.component-4aaCABoX.js"),M=require("./flex-DKWxn8hO.js"),o=require("react"),T=require("./factory-CkTX_WOU.js"),J=require("./create-slot-recipe-context-D-pJ8fgs.js"),K=require("./create-recipe-context-DdRyhQQD.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-C35JkDEH.js.map
|
|
@@ -1 +1 @@
|
|
|
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,kBAAAA,IAAIC,EAAAA,IAAI,KAAM,CAAE,GAAGH,EAAa,IAAAH,EAAK,EAEvD,IACT,CAAC,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ACL,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-C35JkDEH.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,kBAAAA,IAAIC,EAAAA,IAAI,KAAM,CAAE,GAAGH,EAAa,IAAAH,EAAK,EAEvD,IACT,CAAC,EACDH,EAAe,YAAc,iBCR7B,MAAMU,EAAkBT,EAAU,WAAC,CAACC,EAAOC,IAAQ,CACjD,MAAMC,EAAQC,EAAAA,gBAAiB,EACzBC,EAAcC,EAAU,WAACH,GAAO,mBAAkB,EAAIF,CAAK,EACjE,OAAuBM,EAAAA,kBAAAA,IAAIC,EAAAA,IAAI,KAAM,CAAE,GAAGH,EAAa,IAAAH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ACV,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,2 +1,2 @@
|
|
|
1
|
-
"use strict";const i=require("./jsx-runtime-BjDatQAs.js"),e=require("react"),p=require("./tooltip.component-
|
|
2
|
-
//# sourceMappingURL=withTruncation-
|
|
1
|
+
"use strict";const i=require("./jsx-runtime-BjDatQAs.js"),e=require("react"),p=require("./tooltip.component-HHJpC9zD.js"),T=require("./box-ca2FvcWF.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-C7erdGm7.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"withTruncation-
|
|
1
|
+
{"version":3,"file":"withTruncation-C7erdGm7.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":"yJAkBaA,EACXC,GACgB,CACV,MAAAC,EAAoBC,OAAKF,CAAS,EAExC,SAASG,EAAe,CACtB,UAAAC,EAAY,GACZ,UAAAC,EAAY,EACZ,SAAAC,EACA,aAAAC,EACA,GAAGC,CAAA,EACsC,CACzC,KAAM,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jCQgB,EAAA,kBAAA,IAAArB,EAAA,CAAmB,GAAIO,EAAa,SAAAF,CAAS,CAAA,CAiCrD,CAIJ,OAAAH,EAAe,YAAc,kBAAkBH,EAAU,aAAeA,EAAU,IAAI,GAE/EE,EAAAA,KAAKC,CAAc,CAC5B"}
|
|
@@ -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-DsowDvmZ.js";
|
|
4
|
+
import { B as g } from "./box-y05hq0PT.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-Cca8DRk_.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"withTruncation-
|
|
1
|
+
{"version":3,"file":"withTruncation-Cca8DRk_.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;AACjC,YAAAQ;AAEJ,cAAMC,IAAiB,MAAY;AACjC,iBAAO,aAAaD,CAAS,GACjBA,IAAA,OAAO,WAAWL,GAAe,GAAG;AAAA,QAClD;AAEkB,eAAAD,EAAA,UAAU,IAAI,eAAe,MAAM;AACpC,UAAAO,EAAA;AAAA,QAAA,CAChB,GAEiBP,EAAA,QAAQ,QAAQF,EAAa,OAAO,GACxCG,EAAA,GAEP,MAAY;AACjB,iBAAO,aAAaK,CAAS,GACzBN,EAAkB,WACpBA,EAAkB,QAAQ,WAAW;AAAA,QAEzC;AAAA,MAAA;AAAA,IACF,GACC,CAACV,GAAWW,CAAa,CAAC,GAExBX,IAKHkB,gBAAAA,EAAA;AAAA,MAACC;AAAA,MAAA;AAAA,QACE,GAAGhB;AAAA,QACJ,OAAOA,GAAc,SAASD,GAAU,eAAoB,KAAA;AAAA,QAC5D,UAAU,CAACG;AAAA,QACX,eAAY;AAAA,QAEZ,UAAAa,gBAAAA,EAAA;AAAA,UAACE;AAAA,UAAA;AAAA,YACC,KAAKZ;AAAA,YACL,SAAQ;AAAA,YACR,UAAS;AAAA,YACT,WAAU;AAAA,YACV,eAAY;AAAA,YAEZ,UAAAU,gBAAAA,EAAA;AAAA,cAACrB;AAAA,cAAA;AAAA,gBACC,WAAU;AAAA,gBACV,eAAY;AAAA,gBACX,GAAIQ,KAAqB,EAAE,QAAQ,UAAU;AAAA,gBAC9C,WAAWJ;AAAA,gBACX,OAAO;AAAA,kBACL,cAAc;AAAA,kBACd,UAAU;AAAA,kBACV,UAAU;AAAA,kBACV,WAAW;AAAA,gBACb;AAAA,gBACC,GAAIG;AAAA,gBAEJ,UAAAF;AAAA,cAAA;AAAA,YAAA;AAAA,UACH;AAAA,QAAA;AAAA,MACF;AAAA,IACF,IAjCQgB,gBAAAA,EAAA,IAAArB,GAAA,EAAmB,GAAIO,GAAa,UAAAF,EAAS,CAAA;AAAA,EAiCrD;AAIJ,SAAAH,EAAe,cAAc,kBAAkBH,EAAU,eAAeA,EAAU,IAAI,IAE/EE,EAAKC,CAAc;AAC5B;"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";const r=require("./jsx-runtime-BjDatQAs.js"),s=require("react"),u=require("./config-
|
|
2
|
-
//# sourceMappingURL=wrap-
|
|
1
|
+
"use strict";const r=require("./jsx-runtime-BjDatQAs.js"),s=require("react"),u=require("./config-SdQux5od.js"),a=require("./factory-CkTX_WOU.js"),i=s.forwardRef(function(e,t){const{gap:n="0.5rem",justify:l,direction:f,align:m,...o}=e;return r.jsxRuntimeExports.jsx(a.chakra.div,{ref:t,display:"flex",flexWrap:"wrap",justifyContent:l,alignItems:m,flexDirection:f,gap:n,...o,className:a.cx("chakra-wrap",e.className)})});i.displayName="Wrap";const x=u.defineStyle({display:"flex",alignItems:"flex-start"}),p=s.forwardRef(function(e,t){return r.jsxRuntimeExports.jsx(a.chakra.div,{ref:t,css:[x,e.css],...e,className:a.cx("chakra-wrap__listitem",e.className)})});exports.Wrap=i;exports.WrapItem=p;
|
|
2
|
+
//# sourceMappingURL=wrap-Bm3JnXyR.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wrap-
|
|
1
|
+
{"version":3,"file":"wrap-Bm3JnXyR.js","sources":["../../node_modules/@chakra-ui/react/dist/esm/components/wrap/wrap.js"],"sourcesContent":["\"use strict\";\n\"use client\";\nimport { jsx } from 'react/jsx-runtime';\nimport { forwardRef } from 'react';\nimport { defineStyle } from '../../styled-system/config.js';\nimport { chakra } from '../../styled-system/factory.js';\nimport { cx } from '../../utils/cx.js';\n\nconst Wrap = forwardRef(\n function Wrap2(props, ref) {\n const { gap = \"0.5rem\", justify, direction, align, ...rest } = props;\n return /* @__PURE__ */ jsx(\n chakra.div,\n {\n ref,\n display: \"flex\",\n flexWrap: \"wrap\",\n justifyContent: justify,\n alignItems: align,\n flexDirection: direction,\n gap,\n ...rest,\n className: cx(\"chakra-wrap\", props.className)\n }\n );\n }\n);\nWrap.displayName = \"Wrap\";\nconst itemStyle = defineStyle({\n display: \"flex\",\n alignItems: \"flex-start\"\n});\nconst WrapItem = forwardRef(\n function WrapItem2(props, ref) {\n return /* @__PURE__ */ jsx(\n chakra.div,\n {\n ref,\n css: [itemStyle, props.css],\n ...props,\n className: cx(\"chakra-wrap__listitem\", props.className)\n }\n );\n }\n);\n\nexport { Wrap, WrapItem };\n"],"names":["Wrap","forwardRef","props","ref","gap","justify","direction","align","rest","jsx","chakra","cx","itemStyle","defineStyle","WrapItem"],"mappings":"kJAQMA,EAAOC,EAAU,WACrB,SAAeC,EAAOC,EAAK,CACzB,KAAM,CAAE,IAAAC,EAAM,SAAU,QAAAC,EAAS,UAAAC,EAAW,MAAAC,EAAO,GAAGC,CAAI,EAAKN,EAC/D,OAAuBO,EAAG,kBAAA,IACxBC,EAAAA,OAAO,IACP,CACE,IAAAP,EACA,QAAS,OACT,SAAU,OACV,eAAgBE,EAChB,WAAYE,EACZ,cAAeD,EACf,IAAAF,EACA,GAAGI,EACH,UAAWG,EAAE,GAAC,cAAeT,EAAM,SAAS,CACpD,CACK,CACL,CACA,EACAF,EAAK,YAAc,OACnB,MAAMY,EAAYC,EAAAA,YAAY,CAC5B,QAAS,OACT,WAAY,YACd,CAAC,EACKC,EAAWb,EAAU,WACzB,SAAmBC,EAAOC,EAAK,CAC7B,OAAuBM,EAAG,kBAAA,IACxBC,EAAAA,OAAO,IACP,CACE,IAAAP,EACA,IAAK,CAACS,EAAWV,EAAM,GAAG,EAC1B,GAAGA,EACH,UAAWS,EAAE,GAAC,wBAAyBT,EAAM,SAAS,CAC9D,CACK,CACL,CACA","x_google_ignoreList":[0]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { j as t } from "./jsx-runtime-C5mzlN2N.js";
|
|
2
2
|
import { forwardRef as e } from "react";
|
|
3
|
-
import { d as p } from "./config-
|
|
4
|
-
import { c as r, b as i } from "./factory-
|
|
3
|
+
import { d as p } from "./config-C4FE-eBu.js";
|
|
4
|
+
import { c as r, b as i } from "./factory-gZxMesut.js";
|
|
5
5
|
const x = e(
|
|
6
6
|
function(a, s) {
|
|
7
7
|
const { gap: c = "0.5rem", justify: n, direction: l, align: o, ...f } = a;
|
|
@@ -42,4 +42,4 @@ export {
|
|
|
42
42
|
x as W,
|
|
43
43
|
N as a
|
|
44
44
|
};
|
|
45
|
-
//# sourceMappingURL=wrap-
|
|
45
|
+
//# sourceMappingURL=wrap-DrLrXdlw.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wrap-
|
|
1
|
+
{"version":3,"file":"wrap-DrLrXdlw.js","sources":["../../node_modules/@chakra-ui/react/dist/esm/components/wrap/wrap.js"],"sourcesContent":["\"use strict\";\n\"use client\";\nimport { jsx } from 'react/jsx-runtime';\nimport { forwardRef } from 'react';\nimport { defineStyle } from '../../styled-system/config.js';\nimport { chakra } from '../../styled-system/factory.js';\nimport { cx } from '../../utils/cx.js';\n\nconst Wrap = forwardRef(\n function Wrap2(props, ref) {\n const { gap = \"0.5rem\", justify, direction, align, ...rest } = props;\n return /* @__PURE__ */ jsx(\n chakra.div,\n {\n ref,\n display: \"flex\",\n flexWrap: \"wrap\",\n justifyContent: justify,\n alignItems: align,\n flexDirection: direction,\n gap,\n ...rest,\n className: cx(\"chakra-wrap\", props.className)\n }\n );\n }\n);\nWrap.displayName = \"Wrap\";\nconst itemStyle = defineStyle({\n display: \"flex\",\n alignItems: \"flex-start\"\n});\nconst WrapItem = forwardRef(\n function WrapItem2(props, ref) {\n return /* @__PURE__ */ jsx(\n chakra.div,\n {\n ref,\n css: [itemStyle, props.css],\n ...props,\n className: cx(\"chakra-wrap__listitem\", props.className)\n }\n );\n }\n);\n\nexport { Wrap, WrapItem };\n"],"names":["Wrap","forwardRef","props","ref","gap","justify","direction","align","rest","jsx","chakra","cx","itemStyle","defineStyle","WrapItem"],"mappings":";;;;AAQK,MAACA,IAAOC;AAAA,EACX,SAAeC,GAAOC,GAAK;AACzB,UAAM,EAAE,KAAAC,IAAM,UAAU,SAAAC,GAAS,WAAAC,GAAW,OAAAC,GAAO,GAAGC,EAAI,IAAKN;AAC/D,WAAuBO,gBAAAA,EAAG;AAAA,MACxBC,EAAO;AAAA,MACP;AAAA,QACE,KAAAP;AAAA,QACA,SAAS;AAAA,QACT,UAAU;AAAA,QACV,gBAAgBE;AAAA,QAChB,YAAYE;AAAA,QACZ,eAAeD;AAAA,QACf,KAAAF;AAAA,QACA,GAAGI;AAAA,QACH,WAAWG,EAAG,eAAeT,EAAM,SAAS;AAAA,MACpD;AAAA,IACK;AAAA,EACL;AACA;AACAF,EAAK,cAAc;AACnB,MAAMY,IAAYC,EAAY;AAAA,EAC5B,SAAS;AAAA,EACT,YAAY;AACd,CAAC,GACKC,IAAWb;AAAA,EACf,SAAmBC,GAAOC,GAAK;AAC7B,WAAuBM,gBAAAA,EAAG;AAAA,MACxBC,EAAO;AAAA,MACP;AAAA,QACE,KAAAP;AAAA,QACA,KAAK,CAACS,GAAWV,EAAM,GAAG;AAAA,QAC1B,GAAGA;AAAA,QACH,WAAWS,EAAG,yBAAyBT,EAAM,SAAS;AAAA,MAC9D;AAAA,IACK;AAAA,EACL;AACA;","x_google_ignoreList":[0]}
|