@vaadin/side-nav 24.4.0-alpha16 → 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 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
  [![npm version](https://badgen.net/npm/v/@vaadin/vaadin-side-nav)](https://www.npmjs.com/package/@vaadin/vaadin-side-nav)
8
- [![Discord](https://img.shields.io/discord/732335336448852018?label=discord)](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-alpha16",
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-alpha16",
39
- "@vaadin/component-base": "24.4.0-alpha16",
40
- "@vaadin/vaadin-lumo-styles": "24.4.0-alpha16",
41
- "@vaadin/vaadin-material-styles": "24.4.0-alpha16",
42
- "@vaadin/vaadin-themable-mixin": "24.4.0-alpha16",
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": "2d797855c2b3a3828ee7b0d90aeb227b56c32e76"
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
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/web-types",
3
3
  "name": "@vaadin/side-nav",
4
- "version": "24.4.0-alpha16",
4
+ "version": "24.4.0-alpha17",
5
5
  "description-markup": "markdown",
6
6
  "contributions": {
7
7
  "html": {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/web-types",
3
3
  "name": "@vaadin/side-nav",
4
- "version": "24.4.0-alpha16",
4
+ "version": "24.4.0-alpha17",
5
5
  "description-markup": "markdown",
6
6
  "framework": "lit",
7
7
  "framework-config": {