@vaadin/menu-bar 25.1.0-beta2 → 25.1.0-beta4
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/custom-elements.json +16 -2
- package/package.json +16 -16
- package/src/vaadin-menu-bar-button.js +15 -0
- package/web-types.json +13 -2
- package/web-types.lit.json +2 -2
package/custom-elements.json
CHANGED
|
@@ -34,10 +34,12 @@
|
|
|
34
34
|
{
|
|
35
35
|
"kind": "field",
|
|
36
36
|
"name": "i18n",
|
|
37
|
-
"
|
|
37
|
+
"privacy": "public",
|
|
38
38
|
"type": {
|
|
39
39
|
"text": "Object"
|
|
40
40
|
},
|
|
41
|
+
"description": "The object used to localize this component. To change the default\nlocalization, replace this with an object that provides all properties, or\njust the individual properties you want to change.\n\nThe object has the following JSON structure and default values:\n```js\n{\n moreOptions: 'More options'\n}\n```",
|
|
42
|
+
"attribute": "i18n",
|
|
41
43
|
"inheritedFrom": {
|
|
42
44
|
"name": "I18nMixin",
|
|
43
45
|
"package": "@vaadin/component-base/src/i18n-mixin.js"
|
|
@@ -95,6 +97,11 @@
|
|
|
95
97
|
"attributes": [
|
|
96
98
|
{
|
|
97
99
|
"name": "i18n",
|
|
100
|
+
"type": {
|
|
101
|
+
"text": "Object"
|
|
102
|
+
},
|
|
103
|
+
"description": "The object used to localize this component. To change the default\nlocalization, replace this with an object that provides all properties, or\njust the individual properties you want to change.\n\nShould be overridden by subclasses to provide a custom JSDoc with the\ndefault I18N properties.",
|
|
104
|
+
"fieldName": "i18n",
|
|
98
105
|
"inheritedFrom": {
|
|
99
106
|
"name": "I18nMixin",
|
|
100
107
|
"package": "@vaadin/component-base/src/i18n-mixin.js"
|
|
@@ -186,10 +193,12 @@
|
|
|
186
193
|
{
|
|
187
194
|
"kind": "field",
|
|
188
195
|
"name": "i18n",
|
|
189
|
-
"
|
|
196
|
+
"privacy": "public",
|
|
190
197
|
"type": {
|
|
191
198
|
"text": "Object"
|
|
192
199
|
},
|
|
200
|
+
"description": "The object used to localize this component. To change the default\nlocalization, replace this with an object that provides all properties, or\njust the individual properties you want to change.\n\nThe object has the following JSON structure and default values:\n```js\n{\n moreOptions: 'More options'\n}\n```",
|
|
201
|
+
"attribute": "i18n",
|
|
193
202
|
"inheritedFrom": {
|
|
194
203
|
"name": "I18nMixin",
|
|
195
204
|
"package": "@vaadin/component-base/src/i18n-mixin.js"
|
|
@@ -296,6 +305,11 @@
|
|
|
296
305
|
"attributes": [
|
|
297
306
|
{
|
|
298
307
|
"name": "i18n",
|
|
308
|
+
"type": {
|
|
309
|
+
"text": "Object"
|
|
310
|
+
},
|
|
311
|
+
"description": "The object used to localize this component. To change the default\nlocalization, replace this with an object that provides all properties, or\njust the individual properties you want to change.\n\nShould be overridden by subclasses to provide a custom JSDoc with the\ndefault I18N properties.",
|
|
312
|
+
"fieldName": "i18n",
|
|
299
313
|
"inheritedFrom": {
|
|
300
314
|
"name": "I18nMixin",
|
|
301
315
|
"package": "@vaadin/component-base/src/i18n-mixin.js"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vaadin/menu-bar",
|
|
3
|
-
"version": "25.1.0-
|
|
3
|
+
"version": "25.1.0-beta4",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -35,29 +35,29 @@
|
|
|
35
35
|
],
|
|
36
36
|
"dependencies": {
|
|
37
37
|
"@open-wc/dedupe-mixin": "^1.3.0",
|
|
38
|
-
"@vaadin/a11y-base": "25.1.0-
|
|
39
|
-
"@vaadin/button": "25.1.0-
|
|
40
|
-
"@vaadin/component-base": "25.1.0-
|
|
41
|
-
"@vaadin/context-menu": "25.1.0-
|
|
42
|
-
"@vaadin/item": "25.1.0-
|
|
43
|
-
"@vaadin/list-box": "25.1.0-
|
|
44
|
-
"@vaadin/overlay": "25.1.0-
|
|
45
|
-
"@vaadin/vaadin-themable-mixin": "25.1.0-
|
|
38
|
+
"@vaadin/a11y-base": "25.1.0-beta4",
|
|
39
|
+
"@vaadin/button": "25.1.0-beta4",
|
|
40
|
+
"@vaadin/component-base": "25.1.0-beta4",
|
|
41
|
+
"@vaadin/context-menu": "25.1.0-beta4",
|
|
42
|
+
"@vaadin/item": "25.1.0-beta4",
|
|
43
|
+
"@vaadin/list-box": "25.1.0-beta4",
|
|
44
|
+
"@vaadin/overlay": "25.1.0-beta4",
|
|
45
|
+
"@vaadin/vaadin-themable-mixin": "25.1.0-beta4",
|
|
46
46
|
"lit": "^3.0.0"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
|
-
"@vaadin/aura": "25.1.0-
|
|
50
|
-
"@vaadin/chai-plugins": "25.1.0-
|
|
51
|
-
"@vaadin/icon": "25.1.0-
|
|
52
|
-
"@vaadin/test-runner-commands": "25.1.0-
|
|
49
|
+
"@vaadin/aura": "25.1.0-beta4",
|
|
50
|
+
"@vaadin/chai-plugins": "25.1.0-beta4",
|
|
51
|
+
"@vaadin/icon": "25.1.0-beta4",
|
|
52
|
+
"@vaadin/test-runner-commands": "25.1.0-beta4",
|
|
53
53
|
"@vaadin/testing-helpers": "^2.0.0",
|
|
54
|
-
"@vaadin/vaadin-lumo-styles": "25.1.0-
|
|
55
|
-
"sinon": "^21.0.
|
|
54
|
+
"@vaadin/vaadin-lumo-styles": "25.1.0-beta4",
|
|
55
|
+
"sinon": "^21.0.2"
|
|
56
56
|
},
|
|
57
57
|
"customElements": "custom-elements.json",
|
|
58
58
|
"web-types": [
|
|
59
59
|
"web-types.json",
|
|
60
60
|
"web-types.lit.json"
|
|
61
61
|
],
|
|
62
|
-
"gitHead": "
|
|
62
|
+
"gitHead": "b27f6706a2b5c07cedec353fccbdecee95d53024"
|
|
63
63
|
}
|
|
@@ -38,6 +38,21 @@ class MenuBarButton extends Button {
|
|
|
38
38
|
this.__triggeredWithActiveKeys = null;
|
|
39
39
|
}
|
|
40
40
|
|
|
41
|
+
/**
|
|
42
|
+
* Override to preserve the `active` attribute while the button's
|
|
43
|
+
* sub-menu is expanded, so that the pressed visual state remains.
|
|
44
|
+
*
|
|
45
|
+
* @param {boolean} active
|
|
46
|
+
* @protected
|
|
47
|
+
* @override
|
|
48
|
+
*/
|
|
49
|
+
_setActive(active) {
|
|
50
|
+
if (!active && this.hasAttribute('expanded')) {
|
|
51
|
+
return;
|
|
52
|
+
}
|
|
53
|
+
super._setActive(active);
|
|
54
|
+
}
|
|
55
|
+
|
|
41
56
|
/**
|
|
42
57
|
* Override method inherited from `ButtonMixin` to allow keyboard navigation with
|
|
43
58
|
* arrow keys in the menu bar when the button is focusable in the disabled state.
|
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": "25.1.0-
|
|
4
|
+
"version": "25.1.0-beta4",
|
|
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```html\n<vaadin-menu-bar></vaadin-menu-bar>\n```\n\nAnd then use [`items`](https://cdn.vaadin.com/vaadin-web-components/25.1.0-
|
|
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```html\n<vaadin-menu-bar></vaadin-menu-bar>\n```\n\nAnd then use [`items`](https://cdn.vaadin.com/vaadin-web-components/25.1.0-beta4/#/elements/vaadin-menu-bar#property-items) property to initialize the structure:\n\n```js\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/25.1.0-beta4/#/elements/vaadin-button).\n- `<vaadin-menu-bar-item>` - has the same API as [`<vaadin-item>`](https://cdn.vaadin.com/vaadin-web-components/25.1.0-beta4/#/elements/vaadin-item).\n- `<vaadin-menu-bar-list-box>` - has the same API as [`<vaadin-list-box>`](https://cdn.vaadin.com/vaadin-web-components/25.1.0-beta4/#/elements/vaadin-list-box).\n- `<vaadin-menu-bar-submenu>` - has the same API as [`<vaadin-context-menu>`](https://cdn.vaadin.com/vaadin-web-components/25.1.0-beta4/#/elements/vaadin-context-menu).\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.",
|
|
12
12
|
"attributes": [
|
|
13
13
|
{
|
|
14
14
|
"name": "disabled",
|
|
@@ -21,6 +21,17 @@
|
|
|
21
21
|
]
|
|
22
22
|
}
|
|
23
23
|
},
|
|
24
|
+
{
|
|
25
|
+
"name": "i18n",
|
|
26
|
+
"description": "The object used to localize this component. To change the default\nlocalization, replace this with an object that provides all properties, or\njust the individual properties you want to change.\n\nShould be overridden by subclasses to provide a custom JSDoc with the\ndefault I18N properties.",
|
|
27
|
+
"value": {
|
|
28
|
+
"type": [
|
|
29
|
+
"Object",
|
|
30
|
+
"null",
|
|
31
|
+
"undefined"
|
|
32
|
+
]
|
|
33
|
+
}
|
|
34
|
+
},
|
|
24
35
|
{
|
|
25
36
|
"name": "open-on-hover",
|
|
26
37
|
"description": "If true, the submenu will open on hover (mouseover) instead of click.",
|
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": "25.1.0-
|
|
4
|
+
"version": "25.1.0-beta4",
|
|
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```html\n<vaadin-menu-bar></vaadin-menu-bar>\n```\n\nAnd then use [`items`](https://cdn.vaadin.com/vaadin-web-components/25.1.0-
|
|
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```html\n<vaadin-menu-bar></vaadin-menu-bar>\n```\n\nAnd then use [`items`](https://cdn.vaadin.com/vaadin-web-components/25.1.0-beta4/#/elements/vaadin-menu-bar#property-items) property to initialize the structure:\n\n```js\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/25.1.0-beta4/#/elements/vaadin-button).\n- `<vaadin-menu-bar-item>` - has the same API as [`<vaadin-item>`](https://cdn.vaadin.com/vaadin-web-components/25.1.0-beta4/#/elements/vaadin-item).\n- `<vaadin-menu-bar-list-box>` - has the same API as [`<vaadin-list-box>`](https://cdn.vaadin.com/vaadin-web-components/25.1.0-beta4/#/elements/vaadin-list-box).\n- `<vaadin-menu-bar-submenu>` - has the same API as [`<vaadin-context-menu>`](https://cdn.vaadin.com/vaadin-web-components/25.1.0-beta4/#/elements/vaadin-context-menu).\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.",
|
|
20
20
|
"extension": true,
|
|
21
21
|
"attributes": [
|
|
22
22
|
{
|