@vaadin/app-layout 24.2.0-alpha5 → 24.2.0-alpha7

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": "24.2.0-alpha5",
3
+ "version": "24.2.0-alpha7",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -36,16 +36,16 @@
36
36
  ],
37
37
  "dependencies": {
38
38
  "@polymer/polymer": "^3.0.0",
39
- "@vaadin/a11y-base": "24.2.0-alpha5",
40
- "@vaadin/button": "24.2.0-alpha5",
41
- "@vaadin/component-base": "24.2.0-alpha5",
42
- "@vaadin/vaadin-lumo-styles": "24.2.0-alpha5",
43
- "@vaadin/vaadin-material-styles": "24.2.0-alpha5",
44
- "@vaadin/vaadin-themable-mixin": "24.2.0-alpha5"
39
+ "@vaadin/a11y-base": "24.2.0-alpha7",
40
+ "@vaadin/button": "24.2.0-alpha7",
41
+ "@vaadin/component-base": "24.2.0-alpha7",
42
+ "@vaadin/vaadin-lumo-styles": "24.2.0-alpha7",
43
+ "@vaadin/vaadin-material-styles": "24.2.0-alpha7",
44
+ "@vaadin/vaadin-themable-mixin": "24.2.0-alpha7"
45
45
  },
46
46
  "devDependencies": {
47
47
  "@esm-bundle/chai": "^4.3.4",
48
- "@vaadin/tabs": "24.2.0-alpha5",
48
+ "@vaadin/tabs": "24.2.0-alpha7",
49
49
  "@vaadin/testing-helpers": "^0.4.3",
50
50
  "sinon": "^13.0.2"
51
51
  },
@@ -53,5 +53,5 @@
53
53
  "web-types.json",
54
54
  "web-types.lit.json"
55
55
  ],
56
- "gitHead": "73db22a5e8993e3ce48d1e6540d30eff9cb5c257"
56
+ "gitHead": "81ecf12d2d59a3e5b467273c37a391e31932dc9c"
57
57
  }
@@ -5,7 +5,6 @@
5
5
  */
6
6
  import './safe-area-inset.js';
7
7
  import './detect-ios-navbar.js';
8
- import { FlattenedNodesObserver } from '@polymer/polymer/lib/utils/flattened-nodes-observer.js';
9
8
  import { afterNextRender, beforeNextRender } from '@polymer/polymer/lib/utils/render-status.js';
10
9
  import { html, PolymerElement } from '@polymer/polymer/polymer-element.js';
11
10
  import { AriaModalController } from '@vaadin/a11y-base/src/aria-modal-controller.js';
@@ -273,11 +272,11 @@ class AppLayout extends ElementMixin(ThemableMixin(ControllerMixin(PolymerElemen
273
272
  }
274
273
  </style>
275
274
  <div part="navbar" id="navbarTop">
276
- <slot name="navbar"></slot>
275
+ <slot name="navbar" on-slotchange="_updateTouchOptimizedMode"></slot>
277
276
  </div>
278
277
  <div part="backdrop" on-click="_onBackdropClick" on-touchend="_onBackdropTouchend"></div>
279
278
  <div part="drawer" id="drawer">
280
- <slot name="drawer" id="drawerSlot"></slot>
279
+ <slot name="drawer" id="drawerSlot" on-slotchange="_updateDrawerSize"></slot>
281
280
  </div>
282
281
  <div content>
283
282
  <slot></slot>
@@ -285,7 +284,9 @@ class AppLayout extends ElementMixin(ThemableMixin(ControllerMixin(PolymerElemen
285
284
  <div part="navbar" id="navbarBottom" bottom hidden>
286
285
  <slot name="navbar-bottom"></slot>
287
286
  </div>
288
- <div hidden><slot id="touchSlot" name="navbar touch-optimized"></slot></div>
287
+ <div hidden>
288
+ <slot id="touchSlot" name="navbar touch-optimized" on-slotchange="_updateTouchOptimizedMode"></slot>
289
+ </div>
289
290
  `;
290
291
  }
291
292
 
@@ -423,19 +424,6 @@ class AppLayout extends ElementMixin(ThemableMixin(ControllerMixin(PolymerElemen
423
424
  beforeNextRender(this, this._afterFirstRender);
424
425
 
425
426
  this._updateTouchOptimizedMode();
426
-
427
- const navbarSlot = this.$.navbarTop.firstElementChild;
428
- this._navbarChildObserver = new FlattenedNodesObserver(navbarSlot, () => {
429
- this._updateTouchOptimizedMode();
430
- });
431
-
432
- this._touchChildObserver = new FlattenedNodesObserver(this.$.touchSlot, () => {
433
- this._updateTouchOptimizedMode();
434
- });
435
-
436
- this._drawerChildObserver = new FlattenedNodesObserver(this.$.drawerSlot, () => {
437
- this._updateDrawerSize();
438
- });
439
427
  this._updateDrawerSize();
440
428
  this._updateOverlayMode();
441
429
 
@@ -486,16 +474,6 @@ class AppLayout extends ElementMixin(ThemableMixin(ControllerMixin(PolymerElemen
486
474
  disconnectedCallback() {
487
475
  super.disconnectedCallback();
488
476
 
489
- if (this._navbarChildObserver) {
490
- this._navbarChildObserver.disconnect();
491
- }
492
- if (this._drawerChildObserver) {
493
- this._drawerChildObserver.disconnect();
494
- }
495
- if (this._touchChildObserver) {
496
- this._touchChildObserver.disconnect();
497
- }
498
-
499
477
  window.removeEventListener('resize', this.__boundResizeListener);
500
478
  this.removeEventListener('drawer-toggle-click', this.__drawerToggleClickListener);
501
479
  window.removeEventListener('close-overlay-drawer', this.__drawerToggleClickListener);
@@ -3,7 +3,6 @@
3
3
  * Copyright (c) 2018 - 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 { FlattenedNodesObserver } from '@polymer/polymer/lib/utils/flattened-nodes-observer.js';
7
6
  import { html } from '@polymer/polymer/lib/utils/html-tag.js';
8
7
  import { Button } from '@vaadin/button/src/vaadin-button.js';
9
8
  import { isEmptyTextNode } from '@vaadin/component-base/src/dom-utils.js';
@@ -108,7 +107,9 @@ class DrawerToggle extends Button {
108
107
  ready() {
109
108
  super.ready();
110
109
 
111
- this._observer = new FlattenedNodesObserver(this, () => {
110
+ this._toggleFallbackIcon();
111
+
112
+ this.$.slot.addEventListener('slotchange', () => {
112
113
  this._toggleFallbackIcon();
113
114
  });
114
115
  }
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": "24.2.0-alpha5",
4
+ "version": "24.2.0-alpha7",
5
5
  "description-markup": "markdown",
6
6
  "contributions": {
7
7
  "html": {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/web-types",
3
3
  "name": "@vaadin/app-layout",
4
- "version": "24.2.0-alpha5",
4
+ "version": "24.2.0-alpha7",
5
5
  "description-markup": "markdown",
6
6
  "framework": "lit",
7
7
  "framework-config": {