@momentum-design/components 0.76.3 → 0.76.5
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/browser/index.js +73 -73
- package/dist/browser/index.js.map +3 -3
- package/dist/components/menubar/menubar.component.d.ts +0 -1
- package/dist/components/menubar/menubar.component.js +0 -4
- package/dist/components/menupopover/menupopover.component.js +4 -4
- package/dist/components/popover/popover.component.js +3 -5
- package/dist/custom-elements.json +1135 -1230
- package/dist/react/index.d.ts +2 -2
- package/dist/react/index.js +2 -2
- package/dist/utils/mixins/MenuMixin.d.ts +0 -2
- package/dist/utils/mixins/MenuMixin.js +8 -16
- package/package.json +1 -1
@@ -24,7 +24,6 @@ declare const MenuBar_base: import("../../utils/mixins/index.types").Constructor
|
|
24
24
|
declare class MenuBar extends MenuBar_base {
|
25
25
|
constructor();
|
26
26
|
connectedCallback(): void;
|
27
|
-
firstUpdated(): void;
|
28
27
|
update(changedProperties: PropertyValues): void;
|
29
28
|
render(): import("lit-html").TemplateResult<1>;
|
30
29
|
static styles: Array<CSSResult>;
|
@@ -33,10 +33,6 @@ class MenuBar extends MenuMixin(Component) {
|
|
33
33
|
super.connectedCallback();
|
34
34
|
this.role = ROLE.MENUBAR;
|
35
35
|
}
|
36
|
-
firstUpdated() {
|
37
|
-
// For the first, we set the first element only as active.
|
38
|
-
this.resetTabIndexAndSetActiveTabIndex(0);
|
39
|
-
}
|
40
36
|
update(changedProperties) {
|
41
37
|
super.update(changedProperties);
|
42
38
|
if (changedProperties.has('ariaOrientation')) {
|
@@ -2,7 +2,7 @@ import { MenuMixin } from '../../utils/mixins/MenuMixin';
|
|
2
2
|
import { ROLE } from '../../utils/roles';
|
3
3
|
import { ORIENTATION } from '../menubar/menubar.constants';
|
4
4
|
import Popover from '../popover/popover.component';
|
5
|
-
import { POPOVER_PLACEMENT
|
5
|
+
import { POPOVER_PLACEMENT } from '../popover/popover.constants';
|
6
6
|
import { TAG_NAME as MENU_POPOVER } from './menupopover.constants';
|
7
7
|
import styles from './menupopover.styles';
|
8
8
|
/**
|
@@ -43,12 +43,12 @@ class MenuPopover extends MenuMixin(Popover) {
|
|
43
43
|
this.ariaOrientation = ORIENTATION.VERTICAL;
|
44
44
|
}
|
45
45
|
async firstUpdated(changedProperties) {
|
46
|
-
var _a, _b;
|
46
|
+
var _a, _b, _c;
|
47
47
|
await super.firstUpdated(changedProperties);
|
48
|
-
|
48
|
+
(_a = this.triggerElement) === null || _a === void 0 ? void 0 : _a.setAttribute('aria-haspopup', ROLE.MENU);
|
49
|
+
if (((_c = (_b = this.parentElement) === null || _b === void 0 ? void 0 : _b.tagName) === null || _c === void 0 ? void 0 : _c.toLowerCase()) === MENU_POPOVER) {
|
49
50
|
this.interactive = true;
|
50
51
|
this.placement = POPOVER_PLACEMENT.RIGHT_START;
|
51
|
-
this.trigger = TRIGGER.MOUSEENTER;
|
52
52
|
}
|
53
53
|
}
|
54
54
|
}
|
@@ -496,11 +496,9 @@ class Popover extends FocusTrapMixin(Component) {
|
|
496
496
|
if (!this.disableAriaExpanded) {
|
497
497
|
this.triggerElement.removeAttribute('aria-expanded');
|
498
498
|
}
|
499
|
-
if
|
500
|
-
|
501
|
-
|
502
|
-
this.triggerElement.removeAttribute('aria-haspopup');
|
503
|
-
}
|
499
|
+
// Remove aria-haspopup if the popover is not interactive
|
500
|
+
if (!this.interactive) {
|
501
|
+
this.triggerElement.removeAttribute('aria-haspopup');
|
504
502
|
}
|
505
503
|
if (this.focusBackToTrigger) {
|
506
504
|
(_c = this.triggerElement) === null || _c === void 0 ? void 0 : _c.focus();
|