@esri/calcite-components 5.1.0-next.2 → 5.1.0-next.21
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/README.md +1 -1
- package/dist/cdn/{EVZELQEI.js → 266C6B7L.js} +1 -1
- package/dist/cdn/2DQJ2I4Y.js +2 -0
- package/dist/cdn/2FAHHGBT.js +2 -0
- package/dist/cdn/{OEVO2RLE.js → 2HICKZRY.js} +1 -1
- package/dist/cdn/2KRA4MT3.js +2 -0
- package/dist/cdn/{C3DQT3XL.js → 2YBB7MN2.js} +1 -1
- package/dist/cdn/2ZLM6QUA.js +2 -0
- package/dist/cdn/{RKMP4RCA.js → 32MVCUVZ.js} +1 -1
- package/dist/cdn/{Z57WK5OX.js → 332ZKLGA.js} +1 -1
- package/dist/cdn/3MJZVDEX.js +2 -0
- package/dist/cdn/3ONW33AA.js +2 -0
- package/dist/cdn/3PAJEHPF.js +2 -0
- package/dist/cdn/{RSTWTSXK.js → 3RW7ABF6.js} +1 -1
- package/dist/cdn/{VXTDQHCD.js → 3UAJT4ZL.js} +1 -1
- package/dist/cdn/3UU67AJS.js +2 -0
- package/dist/cdn/{64ZF22ED.js → 4DLBLTZG.js} +1 -1
- package/dist/cdn/{5SEIMSSA.js → 4MLNKMPR.js} +1 -1
- package/dist/cdn/{KAXRYSAQ.js → 4VV4E4PU.js} +1 -1
- package/dist/cdn/{HYV6NNWJ.js → 4YKC4AKA.js} +1 -1
- package/dist/cdn/{GUIMHKM6.js → 5FYTW7Q4.js} +1 -1
- package/dist/cdn/{FMIBYPIO.js → 5GS6DQT3.js} +1 -1
- package/dist/cdn/5JXDTISP.js +2 -0
- package/dist/cdn/{Q5NGOFZW.js → 5SAPL7CN.js} +2 -2
- package/dist/cdn/5WXCYI4E.js +2 -0
- package/dist/cdn/5ZMVPAMA.js +2 -0
- package/dist/cdn/6WWLMCSS.js +2 -0
- package/dist/cdn/7F3TEKMC.js +2 -0
- package/dist/cdn/7Z2BQLCJ.js +2 -0
- package/dist/cdn/{QLF7GIME.js → AAOVTCMB.js} +1 -1
- package/dist/cdn/{BELEG27X.js → AOZONY26.js} +1 -1
- package/dist/cdn/APTTKIUK.js +2 -0
- package/dist/cdn/{UESTEIYV.js → BT5M3VRT.js} +1 -1
- package/dist/cdn/{YBWDSUDY.js → C2C2XHNX.js} +1 -1
- package/dist/cdn/C5X7D3B4.js +2 -0
- package/dist/cdn/{7CBKFWUR.js → C72AKL73.js} +1 -1
- package/dist/cdn/{TEQEYTGC.js → CAAPPBSL.js} +1 -1
- package/dist/cdn/{DMJB2C34.js → CMHGTY7Z.js} +1 -1
- package/dist/cdn/{IHZTOERI.js → CXHXX4VI.js} +1 -1
- package/dist/cdn/D65RYUME.js +2 -0
- package/dist/cdn/{YLAVIMGA.js → DOD7FRNY.js} +1 -1
- package/dist/cdn/DUGE5E4O.js +2 -0
- package/dist/cdn/{6FFNT4VB.js → DWB5XJJ5.js} +1 -1
- package/dist/cdn/DXSS645W.js +2 -0
- package/dist/cdn/E67DP4BP.js +2 -0
- package/dist/cdn/EBNU26IM.js +2 -0
- package/dist/cdn/EGZJYJJW.js +2 -0
- package/dist/cdn/EX3FVXQA.js +2 -0
- package/dist/cdn/EYSUQHNA.js +2 -0
- package/dist/cdn/{M7KMYURY.js → F4GJISXI.js} +1 -1
- package/dist/cdn/{PV7SEUP6.js → FK353KEJ.js} +1 -1
- package/dist/cdn/{PTWMPI4U.js → FOJVWJ6C.js} +1 -1
- package/dist/cdn/FPP7GZ6E.js +2 -0
- package/dist/cdn/{MDWM7MQB.js → GF32HNMV.js} +1 -1
- package/dist/cdn/{HJ2TBW6C.js → GRR24FYN.js} +1 -1
- package/dist/cdn/{KXFAVNUY.js → GXUK5C3W.js} +1 -1
- package/dist/cdn/{TW6ZPWM5.js → H7DBKEAC.js} +1 -1
- package/dist/cdn/HAMHXQU7.js +2 -0
- package/dist/cdn/{3FZCUBZ5.js → HGMWBXA6.js} +1 -1
- package/dist/cdn/{WJHLGJ6O.js → HSOVQWPY.js} +1 -1
- package/dist/cdn/{2UHPDM22.js → HSWFA4KL.js} +1 -1
- package/dist/cdn/IGVFN6O3.js +2 -0
- package/dist/cdn/IR2LIQEB.js +2 -0
- package/dist/cdn/IVBK6XYN.js +2 -0
- package/dist/cdn/{TYM7TD6F.js → IVO4D5WT.js} +1 -1
- package/dist/cdn/IXZNUPKS.js +2 -0
- package/dist/cdn/{DRLHDQPQ.js → JGAQ7WI3.js} +1 -1
- package/dist/cdn/{ZZKXTLEP.js → JSB33HO7.js} +1 -1
- package/dist/cdn/JT7MEAER.js +2 -0
- package/dist/cdn/{Y6RV3XPM.js → K55YOIMI.js} +1 -1
- package/dist/cdn/KEZYSYTR.js +2 -0
- package/dist/cdn/{7MFNGV4Q.js → KFUGSMJN.js} +1 -1
- package/dist/cdn/KJIN3EBT.js +2 -0
- package/dist/cdn/KVJUFKYF.js +2 -0
- package/dist/cdn/{JKZNKJ4E.js → KZDHO73C.js} +1 -1
- package/dist/cdn/{UGAIXYET.js → LB7EAAGP.js} +1 -1
- package/dist/cdn/LBJTLSJL.js +2 -0
- package/dist/cdn/LRTBBK2V.js +2 -0
- package/dist/cdn/{J4VYBUOS.js → MDUZG3GB.js} +1 -1
- package/dist/cdn/{WVRTQO4B.js → MN6DYH4C.js} +1 -1
- package/dist/cdn/{XMSAQFKD.js → MTAGASDB.js} +1 -1
- package/dist/cdn/NDYF2A3V.js +2 -0
- package/dist/cdn/{TK4U4Q2X.js → NMBDGLXA.js} +1 -1
- package/dist/cdn/{TCKCRZZG.js → O7PXIGUT.js} +1 -1
- package/dist/cdn/OGCLMRGI.js +2 -0
- package/dist/cdn/{6LZSRXWZ.js → ON2PWFTQ.js} +1 -1
- package/dist/cdn/{P7COCJFG.js → ONSL6BXX.js} +1 -1
- package/dist/cdn/{YJ3UDYOD.js → ONWQHRUW.js} +1 -1
- package/dist/cdn/{74RBOHVA.js → OPABFIJF.js} +1 -1
- package/dist/cdn/OVDF2LTA.js +2 -0
- package/dist/cdn/OYDHYCUL.js +2 -0
- package/dist/cdn/{NKEMXHJM.js → P6B6VNYO.js} +1 -1
- package/dist/cdn/P7A62Q32.js +2 -0
- package/dist/cdn/{3OQCCQAJ.js → QDB6LPRV.js} +1 -1
- package/dist/cdn/{FWH3M3KQ.js → QHJAFGYD.js} +1 -1
- package/dist/cdn/{QXYIZ2BN.js → QHWS5UXA.js} +1 -1
- package/dist/cdn/{KZV4YUNF.js → QPMJGVKH.js} +1 -1
- package/dist/cdn/{GE4DYP44.js → QZ2UDVXV.js} +1 -1
- package/dist/cdn/{RP555FJ5.js → R6NQQ7K3.js} +1 -1
- package/dist/cdn/{RNNM37GO.js → RE7H56HU.js} +1 -1
- package/dist/cdn/RFXTJ3XD.js +2 -0
- package/dist/cdn/{X6VUCHWA.js → RNCNGVIF.js} +1 -1
- package/dist/cdn/RP2QPWWQ.js +2 -0
- package/dist/cdn/{HZECPHN5.js → RQ6E3N5N.js} +1 -1
- package/dist/cdn/RTEY5TE7.js +2 -0
- package/dist/cdn/S2JOZ7UT.js +2 -0
- package/dist/cdn/{JIGD5HQV.js → S74CLMSQ.js} +1 -1
- package/dist/cdn/{P3RRIB6Y.js → SESFWPDV.js} +1 -1
- package/dist/cdn/{WNRXPDBD.js → SHZKKKAC.js} +1 -1
- package/dist/cdn/{GIYRIRXI.js → SK5TFGXO.js} +1 -1
- package/dist/cdn/SM3RGVKO.js +2 -0
- package/dist/cdn/SX7WZPAE.js +2 -0
- package/dist/cdn/T7KULWHY.js +2 -0
- package/dist/cdn/TFQRAUBW.js +2 -0
- package/dist/cdn/{4EKGFJEY.js → TZSVZLNF.js} +1 -1
- package/dist/cdn/UELBFRKC.js +2 -0
- package/dist/cdn/{DMDJK57V.js → UICSO2JV.js} +1 -1
- package/dist/cdn/{LQSWBMAX.js → UMC6ABLD.js} +1 -1
- package/dist/cdn/{FC2NRQ3K.js → UNB4IPAN.js} +1 -1
- package/dist/cdn/V5764UWN.js +2 -0
- package/dist/cdn/V6YNWE5G.js +2 -0
- package/dist/cdn/VKTSVO6N.js +2 -0
- package/dist/cdn/{GIOGHX6Y.js → VR35BMUS.js} +1 -1
- package/dist/cdn/VWZV5HUY.js +2 -0
- package/dist/cdn/WHHT3DBR.js +2 -0
- package/dist/cdn/WXISUG5Z.js +2 -0
- package/dist/cdn/{OXEUDPTB.js → XBDVCWK7.js} +1 -1
- package/dist/cdn/{UX4AYCFF.js → XTHKZFKL.js} +1 -1
- package/dist/cdn/{3OR2XXEV.js → XZDKIB6T.js} +1 -1
- package/dist/cdn/YJJ2KXXT.js +2 -0
- package/dist/cdn/YJYV5YC2.js +4 -0
- package/dist/cdn/YMQRXBCD.js +2 -0
- package/dist/cdn/YOIBVBHZ.js +2 -0
- package/dist/cdn/{6ZH5C6LA.js → YR67WANP.js} +1 -1
- package/dist/cdn/{5CJJBSEE.js → ZBNWKVLJ.js} +1 -1
- package/dist/cdn/ZJNX357Y.js +2 -0
- package/dist/cdn/{K4PA2IDP.js → ZLC353RS.js} +1 -1
- package/dist/cdn/ZND7DYSJ.js +2 -0
- package/dist/cdn/{5ZWBTARS.js → ZPBCDUTD.js} +1 -1
- package/dist/cdn/{EBETKN7W.js → ZVKMBNZW.js} +1 -1
- package/dist/cdn/{VZ5KSWMD.js → ZZV4XD43.js} +1 -1
- package/dist/cdn/assets/carousel/t9n/messages.ar.json +1 -1
- package/dist/cdn/assets/carousel/t9n/messages.bg.json +1 -1
- package/dist/cdn/assets/carousel/t9n/messages.bs.json +1 -1
- package/dist/cdn/assets/carousel/t9n/messages.ca.json +1 -1
- package/dist/cdn/assets/carousel/t9n/messages.cs.json +1 -1
- package/dist/cdn/assets/carousel/t9n/messages.da.json +1 -1
- package/dist/cdn/assets/carousel/t9n/messages.de.json +1 -1
- package/dist/cdn/assets/carousel/t9n/messages.el.json +1 -1
- package/dist/cdn/assets/carousel/t9n/messages.es.json +1 -1
- package/dist/cdn/assets/carousel/t9n/messages.et.json +1 -1
- package/dist/cdn/assets/carousel/t9n/messages.fi.json +1 -1
- package/dist/cdn/assets/carousel/t9n/messages.fr.json +1 -1
- package/dist/cdn/assets/carousel/t9n/messages.he.json +1 -1
- package/dist/cdn/assets/carousel/t9n/messages.hr.json +1 -1
- package/dist/cdn/assets/carousel/t9n/messages.hu.json +1 -1
- package/dist/cdn/assets/carousel/t9n/messages.id.json +1 -1
- package/dist/cdn/assets/carousel/t9n/messages.it.json +1 -1
- package/dist/cdn/assets/carousel/t9n/messages.ja.json +1 -1
- package/dist/cdn/assets/carousel/t9n/messages.ko.json +1 -1
- package/dist/cdn/assets/carousel/t9n/messages.lt.json +1 -1
- package/dist/cdn/assets/carousel/t9n/messages.lv.json +1 -1
- package/dist/cdn/assets/carousel/t9n/messages.nl.json +1 -1
- package/dist/cdn/assets/carousel/t9n/messages.no.json +1 -1
- package/dist/cdn/assets/carousel/t9n/messages.pl.json +1 -1
- package/dist/cdn/assets/carousel/t9n/messages.pt-BR.json +1 -1
- package/dist/cdn/assets/carousel/t9n/messages.pt-PT.json +1 -1
- package/dist/cdn/assets/carousel/t9n/messages.ro.json +1 -1
- package/dist/cdn/assets/carousel/t9n/messages.ru.json +1 -1
- package/dist/cdn/assets/carousel/t9n/messages.sk.json +1 -1
- package/dist/cdn/assets/carousel/t9n/messages.sl.json +1 -1
- package/dist/cdn/assets/carousel/t9n/messages.sr.json +1 -1
- package/dist/cdn/assets/carousel/t9n/messages.sv.json +1 -1
- package/dist/cdn/assets/carousel/t9n/messages.th.json +1 -1
- package/dist/cdn/assets/carousel/t9n/messages.tr.json +1 -1
- package/dist/cdn/assets/carousel/t9n/messages.uk.json +1 -1
- package/dist/cdn/assets/carousel/t9n/messages.vi.json +1 -1
- package/dist/cdn/assets/carousel/t9n/messages.zh-CN.json +1 -1
- package/dist/cdn/assets/carousel/t9n/messages.zh-HK.json +1 -1
- package/dist/cdn/assets/carousel/t9n/messages.zh-TW.json +1 -1
- package/dist/cdn/assets/combobox/t9n/messages.en.json +1 -1
- package/dist/cdn/assets/combobox/t9n/messages.json +1 -1
- package/dist/cdn/assets/icon/bicycleTravelMode16.json +1 -0
- package/dist/cdn/assets/icon/bicycleTravelMode16F.json +1 -0
- package/dist/cdn/assets/icon/bicycleTravelMode24.json +1 -0
- package/dist/cdn/assets/icon/bicycleTravelMode24F.json +1 -0
- package/dist/cdn/assets/icon/bicycleTravelMode32.json +1 -0
- package/dist/cdn/assets/icon/bicycleTravelMode32F.json +1 -0
- package/dist/cdn/assets/icon/busTravelMode16.json +1 -0
- package/dist/cdn/assets/icon/busTravelMode16F.json +1 -0
- package/dist/cdn/assets/icon/busTravelMode24.json +1 -0
- package/dist/cdn/assets/icon/busTravelMode24F.json +1 -0
- package/dist/cdn/assets/icon/busTravelMode32.json +1 -0
- package/dist/cdn/assets/icon/busTravelMode32F.json +1 -0
- package/dist/cdn/assets/icon/carTravelMode16.json +1 -0
- package/dist/cdn/assets/icon/carTravelMode16F.json +1 -0
- package/dist/cdn/assets/icon/carTravelMode24.json +1 -0
- package/dist/cdn/assets/icon/carTravelMode24F.json +1 -0
- package/dist/cdn/assets/icon/carTravelMode32.json +1 -0
- package/dist/cdn/assets/icon/carTravelMode32F.json +1 -0
- package/dist/cdn/assets/icon/emergency16.json +1 -0
- package/dist/cdn/assets/icon/emergency16F.json +1 -0
- package/dist/cdn/assets/icon/emergency24.json +1 -0
- package/dist/cdn/assets/icon/emergency24F.json +1 -0
- package/dist/cdn/assets/icon/emergency32.json +1 -0
- package/dist/cdn/assets/icon/emergency32F.json +1 -0
- package/dist/cdn/assets/icon/eyedropper16.json +1 -1
- package/dist/cdn/assets/icon/eyedropper24.json +1 -1
- package/dist/cdn/assets/icon/eyedropper32.json +1 -1
- package/dist/cdn/assets/icon/fileBim16.json +1 -0
- package/dist/cdn/assets/icon/fileBim24.json +1 -0
- package/dist/cdn/assets/icon/fileBim32.json +1 -0
- package/dist/cdn/assets/icon/fileDwg16.json +1 -0
- package/dist/cdn/assets/icon/fileDwg24.json +1 -0
- package/dist/cdn/assets/icon/fileDwg32.json +1 -0
- package/dist/cdn/assets/icon/fileRvt16.json +1 -0
- package/dist/cdn/assets/icon/fileRvt24.json +1 -0
- package/dist/cdn/assets/icon/fileRvt32.json +1 -0
- package/dist/cdn/assets/icon/gradient16.json +1 -0
- package/dist/cdn/assets/icon/gradient24.json +1 -0
- package/dist/cdn/assets/icon/gradient32.json +1 -0
- package/dist/cdn/assets/icon/layerStreamSetting16.json +1 -0
- package/dist/cdn/assets/icon/layerStreamSetting24.json +1 -0
- package/dist/cdn/assets/icon/layerStreamSetting32.json +1 -0
- package/dist/cdn/assets/icon/mopedTravelMode16.json +1 -0
- package/dist/cdn/assets/icon/mopedTravelMode16F.json +1 -0
- package/dist/cdn/assets/icon/mopedTravelMode24.json +1 -0
- package/dist/cdn/assets/icon/mopedTravelMode24F.json +1 -0
- package/dist/cdn/assets/icon/mopedTravelMode32.json +1 -0
- package/dist/cdn/assets/icon/mopedTravelMode32F.json +1 -0
- package/dist/cdn/assets/icon/motorcycleTravelMode16.json +1 -0
- package/dist/cdn/assets/icon/motorcycleTravelMode16F.json +1 -0
- package/dist/cdn/assets/icon/motorcycleTravelMode24.json +1 -0
- package/dist/cdn/assets/icon/motorcycleTravelMode24F.json +1 -0
- package/dist/cdn/assets/icon/motorcycleTravelMode32.json +1 -0
- package/dist/cdn/assets/icon/motorcycleTravelMode32F.json +1 -0
- package/dist/cdn/assets/icon/publish16.json +1 -0
- package/dist/cdn/assets/icon/publish24.json +1 -0
- package/dist/cdn/assets/icon/publish32.json +1 -0
- package/dist/cdn/assets/icon/scooterTravelMode16.json +1 -0
- package/dist/cdn/assets/icon/scooterTravelMode16F.json +1 -0
- package/dist/cdn/assets/icon/scooterTravelMode24.json +1 -0
- package/dist/cdn/assets/icon/scooterTravelMode24F.json +1 -0
- package/dist/cdn/assets/icon/scooterTravelMode32.json +1 -0
- package/dist/cdn/assets/icon/scooterTravelMode32F.json +1 -0
- package/dist/cdn/assets/icon/shuttleTravelMode16.json +1 -0
- package/dist/cdn/assets/icon/shuttleTravelMode16F.json +1 -0
- package/dist/cdn/assets/icon/shuttleTravelMode24.json +1 -0
- package/dist/cdn/assets/icon/shuttleTravelMode24F.json +1 -0
- package/dist/cdn/assets/icon/shuttleTravelMode32.json +1 -0
- package/dist/cdn/assets/icon/shuttleTravelMode32F.json +1 -0
- package/dist/cdn/assets/icon/strollerTravelMode16.json +1 -0
- package/dist/cdn/assets/icon/strollerTravelMode16F.json +1 -0
- package/dist/cdn/assets/icon/strollerTravelMode24.json +1 -0
- package/dist/cdn/assets/icon/strollerTravelMode24F.json +1 -0
- package/dist/cdn/assets/icon/strollerTravelMode32.json +1 -0
- package/dist/cdn/assets/icon/strollerTravelMode32F.json +1 -0
- package/dist/cdn/assets/icon/trainTravelMode16.json +1 -0
- package/dist/cdn/assets/icon/trainTravelMode16F.json +1 -0
- package/dist/cdn/assets/icon/trainTravelMode24.json +1 -0
- package/dist/cdn/assets/icon/trainTravelMode24F.json +1 -0
- package/dist/cdn/assets/icon/trainTravelMode32.json +1 -0
- package/dist/cdn/assets/icon/trainTravelMode32F.json +1 -0
- package/dist/cdn/assets/icon/tramTravelMode16.json +1 -0
- package/dist/cdn/assets/icon/tramTravelMode16F.json +1 -0
- package/dist/cdn/assets/icon/tramTravelMode24.json +1 -0
- package/dist/cdn/assets/icon/tramTravelMode24F.json +1 -0
- package/dist/cdn/assets/icon/tramTravelMode32.json +1 -0
- package/dist/cdn/assets/icon/tramTravelMode32F.json +1 -0
- package/dist/cdn/assets/icon/truckTravelMode16.json +1 -0
- package/dist/cdn/assets/icon/truckTravelMode16F.json +1 -0
- package/dist/cdn/assets/icon/truckTravelMode24.json +1 -0
- package/dist/cdn/assets/icon/truckTravelMode24F.json +1 -0
- package/dist/cdn/assets/icon/truckTravelMode32.json +1 -0
- package/dist/cdn/assets/icon/truckTravelMode32F.json +1 -0
- package/dist/cdn/assets/icon/velocityServer16.json +1 -0
- package/dist/cdn/assets/icon/velocityServer24.json +1 -0
- package/dist/cdn/assets/icon/velocityServer32.json +1 -0
- package/dist/cdn/assets/icon/walkingTravelMode16.json +1 -0
- package/dist/cdn/assets/icon/walkingTravelMode16F.json +1 -0
- package/dist/cdn/assets/icon/walkingTravelMode24.json +1 -0
- package/dist/cdn/assets/icon/walkingTravelMode24F.json +1 -0
- package/dist/cdn/assets/icon/walkingTravelMode32.json +1 -0
- package/dist/cdn/assets/icon/walkingTravelMode32F.json +1 -0
- package/dist/cdn/assets/icon/wheelchairTravelMode16.json +1 -0
- package/dist/cdn/assets/icon/wheelchairTravelMode16F.json +1 -0
- package/dist/cdn/assets/icon/wheelchairTravelMode24.json +1 -0
- package/dist/cdn/assets/icon/wheelchairTravelMode24F.json +1 -0
- package/dist/cdn/assets/icon/wheelchairTravelMode32.json +1 -0
- package/dist/cdn/assets/icon/wheelchairTravelMode32F.json +1 -0
- package/dist/cdn/index.js +2 -2
- package/dist/cdn/main.css +1 -1
- package/dist/chunks/ExpandToggle.js +4 -5
- package/dist/chunks/dom.js +20 -26
- package/dist/chunks/floating-ui.js +3 -6
- package/dist/chunks/form.js +0 -1
- package/dist/chunks/label.js +1 -1
- package/dist/chunks/locale.js +29 -12
- package/dist/chunks/openCloseComponent.js +1 -1
- package/dist/chunks/runtime.js +4 -4
- package/dist/chunks/useFocusTrap.js +1 -1
- package/dist/chunks/useForm.js +292 -0
- package/dist/chunks/useReferenceElement.js +505 -0
- package/dist/chunks/useSetFocus.js +1 -1
- package/dist/chunks/utils2.js +1 -1
- package/dist/components/calcite-accordion-item/customElement.d.ts +5 -5
- package/dist/components/calcite-accordion-item/customElement.js +4 -3
- package/dist/components/calcite-action/customElement.d.ts +7 -7
- package/dist/components/calcite-action-bar/customElement.d.ts +18 -1
- package/dist/components/calcite-action-bar/customElement.js +40 -13
- package/dist/components/calcite-action-group/customElement.d.ts +6 -0
- package/dist/components/calcite-action-group/customElement.js +38 -13
- package/dist/components/calcite-action-pad/customElement.js +4 -2
- package/dist/components/calcite-alert/customElement.js +2 -2
- package/dist/components/calcite-autocomplete/customElement.js +3 -1
- package/dist/components/calcite-autocomplete-item/customElement.js +1 -1
- package/dist/components/calcite-avatar/customElement.js +1 -1
- package/dist/components/calcite-block/customElement.d.ts +3 -3
- package/dist/components/calcite-block/customElement.js +2 -2
- package/dist/components/calcite-block-group/customElement.js +1 -1
- package/dist/components/calcite-button/customElement.js +2 -2
- package/dist/components/calcite-card/customElement.d.ts +3 -3
- package/dist/components/calcite-card-group/customElement.d.ts +1 -1
- package/dist/components/calcite-carousel/customElement.js +27 -25
- package/dist/components/calcite-checkbox/customElement.d.ts +1 -1
- package/dist/components/calcite-checkbox/customElement.js +9 -9
- package/dist/components/calcite-chip/customElement.d.ts +1 -1
- package/dist/components/calcite-chip/customElement.js +1 -1
- package/dist/components/calcite-chip-group/customElement.js +1 -1
- package/dist/components/calcite-color-picker/customElement.js +4 -2
- package/dist/components/calcite-color-picker-swatch/customElement.js +1 -1
- package/dist/components/calcite-combobox/customElement.d.ts +14 -3
- package/dist/components/calcite-combobox/customElement.js +26 -19
- package/dist/components/calcite-combobox-item/customElement.d.ts +1 -1
- package/dist/components/calcite-combobox-item/customElement.js +10 -4
- package/dist/components/calcite-date-picker-month/customElement.js +1 -1
- package/dist/components/calcite-date-picker-month-header/customElement.js +2 -2
- package/dist/components/calcite-dialog/customElement.d.ts +2 -0
- package/dist/components/calcite-dialog/customElement.js +2 -2
- package/dist/components/calcite-dropdown/customElement.d.ts +2 -2
- package/dist/components/calcite-dropdown/customElement.js +143 -82
- package/dist/components/calcite-dropdown-item/customElement.d.ts +1 -1
- package/dist/components/calcite-dropdown-item/customElement.js +14 -32
- package/dist/components/calcite-filter/customElement.js +4 -2
- package/dist/components/calcite-flow-item/customElement.d.ts +5 -3
- package/dist/components/calcite-flow-item/customElement.js +4 -4
- package/dist/components/calcite-icon/customElement.d.ts +1 -1
- package/dist/components/calcite-icon/customElement.js +4 -3
- package/dist/components/calcite-inline-editable/customElement.js +1 -1
- package/dist/components/calcite-input/customElement.d.ts +1 -1
- package/dist/components/calcite-input/customElement.js +19 -28
- package/dist/components/calcite-input-date-picker/customElement.d.ts +2 -2
- package/dist/components/calcite-input-date-picker/customElement.js +33 -14
- package/dist/components/calcite-input-message/customElement.d.ts +1 -1
- package/dist/components/calcite-input-message/customElement.js +1 -1
- package/dist/components/calcite-input-number/customElement.d.ts +1 -1
- package/dist/components/calcite-input-number/customElement.js +16 -28
- package/dist/components/calcite-input-text/customElement.d.ts +1 -1
- package/dist/components/calcite-input-text/customElement.js +15 -27
- package/dist/components/calcite-input-time-picker/customElement.d.ts +1 -1
- package/dist/components/calcite-input-time-picker/customElement.js +13 -11
- package/dist/components/calcite-input-time-zone/customElement.d.ts +1 -1
- package/dist/components/calcite-input-time-zone/customElement.js +20 -5
- package/dist/components/calcite-link/customElement.js +4 -3
- package/dist/components/calcite-list/customElement.js +26 -4
- package/dist/components/calcite-list-item/customElement.js +6 -4
- package/dist/components/calcite-list-item-group/customElement.js +1 -1
- package/dist/components/calcite-loader/customElement.d.ts +1 -1
- package/dist/components/calcite-menu/customElement.js +1 -1
- package/dist/components/calcite-menu-item/customElement.js +4 -2
- package/dist/components/calcite-meter/customElement.d.ts +7 -1
- package/dist/components/calcite-meter/customElement.js +0 -4
- package/dist/components/calcite-navigation/customElement.d.ts +1 -1
- package/dist/components/calcite-notice/customElement.d.ts +2 -2
- package/dist/components/calcite-notice/customElement.js +1 -1
- package/dist/components/calcite-pagination/customElement.js +1 -1
- package/dist/components/calcite-panel/customElement.d.ts +7 -5
- package/dist/components/calcite-panel/customElement.js +2 -2
- package/dist/components/calcite-popover/customElement.d.ts +6 -2
- package/dist/components/calcite-popover/customElement.js +16 -177
- package/dist/components/calcite-progress/customElement.js +3 -2
- package/dist/components/calcite-radio-button/customElement.js +3 -3
- package/dist/components/calcite-rating/customElement.d.ts +1 -1
- package/dist/components/calcite-rating/customElement.js +11 -4
- package/dist/components/calcite-scrim/customElement.js +1 -1
- package/dist/components/calcite-segmented-control/customElement.js +12 -8
- package/dist/components/calcite-segmented-control-item/customElement.js +2 -2
- package/dist/components/calcite-select/customElement.d.ts +1 -1
- package/dist/components/calcite-select/customElement.js +7 -5
- package/dist/components/calcite-sheet/customElement.js +9 -6
- package/dist/components/calcite-shell/customElement.js +1 -1
- package/dist/components/calcite-shell-panel/customElement.js +7 -5
- package/dist/components/calcite-slider/customElement.d.ts +1 -1
- package/dist/components/calcite-slider/customElement.js +11 -8
- package/dist/components/calcite-sort-handle/customElement.d.ts +2 -2
- package/dist/components/calcite-sort-handle/customElement.js +44 -17
- package/dist/components/calcite-sortable-list/customElement.js +1 -1
- package/dist/components/calcite-split-button/customElement.d.ts +3 -3
- package/dist/components/calcite-stepper/customElement.d.ts +2 -2
- package/dist/components/calcite-stepper/customElement.js +31 -44
- package/dist/components/calcite-stepper-item/customElement.js +4 -10
- package/dist/components/calcite-swatch-group/customElement.js +1 -1
- package/dist/components/calcite-switch/customElement.d.ts +3 -3
- package/dist/components/calcite-switch/customElement.js +9 -8
- package/dist/components/calcite-tab/customElement.d.ts +1 -1
- package/dist/components/calcite-tab/customElement.js +2 -2
- package/dist/components/calcite-tab-nav/customElement.js +4 -2
- package/dist/components/calcite-tab-title/customElement.js +6 -4
- package/dist/components/calcite-table-cell/customElement.d.ts +5 -2
- package/dist/components/calcite-table-cell/customElement.js +3 -2
- package/dist/components/calcite-table-header/customElement.d.ts +1 -1
- package/dist/components/calcite-table-row/customElement.d.ts +7 -2
- package/dist/components/calcite-tabs/customElement.js +1 -1
- package/dist/components/calcite-text-area/customElement.d.ts +1 -1
- package/dist/components/calcite-text-area/customElement.js +30 -22
- package/dist/components/calcite-time-picker/customElement.js +3 -2
- package/dist/components/calcite-tooltip/customElement.d.ts +14 -1
- package/dist/components/calcite-tooltip/customElement.js +27 -316
- package/dist/components/calcite-tree/customElement.js +1 -1
- package/dist/components/calcite-tree-item/customElement.js +5 -4
- package/dist/controllers/useForm.d.ts +3 -0
- package/dist/docs/api.json +1 -1
- package/dist/docs/docs.json +1 -1
- package/dist/docs/supported-browsers.json +1 -1
- package/dist/docs/translations.json +1 -1
- package/dist/docs/vscode.css-custom-data.json +1 -1
- package/dist/docs/vscode.html-custom-data.json +1 -1
- package/dist/docs/web-types.json +1 -1
- package/dist/loader.js +19 -19
- package/dist/types/lumina.d.ts +4 -3
- package/dist/types/preact.d.ts +4 -3
- package/dist/types/react.d.ts +4 -3
- package/dist/types/stencil.d.ts +4 -3
- package/package.json +13 -15
- package/dist/cdn/2U5PSAQA.js +0 -2
- package/dist/cdn/3ET26IGR.js +0 -2
- package/dist/cdn/3GZ2KUSD.js +0 -4
- package/dist/cdn/46JWP6QH.js +0 -2
- package/dist/cdn/4ET37OQN.js +0 -2
- package/dist/cdn/4MQ5CZTF.js +0 -2
- package/dist/cdn/5P6O6RLU.js +0 -2
- package/dist/cdn/5YSE3JQB.js +0 -2
- package/dist/cdn/6HBOEH4L.js +0 -2
- package/dist/cdn/6X5WFIW5.js +0 -2
- package/dist/cdn/7D3UIKHB.js +0 -2
- package/dist/cdn/7G65TWZB.js +0 -2
- package/dist/cdn/7OLKRER5.js +0 -2
- package/dist/cdn/AAXLKIZ7.js +0 -2
- package/dist/cdn/AQRVO6YL.js +0 -2
- package/dist/cdn/B2FE5RJQ.js +0 -2
- package/dist/cdn/B4AHIOK6.js +0 -2
- package/dist/cdn/BGBGA5KM.js +0 -2
- package/dist/cdn/BGF7OBO4.js +0 -2
- package/dist/cdn/BPCJT3LK.js +0 -2
- package/dist/cdn/DJLQC7PY.js +0 -2
- package/dist/cdn/DUSXTN5B.js +0 -2
- package/dist/cdn/DZ5ORZ4Q.js +0 -2
- package/dist/cdn/E4KO2JMO.js +0 -2
- package/dist/cdn/EHHFFQ5C.js +0 -2
- package/dist/cdn/EMG5J5GS.js +0 -2
- package/dist/cdn/GHELPXNP.js +0 -2
- package/dist/cdn/GKESRFN6.js +0 -2
- package/dist/cdn/GLNZPY7U.js +0 -2
- package/dist/cdn/GMX3WN5W.js +0 -2
- package/dist/cdn/HYSVC5WB.js +0 -2
- package/dist/cdn/JAEA43OM.js +0 -2
- package/dist/cdn/K42V3JMR.js +0 -2
- package/dist/cdn/K4M6Q6RD.js +0 -2
- package/dist/cdn/MDFIYOM5.js +0 -2
- package/dist/cdn/MUMMPHC7.js +0 -2
- package/dist/cdn/NEGL7QRS.js +0 -2
- package/dist/cdn/NFANMRDE.js +0 -2
- package/dist/cdn/NJ5HQYMV.js +0 -2
- package/dist/cdn/NUPSBSY7.js +0 -2
- package/dist/cdn/O6MXDJZR.js +0 -2
- package/dist/cdn/OIRHZD4H.js +0 -2
- package/dist/cdn/PBONW5I3.js +0 -2
- package/dist/cdn/PSEC7XXQ.js +0 -2
- package/dist/cdn/Q5DQBIB4.js +0 -2
- package/dist/cdn/QNC4EF2O.js +0 -2
- package/dist/cdn/QVTOF6TU.js +0 -2
- package/dist/cdn/QVXB52JH.js +0 -2
- package/dist/cdn/QW2CVMVB.js +0 -2
- package/dist/cdn/SX44SDYI.js +0 -2
- package/dist/cdn/TQRHJK6H.js +0 -2
- package/dist/cdn/TTKLVHBH.js +0 -2
- package/dist/cdn/UPHLM2X5.js +0 -2
- package/dist/cdn/UZIHBQZP.js +0 -2
- package/dist/cdn/VZPS55DG.js +0 -2
- package/dist/cdn/X2KQUG6U.js +0 -2
- package/dist/cdn/XXJROKIX.js +0 -2
- package/dist/cdn/XYKEEJWE.js +0 -2
- package/dist/cdn/YBRP4PI7.js +0 -2
- package/dist/cdn/YHK5UJDG.js +0 -2
- package/dist/cdn/Z7C2M7DB.js +0 -2
- package/dist/cdn/ZQIARG3S.js +0 -2
- package/dist/cdn/ZQLGBHLZ.js +0 -2
- package/dist/chunks/FloatingArrow.js +0 -24
- package/dist/chunks/input.js +0 -30
package/dist/chunks/runtime.js
CHANGED
|
@@ -60,9 +60,9 @@ function getConfig() {
|
|
|
60
60
|
}
|
|
61
61
|
return effectiveConfig;
|
|
62
62
|
}
|
|
63
|
-
const version = "5.1.0-next.
|
|
64
|
-
const buildDate = "2026-
|
|
65
|
-
const revision = "
|
|
63
|
+
const version = "5.1.0-next.21";
|
|
64
|
+
const buildDate = "2026-03-25";
|
|
65
|
+
const revision = "ba911ec84";
|
|
66
66
|
function stampVersion() {
|
|
67
67
|
const config = getConfig();
|
|
68
68
|
if (config && config.version) {
|
|
@@ -85,7 +85,7 @@ if (!isServer) {
|
|
|
85
85
|
if (process.env.NODE_ENV !== "test") {
|
|
86
86
|
queueMicrotask(stampVersion);
|
|
87
87
|
}
|
|
88
|
-
const runtime = makeRuntime({ defaultAssetPath: "https://cdn.jsdelivr.net/npm/@esri/calcite-components@5.1.0-next.
|
|
88
|
+
const runtime = makeRuntime({ defaultAssetPath: "https://cdn.jsdelivr.net/npm/@esri/calcite-components@5.1.0-next.21/dist/cdn/", hydratedAttribute: "calcite-hydrated" });
|
|
89
89
|
const { customElement, getAssetPath, setAssetPath } = runtime;
|
|
90
90
|
export {
|
|
91
91
|
CSS_UTILITY as C,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
2
|
import { makeGenericController } from "@arcgis/lumina/controllers";
|
|
3
3
|
import { createFocusTrap } from "focus-trap";
|
|
4
|
-
import { t as tabbableOptions,
|
|
4
|
+
import { t as tabbableOptions, i as focusElement } from "./dom.js";
|
|
5
5
|
import { a as getConfig } from "./runtime.js";
|
|
6
6
|
function getEffectiveContainerElements(targetEl, { focusTrapOptions }, extraContainers) {
|
|
7
7
|
if (!focusTrapOptions?.extraContainers && !extraContainers) {
|
|
@@ -0,0 +1,292 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
+
import { makeGenericController } from "@arcgis/lumina/controllers";
|
|
3
|
+
import { uncapitalize, kebabToPascal } from "@arcgis/toolkit/string";
|
|
4
|
+
import { r as isCalciteFocusable } from "./dom.js";
|
|
5
|
+
import "lit";
|
|
6
|
+
const minMaxStepTypes = ["date", "datetime-local", "month", "number", "range", "time", "week"];
|
|
7
|
+
const patternTypes = ["email", "password", "search", "tel", "text", "url"];
|
|
8
|
+
const minMaxLengthTypes = ["email", "password", "search", "tel", "text", "textarea", "url"];
|
|
9
|
+
function updateConstraintValidation(inputComponent, input, propName, matchesType) {
|
|
10
|
+
const attributeName = propName.toLowerCase();
|
|
11
|
+
const value = inputComponent[propName];
|
|
12
|
+
if (matchesType && value != null) {
|
|
13
|
+
input.setAttribute(attributeName, `${value}`);
|
|
14
|
+
} else {
|
|
15
|
+
input.removeAttribute(attributeName);
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
function syncInputDelegate(type, inputComponent, input) {
|
|
19
|
+
input.type = type;
|
|
20
|
+
const isMinMaxStepType = minMaxStepTypes.includes(type);
|
|
21
|
+
const numericInputComponent = inputComponent;
|
|
22
|
+
updateConstraintValidation(numericInputComponent, input, "min", isMinMaxStepType);
|
|
23
|
+
updateConstraintValidation(numericInputComponent, input, "max", isMinMaxStepType);
|
|
24
|
+
updateConstraintValidation(numericInputComponent, input, "step", isMinMaxStepType);
|
|
25
|
+
const isMinMaxLengthType = minMaxLengthTypes.includes(type);
|
|
26
|
+
const textualInputComponent = inputComponent;
|
|
27
|
+
updateConstraintValidation(textualInputComponent, input, "minLength", isMinMaxLengthType);
|
|
28
|
+
updateConstraintValidation(textualInputComponent, input, "maxLength", isMinMaxLengthType);
|
|
29
|
+
const isPatternType = patternTypes.includes(type);
|
|
30
|
+
updateConstraintValidation(textualInputComponent, input, "pattern", isPatternType);
|
|
31
|
+
}
|
|
32
|
+
function isSupportedType(type) {
|
|
33
|
+
const effectiveType = type === "textarea" ? "text" : type;
|
|
34
|
+
return minMaxStepTypes.includes(effectiveType) || patternTypes.includes(effectiveType) || minMaxLengthTypes.includes(effectiveType);
|
|
35
|
+
}
|
|
36
|
+
const joinableValueTypes = ["text", "email", "search", "hidden", "tel", "url"];
|
|
37
|
+
const allValid = Object.freeze({ validity: {}, validationMessage: "" });
|
|
38
|
+
function validate(input, value) {
|
|
39
|
+
if (!Array.isArray(value)) {
|
|
40
|
+
if (validateValue(input, value)) {
|
|
41
|
+
return allValid;
|
|
42
|
+
}
|
|
43
|
+
return {
|
|
44
|
+
validity: getValidityFlags(input.validity),
|
|
45
|
+
validationMessage: input.validationMessage
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
if (joinableValueTypes.includes(input.type)) {
|
|
49
|
+
if (validateValue(input, value.join(","))) {
|
|
50
|
+
return allValid;
|
|
51
|
+
}
|
|
52
|
+
return {
|
|
53
|
+
validity: getValidityFlags(input.validity),
|
|
54
|
+
validationMessage: input.validationMessage
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
const mergedValidity = {};
|
|
58
|
+
const validationMessages = [];
|
|
59
|
+
for (const item of value) {
|
|
60
|
+
if (validateValue(input, item)) {
|
|
61
|
+
continue;
|
|
62
|
+
}
|
|
63
|
+
Object.assign(mergedValidity, getValidityFlags(input.validity));
|
|
64
|
+
if (input.validationMessage) {
|
|
65
|
+
validationMessages.push(input.validationMessage);
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
return {
|
|
69
|
+
validity: mergedValidity,
|
|
70
|
+
validationMessage: validationMessages.join("; ")
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
function validateValue(inputDelegate, valueToValidate) {
|
|
74
|
+
inputDelegate.value = // file will throw if non-empty string is provided
|
|
75
|
+
inputDelegate.type === "file" || valueToValidate == null ? "" : String(valueToValidate);
|
|
76
|
+
return inputDelegate.validity.valid;
|
|
77
|
+
}
|
|
78
|
+
function getValidityFlags(validityState) {
|
|
79
|
+
const validityFlags = {};
|
|
80
|
+
for (const key in validityState) {
|
|
81
|
+
if (key !== "valid" && validityState[key]) {
|
|
82
|
+
validityFlags[key] = true;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
return validityFlags;
|
|
86
|
+
}
|
|
87
|
+
const componentsWithInputEvent = [
|
|
88
|
+
"calcite-input",
|
|
89
|
+
"calcite-input-number",
|
|
90
|
+
"calcite-input-text",
|
|
91
|
+
"calcite-text-area"
|
|
92
|
+
];
|
|
93
|
+
function getClearValidationEventName(componentTag) {
|
|
94
|
+
const componentTagCamelCase = uncapitalize(kebabToPascal(componentTag));
|
|
95
|
+
return `${componentTagCamelCase}${componentsWithInputEvent.includes(componentTag) ? "Input" : "Change"}`;
|
|
96
|
+
}
|
|
97
|
+
function isFormComponentEl(el) {
|
|
98
|
+
return "form" in el && "name" in el && isCalciteFocusable(el);
|
|
99
|
+
}
|
|
100
|
+
function displayValidationMessage(component, { status, message, icon }) {
|
|
101
|
+
if ("status" in component) {
|
|
102
|
+
component.status = status;
|
|
103
|
+
}
|
|
104
|
+
if ("validationIcon" in component && typeof component.validationIcon !== "string") {
|
|
105
|
+
component.validationIcon = icon;
|
|
106
|
+
}
|
|
107
|
+
if ("validationMessage" in component && !component.validationMessage) {
|
|
108
|
+
component.validationMessage = message;
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
function syncInternalInput(component, input) {
|
|
112
|
+
const { disabled, required } = component;
|
|
113
|
+
input.disabled = disabled;
|
|
114
|
+
input.required = !!required;
|
|
115
|
+
if (isCheckable(component)) {
|
|
116
|
+
input.checked = component.checked;
|
|
117
|
+
} else if (isInputComponent(component, input)) {
|
|
118
|
+
syncInputDelegate(input.type, component, input);
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
function isCheckable(component) {
|
|
122
|
+
return "checked" in component;
|
|
123
|
+
}
|
|
124
|
+
function isInputComponent(component, input) {
|
|
125
|
+
return component && isSupportedType(input.type);
|
|
126
|
+
}
|
|
127
|
+
function focusFirstInvalidFormElement(form) {
|
|
128
|
+
const formElements = Array.from(form.elements);
|
|
129
|
+
requestAnimationFrame(() => {
|
|
130
|
+
const invalidEls = formElements.filter(
|
|
131
|
+
(el) => el.matches("[status=invalid]") && isFormComponentEl(el)
|
|
132
|
+
);
|
|
133
|
+
for (const el of invalidEls) {
|
|
134
|
+
if (el.validationMessage) {
|
|
135
|
+
el.setFocus();
|
|
136
|
+
break;
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
});
|
|
140
|
+
}
|
|
141
|
+
const useForm = (options) => {
|
|
142
|
+
return makeGenericController((component, controller) => {
|
|
143
|
+
let customValidityMessage = "";
|
|
144
|
+
let inputDelegate;
|
|
145
|
+
let lastAssociatedForm = null;
|
|
146
|
+
let effectiveInputType = options.inputType;
|
|
147
|
+
if (effectiveInputType) {
|
|
148
|
+
inputDelegate = document.createElement("input");
|
|
149
|
+
}
|
|
150
|
+
function invalidFormHandler(event) {
|
|
151
|
+
if (event.defaultPrevented) {
|
|
152
|
+
return;
|
|
153
|
+
}
|
|
154
|
+
event.preventDefault();
|
|
155
|
+
const form = event.currentTarget;
|
|
156
|
+
focusFirstInvalidFormElement(form);
|
|
157
|
+
}
|
|
158
|
+
function onFormReset() {
|
|
159
|
+
if ("status" in component) {
|
|
160
|
+
component.status = "idle";
|
|
161
|
+
}
|
|
162
|
+
if ("validationIcon" in component) {
|
|
163
|
+
component.validationIcon = false;
|
|
164
|
+
}
|
|
165
|
+
if ("validationMessage" in component) {
|
|
166
|
+
component.validationMessage = "";
|
|
167
|
+
}
|
|
168
|
+
if (isCheckable(component)) {
|
|
169
|
+
component.checked = component.defaultChecked;
|
|
170
|
+
}
|
|
171
|
+
component.value = component.defaultValue;
|
|
172
|
+
}
|
|
173
|
+
component.listen("luminaFormResetCallback", () => {
|
|
174
|
+
onFormReset();
|
|
175
|
+
});
|
|
176
|
+
component.listen("luminaFormAssociatedCallback", ({ detail: [form] }) => {
|
|
177
|
+
if (form) {
|
|
178
|
+
form.addEventListener("invalid", invalidFormHandler, { capture: true });
|
|
179
|
+
} else {
|
|
180
|
+
lastAssociatedForm?.removeEventListener("invalid", invalidFormHandler, { capture: true });
|
|
181
|
+
}
|
|
182
|
+
lastAssociatedForm = form;
|
|
183
|
+
});
|
|
184
|
+
function handleInvalidInput() {
|
|
185
|
+
const validationMsg = customValidityMessage || inputDelegate?.validationMessage || "";
|
|
186
|
+
component.el.dispatchEvent(
|
|
187
|
+
// allows users to set custom validation messages
|
|
188
|
+
new CustomEvent("calciteInvalid", { bubbles: true, composed: true })
|
|
189
|
+
);
|
|
190
|
+
displayValidationMessage(component, {
|
|
191
|
+
message: validationMsg,
|
|
192
|
+
icon: true,
|
|
193
|
+
status: "invalid"
|
|
194
|
+
});
|
|
195
|
+
const clearValidationEvent = getClearValidationEventName(component.el.tagName.toLowerCase());
|
|
196
|
+
component.listen(
|
|
197
|
+
clearValidationEvent,
|
|
198
|
+
() => {
|
|
199
|
+
if ("status" in component) {
|
|
200
|
+
component.status = "idle";
|
|
201
|
+
}
|
|
202
|
+
if ("validationIcon" in component && (!component.validationIcon || component.validationIcon === true)) {
|
|
203
|
+
component.validationIcon = false;
|
|
204
|
+
}
|
|
205
|
+
if ("validationMessage" in component && component.validationMessage === validationMsg) {
|
|
206
|
+
component.validationMessage = "";
|
|
207
|
+
}
|
|
208
|
+
},
|
|
209
|
+
{ once: true }
|
|
210
|
+
);
|
|
211
|
+
}
|
|
212
|
+
controller.onConnected(() => {
|
|
213
|
+
component.el.addEventListener("invalid", handleInvalidInput);
|
|
214
|
+
});
|
|
215
|
+
controller.onDisconnected(() => {
|
|
216
|
+
component.el.removeEventListener("invalid", handleInvalidInput);
|
|
217
|
+
});
|
|
218
|
+
controller.onUpdate((changes) => {
|
|
219
|
+
if (!component.hasUpdated) {
|
|
220
|
+
component.defaultValue = component.value;
|
|
221
|
+
if (isCheckable(component)) {
|
|
222
|
+
component.defaultChecked = component.checked;
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
if (changes.has("name") || changes.has("value") || isCheckable(component) && changes.has("checked")) {
|
|
226
|
+
component.elementInternals.setFormValue(getFormValue());
|
|
227
|
+
}
|
|
228
|
+
updateValidity();
|
|
229
|
+
});
|
|
230
|
+
function updateValidity() {
|
|
231
|
+
const { elementInternals } = component;
|
|
232
|
+
let validity = {};
|
|
233
|
+
let validationMessage = "";
|
|
234
|
+
if (inputDelegate) {
|
|
235
|
+
inputDelegate.type = effectiveInputType;
|
|
236
|
+
syncInternalInput(component, inputDelegate);
|
|
237
|
+
({ validity, validationMessage } = validate(inputDelegate, getComponentValue()));
|
|
238
|
+
}
|
|
239
|
+
if (customValidityMessage) {
|
|
240
|
+
validity = { ...validity, customError: true };
|
|
241
|
+
validationMessage = customValidityMessage;
|
|
242
|
+
}
|
|
243
|
+
elementInternals.setValidity(validity, validationMessage);
|
|
244
|
+
if ("validity" in component) {
|
|
245
|
+
component.validity = elementInternals.validity;
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
function getComponentValue() {
|
|
249
|
+
if (options.getValue) {
|
|
250
|
+
return options.getValue();
|
|
251
|
+
}
|
|
252
|
+
return component.value;
|
|
253
|
+
}
|
|
254
|
+
function getFormValue() {
|
|
255
|
+
const value = getComponentValue();
|
|
256
|
+
if (Array.isArray(value)) {
|
|
257
|
+
const formData = new FormData();
|
|
258
|
+
value.forEach((value2) => formData.append(component.name, value2));
|
|
259
|
+
return formData;
|
|
260
|
+
}
|
|
261
|
+
if (isCheckable(component)) {
|
|
262
|
+
if (component.checked) {
|
|
263
|
+
return value || "on";
|
|
264
|
+
}
|
|
265
|
+
return null;
|
|
266
|
+
}
|
|
267
|
+
return value;
|
|
268
|
+
}
|
|
269
|
+
return {
|
|
270
|
+
get active() {
|
|
271
|
+
return !!component.elementInternals.form;
|
|
272
|
+
},
|
|
273
|
+
overrideDefaultValue: (value) => {
|
|
274
|
+
component.defaultValue = value;
|
|
275
|
+
},
|
|
276
|
+
overrideInputType: (type) => {
|
|
277
|
+
effectiveInputType = type;
|
|
278
|
+
updateValidity();
|
|
279
|
+
},
|
|
280
|
+
requestSubmit: () => {
|
|
281
|
+
component.elementInternals.form?.requestSubmit();
|
|
282
|
+
},
|
|
283
|
+
setCustomValidity: (message) => {
|
|
284
|
+
customValidityMessage = message;
|
|
285
|
+
updateValidity();
|
|
286
|
+
}
|
|
287
|
+
};
|
|
288
|
+
});
|
|
289
|
+
};
|
|
290
|
+
export {
|
|
291
|
+
useForm as u
|
|
292
|
+
};
|