@vaadin/menu-bar 22.0.12 → 22.0.15
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 +1 -1
- package/src/vaadin-menu-bar-buttons-mixin.js +12 -8
- package/src/vaadin-menu-bar-interactions-mixin.d.ts +1 -1
- package/src/vaadin-menu-bar-interactions-mixin.js +5 -5
- package/src/vaadin-menu-bar.d.ts +2 -2
- package/src/vaadin-menu-bar.js +4 -4
- package/theme/lumo/vaadin-menu-bar-button-styles.js +1 -1
- package/theme/lumo/vaadin-menu-bar-item-styles.js +1 -1
- package/theme/lumo/vaadin-menu-bar-overlay-styles.js +1 -1
- package/theme/material/vaadin-menu-bar-button-styles.js +1 -1
- package/theme/material/vaadin-menu-bar-item-styles.js +1 -1
- package/theme/material/vaadin-menu-bar-overlay-styles.js +1 -1
- package/theme/material/vaadin-menu-bar-styles.js +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vaadin/menu-bar",
|
|
3
|
-
"version": "22.0.
|
|
3
|
+
"version": "22.0.15",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -35,18 +35,18 @@
|
|
|
35
35
|
"@open-wc/dedupe-mixin": "^1.3.0",
|
|
36
36
|
"@polymer/iron-resizable-behavior": "^3.0.0",
|
|
37
37
|
"@polymer/polymer": "^3.0.0",
|
|
38
|
-
"@vaadin/button": "^22.0.
|
|
39
|
-
"@vaadin/component-base": "^22.0.
|
|
40
|
-
"@vaadin/vaadin-context-menu": "^22.0.
|
|
41
|
-
"@vaadin/vaadin-lumo-styles": "^22.0.
|
|
42
|
-
"@vaadin/vaadin-material-styles": "^22.0.
|
|
43
|
-
"@vaadin/vaadin-themable-mixin": "^22.0.
|
|
38
|
+
"@vaadin/button": "^22.0.15",
|
|
39
|
+
"@vaadin/component-base": "^22.0.15",
|
|
40
|
+
"@vaadin/vaadin-context-menu": "^22.0.15",
|
|
41
|
+
"@vaadin/vaadin-lumo-styles": "^22.0.15",
|
|
42
|
+
"@vaadin/vaadin-material-styles": "^22.0.15",
|
|
43
|
+
"@vaadin/vaadin-themable-mixin": "^22.0.15"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
46
|
"@esm-bundle/chai": "^4.3.4",
|
|
47
|
-
"@vaadin/icon": "^22.0.
|
|
47
|
+
"@vaadin/icon": "^22.0.15",
|
|
48
48
|
"@vaadin/testing-helpers": "^0.3.2",
|
|
49
49
|
"sinon": "^9.2.1"
|
|
50
50
|
},
|
|
51
|
-
"gitHead": "
|
|
51
|
+
"gitHead": "bba021b56ba45da93d2bb980242956ad929ecfe2"
|
|
52
52
|
}
|
|
@@ -21,8 +21,8 @@ export const ButtonsMixin = (superClass) =>
|
|
|
21
21
|
*/
|
|
22
22
|
_hasOverflow: {
|
|
23
23
|
type: Boolean,
|
|
24
|
-
value: false
|
|
25
|
-
}
|
|
24
|
+
value: false,
|
|
25
|
+
},
|
|
26
26
|
};
|
|
27
27
|
}
|
|
28
28
|
|
|
@@ -111,8 +111,13 @@ export const ButtonsMixin = (superClass) =>
|
|
|
111
111
|
item.classList.remove('vaadin-menu-item');
|
|
112
112
|
}
|
|
113
113
|
}
|
|
114
|
-
this.
|
|
115
|
-
|
|
114
|
+
this.__updateOverflow([]);
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
/** @private */
|
|
118
|
+
__updateOverflow(items) {
|
|
119
|
+
this._overflow.item = { children: items };
|
|
120
|
+
this._hasOverflow = items.length > 0;
|
|
116
121
|
}
|
|
117
122
|
|
|
118
123
|
/** @private */
|
|
@@ -143,9 +148,8 @@ export const ButtonsMixin = (superClass) =>
|
|
|
143
148
|
// save width for buttons with component
|
|
144
149
|
btn.style.width = btnStyle.width;
|
|
145
150
|
}
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
};
|
|
151
|
+
const items = buttons.filter((_, idx) => idx >= i).map((b) => b.item);
|
|
152
|
+
this.__updateOverflow(items);
|
|
149
153
|
}
|
|
150
154
|
}
|
|
151
155
|
|
|
@@ -303,7 +307,7 @@ export const ButtonsMixin = (superClass) =>
|
|
|
303
307
|
this.__debounceOverflow = Debouncer.debounce(
|
|
304
308
|
this.__debounceOverflow,
|
|
305
309
|
animationFrame,
|
|
306
|
-
this.__detectOverflow.bind(this)
|
|
310
|
+
this.__detectOverflow.bind(this),
|
|
307
311
|
);
|
|
308
312
|
}
|
|
309
313
|
};
|
|
@@ -16,8 +16,8 @@ export const InteractionsMixin = (superClass) =>
|
|
|
16
16
|
* @attr {boolean} open-on-hover
|
|
17
17
|
*/
|
|
18
18
|
openOnHover: {
|
|
19
|
-
type: Boolean
|
|
20
|
-
}
|
|
19
|
+
type: Boolean,
|
|
20
|
+
},
|
|
21
21
|
};
|
|
22
22
|
}
|
|
23
23
|
|
|
@@ -324,9 +324,9 @@ export const InteractionsMixin = (superClass) =>
|
|
|
324
324
|
button.dispatchEvent(
|
|
325
325
|
new CustomEvent('opensubmenu', {
|
|
326
326
|
detail: {
|
|
327
|
-
children: items
|
|
328
|
-
}
|
|
329
|
-
})
|
|
327
|
+
children: items,
|
|
328
|
+
},
|
|
329
|
+
}),
|
|
330
330
|
);
|
|
331
331
|
|
|
332
332
|
this._setExpanded(button, true);
|
package/src/vaadin-menu-bar.d.ts
CHANGED
|
@@ -137,13 +137,13 @@ declare class MenuBar extends ButtonsMixin(InteractionsMixin(ElementMixin(Themab
|
|
|
137
137
|
addEventListener<K extends keyof MenuBarEventMap>(
|
|
138
138
|
type: K,
|
|
139
139
|
listener: (this: MenuBar, ev: MenuBarEventMap[K]) => void,
|
|
140
|
-
options?: boolean | AddEventListenerOptions
|
|
140
|
+
options?: boolean | AddEventListenerOptions,
|
|
141
141
|
): void;
|
|
142
142
|
|
|
143
143
|
removeEventListener<K extends keyof MenuBarEventMap>(
|
|
144
144
|
type: K,
|
|
145
145
|
listener: (this: MenuBar, ev: MenuBarEventMap[K]) => void,
|
|
146
|
-
options?: boolean | EventListenerOptions
|
|
146
|
+
options?: boolean | EventListenerOptions,
|
|
147
147
|
): void;
|
|
148
148
|
}
|
|
149
149
|
|
package/src/vaadin-menu-bar.js
CHANGED
|
@@ -163,7 +163,7 @@ class MenuBar extends ButtonsMixin(InteractionsMixin(ElementMixin(ThemableMixin(
|
|
|
163
163
|
*/
|
|
164
164
|
items: {
|
|
165
165
|
type: Array,
|
|
166
|
-
value: () => []
|
|
166
|
+
value: () => [],
|
|
167
167
|
},
|
|
168
168
|
|
|
169
169
|
/**
|
|
@@ -193,10 +193,10 @@ class MenuBar extends ButtonsMixin(InteractionsMixin(ElementMixin(ThemableMixin(
|
|
|
193
193
|
type: Object,
|
|
194
194
|
value: () => {
|
|
195
195
|
return {
|
|
196
|
-
moreOptions: 'More options'
|
|
196
|
+
moreOptions: 'More options',
|
|
197
197
|
};
|
|
198
|
-
}
|
|
199
|
-
}
|
|
198
|
+
},
|
|
199
|
+
},
|
|
200
200
|
};
|
|
201
201
|
}
|
|
202
202
|
|