@vaadin/side-nav 24.8.0-alpha9 → 25.0.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/README.md +0 -23
- package/package.json +8 -9
- package/web-types.json +1 -1
- package/web-types.lit.json +1 -1
- package/theme/material/vaadin-side-nav-item-styles.d.ts +0 -4
- package/theme/material/vaadin-side-nav-item-styles.js +0 -149
- package/theme/material/vaadin-side-nav-item.d.ts +0 -7
- package/theme/material/vaadin-side-nav-item.js +0 -7
- package/theme/material/vaadin-side-nav-styles.d.ts +0 -4
- package/theme/material/vaadin-side-nav-styles.js +0 -68
- package/theme/material/vaadin-side-nav.d.ts +0 -8
- package/theme/material/vaadin-side-nav.js +0 -8
package/README.md
CHANGED
|
@@ -41,29 +41,6 @@ Once installed, import the component in your application:
|
|
|
41
41
|
import '@vaadin/side-nav';
|
|
42
42
|
```
|
|
43
43
|
|
|
44
|
-
## Themes
|
|
45
|
-
|
|
46
|
-
Vaadin components come with two built-in [themes](https://vaadin.com/docs/latest/styling), Lumo and Material.
|
|
47
|
-
The [main entrypoint](https://github.com/vaadin/web-components/blob/main/packages/side-nav/vaadin-side-nav.js) of the package uses the Lumo theme.
|
|
48
|
-
|
|
49
|
-
To use the Material theme, import the component from the `theme/material` folder:
|
|
50
|
-
|
|
51
|
-
```js
|
|
52
|
-
import '@vaadin/side-nav/theme/material/vaadin-side-nav.js';
|
|
53
|
-
```
|
|
54
|
-
|
|
55
|
-
You can also import the Lumo version of the component explicitly:
|
|
56
|
-
|
|
57
|
-
```js
|
|
58
|
-
import '@vaadin/side-nav/theme/lumo/vaadin-side-nav.js';
|
|
59
|
-
```
|
|
60
|
-
|
|
61
|
-
Finally, you can import the un-themed component from the `src` folder to get a minimal starting point:
|
|
62
|
-
|
|
63
|
-
```js
|
|
64
|
-
import '@vaadin/side-nav/src/vaadin-side-nav.js';
|
|
65
|
-
```
|
|
66
|
-
|
|
67
44
|
## Contributing
|
|
68
45
|
|
|
69
46
|
Read the [contributing guide](https://vaadin.com/docs/latest/contributing) to learn about our development process, how to propose bugfixes and improvements, and how to test your changes to Vaadin components.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vaadin/side-nav",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "25.0.0-alpha1",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -35,16 +35,15 @@
|
|
|
35
35
|
],
|
|
36
36
|
"dependencies": {
|
|
37
37
|
"@open-wc/dedupe-mixin": "^1.3.0",
|
|
38
|
-
"@vaadin/a11y-base": "
|
|
39
|
-
"@vaadin/component-base": "
|
|
40
|
-
"@vaadin/vaadin-lumo-styles": "
|
|
41
|
-
"@vaadin/vaadin-
|
|
42
|
-
"@vaadin/vaadin-themable-mixin": "24.8.0-alpha9",
|
|
38
|
+
"@vaadin/a11y-base": "25.0.0-alpha1",
|
|
39
|
+
"@vaadin/component-base": "25.0.0-alpha1",
|
|
40
|
+
"@vaadin/vaadin-lumo-styles": "25.0.0-alpha1",
|
|
41
|
+
"@vaadin/vaadin-themable-mixin": "25.0.0-alpha1",
|
|
43
42
|
"lit": "^3.0.0"
|
|
44
43
|
},
|
|
45
44
|
"devDependencies": {
|
|
46
|
-
"@vaadin/chai-plugins": "
|
|
47
|
-
"@vaadin/test-runner-commands": "
|
|
45
|
+
"@vaadin/chai-plugins": "25.0.0-alpha1",
|
|
46
|
+
"@vaadin/test-runner-commands": "25.0.0-alpha1",
|
|
48
47
|
"@vaadin/testing-helpers": "^1.1.0",
|
|
49
48
|
"lit": "^3.0.0",
|
|
50
49
|
"sinon": "^18.0.0"
|
|
@@ -53,5 +52,5 @@
|
|
|
53
52
|
"web-types.json",
|
|
54
53
|
"web-types.lit.json"
|
|
55
54
|
],
|
|
56
|
-
"gitHead": "
|
|
55
|
+
"gitHead": "b8c22a4a0c64156210d0daac96b43ae4e5526d49"
|
|
57
56
|
}
|
package/web-types.json
CHANGED
package/web-types.lit.json
CHANGED
|
@@ -1,149 +0,0 @@
|
|
|
1
|
-
import '@vaadin/vaadin-material-styles/color.js';
|
|
2
|
-
import '@vaadin/vaadin-material-styles/font-icons.js';
|
|
3
|
-
import '@vaadin/vaadin-material-styles/typography.js';
|
|
4
|
-
import { fieldButton } from '@vaadin/vaadin-material-styles/mixins/field-button.js';
|
|
5
|
-
import { css, registerStyles } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
|
|
6
|
-
|
|
7
|
-
export const sideNavItemStyles = css`
|
|
8
|
-
[part='content'] {
|
|
9
|
-
position: relative;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
[part='link'] {
|
|
13
|
-
width: 100%;
|
|
14
|
-
min-height: 32px;
|
|
15
|
-
margin: 4px 0;
|
|
16
|
-
gap: 8px;
|
|
17
|
-
padding: 4px 8px;
|
|
18
|
-
padding-inline-start: calc(8px + var(--_child-indent, 0px));
|
|
19
|
-
font-family: var(--material-font-family);
|
|
20
|
-
font-size: var(--material-small-font-size);
|
|
21
|
-
line-height: 1;
|
|
22
|
-
font-weight: 500;
|
|
23
|
-
color: var(--material-body-text-color);
|
|
24
|
-
transition:
|
|
25
|
-
background-color 140ms,
|
|
26
|
-
color 140ms;
|
|
27
|
-
border-radius: 4px;
|
|
28
|
-
cursor: default;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
[part='link'][href] {
|
|
32
|
-
cursor: pointer;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
:host([current]) [part='link'] {
|
|
36
|
-
color: var(--material-primary-text-color);
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
:host([disabled]) [part='link'] {
|
|
40
|
-
color: var(--material-disabled-text-color);
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
:host([current]) [part='content']::before {
|
|
44
|
-
position: absolute;
|
|
45
|
-
content: '';
|
|
46
|
-
inset: 4px 0;
|
|
47
|
-
background-color: var(--material-primary-color);
|
|
48
|
-
opacity: 0.12;
|
|
49
|
-
border-radius: 4px;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
[part='toggle-button'] {
|
|
53
|
-
width: 32px;
|
|
54
|
-
height: 32px;
|
|
55
|
-
margin-inline-end: -4px;
|
|
56
|
-
transform: rotate(90deg);
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
[part='toggle-button']::before {
|
|
60
|
-
font-family: 'material-icons';
|
|
61
|
-
font-size: 24px;
|
|
62
|
-
width: 24px;
|
|
63
|
-
display: inline-block;
|
|
64
|
-
content: var(--material-icons-chevron-right);
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
[part='toggle-button']::after {
|
|
68
|
-
display: inline-block;
|
|
69
|
-
content: '';
|
|
70
|
-
position: absolute;
|
|
71
|
-
top: 0;
|
|
72
|
-
left: 0;
|
|
73
|
-
width: 100%;
|
|
74
|
-
height: 100%;
|
|
75
|
-
border-radius: 50%;
|
|
76
|
-
background-color: var(--material-disabled-text-color);
|
|
77
|
-
transform: scale(0);
|
|
78
|
-
opacity: 0;
|
|
79
|
-
transition:
|
|
80
|
-
transform 0s 0.8s,
|
|
81
|
-
opacity 0.8s;
|
|
82
|
-
will-change: transform, opacity;
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
[part='toggle-button']:focus-visible::after {
|
|
86
|
-
transition-duration: 0.08s, 0.01s;
|
|
87
|
-
transition-delay: 0s, 0s;
|
|
88
|
-
transform: scale(1.25);
|
|
89
|
-
opacity: 0.16;
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
:host([expanded]) [part='toggle-button'] {
|
|
93
|
-
transform: rotate(270deg);
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
:host([has-children]) [part='content'] {
|
|
97
|
-
padding-inline-end: 8px;
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
@media (any-hover: hover) {
|
|
101
|
-
:host(:not([current])) [part='link'][href]:hover {
|
|
102
|
-
background-color: var(--material-secondary-background-color);
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
[part='toggle-button']:hover {
|
|
106
|
-
color: var(--material-body-text-color);
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
@supports selector(:focus-visible) {
|
|
111
|
-
[part='link'],
|
|
112
|
-
[part='toggle-button'] {
|
|
113
|
-
outline: none;
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
:host(:not([current])) [part='link']:focus-visible {
|
|
117
|
-
background-color: var(--material-divider-color);
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
:host([current]) [part='link']:focus-visible::before {
|
|
121
|
-
opacity: 0.24;
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
slot[name='prefix']::slotted(:is(vaadin-icon, [class*='icon'])) {
|
|
126
|
-
padding: 0.1em;
|
|
127
|
-
flex-shrink: 0;
|
|
128
|
-
margin-inline-end: 24px;
|
|
129
|
-
color: var(--material-secondary-text-color);
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
:host([disabled]) slot[name='prefix']::slotted(:is(vaadin-icon, [class*='icon'])) {
|
|
133
|
-
color: var(--material-disabled-text-color);
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
:host([current]) slot[name='prefix']::slotted(:is(vaadin-icon, [class*='icon'])) {
|
|
137
|
-
color: inherit;
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
slot[name='children'] {
|
|
141
|
-
--_child-indent: calc(var(--_child-indent-2, 0px) + var(--vaadin-side-nav-child-indent, 24px));
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
slot[name='children']::slotted(*) {
|
|
145
|
-
--_child-indent-2: var(--_child-indent);
|
|
146
|
-
}
|
|
147
|
-
`;
|
|
148
|
-
|
|
149
|
-
registerStyles('vaadin-side-nav-item', [fieldButton, sideNavItemStyles], { moduleId: 'material-side-nav-item' });
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
import '@vaadin/vaadin-material-styles/color.js';
|
|
2
|
-
import '@vaadin/vaadin-material-styles/font-icons.js';
|
|
3
|
-
import '@vaadin/vaadin-material-styles/typography.js';
|
|
4
|
-
import { css, registerStyles } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
|
|
5
|
-
|
|
6
|
-
export const sideNavStyles = css`
|
|
7
|
-
:host {
|
|
8
|
-
-webkit-tap-highlight-color: transparent;
|
|
9
|
-
outline: none;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
[part='label'] {
|
|
13
|
-
display: flex;
|
|
14
|
-
align-items: center;
|
|
15
|
-
width: 100%;
|
|
16
|
-
min-height: 40px;
|
|
17
|
-
margin: 4px 0;
|
|
18
|
-
padding: 4px 8px;
|
|
19
|
-
outline: none;
|
|
20
|
-
box-sizing: border-box;
|
|
21
|
-
font-family: var(--material-font-family);
|
|
22
|
-
font-size: var(--material-small-font-size);
|
|
23
|
-
color: var(--material-secondary-text-color);
|
|
24
|
-
line-height: 1;
|
|
25
|
-
font-weight: 500;
|
|
26
|
-
border-radius: 4px;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
:host([focus-ring]) [part='label'] {
|
|
30
|
-
background-color: var(--material-divider-color);
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
[part='toggle-button'] {
|
|
34
|
-
display: inline-flex;
|
|
35
|
-
align-items: center;
|
|
36
|
-
justify-content: center;
|
|
37
|
-
width: 24px;
|
|
38
|
-
height: 24px;
|
|
39
|
-
padding: 4px;
|
|
40
|
-
margin-inline: auto -4px;
|
|
41
|
-
font-size: var(--material-icon-font-size);
|
|
42
|
-
line-height: 1;
|
|
43
|
-
color: var(--material-secondary-text-color);
|
|
44
|
-
font-family: 'material-icons';
|
|
45
|
-
transform: rotate(90deg);
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
[part='toggle-button']::before {
|
|
49
|
-
content: var(--material-icons-chevron-right);
|
|
50
|
-
font-size: 24px;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
:host(:not([collapsible])) [part='toggle-button'] {
|
|
54
|
-
display: none !important;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
:host(:not([collapsed])) [part='toggle-button'] {
|
|
58
|
-
transform: rotate(270deg);
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
@media (any-hover: hover) {
|
|
62
|
-
[part='label']:hover [part='toggle-button'] {
|
|
63
|
-
color: var(--material-body-text-color);
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
`;
|
|
67
|
-
|
|
68
|
-
registerStyles('vaadin-side-nav', sideNavStyles, { moduleId: 'material-side-nav' });
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright (c) 2023 - 2025 Vaadin Ltd.
|
|
4
|
-
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5
|
-
*/
|
|
6
|
-
import './vaadin-side-nav-item.js';
|
|
7
|
-
import './vaadin-side-nav-styles.js';
|
|
8
|
-
import '../../src/vaadin-side-nav.js';
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright (c) 2023 - 2025 Vaadin Ltd.
|
|
4
|
-
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5
|
-
*/
|
|
6
|
-
import './vaadin-side-nav-item.js';
|
|
7
|
-
import './vaadin-side-nav-styles.js';
|
|
8
|
-
import '../../src/vaadin-side-nav.js';
|