@vaadin/app-layout 24.8.0-alpha9 → 25.0.0-alpha2

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.
Files changed (32) hide show
  1. package/README.md +0 -26
  2. package/package.json +11 -14
  3. package/src/vaadin-app-layout-mixin.js +11 -10
  4. package/src/vaadin-app-layout.d.ts +1 -2
  5. package/src/vaadin-app-layout.js +18 -16
  6. package/src/vaadin-drawer-toggle.js +20 -19
  7. package/web-types.json +1 -1
  8. package/web-types.lit.json +1 -1
  9. package/src/vaadin-lit-app-layout.d.ts +0 -1
  10. package/src/vaadin-lit-app-layout.js +0 -59
  11. package/src/vaadin-lit-drawer-toggle.d.ts +0 -1
  12. package/src/vaadin-lit-drawer-toggle.js +0 -87
  13. package/theme/lumo/vaadin-lit-app-layout.d.ts +0 -2
  14. package/theme/lumo/vaadin-lit-app-layout.js +0 -2
  15. package/theme/lumo/vaadin-lit-drawer-toggle.d.ts +0 -2
  16. package/theme/lumo/vaadin-lit-drawer-toggle.js +0 -2
  17. package/theme/material/vaadin-app-layout-styles.d.ts +0 -3
  18. package/theme/material/vaadin-app-layout-styles.js +0 -53
  19. package/theme/material/vaadin-app-layout.d.ts +0 -2
  20. package/theme/material/vaadin-app-layout.js +0 -2
  21. package/theme/material/vaadin-drawer-toggle-styles.d.ts +0 -1
  22. package/theme/material/vaadin-drawer-toggle-styles.js +0 -39
  23. package/theme/material/vaadin-drawer-toggle.d.ts +0 -2
  24. package/theme/material/vaadin-drawer-toggle.js +0 -2
  25. package/theme/material/vaadin-lit-app-layout.d.ts +0 -2
  26. package/theme/material/vaadin-lit-app-layout.js +0 -2
  27. package/theme/material/vaadin-lit-drawer-toggle.d.ts +0 -2
  28. package/theme/material/vaadin-lit-drawer-toggle.js +0 -2
  29. package/vaadin-lit-app-layout.d.ts +0 -1
  30. package/vaadin-lit-app-layout.js +0 -2
  31. package/vaadin-lit-drawer-toggle.d.ts +0 -1
  32. package/vaadin-lit-drawer-toggle.js +0 -2
package/README.md CHANGED
@@ -47,32 +47,6 @@ import '@vaadin/app-layout';
47
47
  import '@vaadin/app-layout/vaadin-drawer-toggle.js';
48
48
  ```
49
49
 
50
- ## Themes
51
-
52
- Vaadin components come with two built-in [themes](https://vaadin.com/docs/latest/styling), Lumo and Material.
53
- The [main entrypoint](https://github.com/vaadin/web-components/blob/main/packages/app-layout/vaadin-app-layout.js) of the package uses the Lumo theme.
54
-
55
- To use the Material theme, import the components from the `theme/material` folder:
56
-
57
- ```js
58
- import '@vaadin/app-layout/theme/material/vaadin-app-layout.js';
59
- import '@vaadin/app-layout/theme/material/vaadin-drawer-toggle.js';
60
- ```
61
-
62
- You can also import the Lumo version of the components explicitly:
63
-
64
- ```js
65
- import '@vaadin/app-layout/theme/lumo/vaadin-app-layout.js';
66
- import '@vaadin/app-layout/theme/lumo/vaadin-drawer-toggle.js';
67
- ```
68
-
69
- Finally, you can import the un-themed components from the `src` folder to get a minimal starting point:
70
-
71
- ```js
72
- import '@vaadin/app-layout/src/vaadin-app-layout.js';
73
- import '@vaadin/app-layout/src/vaadin-drawer-toggle.js';
74
- ```
75
-
76
50
  ## Contributing
77
51
 
78
52
  Read the [contributing guide](https://vaadin.com/docs/latest/contributing) to learn about our development process, how to propose bugfixes and improvements, and how to test your changes to Vaadin components.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vaadin/app-layout",
3
- "version": "24.8.0-alpha9",
3
+ "version": "25.0.0-alpha2",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -31,29 +31,26 @@
31
31
  "Vaadin",
32
32
  "vaadin-app-layout",
33
33
  "web-components",
34
- "web-component",
35
- "polymer"
34
+ "web-component"
36
35
  ],
37
36
  "dependencies": {
38
37
  "@open-wc/dedupe-mixin": "^1.3.0",
39
- "@polymer/polymer": "^3.0.0",
40
- "@vaadin/a11y-base": "24.8.0-alpha9",
41
- "@vaadin/button": "24.8.0-alpha9",
42
- "@vaadin/component-base": "24.8.0-alpha9",
43
- "@vaadin/vaadin-lumo-styles": "24.8.0-alpha9",
44
- "@vaadin/vaadin-material-styles": "24.8.0-alpha9",
45
- "@vaadin/vaadin-themable-mixin": "24.8.0-alpha9",
38
+ "@vaadin/a11y-base": "25.0.0-alpha2",
39
+ "@vaadin/button": "25.0.0-alpha2",
40
+ "@vaadin/component-base": "25.0.0-alpha2",
41
+ "@vaadin/vaadin-lumo-styles": "25.0.0-alpha2",
42
+ "@vaadin/vaadin-themable-mixin": "25.0.0-alpha2",
46
43
  "lit": "^3.0.0"
47
44
  },
48
45
  "devDependencies": {
49
- "@vaadin/chai-plugins": "24.8.0-alpha9",
50
- "@vaadin/test-runner-commands": "24.8.0-alpha9",
51
- "@vaadin/testing-helpers": "^1.1.0",
46
+ "@vaadin/chai-plugins": "25.0.0-alpha2",
47
+ "@vaadin/test-runner-commands": "25.0.0-alpha2",
48
+ "@vaadin/testing-helpers": "^2.0.0",
52
49
  "sinon": "^18.0.0"
53
50
  },
54
51
  "web-types": [
55
52
  "web-types.json",
56
53
  "web-types.lit.json"
57
54
  ],
58
- "gitHead": "4de3809275ddfd733b0d13fd02af8faf73eb6770"
55
+ "gitHead": "67ffcd5355cf21ce1b5039c598525109fc4c164b"
59
56
  }
@@ -3,9 +3,10 @@
3
3
  * Copyright (c) 2018 - 2025 Vaadin Ltd.
4
4
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
5
  */
6
- import { afterNextRender, beforeNextRender } from '@polymer/polymer/lib/utils/render-status.js';
7
6
  import { AriaModalController } from '@vaadin/a11y-base/src/aria-modal-controller.js';
8
7
  import { FocusTrapController } from '@vaadin/a11y-base/src/focus-trap-controller.js';
8
+ import { animationFrame } from '@vaadin/component-base/src/async.js';
9
+ import { Debouncer } from '@vaadin/component-base/src/debounce.js';
9
10
  import { I18nMixin } from '@vaadin/component-base/src/i18n-mixin.js';
10
11
 
11
12
  /**
@@ -144,7 +145,9 @@ export const AppLayoutMixin = (superclass) =>
144
145
  window.addEventListener('resize', this.__boundResizeListener);
145
146
  this.addEventListener('drawer-toggle-click', this.__drawerToggleClickListener);
146
147
 
147
- beforeNextRender(this, this._afterFirstRender);
148
+ requestAnimationFrame(() => {
149
+ this._updateOffsetSize();
150
+ });
148
151
 
149
152
  this._updateTouchOptimizedMode();
150
153
  this._updateDrawerSize();
@@ -163,6 +166,7 @@ export const AppLayoutMixin = (superclass) =>
163
166
  });
164
167
  this._navbarSizeObserver.observe(this.$.navbarTop);
165
168
  this._navbarSizeObserver.observe(this.$.navbarBottom);
169
+ this._navbarSizeObserver.observe(this.$.drawer);
166
170
 
167
171
  window.addEventListener('close-overlay-drawer', this.__closeOverlayDrawerListener);
168
172
  window.addEventListener('keydown', this.__onDrawerKeyDown);
@@ -255,12 +259,6 @@ export const AppLayoutMixin = (superclass) =>
255
259
  this.__updateDrawerAriaAttributes();
256
260
  }
257
261
 
258
- /** @protected */
259
- _afterFirstRender() {
260
- this._blockAnimationUntilAfterNextRender();
261
- this._updateOffsetSize();
262
- }
263
-
264
262
  /** @private */
265
263
  _drawerToggleClick(e) {
266
264
  e.stopPropagation();
@@ -508,8 +506,11 @@ export const AppLayoutMixin = (superclass) =>
508
506
  /** @protected */
509
507
  _blockAnimationUntilAfterNextRender() {
510
508
  this.setAttribute('no-anim', '');
511
- afterNextRender(this, () => {
512
- this.removeAttribute('no-anim');
509
+
510
+ this.__debounceAnimation = Debouncer.debounce(this.__debounceAnimation, animationFrame, () => {
511
+ setTimeout(() => {
512
+ this.removeAttribute('no-anim');
513
+ });
513
514
  });
514
515
  }
515
516
 
@@ -3,7 +3,6 @@
3
3
  * Copyright (c) 2018 - 2025 Vaadin Ltd.
4
4
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
5
  */
6
- import { ControllerMixin } from '@vaadin/component-base/src/controller-mixin.js';
7
6
  import { ElementMixin } from '@vaadin/component-base/src/element-mixin.js';
8
7
  import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
9
8
  import { AppLayoutMixin } from './vaadin-app-layout-mixin.js';
@@ -123,7 +122,7 @@ export type AppLayoutEventMap = AppLayoutCustomEventMap & HTMLElementEventMap;
123
122
  * @fires {CustomEvent} overlay-changed - Fired when the `overlay` property changes.
124
123
  * @fires {CustomEvent} primary-section-changed - Fired when the `primarySection` property changes.
125
124
  */
126
- declare class AppLayout extends AppLayoutMixin(ElementMixin(ThemableMixin(ControllerMixin(HTMLElement)))) {
125
+ declare class AppLayout extends AppLayoutMixin(ElementMixin(ThemableMixin(HTMLElement))) {
127
126
  /**
128
127
  * Helper static method that dispatches a `close-overlay-drawer` event
129
128
  */
@@ -5,16 +5,14 @@
5
5
  */
6
6
  import './detect-ios-navbar.js';
7
7
  import './safe-area-inset.js';
8
- import { html, PolymerElement } from '@polymer/polymer/polymer-element.js';
9
- import { ControllerMixin } from '@vaadin/component-base/src/controller-mixin.js';
8
+ import { html, LitElement } from 'lit';
10
9
  import { defineCustomElement } from '@vaadin/component-base/src/define.js';
11
10
  import { ElementMixin } from '@vaadin/component-base/src/element-mixin.js';
12
- import { registerStyles, ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
11
+ import { PolylitMixin } from '@vaadin/component-base/src/polylit-mixin.js';
12
+ import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
13
13
  import { AppLayoutMixin } from './vaadin-app-layout-mixin.js';
14
14
  import { appLayoutStyles } from './vaadin-app-layout-styles.js';
15
15
 
16
- registerStyles('vaadin-app-layout', appLayoutStyles, { moduleId: 'vaadin-app-layout-styles' });
17
-
18
16
  /**
19
17
  * `<vaadin-app-layout>` is a Web Component providing a quick and easy way to get a common application layout structure done.
20
18
  *
@@ -108,17 +106,25 @@ registerStyles('vaadin-app-layout', appLayoutStyles, { moduleId: 'vaadin-app-lay
108
106
  * @mixes AppLayoutMixin
109
107
  * @mixes ElementMixin
110
108
  * @mixes ThemableMixin
111
- * @mixes ControllerMixin
112
109
  */
113
- class AppLayout extends AppLayoutMixin(ElementMixin(ThemableMixin(ControllerMixin(PolymerElement)))) {
114
- static get template() {
110
+ class AppLayout extends AppLayoutMixin(ElementMixin(ThemableMixin(PolylitMixin(LitElement)))) {
111
+ static get is() {
112
+ return 'vaadin-app-layout';
113
+ }
114
+
115
+ static get styles() {
116
+ return appLayoutStyles;
117
+ }
118
+
119
+ /** @protected */
120
+ render() {
115
121
  return html`
116
122
  <div part="navbar" id="navbarTop">
117
- <slot name="navbar" on-slotchange="_updateTouchOptimizedMode"></slot>
123
+ <slot name="navbar" @slotchange="${this._updateTouchOptimizedMode}"></slot>
118
124
  </div>
119
- <div part="backdrop" on-click="_onBackdropClick" on-touchend="_onBackdropTouchend"></div>
125
+ <div part="backdrop" @click="${this._onBackdropClick}" @touchend="${this._onBackdropTouchend}"></div>
120
126
  <div part="drawer" id="drawer">
121
- <slot name="drawer" id="drawerSlot" on-slotchange="_updateDrawerSize"></slot>
127
+ <slot name="drawer" id="drawerSlot" @slotchange="${this._updateDrawerSize}"></slot>
122
128
  </div>
123
129
  <div content>
124
130
  <slot></slot>
@@ -127,14 +133,10 @@ class AppLayout extends AppLayoutMixin(ElementMixin(ThemableMixin(ControllerMixi
127
133
  <slot name="navbar-bottom"></slot>
128
134
  </div>
129
135
  <div hidden>
130
- <slot id="touchSlot" name="navbar touch-optimized" on-slotchange="_updateTouchOptimizedMode"></slot>
136
+ <slot id="touchSlot" name="navbar touch-optimized" @slotchange="${this._updateTouchOptimizedMode}"></slot>
131
137
  </div>
132
138
  `;
133
139
  }
134
-
135
- static get is() {
136
- return 'vaadin-app-layout';
137
- }
138
140
  }
139
141
 
140
142
  defineCustomElement(AppLayout);
@@ -3,17 +3,16 @@
3
3
  * Copyright (c) 2018 - 2025 Vaadin Ltd.
4
4
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
5
  */
6
- import { html, PolymerElement } from '@polymer/polymer/polymer-element.js';
7
- import { buttonStyles } from '@vaadin/button/src/vaadin-button-base.js';
6
+ import { html, LitElement } from 'lit';
7
+ import { buttonStyles } from '@vaadin/button/src/vaadin-button-core-styles.js';
8
8
  import { ButtonMixin } from '@vaadin/button/src/vaadin-button-mixin.js';
9
9
  import { defineCustomElement } from '@vaadin/component-base/src/define.js';
10
10
  import { DirMixin } from '@vaadin/component-base/src/dir-mixin.js';
11
11
  import { isEmptyTextNode } from '@vaadin/component-base/src/dom-utils.js';
12
- import { registerStyles, ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
12
+ import { PolylitMixin } from '@vaadin/component-base/src/polylit-mixin.js';
13
+ import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
13
14
  import { drawerToggle } from './vaadin-drawer-toggle-styles.js';
14
15
 
15
- registerStyles('vaadin-drawer-toggle', [buttonStyles, drawerToggle], { moduleId: 'vaadin-drawer-toggle-styles' });
16
-
17
16
  /**
18
17
  * The Drawer Toggle component controls the drawer in App Layout component.
19
18
  *
@@ -29,26 +28,22 @@ registerStyles('vaadin-drawer-toggle', [buttonStyles, drawerToggle], { moduleId:
29
28
  * @mixes DirMixin
30
29
  * @mixes ThemableMixin
31
30
  */
32
- class DrawerToggle extends ButtonMixin(DirMixin(ThemableMixin(PolymerElement))) {
33
- static get template() {
34
- return html`
35
- <slot id="slot">
36
- <div part="icon"></div>
37
- </slot>
38
- <div part="icon" hidden$="[[!_showFallbackIcon]]"></div>
39
- `;
40
- }
41
-
31
+ class DrawerToggle extends ButtonMixin(DirMixin(ThemableMixin(PolylitMixin(LitElement)))) {
42
32
  static get is() {
43
33
  return 'vaadin-drawer-toggle';
44
34
  }
45
35
 
36
+ static get styles() {
37
+ return [buttonStyles, drawerToggle];
38
+ }
39
+
46
40
  static get properties() {
47
41
  return {
48
42
  ariaLabel: {
49
43
  type: String,
50
44
  value: 'Toggle navigation panel',
51
45
  reflectToAttribute: true,
46
+ sync: true,
52
47
  },
53
48
 
54
49
  /** @private */
@@ -67,15 +62,21 @@ class DrawerToggle extends ButtonMixin(DirMixin(ThemableMixin(PolymerElement)))
67
62
  });
68
63
  }
69
64
 
65
+ /** @protected */
66
+ render() {
67
+ return html`
68
+ <slot id="slot" @slotchange="${this._toggleFallbackIcon}">
69
+ <div part="icon"></div>
70
+ </slot>
71
+ <div part="icon" ?hidden="${!this._showFallbackIcon}"></div>
72
+ `;
73
+ }
74
+
70
75
  /** @protected */
71
76
  ready() {
72
77
  super.ready();
73
78
 
74
79
  this._toggleFallbackIcon();
75
-
76
- this.$.slot.addEventListener('slotchange', () => {
77
- this._toggleFallbackIcon();
78
- });
79
80
  }
80
81
 
81
82
  /** @private */
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.8.0-alpha9",
4
+ "version": "25.0.0-alpha2",
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.8.0-alpha9",
4
+ "version": "25.0.0-alpha2",
5
5
  "description-markup": "markdown",
6
6
  "framework": "lit",
7
7
  "framework-config": {
@@ -1 +0,0 @@
1
- export * from './vaadin-app-layout.js';
@@ -1,59 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright (c) 2018 - 2025 Vaadin Ltd.
4
- * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
- */
6
- import './detect-ios-navbar.js';
7
- import './safe-area-inset.js';
8
- import { html, LitElement } from 'lit';
9
- import { defineCustomElement } from '@vaadin/component-base/src/define.js';
10
- import { ElementMixin } from '@vaadin/component-base/src/element-mixin.js';
11
- import { PolylitMixin } from '@vaadin/component-base/src/polylit-mixin.js';
12
- import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
13
- import { AppLayoutMixin } from './vaadin-app-layout-mixin.js';
14
- import { appLayoutStyles } from './vaadin-app-layout-styles.js';
15
-
16
- /**
17
- * LitElement based version of `<vaadin-app-layout>` web component.
18
- *
19
- * ## Disclaimer
20
- *
21
- * This component is an experiment and not yet a part of Vaadin platform.
22
- * There is no ETA regarding specific Vaadin version where it'll land.
23
- * Feel free to try this code in your apps as per Apache 2.0 license.
24
- */
25
- class AppLayout extends AppLayoutMixin(ElementMixin(ThemableMixin(PolylitMixin(LitElement)))) {
26
- static get is() {
27
- return 'vaadin-app-layout';
28
- }
29
-
30
- static get styles() {
31
- return appLayoutStyles;
32
- }
33
-
34
- /** @protected */
35
- render() {
36
- return html`
37
- <div part="navbar" id="navbarTop">
38
- <slot name="navbar" @slotchange="${this._updateTouchOptimizedMode}"></slot>
39
- </div>
40
- <div part="backdrop" @click="${this._onBackdropClick}" @touchend="${this._onBackdropTouchend}"></div>
41
- <div part="drawer" id="drawer">
42
- <slot name="drawer" id="drawerSlot" @slotchange="${this._updateDrawerSize}"></slot>
43
- </div>
44
- <div content>
45
- <slot></slot>
46
- </div>
47
- <div part="navbar" id="navbarBottom" bottom hidden>
48
- <slot name="navbar-bottom"></slot>
49
- </div>
50
- <div hidden>
51
- <slot id="touchSlot" name="navbar touch-optimized" @slotchange="${this._updateTouchOptimizedMode}"></slot>
52
- </div>
53
- `;
54
- }
55
- }
56
-
57
- defineCustomElement(AppLayout);
58
-
59
- export { AppLayout };
@@ -1 +0,0 @@
1
- export * from './vaadin-drawer-toggle.js';
@@ -1,87 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright (c) 2018 - 2025 Vaadin Ltd.
4
- * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
- */
6
- import { html, LitElement } from 'lit';
7
- import { buttonStyles } from '@vaadin/button/src/vaadin-button-base.js';
8
- import { ButtonMixin } from '@vaadin/button/src/vaadin-button-mixin.js';
9
- import { defineCustomElement } from '@vaadin/component-base/src/define.js';
10
- import { DirMixin } from '@vaadin/component-base/src/dir-mixin.js';
11
- import { isEmptyTextNode } from '@vaadin/component-base/src/dom-utils.js';
12
- import { PolylitMixin } from '@vaadin/component-base/src/polylit-mixin.js';
13
- import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
14
- import { drawerToggle } from './vaadin-drawer-toggle-styles.js';
15
-
16
- /**
17
- * LitElement based version of `<vaadin-drawer-toggle>` web component.
18
- *
19
- * ## Disclaimer
20
- *
21
- * This component is an experiment and not yet a part of Vaadin platform.
22
- * There is no ETA regarding specific Vaadin version where it'll land.
23
- * Feel free to try this code in your apps as per Apache 2.0 license.
24
- */
25
- class DrawerToggle extends ButtonMixin(DirMixin(ThemableMixin(PolylitMixin(LitElement)))) {
26
- static get is() {
27
- return 'vaadin-drawer-toggle';
28
- }
29
-
30
- static get styles() {
31
- return [buttonStyles, drawerToggle];
32
- }
33
-
34
- static get properties() {
35
- return {
36
- ariaLabel: {
37
- type: String,
38
- value: 'Toggle navigation panel',
39
- reflectToAttribute: true,
40
- sync: true,
41
- },
42
-
43
- /** @private */
44
- _showFallbackIcon: {
45
- type: Boolean,
46
- value: false,
47
- },
48
- };
49
- }
50
-
51
- constructor() {
52
- super();
53
-
54
- this.addEventListener('click', () => {
55
- this.dispatchEvent(new CustomEvent('drawer-toggle-click', { bubbles: true, composed: true }));
56
- });
57
- }
58
-
59
- /** @protected */
60
- render() {
61
- return html`
62
- <slot id="slot" @slotchange="${this._toggleFallbackIcon}">
63
- <div part="icon"></div>
64
- </slot>
65
- <div part="icon" ?hidden="${!this._showFallbackIcon}"></div>
66
- `;
67
- }
68
-
69
- /** @protected */
70
- ready() {
71
- super.ready();
72
-
73
- this._toggleFallbackIcon();
74
- }
75
-
76
- /** @private */
77
- _toggleFallbackIcon() {
78
- const nodes = this.$.slot.assignedNodes();
79
-
80
- // Show fallback icon if there are 1-2 empty text nodes assigned to the default slot.
81
- this._showFallbackIcon = nodes.length > 0 && nodes.every((node) => isEmptyTextNode(node));
82
- }
83
- }
84
-
85
- defineCustomElement(DrawerToggle);
86
-
87
- export { DrawerToggle };
@@ -1,2 +0,0 @@
1
- import './vaadin-app-layout-styles.js';
2
- import '../../src/vaadin-lit-app-layout.js';
@@ -1,2 +0,0 @@
1
- import './vaadin-app-layout-styles.js';
2
- import '../../src/vaadin-lit-app-layout.js';
@@ -1,2 +0,0 @@
1
- import './vaadin-drawer-toggle-styles.js';
2
- import '../../src/vaadin-lit-drawer-toggle.js';
@@ -1,2 +0,0 @@
1
- import './vaadin-drawer-toggle-styles.js';
2
- import '../../src/vaadin-lit-drawer-toggle.js';
@@ -1,3 +0,0 @@
1
- import '@vaadin/vaadin-material-styles/color.js';
2
- import '@vaadin/vaadin-material-styles/shadow.js';
3
- import '@vaadin/vaadin-material-styles/typography.js';
@@ -1,53 +0,0 @@
1
- import '@vaadin/vaadin-material-styles/color.js';
2
- import '@vaadin/vaadin-material-styles/shadow.js';
3
- import '@vaadin/vaadin-material-styles/typography.js';
4
- import { css, registerStyles } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
5
-
6
- registerStyles(
7
- 'vaadin-app-layout',
8
- css`
9
- :host {
10
- background-color: var(--material-background-color);
11
- }
12
-
13
- [part='navbar'] {
14
- padding: 0.25em 0.5em;
15
- background: var(--vaadin-app-layout-navbar-background, var(--material-secondary-background-color));
16
- box-shadow: var(--material-shadow-elevation-8dp);
17
- }
18
-
19
- [part='drawer'] {
20
- background: var(--material-background-color);
21
- border-inline-end: 1px solid var(--material-secondary-background-color);
22
- }
23
-
24
- :host([primary-section='drawer']) [part='drawer'] {
25
- z-index: 2;
26
- }
27
-
28
- :host([primary-section='navbar']:not([overlay])) [part='navbar'] {
29
- z-index: 1;
30
- }
31
-
32
- [part] ::slotted(h2),
33
- [part] ::slotted(h3),
34
- [part] ::slotted(h4) {
35
- line-height: 2.5rem;
36
- margin-top: 0.25rem !important;
37
- margin-bottom: 0.25rem !important;
38
- }
39
-
40
- [part='navbar'][bottom] {
41
- padding: 0 1em;
42
- box-shadow: var(--material-shadow-elevation-4dp);
43
- }
44
-
45
- @media (min-width: 700px) {
46
- [part='navbar'] {
47
- padding: 0.5em 0.75em;
48
- box-shadow: var(--material-shadow-elevation-4dp);
49
- }
50
- }
51
- `,
52
- { moduleId: 'material-app-layout' },
53
- );
@@ -1,2 +0,0 @@
1
- import './vaadin-app-layout-styles.js';
2
- import '../../src/vaadin-app-layout.js';
@@ -1,2 +0,0 @@
1
- import './vaadin-app-layout-styles.js';
2
- import '../../src/vaadin-app-layout.js';
@@ -1 +0,0 @@
1
- import '@vaadin/vaadin-material-styles/color.js';
@@ -1,39 +0,0 @@
1
- import '@vaadin/vaadin-material-styles/color.js';
2
- import { button } from '@vaadin/button/theme/material/vaadin-button-styles.js';
3
- import { css, registerStyles } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
4
-
5
- const drawerToggle = css`
6
- :host {
7
- min-width: 0 !important;
8
- width: 48px;
9
- height: 48px;
10
- padding: 0;
11
- border-radius: 50%;
12
- margin-inline-end: 1em;
13
- }
14
-
15
- [part='icon'] {
16
- top: 18px;
17
- left: 15px;
18
- }
19
-
20
- [part='icon'],
21
- [part='icon']::after,
22
- [part='icon']::before {
23
- background-color: currentColor;
24
- height: 2px;
25
- width: 18px;
26
- }
27
-
28
- [part='icon']::after {
29
- top: 5px;
30
- }
31
-
32
- [part='icon']::before {
33
- top: 10px;
34
- }
35
- `;
36
-
37
- registerStyles('vaadin-drawer-toggle', [button, drawerToggle], {
38
- moduleId: 'material-drawer-toggle',
39
- });
@@ -1,2 +0,0 @@
1
- import './vaadin-drawer-toggle-styles.js';
2
- import '../../src/vaadin-drawer-toggle.js';
@@ -1,2 +0,0 @@
1
- import './vaadin-drawer-toggle-styles.js';
2
- import '../../src/vaadin-drawer-toggle.js';
@@ -1,2 +0,0 @@
1
- import './vaadin-app-layout-styles.js';
2
- import '../../src/vaadin-lit-app-layout.js';
@@ -1,2 +0,0 @@
1
- import './vaadin-app-layout-styles.js';
2
- import '../../src/vaadin-lit-app-layout.js';
@@ -1,2 +0,0 @@
1
- import './vaadin-drawer-toggle-styles.js';
2
- import '../../src/vaadin-lit-drawer-toggle.js';
@@ -1,2 +0,0 @@
1
- import './vaadin-drawer-toggle-styles.js';
2
- import '../../src/vaadin-lit-drawer-toggle.js';
@@ -1 +0,0 @@
1
- export * from './src/vaadin-app-layout.js';
@@ -1,2 +0,0 @@
1
- import './theme/lumo/vaadin-lit-app-layout.js';
2
- export * from './src/vaadin-lit-app-layout.js';
@@ -1 +0,0 @@
1
- export * from './src/vaadin-drawer-toggle.js';
@@ -1,2 +0,0 @@
1
- import './theme/lumo/vaadin-lit-drawer-toggle.js';
2
- export * from './src/vaadin-lit-drawer-toggle.js';