@vaadin/side-nav 24.3.0-alpha1 → 24.3.0-alpha11
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.3.0-
|
|
3
|
+
"version": "24.3.0-alpha11",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -34,21 +34,21 @@
|
|
|
34
34
|
"web-component"
|
|
35
35
|
],
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@vaadin/component-base": "24.3.0-
|
|
38
|
-
"@vaadin/vaadin-lumo-styles": "24.3.0-
|
|
39
|
-
"@vaadin/vaadin-material-styles": "24.3.0-
|
|
40
|
-
"@vaadin/vaadin-themable-mixin": "24.3.0-
|
|
41
|
-
"lit": "^
|
|
37
|
+
"@vaadin/component-base": "24.3.0-alpha11",
|
|
38
|
+
"@vaadin/vaadin-lumo-styles": "24.3.0-alpha11",
|
|
39
|
+
"@vaadin/vaadin-material-styles": "24.3.0-alpha11",
|
|
40
|
+
"@vaadin/vaadin-themable-mixin": "24.3.0-alpha11",
|
|
41
|
+
"lit": "^3.0.0"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
44
|
"@esm-bundle/chai": "^4.3.4",
|
|
45
|
-
"@vaadin/testing-helpers": "^0.
|
|
46
|
-
"lit": "^
|
|
45
|
+
"@vaadin/testing-helpers": "^0.6.0",
|
|
46
|
+
"lit": "^3.0.0",
|
|
47
47
|
"sinon": "^13.0.2"
|
|
48
48
|
},
|
|
49
49
|
"web-types": [
|
|
50
50
|
"web-types.json",
|
|
51
51
|
"web-types.lit.json"
|
|
52
52
|
],
|
|
53
|
-
"gitHead": "
|
|
53
|
+
"gitHead": "123cf569a1b6ef6f4ef5fe8e60cb8d988699b98c"
|
|
54
54
|
}
|
|
@@ -199,7 +199,7 @@ class SideNavItem extends SideNavChildrenMixin(DisabledMixin(ElementMixin(Themab
|
|
|
199
199
|
<a
|
|
200
200
|
id="link"
|
|
201
201
|
?disabled="${this.disabled}"
|
|
202
|
-
tabindex="${this.disabled ||
|
|
202
|
+
tabindex="${this.disabled || this.path == null ? '-1' : '0'}"
|
|
203
203
|
href="${ifDefined(this.disabled ? null : this.path)}"
|
|
204
204
|
part="link"
|
|
205
205
|
aria-current="${this.current ? 'page' : 'false'}"
|
package/src/vaadin-side-nav.js
CHANGED
|
@@ -145,16 +145,23 @@ class SideNav extends SideNavChildrenMixin(FocusMixin(ElementMixin(ThemableMixin
|
|
|
145
145
|
/** @protected */
|
|
146
146
|
render() {
|
|
147
147
|
return html`
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
148
|
+
${this.collapsible
|
|
149
|
+
? html`
|
|
150
|
+
<button
|
|
151
|
+
part="label"
|
|
152
|
+
@click="${this._onLabelClick}"
|
|
153
|
+
aria-expanded="${!this.collapsed}"
|
|
154
|
+
aria-controls="children"
|
|
155
|
+
>
|
|
156
|
+
<slot name="label" @slotchange="${this._onLabelSlotChange}"></slot>
|
|
157
|
+
<span part="toggle-button" aria-hidden="true"></span>
|
|
158
|
+
</button>
|
|
159
|
+
`
|
|
160
|
+
: html`
|
|
161
|
+
<div part="label">
|
|
162
|
+
<slot name="label" @slotchange="${this._onLabelSlotChange}"></slot>
|
|
163
|
+
</div>
|
|
164
|
+
`}
|
|
158
165
|
<ul
|
|
159
166
|
id="children"
|
|
160
167
|
role="list"
|
|
@@ -8,6 +8,11 @@ import { fieldButton } from '@vaadin/vaadin-lumo-styles/mixins/field-button.js';
|
|
|
8
8
|
import { css, registerStyles } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
|
|
9
9
|
|
|
10
10
|
export const sideNavItemStyles = css`
|
|
11
|
+
:host {
|
|
12
|
+
--_focus-ring-color: var(--vaadin-focus-ring-color, var(--lumo-primary-color-50pct));
|
|
13
|
+
--_focus-ring-width: var(--vaadin-focus-ring-width, 2px);
|
|
14
|
+
}
|
|
15
|
+
|
|
11
16
|
[part='link'] {
|
|
12
17
|
width: 100%;
|
|
13
18
|
gap: var(--lumo-space-xs);
|
|
@@ -74,7 +79,7 @@ export const sideNavItemStyles = css`
|
|
|
74
79
|
[part='link']:focus-visible,
|
|
75
80
|
[part='toggle-button']:focus-visible {
|
|
76
81
|
border-radius: var(--lumo-border-radius-m);
|
|
77
|
-
box-shadow: 0 0 0
|
|
82
|
+
box-shadow: 0 0 0 var(--_focus-ring-width) var(--_focus-ring-color);
|
|
78
83
|
}
|
|
79
84
|
}
|
|
80
85
|
|
|
@@ -110,7 +115,7 @@ export const sideNavItemStyles = css`
|
|
|
110
115
|
|
|
111
116
|
:host([current]) [part='content'] {
|
|
112
117
|
background-color: var(--lumo-primary-color-10pct);
|
|
113
|
-
color: var(--lumo-primary-text-color);
|
|
118
|
+
color: var(--vaadin-selection-color-text, var(--lumo-primary-text-color));
|
|
114
119
|
border-radius: var(--lumo-border-radius-m);
|
|
115
120
|
}
|
|
116
121
|
`;
|
|
@@ -14,6 +14,8 @@ export const sideNavStyles = css`
|
|
|
14
14
|
line-height: var(--lumo-line-height-xs);
|
|
15
15
|
color: var(--lumo-body-text-color);
|
|
16
16
|
-webkit-tap-highlight-color: transparent;
|
|
17
|
+
--_focus-ring-color: var(--vaadin-focus-ring-color, var(--lumo-primary-color-50pct));
|
|
18
|
+
--_focus-ring-width: var(--vaadin-focus-ring-width, 2px);
|
|
17
19
|
}
|
|
18
20
|
|
|
19
21
|
[part='label'] {
|
|
@@ -35,7 +37,7 @@ export const sideNavStyles = css`
|
|
|
35
37
|
}
|
|
36
38
|
|
|
37
39
|
:host([focus-ring]) [part='label'] {
|
|
38
|
-
box-shadow: 0 0 0
|
|
40
|
+
box-shadow: 0 0 0 var(--_focus-ring-width) var(--_focus-ring-color);
|
|
39
41
|
}
|
|
40
42
|
|
|
41
43
|
[part='toggle-button'] {
|
package/web-types.json
CHANGED