@esri/calcite-components 5.2.0-next.30 → 5.2.0-next.32
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/{KVL67YS2.js → 2ALI4ENC.js} +1 -1
- package/dist/cdn/{HZR6NCWA.js → 34LN2LJS.js} +1 -1
- package/dist/cdn/{DXNQDJIF.js → 34S4GEZH.js} +1 -1
- package/dist/cdn/{CUZA2JG2.js → 3DWN3FBO.js} +1 -1
- package/dist/cdn/{VMCOZ3HV.js → 3I2SZUSI.js} +1 -1
- package/dist/cdn/{ILOVG2ER.js → 3KPB5ZG3.js} +1 -1
- package/dist/cdn/{7HJVRNDA.js → 3NZLINPY.js} +1 -1
- package/dist/cdn/{TJUGLK7F.js → 3UEVPCND.js} +1 -1
- package/dist/cdn/{GL4HAMBI.js → 4CJPVAV6.js} +1 -1
- package/dist/cdn/{O6JGN5I7.js → 4OTPD46Y.js} +1 -1
- package/dist/cdn/{N37CYE3C.js → 4PRZO5FL.js} +1 -1
- package/dist/cdn/{TN5VSQFI.js → 4XKPZDWA.js} +1 -1
- package/dist/cdn/{ZFAINRBG.js → 5D5KWSRU.js} +1 -1
- package/dist/cdn/{B6YEVWZC.js → 5PO5KWY4.js} +1 -1
- package/dist/cdn/{DNJWLEZW.js → 5T7XXZVM.js} +1 -1
- package/dist/cdn/{IUPRTI22.js → 5TAEPFKA.js} +1 -1
- package/dist/cdn/{SVZ3IFYS.js → 6BBTSWZJ.js} +1 -1
- package/dist/cdn/{7CNQUYOT.js → 6MJGHCHL.js} +1 -1
- package/dist/cdn/{RIRQHOBE.js → 6QTMT3BR.js} +1 -1
- package/dist/cdn/{ZM4UKWZJ.js → 6UAE7TVW.js} +1 -1
- package/dist/cdn/{R434GHPA.js → 6ZJIHGRE.js} +1 -1
- package/dist/cdn/{H4KOQ3P3.js → 7CJ5CM4O.js} +1 -1
- package/dist/cdn/{2JUKL5RZ.js → 7H6JEAAY.js} +1 -1
- package/dist/cdn/{OWGPSQUW.js → 7HUQTHRG.js} +1 -1
- package/dist/cdn/{GYLPLFN5.js → 7NGKKXBY.js} +1 -1
- package/dist/cdn/{P5V7JFB5.js → 7NMYOO4C.js} +1 -1
- package/dist/cdn/{NFQVM6G3.js → 7VJQDFM5.js} +1 -1
- package/dist/cdn/{JHYELFTN.js → 7XLKMGMO.js} +1 -1
- package/dist/cdn/{A3QXPEE3.js → 7YKEDO2W.js} +1 -1
- package/dist/cdn/{LP3TELFB.js → A4JYA56A.js} +1 -1
- package/dist/cdn/{Y3WHK3EI.js → A5XRC6GV.js} +1 -1
- package/dist/cdn/{OUL6IB3V.js → AD6N6O57.js} +1 -1
- package/dist/cdn/{CIXBCLNA.js → AGS5VTQ7.js} +1 -1
- package/dist/cdn/{KM4ZA4CE.js → AVIL7OG7.js} +1 -1
- package/dist/cdn/{TYUT2PCJ.js → BRLCJYRS.js} +1 -1
- package/dist/cdn/{6QWNCW32.js → BRQQDHKC.js} +1 -1
- package/dist/cdn/{744ICFOB.js → BTQF7UHA.js} +1 -1
- package/dist/cdn/{RW4M5CR6.js → BY7EPIAJ.js} +1 -1
- package/dist/cdn/{FXRJYL3C.js → C23B3A4Z.js} +1 -1
- package/dist/cdn/{7Z4FHAX2.js → C6GZFOWX.js} +1 -1
- package/dist/cdn/{WF4T4755.js → CE6DVH5U.js} +1 -1
- package/dist/cdn/{2Q5EZYJY.js → CJ2SUM7M.js} +1 -1
- package/dist/cdn/{WOQEDKPR.js → CLDDWBPJ.js} +1 -1
- package/dist/cdn/{XRJY4MG7.js → COEPTSMJ.js} +1 -1
- package/dist/cdn/{H6W4S4LE.js → CWZ74ACK.js} +1 -1
- package/dist/cdn/{A5J4D5E4.js → CZ6EC5N6.js} +1 -1
- package/dist/cdn/DGP7CLGV.js +2 -0
- package/dist/cdn/DMK27J6W.js +2 -0
- package/dist/cdn/{KE4B2YVK.js → DQ3PCOCG.js} +1 -1
- package/dist/cdn/{PIRO2BNM.js → DYNPRZCV.js} +1 -1
- package/dist/cdn/{PNWVAEZN.js → E4NELUHA.js} +1 -1
- package/dist/cdn/{MXIWNVFP.js → EEHJN6D5.js} +1 -1
- package/dist/cdn/{AGDLGJ6L.js → EI4TFI4G.js} +1 -1
- package/dist/cdn/{UG4WZLVD.js → EL3MWVTU.js} +1 -1
- package/dist/cdn/{7BMELRUN.js → EL4KJ476.js} +1 -1
- package/dist/cdn/{QOK4W2DZ.js → EMK36YXI.js} +1 -1
- package/dist/cdn/{3QCZXBFB.js → F3KQEYE7.js} +1 -1
- package/dist/cdn/{RIY7L66T.js → F6RUE2M2.js} +1 -1
- package/dist/cdn/{ECBRRRYY.js → FIMDUKAT.js} +1 -1
- package/dist/cdn/{NNVHBWZN.js → FJGZSA3T.js} +1 -1
- package/dist/cdn/{OTWUFKKP.js → FNFMG4OS.js} +1 -1
- package/dist/cdn/{2TYJA7ZA.js → FRPHXRCY.js} +1 -1
- package/dist/cdn/G7GMQSWX.js +2 -0
- package/dist/cdn/{TIZK2BII.js → GBA56KXZ.js} +1 -1
- package/dist/cdn/{XZ3AWUYG.js → GINPHCKX.js} +1 -1
- package/dist/cdn/{V7E67VOT.js → GMGUT6R2.js} +1 -1
- package/dist/cdn/{I72HA7SW.js → GQZX6FJD.js} +1 -1
- package/dist/cdn/{WJE5Q74F.js → GSZ5XODZ.js} +1 -1
- package/dist/cdn/{WSGPRBXQ.js → H5F5TKSQ.js} +1 -1
- package/dist/cdn/{CBALBCOP.js → H5JD4SSM.js} +1 -1
- package/dist/cdn/{MHRIRXTX.js → HBFKOP4O.js} +1 -1
- package/dist/cdn/HKLXMKWW.js +2 -0
- package/dist/cdn/{YIG7OHCG.js → HLXJR3SQ.js} +1 -1
- package/dist/cdn/{7JP2QDSY.js → I2GT4O6W.js} +1 -1
- package/dist/cdn/{YSMLTX25.js → IELIVXOH.js} +1 -1
- package/dist/cdn/{PX6LQKUI.js → INB4ESKN.js} +1 -1
- package/dist/cdn/{7VCES7OE.js → INPOEQLV.js} +1 -1
- package/dist/cdn/{E4TKILOL.js → INZFPRLC.js} +1 -1
- package/dist/cdn/{B4CZNDF3.js → IOHWA5AF.js} +1 -1
- package/dist/cdn/IZS3M5HV.js +2 -0
- package/dist/cdn/{AVCX74DP.js → J5RTSFH2.js} +1 -1
- package/dist/cdn/J7GLTPOG.js +2 -0
- package/dist/cdn/{USCBNO6D.js → JDS4Q3DQ.js} +1 -1
- package/dist/cdn/{IV6LNHPU.js → JPP57EQ2.js} +1 -1
- package/dist/cdn/{IAFVBT32.js → JTPCZIUB.js} +1 -1
- package/dist/cdn/{3AXZKAYQ.js → JZDX222C.js} +1 -1
- package/dist/cdn/{76ACXAF3.js → K4BDB233.js} +1 -1
- package/dist/cdn/{C67GL2CA.js → KDYHO3DX.js} +1 -1
- package/dist/cdn/{UXTQJCNN.js → KHVPREQL.js} +1 -1
- package/dist/cdn/{7TZ6KD4O.js → KKFKA36R.js} +1 -1
- package/dist/cdn/{JR5WU7IG.js → KPLMTG7M.js} +1 -1
- package/dist/cdn/{HFGCBOA6.js → KTMPQFXM.js} +1 -1
- package/dist/cdn/{C3WONRU7.js → KYNFC67E.js} +1 -1
- package/dist/cdn/{S75DSAHG.js → KYYFCGSM.js} +1 -1
- package/dist/cdn/{KQ7JODBH.js → LKHNWV7H.js} +1 -1
- package/dist/cdn/{GPVRWYQF.js → LM5344X3.js} +1 -1
- package/dist/cdn/{L4JBLHJP.js → LMVGXCUB.js} +1 -1
- package/dist/cdn/{WEC4V5A4.js → M5CAMUJA.js} +1 -1
- package/dist/cdn/{VLGXJHJZ.js → M7ZWJ3WS.js} +1 -1
- package/dist/cdn/{JWCIDZM4.js → MEVB3IC5.js} +1 -1
- package/dist/cdn/{L6XXOKYW.js → MO5B4VX7.js} +1 -1
- package/dist/cdn/{JLVQUTEE.js → MQZF7GBV.js} +1 -1
- package/dist/cdn/{U4CNMRWE.js → MUQLRK7U.js} +1 -1
- package/dist/cdn/{MQSF7LRG.js → MYV5GGZF.js} +1 -1
- package/dist/cdn/{SDSIO47V.js → OSK3U7WF.js} +1 -1
- package/dist/cdn/{HYONXP3Q.js → OSV7CFKC.js} +1 -1
- package/dist/cdn/{XVKFFHIM.js → OV4L7Y2U.js} +1 -1
- package/dist/cdn/{OIHVLKPK.js → PCDEZQ5O.js} +1 -1
- package/dist/cdn/{GNXXWAUU.js → PMMNGLYO.js} +1 -1
- package/dist/cdn/{S5NVS4GZ.js → POIX33V2.js} +1 -1
- package/dist/cdn/PUAN7SC7.js +2 -0
- package/dist/cdn/{OTHJKEUE.js → QS7YJ7ID.js} +1 -1
- package/dist/cdn/{O2TWSKJQ.js → QYPBF7SX.js} +1 -1
- package/dist/cdn/{DQIOK5E6.js → RCGGD4VD.js} +1 -1
- package/dist/cdn/RIWCMIVC.js +2 -0
- package/dist/cdn/{P6VCN6MX.js → RQNCEP7V.js} +1 -1
- package/dist/cdn/{YVPTOJ5A.js → RX7LNL6H.js} +1 -1
- package/dist/cdn/{GYGYZGV2.js → SBCMJF3D.js} +1 -1
- package/dist/cdn/{UCKR6SFU.js → SIQA2PBC.js} +1 -1
- package/dist/cdn/{4F7RPBMC.js → SP5D6SJ2.js} +1 -1
- package/dist/cdn/{IPPUJ4XV.js → STG4CABT.js} +1 -1
- package/dist/cdn/{XCQQISIF.js → SWO5BPAD.js} +1 -1
- package/dist/cdn/{G2G2EWKP.js → T6HVZ47J.js} +1 -1
- package/dist/cdn/{YVJQNMYJ.js → TBYUWYMH.js} +1 -1
- package/dist/cdn/{QUZYKERC.js → TCSXUTNB.js} +1 -1
- package/dist/cdn/{I7EE4WLX.js → TE36HTKY.js} +1 -1
- package/dist/cdn/{HQAF5VNB.js → TFCDXEXM.js} +1 -1
- package/dist/cdn/{WWITNWC2.js → TNAV4Y7T.js} +1 -1
- package/dist/cdn/{SVU2DXVH.js → UIRLGHFP.js} +1 -1
- package/dist/cdn/{NYRH26AX.js → UPBB5BK5.js} +1 -1
- package/dist/cdn/{TUU23R4U.js → US7R2KAH.js} +1 -1
- package/dist/cdn/{HHB75VAP.js → W7WKPRBR.js} +1 -1
- package/dist/cdn/{UDBL4JHQ.js → WJ725XFM.js} +1 -1
- package/dist/cdn/{KUWM3KH7.js → WMKL773C.js} +1 -1
- package/dist/cdn/{UESRXLZE.js → X4X4FZMJ.js} +1 -1
- package/dist/cdn/{FEEM36AX.js → X6FZGCQO.js} +1 -1
- package/dist/cdn/{GQQAD4CY.js → XCC7RZKY.js} +1 -1
- package/dist/cdn/{3ULD6GMI.js → XF7AZMTR.js} +1 -1
- package/dist/cdn/{BFU36GZX.js → YFNGK3IC.js} +1 -1
- package/dist/cdn/{FPFNNOM4.js → YJDVSJI7.js} +1 -1
- package/dist/cdn/{V7CTUOE3.js → YQLZIZEE.js} +1 -1
- package/dist/cdn/{YLLHGJB3.js → YRRWAHXD.js} +1 -1
- package/dist/cdn/{II6DZIXM.js → YX2464BY.js} +1 -1
- package/dist/cdn/{KNG2XVTR.js → Z5RHXMLK.js} +1 -1
- package/dist/cdn/{DCV7F4JX.js → ZTWTNJJ6.js} +1 -1
- package/dist/cdn/{G2VMVWVC.js → ZVP3ZHJW.js} +1 -1
- package/dist/cdn/index.js +1 -1
- package/dist/chunks/ExpandToggle.js +11 -45
- package/dist/chunks/dom.js +23 -23
- package/dist/chunks/manager.js +1 -1
- package/dist/chunks/openCloseComponent.js +1 -1
- package/dist/chunks/resources2.js +10 -14
- package/dist/chunks/resources3.js +17 -9
- package/dist/chunks/runtime.js +4 -4
- package/dist/chunks/useFocusTrap.js +1 -1
- package/dist/chunks/useForm.js +1 -1
- package/dist/chunks/useLabel.js +1 -1
- package/dist/chunks/useSetFocus.js +1 -1
- package/dist/chunks/utils2.js +1 -1
- package/dist/components/calcite-accordion-item/customElement.d.ts +5 -1
- package/dist/components/calcite-action/customElement.d.ts +5 -1
- package/dist/components/calcite-action-bar/customElement.d.ts +8 -2
- package/dist/components/calcite-action-bar/customElement.js +252 -55
- package/dist/components/calcite-action-group/customElement.d.ts +14 -1
- package/dist/components/calcite-action-group/customElement.js +61 -51
- package/dist/components/calcite-action-menu/customElement.d.ts +10 -0
- package/dist/components/calcite-action-menu/customElement.js +78 -36
- package/dist/components/calcite-action-pad/customElement.d.ts +5 -1
- package/dist/components/calcite-action-pad/customElement.js +2 -2
- package/dist/components/calcite-alert/customElement.d.ts +5 -1
- package/dist/components/calcite-alert/customElement.js +1 -1
- package/dist/components/calcite-autocomplete/customElement.d.ts +5 -1
- package/dist/components/calcite-avatar/customElement.js +1 -1
- package/dist/components/calcite-block/customElement.d.ts +5 -1
- package/dist/components/calcite-block-group/customElement.js +1 -1
- package/dist/components/calcite-block-section/customElement.d.ts +5 -1
- package/dist/components/calcite-button/customElement.d.ts +5 -1
- package/dist/components/calcite-button/customElement.js +1 -1
- package/dist/components/calcite-card/customElement.d.ts +5 -1
- package/dist/components/calcite-carousel/customElement.d.ts +5 -1
- package/dist/components/calcite-checkbox/customElement.d.ts +5 -1
- package/dist/components/calcite-chip/customElement.d.ts +5 -1
- package/dist/components/calcite-chip/customElement.js +1 -1
- package/dist/components/calcite-color-picker/customElement.d.ts +5 -1
- package/dist/components/calcite-color-picker/customElement.js +1 -1
- package/dist/components/calcite-color-picker-swatch/customElement.js +1 -1
- package/dist/components/calcite-combobox/customElement.d.ts +5 -1
- package/dist/components/calcite-combobox/customElement.js +1 -1
- package/dist/components/calcite-combobox-item/customElement.js +1 -1
- package/dist/components/calcite-date-picker/customElement.d.ts +6 -2
- package/dist/components/calcite-date-picker/customElement.js +27 -5
- package/dist/components/calcite-date-picker-month-header/customElement.js +1 -1
- package/dist/components/calcite-dialog/customElement.d.ts +5 -1
- package/dist/components/calcite-dropdown/customElement.js +1 -1
- package/dist/components/calcite-filter/customElement.d.ts +5 -1
- package/dist/components/calcite-flow-item/customElement.d.ts +5 -1
- package/dist/components/calcite-handle/customElement.d.ts +5 -1
- package/dist/components/calcite-inline-editable/customElement.d.ts +5 -1
- package/dist/components/calcite-input/customElement.d.ts +5 -1
- package/dist/components/calcite-input/customElement.js +1 -1
- package/dist/components/calcite-input-date-picker/customElement.d.ts +5 -1
- package/dist/components/calcite-input-message/customElement.js +1 -1
- package/dist/components/calcite-input-number/customElement.d.ts +5 -1
- package/dist/components/calcite-input-number/customElement.js +1 -1
- package/dist/components/calcite-input-text/customElement.d.ts +5 -1
- package/dist/components/calcite-input-text/customElement.js +1 -1
- package/dist/components/calcite-input-time-picker/customElement.d.ts +5 -1
- package/dist/components/calcite-input-time-zone/customElement.d.ts +5 -1
- package/dist/components/calcite-list/customElement.d.ts +5 -1
- package/dist/components/calcite-list/customElement.js +1 -1
- package/dist/components/calcite-list-item/customElement.d.ts +5 -1
- package/dist/components/calcite-list-item/customElement.js +1 -1
- package/dist/components/calcite-menu/customElement.d.ts +5 -1
- package/dist/components/calcite-menu/customElement.js +1 -1
- package/dist/components/calcite-menu-item/customElement.d.ts +5 -1
- package/dist/components/calcite-meter/customElement.js +1 -1
- package/dist/components/calcite-notice/customElement.d.ts +5 -1
- package/dist/components/calcite-notice/customElement.js +1 -1
- package/dist/components/calcite-pagination/customElement.d.ts +5 -1
- package/dist/components/calcite-panel/customElement.d.ts +5 -1
- package/dist/components/calcite-panel/customElement.js +2 -2
- package/dist/components/calcite-popover/customElement.d.ts +5 -1
- package/dist/components/calcite-radio-button-group/customElement.d.ts +5 -1
- package/dist/components/calcite-rating/customElement.d.ts +5 -1
- package/dist/components/calcite-scrim/customElement.d.ts +5 -1
- package/dist/components/calcite-scrim/customElement.js +1 -1
- package/dist/components/calcite-segmented-control/customElement.d.ts +5 -1
- package/dist/components/calcite-segmented-control-item/customElement.js +1 -1
- package/dist/components/calcite-select/customElement.d.ts +5 -1
- package/dist/components/calcite-sheet/customElement.d.ts +5 -1
- package/dist/components/calcite-shell/customElement.js +75 -5
- package/dist/components/calcite-shell-panel/customElement.d.ts +15 -2
- package/dist/components/calcite-shell-panel/customElement.js +75 -12
- package/dist/components/calcite-slider/customElement.d.ts +5 -1
- package/dist/components/calcite-slider/customElement.js +1 -1
- package/dist/components/calcite-sort-handle/customElement.d.ts +5 -1
- package/dist/components/calcite-sortable-list/customElement.js +1 -1
- package/dist/components/calcite-stepper/customElement.d.ts +5 -1
- package/dist/components/calcite-stepper-item/customElement.d.ts +5 -1
- package/dist/components/calcite-stepper-item/customElement.js +1 -1
- package/dist/components/calcite-tab/customElement.js +1 -1
- package/dist/components/calcite-tab-nav/customElement.d.ts +5 -1
- package/dist/components/calcite-tab-nav/customElement.js +1 -1
- package/dist/components/calcite-tab-title/customElement.d.ts +5 -1
- package/dist/components/calcite-tab-title/customElement.js +1 -1
- package/dist/components/calcite-table/customElement.d.ts +5 -1
- package/dist/components/calcite-table-cell/customElement.d.ts +5 -1
- package/dist/components/calcite-table-header/customElement.d.ts +5 -1
- package/dist/components/calcite-table-row/customElement.js +1 -1
- package/dist/components/calcite-tabs/customElement.js +1 -1
- package/dist/components/calcite-text-area/customElement.d.ts +5 -1
- package/dist/components/calcite-time-picker/customElement.d.ts +5 -1
- package/dist/components/calcite-tree/customElement.js +1 -1
- package/dist/components/calcite-tree-item/customElement.js +1 -1
- package/dist/docs/api.json +1 -1
- package/dist/docs/docs.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 +3 -3
- package/dist/types/lumina.d.ts +3 -1
- package/dist/types/preact.d.ts +3 -1
- package/dist/types/react.d.ts +3 -1
- package/dist/types/stencil.d.ts +3 -1
- package/package.json +2 -2
- package/dist/cdn/B5BPICM5.js +0 -2
- package/dist/cdn/IZ7RXFUG.js +0 -2
- package/dist/cdn/KLSU556M.js +0 -2
- package/dist/cdn/LIAKX4W7.js +0 -2
- package/dist/cdn/RYOYQ7JI.js +0 -2
- package/dist/cdn/U6XLKGTJ.js +0 -2
- package/dist/cdn/UHCJZSPT.js +0 -2
- package/dist/cdn/VVXGJ5AX.js +0 -2
- /package/dist/cdn/{WXZMRXAK.js → 5IJ25RMA.js} +0 -0
|
@@ -2,28 +2,22 @@
|
|
|
2
2
|
import { c as customElement } from "../../chunks/runtime.js";
|
|
3
3
|
import { css, html } from "lit";
|
|
4
4
|
import { LitElement, createEvent, safeClassMap } from "@arcgis/lumina";
|
|
5
|
-
import {
|
|
6
|
-
import { S as SLOTS } from "../../chunks/
|
|
7
|
-
import { s as slotChangeHasAssignedElement } from "../../chunks/dom.js";
|
|
5
|
+
import { createRef, ref } from "lit/directives/ref.js";
|
|
6
|
+
import { S as SLOTS } from "../../chunks/resources3.js";
|
|
7
|
+
import { b as getSlotAssignedElements, s as slotChangeHasAssignedElement } from "../../chunks/dom.js";
|
|
8
8
|
import { u as useT9n } from "../../chunks/useT9n.js";
|
|
9
9
|
import { i as isAction } from "../../chunks/resources.js";
|
|
10
10
|
import { u as useSetFocus } from "../../chunks/useSetFocus.js";
|
|
11
|
-
import { I as ICONS, S as SLOTS$1, C as CSS } from "../../chunks/
|
|
11
|
+
import { I as ICONS, S as SLOTS$1, C as CSS } from "../../chunks/resources2.js";
|
|
12
12
|
const styles = css`:host{box-sizing:border-box;background-color:var(--calcite-color-foreground-1);color:var(--calcite-color-text-2);font-size:var(--calcite-font-size--1)}:host *{box-sizing:border-box}:host([scale=s]){--calcite-internal-action-group-gap: var(--calcite-spacing-xxs)}:host([scale=m]){--calcite-internal-action-group-gap: var(--calcite-spacing-sm)}:host([scale=l]){--calcite-internal-action-group-gap: var(--calcite-spacing-sm-plus)}:host{display:flex;flex-direction:column;padding:0;background-color:transparent;border-color:var(--calcite-action-group-border-color, var(--calcite-color-border-3));border-style:solid;border-width:0;gap:var(--calcite-internal-action-group-gap)}.container{display:flex;flex-grow:1;flex-direction:column;gap:inherit}:host([columns="1"]){--calcite-internal-action-group-columns: 1}:host([columns="2"]){--calcite-internal-action-group-columns: 2}:host([columns="3"]){--calcite-internal-action-group-columns: 3}:host([columns="4"]){--calcite-internal-action-group-columns: 4}:host([columns="5"]){--calcite-internal-action-group-columns: 5}:host([columns="6"]){--calcite-internal-action-group-columns: 6}:host(:first-child){padding-block-start:0px}:host([layout=horizontal]),:host([layout=horizontal]) .container{flex-direction:row}:host([layout=grid]){display:grid}:host([layout=grid]) .container{display:grid;place-content:stretch;background-color:transparent;gap:var(--calcite-action-group-gap, var(--calcite-internal-action-group-gap));grid-template-columns:repeat(var(--calcite-action-group-columns, var(--calcite-internal-action-group-columns, 3)),auto);padding:var(--calcite-action-group-gap, 1px)}:host([layout=horizontal]) ::slotted(calcite-action-group){border-inline-end:var(--calcite-size-px)}:host([hidden]){display:none}[hidden]{display:none}`;
|
|
13
|
-
var __defProp = Object.defineProperty;
|
|
14
|
-
var __decorateClass = (decorators, target, key, kind) => {
|
|
15
|
-
var result = void 0;
|
|
16
|
-
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
17
|
-
if (decorator = decorators[i])
|
|
18
|
-
result = decorator(target, key, result) || result;
|
|
19
|
-
if (result) __defProp(target, key, result);
|
|
20
|
-
return result;
|
|
21
|
-
};
|
|
22
13
|
class ActionGroup extends LitElement {
|
|
23
14
|
constructor() {
|
|
24
15
|
super();
|
|
25
16
|
this.messages = useT9n();
|
|
17
|
+
this._actions = [];
|
|
26
18
|
this.focusSetter = useSetFocus()(this);
|
|
19
|
+
this.defaultSlotRef = createRef();
|
|
20
|
+
this.menuActionsSlotRef = createRef();
|
|
27
21
|
this.hasMenuActions = false;
|
|
28
22
|
this.expanded = false;
|
|
29
23
|
this.layout = "vertical";
|
|
@@ -37,10 +31,11 @@ class ActionGroup extends LitElement {
|
|
|
37
31
|
this.calciteActionGroupCollapse = createEvent({ cancelable: false });
|
|
38
32
|
this.calciteActionGroupExpand = createEvent({ cancelable: false });
|
|
39
33
|
this.calciteActionGroupChange = createEvent({ cancelable: false });
|
|
34
|
+
this.calciteInternalActionGroupActionsChange = createEvent({ cancelable: false });
|
|
40
35
|
this.listen("click", this.handleActionClick);
|
|
41
36
|
}
|
|
42
37
|
static {
|
|
43
|
-
this.properties = { hasMenuActions: [16, {}, { state: true }], columns: [11, {}, { type: Number, reflect: true }], expanded: [7, {}, { reflect: true, type: Boolean }], label: 1, layout: [3, {}, { reflect: true }], menuFlipPlacements: [0, {}, { attribute: false }], menuOpen: [7, {}, { reflect: true, type: Boolean }], menuPlacement: [3, {}, { reflect: true }], messageOverrides: [0, {}, { attribute: false }], overlayPositioning: [3, {}, { reflect: true }], overflowActionsDisabled: [7, {}, { reflect: true, type: Boolean }], scale: [3, {}, { reflect: true }], selectionMode: [3, {}, { reflect: true }], topLayerDisabled: [7, {}, { reflect: true, type: Boolean }], selectedActions: [0, {}, { attribute: false }] };
|
|
38
|
+
this.properties = { hasMenuActions: [16, {}, { state: true }], columns: [11, {}, { type: Number, reflect: true }], expanded: [7, {}, { reflect: true, type: Boolean }], label: 1, layout: [3, {}, { reflect: true }], menuFlipPlacements: [0, {}, { attribute: false }], menuOpen: [7, {}, { reflect: true, type: Boolean }], menuPlacement: [3, {}, { reflect: true }], messageOverrides: [0, {}, { attribute: false }], overlayPositioning: [3, {}, { reflect: true }], overflowActionsDisabled: [7, {}, { reflect: true, type: Boolean }], scale: [3, {}, { reflect: true }], selectionMode: [3, {}, { reflect: true }], topLayerDisabled: [7, {}, { reflect: true, type: Boolean }], actions: [32, {}, { attribute: false, readOnly: true }], selectedActions: [0, {}, { attribute: false }] };
|
|
44
39
|
}
|
|
45
40
|
static {
|
|
46
41
|
this.shadowRootOptions = { mode: "open", delegatesFocus: true };
|
|
@@ -48,23 +43,15 @@ class ActionGroup extends LitElement {
|
|
|
48
43
|
static {
|
|
49
44
|
this.styles = styles;
|
|
50
45
|
}
|
|
46
|
+
get actions() {
|
|
47
|
+
return this._actions;
|
|
48
|
+
}
|
|
51
49
|
async setFocus(options) {
|
|
52
50
|
return this.focusSetter(() => this.el, options);
|
|
53
51
|
}
|
|
54
52
|
willUpdate(changes) {
|
|
55
53
|
if (this.hasUpdated || changes.has("selectionMode")) {
|
|
56
|
-
|
|
57
|
-
this.setRoleOnActions();
|
|
58
|
-
} else if (this.selectionMode === "none") {
|
|
59
|
-
this.clearActionAriaAttributes();
|
|
60
|
-
}
|
|
61
|
-
if (this.selectionMode === "single" || this.selectionMode === "single-persist") {
|
|
62
|
-
const selected = this.actions?.filter((action) => action.active) ?? [];
|
|
63
|
-
if (selected.length > 1) {
|
|
64
|
-
this.actions.forEach((action) => this.updateAction(action, action === selected[selected.length - 1]));
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
this.updateSelectedActions(this.selectionMode === "none" ? [] : this.actions?.filter((action) => action.active) ?? []);
|
|
54
|
+
this.syncSelectionState();
|
|
68
55
|
}
|
|
69
56
|
if (changes.has("expanded")) {
|
|
70
57
|
if (this.hasUpdated || this.expanded !== false) {
|
|
@@ -80,34 +67,60 @@ class ActionGroup extends LitElement {
|
|
|
80
67
|
}
|
|
81
68
|
}
|
|
82
69
|
setActiveAction(index, active) {
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
70
|
+
const nextActive = !active.active;
|
|
71
|
+
switch (this.selectionMode) {
|
|
72
|
+
case "multiple":
|
|
73
|
+
this.updateAction(active, nextActive);
|
|
74
|
+
break;
|
|
75
|
+
case "single":
|
|
76
|
+
this.actions.forEach((action, i) => this.updateAction(action, i === index && nextActive));
|
|
77
|
+
break;
|
|
78
|
+
case "single-persist":
|
|
79
|
+
if (!this.actions[index].active) {
|
|
80
|
+
this.actions.forEach((action, i) => this.updateAction(action, i === index));
|
|
81
|
+
this.updateSelectedActions([active]);
|
|
82
|
+
this.calciteActionGroupChange.emit();
|
|
83
|
+
}
|
|
84
|
+
return;
|
|
85
|
+
default:
|
|
86
|
+
return;
|
|
89
87
|
}
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
88
|
+
this.updateSelectedActions(this.actions.filter((action) => action.active));
|
|
89
|
+
this.calciteActionGroupChange.emit();
|
|
90
|
+
}
|
|
91
|
+
setMenuOpen(event) {
|
|
92
|
+
this.menuOpen = !!event.currentTarget.open;
|
|
93
|
+
}
|
|
94
|
+
syncSelectionState() {
|
|
95
|
+
if (this.selectionMode !== "none") {
|
|
96
|
+
this.setRoleOnActions();
|
|
97
|
+
} else {
|
|
98
|
+
this.clearActionAriaAttributes();
|
|
96
99
|
}
|
|
97
|
-
if (this.selectionMode === "single-persist") {
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
this.
|
|
101
|
-
this.calciteActionGroupChange.emit();
|
|
100
|
+
if (this.selectionMode === "single" || this.selectionMode === "single-persist") {
|
|
101
|
+
const selected = this.actions.filter((action) => action.active);
|
|
102
|
+
if (selected.length > 1) {
|
|
103
|
+
this.actions.forEach((action) => this.updateAction(action, action === selected.at(-1)));
|
|
102
104
|
}
|
|
103
|
-
return;
|
|
104
105
|
}
|
|
106
|
+
this.updateSelectedActions(this.selectionMode === "none" ? [] : this.actions.filter((action) => action.active));
|
|
105
107
|
}
|
|
106
|
-
|
|
107
|
-
this.
|
|
108
|
+
syncActions() {
|
|
109
|
+
const defaultActions = this.defaultSlotRef.value ? getSlotAssignedElements(this.defaultSlotRef.value, "calcite-action") : [];
|
|
110
|
+
const menuActions = this.menuActionsSlotRef.value ? getSlotAssignedElements(this.menuActionsSlotRef.value, "calcite-action") : [];
|
|
111
|
+
this._actions = [...defaultActions, ...menuActions];
|
|
112
|
+
this.syncSelectionState();
|
|
113
|
+
}
|
|
114
|
+
syncActionsAndEmitChange() {
|
|
115
|
+
this.syncActions();
|
|
116
|
+
this.calciteInternalActionGroupActionsChange.emit();
|
|
117
|
+
}
|
|
118
|
+
handleDefaultSlotChange() {
|
|
119
|
+
this.syncActionsAndEmitChange();
|
|
108
120
|
}
|
|
109
121
|
handleMenuActionsSlotChange(event) {
|
|
110
122
|
this.hasMenuActions = slotChangeHasAssignedElement(event);
|
|
123
|
+
this.syncActionsAndEmitChange();
|
|
111
124
|
}
|
|
112
125
|
handleActionClick(event) {
|
|
113
126
|
const target = event.composedPath().find((element) => isAction(element));
|
|
@@ -162,15 +175,12 @@ class ActionGroup extends LitElement {
|
|
|
162
175
|
}
|
|
163
176
|
renderMenu() {
|
|
164
177
|
const { expanded, menuOpen, scale, layout, messages, overlayPositioning, hasMenuActions, menuFlipPlacements, menuPlacement } = this;
|
|
165
|
-
return html`<calcite-action-menu .expanded=${expanded} .flipPlacements=${menuFlipPlacements ?? (layout === "horizontal" ? ["top", "bottom"] : ["left", "right"])} .hidden=${!hasMenuActions} .label=${messages.more} @calciteActionMenuOpen=${this.setMenuOpen} .open=${menuOpen} .overlayPositioning=${overlayPositioning} .placement=${menuPlacement ?? (layout === "horizontal" ? "bottom-start" : "leading-start")} .scale=${scale} .topLayerDisabled=${this.topLayerDisabled}><calcite-action .aria=${{ expanded }} .icon=${ICONS.menu} .scale=${scale} slot=${SLOTS.trigger} .text=${messages.more} .textEnabled=${expanded}></calcite-action><slot name=${SLOTS$1.menuActions} @slotchange=${this.handleMenuActionsSlotChange}></slot><slot name=${SLOTS$1.menuTooltip} slot=${SLOTS.tooltip}></slot></calcite-action-menu>`;
|
|
178
|
+
return html`<calcite-action-menu .expanded=${expanded} .flipPlacements=${menuFlipPlacements ?? (layout === "horizontal" ? ["top", "bottom"] : ["left", "right"])} .hidden=${!hasMenuActions} .label=${messages.more} @calciteActionMenuOpen=${this.setMenuOpen} .open=${menuOpen} .overlayPositioning=${overlayPositioning} .placement=${menuPlacement ?? (layout === "horizontal" ? "bottom-start" : "leading-start")} .scale=${scale} .topLayerDisabled=${this.topLayerDisabled}><calcite-action .aria=${{ expanded }} .icon=${ICONS.menu} .scale=${scale} slot=${SLOTS.trigger} .text=${messages.more} .textEnabled=${expanded}></calcite-action><slot name=${SLOTS$1.menuActions} @slotchange=${this.handleMenuActionsSlotChange} ${ref(this.menuActionsSlotRef)}></slot><slot name=${SLOTS$1.menuTooltip} slot=${SLOTS.tooltip}></slot></calcite-action-menu>`;
|
|
166
179
|
}
|
|
167
180
|
render() {
|
|
168
|
-
return html`<div .ariaLabel=${this.label} class=${safeClassMap(CSS.container)} .role=${this.selectionMode === "multiple" || this.selectionMode === "none" ? "group" : "radiogroup"}><slot></slot>${this.renderMenu()}</div>`;
|
|
181
|
+
return html`<div .ariaLabel=${this.label} class=${safeClassMap(CSS.container)} .role=${this.selectionMode === "multiple" || this.selectionMode === "none" ? "group" : "radiogroup"}><slot @slotchange=${this.handleDefaultSlotChange} ${ref(this.defaultSlotRef)}></slot>${this.renderMenu()}</div>`;
|
|
169
182
|
}
|
|
170
183
|
}
|
|
171
|
-
__decorateClass([
|
|
172
|
-
queryAssignedElements({ selector: "calcite-action" })
|
|
173
|
-
], ActionGroup.prototype, "actions");
|
|
174
184
|
customElement("calcite-action-group", ActionGroup);
|
|
175
185
|
export {
|
|
176
186
|
ActionGroup
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
import type { PublicLitElement as LitElement } from "@arcgis/lumina";
|
|
3
3
|
import type { FlipPlacement, LogicalPlacement, OverlayPositioning } from "../../utils/floating-ui.js";
|
|
4
4
|
import type { Appearance, Scale } from "../interfaces.js";
|
|
5
|
+
import type { Action } from "../calcite-action/customElement.js";
|
|
5
6
|
|
|
6
7
|
/**
|
|
7
8
|
* @cssproperty [--calcite-action-menu-items-space] - Specifies the space between actions in the menu.
|
|
@@ -10,6 +11,12 @@ import type { Appearance, Scale } from "../interfaces.js";
|
|
|
10
11
|
* @slot [tooltip] - A slot for adding a tooltip for the menu.
|
|
11
12
|
*/
|
|
12
13
|
export abstract class ActionMenu extends LitElement {
|
|
14
|
+
/**
|
|
15
|
+
* Specifies the `calcite-action`s in the menu.
|
|
16
|
+
*
|
|
17
|
+
* @internal
|
|
18
|
+
*/
|
|
19
|
+
get actions(): Action[];
|
|
13
20
|
/**
|
|
14
21
|
* Specifies the appearance of the component.
|
|
15
22
|
*
|
|
@@ -78,9 +85,12 @@ export abstract class ActionMenu extends LitElement {
|
|
|
78
85
|
readonly calciteActionMenuExpand: import("@arcgis/lumina").TargetedEvent<this, void>;
|
|
79
86
|
/** Fires when the `open` property is toggled. */
|
|
80
87
|
readonly calciteActionMenuOpen: import("@arcgis/lumina").TargetedEvent<this, void>;
|
|
88
|
+
/** Fires after the component's slotted `calcite-action`s change. */
|
|
89
|
+
readonly calciteInternalActionMenuActionsChange: import("@arcgis/lumina").TargetedEvent<this, void>;
|
|
81
90
|
readonly "@eventTypes": {
|
|
82
91
|
calciteActionMenuCollapse: ActionMenu["calciteActionMenuCollapse"]["detail"];
|
|
83
92
|
calciteActionMenuExpand: ActionMenu["calciteActionMenuExpand"]["detail"];
|
|
84
93
|
calciteActionMenuOpen: ActionMenu["calciteActionMenuOpen"]["detail"];
|
|
94
|
+
calciteInternalActionMenuActionsChange: ActionMenu["calciteInternalActionMenuActionsChange"]["detail"];
|
|
85
95
|
};
|
|
86
96
|
}
|
|
@@ -1,30 +1,35 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
2
|
import { c as customElement } from "../../chunks/runtime.js";
|
|
3
|
-
import { ref } from "lit/directives/ref.js";
|
|
4
3
|
import { css, html, nothing } from "lit";
|
|
5
4
|
import { LitElement, createEvent, safeClassMap } from "@arcgis/lumina";
|
|
5
|
+
import { createRef, ref } from "lit/directives/ref.js";
|
|
6
6
|
import { g as getRoundRobinIndex } from "../../chunks/array.js";
|
|
7
7
|
import { t as toAriaBoolean } from "../../chunks/aria.js";
|
|
8
|
+
import { b as getSlotAssignedElements } from "../../chunks/dom.js";
|
|
8
9
|
import { g as guid } from "../../chunks/guid.js";
|
|
9
10
|
import { i as isActivationKey } from "../../chunks/key.js";
|
|
10
11
|
import { i as isAction } from "../../chunks/resources.js";
|
|
12
|
+
import { i as isActionGroup } from "../../chunks/resources2.js";
|
|
11
13
|
import { u as useSetFocus } from "../../chunks/useSetFocus.js";
|
|
12
|
-
import { I as IDS,
|
|
14
|
+
import { I as IDS, C as CSS, S as SLOTS, a as ICONS } from "../../chunks/resources3.js";
|
|
13
15
|
const styles = css`:host([scale=s]){--calcite-internal-action-menu-gap: var(--calcite-action-menu-items-space, var(--calcite-spacing-xxs));--calcite-internal-action-menu-padding: var(--calcite-spacing-xxs)}:host([scale=m]){--calcite-internal-action-menu-gap: var(--calcite-action-menu-items-space, var(--calcite-spacing-sm));--calcite-internal-action-menu-padding: var(--calcite-spacing-sm)}:host([scale=l]){--calcite-internal-action-menu-gap: var(--calcite-action-menu-items-space, var(--calcite-spacing-sm-plus));--calcite-internal-action-menu-padding: var(--calcite-spacing-sm-plus)}:host{box-sizing:border-box;display:flex;flex-direction:column;font-size:var(--calcite-font-size-relative-lg)}::slotted(calcite-action-group:not(:last-of-type)){border-block-end-width:var(--calcite-border-width-sm);padding-block-end:var(--calcite-internal-action-menu-padding)}.default-trigger{position:relative;block-size:100%;flex:0 1 auto;align-self:stretch}slot[name=trigger]::slotted(calcite-action),calcite-action::slotted([slot=trigger]){position:relative;block-size:100%;flex:0 1 auto;align-self:stretch}.menu{display:flex;max-block-size:45vh;flex-direction:column;flex-wrap:nowrap;overflow-y:auto;overflow-x:hidden;outline:2px solid transparent;outline-offset:2px;gap:var(--calcite-internal-action-menu-gap);padding:var(--calcite-internal-action-menu-padding)}:host([hidden]){display:none}[hidden]{display:none}`;
|
|
14
16
|
const SUPPORTED_MENU_NAV_KEYS = ["ArrowUp", "ArrowDown", "End", "Home"];
|
|
15
17
|
class ActionMenu extends LitElement {
|
|
16
18
|
constructor() {
|
|
17
|
-
super(
|
|
19
|
+
super();
|
|
18
20
|
this.guid = guid();
|
|
19
|
-
this.
|
|
21
|
+
this._actions = [];
|
|
22
|
+
this.navigableActions = [];
|
|
23
|
+
this.defaultSlotRef = createRef();
|
|
24
|
+
this.triggerSlotRef = createRef();
|
|
20
25
|
this.menuButtonClick = () => {
|
|
21
26
|
this.toggleOpen();
|
|
22
27
|
};
|
|
23
28
|
this.menuButtonId = IDS.button(this.guid);
|
|
24
29
|
this.menuButtonKeyDown = (event) => {
|
|
25
30
|
const { key } = event;
|
|
26
|
-
const {
|
|
27
|
-
if (!
|
|
31
|
+
const { activeMenuItemIndex, navigableActions, open } = this;
|
|
32
|
+
if (!navigableActions.length) {
|
|
28
33
|
return;
|
|
29
34
|
}
|
|
30
35
|
if (isActivationKey(key)) {
|
|
@@ -33,7 +38,7 @@ class ActionMenu extends LitElement {
|
|
|
33
38
|
this.toggleOpen();
|
|
34
39
|
return;
|
|
35
40
|
}
|
|
36
|
-
const action =
|
|
41
|
+
const action = navigableActions[activeMenuItemIndex];
|
|
37
42
|
if (action) {
|
|
38
43
|
action.click();
|
|
39
44
|
} else {
|
|
@@ -49,7 +54,7 @@ class ActionMenu extends LitElement {
|
|
|
49
54
|
event.preventDefault();
|
|
50
55
|
return;
|
|
51
56
|
}
|
|
52
|
-
this.handleActionNavigation(event, key,
|
|
57
|
+
this.handleActionNavigation(event, key, navigableActions);
|
|
53
58
|
};
|
|
54
59
|
this.menuId = IDS.menu(this.guid);
|
|
55
60
|
this._open = false;
|
|
@@ -68,7 +73,7 @@ class ActionMenu extends LitElement {
|
|
|
68
73
|
if (!event.composedPath().some(isAction)) {
|
|
69
74
|
return;
|
|
70
75
|
}
|
|
71
|
-
this.activeMenuItemIndex = this.
|
|
76
|
+
this.activeMenuItemIndex = this.navigableActions.findIndex((action) => action === event.target);
|
|
72
77
|
};
|
|
73
78
|
this.activeMenuItemIndex = -1;
|
|
74
79
|
this.appearance = "solid";
|
|
@@ -80,9 +85,11 @@ class ActionMenu extends LitElement {
|
|
|
80
85
|
this.calciteActionMenuCollapse = createEvent({ cancelable: false });
|
|
81
86
|
this.calciteActionMenuExpand = createEvent({ cancelable: false });
|
|
82
87
|
this.calciteActionMenuOpen = createEvent({ cancelable: false });
|
|
88
|
+
this.calciteInternalActionMenuActionsChange = createEvent({ cancelable: false });
|
|
89
|
+
this.listen("calciteInternalActionGroupActionsChange", this.handleActionGroupActionsChange);
|
|
83
90
|
}
|
|
84
91
|
static {
|
|
85
|
-
this.properties = { activeMenuItemIndex: [16, {}, { state: true }], menuButtonEl: [16, {}, { state: true }], appearance: [3, {}, { reflect: true }], expanded: [7, {}, { reflect: true, type: Boolean }], flipPlacements: [0, {}, { attribute: false }], label: 1, open: [7, {}, { reflect: true, type: Boolean }], overlayPositioning: [3, {}, { reflect: true }], placement: [3, {}, { reflect: true }], topLayerDisabled: [7, {}, { reflect: true, type: Boolean }], scale: [3, {}, { reflect: true }] };
|
|
92
|
+
this.properties = { activeMenuItemIndex: [16, {}, { state: true }], menuButtonEl: [16, {}, { state: true }], appearance: [3, {}, { reflect: true }], expanded: [7, {}, { reflect: true, type: Boolean }], flipPlacements: [0, {}, { attribute: false }], label: 1, open: [7, {}, { reflect: true, type: Boolean }], overlayPositioning: [3, {}, { reflect: true }], placement: [3, {}, { reflect: true }], topLayerDisabled: [7, {}, { reflect: true, type: Boolean }], scale: [3, {}, { reflect: true }], actions: [32, {}, { attribute: false, readOnly: true }] };
|
|
86
93
|
}
|
|
87
94
|
static {
|
|
88
95
|
this.styles = styles;
|
|
@@ -97,6 +104,9 @@ class ActionMenu extends LitElement {
|
|
|
97
104
|
this.openHandler(open);
|
|
98
105
|
}
|
|
99
106
|
}
|
|
107
|
+
get actions() {
|
|
108
|
+
return this._actions;
|
|
109
|
+
}
|
|
100
110
|
async setFocus(options) {
|
|
101
111
|
return this.focusSetter(() => this.menuButtonEl, options);
|
|
102
112
|
}
|
|
@@ -110,7 +120,7 @@ class ActionMenu extends LitElement {
|
|
|
110
120
|
this.expandedHandler();
|
|
111
121
|
}
|
|
112
122
|
if (changes.has("activeMenuItemIndex") && (this.hasUpdated || this.activeMenuItemIndex !== -1)) {
|
|
113
|
-
this.updateActions(this.
|
|
123
|
+
this.updateActions(this.navigableActions);
|
|
114
124
|
}
|
|
115
125
|
if (changes.has("expanded") && this.hasUpdated) {
|
|
116
126
|
if (this.expanded) {
|
|
@@ -179,13 +189,49 @@ class ActionMenu extends LitElement {
|
|
|
179
189
|
menuButtonEl.removeEventListener("keydown", this.menuButtonKeyDown);
|
|
180
190
|
this.menuButtonEl = void 0;
|
|
181
191
|
}
|
|
182
|
-
|
|
183
|
-
const
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
this.
|
|
192
|
+
syncActions() {
|
|
193
|
+
const triggerSlot = this.triggerSlotRef.value;
|
|
194
|
+
const triggerActions = triggerSlot ? getSlotAssignedElements(triggerSlot, "calcite-action").filter((action) => !action.classList.contains(CSS.defaultTrigger)) : [];
|
|
195
|
+
const triggerActionsSet = new Set(triggerActions);
|
|
196
|
+
const defaultActions = this.defaultSlotRef.value ? getSlotAssignedElements(this.defaultSlotRef.value).flatMap((element) => {
|
|
197
|
+
if (isAction(element)) {
|
|
198
|
+
return element;
|
|
199
|
+
}
|
|
200
|
+
if (isActionGroup(element)) {
|
|
201
|
+
return element.actions;
|
|
202
|
+
}
|
|
203
|
+
return [];
|
|
204
|
+
}) : [];
|
|
205
|
+
const dedupedActions = [];
|
|
206
|
+
const seenActions = /* @__PURE__ */ new Set();
|
|
207
|
+
[...triggerActions, ...defaultActions].forEach((action) => {
|
|
208
|
+
if (seenActions.has(action)) {
|
|
209
|
+
return;
|
|
210
|
+
}
|
|
211
|
+
seenActions.add(action);
|
|
212
|
+
dedupedActions.push(action);
|
|
213
|
+
});
|
|
214
|
+
this._actions = dedupedActions;
|
|
215
|
+
this.navigableActions = dedupedActions.filter((action) => !triggerActionsSet.has(action) && !action.disabled && !action.hidden);
|
|
216
|
+
if (!this.open || !this.navigableActions.length) {
|
|
217
|
+
this.activeMenuItemIndex = -1;
|
|
218
|
+
} else if (this.activeMenuItemIndex < 0 || this.activeMenuItemIndex >= this.navigableActions.length) {
|
|
219
|
+
this.activeMenuItemIndex = 0;
|
|
220
|
+
}
|
|
221
|
+
this.updateActions(this.navigableActions);
|
|
222
|
+
}
|
|
223
|
+
setMenuButtonEl() {
|
|
224
|
+
this.slottedMenuButtonEl = this.triggerSlotRef.value ? getSlotAssignedElements(this.triggerSlotRef.value, "calcite-action")[0] : void 0;
|
|
187
225
|
this.connectMenuButtonEl();
|
|
188
226
|
}
|
|
227
|
+
syncActionsAndEmitChange() {
|
|
228
|
+
this.syncActions();
|
|
229
|
+
this.calciteInternalActionMenuActionsChange.emit();
|
|
230
|
+
}
|
|
231
|
+
handleTriggerSlotChange() {
|
|
232
|
+
this.setMenuButtonEl();
|
|
233
|
+
this.syncActionsAndEmitChange();
|
|
234
|
+
}
|
|
189
235
|
setDefaultMenuButtonEl(el) {
|
|
190
236
|
this.defaultMenuButtonEl = el;
|
|
191
237
|
this.connectMenuButtonEl();
|
|
@@ -198,7 +244,7 @@ class ActionMenu extends LitElement {
|
|
|
198
244
|
el.open = this.open;
|
|
199
245
|
}
|
|
200
246
|
handleCalciteActionClick(event) {
|
|
201
|
-
if (this.
|
|
247
|
+
if (this.navigableActions.some((action) => event.composedPath().includes(action))) {
|
|
202
248
|
this.open = false;
|
|
203
249
|
this.setFocus();
|
|
204
250
|
}
|
|
@@ -217,23 +263,19 @@ class ActionMenu extends LitElement {
|
|
|
217
263
|
}
|
|
218
264
|
}
|
|
219
265
|
updateActions(actions) {
|
|
220
|
-
actions
|
|
266
|
+
actions.forEach(this.updateAction);
|
|
221
267
|
}
|
|
222
|
-
async handleDefaultSlotChange(
|
|
223
|
-
const actions = event.target.assignedElements({
|
|
224
|
-
flatten: true
|
|
225
|
-
}).reduce((previousValue, currentValue) => {
|
|
226
|
-
if (currentValue?.matches("calcite-action")) {
|
|
227
|
-
previousValue.push(currentValue);
|
|
228
|
-
return previousValue;
|
|
229
|
-
}
|
|
230
|
-
if (currentValue?.matches("calcite-action-group")) {
|
|
231
|
-
return previousValue.concat(Array.from(currentValue.querySelectorAll("calcite-action")));
|
|
232
|
-
}
|
|
233
|
-
return previousValue;
|
|
234
|
-
}, []);
|
|
268
|
+
async handleDefaultSlotChange() {
|
|
235
269
|
await this.componentOnReady();
|
|
236
|
-
this.
|
|
270
|
+
this.syncActionsAndEmitChange();
|
|
271
|
+
}
|
|
272
|
+
handleActionGroupActionsChange(event) {
|
|
273
|
+
const group = event.target;
|
|
274
|
+
const slottedActionGroups = this.defaultSlotRef.value ? getSlotAssignedElements(this.defaultSlotRef.value).filter((element) => isActionGroup(element)) : [];
|
|
275
|
+
if (!slottedActionGroups.includes(group)) {
|
|
276
|
+
return;
|
|
277
|
+
}
|
|
278
|
+
this.syncActionsAndEmitChange();
|
|
237
279
|
}
|
|
238
280
|
isValidKey(key, supportedKeys) {
|
|
239
281
|
return !!supportedKeys.find((k) => k === key);
|
|
@@ -281,14 +323,14 @@ class ActionMenu extends LitElement {
|
|
|
281
323
|
}
|
|
282
324
|
renderMenuButton() {
|
|
283
325
|
const { appearance, label, scale, expanded } = this;
|
|
284
|
-
const menuButtonSlot = html`<slot name=${SLOTS.trigger} @slotchange=${this.
|
|
326
|
+
const menuButtonSlot = html`<slot name=${SLOTS.trigger} @slotchange=${this.handleTriggerSlotChange} ${ref(this.triggerSlotRef)}><calcite-action .appearance=${appearance} .aria=${{ expanded }} class=${safeClassMap(CSS.defaultTrigger)} .icon=${ICONS.menu} .scale=${scale} .text=${label} .textEnabled=${expanded} ${ref(this.setDefaultMenuButtonEl)}></calcite-action></slot>`;
|
|
285
327
|
return menuButtonSlot;
|
|
286
328
|
}
|
|
287
329
|
renderMenuItems() {
|
|
288
|
-
const {
|
|
289
|
-
const activeAction =
|
|
330
|
+
const { navigableActions, activeMenuItemIndex, menuId, menuButtonEl, label, placement, overlayPositioning, flipPlacements } = this;
|
|
331
|
+
const activeAction = navigableActions[activeMenuItemIndex];
|
|
290
332
|
const activeDescendantId = activeAction?.id || null;
|
|
291
|
-
return html`<calcite-popover auto-close .flipPlacements=${flipPlacements} focus-trap-disabled .label=${label} offset-distance=0 @calcitePopoverClose=${this.handlePopoverClose} @calcitePopoverOpen=${this.handlePopoverOpen} .overlayPositioning=${overlayPositioning} .placement=${placement} pointer-disabled .referenceElement=${menuButtonEl} .scale=${this.scale} .topLayerDisabled=${this.topLayerDisabled} trigger-disabled ${ref(this.setPopoverEl)}><div aria-activedescendant=${activeDescendantId ?? void 0 ?? nothing} aria-labelledby=${menuButtonEl?.id ?? nothing} class=${safeClassMap(CSS.menu)} id=${menuId ?? nothing} @click=${this.handleCalciteActionClick} role=menu tabindex=-1><slot @slotchange=${this.handleDefaultSlotChange}></slot></div></calcite-popover>`;
|
|
333
|
+
return html`<calcite-popover auto-close .flipPlacements=${flipPlacements} focus-trap-disabled .label=${label} offset-distance=0 @calcitePopoverClose=${this.handlePopoverClose} @calcitePopoverOpen=${this.handlePopoverOpen} .overlayPositioning=${overlayPositioning} .placement=${placement} pointer-disabled .referenceElement=${menuButtonEl} .scale=${this.scale} .topLayerDisabled=${this.topLayerDisabled} trigger-disabled ${ref(this.setPopoverEl)}><div aria-activedescendant=${activeDescendantId ?? void 0 ?? nothing} aria-labelledby=${menuButtonEl?.id ?? nothing} class=${safeClassMap(CSS.menu)} id=${menuId ?? nothing} @click=${this.handleCalciteActionClick} role=menu tabindex=-1><slot @slotchange=${this.handleDefaultSlotChange} ${ref(this.defaultSlotRef)}></slot></div></calcite-popover>`;
|
|
292
334
|
}
|
|
293
335
|
render() {
|
|
294
336
|
return html`${this.renderMenuButton()}${this.renderMenuItems()}<slot name=${SLOTS.tooltip} @slotchange=${this.updateTooltip}></slot>`;
|
|
@@ -32,7 +32,11 @@ export abstract class ActionPad extends LitElement {
|
|
|
32
32
|
* @default "vertical"
|
|
33
33
|
*/
|
|
34
34
|
accessor layout: Extract<"horizontal" | "vertical" | "grid", Layout>;
|
|
35
|
-
/**
|
|
35
|
+
/**
|
|
36
|
+
* Replace localized message strings with your own strings.
|
|
37
|
+
*
|
|
38
|
+
* _**Note**: Individual message keys may change between releases._
|
|
39
|
+
*/
|
|
36
40
|
accessor messageOverrides: {
|
|
37
41
|
expand?: string | undefined;
|
|
38
42
|
collapse?: string | undefined;
|
|
@@ -4,7 +4,7 @@ import { css, html } from "lit";
|
|
|
4
4
|
import { LitElement, createEvent, safeClassMap } from "@arcgis/lumina";
|
|
5
5
|
import { useDirection } from "@arcgis/lumina/controllers";
|
|
6
6
|
import { a as slotChangeGetAssignedElements, f as focusElementInGroup } from "../../chunks/dom.js";
|
|
7
|
-
import {
|
|
7
|
+
import { l as legacyToggleChildActionText, E as ExpandToggle } from "../../chunks/ExpandToggle.js";
|
|
8
8
|
import { c as createObserver } from "../../chunks/observers.js";
|
|
9
9
|
import { u as useT9n } from "../../chunks/useT9n.js";
|
|
10
10
|
import { i as isAction } from "../../chunks/resources.js";
|
|
@@ -69,7 +69,7 @@ class ActionPad extends LitElement {
|
|
|
69
69
|
}
|
|
70
70
|
willUpdate(changes) {
|
|
71
71
|
if (changes.has("expanded") && this.hasUpdated) {
|
|
72
|
-
|
|
72
|
+
legacyToggleChildActionText({ el: this.el, expanded: this.expanded });
|
|
73
73
|
}
|
|
74
74
|
if (changes.has("layout") && (this.hasUpdated || this.layout !== "vertical")) {
|
|
75
75
|
this.updateGroups();
|
|
@@ -56,7 +56,11 @@ export abstract class Alert extends LitElement {
|
|
|
56
56
|
* @required
|
|
57
57
|
*/
|
|
58
58
|
accessor label: string;
|
|
59
|
-
/**
|
|
59
|
+
/**
|
|
60
|
+
* Replace localized message strings with your own strings.
|
|
61
|
+
*
|
|
62
|
+
* _**Note**: Individual message keys may change between releases._
|
|
63
|
+
*/
|
|
60
64
|
accessor messageOverrides: { close?: string | undefined; };
|
|
61
65
|
/** Specifies the Unicode numeral system used by the component for localization. */
|
|
62
66
|
accessor numberingSystem: NumberingSystem | undefined;
|
|
@@ -4,7 +4,7 @@ import { keyed } from "lit/directives/keyed.js";
|
|
|
4
4
|
import { css, html } from "lit";
|
|
5
5
|
import { LitElement, createEvent, stringOrBoolean, safeClassMap } from "@arcgis/lumina";
|
|
6
6
|
import { createRef, ref } from "lit/directives/ref.js";
|
|
7
|
-
import { s as slotChangeHasAssignedElement,
|
|
7
|
+
import { s as slotChangeHasAssignedElement, d as setRequestedIcon } from "../../chunks/dom.js";
|
|
8
8
|
import { g as getIconScale } from "../../chunks/component.js";
|
|
9
9
|
import { N as NumberStringFormat } from "../../chunks/locale.js";
|
|
10
10
|
import { t as toggleOpenClose } from "../../chunks/openCloseComponent.js";
|
|
@@ -88,7 +88,11 @@ export abstract class Autocomplete extends LitElement {
|
|
|
88
88
|
* @see [MDN - maxlength](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#maxlength)
|
|
89
89
|
*/
|
|
90
90
|
accessor maxLength: number | undefined;
|
|
91
|
-
/**
|
|
91
|
+
/**
|
|
92
|
+
* Replace localized message strings with your own strings.
|
|
93
|
+
*
|
|
94
|
+
* _**Note**: Individual message keys may change between releases._
|
|
95
|
+
*/
|
|
92
96
|
accessor messageOverrides: {
|
|
93
97
|
clear?: string | undefined;
|
|
94
98
|
loading?: string | undefined;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { c as customElement } from "../../chunks/runtime.js";
|
|
3
3
|
import { css, html } from "lit";
|
|
4
4
|
import { LitElement, nothing, safeClassMap, safeStyleMap } from "@arcgis/lumina";
|
|
5
|
-
import {
|
|
5
|
+
import { e as getModeName } from "../../chunks/dom.js";
|
|
6
6
|
import { h as hexToRGB, i as isValidHex } from "../../chunks/utils.js";
|
|
7
7
|
const CSS = {
|
|
8
8
|
thumbnail: "thumbnail",
|
|
@@ -88,7 +88,11 @@ export abstract class Block extends LitElement {
|
|
|
88
88
|
* @default "bottom-end"
|
|
89
89
|
*/
|
|
90
90
|
accessor menuPlacement: LogicalPlacement;
|
|
91
|
-
/**
|
|
91
|
+
/**
|
|
92
|
+
* Replace localized message strings with your own strings.
|
|
93
|
+
*
|
|
94
|
+
* _**Note**: Individual message keys may change between releases._
|
|
95
|
+
*/
|
|
92
96
|
accessor messageOverrides: {
|
|
93
97
|
collapse?: string | undefined;
|
|
94
98
|
expand?: string | undefined;
|
|
@@ -4,7 +4,7 @@ import { debounce } from "es-toolkit";
|
|
|
4
4
|
import { css, html } from "lit";
|
|
5
5
|
import { LitElement, createEvent, safeClassMap } from "@arcgis/lumina";
|
|
6
6
|
import { c as createObserver } from "../../chunks/observers.js";
|
|
7
|
-
import {
|
|
7
|
+
import { h as getRootNode, a as slotChangeGetAssignedElements } from "../../chunks/dom.js";
|
|
8
8
|
import { g as guid } from "../../chunks/guid.js";
|
|
9
9
|
import { u as useSetFocus } from "../../chunks/useSetFocus.js";
|
|
10
10
|
import { u as useCancelable } from "../../chunks/useCancelable.js";
|
|
@@ -26,7 +26,11 @@ export abstract class BlockSection extends LitElement {
|
|
|
26
26
|
accessor iconFlipRtl: FlipContext | undefined;
|
|
27
27
|
/** Specifies an icon to display at the start of the component. */
|
|
28
28
|
accessor iconStart: IconName | undefined;
|
|
29
|
-
/**
|
|
29
|
+
/**
|
|
30
|
+
* Replace localized message strings with your own strings.
|
|
31
|
+
*
|
|
32
|
+
* _**Note**: Individual message keys may change between releases._
|
|
33
|
+
*/
|
|
30
34
|
accessor messageOverrides: {
|
|
31
35
|
collapse?: string | undefined;
|
|
32
36
|
expand?: string | undefined;
|
|
@@ -69,7 +69,11 @@ export abstract class Button extends LitElement {
|
|
|
69
69
|
* @default false
|
|
70
70
|
*/
|
|
71
71
|
accessor loading: boolean;
|
|
72
|
-
/**
|
|
72
|
+
/**
|
|
73
|
+
* Replace localized message strings with your own strings.
|
|
74
|
+
*
|
|
75
|
+
* _**Note**: Individual message keys may change between releases._
|
|
76
|
+
*/
|
|
73
77
|
accessor messageOverrides: { loading?: string | undefined; };
|
|
74
78
|
/** Specifies the name of the component. Required to pass the component's `value` on form submission. */
|
|
75
79
|
accessor name: string | undefined;
|
|
@@ -10,7 +10,7 @@ import { u as useLabel } from "../../chunks/useLabel.js";
|
|
|
10
10
|
import { c as createObserver, u as updateRefObserver } from "../../chunks/observers.js";
|
|
11
11
|
import { g as getIconScale } from "../../chunks/component.js";
|
|
12
12
|
import { u as useT9n } from "../../chunks/useT9n.js";
|
|
13
|
-
import {
|
|
13
|
+
import { i as hasVisibleContent } from "../../chunks/dom.js";
|
|
14
14
|
import { u as useSetFocus } from "../../chunks/useSetFocus.js";
|
|
15
15
|
import { u as useInteractive } from "../../chunks/useInteractive.js";
|
|
16
16
|
import { u as useFormTrigger } from "../../chunks/useFormTrigger.js";
|
|
@@ -37,7 +37,11 @@ export abstract class Card extends LitElement {
|
|
|
37
37
|
* @default false
|
|
38
38
|
*/
|
|
39
39
|
accessor loading: boolean;
|
|
40
|
-
/**
|
|
40
|
+
/**
|
|
41
|
+
* Replace localized message strings with your own strings.
|
|
42
|
+
*
|
|
43
|
+
* _**Note**: Individual message keys may change between releases._
|
|
44
|
+
*/
|
|
41
45
|
accessor messageOverrides: {
|
|
42
46
|
select?: string | undefined;
|
|
43
47
|
loading?: string | undefined;
|
|
@@ -54,7 +54,11 @@ export abstract class Carousel extends LitElement {
|
|
|
54
54
|
* @required
|
|
55
55
|
*/
|
|
56
56
|
accessor label: string;
|
|
57
|
-
/**
|
|
57
|
+
/**
|
|
58
|
+
* Replace localized message strings with your own strings.
|
|
59
|
+
*
|
|
60
|
+
* _**Note**: Individual message keys may change between releases._
|
|
61
|
+
*/
|
|
58
62
|
accessor messageOverrides: {
|
|
59
63
|
previous?: string | undefined;
|
|
60
64
|
next?: string | undefined;
|
|
@@ -37,7 +37,11 @@ export abstract class Checkbox extends LitElement {
|
|
|
37
37
|
accessor label: string | undefined;
|
|
38
38
|
/** Specifies the component's label text. */
|
|
39
39
|
accessor labelText: string | undefined;
|
|
40
|
-
/**
|
|
40
|
+
/**
|
|
41
|
+
* Replace localized message strings with your own strings.
|
|
42
|
+
*
|
|
43
|
+
* _**Note**: Individual message keys may change between releases._
|
|
44
|
+
*/
|
|
41
45
|
accessor messageOverrides: { required?: string | undefined; };
|
|
42
46
|
/** Specifies the name of the component. Required to pass the component's `value` on form submission. */
|
|
43
47
|
accessor name: string | undefined;
|
|
@@ -67,7 +67,11 @@ export abstract class Chip extends LitElement {
|
|
|
67
67
|
* @required
|
|
68
68
|
*/
|
|
69
69
|
accessor label: string;
|
|
70
|
-
/**
|
|
70
|
+
/**
|
|
71
|
+
* Replace localized message strings with your own strings.
|
|
72
|
+
*
|
|
73
|
+
* _**Note**: Individual message keys may change between releases._
|
|
74
|
+
*/
|
|
71
75
|
accessor messageOverrides: { dismissLabel?: string | undefined; };
|
|
72
76
|
/**
|
|
73
77
|
* Specifies the size of the component.
|