@vaadin/app-layout 24.0.0-alpha1 → 24.0.0-alpha10

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.0.0-alpha1",
3
+ "version": "24.0.0-alpha10",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -36,15 +36,15 @@
36
36
  ],
37
37
  "dependencies": {
38
38
  "@polymer/polymer": "^3.0.0",
39
- "@vaadin/button": "24.0.0-alpha1",
40
- "@vaadin/component-base": "24.0.0-alpha1",
41
- "@vaadin/vaadin-lumo-styles": "24.0.0-alpha1",
42
- "@vaadin/vaadin-material-styles": "24.0.0-alpha1",
43
- "@vaadin/vaadin-themable-mixin": "24.0.0-alpha1"
39
+ "@vaadin/button": "24.0.0-alpha10",
40
+ "@vaadin/component-base": "24.0.0-alpha10",
41
+ "@vaadin/vaadin-lumo-styles": "24.0.0-alpha10",
42
+ "@vaadin/vaadin-material-styles": "24.0.0-alpha10",
43
+ "@vaadin/vaadin-themable-mixin": "24.0.0-alpha10"
44
44
  },
45
45
  "devDependencies": {
46
46
  "@esm-bundle/chai": "^4.3.4",
47
- "@vaadin/tabs": "24.0.0-alpha1",
47
+ "@vaadin/tabs": "24.0.0-alpha10",
48
48
  "@vaadin/testing-helpers": "^0.3.2",
49
49
  "sinon": "^13.0.2"
50
50
  },
@@ -52,5 +52,5 @@
52
52
  "web-types.json",
53
53
  "web-types.lit.json"
54
54
  ],
55
- "gitHead": "427527c27c4b27822d61fd41d38d7b170134770b"
55
+ "gitHead": "2e04534d8b47bcd216f89b5f849bafef1a73b174"
56
56
  }
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * Copyright (c) 2018 - 2022 Vaadin Ltd.
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
6
  import { isIOS } from '@vaadin/component-base/src/browser-utils.js';
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * Copyright (c) 2018 - 2022 Vaadin Ltd.
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
6
  import { ControllerMixin } from '@vaadin/component-base/src/controller-mixin.js';
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * Copyright (c) 2018 - 2022 Vaadin Ltd.
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
6
  import './safe-area-inset.js';
@@ -164,8 +164,7 @@ class AppLayout extends ElementMixin(ThemableMixin(ControllerMixin(PolymerElemen
164
164
  }
165
165
  }
166
166
 
167
- [part='navbar'],
168
- [part='navbar']::before {
167
+ [part='navbar'] {
169
168
  position: fixed;
170
169
  display: flex;
171
170
  align-items: center;
@@ -213,6 +212,8 @@ class AppLayout extends ElementMixin(ThemableMixin(ControllerMixin(PolymerElemen
213
212
  outline: none;
214
213
  /* The drawer should be inaccessible by the tabbing navigation when it is closed. */
215
214
  visibility: hidden;
215
+ display: flex;
216
+ flex-direction: column;
216
217
  }
217
218
 
218
219
  :host([drawer-opened]) [part='drawer'] {
@@ -263,8 +264,7 @@ class AppLayout extends ElementMixin(ThemableMixin(ControllerMixin(PolymerElemen
263
264
  transform: translateX(100%);
264
265
  }
265
266
 
266
- :host([dir='rtl']) [part='navbar'],
267
- :host([dir='rtl']) [part='navbar']::before {
267
+ :host([dir='rtl']) [part='navbar'] {
268
268
  transition: right var(--vaadin-app-layout-transition);
269
269
  }
270
270
 
@@ -289,6 +289,12 @@ class AppLayout extends ElementMixin(ThemableMixin(ControllerMixin(PolymerElemen
289
289
  width: 20em;
290
290
  }
291
291
  }
292
+
293
+ /* If a vaadin-scroller is used in the drawer, allow it to take all remaining space and contain scrolling */
294
+ [part='drawer'] ::slotted(vaadin-scroller) {
295
+ flex: 1;
296
+ overscroll-behavior: contain;
297
+ }
292
298
  </style>
293
299
  <div part="navbar" id="navbarTop">
294
300
  <slot name="navbar"></slot>
@@ -518,7 +524,6 @@ class AppLayout extends ElementMixin(ThemableMixin(ControllerMixin(PolymerElemen
518
524
  __drawerOpenedChanged(drawerOpened, oldDrawerOpened) {
519
525
  if (this.overlay) {
520
526
  if (drawerOpened) {
521
- this._updateDrawerHeight();
522
527
  this.__trapFocusInDrawer();
523
528
  } else if (oldDrawerOpened) {
524
529
  this.__releaseFocusFromDrawer();
@@ -604,13 +609,6 @@ class AppLayout extends ElementMixin(ThemableMixin(ControllerMixin(PolymerElemen
604
609
  this.style.setProperty('--_vaadin-app-layout-drawer-offset-size', `${drawerRect.width}px`);
605
610
  }
606
611
 
607
- /** @protected */
608
- _updateDrawerHeight() {
609
- const { scrollHeight, offsetHeight } = this.$.drawer;
610
- const height = scrollHeight > offsetHeight ? `${scrollHeight}px` : '100%';
611
- this.style.setProperty('--_vaadin-app-layout-drawer-scroll-size', height);
612
- }
613
-
614
612
  /** @protected */
615
613
  _updateOverlayMode() {
616
614
  const overlay = this._getCustomPropertyValue('--vaadin-app-layout-drawer-overlay') === 'true';
@@ -628,7 +626,6 @@ class AppLayout extends ElementMixin(ThemableMixin(ControllerMixin(PolymerElemen
628
626
  this._drawerStateSaved = null;
629
627
  }
630
628
 
631
- this._updateDrawerHeight();
632
629
  this.__updateDrawerAriaAttributes();
633
630
  }
634
631
 
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * Copyright (c) 2018 - 2022 Vaadin Ltd.
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
6
  import { Button } from '@vaadin/button/src/vaadin-button.js';
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * Copyright (c) 2018 - 2022 Vaadin Ltd.
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
6
  import { FlattenedNodesObserver } from '@polymer/polymer/lib/utils/flattened-nodes-observer.js';
@@ -6,34 +6,38 @@ import { css, registerStyles } from '@vaadin/vaadin-themable-mixin/vaadin-themab
6
6
  registerStyles(
7
7
  'vaadin-app-layout',
8
8
  css`
9
- [part='navbar']::before {
10
- background: var(--lumo-base-color) linear-gradient(var(--lumo-contrast-5pct), var(--lumo-contrast-5pct));
9
+ [part='navbar'],
10
+ [part='drawer'] {
11
+ background-color: var(--lumo-base-color);
12
+ background-clip: padding-box;
11
13
  }
12
14
 
13
- :host(:not([dir='rtl']):not([overlay])) [part='drawer'] {
14
- border-right: 1px solid var(--lumo-contrast-10pct);
15
+ [part='navbar'] {
16
+ min-height: var(--lumo-size-xl);
17
+ border-bottom: 1px solid var(--lumo-contrast-10pct);
15
18
  }
16
19
 
17
- :host([dir='rtl']:not([overlay])) [part='drawer'] {
18
- border-left: 1px solid var(--lumo-contrast-10pct);
20
+ [part='navbar'][bottom] {
21
+ border-bottom: none;
22
+ border-top: 1px solid var(--lumo-contrast-10pct);
19
23
  }
20
24
 
21
- :host([overlay]) [part='drawer']::before {
22
- background: var(--lumo-base-color);
25
+ [part='drawer'] {
26
+ border-inline-end: 1px solid var(--lumo-contrast-10pct);
23
27
  }
24
28
 
25
- [part='navbar']::before,
26
- :host([overlay]) [part='drawer']::before {
27
- position: absolute;
28
- content: '';
29
- width: 100%;
30
- height: 100%;
31
- z-index: -1;
29
+ :host([overlay]) [part='drawer'] {
30
+ border-inline-end: none;
31
+ box-shadow: var(--lumo-box-shadow-s);
32
32
  }
33
33
 
34
- :host([overlay]) [part='drawer']::before {
35
- background: var(--lumo-base-color);
36
- height: var(--_vaadin-app-layout-drawer-scroll-size, 100%);
34
+ :host([primary-section='navbar']) [part='navbar'] {
35
+ border: none;
36
+ background-image: linear-gradient(var(--lumo-contrast-5pct), var(--lumo-contrast-5pct));
37
+ }
38
+
39
+ :host([primary-section='drawer']:not([overlay])) [part='drawer'] {
40
+ background-image: linear-gradient(var(--lumo-shade-5pct), var(--lumo-shade-5pct));
37
41
  }
38
42
 
39
43
  [part='backdrop'] {
@@ -47,26 +51,6 @@ registerStyles(
47
51
  margin-top: var(--lumo-space-xs) !important;
48
52
  margin-bottom: var(--lumo-space-xs) !important;
49
53
  }
50
-
51
- @supports (-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px)) {
52
- [part='navbar']::before {
53
- opacity: 0.8;
54
- }
55
-
56
- [part='navbar'] {
57
- -webkit-backdrop-filter: blur(24px);
58
- backdrop-filter: blur(24px);
59
- }
60
-
61
- :host([overlay]) [part='drawer']::before {
62
- opacity: 0.9;
63
- }
64
-
65
- :host([overlay]) [part='drawer'] {
66
- -webkit-backdrop-filter: blur(24px);
67
- backdrop-filter: blur(24px);
68
- }
69
- }
70
54
  `,
71
55
  { moduleId: 'lumo-app-layout' },
72
56
  );
@@ -27,6 +27,10 @@ const drawerToggle = css`
27
27
  font-size: var(--lumo-icon-size-m);
28
28
  content: var(--lumo-icons-menu);
29
29
  }
30
+
31
+ :host([slot~='navbar']) {
32
+ color: var(--lumo-secondary-text-color);
33
+ }
30
34
  `;
31
35
 
32
36
  registerStyles('vaadin-drawer-toggle', [button, drawerToggle], { moduleId: 'lumo-drawer-toggle' });
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.0.0-alpha1",
4
+ "version": "24.0.0-alpha10",
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.0.0-alpha1",
4
+ "version": "24.0.0-alpha10",
5
5
  "description-markup": "markdown",
6
6
  "framework": "lit",
7
7
  "framework-config": {