@vaadin/menu-bar
Advanced tools
Comparing version 24.6.0-rc1 to 24.6.0
{ | ||
"name": "@vaadin/menu-bar", | ||
"version": "24.6.0-rc1", | ||
"version": "24.6.0", | ||
"publishConfig": { | ||
@@ -40,17 +40,17 @@ "access": "public" | ||
"@polymer/polymer": "^3.0.0", | ||
"@vaadin/a11y-base": "24.6.0-rc1", | ||
"@vaadin/button": "24.6.0-rc1", | ||
"@vaadin/component-base": "24.6.0-rc1", | ||
"@vaadin/context-menu": "24.6.0-rc1", | ||
"@vaadin/item": "24.6.0-rc1", | ||
"@vaadin/list-box": "24.6.0-rc1", | ||
"@vaadin/overlay": "24.6.0-rc1", | ||
"@vaadin/vaadin-lumo-styles": "24.6.0-rc1", | ||
"@vaadin/vaadin-material-styles": "24.6.0-rc1", | ||
"@vaadin/vaadin-themable-mixin": "24.6.0-rc1", | ||
"@vaadin/a11y-base": "~24.6.0", | ||
"@vaadin/button": "~24.6.0", | ||
"@vaadin/component-base": "~24.6.0", | ||
"@vaadin/context-menu": "~24.6.0", | ||
"@vaadin/item": "~24.6.0", | ||
"@vaadin/list-box": "~24.6.0", | ||
"@vaadin/overlay": "~24.6.0", | ||
"@vaadin/vaadin-lumo-styles": "~24.6.0", | ||
"@vaadin/vaadin-material-styles": "~24.6.0", | ||
"@vaadin/vaadin-themable-mixin": "~24.6.0", | ||
"lit": "^3.0.0" | ||
}, | ||
"devDependencies": { | ||
"@vaadin/chai-plugins": "24.6.0-rc1", | ||
"@vaadin/icon": "24.6.0-rc1", | ||
"@vaadin/chai-plugins": "~24.6.0", | ||
"@vaadin/icon": "~24.6.0", | ||
"@vaadin/testing-helpers": "^1.0.0", | ||
@@ -63,3 +63,3 @@ "sinon": "^18.0.0" | ||
], | ||
"gitHead": "d62ba309e3286777ad3ea7e015d50a2c4976bb42" | ||
"gitHead": "c0b38aa981494d04fac64da35aa3890ad72551ea" | ||
} |
@@ -11,6 +11,5 @@ /** | ||
import { defineCustomElement } from '@vaadin/component-base/src/define.js'; | ||
import { OverlayClassMixin } from '@vaadin/component-base/src/overlay-class-mixin.js'; | ||
import { PolylitMixin } from '@vaadin/component-base/src/polylit-mixin.js'; | ||
import { ContextMenuMixin } from '@vaadin/context-menu/src/vaadin-context-menu-mixin.js'; | ||
import { ThemePropertyMixin } from '@vaadin/vaadin-themable-mixin/vaadin-theme-property-mixin.js'; | ||
import { SubMenuMixin } from './vaadin-menu-bar-submenu-mixin.js'; | ||
@@ -22,8 +21,7 @@ /** | ||
* @extends HTMLElement | ||
* @mixes ContextMenuMixin | ||
* @mixes OverlayClassMixin | ||
* @mixes SubMenuMixin | ||
* @mixes ThemePropertyMixin | ||
* @protected | ||
*/ | ||
class MenuBarSubmenu extends ContextMenuMixin(OverlayClassMixin(ThemePropertyMixin(PolylitMixin(LitElement)))) { | ||
class MenuBarSubmenu extends SubMenuMixin(ThemePropertyMixin(PolylitMixin(LitElement))) { | ||
static get is() { | ||
@@ -45,17 +43,2 @@ return 'vaadin-menu-bar-submenu'; | ||
constructor() { | ||
super(); | ||
this.openOn = 'opensubmenu'; | ||
} | ||
/** | ||
* Tag name prefix used by overlay, list-box and items. | ||
* @protected | ||
* @return {string} | ||
*/ | ||
get _tagNamePrefix() { | ||
return 'vaadin-menu-bar'; | ||
} | ||
/** @protected */ | ||
@@ -75,23 +58,4 @@ render() { | ||
} | ||
/** | ||
* Overriding the observer to not add global "contextmenu" listener. | ||
*/ | ||
_openedChanged(opened) { | ||
this._overlayElement.opened = opened; | ||
} | ||
/** | ||
* Overriding the public method to reset expanded button state. | ||
*/ | ||
close() { | ||
super.close(); | ||
// Only handle 1st level submenu | ||
if (this.hasAttribute('is-root')) { | ||
this.getRootNode().host._close(); | ||
} | ||
} | ||
} | ||
defineCustomElement(MenuBarSubmenu); |
@@ -907,3 +907,2 @@ /** | ||
__onButtonClick(e) { | ||
e.stopPropagation(); | ||
const button = this._getButtonFromEvent(e); | ||
@@ -910,0 +909,0 @@ if (button) { |
@@ -12,5 +12,4 @@ /** | ||
import { defineCustomElement } from '@vaadin/component-base/src/define.js'; | ||
import { OverlayClassMixin } from '@vaadin/component-base/src/overlay-class-mixin.js'; | ||
import { ContextMenuMixin } from '@vaadin/context-menu/src/vaadin-context-menu-mixin.js'; | ||
import { ThemePropertyMixin } from '@vaadin/vaadin-themable-mixin/vaadin-theme-property-mixin.js'; | ||
import { SubMenuMixin } from './vaadin-menu-bar-submenu-mixin.js'; | ||
@@ -22,9 +21,8 @@ /** | ||
* @extends HTMLElement | ||
* @mixes ContextMenuMixin | ||
* @mixes ControllerMixin | ||
* @mixes OverlayClassMixin | ||
* @mixes SubMenuMixin | ||
* @mixes ThemePropertyMixin | ||
* @protected | ||
*/ | ||
class MenuBarSubmenu extends ContextMenuMixin(OverlayClassMixin(ControllerMixin(ThemePropertyMixin(PolymerElement)))) { | ||
class MenuBarSubmenu extends SubMenuMixin(ControllerMixin(ThemePropertyMixin(PolymerElement))) { | ||
static get is() { | ||
@@ -50,18 +48,3 @@ return 'vaadin-menu-bar-submenu'; | ||
constructor() { | ||
super(); | ||
this.openOn = 'opensubmenu'; | ||
} | ||
/** | ||
* Tag name prefix used by overlay, list-box and items. | ||
* @protected | ||
* @return {string} | ||
*/ | ||
get _tagNamePrefix() { | ||
return 'vaadin-menu-bar'; | ||
} | ||
/** | ||
* @param {DocumentFragment} dom | ||
@@ -78,23 +61,4 @@ * @return {ShadowRoot} | ||
} | ||
/** | ||
* Overriding the observer to not add global "contextmenu" listener. | ||
*/ | ||
_openedChanged(opened) { | ||
this._overlayElement.opened = opened; | ||
} | ||
/** | ||
* Overriding the public method to reset expanded button state. | ||
*/ | ||
close() { | ||
super.close(); | ||
// Only handle 1st level submenu | ||
if (this.hasAttribute('is-root')) { | ||
this.getRootNode().host._close(); | ||
} | ||
} | ||
} | ||
defineCustomElement(MenuBarSubmenu); |
{ | ||
"$schema": "https://json.schemastore.org/web-types", | ||
"name": "@vaadin/menu-bar", | ||
"version": "24.6.0-rc1", | ||
"version": "24.6.0", | ||
"description-markup": "markdown", | ||
@@ -11,3 +11,3 @@ "contributions": { | ||
"name": "vaadin-menu-bar", | ||
"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.6.0-rc1/#/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.6.0-rc1/#/elements/vaadin-button).\n- `<vaadin-menu-bar-item>` - has the same API as [`<vaadin-item>`](https://cdn.vaadin.com/vaadin-web-components/24.6.0-rc1/#/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.6.0-rc1/#/elements/vaadin-list-box).\n- `<vaadin-menu-bar-overlay>` - has the same API as [`<vaadin-overlay>`](https://cdn.vaadin.com/vaadin-web-components/24.6.0-rc1/#/elements/vaadin-overlay).\n\nThe `<vaadin-menu-bar-item>` sub-menu elements have the following additional state attributes\non top of the built-in `<vaadin-item>` state attributes:\n\nAttribute | Description\n---------- |-------------\n`expanded` | Expanded parent item.\n\nNote: the `theme` attribute value set on `<vaadin-menu-bar>` is\npropagated to the internal components listed above.", | ||
"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.6.0/#/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.6.0/#/elements/vaadin-button).\n- `<vaadin-menu-bar-item>` - has the same API as [`<vaadin-item>`](https://cdn.vaadin.com/vaadin-web-components/24.6.0/#/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.6.0/#/elements/vaadin-list-box).\n- `<vaadin-menu-bar-overlay>` - has the same API as [`<vaadin-overlay>`](https://cdn.vaadin.com/vaadin-web-components/24.6.0/#/elements/vaadin-overlay).\n\nThe `<vaadin-menu-bar-item>` sub-menu elements have the following additional state attributes\non top of the built-in `<vaadin-item>` state attributes:\n\nAttribute | Description\n---------- |-------------\n`expanded` | Expanded parent item.\n\nNote: the `theme` attribute value set on `<vaadin-menu-bar>` is\npropagated to the internal components listed above.", | ||
"attributes": [ | ||
@@ -14,0 +14,0 @@ { |
{ | ||
"$schema": "https://json.schemastore.org/web-types", | ||
"name": "@vaadin/menu-bar", | ||
"version": "24.6.0-rc1", | ||
"version": "24.6.0", | ||
"description-markup": "markdown", | ||
@@ -19,3 +19,3 @@ "framework": "lit", | ||
"name": "vaadin-menu-bar", | ||
"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.6.0-rc1/#/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.6.0-rc1/#/elements/vaadin-button).\n- `<vaadin-menu-bar-item>` - has the same API as [`<vaadin-item>`](https://cdn.vaadin.com/vaadin-web-components/24.6.0-rc1/#/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.6.0-rc1/#/elements/vaadin-list-box).\n- `<vaadin-menu-bar-overlay>` - has the same API as [`<vaadin-overlay>`](https://cdn.vaadin.com/vaadin-web-components/24.6.0-rc1/#/elements/vaadin-overlay).\n\nThe `<vaadin-menu-bar-item>` sub-menu elements have the following additional state attributes\non top of the built-in `<vaadin-item>` state attributes:\n\nAttribute | Description\n---------- |-------------\n`expanded` | Expanded parent item.\n\nNote: the `theme` attribute value set on `<vaadin-menu-bar>` is\npropagated to the internal components listed above.", | ||
"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.6.0/#/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.6.0/#/elements/vaadin-button).\n- `<vaadin-menu-bar-item>` - has the same API as [`<vaadin-item>`](https://cdn.vaadin.com/vaadin-web-components/24.6.0/#/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.6.0/#/elements/vaadin-list-box).\n- `<vaadin-menu-bar-overlay>` - has the same API as [`<vaadin-overlay>`](https://cdn.vaadin.com/vaadin-web-components/24.6.0/#/elements/vaadin-overlay).\n\nThe `<vaadin-menu-bar-item>` sub-menu elements have the following additional state attributes\non top of the built-in `<vaadin-item>` state attributes:\n\nAttribute | Description\n---------- |-------------\n`expanded` | Expanded parent item.\n\nNote: the `theme` attribute value set on `<vaadin-menu-bar>` is\npropagated to the internal components listed above.", | ||
"extension": true, | ||
@@ -22,0 +22,0 @@ "attributes": [ |
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
60
0
109428
2646
+ Added@vaadin/a11y-base@24.6.5(transitive)
+ Added@vaadin/button@24.6.5(transitive)
+ Added@vaadin/component-base@24.6.5(transitive)
+ Added@vaadin/context-menu@24.6.5(transitive)
+ Added@vaadin/icon@24.6.5(transitive)
+ Added@vaadin/item@24.6.5(transitive)
+ Added@vaadin/list-box@24.6.5(transitive)
+ Added@vaadin/lit-renderer@24.6.5(transitive)
+ Added@vaadin/overlay@24.6.5(transitive)
+ Added@vaadin/vaadin-lumo-styles@24.6.5(transitive)
+ Added@vaadin/vaadin-material-styles@24.6.5(transitive)
+ Added@vaadin/vaadin-themable-mixin@24.6.5(transitive)
- Removed@vaadin/a11y-base@24.6.0-rc1(transitive)
- Removed@vaadin/button@24.6.0-rc1(transitive)
- Removed@vaadin/component-base@24.6.0-rc1(transitive)
- Removed@vaadin/context-menu@24.6.0-rc1(transitive)
- Removed@vaadin/icon@24.6.0-rc1(transitive)
- Removed@vaadin/item@24.6.0-rc1(transitive)
- Removed@vaadin/list-box@24.6.0-rc1(transitive)
- Removed@vaadin/lit-renderer@24.6.0-rc1(transitive)
- Removed@vaadin/overlay@24.6.0-rc1(transitive)
- Removed@vaadin/vaadin-lumo-styles@24.6.0-rc1(transitive)
- Removed@vaadin/vaadin-material-styles@24.6.0-rc1(transitive)
- Removed@vaadin/vaadin-themable-mixin@24.6.0-rc1(transitive)
Updated@vaadin/a11y-base@~24.6.0
Updated@vaadin/button@~24.6.0
Updated@vaadin/context-menu@~24.6.0
Updated@vaadin/item@~24.6.0
Updated@vaadin/list-box@~24.6.0
Updated@vaadin/overlay@~24.6.0