@vaadin/app-layout 23.1.0-alpha3 → 23.1.0-alpha4
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 +8 -8
- package/src/detect-ios-navbar.js +1 -1
- package/src/vaadin-app-layout.d.ts +2 -2
- package/src/vaadin-app-layout.js +21 -14
- package/src/vaadin-drawer-toggle.js +2 -2
- package/theme/lumo/vaadin-app-layout-styles.js +1 -1
- package/theme/material/vaadin-app-layout-styles.js +1 -1
- package/theme/material/vaadin-drawer-toggle-styles.js +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vaadin/app-layout",
|
|
3
|
-
"version": "23.1.0-
|
|
3
|
+
"version": "23.1.0-alpha4",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -34,17 +34,17 @@
|
|
|
34
34
|
],
|
|
35
35
|
"dependencies": {
|
|
36
36
|
"@polymer/polymer": "^3.0.0",
|
|
37
|
-
"@vaadin/button": "23.1.0-
|
|
38
|
-
"@vaadin/component-base": "23.1.0-
|
|
39
|
-
"@vaadin/vaadin-lumo-styles": "23.1.0-
|
|
40
|
-
"@vaadin/vaadin-material-styles": "23.1.0-
|
|
41
|
-
"@vaadin/vaadin-themable-mixin": "23.1.0-
|
|
37
|
+
"@vaadin/button": "23.1.0-alpha4",
|
|
38
|
+
"@vaadin/component-base": "23.1.0-alpha4",
|
|
39
|
+
"@vaadin/vaadin-lumo-styles": "23.1.0-alpha4",
|
|
40
|
+
"@vaadin/vaadin-material-styles": "23.1.0-alpha4",
|
|
41
|
+
"@vaadin/vaadin-themable-mixin": "23.1.0-alpha4"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
44
|
"@esm-bundle/chai": "^4.3.4",
|
|
45
|
-
"@vaadin/tabs": "23.1.0-
|
|
45
|
+
"@vaadin/tabs": "23.1.0-alpha4",
|
|
46
46
|
"@vaadin/testing-helpers": "^0.3.2",
|
|
47
47
|
"sinon": "^13.0.2"
|
|
48
48
|
},
|
|
49
|
-
"gitHead": "
|
|
49
|
+
"gitHead": "aacdb7fe09811894751f0378ff7fb66071892c71"
|
|
50
50
|
}
|
package/src/detect-ios-navbar.js
CHANGED
|
@@ -13,7 +13,7 @@ export function _detectIosNavbar() {
|
|
|
13
13
|
const landscape = innerWidth > innerHeight;
|
|
14
14
|
const clientHeight = document.documentElement.clientHeight;
|
|
15
15
|
if (landscape && clientHeight > innerHeight) {
|
|
16
|
-
document.documentElement.style.setProperty('--vaadin-viewport-offset-bottom', clientHeight - innerHeight
|
|
16
|
+
document.documentElement.style.setProperty('--vaadin-viewport-offset-bottom', `${clientHeight - innerHeight}px`);
|
|
17
17
|
} else {
|
|
18
18
|
document.documentElement.style.setProperty('--vaadin-viewport-offset-bottom', '');
|
|
19
19
|
}
|
|
@@ -185,13 +185,13 @@ declare class AppLayout extends ElementMixin(ThemableMixin(ControllerMixin(HTMLE
|
|
|
185
185
|
addEventListener<K extends keyof AppLayoutEventMap>(
|
|
186
186
|
type: K,
|
|
187
187
|
listener: (this: AppLayout, ev: AppLayoutEventMap[K]) => void,
|
|
188
|
-
options?: boolean | AddEventListenerOptions
|
|
188
|
+
options?: boolean | AddEventListenerOptions,
|
|
189
189
|
): void;
|
|
190
190
|
|
|
191
191
|
removeEventListener<K extends keyof AppLayoutEventMap>(
|
|
192
192
|
type: K,
|
|
193
193
|
listener: (this: AppLayout, ev: AppLayoutEventMap[K]) => void,
|
|
194
|
-
options?: boolean | EventListenerOptions
|
|
194
|
+
options?: boolean | EventListenerOptions,
|
|
195
195
|
): void;
|
|
196
196
|
}
|
|
197
197
|
|
package/src/vaadin-app-layout.js
CHANGED
|
@@ -341,9 +341,9 @@ class AppLayout extends ElementMixin(ThemableMixin(ControllerMixin(PolymerElemen
|
|
|
341
341
|
observer: '__i18nChanged',
|
|
342
342
|
value: () => {
|
|
343
343
|
return {
|
|
344
|
-
drawer: 'Drawer'
|
|
344
|
+
drawer: 'Drawer',
|
|
345
345
|
};
|
|
346
|
-
}
|
|
346
|
+
},
|
|
347
347
|
},
|
|
348
348
|
|
|
349
349
|
/**
|
|
@@ -358,7 +358,7 @@ class AppLayout extends ElementMixin(ThemableMixin(ControllerMixin(PolymerElemen
|
|
|
358
358
|
value: 'navbar',
|
|
359
359
|
notify: true,
|
|
360
360
|
reflectToAttribute: true,
|
|
361
|
-
observer: '__primarySectionChanged'
|
|
361
|
+
observer: '__primarySectionChanged',
|
|
362
362
|
},
|
|
363
363
|
|
|
364
364
|
/**
|
|
@@ -374,7 +374,7 @@ class AppLayout extends ElementMixin(ThemableMixin(ControllerMixin(PolymerElemen
|
|
|
374
374
|
notify: true,
|
|
375
375
|
value: true,
|
|
376
376
|
reflectToAttribute: true,
|
|
377
|
-
observer: '__drawerOpenedChanged'
|
|
377
|
+
observer: '__drawerOpenedChanged',
|
|
378
378
|
},
|
|
379
379
|
|
|
380
380
|
/**
|
|
@@ -387,7 +387,7 @@ class AppLayout extends ElementMixin(ThemableMixin(ControllerMixin(PolymerElemen
|
|
|
387
387
|
notify: true,
|
|
388
388
|
readOnly: true,
|
|
389
389
|
value: false,
|
|
390
|
-
reflectToAttribute: true
|
|
390
|
+
reflectToAttribute: true,
|
|
391
391
|
},
|
|
392
392
|
|
|
393
393
|
/**
|
|
@@ -400,8 +400,8 @@ class AppLayout extends ElementMixin(ThemableMixin(ControllerMixin(PolymerElemen
|
|
|
400
400
|
closeDrawerOn: {
|
|
401
401
|
type: String,
|
|
402
402
|
value: 'vaadin-router-location-changed',
|
|
403
|
-
observer: '_closeDrawerOnChanged'
|
|
404
|
-
}
|
|
403
|
+
observer: '_closeDrawerOnChanged',
|
|
404
|
+
},
|
|
405
405
|
};
|
|
406
406
|
}
|
|
407
407
|
|
|
@@ -458,9 +458,16 @@ class AppLayout extends ElementMixin(ThemableMixin(ControllerMixin(PolymerElemen
|
|
|
458
458
|
disconnectedCallback() {
|
|
459
459
|
super.disconnectedCallback();
|
|
460
460
|
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
461
|
+
if (this._navbarChildObserver) {
|
|
462
|
+
this._navbarChildObserver.disconnect();
|
|
463
|
+
}
|
|
464
|
+
if (this._drawerChildObserver) {
|
|
465
|
+
this._drawerChildObserver.disconnect();
|
|
466
|
+
}
|
|
467
|
+
if (this._touchChildObserver) {
|
|
468
|
+
this._touchChildObserver.disconnect();
|
|
469
|
+
}
|
|
470
|
+
|
|
464
471
|
window.removeEventListener('resize', this.__boundResizeListener);
|
|
465
472
|
this.removeEventListener('drawer-toggle-click', this.__drawerToggleClickListener);
|
|
466
473
|
window.removeEventListener('close-overlay-drawer', this.__drawerToggleClickListener);
|
|
@@ -581,13 +588,13 @@ class AppLayout extends ElementMixin(ThemableMixin(ControllerMixin(PolymerElemen
|
|
|
581
588
|
const navbarBottom = this.$.navbarBottom;
|
|
582
589
|
const navbarBottomRect = navbarBottom.getBoundingClientRect();
|
|
583
590
|
|
|
584
|
-
this.style.setProperty('--_vaadin-app-layout-navbar-offset-size', navbarRect.height
|
|
585
|
-
this.style.setProperty('--_vaadin-app-layout-navbar-offset-size-bottom', navbarBottomRect.height
|
|
591
|
+
this.style.setProperty('--_vaadin-app-layout-navbar-offset-size', `${navbarRect.height}px`);
|
|
592
|
+
this.style.setProperty('--_vaadin-app-layout-navbar-offset-size-bottom', `${navbarBottomRect.height}px`);
|
|
586
593
|
|
|
587
594
|
const drawer = this.$.drawer;
|
|
588
595
|
const drawerRect = drawer.getBoundingClientRect();
|
|
589
596
|
|
|
590
|
-
this.style.setProperty('--_vaadin-app-layout-drawer-offset-size', drawerRect.width
|
|
597
|
+
this.style.setProperty('--_vaadin-app-layout-drawer-offset-size', `${drawerRect.width}px`);
|
|
591
598
|
}
|
|
592
599
|
|
|
593
600
|
/** @protected */
|
|
@@ -733,7 +740,7 @@ class AppLayout extends ElementMixin(ThemableMixin(ControllerMixin(PolymerElemen
|
|
|
733
740
|
|
|
734
741
|
/** @protected */
|
|
735
742
|
_updateTouchOptimizedMode() {
|
|
736
|
-
const touchOptimized = this._getCustomPropertyValue('--vaadin-app-layout-touch-optimized')
|
|
743
|
+
const touchOptimized = this._getCustomPropertyValue('--vaadin-app-layout-touch-optimized') === 'true';
|
|
737
744
|
|
|
738
745
|
const navbarItems = this.querySelectorAll('[slot*="navbar"]');
|
|
739
746
|
|