@esri/calcite-components 5.1.0-next.4 → 5.1.0-next.40
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/25HY22XA.js +2 -0
- package/dist/cdn/2APTJSPF.js +2 -0
- package/dist/cdn/2J3GTLF3.js +2 -0
- package/dist/cdn/2SHDDQN7.js +2 -0
- package/dist/cdn/{MJCRT7H4.js → 2YN42GGZ.js} +1 -1
- package/dist/cdn/{IMOAPVVW.js → 343TIEND.js} +1 -1
- package/dist/cdn/{RROGXGP5.js → 3ENB4NB6.js} +1 -1
- package/dist/cdn/3TSVKHNF.js +2 -0
- package/dist/cdn/4BQKNTG6.js +2 -0
- package/dist/cdn/4DUM6L7R.js +2 -0
- package/dist/cdn/4FANAYQE.js +2 -0
- package/dist/cdn/{LGKOEBZ4.js → 4KMYRWTU.js} +1 -1
- package/dist/cdn/{HCJDTU7F.js → 4TH5DLDN.js} +1 -1
- package/dist/cdn/{Z22BRBT4.js → 53IHUARV.js} +1 -1
- package/dist/cdn/{VLGFWPBL.js → 57VOL2FQ.js} +1 -1
- package/dist/cdn/{A22XLAKZ.js → 5L3WL4VL.js} +3 -3
- package/dist/cdn/{ZZNRLKQQ.js → 5NPVZG4Z.js} +1 -1
- package/dist/cdn/5Y6YWMMA.js +2 -0
- package/dist/cdn/{HRUVPNCI.js → 6AMXTUET.js} +1 -1
- package/dist/cdn/6BOT2RN6.js +2 -0
- package/dist/cdn/6DZA2UAF.js +2 -0
- package/dist/cdn/{XDOFVA4S.js → 6ILPIFKN.js} +1 -1
- package/dist/cdn/6JYCVM4M.js +2 -0
- package/dist/cdn/{HYYJZO6T.js → 6WVMZURH.js} +1 -1
- package/dist/cdn/{7B4D4WJ2.js → 6YUU4XZI.js} +1 -1
- package/dist/cdn/6Z4AVLFZ.js +2 -0
- package/dist/cdn/{IOSK2I75.js → 72EGGY2Z.js} +1 -1
- package/dist/cdn/762BQO6H.js +2 -0
- package/dist/cdn/{A4OYPK5D.js → 7Q6P25FS.js} +1 -1
- package/dist/cdn/{CZYFEVKF.js → 7QKULUQN.js} +1 -1
- package/dist/cdn/ABK5HS52.js +2 -0
- package/dist/cdn/{ED2GANBI.js → ADBOBCIS.js} +1 -1
- package/dist/cdn/APORZ42E.js +2 -0
- package/dist/cdn/{3W4NT367.js → BH4ZCVJG.js} +1 -1
- package/dist/cdn/BU5VDSQP.js +2 -0
- package/dist/cdn/BYU6QMLQ.js +2 -0
- package/dist/cdn/{GJE7FY35.js → C3A2E5RX.js} +1 -1
- package/dist/cdn/C5DLWVQD.js +2 -0
- package/dist/cdn/CAQ4T2IG.js +2 -0
- package/dist/cdn/CWVS4R4Z.js +4 -0
- package/dist/cdn/CZ4YVULR.js +2 -0
- package/dist/cdn/{EHIAXJAL.js → DCWL5FUH.js} +1 -1
- package/dist/cdn/DVICI22P.js +2 -0
- package/dist/cdn/{6IZMIAV2.js → DWBLCWMS.js} +1 -1
- package/dist/cdn/{QKUQGG2M.js → E4TRET3J.js} +1 -1
- package/dist/cdn/ENOS3GFQ.js +2 -0
- package/dist/cdn/EP3Q5JF2.js +2 -0
- package/dist/cdn/{DFXECQ6Z.js → ESGEWPZJ.js} +1 -1
- package/dist/cdn/EU7A7BOE.js +2 -0
- package/dist/cdn/EU7PE35Y.js +2 -0
- package/dist/cdn/{LIJYENWJ.js → EWMQCLAJ.js} +1 -1
- package/dist/cdn/F2AZESRV.js +2 -0
- package/dist/cdn/{GZNBU3BV.js → F2JKS4U3.js} +1 -1
- package/dist/cdn/FIPJYD6R.js +2 -0
- package/dist/cdn/FJZ7BDLC.js +2 -0
- package/dist/cdn/GM5CRK4E.js +2 -0
- package/dist/cdn/{QOSBMGOZ.js → HAFLZK3H.js} +1 -1
- package/dist/cdn/HAMDM2HW.js +2 -0
- package/dist/cdn/{SYSNPKVM.js → IFZOUQOZ.js} +1 -1
- package/dist/cdn/IOHX3UTV.js +2 -0
- package/dist/cdn/{BWUA5WU5.js → ISHWK2D4.js} +1 -1
- package/dist/cdn/IVBPPCLT.js +2 -0
- package/dist/cdn/IXJWAGGO.js +2 -0
- package/dist/cdn/{HXVXRVZW.js → IZVSR6XT.js} +1 -1
- package/dist/cdn/{UTFS3HNB.js → JFU4VBGG.js} +1 -1
- package/dist/cdn/JMUG7HPC.js +2 -0
- package/dist/cdn/JRLAOTDU.js +2 -0
- package/dist/cdn/{LHJSBAM5.js → JSRN4WS4.js} +1 -1
- package/dist/cdn/K4CFRJTI.js +2 -0
- package/dist/cdn/{FAHLSHDH.js → KE6N7N7U.js} +1 -1
- package/dist/cdn/{RA4KNUNM.js → KL26IYZY.js} +1 -1
- package/dist/cdn/KNATDYHF.js +2 -0
- package/dist/cdn/{4MFRMO5M.js → KXXIFRGT.js} +1 -1
- package/dist/cdn/L5HIKEWU.js +2 -0
- package/dist/cdn/L6PNQBJN.js +2 -0
- package/dist/cdn/{R6D5F2V7.js → LC72CVO3.js} +1 -1
- package/dist/cdn/LELN5JPY.js +2 -0
- package/dist/cdn/{AYPT6VGV.js → M2UD3N2R.js} +1 -1
- package/dist/cdn/M37TGGY7.js +2 -0
- package/dist/cdn/{XYAZINKS.js → MI7RF44J.js} +1 -1
- package/dist/cdn/MIERF3YB.js +2 -0
- package/dist/cdn/{YQY6DOSF.js → MMIUGDHC.js} +1 -1
- package/dist/cdn/MQA7BZXA.js +2 -0
- package/dist/cdn/MSYHAUDU.js +2 -0
- package/dist/cdn/{3GV45XL7.js → MYDCGCGV.js} +1 -1
- package/dist/cdn/N5YXMXKX.js +2 -0
- package/dist/cdn/{MTNYIXZQ.js → NDOJ7DMN.js} +1 -1
- package/dist/cdn/{F7XISEIT.js → NNUWJV5Y.js} +1 -1
- package/dist/cdn/NP4XZYHH.js +2 -0
- package/dist/cdn/{EW6277QZ.js → O5NPN2NC.js} +1 -1
- package/dist/cdn/OTIHT3RJ.js +2 -0
- package/dist/cdn/OUQWQCX4.js +2 -0
- package/dist/cdn/{WR6QBFCR.js → P3TQR6CW.js} +1 -1
- package/dist/cdn/{5TWM6GKK.js → P46CRADL.js} +1 -1
- package/dist/cdn/{X7JEHH2B.js → PCVC2F65.js} +1 -1
- package/dist/cdn/{7TEW7OYZ.js → PESN4GNZ.js} +1 -1
- package/dist/cdn/{TCAGY7OI.js → PLYNERNK.js} +1 -1
- package/dist/cdn/{7DA7BZM3.js → Q2AAAFVG.js} +1 -1
- package/dist/cdn/QM3SD3PA.js +2 -0
- package/dist/cdn/{5YROPSGB.js → QVTSIICY.js} +1 -1
- package/dist/cdn/{CDTY6WOM.js → R3SLMPTQ.js} +1 -1
- package/dist/cdn/RIOREY3L.js +2 -0
- package/dist/cdn/RPKGQUKY.js +2 -0
- package/dist/cdn/{5WKPS2ZT.js → RUDSYIF2.js} +1 -1
- package/dist/cdn/{RRHN2PDB.js → RUIFQJAH.js} +1 -1
- package/dist/cdn/RYDGNOUH.js +2 -0
- package/dist/cdn/{HXS3PD57.js → S2Y2KBAC.js} +1 -1
- package/dist/cdn/SL5CC77J.js +2 -0
- package/dist/cdn/SMYYAK7D.js +2 -0
- package/dist/cdn/{5HQ3O27G.js → SN2GM7VT.js} +1 -1
- package/dist/cdn/SUTEBG6F.js +2 -0
- package/dist/cdn/T2BDBNM5.js +2 -0
- package/dist/cdn/T67L4AXE.js +2 -0
- package/dist/cdn/T77GTRQ2.js +2 -0
- package/dist/cdn/TL2LER4P.js +2 -0
- package/dist/cdn/TPSHW4M7.js +2 -0
- package/dist/cdn/U65LWUJT.js +2 -0
- package/dist/cdn/U6HSTFHB.js +2 -0
- package/dist/cdn/{AMZPSRIA.js → UDCTSF3X.js} +1 -1
- package/dist/cdn/UNAC5YGP.js +2 -0
- package/dist/cdn/UNC2KJWX.js +2 -0
- package/dist/cdn/{IFHMJCAE.js → V6L5RSXQ.js} +1 -1
- package/dist/cdn/V6VAGY4E.js +2 -0
- package/dist/cdn/VDVTNGYM.js +2 -0
- package/dist/cdn/VWTVHOIX.js +2 -0
- package/dist/cdn/VYQ37P65.js +2 -0
- package/dist/cdn/{TLAXB6HU.js → W656KOHA.js} +1 -1
- package/dist/cdn/{KVSU3DLB.js → W7TMDCFZ.js} +1 -1
- package/dist/cdn/WDFABHQO.js +2 -0
- package/dist/cdn/WKBFZGMH.js +2 -0
- package/dist/cdn/{OVU2NGHU.js → WQLCQIZA.js} +1 -1
- package/dist/cdn/{XLGGANFA.js → WZH7XMRX.js} +1 -1
- package/dist/cdn/XFBBTAFB.js +2 -0
- package/dist/cdn/XU3JRXS5.js +2 -0
- package/dist/cdn/XXSWFYQB.js +2 -0
- package/dist/cdn/{CAAZHUX4.js → XYC42R3U.js} +1 -1
- package/dist/cdn/{KKH2HVQW.js → Y43XTIHW.js} +1 -1
- package/dist/cdn/{Z3IVC2AV.js → YHGIFWX4.js} +1 -1
- package/dist/cdn/{ZIOXZBYF.js → YOAB4Z22.js} +1 -1
- package/dist/cdn/{MXRMT4RB.js → YX3WCLZI.js} +1 -1
- package/dist/cdn/ZCKFY2WU.js +2 -0
- package/dist/cdn/{QBLAE2O5.js → ZFE7EHX7.js} +1 -1
- package/dist/cdn/{GM6FZWSL.js → ZJFP46OV.js} +1 -1
- package/dist/cdn/ZPTH57OQ.js +2 -0
- package/dist/cdn/ZV2BUMQX.js +2 -0
- 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/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/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 +1 -1
- package/dist/chunks/ClearButton.js +16 -0
- package/dist/chunks/ExpandToggle.js +4 -5
- package/dist/chunks/Heading.js +3 -3
- package/dist/chunks/dom.js +63 -49
- package/dist/chunks/floating-ui.js +3 -6
- package/dist/chunks/label.js +1 -1
- package/dist/chunks/locale.js +29 -12
- package/dist/chunks/manager.js +505 -0
- package/dist/chunks/openCloseComponent.js +1 -1
- 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 +22 -1
- package/dist/chunks/useForm.js +294 -0
- package/dist/chunks/useFormTrigger.js +25 -0
- package/dist/chunks/useSetFocus.js +1 -1
- package/dist/chunks/{sortableComponent.js → useSortable.js} +70 -44
- package/dist/chunks/utils2.js +1 -1
- package/dist/components/calcite-accordion-item/customElement.d.ts +6 -6
- package/dist/components/calcite-accordion-item/customElement.js +4 -3
- package/dist/components/calcite-action/customElement.d.ts +14 -12
- package/dist/components/calcite-action/customElement.js +8 -14
- package/dist/components/calcite-action-bar/customElement.d.ts +12 -3
- package/dist/components/calcite-action-bar/customElement.js +43 -15
- package/dist/components/calcite-action-group/customElement.d.ts +6 -6
- 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 +5 -3
- package/dist/components/calcite-alert/customElement.d.ts +2 -2
- package/dist/components/calcite-alert/customElement.js +2 -2
- package/dist/components/calcite-autocomplete/customElement.d.ts +16 -13
- package/dist/components/calcite-autocomplete/customElement.js +23 -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-avatar/customElement.js +1 -1
- package/dist/components/calcite-block/customElement.d.ts +5 -5
- package/dist/components/calcite-block/customElement.js +2 -2
- package/dist/components/calcite-block-group/customElement.d.ts +1 -1
- package/dist/components/calcite-block-group/customElement.js +5 -12
- 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 +11 -23
- package/dist/components/calcite-card/customElement.d.ts +4 -4
- 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 +1 -1
- package/dist/components/calcite-carousel/customElement.js +27 -25
- package/dist/components/calcite-checkbox/customElement.d.ts +4 -5
- package/dist/components/calcite-checkbox/customElement.js +10 -23
- package/dist/components/calcite-chip/customElement.d.ts +2 -2
- package/dist/components/calcite-chip/customElement.js +2 -2
- package/dist/components/calcite-chip-group/customElement.d.ts +1 -1
- package/dist/components/calcite-chip-group/customElement.js +1 -1
- package/dist/components/calcite-color-picker/customElement.d.ts +2 -2
- package/dist/components/calcite-color-picker/customElement.js +4 -2
- package/dist/components/calcite-color-picker-hex-input/customElement.d.ts +1 -1
- package/dist/components/calcite-color-picker-swatch/customElement.d.ts +1 -1
- package/dist/components/calcite-color-picker-swatch/customElement.js +1 -1
- package/dist/components/calcite-combobox/customElement.d.ts +16 -6
- package/dist/components/calcite-combobox/customElement.js +189 -106
- 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 +10 -4
- package/dist/components/calcite-date-picker/customElement.d.ts +1 -1
- package/dist/components/calcite-date-picker-day/customElement.d.ts +1 -1
- package/dist/components/calcite-date-picker-month/customElement.js +1 -1
- package/dist/components/calcite-date-picker-month-header/customElement.js +1 -1
- package/dist/components/calcite-dialog/customElement.d.ts +8 -6
- package/dist/components/calcite-dialog/customElement.js +5 -3
- package/dist/components/calcite-dropdown/customElement.d.ts +15 -5
- package/dist/components/calcite-dropdown/customElement.js +168 -90
- 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-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 +9 -7
- package/dist/components/calcite-flow-item/customElement.js +6 -4
- package/dist/components/calcite-handle/customElement.d.ts +1 -1
- 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.d.ts +1 -1
- 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 +30 -52
- 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 +34 -28
- 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 +13 -14
- package/dist/components/calcite-input-number/customElement.js +26 -51
- 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 +20 -44
- 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 +14 -25
- 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-link/customElement.d.ts +9 -9
- package/dist/components/calcite-link/customElement.js +31 -25
- package/dist/components/calcite-list/customElement.d.ts +1 -1
- package/dist/components/calcite-list/customElement.js +30 -11
- 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 +6 -4
- package/dist/components/calcite-list-item-group/customElement.js +1 -1
- package/dist/components/calcite-loader/customElement.d.ts +1 -1
- package/dist/components/calcite-menu/customElement.d.ts +1 -1
- package/dist/components/calcite-menu/customElement.js +2 -2
- package/dist/components/calcite-menu-item/customElement.d.ts +3 -3
- 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 +4 -8
- package/dist/components/calcite-navigation/customElement.d.ts +2 -2
- package/dist/components/calcite-navigation-logo/customElement.d.ts +3 -3
- package/dist/components/calcite-navigation-user/customElement.d.ts +1 -1
- package/dist/components/calcite-notice/customElement.d.ts +3 -3
- package/dist/components/calcite-notice/customElement.js +2 -2
- 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 +11 -9
- 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 +14 -175
- package/dist/components/calcite-progress/customElement.js +3 -2
- package/dist/components/calcite-radio-button/customElement.d.ts +1 -1
- package/dist/components/calcite-radio-button/customElement.js +173 -5
- 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-scrim/customElement.js +1 -1
- package/dist/components/calcite-segmented-control/customElement.d.ts +3 -4
- package/dist/components/calcite-segmented-control/customElement.js +13 -22
- package/dist/components/calcite-segmented-control-item/customElement.js +2 -2
- package/dist/components/calcite-select/customElement.d.ts +3 -4
- package/dist/components/calcite-select/customElement.js +8 -19
- package/dist/components/calcite-sheet/customElement.d.ts +2 -2
- package/dist/components/calcite-sheet/customElement.js +10 -11
- package/dist/components/calcite-shell/customElement.js +1 -1
- package/dist/components/calcite-shell-panel/customElement.d.ts +2 -2
- package/dist/components/calcite-shell-panel/customElement.js +11 -5
- 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 +4 -4
- 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 +30 -43
- package/dist/components/calcite-stepper-item/customElement.d.ts +1 -1
- package/dist/components/calcite-stepper-item/customElement.js +3 -9
- package/dist/components/calcite-swatch/customElement.d.ts +1 -1
- package/dist/components/calcite-swatch-group/customElement.js +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 +2 -2
- package/dist/components/calcite-tab-nav/customElement.js +4 -2
- package/dist/components/calcite-tab-title/customElement.js +6 -4
- package/dist/components/calcite-table/customElement.js +1 -1
- package/dist/components/calcite-table-cell/customElement.d.ts +2 -2
- package/dist/components/calcite-table-cell/customElement.js +3 -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 +5 -4
- package/dist/components/calcite-tooltip/customElement.d.ts +15 -2
- package/dist/components/calcite-tooltip/customElement.js +27 -315
- package/dist/components/calcite-tree/customElement.js +1 -1
- package/dist/components/calcite-tree-item/customElement.js +5 -4
- 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 +25 -25
- package/dist/types/lumina.d.ts +6 -6
- package/dist/types/preact.d.ts +6 -6
- package/dist/types/react.d.ts +6 -6
- package/dist/types/stencil.d.ts +6 -6
- package/package.json +14 -13
- package/dist/cdn/256EMMKX.js +0 -2
- package/dist/cdn/2ZJ5ADD2.js +0 -2
- package/dist/cdn/37APBABQ.js +0 -2
- package/dist/cdn/3OIE2RR5.js +0 -2
- package/dist/cdn/3TCEXRVB.js +0 -2
- package/dist/cdn/43T3HPVW.js +0 -2
- package/dist/cdn/4ET37OQN.js +0 -2
- package/dist/cdn/4SJVPWEI.js +0 -2
- package/dist/cdn/6NGWODBG.js +0 -2
- package/dist/cdn/7CLOFSLV.js +0 -2
- package/dist/cdn/7CZHE7FZ.js +0 -2
- package/dist/cdn/7KCC74EE.js +0 -2
- package/dist/cdn/7WPF3NTF.js +0 -2
- package/dist/cdn/CPDXUV3S.js +0 -2
- package/dist/cdn/EIFNZZAD.js +0 -2
- package/dist/cdn/F7SGO63N.js +0 -2
- package/dist/cdn/FAOX7WLQ.js +0 -2
- package/dist/cdn/FCNCDBSI.js +0 -2
- package/dist/cdn/FDGUUC3D.js +0 -2
- package/dist/cdn/FRI4RPRX.js +0 -2
- package/dist/cdn/G6R56WT6.js +0 -2
- package/dist/cdn/GAUJK4Z7.js +0 -2
- package/dist/cdn/GDTRICJF.js +0 -2
- package/dist/cdn/GFZYTB3O.js +0 -2
- package/dist/cdn/GW7IPUQS.js +0 -2
- package/dist/cdn/HBVQ77SB.js +0 -2
- package/dist/cdn/HD23H6LX.js +0 -2
- package/dist/cdn/HVBNJRAQ.js +0 -2
- package/dist/cdn/I6CQ5UW5.js +0 -2
- package/dist/cdn/ILES2J66.js +0 -2
- package/dist/cdn/IR6Z2XSF.js +0 -2
- package/dist/cdn/IUAHSZQ6.js +0 -2
- package/dist/cdn/JKLX623E.js +0 -2
- package/dist/cdn/JLB2FYLL.js +0 -2
- package/dist/cdn/JRCEHRYP.js +0 -2
- package/dist/cdn/KNDQJ2XX.js +0 -2
- package/dist/cdn/L6F7C3O7.js +0 -2
- package/dist/cdn/LIZ5IMMJ.js +0 -2
- package/dist/cdn/LR57FDVO.js +0 -2
- package/dist/cdn/LRL6N22U.js +0 -2
- package/dist/cdn/LYKD5N65.js +0 -2
- package/dist/cdn/MASQZEFU.js +0 -2
- package/dist/cdn/MAXAPKJ5.js +0 -2
- package/dist/cdn/MQPFYNQR.js +0 -2
- package/dist/cdn/MUGKSK5F.js +0 -2
- package/dist/cdn/N6QRZM7N.js +0 -2
- package/dist/cdn/NQEVKT6K.js +0 -2
- package/dist/cdn/OS7NHPEF.js +0 -2
- package/dist/cdn/P7RXOG72.js +0 -2
- package/dist/cdn/P7U46JDU.js +0 -2
- package/dist/cdn/PBMFDSRI.js +0 -2
- package/dist/cdn/PS64W4X6.js +0 -2
- package/dist/cdn/Q52SIZ3L.js +0 -2
- package/dist/cdn/Q7WYXKFZ.js +0 -2
- package/dist/cdn/R3EE76WN.js +0 -2
- package/dist/cdn/R6YSSNOG.js +0 -2
- package/dist/cdn/RSCA2AM5.js +0 -2
- package/dist/cdn/S22OVJTO.js +0 -3
- package/dist/cdn/SBPWZDAB.js +0 -2
- package/dist/cdn/SFEXJ2YW.js +0 -2
- package/dist/cdn/SXVCUXNL.js +0 -2
- package/dist/cdn/TPXLAPIE.js +0 -2
- package/dist/cdn/TSZAQNPK.js +0 -2
- package/dist/cdn/U6LKEFFT.js +0 -2
- package/dist/cdn/UAADJQTQ.js +0 -2
- package/dist/cdn/ULBA6IRN.js +0 -2
- package/dist/cdn/UOIMVKXE.js +0 -2
- package/dist/cdn/V4KATS7H.js +0 -2
- package/dist/cdn/WAC3IAWB.js +0 -2
- package/dist/cdn/WJXZ7BPV.js +0 -2
- package/dist/cdn/XSSG2WBN.js +0 -2
- package/dist/cdn/YHGC7HRA.js +0 -2
- package/dist/cdn/YOYLPMEA.js +0 -2
- package/dist/cdn/YUJ33VWR.js +0 -2
- package/dist/cdn/Z53AVC5H.js +0 -2
- package/dist/cdn/ZQLGBHLZ.js +0 -2
- package/dist/cdn/ZXUITROT.js +0 -2
- package/dist/chunks/form.js +0 -268
- package/dist/chunks/input.js +0 -30
- package/dist/utils/form.d.ts +0 -3
- package/dist/utils/sortableComponent.d.ts +0 -7
|
@@ -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
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 {
|
|
7
|
-
import {
|
|
6
|
+
import { useDirection } from "@arcgis/lumina/controllers";
|
|
7
|
+
import { u as nextFrame } from "../../chunks/dom.js";
|
|
8
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";
|
|
9
|
-
import { g as guid } from "../../chunks/guid.js";
|
|
10
9
|
import { i as isActivationKey } from "../../chunks/key.js";
|
|
11
10
|
import { c as createObserver, u as updateRefObserver } from "../../chunks/observers.js";
|
|
12
11
|
import { t as toggleOpenClose } from "../../chunks/openCloseComponent.js";
|
|
@@ -14,6 +13,7 @@ import { g as getDimensionClass } from "../../chunks/dynamicClasses.js";
|
|
|
14
13
|
import { u as useSetFocus } from "../../chunks/useSetFocus.js";
|
|
15
14
|
import { u as useInteractive } from "../../chunks/useInteractive.js";
|
|
16
15
|
import { u as useTopLayer } from "../../chunks/useTopLayer.js";
|
|
16
|
+
import { u as useReferenceElement, r as referenceElementManager } from "../../chunks/manager.js";
|
|
17
17
|
const SLOTS = {
|
|
18
18
|
trigger: "trigger"
|
|
19
19
|
};
|
|
@@ -22,31 +22,21 @@ const CSS = {
|
|
|
22
22
|
wrapper: "wrapper",
|
|
23
23
|
triggerContainer: "trigger-container"
|
|
24
24
|
};
|
|
25
|
-
const idPrefix = "calcite-dropdown";
|
|
26
|
-
const IDS = {
|
|
27
|
-
menuButton: (id) => `${idPrefix}-${id}-menubutton`,
|
|
28
|
-
menu: (id) => `${idPrefix}-${id}-menu`
|
|
29
|
-
};
|
|
30
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}}.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}`;
|
|
31
|
-
|
|
32
|
-
var __decorateClass = (decorators, target, key, kind) => {
|
|
33
|
-
var result = void 0;
|
|
34
|
-
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
35
|
-
if (decorator = decorators[i])
|
|
36
|
-
result = decorator(target, key, result) || result;
|
|
37
|
-
if (result) __defProp(target, key, result);
|
|
38
|
-
return result;
|
|
39
|
-
};
|
|
26
|
+
const manager = referenceElementManager({ click: true, hover: true });
|
|
40
27
|
class Dropdown extends LitElement {
|
|
41
28
|
constructor() {
|
|
42
29
|
super();
|
|
30
|
+
this.referenceElementController = useReferenceElement({ manager })(this);
|
|
31
|
+
this.direction = useDirection();
|
|
43
32
|
this.focusLastDropdownItem = false;
|
|
33
|
+
this.activeItemIndex = -1;
|
|
44
34
|
this.groups = [];
|
|
45
|
-
this.guid = guid();
|
|
46
35
|
this.items = [];
|
|
47
36
|
this.mutationObserver = createObserver("mutation", () => this.updateItems());
|
|
48
37
|
this.transitionProp = "opacity";
|
|
49
38
|
this.resizeObserver = createObserver("resize", (entries) => this.resizeObserverCallback(entries));
|
|
39
|
+
this.onReferenceElementKeyDown = (event) => this.keyDownHandler(event);
|
|
50
40
|
this.focusSetter = useSetFocus()(this);
|
|
51
41
|
this.interactiveContainer = useInteractive(this);
|
|
52
42
|
this.topLayer = useTopLayer({
|
|
@@ -70,15 +60,13 @@ class Dropdown extends LitElement {
|
|
|
70
60
|
this.calciteDropdownOpen = createEvent({ cancelable: false });
|
|
71
61
|
this.calciteDropdownSelect = createEvent({ cancelable: false });
|
|
72
62
|
this.listenOn(window, "click", this.closeCalciteDropdownOnClick);
|
|
73
|
-
this.listen("calciteInternalDropdownCloseRequest", this.closeCalciteDropdownOnEvent);
|
|
74
63
|
this.listenOn(window, "calciteDropdownOpen", this.closeCalciteDropdownOnOpenEvent);
|
|
75
64
|
this.listen("pointerenter", this.pointerEnterHandler);
|
|
76
65
|
this.listen("pointerleave", this.pointerLeaveHandler);
|
|
77
|
-
this.listen("calciteInternalDropdownItemKeyEvent", this.calciteInternalDropdownItemKeyEvent);
|
|
78
66
|
this.listen("calciteInternalDropdownItemSelect", this.handleItemSelect);
|
|
79
67
|
}
|
|
80
68
|
static {
|
|
81
|
-
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 }] };
|
|
82
70
|
}
|
|
83
71
|
static {
|
|
84
72
|
this.shadowRootOptions = { mode: "open", delegatesFocus: true };
|
|
@@ -86,9 +74,13 @@ class Dropdown extends LitElement {
|
|
|
86
74
|
static {
|
|
87
75
|
this.styles = styles;
|
|
88
76
|
}
|
|
77
|
+
get referenceElementType() {
|
|
78
|
+
return this.referenceElement ? this.type : null;
|
|
79
|
+
}
|
|
89
80
|
async reposition(delayed = false) {
|
|
90
81
|
const { filteredFlipPlacements, floatingEl, offsetDistance, offsetSkidding, overlayPositioning, placement, referenceEl } = this;
|
|
91
82
|
return reposition(this, {
|
|
83
|
+
direction: this.direction,
|
|
92
84
|
floatingEl,
|
|
93
85
|
referenceEl,
|
|
94
86
|
offsetDistance,
|
|
@@ -100,7 +92,7 @@ class Dropdown extends LitElement {
|
|
|
100
92
|
}, delayed);
|
|
101
93
|
}
|
|
102
94
|
async setFocus(options) {
|
|
103
|
-
return this.focusSetter(() => this.referenceEl, options);
|
|
95
|
+
return this.focusSetter(() => this.referenceEl instanceof HTMLElement ? this.referenceEl : this.floatingEl, options);
|
|
104
96
|
}
|
|
105
97
|
connectedCallback() {
|
|
106
98
|
super.connectedCallback();
|
|
@@ -128,6 +120,14 @@ class Dropdown extends LitElement {
|
|
|
128
120
|
if (changes.has("scale") && (this.hasUpdated || this.scale !== "m")) {
|
|
129
121
|
this.handlePropsChange();
|
|
130
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
|
+
}
|
|
131
131
|
}
|
|
132
132
|
loaded() {
|
|
133
133
|
this.updateSelectedItems();
|
|
@@ -160,29 +160,25 @@ class Dropdown extends LitElement {
|
|
|
160
160
|
this.updateGroupProps();
|
|
161
161
|
}
|
|
162
162
|
closeCalciteDropdownOnClick(event) {
|
|
163
|
-
if (this.disabled || !this.open || event.composedPath().includes(this.el)) {
|
|
163
|
+
if (this.referenceElementType || this.disabled || !this.open || event.composedPath().includes(this.el)) {
|
|
164
164
|
return;
|
|
165
165
|
}
|
|
166
|
-
this.closeCalciteDropdown(false);
|
|
167
|
-
}
|
|
168
|
-
closeCalciteDropdownOnEvent(event) {
|
|
169
166
|
this.closeCalciteDropdown();
|
|
170
|
-
event.stopPropagation();
|
|
171
167
|
}
|
|
172
168
|
closeCalciteDropdownOnOpenEvent(event) {
|
|
173
|
-
if (event.composedPath().includes(this.el)) {
|
|
169
|
+
if (this.referenceElementType || event.composedPath().includes(this.el)) {
|
|
174
170
|
return;
|
|
175
171
|
}
|
|
176
|
-
this.
|
|
172
|
+
this.closeCalciteDropdown();
|
|
177
173
|
}
|
|
178
174
|
pointerEnterHandler() {
|
|
179
|
-
if (this.disabled || this.type !== "hover") {
|
|
175
|
+
if (this.referenceElementType || this.disabled || this.type !== "hover") {
|
|
180
176
|
return;
|
|
181
177
|
}
|
|
182
|
-
this.
|
|
178
|
+
this.open = true;
|
|
183
179
|
}
|
|
184
180
|
pointerLeaveHandler() {
|
|
185
|
-
if (this.disabled || this.type !== "hover") {
|
|
181
|
+
if (this.referenceElementType || this.disabled || this.type !== "hover") {
|
|
186
182
|
return;
|
|
187
183
|
}
|
|
188
184
|
this.closeCalciteDropdown();
|
|
@@ -190,34 +186,12 @@ class Dropdown extends LitElement {
|
|
|
190
186
|
getTraversableItems() {
|
|
191
187
|
return this.items.filter((item) => !item.disabled && !item.hidden);
|
|
192
188
|
}
|
|
193
|
-
|
|
194
|
-
const { keyboardEvent } = event.detail;
|
|
195
|
-
const target = keyboardEvent.target;
|
|
196
|
-
const traversableItems = this.getTraversableItems();
|
|
197
|
-
switch (keyboardEvent.key) {
|
|
198
|
-
case "Tab":
|
|
199
|
-
this.open = false;
|
|
200
|
-
this.updateTabIndexOfItems(target);
|
|
201
|
-
break;
|
|
202
|
-
case "ArrowDown":
|
|
203
|
-
focusElementInGroup(traversableItems, target, "next");
|
|
204
|
-
break;
|
|
205
|
-
case "ArrowUp":
|
|
206
|
-
focusElementInGroup(traversableItems, target, "previous");
|
|
207
|
-
break;
|
|
208
|
-
case "Home":
|
|
209
|
-
focusElementInGroup(traversableItems, target, "first");
|
|
210
|
-
break;
|
|
211
|
-
case "End":
|
|
212
|
-
focusElementInGroup(traversableItems, target, "last");
|
|
213
|
-
break;
|
|
214
|
-
}
|
|
215
|
-
event.stopPropagation();
|
|
216
|
-
}
|
|
217
|
-
handleItemSelect(event) {
|
|
189
|
+
async handleItemSelect(event) {
|
|
218
190
|
this.updateSelectedItems();
|
|
191
|
+
this.syncActiveItemFromTraversableItems();
|
|
219
192
|
event.stopPropagation();
|
|
220
193
|
this.calciteDropdownSelect.emit();
|
|
194
|
+
await this.setFocus();
|
|
221
195
|
if (!this.closeOnSelectDisabled) {
|
|
222
196
|
this.closeCalciteDropdown();
|
|
223
197
|
}
|
|
@@ -229,6 +203,7 @@ class Dropdown extends LitElement {
|
|
|
229
203
|
updateItems() {
|
|
230
204
|
this.items = this.groups.map((group) => Array.from(group?.querySelectorAll("calcite-dropdown-item"))).reduce((previousValue, currentValue) => [...previousValue, ...currentValue], []);
|
|
231
205
|
this.updateSelectedItems();
|
|
206
|
+
this.syncActiveItemFromTraversableItems();
|
|
232
207
|
this.reposition(true);
|
|
233
208
|
this.items.forEach((item) => item.scale = this.scale);
|
|
234
209
|
}
|
|
@@ -255,7 +230,7 @@ class Dropdown extends LitElement {
|
|
|
255
230
|
}
|
|
256
231
|
setDropdownWidth() {
|
|
257
232
|
const { referenceEl, scrollerEl } = this;
|
|
258
|
-
if (!scrollerEl || !referenceEl) {
|
|
233
|
+
if (!scrollerEl || !(referenceEl instanceof HTMLElement)) {
|
|
259
234
|
return;
|
|
260
235
|
}
|
|
261
236
|
scrollerEl.style.minWidth = `${referenceEl.clientWidth}px`;
|
|
@@ -275,7 +250,7 @@ class Dropdown extends LitElement {
|
|
|
275
250
|
this.transitionEl = el;
|
|
276
251
|
}
|
|
277
252
|
onBeforeOpen() {
|
|
278
|
-
this.
|
|
253
|
+
this.setInitialActiveItem();
|
|
279
254
|
this.calciteDropdownBeforeOpen.emit();
|
|
280
255
|
this.topLayer.show();
|
|
281
256
|
}
|
|
@@ -291,7 +266,9 @@ class Dropdown extends LitElement {
|
|
|
291
266
|
this.topLayer.hide();
|
|
292
267
|
}
|
|
293
268
|
setReferenceEl(el) {
|
|
294
|
-
|
|
269
|
+
const previousReferenceEl = this.referenceEl instanceof HTMLElement ? this.referenceEl : null;
|
|
270
|
+
const nextReferenceEl = el instanceof HTMLElement ? el : null;
|
|
271
|
+
updateRefObserver(this.resizeObserver, previousReferenceEl, nextReferenceEl);
|
|
295
272
|
this.referenceEl = el;
|
|
296
273
|
connectFloatingUI(this);
|
|
297
274
|
}
|
|
@@ -300,30 +277,59 @@ class Dropdown extends LitElement {
|
|
|
300
277
|
connectFloatingUI(this);
|
|
301
278
|
}
|
|
302
279
|
keyDownHandler(event) {
|
|
303
|
-
if (!event.composedPath().includes(this.referenceEl)) {
|
|
280
|
+
if (!(this.referenceEl instanceof HTMLElement) || !event.composedPath().includes(this.referenceEl)) {
|
|
304
281
|
return;
|
|
305
282
|
}
|
|
306
283
|
const { defaultPrevented, key } = event;
|
|
307
284
|
if (defaultPrevented) {
|
|
308
285
|
return;
|
|
309
286
|
}
|
|
310
|
-
if (key === "Escape") {
|
|
287
|
+
if (this.open && key === "Escape") {
|
|
311
288
|
this.closeCalciteDropdown();
|
|
312
289
|
event.preventDefault();
|
|
313
290
|
return;
|
|
314
291
|
}
|
|
315
|
-
if (this.open &&
|
|
316
|
-
this.
|
|
292
|
+
if (!this.open && isActivationKey(key)) {
|
|
293
|
+
this.open = true;
|
|
317
294
|
event.preventDefault();
|
|
318
295
|
return;
|
|
319
296
|
}
|
|
320
|
-
if (
|
|
321
|
-
this.toggleDropdown();
|
|
322
|
-
event.preventDefault();
|
|
323
|
-
} else if (key === "ArrowDown" || key === "ArrowUp") {
|
|
297
|
+
if (!this.open && (key === "ArrowDown" || key === "ArrowUp")) {
|
|
324
298
|
event.preventDefault();
|
|
325
299
|
this.focusLastDropdownItem = key === "ArrowUp";
|
|
326
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();
|
|
327
333
|
}
|
|
328
334
|
}
|
|
329
335
|
updateSelectedItems() {
|
|
@@ -333,48 +339,120 @@ class Dropdown extends LitElement {
|
|
|
333
339
|
const style = last.getBoundingClientRect();
|
|
334
340
|
return last.offsetTop + style.height;
|
|
335
341
|
}
|
|
336
|
-
closeCalciteDropdown(
|
|
342
|
+
closeCalciteDropdown() {
|
|
337
343
|
this.open = false;
|
|
338
|
-
|
|
339
|
-
focusElement(this.triggerEls[0]);
|
|
340
|
-
}
|
|
344
|
+
this.setActiveItemByIndex(-1);
|
|
341
345
|
}
|
|
342
|
-
async
|
|
343
|
-
const
|
|
344
|
-
const target =
|
|
346
|
+
async setInitialActiveItem() {
|
|
347
|
+
const traversableItems = this.getTraversableItems();
|
|
348
|
+
const target = this.focusLastDropdownItem ? traversableItems.at(-1) : traversableItems[0];
|
|
345
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) {
|
|
346
405
|
if (!target) {
|
|
347
406
|
return;
|
|
348
407
|
}
|
|
349
408
|
await this.updateComplete;
|
|
350
409
|
await nextFrame();
|
|
351
410
|
await nextFrame();
|
|
352
|
-
await focusElement(target);
|
|
353
411
|
target.scrollIntoView({ block: "nearest" });
|
|
354
412
|
}
|
|
355
|
-
|
|
356
|
-
|
|
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();
|
|
357
421
|
}
|
|
358
|
-
|
|
359
|
-
this.
|
|
360
|
-
|
|
361
|
-
}
|
|
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;
|
|
362
443
|
}
|
|
363
444
|
render() {
|
|
364
|
-
const { open
|
|
365
|
-
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({
|
|
366
447
|
[CSS.wrapper]: true,
|
|
367
448
|
[getDimensionClass("width", this.width, this.widthScale)]: !!(this.width || this.widthScale)
|
|
368
|
-
})} 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({
|
|
369
450
|
[CSS.content]: true,
|
|
370
451
|
[FloatingCSS.animation]: true,
|
|
371
452
|
[FloatingCSS.animationActive]: open
|
|
372
|
-
})}
|
|
453
|
+
})} role=menu ${ref(this.setScrollerAndTransitionEl)}><slot @slotchange=${this.updateGroups}></slot></div></div>` });
|
|
373
454
|
}
|
|
374
455
|
}
|
|
375
|
-
__decorateClass([
|
|
376
|
-
queryAssignedElements({ slot: SLOTS.trigger })
|
|
377
|
-
], Dropdown.prototype, "triggerEls");
|
|
378
456
|
customElement("calcite-dropdown", Dropdown);
|
|
379
457
|
export {
|
|
380
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
|
}
|
|
@@ -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
|
}
|
|
@@ -6,20 +6,20 @@ import type { Scale } from "../interfaces.js";
|
|
|
6
6
|
import type { IconName } from "../calcite-icon/interfaces.js";
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
|
-
* @cssproperty [--calcite-flow-item-footer-padding] - [Deprecated] Use `--calcite-flow-footer-space` instead. Specifies the padding of the component's footer.
|
|
10
|
-
* @cssproperty [--calcite-flow-item-header-border-block-end] - [Deprecated] Use `--calcite-flow-border-color` instead. Specifies the component header's block end border.
|
|
9
|
+
* @cssproperty [--calcite-flow-item-footer-padding] - [Deprecated] in v3.0.0, removal target v6.0.0 - Use `--calcite-flow-footer-space` instead. Specifies the padding of the component's footer.
|
|
10
|
+
* @cssproperty [--calcite-flow-item-header-border-block-end] - [Deprecated] in v3.0.0, removal target v6.0.0 - Use `--calcite-flow-border-color` instead. Specifies the component header's block end border.
|
|
11
11
|
* @cssproperty [--calcite-flow-corner-radius] - Specifies the component's corner radius.
|
|
12
12
|
* @cssproperty [--calcite-flow-heading-text-color] - Specifies the text color of the component's `heading`.
|
|
13
13
|
* @cssproperty [--calcite-flow-icon-color] - Specifies the color of the component's `icon`.
|
|
14
14
|
* @cssproperty [--calcite-flow-description-text-color] - Specifies the text color of the component's `description`.
|
|
15
15
|
* @cssproperty [--calcite-flow-border-color] - Specifies the component's border color.
|
|
16
16
|
* @cssproperty [--calcite-flow-background-color] - Specifies the component's background color.
|
|
17
|
-
* @cssproperty [--calcite-flow-content-top-space] - Specifies the padding of the `
|
|
18
|
-
* @cssproperty [--calcite-flow-content-bottom-space] - Specifies the padding of the `
|
|
17
|
+
* @cssproperty [--calcite-flow-content-top-space] - Specifies the padding of the component's `content-top` slot.
|
|
18
|
+
* @cssproperty [--calcite-flow-content-bottom-space] - Specifies the padding of the component's `content-bottom` slot.
|
|
19
19
|
* @cssproperty [--calcite-flow-header-background-color] - Specifies the background color of the component's header.
|
|
20
20
|
* @cssproperty [--calcite-flow-footer-background-color] - Specifies the background color of the component's footer.
|
|
21
21
|
* @cssproperty [--calcite-flow-space] - Specifies the padding of the component's `unnamed (default)` slot.
|
|
22
|
-
* @cssproperty [--calcite-flow-header-content-space] - Specifies the padding of the `header-content` slot.
|
|
22
|
+
* @cssproperty [--calcite-flow-header-content-space] - Specifies the padding of the component's `header-content` slot.
|
|
23
23
|
* @cssproperty [--calcite-flow-footer-space] - Specifies the padding of the component's footer.
|
|
24
24
|
* @cssproperty [--calcite-action-background-color] - Specifies the background color of the component's `closable`, `collapsible`, and `back` `calcite-action`s. Applies to any slotted `calcite-action`s.
|
|
25
25
|
* @cssproperty [--calcite-action-background-color-hover] - Specifies the background color of the component's `closable`, `collapsible`, and `back` `calcite-action`s when hovered. Applies to any slotted `calcite-action`s.
|
|
@@ -42,6 +42,8 @@ import type { IconName } from "../calcite-icon/interfaces.js";
|
|
|
42
42
|
* @slot [header-actions-end] - A slot for adding `calcite-action`s or content to the end side of the component's header.
|
|
43
43
|
* @slot [header-content] - A slot for adding custom content to the component's header.
|
|
44
44
|
* @slot [header-menu-actions] - A slot for adding an overflow menu with `calcite-action`s inside a `calcite-dropdown`.
|
|
45
|
+
* @slot [heading] - A slot for adding content to the heading area of the default header. Takes precedence over the `heading` property.
|
|
46
|
+
* @slot [description] - A slot for adding content to the description area of the default header. Takes precedence over the `description` property.
|
|
45
47
|
* @slot [fab] - A slot for adding a `calcite-fab` (floating action button) to perform an action.
|
|
46
48
|
* @slot [footer] - A slot for adding custom content to the component's footer. Should not be used with the `footer-start` or `footer-end` slots.
|
|
47
49
|
* @slot [footer-end] - A slot for adding a trailing footer custom content. Should not be used with the `footer` slot.
|
|
@@ -149,7 +151,7 @@ export abstract class FlowItem extends LitElement {
|
|
|
149
151
|
* Only set this if you need complex z-index control or if top layer placement causes conflicts with third-party components.
|
|
150
152
|
*
|
|
151
153
|
* @default false
|
|
152
|
-
* @
|
|
154
|
+
* @see [MDN - Top Layer](https://developer.mozilla.org/en-US/docs/Glossary/Top_layer)
|
|
153
155
|
*/
|
|
154
156
|
accessor topLayerDisabled: boolean;
|
|
155
157
|
/**
|
|
@@ -170,7 +172,7 @@ export abstract class FlowItem extends LitElement {
|
|
|
170
172
|
*
|
|
171
173
|
* @param options - When specified an optional object customizes the component's focusing process. When `preventScroll` is `true`, scrolling will not occur on the component.
|
|
172
174
|
* @returns promise.
|
|
173
|
-
* @
|
|
175
|
+
* @see [MDN - focus(options)](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/focus#options)
|
|
174
176
|
*/
|
|
175
177
|
setFocus(options?: FocusOptions): Promise<void>;
|
|
176
178
|
/** Fires when the component's back button is clicked. */
|