@vaadin/menu-bar 24.2.0-alpha5 → 24.2.0-alpha6

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-alpha5",
3
+ "version": "24.2.0-alpha6",
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-alpha5",
41
- "@vaadin/button": "24.2.0-alpha5",
42
- "@vaadin/component-base": "24.2.0-alpha5",
43
- "@vaadin/context-menu": "24.2.0-alpha5",
44
- "@vaadin/item": "24.2.0-alpha5",
45
- "@vaadin/list-box": "24.2.0-alpha5",
46
- "@vaadin/overlay": "24.2.0-alpha5",
47
- "@vaadin/vaadin-lumo-styles": "24.2.0-alpha5",
48
- "@vaadin/vaadin-material-styles": "24.2.0-alpha5",
49
- "@vaadin/vaadin-themable-mixin": "24.2.0-alpha5"
40
+ "@vaadin/a11y-base": "24.2.0-alpha6",
41
+ "@vaadin/button": "24.2.0-alpha6",
42
+ "@vaadin/component-base": "24.2.0-alpha6",
43
+ "@vaadin/context-menu": "24.2.0-alpha6",
44
+ "@vaadin/item": "24.2.0-alpha6",
45
+ "@vaadin/list-box": "24.2.0-alpha6",
46
+ "@vaadin/overlay": "24.2.0-alpha6",
47
+ "@vaadin/vaadin-lumo-styles": "24.2.0-alpha6",
48
+ "@vaadin/vaadin-material-styles": "24.2.0-alpha6",
49
+ "@vaadin/vaadin-themable-mixin": "24.2.0-alpha6"
50
50
  },
51
51
  "devDependencies": {
52
52
  "@esm-bundle/chai": "^4.3.4",
53
- "@vaadin/icon": "24.2.0-alpha5",
53
+ "@vaadin/icon": "24.2.0-alpha6",
54
54
  "@vaadin/testing-helpers": "^0.4.3",
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": "73db22a5e8993e3ce48d1e6540d30eff9cb5c257"
61
+ "gitHead": "3ef6e6cd66919b3ef7637e42916e4c54656beb51"
62
62
  }
@@ -3,13 +3,15 @@
3
3
  * Copyright (c) 2019 - 2023 Vaadin Ltd.
4
4
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
5
  */
6
+ import { DirMixin } from '@vaadin/component-base/src/dir-mixin.js';
6
7
  import { MenuOverlayMixin } from '@vaadin/context-menu/src/vaadin-menu-overlay-mixin.js';
7
- import { Overlay } from '@vaadin/overlay/src/vaadin-overlay.js';
8
+ import { OverlayMixin } from '@vaadin/overlay/src/vaadin-overlay-mixin.js';
9
+ import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
8
10
 
9
11
  /**
10
12
  * An element used internally by `<vaadin-menu-bar>`. Not intended to be used separately.
11
13
  */
12
- declare class MenuBarOverlay extends MenuOverlayMixin(Overlay) {}
14
+ declare class MenuBarOverlay extends MenuOverlayMixin(OverlayMixin(DirMixin(ThemableMixin(HTMLElement)))) {}
13
15
 
14
16
  declare global {
15
17
  interface HTMLElementTagNameMap {
@@ -3,24 +3,43 @@
3
3
  * Copyright (c) 2019 - 2023 Vaadin Ltd.
4
4
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
5
  */
6
+ import { html, PolymerElement } from '@polymer/polymer/polymer-element.js';
7
+ import { DirMixin } from '@vaadin/component-base/src/dir-mixin.js';
6
8
  import { MenuOverlayMixin } from '@vaadin/context-menu/src/vaadin-menu-overlay-mixin.js';
7
9
  import { styles } from '@vaadin/context-menu/src/vaadin-menu-overlay-styles.js';
8
- import { Overlay } from '@vaadin/overlay/src/vaadin-overlay.js';
9
- import { registerStyles } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
10
+ import { OverlayMixin } from '@vaadin/overlay/src/vaadin-overlay-mixin.js';
11
+ import { overlayStyles } from '@vaadin/overlay/src/vaadin-overlay-styles.js';
12
+ import { registerStyles, ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
10
13
 
11
- registerStyles('vaadin-menu-bar-overlay', styles, { moduleId: 'vaadin-menu-bar-overlay-styles' });
14
+ registerStyles('vaadin-menu-bar-overlay', [overlayStyles, styles], {
15
+ moduleId: 'vaadin-menu-bar-overlay-styles',
16
+ });
12
17
 
13
18
  /**
14
19
  * An element used internally by `<vaadin-menu-bar>`. Not intended to be used separately.
15
20
  *
16
- * @extends Overlay
21
+ * @extends HTMLElement
22
+ * @mixes DirMixin
17
23
  * @mixes MenuOverlayMixin
18
- * @private
24
+ * @mixes OverlayMixin
25
+ * @mixes ThemableMixin
26
+ * @protected
19
27
  */
20
- class MenuBarOverlay extends MenuOverlayMixin(Overlay) {
28
+ export class MenuBarOverlay extends MenuOverlayMixin(OverlayMixin(DirMixin(ThemableMixin(PolymerElement)))) {
21
29
  static get is() {
22
30
  return 'vaadin-menu-bar-overlay';
23
31
  }
32
+
33
+ static get template() {
34
+ return html`
35
+ <div id="backdrop" part="backdrop" hidden$="[[!withBackdrop]]"></div>
36
+ <div part="overlay" id="overlay" tabindex="0">
37
+ <div part="content" id="content">
38
+ <slot></slot>
39
+ </div>
40
+ </div>
41
+ `;
42
+ }
24
43
  }
25
44
 
26
45
  customElements.define(MenuBarOverlay.is, MenuBarOverlay);
@@ -3,5 +3,4 @@ import './vaadin-menu-bar-item-styles.js';
3
3
  import './vaadin-menu-bar-list-box-styles.js';
4
4
  import './vaadin-menu-bar-overlay-styles.js';
5
5
  import './vaadin-menu-bar-styles.js';
6
- import '@vaadin/overlay/theme/lumo/vaadin-overlay.js';
7
6
  import '../../src/vaadin-menu-bar.js';
@@ -3,5 +3,4 @@ import './vaadin-menu-bar-item-styles.js';
3
3
  import './vaadin-menu-bar-list-box-styles.js';
4
4
  import './vaadin-menu-bar-styles.js';
5
5
  import './vaadin-menu-bar-overlay-styles.js';
6
- import '@vaadin/overlay/theme/material/vaadin-overlay.js';
7
6
  import '../../src/vaadin-menu-bar.js';
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-alpha5",
4
+ "version": "24.2.0-alpha6",
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-alpha5/#/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-alpha5/#/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-alpha5/#/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-alpha5/#/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-alpha5/#/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-alpha6/#/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-alpha6/#/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-alpha6/#/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-alpha6/#/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-alpha6/#/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-alpha5",
4
+ "version": "24.2.0-alpha6",
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-alpha5/#/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-alpha5/#/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-alpha5/#/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-alpha5/#/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-alpha5/#/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-alpha6/#/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-alpha6/#/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-alpha6/#/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-alpha6/#/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-alpha6/#/elements/vaadin-overlay).",
20
20
  "extension": true,
21
21
  "attributes": [
22
22
  {