@esri/calcite-components 5.1.0-next.2 → 5.1.0-next.20
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/{6FFNT4VB.js → 22XKB6L2.js} +1 -1
- package/dist/cdn/2ND3XOXB.js +2 -0
- package/dist/cdn/{3OQCCQAJ.js → 2Q6MQE6T.js} +1 -1
- package/dist/cdn/{4MQ5CZTF.js → 2XVLD3TZ.js} +1 -1
- package/dist/cdn/{Y6RV3XPM.js → 33V2IPQH.js} +1 -1
- package/dist/cdn/{5ZWBTARS.js → 34BXSIOX.js} +1 -1
- package/dist/cdn/{6X5WFIW5.js → 35Q7CXJB.js} +1 -1
- package/dist/cdn/37VSXK5O.js +2 -0
- package/dist/cdn/3CDHZWYP.js +2 -0
- package/dist/cdn/{TCKCRZZG.js → 3IF37WUQ.js} +1 -1
- package/dist/cdn/3IQMWIFS.js +2 -0
- package/dist/cdn/{FMIBYPIO.js → 3S662424.js} +1 -1
- package/dist/cdn/{UGAIXYET.js → 3SWUKX6P.js} +1 -1
- package/dist/cdn/{PTWMPI4U.js → 43ECFDRW.js} +1 -1
- package/dist/cdn/{K4PA2IDP.js → 4EKI2TS2.js} +1 -1
- package/dist/cdn/{UESTEIYV.js → 4GJOKYCB.js} +1 -1
- package/dist/cdn/{TYM7TD6F.js → 4J7HS5YA.js} +1 -1
- package/dist/cdn/{MDWM7MQB.js → 4R7TH7RM.js} +1 -1
- package/dist/cdn/4ZVYMW4R.js +2 -0
- package/dist/cdn/5BFKLHYH.js +2 -0
- package/dist/cdn/{NKEMXHJM.js → 5BKPHZLL.js} +1 -1
- package/dist/cdn/{YBWDSUDY.js → 5PG6RO6R.js} +1 -1
- package/dist/cdn/{J4VYBUOS.js → 5SYSB6PQ.js} +1 -1
- package/dist/cdn/{YJ3UDYOD.js → 5YRGOB35.js} +1 -1
- package/dist/cdn/{LQSWBMAX.js → 65XNSH5M.js} +1 -1
- package/dist/cdn/{RKMP4RCA.js → 6FF3HY6P.js} +1 -1
- package/dist/cdn/6IWW6D4Q.js +2 -0
- package/dist/cdn/{5CJJBSEE.js → 6JIWRVMQ.js} +1 -1
- package/dist/cdn/6LGGSSEY.js +2 -0
- package/dist/cdn/{HYV6NNWJ.js → 6MFE65M7.js} +1 -1
- package/dist/cdn/747JJOW4.js +2 -0
- package/dist/cdn/7ARRBS5G.js +2 -0
- package/dist/cdn/7AUICBFO.js +2 -0
- package/dist/cdn/A2DYZ7KQ.js +2 -0
- package/dist/cdn/A7N4H6JN.js +2 -0
- package/dist/cdn/{EVZELQEI.js → AAGY3YJ7.js} +1 -1
- package/dist/cdn/AEBTTP5H.js +2 -0
- package/dist/cdn/{QLF7GIME.js → AGBEMZDL.js} +1 -1
- package/dist/cdn/{NEGL7QRS.js → AK7KUDIJ.js} +1 -1
- package/dist/cdn/AOYI3MHS.js +2 -0
- package/dist/cdn/{JIGD5HQV.js → APFLOHNZ.js} +1 -1
- package/dist/cdn/{TK4U4Q2X.js → BIF6KXKQ.js} +1 -1
- package/dist/cdn/BKJJCMX4.js +2 -0
- package/dist/cdn/{5SEIMSSA.js → BSYDNQR7.js} +1 -1
- package/dist/cdn/CCTXSUHA.js +2 -0
- package/dist/cdn/CEXPPEKJ.js +2 -0
- package/dist/cdn/{Z57WK5OX.js → CL43RPXK.js} +1 -1
- package/dist/cdn/{WVRTQO4B.js → CSKNNH35.js} +1 -1
- package/dist/cdn/CXGNIXAV.js +2 -0
- package/dist/cdn/DETRASAF.js +2 -0
- package/dist/cdn/DHLKLAP6.js +2 -0
- package/dist/cdn/DR6VZF53.js +2 -0
- package/dist/cdn/E5DWOMKZ.js +2 -0
- package/dist/cdn/EG75BB6B.js +2 -0
- package/dist/cdn/{DMDJK57V.js → EMJKLNR4.js} +1 -1
- package/dist/cdn/{6ZH5C6LA.js → EO5GCJJV.js} +1 -1
- package/dist/cdn/FC4DWB55.js +2 -0
- package/dist/cdn/{TW6ZPWM5.js → FNOFA6MK.js} +1 -1
- package/dist/cdn/{RNNM37GO.js → FOUAYGO6.js} +1 -1
- package/dist/cdn/{C3DQT3XL.js → FPKEUKFD.js} +1 -1
- package/dist/cdn/{KZV4YUNF.js → FSDARZEV.js} +1 -1
- package/dist/cdn/{RSTWTSXK.js → G7AWCCCH.js} +1 -1
- package/dist/cdn/GEIVQQFF.js +2 -0
- package/dist/cdn/GFNPHHGH.js +2 -0
- package/dist/cdn/{JKZNKJ4E.js → GJ2MIGPB.js} +1 -1
- package/dist/cdn/{4EKGFJEY.js → GNO6NIDO.js} +1 -1
- package/dist/cdn/GZ6K7LNT.js +2 -0
- package/dist/cdn/{Q5NGOFZW.js → HILQEGLN.js} +2 -2
- package/dist/cdn/HJAJCQ53.js +4 -0
- package/dist/cdn/HMIQEO2S.js +2 -0
- package/dist/cdn/HN7YLZ6M.js +2 -0
- package/dist/cdn/HW3UQOSI.js +2 -0
- package/dist/cdn/IAGRDQVJ.js +2 -0
- package/dist/cdn/{3FZCUBZ5.js → IDLD4TJI.js} +1 -1
- package/dist/cdn/{IHZTOERI.js → IGWUZHRW.js} +1 -1
- package/dist/cdn/{EBETKN7W.js → IJL7WHJH.js} +1 -1
- package/dist/cdn/{6LZSRXWZ.js → IXXA5MXT.js} +1 -1
- package/dist/cdn/{HJ2TBW6C.js → J2LJDPBH.js} +1 -1
- package/dist/cdn/{TEQEYTGC.js → JI243GXJ.js} +1 -1
- package/dist/cdn/{GUIMHKM6.js → JTRCCPJ2.js} +1 -1
- package/dist/cdn/K5XNTGK5.js +2 -0
- package/dist/cdn/{OEVO2RLE.js → K7F64AHY.js} +1 -1
- package/dist/cdn/KALRNYQ2.js +2 -0
- package/dist/cdn/{YLAVIMGA.js → KDRNERSH.js} +1 -1
- package/dist/cdn/{GIYRIRXI.js → KJVA6E2I.js} +1 -1
- package/dist/cdn/KSBS65AF.js +2 -0
- package/dist/cdn/{ZZKXTLEP.js → KUENIL4Q.js} +1 -1
- package/dist/cdn/KYXHUQO2.js +2 -0
- package/dist/cdn/{HZECPHN5.js → KZCGSXGE.js} +1 -1
- package/dist/cdn/LBECSCAI.js +2 -0
- package/dist/cdn/{UX4AYCFF.js → LIT2ZBYQ.js} +1 -1
- package/dist/cdn/LNNIQGL6.js +2 -0
- package/dist/cdn/{FWH3M3KQ.js → LRZIF5Z2.js} +1 -1
- package/dist/cdn/{GIOGHX6Y.js → LZAKOA3H.js} +1 -1
- package/dist/cdn/{P7COCJFG.js → LZKKDKO3.js} +1 -1
- package/dist/cdn/{OXEUDPTB.js → M5VNK3SL.js} +1 -1
- package/dist/cdn/M6F43LEL.js +2 -0
- package/dist/cdn/MJ3CNOP2.js +2 -0
- package/dist/cdn/{KXFAVNUY.js → MVXTNNYH.js} +1 -1
- package/dist/cdn/MYNLP4LV.js +2 -0
- package/dist/cdn/{DZ5ORZ4Q.js → NAU42FZ3.js} +1 -1
- package/dist/cdn/{5P6O6RLU.js → NGHLVZ5Z.js} +1 -1
- package/dist/cdn/NKYLFLID.js +2 -0
- package/dist/cdn/{2UHPDM22.js → NMP66VIP.js} +1 -1
- package/dist/cdn/{RP555FJ5.js → NU7ERMRB.js} +1 -1
- package/dist/cdn/OCNCRS4K.js +2 -0
- package/dist/cdn/OLQYSX3N.js +2 -0
- package/dist/cdn/{DRLHDQPQ.js → OT2IKALC.js} +1 -1
- package/dist/cdn/{WJHLGJ6O.js → OWWH7MYD.js} +1 -1
- package/dist/cdn/{GE4DYP44.js → PGIGDANJ.js} +1 -1
- package/dist/cdn/{7CBKFWUR.js → PO273LF4.js} +1 -1
- package/dist/cdn/{WNRXPDBD.js → PT6ADKEI.js} +1 -1
- package/dist/cdn/Q2O7NHUL.js +2 -0
- package/dist/cdn/QX6ER6VK.js +2 -0
- package/dist/cdn/{FC2NRQ3K.js → R4LVYLB2.js} +1 -1
- package/dist/cdn/R5KVVGDA.js +2 -0
- package/dist/cdn/{DMJB2C34.js → RSDXSUIF.js} +1 -1
- package/dist/cdn/{QXYIZ2BN.js → TDA6QWEL.js} +1 -1
- package/dist/cdn/THYUXLYU.js +2 -0
- package/dist/cdn/{PV7SEUP6.js → TYYJSPYN.js} +1 -1
- package/dist/cdn/{74RBOHVA.js → U5EPLWST.js} +1 -1
- package/dist/cdn/{64ZF22ED.js → UG7HIJW4.js} +1 -1
- package/dist/cdn/UNDK7VDZ.js +2 -0
- package/dist/cdn/{X6VUCHWA.js → VAATS4VT.js} +1 -1
- package/dist/cdn/VQVJN235.js +2 -0
- package/dist/cdn/W4A5PMYP.js +2 -0
- package/dist/cdn/{VZ5KSWMD.js → W5VKWHFZ.js} +1 -1
- package/dist/cdn/{7MFNGV4Q.js → X2VL5BEL.js} +1 -1
- package/dist/cdn/{XMSAQFKD.js → X5ULB62C.js} +1 -1
- package/dist/cdn/{VXTDQHCD.js → XTO65SGO.js} +1 -1
- package/dist/cdn/{M7KMYURY.js → XUYHFX7W.js} +1 -1
- package/dist/cdn/{P3RRIB6Y.js → XYW2MCB2.js} +1 -1
- package/dist/cdn/Y2U5TA3X.js +2 -0
- package/dist/cdn/{3OR2XXEV.js → YC4UPHSG.js} +1 -1
- package/dist/cdn/YGNRRM3Y.js +2 -0
- package/dist/cdn/YR3YYXCG.js +2 -0
- package/dist/cdn/YWPPHMLR.js +2 -0
- package/dist/cdn/Z2E6QX3D.js +2 -0
- package/dist/cdn/{KAXRYSAQ.js → ZQEGCVMZ.js} +1 -1
- package/dist/cdn/{BELEG27X.js → ZXODWFIV.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/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-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 +1 -1
- 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 +13 -3
- package/dist/components/calcite-combobox/customElement.js +25 -18
- 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-link/customElement.js +4 -3
- package/dist/components/calcite-list/customElement.js +26 -4
- package/dist/components/calcite-list-item/customElement.js +5 -3
- 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-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 +1 -1
- 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 +10 -7
- 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 +8 -7
- package/dist/components/calcite-tab/customElement.d.ts +1 -1
- package/dist/components/calcite-tab/customElement.js +1 -1
- package/dist/components/calcite-tab-nav/customElement.js +4 -2
- package/dist/components/calcite-tab-title/customElement.js +5 -3
- 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 +18 -18
- 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/5YSE3JQB.js +0 -2
- package/dist/cdn/6HBOEH4L.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/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/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
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
2
|
import { c as customElement } from "../../chunks/runtime.js";
|
|
3
|
-
import { css, html } from "lit";
|
|
4
3
|
import { live } from "lit/directives/live.js";
|
|
5
4
|
import { throttle } from "es-toolkit";
|
|
6
5
|
import { createRef, ref } from "lit/directives/ref.js";
|
|
7
6
|
import { LitElement, createEvent, stringOrBoolean, safeClassMap, nothing } from "@arcgis/lumina";
|
|
8
7
|
import { useWatchAttributes } from "@arcgis/lumina/controllers";
|
|
9
|
-
import {
|
|
8
|
+
import { css, html } from "lit";
|
|
10
9
|
import { c as connectLabel, d as disconnectLabel, g as getLabelText } from "../../chunks/label.js";
|
|
11
10
|
import { s as slotChangeHasAssignedElement } from "../../chunks/dom.js";
|
|
12
11
|
import { n as numberStringFormatter } from "../../chunks/locale.js";
|
|
@@ -14,11 +13,11 @@ import { c as createObserver, u as updateRefObserver } from "../../chunks/observ
|
|
|
14
13
|
import { g as guid } from "../../chunks/guid.js";
|
|
15
14
|
import { I as InternalLabel } from "../../chunks/InternalLabel.js";
|
|
16
15
|
import { V as Validation } from "../../chunks/Validation.js";
|
|
17
|
-
import { s as syncHiddenFormInput } from "../../chunks/input.js";
|
|
18
16
|
import { u as useT9n } from "../../chunks/useT9n.js";
|
|
19
17
|
import { u as useCancelable } from "../../chunks/useCancelable.js";
|
|
20
18
|
import { u as useSetFocus } from "../../chunks/useSetFocus.js";
|
|
21
19
|
import { u as useInteractive } from "../../chunks/useInteractive.js";
|
|
20
|
+
import { u as useForm } from "../../chunks/useForm.js";
|
|
22
21
|
const CSS = {
|
|
23
22
|
assistiveText: "assistive-text",
|
|
24
23
|
characterLimit: "character-limit",
|
|
@@ -52,6 +51,9 @@ class TextArea extends LitElement {
|
|
|
52
51
|
super(...arguments);
|
|
53
52
|
this.attributeWatch = useWatchAttributes(["autofocus", "spellcheck"], this.handleGlobalAttributesChanged);
|
|
54
53
|
this.footerRef = createRef();
|
|
54
|
+
this.formSupport = useForm({
|
|
55
|
+
inputType: "text"
|
|
56
|
+
})(this);
|
|
55
57
|
this.guid = guid();
|
|
56
58
|
this.resizeObserver = createObserver("resize", async () => {
|
|
57
59
|
await this.componentOnReady();
|
|
@@ -107,6 +109,9 @@ class TextArea extends LitElement {
|
|
|
107
109
|
static {
|
|
108
110
|
this.properties = { endSlotHasElements: [16, {}, { state: true }], startSlotHasElements: [16, {}, { state: true }], columns: [11, {}, { reflect: true, type: Number }], disabled: [7, {}, { reflect: true, type: Boolean }], form: [3, {}, { reflect: true }], groupSeparator: [7, {}, { reflect: true, type: Boolean }], label: 1, labelText: 1, limitText: [7, {}, { reflect: true, type: Boolean }], loading: [7, {}, { reflect: true, type: Boolean }], maxLength: [11, {}, { reflect: true, type: Number }], messageOverrides: [0, {}, { attribute: false }], minLength: [11, {}, { reflect: true, type: Number }], name: [3, {}, { reflect: true }], numberingSystem: 1, placeholder: 1, readOnly: [7, {}, { reflect: true, type: Boolean }], required: [7, {}, { reflect: true, type: Boolean }], resize: [3, {}, { reflect: true }], rows: [11, {}, { reflect: true, type: Number }], scale: [3, {}, { reflect: true }], status: [3, {}, { reflect: true }], validationIcon: [3, { converter: stringOrBoolean, type: String }, { reflect: true }], validationMessage: 1, validity: [0, {}, { attribute: false }], value: 1, wrap: [3, {}, { reflect: true }] };
|
|
109
111
|
}
|
|
112
|
+
static {
|
|
113
|
+
this.formAssociated = true;
|
|
114
|
+
}
|
|
110
115
|
static {
|
|
111
116
|
this.styles = styles;
|
|
112
117
|
}
|
|
@@ -120,18 +125,35 @@ class TextArea extends LitElement {
|
|
|
120
125
|
connectedCallback() {
|
|
121
126
|
super.connectedCallback();
|
|
122
127
|
connectLabel(this);
|
|
123
|
-
connectForm(this);
|
|
124
128
|
this.cancelable.add(this.updateSizeToAuto);
|
|
125
129
|
}
|
|
130
|
+
willUpdate(changes) {
|
|
131
|
+
let numberFormatOptionsChanged = false;
|
|
132
|
+
if (changes.has("messages") || changes.has("numberingSystem") || changes.has("groupSeparator")) {
|
|
133
|
+
numberFormatOptionsChanged = true;
|
|
134
|
+
}
|
|
135
|
+
if (changes.has("value") || changes.has("maxLength") || numberFormatOptionsChanged) {
|
|
136
|
+
this.updateNumberFormatter();
|
|
137
|
+
this.localizedCharacterLengthObj = this.getLocalizedCharacterLength();
|
|
138
|
+
this.formSupport.setCustomValidity(this.isCharacterLimitExceeded() ? this.replacePlaceholdersInMessages() : "");
|
|
139
|
+
}
|
|
140
|
+
}
|
|
126
141
|
updated() {
|
|
127
142
|
this.setTextAreaHeight();
|
|
128
143
|
}
|
|
129
144
|
disconnectedCallback() {
|
|
130
145
|
super.disconnectedCallback();
|
|
131
146
|
disconnectLabel(this);
|
|
132
|
-
disconnectForm(this);
|
|
133
147
|
this.resizeObserver?.disconnect();
|
|
134
148
|
}
|
|
149
|
+
updateNumberFormatter() {
|
|
150
|
+
numberStringFormatter.numberFormatOptions = {
|
|
151
|
+
locale: this.messages._lang,
|
|
152
|
+
numberingSystem: this.numberingSystem,
|
|
153
|
+
signDisplay: "never",
|
|
154
|
+
useGrouping: this.groupSeparator
|
|
155
|
+
};
|
|
156
|
+
}
|
|
135
157
|
handleGlobalAttributesChanged() {
|
|
136
158
|
this.requestUpdate();
|
|
137
159
|
}
|
|
@@ -156,29 +178,16 @@ class TextArea extends LitElement {
|
|
|
156
178
|
}
|
|
157
179
|
}
|
|
158
180
|
getLocalizedCharacterLength() {
|
|
159
|
-
const currentLength = this.value
|
|
160
|
-
const maxLength = this.maxLength
|
|
181
|
+
const currentLength = this.value?.length.toString() || "0";
|
|
182
|
+
const maxLength = this.maxLength?.toString() || "0";
|
|
161
183
|
if (this.numberingSystem === "latn") {
|
|
162
184
|
return { currentLength, maxLength };
|
|
163
185
|
}
|
|
164
|
-
numberStringFormatter.numberFormatOptions = {
|
|
165
|
-
locale: this.messages._lang,
|
|
166
|
-
numberingSystem: this.numberingSystem,
|
|
167
|
-
signDisplay: "never",
|
|
168
|
-
useGrouping: this.groupSeparator
|
|
169
|
-
};
|
|
170
186
|
return {
|
|
171
187
|
currentLength: numberStringFormatter.localize(currentLength),
|
|
172
188
|
maxLength: numberStringFormatter.localize(maxLength)
|
|
173
189
|
};
|
|
174
190
|
}
|
|
175
|
-
syncHiddenFormInput(input) {
|
|
176
|
-
input.setCustomValidity("");
|
|
177
|
-
if (this.isCharacterLimitExceeded()) {
|
|
178
|
-
input.setCustomValidity(this.replacePlaceholdersInMessages());
|
|
179
|
-
}
|
|
180
|
-
syncHiddenFormInput("textarea", this, input);
|
|
181
|
-
}
|
|
182
191
|
setTextAreaEl(el) {
|
|
183
192
|
updateRefObserver(this.resizeObserver, this.textAreaEl, el);
|
|
184
193
|
this.textAreaEl = el;
|
|
@@ -232,11 +241,10 @@ class TextArea extends LitElement {
|
|
|
232
241
|
})} ${ref(this.footerRef)}><div class=${safeClassMap({
|
|
233
242
|
[CSS.container]: true,
|
|
234
243
|
[CSS.footerEndSlotOnly]: !this.startSlotHasElements && this.endSlotHasElements
|
|
235
|
-
})}><slot name=${SLOTS.footerStart} @slotchange=${(event) => this.startSlotHasElements = slotChangeHasAssignedElement(event)}></slot><slot name=${SLOTS.footerEnd} @slotchange=${(event) => this.endSlotHasElements = slotChangeHasAssignedElement(event)}></slot></div>${this.renderCharacterLimit()}</footer>${
|
|
244
|
+
})}><slot name=${SLOTS.footerStart} @slotchange=${(event) => this.startSlotHasElements = slotChangeHasAssignedElement(event)}></slot><slot name=${SLOTS.footerEnd} @slotchange=${(event) => this.endSlotHasElements = slotChangeHasAssignedElement(event)}></slot></div>${this.renderCharacterLimit()}</footer>${this.isCharacterLimitExceeded() && html`<span aria-live=polite class=${safeClassMap(CSS.assistiveText)} id=${this.guid ?? nothing}>${this.replacePlaceholdersInMessages()}</span>` || ""}</div>${this.validationMessage && this.status === "invalid" ? Validation({ icon: this.validationIcon, id: IDS.validationMessage, message: this.validationMessage, ref: this.setValidationRef, scale: this.scale, status: this.status }) : null}</div>` });
|
|
236
245
|
}
|
|
237
246
|
renderCharacterLimit() {
|
|
238
247
|
if (this.maxLength) {
|
|
239
|
-
this.localizedCharacterLengthObj = this.getLocalizedCharacterLength();
|
|
240
248
|
return html`<span class=${safeClassMap(CSS.characterLimit)}><span class=${safeClassMap({ [CSS.characterOverLimit]: this.isCharacterLimitExceeded() })}>${this.localizedCharacterLengthObj.currentLength}</span>/${this.localizedCharacterLengthObj.maxLength}</span>`;
|
|
241
249
|
}
|
|
242
250
|
return null;
|
|
@@ -3,10 +3,10 @@ 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 { useDirection } from "@arcgis/lumina/controllers";
|
|
6
7
|
import { i as isValidNumber } from "../../chunks/locale.js";
|
|
7
8
|
import { c as componentFocusable, g as getIconScale } from "../../chunks/component.js";
|
|
8
9
|
import { d as decimalPlaces } from "../../chunks/math.js";
|
|
9
|
-
import { g as getElementDir } from "../../chunks/dom.js";
|
|
10
10
|
import { u as useT9n } from "../../chunks/useT9n.js";
|
|
11
11
|
import { u as useSetFocus } from "../../chunks/useSetFocus.js";
|
|
12
12
|
import { u as useTime } from "../../chunks/useTime.js";
|
|
@@ -53,6 +53,7 @@ const styles = css`:host{display:inline-block}.time-picker{display:flex;-webkit-
|
|
|
53
53
|
class TimePicker extends LitElement {
|
|
54
54
|
constructor() {
|
|
55
55
|
super();
|
|
56
|
+
this.direction = useDirection();
|
|
56
57
|
this.fractionalSecondRef = createRef();
|
|
57
58
|
this.hourRef = createRef();
|
|
58
59
|
this.meridiemRef = createRef();
|
|
@@ -318,7 +319,7 @@ class TimePicker extends LitElement {
|
|
|
318
319
|
[CSS.buttonFractionalSecondDown]: true
|
|
319
320
|
})} @click=${this.fractionalSecondDownClickHandler} role=button><calcite-icon .icon=${ICONS.chevronDown} .scale=${iconScale}></calcite-icon></span></div>` || ""}${showSecondSuffix && html`<span class=${safeClassMap({ [CSS.delimiter]: true, [CSS.secondSuffix]: true })}>${localizedSecondSuffix.trim()}</span>` || ""}${showMeridiem && html`<div class=${safeClassMap({
|
|
320
321
|
[CSS.column]: true,
|
|
321
|
-
[CSS.meridiemStart]: meridiemOrder === 0 ||
|
|
322
|
+
[CSS.meridiemStart]: meridiemOrder === 0 || this.direction === "rtl"
|
|
322
323
|
})} role=group><span .ariaLabel=${messages.meridiemUp} class=${safeClassMap({
|
|
323
324
|
[CSS.button]: true,
|
|
324
325
|
[CSS.buttonMeridiemUp]: true,
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/// <reference path="../../index.d.ts" />
|
|
2
2
|
import type { PublicLitElement as LitElement } from "@arcgis/lumina";
|
|
3
3
|
import type { LogicalPlacement, OverlayPositioning, ReferenceElement } from "../../utils/floating-ui.js";
|
|
4
|
+
import type { Scale } from "../interfaces.js";
|
|
4
5
|
|
|
5
6
|
/**
|
|
6
7
|
* @cssproperty [--calcite-tooltip-background-color] - Specifies the component's background color.
|
|
@@ -53,6 +54,12 @@ export abstract class Tooltip extends LitElement {
|
|
|
53
54
|
* @default "auto"
|
|
54
55
|
*/
|
|
55
56
|
accessor placement: LogicalPlacement;
|
|
57
|
+
/**
|
|
58
|
+
* When `true`, removes the caret pointer.
|
|
59
|
+
*
|
|
60
|
+
* @default false
|
|
61
|
+
*/
|
|
62
|
+
accessor pointerDisabled: boolean;
|
|
56
63
|
/**
|
|
57
64
|
* The `referenceElement` is used to position the component according to its `placement` value.
|
|
58
65
|
*
|
|
@@ -62,7 +69,13 @@ export abstract class Tooltip extends LitElement {
|
|
|
62
69
|
*
|
|
63
70
|
* The component should not be placed within its own `referenceElement` to avoid unintended behavior.
|
|
64
71
|
*/
|
|
65
|
-
accessor referenceElement: ReferenceElement | string;
|
|
72
|
+
accessor referenceElement: ReferenceElement | string | null;
|
|
73
|
+
/**
|
|
74
|
+
* Specifies the size of the component.
|
|
75
|
+
*
|
|
76
|
+
* @default "m"
|
|
77
|
+
*/
|
|
78
|
+
accessor scale: Scale;
|
|
66
79
|
/**
|
|
67
80
|
* When `true` and the component is `open`, disables top layer placement.
|
|
68
81
|
*
|
|
@@ -1,275 +1,26 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
2
|
import { c as customElement } from "../../chunks/runtime.js";
|
|
3
|
+
import { keyed } from "lit/directives/keyed.js";
|
|
3
4
|
import { css, html } from "lit";
|
|
4
|
-
import { LitElement, createEvent,
|
|
5
|
+
import { LitElement, createEvent, safeClassMap } from "@arcgis/lumina";
|
|
5
6
|
import { createRef, ref } from "lit/directives/ref.js";
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
7
|
+
import { useDirection } from "@arcgis/lumina/controllers";
|
|
8
|
+
import { e as defaultOffsetDistance, r as reposition, c as connectFloatingUI, a as disconnectFloatingUI, h as hideFloatingUI, F as FloatingCSS } from "../../chunks/floating-ui.js";
|
|
8
9
|
import { t as toggleOpenClose } from "../../chunks/openCloseComponent.js";
|
|
9
|
-
import { F as FloatingArrow } from "../../chunks/
|
|
10
|
+
import { u as useReferenceElement, F as FloatingArrow, r as referenceElementManager } from "../../chunks/useReferenceElement.js";
|
|
10
11
|
import { u as useTopLayer } from "../../chunks/useTopLayer.js";
|
|
11
|
-
import { q as queryElementRoots, C as getShadowRootNode } from "../../chunks/dom.js";
|
|
12
12
|
const CSS = {
|
|
13
13
|
positionContainer: "position-container",
|
|
14
14
|
container: "container"
|
|
15
15
|
};
|
|
16
|
-
const
|
|
17
|
-
const
|
|
18
|
-
host: (id) => `${idPrefix}-${id}`
|
|
19
|
-
};
|
|
20
|
-
const TOOLTIP_OPEN_DELAY_MS = 300;
|
|
21
|
-
const TOOLTIP_QUICK_OPEN_DELAY_MS = TOOLTIP_OPEN_DELAY_MS / 3;
|
|
22
|
-
const TOOLTIP_CLOSE_DELAY_MS = TOOLTIP_OPEN_DELAY_MS * 1.5;
|
|
23
|
-
const ARIA_DESCRIBED_BY = "aria-describedby";
|
|
24
|
-
function getEffectiveReferenceElement(tooltip) {
|
|
25
|
-
const { referenceElement } = tooltip;
|
|
26
|
-
return (typeof referenceElement === "string" ? queryElementRoots(tooltip, { id: referenceElement }) : referenceElement) || null;
|
|
27
|
-
}
|
|
28
|
-
class TooltipManager {
|
|
29
|
-
constructor() {
|
|
30
|
-
this.registeredElements = /* @__PURE__ */ new WeakMap();
|
|
31
|
-
this.registeredShadowRootCounts = /* @__PURE__ */ new WeakMap();
|
|
32
|
-
this.hoverOpenTimeout = null;
|
|
33
|
-
this.hoverCloseTimeout = null;
|
|
34
|
-
this.activeTooltip = null;
|
|
35
|
-
this.registeredElementCount = 0;
|
|
36
|
-
this.clickedTooltip = null;
|
|
37
|
-
this.hoveredTooltip = null;
|
|
38
|
-
this.queryTooltip = (composedPath) => {
|
|
39
|
-
const { registeredElements } = this;
|
|
40
|
-
const registeredElement = composedPath.find((pathEl) => registeredElements.has(pathEl));
|
|
41
|
-
return registeredElements.get(registeredElement);
|
|
42
|
-
};
|
|
43
|
-
this.keyDownHandler = (event) => {
|
|
44
|
-
if (event.key === "Escape" && !event.defaultPrevented) {
|
|
45
|
-
const { activeTooltip } = this;
|
|
46
|
-
if (activeTooltip?.open) {
|
|
47
|
-
this.clearHoverTimeout();
|
|
48
|
-
this.closeActiveTooltip();
|
|
49
|
-
const referenceElement = getEffectiveReferenceElement(activeTooltip);
|
|
50
|
-
const composedPath = event.composedPath();
|
|
51
|
-
if (referenceElement instanceof Element && composedPath.includes(referenceElement) || composedPath.includes(activeTooltip)) {
|
|
52
|
-
event.preventDefault();
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
};
|
|
57
|
-
this.pointerLeaveHandler = (event) => {
|
|
58
|
-
if (event.defaultPrevented) {
|
|
59
|
-
return;
|
|
60
|
-
}
|
|
61
|
-
this.clearHoverTimeout();
|
|
62
|
-
this.closeHoveredTooltip();
|
|
63
|
-
};
|
|
64
|
-
this.pointerMoveHandler = (event) => {
|
|
65
|
-
if (event.defaultPrevented) {
|
|
66
|
-
this.closeHoveredTooltip();
|
|
67
|
-
return;
|
|
68
|
-
}
|
|
69
|
-
const composedPath = event.composedPath();
|
|
70
|
-
const tooltip = this.queryTooltip(composedPath);
|
|
71
|
-
if (this.pathHasOpenTooltip(tooltip, composedPath)) {
|
|
72
|
-
this.clearHoverTimeout();
|
|
73
|
-
return;
|
|
74
|
-
}
|
|
75
|
-
if (tooltip === this.clickedTooltip) {
|
|
76
|
-
return;
|
|
77
|
-
}
|
|
78
|
-
if (tooltip !== this.hoveredTooltip) {
|
|
79
|
-
this.clearHoverOpenTimeout();
|
|
80
|
-
}
|
|
81
|
-
this.hoveredTooltip = tooltip;
|
|
82
|
-
if (tooltip) {
|
|
83
|
-
this.openHoveredTooltip(tooltip);
|
|
84
|
-
} else if (this.activeTooltip?.open) {
|
|
85
|
-
this.closeHoveredTooltip();
|
|
86
|
-
}
|
|
87
|
-
this.clickedTooltip = null;
|
|
88
|
-
};
|
|
89
|
-
this.clickHandler = (event) => {
|
|
90
|
-
if (event.defaultPrevented) {
|
|
91
|
-
return;
|
|
92
|
-
}
|
|
93
|
-
this.clickedTooltip = null;
|
|
94
|
-
const composedPath = event.composedPath();
|
|
95
|
-
const tooltip = this.queryTooltip(composedPath);
|
|
96
|
-
if (this.pathHasOpenTooltip(tooltip, composedPath)) {
|
|
97
|
-
this.clearHoverTimeout();
|
|
98
|
-
return;
|
|
99
|
-
}
|
|
100
|
-
this.closeActiveTooltip();
|
|
101
|
-
if (!tooltip) {
|
|
102
|
-
return;
|
|
103
|
-
}
|
|
104
|
-
this.clearHoverTimeout();
|
|
105
|
-
if (tooltip.closeOnClick) {
|
|
106
|
-
this.clickedTooltip = tooltip;
|
|
107
|
-
this.toggleTooltip(tooltip, false);
|
|
108
|
-
return;
|
|
109
|
-
}
|
|
110
|
-
this.toggleTooltip(tooltip, true);
|
|
111
|
-
};
|
|
112
|
-
this.blurHandler = () => {
|
|
113
|
-
this.closeActiveTooltip();
|
|
114
|
-
};
|
|
115
|
-
this.focusInHandler = (event) => {
|
|
116
|
-
if (event.defaultPrevented) {
|
|
117
|
-
return;
|
|
118
|
-
}
|
|
119
|
-
const composedPath = event.composedPath();
|
|
120
|
-
const tooltip = this.queryTooltip(composedPath);
|
|
121
|
-
if (this.pathHasOpenTooltip(tooltip, composedPath)) {
|
|
122
|
-
this.clearHoverTimeout();
|
|
123
|
-
return;
|
|
124
|
-
}
|
|
125
|
-
if (tooltip === this.clickedTooltip) {
|
|
126
|
-
return;
|
|
127
|
-
}
|
|
128
|
-
this.clickedTooltip = null;
|
|
129
|
-
this.closeTooltipIfNotActive(tooltip);
|
|
130
|
-
if (!tooltip) {
|
|
131
|
-
return;
|
|
132
|
-
}
|
|
133
|
-
this.toggleFocusedTooltip(tooltip, true);
|
|
134
|
-
};
|
|
135
|
-
this.openHoveredTooltip = (tooltip) => {
|
|
136
|
-
this.hoverOpenTimeout = window.setTimeout(
|
|
137
|
-
() => {
|
|
138
|
-
if (this.hoverOpenTimeout === null || tooltip !== this.hoveredTooltip) {
|
|
139
|
-
return;
|
|
140
|
-
}
|
|
141
|
-
this.clearHoverCloseTimeout();
|
|
142
|
-
this.closeTooltipIfNotActive(tooltip);
|
|
143
|
-
this.toggleTooltip(tooltip, true);
|
|
144
|
-
},
|
|
145
|
-
this.activeTooltip?.open ? TOOLTIP_QUICK_OPEN_DELAY_MS : TOOLTIP_OPEN_DELAY_MS
|
|
146
|
-
);
|
|
147
|
-
};
|
|
148
|
-
this.closeHoveredTooltip = () => {
|
|
149
|
-
this.hoverCloseTimeout = window.setTimeout(() => {
|
|
150
|
-
if (this.hoverCloseTimeout === null) {
|
|
151
|
-
return;
|
|
152
|
-
}
|
|
153
|
-
this.closeActiveTooltip();
|
|
154
|
-
}, TOOLTIP_CLOSE_DELAY_MS);
|
|
155
|
-
};
|
|
156
|
-
}
|
|
157
|
-
// --------------------------------------------------------------------------
|
|
158
|
-
//
|
|
159
|
-
// Public Methods
|
|
160
|
-
//
|
|
161
|
-
// --------------------------------------------------------------------------
|
|
162
|
-
registerElement(referenceEl, tooltip) {
|
|
163
|
-
this.registeredElementCount++;
|
|
164
|
-
this.registeredElements.set(referenceEl, tooltip);
|
|
165
|
-
const shadowRoot = this.getReferenceElShadowRootNode(referenceEl);
|
|
166
|
-
if (shadowRoot) {
|
|
167
|
-
this.registerShadowRoot(shadowRoot);
|
|
168
|
-
}
|
|
169
|
-
if (this.registeredElementCount === 1) {
|
|
170
|
-
this.addListeners();
|
|
171
|
-
}
|
|
172
|
-
}
|
|
173
|
-
unregisterElement(referenceEl) {
|
|
174
|
-
const shadowRoot = this.getReferenceElShadowRootNode(referenceEl);
|
|
175
|
-
if (shadowRoot) {
|
|
176
|
-
this.unregisterShadowRoot(shadowRoot);
|
|
177
|
-
}
|
|
178
|
-
if (this.registeredElements.delete(referenceEl)) {
|
|
179
|
-
this.registeredElementCount--;
|
|
180
|
-
}
|
|
181
|
-
if (this.registeredElementCount === 0) {
|
|
182
|
-
this.removeListeners();
|
|
183
|
-
}
|
|
184
|
-
}
|
|
185
|
-
pathHasOpenTooltip(tooltip, composedPath) {
|
|
186
|
-
const { activeTooltip } = this;
|
|
187
|
-
return activeTooltip?.open && composedPath.includes(activeTooltip) || tooltip?.open && composedPath.includes(tooltip);
|
|
188
|
-
}
|
|
189
|
-
addShadowListeners(shadowRoot) {
|
|
190
|
-
shadowRoot.addEventListener("focusin", this.focusInHandler);
|
|
191
|
-
}
|
|
192
|
-
removeShadowListeners(shadowRoot) {
|
|
193
|
-
shadowRoot.removeEventListener("focusin", this.focusInHandler);
|
|
194
|
-
}
|
|
195
|
-
addListeners() {
|
|
196
|
-
window.addEventListener("keydown", this.keyDownHandler);
|
|
197
|
-
window.addEventListener("pointermove", this.pointerMoveHandler);
|
|
198
|
-
window.addEventListener("click", this.clickHandler);
|
|
199
|
-
window.addEventListener("focusin", this.focusInHandler);
|
|
200
|
-
window.addEventListener("blur", this.blurHandler);
|
|
201
|
-
document.addEventListener("pointerleave", this.pointerLeaveHandler);
|
|
202
|
-
}
|
|
203
|
-
removeListeners() {
|
|
204
|
-
window.removeEventListener("keydown", this.keyDownHandler);
|
|
205
|
-
window.removeEventListener("pointermove", this.pointerMoveHandler);
|
|
206
|
-
window.removeEventListener("click", this.clickHandler);
|
|
207
|
-
window.removeEventListener("focusin", this.focusInHandler);
|
|
208
|
-
window.removeEventListener("blur", this.blurHandler);
|
|
209
|
-
document.removeEventListener("pointerleave", this.pointerLeaveHandler);
|
|
210
|
-
}
|
|
211
|
-
clearHoverOpenTimeout() {
|
|
212
|
-
window.clearTimeout(this.hoverOpenTimeout);
|
|
213
|
-
this.hoverOpenTimeout = null;
|
|
214
|
-
}
|
|
215
|
-
clearHoverCloseTimeout() {
|
|
216
|
-
window.clearTimeout(this.hoverCloseTimeout);
|
|
217
|
-
this.hoverCloseTimeout = null;
|
|
218
|
-
}
|
|
219
|
-
clearHoverTimeout() {
|
|
220
|
-
this.clearHoverOpenTimeout();
|
|
221
|
-
this.clearHoverCloseTimeout();
|
|
222
|
-
}
|
|
223
|
-
closeTooltipIfNotActive(tooltip) {
|
|
224
|
-
if (this.activeTooltip !== tooltip) {
|
|
225
|
-
this.closeActiveTooltip();
|
|
226
|
-
}
|
|
227
|
-
}
|
|
228
|
-
closeActiveTooltip() {
|
|
229
|
-
const { activeTooltip } = this;
|
|
230
|
-
if (activeTooltip?.open) {
|
|
231
|
-
this.toggleTooltip(activeTooltip, false);
|
|
232
|
-
}
|
|
233
|
-
}
|
|
234
|
-
toggleFocusedTooltip(tooltip, open) {
|
|
235
|
-
if (open) {
|
|
236
|
-
this.clearHoverTimeout();
|
|
237
|
-
}
|
|
238
|
-
this.toggleTooltip(tooltip, open);
|
|
239
|
-
}
|
|
240
|
-
toggleTooltip(tooltip, open) {
|
|
241
|
-
tooltip.open = open;
|
|
242
|
-
this.activeTooltip = open ? tooltip : null;
|
|
243
|
-
}
|
|
244
|
-
registerShadowRoot(shadowRoot) {
|
|
245
|
-
const { registeredShadowRootCounts } = this;
|
|
246
|
-
const count = registeredShadowRootCounts.get(shadowRoot);
|
|
247
|
-
const newCount = Math.min((typeof count === "number" ? count : 0) + 1, 1);
|
|
248
|
-
if (newCount === 1) {
|
|
249
|
-
this.addShadowListeners(shadowRoot);
|
|
250
|
-
}
|
|
251
|
-
registeredShadowRootCounts.set(shadowRoot, newCount);
|
|
252
|
-
}
|
|
253
|
-
unregisterShadowRoot(shadowRoot) {
|
|
254
|
-
const { registeredShadowRootCounts } = this;
|
|
255
|
-
const count = registeredShadowRootCounts.get(shadowRoot);
|
|
256
|
-
const newCount = Math.max((typeof count === "number" ? count : 1) - 1, 0);
|
|
257
|
-
if (newCount === 0) {
|
|
258
|
-
this.removeShadowListeners(shadowRoot);
|
|
259
|
-
}
|
|
260
|
-
registeredShadowRootCounts.set(shadowRoot, newCount);
|
|
261
|
-
}
|
|
262
|
-
getReferenceElShadowRootNode(referenceEl) {
|
|
263
|
-
return referenceEl instanceof Element ? getShadowRootNode(referenceEl) : null;
|
|
264
|
-
}
|
|
265
|
-
}
|
|
266
|
-
const styles = css`:host{display:contents}:host([top-layer-disabled]){--calcite-floating-ui-z-index: var(--calcite-z-index-tooltip)}.position-container{inline-size:max-content;display:none;max-inline-size:100vw;max-block-size:100vh;inset-block-start:0;left:0;z-index:var(--calcite-floating-ui-z-index)}@starting-style{.position-container{opacity:0;inset-block-start:0;left:0}}.position-container{max-inline-size:var(--calcite-tooltip-max-size-x, 20rem);max-block-size:20rem}.position-container[popover]{padding:0;margin:0;border:none;background-color:transparent;overflow:visible;display:none}.position-container:popover-open{display:block}.position-container .calcite-floating-ui-anim{position:relative;transition-duration:var(--calcite-floating-ui-transition);transition-property:inset-block-start,left,opacity,display;transition-behavior:allow-discrete;opacity:0;box-shadow:0 0 16px #00000029;z-index:var(--calcite-z-index);border-radius:.25rem}.position-container[data-placement^=bottom] .calcite-floating-ui-anim{inset-block-start:-5px}.position-container[data-placement^=top] .calcite-floating-ui-anim{inset-block-start:5px}.position-container[data-placement^=left] .calcite-floating-ui-anim{left:5px}.position-container[data-placement^=right] .calcite-floating-ui-anim{left:-5px}.position-container[data-placement] .calcite-floating-ui-anim--active{opacity:1;inset-block-start:0;left:0}@starting-style{.position-container[data-placement] .calcite-floating-ui-anim--active{opacity:0}}.calcite-floating-ui-arrow{pointer-events:none;position:absolute;z-index:calc(var(--calcite-z-index) * -1);fill:var(--calcite-color-foreground-1)}.calcite-floating-ui-arrow__stroke{stroke:var(--calcite-color-border-3)}.container{position:relative;overflow:hidden;padding:.75rem 1rem;font-size:var(--calcite-font-size-relative-sm);line-height:var(--calcite-font-line-height-relative-snug);font-weight:var(--calcite-font-weight-medium);word-wrap:break-word;word-break:break-word;border-radius:var(--calcite-tooltip-corner-radius, var(--calcite-corner-radius-round));color:var(--calcite-tooltip-text-color, var(--calcite-color-text-1));text-align:start}.position-container .calcite-floating-ui-anim{border-width:1px;border-style:solid;background-color:var(--calcite-tooltip-background-color, var(--calcite-color-foreground-1));border-color:var(--calcite-tooltip-border-color, var(--calcite-color-border-3));border-radius:var(--calcite-tooltip-corner-radius, var(--calcite-corner-radius-round))}.calcite-floating-ui-arrow{fill:var(--calcite-tooltip-background-color, var(--calcite-color-foreground-1))}.calcite-floating-ui-arrow__stroke{stroke:var(--calcite-tooltip-border-color, var(--calcite-color-border-3))}:host([hidden]){display:none}[hidden]{display:none}`;
|
|
267
|
-
const manager = new TooltipManager();
|
|
16
|
+
const styles = css`:host{display:contents;--calcite-internal-tooltip-padding-block: var(--calcite-spacing-sm);--calcite-internal-tooltip-padding-inline: var(--calcite-spacing-md)}:host([top-layer-disabled]){--calcite-floating-ui-z-index: var(--calcite-z-index-tooltip)}.position-container{inline-size:max-content;display:none;max-inline-size:100vw;max-block-size:100vh;inset-block-start:0;left:0;z-index:var(--calcite-floating-ui-z-index)}@starting-style{.position-container{opacity:0;inset-block-start:0;left:0}}.position-container{max-inline-size:var(--calcite-tooltip-max-size-x, 20rem);max-block-size:20rem}.position-container[popover]{padding:0;margin:0;border:none;background-color:transparent;overflow:visible;display:none}.position-container:popover-open{display:block}.position-container .calcite-floating-ui-anim{position:relative;transition-duration:var(--calcite-floating-ui-transition);transition-property:inset-block-start,left,opacity,display;transition-behavior:allow-discrete;opacity:0;box-shadow:0 0 16px #00000029;z-index:var(--calcite-z-index);border-radius:.25rem}.position-container[data-placement^=bottom] .calcite-floating-ui-anim{inset-block-start:-5px}.position-container[data-placement^=top] .calcite-floating-ui-anim{inset-block-start:5px}.position-container[data-placement^=left] .calcite-floating-ui-anim{left:5px}.position-container[data-placement^=right] .calcite-floating-ui-anim{left:-5px}.position-container[data-placement] .calcite-floating-ui-anim--active{opacity:1;inset-block-start:0;left:0}@starting-style{.position-container[data-placement] .calcite-floating-ui-anim--active{opacity:0}}.calcite-floating-ui-arrow{pointer-events:none;position:absolute;z-index:calc(var(--calcite-z-index) * -1);fill:var(--calcite-color-foreground-1)}.calcite-floating-ui-arrow__stroke{stroke:var(--calcite-color-border-3)}:host([scale=s]){--calcite-internal-tooltip-padding-block: var(--calcite-spacing-xxs);--calcite-internal-tooltip-padding-inline: var(--calcite-spacing-sm)}:host([scale=s]) .container{font-size:var(--calcite-font-size-relative-xs);line-height:var(--calcite-font-line-height-relative-snug)}:host([scale=l]) .container{font-size:var(--calcite-font-size-relative-base);line-height:var(--calcite-font-line-height-relative-snug)}.container{position:relative;overflow:hidden;font-size:var(--calcite-font-size-relative-sm);line-height:var(--calcite-font-line-height-relative-snug);font-weight:var(--calcite-font-weight-medium);word-wrap:break-word;word-break:break-word;padding-block:var(--calcite-internal-tooltip-padding-block);padding-inline:var(--calcite-internal-tooltip-padding-inline);border-radius:var(--calcite-tooltip-corner-radius, var(--calcite-corner-radius-round));color:var(--calcite-tooltip-text-color, var(--calcite-color-text-1));text-align:start}.position-container .calcite-floating-ui-anim{border-width:1px;border-style:solid;background-color:var(--calcite-tooltip-background-color, var(--calcite-color-foreground-1));border-color:var(--calcite-tooltip-border-color, var(--calcite-color-border-3));border-radius:var(--calcite-tooltip-corner-radius, var(--calcite-corner-radius-round))}.calcite-floating-ui-arrow{fill:var(--calcite-tooltip-background-color, var(--calcite-color-foreground-1))}.calcite-floating-ui-arrow__stroke{stroke:var(--calcite-tooltip-border-color, var(--calcite-color-border-3))}:host([hidden]){display:none}[hidden]{display:none}`;
|
|
17
|
+
const manager = referenceElementManager({ hover: true });
|
|
268
18
|
class Tooltip extends LitElement {
|
|
269
19
|
constructor() {
|
|
270
20
|
super(...arguments);
|
|
271
|
-
this.
|
|
272
|
-
this.
|
|
21
|
+
this.direction = useDirection();
|
|
22
|
+
this.referenceElementType = "hover";
|
|
23
|
+
this.referenceElementController = useReferenceElement({ manager })(this);
|
|
273
24
|
this.transitionProp = "opacity";
|
|
274
25
|
this.transitionRef = createRef();
|
|
275
26
|
this.topLayer = useTopLayer({
|
|
@@ -283,6 +34,8 @@ class Tooltip extends LitElement {
|
|
|
283
34
|
this.open = false;
|
|
284
35
|
this.overlayPositioning = "absolute";
|
|
285
36
|
this.placement = "auto";
|
|
37
|
+
this.pointerDisabled = false;
|
|
38
|
+
this.scale = "m";
|
|
286
39
|
this.topLayerDisabled = false;
|
|
287
40
|
this.calciteTooltipBeforeClose = createEvent({ cancelable: false });
|
|
288
41
|
this.calciteTooltipBeforeOpen = createEvent({ cancelable: false });
|
|
@@ -290,28 +43,25 @@ class Tooltip extends LitElement {
|
|
|
290
43
|
this.calciteTooltipOpen = createEvent({ cancelable: false });
|
|
291
44
|
}
|
|
292
45
|
static {
|
|
293
|
-
this.properties = { floatingLayout: [16, {}, { state: true }], referenceEl: [16, {}, { state: true }], closeOnClick: [7, {}, { reflect: true, type: Boolean }], label: 1, offsetDistance: [11, {}, { type: Number, reflect: true }], offsetSkidding: [11, {}, { reflect: true, type: Number }], open: [7, {}, { reflect: true, type: Boolean }], overlayPositioning: [3, {}, { reflect: true }], placement: [3, {}, { reflect: true }], referenceElement: 1, topLayerDisabled: [7, {}, { reflect: true, type: Boolean }] };
|
|
46
|
+
this.properties = { floatingLayout: [16, {}, { state: true }], referenceEl: [16, {}, { state: true }], closeOnClick: [7, {}, { reflect: true, type: Boolean }], label: 1, offsetDistance: [11, {}, { type: Number, reflect: true }], offsetSkidding: [11, {}, { reflect: true, type: Number }], open: [7, {}, { reflect: true, type: Boolean }], overlayPositioning: [3, {}, { reflect: true }], placement: [3, {}, { reflect: true }], pointerDisabled: [7, {}, { reflect: true, type: Boolean }], referenceElement: 1, scale: [3, {}, { reflect: true }], topLayerDisabled: [7, {}, { reflect: true, type: Boolean }] };
|
|
294
47
|
}
|
|
295
48
|
static {
|
|
296
49
|
this.styles = styles;
|
|
297
50
|
}
|
|
298
51
|
async reposition(delayed = false) {
|
|
299
|
-
const { referenceEl, placement, overlayPositioning, offsetDistance, offsetSkidding,
|
|
52
|
+
const { referenceEl, placement, overlayPositioning, offsetDistance, offsetSkidding, arrowEl, floatingEl } = this;
|
|
300
53
|
return reposition(this, {
|
|
54
|
+
direction: this.direction,
|
|
301
55
|
floatingEl,
|
|
302
56
|
referenceEl,
|
|
303
57
|
overlayPositioning,
|
|
304
58
|
placement,
|
|
305
59
|
offsetDistance,
|
|
306
60
|
offsetSkidding,
|
|
307
|
-
arrowEl
|
|
61
|
+
arrowEl,
|
|
308
62
|
type: "tooltip"
|
|
309
63
|
}, delayed);
|
|
310
64
|
}
|
|
311
|
-
connectedCallback() {
|
|
312
|
-
super.connectedCallback();
|
|
313
|
-
this.setUpReferenceElement(true);
|
|
314
|
-
}
|
|
315
65
|
willUpdate(changes) {
|
|
316
66
|
if (changes.has("offsetDistance") && (this.hasUpdated || this.offsetDistance !== defaultOffsetDistance) || changes.has("offsetSkidding") && (this.hasUpdated || this.offsetSkidding !== 0) || changes.has("overlayPositioning") && (this.hasUpdated || this.overlayPositioning !== "absolute") || changes.has("placement") && (this.hasUpdated || this.placement !== "auto")) {
|
|
317
67
|
this.reposition(true);
|
|
@@ -319,21 +69,17 @@ class Tooltip extends LitElement {
|
|
|
319
69
|
if (changes.has("open") && (this.hasUpdated || this.open !== false)) {
|
|
320
70
|
this.openHandler();
|
|
321
71
|
}
|
|
322
|
-
if (changes.has("referenceElement")) {
|
|
323
|
-
this.
|
|
324
|
-
if (!this.referenceElement && this.open) {
|
|
325
|
-
this.topLayer.hide();
|
|
326
|
-
}
|
|
72
|
+
if (changes.has("referenceElement") && !this.referenceElement && this.open) {
|
|
73
|
+
this.topLayer.hide();
|
|
327
74
|
}
|
|
328
75
|
}
|
|
329
|
-
|
|
330
|
-
if (
|
|
331
|
-
this
|
|
76
|
+
updated(changes) {
|
|
77
|
+
if (changes.has("referenceEl")) {
|
|
78
|
+
connectFloatingUI(this);
|
|
332
79
|
}
|
|
333
80
|
}
|
|
334
81
|
disconnectedCallback() {
|
|
335
82
|
super.disconnectedCallback();
|
|
336
|
-
this.removeReferences();
|
|
337
83
|
disconnectFloatingUI(this);
|
|
338
84
|
}
|
|
339
85
|
openHandler() {
|
|
@@ -357,59 +103,24 @@ class Tooltip extends LitElement {
|
|
|
357
103
|
}
|
|
358
104
|
setFloatingEl(el) {
|
|
359
105
|
this.floatingEl = el;
|
|
360
|
-
if (el) {
|
|
361
|
-
requestAnimationFrame(() => this.setUpReferenceElement());
|
|
362
|
-
}
|
|
363
|
-
}
|
|
364
|
-
setUpReferenceElement(warn = true) {
|
|
365
|
-
this.removeReferences();
|
|
366
|
-
this.referenceEl = getEffectiveReferenceElement(this.el);
|
|
367
|
-
connectFloatingUI(this);
|
|
368
|
-
const { el, referenceElement, referenceEl } = this;
|
|
369
|
-
if (warn && referenceElement && !referenceEl) {
|
|
370
|
-
console.warn(`${el.tagName}: reference-element id "${referenceElement}" was not found.`, {
|
|
371
|
-
el
|
|
372
|
-
});
|
|
373
|
-
}
|
|
374
|
-
this.addReferences();
|
|
375
|
-
}
|
|
376
|
-
getId() {
|
|
377
|
-
return this.el.id || this.guid;
|
|
378
|
-
}
|
|
379
|
-
addReferences() {
|
|
380
|
-
const { referenceEl } = this;
|
|
381
|
-
if (!referenceEl) {
|
|
382
|
-
return;
|
|
383
|
-
}
|
|
384
|
-
const id = this.getId();
|
|
385
|
-
if ("setAttribute" in referenceEl) {
|
|
386
|
-
referenceEl.setAttribute(ARIA_DESCRIBED_BY, id);
|
|
387
|
-
}
|
|
388
|
-
manager.registerElement(referenceEl, this.el);
|
|
389
106
|
}
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
return;
|
|
394
|
-
}
|
|
395
|
-
if ("removeAttribute" in referenceEl) {
|
|
396
|
-
referenceEl.removeAttribute(ARIA_DESCRIBED_BY);
|
|
397
|
-
}
|
|
398
|
-
manager.unregisterElement(referenceEl);
|
|
107
|
+
setArrowEl(el) {
|
|
108
|
+
this.arrowEl = el;
|
|
109
|
+
this.reposition(true);
|
|
399
110
|
}
|
|
400
111
|
render() {
|
|
401
|
-
const { referenceEl, label, open, floatingLayout } = this;
|
|
112
|
+
const { referenceEl, label, open, pointerDisabled, floatingLayout } = this;
|
|
402
113
|
const displayed = referenceEl && open;
|
|
403
114
|
const hidden = !displayed;
|
|
115
|
+
const arrowNode = !pointerDisabled ? keyed("floating-arrow", FloatingArrow({ floatingLayout, ref: this.setArrowEl })) : null;
|
|
404
116
|
this.el.inert = hidden;
|
|
405
117
|
this.el.ariaLabel = label;
|
|
406
118
|
this.el.ariaLive = "polite";
|
|
407
|
-
setAttribute(this.el, "id", this.getId());
|
|
408
119
|
this.el.role = "tooltip";
|
|
409
120
|
return html`<div class=${safeClassMap(CSS.positionContainer)} popover=manual ${ref(this.setFloatingEl)}><div class=${safeClassMap({
|
|
410
121
|
[FloatingCSS.animation]: true,
|
|
411
122
|
[FloatingCSS.animationActive]: displayed
|
|
412
|
-
})} ${ref(this.transitionRef)}>${
|
|
123
|
+
})} ${ref(this.transitionRef)}>${arrowNode}<div class=${safeClassMap(CSS.container)}><slot></slot></div></div></div>`;
|
|
413
124
|
}
|
|
414
125
|
}
|
|
415
126
|
customElement("calcite-tooltip", Tooltip);
|
|
@@ -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, createEvent, setAttribute } from "@arcgis/lumina";
|
|
5
|
-
import {
|
|
5
|
+
import { i as focusElement, n as nodeListToArray, a as slotChangeGetAssignedElements } from "../../chunks/dom.js";
|
|
6
6
|
import { t as toAriaBoolean } from "../../chunks/aria.js";
|
|
7
7
|
function isTreeItem(element) {
|
|
8
8
|
return element?.tagName === "CALCITE-TREE-ITEM";
|