@vaadin/app-layout 25.0.0-beta4 → 25.0.0-beta6
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/app-layout",
|
|
3
|
-
"version": "25.0.0-
|
|
3
|
+
"version": "25.0.0-beta6",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -34,22 +34,22 @@
|
|
|
34
34
|
],
|
|
35
35
|
"dependencies": {
|
|
36
36
|
"@open-wc/dedupe-mixin": "^1.3.0",
|
|
37
|
-
"@vaadin/a11y-base": "25.0.0-
|
|
38
|
-
"@vaadin/button": "25.0.0-
|
|
39
|
-
"@vaadin/component-base": "25.0.0-
|
|
40
|
-
"@vaadin/vaadin-themable-mixin": "25.0.0-
|
|
37
|
+
"@vaadin/a11y-base": "25.0.0-beta6",
|
|
38
|
+
"@vaadin/button": "25.0.0-beta6",
|
|
39
|
+
"@vaadin/component-base": "25.0.0-beta6",
|
|
40
|
+
"@vaadin/vaadin-themable-mixin": "25.0.0-beta6",
|
|
41
41
|
"lit": "^3.0.0"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
|
-
"@vaadin/chai-plugins": "25.0.0-
|
|
45
|
-
"@vaadin/test-runner-commands": "25.0.0-
|
|
44
|
+
"@vaadin/chai-plugins": "25.0.0-beta6",
|
|
45
|
+
"@vaadin/test-runner-commands": "25.0.0-beta6",
|
|
46
46
|
"@vaadin/testing-helpers": "^2.0.0",
|
|
47
|
-
"@vaadin/vaadin-lumo-styles": "25.0.0-
|
|
47
|
+
"@vaadin/vaadin-lumo-styles": "25.0.0-beta6",
|
|
48
48
|
"sinon": "^21.0.0"
|
|
49
49
|
},
|
|
50
50
|
"web-types": [
|
|
51
51
|
"web-types.json",
|
|
52
52
|
"web-types.lit.json"
|
|
53
53
|
],
|
|
54
|
-
"gitHead": "
|
|
54
|
+
"gitHead": "b6b638bee18aa62f095e0a0b7bf16a39db756f84"
|
|
55
55
|
}
|
|
@@ -17,8 +17,18 @@ export const appLayoutStyles = css`
|
|
|
17
17
|
--vaadin-app-layout-touch-optimized: false;
|
|
18
18
|
--vaadin-app-layout-navbar-offset-top: var(--_vaadin-app-layout-navbar-offset-size);
|
|
19
19
|
--vaadin-app-layout-navbar-offset-bottom: var(--_vaadin-app-layout-navbar-offset-size-bottom);
|
|
20
|
-
padding-
|
|
21
|
-
padding-
|
|
20
|
+
padding-top: max(var(--vaadin-app-layout-navbar-offset-top), var(--safe-area-inset-top));
|
|
21
|
+
padding-bottom: max(var(--vaadin-app-layout-navbar-offset-bottom), var(--safe-area-inset-bottom));
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
:host(:dir(ltr)) [content] {
|
|
25
|
+
padding-left: max(var(--vaadin-app-layout-drawer-offset-left), var(--safe-area-inset-left));
|
|
26
|
+
padding-right: var(--safe-area-inset-right);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
:host(:dir(rtl)) [content] {
|
|
30
|
+
padding-left: var(--safe-area-inset-left);
|
|
31
|
+
padding-right: max(var(--vaadin-app-layout-drawer-offset-left), var(--safe-area-inset-right));
|
|
22
32
|
}
|
|
23
33
|
|
|
24
34
|
:host([hidden]),
|
|
@@ -37,8 +47,7 @@ export const appLayoutStyles = css`
|
|
|
37
47
|
}
|
|
38
48
|
|
|
39
49
|
:host([overlay]) {
|
|
40
|
-
--vaadin-app-layout-drawer-offset-left:
|
|
41
|
-
--vaadin-app-layout-navbar-offset-left: 0;
|
|
50
|
+
--vaadin-app-layout-drawer-offset-left: 0px;
|
|
42
51
|
}
|
|
43
52
|
|
|
44
53
|
:host(:not([no-scroll])) [content] {
|
|
@@ -47,6 +56,7 @@ export const appLayoutStyles = css`
|
|
|
47
56
|
|
|
48
57
|
[content] {
|
|
49
58
|
height: 100%;
|
|
59
|
+
transition: inherit;
|
|
50
60
|
}
|
|
51
61
|
|
|
52
62
|
@media (pointer: coarse) and (max-width: 800px) and (min-height: 500px) {
|
|
@@ -110,7 +120,7 @@ export const appLayoutStyles = css`
|
|
|
110
120
|
max-width: 90%;
|
|
111
121
|
width: var(--_vaadin-app-layout-drawer-width);
|
|
112
122
|
box-sizing: border-box;
|
|
113
|
-
padding: var(--safe-area-inset-top)
|
|
123
|
+
padding-block: var(--safe-area-inset-top) var(--safe-area-inset-bottom);
|
|
114
124
|
outline: none;
|
|
115
125
|
/* The drawer should be inaccessible by the tabbing navigation when it is closed. */
|
|
116
126
|
visibility: hidden;
|
|
@@ -119,6 +129,29 @@ export const appLayoutStyles = css`
|
|
|
119
129
|
background: var(--vaadin-app-layout-drawer-background, transparent);
|
|
120
130
|
}
|
|
121
131
|
|
|
132
|
+
[part='drawer']:dir(ltr) {
|
|
133
|
+
padding-left: var(--safe-area-inset-left);
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
[part='drawer']:dir(rtl) {
|
|
137
|
+
padding-right: var(--safe-area-inset-right);
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
:host([has-navbar]:not([overlay])) [part='drawer'],
|
|
141
|
+
:host([has-navbar]) [content] {
|
|
142
|
+
--safe-area-inset-top: 0px;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
:host([has-drawer]:not([overlay])[drawer-opened]) [content] {
|
|
146
|
+
&:dir(ltr) {
|
|
147
|
+
--safe-area-inset-left: 0px;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
&:dir(rtl) {
|
|
151
|
+
--safe-area-inset-right: 0px;
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
|
|
122
155
|
:host([drawer-opened]) [part='drawer'] {
|
|
123
156
|
/* The drawer should be accessible by the tabbing navigation when it is opened. */
|
|
124
157
|
visibility: visible;
|
|
@@ -168,10 +201,6 @@ export const appLayoutStyles = css`
|
|
|
168
201
|
transform: translateX(0%);
|
|
169
202
|
}
|
|
170
203
|
|
|
171
|
-
:host([drawer-opened]:not([overlay])) {
|
|
172
|
-
padding-inline-start: var(--vaadin-app-layout-drawer-offset-left);
|
|
173
|
-
}
|
|
174
|
-
|
|
175
204
|
@media (max-width: 800px), (max-height: 600px) {
|
|
176
205
|
:host {
|
|
177
206
|
--vaadin-app-layout-drawer-overlay: true;
|
|
@@ -393,22 +393,11 @@ export const AppLayoutMixin = (superclass) =>
|
|
|
393
393
|
/**
|
|
394
394
|
* Returns a promise that resolves when the drawer opening/closing CSS transition ends.
|
|
395
395
|
*
|
|
396
|
-
* The method relies on the `--vaadin-app-layout-transition-duration` CSS variable to detect whether
|
|
397
|
-
* the drawer has a CSS transition that needs to be awaited. If the CSS variable equals `0s`,
|
|
398
|
-
* the promise resolves immediately.
|
|
399
|
-
*
|
|
400
396
|
* @return {Promise}
|
|
401
397
|
* @private
|
|
402
398
|
*/
|
|
403
399
|
__drawerTransitionComplete() {
|
|
404
|
-
return
|
|
405
|
-
if (this._getCustomPropertyValue('--vaadin-app-layout-transition-duration') === '0s') {
|
|
406
|
-
resolve();
|
|
407
|
-
return;
|
|
408
|
-
}
|
|
409
|
-
|
|
410
|
-
this.$.drawer.addEventListener('transitionend', resolve, { once: true });
|
|
411
|
-
});
|
|
400
|
+
return Promise.all(this.$.drawer.getAnimations().map((animation) => animation.finished));
|
|
412
401
|
}
|
|
413
402
|
|
|
414
403
|
/** @private */
|
package/src/vaadin-app-layout.js
CHANGED
|
@@ -4,7 +4,6 @@
|
|
|
4
4
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5
5
|
*/
|
|
6
6
|
import './detect-ios-navbar.js';
|
|
7
|
-
import './safe-area-inset.js';
|
|
8
7
|
import { html, LitElement } from 'lit';
|
|
9
8
|
import { defineCustomElement } from '@vaadin/component-base/src/define.js';
|
|
10
9
|
import { ElementMixin } from '@vaadin/component-base/src/element-mixin.js';
|
package/web-types.json
CHANGED
package/web-types.lit.json
CHANGED
package/src/safe-area-inset.js
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright (c) 2000 - 2025 Vaadin Ltd.
|
|
4
|
-
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
const template = document.createElement('template');
|
|
8
|
-
|
|
9
|
-
template.innerHTML = `
|
|
10
|
-
<style>
|
|
11
|
-
/* Use units so that the values can be used in calc() */
|
|
12
|
-
html {
|
|
13
|
-
--safe-area-inset-top: env(safe-area-inset-top, 0px);
|
|
14
|
-
--safe-area-inset-right: env(safe-area-inset-right, 0px);
|
|
15
|
-
--safe-area-inset-bottom: env(safe-area-inset-bottom, 0px);
|
|
16
|
-
--safe-area-inset-left: env(safe-area-inset-left, 0px);
|
|
17
|
-
}
|
|
18
|
-
</style>
|
|
19
|
-
`;
|
|
20
|
-
|
|
21
|
-
document.head.appendChild(template.content);
|