@vaadin/app-layout 25.2.0-alpha9 → 25.2.0-beta1
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/custom-elements.json +26 -0
- package/package.json +10 -10
- package/src/styles/vaadin-app-layout-base-styles.js +9 -9
- package/src/vaadin-app-layout-mixin.js +5 -16
- package/src/vaadin-app-layout.js +0 -3
- package/src/vaadin-drawer-toggle.js +0 -3
- package/web-types.json +12 -47
- package/web-types.lit.json +9 -16
package/custom-elements.json
CHANGED
|
@@ -407,6 +407,20 @@
|
|
|
407
407
|
"text": "string"
|
|
408
408
|
},
|
|
409
409
|
"attribute": "aria-label"
|
|
410
|
+
},
|
|
411
|
+
{
|
|
412
|
+
"kind": "field",
|
|
413
|
+
"name": "disabled",
|
|
414
|
+
"privacy": "public",
|
|
415
|
+
"type": {
|
|
416
|
+
"text": "boolean"
|
|
417
|
+
},
|
|
418
|
+
"description": "If true, the user cannot interact with this element.",
|
|
419
|
+
"attribute": "disabled",
|
|
420
|
+
"inheritedFrom": {
|
|
421
|
+
"name": "DisabledMixin",
|
|
422
|
+
"package": "@vaadin/a11y-base/src/disabled-mixin.js"
|
|
423
|
+
}
|
|
410
424
|
}
|
|
411
425
|
],
|
|
412
426
|
"attributes": [
|
|
@@ -416,6 +430,18 @@
|
|
|
416
430
|
"text": "string"
|
|
417
431
|
},
|
|
418
432
|
"fieldName": "ariaLabel"
|
|
433
|
+
},
|
|
434
|
+
{
|
|
435
|
+
"name": "disabled",
|
|
436
|
+
"type": {
|
|
437
|
+
"text": "boolean"
|
|
438
|
+
},
|
|
439
|
+
"description": "If true, the user cannot interact with this element.",
|
|
440
|
+
"fieldName": "disabled",
|
|
441
|
+
"inheritedFrom": {
|
|
442
|
+
"name": "DisabledMixin",
|
|
443
|
+
"package": "@vaadin/a11y-base/src/disabled-mixin.js"
|
|
444
|
+
}
|
|
419
445
|
}
|
|
420
446
|
],
|
|
421
447
|
"mixins": [
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vaadin/app-layout",
|
|
3
|
-
"version": "25.2.0-
|
|
3
|
+
"version": "25.2.0-beta1",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -35,18 +35,18 @@
|
|
|
35
35
|
],
|
|
36
36
|
"dependencies": {
|
|
37
37
|
"@open-wc/dedupe-mixin": "^1.3.0",
|
|
38
|
-
"@vaadin/a11y-base": "25.2.0-
|
|
39
|
-
"@vaadin/button": "25.2.0-
|
|
40
|
-
"@vaadin/component-base": "25.2.0-
|
|
41
|
-
"@vaadin/vaadin-themable-mixin": "25.2.0-
|
|
38
|
+
"@vaadin/a11y-base": "25.2.0-beta1",
|
|
39
|
+
"@vaadin/button": "25.2.0-beta1",
|
|
40
|
+
"@vaadin/component-base": "25.2.0-beta1",
|
|
41
|
+
"@vaadin/vaadin-themable-mixin": "25.2.0-beta1",
|
|
42
42
|
"lit": "^3.0.0"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
|
-
"@vaadin/aura": "25.2.0-
|
|
46
|
-
"@vaadin/chai-plugins": "25.2.0-
|
|
47
|
-
"@vaadin/test-runner-commands": "25.2.0-
|
|
45
|
+
"@vaadin/aura": "25.2.0-beta1",
|
|
46
|
+
"@vaadin/chai-plugins": "25.2.0-beta1",
|
|
47
|
+
"@vaadin/test-runner-commands": "25.2.0-beta1",
|
|
48
48
|
"@vaadin/testing-helpers": "^2.0.0",
|
|
49
|
-
"@vaadin/vaadin-lumo-styles": "25.2.0-
|
|
49
|
+
"@vaadin/vaadin-lumo-styles": "25.2.0-beta1",
|
|
50
50
|
"sinon": "^21.0.2"
|
|
51
51
|
},
|
|
52
52
|
"customElements": "custom-elements.json",
|
|
@@ -54,5 +54,5 @@
|
|
|
54
54
|
"web-types.json",
|
|
55
55
|
"web-types.lit.json"
|
|
56
56
|
],
|
|
57
|
-
"gitHead": "
|
|
57
|
+
"gitHead": "471a23f60d1eb725f98a33f62cb9664d9c0a4163"
|
|
58
58
|
}
|
|
@@ -12,7 +12,7 @@ export const appLayoutStyles = css`
|
|
|
12
12
|
box-sizing: border-box;
|
|
13
13
|
height: 100%;
|
|
14
14
|
--vaadin-app-layout-transition-duration: 0s;
|
|
15
|
-
transition: padding var(--vaadin-app-layout-transition-duration);
|
|
15
|
+
transition: padding var(--vaadin-app-layout-transition-duration) cubic-bezier(0.78, 0, 0.22, 1);
|
|
16
16
|
--_vaadin-app-layout-drawer-width: var(--vaadin-app-layout-drawer-width, auto);
|
|
17
17
|
--vaadin-app-layout-touch-optimized: false;
|
|
18
18
|
--vaadin-app-layout-navbar-offset-top: var(--_vaadin-app-layout-navbar-offset-size);
|
|
@@ -30,7 +30,7 @@ export const appLayoutStyles = css`
|
|
|
30
30
|
|
|
31
31
|
@media (prefers-reduced-motion: no-preference) {
|
|
32
32
|
:host(:not([no-anim])) {
|
|
33
|
-
--vaadin-app-layout-transition-duration:
|
|
33
|
+
--vaadin-app-layout-transition-duration: 300ms;
|
|
34
34
|
}
|
|
35
35
|
}
|
|
36
36
|
|
|
@@ -71,7 +71,8 @@ export const appLayoutStyles = css`
|
|
|
71
71
|
align-items: center;
|
|
72
72
|
top: 0;
|
|
73
73
|
inset-inline: 0;
|
|
74
|
-
transition:
|
|
74
|
+
transition: inherit;
|
|
75
|
+
transition-property: inset-inline-start;
|
|
75
76
|
padding-top: max(var(--vaadin-app-layout-navbar-padding-top, var(--vaadin-padding-s)), var(--safe-area-inset-top));
|
|
76
77
|
padding-bottom: var(--vaadin-app-layout-navbar-padding-bottom, var(--vaadin-padding-s));
|
|
77
78
|
padding-inline-start: max(
|
|
@@ -113,10 +114,9 @@ export const appLayoutStyles = css`
|
|
|
113
114
|
top: var(--vaadin-app-layout-navbar-offset-top, 0);
|
|
114
115
|
bottom: var(--vaadin-app-layout-navbar-offset-bottom, var(--vaadin-viewport-offset-bottom, 0));
|
|
115
116
|
inset-inline: var(--vaadin-app-layout-navbar-offset-left, 0) auto;
|
|
116
|
-
transition:
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
transform: translateX(-100%);
|
|
117
|
+
transition: inherit;
|
|
118
|
+
transition-property: transform, visibility;
|
|
119
|
+
transform: translateX(calc(-100% - 20px));
|
|
120
120
|
max-width: 90%;
|
|
121
121
|
width: var(--_vaadin-app-layout-drawer-width);
|
|
122
122
|
box-sizing: border-box;
|
|
@@ -155,7 +155,7 @@ export const appLayoutStyles = css`
|
|
|
155
155
|
position: fixed;
|
|
156
156
|
inset: 0;
|
|
157
157
|
pointer-events: none;
|
|
158
|
-
transition: opacity var(--vaadin-app-layout-transition-duration);
|
|
158
|
+
transition: opacity var(--vaadin-app-layout-transition-duration) linear;
|
|
159
159
|
-webkit-tap-highlight-color: transparent;
|
|
160
160
|
}
|
|
161
161
|
|
|
@@ -177,7 +177,7 @@ export const appLayoutStyles = css`
|
|
|
177
177
|
}
|
|
178
178
|
|
|
179
179
|
:host([dir='rtl']) [part='drawer'] {
|
|
180
|
-
transform: translateX(100%);
|
|
180
|
+
transform: translateX(calc(100% + 20px));
|
|
181
181
|
}
|
|
182
182
|
|
|
183
183
|
:host([dir='rtl'][drawer-opened]) [part='drawer'] {
|
|
@@ -18,12 +18,8 @@ const DEFAULT_I18N = {
|
|
|
18
18
|
drawer: 'Drawer',
|
|
19
19
|
};
|
|
20
20
|
|
|
21
|
-
/**
|
|
22
|
-
* @polymerMixin
|
|
23
|
-
* @mixes I18nMixin
|
|
24
|
-
*/
|
|
25
21
|
export const AppLayoutMixin = (superclass) =>
|
|
26
|
-
class AppLayoutMixinClass extends I18nMixin(
|
|
22
|
+
class AppLayoutMixinClass extends I18nMixin(superclass) {
|
|
27
23
|
static get properties() {
|
|
28
24
|
return {
|
|
29
25
|
/**
|
|
@@ -89,6 +85,10 @@ export const AppLayoutMixin = (superclass) =>
|
|
|
89
85
|
return ['__i18nChanged(__effectiveI18n)'];
|
|
90
86
|
}
|
|
91
87
|
|
|
88
|
+
static get defaultI18n() {
|
|
89
|
+
return DEFAULT_I18N;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
92
|
/**
|
|
93
93
|
* Helper static method that dispatches a `close-overlay-drawer` event
|
|
94
94
|
*/
|
|
@@ -524,15 +524,4 @@ export const AppLayoutMixin = (superclass) =>
|
|
|
524
524
|
this.__resizeObserver.unobserve(element);
|
|
525
525
|
this.__resizeObserver.observe(element);
|
|
526
526
|
}
|
|
527
|
-
|
|
528
|
-
/**
|
|
529
|
-
* App Layout listens to `close-overlay-drawer` on the window level.
|
|
530
|
-
* A custom event can be dispatched and the App Layout will close the drawer in overlay.
|
|
531
|
-
*
|
|
532
|
-
* That can be used, for instance, when a navigation occurs when user clicks in a menu item inside the drawer.
|
|
533
|
-
*
|
|
534
|
-
* See `dispatchCloseOverlayDrawerEvent()` helper method.
|
|
535
|
-
*
|
|
536
|
-
* @event close-overlay-drawer
|
|
537
|
-
*/
|
|
538
527
|
};
|
package/src/vaadin-app-layout.js
CHANGED
|
@@ -129,9 +129,6 @@ import { AppLayoutMixin } from './vaadin-app-layout-mixin.js';
|
|
|
129
129
|
*
|
|
130
130
|
* @customElement vaadin-app-layout
|
|
131
131
|
* @extends HTMLElement
|
|
132
|
-
* @mixes AppLayoutMixin
|
|
133
|
-
* @mixes ElementMixin
|
|
134
|
-
* @mixes ThemableMixin
|
|
135
132
|
*/
|
|
136
133
|
class AppLayout extends AppLayoutMixin(ElementMixin(ThemableMixin(PolylitMixin(LumoInjectionMixin(LitElement))))) {
|
|
137
134
|
static get is() {
|
|
@@ -57,9 +57,6 @@ import { drawerToggle } from './styles/vaadin-drawer-toggle-base-styles.js';
|
|
|
57
57
|
*
|
|
58
58
|
* @customElement vaadin-drawer-toggle
|
|
59
59
|
* @extends HTMLElement
|
|
60
|
-
* @mixes ButtonMixin
|
|
61
|
-
* @mixes DirMixin
|
|
62
|
-
* @mixes ThemableMixin
|
|
63
60
|
*/
|
|
64
61
|
class DrawerToggle extends ButtonMixin(DirMixin(ThemableMixin(PolylitMixin(LumoInjectionMixin(LitElement))))) {
|
|
65
62
|
static get is() {
|
package/web-types.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json.schemastore.org/web-types",
|
|
3
3
|
"name": "@vaadin/app-layout",
|
|
4
|
-
"version": "25.2.0-
|
|
4
|
+
"version": "25.2.0-beta1",
|
|
5
5
|
"description-markup": "markdown",
|
|
6
6
|
"contributions": {
|
|
7
7
|
"html": {
|
|
@@ -15,9 +15,7 @@
|
|
|
15
15
|
"description": "A global event that causes the drawer to close (be hidden) when it is in overlay mode.\n- The default is `vaadin-router-location-changed` dispatched by Vaadin Router",
|
|
16
16
|
"value": {
|
|
17
17
|
"type": [
|
|
18
|
-
"string"
|
|
19
|
-
"null",
|
|
20
|
-
"undefined"
|
|
18
|
+
"string"
|
|
21
19
|
]
|
|
22
20
|
}
|
|
23
21
|
},
|
|
@@ -26,20 +24,7 @@
|
|
|
26
24
|
"description": "Controls whether the drawer is opened (visible) or not.\nIts default value depends on the viewport:\n- `true`, for desktop size views\n- `false`, for mobile size views",
|
|
27
25
|
"value": {
|
|
28
26
|
"type": [
|
|
29
|
-
"boolean"
|
|
30
|
-
"null",
|
|
31
|
-
"undefined"
|
|
32
|
-
]
|
|
33
|
-
}
|
|
34
|
-
},
|
|
35
|
-
{
|
|
36
|
-
"name": "i18n",
|
|
37
|
-
"description": "The object used to localize this component. To change the default\nlocalization, replace this with an object that provides all properties, or\njust the individual properties you want to change.\n\nShould be overridden by subclasses to provide a custom JSDoc with the\ndefault I18N properties.",
|
|
38
|
-
"value": {
|
|
39
|
-
"type": [
|
|
40
|
-
"Object",
|
|
41
|
-
"null",
|
|
42
|
-
"undefined"
|
|
27
|
+
"boolean"
|
|
43
28
|
]
|
|
44
29
|
}
|
|
45
30
|
},
|
|
@@ -48,9 +33,7 @@
|
|
|
48
33
|
"description": "Defines whether navbar or drawer will come first visually.\n- By default (`primary-section=\"navbar\"`), the navbar takes the full available width and moves the drawer down.\n- If `primary-section=\"drawer\"` is set, then the drawer will move the navbar, taking the full available height.",
|
|
49
34
|
"value": {
|
|
50
35
|
"type": [
|
|
51
|
-
"string"
|
|
52
|
-
"null",
|
|
53
|
-
"undefined"
|
|
36
|
+
"string"
|
|
54
37
|
]
|
|
55
38
|
}
|
|
56
39
|
},
|
|
@@ -73,9 +56,7 @@
|
|
|
73
56
|
"description": "A global event that causes the drawer to close (be hidden) when it is in overlay mode.\n- The default is `vaadin-router-location-changed` dispatched by Vaadin Router",
|
|
74
57
|
"value": {
|
|
75
58
|
"type": [
|
|
76
|
-
"string"
|
|
77
|
-
"null",
|
|
78
|
-
"undefined"
|
|
59
|
+
"string"
|
|
79
60
|
]
|
|
80
61
|
}
|
|
81
62
|
},
|
|
@@ -84,9 +65,7 @@
|
|
|
84
65
|
"description": "Controls whether the drawer is opened (visible) or not.\nIts default value depends on the viewport:\n- `true`, for desktop size views\n- `false`, for mobile size views",
|
|
85
66
|
"value": {
|
|
86
67
|
"type": [
|
|
87
|
-
"boolean"
|
|
88
|
-
"null",
|
|
89
|
-
"undefined"
|
|
68
|
+
"boolean"
|
|
90
69
|
]
|
|
91
70
|
}
|
|
92
71
|
},
|
|
@@ -95,7 +74,7 @@
|
|
|
95
74
|
"description": "The object used to localize this component. To change the default\nlocalization, replace this with an object that provides all properties, or\njust the individual properties you want to change.\n\nThe object has the following structure and default values:\n```js\n{\n drawer: 'Drawer'\n}\n```",
|
|
96
75
|
"value": {
|
|
97
76
|
"type": [
|
|
98
|
-
"
|
|
77
|
+
"Object"
|
|
99
78
|
]
|
|
100
79
|
}
|
|
101
80
|
},
|
|
@@ -104,18 +83,12 @@
|
|
|
104
83
|
"description": "Defines whether navbar or drawer will come first visually.\n- By default (`primary-section=\"navbar\"`), the navbar takes the full available width and moves the drawer down.\n- If `primary-section=\"drawer\"` is set, then the drawer will move the navbar, taking the full available height.",
|
|
105
84
|
"value": {
|
|
106
85
|
"type": [
|
|
107
|
-
"string"
|
|
108
|
-
"null",
|
|
109
|
-
"undefined"
|
|
86
|
+
"string"
|
|
110
87
|
]
|
|
111
88
|
}
|
|
112
89
|
}
|
|
113
90
|
],
|
|
114
91
|
"events": [
|
|
115
|
-
{
|
|
116
|
-
"name": "close-overlay-drawer",
|
|
117
|
-
"description": "App Layout listens to `close-overlay-drawer` on the window level.\nA custom event can be dispatched and the App Layout will close the drawer in overlay.\n\nThat can be used, for instance, when a navigation occurs when user clicks in a menu item inside the drawer.\n\nSee `dispatchCloseOverlayDrawerEvent()` helper method."
|
|
118
|
-
},
|
|
119
92
|
{
|
|
120
93
|
"name": "drawer-opened-changed",
|
|
121
94
|
"description": "Fired when the `drawerOpened` property changes."
|
|
@@ -140,9 +113,7 @@
|
|
|
140
113
|
"description": "",
|
|
141
114
|
"value": {
|
|
142
115
|
"type": [
|
|
143
|
-
"string"
|
|
144
|
-
"null",
|
|
145
|
-
"undefined"
|
|
116
|
+
"string"
|
|
146
117
|
]
|
|
147
118
|
}
|
|
148
119
|
},
|
|
@@ -151,9 +122,7 @@
|
|
|
151
122
|
"description": "If true, the user cannot interact with this element.",
|
|
152
123
|
"value": {
|
|
153
124
|
"type": [
|
|
154
|
-
"boolean"
|
|
155
|
-
"null",
|
|
156
|
-
"undefined"
|
|
125
|
+
"boolean"
|
|
157
126
|
]
|
|
158
127
|
}
|
|
159
128
|
},
|
|
@@ -176,9 +145,7 @@
|
|
|
176
145
|
"description": "",
|
|
177
146
|
"value": {
|
|
178
147
|
"type": [
|
|
179
|
-
"string"
|
|
180
|
-
"null",
|
|
181
|
-
"undefined"
|
|
148
|
+
"string"
|
|
182
149
|
]
|
|
183
150
|
}
|
|
184
151
|
},
|
|
@@ -187,9 +154,7 @@
|
|
|
187
154
|
"description": "If true, the user cannot interact with this element.",
|
|
188
155
|
"value": {
|
|
189
156
|
"type": [
|
|
190
|
-
"boolean"
|
|
191
|
-
"null",
|
|
192
|
-
"undefined"
|
|
157
|
+
"boolean"
|
|
193
158
|
]
|
|
194
159
|
}
|
|
195
160
|
}
|
package/web-types.lit.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json.schemastore.org/web-types",
|
|
3
3
|
"name": "@vaadin/app-layout",
|
|
4
|
-
"version": "25.2.0-
|
|
4
|
+
"version": "25.2.0-beta1",
|
|
5
5
|
"description-markup": "markdown",
|
|
6
6
|
"framework": "lit",
|
|
7
7
|
"framework-config": {
|
|
@@ -20,15 +20,15 @@
|
|
|
20
20
|
"extension": true,
|
|
21
21
|
"attributes": [
|
|
22
22
|
{
|
|
23
|
-
"name": "
|
|
24
|
-
"description": "
|
|
23
|
+
"name": ".closeDrawerOn",
|
|
24
|
+
"description": "A global event that causes the drawer to close (be hidden) when it is in overlay mode.\n- The default is `vaadin-router-location-changed` dispatched by Vaadin Router",
|
|
25
25
|
"value": {
|
|
26
26
|
"kind": "expression"
|
|
27
27
|
}
|
|
28
28
|
},
|
|
29
29
|
{
|
|
30
|
-
"name": "
|
|
31
|
-
"description": "
|
|
30
|
+
"name": "?drawerOpened",
|
|
31
|
+
"description": "Controls whether the drawer is opened (visible) or not.\nIts default value depends on the viewport:\n- `true`, for desktop size views\n- `false`, for mobile size views",
|
|
32
32
|
"value": {
|
|
33
33
|
"kind": "expression"
|
|
34
34
|
}
|
|
@@ -47,13 +47,6 @@
|
|
|
47
47
|
"kind": "expression"
|
|
48
48
|
}
|
|
49
49
|
},
|
|
50
|
-
{
|
|
51
|
-
"name": "@close-overlay-drawer",
|
|
52
|
-
"description": "App Layout listens to `close-overlay-drawer` on the window level.\nA custom event can be dispatched and the App Layout will close the drawer in overlay.\n\nThat can be used, for instance, when a navigation occurs when user clicks in a menu item inside the drawer.\n\nSee `dispatchCloseOverlayDrawerEvent()` helper method.",
|
|
53
|
-
"value": {
|
|
54
|
-
"kind": "expression"
|
|
55
|
-
}
|
|
56
|
-
},
|
|
57
50
|
{
|
|
58
51
|
"name": "@drawer-opened-changed",
|
|
59
52
|
"description": "Fired when the `drawerOpened` property changes.",
|
|
@@ -83,15 +76,15 @@
|
|
|
83
76
|
"extension": true,
|
|
84
77
|
"attributes": [
|
|
85
78
|
{
|
|
86
|
-
"name": "
|
|
87
|
-
"description": "
|
|
79
|
+
"name": ".ariaLabel",
|
|
80
|
+
"description": "",
|
|
88
81
|
"value": {
|
|
89
82
|
"kind": "expression"
|
|
90
83
|
}
|
|
91
84
|
},
|
|
92
85
|
{
|
|
93
|
-
"name": "
|
|
94
|
-
"description": "",
|
|
86
|
+
"name": "?disabled",
|
|
87
|
+
"description": "If true, the user cannot interact with this element.",
|
|
95
88
|
"value": {
|
|
96
89
|
"kind": "expression"
|
|
97
90
|
}
|