@vaadin/app-layout 24.0.0-alpha5 → 24.0.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.0.0-alpha5",
3
+ "version": "24.0.0-alpha7",
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-alpha5",
40
- "@vaadin/component-base": "24.0.0-alpha5",
41
- "@vaadin/vaadin-lumo-styles": "24.0.0-alpha5",
42
- "@vaadin/vaadin-material-styles": "24.0.0-alpha5",
43
- "@vaadin/vaadin-themable-mixin": "24.0.0-alpha5"
39
+ "@vaadin/button": "24.0.0-alpha7",
40
+ "@vaadin/component-base": "24.0.0-alpha7",
41
+ "@vaadin/vaadin-lumo-styles": "24.0.0-alpha7",
42
+ "@vaadin/vaadin-material-styles": "24.0.0-alpha7",
43
+ "@vaadin/vaadin-themable-mixin": "24.0.0-alpha7"
44
44
  },
45
45
  "devDependencies": {
46
46
  "@esm-bundle/chai": "^4.3.4",
47
- "@vaadin/tabs": "24.0.0-alpha5",
47
+ "@vaadin/tabs": "24.0.0-alpha7",
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": "fc0b1721eda9e39cb289b239e440fc9e29573a31"
55
+ "gitHead": "aeb4535336813636736759e0a5de148b26bfc3b6"
56
56
  }
@@ -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
 
@@ -6,34 +6,33 @@ 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='drawer'] {
21
+ border-inline-end: 1px solid var(--lumo-contrast-10pct);
19
22
  }
20
23
 
21
- :host([overlay]) [part='drawer']::before {
22
- background: var(--lumo-base-color);
24
+ :host([overlay]) [part='drawer'] {
25
+ border-inline-end: none;
26
+ box-shadow: var(--lumo-box-shadow-s);
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([primary-section='navbar']) [part='navbar'] {
30
+ border-bottom: none;
31
+ background-image: linear-gradient(var(--lumo-contrast-5pct), var(--lumo-contrast-5pct));
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='drawer']:not([overlay])) [part='drawer'] {
35
+ background-image: linear-gradient(var(--lumo-shade-5pct), var(--lumo-shade-5pct));
37
36
  }
38
37
 
39
38
  [part='backdrop'] {
@@ -47,26 +46,6 @@ registerStyles(
47
46
  margin-top: var(--lumo-space-xs) !important;
48
47
  margin-bottom: var(--lumo-space-xs) !important;
49
48
  }
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
49
  `,
71
50
  { moduleId: 'lumo-app-layout' },
72
51
  );
@@ -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-alpha5",
4
+ "version": "24.0.0-alpha7",
5
5
  "description-markup": "markdown",
6
6
  "contributions": {
7
7
  "html": {
@@ -51,6 +51,44 @@
51
51
  ],
52
52
  "js": {
53
53
  "properties": [
54
+ {
55
+ "name": "rootPath",
56
+ "description": "",
57
+ "value": {
58
+ "type": [
59
+ "string"
60
+ ]
61
+ }
62
+ },
63
+ {
64
+ "name": "importPath",
65
+ "description": "",
66
+ "value": {
67
+ "type": [
68
+ "string"
69
+ ]
70
+ }
71
+ },
72
+ {
73
+ "name": "root",
74
+ "description": "",
75
+ "value": {
76
+ "type": [
77
+ "StampedTemplate",
78
+ "HTMLElement",
79
+ "ShadowRoot"
80
+ ]
81
+ }
82
+ },
83
+ {
84
+ "name": "$",
85
+ "description": "",
86
+ "value": {
87
+ "type": [
88
+ "Object.<string, Element>"
89
+ ]
90
+ }
91
+ },
54
92
  {
55
93
  "name": "i18n",
56
94
  "description": "The object used to localize this component.\nTo change the default localization, replace the entire\n`i18n` object with a custom one.\n\nTo update individual properties, extend the existing i18n object as follows:\n```js\nappLayout.i18n = {\n ...appLayout.i18n,\n drawer: 'Drawer'\n}\n```\n\nThe object has the following structure and default values:\n```\n{\n drawer: 'Drawer'\n}\n```",
@@ -159,6 +197,44 @@
159
197
  ]
160
198
  }
161
199
  },
200
+ {
201
+ "name": "rootPath",
202
+ "description": "",
203
+ "value": {
204
+ "type": [
205
+ "string"
206
+ ]
207
+ }
208
+ },
209
+ {
210
+ "name": "importPath",
211
+ "description": "",
212
+ "value": {
213
+ "type": [
214
+ "string"
215
+ ]
216
+ }
217
+ },
218
+ {
219
+ "name": "root",
220
+ "description": "",
221
+ "value": {
222
+ "type": [
223
+ "StampedTemplate",
224
+ "HTMLElement",
225
+ "ShadowRoot"
226
+ ]
227
+ }
228
+ },
229
+ {
230
+ "name": "$",
231
+ "description": "",
232
+ "value": {
233
+ "type": [
234
+ "Object.<string, Element>"
235
+ ]
236
+ }
237
+ },
162
238
  {
163
239
  "name": "ariaLabel",
164
240
  "description": "",
@@ -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-alpha5",
4
+ "version": "24.0.0-alpha7",
5
5
  "description-markup": "markdown",
6
6
  "framework": "lit",
7
7
  "framework-config": {
@@ -26,6 +26,34 @@
26
26
  "kind": "expression"
27
27
  }
28
28
  },
29
+ {
30
+ "name": ".rootPath",
31
+ "description": "",
32
+ "value": {
33
+ "kind": "expression"
34
+ }
35
+ },
36
+ {
37
+ "name": ".importPath",
38
+ "description": "",
39
+ "value": {
40
+ "kind": "expression"
41
+ }
42
+ },
43
+ {
44
+ "name": ".root",
45
+ "description": "",
46
+ "value": {
47
+ "kind": "expression"
48
+ }
49
+ },
50
+ {
51
+ "name": ".$",
52
+ "description": "",
53
+ "value": {
54
+ "kind": "expression"
55
+ }
56
+ },
29
57
  {
30
58
  "name": ".i18n",
31
59
  "description": "The object used to localize this component.\nTo change the default localization, replace the entire\n`i18n` object with a custom one.\n\nTo update individual properties, extend the existing i18n object as follows:\n```js\nappLayout.i18n = {\n ...appLayout.i18n,\n drawer: 'Drawer'\n}\n```\n\nThe object has the following structure and default values:\n```\n{\n drawer: 'Drawer'\n}\n```",
@@ -89,6 +117,34 @@
89
117
  "kind": "expression"
90
118
  }
91
119
  },
120
+ {
121
+ "name": ".rootPath",
122
+ "description": "",
123
+ "value": {
124
+ "kind": "expression"
125
+ }
126
+ },
127
+ {
128
+ "name": ".importPath",
129
+ "description": "",
130
+ "value": {
131
+ "kind": "expression"
132
+ }
133
+ },
134
+ {
135
+ "name": ".root",
136
+ "description": "",
137
+ "value": {
138
+ "kind": "expression"
139
+ }
140
+ },
141
+ {
142
+ "name": ".$",
143
+ "description": "",
144
+ "value": {
145
+ "kind": "expression"
146
+ }
147
+ },
92
148
  {
93
149
  "name": ".ariaLabel",
94
150
  "description": "",