@vaadin/menu-bar 24.4.1 → 24.4.3
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/package.json +13 -13
- package/src/vaadin-menu-bar-mixin.js +9 -9
- package/web-types.json +2 -2
- package/web-types.lit.json +2 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vaadin/menu-bar",
|
|
3
|
-
"version": "24.4.
|
|
3
|
+
"version": "24.4.3",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -39,21 +39,21 @@
|
|
|
39
39
|
"dependencies": {
|
|
40
40
|
"@open-wc/dedupe-mixin": "^1.3.0",
|
|
41
41
|
"@polymer/polymer": "^3.0.0",
|
|
42
|
-
"@vaadin/a11y-base": "~24.4.
|
|
43
|
-
"@vaadin/button": "~24.4.
|
|
44
|
-
"@vaadin/component-base": "~24.4.
|
|
45
|
-
"@vaadin/context-menu": "~24.4.
|
|
46
|
-
"@vaadin/item": "~24.4.
|
|
47
|
-
"@vaadin/list-box": "~24.4.
|
|
48
|
-
"@vaadin/overlay": "~24.4.
|
|
49
|
-
"@vaadin/vaadin-lumo-styles": "~24.4.
|
|
50
|
-
"@vaadin/vaadin-material-styles": "~24.4.
|
|
51
|
-
"@vaadin/vaadin-themable-mixin": "~24.4.
|
|
42
|
+
"@vaadin/a11y-base": "~24.4.3",
|
|
43
|
+
"@vaadin/button": "~24.4.3",
|
|
44
|
+
"@vaadin/component-base": "~24.4.3",
|
|
45
|
+
"@vaadin/context-menu": "~24.4.3",
|
|
46
|
+
"@vaadin/item": "~24.4.3",
|
|
47
|
+
"@vaadin/list-box": "~24.4.3",
|
|
48
|
+
"@vaadin/overlay": "~24.4.3",
|
|
49
|
+
"@vaadin/vaadin-lumo-styles": "~24.4.3",
|
|
50
|
+
"@vaadin/vaadin-material-styles": "~24.4.3",
|
|
51
|
+
"@vaadin/vaadin-themable-mixin": "~24.4.3",
|
|
52
52
|
"lit": "^3.0.0"
|
|
53
53
|
},
|
|
54
54
|
"devDependencies": {
|
|
55
55
|
"@esm-bundle/chai": "^4.3.4",
|
|
56
|
-
"@vaadin/icon": "~24.4.
|
|
56
|
+
"@vaadin/icon": "~24.4.3",
|
|
57
57
|
"@vaadin/testing-helpers": "^0.6.0",
|
|
58
58
|
"sinon": "^13.0.2"
|
|
59
59
|
},
|
|
@@ -61,5 +61,5 @@
|
|
|
61
61
|
"web-types.json",
|
|
62
62
|
"web-types.lit.json"
|
|
63
63
|
],
|
|
64
|
-
"gitHead": "
|
|
64
|
+
"gitHead": "9a5023ee2c81032d30ea02cb1358e24d60773ad0"
|
|
65
65
|
}
|
|
@@ -878,14 +878,11 @@ export const MenuBarMixin = (superClass) =>
|
|
|
878
878
|
subMenu.items = items;
|
|
879
879
|
subMenu.listenOn = button;
|
|
880
880
|
const overlay = subMenu._overlayElement;
|
|
881
|
-
// Unset old positioning to prevent flashing.
|
|
882
|
-
overlay.removeAttribute('style');
|
|
883
|
-
overlay.positionTarget = undefined;
|
|
884
881
|
overlay.noVerticalOverlap = true;
|
|
885
882
|
|
|
886
883
|
this._expandedButton = button;
|
|
887
884
|
|
|
888
|
-
requestAnimationFrame(() => {
|
|
885
|
+
requestAnimationFrame(async () => {
|
|
889
886
|
button.dispatchEvent(
|
|
890
887
|
new CustomEvent('opensubmenu', {
|
|
891
888
|
detail: {
|
|
@@ -896,6 +893,14 @@ export const MenuBarMixin = (superClass) =>
|
|
|
896
893
|
this._hideTooltip(true);
|
|
897
894
|
|
|
898
895
|
this._setExpanded(button, true);
|
|
896
|
+
|
|
897
|
+
// Delay setting position target until overlay is rendered
|
|
898
|
+
// to correctly measure item content in Lit based version.
|
|
899
|
+
if (overlay.updateComplete) {
|
|
900
|
+
await overlay.updateComplete;
|
|
901
|
+
}
|
|
902
|
+
|
|
903
|
+
overlay.positionTarget = button;
|
|
899
904
|
});
|
|
900
905
|
|
|
901
906
|
this.style.pointerEvents = 'auto';
|
|
@@ -915,11 +920,6 @@ export const MenuBarMixin = (superClass) =>
|
|
|
915
920
|
if (!keydown) {
|
|
916
921
|
overlay.$.overlay.focus();
|
|
917
922
|
}
|
|
918
|
-
|
|
919
|
-
// Delay setting position target until overlay is rendered
|
|
920
|
-
// to correctly measure item content in Lit based version.
|
|
921
|
-
overlay.positionTarget = button;
|
|
922
|
-
overlay._updatePosition();
|
|
923
923
|
},
|
|
924
924
|
{ once: true },
|
|
925
925
|
);
|
package/web-types.json
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json.schemastore.org/web-types",
|
|
3
3
|
"name": "@vaadin/menu-bar",
|
|
4
|
-
"version": "24.4.
|
|
4
|
+
"version": "24.4.3",
|
|
5
5
|
"description-markup": "markdown",
|
|
6
6
|
"contributions": {
|
|
7
7
|
"html": {
|
|
8
8
|
"elements": [
|
|
9
9
|
{
|
|
10
10
|
"name": "vaadin-menu-bar",
|
|
11
|
-
"description": "`<vaadin-menu-bar>` is a Web Component providing a set of horizontally stacked buttons offering\nthe user quick access to a consistent set of commands. Each button can toggle a submenu with\nsupport for additional levels of nested menus.\n\nTo create the menu bar, first add the component to the page:\n\n```\n<vaadin-menu-bar></vaadin-menu-bar>\n```\n\nAnd then use [`items`](https://cdn.vaadin.com/vaadin-web-components/24.4.
|
|
11
|
+
"description": "`<vaadin-menu-bar>` is a Web Component providing a set of horizontally stacked buttons offering\nthe user quick access to a consistent set of commands. Each button can toggle a submenu with\nsupport for additional levels of nested menus.\n\nTo create the menu bar, first add the component to the page:\n\n```\n<vaadin-menu-bar></vaadin-menu-bar>\n```\n\nAnd then use [`items`](https://cdn.vaadin.com/vaadin-web-components/24.4.3/#/elements/vaadin-menu-bar#property-items) property to initialize the structure:\n\n```\ndocument.querySelector('vaadin-menu-bar').items = [{text: 'File'}, {text: 'Edit'}];\n```\n\n### Styling\n\nThe following shadow DOM parts are exposed for styling:\n\nPart name | Description\n------------------|----------------\n`container` | The container wrapping menu bar buttons.\n\nThe following state attributes are available for styling:\n\nAttribute | Description\n--------------------|----------------------------------\n`disabled` | Set when the menu bar is disabled\n`has-single-button` | Set when there is only one button visible\n\nSee [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.\n\n### Internal components\n\nIn addition to `<vaadin-menu-bar>` itself, the following internal\ncomponents are themable:\n\n- `<vaadin-menu-bar-button>` - has the same API as [`<vaadin-button>`](https://cdn.vaadin.com/vaadin-web-components/24.4.3/#/elements/vaadin-button).\n- `<vaadin-menu-bar-item>` - has the same API as [`<vaadin-item>`](https://cdn.vaadin.com/vaadin-web-components/24.4.3/#/elements/vaadin-item).\n- `<vaadin-menu-bar-list-box>` - has the same API as [`<vaadin-list-box>`](https://cdn.vaadin.com/vaadin-web-components/24.4.3/#/elements/vaadin-list-box).\n- `<vaadin-menu-bar-overlay>` - has the same API as [`<vaadin-overlay>`](https://cdn.vaadin.com/vaadin-web-components/24.4.3/#/elements/vaadin-overlay).",
|
|
12
12
|
"attributes": [
|
|
13
13
|
{
|
|
14
14
|
"name": "disabled",
|
package/web-types.lit.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json.schemastore.org/web-types",
|
|
3
3
|
"name": "@vaadin/menu-bar",
|
|
4
|
-
"version": "24.4.
|
|
4
|
+
"version": "24.4.3",
|
|
5
5
|
"description-markup": "markdown",
|
|
6
6
|
"framework": "lit",
|
|
7
7
|
"framework-config": {
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"elements": [
|
|
17
17
|
{
|
|
18
18
|
"name": "vaadin-menu-bar",
|
|
19
|
-
"description": "`<vaadin-menu-bar>` is a Web Component providing a set of horizontally stacked buttons offering\nthe user quick access to a consistent set of commands. Each button can toggle a submenu with\nsupport for additional levels of nested menus.\n\nTo create the menu bar, first add the component to the page:\n\n```\n<vaadin-menu-bar></vaadin-menu-bar>\n```\n\nAnd then use [`items`](https://cdn.vaadin.com/vaadin-web-components/24.4.
|
|
19
|
+
"description": "`<vaadin-menu-bar>` is a Web Component providing a set of horizontally stacked buttons offering\nthe user quick access to a consistent set of commands. Each button can toggle a submenu with\nsupport for additional levels of nested menus.\n\nTo create the menu bar, first add the component to the page:\n\n```\n<vaadin-menu-bar></vaadin-menu-bar>\n```\n\nAnd then use [`items`](https://cdn.vaadin.com/vaadin-web-components/24.4.3/#/elements/vaadin-menu-bar#property-items) property to initialize the structure:\n\n```\ndocument.querySelector('vaadin-menu-bar').items = [{text: 'File'}, {text: 'Edit'}];\n```\n\n### Styling\n\nThe following shadow DOM parts are exposed for styling:\n\nPart name | Description\n------------------|----------------\n`container` | The container wrapping menu bar buttons.\n\nThe following state attributes are available for styling:\n\nAttribute | Description\n--------------------|----------------------------------\n`disabled` | Set when the menu bar is disabled\n`has-single-button` | Set when there is only one button visible\n\nSee [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.\n\n### Internal components\n\nIn addition to `<vaadin-menu-bar>` itself, the following internal\ncomponents are themable:\n\n- `<vaadin-menu-bar-button>` - has the same API as [`<vaadin-button>`](https://cdn.vaadin.com/vaadin-web-components/24.4.3/#/elements/vaadin-button).\n- `<vaadin-menu-bar-item>` - has the same API as [`<vaadin-item>`](https://cdn.vaadin.com/vaadin-web-components/24.4.3/#/elements/vaadin-item).\n- `<vaadin-menu-bar-list-box>` - has the same API as [`<vaadin-list-box>`](https://cdn.vaadin.com/vaadin-web-components/24.4.3/#/elements/vaadin-list-box).\n- `<vaadin-menu-bar-overlay>` - has the same API as [`<vaadin-overlay>`](https://cdn.vaadin.com/vaadin-web-components/24.4.3/#/elements/vaadin-overlay).",
|
|
20
20
|
"extension": true,
|
|
21
21
|
"attributes": [
|
|
22
22
|
{
|