@vaadin/side-nav 24.1.0-rc1 → 24.1.1
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 +7 -7
- package/theme/lumo/vaadin-side-nav-item-styles.js +105 -0
- package/theme/lumo/vaadin-side-nav-item.js +1 -1
- package/theme/lumo/vaadin-side-nav-styles.js +0 -98
- package/theme/lumo/vaadin-side-nav.js +1 -0
- package/vaadin-side-nav-item.js +1 -1
- package/web-types.json +1 -1
- package/web-types.lit.json +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vaadin/side-nav",
|
|
3
|
-
"version": "24.1.
|
|
3
|
+
"version": "24.1.1",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -35,15 +35,15 @@
|
|
|
35
35
|
"web-component"
|
|
36
36
|
],
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@vaadin/component-base": "24.1.
|
|
39
|
-
"@vaadin/vaadin-lumo-styles": "24.1.
|
|
40
|
-
"@vaadin/vaadin-material-styles": "24.1.
|
|
41
|
-
"@vaadin/vaadin-themable-mixin": "24.1.
|
|
38
|
+
"@vaadin/component-base": "~24.1.1",
|
|
39
|
+
"@vaadin/vaadin-lumo-styles": "~24.1.1",
|
|
40
|
+
"@vaadin/vaadin-material-styles": "~24.1.1",
|
|
41
|
+
"@vaadin/vaadin-themable-mixin": "~24.1.1",
|
|
42
42
|
"lit": "^2.0.0"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
45
|
"@esm-bundle/chai": "^4.3.4",
|
|
46
|
-
"@vaadin/testing-helpers": "^0.4.
|
|
46
|
+
"@vaadin/testing-helpers": "^0.4.2",
|
|
47
47
|
"lit": "^2.0.0",
|
|
48
48
|
"sinon": "^13.0.2"
|
|
49
49
|
},
|
|
@@ -51,5 +51,5 @@
|
|
|
51
51
|
"web-types.json",
|
|
52
52
|
"web-types.lit.json"
|
|
53
53
|
],
|
|
54
|
-
"gitHead": "
|
|
54
|
+
"gitHead": "c3a3d904885bd37ebb07a84b09617a340b4fab7e"
|
|
55
55
|
}
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import '@vaadin/vaadin-lumo-styles/color.js';
|
|
2
|
+
import '@vaadin/vaadin-lumo-styles/typography.js';
|
|
3
|
+
import '@vaadin/vaadin-lumo-styles/sizing.js';
|
|
4
|
+
import '@vaadin/vaadin-lumo-styles/spacing.js';
|
|
5
|
+
import '@vaadin/vaadin-lumo-styles/style.js';
|
|
6
|
+
import '@vaadin/vaadin-lumo-styles/font-icons.js';
|
|
7
|
+
import { css, registerStyles } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
|
|
8
|
+
|
|
9
|
+
export const sideNavItemStyles = css`
|
|
10
|
+
a {
|
|
11
|
+
gap: var(--lumo-space-xs);
|
|
12
|
+
padding: var(--lumo-space-s);
|
|
13
|
+
padding-inline-start: calc(var(--lumo-space-s) + var(--_child-indent, 0px));
|
|
14
|
+
border-radius: var(--lumo-border-radius-m);
|
|
15
|
+
transition: background-color 140ms, color 140ms;
|
|
16
|
+
cursor: var(--lumo-clickable-cursor, default);
|
|
17
|
+
min-height: var(--lumo-icon-size-m);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
button {
|
|
21
|
+
border: 0;
|
|
22
|
+
margin: calc((var(--lumo-icon-size-m) - var(--lumo-size-s)) / 2) 0;
|
|
23
|
+
margin-inline-end: calc(var(--lumo-space-xs) * -1);
|
|
24
|
+
padding: 0;
|
|
25
|
+
background: transparent;
|
|
26
|
+
font: inherit;
|
|
27
|
+
color: var(--lumo-tertiary-text-color);
|
|
28
|
+
width: var(--lumo-size-s);
|
|
29
|
+
height: var(--lumo-size-s);
|
|
30
|
+
cursor: var(--lumo-clickable-cursor, default);
|
|
31
|
+
transition: color 140ms;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
@media (any-hover: hover) {
|
|
35
|
+
a:hover {
|
|
36
|
+
color: var(--lumo-header-text-color);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
button:hover {
|
|
40
|
+
color: var(--lumo-body-text-color);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
a:active:focus {
|
|
45
|
+
background-color: var(--lumo-contrast-5pct);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
button::before {
|
|
49
|
+
font-family: lumo-icons;
|
|
50
|
+
content: var(--lumo-icons-dropdown);
|
|
51
|
+
font-size: 1.5em;
|
|
52
|
+
line-height: var(--lumo-size-s);
|
|
53
|
+
display: inline-block;
|
|
54
|
+
transform: rotate(-90deg);
|
|
55
|
+
transition: transform 140ms;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
:host([expanded]) button::before {
|
|
59
|
+
transform: none;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
@supports selector(:focus-visible) {
|
|
63
|
+
a,
|
|
64
|
+
button {
|
|
65
|
+
outline: none;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
a:focus-visible,
|
|
69
|
+
button:focus-visible {
|
|
70
|
+
border-radius: var(--lumo-border-radius-m);
|
|
71
|
+
box-shadow: 0 0 0 2px var(--lumo-primary-color-50pct);
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
a:active {
|
|
76
|
+
color: var(--lumo-header-text-color);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
slot:not([name]) {
|
|
80
|
+
margin: 0 var(--lumo-space-xs);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
slot[name='prefix']::slotted(:is(vaadin-icon, [class*='icon'])) {
|
|
84
|
+
color: var(--lumo-contrast-60pct);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
:host([active]) slot[name='prefix']::slotted(:is(vaadin-icon, [class*='icon'])) {
|
|
88
|
+
color: inherit;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
slot[name='children'] {
|
|
92
|
+
--_child-indent: calc(var(--_child-indent-2, 0px) + var(--vaadin-side-nav-child-indent, var(--lumo-space-l)));
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
slot[name='children']::slotted(*) {
|
|
96
|
+
--_child-indent-2: var(--_child-indent);
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
:host([active]) a {
|
|
100
|
+
color: var(--lumo-primary-text-color);
|
|
101
|
+
background-color: var(--lumo-primary-color-10pct);
|
|
102
|
+
}
|
|
103
|
+
`;
|
|
104
|
+
|
|
105
|
+
registerStyles('vaadin-side-nav-item', sideNavItemStyles, { moduleId: 'lumo-side-nav-item' });
|
|
@@ -3,5 +3,5 @@
|
|
|
3
3
|
* Copyright (c) 2017 - 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 './vaadin-side-nav-styles.js';
|
|
6
|
+
import './vaadin-side-nav-item-styles.js';
|
|
7
7
|
import '../../src/vaadin-side-nav-item.js';
|
|
@@ -6,104 +6,6 @@ import '@vaadin/vaadin-lumo-styles/style.js';
|
|
|
6
6
|
import '@vaadin/vaadin-lumo-styles/font-icons.js';
|
|
7
7
|
import { css, registerStyles } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
|
|
8
8
|
|
|
9
|
-
export const sideNavItemStyles = css`
|
|
10
|
-
a {
|
|
11
|
-
gap: var(--lumo-space-xs);
|
|
12
|
-
padding: var(--lumo-space-s);
|
|
13
|
-
padding-inline-start: calc(var(--lumo-space-s) + var(--_child-indent, 0px));
|
|
14
|
-
border-radius: var(--lumo-border-radius-m);
|
|
15
|
-
transition: background-color 140ms, color 140ms;
|
|
16
|
-
cursor: var(--lumo-clickable-cursor, default);
|
|
17
|
-
min-height: var(--lumo-icon-size-m);
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
button {
|
|
21
|
-
border: 0;
|
|
22
|
-
margin: calc((var(--lumo-icon-size-m) - var(--lumo-size-s)) / 2) 0;
|
|
23
|
-
margin-inline-end: calc(var(--lumo-space-xs) * -1);
|
|
24
|
-
padding: 0;
|
|
25
|
-
background: transparent;
|
|
26
|
-
font: inherit;
|
|
27
|
-
color: var(--lumo-tertiary-text-color);
|
|
28
|
-
width: var(--lumo-size-s);
|
|
29
|
-
height: var(--lumo-size-s);
|
|
30
|
-
cursor: var(--lumo-clickable-cursor, default);
|
|
31
|
-
transition: color 140ms;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
@media (any-hover: hover) {
|
|
35
|
-
a:hover {
|
|
36
|
-
color: var(--lumo-header-text-color);
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
button:hover {
|
|
40
|
-
color: var(--lumo-body-text-color);
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
a:active:focus {
|
|
45
|
-
background-color: var(--lumo-contrast-5pct);
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
button::before {
|
|
49
|
-
font-family: lumo-icons;
|
|
50
|
-
content: var(--lumo-icons-dropdown);
|
|
51
|
-
font-size: 1.5em;
|
|
52
|
-
line-height: var(--lumo-size-s);
|
|
53
|
-
display: inline-block;
|
|
54
|
-
transform: rotate(-90deg);
|
|
55
|
-
transition: transform 140ms;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
:host([expanded]) button::before {
|
|
59
|
-
transform: none;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
@supports selector(:focus-visible) {
|
|
63
|
-
a,
|
|
64
|
-
button {
|
|
65
|
-
outline: none;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
a:focus-visible,
|
|
69
|
-
button:focus-visible {
|
|
70
|
-
border-radius: var(--lumo-border-radius-m);
|
|
71
|
-
box-shadow: 0 0 0 2px var(--lumo-primary-color-50pct);
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
a:active {
|
|
76
|
-
color: var(--lumo-header-text-color);
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
slot:not([name]) {
|
|
80
|
-
margin: 0 var(--lumo-space-xs);
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
slot[name='prefix']::slotted(:is(vaadin-icon, [class*='icon'])) {
|
|
84
|
-
color: var(--lumo-contrast-60pct);
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
:host([active]) slot[name='prefix']::slotted(:is(vaadin-icon, [class*='icon'])) {
|
|
88
|
-
color: inherit;
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
slot[name='children'] {
|
|
92
|
-
--_child-indent: calc(var(--_child-indent-2, 0px) + var(--vaadin-side-nav-child-indent, var(--lumo-space-l)));
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
slot[name='children']::slotted(*) {
|
|
96
|
-
--_child-indent-2: var(--_child-indent);
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
:host([active]) a {
|
|
100
|
-
color: var(--lumo-primary-text-color);
|
|
101
|
-
background-color: var(--lumo-primary-color-10pct);
|
|
102
|
-
}
|
|
103
|
-
`;
|
|
104
|
-
|
|
105
|
-
registerStyles('vaadin-side-nav-item', sideNavItemStyles, { moduleId: 'lumo-side-nav-item' });
|
|
106
|
-
|
|
107
9
|
export const sideNavStyles = css`
|
|
108
10
|
:host {
|
|
109
11
|
font-family: var(--lumo-font-family);
|
package/vaadin-side-nav-item.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import './theme/lumo/vaadin-side-nav.js';
|
|
1
|
+
import './theme/lumo/vaadin-side-nav-item.js';
|
|
2
2
|
export * from './src/vaadin-side-nav-item.js';
|
package/web-types.json
CHANGED