@vaadin/side-nav 24.2.0-dev.e9803eea7 → 24.3.0-alpha1

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vaadin/side-nav",
3
- "version": "24.2.0-dev.e9803eea7",
3
+ "version": "24.3.0-alpha1",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -20,7 +20,6 @@
20
20
  "module": "vaadin-side-nav.js",
21
21
  "type": "module",
22
22
  "files": [
23
- "enable.js",
24
23
  "src",
25
24
  "theme",
26
25
  "vaadin-*.d.ts",
@@ -35,15 +34,15 @@
35
34
  "web-component"
36
35
  ],
37
36
  "dependencies": {
38
- "@vaadin/component-base": "24.2.0-dev.e9803eea7",
39
- "@vaadin/vaadin-lumo-styles": "24.2.0-dev.e9803eea7",
40
- "@vaadin/vaadin-material-styles": "24.2.0-dev.e9803eea7",
41
- "@vaadin/vaadin-themable-mixin": "24.2.0-dev.e9803eea7",
37
+ "@vaadin/component-base": "24.3.0-alpha1",
38
+ "@vaadin/vaadin-lumo-styles": "24.3.0-alpha1",
39
+ "@vaadin/vaadin-material-styles": "24.3.0-alpha1",
40
+ "@vaadin/vaadin-themable-mixin": "24.3.0-alpha1",
42
41
  "lit": "^2.0.0"
43
42
  },
44
43
  "devDependencies": {
45
44
  "@esm-bundle/chai": "^4.3.4",
46
- "@vaadin/testing-helpers": "^0.4.3",
45
+ "@vaadin/testing-helpers": "^0.5.0",
47
46
  "lit": "^2.0.0",
48
47
  "sinon": "^13.0.2"
49
48
  },
@@ -51,5 +50,5 @@
51
50
  "web-types.json",
52
51
  "web-types.lit.json"
53
52
  ],
54
- "gitHead": "a065b79b9d5a189e457fab312cc8aff0d7f2f910"
53
+ "gitHead": "9ca6f3ca220a777e8eea181a1f5717e39a732240"
55
54
  }
@@ -3,10 +3,8 @@
3
3
  * Copyright (c) 2023 Vaadin Ltd.
4
4
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
5
  */
6
- import { LitElement } from 'lit';
7
6
  import { DisabledMixin } from '@vaadin/a11y-base/src/disabled-mixin.js';
8
7
  import { ElementMixin } from '@vaadin/component-base/src/element-mixin.js';
9
- import { PolylitMixin } from '@vaadin/component-base/src/polylit-mixin.js';
10
8
  import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
11
9
  import { SideNavChildrenMixin } from './vaadin-side-nav-children-mixin.js';
12
10
 
@@ -79,9 +77,7 @@ export type SideNavItemEventMap = HTMLElementEventMap & SideNavItemCustomEventMa
79
77
  *
80
78
  * @fires {CustomEvent} expanded-changed - Fired when the `expanded` property changes.
81
79
  */
82
- declare class SideNavItem extends SideNavChildrenMixin(
83
- DisabledMixin(ElementMixin(ThemableMixin(PolylitMixin(LitElement)))),
84
- ) {
80
+ declare class SideNavItem extends SideNavChildrenMixin(DisabledMixin(ElementMixin(ThemableMixin(HTMLElement)))) {
85
81
  /**
86
82
  * The path to navigate to
87
83
  */
@@ -7,6 +7,7 @@ import { html, LitElement } from 'lit';
7
7
  import { ifDefined } from 'lit/directives/if-defined.js';
8
8
  import { DisabledMixin } from '@vaadin/a11y-base/src/disabled-mixin.js';
9
9
  import { screenReaderOnly } from '@vaadin/a11y-base/src/styles/sr-only-styles.js';
10
+ import { defineCustomElement } from '@vaadin/component-base/src/define.js';
10
11
  import { ElementMixin } from '@vaadin/component-base/src/element-mixin.js';
11
12
  import { PolylitMixin } from '@vaadin/component-base/src/polylit-mixin.js';
12
13
  import { matchPaths } from '@vaadin/component-base/src/url-utils.js';
@@ -14,10 +15,6 @@ import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mix
14
15
  import { sideNavItemBaseStyles } from './vaadin-side-nav-base-styles.js';
15
16
  import { SideNavChildrenMixin } from './vaadin-side-nav-children-mixin.js';
16
17
 
17
- function isEnabled() {
18
- return window.Vaadin && window.Vaadin.featureFlags && !!window.Vaadin.featureFlags.sideNavComponent;
19
- }
20
-
21
18
  /**
22
19
  * A navigation item to be used within `<vaadin-side-nav>`. Represents a navigation target.
23
20
  * Not intended to be used separately.
@@ -76,8 +73,8 @@ function isEnabled() {
76
73
  *
77
74
  * @fires {CustomEvent} expanded-changed - Fired when the `expanded` property changes.
78
75
  *
79
- * @extends LitElement
80
- * @mixes PolylitMixin
76
+ * @customElement
77
+ * @extends HTMLElement
81
78
  * @mixes ThemableMixin
82
79
  * @mixes DisabledMixin
83
80
  * @mixes ElementMixin
@@ -202,7 +199,7 @@ class SideNavItem extends SideNavChildrenMixin(DisabledMixin(ElementMixin(Themab
202
199
  <a
203
200
  id="link"
204
201
  ?disabled="${this.disabled}"
205
- tabindex="${this.disabled ? '-1' : '0'}"
202
+ tabindex="${this.disabled || !this.path ? '-1' : '0'}"
206
203
  href="${ifDefined(this.disabled ? null : this.path)}"
207
204
  part="link"
208
205
  aria-current="${this.current ? 'page' : 'false'}"
@@ -220,7 +217,7 @@ class SideNavItem extends SideNavChildrenMixin(DisabledMixin(ElementMixin(Themab
220
217
  aria-labelledby="link i18n"
221
218
  ></button>
222
219
  </div>
223
- <ul part="children" ?hidden="${!this.expanded}" aria-hidden="${this.expanded ? 'false' : 'true'}">
220
+ <ul part="children" role="list" ?hidden="${!this.expanded}" aria-hidden="${this.expanded ? 'false' : 'true'}">
224
221
  <slot name="children"></slot>
225
222
  </ul>
226
223
  <div class="sr-only" id="i18n">${this.i18n.toggle}</div>
@@ -268,8 +265,6 @@ class SideNavItem extends SideNavChildrenMixin(DisabledMixin(ElementMixin(Themab
268
265
  }
269
266
  }
270
267
 
271
- if (isEnabled()) {
272
- customElements.define(SideNavItem.is, SideNavItem);
273
- }
268
+ defineCustomElement(SideNavItem);
274
269
 
275
270
  export { SideNavItem };
@@ -3,10 +3,8 @@
3
3
  * Copyright (c) 2023 Vaadin Ltd.
4
4
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
5
  */
6
- import { LitElement } from 'lit';
7
6
  import { FocusMixin } from '@vaadin/a11y-base/src/focus-mixin.js';
8
7
  import { ElementMixin } from '@vaadin/component-base/src/element-mixin.js';
9
- import { PolylitMixin } from '@vaadin/component-base/src/polylit-mixin.js';
10
8
  import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
11
9
  import { SideNavChildrenMixin, type SideNavI18n } from './vaadin-side-nav-children-mixin.js';
12
10
 
@@ -74,7 +72,7 @@ export type SideNavEventMap = HTMLElementEventMap & SideNavCustomEventMap;
74
72
  *
75
73
  * @fires {CustomEvent} collapsed-changed - Fired when the `collapsed` property changes.
76
74
  */
77
- declare class SideNav extends SideNavChildrenMixin(FocusMixin(ElementMixin(ThemableMixin(PolylitMixin(LitElement))))) {
75
+ declare class SideNav extends SideNavChildrenMixin(FocusMixin(ElementMixin(ThemableMixin(HTMLElement)))) {
78
76
  /**
79
77
  * Whether the side nav is collapsible. When enabled, the toggle icon is shown.
80
78
  */
@@ -6,6 +6,7 @@
6
6
  import { html, LitElement } from 'lit';
7
7
  import { ifDefined } from 'lit/directives/if-defined.js';
8
8
  import { FocusMixin } from '@vaadin/a11y-base/src/focus-mixin.js';
9
+ import { defineCustomElement } from '@vaadin/component-base/src/define.js';
9
10
  import { ElementMixin } from '@vaadin/component-base/src/element-mixin.js';
10
11
  import { PolylitMixin } from '@vaadin/component-base/src/polylit-mixin.js';
11
12
  import { generateUniqueId } from '@vaadin/component-base/src/unique-id-utils.js';
@@ -13,10 +14,6 @@ import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mix
13
14
  import { sideNavBaseStyles } from './vaadin-side-nav-base-styles.js';
14
15
  import { SideNavChildrenMixin } from './vaadin-side-nav-children-mixin.js';
15
16
 
16
- function isEnabled() {
17
- return window.Vaadin && window.Vaadin.featureFlags && !!window.Vaadin.featureFlags.sideNavComponent;
18
- }
19
-
20
17
  /**
21
18
  * `<vaadin-side-nav>` is a Web Component for navigation menus.
22
19
  *
@@ -68,8 +65,8 @@ function isEnabled() {
68
65
  *
69
66
  * @fires {CustomEvent} collapsed-changed - Fired when the `collapsed` property changes.
70
67
  *
71
- * @extends LitElement
72
- * @mixes PolylitMixin
68
+ * @customElement
69
+ * @extends HTMLElement
73
70
  * @mixes ThemableMixin
74
71
  * @mixes ElementMixin
75
72
  * @mixes SideNavChildrenMixin
@@ -152,12 +149,19 @@ class SideNav extends SideNavChildrenMixin(FocusMixin(ElementMixin(ThemableMixin
152
149
  part="label"
153
150
  @click="${this._onLabelClick}"
154
151
  aria-expanded="${ifDefined(this.collapsible ? !this.collapsed : null)}"
152
+ aria-hidden="${ifDefined(this.collapsible === false ? true : null)}"
155
153
  aria-controls="children"
156
154
  >
157
155
  <slot name="label" @slotchange="${this._onLabelSlotChange}"></slot>
158
156
  <span part="toggle-button" aria-hidden="true"></span>
159
157
  </button>
160
- <ul id="children" part="children" ?hidden="${this.collapsed}" aria-hidden="${this.collapsed ? 'true' : 'false'}">
158
+ <ul
159
+ id="children"
160
+ role="list"
161
+ part="children"
162
+ ?hidden="${this.collapsed}"
163
+ aria-hidden="${this.collapsed ? 'true' : 'false'}"
164
+ >
161
165
  <slot></slot>
162
166
  </ul>
163
167
  `;
@@ -199,12 +203,6 @@ class SideNav extends SideNavChildrenMixin(FocusMixin(ElementMixin(ThemableMixin
199
203
  }
200
204
  }
201
205
 
202
- if (isEnabled()) {
203
- customElements.define(SideNav.is, SideNav);
204
- } else {
205
- console.warn(
206
- 'WARNING: The side-nav component is currently an experimental feature and needs to be explicitly enabled. To enable the component, `import "@vaadin/side-nav/enable.js"` *before* importing the side-nav module itself.',
207
- );
208
- }
206
+ defineCustomElement(SideNav);
209
207
 
210
208
  export { SideNav };
@@ -108,9 +108,10 @@ export const sideNavItemStyles = css`
108
108
  --_child-indent-2: var(--_child-indent);
109
109
  }
110
110
 
111
- :host([current]) [part='link'] {
112
- color: var(--lumo-primary-text-color);
111
+ :host([current]) [part='content'] {
113
112
  background-color: var(--lumo-primary-color-10pct);
113
+ color: var(--lumo-primary-text-color);
114
+ border-radius: var(--lumo-border-radius-m);
114
115
  }
115
116
  `;
116
117
 
@@ -5,8 +5,11 @@ import { fieldButton } from '@vaadin/vaadin-material-styles/mixins/field-button.
5
5
  import { css, registerStyles } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
6
6
 
7
7
  export const sideNavItemStyles = css`
8
- [part='link'] {
8
+ [part='content'] {
9
9
  position: relative;
10
+ }
11
+
12
+ [part='link'] {
10
13
  width: 100%;
11
14
  min-height: 32px;
12
15
  margin: 4px 0;
@@ -35,10 +38,10 @@ export const sideNavItemStyles = css`
35
38
  color: var(--material-disabled-text-color);
36
39
  }
37
40
 
38
- :host([current]) [part='link']::before {
41
+ :host([current]) [part='content']::before {
39
42
  position: absolute;
40
43
  content: '';
41
- inset: 0;
44
+ inset: 4px 0;
42
45
  background-color: var(--material-primary-color);
43
46
  opacity: 0.12;
44
47
  border-radius: 4px;
package/web-types.json ADDED
@@ -0,0 +1,191 @@
1
+ {
2
+ "$schema": "https://json.schemastore.org/web-types",
3
+ "name": "@vaadin/side-nav",
4
+ "version": "24.3.0-alpha1",
5
+ "description-markup": "markdown",
6
+ "contributions": {
7
+ "html": {
8
+ "elements": [
9
+ {
10
+ "name": "vaadin-side-nav-item",
11
+ "description": "A navigation item to be used within `<vaadin-side-nav>`. Represents a navigation target.\nNot intended to be used separately.\n\n```html\n<vaadin-side-nav-item>\n Item 1\n <vaadin-side-nav-item path=\"/path1\" slot=\"children\">\n Child item 1\n </vaadin-side-nav-item>\n <vaadin-side-nav-item path=\"/path2\" slot=\"children\">\n Child item 2\n </vaadin-side-nav-item>\n</vaadin-side-nav-item>\n```\n\n### Customization\n\nYou can configure the item by using `slot` names.\n\nSlot name | Description\n----------|-------------\n`prefix` | A slot for content before the label (e.g. an icon).\n`suffix` | A slot for content after the label (e.g. an icon).\n\n#### Example\n\n```html\n<vaadin-side-nav-item>\n <vaadin-icon icon=\"vaadin:chart\" slot=\"prefix\"></vaadin-icon>\n Item\n <span theme=\"badge primary\" slot=\"suffix\">Suffix</span>\n</vaadin-side-nav-item>\n```\n\n### Styling\n\nThe following shadow DOM parts are available for styling:\n\nPart name | Description\n----------------|----------------\n`content` | The element that wraps link and toggle button\n`children` | The element that wraps child items\n`link` | The clickable anchor used for navigation\n`toggle-button` | The toggle button\n\nThe following state attributes are available for styling:\n\nAttribute | Description\n---------------|-------------\n`disabled` | Set when the element is disabled.\n`expanded` | Set when the element is expanded.\n`has-children` | Set when the element has child items.\n\nSee [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.",
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
+ },
24
+ {
25
+ "name": "path",
26
+ "description": "The path to navigate to",
27
+ "value": {
28
+ "type": [
29
+ "string",
30
+ "null",
31
+ "undefined"
32
+ ]
33
+ }
34
+ },
35
+ {
36
+ "name": "expanded",
37
+ "description": "Whether to show the child items or not",
38
+ "value": {
39
+ "type": [
40
+ "boolean"
41
+ ]
42
+ }
43
+ },
44
+ {
45
+ "name": "theme",
46
+ "description": "The theme variants to apply to the component.",
47
+ "value": {
48
+ "type": [
49
+ "string",
50
+ "null",
51
+ "undefined"
52
+ ]
53
+ }
54
+ }
55
+ ],
56
+ "js": {
57
+ "properties": [
58
+ {
59
+ "name": "disabled",
60
+ "description": "If true, the user cannot interact with this element.",
61
+ "value": {
62
+ "type": [
63
+ "boolean",
64
+ "null",
65
+ "undefined"
66
+ ]
67
+ }
68
+ },
69
+ {
70
+ "name": "i18n",
71
+ "description": "The object used to localize this component.\n\nTo change the default localization, replace the entire\n`i18n` object with a custom one.\n\nThe object has the following structure and default values:\n```\n{\n toggle: 'Toggle child items'\n}\n```",
72
+ "value": {
73
+ "type": [
74
+ "SideNavI18n"
75
+ ]
76
+ }
77
+ },
78
+ {
79
+ "name": "path",
80
+ "description": "The path to navigate to",
81
+ "value": {
82
+ "type": [
83
+ "string",
84
+ "null",
85
+ "undefined"
86
+ ]
87
+ }
88
+ },
89
+ {
90
+ "name": "pathAliases",
91
+ "description": "The list of alternative paths matching this item",
92
+ "value": {
93
+ "type": [
94
+ "Array.<string>"
95
+ ]
96
+ }
97
+ },
98
+ {
99
+ "name": "expanded",
100
+ "description": "Whether to show the child items or not",
101
+ "value": {
102
+ "type": [
103
+ "boolean"
104
+ ]
105
+ }
106
+ }
107
+ ],
108
+ "events": [
109
+ {
110
+ "name": "expanded-changed",
111
+ "description": "Fired when the `expanded` property changes."
112
+ }
113
+ ]
114
+ }
115
+ },
116
+ {
117
+ "name": "vaadin-side-nav",
118
+ "description": "`<vaadin-side-nav>` is a Web Component for navigation menus.\n\n```html\n<vaadin-side-nav>\n <vaadin-side-nav-item>Item 1</vaadin-side-nav-item>\n <vaadin-side-nav-item>Item 2</vaadin-side-nav-item>\n <vaadin-side-nav-item>Item 3</vaadin-side-nav-item>\n <vaadin-side-nav-item>Item 4</vaadin-side-nav-item>\n</vaadin-side-nav>\n```\n\n### Customization\n\nYou can configure the component by using `slot` names.\n\nSlot name | Description\n----------|-------------\n`label` | The label (text) inside the side nav.\n\n#### Example\n\n```html\n<vaadin-side-nav>\n <span slot=\"label\">Main menu</span>\n <vaadin-side-nav-item>Item</vaadin-side-nav-item>\n</vaadin-side-nav>\n```\n\n### Styling\n\nThe following shadow DOM parts are available for styling:\n\nPart name | Description\n----------------|----------------\n`label` | The label element\n`children` | The element that wraps child items\n`toggle-button` | The toggle button\n\nThe following state attributes are available for styling:\n\nAttribute | Description\n-------------|-------------\n`collapsed` | Set when the element is collapsed.\n`focus-ring` | Set when the label is focused using the keyboard.\n`focused` | Set when the label is focused.\n\nSee [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.",
119
+ "attributes": [
120
+ {
121
+ "name": "collapsible",
122
+ "description": "Whether the side nav is collapsible. When enabled, the toggle icon is shown.",
123
+ "value": {
124
+ "type": [
125
+ "boolean"
126
+ ]
127
+ }
128
+ },
129
+ {
130
+ "name": "collapsed",
131
+ "description": "Whether the side nav is collapsed. When collapsed, the items are hidden.",
132
+ "value": {
133
+ "type": [
134
+ "boolean"
135
+ ]
136
+ }
137
+ },
138
+ {
139
+ "name": "theme",
140
+ "description": "The theme variants to apply to the component.",
141
+ "value": {
142
+ "type": [
143
+ "string",
144
+ "null",
145
+ "undefined"
146
+ ]
147
+ }
148
+ }
149
+ ],
150
+ "js": {
151
+ "properties": [
152
+ {
153
+ "name": "i18n",
154
+ "description": "The object used to localize this component.\n\nTo change the default localization, replace the entire\n`i18n` object with a custom one.\n\nThe object has the following structure and default values:\n```\n{\n toggle: 'Toggle child items'\n}\n```",
155
+ "value": {
156
+ "type": [
157
+ "SideNavI18n"
158
+ ]
159
+ }
160
+ },
161
+ {
162
+ "name": "collapsible",
163
+ "description": "Whether the side nav is collapsible. When enabled, the toggle icon is shown.",
164
+ "value": {
165
+ "type": [
166
+ "boolean"
167
+ ]
168
+ }
169
+ },
170
+ {
171
+ "name": "collapsed",
172
+ "description": "Whether the side nav is collapsed. When collapsed, the items are hidden.",
173
+ "value": {
174
+ "type": [
175
+ "boolean"
176
+ ]
177
+ }
178
+ }
179
+ ],
180
+ "events": [
181
+ {
182
+ "name": "collapsed-changed",
183
+ "description": "Fired when the `collapsed` property changes."
184
+ }
185
+ ]
186
+ }
187
+ }
188
+ ]
189
+ }
190
+ }
191
+ }
@@ -0,0 +1,104 @@
1
+ {
2
+ "$schema": "https://json.schemastore.org/web-types",
3
+ "name": "@vaadin/side-nav",
4
+ "version": "24.3.0-alpha1",
5
+ "description-markup": "markdown",
6
+ "framework": "lit",
7
+ "framework-config": {
8
+ "enable-when": {
9
+ "node-packages": [
10
+ "lit"
11
+ ]
12
+ }
13
+ },
14
+ "contributions": {
15
+ "html": {
16
+ "elements": [
17
+ {
18
+ "name": "vaadin-side-nav-item",
19
+ "description": "A navigation item to be used within `<vaadin-side-nav>`. Represents a navigation target.\nNot intended to be used separately.\n\n```html\n<vaadin-side-nav-item>\n Item 1\n <vaadin-side-nav-item path=\"/path1\" slot=\"children\">\n Child item 1\n </vaadin-side-nav-item>\n <vaadin-side-nav-item path=\"/path2\" slot=\"children\">\n Child item 2\n </vaadin-side-nav-item>\n</vaadin-side-nav-item>\n```\n\n### Customization\n\nYou can configure the item by using `slot` names.\n\nSlot name | Description\n----------|-------------\n`prefix` | A slot for content before the label (e.g. an icon).\n`suffix` | A slot for content after the label (e.g. an icon).\n\n#### Example\n\n```html\n<vaadin-side-nav-item>\n <vaadin-icon icon=\"vaadin:chart\" slot=\"prefix\"></vaadin-icon>\n Item\n <span theme=\"badge primary\" slot=\"suffix\">Suffix</span>\n</vaadin-side-nav-item>\n```\n\n### Styling\n\nThe following shadow DOM parts are available for styling:\n\nPart name | Description\n----------------|----------------\n`content` | The element that wraps link and toggle button\n`children` | The element that wraps child items\n`link` | The clickable anchor used for navigation\n`toggle-button` | The toggle button\n\nThe following state attributes are available for styling:\n\nAttribute | Description\n---------------|-------------\n`disabled` | Set when the element is disabled.\n`expanded` | Set when the element is expanded.\n`has-children` | Set when the element has child items.\n\nSee [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.",
20
+ "extension": true,
21
+ "attributes": [
22
+ {
23
+ "name": "?disabled",
24
+ "description": "If true, the user cannot interact with this element.",
25
+ "value": {
26
+ "kind": "expression"
27
+ }
28
+ },
29
+ {
30
+ "name": "?expanded",
31
+ "description": "Whether to show the child items or not",
32
+ "value": {
33
+ "kind": "expression"
34
+ }
35
+ },
36
+ {
37
+ "name": ".i18n",
38
+ "description": "The object used to localize this component.\n\nTo change the default localization, replace the entire\n`i18n` object with a custom one.\n\nThe object has the following structure and default values:\n```\n{\n toggle: 'Toggle child items'\n}\n```",
39
+ "value": {
40
+ "kind": "expression"
41
+ }
42
+ },
43
+ {
44
+ "name": ".path",
45
+ "description": "The path to navigate to",
46
+ "value": {
47
+ "kind": "expression"
48
+ }
49
+ },
50
+ {
51
+ "name": ".pathAliases",
52
+ "description": "The list of alternative paths matching this item",
53
+ "value": {
54
+ "kind": "expression"
55
+ }
56
+ },
57
+ {
58
+ "name": "@expanded-changed",
59
+ "description": "Fired when the `expanded` property changes.",
60
+ "value": {
61
+ "kind": "expression"
62
+ }
63
+ }
64
+ ]
65
+ },
66
+ {
67
+ "name": "vaadin-side-nav",
68
+ "description": "`<vaadin-side-nav>` is a Web Component for navigation menus.\n\n```html\n<vaadin-side-nav>\n <vaadin-side-nav-item>Item 1</vaadin-side-nav-item>\n <vaadin-side-nav-item>Item 2</vaadin-side-nav-item>\n <vaadin-side-nav-item>Item 3</vaadin-side-nav-item>\n <vaadin-side-nav-item>Item 4</vaadin-side-nav-item>\n</vaadin-side-nav>\n```\n\n### Customization\n\nYou can configure the component by using `slot` names.\n\nSlot name | Description\n----------|-------------\n`label` | The label (text) inside the side nav.\n\n#### Example\n\n```html\n<vaadin-side-nav>\n <span slot=\"label\">Main menu</span>\n <vaadin-side-nav-item>Item</vaadin-side-nav-item>\n</vaadin-side-nav>\n```\n\n### Styling\n\nThe following shadow DOM parts are available for styling:\n\nPart name | Description\n----------------|----------------\n`label` | The label element\n`children` | The element that wraps child items\n`toggle-button` | The toggle button\n\nThe following state attributes are available for styling:\n\nAttribute | Description\n-------------|-------------\n`collapsed` | Set when the element is collapsed.\n`focus-ring` | Set when the label is focused using the keyboard.\n`focused` | Set when the label is focused.\n\nSee [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.",
69
+ "extension": true,
70
+ "attributes": [
71
+ {
72
+ "name": "?collapsible",
73
+ "description": "Whether the side nav is collapsible. When enabled, the toggle icon is shown.",
74
+ "value": {
75
+ "kind": "expression"
76
+ }
77
+ },
78
+ {
79
+ "name": "?collapsed",
80
+ "description": "Whether the side nav is collapsed. When collapsed, the items are hidden.",
81
+ "value": {
82
+ "kind": "expression"
83
+ }
84
+ },
85
+ {
86
+ "name": ".i18n",
87
+ "description": "The object used to localize this component.\n\nTo change the default localization, replace the entire\n`i18n` object with a custom one.\n\nThe object has the following structure and default values:\n```\n{\n toggle: 'Toggle child items'\n}\n```",
88
+ "value": {
89
+ "kind": "expression"
90
+ }
91
+ },
92
+ {
93
+ "name": "@collapsed-changed",
94
+ "description": "Fired when the `collapsed` property changes.",
95
+ "value": {
96
+ "kind": "expression"
97
+ }
98
+ }
99
+ ]
100
+ }
101
+ ]
102
+ }
103
+ }
104
+ }
package/enable.js DELETED
@@ -1,3 +0,0 @@
1
- window.Vaadin ||= {};
2
- window.Vaadin.featureFlags ||= {};
3
- window.Vaadin.featureFlags.sideNavComponent = true;