@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
|
@@ -7,8 +7,8 @@ import type { StepperLayout } from "./interfaces.js";
|
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* @cssproperty [--calcite-stepper-bar-gap] - Specifies the space between the component's `calcite-stepper-item`s.
|
|
10
|
-
* @cssproperty [--calcite-stepper-bar-inactive-fill-color] - Specifies the `calcite-stepper-item`s' bar fill color of the component's `calcite-stepper-item`s.
|
|
11
|
-
* @cssproperty [--calcite-stepper-bar-active-fill-color] - Specifies the `calcite-stepper-item`s' bar fill color of the component's active `calcite-stepper-item`s.
|
|
10
|
+
* @cssproperty [--calcite-stepper-bar-inactive-fill-color] - [Deprecated] in 5.1.0, removal target v6.0.0 - Use `--calcite-stepper-bar-fill-color`. Specifies the `calcite-stepper-item`s' bar fill color of the component's `calcite-stepper-item`s.
|
|
11
|
+
* @cssproperty [--calcite-stepper-bar-active-fill-color] - [Deprecated] in 5.1.0, removal target v6.0.0 - Use `--calcite-stepper-bar-selected-fill-color`. Specifies the `calcite-stepper-item`s' bar fill color of the component's active `calcite-stepper-item`s.
|
|
12
12
|
* @cssproperty [--calcite-stepper-bar-complete-fill-color] - When `calcite-stepper-item`s are `complete`, specifies the component's `calcite-stepper-item`s' bar fill color.
|
|
13
13
|
* @cssproperty [--calcite-stepper-bar-error-fill-color] - When `calcite-stepper-item`s contain an `error`, specifies the component's `calcite-stepper-item`s' bar fill color.
|
|
14
14
|
* @slot - A slot for adding `calcite-stepper-item`s.
|
|
@@ -3,11 +3,10 @@ import { c as customElement } from "../../chunks/runtime.js";
|
|
|
3
3
|
import { svg, html, css, nothing } from "lit";
|
|
4
4
|
import { safeClassMap, LitElement, createEvent } from "@arcgis/lumina";
|
|
5
5
|
import { createRef, ref } from "lit/directives/ref.js";
|
|
6
|
-
import { f as focusElementInGroup,
|
|
6
|
+
import { f as focusElementInGroup, a as slotChangeGetAssignedElements } from "../../chunks/dom.js";
|
|
7
7
|
import { c as createObserver } from "../../chunks/observers.js";
|
|
8
8
|
import { g as guid } from "../../chunks/guid.js";
|
|
9
9
|
import { u as useT9n } from "../../chunks/useT9n.js";
|
|
10
|
-
import { i as isHidden } from "../../chunks/component.js";
|
|
11
10
|
const CSS$1 = {
|
|
12
11
|
actionIcon: "action-icon",
|
|
13
12
|
actionContainer: "action-container",
|
|
@@ -39,14 +38,14 @@ const StepBar = ({ disabled, active, complete, error }) => html`<svg class=${saf
|
|
|
39
38
|
[CSS.stepBarError]: error,
|
|
40
39
|
[CSS.stepBarInActive]: true
|
|
41
40
|
})} width=100% x=0 y=0 />`}</svg>`;
|
|
42
|
-
const styles = css`:host([scale=s]){--calcite-internal-stepper-item-spacing-unit-s: .25rem;--calcite-internal-stepper-action-block-size: 2.75rem;--calcite-internal-stepper-action-inline-size: 2rem;--calcite-internal-step-bar-gap: .25rem}:host([scale=m]){--calcite-internal-stepper-item-spacing-unit-s: .5rem;--calcite-internal-stepper-action-block-size: 3.25rem;--calcite-internal-stepper-action-inline-size: 2.5rem}:host([scale=l]){--calcite-internal-stepper-item-spacing-unit-s: .75rem;--calcite-internal-stepper-action-block-size: 4rem;--calcite-internal-stepper-action-inline-size: 3rem;--calcite-internal-step-bar-gap: .75rem}:host{display:flex}.container{position:relative;display:flex;inline-size:100%;min-inline-size:fit-content;flex-direction:row;flex-wrap:wrap;align-items:stretch;justify-content:space-between}:host([layout=vertical]) .container{flex:1 1 auto;flex-direction:column}:host([layout=horizontal]) .container,:host([layout=horizontal-single]) .container{display:grid;grid-template-areas:"items" "content";gap:.5rem var(--calcite-stepper-bar-gap, var(--calcite-internal-stepper-item-spacing-unit-s))}:host([layout=horizontal][scale=s]) .container,:host([layout=horizontal-single][scale=s]) .container{gap:.25rem var(--calcite-stepper-bar-gap, var(--calcite-internal-stepper-item-spacing-unit-s))}:host([layout=horizontal][scale=l]) .container,:host([layout=horizontal-single][scale=l]) .container{gap:.75rem var(--calcite-stepper-bar-gap, var(--calcite-internal-stepper-item-spacing-unit-s))}:host([layout=horizontal]) .container.single-view{display:flex;grid-template-columns:none}.action-icon{position:relative;display:flex;flex-grow:0;block-size:var(--calcite-internal-stepper-action-block-size);inline-size:var(--calcite-internal-stepper-action-inline-size)}.action-container{position:absolute;display:flex;justify-content:space-between;padding-block:.25rem;inline-size:100%}.step-bar{display:flex;block-size:100%;inline-size:100%}.step-bar-container{position:absolute;display:flex;align-items:flex-start;justify-content:space-between;block-size:.125rem;inline-size:100%;gap:var(--calcite-stepper-bar-gap, var(--calcite-internal-step-bar-gap, .5rem))}.step-bar--inactive{fill:var(--calcite-stepper-bar-inactive-fill-color, var(--calcite-color-border-3, #dfdfdf));fill-opacity:1;block-size:100%}.step-bar--active{fill:var(--calcite-stepper-bar-active-fill-color, var(--calcite-color-brand))}.step-bar--complete{fill:var(--calcite-stepper-bar-complete-fill-color, var(--calcite-color-brand));fill-opacity:.5}.step-bar--error{fill:var(--calcite-stepper-bar-error-fill-color, var(--calcite-color-status-danger))}.step-bar--disabled{opacity:.5}:host([hidden]){display:none}[hidden]{display:none}`;
|
|
41
|
+
const styles = css`:host([scale=s]){--calcite-internal-stepper-item-spacing-unit-s: .25rem;--calcite-internal-stepper-action-block-size: 2.75rem;--calcite-internal-stepper-action-inline-size: 2rem;--calcite-internal-step-bar-gap: .25rem}:host([scale=m]){--calcite-internal-stepper-item-spacing-unit-s: .5rem;--calcite-internal-stepper-action-block-size: 3.25rem;--calcite-internal-stepper-action-inline-size: 2.5rem}:host([scale=l]){--calcite-internal-stepper-item-spacing-unit-s: .75rem;--calcite-internal-stepper-action-block-size: 4rem;--calcite-internal-stepper-action-inline-size: 3rem;--calcite-internal-step-bar-gap: .75rem}:host{display:flex}.container{position:relative;display:flex;inline-size:100%;min-inline-size:fit-content;flex-direction:row;flex-wrap:wrap;align-items:stretch;justify-content:space-between}:host([layout=vertical]) .container{flex:1 1 auto;flex-direction:column}:host([layout=horizontal]) .container,:host([layout=horizontal-single]) .container{display:grid;grid-template-areas:"items" "content";gap:.5rem var(--calcite-stepper-bar-gap, var(--calcite-internal-stepper-item-spacing-unit-s));grid-template-rows:auto 1fr}:host([layout=horizontal][scale=s]) .container,:host([layout=horizontal-single][scale=s]) .container{gap:.25rem var(--calcite-stepper-bar-gap, var(--calcite-internal-stepper-item-spacing-unit-s))}:host([layout=horizontal][scale=l]) .container,:host([layout=horizontal-single][scale=l]) .container{gap:.75rem var(--calcite-stepper-bar-gap, var(--calcite-internal-stepper-item-spacing-unit-s))}:host([layout=horizontal]) .container.single-view{display:flex;grid-template-columns:none}.action-icon{position:relative;display:flex;flex-grow:0;block-size:var(--calcite-internal-stepper-action-block-size);inline-size:var(--calcite-internal-stepper-action-inline-size)}.action-container{position:absolute;display:flex;justify-content:space-between;padding-block:.25rem;inline-size:100%}.step-bar{display:flex;block-size:100%;inline-size:100%}.step-bar-container{position:absolute;display:flex;align-items:flex-start;justify-content:space-between;block-size:.125rem;inline-size:100%;gap:var(--calcite-stepper-bar-gap, var(--calcite-internal-step-bar-gap, .5rem))}.step-bar--inactive{fill:var(--calcite-stepper-bar-inactive-fill-color, var(--calcite-color-border-3, #dfdfdf));fill-opacity:1;block-size:100%}.step-bar--active{fill:var(--calcite-stepper-bar-active-fill-color, var(--calcite-color-brand))}.step-bar--complete{fill:var(--calcite-stepper-bar-complete-fill-color, var(--calcite-color-brand));fill-opacity:.5}.step-bar--error{fill:var(--calcite-stepper-bar-error-fill-color, var(--calcite-color-status-danger))}.step-bar--disabled{opacity:.5}:host([hidden]){display:none}[hidden]{display:none}`;
|
|
43
42
|
class Stepper extends LitElement {
|
|
44
43
|
constructor() {
|
|
45
44
|
super();
|
|
46
45
|
this.containerRef = createRef();
|
|
47
|
-
this.
|
|
46
|
+
this.visibleItems = [];
|
|
47
|
+
this.focusableItems = [];
|
|
48
48
|
this.guid = guid();
|
|
49
|
-
this.itemMap = /* @__PURE__ */ new Map();
|
|
50
49
|
this.items = [];
|
|
51
50
|
this.multipleViewMode = false;
|
|
52
51
|
this.mutationObserver = createObserver("mutation", () => this.updateItems());
|
|
@@ -61,7 +60,10 @@ class Stepper extends LitElement {
|
|
|
61
60
|
});
|
|
62
61
|
this.calciteStepperChange = createEvent({ cancelable: false });
|
|
63
62
|
this.listen("calciteInternalStepperItemKeyEvent", this.calciteInternalStepperItemKeyEvent);
|
|
64
|
-
this.listen("
|
|
63
|
+
this.listen("calciteInternalStepperItemUpdate", (event) => {
|
|
64
|
+
event.stopPropagation();
|
|
65
|
+
this.updateItems();
|
|
66
|
+
});
|
|
65
67
|
this.listen("calciteInternalStepperItemSelect", this.updateItem);
|
|
66
68
|
this.listen("calciteStepperItemSelect", this.handleItemSelect);
|
|
67
69
|
}
|
|
@@ -72,7 +74,7 @@ class Stepper extends LitElement {
|
|
|
72
74
|
this.styles = styles;
|
|
73
75
|
}
|
|
74
76
|
async endStep() {
|
|
75
|
-
const enabledStepIndex = this.getEnabledStepIndex(this.
|
|
77
|
+
const enabledStepIndex = this.getEnabledStepIndex(this.visibleItems.length - 1, "previous");
|
|
76
78
|
if (typeof enabledStepIndex !== "number") {
|
|
77
79
|
return;
|
|
78
80
|
}
|
|
@@ -111,12 +113,8 @@ class Stepper extends LitElement {
|
|
|
111
113
|
this.updateItems();
|
|
112
114
|
}
|
|
113
115
|
willUpdate(changes) {
|
|
114
|
-
if (changes.has("
|
|
116
|
+
if (changes.has("layout") && (this.hasUpdated || this.layout !== "horizontal") || changes.has("icon") && (this.hasUpdated || this.icon !== false) || changes.has("numbered") && (this.hasUpdated || this.numbered !== false) || changes.has("scale") && (this.hasUpdated || this.scale !== "m") || changes.has("numberingSystem") && (this.hasUpdated || this.numberingSystem !== void 0)) {
|
|
115
117
|
this.updateItems();
|
|
116
|
-
this.determineActiveStepper();
|
|
117
|
-
}
|
|
118
|
-
if (changes.has("numberingSystem")) {
|
|
119
|
-
this.setStepperItemNumberingSystem();
|
|
120
118
|
}
|
|
121
119
|
if (changes.has("currentActivePosition")) {
|
|
122
120
|
requestAnimationFrame(() => {
|
|
@@ -145,28 +143,21 @@ class Stepper extends LitElement {
|
|
|
145
143
|
switch (item.key) {
|
|
146
144
|
case "ArrowDown":
|
|
147
145
|
case "ArrowRight":
|
|
148
|
-
focusElementInGroup(this.
|
|
146
|
+
focusElementInGroup(this.focusableItems, itemToFocus, "next");
|
|
149
147
|
break;
|
|
150
148
|
case "ArrowUp":
|
|
151
149
|
case "ArrowLeft":
|
|
152
|
-
focusElementInGroup(this.
|
|
150
|
+
focusElementInGroup(this.focusableItems, itemToFocus, "previous");
|
|
153
151
|
break;
|
|
154
152
|
case "Home":
|
|
155
|
-
focusElementInGroup(this.
|
|
153
|
+
focusElementInGroup(this.focusableItems, itemToFocus, "first");
|
|
156
154
|
break;
|
|
157
155
|
case "End":
|
|
158
|
-
focusElementInGroup(this.
|
|
156
|
+
focusElementInGroup(this.focusableItems, itemToFocus, "last");
|
|
159
157
|
break;
|
|
160
158
|
}
|
|
161
159
|
event.stopPropagation();
|
|
162
160
|
}
|
|
163
|
-
registerItem(event) {
|
|
164
|
-
const item = event.target;
|
|
165
|
-
const { content, position } = event.detail;
|
|
166
|
-
this.itemMap.set(item, { position, content });
|
|
167
|
-
this.enabledItems = this.filterItems();
|
|
168
|
-
event.stopPropagation();
|
|
169
|
-
}
|
|
170
161
|
updateItem(event) {
|
|
171
162
|
const { position } = event.detail;
|
|
172
163
|
if (typeof position === "number") {
|
|
@@ -184,31 +175,35 @@ class Stepper extends LitElement {
|
|
|
184
175
|
this.calciteStepperChange.emit();
|
|
185
176
|
}
|
|
186
177
|
updateItems() {
|
|
187
|
-
this.
|
|
178
|
+
this.visibleItems = this.items.filter((item) => !item.hidden);
|
|
179
|
+
this.determineActiveStepper();
|
|
180
|
+
this.focusableItems = this.visibleItems.filter((item) => !item.disabled && !item.itemHidden);
|
|
181
|
+
this.items.forEach((item) => {
|
|
188
182
|
item.icon = this.icon;
|
|
189
183
|
item.numbered = this.numbered;
|
|
190
184
|
item.layout = this.layout;
|
|
191
185
|
item.scale = this.scale;
|
|
186
|
+
item.numberingSystem = this.numberingSystem;
|
|
192
187
|
});
|
|
193
188
|
}
|
|
194
189
|
determineActiveStepper() {
|
|
195
|
-
const {
|
|
196
|
-
if (
|
|
190
|
+
const { visibleItems } = this;
|
|
191
|
+
if (visibleItems.length < 2) {
|
|
197
192
|
return;
|
|
198
193
|
}
|
|
199
194
|
const { currentActivePosition, layout } = this;
|
|
200
195
|
this.multipleViewMode = layout !== "horizontal-single";
|
|
201
|
-
|
|
196
|
+
visibleItems.forEach((item, index) => {
|
|
202
197
|
item.itemHidden = layout === "horizontal-single" && index !== (currentActivePosition || 0);
|
|
203
198
|
});
|
|
204
199
|
}
|
|
205
200
|
getEnabledStepIndex(startIndex, direction = "next") {
|
|
206
|
-
const {
|
|
201
|
+
const { visibleItems, currentActivePosition } = this;
|
|
207
202
|
let newIndex = startIndex;
|
|
208
|
-
while (newIndex >= 0 && newIndex <
|
|
203
|
+
while (newIndex >= 0 && newIndex < visibleItems.length && visibleItems[newIndex]?.disabled) {
|
|
209
204
|
newIndex = newIndex + (direction === "previous" ? -1 : 1);
|
|
210
205
|
}
|
|
211
|
-
return newIndex !== currentActivePosition && newIndex <
|
|
206
|
+
return newIndex !== currentActivePosition && newIndex < visibleItems.length && newIndex >= 0 ? newIndex : null;
|
|
212
207
|
}
|
|
213
208
|
updateStep(position) {
|
|
214
209
|
this.currentActivePosition = position;
|
|
@@ -216,14 +211,6 @@ class Stepper extends LitElement {
|
|
|
216
211
|
position
|
|
217
212
|
});
|
|
218
213
|
}
|
|
219
|
-
filterItems() {
|
|
220
|
-
return this.items.filter((item) => !item.disabled && !isHidden(item));
|
|
221
|
-
}
|
|
222
|
-
setStepperItemNumberingSystem() {
|
|
223
|
-
this.items.forEach((item) => {
|
|
224
|
-
item.numberingSystem = this.numberingSystem;
|
|
225
|
-
});
|
|
226
|
-
}
|
|
227
214
|
handleActionClick(event) {
|
|
228
215
|
const currentActivePosition = this.currentActivePosition;
|
|
229
216
|
const target = event.target;
|
|
@@ -232,29 +219,29 @@ class Stepper extends LitElement {
|
|
|
232
219
|
} else {
|
|
233
220
|
this.nextStep();
|
|
234
221
|
}
|
|
235
|
-
if (typeof this.currentActivePosition === "number" && currentActivePosition !== this.currentActivePosition && !this.
|
|
222
|
+
if (typeof this.currentActivePosition === "number" && currentActivePosition !== this.currentActivePosition && this.visibleItems[this.currentActivePosition] && !this.visibleItems[this.currentActivePosition].disabled) {
|
|
236
223
|
this.emitItemSelect();
|
|
237
224
|
}
|
|
238
225
|
}
|
|
239
226
|
getFirstEnabledStepperPosition() {
|
|
240
|
-
const enabledStepIndex = this.
|
|
227
|
+
const enabledStepIndex = this.visibleItems.findIndex((item) => !item.disabled);
|
|
241
228
|
if (enabledStepIndex > -1) {
|
|
242
229
|
return enabledStepIndex;
|
|
243
230
|
}
|
|
244
231
|
return 0;
|
|
245
232
|
}
|
|
246
233
|
handleDefaultSlotChange(event) {
|
|
247
|
-
const items = slotChangeGetAssignedElements(event).filter((el) => el?.tagName === "CALCITE-STEPPER-ITEM"
|
|
234
|
+
const items = slotChangeGetAssignedElements(event).filter((el) => el?.tagName === "CALCITE-STEPPER-ITEM");
|
|
248
235
|
this.items = items;
|
|
249
|
-
|
|
236
|
+
this.updateItems();
|
|
237
|
+
const spacing = Array(this.visibleItems.length).fill("1fr").join(" ");
|
|
250
238
|
this.containerRef.value.style.gridTemplateAreas = spacing;
|
|
251
239
|
this.containerRef.value.style.gridTemplateColumns = spacing;
|
|
252
|
-
this.setStepperItemNumberingSystem();
|
|
253
240
|
}
|
|
254
241
|
render() {
|
|
255
242
|
this.el.ariaLabel = this.messages.label;
|
|
256
243
|
this.el.role = "region";
|
|
257
|
-
return html`<div class=${safeClassMap({ container: true, [CSS$1.singleView]: this.layout === "horizontal-single" })} ${ref(this.containerRef)}>${this.layout === "horizontal-single" && html`<div class=${safeClassMap({ [CSS$1.stepBarContainer]: true })}>${this.
|
|
244
|
+
return html`<div class=${safeClassMap({ container: true, [CSS$1.singleView]: this.layout === "horizontal-single" })} ${ref(this.containerRef)}>${this.layout === "horizontal-single" && html`<div class=${safeClassMap({ [CSS$1.stepBarContainer]: true })}>${this.visibleItems.map((item, index) => StepBar({ active: index === this.currentActivePosition, complete: item.complete && index !== this.currentActivePosition && !item.error, disabled: item.disabled && index !== this.currentActivePosition, error: item.error && index !== this.currentActivePosition }))}</div>` || ""}${this.layout === "horizontal-single" && html`<div class=${safeClassMap({ [CSS$1.actionContainer]: true })}>${this.renderAction("start")}${this.renderAction("end")}</div>` || ""}<slot @slotchange=${this.handleDefaultSlotChange}></slot></div>`;
|
|
258
245
|
}
|
|
259
246
|
renderAction(position) {
|
|
260
247
|
const isPositionStart = position === "start";
|
|
@@ -7,7 +7,7 @@ import { n as numberStringFormatter } from "../../chunks/locale.js";
|
|
|
7
7
|
import { u as useT9n } from "../../chunks/useT9n.js";
|
|
8
8
|
import { i as isHidden } from "../../chunks/component.js";
|
|
9
9
|
import { u as useSetFocus } from "../../chunks/useSetFocus.js";
|
|
10
|
-
import {
|
|
10
|
+
import { m as slotChangeHasContent } from "../../chunks/dom.js";
|
|
11
11
|
import { u as useInteractive } from "../../chunks/useInteractive.js";
|
|
12
12
|
const CSS = {
|
|
13
13
|
container: "container",
|
|
@@ -27,7 +27,7 @@ const ICONS = {
|
|
|
27
27
|
exclamationMarkCircleF: "exclamationMarkCircleF",
|
|
28
28
|
checkCircleF: "checkCircleF"
|
|
29
29
|
};
|
|
30
|
-
const styles = css`:host([disabled]),:host([layout=horizontal][disabled]) .stepper-item-header,:host([layout=horizontal-single][disabled]) .stepper-item-header{cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled)}:host([disabled]) *,:host([layout=horizontal][disabled]) .stepper-item-header *,:host([layout=horizontal-single][disabled]) .stepper-item-header *,:host([disabled]) ::slotted(*),:host([layout=horizontal][disabled]) .stepper-item-header ::slotted(*),:host([layout=horizontal-single][disabled]) .stepper-item-header ::slotted(*){pointer-events:none}:host([scale=s]){--calcite-internal-stepper-item-spacing-unit-s: .25rem;--calcite-internal-stepper-item-spacing-unit-m: .75rem;--calcite-internal-stepper-item-spacing-unit-l: 1rem;--calcite-internal-stepper-item-header-padding: var(--calcite-spacing-md);--calcite-internal-stepper-action-inline-size: 2rem;font-size:var(--calcite-font-size-relative-base);line-height:var(--calcite-font-line-height-base);margin-inline-end:.25rem}:host([scale=s]) .stepper-item-description{font-size:var(--calcite-font-size-relative-sm)}:host([scale=m]){--calcite-internal-stepper-item-spacing-unit-s: .5rem;--calcite-internal-stepper-item-spacing-unit-m: 1rem;--calcite-internal-stepper-item-spacing-unit-l: 1.25rem;--calcite-internal-stepper-item-header-padding: var(--calcite-spacing-lg);--calcite-internal-stepper-action-inline-size: 2.5rem;font-size:var(--calcite-font-size-relative-md);line-height:var(--calcite-font-line-height-md);margin-inline-end:.5rem}:host([scale=m]) .stepper-item-description{font-size:var(--calcite-font-size-relative-base)}:host([scale=l]){--calcite-internal-stepper-item-spacing-unit-s: .75rem;--calcite-internal-stepper-item-spacing-unit-m: 1.25rem;--calcite-internal-stepper-item-spacing-unit-l: 1.5rem;--calcite-internal-stepper-item-header-padding: var(--calcite-spacing-xl);--calcite-internal-stepper-action-inline-size: 3rem;font-size:var(--calcite-font-size-relative-lg);line-height:var(--calcite-font-line-height-lg);margin-inline-end:.75rem}:host([scale=l]) .stepper-item-description{font-size:var(--calcite-font-size-relative-md)}:host{position:relative;display:flex;flex-grow:1;flex-direction:column;align-self:flex-start;margin-block-end:var(--calcite-stepper-bar-gap, var(--calcite-internal-stepper-item-spacing-unit-s))}:host .container{position:relative;display:flex;flex-grow:1;cursor:pointer;flex-direction:column;border-width:0px;border-block-start-width:2px;border-style:solid;border-color:var(--calcite-color-border-3);color:var(--calcite-color-text-3);text-decoration-line:none;outline:2px solid transparent;outline-offset:2px}:host .container:active{background-color:var(--calcite-stepper-item-background-color-press, var(--calcite-color-foreground-3))}:host{outline-color:transparent}:host(:focus){outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline-offset:calc(var(--calcite-spacing-base) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}:host .stepper-item-content,:host .stepper-item-header{padding-block:var(--calcite-internal-stepper-item-spacing-unit-l);padding-inline-end:var(--calcite-internal-stepper-item-spacing-unit-m);text-align:start}:host .stepper-item-header{display:flex;cursor:pointer;align-items:flex-start;padding-block:var(--calcite-internal-stepper-item-header-padding)}:host .stepper-item-header:active{background-color:var(--calcite-stepper-item-background-color-press, var(--calcite-color-foreground-3))}:host .stepper-item-header *{display:inline-flex;align-items:center}:host .stepper-item-content{display:none;inline-size:100%;flex-direction:column;font-size:var(--calcite-font-size-relative-sm);line-height:var(--calcite-font-line-height-relative-snug)}:host .stepper-item-icon{margin-inline-end:var(--calcite-internal-stepper-item-spacing-unit-m);display:inline-flex;block-size:.75rem;flex-shrink:0;align-self:flex-start;margin-block-start:var(--calcite-spacing-base);color:var(--calcite-stepper-item-icon-color, var(--calcite-color-border-input))}:host([complete]) .stepper-item-icon{opacity:var(--calcite-opacity-disabled)}:host .stepper-item-header-text{flex-direction:column;text-align:initial;margin-inline-end:auto}:host .stepper-item-heading,:host .stepper-item-description{display:flex;inline-size:100%}.stepper-item-heading,.stepper-item-description,.stepper-item-number{line-height:var(--calcite-font-line-height-relative-snug)}:host .stepper-item-heading{font-weight:var(--calcite-font-weight-normal);color:var(--calcite-stepper-item-header-text-color, var(--calcite-color-text-1))}:host .stepper-item-description{color:var(--calcite-stepper-item-description-text-color, var(--calcite-color-text-3))}:host .stepper-item-number{font-weight:var(--calcite-font-weight-normal);margin-inline-end:var(--calcite-internal-stepper-item-spacing-unit-m);color:var(--calcite-stepper-item-description-text-color, var(--calcite-color-text-1))}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}:host([complete]) .container{border-color:#007ac280}:host([complete]) .container .stepper-item-icon{color:var(--calcite-stepper-item-complete-icon-color, var(--calcite-color-brand))}:host([error]) .container{border-block-start-color:var(--calcite-color-status-danger)}:host([error]) .container .stepper-item-number{color:var(--calcite-stepper-item-error-icon-color, var(--calcite-color-status-danger))}:host([error]) .container .stepper-item-icon{opacity:1;color:var(--calcite-stepper-item-error-icon-color, var(--calcite-color-status-danger))}:host(:hover:not([disabled]):not([selected])) .container,:host(:focus:not([disabled]):not([selected])) .container{border-block-start-color:var(--calcite-color-brand)}:host(:hover:not([disabled]):not([selected])) .container .stepper-item-heading,:host(:focus:not([disabled]):not([selected])) .container .stepper-item-heading{color:var(--calcite-stepper-item-header-text-color-hover, var(--calcite-color-text-1))}:host(:hover:not([disabled]):not([selected])) .container .stepper-item-description,:host(:focus:not([disabled]):not([selected])) .container .stepper-item-description{color:var(--calcite-stepper-item-description-text-color-hover, var(--calcite-color-text-2))}:host([error]:hover:not([disabled]):not([selected])) .container,:host([error]:focus:not([disabled]):not([selected])) .container{border-block-start-color:var(--calcite-color-status-danger-hover)}:host([selected]) .container{border-block-start-color:var(--calcite-color-brand)}:host([selected]) .container .stepper-item-heading{color:var(--calcite-stepper-item-selected-header-text-color, var(--calcite-color-text-1));font-weight:var(--calcite-font-weight-medium)}:host([selected]) .container .stepper-item-description{color:var(--calcite-stepper-item-description-text-color-hover, var(--calcite-color-text-2))}:host([selected]) .container .stepper-item-number{color:var(--calcite-stepper-item-selected-icon-color, var(--calcite-color-brand));font-weight:var(--calcite-font-weight-medium)}:host([selected]) .container .stepper-item-icon{color:var(--calcite-stepper-item-selected-icon-color, var(--calcite-color-brand));opacity:1}:host([selected]) .container .stepper-item-content{display:flex}:host([layout=vertical]){inline-size:100%}:host([layout=vertical]) .container{margin-inline:0px;margin-block-start:0px;flex:1 1 auto;border-block-start-width:0px;border-style:solid;padding-block:0px;border-inline-start-width:2px;padding-inline-start:var(--calcite-internal-stepper-item-spacing-unit-l);border-color:var(--calcite-stepper-bar-fill-color, var(--calcite-color-border-2))}:host([layout=vertical]) .container .stepper-item-icon{order:3;margin-block:1px 0px;padding-inline-start:var(--calcite-internal-stepper-item-spacing-unit-s);margin-inline-start:auto}:host([layout=vertical]) .container .stepper-item-header{padding-inline-end:0px}:host([layout=vertical]) .container .stepper-item-content{padding:0}:host([layout=vertical][complete]) .container{border-color:var(--calcite-stepper-bar-complete-fill-color, rgba(0, 122, 194, .5))}:host([layout=vertical][complete]:hover:not([disabled]):not([selected])) .container,:host([layout=vertical][complete]:focus:not([disabled]):not([selected])) .container{border-color:var(--calcite-stepper-bar-complete-fill-color-hover, var(--calcite-color-brand))}:host([layout=vertical][error]) .container{border-color:var(--calcite-stepper-bar-error-fill-color, var(--calcite-color-status-danger))}:host([layout=vertical][selected]) .container{border-color:var(--calcite-stepper-bar-selected-fill-color, var(--calcite-color-brand))}:host([layout=vertical][selected]) .container .stepper-item-content.has-slotted-content{margin-block-end:var(--calcite-internal-stepper-item-spacing-unit-l)}:host([layout=vertical]:hover:not([disabled]):not([selected])) .container,:host([layout=vertical]:focus:not([disabled]):not([selected])) .container{border-color:var(--calcite-stepper-bar-fill-color-hover, rgba(0, 122, 194, .5))}:host([layout=vertical][error]:hover:not([disabled]):not([selected])) .container,:host([layout=vertical][error]:focus:not([disabled]):not([selected])) .container{border-color:var(--calcite-stepper-bar-error-fill-color-hover, var(--calcite-color-status-danger-hover))}:host([layout=horizontal]),:host([layout=horizontal-single]){display:contents}:host([layout=horizontal]) .container,:host([layout=horizontal-single]) .container{display:contents}:host([layout=horizontal]) .stepper-item-header,:host([layout=horizontal-single]) .stepper-item-header{border-width:0px;border-block-start-width:2px;border-style:solid;outline-color:transparent;grid-row:items;border-color:var(--calcite-stepper-bar-fill-color, var(--calcite-color-border-2))}:host([layout=horizontal]) .stepper-item-header:focus,:host([layout=horizontal-single]) .stepper-item-header:focus{outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline-offset:calc(var(--calcite-spacing-base) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}:host([layout=horizontal]) .stepper-item-content,:host([layout=horizontal-single]) .stepper-item-content{cursor:auto;transition-timing-function:cubic-bezier(.4,0,.2,1);padding-block:0;padding-inline-end:var(--calcite-internal-stepper-item-spacing-unit-m);text-align:start}:host([layout=horizontal-single]) .stepper-item-header{grid-area:1/1/1/-1}:host([layout=horizontal]) .stepper-item-content,:host([layout=horizontal-single]) .stepper-item-content{grid-area:2/1/2/-1}:host([layout=horizontal][complete]) .stepper-item-header,:host([layout=horizontal-single][complete]) .stepper-item-header{border-color:var(--calcite-stepper-bar-complete-fill-color, rgba(0, 122, 194, .5))}:host([layout=horizontal][complete]:hover:not([disabled]):not([selected])) .stepper-item-header,:host([layout=horizontal][complete]:focus:not([disabled]):not([selected])) .stepper-item-header,:host([layout=horizontal-single][complete]:hover:not([disabled]):not([selected])) .stepper-item-header,:host([layout=horizontal-single][complete]:focus:not([disabled]):not([selected])) .stepper-item-header{border-color:var(--calcite-stepper-bar-complete-fill-color-hover, var(--calcite-color-brand))}:host([layout=horizontal][error]) .stepper-item-header,:host([layout=horizontal-single][error]) .stepper-item-header{border-color:var(--calcite-stepper-bar-error-fill-color, var(--calcite-color-status-danger))}:host([layout=horizontal][selected]) .stepper-item-header,:host([layout=horizontal-single][selected]) .stepper-item-header{border-color:var(--calcite-stepper-bar-selected-fill-color, var(--calcite-color-brand))}:host([layout=horizontal]:hover:not([disabled]):not([selected])) .stepper-item-header,:host([layout=horizontal]:focus:not([disabled]):not([selected])) .stepper-item-header,:host([layout=horizontal-single]:hover:not([disabled]):not([selected])) .stepper-item-header,:host([layout=horizontal-single]:focus:not([disabled]):not([selected])) .stepper-item-header{border-color:var(--calcite-stepper-bar-fill-color-hover, rgba(0, 122, 194, .5))}:host([layout=horizontal][error]:hover:not([disabled]):not([selected])) .stepper-item-header,:host([layout=horizontal][error]:focus:not([disabled]):not([selected])) .stepper-item-header,:host([layout=horizontal-single][error]:hover:not([disabled]):not([selected])) .stepper-item-header,:host([layout=horizontal-single][error]:focus:not([disabled]):not([selected])) .stepper-item-header{border-color:var(--calcite-stepper-bar-error-fill-color-hover, var(--calcite-color-status-danger-hover))}@media(forced-colors:active){:host .container{outline-width:0;outline-offset:0}:host(:focus),:host(:focus-visible){outline-color:canvasText}:host([selected]) .container{border-block-start-color:highlight}:host([selected]) .container .stepper-item-number{color:highlight}:host([selected]) .container .stepper-item-icon{color:highlight}:host([layout=vertical][selected]) .container{border-color:highlight}}:host([layout=horizontal-single]) .stepper-item-header{margin-inline-end:0px;box-sizing:border-box;border-style:none;inline-size:100%;padding-inline:calc(var(--calcite-internal-stepper-action-inline-size) + .5rem)}:host([layout=horizontal-single][error]) .container .stepper-item-number{color:var(--calcite-stepper-item-error-icon-color, var(--calcite-color-status-danger))}:host([layout=horizontal-single][error]) .container .stepper-item-icon{opacity:1;color:var(--calcite-stepper-item-error-icon-color, var(--calcite-color-status-danger))}:host([layout=horizontal-single][error][selected]),:host([layout=horizontal-single][complete][selected]) .container{color:var(--calcite-color-text-3)}:host([layout=horizontal-single][error][selected]) .stepper-item-heading,:host([layout=horizontal-single][complete][selected]) .container .stepper-item-heading{color:var(--calcite-stepper-item-header-text-color, var(--calcite-color-text-2))}:host([layout=horizontal-single][complete][selected]) .container .stepper-item-icon{opacity:var(--calcite-opacity-disabled)}:host([layout=horizontal-single][complete][selected]) .container .stepper-item-number{color:var(--calcite-stepper-item-selected-icon-color, var(--calcite-color-text-3))}.visually-hidden{position:absolute;inline-size:1px;block-size:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}:host([hidden]){display:none}[hidden]{display:none}:host([item-hidden]){display:none}`;
|
|
30
|
+
const styles = css`:host([disabled]),:host([layout=horizontal][disabled]) .stepper-item-header,:host([layout=horizontal-single][disabled]) .stepper-item-header{cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled)}:host([disabled]) *,:host([layout=horizontal][disabled]) .stepper-item-header *,:host([layout=horizontal-single][disabled]) .stepper-item-header *,:host([disabled]) ::slotted(*),:host([layout=horizontal][disabled]) .stepper-item-header ::slotted(*),:host([layout=horizontal-single][disabled]) .stepper-item-header ::slotted(*){pointer-events:none}:host([scale=s]){--calcite-internal-stepper-item-spacing-unit-s: .25rem;--calcite-internal-stepper-item-spacing-unit-m: .75rem;--calcite-internal-stepper-item-spacing-unit-l: 1rem;--calcite-internal-stepper-item-header-padding: var(--calcite-spacing-md);--calcite-internal-stepper-action-inline-size: 2rem;font-size:var(--calcite-font-size-relative-base);line-height:var(--calcite-font-line-height-base);margin-inline-end:.25rem}:host([scale=s]) .stepper-item-description{font-size:var(--calcite-font-size-relative-sm)}:host([scale=m]){--calcite-internal-stepper-item-spacing-unit-s: .5rem;--calcite-internal-stepper-item-spacing-unit-m: 1rem;--calcite-internal-stepper-item-spacing-unit-l: 1.25rem;--calcite-internal-stepper-item-header-padding: var(--calcite-spacing-lg);--calcite-internal-stepper-action-inline-size: 2.5rem;font-size:var(--calcite-font-size-relative-md);line-height:var(--calcite-font-line-height-md);margin-inline-end:.5rem}:host([scale=m]) .stepper-item-description{font-size:var(--calcite-font-size-relative-base)}:host([scale=l]){--calcite-internal-stepper-item-spacing-unit-s: .75rem;--calcite-internal-stepper-item-spacing-unit-m: 1.25rem;--calcite-internal-stepper-item-spacing-unit-l: 1.5rem;--calcite-internal-stepper-item-header-padding: var(--calcite-spacing-xl);--calcite-internal-stepper-action-inline-size: 3rem;font-size:var(--calcite-font-size-relative-lg);line-height:var(--calcite-font-line-height-lg);margin-inline-end:.75rem}:host([scale=l]) .stepper-item-description{font-size:var(--calcite-font-size-relative-md)}:host{position:relative;display:flex;flex-grow:1;flex-direction:column;align-self:flex-start;margin-block-end:var(--calcite-stepper-bar-gap, var(--calcite-internal-stepper-item-spacing-unit-s))}:host .container{position:relative;display:flex;flex-grow:1;cursor:pointer;flex-direction:column;border-width:0px;border-block-start-width:2px;border-style:solid;border-color:var(--calcite-color-border-3);color:var(--calcite-color-text-3);text-decoration-line:none;outline:2px solid transparent;outline-offset:2px}:host .container:active{background-color:var(--calcite-stepper-item-background-color-press, var(--calcite-color-foreground-3))}:host{outline-color:transparent}:host(:focus){outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline-offset:calc(var(--calcite-spacing-base) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}:host .stepper-item-content,:host .stepper-item-header{box-sizing:border-box;padding-block:var(--calcite-internal-stepper-item-spacing-unit-l);padding-inline-end:var(--calcite-internal-stepper-item-spacing-unit-m);text-align:start}:host .stepper-item-header{display:flex;cursor:pointer;align-items:flex-start;padding-block:var(--calcite-internal-stepper-item-header-padding)}:host .stepper-item-header:active{background-color:var(--calcite-stepper-item-background-color-press, var(--calcite-color-foreground-3))}:host .stepper-item-header *{display:inline-flex;align-items:center}:host .stepper-item-content{display:none;inline-size:100%;flex-direction:column;font-size:var(--calcite-font-size-relative-sm);line-height:var(--calcite-font-line-height-relative-snug)}:host .stepper-item-icon{margin-inline-end:var(--calcite-internal-stepper-item-spacing-unit-m);display:inline-flex;block-size:.75rem;flex-shrink:0;align-self:flex-start;margin-block-start:var(--calcite-spacing-base);color:var(--calcite-stepper-item-icon-color, var(--calcite-color-border-input))}:host([complete]) .stepper-item-icon{opacity:var(--calcite-opacity-disabled)}:host .stepper-item-header-text{flex-direction:column;text-align:initial;margin-inline-end:auto}:host .stepper-item-heading,:host .stepper-item-description{display:flex;inline-size:100%}.stepper-item-heading,.stepper-item-description,.stepper-item-number{line-height:var(--calcite-font-line-height-relative-snug)}:host .stepper-item-heading{font-weight:var(--calcite-font-weight-normal);color:var(--calcite-stepper-item-header-text-color, var(--calcite-color-text-1))}:host .stepper-item-description{color:var(--calcite-stepper-item-description-text-color, var(--calcite-color-text-3))}:host .stepper-item-number{font-weight:var(--calcite-font-weight-normal);margin-inline-end:var(--calcite-internal-stepper-item-spacing-unit-m);color:var(--calcite-stepper-item-description-text-color, var(--calcite-color-text-1))}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}:host([complete]) .container{border-color:#007ac280}:host([complete]) .container .stepper-item-icon{color:var(--calcite-stepper-item-complete-icon-color, var(--calcite-color-brand))}:host([error]) .container{border-block-start-color:var(--calcite-color-status-danger)}:host([error]) .container .stepper-item-number{color:var(--calcite-stepper-item-error-icon-color, var(--calcite-color-status-danger))}:host([error]) .container .stepper-item-icon{opacity:1;color:var(--calcite-stepper-item-error-icon-color, var(--calcite-color-status-danger))}:host(:hover:not([disabled]):not([selected])) .container,:host(:focus:not([disabled]):not([selected])) .container{border-block-start-color:var(--calcite-color-brand)}:host(:hover:not([disabled]):not([selected])) .container .stepper-item-heading,:host(:focus:not([disabled]):not([selected])) .container .stepper-item-heading{color:var(--calcite-stepper-item-header-text-color-hover, var(--calcite-color-text-1))}:host(:hover:not([disabled]):not([selected])) .container .stepper-item-description,:host(:focus:not([disabled]):not([selected])) .container .stepper-item-description{color:var(--calcite-stepper-item-description-text-color-hover, var(--calcite-color-text-2))}:host([error]:hover:not([disabled]):not([selected])) .container,:host([error]:focus:not([disabled]):not([selected])) .container{border-block-start-color:var(--calcite-color-status-danger-hover)}:host([selected]) .container{border-block-start-color:var(--calcite-color-brand)}:host([selected]) .container .stepper-item-heading{color:var(--calcite-stepper-item-selected-header-text-color, var(--calcite-color-text-1));font-weight:var(--calcite-font-weight-medium)}:host([selected]) .container .stepper-item-description{color:var(--calcite-stepper-item-description-text-color-hover, var(--calcite-color-text-2))}:host([selected]) .container .stepper-item-number{color:var(--calcite-stepper-item-selected-icon-color, var(--calcite-color-brand));font-weight:var(--calcite-font-weight-medium)}:host([selected]) .container .stepper-item-icon{color:var(--calcite-stepper-item-selected-icon-color, var(--calcite-color-brand));opacity:1}:host([selected]) .container .stepper-item-content{display:flex}:host([layout=vertical]){inline-size:100%}:host([layout=vertical]) .container{margin-inline:0px;margin-block-start:0px;flex:1 1 auto;border-block-start-width:0px;border-style:solid;padding-block:0px;border-inline-start-width:2px;padding-inline-start:var(--calcite-internal-stepper-item-spacing-unit-l);border-color:var(--calcite-stepper-bar-fill-color, var(--calcite-color-border-2))}:host([layout=vertical]) .container .stepper-item-icon{order:3;margin-block:1px 0px;padding-inline-start:var(--calcite-internal-stepper-item-spacing-unit-s);margin-inline-start:auto}:host([layout=vertical]) .container .stepper-item-header{padding-inline-end:0px}:host([layout=vertical]) .container .stepper-item-content{padding:0}:host([layout=vertical][complete]) .container{border-color:var(--calcite-stepper-bar-complete-fill-color, rgba(0, 122, 194, .5))}:host([layout=vertical][complete]:hover:not([disabled]):not([selected])) .container,:host([layout=vertical][complete]:focus:not([disabled]):not([selected])) .container{border-color:var(--calcite-stepper-bar-complete-fill-color-hover, var(--calcite-color-brand))}:host([layout=vertical][error]) .container{border-color:var(--calcite-stepper-bar-error-fill-color, var(--calcite-color-status-danger))}:host([layout=vertical][selected]) .container{border-color:var(--calcite-stepper-bar-selected-fill-color, var(--calcite-color-brand))}:host([layout=vertical][selected]) .container .stepper-item-content.has-slotted-content{margin-block-end:var(--calcite-internal-stepper-item-spacing-unit-l)}:host([layout=vertical]:hover:not([disabled]):not([selected])) .container,:host([layout=vertical]:focus:not([disabled]):not([selected])) .container{border-color:var(--calcite-stepper-bar-fill-color-hover, rgba(0, 122, 194, .5))}:host([layout=vertical][error]:hover:not([disabled]):not([selected])) .container,:host([layout=vertical][error]:focus:not([disabled]):not([selected])) .container{border-color:var(--calcite-stepper-bar-error-fill-color-hover, var(--calcite-color-status-danger-hover))}:host([layout=horizontal]),:host([layout=horizontal-single]){display:contents}:host([layout=horizontal]) .container,:host([layout=horizontal-single]) .container{display:contents}:host([layout=horizontal]) .stepper-item-header,:host([layout=horizontal-single]) .stepper-item-header{border-width:0px;border-block-start-width:2px;border-style:solid;outline-color:transparent;grid-row:items;border-color:var(--calcite-stepper-bar-fill-color, var(--calcite-color-border-2))}:host([layout=horizontal]) .stepper-item-header:focus,:host([layout=horizontal-single]) .stepper-item-header:focus{outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline-offset:calc(var(--calcite-spacing-base) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}:host([layout=horizontal]) .stepper-item-content,:host([layout=horizontal-single]) .stepper-item-content{cursor:auto;transition-timing-function:cubic-bezier(.4,0,.2,1);padding-block:0;padding-inline-end:var(--calcite-internal-stepper-item-spacing-unit-m);text-align:start}:host([layout=horizontal-single]) .stepper-item-header{grid-area:1/1/1/-1}:host([layout=horizontal]) .stepper-item-content,:host([layout=horizontal-single]) .stepper-item-content{grid-area:2/1/2/-1}:host([layout=horizontal][complete]) .stepper-item-header,:host([layout=horizontal-single][complete]) .stepper-item-header{border-color:var(--calcite-stepper-bar-complete-fill-color, rgba(0, 122, 194, .5))}:host([layout=horizontal][complete]:hover:not([disabled]):not([selected])) .stepper-item-header,:host([layout=horizontal][complete]:focus:not([disabled]):not([selected])) .stepper-item-header,:host([layout=horizontal-single][complete]:hover:not([disabled]):not([selected])) .stepper-item-header,:host([layout=horizontal-single][complete]:focus:not([disabled]):not([selected])) .stepper-item-header{border-color:var(--calcite-stepper-bar-complete-fill-color-hover, var(--calcite-color-brand))}:host([layout=horizontal][error]) .stepper-item-header,:host([layout=horizontal-single][error]) .stepper-item-header{border-color:var(--calcite-stepper-bar-error-fill-color, var(--calcite-color-status-danger))}:host([layout=horizontal][selected]) .stepper-item-header,:host([layout=horizontal-single][selected]) .stepper-item-header{border-color:var(--calcite-stepper-bar-selected-fill-color, var(--calcite-color-brand))}:host([layout=horizontal]:hover:not([disabled]):not([selected])) .stepper-item-header,:host([layout=horizontal]:focus:not([disabled]):not([selected])) .stepper-item-header,:host([layout=horizontal-single]:hover:not([disabled]):not([selected])) .stepper-item-header,:host([layout=horizontal-single]:focus:not([disabled]):not([selected])) .stepper-item-header{border-color:var(--calcite-stepper-bar-fill-color-hover, rgba(0, 122, 194, .5))}:host([layout=horizontal][error]:hover:not([disabled]):not([selected])) .stepper-item-header,:host([layout=horizontal][error]:focus:not([disabled]):not([selected])) .stepper-item-header,:host([layout=horizontal-single][error]:hover:not([disabled]):not([selected])) .stepper-item-header,:host([layout=horizontal-single][error]:focus:not([disabled]):not([selected])) .stepper-item-header{border-color:var(--calcite-stepper-bar-error-fill-color-hover, var(--calcite-color-status-danger-hover))}@media(forced-colors:active){:host .container{outline-width:0;outline-offset:0}:host(:focus),:host(:focus-visible){outline-color:canvasText}:host([selected]) .container{border-block-start-color:highlight}:host([selected]) .container .stepper-item-number{color:highlight}:host([selected]) .container .stepper-item-icon{color:highlight}:host([layout=vertical][selected]) .container{border-color:highlight}}:host([layout=horizontal-single]) .stepper-item-header{margin-inline-end:0px;border-style:none;inline-size:100%;padding-inline:calc(var(--calcite-internal-stepper-action-inline-size) + .5rem)}:host([layout=horizontal-single][error]) .container .stepper-item-number{color:var(--calcite-stepper-item-error-icon-color, var(--calcite-color-status-danger))}:host([layout=horizontal-single][error]) .container .stepper-item-icon{opacity:1;color:var(--calcite-stepper-item-error-icon-color, var(--calcite-color-status-danger))}:host([layout=horizontal-single][error][selected]),:host([layout=horizontal-single][complete][selected]) .container{color:var(--calcite-color-text-3)}:host([layout=horizontal-single][error][selected]) .stepper-item-heading,:host([layout=horizontal-single][complete][selected]) .container .stepper-item-heading{color:var(--calcite-stepper-item-header-text-color, var(--calcite-color-text-2))}:host([layout=horizontal-single][complete][selected]) .container .stepper-item-icon{opacity:var(--calcite-opacity-disabled)}:host([layout=horizontal-single][complete][selected]) .container .stepper-item-number{color:var(--calcite-stepper-item-selected-icon-color, var(--calcite-color-text-3))}.visually-hidden{position:absolute;inline-size:1px;block-size:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}:host([hidden]){display:none}[hidden]{display:none}:host([item-hidden]){display:none}`;
|
|
31
31
|
class StepperItem extends LitElement {
|
|
32
32
|
constructor() {
|
|
33
33
|
super();
|
|
@@ -47,7 +47,7 @@ class StepperItem extends LitElement {
|
|
|
47
47
|
this.calciteInternalStepperItemKeyEvent = createEvent({
|
|
48
48
|
cancelable: false
|
|
49
49
|
});
|
|
50
|
-
this.
|
|
50
|
+
this.calciteInternalStepperItemUpdate = createEvent({ cancelable: false });
|
|
51
51
|
this.calciteInternalStepperItemSelect = createEvent({ cancelable: false });
|
|
52
52
|
this.calciteStepperItemSelect = createEvent({ cancelable: false });
|
|
53
53
|
this.listenOn(document.body, "calciteInternalStepperItemChange", this.updateActiveItemOnChange);
|
|
@@ -66,7 +66,6 @@ class StepperItem extends LitElement {
|
|
|
66
66
|
async load() {
|
|
67
67
|
this.parentStepperEl = this.el.parentElement;
|
|
68
68
|
this.itemPosition = this.getItemPosition();
|
|
69
|
-
this.registerStepperItem();
|
|
70
69
|
if (this.selected) {
|
|
71
70
|
this.emitRequestedItem();
|
|
72
71
|
}
|
|
@@ -76,7 +75,7 @@ class StepperItem extends LitElement {
|
|
|
76
75
|
this.selectedHandler();
|
|
77
76
|
}
|
|
78
77
|
if (changes.has("disabled") && (this.hasUpdated || this.disabled !== false)) {
|
|
79
|
-
this.
|
|
78
|
+
this.calciteInternalStepperItemUpdate.emit();
|
|
80
79
|
}
|
|
81
80
|
if (changes.has("messages")) {
|
|
82
81
|
this.effectiveLocaleWatcher(this.messages._lang);
|
|
@@ -126,11 +125,6 @@ class StepperItem extends LitElement {
|
|
|
126
125
|
determineSelectedItem() {
|
|
127
126
|
this.selected = !this.disabled && this.itemPosition === this.selectedPosition;
|
|
128
127
|
}
|
|
129
|
-
registerStepperItem() {
|
|
130
|
-
this.calciteInternalStepperItemRegister.emit({
|
|
131
|
-
position: this.itemPosition
|
|
132
|
-
});
|
|
133
|
-
}
|
|
134
128
|
handleItemClick(event) {
|
|
135
129
|
if (this.disabled || isHidden(this.el) || this.layout === "horizontal" && event.composedPath().some((el) => el.classList?.contains("stepper-item-content"))) {
|
|
136
130
|
return;
|
|
@@ -3,7 +3,7 @@ import { c as customElement } from "../../chunks/runtime.js";
|
|
|
3
3
|
import { css, html } from "lit";
|
|
4
4
|
import { createRef, ref } from "lit/directives/ref.js";
|
|
5
5
|
import { LitElement, createEvent, safeClassMap } from "@arcgis/lumina";
|
|
6
|
-
import { f as focusElementInGroup,
|
|
6
|
+
import { f as focusElementInGroup, a as slotChangeGetAssignedElements } from "../../chunks/dom.js";
|
|
7
7
|
import { u as useSetFocus } from "../../chunks/useSetFocus.js";
|
|
8
8
|
import { u as useInteractive } from "../../chunks/useInteractive.js";
|
|
9
9
|
const CSS = {
|
|
@@ -5,11 +5,11 @@ import type { Scale } from "../interfaces.js";
|
|
|
5
5
|
/**
|
|
6
6
|
* @cssproperty [--calcite-switch-background-color] - Specifies the component's background color.
|
|
7
7
|
* @cssproperty [--calcite-switch-background-color-hover] - Specifies the component's background color when hovered or pressed.
|
|
8
|
-
* @cssproperty [--calcite-switch-border-color] - [Deprecated] No longer necessary. Specifies the component's border color.
|
|
8
|
+
* @cssproperty [--calcite-switch-border-color] - [Deprecated] in v3.2.0, removal target v6.0.0 - No longer necessary. Specifies the component's border color.
|
|
9
9
|
* @cssproperty [--calcite-switch-corner-radius] - Specifies the component's corner radius.
|
|
10
10
|
* @cssproperty [--calcite-switch-handle-background-color] - Specifies the handle's background color.
|
|
11
|
-
* @cssproperty [--calcite-switch-handle-border-color] - [Deprecated] No longer necessary. Specifies the handle's border color.
|
|
12
|
-
* @cssproperty [--calcite-switch-handle-shadow] - [Deprecated] No longer necessary. Specifies the handle's shadow.
|
|
11
|
+
* @cssproperty [--calcite-switch-handle-border-color] - [Deprecated] in v3.2.0, removal target v6.0.0 - No longer necessary. Specifies the handle's border color.
|
|
12
|
+
* @cssproperty [--calcite-switch-handle-shadow] - [Deprecated] in v3.2.0, removal target v6.0.0 - No longer necessary. Specifies the handle's shadow.
|
|
13
13
|
*/
|
|
14
14
|
export abstract class Switch extends LitElement {
|
|
15
15
|
/**
|
|
@@ -3,21 +3,24 @@ import { c as customElement } from "../../chunks/runtime.js";
|
|
|
3
3
|
import { css, html } from "lit";
|
|
4
4
|
import { LitElement, createEvent, safeClassMap } from "@arcgis/lumina";
|
|
5
5
|
import { createRef, ref } from "lit/directives/ref.js";
|
|
6
|
-
import { c as connectForm, d as disconnectForm, H as HiddenFormInputSlot } from "../../chunks/form.js";
|
|
7
6
|
import { i as isActivationKey } from "../../chunks/key.js";
|
|
8
7
|
import { c as connectLabel, d as disconnectLabel, g as getLabelText } from "../../chunks/label.js";
|
|
9
8
|
import { I as InternalLabel } from "../../chunks/InternalLabel.js";
|
|
10
9
|
import { u as useSetFocus } from "../../chunks/useSetFocus.js";
|
|
11
10
|
import { u as useInteractive } from "../../chunks/useInteractive.js";
|
|
11
|
+
import { u as useForm } from "../../chunks/useForm.js";
|
|
12
12
|
const CSS = {
|
|
13
13
|
container: "container",
|
|
14
14
|
track: "track",
|
|
15
15
|
handle: "handle"
|
|
16
16
|
};
|
|
17
|
-
const styles = css`:host([disabled]){cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled)}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}:host([scale=s]) .container{block-size:.75rem}:host([scale=s]) .track{block-size:.75rem;inline-size:1.5rem}:host([scale=s]) .handle{block-size:.5rem;inline-size:.5rem}:host([scale=m]) .container{block-size:1rem}:host([scale=m]) .track{block-size:1rem;inline-size:2rem}:host([scale=m]) .handle{block-size:.75rem;inline-size:.75rem}:host([scale=l]) .container{block-size:1.5rem}:host([scale=l]) .track{block-size:1.5rem;inline-size:3rem}:host([scale=l]) .handle{block-size:1.25rem;inline-size:1.25rem}:host{position:relative;display:inline-block;inline-size:auto;cursor:pointer;-webkit-user-select:none;user-select:none;vertical-align:middle;tap-highlight-color:transparent}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}.container{outline
|
|
17
|
+
const styles = css`:host([disabled]){cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled)}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}:host([scale=s]) .container{block-size:.75rem}:host([scale=s]) .track{block-size:.75rem;inline-size:1.5rem}:host([scale=s]) .handle{block-size:.5rem;inline-size:.5rem}:host([scale=m]) .container{block-size:1rem}:host([scale=m]) .track{block-size:1rem;inline-size:2rem}:host([scale=m]) .handle{block-size:.75rem;inline-size:.75rem}:host([scale=l]) .container{block-size:1.5rem}:host([scale=l]) .track{block-size:1.5rem;inline-size:3rem}:host([scale=l]) .handle{block-size:1.25rem;inline-size:1.25rem}:host{position:relative;display:inline-block;inline-size:auto;cursor:pointer;-webkit-user-select:none;user-select:none;vertical-align:middle;tap-highlight-color:transparent}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}.container{outline:none;display:flex}.track{pointer-events:none;position:relative;box-sizing:border-box;display:inline-block;vertical-align:top;outline-color:transparent;border-radius:var(--calcite-switch-corner-radius, 9999px);border-color:var(--calcite-switch-border-color);background-color:var(--calcite-switch-background-color, var(--calcite-color-border-input))}.container:focus .track{outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline-offset:calc(var(--calcite-spacing-base) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}.container:hover .track{background-color:var(--calcite-switch-background-color-hover, var(--calcite-color-text-3))}.handle{pointer-events:none;position:absolute;display:block;transition-property:all;transition-duration:var(--calcite-animation-timing);transition-timing-function:cubic-bezier(.4,0,.2,1);inset-block-start:var(--calcite-spacing-base);inset-inline:var(--calcite-spacing-base) auto;background-color:var(--calcite-switch-handle-background-color, var(--calcite-color-foreground-1));border-color:var(--calcite-switch-handle-border-color);border-radius:var(--calcite-switch-corner-radius, 9999px);box-shadow:var(--calcite-switch-handle-shadow)}:host([checked]) .track{background-color:var(--calcite-switch-background-color, var(--calcite-color-brand))}:host([checked]) .handle{inset-inline:auto var(--calcite-spacing-base)}:host([checked]):host(:hover:not([disabled])) .track{background-color:var(--calcite-switch-background-color-hover, var(--calcite-color-brand-hover))}@media(forced-colors:active){:host([checked]) .track{background-color:canvasText}}.internal-label-alignment--center{align-items:center}.internal-label-alignment--end{align-items:end}.internal-label--container{display:flex;justify-content:space-between;color:var(--calcite-color-text-1)}.internal-label-required--indicator{font-weight:var(--calcite-font-weight-medium);color:var(--calcite-color-status-danger);padding-inline:var(--calcite-spacing-base)}.internal-label-required--indicator:hover{cursor:help}.internal-label--text{line-height:1}:host([scale=s]) .internal-label-spacing--bottom{margin-block-end:var(--calcite-spacing-xxs)}:host([scale=s]) .internal-label-spacing-inline--end{margin-inline-end:var(--calcite-spacing-sm)}:host([scale=s]) .internal-label-spacing-inline--start{margin-inline-start:var(--calcite-spacing-sm)}:host([scale=s]) .internal-label--text{font-size:var(--calcite-font-size--2)}:host([scale=m]) .internal-label-spacing--bottom{margin-block-end:var(--calcite-spacing-sm)}:host([scale=m]) .internal-label-spacing-inline--end{margin-inline-end:var(--calcite-spacing-sm)}:host([scale=m]) .internal-label-spacing-inline--start{margin-inline-start:var(--calcite-spacing-sm)}:host([scale=m]) .internal-label--text{font-size:var(--calcite-font-size--1)}:host([scale=l]) .internal-label-spacing--bottom{margin-block-end:var(--calcite-spacing-sm)}:host([scale=l]) .internal-label-spacing-inline--end{margin-inline-end:var(--calcite-spacing-md)}:host([scale=l]) .internal-label-spacing-inline--start{margin-inline-start:var(--calcite-spacing-md)}:host([scale=l]) .internal-label--text{font-size:var(--calcite-font-size-0)}::slotted(input[slot=hidden-form-input]){margin:0!important;opacity:0!important;outline:none!important;padding:0!important;position:absolute!important;inset:0!important;transform:none!important;-webkit-appearance:none!important;z-index:-1!important}:host([hidden]){display:none}[hidden]{display:none}`;
|
|
18
18
|
class Switch extends LitElement {
|
|
19
19
|
constructor() {
|
|
20
20
|
super();
|
|
21
|
+
this.formSupport = useForm({
|
|
22
|
+
inputType: "checkbox"
|
|
23
|
+
})(this);
|
|
21
24
|
this.switchRef = createRef();
|
|
22
25
|
this.focusSetter = useSetFocus()(this);
|
|
23
26
|
this.interactiveContainer = useInteractive(this);
|
|
@@ -31,6 +34,9 @@ class Switch extends LitElement {
|
|
|
31
34
|
static {
|
|
32
35
|
this.properties = { checked: [7, {}, { reflect: true, type: Boolean }], disabled: [7, {}, { reflect: true, type: Boolean }], form: [3, {}, { reflect: true }], label: 1, labelTextEnd: 1, labelTextStart: 1, name: [3, {}, { reflect: true }], scale: [3, {}, { reflect: true }], value: 1 };
|
|
33
36
|
}
|
|
37
|
+
static {
|
|
38
|
+
this.formAssociated = true;
|
|
39
|
+
}
|
|
34
40
|
static {
|
|
35
41
|
this.styles = styles;
|
|
36
42
|
}
|
|
@@ -40,15 +46,10 @@ class Switch extends LitElement {
|
|
|
40
46
|
connectedCallback() {
|
|
41
47
|
super.connectedCallback();
|
|
42
48
|
connectLabel(this);
|
|
43
|
-
connectForm(this);
|
|
44
49
|
}
|
|
45
50
|
disconnectedCallback() {
|
|
46
51
|
super.disconnectedCallback();
|
|
47
52
|
disconnectLabel(this);
|
|
48
|
-
disconnectForm(this);
|
|
49
|
-
}
|
|
50
|
-
syncHiddenFormInput(input) {
|
|
51
|
-
input.type = "checkbox";
|
|
52
53
|
}
|
|
53
54
|
keyDownHandler(event) {
|
|
54
55
|
if (!this.disabled && isActivationKey(event.key)) {
|
|
@@ -73,7 +74,7 @@ class Switch extends LitElement {
|
|
|
73
74
|
this.toggle();
|
|
74
75
|
}
|
|
75
76
|
render() {
|
|
76
|
-
return this.interactiveContainer({ disabled: this.disabled, children: html`<div .ariaChecked=${this.checked} .ariaLabel=${getLabelText(this)} class=${safeClassMap(CSS.container)} role=switch tabindex=0 ${ref(this.switchRef)}>${this.labelTextStart && InternalLabel({ alignmentCenter: true, bottomSpacingDisabled: true, labelText: this.labelTextStart, spacingInlineEnd: true }) || ""}<div class=${safeClassMap(CSS.track)}><div class=${safeClassMap(CSS.handle)}></div></div>${this.labelTextEnd && InternalLabel({ alignmentCenter: true, bottomSpacingDisabled: true, labelText: this.labelTextEnd, spacingInlineStart: true }) || ""}
|
|
77
|
+
return this.interactiveContainer({ disabled: this.disabled, children: html`<div .ariaChecked=${this.checked} .ariaLabel=${getLabelText(this)} class=${safeClassMap(CSS.container)} role=switch tabindex=0 ${ref(this.switchRef)}>${this.labelTextStart && InternalLabel({ alignmentCenter: true, bottomSpacingDisabled: true, labelText: this.labelTextStart, spacingInlineEnd: true }) || ""}<div class=${safeClassMap(CSS.track)}><div class=${safeClassMap(CSS.handle)}></div></div>${this.labelTextEnd && InternalLabel({ alignmentCenter: true, bottomSpacingDisabled: true, labelText: this.labelTextEnd, spacingInlineStart: true }) || ""}</div>` });
|
|
77
78
|
}
|
|
78
79
|
}
|
|
79
80
|
customElement("calcite-switch", Switch);
|
|
@@ -3,7 +3,7 @@ import type { PublicLitElement as LitElement } from "@arcgis/lumina";
|
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* @cssproperty [--calcite-tab-content-space-y] - Specifies the vertical space between the component's content in the `default` slot.
|
|
6
|
-
* @cssproperty [--calcite-tab-content-block-padding] - [Deprecated] Use `--calcite-tab-content-space-y` instead. Specifies the block padding of the component's content in the `default` slot.
|
|
6
|
+
* @cssproperty [--calcite-tab-content-block-padding] - [Deprecated] in v3.2.0, removal target v6.0.0 - Use `--calcite-tab-content-space-y` instead. Specifies the block padding of the component's content in the `default` slot.
|
|
7
7
|
* @slot - A slot for adding custom content.
|
|
8
8
|
*/
|
|
9
9
|
export abstract class Tab extends LitElement {
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { c as customElement } from "../../chunks/runtime.js";
|
|
3
3
|
import { css, html } from "lit";
|
|
4
4
|
import { LitElement, setAttribute, safeClassMap } from "@arcgis/lumina";
|
|
5
|
-
import {
|
|
5
|
+
import { n as nodeListToArray } from "../../chunks/dom.js";
|
|
6
6
|
import { g as guid } from "../../chunks/guid.js";
|
|
7
7
|
const CSS = {
|
|
8
8
|
container: "container",
|
|
@@ -12,7 +12,7 @@ const CSS = {
|
|
|
12
12
|
const IDS = {
|
|
13
13
|
tabTitleId: (id) => `calcite-tab-title-${id}`
|
|
14
14
|
};
|
|
15
|
-
const styles = css`:host{display:none}:host,.container,.content{block-size:100%;inline-size:100%}:host([selected]),:host([selected]) .container{display:flex;flex-direction:column}.content{box-sizing:border-box;padding-block:var(--calcite-tab-content-space-y, var(--calcite-tab-content-block-padding, var(--calcite-internal-tab-content-space-y)))}.scale-s{--calcite-internal-tab-content-space-y: .25rem;font-size:var(--calcite-font-size-sm);line-height:1rem}.scale-m{--calcite-internal-tab-content-space-y: .5rem;font-size:var(--calcite-font-size);line-height:1rem}.scale-l{--calcite-internal-tab-content-space-y:
|
|
15
|
+
const styles = css`:host{display:none}:host,.container,.content{block-size:100%;inline-size:100%}:host([selected]),:host([selected]) .container{display:flex;flex-direction:column}.content{box-sizing:border-box;padding-block:var(--calcite-tab-content-space-y, var(--calcite-tab-content-block-padding, var(--calcite-internal-tab-content-space-y)))}.scale-s{--calcite-internal-tab-content-space-y: .25rem;font-size:var(--calcite-font-size-sm);line-height:1rem}.scale-m{--calcite-internal-tab-content-space-y: .5rem;font-size:var(--calcite-font-size);line-height:1rem}.scale-l{--calcite-internal-tab-content-space-y: var(--calcite-space-sm-plus);font-size:var(--calcite-font-size-md);line-height:1.25rem}.container{display:none;block-size:100%;inline-size:100%;overflow:auto;outline-color:transparent}.container:focus{outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline-offset:calc(calc(-1 * var(--calcite-spacing-base)) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}:host([hidden]){display:none}[hidden]{display:none}`;
|
|
16
16
|
class Tab extends LitElement {
|
|
17
17
|
constructor() {
|
|
18
18
|
super();
|
|
@@ -5,7 +5,8 @@ import { keyed } from "lit/directives/keyed.js";
|
|
|
5
5
|
import { a as calciteSize24, b as calciteSize32, d as calciteSize44 } from "../../chunks/core.js";
|
|
6
6
|
import { css, html } from "lit";
|
|
7
7
|
import { LitElement, createEvent, safeClassMap } from "@arcgis/lumina";
|
|
8
|
-
import {
|
|
8
|
+
import { useDirection } from "@arcgis/lumina/controllers";
|
|
9
|
+
import { B as filterDirectChildren, f as focusElementInGroup, i as focusElement } from "../../chunks/dom.js";
|
|
9
10
|
import { c as createObserver } from "../../chunks/observers.js";
|
|
10
11
|
import { u as useT9n } from "../../chunks/useT9n.js";
|
|
11
12
|
const ICON = {
|
|
@@ -26,6 +27,7 @@ const styles = css`:host{position:relative;display:flex}:host([bordered]) .scrol
|
|
|
26
27
|
class TabNav extends LitElement {
|
|
27
28
|
constructor() {
|
|
28
29
|
super();
|
|
30
|
+
this.direction = useDirection();
|
|
29
31
|
this.effectiveDir = "ltr";
|
|
30
32
|
this.lastScrollWheelAxis = "x";
|
|
31
33
|
this.resizeObserver = createObserver("resize", () => {
|
|
@@ -82,7 +84,7 @@ class TabNav extends LitElement {
|
|
|
82
84
|
const { parentTabsEl } = this;
|
|
83
85
|
this.layout = parentTabsEl?.layout;
|
|
84
86
|
this.bordered = parentTabsEl?.bordered;
|
|
85
|
-
this.effectiveDir =
|
|
87
|
+
this.effectiveDir = this.direction;
|
|
86
88
|
}
|
|
87
89
|
loaded() {
|
|
88
90
|
this.scrollTabTitleIntoView(this.selectedTitle, "instant");
|
|
@@ -4,7 +4,8 @@ import { keyed } from "lit/directives/keyed.js";
|
|
|
4
4
|
import { css, isServer, html } from "lit";
|
|
5
5
|
import { createRef, ref } from "lit/directives/ref.js";
|
|
6
6
|
import { LitElement, createEvent, safeClassMap, setAttribute } from "@arcgis/lumina";
|
|
7
|
-
import {
|
|
7
|
+
import { useDirection } from "@arcgis/lumina/controllers";
|
|
8
|
+
import { n as nodeListToArray } from "../../chunks/dom.js";
|
|
8
9
|
import { t as toAriaBoolean } from "../../chunks/aria.js";
|
|
9
10
|
import { g as guid } from "../../chunks/guid.js";
|
|
10
11
|
import { c as createObserver, u as updateRefObserver } from "../../chunks/observers.js";
|
|
@@ -28,11 +29,12 @@ const idPrefix = "calcite-tab-title";
|
|
|
28
29
|
const IDS = {
|
|
29
30
|
host: (id) => `${idPrefix}-${id}`
|
|
30
31
|
};
|
|
31
|
-
const styles = css`:host([disabled]){cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled)}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}:host{display:block;outline:2px solid transparent;outline-offset:2px;margin-inline-start:0px}:host([layout=inline]){flex:0 1 auto}:host([layout=center]){flex:1 1 auto}.content{position:relative;margin-block-end:.125rem;box-sizing:border-box;display:flex;block-size:100%;align-items:center;justify-content:center}.scale-s{--calcite-internal-tab-title-close-padding: var(--calcite-spacing-none);--calcite-internal-tab-title-close-margin-start: var(--calcite-spacing-xxs)}.scale-s .content{padding-block:.25rem;font-size:var(--calcite-font-size-relative-sm);line-height:var(--calcite-font-line-height-sm)}.scale-m{--calcite-internal-tab-title-close-padding: var(--calcite-spacing-xxs);--calcite-internal-tab-title-close-margin-start: var(--calcite-spacing-xxs)}.scale-m .content{padding-block:.5rem;font-size:var(--calcite-font-size-relative-base);line-height:var(--calcite-font-line-height-base)}.scale-l{--calcite-internal-tab-title-close-padding: var(--calcite-spacing-xxs);--calcite-internal-tab-title-close-margin-start: var(--calcite-spacing-xs)}.scale-l .content{padding-block:.625rem;font-size:var(--calcite-font-size-relative-md);line-height:var(--calcite-font-line-height-md)}:host([closable]) .content{border-block-end-color:transparent}:host([layout=inline]) .content,:host([layout=center]) .content{padding-inline:.25rem}:host([layout=center]) .scale-s,:host([layout=center]) .scale-m,:host([layout=center]) .scale-l{margin-block:0px;justify-content:center;text-align:center}:host([layout=center]) .scale-s .content,:host([layout=center]) .scale-m .content,:host([layout=center]) .scale-l .content{flex:1 1 auto;flex-grow:1}.container{position:relative;box-sizing:border-box;display:flex;block-size:100%;inline-size:100%;cursor:pointer;align-content:center;justify-content:space-between;padding-inline:0px;font-size:var(--calcite-font-size-relative-base);line-height:var(--calcite-font-line-height-base);outline-color:transparent;transition-property:background-color,block-size,border-color,box-shadow,color,inset-block-end,inset-block-start,inset-inline-end,inset-inline-start,inset-size,opacity,outline-color,transform;transition-duration:var(--calcite-animation-timing);transition-timing-function:ease-in-out;color:var(--calcite-tab-text-color, var(--calcite-color-text-3));background-color:var(--calcite-tab-background-color, transparent)}.selected-indicator{position:absolute;display:block;block-size:.125rem;transition-property:background-color,block-size,border-color,box-shadow,color,inset-block-end,inset-block-start,inset-inline-end,inset-inline-start,inset-size,opacity,outline-color,transform;transition-duration:var(--calcite-animation-timing);transition-timing-function:ease-in-out;inset-block-end:0;inset-inline-start:0;inset-inline-end:0;inline-size:100%}:host([bordered][selected]) .container:after{position:absolute;display:block;block-size:.125rem;transition-property:background-color,block-size,border-color,box-shadow,color,inset-block-end,inset-block-start,inset-inline-end,inset-inline-start,inset-size,opacity,outline-color,transform;transition-duration:var(--calcite-animation-timing);transition-timing-function:ease-in-out;inset-block-end:-1px;inset-inline-start:0;inset-inline-end:0;inline-size:100%;content:""}:host([bordered][selected]) .container.container--bottom:after{inset-block-start:-1px}:host([bordered][selected]:focus) .container:after{background:transparent}.container--bottom .selected-indicator{inset-block-end:unset;inset-block-start:0}:host([bordered]:not([selected]):hover:not(:focus)) .selected-indicator{background-color:var(--calcite-color-foreground-2)}:host([bordered]:not([selected]):hover:not(:focus)) .container:not(.container--bottom) .selected-indicator{box-shadow:inset 0 1px var(--calcite-color-border-1)}:host([bordered]:not([selected]):hover:not(:focus)) .container.container--bottom .selected-indicator{box-shadow:inset 0 -1px var(--calcite-color-border-1)}:host([selected]:focus) .selected-indicator{block-size:4px}.calcite-tab-title--icon{position:relative;margin:0;display:inline-flex;align-self:center}.calcite-tab-title--icon svg{transition-property:background-color,block-size,border-color,box-shadow,color,inset-block-end,inset-block-start,inset-inline-end,inset-inline-start,inset-size,opacity,outline-color,transform;transition-duration:var(--calcite-animation-timing);transition-timing-function:ease-in-out}.container{color:var(--calcite-tab-text-color, var(--calcite-color-text-3))}.container .icon-start{color:var(--calcite-tab-icon-color-start, var(--calcite-icon-color, var(--calcite-ui-icon-color)))}.container .icon-end{color:var(--calcite-tab-icon-color-end, var(--calcite-icon-color, var(--calcite-ui-icon-color)))}.container:hover,.container:active,:host([selected]) .container{color:var(--calcite-tab-text-color-press, var(--calcite-color-text-1))}.container:hover .icon-start,.container:active .icon-start,:host([selected]) .container .icon-start{color:var(--calcite-tab-icon-color-start-press, var(--calcite-icon-color, var(--calcite-ui-icon-color)))}.container:hover .icon-end,.container:active .icon-end,:host([selected]) .container .icon-end{color:var(--calcite-tab-icon-color-end-press, var(--calcite-icon-color, var(--calcite-ui-icon-color)))}.content--has-text{padding:.25rem}.content--has-text .calcite-tab-title--icon.icon-start{margin-inline-end:var(--calcite-spacing-sm)}.content--has-text .calcite-tab-title--icon.icon-end{margin-inline-start:var(--calcite-spacing-sm)}:host([bordered]) .container{border-color:transparent;border-inline-width:var(--calcite-spacing-px);border-inline-style:solid}:host([bordered]) .container .x-button calcite-icon{margin-block-start:var(--calcite-spacing-px)}:host([bordered]) .container .x-button:focus,:host([bordered]) .container .x-button:hover,:host([bordered]) .container .x-button:active{box-shadow:0 2px 0 0 var(--calcite-tab-close-icon-background-color-press, var(--calcite-color-foreground-3))}:host([bordered]) .container.container--bottom{border-block-start-style:solid;border-block-start-width:1px}:host([bordered]) .container.container--bottom .selected-indicator{inset-block-start:unset;inset-block-end:0}:host([bordered]) .container.container--bottom .x-button{box-shadow:0 -2px 0 0 var(--calcite-tab-close-icon-background-color, var(--calcite-color-transparent))}:host([bordered]) .container.container--bottom .x-button:focus,:host([bordered]) .container.container--bottom .x-button:hover,:host([bordered]) .container.container--bottom .x-button:active{box-shadow:0 -2px 0 0 var(--calcite-tab-close-icon-background-color-press, var(--calcite-color-foreground-3))}:host([bordered]) .container.container--bottom .x-button calcite-icon{margin-block-end:var(--calcite-spacing-px)}:host([bordered]) .container:not(.container--bottom){border-block-end-style:solid;border-block-end-width:1px}:host([bordered]) .container:not(.container--bottom) .x-button{block-size:calc(100% - var(--calcite-spacing-px));margin-block-start:-1px}:host([bordered]) .container .selected-indicator{inset-block-start:0;inset-block-end:unset;inset-inline-start:-1px;inset-inline-end:0;inline-size:calc(100% + var(--calcite-spacing-base))}:host([bordered]) .container:host(:not([selected])) .container .x-button{box-shadow:0 2px 0 0 transparent}:host([bordered]) .container:host(:not([selected])):host(:hover) .container:not(.container--bottom){border-block-end-color:var(--calcite-tab-border-color, var(--calcite-color-border-1))}:host([bordered]) .container:host(:not([selected])):host(:hover):host(:not(:focus)) .selected-indicator{box-shadow:inset 0 var(--calcite-internal-tab-shadow-length) var(--calcite-tab-border-color, var(--calcite-color-border-1))}:host([bordered]) .container:host(:not([selected])):host(:hover):host(:not(:focus)) :not(.container--bottom){--calcite-internal-tab-shadow-length: 1px}:host([bordered]) .container:host(:not([selected])):host(:hover):host(:not(:focus)) .container--bottom{--calcite-internal-tab-shadow-length: -1px}:host([bordered]) .container:hover{background-color:var(--calcite-tab-background-color-hover, var(--calcite-color-foreground-2));border-block-end-color:var(--calcite-color-border-1)}:host(:hover) .selected-indicator{background-color:var(--calcite-color-border-3)}:host([selected]) .selected-indicator,:host([selected]:hover) .selected-indicator,:host(:focus) .selected-indicator,:host(:active) .selected-indicator{background-color:var(--calcite-tab-accent-color-press, var(--calcite-color-brand))}:host([closed]){display:none}:host([selected][bordered]) .container{border-inline-color:var(--calcite-tab-border-color, var(--calcite-color-border-1))}:host([selected][bordered]) .container:after{background-color:var(--calcite-tab-background-color, var(--calcite-color-foreground-1))}:host([selected][bordered]) .container:hover,:host([selected][bordered]) .container:active{background:transparent}:host(:focus) .container{outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline-offset:calc(calc(-1 * var(--calcite-spacing-base)) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}:host(:focus) .container:focus-within{outline-color:transparent}:host([icon-start][icon-end]) .calcite-tab-title--icon:first-child{margin-inline-end:var(--calcite-spacing-sm)}:host([layout=inline][bordered]) .scale-m .content,:host([layout=center][bordered]) .scale-m .content{padding-inline:.75rem}:host([layout=inline][bordered]) .scale-s .content,:host([layout=center][bordered]) .scale-s .content{padding-inline:.5rem}:host([layout=inline][bordered]) .scale-l .content,:host([layout=center][bordered]) .scale-l .content{padding-inline:1rem}:host([layout=inline][closable]) .scale-s .content,:host([layout=inline][closable]) .scale-m .content,:host([layout=inline][closable]) .scale-l .content{padding-inline-end:0}.close{--calcite-internal-action-spacing: var(--calcite-internal-tab-title-close-padding);--calcite-internal-action-height: unset;--calcite-action-text-color: var(--calcite-tab-close-icon-color);--calcite-action-text-color-press: var(--calcite-tab-close-icon-color-press);--calcite-action-background-color: var(--calcite-tab-close-icon-background-color);--calcite-action-background-color-press: var(--calcite-tab-close-icon-background-color-press);--calcite-action-background-color-hover: var(--calcite-tab-close-icon-background-color-hover);margin:auto;margin-inline:var(--calcite-spacing-sm) var(--calcite-internal-tab-title-close-margin-start)}@media(forced-colors:active){:host{outline-width:0;outline-offset:0}:host(:focus) .container{outline-color:highlight}:host([bordered][selected]) .container{border-block-end-style:none}:host([bordered][selected]) .container--bottom{border-block-start-style:none}.selected-indicator{background-color:highlight}}:host([hidden]){display:none}[hidden]{display:none}:host([disabled]) .container{pointer-events:none;opacity:.5}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}`;
|
|
32
|
+
const styles = css`:host([disabled]){cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled)}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}:host{display:block;outline:2px solid transparent;outline-offset:2px;margin-inline-start:0px}:host([layout=inline]){flex:0 1 auto}:host([layout=center]){flex:1 1 auto}.content{position:relative;margin-block-end:.125rem;box-sizing:border-box;display:flex;block-size:100%;align-items:center;justify-content:center}.scale-s{--calcite-internal-tab-title-close-padding: var(--calcite-spacing-none);--calcite-internal-tab-title-close-margin-start: var(--calcite-spacing-xxs)}.scale-s .content{padding-block:.25rem;font-size:var(--calcite-font-size-relative-sm);line-height:var(--calcite-font-line-height-sm)}.scale-m{--calcite-internal-tab-title-close-padding: var(--calcite-spacing-xxs);--calcite-internal-tab-title-close-margin-start: var(--calcite-spacing-xxs)}.scale-m .content{padding-block:.5rem;font-size:var(--calcite-font-size-relative-base);line-height:var(--calcite-font-line-height-base)}.scale-l{--calcite-internal-tab-title-close-padding: var(--calcite-spacing-xxs);--calcite-internal-tab-title-close-margin-start: var(--calcite-spacing-xs)}.scale-l .content{padding-block:var(--calcite-space-sm-plus);font-size:var(--calcite-font-size-relative-md);line-height:var(--calcite-font-line-height-md)}:host([closable]) .content{border-block-end-color:transparent}:host([layout=inline]) .content,:host([layout=center]) .content{padding-inline:.25rem}:host([layout=center]) .scale-s,:host([layout=center]) .scale-m,:host([layout=center]) .scale-l{margin-block:0px;justify-content:center;text-align:center}:host([layout=center]) .scale-s .content,:host([layout=center]) .scale-m .content,:host([layout=center]) .scale-l .content{flex:1 1 auto;flex-grow:1}.container{position:relative;box-sizing:border-box;display:flex;block-size:100%;inline-size:100%;cursor:pointer;align-content:center;justify-content:space-between;padding-inline:0px;font-size:var(--calcite-font-size-relative-base);line-height:var(--calcite-font-line-height-base);outline-color:transparent;transition-property:background-color,block-size,border-color,box-shadow,color,inset-block-end,inset-block-start,inset-inline-end,inset-inline-start,inset-size,opacity,outline-color,transform;transition-duration:var(--calcite-animation-timing);transition-timing-function:ease-in-out;color:var(--calcite-tab-text-color, var(--calcite-color-text-3));background-color:var(--calcite-tab-background-color, transparent)}.selected-indicator{position:absolute;display:block;block-size:.125rem;transition-property:background-color,block-size,border-color,box-shadow,color,inset-block-end,inset-block-start,inset-inline-end,inset-inline-start,inset-size,opacity,outline-color,transform;transition-duration:var(--calcite-animation-timing);transition-timing-function:ease-in-out;inset-block-end:0;inset-inline-start:0;inset-inline-end:0;inline-size:100%}:host([bordered][selected]) .container:after{position:absolute;display:block;block-size:.125rem;transition-property:background-color,block-size,border-color,box-shadow,color,inset-block-end,inset-block-start,inset-inline-end,inset-inline-start,inset-size,opacity,outline-color,transform;transition-duration:var(--calcite-animation-timing);transition-timing-function:ease-in-out;inset-block-end:-1px;inset-inline-start:0;inset-inline-end:0;inline-size:100%;content:""}:host([bordered][selected]) .container.container--bottom:after{inset-block-start:-1px}:host([bordered][selected]:focus) .container:after{background:transparent}.container--bottom .selected-indicator{inset-block-end:unset;inset-block-start:0}:host([bordered]:not([selected]):hover:not(:focus)) .selected-indicator{background-color:var(--calcite-color-foreground-2)}:host([bordered]:not([selected]):hover:not(:focus)) .container:not(.container--bottom) .selected-indicator{box-shadow:inset 0 1px var(--calcite-color-border-1)}:host([bordered]:not([selected]):hover:not(:focus)) .container.container--bottom .selected-indicator{box-shadow:inset 0 -1px var(--calcite-color-border-1)}:host([selected]:focus) .selected-indicator{block-size:4px}.calcite-tab-title--icon{position:relative;margin:0;display:inline-flex;align-self:center}.calcite-tab-title--icon svg{transition-property:background-color,block-size,border-color,box-shadow,color,inset-block-end,inset-block-start,inset-inline-end,inset-inline-start,inset-size,opacity,outline-color,transform;transition-duration:var(--calcite-animation-timing);transition-timing-function:ease-in-out}.container{color:var(--calcite-tab-text-color, var(--calcite-color-text-3))}.container .icon-start{color:var(--calcite-tab-icon-color-start, var(--calcite-icon-color, var(--calcite-ui-icon-color)))}.container .icon-end{color:var(--calcite-tab-icon-color-end, var(--calcite-icon-color, var(--calcite-ui-icon-color)))}.container:hover,.container:active,:host([selected]) .container{color:var(--calcite-tab-text-color-press, var(--calcite-color-text-1))}.container:hover .icon-start,.container:active .icon-start,:host([selected]) .container .icon-start{color:var(--calcite-tab-icon-color-start-press, var(--calcite-icon-color, var(--calcite-ui-icon-color)))}.container:hover .icon-end,.container:active .icon-end,:host([selected]) .container .icon-end{color:var(--calcite-tab-icon-color-end-press, var(--calcite-icon-color, var(--calcite-ui-icon-color)))}.content--has-text{padding:.25rem}.content--has-text .calcite-tab-title--icon.icon-start{margin-inline-end:var(--calcite-spacing-sm)}.content--has-text .calcite-tab-title--icon.icon-end{margin-inline-start:var(--calcite-spacing-sm)}:host([bordered]) .container{border-color:transparent;border-inline-width:var(--calcite-spacing-px);border-inline-style:solid}:host([bordered]) .container .x-button calcite-icon{margin-block-start:var(--calcite-spacing-px)}:host([bordered]) .container .x-button:focus,:host([bordered]) .container .x-button:hover,:host([bordered]) .container .x-button:active{box-shadow:0 2px 0 0 var(--calcite-tab-close-icon-background-color-press, var(--calcite-color-foreground-3))}:host([bordered]) .container.container--bottom{border-block-start-style:solid;border-block-start-width:1px}:host([bordered]) .container.container--bottom .selected-indicator{inset-block-start:unset;inset-block-end:0}:host([bordered]) .container.container--bottom .x-button{box-shadow:0 -2px 0 0 var(--calcite-tab-close-icon-background-color, var(--calcite-color-transparent))}:host([bordered]) .container.container--bottom .x-button:focus,:host([bordered]) .container.container--bottom .x-button:hover,:host([bordered]) .container.container--bottom .x-button:active{box-shadow:0 -2px 0 0 var(--calcite-tab-close-icon-background-color-press, var(--calcite-color-foreground-3))}:host([bordered]) .container.container--bottom .x-button calcite-icon{margin-block-end:var(--calcite-spacing-px)}:host([bordered]) .container:not(.container--bottom){border-block-end-style:solid;border-block-end-width:1px}:host([bordered]) .container:not(.container--bottom) .x-button{block-size:calc(100% - var(--calcite-spacing-px));margin-block-start:-1px}:host([bordered]) .container .selected-indicator{inset-block-start:0;inset-block-end:unset;inset-inline-start:-1px;inset-inline-end:0;inline-size:calc(100% + var(--calcite-spacing-base))}:host([bordered]) .container:host(:not([selected])) .container .x-button{box-shadow:0 2px 0 0 transparent}:host([bordered]) .container:host(:not([selected])):host(:hover) .container:not(.container--bottom){border-block-end-color:var(--calcite-tab-border-color, var(--calcite-color-border-1))}:host([bordered]) .container:host(:not([selected])):host(:hover):host(:not(:focus)) .selected-indicator{box-shadow:inset 0 var(--calcite-internal-tab-shadow-length) var(--calcite-tab-border-color, var(--calcite-color-border-1))}:host([bordered]) .container:host(:not([selected])):host(:hover):host(:not(:focus)) :not(.container--bottom){--calcite-internal-tab-shadow-length: 1px}:host([bordered]) .container:host(:not([selected])):host(:hover):host(:not(:focus)) .container--bottom{--calcite-internal-tab-shadow-length: -1px}:host([bordered]) .container:hover{background-color:var(--calcite-tab-background-color-hover, var(--calcite-color-foreground-2));border-block-end-color:var(--calcite-color-border-1)}:host(:hover) .selected-indicator{background-color:var(--calcite-color-border-3)}:host([selected]) .selected-indicator,:host([selected]:hover) .selected-indicator,:host(:focus) .selected-indicator,:host(:active) .selected-indicator{background-color:var(--calcite-tab-accent-color-press, var(--calcite-color-brand))}:host([closed]){display:none}:host([selected][bordered]) .container{border-inline-color:var(--calcite-tab-border-color, var(--calcite-color-border-1))}:host([selected][bordered]) .container:after{background-color:var(--calcite-tab-background-color, var(--calcite-color-foreground-1))}:host([selected][bordered]) .container:hover,:host([selected][bordered]) .container:active{background:transparent}:host(:focus) .container{outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline-offset:calc(calc(-1 * var(--calcite-spacing-base)) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}:host(:focus) .container:focus-within{outline-color:transparent}:host([icon-start][icon-end]) .calcite-tab-title--icon:first-child{margin-inline-end:var(--calcite-spacing-sm)}:host([layout=inline][bordered]) .scale-m .content,:host([layout=center][bordered]) .scale-m .content{padding-inline:.75rem}:host([layout=inline][bordered]) .scale-s .content,:host([layout=center][bordered]) .scale-s .content{padding-inline:.5rem}:host([layout=inline][bordered]) .scale-l .content,:host([layout=center][bordered]) .scale-l .content{padding-inline:1rem}:host([layout=inline][closable]) .scale-s .content,:host([layout=inline][closable]) .scale-m .content,:host([layout=inline][closable]) .scale-l .content{padding-inline-end:0}.close{--calcite-internal-action-spacing: var(--calcite-internal-tab-title-close-padding);--calcite-internal-action-height: unset;--calcite-action-text-color: var(--calcite-tab-close-icon-color);--calcite-action-text-color-press: var(--calcite-tab-close-icon-color-press);--calcite-action-background-color: var(--calcite-tab-close-icon-background-color);--calcite-action-background-color-press: var(--calcite-tab-close-icon-background-color-press);--calcite-action-background-color-hover: var(--calcite-tab-close-icon-background-color-hover);margin:auto;margin-inline:var(--calcite-spacing-sm) var(--calcite-internal-tab-title-close-margin-start)}@media(forced-colors:active){:host{outline-width:0;outline-offset:0}:host(:focus) .container{outline-color:highlight}:host([bordered][selected]) .container{border-block-end-style:none}:host([bordered][selected]) .container--bottom{border-block-start-style:none}.selected-indicator{background-color:highlight}}:host([hidden]){display:none}[hidden]{display:none}:host([disabled]) .container{pointer-events:none;opacity:.5}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}`;
|
|
32
33
|
class TabTitle extends LitElement {
|
|
33
34
|
constructor() {
|
|
34
35
|
super();
|
|
35
36
|
this.closeButtonRef = createRef();
|
|
37
|
+
this.direction = useDirection();
|
|
36
38
|
this.guid = IDS.host(guid());
|
|
37
39
|
this.mutationObserver = createObserver("mutation", () => this.updateHasText());
|
|
38
40
|
this.resizeObserver = createObserver("resize", () => {
|
|
@@ -153,7 +155,7 @@ class TabTitle extends LitElement {
|
|
|
153
155
|
break;
|
|
154
156
|
case "ArrowRight":
|
|
155
157
|
event.preventDefault();
|
|
156
|
-
if (
|
|
158
|
+
if (this.direction === "ltr") {
|
|
157
159
|
this.calciteInternalTabsFocusNext.emit();
|
|
158
160
|
} else {
|
|
159
161
|
this.calciteInternalTabsFocusPrevious.emit();
|
|
@@ -161,7 +163,7 @@ class TabTitle extends LitElement {
|
|
|
161
163
|
break;
|
|
162
164
|
case "ArrowLeft":
|
|
163
165
|
event.preventDefault();
|
|
164
|
-
if (
|
|
166
|
+
if (this.direction === "ltr") {
|
|
165
167
|
this.calciteInternalTabsFocusPrevious.emit();
|
|
166
168
|
} else {
|
|
167
169
|
this.calciteInternalTabsFocusNext.emit();
|
|
@@ -3,7 +3,7 @@ import type { PublicLitElement as LitElement } from "@arcgis/lumina";
|
|
|
3
3
|
import type { Alignment } from "../interfaces.js";
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
|
-
* @cssproperty [--calcite-table-cell-background] - [Deprecated] Use `--calcite-table-cell-background-color` instead. Specifies the component's background color.
|
|
6
|
+
* @cssproperty [--calcite-table-cell-background] - [Deprecated] in v3.3.0, removal target v6.0.0 - Use `--calcite-table-cell-background-color` instead. Specifies the component's background color.
|
|
7
7
|
* @cssproperty [--calcite-table-cell-background-color] - Specifies the component's background color.
|
|
8
8
|
* @cssproperty [--calcite-table-cell-border-color] - Specifies the component's border color.
|
|
9
9
|
* @cssproperty [--calcite-table-cell-text-color] - Specifies the component's text color.
|
|
@@ -11,7 +11,10 @@ import type { Alignment } from "../interfaces.js";
|
|
|
11
11
|
*/
|
|
12
12
|
export abstract class TableCell extends LitElement {
|
|
13
13
|
/**
|
|
14
|
-
* Specifies the alignment of the component
|
|
14
|
+
* Specifies the horizontal alignment of content within the component, where:
|
|
15
|
+
* `"start"` positions content at the start of the component,
|
|
16
|
+
* `"center"` positions content in the middle of the component, and
|
|
17
|
+
* `"end"` positions content at the end of the component.
|
|
15
18
|
*
|
|
16
19
|
* @default "start"
|
|
17
20
|
*/
|