@esri/calcite-components 5.1.0-next.6 → 5.1.0-next.60
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cdn/{L62IP5MG.js → 2JC63UBS.js} +1 -1
- package/dist/cdn/2PQRUWNS.js +2 -0
- package/dist/cdn/{YGKHTZ4V.js → 2W7I2RRR.js} +1 -1
- package/dist/cdn/33NBRPD5.js +2 -0
- package/dist/cdn/{TR56QFJC.js → 34NMNGJX.js} +1 -1
- package/dist/cdn/{YBIQF3JQ.js → 36V2SAYV.js} +1 -1
- package/dist/cdn/3RKYV4EU.js +2 -0
- package/dist/cdn/4C4TYQBB.js +2 -0
- package/dist/cdn/{27S7SCHF.js → 4DTIKF3X.js} +1 -1
- package/dist/cdn/4X7777BM.js +2 -0
- package/dist/cdn/{DNYQCUGR.js → 53ELH3LP.js} +1 -1
- package/dist/cdn/5GPET3LM.js +2 -0
- package/dist/cdn/5ICBDVRX.js +2 -0
- package/dist/cdn/5IEGYEGX.js +2 -0
- package/dist/cdn/{HAVRDDW3.js → 5NQFTJZK.js} +1 -1
- package/dist/cdn/5TGQPSUE.js +2 -0
- package/dist/cdn/{ZCJDNXK2.js → 6EKA77FA.js} +1 -1
- package/dist/cdn/{XI7FVSES.js → 6FN7HUWQ.js} +1 -1
- package/dist/cdn/{HBRWGV2Z.js → 6KAHTFCR.js} +1 -1
- package/dist/cdn/{56V6AANR.js → 6N2EIPRN.js} +1 -1
- package/dist/cdn/6REHHP67.js +2 -0
- package/dist/cdn/6ULZKAI4.js +2 -0
- package/dist/cdn/77KENABW.js +2 -0
- package/dist/cdn/{AECJNJ7Y.js → 77N34KNA.js} +1 -1
- package/dist/cdn/7JEZPJH4.js +2 -0
- package/dist/cdn/{RZSXCJTK.js → 7QL3YAQN.js} +1 -1
- package/dist/cdn/{HJRA23WV.js → 7XXNWTI2.js} +1 -1
- package/dist/cdn/ABV5DIAC.js +3 -0
- package/dist/cdn/ACPNEYIL.js +2 -0
- package/dist/cdn/ADSGKQWL.js +2 -0
- package/dist/cdn/AWVSUBJI.js +2 -0
- package/dist/cdn/AXYMVOBP.js +2 -0
- package/dist/cdn/B5A5VFJH.js +2 -0
- package/dist/cdn/BCQGOHCH.js +2 -0
- package/dist/cdn/{44K6CFSA.js → BM5NT2QG.js} +1 -1
- package/dist/cdn/{QMSQZWET.js → BXB2IHL5.js} +1 -1
- package/dist/cdn/CE6T3SFL.js +2 -0
- package/dist/cdn/CEDX246E.js +2 -0
- package/dist/cdn/CHD3ILKJ.js +2 -0
- package/dist/cdn/CHZZ2RYJ.js +2 -0
- package/dist/cdn/CXYCOZWQ.js +2 -0
- package/dist/cdn/{EHIAXJAL.js → DCWL5FUH.js} +1 -1
- package/dist/cdn/{PKKVWQIA.js → DDV63NHR.js} +1 -1
- package/dist/cdn/{P3W4A5BT.js → DJNFR4QI.js} +1 -1
- package/dist/cdn/{W5HANC6S.js → DLTF566J.js} +1 -1
- package/dist/cdn/{2M3L5CHC.js → DN3KX247.js} +1 -1
- package/dist/cdn/{YNGZPTWY.js → DOAP6WCZ.js} +1 -1
- package/dist/cdn/{6UH6TKTT.js → DRJLGXXO.js} +1 -1
- package/dist/cdn/{633FBLBS.js → DXY4C23A.js} +1 -1
- package/dist/cdn/{OSCPBA6O.js → DYDCVPOI.js} +1 -1
- package/dist/cdn/EGAAH6TG.js +2 -0
- package/dist/cdn/EJJQX4ML.js +2 -0
- package/dist/cdn/{GCGNKBZK.js → ENVIXFZU.js} +1 -1
- package/dist/cdn/{JVNG2BRO.js → EQU5P7SN.js} +1 -1
- package/dist/cdn/ESARDC6W.js +4 -0
- package/dist/cdn/ETIRLUPQ.js +2 -0
- package/dist/cdn/EYD2BXTW.js +2 -0
- package/dist/cdn/{7KPHVGVG.js → FE5OXGG4.js} +1 -1
- package/dist/cdn/G2HH5QEA.js +2 -0
- package/dist/cdn/G4U3PZ4V.js +2 -0
- package/dist/cdn/{ZB7NSHVW.js → G56X4IMP.js} +1 -1
- package/dist/cdn/GAAMXPVO.js +2 -0
- package/dist/cdn/GZJW26MB.js +2 -0
- package/dist/cdn/{6E6JZIDL.js → HBUIHCQ3.js} +1 -1
- package/dist/cdn/HH2LOAD2.js +2 -0
- package/dist/cdn/HSZGLDOY.js +2 -0
- package/dist/cdn/HYNLQ4YH.js +2 -0
- package/dist/cdn/IFEA2KUL.js +2 -0
- package/dist/cdn/IHLWEKHE.js +2 -0
- package/dist/cdn/IJVKNIVS.js +2 -0
- package/dist/cdn/IR5JNEWB.js +2 -0
- package/dist/cdn/IU5CF77N.js +2 -0
- package/dist/cdn/{JN5O4TLZ.js → IYHZBXVJ.js} +1 -1
- package/dist/cdn/IZ5V7N6A.js +2 -0
- package/dist/cdn/{XZX7ZHUA.js → JG5UHKQX.js} +1 -1
- package/dist/cdn/{IYMANB2G.js → JYLOZBNI.js} +1 -1
- package/dist/cdn/{O24SM7OF.js → KAQIINQ5.js} +1 -1
- package/dist/cdn/{JX4VBEH7.js → KBWDP7P5.js} +1 -1
- package/dist/cdn/{KJ42NLHR.js → KJBAHESF.js} +1 -1
- package/dist/cdn/KME5K4QX.js +2 -0
- package/dist/cdn/KNF3VDEF.js +2 -0
- package/dist/cdn/KTZXSDRQ.js +2 -0
- package/dist/cdn/{3HLHTUY5.js → KVPCYSF3.js} +1 -1
- package/dist/cdn/KZTXVBNL.js +2 -0
- package/dist/cdn/L7NZTBLE.js +2 -0
- package/dist/cdn/LQAE2SIH.js +2 -0
- package/dist/cdn/LUT36ST7.js +2 -0
- package/dist/cdn/LY62ZB2S.js +2 -0
- package/dist/cdn/M3HCHRLK.js +2 -0
- package/dist/cdn/{TWXMFG7A.js → M7SC44EX.js} +1 -1
- package/dist/cdn/{27KIJJVA.js → MBCDO7AO.js} +1 -1
- package/dist/cdn/{JQY63BDJ.js → MEBYN4KS.js} +1 -1
- package/dist/cdn/MYBWQ74T.js +2 -0
- package/dist/cdn/{3GV45XL7.js → MYDCGCGV.js} +1 -1
- package/dist/cdn/N4CKEM5T.js +2 -0
- package/dist/cdn/NKP6IMXA.js +2 -0
- package/dist/cdn/{REPXOUSM.js → NOF5PWPK.js} +1 -1
- package/dist/cdn/NSGUDIUD.js +2 -0
- package/dist/cdn/OJFAV7QX.js +2 -0
- package/dist/cdn/OPPGSVL7.js +2 -0
- package/dist/cdn/P62ELMRK.js +2 -0
- package/dist/cdn/{NLVQFJ3Z.js → PIKQITD7.js} +1 -1
- package/dist/cdn/{46ATGQXN.js → PPIX3XNI.js} +1 -1
- package/dist/cdn/PSCB2XXW.js +2 -0
- package/dist/cdn/{WE2SWJDR.js → PZ2LNZ7Q.js} +1 -1
- package/dist/cdn/PZ32GCPB.js +2 -0
- package/dist/cdn/Q3D6A7JD.js +2 -0
- package/dist/cdn/Q77UTH6Y.js +2 -0
- package/dist/cdn/{CSXVZ7IA.js → QAP4EE6I.js} +1 -1
- package/dist/cdn/{MCSIAIDA.js → QEDFI5NC.js} +1 -1
- package/dist/cdn/{526JZ6Y2.js → QIACXKZX.js} +1 -1
- package/dist/cdn/{4HL2Z5HN.js → QR33PARD.js} +1 -1
- package/dist/cdn/QTQYMKX6.js +2 -0
- package/dist/cdn/{FIYBHBE3.js → QY422VCO.js} +1 -1
- package/dist/cdn/{QX54642B.js → RDN36IJS.js} +1 -1
- package/dist/cdn/RLASUYQO.js +4 -0
- package/dist/cdn/ROENLRQS.js +2 -0
- package/dist/cdn/S2ICXQXT.js +2 -0
- package/dist/cdn/{CILYQWNA.js → SE3IOYSI.js} +1 -1
- package/dist/cdn/SJYIDE3P.js +2 -0
- package/dist/cdn/{AELSFDTC.js → SNGWW3DM.js} +1 -1
- package/dist/cdn/SZS6IBW7.js +2 -0
- package/dist/cdn/{PT5LBDUL.js → TGMGVOQH.js} +1 -1
- package/dist/cdn/{3N3YST3P.js → U75VROWX.js} +1 -1
- package/dist/cdn/UFPOH4DH.js +2 -0
- package/dist/cdn/UJIEG7DT.js +2 -0
- package/dist/cdn/{ETPCGFQN.js → UX7WP7OG.js} +1 -1
- package/dist/cdn/VEM5ZVQY.js +2 -0
- package/dist/cdn/VT6TY3DQ.js +2 -0
- package/dist/cdn/VWG4LTDM.js +2 -0
- package/dist/cdn/WAYYJNXJ.js +2 -0
- package/dist/cdn/WFBKZENT.js +2 -0
- package/dist/cdn/{RH6ZIP65.js → WGGFNK4Z.js} +1 -1
- package/dist/cdn/{B4SHCCW6.js → WUYBJO7J.js} +1 -1
- package/dist/cdn/{BVFHM66P.js → WWBUXJER.js} +1 -1
- package/dist/cdn/XFDDRAT2.js +2 -0
- package/dist/cdn/{NU744SVB.js → XKU4UAGF.js} +1 -1
- package/dist/cdn/{D2EYC7T6.js → XP2EMBHK.js} +1 -1
- package/dist/cdn/{OS5HZHBU.js → XVXDBX77.js} +1 -1
- package/dist/cdn/{57UFQM3M.js → YH26LJXE.js} +1 -1
- package/dist/cdn/{JVZSWSGV.js → YLYJ5GXE.js} +1 -1
- package/dist/cdn/YMO6IP7V.js +2 -0
- package/dist/cdn/YSS6A2ND.js +2 -0
- package/dist/cdn/{NCCVRAIB.js → ZANCD4RO.js} +1 -1
- package/dist/cdn/{THSY4EQU.js → ZHJNYGAU.js} +1 -1
- package/dist/cdn/{NGDCIJ3J.js → ZK2T6DXD.js} +1 -1
- package/dist/cdn/assets/combobox/t9n/messages.ar.json +1 -1
- package/dist/cdn/assets/combobox/t9n/messages.bg.json +1 -1
- package/dist/cdn/assets/combobox/t9n/messages.bs.json +1 -1
- package/dist/cdn/assets/combobox/t9n/messages.ca.json +1 -1
- package/dist/cdn/assets/combobox/t9n/messages.cs.json +1 -1
- package/dist/cdn/assets/combobox/t9n/messages.da.json +1 -1
- package/dist/cdn/assets/combobox/t9n/messages.de.json +1 -1
- package/dist/cdn/assets/combobox/t9n/messages.el.json +1 -1
- package/dist/cdn/assets/combobox/t9n/messages.en.json +1 -1
- package/dist/cdn/assets/combobox/t9n/messages.es.json +1 -1
- package/dist/cdn/assets/combobox/t9n/messages.et.json +1 -1
- package/dist/cdn/assets/combobox/t9n/messages.fi.json +1 -1
- package/dist/cdn/assets/combobox/t9n/messages.fr.json +1 -1
- package/dist/cdn/assets/combobox/t9n/messages.he.json +1 -1
- package/dist/cdn/assets/combobox/t9n/messages.hr.json +1 -1
- package/dist/cdn/assets/combobox/t9n/messages.hu.json +1 -1
- package/dist/cdn/assets/combobox/t9n/messages.id.json +1 -1
- package/dist/cdn/assets/combobox/t9n/messages.it.json +1 -1
- package/dist/cdn/assets/combobox/t9n/messages.ja.json +1 -1
- package/dist/cdn/assets/combobox/t9n/messages.json +1 -1
- package/dist/cdn/assets/combobox/t9n/messages.ko.json +1 -1
- package/dist/cdn/assets/combobox/t9n/messages.lt.json +1 -1
- package/dist/cdn/assets/combobox/t9n/messages.lv.json +1 -1
- package/dist/cdn/assets/combobox/t9n/messages.nl.json +1 -1
- package/dist/cdn/assets/combobox/t9n/messages.no.json +1 -1
- package/dist/cdn/assets/combobox/t9n/messages.pl.json +1 -1
- package/dist/cdn/assets/combobox/t9n/messages.pt-BR.json +1 -1
- package/dist/cdn/assets/combobox/t9n/messages.pt-PT.json +1 -1
- package/dist/cdn/assets/combobox/t9n/messages.ro.json +1 -1
- package/dist/cdn/assets/combobox/t9n/messages.ru.json +1 -1
- package/dist/cdn/assets/combobox/t9n/messages.sk.json +1 -1
- package/dist/cdn/assets/combobox/t9n/messages.sl.json +1 -1
- package/dist/cdn/assets/combobox/t9n/messages.sr.json +1 -1
- package/dist/cdn/assets/combobox/t9n/messages.sv.json +1 -1
- package/dist/cdn/assets/combobox/t9n/messages.th.json +1 -1
- package/dist/cdn/assets/combobox/t9n/messages.tr.json +1 -1
- package/dist/cdn/assets/combobox/t9n/messages.uk.json +1 -1
- package/dist/cdn/assets/combobox/t9n/messages.vi.json +1 -1
- package/dist/cdn/assets/combobox/t9n/messages.zh-CN.json +1 -1
- package/dist/cdn/assets/combobox/t9n/messages.zh-HK.json +1 -1
- package/dist/cdn/assets/combobox/t9n/messages.zh-TW.json +1 -1
- package/dist/cdn/assets/icon/arcgisQuickcapture16.json +1 -0
- package/dist/cdn/assets/icon/arcgisQuickcapture24.json +1 -0
- package/dist/cdn/assets/icon/arcgisQuickcapture32.json +1 -0
- package/dist/cdn/assets/icon/arcgisSurvey12316.json +1 -0
- package/dist/cdn/assets/icon/arcgisSurvey12324.json +1 -0
- package/dist/cdn/assets/icon/arcgisSurvey12332.json +1 -0
- package/dist/cdn/assets/icon/buttons16.json +1 -0
- package/dist/cdn/assets/icon/buttons24.json +1 -0
- package/dist/cdn/assets/icon/buttons32.json +1 -0
- package/dist/cdn/assets/icon/entityTypes16.json +1 -0
- package/dist/cdn/assets/icon/entityTypes24.json +1 -0
- package/dist/cdn/assets/icon/entityTypes32.json +1 -0
- package/dist/cdn/assets/icon/gpsReceiver16.json +1 -0
- package/dist/cdn/assets/icon/gpsReceiver24.json +1 -0
- package/dist/cdn/assets/icon/gpsReceiver32.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/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/returnToDefault16.json +1 -0
- package/dist/cdn/assets/icon/returnToDefault24.json +1 -0
- package/dist/cdn/assets/icon/returnToDefault32.json +1 -0
- package/dist/cdn/assets/icon/reviewMap16.json +1 -0
- package/dist/cdn/assets/icon/reviewMap24.json +1 -0
- package/dist/cdn/assets/icon/reviewMap32.json +1 -0
- package/dist/cdn/assets/icon/totalStation16.json +1 -0
- package/dist/cdn/assets/icon/totalStation24.json +1 -0
- package/dist/cdn/assets/icon/totalStation32.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/index.js +2 -2
- package/dist/cdn/main.css +1 -1
- package/dist/chunks/ClearButton.js +16 -0
- package/dist/chunks/ExpandToggle.js +2 -2
- package/dist/chunks/Heading.js +3 -3
- package/dist/chunks/component.js +1 -1
- package/dist/chunks/dom.js +49 -28
- package/dist/chunks/floating-ui.js +2 -5
- package/dist/chunks/locale.js +29 -12
- package/dist/chunks/manager.js +505 -0
- package/dist/chunks/resources5.js +2 -1
- package/dist/chunks/resources6.js +2 -0
- package/dist/chunks/runtime.js +4 -4
- package/dist/chunks/useFocusTrap.js +25 -0
- package/dist/chunks/useForm.js +327 -0
- package/dist/chunks/useFormTrigger.js +25 -0
- package/dist/chunks/{sortableComponent.js → useSortable.js} +70 -44
- package/dist/chunks/utils.js +6 -6
- package/dist/chunks/utils3.js +18 -3
- package/dist/components/calcite-accordion-item/customElement.d.ts +6 -6
- package/dist/components/calcite-action/customElement.d.ts +20 -12
- package/dist/components/calcite-action/customElement.js +10 -15
- package/dist/components/calcite-action-bar/customElement.d.ts +4 -4
- package/dist/components/calcite-action-bar/customElement.js +12 -6
- package/dist/components/calcite-action-group/customElement.d.ts +12 -6
- package/dist/components/calcite-action-group/customElement.js +2 -1
- package/dist/components/calcite-action-menu/customElement.d.ts +2 -2
- package/dist/components/calcite-action-pad/customElement.d.ts +3 -3
- package/dist/components/calcite-action-pad/customElement.js +12 -7
- package/dist/components/calcite-alert/customElement.d.ts +2 -2
- package/dist/components/calcite-alert/customElement.js +1 -1
- package/dist/components/calcite-autocomplete/customElement.d.ts +16 -13
- package/dist/components/calcite-autocomplete/customElement.js +21 -32
- package/dist/components/calcite-autocomplete-item/customElement.d.ts +6 -0
- package/dist/components/calcite-autocomplete-item/customElement.js +9 -4
- package/dist/components/calcite-block/customElement.d.ts +11 -7
- package/dist/components/calcite-block/customElement.js +1 -1
- package/dist/components/calcite-block-group/customElement.d.ts +1 -1
- package/dist/components/calcite-block-group/customElement.js +4 -11
- package/dist/components/calcite-block-group/interfaces.d.ts +2 -6
- package/dist/components/calcite-block-section/customElement.d.ts +1 -1
- package/dist/components/calcite-button/customElement.d.ts +6 -6
- package/dist/components/calcite-button/customElement.js +10 -22
- package/dist/components/calcite-card/customElement.d.ts +11 -5
- package/dist/components/calcite-card/customElement.js +5 -3
- package/dist/components/calcite-card-group/customElement.d.ts +9 -3
- package/dist/components/calcite-card-group/customElement.js +11 -1
- package/dist/components/calcite-carousel/customElement.d.ts +8 -2
- package/dist/components/calcite-carousel/customElement.js +11 -8
- package/dist/components/calcite-carousel/interfaces.d.ts +3 -1
- package/dist/components/calcite-checkbox/customElement.d.ts +4 -5
- package/dist/components/calcite-checkbox/customElement.js +8 -22
- package/dist/components/calcite-chip/customElement.d.ts +2 -2
- package/dist/components/calcite-chip/customElement.js +1 -1
- package/dist/components/calcite-chip-group/customElement.d.ts +1 -1
- package/dist/components/calcite-color-picker/customElement.d.ts +2 -2
- package/dist/components/calcite-color-picker/customElement.js +2 -2
- package/dist/components/calcite-color-picker-hex-input/customElement.d.ts +1 -1
- package/dist/components/calcite-color-picker-hex-input/customElement.js +1 -1
- package/dist/components/calcite-color-picker-swatch/customElement.d.ts +1 -1
- package/dist/components/calcite-combobox/customElement.d.ts +5 -5
- package/dist/components/calcite-combobox/customElement.js +195 -108
- package/dist/components/calcite-combobox/index.js +2 -1
- package/dist/components/calcite-combobox-item/customElement.d.ts +1 -1
- package/dist/components/calcite-combobox-item/customElement.js +1 -1
- package/dist/components/calcite-date-picker/customElement.d.ts +1 -1
- package/dist/components/calcite-date-picker/customElement.js +4 -14
- package/dist/components/calcite-date-picker-day/customElement.d.ts +1 -1
- package/dist/components/calcite-date-picker-day/customElement.js +1 -1
- package/dist/components/calcite-date-picker-month/customElement.js +2 -2
- package/dist/components/calcite-date-picker-month-header/customElement.js +1 -1
- package/dist/components/calcite-dialog/customElement.d.ts +7 -5
- package/dist/components/calcite-dialog/customElement.js +4 -2
- package/dist/components/calcite-dropdown/customElement.d.ts +15 -5
- package/dist/components/calcite-dropdown/customElement.js +166 -91
- package/dist/components/calcite-dropdown-item/customElement.d.ts +2 -2
- package/dist/components/calcite-dropdown-item/customElement.js +14 -32
- package/dist/components/calcite-fab/customElement.d.ts +1 -1
- package/dist/components/calcite-fab/customElement.js +2 -2
- package/dist/components/calcite-filter/customElement.d.ts +1 -1
- package/dist/components/calcite-flow/customElement.d.ts +1 -1
- package/dist/components/calcite-flow-item/customElement.d.ts +8 -5
- package/dist/components/calcite-flow-item/customElement.js +4 -2
- package/dist/components/calcite-graph/customElement.js +1 -1
- package/dist/components/calcite-handle/customElement.d.ts +1 -1
- package/dist/components/calcite-icon/customElement.d.ts +1 -1
- package/dist/components/calcite-inline-editable/customElement.d.ts +2 -2
- package/dist/components/calcite-inline-editable/customElement.js +1 -1
- package/dist/components/calcite-input/customElement.d.ts +17 -18
- package/dist/components/calcite-input/customElement.js +26 -49
- package/dist/components/calcite-input/index.js +1 -0
- package/dist/components/calcite-input-date-picker/customElement.d.ts +6 -7
- package/dist/components/calcite-input-date-picker/customElement.js +67 -76
- package/dist/components/calcite-input-message/customElement.d.ts +1 -1
- package/dist/components/calcite-input-number/customElement.d.ts +13 -14
- package/dist/components/calcite-input-number/customElement.js +22 -48
- package/dist/components/calcite-input-number/index.js +1 -0
- package/dist/components/calcite-input-text/customElement.d.ts +11 -12
- package/dist/components/calcite-input-text/customElement.js +8 -179
- package/dist/components/calcite-input-text/index.js +1 -0
- package/dist/components/calcite-input-time-picker/customElement.d.ts +6 -7
- package/dist/components/calcite-input-time-picker/customElement.js +11 -23
- package/dist/components/calcite-input-time-zone/customElement.d.ts +5 -6
- package/dist/components/calcite-input-time-zone/customElement.js +21 -19
- package/dist/components/calcite-label/customElement.js +1 -1
- package/dist/components/calcite-link/customElement.d.ts +9 -9
- package/dist/components/calcite-link/customElement.js +28 -23
- package/dist/components/calcite-list/customElement.d.ts +1 -1
- package/dist/components/calcite-list/customElement.js +41 -17
- package/dist/components/calcite-list/interfaces.d.ts +2 -6
- package/dist/components/calcite-list-item/customElement.d.ts +2 -2
- package/dist/components/calcite-list-item/customElement.js +7 -4
- package/dist/components/calcite-list-item-group/customElement.js +7 -1
- package/dist/components/calcite-loader/customElement.d.ts +1 -1
- package/dist/components/calcite-menu/customElement.d.ts +1 -1
- package/dist/components/calcite-menu/customElement.js +1 -1
- package/dist/components/calcite-menu-item/customElement.d.ts +3 -3
- package/dist/components/calcite-menu-item/customElement.js +1 -1
- package/dist/components/calcite-meter/customElement.d.ts +7 -1
- package/dist/components/calcite-meter/customElement.js +4 -8
- package/dist/components/calcite-navigation/customElement.d.ts +9 -2
- package/dist/components/calcite-navigation/customElement.js +56 -3
- package/dist/components/calcite-navigation-logo/customElement.d.ts +3 -3
- package/dist/components/calcite-navigation-logo/customElement.js +4 -3
- package/dist/components/calcite-navigation-user/customElement.d.ts +2 -2
- package/dist/components/calcite-navigation-user/customElement.js +11 -6
- package/dist/components/calcite-notice/customElement.d.ts +3 -3
- package/dist/components/calcite-notice/customElement.js +1 -1
- package/dist/components/calcite-pagination/customElement.d.ts +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 +20 -8
- package/dist/components/calcite-popover/customElement.d.ts +2 -2
- package/dist/components/calcite-popover/customElement.js +12 -176
- package/dist/components/calcite-radio-button/customElement.d.ts +16 -1
- package/dist/components/calcite-radio-button/customElement.js +10 -18
- package/dist/components/calcite-radio-button-group/customElement.d.ts +1 -1
- package/dist/components/calcite-rating/customElement.d.ts +3 -4
- package/dist/components/calcite-rating/customElement.js +12 -18
- package/dist/components/calcite-segmented-control/customElement.d.ts +3 -4
- package/dist/components/calcite-segmented-control/customElement.js +8 -19
- package/dist/components/calcite-segmented-control-item/customElement.d.ts +0 -1
- package/dist/components/calcite-segmented-control-item/customElement.js +1 -1
- package/dist/components/calcite-select/customElement.d.ts +3 -4
- package/dist/components/calcite-select/customElement.js +9 -20
- package/dist/components/calcite-sheet/customElement.d.ts +3 -3
- package/dist/components/calcite-sheet/customElement.js +3 -7
- package/dist/components/calcite-shell-panel/customElement.d.ts +4 -4
- package/dist/components/calcite-shell-panel/customElement.js +59 -30
- package/dist/components/calcite-slider/customElement.d.ts +3 -4
- package/dist/components/calcite-slider/customElement.js +12 -22
- package/dist/components/calcite-sort-handle/customElement.d.ts +4 -4
- package/dist/components/calcite-sort-handle/customElement.js +44 -17
- package/dist/components/calcite-sortable-list/customElement.d.ts +1 -1
- package/dist/components/calcite-sortable-list/customElement.js +3 -3
- package/dist/components/calcite-split-button/customElement.d.ts +8 -8
- package/dist/components/calcite-stepper/customElement.d.ts +2 -2
- package/dist/components/calcite-stepper/customElement.js +29 -42
- package/dist/components/calcite-stepper-item/customElement.d.ts +1 -1
- package/dist/components/calcite-stepper-item/customElement.js +2 -8
- package/dist/components/calcite-swatch/customElement.d.ts +1 -1
- package/dist/components/calcite-switch/customElement.d.ts +4 -4
- 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 +1 -1
- package/dist/components/calcite-tab-nav/customElement.js +1 -1
- package/dist/components/calcite-tab-title/customElement.js +1 -1
- package/dist/components/calcite-table/customElement.js +1 -1
- package/dist/components/calcite-table-cell/customElement.d.ts +2 -2
- package/dist/components/calcite-table-header/customElement.d.ts +2 -2
- package/dist/components/calcite-table-row/customElement.d.ts +1 -1
- package/dist/components/calcite-tabs/customElement.js +1 -1
- package/dist/components/calcite-text-area/customElement.d.ts +13 -14
- package/dist/components/calcite-text-area/customElement.js +32 -37
- package/dist/components/calcite-tile/customElement.d.ts +1 -1
- package/dist/components/calcite-time-picker/customElement.d.ts +1 -1
- package/dist/components/calcite-time-picker/customElement.js +2 -2
- package/dist/components/calcite-tooltip/customElement.d.ts +15 -2
- package/dist/components/calcite-tooltip/customElement.js +24 -315
- package/dist/components/calcite-tree/customElement.js +1 -1
- package/dist/components/calcite-tree-item/customElement.js +2 -3
- package/dist/controllers/useSortable.d.ts +7 -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 +28 -28
- package/dist/types/lumina.d.ts +9 -9
- package/dist/types/preact.d.ts +9 -9
- package/dist/types/react.d.ts +9 -9
- package/dist/types/stencil.d.ts +9 -9
- package/package.json +22 -23
- package/dist/cdn/232WBXIW.js +0 -2
- package/dist/cdn/2CV466KR.js +0 -2
- package/dist/cdn/2XWHTJYS.js +0 -2
- package/dist/cdn/3OCOXFJX.js +0 -2
- package/dist/cdn/3ZTULMLE.js +0 -2
- package/dist/cdn/5D32LNQR.js +0 -2
- package/dist/cdn/5G2KVW4P.js +0 -2
- package/dist/cdn/5H7EBO5K.js +0 -2
- package/dist/cdn/5HB4KJ7Y.js +0 -2
- package/dist/cdn/66YZFACX.js +0 -2
- package/dist/cdn/672VGWH7.js +0 -2
- package/dist/cdn/67O6G5DT.js +0 -2
- package/dist/cdn/6CKEQZO7.js +0 -2
- package/dist/cdn/6XNHTAM2.js +0 -2
- package/dist/cdn/7MRH7XSL.js +0 -2
- package/dist/cdn/7UOYXJ3K.js +0 -2
- package/dist/cdn/AKVWZOJU.js +0 -2
- package/dist/cdn/ARN4B4IT.js +0 -2
- package/dist/cdn/BCO3LX7A.js +0 -2
- package/dist/cdn/BRMCZ6ZG.js +0 -2
- package/dist/cdn/BRXJTIAG.js +0 -2
- package/dist/cdn/C44ME3U7.js +0 -2
- package/dist/cdn/EMOZ2DH3.js +0 -2
- package/dist/cdn/FC5MLLP5.js +0 -2
- package/dist/cdn/FO3VFHYC.js +0 -2
- package/dist/cdn/HGX7LZAA.js +0 -2
- package/dist/cdn/HMZKLPV5.js +0 -2
- package/dist/cdn/IBP55ZGE.js +0 -2
- package/dist/cdn/IIYUSLAE.js +0 -2
- package/dist/cdn/K724PPGV.js +0 -2
- package/dist/cdn/KP6U3OB3.js +0 -2
- package/dist/cdn/KT4JL3GM.js +0 -2
- package/dist/cdn/KZ5EXCXL.js +0 -2
- package/dist/cdn/L3TZLATI.js +0 -2
- package/dist/cdn/LCHIHTFT.js +0 -2
- package/dist/cdn/LKQBHGZ7.js +0 -2
- package/dist/cdn/LOPKPGRY.js +0 -2
- package/dist/cdn/LRM2CLPW.js +0 -2
- package/dist/cdn/LRM7ZHT5.js +0 -2
- package/dist/cdn/LSDUQPFS.js +0 -2
- package/dist/cdn/LTLVP6R6.js +0 -2
- package/dist/cdn/MFSDYV4U.js +0 -2
- package/dist/cdn/NXCII3YU.js +0 -2
- package/dist/cdn/O535TZZ6.js +0 -2
- package/dist/cdn/O7YWW6X6.js +0 -2
- package/dist/cdn/OIYWPY2M.js +0 -2
- package/dist/cdn/OX5RYOW4.js +0 -2
- package/dist/cdn/Q5SNHQHW.js +0 -2
- package/dist/cdn/QID335AW.js +0 -2
- package/dist/cdn/RJSLWYFJ.js +0 -2
- package/dist/cdn/RTJOU72W.js +0 -2
- package/dist/cdn/S3FVUTIY.js +0 -2
- package/dist/cdn/SJYYS7RH.js +0 -2
- package/dist/cdn/SMSVNRM4.js +0 -2
- package/dist/cdn/SSQXPR3D.js +0 -2
- package/dist/cdn/TBVIBCHL.js +0 -2
- package/dist/cdn/TT5S3S4L.js +0 -4
- package/dist/cdn/U3AOFOT7.js +0 -2
- package/dist/cdn/UPE6RIV2.js +0 -2
- package/dist/cdn/V4NX2X3B.js +0 -2
- package/dist/cdn/V6NB5CGO.js +0 -2
- package/dist/cdn/VESBDAE7.js +0 -2
- package/dist/cdn/VKQJIDXT.js +0 -2
- package/dist/cdn/VMMRWNOB.js +0 -3
- package/dist/cdn/W4HQGAKN.js +0 -2
- package/dist/cdn/W5FGAVGO.js +0 -2
- package/dist/cdn/WBP5XEJH.js +0 -2
- package/dist/cdn/WJXZ7BPV.js +0 -2
- package/dist/cdn/WNADDPUF.js +0 -2
- package/dist/cdn/XGRU4PI2.js +0 -2
- package/dist/cdn/XRGPWSUO.js +0 -2
- package/dist/cdn/Y36WJADK.js +0 -2
- package/dist/cdn/Y555OQ57.js +0 -2
- package/dist/cdn/YGHVUKLM.js +0 -2
- package/dist/cdn/YPOMUQHV.js +0 -3
- package/dist/cdn/YWIQC7RF.js +0 -2
- package/dist/cdn/ZHOHVRUX.js +0 -2
- package/dist/cdn/ZQLGBHLZ.js +0 -2
- package/dist/chunks/form.js +0 -268
- package/dist/chunks/input.js +0 -40
- package/dist/controllers/useForm.d.ts +0 -3
- package/dist/utils/form.d.ts +0 -3
- package/dist/utils/sortableComponent.d.ts +0 -7
|
@@ -1,13 +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
3
|
import { ref } from "lit/directives/ref.js";
|
|
4
|
-
import { css,
|
|
4
|
+
import { css, html } from "lit";
|
|
5
5
|
import { LitElement, createEvent, safeClassMap } from "@arcgis/lumina";
|
|
6
|
-
import { queryAssignedElements } from "lit/decorators.js";
|
|
7
6
|
import { useDirection } from "@arcgis/lumina/controllers";
|
|
8
|
-
import {
|
|
7
|
+
import { u as nextFrame } from "../../chunks/dom.js";
|
|
9
8
|
import { d as defaultMenuPlacement, r as reposition, c as connectFloatingUI, a as disconnectFloatingUI, f as filterValidFlipPlacements, h as hideFloatingUI, F as FloatingCSS } from "../../chunks/floating-ui.js";
|
|
10
|
-
import { g as guid } from "../../chunks/guid.js";
|
|
11
9
|
import { i as isActivationKey } from "../../chunks/key.js";
|
|
12
10
|
import { c as createObserver, u as updateRefObserver } from "../../chunks/observers.js";
|
|
13
11
|
import { t as toggleOpenClose } from "../../chunks/openCloseComponent.js";
|
|
@@ -15,6 +13,7 @@ import { g as getDimensionClass } from "../../chunks/dynamicClasses.js";
|
|
|
15
13
|
import { u as useSetFocus } from "../../chunks/useSetFocus.js";
|
|
16
14
|
import { u as useInteractive } from "../../chunks/useInteractive.js";
|
|
17
15
|
import { u as useTopLayer } from "../../chunks/useTopLayer.js";
|
|
16
|
+
import { u as useReferenceElement, r as referenceElementManager } from "../../chunks/manager.js";
|
|
18
17
|
const SLOTS = {
|
|
19
18
|
trigger: "trigger"
|
|
20
19
|
};
|
|
@@ -23,32 +22,21 @@ const CSS = {
|
|
|
23
22
|
wrapper: "wrapper",
|
|
24
23
|
triggerContainer: "trigger-container"
|
|
25
24
|
};
|
|
26
|
-
const
|
|
27
|
-
const
|
|
28
|
-
menuButton: (id) => `${idPrefix}-${id}-menubutton`,
|
|
29
|
-
menu: (id) => `${idPrefix}-${id}-menu`
|
|
30
|
-
};
|
|
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:inline-block}.wrapper{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{.wrapper{opacity:0;inset-block-start:0;left:0}}:host([top-layer-disabled]) .wrapper{--calcite-floating-ui-z-index: var(--calcite-z-index-dropdown)}.wrapper[popover]{padding:0;margin:0;border:none;background-color:transparent;overflow:visible;display:none}.wrapper:popover-open{display:block}.wrapper .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}.wrapper[data-placement^=bottom] .calcite-floating-ui-anim{inset-block-start:-5px}.wrapper[data-placement^=top] .calcite-floating-ui-anim{inset-block-start:5px}.wrapper[data-placement^=left] .calcite-floating-ui-anim{left:5px}.wrapper[data-placement^=right] .calcite-floating-ui-anim{left:-5px}.wrapper[data-placement] .calcite-floating-ui-anim--active{opacity:1;inset-block-start:0;left:0}@starting-style{.wrapper[data-placement] .calcite-floating-ui-anim--active{opacity:0}}.content{max-height:45vh;width:auto;overflow-y:auto;overflow-x:hidden;inline-size:var(--calcite-dropdown-width, var(--calcite-internal-dropdown-width));background-color:var(--calcite-dropdown-background-color, var(--calcite-color-foreground-1))}.trigger-container{position:relative;display:flex;height:100%;flex:1 1 auto;word-wrap:break-word;word-break:break-word}.width-s{--calcite-internal-dropdown-width: 12rem}.width-m{--calcite-internal-dropdown-width: 14rem}.width-l{--calcite-internal-dropdown-width: 16rem}@media(forced-colors:active){:host([open]) .wrapper{border:var(--calcite-border-width-sm) solid canvasText}}:host([hidden]){display:none}[hidden]{display:none}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}`;
|
|
32
|
-
var __defProp = Object.defineProperty;
|
|
33
|
-
var __decorateClass = (decorators, target, key, kind) => {
|
|
34
|
-
var result = void 0;
|
|
35
|
-
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
36
|
-
if (decorator = decorators[i])
|
|
37
|
-
result = decorator(target, key, result) || result;
|
|
38
|
-
if (result) __defProp(target, key, result);
|
|
39
|
-
return result;
|
|
40
|
-
};
|
|
25
|
+
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:inline-block}.wrapper{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{.wrapper{opacity:0;inset-block-start:0;left:0}}:host([top-layer-disabled]) .wrapper{--calcite-floating-ui-z-index: var(--calcite-z-index-dropdown)}.wrapper[popover]{padding:0;margin:0;border:none;background-color:transparent;overflow:visible;display:none}.wrapper:popover-open{display:block}.wrapper .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}.wrapper[data-placement^=bottom] .calcite-floating-ui-anim{inset-block-start:-5px}.wrapper[data-placement^=top] .calcite-floating-ui-anim{inset-block-start:5px}.wrapper[data-placement^=left] .calcite-floating-ui-anim{left:5px}.wrapper[data-placement^=right] .calcite-floating-ui-anim{left:-5px}.wrapper[data-placement] .calcite-floating-ui-anim--active{opacity:1;inset-block-start:0;left:0}@starting-style{.wrapper[data-placement] .calcite-floating-ui-anim--active{opacity:0}}.wrapper .calcite-floating-ui-anim{box-shadow:var(--calcite-shadow-md)}.content{max-height:45vh;width:auto;overflow-y:auto;overflow-x:hidden;inline-size:var(--calcite-dropdown-width, var(--calcite-internal-dropdown-width));background-color:var(--calcite-dropdown-background-color, var(--calcite-color-foreground-1))}.trigger-container{position:relative;display:flex;height:100%;flex:1 1 auto;word-wrap:break-word;word-break:break-word}.width-s{--calcite-internal-dropdown-width: 12rem}.width-m{--calcite-internal-dropdown-width: 14rem}.width-l{--calcite-internal-dropdown-width: 16rem}@media(forced-colors:active){:host([open]) .wrapper{border:var(--calcite-border-width-sm) solid canvasText}}:host([hidden]){display:none}[hidden]{display:none}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}`;
|
|
26
|
+
const manager = referenceElementManager({ click: true, hover: true });
|
|
41
27
|
class Dropdown extends LitElement {
|
|
42
28
|
constructor() {
|
|
43
29
|
super();
|
|
30
|
+
this.referenceElementController = useReferenceElement({ manager })(this);
|
|
44
31
|
this.direction = useDirection();
|
|
45
32
|
this.focusLastDropdownItem = false;
|
|
33
|
+
this.activeItemIndex = -1;
|
|
46
34
|
this.groups = [];
|
|
47
|
-
this.guid = guid();
|
|
48
35
|
this.items = [];
|
|
49
36
|
this.mutationObserver = createObserver("mutation", () => this.updateItems());
|
|
50
37
|
this.transitionProp = "opacity";
|
|
51
38
|
this.resizeObserver = createObserver("resize", (entries) => this.resizeObserverCallback(entries));
|
|
39
|
+
this.onReferenceElementKeyDown = (event) => this.keyDownHandler(event);
|
|
52
40
|
this.focusSetter = useSetFocus()(this);
|
|
53
41
|
this.interactiveContainer = useInteractive(this);
|
|
54
42
|
this.topLayer = useTopLayer({
|
|
@@ -72,15 +60,13 @@ class Dropdown extends LitElement {
|
|
|
72
60
|
this.calciteDropdownOpen = createEvent({ cancelable: false });
|
|
73
61
|
this.calciteDropdownSelect = createEvent({ cancelable: false });
|
|
74
62
|
this.listenOn(window, "click", this.closeCalciteDropdownOnClick);
|
|
75
|
-
this.listen("calciteInternalDropdownCloseRequest", this.closeCalciteDropdownOnEvent);
|
|
76
63
|
this.listenOn(window, "calciteDropdownOpen", this.closeCalciteDropdownOnOpenEvent);
|
|
77
64
|
this.listen("pointerenter", this.pointerEnterHandler);
|
|
78
65
|
this.listen("pointerleave", this.pointerLeaveHandler);
|
|
79
|
-
this.listen("calciteInternalDropdownItemKeyEvent", this.calciteInternalDropdownItemKeyEvent);
|
|
80
66
|
this.listen("calciteInternalDropdownItemSelect", this.handleItemSelect);
|
|
81
67
|
}
|
|
82
68
|
static {
|
|
83
|
-
this.properties = { closeOnSelectDisabled: [7, {}, { reflect: true, type: Boolean }], disabled: [7, {}, { reflect: true, type: Boolean }], flipPlacements: [0, {}, { attribute: false }], maxItems: [11, {}, { reflect: true, type: Number }], 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 }], scale: [3, {}, { reflect: true }], selectedItems: [0, {}, { attribute: false }], topLayerDisabled: [7, {}, { reflect: true, type: Boolean }], type: [3, {}, { reflect: true }], widthScale: [3, {}, { reflect: true }], width: [3, {}, { reflect: true }] };
|
|
69
|
+
this.properties = { activeDescendantElement: [16, {}, { state: true }], referenceEl: [16, {}, { state: true }], closeOnSelectDisabled: [7, {}, { reflect: true, type: Boolean }], disabled: [7, {}, { reflect: true, type: Boolean }], flipPlacements: [0, {}, { attribute: false }], maxItems: [11, {}, { reflect: true, type: Number }], 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, scale: [3, {}, { reflect: true }], selectedItems: [0, {}, { attribute: false }], topLayerDisabled: [7, {}, { reflect: true, type: Boolean }], type: [3, {}, { reflect: true }], widthScale: [3, {}, { reflect: true }], width: [3, {}, { reflect: true }] };
|
|
84
70
|
}
|
|
85
71
|
static {
|
|
86
72
|
this.shadowRootOptions = { mode: "open", delegatesFocus: true };
|
|
@@ -88,6 +74,9 @@ class Dropdown extends LitElement {
|
|
|
88
74
|
static {
|
|
89
75
|
this.styles = styles;
|
|
90
76
|
}
|
|
77
|
+
get referenceElementType() {
|
|
78
|
+
return this.referenceElement ? this.type : null;
|
|
79
|
+
}
|
|
91
80
|
async reposition(delayed = false) {
|
|
92
81
|
const { filteredFlipPlacements, floatingEl, offsetDistance, offsetSkidding, overlayPositioning, placement, referenceEl } = this;
|
|
93
82
|
return reposition(this, {
|
|
@@ -103,7 +92,7 @@ class Dropdown extends LitElement {
|
|
|
103
92
|
}, delayed);
|
|
104
93
|
}
|
|
105
94
|
async setFocus(options) {
|
|
106
|
-
return this.focusSetter(() => this.referenceEl, options);
|
|
95
|
+
return this.focusSetter(() => this.referenceEl instanceof HTMLElement ? this.referenceEl : this.floatingEl, options);
|
|
107
96
|
}
|
|
108
97
|
connectedCallback() {
|
|
109
98
|
super.connectedCallback();
|
|
@@ -131,6 +120,14 @@ class Dropdown extends LitElement {
|
|
|
131
120
|
if (changes.has("scale") && (this.hasUpdated || this.scale !== "m")) {
|
|
132
121
|
this.handlePropsChange();
|
|
133
122
|
}
|
|
123
|
+
if (changes.has("referenceElement") && !this.referenceElement && this.open) {
|
|
124
|
+
this.topLayer.hide();
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
updated(changes) {
|
|
128
|
+
if (changes.has("referenceEl") && this.referenceElementType) {
|
|
129
|
+
connectFloatingUI(this);
|
|
130
|
+
}
|
|
134
131
|
}
|
|
135
132
|
loaded() {
|
|
136
133
|
this.updateSelectedItems();
|
|
@@ -163,29 +160,25 @@ class Dropdown extends LitElement {
|
|
|
163
160
|
this.updateGroupProps();
|
|
164
161
|
}
|
|
165
162
|
closeCalciteDropdownOnClick(event) {
|
|
166
|
-
if (this.disabled || !this.open || event.composedPath().includes(this.el)) {
|
|
163
|
+
if (this.referenceElementType || this.disabled || !this.open || event.composedPath().includes(this.el)) {
|
|
167
164
|
return;
|
|
168
165
|
}
|
|
169
|
-
this.closeCalciteDropdown(false);
|
|
170
|
-
}
|
|
171
|
-
closeCalciteDropdownOnEvent(event) {
|
|
172
166
|
this.closeCalciteDropdown();
|
|
173
|
-
event.stopPropagation();
|
|
174
167
|
}
|
|
175
168
|
closeCalciteDropdownOnOpenEvent(event) {
|
|
176
|
-
if (event.composedPath().includes(this.el)) {
|
|
169
|
+
if (this.referenceElementType || event.composedPath().includes(this.el)) {
|
|
177
170
|
return;
|
|
178
171
|
}
|
|
179
|
-
this.
|
|
172
|
+
this.closeCalciteDropdown();
|
|
180
173
|
}
|
|
181
174
|
pointerEnterHandler() {
|
|
182
|
-
if (this.disabled || this.type !== "hover") {
|
|
175
|
+
if (this.referenceElementType || this.disabled || this.type !== "hover") {
|
|
183
176
|
return;
|
|
184
177
|
}
|
|
185
|
-
this.
|
|
178
|
+
this.open = true;
|
|
186
179
|
}
|
|
187
180
|
pointerLeaveHandler() {
|
|
188
|
-
if (this.disabled || this.type !== "hover") {
|
|
181
|
+
if (this.referenceElementType || this.disabled || this.type !== "hover") {
|
|
189
182
|
return;
|
|
190
183
|
}
|
|
191
184
|
this.closeCalciteDropdown();
|
|
@@ -193,34 +186,12 @@ class Dropdown extends LitElement {
|
|
|
193
186
|
getTraversableItems() {
|
|
194
187
|
return this.items.filter((item) => !item.disabled && !item.hidden);
|
|
195
188
|
}
|
|
196
|
-
|
|
197
|
-
const { keyboardEvent } = event.detail;
|
|
198
|
-
const target = keyboardEvent.target;
|
|
199
|
-
const traversableItems = this.getTraversableItems();
|
|
200
|
-
switch (keyboardEvent.key) {
|
|
201
|
-
case "Tab":
|
|
202
|
-
this.open = false;
|
|
203
|
-
this.updateTabIndexOfItems(target);
|
|
204
|
-
break;
|
|
205
|
-
case "ArrowDown":
|
|
206
|
-
focusElementInGroup(traversableItems, target, "next");
|
|
207
|
-
break;
|
|
208
|
-
case "ArrowUp":
|
|
209
|
-
focusElementInGroup(traversableItems, target, "previous");
|
|
210
|
-
break;
|
|
211
|
-
case "Home":
|
|
212
|
-
focusElementInGroup(traversableItems, target, "first");
|
|
213
|
-
break;
|
|
214
|
-
case "End":
|
|
215
|
-
focusElementInGroup(traversableItems, target, "last");
|
|
216
|
-
break;
|
|
217
|
-
}
|
|
218
|
-
event.stopPropagation();
|
|
219
|
-
}
|
|
220
|
-
handleItemSelect(event) {
|
|
189
|
+
async handleItemSelect(event) {
|
|
221
190
|
this.updateSelectedItems();
|
|
191
|
+
this.syncActiveItemFromTraversableItems();
|
|
222
192
|
event.stopPropagation();
|
|
223
193
|
this.calciteDropdownSelect.emit();
|
|
194
|
+
await this.setFocus();
|
|
224
195
|
if (!this.closeOnSelectDisabled) {
|
|
225
196
|
this.closeCalciteDropdown();
|
|
226
197
|
}
|
|
@@ -232,6 +203,7 @@ class Dropdown extends LitElement {
|
|
|
232
203
|
updateItems() {
|
|
233
204
|
this.items = this.groups.map((group) => Array.from(group?.querySelectorAll("calcite-dropdown-item"))).reduce((previousValue, currentValue) => [...previousValue, ...currentValue], []);
|
|
234
205
|
this.updateSelectedItems();
|
|
206
|
+
this.syncActiveItemFromTraversableItems();
|
|
235
207
|
this.reposition(true);
|
|
236
208
|
this.items.forEach((item) => item.scale = this.scale);
|
|
237
209
|
}
|
|
@@ -258,7 +230,7 @@ class Dropdown extends LitElement {
|
|
|
258
230
|
}
|
|
259
231
|
setDropdownWidth() {
|
|
260
232
|
const { referenceEl, scrollerEl } = this;
|
|
261
|
-
if (!scrollerEl || !referenceEl) {
|
|
233
|
+
if (!scrollerEl || !(referenceEl instanceof HTMLElement)) {
|
|
262
234
|
return;
|
|
263
235
|
}
|
|
264
236
|
scrollerEl.style.minWidth = `${referenceEl.clientWidth}px`;
|
|
@@ -278,7 +250,7 @@ class Dropdown extends LitElement {
|
|
|
278
250
|
this.transitionEl = el;
|
|
279
251
|
}
|
|
280
252
|
onBeforeOpen() {
|
|
281
|
-
this.
|
|
253
|
+
this.setInitialActiveItem();
|
|
282
254
|
this.calciteDropdownBeforeOpen.emit();
|
|
283
255
|
this.topLayer.show();
|
|
284
256
|
}
|
|
@@ -294,7 +266,9 @@ class Dropdown extends LitElement {
|
|
|
294
266
|
this.topLayer.hide();
|
|
295
267
|
}
|
|
296
268
|
setReferenceEl(el) {
|
|
297
|
-
|
|
269
|
+
const previousReferenceEl = this.referenceEl instanceof HTMLElement ? this.referenceEl : null;
|
|
270
|
+
const nextReferenceEl = el instanceof HTMLElement ? el : null;
|
|
271
|
+
updateRefObserver(this.resizeObserver, previousReferenceEl, nextReferenceEl);
|
|
298
272
|
this.referenceEl = el;
|
|
299
273
|
connectFloatingUI(this);
|
|
300
274
|
}
|
|
@@ -303,30 +277,59 @@ class Dropdown extends LitElement {
|
|
|
303
277
|
connectFloatingUI(this);
|
|
304
278
|
}
|
|
305
279
|
keyDownHandler(event) {
|
|
306
|
-
if (!event.composedPath().includes(this.referenceEl)) {
|
|
280
|
+
if (!(this.referenceEl instanceof HTMLElement) || !event.composedPath().includes(this.referenceEl)) {
|
|
307
281
|
return;
|
|
308
282
|
}
|
|
309
283
|
const { defaultPrevented, key } = event;
|
|
310
284
|
if (defaultPrevented) {
|
|
311
285
|
return;
|
|
312
286
|
}
|
|
313
|
-
if (key === "Escape") {
|
|
287
|
+
if (this.open && key === "Escape") {
|
|
314
288
|
this.closeCalciteDropdown();
|
|
315
289
|
event.preventDefault();
|
|
316
290
|
return;
|
|
317
291
|
}
|
|
318
|
-
if (this.open &&
|
|
319
|
-
this.
|
|
292
|
+
if (!this.open && isActivationKey(key)) {
|
|
293
|
+
this.open = true;
|
|
320
294
|
event.preventDefault();
|
|
321
295
|
return;
|
|
322
296
|
}
|
|
323
|
-
if (
|
|
324
|
-
this.toggleDropdown();
|
|
325
|
-
event.preventDefault();
|
|
326
|
-
} else if (key === "ArrowDown" || key === "ArrowUp") {
|
|
297
|
+
if (!this.open && (key === "ArrowDown" || key === "ArrowUp")) {
|
|
327
298
|
event.preventDefault();
|
|
328
299
|
this.focusLastDropdownItem = key === "ArrowUp";
|
|
329
300
|
this.open = true;
|
|
301
|
+
return;
|
|
302
|
+
}
|
|
303
|
+
if (!this.open) {
|
|
304
|
+
return;
|
|
305
|
+
}
|
|
306
|
+
if (key === "Tab") {
|
|
307
|
+
this.closeCalciteDropdown();
|
|
308
|
+
return;
|
|
309
|
+
}
|
|
310
|
+
if (key === "ArrowDown") {
|
|
311
|
+
event.preventDefault();
|
|
312
|
+
this.navigateActiveItem("next");
|
|
313
|
+
return;
|
|
314
|
+
}
|
|
315
|
+
if (key === "ArrowUp") {
|
|
316
|
+
event.preventDefault();
|
|
317
|
+
this.navigateActiveItem("previous");
|
|
318
|
+
return;
|
|
319
|
+
}
|
|
320
|
+
if (key === "Home") {
|
|
321
|
+
event.preventDefault();
|
|
322
|
+
this.navigateActiveItem("first");
|
|
323
|
+
return;
|
|
324
|
+
}
|
|
325
|
+
if (key === "End") {
|
|
326
|
+
event.preventDefault();
|
|
327
|
+
this.navigateActiveItem("last");
|
|
328
|
+
return;
|
|
329
|
+
}
|
|
330
|
+
if (isActivationKey(key)) {
|
|
331
|
+
event.preventDefault();
|
|
332
|
+
this.activateActiveItem();
|
|
330
333
|
}
|
|
331
334
|
}
|
|
332
335
|
updateSelectedItems() {
|
|
@@ -336,48 +339,120 @@ class Dropdown extends LitElement {
|
|
|
336
339
|
const style = last.getBoundingClientRect();
|
|
337
340
|
return last.offsetTop + style.height;
|
|
338
341
|
}
|
|
339
|
-
closeCalciteDropdown(
|
|
342
|
+
closeCalciteDropdown() {
|
|
340
343
|
this.open = false;
|
|
341
|
-
|
|
342
|
-
focusElement(this.triggerEls[0]);
|
|
343
|
-
}
|
|
344
|
+
this.setActiveItemByIndex(-1);
|
|
344
345
|
}
|
|
345
|
-
async
|
|
346
|
-
const
|
|
347
|
-
const target =
|
|
346
|
+
async setInitialActiveItem() {
|
|
347
|
+
const traversableItems = this.getTraversableItems();
|
|
348
|
+
const target = this.focusLastDropdownItem ? traversableItems.at(-1) : traversableItems[0];
|
|
348
349
|
this.focusLastDropdownItem = false;
|
|
350
|
+
if (!target) {
|
|
351
|
+
this.setActiveItemByIndex(-1);
|
|
352
|
+
return;
|
|
353
|
+
}
|
|
354
|
+
const targetIndex = traversableItems.findIndex((item) => item === target);
|
|
355
|
+
this.setActiveItemByIndex(targetIndex);
|
|
356
|
+
await this.scrollActiveItemIntoView(target);
|
|
357
|
+
}
|
|
358
|
+
syncActiveItemFromTraversableItems() {
|
|
359
|
+
const traversableItems = this.getTraversableItems();
|
|
360
|
+
if (!traversableItems.length) {
|
|
361
|
+
this.setActiveItemByIndex(-1);
|
|
362
|
+
return;
|
|
363
|
+
}
|
|
364
|
+
if (this.activeItemIndex < 0 || this.activeItemIndex >= traversableItems.length) {
|
|
365
|
+
this.setActiveItemByIndex(0);
|
|
366
|
+
return;
|
|
367
|
+
}
|
|
368
|
+
this.updateActiveDescendantElement(traversableItems[this.activeItemIndex]);
|
|
369
|
+
}
|
|
370
|
+
setActiveItemByIndex(index) {
|
|
371
|
+
this.activeItemIndex = index;
|
|
372
|
+
const traversableItems = this.getTraversableItems();
|
|
373
|
+
const activeItem = index >= 0 ? traversableItems[index] : null;
|
|
374
|
+
this.updateActiveDescendantElement(activeItem);
|
|
375
|
+
}
|
|
376
|
+
updateActiveDescendantElement(activeItem) {
|
|
377
|
+
this.items.forEach((item) => {
|
|
378
|
+
item.activeDescendant = item === activeItem;
|
|
379
|
+
});
|
|
380
|
+
this.activeDescendantElement = activeItem ?? null;
|
|
381
|
+
}
|
|
382
|
+
navigateActiveItem(direction) {
|
|
383
|
+
const traversableItems = this.getTraversableItems();
|
|
384
|
+
if (!traversableItems.length) {
|
|
385
|
+
return;
|
|
386
|
+
}
|
|
387
|
+
const totalItems = traversableItems.length;
|
|
388
|
+
let index = this.activeItemIndex;
|
|
389
|
+
if (index < 0 || index >= totalItems) {
|
|
390
|
+
index = direction === "previous" || direction === "last" ? totalItems - 1 : 0;
|
|
391
|
+
} else if (direction === "next") {
|
|
392
|
+
index = (index + 1) % totalItems;
|
|
393
|
+
} else if (direction === "previous") {
|
|
394
|
+
index = (index - 1 + totalItems) % totalItems;
|
|
395
|
+
} else if (direction === "first") {
|
|
396
|
+
index = 0;
|
|
397
|
+
} else if (direction === "last") {
|
|
398
|
+
index = totalItems - 1;
|
|
399
|
+
}
|
|
400
|
+
const activeItem = traversableItems[index];
|
|
401
|
+
this.setActiveItemByIndex(index);
|
|
402
|
+
void this.scrollActiveItemIntoView(activeItem);
|
|
403
|
+
}
|
|
404
|
+
async scrollActiveItemIntoView(target) {
|
|
349
405
|
if (!target) {
|
|
350
406
|
return;
|
|
351
407
|
}
|
|
352
408
|
await this.updateComplete;
|
|
353
409
|
await nextFrame();
|
|
354
410
|
await nextFrame();
|
|
355
|
-
await focusElement(target);
|
|
356
411
|
target.scrollIntoView({ block: "nearest" });
|
|
357
412
|
}
|
|
358
|
-
|
|
359
|
-
|
|
413
|
+
activateActiveItem() {
|
|
414
|
+
const traversableItems = this.getTraversableItems();
|
|
415
|
+
const activeItem = traversableItems[this.activeItemIndex] || traversableItems[0];
|
|
416
|
+
if (!activeItem) {
|
|
417
|
+
return;
|
|
418
|
+
}
|
|
419
|
+
this.setActiveItemByIndex(traversableItems.findIndex((item) => item === activeItem));
|
|
420
|
+
activeItem.activateItem();
|
|
360
421
|
}
|
|
361
|
-
|
|
362
|
-
this.
|
|
363
|
-
|
|
364
|
-
}
|
|
422
|
+
openHoverDropdown() {
|
|
423
|
+
if (this.open || this.disabled || this.type !== "hover") {
|
|
424
|
+
return;
|
|
425
|
+
}
|
|
426
|
+
this.open = true;
|
|
427
|
+
}
|
|
428
|
+
closeHoverDropdown(event) {
|
|
429
|
+
if (!this.open || this.disabled || this.type !== "hover") {
|
|
430
|
+
return;
|
|
431
|
+
}
|
|
432
|
+
const relatedTarget = event.relatedTarget;
|
|
433
|
+
if (relatedTarget && (this.el.contains(relatedTarget) || this.referenceEl != null && this.referenceEl instanceof HTMLElement && this.referenceEl.contains(relatedTarget))) {
|
|
434
|
+
return;
|
|
435
|
+
}
|
|
436
|
+
this.closeCalciteDropdown();
|
|
437
|
+
}
|
|
438
|
+
toggleClickDropdown() {
|
|
439
|
+
if (this.disabled || this.type !== "click") {
|
|
440
|
+
return;
|
|
441
|
+
}
|
|
442
|
+
this.open = !this.open;
|
|
365
443
|
}
|
|
366
444
|
render() {
|
|
367
|
-
const { open
|
|
368
|
-
return this.interactiveContainer({ disabled: this.disabled, children: html`<div class=${safeClassMap(CSS.triggerContainer)}
|
|
445
|
+
const { open } = this;
|
|
446
|
+
return this.interactiveContainer({ disabled: this.disabled, children: html`${!this.referenceElementType ? html`<div class=${safeClassMap(CSS.triggerContainer)} @click=${this.toggleClickDropdown} @focusin=${this.openHoverDropdown} @focusout=${this.closeHoverDropdown} @keydown=${this.keyDownHandler} ${ref(this.setReferenceEl)}><slot .ariaActiveDescendantElement=${this.activeDescendantElement ?? null} .ariaControlsElements=${this.scrollerEl ? [this.scrollerEl] : void 0} .ariaExpanded=${open} aria-haspopup=menu name=${SLOTS.trigger}></slot></div>` : null}<div class=${safeClassMap({
|
|
369
447
|
[CSS.wrapper]: true,
|
|
370
448
|
[getDimensionClass("width", this.width, this.widthScale)]: !!(this.width || this.widthScale)
|
|
371
|
-
})} popover=manual ${ref(this.setFloatingEl)}><div
|
|
449
|
+
})} .inert=${!open} popover=manual ${ref(this.setFloatingEl)}><div .ariaLabelledByElements=${this.referenceEl instanceof HTMLElement ? [this.referenceEl] : void 0} class=${safeClassMap({
|
|
372
450
|
[CSS.content]: true,
|
|
373
451
|
[FloatingCSS.animation]: true,
|
|
374
452
|
[FloatingCSS.animationActive]: open
|
|
375
|
-
})}
|
|
453
|
+
})} role=menu ${ref(this.setScrollerAndTransitionEl)}><slot @slotchange=${this.updateGroups}></slot></div></div>` });
|
|
376
454
|
}
|
|
377
455
|
}
|
|
378
|
-
__decorateClass([
|
|
379
|
-
queryAssignedElements({ slot: SLOTS.trigger })
|
|
380
|
-
], Dropdown.prototype, "triggerEls");
|
|
381
456
|
customElement("calcite-dropdown", Dropdown);
|
|
382
457
|
export {
|
|
383
458
|
Dropdown
|
|
@@ -6,7 +6,7 @@ import type { IconName } from "../calcite-icon/interfaces.js";
|
|
|
6
6
|
/**
|
|
7
7
|
* @cssproperty [--calcite-dropdown-item-background-color-hover] - Specifies the component's background color when hovered.
|
|
8
8
|
* @cssproperty [--calcite-dropdown-item-background-color-press] - Specifies the component's background color when `selected` or active.
|
|
9
|
-
* @cssproperty [--calcite-dropdown-item-icon-color-hover] - [Deprecated] Specifies the color of the component's selection icon when hovered.
|
|
9
|
+
* @cssproperty [--calcite-dropdown-item-icon-color-hover] - [Deprecated] in v5.0.0, removal target v6.0.0 - Specifies the color of the component's selection icon when hovered.
|
|
10
10
|
* @cssproperty [--calcite-dropdown-item-icon-color-press] - Specifies the color of the component's selection icon when `selected` or active.
|
|
11
11
|
* @cssproperty [--calcite-dropdown-item-text-color-press] - Specifies the component's text color when `selected` or active.
|
|
12
12
|
* @cssproperty [--calcite-dropdown-item-text-color] - Specifies the component's text color.
|
|
@@ -47,7 +47,7 @@ export abstract class DropdownItem extends LitElement {
|
|
|
47
47
|
* Sets focus on the component.
|
|
48
48
|
*
|
|
49
49
|
* @param options - When specified an optional object customizes the component's focusing process. When `preventScroll` is `true`, scrolling will not occur on the component.
|
|
50
|
-
* @
|
|
50
|
+
* @see [MDN - focus(options)](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/focus#options)
|
|
51
51
|
*/
|
|
52
52
|
setFocus(options?: FocusOptions): Promise<void>;
|
|
53
53
|
/** Fires when the component is selected. */
|
|
@@ -8,7 +8,7 @@ import { g as getIconScale } from "../../chunks/component.js";
|
|
|
8
8
|
import { u as useSetFocus } from "../../chunks/useSetFocus.js";
|
|
9
9
|
import { u as useInteractive } from "../../chunks/useInteractive.js";
|
|
10
10
|
import { C as CSS, I as ICONS } from "../../chunks/resources7.js";
|
|
11
|
-
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{position:relative;display:flex;flex-grow:1;align-items:center;outline:2px solid transparent;outline-offset:2px}.container{position:relative;display:flex;flex-grow:1;cursor:pointer;align-items:center;text-decoration-line:none;color:var(--calcite-dropdown-item-text-color, var(--calcite-color-text-1));text-align:start}.container a{outline:none;position:relative;display:flex;flex-grow:1;cursor:pointer;align-items:center;text-decoration-line:none;color:var(--calcite-dropdown-item-text-color, var(--calcite-color-text-1))}.content{flex:1 1 auto}.icon{position:relative;opacity:0;transition-timing-function:cubic-bezier(.4,0,.2,1);transform:scale(.9)}.icon--start,.icon--end{--calcite-icon-color: var(--calcite-dropdown-item-text-color, var(--calcite-color-text-3))}:host([scale=s]) .container{padding-block:.25rem;padding-inline:.5rem;font-size:var(--calcite-font-size-relative-sm);line-height:var(--calcite-font-line-height-sm)}:host([scale=s]) .icon,:host([scale=s]) .icon--start{padding-inline-end:var(--calcite-spacing-sm)}:host([scale=s]) .icon--end{padding-inline-start:var(--calcite-spacing-sm)}:host([scale=m]) .container{padding-block:.5rem;padding-inline:.75rem;font-size:var(--calcite-font-size-relative-base);line-height:var(--calcite-font-line-height-base)}:host([scale=m]) .icon,:host([scale=m]) .icon--start{padding-inline-end:var(--calcite-spacing-md)}:host([scale=m]) .icon--end{padding-inline-start:var(--calcite-spacing-md)}:host([scale=l]) .container{padding-block
|
|
11
|
+
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{position:relative;display:flex;flex-grow:1;align-items:center;outline:2px solid transparent;outline-offset:2px}.container{position:relative;display:flex;flex-grow:1;cursor:pointer;align-items:center;text-decoration-line:none;color:var(--calcite-dropdown-item-text-color, var(--calcite-color-text-1));text-align:start}.container a{outline:none;position:relative;display:flex;flex-grow:1;cursor:pointer;align-items:center;text-decoration-line:none;color:var(--calcite-dropdown-item-text-color, var(--calcite-color-text-1))}.content{flex:1 1 auto}.icon{position:relative;opacity:0;transition-timing-function:cubic-bezier(.4,0,.2,1);transform:scale(.9)}.icon--start,.icon--end{--calcite-icon-color: var(--calcite-dropdown-item-text-color, var(--calcite-color-text-3))}:host([scale=s]) .container{padding-block:.25rem;padding-inline:.5rem;font-size:var(--calcite-font-size-relative-sm);line-height:var(--calcite-font-line-height-sm)}:host([scale=s]) .icon,:host([scale=s]) .icon--start{padding-inline-end:var(--calcite-spacing-sm)}:host([scale=s]) .icon--end{padding-inline-start:var(--calcite-spacing-sm)}:host([scale=m]) .container{padding-block:.5rem;padding-inline:.75rem;font-size:var(--calcite-font-size-relative-base);line-height:var(--calcite-font-line-height-base)}:host([scale=m]) .icon,:host([scale=m]) .icon--start{padding-inline-end:var(--calcite-spacing-md)}:host([scale=m]) .icon--end{padding-inline-start:var(--calcite-spacing-md)}:host([scale=l]) .container{padding-block:var(--calcite-space-sm-plus);padding-inline:1rem;font-size:var(--calcite-font-size-relative-md);line-height:var(--calcite-font-line-height-md)}:host([scale=l]) .icon,:host([scale=l]) .icon--start{padding-inline-end:var(--calcite-spacing-lg)}:host([scale=l]) .icon--end{padding-inline-start:var(--calcite-spacing-lg)}:host(:focus) .container,:host([active-descendant]) .container{text-decoration-line:none;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(:hover:not([disabled])) .container{background-color:var(--calcite-dropdown-item-background-color-hover, var(--calcite-color-foreground-2))}:host(:active:not([disabled])) .container{background-color:var(--calcite-dropdown-item-background-color-press, var(--calcite-color-foreground-3))}:host(:hover:not([disabled])) .container,:host(:active:not([disabled])) .container{text-decoration-line:none;color:var(--calcite-dropdown-item-text-color-press, var(--calcite-color-text-1))}:host(:hover:not([disabled])) .icon--start,:host(:hover:not([disabled])) .icon--end,:host(:active:not([disabled])) .icon--start,:host(:active:not([disabled])) .icon--end{--calcite-icon-color: var(--calcite-dropdown-item-text-color-press, var(--calcite-color-text-1))}:host(:hover:not([disabled])) .link,:host(:active:not([disabled])) .link{color:var(--calcite-dropdown-item-text-color-press, var(--calcite-color-text-1))}:host([selected]) .container:not(.container--none-selection),:host([selected]) .link{font-weight:var(--calcite-font-weight-medium);--calcite-internal-dropdown-item-text-color: var( --calcite-dropdown-item-text-color-press, var(--calcite-color-text-1) );color:var(--calcite-internal-dropdown-item-text-color)}:host([selected]) .container:not(.container--none-selection) .icon,:host([selected]) .link .icon{--calcite-icon-color: var(--calcite-dropdown-item-icon-color-press, var(--calcite-color-brand))}:host([selected]) .container:not(.container--none-selection) .icon--start,:host([selected]) .container:not(.container--none-selection) .icon--end,:host([selected]) .link .icon--start,:host([selected]) .link .icon--end{--calcite-icon-color: var(--calcite-internal-dropdown-item-text-color)}:host(:hover:not([disabled])) .icon{--calcite-icon-color: var(--calcite-dropdown-item-icon-color-hover)}:host([selected]) .icon{opacity:1}:host([hidden]){display:none}[hidden]{display:none}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}`;
|
|
12
12
|
class DropdownItem extends LitElement {
|
|
13
13
|
constructor() {
|
|
14
14
|
super();
|
|
@@ -16,19 +16,17 @@ class DropdownItem extends LitElement {
|
|
|
16
16
|
this.focusSetter = useSetFocus()(this);
|
|
17
17
|
this.interactiveContainer = useInteractive(this);
|
|
18
18
|
this.disabled = false;
|
|
19
|
+
this.activeDescendant = false;
|
|
19
20
|
this.scale = "m";
|
|
20
21
|
this.selected = false;
|
|
21
22
|
this.selectionMode = "single";
|
|
22
23
|
this.calciteDropdownItemSelect = createEvent({ cancelable: false });
|
|
23
|
-
this.calciteInternalDropdownCloseRequest = createEvent({ cancelable: false });
|
|
24
|
-
this.calciteInternalDropdownItemKeyEvent = createEvent({ cancelable: false });
|
|
25
24
|
this.calciteInternalDropdownItemSelect = createEvent({ cancelable: false });
|
|
26
25
|
this.listen("click", this.onClick);
|
|
27
|
-
this.listen("keydown", this.keyDownHandler);
|
|
28
26
|
this.listenOn(document.body, "calciteInternalDropdownItemChange", this.updateActiveItemOnChange);
|
|
29
27
|
}
|
|
30
28
|
static {
|
|
31
|
-
this.properties = { disabled: [7, {}, { reflect: true, type: Boolean }], href: [3, {}, { reflect: true }], iconEnd: [3, { type: String }, { reflect: true }], iconFlipRtl: [3, {}, { reflect: true }], iconStart: [3, { type: String }, { reflect: true }], label: 1, rel: [3, {}, { reflect: true }], scale: [3, {}, { reflect: true }], selected: [7, {}, { reflect: true, type: Boolean }], selectionMode: 1, target: [3, {}, { reflect: true }] };
|
|
29
|
+
this.properties = { disabled: [7, {}, { reflect: true, type: Boolean }], activeDescendant: [7, {}, { reflect: true, type: Boolean }], href: [3, {}, { reflect: true }], iconEnd: [3, { type: String }, { reflect: true }], iconFlipRtl: [3, {}, { reflect: true }], iconStart: [3, { type: String }, { reflect: true }], label: 1, rel: [3, {}, { reflect: true }], scale: [3, {}, { reflect: true }], selected: [7, {}, { reflect: true, type: Boolean }], selectionMode: 1, target: [3, {}, { reflect: true }] };
|
|
32
30
|
}
|
|
33
31
|
static {
|
|
34
32
|
this.styles = styles;
|
|
@@ -36,6 +34,16 @@ class DropdownItem extends LitElement {
|
|
|
36
34
|
async setFocus(options) {
|
|
37
35
|
return this.focusSetter(() => this.el, options);
|
|
38
36
|
}
|
|
37
|
+
async activateItem() {
|
|
38
|
+
if (this.disabled) {
|
|
39
|
+
return;
|
|
40
|
+
}
|
|
41
|
+
if (this.href) {
|
|
42
|
+
this.childLinkRef.value?.click();
|
|
43
|
+
return;
|
|
44
|
+
}
|
|
45
|
+
this.emitRequestedItem();
|
|
46
|
+
}
|
|
39
47
|
connectedCallback() {
|
|
40
48
|
super.connectedCallback();
|
|
41
49
|
this.initialize();
|
|
@@ -46,32 +54,6 @@ class DropdownItem extends LitElement {
|
|
|
46
54
|
onClick() {
|
|
47
55
|
this.emitRequestedItem();
|
|
48
56
|
}
|
|
49
|
-
keyDownHandler(event) {
|
|
50
|
-
switch (event.key) {
|
|
51
|
-
case " ":
|
|
52
|
-
case "Enter":
|
|
53
|
-
this.emitRequestedItem();
|
|
54
|
-
if (this.href) {
|
|
55
|
-
this.childLinkRef.value.click();
|
|
56
|
-
}
|
|
57
|
-
event.preventDefault();
|
|
58
|
-
break;
|
|
59
|
-
case "Escape":
|
|
60
|
-
this.calciteInternalDropdownCloseRequest.emit();
|
|
61
|
-
event.preventDefault();
|
|
62
|
-
break;
|
|
63
|
-
case "Tab":
|
|
64
|
-
this.calciteInternalDropdownItemKeyEvent.emit({ keyboardEvent: event });
|
|
65
|
-
break;
|
|
66
|
-
case "ArrowUp":
|
|
67
|
-
case "ArrowDown":
|
|
68
|
-
case "Home":
|
|
69
|
-
case "End":
|
|
70
|
-
event.preventDefault();
|
|
71
|
-
this.calciteInternalDropdownItemKeyEvent.emit({ keyboardEvent: event });
|
|
72
|
-
break;
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
57
|
updateActiveItemOnChange(event) {
|
|
76
58
|
const parentEmittedChange = event.composedPath().includes(this.parentDropdownGroupEl);
|
|
77
59
|
if (parentEmittedChange) {
|
|
@@ -126,7 +108,7 @@ class DropdownItem extends LitElement {
|
|
|
126
108
|
this.el.ariaChecked = itemAria;
|
|
127
109
|
this.el.ariaLabel = !href ? label : "";
|
|
128
110
|
this.el.role = itemRole;
|
|
129
|
-
setAttribute(this.el, "tabIndex",
|
|
111
|
+
setAttribute(this.el, "tabIndex", -1);
|
|
130
112
|
return this.interactiveContainer({ disabled, children: html`<div class=${safeClassMap({
|
|
131
113
|
[CSS.container]: true,
|
|
132
114
|
[CSS.containerNone]: selectionMode === "none"
|
|
@@ -64,7 +64,7 @@ export abstract class Fab extends LitElement {
|
|
|
64
64
|
* Sets focus on the component.
|
|
65
65
|
*
|
|
66
66
|
* @param options - When specified an optional object customizes the component's focusing process. When `preventScroll` is `true`, scrolling will not occur on the component.
|
|
67
|
-
* @
|
|
67
|
+
* @see [MDN - focus(options)](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/focus#options)
|
|
68
68
|
*/
|
|
69
69
|
setFocus(options?: FocusOptions): Promise<void>;
|
|
70
70
|
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
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
|
-
import { LitElement,
|
|
5
|
+
import { LitElement, nothing, safeClassMap } from "@arcgis/lumina";
|
|
6
6
|
import { u as useSetFocus } from "../../chunks/useSetFocus.js";
|
|
7
7
|
import { u as useInteractive } from "../../chunks/useInteractive.js";
|
|
8
8
|
const CSS = {
|
|
@@ -11,7 +11,7 @@ const CSS = {
|
|
|
11
11
|
const ICONS = {
|
|
12
12
|
plus: "plus"
|
|
13
13
|
};
|
|
14
|
-
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:flex;background-color:transparent}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}calcite-button{--calcite-fab-shadow-internal:
|
|
14
|
+
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:flex;background-color:transparent}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}calcite-button{--calcite-fab-shadow-internal: var(--calcite-shadow-md);box-shadow:var(--calcite-fab-shadow, var(--calcite-fab-shadow-internal));--calcite-button-background-color: var(--calcite-fab-background-color);--calcite-button-border-color: var(--calcite-fab-border-color);--calcite-button-corner-radius: var(--calcite-fab-corner-radius);--calcite-button-text-color: var(--calcite-fab-text-color);--calcite-button-loader-color: var(--calcite-fab-loader-color)}:host([hidden]){display:none}[hidden]{display:none}`;
|
|
15
15
|
class Fab extends LitElement {
|
|
16
16
|
constructor() {
|
|
17
17
|
super(...arguments);
|
|
@@ -66,7 +66,7 @@ export abstract class Filter extends LitElement {
|
|
|
66
66
|
* Sets focus on the component.
|
|
67
67
|
*
|
|
68
68
|
* @param options - When specified an optional object customizes the component's focusing process. When `preventScroll` is `true`, scrolling will not occur on the component.
|
|
69
|
-
* @
|
|
69
|
+
* @see [MDN - focus(options)](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/focus#options)
|
|
70
70
|
*/
|
|
71
71
|
setFocus(options?: FocusOptions): Promise<void>;
|
|
72
72
|
/** Fires when the filter text changes. */
|
|
@@ -19,7 +19,7 @@ export abstract class Flow extends LitElement {
|
|
|
19
19
|
*
|
|
20
20
|
* @param options - When specified an optional object customizes the component's focusing process. When `preventScroll` is `true`, scrolling will not occur on the component.
|
|
21
21
|
* @returns Promise<void>
|
|
22
|
-
* @
|
|
22
|
+
* @see [MDN - focus(options)](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/focus#options)
|
|
23
23
|
*/
|
|
24
24
|
setFocus(options?: FocusOptions): Promise<void>;
|
|
25
25
|
}
|