@vaadin/side-nav 24.4.0-alpha15 → 24.4.0-alpha17
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/README.md +0 -1
- package/package.json +7 -7
- package/src/vaadin-side-nav-item.js +15 -0
- package/web-types.json +1 -1
- package/web-types.lit.json +1 -1
package/README.md
CHANGED
|
@@ -5,7 +5,6 @@ A web component for navigation menus.
|
|
|
5
5
|
[Documentation + Live Demo ↗](https://vaadin.com/docs/latest/components/side-nav)
|
|
6
6
|
|
|
7
7
|
[](https://www.npmjs.com/package/@vaadin/vaadin-side-nav)
|
|
8
|
-
[](https://discord.gg/PHmkCKC)
|
|
9
8
|
|
|
10
9
|
```html
|
|
11
10
|
<vaadin-side-nav collapsible>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vaadin/side-nav",
|
|
3
|
-
"version": "24.4.0-
|
|
3
|
+
"version": "24.4.0-alpha17",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -35,11 +35,11 @@
|
|
|
35
35
|
],
|
|
36
36
|
"dependencies": {
|
|
37
37
|
"@open-wc/dedupe-mixin": "^1.3.0",
|
|
38
|
-
"@vaadin/a11y-base": "24.4.0-
|
|
39
|
-
"@vaadin/component-base": "24.4.0-
|
|
40
|
-
"@vaadin/vaadin-lumo-styles": "24.4.0-
|
|
41
|
-
"@vaadin/vaadin-material-styles": "24.4.0-
|
|
42
|
-
"@vaadin/vaadin-themable-mixin": "24.4.0-
|
|
38
|
+
"@vaadin/a11y-base": "24.4.0-alpha17",
|
|
39
|
+
"@vaadin/component-base": "24.4.0-alpha17",
|
|
40
|
+
"@vaadin/vaadin-lumo-styles": "24.4.0-alpha17",
|
|
41
|
+
"@vaadin/vaadin-material-styles": "24.4.0-alpha17",
|
|
42
|
+
"@vaadin/vaadin-themable-mixin": "24.4.0-alpha17",
|
|
43
43
|
"lit": "^3.0.0"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
@@ -52,5 +52,5 @@
|
|
|
52
52
|
"web-types.json",
|
|
53
53
|
"web-types.lit.json"
|
|
54
54
|
],
|
|
55
|
-
"gitHead": "
|
|
55
|
+
"gitHead": "eb6b4dac66be1c0ddc77757bed5f84a6d355e5cf"
|
|
56
56
|
}
|
|
@@ -262,10 +262,25 @@ class SideNavItem extends SideNavChildrenMixin(DisabledMixin(ElementMixin(Themab
|
|
|
262
262
|
__updateCurrent() {
|
|
263
263
|
this._setCurrent(this.__isCurrent());
|
|
264
264
|
if (this.current) {
|
|
265
|
+
this.__expandParentItems();
|
|
265
266
|
this.expanded = this._items.length > 0;
|
|
266
267
|
}
|
|
267
268
|
}
|
|
268
269
|
|
|
270
|
+
/** @private */
|
|
271
|
+
__expandParentItems() {
|
|
272
|
+
const parentItem = this.__getParentItem();
|
|
273
|
+
if (parentItem) {
|
|
274
|
+
parentItem.__expandParentItems();
|
|
275
|
+
}
|
|
276
|
+
this.expanded = true;
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
/** @private */
|
|
280
|
+
__getParentItem() {
|
|
281
|
+
return this.parentElement instanceof SideNavItem ? this.parentElement : null;
|
|
282
|
+
}
|
|
283
|
+
|
|
269
284
|
/** @private */
|
|
270
285
|
__isCurrent() {
|
|
271
286
|
if (this.path == null) {
|
package/web-types.json
CHANGED