@vaadin/menu-bar 23.3.3 → 24.0.0-alpha10
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 +9 -9
- package/src/vaadin-menu-bar-button.js +9 -1
- package/src/{vaadin-menu-bar-interactions-mixin.d.ts → vaadin-menu-bar-mixin.d.ts} +16 -10
- package/src/{vaadin-menu-bar-interactions-mixin.js → vaadin-menu-bar-mixin.js} +329 -40
- package/src/vaadin-menu-bar-submenu.js +1 -1
- package/src/vaadin-menu-bar.d.ts +11 -9
- package/src/vaadin-menu-bar.js +20 -34
- package/theme/lumo/vaadin-menu-bar-button-styles.js +6 -6
- package/theme/lumo/vaadin-menu-bar-item-styles.js +2 -4
- package/theme/lumo/vaadin-menu-bar-styles.js +3 -3
- package/theme/material/vaadin-menu-bar-button-styles.js +6 -6
- package/theme/material/vaadin-menu-bar-item-styles.js +1 -2
- package/theme/material/vaadin-menu-bar-styles.js +3 -3
- package/web-types.json +31 -9
- package/web-types.lit.json +13 -6
- package/src/vaadin-menu-bar-buttons-mixin.d.ts +0 -21
- package/src/vaadin-menu-bar-buttons-mixin.js +0 -287
package/src/vaadin-menu-bar.js
CHANGED
|
@@ -1,18 +1,16 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
|
-
* Copyright (c) 2019 -
|
|
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
6
|
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
|
-
import { ControllerMixin } from '@vaadin/component-base/src/controller-mixin.js';
|
|
10
9
|
import { DisabledMixin } from '@vaadin/component-base/src/disabled-mixin.js';
|
|
11
10
|
import { ElementMixin } from '@vaadin/component-base/src/element-mixin.js';
|
|
12
11
|
import { TooltipController } from '@vaadin/component-base/src/tooltip-controller.js';
|
|
13
12
|
import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
|
|
14
|
-
import {
|
|
15
|
-
import { InteractionsMixin } from './vaadin-menu-bar-interactions-mixin.js';
|
|
13
|
+
import { MenuBarMixin } from './vaadin-menu-bar-mixin.js';
|
|
16
14
|
|
|
17
15
|
/**
|
|
18
16
|
* `<vaadin-menu-bar>` is a Web Component providing a set of horizontally stacked buttons offering
|
|
@@ -38,8 +36,6 @@ import { InteractionsMixin } from './vaadin-menu-bar-interactions-mixin.js';
|
|
|
38
36
|
* Part name | Description
|
|
39
37
|
* ------------------|----------------
|
|
40
38
|
* `container` | The container wrapping menu bar buttons.
|
|
41
|
-
* `menu-bar-button` | The menu bar button.
|
|
42
|
-
* `overflow-button` | The "overflow" button appearing when menu bar width is not enough to fit all the buttons.
|
|
43
39
|
*
|
|
44
40
|
* The following state attributes are available for styling:
|
|
45
41
|
*
|
|
@@ -63,16 +59,12 @@ import { InteractionsMixin } from './vaadin-menu-bar-interactions-mixin.js';
|
|
|
63
59
|
* @fires {CustomEvent<boolean>} item-selected - Fired when a submenu item or menu bar button without children is clicked.
|
|
64
60
|
*
|
|
65
61
|
* @extends HTMLElement
|
|
66
|
-
* @mixes ControllerMixin
|
|
67
|
-
* @mixes ButtonsMixin
|
|
68
|
-
* @mixes InteractionsMixin
|
|
69
62
|
* @mixes DisabledMixin
|
|
70
63
|
* @mixes ElementMixin
|
|
64
|
+
* @mixes MenuBarMixin
|
|
71
65
|
* @mixes ThemableMixin
|
|
72
66
|
*/
|
|
73
|
-
class MenuBar extends
|
|
74
|
-
DisabledMixin(InteractionsMixin(ElementMixin(ThemableMixin(ControllerMixin(PolymerElement))))),
|
|
75
|
-
) {
|
|
67
|
+
class MenuBar extends MenuBarMixin(DisabledMixin(ElementMixin(ThemableMixin(PolymerElement)))) {
|
|
76
68
|
static get template() {
|
|
77
69
|
return html`
|
|
78
70
|
<style>
|
|
@@ -91,29 +83,13 @@ class MenuBar extends ButtonsMixin(
|
|
|
91
83
|
flex-wrap: nowrap;
|
|
92
84
|
overflow: hidden;
|
|
93
85
|
}
|
|
94
|
-
|
|
95
|
-
[part$='button'] {
|
|
96
|
-
flex-shrink: 0;
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
[part='overflow-button'] {
|
|
100
|
-
margin-right: 0;
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
.dots::before {
|
|
104
|
-
display: block;
|
|
105
|
-
content: '\\00B7\\00B7\\00B7';
|
|
106
|
-
font-size: inherit;
|
|
107
|
-
line-height: inherit;
|
|
108
|
-
}
|
|
109
86
|
</style>
|
|
110
87
|
|
|
111
88
|
<div part="container">
|
|
112
|
-
<
|
|
113
|
-
|
|
114
|
-
</vaadin-menu-bar-button>
|
|
89
|
+
<slot></slot>
|
|
90
|
+
<slot name="overflow"></slot>
|
|
115
91
|
</div>
|
|
116
|
-
<vaadin-menu-bar-submenu is-root=""></vaadin-menu-bar-submenu>
|
|
92
|
+
<vaadin-menu-bar-submenu is-root overlay-class="[[overlayClass]]"></vaadin-menu-bar-submenu>
|
|
117
93
|
|
|
118
94
|
<slot name="tooltip"></slot>
|
|
119
95
|
`;
|
|
@@ -215,11 +191,21 @@ class MenuBar extends ButtonsMixin(
|
|
|
215
191
|
};
|
|
216
192
|
},
|
|
217
193
|
},
|
|
194
|
+
|
|
195
|
+
/**
|
|
196
|
+
* A space-delimited list of CSS class names
|
|
197
|
+
* to set on each sub-menu overlay element.
|
|
198
|
+
*
|
|
199
|
+
* @attr {string} overlay-class
|
|
200
|
+
*/
|
|
201
|
+
overlayClass: {
|
|
202
|
+
type: String,
|
|
203
|
+
},
|
|
218
204
|
};
|
|
219
205
|
}
|
|
220
206
|
|
|
221
207
|
static get observers() {
|
|
222
|
-
return ['_themeChanged(_theme)'];
|
|
208
|
+
return ['_themeChanged(_theme, _overflow, _container)'];
|
|
223
209
|
}
|
|
224
210
|
|
|
225
211
|
/** @protected */
|
|
@@ -255,8 +241,8 @@ class MenuBar extends ButtonsMixin(
|
|
|
255
241
|
* @param {string | null} theme
|
|
256
242
|
* @protected
|
|
257
243
|
*/
|
|
258
|
-
_themeChanged(theme) {
|
|
259
|
-
if (
|
|
244
|
+
_themeChanged(theme, overflow, container) {
|
|
245
|
+
if (overflow && container) {
|
|
260
246
|
this._buttons.forEach((btn) => this._setButtonTheme(btn, theme));
|
|
261
247
|
this.__detectOverflow();
|
|
262
248
|
}
|
|
@@ -54,7 +54,7 @@ const menuBarButton = css`
|
|
|
54
54
|
}
|
|
55
55
|
|
|
56
56
|
:host(:nth-last-of-type(2)),
|
|
57
|
-
:host([
|
|
57
|
+
:host([slot='overflow']) {
|
|
58
58
|
border-radius: 0 var(--lumo-border-radius-m) var(--lumo-border-radius-m) 0;
|
|
59
59
|
}
|
|
60
60
|
|
|
@@ -63,18 +63,18 @@ const menuBarButton = css`
|
|
|
63
63
|
border-radius: var(--lumo-border-radius-m);
|
|
64
64
|
}
|
|
65
65
|
|
|
66
|
-
:host([
|
|
66
|
+
:host([slot='overflow']) {
|
|
67
67
|
min-width: var(--lumo-button-size);
|
|
68
68
|
padding-left: calc(var(--lumo-button-size) / 4);
|
|
69
69
|
padding-right: calc(var(--lumo-button-size) / 4);
|
|
70
70
|
}
|
|
71
71
|
|
|
72
|
-
:host([
|
|
72
|
+
:host([slot='overflow']) ::slotted(*) {
|
|
73
73
|
font-size: var(--lumo-font-size-xl);
|
|
74
74
|
}
|
|
75
75
|
|
|
76
|
-
:host([
|
|
77
|
-
:host([
|
|
76
|
+
:host([slot='overflow']) [part='prefix'],
|
|
77
|
+
:host([slot='overflow']) [part='suffix'] {
|
|
78
78
|
margin-left: 0;
|
|
79
79
|
margin-right: 0;
|
|
80
80
|
}
|
|
@@ -92,7 +92,7 @@ const menuBarButton = css`
|
|
|
92
92
|
}
|
|
93
93
|
|
|
94
94
|
:host([dir='rtl']:nth-last-of-type(2)),
|
|
95
|
-
:host([dir='rtl'][
|
|
95
|
+
:host([dir='rtl'][slot='overflow']) {
|
|
96
96
|
border-radius: var(--lumo-border-radius-m) 0 0 var(--lumo-border-radius-m);
|
|
97
97
|
}
|
|
98
98
|
`;
|
|
@@ -12,15 +12,13 @@ registerStyles(
|
|
|
12
12
|
justify-content: inherit;
|
|
13
13
|
}
|
|
14
14
|
|
|
15
|
-
:host([theme='menu-bar-item']) [part='content'] ::slotted(vaadin-icon)
|
|
16
|
-
:host([theme='menu-bar-item']) [part='content'] ::slotted(iron-icon) {
|
|
15
|
+
:host([theme='menu-bar-item']) [part='content'] ::slotted(vaadin-icon) {
|
|
17
16
|
display: inline-block;
|
|
18
17
|
width: var(--lumo-icon-size-m);
|
|
19
18
|
height: var(--lumo-icon-size-m);
|
|
20
19
|
}
|
|
21
20
|
|
|
22
|
-
:host([theme='menu-bar-item']) [part='content'] ::slotted(vaadin-icon[icon^='vaadin:'])
|
|
23
|
-
:host([theme='menu-bar-item']) [part='content'] ::slotted(iron-icon[icon^='vaadin:']) {
|
|
21
|
+
:host([theme='menu-bar-item']) [part='content'] ::slotted(vaadin-icon[icon^='vaadin:']) {
|
|
24
22
|
padding: var(--lumo-space-xs);
|
|
25
23
|
box-sizing: border-box !important;
|
|
26
24
|
}
|
|
@@ -4,12 +4,12 @@ import { css, registerStyles } from '@vaadin/vaadin-themable-mixin/vaadin-themab
|
|
|
4
4
|
registerStyles(
|
|
5
5
|
'vaadin-menu-bar',
|
|
6
6
|
css`
|
|
7
|
-
:host([has-single-button])
|
|
7
|
+
:host([has-single-button]) ::slotted(vaadin-menu-bar-button) {
|
|
8
8
|
border-radius: var(--lumo-border-radius-m);
|
|
9
9
|
}
|
|
10
10
|
|
|
11
|
-
:host([theme~='end-aligned'])
|
|
12
|
-
:host([theme~='end-aligned'][has-single-button])
|
|
11
|
+
:host([theme~='end-aligned']) ::slotted(vaadin-menu-bar-button:first-of-type),
|
|
12
|
+
:host([theme~='end-aligned'][has-single-button]) ::slotted(vaadin-menu-bar-button) {
|
|
13
13
|
margin-inline-start: auto;
|
|
14
14
|
}
|
|
15
15
|
`,
|
|
@@ -54,17 +54,17 @@ const menuBarButton = css`
|
|
|
54
54
|
}
|
|
55
55
|
|
|
56
56
|
:host(:nth-last-of-type(2)),
|
|
57
|
-
:host([
|
|
57
|
+
:host([slot='overflow']) {
|
|
58
58
|
border-radius: 0 4px 4px 0;
|
|
59
59
|
}
|
|
60
60
|
|
|
61
|
-
:host([
|
|
61
|
+
:host([slot='overflow']) {
|
|
62
62
|
padding-right: 8px;
|
|
63
63
|
padding-left: 8px;
|
|
64
64
|
min-width: 36px;
|
|
65
65
|
}
|
|
66
66
|
|
|
67
|
-
:host([
|
|
67
|
+
:host([slot='overflow']) ::slotted(*) {
|
|
68
68
|
font-size: 24px;
|
|
69
69
|
}
|
|
70
70
|
|
|
@@ -73,7 +73,7 @@ const menuBarButton = css`
|
|
|
73
73
|
}
|
|
74
74
|
|
|
75
75
|
:host([theme~='outlined']:not([dir='rtl']):nth-last-of-type(2)),
|
|
76
|
-
:host([theme~='outlined']:not([dir='rtl'])[
|
|
76
|
+
:host([theme~='outlined']:not([dir='rtl'])[slot='overflow']) {
|
|
77
77
|
margin-right: 0;
|
|
78
78
|
}
|
|
79
79
|
|
|
@@ -88,7 +88,7 @@ const menuBarButton = css`
|
|
|
88
88
|
}
|
|
89
89
|
|
|
90
90
|
:host([dir='rtl']:nth-last-of-type(2)),
|
|
91
|
-
:host([dir='rtl'][
|
|
91
|
+
:host([dir='rtl'][slot='overflow']) {
|
|
92
92
|
border-radius: 4px 0 0 4px;
|
|
93
93
|
}
|
|
94
94
|
|
|
@@ -101,7 +101,7 @@ const menuBarButton = css`
|
|
|
101
101
|
}
|
|
102
102
|
|
|
103
103
|
:host([theme~='outlined'][dir='rtl']:nth-last-of-type(2)),
|
|
104
|
-
:host([theme~='outlined'][dir='rtl'][
|
|
104
|
+
:host([theme~='outlined'][dir='rtl'][slot='overflow']) {
|
|
105
105
|
margin-left: 0;
|
|
106
106
|
}
|
|
107
107
|
`;
|
|
@@ -12,8 +12,7 @@ registerStyles(
|
|
|
12
12
|
font-size: var(--material-button-font-size);
|
|
13
13
|
}
|
|
14
14
|
|
|
15
|
-
:host([theme='menu-bar-item']) [part='content'] ::slotted(vaadin-icon[icon^='vaadin:'])
|
|
16
|
-
:host([theme='menu-bar-item']) [part='content'] ::slotted(iron-icon[icon^='vaadin:']) {
|
|
15
|
+
:host([theme='menu-bar-item']) [part='content'] ::slotted(vaadin-icon[icon^='vaadin:']) {
|
|
17
16
|
display: inline-block;
|
|
18
17
|
width: 18px;
|
|
19
18
|
height: 18px;
|
|
@@ -8,12 +8,12 @@ registerStyles(
|
|
|
8
8
|
padding-bottom: 5px;
|
|
9
9
|
}
|
|
10
10
|
|
|
11
|
-
:host([has-single-button])
|
|
11
|
+
:host([has-single-button]) ::slotted(vaadin-menu-bar-button) {
|
|
12
12
|
border-radius: 4px;
|
|
13
13
|
}
|
|
14
14
|
|
|
15
|
-
:host([theme~='end-aligned'])
|
|
16
|
-
:host([theme~='end-aligned'][has-single-button])
|
|
15
|
+
:host([theme~='end-aligned']) ::slotted(vaadin-menu-bar-button:first-of-type),
|
|
16
|
+
:host([theme~='end-aligned'][has-single-button]) ::slotted(vaadin-menu-bar-button) {
|
|
17
17
|
margin-inline-start: auto;
|
|
18
18
|
}
|
|
19
19
|
`,
|
package/web-types.json
CHANGED
|
@@ -1,15 +1,26 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json.schemastore.org/web-types",
|
|
3
3
|
"name": "@vaadin/menu-bar",
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "24.0.0-alpha10",
|
|
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/
|
|
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.0.0-alpha10/#/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/custom-theme/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.0.0-alpha10/#/elements/vaadin-button).\n- `<vaadin-context-menu-item>` - has the same API as [`<vaadin-item>`](https://cdn.vaadin.com/vaadin-web-components/24.0.0-alpha10/#/elements/vaadin-item).\n- `<vaadin-context-menu-list-box>` - has the same API as [`<vaadin-list-box>`](https://cdn.vaadin.com/vaadin-web-components/24.0.0-alpha10/#/elements/vaadin-list-box).\n- `<vaadin-context-menu-overlay>` - has the same API as [`<vaadin-overlay>`](https://cdn.vaadin.com/vaadin-web-components/24.0.0-alpha10/#/elements/vaadin-overlay).",
|
|
12
12
|
"attributes": [
|
|
13
|
+
{
|
|
14
|
+
"name": "disabled",
|
|
15
|
+
"description": "If true, the user cannot interact with this element.",
|
|
16
|
+
"value": {
|
|
17
|
+
"type": [
|
|
18
|
+
"boolean",
|
|
19
|
+
"null",
|
|
20
|
+
"undefined"
|
|
21
|
+
]
|
|
22
|
+
}
|
|
23
|
+
},
|
|
13
24
|
{
|
|
14
25
|
"name": "open-on-hover",
|
|
15
26
|
"description": "If true, the submenu will open on hover (mouseover) instead of click.",
|
|
@@ -22,11 +33,11 @@
|
|
|
22
33
|
}
|
|
23
34
|
},
|
|
24
35
|
{
|
|
25
|
-
"name": "
|
|
26
|
-
"description": "
|
|
36
|
+
"name": "overlay-class",
|
|
37
|
+
"description": "A space-delimited list of CSS class names\nto set on each sub-menu overlay element.",
|
|
27
38
|
"value": {
|
|
28
39
|
"type": [
|
|
29
|
-
"
|
|
40
|
+
"string",
|
|
30
41
|
"null",
|
|
31
42
|
"undefined"
|
|
32
43
|
]
|
|
@@ -47,8 +58,8 @@
|
|
|
47
58
|
"js": {
|
|
48
59
|
"properties": [
|
|
49
60
|
{
|
|
50
|
-
"name": "
|
|
51
|
-
"description": "If true, the
|
|
61
|
+
"name": "disabled",
|
|
62
|
+
"description": "If true, the user cannot interact with this element.",
|
|
52
63
|
"value": {
|
|
53
64
|
"type": [
|
|
54
65
|
"boolean",
|
|
@@ -58,8 +69,8 @@
|
|
|
58
69
|
}
|
|
59
70
|
},
|
|
60
71
|
{
|
|
61
|
-
"name": "
|
|
62
|
-
"description": "If true, the
|
|
72
|
+
"name": "openOnHover",
|
|
73
|
+
"description": "If true, the submenu will open on hover (mouseover) instead of click.",
|
|
63
74
|
"value": {
|
|
64
75
|
"type": [
|
|
65
76
|
"boolean",
|
|
@@ -85,6 +96,17 @@
|
|
|
85
96
|
"MenuBarI18n"
|
|
86
97
|
]
|
|
87
98
|
}
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
"name": "overlayClass",
|
|
102
|
+
"description": "A space-delimited list of CSS class names\nto set on each sub-menu overlay element.",
|
|
103
|
+
"value": {
|
|
104
|
+
"type": [
|
|
105
|
+
"string",
|
|
106
|
+
"null",
|
|
107
|
+
"undefined"
|
|
108
|
+
]
|
|
109
|
+
}
|
|
88
110
|
}
|
|
89
111
|
],
|
|
90
112
|
"events": [
|
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": "
|
|
4
|
+
"version": "24.0.0-alpha10",
|
|
5
5
|
"description-markup": "markdown",
|
|
6
6
|
"framework": "lit",
|
|
7
7
|
"framework-config": {
|
|
@@ -16,19 +16,19 @@
|
|
|
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/
|
|
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.0.0-alpha10/#/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/custom-theme/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.0.0-alpha10/#/elements/vaadin-button).\n- `<vaadin-context-menu-item>` - has the same API as [`<vaadin-item>`](https://cdn.vaadin.com/vaadin-web-components/24.0.0-alpha10/#/elements/vaadin-item).\n- `<vaadin-context-menu-list-box>` - has the same API as [`<vaadin-list-box>`](https://cdn.vaadin.com/vaadin-web-components/24.0.0-alpha10/#/elements/vaadin-list-box).\n- `<vaadin-context-menu-overlay>` - has the same API as [`<vaadin-overlay>`](https://cdn.vaadin.com/vaadin-web-components/24.0.0-alpha10/#/elements/vaadin-overlay).",
|
|
20
20
|
"extension": true,
|
|
21
21
|
"attributes": [
|
|
22
22
|
{
|
|
23
|
-
"name": "?
|
|
24
|
-
"description": "If true, the
|
|
23
|
+
"name": "?disabled",
|
|
24
|
+
"description": "If true, the user cannot interact with this element.",
|
|
25
25
|
"value": {
|
|
26
26
|
"kind": "expression"
|
|
27
27
|
}
|
|
28
28
|
},
|
|
29
29
|
{
|
|
30
|
-
"name": "?
|
|
31
|
-
"description": "If true, the
|
|
30
|
+
"name": "?openOnHover",
|
|
31
|
+
"description": "If true, the submenu will open on hover (mouseover) instead of click.",
|
|
32
32
|
"value": {
|
|
33
33
|
"kind": "expression"
|
|
34
34
|
}
|
|
@@ -47,6 +47,13 @@
|
|
|
47
47
|
"kind": "expression"
|
|
48
48
|
}
|
|
49
49
|
},
|
|
50
|
+
{
|
|
51
|
+
"name": ".overlayClass",
|
|
52
|
+
"description": "A space-delimited list of CSS class names\nto set on each sub-menu overlay element.",
|
|
53
|
+
"value": {
|
|
54
|
+
"kind": "expression"
|
|
55
|
+
}
|
|
56
|
+
},
|
|
50
57
|
{
|
|
51
58
|
"name": "@item-selected",
|
|
52
59
|
"description": "Fired when either a submenu item or menu bar button without nested children is clicked.",
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright (c) 2019 - 2022 Vaadin Ltd.
|
|
4
|
-
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5
|
-
*/
|
|
6
|
-
import type { Constructor } from '@open-wc/dedupe-mixin';
|
|
7
|
-
import type { ResizeMixinClass } from '@vaadin/component-base/src/resize-mixin.js';
|
|
8
|
-
|
|
9
|
-
export declare function ButtonsMixin<T extends Constructor<HTMLElement>>(
|
|
10
|
-
base: T,
|
|
11
|
-
): Constructor<ButtonsMixinClass> & Constructor<ResizeMixinClass> & T;
|
|
12
|
-
|
|
13
|
-
export declare class ButtonsMixinClass {
|
|
14
|
-
protected readonly _buttons: HTMLElement[];
|
|
15
|
-
|
|
16
|
-
protected readonly _container: HTMLElement;
|
|
17
|
-
|
|
18
|
-
protected readonly _overflow: HTMLElement;
|
|
19
|
-
|
|
20
|
-
protected _hasOverflow: boolean;
|
|
21
|
-
}
|