@vaadin/menu-bar 24.2.0-alpha9 → 24.2.0-beta2

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vaadin/menu-bar",
3
- "version": "24.2.0-alpha9",
3
+ "version": "24.2.0-beta2",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -37,20 +37,20 @@
37
37
  "dependencies": {
38
38
  "@open-wc/dedupe-mixin": "^1.3.0",
39
39
  "@polymer/polymer": "^3.0.0",
40
- "@vaadin/a11y-base": "24.2.0-alpha9",
41
- "@vaadin/button": "24.2.0-alpha9",
42
- "@vaadin/component-base": "24.2.0-alpha9",
43
- "@vaadin/context-menu": "24.2.0-alpha9",
44
- "@vaadin/item": "24.2.0-alpha9",
45
- "@vaadin/list-box": "24.2.0-alpha9",
46
- "@vaadin/overlay": "24.2.0-alpha9",
47
- "@vaadin/vaadin-lumo-styles": "24.2.0-alpha9",
48
- "@vaadin/vaadin-material-styles": "24.2.0-alpha9",
49
- "@vaadin/vaadin-themable-mixin": "24.2.0-alpha9"
40
+ "@vaadin/a11y-base": "24.2.0-beta2",
41
+ "@vaadin/button": "24.2.0-beta2",
42
+ "@vaadin/component-base": "24.2.0-beta2",
43
+ "@vaadin/context-menu": "24.2.0-beta2",
44
+ "@vaadin/item": "24.2.0-beta2",
45
+ "@vaadin/list-box": "24.2.0-beta2",
46
+ "@vaadin/overlay": "24.2.0-beta2",
47
+ "@vaadin/vaadin-lumo-styles": "24.2.0-beta2",
48
+ "@vaadin/vaadin-material-styles": "24.2.0-beta2",
49
+ "@vaadin/vaadin-themable-mixin": "24.2.0-beta2"
50
50
  },
51
51
  "devDependencies": {
52
52
  "@esm-bundle/chai": "^4.3.4",
53
- "@vaadin/icon": "24.2.0-alpha9",
53
+ "@vaadin/icon": "24.2.0-beta2",
54
54
  "@vaadin/testing-helpers": "^0.5.0",
55
55
  "sinon": "^13.0.2"
56
56
  },
@@ -58,5 +58,5 @@
58
58
  "web-types.json",
59
59
  "web-types.lit.json"
60
60
  ],
61
- "gitHead": "e9765733fea96542e379e02e6f42b07145893140"
61
+ "gitHead": "4b852f9a12d4dade7f0fb3c73b7212436cebf310"
62
62
  }
@@ -4,6 +4,7 @@
4
4
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
5
  */
6
6
  import { Button } from '@vaadin/button/src/vaadin-button.js';
7
+ import { defineCustomElement } from '@vaadin/component-base/src/define.js';
7
8
  import { css, registerStyles } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
8
9
 
9
10
  registerStyles(
@@ -28,6 +29,7 @@ registerStyles(
28
29
  /**
29
30
  * An element used internally by `<vaadin-menu-bar>`. Not intended to be used separately.
30
31
  *
32
+ * @customElement
31
33
  * @extends Button
32
34
  * @private
33
35
  */
@@ -37,4 +39,4 @@ class MenuBarButton extends Button {
37
39
  }
38
40
  }
39
41
 
40
- customElements.define(MenuBarButton.is, MenuBarButton);
42
+ defineCustomElement(MenuBarButton);
@@ -4,6 +4,7 @@
4
4
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
5
  */
6
6
  import { html, PolymerElement } from '@polymer/polymer/polymer-element.js';
7
+ import { defineCustomElement } from '@vaadin/component-base/src/define.js';
7
8
  import { DirMixin } from '@vaadin/component-base/src/dir-mixin.js';
8
9
  import { ItemMixin } from '@vaadin/item/src/vaadin-item-mixin.js';
9
10
  import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
@@ -11,6 +12,7 @@ import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mix
11
12
  /**
12
13
  * An element used internally by `<vaadin-menu-bar>`. Not intended to be used separately.
13
14
  *
15
+ * @customElement
14
16
  * @extends HTMLElement
15
17
  * @mixes DirMixin
16
18
  * @mixes ItemMixin
@@ -50,6 +52,6 @@ class MenuBarItem extends ItemMixin(ThemableMixin(DirMixin(PolymerElement))) {
50
52
  }
51
53
  }
52
54
 
53
- customElements.define(MenuBarItem.is, MenuBarItem);
55
+ defineCustomElement(MenuBarItem);
54
56
 
55
57
  export { MenuBarItem };
@@ -6,12 +6,14 @@
6
6
  import { html, PolymerElement } from '@polymer/polymer/polymer-element.js';
7
7
  import { ListMixin } from '@vaadin/a11y-base/src/list-mixin.js';
8
8
  import { ControllerMixin } from '@vaadin/component-base/src/controller-mixin.js';
9
+ import { defineCustomElement } from '@vaadin/component-base/src/define.js';
9
10
  import { DirMixin } from '@vaadin/component-base/src/dir-mixin.js';
10
11
  import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
11
12
 
12
13
  /**
13
14
  * An element used internally by `<vaadin-menu-bar>`. Not intended to be used separately.
14
15
  *
16
+ * @customElement
15
17
  * @extends HTMLElement
16
18
  * @mixes ControllerMixin
17
19
  * @mixes DirMixin
@@ -76,6 +78,6 @@ class MenuBarListBox extends ListMixin(ThemableMixin(DirMixin(ControllerMixin(Po
76
78
  }
77
79
  }
78
80
 
79
- customElements.define(MenuBarListBox.is, MenuBarListBox);
81
+ defineCustomElement(MenuBarListBox);
80
82
 
81
83
  export { MenuBarListBox };
@@ -732,7 +732,6 @@ export const MenuBarMixin = (superClass) =>
732
732
  /** @private */
733
733
  __onItemSelected(e) {
734
734
  e.stopPropagation();
735
- this._close();
736
735
  this.__fireItemSelected(e.detail.value);
737
736
  }
738
737
 
@@ -4,6 +4,7 @@
4
4
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
5
  */
6
6
  import { html, PolymerElement } from '@polymer/polymer/polymer-element.js';
7
+ import { defineCustomElement } from '@vaadin/component-base/src/define.js';
7
8
  import { DirMixin } from '@vaadin/component-base/src/dir-mixin.js';
8
9
  import { MenuOverlayMixin } from '@vaadin/context-menu/src/vaadin-menu-overlay-mixin.js';
9
10
  import { styles } from '@vaadin/context-menu/src/vaadin-menu-overlay-styles.js';
@@ -18,6 +19,7 @@ registerStyles('vaadin-menu-bar-overlay', [overlayStyles, styles], {
18
19
  /**
19
20
  * An element used internally by `<vaadin-menu-bar>`. Not intended to be used separately.
20
21
  *
22
+ * @customElement
21
23
  * @extends HTMLElement
22
24
  * @mixes DirMixin
23
25
  * @mixes MenuOverlayMixin
@@ -42,4 +44,4 @@ export class MenuBarOverlay extends MenuOverlayMixin(OverlayMixin(DirMixin(Thema
42
44
  }
43
45
  }
44
46
 
45
- customElements.define(MenuBarOverlay.is, MenuBarOverlay);
47
+ defineCustomElement(MenuBarOverlay);
@@ -7,11 +7,13 @@ import './vaadin-menu-bar-item.js';
7
7
  import './vaadin-menu-bar-list-box.js';
8
8
  import './vaadin-menu-bar-overlay.js';
9
9
  import { html } from '@polymer/polymer/lib/utils/html-tag.js';
10
+ import { defineCustomElement } from '@vaadin/component-base/src/define.js';
10
11
  import { ContextMenu } from '@vaadin/context-menu/src/vaadin-context-menu.js';
11
12
 
12
13
  /**
13
14
  * An element used internally by `<vaadin-menu-bar>`. Not intended to be used separately.
14
15
  *
16
+ * @customElement
15
17
  * @extends ContextMenu
16
18
  * @protected
17
19
  */
@@ -82,4 +84,4 @@ class MenuBarSubmenu extends ContextMenu {
82
84
  }
83
85
  }
84
86
 
85
- customElements.define(MenuBarSubmenu.is, MenuBarSubmenu);
87
+ defineCustomElement(MenuBarSubmenu);
@@ -7,6 +7,7 @@ import './vaadin-menu-bar-submenu.js';
7
7
  import './vaadin-menu-bar-button.js';
8
8
  import { html, PolymerElement } from '@polymer/polymer/polymer-element.js';
9
9
  import { DisabledMixin } from '@vaadin/a11y-base/src/disabled-mixin.js';
10
+ import { defineCustomElement } from '@vaadin/component-base/src/define.js';
10
11
  import { ElementMixin } from '@vaadin/component-base/src/element-mixin.js';
11
12
  import { TooltipController } from '@vaadin/component-base/src/tooltip-controller.js';
12
13
  import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
@@ -58,6 +59,7 @@ import { MenuBarMixin } from './vaadin-menu-bar-mixin.js';
58
59
  *
59
60
  * @fires {CustomEvent<boolean>} item-selected - Fired when a submenu item or menu bar button without children is clicked.
60
61
  *
62
+ * @customElement
61
63
  * @extends HTMLElement
62
64
  * @mixes DisabledMixin
63
65
  * @mixes ElementMixin
@@ -271,6 +273,6 @@ class MenuBar extends MenuBarMixin(DisabledMixin(ElementMixin(ThemableMixin(Poly
271
273
  */
272
274
  }
273
275
 
274
- customElements.define(MenuBar.is, MenuBar);
276
+ defineCustomElement(MenuBar);
275
277
 
276
278
  export { MenuBar };
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.2.0-alpha9",
4
+ "version": "24.2.0-beta2",
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.2.0-alpha9/#/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.2.0-alpha9/#/elements/vaadin-button).\n- `<vaadin-menu-bar-item>` - has the same API as [`<vaadin-item>`](https://cdn.vaadin.com/vaadin-web-components/24.2.0-alpha9/#/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.2.0-alpha9/#/elements/vaadin-list-box).\n- `<vaadin-menu-bar-overlay>` - has the same API as [`<vaadin-overlay>`](https://cdn.vaadin.com/vaadin-web-components/24.2.0-alpha9/#/elements/vaadin-overlay).",
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.2.0-beta2/#/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.2.0-beta2/#/elements/vaadin-button).\n- `<vaadin-menu-bar-item>` - has the same API as [`<vaadin-item>`](https://cdn.vaadin.com/vaadin-web-components/24.2.0-beta2/#/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.2.0-beta2/#/elements/vaadin-list-box).\n- `<vaadin-menu-bar-overlay>` - has the same API as [`<vaadin-overlay>`](https://cdn.vaadin.com/vaadin-web-components/24.2.0-beta2/#/elements/vaadin-overlay).",
12
12
  "attributes": [
13
13
  {
14
14
  "name": "disabled",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/web-types",
3
3
  "name": "@vaadin/menu-bar",
4
- "version": "24.2.0-alpha9",
4
+ "version": "24.2.0-beta2",
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.2.0-alpha9/#/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.2.0-alpha9/#/elements/vaadin-button).\n- `<vaadin-menu-bar-item>` - has the same API as [`<vaadin-item>`](https://cdn.vaadin.com/vaadin-web-components/24.2.0-alpha9/#/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.2.0-alpha9/#/elements/vaadin-list-box).\n- `<vaadin-menu-bar-overlay>` - has the same API as [`<vaadin-overlay>`](https://cdn.vaadin.com/vaadin-web-components/24.2.0-alpha9/#/elements/vaadin-overlay).",
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.2.0-beta2/#/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.2.0-beta2/#/elements/vaadin-button).\n- `<vaadin-menu-bar-item>` - has the same API as [`<vaadin-item>`](https://cdn.vaadin.com/vaadin-web-components/24.2.0-beta2/#/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.2.0-beta2/#/elements/vaadin-list-box).\n- `<vaadin-menu-bar-overlay>` - has the same API as [`<vaadin-overlay>`](https://cdn.vaadin.com/vaadin-web-components/24.2.0-beta2/#/elements/vaadin-overlay).",
20
20
  "extension": true,
21
21
  "attributes": [
22
22
  {