@esri/calcite-components 6.0.0-next.32 → 6.0.0-next.33
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/{UF7RT555.js → 2VWNFQUM.js} +1 -1
- package/dist/cdn/{EEA73SFZ.js → 2XRRZZNX.js} +1 -1
- package/dist/cdn/{DRWMIG2A.js → 2ZFHNAXZ.js} +1 -1
- package/dist/cdn/{CW3F5PSX.js → 35NRDMCX.js} +1 -1
- package/dist/cdn/{S26F7J4L.js → 3C2HB7CY.js} +1 -1
- package/dist/cdn/{XALW74CE.js → 3C3TBDGV.js} +1 -1
- package/dist/cdn/3EPPXFMX.js +2 -0
- package/dist/cdn/{CXYDFUFV.js → 3NPDLRO4.js} +1 -1
- package/dist/cdn/{LGKFD5NE.js → 4FC6ZNYV.js} +1 -1
- package/dist/cdn/{MGB7IHBN.js → 56F7DPON.js} +1 -1
- package/dist/cdn/{FEGFX2WD.js → 57JJ6ZZV.js} +1 -1
- package/dist/cdn/{AXMEQ5HK.js → 5AWH7Z3B.js} +1 -1
- package/dist/cdn/{5HV3MQAN.js → 5BMXXMRC.js} +1 -1
- package/dist/cdn/{KELOMBLQ.js → 5GSCFOQS.js} +1 -1
- package/dist/cdn/{X5DVSEAW.js → 5KQ2IA3C.js} +1 -1
- package/dist/cdn/{UOIFOIA6.js → 5MKSLN45.js} +1 -1
- package/dist/cdn/{WYG6UDXB.js → 5RMWMCMK.js} +1 -1
- package/dist/cdn/{RMYDLD3L.js → 5SDMSGT3.js} +1 -1
- package/dist/cdn/{GQSCXVIU.js → 5VP66O25.js} +1 -1
- package/dist/cdn/{GEYT6LB7.js → 66765WFJ.js} +1 -1
- package/dist/cdn/{2ADZ7WR7.js → 6HLLKG6Y.js} +1 -1
- package/dist/cdn/{CERRSYTB.js → 6IEIN32F.js} +1 -1
- package/dist/cdn/{UD45ZUIJ.js → 6KXXZDEC.js} +1 -1
- package/dist/cdn/{S663GSUU.js → 6PIQA36G.js} +1 -1
- package/dist/cdn/{OD5VRFWK.js → 7FSMYW6V.js} +1 -1
- package/dist/cdn/{ZNERL4GM.js → 7JK6M2KQ.js} +1 -1
- package/dist/cdn/{3KAPB7Y4.js → 7OQZCK5X.js} +1 -1
- package/dist/cdn/{74CFBRNP.js → A5MXGGUV.js} +1 -1
- package/dist/cdn/{VZXKU2HR.js → AB6P7MSJ.js} +1 -1
- package/dist/cdn/{UXLAVDPR.js → AELAOQDK.js} +1 -1
- package/dist/cdn/{O7KTF2FA.js → AMWDZTHP.js} +1 -1
- package/dist/cdn/{CXDE6DBI.js → B22C5ARQ.js} +1 -1
- package/dist/cdn/{WRX5ZQ6D.js → B4DKARFC.js} +1 -1
- package/dist/cdn/{L2YJXRI7.js → BOSX3N3S.js} +1 -1
- package/dist/cdn/{SHMDC6YI.js → BPQQK2PE.js} +1 -1
- package/dist/cdn/{PP543GMX.js → BQNZBFBZ.js} +1 -1
- package/dist/cdn/{LW757VXF.js → BVWV6V6T.js} +1 -1
- package/dist/cdn/{ZSKZIJOQ.js → C2FSRNVO.js} +1 -1
- package/dist/cdn/{ZHPJ2ZY3.js → C55GX5QU.js} +1 -1
- package/dist/cdn/{7B7AUCFT.js → C5KJFCKP.js} +1 -1
- package/dist/cdn/{HSPTT3LV.js → CCKBSHLN.js} +1 -1
- package/dist/cdn/{SZ3RMLLZ.js → CEKDUGEY.js} +1 -1
- package/dist/cdn/{27T56KCJ.js → CSEZ4GFT.js} +1 -1
- package/dist/cdn/{KWGKBIM3.js → DFOFJ7ZA.js} +1 -1
- package/dist/cdn/{TQP5GGZ4.js → DQWHY52J.js} +1 -1
- package/dist/cdn/{4X66Y5SG.js → DR5Y35HC.js} +1 -1
- package/dist/cdn/{5AF7LKCH.js → DUP7FV32.js} +1 -1
- package/dist/cdn/{TPAN4Z6I.js → ECCTAVBE.js} +1 -1
- package/dist/cdn/{BE6XQC6U.js → ECMMT2MZ.js} +1 -1
- package/dist/cdn/{IZPGTGLJ.js → EDGTAZ5W.js} +1 -1
- package/dist/cdn/{SNKADWIL.js → EK4CLXUZ.js} +1 -1
- package/dist/cdn/{JJSTRCI5.js → FF5B7ZTI.js} +1 -1
- package/dist/cdn/{4KYT4OEB.js → FY4M2W2D.js} +1 -1
- package/dist/cdn/{3UY6U54N.js → G7HEA6KZ.js} +1 -1
- package/dist/cdn/{COIMZWZL.js → GFUEZCFE.js} +1 -1
- package/dist/cdn/{MJA76ZEB.js → GIQ6J25X.js} +1 -1
- package/dist/cdn/{X653HX5H.js → GKTW7VMU.js} +1 -1
- package/dist/cdn/{PXOGEKNF.js → GQHLEO5S.js} +1 -1
- package/dist/cdn/{EZI27HAU.js → HCCYK35J.js} +1 -1
- package/dist/cdn/{VGYAXHO5.js → HCZQ3TCB.js} +1 -1
- package/dist/cdn/{MKBFZDRN.js → HMTZ2NNR.js} +1 -1
- package/dist/cdn/{MX6NVG77.js → HP327QNA.js} +1 -1
- package/dist/cdn/{QILUIDT6.js → HPGYEYX3.js} +1 -1
- package/dist/cdn/{S3H4IEOB.js → I23IFMUU.js} +1 -1
- package/dist/cdn/{MZUQW7T7.js → IKS2OZTW.js} +1 -1
- package/dist/cdn/{EIFUYOVZ.js → IYH3JXKS.js} +1 -1
- package/dist/cdn/{OKOR5MWV.js → J66LFDMN.js} +1 -1
- package/dist/cdn/{OZLM7DWI.js → JAZY6WI5.js} +1 -1
- package/dist/cdn/{TTIGWOQG.js → JB42MFYM.js} +1 -1
- package/dist/cdn/{CJ2QW6FE.js → JIZAOJJY.js} +1 -1
- package/dist/cdn/JKD2MQOI.js +2 -0
- package/dist/cdn/{4PH7QLZ5.js → JLHY2463.js} +1 -1
- package/dist/cdn/{M5EKCOWL.js → JVJOB75Y.js} +1 -1
- package/dist/cdn/{7HIIGKXC.js → JZTVLSQS.js} +1 -1
- package/dist/cdn/{M4QXPEYA.js → K2BXNIQO.js} +1 -1
- package/dist/cdn/{N3EQA7VR.js → KCKCV752.js} +1 -1
- package/dist/cdn/{AXHUTZFE.js → KP3LS4UE.js} +1 -1
- package/dist/cdn/{FU7MF74E.js → KWAIBA22.js} +1 -1
- package/dist/cdn/{4IJ4XYKR.js → KXEAX4VX.js} +1 -1
- package/dist/cdn/{VYD36H5B.js → KYLAU6IL.js} +1 -1
- package/dist/cdn/{RHP7E5MQ.js → L2RFAHN5.js} +1 -1
- package/dist/cdn/{27X4URIG.js → LAAL7KCJ.js} +1 -1
- package/dist/cdn/{7VHIR7OZ.js → LAJTPUC3.js} +1 -1
- package/dist/cdn/{UIQPXBY4.js → LUBZNR4Y.js} +1 -1
- package/dist/cdn/{LGADD3GQ.js → MCYGB35M.js} +1 -1
- package/dist/cdn/{LQBOZRSZ.js → MGGEICJM.js} +1 -1
- package/dist/cdn/{UFT5JASX.js → N72FKUWM.js} +1 -1
- package/dist/cdn/{R7A2S2JK.js → NEVU5H6J.js} +1 -1
- package/dist/cdn/{C7S3BDBX.js → NIDV4UEV.js} +1 -1
- package/dist/cdn/{YHFR2OVW.js → NL4MR6BH.js} +1 -1
- package/dist/cdn/{ZUVHRYHB.js → NQUV4A65.js} +1 -1
- package/dist/cdn/{CCVUAR5Z.js → O3DJRND5.js} +1 -1
- package/dist/cdn/{IOERUJQH.js → OCSQ2II3.js} +1 -1
- package/dist/cdn/{DZ5YZLLW.js → OIIPFKBZ.js} +1 -1
- package/dist/cdn/{EHNEXHJE.js → OTDNC5KR.js} +1 -1
- package/dist/cdn/{OTCKOUA5.js → OUJAE5RB.js} +1 -1
- package/dist/cdn/{BAM2PBGA.js → OWKELGVS.js} +1 -1
- package/dist/cdn/{AMN4XNVI.js → OWPXECEC.js} +1 -1
- package/dist/cdn/{PZCLR7V5.js → PAFJUPOZ.js} +1 -1
- package/dist/cdn/{B6MKXPF6.js → PHU2JCF5.js} +1 -1
- package/dist/cdn/{GKYK7XCO.js → PUHGVOYL.js} +1 -1
- package/dist/cdn/{DZU2XLXM.js → QJTUTYOH.js} +1 -1
- package/dist/cdn/{6IK4YY4Q.js → QNAZ4SXK.js} +1 -1
- package/dist/cdn/{V3GKPSJW.js → QRHJ2A57.js} +1 -1
- package/dist/cdn/{PJWHKL5T.js → QVPPJ5MH.js} +1 -1
- package/dist/cdn/{3BGTTAUS.js → RIW4G62N.js} +1 -1
- package/dist/cdn/{EKI76LG7.js → RMYMCVZL.js} +1 -1
- package/dist/cdn/{JDKIG3OK.js → SGA27RSE.js} +1 -1
- package/dist/cdn/{HPJSPMNH.js → SOZY3VOT.js} +1 -1
- package/dist/cdn/{TBE6QB2J.js → T7QXXMRX.js} +1 -1
- package/dist/cdn/{JCIA6RBQ.js → TD6RR4II.js} +1 -1
- package/dist/cdn/{LSUYGJUQ.js → TF4USKPA.js} +1 -1
- package/dist/cdn/{PXUJV3K3.js → TNH3QVHR.js} +1 -1
- package/dist/cdn/{K46PS2N6.js → TOZDS6EO.js} +1 -1
- package/dist/cdn/{D7Z5DPHN.js → TTODQJRR.js} +1 -1
- package/dist/cdn/{SKHMBPZX.js → TV44WGYF.js} +1 -1
- package/dist/cdn/{I2DVQMTF.js → UCPJI7AH.js} +1 -1
- package/dist/cdn/{MGO56IDG.js → UEZ5DNUC.js} +1 -1
- package/dist/cdn/{22EM6PC2.js → UWG3CQLP.js} +1 -1
- package/dist/cdn/{KCVCJJ3G.js → UXUBLL7B.js} +1 -1
- package/dist/cdn/{X52BCUBS.js → V5EGTCRW.js} +1 -1
- package/dist/cdn/{EIZDIRB4.js → VAF5ZWJY.js} +1 -1
- package/dist/cdn/{CXEQ3W3L.js → VBKFLHXE.js} +1 -1
- package/dist/cdn/{BQUS7O7D.js → VEHPEKTJ.js} +1 -1
- package/dist/cdn/{J6VYFTM4.js → VPNZVJUQ.js} +1 -1
- package/dist/cdn/{UR5QD42E.js → VQDYKKWG.js} +1 -1
- package/dist/cdn/{HDPXMQMP.js → VQISU4CH.js} +1 -1
- package/dist/cdn/{5NP4NQ75.js → VWKMABNH.js} +1 -1
- package/dist/cdn/{KSGKP7BB.js → W3HWQYI4.js} +1 -1
- package/dist/cdn/{ISBKAVOX.js → WBV45A6Q.js} +1 -1
- package/dist/cdn/WSJYVPSL.js +2 -0
- package/dist/cdn/{ZGI3EA4A.js → X2IH4REQ.js} +1 -1
- package/dist/cdn/{5CBIKAEI.js → XUBVPXWY.js} +1 -1
- package/dist/cdn/{MTMSXD7G.js → YAZJPF5S.js} +1 -1
- package/dist/cdn/{4UJZNDVL.js → YCXXUZSU.js} +1 -1
- package/dist/cdn/{467XRWLI.js → ZAL3DHIT.js} +1 -1
- package/dist/cdn/{6UWV2IB4.js → ZM6DBYIT.js} +1 -1
- package/dist/cdn/index.js +1 -1
- package/dist/chunks/runtime.js +3 -3
- package/dist/components/calcite-action/customElement.d.ts +1 -1
- package/dist/components/calcite-action/customElement.js +3 -4
- package/dist/components/calcite-action-bar/customElement.js +371 -31
- package/dist/components/calcite-action-group/customElement.d.ts +7 -0
- package/dist/components/calcite-action-group/customElement.js +57 -27
- package/dist/components/calcite-action-menu/customElement.js +214 -55
- package/dist/docs/api.json +1 -1
- package/dist/docs/docs.json +1 -1
- package/dist/docs/web-types.json +1 -1
- package/dist/loader.js +2 -2
- package/dist/types/lumina.d.ts +1 -1
- package/dist/types/preact.d.ts +1 -1
- package/dist/types/react.d.ts +1 -1
- package/dist/types/stencil.d.ts +1 -1
- package/package.json +1 -1
- package/dist/cdn/OX7I2ZE2.js +0 -2
- package/dist/cdn/QVOUVRVF.js +0 -2
- package/dist/cdn/SS7TOHAX.js +0 -2
|
@@ -5,7 +5,7 @@ import { nothing, html, css } from "lit";
|
|
|
5
5
|
import { LitElement, createEvent, safeClassMap } from "@arcgis/lumina";
|
|
6
6
|
import { ref, createRef } from "lit/directives/ref.js";
|
|
7
7
|
import { useDirection } from "@arcgis/lumina/controllers";
|
|
8
|
-
import { m as getStylePixelValue, B as filterDirectChildren, d as slotChangeGetAssignedElements, b as getSlotAssignedElements
|
|
8
|
+
import { m as getStylePixelValue, B as filterDirectChildren, d as slotChangeGetAssignedElements, b as getSlotAssignedElements } from "../../chunks/dom.js";
|
|
9
9
|
import { c as createObserver } from "../../chunks/observers.js";
|
|
10
10
|
import { S as SLOTS, i as isActionGroup } from "../../chunks/resources.js";
|
|
11
11
|
import { u as useT9n } from "../../chunks/useT9n.js";
|
|
@@ -133,6 +133,7 @@ class ActionBar extends LitElement {
|
|
|
133
133
|
constructor() {
|
|
134
134
|
super();
|
|
135
135
|
this.actions = [];
|
|
136
|
+
this.navigationItems = [];
|
|
136
137
|
this.containerRef = createRef();
|
|
137
138
|
this.defaultSlotRef = createRef();
|
|
138
139
|
this.actionsStartSlotRef = createRef();
|
|
@@ -147,14 +148,17 @@ class ActionBar extends LitElement {
|
|
|
147
148
|
this.actionsStartGroups = [];
|
|
148
149
|
this.actionsEnd = [];
|
|
149
150
|
this.actionsEndGroups = [];
|
|
151
|
+
this.automaticallyOverflowedActions = [];
|
|
152
|
+
this.authoredMenuActions = [];
|
|
150
153
|
this.overflowPassId = 0;
|
|
151
154
|
this.suppressedActionGroupActionsChange = /* @__PURE__ */ new WeakMap();
|
|
152
155
|
this.cancelable = useCancelable()(this);
|
|
153
156
|
this.resize = debounce(({ width, height }) => {
|
|
154
157
|
const { expanded, expandToggleDisabled, layout, expandPosition } = this;
|
|
155
|
-
if (!this.containerRef.value) {
|
|
158
|
+
if (!this.el.isConnected || !this.containerRef.value) {
|
|
156
159
|
return;
|
|
157
160
|
}
|
|
161
|
+
this.updateGroups();
|
|
158
162
|
if (this.usesWrap) {
|
|
159
163
|
this.scheduleLineMeasure();
|
|
160
164
|
return;
|
|
@@ -162,7 +166,6 @@ class ActionBar extends LitElement {
|
|
|
162
166
|
if (this.overflowMode !== "collapse" || layout === "vertical" && !height || layout === "horizontal" && !width) {
|
|
163
167
|
return;
|
|
164
168
|
}
|
|
165
|
-
this.updateGroups();
|
|
166
169
|
const itemSizes = this.getItemSizes();
|
|
167
170
|
const { actionGroups: defaultActionGroups, actionsEnd, actionsEndGroups, actionsStart, actionsStartGroups, defaultSlotItems } = this;
|
|
168
171
|
const slottedActionGroups = [
|
|
@@ -222,7 +225,13 @@ class ActionBar extends LitElement {
|
|
|
222
225
|
this.scheduleLineMeasure();
|
|
223
226
|
return;
|
|
224
227
|
}
|
|
225
|
-
const { width, height } = entry.contentRect;
|
|
228
|
+
const { width, height } = entry.target && entry.target !== this.el ? { width: this.el.clientWidth, height: this.el.clientHeight } : entry.contentRect;
|
|
229
|
+
const axis = this.layout === "horizontal" ? "width" : "height";
|
|
230
|
+
const size = axis === "width" ? width : height;
|
|
231
|
+
if (this.lastOverflowAxisSize?.axis === axis && this.lastOverflowAxisSize.size === size) {
|
|
232
|
+
return;
|
|
233
|
+
}
|
|
234
|
+
this.lastOverflowAxisSize = { axis, size };
|
|
226
235
|
this.resize({ width, height });
|
|
227
236
|
};
|
|
228
237
|
this.resizeObserver = createObserver("resize", (entries) => this.resizeHandlerEntries(entries));
|
|
@@ -234,6 +243,7 @@ class ActionBar extends LitElement {
|
|
|
234
243
|
this.focusSetter = useFocusable()(this).setFocus;
|
|
235
244
|
this.setExpandToggleEl = (el) => {
|
|
236
245
|
this.expandToggleEl = el;
|
|
246
|
+
this.syncNavigationItemTabIndexes();
|
|
237
247
|
};
|
|
238
248
|
this.hasActionsEnd = false;
|
|
239
249
|
this.hasActionsStart = false;
|
|
@@ -254,7 +264,9 @@ class ActionBar extends LitElement {
|
|
|
254
264
|
this.listen("calciteActionMenuOpen", this.actionMenuOpenHandler);
|
|
255
265
|
this.listen("calciteInternalActionGroupActionsChange", this.handleActionGroupActionsChange);
|
|
256
266
|
this.listen("calciteInternalActionMenuActionsChange", this.handleActionMenuActionsChange);
|
|
267
|
+
this.listen("click", this.handleFocusIn);
|
|
257
268
|
this.listen("keydown", this.handleKeyDown);
|
|
269
|
+
this.listen("focusin", this.handleFocusIn);
|
|
258
270
|
}
|
|
259
271
|
static {
|
|
260
272
|
this.properties = { expandTooltip: [16, {}, { state: true }], hasActionsEnd: [16, {}, { state: true }], hasActionsStart: [16, {}, { state: true }], hasActionGroups: [16, {}, { state: true }], lineOffsets: [16, {}, { state: true }], actionsEndGroupLabel: 1, actionsStartGroupLabel: 1, floating: [7, {}, { reflect: true, type: Boolean }], expandToggleDisabled: [7, {}, { reflect: true, type: Boolean }], expandDisabled: [7, {}, { reflect: true, type: Boolean }], expanded: [7, {}, { reflect: true, type: Boolean }], expandPosition: [3, {}, { reflect: true }], layout: [3, {}, { reflect: true }], overflowMode: [3, {}, { reflect: true }], messageOverrides: [0, {}, { attribute: false }], overflowActionsDisabled: [7, {}, { reflect: true, type: Boolean }], overlayPositioning: [3, {}, { reflect: true }], position: [3, {}, { reflect: true }], scale: [3, {}, { reflect: true }], selectionAppearance: [3, {}, { reflect: true }] };
|
|
@@ -303,6 +315,12 @@ class ActionBar extends LitElement {
|
|
|
303
315
|
}
|
|
304
316
|
connectedCallback() {
|
|
305
317
|
super.connectedCallback();
|
|
318
|
+
this.updateGroups();
|
|
319
|
+
this.updateNavigationItems();
|
|
320
|
+
this.syncNavigationItemTabIndexes();
|
|
321
|
+
this.overflowActions();
|
|
322
|
+
this.updateActions();
|
|
323
|
+
this.overflowActionsDisabledHandler(this.overflowActionsDisabled);
|
|
306
324
|
this.overflowModeHandler();
|
|
307
325
|
this.cancelable.add(this.resize);
|
|
308
326
|
}
|
|
@@ -317,6 +335,9 @@ class ActionBar extends LitElement {
|
|
|
317
335
|
this.updateLines();
|
|
318
336
|
}
|
|
319
337
|
}
|
|
338
|
+
if (changes.has("overflowActionsDisabled") && (this.hasUpdated || this.overflowActionsDisabled !== false)) {
|
|
339
|
+
this.overflowActionsDisabledHandler(this.overflowActionsDisabled);
|
|
340
|
+
}
|
|
320
341
|
if (changes.has("overflowMode") && (this.hasUpdated || this.overflowMode !== "collapse")) {
|
|
321
342
|
if (!this.usesWrap && this.lineMeasureFrame != null) {
|
|
322
343
|
cancelAnimationFrame(this.lineMeasureFrame);
|
|
@@ -367,7 +388,7 @@ class ActionBar extends LitElement {
|
|
|
367
388
|
const itemSizes = this.actions.map((action) => action[clientSize] || 0);
|
|
368
389
|
const slottedActionGroupMenus = this.getTrackedActionGroups().flatMap((group) => filterDirectChildren(group, "calcite-action-menu"));
|
|
369
390
|
slottedActionGroupMenus.forEach((menu) => {
|
|
370
|
-
const triggerAction = menu.actions.find((action) => action.slot === SLOTS$1.trigger);
|
|
391
|
+
const triggerAction = (menu.actions ?? []).find((action) => action.slot === SLOTS$1.trigger);
|
|
371
392
|
itemSizes.push((triggerAction ?? menu)[clientSize] || 0);
|
|
372
393
|
});
|
|
373
394
|
if (expandToggleEl) {
|
|
@@ -393,6 +414,17 @@ class ActionBar extends LitElement {
|
|
|
393
414
|
}
|
|
394
415
|
this.overflowActions();
|
|
395
416
|
}
|
|
417
|
+
overflowActionsDisabledHandler(overflowActionsDisabled) {
|
|
418
|
+
if (overflowActionsDisabled) {
|
|
419
|
+
this.resizeObserver?.disconnect();
|
|
420
|
+
return;
|
|
421
|
+
}
|
|
422
|
+
this.resizeObserver?.observe(this.el);
|
|
423
|
+
if (this.containerRef.value) {
|
|
424
|
+
this.resizeObserver?.observe(this.containerRef.value);
|
|
425
|
+
}
|
|
426
|
+
this.overflowActions();
|
|
427
|
+
}
|
|
396
428
|
actionMenuOpenHandler(event) {
|
|
397
429
|
const composedPath = event.composedPath();
|
|
398
430
|
const source = composedPath.find((element) => isActionGroup(element) || isActionMenu(element));
|
|
@@ -412,22 +444,36 @@ class ActionBar extends LitElement {
|
|
|
412
444
|
menu.open = false;
|
|
413
445
|
}
|
|
414
446
|
});
|
|
447
|
+
this.updateActions();
|
|
415
448
|
}
|
|
416
449
|
runOverflowActions({ actionGroups, expanded, overflowCount }) {
|
|
417
450
|
const overflowPassId = ++this.overflowPassId;
|
|
451
|
+
const directActions = actionGroups.flatMap((group) => group.actions.filter((action) => action.parentElement === group));
|
|
452
|
+
this.automaticallyOverflowedActions = this.automaticallyOverflowedActions.filter((action) => directActions.includes(action));
|
|
453
|
+
this.authoredMenuActions = this.authoredMenuActions.filter((action) => directActions.includes(action) && action.slot === SLOTS.menuActions);
|
|
454
|
+
directActions.forEach((action) => {
|
|
455
|
+
if (action.slot === SLOTS.menuActions && !this.automaticallyOverflowedActions.includes(action) && !this.authoredMenuActions.includes(action)) {
|
|
456
|
+
this.authoredMenuActions.push(action);
|
|
457
|
+
}
|
|
458
|
+
});
|
|
418
459
|
const slotStateByGroup = /* @__PURE__ */ new Map();
|
|
419
460
|
actionGroups.forEach((group) => {
|
|
420
|
-
const
|
|
421
|
-
slotStateByGroup.set(group,
|
|
461
|
+
const directActions2 = group.actions.filter((action) => action.parentElement === group);
|
|
462
|
+
slotStateByGroup.set(group, directActions2.map((action) => action.slot ?? "").join("|"));
|
|
422
463
|
});
|
|
423
464
|
overflowActions({
|
|
424
465
|
actionGroups,
|
|
425
466
|
expanded,
|
|
426
467
|
overflowCount
|
|
427
468
|
});
|
|
469
|
+
this.authoredMenuActions.forEach((action) => {
|
|
470
|
+
action.slot = SLOTS.menuActions;
|
|
471
|
+
action.textEnabled = true;
|
|
472
|
+
});
|
|
473
|
+
this.automaticallyOverflowedActions = directActions.filter((action) => action.slot === SLOTS.menuActions && !this.authoredMenuActions.includes(action));
|
|
428
474
|
actionGroups.forEach((group) => {
|
|
429
|
-
const
|
|
430
|
-
const nextSlotState =
|
|
475
|
+
const directActions2 = group.actions.filter((action) => action.parentElement === group);
|
|
476
|
+
const nextSlotState = directActions2.map((action) => action.slot ?? "").join("|");
|
|
431
477
|
if (slotStateByGroup.get(group) !== nextSlotState) {
|
|
432
478
|
this.suppressedActionGroupActionsChange.set(group, overflowPassId);
|
|
433
479
|
this.queueSuppressedActionGroupActionsChangeCleanup(group, overflowPassId);
|
|
@@ -459,6 +505,15 @@ class ActionBar extends LitElement {
|
|
|
459
505
|
group.layout = this.layout;
|
|
460
506
|
group.scale = this.scale;
|
|
461
507
|
});
|
|
508
|
+
this.syncNavItems();
|
|
509
|
+
}
|
|
510
|
+
syncNavItems() {
|
|
511
|
+
if (!this.el.isConnected) {
|
|
512
|
+
return;
|
|
513
|
+
}
|
|
514
|
+
this.updateNavigationItems();
|
|
515
|
+
this.syncNavigationItemTabIndexes();
|
|
516
|
+
this.updateActions();
|
|
462
517
|
}
|
|
463
518
|
scheduleLineMeasure() {
|
|
464
519
|
if (this.lineMeasureFrame != null) {
|
|
@@ -514,15 +569,21 @@ class ActionBar extends LitElement {
|
|
|
514
569
|
}
|
|
515
570
|
handleDefaultSlotChange() {
|
|
516
571
|
this.syncSlotAndActions(() => this.syncDefaultSlot());
|
|
572
|
+
this.updateGroups();
|
|
573
|
+
this.updateNavigationItems();
|
|
574
|
+
this.syncNavigationItemTabIndexes();
|
|
575
|
+
this.updateActions();
|
|
517
576
|
if (this.usesWrap) {
|
|
518
577
|
this.scheduleLineMeasure();
|
|
519
578
|
}
|
|
520
579
|
}
|
|
521
580
|
handleActionsEndSlotChange() {
|
|
522
581
|
this.syncSlotAndActions(() => this.syncActionsEndSlot());
|
|
582
|
+
this.syncNavigationItemTabIndexes();
|
|
523
583
|
}
|
|
524
584
|
handleActionsStartSlotChange() {
|
|
525
585
|
this.syncSlotAndActions(() => this.syncActionsStartSlot());
|
|
586
|
+
this.syncNavigationItemTabIndexes();
|
|
526
587
|
}
|
|
527
588
|
handleTooltipSlotChange(event) {
|
|
528
589
|
const tooltips = slotChangeGetAssignedElements(event).filter(isTooltip);
|
|
@@ -537,6 +598,46 @@ class ActionBar extends LitElement {
|
|
|
537
598
|
action.selectionAppearance = this.selectionAppearance;
|
|
538
599
|
});
|
|
539
600
|
}
|
|
601
|
+
updateNavigationItems() {
|
|
602
|
+
const navigationItems = [
|
|
603
|
+
...this.getNavigationItems(this.actionsStart),
|
|
604
|
+
...this.getNavigationItems(this.defaultSlotItems),
|
|
605
|
+
...this.getNavigationItems(this.actionsEnd)
|
|
606
|
+
];
|
|
607
|
+
const { expandToggleEl } = this;
|
|
608
|
+
this.navigationItems = expandToggleEl && this.isNavigableAction(expandToggleEl) ? this.expandPosition === "start" ? [expandToggleEl, ...navigationItems] : [...navigationItems, expandToggleEl] : navigationItems;
|
|
609
|
+
}
|
|
610
|
+
getNavigationItems(items) {
|
|
611
|
+
return items.flatMap((item) => {
|
|
612
|
+
if (isAction(item)) {
|
|
613
|
+
return this.isNavigableAction(item) ? [item] : [];
|
|
614
|
+
}
|
|
615
|
+
if (isActionMenu(item)) {
|
|
616
|
+
return this.isNavigableActionMenu(item) ? [item] : [];
|
|
617
|
+
}
|
|
618
|
+
return this.getActionGroupNavigationItems(item);
|
|
619
|
+
});
|
|
620
|
+
}
|
|
621
|
+
getActionGroupNavigationItems(actionGroup) {
|
|
622
|
+
if (actionGroup.hasAttribute("hidden")) {
|
|
623
|
+
return [];
|
|
624
|
+
}
|
|
625
|
+
const actions = (actionGroup.actions ?? []).filter((action) => this.isNavigableAction(action));
|
|
626
|
+
const actionMenus = filterDirectChildren(actionGroup, "calcite-action-menu").filter((actionMenu2) => this.isNavigableActionMenu(actionMenu2));
|
|
627
|
+
const navigationItems = [...actions, ...actionMenus].sort((itemA, itemB) => itemA === itemB ? 0 : itemA.compareDocumentPosition(itemB) & Node.DOCUMENT_POSITION_FOLLOWING ? -1 : 1);
|
|
628
|
+
const { actionMenu } = actionGroup;
|
|
629
|
+
if (actionMenu && this.isNavigableActionMenu(actionMenu) && !navigationItems.includes(actionMenu)) {
|
|
630
|
+
navigationItems.push(actionMenu);
|
|
631
|
+
}
|
|
632
|
+
return navigationItems;
|
|
633
|
+
}
|
|
634
|
+
isNavigableAction(action) {
|
|
635
|
+
return !action.disabled && !action.hidden && !action.inert && action.slot !== "menu-actions" && !action.closest("calcite-action-menu");
|
|
636
|
+
}
|
|
637
|
+
isNavigableActionMenu(actionMenu) {
|
|
638
|
+
const menuButtonEl = actionMenu.menuButtonEl ?? actionMenu.actions?.find((action) => action.slot === SLOTS$1.trigger);
|
|
639
|
+
return !actionMenu.hidden && !actionMenu.inert && !menuButtonEl?.disabled && !menuButtonEl?.hidden && !menuButtonEl?.inert;
|
|
640
|
+
}
|
|
540
641
|
syncActions() {
|
|
541
642
|
this.actions = queryActions([
|
|
542
643
|
...this.actionsStart,
|
|
@@ -608,6 +709,7 @@ class ActionBar extends LitElement {
|
|
|
608
709
|
return;
|
|
609
710
|
}
|
|
610
711
|
this.syncActionsAndOverflow();
|
|
712
|
+
this.syncNavigationItemTabIndexes();
|
|
611
713
|
}
|
|
612
714
|
handleActionMenuActionsChange(event) {
|
|
613
715
|
const menu = event.target;
|
|
@@ -615,47 +717,285 @@ class ActionBar extends LitElement {
|
|
|
615
717
|
return;
|
|
616
718
|
}
|
|
617
719
|
this.syncActionsAndOverflow();
|
|
618
|
-
|
|
619
|
-
getNavigableActions() {
|
|
620
|
-
return this.actions.filter((action) => !action.disabled && action.slot !== SLOTS.menuActions);
|
|
720
|
+
this.syncNavigationItemTabIndexes();
|
|
621
721
|
}
|
|
622
722
|
handleKeyDown(event) {
|
|
623
|
-
const
|
|
624
|
-
|
|
625
|
-
|
|
723
|
+
const actionMenu = this.getEventActionMenu(event) || this.getOpenActionMenu();
|
|
724
|
+
if (actionMenu?.open) {
|
|
725
|
+
if (event.key === "Escape") {
|
|
726
|
+
return;
|
|
727
|
+
}
|
|
728
|
+
return;
|
|
729
|
+
}
|
|
730
|
+
if (event.defaultPrevented) {
|
|
731
|
+
return;
|
|
732
|
+
}
|
|
733
|
+
this.updateNavigationItems();
|
|
734
|
+
const current = this.getNavigationItemFromEvent(event);
|
|
735
|
+
if (!current || !this.navigationItems.length) {
|
|
736
|
+
return;
|
|
737
|
+
}
|
|
738
|
+
if (this.layout === "grid" && ["ArrowDown", "ArrowRight", "ArrowUp", "ArrowLeft"].includes(event.key)) {
|
|
739
|
+
const direction = event.key === "ArrowDown" || event.key === "ArrowRight" ? "next" : "previous";
|
|
740
|
+
this.focusNavigationItem(direction, current);
|
|
741
|
+
event.preventDefault();
|
|
742
|
+
return;
|
|
743
|
+
}
|
|
744
|
+
const isVertical = this.layout !== "horizontal";
|
|
745
|
+
const currentGroup = event.composedPath().find(isActionGroup);
|
|
746
|
+
const secondaryNextKey = isVertical ? "ArrowRight" : "ArrowDown";
|
|
747
|
+
const secondaryPreviousKey = isVertical ? "ArrowLeft" : "ArrowUp";
|
|
748
|
+
const isClosedActionMenu = current.matches("calcite-action-menu") && !current.open;
|
|
749
|
+
if ((currentGroup?.selectionMode === "multiple" || currentGroup?.selectionMode === "none") && (event.key === secondaryNextKey || event.key === secondaryPreviousKey) && !isClosedActionMenu) {
|
|
750
|
+
event.preventDefault();
|
|
751
|
+
return;
|
|
752
|
+
}
|
|
753
|
+
if (this.handleSecondaryArrowActionMenuOpen(event, current, isVertical)) {
|
|
626
754
|
return;
|
|
627
755
|
}
|
|
628
756
|
switch (event.key) {
|
|
629
|
-
case "ArrowRight":
|
|
630
757
|
case "ArrowDown":
|
|
631
|
-
|
|
632
|
-
|
|
758
|
+
if (isVertical) {
|
|
759
|
+
this.focusNavigationItem("next", current);
|
|
760
|
+
event.preventDefault();
|
|
761
|
+
} else if (this.focusActionGroupItem("next", current, currentGroup)) {
|
|
762
|
+
event.preventDefault();
|
|
763
|
+
}
|
|
633
764
|
break;
|
|
634
|
-
case "ArrowLeft":
|
|
635
765
|
case "ArrowUp":
|
|
636
|
-
|
|
637
|
-
|
|
766
|
+
if (isVertical) {
|
|
767
|
+
this.focusNavigationItem("previous", current);
|
|
768
|
+
event.preventDefault();
|
|
769
|
+
} else if (this.focusActionGroupItem("previous", current, currentGroup)) {
|
|
770
|
+
event.preventDefault();
|
|
771
|
+
}
|
|
772
|
+
break;
|
|
773
|
+
case "ArrowRight":
|
|
774
|
+
if (!isVertical) {
|
|
775
|
+
this.focusNavigationItem("next", current);
|
|
776
|
+
event.preventDefault();
|
|
777
|
+
} else if (this.focusActionGroupItem("next", current, currentGroup)) {
|
|
778
|
+
event.preventDefault();
|
|
779
|
+
}
|
|
780
|
+
break;
|
|
781
|
+
case "ArrowLeft":
|
|
782
|
+
if (!isVertical) {
|
|
783
|
+
this.focusNavigationItem("previous", current);
|
|
784
|
+
event.preventDefault();
|
|
785
|
+
} else if (this.focusActionGroupItem("previous", current, currentGroup)) {
|
|
786
|
+
event.preventDefault();
|
|
787
|
+
}
|
|
638
788
|
break;
|
|
639
789
|
case "Home":
|
|
640
|
-
|
|
790
|
+
this.focusNavigationItem("first", current);
|
|
641
791
|
event.preventDefault();
|
|
642
792
|
break;
|
|
643
793
|
case "End":
|
|
644
|
-
|
|
794
|
+
this.focusNavigationItem("last", current);
|
|
645
795
|
event.preventDefault();
|
|
646
796
|
break;
|
|
647
797
|
case "Tab":
|
|
648
|
-
|
|
798
|
+
if (!event.composedPath().some((element) => isAction(element) && element.aria?.role === "menuitem")) {
|
|
799
|
+
this.setNavigationItemTabIndexes(current);
|
|
800
|
+
}
|
|
649
801
|
break;
|
|
650
802
|
}
|
|
651
803
|
}
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
804
|
+
handleSecondaryArrowActionMenuOpen(event, current, isVertical) {
|
|
805
|
+
if (!current.matches("calcite-action-menu") || current.open) {
|
|
806
|
+
return false;
|
|
807
|
+
}
|
|
808
|
+
const menuFirstItemOpenKey = isVertical ? "ArrowRight" : "ArrowDown";
|
|
809
|
+
const menuLastItemOpenKey = isVertical ? "ArrowLeft" : "ArrowUp";
|
|
810
|
+
if (event.key !== menuFirstItemOpenKey && event.key !== menuLastItemOpenKey) {
|
|
811
|
+
return false;
|
|
812
|
+
}
|
|
813
|
+
event.preventDefault();
|
|
814
|
+
this.openActionMenuAndFocusBoundaryItem(current, event.key === menuFirstItemOpenKey ? "first" : "last");
|
|
815
|
+
return true;
|
|
816
|
+
}
|
|
817
|
+
openActionMenuAndFocusBoundaryItem(actionMenu, boundary) {
|
|
818
|
+
actionMenu.open = true;
|
|
819
|
+
void this.focusActionMenuBoundaryItem(actionMenu, boundary);
|
|
820
|
+
}
|
|
821
|
+
async focusActionMenuBoundaryItem(actionMenu, boundary) {
|
|
822
|
+
await actionMenu.componentOnReady();
|
|
823
|
+
if (!actionMenu.open) {
|
|
824
|
+
return;
|
|
825
|
+
}
|
|
826
|
+
const menuActions = actionMenu.actions.filter((action2) => action2.aria?.role === "menuitem" && !action2.disabled && !action2.hidden && !action2.inert);
|
|
827
|
+
const action = boundary === "first" ? menuActions[0] : menuActions[menuActions.length - 1];
|
|
828
|
+
await action?.setFocus({ preventScroll: true });
|
|
829
|
+
}
|
|
830
|
+
handleFocusIn(event) {
|
|
831
|
+
this.updateNavigationItems();
|
|
832
|
+
const focusedItem = this.getNavigationItemFromEvent(event);
|
|
833
|
+
if (event instanceof MouseEvent) {
|
|
834
|
+
if (event.detail > 0 && focusedItem && isAction(focusedItem)) {
|
|
835
|
+
this.setNavigationItemTabIndexes(focusedItem);
|
|
836
|
+
}
|
|
837
|
+
return;
|
|
838
|
+
}
|
|
839
|
+
const actionMenu = this.getEventActionMenu(event) || this.getOpenActionMenu();
|
|
840
|
+
if (actionMenu?.open) {
|
|
841
|
+
return;
|
|
842
|
+
}
|
|
843
|
+
if (focusedItem?.matches("calcite-action-menu") && actionMenu) {
|
|
844
|
+
this.syncClosedActionMenu(actionMenu);
|
|
845
|
+
return;
|
|
846
|
+
}
|
|
847
|
+
this.syncNavigationItemTabIndexes(focusedItem ?? void 0);
|
|
848
|
+
}
|
|
849
|
+
focusNavigationItem(direction, current) {
|
|
850
|
+
const { navigationItems } = this;
|
|
851
|
+
const currentIndex = navigationItems.indexOf(current);
|
|
852
|
+
if (currentIndex === -1) {
|
|
853
|
+
return;
|
|
854
|
+
}
|
|
855
|
+
let nextIndex = currentIndex;
|
|
856
|
+
if (direction === "first") {
|
|
857
|
+
nextIndex = 0;
|
|
858
|
+
} else if (direction === "last") {
|
|
859
|
+
nextIndex = navigationItems.length - 1;
|
|
860
|
+
} else if (direction === "next") {
|
|
861
|
+
nextIndex = (currentIndex + 1) % navigationItems.length;
|
|
862
|
+
} else {
|
|
863
|
+
nextIndex = (currentIndex - 1 + navigationItems.length) % navigationItems.length;
|
|
864
|
+
}
|
|
865
|
+
const nextItem = navigationItems[nextIndex];
|
|
866
|
+
if (nextItem && nextItem !== current) {
|
|
867
|
+
void nextItem.setFocus();
|
|
868
|
+
}
|
|
869
|
+
this.syncNavigationItemTabIndexes(nextItem);
|
|
870
|
+
}
|
|
871
|
+
focusActionGroupItem(direction, current, currentGroup) {
|
|
872
|
+
if (!isAction(current) || !currentGroup) {
|
|
873
|
+
return false;
|
|
874
|
+
}
|
|
875
|
+
if (currentGroup.selectionMode === "multiple" || currentGroup.selectionMode === "none") {
|
|
876
|
+
return false;
|
|
877
|
+
}
|
|
878
|
+
const groupItems = this.navigationItems.filter((item) => isAction(item) && currentGroup.actions.includes(item));
|
|
879
|
+
const currentIndex = groupItems.indexOf(current);
|
|
880
|
+
if (groupItems.length < 2 || currentIndex === -1) {
|
|
881
|
+
return false;
|
|
882
|
+
}
|
|
883
|
+
const nextIndex = direction === "next" ? (currentIndex + 1) % groupItems.length : (currentIndex - 1 + groupItems.length) % groupItems.length;
|
|
884
|
+
const nextItem = groupItems[nextIndex];
|
|
885
|
+
if (!nextItem || nextItem === current) {
|
|
886
|
+
return false;
|
|
887
|
+
}
|
|
888
|
+
void nextItem.setFocus();
|
|
889
|
+
this.syncNavigationItemTabIndexes(nextItem);
|
|
890
|
+
return true;
|
|
891
|
+
}
|
|
892
|
+
getCurrentNavigationItem() {
|
|
893
|
+
const { activeElement } = document;
|
|
894
|
+
if (activeElement instanceof HTMLElement) {
|
|
895
|
+
const activeItem = activeElement.matches("calcite-action, calcite-action-menu") ? activeElement : activeElement.closest("calcite-action, calcite-action-menu");
|
|
896
|
+
if (activeItem && this.navigationItems.includes(activeItem)) {
|
|
897
|
+
return activeItem;
|
|
898
|
+
}
|
|
899
|
+
const activeActionMenu = activeElement.closest("calcite-action-menu");
|
|
900
|
+
if (activeActionMenu) {
|
|
901
|
+
const activeActionMenuItem = this.navigationItems.find((item) => item === activeActionMenu);
|
|
902
|
+
if (activeActionMenuItem) {
|
|
903
|
+
return activeActionMenuItem;
|
|
904
|
+
}
|
|
905
|
+
}
|
|
906
|
+
}
|
|
907
|
+
const currentFocusItem = this.getCurrentFocusItem();
|
|
908
|
+
if (currentFocusItem) {
|
|
909
|
+
return currentFocusItem;
|
|
910
|
+
}
|
|
911
|
+
return this.getDefaultNavigationItem();
|
|
912
|
+
}
|
|
913
|
+
getCurrentFocusItem() {
|
|
914
|
+
const { currentFocusItem } = this;
|
|
915
|
+
return currentFocusItem ? this.navigationItems.find((item) => item === currentFocusItem) : void 0;
|
|
916
|
+
}
|
|
917
|
+
getDefaultNavigationItem() {
|
|
918
|
+
return this.navigationItems.find((item) => isAction(item) && item !== this.expandToggleEl) || this.navigationItems[0];
|
|
919
|
+
}
|
|
920
|
+
getEventActionMenu(event) {
|
|
921
|
+
const pathActionMenu = event.composedPath().find((pathEl) => pathEl instanceof HTMLElement && pathEl.matches("calcite-action-menu"));
|
|
922
|
+
if (pathActionMenu) {
|
|
923
|
+
return pathActionMenu;
|
|
924
|
+
}
|
|
925
|
+
const target = event.target;
|
|
926
|
+
if (target instanceof HTMLElement) {
|
|
927
|
+
const closestActionMenu = target.closest("calcite-action-menu");
|
|
928
|
+
if (closestActionMenu) {
|
|
929
|
+
return closestActionMenu;
|
|
930
|
+
}
|
|
931
|
+
}
|
|
932
|
+
return null;
|
|
933
|
+
}
|
|
934
|
+
getOpenActionMenu() {
|
|
935
|
+
return this.navigationItems.find((item) => item.matches("calcite-action-menu") && item.open);
|
|
936
|
+
}
|
|
937
|
+
syncClosedActionMenu(actionMenu) {
|
|
938
|
+
this.updateNavigationItems();
|
|
939
|
+
const navigationActionMenu = this.navigationItems.find((item) => item === actionMenu);
|
|
940
|
+
if (navigationActionMenu) {
|
|
941
|
+
this.setNavigationItemTabIndexes(navigationActionMenu);
|
|
942
|
+
}
|
|
943
|
+
}
|
|
944
|
+
getNavigationItemFromEvent(event) {
|
|
945
|
+
for (const pathEl of event.composedPath()) {
|
|
946
|
+
if (!(pathEl instanceof HTMLElement) || !pathEl.matches("calcite-action, calcite-action-menu")) {
|
|
947
|
+
continue;
|
|
948
|
+
}
|
|
949
|
+
const navigationItem = this.navigationItems.find((item) => item === pathEl);
|
|
950
|
+
if (navigationItem) {
|
|
951
|
+
return navigationItem;
|
|
952
|
+
}
|
|
953
|
+
const actionMenu = pathEl.closest("calcite-action-menu");
|
|
954
|
+
if (actionMenu) {
|
|
955
|
+
const actionMenuNavigationItem = this.navigationItems.find((item) => item === actionMenu);
|
|
956
|
+
if (actionMenuNavigationItem) {
|
|
957
|
+
return actionMenuNavigationItem;
|
|
958
|
+
}
|
|
959
|
+
}
|
|
960
|
+
}
|
|
961
|
+
return null;
|
|
962
|
+
}
|
|
963
|
+
syncNavigationItemTabIndexes(activeItem) {
|
|
964
|
+
this.updateNavigationItems();
|
|
965
|
+
const activeItemInNavigation = activeItem ? this.navigationItems.find((item) => item === activeItem) : void 0;
|
|
966
|
+
const current = activeItemInNavigation || this.getCurrentNavigationItem();
|
|
967
|
+
if (!current) {
|
|
968
|
+
return;
|
|
969
|
+
}
|
|
970
|
+
this.setNavigationItemTabIndexes(current);
|
|
971
|
+
this.updateActions();
|
|
972
|
+
}
|
|
973
|
+
setNavigationItemTabIndexes(active) {
|
|
974
|
+
if (active.matches(":focus-within")) {
|
|
975
|
+
this.currentFocusItem = active;
|
|
976
|
+
}
|
|
977
|
+
this.navigationItems.forEach((item) => {
|
|
978
|
+
const isActive = item === active;
|
|
979
|
+
if (isAction(item)) {
|
|
980
|
+
if (isActive && !item.disabled && !item.hidden) {
|
|
981
|
+
item.removeAttribute("tabindex");
|
|
982
|
+
} else {
|
|
983
|
+
item.tabIndex = -1;
|
|
984
|
+
}
|
|
985
|
+
return;
|
|
986
|
+
}
|
|
987
|
+
if (isActive) {
|
|
988
|
+
item.removeAttribute("tabindex");
|
|
657
989
|
} else {
|
|
658
|
-
|
|
990
|
+
item.tabIndex = -1;
|
|
991
|
+
}
|
|
992
|
+
const { menuButtonEl } = item;
|
|
993
|
+
if (menuButtonEl) {
|
|
994
|
+
if (isActive && !item.open) {
|
|
995
|
+
menuButtonEl.removeAttribute("tabindex");
|
|
996
|
+
} else {
|
|
997
|
+
menuButtonEl.tabIndex = -1;
|
|
998
|
+
}
|
|
659
999
|
}
|
|
660
1000
|
});
|
|
661
1001
|
}
|
|
@@ -674,7 +1014,7 @@ class ActionBar extends LitElement {
|
|
|
674
1014
|
const slotName = isStart ? SLOTS$2.actionsStart : SLOTS$2.actionsEnd;
|
|
675
1015
|
const onSlotChange = isStart ? this.handleActionsStartSlotChange : this.handleActionsEndSlotChange;
|
|
676
1016
|
const label = isStart ? this.actionsStartGroupLabel : this.actionsEndGroupLabel;
|
|
677
|
-
const hidden = !hasExpandToggle && !hasActions;
|
|
1017
|
+
const hidden = !hasExpandToggle && !hasActions && !(isStart ? this.hasActionsStart : this.hasActionsEnd);
|
|
678
1018
|
const actionGroupRef = isStart ? this.actionsStartGroupRef : this.actionsEndGroupRef;
|
|
679
1019
|
const slotRef = isStart ? this.actionsStartSlotRef : this.actionsEndSlotRef;
|
|
680
1020
|
const expandToggle = hasExpandToggle ? this.renderExpandToggle() : null;
|
|
@@ -3,6 +3,7 @@ import type { PublicLitElement as LitElement } from "@arcgis/lumina";
|
|
|
3
3
|
import type { Layout, Scale, SelectionMode } from "../types.js";
|
|
4
4
|
import type { FlipPlacement, LogicalPlacement, OverlayPositioning } from "../../utils/floating-ui.js";
|
|
5
5
|
import type { Action } from "../calcite-action/customElement.js";
|
|
6
|
+
import type { ActionMenu } from "../calcite-action-menu/customElement.js";
|
|
6
7
|
import type { Columns } from "./types.js";
|
|
7
8
|
|
|
8
9
|
declare module "@arcgis/lumina" {
|
|
@@ -25,6 +26,12 @@ export interface DeclareCssProperties {
|
|
|
25
26
|
* @docGroup Actions
|
|
26
27
|
*/
|
|
27
28
|
export abstract class ActionGroup extends LitElement {
|
|
29
|
+
/**
|
|
30
|
+
* Specifies the internally rendered `calcite-action-menu`.
|
|
31
|
+
*
|
|
32
|
+
* @internal
|
|
33
|
+
*/
|
|
34
|
+
accessor actionMenu: ActionMenu | undefined;
|
|
28
35
|
/**
|
|
29
36
|
* Specifies the `calcite-action`s in the group.
|
|
30
37
|
*
|